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 |
---|---|---|---|---|---|---|
/ send a new message | @FXML
public void sendAmessage(ActionEvent event) throws SQLException{
DBConnect db = DBConnect.getInstance();
db.sendMessage(message.getText(), selectedCustomer.getChat_id());
message.setText("");
updateChat();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void sendMessage(String msg) {\n message = msg; \n newMessage = true;\n }",
"public void send(Message msg);",
"public void sendMessage(String message) {}",
"public void sendMessage(String message);",
"@Override\r\n\tpublic void sendMessage(String message) {\n\t\t\r\n\t}",
"void sendMessage(String msg);",
"void send(String message);",
"public void sendMessage(String message){\n pw.print(message);\n pw.flush();\n }",
"public void sendMessage()\r\n {\r\n MessageScreen messageScreen = new MessageScreen(_lastMessageSent);\r\n pushScreen(messageScreen);\r\n }",
"@Override\n\tpublic void send(String msg) {\n\t\t\n\t\t\n\t\n\t}",
"@Override\n\tpublic void sendMessage() {\n\t\t\n\t}",
"public void sendMsg(){\r\n\t\tsuper.getPPMsg(send);\r\n\t}",
"public void sendMsg(Message msg){\n messagesParser.sendMsg(msg);\n }",
"public void sendMessage(String message) {\n try {\n bos.write(message);\n bos.newLine();\n bos.flush();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void sendMessage(String message) {\n\n setChanged();\n notifyObservers(message);\n }",
"@Override\n\tpublic void SendMessage(String message) {\n\t\t\n\t\ttry\n\t\t{\n\t\tprintWriters.get(clients.get(0)).println(message);\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\n\t}",
"public void sendMessage(Message msg) {\n network.sendAsync(msg);\n }",
"@Override\n\tpublic void send(String msg) {\n\t}",
"@Override\n\tpublic void sendMsg(String msg) {\n\n\t}",
"void sendMessage(ChatMessage msg) {\n\t\ttry {\n\t\t\tsOutput.writeObject(msg);\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tdisplay(\"Não foi possível enviar a mesagem !!!\");\n\t\t}\n\t}",
"public void sendMessage(String msg) {\n try {\n out.write(msg);\n out.newLine();\n out.flush();\n \n } catch (IOException e) {\n \tshutdown();\n e.printStackTrace();\n }\n }",
"public void sendMessage(NetMessage message) {\n ClientDirector.getDataManager().sendMessage(message);\n }",
"private void sendMessage(String message){\n\t\ttry{\n\t\t\toutput.writeObject(\"Punk Ass Server: \" + message);\n\t\t\toutput.flush();\n\t\t\tshowMessage(\"\\nPunk Ass Server: \" + message); \n\t\t}catch(IOException ioe){\n\t\t\tchatWindow.append(\"\\n Message not sent, try again or typing something else\");\n\t\t\t\n\t\t}\n\t\t\n\t}",
"public void send(String msg) {\n msgs.push(msg);\n lastMessageSentAt = game.ticks;\n }",
"@Override\r\n\tpublic void sendMessage(String message) {\n\t\tmediator.send(message, this);\r\n\t}",
"void sendMessage() {\n\n\t}",
"public void sendMessage(String msg) {\n\t\tplayer.sendMessage(msg);\n\t}",
"@Override\n public void sendMessage(Message m) {\n commSender.sendMessage(m);\n }",
"void messageSent();",
"private void sendMessage(ChatMessage msg) {\n try {\n sOutput.writeObject(msg);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public abstract void sendMessage(String message);",
"public void sendMessage(String message){\n\t if (mOut != null && !mOut.checkError()) {\n\t mOut.println(message+\"\\n\");\n\t mOut.flush();\n\t }\n\t }",
"private void sendMessage() {\n\t\tString text = myMessagePane.getText();\n\t\tMessage msg = new Message(text, myData.userName, myData.color);\n\n\t\tcommunicationsHandler.send(msg);\n\n\t\t// De-escape xml-specific characters\n\t\tXmlParser xmlParser = new XmlParser(myData);\n\t\tString outText = xmlParser.deEscapeXMLChars(msg.text);\n\t\tmsg.text = outText;\n\n\t\tmyMessagePane.setText(\"\");\n\t\tupdateMessageArea(msg);\n\n\t}",
"public void sendMessage(String message) {\n printWriter.append(message);\n printWriter.flush();\n }",
"public void sendMessage ( String message ) {\n\t\texecute ( handle -> handle.sendMessage ( message ) );\n\t}",
"@Override\r\n\tpublic boolean send(String msg) {\n \ttry {\r\n \t\tsendMessage(msg);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"@Override\n\tpublic void Send(String message) {\n\t\tgetReceiveArea().append(\"我:\"+message + \"\\n\");\n\t\tgetMediator().sendMessage(getName(), message);\n\t}",
"private void sendMessage(String message) {\n\t\tMainstarter.meClient.sendMessage(new MessageSend(message, Mainstarter.meClient));\n\t\ttextInputMessage.clear();\n\t}",
"public void sendMessage(String message) {\n\t\tsocketTextOut.println(message);\n\t\tsocketTextOut.flush();\n\t}",
"public void send(Message message) {\r\n channel.writeAndFlush(message);\r\n }",
"private void sendMsg()\n {\n try {\n spauldingApp.println(\"AckRequest.sendMsg() - sending request to nodeID= \" + node.getNodeID() + \" ...\");\n this.nbrTransmits++;\n //spauldingApp.eventLogger.writeMsgSentPing(fetchReqMsg);\n spauldingApp.getMoteIF().send(node.getNodeID(), requestMsg);\n } catch (Exception e) {\n spauldingApp.println(\"ERROR: Can't send message: \" + e);\n e.printStackTrace();\n }\n }",
"public synchronized void sendMessage (String msg, ServerThread current) {\n\t\tcurrent.send (msg);\n\t}",
"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 void sendMessage(String message) {\r\n\r\n synchronized (this) {\r\n //count++;\r\n if (mBufferOut != null && !mBufferOut.checkError()) {\r\n Log.i(TAG, \"message: \" + message);\r\n mBufferOut.print(message);\r\n mBufferOut.flush();\r\n }\r\n }\r\n }",
"public static void sendMessage(String message) {\r\n\t\tbtService.write(message.getBytes());\r\n\t}",
"public void sendMessage(ChatMessage msg) {\n\t\ttry {\n\t\t\tsOutput.writeObject(msg);\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tdisplay(\"Exception writing to server: \" + e);\n\t\t}\n\t}",
"public void sendMessage(String message)\n\t\t{\n\t\t\twriter.println(message);\n\t\t\twriter.flush();\n\t\t}",
"public void newMessage(String new_message) {\r\n\t\tsynchronized(this.messages) {\r\n\t\t\tthis.messages.push(new_message);\r\n\t\t}\r\n\t}",
"void sendMessage(String message) {\n writer.println(message);\n }",
"@Override\n public void sendMessage(Message<JsonPayload> message) throws IOException {\n System.out.println(\"Trying to send a message...\");\n outputMessageStream.write(message.getContent().getJson());\n outputMessageStream.newLine();\n outputMessageStream.flush();\n socket.shutdownOutput();\n }",
"void sendMessage(String msg) {\n\t\ttry {\n\t\t\tout.writeObject(msg);\n\t\t\tout.flush();\n\t\t\tSystem.out.println(\"Sending to server => \" + msg);\n\t\t} catch (IOException ioException) {\n\t\t\tioException.printStackTrace();\n\t\t}\n\t}",
"private void sendMessage(ChatMessage msg) throws IOException {\n try {\n sOutput.writeObject(msg);\n } catch (IOException e) {\n sOutput.close();\n sInput.close();\n e.printStackTrace();\n }\n //sOutput.flush();\n }",
"void sendMessage(String msg) {\n\t\ttry {\n\t\t\tout.writeObject(msg);\n\t\t\tout.flush();\n\t\t\tSystem.out.println(\"Sending to client => \" + msg);\n\t\t} catch (IOException ioException) {\n\t\t\tioException.printStackTrace();\n\t\t}\n\t}",
"private void sendMessage(String content, String room) {\n }",
"public abstract void send(String message) throws IOException;",
"public void messageSent(Message m) {\n\t\t\r\n\t}",
"public void send(String msg) throws CcException\n {\n commWriter.send(msg);\n }",
"public void sendMessage(Message message) {\n if (accepted || !ended || message.type.equals(\"register\") || message.type.equals(\"lobby\")) {\n message.packetNum = packetNum;\n ByteBuffer buffer = ByteBuffer.wrap(SerializationUtils.serialize(message));\n SocketAddress addr = null;\n try {\n addr = client.getLocalAddress();\n log(\"sending [\" + message + \"] to \" + addr);\n client.write(buffer);\n reconciliation.add(message);\n packetNum++;\n } catch (IOException e) {\n error(\"Failed to send message to:\" + addr);\n e.printStackTrace();\n }\n }\n }",
"@Override\r\n public void update(String message) {\r\n send(message);\r\n }",
"public void sendMessage(String s){\r\n\t\tsynchronized(msgToSend){ // synchronized to maintain thread-safety\r\n\t\t\tmsgToSend.append(s + \"\\n\");\r\n\t\t}\r\n\t}",
"public void sendMessage(String message) {\r\n sendMessageAsByte(message.getBytes());\r\n }",
"void sendMessage(Message m) throws IOException {\n String msg = m.toString();\n\n buffer = msg.getBytes(\"Windows-1256\");\n toServer = new DatagramPacket(buffer, buffer.length,\n InetAddress.getByName(sendGroup), port);\n if (m.getType() == Message.DATA) {\n manager.mManager.addMessage(m);\n }\n\n System.out.println(getName() + \"-->\" + m);\n serverSocket.send(toServer);\n }",
"public abstract void message(String channel, String message);",
"@Override\n public void sendMessage(Message m)\n {\n messages.put(m);\n }",
"protected void sendMessage(final String message) {\n\n logger.debug(LOG_TAG + \".sendMessage()\");\n\n // send message to client\n printWriter.println(message);\n\n }",
"private void sendMessage(ProtocolMessage msg, SocketChannel channel) throws IOException {\n\t\tchannel.write(ProtocolMessage.toBytes(msg));\n\t}",
"public void doSendMsg() {\n FacesContext fctx = FacesContext.getCurrentInstance();\n HttpSession sess = (HttpSession) fctx.getExternalContext().getSession(false);\n SEHRMessagingListener chatHdl = (SEHRMessagingListener) sess.getAttribute(\"ChatHandler\");\n if (chatHdl.isSession()) {\n //TODO implement chat via sehr.xnet.DOMAIN.chat to all...\n if (room.equalsIgnoreCase(\"public\")) {\n //send public inside zone\n chatHdl.sendMsg(this.text, SEHRMessagingListener.PUBLIC, moduleCtrl.getLocalZoneID(), -1, -1);\n } else {\n chatHdl.sendMsg(this.text, SEHRMessagingListener.PRIVATE_USER, moduleCtrl.getLocalZoneID(), -1, curUserToChat.getUsrid());\n }\n this.text = \"\";\n }\n //return \"pm:vwChatRoom\";\n }",
"public static void sendMessage(String message) {\n getBwapi().sendText(message);\n }",
"public void sendChat(String message) {\r\n connection.chat(message);\r\n }",
"private void sendMessage() throws Exception {\n\t\tGetTimestamp(\"Sending Message: \");\n\t\tString inputMessage;\n\t\tinputMessage = input.nextLine();\n\t\tString tosend = encrypt(clientkey, inputMessage);\n\t\t\n\t\tJSONObject RESPONSE = new JSONObject();\n\t\tRESPONSE.put(\"payload\",tosend);\n\t\tSystem.out.println(RESPONSE);\n\t\t\n\t\tpw.println(tosend);\n\t\tpw.flush();\n\t\tSystem.out.println(\"Message sent to the client : \" + inputMessage);\n\t\tif (inputMessage.equalsIgnoreCase(\"bye\")) {\n\t\t\tSystem.out.println(\"sending close command\");\n\t\t\tcloseConnection();\n\t\t} else {\n\t\t\tgetMessage();\n\t\t}\n\t}",
"public void send_message(){\n logical_clock++;\n System.out.println(\"Send Message Clock:\" +logical_clock);\n encrypt(logical_clock);\n\n }",
"synchronized void sendMessage(Message message) throws IOException {\n socketOutput.reset();\n socketOutput.writeObject(message);\n socketOutput.flush();\n }",
"public void message(String from,String msg,String to);",
"public void sendMessage(String msg) {\n\n if (msg != null && !msg.isEmpty()) {\n\n RestResponse.BotMessage botMessage = new RestResponse.BotMessage(msg);\n\n RestResponse.BotPayLoad botPayLoad = new RestResponse.BotPayLoad();\n botPayLoad.setMessage(botMessage);\n\n Gson gson = new Gson();\n String jsonPayload = gson.toJson(botPayLoad);\n\n BotRequestPool.getBotRequestStringArrayList().add(jsonPayload);\n }\n\n if (!BotRequestPool.isPoolEmpty()) {\n if (!BotRequestPool.getBotRequestStringArrayList().isEmpty()) {\n ArrayList<String> botRequestStringArrayList = BotRequestPool.getBotRequestStringArrayList();\n int len = botRequestStringArrayList.size();\n for (int i = 0; i < len; i++) {\n String botRequestPayload = botRequestStringArrayList.get(i);\n boolean wasSuccessfullySend = SocketWrapper.getInstance(mContext).sendMessage(botRequestPayload);\n if (wasSuccessfullySend) {\n BotRequestPool.getBotRequestStringArrayList().remove(botRequestPayload);\n i--; //reset the parameter\n len--; //reset the length.\n } else {\n break;//Break the loop, as re-connection would be attempted from sendMessage(...)\n }\n }\n }\n }\n }",
"@Override\n\tpublic void newMsg(String msg) throws RemoteException {\n\t\tchathistory.add(new chatmessage<String>(msg + \"\\n\"));\n\t}",
"public void sendmsg(Message msg){\n try {\n oos.writeObject(new Datapacket(1, null, msg,null, null));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void sendChat(String message) {\n\t\tenqueue(\"PRIVMSG #\"+Executable.targetChannel+\" :imGlitch \"+message);\n\t}",
"public void sendMessage(String msg) {\n\t\tfor (MessagingServer server : servers) {\n\t\t\tserver.messages.add(msg + \" (received from \" + this.serverId + \")\");\n\t\t}\n\t}",
"public void sendMsg(String address, String title, String content);",
"public void sendMessage(String message) {\n\t\tSystem.out.println(\"DEBUG : response sent by server = \" + message);\n\t\tprinter.println(message);\n\t}",
"public final void send(MidiMessage msg) {\n device.send(msg);\n }",
"private void sendMessage(String message){\n PostTask pt = new PostTask();\n pt.execute();\n }",
"public void sendMsg(String msg) {\n\t\tSystem.out.println(\"sendMSG\");\n\n\t\tMessage message = new Message(msg, convID, socketOut.getInetAddress(), myNickName);\n\t\tSystem.out.println(\"Created message \" + message.toString());\n\t\ttry {\n\t\t\toutputStream.writeObject(message);\n\t\t\t//display(message);\n\n\t\t} catch (IOException e) { display(\"IOException while sending message \" + e.getMessage()); }\n\t}",
"void sendRequest(String message);",
"private void sendMessage(String message){\n try{\n output.writeObject(nickname+\" : \" + message);\n output.flush();\n showMessage(\"\\n\"+nickname+\" : \" + message);\n }catch(IOException ioException){\n chatWindow.append(\"\\n Oops! Something went wrong!\");\n }\n }",
"public void send() {\n\t}",
"public void send (final TCNetworkMessage message) {\n if (channelSessionID == ((DSOMessageBase)message).getLocalSessionID()) {\n super.send(message); \n } else {\n logger.info(\"Drop old message: \"+ ((DSOMessageBase)message).getMessageType() + \" Expected \"+ channelSessionID + \" but got \" + ((DSOMessageBase)message).getLocalSessionID());\n }\n }",
"public synchronized void send(String message) {\n writer.println(message);\n writer.flush();\n }",
"public void send(String message) {\r\n String command;\r\n if ( !message.startsWith(\"/\") || message.length() == 1 || message.startsWith(\"/ \")) {\r\n command = \"MESG\" + \" \" + message;\r\n } else {\r\n StringTokenizer tokens = new StringTokenizer(message);\r\n command = tokens.nextToken(\"/\").toUpperCase();\r\n if (command.equals(\"MESG\") && tokens.hasMoreTokens()) {\r\n command = command + \" \" + tokens.nextToken(\"\\n\").trim();\r\n } else {\r\n while (tokens.hasMoreTokens()) {\r\n command = command + \" \" + tokens.nextToken(\" \\n\");\r\n }\r\n }\r\n }\r\n if (out != null) {\r\n out.println(command);\r\n } else {\r\n keepGoing = false;\r\n finalize();\r\n }\r\n }",
"public static void Send(Message message)\n\t{\n\t\ttry\n\t\t{\n\t\t\t_sendBuf = toByteArray(message);\n\n\t\t\t//dc message\n\t\t\tif (message.getRecipient().equalsIgnoreCase(\"\") &&\n\t\t\t\tmessage.getMessage().equalsIgnoreCase(\"%BYE%\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sent BYE\");\n\t\t\t\t_socket.getOutputStream().write(Message.BYE);\n\t\t\t}\n\t\t\t//lobby message\n\t\t\telse if (message.getRecipient().equalsIgnoreCase(\"\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sent LOBBY\");\n\t\t\t\t_socket.getOutputStream().write(Message.LOBBY);\n\t\t\t}\n\t\t\t//search request\n\t\t\telse if (message.getRecipient().equalsIgnoreCase(\"all\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sent SEARCH\");\n\t\t\t\t_socket.getOutputStream().write(Message.SEARCH);\n\t\t\t}\n\t\t\t//answer request\n\t\t\telse if (message.getRecipient().equalsIgnoreCase(\"server\") &&\n\t\t\t\t\t message.getOrigin().equalsIgnoreCase(\"none\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sent CHOICE\");\n\t\t\t\t_socket.getOutputStream().write(Message.CHOICE);\n\t\t\t}\n\t\t\t//whisper message\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sent WHISPER\");\n\t\t\t\t_socket.getOutputStream().write(Message.WHISPER);\n\t\t\t}\n\t\t\t_socket.getOutputStream().write(_sendBuf);\n\t\t\t_socket.getOutputStream().flush();\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\n\tpublic void sendMsg(MsgVO mvo) {\n\t\tsession.insert(namespace + \".sendMsg\", mvo);\n\t}",
"public void send(String msg) {\n CompletableFuture.runAsync(() -> serverCon.send(msg));\n }",
"public void send(String message){\n\t\ttry {\n\t\t\tSystem.out.println(\"Sende Nachricht \" + message);\n\t\t\tout.reset();\n\t\t\tout.writeObject(message);\n\t\t\tout.flush();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private <T extends QMessage> void sendTestMsg(T msg) {\n\n\t\ttry {\n\t\t\tString token = KeycloakUtils.getAccessToken(\"http://keycloak.genny.life\", \"genny\", \"genny\",\n\t\t\t\t\t\"056b73c1-7078-411d-80ec-87d41c55c3b4\", \"user1\", \"password1\");\n\t\t\tmsg.setToken(token);\n\n\t\t\t/* get the bridge url to publish the message to webcmd channel */\n\t\t\tString bridgetUrl = ENV_GENNY_BRIDGE_URL + \"/api/service?channel=webdata\";\n\n\t\t\tQwandaUtils.apiPostEntity(bridgetUrl, JsonUtils.toJson(msg), token);\n\n\t\t} catch (IOException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\n\t}",
"private void sendMessage(String message) {\n if (mChatService.getState() != BluetoothChatService.STATE_CONNECTED) {\n // Toast.makeText(this, R.string.not_connected, Toast.LENGTH_SHORT).show();\n return;\n }\n\n if (message.length() > 0) {\n byte[] send = message.getBytes();\n mChatService.write(send);\n mOutStringBuffer.setLength(0);\n\n }\n }",
"@Override\n\t\t\t\t\tpublic void sendMessage(String message) {\n\t\t\t\t\t\tString toSend = \"<append><topic>\" + xmlData.get(\"topic\") +\"</topic><user>\" + username + \"</user><msg>\" + message + \"</msg></append>\";\n\t\t\t\t\t\tsendData(toSend);\n\t\t\t\t\t}",
"private void sendMyMessage(JSONObject jsonMsg) {\n String link = \"http://\"+ip+\":8065/api/v1/channels/\"+channel_id+\"/create\";\n String response;\n try{\n ConnectAPIs messageAPI = new ConnectAPIs(link,token);\n messageAPI.sendComment(jsonMsg,this,this);\n }catch(Exception e){\n System.out.println(\"Sending error: \" + e.toString());\n }\n }",
"public void sendMessage(final String message) {\n\n Runnable runnable = new Runnable() {\n @Override\n public void run() {\n\n if (null != sendBuffer) {\n Log.d(TAG, \"Sending: \" + message);\n sendBuffer.println(message);\n sendBuffer.flush();\n }\n }\n };\n\n Thread thread = new Thread(runnable);\n thread.start();\n }",
"public void sendMessage( MessagingV2 friend )\n {\n if( msg.length() == 0 )\n System.err.println( \"There is no message to send\" );\n else\n {\n System.out.println( user + \", your message has been sent\" );\n friend.receiveMessage( msg, user );\n msg = \"\";\n }\n }",
"@Override\n public void send(String message) {\n\n out.println(message);\n out.flush();\n\n }",
"private void SendMessage(Object m, MessageType type)\n\t{\n\t\tMessage message = new Message();\n\t\tmessage.messageType = type;\n\t\tmessage.message = m;\n\t\t\n\t\ttry {\n\t\t\tout.writeObject(message);\n\t\t\tout.flush();\n\t\t} catch (IOException e) {\n\t\t\tApplicationManager.textChat.write(\"Cant send message\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}"
] | [
"0.81898594",
"0.7711328",
"0.7628965",
"0.7602749",
"0.7572829",
"0.7536589",
"0.73904693",
"0.73760146",
"0.7344552",
"0.7327101",
"0.73253983",
"0.72775716",
"0.7262471",
"0.72518265",
"0.7226973",
"0.7203142",
"0.71983147",
"0.71960205",
"0.7167439",
"0.71659774",
"0.7163956",
"0.7150045",
"0.7130584",
"0.71171397",
"0.70910484",
"0.7090916",
"0.70832103",
"0.7022061",
"0.70170623",
"0.6995176",
"0.6991194",
"0.6945871",
"0.6941871",
"0.6937096",
"0.69269043",
"0.6902461",
"0.6900458",
"0.6899159",
"0.6895994",
"0.6893913",
"0.6885263",
"0.6882903",
"0.687305",
"0.6871671",
"0.6869759",
"0.6866742",
"0.6863327",
"0.6839337",
"0.6834734",
"0.6827771",
"0.68234074",
"0.68151706",
"0.68126076",
"0.68043697",
"0.67948246",
"0.6794506",
"0.67820233",
"0.6778732",
"0.67748135",
"0.6771478",
"0.67700183",
"0.6768487",
"0.67629284",
"0.67592037",
"0.67433894",
"0.67281073",
"0.6719129",
"0.6714834",
"0.6703029",
"0.6702997",
"0.66969424",
"0.6693015",
"0.6689374",
"0.66882473",
"0.66834754",
"0.66756815",
"0.6669312",
"0.6667752",
"0.66659516",
"0.6662455",
"0.665931",
"0.6655805",
"0.6649347",
"0.6648801",
"0.664851",
"0.6648208",
"0.66400886",
"0.6632999",
"0.6627972",
"0.66216135",
"0.66191286",
"0.6618015",
"0.66158587",
"0.66149247",
"0.6602948",
"0.6590305",
"0.65856475",
"0.65804315",
"0.657774",
"0.65770596",
"0.6563013"
] | 0.0 | -1 |
update chat after each message | private void updateChat() throws SQLException{
DBConnect db = DBConnect.getInstance();
ArrayList<String> messages = db.getChat(selectedCustomer.getChat_id());
chat.getItems().clear();
for(String mess :messages){
chat.getItems().add(mess);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public synchronized void doUpdateChatListView(Message msg)\n {\n Bundle b = msg.getData();\n String next = b.getString(Constants.CHAR);\n chatList.add(new CustomString(next,Constants.SENDER_DEVICE));\n customAdapter.notifyDataSetChanged();\n\n }",
"@Override\r\n\t\t\tpublic void onChat(String message) {\n\r\n\t\t\t}",
"private void changeChat(ChangeChatEvent changeChatEvent) {\n IChat chat = changeChatEvent.getChat();\n if(chat != null && chat.getMessages() != null){\n Platform.runLater(() -> {\n List<? extends IMessageIn> mes = new ArrayList<>(chat.getMessages());\n messages.setAll(mes);\n });\n } else {\n Platform.runLater(() -> {\n messages.clear();\n });\n }\n\n }",
"private void updateChats(final View view,\n final ChatsStruct chatsStructAfterChange) {\n if (mMainHandler != null) {\n mMainHandler.post(new Runnable() {\n @Override\n public void run() {\n final TextView unreadMessage = (TextView) view\n .findViewById(R.id.unread_message_num);\n final ImageView fileTransfer = (ImageView) view\n .findViewById(R.id.chat_file_transfer);\n if (chatsStructAfterChange.getIsFileTransfer()) {\n fileTransfer.setVisibility(View.VISIBLE);\n } else {\n fileTransfer.setVisibility(View.GONE);\n }\n final int number = chatsStructAfterChange\n .getUnreadMessageNumber();\n if (number <= MIN_NUMBER) {\n unreadMessage.setVisibility(View.GONE);\n } else {\n // Unread message info\n unreadMessage.setVisibility(View.VISIBLE);\n if (number > MAX_DISPLAYED_DIGITAL_NUMBER) {\n unreadMessage.setWidth(MAX_NUMBER_ICON_WIDTH);\n unreadMessage.setText(MAX_DISPLAYED_STRING_NUMBER);\n } else {\n unreadMessage.setWidth(MIN_NUMBER_ICON_WIDTH);\n unreadMessage.setText(String.valueOf(number));\n }\n }\n View displayNameView = view\n .findViewById(R.id.chat_remote_name);\n if (null != displayNameView) {\n String displayName = chatsStructAfterChange\n .getDisplayName();\n Logger.d(TAG, \"updateChats()->run() displayName is \"\n + displayName);\n ((TextView) displayNameView).setText(displayName);\n } else {\n Logger.e(TAG,\n \"updateChats()->run() textViewInfo is null\");\n }\n\n if (chatsStructAfterChange.isGroupChat()) {\n Logger.d(TAG,\n \"updateChats()->run() this is a group chat\");\n TextView participantNum = (TextView) view\n .findViewById(R.id.chat_remote_num);\n StringBuilder chatNum = new StringBuilder();\n chatNum.append(LEFT_BRACKET)\n .append((chatsStructAfterChange\n .getParticipantNum())\n + ChatFragment.ONE)\n .append(RIGHT_BRACKET);\n if (chatsStructAfterChange.getmSubject().equals(\"\")) {\n participantNum.setText(chatNum.toString());\n } else {\n ((TextView) displayNameView)\n .setText(chatsStructAfterChange\n .getmSubject());\n participantNum.setText(\"\");\n }\n AsyncAvatarView avatarImageView = (AsyncAvatarView) view\n .findViewById(R.id.chat_contact_quick);\n avatarImageView.setAsyncContact(chatsStructAfterChange\n .getContacts());\n } else {\n Logger.d(TAG,\n \"updateChats()->run() this is a 1-2-1 chat\");\n }\n\n // Date info\n DateView date = (DateView) view\n .findViewById(R.id.chat_date);\n date.setTime(chatsStructAfterChange.getDate(), false);\n // Last message\n TextView lastMessage = (TextView) view\n .findViewById(R.id.chat_last_message);\n String message = chatsStructAfterChange.getLatestMessage();\n if (message == null) {\n message = BLANK_STRING;\n }\n lastMessage.setText(message);\n }\n });\n }\n }",
"public void processMessage(Chat chat, Message message)\n {\n }",
"public void syncMessages() {\n\t\tArrayList<ChatEntity> nonSyncedChatEntities = new ArrayList<>();\n\t\tnonSyncedChatEntities.addAll(chatViewModel.loadChatsWithSyncStatus(false, nameID));\n\n\t\tif (nonSyncedChatEntities.size() > 0) {\n\t\t\tfor (int i = 0; i < nonSyncedChatEntities.size(); i++) {\n\t\t\t\tChatEntity chatEntity = nonSyncedChatEntities.get(i);\n\t\t\t\tchatEntity.setSynced(true);\n\t\t\t\tchatViewModel.updateSource(chatEntity);\n\t\t\t\tgetChatResult(nonSyncedChatEntities.get(i).getMessage());\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\t\tpublic void onMessage(String msg) {\n\t\t\tif(msg.equals(\"update\")) {\n\t\t\t\tAuctionList al = new AuctionList();\n\t\t\t\tal.refreshAuction();\n\t\t\t}\n\t\t\tfor (ChatWebSocket member : webSockets) {\n\t\t try {\n\t\t member.connection.sendMessage(msg);\n\t\t \n\t\t } catch(IOException e) {\n\t\t \te.printStackTrace();\n\t\t }\n\t\t }\n\t\t}",
"@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 }",
"public void chatMsg(String msg)\n\t{\n\t\tchatArea.append(msg + \"\\n\");\n\t}",
"public void chat ( String message ) {\n\t\texecute ( handle -> handle.chat ( message ) );\n\t}",
"abstract void updateMessage(String msg);",
"public void updateChat(Object tag) {\n if (null == tag || mData.isEmpty()) {\n Logger.d(TAG, \"updateChat() invalid mData: \" + mData + \" or tag: \"\n + tag);\n return;\n }\n Set<View> viewSet = mData.keySet();\n Iterator<View> viewIterator = viewSet.iterator();\n if (viewIterator == null) {\n Logger.d(TAG, \"updateChat() The viewIterator is null\");\n return;\n }\n while (viewIterator.hasNext()) {\n View view = viewIterator.next();\n if (view == null) {\n Logger.d(TAG, \"updateChat() The view is null\");\n } else {\n Object obj = mData.get(view);\n if (obj == null) {\n Logger.d(TAG, \"updateChat() The value is null\");\n } else {\n if (obj instanceof ChatsStruct) {\n ChatsStruct chatStruct = (ChatsStruct) obj;\n if (tag.equals(chatStruct.getWindowTag())) {\n updateChats(view, chatStruct);\n } else {\n Logger.d(TAG,\n \"updateChat() not the chatStruct with the tag\"\n + tag);\n }\n } else {\n Logger.d(TAG, \"updateChat() the chat struct is \" + obj);\n }\n }\n }\n }\n }",
"@Override\r\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tchat.append(s);\r\n\t\t\t\t\t}",
"public void onRecvServerChatMsg(WsMessage.ServerPushChatMsg msg) {\n if (msg != null && msg.list != null && msg.list.size() > 0) {\n for (int i = 0; i < msg.list.size(); i++) {\n WsMessage.ChatMsg chatMsg = msg.list.get(i);\n ChatManager.GetInstance().onReceiveChatMsg(chatMsg.username, chatMsg.msg, \"\", chatMsg.userid, chatMsg.admin);\n }\n ((Activity) this.mContext).runOnUiThread(new Runnable() {\n public void run() {\n ChatManager.GetInstance().notifyChatHistoryDataSetChanged();\n }\n });\n }\n }",
"public void run () {\n\t\t\t\t//This is the method that gets called everytime the GUI needs to be updated.\n\t\t\t\t\n\t\t\t\tchatWindow.append(text);\n\t\t\t\t\n\t\t\t\t\n\t\t\t}",
"private void updateNewsMessages() {\n getNewsMessages().clear();\n getNewsMessages().addAll(getNewsMap().values());\n }",
"void onUpdate(Message message);",
"public void writeMassege() {\n m = ChatClient.message;\n jtaChatHistory.setText(\"You : \" + m);\n //writeMassageServer();\n }",
"private void displayMsg(String msg) {\n //add message to chatList array\n chatList.add(msg);\n //display message in GUI\n mg.appendRoom(msg); \n }",
"private void updateChatDetails(){\n Map<String,Object> chatAddMap = new HashMap<>();\n chatAddMap.put(\"seen\",false);\n chatAddMap.put(\"timestamp\", ServerValue.TIMESTAMP);\n\n DatabaseReference chatRef = rootRef.child(\"Chat\").child(current_user.getUid()).child(chatUserId).getRef();\n //Add to Chat\n chatRef.updateChildren(chatAddMap).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Log.i(\"Checkkkkk\",\"ssss\");\n }\n });\n }",
"public void clientToServerChatMessage(String message){\n String chatMessage = message;\n System.out.println(\"chatmessage\" + chatID + \" \" + chatMessage);\n toServer.println(\"chatmessage\" + chatID + \" \" + chatMessage);\n toServer.flush();\n }",
"protected void queryMsg() {\n\t\tif (currentPosition == 0) {//LIVE\n\t\t\tobtainLiveData(true, currentPosition, liveMaxChatId);\n\t\t} else {//CHAT\n\t\t\tobtainChatData(true, currentPosition, chatModels.get(0).getChatId());\n\t\t}\n\t}",
"@Override\r\n\tpublic void onMessage(BmobMsg message) {\n\t\trefreshNewMsg(message);\r\n\t}",
"@Override\n public void updateView(Message msg)\n {\n \n }",
"public abstract void update(Message message);",
"private void updateDatabase(String messageText)\n {\n HashMap<String, ChatData> mapThis = new HashMap<>();\n ChatData thisData = new ChatData(thisUsername, otherUsername, otherUid, messageText, thisPhoto, otherPhoto, new Date());\n thisData.setRead(true);\n mapThis.put(otherUid, thisData);\n FirebaseFirestore.getInstance().collection(\"chats\").document(thisUid).set(mapThis, SetOptions.merge());\n \n HashMap<String, ChatData> mapOther = new HashMap<>();\n ChatData otherData = new ChatData(otherUsername, thisUsername, thisUid, messageText, otherPhoto, thisPhoto, new Date());\n mapOther.put(thisUid, otherData);\n FirebaseFirestore.getInstance().collection(\"chats\").document(otherUid).set(mapOther, SetOptions.merge());\n \n Map<String, String> map = new HashMap<>();\n map.put(\"message\", messageText);\n map.put(\"user\", thisUsername);\n reference.push().setValue(map);\n messageArea.setText(\"\");\n \n new Notification(otherUid, thisUsername, Notification.NOTIFICATION_CHAT, messageText, this);\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}",
"@Override\n\tpublic void onChatReceived(ChatEvent arg0) {\n\t\t\n\t}",
"public void onMessage(Message message) {\n lastMessage = message;\n\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tLog.d(\"shows\",\"shw \"+i++);\n\n\t\t\t\t//SendMsg\n\t\t\t\tnameValuePairs= new ArrayList<NameValuePair>(3);\n\t\t\t\tdb=new ChattyData(con);\n\t\t\t\tCursor c=db.getUnsent();\n\t\t\t\tif(c!=null)\n\t\t\t\t{\n\t\t\t\t c.moveToFirst();\n\t\t\t\t try{c.getString(1).equals(\"\");\n\t\t\t\t sno=c.getInt(0);\n\t\t\t\t\tLog.d(\"sno\",sno+\"\");\n\t\t\t\t nameValuePairs.add(new BasicNameValuePair(\"from\", pref.getString(\"id\", \"\")));\n\t\t\t\t nameValuePairs.add(new BasicNameValuePair(\"to\", c.getString(1)));\n\t\t\t\t nameValuePairs.add(new BasicNameValuePair(\"msg\", c.getString(2)));\n\t\t\t\t SendMsg sendMsg=new SendMsg(con,sno);\n\t\t\t\t\tif (Build.VERSION.SDK_INT>=Build.VERSION_CODES.HONEYCOMB)\n\t\t\t\t\t\tsendMsg.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR,nameValuePairs);\n\t\t\t\t\telse\tsendMsg.execute(nameValuePairs);\n\t\t\t\t }\n\t\t\t\t catch(Exception e){}\n\t\t\t\t}\n\t\t\t\tdb.close();\n\t\t\t\tLog.d(\"shows\",\"sno \"+sno+\"\");\n\t\t\t\t\n\t\t\t\t//NewMsg\n\t\t\t\tnameValuePairs= new ArrayList<NameValuePair>(1);\n\t\t\t\ttry{\n\t\t\t\t\tnameValuePairs.add(new BasicNameValuePair(\"id\", pref.getString(\"id\", \"\")));\n\t\t\t\t\tNewMsg newMsg=new NewMsg(con);\n\t\t\t\t\tif (Build.VERSION.SDK_INT>=Build.VERSION_CODES.HONEYCOMB)\n\t\t\t\t\t\tnewMsg.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR,nameValuePairs);\n\t\t\t\t\telse\tnewMsg.execute(nameValuePairs);\n\t\t\t\t}catch(Exception e){}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//new ReadMsg().execute();\n\t\t\t\t\n\t\t\t\t/*AddChat myTask = new AddChat(this);\n\t\t\t\tif (Build.VERSION.SDK_INT>=Build.VERSION_CODES.HONEYCOMB)\n\t\t\t\t myTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR,nameValuePairs);\n\t\t\t\telse\n\t\t\t\t myTask.execute(nameValuePairs);*/\n\t\t\t}",
"@Override\n\t \t\tpublic void handleMessage(Message msg) {\n\t \t\treceive();\n\t \t\t\t// myTextView.setText(String.valueOf(cnt));\n\t \t\t}",
"public void chat_list() {\n\n synchronized(chat_room) {\n Set chat_room_set = chat_room.keySet();\n Iterator iter = chat_room_set.iterator();\n\n clearScreen(client_PW);\n client_PW.println(\"------------Chat Room List-----------\");\n while(iter.hasNext()) {\n client_PW.println(iter.next());\n }\n client_PW.flush();\n }\n }",
"@Override\n\t\t\t\t\tpublic void setChat(Vector<Message> chatMessages) {\n\t\t\t\t\t\tchat.setChatHistory(chatMessages);\n\t\t\t\t\t}",
"public synchronized void broadcastMsg(String msg) {\n try (BufferedWriter bufferedWriter = new BufferedWriter(new OutputStreamWriter(\n new FileOutputStream(\"chatHistory.txt\", true)));) {\n bufferedWriter.append(msg).append(\"\\n\");\n } catch (IOException e) {\n LOG.error(\"Try save history to file\", e);\n e.printStackTrace();\n }\n\n for (ClientHandler clientHandler : clients) {\n clientHandler.sendMsg(msg);\n }\n }",
"@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 }",
"private void append_chat_conversation(DataSnapshot dataSnapshot) {\n Vibrator mVibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);\n Iterator i = dataSnapshot.getChildren().iterator();\n while (i.hasNext()) {\n String chat_msg = (String) ((DataSnapshot) i.next()).getValue();\n String chat_user_name = (String) ((DataSnapshot) i.next()).getValue();\n if (chat_user_name.equals( ad.getName())) {\n Spannable Chatme = new SpannableString(chat_user_name + \" : \" + chat_msg + \" \\n\");\n Chatme.setSpan(new ForegroundColorSpan(Color.BLUE), 0, chat_user_name.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);\n chat_conversation.append(Chatme);\n\n } else {\n chat_conversation.append( chat_user_name + \" : \" + chat_msg + \" \\n\");\n mVibrator.vibrate(200);\n }\n }\n }",
"public void doSendMsg() {\n FacesContext fctx = FacesContext.getCurrentInstance();\n HttpSession sess = (HttpSession) fctx.getExternalContext().getSession(false);\n SEHRMessagingListener chatHdl = (SEHRMessagingListener) sess.getAttribute(\"ChatHandler\");\n if (chatHdl.isSession()) {\n //TODO implement chat via sehr.xnet.DOMAIN.chat to all...\n if (room.equalsIgnoreCase(\"public\")) {\n //send public inside zone\n chatHdl.sendMsg(this.text, SEHRMessagingListener.PUBLIC, moduleCtrl.getLocalZoneID(), -1, -1);\n } else {\n chatHdl.sendMsg(this.text, SEHRMessagingListener.PRIVATE_USER, moduleCtrl.getLocalZoneID(), -1, curUserToChat.getUsrid());\n }\n this.text = \"\";\n }\n //return \"pm:vwChatRoom\";\n }",
"private void addMessageToUI (Message message) {\n if (message == null) {\n return;\n }\n\n //find the correct position based on timestamp\n int index = chatMessages.size() - 1;\n while (index >= 0 && message.getTimestamp() < chatMessages.get(index).getTimestamp()) {\n index--;\n }\n\n //update inerted message show time/sender flags\n Message lastMsg = index >= 0 ? chatMessages.get(index) : null;\n message.showMessageTime = lastMsg == null || message.getTimestamp() - lastMsg.getTimestamp() > Message.GROUP_TIME_THRESHOLD;\n message.showMessageSender = lastMsg == null || message.showMessageTime || !message.getSenderId().equals(lastMsg.getSenderId());\n chatMessages.add(index + 1, message);\n chatRoomAdapter.notifyItemInserted(index + 1);\n\n //upate next message show time/sender flags\n Message nextMsg = index + 2 < chatMessages.size() ? chatMessages.get(index + 2) : null;\n if (nextMsg != null) {\n boolean nextMsgShowMsgTime = nextMsg.getTimestamp() - message.getTimestamp() > Message.GROUP_TIME_THRESHOLD;\n boolean nextMsgShowMsgSender = nextMsgShowMsgTime || !nextMsg.getSenderId().equals(message.getSenderId());\n if (nextMsgShowMsgTime != nextMsg.showMessageTime || nextMsgShowMsgSender != nextMsg.showMessageSender) {\n nextMsg.showMessageTime = nextMsgShowMsgTime;\n nextMsg.showMessageSender = nextMsgShowMsgSender;\n chatRoomAdapter.notifyItemChanged(index + 2);\n }\n }\n\n chatLayoutManager.scrollToPosition(chatMessages.size() - 1);\n }",
"private void internalAddToChatWindow(String message) {\n jChatConvo.append(message + \"\\n\");\n }",
"@Override\r\n public void setListener() {\n input.setInputListener(this);\r\n\r\n //bind load more listener, it will track scroll up\r\n messagesAdapter.setLoadMoreListener(this);\r\n\r\n //bind on message long click\r\n messagesAdapter.setOnMessageLongClickListener(this);\r\n\r\n //get called when a incoming message come..\r\n socketManager.getSocket().on(\"updateChat\", new Emitter.Listener() {\r\n @Override\r\n public void call(Object... args) {\r\n String messageData = (String) args[0];\r\n Gson gson = new Gson();\r\n _Message message = gson.fromJson(messageData, _Message.class);\r\n\r\n //double check for valid room\r\n if (me.isValidRoomForUser(message.getRoomName())) {\r\n\r\n //sometime nodejs can broadcast own message so check and message should be view immediately\r\n\r\n if(!message.getUser().getId().equals(me.getId())) {\r\n //save new incoming message to realm\r\n saveOrUpdateNewMessageRealm(message);\r\n\r\n //check and save validity of room incoming user\r\n runOnUiThread(() -> {\r\n\r\n messagesAdapter.addToStart(message, true);\r\n });\r\n }\r\n\r\n }\r\n }\r\n });\r\n }",
"@Override\n\t\t\t\t\tpublic void clearChatMessage() {\n\t\t\t\t\t\tchat.clearChatMsg();\n\t\t\t\t\t}",
"private void receiveMessage() {\n ParseQuery<ParseObject> refreshQuery = ParseQuery.getQuery(\"Group\");\n\n refreshQuery.getInBackground(mGroupId, new GetCallback<ParseObject>() {\n @Override\n public void done(ParseObject parseObject, ParseException e) {\n if (e == null) {\n chatMessageArray = parseObject.getList(\"groupMessageArray\");\n\n messageArrayList.clear();\n messageArrayList.addAll(chatMessageArray);\n chatListAdapter.notifyDataSetChanged();\n chatLV.invalidate();\n } else {\n System.out.println(e.getMessage());\n }\n }\n });\n }",
"public abstract void newChatMembersMessage(Message m);",
"public void processMessage(Message message) {\n\t\tSystem.out.println(message._sender+\" to \"+message._receiver+\": \"+message._message);\n\t\tFileUtils.writeLineInFile(message._sender+\" to \"+message._receiver+\": \"+message._message, new File(FileUtils.getSettingsProperty(\"path\")+\"/chatlog.txt\"));\n\t\t_main._clientMenuController.updateChatlog();\n\t}",
"public void receive()\n {\n //Client receives a message: it finds out which type of message is and so it behaves differently\n //CHAT message: prints the message in the area\n //CONNECT message: client can't receive a connect message from the server once it's connected properly\n //DISCONNECT message: client can't receive a disconnect message from the server\n //USER_LIST message: it shows the list of connected users\n try\n {\n String json = inputStream.readLine();\n\n switch (gson.fromJson(json, Message.class).getType())\n {\n case Message.CHAT:\n ChatMessage cmsg = gson.fromJson(json, ChatMessage.class);\n\n if(cmsg.getReceiverClient() == null)\n ChatGUI.getInstance().getChatHistory().append(cmsg.getSenderClient() + \" (TO ALL): \" + cmsg.getText() + \"\\n\");\n else\n ChatGUI.getInstance().getChatHistory().append(cmsg.getSenderClient() + \" (TO YOU): \" + cmsg.getText() + \"\\n\");\n break;\n case Message.CONNECT:\n //Send login nickname and wait for permission to join\n //if message code is 1, nickname is a duplicate and must be changed, then login again\n //(send call is inside button event)\n ConnectMessage comsg = gson.fromJson(json, ConnectMessage.class);\n\n if(comsg.getCode() == 1)\n {\n //Show error\n ChatGUI.getInstance().getLoginErrorLabel().setVisible(true);\n }\n else\n {\n //Save nickname\n nickname = ChatGUI.getInstance().getLoginField().getText();\n\n //Hide this panel and show main panel\n ChatGUI.getInstance().getLoginPanel().setVisible(false);\n ChatGUI.getInstance().getMainPanel().setVisible(true);\n }\n break;\n case Message.USER_LIST:\n UserListMessage umsg2 = gson.fromJson(json, UserListMessage.class);\n fillUserList(umsg2);\n break;\n }\n } \n catch (JsonSyntaxException | IOException e)\n {\n System.out.println(e.getMessage());\n System.exit(1);\n }\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}",
"@Override\n public void actionPerformed(ActionEvent e) {\n chat.receiveMessage();\n }",
"public void getChatMessage(String text) {\n\t\tint idplayer = gamecontroller.getPlayerController().getPlayerID();\n\t\tChatM.writeChatToDatabase(idplayer, text);\n\t}",
"@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n Long time = new Date().getTime();\n if (!dataSnapshot.exists()) {\n // Create new chats\n Chat chat1 = new Chat(mChatName, mChatPhotoUrl, mUid, mChatUserId, msg.getMessage(), time, false);\n databaseUpdates.put(DatabaseUtil.getDatabasePath(new String[]{Constants.CHATS_CHILD, familyCode, mUid, mChatId}), chat1);\n Chat chat2 = new Chat(mUsername, mPhotoUrl, mUid, mChatUserId, msg.getMessage(), time, true);\n databaseUpdates.put(DatabaseUtil.getDatabasePath(new String[]{Constants.CHATS_CHILD, familyCode, mChatUserId, mChatId}), chat2);\n } else {\n // update latest message for chat1\n databaseUpdates.put(DatabaseUtil.getDatabasePath(new String[]{Constants.CHATS_CHILD, familyCode, mUid, mChatId, \"latestMessage\"}), msg.getMessage());\n databaseUpdates.put(DatabaseUtil.getDatabasePath(new String[]{Constants.CHATS_CHILD, familyCode, mUid, mChatId, \"latestActivity\"}), time);\n\n // update latest message for chat2\n databaseUpdates.put(DatabaseUtil.getDatabasePath(new String[]{Constants.CHATS_CHILD, familyCode, mChatUserId, mChatId, \"latestMessage\"}), msg.getMessage());\n databaseUpdates.put(DatabaseUtil.getDatabasePath(new String[]{Constants.CHATS_CHILD, familyCode, mChatUserId, mChatId, \"latestActivity\"}), time);\n databaseUpdates.put(DatabaseUtil.getDatabasePath(new String[]{Constants.CHATS_CHILD, familyCode, mChatUserId, mChatId, \"notified\"}), true);\n }\n\n // create new message\n databaseUpdates.put(DatabaseUtil.getDatabasePath(new String[]{Constants.MESSAGES_CHILD, familyCode, mChatId, msg.getId()}), msg);\n\n mFirebaseDatabaseReference.updateChildren(databaseUpdates, new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(@Nullable DatabaseError databaseError, @NonNull DatabaseReference databaseReference) {\n if (databaseError == null) {\n databaseUpdates.clear();\n chatMessageForm.reset(ChatActivity.this);\n } else {\n Log.w(TAG, \"Send message failed for chat: \" + mChatId + \" for user: \" + mUid + \". \", databaseError.toException());\n Toast.makeText(ChatActivity.this, getResources().getString(R.string.error_sending_message), Toast.LENGTH_SHORT).show();\n }\n loadingDialog.hide();\n }\n });\n }",
"@Override\r\n public void update(String message) {\r\n send(message);\r\n }",
"private void individualSend(UserLogic t) {\n if(t != UserLogic.this && t != null && ((String)UI.getContacts().getSelectedValue()).equals(t.username)){\r\n if(((String)t.UI.getContacts().getSelectedValue()).equals(username)) { //If both users are directly communicating\r\n t.UI.getProperList().addElement(username + \"> \" + UI.getMessage().getText()); //Send message\r\n t.UI.getContacts().setCellRenderer(clearNotification); //Remove notification\r\n }\r\n else{ //If the user are not directly communicating\r\n t.UI.getContacts().setCellRenderer(setNotification); //Set notification\r\n }\r\n if(t.chats.containsKey(username)){ //Store chats in other users database (When database exists)\r\n ArrayList<String> arrayList = t.chats.get(username); //Get data\r\n arrayList.add(username + \"> \" + UI.getMessage().getText()); //Add new message to the database\r\n t.chats.put(username, arrayList); //Store data\r\n }\r\n else { //When database doesn't exist\r\n ArrayList<String> arrayList = new ArrayList<>(); //create new database\r\n arrayList.add(username + \"> \" + UI.getMessage().getText()); //Add new message to the database\r\n t.chats.put(username, arrayList); //Store data\r\n }\r\n }\r\n //This writes on my screen\r\n if(t == UserLogic.this && t!=null){ //On the current user side\r\n UI.getProperList().addElement(\"Me> \" + UI.getMessage().getText()); //Write message to screen\r\n String currentChat = (String) UI.getContacts().getSelectedValue(); //Get selected user\r\n if(chats.containsKey(currentChat)){ //check if database exists\r\n ArrayList<String> arrayList = chats.get(currentChat);\r\n arrayList.add(\"Me> \" + UI.getMessage().getText());\r\n chats.put(currentChat, arrayList);\r\n }\r\n else { //When database doesn't exist\r\n ArrayList<String> arrayList = new ArrayList<>();\r\n arrayList.add(\"Me> \" + UI.getMessage().getText());\r\n chats.put(currentChat, arrayList);\r\n }\r\n }\r\n }",
"@Override\n public void onClick(View v) {\n String message = etMessage.getText().toString();\n // buat objek chat\n Chat chat = new Chat(\"yogi\", message);\n // kirim chat ke database\n chatReference.push().setValue(chat);\n // kosongkan inputan\n etMessage.getText().clear();\n }",
"@Override\n\tpublic void newMsg(String msg) throws RemoteException {\n\t\tchathistory.add(new chatmessage<String>(msg + \"\\n\"));\n\t}",
"@Override\n public void onClick(View view) {\n if(input.getText().toString()!=null){\n msg.child(\"convensation\").child(encry(chatTo)+\"\").push()\n .setValue(new MessagesModel(input.getText().toString(),\n FirebaseAuth.getInstance()\n .getCurrentUser()\n .getDisplayName(),\n ChatName,\n FirebaseAuth.getInstance()\n .getCurrentUser()\n .getEmail(),chatTo,false)\n );\n mAdapter.notifyDataSetChanged();\n input.setText(\"\");\n updateConvensation();\n listOfMessages.scrollToPosition(mAdapter.getItemCount());\n }\n }",
"@EventHandler\n public void OnPlayerChatEvent(PlayerChatEvent e)\n {\n this.setLastSeen(e.getPlayer());\n }",
"@Override\r\n\tpublic void onNewMessage(Chat chatToReply, Message message) {\n\t\tsynchronized (this) {\r\n\t\t\tcurMsg = message;\r\n\t\t\t_state = State.NEW_MESSAGE;\r\n\t\t\tnotify();\r\n\t\t}\t\t\r\n\t}",
"private void setChat(final ChatCard chat)\n {\n binding.textLastmessage.setText(chat.getLastMessage());\n binding.textName.setText(chat.getName());\n binding.textTime.setText(chat.getTime());\n\n if (chat.getChatID() == CHAT_ID && NEW_MESSAGE == 1)\n binding.textLastmessage.setTextColor(Color.RED);\n else\n binding.textLastmessage.setTextColor(Color.BLACK);\n\n // Moves to the chat id in the chatcard\n binding.cardConstraint.setOnClickListener(view -> {\n Navigation.findNavController(mView).navigate(ChatCardListFragmentDirections\n .actionNavigationChatsToNavigationSingleChat(chat.getChatID(), chat.getName()));\n if (chat.getChatID() == CHAT_ID)\n NEW_MESSAGE = 0;\n });\n }",
"public void sendChat(String message) {\r\n connection.chat(message);\r\n }",
"public void refreshSmssent() {\n //this is a cursor to go through and get all of your recieved messages\n ContentResolver contentResolver = getContentResolver();\n Cursor smssentCursor = contentResolver.query(Uri.parse(\"content://sms/sent\"),\n null, null, null, null);\n //this gets the message itsself\n int indexBody = smssentCursor.getColumnIndex(\"body\");\n //this gets the address the message came from\n int indexAddress = smssentCursor.getColumnIndex(\"address\");\n int indexDate = smssentCursor.getColumnIndex(\"date\");\n //get messages the user sent\n if (indexBody < 0 || !smssentCursor.moveToFirst())\n return;\n do {\n if (smssentCursor.getString(indexAddress).equals(number)|| smssentCursor.getString(indexAddress).equals(\"+1\"+number)){\n ConversationObject c = new ConversationObject(smssentCursor.getString(indexBody), \"\",smssentCursor.getString(indexAddress), smssentCursor.getLong(indexDate));\n sent.add(c);\n }\n } while (smssentCursor.moveToNext());\n }",
"@Override\r\n\tvoid updateMessage(String msg) {\n\t\tSystem.out.println(msg);\r\n\t}",
"void update(String message, Command command, String senderNickname);",
"public void sendMessage()\r\n {\r\n MessageScreen messageScreen = new MessageScreen(_lastMessageSent);\r\n pushScreen(messageScreen);\r\n }",
"@Override\n public boolean sendMessage(ChatMessage chatMessage){\n return true;\n }",
"@Override\n public void run() {\n postGetRoomMessages();\n updateMessagesHandler.postDelayed(messageStatusChecker, updateMessagesInterval);\n }",
"private void onMessage(JsonRpcMessage msg) {\n List<JsonRpcMessage> extraMessages = super.handleMessage(msg, true);\n notifyMessage(msg);\n for(JsonRpcMessage extraMsg: extraMessages) {\n notifyMessage(extraMsg);\n }\n }",
"public void communicate(Poll poll, String message){\n poll.getChat().add(message);\n }",
"public void run()\n\t\t{\twhile(true)\n\t\t\t{\tString s = ChatServer.message.get();\n\t\t\t\tsynchronized(ChatServer.sessions)\n\t\t\t\t{\tfor(int i = 0; i < ChatServer.size; ++i)\n\t\t\t\t\t\tif(ChatServer.sessions[i] != null)\n\t\t\t\t\t\t\tChatServer.sessions[i].println(s);\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"private void createNewChat() {\n if (advertisement.getUniqueOwnerID().equals(dataModel.getUserID())) {\n view.showCanNotSendMessageToYourselfToast();\n return;\n }\n\n dataModel.createNewChat(advertisement.getUniqueOwnerID(), advertisement.getOwner(), advertisement.getUniqueID(),\n advertisement.getImageUrl(), chatID -> view.openChat(chatID));\n }",
"@Override\n\tpublic void onSendChatDone(byte arg0) {\n\t\t\n\t}",
"@Override\n public void onClick(View view) {\n\n System.out.println(\"check--------\");\n if (listChatting.hasIdChatRoom(id)) { //기존 채팅방\n chattingnum = listChatting.getChatNum(id); //채팅방 넘버\n }\n\n String icon = \"[PIMO1]\";\n long now = System.currentTimeMillis();\n Date date = new Date(now);\n SimpleDateFormat sdf = new SimpleDateFormat(\"HH:mm\");\n //yyyy/MM/dd HH:mm:ss\n String getTime = sdf.format(date); //현재 시간\n output = \"[MSG]::\" + chattingnum + \"::\" + id + \"::\" + myid + \"::\" + getTime + \"::\" + icon;\n\n try {\n StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();\n StrictMode.setThreadPolicy(policy);\n\n System.out.println(\"test-send 1 chattingnum = \" + chattingnum);\n\n System.out.println(\"test-send\" + output);\n dataOutputStream.writeUTF(output);\n // dataOutputStream.write(output.getBytes());\n dataOutputStream.flush();\n\n //editText.setText(\"\");\n\n\n //chatwrite(dataClass.chatDatahash.get(chattingnum).lastMsg);\n System.out.println(\"test-send 2 chattingnum = \" + chattingnum);\n\n } catch (Exception e) {\n e.printStackTrace();\n return;\n }\n\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tchatAdapter.notifyDataSetChanged();\n\t\t\t\tchatListView.postInvalidate();\n\t\t\t\tchatListView.smoothScrollToPosition(chatAdapter.getCount());\n//\t\t\t\tinput.setText(\"\");\n\n\t\t\t}",
"protected void sendMessage(String msg) {\n message = msg; \n newMessage = true;\n }",
"@Override\r\n\t\tpublic void run() {\r\n\t\t\tString[] line;\r\n\t\t\tString msg = \"\";\r\n\t\t\ttry {\r\n\t\t\t\tString time1 = dispTime.format(System.currentTimeMillis());\r\n\t\t\t\t// parse the time to the date format\r\n\t\t\t\tdate1 = dispTime.parse(time1);\r\n\t\t\t\t/*\r\n\t\t\t\t * check for the whole message line and split it with : the\r\n\t\t\t\t * first element is username the second is connect/disconnect\r\n\t\t\t\t * message and if the client clicks on connect button it sends\r\n\t\t\t\t * connect message and if client hits disconnect button it sends\r\n\t\t\t\t * disconnect message all the messages are splitted with :,if\r\n\t\t\t\t * the message is to broadcast all current users then :Chat is\r\n\t\t\t\t * used at the end read the inputstream\r\n\t\t\t\t */\r\n\t\t\t\twhile ((msg = in.readLine()) != null) {\r\n\t\t\t\t\t// split the line with :\r\n\t\t\t\t\tline = msg.split(\":\");\r\n\t\t\t\t\tString usern = line[1];// get username\r\n\r\n\t\t\t\t\tif (line[3].equals(\"Connect\")) {\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * if the request is connect then add the username to\r\n\t\t\t\t\t\t * arraylist users\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tusers.add(usern);\r\n\t\t\t\t\t} else if (line[3].equals(\"Disconnect\")) {\r\n\t\t\t\t\t\ttextarea.append(usern + \" has disconnected.\\n\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// else if (line[3].equals(\"Chat\"))\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * the message coming from server is in HTTP format then\r\n\t\t\t\t\t\t * extract the message only and display it on users\r\n\t\t\t\t\t\t * window\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\ttextarea.append(line[1] + line[2] + \"\\n\");\r\n\t\t\t\t\t\ttextarea.setCaretPosition(textarea.getDocument().getLength());\r\n\t\t\t\t\t}\r\n\t\t\t\t} // try\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}",
"@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n Log.i(\"hell\", \"From: \" + remoteMessage.getData());\n Log.d(TAG, \"From: \" + remoteMessage.getFrom());\n Log.d(TAG, \"Notification Message Body: \" + remoteMessage.getData().get(\"message\"));\n// UpdaterService.Updater updater new UpdaterService.Updater();\n //Calling method to generate notification\n// scroll();\n SharedPreferences sharedPreferences = this.getSharedPreferences(\"user\",0);\n\n IcebreakerNotification message = new IcebreakerNotification();\n message.setMessage(remoteMessage.getData().get(\"message\"));\n message.setFrom(remoteMessage.getData().get(\"title\"));\n message.setTo(sharedPreferences.getString(\"enroll\",\"\"));\n MessageDb db = new MessageDb(MyFirebaseMessagingService.this);\n if (remoteMessage.getData().get(\"type\").equalsIgnoreCase(\"deliver\")){\n db.updateMessage(remoteMessage.getData().get(\"id\"));\n\n }\n else if(remoteMessage.getData().get(\"type\").equalsIgnoreCase(\"random\")){\n sendNotification(remoteMessage.getData().get(\"title\"), remoteMessage.getData().get(\"message\"),1,1,1);\n RandomChat randomChat;\n Gson gson = new Gson();\n randomChat = gson.fromJson(remoteMessage.getData().get(\"profile\"),RandomChat.class);\n db.addRandom(randomChat,Long.parseLong(remoteMessage.getData().get(\"time\")));\n\n\n }\n else {\n jsonObject = new JsonObject();\n jsonObject.addProperty(\"to\",message.getFrom());\n jsonObject.addProperty(\"from\", remoteMessage.getFrom());\n jsonObject.addProperty(\"id\",remoteMessage.getData().get(\"id\"));\n jsonObject.addProperty(\"type\",\"deliver\");\n sendDeliver();\n Log.i(\"hell\", String.valueOf(db.getChatId(message)));\n if (db.getChatId(message) == 0){\n db.addChat(message,System.currentTimeMillis());\n// db.addContact(message.getFrom());\n }\n db.updateChat(db.getChatId(message),System.currentTimeMillis());\n\n db.addMessage(message.getMessage(), db.getChatId(message),Long.parseLong(remoteMessage.getData().get(\"id\")),0,Long.parseLong(remoteMessage.getData().get(\"time\")),0);\n// ChatActivity.adapter.notifyDataSetChanged();\n if (isAppIsInBackground(this)) {\n\n sendNotification(remoteMessage.getData().get(\"title\"), remoteMessage.getData().get(\"message\"), db.unread(),db.unreadChat(),0);\n db.close();\n }\n else\n {\n final MediaPlayer mp = MediaPlayer.create(this, R.raw.sound);\n mp.start();\n }\n }\n Intent intent;\n intent = new Intent(BROADCAST_ACTION);\n sendBroadcast(intent);\n Intent intent2;\n intent2 = new Intent(BROADCAST_HOME);\n sendBroadcast(intent2);\n\n// bindService(UpdaterService,null,null);\n }",
"private void onReceiveChatMessages() {\n\n//\t\tL.debug(\"onReceiveChatMessages\");\n//\n//\t\t// called from NetworkChangeReceiver whenever the user is logged in\n//\t\t// will always be called whenever there is a change in network state,\n//\t\t// will always check if the app is connected to server,\n//\t\tXMPPConnection connection = XMPPLogic.getInstance().getConnection();\n//\n//\t\tif (connection == null || !connection.isConnected()) {\n//\t\t\tSQLiteHandler db = new SQLiteHandler(getApplicationContext());\n//\t\t\tdb.openToWrite();\n//\n//\t\t\t// db.updateBroadcasting(0);\n//\t\t\t// db.updateBroadcastTicker(0);\n//\n//\t\t\tAccount ac = new Account();\n//\t\t\tac.LogInChatAccount(db.getUsername(), db.getEncryptedPassword(), db.getEmail(), new OnXMPPConnectedListener() {\n//\n//\t\t\t\t@Override\n//\t\t\t\tpublic void onXMPPConnected(XMPPConnection con) {\n//\t\t\t\t\t\n//\t\t\t\t\t//addPacketListener(con);\n//\t\t\t\t}\n//\n//\t\t\t});\n//\n//\t\t\tdb.close();\n//\t\t} else {\n//\n//\t\t\t//addPacketListener(connection);\n//\n//\t\t}\n\t}",
"public void updateLastSentMessageId(Chat chat) {\n spannerTemplate.update(chat, \"ChatID\", \"LastSentMessageID\");\n }",
"public void updateSendingMessage(String message, boolean isMe) {\n\n\n Log.v(\"adsl\", \"came here\");\n\n final MessageModel sendingMessage = new MessageModel();\n sendingMessage.setMessage(message);\n sendingMessage.setTime(\"8:57Pm\"); //set current time in form of database format\n sendingMessage.setMe(isMe);\n\n if (isMe == true) {\n\n\n if (!messageBox.getText().toString().trim().matches(\"\"))\n\n {\n doScreenUpdate(sendingMessage);\n }\n\n\n } else\n\n {\n\n doScreenUpdate(sendingMessage);\n\n\n }\n\n\n }",
"@Override\r\n public void onClick(View v) {\n myWord=null;\r\n\r\n /**\r\n * 这是一个发送消息的监听器,注意如果文本框中没有内容,那么getText()的返回值可能为\r\n * null,这时调用toString()会有异常!所以这里必须在后面加上一个\"\"隐式转换成String实例\r\n * ,并且不能发送空消息。\r\n */\r\n myWord=(editText.getText()+\"\").toString();\r\n if(myWord.length()==0)\r\n return;\r\n editText.setText(\"\");\r\n addTextToList(myWord, ME);\r\n /**\r\n * 更新数据列表,并且通过setSelection方法使ListView始终滚动在最底端\r\n */\r\n adapter.notifyDataSetChanged();\r\n chatListView.setSelection(chatList.size()-1);\r\n\r\n new Thread() {\r\n\r\n @Override\r\n public void run() {\r\n //String messageStr = editText.getText().toString();\r\n //handler.sendEmptyMessage(2);\r\n\r\n///////////////////////////////////////////////////////////////////////////////////////\r\n//发送聊天消息\r\n Map<String, String> paprams = new HashMap<String, String>();\r\n paprams.put(\"operation\", \"send\");\r\n //用户自己的id\r\n paprams.put(\"fromID\", ffd_MainActivity.id);\r\n paprams.put(\"toID\",toID);\r\n paprams.put(\"time\", \"1111111\");\r\n paprams.put(\"content\", myWord);\r\n\r\n String result = new HttpUtil().post(CommonUrl.Chat, paprams);\r\n\r\n///////////////////////////////////////////////////////////////////////////////////////\r\n\r\n //Message msg = new Message();\r\n //msg.what = 1;\r\n //msg.obj = \"fromID:\" + user.getUserID() + \"\\ttoID\" + toId + \"\\ttime:\" + \"2016-3-13\" + \"\\tcontent:\" + messageStr;\r\n }\r\n\r\n }.start();\r\n\r\n }",
"@Override\n public void run() {\n messageUpdater.run();\n // Re-run it after the update interval\n mHandler.postDelayed(this, UPDATE_INTERVAL);\n }",
"@Override\n public void messageArrived(IChatMessage msg) {\n try { \n if (msg.getText().matches(\"JOIN .*\")) {\n //Obtenir el canal on s'ha unit.\n IChatChannel channel = server.getChannel(conf.getChannelName()); \n //Crear el missatge per a donar la benvinguda al usuari\n IChatMessage message = new ChatMessage(user, channel,\n \"Benvingut, \" + msg.getText().substring(ChatChannel.JOIN.length() + 1));\n //Enviar el missatge\n channel.sendMessage(message);\n }\n } catch (RemoteException e) {\n \n }\n }",
"public void update(String msg) {\n\t\tMessage updateMsg = Message.makeUpdateMessage(getUserName(),msg);\n\t\tsocketConnection.print(updateMsg);\n\t}",
"@Override\n\tpublic void onPrivateChatReceived(final String sender, final String msg) {\n\t\tChatActivity.this.runOnUiThread(new Runnable() {\n\t\t\t public void run() {\n\t\t\t\t sa = ((SharingAtts)getApplication());\n\t\t\t\t chat.append(sender+\": \"+msg+\"\\n\");\t\n\t\t\t\t ItemTest it = new ItemTest();\n\t\t\t\t String colNames = it.printData(\"chat\")[1];\n\t\t\t\t DBManager dbm = new DBManager(ChatActivity.this, colNames,\"chat\",it.printData(\"chat\")[0]);\n\t\t\t\t dbm.openToWrite();\n\t\t\t\t dbm.cretTable();\n\t\t\t\t String msg2 = msg.replace(\" \", \"?*\");\n\t\t\t\t dbm.insertQuery(sender+\" \"+msg2+\" \"+sa.name, colNames.split(\" \")[1]+\" \"+colNames.split(\" \")[2]+\" \"+colNames.split(\" \")[3]);\n\t\t\t\t dbm.close();\n\t\t\t }\n\t\t});\n\t\t\n\t\t\n\t\t\n\t}",
"@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tchatAdapter.notifyDataSetChanged();\n\t\t\t\t\tchatListView.postInvalidate();\n\t\t\t\t\tinput.setText(\"\");\n\t\t\t\t\tchatListView.smoothScrollToPosition(chatAdapter.getCount());\n\t\t\t\t}",
"void update(T message);",
"private void setupChat() {\n\n\n // Initialize the array adapter for the conversation thread\n mConversationArrayAdapter = new ArrayAdapter<String>(getActivity(), R.layout.message);\n\n mConversationView.setAdapter(mConversationArrayAdapter);\n\n // Initialize the compose field with a listener for the return key\n mOutEditText.setOnEditorActionListener(mWriteListener);\n\n // Initialize the send button with a listener that for click events\n mSendButton.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n // Send a message using content of the edit text widget\n View view = getView();\n if (null != view) {\n TextView textView = (TextView) view.findViewById(R.id.edit_text_out);\n String message = textView.getText().toString();\n Bundle bundle=new Bundle();\n bundle.putString(BluetoothChatFragment.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 }\n });\n\n // Initialize the buffer for outgoing messages\n mOutStringBuffer = new StringBuffer(\"\");\n }",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\ttry {\r\n\t\t\t\t\tusers.add(socket);\r\n\t\t\t\t\t\r\n\t\t\t\t\tBufferedReader mBuf = new BufferedReader(new InputStreamReader(socket.getInputStream()));\r\n\t\t\t\t\twhile (socket.isConnected()) {\r\n\t\t\t\t\t\tString msg = mBuf.readLine();\r\n\t\t\t\t\t\tcastChatMsg(msg);\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\te.getStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}",
"private void addToChatList(Chat[] newChats){\n if ( newChats == null || newChats.length == 0 ) {\n return;\n }\n if ( chatList.size() == 0 ) { // no chat history loaded yet\n for ( Chat chat : newChats ) {\n chatList.offer(chat);\n }\n headIndex = newChats[0].id; // update the tail index\n tailIndex = newChats[newChats.length-1].id; // update the tail index\n } else if ( newChats[newChats.length-1].id < chatList.get(0).id ) { // new.tail is prior to current.head\n // prepend the new chats to the head of the current chat\n int selection = lv_chat.getFirstVisiblePosition();\n selection += newChats.length;\n for ( int i = newChats.length-1; i >= 0; i-- ) {\n chatList.push(newChats[i]);\n }\n lv_chat.setSelection(selection);\n adapter.notifyDataSetChanged();\n Log.d(TAG,\"select:\"+selection);\n headIndex = newChats[0].id; // update the headIndex\n } else if ( newChats[0].id > chatList.get(chatList.size()-1).id ) { // new.head is after current.tail\n // append the new chats to the tail of the current chat\n for ( Chat chat : newChats ) {\n chatList.offer(chat);\n }\n tailIndex = newChats[newChats.length-1].id; // update the tail index\n } else {\n Log.e(TAG,\"Loaded duplicated chat!\");\n }\n }",
"public void setMessage(Message msg){\n message = msg;\n setChanged();\n notifyObservers();\n }",
"@Override\r\n\t\t\tpublic void Message(TranObject msg) {\n\t\t\t\tif(msg.getObjStr()!=null){\r\n\t\t\t\t\tString objStr=msg.getObjStr();\r\n\t\t\t\t\tUser addUser=gson.fromJson(objStr,new TypeToken<User>(){}.getType());\r\n\t\t\t\t\tboolean hasUser=false;\r\n\t\t\t\t\tfor(Category cate:user.getCategorys()){\r\n\t\t\t\t\t\tfor(User u:cate.getMembers()){\r\n\t\t\t\t\t\t\tif(u.getId()==addUser.getId()){\r\n\t\t\t\t\t\t\t\thasUser=true;\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\tif(hasUser){\r\n\t\t\t\t\t\tDisplay.getDefault().syncExec(new Runnable() {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\t\tList<User> l=new ArrayList<User>();\r\n\t\t\t\t\t\t\t\ttv.setInput(l);\r\n\t\t\t\t\t\t\t\tMessageDialog.openWarning(Display.getDefault().getActiveShell(), \"wain\", \"you already has this friend\");\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{\r\n\t\t\t\t\t\tDisplay.getDefault().syncExec(new Runnable() {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\t\tList<User> l=new ArrayList<User>();\r\n\t\t\t\t\t\t\t\tl.add(addUser);\r\n\t\t\t\t\t\t\t\ttv.setInput(l);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\tDisplay.getDefault().syncExec(new Runnable() {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\tList<User> l=new ArrayList<User>();\r\n\t\t\t\t\t\t\ttv.setInput(l);\r\n\t\t\t\t\t\t\tMessageDialog.openWarning(Display.getDefault().getActiveShell(), \"wain\", \"Without this user \");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}",
"public void processMessage(Chat chat, Message message) {\n LOG.debug(\"processMessage chat.threadID: \" + chat.getThreadID()\n + \" message.from: \" + message.getFrom()\n + \" message.body: \" + message.getBody()\n + \" message.subject: \" + message.getSubject()\n + \" message: \" + message);\n Conversation convo;\n boolean newConvo = false;\n Conversation oldConvo = null;\n \n try {\n // To allow this to be called from multiple threads, we must lock the\n // conversations when we muck with them.\n LOG.debug(\"getting lock on conversations...\");\n synchronized (getConversations()) {\n LOG.debug(\"got lock on conversations\");\n\n // Get the conversation.\n convo = removeConversation(chat.getParticipant());\n if (convo == null) {\n LOG.debug(\"new conversation with participant \" + chat.getParticipant());\n convo = new Conversation(chat);\n newConvo = true;\n }\n\n // Add this conversation to the front of the list.\n getConversations().addFirst(convo);\n\n // Evict old conversations.\n LOG.debug(\"number of conversations: \" + getConversations().size());\n if (getConversations().size() > MAX_CONVERSATIONS) {\n oldConvo = getConversations().removeLast();\n }\n }\n\n // Process the message itself.\n convo.reactToIm(newConvo, message, XmppAppender.this);\n\n // Let the person know we're evicting them.\n if (oldConvo != null) {\n // Don't send this if we haven't heard from this person in a long time.\n Calendar cal = Calendar.getInstance();\n cal.add(Calendar.DATE, -MAX_DAYS_TO_NOTIFY_OF_EVICTION);\n if (oldConvo.getLastHeardFrom().after(cal.getTime())) {\n oldConvo.sendIm(\"I'm holding a conversation with \" + MAX_CONVERSATIONS +\n \" other people, so I'll talk to you later.\");\n }\n }\n }\n catch (Throwable t) {\n LOG.error(t);\n }\n }",
"private void showMessage() throws IOException {\n String msg = fromServer.readUTF();\n chatArea.append(msg + \"\\n\");\n // set the chat area always keep focus at bottom\n chatArea.setCaretPosition(chatArea.getDocument().getLength());\n }",
"public void receiveChatClosure() {\n\t\t\r\n\t\tString message = \"Chat request details\";\r\n\t\t\r\n\t\t//Notify the chat request details to the GUI\r\n\t\tthis.observable.notifyObservers(message);\r\n\t}",
"@EventHandler(ignoreCancelled = true, priority = EventPriority.LOWEST)\n\tsynchronized void onPlayerChat (AsyncPlayerChatEvent event)\n\t{\t\t\n\t\tPlayer player = event.getPlayer();\n\t\tif(!player.isOnline())\n\t\t{\n\t\t\tevent.setCancelled(true);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tString message = event.getMessage();\n\t\t\n\t\tboolean muted = this.handlePlayerChat(player, message, event);\n\t\tSet<Player> recipients = event.getRecipients();\n\t\t\n\t\t//muted messages go out to only the sender\n\t\tif(muted)\n\t\t{\n\t\t recipients.clear();\n\t\t recipients.add(player);\n\t\t}\n\n\t\t//remaining messages\n\t\telse\n\t\t{\n\t\t //enter in abridged chat logs\n\t\t makeSocialLogEntry(player.getName(), message);\n\t\t}\n\t}",
"@Override\n public void update() {\n String msg = (String) topic.getUpdate(this);\n if(msg == null){\n System.out.println(this.imeRonioca + \" no new messages\");\n }else{\n System.out.println(this.imeRonioca + \" consuming message: \" + msg);\n }\n }",
"@Override\n public void onMessageReceived(MessageEvent messageEvent) {\n if(messageEvent.getPath().equals(BTCommType.GET_CONTACTS.toString())) {\n dataMap = DataMap.fromByteArray(messageEvent.getData());\n contacts = new ContactSync(dataMap);\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mAdapter.notifyDataSetChanged();\n loadAdapter();\n }\n });\n }\n\n if(messageEvent.getPath().equals(BTCommType.GET_DRAWINGS.toString())) {\n List<AMessage> messages = new ArrayList<AMessage>();\n DataMap data = DataMap.fromByteArray(messageEvent.getData());\n\n List<String> emojis = data.getStringArrayList(\"emojis\");\n List<Integer> pos = data.getIntegerArrayList(\"emojisPositions\");\n\n int messageAmount = data.getInt(\"amountOfMessages\");\n for (int i = 0; i < messageAmount; i++) {\n if(pos.contains(i)){\n Emoticon emoji = new Emoticon(EmoticonType.valueOf(emojis.get(0)).getRes());\n emojis.remove(0);\n messages.add(emoji);\n } else {\n Drawing drawing = new Drawing(data.getFloatArray(\"y-coordinates \" + i)\n , data.getFloatArray(\"x-coordinates \" + i)\n , data.getLongArray(\"drawing-times \" + i)\n , data.getStringArray(\"actions \" + i)\n , data.getByteArray(\"staticDrawing \" + i));\n messages.add(drawing);\n }\n\n }\n Log.e(\"drawings\", \"new drawings\");\n MessageHolder.getInstance().setDrawings(messages);\n if(messageAmount < 1){\n Toast.makeText(getApplicationContext(), \"No messages found\", Toast.LENGTH_SHORT).show();\n }\n else {\n Intent intent = new Intent(this, ConversationViewActivity.class);\n intent.putExtra(BTCommType.SEND_TO_CONTACT.toString(), contact);\n startActivity(intent);\n this.finish();\n }\n }\n }",
"private void readMessage(final String myid, final String userid, final String imageurl){\n\n mchat = new ArrayList<>();\n\n ref = FirebaseDatabase.getInstance().getReference(\"chats\");\n ref.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n mchat.clear();\n for(DataSnapshot snapshot : dataSnapshot.getChildren()){\n Chat chat = snapshot.getValue(Chat.class);\n assert chat != null;\n if(chat.getReceiverUID().equals(myid) && chat.getSenderUID().equals(userid) || chat.getReceiverUID().equals(userid) && chat.getSenderUID().equals(myid))\n mchat.add(chat);\n messageAdapter = new MessageAdapter(getContext(),mchat,imageurl);\n recyclerView.setAdapter(messageAdapter);\n }\n\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n\n }",
"@Override\n public void onReceive(DataTransfer message) {\n ChatBox currentChatBox = getCurrentChat();\n final String current = currentChatBox != null ? currentChatBox.getTarget() : null;\n\n boolean isCurrentOnline = current == null;\n\n // Clear all exist chat item\n lvUserItem.getItems().clear();\n\n // Retrieve online users\n List<String> onlineUsers = (List<String>) message.data;\n\n // Clear all offline user chat messages in MessageManager\n MessageManager.getInstance().clearOffline(onlineUsers);\n MessageSubscribeManager.getInstance().clearOffline(onlineUsers);\n\n for (String user : onlineUsers) {\n // Add user (not your self) into listview\n if (!username.equals(user)) {\n ChatItem item = new UserChatItem();\n item.setName(user);\n lvUserItem.getItems().add(item);\n\n // Check whether current user still online\n if (user.equals(current))\n isCurrentOnline = true;\n else {\n String topic = String.format(\"chat/%s\", user);\n if (!MessageSubscribeManager.getInstance().containsKey(topic)) {\n // with other user listen message\n Subscriber subscriber = subscribeMessages(username, topic);\n MessageSubscribeManager.getInstance().put(topic, subscriber);\n }\n }\n }\n }\n\n // In case current user offline\n // Clear chat box\n if (!isCurrentOnline) {\n clearChatBox();\n }\n }",
"public void sendChat(String message) {\n\t\tenqueue(\"PRIVMSG #\"+Executable.targetChannel+\" :imGlitch \"+message);\n\t}",
"boolean processChatCmd( String s )\n\t{\n\t\t\n\t\tman.getOpponent(this).out.println(s);\n\t\tman.getOpponent(this).out.flush();\n\t\tout.println(\"Message sent.\");\n\t\tout.flush();\n\t\treturn true;\n\t}",
"@Override\n public void updateLog(String msg) {\n\n setText2Log(msg);\n }"
] | [
"0.7055973",
"0.6954711",
"0.69140244",
"0.6839825",
"0.6838561",
"0.68264204",
"0.67133266",
"0.6653939",
"0.6652119",
"0.6590467",
"0.65394986",
"0.65393126",
"0.65315795",
"0.6525995",
"0.6507693",
"0.6502042",
"0.64783126",
"0.6478258",
"0.6451216",
"0.6421995",
"0.64149934",
"0.6393479",
"0.63859516",
"0.6375569",
"0.6374379",
"0.63724613",
"0.63628894",
"0.6361803",
"0.63582027",
"0.63567644",
"0.63482404",
"0.63464606",
"0.6319484",
"0.6315211",
"0.63139874",
"0.63055325",
"0.6288394",
"0.62601626",
"0.62583596",
"0.62477237",
"0.6243095",
"0.623973",
"0.6233794",
"0.6233051",
"0.62295365",
"0.622887",
"0.6227214",
"0.6199723",
"0.618819",
"0.61874384",
"0.6179369",
"0.6166908",
"0.6164728",
"0.6160418",
"0.6156038",
"0.61539036",
"0.6148665",
"0.6147784",
"0.6139835",
"0.6138033",
"0.6131365",
"0.6126747",
"0.61228496",
"0.61211777",
"0.6118273",
"0.61059624",
"0.60994464",
"0.6090164",
"0.60853195",
"0.6082107",
"0.60731316",
"0.6070049",
"0.6069734",
"0.605651",
"0.6044509",
"0.60431314",
"0.60400105",
"0.60326093",
"0.6031663",
"0.6016674",
"0.60149056",
"0.6013509",
"0.6012806",
"0.60099995",
"0.60017335",
"0.6001333",
"0.59921896",
"0.5991048",
"0.5989079",
"0.59864694",
"0.59859985",
"0.5984359",
"0.59694934",
"0.5966612",
"0.59648204",
"0.59512097",
"0.5949896",
"0.5948834",
"0.5946971",
"0.5944579"
] | 0.7771407 | 0 |
get Orders from database related to selected customer | private ObservableList<Order> getOrders() throws SQLException{
DBConnect db = DBConnect.getInstance();
return db.getOrders(selectedCustomer.getCustomer_id());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private ObservableList<Order> getAllCustomerOrders(int customerId){\r\n ObservableList<Order> customerOrders = null;\r\n try {\r\n OrderDB odb = new OrderDB();\r\n customerOrders = odb.getAllOrders(customerId);\r\n } catch (Exception e){\r\n System.err.println(e.getMessage());\r\n }\r\n return customerOrders;\r\n }",
"List<CustomerOrder> getAllCustomerOrder();",
"List<OrderDTO> findAll(String customerId);",
"@GetMapping(\"/{customerid}\")\n public ResponseEntity<List<Order>> byCustomer(@PathVariable(value = \"customerid\") Long customerId) {\n return new ResponseEntity<>(orderService.getAllByCustomerId(customerId), HttpStatus.OK);\n }",
"public OrderList findOrders(){\n sql=\"SELECT * FROM Order\";\n Order order;\n try{\n ResultSet resultSet = db.SelectDB(sql);\n \n while(resultSet.next()){\n order = new Order();\n order.setOrderID(resultSet.getString(\"OrderID\"));\n order.setCustomerID(resultSet.getString(\"CustomerID\"));\n order.setStatus(resultSet.getString(\"Status\"));\n ordersList.addItem(order);\n }\n }\n catch(SQLException e){\n System.out.println(\"Crash finding all orders\" + e);\n }\n return ordersList;\n }",
"void getOrders();",
"@Override\n\tpublic ArrayList<SalesOrder> getAllSalesOrdersByCustomer(String customerName, boolean retrieveAssociation) throws Exception\n\t{\n ArrayList<SalesOrder> returnList = new ArrayList<SalesOrder>();\n\n\t\tPreparedStatement query = _da.getCon().prepareStatement(\"SELECT * FROM SalesOrder, Contacts WHERE name = ?\");\n query.setString(1, customerName);\n _da.setSqlCommandText(query);\n ResultSet salesOrderResult = _da.callCommandGetResultSet();\n\n while (salesOrderResult.next())\n {\n SalesOrder salesOrder = buildSalesOrder(salesOrderResult, retrieveAssociation);\n returnList.add(salesOrder);\n }\n\n return returnList;\n\t}",
"public abstract List<CustomerOrder> findAll();",
"@RequestMapping(value = \"/v2/customers\", method = RequestMethod.GET)\r\n\tpublic List<Customer> customers() {\r\n JPAQuery<?> query = new JPAQuery<Void>(em);\r\n QCustomer qcustomer = QCustomer.customer;\r\n List<Customer> customers = (List<Customer>) query.from(qcustomer).fetch();\r\n // Employee oneEmp = employees.get(0);\r\n\t\treturn customers;\r\n }",
"io.opencannabis.schema.commerce.OrderCustomer.Customer getCustomer();",
"public List<Customer> getCustomerByID() {\n Query query = em.createNamedQuery(\"Customer.findByCustomerId\")\r\n .setParameter(\"customerId\", custID);\r\n // return query result\r\n return query.getResultList();\r\n }",
"@Override\n\tpublic List<Customer> getCustomerList() {\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\tQuery query=session.createQuery(\"Select c from Customer c\");\n\t\tList<Customer> list=(List<Customer>)query.getResultList();\n\t\t/*\n\t\t * Customer customer = (Customer)session.load(Customer.class,customerId);\n\t\t * */\n\t\treturn list;\n\t}",
"@Query(\"select acc from Account acc where acc.customer.customerId = :customerId\")\n\tAccount findAccountByCustomer(@Param(\"customerId\") Long customerId);",
"public void showOrdersByCustomerName(String string) {\n\n\t\tSystem.out.println(\"\\nMostrant Orders del customer anomenat \" + string);\n\t\tCustomer example = new Customer(0, string, null, null, null, null);\n\n\t\tObjectSet<Order> orderResult = db.query(new Predicate<Order>() {\n\t\t\tpublic boolean match(Order order) {\n\t\t\t\treturn order.getCustomer().getName().equals(example.getName());\n\t\t\t}\n\t\t});\n\t\torderResult.stream()\n\t\t\t\t.peek(System.out::println)\n\t\t\t\t.flatMap(o -> o.getDetails().stream())\n\t\t\t\t.forEach(System.out::println);\n\t}",
"public static List<Customer> getCustomers(){\n \treturn Customer.findAll();\n }",
"public ArrayList<SalesOrder> getAllSalesOrdersByCustomer(long customerId, boolean retrieveAssociation) throws Exception\n {\n ArrayList<SalesOrder> returnList = new ArrayList<SalesOrder>();\n\n PreparedStatement query = _da.getCon().prepareStatement(\"SELECT * FROM SalesOrder WHERE contactsKey = ?\");\n query.setLong(1, customerId);\n _da.setSqlCommandText(query);\n ResultSet salesOrderResult = _da.callCommandGetResultSet();\n\n while (salesOrderResult.next())\n {\n SalesOrder salesOrder = buildSalesOrder(salesOrderResult, retrieveAssociation);\n returnList.add(salesOrder);\n }\n\n return returnList;\n }",
"@Override\n\tpublic List<Customer> getCustomers() {\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\t//create the query\n\t\tQuery<Customer> query = session.createQuery(\"from Customer order by lastName\", Customer.class);\n\t\t//get the result list\n\t\tList<Customer> customers = query.getResultList();\n\t\treturn customers;\n\t}",
"@GetMapping(\"/order/customer\")\r\n\tprivate ResponseEntity<Object> findByCustomername(@RequestParam(value =\"customername\") String customername) \r\n\t{\r\n\t\tOrderDetailsResponse response = new OrderDetailsResponse();\r\n\t\tList<OrderDetailsRequest> ordersDetails = new ArrayList<OrderDetailsRequest>();\r\n\t\tif(customername == null || customername.isEmpty()) {\r\n\t\t\tresponse.setMessage(\"FAILED : customername can not be empty\");\r\n\t\t\tresponse.setStatus((long) 400);\r\n\t\t\treturn new ResponseEntity<Object>(response, HttpStatus.OK);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif(orderService.findByCustomername(customername).size() == 0) {\r\n\t\t\t\tlogger.error(\"No order found for the given customer::\" +customername);\r\n\t\t\t\tthrow new OrderNotFoundException();\r\n\t\t\t}\r\n\t\t\tList<OrderDetails> orderDetails = orderService.findByCustomername(customername);\r\n\t\t\tfor(OrderDetails o : orderDetails) {\r\n\t\t\t\tOrderDetailsRequest details = new OrderDetailsRequest();\r\n\t\t\t\tconstructResponseData(o,details);\r\n\t\t\t\tList<OrderItemDetails> items = restClientService.findByOrderid( o.getId());\r\n\t\t\t\tdetails.setProductDetails(items);\r\n\t\t\t\tordersDetails.add(details);\r\n\t\t\t}\r\n\t\t\tresponse.setMessage(\"SUCCESS\");\r\n\t\t\tresponse.setStatus((long) 200);\r\n\t\t\tresponse.setOrders(ordersDetails);\r\n\t\t\treturn new ResponseEntity<Object>(response, HttpStatus.OK);\r\n\t\t}\r\n\t}",
"@Override\n public Collection<Order> getOrdersByUserId(String id) {\n Collection<Order> orders = getAll();\n return orders.stream()\n .filter(x -> x.getCustomerId().equals(id))\n .collect(Collectors.toList());\n }",
"@Override\n\tpublic Customer getCustomers(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t// retrieve object from database using the ID\n\t\tCustomer theCustomer = currentSession.get(Customer.class, theId);\n\t\t\n\t\t// return the results\n\t\treturn theCustomer;\n\t}",
"List<Order> getByUser(User user);",
"@Override\n\t@Transactional\n\tpublic List<AMOUNT> getCustomers() {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// create a query\n\t\tQuery<AMOUNT> theQuery = currentSession.createQuery(\"from Customer ORDER BY lastName\", AMOUNT.class);\n\n\t\t// execute query and get result list\n\t\tList<AMOUNT> customers = theQuery.getResultList();\n\n\t\t// return the results\n\t\treturn customers;\n\t}",
"@Transactional\n\tpublic List<Customer> getCustomers() {\n\t\t\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t\t\t// create a query ... sort by last name\n\t\t\t\tQuery<Customer> theQuery = currentSession.createQuery(\"from Customer order by lastName\", Customer.class);\n\n\t\t\t\t// execute query and get result list\n\t\t\t\tList<Customer> customers = theQuery.getResultList();\n\n\t\t\t\t// return the results\n\t\t\t\treturn customers;\n\t}",
"@Override\n\tpublic List<Customer> findAllCustomer() {\n\t\treturn customerDao.findAllCustomer();\n\t}",
"@Override\n\tpublic List<Customer> getCustomers() {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\t\t\n\t\t// create a query ... sort by the lastname\n\t\tQuery<Customer> theQuery = \n\t\t\t\tcurrentSession.createQuery(\"from Customer order by lastName\",Customer.class);\n\t\t\n\t\t// execute query and get result list\n\t\tList<Customer> customers = theQuery.getResultList();\n\t\t\t\t\n\t\t// return the results\t\t\n\t\treturn customers;\n\t}",
"List<Customer> getCustomers();",
"List<Order> findClientOrders(long clientId) throws DaoProjectException;",
"@Override\n\tpublic void getSpecificOrders() {\n\t\t\n\t}",
"@Override\n\tpublic void getSpecificOrders() {\n\t\t\n\t}",
"public abstract Page<CustomerOrder> findByCustomer(Customer customer, GlobalSearch globalSearch, Pageable pageable);",
"@Override\n\t@Transactional\n\tpublic List<Customer> getCustomers() {\n\t\treturn customerDAO.getCustomers();\n\t\t\n\t}",
"public List<Order> p1_getActiveOrders(Customer customer) {\t\n\t\t//return customer.getOrders().stream().collect(toList()); // INITIAL\n\t\t// SOLUTION(\n\t\treturn customer.getOrders().stream()\n\t\t\t\t.filter(order -> order.isActive())\n\t\t\t\t.collect(toList());\n\t\t// SOLUTION)\n\t}",
"@Override\n\tpublic List<Customer> getCustomers() {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// create a query\n\t\tQuery<Customer> theQuery =\n\t\t\t\tcurrentSession.createQuery(\"from Customer order by lastName\", Customer.class);\n\n\t\t// execute query and get result list\n\t\tList<Customer> customers = theQuery.getResultList();\n\n\t\treturn customers;\n\t}",
"public List<CustomerOrder> custOrders(String custid) {\n\t\treturn null;\r\n\t}",
"public List<Order> getAllUsersOrdersById(long userId);",
"@Override\n\tpublic Uni<List<Customer>> findAllCustomer() {\n\t\treturn repo.findAll().list();\n\t}",
"public CustomerOrder getOrder() {\n return (CustomerOrder) get(\"order\");\n }",
"@RequestMapping(value = \"/customerOrders/{id}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<CustomerOrder> getCustomerOrder(@PathVariable Long id) {\n log.debug(\"REST request to get CustomerOrder : {}\", id);\n CustomerOrder customerOrder = customerOrderRepository.findOne(id);\n return Optional.ofNullable(customerOrder)\n .map(result -> new ResponseEntity<>(\n result,\n HttpStatus.OK))\n .orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND));\n }",
"ClOrderInfo selectByPrimaryKey(String orderId);",
"List<OrderDto> getOrders();",
"public List<CustomerModel> getCustomers();",
"public List<Order> getOrders() throws Exception {\n\n\t\tConnection con = null;\n\t\tPreparedStatement stmt = null;\n\t\tResultSet rs = null;\n\t\tString sql = \"select * from ocgr_orders left join ocgr_clients on ocgr_orders.client_id = ocgr_clients.client_id left join ocgr_vendors on ocgr_orders.vendor_id = ocgr_vendors.vendor_id;\";\n\n\t\tDB db = new DB();\n\n\t\tList<Order> orders = new ArrayList<Order>();\n\n\t\ttry {\n\t\t\tdb.open();\n\t\t\tcon = db.getConnection();\n\n\t\t\tstmt = con.prepareStatement(sql);\n\t\t\trs = stmt.executeQuery();\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tClient client = new Client( rs.getString(\"client_id\"), rs.getString(\"client_password\"), rs.getString(\"client_email\"),\n\t\t\t\t\t\t\t\t\t\t\trs.getString(\"client_fullname\"), rs.getString(\"client_compName\"), rs.getString(\"client_address\"),\n\t\t\t\t\t\t\t\t\t\t\trs.getString(\"client_itin\"), rs.getString(\"client_doy\"), rs.getString(\"client_phone\") );\n\n\t\t\t\tVendor vendor = new Vendor( rs.getString(\"vendor_id\"), rs.getString(\"vendor_password\"), rs.getString(\"vendor_email\"),\n\t\t\t\t\t\t\t\t\t\t\trs.getString(\"vendor_fullname\"), rs.getString(\"vendor_compName\"), rs.getString(\"vendor_address\"),\n\t\t\t\t\t\t\t\t\t\t\trs.getString(\"vendor_itin\"), rs.getString(\"vendor_doy\"), rs.getString(\"vendor_phone\") );\n\n\t\t\t\torders.add( new Order(rs.getString(\"order_id\"), rs.getTimestamp(\"order_date\"), rs.getBigDecimal(\"order_total\"),\n\t\t\t\t\t\t\t\t\t rs.getString(\"order_address\"), rs.getString(\"order_address\"),\n\t\t\t\t\t\t\t\t\t rs.getString(\"order_paymentmethod\"), client, vendor ) );\n\t\t\t}\n\t\t\trs.close();\n\t\t\tstmt.close();\n\t\t\tdb.close();\n\n\t\t\treturn orders;\n\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(e.getMessage());\n\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tdb.close();\n\t\t\t} catch (Exception e) {}\n\t\t}\n\t}",
"public List<Customer> findAllCustomers() throws DatabaseOperationException;",
"List<Purchase> retrieveForCustomerID(Long customerID) throws SQLException, DAOException;",
"Collection<Order> getAll();",
"public ComplexOrderTO getOrder(long storeID, long orderId) throws NotInDatabaseException;",
"public List<Customermodel> getCustomers() {\n\t return customerdb.findAll();\n\t }",
"@RequestMapping(value = \"/_search/customerOrders/{query:.+}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public List<CustomerOrder> searchCustomerOrders(@PathVariable String query) {\n log.debug(\"REST request to search CustomerOrders for query {}\", query);\n return StreamSupport\n .stream(customerOrderSearchRepository.search(queryStringQuery(query)).spliterator(), false)\n .collect(Collectors.toList());\n }",
"@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)\n public List<CustomerOrder> getCustomerOrderFindAll() {\n return em.createNamedQuery(\"CustomerOrder.findAll\", CustomerOrder.class).getResultList();\n }",
"List<Customer> getCustomerList();",
"Customer getCustomerById(int customerId);",
"List<Order> getOpenOrders(OpenOrderRequest orderRequest);",
"List<Customer> loadAllCustomer();",
"@Override\n public List<Order> findOrders() {\n return orderRepository.findAll(Sort.by(Sort.Direction.DESC, \"created\")).stream()\n .filter(t -> t.getOrder_state().equals(\"ACTIVE\"))\n .map(mapper::toDomainEntity)\n .collect(toList());\n }",
"public List<Order> getOrders(){\n return this.orders;\n }",
"@RequestMapping(value = \"/customerOrders\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<List<CustomerOrder>> getAllCustomerOrders(Pageable pageable)\n throws URISyntaxException {\n log.debug(\"REST request to get a page of CustomerOrders\");\n Page<CustomerOrder> page = customerOrderRepository.findAll(pageable); \n HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, \"/api/customerOrders\");\n return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);\n }",
"@Override\n\tpublic List<Customer> getCustomers() {\n\n\t\treturn sessionFactory.getCurrentSession().createQuery(\"from Customer order by lastName\", Customer.class)\n\t\t\t\t.getResultList();\n\n\t}",
"public List<Order> getOrderHistory(Customer customer) throws ExecutionException, InterruptedException {\n\n List<Order> orderList = new ArrayList<>();\n\n ExecutorService executorService = Executors.newSingleThreadExecutor();\n Future<List<Order>> futures = executorService.submit(new getOrderHistory(customer));\n executorService.shutdown();\n\n if (futures.get() != null) {\n orderList = futures.get();\n }\n\n\n return orderList;\n }",
"@Transactional(readOnly = true)\n public void associationsAndJoinsExamples() {\n List<Customer> customersWithOrders = getSession().createQuery(\"from Customer as customer inner join customer.orders as ord with ord.shipCountry = 'UK'\").list();\n System.out.println(customersWithOrders.size());\n\n List<Customer> customersWithFetchOrders = getSession().createQuery(\"from Customer as customer inner join fetch customer.orders as ord where ord.shipCountry = 'UK'\").list();\n System.out.println(customersWithOrders.size());\n\n //FETCH keyword - dociąganie obiektów - iloczyn kartezjanski - sa 2 kolekcje\n //List<Customer> customersWithOrderDetails = getSession().createQuery(\"from Customer as customer inner join fetch customer.orders as ord inner join fetch ord.orderDetails as orderDetail\").list();\n //System.out.println(customersWithOrderDetails.size());\n }",
"@Override\n\tpublic List<Customer> getCustomers(String sort) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\tString QueryString = \"from Customer order by \" + sort;\n\t\t\n\t\t// create a query ... sort by last name\n\t\tQuery<Customer> theQuery = currentSession.createQuery(QueryString, Customer.class);;\t\n\t\t// execute query and get result list\n\t\tList<Customer> customers = theQuery.getResultList();\n\t\t\t\t\n\t\t// return the results\t\t\n\t\treturn customers;\n\t}",
"public static Result getOrder(String orderId){\n \n MysqlDBOperations mysql = new MysqlDBOperations();\n ResourceProperty rs = new ResourceProperty(\"com.generic.resources.mysqlQuery\");\n Connection conn = mysql.getConnection(); \n Orders order;\n List<MarketProduct> productList;\n\n try{\n\n // -1- Prepare Statement\n PreparedStatement preStat = conn.prepareStatement(rs.getPropertyValue(\"mysql.order.select.4\"));\n preStat.setString(1, orderId);\n \n ResultSet resultSet = preStat.executeQuery();\n \n // -2- Get Result\n if(resultSet.first()){\n \n // -2.1- Get Order Object\n order = ORMHandler.resultSetToOrder(resultSet);\n \n // -2.2- Get User & UserAddress Object\n User user = ORMHandler.resultSetToUser(resultSet);\n UserAddress userAddress = ORMHandler.resultSetToUserAddress(resultSet);\n userAddress.setAddress(ORMHandler.resultSetToAddress(resultSet));\n \n // -2.3- Get MarketProduct list \n productList = new ArrayList<>();\n do{\n MarketProduct product = ORMHandler.resultSetToProduct(resultSet);\n productList.add(product);\n }while(resultSet.next());\n \n // -2.4- Set \n order.setUserAddress(userAddress);\n order.setUser(user);\n order.setProductList(productList);\n \n return Result.SUCCESS.setContent(order);\n }else{\n return Result.SUCCESS_EMPTY;\n } \n\n } catch (SQLException ex) { \n return Result.FAILURE_DB.setContent(ex.getMessage());\n }finally{\n mysql.closeAllConnection();\n } \n }",
"List<Order> getAll();",
"public List<OrderDetails> fetchOderList(){\n List<OrderDetails> orderDetails = null;\n orderDetails = mongoDbConnector.fetchOderList();\n return orderDetails;\n }",
"public Customer getCustomers(int customerId) {\n for(Customer customer:customers){\n if(customer.getId() == customerId){\n return customer;\n }\n }\n return null;\n }",
"@Override\n\tpublic List<CustomerData> getAllCustomer() {\n\t\treturn customerRepository.findAll();\n\t}",
"public List<OrdersCustom> queryAllOrders() {\n\t\treturn ordersMapper.queryAllOrders();\n\t}",
"public CustomerOrder list(String username) {\n\t\treturn orderDao.list(username);\n\t}",
"public ArrayList<OrderRecord> getOrders() throws SQLException {\r\n ArrayList<OrderRecord> result = new ArrayList<>();\r\n String sqlQuery = \"SELECT * FROM `orders`\";\r\n try {\r\n PreparedStatement p = myConn.prepareStatement(sqlQuery);\r\n \r\n ResultSet rs = p.executeQuery(sqlQuery);\r\n while (rs.next()) {\r\n //table schema\r\n //id, name, tab_num, foodname, beveragename, served, billed, time\r\n \r\n // Customer name, orderid, table, items\r\n OrderRecord newOrder = new OrderRecord();\r\n \r\n newOrder.name = rs.getString(2);\r\n newOrder.id = rs.getInt(1);\r\n newOrder.table = rs.getInt(3);\r\n \r\n newOrder.food = rs.getString(4);\r\n newOrder.beverage = rs.getString(5);\r\n \r\n newOrder.served = (rs.getInt(6) == 1);\r\n newOrder.billed = (rs.getInt(7) == 1);\r\n \r\n result.add(newOrder);\r\n }\r\n } catch (SQLException e) {\r\n System.out.println(\"Could not get orders \" + e.toString());\r\n System.out.println(myStmt);\r\n }\r\n return result;\r\n }",
"@Query(\"from OfferPrice o where o.customer.id = :customerId\")\n\tList<OfferPrice> findWithCustomerId(@Param(\"customerId\")Long customerId);",
"public ResultSet getOrders(String storage) throws SQLException {\n String query = \"SELECT myOrders.id_order, cities.name, storages.name, myOrders.distance, myOrders.specifying FROM myOrders INNER JOIN cities ON myOrders.id_city = cities.id_city INNER JOIN storages ON myOrders.id_storage = storages.id_storage WHERE storages.name = \\\"\"+storage+\"\\\"\";\n return rs = st.executeQuery(query);\n }",
"public Order getOrderById(long orderId);",
"public List<Customer> findAll() {\n\t\t//get current session\n\t\tSession currentSession = entityManager.unwrap(Session.class);\n\t\t//query to fetch all records\n\t\tQuery<Customer> query = currentSession.createQuery(\n\t\t\t\t\t\t\t\t\"from Customer where customerId!=:customerId\", Customer.class);\n\t\t//get account details of all accounts\n\t\tquery.setParameter(\"customerId\", 9999999);\n\t\tList<Customer> customer = query.getResultList();\n\t\t//return the result\n\t\treturn customer;\n\t}",
"@RequestMapping(\"/getAllOrders\")\n public List<Order> getAllOrders(){\n System.out.println(\"getAllOrders\");\n System.out.println(SessionUtil.getAuth());\n return orderService.getAllOrders();\n }",
"List<Account> getAccountsForCustomerId(int customerId);",
"public List<Customer> getAllCustomers() {\n return customerRepository.findAll();\n }",
"public List<Customer> getAllCustomers() {\n Query query = em.createNamedQuery(\"Customer.findAll\");\r\n // return query result\r\n return query.getResultList();\r\n }",
"public ArrayList<Order> getOrders() {\n\n\t\tArrayList<Order> order = new ArrayList<Order>();\n\n\t\tOrder or = null;\n\t\ttry {\n\t\t\tString sql = \"SELECT * FROM restodb.order\";\n\n\t\t\tjava.sql.PreparedStatement statement = mysqlConnect.connect().prepareStatement(sql);\n\n\t\t\tResultSet rs = statement.executeQuery(sql);\n\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tor = new Order(rs.getString(\"idorder\"), rs.getString(\"date\"), rs.getString(\"clientName\"),\n\t\t\t\t\t\trs.getString(\"status\"), rs.getString(\"location_idlocation\"));\n\n\t\t\t\torder.add(or);\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tmysqlConnect.disconnect();\n\t\t}\n\n\t\treturn order;\n\t}",
"public Object getAllCustomers(HttpServletRequest req);",
"@Override\n public List<Account> getAccounts(Long customerId) {\n return customerDao.getAccounts(customerId);\n }",
"public abstract List<CustomerOrder> findAll(Iterable<Long> ids);",
"@Override\n public List<Order> call() throws Exception {\n String lastName = customer.getLastName();\n String firstName = customer.getFirstName();\n String str = \"http://10.0.2.2:8082/getCustomerOrders?lastName=\" +lastName + \"&firstName=\"+firstName;\n URLConnection urlConn;\n BufferedReader bufferedReader;\n List<Order> orderList = new ArrayList<>();\n\n\n try {\n URL url = new URL(str);\n urlConn = url.openConnection();\n bufferedReader = new BufferedReader(new InputStreamReader(urlConn.getInputStream()));\n\n String line;\n while ((line = bufferedReader.readLine()) != null) {\n\n JSONObject jsonObject = new JSONObject(line);\n Order order = new Order();\n order.setOrderID(jsonObject.getString(\"_id\"));\n order.setLastName(jsonObject.getString(\"lastName\"));\n order.setFirstName(jsonObject.getString(\"firstName\"));\n order.setDate(jsonObject.getString(\"dateOfOrder\"));\n order.setTotal(jsonObject.getDouble(\"Total\"));\n orderList.add(order);\n\n\n }\n\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return orderList;\n }",
"@Override\n public List<Account> findByleftJoinOrders() {\n QAccount account = QAccount.account;\n QOrder order = QOrder.order;\n return from(account)\n .distinct()\n .leftJoin(account.orders, order).fetchJoin()\n .orderBy(account.id.asc(), order.id.asc())\n .fetch();\n }",
"@GetMapping(\"/customers\")\n\tpublic List<Customer> getcustomers(){\n\t\t\n\t\treturn thecustomerService.getCustomers();\n\t}",
"public List<Customer> getCustomerByName() {\n Query query = em.createNamedQuery(\"Customer.findByName\")\r\n .setParameter(\"name\", custName);\r\n // return query result\r\n return query.getResultList();\r\n }",
"public void showCustomerOrders() {\n\t\ttextArea.setText(\"\");\n\t\tfor (int i = 0; i < driver.getOrderDB().getCustomerOrderList().size(); i++) {\n\t\t\tOrder order = (driver.getOrderDB().getCustomerOrderList().get(i));\n\t\t\ttextArea.append(\"Order \" + order.getId() + \" was created by \"\n\t\t\t\t\t+ order.getCurrentlyLoggedInStaff().getName() + \"\\nCustomer ID : \"\n\t\t\t\t\t+ ((Customer) order.getPerson()).getId() + \"\\nItems in this order :\");\n\t\t\tfor (int j = 0; j < order.getOrderEntryList().size(); j++) {\n\t\t\t\tStockItem stockItem = order.getOrderEntryList().get(j);\n\t\t\t\ttextArea.append(\"\\n \" + stockItem.getQuantity() + \" \"\n\t\t\t\t\t\t+ stockItem.getProduct().getProductName() + \" \"\n\t\t\t\t\t\t+ (stockItem.getProduct().getRetailPrice() * stockItem.getQuantity()));\n\t\t\t}\n\t\t\ttextArea.append(\"\\nThe total order value is \" + order.getGrandTotalOfOrder() + \"\\n\\n\\n\");\n\t\t}\n\t}",
"public Customer getCustomer(String id) {\n\t\tString firstName = \"\";\n//\t\tString lastName = \"\";\n//\t\tString address = \"\";\n//\t\tString creditCard = \"\";\n//\t\tString phone = \"\";\n//\t\tArrayList<Order> orders = new ArrayList<>();\n\t\tConnection connection = DBConnect.getDatabaseConnection();\n\t\t\n\t\ttry {\n\t\t\tStatement selectStatement = connection.createStatement();\n\t\t\t\n\t\t\tString selectQuery = \"SELECT * from Customer where CustomerID='\" + id +\"'\";\n\t\t\tResultSet resultSet = selectStatement.executeQuery(selectQuery);\n\t\t\tresultSet.next();\n\t\t\t\n\t\t\tfirstName = resultSet.getString(\"FName\");\n//\t\t\tlastName = resultSet.getString(\"lastName\");\n//\t\t\taddress = resultSet.getString(\"lastName\"); //TODO update this code: Address has it's own table . access AddressDAO object (use attribute line 21) \n//\t\t\tcreditCard = resultSet.getString(\"creditCard\"); //TODO same as Address. (attribute line 22) \n\n//\t\t\torders = orderDAO.getAllOrders(); //TODO fix me (make sure function returns something).\n\t\t\t\n\t\t}catch(SQLException se) {\n\t\t\tse.printStackTrace();\n\t\t}finally {\n\t\t\tif(connection != null) {\n\t\t\t\ttry {\n\t\t\t\t\tconnection.close();\n\t\t\t\t} catch (SQLException e) {}\n\t\t\t}\n\t\t}\n\t\t\n\t\tCustomer customer = new Customer();\n\t\tcustomer.setFirstName(firstName);\n//\t\tcustomer.setLastName(lastName);\n//\t\t//TODO customer.setAddress(address); update\n//\t\t//TODO customer.setCard(creditCard); update\n//\t\tcustomer.setOrders(orders);\n\t\t\n\t\treturn customer;\n\t}",
"@Override\n\tpublic List<Orders> queryOrder() throws SQLException {\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\tResultSet result = null;\n\t\tList<Orders> messages=null;\n\t\ttry{\n\t\t\tconn = DBCPUtils.getConnection();\n\t\t\tstmt = conn.prepareStatement(\"SELECT * FROM orders\");\n\t\t\tresult = stmt.executeQuery();\n\t\t\tmessages=new ArrayList<Orders>();\n\t\t\twhile (result.next()) {\n\t\t\t\tOrders order=new Orders();\n\t\t\t\torder.setOrderId(result.getInt(1));\n\t\t\t\torder.setOrderName(result.getString(2));\n\t\t\t\torder.setOrderAddress(result.getString(3));\n\t\t\t\torder.setOrderPhone(result.getString(4));\n\t\t\t\torder.setOrderNumber(result.getInt(5));\n\t\t\t\torder.setOrderTime(result.getString(6));\n\t\t\t\torder.setBookName(result.getString(7));\n\t\t\t\torder.setOrderMemo(result.getString(8));\n\t\t\t\tmessages.add(order);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tDBCPUtils.releaseConnection(conn, stmt, result);\n\t\t}\n\t\treturn messages;\n\t\t\n\t\t\n\t}",
"List<Customers> selectByCustomers(Customers customers);",
"public static List<Order> getListOrder(int idCustomer) {\n\t\tList<Order> result = new ArrayList<Order>();\n\n\t\ttry {\n\t\t\tString query = \"SELECT * FROM command c \"\n\t\t\t\t\t+ \"LEFT JOIN item i ON i.idCommand = c.idCommand \"\n\t\t\t\t\t+ \"WHERE c.idCustomer = \" + idCustomer\n\t\t\t\t\t+ \" ORDER BY c.idCommand\";\n\n\t\t\tResultSet resultset = AccesBDD.getStatement().executeQuery(query);\n\n\t\t\tint idCommand = 0;\n\t\t\tOrder order = null;\n\n\t\t\twhile (resultset.next()) {\n\t\t\t\tif (idCommand != resultset.getInt(\"idCommand\")) {\n\t\t\t\t\torder = new Order();\n\t\t\t\t\torder.setIdCommand(idCommand = resultset\n\t\t\t\t\t\t\t.getInt(\"idCommand\"));\n\t\t\t\t\torder.setIdCustomer(resultset.getInt(\"idCustomer\"));\n\t\t\t\t\torder.setLignes(new ArrayList<OrderLine>());\n\t\t\t\t\torder.setDate(DateExtension.toDate(resultset.getString(\"created_at\")));\n\t\t\t\t\tresult.add(order);\n\t\t\t\t}\n\n\t\t\t\tOrderLine line = new OrderLine();\n\t\t\t\tline.setIdCommande(idCommand);\n\t\t\t\tline.setIdItem(resultset.getInt(\"idItem\"));\n\t\t\t\tline.setIdSketch(resultset.getInt(\"idSketch\"));\n\t\t\t\tline.setIdSupport(resultset.getInt(\"idSupport\"));\n\t\t\t\tline.setMontant(resultset.getFloat(\"montant\"));\n\t\t\t\torder.getLignes().add(line);\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t\treturn result.isEmpty() ? null : result;\n\t}",
"List<Cargo> getCargoesForOrder(OrderDTO orderDTO);",
"@Override\n public List<Account> findAllByCustomerId(String customerId) {\n Query findByCustomer = new Query();\n findByCustomer.addCriteria(Criteria.where(\"customerId\").is(customerId));\n return operations.find(findByCustomer, Account.class);\n }",
"public static ArrayList<Orders> selectAllOrders() {\n ArrayList<Orders> toReturn = new ArrayList<Orders>();\n\n Connection dbConnection = ConnectionFactory.getConnection();\n PreparedStatement selectStatement = null;\n ResultSet rs = null;\n try {\n selectStatement = dbConnection.prepareStatement(selectStatementString);\n rs = selectStatement.executeQuery();\n while(rs.next()) {\n\n int order_Id = rs.getInt(\"id\");\n int productID = rs.getInt(\"product_id\");\n int clientID = rs.getInt(\"client_id\");\n double totalPrice = rs.getInt(\"total_price\");\n int quantity = rs.getInt(\"amount\");\n toReturn.add(new Orders(order_Id,productID,clientID,totalPrice,quantity));\n }\n } catch (SQLException e) {\n LOGGER.log(Level.WARNING,\"OrderDAO:selectAllOrders \" + e.getMessage());\n } finally {\n ConnectionFactory.close(rs);\n ConnectionFactory.close(selectStatement);\n ConnectionFactory.close(dbConnection);\n }\n return toReturn;\n }",
"public List<TodoList> findAllByCustomer(Customer customer) {\n return todoListDao.findAllByCustomer(customer);\n }",
"Set<Customer> getCustomers(final CustomerQueryFilter filter);",
"@RequestMapping(\"/getUserOrder\")\n public List<Order> getUserOrder(@RequestParam(\"user_id\") int user_id){\n return orderService.getOrdersByUser(user_id);\n }",
"public String getCustomer(String custId);",
"public List<Customer> findAll(){\n\t\treturn custRepo.findAll();\n\t}",
"public void listOrders() {\n\t\tSystem.out.println(\"\\nMostrant tots els orders\");\n\t\tObjectSet<Order> orders = db.query(Order.class);\n\t\torders.stream()\n\t\t\t.peek(System.out::println)\n\t\t\t.flatMap(o -> o.getDetails().stream())\n\t\t\t.forEach(System.out::println);\n\t}",
"List<Customer> getList();",
"private void getOrderFromDatabase() {\r\n Cursor cursor = helper.getOrderMoreDetails(orderId);\r\n cursor.moveToFirst();\r\n try {\r\n JSONObject senderObject = new JSONObject(cursor.getString(0));\r\n sender = senderObject.getString(\"name\");\r\n JSONObject receiverObject = new JSONObject(cursor.getString(1));\r\n receiver = receiverObject.getString(\"name\");\r\n JSONObject departureObject = new JSONObject(cursor.getString(2));\r\n if (departureObject.getString(\"type\").equals(\"SpecifyAddress\"))\r\n departure = departureObject.getString(\"long_name\");\r\n else\r\n departure = departureObject.getString(\"short_name\");\r\n JSONObject destinationObject = new JSONObject(cursor.getString(3));\r\n if (destinationObject.getString(\"type\").equals(\"SpecifyAddress\"))\r\n destination = destinationObject.getString(\"long_name\");\r\n else\r\n destination = destinationObject.getString(\"short_name\");\r\n numberOfGoods = cursor.getInt(4);\r\n orderTime = cursor.getString(5);\r\n state = cursor.getString(6);\r\n JSONArray goodIdArray = new JSONArray(cursor.getString(7));\r\n goodId = new String[goodIdArray.length()];\r\n for (int i = 0; i < goodIdArray.length(); i++) {\r\n goodId[i] = goodIdArray.getString(i);\r\n }\r\n orderType = cursor.getString(8);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n cursor.close();\r\n }"
] | [
"0.7511526",
"0.7155055",
"0.6772857",
"0.67366004",
"0.66375303",
"0.6573504",
"0.6536187",
"0.648291",
"0.6443883",
"0.6421602",
"0.64192706",
"0.63113683",
"0.63067365",
"0.6305884",
"0.6296612",
"0.6198901",
"0.61927646",
"0.61904407",
"0.6158365",
"0.61522686",
"0.6151763",
"0.6134621",
"0.61323583",
"0.61245906",
"0.61244625",
"0.611924",
"0.61097276",
"0.60981745",
"0.60981745",
"0.6092835",
"0.60642993",
"0.6061389",
"0.60570896",
"0.6043656",
"0.60428375",
"0.6035476",
"0.60330373",
"0.60249114",
"0.60211",
"0.60197437",
"0.6019349",
"0.60080785",
"0.60042185",
"0.60041773",
"0.599729",
"0.5996792",
"0.5991931",
"0.598636",
"0.59862536",
"0.596867",
"0.59680456",
"0.5959137",
"0.5956789",
"0.5932514",
"0.592433",
"0.592041",
"0.5914825",
"0.59080976",
"0.5903505",
"0.5900181",
"0.58923167",
"0.58889824",
"0.5879623",
"0.58783084",
"0.5876184",
"0.586544",
"0.5859613",
"0.5858268",
"0.58500516",
"0.5849726",
"0.58473456",
"0.584521",
"0.584442",
"0.5841091",
"0.5840913",
"0.58373195",
"0.583273",
"0.58277255",
"0.5822076",
"0.58138305",
"0.5806778",
"0.5804506",
"0.5791702",
"0.5788131",
"0.57813936",
"0.57744145",
"0.57708967",
"0.57671356",
"0.5761477",
"0.57606006",
"0.5759196",
"0.57546383",
"0.5749513",
"0.5744278",
"0.57379997",
"0.5737535",
"0.5734258",
"0.57326525",
"0.5730641",
"0.57275665"
] | 0.72417367 | 1 |
display order page contatin all information about selected order | @FXML
public void dislay(ActionEvent event) throws IOException, SQLException{
FXMLLoader loader = new FXMLLoader();
loader.setLocation(getClass().getResource("OrderPage.fxml"));
Parent root = loader.load();
// pass information to orderPage scene
OrderPageController controller = loader.getController();
controller.initData(this.tableView.getSelectionModel().getSelectedItem());
Scene scene = new Scene(root);
Stage orderWindow = new Stage();
orderWindow.setScene(scene);
orderWindow.show();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void viewOrderDetails(){\n\t\tlibManhattanCommonFunctions.clickAnyElement(getPageElement(\"StatisticsTab\"), \"StatisticsTab\");\n\t\tlibManhattanCommonFunctions.clickAnyElement(getPageElement(\"OrdersTab\"), \"OrdersTab\");\n\t\tlibManhattanCommonFunctions.clickAnyElement(getPageElement(\"BtnOrderDetails\"), \"Order Details Button\");\t\n\t}",
"public void displayOrder(Order order) {\n ProductType productType;\n// State state;\n \n productType = order.getProductType();\n// state = order.getState();\n \n ui.say(\n \"Customer Name: \" + order.getCustomerName() + \"\\n\" +\n \"State: \" + order.getState().getName() + \"\\n\" + \n \"Product Type: \" + productType.getName() + \"\\n\" +\n \"Area: \" + order.getArea()+ \" sq ft\\n\" + \n// \"Material Cost Per Square Foot: $\" + productType.getMaterialCostPerSquareFoot() + \"\\n\" +\n \"Material Cost: $\" + order.getMaterialCost() + \"\\n\" +\n// \"Labor Cost Per Square Foot: $\" + productType.getLaborCostPerSquareFoot() + \"\\n\" +\n \"Labor Cost: $\" + order.getLaborCost() + \"\\n\" + \n// \"Tax Rate: \" + state.getTaxRate() + \"\\n\" +\n \"Tax: $\" + order.getTax() + \"\\n\" +\n \"Total: $\" + order.getTotal() \n );\n }",
"public static void viewOrder() {\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************Viewing existing orders************\");\n\t\t// TODO - implement RRPSS.viewOrder\n\t\tOrderManager orderManager = new OrderManager();\n\t\tList listOfOrders = orderManager.viewOrder();\n\n\t\tOrderedItemManager orderedItemManager = new OrderedItemManager();\n\t\tList listOfOrderedItems = null;\n\t\tOrderedPackageManager orderedPackageManager = new OrderedPackageManager();\n\t\tList listOfOrderedPromotionalPackage = null;\n\n\t\tint i = 0;\n\t\tint choice = 0;\n\t\tOrder order = null;\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tif (listOfOrders.size() == 0) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"There is no orders!\");\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\t// print the list of orders for the user to select from.\n\t\t\tfor (i = 0; i < listOfOrders.size(); i++) {\n\t\t\t\torder = (Order) listOfOrders.get(i);\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println((i + 1) + \") Order: \" + order.getId()\n\t\t\t\t\t\t+ \" | Table: \" + order.getTable().getId());\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\tSystem.out.print(\"Select an order to view the item ordered: \");\n\t\t\tchoice = Integer.parseInt(sc.nextLine());\n\n\t\t\torder = (Order) listOfOrders.get(choice - 1);\n\n\t\t\tlistOfOrderedItems = orderedItemManager\n\t\t\t\t\t.retrieveOrderedItemsByOrderID(order.getId());\n\t\t\tlistOfOrderedPromotionalPackage = orderedPackageManager\n\t\t\t\t\t.retrieveOrderedPackageByOrderID(order.getId());\n\n\t\t\tif (listOfOrderedItems.size() == 0\n\t\t\t\t\t&& listOfOrderedPromotionalPackage.size() == 0) {\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\t\tSystem.out.println(\"Order is empty!\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println();\n\t\t\tif (listOfOrderedItems.size() > 0) {\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println(\"All Cart Items Ordered:\");\n\n\t\t\t\tfor (int j = 0; j < listOfOrderedItems.size(); j++) {\n\t\t\t\t\tOrderedItem orderedItem = (OrderedItem) listOfOrderedItems\n\t\t\t\t\t\t\t.get(j);\n\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\t\tSystem.out.println((j + 1) + \") ID: \"\n\t\t\t\t\t\t\t+ orderedItem.getItem().getId() + \" | Name: \"\n\t\t\t\t\t\t\t+ orderedItem.getItem().getName() + \" | $\"\n\t\t\t\t\t\t\t+ orderedItem.getPrice());\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\n\t\t\tif (listOfOrderedPromotionalPackage.size() > 0) {\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println(\"Promotional Packages Ordered:\");\n\n\t\t\t\tfor (int j = 0; j < listOfOrderedPromotionalPackage.size(); j++) {\n\t\t\t\t\tOrderedPackage orderedPackage = (OrderedPackage) listOfOrderedPromotionalPackage\n\t\t\t\t\t\t\t.get(j);\n\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\t\tSystem.out.println((j + 1) + \") ID: \"\n\t\t\t\t\t\t\t+ orderedPackage.getPackage().getId() + \" | Name: \"\n\t\t\t\t\t\t\t+ orderedPackage.getPackage().getName() + \" | $\"\n\t\t\t\t\t\t\t+ orderedPackage.getPrice());\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"Invalid Input!\");\n\t\t}\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************End of viewing orders************\");\n\t}",
"@RequestMapping(value = \"/orders\")\r\n\tpublic ModelAndView openOrdersPage() {\r\n\t\tList<Order> orders = databaseInfo.selectOrders();\r\n\r\n\t\treturn new ModelAndView(\"orders\", \"orderslist\", orders);\r\n\t}",
"private void showOrderDetails(Order order) {\n\t\tString status, shownOption;\n\n\t\tif (order.getStatus()) {\n\t\t\tstatus = new String();\n\t\t\tstatus = \"Processed\";\n\n\t\t\tshownOption = new String();\n\t\t\tshownOption = \"Return\";\n\t\t}\n\t\telse {\n\t\t\tstatus = new String();\n\t\t\tshownOption = new String();\n\n\t\t\tstatus = \"Pending\";\n\t\t\tshownOption = \"Set Processed\";\n\t\t}\n\n\t\tString orderDetailsMessage = \"ORDER DATE : \" + order.getDate();\n\t\torderDetailsMessage += \"\\nSTATUS: \" + status;\n\t\torderDetailsMessage += \"\\nITEMS: \";\n\t\tfor (StockItem stockItem : order.getOrderEntryList()) {\n\t\t\torderDetailsMessage += \"\\n \" + stockItem.getQuantity() + \" \\t x \\t \"\n\t\t\t\t\t+ stockItem.getProduct().getProductName() + \" \\t\\t\\t Subtotal: \\t\\u20ac\"\n\t\t\t\t\t+ (stockItem.getProduct().getRetailPrice() * stockItem.getQuantity());\n\t\t}\n\n\t\torderDetailsMessage += \"\\n\\nCUSTOMER ID: \" + order.getPerson().getId()\n\t\t\t\t+ \"\\nPersonal Details: \";\n\t\torderDetailsMessage += \"\\n Name: \\t\" + order.getPerson().getName();\n\t\torderDetailsMessage += \"\\n Phone: \\t\" + order.getPerson().getContactNumber();\n\t\torderDetailsMessage += \"\\n Address: \\t\" + order.getPerson().getAddress();\n\t\torderDetailsMessage += \"\\n\\nThe total order value is \\t\\u20ac\"\n\t\t\t\t+ order.getGrandTotalOfOrder() + \"\\n\";\n\n\t\tObject[] options = { \"OK\", shownOption };\n\t\tint n = JOptionPane.showOptionDialog(null, orderDetailsMessage, \"ORDER ID: \"\n\t\t\t\t+ (order.getId()) + \" STAFF ID: \" + order.getCurrentlyLoggedInStaff().getId()\n\t\t\t\t+ \" STATUS : \" + status /* order.isStatus() */, JOptionPane.YES_NO_OPTION,\n\t\t\t\tJOptionPane.PLAIN_MESSAGE, null, options, options[0]);\n\t\tif (n == 1) {\n\t\t\torder.setStatus(true);\n\t\t}\n\t}",
"public void display() {\n System.out.println(\"Displaying Order properties:\\n Order ID number: \" + getOrderID() + \"\\n Customer ID Number: \" + getCustomerID() + \"\\n Order Status: \" + getStatus());\n }",
"public void showCustomerOrders() {\n\t\ttextArea.setText(\"\");\n\t\tfor (int i = 0; i < driver.getOrderDB().getCustomerOrderList().size(); i++) {\n\t\t\tOrder order = (driver.getOrderDB().getCustomerOrderList().get(i));\n\t\t\ttextArea.append(\"Order \" + order.getId() + \" was created by \"\n\t\t\t\t\t+ order.getCurrentlyLoggedInStaff().getName() + \"\\nCustomer ID : \"\n\t\t\t\t\t+ ((Customer) order.getPerson()).getId() + \"\\nItems in this order :\");\n\t\t\tfor (int j = 0; j < order.getOrderEntryList().size(); j++) {\n\t\t\t\tStockItem stockItem = order.getOrderEntryList().get(j);\n\t\t\t\ttextArea.append(\"\\n \" + stockItem.getQuantity() + \" \"\n\t\t\t\t\t\t+ stockItem.getProduct().getProductName() + \" \"\n\t\t\t\t\t\t+ (stockItem.getProduct().getRetailPrice() * stockItem.getQuantity()));\n\t\t\t}\n\t\t\ttextArea.append(\"\\nThe total order value is \" + order.getGrandTotalOfOrder() + \"\\n\\n\\n\");\n\t\t}\n\t}",
"public void view() {\n\t\t\t\n\t\t\tSystem.out.println(\"Poping up window to show each order of customer @ AdminSaleController\");\n\t\t\tCustomerOrderMain vo = new CustomerOrderMain();\n\t\t vo.start(ps);\n\t\t\t\n\t\t}",
"void showOrdersText();",
"private void requestOrderDetail() {\n\n ModelHandler.OrderRequestor.requestOrderDetail(client, mViewData.getOrder().getId(), (order) -> {\n mViewData.setOrder(order);\n onViewDataChanged();\n }, this::showErrorMessage);\n }",
"@GetMapping(\"/order\")\n\t public String getAllOrders() {\n\t \tList<Order> orders = oService.getAllOrers();\n\t StringBuffer ordertext = new StringBuffer();\n\t orders.parallelStream().forEach(ord->{\n\t \t ordertext.append(\"<tr><td>\"+ord.getOrdid()+\"</td>\") ;\n\t ordertext.append(\"<td><span class=\\\"badge badge-secondary\\\">\"+ord.getPaymentstatus()\n\t +\"</span></td>\") ;\n\t ordertext.append(\"<td>\"+ord.getPaymentgroup()+\"</td>\") ; \n\t ordertext.append(\"<td><span class=\\\"badge badge-success\\\">\"+ord.getOrdstatus()+\"</span></td>\");\n\t ordertext.append(\"<td>\"+ord.getOrderdate()+\"</td>\") ;\n\t ordertext.append(\"<td>\"+ord.getTotal()+\"</td>\") ;\n\t ordertext.append(\"<td><span class=\\\"fa fa-eye\\\" style=\\\"cursor:pointer;\\\" onclick=\\\"showprd('\"+ord.getOrdid()+\"')\\\" title=\\\"view details\\\"> </span>\") ;\n\t ordertext.append(\"<span class=\\\"fa fa-remove\\\" style=\\\"cursor:pointer;\\\" onclick=\\\"\\\" title=\\\"cancel\\\"></span></td>\") ;\n\t });\n\t return ordertext.toString() ;\n\t }",
"public void listOrders() {\n\t\tSystem.out.println(\"\\nMostrant tots els orders\");\n\t\tObjectSet<Order> orders = db.query(Order.class);\n\t\torders.stream()\n\t\t\t.peek(System.out::println)\n\t\t\t.flatMap(o -> o.getDetails().stream())\n\t\t\t.forEach(System.out::println);\n\t}",
"private void printCreateOrderMenu()\n {\n System.out.println(\"\");\n System.out.println(\"*** Opret Salg ***\");\n System.out.println(\"(0) Tilbage\");\n System.out.println(\"(1) Tilføj Medarbejder\");\n System.out.println(\"(2) Tilføj Kunde\");\n System.out.println(\"(3) Tilføj Produkt\");\n System.out.println(\"(4) Bekræft\");\n System.out.print(\"Valg: \");\n }",
"public String displayOrderList(){\r\n // display = addFood() + \"\\n\" + addDrink() + \"\\n\" + addDessert();\r\n ArrayList<String> output = new ArrayList<>(); \r\n for(int i =0; i < allOrder.size(); i++){\r\n output.add(allOrder.get(i));\r\n }\r\n return String.valueOf(output);\r\n }",
"public void displayOrders(HashMap<Integer, Order> orders) {\n Set<Integer> orderNumbers;\n \n orderNumbers = orders.keySet();\n for (var orderNumber: orderNumbers) {\n ui.say(\"\\n======== ORDER \" + orderNumber + \" ========\");\n displayOrder(orders.get(orderNumber));\n }\n }",
"public void showOrderGui(int ID) throws OrderNotFoundException;",
"@GetMapping(\"/view-all-order\")\n\tpublic List<OrderDTO> viewAllOrders() {\n\t\tLOGGER.info(\"view-all-Order URL is opened\");\n\t\tLOGGER.info(\"view-all-Order() is initiated\");\n\t\tLOGGER.info(\"view-all-Order() has executed\");\n\t\treturn orderService.getAllOrders();\n\t}",
"public String showCurrentOrder(){\n stringBuilder = new StringBuilder();\n for (int i = 0; i < OrderManager.getInstance().getOrder().size(); i++) {\n stringBuilder.append((i + 1) + \". \" + OrderManager.getInstance().getOrder().get(i).toString() + \"\\n\");\n }\n return stringBuilder.toString();\n }",
"void showOrderText(int ID) throws OrderNotFoundException;",
"public void listOrder()\r\n {o.listOrder();}",
"void showOrdersGui();",
"private void printCurrentOrderMenu(Shop shop) {\n System.out.println(shop.orderListToString());\n }",
"public String navigatePurchaseOrderList() {\n Product attachedSelected = this.getAttachedSelected();\n\n if (attachedSelected != null) {\n purchaseOrderListController.setItems(this.getAttachedSelected().getPurchaseOrderList());\n purchaseOrderListController.setLazyItems(this.getAttachedSelected().getPurchaseOrderList());\n }\n return this.mobilePageController.getMobilePagesPrefix() + \"/crud/purchaseOrder/index?faces-redirect=true\";\n }",
"public static void cylinderorderlist(){\n\t\tAccount a = (Account) Cache.get(\"authUser\");\r\n\t\t\r\n\t\t\r\n\t\tList<OrderCylinder> o = OrderCylinder.findAll();\r\n\t\t\r\n\t\tSystem.out.println(\"The Dealers for Whom Order has beed placed \"+ o);\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"Current Dealer Logged in\"+a);\r\n\t\t\r\n\t\t// Get the Dealer Details of him\r\n\t\tDealer d = Dealer.find(\"byDealershipId\",a.uniquenumber).first();\r\n\t\t\r\n\t\tSystem.out.println(\"Dealer for the Account\"+d);\r\n\t\t// Now, get the Ordered Cylinders\r\n\t\tList<OrderCylinder> l = OrderCylinder.find(\"byDealerId\", d).fetch();\r\n\t\t\r\n\t\t//Orders placed for the Dealer are as follows\r\n\t\t\r\n\t\tSystem.out.println(\"Orders Placed for Dealer are as follows\"+l);\r\n\t\t\r\n\t\trender(a,l);\r\n\t\t\r\n\t}",
"private void printUpdateOrderMenu()\n {\n System.out.println(\"\");\n System.out.println(\"*** Opdater Salg ***\");\n System.out.println(\"(0) Tilbage\");\n System.out.println(\"(1) Opdater Medarbejder\");\n System.out.println(\"(2) Opdater Kunde\");\n System.out.println(\"(3) Opdater Produkt\");\n System.out.println(\"(4) Tilføj Produkt\");\n System.out.println(\"(5) Bekræft\");\n System.out.print(\"Valg: \");\n }",
"void getOrders();",
"public void retrieveOrderContentById_Order(int i) {\n\t\tSystem.out.println(\"\\nMostrat detalls del Order \" + i);\n\t\tObjectSet result = db.queryByExample(new Order(i, null, null, null, null));\n\t\t\n\t\tOrder aConsultar = (Order) result.next();\n\t\taConsultar.getDetails().stream()\n\t\t\t\t.forEach(System.out::println);\n\t}",
"public void Show(int _order){\n\t\tSystem.out.println(_order + \": \" + name + \" is at floor #\" + actualFloor + \", he wants to go to floor #\" + targetFloor);\n\t}",
"public void setOrder(Order order){\n this.order = order;\n }",
"@ResponseBody\r\n\t@RequestMapping(\"/list\")\r\n\tpublic PageModel list(HttpServletRequest request, HttpServletResponse response) {\n\t\tPageModel page = PageUtil.getPageModel(Order.class, \"sql.order/getOrderlist\", request);\r\n\t\treturn page;\r\n\t}",
"@GetMapping(\"/order\")\r\n\tprivate ResponseEntity<Object> getAllOrder() \r\n\t{\tOrderDetailsResponse response = new OrderDetailsResponse();\r\n\t\tList<OrderDetailsRequest> ordersDetails = new ArrayList<OrderDetailsRequest>();\r\n\t\tList<OrderDetails> orders = orderService.getAllOrder();\r\n\t\t\r\n\t\tfor(OrderDetails order : orders) {\r\n\t\t\t\r\n\t\t\tOrderDetailsRequest details = new OrderDetailsRequest();\r\n\t\t\tconstructResponseData(order,details);\r\n\t\t\tList<OrderItemDetails> items = restClientService.findByOrderid(order.getId());\r\n\t\t\tdetails.setProductDetails(items);\r\n\t\t\tordersDetails.add(details);\r\n\t\t}\r\n\t\tresponse.setOrders(ordersDetails);\r\n\t\tresponse.setMessage(\"SUCCESS\");\r\n\t\tresponse.setStatus((long) 200);\r\n\t\treturn new ResponseEntity<Object>(response, HttpStatus.OK);\r\n\t}",
"public void print(List<T> order)\n\t{\n\t\tfor (T item : order)\n\t\t{\n\t\t\tSystem.out.println(item);\n\t\t}\n\t}",
"public static void accessoriesorderlist(){\r\n\t\t\r\n\t\tAccount a = (Account) Cache.get(\"authUser\");\r\n\t\tDealer d = Dealer.find(\"byDealershipId\", a.uniquenumber).first();\r\n\t\tif(a != null){\r\n\t\t\tList<OrderAccessories> l = OrderAccessories.find(\"byDealerId\",d ).fetch();\r\n\t\t\trender(l);\r\n\t\t}\r\n\t\telse \r\n\t\t\tDealerControllerMap.pleaselogin();\r\n\r\n\t}",
"public String[] viewOrder(Session session) throws RemoteException{\n\t\tSystem.out.println(\"Server model invokes viewOrder() method\");\n\t\treturn null;\n\t\t\n\t}",
"@SuppressWarnings(\"Duplicates\")\n private double printOrderDetails(@NotNull Order o) {\n printHeader(\"Order #\" + o.getOrderID() + \"\", 60);\n System.out.println(\"Order ID: \" + o.getOrderID());\n System.out.println(\"Order State: \" + ((o.getOrderState() == Order.OrderState.ORDER_PAID) ? \"Paid\" : \"Unpaid\"));\n System.out.println(\"Order Started On: \" + DateTimeFormatHelper.formatMillisToDateTime(o.getCreatedAt()));\n System.out.println(\"Staff Handling Order: \" + ((o.getStaff() == null) ? \"Unknown Staff\" : \"[\" + o.getStaff().getStaffId() + \"] \" + o.getStaff().getStaffName()));\n System.out.println(\"Table Number: \" + ((o.getTable() == null) ? \"Unknown Table\" : o.getTable().getTableNum()));\n System.out.println(\"List of Order Items:\");\n printBreaks(60);\n if (o.getOrderItems().size() == 0) System.out.println(\"No Items in Order\");\n else {\n o.calculateSubtotal(); // Calculate Subtotal\n OrderMenuUI.printOrderItems(o.getOrderItems(), true);\n }\n printBreaks(60);\n // Do final caclulation\n o.calculateSubtotal();\n double tax = 0.07 * o.getSubtotal();\n double total = tax + o.getSubtotal();\n System.out.printf(\"%50s $%-6.2f\\n\", \"Order Subtotal: \", o.getSubtotal());\n System.out.printf(\"%50s $%-6.2f\\n\", \"GST (7%): \", tax);\n printBreaks(60);\n System.out.printf(\"%50s $%-6.2f\\n\", \"Total: \", total);\n printBreaks(60);\n System.out.println(\"\\n\");\n return total;\n }",
"public Order viewOrders() {\r\n\t\tEntityManager em = emfactory.createEntityManager();\r\n\t\tem.getTransaction().begin();\r\n\t\t//Order nextOrder = \r\n\t\treturn nextOrder;\r\n\t}",
"private void viewOrder() {\r\n\r\n System.out.println();\r\n System.out.println(\" View Orders\");\r\n System.out.println();\r\n\r\n\r\n //asks user to select which variable they would like to search by\r\n Scanner scanner = new Scanner(System.in);\r\n\r\n System.out.println(\"What would you like to search by: \");\r\n System.out.println(\" a. Product ID \\n b. Customer Email \\n c. Customer Location \\n d. Order Date \\n\");\r\n String attribute = console.next();\r\n\r\n\r\n //if a is selected, enter the product id to search for\r\n if (attribute.equals(\"a\")){\r\n System.out.println(\"Enter the product id you would like to search for: \");\r\n String searchProductId = console.next();\r\n OrderItem pIdSearchingFor = null;\r\n int count1 = 0;\r\n for (int i=0; i<orderInfo.size(); i++ ){\r\n if (searchProductId.equalsIgnoreCase(orderInfo.get(i).getProductId())) { // if product id is found print data\r\n \tpIdSearchingFor = orderInfo.get(i); \r\n \r\n \r\n System.out.println();\r\n\r\n System.out.println(\"Product ID: \" + pIdSearchingFor.getProductId()+ \" \"\r\n + \"Quantity: \" + pIdSearchingFor.getQuantity()+ \" \"\r\n + \"Customer Email: \" + pIdSearchingFor.getCustomerEmail()+ \" \"\r\n + \"Customer Zip Code: \" + pIdSearchingFor.getCustomerLocation()+ \" \"\r\n + \"Order Date: \" + pIdSearchingFor.getOrderDate());\r\n \r\n \r\n }\r\n \r\n else{\r\n count1++; //if product id is not found, add to count and compare to array size. If greater than or equal display product id not found\r\n if(count1 >= orderInfo.size()){\r\n System.out.println();\r\n System.out.println(\"Product ID Not Found.\");\r\n System.out.println();\r\n }\r\n}\r\n }\r\n //prompt to continue viewing orders or exit program\r\n System.out.println();\r\n System.out.println(\"Would you like to continue viewing orders? Enter yes or no: \");\r\n String cont = console.next();\r\n if(cont.equalsIgnoreCase(\"yes\")){\r\n viewOrder();\r\n }\r\n\r\n }\r\n //if b is selected enter the customer email\r\n else if(attribute.equals(\"b\")) {\r\n System.out.println(\"Enter the Customer Email you would like to search for: \");\r\n String searchCustomerEmail = console.next();\r\n OrderItem custSearchingFor = null;\r\n int count2 = 0;\r\n for (int j=0; j<orderInfo.size(); j++ ){\r\n if (searchCustomerEmail.equalsIgnoreCase(orderInfo.get(j).getCustomerEmail())) { // if customer email is found print data\r\n custSearchingFor = orderInfo.get(j); \r\n\r\n \r\n System.out.println();\r\n\r\n System.out.println(\"Product ID: \" + custSearchingFor.getProductId()+ \" \"\r\n + \"Quantity: \" + custSearchingFor.getQuantity()+ \" \"\r\n + \"Customer Email: \" + custSearchingFor.getCustomerEmail()+ \" \"\r\n + \"Customer Zip Code: \" + custSearchingFor.getCustomerLocation()+ \" \"\r\n + \"Order Date: \" + custSearchingFor.getOrderDate());\r\n \r\n \r\n } \r\n else{\r\n count2++; //if email is not found, add to count and compare to array size. If greater than or equal display email not found\r\n if(count2 >= orderInfo.size()){\r\n System.out.println();\r\n System.out.println(\"Email Not Found.\");\r\n System.out.println();\r\n }\r\n \r\n }\r\n }\r\n //prompt to continue viewing orders or exit program\r\n System.out.println();\r\n System.out.println(\"Would you like to continue viewing orders? Enter yes or no: \");\r\n String cont = console.next();\r\n if(cont.equalsIgnoreCase(\"yes\")){\r\n viewOrder();\r\n }\r\n\r\n }\r\n //if c is selected enter the customer zip code\r\n else if(attribute.equals(\"c\")) {\r\n System.out.println(\"Enter the Customer ZIP code you would like to search for: \");\r\n String searchCustomerLoc = console.next();\r\n OrderItem locSearchingFor = null;\r\n int count3 = 0;\r\n for (int j=0; j<orderInfo.size(); j++ ){\r\n if (searchCustomerLoc.equalsIgnoreCase(orderInfo.get(j).getCustomerLocation())) { // if zip code is found display data\r\n \tlocSearchingFor = orderInfo.get(j); \r\n\r\n \r\n System.out.println();\r\n\r\n System.out.println(\"Product ID: \" + locSearchingFor.getProductId() + \" \"\r\n + \"Quantity: \" + locSearchingFor.getQuantity() + \" \"\r\n + \"Customer Email: \" + locSearchingFor.getCustomerEmail() + \" \"\r\n + \"Customer Zip Code: \" + locSearchingFor.getCustomerLocation() + \" \"\r\n + \"Order Date: \" + locSearchingFor.getOrderDate());\r\n\r\n }\r\n \r\n \r\n else{\r\n count3++; //if zip code is not found, add to count and compare to array size. If greater than or equal display zip code not found\r\n if(count3 >= orderInfo.size()){\r\n System.out.println();\r\n System.out.println(\"Zip Code Not Found.\");\r\n System.out.println();\r\n }\r\n }\r\n }\r\n //prompt to continue viewing orders or exit program\r\n System.out.println();\r\n System.out.println(\"Would you like to continue viewing orders? Enter yes or no: \");\r\n String cont = console.next();\r\n if(cont.equalsIgnoreCase(\"yes\")){\r\n viewOrder();\r\n }\r\n\r\n }\r\n\r\n //if d is selected enter the customer order date\r\n else if (attribute.equals(\"d\")){\r\n System.out.println(\"Enter the date of the order you would like to search for in the format(Year-month-day e.g. 2020-01-13): \");\r\n String searchOrderDate = console.next();\r\n OrderItem dateSearchingFor = null;\r\n int count4 = 0;\r\n for (int k=0; k<orderInfo.size(); k++ ){\r\n if (searchOrderDate.equalsIgnoreCase(orderInfo.get(k).getOrderDate())) { // if date is found display data\r\n \tdateSearchingFor = orderInfo.get(k); \r\n\r\n \r\n System.out.println();\r\n\r\n System.out.println(\"Product ID: \" + dateSearchingFor.getProductId()+ \" \"\r\n + \"Quantity: \" + dateSearchingFor.getQuantity() + \" \"\r\n + \"Customer Email: \" + dateSearchingFor.getCustomerEmail() + \" \"\r\n + \"Customer Zip Code: \" + dateSearchingFor.getCustomerLocation() + \" \"\r\n + \"Order Date: \" + dateSearchingFor.getOrderDate());}\r\n \r\n \r\n \r\n else{\r\n count4++; //if date is not found, add to count and compare to array size. If greater than or equal display date not found\r\n if(count4 >= orderInfo.size()){\r\n System.out.println();\r\n System.out.println(\"Order Date Not Found.\");\r\n System.out.println();\r\n }\r\n \r\n }\r\n }\r\n //prompt to continue viewing orders or exit program\r\n System.out.println();\r\n System.out.println(\"Would you like to continue viewing orders? Enter yes or no: \");\r\n String cont = console.next();\r\n if(cont.equalsIgnoreCase(\"yes\")){\r\n viewOrder();\r\n }\r\n }\r\n }",
"public void printOrder(){\n System.out.println(count);\n \n double price=0;\n for (product object : this.pro_o) {\n System.out.println(object.getName() + \" quantity : \" + object.getQuantity()+\" price : \" + object.getPrice());\n price+=object.getQuantity()*object.getPrice();\n }\n System.out.println(\"total : \" + price );\n }",
"@Override\n\tpublic void getSpecificOrders() {\n\t\t\n\t}",
"@Override\n\tpublic void getSpecificOrders() {\n\t\t\n\t}",
"public void displayOrder(Connection connection, Logger logger) throws ApplicationRuntimeException {\n productDao.display(connection, logger);\n\n }",
"@Override\n\tpublic List<Order1> showAllOrder1() {\n\t\treturn order1Mapper.selAllOrder1();\n\t}",
"private void setOrderField() \n\t{\n\t\tString size = currentOrder.get(\"size\");\n\t\tString temperature = currentOrder.get(\"drinkTemperature\");\n\t\tString drinkName = currentOrder.get(\"name\");\n\t\t\n\t\torderField.setText(\"Order Status: \" + size + \" \" + temperature + \" \" + drinkName);\n\t}",
"@Path(\"showorder\")\n @GET\n @Produces(MediaType.TEXT_PLAIN)\n public String getOrder(@QueryParam(\"jsonpcallback\") String jsonpcallback) {\n return jsonpcallback + \"(\" + os.getAllOrders().toJSONString() + \")\";\n }",
"public void printOrderItem(){\r\n\t\tSystem.out.print(this.quantity+\" x \"+this.menuItem.getName()+\" ---- \");\r\n\t\tSystem.out.printf(\"$%.2f\\n\",this.calculatePrice());\r\n\t}",
"public void setOrder(List<Order> order) {\n this.order = order;\n }",
"public boolean showOrders(Connection conn, int order_no) {\r\n\t\ttry {\r\n\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\tResultSet rset = stmt.executeQuery(\"select * from order_XXXX where orderno=\" + order_no);\r\n\r\n\t\t\t// Print the no and name\r\n\t\t\tSystem.out.println(\"Order No\\t\\t\\tItem No\\t\\t\\tOrder Quantity\\t\\t\\tOrder Date\\t\\t\\tCustomer No\");\r\n\t\t\tSystem.out.println(\"_________________________________________________________________\");\r\n\t\t\tif (!rset.isBeforeFirst())\r\n\t\t\t\treturn true;\r\n\t\t\telse {\r\n\t\t\t\twhile (rset.next()) {\r\n\t\t\t\t\tSystem.out.println(rset.getInt(1) + \"\\t\\t\\t\" + rset.getInt(2) + \"\\t\\t\\t\" + rset.getInt(3) + \"\\t\\t\\t\"\r\n\t\t\t\t\t\t\t+ rset.getString(4) + \"\\t\\t\\t\" + rset.getString(5));\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public void setOrder(int order) {\n this.order = order;\n }",
"public void setOrder(int order) {\n this.order = order;\n }",
"@Override\n public void onClick(View v) {\n CommonUtils.sendMsg(\"获取订单详情\", DeliveryActivity.SHOW_LOADING_TEXT, handler);\n\n ApisManager.getOrderDetailInfoByOrderId(odi.order_id, new ApiCallback() {\n @Override\n public void success(Object object) {\n CommonUtils.sendMsg(\"\", DeliveryActivity.HIDE_LOADING, handler);\n OrderDetailInfo odi = new OrderDetailInfo();\n JSONObject obj = (JSONObject) object;\n JSONObject objSO = obj.getJSONObject(\"store_order\");\n StoreOrder so = com.alibaba.fastjson.JSONObject.parseObject(CommonUtils.converBooleanToInt(objSO.toString()), StoreOrder.class);\n odi.store_order = so;\n odi.take_serial_number = so.take_serial_number;\n odi.list_charge_items_all = so.order_items;\n\n Message msg = new Message();\n msg.what = DeliveryActivity.SHOW_ORDER_DETAIL_INFO;\n msg.obj = odi;\n handler.sendMessage(msg);\n }\n\n @Override\n public void error(BaseApi.ApiResponse response) {\n CommonUtils.sendMsg(\"\", DeliveryActivity.HIDE_LOADING, handler);\n CommonUtils.sendMsg(response.error_message, DeliveryActivity.SHOW_ERROR_MESSAGE, handler);\n }\n });\n\n }",
"@GetMapping(\"/checkOrder\")\n public String fetchOderList(Model model){\n List<OrderDetails> orderList = sportyShoesService.fetchOderList();\n model.addAttribute(\"orderList\", orderList);\n model.addAttribute(\"appName\", appName);\n return \"fetchOrderDetails\";\n }",
"public boolean showOrders(Connection conn) {\r\n\t\ttry {\r\n\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\tResultSet rset = stmt.executeQuery(\"select * from order_XXXX\");\r\n\r\n\t\t\t// Print the no and name\r\n\t\t\tSystem.out.println(\"Order No\\t\\t\\tItem No\\t\\t\\tOrder Quantity\\t\\t\\tOrder Date\\t\\t\\tCustomer No\");\r\n\t\t\tSystem.out.println(\"_________________________________________________________________\");\r\n\t\t\tif (!rset.isBeforeFirst())\r\n\t\t\t\treturn true;\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\twhile (rset.next()) {\r\n\t\t\t\t\tSystem.out.println(rset.getInt(1) + \"\\t\\t\\t\" + rset.getInt(2) + \"\\t\\t\\t\" + rset.getInt(3) + \"\\t\\t\\t\"\r\n\t\t\t\t\t\t\t+ rset.getString(4) + \"\\t\\t\\t\" + rset.getString(5));\r\n\t\t\t\t}\r\n\t\t\t return false;\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public void setOrder(Integer order) {\n this.order = order;\n }",
"public void setOrder(Integer order) {\n this.order = order;\n }",
"@RequestMapping(\"/getAllOrders\")\n public List<Order> getAllOrders(){\n System.out.println(\"getAllOrders\");\n System.out.println(SessionUtil.getAuth());\n return orderService.getAllOrders();\n }",
"public Order viewOrder(int on) {\r\n\t\tEntityManager em = emfactory.createEntityManager();\r\n\t\tem.getTransaction().begin();\r\n\t\tOrder found = em.find(Order.class, on);\r\n\t\tem.close();\r\n\t\treturn found;\r\n\t}",
"public void makeOrder(Order order) {\n for(Order_Item x : order.getOrdered()){\n TableRow item_row = build_row(x.getItem().getName(), String.valueOf(x.getQuantity()), (x.getPrice()*x.getQuantity()) + \"€\");\n orderLayout.addView(item_row);\n }\n\n refreshPriceView();\n }",
"public void orderSummaryPage(View v){\n\n String order = gatherOrder(v);\n\n Intent redirect = new Intent(this, SummaryActivity.class);\n redirect.putExtra(EXTRA_MESSAGE,order);\n startActivity(redirect);\n }",
"public void showOrder() {\n warning.setText(\"\");\n String orderNumber = orderNo.getText();\n if (orderNumber.equals(\"\")) {\n warning.setText(emptyOrderNum);\n } else if (!Validation.isValidOrderNumber(orderNumber)) {\n warning.setText(invalidOrderNum);\n } else {\n PlanDAO planDAO = new PlanDAO();\n UserDAO userDAO = new UserDAO();\n User user = userDAO.getUser(logname.getText());\n try {\n rsAllEntries = planDAO.showByOrderNumber(orderNumber, user);\n } catch (NullPointerException e) {\n warning.setText(\"No data to display\");\n }\n String productType = \"\";\n String worker = \"\";\n String workersList[] = new String[6];\n String plTime = \"\";\n String actTime = \"\";\n String orderStatus = \"\";\n try {\n if (rsAllEntries.next()) {\n ObservableList order = FXCollections.observableArrayList();\n for (int i = 1; i <= rsAllEntries.getMetaData().getColumnCount(); i++) {\n order.add(rsAllEntries.getString(i));\n }\n productType = (String) order.get(1);\n plTime = (String) order.get(3);\n actTime = (String) order.get(4);\n orderStatus = (String) order.get(5);\n worker = (String) order.get(2);\n int countCommas = 0;\n if (worker.contains(\",\")) {\n Pattern pattern = Pattern.compile(\"[^,]*,\");\n Matcher matcher = pattern.matcher(worker);\n while (matcher.find()) {\n countCommas++;\n }\n System.out.println(\"Number of commas: \" + countCommas);\n String[] parts = worker.split(\", \", countCommas + 1);\n for (int i = 0; i < countCommas + 1; i++) {\n workersList[i] = parts[i];\n System.out.println(i + \". parts \" + parts[i]);\n System.out.println(\"workersList \" + workersList[i]);\n }\n } else workersList[0] = worker;\n System.out.println(\"Order data added \" + order);\n } else {\n warning.setText(\"No data to display\");\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Failure getting order data from SQL \");\n ex.printStackTrace();\n }\n orderNo.setText(orderNumber);\n rbListAddElement();\n for (int i = 0; i < rbProductType.size(); i++) {\n selectRadioButton(rbProductType.get(i), productType);\n }\n cbListAddElement();\n for (int i = 0; i < cbWorker.size(); i++) {\n selectCheckBox(cbWorker.get(i), workersList);\n }\n plannedTime.setText(plTime);\n actualTime.setText(actTime);\n comboStatus.valueProperty().set(orderStatus);\n }\n }",
"void setOrder(int order){\r\n\t\t\tthis.order = order;\r\n\t\t}",
"public static void printOrderTotals() {\r\n System.out.println(\"\");\r\n System.out.println(\"********ORDER TOTALS********\");\r\n System.out.println(\"Total Pizza Sliders Ordered: \" + pizzaOrdered);\r\n System.out.println(\"Total Roast Beef Sliders Ordered: \" + roastOrdered);\r\n System.out.println(\"***************************\");\r\n System.out.println(\"\");\r\n }",
"public void provideOrderAccess() {\n\t\tint choiceOrder = View.NO_CHOICE;\n\t\t// get customer id and date for the order\n\t\tLong customerId = view.readIDWithPrompt(\"Enter Customer ID for Order: \");\n\t\tif (customerId == null) {\n\t\t\tSystem.out.println(\"Error: Customer Not Found.\");\n\t\t}\n\t\tLong orderId = view.readIDWithPrompt(\"Enter new Unique ID for Order: \");\n\t\tDate currDate = new Date();\n\n\t\t// create the order,\n\t\t// add the orderID to Customer\n\t\tatMyService.placeOrder(customerId, orderId, currDate);\n\n\t\t// enter loop to add items to the order\n\t\tArrayList<Long[]> items = new ArrayList<Long[]>();\n\t\twhile (choiceOrder != View.ENDORDER) {\n\t\t\t// display the order menu\n\t\t\tview.menuOrder();\n\t\t\tchoiceOrder = view.readIntWithPrompt(\"Enter choice: \");\n\t\t\tswitch (choiceOrder) {\n\t\t\t\tcase View.ADD_ORDER_ITEM:\n\t\t\t\t\tLong itemID = view.readIDWithPrompt(\"Enter Item ID: \");\n\t\t\t\t\t// note: Needs to be Long for Long[] below. \n\t\t\t\t\t//Also, i DO want to use readID rather than readInt then convert to long,\n\t\t\t\t\t// because I do not want amt to be negative. \n\t\t\t\t\tLong amt = view.readIDWithPrompt(\"Enter Amount: \");\n\t\t\t\t\t// check to see if the item exists and is in stock\n\t\t\t\t\tItem temp = atMyService.findItem(itemID);\n\t\t\t\t\tif (temp == null) {\n\t\t\t\t\t\tSystem.out.println(\"Item '\" + itemID + \"' not found. Item skipped.\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ((temp.getStock() - amt) < 0) {\n\t\t\t\t\t\t\tSystem.out.println(\"There is only '\" + temp.getStock() + \"' of this item left. Please try again.\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// add the items to the arrayList\n\t\t\t\t\t\t\tLong[] toAdd = { itemID, amt };\n\t\t\t\t\t\t\titems.add(toAdd);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase View.ENDORDER:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// convert arrayList to array, add to orders.\n\t\tif (!(items.isEmpty())) {\n\t\t\tLong[][] array = new Long[items.size()][2];\n\t\t\tfor (int i = 0; i < items.size(); i++) {\n\t\t\t\tarray[i][0] = items.get(i)[0];\n\t\t\t\tarray[i][1] = items.get(i)[1];\n\t\t\t}\n\t\t\tatMyService.addOrderItems(orderId, array);\n\t\t}\n\t}",
"public void ViewOrder(ArrayList<Order>order, Scanner in,ArrayList<Orderdetails>details,Order ORDER) throws FileNotFoundException {\r\n\ttry {\r\n\t\tOrderdetails od = new Orderdetails(ORDER);\r\n\t\tod.ViewOrder(order, in, details);\r\n\t}\r\n\tcatch(RuntimeException ex) {\r\n\t\tSystem.out.println(\"Error input, pls retry\");\r\n\t}\r\n\t}",
"@GetMapping(\"/view-order/{id}\")\n\tpublic ResponseEntity<Object> getOrderById(@PathVariable Long id) throws OrderNotFoundException {\n\t\tLOGGER.info(\"view-Order URL is opened\");\n\t\tLOGGER.info(\"viewOrder() is initiated\");\n\t\tOrderDTO orderDTO = orderService.getOrderById(id);\n\t\tLOGGER.info(\"viewOrder() has executed\");\n\t\treturn new ResponseEntity<>(orderDTO, HttpStatus.OK);\n\t}",
"public List getOrderDetails(OrderDetail orderDetail);",
"@RequestMapping(value = \"/order/list\")\n\tpublic String list(Model model, HttpSession session, HttpServletRequest request, RedirectAttributes ra) {\n\n\t\tString return_page = \"\";\n\n\t\tCostumer c = new Costumer();\n\t\tString CID_string = request.getParameter(\"cid\");\n\n\t\tif (CID_string != null && StringUtils.isNumeric(CID_string)) {\n\t\t\t\n\t\t\tCID_string.toUpperCase();\n\t\t\tInteger CID = Integer.valueOf(CID_string);\n\t\t\tc.setCID(CID);\n\t\t\t\n\t\t\tCostumer costumer = this.costumerService.getCostumer(c);\n\n\t\t\tif (costumer == null) {\n\n\t\t\t\tString CID_str = (\"000000\" + CID).substring(CID.toString().length());\n\t\t\t\tra.addFlashAttribute(\"msgRetornoTipo\", \"warning\");\n\t\t\t\tra.addFlashAttribute(\"msgRetorno\", \"Client #\" + CID_str + \" not found.\");\n\n\t\t\t\treturn_page = \"redirect:/\";\n\t\t\t} else {\n\n\t\t\t\tList<Order> ordersList = this.orderService.getOrdersByClient(costumer);\n\n\t\t\t\tmodel.addAttribute(\"costumer\", costumer);\n\t\t\t\tmodel.addAttribute(\"ordersList\", ordersList);\n\n\t\t\t\treturn_page = \"order_list\";\n\t\t\t}\n\t\t} else {\n\t\t\tif (CID_string == null) CID_string = \"\";\n\t\t\tra.addFlashAttribute(\"msgRetornoTipo\", \"warning\");\n\t\t\tra.addFlashAttribute(\"msgRetorno\", \"Client \" + CID_string + \" not found.\");\n\n\t\t\treturn_page = \"redirect:/\";\n\t\t}\n\n\t\treturn return_page;\n\t}",
"private String getOrderDetails(Order order) {\n String message = getString(R.string.total) + \"\\n\" + getString(R.string.name) + \": \" + order.getCustomerName() +\n \"\\n\" + getString(R.string.add_cream) + \"? \" + String.valueOf(order.isHasWhippedCream()) +\n \"\\n\" + getString(R.string.add_chocolate) + \"? \" + String.valueOf(order.isHasChocolate()) +\n \"\\n\" + getString(R.string.quantity) + \": \" + order.getCupsNumber() + \"\\n\" + getString(R.string.resut) +\n \": $\" + MainActivity.calculatePrice(order) + \"\\n\" + getString(R.string.thanks) + \"!\";\n return message;\n }",
"@Override\n\tpublic ActionForward execute(HttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\tActionForward forward=null;\n\t\t\n\t\tint order_num=Integer.parseInt(request.getParameter(\"order_num\"));\n\t\t\n\t\tOrderDetailSvc orderDetailSvc=new OrderDetailSvc();\n\t\tPro_order order = orderDetailSvc.getOrder(order_num);\n\t\tArrayList<OrderView> orderItemList = orderDetailSvc.getItemList(order_num);\n\t\t\n\t\trequest.setAttribute(\"order\", order);\n\t\trequest.setAttribute(\"itemList\", orderItemList);\n\t\t\n\t\tforward = new ActionForward(\"/order/myOrderDetail.jsp\",false);\n\t\t\n\t\treturn forward;\n\t}",
"@Override\n public JSONObject viewOrderByDirector() {\n return in_orderformdao.viewOrderFormByDirector();\n }",
"public void setOrder(int order) {\n\t\tthis.order = order;\n\t}",
"public List<OrderDetail> getOrderDetailByOrder(Long orderId);",
"@Override\n\tpublic void getOrders() {\n\t\t\n\t}",
"public void setOrder(Integer order) {\n this.order = order;\n }",
"private static void placeOrder() {\n System.out.println();\n System.out.println(\"Menu : \");\n for (int i = 0; i < menuItems.length; i++) {\n System.out.printf(\"%2d. %-30s Price: %8.2f Baht%n\", i + 1, menuItems[i], menuPrices[i]);\n }\n System.out.println();\n\n int orderNo = getIntReply(\"What would you like to menuOrder (by menu number)\");\n if (orderNo > menuOrder.length || orderNo == -1) {\n System.out.println(\"Invalid menu number\");\n return;\n }\n\n int amount = getIntReply(\"How many of them\");\n if (amount == -1) return;\n menuOrder[orderNo - 1] += amount;\n\n System.out.printf(\"You've ordered %s for %d piece(s)%n%n\", menuItems[orderNo - 1], menuOrder[orderNo - 1]);\n }",
"public void ordersToDoControl()\n\t{\n\t\tviewOrdersToDo = new OrdersToDoView();\n\t\ttry\n\t\t{\n\t\t\tArrayList<BookInformation> allBooks = adminModel.loadOrdersToDo();\n\t\t\tviewOrdersToDo.showTable(allBooks);\n\t\t}\n\t\tcatch(NullPointerException e)\n\t\t{\n\t\t\tviewOrdersToDo.showMessage(\"Blad polaczenia z baza : \"+ e);\n\t\t}\n\t\tcatch(SQLException e)\n\t\t{\n\t\t\tviewOrdersToDo.showMessage(\"Blad polaczenia z baza : \"+ e);\n\t\t}\n\t\tviewOrdersToDo.showMe();\n\t \n\t\tviewOrdersToDo.setMainMenuActionListener(new ActionListener(){\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0)\n\t\t\t{\n\t\t\t\tAdminController con = new AdminController(adminModel);\n\t\t\t\tcon.adminMainMenuControl();\n\t\t\t\tviewOrdersToDo.closeFrame();\t\n\n\t\t\t}\n\t\t});\n\t\tviewOrdersToDo.setMakeOrderActionListener(new ActionListener(){\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tArrayList<Integer> ordersToDo = viewOrdersToDo.getSelectedOrders();\n\t\t\t\t\tfor(Integer id : ordersToDo)\n\t\t\t\t\t{\n\t\t\t\t\t\tadminModel.confirmOrder(id);\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\tcatch(NullPointerException e)\n\t\t\t\t{\n\t\t\t\t\tviewOrdersToDo.showMessage(\"Blad polaczenia z baza : \"+ e);\n\t\t\t\t}\n\t\t\t\tcatch(SQLException e)\n\t\t\t\t{\n\t\t\t\t\tviewOrdersToDo.showMessage(\"Blad polaczenia z baza : \"+ e);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t}",
"@RequestMapping(\"/getOrderItems\")\n public List<OrderItem> getOrderItems(@RequestParam(\"order_id\") int order_id){\n return orderService.getOrderItems(order_id);\n }",
"public void setOrder(Integer order) {\n\t\tthis.order = order;\n\t}",
"public void setOrderList() {\n\n\t\tint index = 0;\n\t\tlistModel.clear();\n\t\tfor (Order order : driver.getOrderDB().getCustomerOrderList()) {\n\t\t\tlistModel\n\t\t\t\t\t.addElement(textAlignment(\" \" + order.getId(), \"\" + order.getDate(), \"\"\n\t\t\t\t\t\t\t+ order.getPerson().getId(), \"\"\n\t\t\t\t\t\t\t+ order.getCurrentlyLoggedInStaff().getId()));\n\t\t\t// stockList.setSelectedIndex(orderListIndex);\n\t\t\tindex++;\n\t\t}\n\t}",
"private String displayOrder(int number) {\n TextView priceTextView = (TextView) findViewById(R.id.order_summary_text_view);\n EditText myNameText = (EditText) findViewById(R.id.enter_name_view);\n myName = myNameText.getText().toString();\n\n String message = \"Name: \" + myName + \"\\n\" +\n \"Add whipped cream? \" + myCheckedStateWhipped + \"\\n\"+\n \"Add chocolate? \" + myCheckedStateChocolate + \"\\n\"+\n \"Quantity: \" + myQuantity + \"\\n\" +\n \"Total: \" + NumberFormat.getCurrencyInstance().format(number) +\"\\n\";\n priceTextView.setText(message);\n\n return message;\n }",
"public void outputBook(){\n\t\tSystem.out.println(\"\\nOrder book: \");\n\t\tNode position = head.next;\n\t\twhile (position!=null){\n\t\t\tSystem.out.println(position.ord);\n\t\t\tposition=position.next; //next or previous\n\t\t}\n\t}",
"@Override\n\tpublic void eventSelectOrder() {\n\t\t\n\t}",
"public orderView() {\n initComponents();\n }",
"public SMplace_order() {\n initComponents();\n table();\n }",
"public String navigatePurchaseorderheaderList() {\n if (this.getSelected() != null) {\n FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"Purchaseorderheader_items\", this.getSelected().getPurchaseorderheaderList());\n }\n return \"/purchaseorderheader/index\";\n }",
"public show_order(JSONObject jsonObject) {\n if (jsonObject == null) {\n return;\n }\n JSONArray itemsJsonArray = jsonObject.optJSONArray(\"items\");\n if (itemsJsonArray != null) {\n items = new ArrayList<>();\n try {\n pagatination=new pagatination(jsonObject.optJSONObject(\"pagenation\"));\n } catch (Exception e) {\n e.printStackTrace();\n }\n message = jsonObject.optString(\"message\");\n statusCode = jsonObject.optInt(\"status_code\");\n for (int i = 0; i < itemsJsonArray.length(); i++) {\n JSONObject itemsObject = itemsJsonArray.optJSONObject(i);\n {\n try {\n items.add(new Order_getter(itemsObject));\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }\n\n }\n\n\n }\n\n /**\n * Returns all the available property values in the form of JSONObject instance where the key is the approperiate json key and the value is the value of the corresponding field\n */\n\n\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}",
"public void visitRemoteOrderDisplay( DevCat devCat ) {}",
"public void setOrder(String Order) {\n this.Order = Order;\n }",
"public synchronized void PrintDisplayList()\t{\n\t\tSystem.out.print(\"\\n\\tCar Model:\"+getModel()+\"\\n\\tBase Price is:\"\n +getBasePrice());\n\t\tfor(OptionSet Temp: opset)\n System.out.print(Temp.DisplayOptionSet());\n }",
"protected void displayOrderTable(List<ArticleStock> articles) {\n\t\tOrderViewModel model = new OrderViewModel(articles);\n\t\ttable.setModel(model);\n\t}",
"public void myorders() {\r\n\t\t\tdriver.findElement(orders).click();\r\n\t\t\t\r\n\t\t\t}",
"@Override\r\n\tpublic List getOrderList() {\n\t\tList orderList = new ArrayList();\t\r\n\t\tConnection conn = null;\t\t\r\n\t\tStatement stmt = null;\t\t\r\n\t\tResultSet rs = null;\r\n\t\ttry{\r\n Class.forName(\"com.mysql.jdbc.Driver\");\t\t\t\r\n\t\t\tconn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/gwap\",\"root\",\"\");\t\t\t\r\n\t\t\tstmt = conn.createStatement();\t\t\t\r\n\t\t\trs = stmt.executeQuery(\"select * from orderview\");\r\n\t\t\t\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\tOrderview orderview = new Orderview();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\torderview.setLineid(rs.getString(\"lineid\"));\r\n\t\t\t\torderview.setOrderid(rs.getString(\"orderid\"));\r\n\t\t\t\torderview.setCost(rs.getString(\"cost\"));\r\n\t\t\t\torderview.setName(rs.getString(\"name\"));\r\n\t\t orderview.setPaystyle(rs.getString(\"paystyle\"));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\torderList.add(orderview);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception ex){\r\n\t\t\r\n ex.printStackTrace();\t\t\t\r\n\t\t\tthrow new RuntimeException(\"error when querying orders \",ex);\r\n\t\t}\r\n\t\tfinally{\r\n\t\t\ttry {\r\n\t\t\t\trs.close();\r\n\t\t\t\tstmt.close();\r\n\t\t\t\tconn.close();\r\n\t\t\t} catch (Exception ex) {\r\n\t\t\t\tex.printStackTrace();\t\t\t\t\r\n\t\t\t\tthrow new RuntimeException(\"error when querying orders \",ex);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\treturn orderList;\r\n\t}",
"private void RenderCombo()\r\n\t{\r\n\t\tSystem.out.println(\"Setup\");\r\n\t\tList<ProductionOrder> productionOrders = null;\r\n\t\t\t\t\r\n \ttry {\r\n \t\tproductionOrders = this.getProductionOrderService().findProductionOrders(); \r\n \t\tif(productionOrders==null)\r\n \t\t\tSystem.out.println(\"productoinOrders is null\");\r\n\t \t_productionOrderSelect = null;\r\n\t \t_productionOrderSelect = new GenericSelectModel<ProductionOrder>(productionOrders,ProductionOrder.class,\"FormattedDocNo\",\"id\",_access);\r\n\t \tif(_productionOrderSelect==null){\r\n\t \t\tSystem.out.println(\"Setuprender productionOrderselect is null\");\r\n\t \t}\r\n \t}\r\n \tcatch(Exception e)\r\n \t{\r\n \t\t\r\n \t}\r\n \tfinally {\r\n \t\t\r\n \t}\r\n\t}",
"@Test\n\tpublic void getOrderTest() {\n\t\tOrderDTO order = service.getOrder(2);\n\n\t\tassertEquals(3, order.getClientId());\n\t\tassertEquals(\"BT Group\", order.getInstrument().getName());\n\t\tassertEquals(\"BT\", order.getInstrument().getTicker());\n\t\tassertEquals(30.0, order.getPrice(), 1);\n\t\tassertEquals(500, order.getQuantity());\n\t\tassertEquals(OrderType.SELL, order.getType());\n\t}",
"@Test\r\n // @Ignore\r\n public void showOrders()\r\n {\r\n System.out.println(\"----- showOrders -----\");\r\n\r\n OrderRepository orderRepository = new OrderRepository();\r\n orderRepository.entityManager = this.entityManager;\r\n\r\n List<Order> orders = orderRepository.findAll();\r\n for (Order order : orders)\r\n {\r\n System.out.println(order.toDebugString());\r\n for (OrderLine orderLine : order.getOrderLines())\r\n {\r\n System.out.println(\" \" + orderLine.toDebugString());\r\n }\r\n }\r\n }",
"static void displayOrders() {\n\n String customerSearch;\n boolean customerFound = false;\n\n while(!customerFound){\n customerSearch = Validate.readString(ASK_CST_ORDER); // ask for customer to locate their order\n\n Customer temp; // new customer object\n\n for (Customer aCustomerList : customerList) { // loops through the customer list\n\n if (customerSearch.toUpperCase().equals(aCustomerList.getName().toUpperCase())) { // Scenario 1: name is found in the customer list\n\n customerFound = true; // set to true to stop loop\n\n temp = aCustomerList; // sets temp customer object to found object\n\n System.out.println(\"The orders for \" + temp.getName() + \" are: \\n\"); // prints out the name of customer\n\n temp.viewAll(); // prints all orders for that customer\n } else { // Scenario 2: name is not found in the customer list\n\n System.out.println(CST_NAME_ERROR); // print error saying cannot find customer\n }\n }\n }\n }",
"List<Inventory> executeOrder(OrderForm orderForm) throws Exception;",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tHttpSession session = req.getSession(true);\n\t\tOrderDao order = new OrderDao();\n\t\tOrderItemDao orderDetail = new OrderItemDao();\n\t\tString orderAction = req.getParameter(\"orderAction\").toString();\n\t\t\n\t\t\n\t\t// if(orderAction.equals(\"orderAbstract\")) { List list = new ArrayList();\n\t\t \n\t\t String curUserName = session.getAttribute(\"name\").toString();\n\t\t \n\t\t // list = order.selectOrderByName(curUserName);\n\t\t \n\t\t // req.setAttribute(\"orderAbstract\", list);\n\t\t \n\t\t // req.getRequestDispatcher(\"pages/order/orderList.jsp\").forward(req, resp);; }\n\t\t \n\t\t\n\t\t// 1.若orderAction中存放的是orderList,表示查看当前用户所有订单信息\n\t\t\t\t\tif (orderAction.equals(\"orderAbstract\")) {\n\t\t\t\t\t\tList list = new ArrayList();\n\t\t\t\t\t\tString i = req.getParameter(\"i\");// i用于存放当前订单显示页号\n\t\t\t\t\t\tif (i != null)\n\t\t\t\t\t\t\treq.setAttribute(\"i\", i);\n\t\t\t\t\t\t// 取得当前在线用户的订单\n\t\t\t\t\t\tif(curUserName!=null)\n\t\t\t\t\t\t\tlist = order.selectOrderByName(curUserName);\n\t\t\t\t\t\treq.setAttribute(\"orderAbstract\", list);\n\t\t\t\t\t\treq.getRequestDispatcher(\"pages/order/orderList.jsp\")\n\t\t\t\t\t\t\t\t.forward(req, resp);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// 2.若orderAction中存放的是orderDetails,表示请求查看当前订单的详细信息\n\t\t\t\t\t// <a\n\t\t\t\t\t// href=\"OrderServlet?orderAction=orderDetails&orderId=<%=form.getOrderId()%>\">详细信息</a>\n\t\t\t\t\tif (orderAction.equals(\"orderDetail\")) {\n\t\t\t\t\t\t// 指定用户指定订单号(唯一)的资料\n\t\t\t\t\t\t// userName=session.getAttribute(\"name\").toString();\n\t\t\t\t\t\tString orderId = req.getParameter(\"orderId\").toString();\n\t\t\t\t\t\t//由于orderId是订单关键码,故只此一个字段即可筛选出相关资料\n\t\t\t\t\t\tOrderEntity orderAbstract = order.selectOrderByNumber(orderId);\n\t\t\t\t\t\treq.setAttribute(\"orderAbstract\", orderAbstract);\n\t\t\t\t\t\t// 该用户指定某订单号的详细购物清单,1个orderId一定是属于同一个人订购的\n\t\t\t\t\t\tList list = new ArrayList();\n\t\t\t\t\t\tlist = orderDetail.selectOrderDetailByNumber(orderId);\n\t\t\t\t\t\treq.setAttribute(\"orderItems\", list);\n\t\t\t\t\t\treq.getRequestDispatcher(\"pages/order/orderItemList.jsp\")\n\t\t\t\t\t\t\t\t.forward(req, resp);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t if (orderAction.equals(\"orderDelivered\")) {\n\t\t\t\t\t\t\tBoolean b = Boolean.valueOf(req.getParameter(\"deliverySign\"));\n\t\t\t\t\t\t\t// 生成包含已出或未出订单的list\n\t\t\t\t\t\t\tString n = session.getAttribute(\"name\").toString();\n\t\t\t\t\t\t\tList orderDeliveryList = order\n\t\t\t\t\t\t\t\t\t.selectOrderByNameAndDeliverySign(session.getAttribute(\n\t\t\t\t\t\t\t\t\t\t\t\"name\").toString(), b);\n\t\t\t\t\t\t\treq.setAttribute(\"orderDeliveryList\", orderDeliveryList);\n\t\t\t\t\t\t\treq.getRequestDispatcher(\n\t\t\t\t\t\t\t\t\t\"pages/order/orderListDelivery.jsp\").forward(req,resp);\n\t\t\t\t\t\t} \n\t\t\t\t\t \n\t\t\t\t\t if(orderAction.equals(\"selectAllOrder\")){//查询所有订单\n\t\t\t\t\t\t\tList list=new ArrayList();\n\t\t\t\t\t\t\tString i=req.getParameter(\"i\");\n\t\t\t\t\t\t\tif (i!=null)req.setAttribute(\"i\",i);\n\t\t\t\t\t\t\tlist=order.selectAllOrder();\n\t\t\t\t\t\t\treq.setAttribute(\"AllOrder\", list);\n\t\t\t\t\t\t\treq.getRequestDispatcher(\"pages/admin/order/orderSelect.jsp\").forward(req, resp);\n\t\t\t\t\t\t}\n\t}",
"@Path(\"showorderdetails\")\n @GET\n @Produces(MediaType.TEXT_PLAIN)\n public String getOrderDetails(@QueryParam(\"jsonpcallback\") String jsonpcallback) {\n return jsonpcallback + \"(\" + ods.getAllOrderDetails().toJSONString() + \")\";\n }",
"public String getAmountOrderDetailPage()\n\t{\n\t\twaitForVisibility(amountOnDetailPage);\n\t\treturn amountOnDetailPage.getText();\n\t}",
"@Override\n\tpublic ProductVO detailOrderList(int p_num) {\n\t\treturn sql.selectOne(\"detailOrderList\", p_num);\n\t}"
] | [
"0.750585",
"0.74664795",
"0.7430899",
"0.72586435",
"0.72405446",
"0.6974491",
"0.69216055",
"0.69095814",
"0.6720607",
"0.6704338",
"0.67022",
"0.6696287",
"0.66513515",
"0.65977764",
"0.65748876",
"0.6552623",
"0.6522707",
"0.6486609",
"0.6484211",
"0.64792305",
"0.6443252",
"0.6439581",
"0.6417138",
"0.6414303",
"0.6405092",
"0.6344565",
"0.6340156",
"0.63275844",
"0.6320911",
"0.6285918",
"0.6275728",
"0.6265907",
"0.6234485",
"0.6225928",
"0.6189534",
"0.6182642",
"0.6181431",
"0.6175544",
"0.61720985",
"0.61720985",
"0.6171949",
"0.61703855",
"0.6160707",
"0.6153969",
"0.6109743",
"0.6079414",
"0.6076993",
"0.6058101",
"0.6058101",
"0.60437125",
"0.6042649",
"0.60084677",
"0.6004012",
"0.6004012",
"0.6000923",
"0.5993735",
"0.5993421",
"0.5982037",
"0.5971119",
"0.5958503",
"0.59495246",
"0.5947896",
"0.5943528",
"0.5943014",
"0.5938735",
"0.5937758",
"0.59311646",
"0.59279966",
"0.5926496",
"0.5924409",
"0.5923537",
"0.59216493",
"0.59199697",
"0.59147096",
"0.5908329",
"0.5884697",
"0.58776057",
"0.58707994",
"0.5870494",
"0.58665335",
"0.58638626",
"0.5862993",
"0.58546305",
"0.5842443",
"0.5831116",
"0.5830203",
"0.5824128",
"0.58199394",
"0.5799286",
"0.5783634",
"0.57823676",
"0.5780143",
"0.5775399",
"0.57746744",
"0.5768382",
"0.5767665",
"0.5766196",
"0.57647765",
"0.575765",
"0.5747419",
"0.57416993"
] | 0.0 | -1 |
end current chat and give a feedback about problem then go to waiting customers scene | @FXML
public void EndChat(ActionEvent event) throws IOException, SQLException{
FXMLLoader loader = new FXMLLoader();
loader.setLocation(getClass().getResource("FeedBack.fxml"));
Parent root = loader.load();
Scene scene = new Scene(root);
// pass information to FeedBack scene
FeedBackController controller = loader.getController();
controller.initData(selectedCustomer);
Stage window = (Stage)((Node)event.getSource()).getScene().getWindow();
window.setScene(scene);
window.show();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void ChatLeave() {\n\t\t\r\n\t\tClose();\r\n\t}",
"public void leaveChat(){\n toServer.println(\"leavechat\" + \" \" + chatID + \" \" + username);\n toServer.flush();\n gui.dispose();\n clientModel.activeChats.remove(chatID);\n }",
"public void endGameMessage() {\n gameArena.addText(endGameMsg);\n }",
"void closeChat();",
"private void quit()\n\t{\n\t\tapplicationView.showChatbotMessage(quitMessage);\n\t\tSystem.exit(0);\n\t\t\n\t}",
"public void endGame() {\n Player player = playerManager.getWinner();\n MainActivity mainActivity = (MainActivity) this.getContext();\n updateLiveComment(\"Winner : \" + player.getName());\n mainActivity.setAlertDialog(player.getName()+\" Wins !\", \"Congratulations\", true);\n }",
"void conversationEnding(Conversation conversation);",
"public void endMessage()\n\t{\n\t}",
"protected abstract void displayEndMsg(int resultGame);",
"private void showEndMessage()\n {\n showText(\"Time is up - you win!\", 390, 150);\n showText(\"Your final score: \" + healthLevel + \" points\", 390, 170);\n }",
"void sendFinishMessage();",
"private void quit() {\n\t\tmSipSdk = myApplication.getPortSIPSDK();\n\n\t\tif (myApplication.isOnline()) {\n\t\t\tLine[] mLines = myApplication.getLines();\n\t\t\tfor (int i = Line.LINE_BASE; i < Line.MAX_LINES; ++i) {\n\t\t\t\tif (mLines[i].getRecvCallState()) {\n\t\t\t\t\tmSipSdk.rejectCall(mLines[i].getSessionId(), 486);\n\t\t\t\t} else if (mLines[i].getSessionState()) {\n\t\t\t\t\tmSipSdk.hangUp(mLines[i].getSessionId());\n\t\t\t\t}\n\t\t\t\tmLines[i].reset();\n\t\t\t}\n\t\t\tmyApplication.setOnlineState(false);\n\t\t\tmSipSdk.unRegisterServer();\n\t\t\tmSipSdk.DeleteCallManager();\n\t\t}\n\t}",
"public void sendEndGame (){\n connect();\n try{\n doStream.writeUTF(\"GAME_STOP\");\n doStream.writeUTF(currentUser.getUserName());\n } catch (IOException e){\n e.printStackTrace();\n }\n disconnect();\n }",
"private void showFinishMsg() {}",
"public void endGame() {\n dispose();\n System.out.println(\"Thank you for playing\");\n System.exit(0);\n }",
"private void comeBack() {\n if (previousPresence != null) {\n CollaborationConnection connection = CollaborationConnection\n .getConnection();\n sendPresence(connection, previousPresence);\n timerSetAway = false;\n }\n }",
"private void endGame() {\r\n\r\n m_state.setState(State.ENDING_GAME);\r\n\r\n /* find winner */\r\n for(KimTeam team : m_survivingTeams) {\r\n if(team != null) {\r\n if(!team.isOut()) {\r\n m_winner = team;\r\n }\r\n\r\n //remove survivors from m_teams so not to duplicate stats\r\n m_teams[team.m_freq] = null;\r\n }\r\n }\r\n\r\n /* end poll */\r\n if(m_poll != null) {\r\n m_poll.endPoll(m_winner, m_connectionName);\r\n m_poll = null;\r\n }\r\n\r\n /* display scoresheet */\r\n m_botAction.sendArenaMessage(\"--------Base1--------W--L --------Base2--------W--L --------Base3--------W--L --------Base4--------W--L\");\r\n\r\n if(!m_skipFirstRound) {\r\n printFormattedTeams(m_teams, m_numTeams);\r\n m_botAction.sendArenaMessage(\"------------------------- ------------------------- ------------------------- -------------------------\");\r\n }\r\n\r\n printFormattedTeams(m_survivingTeams, 4);\r\n m_botAction.sendArenaMessage(\"-------------------------------------------------------------------------------------------------------\");\r\n\r\n if(m_winner != null) {\r\n m_botAction.sendArenaMessage(\"Winner: \" + m_winner.toString(), 5);\r\n\r\n for(KimPlayer kp : m_winner) {\r\n Player p = m_botAction.getPlayer(kp.m_name);\r\n\r\n if(p != null && p.isPlaying()) {\r\n m_botAction.warpTo(p.getPlayerID(), 512, 277);\r\n }\r\n }\r\n } else {\r\n m_botAction.sendArenaMessage(\"No winner.\");\r\n }\r\n\r\n updateDB();\r\n\r\n /* announce mvp and clean up */\r\n m_botAction.scheduleTask(new TimerTask() {\r\n public void run() {\r\n m_botAction.sendArenaMessage(\"MVP: \" + m_mvp.m_name, 7);\r\n //refreshScoreboard();\r\n cleanUp();\r\n resetArena();\r\n m_state.setState(State.STOPPED);\r\n }\r\n }, 4000);\r\n }",
"void endSinglePlayerGame(String message);",
"public void endGame()\n\t{\n\t\tbuttonPanel.endGameButton.setEnabled(false);\n\t\tstopThreads();\n\t\tsendScore();\n\t}",
"public abstract void displayEndMsg ();",
"public void endGame() {\n\t\twaitingPlayers.addAll(players);\n\t\tplayers.clear();\n\t\tfor(ClientThread player: waitingPlayers) {\n\t\t\tplayer.points = 0;\n\t\t\tplayer.clientCards.clear();\n\t\t}\n\t\twinners = 0;\n\t\tlosers = 0;\n\t\tpassCounter = 0;\n\t\tdeck.init();\n\t\tview.changeInAndWait(players.size(), waitingPlayers.size());\n\t\tview.writeLog(\"-------------GAME END--------------\");\n\t\tstatus = \"waiting\";\n\t\tstatusCheck();\n\t}",
"public void end(boolean tie) {\n\t\tif (tie) {\n\t\t\tfor (Player p : CastleWars.game_participants) {\n\t\t\t\tif (p != null) {\n\t\t\t\t\tp.send(new SendMessage(\"The game was a tie! You have recieved 2 tickets!\"));\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\n\t\t}\n\t\tCastleWarsConstants.GAME_ACTIVE = false;\n\n\t\tCastleWars.game_participants.clear();\n\t}",
"public void endTurn(){\n game.setNextActivePlayer();\n myTurn = false;\n\n stb.updateData(\"playerManager\", game.getPlayerManager());\n stb.updateData(\"aktivePlayer\", game.getPlayerManager().getAktivePlayer());\n stb.updateData(\"roomList\", game.getRoomManager().getRoomList());\n\n getIntent().putExtra(\"GAME\",game);\n getIntent().putExtra(\"myTurn\", false);\n finish();\n if(!game.getPlayerManager().getPlayerList().get(whoAmI).isDead())\n startActivity(getIntent());\n else\n fcm.unbindListeners();\n }",
"void askEndTurn();",
"private void endTurn(){\r\n String currentPlayer = cantStop.getGameBoard().getCurrentPlayer().getName();\r\n\t\tgameOver = cantStop.getGameBoard().endTurn(didBust);\r\n\t\t\r\n\t\tif(gameOver){\r\n\t\t\tstatusLabel.setText(currentPlayer + \r\n\t\t\t\t\t\" wins! Go again?\");\r\n\t\t\tupdate();\r\n\t\t} else {\r\n\t\t\tcantStop.getGameBoard().startNewTurn();\r\n\t\t\tallowNewRoll();\r\n\t\t}\r\n\t}",
"public void endGame() {\r\n\t\tthis.gameStarted = false;\r\n\t\tthis.sendMessages = false;\r\n\t\tthis.centralServer.removeServer(this);\r\n\t}",
"private void endMyTurn() {\n // end my turn, then.\n Entity next = clientgui.getClient().getGame()\n .getNextEntity(clientgui.getClient().getGame().getTurnIndex());\n if ((IGame.Phase.PHASE_DEPLOYMENT == clientgui.getClient().getGame()\n .getPhase())\n && (null != next)\n && (null != ce())\n && (next.getOwnerId() != ce().getOwnerId())) {\n clientgui.setDisplayVisible(false);\n }\n cen = Entity.NONE;\n clientgui.getBoardView().select(null);\n clientgui.getBoardView().highlight(null);\n clientgui.getBoardView().cursor(null);\n clientgui.bv.markDeploymentHexesFor(null);\n disableButtons();\n }",
"@Override\n\tpublic void informEnd(List<String> winners) {\n\t}",
"private void quit() {\n\t\t\tArrayList<ClientThread> delList = new ArrayList<ClientThread>();\n\t\t\tdelList.add(this);\n\t\t\tplayers.removeAll(delList);\n\t\t\twaitingPlayers.removeAll(delList);\n\t\t\tview.changeInAndWait(players.size(),waitingPlayers.size());\t\t\n\t\t\tif(dealer == this) {\n\t\t\t\tdealer = null;\n\t\t\t\tview.writeLog(\"Dealer: \" + name + \" has quited. NO DEALER NOW.\");\n\t\t\t}else view.writeLog(\"Player: \" + name + \" has quited.\");\n\t\t\tstatusCheck();\n\t\t}",
"private void doQuit() throws IOException {\n report(\"client quits\");\n this.done = true;\n toServer.close();\n fromServer.close();\n socket.close();\n\n boardComponent.setBoard(new int[SIDE][SIDE]);\n boardComponent.repaint();\n\n chatInputTextField.setEditable(false);\n btnNewGame.setEnabled(false);\n btnResign.setEnabled(false);\n btnQuit.setEnabled(false);\n btnSendMsg.setEnabled(false);\n\n btnNewGame.removeActionListener(clientAction);\n btnResign.removeActionListener(clientAction);\n btnSendMsg.removeActionListener(clientAction);\n btnQuit.removeActionListener(clientAction);\n btnSendMsg.removeActionListener(clientAction);\n\n boardComponent.setEnabled(false);\n\n clientFrame.setTitle(clientName + \" - DISCONNECTED\");\n setMsgText(\"You quited.\");\n\n }",
"public void endOfWork() {\n\t\tClientCom clientCom = new ClientCom(RunParameters.ArrivalQuayHostName, RunParameters.ArrivalQuayPort);\n\t\twhile (!clientCom.open()) {\n\t\t\tSystem.out.println(\"Arrival Quay not active yet, sleeping for 1 seccond\");\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tThread.currentThread().interrupt();\n\t\t\t}\n\t\t}\n\t\t;\n\t\tPassenger passenger = (Passenger) Thread.currentThread();\n\t\tMessage pkt = new Message();\n\t\tpkt.setType(MessageType.SIM_ENDED);\n\t\tpkt.setId(passenger.getPassengerId());\n\n\t\tclientCom.writeObject(pkt);\n\t\tpkt = (Message) clientCom.readObject();\n\n\t\tpassenger.setCurrentState(pkt.getState());\n\t\tclientCom.close();\n\t}",
"public static void endGame(){\n\t\tmainPanel.grid1.enabledGrid(false);\n\t\tif(speler.heleVlootKapot){\n\t\t\tmainPanel.melding2.setText(\"Helaas, de computer heeft gewonnen.\");\n\t\t}else{\n\t\t\tmainPanel.melding2.setText(\"Gefeliciteerd, u heeft gewonnen.\");\n\t\t}\n\t}",
"public void goAway() {\n Enumeration<ChatClientRoom> cc = clientSessionList.elements();\n while (cc.hasMoreElements()) {\n ChatClientRoom ccr = cc.nextElement();\n ccr.goAway();\n }\n this.dispose();\n try {\n rpc.disconnect();\n } catch (Exception e) {\n System.err.println(\"ChatClientLogin could not disconnect from GMI\");\n }\n System.exit(0);\n }",
"public void exit() {\n System.out.println(\"Thank you for playing Nim\");\n }",
"static private void TalkTo() {\n if (BSChristiansen.getCurrentRoom() == currentRoom) {\n System.out.println(BSChristiansen.getDescription() + \", yet he still gives you good advice:\\n\");\n System.out.println(BSChristiansen.getDialog(0));\n System.out.println(\"\");\n woundedSurvivor();\n } else if (mysteriousCrab.getCurrentRoom() == currentRoom && inventory.getInventory().containsKey(\"Shroom\")) {\n System.out.println(mysteriousCrab.getDescription() + \"\\n\" + mysteriousCrab.getDialog(0));\n } else {\n System.out.println(\"There is nobody to communicate with in this Room\");\n }\n\n }",
"public void youWinByAbandonment() {\n try {\n if (getClientInterface() != null)\n getClientInterface().gameEndedByAbandonment(\"YOU WON BECAUSE YOUR OPPONENTS HAVE ABANDONED!!\");\n }\n catch (RemoteException e) {\n System.out.println(\"remote sending ended by abandonment error\");\n }\n }",
"public void 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}",
"private void Process(ResponseChatMsg chatmsg) {\n\t\t\r\n\r\n\t\t\r\n\t\tif (chatmsg.message == Constant.DEF_CHAT_LEAVE)\r\n \t{\r\n \t\tthis.ChatLeave();\r\n \t\treturn;\r\n \t}\r\n\t\t\r\n\t\r\n\t\tthis.SetChatMessage(chatmsg);\r\n\t}",
"private void endCall() {\n removeLocalVideo();\n removeRemoteVideo();\n leaveChannel();\n removeCallFromDb(mUser.getUid());\n // go back to home screen after selected end call\n startActivity(new Intent(this, MainActivity.class));\n // Prevent back button back into the call\n finish();\n }",
"public void endTurn()\n {\n revealedCardsScreen.setVisible(false);\n accusationScreen.setVisible(false);\n\n this.played = false;\n\n //call client controller's end turn method\n clientController.endTurn();\n }",
"public void lose() {\n status.setText(\"You're finished\");\n gamegoing = false;\n }",
"@Override\n public void exit()\n {\n\t ((ControllerHost)getHost()).showPopupNotification(\"Chord Buddy Exited\");\n }",
"private void exit(String msg) {\n win.message(msg);\n win.close();\n }",
"private void EndTalk() {\n this.mDeleteF = true;\n this.mReadingF = false;\n }",
"public static void displayEndingMessage() {\n\t\tSystem.out.println(\"Thank you for using my program!\");\n\t}",
"private void finishPlayAlong() {\n\n callback.questionPressed(null, score, lives); // ENDS this question\n\n }",
"public void completedGame()\n\t{\n\t\tJOptionPane.showMessageDialog(this,\"Congratulations, you beat the game!\" + ship.getTotalScore(), \"Beat the Game\", JOptionPane.INFORMATION_MESSAGE);\n\t\tbuttonPanel.endGameButton.setEnabled(false);\n\t\tsendScore();\n\t}",
"private void checkForGameEnd() {\n\t\tint checkWin = controller.checkForWinner();\n\t\tif(playerType == null && checkWin == 1 || (playerType != null && playerType == checkWin)) {\n\t\t\tgameFinished = true;\n\t\t\tAlert alert = new Alert(Alert.AlertType.WARNING);\n\t\t\talert.setTitle(\"VICTORY\");\n\t\t\talert.setHeaderText(\"VICTORY\");\n\t\t\talert.setContentText(\"CONGRATULATIONS! YOU WIN!\");\n\t\t\talert.showAndWait()\n\t\t .filter(response -> response == ButtonType.OK)\n\t\t .ifPresent(response -> formatSystem());\n\t\t\t\n\t\t}else if (playerType == null && checkWin == 2 || (playerType != null && playerType%2 + 1 == checkWin)) {\n\t\t\tgameFinished = true;\n\t\t\tAlert alert = new Alert(Alert.AlertType.WARNING);\n\t\t\talert.setTitle(\"DEFEAT\");\n\t\t\talert.setHeaderText(\"DEFEAT\");\n\t\t\talert.setContentText(\"SHAME! YOU LOSE!\");\n\t\t\talert.showAndWait()\n\t\t .filter(response -> response == ButtonType.OK)\n\t\t .ifPresent(response -> formatSystem());\n\t\t\t\n\t\t}else if (controller.checkForTie()) {\n\t\t\tgameFinished = true;\n\t\t\tAlert alert = new Alert(Alert.AlertType.WARNING);\n\t\t\talert.setTitle(\"STALEMATE\");\n\t\t\talert.setHeaderText(\"STALEMATE\");\n\t\t\talert.setContentText(\"ALAS! TIE GAME!\");\n\t\t\talert.showAndWait()\n\t\t .filter(response -> response == ButtonType.OK)\n\t\t .ifPresent(response -> formatSystem());\n\t\t}\n\t\t\n\t\tif(playerType != null && gameFinished) {\n\t\t\tSystem.out.println(\"closing connection\");\n\t\t\ttry {\n\t\t\t\tconnection.close();\n\t\t\t}catch (Exception e) {\n\t\t\t\tSystem.out.println(\"ERROR CLOSING\");\n\t\t\t}\n\t\t}\n\t}",
"public void winMessage() {\r\n\t\tSystem.out.print(\"\\n\\nCongratulations! You've won the game! :D\");\r\n\t\tSystem.exit(0);\r\n\t}",
"public void endTurn() {\r\n\t\tSystem.out.println(\"[DEBUG LOG/Game.java] Started endTurn() for player \"+currentPlayer.getNumber());\r\n\t\tturnIsEnding = true;\r\n\r\n\t\t// End turn restrictions\r\n\t\tif (!currentPlayer.isDead() && !currentPlayer.isFree() && !currentPlayer.hasQuit()) {\r\n\t\t\tif (currentPlayer.getPlayArea().getNonPlayedSize() > 0) {\r\n\t\t\t\tgameChannel.sendMessage(\"**[ERROR]** Cannot end turn until all cards in play area are played\").queue();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (mustChoose.size() > 0) {\r\n\t\t\t\tgameChannel.sendMessage(\"**[ERROR]** Cannot end turn until all choices are made\").queue();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (mustTrash.size() > 0) {\r\n\t\t\t\tgameChannel.sendMessage(\"**[ERROR]** Cannot end turn until all trashes are made\").queue();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t// Don't need to discard\r\n\t\t}\r\n\t\t\r\n\t\t// Mass deletes\r\n\t\tclearMessages();\r\n\t\t\r\n\t\t// If just escaped, send message after clearing\r\n\t\tif (currentPlayer.getCurrentRoom() == 0 && currentPlayer.getPiece().getX() == GlobalVars.playerCoordsPerRoom[39][0]) {\r\n\t\t\t// Update room\r\n\t\t\tcurrentPlayer.setCurrentRoom(39);\r\n\t\t\tif (firstEscapee == currentPlayer) {\r\n\t\t\t\tgameChannel.sendMessage(\":helicopter: **\"+currentName+\"** was the first to escape! They received a **20** :star: **Mastery Token**\\n:skull: Only **4** turn(s) left!\").queue();\r\n\t\t\t} else {\r\n\t\t\t\tgameChannel.sendMessage(\":helicopter: **\"+currentName+\"** escaped in time! They received a **20** :star: **Mastery Token**\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Set cards in PlayArea to not played for next time, Undos the Discarded tag\r\n\t\tfor (int i = 0; i < currentPlayer.getPlayArea().getSize(); i++) {\r\n\t\t\tcurrentPlayer.getPlayArea().getCard(i).setPlayed(false);\r\n\t\t\tif (currentPlayer.getPlayArea().getCard(i).toStringHand().contentEquals(\"*[Discarded]*\")) currentPlayer.getPlayArea().getCard(i).setStringInHand();\r\n\t\t}\r\n\t\t\r\n\t\t// Clear swords, skill, boots, etc\r\n\t\tcurrentPlayer.endOfTurnReset();\r\n\t\tmustDiscard.clear();\r\n\t\t\r\n\t\t// Replaces cards in dungeon row. Only one attack per turn\r\n\t\tif (!status.contentEquals(\"over\")) {\r\n\t\t\tboolean hasAttackedThisTurn = false;\r\n\t\t\tfor (int i = 0; i < 6; i++) {\r\n\t\t\t\t// Checks to see if it should replace card\r\n\t\t\t\tif (dungeonRow[i].isBought()) {\r\n\t\t\t\t\tdungeonRow[i] = mainDeck.getNext();\r\n\t\t\t\t\tif (dungeonRow[i].isDragonAttack() && !hasAttackedThisTurn) {\r\n\t\t\t\t\t\tdragonAttack(cubesPerLevel[attackLevel]);\r\n\t\t\t\t\t\thasAttackedThisTurn = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (dungeonRow[i].isHasArrive()) {\r\n\t\t\t\t\t\tdoArriveEffect(dungeonRow[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmainDeck.removeTop();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// Instantly go on to next player if no dragon attack\r\n\t\t\tif (!hasAttackedThisTurn) {\r\n\t\t\t\tdetermineNextPlayer();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"public abstract void stopMsg();",
"private void endGame(){\n if (winner){\n Toast.makeText(this, \"Fin del Juego: Tu ganas\", Toast.LENGTH_SHORT).show();\n finish();\n } else {\n Toast.makeText(this, \"Fin del Juego: Tu pierdes\", Toast.LENGTH_SHORT).show();\n finish();\n }\n }",
"@Override\n\tpublic void finish() {\n\t\ttry {\n\t\t\tif(muc!=null){\n\t\t\t\t\n\t\t\t\tmuc.leave();\n\t\t\t}\n\t\t\tif(connection!=null){\n\t\t\t\t\n\t\t\t\tconnection.disconnect();\n\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\n\t\tsuper.finish();\n\t}",
"public void onFinish() {\n if (!this.finished) {\n this.finished = true;\n if (this.isReply) {\n this.popupMessages.clear();\n }\n for (int i = 0; i < 3; i++) {\n NotificationCenter.getInstance(i).removeObserver(this, NotificationCenter.appDidLogout);\n NotificationCenter.getInstance(i).removeObserver(this, NotificationCenter.updateInterfaces);\n NotificationCenter.getInstance(i).removeObserver(this, NotificationCenter.messagePlayingProgressDidChanged);\n NotificationCenter.getInstance(i).removeObserver(this, NotificationCenter.messagePlayingDidReset);\n NotificationCenter.getInstance(i).removeObserver(this, NotificationCenter.contactsDidLoad);\n }\n NotificationCenter.getGlobalInstance().removeObserver(this, NotificationCenter.pushMessagesUpdated);\n NotificationCenter.getGlobalInstance().removeObserver(this, NotificationCenter.emojiLoaded);\n ChatActivityEnterView chatActivityEnterView2 = this.chatActivityEnterView;\n if (chatActivityEnterView2 != null) {\n chatActivityEnterView2.onDestroy();\n }\n if (this.wakeLock.isHeld()) {\n this.wakeLock.release();\n }\n }\n }",
"public void onCloseMeeting() {\n controller.closeMeeting();\n }",
"public void endTurn() {\n controller.endTurn();\n }",
"public void triggerEndGame()\n\t{\n\t\tif(livesRemaining <= 0)\n\t\t{\n\t\t\tmP[0].stop();\n\t\t\tmP[1].stop();\n\t\t\tmP[2].stop();\n\t\t\tendGame = new Alert(AlertType.CONFIRMATION);\n\t\t\tendGame.setTitle(\"1942\");\n\t\t\tendGame.setHeaderText(null);\n\t\t\tendGame.getButtonTypes().clear();\n\t\t\tendGame.setContentText(\"You're dead! \\nYou finished with \" + p1Score + \" points. \\nWould you like to play again?\");\n\t\t\tendGame.getButtonTypes().addAll(ButtonType.YES, ButtonType.NO);\n\t\t\tendGame.setGraphic(new ImageView(new Image(\"file:images/gameOver.png\")));\n\t\t\tspawnTimerTL.stop();\n\t\t\tmainTimer.stop();\n\t\t\tp1.getNode().setImage(null); //Removes player from screen\n\t\t\tOptional<ButtonType> result = endGame.showAndWait();\n\n\t\t\tif(result.get() == ButtonType.YES)\n\t\t\t{\n\t\t\t\tlivesRemaining = 3;\n\t\t\t\thealthRemaining = 10;\n\t\t\t\tivHealthBar.setImage(imgHealth[healthRemaining]);\n\t\t\t\tivLives.setImage(imgLives[livesRemaining]);\t\n\n\t\t\t\tif (highScore < p1Score)\n\t\t\t\t\thighScore = p1Score;\n\t\t\t\ttry //Writes new high score and throws IO Exception\n\t\t\t\t{\n\t\t\t\tfileWriter = new FileWriter(highScoreSave);\n\t\t\t\tfileWriter.write(String.valueOf(highScore));\n\t\t\t\tfileWriter.close();\n\t\t\t\t}\n\t\t\t\tcatch(IOException e)\n\t\t\t\t{e.printStackTrace();}\n\t\t\t\t\n\t\t\t\tlblHighScore.setText(Integer.toString(highScore));\n\t\t\t\tp1Score = 0;\n\t\t\t\tlblp1score.setText(Integer.toString(p1Score));\n\n\t\t\t\tp1.setDead(false);\n\t\t\t\tmainTimer.start();\n\t\t\t\tspawnTimerTL.play();\n\t\t\t\t\n\t\t\t\tfor(int k = 0; k < enemyPlanes.length; k++)\n\t\t\t\t{\n\t\t\t\t\tenemyPlanes[k].toggleIsDead(true);\n\t\t\t\t\tenemyPlanes[k].setY(2000);\n\t\t\t\t\tenemyPlanes[k].getNode().setLayoutY(enemyPlanes[k].getY());\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (highScore < p1Score)\n\t\t\t\t\thighScore = p1Score;\n\t\t\t\ttry //Writes new high score and throws IO Exception\n\t\t\t\t{\n\t\t\t\tfileWriter = new FileWriter(highScoreSave);\n\t\t\t\tfileWriter.write(String.valueOf(highScore));\n\t\t\t\tfileWriter.close();\n\t\t\t\t}\n\t\t\t\tcatch(IOException e)\n\t\t\t\t{e.printStackTrace();}\n\t\t\t\tthankYou = new Alert(AlertType.INFORMATION);\n\t\t\t\tthankYou.setTitle(\"1942\");\n\t\t\t\tthankYou.setHeaderText(null);\n\t\t\t\tthankYou.setGraphic(new ImageView(new Image(\"file:images/plane.png\")));\n\t\t\t\tthankYou.setContentText(\"Thank you for playing.\\nGoodbye!\");\n\t\t\t\tthankYou.show();\n\t\t\t\tPlatform.exit();\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\n\t\t}\n\t}",
"public void buttonEndTurn() {\n\t\tendTurn();\n\t\t}",
"protected abstract String endActionString();",
"void endGame(String message, int player) {\n //changes the colour of the buttons back to the winner's colour (red or blue)\n if (player == 0) {\n changeColourButton(new Color(255, 0, 0));\n } else {\n changeColourButton(new Color(0, 0, 255));\n }\n //stops the game from continuing\n disableButtons();\n //saves the winner to the leaderboards\n saveGame(message, player);\n //Determmines if the message is \"It's a Tie!\". If it is the pop up has the \n //message \"It's a Tie!\". Otherwise the pop up has the message \"The winner is: \" \n //plus the winner.\n if (message.equals(\"It's a Tie!\")) {\n EndPopUp.showMessageDialog(this, message);\n } else {\n EndPopUp.showMessageDialog(this, \"The winner is: \" + message);\n }\n\n //updates leaderboard (garbage String argument)\n changeTopScores.setName(\"asdf\");\n }",
"private void proceed() {\n finish();\n Intent onReturnView = new Intent(ChatMessage.this, MainActivity.class);\n startActivity(onReturnView);\n }",
"private void cs0() {\n\t\t\tif(!Method.isChatiing()){\n\t\t\t\tMethod.npcInteract(RUNESCAPEGUIDE, \"Talk-to\");\n\t\t\t}\n\t\t\t\n\t\t}",
"private void terminarJuego() {\n\t\tjugadores[0].cerrar();\n\t\tjugadores[1].cerrar();\n\t\tjugadores[2].cerrar();\n\t\ttry {\n\t\t\tserver.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.exit(0);\n\t}",
"public void onActive() {\n Methods.showMessage(\"Warning\", \"Welcome Back!\", \"Please Continue Filling Out Your Questionanire!\");\n }",
"public void onGuiClosed() {\r\n\t\tif (!this.sentPacket) {\r\n\t\t\tElevatorsCore.say(\"Exiting gui!\");\r\n\t\t\tthis.exit(200, false);\r\n\t\t}\r\n\t}",
"protected void stop() throws IOException {\n \t\t_chat.shutdown();\n \t}",
"@Override\r\n\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\tsuper.windowClosing(e);\r\n\t//\t\t\tdispose();\r\n\t\t\t\tChatLeave();\r\n\t\t\t\t\r\n\t\t\t}",
"public void endSession(){\n currentUser = null;\n ui.returnCard();\n }",
"public void peerQuitting(Packet packet) {\r\n\t\t// Search for client in peerClientNodeConnectionList and remove them from the ArrayList\r\n\t\tint peerPosition = peerSearch(packet.packetSenderID);\r\n\t\tpeerClientNodeConnectionList.remove(peerPosition);\r\n\t\tsendPeerListToAll();\r\n\t\tjava.util.Date date = new java.util.Date();\r\n\t\tSystem.out.println(date + \": Peer Node \" + packet.packetSenderID + \" has left the network\");\r\n\t\t//printNodeConnections();\r\n\t\tcloseConnections();\r\n\t}",
"public void endGame() {\n\t\t// If Avengers lose and Loki wins\n\t\tif (!avengersAlive()) {\n\t\t\tca_attack.setEnabled(false);\n\t\t\the_attack.setEnabled(false);\n\t\t\tbw_attack.setEnabled(false);\n\t\t\thulk_attack.setEnabled(false);\n\t\t\tthor_attack.setEnabled(false);\n\t\t\tloki_attack.setEnabled(false);\n\t\t\ttextArea.append(\"\\n G A M E O V E R \\n\");\n\t\t\ttextArea.append(\"Oh no! Avengers lost... Loki conquered earth...\");\n\t\t}\n\t\t\n\t\t// If Loki loses and Avengers win\n\t\telse if (!lokiAlive()) {\n\t\t\tca_attack.setEnabled(false);\n\t\t\the_attack.setEnabled(false);\n\t\t\tbw_attack.setEnabled(false);\n\t\t\thulk_attack.setEnabled(false);\n\t\t\tthor_attack.setEnabled(false);\n\t\t\tloki_attack.setEnabled(false);\n\t\t\ttextArea.append(\"\\n Y O U W O N \\n\");\n\t\t\ttextArea.append(\"Yay! Avengers saved the world from Loki! Nice work!\");\n\t\t}\n\t}",
"private void endGame() {\n\t\tPlatform.runLater(() -> {\n\t\t\t// sets up gameOverDialog\n\t\t\tAlert gameOverDialog = new Alert(AlertType.CONFIRMATION);\n\t\t\tgameOverDialog.setTitle(\"Game Over\");\n\n\t\t\tgameOverDialog.setHeaderText(\"Score: \" + score + \"\\n\"\n\t\t\t\t\t+ \"Mastery : \" + (int)MASTER_SCORES[difficulty] + \" points\\n\"\n\t\t\t\t\t+ \"Try Again?\");\n\n\t\t\tOptional<ButtonType> result = gameOverDialog.showAndWait();\n\n\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\n\t\t\t// updates the file with current date, score, and difficulty\n\t\t\ttry {\n\t\t\t\tsc.getCurrentUser().updateFile(GAME_CODE, dateFormat.format(new Date()), score, difficulty);\n\t\t\t}\n\t\t\t// catches IOException and informs the user\n\t\t\tcatch (IOException ex) {\n\t\t\t\tAlert errorDialog = new Alert(AlertType.ERROR);\n\t\t\t\terrorDialog.setTitle(\"Error\");\n\t\t\t\terrorDialog.setHeaderText(\"Error\");\n\t\t\t\terrorDialog.setContentText(\"File could not be saved\");\n\t\t\t\terrorDialog.showAndWait();\n\t\t\t}\n\n\t\t\t// resets if OK button is selected\n\t\t\tif (result.get() == ButtonType.OK) {\n\t\t\t\treset();\n\t\t\t}\n\n\t\t\t// quits in CANCEL button is selected\n\t\t\tif(result.get() == ButtonType.CANCEL) {\n\t\t\t\tquitBtn.fire();\n\t\t\t}\n\t\t});\n\t}",
"void end(String roomId);",
"public void endGameFrame() {\r\n\t\tcreateWarning(3000, \"Time Out!\"); //show warning message\r\n\t\t\r\n\t\ttry {\t\t\t\t\t\t\t //creates a file when the game is over\r\n\t\t\tString ExitFilename = \"EXIT.txt\";\r\n\t\t\tFileWriter ExitFile = new FileWriter(\"src/Signals./\"+ExitFilename);\r\n\t\t\tExitFile.write(\"EXIT\");\r\n\t\t\tExitFile.close();\r\n\t\t} \r\n\t\t catch (IOException e) {\r\n\t\t System.out.println(\"An error occurred.\");\r\n\t\t e.printStackTrace();\r\n\t\t }\r\n\t\t//close all interface\r\n\t\tframe.setVisible(false);\r\n\t\tframe.dispose();\r\n\t\tSystem.exit(0);\r\n\t\t\r\n\t\t\r\n\t}",
"private void dealChatMsg() {\n /*\n r4 = this;\n r0 = new java.util.LinkedList;\n r0.<init>();\n r1 = com.tomatolive.library.ui.activity.live.PrepareLiveActivity.class;\n monitor-enter(r1);\n r2 = r4.receiveMsgQueue;\t Catch:{ all -> 0x0038 }\n if (r2 == 0) goto L_0x0033;\n L_0x000c:\n r2 = r4.receiveMsgQueue;\t Catch:{ all -> 0x0038 }\n r2 = r2.isEmpty();\t Catch:{ all -> 0x0038 }\n if (r2 == 0) goto L_0x0015;\n L_0x0014:\n goto L_0x0033;\n L_0x0015:\n r2 = 0;\n L_0x0016:\n r3 = 5;\n if (r2 >= r3) goto L_0x0029;\n L_0x0019:\n r3 = r4.receiveMsgQueue;\t Catch:{ all -> 0x0038 }\n r3 = r3.poll();\t Catch:{ all -> 0x0038 }\n r3 = (com.tomatolive.library.model.ChatEntity) r3;\t Catch:{ all -> 0x0038 }\n if (r3 == 0) goto L_0x0029;\n L_0x0023:\n r0.add(r3);\t Catch:{ all -> 0x0038 }\n r2 = r2 + 1;\n goto L_0x0016;\n L_0x0029:\n monitor-exit(r1);\t Catch:{ all -> 0x0038 }\n r1 = new com.tomatolive.library.ui.activity.live.-$$Lambda$PrepareLiveActivity$WexsRlm5pU6uK-2JwaAGWgcPHqs;\n r1.<init>(r4, r0);\n r4.handlerMainPost(r1);\n return;\n L_0x0033:\n r0 = 1;\n r4.asleep = r0;\t Catch:{ all -> 0x0038 }\n monitor-exit(r1);\t Catch:{ all -> 0x0038 }\n return;\n L_0x0038:\n r0 = move-exception;\n monitor-exit(r1);\t Catch:{ all -> 0x0038 }\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tomatolive.library.ui.activity.live.PrepareLiveActivity.dealChatMsg():void\");\n }",
"public static void endGameSequence()\n\t{\n\t\ttfBet.setEnabled(false);\n\t\tbtnPlay.setEnabled(false);\n\t\tbtnHit.setEnabled(false);\n\t\tbtnStay.setEnabled(false);\n\t\tbtnDouble.setEnabled(false);\n\t\tlblUpdate.setText(\"Game over! You are out of money!\");\n\t}",
"@FXML\r\n protected void replyToComplaint() {\r\n if(verifyInput()) {\r\n Date date = new Date();\r\n Complaint complaint = complaintListView.getSelectionModel().getSelectedItem();\r\n complaint.closeComplaint(date, reply.getText(), Double.parseDouble(compensation.getText()));\r\n App.getOcsfClient(this).replyToComplaint(complaint);\r\n this.reply.setText(\"\");\r\n this.compensation.setText(\"\");\r\n }\r\n }",
"public abstract void userActionEnds(long ms);",
"private void userDidLeave() {\n DeviceSingleton deviceSingleton = DeviceSingleton.getInstance();\n deviceSingleton.setImInARoom(false);\n deviceSingleton.setJoinedChat(false);\n\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putBoolean(\"savedJoinedChat\", false);\n editor.commit();\n Intent intent2 = new Intent(ShowMapActivity.this, LoginActivity.class);\n startActivity(intent2);\n// break;\n\n }",
"public void waitingEnemy(){\t\t\n\t\tgetController().changeFree(false);\n\t\tdisplayAdvertisement(\"waiting enemy\");\n\t\tadvertisementPanel.cancelRequestSetVisible(true);\n\t\tvalidate();\n\t}",
"public void Stop_Connection(){\n keepWalking = false; //gia na stamatisei to chat alliws to thread dn ginete interrupt gt dn stamataei i liturgeia tou.\n Chat_Thread.interrupt();\n try {\n if(oos != null) oos.close();\n if(ois != null) ois.close();\n } catch (IOException ex) {\n Logger.getLogger(ChatWithCC.class.getName()).log(Level.SEVERE, null, ex);\n }\n try {\n if(socket !=null) socket.close();\n } catch (IOException ex) {\n Logger.getLogger(ChatWithCC.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"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 }",
"public void exit(int code, String msg, Object... args) {\n if (conn.isConnected()) {\n tellManagers(msg, args);\n try {\n Thread.sleep(500);\n } catch (InterruptedException e) {\n }\n }\n tournamentService.flush();\n userService.flush();\n System.exit(code);\n }",
"public void leaveChannel() {\n mRtcEngine.leaveChannel();\n appointment.removeOfCall(new DatabaseUser(MainUser.getMainUser().getId()));\n }",
"public void leaveConference();",
"public void handleEndTurn(ActionEvent event){\n sender.sendInput(\"end turn\");\n }",
"public void actionPerformed(ActionEvent e) {\n try {\r\n if (roomOrUser == 1) {\r\n // send message to a room\r\n sock.executeCommand(new RoomMessageCommand(new LongInteger(name), textArea_1.getText()\r\n .getBytes()));\r\n textArea_2.setText(textArea_2.getText() + textField.getText() + \": \" + textArea_1.getText()\r\n + \"\\n\");\r\n } else if (roomOrUser == 2) {\r\n // send message to a user\r\n sock.executeCommand(new UserMessageCommand(new LongInteger(name), textArea_1.getText()\r\n .getBytes(), true));\r\n textArea_2.setText(textArea_2.getText() + textField.getText() + \": \" + textArea_1.getText()\r\n + \"\\n\");\r\n }\r\n } catch (InvalidCommandException ex) {\r\n JOptionPane.showMessageDialog(null, \"Unable to join or leave room.\", \"alert\",\r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n }",
"public void endTurn() {\n }",
"public void disconnect() {\r\n connection.quit();\r\n menuFrame.setVisible(true);\r\n chatFrame.clearMessages();\r\n chatFrame.setVisible(false);\r\n leaderboardFrame.setVisible(false);\r\n lobbyFrame.setVisible(false);\r\n }",
"@Override\r\n\tpublic void endTurn() {\n\t\t\r\n\t}",
"@FXML\r\n\tprivate void deconnecter()\r\n\t{\r\n\t\tchatModel.getConnectionEstablishedProperty().set(false);\r\n\t\tclient.closeClientSocket();\r\n\t\tPlatform.runLater(() -> ChatModel.getInstance().getStatusMessagesList()\r\n\t\t\t\t.add(\"Chat ended: you disconnected.\"));\r\n\t}",
"public static void farewell(){\n System.out.print(\"Thank you for using the Human Resources Mangement System.\\nGoodbye!\");\n System.exit(0);\n }",
"public void gameEnd(String reason) {\r\n if (game != null) {\r\n Transpositions.resetTrans();\r\n game.gameEnd();\r\n Logging.log(\"Game ended in a draw!\");\r\n board = null;\r\n game = null;\r\n connection.requestLeaderboard();\r\n }\r\n }",
"private void endGame() {\n\t\tPlayRound.endGame();\n\t\tint score1 = users.get(0).getPoints();\n\t\tint score2 = users.get(1).getPoints();\n\t\tString winnerString;\n\t\tif(score1 > score2){\n\t\t\twinnerString = users.get(0).getName() + \" \" + \"won!\";\n\t\t}\n\t\telse if (score2 > score1) {\n\t\t\twinnerString = users.get(1).getName() + \" \" + \"won!\";;\n\t\t}\n\t\telse {\n\t\t\twinnerString = \"there was a tie!\";\n\t\t}\n\t\tJFrame frame = new JFrame();\n\t\tImageIcon icon = new ImageIcon(Game.class.getResource(\"/resources/cup.png\"));\n\t\tJOptionPane.showMessageDialog(null, winnerString, \"Congratulations\", JOptionPane.OK_OPTION, icon);\n\t}",
"public void exitGame() {\n System.out.println(\"Thank you and good bye!\");\n System.exit(0);\n }",
"private void disconnect() {\n activityRunning = false;\n MRTClient.getInstance().doHangup();\n MRTClient.getInstance().removeClientListener(this);\n\n finish();\n }",
"public void endTurn() {\n\t\tfireChanges();\n\t\t\n\t\tif(!isConfirmed())\n\t\t\tfirePropertyChange(Handler.END_TURN_PROPERTY, \"Do you want to confirm ending your turn?\");\n\t\telse{\n\t\t\tAbstractGameCommand endTurnCommand = new EndTurnCommand(getGame());\n\t\t\tendTurnCommand.execute();\n\t\t\t\n\t \tfirePropertyChange(Handler.CURRENT_PLAYER_PROPERTY, getGame().getCurrentPlayer().getName());\n\t\t\tresetConfirm();\n\t\t}\n\t\t\n\t\tfireChanges();\n\t}",
"public void afterReceivingeGainChatResponse(ChatResponse response);",
"private void ending() {\n\t\tstartView.ending();\n\t\tSystem.exit(-1);\n\t}",
"private void endGame() {\n pauseTimer();\n if (!myGameOver && !myWelcome) {\n final int result = JOptionPane.showOptionDialog(null, \n \"Are you sure you want to end this game?\",\n \"End Current Game\", JOptionPane.YES_NO_OPTION,\n JOptionPane.QUESTION_MESSAGE, null, null,\n JOptionPane.NO_OPTION);\n if (result == JOptionPane.YES_OPTION) {\n myGameOver = true;\n repaint();\n } else {\n startTimer();\n }\n }\n }",
"public void endUserTurn() {\n\t\tupdateUserTeam();\n\n\t\tusers.get(userTurn).setTransferFinished(true);\n\t\tPlayRound.endUserTurn();\n\t\tMainGui.showCardLayout(\"panelPlayRound\");\n\n\t}"
] | [
"0.7045602",
"0.68233407",
"0.6795488",
"0.6570453",
"0.65009856",
"0.64736927",
"0.64266455",
"0.64137036",
"0.6383396",
"0.6347115",
"0.6293844",
"0.6287378",
"0.62656826",
"0.62538356",
"0.6196697",
"0.61884224",
"0.61881894",
"0.61729",
"0.61004055",
"0.61003006",
"0.608589",
"0.6071923",
"0.60367477",
"0.6023247",
"0.60127926",
"0.60055655",
"0.59945977",
"0.5990286",
"0.5985154",
"0.5974427",
"0.5972506",
"0.59670657",
"0.59547555",
"0.59531677",
"0.5938235",
"0.5927001",
"0.59174913",
"0.59122247",
"0.5907308",
"0.5905148",
"0.58973294",
"0.589",
"0.58857566",
"0.5885253",
"0.58730793",
"0.5857194",
"0.5839663",
"0.5837066",
"0.5818383",
"0.5800315",
"0.579797",
"0.5785756",
"0.5781745",
"0.5781477",
"0.5778289",
"0.577599",
"0.5759027",
"0.57551277",
"0.57549757",
"0.5752288",
"0.5737626",
"0.57355773",
"0.57287234",
"0.57281023",
"0.5717379",
"0.5714251",
"0.5697906",
"0.56964517",
"0.568081",
"0.5677997",
"0.5667733",
"0.56498605",
"0.56322056",
"0.5613487",
"0.56106746",
"0.56051195",
"0.5598598",
"0.559842",
"0.5594341",
"0.55932546",
"0.55916476",
"0.55902576",
"0.558462",
"0.5578516",
"0.55766696",
"0.5576607",
"0.5574258",
"0.55666566",
"0.5551965",
"0.5549158",
"0.55381364",
"0.55371577",
"0.55311424",
"0.5528076",
"0.55248696",
"0.55233306",
"0.5519732",
"0.5513427",
"0.5512847",
"0.5510209"
] | 0.58666366 | 45 |
this method maps the following URL & http method URL: HTTP method: GET | @RequestMapping(value = "/exhibits", method = RequestMethod.GET)
public ResponseEntity<?> getExhibits() {
logger.debug(messageSource.getMessage("controller.getRequest", new Object[]{null}, Locale.getDefault()));
Iterable<ExhibitEntity> exhibitList = exhibitService.findAll();
logger.debug(messageSource.getMessage("controller.returnResponse", new Object[]{exhibitList}, Locale.getDefault()));
return new ResponseEntity<>(exhibitList, HttpStatus.OK);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tprotected Method getMethod() {\n\t\treturn Method.GET;\n\t}",
"public HTTPRequestMethod getMethod();",
"String getHttpMethod();",
"String getHttpMethod();",
"@Override\npublic void get(String url) {\n\t\n}",
"@Override\n\tprotected void executeGet(GetRequest request, OperationResponse response) {\n\t}",
"public abstract String getRequestPathInfo();",
"HttpGet getRequest(HttpServletRequest request, String address) throws IOException;",
"public HttpMethod getMethod()\r\n/* 44: */ {\r\n/* 45: 78 */ return HttpMethod.valueOf(this.servletRequest.getMethod());\r\n/* 46: */ }",
"public interface HttpService {\n//banner/query?type=1\n // public static final String BASE_URL=\"http://112.124.22.238:8081/course_api/\";\n @GET(\"banner/query\")\n Call<List<HeaderBean>> getHeaderData(@Query(\"type\") String type);\n @GET(\"campaign/recommend\")\n Call<List<RecommendBean>> getRecommendData();\n}",
"public void doGet( )\n {\n \n }",
"public HttpMethod getMethod()\r\n/* 31: */ {\r\n/* 32:60 */ return HttpMethod.valueOf(this.httpRequest.getMethod());\r\n/* 33: */ }",
"@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 }",
"String getRequest(String url);",
"String getRequestURL();",
"public static boolean isGet(String argRequestMethod) {\r\n\t\treturn HttpConstants.GET.equalsIgnoreCase(argRequestMethod);\r\n\t}",
"private String computeMethodForRedirect(String initialMethod, String responseCode) {\n if (!HTTPConstants.HEAD.equalsIgnoreCase(initialMethod)) {\n return HTTPConstants.GET;\n }\n return initialMethod;\n }",
"private String methodUrl(String method) {\n return apiUrl + token + \"/\" + method;\n }",
"private void mappingMethodGet() throws SecurityException, NoSuchMethodException{\n\t\tString aux = upFirstLetter();\n\t\tString methodGet = \"get\" + aux;\n\t\tthis.methodGet = this.classFather.getMethod(methodGet);\n\t}",
"@Override\n\tpublic String getRequestMethod() {\n\t\treturn requestMethod;\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t}",
"public interface UrlConnector {\n /**\n * Obtains an HTTP GET request object.\n *\n * @param request the servlet request.\n * @param address the address to connect to.\n * @return the request.\n * @throws IOException if the connection can't be established.\n */\n HttpGet getRequest(HttpServletRequest request, String address) throws IOException;\n\n /**\n * Obtains an HTTP PUT request object.\n *\n * @param request the servlet request.\n * @param address the address to connect to.\n * @return the request.\n * @throws IOException if the connection can't be established.\n */\n HttpPut putRequest(HttpServletRequest request, String address) throws IOException;\n\n /**\n * Obtains an HTTP POST request object.\n *\n * @param request the servlet request.\n * @param address the address to connect to.\n * @return the request.\n * @throws IOException if the connection can't be established.\n */\n HttpPost postRequest(HttpServletRequest request, String address) throws IOException;\n\n /**\n * Obtains an HTTP DELETE request object.\n *\n * @param request the servlet request.\n * @param address the address to connect to.\n * @return the request.\n * @throws IOException if the connection can't be established.\n */\n HttpDelete deleteRequest(HttpServletRequest request, String address) throws IOException;\n\n /**\n * Obtains an HTTP PATCH request object.\n *\n * @param request the servlet request.\n * @param address the address to connect to.\n * @return the request.\n * @throws IOException if the connection can't be established.\n */\n HttpPatch patchRequest(HttpServletRequest request, String address) throws IOException;\n}",
"public String getRequestMethod(){\n return this.requestMethod;\n }",
"@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }",
"HttpRequest mo6260a(HttpMethod httpMethod, String str, Map<String, String> map);",
"public abstract RestURL getURL();",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t}",
"protected abstract HttpUriRequest getHttpUriRequest();",
"public interface InterfaceReTrofits {\n\n @GET(\"{viewname}?name=101020100&id=11\")\n Call<String> fundGETRequest(@Path(\"viewname\") String viewname);\n\n @GET(\"{viewname}?id=12\")\n Call<BaseCallBean> fundGETRequestForBean(@Path(\"viewname\") String viewname);\n\n\n Call<BaseCallBean> fundGETRequest(@Url String url, @QueryMap Map<String, String> queryMaps);\n\n\n}",
"@Override\n public HttpMethods getMethod() {\n return HttpMethods.EVAL;\n }",
"@NonNull\n public String getAction() {\n return \"GET\";\n }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t}",
"public interface RequestServiceMzitu {\n\n @GET(\"{number}\")\n Observable<String> getDetialData(@Path(\"number\") String number, @Query(\"time\") long time);\n\n @GET(\"page/{pageNumber}\")\n Observable<String> getIndexMoreData(@Path(\"pageNumber\") int pageNumber, @Query(\"time\") long time);\n\n @GET(UrlPath.BaseUrlRequestServiceMzitu)\n Observable<String> getIndexData(@Query(\"time\") long time);\n\n @GET(\"/tag/{path}\")\n Observable<String> getTagData(@Path(\"path\") String path, @Query(\"time\") long time);\n\n @GET(\"/tag/{path}/page/{pageNumber}\")\n Observable<String> getTagMoreData(@Path(\"path\") String path, @Path(\"pageNumber\") int pageNumber, @Query(\"time\") long time);\n}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }",
"public char[] uri_GET()\n {return uri_GET(new char[120], 0);}",
"String getRequest();",
"public String getRequestMethod()\n {\n return requestMethod;\n }",
"@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\r\n\tprotected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoGet(req, resp);\r\n\t}",
"public String getHttpmethod() {\n return httpmethod;\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\tsuper.doGet(req, resp);\n\t\t\n\t}",
"public HttpMethod getMethod()\r\n/* 29: */ {\r\n/* 30:56 */ return this.method;\r\n/* 31: */ }",
"@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 }",
"public abstract String getRequestServletPath();",
"public interface ServerApi {\n @GET(\"qqluck/query\")\n Call<Qq> getQq1(@Query(\"appkey\")String appkey, @Query(\"qq\") String qq);//第一种查询方法\n\n\n @GET(\"qqluck/query\")\n Call<Qq> getQq2(@QueryMap Map<String,String> map);//第二种查询方法\n @GET(\"qqluck/{q}\")\n Call<Qq> getQq3(@Path(\"q\") String q,@QueryMap Map<String,String> map);\n}",
"@Override\n\tpublic String getType() {\n\t\treturn Global.GET;\n\t}",
"public void setMethod(HTTPMethod method);",
"public interface RequestService {\n //http://gank.io/api/data/Android/10/1\n /*@GET(\"api/data/Android/10/1\")\n Call<ResponseBody> getAndroidInfo();*/\n @GET(\"api/data/Android/10/1\")\n Call<GankBean> getAndroidInfo();\n @GET(\"api/data/Android/10/{page}\")\n Call<GankBean> getAndroidInfo(@Path(\"page\") int page);\n @GET(\"api/data/query?cityname=深圳\")\n Call<ResponseBody> getWeather(@Query(\"key\") String key,@Query(\"area\") String area);\n @GET(\"group/{id}/users\")\n Call<List<User2>> groupList(@Field(\"id\") int groupId, @QueryMap Map<String,String> options);\n @GET\n Call<GankBean> getAndroid2Info(@Url String url);\n\n}",
"void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException;",
"@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}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n metGet(request, response);\n }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t}",
"public static boolean isGet(HttpServletRequest argRequest) {\r\n\t\treturn HttpConstants.GET.equalsIgnoreCase(argRequest.getMethod());\r\n\t}",
"@Override\r\n\t/**doget请求\r\n\t * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse\r\n\t * response)\r\n\t */\r\n\tprotected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\n\t\trequest.setCharacterEncoding(\"utf-8\");\r\n\t\tresponse.setCharacterEncoding(\"utf-8\");\r\n\t\tresponse.setContentType(\"application/json\");\r\n\t\tString op = request.getParameter(\"op\");\r\n\t\tif (\"queryAll\".equals(op)) {\r\n\t\t\tdoList(request, response);\r\n\t\t} else if (\"userAdd\".equals(op)) {\r\n\t\t\tdoAddUser(request, response);\r\n\t\t} else if (\"delUser\".equals(op)) {\r\n\t\t\tdoDelUser(request, response);\r\n\t\t} else if (\"updateUsers\".equals(op)) {\r\n\t\t\tdoUpdateUsers(request, response);\r\n\t\t} else if (\"batchDel\".equals(op)) {\r\n\t\t\tdoBatchDelUsers(request, response);\r\n\t\t} else if (\"resetPassword\".equals(op)) {\r\n\t\t\tdoChangePassword(request, response);\r\n\t\t}else if(\"usersChecked\".equals(op)){\r\n\t\t\tdoUsersChecked(request, response);\r\n\t\t}\r\n\t}",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n \r\n }",
"public interface TngouService {\n\n @GET(\"/tnfs/api/list\")\n Observable<PhotoModel> getPhotoList(@Query(\"id\") int id, @Query(\"page\") int page, @Query(\"rows\") int rows);\n\n\n// @GET(\"api/data/福利/10/{page}\")\n// Observable<PhotoModel> getPhotoList(@Path(\"page\") int page);\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 }",
"public String doHttpGet(String url, final String ...head);",
"public interface RequestService {\n @GET(\"index?type=yule&key=d7e184978722fe31928061a05ac7980c\")\n Call<ResponseBody> getString();\n}",
"public interface ApiService {\n\n @GET(\"109-35\")\n Observable<DataResponse> getHomeDatas(@QueryMap Map<String, Object> options);\n\n}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString data1 = new String(\"java\");\r\n\t\tArrayList<String> data2 = new ArrayList<String>();\r\n\t\tdata2.add(\"123455\");\r\n\t\tdata2.add(\"abcdef\");\r\n\t\tdata2.add(\"test\");\r\n\t\t\r\n\t\treq.setAttribute(\"v1\", data1);\r\n\t\treq.setAttribute(\"v2\", data2);\r\n\t\t\r\n\t\tServletContext context = this.getServletContext();\r\n\t\tRequestDispatcher dispatcher = context.getRequestDispatcher(\"/Servlet01_request?data3=http01&data4=http02\");\r\n\t\tdispatcher.forward(req, resp);\r\n\t\t\r\n\t\t\r\n\t}",
"@GET\n Call<Post> getByDirectUrlRequest(@Url String url);",
"@Override \r\nprotected void doGet(HttpServletRequest request, HttpServletResponse response) \r\nthrows ServletException, IOException { \r\nprocessRequest(request, response); \r\n}",
"public interface BaseURL {\n\n //INFOQ网址[目前全为移动端]\n String INFOQ_PATH = \"http://www.infoq.com/cn/\";\n\n //CSDN网址\n String CSDN_PATH = \"http://geek.csdn.net/\";\n\n //CSDN ajax请求算法\n String GEEK_CSDN_PATH = \"http://geek.csdn.net/service/news/\";\n\n String ITEYE_PATH_SHORT = \"http://www.iteye.com\";\n\n //ITEYE网址\n String ITEYE_PATH = ITEYE_PATH_SHORT + \"/\";\n\n //泡在网上的日子[移动版块]\n String JCC_PATH = \"http://www.jcodecraeer.com/\";\n\n //开源中国 [使用ajax请求]\n String OS_CHINA_PATH = \"https://www.oschina.net/\";\n\n //开源中国 [使用ajax请求]\n String OS_CHINA_PATH_AJAX = \"https://www.oschina.net/action/ajax/\";\n\n //CSDN搜索区\n String SEARCH_CSDN = \"http://so.csdn.net/so/search/\";\n\n //OSCHINA搜索区\n String SEARCH_OSCHINA = \"https://www.oschina.net/\";\n\n //INFOQ搜索区\n String SEARCH_INFOQ = \"http://www.infoq.com/\";\n\n\n /**\n * 获取CSDN文章链接\n *\n * @return\n * @\n */\n @GET(\"get_category_news_list\")\n Observable<String> getCSDNArticle(@Query(\"category_id\") String category_id,\n @Query(\"jsonpcallback\") String jsonpcallback,\n @Query(\"username\") String username,\n @Query(\"from\") String from,\n @Query(\"size\") String size,\n @Query(\"type\") String type,\n @Query(\"_\") String other);\n\n /**\n * ITeye文章链接\n *\n * @param page\n * @return\n */\n @GET(\"{type}\")\n Observable<String> getITEyeArticle(@Path(\"type\") String path, @Query(\"page\") int page);\n\n /**\n * ITEye 专栏笔记 位于blog之下\n *\n * @param path\n * @return\n */\n @GET(\"{path}\")\n Observable<String> getITEyeSubject(@Path(\"path\") String path);\n\n\n /**\n * Info文章链接\n *\n * @param id\n * @return\n */\n @GET(\"{type}/articles/{id}\")\n Observable<String> getInfoQArticle(@Path(\"type\") String type, @Path(\"id\") int id);\n\n /**\n * 泡在网上的日子 链接\n *\n * @param tid\n * @param pageNo\n * @return\n */\n @GET(\"plus/list.php\")\n Observable<String> getJccArticle(@Query(\"tid\") int tid, @Query(\"PageNo\") int pageNo);\n\n /**\n * OSChina 链接 ?type=0&p=5#catalogs\n *\n * @return\n */\n @GET(\"get_more_recommend_blog\")\n Observable<String> getOSChinaArticle(@Query(\"classification\") String classification, @Query(\"p\") int p);\n\n /**\n * 获取网页详细内容\n *\n * @return\n */\n @GET(\"{path}\")\n Observable<String> getWebContent(@Path(\"path\") String path);\n\n //http://so.csdn.net/so/search/s.do?q=Android&t=blog&o=&s=&l=null\n @GET(\"s.do\")\n Observable<String> searchCSDNContent(@Query(\"q\") String keyWords,\n @Query(\"t\") String type,\n @Query(\"o\") String o,\n @Query(\"s\") String s,\n @Query(\"l\") String l);\n\n //https://www.oschina.net/search?scope=blog&q=Android&fromerr=Nigvshhe\n @GET(\"search\")\n Observable<String> searchOSChinaContent(@Query(\"q\") String keyWords,\n @Query(\"scope\") String type,\n @Query(\"fromerr\") String formerr);\n\n\n //http://www.iteye.com/search?query=Android&type=blog\n @GET(\"search\")\n Observable<String> searchItEyeContent(@Query(\"query\") String keyWords,\n @Query(\"type\") String type);\n\n\n //http://www.jcodecraeer.com/plus/search.php?kwtype=0&q=Java\n @GET(\"plus/search.php\")\n Observable<String> searchJCCContent(@Query(\"keyword\") String keyWord,\n @Query(\"searchtype\") String searchType,\n @Query(\"orderby\") String orderby,\n @Query(\"kwtype\") String type,\n @Query(\"pagesize\") String pagesize,\n @Query(\"typeid\") String typeid,\n @Query(\"pageNo\") String pageNo);\n\n //http://www.infoq.com/cn/search.action?queryString=java&page=1&searchOrder=&sst=o9OURhPD52ER0BUp\n //sst 在infoQ中为搜索验证时使用 不对的话 将会有HTTP 404 异常\n //o9OURhPD52ER0BUp\n @GET(\"search.action\")\n Observable<String> searchInfoQContent(@Query(\"queryString\") String keyWords,\n @Query(\"page\") int page,\n @Query(\"searchOrder\") String order,\n @Query(\"sst\") String sst);\n\n //获取INFOQ的sst用于搜索\n @GET(\"mobile\")\n Observable<String> searchInfoQSST();\n\n //文件下载\n @GET(\"{photoPath}\")\n Observable<ResponseBody> downloadFile(@Path(value = \"photoPath\") String photoPath);\n\n\n}",
"public interface IDynamicRequestGET {\n public MultivaluedMap<String, String> getPathParams();\n public ContainerRequestContext getRequestContext();\n}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tSystem.out.println(\"请求AdminGetData成功\");\r\n//\t\tString userid = request.getHeader(\"userid\");\r\n//\t\tSystem.out.println(\"1231231::\"+userid);\r\n// \tif(userid==\"\"||userid==null) {\r\n//\t\t\tMap<String, Object> map = new HashMap<String, Object>();\r\n//\t\t\tSystem.out.println(\"userid为空\");\r\n//\t\t\tmap.put(\"code\", 0);\r\n//\t\t\tmap.put(\"data\", \"\");\r\n//\t\t\tmap.put(\"count\",0);\r\n//\t\t\tresponse.getWriter().write(JSON.toJSONString(map));\r\n// \t}else {\r\n\t\t\r\n\t\t//获取URI并进行截取方法名进行方法请求\r\n\t\t\tString requestURI = request.getRequestURI();\r\n\t\t\tSystem.out.println(\"地址截取前:\"+requestURI);\r\n\t\t\tString method = requestURI.substring(13, requestURI.length()-4);\r\n\t\t\tSystem.out.println(\"地址截取后:\"+method);\r\n\t\t\t\r\n\t\t\t//搜索单选选项条件值\r\n//\t\t\tString check = request.getParameter(\"check\");\r\n//\t\t\tSystem.out.println(\"单选check值:\"+check);\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tMethod declaredMethod = this.getClass().getDeclaredMethod(method, HttpServletRequest.class,HttpServletResponse.class);\r\n\t\t\t\tdeclaredMethod.invoke(this,request, response);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} \r\n// \t}\r\n\t}",
"@Override\n\tpublic HttpRespModel methodDispatch(String method, String body) {\n\t\tSituationMethod requestMethod = SituationMethod.fromString(method);\n\t\tHttpRespModel respModel = new HttpRespModel();\n\t\t\n\t\t\n\t\tswitch (requestMethod) {\n\t\tcase AddMealSituationMethod:\n\t\t{\n\t\t\t//添加吃饭记录\n\t\t\trespModel = addMealSituationHandler(body);\n\t\t\tbreak;\n\t\t}\n\t\tcase TodayMealSituationMethod:{\n\t\t\t//获取当天吃饭记录\n\t\t\trespModel = getTodayMealSituations(body);\n\t\t\tbreak;\n\t\t}\n\t\tcase AddSleepSituationMethod:{\n\t\t\t//添加睡觉情况记录\n\t\t\trespModel = addSleepSituation(body);\n\t\t\tbreak;\n\t\t\t\n\t\t}\n\t\tcase TodaySleepSituationMethod:{\n\t\t\t//获取当天睡觉情况记录\n\t\t\trespModel = getTodaySleepSituations(body);\n\t\t\tbreak;\n\t\t}\n\t\tcase InterestCateList:{\n\t\t\t//获取兴趣分类列表\n\t\t\tInterestUtil util = new InterestUtil();\n\t\t\trespModel = util.getAllInterestList();\n\t\t\tbreak;\n\t\t}\n\t\tcase TodayInterestSituationMethod:{\n\t\t\trespModel = getTodayInterestSituations(body);\n\t\t\tbreak;\n\t\t}\n\t\tcase AddInterestSituationMethod:{\n\t\t\t//添加兴趣学习清理\n\t\t\trespModel = addInterestSituation(body);\n\t\t\tbreak;\n\t\t}\n\t\tcase UnkonwnMethod:\n\t\tdefault:{\n\t\t\trespModel.setCode(RespError.urlMethodError);\n\t\t\trespModel.setMessage(\"对不起, method: \" + method + \"没有找到。\");\n\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t}\n\t\treturn respModel;\n\t}",
"public Result get(Get get) throws IOException;",
"private void setRequestMethod() {\n switch (type) {\n case GET:\n try {\n connection.setRequestMethod(GET);\n } catch (ProtocolException e) {\n LOG.severe(\"Could not set request as GET successfully\");\n LOG.severe(e.toString());\n }\n break;\n case POST:\n try {\n connection.setDoOutput(true);\n connection.setRequestMethod(POST);\n } catch (ProtocolException e) {\n LOG.severe(\"Could not set request as POST successfully\");\n LOG.severe(e.toString());\n }\n break;\n case PUT:\n try {\n connection.setDoOutput(true);\n connection.setRequestMethod(PUT);\n } catch (ProtocolException e) {\n LOG.severe(\"Could not set request as PUT successfully\");\n LOG.severe(e.toString());\n }\n break;\n case DELETE:\n try {\n connection.setDoOutput(true);\n connection.setRequestMethod(DELETE);\n } catch (ProtocolException e) {\n LOG.severe(\"Could not set request as DELETE successfully\");\n LOG.severe(e.toString());\n }\n break;\n case PATCH:\n try {\n connection.setDoOutput(true);\n connection.setRequestMethod(PATCH);\n } catch (ProtocolException e) {\n LOG.severe(\"Could not set request as PATCH successfully\");\n LOG.severe(e.toString());\n }\n break;\n }\n }",
"public interface MyServiceTwo {\n\n @GET(\"kehuduan/PAGE14503485387528442/index.json\")\n Call<XiongMao> getTwoImg();\n\n @GET(\"http://api.cntv.cn/apicommon/index?path=iphoneInterface/general/getArticleAndVideoListInfo.json&primary_id=PAGE1449807494852603,PAGE1451473625420136,PAGE1449807502866458,PAGE1451473627439140,PAGE1451473547108278,PAGE1451473628934144&serviceId=panda\")\n Call<Todal> getTwoTodal();\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 }",
"public String request(String method, String url, String data) {\n HttpURLConnection connection = null;\n try {\n if ((method.compareTo(\"GET\") == 0) && (data != null) && (!data.isEmpty())) {\n if (url.contains(\"?\"))\n url = url.concat(\"&\");\n else\n url = url.concat(\"?\");\n url = url.concat(data);\n }\n // Create connection\n URL requestUrl = new URL(url);\n connection = (HttpURLConnection) requestUrl.openConnection();\n connection.setRequestProperty(\"Veridu-Client\", this.key);\n if ((this.storage.getSessionToken() != null) && (!this.storage.getSessionToken().isEmpty()))\n connection.setRequestProperty(\"Veridu-Session\", this.storage.getSessionToken());\n connection.setRequestMethod(method);\n connection.setConnectTimeout(10000);\n connection.setReadTimeout(10000);\n connection.setUseCaches(false);\n connection.setDoOutput(true);\n // Send request\n if ((method.compareTo(\"GET\") != 0) && (data != null) && (!data.isEmpty())) {\n connection.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded\");\n connection.setRequestProperty(\"Content-Length\", Integer.toString(data.getBytes().length));\n connection.setDoInput(true);\n DataOutputStream wr = new DataOutputStream(connection.getOutputStream());\n wr.writeBytes(data);\n wr.flush();\n wr.close();\n }\n\n // Get Response\n this.lastCode = connection.getResponseCode();\n InputStream is;\n if (this.lastCode >= 400)\n is = connection.getErrorStream();\n else\n is = connection.getInputStream();\n BufferedReader rd = new BufferedReader(new InputStreamReader(is));\n String line;\n StringBuilder response = new StringBuilder();\n while ((line = rd.readLine()) != null) {\n response.append(line);\n response.append('\\r');\n }\n rd.close();\n return response.toString();\n\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (connection != null)\n connection.disconnect();\n }\n return null;\n }",
"@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\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}",
"@Override\n public String performGet(HttpServletRequest request) {\n return performPost(request);\n }",
"@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}",
"public interface BeaconQuestService {\n\n @GET(\"/beaconQuest/index/takeChallenge/{accountId}/{beaconId}\")\n Call<ResponseBody> takeChallenge (@Path(\"accountId\") String accountId,\n @Path(\"beaconId\") String beaconId\n );\n\n @GET(\"beaconQuest/index/challengeAnswer/{accountId}/{beaconId}/{answer}\")\n Call<ResponseBody> challengeAnswer(@Path(\"accountId\") String userid,\n @Path(\"beaconId\") String beaconid,\n @Path(\"answer\") String answer\n );\n\n @GET(\"beaconQuest/index//challengeCancel/{accountId}/{beaconId}\")\n Call<ResponseBody> challengeAnswer(@Path(\"accountId\") String userid,\n @Path(\"beaconId\") String beaconid\n );\n\n @GET(\"beaconQuest/index//register/{username}/{password}\")\n Call<ResponseBody> registerAccount(@Path(\"username\") String username,\n @Path(\"password\") String password\n );\n\n @GET(\"beaconQuest/index//login/{username}/{password}/\")\n Call<ResponseBody> login(@Path(\"username\") String username,\n @Path(\"password\") String password\n );\n}",
"public HttpResponseWrapper invokeGET(String path) {\n\t\treturn invokeHttpMethod(HttpMethodType.HTTP_GET, path, \"\");\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 }",
"public void GetData(String uri,String id ,String type){\n RequestPackage p = new RequestPackage();\n p.setUri(uri);\n p.setMethod(\"GET\");\n p.setParam(\"id\",id);\n p.setParam(\"type\",type);\n\n GetTask getTask = new GetTask();\n getTask.execute(p);\n\n\n\n }",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n }",
"String getQueryRequestUrl();",
"private void checkRequest(Request req) throws MethodNotAllowed, NotFound {\n if (!req.getHeader(\"Method\").equals(\"GET\") ||\n !req.getHeader(\"Version\").equals(\"HTTP/1.1\")) {\n throw new MethodNotAllowed();\n }\n if (req.getHeader(\"Path\").endsWith(\"/\")) {\n throw new NotFound();\n }\n }",
"Collection<HttpMethod> getMinimalSupportedHttpMethods();",
"Request _request(String operation);",
"void dispatchRequest(String urlPath) throws Exception;",
"public void setMethod(String method)\r\n {\r\n routing_method=method;\r\n }",
"private HttpUriRequest createHttpRequest(String url, String method,\n\t\t\tList<NameValuePair> params) throws UnsupportedEncodingException {\n\t\tHttpUriRequest request;\n\t\tif (method.toUpperCase().equals(\"GET\")) {\n\t\t\trequest = new HttpGet(url);\n\t\t} else if (method.toUpperCase().equals(\"POST\")) {\n\t\t\tHttpPost post = new HttpPost(url);\n\t\t\tpost.setEntity(new UrlEncodedFormEntity(params));\n\t\t\trequest = post;\n\t\t} else if (method.toUpperCase().equals(\"PUT\")) {\n\t\t\trequest = new HttpPut(url);\n\t\t} else if (method.toUpperCase().equals(\"DELETE\")) {\n\t\t\trequest = new HttpDelete(url);\n\t\t} else {\n\t\t\trequest = new HttpGet();\n\t\t}\n\n\t\treturn request;\n\t}",
"public String getHttpMethod() {\n return httpMethod;\n }",
"public void setRequestMethod(String requestMethod){\n this.requestMethod = requestMethod;\n }",
"public HTTPGetUtility(String requestURL) {\n super(requestURL, \"GET\");\n }",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\t\r\n\t}",
"String getMethod();",
"String getMethod();"
] | [
"0.7450784",
"0.69351697",
"0.6792845",
"0.6792845",
"0.6683708",
"0.65396285",
"0.6473864",
"0.6453372",
"0.6451835",
"0.6350462",
"0.6303853",
"0.62616706",
"0.6249558",
"0.621253",
"0.620593",
"0.6184517",
"0.6161724",
"0.61597204",
"0.6123876",
"0.61162436",
"0.6074225",
"0.6068609",
"0.6061384",
"0.6040732",
"0.602413",
"0.6016559",
"0.59996945",
"0.5974024",
"0.5969428",
"0.5955952",
"0.5953393",
"0.59379774",
"0.593778",
"0.5922895",
"0.59095895",
"0.5907561",
"0.5906694",
"0.5898972",
"0.58919626",
"0.5870876",
"0.585632",
"0.5838119",
"0.58350337",
"0.5830604",
"0.5830604",
"0.5830604",
"0.58091486",
"0.57956684",
"0.57885116",
"0.5775125",
"0.57619494",
"0.5760488",
"0.5756939",
"0.5756939",
"0.57539773",
"0.5752997",
"0.5752051",
"0.5743941",
"0.574327",
"0.5742319",
"0.5738694",
"0.5738694",
"0.57338566",
"0.57331985",
"0.571957",
"0.57068086",
"0.57038695",
"0.56996286",
"0.5698146",
"0.56860566",
"0.5661852",
"0.5660717",
"0.5658397",
"0.56576073",
"0.56567055",
"0.5652629",
"0.5652629",
"0.5651922",
"0.564772",
"0.5647645",
"0.5647645",
"0.56457806",
"0.56429875",
"0.5639856",
"0.5639282",
"0.56368023",
"0.56237143",
"0.562067",
"0.5616466",
"0.56156504",
"0.5614148",
"0.5610226",
"0.5607291",
"0.5605641",
"0.5603793",
"0.5588529",
"0.5582449",
"0.5568696",
"0.5566191",
"0.55650353",
"0.55650353"
] | 0.0 | -1 |
this method maps the following URL & http method URL: HTTP method: POST | @RequestMapping(value = "/exhibits/add", method = RequestMethod.POST)
public ResponseEntity<?> addExhibit(@RequestBody ExhibitEntity exhibit) {
logger.debug(messageSource.getMessage("controller.getRequest", new Object[]{exhibit}, Locale.getDefault()));
ExhibitEntity newExhibit = exhibitService.save(exhibit);
logger.debug(messageSource.getMessage("controller.returnResponse", new Object[]{newExhibit}, Locale.getDefault()));
return new ResponseEntity<>(newExhibit, HttpStatus.CREATED);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public String getMethod() {\n return \"POST\";\n }",
"@Override\n public String getMethod() {\n return \"POST\";\n }",
"@Override\n\tprotected HttpMethod requestMethod() {\n\t\treturn HttpMethod.POST;\n\t}",
"private static HttpUriRequest doPostMethod(String url, Map<String, String> param) throws UnsupportedEncodingException {\n HttpPost httpPost = new HttpPost(url);\n httpPost.setConfig(requestConfig);\n // 创建参数列表\n if (param != null) {\n List<NameValuePair> paramList = new ArrayList<>();\n for (String key : param.keySet()) {\n paramList.add(new BasicNameValuePair(key, param.get(key)));\n }\n // 模拟表单\n UrlEncodedFormEntity entity = new UrlEncodedFormEntity(paramList, \"utf-8\");\n httpPost.setEntity(entity);\n }\n return httpPost;\n }",
"public String post();",
"@Override\n\tpublic void doPost(Request request, Response response) {\n\n\t}",
"String postRequest(String url);",
"HttpResponse httpPost(URI uri);",
"public ResponseTranslator post() {\n setMethod(\"POST\");\n return doRequest();\n }",
"public HTTPRequestMethod getMethod();",
"HttpPost postRequest(HttpServletRequest request, String address) throws IOException;",
"@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) {\n }",
"public void doPost(HttpServletRequest request ,HttpServletResponse response){\n\n }",
"String getHttpMethod();",
"String getHttpMethod();",
"public RequestDataBuilder post() {\n\t\tRequest request = new Request(urlPattern, RequestMethod.POST);\n\t\tmap.put(request, clazz);\n\t\treturn this;\n\t}",
"@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 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 }",
"public RestUtils setMethodPost()\n\t{\n\t\trestMethodDef.setHttpMethodPost(true);\n\t\treturn this;\n\t}",
"@RequestMapping(value = \"/{id}\", method = RequestMethod.POST)\n public void post(@PathVariable(\"id\") String id, HttpServletRequest req){\n throw new NotImplementedException(\"To be implemented\");\n }",
"public void setMethod(HTTPMethod method);",
"@Override\n\tpublic void doPost(HttpRequest request, AbstractHttpResponse response)\n\t\t\tthrows IOException {\n\t\t\n\t}",
"public interface PostRequest {}",
"private void requestPost(String endpoint, Map<String, String> params, RequestListener listener) throws Exception {\n String requestUri = Constant.API_BASE_URL + ((endpoint.indexOf(\"/\") == 0) ? endpoint : \"/\" + endpoint);\n\n post(requestUri, params, listener);\n }",
"public HttpMethod getMethod()\r\n/* 44: */ {\r\n/* 45: 78 */ return HttpMethod.valueOf(this.servletRequest.getMethod());\r\n/* 46: */ }",
"public RequestDataBuilder post(String urlPattern) {\n\t\tRequest request = new Request(urlPattern, RequestMethod.POST);\n\t\tmap.put(request, clazz);\n\t\treturn this;\n\t}",
"public void doPost( )\n {\n \n }",
"public void postData() {\n\n\t}",
"public static boolean isPost(String argRequestMethod) {\r\n\t\treturn HttpConstants.POST.equalsIgnoreCase(argRequestMethod);\r\n\t}",
"default PacketMethod getMethod() {\n return PacketMethod.POST;\n }",
"@TargetApi(Build.VERSION_CODES.KITKAT)\n public String sendPost1() throws Exception {\n String urlParameters=parameter;\n byte[] postData = urlParameters.getBytes(\"UTF-8\");\n int postDataLength = postData.length;\n URL url;\n HttpURLConnection urlConn;\n DataOutputStream printout;\n DataInputStream input;\n url = new URL(\"http://203.151.92.175:8080/\"+method);\n urlConn = (HttpURLConnection) url.openConnection();\n urlConn.setDoInput(true);\n urlConn.setDoOutput(true);\n urlConn.setUseCaches(false);\n urlConn.setInstanceFollowRedirects(false);\n urlConn.setRequestMethod(\"POST\");\n urlConn.setRequestProperty(\"charset\", \"utf-8\");\n urlConn.setRequestProperty(\"Content-Length\", Integer.toString(postDataLength));\n urlConn.setRequestProperty(\"User-Agent\", USER_AGENT);\n urlConn.connect();\n DataOutputStream wr = new DataOutputStream(urlConn.getOutputStream());\n wr.write(postData);\n\n BufferedReader in = new BufferedReader(\n new InputStreamReader(urlConn.getInputStream()));\n String inputLine;\n StringBuffer response = new StringBuffer();\n\n while ((inputLine = in.readLine()) != null) {\n response.append(inputLine);\n }\n in.close();\n urlConn.disconnect();\n return response.toString();\n\n }",
"@Override\n\tprotected void handlePostBody(HashMap<String, HashMap<String, String>> params, DataFormat format) throws Exception {\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}",
"public HttpPost() {\n super();\n parameters = new HashMap<>();\n }",
"@Override\n\tpublic HttpResponse post(final String endpoint, final String body) {\n\t\treturn httpRequest(HTTP_POST, endpoint, body);\n\t}",
"public HttpMethod getMethod()\r\n/* 31: */ {\r\n/* 32:60 */ return HttpMethod.valueOf(this.httpRequest.getMethod());\r\n/* 33: */ }",
"@When(\"user calls {string} with Post http request\")\npublic void user_calls_with_post_http_request(String string) {\n\tresponse = res.when().post(\"/maps/api/place/add/json\")\n\t\t\t.then().spec(responspec).extract().response();\n \n}",
"private void addPostParams(final Request request) {\n if (apiVersion != null) {\n request.addPostParam(\"ApiVersion\", apiVersion);\n }\n\n if (voiceUrl != null) {\n request.addPostParam(\"VoiceUrl\", voiceUrl.toString());\n }\n\n if (voiceMethod != null) {\n request.addPostParam(\"VoiceMethod\", voiceMethod.toString());\n }\n\n if (voiceFallbackUrl != null) {\n request.addPostParam(\"VoiceFallbackUrl\", voiceFallbackUrl.toString());\n }\n\n if (voiceFallbackMethod != null) {\n request.addPostParam(\"VoiceFallbackMethod\", voiceFallbackMethod.toString());\n }\n\n if (statusCallback != null) {\n request.addPostParam(\"StatusCallback\", statusCallback.toString());\n }\n\n if (statusCallbackMethod != null) {\n request.addPostParam(\"StatusCallbackMethod\", statusCallbackMethod.toString());\n }\n\n if (voiceCallerIdLookup != null) {\n request.addPostParam(\"VoiceCallerIdLookup\", voiceCallerIdLookup.toString());\n }\n\n if (smsUrl != null) {\n request.addPostParam(\"SmsUrl\", smsUrl.toString());\n }\n\n if (smsMethod != null) {\n request.addPostParam(\"SmsMethod\", smsMethod.toString());\n }\n\n if (smsFallbackUrl != null) {\n request.addPostParam(\"SmsFallbackUrl\", smsFallbackUrl.toString());\n }\n\n if (smsFallbackMethod != null) {\n request.addPostParam(\"SmsFallbackMethod\", smsFallbackMethod.toString());\n }\n\n if (smsStatusCallback != null) {\n request.addPostParam(\"SmsStatusCallback\", smsStatusCallback.toString());\n }\n\n if (messageStatusCallback != null) {\n request.addPostParam(\"MessageStatusCallback\", messageStatusCallback.toString());\n }\n\n if (friendlyName != null) {\n request.addPostParam(\"FriendlyName\", friendlyName);\n }\n }",
"static String sendPOST(String POST_URL) throws IOException {\n\t\t// Check URL is valid or not.\n\t\tif (isValidURL(POST_URL)) {\n\t\t\ttry {\n\t\t\t\t//Initial connection\n\t\t\t\tURL obj = new URL(POST_URL);\n\t\t\t\tHttpURLConnection con = (HttpURLConnection) obj.openConnection();\n\t\t\t\tcon.setRequestMethod(\"POST\");\n\t\t\t\tcon.setRequestProperty(\"User-Agent\", USER_AGENT);\n\n\t\t\t\t// For POST only - START\n\t\t\t\tcon.setDoOutput(true);\n\t\t\t\tOutputStream os = con.getOutputStream();\n\t\t\t\tJSONArray array = new JSONArray();\n\t\t\t\t\n\t\t\t\t//Get Mac Adress.\n\t\t\t\tInetAddress ip = InetAddress.getLocalHost();\n\t\t\t\tNetworkInterface network = NetworkInterface.getByInetAddress(ip);\n\t\t\t\tbyte[] mac = network.getHardwareAddress();\n\t\t\t\tStringBuilder macString = new StringBuilder();\n\t\t\t\tfor (int i = 0; i < mac.length; i++) {\n\t\t\t\t\tmacString.append(String.format(\"%02X%s\", mac[i], (i < mac.length - 1) ? \"-\" : \"\"));\n\t\t\t\t}\n\t\t\t\t//Send mac address as parameter.\n\t\t\t\tCLIENT_PARAMS = macString.toString();\n\t\t\t\t\n\t\t\t\t//Send Params.\n\t\t\t\tarray.put(USER_PARAMS);\n\t\t\t\tarray.put(SCORE_PARAMS);\n\t\t\t\tarray.put(CLIENT_PARAMS);\n\t\t\t\tos.write(array.toString().getBytes());\n\n\t\t\t\tos.flush();\n\t\t\t\tos.close();\n\t\t\t\t// For POST only - END\n\n\t\t\t\tint responseCode = con.getResponseCode();\n\t\t\t\tSystem.out.println(\"POST Response Code :: \" + responseCode);\n\n\t\t\t\tif (responseCode == HttpURLConnection.HTTP_OK) { // success\n\t\t\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));\n\t\t\t\t\tString inputLine;\n\t\t\t\t\tStringBuffer response = new StringBuffer();\n\n\t\t\t\t\twhile ((inputLine = in.readLine()) != null) {\n\t\t\t\t\t\tresponse.append(inputLine);\n\t\t\t\t\t}\n\t\t\t\t\tin.close();\n\n\t\t\t\t\t// print result\n\t\t\t\t\tSystem.out.println(response.toString());\n\t\t\t\t\treturn \"POST request worked\"; // Added for testing.\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"POST request not worked\");\n\t\t\t\t\treturn \"POST request not worked\";\n\t\t\t\t}\n\t\t\t} catch (MalformedURLException e) {\n\t\t\t\treturn \"URL is valid but connection could not be established.\";\n\t\t\t} catch (IOException e) {\n\t\t\t\treturn \"URL is valid but connection could not be established.\";\n\t\t\t}\n\n\t\t} else {\n\t\t\treturn \"URL is not valid.\";\n\t\t}\n\t}",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t}",
"protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException {\n }",
"HttpResponse post(URL url, Map<String, String> headers, byte[] body, String mediaType)\n throws IOException;",
"@Override\n\tpublic String getRequestMethod() {\n\t\treturn requestMethod;\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 }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n}",
"@Override\n protected Map<String,String> getParams(){\n return postParameters;\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n }",
"@Override\n\tpublic void postHandle(WebRequest request, ModelMap model) throws Exception {\n\n\t}",
"@Override\n public JSONObject postToWalletServer(String urlSegment, String body) {\n HttpHeaders header = constructHttpHeaders();\n // Construct the http URL.\n String baseUrl = ConfigUtil.instants().getValue(\"walletServerBaseUrl\");\n String walletServerUrl = baseUrl + urlSegment;\n\n // Send the http request and get response.\n HttpEntity<JSONObject> entity = new HttpEntity<>(JSONObject.parseObject(body), header);\n ResponseEntity<JSONObject> exchange =\n REST_TEMPLATE.exchange(walletServerUrl, HttpMethod.POST, entity, JSONObject.class);\n\n // Return the posted model or instance or NFC card personalized data.\n return exchange.getBody();\n }",
"public interface HttpPoster {\n\n /**\n * Post data to the provided URL.\n *\n * @param url http url to be reached\n * @param headers headers to be sent\n * @param body body to be sent\n * @param mediaType media type definition\n * @return http response from the POST request\n * @throws IOException in case of http request error\n */\n HttpResponse post(URL url, Map<String, String> headers, byte[] body, String mediaType)\n throws IOException;\n}",
"public interface ApiService {\n\n @FormUrlEncoded\n @Headers(\"X-Requested-With: XMLHttpRequest\")\n @POST(\"Dealer_userLogin\")\n Call<LoginBean> login(@Field(\"username\") String userName, @Field(\"password\") String psw);\n\n\n @POST(\"D{ealer_estateLis}t\")\n Call<NewListBean> newList(@Path(\"ealer_estateLis\") String replaceableUrl);\n\n @FormUrlEncoded\n @Headers(\"X-Requested-With: XMLHttpRequest\")\n @POST(\"Dealer_estateDetail\")\n Call<SecondHandListBean> getSecondList(@Field(\"project_key\") String key);\n\n}",
"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}",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {\n\t\t\r\n\t}",
"private void StringRequest_POST() {\n\t\tString POST = \"http://api.juheapi.com/japi/toh?\";\n\t\trequest = new StringRequest(Method.POST, POST, new Listener<String>() {\n\n\t\t\t@Override\n\t\t\tpublic void onResponse(String arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tToast.makeText(MainActivity.this, arg0, Toast.LENGTH_LONG).show();\n\t\t\t}\n\t\t}, new ErrorListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onErrorResponse(VolleyError arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_LONG).show();\n\t\t\t}\n\t\t}){@Override\n\t\tprotected Map<String, String> getParams() throws AuthFailureError {\n\t\t\tHashMap< String , String> map = new HashMap<String,String>();\n\t\t\tmap.put(\"key\", \"7bc8ff86168092de65576a6166bfc47b\");\n\t\t\tmap.put(\"v\", \"1.0\");\n\t\t\tmap.put(\"month\", \"11\");\n\t\t\tmap.put(\"day\", \"1\");\n\t\t\treturn map;\n\t\t}};\n\t\trequest.addMarker(\"StringRequest_GET\");\n\t\tMyApplication.getHttpRequestQueue().add(request);\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n }",
"interface LockssPostMethod extends HttpMethod {\n long getResponseContentLength();\n }",
"private void postRequest() {\n\t\tSystem.out.println(\"post request, iam playing money\");\n\t}",
"@Test\n public void postRequest() {\n str = METHOD_POST + URI_SAMPLE + \" \" + HTTP_VERSION + ENDL +\n HOST_HEADER + \": www.site.ru\" + ENDL +\n \"Referer: \"+ URI_SAMPLE + ENDL +\n \"Cookie: income=1\" + ENDL +\n \"Content-Type: application/x-www-form-urlencoded\" + ENDL +\n \"Content-Length: 35\" + ENDL +\n \"login=Petya%20Vasechkin&password=qq\";\n\n request = new HttpRequest(str, IP_ADDRESS, HOST);\n assertEquals(request.getMethod(), HttpMethod.POST);\n assertEquals(request.getUrn(), \"www.site.ru/news.html\");\n assertEquals(request.getHeader(HOST_HEADER), \"www.site.ru\");\n assertEquals(request.getHeader(\"Referer\"), URI_SAMPLE);\n assertEquals(request.getHeader(\"Cookie\"), \"income=1\");\n assertEquals(request.getHeader(\"Content-Type\"), \"application/x-www-form-urlencoded\");\n assertEquals(request.getHeader(\"Content-Length\"), \"35\");\n assertEquals(request.getHeader(NONEXISTENT_VAR), \"\");\n\n assertEquals(request.getParameter(\"login\"), \"Petya Vasechkin\");\n assertEquals(request.getParameter(\"password\"), \"qq\");\n assertEquals(request.getParameter(NONEXISTENT_VAR), \"\");\n }",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }",
"public static String POST(String uri, int port){\n\t\t\n\t\tString domain = uri.split(\"/\",2)[0];\n\t\tString filename = uri.split(\"/\",2)[1];\n\t\tSocket socket;\n\t\t\n\t\tMap<String,String> arguments = new HashMap<>();\n\t arguments.put(\"key1\", \"value\");\n\t arguments.put(\"key2\", \"value\");\n\t StringBuilder sj = new StringBuilder();\n\t for(Map.Entry<String,String> entry : arguments.entrySet()) {\n\t try {\n\t \tif (sj.length() == 0) {\n\t\t\t\t\tsj.append(URLEncoder.encode(entry.getKey(), \"UTF-8\") + \"=\" + URLEncoder.encode(entry.getValue(), \"UTF-8\"));\n\t \t}\n\t \telse {\n\t\t\t\t\tsj.append(\"&\" + URLEncoder.encode(entry.getKey(), \"UTF-8\") + \"=\" + URLEncoder.encode(entry.getValue(), \"UTF-8\"));\n\n\t \t}\n\t\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t }\n//\t byte[] out = sj.toString().getBytes();\n\t\t\n\t\ttry {\n\t\t\tsocket = new Socket(domain, port);\n\t\n\t\t\t// send the command to the server.\n\t\t\tDataOutputStream outToServer = new DataOutputStream(socket.getOutputStream());\n\t\t\tBufferedReader inFromServer = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n\t\t\tString request = \"POST \" +\"/\"+ filename + \" HTTP/1.1 \"+\"\\r\\n\"+\"Host: \" + domain + \"\\r\\n\" \n\t\t\t\t\t+ \"Content-Type: application/x-www-form-urlencoded\" + \"\\r\\n\" + \"Content-Length: \" + sj.length()\n\t\t\t\t\t+ \"\\r\\n\\r\\n\" + sj;\n\t\t\tSystem.out.println(request);\n\t\t\toutToServer.writeBytes(request);\n\t\t\t\n\t\t} catch (UnknownHostException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t} catch (IOException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\treturn null;\n\t\t\n\t}",
"@Override\r\n\tpublic void doPost(CustomHttpRequest request, CustomHttpResponse response) throws Exception {\n\t\tdoGet(request, response);\r\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\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }",
"private void erweimaHttpPost() {\n\t\tHttpUtils httpUtils = new HttpUtils();\n\t\tUtils utils = new Utils();\n\t\tString[] verstring = utils.getVersionInfo(getActivity());\n\t\tRequestParams params = new RequestParams();\n\t\tparams.addHeader(\"ccq\", utils.getSystemVersion()+\",\"+ verstring[0]+\",\"+verstring[2]);\n\t\tparams.addBodyParameter(\"token\",\n\t\t\t\tnew DButil().gettoken(getActivity()));\n\t\tparams.addBodyParameter(\"member_id\",\n\t\t\t\tnew DButil().getMember_id(getActivity()));\n\t\thttpUtils.send(HttpMethod.POST, JiekouUtils.TUIGUANGERWEIMA, params,\n\t\t\t\tnew RequestCallBack<String>() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tLog.e(\"ee\", \"失败:\" + arg1);\n\t\t\t\t\t\thandler.sendEmptyMessage(HANDLER_NET_FAILURE);\n\t\t\t\t\t\t// handler.sendEmptyMessage(HANDLER_NET_FAILURE);\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onSuccess(ResponseInfo<String> arg0) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\terweimaJsonInfo(arg0.result);\n\t\t\t\t\t}\n\t\t\t\t});\n\t}",
"public void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows IOException {\n\n\t}",
"@Handle(method = HttpMethod.POST, path = \"/body\")\n void post(@Handle.Body String one, @Handle.Body String two, @Handle.Body String three);",
"public HttpPoster(final URL url, final String requestData) {\n\t\tsuper(url, HttpMethod.POST, requestData);\n\t}",
"public HttpResponse postData(String url) {\n\t HttpClient httpclient = new DefaultHttpClient();\n\t HttpPost httppost = new HttpPost(url);\n\n\t try {\n\t // Add your data\n\t \n\n\t // Execute HTTP Post Request\n\t HttpResponse response = httpclient.execute(httppost);\n\t return response;\n\t \n\t } catch (ClientProtocolException e) {\n\t \t\n\t // TODO Auto-generated catch block\n\t } catch (IOException e) {\n\t // TODO Auto-generated catch block\n\t }\n\t return null;\n\t }",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n }",
"@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n super.doPost(req, resp);\n }",
"public static void sendPostWebservice(Activity activity, String url, Response.Listener responseListener, Response.ErrorListener errorListener, final Map<String, String> params) {\n StringRequest stringRequest = new StringRequest(Request.Method.POST, url, responseListener, errorListener) {\n @Override\n protected Map<String, String> getParams() throws AuthFailureError {\n return params;\n }\n\n @Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> paramh = new HashMap<String, String>();\n paramh.put(\"Content-Type\", \"application/x-www-form-urlencoded\");\n return paramh;\n }\n };\n// Add the request to the RequestQueue.\n handler.addToRequestQueue(stringRequest);\n }",
"public HttpResponse post(String url,List<NameValuePair> nameValuePairs) {\n\t \n\t HttpClient httpclient = new DefaultHttpClient();\n\t HttpPost httppost = new HttpPost(url);\n\n\t try {\n\t httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));\n\t HttpResponse response = httpclient.execute(httppost);\n\t return response;\n\n\t } catch (ClientProtocolException e) {\n\t } catch (IOException e) {\n\t }\n\t return null;\n\t}",
"HttpRequest mo6260a(HttpMethod httpMethod, String str, Map<String, String> map);",
"@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}",
"public HttpPoster(final String url, final String requestData) {\n\t\tsuper(url, HttpMethod.POST, requestData);\n\t}",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n metPost(request, response);\n }",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n }",
"@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}",
"protected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {\n\t\treq.setCharacterEncoding(\"UTF-8\");\n Gson gson = new GsonBuilder()\n .setDateFormat(\"yyyy-MM-dd HH:mm:ss\")\n .create();\n\t\tBufferedReader br = req.getReader();\n\t\tStringBuilder jsonIn = new StringBuilder();\n\t\tString line = null;\n\t\twhile ((line = br.readLine()) != null) {\n\t\t\tjsonIn.append(line);\n\t\t}\n\t\tJsonObject jsonObject = gson.fromJson(jsonIn.toString(),\n\t\t\t\tJsonObject.class);\n\t\t//String action = jsonObject.get(\"action\").getAsString();\n\t\tString action = \"AllSell\";\n\t\tString outStr = \"\";\n\t\t// 注意:是大寫\n\t\tif (\"AllSell\".equals(action)) {\n\t\t\t//String url = req.getContextPath() + \"/room/room.do\";\n\t\t\tString url = null;\n\t\t\tif (\"10.0.2.2\".equals(req.getServerName())){\n\t\t\t\turl = \"http://\" + \"localhost\" + \":8081/DDD_web/room/room.do\";\n\t\t\t}else{\n\t\t\t\turl = \"http://\" + req.getServerName() + \":8081/DDD_web/room/room.do\";\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//String url = \"http://\" + \"localhost\" + \":8081/DDD_web/room/room.do\";\n\t\t\tSystem.out.println(\"url: \" + url);\n\t\t\tString charset = \"UTF-8\"; // Or in Java 7 and later, use the constant: java.nio.charset.StandardCharsets.UTF_8.name()\n\t\t\tString param1 = \"AllSell\";\n\t\t\t//String param2 = \"value2\";\n\t\t\t// ...\n\n\t\t\tString query = String.format(\"action=%s\", URLEncoder.encode(param1, charset));\n\t\t\t//String query = String.format(\"action=%s¶m2=%s\", URLEncoder.encode(param1, charset), URLEncoder.encode(param2, charset));\n\t\t\t\n\t\t\tHttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection();\n\t\t\tconnection.setDoOutput(true); // Triggers POST.\n\t\t\tconnection.setRequestProperty(\"Accept-Charset\", charset);\n\t\t\tconnection.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded;charset=\" + charset);\n\t\t\t\n\t\t\t// getOutputStream會自動開啟連線:\n\t\t\ttry (OutputStream output = connection.getOutputStream()) {\n\t\t\t output.write(query.getBytes(charset));\n\t\t\t //output.close(); // try-catch-with resources會自動關閉\n\t\t\t}\n//\t\t\tInputStream response = connection.getInputStream();\n\t\t\t//connection.connect();\n\t\t\t\n\t int responseCode = connection.getResponseCode();\n\t // 確認能與server建立Socket連線\n\t if (responseCode == 200) {\n\t \tSystem.out.println(\"response code: \" + responseCode);\n\t // connection.getInputStream() - 等待server回應,如果還沒有回應就hold在這邊\n\t //BufferedReader br_02 = new BufferedReader(new InputStreamReader(connection.getInputStream()));\n\t } else {\n\t System.out.println(\"response code: \" + responseCode);\n\t }\n\t connection.disconnect();\n\t\t\t\n\t\t}\t\n\t\t\n\t\t\n\t\t\n\t}",
"public void postRequest() {\n apiUtil = new APIUtil();\n // As this is an API call , we are not setting up any base url but defining the individual calls\n apiUtil.setBaseURI(configurationReader.get(\"BaseURL\"));\n //This is used to validate the get call protected with basic authentication mechanism\n basicAuthValidation();\n scenario.write(\"Request body parameters are :-\");\n SamplePOJO samplePOJO = new SamplePOJO();\n samplePOJO.setFirstName(scenarioContext.getContext(\"firstName\"));\n samplePOJO.setLastName(scenarioContext.getContext(\"lastName\"));\n\n ObjectMapper objectMapper = new ObjectMapper();\n try {\n apiUtil.setRequestBody(objectMapper.writeValueAsString(samplePOJO));\n } catch (JsonProcessingException e) {\n e.printStackTrace();\n }\n }",
"private String postRequest(String requestUrl, String postData) throws IOException {\n URL url = new URL(requestUrl);\n \n Log.i(TAG, \"Opening Token URL \" + url.toString());\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setRequestMethod(\"POST\");\n urlConnection.setDoInput(true);\n urlConnection.setDoOutput(true);\n OutputStreamWriter writer = new OutputStreamWriter(urlConnection.getOutputStream());\n writer.write(postData);\n writer.flush();\n String response = streamToString(urlConnection.getInputStream());\n \n return response;\n }",
"public Request<E, T> buildHttpPost ()\n\t{\n\t\treturn new HttpPostRequest<E, T>(this);\n\t}",
"public void PreparedPostRequest(String username, String password);",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }",
"private static String facebookPostMethod(String host, String urlPostfix, List <NameValuePair> nvps){\r\n System.out.println(\"@executing facebookPostMethod():\" + host + urlPostfix);\r\n String responseStr = null;\r\n try {\r\n HttpPost httpost = new HttpPost(host + urlPostfix);\r\n httpost.setEntity(new UrlEncodedFormEntity(nvps, HTTP.UTF_8));\r\n\r\n // execute postMethod\r\n HttpResponse postResponse = httpClient.execute(httpost);\r\n HttpEntity entity = postResponse.getEntity();\r\n\r\n System.out.println(\"facebookPostMethod: \" + postResponse.getStatusLine());\r\n if (entity != null) {\r\n responseStr = EntityUtils.toString(entity);\r\n //System.out.println(responseStr);\r\n entity.consumeContent();\r\n }\r\n System.out.println(\"Post Method done(\" + postResponse.getStatusLine().getStatusCode()+\"), response string length: \" + (responseStr==null? 0:responseStr.length()));\r\n } catch (IOException e) {\r\n System.out.println(e.getMessage());\r\n }\r\n //TODO process the respons string\r\n //if statusCode == 200: no error;(responsStr contains \"errorDescription\":\"No error.\")\r\n //else retry?\r\n return responseStr;\r\n }",
"public static HttpURLConnection post (Uri url) throws IOException{\n\n //Create the connection to the url\n HttpURLConnection con = (HttpURLConnection) (new URL(url.getPath())).openConnection();\n\n // Add the http header to the request\n con.setDoOutput(true); // Triggers POST.\n con.setRequestProperty(\"User-Agent\", urlCharset);\n con.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded;charset=\" + urlCharset);\n\n // Write the parameters to the query string and send the post request to the url\n DataOutputStream wr = new DataOutputStream(con.getOutputStream());\n wr.writeBytes(url.getQuery());\n wr.flush();\n wr.close();\n\n return con;\n }",
"public static String postrequest(String Domain, String path, Map<String, String> para ) {\r\n StringBuffer result = new StringBuffer();\r\n try\r\n {\r\n URL url = new URL(Domain + \"/\" + path + \"/\" );\r\n StringBuilder postData = new StringBuilder();\r\n for (Map.Entry<String,String> param : para.entrySet())\r\n {\r\n if (postData.length() != 0) postData.append('&');\r\n postData.append(URLEncoder.encode(param.getKey(), \"UTF-8\"));\r\n postData.append('=');\r\n postData.append(URLEncoder.encode(String.valueOf(param.getValue()), \"UTF-8\"));\r\n }\r\n\r\n byte[] postDataBytes = postData.toString().getBytes(\"UTF-8\");\r\n HttpURLConnection conn = (HttpURLConnection)url.openConnection();\r\n conn.setRequestMethod(\"POST\");\r\n conn.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded\");\r\n conn.setRequestProperty(\"Content-Length\", String.valueOf(postDataBytes.length));\r\n conn.setDoOutput(true);\r\n conn.getOutputStream().write(postDataBytes);\r\n BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream(), \"UTF-8\"));\r\n\r\n\r\n String line = \"\";\r\n while ((line = in.readLine()) != null) {\r\n result.append(line);\r\n }\r\n JSONObject o = new JSONObject(result.toString());\r\n String s1=o.get(\"token\").toString();\r\n System.out.print(s1);\r\n\r\n } catch (MalformedURLException e) {\r\n e.printStackTrace();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n return String.valueOf(result);\r\n }",
"public MockHttpServletRequest newPost(String url) {\n return new MockHttpServletRequest(\"POST\", url);\n }",
"public void makePOSTRequest(List data) {\n Log.d(\"APP:\", \"AsyncTask: Generating httpPOsts...\");\n\n counter++;\n HttpPost httpPost = new HttpPost(POST_URI);\n\n List<NameValuePair> nameValuePairs = data;\n\n try {\n httpPost.setEntity(new UrlEncodedFormEntity(nameValuePairs));\n }catch (UnsupportedEncodingException e){\n e.printStackTrace();\n }\n postmessages.add(httpPost);\n }",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\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\n public String post(final Request request, final Response response) {\n final String phases = request.queryParams(\"phases\");\n Type type = Type.SIMPLE;\n switch (phases) {\n case \"1-phase\":\n type = Type.SIMPLE;\n break;\n case \"2-phase\":\n type = Type.CHECKED;\n break;\n default:\n response.status(400);\n return \"\";\n }\n final Bank bank = BankController.getBank(request);\n if (bank == null) {\n // invalid bank\n response.status(404);\n return \"\";\n }\n final TransactionId transactionId = bank.createTransaction(type);\n // send id of the created transaction to client\n return transactionId.getUri();\n }",
"public String getRequestMethod(){\n return this.requestMethod;\n }",
"@SuppressWarnings(\"Duplicates\")\n protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n String api = request.getParameter(\"api\");\n System.out.println(\"DetectLanguage with \" + api + \" API\");\n if (api.equals(\"watson\")) {\n watsonDetectServlet.doPost(request, response);\n }else if(api.equals(\"azure\")){\n azureDetectServlet.doPost(request,response);\n }else{\n googleDetectServlet.doPost(request,response);\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}"
] | [
"0.77097327",
"0.7580948",
"0.75152856",
"0.7006632",
"0.68538254",
"0.67290294",
"0.659889",
"0.64780617",
"0.64771",
"0.6371598",
"0.63588065",
"0.63393205",
"0.633861",
"0.62656075",
"0.62656075",
"0.62579113",
"0.62463015",
"0.61860055",
"0.616394",
"0.61494434",
"0.6114547",
"0.60718983",
"0.605318",
"0.60362804",
"0.601462",
"0.60074484",
"0.5978443",
"0.5976585",
"0.59759897",
"0.59542817",
"0.59371924",
"0.5925228",
"0.59107774",
"0.58944386",
"0.5884302",
"0.5883239",
"0.58729243",
"0.5871943",
"0.5855561",
"0.5852222",
"0.5844857",
"0.5821125",
"0.58149815",
"0.5808272",
"0.5808272",
"0.5802401",
"0.5796947",
"0.5781129",
"0.5773646",
"0.5766304",
"0.5749165",
"0.5748103",
"0.5739277",
"0.5736242",
"0.5728496",
"0.5727352",
"0.57105947",
"0.5702432",
"0.568561",
"0.5678462",
"0.56771195",
"0.5672897",
"0.5669945",
"0.5662511",
"0.56501085",
"0.5639944",
"0.56366193",
"0.56340957",
"0.5632959",
"0.56249666",
"0.5623254",
"0.56224126",
"0.56151897",
"0.5614446",
"0.56109285",
"0.56109285",
"0.56109285",
"0.5609262",
"0.5596352",
"0.55812293",
"0.5577348",
"0.5577348",
"0.5577348",
"0.55765444",
"0.557463",
"0.5571026",
"0.5569897",
"0.55658656",
"0.5554627",
"0.55516714",
"0.55514234",
"0.5545721",
"0.55436397",
"0.55338955",
"0.5532906",
"0.5522872",
"0.5520107",
"0.5518714",
"0.5518342",
"0.5514218",
"0.5514218"
] | 0.0 | -1 |
Thread que fica esperando por novos objetos na conexao, quando recebe um novo objeto, escreve para a classe que implementa a interface receber | public Listener(InputStream is, Receber acoes){
this.acoes = acoes;
this.is = is;
this.start();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void toThread() {\n\t\t// TODO Auto-generated method stub\n\t\tnew Thread(this).start();\n\t\tclient.start();\n\t}",
"public void execute()\n\t {\n\t // espera a que se conecte cada cliente\n\t for ( int i = 0; i < jugadores.length; i++ ) //<-- dos por defecto o de 0 a 1\n\t {\n\t try // espera la conexión, crea el objeto Jugador, inicia objeto Runnable\n\t {\n\t \t//el metodo accept() es bloqueante hasta recibir una conexion\n\t jugadores[i] = new Jugador( servidor.accept(), i );\n\t //el constructor de jugador recibe un objeto socket crea los flujos E/S\n\t ejecutarJuego.execute(jugadores[i]); // ejecuta el objeto Runnable subproceso\n\t } // fin de try\n\t catch ( IOException excepcionES ) \n\t {\n\t excepcionES.printStackTrace();\n\t System.exit(1);\n\t } // fin de catch\n\t } // fin de for\n\n\t bloqueoJuego.lock(); // bloquea el juego para avisar al subproceso del jugador Uno\n\n\t try\n\t {\n\t jugadores[JUGADOR_1].establecerSuspendido(false); // continúa el jugador Uno\n\t otroJugadorConectado.signal(); // despierta el subproceso del jugador Uno\n\t } // fin de try\n\t finally\n\t {\n\t bloqueoJuego.unlock(); // desbloquea el juego después de avisar al jugador Uno\n\t } // fin de finally\n\t }",
"private void Thread() {\n\n Thread thread = new Thread ( new Runnable() {\n \n @Override\n public void run() {\n \n String mensagem = \"\";\n\n try {\n \n InputStreamReader isr = new InputStreamReader(socket.getInputStream());\n BufferedReader br = new BufferedReader(isr);\n\n while ((mensagem = br.readLine()) != null) {\n\n enviarMensagem(mensagem);\n }\n } catch ( Exception e ) {\n e.printStackTrace();\n }\n }\n });\n //para iniciar a thread\n thread.start();\n }",
"@Override\n\tpublic void run() {\n\t\twhile (true) {\n\t\t\t//让改线程可以接受到客户端的信息;\n\t\t\ttry {\n//\t\t\t\tThread.sleep(2000);\n\t\t\tObjectInputStream ois=new ObjectInputStream(s.getInputStream());\n\t\t\tMessage message=(Message) ois.readObject();\n\t\t\tSystem.out.println(message.getSender()+\"给\"+message.getGetter()+\"说\"+message.getCon());\n\t\t\t//这里进行转发;\n\t\t\t/*\n\t\t\t * 转发时出现错误;???????????已解决;\n\t\t\t */\n\t\t\t//取得接收人的通讯线程;\n\t\t\tServerConnectClient scClient=ManageQQClientTh.getClientThread(message.getGetter());\n\t\t\tObjectOutputStream oos=new ObjectOutputStream(scClient.s.getOutputStream());\n\t\t\t\toos.writeObject(message);\n\t\t\n\t\t\t\t} catch (IOException | ClassNotFoundException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}",
"public void run() {\n\t\ttry {\n\t\t\tin = new BufferedReader(new InputStreamReader(cliente.getInputStream()));\n\t\t\tmOut = new PrintWriter(new BufferedWriter(new OutputStreamWriter(cliente.getOutputStream())), true);\n\n\t\t\tint comparar = idCliente(); //recibe id del cliente\n\t\t\tif(comparar==0) { \n\t\t\t\t//ENVIA id PARA EL CLIENTE\n\t\t\t\tthis.tcpServidor.maxCliente++;\n\t\t\t\tenviarMensaje(\"ID;\"+this.tcpServidor.maxCliente);\n\t\t\t\t//ENVIA maxCliente A TODAS LAS REPLICAS\n\t\t\t\tfor (HiloReplica h : this.tcpServidor.hiloReplica) {\n\t\t\t\t\th.enviarMensaje(\"MAXCLIENTE;\"+this.tcpServidor.maxCliente);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.idCliente = comparar; //GUARDA id DEL CLIENTE\n\t\t\t}\n\t\n\t\t\tSystem.out.println(\"Cliente \"+this.idCliente+\" conectado a Balanceado \"+this.tcpServidor.id);\n\t\t\t\n\t\t\tpeticionDeCliente();\n\t\t\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t//System.out.println(\"HiloCliente\" + \": Error\" + e);\n\t\t}\n\t}",
"void onRecvObject(Object object);",
"@Override\n\tpublic void run() {\n\t\ttry {\n\t\t\tServerSocket servidor = new ServerSocket(8888);\n\t\t\t\n\t\t\tString nick,ip,mensaje;\n\t\t\t\n\t\t\tPaquete paquete_recibido;\n\t\t\twhile(true)\n\t\t\t{\n\t\t\t\n\t\t\tSocket miSocket = servidor.accept();\n\t\t\t\n\t\t\tObjectInputStream paquete_datos = new ObjectInputStream(miSocket.getInputStream());\n\t\t\t\n\t\t\tpaquete_recibido =(Paquete) paquete_datos.readObject();\n\t\t\t\n\t\t\tnick = paquete_recibido.getNick();\n\t\t\t\n\t\t\tip = paquete_recibido.getIp();\n\t\t\t\n\t\t\tmensaje = paquete_recibido.getMensaje();\n\t\t\t\n\t\t\t\n\t\t\t/*DataInputStream flujo_entrada = new DataInputStream(miSocket.getInputStream());\n\t\t\t\n\t\t\tString mensaje = flujo_entrada.readUTF();\n\t\t\t\n\t\t\tareatexto.append(\"\\n\" + mensaje);\n\t\t\t*/\n\t\t\t\n\t\t\tareatexto.append(\"\\n\" +nick +\": \"+mensaje +\" para: \"+ ip);\n\t\t\t\n\t\t\t\n\t\t\tmiSocket.close();\n\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} catch (ClassNotFoundException 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 Conectar(){\n Executors.newSingleThreadExecutor().execute(() -> {\n try {\n ws.connect();\n // se indica que el proposito del mensaje es identificar este nodo.\n // para lo cual se manda en el cuerpo que se trata de una tablet origin\n // y se envia la identificacion.\n String mensaje = buildMessage(this.PROPOSITO_ID, this.id, this.TABLET_ORIG);\n ws.sendText(mensaje);\n } catch (WebSocketException e) {\n e.printStackTrace();\n }\n });\n }",
"@Override\n\tpublic void run() {\n\t\twhile(true) {\n\t\t\tCliente c = criaCliente();\n\t\t\tArrayList<Integer> t = new ArrayList<Integer>();\t\t\t\n\t\t\tt = geraTempoServicos(c.getServicosSolicitados().size());\n\n\t\t\t// Atribui o tempo aos serviços da forma especificada na descrição do projeto\n\t\t\t// Obs: getServico() da classe serviço não gasta um serviço\n\t\t\tfor(Servico s: c.getServicosSolicitados()) {\n\t\t\t\tif(s.getTipo() == TipoServico.PENTEADO) {\n\t\t\t\t\ts.setTempo(t.get(0));\n\t\t\t\t\tt.remove(0);\n\t\t\t\t} else if(s.getTipo() == TipoServico.CORTE) {\n\t\t\t\t\ts.setTempo(t.get(0));\n\t\t\t\t\tt.remove(0);\n\t\t\t\t} else if(s.getTipo() == TipoServico.DEPILACAO) {\t\n\t\t\t\t\ts.setTempo(t.get(0));\n\t\t\t\t\tt.remove(0);\n\t\t\t\t} else if(s.getTipo() == TipoServico.PEDICURE) {\t\n\t\t\t\t\ts.setTempo(t.get(0));\n\t\t\t\t\tt.remove(0);\n\t\t\t\t} else if(s.getTipo() == TipoServico.MASSAGEM) {\t\n\t\t\t\t\ts.setTempo(t.get(0));\n\t\t\t\t\tt.remove(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfilas.insereEmFilaClientes(0, c);\n\t\t\t\n\t\t\ttry {\t\n\t\t\t\t// Tempo de geração de clientes: 1 ~ 5 segundos\n\t\t\t\tThread.sleep(500*(rand.nextInt(5)+1));\n\t\t\t} catch(InterruptedException ex) {\n\t\t\t\t Thread.currentThread().interrupt();\n\t\t\t}\n\t\t}\n\t}",
"public void run(){\n\t\t\tObjectReader readerClient = new ObjectReader(in, clientInetAddress);\r\n\t\t\treaderClient.start();\r\n\t\t\t\r\n\t\t\t// Constantly checks msgToSend for messages and sends them\r\n\t\t\twhile(true){\r\n\t\t\t\ttry{\r\n\t\t\t\t\t// Send message\r\n\t\t\t\t\tif(msgToSend.length() != 0){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tout.writeObject(new DataObject(DataObject.STRING, msgToSend.toString()));\r\n\t\t\t\t\t\tout.flush();\r\n\t\t\t\t\t\tmsgToSend.setLength(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tcatch(IOException ioe){\r\n\t\t\t\t\tioe.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}",
"@Override\n protected INetworkObject doInBackground(INetworkObject... params) {\n if(params==null){return null;}\n netObj = params[0];\n try {\n if(netObj.getClass()==NetworkObjectPosition.class){\n communicateWithServer((NetworkObjectPosition) netObj);\n }\n if(netObj.getClass()==NetworkObjectGetID.class){\n communicateWithServer((NetworkObjectGetID) netObj);\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n return netObj;\n }",
"@Override\n\tpublic void run() {\n\t\tProtocoleEthernet.envoie(proprietaire, this);\n\t}",
"@Override\r\n\tpublic void run() {\n\t\ttry {\r\n\t\t\t//creamos un server socket que se conecte al puerto 9999\r\n\t\t\tServerSocket servidor = new ServerSocket(9999);\r\n\t\t\t//instanciamos variables y un array list\r\n\t\t\tString nick, ip, mensaje;\r\n\t\t\t\r\n\t\t\tArrayList<String> listaIp = new ArrayList<String>();\r\n\t\t//y la clase paquete envio\r\n\t\t\tPaqueteEnvio paquete_recibido;\r\n\t\t\t\r\n\t\t\t//creamos un bucle infinito para que siempre este a la escucha\r\n\t\t\twhile(true) {\r\n\t\t\t\t//aceptamos la conexion\r\n\t\t\tSocket misocket = servidor.accept();\r\n\t\t\t//creamos una object inputstream para desmigar el paquete que nos viene del cliente\r\n\t\t\tObjectInputStream paquete_datos = new ObjectInputStream(misocket.getInputStream());\r\n\t\t\t//lo leemos\r\n\t\t\tpaquete_recibido = (PaqueteEnvio) paquete_datos.readObject();\r\n\t\t\t//lo desmigamos en variables con los metodos get\r\n\t\t\tnick = paquete_recibido.getNick();\r\n\t\t\t\r\n\t\t\tip = paquete_recibido.getIp();\r\n\t\t\t\r\n\t\t\tmensaje = paquete_recibido.getMensaje();\r\n\t\t\t\r\n\t\t\t//DataInputStream flujo_entrada = new DataInputStream(misocket.getInputStream());\r\n\t\t\t\r\n\t\t\t//String mensaje_texto = flujo_entrada.readUTF();\r\n\t\t\t\r\n\t\t\t//areatexto.append(\"\\n\"+mensaje_texto);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t// diferenciamos los mensaje si es dimerente de \" online\" el mensaje\r\n\t\t\t if(!mensaje.equals(\" online\")) {\r\n\t\t\t\t //y si el id es diferente de \"Grupo\"\r\n\t\t\t\t if(!ip.equals(\"Grupo\")) {\r\n\t\t\t\t\t// mostramos el texto\r\n\t\t\t\t\t areatexto.append(\"\\n\"+ nick +\": \"+mensaje+\" para \"+ip);\r\n\t\t\t\t//creamos el socket con la ip recivida para enviar el mensaje\r\n\t\t\t\t\t Socket enviaDestinatario = new Socket(ip, 9090);\r\n\t\t\t\t//creamos el object stream \r\n\t\t\t\t\t ObjectOutputStream paqueteReenvio = new ObjectOutputStream(enviaDestinatario.getOutputStream());\r\n\t\t\t\t//escribimos en el\r\n\t\t\t\t\t paqueteReenvio.writeObject(paquete_recibido);\r\n\t\t\t\t//cerramos todo\r\n\t\t\t\t\t paqueteReenvio.close();\r\n\t\t\t\t\r\n\t\t\t\t\t enviaDestinatario.close();\r\n\t\t\t\t\r\n\t\t\t\t\t misocket.close();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t }\r\n\t\t\t\t \r\n\t\t\t\t else {//en caso de ser \"Grupo\" hacemos exactamente lo mismo que antes menos por una cosa, primero mostramos texto\r\n\t\t\t\t\t areatexto.append(\"\\n Grupo-->\"+ nick +\": \"+mensaje+\" para grupo\");\r\n\t\t\t\t\t //creamos un bucle foreach en el que enviamos a cada ip del array el mensaje\r\n\t\t\t\t\t for(String z:listaIp) {\r\n\t\t\t\t\t\t //el socket lo creamos con z \r\n\t\t\t\t\t\t \tSocket enviaDestinatario = new Socket(z, 9090);\r\n\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t \tnick = \"Grupo--->\"+nick;\r\n\t\t\t\t\t\t \t//le decimos que concatene el nick con el texto grupo para que el cliente sepa de donde viene el mensaje y que njo es algro privado\r\n\t\t\t\t\t\t \tpaquete_recibido.setNick(nick);\r\n\t\t\t\t\t\t\t//objetos de salida\r\n\t\t\t\t\t\t\tObjectOutputStream paqueteReenvio = new ObjectOutputStream(enviaDestinatario.getOutputStream());\r\n\t\t\t\t\t\t\t//escribimos\r\n\t\t\t\t\t\t\tpaqueteReenvio.writeObject(paquete_recibido);\r\n\t\t\t\t\t\t\t//cerramos todo\r\n\t\t\t\t\t\t\tpaqueteReenvio.close();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tenviaDestinatario.close();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tmisocket.close();\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t }\r\n\t\t\t\t\t \r\n\t\t\t\t \t\r\n\t\t\t\t \t\r\n\t\t\t\t }\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse {// si el texto recibido seria \" online\" seria una peticion de conexion\r\n\t\t\t\t\r\n\t\t\t\t//-----------------DETECTA ONLINE--------------------\r\n\t\t\t\t//cojemos la ip de el mensajero\r\n\t\t\t\tInetAddress localizacion =misocket.getInetAddress();\r\n\t\t\t\t//la almacenamos\r\n\t\t\t\tString IpRemota = localizacion.getHostAddress();\r\n\t\t\t\t\r\n\t\t\t\t//System.out.println(\"Online \"+IpRemota);\r\n\t\t\t\t//la a�adimos al array list\r\n\t\t\t\tlistaIp.add(IpRemota);\r\n\t\t\t\t//escribimos en el objeto con el metodo setIps\r\n\t\t\t\tpaquete_recibido.setIps(listaIp);\r\n\t\t\t\t//creamos el bucle foreach\r\n\t\t\t\tfor(String z:listaIp) {\r\n\t\t\t\t\t//mostramos los usuarios conectados en el array\r\n\t\t\t\t\tareatexto.append(\"\\n Usuario conectado: \"+z);\r\n\t\t\t\t\t//creamos el socket para cada destinatario y enviamos la informacion\r\n\t\t\t\t\tSocket enviaDestinatario = new Socket(z, 9090);\r\n\t\t\t\t\t\r\n\t\t\t\t\tObjectOutputStream paqueteReenvio = new ObjectOutputStream(enviaDestinatario.getOutputStream());\r\n\t\t\t\t\t\r\n\t\t\t\t\tpaqueteReenvio.writeObject(paquete_recibido);\r\n\t\t\t\t\t\r\n\t\t\t\t\tpaqueteReenvio.close();\r\n\t\t\t\t\t\r\n\t\t\t\t\tenviaDestinatario.close();\r\n\t\t\t\t\t\r\n\t\t\t\t\tmisocket.close();\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//---------------------------------------------------\r\n\t\t\t\t\r\n\t\t\t} \r\n\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} catch (IOException | ClassNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void run(){\r\n\r\n\t\tString message = new String();\r\n\t\t\r\n\t\t\r\n\t\twhile(escoltant){\r\n\t\t\ttry{\r\n\t\t\t\t\r\n\t\t\t\tsClient = sServer.accept();\r\n\t\t\t\t\r\n\t\t\t\tdataIn = new ObjectInputStream(sClient.getInputStream());\r\n\t\t\t\t\r\n\t\t\t\tdataOut = new ObjectOutputStream(sClient.getOutputStream());\r\n\t\t\t\t//objectOut = new ObjectOutputStream(sClient.getOutputStream());\r\n\t\t\t\t\r\n\t\t\t\tmessage = (String)dataIn.readObject();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif (message.startsWith(\"ADD\")){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif(Logica.addUser(message)){\r\n\t\t\t\t\t\tdataOut.writeObject(\"OK\");\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tdataOut.writeObject(\"KO\");\r\n\t\t\t\t\t}\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (message.startsWith(\"LOG\")){\r\n\t\t\t\t\tdataOut.writeObject(Logica.checkUser(message));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(message.equals(\"MAPES\")){\r\n\t\t\t\r\n\t\t\t\t\tdataOut.writeObject(Logica.enviaEscenaris());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(message.startsWith(\"GUANYADA\")){\r\n\t\t\t\t\t\r\n\t\t\t\t\tConectorDB.insertPartidaGuanyada();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(message.startsWith(\"PERDUDA\")){\r\n\t\t\t\t\t\r\n\t\t\t\t\tConectorDB.insertPartidaPerduda();\r\n\t\t\t\t}\r\n\t\t\t\tdataIn.close();\r\n\t\t\t\tdataOut.close();\r\n\t\t\t\t\r\n\t\t\t\tsClient.close();\r\n\t\t\t}catch(IOException e){\r\n\t\t\t\t\r\n\t\t\t} catch (ClassNotFoundException 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\r\n\t\t}\r\n\t}",
"private void arrancarHiloCambiosVentas() {\n HiloCambiosVentas hilo = new HiloCambiosVentas();\n //Creo un hilo del objeto de HiloPrincipal \n Thread th = new Thread(hilo);\n th.start();\n }",
"public static void main(String[] args) {\r\n Restoran resto = new Restoran();\r\n int i = 0;\r\n for ( i = 0; i < 6; i++) {\r\n new Thread(new Cliente(resto,\"Cliente \" + i), \"Cliente \" + i).start();\r\n }\r\n new Thread(new Mozo(resto)).start();\r\n new Thread(new Cocinero(resto)).start();\r\n }",
"public synchronized void mensajeRecibido(int tipo, Serializable mensaje) {\n\n System.out.println(\"ControladorServidor : mensajeRecibido : tipo=\" + tipo + \" mensaje=\" + mensaje);\n log.info(\"ControladorServidor : mensajeRecibido : tipo=\" + tipo + \" mensaje=\" + mensaje);\n /*Tipos de mensajes:\n * 1- Mensaje de Chat\n * 2- Mensaje de Jugada o Informacion de Salas y mesas\n * 3- Mensaje de Entrada en mesa\n * 4- Mensaje de Salida de Mesa\n * 5- Cierre de conexión\n * 6- Mensaje de Entrada en Sala\n * 7- Mensaje de Salida de Sala\n *\n */\n if (tipo == TipoMensaje.MENSAJE_CHAT) {\n MensajeChat mensajeChat = ((MensajeChat) mensaje);\n System.out.println(\"server \" + mensajeChat.get_usuario());\n GestorChatServidor.getInstance(this).dejamensaje(mensajeChat);\n\n } else if (tipo == TipoMensaje.MENSAJE_JUGADA) {\n MensajeJugada mensajeJugada = ((MensajeJugada) mensaje);\n GestorJuegosServidor.getInstance(this).dejamensaje(mensajeJugada);\n //TODO Devolver la confirmacion de la jugada\n\n } else if (tipo == TipoMensaje.ENTRADA_MESA) {\n\n MensajeMesa m = (MensajeMesa) mensaje;\n if (GestorUsuarios.getInstancia(this).insertarJugadorEnMesa(m.getUsuario(), m.getMesa())) //Envio mensaje de confimacion de la entrada en la mesa\n {\n enviarMensajeMesa(m.getUsuario(), m);//necesito saber en qué mesa se ha insertado el cliente. Quito null y envio mensaje de vuelta\n } else {\n enviarMensajeMesa(m.getUsuario(), m);//TODO mirar porque devuelve false\n }\n } else if (tipo == TipoMensaje.SALIDA_MESA) {\n\n MensajeMesa m = (MensajeMesa) mensaje;\n GestorUsuarios.getInstancia(this).eliminarJugadorEnMesa(m.getUsuario());\n\n } else if (tipo == TipoMensaje.CERRAR_CONEXION) {\n //TODO cierre de conexion\n } else if (tipo == TipoMensaje.ENTRADA_SALA) {\n MensajeSala m = (MensajeSala) mensaje;\n GestorUsuarios.getInstancia(this).insertarJugadorEnSala(m.getUsuario(), m.getSala());\n\n //envío mensaje de vuelta para confirmarle al usuario que ha entrado en la sala\n enviarMensajeSala(m.getUsuario(), m);\n\n //envío la info de todas las mesas de la sala.\n enviarMesasDeUnaSala(m.getUsuario(), m.getSala());\n\n } else if (tipo == TipoMensaje.SALIDA_SALA) {\n\n MensajeSala m = (MensajeSala) mensaje;\n GestorUsuarios.getInstancia(this).eliminarJugadorEnSala(m.getUsuario());\n }\n\n\n\n }",
"public static void main(String[] args) {\r\n ExamenSegundo es = new ExamenSegundo();\r\n int num = 9000;\r\n try {\r\n num = Integer.parseInt(JOptionPane.showInputDialog(\"Puerto del servidor(9000-9010)\", 9000));\r\n System.out.println(\"Soy el :\" + num);\r\n lab3.setText(lab3.getText().replace(\"Puerto : \", \"Puerto : \" + num));\r\n lab6.setText(num + \"\");\r\n lab7.setText(num + \"\");\r\n clienteM = new ClienteM(num);\r\n servidorD = new ServidorD(num);\r\n clienteD = new ClienteD(num);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n System.exit(-1);\r\n }\r\n\r\n Thread sm = new Thread(servidorM);\r\n Thread cm = new Thread(clienteM);\r\n Thread sd = new Thread(servidorD);\r\n //Thread cd = new Thread(clienteD);\r\n// Thread sf = new Thread(servidorF);\r\n// Thread cf = new Thread(clienteF);\r\n\r\n sm.start();\r\n cm.start();\r\n sd.start();\r\n //cd.start();\r\n// sf.start();\r\n// cf.start();\r\n\r\n for (;;) {\r\n try {\r\n ArrayList columnas = servidorM.getServidores();\r\n ArrayList ips = servidorM.getServidoresIp();\r\n// System.out.println(modelo.getRowCount()+\" - \"+columnas.size());\r\n for (int i = modelo1.getRowCount() - 1; i >= 0; i--) {\r\n modelo1.removeRow(i);\r\n }\r\n ips = ordenarIps(columnas, ips);\r\n columnas.sort(null);\r\n for (int i = 0; i < columnas.size(); i++) {\r\n String fila[] = {ips.get(i).toString(), columnas.get(i).toString()};\r\n if (Integer.parseInt(columnas.get(i).toString()) == num) {\r\n clienteD.puertoServidor = Integer.parseInt(columnas.get((i + 1) % columnas.size()).toString());\r\n clienteD.ipServidor = ips.get((i + 1) % columnas.size()).toString().substring(1);\r\n servidorD.ipServidor = ips.get((i + 1) % columnas.size()).toString().substring(1);\r\n servidorD.puerto2 = Integer.parseInt(columnas.get((i + 1) % columnas.size()).toString());\r\n lab6.setText(columnas.get((i - 1 + columnas.size()) % columnas.size()).toString());\r\n lab7.setText(columnas.get((i + 1) % columnas.size()).toString());\r\n }\r\n modelo1.addRow(fila);\r\n }\r\n \r\n String fila[]= new String[1];\r\n for(int i=0;i<servidorD.aBuscados.size();i++){\r\n fila[0]=servidorD.aBuscados.get(i);\r\n modelo2.addRow(fila);\r\n }\r\n servidorD.aBuscados.clear();\r\n \r\n for(int i=0;i<servidorD.aRespuestas.size();i++){\r\n fila[0]=servidorD.aRespuestas.get(i);\r\n modelo3.addRow(fila);\r\n }\r\n servidorD.aRespuestas.clear();\r\n\r\n// System.out.println(\"bla\");\r\n servidorM.servidores.clear();\r\n servidorM.servidoresIp.clear();\r\n Thread.sleep(5000);\r\n } // sm.join();\r\n // cm.join();\r\n // sd.join();\r\n // //cd.join();\r\n // sf.join();\r\n // cf.join();\r\n catch (InterruptedException ex) {\r\n Logger.getLogger(ExamenSegundo.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }",
"@Override\n public void run()\n {\n while (true)\n {\n\n // create output stream attached to the socket\n\n // read message from client.\n try\n {\n Message message = (Message) inFromClient.readObject();\n System.out.println(\"Message from Client: \" + message);\n\n // Send reply to client.\n Message replyMessage = new Message(message.getId(), message.getBody().toUpperCase());\n\n for (int i = 0; i < mb.numberofclients(); i++)\n {\n mb.getConnection(i).returnMessage().writeObject(message);\n\n }\n list.add(message);\n db2.Write(list);\n\n }\n catch (Exception ex)\n {\n \n }\n }\n\n }",
"@Override\n\tpublic void run(){\n\t\ttry{\n\t\t\tin = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n\t\t\twhile(true){\n\t\t\t\ttry{\t\t\t\t\t\n\t\t\t\t\tmethReception(in);\n\t\t\t\t\texeBdd();\n\t\t\t\t\tmethEnvoie();\n\t\t\t\t}catch(IllegalArgumentException | ExecutionException | InterruptedException a){\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(a.getMessage());\t\t\t\t\n\t\t \tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"Fin des comunucations avec :\" + socket.getPort());\n\t\t\tAuthentification.CLIENTS.remove(this);\n\t\t\tsocket.close();\t\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"problème BufferedReader du ChatServeur\");\n\t\t\t//e.printStackTrace();\n\t\t}\n\t}",
"public void run() {\n\t\tPrintWriter escritor = null;\n\t\tBufferedReader lector = null;\n\n\t\t//In \n\t\tFileInputStream fis = null;\n\t\tBufferedInputStream bis = null;\n\n\t\t//Out\n\t\tOutputStream os = null;\n\n\n\n\t\ttry {\n\t\t\tescritor = new PrintWriter(socket.getOutputStream(), true);\n\t\t\tlector = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n\t\t\t//procesar(lector, escritor);\n\n\t\t\tconexion = true;\n\n\t\t\tpruebaProcesar(lector, escritor);\n\t\t\tconexion = !socket.isClosed();\n\n\t\t\t//String seguir = lector.readLine();\n\t\t\tSystem.out.println(\"Pureba\");\n\n\t\t\tescritor.close();\n\t\t\tlector.close();\n\t\t\tsocket.close();\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"private Object receive() {\n\t\ttry {\n\t\t\t// verificamos si la conexion esta abierta\n\t\t\tif (!this.getConnection().isClosed())\n\t\t\t\t// retornamos los datos\n\t\t\t\treturn this.getInputStream().readObject();\n\t\t} catch (final IOException e) {\n\t\t\t// print the StackTrace\n\t\t\tthis.getLogger().error(e);\n\t\t} catch (final ClassNotFoundException e) {\n\t\t\t// print the StackTrace\n\t\t\tthis.getLogger().error(e);\n\t\t}\n\t\t// retornamos null\n\t\treturn null;\n\t}",
"public void iniciarDealer() {\n\t\tThread dealer = new Thread(this);\n\t\tdealer.start();\n\t}",
"@Override\n public void run() {\n while(true) {\n try {\n // Caixa dorme até que algum cliente o acorde\n ativo.acquire();\n // atende o cliente\n atender(atendido);\n // volta a estar disponível para atender um novo cliente\n disponivel = true;\n // incrementa o número de caixas a dormir (pois ele passará a dormir)\n this.mutexCaixasDormindo.acquire();\n SystemManager.getInstance().setNumeroCaixasDormindo(SystemManager.getInstance().getNumeroCaixasDormindo() + 1);\n this.mutexCaixasDormindo.release();\n // acorda o próximo cliente, caso haja algum\n SystemManager.getInstance().chamarProximoCliente();\n // incrementa a quantidade de caixas que etão disponíveis\n caixas.release();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }",
"@Override\n public void run() {\n Groupe global;\n ConcurrentSkipListSet<GroupeNomme> listeGroupe;\n while(connecte){\n try {\n Paquet paquet = (Paquet) in.readObject();\n if(paquet.getAction()== Paquet.Action.AUTHENTIFICATION){\n System.out.println(\"Demande d'authentification de \"+paquet.getUtilisateur().getIdentifiant());\n\n Paquet retour = authentification(paquet);\n out.writeObject(retour);\n }\n else if(paquet.getAction()== Paquet.Action.REQUETTE){\n\n System.out.println(\"Demande de téléchargement de \"+paquet.getUtilisateur().getIdentifiant());\n\n// Paquet retour = new Paquet(Paquet.Action.REPONSE,paquet.getUtilisateur(),listeGroupe,global);\n Paquet retour = CommunicationBDD.download();\n /*Paquet retour = null;\n try {\n retour = ExtractDataBDD.download();\n } catch (SQLException e) {\n e.printStackTrace();\n }*/\n\n retour.setAction(Paquet.Action.REPONSE);\n retour.setUtilisateur(paquet.utilisateur);\n out.writeObject(retour);\n }else if(paquet.getAction()== Paquet.Action.REPONSE){\n\n System.out.println(\"Envoi infos depuis le Client \" + paquet.getUtilisateur().getIdentifiant());\n // serveur.maj(paquet.getListeGroupe(),paquet.getGroupeGlobal());\n CommunicationBDD.upload(new Paquet(null,null,paquet.getListeGroupe(),paquet.getGlobal()));\n if ( ! paquet.getListeGroupe().isEmpty()) {\n System.out.println(paquet.getListeGroupe().first().getFilsDeDiscussion());\n }\n }\n\n else if (paquet.getAction()== Paquet.Action.DECONNECT){\n System.out.println(\"Déconnexion de \"+paquet.getUtilisateur());\n connecte=false;\n }\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n }//while\n /*try {\n socket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }*/\n\n }",
"@Override\r\n public void run()\r\n {\r\n // Boucle infinie\r\n while (true)\r\n {\r\n synchronized (this)\r\n {\r\n // Blocage du traitement tant que la liste est vide\r\n while (demandesAccesSC.size() == 0)\r\n {\r\n try\r\n {\r\n this.wait();\r\n }\r\n catch (InterruptedException e)\r\n {\r\n e.printStackTrace();\r\n }\r\n }\r\n \r\n // Traitement de chaque demande de SC\r\n Integer proc;\r\n while ((proc = demandesAccesSC.pollFirst()) != null)\r\n {\r\n \tsynchronized(this)\r\n \t{\r\n \t\twhile(this.accesScEnCours)\r\n \t\t{\r\n \t\t\ttry {\r\n\t\t\t\t\t\t\t\twait();\r\n\t\t\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t} \t\t\t\r\n \t\t}\r\n \t}\r\n \t\r\n \tthis.accesScEnCours = true;\r\n try\r\n {\r\n stub.sendTo(new Message(masterId, TypeMessage.AUTORISER_ACCES_SC, proc, null));\r\n }\r\n catch (RemoteException e)\r\n {\r\n e.printStackTrace();\r\n }\r\n }\r\n }\r\n }\r\n\r\n }",
"@Override\n\tpublic void run() {\n\t\t\t\t\n\t\tString codigo = null;\n\t\ttry {\n\t\t\tcodigo = page.get();\n\t\t} catch (InterruptedException e) {\n\t\t\t//e.printStackTrace();\n\t\t} catch (ExecutionException e) {\n\t\t\t//e.printStackTrace();\n\t\t}\n\t\t\n\t\tif(codigo != null)\n\t\t{\n\t\t\ttrabalharCodigo(codigo);\t\t\t\n\t\t\t\t\n\t\t\tadapter = new NoticiaAdapter(getApplicationContext(),noticias);\t\t\t\t\t\t\t\t\t\t\t\n\t\t}\n\t\t\n\t\tmsg = new Message();\n\t\tmsg.arg1 = 1;\n\t\thandler.sendMessage(msg);\n\t\t\n\t}",
"@Override\n\tprotected Object doInBackground(Object... params){\n\t\tif(socketSet == 0){\n\t\t\ttry{\n\t\t\t\tif(socket == null){\n\t\t\t\t\tsocket = new Socket(ip,Room.PORT);\n\t\t\t\t}\n\t\t\t\tobjIn = new ObjectInputStream(socket.getInputStream());\n\t\t\t\tboard.addClient(socket);\n\t\t\t\tsocketSet = 2;\n\t\t\t}\n\t\t\tcatch(Exception e){\n\t\t\t\tpublishProgress(\"ERROR: Couldn't establish receiver: \"+e.getClass());\n\t\t\t}\n\t\t}\n\t\telse if(socketSet == 1){\n\t\t\ttry{\n\t\t\t\tobjIn = new ObjectInputStream(socket.getInputStream());\n\t\t\t\tboard.addClient(socket);\n\t\t\t\tsocketSet = 2;\n\t\t\t}\n\t\t\tcatch(Exception e){\n\t\t\t\tpublishProgress(\"ERROR: Couldn't establish server receiver: \"+e.getMessage());\n\t\t\t}\n\t\t}\n\n\t\twhile(true){\n\t\t\tif(isCancelled())\n\t\t\t\tbreak;\n\t\t\ttry{\n\t\t\t\tMove m = (Move)objIn.readObject();\n\t\t\t\t//Add the move to this board\n\t\t\t\tboard.makeMove(m);\n\t\t\t\t//If on the server - send to everyone else\n\t\t\t\t\n\t\t\t\t/*if(recId != -1){\n\t\t\t\t\tm.id = recId;\n\t\t\t\t\tfor(int i = 0; i < ServerThread.clients.size(); i++){\n\t\t\t\t\t\t(new ObjectOutputStream(ServerThread.clients.get(i).getOutputStream())).writeObject(m);\n\t\t\t\t\t}\n\t\t\t\t}*/\n\t\t\t}\n\t\t\tcatch(Exception e){\n\t\t\t\tpublishProgress(\"ERROR: Receiver connection error: \"+e.getClass());\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}",
"private void esperarPaquetes() throws SQLException {\n\n while (true) {//iterar infinitamente\n try {\n //esrtablecer el paquete\n byte datos[] = new byte[100];\n DatagramPacket recibirPaquete\n = new DatagramPacket(datos, datos.length);\n\n socket.receive(recibirPaquete);//espera al paquete\n if (recibirPaquete.getLength() != 0) {\n JOptionPane.showMessageDialog(this, \"Solicitud de Registro\");\n\n Conexion obj = new Conexion();\n conn = obj.Conexion();\n\n //***** DECLARACION DE LAS CLASES.\n Clientes_DTO cliente_dto = new Clientes_DTO();\n Movimientos_DTO movimiento_dto = new Movimientos_DTO();\n Bancos_DTO banco_dto = new Bancos_DTO();\n CuentasDTO cuentasDTO = new CuentasDTO();\n Usuario user = new Usuario();\n Seguros_DTO seguros_dto = new Seguros_DTO();\n Usuarios_DTO usuariosDTO = new Usuarios_DTO();\n Empresa_DTO dtoE = new Empresa_DTO();\n //*****\n\n String cad = (new String(recibirPaquete.getData(), 0, recibirPaquete.getLength()));\n String[] variables;\n variables = cad.split(\" \");\n\n switch (variables[0]) {\n case \"NewCliente\":\n cliente_dto.setNombre(variables[1]);\n cliente_dto.setAp_Paterno(variables[2]);\n cliente_dto.setAp_Materno(variables[3]);\n cliente_dto.setSexo(variables[4]);\n cliente_dto.setDireccion(variables[5]);\n cliente_dto.setEmail(variables[6]);\n cliente_dto.setTelefono(variables[7]);\n cliente_dto.setPais(variables[8]);\n cliente_dto.setTipo_cuenta(variables[9]);\n cliente_dto.Insert(cliente_dto, conn);\n JOptionPane.showMessageDialog(null, \"Cliente Agregado con Exito\", \"Exito!\", JOptionPane.INFORMATION_MESSAGE);\n break;\n case \"EditCliente\":\n cliente_dto.setId_clientes(variables[1]);\n cliente_dto.setNombre(variables[2]);\n cliente_dto.setAp_Paterno(variables[3]);\n cliente_dto.setAp_Materno(variables[4]);\n cliente_dto.setSexo(variables[5]);\n cliente_dto.setDireccion(variables[6]);\n cliente_dto.setEmail(variables[7]);\n cliente_dto.setTelefono(variables[8]);\n cliente_dto.setPais(variables[9]);\n cliente_dto.setTipo_cuenta(variables[10]);\n cliente_dto.Edit(cliente_dto, conn);\n JOptionPane.showMessageDialog(null, \"Cliente Editado con Exito\", \"Exito!\", JOptionPane.INFORMATION_MESSAGE);\n break;\n case \"DeleteCliente\":\n cliente_dto.setId_clientes(variables[1]);\n cliente_dto.Delete(cliente_dto, conn);\n JOptionPane.showMessageDialog(null, \"Cliente Eliminado con Exito\", \"Exito!\", JOptionPane.INFORMATION_MESSAGE);\n break;\n case \"SearchCliente\":\n cliente_dto.setId_clientes(variables[1]);\n cliente_dto.Search(cliente_dto, conn);\n mensaje = cliente_dto.getId_clientes() + \" \" + cliente_dto.getNombre() + \" \" + cliente_dto.getAp_Paterno() + \" \" + cliente_dto.getAp_Materno() + \" \" + cliente_dto.getSexo() + \" \" + cliente_dto.getDireccion() + \" \" + cliente_dto.getTelefono() + \" \" + cliente_dto.getEmail() + \" \" + cliente_dto.getPais() + \" \" + cliente_dto.getTipo_cuenta() + \" \";\n break;\n case \"NewMovimiento\":\n Date now = new Date(System.currentTimeMillis());\n movimiento_dto.setTipo_movimiento(variables[1]);\n movimiento_dto.setFecha_movimiento(String.valueOf(now));\n movimiento_dto.setSaldo(Double.parseDouble(variables[8]));\n movimiento_dto.setN_cuenta(variables[9]);\n movimiento_dto.setCuenta_destino(variables[10]);\n movimiento_dto.Insert(movimiento_dto, conn);\n JOptionPane.showMessageDialog(null, \"Movimiento Agreado con Exito\", \"Exito!\", JOptionPane.INFORMATION_MESSAGE);\n break;\n\n case \"EditMovimiento\":\n Date now1 = new Date(System.currentTimeMillis());\n movimiento_dto.setId_movimiento(variables[1]);\n movimiento_dto.setTipo_movimiento(variables[2]);\n movimiento_dto.setFecha_movimiento(String.valueOf(now1));\n movimiento_dto.setSaldo(Double.parseDouble(variables[9]));\n movimiento_dto.setN_cuenta(variables[10]);\n movimiento_dto.setCuenta_destino(variables[11]);\n\n movimiento_dto.Edit(movimiento_dto, conn);\n JOptionPane.showMessageDialog(null, \"Movimiento Editado con Exito\", \"Exito!\", JOptionPane.INFORMATION_MESSAGE);\n\n break;\n case \"DeleteMovimiento\":\n\n movimiento_dto.setId_movimiento(variables[1]);\n movimiento_dto.Delete(movimiento_dto, conn);\n JOptionPane.showMessageDialog(null, \"Movimiento Eliminado con Exito\", \"Exito!\", JOptionPane.INFORMATION_MESSAGE);\n\n break;\n case \"SearchMovimiento\":\n\n movimiento_dto.setId_movimiento(variables[1]);\n movimiento_dto.Search(movimiento_dto, conn);\n mensaje = movimiento_dto.getId_movimiento() + \" \" + movimiento_dto.getTipo_movimiento() + \" \" + movimiento_dto.getFecha_movimiento() + \" \" + movimiento_dto.getSaldo() + \" \" + movimiento_dto.getN_cuenta() + \" \" + movimiento_dto.getCuenta_destino() + \" \";\n break;\n\n case \"NewBanco\":\n banco_dto.setTelefono(variables[1]);\n banco_dto.setDireccion(variables[2]);\n banco_dto.setSucursal(variables[3]);\n banco_dto.setId_cliente(variables[4]);\n banco_dto.Insert(banco_dto, conn);\n JOptionPane.showMessageDialog(null, \"Banco Agregado con Exito\", \"Exito!\", JOptionPane.INFORMATION_MESSAGE);\n break;\n case \"EditBanco\":\n banco_dto.setId_banco(variables[1]);\n banco_dto.setTelefono(variables[2]);\n banco_dto.setDireccion(variables[3]);\n banco_dto.setSucursal(variables[4]);\n banco_dto.setId_cliente(variables[5]);\n banco_dto.Edit(banco_dto, conn);\n JOptionPane.showMessageDialog(null, \"Banco Editado con Exito\", \"Exito!\", JOptionPane.INFORMATION_MESSAGE);\n break;\n case \"DeleteBanco\":\n banco_dto.setId_banco(variables[1]);\n banco_dto.Delete(banco_dto, conn);\n JOptionPane.showMessageDialog(null, \"Banco Eliminado con Exito\", \"Exito!\", JOptionPane.INFORMATION_MESSAGE);\n break;\n case \"SearchBanco\":\n banco_dto.setId_banco(variables[1]);\n banco_dto.Search(banco_dto, conn);\n mensaje = banco_dto.getId_banco() + \" \" + banco_dto.getTelefono() + \" \" + banco_dto.getDireccion() + \" \" + banco_dto.getSucursal() + \" \" + banco_dto.getId_cliente() + \" \";\n break;\n\n case \"NewCuenta\":\n\n JOptionPane.showMessageDialog(this, variables[2]);\n cuentasDTO.setIdCliente(Integer.parseInt(variables[1]));\n cuentasDTO.setIdUsuario(Integer.parseInt(variables[2]));\n cuentasDTO.setNoDeCuenta(Integer.parseInt(variables[3]));\n cuentasDTO.setTipoCuenta(variables[4]);\n cuentasDTO.setFechaApertura(variables[5]);\n cuentasDTO.setSaldoApertura(Double.parseDouble(variables[6]));\n\n cuentasDTO.insert(cuentasDTO, conn);\n break;\n\n case \"SearchCuenta\":\n\n cuentasDTO.setNoDeCuenta(Integer.parseInt(variables[1]));\n cuentasDTO = cuentasDTO.search(cuentasDTO, conn);\n\n mensaje = String.valueOf(cuentasDTO.getIdCliente()) + \" \" + String.valueOf(cuentasDTO.getIdUsuario()) + \" \" + String.valueOf(cuentasDTO.getNoDeCuenta()) + \" \" + cuentasDTO.getFechaApertura() + \" \" + cuentasDTO.getTipoCuenta() + \" \" + String.valueOf(cuentasDTO.getSaldoApertura()) + \" \";\n break;\n\n case \"NewUser\":\n user.SetNombre(variables[1]);\n user.setPerfil(variables[2]);\n user.SetPassword(variables[3]);\n user.setA_paterno(variables[4]);\n user.setA_materno(variables[5]);\n user.setTelefono(variables[6]);\n user.setEmail(variables[7]);\n user.setDomicilio(variables[8]);\n\n user.Insert(conn);\n\n JOptionPane.showMessageDialog(null, \"Usuario Agregado con Exito\", \"Exito!\", JOptionPane.INFORMATION_MESSAGE);\n\n break;\n case \"NewSure\":\n seguros_dto.setEmpresa(variables[1]);\n seguros_dto.setTipo_seguro(variables[2]);\n seguros_dto.setMonto(variables[3]);\n seguros_dto.setCuenta(variables[4]);\n\n seguros_dto.Insert(seguros_dto, conn);\n JOptionPane.showMessageDialog(null, \"Seguro Agregado con Exito\", \"Exito!\", JOptionPane.INFORMATION_MESSAGE);\n\n break;\n case \"EditSure\":\n seguros_dto.setId_seguro(variables[1]);\n seguros_dto.setEmpresa(variables[2]);\n seguros_dto.setTipo_seguro(variables[3]);\n seguros_dto.setMonto(variables[4]);\n seguros_dto.setCuenta(variables[5]);\n\n seguros_dto.Edit(seguros_dto, conn);\n JOptionPane.showMessageDialog(null, \"Seguro Editado con Exito\", \"Exito!\", JOptionPane.INFORMATION_MESSAGE);\n\n break;\n case \"DeleteSure\":\n seguros_dto.setId_seguro(variables[1]);\n\n seguros_dto.Delete(seguros_dto, conn);\n JOptionPane.showMessageDialog(null, \"Banco Eliminado con Exito\", \"Exito!\", JOptionPane.INFORMATION_MESSAGE);\n\n break;\n case \"SearchSure\":\n seguros_dto.setId_seguro(variables[1]);\n\n seguros_dto.Search(seguros_dto, conn);\n mensaje = seguros_dto.getId_seguro() + \" \" + seguros_dto.getEmpresa() + \" \" + seguros_dto.getTipo_seguro() + \" \" + seguros_dto.getMonto() + \" \" + seguros_dto.getCuenta() + \" \";\n\n break;\n\n case \"NuevoUsuario\":\n\n usuariosDTO.setNombre(variables[1]);\n usuariosDTO.setA_paterno(variables[2]);\n usuariosDTO.setA_materno(variables[3]);\n usuariosDTO.setTelefono(variables[4]);\n usuariosDTO.setEmail(variables[5]);\n usuariosDTO.setDomicilio(variables[6]);\n\n usuariosDTO.Insert(usuariosDTO, conn);\n\n JOptionPane.showMessageDialog(this, \"Usuario agregado\");\n\n break;\n\n case \"NuevoUsuarioEditar\":\n\n usuariosDTO.setId_usuarios(variables[1]);\n usuariosDTO.setNombre(variables[2]);\n usuariosDTO.setA_paterno(variables[3]);\n usuariosDTO.setA_materno(variables[4]);\n usuariosDTO.setTelefono(variables[5]);\n usuariosDTO.setEmail(variables[6]);\n usuariosDTO.setDomicilio(variables[7]);\n\n usuariosDTO.Edit(usuariosDTO, conn);\n\n JOptionPane.showMessageDialog(this, \"Usuario Editado\");\n\n break;\n\n case \"DeleteUsuario_1\":\n\n usuariosDTO.setId_usuarios(variables[1]);\n\n usuariosDTO.Delete(usuariosDTO, conn);\n\n JOptionPane.showMessageDialog(null, \"Usuario Eliminado con Exito\", \"Exito!\", JOptionPane.INFORMATION_MESSAGE);\n\n break;\n\n case \"SearcUsuario_1\":\n usuariosDTO.setId_usuarios(variables[1]);\n\n usuariosDTO.Search(usuariosDTO, conn);\n\n mensaje = usuariosDTO.getId_usuarios() + \" \" + usuariosDTO.getNombre() + \" \" + usuariosDTO.getA_paterno() + \" \" + usuariosDTO.getA_materno() + \" \" + usuariosDTO.getTelefono() + \" \" + usuariosDTO.getEmail() + \" \" + usuariosDTO.getDomicilio() + \" \";\n\n break;\n\n case \"NewEmpresa\":\n dtoE.setFecha_apertura(variables[1]);\n dtoE.setMonto(variables[2]);\n dtoE.setPlazo(variables[3]);\n dtoE.setTaza(variables[4]);\n dtoE.setRepresentante(variables[5]);\n dtoE.setId_banco(variables[6]);\n dtoE.setTipo_cuenta(variables[7]);\n dtoE.Insert(dtoE, conn);\n JOptionPane.showMessageDialog(null, \"Empresa Agregada con Exito\", \"Exito!\", JOptionPane.INFORMATION_MESSAGE);\n break;\n\n case \"SearchEmpresa\":\n dtoE.setId_empresa(variables[1]);\n dtoE.Search(dtoE, conn);\n mensaje = dtoE.getId_empresa() + \" \" + dtoE.getFecha_apertura() + \" \" + dtoE.getMonto() + \" \" + dtoE.getPlazo() + \" \" + dtoE.getTaza() + \" \" + dtoE.getRepresentante() + \" \" + dtoE.getId_banco() + \" \" + dtoE.getTipo_cuenta() + \" \";\n break;\n case \"EditEmpresa\":\n dtoE.setId_empresa(variables[1]);\n dtoE.setFecha_apertura(variables[2]);\n dtoE.setMonto(variables[3]);\n dtoE.setPlazo(variables[4]);\n dtoE.setTaza(variables[5]);\n dtoE.setRepresentante(variables[6]);\n dtoE.setId_banco(variables[7]);\n dtoE.setTipo_cuenta(variables[8]);\n\n dtoE.Edit(dtoE, conn);\n JOptionPane.showMessageDialog(null, \"Empresa Editada con Exito\", \"Exito!\", JOptionPane.INFORMATION_MESSAGE);\n break;\n\n default:\n break;\n }\n\n }\n //mostrar la informacion del paquete recibido\n mostrarMensaje(\"\\nRegistro Ingresado:\"\n + \"\\nDel host:\" + recibirPaquete.getPort()\n + \"\\nInformacion almacenada:\\n\\t\" + new String(recibirPaquete.getData(),\n 0, recibirPaquete.getLength()) + datos);\n\n enviarPaqueteACliente(recibirPaquete);//envida paquete al cliente\n\n } //procesar los problemas que pu edan ocurrir al manipular el paquete\n catch (IOException excepcionES) {\n mostrarMensaje(excepcionES.toString() + \"\\n\");\n excepcionES.printStackTrace();\n }\n\n }//fin de intruccion while\n\n }",
"public void connexionServeur() {\r\n\r\n\t\tString serverIp = JOptionPane\r\n\t\t\t\t.showInputDialog(\"Entrez le nom du serveur.\");\r\n\t\ttry {\r\n\t\t\tsocket = new Socket(serverIp, 4456);\r\n\t\t\tlogger.info(\"Connexion au socket serveur.\");\r\n\r\n\t\t\tThread t = new Thread(new EnvoiPresence(socket));\r\n\t\t\tt.start();\r\n\r\n\t\t\tThread t2 = new Thread(new ReceptionListUser(socket, mainView));\r\n\t\t\tt2.start();\r\n\r\n\t\t} catch (ConnectException e) {\r\n\t\t\tJOptionPane.showMessageDialog(new Frame(),\r\n\t\t\t\t\t\"Le serveur Draw Me An Idea n'est pas lancé\", \"Erreur\", 1);\r\n\t\t\tSystem.exit(0);\r\n\t\t} catch (UnknownHostException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}",
"@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tBitmap bit = InputStream2Bimap( taskModel.domainInputStreamResult ) ; \n\t\t\t\t\tMessage msg = new Message(); \n\t\t\t\t\tmsg.obj = bit ; \n\t\t\t\t\tmsg.what = 4 ; \n\t\t\t\t\thandler.sendMessage(msg) ;\n\t\t\t\t}",
"public void run() {\n\t\tPrintWriter out = null;\r\n\t\ttry {\r\n\t\t\tout = new PrintWriter(clientSocket.getOutputStream(), true);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tBufferedReader in = null;\r\n\t\ttry {\r\n\t\t\tin = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));\r\n\t\t} catch (IOException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\tString inputLine, outputLine;\r\n\t\tProtocol kkp = new Protocol();\r\n\r\n\t\toutputLine = kkp.processInput(null);\r\n\t\tout.println(outputLine);\r\n\t\t// Leo continuamente e interactuo\r\n\t\ttry {\r\n\t\t\twhile ((inputLine = in.readLine()) != null) {\r\n//\t\t\t\toutputLine = kkp.processInput(inputLine);\r\n\t\t\t\toutputLine = inputLine;\r\n\t\t\t\tout.println(outputLine);\r\n\t\t\t\tif (outputLine.equals(\"Bye.\")){\r\n\t\t\t\t\tbreak;\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (IOException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\ttry {\r\n\t\t\t// Cierro la entrada y salida\r\n\t\t\tout.close();\r\n\t\t\tin.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} finally{\r\n\t\t\tlog.info(\"Clientes activos: \"+ (taskExecutor.getThreadPoolExecutor().getActiveCount()-1));\t\t\t\r\n\t\t}\r\n\t}",
"@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tBitmap bit = InputStream2Bimap( taskModel.hostInputStreamResult ) ; \n\t\t\t\t\tMessage msg = new Message(); \n\t\t\t\t\tmsg.obj = bit ; \n\t\t\t\t\tmsg.what = 3 ; \n\t\t\t\t\thandler.sendMessage(msg) ;\n\t\t\t\t}",
"@Override\n public void newASdu(ASdu ObjASDU) {\n\t\t\n \t // Inizializza nome thread\n \t Thread.currentThread().setName(\"Receiver\");\n \t\n \t// Variabili locali\n \tint IntIOA;\n \tboolean BolIOA;\n \tList<WireRecord> ObjWireRecords;\n \tInformationObject[] ObjInformationObjects;\t\n \tMap<String, TypedValue<?>> ObjWireValues;\n \tMap<String, TypedValue<?>> ObjCommonValues;\n \t\n\t // Esegue logging\n \tlogger.info(\"Received ASDU [tcp://\"+this.actualConfiguration.Host+\":\"+this.actualConfiguration.Port+\"]\");\n \t \t\n \t// Acquisisce puntatore agli information object\n \tObjInformationObjects = ObjASDU.getInformationObjects();\n \t\n \t// Se l'ASDU non contiene oggetti genera warning ed esce\n \tif ((ObjInformationObjects==null)||(ObjInformationObjects.length==0)) { \t\t\n \t notifyAlert(Event.WARNING_EVENT,\"Received ASDU cannot be decoded. Reason: empty\");\n return;\n \t}\n\t\t\n \t// Prepara le proprietÓ di testata dell'ASDU condivise da tutti gli information objects\n \tObjCommonValues = new HashMap<>();\t\n \t\n \tObjCommonValues.put(\"id\", TypedValues.newStringValue(this.actualConfiguration.DeviceId));\n \tObjCommonValues.put(\"host\", TypedValues.newStringValue(this.actualConfiguration.Host));\n \tObjCommonValues.put(\"port\", TypedValues.newIntegerValue(this.actualConfiguration.Port));\n \tObjCommonValues.put(\"eventId\", TypedValues.newIntegerValue(Event.DATA_EVENT.id));\n \tObjCommonValues.put(\"event\", TypedValues.newStringValue(Event.DATA_EVENT.description));\n\t\t\n \tObjCommonValues.put(\"type\", TypedValues.newStringValue(ObjASDU.getTypeIdentification().name()));\n \tObjCommonValues.put(\"test\", TypedValues.newStringValue(ObjASDU.isTestFrame()?(\"y\"):(\"n\")));\n \tObjCommonValues.put(\"cot\", TypedValues.newStringValue(ObjASDU.getCauseOfTransmission().name()));\n \tObjCommonValues.put(\"oa\", TypedValues.newIntegerValue(ObjASDU.getOriginatorAddress()));\n \tObjCommonValues.put(\"ca\", TypedValues.newIntegerValue(ObjASDU.getCommonAddress()));\n\t\t\n\t\t// Crea un wirerecord per ciascun oggetto\n\t\tObjWireRecords = new ArrayList<>();\n \t\n\t\t// Ciclo di scansione di tutti gli information object\n\t\tfor (InformationObject ObjInformationObject : ObjInformationObjects) {\n\n\t\t\t// Aggiorna lo IOA condiviso da tutti gli information element\n\t\t\tIntIOA = ObjInformationObject.getInformationObjectAddress();\n\t\t\t\n\t\t\t// Verifica se lo IOA Ŕ matchato da una regola di enrichment\n BolIOA = this.actualConfiguration.MatchingEnrichment.containsKey(IntIOA);\n \n // Se l'IOA non matcha ed Ŕ attivo il filtro sull'enrichment esegue, altrimenti procede \n if (!BolIOA&&this.actualConfiguration.Filtering) {\n \t \n \t// Esegue logging\n \tlogger.debug(\"Discarded ASDU [tcp://\"+this.actualConfiguration.Host+\":\"+this.actualConfiguration.Port+\"/IOA=\"+String.valueOf(IntIOA)+\"]\");\n \n } else {\n\t \t\n\t\t\t\t// Inizializza un nuovo wirerecord con le proprietÓ comuni\n\t\t\t\tObjWireValues = new HashMap<>();\n\t\t\t\tObjWireValues.putAll(ObjCommonValues);\n\t\t\t\t\n\t\t\t\tObjWireValues.put(\"ioa\", TypedValues.newIntegerValue(IntIOA));\n\t\t\t\t\n\t\t\t\t// Se l'IOA matcha con regola di enrichment aggiunge metriche, altrimenti aggiunge quelle di default\n\t\t\t\tif (BolIOA) {\n\t\t\t\t\tObjWireValues.putAll(this.actualConfiguration.MatchingEnrichment.get(IntIOA));\t\n\t\t\t\t} else if (this.actualConfiguration.DefaultEnrichment.size()>0) {\n\t\t\t\t\tObjWireValues.putAll(this.actualConfiguration.DefaultEnrichment);\n\t\t\t\t}\n\t\n\t\t\t\t// Ciclo di scansione di tutti gli information element\n\t\t\t\tfor (InformationElement[] ObjInformationElementSet : ObjInformationObject.getInformationElements()) {\n\t \n\t\t\t\t\t// Decodifica l'information element in base al tipo di ASDU e aggiunge record alla lista\n\t\t\t\t\ttry {\n\t\t\t\t\t Iec104Decoder.decode(ObjASDU.getTypeIdentification(), ObjInformationElementSet, ObjWireValues);\n\t\t\t\t\t ObjWireRecords.add(new WireRecord(ObjWireValues)); \n\t\t\t\t\t} \n\t\t\t\t\tcatch (Exception e) {\t\t\t\t\t\n\t\t\t\t\t\tnotifyAlert(Event.WARNING_EVENT,\"Received ASDU cannot be decoded. Reason: \"+e.getMessage());\n\t\t\t\t\t}\t\t\t\t\n\t }\t\n }\n\t\t}\n\t\t\n\t\t// Se ci sono record da trasmettere procede\n\t\tif (ObjWireRecords.size()>0) {\n\t\t this.wireSupport.emit(ObjWireRecords);\n\t\t}\n }",
"public void run() {\r\n try {\r\n this.is = new ObjectInputStream(clientSocket.getInputStream());\r\n this.os = new ObjectOutputStream(clientSocket.getOutputStream());\r\n while (this.readCommand()) {}\r\n } \r\n catch (IOException e) \r\n {\r\n \tSystem.out.println(\"XX. There was a problem with the Input/Output Communication:\");\r\n e.printStackTrace();\r\n }\r\n }",
"public Object consumeBloqueante();",
"@Override\r\n\tpublic void run() {\n\t\ttry {\r\n\t\t\tObjectInputStream objectInput = new ObjectInputStream(\r\n\t\t\t\t\tclsock.getInputStream());\r\n\t\t\tObject object = objectInput.readObject();\r\n\t\t\ttask = (String) object;// reading URLs from client\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\tSystem.out.println(\"The task Batch has not come from the Client\");\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\tString clientId = task.split(\",\")[0];\r\n\r\n\t\tRemoteScheduler remoteScheduler = new RemoteScheduler(clientId,\r\n\t\t\t\ttask);\r\n\t\tremoteScheduler.sendTaskToQueue();\r\n\t\tExecutorService remoteService = Executors.newFixedThreadPool(1);\r\n\t\ttry {\r\n\t\t\tFuture<String> remoteResult = remoteService\r\n\t\t\t\t\t.submit(remoteScheduler);\r\n\t\t\tString clientResult = remoteResult.get();\r\n\t\t\tObjectOutputStream outputStream = new ObjectOutputStream(\r\n\t\t\t\t\tclsock.getOutputStream());\r\n\t\t\toutputStream.writeObject(clientResult);\r\n\t\t\toutputStream.close();\r\n\t\t} catch (InterruptedException | ExecutionException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tclsock.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}",
"public NetData recieve() throws Exception\n {\n NetData nd;\n\n\n try {\n if(reader.ready())\n {\n nd = new NetData(reader.readLine());\n }\n else\n {\n return null;\n }\n }\n catch (IOException ex)\n {\n xError.Report(xError.READ_FROM_SOCKET);\n throw new Exception();\n }\n xMessenger.miniMessege(\"<<<\"+ nd.toString());\n return nd;\n }",
"private void start_Connexion()throws UnknownHostException, IOException{\n \tsocket = new Socket(IP,num_Socket);\n \tout = new ObjectOutputStream(socket.getOutputStream());\n \tin = new ObjectInputStream(socket.getInputStream());\n \t\n }",
"@Override\n public void run() {\n byte[] buffer = new byte[1024];\n int bytes;\n while (true) {\n try {\n\n bytes = inputStream.read(buffer);\n String data = new String(buffer, 0, bytes);\n handler.obtainMessage(MainActivityFreeEX.DATA_RECEIVED, data).sendToTarget();\n\n Log.i(this.toString(), \"en el run de Connection: \" + handler.obtainMessage(MainActivityFreeEX.DATA_RECEIVED, data).toString());\n\n\n } catch (IOException e) {\n break;\n }\n }\n }",
"public synchronized void send(Object obj)\r\n\t{\r\n\t\tclientQueue.offer(obj);\r\n\t}",
"public synchronized void solicitaTraslado() {\n while (!isDisponibleTraslado) {\n try {\n wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n this.estado.solicitaTraslado();\n this.setChanged();\n this.notifyObservers(this.estado.getFoto());\n notifyAll();\n }",
"private void receberMensagem() throws Exception {\n\t\ttry {\n\t\t\tbyte[] buffer = new byte[1000];\n\t\t\tMessage mensagem;\n\t\t\tDatagramPacket messageIn = new DatagramPacket(buffer, buffer.length);\n\n\t\t\tthis.socket.receive(messageIn);\n\n\t\t\tmensagem = Message.fromBytes(buffer);\n\n\t\t\tSystem.out.println(mensagem.toString());\n\n\t\t\tif (!mensagem.getRemetente().equals(this.identificador)) {\n\t\t\t\tbyte[] chavePublicaRemetenteBytes = this.listaChavesPublicas.get(mensagem.getRemetente());\n\n\t\t\t\tif (mensagem.getTipoMensagem().equals(EnumMessageType.ENTRADA)\n\t\t\t\t\t\t|| mensagem.getTipoMensagem().equals(EnumMessageType.RESPOSTA_ENTRADA)) {\n\t\t\t\t\tchavePublicaRemetenteBytes = mensagem.getChavePublica();\n\t\t\t\t}\n\n\t\t\t\tmensagem.validar(chavePublicaRemetenteBytes);\n\n\t\t\t\tthis.tratarMensagem(mensagem);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new Exception(\"Erro ao receber mensagem\");\n\t\t}\n\t}",
"@Override\r\n\t\tpublic void run() {\n\t\t\ttry {\r\n\t\t\t\twhile (mClient.mSelector.select() > 0) {\r\n\t\t\t\t\tif (DEBUG) Log.e(TAG, \" In while 135\");\r\n\t\t\t\t\tfor (SelectionKey next : mClient.mSelector.selectedKeys()) {\r\n\t\t\t\t\t\tif (next.isReadable()) {\r\n\t\t\t\t\t\t\tSocketChannel socketChannel = (SocketChannel) next.channel();\r\n\t\t\t\t\t\t\tByteBuffer buffer = ByteBuffer.allocate(500);\r\n\t\t\t\t\t\t\tbuffer.clear();\r\n\t\t\t\t\t\t\tint length = socketChannel.read(buffer);\r\n//\t\t\t\t\t\t\tif (DEBUG) Log.e(TAG, Arrays.toString(buffer.array()));\r\n\t\t\t\t\t\t\tif (length == -1) continue;\r\n\t\t\t\t\t\t\tbuffer.flip();\r\n\t\t\t\t\t\t\tif (buffer.get(0) == MessageBean.MESSAGE_TYPE_TEXT) {\r\n\t\t\t\t\t\t\t\tMessageBean messageBean = MessageBean.createMessage(buffer.array());\r\n\t\t\t\t\t\t\t\t// send message to activity\r\n\t\t\t\t\t\t\t\tIntent intent = new Intent(ReceiveReceiver.ACTION);\r\n\t\t\t\t\t\t\t\tintent.putExtra(\"data\", messageBean.getByteArray());\r\n\t\t\t\t\t\t\t\tsendBroadcast(intent);\r\n\t\t\t\t\t\t\t\tnext.interestOps(SelectionKey.OP_READ);\r\n\t\t\t\t\t\t\t\tif (DEBUG) \r\n\t\t\t\t\t\t\t\t\tLog.e(TAG, \"message : \" + messageBean.getSendId() + \" \" + \r\n\t\t\t\t\t\t\t\t\t\t\tmessageBean.getReceiveId() + \" \" + messageBean.getSendMessageLength() + \" \" +\r\n\t\t\t\t\t\t\t\t\t\t\tmessageBean.getMessageText());\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tmClient.mSelector.selectedKeys().remove(next);\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} 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}",
"@Override\n public void run() {\n while(true){\n //----------------ACCIONES QUE REALIZA EL HILO-----------------------\n if(isActive()){\n \n try {\n socket = serverSocket.accept(); //Espera una nueva conexion\n socket.setSoTimeout(10000); //Se espera recibir informacion durante 10 segundos\n dataInput = new BufferedReader(new InputStreamReader(socket.getInputStream()));//Se recibe informacion\n String data = dataInput.readLine();\n System.out.println(data);\n //Se disparan recien aqui las transiciones para evitar inconvenientes en caso de TimeOut\n monitor.disparar(transitions.get(0));\n monitor.disparar(transitions.get(1));//Se guarda en base de datos\n dataBase.insertEventWeb(data);\n monitor.disparar(transitions.get(2));\n } \n catch (SocketTimeoutException ex) { //En caso que haya expirado el TimeOut tengo que \n System.out.println(\"El tiempo a expirado\");\n }\n catch (IOException ex) {\n System.out.println(\"Error en Socket\");\n }\n try {\n socket.close();\n } \n catch (IOException ex) {\n System.out.println(\"Error al cerrar Socket\");\n }\n }\n }\n }",
"NetThread(){}",
"public Maestro()\r\n\t{\r\n\t\tint i;\r\n\t\tint hora = 0;\r\n\t\tint minutos = 0;\r\n\t\tint segundos = 0;\r\n\t\tint milisegundos = 0;\r\n\t\tthis.reloj = new Reloj(\"Reloj Servidor\",hora,minutos,segundos,milisegundos);\r\n\t\tthis.reloj.start();\r\n\r\n\t\tthis.s_BD = new Sincronizador_BD(this.Conect);\r\n\t\tthis.s_BD.start();\r\n\t}",
"@Override\n\t\tpublic void run() {\n\t\t\tif (indexJugador == 0) {\n\t\t\t\t// es jugador 1, debe ponerse en espera a la llegada del otro jugador\n\n\t\t\t\ttry {\n\t\t\t\t\t// guarda el nombre del primer jugador\n\t\t\t\t\tidJugadores[0] = (String) in.readObject();\n\n\t\t\t\t\tmostrarMensaje(\"Hilo establecido con jugador (1) \" + idJugadores[0]);\n\t\t\t\t} catch (ClassNotFoundException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tmostrarMensaje(\"bloquea servidor para poner en espera de inicio al jugador 1\");\n\t\t\t\tbloqueoJuego.lock(); // bloquea el servidor\n\n\t\t\t\twhile (suspendido) {\n\t\t\t\t\tmostrarMensaje(\"Parando al Jugador 1 en espera del otro jugador...\");\n\t\t\t\t\ttry {\n\t\t\t\t\t\tesperarInicio.await();\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} finally {\n\t\t\t\t\t\tmostrarMensaje(\"Desbloquea Servidor luego de bloquear al jugador 1\");\n\t\t\t\t\t\tbloqueoJuego.unlock();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// ya se conectó el otro jugador,\n\t\t\t\t// le manda al jugador 1 todos los datos para montar la sala de Juego\n\t\t\t\t// le toca el turno a jugador 1\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tmostrarMensaje(\"jugador 1 manda al jugador 1 todos los datos para montar SalaJuego\");\n\t\t\t\t//Le envía al jugador los datos que debe mostrar su ventana\n\t\t\t\tdatosEnviar = new DatosBlackJack();\n\t\t\t\tdatosEnviar.setManoDealer(manosJugadores.get(3));\n\t\t\t\tdatosEnviar.setManoJugador1(manosJugadores.get(0));\n\t\t\t\tdatosEnviar.setManoJugador2(manosJugadores.get(1));\n\t\t\t\tdatosEnviar.setManoJugador3(manosJugadores.get(2));\n\t\t\t\tdatosEnviar.setMazo(mazo);\n\t\t\t\tdatosEnviar.setIdJugadores(idJugadores);\n\t\t\t\tdatosEnviar.setValorManos(valorManos);\n\t\t\t\tdatosEnviar.setEstadoJuego(true); // Ronda de apuestas activado.\n\t\t\t\tdatosEnviar.setMensaje(\"Inicias \" + idJugadores[0] + \" tienes \" + valorManos[0]);\n\t\t\t\tenviarMensajeCliente(datosEnviar);\n\t\t\t\tjugadorEnTurno = 0;\n\t\t\t} else if (indexJugador == 1) {\n\t\t\t\t//Es jugador 2\n\t\t\t\ttry {\n\t\t\t\t\t// guarda el nombre del primer jugador\n\t\t\t\t\tidJugadores[1] = (String) in.readObject();\n\t\t\t\t\n\t\t\t\t\tmostrarMensaje(\"Hilo establecido con jugador (2) \" + idJugadores[1]);\n\t\t\t\t} catch (ClassNotFoundException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tmostrarMensaje(\"bloquea servidor para poner en espera de inicio al jugador 2\");\n\t\t\t\tbloqueoJuego.lock(); // bloquea el servidor\n\n\t\t\t\twhile (suspendido) {\n\t\t\t\t\tmostrarMensaje(\"Parando al Jugador 2 en espera del otro jugador...\");\n\t\t\t\t\ttry {\n\t\t\t\t\t\tesperarInicio.await();\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} finally {\n\t\t\t\t\t\tmostrarMensaje(\"Desbloquea Servidor luego de bloquear al jugador 2\");\n\t\t\t\t\t\tbloqueoJuego.unlock();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tmostrarMensaje(\"jugador 2 manda al jugador 1 todos los datos para montar SalaJuego\");\n\t\t\t\tdatosEnviar = new DatosBlackJack();\n\t\t\t\tdatosEnviar.setManoDealer(manosJugadores.get(3));\n\t\t\t\tdatosEnviar.setManoJugador1(manosJugadores.get(0));\n\t\t\t\tdatosEnviar.setManoJugador2(manosJugadores.get(1));\n\t\t\t\tdatosEnviar.setManoJugador3(manosJugadores.get(2));\n\t\t\t\tdatosEnviar.setMazo(mazo);\n\t\t\t\tdatosEnviar.setIdJugadores(idJugadores);\n\t\t\t\tdatosEnviar.setValorManos(valorManos);\n\t\t\t\tdatosEnviar.setEstadoJuego(true); // Ronda de apuestas activado.\n\t\t\t\tdatosEnviar.setMensaje(\"Inicia \" + idJugadores[0] + \" tiene \" + valorManos[0]);\n\t\t\t\tenviarMensajeCliente(datosEnviar);\n\t\t\t\tjugadorEnTurno = 0;\n\t\t\t} else {\n\t\t\t\t// Es jugador 3\n\t\t\t\ttry {\n\t\t\t\t\tidJugadores[2] = (String) in.readObject();\n\t\t\t\t\t\n\t\t\t\t\tmostrarMensaje(\"Hilo jugador (3)\" + idJugadores[2]);\n\t\t\t\t} catch (ClassNotFoundException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tmostrarMensaje(\"manda al jugador 2 el nombre del jugador 1\");\n\n\t\t\t\tdatosEnviar = new DatosBlackJack();\n\t\t\t\tdatosEnviar.setManoDealer(manosJugadores.get(3));\n\t\t\t\tdatosEnviar.setManoJugador1(manosJugadores.get(0));\n\t\t\t\tdatosEnviar.setManoJugador2(manosJugadores.get(1));\n\t\t\t\tdatosEnviar.setManoJugador3(manosJugadores.get(2));\n\t\t\t\tdatosEnviar.setIdJugadores(idJugadores);\n\t\t\t\tdatosEnviar.setValorManos(valorManos);\n\t\t\t\tdatosEnviar.setEstadoJuego(true); // Ronda de apuestas activado.\n\t\t\t\tdatosEnviar.setMensaje(\"Inicia \" + idJugadores[0] + \" tiene \" + valorManos[0]);\n\t\t\t\tenviarMensajeCliente(datosEnviar);\n\n\t\t\t\tiniciarRondaJuego(); // despertar al jugador 1 para iniciar el juego\n\t\t\t\tmostrarMensaje(\"Bloquea al servidor para poner en espera de turno al jugador 2\");\n\t\t\t\tbloqueoJuego.lock();\n\t\t\t\ttry {\n\t\t\t\t\tmostrarMensaje(\"Pone en espera de turno al jugador 2\");\n\t\t\t\t\tesperarTurno.await();\n\t\t\t\t\tmostrarMensaje(\"Despierta de la espera de inicio del juego al jugador 1\");\n\t\t\t\t\t//\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} finally {\n\t\t\t\t\tbloqueoJuego.unlock();\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Mientras ningún jugador decida retirarse del juego al final de la partida\n\t\t\twhile (jugar) {\n\t\t\t\ttry {\n\t\t\t\t\tentrada = (String) in.readObject();\n\t\t\t\t\tanalizarMensaje(entrada, indexJugador);\n\t\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t// controlar cuando se cierra un cliente\n\t\t\t\t}\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tin.close();\n\t\t\t\tout.close();\n\t\t\t\tconexionCliente.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tSystem.out.println(\"Un hilo muere\");\n\t\t\t// cerrar conexión\n\n\t\t}",
"public void run() {\n try {\n socketIn = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n socketOut = new ObjectOutputStream(socket.getOutputStream());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n readFromClient();\n pingToClient();\n }",
"public void run(){\r\n\t\tsynchronized(this){\r\n\t\t\tObjectServer db4oServer = Db4o.openServer(FILE, PORT);\r\n\t\t\tdb4oServer.grantAccess(USER, PASS);\r\n\t\t\t\r\n\t\t\t// Using the messaging functionality to redirect all\r\n\t\t\t// messages to this.processMessage\r\n\t\t\tdb4oServer.ext().configure().clientServer().setMessageRecipient(this);\r\n\t\t\t\r\n\t\t\t// to identify the thread in a debugger\r\n\t\t\tThread.currentThread().setName(this.getClass().getName());\r\n\t\t\t\r\n\t\t\t// We only need low priority since the db4o server has\r\n\t\t\t// it's own thread.\r\n\t\t\tThread.currentThread().setPriority(Thread.MIN_PRIORITY);\r\n\t\t\ttry {\r\n\t\t\t\t\tif(! stop){\r\n\t\t\t\t\t\t// wait forever for notify() from close()\r\n\t\t\t\t\t\tthis.wait(Long.MAX_VALUE); \r\n\t\t\t\t\t}\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tdb4oServer.close();\r\n\t\t}\r\n\t}",
"@Override\r\n public void onRecvObject(Object object) {\n if (object instanceof UpdateNames) {\r\n // UpdateNames updateNames = (UpdateNames) object;\r\n return;\r\n }\r\n\r\n if (object instanceof ChatMessage) {\r\n ChatMessage chatMessage = (ChatMessage) object;\r\n LogExt.d(TAG, \"receive text: \" + chatMessage.text);\r\n if (null != mNetTransportListener && null != chatMessage) {\r\n if (!TextUtils.isEmpty(chatMessage.text)\r\n && chatMessage.text\r\n .startsWith(Configuration.CMD_CONNECT_ADB)) {\r\n String temp = chatMessage.text.substring(\r\n Configuration.CMD_CONNECT_ADB.length()).trim();\r\n mServerHandler\r\n .sendMessage(mServerHandler\r\n .obtainMessage(Configuration.MSG_CONNECT_LOCAL_ADBD));\r\n LogExt.d(TAG,\r\n \"start connect local adb pc terminal ip is \"\r\n + temp);\r\n }\r\n }\r\n return;\r\n }\r\n\r\n if (object instanceof Data) {\r\n Data data = (Data) object;\r\n if (null != mNetTransportListener && null != data) {\r\n if (null != mAdbSession) {\r\n mAdbSession.onRemoteClientNewData(data);\r\n } else {\r\n LogExt.e(TAG, \"adb session not ready error!\");\r\n }\r\n }\r\n LogExt.d(TAG, \"receive data: \" + data.getString());\r\n }\r\n }",
"public void sentRecieve() throws UnknownHostException, IOException, ClassNotFoundException, InterruptedException {\n InetAddress host = InetAddress.getLocalHost();\r\n Socket socket = null;\r\n ObjectOutputStream output = null;\r\n ObjectInputStream input = null;\r\n \r\n LinkedList client = new LinkedList();\r\n client.add(\"Elifas\");\r\n client.add(\"Andrew\");\r\n client.add(\"Claudia\");\r\n client.add(\"Ester\");\r\n client.add(\"Emilie\");\r\n \r\n for (int i = 0; i < client.size(); i++) {\r\n int size = client.size();\r\n //establishing socket connection to a server\r\n socket = new Socket(host.getHostName(), 2535);\r\n //write to the socket using ObjectOutputStream\r\n output = new ObjectOutputStream(socket.getOutputStream());\r\n System.out.println(client.get(i)+\" sending request to the server\");\r\n if (size > 5) {\r\n output.writeObject(\"exit\");\r\n }\r\n else{\r\n output.writeObject(\" \"+ client.get(i));\r\n }\r\n //reading the server response\r\n input = new ObjectInputStream(socket.getInputStream());\r\n String message = (String) input.readObject();\r\n System.out.println(\"Response: \"+message);\r\n \r\n //close resources\r\n input.close();\r\n output.close();\r\n Thread.sleep(2000);\r\n }\r\n }",
"@Override\r\n\t\tpublic void run() {\n\t\t\tBBGJDB tdd = new BBGJDB(_context);\r\n\t\t\ttdd.clearreply();\r\n\t\t\tString qurl = MessengerService.URL;\r\n\t\t\tString qmethodname = MessengerService.METHOD_GETCOMUNREPLY;\r\n\t\t\tString qnamespace = MessengerService.NAMESPACE;\r\n\t\t\tString qsoapaction = qnamespace + \"/\" + qmethodname;\r\n\r\n\t\t\tSoapObject rpc = new SoapObject(qnamespace, qmethodname);\r\n\t\t\trpc.addProperty(\"id\", webid);\r\n\t\t\trpc.addProperty(\"pagesize\", 30);\r\n\t\t\trpc.addProperty(\"pageindex\", 1);\r\n\t\t\tSoapSerializationEnvelope envelope = new SoapSerializationEnvelope(\r\n\t\t\t\t\tSoapEnvelope.VER11);\r\n\t\t\tenvelope.bodyOut = rpc;\r\n\t\t\tenvelope.dotNet = true;\r\n\t\t\tenvelope.setOutputSoapObject(rpc);\r\n\t\t\tHttpTransportSE ht = new HttpTransportSE(qurl);\r\n\t\t\tht.debug = true;\r\n\t\t\ttry {\r\n\t\t\t\tht.call(qsoapaction, envelope);\r\n\t\t\t\tSoapObject replylist = (SoapObject) envelope.bodyIn;\r\n\t\t\t\tfor (int i = 0; i < replylist.getPropertyCount(); i++) {\r\n\t\t\t\t\tSoapObject soapchilds = (SoapObject) replylist\r\n\t\t\t\t\t\t\t.getProperty(0);\r\n\t\t\t\t\tfor (int j = 0; j < soapchilds.getPropertyCount(); j++) {\r\n\t\t\t\t\t\tSoapObject soapchildsson = (SoapObject) soapchilds\r\n\t\t\t\t\t\t\t\t.getProperty(j);\r\n\r\n\t\t\t\t\t\tString rtitle = soapchildsson.getProperty(\"Content\")\r\n\t\t\t\t\t\t\t\t.toString();\r\n\t\t\t\t\t\tString rtime = soapchildsson.getProperty(\"Crtime\")\r\n\t\t\t\t\t\t\t\t.toString();\r\n\t\t\t\t\t\tString ruser = soapchildsson.getProperty(\"Userid\")\r\n\t\t\t\t\t\t\t\t.toString();\r\n\t\t\t\t\t\tString rusername = soapchildsson\r\n\t\t\t\t\t\t\t\t.getProperty(\"RealName\").toString();\r\n\r\n\t\t\t\t\t\tContentValues values = new ContentValues();\r\n\t\t\t\t\t\tvalues.put(tdd.RPL_CONTENT, rtitle);\r\n\t\t\t\t\t\tvalues.put(tdd.RPL_TIME, rtime);\r\n\t\t\t\t\t\tvalues.put(tdd.RPL_WEBID, ruser);\r\n\t\t\t\t\t\tvalues.put(tdd.RPL_NAME, rusername);\r\n\t\t\t\t\t\ttdd.insertreply(values);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception 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\tMessage msg = new Message();\r\n\t\t\tmsg.obj = lvbt;\r\n\t\t\tthreadMessageHandler.sendMessage(msg);\r\n\t\t}",
"@Override\n public void run() {\n P.print(\"Listening on port \"+P.port+\", waiting for incomming connection...\");\n try {\n ServerSocket serverSocket = new ServerSocket(P.port);\n while (P.choke_thread_running) { //read input forever.\n Receive receive_thread = new Receive();\n Socket s = serverSocket.accept();\n String addr = s.getInetAddress().toString();\n int p = s.getPort();\n int i;\n for(i = 0;i<P.peer_ip.length;i++){\n if(addr.equals(P.peer_ip[i])){\n P.sockets[i] = s;\n P.tcp_out_stream[i] = new ObjectOutputStream(s.getOutputStream());\n break;\n }\n }\n receive_thread.start(P,s,P.peer_id[--i]);\n P.print(\"Accepted incomming connection: ip = \"+addr.substring(1)+\", port = \"+p);\n }\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }",
"@Override\r\n public void parar(Conexion conexion){\n }",
"@SuppressWarnings(\"static-access\")\r\n\t\t@Override\r\n\t\tpublic void run() {\r\n\t\t\tsetName(C_THREAD);\r\n\t\t\tif(controller == MultiController.TCP) {\r\n\t\t\t\tnetworkHandling = new NetworkHandling(tcpHandler);\r\n\t\t\t\tnetworkHandling.establishConnection();\r\n\t\t\t\t\r\n\t\t\t\ttry { \r\n\t\t\t\t\t//Wait until the lock is released - wait for connection\r\n\t\t\t\t\tnetworkHandling.lock.acquire(); \r\n\t\t\t\t} catch (InterruptedException e) { }\r\n\t\t\r\n\t\t\t\tfinished(networkHandling.isConnected());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(controller == MultiController.BLUETOOTH) {\r\n\t\t\t\tbluetoothHandling = new BluetoothHandling(getApplicationContext(),bluetoothHandler);\r\n\t\t\t\tbluetoothHandling.start();\r\n\t\t\t\t\r\n\t\t\t\tIntent intent = new Intent(getApplicationContext(),DeviceListActivity.class);\r\n\t\t\t\tstartActivityForResult(intent, BluetoothHandler.REQUEST_ADDRESS);\r\n\t\t\t\t\r\n\t\t\t\tfinReq = true;\r\n\t\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\t//Wait until the lock is released - wait for connection\r\n\t\t\t\t\tbluetoothHandling.lock.acquire();\r\n\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\tfinished(bluetoothHandling.getState() == BluetoothHandling.STATE_CONNECTED);\r\n\t\t\t}\r\n\t\t}",
"@Override\n\tpublic void run() {\n\n\t\tboolean iniciat = false;\n\n\t\twhile (true) {\n\t\t\tif (!requestStack.isEmpty()) {\n\t\t\t\tRequest rx = (Request) requestStack.pollFirst();\n\n\t\t\t\tif (rx.getMissatge().equals(\"iniciar\") && !iniciat) {\n\n\t\t\t\t\trx.setMissatge(\"!trivial.\" + rx.getMissatge());\n\t\t\t\t\tRequest.enviar(Request.convertRequestToAll(rx), output);\n\n\t\t\t\t\tiniciat = true;\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.currentThread().sleep(300);\n\t\t\t\t\t} catch (InterruptedException e2) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te2.printStackTrace();\n\t\t\t\t\t}\n\n\t\t\t\t\tString missatge = \"Obertes les inscripcions durant \" + TEMPSINSCRIPCIO\n\t\t\t\t\t\t\t+ \" segons. Escriu !trivial.participar per participar\";\n\t\t\t\t\tRequest sortida = new Request(TipusRequest.COMUNICACIO, TipusDestinatari.ALL, TipusRemitent.BOT,\n\t\t\t\t\t\t\t\"@Trivial\", missatge);\n\t\t\t\t\tRequest.enviar(sortida, output);\n\n\t\t\t\t\tInscriptor ins = new Inscriptor(requestStack, output, marcador);\n\t\t\t\t\tThread th_inscripcions = new Thread(ins);\n\t\t\t\t\tth_inscripcions.setName(\"inscriptor\");\n\t\t\t\t\tth_inscripcions.start();\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tth_inscripcions.join(TEMPSINSCRIPCIO * 1000);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\tth_inscripcions.interrupt();\n\n\t\t\t\t\tif (!marcador.isEmpty()) {\n\t\t\t\t\t\tStringBuilder sb = new StringBuilder(\"Tancades les inscripcions. Inscrits: \");\n\t\t\t\t\t\tmarcador.forEach((k, v) -> {\n\t\t\t\t\t\t\tsb.append(k + \", \");\n\t\t\t\t\t\t});\n\t\t\t\t\t\tRequest tancat = new Request(TipusRequest.COMUNICACIO, TipusDestinatari.ALL, TipusRemitent.BOT,\n\t\t\t\t\t\t\t\t\"@Trivial\", sb.toString());\n\t\t\t\t\t\tRequest.enviar(tancat, output);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tThread.currentThread().sleep(300);\n\t\t\t\t\t\t} catch (InterruptedException e1) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tString inici = \"Comenša el joc!!.\\nContesta les preguntes escrivint !trivial.resposta amb el n˙mero associat.\\n\"\n\t\t\t\t\t\t\t\t+ \"Exemple: !trivial.resposta 1\"\n\t\t\t\t\t\t\t\t+ \" \\n- Resposta encertada et donarÓ 3 punts. \\n- Resposta incorrecta et restarÓ 1 punt.\\n- No contestar ni suma ni resta punts.\";\n\t\t\t\t\t\tRequest start = new Request(TipusRequest.COMUNICACIO, TipusDestinatari.ALL, TipusRemitent.BOT,\n\t\t\t\t\t\t\t\t\"@Trivial\", inici);\n\t\t\t\t\t\tRequest.enviar(start, output);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tThread.currentThread().sleep(300);\n\t\t\t\t\t\t} catch (InterruptedException e1) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tint nPreguntes = 0;\n\n\t\t\t\t\t\tlistCategories = fitxers.categoriaToList();\n\n\t\t\t\t\t\tSet<String> controlPreguntes = new HashSet<String>();\n\n\t\t\t\t\t\twhile (nPreguntes < MAXPREGUNTES) { // triar categoria\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// String\n\n\t\t\t\t\t\t\tString categoriaSeleccionada = listCategories\n\t\t\t\t\t\t\t\t\t.get((int) (random.nextDouble() * listCategories.size()));\n\t\t\t\t\t\t\tStringBuilder sb1 = new StringBuilder(\"\\nCategoria: \\n\");\n\t\t\t\t\t\t\tsb1.append(categoriaSeleccionada + \"\\n\");\n\n\t\t\t\t\t\t\t// Llenšar pregunta de la categoria\n\n\t\t\t\t\t\t\tpreguntes = fitxers.llegeixCSV(categoriaSeleccionada);\n\n\t\t\t\t\t\t\tPregunta preguntaSeleccionada = preguntes\n\t\t\t\t\t\t\t\t\t.get((int) (random.nextDouble() * preguntes.size()));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// preguntes no repetides\n\t\t\t\t\t\t\tif (preguntes.size() >= nPreguntes)\n\t\t\t\t\t\t\t\twhile (controlPreguntes.contains(categoriaSeleccionada + preguntes.indexOf(preguntaSeleccionada)))\n\t\t\t\t\t\t\t\t\tpreguntaSeleccionada = preguntes.get((int) (random.nextDouble() * preguntes.size()));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcontrolPreguntes.add(categoriaSeleccionada + preguntes.indexOf(preguntaSeleccionada));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tStringBuilder sb2 = new StringBuilder();\n\t\t\t\t\t\t\tsb2.append(\"Pregunta \" + (nPreguntes + 1) + \"/\" + MAXPREGUNTES + \": \\n\");\n\t\t\t\t\t\t\tsb2.append(preguntaSeleccionada.toString());\n\n\t\t\t\t\t\t\tsb1.append(sb2);\n\t\t\t\t\t\t\tRequest pregunta = new Request(TipusRequest.COMUNICACIO, TipusDestinatari.ALL,\n\t\t\t\t\t\t\t\t\tTipusRemitent.BOT, \"@Trivial\", sb1.toString());\n\n\t\t\t\t\t\t\tRequest.enviar(pregunta, output);\n\n\t\t\t\t\t\t\tEvaluador eval = new Evaluador(requestStack, output, preguntaSeleccionada, marcador);\n\t\t\t\t\t\t\tThread th_evaluacio = new Thread(eval);\n\t\t\t\t\t\t\tth_evaluacio.setName(\"evaluador\");\n\t\t\t\t\t\t\tth_evaluacio.start();\n\t\t\t\t\t\t\tLogger.getLogger(\"Main\").log(Level.INFO, \"Evaluant respostes\");\n\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tth_evaluacio.join(TEMPSENTREPREGUNTES * 1000);\n\t\t\t\t\t\t\t\tth_evaluacio.interrupt();\n\n\t\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tnPreguntes++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tStringBuilder result = new StringBuilder();\n\t\t\t\t\t\tresult.append(\"Fi del joc. Aquests son els resultats:\\n\");\n\t\t\t\t\t\tmarcador.forEach((k, v) -> {\n\t\t\t\t\t\t\tresult.append(k + \": \" + v + \"\\n\");\n\t\t\t\t\t\t});\n\t\t\t\t\t\tRequest resultats = new Request(TipusRequest.COMUNICACIO, TipusDestinatari.ALL,\n\t\t\t\t\t\t\t\tTipusRemitent.BOT, \"@Trivial\", result.toString());\n\t\t\t\t\t\tRequest.enviar(resultats, output);\n\t\t\t\t\t\tmarcador.clear();\n\t\t\t\t\t\tiniciat = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tiniciat = false;\n\t\t\t\t\t\tRequest tancat = new Request(TipusRequest.COMUNICACIO, TipusDestinatari.ALL, TipusRemitent.BOT,\n\t\t\t\t\t\t\t\t\"@Trivial\",\n\t\t\t\t\t\t\t\t\"Tancades les inscripcions. No hi ha participants per tant s'anula la partida\");\n\t\t\t\t\t\tRequest.enviar(tancat, output);\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\trx.setMissatge(\"!trivial.\" + rx.getMissatge());\n\t\t\t\t\tRequest.enviar(Request.convertRequestToAll(rx), output);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\t\tpublic void run() {\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\twhile(true)\n\t\t\t\t{\n\t\t\t\t\tfor(int i =0 ; i< secuencia.length; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tThread.sleep(100);\n\t\t\t\t\t\tGdeMonitor.dispararTransicion(secuencia[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tcatch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}",
"@Override\n\tpublic void run() {\n\t\ttry {\n\t\t\twhile(true){\n\t\t\t\tif (client == null){\n\t\t\t\t\tsynchronized(holder){\n\t\t\t\t\t\trestTime = new Date();\n\t\t\t\t\t\tlogger.info(\"进入restRoom\");\n\t\t\t\t\t\tcentralSystem.rest(this);\n\t\t\t\t\t\tholder.wait();\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\tthis.proc.process(client);\n client = centralSystem.fetchOne();\t\n if (client != null){\n \tlogger.info(\"领取新任务\");\n } \n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void run(){\r\n\t\tsynchronized(this){\r\n\t\t\tObjectServer db4oServer = Db4o.openServer(getDbDirectory() + FILE, PORT);\r\n\t\t\tdb4oServer.grantAccess(USER, PASS);\r\n\r\n\t\t\t// Using the messaging functionality to redirect all\r\n\t\t\t// messages to this.processMessage\r\n\t\t\tdb4oServer.ext().configure().clientServer().setMessageRecipient(this);\r\n\r\n\t\t\t// to identify the thread in a debugger\r\n\t\t\tThread.currentThread().setName(this.getClass().getName());\r\n\r\n\t\t\t// We only need low priority since the db4o server has\r\n\t\t\t// it's own thread.\r\n\t\t\tThread.currentThread().setPriority(Thread.MIN_PRIORITY);\r\n\t\t\ttry {\r\n\t\t\t\t\tif(! stop){\r\n\t\t\t\t\t\t// wait forever for notify() from close()\r\n\t\t\t\t\t\tthis.wait(Long.MAX_VALUE);\r\n\t\t\t\t\t}\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tdb4oServer.close();\r\n\t\t}\r\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}",
"@Override\n\tpublic void run() {\n\t\ttry {\n\t\t\tServerSocket servClient = new ServerSocket(9090);\n\t\t\tSocket client;\n\t\t\tString id, msg;\n\t\t\tPackageToSend packageReceived;\n\t\t\twhile(true) {\n\t\t\t\tclient = servClient.accept();\n\t\t\t\tObjectInputStream inStream = \n\t\t\t\t\t\tnew ObjectInputStream(\n\t\t\t\t\t\t\t\tclient.getInputStream());\n\t\t\t\tpackageReceived = (PackageToSend) inStream.readObject();\n\t\t\t\tid = packageReceived.getId();\n\t\t\t\tmsg = packageReceived.getMsg();\n\t\t\t\tthis.textArea.append(id + \": \" + msg + \"\\n\");\n\t\t\t\tinStream.close();\n\t\t\t\tclient.close();\n\t\t\t}\n\t\t} catch (IOException | ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}",
"@Override\n public void co() {\n Object object;\n int n;\n object = this.mw;\n // MONITORENTER : object\n this.tV = gi.submit(this.tU);\n // MONITOREXIT : object\n try {\n object = this.tV.get(60000, TimeUnit.MILLISECONDS);\n n = -2;\n }\n catch (TimeoutException var2_2) {\n gs.W(\"Timed out waiting for native ad.\");\n n = 2;\n object = null;\n }\n catch (ExecutionException var2_3) {\n n = 0;\n object = null;\n }\n catch (InterruptedException var2_4) {\n object = null;\n n = -1;\n }\n catch (CancellationException var2_5) {\n object = null;\n n = -1;\n }\n if (object == null) {\n object = this.r(n);\n }\n gr.wC.post(new Runnable((fz)object){\n final /* synthetic */ fz ts;\n\n @Override\n public void run() {\n fn.this.tm.a(this.ts);\n }\n });\n }",
"public void run() {\n\t\t\tSystem.out.println(\"Thread running\");\n\t\t\tPackage p;\n\t\t\ttry {\n\t\t\t\t// Waiting for package from the client.\n\t\t\t\twhile ((p = (Package) in.readObject()) != null) {\n\t\t\t\t\tSystem.out.println(\"Get package from \"+name+\": \"+p.getType());\n\t\t\t\t\t/*\t\n\t\t\t\t\t * Handling QUIT package: \n\t\t\t\t\t * call quit() for the player, then break the loop then the run() will end.\n\t\t\t\t\t */\n\t\t\t\t\tif (p.getType().equals(\"QUIT\")) {\n\t\t\t\t\t\tquit();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t/*\n\t\t\t\t\t * Handling REGISTER package:\n\t\t\t\t\t * Record the client's name and add it the waiting list.\n\t\t\t\t\t */\n\t\t\t\t\tif (p.getType().equals(\"REGISTER\")) {\n\t\t\t\t\t\tname = (String) p.getObject();\n\t\t\t\t\t\twaitingPlayers.add(this);\n\t\t\t\t\t\tview.writeLog(\"Player: \" + name + \" is registered and waiting.\");\n\t\t\t\t\t\tview.changeWait(waitingPlayers.size());\t\t\t\t\t\t\n\t\t\t\t\t\tstatusCheck();\n\t\t\t\t\t}\n\t\t\t\t\t/*\n\t\t\t\t\t * Handling DRAW package:\n\t\t\t\t\t * Call the cardToOne method to draw and send a card to this player.\n\t\t\t\t\t */\n\t\t\t\t\tif (p.getType().equals(\"DRAW\")) {\n\t\t\t\t\t\tcardToOne(this);\n\t\t\t\t\t}\n\t\t\t\t\t/*\n\t\t\t\t\t * Handling PASS package:\n\t\t\t\t\t * Update the passCounter variable and check whether all clients have chosen to pass.\n\t\t\t\t\t */\n\t\t\t\t\tif (p.getType().equals(\"PASS\")) {\n\t\t\t\t\t\tif(dealer == this) {\n\t\t\t\t\t\t\tclearingResult();\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpassCounter ++;\n\t\t\t\t\t\tview.writeLog(name + \" stop drawing cards (pass).\");\n\t\t\t\t\t\tif(passCounter >= players.size()-1) {\n\t\t\t\t\t\t\tdealerTurn();\t//If all remaining clients choose to pass, start the dealer's turn.\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t/*\n\t\t\t\t\t * Handling OUT package:\n\t\t\t\t\t * A client sends OUT means he got more than 21 points. Move him from player list to waiting list.\n\t\t\t\t\t */\n\t\t\t\t\tif (p.getType().equals(\"OUT\")) {\n\t\t\t\t\t\tif(dealer == this) {\n\t\t\t\t\t\t\tdealerOut();\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tArrayList<ClientThread> delList = new ArrayList<ClientThread>();\n\t\t\t\t\t\tdelList.add(this);\n\t\t\t\t\t\tplayers.removeAll(delList);\n\t\t\t\t\t\twaitingPlayers.add(this);\n\t\t\t\t\t\tview.writeLog(name + \" is OUT of the game.\");\n\t\t\t\t\t\tview.changeInAndWait(players.size(), waitingPlayers.size());\n\t\t\t\t\t\t//Inform the dealer that this player explodes. \n\t\t\t\t\t\tdealer.send(new Package(\"EXPLODE\",name));\n\t\t\t\t\t\tif(players.size() == 1) {\n\t\t\t\t\t\t\tdealer.send(new Package(\"MESSAGE\",\"All other players are out of game. Congrates!\"));\n\t\t\t\t\t\t\tdealer.send(new Package(\"END\",0));\n\t\t\t\t\t\t\tendGame();\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Since the size of player list changed, check again whether all remain players have chosen to pass. \n\t\t\t\t\t\tif(passCounter >= players.size()-1) {\t\n\t\t\t\t\t\t\tdealerTurn();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (SocketException e) {\n\t\t\t\tquit();\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(\"Unrecognized package received.\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}",
"public void Subscribe(Integer busLineID, final ConfigurationActivity configurationActivity) { // subscribe se ena buslineID\n Socket requestSocket = null;\n ObjectOutputStream out = null; // Gets and sends streams\n ObjectInputStream in = null;\n\n try {\n Client client = new Client();\n client.brokers = Subscriber.this.brokers;\n\n subscribedLists.add(busLineID);\n subscribedThreads.put(busLineID, client);\n\n int hash = HashTopic(busLineID);\n\n int no = FindBroker(hash);\n\n requestSocket = connectWithTimeout(no, TIMEOUT);\n\n subscribedSockets.put(busLineID, requestSocket);\n\n out = new ObjectOutputStream(requestSocket.getOutputStream());\n in = new ObjectInputStream(requestSocket.getInputStream());\n\n String s = in.readUTF();\n\n out.writeUTF(\"subscriber\");\n\n out.flush();\n\n s = in.readUTF();\n\n out.writeUTF(\"subscribe\");\n\n out.flush();\n\n String msg = String.valueOf(busLineID);\n out.writeUTF(msg);\n out.flush();\n\n Message message = MapsActivity.mainHandler.obtainMessage();\n message.what = 4;\n MapsActivity.mainHandler.sendMessage(message);\n\n configurationActivity.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n configurationActivity.updateGUI();\n }\n });\n\n\n while (true) {\n s = in.readUTF();\n visualizeData(s);\n\n message = MapsActivity.mainHandler.obtainMessage();\n message.what = 5;\n message.obj = s;\n\n MapsActivity.mainHandler.sendMessage(message);\n }\n } catch (SocketTimeoutException ex) {\n Message message = MapsActivity.mainHandler.obtainMessage();\n message.what = 8;\n message.obj = busLineID;\n MapsActivity.mainHandler.sendMessage(message);\n ex.printStackTrace();\n\n subscribedLists.remove(busLineID);\n\n if (requestSocket != null) {\n disconnect(requestSocket, out, in);\n }\n } catch (Exception ex) {\n Message message = MapsActivity.mainHandler.obtainMessage();\n message.what = 7;\n message.obj = ex.toString();\n MapsActivity.mainHandler.sendMessage(message);\n ex.printStackTrace();\n\n if (requestSocket != null) {\n disconnect(requestSocket, out, in);\n }\n }\n }",
"public ServidorScrabbleJ()\n\t {\n\t super( \"ServidorScrabbleJ\" ); // establece el título de la ventana\n\n\t // crea objeto ExecutorService con un subproceso para cada jugador\n\t ejecutarJuego = Executors.newFixedThreadPool(2);\n\t bloqueoJuego = new ReentrantLock(); // crea bloqueo para el juego\n\n\t // variable de condición para los dos jugadores conectados\n\t otroJugadorConectado = bloqueoJuego.newCondition();\n\n\t // variable de condición para el turno del otro jugador\n\t turnoOtroJugador = bloqueoJuego.newCondition(); \n\n\t for ( int i = 0; i < 15; i++ )\n\t \t for (int j = 0; j < 15; j++) {\n\t \t tablero[ i ][ j ] = new String( \"\" ); // crea tablero de scrabble\n\t\t\t}\n\t jugadores = new Jugador[2]; // crea arreglo de jugadores\n\t jugadorActual = JUGADOR_1; // establece el primer jugador como el jugador actual\n\t \n\t try\n\t {\n\t \t //establece el puerto y el numero maximo de conexiones permitidas\n\t servidor = new ServerSocket(12345, 2); // establece objeto ServerSocket\n\t } // fin de try\n\t catch ( IOException excepcionES ) \n\t {\n\t excepcionES.printStackTrace();\n\t System.exit(1);\n\t } // fin de catch\n\n\t areaSalida = new JTextArea(); // crea objeto JTextArea para mostrar la salida\n\t add( new JScrollPane(areaSalida), BorderLayout.CENTER );\n\t areaSalida.setText( \"Servidor esperando conexiones\\n\" );\n\n\t setSize( 300, 325 ); // establece el tamaño de la ventana\n\t setVisible( true ); // muestra la ventana\n\t }",
"void toConnect() throws Exception {\n\t\tnameField.setVisible(false);\n\t\tf.setTitle(nameField.getText());\n\t\tsocketToServer = new Socket(\"127.0.0.1\", 5050);\n\t\tmyOutputStream = new ObjectOutputStream(socketToServer.getOutputStream());\n\t\tmyInputStream = new ObjectInputStream(socketToServer.getInputStream()); \n\t\tconnected();\n\t\tstart();\n\t}",
"private void sendObject(Object obj){\r\n try {\r\n out.reset();\r\n out.writeObject(obj);\r\n out.flush();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }",
"@Override\n\tpublic void cadastrar(Cliente o) {\n\t\t\n\t}",
"public void run() {\n try {\n //Create the input object stream and output object stream for this client\n toClient = new ObjectOutputStream(client.getOutputStream());\n fromClient = new ObjectInputStream(client.getInputStream());\n login = false;\n\n while (!login) {/*Wait for a client to login*/\n try {\n receviedProtocol = (Protocol) fromClient.readObject();\n if (receviedProtocol.getMethod().equals(\"HELP\"))\n sendHelpMenu();\n else if (receviedProtocol.getMethod().equals(\"LOGIN\")) {\n authorize(receviedProtocol);\n login = true;\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n logout = false;\n while (!logout) {/*Keep conncetion between client and server until the client logout*/\n try{\n receviedProtocol = (Protocol)fromClient.readObject(); //Wait for client input\n startIndex = 0;//This will be used to track the starting point of next n groups to be send\n if(receviedProtocol.getMethod().equals(\"AG\"))\n allGroupHandler(receviedProtocol);\n else if(receviedProtocol.getMethod().equals(\"LOGOUT\")){\n logout();\n logout = true;\n }\n }catch (Exception e){\n e.printStackTrace();\n }\n\n }\n\n } catch (IOException e) {\n System.out.println(e);\n\n } finally {\n try {\n client.close();\n } catch (IOException e) {\n System.out.println(e);\n }\n }\n }",
"@Override\r\n public void run()\r\n {\n boolean centinela = true;\r\n\r\n // Mientras el otro jugador no pierda se procede con:\r\n while (centinela)\r\n {\r\n try\r\n {\r\n // Se crea un lector para el puerto y se revisa/lee que hay en el mismo\r\n BufferedReader buffer = new BufferedReader(new InputStreamReader(socketCliente.getInputStream()));\r\n String mensaje = buffer.readLine();\r\n\r\n // Luego, trataremos de segmentar el mensaje que se recibio\r\n String[] tokens = mensaje.split(\" \");\r\n\r\n // Si el mensaje posee un elemento entonces\r\n if (tokens.length == 1)\r\n {\r\n // Si el unico token/elemento es la palabra: \"Ganaste!\" entonces\r\n if (tokens[0].equals(\"Ganaste!\"))\r\n {\r\n // Se levanta/marca la variable de victoria para este jugador\r\n gano = true;\r\n\r\n // Y se procede a terminar este ciclo, el cual a su vez terminara el hilo\r\n centinela = false;\r\n }\r\n }\r\n\r\n // Si el mensaje posee dos elementos entonces\r\n if (tokens.length == 2)\r\n {\r\n // Damos por iniciada la partida\r\n partidaEnProceso = true;\r\n }\r\n\r\n // Por otro lado, si el mensaje posee tres elementos entonces\r\n if (tokens.length == 3)\r\n {\r\n // Es porque el otro jugador acabo de eliminar un enemigo, y ahora me corresponde a mi eliminarlo (pasarselo a el de nuevo), por lo que leo cual era el tipo y espero que el generador lo cree\r\n enemigoTransferido = Integer.parseInt(tokens[2]);\r\n }\r\n }\r\n catch (IOException e)\r\n {\r\n e.printStackTrace();\r\n }\r\n }\r\n }",
"public RequestThread(Socket soc){\r\n this.soc = soc; \r\n }",
"public void mostrarDatos(Object obj) throws Exception {\r\n\t\tHis_parto his_parto = (His_parto) obj;\r\n\t\ttry {\r\n\t\t\ttbxCodigo_historia.setValue(his_parto.getCodigo_historia());\r\n\t\t\tdtbxFecha_inicial.setValue(his_parto.getFecha_inicial());\r\n\r\n\t\t\tPaciente paciente = new Paciente();\r\n\t\t\tpaciente.setCodigo_empresa(his_parto.getCodigo_empresa());\r\n\t\t\tpaciente.setCodigo_sucursal(his_parto.getCodigo_sucursal());\r\n\t\t\tpaciente.setNro_identificacion(his_parto.getIdentificacion());\r\n\t\t\tpaciente = getServiceLocator().getPacienteService().consultar(\r\n\t\t\t\t\tpaciente);\r\n\r\n\t\t\tElemento elemento = new Elemento();\r\n\t\t\telemento.setCodigo(paciente.getSexo());\r\n\t\t\telemento.setTipo(\"sexo\");\r\n\t\t\telemento = getServiceLocator().getElementoService().consultar(\r\n\t\t\t\t\telemento);\r\n\r\n\t\t\ttbxIdentificacion.setValue(his_parto.getIdentificacion());\r\n\t\t\ttbxNomPaciente.setValue((paciente != null ? paciente.getNombre1()\r\n\t\t\t\t\t+ \" \" + paciente.getApellido1() : \"\"));\r\n\t\t\ttbxTipoIdentificacion.setValue((paciente != null ? paciente\r\n\t\t\t\t\t.getTipo_identificacion() : \"\"));\r\n\t\t\ttbxEdad.setValue(Util.getEdad(new java.text.SimpleDateFormat(\r\n\t\t\t\t\t\"dd/MM/yyyy\").format(paciente.getFecha_nacimiento()),\r\n\t\t\t\t\tpaciente.getUnidad_medidad(), false));\r\n\t\t\ttbxSexo.setValue((elemento != null ? elemento.getDescripcion() : \"\"));\r\n\t\t\tdbxNacimiento.setValue(paciente.getFecha_nacimiento());\r\n\t\t\ttbxDireccion.setValue(paciente.getDireccion());\r\n\r\n\t\t\tAdministradora administradora = new Administradora();\r\n\t\t\tadministradora.setCodigo(paciente.getCodigo_administradora());\r\n\t\t\tadministradora = getServiceLocator().getAdministradoraService()\r\n\t\t\t\t\t.consultar(administradora);\r\n\r\n\t\t\ttbxCodigo_eps.setValue(administradora != null ? administradora\r\n\t\t\t\t\t.getCodigo() : \"\");\r\n\t\t\ttbxNombre_eps.setValue(administradora != null ? administradora\r\n\t\t\t\t\t.getNombre() : \"\");\r\n\r\n\t\t\tContratos contratos = new Contratos();\r\n\t\t\tcontratos.setCodigo_empresa(his_parto.getCodigo_empresa());\r\n\t\t\tcontratos.setCodigo_sucursal(his_parto.getCodigo_sucursal());\r\n\t\t\tcontratos.setCodigo_administradora(paciente.getCodigo_administradora());\r\n//\t\t\tcontratos.setId_plan(paciente.getId_plan());\r\n\t\t\tcontratos = getServiceLocator().getContratosService().consultar(contratos);\r\n\r\n\t\t\ttbxCodigo_contrato.setValue(contratos != null ? contratos.getId_plan()\r\n\t\t\t\t\t: \"\");\r\n\t\t\ttbxContrato.setValue(contratos != null ? contratos.getNombre() : \"\");\r\n\r\n\t\t\tfor (int i = 0; i < lbxCodigo_dpto.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxCodigo_dpto.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(paciente.getCodigo_dpto())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxCodigo_dpto.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tlistarMunicipios(lbxCodigo_municipio, lbxCodigo_dpto);\r\n\r\n\t\t\ttbxConyugue.setValue(his_parto.getConyugue());\r\n\t\t\ttbxId_conyugue.setValue(his_parto.getId_conyugue());\r\n\t\t\ttbxEdad_conyugue.setValue(his_parto.getEdad_conyugue());\r\n\r\n\t\t\tNivel_educativo nivel_educativo = new Nivel_educativo();\r\n\t\t\tnivel_educativo.setId(his_parto.getEscolaridad_conyugue());\r\n\t\t\tnivel_educativo = getServiceLocator().getNivel_educativoService()\r\n\t\t\t\t\t.consultar(nivel_educativo);\r\n\t\t\ttbxEscolaridad_nombre\r\n\t\t\t\t\t.setValue(nivel_educativo != null ? nivel_educativo\r\n\t\t\t\t\t\t\t.getNombre() : \"\");\r\n\t\t\ttbxEscolaridad_conyugue\r\n\t\t\t\t\t.setValue(nivel_educativo != null ? nivel_educativo.getId()\r\n\t\t\t\t\t\t\t: \"\");\r\n\r\n\t\t\ttbxMotivo.setValue(his_parto.getMotivo());\r\n\t\t\ttbxEnfermedad_actual.setValue(his_parto.getEnfermedad_actual());\r\n\t\t\ttbxAntecedentes_familiares.setValue(his_parto\r\n\t\t\t\t\t.getAntecedentes_familiares());\r\n\t\t\tRadio radio = (Radio) rdbPreeclampsia.getFellow(\"Preeclampsia\"\r\n\t\t\t\t\t+ his_parto.getPreeclampsia());\r\n\t\t\tradio.setChecked(true);\r\n\t\t\tRadio radio1 = (Radio) rdbHipertension.getFellow(\"Hipertension\"\r\n\t\t\t\t\t+ his_parto.getHipertension());\r\n\t\t\tradio1.setChecked(true);\r\n\t\t\tRadio radio2 = (Radio) rdbEclampsia.getFellow(\"Eclampsia\"\r\n\t\t\t\t\t+ his_parto.getEclampsia());\r\n\t\t\tradio2.setChecked(true);\r\n\t\t\tRadio radio3 = (Radio) rdbH1.getFellow(\"H1\" + his_parto.getH1());\r\n\t\t\tradio3.setChecked(true);\r\n\t\t\tRadio radio4 = (Radio) rdbH2.getFellow(\"H2\" + his_parto.getH2());\r\n\t\t\tradio4.setChecked(true);\r\n\t\t\tRadio radio5 = (Radio) rdbPostimadurez.getFellow(\"Postimadurez\"\r\n\t\t\t\t\t+ his_parto.getPostimadurez());\r\n\t\t\tradio5.setChecked(true);\r\n\t\t\tRadio radio6 = (Radio) rdbRot_pre.getFellow(\"Rot_pre\"\r\n\t\t\t\t\t+ his_parto.getRot_pre());\r\n\t\t\tradio6.setChecked(true);\r\n\t\t\tRadio radio7 = (Radio) rdbPolihidramnios.getFellow(\"Polihidramnios\"\r\n\t\t\t\t\t+ his_parto.getPolihidramnios());\r\n\t\t\tradio7.setChecked(true);\r\n\t\t\tRadio radio8 = (Radio) rdbRcui.getFellow(\"Rcui\"\r\n\t\t\t\t\t+ his_parto.getRcui());\r\n\t\t\tradio8.setChecked(true);\r\n\t\t\tRadio radio9 = (Radio) rdbPelvis.getFellow(\"Pelvis\"\r\n\t\t\t\t\t+ his_parto.getPelvis());\r\n\t\t\tradio9.setChecked(true);\r\n\t\t\tRadio radio10 = (Radio) rdbFeto_macrosonico\r\n\t\t\t\t\t.getFellow(\"Feto_macrosonico\"\r\n\t\t\t\t\t\t\t+ his_parto.getFeto_macrosonico());\r\n\t\t\tradio10.setChecked(true);\r\n\t\t\tRadio radio11 = (Radio) rdbIsoinmunizacion\r\n\t\t\t\t\t.getFellow(\"Isoinmunizacion\"\r\n\t\t\t\t\t\t\t+ his_parto.getIsoinmunizacion());\r\n\t\t\tradio11.setChecked(true);\r\n\t\t\tRadio radio12 = (Radio) rdbAo.getFellow(\"Ao\" + his_parto.getAo());\r\n\t\t\tradio12.setChecked(true);\r\n\t\t\tRadio radio13 = (Radio) rdbCirc_cordon.getFellow(\"Circ_cordon\"\r\n\t\t\t\t\t+ his_parto.getCirc_cordon());\r\n\t\t\tradio13.setChecked(true);\r\n\t\t\tRadio radio14 = (Radio) rdbPostparto.getFellow(\"Postparto\"\r\n\t\t\t\t\t+ his_parto.getPostparto());\r\n\t\t\tradio14.setChecked(true);\r\n\t\t\tRadio radio15 = (Radio) rdbDiabetes.getFellow(\"Diabetes\"\r\n\t\t\t\t\t+ his_parto.getDiabetes());\r\n\t\t\tradio15.setChecked(true);\r\n\t\t\tRadio radio16 = (Radio) rdbCardiopatia.getFellow(\"Cardiopatia\"\r\n\t\t\t\t\t+ his_parto.getCardiopatia());\r\n\t\t\tradio16.setChecked(true);\r\n\t\t\tRadio radio17 = (Radio) rdbAnemias.getFellow(\"Anemias\"\r\n\t\t\t\t\t+ his_parto.getAnemias());\r\n\t\t\tradio17.setChecked(true);\r\n\t\t\tRadio radio18 = (Radio) rdbEnf_autoinmunes\r\n\t\t\t\t\t.getFellow(\"Enf_autoinmunes\"\r\n\t\t\t\t\t\t\t+ his_parto.getEnf_autoinmunes());\r\n\t\t\tradio18.setChecked(true);\r\n\t\t\tRadio radio19 = (Radio) rdbEnf_renales.getFellow(\"Enf_renales\"\r\n\t\t\t\t\t+ his_parto.getEnf_renales());\r\n\t\t\tradio19.setChecked(true);\r\n\t\t\tRadio radio20 = (Radio) rdbInf_urinaria.getFellow(\"Inf_urinaria\"\r\n\t\t\t\t\t+ his_parto.getInf_urinaria());\r\n\t\t\tradio20.setChecked(true);\r\n\t\t\tRadio radio21 = (Radio) rdbEpilepsia.getFellow(\"Epilepsia\"\r\n\t\t\t\t\t+ his_parto.getEpilepsia());\r\n\t\t\tradio21.setChecked(true);\r\n\t\t\tRadio radio22 = (Radio) rdbTbc\r\n\t\t\t\t\t.getFellow(\"Tbc\" + his_parto.getTbc());\r\n\t\t\tradio22.setChecked(true);\r\n\t\t\tRadio radio23 = (Radio) rdbMiomas.getFellow(\"Miomas\"\r\n\t\t\t\t\t+ his_parto.getMiomas());\r\n\t\t\tradio23.setChecked(true);\r\n\t\t\tRadio radio24 = (Radio) rdbHb.getFellow(\"Hb\" + his_parto.getHb());\r\n\t\t\tradio24.setChecked(true);\r\n\t\t\tRadio radio25 = (Radio) rdbFumadora.getFellow(\"Fumadora\"\r\n\t\t\t\t\t+ his_parto.getFumadora());\r\n\t\t\tradio25.setChecked(true);\r\n\t\t\tRadio radio26 = (Radio) rdbInf_puerperal.getFellow(\"Inf_puerperal\"\r\n\t\t\t\t\t+ his_parto.getInf_puerperal());\r\n\t\t\tradio26.setChecked(true);\r\n\t\t\tRadio radio27 = (Radio) rdbInfertilidad.getFellow(\"Infertilidad\"\r\n\t\t\t\t\t+ his_parto.getInfertilidad());\r\n\t\t\tradio27.setChecked(true);\r\n\t\t\ttbxMenarquia.setValue(his_parto.getMenarquia());\r\n\t\t\ttbxCiclos.setValue(his_parto.getCiclos());\r\n\t\t\ttbxVida_marital.setValue(his_parto.getVida_marital());\r\n\t\t\ttbxVida_obstetrica.setValue(his_parto.getVida_obstetrica());\r\n\t\t\tfor (int i = 0; i < lbxNo_gestaciones.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxNo_gestaciones.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_parto.getNo_gestaciones())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxNo_gestaciones.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxParto.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxParto.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString().equals(his_parto.getParto())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxParto.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxAborto.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxAborto.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_parto.getAborto())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxAborto.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxCesarias.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxCesarias.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_parto.getCesarias())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxCesarias.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tdtbxFecha_um.setValue(his_parto.getFecha_um());\r\n\t\t\ttbxUm.setValue(his_parto.getUm());\r\n\t\t\ttbxFep.setValue(his_parto.getFep());\r\n\t\t\tfor (int i = 0; i < lbxGemerales.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxGemerales.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_parto.getGemerales())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxGemerales.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxMalformados.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxMalformados.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_parto.getMalformados())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxMalformados.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxNacidos_vivos.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxNacidos_vivos.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_parto.getNacidos_vivos())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxNacidos_vivos.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxNacidos_muertos.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxNacidos_muertos.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_parto.getNacidos_muertos())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxNacidos_muertos.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxPreterminos.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxPreterminos.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_parto.getPreterminos())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxPreterminos.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tchbMedico.setChecked(his_parto.getMedico());\r\n\t\t\tchbEnfermera.setChecked(his_parto.getEnfermera());\r\n\t\t\tchbAuxiliar.setChecked(his_parto.getAuxiliar());\r\n\t\t\tchbPartera.setChecked(his_parto.getPartera());\r\n\t\t\tchbOtros.setChecked(his_parto.getOtros());\r\n\t\t\tRadio radio28 = (Radio) rdbControlado.getFellow(\"Controlado\"\r\n\t\t\t\t\t+ his_parto.getControlado());\r\n\t\t\tradio28.setChecked(true);\r\n\t\t\tRadio radio29 = (Radio) rdbLugar_consulta\r\n\t\t\t\t\t.getFellow(\"Lugar_consulta\" + his_parto.getLugar_consulta());\r\n\t\t\tradio29.setChecked(true);\r\n\t\t\tfor (int i = 0; i < lbxNo_consultas.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxNo_consultas.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_parto.getNo_consultas())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxNo_consultas.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tchbEspecialistas.setChecked(his_parto.getEspecialistas());\r\n\t\t\tchbGeneral.setChecked(his_parto.getGeneral());\r\n\t\t\tchbPartera_consulta.setChecked(his_parto.getPartera_consulta());\r\n\t\t\tRadio radio30 = (Radio) rdbSangrado_vaginal\r\n\t\t\t\t\t.getFellow(\"Sangrado_vaginal\"\r\n\t\t\t\t\t\t\t+ his_parto.getSangrado_vaginal());\r\n\t\t\tradio30.setChecked(true);\r\n\t\t\tRadio radio31 = (Radio) rdbCefalias.getFellow(\"Cefalias\"\r\n\t\t\t\t\t+ his_parto.getCefalias());\r\n\t\t\tradio31.setChecked(true);\r\n\t\t\tRadio radio32 = (Radio) rdbEdema.getFellow(\"Edema\"\r\n\t\t\t\t\t+ his_parto.getEdema());\r\n\t\t\tradio32.setChecked(true);\r\n\t\t\tRadio radio33 = (Radio) rdbEpigastralgia.getFellow(\"Epigastralgia\"\r\n\t\t\t\t\t+ his_parto.getEpigastralgia());\r\n\t\t\tradio33.setChecked(true);\r\n\t\t\tRadio radio34 = (Radio) rdbVomitos.getFellow(\"Vomitos\"\r\n\t\t\t\t\t+ his_parto.getVomitos());\r\n\t\t\tradio34.setChecked(true);\r\n\t\t\tRadio radio35 = (Radio) rdbTinutus.getFellow(\"Tinutus\"\r\n\t\t\t\t\t+ his_parto.getTinutus());\r\n\t\t\tradio35.setChecked(true);\r\n\t\t\tRadio radio36 = (Radio) rdbEscotomas.getFellow(\"Escotomas\"\r\n\t\t\t\t\t+ his_parto.getEscotomas());\r\n\t\t\tradio36.setChecked(true);\r\n\t\t\tRadio radio37 = (Radio) rdbInfeccion_urinaria\r\n\t\t\t\t\t.getFellow(\"Infeccion_urinaria\"\r\n\t\t\t\t\t\t\t+ his_parto.getInfeccion_urinaria());\r\n\t\t\tradio37.setChecked(true);\r\n\t\t\tRadio radio38 = (Radio) rdbInfeccion_vaginal\r\n\t\t\t\t\t.getFellow(\"Infeccion_vaginal\"\r\n\t\t\t\t\t\t\t+ his_parto.getInfeccion_vaginal());\r\n\t\t\tradio38.setChecked(true);\r\n\t\t\ttbxOtros_embarazo.setValue(his_parto.getOtros_embarazo());\r\n\t\t\ttbxCardiaca.setValue(his_parto.getCardiaca());\r\n\t\t\ttbxRespiratoria.setValue(his_parto.getRespiratoria());\r\n\t\t\ttbxPeso.setValue(his_parto.getPeso());\r\n\t\t\ttbxTalla.setValue(his_parto.getTalla());\r\n\t\t\ttbxTempo.setValue(his_parto.getTempo());\r\n\t\t\ttbxPresion.setValue(his_parto.getPresion());\r\n\t\t\ttbxPresion2.setValue(his_parto.getPresion2());\r\n\t\t\ttbxInd_masa.setValue(his_parto.getInd_masa());\r\n\t\t\ttbxSus_masa.setValue(his_parto.getSus_masa());\r\n\t\t\ttbxCabeza_cuello.setValue(his_parto.getCabeza_cuello());\r\n\t\t\ttbxCardiovascular.setValue(his_parto.getCardiovascular());\r\n\t\t\ttbxMamas.setValue(his_parto.getMamas());\r\n\t\t\ttbxPulmones.setValue(his_parto.getPulmones());\r\n\t\t\ttbxAbdomen.setValue(his_parto.getAbdomen());\r\n\t\t\ttbxUterina.setValue(his_parto.getUterina());\r\n\t\t\ttbxSituacion.setValue(his_parto.getSituacion());\r\n\t\t\ttbxPresentacion.setValue(his_parto.getPresentacion());\r\n\t\t\ttbxV_presentacion.setValue(his_parto.getV_presentacion());\r\n\t\t\ttbxPosicion.setValue(his_parto.getPosicion());\r\n\t\t\ttbxV_posicion.setValue(his_parto.getV_posicion());\r\n\t\t\ttbxC_uterina.setValue(his_parto.getC_uterina());\r\n\t\t\ttbxTono.setValue(his_parto.getTono());\r\n\t\t\ttbxFcf.setValue(his_parto.getFcf());\r\n\t\t\ttbxGenitales.setValue(his_parto.getGenitales());\r\n\t\t\ttbxDilatacion.setValue(his_parto.getDilatacion());\r\n\t\t\ttbxBorramiento.setValue(his_parto.getBorramiento());\r\n\t\t\ttbxEstacion.setValue(his_parto.getEstacion());\r\n\t\t\ttbxMembranas.setValue(his_parto.getMembranas());\r\n\t\t\ttbxExtremidades.setValue(his_parto.getExtremidades());\r\n\t\t\ttbxSnc.setValue(his_parto.getSnc());\r\n\t\t\ttbxObservacion.setValue(his_parto.getObservacion());\r\n\t\t\tfor (int i = 0; i < lbxFinalidad_cons.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxFinalidad_cons.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_parto.getFinalidad_cons())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxFinalidad_cons.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tseleccionarProgramaPyp();\r\n\r\n\t\t\tfor (int i = 0; i < lbxCausas_externas.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxCausas_externas.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_parto.getCausas_externas())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxCausas_externas.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxCodigo_consulta_pyp.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxCodigo_consulta_pyp.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_parto.getCodigo_consulta_pyp())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxCodigo_consulta_pyp.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxTipo_disnostico.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxTipo_disnostico.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_parto.getTipo_disnostico())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxTipo_disnostico.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tCie cie = new Cie();\r\n\t\t\tcie.setCodigo(his_parto.getTipo_principal());\r\n\t\t\t//log.info(\"antes: \" + cie);\r\n\t\t\tcie = getServiceLocator().getServicio(GeneralExtraService.class).consultar(cie);\r\n\t\t\t//log.info(\"despues: \" + cie);\r\n\t\t\ttbxTipo_principal.setValue(his_parto.getTipo_principal());\r\n\t\t\ttbxNomDx.setValue((cie != null ? cie.getNombre() : \"\"));\r\n\r\n\t\t\t/* relacionado 1 */\r\n\t\t\tcie = new Cie();\r\n\t\t\tcie.setCodigo(his_parto.getTipo_relacionado_1());\r\n\t\t\t//log.info(\"antes: \" + cie);\r\n\t\t\tcie = getServiceLocator().getServicio(GeneralExtraService.class).consultar(cie);\r\n\t\t\t//log.info(\"despues: \" + cie);\r\n\r\n\t\t\ttbxTipo_relacionado_1.setValue(his_parto.getTipo_relacionado_1());\r\n\t\t\ttbxNomDxRelacionado_1\r\n\t\t\t\t\t.setValue((cie != null ? cie.getNombre() : \"\"));\r\n\r\n\t\t\t/* relacionado 2 */\r\n\t\t\tcie = new Cie();\r\n\t\t\tcie.setCodigo(his_parto.getTipo_relacionado_2());\r\n\t\t\t//log.info(\"antes: \" + cie);\r\n\t\t\tcie = getServiceLocator().getServicio(GeneralExtraService.class).consultar(cie);\r\n\t\t\t//log.info(\"despues: \" + cie);\r\n\r\n\t\t\ttbxTipo_relacionado_2.setValue(his_parto.getTipo_relacionado_2());\r\n\t\t\ttbxNomDxRelacionado_2\r\n\t\t\t\t\t.setValue((cie != null ? cie.getNombre() : \"\"));\r\n\r\n\t\t\t/* relacionado 3 */\r\n\t\t\tcie = new Cie();\r\n\t\t\tcie.setCodigo(his_parto.getTipo_relacionado_3());\r\n\t\t\t//log.info(\"antes: \" + cie);\r\n\t\t\tcie = getServiceLocator().getServicio(GeneralExtraService.class).consultar(cie);\r\n\t\t\t//log.info(\"despues: \" + cie);\r\n\r\n\t\t\ttbxTipo_relacionado_3.setValue(his_parto.getTipo_relacionado_3());\r\n\t\t\ttbxNomDxRelacionado_3\r\n\t\t\t\t\t.setValue((cie != null ? cie.getNombre() : \"\"));\r\n\r\n\t\t\ttbxTratamiento.setValue(his_parto.getTratamiento());\r\n\r\n\t\t\t// Mostramos la vista //\r\n\t\t\ttbxAccion.setText(\"modificar\");\r\n\t\t\taccionForm(true, tbxAccion.getText());\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t\tMessagebox.show(\"Este dato no se puede editar\", \"Error !!\",\r\n\t\t\t\t\tMessagebox.OK, Messagebox.ERROR);\r\n\t\t}\r\n\t}",
"public void run() {\n // Initial connect request comes in\n Request request = getRequest();\n\n if (request == null) {\n closeConnection();\n return;\n }\n\n if (request.getConnectRequest() == null) {\n closeConnection();\n System.err.println(\"Received invalid initial request from Remote Client.\");\n return;\n }\n\n ObjectFactory objectFactory = new ObjectFactory();\n Response responseWrapper = objectFactory.createResponse();\n responseWrapper.setId(request.getId());\n responseWrapper.setSuccess(true);\n responseWrapper.setConnectResponse(objectFactory.createConnectResponse());\n responseWrapper.getConnectResponse().setId(id);\n\n // Return connect response with our (statistically) unique ID.\n if (!sendMessage(responseWrapper)) {\n closeConnection();\n System.err.println(\"Unable to respond to connect Request from remote Client.\");\n return;\n }\n\n // register our thread with the server\n Server.register(id, this);\n\n // have handler manage the protocol until it decides it is done.\n while ((request = getRequest()) != null) {\n\n Response response = handler.process(this, request);\n\n if (response == null) {\n continue;\n }\n\n if (!sendMessage(response)) {\n break;\n }\n }\n\n // client is done so thread can be de-registered\n if (handler instanceof IShutdownHandler) {\n ((IShutdownHandler) handler).logout(Server.getState(id));\n }\n Server.unregister(id);\n\n // close communication to client.\n closeConnection();\n }",
"public Object invoke(ByteQue fun, Class<?> retType) throws IOException, UnsupportedOperationException {\n socket.getOutputStream().write(new SendData(fun).toArray());\n RecvBuf recv = new RecvBuf();\n byte[] buf = new byte[1024];\n while (true) {\n if (recv.size() != null && recv.size() == recv.len()) {\n break;\n }\n int read = socket.getInputStream().read(buf);\n if (read > 0) {\n recv.append(buf, read);\n } else {\n close();\n throw new UnsupportedOperationException(\"remote connection has been disconnected\");\n }\n }\n ByteQue ret = recv.byteQue();\n String msg = (String) ret.pop(String.class);\n if (msg != null) {\n throw new UnsupportedOperationException(msg);\n }\n if (retType != null && retType != Void.TYPE) {\n return ret.pop(retType);\n }\n return null;\n }",
"@Override\n\tpublic void run() {\n\t\tthis.cajera.procesarCompra(this.cliente, this.initialTime);\n\t}",
"public void callTheWaiter(){\n Student s = (Student) Thread.currentThread();\n\n \tCommunicationChannel com = new CommunicationChannel (serverHostName, serverPortNumb);\n \tObject[] params = new Object[0];\n \tObject[] state_fields = new Object[2];\n \tstate_fields[0] = s.getID();\n \tstate_fields[1] = s.getStudentState();\n \t\n Message m_toServer = new Message(7, params, 0, state_fields, 2, null); \n Message m_fromServer; \n \n while (!com.open ()){ \n \ttry{ \n \t\tThread.currentThread ();\n \t\tThread.sleep ((long) (10));\n \t}\n \tcatch (InterruptedException e) {}\n }\n \n com.writeObject (m_toServer);\n \n m_fromServer = (Message) com.readObject(); \n \n s.setState((int) m_fromServer.getStateFields()[1]);\n \n com.close ();\n }",
"private Object buscaRegistro(BaseJDBC baseJDBC, Class<?> classe, Object id, int profundidade, Class<?>[] classes, int classesVerifica, List<OMObtido> jaObtidos) throws Exception\r\n\t{\r\n\t\tObject objetoAux, idAux;\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tfor(int i=0; i<jaObtidos.size(); i++)\r\n\t\t\t{\r\n\t\t\t\tobjetoAux = jaObtidos.get(i).getOm();\r\n\t\t\t\tif(objetoAux!=null && objetoAux.getClass()==classe)\r\n\t\t\t\t{\r\n\t\t\t\t\tidAux = getIdValue(objetoAux);\r\n\t\t\t\t\tif(idAux!=null && idAux.equals(id))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(jaObtidos.get(i).getProfundidade()>=profundidade) \t{ return objetoAux; }\r\n\t\t\t\t\t\telse \t\t\t\t\t\t\t\t\t\t\t\t\t{ break; }\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\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tLogs.addWarn(\"Nao foi possivel buscar o registro\", e);\r\n\t\t}\r\n\t\t\r\n\t\tobjetoAux = obtemUnico(baseJDBC, classe, id, profundidade, classes, classesVerifica, jaObtidos);\r\n\t\tjaObtidos.add(new OMObtido(objetoAux, profundidade));\r\n\t\treturn objetoAux;\r\n\t}",
"@Override\r\n\t\tpublic void run() {\n\t\t\tLooper.prepare();\r\n\t\t\tbluetoothChat = new BluetoothChat(context);\r\n\t\t\tif (!BluetoothAdapter.checkBluetoothAddress(addr)) { // 检查蓝牙地址是否有效\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tBluetoothDevice device = bluetoothAdapter.getRemoteDevice(addr);\r\n\t\t\twhile (true) {\r\n\t\t\t\tif (count == LONG_TIME_CONNECTED) {\r\n\t\t\t\t\tLooper.loop();\r\n\t\t\t\t}\r\n\t\t\t\tif (device.getBondState() != BluetoothDevice.BOND_BONDED) {\r\n\t\t\t\t\t// 如果未匹配,则继续执行\r\n\t\t\t\t\t// handler.postDelayed(runnable, 5000);\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tClsUtils.setPin(device.getClass(), device, pin); // 手机和蓝牙采集器配对\r\n\t\t\t\t\t\tClsUtils.createBond(device.getClass(), device);\r\n\t\t\t\t\t\tremoteDevice = device; // 配对完毕就把这个设备对象传给全局的remoteDevice\r\n\t\t\t\t\t\tThread.sleep(5000);\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// 赋值至全局\r\n\t\t\t\t\tremoteDevice = device;\r\n\t\t\t\t\t// 移除线程后立即连接\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tbluetoothChat.goConnect(device);\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\tLooper.loop();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}",
"public void run() {\n\n // Start threadPool\n for (int i = 0; i < nbThreads; i++) {\n ThreadClient threadClient = new ThreadClient(listSocketDevice, String.valueOf(i), handler);\n arrayThreadClients.add(threadClient);\n threadClient.start();\n }\n\n while (true) {\n try {\n if (v) Log.d(TAG, \"Server is waiting on accept...\");\n ISocket isocket = acceptISocket();\n\n if (v) Log.d(TAG, isocket.getRemoteSocketAddress() + \" accepted\");\n listSocketDevice.addSocketClient(isocket);\n\n // Notify handler\n handler.obtainMessage(Service.CONNECTION_PERFORMED,\n isocket.getRemoteSocketAddress()).sendToTarget();\n\n } catch (SocketException e) {\n handler.obtainMessage(Service.LOG_EXCEPTION, e).sendToTarget();\n break;\n } catch (IOException e) {\n handler.obtainMessage(Service.LOG_EXCEPTION, e).sendToTarget();\n break;\n }\n }\n }",
"@Override\r\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tRecieveSocketOfClient(SocketForClient);\r\n\t\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t\t// TODO: handle exception\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}",
"public TicketBoothClient()\n {\n Thread myThread = new Thread(this);\n myThread.start();\n }",
"@Override\n\t\t\tpublic void run () {\n\n\t\t\t\trfComm = new Rfcomm(uiservice.getRootActivity(), secureUUID, unsecureUUID, new Handler() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void handleMessage (android.os.Message msg) {\n\t\t\t\t\t\tswitch (msg.what) {\n\t\t\t\t\t\t\tcase Rfcomm.MESSAGE_STATE_CHANGE:\n\t\t\t\t\t\t\t\tswitch (msg.arg1) {\n\t\t\t\t\t\t\t\t\tcase Rfcomm.STATE_CONNECTED:\n\t\t\t\t\t\t\t\t\t\tif (D) {\n\t\t\t\t\t\t\t\t\t\t\tToast.makeText(uiservice.getRootActivity(), \"STATE_CONNECTED\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase Rfcomm.STATE_CONNECTING:\n\t\t\t\t\t\t\t\t\t\tif (D) {\n\t\t\t\t\t\t\t\t\t\t\tToast.makeText(uiservice.getRootActivity(), \"STATE_CONNECTING\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase Rfcomm.STATE_LISTEN:\n\t\t\t\t\t\t\t\t\t\tif (D) {\n\t\t\t\t\t\t\t\t\t\t\tToast.makeText(uiservice.getRootActivity(), \"STATE_LISTEN\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase Rfcomm.STATE_NONE:\n\t\t\t\t\t\t\t\t\t\tif (D) {\n\t\t\t\t\t\t\t\t\t\t\tToast.makeText(uiservice.getRootActivity(), \"STATE_NONE\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase Rfcomm.MESSAGE_READ:\n\t\t\t\t\t\t\t\tbyte[] readBuf = (byte[]) msg.obj;\n\t\t\t\t\t\t\t\t// construct a string from the valid bytes in the buffer\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tByteArrayInputStream bis = new ByteArrayInputStream(readBuf);\n\t\t\t\t\t\t\t\t\tLog.i(TAG, \"DRE DRE DRE DRE ?\");\n\t\t\t\t\t\t\t\t\tObjectInputStream ois = new ObjectInputStream(bis) {\n\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\tprotected Class<?> resolveClass (ObjectStreamClass objectStreamClass) throws IOException, ClassNotFoundException {\n\t\t\t\t\t\t\t\t\t\t\tClass c = null;\n\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\tif (c == null) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tc = resolver.resolve(objectStreamClass.getName());\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\tif (c == null) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tc = super.resolveClass(objectStreamClass);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\tif (c == null) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tc = Class.forName(objectStreamClass.getName());\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\treturn c;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t\t\tMessage mess = (Message) ois.readObject();\n\t\t\t\t\t\t\t\t\tbis.close();\n\t\t\t\t\t\t\t\t\tois.close();\n\t\t\t\t\t\t\t\t\tif (D) Log.i(TAG, \"MESSAGE_READ: \" + mess.getContent().toString());\n\t\t\t\t\t\t\t\t\tremoteDispatch(mess);\n\t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\tLog.e(TAG, \"Failed to deserialize the message\");\n\n\t\t\t\t\t\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t\t\t\t\t\tLog.e(TAG, \"Unable to cast the deserialized object\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase Rfcomm.MESSAGE_DEVICE_NAME:\n\t\t\t\t\t\t\t\t// save the connected device's name\n\t\t\t\t\t\t\t\tconnectedDeviceName = msg.getData().getString(Rfcomm.DEVICE_NAME);\n\t\t\t\t\t\t\t\tif (D) {\n\t\t\t\t\t\t\t\t\tToast.makeText(uiservice.getRootActivity(), \"Connected to \"\n\t\t\t\t\t\t\t\t\t\t\t+ connectedDeviceName, Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase Rfcomm.MESSAGE_TOAST:\n\t\t\t\t\t\t\t\tif (D) {\n\t\t\t\t\t\t\t\t\tToast.makeText(uiservice.getRootActivity(), msg.getData().getString(Rfcomm.TOAST),\n\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}, timeoutAccept);\n\t\t\t\tmanager = new MessageManager(rfComm);\n\n\t\t\t\trfComm.addEventListener(BluetoothChannel.this);\n\t\t\t\trfComm.setName(getNodeName());\n\t\t\t\tif (discoverableTime > 0) rfComm.setDiscoverable(discoverableTime);\n\t\t\t\trfComm.start();\n\t\t\t\trfComm.discovering();\n\t\t\t\tif (D) Log.i(TAG, \"Bluetooth channel started\");\n\t\t\t}",
"public synchronized void run() {\n\n try {\n\n while(true) {\n\n Thread.sleep(10000);\n\n Socket s = new Socket(server, 8999); // Request list in port 8999\n ObjectInputStream r = new ObjectInputStream(s.getInputStream());\n Message m = (Message) r.readObject();\n peerList = (PeerList) m.peerList; // Store new peer list\n\n for (int i = peerList.getSize() - 1; i >= 0; i--)\n new Thread(new download(peerList.getIP(i), peerList.getPort(i))).start(); // start thread to download image blocks from other peers\n\n }\n\n } catch (Exception e){\n\n // e.printStackTrace();\n\n }\n\n }",
"public static Object recevoirObjet(BluetoothSocket socket) {\n\t\tObject obj = null;\n\t\t\n\t\tint tailleMessage = lectureEnteteTailleMessage(socket);\n\t\tbyte[] bufferComplet = lectureByte(socket, tailleMessage);\n\t\t\n\t\tByteArrayInputStream bis = new ByteArrayInputStream(bufferComplet);\n\t\tObjectInput in = null;\n\t\ttry {\n\t\t\tin = new ObjectInputStream(bis);\n\t\t\tobj = in.readObject();\n\t\t} catch (IOException e) {\n\t\t\tLog.e(TAG, \"Erreur dans la réception d'un objet\", e);\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tLog.e(TAG, \"Erreur dans la réception d'un objet\", e);\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (bis != null) {\n\t\t\t\t\tbis.close();\n\t\t\t\t}\n\t\t\t\tif (in != null) {\n\t\t\t\t\tin.close();\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\tLog.e(TAG, \"Erreur dans la fermeture des flux pour la réception d'un objet\", e);\n\t\t\t}\n\t\t}\n\t\treturn obj;\n\t}",
"@Override\r\n\t\t\tpublic void run(Object obj) {\n\t\t\t\tif (obj instanceof ResponseChatMsg ) {\r\n\t\t\t\t\tResponseChatMsg chatmsg = (ResponseChatMsg)obj ;\r\n\t\t\t\t Process(chatmsg);\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}",
"public void startThread(){\n String message = \"Connecting to RescueNet...Please Wait\";\n showProgressDialog(message);\n connectionThread = new ConnectionThread(mwifiAdmin, handlerMain);\n connectionThread.start();\n }",
"@Override\n public void run() {\n try {\n socket = new Socket(\"192.168.0.165\", 2000);\n out = new PrintWriter(socket.getOutputStream());\n in = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n ReadThread readThread = new ReadThread();\n readThread.start();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n boolean done = false;\n\n while (!done) {\n if (message != null) {\n try {\n out.print(message);\n out.flush();\n message = null;\n } catch (Exception e) {\n e.printStackTrace();\n try {\n socket.close();\n in.close();\n out.close();\n done = true;\n } catch (IOException d) {\n e.printStackTrace();\n }\n }\n }\n }\n disconnect();\n }",
"public void makeConnection() {\n\t\ttry {\n\t\t\tif(sock != null) {\n\t\t\t\ttable.printMsg(\"Cannot join a server twice! You've already connected.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsock = new Socket(serverIP, serverPort);\n\t\t\toos = new ObjectOutputStream(sock.getOutputStream());\n\t\t\tois = new ObjectInputStream(sock.getInputStream());\n\t\t\tThread thread = new Thread(new ServerHandler());\n\t\t\tthread.start();\n\t\t} catch(Exception e) {\n\t\t\ttable.printMsg(\"Cannot Join Server.\");\n\t\t\tsock = null;\n\t\t\ttable.repaint();\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}",
"public void connect() {\n\n if (reader == null) {\n reader = new ReadFromGo(this);\n readerThread = new Thread(reader);\n readerThread.start();\n } else {\n System.out.println(\"stopGoProcess()\");\n if (readerThread != null) {\n reader.stop();\n readerThread.interrupt();\n reader = new ReadFromGo(this);\n readerThread = new Thread(reader);\n readerThread.start();\n System.out.println(\"Thread interrupted and started\");\n }\n }\n }",
"public synchronized void run() {\n\t\t\tGameMessage message;\n\t\t\ttry {\n\t\t\t\twhile((message = (GameMessage) ois.readObject()) != null) {\n\t\t\t\t\tparseMessage(message);\n\t\t\t\t}\n\t\t\t} catch(Exception e) {\n\t\t\t\ttable.printMsg(\"Unable to receive message from server. Connection will be terminated.\");\n\t\t\t\ttable.printMsg(\"Try to Connect again.\");\n\t\t\t\ttry {\n\t\t\t\t\tsock.close();\n\t\t\t\t} catch(Exception ee) {\n\t\t\t\t\t// doing nothing\n\t\t\t\t}\t\n\t\t\t\tsock = null;\n\t\t\t\tSystem.out.println(\"Unable to receive message from server.\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\ttable.repaint();\n\t\t}",
"private void wczytajPlanszeZdalnie()\n\t{\n\t\tPobraniePlanszy pobranie = new PobraniePlanszy(pojazd.ktoryPoziom(), this, port, host);\n\t\tThread zadanie = new Thread(pobranie);\n\t\tzadanie.start();\t\n\t}",
"public void listarEmpresas()\r\n {\n \tnew Thread()\r\n \t{\r\n \t\tpublic void run() \r\n \t\t{\r\n \t\t\ttry\r\n \t\t\t{\r\n\t\t\t\t\t//CHAMAR WS E POPULAR LISTA DE EMPRESAS\r\n\t\t\t\t\tConexaoWSRest ws = new ConexaoWSRest();\r\n\t\t\t\t\tfinal List<Empresa> listaEmpresas = ws.getListaEmpresas(\"listEmpresas\", null);\r\n\t\t\t\t\t\r\n\t\t\t\t\thandler.post(new Runnable() \r\n\t\t\t\t\t{\r\n \t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void run() \r\n \t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tLinearLayout layout = (LinearLayout) findViewById(R.id.LayoutMain);\r\n\t\t\t\t\t\t\tlayout.removeAllViews();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tListView listView = new ListView(MainActivity.this);\r\n\t\t\t\t\t\t\tArrayAdapter<Empresa> arrAdapter = new ArrayAdapter<Empresa>(MainActivity.this, android.R.layout.simple_list_item_1, listaEmpresas);\r\n\t\t\t\t\t\t\tlistView.setAdapter(arrAdapter);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tlistView.setOnItemClickListener(new AdapterView.OnItemClickListener() \r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t public void onItemClick(AdapterView<?> parent, View view, int position, long id) \r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t \tIntent it = new Intent(getBaseContext(),FuncionariosActivity.class);\r\n\t\t\t\t\t\t \tString idEmpresa = listaEmpresas.get(position).getIdEmpresas();\r\n\t\t\t\t\t\t \tit.putExtra(\"idEmpresa\", idEmpresa);\r\n\t\t\t\t\t\t \tstartActivity(it);\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t });\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tlayout.addView(listView);\r\n\t\t\t\t\t\t\tsetContentView(layout);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n \t\t\t\t\t\r\n \t\t\t\t}catch(Exception e){\r\n \t\t\t\t\t\r\n \t\t\t\t\tLog.e(CATEGORIA, e.getMessage());\r\n \t\t\t\t\t\r\n \t\t\t\t}finally{ \t\t\t\t\t\r\n \t\t\t\t\t//dialog.dismiss();\r\n \t\t\t\t}\r\n \t\t}\r\n \t}.start(); \t\t\t\t\r\n }",
"public static void initCommunicationClientThread(){\r\n new CommunicationClientThread();\r\n }",
"@Override\n public void run() {\n for (MovimentiCorrentista movement : this.c.movimenti) { //Per ogni movimento del correntista, analizzo la causale\n switch (movement.causale) {\n case \"Bonifico\" -> Statistiche.incnBonifico();\n case \"Accredito\" -> Statistiche.incnAccredito();\n case \"Bollettino\" -> Statistiche.incnBollettino();\n case \"F24\" -> Statistiche.incnF24();\n case \"PagoBancomat\" -> Statistiche.incnPagoBancomat();\n }\n }\n //System.out.println(\"\\t\\t\\t\\t\" + Thread.currentThread().getName() + \": concluso per \" + this.c.nome);\n }",
"private void limpiar() {\n // Si se llega a usar este método es porque ha habido una excepción (ya sea por un verdadero\n // error o porque el cliente ha terminado la conexión o porque han pasado\n // TIEMPO_DESCONEXION_AUTOMATICA milisegundos sin comunicación del cliente).\n // Nótese que el código de cierre es riguroso: una versión más abreviada podría limitarse\n // a intentar cerrar el socket (los flujos de E/S se cierran al cerrarse éste); el único problema\n // que podría aparecer en esa versión del código es que podrían quedarse abiertos los flujos si\n // no se pudiera cerrar el socket (esta posibilidad es inhabitual: normalmente, si el socket no\n // se puede cerrar es porque ya se había cerrado antes).\n // El igualar entrada, salida y socket a null es una buena práctica cuando se puede llamar\n // varias veces a limpiar(); así se evita intentar cerrar dos veces un objeto.\n if ( entrada != null ) {\n try {\n entrada.close();\n }\n catch (IOException e1) {}\n entrada = null;\n }\n if ( salida != null ) {\n salida.close();\n salida = null;\n }\n if ( socket != null ) {\n try {\n socket.close();\n } \n catch (IOException e2) {}\n socket = null;\n }\n }",
"public void run(){\r\n boolean nameGet = false;\r\n try{\r\n ObjectInputStream ois = new ObjectInputStream(mySocket.getInputStream());\r\n oos = new ObjectOutputStream(mySocket.getOutputStream());\r\n\r\n //Listen for messages and RollRequest objects.\r\n while(true){\r\n DataWrapper dw = (DataWrapper) ois.readObject();\r\n //Get the name from the InputStream if not retrieved already\r\n if(!nameGet){\r\n //Store the client's first message, which is always in the format \"<name> connected.\"\r\n String line = \"\";\r\n if(dw.getType() == DataWrapper.STRINGCODE){\r\n line = dw.getMessage();\r\n }\r\n consoleAppend(line);\r\n\r\n /*\r\n * Extract the alias from the String by getting the substring from 0 to the last index of whitespace,\r\n * effectively removing the \" connected.\" part of the String.\r\n */\r\n String alias = line.substring(0, line.lastIndexOf(\" \"));\r\n\r\n //Disconnect the client if the name is already in use\r\n if(getIndex(alias) != -1){\r\n oos.writeObject(\r\n new DataWrapper(\r\n DataWrapper.STRINGCODE, \"Sorry, that name is in use. Disconnecting..\", false));\r\n oos.flush();\r\n mySocket.close();\r\n }\r\n\r\n this.setName(alias);\r\n turnQueue.add(alias);\r\n nameGet = true;\r\n\r\n //If the first client\r\n if(clientThreads.get(0) == this) {\r\n //send the boardLayout for them to unpack\r\n oos.writeObject(new DataWrapper(DataWrapper.BICODE, boardLayout));\r\n }\r\n //If not the first client\r\n if(clientThreads.get(0) != this) {\r\n //request a board from the first client and wait until the updated board is received\r\n requestBoard();\r\n synchronized (waitForBoardLock) {\r\n while (!boardUpdated) {\r\n// System.out.println(\"Thread \" + this.getName() + \" waiting\");\r\n waitForBoardLock.wait();\r\n }\r\n }\r\n oos.writeObject(new DataWrapper(DataWrapper.BICODE, boardLayout));\r\n boardUpdated = false;\r\n }\r\n\r\n //Instruct all clients to add the new player\r\n sendCTToAll(new ControlToken(ControlToken.ADDCODE, alias, rand.nextInt(8)));\r\n\r\n }\r\n //Handle DataWrapper objects\r\n switch(dw.getType()){\r\n //Ensure all clients see each others' messages\r\n case DataWrapper.STRINGCODE:\r\n //Send incoming client chat messages to all clients, and append sender name\r\n String fmtMessage = String.format(\"%s: %s\", this.getName(), dw.getMessage());\r\n sendToAll(fmtMessage);\r\n consoleAppend(fmtMessage);\r\n break;\r\n\r\n //Receive updated board information from the first client in the client list\r\n case DataWrapper.BICODE:\r\n boardLayout = dw.getBoardInformation();\r\n System.out.println(\"Received an updated BoardInformation.\");\r\n System.out.println(boardLayout.toString());\r\n synchronized(waitForBoardLock){\r\n boardUpdated = true;\r\n waitForBoardLock.notify();\r\n// System.out.println(\"Thread \" + this.getName() + \" notified because of receiving a BoardInformation.\");\r\n }\r\n break;\r\n\r\n //Handle ControlToken objects\r\n case DataWrapper.CTCODE:\r\n //Client informs server that they are finished with their turn\r\n if(dw.getCT().getCode() == ControlToken.TURNFINISHEDCODE){\r\n synchronized(turnFinishedLock) {\r\n turnFinished = true;\r\n turnFinishedLock.notify();\r\n }\r\n// System.out.println(\"Thread \" + this.getName() + \" notified because of receiving a turnFinished.\");\r\n }\r\n //Client asks to roll the dice, Server returns a random value from 1-6\r\n if(dw.getCT().getCode() == ControlToken.ROLLREQUESTCODE) {\r\n //Generate the roll result\r\n int rolledResult = rollResult();\r\n //Send it as a game message to all clients\r\n String rolledResultString = String.format(\"%s rolled a %d!\",\r\n dw.getCT().getPlayerName(), rolledResult);\r\n sendGMToAll(rolledResultString);\r\n //Instruct the clients to move the player on all boards\r\n sendCTToAll(new ControlToken(ControlToken.MOVECODE, this.getName(), rolledResult, true));\r\n }\r\n break;\r\n\r\n //Default case\r\n default:\r\n consoleAppend(\"Error: invalid DataWrapper.type\");\r\n break;\r\n } //end of switch statement\r\n } //end of while loop\r\n } catch(ClassNotFoundException cnfe) {\r\n System.err.println(\"Error: class not found \" + cnfe.getMessage());\r\n } catch(SocketException | EOFException se) {\r\n handleDisconnect();\r\n } catch(IOException ioe) {\r\n ioe.printStackTrace();\r\n } catch (InterruptedException ioe) {\r\n ioe.printStackTrace();\r\n }\r\n }",
"public void run() {\n sendMessageToClient(\"Connexion au serveur réussie\");\n\n while (isActive) {\n try {\n String input = retrieveCommandFromClient();\n handleCommand(input);\n } catch (ServerException e) {\n System.out.println(e.getMessage());\n sendMessageToClient(e.getMessage());\n } catch (ClientOfflineException e) {\n System.out.println(\"Client # \" + clientId + \" deconnecte de facon innattendue\");\n deactivate();\n }\n }\n\n close();\n }",
"public void connect()\n {\n System.out.println(\"CLIENT partito in esecuzione\");\n try\n {\n //Initialize socket variables and json formatter\n socket = new Socket(serverIP, serverPort);\n outputStream = new DataOutputStream(socket.getOutputStream());\n inputStream = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n gson = new Gson();\n \n receiverThread = new ClientReceiver(this);\n } \n catch (UnknownHostException e)\n {\n System.out.println(e.getMessage());\n System.out.println(\"Host sconosciuto\");\n System.exit(1);\n }\n catch (ConnectException e)\n {\n System.out.println(e.getMessage());\n System.out.println(\"Non c'è posto per te, mi spiace\");\n System.exit(1);\n }\n catch (Exception e)\n {\n System.out.println(e.getMessage());\n System.exit(1);\n }\n }",
"public ReadThreadClient(NetworkUtil nu)//, int id , String address, BufferSize bz)\n {\n //this.id=id ;\n //this.address=address;\n //System.out.println(\"Server read cnstructor\");\n //this.map = map ;\n thread = new Thread(this);\n this.nu = nu ;\n //this.bz=bz ;\n\n thread.start();\n //System.out.println(\"Server read thread started\");\n }",
"@Override\n\tprotected void processConnection() {\n\t\t\n\t\twhile(true) {\n\t\t\t\n\t\t\ttry {\n\t\t\t\tint receiverID = (Integer) input.readObject();\n\t\t\t\tString message = (String) input.readObject();\n\t\t\t\t\n\t\t\t\tClientHandler recieverHandler = Server.clientConnections.get(receiverID);\n\t\t\t\tif(recieverHandler == null) {\n\t\t\t\t\tsendData(ERROR_CODE);\n\t\t\t\t\tsendData(\"Not available\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\trecieverHandler.sendData(clientID);\n\t\t\t\t\trecieverHandler.sendData(message);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(ClassNotFoundException classNotFoundException) {\n\t\t\t\tserver.serverGUI.showMessage(\"Unknown object type recieved.\");\n\t\t\t}\n\t\t\tcatch(IOException ioException) {\n\t\t\t\tserver.serverGUI.showMessage(\"Client terminated connection.\\n\");\n\t\t\t\tcloseConnection();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}"
] | [
"0.62973756",
"0.62006444",
"0.60487705",
"0.6039246",
"0.60361433",
"0.595031",
"0.59298056",
"0.59017706",
"0.5890951",
"0.5871",
"0.57712644",
"0.5760659",
"0.5747872",
"0.5732986",
"0.572257",
"0.5712797",
"0.5665246",
"0.56162196",
"0.56055796",
"0.5596426",
"0.5589809",
"0.55688596",
"0.5555501",
"0.55416346",
"0.5540576",
"0.55167216",
"0.5503322",
"0.55024093",
"0.55008304",
"0.5472135",
"0.54622346",
"0.54621786",
"0.5452535",
"0.5448244",
"0.54343355",
"0.54288596",
"0.54228616",
"0.54115206",
"0.54080486",
"0.53913075",
"0.5379296",
"0.53742325",
"0.53671026",
"0.53549165",
"0.5347673",
"0.5344136",
"0.5343176",
"0.5335324",
"0.533473",
"0.533123",
"0.53297603",
"0.53291434",
"0.53273445",
"0.5326104",
"0.5325324",
"0.5322298",
"0.5317834",
"0.5316499",
"0.5315599",
"0.5313343",
"0.53044295",
"0.5303783",
"0.5301055",
"0.52978617",
"0.5294909",
"0.52915263",
"0.52865493",
"0.52852947",
"0.5282259",
"0.5281658",
"0.5281312",
"0.5276861",
"0.52722734",
"0.52722013",
"0.52659494",
"0.52626777",
"0.5261717",
"0.526098",
"0.52562153",
"0.52552193",
"0.52549475",
"0.5252131",
"0.5247262",
"0.5243915",
"0.5238366",
"0.5238192",
"0.5234307",
"0.5234057",
"0.5231759",
"0.5230319",
"0.5222826",
"0.5221965",
"0.52217436",
"0.52149963",
"0.5214088",
"0.5212054",
"0.52073395",
"0.520221",
"0.5201867",
"0.5193234",
"0.51889837"
] | 0.0 | -1 |
Troca a classe que executara as acoes | public void setReceber(Receber r){
this.temp = r;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void execute(){\n\t\t\n\t}",
"protected void execute() {}",
"protected void execute() {\n\n\t}",
"public void execute() {\n\n\t}",
"protected void execute() {\n\t\t\n\t}",
"protected void execute()\n\t{\n\t}",
"public void execute() {\n\t\t\n\t}",
"protected void execute() {\n \t\n }",
"protected void execute() {\n \t\n }",
"public void executarLogica() {\n\t\tchecarTarefaValida();\n\t\texecutar();\n\t\texecutandoTarefa();\n\t\tfinalizarTarefa();\n\t}",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n\t}",
"protected void execute()\n {\n }",
"public void execute() {\r\n\t\r\n\t}",
"public void execute(){\n\n }",
"public void execute() {\n\t\t\r\n\t}",
"public void execute() {\n\t\t\r\n\t}",
"public void execute() {\n\t\t\r\n\t}",
"protected void execute() {\r\n }",
"@Override\n\tpublic void execute() {\n\t\trecevier.doSomething();\n\t}",
"public void execute() {\n }",
"public void execute();",
"public void execute();",
"public void execute();",
"public void execute();",
"@Override\n\tpublic void execute() {\n\t\t\n\t}",
"@Override\r\n\tprotected void execute() {\r\n\t}",
"@Override\r\n\tpublic void execute() {\n\t}",
"@Override\r\n\tpublic void execute() {\n\t}",
"@Override\n public void Execute() {\n\n }",
"public void ejecutar() {\r\n\t\tmediador.irInicioInsert(true);\r\n\t}",
"@Override\n public void execute() {}",
"@Override\n\tpublic void execute() {\n\t}",
"protected void execute() {\n\n\n \n }",
"@Override\r\n\tpublic void execute() {\n }",
"@Override\r\n\tpublic void execute() {\n\r\n\t}",
"public void executer()\r\n\t{\r\n\t\tswitch(this.type)\r\n\t\t{\r\n\t\tcase \"Gain\":\r\n\t\t\tPartie.getJoueurCourant().changeSolde(this.valeur);\r\n\t\t\tbreak;\r\n\t\tcase \"Perte\":\r\n\t\t\tPartie.getJoueurCourant().changeSolde(-this.valeur);\r\n\t\t\tbreak;\r\n\t\tcase \"Avancer\":\r\n\t\t\tPartie.getJoueurCourant().deplace(this.valeur);\r\n\t\t\tbreak;\r\n\t\tcase \"Aller en prison\":\r\n\t\t\tPartie.getJoueurCourant().setPosition(this.valeur);\r\n\t\t\tbreak;\r\n\t\tcase \"Sortie de prison\":\r\n\t\t\tPartie.getJoueurCourant().setEnPrison(false);\r\n\t\t\tbreak;\r\n\t\t}\t\r\n\t}",
"@Override\n public void execute() {\n }",
"public void Execute() {\n\n }",
"public void ejecucion() throws Exception {\n\t\t//Activamos las trazas\n\t\tsetTrazaFichero();\n\t\n\t\ttry{\n\t\t\t//Sacamos la acción a realizar y ejecutamos la acción correspondiente\n\t\t\tString accion = conectorParametro(PARAMETRO_GENERICO_ACCION);\n\t\t\tString origen = conectorParametro(PARAMETRO_GENERICO_ORIGEN);\n\t\t\t\n\t\t\t//Caragamos los elemetnos en la pagina\n\t\t\tasignar(\"VAR\",PARAMETRO_GENERICO_ACCION,accion);\n\t\t\tasignar(\"VAR\",PARAMETRO_GENERICO_ORIGEN,origen);\n\t\n\t\t\t//Ejecutamos la acción indicada\n\t\t\tif(accion.equals(ACCION_CREATE)) cmdCreate();\n\t\t\tif(accion.equals(ACCION_UPDATE)) cmdUpdate();\n\t\t\tif(accion.equals(ACCION_REMOVE)) cmdRemove();\n\t\t}catch(Exception e){\n\t\t\thandleException(e);\n\t\t}\n }",
"public void ejecucion() throws Exception {\n\t\t//Activamos las trazas\n\t\tsetTrazaFichero();\n\t\n\t\ttry{\n\t\t\t//Sacamos la acción a realizar y ejecutamos la acción correspondiente\n\t\t\tString accion = conectorParametro(PARAMETRO_GENERICO_ACCION);\n\t\t\tString origen = conectorParametro(PARAMETRO_GENERICO_ORIGEN);\n\t\t\t\n\t\t\t//Caragamos los elemetnos en la pagina\n\t\t\tasignar(\"VAR\",PARAMETRO_GENERICO_ACCION,accion);\n\t\t\tasignar(\"VAR\",PARAMETRO_GENERICO_ORIGEN,origen);\n\t\n\t\t\t//Ejecutamos la acción indicada\n\t\t\tif(accion.equals(ACCION_CREATE)) cmdCreate();\n\t\t\tif(accion.equals(ACCION_UPDATE)) cmdUpdate();\n\t\t\tif(accion.equals(ACCION_REMOVE)) cmdRemove();\n\t\t}catch(Exception e){\n\t\t\thandleException(e);\n\t\t}\n }",
"@Override\r\n\tpublic void executer() {\n\t}",
"@Override\n protected void execute() {\n }",
"@Override\n protected void execute() {\n }",
"@Override\n protected void execute() {\n }",
"public abstract void execute();",
"public abstract void execute();",
"public abstract void execute();",
"@Override\r\n\tpublic void execute() throws Exception {\n\t\t\r\n\t}",
"public void execute() {\n // empty\n }",
"static void executa() {\n\t\tlistaProdutos = LoaderUtils.loadProdutos();\n\n\t\t// imprime lista de produtos cadastrados\n\t\tSystem.out.println(\"----------------------------------------------\");\n\t\tloadEstoque();\n\t\t\n\t\t// imprime estoque\n\t\tSystem.out.println(\"----------------------------------------------\");\n\t\tprintEstoque(listaEstoque);\n\t}",
"@Override\r\n\tprotected void executeClass() throws BusClassException {\n\t\tAttribute attEmpresas = this.getCurrentEntity().getAttribute(\"P5_DOCUNI_EMPRESA_FACTURA\");\r\n\t\t\r\n\t\tPossibleValue posMautibla = new PossibleValue(\"Mautibla\", \"Mautibla\");\r\n\t\tPossibleValue posGroove = new PossibleValue(\"Groove\", \"Groove\");\r\n\t\t\r\n\t\tattEmpresas.addPossibleValues(posMautibla);\r\n\t\tattEmpresas.addPossibleValues(posGroove);\t\r\n\t}",
"protected abstract void execute();",
"@Override\n\tpublic void ejecutarActividadesConProposito() {\n\t\t\n\t}",
"@Override\n protected void execute() {\n\n }",
"@Override\n protected void execute() {\n \n }",
"void execute();",
"void execute();",
"void execute();",
"void execute();",
"void execute();",
"void execute();",
"void execute();",
"abstract protected void execute();",
"public interface Command {\n\n void executer(Tondeuse tondeuse);\n\n}",
"public void executar() {\n\t\tSystem.out.println(dao.getListaPorNome(\"abacatão\"));\n\t}",
"public abstract Object execute(Class clazz, Object[] args) throws IOException;",
"@Override\n\tpublic void execute() {\n\t\tmoteur.couper();\n\t}",
"public void ejecutaMetodo() {\n\t\r\n}",
"public void run_v1(String clase){\n\t\tObject\toc=null;\n\t\ttry {\n\t\t\tClass c=Class.forName(clase);\n\t\t\toc=c.newInstance();\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t} catch (InstantiationException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t} catch (IllegalAccessException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tif (oc!=null){\n\t\t\tTask_Model T=(Task_Model) oc;\n\t\t\tboolean b=true;//esta_autorizado(iduser,clase);\n\t\t\tif (b){\n\t\t\t\t\n\t\t\t\tfor (int i=0;i<this.getConstructor().getParametros().size();i++){\n\t\t\t\t\ttry {\n\t\t\t\t\tObject[] p=(Object[]) this.getConstructor().getParametros().get(i);\n\t\t\t\t\tString id=(String)p[0];\n\t\t\t\t\tObject o=p[1];\n\t\t\t\t\tT.setParameter(id, o);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tSystem.out.println(\"No se pudo Cargar el parametro \"+i+\" >\"+clase+\" \"+e.getMessage());\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (javax.swing.SwingUtilities.isEventDispatchThread()){\n\t\t\t\t\tT.run(getConstructor());\n\t\t\t\t}else{\n\t\t\t\t\tfinal Task_Model _T=T;\n\t\t\t\t\tRunnable _execute=new Runnable(){\n\t\t\t\t\t\tpublic void run(){\n\t\t\t\t\t\t\t_T.run(getConstructor());\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\tjavax.swing.SwingUtilities.invokeLater(_execute);\t\n\t\t\t\t}\t\n\t\t\t}else {\n\t\t\t\terror(\"(\"+this.getConstructor().getIduser()+\") No esta Autorizado\");\n\t\t\t\tT=null;\n\t\t\t}\t\n\t\t}\n\t\t\n\t}",
"public void execute() {\n execute0();\n }",
"@SuppressWarnings(\"unchecked\")\n public void execute() {\n execute(null, null);\n }",
"public void run_v0(String clase){\n\t\t//aviso(\"Ejecutando \"+clase+\" Tipo V0\");\n\t\t\n\t\tObject\toc=null;\n\t\t\n\t\t\t\n\t\t\n\t\ttry {\n\t\t\tClass c=Class.forName(clase);\n\t\t\toc=c.newInstance();\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t} catch (InstantiationException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t} catch (IllegalAccessException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tif (oc!=null){\n\t\t\tvisual.Task_Model T=(visual.Task_Model) oc;\n\t\t\tint i=0;\n\t\t\tbeta.tools.connector.GTransfer GX=null;\n\t\t\t\n\t\t\twhile (i<this.getConstructor().getParametros().size() & GX==null){\n\t\t\t\tObject[] p=(Object[]) this.getConstructor().getParametros().get(i);\n\t\t\t\tString id=(String)p[0];\n\t\t\t\tObject o=p[1];\n\t\t\t\tif (id.compareTo(\"GX\")==0){\n\t\t\t\t\tGX=(beta.tools.connector.GTransfer)o;\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tif (GX==null){\n\t\t\t\tGX=new beta.tools.connector.GTransfer();\n\t\t\t\tGeneric _default=this.getConstructor().getConnectionHandler().getDefaultConnector();\n\t\t\t\tGX.setHost(_default.getHost());\n\t\t\t\tGX.setPort(_default.getPort());\n\t\t\t\tGX.setDatabase(_default.getDatabase());\n\t\t\t\tGX.setUser(_default.getUser());\n\t\t\t\tGX.setPassword(_default.getPassword());\n\t\t\t\tGX.setSucursal(_default.getId());\n\t\t\t\tGX.ConnectSQL(_default.getId());\n\t\t\t}\n\t\t\tboolean b=true;//esta_autorizado(iduser,clase);\n\t\t\tif (b){\n\t\t\t\tString NEW_LINE = System.getProperty(\"line.separator\");\n\t\t\t\t/*String msg=\"Esta es una aplicacion vieja.\"+NEW_LINE;\n\t\t\t\tmsg+=\"Hasta que no se reprograme. Esta aplicacion quedara inhabilitada por problemas de incompatibilida\";\n\t\t\t\terror(msg);*/\n\t\t\t\t\n\t\t\t\tT.setParameter(\"GX\", GX);\n\t\t\t\tT.setParameter(\"iduser\", this.getConstructor().getIduser());\n\t\t\t\tfor (i=0;i<this.getConstructor().getParametros().size();i++){\n\t\t\t\t\ttry {\n\t\t\t\t\tObject[] p=(Object[]) this.getConstructor().getParametros().get(i);\n\t\t\t\t\tString id=(String)p[0];\n\t\t\t\t\tObject o=p[1];\n\t\t\t\t\tT.setParameter(id, o);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tSystem.out.println(\"No se pudo Cargar el parametro \"+i+\" >\"+clase+\" \"+e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (javax.swing.SwingUtilities.isEventDispatchThread()){\n\t\t\t\t\tT.run();\n\t\t\t\t}else{\n\t\t\t\t\tfinal visual.Task_Model _T=T;\n\t\t\t\t\tRunnable _execute=new Runnable(){\n\t\t\t\t\t\tpublic void run(){\n\t\t\t\t\t\t\t_T.run();\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\tjavax.swing.SwingUtilities.invokeLater(_execute);\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else {\n\t\t\t\terror(\"(\"+this.getConstructor().getIduser()+\") No esta Autorizado\");\n\t\t\t\tT=null;\n\t\t\t}\t\n\t\t}\n\t}",
"@Override\n\tpublic void ejecutar() {\n\t\tcontrolador.resetPartida();\n\n\t}",
"public abstract Casilla ejecutaMovimiento(int f, int c, Superficie tablero);",
"public abstract int execute();",
"@Override\n public void execute() {\n \n \n }",
"protected void execute() {\n \t// literally still do nothing\n }",
"@Override\n protected void execute() {\n \n }",
"public Object executar() throws TarefaException {\n\t\t\r\n\t\tCollection colecaoRotasParaExecucao = (Collection) getParametro(ConstantesSistema.COLECAO_UNIDADES_PROCESSAMENTO_BATCH);\r\n\t\tIterator iterator = colecaoRotasParaExecucao.iterator();\r\n\r\n\t\twhile (iterator.hasNext()) {\r\n\r\n\t\t\tInteger idRota = (Integer) iterator.next();\r\n\r\n\t\t\tSystem.out.println(\"ROTA GERAR CARTAS \" + idRota + \" *********************************************************\");\r\n\r\n\t\t\tenviarMensagemControladorBatch(\r\n\t\t\t\t\tConstantesJNDI.BATCH_GERAR_CARTAS_CAMPANHA_SOLIDARIEDADE_CRIANCA_PARA_NEGOCIACAO_A_VISTA_MDB,\r\n\t\t\t\t\tnew Object[]{idRota, this.getIdFuncionalidadeIniciada()});\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}",
"abstract void exec();",
"@Override\n\tpublic void execute() {\n\t\tempfaengerA.doAction1();\n\t\tempfaengerA.doAction2();\n\t\tempfaengerA.doAction3();\n\n\t}",
"public interface Executor<E>{\n\t\tvoid execute(E object);\n\t}",
"public abstract String initExecute() throws Exception;",
"public void processInsertar() {\n }",
"public void ejecutarConsola() {\n\n try {\n this._agente = new SearchAgent(this._problema, this._busqueda);\n this._problema.getInitialState().toString();\n this.imprimir(this._agente.getActions());\n this.imprimirPropiedades(this._agente.getInstrumentation());\n if (_esSolucion) {\n Logger.getLogger(Juego.class.getName()).log(Level.INFO, \"SOLUCIONADO\");\n } else {\n Logger.getLogger(Juego.class.getName()).log(Level.INFO, \"No lo he podido solucionar...\");\n }\n } catch (Exception ex) {\n System.out.println(ex);\n }\n }",
"public int execute();",
"protected abstract void execute() throws Exception;",
"public abstract T execute() throws Exception;",
"void execute() throws Exception;"
] | [
"0.7159234",
"0.710845",
"0.710025",
"0.7095227",
"0.70751095",
"0.7033133",
"0.70326066",
"0.6999542",
"0.6999542",
"0.69900686",
"0.6986018",
"0.6986018",
"0.6986018",
"0.6986018",
"0.6986018",
"0.6986018",
"0.6986018",
"0.6986018",
"0.6986018",
"0.6986018",
"0.6986018",
"0.6986018",
"0.69833416",
"0.698041",
"0.6976915",
"0.69571435",
"0.6943197",
"0.6943197",
"0.6943197",
"0.6932332",
"0.69232935",
"0.6911667",
"0.6875515",
"0.6875515",
"0.6875515",
"0.6875515",
"0.6865091",
"0.68215466",
"0.68091834",
"0.68091834",
"0.6802727",
"0.67997587",
"0.67988145",
"0.67519695",
"0.6750177",
"0.6735841",
"0.6730385",
"0.67111653",
"0.67074907",
"0.669828",
"0.66936976",
"0.66936976",
"0.6659918",
"0.6655842",
"0.6655842",
"0.6655842",
"0.6648674",
"0.6648674",
"0.6648674",
"0.66456777",
"0.66368836",
"0.66366625",
"0.66230065",
"0.66136515",
"0.6609328",
"0.6607714",
"0.6600181",
"0.65972316",
"0.65972316",
"0.65972316",
"0.65972316",
"0.65972316",
"0.65972316",
"0.65972316",
"0.65905404",
"0.6532884",
"0.64978737",
"0.6475533",
"0.646347",
"0.64473844",
"0.6427233",
"0.6358563",
"0.6346218",
"0.63277036",
"0.6296333",
"0.625566",
"0.62544405",
"0.62469584",
"0.6244603",
"0.6240701",
"0.62302834",
"0.6186015",
"0.6184826",
"0.61655205",
"0.61652005",
"0.61628723",
"0.61559695",
"0.61545616",
"0.6139837",
"0.6124277",
"0.6121076"
] | 0.0 | -1 |
Will return the table name for persistent layer for the entity. | public String getTableName() {
return tableName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract String getDatabaseTableName(String entityName);",
"private String getEntitiesTableName()\n {\n\tString prefix = PropertyLookup.getTableNamePrefix();\n\tString separator = PropertyLookup.getTableNameSeparator();\n\tString suffix = PropertyLookup.getEntitiesTableNameSuffix();\n\n\treturn prefix + separator + catalogId + separator + suffix;\n }",
"public String tableName() {\n if ( tableName != null ) {\n return tableName;\n }\n\n TableName annotation = this.entityType().getAnnotation( TableName.class );\n if ( annotation != null ) {\n tableName = annotation.value();\n } else {\n tableName = entityType().getSimpleName().toLowerCase() + 's';\n }\n return tableName;\n }",
"String getTableName();",
"public TableName name();",
"public String getTableName() {\n if (tableName == null) {\n tableName = Strings.tableize(ActiveRecords.findActiveRecordBaseName(getClass()));\n }\n return tableName;\n }",
"public String getTableName() {\n return getTableName(false, false, false, false);\n }",
"public String getDBTableName()\n\t{\n\t\treturn this.getClass().getSimpleName();\n\t}",
"public String getTableName() {\n\t\treturn this.getTableName(this.currentClass());\n\t}",
"public String getName() {\n return tableName;\n }",
"@Override\n\tpublic String getTableName() { \n\t\treturn tableName;\n\t}",
"@Override\n\tprotected String getTableName() {\n\t\treturn super.getTableName();\n\t}",
"public String getTableName() {\n return tableName;\n }",
"public String getTableName() {\n return tableName;\n }",
"public String getTableName() {\r\n\t\treturn this.tableMetaDataContext.getTableName();\r\n\t}",
"public String getTableName() {\n return tableName;\n }",
"public String getTableName() {\n return tableName;\n }",
"public String getMapTableName() {\n return getTableName(false, false, false, true);\n }",
"public String getTableName() {\n return tableName; \n }",
"public String getName(){\n\t\t\treturn tableName;\n\t\t}",
"public String getTableName() throws DatabaseSchemaException {\n return Database.getTableName(clazz);\n }",
"public String getTableNameString() {\n return tableName;\n }",
"protected String getTableName()\n {\n return immutableGetTableName();\n }",
"String pvTableName();",
"public String getTableName() {\n return this.tableName;\n }",
"public String getTableName() {\n return this.tableName;\n }",
"public String getTableName() {\n return this.tableName;\n }",
"public String table() {\n return tableName;\n }",
"public String table() {\n return tableName;\n }",
"public String getTableName() \n\t{\n\t return tableName ;\n\t}",
"String getTableName(String name);",
"@Override\n\t\tpublic String getTableName() {\n\t\t\treturn null;\n\t\t}",
"@Basic( optional = false )\r\n\t@Column( name = \"table_name\", nullable = false, length = 50 )\r\n\tpublic String getTableName() {\r\n\t\treturn this.tableName;\r\n\t\t\r\n\t}",
"public String getQualifiedTableName();",
"@Override\r\n\tpublic String getTableName() {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic String getTableName() {\n\t\treturn null;\r\n\t}",
"public String getTranslatedTableName()\n {\n return DBProvider.translateTableName(this.getUntranslatedTableName());\n }",
"public String getTableName() {\r\n return IDaoConstants.TABLE_PROD_PTOS_VTA;\r\n }",
"@Override\n\tpublic String getTableName() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getTableName() {\n\t\treturn null;\n\t}",
"private String getTableName(Class<?> clz) {\n\t\tif (clz.isAnnotationPresent(TableName.class)) {\n\t\t\treturn ((TableName) clz.getAnnotation(TableName.class)).value();\n\t\t}\n\t\treturn clz.getSimpleName();\n\t}",
"public String getTableName() {\n return (String) getAttributeInternal(TABLENAME);\n }",
"public static String tableName() {\r\n return \"TB_UPP_CHECK_STORE_DIVERGENCE\";\r\n }",
"static String getTableName(Configuration conf) {\n String layout = conf.get(MRUtils.TABLE_LAYOUT_PROP,\n RdfCloudTripleStoreConstants.TABLE_LAYOUT.SPO.toString());\n String prefix = conf.get(MRUtils.TABLE_PREFIX_PROPERTY,\n RdfCloudTripleStoreConstants.TBL_PRFX_DEF);\n return RdfCloudTripleStoreUtils.layoutPrefixToTable(\n RdfCloudTripleStoreConstants.TABLE_LAYOUT.valueOf(layout), prefix);\n }",
"String tableName2Name(String name);",
"public final String getTableName() {\n\t\treturn wTableName;\n\t}",
"private String getTableName() {\n return this.tableName;\n }",
"public String getDistinctTableName() {\n return getTableName(false, false, true, false);\n }",
"public String getNomTable();",
"public String getName(Class<? extends RawEntity<?>> entity) {\r\n\t\tTable tableAnnotation = entity.getAnnotation(Table.class);\r\n\t\tif (tableAnnotation != null) {\r\n\t\t\treturn tableAnnotation.value();\r\n\t\t}\r\n\t\t\r\n\t\tif (classMappings.containsKey(entity)) {\r\n\t\t\treturn classMappings.get(entity);\r\n\t\t}\r\n\t\t\r\n\t\treturn postProcessName(processName(convertName(entity)));\r\n\t}",
"@Override\r\n\tprotected String getTable() {\n\t\treturn TABLE;\r\n\t}",
"@Override\n\tpublic String getTableName() {\n\t\tString sql=\"dip_dataurl\";\n\t\treturn sql;\n\t}",
"private String getTableName(org.hibernate.mapping.Table table) {\n return m_dbSpecificMappingInfo.getTruncateInfo().truncateTableName(table.getName().toLowerCase());\n }",
"public String getTablename() {\n return tablename;\n }",
"@Transient\n public String getCacheKey() {\n return this.getTableName();\n }",
"public String getTable() {\n return table;\n }",
"public static String getTableName(ModelDeclaration model) {\n OrcFileTrait trait = model.getTrait(OrcFileTrait.class);\n if (trait == null || trait.getTableName() == null) {\n return model.getName().identifier;\n }\n return trait.getTableName();\n }",
"public String getTable() {\n return table;\n }",
"public String getTableDbName() {\r\n return \"t_phase\";\r\n }",
"public String getTable()\n {\n return table;\n }",
"public String getReferencedTableName();",
"String pvIDTableName();",
"String getBaseTable();",
"public String getTableName(Class<?> aClass) {\n\t\tString result = aClass.getSimpleName();\n\t\tif (this.hasAnnotation(aClass, Table.class)) {\n\t\t\tTable anno = (Table) this.getAnnotation(aClass, Table.class);\n\t\t\tif (anno.name() != null && !anno.name().isEmpty())\n\t\t\t\tresult = anno.name();\n\t\t}\n\t\treturn result;\n\t}",
"public String getTableDbName() {\r\n return \"t_package\";\r\n }",
"@Override\n\tpublic String getTableName() {\n\t\treturn \"DMDB.GY_DM_ZJLX\";\n\t}",
"@Override\n\tpublic String getTableName(int arg0) throws SQLException {\n\t\treturn tMeta[0].tableName();\n\t}",
"public String getDrivingTableName();",
"public Class getTableClass() {\n\t\treturn entityClass;\r\n\t}",
"protected abstract TableName getTableNameByConvention(Class<?> beanClass);",
"public String getDbTable() {return dbTable;}",
"protected String getMonarchTableName(Table tbl) {\n // 1. If region name property is not provided use hive's table name.\n // 2. Use '_'(underscore) instead of '.'(dot) since gemfire\n // does not allow querying when region name contain dot.\n String tableName = tbl.getParameters().get(MonarchUtils.REGION);\n if (tableName == null) {\n tableName = tbl.getDbName() + \"_\" + tbl.getTableName();\n }\n return tableName;\n }",
"String jobTableName();",
"public String getGroupTable() {\n return dbTable.getGroupTable();\n }",
"private String extractTableName() {\n\t\treturn fromElement.getQueryable().getTableName();\n\t}",
"private void createGetTableName(){\n //---------------------------------------------------------------------------\n buffer.append(\" /**\\n\");\n buffer.append(\" * <code>getTableName</code>\\n\");\n buffer.append(\" * <p>\\n\");\n buffer.append(\" * This method return the current tablename.\\n\");\n buffer.append(\" * </p>\\n\");\n buffer.append(\" * @author Booker Northington II\\n\");\n buffer.append(\" * @version 1.0\\n\");\n buffer.append(\" * @since 1.3\\n\");\n buffer.append(\" * @return tableName <code>String</code> the name \");\n buffer.append(\"of this table.\\n\");\n buffer.append(\" */\\n\");\n buffer.append(spacer);\n buffer.append(\" public String getTableName(){\\n\");\n buffer.append(spacer);\n buffer.append(\" return tableName;\\n\");\n buffer.append(\" }//getTableName() ENDS\\n\\n\");\n }",
"protected String getSqlTable() {\n\t\treturn \"Project\";\n\t}",
"public String getTableDbName() {\r\n return \"enterprise_offer\";\r\n }",
"@Override\r\n\tpublic String getTableName() {\n\t\treturn \"contract\";\r\n\t}",
"public String getTableDbName() { return \"t_trxtypes\"; }",
"@Override\n public String getTableName() {\n return getFreeTextDocTablename(conf);\n }",
"public String getTableDbName() {\r\n return \"t_testplans\";\r\n }",
"protected final String immutableGetTableName()\n {\n return m__strTableName;\n }",
"public String getKeyWordTableName() {\r\n\t\treturn keyWordTableName;\r\n\t}",
"String pvUUIDTableName();",
"private String getQualifiedSrcDsTableName() {\n return sourceDB + \".\" + DATASET_TABLE_NAME;\n }",
"@Override\r\n\tpublic String getTableName(String[] sql) {\n\t\treturn sql[2];\r\n\t}",
"public String getTableGenerationPropertyName() {\n return PersistenceUnitProperties.SCHEMA_GENERATION_DATABASE_ACTION;\n }",
"@Override\n protected String getTableNameForMetadata(String tableName) {\n return (tableName == null) ? IdentifierUtil.PERCENT :\n getTableNameForMetadata(DBIdentifier.newTable(tableName));\n }",
"@Override\n\tpublic String getTableName() {\n\t\treturn TICKETCHARGE.TABLE;\n\t}",
"@Override\n public TableName getTableName(Class<?> beanClass) {\n while (true) {\n\n TableName tableName = getTableNameFromAnnotation(beanClass);\n if (tableName == null) {\n Class<?> supCls = beanClass.getSuperclass();\n if (hasInheritance(supCls)) {\n // get the table as per inherited class in case there\n // is not a table annotation in the inheritance hierarchy\n beanClass = supCls;\n continue;\n }\n\n tableName = getTableNameByConvention(beanClass);\n }\n\n // Use naming convention for catalog or schema,\n // if not set in the annotation.\n String catalog = tableName.getCatalog();\n if (isEmpty(catalog)) {\n catalog = getCatalog();\n }\n String schema = tableName.getSchema();\n if (isEmpty(schema)) {\n schema = getSchema();\n }\n return new TableName(catalog, schema, tableName.getName());\n }\n }",
"public String getUntranslatedTableName()\n {\n return this.utableName;\n }",
"@VisibleForTesting\n protected String getFullTableName(String stageName) {\n String fullTableName = stageToFullTableNameMap.get(stageName);\n\n if (fullTableName == null) {\n throw new SQLEngineException(String.format(\"Unable to determine full table name for stage '%s'\", stageName));\n }\n\n return fullTableName;\n }",
"public String getGlobalTableName() {\n return this.globalTableName;\n }",
"public final String getTableId() {\n\t\treturn tableId;\n\t}",
"public static String getActualTableName(String utableName)\n {\n String tn = (DBFactory.TableNameMap != null)? DBFactory.TableNameMap.get(utableName) : null;\n return (tn != null)? tn : utableName;\n }",
"@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}",
"public String getTableKey() {\n return tableKey;\n }",
"@Override\n public String asTableDbName() {\n return \"user\";\n }",
"public String toString()\n {\n return this.getUntranslatedTableName();\n }"
] | [
"0.80053115",
"0.7850709",
"0.7736429",
"0.73660886",
"0.72001904",
"0.7165397",
"0.71349925",
"0.7124932",
"0.71177244",
"0.70546556",
"0.7028047",
"0.7003188",
"0.6993118",
"0.6993118",
"0.69819134",
"0.6971558",
"0.6971558",
"0.6941148",
"0.6907759",
"0.68976223",
"0.6885541",
"0.6867132",
"0.68503565",
"0.6848148",
"0.68464243",
"0.68464243",
"0.6835361",
"0.6832657",
"0.6832657",
"0.682073",
"0.6789399",
"0.6779843",
"0.676006",
"0.6760053",
"0.6760021",
"0.6760021",
"0.6707932",
"0.6697769",
"0.66837907",
"0.66837907",
"0.66675043",
"0.6663566",
"0.66569453",
"0.66247857",
"0.65704334",
"0.65612555",
"0.6550785",
"0.6542915",
"0.6541963",
"0.65353626",
"0.6515623",
"0.651433",
"0.6507087",
"0.64606965",
"0.6453439",
"0.6440599",
"0.63953984",
"0.63759047",
"0.6346288",
"0.6327639",
"0.6317403",
"0.6278793",
"0.6277249",
"0.626946",
"0.6253021",
"0.62475073",
"0.6241433",
"0.6207244",
"0.6183431",
"0.61683935",
"0.6147554",
"0.61438054",
"0.6125872",
"0.61213076",
"0.6108123",
"0.6105664",
"0.60840845",
"0.6082269",
"0.6072874",
"0.60679054",
"0.60218656",
"0.60139537",
"0.59949505",
"0.5978257",
"0.59776926",
"0.59764916",
"0.596456",
"0.5962638",
"0.59558195",
"0.59510213",
"0.59498286",
"0.59443575",
"0.594074",
"0.5935059",
"0.5907858",
"0.59063786",
"0.58730966",
"0.58671814",
"0.5844062",
"0.5832007"
] | 0.68901527 | 20 |
Given the column name for an entity in the persistence layer, will return the name of Java property regarding to that column. | public String getPropertyName(String column) {
refineMetaData();
column = column.toLowerCase();
// Log.debug("%s->%s", column, col2prop.get(column));
return col2prop.get(column);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract String getDatabaseColumnName(String entityName, String propertyName);",
"public String getPropertyName(){\n return SimpleTableField.mapPropName(this.columnName);\n }",
"@Override\n public String foreignKeyColumnName(\n String propertyName,\n String propertyEntityName,\n String propertyTableName,\n String referencedColumnName\n ) {\n\n String header = propertyName != null ? StringHelper.unqualify(\n propertyName) : propertyTableName;\n if (header == null)\n throw new AssertionFailure(\"NamingStrategy not properly filled\");\n\n String col = \"\\\"\" + columnName(header + StringUtils.capitalize(\n referencedColumnName)) + \"\\\"\";\n // System.out.println(\"++++referencedColumnNameMod \" +\n // col);\n return col;\n // return super.foreignKeyColumnName(\n // propertyName,\n // propertyEntityName,\n // propertyTableName,\n // referencedColumnName\n // );\n }",
"public String getName() {\n return columnName;\n }",
"public String getColumnName(String propertyId)\n {\n return propertyId;\n }",
"String getPropertyName();",
"public String getName(){\n\t\t\treturn columnName;\n\t\t}",
"@Override\n\tpublic java.lang.String getName() {\n\t\treturn _expandoColumn.getName();\n\t}",
"private String getColumnName( String propertyName ) {\r\n String[] s = StringExtend.toArray( propertyName, \".\", false );\r\n return s[s.length - 1];\r\n }",
"@Override\n public String propertyToColumnName(String propertyName) {\n if (Pattern.compile(\"[A-Z]+\").matcher(propertyName).find()) {\n return \"\\\"\" + propertyName + \"\\\"\";\n } else {\n return super.propertyToColumnName(propertyName);\n }\n }",
"String getImplicitBundlePropertyName(int columnIndex);",
"public String getPropertyName();",
"public String getPropertyNameMapped(String aName) { return aName; }",
"public String getPropertyName()\n {\n return propertyName;\n }",
"public String getStringProperty(String propertyName) ;",
"@Override\n public String getName() {\n return columnInfo.getName();\n }",
"public String getColumnName() {\n return columnName; \n }",
"String getColumnName();",
"protected String getPropertyName(){\n return propertyName;\n }",
"@Override\n public String getColumnName(int aColumn) {\n return model.getColumnName(aColumn); \n }",
"private String getColumnName(org.hibernate.mapping.Column column) {\n return m_dbSpecificMappingInfo.getTruncateInfo().truncateColumnName(column.getName().toLowerCase());\n }",
"public String getPropertyName() {\n return this.propertyName;\n }",
"public String getColumnName() {\n return this.columnName;\n }",
"@Override\n\tpublic String sqlQualifiedColumn(String tablename, String columnname) {\n\t\treturn String.format(\"%s.\\\"%s\\\"\", tablename, columnname);\n\t}",
"@Override\n public String getColumnName(int column) {\n return colName[column];\n }",
"PropertyName getName();",
"public String get(String propertyName);",
"@Override\n\tpublic String getColumnName(int column) {\n\t\tswitch (column) {\n\t\tcase 0:\n\t\t\treturn \"Expression\";\n\t\tcase 1:\n\t\t\treturn \"Value\";\n\t\t}\n\t\treturn null;\n\t}",
"public String getColumnName(int col) {\r\n if (columns[col] instanceof StratmasObject) {\r\n return ((StratmasObject)columns[col]).getReference().getIdentifier().trim();\r\n }\r\n else {\r\n return (String)columns[col];\r\n }\r\n }",
"Property findProperty(String propertyName);",
"public java.lang.String getColumnName() {\r\n return columnName;\r\n }",
"@BeanTagAttribute\r\n public String getPropertyName() {\r\n return propertyName;\r\n }",
"public Object getProperty(String propName) {\n return _infoTableModel.getProperty(propName);\n }",
"public String getPropName() {\n return m_propName;\n }",
"@Override\r\n\tpublic String getColumnName(int column) {\n\t\treturn columnName[column];\r\n\t}",
"@Override\r\n\tpublic String getColumnName(int column) {\n\t\treturn columnName[column];\r\n\t}",
"@Override\n public String getColumnName(int column) {\n if (column == COL_ID) {\n return \"Código\";\n } else if (column == COL_NAME) {\n return \"Nome\";\n }\n return \"\";\n }",
"public String getAttributeName(){\n if(field.getAnnotation(Column.class) != null){\n return field.getAnnotation(Column.class).column();\n }\n if( field.getAnnotation(PrimaryKey.class) !=null){\n return field.getAnnotation(PrimaryKey.class).name();\n }\n return null;\n }",
"public String getColumnName() {\r\n return dataBinder.getColumnName();\r\n }",
"@Override\n\tpublic String getColumnName(int column) {\n\t\treturn this.colunas[column];\n\t}",
"public String getColumnName();",
"java.lang.String getProperty();",
"@ApiModelProperty(value = \"Gets and sets the name of the column.\")\n public String getName() {\n return name;\n }",
"String getProperty(String name);",
"Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }",
"Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }",
"Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }",
"Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }",
"Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }",
"Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }",
"Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }",
"Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }",
"Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }",
"Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }",
"Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }",
"@Override\r\n public String getColumnName(int column) {\n return (String)this.columnNames.get(column);\r\n }",
"public String getProperty(String name);",
"@Override\n public String getColumnName(final int column) {\n return _columns.get(column);\n }",
"@Override\n public String getColumnName(int column) {\n return columnNames[column];\n }",
"@Override\n public String getColumnName(int column) {\n return columnNames[column];\n }",
"@Override\n\tpublic String getColumnName(int column) {\n\t\treturn names[column];\n\t}",
"public String getUserProperty(String propertyName) {\n PropertyHelper ph = PropertyHelper.getPropertyHelper(this);\n return (String) ph.getUserProperty(null, propertyName);\n }",
"String getProperty(String property);",
"public String getColumnName(int col) {\n\t\treturn (col == 0) ? \"Path\" : prescaleTable.prescaleColumnName(col - 1);\n\t}",
"public static List<String> propertiesForColumns(MetadataModel<EntityMappingsMetadata> mappings,\n final String entityName, final List<String> columns) throws IOException {\n List<String> properties = Collections.emptyList();\n try {\n properties = mappings.runReadActionWhenReady(new MetadataModelAction<EntityMappingsMetadata, List<String>>() {\n @Override\n public List<String> run(EntityMappingsMetadata metadata) {\n Entity[] entities = metadata.getRoot().getEntity();\n Entity entity = null;\n for (int i=0; i<entities.length; i++) {\n if (entityName.equals(entities[i].getName())) {\n entity = entities[i];\n break;\n }\n }\n if (entity == null) {\n return Collections.emptyList();\n }\n boolean all = (columns == null);\n List<String> props = new LinkedList<String>();\n Map<String,String> columnToProperty = all ? null : new HashMap<String,String>();\n Attributes attrs = entity.getAttributes();\n for (Id id : attrs.getId()) {\n String propName = J2EEUtils.fieldToProperty(id.getName());\n if (all) {\n props.add(propName);\n } else {\n String columnName = id.getColumn().getName();\n columnName = unquote(columnName);\n columnToProperty.put(columnName, propName);\n }\n }\n for (Basic basic : attrs.getBasic()) {\n String propName = J2EEUtils.fieldToProperty(basic.getName());\n if (\"<error>\".equals(propName)) { // NOI18N\n continue;\n }\n if (all) {\n props.add(propName);\n } else {\n String columnName = basic.getColumn().getName();\n columnName = unquote(columnName);\n columnToProperty.put(columnName, propName); \n }\n }\n for (ManyToOne manyToOne : attrs.getManyToOne()) {\n String propName = J2EEUtils.fieldToProperty(manyToOne.getName());\n if (\"<error>\".equals(propName)) { // NOI18N\n continue;\n }\n if (all) {\n props.add(propName);\n } else {\n JoinColumn[] joinColumn = manyToOne.getJoinColumn();\n String columnName;\n if (joinColumn.length == 0) {\n columnName = manyToOne.getName().toUpperCase() + \"_ID\"; // NOI18N\n } else {\n columnName = manyToOne.getJoinColumn(0).getName();\n }\n columnName = unquote(columnName);\n columnToProperty.put(columnName, propName); \n }\n }\n if (!all) {\n for (String column : columns) {\n String propName = columnToProperty.get(column);\n if (propName == null) {\n Logger.getLogger(J2EEUtils.class.getName()).log(\n Level.INFO, \"WARNING: Cannot find property for column {0}\", column); // NOI18N\n } else {\n props.add(propName);\n }\n }\n }\n return props;\n }\n }).get();\n } catch (InterruptedException iex) {\n Logger.getLogger(J2EEUtils.class.getName()).log(Level.INFO, iex.getMessage(), iex);\n } catch (ExecutionException eex) {\n Logger.getLogger(J2EEUtils.class.getName()).log(Level.INFO, eex.getMessage(), eex);\n }\n return properties;\n }",
"public String getColumnName(int theCol) {\n return columnNameList[theCol];\n }",
"public String getColumnName(int col) { return columnNames[col]; }",
"public String getColName() {\r\n\t\treturn colName;\r\n\t}",
"public String getProperty(String propertyName) {\n PropertyHelper ph = PropertyHelper.getPropertyHelper(this);\n return (String) ph.getProperty(null, propertyName);\n }",
"public String getMappedFieldName(String cn)\n { // map old name to a new name\n return DBProvider.translateColumnName(cn);\n }",
"public String getColumnName(int column) {\n return columnNames[column];\n }",
"public String getColumnName(int col) {\n return columns[col] ;\n }",
"Property getProperty();",
"Property getProperty();",
"KijiColumnName getAttachedColumn();",
"private String getPropertyName(@Nullable final EntityProperty entityProperty, final String fieldName) {\n if (entityProperty != null && !isEmpty(entityProperty.name())) {\n return entityProperty.name();\n }\n return fieldName;\n }",
"public String getSysPropertyName() {\n return sysProperty;\n }",
"@Override\n protected String getColumnNameForMetadata(String columnName) {\n return (columnName == null) ? \"%\" : super\n .getColumnNameForMetadata(columnName);\n }",
"public String getColumnName(int col) {\n\t return columnNames[col];\n }",
"@Override\n\tpublic String getColumnName(int col) {\n\t\treturn columnNames.get(col);\n\t}",
"@Override\n public Object getProperty(String name) {\n name = name.toLowerCase();\n return this.properties.get(name);\n }",
"public String getColumnName(int col) {\n return columnNames[col];\n }",
"@NoProxy\n @NoDump\n @NoWrap\n public String getXproperty(final String name) {\n BwXproperty prop = findXproperty(name);\n\n if (prop == null) {\n return null;\n }\n\n return prop.getValue();\n }",
"java.lang.String getSourceColumnName();",
"public abstract Object getPropertyValue(String propertyName)\n throws ModelException;",
"public String getColumnName(int col) {\r\n return columnNames[col];\r\n }",
"public String getName() {\n return getProperty(Property.NAME);\n }",
"Object getProperty(String name);",
"public IColumn getColumn(String name) throws ETLException {\r\n\t\tIColumn col = columnMap.get(name);\r\n\t\tif (col == null) {\r\n\t\t\tcol = aliasMap.get(name);\r\n\t\t\tif (col == null) {\r\n\t\t\t\tthrow new ETLException(\"A column with the name '\" + name + \"' does not exist.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn col;\r\n\t}",
"protected String getDatabasePkColumnName() {\n return this.pkColumn == null ? getPlan().getDocIdField() : this.pkColumn;\n }",
"@Column(name = \"name\")\n public String getName() {\n return name;\n }",
"public String getColumnName(int columnIndex) {\n return resource.getString(columnNames.get(columnIndex));\n }",
"public void setColumnName (String ColumnName);",
"@Override\n public String getColumnName(int column) {\n if (column > colunas.length || column < 0) {\n return null;\n }\n return colunas[column];\n\n }",
"public String getColumnName(int col) {\n return columnNames[col];\n }",
"public String getProperty(String name) {\n return this.getProperty(name, null);\n }",
"@Override\n\tpublic String getColumnName(int col) {\n\t\treturn NOMICOLONNE[col];\n\t}",
"public String getColumnName(int columnIndex){\r\n\t\t\tif (Person.getFieldColumn(columnIndex) != null)\r\n\t\t\t\treturn Person.getFieldColumn(columnIndex);\r\n\t\t\treturn \"\";\r\n\t\t}",
"public String getEmphcolumn()\n {\n return emphColumn;\n }",
"public String getColumnName(int theCol) {\n return this.model.getColumnName(theCol);\n }"
] | [
"0.7734096",
"0.7489233",
"0.6744704",
"0.67023516",
"0.6696412",
"0.6637393",
"0.660669",
"0.6488553",
"0.6476488",
"0.6437684",
"0.6400011",
"0.63894826",
"0.635871",
"0.6200329",
"0.6173594",
"0.61539006",
"0.6141643",
"0.61104536",
"0.610462",
"0.6089068",
"0.60838133",
"0.6057372",
"0.6046124",
"0.601064",
"0.60085154",
"0.6004254",
"0.6004099",
"0.5979819",
"0.5978767",
"0.59672546",
"0.5965432",
"0.59142864",
"0.58775085",
"0.58745897",
"0.5871062",
"0.5871062",
"0.5859585",
"0.5843488",
"0.58216584",
"0.5821305",
"0.58165556",
"0.58085066",
"0.580292",
"0.5794683",
"0.5753291",
"0.5753291",
"0.5753291",
"0.5753291",
"0.5753291",
"0.5753291",
"0.5753291",
"0.5753291",
"0.5753291",
"0.5753291",
"0.5753291",
"0.57490957",
"0.5734533",
"0.57264644",
"0.5702977",
"0.5702977",
"0.5700606",
"0.56902766",
"0.5686126",
"0.5671421",
"0.5660533",
"0.5657416",
"0.5655109",
"0.5637024",
"0.5627634",
"0.5606672",
"0.5604669",
"0.5603747",
"0.56008685",
"0.56008685",
"0.55975664",
"0.5596761",
"0.5595418",
"0.559134",
"0.5589082",
"0.55526084",
"0.5547263",
"0.554712",
"0.55422103",
"0.5538496",
"0.5534404",
"0.5532689",
"0.5532265",
"0.5524816",
"0.55205417",
"0.552015",
"0.55032474",
"0.55029565",
"0.5498923",
"0.5496603",
"0.5495667",
"0.54949737",
"0.5494855",
"0.54904264",
"0.5482516",
"0.5479859"
] | 0.7168574 | 2 |
To set the name of the table for the entity in the database. | public void setTableName(String tableName) {
this.tableName = tableName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setTableName(String name) {\n this.tableName = name;\n }",
"public void setTableName(String value) {\n setAttributeInternal(TABLENAME, value);\n }",
"public abstract String getDatabaseTableName(String entityName);",
"public String tableName() {\n if ( tableName != null ) {\n return tableName;\n }\n\n TableName annotation = this.entityType().getAnnotation( TableName.class );\n if ( annotation != null ) {\n tableName = annotation.value();\n } else {\n tableName = entityType().getSimpleName().toLowerCase() + 's';\n }\n return tableName;\n }",
"public void updateTableName() {\n\t\tif (!isDeserializing && getHibernateModel() != null) {\n\t\t\tsetTableName(getHibernateModel().getHibernateImplementation().getDbObjectName(getName()));\n\t\t}\n\t}",
"@Override\n\tprotected String getTableName() {\n\t\treturn super.getTableName();\n\t}",
"public String getName(){\n\t\t\treturn tableName;\n\t\t}",
"public void setTableName(String newVal) {\n if ((newVal != null && this.tableName != null && (newVal.compareTo(this.tableName) == 0)) || \n (newVal == null && this.tableName == null && tableName_is_initialized)) {\n return; \n } \n this.tableName = newVal; \n\n tableName_is_modified = true; \n tableName_is_initialized = true; \n }",
"@Override\n\tpublic String getTableName() { \n\t\treturn tableName;\n\t}",
"@Basic( optional = false )\r\n\t@Column( name = \"table_name\", nullable = false, length = 50 )\r\n\tpublic String getTableName() {\r\n\t\treturn this.tableName;\r\n\t\t\r\n\t}",
"public String getName() {\n return tableName;\n }",
"public void setTableName(String tableName) {\r\n\t\tcheckIfConfigurationModificationIsAllowed();\r\n\t\tthis.tableMetaDataContext.setTableName(tableName);\r\n\t}",
"public String getTableName() {\n return tableName;\n }",
"public String getTableName() {\n return tableName;\n }",
"public String getTableName() {\r\n\t\treturn tableName;\r\n\t}",
"public void setTableName(String tableName) {\n this.tableName = tableName;\n }",
"public void setTableName(String tableName) {\n this.tableName = tableName;\n }",
"public void setTableName(String tableName) {\n this.tableName = tableName;\n }",
"public String getTableName() {\n return tableName;\n }",
"public String getTableName() {\n return tableName;\n }",
"public TableName name();",
"public String getTableName() {\n return tableName; \n }",
"String getTableName();",
"@Override\n\t\tpublic String getTableName() {\n\t\t\treturn null;\n\t\t}",
"public void setDbTable(String v) {this.dbTable = v;}",
"public void setTableName(final String tableName) {\r\n\t\tthis.tableName = tableName;\r\n\t}",
"@Override\r\n\tpublic String getTableName() {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic String getTableName() {\n\t\treturn null;\r\n\t}",
"public void setTableName(String tmp) {\n this.tableName = tmp;\n }",
"public void setTableName(final String tableName)\n {\n immutableSetTableName(tableName);\n }",
"public String getTableName() \n\t{\n\t return tableName ;\n\t}",
"@Override\n\tpublic String getTableName() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getTableName() {\n\t\treturn null;\n\t}",
"public String getTableName() {\n return this.tableName;\n }",
"public String getTableName() {\n return this.tableName;\n }",
"public String getTableName() {\n return this.tableName;\n }",
"public String getTableNameString() {\n return tableName;\n }",
"public String getTableName() {\n return getTableName(false, false, false, false);\n }",
"public void setTable(Table table)\n {\n this.table = table;\n }",
"@Override\r\n\tprotected String getTable() {\n\t\treturn TABLE;\r\n\t}",
"public String getTablename() {\n return tablename;\n }",
"String getTableName(String name);",
"@attribute(value = \"\", required = true)\t\r\n\tpublic void setTable(String table) {\r\n\t\tthis.table = table;\r\n\t}",
"public void setTablename(String tablename) {\n this.tablename = tablename == null ? null : tablename.trim();\n }",
"public String getDBTableName()\n\t{\n\t\treturn this.getClass().getSimpleName();\n\t}",
"public final String getTableName() {\n\t\treturn wTableName;\n\t}",
"public String table() {\n return tableName;\n }",
"public String table() {\n return tableName;\n }",
"private String getEntitiesTableName()\n {\n\tString prefix = PropertyLookup.getTableNamePrefix();\n\tString separator = PropertyLookup.getTableNameSeparator();\n\tString suffix = PropertyLookup.getEntitiesTableNameSuffix();\n\n\treturn prefix + separator + catalogId + separator + suffix;\n }",
"public String getTableName() {\r\n\t\treturn this.tableMetaDataContext.getTableName();\r\n\t}",
"protected String getTableName()\n {\n return immutableGetTableName();\n }",
"public TwoTieredTable(String name) \n\t{\n\t\tthis.name = name;\n\t}",
"public String getTableName() {\n if (tableName == null) {\n tableName = Strings.tableize(ActiveRecords.findActiveRecordBaseName(getClass()));\n }\n return tableName;\n }",
"public void setStatusTableName(String name)\n\t{\n\t\tm_statusTableName = name;\n\t}",
"SqlTables(String tableName){\n\t\t\t this.tableName = tableName; \n\t\t}",
"private String getTableName() {\n return this.tableName;\n }",
"public void setGroupTable(String name) throws BuildException {\n dbTable.setGroupTable(name);\n }",
"public String getTableName() {\n\t\treturn this.getTableName(this.currentClass());\n\t}",
"public void setStepTableName(String name)\n\t{\n\t\tm_stepsTableName = name;\n\t}",
"@Override\n public String getTableName() {\n return getFreeTextDocTablename(conf);\n }",
"public void setPathTableName(String name)\n\t{\n\t\tm_pathsTableName = name;\n\t}",
"public void setTable(DefaultTable table) {\n\t\t\r\n\t}",
"public DatabaseTable(String tableName) {\n this.tableName = tableName;\n }",
"public void setTable(String aValue) {\n String oldValue = table;\n table = aValue;\n changeSupport.firePropertyChange(\"table\", oldValue, aValue);\n }",
"public String getTableName() {\n return (String) getAttributeInternal(TABLENAME);\n }",
"public PgTable(final String name) {\n this.name = name;\n }",
"String tableName2Name(String name);",
"public String getTableName() throws DatabaseSchemaException {\n return Database.getTableName(clazz);\n }",
"@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}",
"@Override\n\tpublic String getTableName(int arg0) throws SQLException {\n\t\treturn tMeta[0].tableName();\n\t}",
"public TableDefinition(String tableName) {\n this.tableName = tableName;\n }",
"@Override\n\tpublic String getTableName() {\n\t\tString sql=\"dip_dataurl\";\n\t\treturn sql;\n\t}",
"public void setInfoTableName(String name)\n\t{\n\t\tm_infosTableName = name;\n\t}",
"protected final void immutableSetTableName(final String tableName)\n {\n m__strTableName = tableName;\n }",
"public String getTableName() {\r\n return IDaoConstants.TABLE_PROD_PTOS_VTA;\r\n }",
"public static void setIdTableNames(String idTableName, String idEntityColumnName, String idValueColumnName) {\n IdManager.idTableName = idTableName;\n IdManager.idEntityColumnName = idEntityColumnName;\n IdManager.idValueColumnName = idValueColumnName;\n }",
"public void setProgressTable(String name) throws BuildException {\n dbTable.setProgressTable(name);\n }",
"public String getNomTable();",
"private void fillTableNameToList(String dsName) {\n if (dsName.length() > 0) {\n utils = new DataMetaUtils(AppConfig.getDSConfig(dsName));\n final List<String> tableNameList = utils.getTableNameList();\n lstSrcTableName.setModel(new StringListModel(tableNameList));\n } else {\n this.lstSrcTableName.setModel(new StringListModel());\n }\n\n }",
"public String getTable() {\n return table;\n }",
"public Builder setBaseTable(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n baseTable_ = value;\n onChanged();\n return this;\n }",
"public String getTranslatedTableName()\n {\n return DBProvider.translateTableName(this.getUntranslatedTableName());\n }",
"@Override\n public String asTableDbName() {\n return \"user\";\n }",
"public String getQualifiedTableName();",
"public String getTable() {\n return table;\n }",
"private String getTableName(Class<?> clz) {\n\t\tif (clz.isAnnotationPresent(TableName.class)) {\n\t\t\treturn ((TableName) clz.getAnnotation(TableName.class)).value();\n\t\t}\n\t\treturn clz.getSimpleName();\n\t}",
"private String getTableName(org.hibernate.mapping.Table table) {\n return m_dbSpecificMappingInfo.getTruncateInfo().truncateTableName(table.getName().toLowerCase());\n }",
"public String getTable()\n {\n return table;\n }",
"public String getTableDbName() {\r\n return \"t_testplans\";\r\n }",
"@Override\n\tpublic String getTableName() {\n\t\treturn \"DMDB.GY_DM_ZJLX\";\n\t}",
"public String getDbTable() {return dbTable;}",
"public String getDataSetTableName() {\n\t\treturn this.datasetTableName;\n\t}",
"public void setPostTableName(String postTableName) {\r\n\t\tthis.postTableName = postTableName;\r\n\t}",
"@Override\r\n\tpublic String getTableName(String[] sql) {\n\t\treturn sql[2];\r\n\t}",
"public void setSourceTable(String sourceTable);",
"String pvTableName();",
"public String getTableDbName() {\r\n return \"t_package\";\r\n }",
"public void setStationTableName(String value) {\n stationTableName = value;\n }",
"public String getMapTableName() {\n return getTableName(false, false, false, true);\n }"
] | [
"0.77427226",
"0.74510354",
"0.72626436",
"0.71856457",
"0.71309483",
"0.71209735",
"0.7101091",
"0.7060451",
"0.70339125",
"0.70250773",
"0.70215356",
"0.6950252",
"0.6936582",
"0.6936582",
"0.6901279",
"0.6896559",
"0.6896559",
"0.6896559",
"0.6884393",
"0.6884393",
"0.6878974",
"0.6876382",
"0.68643045",
"0.68574697",
"0.6835115",
"0.68304735",
"0.68093413",
"0.68093413",
"0.6785178",
"0.677997",
"0.6774802",
"0.67697513",
"0.67697513",
"0.67649496",
"0.6731696",
"0.6731696",
"0.6719495",
"0.66865176",
"0.6686367",
"0.6670539",
"0.66655153",
"0.6652036",
"0.6628781",
"0.6624558",
"0.6616043",
"0.66063505",
"0.65821505",
"0.65821505",
"0.65384275",
"0.6511079",
"0.650199",
"0.6482794",
"0.64817595",
"0.64566666",
"0.64496356",
"0.6446132",
"0.64073855",
"0.6390019",
"0.637621",
"0.636896",
"0.6365047",
"0.63572973",
"0.6278529",
"0.6274479",
"0.6273341",
"0.62600356",
"0.6250589",
"0.62492824",
"0.62455076",
"0.62219614",
"0.6213372",
"0.61891645",
"0.618628",
"0.60972404",
"0.6052529",
"0.6016577",
"0.60143334",
"0.599173",
"0.5989473",
"0.59875673",
"0.59788144",
"0.5973205",
"0.5973156",
"0.5970754",
"0.5964856",
"0.5945635",
"0.5933456",
"0.59330535",
"0.5921665",
"0.58894753",
"0.5880453",
"0.587804",
"0.5871069",
"0.58663046",
"0.5859681",
"0.58551925",
"0.5849975",
"0.58462",
"0.58103365"
] | 0.6859559 | 24 |
Left empty here. If necessary, will be overrident in subclasses to load some special values into the entity. | public void loadDefaultValues() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void loadEntityDetails() {\n \tsuper.loadEntityDetails();\n }",
"protected void entityInit() {}",
"@Override\n\tpublic void initEntity() {\n\n\t}",
"@Override\r\n\tprotected void load() {\n\t\t\r\n\t}",
"@Override\n\tprotected void load() {\n\n\t}",
"@Override\n\tprotected void load() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"protected void prepareEntityToNodeMap()\r\n\t{\n\t}",
"@Override\n\tprotected void load() {\n\t\t\n\t}",
"@Override\n\tprotected void load() {\n\t\t\n\t}",
"@Override\n\tprotected void load() {\n\t\t\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t}",
"@Override\n public void load() {\n }",
"protected abstract Serializable getEntity();",
"@Override\n\tprotected void initData(){\n\t\tsuper.initData();\n\t}",
"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 }",
"public CopyEntityAttributes()\n\t{\n\t\tsetMandatory(ENTITY_PARAM, COPY_MODE);\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void load() {\n\t}",
"@Override\n protected void resetEntitySubClass ()\n {\n super.resetEntitySubClass ();\n }",
"protected void loadData()\n {\n }",
"@Override\n public Entity getEntity() {\n return super.getEntity();\n }",
"@Override\n protected final void resetEntitySubClass ()\n {\n super.resetEntitySubClass ();\n }",
"@Override\r\n\tprotected void initLoad() {\n\r\n\t}",
"protected void addDefaultEntities() {\n\t\t// Complex entities\n\t\tentities.add(new EnglishName());\n\t\tentities.add(new DutchName());\n\t\t// Regular entities\n\t\tentities.add(new EnglishMathematic());\n\t\tentities.add(new DutchMathematic());\n\t\tentities.add(new EnglishConfirmation());\n\t\tentities.add(new DutchConfirmation());\n\t\tentities.add(new EnglishProfanity());\n\t\tentities.add(new DutchProfanity());\n\t\tentities.add(new EnglishCurrency());\n\t\tentities.add(new DutchCurrency());\n\t\tentities.add(new EnglishLanguage());\n\t\tentities.add(new DutchLanguage());\n\t\tentities.add(new EnglishCountry());\n\t\tentities.add(new DutchCountry());\n\t\tentities.add(new EnglishDate());\n\t\tentities.add(new DutchDate());\n\t\tentities.add(new EnglishTime());\n\t\tentities.add(new DutchTime());\n\t\tentities.add(new EnglishDuration());\n\t\tentities.add(new DutchDuration());\n\t\tentities.add(new EnglishMonth());\n\t\tentities.add(new DutchMonth());\n\t\tentities.add(new EnglishOrder());\n\t\tentities.add(new EnglishOrder2());\n\t\tentities.add(new DutchOrder());\n\t\tentities.add(new EnglishNumeric());\n\t\tentities.add(new DutchNumeric());\n\t\tentities.add(new EnglishPreposition());\n\t\tentities.add(new DutchPreposition());\n\t\tentities.add(new UniversalMathematic());\n\t\tentities.add(new UniversalCurrency());\n\t\tentities.add(new UniversalSmiley());\n\t\tentities.add(new UniversalFrowny());\n\t\tentities.add(new UniversalTime());\n\t\tentities.add(new UniversalNumeric());\n\t\tentities.add(new UniversalAlphabetic());\n\t}",
"@Override\n public void load() {\n }",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void load() {\n\r\n\t}",
"protected void validateEntity() {\n super.validateEntity();\n }",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@PrePersist()\r\n\tpublic void initEntity(){\r\n\t\tthis.name = WordUtils.capitalizeFully(this.name);\r\n\t}",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\n protected void initData() {\n }",
"@Override\n protected void initData() {\n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"protected Entity() {\n UID = GEN_COUNT;\n GEN_COUNT++;\n }",
"@Override\n public void init(Entity entity) {\n entity.add(AI_DATA, new BuildingSpawnerStratAIData());\n }",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"@Override\n\tprotected void initializeFields() {\n\n\t}",
"@Override\n\tpublic void initializeValues() {\n\n\t}",
"protected abstract void loadData();",
"@PostConstruct\n protected void initNewEntity() {\n setNewEntity(getService().create());\n }",
"@Override\n\tpublic List<DataDictionaryValueEntity> querySpecialPickUp() {\n\t\treturn null;\n\t}",
"protected void prepareSave() {\r\n EObject cur;\r\n for (Iterator<EObject> iter = getAllContents(); iter.hasNext();) {\r\n cur = iter.next();\r\n \r\n EStructuralFeature idAttr = cur.eClass().getEIDAttribute();\r\n if (idAttr != null && !cur.eIsSet(idAttr)) {\r\n cur.eSet(idAttr, EcoreUtil.generateUUID());\r\n }\r\n }\r\n }",
"@Override\n protected void initData()\n {\n super.initData();\n\n entityProps = getFormSession().getAssemblingMessageEntityProperties();\n\n refreshDataTable(entityProps);\n }",
"@Override\n\tpublic Class<Object> getEntityClass() {\n\t\treturn null;\n\t}",
"EntityData<?> getEntityData();",
"public void initInstance(EntityEnterpriseContext ctx)\n {\n if(!readOnly)\n {\n Object value;\n if(fieldType == boolean.class)\n value = Boolean.FALSE;\n else if(fieldType == byte.class)\n value = new Byte((byte)0);\n else if(fieldType == int.class)\n value = new Integer(0);\n else if(fieldType == long.class)\n value = new Long(0L);\n else if(fieldType == short.class)\n value = new Short((short)0);\n else if(fieldType == char.class)\n value = new Character('\\u0000');\n else if(fieldType == double.class)\n value = new Double(0d);\n else if(fieldType == float.class)\n value = new Float(0f);\n else\n value = null;\n setInstanceValue(ctx, value);\n }\n }",
"@Override\n protected Class<LineEntity> getEntityClass() {\n return null;\n }",
"@Override\n\t\t\t\t\tpublic void beginLoad(int type) {\n\n\t\t\t\t\t}",
"@Override\n\tprotected CoreEntity createNewEntity() {\n\t\treturn null;\n\t}",
"private void ensureEntityValue(IEntity entity) {\n entity.setPrimaryKey(entity.getPrimaryKey());\n }",
"@Override\n\tpublic Image loadEntity() {\n\t\ttry {\n\t\t\tImage entityImage = new Image(new FileInputStream(IMAGE_LOCATION));\n\t\t\treturn entityImage;\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Image file not found\");\n\t\t\treturn null;\n\t\t}\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public HashEntityMap()\n\t\t{\n\t\t\tmapNameToValue = new HashMap<String, Integer>();\n\t\t}",
"private ConfigurationEntity getPartiallyLoadedConfigEntity() {\n\t\t\n\t\tStringBuilder builder = new StringBuilder();\n\t\tString line;\n\t\ttry(BufferedReader br = new BufferedReader(new FileReader(new ClassPathResource(\"./static/config/config.json\").getFile()))) {\n\t\t\twhile((line = br.readLine())!=null) {\n\t\t\t\tbuilder.append(line);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn new Gson().fromJson(builder.toString(), ConfigurationEntity.class);\n\t}",
"@Override\n\tpublic Class<?> getEntityClass() {\n\t\treturn null;\n\t}",
"@Override\n\t\tvoid loadData() throws IOException {\n\t\t\tsuper.loadData();\n\t\t}",
"@Override\n public Entity configuracion(Entity e) throws SQLException {\n return null;\n }",
"public abstract Object getCustomData();",
"@Override\r\n\tprotected void init() {\n\t\tupdateValues();\r\n\t}",
"protected void initDataFields() {\r\n //this module doesn't require any data fields\r\n }",
"public Entity(String name)\n {\n super(name);\n isAs = Lists.newArrayList();\n }",
"public CCLayerGradientEntityLoader() {\n\t\tsuper(CCLayerGradientEntityLoader.ENTITY_NAMES);\n\t}",
"abstract void initializeNeededData();",
"@Override\n public void beforeShowNewEntity()\n {\n entity = new Aluno();\n entity.setDataNascimento(new GregorianCalendar());\n String senha = CriptografiaLogic.encriptar(\"123\");\n entity.setSenha(senha);\n }",
"@Override\r\n\tpublic void initData() {\n\t}",
"public void testInheritanceEditMetadataForMakeParentNullWithData()\r\n\t{\r\n\r\n\t\tEntityManagerInterface entityManagerInterface = EntityManager.getInstance();\r\n\t\tDomainObjectFactory factory = DomainObjectFactory.getInstance();\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//step 1\r\n\t\t\tEntityInterface specimen = factory.createEntity();\r\n\t\t\tspecimen.setName(\"specimen\");\r\n\t\t\tspecimen.setAbstract(true);\r\n\t\t\tAttributeInterface barcode = factory.createStringAttribute();\r\n\t\t\tbarcode.setName(\"barcode\");\r\n\t\t\tspecimen.addAbstractAttribute(barcode);\r\n\r\n\t\t\t//step 2\t\t\t\r\n\t\t\tspecimen = entityManagerInterface.persistEntity(specimen);\r\n\r\n\t\t\t//step 3\r\n\t\t\tEntityInterface tissueSpecimen = factory.createEntity();\r\n\t\t\ttissueSpecimen.setName(\"tissueSpecimen\");\r\n\t\t\tAttributeInterface quantityInCellCount = factory.createIntegerAttribute();\r\n\t\t\tquantityInCellCount.setName(\"quantityInCellCount\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(quantityInCellCount);\r\n\r\n\t\t\ttissueSpecimen.setParentEntity(specimen);\r\n\r\n\t\t\t//step 4\r\n\t\t\tEntityInterface savedTissueSpecimen = entityManagerInterface\r\n\t\t\t\t\t.persistEntity(tissueSpecimen);\r\n\r\n\t\t\t//step 5\t\t\t\r\n\t\t\tMap dataValue = new HashMap();\r\n\t\t\tdataValue.put(barcode, \"123456\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"45\");\r\n\r\n\t\t\tentityManagerInterface.insertData(tissueSpecimen, dataValue);\r\n\r\n\t\t\t//step 6\r\n\t\t\ttissueSpecimen.setParentEntity(null);\r\n\t\t\tsavedTissueSpecimen = entityManagerInterface.persistEntity(tissueSpecimen);\r\n\r\n\t\t\t//step 7\r\n\t\t\tfail();\r\n\t\t}\r\n\t\tcatch (DynamicExtensionsApplicationException e)\r\n\t\t{\r\n\t\t\tassertTrue(true);\r\n\t\t\tLogger.out.info(\"Application exception is expected to be thrown here\");\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tLogger.out.debug(DynamicExtensionsUtility.getStackTrace(e));\r\n\t\t\tfail();\r\n\t\t}\r\n\t}",
"public AbstractEntity getEntity() {\n if (entityClass == null) {\n return null;\n }\n try {\n AbstractEntity ent = entityClass.newInstance();\n if (value > -1) {\n ent.setSpriteValue(value);\n }\n return ent;\n } catch (InstantiationException | IllegalAccessException ex) {\n Logger.getLogger(CursorInfo.class.getName()).log(Level.SEVERE, null, ex);\n }\n return null;\n }",
"@Override\n\tpublic void load(ModelInfo info) {\n\t}",
"protected T getEntity() {\r\n\t\treturn entity;\r\n\t}",
"private void init() {\n FieldWrapper id = new FieldWrapper();\n id.fieldDescription = new HashMap<String, Object>();\n id.fieldDescription.put(\"fullName\", \"Id\");\n id.fieldDescription.put(\"type\", \"Text\");\n\n FieldWrapper name = new FieldWrapper();\n name.fieldDescription = new HashMap<String, Object>();\n name.fieldDescription.put(\"fullName\", \"Name\");\n\n FieldWrapper createdBy = new FieldWrapper();\n createdBy.fieldDescription = new HashMap<String, Object>();\n createdBy.fieldDescription.put(\"fullName\", \"CreatedBy\");\n createdBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper lastModifiedBy = new FieldWrapper();\n lastModifiedBy.fieldDescription = new HashMap<String, Object>();\n lastModifiedBy.fieldDescription.put(\"fullName\", \"LastModifiedBy\");\n lastModifiedBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper owner = new FieldWrapper();\n owner.fieldDescription = new HashMap<String, Object>();\n owner.fieldDescription.put(\"fullName\", \"Owner\");\n owner.fieldDescription.put(\"type\", \"Lookup\");\n\n fieldDescribe = new HashMap<String, FieldWrapper>();\n\n fieldDescribe.put((String) id.fieldDescription.get(\"fullName\"), id);\n fieldDescribe.put((String) name.fieldDescription.get(\"fullName\"), name);\n fieldDescribe.put((String) createdBy.fieldDescription.get(\"fullName\"), createdBy);\n fieldDescribe.put((String) lastModifiedBy.fieldDescription.get(\"fullName\"), lastModifiedBy);\n fieldDescribe.put((String) owner.fieldDescription.get(\"fullName\"), owner);\n }",
"public ArticleData() {\r\n\t\tid = Constants.EMPTY_STRING;\r\n\t\tname = Constants.EMPTY_STRING;\r\n\t\turl = Constants.EMPTY_STRING;\r\n\t\tdesc = Constants.EMPTY_STRING;\r\n\t\tlevels = Constants.EMPTY_STRING;\r\n\t\twebSiteId = Constants.EMPTY_STRING;\r\n\t\tmatched = Constants.EMPTY_STRING;\r\n\t\tcreateBy = Constants.EMPTY_STRING;\r\n\t\tcreateDate = Constants.EMPTY_STRING;\r\n\t\tlastUpdateBy = Constants.EMPTY_STRING;\r\n\t\tlastUpdateDate = Constants.EMPTY_STRING;\r\n\t\tenabled = Constants.EMPTY_STRING;\r\n\t\tpostTableName = Constants.EMPTY_STRING;\r\n\t\treturnPage = Constants.EMPTY_STRING;\r\n\t\twebSiteShowName = Constants.EMPTY_STRING;\r\n\t\treturnDirect = Constants.EMPTY_STRING;\r\n\t\tkeyWordTableName = Constants.EMPTY_STRING;\r\n\t\ttitle = Constants.EMPTY_STRING;\r\n\t\ttitleCounter = Constants.EMPTY_STRING;\r\n\t\tbufferStartCounter = Constants.EMPTY_STRING;\r\n\t\tbufferEndCounter = Constants.EMPTY_STRING;\r\n\t\tcatId = Constants.EMPTY_STRING;\r\n\t\tpostUrl = Constants.EMPTY_STRING;\r\n\t}",
"public abstract void loadData();",
"public abstract void loadData();",
"protected abstract ENTITY createEntity();",
"@Override\r\n\tpublic Item constructItem() {\r\n try {\r\n @SuppressWarnings(\"unchecked\")\r\n T entity = (T) entityClass.newInstance();\r\n BeanInfo info = Introspector.getBeanInfo(entityClass);\r\n for (PropertyDescriptor pd : info.getPropertyDescriptors()) {\r\n for (Object propertyId : queryDefinition.getPropertyIds()) {\r\n if (pd.getName().equals(propertyId)) {\r\n Method writeMethod = pd.getWriteMethod();\r\n Object propertyDefaultValue = queryDefinition.getPropertyDefaultValue(propertyId);\r\n writeMethod.invoke(entity, propertyDefaultValue);\r\n }\r\n }\r\n }\r\n return toItem(entity);\r\n } catch (Exception e) {\r\n throw new RuntimeException(\"Error in bean construction or property population with default values.\", e);\r\n }\r\n }",
"@Override\n\tpublic void initData() {\n\n\t}",
"@Override\n\tpublic void initData() {\n\n\t}",
"@Override\n\tpublic void initData() {\n\n\t}",
"public void afterLoad(Object entity) {\n\t\tif(!(entity instanceof DBObject)) return;\r\n\t\tDBObject obj = (DBObject) entity;\r\n\t\t\r\n\t\t// record initial values of object\r\n\t\ttracker.track(obj);\r\n\t}",
"public MapEntity() {\n\t}",
"@Override\n\t\t\tprotected PaginationResponseData load() {\n\t\t\t\treturn null;\n\n\t\t\t}",
"public ExpertiseEntity() {\n }",
"@Override\n\tpublic void initData() {\n\n\n\n\t}",
"@Override\n\tpublic void initData() {\n\t\t\n\t}",
"private ServerEntityMetadataPacket() {}",
"@Override\r\n\tpublic void load() {\n\t\ts.load();\r\n\r\n\t}",
"@Override\n\tpublic void read(Object entidade) {\n\t\t\n\t}",
"@Override\n\tpublic Map<String, Object> create(StoreBase entity) {\n\t\treturn null;\n\t}",
"public EntityPropertyBean() {}",
"protected boolean[] getEntityEagerPropertyFetches() {\n \t\treturn null;\n \t}"
] | [
"0.68963915",
"0.6875179",
"0.68475056",
"0.6256575",
"0.62219757",
"0.62219757",
"0.6202192",
"0.6199303",
"0.6164149",
"0.6164149",
"0.6164149",
"0.61472553",
"0.60471445",
"0.5941131",
"0.5925846",
"0.59235144",
"0.59220356",
"0.59189725",
"0.59189725",
"0.59189725",
"0.59189725",
"0.59189725",
"0.59189725",
"0.5891061",
"0.5889154",
"0.58870494",
"0.5873761",
"0.58690584",
"0.586041",
"0.58436257",
"0.58419526",
"0.5841377",
"0.5837457",
"0.5837297",
"0.5832069",
"0.582782",
"0.582782",
"0.5824599",
"0.5815378",
"0.5814587",
"0.5814587",
"0.58082986",
"0.58019316",
"0.57916176",
"0.578143",
"0.578143",
"0.5733252",
"0.5733035",
"0.57078195",
"0.5693196",
"0.5690225",
"0.5671198",
"0.5658435",
"0.56482273",
"0.56441045",
"0.5633342",
"0.56209594",
"0.55974674",
"0.5593611",
"0.55802864",
"0.5563079",
"0.5563065",
"0.5557804",
"0.55527604",
"0.55502397",
"0.55429775",
"0.55375624",
"0.5532741",
"0.55298275",
"0.5522703",
"0.5519316",
"0.5515829",
"0.55019283",
"0.5501265",
"0.5496641",
"0.54909945",
"0.5484762",
"0.54789716",
"0.54602045",
"0.5459457",
"0.54535085",
"0.54519117",
"0.54519117",
"0.5448047",
"0.5446707",
"0.54444134",
"0.54444134",
"0.54444134",
"0.544236",
"0.5441908",
"0.5441599",
"0.54396504",
"0.54131055",
"0.54129046",
"0.5409302",
"0.54041135",
"0.5397973",
"0.5392684",
"0.5389244",
"0.5388249"
] | 0.5972217 | 13 |
Returns the instance of this function. | public static FunctionPParamDel getInstance() {
if (FUNCTION == null) {
FUNCTION = new FunctionPParamDel();
}
return FUNCTION;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public T getInstance() {\n return instance;\n }",
"@Override\n public T getInstance() {\n return instance;\n }",
"T getInstance();",
"protected abstract T self();",
"protected abstract T self();",
"protected abstract T self();",
"public static ChainingMethods getInstance(){\n if (mInstance == null) {\n mInstance = new ChainingMethods();\n }\n\n return mInstance;\n }",
"Instance createInstance();",
"T self();",
"public static Result instance() {\n\t\t\n\t\tif (result == null) result = new Result();\n\t\t\n\t\treturn result;\n\t\t\n\t}",
"public org.omg.uml.behavioralelements.commonbehavior.Instance getInstance();",
"@Override\n\t\tpublic Object getInstance() {\n\t\t\treturn null;\n\t\t}",
"public static Main getInstance() {\n return instance;\n }",
"public static Main getInstance() {\r\n return instance;\r\n }",
"public static FunctionConfigurationSource instance() {\n return new IRFutureOptionFunctions().getObjectCreating();\n }",
"public static test5 getinstance(){\r\n\t\t return instance;\r\n\t }",
"public Object ai() {\n try {\n return this.ad.newInstance();\n } catch (IllegalAccessException | InstantiationException e) {\n throw new RuntimeException();\n }\n }",
"public static GeneralFunctions getInstance() {\n return new GeneralFunctions();\n }",
"public static SingleObject getInstance(){\n return instance;\n }",
"protected T self() {\n return (T) this;\n }",
"public static Instruction getInstance() {\n \t\treturn staticInstance;\n \t}",
"public static Instruction getInstance() {\n \t\treturn staticInstance;\n \t}",
"public static Instruction getInstance() {\n \t\treturn staticInstance;\n \t}",
"public T newInstance();",
"public static MainActivity instance() {\n Log.d(TAG, \" instance(): called\");\n return inst;\n }",
"public static Singleton getInstance( ) {\n return singleton;\n }",
"public static Feudalism getInstance(){\n\t\treturn f;\r\n\t}",
"protected a bi() {\n return new a(this);\n }",
"String getInstance()\n {\n return instance;\n }",
"public static AsteroidFactory getInstance() {\r\n\t\treturn instance;\r\n\t}",
"public static utilitys getInstance(){\n\r\n\t\treturn instance;\r\n\t}",
"public Object ae() {\n try {\n return this.ad.newInstance();\n } catch (IllegalAccessException | InstantiationException e) {\n throw new RuntimeException();\n }\n }",
"public static Singleton getInstance( ) {\n return singleton;\n }",
"public static Arm getInstance() {\n if (instance == null) {\n instance = new Arm();\n }\n return instance;\n }",
"public static Compile instance() {\n\tif (__instance == null) {\n\t synchronized (Compile.class) {\n\t\tif (__instance == null) {\n\t\t __instance = new Compile();\n\t\t}/* if (__instance == null) */\n\t }/* synchronized (Compile.class) */\n\t}/* if (__instance == null) */\n\n\treturn __instance;\n }",
"public static LoCurso GetInstancia(){\n if (instancia==null)\n {\n instancia = new LoCurso();\n \n }\n\n return instancia;\n }",
"public a mo8520o() {\n return new a();\n }",
"public static SingletonEager get_instance(){\n }",
"public static SingleObject getInstance()\r\n {\r\n return instance;\r\n }",
"public final com.squareup.b.a invoke() {\n return new com.squareup.b.a(this.this$0);\n }",
"public FunctionLibrary copy() {\n return this;\n }",
"public static AccessSub getInstance() {\n\t\treturn instance;\n\t}",
"public static Ontology getInstance() {\n return theInstance;\n }",
"public static Ontology getInstance() {\n return theInstance;\n }",
"public static IPCGCallDetailCreator instance()\r\n {\r\n if (instance == null)\r\n {\r\n instance = new IPCGCallDetailCreator();\r\n }\r\n return instance;\r\n }",
"public static LOCFacade getInstance() {\r\n\t\tcreateInstance();\r\n\t\treturn instance;\r\n\t}",
"ResponseHandler getInstance() {\n \t\treturn this;\n \t}",
"public Object getObject() {\n return getObject(null);\n }",
"public Extractor getInstance() throws Exception {\r\n return (Extractor)getInstance(label); \r\n }",
"static Func getInstance(Stats stat)\n\t\t{\n\t\t\tint pos = stat.ordinal();\n\n\t\t\tif (_instancies[pos] == null)\n\t\t\t{\n\t\t\t\t_instancies[pos] = new FuncMultRegenResting(stat);\n\t\t\t}\n\n\t\t\treturn _instancies[pos];\n\t\t}",
"public static SingletonEager getInstance()\n {\n return instance;\n }",
"public Game getNewInstance() {\n try {\n return classObj.newInstance();\n } catch (Exception e) {\n e.printStackTrace();\n throw new RuntimeException(\"Error generating \" + this + \" game\");\n }\n }",
"protected abstract T getThis();",
"public static OI getInstance() {\n\t\treturn INSTANCE;\n\t}",
"public MutSig getInstance() throws DaoException {\n return this;\n }",
"public T getNewInstance() {\n T value = null;\n Class<T> tClass = (Class<T>) ((ParameterizedType) this.getClass().getGenericSuperclass()).getActualTypeArguments()[0];\n try {\n value = tClass.newInstance();\n } catch (InstantiationException e) {\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n }\n return value;\n }",
"public static Parser getInstance() {\n\t\tif (theOne == null) {\n\t\t\ttheOne = new Parser();\n\t\t}\n\t\treturn theOne;\n\t}",
"public static SingleObject getInstance(){\n\t\treturn instance;\n\t}",
"public Object getOperatorInstance() {\n return operatorInstance;\n }",
"public static TempExpressionHelper getInstance() {\r\n\t\tif (tempExpression == null) {\r\n\t\t\tsynchronized (TempExpressionHelper.class) {\r\n\t\t\t\tif (tempExpression == null) {\r\n\t\t\t\t\ttempExpression = new TempExpressionHelper();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn tempExpression;\r\n\t}",
"Reproducible newInstance();",
"public static PSUniqueObjectGenerator getInstance()\n {\n if ( null == ms_instance )\n ms_instance = new PSUniqueObjectGenerator();\n return ms_instance;\n }",
"private final T self() { return (T)this; }",
"private final T self() { return (T)this; }",
"public Sandwich getSandwich(){\n return new Sandwich();\n }",
"public static RunArguments instance(){\n\t\treturn RunArguments.builder().build();\n\t}",
"public static ParSpreadRateCalculator getInstance() {\n return INSTANCE;\n }",
"public static Parser getInstance() {\n return instance;\n }",
"public static Gadget getInstance(){\r\n\t\t\treturn instance;\r\n\t\t}",
"public static MySingleTon getInstance(){\n if(myObj == null){\n myObj = new MySingleTon();\n }\n return myObj;\n }",
"final Truerandomness defaultInstance() {\n\n\t\ttry {\n\t\t\treturn newInstance();\n\t\t} catch (Throwable t) {\n\t\t\t// hide\n\t\t}\n\n\t\t// not supported\n\t\treturn null;\n\t}",
"public static Ambulancia get_instance() {\n if (instance == null)\n instance = new Ambulancia();\n return instance;\n }",
"public static final PikaxProcessor getInstance() {\n\t\tif (instance == null) {\n\t\t\treturn newInstance();\n\t\t}\n\t\treturn instance;\n\t}",
"public Object aj() {\n try {\n return this.ad.newInstance();\n } catch (IllegalAccessException | InstantiationException e) {\n throw new RuntimeException();\n }\n }",
"Address self();",
"public Graph<Node, DefaultEdge> getInstance() {\n if (graphInstance == null) {\n graphInstance = initialiseSpaceGraph();\n return graphInstance;\n }\n return graphInstance;\n }",
"public Builder getThis() { return this; }",
"public static Casino getInstance(){\r\n\t\tif (instance == null){\r\n\t\t\tcreateInstance();\r\n\t\t}\r\n\t\treturn instance;\r\n\t}",
"public static LoInscripcion GetInstancia(){\n if (instancia==null)\n {\n instancia = new LoInscripcion();\n }\n\n return instancia;\n }",
"public static DeadbandMath getInstance() {\n if (lastInstance == null) {\n lastInstance = new DeadbandMath();\n }\n return lastInstance;\n }",
"@Override\n protected T createInstance() throws Exception {\n return this.isSingleton() ? this.builder().build() : XMLObjectSupport.cloneXMLObject(this.builder().build());\n }",
"@Override\r\n\tpublic T createInstance() {\r\n\t\ttry {\r\n\t\t\treturn getClassType().newInstance();\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogger.getLogger(AbstractCRUDBean.class.getSimpleName()).log(Level.ALL, e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public static synchronized LowerCaseResolution instance() {\n\t\t// double check locking\n\t\tif (instance == null) {\n\t\t\tsynchronized (LowerCaseResolution.class) {\n\t\t\t\tif (instance == null) {\n\t\t\t\t\tinstance = new LowerCaseResolution();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn instance;\n\t}",
"static RatAppModel getInstance() {return model;}",
"public static ComputingElementFactory getInstance() {\n\t\t\n\t\tif( _instance == null) {\n\t\t\t_instance = new ComputingElementFactory();\n\t\t}\n\t\treturn _instance;\n\t}",
"public static Context getInstance(){\n\t\treturn (Context) t.get();\n\t}",
"@Override\r\n\tpublic Explore getNewInstance() {\n\t\treturn new ZYDCExplore();\r\n\t}",
"public GetBuilder get() {\n return new GetBuilder(this);\n }",
"public static LibValid getInstance() {\n\t\treturn instance;\n\t}",
"public T safeNewInstance() {\n try {\n return newInstance();\n } catch (NoSuchMethodException e) {\n throw new IllegalArgumentException(e);\n } catch (IllegalAccessException e) {\n throw new IllegalArgumentException(e);\n } catch (InvocationTargetException e) {\n throw new IllegalArgumentException(e);\n } catch (InstantiationException e) {\n throw new IllegalArgumentException(e);\n }\n }",
"public static Elevator getInstance() {\r\n return instance;\r\n }",
"public static Boot getInstance()\n {\n return instance;\n }",
"public ScannerSimulator getInstance() {\n\t\tif (mInstance == null)\n\t\t\tmInstance = new ScannerSimulator();\n\t\treturn mInstance;\n\t}",
"public Function getFunction()\n\t{\n\t\treturn function;\n\t}",
"public static InfoCommand getInstance(){\n\t return instance;\n\t}",
"public static GFG getInstance() \n { \n if (instance == null) \n { \n // if instance is null, initialize \n instance = new GFG();\n } \n return instance; \n }",
"public static DynamoOperation getInstance(){\n\t\treturn dynamoOperation;\n\t}",
"public static RCProxy instance(){\n\t\treturn SingletonHolder.INSTANCE;\n\t}",
"public static Mgr i(){\r\n\t\tif(instance == null){\r\n\t\t\tinstance = new Mgr();\r\n\t\t}\r\n\t\treturn instance;\r\n\t}",
"public static CommandBrocker getInstance() {\n\t\tif (cb == null) {\n\t\t\tcb = new CommandBrocker();\n\t\t}\n\t\treturn cb;\n\t}",
"Reference owner();"
] | [
"0.67980206",
"0.67204595",
"0.65498716",
"0.6430024",
"0.6430024",
"0.6430024",
"0.6414863",
"0.63829726",
"0.63782674",
"0.6361739",
"0.6317809",
"0.6283666",
"0.62277657",
"0.620488",
"0.61650395",
"0.6087347",
"0.6072842",
"0.60299826",
"0.5982953",
"0.59785676",
"0.5972537",
"0.5972537",
"0.5972537",
"0.5950629",
"0.5929812",
"0.5906333",
"0.5904815",
"0.590204",
"0.5883354",
"0.587868",
"0.58732545",
"0.5864625",
"0.5864385",
"0.5864318",
"0.5857628",
"0.58574927",
"0.58519244",
"0.58489853",
"0.58440024",
"0.5839642",
"0.58344096",
"0.58209693",
"0.5818904",
"0.5818904",
"0.581747",
"0.58149767",
"0.581039",
"0.5802326",
"0.5780065",
"0.5778011",
"0.5768696",
"0.57684404",
"0.5751431",
"0.57485455",
"0.5746979",
"0.5738453",
"0.5737004",
"0.57341737",
"0.57284063",
"0.57194",
"0.5714978",
"0.5693047",
"0.56919664",
"0.56919664",
"0.5689971",
"0.56845737",
"0.5682881",
"0.56768686",
"0.5670364",
"0.5663843",
"0.56614506",
"0.5657369",
"0.56540453",
"0.5652457",
"0.56387746",
"0.5637097",
"0.5634664",
"0.5634044",
"0.56250435",
"0.56196827",
"0.5617754",
"0.56138927",
"0.56106335",
"0.5603686",
"0.5597751",
"0.55950123",
"0.55901045",
"0.5578424",
"0.5575337",
"0.55645865",
"0.55625284",
"0.5561261",
"0.5554771",
"0.5552777",
"0.55514246",
"0.55497456",
"0.55485564",
"0.5548007",
"0.5543002",
"0.5534952",
"0.55341864"
] | 0.0 | -1 |
This gets called every 1/60 seconds | @Override
public void handle(long now) {
int frame = (int) (now / 16666666.6667);
if (frame % 600 == 0) new SimpleEnemy(game); // 10 seconds
if (frame % 900 == 0) new SimplePowerUp(game); // 15 seconds
if (frame % 1950 == 0) new HealthPack(game); // 32.5 seconds
if (frame % 2100 == 0) new Shield(game); // 35 seconds
for (GameEntity gameObject : Globals.gameObjects) {
if (gameObject instanceof Animatable) {
Animatable animObject = (Animatable) gameObject;
animObject.step();
}
}
Globals.gameObjects.addAll(Globals.newGameObjects);
Globals.newGameObjects.clear();
Globals.gameObjects.removeAll(Globals.oldGameObjects);
Globals.oldGameObjects.clear();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void runEachMinute() {\n \n }",
"protected void runEachHour() {\n \n }",
"@Override\n public void periodic() {\n // This method will be called once per scheduler run\n }",
"protected void runEach10Minutes() {\n try {\n saveHistoryData();\n if (isEnabledScheduler()) {\n boolean action = getLightSchedule().getCurrentSchedule();\n if (action) {\n if (!currentState) switchOn();\n } else {\n if (currentState) switchOff();\n }\n }\n } catch (RemoteHomeManagerException e) {\n RemoteHomeManager.log.error(44,e);\n } catch (RemoteHomeConnectionException e) {\n RemoteHomeManager.log.error(45,e);\n }\n }",
"protected void runEachSecond() {\n \n }",
"@Override\n public void periodic() {\n\n }",
"@Override\n public void periodic() {\n\n }",
"@Override\n public void periodic() {\n UpdateDashboard();\n }",
"@Override\n public void autonomousPeriodic() {\n \n Scheduler.getInstance().run();\n \n }",
"@Override\n public void periodic() {\n\n }",
"@Override\n public void periodic() {\n\n }",
"@Override\n public void periodic() {\n\n }",
"@Override\n public void periodic() {\n\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\r\n public void periodic() {\n }",
"@Override\n public void autonomousPeriodic() {\n\n }",
"public void run() {\r\n\t\tboolean repeat = true;\r\n\t\tint count = 0;\r\n\t\twhile(repeat){\r\n\t\t\tcount ++;\r\n\t\t\t//updates currency rates every hour (count>60)\r\n\t\t\tif(count > 60){\r\n\t\t\t\tcurrencies.updateRates();\r\n\t\t\t\tcount = 1;\r\n\t\t\t}\r\n\t\t\tprintStatus();\r\n\t\t\ttry{\r\n\t\t\t\tThread.sleep(60000);\r\n\t\t\t}catch(InterruptedException ex){\r\n\t\t\t\trepeat = false;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n public void autonomousPeriodic() {\n \n }",
"@Override\n\tpublic void periodic()\n\t{\n\t}",
"@Override\n\tpublic void teleopPeriodic() {\n\t\tOI.refreshAll();\n\t\tScheduler.getInstance().run();\n\t\tlog();\n\t}",
"public void autonomousPeriodic() {\r\n Scheduler.getInstance().run();\r\n }",
"@Override\n public void autonomousPeriodic() {\n }",
"@Override\n public void autonomousPeriodic() {\n }",
"@Override\n public void autonomousPeriodic() {\n }",
"@Override\r\n\tpublic void perSecond() {\n\r\n\t}",
"@Override\n public void autonomousPeriodic() {\n }",
"@Override\n\tpublic void periodic() {\n\t}",
"public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }",
"public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }",
"public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }",
"public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }",
"public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }",
"public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }",
"public void teleopPeriodic() {\n Scheduler.getInstance().run();\n rumbleInYourPants();\n turnSpindleIfNeeded();\n turnWinchIfNeeded();\n if (arcadeDrive != null) \n arcadeDrive.start();\n }",
"public void autonomousPeriodic() \n {\n Scheduler.getInstance().run();\n }",
"@Override\n public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }",
"private void doSomeThingRepeat() {\n\t\t\n\t\ttimer.scheduleAtFixedRate(new TimerTask() {\n\t\t\tint mHourNow = 0, mMinuteNow = 0;\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t\tfinal Calendar c = Calendar.getInstance();\n\t\t\t\tmHourNow = c.get(Calendar.HOUR_OF_DAY);\n\t\t\t\tmMinuteNow= c.get(Calendar.MINUTE);\n\t\t\t\ttime = prefs.getString(\"time\", \"\");\n\t\t\t\tString mHour = time.substring(0, 2);\n\t\t\t\tString mMinute = time.substring(3, 5) ;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tint mh = Integer.parseInt(mHour);\n\t\t\t\tint mm = Integer.parseInt(mMinute);\n\t\t\t\t\t\n\t\t\t\tif (mHourNow == mh && mMinuteNow == mm) {\n\t\t\t\t\tplayMediaAlarm();\n\t\t\t\t}\n\t\t\t\t\tLog.d(\"Myservice-doSomeThingRepeat\", mHourNow +\"h\"+ mMinuteNow + \"&&\" +mHour +\"h\" + mMinute);\n\t\t\t\t\n\t\t\t}\n\t\t}, 0, UPDATE);\n\t}",
"public void run()\r\n\t{\r\n\t\ttimer.scheduleAtFixedRate(this.getTimerTask(), 0, repeat * 60 * 1000);\r\n\t}",
"public void teleopPeriodic() {\n Scheduler.getInstance().run();\n }",
"public void teleopPeriodic() {\n Scheduler.getInstance().run();\n }",
"public void teleopPeriodic() {\n Scheduler.getInstance().run();\n }",
"public void teleopPeriodic() {\n Scheduler.getInstance().run();\n }",
"public void teleopPeriodic() {\r\n\t\tScheduler.getInstance().run();\r\n\t}",
"@Override\n public void autonomousPeriodic() \n {\n Scheduler.getInstance().run();\n log();\n }",
"@Override\n public void autonomousPeriodic()\n {\n Scheduler.getInstance().run();\n }",
"@Override\r\n public void periodic() {\n\r\n }",
"public void autonomousPeriodic() {\r\n\t\tScheduler.getInstance().run();\r\n\t}",
"public void autonomousPeriodic() {\n // RobotMap.helmsman.trackPosition();\n Scheduler.getInstance().run();\n }",
"@Override\n public void autonomousPeriodic() {\n teleopPeriodic();\n //Scheduler.getInstance().run();\n }",
"public void demoSchduleMethod() {\n log.info(\"Method executed at every 5 seconds. Current time is :: \" + new Date());\n }",
"public void realTimeUpdate() {\n if ( millis() - lastTime >= 60000 ) {\n // *Load all_hour data\n eqData.init(hourURL);\n eqData.update(hour);\n println( \"all_hour data updated!\" );\n isHour = true;\n lastTime = millis();\n }\n}",
"@Override\r\n\tpublic void run() {\r\n\t\ttimer = new Timer();\r\n\t\ttimer.schedule(new TimerTask() {\r\n\t\t\t@Override\r\n public void run() {\r\n Main.myIntegratedSensorSuite.reinitializeRainData();\r\n }\r\n\t\t}, 0, 20000); //runs once initially then again every 20 seconds\r\n\t}",
"@Override\n public void teleopPeriodic() {\n Scheduler.getInstance().run();\n \n }",
"@Override\n public void teleopPeriodic() {\n Scheduler.getInstance().run();\n log();\n }",
"@Override\n public void teleopPeriodic()\n {\n Scheduler.getInstance().run();\n }",
"@Override\n\tpublic void update12EverySec() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\n\t\tint loop = 0;\n\n\t\tdo {\n\t\t\tthis.onCallTeam.setCountTimer(loop);\n\t\t\tloop++;\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException ex) {\n\t\t\t\tSystem.out.println(\"Interrupted\");\n\t\t\t}\n\t\t} while (loop != 900);// 15 minutes\n\n\t}",
"@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\t\n\t}",
"public void autonomousPeriodic()\r\n {\r\n \r\n }",
"public void teleopPeriodic()\n\t{\n\t\tScheduler.getInstance().run();\n\t}",
"@Override\n public void autonomousPeriodic() {\n \tbeginPeriodic();\n Scheduler.getInstance().run();\n endPeriodic();\n }",
"@Override\n public void run() {\n schedule();\n }",
"abstract protected void refresh(long time);",
"public void autonomousPeriodic()\n\t{\n\t\tScheduler.getInstance().run();\n\t}"
] | [
"0.8122509",
"0.7433361",
"0.7040194",
"0.7033647",
"0.7010729",
"0.6912692",
"0.6912692",
"0.68936515",
"0.68692106",
"0.6854757",
"0.6854757",
"0.6854757",
"0.6854757",
"0.67993903",
"0.67993903",
"0.67993903",
"0.67993903",
"0.67993903",
"0.67993903",
"0.67993903",
"0.67993903",
"0.67993903",
"0.67993903",
"0.67993903",
"0.67993903",
"0.67993903",
"0.67993903",
"0.67993903",
"0.67993903",
"0.67993903",
"0.67993903",
"0.67993903",
"0.67993903",
"0.67993903",
"0.67993903",
"0.67993903",
"0.67993903",
"0.67993903",
"0.67993903",
"0.67993903",
"0.67993903",
"0.67993903",
"0.67993903",
"0.67993903",
"0.67993903",
"0.67993903",
"0.67993903",
"0.67993903",
"0.6766157",
"0.6766157",
"0.6766157",
"0.6755858",
"0.6737799",
"0.6733773",
"0.6712912",
"0.6702043",
"0.6683899",
"0.66807413",
"0.66801226",
"0.66801226",
"0.66801226",
"0.6668684",
"0.66639733",
"0.66502684",
"0.6629966",
"0.6629966",
"0.6629966",
"0.6629966",
"0.6629966",
"0.6629966",
"0.662345",
"0.6622519",
"0.66058666",
"0.6592638",
"0.657572",
"0.65732336",
"0.65732336",
"0.65732336",
"0.65732336",
"0.65680885",
"0.65550363",
"0.6549314",
"0.65313554",
"0.651485",
"0.6510574",
"0.650202",
"0.64979905",
"0.6497743",
"0.64923364",
"0.64919066",
"0.64735174",
"0.6462886",
"0.64550614",
"0.6434878",
"0.64239633",
"0.64118224",
"0.6407673",
"0.6401887",
"0.6390039",
"0.63735074",
"0.6367219"
] | 0.0 | -1 |
WELCOME MESSAGE MENU SCANNER OBJECT! | public static void main(String args[]){
Scanner sc = new Scanner(System.in);
// THIS IS THE WELCOME MESSAGE
System.out.println("Hello! I am Bank simulator! \n\n"
+ "I simulate a bank which consist of customers and availableBanker.\n"
+ "My simulation last for 2 minutes! During this time, I will be keeping track of: \n\n"
+ " 1) Total amount of customers that visited the bank. \n" + " 2) Total amount of customers that each teller helped.\n"
+ " 3) Total amount of time that each teller was occupied. \n" + " 4) Total amount of customers that did not get to see a teller.\n");
System.out.println(" - Would you like me to run my simulation? Enter Y or N: ");
String runCmd = sc.nextLine().toLowerCase();
// SWITCH COMMAND - prompts user if they want to run the simulation or not
// Takes in user input; Three cases; If y - then runs simlation; If n - then exits; If anything else - prints "you broke me"
switch(runCmd){
case "y": System.out.println("Loading . . .");
System.out.println("Bank Simulation Executed!");
System.out.println("Please wait 2 minutes. Simulation is currently running . . .\n");
System.out.println("-------------------------------------------------------------------\n");
System.out.println("CONSOLE LOG: ");
Runnable runBank = new Runnable(){
//-------- DECLARED VARIABLES ----------------------------------------------------------------------------------
Random randy = new Random(); // Implemented random class -
Queue<Integer> bankLine = new LinkedList<Integer>(); // Implement of Queue class
int totalNumCustomers = 0; // Total number of customers that visited the bank
boolean teller1 = false;
boolean teller2 = false; // Initial availability set to false
boolean teller3 = false; // From beginning of simulation - availableBanker are occupied
boolean teller4 = false;
boolean teller5 = false;
// Array of bankers
boolean[] availableBanker = {teller1, teller2, teller3, teller4, teller5};
// Process time int variable
int processTime = 1, processTime2 = 1, processTime3 = 1, processTime4 = 1, processTime5 = 1;
// Timer for the 2 min count - 120 seconds
int timer = 0;
// Customer helped
int helped1 = 0, helped2 = 0, helped3 = 0, helped4 = 0, helped5 = 0;
// Time spent with customer
int timeSpent1 = 0, timeSpent2 = 0, timeSpent3 = 0, timeSpent4 = 0, timeSpent5 = 0;
// Teller available
int banker1, banker2, banker3, banker4, banker5;
// Random time with teller (2 - 5 seconds random)
int[] randTeller = { (randy.nextInt(5 - 2) + 2), (randy.nextInt(5 - 2) + 2), (randy.nextInt(5 - 2) + 2)
, (randy.nextInt(5 - 2) + 2), (randy.nextInt(5 - 2) + 2)};
//---------- START OF RUN METHOD --------------------------------------------------------------------------------
// Method to be ran by the runnable which is triggered by the switch statement (entering y)
public void run(){
// Initialized at a lower number just for testing purposes - 2 mins is too long to wait
// OUTPUT MESSAGE - BANK SIMULATION RESULTS
// RUN MAIN IF CONDITION
// IF Timer is equal to time requested to run - change equal value to whatever needed
// THEN print out all recorded results
if(timer == 25){
totalNumCustomers = helped1 + helped2 + helped3 + helped4 + helped5 + bankLine.size();
System.out.println("\n-------------------------------------------------------------------------------\n");
System.out.println(" *** BANK SIMULATION RESULTS *** \n");
System.out.println("\t - Total amount of customers that visited the bank: " + totalNumCustomers + "\n");
System.out.println("\t - Teller #1 helped: " + helped1 + " customers" + "\tTotal occupied time: " + timeSpent1 + " seconds");
System.out.println("\t - Teller #2 helped: " + helped2 + " customers" + "\tTotal occupied time: " + timeSpent2 + " seconds");
System.out.println("\t - Teller #3 helped: " + helped3 + " customers" + "\tTotal occupied time: " + timeSpent3 + " seconds");
System.out.println("\t - Teller #4 helped: " + helped4 + " customers" + "\tTotal occupied time: " + timeSpent4 + " seconds");
System.out.println("\t - Teller #5 helped: " + helped5 + " customers" + "\tTotal occupied time: " + timeSpent5 + " seconds");
System.out.println("\n\t - Total amount of customers that did not get help: " + bankLine.size());
System.out.println("\n-------------------------------------------------------------------------------\n");
System.exit(-1);
// RUN MAIN ELSE CONDITION
} else {
// Random time with teller 2 - 5 seconds
if(randy.nextInt(2) < 6){
int randomTime = (randy.nextInt(5 - 2) + 3);
bankLine.add(randomTime);
}
// BANKER 1------------------------------------------------------------------
while(banker1 == 1){
processTime = timer;
banker1 = 0;
}
if((timer - processTime) >= randTeller[0]){
System.out.println("Teller is now available.");
availableBanker[0] = true; // Teller is now available
}
if(availableBanker[0] == true && bankLine.isEmpty() == false){
timeSpent1 = timeSpent1 + randTeller[0];
randTeller[0] = bankLine.poll();
banker1 = 1;
System.out.println("A customer was served successfully served. (1)");
helped1++;
}
// BANKER 2------------------------------------------------------------------
// This starts the timer until the teller is done with the customer. Then it resets.
while(banker2 == 1){
processTime2 = timer;
banker2 = 0;
}
if((timer - processTime2) >= randTeller[1]){
System.out.println("Teller is now available.");
availableBanker[1] = true; // Teller is now available
}
if(availableBanker[1] == true && bankLine.isEmpty() == false){
timeSpent2 = timeSpent2 + randTeller[1];
randTeller[1] = bankLine.poll();
banker2 = 1;
System.out.println("A customer was served successfully served. (2)");
helped2++;
}
// BANKER 3------------------------------------------------------------------
while(banker3 == 1){
processTime3 = timer;
banker3 = 0;
}
if((timer - processTime3) >= randTeller[2]){
System.out.println("Teller is now available.");
availableBanker[2] = true; // Teller is now available
}
if(availableBanker[2] == true && bankLine.isEmpty() == false){
timeSpent3 = timeSpent3 + randTeller[2];
randTeller[2] = bankLine.poll();
banker3 = 1;
System.out.println("A customer was served successfully served. (3)");
helped3++;
}
// BANKER 4------------------------------------------------------------------
while(banker4 == 1){
processTime4 = timer;
banker3 = 0;
}
if((timer - processTime4) >= randTeller[3]){
System.out.println("Teller is now available.");
availableBanker[3] = true; // Teller is now available
}
if(availableBanker[3] == true && bankLine.isEmpty() == false){
timeSpent4 = timeSpent4 + randTeller[3];
randTeller[3] = bankLine.poll();
banker4 = 1;
System.out.println("A customer was served successfully served. (4)");
helped4++;
}
// BANKER 5------------------------------------------------------------------
while(banker5 == 1){
processTime5 = timer;
banker5 = 0;
}
if((timer - processTime5) >= randTeller[4]){
System.out.println("Teller is now available.");
availableBanker[4] = true; // Teller is now available
}
if(availableBanker[4] == true && bankLine.isEmpty() == false){
timeSpent5 = timeSpent5 + randTeller[4];
randTeller[4] = bankLine.poll();
banker5 = 1;
System.out.println("A customer was served successfully served. (5)");
helped5++;
}
timer++;
} // End of timer == value
} // End of void run
}; // End of runnable
// Tells when to execute a task
ScheduledThreadPoolExecutor go = new ScheduledThreadPoolExecutor(1);
// scheduleAtFixedRate - runBank
go.scheduleAtFixedRate(runBank, 0, 1, TimeUnit.SECONDS);
// End of switch case - break
break;
//---------------------------------------------------------------------------------------------------------------
// NO --> EXIT PROGRAM
case "n": System.out.println("That's okay . . .! I didn't want to work anyways . . .");
System.exit(-1);
break;
// ANYTHING ELSE --> EXITS PROGRAM
default: System.out.println("You didn't put Y or N!\n" + "You broke meeee . . .\n" + "Good-bye cruel wooooorld . . .");
System.exit(-1);
break;
} // End Switch
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void returnToMenu(){\n client.moveToState(ClientState.WELCOME_SCREEN);\n }",
"public void action() {\n MessageTemplate template = MessageTemplate.MatchPerformative(CommunicationHelper.GUI_MESSAGE);\n ACLMessage msg = myAgent.receive(template);\n\n if (msg != null) {\n\n /*-------- DISPLAYING MESSAGE -------*/\n try {\n\n String message = (String) msg.getContentObject();\n\n // TODO temporary\n if (message.equals(\"DistributorAgent - NEXT_SIMSTEP\")) {\n \tguiAgent.nextAutoSimStep();\n // wykorzystywane do sim GOD\n // startuje timer, zeby ten zrobil nextSimstep i statystyki\n // zaraz potem timer trzeba zatrzymac\n }\n\n guiAgent.displayMessage(message);\n\n } catch (UnreadableException e) {\n logger.error(this.guiAgent.getLocalName() + \" - UnreadableException \" + e.getMessage());\n }\n } else {\n\n block();\n }\n }",
"private static void returnMenu() {\n\t\t\r\n\t}",
"void askMenu();",
"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 }",
"public void displayWelcomeMsg();",
"private static void welcomePage() {\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Welcome to the Shopping App, best Shopping App in 2021!\");\r\n\t\tSystem.out.println();\r\n\t\tscanner = new Scanner(System.in); // Create a Scanner object\r\n\t\t// 1. Search items 2. View items 3. View cart 4. Checkout Cart 0. Quit\r\n\t\tmakeMenuChoice();\r\n\t\tscanner.close();\r\n\t}",
"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 readTheMenu();",
"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 void welcomeMsg(){\r\n\t\tdisplay(\"***************************\");\r\n\t\tdisplay(\"Hi you and welcome on STYF!\");\r\n\t\tdisplay(\"Are you already registred(Y/N)?\");\r\n\t}",
"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 }",
"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 printWelcomeMenu() {\n System.out.println(\"Welcome to Michael's Retail Shop Inventory Management App!\");\n }",
"private static int menu() {\n\t\tint opcion;\n\t\topcion = Leer.pedirEntero(\"1:Crear 4 Almacenes y 15 muebeles\" + \"\\n2: Mostrar los muebles\"\n\t\t\t\t+ \"\\n3: Mostrar los almacenes\" + \"\\n4: Mostrar muebles y su almacen\" + \"\\n0: Finalizar\");\n\t\treturn opcion;\n\t}",
"public void Menu()\n {\n visitorEditText = (EditText) findViewById(R.id.visitorEditText);\n message = \"Dear... \" + visitorEditText.getText().toString();\n\n //Declare intent to send message to new activity\n Intent intent = new Intent(this, Menu.class);\n intent.putExtra(EXTRA_TEXT, message);\n\n //Start new activity\n startActivity(intent);\n }",
"@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}",
"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 }",
"@Override\n public void messagePrompt(String message) {\n JOptionPane.showMessageDialog(lobbyWindowFrame,message+\" is choosing the gods\");\n }",
"private void afficheMenu() {\n\t\tSystem.out.println(\"------------------------------ Bien venu -----------------------------\");\n\t\tSystem.out.println(\"--------------------------- \"+this.getName()+\" ------------------------\\n\");\n\t\t\n\t\ttry {\n\t\t\tThread.sleep(40);\n\t\t\tSystem.out.println(\"A- Afficher l'état de l'hôtel. \");\n\t\t\tThread.sleep(50);\n\t\t\tSystem.out.println(\"B- Afficher Le nombre de chambres réservées.\");\n\t\t\tThread.sleep(60);\n\t\t\tSystem.out.println(\"C- Afficher Le nombre de chambres libres.\");\n\t\t\tThread.sleep(70);\n\t\t\tSystem.out.println(\"D- Afficher Le numéro de la première chambre vide.\");\n\t\t\tThread.sleep(80);\n\t\t\tSystem.out.println(\"E- Afficher La numéro de la dernière chambre vide.\");\n\t\t\tThread.sleep(90);\n\t\t\tSystem.out.println(\"F- Reserver une chambre.\");\n\t\t\tThread.sleep(100);\n\t\t\tSystem.out.println(\"G- Libérer une chambre.\");\n\t\t\tThread.sleep(100);\n\t\t\tSystem.out.println(\"O- Voire toutes les options possibles?\");\n\t\t\tThread.sleep(100);\n\t\t\tSystem.out.println(\"H- Aide?\");\n\t\t\tThread.sleep(100);\n\t\t\tSystem.out.println(\"-------------------------------------------------------------------------\");\n\t\t}catch(Exception err) {\n\t\t\tSystem.out.println(\"Error d'affichage!\");\n\t\t}\n\t\n\t}",
"private static int HQmenu() {\n\t\tlogger.info(\"Entering HQmenu method -->\");\n\t\tint choice = 0;\n\t\tboolean ok;\n\t\tdo {\n\t\t\tok = true;\n\t\t\tSystem.out.println(\"Money Service HQ\");\n\t\t\tSystem.out.println(\"----------------\");\n\t\t\tSystem.out.println(\"What would you like to do?\");\n\t\t\tSystem.out.println(\"1 - Register a new exchange office\");\n\t\t\tSystem.out.println(\"2 - Get statistics for registered offices\");\n\t\t\tSystem.out.println(\"0 - Exit the HQ application\");\n\n\t\t\tSystem.out.print(\"Enter your choice: \");\n\t\t\tString userChoice = CLIHelper.input.next();\n\n\t\t\ttry {\n\t\t\t\tchoice = Integer.parseInt(userChoice);\n\t\t\t}catch(NumberFormatException e) {\n\t\t\t\tlogger.log(Level.WARNING, \"choice: \" + choice + \" made exception! \" + e);\n\t\t\t\tSystem.out.format(\"Your choice %s is not accepted!\\n\", userChoice);\n\t\t\t\tok = false;\n\t\t\t}\n\t\t}while(!ok);\n\n\t\tlogger.info(\"Exiting HQmenu method <--\");\n\t\treturn choice;\n\t}",
"public static int welcomeUser(){\n \n int answer;\n JOptionPane.showMessageDialog(null, \"Welcome to Rock, Paper, Scissors, Lizard, Spock!\");\n JOptionPane.showMessageDialog(null, \"In this twist of the popular Rock, Paper, Scissors game a\"+\n \"\\nlizard and Captain Spock join in the epic battle of decision making.\");\n JOptionPane.showMessageDialog(null, \"The rules are as follows: \\nRock beats Scissors. \\nScissors beats Paper.\"+\n \"\\nPaper beats Rock. \\nLizard poisons Spock. \\nSpock vaporizes Rock. \"+\n \"\\nScissors decapitates Lizard. \\nLizard eats Paper. \\nRock smashes Lizard\"+\n \"\\nSpock smashes Scissors.\\nPaper disproves Spock.\");\n JOptionPane.showMessageDialog(null, \"Enter a R for rock,\"+\"\\nEnter a P for paper,\"+ \n \"\\nEnter an S for scissors\"+ \"\\nEnter an L for Lizard,\"+\n \"\\nEnter an X for Capt. Spock.\");\n \n answer = JOptionPane.showConfirmDialog(null,\"\\n Would you like to play now?\", null, JOptionPane.YES_NO_OPTION);\n return answer;\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 }",
"@Override\n\tpublic void msgHereIsMyChoice(Customer customerAgent, String choice) {\n\t\t\n\t}",
"public void getMenuChoice()\n {\n boolean finished = false;\n \n while(!finished)\n {\n printHeading();\n String choice = Menu.getMenuChoice(menuChoices);\n executeMenuChoice(choice);\n \n if(choice.startsWith(\"quit\"))\n {\n finished = true;\n }\n }\n }",
"static private void TalkTo() {\n if (BSChristiansen.getCurrentRoom() == currentRoom) {\n System.out.println(BSChristiansen.getDescription() + \", yet he still gives you good advice:\\n\");\n System.out.println(BSChristiansen.getDialog(0));\n System.out.println(\"\");\n woundedSurvivor();\n } else if (mysteriousCrab.getCurrentRoom() == currentRoom && inventory.getInventory().containsKey(\"Shroom\")) {\n System.out.println(mysteriousCrab.getDescription() + \"\\n\" + mysteriousCrab.getDialog(0));\n } else {\n System.out.println(\"There is nobody to communicate with in this Room\");\n }\n\n }",
"private String handleMainMenu (String text, Event event) {\n\t\tString result = \"\";\n\t\tMatcher m = Pattern.compile(\"profile|daily|food|menu|initdb|friend|code|admin\", Pattern.CASE_INSENSITIVE).matcher(text);\n\t\t\n\t\tif (m.find()) {\n\t\t\tswitch (m.group().toLowerCase()) {\n\t\t \t\tcase \"profile\": {\n\t\t \t\t\tcategories = Categories.PROFILE;\n\t\t \t\t\tresult = \"What would you like to do?\\n\\n\"\n\t\t \t\t\t\t + \"Gender - Set your gender\\n\"\n\t\t \t\t\t\t + \"Age - Update your age\\n\"\n\t\t \t\t\t\t + \"Height - Update your height\\n\"\n\t\t + \"Weight - Record your weight\\n\"\n\t\t + \"Meal - Record your meal\\n\"\n\t\t + \"Interest - Record your interests\\n\"\n\t\t + \"View - View your profile\";\n\t\t \t\t\tbreak;\n\t\t \t\t}\n\t\t \t\tcase \"daily\": {\n\t\t \t\t\tresult = user.showDailyProgress(event.getSource().getUserId());\n\t\t \t\t\tcategories = Categories.MAIN_MENU;\n\t\t \t\t\tbreak;\n\t\t \t\t}\n\t\t \t\tcase \"food\": {\n\t\t \t\t\tcategories = Categories.FOOD;\n\t \t\t\t\tresult = \"Enter a food name and I will provide you with the details!\";\n\t\t \t\t\tbreak;\n\t\t \t\t}\n\t\t \t\tcase \"menu\": {\n\t\t \t\t\tcategories = Categories.MENU;\n\t\t \t\t\tresult = \"You may input the menu in the following three ways:\\n\"\n\t\t \t\t\t\t+ \"Text\\n\"\n\t\t \t\t\t\t+ \"URL\\n\"\n\t\t \t\t\t\t+ \"JPEG\";\n\t\t \t\t\tbreak;\n\t\t \t\t}\n\t\t \t\tcase \"initdb\": {\n\t\t \t\t\tcategories = Categories.INIT;\n\t\t \t\t\tresult = \"Initializing...\";\n\t\t \t\t\tbreak;\n\t\t \t\t}\n\t\t \t\tcase \"friend\": {\n\t\t \t\t\tString uniqueCode = user.makeRecommendation(event.getSource().getUserId());\n\t\t \t\t\tif (uniqueCode == null) {\n\t\t \t\t\t\tresult = \"There is no campaign currently\";\n\t\t \t\t\t}\n\t\t \t\t\telse {\n\t\t\t \t\t\tresult = \"Your unique code is \" + uniqueCode;\n\t\t \t\t\t}\n\t\t \t\t\tbreak;\n\t\t \t\t}\n\t\t \t\tcase \"code\": {\n\t\t \t\t\tswitch(user.checkValidityOfUser(event.getSource().getUserId())) {\n\t\t\t \t\t\tcase \"claimed\":\n\t\t\t \t\t\t\tresult = \"You already accepted a recommendation\";\n\t\t\t \t\t\t\tbreak;\n\t\t\t \t\t\tcase \"taken\":\n\t\t\t \t\t\t\tresult = \"This recommendation code is already used\";\n\t\t\t \t\t\t\tbreak;\n\t\t\t \t\t\tcase \"before\":\n\t\t\t \t\t\t\tresult = \"This campaign started after you registered\";\n\t\t\t \t\t\t\tbreak;\n\t\t\t \t\t\tcase \"valid\":\n\t\t\t\t \t\t\tresult = \"Insert the 6 digit code\";\n\t\t\t \t\t\t\tcategories = Categories.CODE;\n\t\t\t \t\t\t\tbreak;\t\n\t\t \t\t\t}\n\t\t \t\t\t\n\t\t \t\t\tbreak;\n\t\t \t\t}\n\t\t \t\tcase \"admin\": {\n\t\t \t\t\tif (user.isAdmin(event.getSource().getUserId())) {\n\t\t \t\t\t\tresult = \"Please upload the photo of the coupon\";\n\t\t \t\t\t\tcategories = Categories.CAMPAIGN;\n\t\t \t\t\t}\n\t\t \t\t\telse {\n\t\t \t\t\t\tresult = \"You are not an admin\";\n\t\t \t\t\t}\n\t\t \t\t}\n\t\t \t\t\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tresult = \"I don't understand\";\n\t\t}\n\n\t\treturn result;\n\t}",
"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}",
"@Override\n public boolean onNavigationItemSelected( MenuItem item) {\n\n String message = null;\n\n switch(item.getItemId())\n {\n case R.id.backHomeItem:\n startActivity(new Intent(SongsterSearch.this, MainActivity.class));\n break;\n case R.id.triviaItem:\n startActivity(new Intent(SongsterSearch.this, TriviaGameLaunchActivity.class));\n break;\n case R.id.songsterItem:\n startActivity(new Intent(SongsterSearch.this, SongsterSearch.class));\n break;\n case R.id.carDBItem:\n startActivity(new Intent(SongsterSearch.this, CarDatabase.class));\n break;\n case R.id.soccerItem:\n startActivity(new Intent(SongsterSearch.this, RatingSoccerAPI.class));\n break;\n case R.id.helpItem:\n AlertDialog.Builder songsterHelpDialog = new AlertDialog.Builder(this);\n songsterHelpDialog.setTitle(getResources().getString(R.string.songsterHelpTile))\n //What is the message:\n .setMessage(getResources().getString(R.string.songsterInstructions1) + \"\\n\"\n + getResources().getString(R.string.songsterInstructions2) + \"\\n\"\n + getResources().getString(R.string.songsterInstructions3) + \"\\n\"\n + getResources().getString(R.string.songsterInstructions4) + \"\\n\"\n + getResources().getString(R.string.songsterInstructions5))\n //What the No button does:\n .setNegativeButton(getResources().getString(R.string.closeHelpDialog), (click, arg) -> {\n })\n //Show the dialog\n .create().show();\n break;\n }\n\n DrawerLayout drawerLayout = findViewById(R.id.drawer_layout);\n drawerLayout.closeDrawer(GravityCompat.START);\n\n return false;\n }",
"@Override\r\n\tpublic void menu() {\n\t\tSystem.out.println(\"go to menu\");\r\n\t\t\r\n\t}",
"public static void menuEN() {\r\n\t\tSystem.out.println(\"\\n****Welcome****\");\r\n\t\tSystem.out.println(\"\\n1- Play\\n2- Choose Language\\n3- How To Play\\n4- Exit\");\r\n\t\tint num = check();\r\n\t\tswitch (num) {\t\t\t\t\t// izbor opcije\r\n\t\t\tcase 1: crapsEN(); break;\r\n\t\t\tcase 2: chooseLangEN(); break;\r\n\t\t\tcase 3: howToEN(); break;\r\n\t\t\tcase 4: System.exit(0);\r\n\t\t}\r\n\t}",
"private void menuArmadura(){\n System.out.println(\"Escolha o local em que queira colocar a uma armadura:\");\n System.out.println(\"1 - Cabeça\");\n System.out.println(\"2 - Tronco\");\n System.out.println(\"3 - Pernas\");\n System.out.println(\"4 - Pés\");\n System.out.println(\"0 - Sair\");\n }",
"public static void message() {\r\n\t\t\r\n\t\tJOptionPane.showMessageDialog(null, \"Thanks for your participation\" + \"\\nHave a great day!\");\r\n\t\t\r\n\t\t\r\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 menu(){\n System.out.println(\"\");\n System.out.println(\"Round: \"+round);\n System.out.println(\"Please choose your action: \");\n\n Scanner tokenizer = parser.getCommand(); // prompt the user to put a new command in\n Command command = parser.parseCommand(tokenizer); // send the \"scanner\" result to make it into a command\n processCommand(command); // process the command\n\n }",
"@Override\n\t\t\t\t\t\t\t\tpublic void onLoadMenuShow(String result) {\n\n\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\tpublic void onLoadMenuShow(String result) {\n\n\t\t\t\t\t}",
"public String choiceMenu() {\n\t\tSystem.out.println(\"What would you like to do?\");\n\t\tSystem.out.println(\"Move (W/A/S/D)\");\n\t\tSystem.out.println(\"Check Hero Info (I)\");\n\t\tSystem.out.println(\"Check Inventory (E)\");\n\t\tSystem.out.println(\"Check Map (M)\");\n\t\tSystem.out.println(\"End Turn (T)\");\n\t\tSystem.out.println(\"Quit (Q)\");\n\t\t\n\t\tString s = parseString().toUpperCase();\n\t\tboolean isValidString = false;\n\t\twhile(!isValidString) {\n\t\t\tif(s.equals(\"W\") || s.equals(\"A\") || s.equals(\"S\") || s.equals(\"D\") || s.equals(\"I\") \n\t\t\t\t\t|| s.equals(\"E\") || s.equals(\"M\") || s.equals(\"T\") || s.equals(\"Q\")) {\n\t\t\t\tisValidString = true;\t\n\t\t\t} else {\n\t\t\t\tprintErrorParse();\n\t\t\t\ts = parseString().toUpperCase();\n\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn s;\n\t}",
"public void mainPart(){\n this.speakerMessageScreen.prompt();\n String choice = this.scanner.nextLine();\n switch (choice) {\n case \"0\":\n this.programController.goToPreviousScreenController();\n break;\n case \"1\":\n this.reply();\n this.mainPart();\n return;\n case \"2\":\n this.broadCast();\n this.mainPart();\n return;\n case \"3\":\n this.programController.setNewScreenController(new InboxScreenController(programController));\n break;\n default:\n this.speakerMessageScreen.invalidInput(choice);\n this.mainPart();\n return;\n }\n this.end();\n }",
"@Override\r\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tsuper.handleMessage(msg);\r\n\t\t\tIntent intent=null;\r\n\t\t\tswitch (msg.what) {\r\n\t\t\tcase GO_TO_FIRSTIN_ACTIVITY:\r\n\t\t\t\t//第一次就进入引导页\r\n\t\t\t\tintent=new Intent(WelcomeActivity.this,GuideActivity.class);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase GO_TO_MAIN_ACTIVITY:\r\n\t\t\t\tintent=new Intent(WelcomeActivity.this,MainActivity.class);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif(intent!=null)\r\n\t\t\t{\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t\tfinish();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}",
"public void ViewSent(DBMethods dbm) {\r\n\t\tString menu1answer=null;\r\n\t\tString ExitToMainMenuChoice=null;\r\n\t\tScanner ViewSentSC=new Scanner(System.in);\r\n\t\t\t\r\n\t\t\r\n\t\tdo{\r\n\t\t\t//SENT MESSAGES Menu Structure\r\n\t\t\tString menu1=\"\\n\"+\"-----------SENT MESSAGES MENU--------------\"+\"\\n\"+\r\n\t\t \"Please select one of the following actions:\"+\"\\n\"+\r\n\t\t \"1.View Sent Messages One by One\"+\"\\n\"+\r\n\t\t\t\t \"2.View All Sent Messages Together\"+\"\\n\"+\r\n\t\t \"3.Exit to Main Menu\"+\"\\n\";\r\n\t\t\t\r\n\t\t\tSystem.out.println(menu1);\r\n\t\t\tmenu1answer=ViewSentSC.next();\r\n\t\t\t//While Loop for preventing Wrong Input\r\n\t\t\twhile(!menu1answer.equals(\"1\")&&!menu1answer.equals(\"2\")&&!menu1answer.equals(\"3\")) {\r\n\t\t\t\tSystem.out.println(\"Invalid input\"+\"\\n\"+menu1);\r\n\t\t\t\tmenu1answer=ViewSentSC.next();\r\n\t\t\t}\r\n\t\t\t\r\n\r\n\t\t\tswitch(menu1answer) {\r\n\t\t\t\r\n\t\t\t //Case 1.View Sent Messages One by One\r\n\t\t\t case \"1\":\r\n\t\t\t \tShowSentMessages(dbm,\"1\");\r\n\t\t\t \tExitToMainMenuChoice=\"y\";\r\n\t\t\t \tbreak;\r\n\t\t\t \r\n\t\t\t //Case 2.View All Sent Messages Together\r\n\t\t\t case \"2\":\r\n\t\t\t \tShowSentMessages(dbm,\"2\");\r\n\t\t\t \tExitToMainMenuChoice=\"y\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t \t\r\n\t\t\t //Case 3.Exit to Main Menu\r\n\t\t\t case \"3\":\r\n\t\t\t \tSystem.out.println(\"Exiting to Main Menu...\");\r\n\t\t\t \tExitToMainMenuChoice=\"n\";\r\n\t\t\t \tbreak;\r\n\t\t\t \t}\r\n\t\t\t//Do...While Loop for keeping User to the SENT MESSAGES Menu Unless he/she chooses 'Case 3.Exit to Main Menu'\r\n\t\t\t}while(!ExitToMainMenuChoice.equalsIgnoreCase(\"n\"));\r\n\t\t}",
"public void customerMenu(String activeId) {\n try {\n do {\n System.out.println(EOL + \" ---------------------------------------------------\");\n System.out.println(\"| Customer Screen - Type one of the options below: |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 1. View games and albums |\");\n System.out.println(\"| - Sorted by Ratings (Best to worst) |\");\n System.out.println(\"| - Sorted by Album Year (Most recent) |\");\n System.out.println(\"| - Sorted by Title (A-Z) |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 2. Search game by Genre |\");\n System.out.println(\"| 3. Search album by Year |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 4. Rent a game |\");\n System.out.println(\"| 5. Rent an album |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 6. Send message to customer |\");\n System.out.println(\"| 7. Send message to employee |\");\n System.out.println(\"| 8. Read my messages \" + messageController.checkNewMsg(activeId, \"Customer\") + \" |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 9. Request membership upgrade |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 10. Return to Main Menu |\");\n System.out.println(\" ---------------------------------------------------\");\n\n String[] menuAcceptSet = new String[]{\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\"}; // Accepted responses for menu options\n String userInput = getInput.getMenuInput(\"menuOptionPrompt\", menuAcceptSet); // Calling Helper method\n switch (userInput.toLowerCase()) {\n case \"1\" -> productSortView(activeId);\n case \"2\" -> dartController.searchProduct(\"Game\");\n case \"3\" -> dartController.searchProduct(\"Album\");\n case \"4\" -> dartController.checkRental(activeId, \"Game\");\n case \"5\" -> dartController.checkRental(activeId, \"Album\");\n case \"6\" -> messageController.buildMessage(activeId, \"Customer\", \"Customer\", null, \"message\", null);\n case \"7\" -> messageController.buildMessage(activeId, \"Customer\", \"Employee\", null, \"message\", null);\n case \"8\" -> messageController.openInbox(activeId, \"Customer\");\n case \"9\" -> userController.customerUpgradeRequest(activeId);\n case \"10\" -> mainMenu();\n default -> printlnInterfaceLabels(\"menuOptionNoMatch\");\n }\n } while (session);\n } catch (Exception e) {\n printlnInterfaceLabels(\"errorExceptionMenu\", String.valueOf(e));\n }\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}",
"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 void tutorial(){\n\t\tString msg = \"[Space] = Inicia e pausa o jogo depois de iniciado.\";\n\t\tmsg += \"\\n[Seta esquerda] = Move o paddle para a esquerda.\";\n\t\tmsg += \"\\n[Seta direita] = Move o paddle para a direita.\";\n\t\tmsg += \"\\n[I] = Abre a janela de informaçoes.\";\n\t\tmsg += \"\\n[R] = Reinicia o jogo.\";\n\t\tJOptionPane.showMessageDialog(null, \"\"+msg, \"Informaçoes\", JOptionPane.INFORMATION_MESSAGE);\n\t}",
"private static void menu() {\n\t\tboolean finished = false;\n\t\tdo {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"If you would like to view a current the movies on the movie list, please type \\\"all\\\" \\nIf you would like to see a list of the initial possible categories, please type \\\"categories\\\" \\n\\nTo search for films by category, please type the category, now\\nTo exit the program, just type \\\"no\\\"\");\n\t\t\tString menAns = read.nextLine();\n\t\t\tif (menAns.equalsIgnoreCase(\"all\")) {\n\t\t\t\tlistFormat();\n\t\t\t} else if (menAns.equalsIgnoreCase(\"categories\") || menAns.equalsIgnoreCase(\"cats\")) {\n\t\t\t\tcatList();\n\t\t\t} else if (menAns.equalsIgnoreCase(\"no\")) {\n\t\t\t\tfinished = true;\n\t\t\t} else {\n\t\t\t\tseachCats(menAns);\n\t\t\t}\n\t\t} while (!finished);\n\n\t}",
"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}",
"private void gameMenu(String name) {\r\n System.out.println(\"Hello \" + name + \". Please choose a game, or -1 to quit: \");\r\n System.out.println(\"1: Lottery\");\r\n System.out.println(\"2: Coin flip\");\r\n System.out.println(\"3: Rock Paper Scissors\");\r\n }",
"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}",
"public static void actionMenu(int choice) {\n switch(choice) {\r\n case 1: \r\n \tPartie p = new Partie();\r\n \tp.lancerPartie();\r\n\r\n break;\r\n case 2:\r\n quit();\r\n break;\r\n default: //Si autre, alors on affiche un message d'erreur et on redemande un choix a l'utilisateur\r\n System.out.println(\"Valeur incorrecte\");\r\n actionMenu(afficherMenu());\r\n break;\r\n }\r\n }",
"@Override\n\t\t\tpublic void handleMessage(Message msg) {\n\t\t\t\tsuper.handleMessage(msg);\n\t\t\t\tBundle bundle=msg.getData();\n\t\t\t\t\n\t\t\t\tif(bundle.getInt(\"ready\") == 1){\n\t\t\t\t\t//Receive info and assign to player\n\t\t\t\t\tIntent j = new Intent();\n\t\t\t\t\tj.setClassName(\"com.example.client\",\n\t\t\t\t\t\t\t\"com.example.client.GameScreen\");\n\t\t\t\t\tstartActivity(j);\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t\t//Time out\n\t\t\t\t\t\talertMessage();\t\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}",
"@Override\n\tpublic String printMes() throws RemoteException{\n\t\tString mes=\"welcome you!\";\n\t\treturn mes;\n\t}",
"static void mainmenu() {\n\t\t\n\t\tSystem.out.println(\"Welcome. This is a rogue-like text-based RPG game.\");\n\t\tEngine.sleep(1);\n\t\tSystem.out.println(\"You control your character by entering your desired action when prompted.\");\n\t\tEngine.sleep(1);\n\t\tSystem.out.println(\"Do you want to start your journey?\");\n\t\tSystem.out.println();\n\t\tSystem.out.println(\" y: yes \t\tn: no\t\t\");\n\t\tresponse = Engine.request();\n\t\tif(response == false) {\n\t\t\tSystem.out.println(\"W-What are you doing here then? If you're not here to play the game then what do you even want to do?\");\n\t\t\tSystem.out.println(\"To start, write \\\"Y\\\" or \\\"y\\\" in the console \");\n\t\t\tSystem.out.println(\"I won't ask again. Do you want to start your journey?\");\n\t\t\tresponse = Engine.request();\n\t\t\tif(response == false) {\n\t\t\t\tSystem.out.println(\"I am not here to judge your decision. Farewell.\");\n\t\t\t\tSystem.exit(1);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Glad you came to your senses.\");\t\t\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Very well.\");\n\t\t}\n\t\tSystem.out.println();\t\t\n\t\tif(Engine.devmode == true) System.out.println(\"\tDebug: StartMenu passed\");\n\t\t\n\t\t\t// Cadet dungeon check\n\t\tif(Progresslog.cadetplaytime < 3) {\n\t\t\tSystem.out.println(\"You seem to be new at the game. Would you like to play through a more tailored experience,\\n\"\n\t\t\t\t\t+ \"which is designed for inexperienced players and introduces you to the game's mechanics?\");\n\t\t\tif(Engine.devmode == true) System.out.println(\"Cadet playtime: \" + Progresslog.cadetplaytime);\n\t\t\tresponse = Engine.request();\n\t\t\tif(response == true) {\n\t\t\t\tSystem.out.println(\"Alright then.\");\n\t\t\t\tDungeoncadet();\n\t\t\t} else DungeonGen();\t\t\t\n\t\t} else DungeonGen();\t\t\n\t}",
"private void processChoice() {\n switch (this.choice) {\n case 0:\n System.out.println(\"Log Out\");\n break;\n case 1:\n System.out.println(\"Open New Account\");\n break;\n case 2:\n System.out.println(\"View All Accounts\");\n break;\n case 3:\n System.out.println(\"View Transactions\");\n break;\n case 4:\n System.out.println(\"Transfer Funds\");\n break;\n default:\n System.out.println(\"Error! Invalid menu option\");\n break;\n }\n }",
"private void proceed() {\n finish();\n Intent onReturnView = new Intent(ChatMessage.this, MainActivity.class);\n startActivity(onReturnView);\n }",
"public void showGameResult(GameMenu myGameMenu){\n //Anropa metoden för att kontrollera resultat av spelet\n gameResult(myGameMenu);\n if (Objects.equals(getMatchResult(), \"Oavgjort\")){\n System.out.println(\"Oavgjort! Du Gjorde Samma Val Som Datorn!\");\n System.out.println(\"Spelaren: \" + getPlayersResult() + \"\\nDatorn: \" + getComputersResult());\n }\n else if (Objects.equals(getMatchResult(),\"Vann\")){\n System.out.println(\"Du Vann! Bra Jobbat!\");\n System.out.println(\"Spelaren: \" + getPlayersResult() + \"\\nDatorn: \" + getComputersResult());\n }\n else if (Objects.equals(getMatchResult(),\"Förlorade\")){\n System.out.println(\"Tyvärr! Du Förlorade!\");\n System.out.println(\"Spelaren: \" + getPlayersResult() + \"\\nDatorn: \" + getComputersResult());\n }\n }",
"private void welcome() {\n System.out.println(Strings.MAIN_WELCOME_MESSAGE);\n System.out.println();\n }",
"static void listerMenu() {\n System.out.println(\n \"-------------------------------------\\n\" +\n \"Saisir une option :\\n\" +\n \"1 : Liste des hôtes\\n\" +\n \"2 : Liste des logements\\n\" +\n \"3 : Liste des voyageurs\\n\" +\n \"4 : Liste des réservations\\n\" +\n \"5 : Fermer le programme\"\n );\n switch (Menu.choix(5)) {\n case 1:\n GestionHotes.listerHotes();\n break;\n case 2:\n GestionLogements.listerLogements();\n break;\n case 3:\n GestionVoyageurs.listerVoyageurs();\n break;\n case 4:\n GestionReservations.listerReservations();\n break;\n case 5:\n System.exit(0);\n break;\n }\n }",
"public String verMenu(){\r\n try {\r\n Object opcion=JOptionPane.showInputDialog(\r\n null,\r\n \"Seleccione Opcion\",\"Agenda de Anexos\",\r\n JOptionPane.QUESTION_MESSAGE,\r\n null,\r\n new String[]{\"1.- Registrar Empleado\",\r\n \"2.- Asignar Anexo a Empleado\",\r\n \"3.- Obtener ubicacion de un Anexo\",\r\n \"4.- Modificar Anexo a Empleado\",\r\n \"5.- Desasignar Anexo a Empleado\",\r\n \"6.- Listado de Asignaciones\",\r\n \"7.- Salir del Programa\"},\r\n \"1.- Registrar Empleado\");\r\n return(String.valueOf(opcion).substring(0, 1)); // RETORNA A FUNCION VOID MAIN\r\n } catch (Exception ex) {\r\n System.out.println(\"Hubo un error al ingresar una opcion \"+ex.toString());\r\n }\r\n return \"0\";\r\n }",
"public static void helper(){\n System.out.println(\"\\n0: Search Transaction\");\n System.out.println(\"1: New Transaction\");\n System.out.println(\"2: Query Transaction Detail\");\n System.out.println(\"back: return last menu\");\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}",
"public void theGameMenuClicked() {\n System.out.println(\"THE GAME (you just lost it)\");\n }",
"public String getActivationMenu();",
"public void MessageInvitCommand(String msg)\n {\n System.out.println(\"> \"+msg);\n }",
"void showOthersActions(String message);",
"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 void pressMainMenu() {\n }",
"private void printWelcomeMessage() {\r\n\t\tthis.printSeparator();\r\n\t\tSystem.out.println(\"-- Welcome to the JumpIN game --\\n\");\r\n\t\tSystem.out.println(\"Currently five levels are developed.\");\r\n\t\tSystem.out.println(\"Playing level 2\");\r\n\t\tSystem.out.println(\"To move a piece:\"); \r\n\t\tSystem.out.println(\"-Enter the piece's location\");\r\n\t\tSystem.out.println(\"-Wait for validation\");\r\n\t\tSystem.out.println(\"-Enter the location you want to move the piece to\\n\");\r\n\t\tthis.printSeparator();\r\n\t}",
"private void printMainMenu(){\n\t\tprint(\"Please choose from the options below\", System.lineSeparator()+\"1.Login\", \"2.Exit\");\n\t}",
"public void employeeMenu(String activeId) {\n try {\n do {\n System.out.println(EOL + \" ---------------------------------------------------\");\n System.out.println(\"| Employee Screen - Type one of the options below: |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 1. Register a game |\");\n System.out.println(\"| 2. Remove a game |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 3. Register an album |\");\n System.out.println(\"| 4. Remove an album |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 5. Register a customer |\");\n System.out.println(\"| 6. Upgrade a customer |\");\n System.out.println(\"| 7. Remove a customer |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 8. Return rented item |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 9. View all games and albums (sorted) |\");\n System.out.println(\"| 10. View all customers |\");\n System.out.println(\"| 11. View all rentals and history |\");\n System.out.println(\"| 12. View total rent profit |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 13. Send message to customer |\");\n System.out.println(\"| 14. Send message to employee |\");\n System.out.println(\"| 15. Read my messages \" + messageController.checkNewMsg(activeId, \"Employee\") + \" |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 16. Return to Main Menu |\");\n System.out.println(\" ---------------------------------------------------\");\n String[] menuAcceptSet = new String[]{\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\", \"13\", \"14\", \"15\", \"16\"}; // Accepted responses for menu options\n String userInput = getInput.getMenuInput(\"menuOptionPrompt\", menuAcceptSet); // Calling Helper method\n switch (userInput.toLowerCase()) {\n case \"1\" -> dartController.addGame();\n case \"2\" -> dartController.deleteProduct(\"Game\");\n case \"3\" -> dartController.addAlbum();\n case \"4\" -> dartController.deleteProduct(\"Album\");\n case \"5\" -> userController.addCustomer();\n case \"6\" -> userController.upgradeCustomerView(null);\n case \"7\" -> userController.deleteCustomer();\n case \"8\" -> dartController.returnRental();\n case \"9\" -> productSortView(activeId);\n case \"10\" -> userController.displayCustomers(false);\n case \"11\" -> dartController.viewCurrentRentals();\n case \"12\" -> dartController.viewRentalTotalProfit();\n case \"13\" -> messageController.buildMessage(activeId, \"Employee\", \"Customer\", null, \"message\", null);\n case \"14\" -> messageController.buildMessage(activeId, \"Employee\", \"Employee\", null, \"message\", null);\n case \"15\" -> messageController.openInbox(activeId, \"Employee\");\n case \"16\" -> mainMenu();\n default -> printlnInterfaceLabels(\"menuOptionNoMatch\");\n }\n } while (session);\n } catch (Exception e) {\n printlnInterfaceLabels(\"errorExceptionMenu\", String.valueOf(e));\n }\n }",
"private static void messageConstructor(){\n msg = \"These are the ammo you can spend.\\n\" +\n \"Every time you select the corresponding color, the quantity will decrease: \\n\";\n\n paymentSB.append(msg);\n if (tmpAmmoInAmmoBox[GeneralInfo.RED_ROOM_ID] > 0) {\n msg = red + \": Red ammo available: \" + tmpAmmoInAmmoBox[GeneralInfo.RED_ROOM_ID] + \"\\n\";\n paymentSB.append(msg);\n responeForAmmo.add(red);\n }\n if (tmpAmmoInAmmoBox[GeneralInfo.BLUE_ROOM_ID] > 0) {\n msg = blue + \": Blue ammo available: \" + tmpAmmoInAmmoBox[GeneralInfo.BLUE_ROOM_ID] + \"\\n\";\n paymentSB.append(msg);\n responeForAmmo.add(blue);\n }\n if (tmpAmmoInAmmoBox[GeneralInfo.YELLOW_ROOM_ID] > 0) {\n msg = yellow + \": Yellow ammo available: \" + tmpAmmoInAmmoBox[GeneralInfo.YELLOW_ROOM_ID] + \"\\n\";\n paymentSB.append(msg);\n responeForAmmo.add(yellow);\n }\n\n for (i = 0; i < tmpAmmoInPowerUp.size(); i++) {\n msg = (i + 1) + \": \" + tmpAmmoInPowerUp.get(i).getName() + \" COLOR: \" + tmpAmmoInPowerUp.get(i).getGainAmmoColor() + \"\\n\";\n paymentSB.append(msg);\n responseForPowerUp.add(Integer.toString(i + 1));\n }\n\n if (!responeForAmmo.isEmpty()) {\n possibleChoice.addAll(responeForAmmo);\n msg = \"Chose a letter R/B/Y \\n\";\n paymentSB.append(msg);\n }\n\n if(!responseForPowerUp.isEmpty()) {\n possibleChoice.addAll(responseForPowerUp);\n msg = \"choose a number from 1 to \" + i + \": \";\n paymentSB.append(msg);\n }\n }",
"public assetDetailsPage click_YesofAlert_msg() throws InterruptedException, IOException {\r\n\t\tWebElement alrtmsg = driver.findElementByName(\"You are about to lose your changes.Do you want to continue ?\");\r\n\r\n\t\tif (IsElementVisibleStatus(alrtmsg)) {\r\n\t\t\tWebElement alrtmsg_YesBtn = driver.findElementByName(\"Yes\");\r\n\t\t\tclickOn(alrtmsg_YesBtn);\r\n\t\t\tThread.sleep(1000);\r\n\t\t\treturn new assetDetailsPage();\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"No Alert message displayed\");\r\n\t\t\treturn new assetDetailsPage();\r\n\t\t}\r\n\t}",
"private void choosePrompt() {\r\n\t\tfor (int i = 0; i < mustChoose.size(); i++) {\r\n\t\t\tString prompt = \"**[Choose]** \";\r\n\t\t\t// Find the correct text to display\r\n\t\t\tif (mustChoose.get(i).contentEquals(\"Shrine\")) {\r\n\t\t\t\tprompt += \"**1** :moneybag: ~OR~ **1** :heart:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Dragon Shrine\")) {\r\n\t\t\t\tprompt += \"**2** :moneybag: ~OR~ **1** :wastebasket:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Treasure Hunter\")) {\r\n\t\t\t\tprompt += \"a card to replace in the dungeon row (4-9)\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Underworld Dealing\")) {\r\n\t\t\t\tprompt += \"**1** :moneybag: ~OR~ **BUY 2** __Secret Tome__ **FOR 7** :moneybag:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Apothecary\")) {\r\n\t\t\t\tprompt += \"**3** :crossed_swords: **~OR~** **2** :moneybag: **~OR~** **1** :heart:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Mister Whiskers\")) {\r\n\t\t\t\tprompt += \"**Dragon Attack** ~OR~ **-2** :warning:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Wand of Wind\")) {\r\n\t\t\t\tif (GlobalVars.teleportRoomsPerRoom.length > 0) {\r\n\t\t\t\t\tprompt += \"**1** :crystal_ball: ~OR~ Take a **SECRET** from an adjacent room ``\"+\r\n\t\t\t\t\t\tUtils.arrayToString(GlobalVars.adjacentRoomsPerRoom[currentPlayer.getCurrentRoom()])+\" ┃ \"+\r\n\t\t\t\t\t\tUtils.arrayToString(GlobalVars.teleportRoomsPerRoom[currentPlayer.getCurrentRoom()])+\"``\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprompt += \"**1** :crystal_ball: ~OR~ Take a **SECRET** from an adjacent room ``\"+\r\n\t\t\t\t\t\t\tUtils.arrayToString(GlobalVars.adjacentRoomsPerRoom[currentPlayer.getCurrentRoom()])+\"``\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tgameChannel.sendMessage(prompt).queue();\r\n\t\t}\r\n\t}",
"public static void WelcomeMessage () {\n System.out.println(\"===============================================\");\r\n System.out.println(\" C O M P U T E R\");\r\n System.out.println(\" S C I E N C E\");\r\n System.out.println(\" R O U L E T T E\");\r\n System.out.println(\"====================================== v1.2 ===\");\r\n System.out.println();\r\n }",
"public void displayMessage(){\n //getCouseName obtém o nome do curso\n System.out.printf(\"Welcome to the grade book for \\n%s!\\n\\n\", getCouseName());\n }",
"public String checkMessage() {\n\t\tString userLatestStep = questionBot.get(owner.id());\n\n\t\t//se a amensagem comeca com '/', trata-se de um item de menu sendo acionado\n\t\tif(answerUser != null && answerUser.startsWith(\"/\"))\n\t\t\tuserLatestStep = answerUser;\n\n\t\t//busca no mapa de respostas as opcoes para o usuario\n\t\tObject options = response.get(userLatestStep);\n\n\t\t//obtem a mensagem a ser devolvida para o usuario\n\t\tString result = parseResult(options, answerUser);\n\n\t\t//mantem a ultima resposta do usuario\n\t\tuserLatestAnswer.put(owner.id(), answerUser);\n\n\t\treturn result;\n\t}",
"@Override\n\tpublic void msgExitHome() {\n\t\t\n\t}",
"int promptOption(IMenu menu);",
"public static String displayMessage() {\n return \"Press B to open shop menu.\";\n }",
"void Menu();",
"public void winMessage() {\r\n\t\tSystem.out.print(\"\\n\\nCongratulations! You've won the game! :D\");\r\n\t\tSystem.exit(0);\r\n\t}",
"public String getWelcomeScreen(){\n\treturn \"Welcome to Prisoners Dilemma\\n\" +\n\t \"(1) Choose desired payoffs for each player\\n\" +\n\t \"(2) Choose strategies for each player.\";\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id == R.id.action_send) {\n\n\n\n\n\n //Izprashtam Parse message\n SendParsePushMessagesAndParseObjects sendParse =\n new SendParsePushMessagesAndParseObjects();\n\n //zadavame tipa na saobshtenieto, ako ne e zadadeno veche, triabva da e samo text\n if(mMessageType == null) {\n mMessageType = ParseConstants.TYPE_TEXTMESSAGE;\n }\n\n String loveMessage = messageToSend.getText().toString();\n\n\n sendParse.send(ParseUser.getCurrentUser(),parseObjectIDs,parseUserNames,\n mMessageType,loveMessage,mMediaUri, this);\n\n\n //Message sent.Switch to main screen.\n Intent intent = new Intent(SendMessage.this,Main.class);\n //dobaviame flagove, za da ne moze usera da se varne pak kam toya ekran\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n\n }\n\n\n\n return super.onOptionsItemSelected(item);\n }",
"public void loadIntroMessage() {\n\n\t\tmessageToDisplay.add(ArtemisCalendar.getMonthName(ArtemisCalendar.getCalendar().get(2)) + \", \"\n\t\t\t\t+ ArtemisCalendar.getCalendar().get(1) + \".\");\n\n\t\tmessageToDisplay.add(\"NASA have chosen you to help them deliver The Artemis Project successfully.\");\n\t\tmessageToDisplay.add(\"The Project aims to launch the first woman, and next man to the moon by \"\n\t\t\t\t+ ArtemisCalendar.getMonthName(ArtemisCalendar.getEndDate().get(2)) + \", \"\n\t\t\t\t+ ArtemisCalendar.getEndDate().get(1) + \".\");\n\t\tmessageToDisplay.add(\n\t\t\t\t\"In order to accomplish this lofty goal, you must work alongside other chosen companies to ensure 'All Systems are Go!' by launch-day.\");\n\t\tmessageToDisplay.add(\n\t\t\t\t\"Can you work together to research and fully develop all of the systems needed for a successful Lift-off?\");\n\t\tmessageToDisplay.add(\"...or will your team just be in it for personal gain?\");\n\t\tmessageToDisplay.add(\"You decide!\");\n\t\tGameLauncher.displayMessage();\n\t}",
"private void goToMenu() {\n game.setScreen(new MainMenuScreen(game));\n\n }",
"public void confirmacionVolverMenu(){\n AlertDialog.Builder builder = new AlertDialog.Builder(Postre.this);\n builder.setCancelable(false);\n builder.setMessage(\"¿Desea salir?\")\n .setPositiveButton(\"Aceptar\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\t\t\t\t\t\tIntent intent = new Intent(Postre.this, HomeAdmin.class);\n\t\t\t\t\t\tintent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_FORWARD_RESULT);\n\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t\toverridePendingTransition(R.anim.left_in, R.anim.left_out);\t\n }\n })\n .setNegativeButton(\"Cancelar\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n }\n });\n \n builder.show();\n }",
"static void mainMenu()\n {\n clrscr();\n System.out.print(\"\\n\"\n + title()\n + \"Go on, \" + Player.current.name + \", choose away ...\\n\"\n + \"1. Match time!\\n\"\n + \"2. Pokedex pls\\n\"\n + \"3. Show me my stats\\n\"\n + \"4. I suck at life and want to quit\\n\"\n + \"(1/2/3/4): \");\n\n // checks for int input, or routes back to mainMenu()\n int option = input.hasNextInt()? input.nextInt() : mainCallbacks.length - 1;\n\n // just defaults to quit if options > length of array of callbacks (here 5)\n mainCallbacks[Math.min(option, mainCallbacks.length - 1)].call();\n mainMenu();\n }",
"public static boolean menu() throws IOException, InterruptedException {\n\n clearScreen();\n\n System.out.println(\"\\033[1mMenu:\\033[0m\\n\");\n System.out.println(\"\\033[1m1)\\033[0m Ver feed\");\n System.out.println(\"\\033[1m2)\\033[0m Ver tópicos\");\n System.out.println(\"\\033[1m3)\\033[0m Ver mensagens de um tópico\");\n System.out.println(\"\\033[1m4)\\033[0m Procurar tópicos mais ativos\");\n System.out.println(\"\\033[1m5)\\033[0m Subscrever tópico\");\n System.out.println(\"\\033[1m6)\\033[0m Publicar num tópico\");\n System.out.println(\"\\033[1m7)\\033[0m Gerir lista de subscrições\");\n System.out.println(\"\\033[1m8)\\033[0m Ver estatísticas\");\n System.out.println(\"\\033[1m9)\\033[0m Logout\");\n System.out.print(\"\\033[1m>\\033[0m \");\n boolean estado = true;\n Scanner input = new Scanner(System.in);\n int num = input.nextInt();\n\n switch(num){\n case 1: verFeed();\n break;\n case 2: verTopicos();\n break;\n case 3: verMensagens();\n break;\n case 4: topicosMaisUtilizados();\n break;\n case 5: subscreverTopico();\n break;\n case 6: publicarTopico();\n break;\n case 7: gerirSubscricoes();\n break;\n case 8: estatisticas();\n break;\n case 9: System.out.println(\"\\n\\033[3mFinalizando sessão...\\033[0m\");\n TimeUnit.SECONDS.sleep(1);\n estado = menuDeRegisto();\n break;\n default: System.out.println(\"\\033[1mOpção inválida!\\033[0m\");\n TimeUnit.SECONDS.sleep(1);\n clearScreen();\n menu();\n return estado;\n }\n TimeUnit.SECONDS.sleep(3);\n return estado;\n }",
"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 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 }",
"@Override\n public void handleMessage(Message msg) {\n switch (msg.what) {\n case 1:\n //切换到主页面\n allFlipper.setDisplayedChild(1);\n break;\n }\n }",
"public void printVictoryMessage() { //main playing method\r\n System.out.println(\"Congrats \" + name + \" you won!!!\");\r\n }",
"static void menuPrincipal() {\n System.out.println(\n \"\\nPizzaria o Rato que Ri:\" + '\\n' +\n \"1 - Novo pedido\" + '\\n' +\n \"2 - Mostrar pedidos\" + '\\n' +\n \"3 - Alterar estado do pedido\" + '\\n' +\n \"9 - Sair\"\n );\n }",
"public static void presentarMenuPrincipal() {\n\t\tSystem.out.println(\"Ingresa el numero de la opcion deseada y preciona enter\");\n\t\tSystem.out.println(\"1 - Registrar nuevo libro\");\n\t\tSystem.out.println(\"2 - Consultar libros\");\n\t\tSystem.out.println(\"3 - terminar\");\n\t}",
"public void afficherMessage();",
"public static void printWelcomeMsg() {\r\n final int WELCOME_PREPEND_SPACING_COUNT = 23;\r\n CmdUx.printHBars(preLaunchMsg);\r\n CmdUx.print(\"\\n\".repeat(WELCOME_PREPEND_SPACING_COUNT));\r\n CmdUx.print(\"\\nHello from\\n\" + LOGO);\r\n CmdUx.printHBars(WELCOME_MSG);\r\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 msgAtHomePos() {\n\t\t\n\t}",
"@Override\n public void handleMessage(Message msg) {\n String turnDirection = (String) msg.obj;\n\n int distance = 0;\n\n // if there are two or more waypoints to go\n if(navigationPath.size()>=2)\n distance = (int) GeoCalulation.getDistance(navigationPath.get(0), navigationPath.get(1));\n\n navigationInstructionDisplay(turnDirection, distance);\n\n }",
"public void action()\n {\n if(timeout > 0 && timeout < 2)\n {\n timeout = 0;\n agent.removeBehaviour(introNegotiation);\n introNegotiation = null;\n counter = 0;\n\n\n }\n //If this is the very first time getting to this state or if the timeout reset the counter to 0\n if(counter < 1)\n {\n //Clean the list of receivers in case there is something\n if(!receivers.isEmpty())\n receivers.removeAllElements();\n //Calculate the duration of the intro\n calculateDurationIntro();\n //Find a receiver\n findAllReceivers();\n constructACLMessage();\n introNegotiation = new IntroNegotiation(agent,msg);\n introNegotiation.setDataStore(getDataStore());\n agent.addBehaviour(introNegotiation);\n }\n\n\n //Handle where I'm heading to from here.\n switch (steps)\n {\n case 0:\n transition = 29;\n break;\n case 1:\n agent.removeBehaviour(introNegotiation);\n introNegotiation = null;\n transition = 17;\n\n }\n\n\n\n }",
"private String promptLoadOrNew(){\r\n Object[] options = {\"Start A New Game!\", \"Load A Previous Game.\"};\r\n String result = (String) JOptionPane.showInputDialog(\r\n null,\r\n \"What would you like to do?\",\r\n \"Welcome!\",\r\n JOptionPane.PLAIN_MESSAGE,\r\n null,\r\n options,\r\n 1);\r\n return result;\r\n \r\n }"
] | [
"0.66361415",
"0.6492804",
"0.63764083",
"0.6232587",
"0.6215328",
"0.62072027",
"0.6108584",
"0.6099338",
"0.60674876",
"0.603948",
"0.60244644",
"0.6024031",
"0.60120803",
"0.60090226",
"0.59957886",
"0.5985865",
"0.5978322",
"0.595293",
"0.59409225",
"0.58909047",
"0.5887321",
"0.5887001",
"0.5880057",
"0.5872556",
"0.5865327",
"0.5792386",
"0.57900107",
"0.57708675",
"0.5768262",
"0.57545674",
"0.5751879",
"0.5734378",
"0.57312936",
"0.5729914",
"0.57187515",
"0.5709975",
"0.57075536",
"0.5702215",
"0.5699943",
"0.56908906",
"0.56827205",
"0.5680454",
"0.5676363",
"0.56750256",
"0.56664103",
"0.56618977",
"0.56608695",
"0.56542385",
"0.56535333",
"0.56514347",
"0.5645954",
"0.56456196",
"0.56447566",
"0.5644325",
"0.56427294",
"0.56421614",
"0.56389505",
"0.5634419",
"0.5619657",
"0.5618263",
"0.5617887",
"0.5616804",
"0.5612789",
"0.5608198",
"0.5606611",
"0.5593701",
"0.5593217",
"0.55708426",
"0.5563545",
"0.55631584",
"0.5562955",
"0.55585945",
"0.5557973",
"0.5556715",
"0.5553167",
"0.5553146",
"0.5545634",
"0.55393535",
"0.5539284",
"0.5536309",
"0.5535118",
"0.5533909",
"0.5525149",
"0.55196583",
"0.55192655",
"0.5516313",
"0.5504967",
"0.55039185",
"0.5502469",
"0.55018777",
"0.54938924",
"0.549209",
"0.548879",
"0.5487968",
"0.54873264",
"0.54869896",
"0.5483968",
"0.54814476",
"0.547974",
"0.5474455",
"0.54697365"
] | 0.0 | -1 |
START OF RUN METHOD Method to be ran by the runnable which is triggered by the switch statement (entering y) | public void run(){
// Initialized at a lower number just for testing purposes - 2 mins is too long to wait
// OUTPUT MESSAGE - BANK SIMULATION RESULTS
// RUN MAIN IF CONDITION
// IF Timer is equal to time requested to run - change equal value to whatever needed
// THEN print out all recorded results
if(timer == 25){
totalNumCustomers = helped1 + helped2 + helped3 + helped4 + helped5 + bankLine.size();
System.out.println("\n-------------------------------------------------------------------------------\n");
System.out.println(" *** BANK SIMULATION RESULTS *** \n");
System.out.println("\t - Total amount of customers that visited the bank: " + totalNumCustomers + "\n");
System.out.println("\t - Teller #1 helped: " + helped1 + " customers" + "\tTotal occupied time: " + timeSpent1 + " seconds");
System.out.println("\t - Teller #2 helped: " + helped2 + " customers" + "\tTotal occupied time: " + timeSpent2 + " seconds");
System.out.println("\t - Teller #3 helped: " + helped3 + " customers" + "\tTotal occupied time: " + timeSpent3 + " seconds");
System.out.println("\t - Teller #4 helped: " + helped4 + " customers" + "\tTotal occupied time: " + timeSpent4 + " seconds");
System.out.println("\t - Teller #5 helped: " + helped5 + " customers" + "\tTotal occupied time: " + timeSpent5 + " seconds");
System.out.println("\n\t - Total amount of customers that did not get help: " + bankLine.size());
System.out.println("\n-------------------------------------------------------------------------------\n");
System.exit(-1);
// RUN MAIN ELSE CONDITION
} else {
// Random time with teller 2 - 5 seconds
if(randy.nextInt(2) < 6){
int randomTime = (randy.nextInt(5 - 2) + 3);
bankLine.add(randomTime);
}
// BANKER 1------------------------------------------------------------------
while(banker1 == 1){
processTime = timer;
banker1 = 0;
}
if((timer - processTime) >= randTeller[0]){
System.out.println("Teller is now available.");
availableBanker[0] = true; // Teller is now available
}
if(availableBanker[0] == true && bankLine.isEmpty() == false){
timeSpent1 = timeSpent1 + randTeller[0];
randTeller[0] = bankLine.poll();
banker1 = 1;
System.out.println("A customer was served successfully served. (1)");
helped1++;
}
// BANKER 2------------------------------------------------------------------
// This starts the timer until the teller is done with the customer. Then it resets.
while(banker2 == 1){
processTime2 = timer;
banker2 = 0;
}
if((timer - processTime2) >= randTeller[1]){
System.out.println("Teller is now available.");
availableBanker[1] = true; // Teller is now available
}
if(availableBanker[1] == true && bankLine.isEmpty() == false){
timeSpent2 = timeSpent2 + randTeller[1];
randTeller[1] = bankLine.poll();
banker2 = 1;
System.out.println("A customer was served successfully served. (2)");
helped2++;
}
// BANKER 3------------------------------------------------------------------
while(banker3 == 1){
processTime3 = timer;
banker3 = 0;
}
if((timer - processTime3) >= randTeller[2]){
System.out.println("Teller is now available.");
availableBanker[2] = true; // Teller is now available
}
if(availableBanker[2] == true && bankLine.isEmpty() == false){
timeSpent3 = timeSpent3 + randTeller[2];
randTeller[2] = bankLine.poll();
banker3 = 1;
System.out.println("A customer was served successfully served. (3)");
helped3++;
}
// BANKER 4------------------------------------------------------------------
while(banker4 == 1){
processTime4 = timer;
banker3 = 0;
}
if((timer - processTime4) >= randTeller[3]){
System.out.println("Teller is now available.");
availableBanker[3] = true; // Teller is now available
}
if(availableBanker[3] == true && bankLine.isEmpty() == false){
timeSpent4 = timeSpent4 + randTeller[3];
randTeller[3] = bankLine.poll();
banker4 = 1;
System.out.println("A customer was served successfully served. (4)");
helped4++;
}
// BANKER 5------------------------------------------------------------------
while(banker5 == 1){
processTime5 = timer;
banker5 = 0;
}
if((timer - processTime5) >= randTeller[4]){
System.out.println("Teller is now available.");
availableBanker[4] = true; // Teller is now available
}
if(availableBanker[4] == true && bankLine.isEmpty() == false){
timeSpent5 = timeSpent5 + randTeller[4];
randTeller[4] = bankLine.poll();
banker5 = 1;
System.out.println("A customer was served successfully served. (5)");
helped5++;
}
timer++;
} // End of timer == value
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n public void run() {\r\n InputReader reader = new InputReader();\r\n String choice;\r\n do{\r\n System.out.println(\"Please stand still when probe is in you temple.\");\r\n choice = reader.getText(\"Start? Y for yes / N for no\");\r\n } while (!choice.equalsIgnoreCase(\"y\") && !choice.equalsIgnoreCase(\"n\"));\r\n TimeAux.systemSleep(5);\r\n if(choice.equalsIgnoreCase(\"y\")){\r\n runTests();\r\n System.out.println(getInfo());\r\n }\r\n }",
"public static void run(){}",
"public void run(){\n\t}",
"public void run()\r\n\t{\r\n\t\t\r\n\t}",
"public void run()\n\t{\n\t}",
"public void run() {\n\t\t\n\t}",
"public void run() {\n\n\t}",
"public void run() {\n\n\t}",
"public static void run() {\n }",
"@Override\n\tpublic void run()\n\t{\n\t\tswitch (ubiToolType)\n\t\t{\n\t\tcase PUNKT:\n\t\t\tdoPoint();\n\t\t\tbreak;\n\t\tcase KREIS:\n\t\t\tdoCircle();\n\t\t\tbreak;\n\t\tcase LINIE:\n\t\t\tdoLine();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}",
"public void intialRun() {\n }",
"public void run()\n {\n getMenuChoice();\n }",
"public void run()\n\t\t{\n\t\t}",
"public void run() {\n\t}",
"public void run() {\n\t}",
"@Override\r\n\tpublic void runn() {\n\t\t\r\n\t}",
"protected void run() {\r\n\t\t//\r\n\t}",
"boolean run();",
"public void run() {\n\t\t\r\n\t}",
"public void run() {\n\t\t\r\n\t}",
"public void run();",
"public void run();",
"public void run();",
"public void run();",
"public void run();",
"void run();",
"void run();",
"void run();",
"void run();",
"public void run() {\n\t\t}",
"public void run() {\n\t\t}",
"public void run() {\n\t\t}",
"public void run() {\n\t\t\t\t\n\t\t\t}",
"default void run() {\n\t\tSystem.out.println(\"run\");\r\n\t}",
"@Override\r\n\tabstract public void run();",
"public void run() {\r\n }",
"public void run() {\n }",
"@Override\n public void run() {\n System.out.println(\"Inside runnable 1\");\n }",
"public void run() {\n }",
"@Override\n public void run() {\n systemTurn();\n }",
"@Override\n public void run() {\n systemTurn();\n }",
"@Override\n public void run() {\n systemTurn();\n }",
"@Override\n public void run() {\n systemTurn();\n }",
"@Override\n public void run() {\n systemTurn();\n }",
"@Override\n public void run() {\n systemTurn();\n }",
"@Override\n public void run() {\n systemTurn();\n }",
"@Override\n public void run() {\n systemTurn();\n }",
"@Override\n public void run() {\n systemTurn();\n }",
"public void run() {\n\n }",
"public void run () { run (true); }",
"public void run() {\n }",
"public void run() {\n }",
"public void run() {\n }",
"protected void execute() {\n\t\ttimer.start();\n\t\t\n\t\tif(switchSide) {\n\t\t\tswitch(state) {\n\t\t\tcase 0:\n\t\t\t\tdriveToSwitch.start();\n\t\t\t\tstate++;\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tif(!driveToSwitch.isRunning()) {\n\t\t\t\t\tturnTowardsSwitchOrScale.start();\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tstate++;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tif(!turnTowardsSwitchOrScale.isRunning() || timer.get() > 1.5) {\n\t\t\t\t\tturnTowardsSwitchOrScale.cancel();\n\t\t\t\t\tapproachSwitch.start();\n\t\t\t\t\tstate++;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tif(!approachSwitch.isRunning()) {\n\t\t\t\t\t//launchCubeSwitch.start();\n\t\t\t\t\tstate++;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Unexpected state in RightScaleOrSwitch.java State: \" + state);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\telse if(scaleSide) {\n\t\t\tswitch(state) {\n\t\t\tcase 0:\n\t\t\t\tdriveToScale.start();\n\t\t\t\tstate++;\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tif(!driveToScale.isRunning()) {\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tturnTowardsSwitchOrScale.start();\n\t\t\t\t\tstate++;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tif(!turnTowardsSwitchOrScale.isRunning() || timer.get() > 1.5) {\n\t\t\t\t\tturnTowardsSwitchOrScale.cancel();\n\t\t\t\t\tapproachScale.start();\n\t\t\t\t\tstate++;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tif(!approachScale.isRunning()) {\n\t\t\t\t\t//launchCubeScale.start();\n\t\t\t\t\tstate++;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Unexpected state in RightScaleOrSwitch.java State: \" + state);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tcrossLine.start();\n\t\t}\n\t}",
"@Override\n\tpublic void run() {\n\t\tinitMode();\n\t\t\n\t\tdisplayStartMsg();\n\t\t\n\t\tdisplayMsgBeforeRun();\n\t\tint resultGame = runMode();\n\t\t\n\t\tdisplayEndMsg(resultGame);\n\t}",
"public void run() {\n }",
"public abstract void run() ;",
"@Override\n abstract public void run();",
"public abstract void run();",
"public abstract void run();",
"public abstract void run();",
"public void run() {\n }",
"public void run() {\n\t\t\t\t\t\t}",
"public void run() {\n }",
"public void run() {\n }",
"public void run() {\n }",
"public void run() {\n }",
"public void run() {\n\t\tif(y<22)\n\t\t\tgetSoulEater().y+=1;\n\t\telse\n\t\t\tgetSoulEater().y=18;\n\t}",
"@Override\n\tpublic void run() {\n\t\tautomatischDurchAlleRouten();\n\n\t\t\n\t}",
"@Override\n public void run() {\n sensitiva(\"rut\");\n }",
"public void run()\n {\n }",
"public void run()\n {\n }",
"@Override\r\n\tpublic abstract void run();",
"public void run()\n {\n\n }",
"public void run() {\n }",
"public void run() {/* THE CODE HERE IS A THE @OVERRIDE FOR START() METHOD */\n\t}",
"@Override\n\t\tpublic void run() {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void run() {\n\t\t\t\n\t\t}",
"public void run() {\n\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}",
"public void run() {\n }",
"public void run() {\n }",
"public void run() {\n if (!this.DATA_STORE.isShutdown()) {\n switch(clockAction) {\n case \"plusHour\":\n do {\n DATA_STORE.setHourValue(DATA_STORE.getHourValue() + 1);\n defaultStatementsInCase();\n } while(DATA_STORE.isButtonPressed());\n break;\n case \"plusMinute\":\n do {\n DATA_STORE.setMinuteValue(DATA_STORE.getMinuteValue() + 1);\n defaultStatementsInCase();\n } while(DATA_STORE.isButtonPressed());\n break;\n case \"plusSecond\":\n do {\n DATA_STORE.setSecondValue(DATA_STORE.getSecondValue() + 1);\n defaultStatementsInCase();\n } while(DATA_STORE.isButtonPressed());\n break;\n case \"minusHour\":\n do {\n DATA_STORE.setHourValue(DATA_STORE.getHourValue() - 1);\n defaultStatementsInCase();\n } while(DATA_STORE.isButtonPressed());\n break;\n case \"minusMinute\":\n do {\n DATA_STORE.setMinuteValue(DATA_STORE.getMinuteValue() - 1);\n defaultStatementsInCase();\n } while(DATA_STORE.isButtonPressed());\n break;\n case \"minusSecond\":\n do {\n DATA_STORE.setSecondValue(DATA_STORE.getSecondValue() - 1);\n defaultStatementsInCase();\n } while(DATA_STORE.isButtonPressed());\n }\n }\n }",
"@Override\r\n\tpublic void run() {\n\t\tSystem.out.println(\"i am runing\");\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tRun();\n\t}",
"@Override\n public void run()\n {\n char alt;\n\n while((alt = barStub.lookAround()) != 'E')\n {\n switch(alt)\n {\n case 'N':\n tabStub.saluteTheClient();\n break;\n\n case 'O' :\n tabStub.getThePad();\n kitStub.handNoteToTheChef();\n break;\n\n case 'C' :\n do\n {\n kitStub.collectPortion();\n tabStub.deliverPortion();\n } while(!tabStub.haveAllClientsBeenServed());\n break;\n\n case 'P' :\n barStub.prepareTheBill();\n tabStub.presentTheBill();\n break;\n\n case 'G' :\n barStub.sayGoodbye();\n break;\n }\n\n if(alt != 'G') barStub.returnToTheBar();\n }\n }",
"@Override\n\t\tpublic void run() {\n\n\t\t}",
"public final void run() {\r\n }",
"@Override\n\tpublic void run()\n\t{\n\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t\t\t\t\t\t\n\t}",
"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}"
] | [
"0.68425876",
"0.6840338",
"0.6839135",
"0.6833603",
"0.674398",
"0.6700134",
"0.66698146",
"0.66698146",
"0.66624737",
"0.6654949",
"0.66440827",
"0.6634025",
"0.6614256",
"0.6603612",
"0.6603612",
"0.65871906",
"0.65799415",
"0.6570974",
"0.6568961",
"0.6568961",
"0.6562848",
"0.6562848",
"0.6562848",
"0.6562848",
"0.6562848",
"0.65591264",
"0.65591264",
"0.65591264",
"0.65591264",
"0.6546656",
"0.6546656",
"0.6546656",
"0.65220416",
"0.650835",
"0.65031475",
"0.64997745",
"0.6499023",
"0.6497393",
"0.6481992",
"0.6469917",
"0.6469917",
"0.6469917",
"0.6469917",
"0.6469917",
"0.6469917",
"0.6469917",
"0.6469917",
"0.6469917",
"0.646949",
"0.6465694",
"0.64532316",
"0.64532316",
"0.64532316",
"0.645134",
"0.64479285",
"0.64431274",
"0.64424473",
"0.64392596",
"0.64371127",
"0.64371127",
"0.64371127",
"0.6432605",
"0.64199907",
"0.6417596",
"0.6417596",
"0.6417596",
"0.6417596",
"0.6411741",
"0.64013165",
"0.6387935",
"0.638634",
"0.638634",
"0.6375353",
"0.6363912",
"0.6353531",
"0.6349257",
"0.63440406",
"0.63440406",
"0.6337288",
"0.6314635",
"0.6314635",
"0.6309228",
"0.6309228",
"0.6292439",
"0.6279606",
"0.6278994",
"0.6278994",
"0.6278994",
"0.6278994",
"0.6278994",
"0.6278994",
"0.6278994",
"0.6278994",
"0.6278994",
"0.6273999",
"0.62684655",
"0.6267734",
"0.6263701",
"0.62539625",
"0.6248271",
"0.6247791"
] | 0.0 | -1 |
Responds on button clicks and adds todos. | @Override
public void onClick(View view) {
if (title.getText() == null || content.getText() == null) {
Toast.makeText(getActivity(), "Missing fields!", Toast.LENGTH_SHORT).show();
} else {
viewModel.addTodo(new Todo(
title.getText().toString(),
content.getText().toString()
));
title.getText().clear();
content.getText().clear();
Toast.makeText(getActivity(), "Added Todo!", Toast.LENGTH_SHORT).show();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onChanged(@Nullable List<Todo> todos) {\n adapter.submitList(todos);\n }",
"@Override\n public void addTodo(Todo todo) {\n todos.add(todo);\n adapter.notifyDataSetChanged();\n dismissFragment(); //this will remove the dialog from screen\n\n }",
"@Override\n public void onClick(View view) {\n String newItemText = newToDoEditText.getText().toString();\n\n //Make sure some data was entered. Show error Toast and return if not\n if (newItemText.length() == 0) {\n Toast.makeText(MainActivity.this, \"Enter a todo item\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n //Else, create a new ToDoItem from the text, and add to the ArrayAdapter\n ToDoItem newItem = new ToDoItem(newItemText);\n toDoListAdapter.add(newItem);\n\n //And notify the ArrayAdapter that the data set has changed, to request UI update\n toDoListAdapter.notifyDataSetChanged();\n\n //Clear EditText, ready to type in next item\n newToDoEditText.getText().clear();\n }",
"public void addToList(View view) {\n Items newItem = new Items();\n EditText ETNew = (EditText) findViewById(R.id.ETNew);\n newItem.todo = ETNew.getText().toString();\n newItem.done = false;\n helper.create(newItem);\n Toast.makeText(this, \"Item added\", Toast.LENGTH_SHORT).show();\n adaptList2();\n ETNew.setText(\"\");\n ETNew.setHint(\"my new to-do\");\n }",
"private void newTodo() {\r\n String myTodoName = \"Unknown\";\r\n for (Component component : panelSelectFile.getComponents()) {\r\n if (component instanceof JTextField) {\r\n if (component.getName().equals(\"Name\")) {\r\n JTextField textFieldName = (JTextField) component;\r\n myTodoName = textFieldName.getText();\r\n }\r\n }\r\n }\r\n if (myTodoName == null || myTodoName.isEmpty()) {\r\n JOptionPane.showMessageDialog(null, \"New Todo List name not entered!\");\r\n return;\r\n }\r\n myTodo = new MyTodoList(myTodoName);\r\n int reply = JOptionPane.showConfirmDialog(null, \"Do you want to save this todoList?\",\r\n \"Save New Todolist\", JOptionPane.YES_NO_OPTION);\r\n if (reply == JOptionPane.YES_OPTION) {\r\n saveTodo();\r\n }\r\n fileName = null;\r\n todoListGui();\r\n }",
"@FXML\r\n\t\tpublic void addButton(ActionEvent event) {\r\n\t\t\t// get name, notes, and due date from fields\r\n\t\t\tString taskName = name.getText();\r\n\t\t\tString taskNotes = notes.getText();\r\n\t\t\tLocalDate taskDate = date.getValue();\r\n\t\t\t\r\n\t\t\tif (taskName.isEmpty()) {\r\n\t\t\t\t// validate that taskName is not empty\r\n\t\t\t\tnameLabel.setText(\"Must have a name!\");\r\n\t\t\t\tname.setStyle(warningStyle);\r\n\t\t\t} else {\r\n\t\t\t\tnameLabel.setText(\"\");\r\n\t\t\t\tname.setStyle(defaultStyle);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (taskDate == null) {\r\n\t\t\t\t// validate that taskDate is not empty \r\n\t\t\t\tdateLabel.setText(\"Must provide a due date!\");\r\n\t\t\t\tdate.setStyle(warningStyle);\r\n\t\t\t} else {\r\n\t\t\t\tdateLabel.setText(\"\");\r\n\t\t\t\tdate.setStyle(defaultStyle);\r\n\t\t\t}\r\n\t\t\t\n\t\t\tif (taskDate != null && !taskName.isEmpty()) {\r\n\t\t\t\t// if everything is good, make a task\r\n\t\t\t\tGuiBasedApp.addTask(taskName, taskNotes, taskDate);\r\n\t\t\t\t\r\n\t\t\t\t// launch the Home Screen Scene\r\n\t\t\t\tGuiBasedApp.launchHomeScreenScene();\r\n\t\t\t}\r\n\t\t}",
"@Override\n public void onClick(View v) {\n TODO.deleteTodo(todo.getId());\n TODO.saveTodos(context);\n recreate();\n }",
"void showTodoView();",
"public ToDoListApp() {\n runToDoList();\n }",
"private void updateUI() {\n /* Making an array of strings to store tasks entered by the user. */\n ArrayList<String> taskList = new ArrayList<>();\n SQLiteDatabase db = OpenDB.getReadableDatabase();\n Cursor cursor = db.query(AccessData.ToDoEntry.table,\n new String[]{AccessData.ToDoEntry._ID, AccessData.ToDoEntry.todo_title},\n null, null, null, null, null);\n while (cursor.moveToNext()) {\n int idx = cursor.getColumnIndex(AccessData.ToDoEntry.todo_title);\n taskList.add(cursor.getString(idx));\n }\n\n /* Check if array adapter is created. */\n if (listAdapter == null) {\n /* If adapter is not created i.e. NULL, create a new adapter */\n listAdapter = new ArrayAdapter<>(this,\n R.layout.todo_item,\n R.id.task_title,\n taskList);\n /* Set the above created adapter as the todoListView adapter */\n todoListView.setAdapter(listAdapter);\n } else {\n /* If created: it is assigned to the todoListView */\n listAdapter.clear(); // clear it\n listAdapter.addAll(taskList); // re-populate it\n listAdapter.notifyDataSetChanged(); // notify view to refresh with new data values\n }\n\n cursor.close();\n db.close();\n }",
"void addButton_actionPerformed(ActionEvent e) {\n doAdd();\n }",
"@FXML\n void showCompletedTasksClicked(ActionEvent event)\n {\n ObservableList<Item> completedTasks = FXCollections.observableArrayList();\n\n if(showCompletedTasks.isSelected())\n {\n // Have it display in listView\n // First need to remove all the items in listView and then display only completed\n showIncompleteTasks.setSelected(false);\n\n listView.getItems().clear();\n\n // Creating a list with only completed tasks\n createList(true, completedTasks);\n\n listView.refresh();\n }\n\n listView.setItems(completedTasks);\n\n if(!showIncompleteTasks.isSelected())\n {\n // Uncheck the checkbox\n listView.getItems().clear();\n\n // Add all items to the table\n for(Item item : Item.getToDoList())\n {\n listView.getItems().add(Item.getToDoList().get(Item.getToDoList().indexOf(item)));\n }\n\n listView.refresh();\n }\n }",
"private void initializeToDoList() {\r\n // Get all of the notes from the database and create the item list\r\n Cursor c = mDbHelper.fetchAllNotes();\r\n listView = (ListView) findViewById(R.id.listView);\r\n final ListView lv = listView;\r\n startManagingCursor(c);\r\n String[] from = new String[] { DbAdapter.KEY_TITLE, DbAdapter.KEY_BODY, DbAdapter.KEY_REMINDER_AT };\r\n int[] to = new int[] { R.id.firstLineTitle, R.id.secondLineDesc };\r\n // Now create an array adapter and set it to display using our row\r\n SimpleCursorAdapter notes = new SimpleCursorAdapter(this, R.layout.todo_list, c, from, to, CursorAdapter.FLAG_REGISTER_CONTENT_OBSERVER);\r\n lv.setAdapter(notes);\r\n lv.setOnItemClickListener(new OnItemClickListener() {\r\n @Override\r\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\r\n if ( mActionMode == null ) {\r\n SQLiteCursor listItem = (SQLiteCursor)lv.getItemAtPosition(position);\r\n Intent intent = new Intent(MainActivity.this, CreateToDo.class);\r\n Bundle extras = intent.getExtras();\r\n intent.putExtra(DbAdapter.KEY_ID, listItem.getInt(listItem.getColumnIndex(DbAdapter.KEY_ID)));\r\n intent.putExtra(DbAdapter.KEY_TITLE, listItem.getString(listItem.getColumnIndex(DbAdapter.KEY_TITLE)));\r\n intent.putExtra(DbAdapter.KEY_BODY, listItem.getString(listItem.getColumnIndex(DbAdapter.KEY_BODY)));\r\n intent.putExtra(DbAdapter.KEY_REMINDER_AT, listItem.getString(listItem.getColumnIndex(DbAdapter.KEY_REMINDER_AT)));\r\n startActivity(intent);\r\n } else {\r\n toggleViewSelection(view, id, position);\r\n }\r\n }\r\n });\r\n\r\n\r\n lv.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {\r\n @Override\r\n public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {\r\n // Start the CAB using the ActionMode.Callback defined above\r\n mActionMode = MainActivity.this.startActionMode(MainActivity.this);\r\n toggleViewSelection(view, id, position);\r\n return true;\r\n }\r\n });\r\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_todo, container, false);\n mAuth = FirebaseAuth.getInstance();\n mUserId = mAuth.getCurrentUser().getUid();\n firebaseFirestore = FirebaseFirestore.getInstance();\n\n listView = (ListView) view.findViewById(R.id.todo_listview);\n todoButton = (ImageView) view.findViewById(R.id.todo_submit_btn);\n bevitelText = (EditText) view.findViewById(R.id.todo_bevitel);\n todo_list = new ArrayList<>();\n listView.setAdapter(todoAdapter);\n\n // todo lista lekérése az adatbázisból\n\n firebaseFirestore.collection(\"Todo\").addSnapshotListener(new EventListener<QuerySnapshot>() {\n @Override\n public void onEvent(QuerySnapshot documentSnapshots, FirebaseFirestoreException e) {\n if (e != null) {\n Log.e(\"FECO\", \"Hiba \" + e);\n return;\n }\n\n if (!documentSnapshots.isEmpty()) {\n for (DocumentChange doc : documentSnapshots.getDocumentChanges()) {\n if (doc.getType() == DocumentChange.Type.ADDED) {\n\n Boolean keszV = doc.getDocument().getBoolean(\"kesz\");\n String leirasV = doc.getDocument().getString(\"leiras\");\n String docId = doc.getDocument().getId();\n TodoElement todo = new TodoElement(keszV,leirasV, docId);\n todo_list.add(todo);\n todoAdapter.notifyDataSetChanged();\n }\n }\n }\n\n }\n });\n\n\n // todo bepakolása az AB-ba és a lsitába\n\n todoButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n String be = bevitelText.getText().toString().trim();\n if (!TextUtils.isEmpty(be)) {\n Map<String, Object> todoMap = new HashMap<>();\n todoMap.put(\"kesz\", false);\n todoMap.put(\"leiras\", be);\n\n firebaseFirestore.collection(\"Todo\").add(todoMap);\n bevitelText.setText(\"\");\n bevitelText.setHint(\"írj újat\");\n\n }\n }\n });\n\n return view;\n }",
"public void navigateAddNewToDoPage() throws Exception {\n getLogger().info(\"Run createToDoPage()\");\n waitForClickableOfElement(createToDoBtnEle, \"create todo button.\");\n clickElement(createToDoBtnEle, \"click to createToDoBtnEle\");\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n\n Button addBtn = (Button)findViewById(R.id.add);\n addBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(getBaseContext(), AddNewTask.class);\n startActivity(intent);\n }\n });\n\n note_Singleton Notes = note_Singleton.getInstance(this);\n final ListView listView = (ListView) findViewById(R.id.listV_main);\n\n listView.setAdapter(new ItemListBaseAdapter(this, Notes.getItems()));\n ((BaseAdapter) listView.getAdapter()).notifyDataSetChanged();\n }",
"public void addToDo() {\n\n ToDoDBContract.ToDoListDbHelper dbHelper = new ToDoDBContract.ToDoListDbHelper(context);\n\n String name = et_name.getText().toString(); // gets the name the user has entered in the et_name edit text\n\n // If the name is null or empty, alert the user that they must enter a name\n if (name.equals(null) || name.equals(\"\")) {\n Log.d(\"ERROR\", \"name is not valid\", null);\n AlertDialog alertDialog = new AlertDialog.Builder(context)\n .setMessage(R.string.dialog_message_input_error_name)\n .setTitle(R.string.dialog_title_input_error_name)\n .setPositiveButton(\"Ok!\", null).create();\n alertDialog.show();\n } else {\n // If the name was NOT null or empty, create a new ToDoItem with the valid to-do name entered by the user\n ToDoItem addToDo = new ToDoItem(name);\n String note = et_note.getText().toString();\n\n // Get the other inputs from the use and make sure they are not null or invalid\n // If not null or invalid, set the ToDoItem's instance variables to the corresponding inputs\n if (!note.equals(null) || !note.equals(\"\")) {\n addToDo.setNote(note);\n }\n if (dueDateDate != null) {\n if (dueDateDate.getTime() > 0)\n addToDo.setDueDate(dueDateDate);\n } else {\n addToDo.setDueDate(null);\n }\n if (alarmDate != null) {\n if (alarmDate.getTimeInMillis() > 0)\n addToDo.setAlarmDate(new Date(alarmDate.getTimeInMillis()));\n } else {\n alarmDate = null;\n addToDo.setAlarmDate(null);\n }\n dbHelper.insertNewToDo(addToDo); // add the to-do to the database\n\n // If the user set a valid alarm, schedule it.\n if (alarmDate != null && alarmDate.getTimeInMillis() > 0) {\n int alarmID = dbHelper.getID(addToDo);\n Intent intent = new Intent(context, ToDoAlarmReceiver.class);\n intent.putExtra(\"ToDoName\", name);\n intent.putExtra(\"AlarmID\", alarmID);\n Log.d(TAG, \"alarm id = \" + alarmID);\n AlarmManager alarm = (AlarmManager) getContext().getSystemService(Context.ALARM_SERVICE);\n PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 0, intent, 0);\n alarm.setExactAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, alarmDate.getTimeInMillis(), pendingIntent);\n }\n\n // Make a toast confirming that the to do has been added and redirect back to the ToDoFragment\n Toast.makeText(context, \"To do \\\"\" + name + \"\\\" added\", Toast.LENGTH_LONG).show();\n ToDoFragment newFragment = new ToDoFragment();\n FragmentTransaction transaction = getFragmentManager().beginTransaction();\n transaction.replace(R.id.fragment_container, newFragment);\n transaction.addToBackStack(null);\n transaction.commit();\n }\n }",
"public void onAddTaskButtonPressed(View view) {\n\t\tString taskName = taskNameField.getText().toString();\n\t\tif (taskName.equals(\"\"))\n\t\t\treturn;\n\t\ttaskNameField.setText(\"\");\n\t\ttodoList.addTask(taskName);\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);\n setSupportActionBar(toolbar);\n\n toDoListTitlesTemp = new ArrayList<String>();\n setViews();\n\n if(isFirstRun) {\n setToDoLists();\n isFirstRun = false;\n\n }\n\n\n setToDoListTitles();\n\n mAdapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, toDoListTitlesTemp);\n mListView.setAdapter(mAdapter);\n\n\n\n// FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);\n// fab.setOnClickListener(new View.OnClickListener() {\n// @Override\n// public void onClick(View view) {\n// //Snackbar.make(view, \"Replace with your own action\", Snackbar.LENGTH_LONG)\n// //.setAction(\"Action\", null).show();\n// String newList = newListTitle.getText().toString();\n//\n// if (newList.length() > 0) {\n// Toast.makeText(MainActivity.this, \"Let's make a new list called \" + newList, Toast.LENGTH_SHORT).show();\n// ArrayList<String> newListArray = new ArrayList<String>();\n// newListArray.add(newList);\n// myList.add(newListArray);\n// startOneListAndItemsActivity(myList.size() - 1);\n// } else {\n// Toast.makeText(MainActivity.this, \"enter a list title\", Toast.LENGTH_SHORT).show();\n// }\n// }\n// });\n\n\n addNewList.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n String newList = newListTitle.getText().toString();\n\n if (newList.length() > 0) {\n Toast.makeText(MainActivity.this, \"Let's make a new list called \" + newList, Toast.LENGTH_SHORT).show();\n ArrayList<String> newListArray = new ArrayList<String>();\n newListArray.add(newList);\n myList.add(newListArray);\n startOneListAndItemsActivity(myList.size() - 1);\n } else {\n Toast.makeText(MainActivity.this, \"enter a list title\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n\n mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Toast.makeText(MainActivity.this, \"entering the \" + parent.getAdapter().getItem(position) + \" list\", Toast.LENGTH_SHORT).show();\n startOneListAndItemsActivity(position);\n\n }\n });\n\n mListView.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {\n @Override\n public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {\n startEditExistingTextActivity(position);\n return true;\n }\n });\n }",
"public static void ManageTodoList (int option, List <String> todoItems){\n switch (option){\n case (1):\n addtolist(todoItems);\n break;\n case (2):\n showlist(todoItems);\n break;\n case (3):\n clearlist(todoItems);\n break;\n case (4):\n deleteitem(todoItems);\n break;\n default:\n System.out.println (\"Error\");\n }\n }",
"private void openToDoList(Object categoryDAO, Object toDoDAO) {\r\n System.out.println();\r\n GuiToDoEditCategoriesImpl.getInstance().getCategoryController().getCategory()\r\n .setCategoriyDAO((CategoryDAO) categoryDAO);\r\n gtm.updateToDosAndCategories();\r\n GuiToDoEditCategoriesImpl.getInstance().updateList();\r\n gtm = new GuiToDoMainImpl((ToDoDAO) toDoDAO);\r\n gtm.updateToDosAndCategories();\r\n gtm.updateList();\r\n newFile = false;\r\n }",
"public void createNewList(ActionEvent actionEvent) {\n // ideally again, this would have its own window\n // give it a title, and optionally populate it with some items\n }",
"public void startToDoList(View view) {\n\n startActivity(new Intent(this, toDoNewList.class));\n }",
"@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tString description = descriptionField.getText();\n\t\t\tlistPanel.addTask(new Task(description));\n\t\t}",
"public void insertToDoList(Context context, String title) {\n\n // insert in to database\n ToDoListDbHelper toDoListDbHelper = new ToDoListDbHelper(context);\n long listId = toDoListDbHelper.insert(title);\n\n // insert into list of lists\n ToDoList toDoList = new ToDoList(listId, title);\n toDoListList.add(toDoList);\n\n }",
"@FXML\n void addTaskClicked(ActionEvent event)\n {\n createTask();\n }",
"@PostMapping(\"/addToDoItem\")\n\tpublic String addToDoItem(@ModelAttribute(\"toDoListForm\") ToDoList toDoListForm) {\n\n\t\tloggedUser = userService.findLoggedUser(); // Access the logged user.\n\n\t\ttoDoListForm.setUser(loggedUser);\n\n\t\ttoDoListForm.setLastUpdate(getDateTime());\n\n\t\ttoDoListService.save(toDoListForm); // Save a new to do list\n\n\t\treturn \"redirect:/welcome\";\n\t}",
"public void addItemsToList(ArrayList<Todo> toDosToBeAdded, String fromListName){\n\t\tInteger lastItemIndex = toDosToBeAdded.size() - 1;\n\t\tfor (int i = lastItemIndex; i >= 0; i--){\n\n\t\t\tTodo todo = toDosToBeAdded.get(i);\n\t\t\t// if the todo is coming from the todolist we\n\t\t\t// we need to set it as an archived to do.\n\t\t\t// otherwise its come from the archive and\n\t\t\t// needs to be unarchived.\n\t\t\tif (fromListName == \"TODOLIST\"){\n\t\t\t\ttodo.setArchived(true);\n\t\t\t} else if (fromListName == \"ARCHIVEDTODOLIST\") { \n\t\t\t\ttodo.setArchived(false);\n\t\t\t} else {\n\t\t\t\t// this is a little akward I know\n\t\t\t\t// if the to do is coming from the input text\n\t\t\t\t// box setArchive does not need to be set\n\t\t\t\t// so we pass in an empty string to dodge the above\n\t\t\t\t// conditions\n\t\t\t}\n\t\t\tmTodos.add(0, todo);\n\t\t\tmAdapter.notifyDataSetChanged();\t\t\n\t\t}\n\t\t// update the save file\n\t\tDataLoader dataLoader = new DataLoader(getActivity(), \"TO_DO_DATA\");\n\t\tdataLoader.setData(mKeyNameForToDoList, mTodos);\n\t}",
"public ArrayList<Libro> recuperaTodos();",
"@FXML\n public void buttonAddItem(ActionEvent actionEvent) {\n //adds a list item to the table\n }",
"public ToDoPanel() {\n this.setLayout(new BorderLayout());\n this.text = ResourceBundle.getBundle((\"i18n/todoStrings\"));\n\n taskList = new JPanel(new GridLayout(0, 1, 10, 10));\n buttonPanel = new JPanel();\n\n newTaskButton = new JButton(text.getString(\"newTaskString\"));\n newTaskButton.setPreferredSize(new Dimension(300, 100));\n buttonPanel.add(newTaskButton);\n\n ToDoPanelButtonListener listenerNewTask = new ToDoPanelButtonListener(this);\n newTaskButton.addActionListener(listenerNewTask);\n\n this.add(taskList, BorderLayout.CENTER);\n this.add(buttonPanel, BorderLayout.SOUTH);\n }",
"public void addButton(ActionEvent event) {\n\t\tString daysOfWeek = \"\";\n\t\tif (sundayCheck.isSelected()) {\n\t\t\tif (daysOfWeek.equals(\"\")) daysOfWeek += \"Sunday\";\n\t\t\telse daysOfWeek += \", Sunday\";\n\t\t}\n\t\tif (mondayCheck.isSelected()) {\n\t\t\tif (daysOfWeek.equals(\"\")) daysOfWeek += \"Monday\";\n\t\t\telse daysOfWeek += \", Monday\";\n\t\t}\n\t\tif (tuesdayCheck.isSelected()) {\n\t\t\tif (daysOfWeek.equals(\"\")) daysOfWeek += \"Tuesday\";\n\t\t\telse daysOfWeek += \", Tuesday\";\n\t\t}\n\t\tif (wednesdayCheck.isSelected()) {\n\t\t\tif (daysOfWeek.equals(\"\")) daysOfWeek += \"Wednesday\";\n\t\t\telse daysOfWeek += \", Wednesday\";\n\t\t}\n\t\tif (thursdayCheck.isSelected()) {\n\t\t\tif (daysOfWeek.equals(\"\")) daysOfWeek += \"Thursday\";\n\t\t\telse daysOfWeek += \", Thursday\";\n\t\t}\n\t\tif (fridayCheck.isSelected()) {\n\t\t\tif (daysOfWeek.equals(\"\")) daysOfWeek += \"Friday\";\n\t\t\telse daysOfWeek += \", Friday\";\n\t\t}\n\t\tif (saturdayCheck.isSelected()) {\n\t\t\tif (daysOfWeek.equals(\"\")) daysOfWeek += \"Saturday\";\n\t\t\telse daysOfWeek += \", Saturday\";\n\t\t}\n\t\t\n\t\t// Make the proper string for the medication and then add it to the medList\n\t\tString tempFullDay = daysOfWeek + \" - \" + hourDropDown.getValue() + \":\" + minuteDropDown.getValue() + \":00\";\n\t\tmedList.add(new Medication(nameField.getText(), tempFullDay, descriptionField.getText()));\n\t\t//upcomingMedsLabel.setText(upcomingMedsLabel.getText() + \"\\n\\n\" + medList.get(medList.size() - 1).toString());\n\t\t//calls the save method to save the new medication to the txt file\n\t\tsave(tempFullDay);\n\t\tload();\n\t}",
"@Override\n\tpublic void showCompletedTodo() {\n\n\t}",
"@FXML\n void showIncompleteTasksClicked(ActionEvent event)\n {\n ObservableList<Item> incompleteTasks = FXCollections.observableArrayList();\n\n if(showIncompleteTasks.isSelected())\n {\n // Have it display in listView\n // First need to remove all the items in listView and then display only incomplete\n showCompletedTasks.setSelected(false);\n\n listView.getItems().clear();\n\n createList(false, incompleteTasks);\n\n listView.refresh();\n }\n\n listView.setItems(incompleteTasks);\n\n if(!showIncompleteTasks.isSelected())\n {\n // Uncheck the checkbox\n listView.getItems().clear();\n\n // Add all items to the table\n for(Item item : Item.getToDoList())\n {\n listView.getItems().add(Item.getToDoList().get(Item.getToDoList().indexOf(item)));\n }\n\n listView.refresh();\n }\n }",
"public ToDoListApp() {\n jsonWriter = new JsonWriter(JSON_STORE);\n jsonReader = new JsonReader(JSON_STORE);\n toDoList = new ToDoList(\"To-Do List\");\n// runToDoList();\n }",
"public AddList() {\n setTitleText(\"Add new List\");\n addButton = new JButton(\"Add\");\n addButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent actionEvent) {\n addButtonActionPerformed(actionEvent);\n }\n });\n addButton(addButton);\n }",
"public void addTodoModule(){\n final Dialog dialog = new Dialog(context);\n dialog.setContentView(R.layout.add_todomodule);\n dialog.setTitle(R.string.name_module_todo);\n\n Button cancel = (Button) dialog.findViewById(R.id.cancel);\n cancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n }\n });\n\n Button validate = (Button) dialog.findViewById(R.id.validatenewmodule);\n validate.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n TodoModuleService service = TodoModuleAPI.getInstance();\n service.addTodoModule(event.getId(),new Callback<Response>() {\n @Override\n public void success(Response s, Response response) {\n Toast.makeText(AddModule.this, \"Le module a bien été ajouté!\", Toast.LENGTH_SHORT).show();\n finish();\n }\n\n @Override\n public void failure(RetrofitError error) {\n error.printStackTrace();\n finish();\n }\n });\n dialog.dismiss();\n }\n });\n\n dialog.show();\n }",
"public void selectTDList(ActionEvent actionEvent) {\n // we will have to update the viewer so that it is displaying the list that was just selected\n // it will go something like...\n // grab the list that was clicked by the button (again, using the relationship between buttons and lists)\n // and then displayTODOs(list)\n }",
"void onAddClicked();",
"public void onButtonClicked(View view) {\n\n Button botonTodos=(Button)findViewById(R.id.todos);\n EditText campoNombre = (EditText)findViewById(R.id.tiendaobjetos_edtNombre);\n\n //hacemos un clear del campo 'Nombre'\n campoNombre.setText(\"\");\n\n // Comprobar que ha sido clickado el boton 'Ver todos'\n switch(view.getId()) {\n case R.id.todos:\n\n //Cambiamos la imagen del boton 'Ver todos' en funcion de su estado\n botonTodos.setBackgroundResource(R.drawable.selector_boton);\n\n //Ponemos el where que selecciona todos los objetos\n selection = null;\n\n //Refrescamos el loader con la nueva consulta\n getLoaderManager().restartLoader(OBJETOS_LOADER, null, this);\n\n break;\n }\n }",
"public void addToDo() throws StringIndexOutOfBoundsException {\n System.out.println(LINEBAR);\n try {\n String taskDescription = userIn.substring(TODO_HEADER);\n ToDo todo = new ToDo(taskDescription);\n tasks.add(todo);\n storage.writeToFile(todo);\n ui.echoUserInput(todo, tasks.taskIndex);\n } catch (StringIndexOutOfBoundsException e) {\n ui.printStringIndexOOB();\n }\n System.out.println(LINEBAR);\n }",
"@Override\n public void addhandler(final ToDoPresenter.Display.EventHandler handler) {\n\n // The TodoMVC project template has a markup / style that is not compatible with the markup\n // generated by the GWT CheckBox control. For this reason, here we are using an InputElement\n // directly. As a result, we handle low-level DOM events rather than the GWT higher level\n // abstractions, e.g. ClickHandlers. A typical GWT application would not do this, however,\n // this nicely illustrates how you can develop GWT applications\n // that program directly against the DOM.\n final com.google.gwt.dom.client.Element clientToggleElement = toggleAll.cast();\n DOM.sinkEvents(clientToggleElement, Event.ONCLICK);\n DOM.setEventListener(clientToggleElement, new EventListener() {\n @Override\n public void onBrowserEvent(Event event) {\n handler.markAllCompleted(toggleAll.isChecked());\n }\n });\n\n taskText.addKeyUpHandler(new KeyUpHandler() {\n @Override\n public void onKeyUp(KeyUpEvent event) {\n if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {\n handler.addTask();\n }\n }\n });\n\n clearCompleted.addClickHandler(new ClickHandler() {\n @Override\n public void onClick(ClickEvent event) {\n handler.clearCompletedTasks();\n }\n });\n }",
"public void setUpListeners(ListView listView) {\n\n // On a long press; display a confirmation dialog box which calls removeTask on yes\n // and does nothing on no.\n listView.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {\n @Override\n public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {\n final ToDoTask toRemove = adapter.getItem(position);\n\n new AlertDialog.Builder(List.this)\n .setTitle(getResources().getString(R.string.list_remove_dialog_title))\n .setMessage(String.format(getResources().getString(R.string.list_remove_dialog_message),\n toRemove.getTask()))\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n removeTask(toRemove);\n }\n }).setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // Do nothing\n }\n }).show();\n\n return true;\n }\n });\n\n // On a normal press; check the task off.\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n database.toggleDone(adapter.getItem(position));\n }\n });\n\n // When the enter is pressed on the keyboard; add the task in the edittext field.\n final EditText field = (EditText) findViewById(R.id.list_edittext);\n field.setOnEditorActionListener(new TextView.OnEditorActionListener() {\n @Override\n public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\n if (actionId == EditorInfo.IME_ACTION_DONE) {\n addTask(findViewById(R.id.list_button));\n return true;\n } else {\n return false;\n }\n }\n });\n }",
"@Override\n public void execute(TaskList tasks, Storage storage, Ui ui) throws IOException {\n Todo toAdd = new Todo(description, false);\n tasks.addTask(toAdd);\n storage.writeToData(toAdd, tasks.getNumberOfTasks());\n ui.acknowledgeAddCommand(toAdd, tasks.getNumberOfTasks());\n }",
"private void setUpFooter(){\n JButton newItem = new JButton();\n JTextField name = new JTextField();\n DatePicker date = new DatePicker();\n ColorPicker priority = ColorPicker.createColorPicker(4,Color.RED);\n newItem.setText(\"+\");\n newItem.addActionListener(e -> {\n Tasks tasks = new Tasks();\n JPanel list = this.getPanelForList();\n boolean allFiled = true;\n if(!name.getText().isEmpty()) {\n tasks.setName(name.getText());\n name.setText(null);\n }else {\n this.emptyTextFieldPopUp(\"name\");\n allFiled = false;\n }\n if(!date.getDate().isEmpty()) {\n tasks.setDeadline(DateHandler.getDateFromString(date.getDate()));\n date.resetDate();\n }else {\n this.emptyTextFieldPopUp(\"deadline\");\n allFiled = false;\n }\n tasks.setPriority(ColorPriorityHandler.getPriority(priority.getColor()));\n tasks.setItems_id(currentList);\n tasks.setStatus(0);\n JPanel taskList = (JPanel)((JViewport)((JScrollPane)list.getComponent(1)).getComponent(0)).getComponent(0);\n if(allFiled) {\n this.addTask(taskList,tasks);\n priority.setColor(currentList.getColor());\n }\n });\n footer.setLayout(new GridLayout(2,4));\n footer.add(new JLabel(\"Add new\"));\n footer.add(new JLabel(\"Name:\"));\n footer.add(new JLabel(\"Date:\"));\n footer.add(new JLabel(\"Priority:\"));\n footer.add(newItem);\n footer.add(name);\n footer.add(date);\n footer.add(priority);\n }",
"@Override\n public void onClick(View v) {\n addUpdateNotes();\n }",
"public void mostrarTodo() {\n if (formListado != null) {\n formListado.dispose();\n }\n formListado = new FormListado();\n formListado.cargarTodo();\n formListado.setVisible(true);\n }",
"public void addNewToDo(String description) {\n Todo todo = new Todo(description);\n taskList.add(todo);\n printSuccessfulAddMessage(todo.toString());\n }",
"@Override\n\tpublic void showActiveTodo() {\n\n\t}",
"public void addUserBtn(){\n\t\t\n\t\t// TODO: ERROR CHECK\n\t\t\n\t\tUserEntry user = new UserEntry(nameTF.getText(), (String)usertypeCB.getValue(), emailTF.getText());\n\t\tAdminController.userEntryList.add(user);\n\t\t\n\t\t\n\t\t// Create a UserEntry and add it to the observable list\n\t\tAdminController.userList.add(user);\t\t\n\t\t\n\t //AdminController.adminTV.setItems(AdminController.userList);\n\t\t\n\t\t//Close current stage\n\t\tAdminController.addUserStage.close();\n\t\t\n\t}",
"public Task addTodo(String specifications) throws DukeException {\n Task newTask = new ToDo(specifications);\n tasks.add(newTask);\n return newTask;\n }",
"public void addNewItemClicked(View view) {\n// Toast.makeText(CheckboxNoteActivity.this, \"RelativeLayout Clicked Successfully\", Toast.LENGTH_SHORT).show();\n addNewListItem();\n }",
"public void populateListView(ArrayList<TodoData> todos) {\n ListView listView = findViewById(R.id.search_listview);\n TodoListAdapter adapter = new TodoListAdapter(this, todos);\n listView.setAdapter(adapter);\n }",
"@Override\n public void onClick(View arg0) {\n\n\n listView.setAdapter(urgentTodosAdapter);\n urgentTodosAdapter.loadObjects();\n\n Toast.makeText(getApplication(), \"แสดงรายการ\"+dayofmonth,\n Toast.LENGTH_SHORT).show();\n\n\n }",
"void setTodos(ArrayList<Task> tasks);",
"@OnKeyword(value = \"get todolist\")\n\tpublic void getTodoList(TeamchatAPI api) throws Exception {\n\t\tif (isBasecampnotPresent(api)) {\n\t\t\treturn;\n\t\t}\n\t\t// populating with project name list\n\t\tField f = api.objects().select().name(\"project\").label(\"Project\");\n\t\tfor (Project project : bah.getActiveProjects()) {\n\t\t\tf.addOption(project.getName() + \" | \" + project.getId());\n\t\t}\n\t\t// api.perform(api\n\t\t// .context()\n\t\t// .currentRoom()\n\t\t// .post(new PrimaryChatlet()\n\t\t// .setQuestion(\"Get todolists from a project\")\n\t\t// .setDetailsLabel(\"Comments\")\n\t\t// .showDetails(true)\n\t\t// .setReplyScreen(api.objects().form().addField(f))\n\t\t// .setReplyLabel(\"Select Project\")\n\t\t// .alias(\"get_todo_list2\")));//.setReplyLabel(\"Comment\")\n\t\tapi.perform(api\n\t\t\t\t.context()\n\t\t\t\t.currentRoom()\n\t\t\t\t.post(new PrimaryChatlet()\n\t\t\t\t\t\t.setQuestion(\"Get todolists from a project\")\n\t\t\t\t\t\t.setReplyScreen(api.objects().form().addField(f))\n\t\t\t\t\t\t.setReplyLabel(\"Select Project\")\n\t\t\t\t\t\t.alias(\"get_todo_list2\")));\n\t}",
"public void buttonSaveList(ActionEvent actionEvent) {\n }",
"private void syncListFromTodo() {\r\n DefaultListModel<String> dlm = new DefaultListModel<>();\r\n for (Task task : myTodo.getTodo().values()) {\r\n if (!task.isComplete() || showCompleted) {\r\n String display = String.format(\"%1s DueDate: %10s %s %3s\", task.getName(), task.getDueDate(),\r\n task.isComplete() ? \" Completed!\" : \" Not Completed\", task.getPriority());\r\n dlm.addElement(display);\r\n list.setFont(new Font(\"TimesRoman\", Font.PLAIN, 15));\r\n }\r\n }\r\n list.setModel(dlm);\r\n }",
"private void addTodoMenu(User u,Scanner sc) {\n\t\t\n\t\tSystem.out.println(\"Title:\");\n\t\tString title = sc.nextLine();\n\t\t\n\t\tSystem.out.println(\"Description: \");\n\t\tString description = sc.nextLine();\n\t\t\n\t\t\n\t\tTodo todo = new Todo();\n\t\ttodo.setTitle(title);\n\t\ttodo.setDescription(description);\n\t\ttodo.setComplete(false);\n\t\t\n\t\tboolean success = todoService.insertTodo(todo);\n\t\t\n\t\tUser u = auth.getUser(u.getUsername());\n\t\t\n\t\t\n\t}",
"public void readToDos(Context context) {\n ToDoListDbHelper dbHelper = new ToDoListDbHelper(context);\n dbHelper.readAll(toDoListList);\n }",
"private void addToTodoTaskGui(JLabel createLabelName, JLabel createLabelDescription,\r\n JLabel createLabelDueDate, JLabel createLabelPriority) {\r\n panelTask.add(createLabelName);\r\n panelTask.add(createLabelDescription);\r\n panelTask.add(createLabelDueDate);\r\n panelTask.add(createLabelPriority);\r\n panelTask.add(textFieldDueDate);\r\n\r\n panelTask.add(textFieldName);\r\n panelTask.add(textFieldDescription);\r\n panelTask.add(textFieldDueDate);\r\n panelTask.add(comboPriority);\r\n\r\n }",
"public void onClick(View view) {\n @SuppressWarnings(\"unchecked\")\n ArrayAdapter<Comment> adapter = (ArrayAdapter<Comment>) getListAdapter();\n Comment comment = null;\n switch (view.getId()) {\n// case R.id.add:\n// //TODO\n// Intent intent = new Intent(TestDatabaseActivity.this, MainActivity.class);\n// startActivity(intent);\n//\n// // save the new comment to the database\n// comment = datasource.createComment(MainActivity.theResult);\n// adapter.add(comment);\n// break;\n case R.id.delete:\n if (getListAdapter().getCount() > 0) {\n comment = (Comment) getListAdapter().getItem(0);\n datasource.deleteComment(comment);\n adapter.remove(comment);\n }\n break;\n case R.id.menu:\n Intent intent2 = new Intent(TestDatabaseActivity.this, MainMenuActivity.class);\n finish();\n\n overridePendingTransition(0, 0);\n startActivity(intent2);\n break;\n }\n adapter.notifyDataSetChanged();\n }",
"void addButton_actionPerformed(ActionEvent e) {\n addButton();\n }",
"@Override\r\n\t\tpublic void onClick(View v) {\n\t\t\t\t\r\n\t\t\tli.add(auto.getText().toString());\r\n\t\t\tauto.setText(null);\r\n\t\t\t\r\n\t\t\tadd();\r\n\t\t\t\r\n\t\t\tToast.makeText(getBaseContext(), \"Item Added\",\r\n\t\t\t\tToast.LENGTH_SHORT).show();\r\n\t\t}",
"public void addToList() {\n addToCurrentListButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n //getting the variables from the user input\n String address = enterAddress.getText();\n String issue = enterAddress.getText();\n String model = enterModel.getText();\n //date method\n Date date = new Date();\n //creating a quick CentralAC list\n CentralAC acEntry = new CentralAC(address, issue, date, model);\n //adding items to the Arraylist\n HVACGUI.newCentralAC.add(acEntry);\n //adding items to the default list model\n HVACGUI.openService.addElement(acEntry);\n //disposing the form\n CentralAC_GUI.this.dispose();\n\n\n }\n });\n }",
"@Override\n public void onClick(View view) {\n Intent intent = new Intent(ToDoManagerActivity.this, AddToDoActivity.class);\n startActivityForResult(intent,ADD_TODO_ITEM_REQUEST);\n }",
"public AddRandomList() {\n setTitleText(\"Add new random List\");\n\n addButton.setText(\"Add\");\n addButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n addButtonActionPerformed(evt);\n }\n });\n addButton(addButton);\n }",
"public void btnAddClicked(View view){\n List list = new List(input.getText().toString());\n dbHandler.addProduct(list);\n printDatabase();\n }",
"private void listControllerAdd(TextField fNameText, TextField lNameText, TextField phoneText, TextField emailText,\n\t\t\tTableView<Person> table, ObservableList<Person> tableData, Button add)\n\t{\n\t\tadd.setOnAction(e ->\n\t\t{\n\t\t\tString firstName = fNameText.getText();\n\t\t\tString lastName = lNameText.getText();\n\t\t\tString phone = phoneText.getText();\n\t\t\tString email = emailText.getText();\n\n\t\t\tFirstName firstNameObj;\n\t\t\tLastName lastNameObj;\n\t\t\tPhone phoneObj;\n\t\t\tEmail emailObj;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tfirstNameObj = new FirstName(firstName);\n\t\t\t\tlastNameObj = new LastName(lastName);\n\t\t\t\tphoneObj = new Phone(phone);\n\t\t\t\temailObj = new Email(email);\n\n\t\t\t\tif (firstNameObj.isValidName(firstName) && lastNameObj.isValidName(lastName)\n\t\t\t\t\t\t&& phoneObj.isValidPhone(phone) && emailObj.isValidEmail(email))\n\t\t\t\t{\n\t\t\t\t\ttableData.add(new Person(firstNameObj, lastNameObj, phoneObj, emailObj));\n\t\t\t\t\tfNameText.clear();\n\t\t\t\t\tlNameText.clear();\n\t\t\t\t\tphoneText.clear();\n\t\t\t\t\temailText.clear();\n\t\t\t\t}\n\t\t\t} catch (BadInput e1)\n\t\t\t{\n\t\t\t\tAlert dialog = new Alert(Alert.AlertType.ERROR);\n\t\t\t\tdialog.setHeaderText(null);\n\t\t\t\tdialog.setContentText(e1.getMessage());\n\t\t\t\tdialog.showAndWait();\n\t\t\t}\n\n\t\t});\n\n\t}",
"public void saveToDoList() {\n try {\n jsonWriter.open();\n jsonWriter.write(toDoList);\n jsonWriter.close();\n\n System.out.println(\"Saved \" + toDoList.getName() + \" to \" + JSON_STORE);\n } catch (FileNotFoundException e) {\n System.out.println(\"Unable to write to file: \" + JSON_STORE);\n }\n }",
"@GetMapping\n\tpublic String getTodoList(Model model) {\n\t\tList<String> list = new ArrayList<>();\n\t\tlist.add(\"Empezar curso de JavaScript\");\n\t\tlist.add(\"Realizar curso de creacion de SPA, AJAX, JSON, RESTAPI\");\n\t\tlist.add(\"Hacer ejercicio tres veces a la semana\");\n\t\t\n\t\tmodel.addAttribute(\"todolist\", list);\n\t\treturn \"todolist\";\n\t}",
"@Override\n public void updateTodo(Todo todo) {\n todos.set(currentEditPosition, todo);\n adapter.notifyDataSetChanged();\n dismissFragment(); //this will remove the dialog from screen\n\n }",
"private void setupToDoPanel() {\n\t\tpnlToDo = new JPanel(new GridBagLayout());\n\t\tgc.fill = GridBagConstraints.HORIZONTAL;\n\t\tgc.anchor = GridBagConstraints.CENTER;\n\t\tgc.insets = new Insets(10, 10, 10, 10);\n\t\tgc.gridx = 0;\n\t\tfor (int i = 0; i < txtTodo.size(); i++) {\n\t\t\tgc.gridy = i;\n\t\t\tpnlToDo.add(txtTodo.get(i), gc);\n\t\t}\n\t\tgc.gridx = 1;\n\t\tfor (int i = 0; i < check.size(); i++) {\n\t\t\tgc.gridy = i;\n\t\t\tpnlToDo.add(check.get(i), gc);\n\t\t}\n\t\tscroll = new JScrollPane(pnlToDo);\n\n\t\tpnlButton = new JPanel();\n\t\tpnlButton.setLayout(new BoxLayout(pnlButton, BoxLayout.X_AXIS));\n\t\tpnlButton.add(Box.createHorizontalGlue());\n\t\tpnlButton.add(btnAddTask);\n\t\tpnlButton.add(Box.createRigidArea(new Dimension(5, 0)));\n\t\tpnlButton.add(btnSave);\n\t\tpnlButton.add(Box.createHorizontalGlue());\n\t}",
"public void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\t// set up the contextual action bar so multiple items in the\n\t\t// list of todos can be selected and acted on at the same time.\n\t\tgetListView().setChoiceMode(ListView.CHOICE_MODE_MULTIPLE_MODAL);\n getListView().setOnItemLongClickListener(new OnItemLongClickListener() {\n\n @Override\n public boolean onItemLongClick(AdapterView<?> parent, View view,\n int position, long id) {\n ((ListView) parent).setItemChecked(position,\n ((ListView) parent).isItemChecked(position));\n return false;\n }\n });\n \n // Set the listener to see multiple list items selected at the same\n // time and perform actions based on the users selection choice.\n getListView().setMultiChoiceModeListener(new MultiChoiceModeListener() {\n\n private int nr = 0;\n \n @Override\n public boolean onCreateActionMode(ActionMode mode, Menu menu) {\n getActivity().getMenuInflater().inflate(mMenuId,\n menu);\n return true;\n }\n\n @Override\n public boolean onPrepareActionMode(ActionMode mode, Menu menu) {\n return false;\n }\n\n @Override\n public boolean onActionItemClicked(ActionMode mode, MenuItem item) {\n switch (item.getItemId()) {\n // heres where we handle all the button clicks in the contextual action bar.\n case R.id.delete:\n\t\t\t\t\tdeleteSelectedItems();\t\t\t\t\n \tmode.finish();\n break; \n case R.id.archive:\n \tarchiveSelectedItems();\n \tmode.finish();\n \tbreak; \n case R.id.unarchive:\n \t\tarchiveSelectedItems();\n \t\tmode.finish();\n \t\tbreak; \t\t\n case R.id.archived_delete:\n\t\t\t\t\tdeleteSelectedItems();\t\t\t\t\n\t\t\t\t\tmode.finish();\n\t\t\t\t\tbreak;\n\n }\n return false;\n }\n\n @Override\n public void onDestroyActionMode(ActionMode mode) {\n nr = 0;\n }\n\n @Override\n public void onItemCheckedStateChanged(ActionMode mode,\n int position, long id, boolean checked) {\n if (checked) {\n nr++;\n } else {\n nr--;\n }\n mode.setTitle(nr + \" todos selected!\");\n }\n }); \n\t}",
"private void onDoneClicked() {\n\n// if(flag == 1)\n// {\n if (items.size() > 0) {\n\n\n //insertion method\n String title = mEtTitle.getText().toString();\n String itemString = RemainderItems.convertItemsListToString(items);\n RemainderItems notes = new RemainderItems();\n\n notes.title = title;\n notes.items = itemString;\n\n dbhelper.insertDataToDatabase(notes, dbhelper.getWritableDatabase());\n\n Toast.makeText(CheckboxNoteActivity.this, \"Retrieved Item Size = \" + retrievedItems.size(), Toast.LENGTH_SHORT).show();\n }\n\n // }\n\n// else{\n// String title = mEtTitle.getText().toString();\n// String content = mEtNotes.getText().toString();\n// RemainderItems newContent = new RemainderItems();\n// newContent.title = title;\n// newContent.items = content;\n// notedbhelper.insertNote(newContent,notedbhelper.getWritableDatabase());\n// }\n\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (resultCode == RESULT_OK && requestCode == REQUEST_CODE) {\n // Extract name value from result extras\n String description = data.getExtras().getString(\"todo_description\");\n Todo todo = new Todo(description);\n // Toast the name to display temporarily on screen\n //Toast.makeText(this, name, Toast.LENGTH_SHORT).show();\n todos.add(todo);\n }\n }",
"private void acceptListener() {\n addDialog.getAccept().addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n try {\n Task newTask = new Task(addDialog.getTaskName().getText(), addDialog.getTaskDesc().getText(),\n Integer.parseInt(addDialog.getTaskDate().getText()));\n toDoList.addTask(newTask);\n } catch (NumberFormatException | InvalidTitleException a) {\n addDialog.dispose();\n }\n addDialog.dispose();\n refresh();\n }\n });\n }",
"public void createTask() {\n \tSystem.out.println(\"Inside createTask()\");\n \tTask task = Helper.inputTask(\"Please enter task details\");\n \t\n \ttoDoList.add(task);\n \tSystem.out.println(toDoList);\n }",
"private void makePanelList() {\r\n if (panelList == null) {\r\n panelList = makePanel(jframe, BorderLayout.CENTER,\r\n \"List of Tasks\", 180, 50, 200, 25);\r\n list = makeList(10, 10, 100, 470, 500);\r\n\r\n JButton clickUpdate = makeButton(\"updateTask\", \"Update\",\r\n 20, 620, 100, 25, JComponent.CENTER_ALIGNMENT, \"cli.wav\");\r\n\r\n JButton clickDelete = makeButton(\"deleteTask\", \"Delete\",\r\n 125, 620, 100, 25, JComponent.CENTER_ALIGNMENT, null);\r\n\r\n JButton clickComplete = makeButton(\"completeTask\", \"Complete\",\r\n 230, 620, 100, 25, JComponent.CENTER_ALIGNMENT, null);\r\n\r\n JButton clickIncomplete = makeButton(\"IncompleteTask\", \"UndoComplete\",\r\n 335, 620, 130, 25, JComponent.CENTER_ALIGNMENT, \"cli.wav\");\r\n\r\n JButton clickCreate = makeButton(\"newTask\", \"Create A Task\",\r\n 175, 670, 150, 25, JComponent.CENTER_ALIGNMENT, \"cli.wav\");\r\n\r\n JButton showComplete = makeButton(\"showComplete\", \"Show Completed\",\r\n 175, 700, 150, 25, JComponent.CENTER_ALIGNMENT, \"cli.wav\");\r\n showComplete.getModel().setPressed(showCompleted);\r\n\r\n JButton clickSave = makeButton(\"saveTodo\", \"Save List\",\r\n 175, 730, 150, 25, JComponent.CENTER_ALIGNMENT, \"cli.wav\");\r\n\r\n addElementsToPanelList(list, clickUpdate, clickDelete, clickComplete, clickIncomplete, clickCreate,\r\n showComplete, clickSave);\r\n }\r\n }",
"private void doAddTask() {\n System.out.println(\n \"Kindly enter the time, description and date of the task you would like to add on separate lines.\");\n String time = input.nextLine();\n String description = input.nextLine();\n String date = input.nextLine();\n todoList.addTask(new Task(time,description,date));\n System.out.println(time + \" \" + description + \" \" + date + \" \" + \"has been added.\");\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.action_add_task:\n final EditText taskEditText = new EditText(this);\n /* Adding an alert dialog box to get task from the user when the 'Add' button of menu item is clicked */\n AlertDialog dialog = new AlertDialog.Builder(this)\n .setTitle(\"Make a To-Do\")\n .setMessage(\"What would you like to add?\")\n .setView(taskEditText)\n .setPositiveButton(\"Add\", new DialogInterface.OnClickListener() {\n /* Getting input from user when 'Add' button is clicked. And, storing it inside database */\n @Override\n public void onClick(DialogInterface dialog, int which) {\n String task = String.valueOf(taskEditText.getText());\n SQLiteDatabase db = OpenDB.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(AccessData.ToDoEntry.todo_title, task);\n db.insertWithOnConflict(AccessData.ToDoEntry.table,\n null,\n values,\n SQLiteDatabase.CONFLICT_REPLACE);\n db.close();\n updateUI(); /* Updating the todo list with new changes made to the database, and displaying it on screen. */\n }\n })\n .setNegativeButton(\"Cancel\", null)\n .create();\n dialog.show();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@FXML\r\n\tpublic void addToShoppingCart() {\r\n\t\t\r\n\t\tWatch w = listView.getSelectionModel().getSelectedItem();\r\n\t\tboolean add = controller.addWatchToShoppingCart(w);\r\n\t\tcontroller.deleteWishlistItem(w.getId());\r\n\t\tlistView.setItems(controller.getWishlistWatchesForCurrentUser());\r\n\t\tlistView.getSelectionModel().select(-1);\r\n\t\tcheckSelected();\r\n\t}",
"private void todoListGui() {\r\n panelSelectFile.setVisible(false);\r\n if (panelTask != null) {\r\n panelTask.setVisible(false);\r\n }\r\n\r\n makePanelList();\r\n syncListFromTodo();\r\n\r\n jframe.setTitle(myTodo.getName());\r\n panelList.setBackground(Color.ORANGE);\r\n panelList.setVisible(true);\r\n }",
"public void addTask(View view) {\n // Model of the list data\n ListModel model = ListModel.getInstance();\n\n // String for the date in \"mm/dd/yyyy\" format\n String date;\n\n // Get the name of the task\n EditText text = (EditText) findViewById(R.id.taskInput);\n String taskName = text.getText().toString();\n\n // Add list to model\n model.addTask(listName, taskName);\n\n\n // Return to the single list activity\n Log.i(TAG, \"Creating intent to return to the single list activity\");\n Intent intent = new Intent(this, SingleListActivity.class);\n intent.putExtra(Extra.LIST, listName);\n Log.i(TAG, \"Intent created with extra message (list name).\");\n Log.i(TAG, \"Starting single list activity\");\n startActivity(intent);\n }",
"@Override\n public String execute() throws DukeCommandException {\n try {\n ToDo toDo = taskManager.addToDo(this.desc);\n Storage.saveTasks(taskManager.getTasks());\n return ui.constructAddMessage(toDo, taskManager.getTasksSize());\n } catch (DukeException e) {\n throw new DukeCommandException(\"todo\", desc, e.getMessage());\n }\n }",
"private void todoChooserGui() {\r\n jframe = makeFrame(\"My Todo List\", 500, 800, JFrame.EXIT_ON_CLOSE);\r\n panelSelectFile = makePanel(jframe, BorderLayout.CENTER,\r\n \"Choose a Todo\", 150, 50, 200, 25);\r\n JButton clickRetrieve = makeButton(\"retrieveTodo\", \"Retrieve A TodoList\",\r\n 175, 100, 150, 25, JComponent.CENTER_ALIGNMENT, \"cli.wav\");\r\n panelSelectFile.add(clickRetrieve);\r\n JTextField textFieldName = makeJTextField(1, 100, 150, 150, 25);\r\n textFieldName.setName(\"Name\");\r\n panelSelectFile.add(textFieldName);\r\n JButton clickNew = makeButton(\"newTodo\", \"Make New TodoList\",\r\n 250, 150, 150, 25, JComponent.CENTER_ALIGNMENT, \"cli.wav\");\r\n panelSelectFile.add(clickNew);\r\n panelSelectFile.setBackground(Color.WHITE);\r\n jframe.setBackground(Color.PINK);\r\n jframe.setVisible(true);\r\n }",
"public static void main(String[] args) {\n\t\tDisplay display = new Display();\n\t\tShell shell = new Shell(display);\n\n\t\t/* Create Layout and set it as the Shell layout */\n\t\t GridLayout gridLayout = new GridLayout(2, false);\t\n\t\t shell.setLayout(gridLayout);\n\n\t\t/* Add Text widget for input of new items */\n\t\t Text textWidget = new Text(shell, SWT.BORDER);\n\n\t\t/* Create and add GridData for the Text widget */\n\t\t GridData gridData = new GridData();\n\t\t gridData.horizontalAlignment = GridData.FILL;\n\t\t gridData.grabExcessHorizontalSpace = true;\n\t\t textWidget.setLayoutData(gridData);\n\n\t\t/* \n\t\t * Add a Label next to the Text widget\n\t\t * that explains how to add items to the list\n\t\t */\n\t\t Label label = new Label(shell, SWT.NONE);\n\t\t label.setText(\"Press Enter to add the item to the list\");\n\n\t\t/* Create and add GridData for instructions Label */\n\t\t gridData = new GridData();\n\t\t gridData.horizontalAlignment = GridData.FILL;\n\t\t label.setLayoutData(gridData);\n\n\t\t/* Create the List widget to display the todo list */\n\t\t List list = new List(shell, 0);\n\t\t \n\t\t\n\t\t/* Create and add GridData for the List */\n\t\t gridData = new GridData();\n\t\t gridData.grabExcessVerticalSpace = true;\n\t\t gridData.grabExcessHorizontalSpace = true;\n\t\t gridData.horizontalAlignment = GridData.FILL;\n\t\t gridData.verticalAlignment = GridData.FILL;\n\t\t gridData.horizontalSpan = 2;\n\t\t list.setLayoutData(gridData);\n\t\t\n\t\t/* Create a Button to remove items from the List */\n\t\t Button removeButton = new Button(shell, 0);\n\t\t removeButton.setText(\"Remove Item\");\n\t\t\n\t\t/* Create and add GridData for the Button */\n\t\t gridData = new GridData();\n\t\t gridData.horizontalAlignment = GridData.FILL;\n\t\t removeButton.setLayoutData(gridData);\n\t\t\n\t\t/* Create a Label which instructs the user how to delete one or more items */\n\t\t Label removeLabel = new Label(shell, 0);\n\t\t removeLabel.setText(\"Select item and click remove to delete it\");\n\t\t\n\t\t/* Add listener(s) for the Text input widget */\n\t\t textWidget.addSelectionListener(new SelectionAdapter() {\n\t\t\t public void widgetDefaultSelected(SelectionEvent e) {\n\t\t\t\t String newText = textWidget.getText();\n\t\t\t\t list.add(newText);\n\t\t\t\t textWidget.setText(\"\");\n\t\t\t }\n\t\t });\n\t\t \n\t\t/* Add listener(s) for the remove Button widget */\n\t\t removeButton.addMouseListener(MouseListener.mouseDownAdapter(e -> {\n\t\t\t int selectedIndex = list.getSelectionIndex();\n\t\t\t if (selectedIndex != -1) {\n\t\t\t\t list.remove(selectedIndex);\n\t\t\t }\n\t\t }));\n\t\t\n\t\t/* Set the Shell to an appropriate size and open it */\n\t\t shell.setSize(500, 500);\n\t\t shell.open();\n\t\t\n\t\t// Main loop\n\t\twhile (!shell.isDisposed()) {\n\t\t\tif (!display.readAndDispatch()) {\n\t\t\t\tdisplay.sleep();\n\t\t\t}\n\t\t}\n\t\tdisplay.dispose();\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_agenda);\n ButterKnife.bind(this);\n\n Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);\n setSupportActionBar(toolbar);\n\n Intent i = getIntent();\n Bundle b = i.getExtras();\n if(b != null) {\n contato = (Contato) b.get(\"contato\");\n }\n\n lista = SQLite.select().from(Contato.class).queryList();\n\n CustomAdapter customAdapter = new CustomAdapter(lista, getApplicationContext());\n\n listview.setAdapter(customAdapter);\n\n\n FloatingActionButton fabadd = (FloatingActionButton) findViewById(R.id.fabadd);\n fabadd.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent i = new Intent(getBaseContext(), Concatofull.class);\n startActivity(i);\n\n }\n });\n\n FloatingActionButton fabedit = (FloatingActionButton) findViewById(R.id.fabedit);\n fabedit.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Snackbar.make(view, \"Selecione para editar.\", Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n action = 2;\n\n\n }\n });\n\n FloatingActionButton fabdelet = (FloatingActionButton) findViewById(R.id.fabdelet);\n fabdelet.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Snackbar.make(view, \"Selecione para deletar.\", Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n action = 3;\n\n\n }\n });\n\n\n listview.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n if (action == 2) {\n Intent i = new Intent(getBaseContext(), Concatofull.class);\n i.putExtra(\"contato\",lista.get(position));\n startActivity(i);\n } else if (action == 3) {\n lista.get(position).delete();\n }\n\n atualizaLista();\n }\n });\n // ATTENTION: This was auto-generated to implement the App Indexing API.\n // See https://g.co/AppIndexing/AndroidStudio for more information.\n }",
"@Override\r\n\tpublic List<Conta> RecuperTodos() {\n\t\treturn null;\r\n\t}",
"public void addTodoItem(TodoItem item) {\n todoItems.add(item);\n }",
"@Override\n public void deleteTodo(final int position) {\n new AlertDialog.Builder(this)\n .setIcon(R.drawable.ic_warning_red_24dp)\n .setTitle(R.string.delete_todo_title)\n .setMessage(getString(R.string.delete_body_message)\n + todos.get(position).getTitle() + \"'\")\n .setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n todos.remove(position);\n Toast.makeText(MainActivity.this, \"Deleted\", Toast.LENGTH_SHORT).show();\n adapter.notifyDataSetChanged();\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n }).show();\n }",
"@Override\n public void onClick(View view) {\n //Reads the text that was passed by the user in the EditText and saves it to the notesArrayList.\n String noteText = String.valueOf(noteEditText.getText());\n allNotes.addNote(noteText);\n //Sets the content of the EditText to empty.\n noteEditText.setText(\"\");\n //Gets user back to MainActivity using Intent.\n Intent getBackIntent = new Intent(AddNoteActivity.this,\n MainActivity.class);\n startActivity(getBackIntent);\n }",
"public void onButtonActionEvent(com.codename1.ui.events.ActionEvent ev) {\n new ListEvent().show();\n }",
"public static void testAddTodoView(){\n }",
"private void switchBetweenAddEdit() {\n String uid = getIntent().getStringExtra(NOTE_UID);\n if (uid != null) {\n\n Objects.requireNonNull(getSupportActionBar()).setTitle(R.string.edit_note);\n\n Note note = Arrays.stream(firebase.getNotes().getValue()).filter(note1 -> uid.equals(note1.getUid())).findFirst().get();\n\n Calendar cal = Calendar.getInstance();\n cal.setTime(note.getDate());\n\n date.init(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), cal.get(Calendar.DAY_OF_MONTH), null);\n title.setText(note.getTitle());\n body.setText(note.getBody());\n\n addBtn.setVisibility(View.GONE);\n editBtnsLyot.setVisibility(View.VISIBLE);\n\n saveBtn.setOnClickListener(view -> {\n prepareNote(note1 -> {\n note1.setUid(uid);\n setNoteOnFirebaseManager(note1, true);\n });\n });\n\n deleteBtn.setOnClickListener(view -> {\n deleteNoteOnFirebaseManager(note);\n });\n }\n\n addBtn.setOnClickListener(view -> {\n prepareNote(note -> {\n setNoteOnFirebaseManager(note, false);\n });\n });\n }",
"public void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tEditText taskText = (EditText) findViewById(R.id.edit_task);\t//create the text field\n\t\t\t\tTask newTask = new Task(taskText.getText().toString());\t\t\t//save the text of the task\n\t\t\t\tarrayTaskList myArray = arrayTaskList.getInstance();\n\t\t\t\tmyArray.addNewTask(newTask);\t\t\t\t\t\t\t\t\t//add the new task to the list\t\t\t\t\n\t\t\t\tfinish();\n\t\t\t}",
"private void addNewCoursesOnClick(){\n dataSource.open();\n dataSource.createCourses(editTextCourses.getText().toString(),editTextTeacher.getText().toString(),editTextWhen.getText().toString(),editTextWhere.getText().toString(),editTextGrading.getText().toString(),editTextOther.getText().toString());\n dataSource.close();\n CoursesListElement courses = new CoursesListElement(editTextCourses.getText().toString(),editTextTeacher.getText().toString(),editTextWhen.getText().toString(),editTextWhere.getText().toString(),editTextGrading.getText().toString(),editTextOther.getText().toString(),0);\n listElements.add(courses);\n // setting list adapter\n listView.setAdapter(new ActionListAdapter(getActivity(),R.id.list_courses, listElements));\n newCourses.setVisibility(View.GONE);\n editTextCourses.setText(\"\");\n editTextTeacher.setText(\"\");\n editTextWhen.setText(\"\");\n editTextWhere.setText(\"\");\n editTextGrading.setText(\"\");\n editTextOther.setText(\"\");\n }",
"public void removerTodos() {\n\t\t\n\t}",
"private static void openToDoListWindow() {\n\t\n // Create a window for app\n frame = new JFrame(AppConst.UI_CONST.APP_NAME);\n frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n panel = new JPanel();\n panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));\n panel.setOpaque(true);\n \n // Create text area to display message to users\n ButtonListener buttonListener = new ButtonListener();\n output = new JTextArea(windowHeight, windowWidth);\n output.setBackground(Color.white);\n output.setForeground(Color.black);\n output.setLineWrap(true);\n output.setWrapStyleWord(true);\n output.setEditable(false);\n \n table = mTableHelper.getTable();\n\t\t// Create scroll bar if table area is full \n JScrollPane scroller = new JScrollPane(table);\n scroller.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);\n scroller.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);\n table.setFillsViewportHeight(true);\n\n\t\t// Create scroll bar if text area is full\n JScrollPane scroller2 = new JScrollPane(output);\n scroller.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);\n scroller.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);\n \n // Create input panel to get user's command\n JPanel inputpanel = new JPanel();\n inputpanel.setLayout(new FlowLayout());\n input = new JTextField(windowWidth);\n input.setBackground(Color.white);\n input.setForeground(Color.red);\n input.setCaretColor(Color.blue);\n input.setActionCommand(AppConst.UI_CONST.ENTER); \n input.addActionListener(buttonListener);\n input.addKeyListener(new KeyAdapter() {\n public void keyPressed(KeyEvent evt) {\n panelKeyPressAction(evt);\n }\n });\n \n // Added the table box, display message box and the input to the panel\n DefaultCaret caret = (DefaultCaret) output.getCaret();\n caret.setUpdatePolicy(DefaultCaret.ALWAYS_UPDATE);\n panel.add(scroller);\n panel.add(scroller2);\n inputpanel.add(input);\n panel.add(inputpanel);\n \n frame.getContentPane().add(BorderLayout.CENTER, panel);\n frame.pack();\n frame.setLocationByPlatform(true);\n frame.setVisible(true);\n frame.setResizable(false);\n \n input.requestFocus();\n userCommandCount = 0;\n displayMessage(AppConst.UI_CONST.COMMAND_MESSAGE);\n }",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tif (!Utilities.checkLogin(req.getSession())) {\n\t\t\tresp.sendRedirect(\"Login.jsp\");\n\t\t\treturn;\n\t\t}\n\n\t\tString itemId = req.getParameter(\"itemId\");\n\t\tString title = req.getParameter(\"title\");\n\t\tString description = req.getParameter(\"description\");\n\n\t\tToDoListService todoListService = new ToDoListService();\n\t\tItem item = Utilities.getItemById(Integer.valueOf(itemId));\n\t\titem.setTitle(title);\n\t\titem.setDescription(description);\n\t\ttodoListService.updateItem(item);\n\n\t\tresp.sendRedirect(\"TodoListController\");\n\t}"
] | [
"0.6495515",
"0.63455194",
"0.62010264",
"0.61273485",
"0.60885906",
"0.60438436",
"0.6006898",
"0.59635407",
"0.5961368",
"0.5942943",
"0.58411556",
"0.5833771",
"0.5814564",
"0.580214",
"0.57982427",
"0.5793632",
"0.57784057",
"0.5758251",
"0.5719869",
"0.5698682",
"0.5693504",
"0.5690641",
"0.56892306",
"0.5678593",
"0.565492",
"0.56534827",
"0.5651235",
"0.56442267",
"0.5642026",
"0.562923",
"0.561885",
"0.56160134",
"0.56100684",
"0.56093425",
"0.56069654",
"0.5581205",
"0.557693",
"0.55706954",
"0.5549201",
"0.553998",
"0.5535397",
"0.55324775",
"0.5531241",
"0.55142325",
"0.5513862",
"0.55053204",
"0.5481763",
"0.5461642",
"0.54544985",
"0.5438531",
"0.5428926",
"0.5412453",
"0.5411316",
"0.5410259",
"0.5407401",
"0.5406744",
"0.54040354",
"0.5398985",
"0.5391982",
"0.53917223",
"0.5388479",
"0.536948",
"0.5365459",
"0.535968",
"0.53565276",
"0.53556967",
"0.5350751",
"0.53505796",
"0.5345563",
"0.5345282",
"0.5342942",
"0.53384525",
"0.53381664",
"0.5335691",
"0.5334509",
"0.53232145",
"0.5311702",
"0.53067696",
"0.52927876",
"0.5284155",
"0.5281894",
"0.528147",
"0.52784115",
"0.52753633",
"0.5271309",
"0.5269881",
"0.52680236",
"0.5264734",
"0.5262587",
"0.52601075",
"0.5258662",
"0.5257424",
"0.52526283",
"0.52505356",
"0.52469254",
"0.52458036",
"0.524046",
"0.5236911",
"0.52351004",
"0.52324253"
] | 0.58982366 | 10 |
Creates new form VistaCrearPedidoAbonado | public VistaCrearPedidoAbonado() {
initComponents();
errorLabel.setVisible(false);
controlador = new CtrlVistaCrearPedidoAbonado(this);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void crearVehiculo() {\n\t\t\r\n\t}",
"public CrearPedidos() {\n initComponents();\n }",
"public creacionempresa() {\n initComponents();\n mostrardatos();\n }",
"public CrearQuedadaVista() {\n }",
"public void crearEntidad() throws EntidadNotFoundException {\r\n\t\tif (validarCampos(getNewEntidad())) {\r\n\t\t\tif (validarNomNitRepetidoEntidad(getNewEntidad())) {\r\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null,\r\n\t\t\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_WARN, \"Advertencia: \", \"Nombre, Nit o Prejifo ya existe en GIA\"));\r\n\t\t\t} else {\r\n\t\t\t\tif (entidadController.crearEntidad(getNewEntidad())) {\r\n\t\t\t\t\tmensajeGrow(\"Entidad Creada Satisfactoriamente\", getNewEntidad());\r\n\t\t\t\t\tRequestContext.getCurrentInstance().execute(\"PF('entCrearDialog').hide()\");\r\n\t\t\t\t\tsetNewEntidad(new EntidadDTO());\r\n\t\t\t\t\tresetCodigoBUA();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmensajeGrow(\"Entidad No Fue Creada\", getNewEntidad());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tlistarEntidades();\r\n\t\t\t// newEntidad = new EntidadDTO();\r\n\t\t\t// fechaActual();\r\n\t\t}\r\n\r\n\t}",
"public String crea() {\n c.setId(0);\n clienteDAO.crea(c); \n //Post-Redirect-Get\n return \"visualiza?faces-redirect=true&id=\"+c.getId();\n }",
"Compuesta createCompuesta();",
"@RequestMapping(value = \"/create\", method = RequestMethod.POST)\n public ModelAndView create(@RequestParam(\"horasalida\") Date horasalida,@RequestParam(\"horallegada\") Date horallegada,@RequestParam(\"aeropuerto_idaeropuerto\") Long aeropuerto_idaeropuerto,\n \t\t@RequestParam(\"aeropuerto_idaeropuerto2\") Long aeropuerto_idaeropuerto2,@RequestParam(\"avion_idavion\") Long avion_idavion) {\n Vuelo post=new Vuelo();\n post.setHorallegada(horallegada);\n post.setHorasalida(horasalida);\n\t\t\n post.setAeropuerto_idaeropuerto(aeropuerto_idaeropuerto);\n post.setAeropuerto_idaeropuerto2(aeropuerto_idaeropuerto2);\n post.setAvion_idavion(avion_idavion);\n repository.save(post);\n return new ModelAndView(\"redirect:/vuelos\");\n }",
"public void CrearNew(ActionEvent e) {\n List<Pensum> R = ejbFacade.existePensumID(super.getSelected().getIdpensum());\n if(R.isEmpty()){\n super.saveNew(e);\n }else{\n new Auxiliares().setMsj(3,\"PENSUM ID YA EXISTE\");\n }\n }",
"@Override\r\n\tprotected void agregarObjeto() {\r\n\t\t// opcion 1 es agregar nuevo justificativo\r\n\t\tthis.setTitle(\"PROCESOS - PERMISOS INDIVIDUALES (AGREGANDO)\");\r\n\t\tthis.opcion = 1;\r\n\t\tactivarFormulario();\r\n\t\tlimpiarTabla();\r\n\t\tthis.panelBotones.habilitar();\r\n\t}",
"@Command\n\tpublic void nuevoAnalista(){\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\n\n\t\t//parametros.put(\"recordMode\", \"NEW\");\n\t\tllamarFormulario(\"formularioAnalistas.zul\", null);\n\t}",
"@GetMapping(value = \"/create\") // https://localhost:8080/etiquetasTipoDisenio/create\n\tpublic String create(Model model) {\n\t\tetiquetasTipoDisenio etiquetasTipoDisenio = new etiquetasTipoDisenio();\n\t\tmodel.addAttribute(\"title\", \"Registro de una nuev entrega\");\n\t\tmodel.addAttribute(\"etiquetasTipoDisenio\", etiquetasTipoDisenio); // similar al ViewBag\n\t\treturn \"etiquetasTipoDisenio/form\"; // la ubicacion de la vista\n\t}",
"BeanPedido crearPedido(BeanCrearPedido pedido);",
"public void createAgendamento() {\n\n if (tbagendamento.getTmdataagendamento().after(TimeControl.getDateIni())) {\n if (agendamentoLogic.createTbagendamento(tbagendamento)) {\n AbstractFacesContextUtils.redirectPage(PagesUrl.URL_AGENDAMENTO_LIST);\n AbstractFacesContextUtils.addMessageInfo(\"Agendamento cadastrado com sucesso.\");\n } else {\n AbstractFacesContextUtils.addMessageWarn(\"Falhar ao realizado cadastro do agendamento.\");\n }\n } else {\n AbstractFacesContextUtils.addMessageWarn(\"verifique se a data de agendamento esta correta.\");\n }\n }",
"public String nuevo() {\n\n\t\tLOG.info(\"Submitado formulario, accion nuevo\");\n\t\tString view = \"/alumno/form\";\n\n\t\t// las validaciones son correctas, por lo cual los datos del formulario estan en\n\t\t// el atributo alumno\n\n\t\t// TODO simular index de la bbdd\n\t\tint id = this.alumnos.size();\n\t\tthis.alumno.setId(id);\n\n\t\tLOG.debug(\"alumno: \" + this.alumno);\n\n\t\t// TODO comprobar edad y fecha\n\n\t\talumnos.add(alumno);\n\t\tview = VIEW_LISTADO;\n\t\tmockAlumno();\n\n\t\t// mensaje flash\n\t\tFacesContext facesContext = FacesContext.getCurrentInstance();\n\t\tExternalContext externalContext = facesContext.getExternalContext();\n\t\texternalContext.getFlash().put(\"alertTipo\", \"success\");\n\t\texternalContext.getFlash().put(\"alertMensaje\", \"Alumno \" + this.alumno.getNombre() + \" creado con exito\");\n\n\t\treturn view + \"?faces-redirect=true\";\n\t}",
"@Override\n public ComprobanteContable createComprobante(\n Aerolinea a, Boleto boleto, Cliente cliente, String tipo) throws CRUDException {\n Optional op;\n ComprobanteContable comprobante = new ComprobanteContable();\n //ComprobanteContablePK pk = new ComprobanteContablePK();\n //pk.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n comprobante.setEstado(ComprobanteContable.EMITIDO);\n //comprobante.setComprobanteContablePK(pk);\n //creamos el concepto\n StringBuilder buff = new StringBuilder();\n\n // DESCRIPCION \n // AEROLINEA/ # Boleto / Pasajero / Rutas\n buff.append(a.getNumero());\n\n buff.append(\"/\");\n\n //numero boleto\n buff.append(\"#\");\n buff.append(boleto.getNumero());\n buff.append(\"/\");\n\n //Pasajero\n buff.append(boleto.getNombrePasajero().toUpperCase());\n\n // Rutas\n buff.append(\"/\");\n buff.append(boleto.getIdRuta1() != null ? boleto.getIdRuta1() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta2() != null ? boleto.getIdRuta2() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta3() != null ? boleto.getIdRuta3() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta4() != null ? boleto.getIdRuta4() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta5() != null ? boleto.getIdRuta5() : \"\");\n\n //jala el nombre cliente\n comprobante.setIdCliente(cliente);\n comprobante.setConcepto(buff.toString());\n comprobante.setFactorCambiario(boleto.getFactorCambiario());\n comprobante.setFecha(boleto.getFechaEmision());\n comprobante.setFechaInsert(boleto.getFechaInsert());\n comprobante.setIdEmpresa(boleto.getIdEmpresa());\n comprobante.setIdUsuarioCreador(boleto.getIdUsuarioCreador());\n comprobante.setTipo(tipo);\n\n //ComprobanteContablePK numero = getNextComprobantePK(boleto.getFechaEmision(), tipo);\n Integer numero = getNextComprobantePK(boleto.getFechaEmision(), tipo);\n comprobante.setIdNumeroGestion(numero);\n comprobante.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n\n return comprobante;\n }",
"public void crear() {\n con = new Conexion();\n con.setInsertar(\"insert into lenguajes_programacion (nombre, fecha_creacion, estado) values ('\"+this.getNombre()+\"', '\"+this.getFecha_creacion()+\"', 'activo')\");\n }",
"@_esCocinero\n public Result crearPaso() {\n Form<Paso> frm = frmFactory.form(Paso.class).bindFromRequest();\n\n // Comprobación de errores\n if (frm.hasErrors()) {\n return status(409, frm.errorsAsJson());\n }\n\n Paso nuevoPaso = frm.get();\n\n // Comprobar autor\n String key = request().getQueryString(\"apikey\");\n if (!SeguridadFunctions.esAutorReceta(nuevoPaso.p_receta.getId(), key))\n return Results.badRequest();\n\n // Checkeamos y guardamos\n if (nuevoPaso.checkAndCreate()) {\n Cachefunctions.vaciarCacheListas(\"pasos\", Paso.numPasos(), cache);\n Cachefunctions.vaciarCacheListas(\"recetas\", Receta.numRecetas(), cache);\n return Results.created();\n } else {\n return Results.badRequest();\n }\n\n }",
"public ViewCreatePagamento() {\n initComponents();\n clientesDAO cDAO = DaoFactory.createClientesDao(); \n matriculaDAO mDAO = DaoFactory.createMatriculaDao();\n \n cmbIDClientes.addItem(null);\n cDAO.findAll().forEach((p) -> {\n cmbIDClientes.addItem(p.getNome());\n });\n \n \n txtDataAtual.setText(DateFormat.getDateInstance().format(new Date()));\n }",
"@Override\n public ComprobanteContable createComprobante(Aerolinea a, Boleto boleto, Cliente cliente, String tipo, NotaDebito nota) throws CRUDException {\n\n ComprobanteContable comprobante = new ComprobanteContable();\n //ComprobanteContablePK pk = new ComprobanteContablePK();\n //pk.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n\n //creamos el concepto\n StringBuilder buff = new StringBuilder();\n\n // DESCRIPCION \n // AEROLINEA/ # Boleto / Pasajero / Rutas\n buff.append(a.getNumero());\n\n buff.append(\"/\");\n\n //numero boleto\n buff.append(\"#\");\n buff.append(boleto.getNumero());\n buff.append(\"/\");\n\n //Pasajero\n buff.append(boleto.getNombrePasajero().toUpperCase());\n\n // Rutas\n buff.append(\"/\");\n buff.append(boleto.getIdRuta1() != null ? boleto.getIdRuta1() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta2() != null ? boleto.getIdRuta2() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta3() != null ? boleto.getIdRuta3() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta4() != null ? boleto.getIdRuta4() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta5() != null ? boleto.getIdRuta5() : \"\");\n\n //jala el nombre cliente\n comprobante.setIdCliente(cliente);\n comprobante.setConcepto(buff.toString());\n comprobante.setFactorCambiario(boleto.getFactorCambiario());\n comprobante.setFecha(boleto.getFechaEmision());\n comprobante.setFechaInsert(boleto.getFechaInsert());\n comprobante.setIdEmpresa(boleto.getIdEmpresa());\n comprobante.setIdUsuarioCreador(boleto.getIdUsuarioCreador());\n comprobante.setTipo(tipo);\n comprobante.setEstado(ComprobanteContable.EMITIDO);\n //comprobante.setComprobanteContablePK(pk);\n\n //ComprobanteContablePK numero = getNextComprobantePK(boleto.getFechaEmision(), tipo);\n Integer numero = getNextComprobantePK(boleto.getFechaEmision(), tipo);\n comprobante.setIdNumeroGestion(numero);\n comprobante.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n return comprobante;\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 }",
"Motivo create(Motivo motivo);",
"public void crearAutomovil(){\r\n automovil = new Vehiculo();\r\n automovil.setMarca(\"BMW\");\r\n automovil.setModelo(2010);\r\n automovil.setPlaca(\"TWS435\");\r\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 }",
"public com.alain.puntocoma.model.Catalogo create(long catalogoId);",
"public VistaPedido() {\n initComponents();\n }",
"@RequestMapping(value = { \"/new\" }, method = RequestMethod.POST)\n\tpublic String saveEntity(@Valid ENTITY tipoConsumo, BindingResult result, ModelMap model,\n\t\t\t@RequestParam(required = false) Integer idEstadia) {\n\t\ttry{\n\t\n\t\t\tif (result.hasErrors()) {\n\t\t\t\treturn viewBaseLocation + \"/form\";\n\t\t\t}\n\t\n\t\t\tabm.guardar(tipoConsumo);\n\t\n\t\t\tif(idEstadia != null){\n\t\t\t\tmodel.addAttribute(\"idEstadia\", idEstadia);\n\t\t\t}\n\t\n\t\t\tmodel.addAttribute(\"success\", \"La creación se realizó correctamente.\");\n\t\t\t\n\t\t} catch(Exception e) {\n\t\t\tmodel.addAttribute(\"success\", \"La creación no pudo realizarse.\");\n\t\t}\n\t\tmodel.addAttribute(\"loggedinuser\", getPrincipal());\n\t\treturn \"redirect:list\";\n\t}",
"public void crearManoObra(ActionEvent actionEvent) {\r\n manoobraDao manobraDao = new manoobraDaoImpl();\r\n String msg;\r\n this.manoobra.setNombreManob(this.manoobra.getNombreManob());\r\n this.manoobra.setCostojrhManob(this.manoobra.getCostojrhManob());\r\n \r\n if (manobraDao.crearManoObra(this.manoobra)) {\r\n msg = \"Mano de Obra creada correctamente\";\r\n FacesMessage message1 = new FacesMessage(FacesMessage.SEVERITY_INFO,msg , null);\r\n FacesContext.getCurrentInstance().addMessage(null, message1);\r\n } else {\r\n msg = \"No se creo la Mano de Obra\";\r\n FacesMessage message2 = new FacesMessage(FacesMessage.SEVERITY_ERROR, msg, null);\r\n FacesContext.getCurrentInstance().addMessage(null, message2);\r\n }\r\n \r\n }",
"@FXML\r\n private void crearSolicitud() {\r\n try {\r\n //Carga la vista de crear solicitud rma\r\n FXMLLoader loader = new FXMLLoader();\r\n loader.setLocation(Principal.class.getResource(\"/vista/CrearSolicitud.fxml\"));\r\n BorderPane vistaCrear = (BorderPane) loader.load();\r\n\r\n //Crea un dialogo para mostrar la vista\r\n Stage dialogo = new Stage();\r\n dialogo.setTitle(\"Solicitud RMA\");\r\n dialogo.initModality(Modality.WINDOW_MODAL);\r\n dialogo.initOwner(primerStage);\r\n Scene escena = new Scene(vistaCrear);\r\n dialogo.setScene(escena);\r\n\r\n //Annadir controlador y datos\r\n ControladorCrearSolicitud controlador = loader.getController();\r\n controlador.setDialog(dialogo, primerStage);\r\n\r\n //Carga el numero de Referencia\r\n int numReferencia = DAORma.crearReferencia();\r\n\r\n //Modifica el dialogo para que no se pueda cambiar el tamaño y lo muestra\r\n dialogo.setResizable(false);\r\n dialogo.showAndWait();\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }",
"private void crearVista() {\n\t\tVista vista = Vista.getInstancia();\n\t\tvista.addObservador(this);\n\n\t}",
"public static void create(Formulario form){\n daoFormulario.create(form);\n }",
"private void azzeraInsertForm() {\n\t\tviewInserimento.getCmbbxTipologia().setSelectedIndex(-1);\n\t\tviewInserimento.getTxtFieldDataI().setText(\"\");\n\t\tviewInserimento.getTxtFieldValore().setText(\"\");\n\t\tviewInserimento.getTxtFieldDataI().setBackground(Color.white);\n\t\tviewInserimento.getTxtFieldValore().setBackground(Color.white);\n\t}",
"public PlanoSaude create(long plano_id);",
"OperacionColeccion createOperacionColeccion();",
"Documento createDocumento();",
"public void carregarCadastro() {\n\n try {\n\n if (codigo != null) {\n\n ClienteDao fdao = new ClienteDao();\n\n cliente = fdao.buscarCodigo(codigo);\n\n } else {\n cliente = new Cliente();\n\n }\n } catch (RuntimeException e) {\n JSFUtil.AdicionarMensagemErro(\"ex.getMessage()\");\n e.printStackTrace();\n }\n\n }",
"public void crearDialogo() {\r\n final PantallaCompletaDialog a2 = PantallaCompletaDialog.a(getString(R.string.hubo_error), getString(R.string.no_hay_internet), getString(R.string.cerrar).toUpperCase(), R.drawable.ic_error);\r\n a2.f4589b = new a() {\r\n public void onClick(View view) {\r\n a2.dismiss();\r\n }\r\n };\r\n a2.show(getParentFragmentManager(), \"TAG\");\r\n }",
"public void crearDisco( ){\r\n boolean parameter = true;\r\n String artista = panelDatos.darArtista( );\r\n String titulo = panelDatos.darTitulo( );\r\n String genero = panelDatos.darGenero( );\r\n String imagen = panelDatos.darImagen( );\r\n\r\n if( ( artista.equals( \"\" ) || titulo.equals( \"\" ) ) || ( genero.equals( \"\" ) || imagen.equals( \"\" ) ) ) {\r\n parameter = false;\r\n JOptionPane.showMessageDialog( this, \"Todos los campos deben ser llenados para crear el disco\" );\r\n }\r\n if( parameter){\r\n boolean ok = principal.crearDisco( titulo, artista, genero, imagen );\r\n if( ok )\r\n dispose( );\r\n }\r\n }",
"public CadastroProdutoNew() {\n initComponents();\n }",
"public void insertar() {\r\n if (vista.jTNombreempresa.getText().equals(\"\") || vista.jTTelefono.getText().equals(\"\") || vista.jTRFC.getText().equals(\"\") || vista.jTDireccion.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(null, \"Faltan Datos: No puedes dejar cuadros en blanco\");//C.P.M Verificamos si las casillas esta vacia si es asi lo notificamos\r\n } else {//C.P.M de lo contrario prosegimos\r\n modelo.setNombre(vista.jTNombreempresa.getText());//C.P.M mandamos las variabes al modelo \r\n modelo.setDireccion(vista.jTDireccion.getText());\r\n modelo.setRfc(vista.jTRFC.getText());\r\n modelo.setTelefono(vista.jTTelefono.getText());\r\n \r\n Error = modelo.insertar();//C.P.M Ejecutamos el metodo del modelo \r\n if (Error.equals(\"\")) {//C.P.M Si el modelo no regresa un error es que todo salio bien\r\n JOptionPane.showMessageDialog(null, \"Se guardo exitosamente la configuracion\");//C.P.M notificamos a el usuario\r\n vista.dispose();//C.P.M y cerramos la vista\r\n } else {//C.P.M de lo contrario \r\n JOptionPane.showMessageDialog(null, Error);//C.P.M notificamos a el usuario el error\r\n }\r\n }\r\n }",
"public void SalvarNovaPessoa(){\r\n \r\n\t\tpessoaModel.setUsuarioModel(this.usuarioController.GetUsuarioSession());\r\n \r\n\t\t//INFORMANDO QUE O CADASTRO FOI VIA INPUT\r\n\t\tpessoaModel.setOrigemCadastro(\"I\");\r\n \r\n\t\tpessoaRepository.SalvarNovoRegistro(this.pessoaModel);\r\n \r\n\t\tthis.pessoaModel = null;\r\n \r\n\t\tUteis.MensagemInfo(\"Registro cadastrado com sucesso\");\r\n \r\n\t}",
"private void insertar() {\n try {\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n cvo.setClave_cliente(vista.txtClave.getText());\n cdao.insertar(cvo);\n vista.txtNombre.setText(\"\");\n vista.txtApellido.setText(\"\");\n vista.txtDireccion.setText(\"\");\n vista.txtCorreo.setText(\"\");\n vista.txtClave.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Registro Ingresado\");\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Debe ingresar Datos para guardar registro!\");\n }\n }",
"@Override\n void create(Cliente cliente);",
"@Override\n public ComprobanteContable createAsientoDiarioBoleto(Boleto boleto) throws CRUDException {\n\n Optional op;\n ComprobanteContable comprobante = new ComprobanteContable();\n //ComprobanteContablePK pk = new ComprobanteContablePK();\n //pk.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n comprobante.setEstado(ComprobanteContable.EMITIDO);\n //comprobante.setComprobanteContablePK(pk);\n\n //creamos el concepto\n StringBuilder buff = new StringBuilder();\n\n // DESCRIPCION \n // AEROLINEA/ # Boleto / Pasajero / Rutas\n /*Aerolinea a = em.find(Aerolinea.class, boleto.getIdAerolinea().getIdAerolinea());\n if (a != null) {\n buff.append(a.getNumero());\n }*/\n buff.append(boleto.getIdAerolinea().getNumero());\n\n buff.append(\"/\");\n\n //numero boleto\n buff.append(\"#\");\n buff.append(boleto.getNumero());\n buff.append(\"/\");\n\n //Pasajero\n buff.append(boleto.getNombrePasajero().toUpperCase());\n\n // Rutas \n buff.append(\"/\");\n buff.append(boleto.getIdRuta1() != null ? boleto.getIdRuta1() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta2() != null ? boleto.getIdRuta2() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta3() != null ? boleto.getIdRuta3() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta4() != null ? boleto.getIdRuta4() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta5() != null ? boleto.getIdRuta5() : \"\");\n\n //jala el nombre cliente\n Cliente c = em.find(Cliente.class, boleto.getIdCliente().getIdCliente());\n op = Optional.ofNullable(c);\n\n if (!op.isPresent()) {\n throw new CRUDException(\"No se encontro un Cliente para el boleto\");\n }\n\n comprobante.setIdCliente(c);\n comprobante.setConcepto(buff.toString());\n comprobante.setFactorCambiario(boleto.getFactorCambiario());\n comprobante.setFecha(boleto.getFechaEmision());\n comprobante.setFechaInsert(boleto.getFechaInsert());\n comprobante.setIdEmpresa(boleto.getIdEmpresa());\n comprobante.setIdUsuarioCreador(boleto.getIdUsuarioCreador());\n comprobante.setTipo(ComprobanteContable.Tipo.ASIENTO_DIARIO);\n\n Integer numero = getNextComprobantePK(boleto.getFechaEmision(), ComprobanteContable.Tipo.ASIENTO_DIARIO);\n comprobante.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n comprobante.setIdNumeroGestion(numero);\n\n return comprobante;\n }",
"protected void creaPagine() {\n Pagina pag;\n Pannello pan;\n\n try { // prova ad eseguire il codice\n\n /* crea la pagina e aggiunge campi e pannelli */\n pag = this.addPagina(\"generale\");\n\n pan = PannelloFactory.orizzontale(this);\n pan.add(Cam.data);\n pan.add(Cam.importo.get());\n pan.add(Cam.note.get());\n pag.add(pan);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }",
"public void crearVehiculo( clsVehiculo vehiculo ){\n if( vehiculo.obtenerTipoMedioTransporte().equals(\"Carro\") ){\n //Debo llamar el modelo de CARRO\n modeloCarro.crearCarro( (clsCarro) vehiculo );\n } else if (vehiculo.obtenerTipoMedioTransporte().equals(\"Camion\")){\n //Debo llamar el modelo de CAMIÓN\n }\n }",
"public telaAddPedidoII() {\n initComponents();\n }",
"public void crearPersona(){\r\n persona = new Persona();\r\n persona.setNombre(\"Jose\");\r\n persona.setCedula(12345678);\r\n }",
"public abstract Anuncio creaAnuncioIndividualizado();",
"public ProductoCreable newInstance(int codigo, String nombre){\r\n \r\n }",
"public FrmCrearEmpleado() {\n initComponents();\n tFecha.setDate(new Date());\n }",
"public AfiliadoVista() {\r\n }",
"public static void creaHidatoAutomaticament()\n {\n ControladorVista.mostraCreacioHidatoAutomatica();\n }",
"@Override\r\npublic int create(Detalle_pedido d) {\n\treturn detalle_pedidoDao.create(d);\r\n}",
"public void crearActividad (Actividad a) {\r\n String query = \"INSERT INTO actividad (identificacion_navegate, numero_matricula, fecha, hora, destino, eliminar) VALUES (\\\"\" \r\n + a.getIdentificacionNavegante()+ \"\\\", \" \r\n + a.getNumeroMatricula() + \", \\\"\" \r\n + a.getFecha() + \"\\\", \\\"\" \r\n + a.getHora() + \"\\\", \\\"\" \r\n + a.getDestino()+ \"\\\" ,false)\";\r\n try {\r\n Statement st = con.createStatement();\r\n st.executeUpdate(query);\r\n st.close();\r\n JOptionPane.showMessageDialog(null, \"Actividad creada\", \"Operación exitosa\", JOptionPane.INFORMATION_MESSAGE);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(PActividad.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }",
"public VentanaCreaCategoria(VentanaPrincipal v, Categoria c) {\r\n\t\tthis.vp = v;\r\n\t\tthis.setResizable(false);\r\n\t\tthis.setLocationRelativeTo(null);\r\n\t\tsetTitle(\"Crear categor\\u00EDa\");\r\n\t\tsetBounds(100, 100, 441, 237);\r\n\t\tgetContentPane().setLayout(new BorderLayout());\r\n\t\tcontentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));\r\n\t\tgetContentPane().add(contentPanel, BorderLayout.CENTER);\r\n\t\tcontentPanel.setLayout(null);\r\n\t\tcontentPanel.add(getBtnCrear());\r\n\t\tcontentPanel.add(getBtnCancelar());\r\n\t\tcontentPanel.add(getLblNombre());\r\n\t\tcontentPanel.add(getTfNombre());\r\n\t\tcontentPanel.add(getLblSexo());\r\n\t\tcontentPanel.add(getComboSexo());\r\n\t\tcontentPanel.add(getLblEdadDesde());\r\n\t\tcontentPanel.add(getTfedadMinima());\r\n\t\tcontentPanel.add(getLblHasta());\r\n\t\tcontentPanel.add(getTfEdadMaxima());\r\n\r\n\t\t// Cargamos los datos en las tf\r\n\t\tcargarDatosCategoria(c);\r\n\t}",
"public frm_tutor_subida_prueba() {\n }",
"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 CobrarPedido() {\n initComponents();\n }",
"public void createDepartament(int id, String denumire, int numarRaioane) {\n\t\tif (departamentOperations.checkDepartament(id) == true)\n\t\t\tSystem.out.println(\"Departament existent!\");\n\t\tDepartament newDepartament = new Departament(id, denumire, numarRaioane);\n\t\tList<Departament> list = departamentOperations.getAllDepartamente();\n\t\tdepartamentOperations.addDepartament(newDepartament);\n\t\tdepartamentOperations.printListOfDepartamente(list);\n\t}",
"public abstract Anuncio creaAnuncioTematico();",
"public Vehiculo() {\r\n }",
"public void registrarMateria() {\n materia.setIdDepartamento(departamento);\n ejbFacade.create(materia);\n RequestContext requestContext = RequestContext.getCurrentInstance();\n requestContext.execute(\"PF('MateriaCreateDialog').hide()\");\n items = ejbFacade.findAll();\n departamento = new Departamento();\n materia = new Materia();\n\n FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, \"Información\", \"La materia se registró con éxito\");\n FacesContext.getCurrentInstance().addMessage(null, msg);\n requestContext.update(\"msg\");//Actualiza la etiqueta growl para que el mensaje pueda ser mostrado\n\n requestContext.update(\"MateriaListForm\");\n requestContext.update(\"MateriaCreateForm\");\n }",
"Negacion createNegacion();",
"Compleja createCompleja();",
"@GetMapping(\"/createRegistro\")\n\tpublic String crearValidacion(Model model) {\n\t\tList<Barrio> localidades = barrioService.obtenerBarrios();\n\t\tmodel.addAttribute(\"localidades\",localidades);\n\t\tmodel.addAttribute(\"persona\",persona);\n\t\tmodel.addAttribute(\"validacion\",validacion);\n\t\tmodel.addAttribute(\"registro\",registro);\n\t\tmodel.addAttribute(\"barrio\",barrio);\n\t\treturn \"RegistroForm\";\n\t}",
"public void crearAbonar(){\n \t\n getContentPane().setLayout(new BorderLayout());\n \n p1 = new JPanel();\n\t\tp2 = new JPanel();\n \n\t\t// Not used anymore\n\t\t//String[] a={\"Regresar\",\"Continuar\"},c={\"Cuenta\",\"Monto\"};\n \n\t\t// Layout : # row, # columns\n\t\tp1.setLayout(new GridLayout(1,2));\n \n\t\t// Create the JTextField : Cuenta\n\t\t// And add it to the panel\n tf = new JTextField(\"Cuenta\");\n textos.add(tf);\n tf.setPreferredSize(new Dimension(10,100));\n p1.add(tf);\n\n\t\t// Create the JTextField : Monto\n\t\t// And add it to the panel\n tf = new JTextField(\"Monto\");\n textos.add(tf);\n tf.setPreferredSize(new Dimension(10,100));\n p1.add(tf);\n \n // Add the panel to the Frame layout\n add(p1, BorderLayout.NORTH);\n \n // Create the button Regresar\n buttonRegresar = new JButton(\"Regresar\");\n botones.add(buttonRegresar);\n\n // Create the button Continuar\n buttonContinuar = new JButton(\"Continuar\");\n botones.add(buttonContinuar);\n \n // Layout : 1 row, 2 columns\n p2.setLayout(new GridLayout(1,2));\n \n // Add the buttons to the layout\n for(JButton x:botones){\n x.setPreferredSize(new Dimension(110,110));\n p2.add(x);\n }\n \n // Add the panel to the Frame layout\n add(p2, BorderLayout.SOUTH);\n }",
"public void crearPersonaje(ActionEvent event) {\r\n\r\n\t\tthis.personaje.setAspecto(url);\r\n\r\n\t\tDatabaseOperaciones.guardarPersonaje(stats, personaje);\r\n\r\n\t\tvisualizaPersonajes();\r\n\t}",
"public de_gestionar_contrato_añadir() {\n initComponents();\n lbl_error_nombre_cliente.setVisible(false);\n lbl_error_numero_contrato.setVisible(false);\n lbl_error_fecha_inicio.setVisible(false);\n lbl.setVisible(false);\n lbl_fecha_expira_contrato.setVisible(false);\n\n // detectar cambio en jdateChoser (fecha de inicio en agregar contrato)\n fecha_inicio_contrato.getDateEditor().addPropertyChangeListener(\n new PropertyChangeListener() {\n @Override\n public void propertyChange(PropertyChangeEvent e) {\n if (\"date\".equals(e.getPropertyName())) {\n System.out.println(e.getPropertyName()\n + \": \" + (Date) e.getNewValue());\n if(fecha_inicio_contrato.getDate()!=null){\n lbl_fecha_expira_contrato.setText(toma_fecha(fecha_inicio_contrato).substring(0,6)+String.valueOf(Integer.parseInt(toma_fecha(fecha_inicio_contrato).substring(6))+1));\n lbl.setVisible(true);\n lbl_fecha_expira_contrato.setVisible(true);\n }\n }else{\n lbl_fecha_expira_contrato.setText(\"\");\n lbl_error_fecha_inicio.setVisible(false);\n lbl.setVisible(false);\n lbl_fecha_expira_contrato.setVisible(false);\n }\n }\n });\n this.add(fecha_inicio_contrato);\n \n deshabilitarPegar();\n }",
"public co\n\t\t.com\n\t\t.telefonica\n\t\t.atiempo\n\t\t.soltec\n\t\t.datos_publicacion\n\t\t.ejb\n\t\t.sb\n\t\t.DatosPublicacionSTLocal create()\n\t\tthrows javax.ejb.CreateException;",
"public Pedido() {\n initComponents();\n panelVerificarPedido.setVisible(false);\n setBackground(new Color(0, 0, 0, 0));\n txtdescripcion.disable();\n txtdescripcion.setBackground(Color.white);\n LlenarTabla();\n }",
"@GetMapping(\"/cliente/new\")\n\tpublic String newCliente(Model model) {\n\t\tmodel.addAttribute(\"cliente\", new Cliente());\n\t\tControllerHelper.setEditMode(model, false);\n\t\t\n\t\t\n\t\treturn \"cadastro-cliente\";\n\t\t\n\t}",
"@RequestMapping(value=\"/formpaciente\")\r\n\tpublic String crearPaciente(Map<String, Object> model) {\t\t\r\n\t\t\r\n\t\tPaciente paciente = new Paciente();\r\n\t\tmodel.put(\"paciente\", paciente);\r\n\t\tmodel.put(\"obrasociales\",obraSocialService.findAll());\r\n\t\t//model.put(\"obrasPlanesForm\", new ObrasPlanesForm());\r\n\t\t//model.put(\"planes\", planService.findAll());\r\n\t\tmodel.put(\"titulo\", \"Formulario de Alta de Paciente\");\r\n\t\t\r\n\t\treturn \"formpaciente\";\r\n\t}",
"public void abrirDialogoCustodio(){\n\t\tif(aut_empleado.getValor()!=null){\n\t\t\ttab_tarspaso_Custodio.limpiar();\n\t\t\ttab_tarspaso_Custodio.insertar();\n\t\t\t//tab_direccion.limpiar();\n\t\t//\ttab_direccion.insertar();\n\t\t\tdia_traspaso_custodio.dibujar();\n\t\t}\n\t\telse{\n\t\t\tutilitario.agregarMensaje(\"Inserte un Custodio\", \"\");\n\t\t}\n\n\t}",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n String nombre = request.getParameter(\"nombre\");\n String descripcion = request.getParameter(\"descripcion\");\n String cantidad = request.getParameter(\"cantidad\");\n String precio = request.getParameter(\"precio\");\n String pago = request.getParameter(\"pago\");\n \n //creando objeto del costructor\n modelo.ventas venta = new modelo.ventas();\n //almacenando datos en las variables con el constructor \n venta.setNombre(nombre);\n venta.setDescripcion(descripcion);\n venta.setCantidad(Integer.parseInt(cantidad));\n venta.setPrecio(Double.parseDouble(precio));\n venta.setPago(Integer.parseInt(pago));\n \n //creando objeto para guardar cliente\n modelo.addVenta addventa = new modelo.addVenta();\n try {\n addventa.agrega(venta);\n } catch (SQLException ex) {\n Logger.getLogger(formVenta.class.getName()).log(Level.SEVERE, null, ex);\n }\n response.sendRedirect(\"ventas\");//si se guarda exitosamente se redirecciona a membresia\n }",
"public void makeClient() {\n try {\n clienteFacade.create(cliente);\n FacesContext.getCurrentInstance().addMessage(\"messages\", new FacesMessage(FacesMessage.SEVERITY_INFO, \"Cliente creado exitosamente\", null));\n } catch (Exception e) {\n System.err.println(\"Error en la creacion del usuario: \" + e.getMessage());\n FacesContext.getCurrentInstance().addMessage(\"messages\", new FacesMessage(FacesMessage.SEVERITY_FATAL, e.getMessage(), null));\n }\n }",
"@Override\n public boolean create(Revue objet) {\n return false;\n }",
"public void crear(Tarea t) {\n t.saveIt();\n }",
"Operacion createOperacion();",
"@PostMapping(\"/creargrupo\")\n public String create(@ModelAttribute (\"grupo\") Grupo grupo) throws Exception {\n try {\n grupoService.create(grupo);\n return \"redirect:/pertenezco\";\n }catch (Exception e){\n LOG.log(Level.WARNING,\"grupos/creargrupo\" + e.getMessage());\n return \"redirect:/error\";\n }\n }",
"Secuencia createSecuencia();",
"public VentanaCrearProducto(ControladorProducto controladorProducto) {\n initComponents();\n this.controladorProducto=controladorProducto;\n txtCodigoCrearProducto.setText(String.valueOf(this.controladorProducto.getCodigo()));\n this.setSize(1000,600);\n }",
"private void creerMethode() {\n if (estValide()) {\n methode = new Methode();\n methode.setNom(textFieldNom.getText());\n methode.setVisibilite(comboBoxVisibilite.getValue());\n methode.setType(comboBoxType.getValue());\n ArrayList<Parametre> temp = new ArrayList<>();\n for (Parametre parametre : parametreListView.getItems())\n temp.add(parametre);\n methode.setParametres(temp);\n close();\n }\n }",
"public void creaAziendaAgricola(){\n\t\tCantina nipozzano = creaCantina(\"Nipozzano\");\t\n\t\tBotte[] bottiNipozzano = new Botte[5+(int)(Math.random()*10)];\t\n\t\tfor(int i=0; i<bottiNipozzano.length; i++){\n\t\t\tbottiNipozzano[i] = creaBotte(nipozzano, i, (int)(Math.random()*10+1), tipologiaBotte[(int)(Math.random()*tipologiaBotte.length)]);\n\t\t}\t\t\n\t\tVigna mormoreto = creaVigna(\"Mormoreto\", 330, 25, EsposizioneVigna.sud, \"Terreni ricchi di sabbia, ben drenati. Discreta presenza di calcio. pH neutro o leggermente alcalino\");\n\t\tFilare[] filariMormoreto = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariMormoreto.length;i++){\n\t\t\tfilariMormoreto[i] = creaFilare(mormoreto, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\t\n\t\tVigna montesodi = creaVigna(\"Montesodi\", 400, 20, EsposizioneVigna.sud_ovest, \"Arido e sassoso, di alberese, argilloso e calcareo, ben drenato, poco ricco di sostanza organica\");\n\t\tFilare[] filariMontesodi = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariMontesodi.length;i++){\n\t\t\tfilariMontesodi[i] = creaFilare(montesodi, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\n\t\t/*\n\t\t * CANTINA: POMINO - VIGNETO BENEFIZIO\n\t\t */\n\t\t\n\t\tCantina pomino = creaCantina(\"Pomino\");\n\t\tBotte[] bottiPomino = new Botte[5+(int)(Math.random()*10)];\t\n\t\tfor(int i=0; i<bottiPomino.length; i++){\n\t\t\tbottiPomino[i] = creaBotte(pomino, i, (int)(Math.random()*10+1), tipologiaBotte[(int)(Math.random()*tipologiaBotte.length)]);\n\t\t}\n\t\tVigna benefizio = creaVigna(\"Benefizio\", 700, 9, EsposizioneVigna.sud_ovest, \"Terreni ricchi di sabbia, forte presenza di scheletro. Molto drenanti. Ricchi in elementi minerali. PH acido o leggermente acido.\");\n\t\tFilare[] filariBenefizio = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariBenefizio.length;i++){\n\t\t\tfilariBenefizio[i] = creaFilare(benefizio, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\n\t\t\n\t\taziendaAgricolaDAO.saveLuogo(nipozzano);\n\t\taziendaAgricolaDAO.saveLuogo(mormoreto);\n\t\taziendaAgricolaDAO.saveLuogo(montesodi);\n\t\t\n\t\taziendaAgricolaDAO.saveLuogo(pomino);\n\t\taziendaAgricolaDAO.saveLuogo(benefizio);\n\t\t\n\t\taziendaAgricolaDAO.saveResponsabile(responsabile(\"Giulio d'Afflitto\"));\n\t\taziendaAgricolaDAO.saveResponsabile(responsabile(\"Francesco Ermini\"));\n\n\t\t\n\t}",
"public GestaoFormando() {\n \n initComponents();\n listarEquipamentos();\n listarmapainscritos();\n }",
"@Override\n\t@Transactional\n\tpublic DetalleCarrito create(DetalleCarrito entity) throws Exception {\n\t\treturn detalleCarritoRepository.save(entity);\n\t}",
"void validateActivoCreate(Activo activo);",
"private void nuevaLiga() {\r\n\t\tif(Gestion.isModificado()){\r\n\t\t\tint opcion = JOptionPane.showOptionDialog(null, \"¿Desea guardar los cambios?\", \"Nueva Liga\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null,null, null);\r\n\t\t\tswitch(opcion){\r\n\t\t\tcase JOptionPane.YES_OPTION:\r\n\t\t\t\tguardar();\r\n\t\t\t\tbreak;\r\n\t\t\tcase JOptionPane.NO_OPTION:\r\n\t\t\t\tGestion.reset();\r\n\t\t\t\tbreak;\r\n\t\t\tcase JOptionPane.CANCEL_OPTION:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t\tGestion.reset();\r\n\t\tfrmLigaDeFtbol.setTitle(\"Liga de Fútbol\");\r\n\t}",
"@Override\n public void onClick(View v) {\n etProducto.setError(null);\n etCantidad.setError(null);\n etDescripcion.setError(null);\n String producto = etProducto.getText().toString(),\n CantidadComoCadena = etCantidad.getText().toString(),\n descripcion = etDescripcion.getText().toString();\n if (\"\".equals(producto)) {\n etProducto.setError(\"Escribe el producto a comprar\");\n etProducto.requestFocus();\n return;\n }\n if (\"\".equals(CantidadComoCadena)) {\n etCantidad.setError(\"Escribe la cantidad de la venta\");\n etCantidad.requestFocus();\n return;\n }\n if (\"\".equals(descripcion)) {\n etDescripcion.setError(\"Escribe la descripción de la venta\");\n etDescripcion.requestFocus();\n return;\n }\n\n // Ver si es un entero\n int cantidad;\n try {\n cantidad = Integer.parseInt(etCantidad.getText().toString());\n } catch (NumberFormatException e) {\n etCantidad.setError(\"Escribe la cantidad\");\n etCantidad.requestFocus();\n return;\n }\n // Ya pasó la validación\n Venta nuevaVenta = new Venta(producto,cantidad,descripcion);\n long id = ventasController.nuevaVenta(nuevaVenta);\n if (id == -1) {\n // De alguna manera ocurrió un error\n Toast.makeText(AgregarMascotaActivity.this, \"Error al guardar. Intenta de nuevo\", Toast.LENGTH_SHORT).show();\n } else {\n // Terminar\n finish();\n }\n }",
"@RequestMapping(method=RequestMethod.POST)\n\tpublic ResponseEntity<Void> insert(@Valid @RequestBody ClienteNewDTO objDTO){\n\t\t\n\t\tCliente obj = service.fromDTO(objDTO);\n\t\tobj = service.insert(obj);\n\t\t\n\t\t//abaixo uma boa pratica para retornar a url do novo objeto quandro cria-lo\n\t\tURI uri = ServletUriComponentsBuilder.fromCurrentRequest()\n\t\t\t\t\t.path(\"/{id}\").buildAndExpand(obj.getId()).toUri(); //o from currente request vai pegar a requisicao atual, e logo depois a gente add o /id\n\t\t\n\t\treturn ResponseEntity.created(uri).build();\n\t}",
"@POST\r\n public DocumentoDTO crearDocumento(DocumentoDTO documento){\r\n return new DocumentoDTO(logic.crearDocumento(documento.toEntity()));\r\n }",
"VentanaPrincipal(InterfazGestorFF principal, InterfazEsquema estructura) {\n initComponents();\n setTitle(BufferDeRegistro.titulo);\n this.principal=principal;\n this.estructura=estructura;\n cargar_campos(); \n cargar_menu_listados();\n \n botones=new javax.swing.JButton[]{\n jBAbrirSGFF,jBActualizarRegistro,jBAyuda,jBBorrarRegistro,\n jBComenzarConsulta,jBGuardarSGFF,jBGuardarSGFF,jBImportarSGFF,\n jBInsertarRegistro,jBIrAlHV,jBIrAlHijo,\n jBIrAlPV,jBIrAlPadre,jBNuevaFicha,jBRegistroAnterior,jBRegistroSiguiente,jBSSGFF,jBCaracteres, jBAccInv, jBListar\n };\n combos=new javax.swing.JComboBox[]{\n jCBArchivos, jCBHijos, jCBPadresV, jCBHijosV\n };\n abrir(false);//Pongo en orden la barra de herramientas\n \n }",
"public void CrearArco(String Identificador, E Dato, Double peso, Vertice Verticei, Vertice Verticef){\r\n this.Vi = Verticei;\r\n this.Vf = Verticef;\r\n this.id = Identificador;\r\n this.Dato = Dato;\r\n this.p = peso;\r\n }",
"public void creaAddebitiGiornalieri(AddebitoFissoPannello pannello,\n int codConto,\n Date dataInizio,\n Date dataFine) {\n /* variabili e costanti locali di lavoro */\n boolean continua = true;\n Modulo modAddFisso;\n ArrayList<CampoValore> campiFissi;\n Campo campoQuery;\n CampoValore campoVal;\n ArrayList<WrapListino> lista;\n ArrayList<AddebitoFissoPannello.Riga> righeDialogo = null;\n int quantita;\n\n try { // prova ad eseguire il codice\n\n modAddFisso = this.getModulo();\n campiFissi = new ArrayList<CampoValore>();\n\n /* recupera dal dialogo il valore obbligatorio del conto */\n if (continua) {\n campoQuery = modAddFisso.getCampo(Addebito.Cam.conto.get());\n campoVal = new CampoValore(campoQuery, codConto);\n campiFissi.add(campoVal);\n }// fine del blocco if\n\n /* recupera dal dialogo il pacchetto di righe selezionate */\n if (continua) {\n righeDialogo = pannello.getRigheSelezionate();\n }// fine del blocco if\n\n /* crea il pacchetto delle righe di addebito fisso da creare */\n if (continua) {\n\n /* traverso tutta la collezione delle righe selezionate nel pannello */\n for (AddebitoFissoPannello.Riga riga : righeDialogo) {\n lista = ListinoModulo.getPrezzi(riga.getCodListino(),\n dataInizio,\n dataFine,\n true,\n false);\n quantita = riga.getQuantita();\n for (WrapListino wrapper : lista) {\n this.creaAddebitoFisso(codConto, dataInizio, wrapper, quantita);\n }\n } // fine del ciclo for-each\n }// fine del blocco if\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }",
"public static void instanciarCreencias() {\n\t\tfor(int i =0; i < GestorPartida.getContJugadores(); i++) {\n\t\t\t\n\t\t\tGestorPartida.jugadores[i].setCreencias(new Creencias(GestorPartida.jugadores, GestorPartida.objetoJugador, GestorPartida.objetoSala, i)); \n\t\t}\n\t}",
"public ControladorPrueba() {\r\n }",
"public CrearProductos() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\r\n private void initComponents() {\r\n\r\n jLabel1 = new javax.swing.JLabel();\r\n txtId = new javax.swing.JTextField();\r\n jLabel2 = new javax.swing.JLabel();\r\n cbTipo = new javax.swing.JComboBox<>();\r\n jLabel3 = new javax.swing.JLabel();\r\n txtDataEmissao = new javax.swing.JFormattedTextField();\r\n jLabel4 = new javax.swing.JLabel();\r\n txtDiasEntrega = new javax.swing.JFormattedTextField();\r\n jLabel5 = new javax.swing.JLabel();\r\n txtPedido = new javax.swing.JTextField();\r\n jLabel6 = new javax.swing.JLabel();\r\n cbClientes = new javax.swing.JComboBox<>();\r\n jLabel7 = new javax.swing.JLabel();\r\n txtUsuario = new javax.swing.JTextField();\r\n btnBuscaPedido = new javax.swing.JButton();\r\n btnCadastrar = new javax.swing.JButton();\r\n btnExcluir = new javax.swing.JButton();\r\n btnAlterar = new javax.swing.JButton();\r\n btnConfirmar = new javax.swing.JButton();\r\n btnCancelar = new javax.swing.JButton();\r\n jLabel8 = new javax.swing.JLabel();\r\n cbOrcamento = new javax.swing.JComboBox<>();\r\n btnVoltar1 = new javax.swing.JButton();\r\n jLabel9 = new javax.swing.JLabel();\r\n\r\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\r\n setTitle(\"Cadastra pedidos\");\r\n setResizable(false);\r\n\r\n jLabel1.setText(\"Id\");\r\n\r\n txtId.setEnabled(false);\r\n\r\n jLabel2.setText(\"Tipo\");\r\n\r\n cbTipo.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Proprio\", \"Terceiro\" }));\r\n cbTipo.setEnabled(false);\r\n\r\n jLabel3.setText(\"Data de emissão\");\r\n\r\n txtDataEmissao.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.DateFormatter()));\r\n txtDataEmissao.setText(\"dd/MM/yyyy\");\r\n txtDataEmissao.setEnabled(false);\r\n\r\n jLabel4.setText(\"Entrega em\");\r\n\r\n txtDiasEntrega.setEnabled(false);\r\n\r\n jLabel5.setText(\"Nº do pedido\");\r\n\r\n txtPedido.setEnabled(false);\r\n\r\n jLabel6.setText(\"Cliente\");\r\n\r\n cbClientes.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\r\n cbClientes.setEnabled(false);\r\n\r\n jLabel7.setText(\"Usuario\");\r\n\r\n txtUsuario.setEnabled(false);\r\n\r\n btnBuscaPedido.setText(\"Busca de pedidos\");\r\n btnBuscaPedido.setEnabled(false);\r\n btnBuscaPedido.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n btnBuscaPedidoActionPerformed(evt);\r\n }\r\n });\r\n\r\n btnCadastrar.setText(\"Cadastrar\");\r\n btnCadastrar.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n btnCadastrarActionPerformed(evt);\r\n }\r\n });\r\n\r\n btnExcluir.setText(\"Excluir\");\r\n btnExcluir.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n btnExcluirActionPerformed(evt);\r\n }\r\n });\r\n\r\n btnAlterar.setText(\"Alterar\");\r\n btnAlterar.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n btnAlterarActionPerformed(evt);\r\n }\r\n });\r\n\r\n btnConfirmar.setText(\"Confirmar\");\r\n btnConfirmar.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n btnConfirmarActionPerformed(evt);\r\n }\r\n });\r\n\r\n btnCancelar.setText(\"Fechar\");\r\n btnCancelar.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n btnCancelarActionPerformed(evt);\r\n }\r\n });\r\n\r\n jLabel8.setText(\"Orçamento\");\r\n\r\n cbOrcamento.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\r\n cbOrcamento.setEnabled(false);\r\n\r\n btnVoltar1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagens/undo.png\"))); // NOI18N\r\n btnVoltar1.setText(\"Voltar\");\r\n btnVoltar1.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n btnVoltar1ActionPerformed(evt);\r\n }\r\n });\r\n\r\n jLabel9.setText(\"dias\");\r\n\r\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\r\n getContentPane().setLayout(layout);\r\n layout.setHorizontalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel1)\r\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGroup(layout.createSequentialGroup()\r\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGap(48, 48, 48)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\r\n .addComponent(txtPedido)\r\n .addComponent(txtUsuario, javax.swing.GroupLayout.DEFAULT_SIZE, 110, Short.MAX_VALUE)\r\n .addComponent(txtId, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(cbTipo, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\r\n .addGap(18, 18, 18)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel4)\r\n .addComponent(jLabel3)\r\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(23, 23, 23)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(cbOrcamento, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(cbClientes, javax.swing.GroupLayout.Alignment.TRAILING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(txtDataEmissao, javax.swing.GroupLayout.DEFAULT_SIZE, 187, Short.MAX_VALUE)\r\n .addGroup(layout.createSequentialGroup()\r\n .addComponent(txtDiasEntrega, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n .addComponent(jLabel9)\r\n .addGap(0, 0, Short.MAX_VALUE))))\r\n .addGroup(layout.createSequentialGroup()\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\r\n .addComponent(btnCadastrar, javax.swing.GroupLayout.DEFAULT_SIZE, 131, Short.MAX_VALUE)\r\n .addComponent(btnExcluir, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 21, Short.MAX_VALUE)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\r\n .addComponent(btnBuscaPedido, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(btnAlterar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n .addGap(18, 18, 18)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(btnVoltar1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(btnConfirmar, javax.swing.GroupLayout.DEFAULT_SIZE, 103, Short.MAX_VALUE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n .addComponent(btnCancelar, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGap(1, 1, 1)))\r\n .addContainerGap())\r\n );\r\n layout.setVerticalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel1)\r\n .addComponent(txtId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel3)\r\n .addComponent(txtDataEmissao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(16, 16, 16)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel2)\r\n .addComponent(cbTipo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel4)\r\n .addComponent(txtDiasEntrega, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel9))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel5)\r\n .addComponent(txtPedido, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel6)\r\n .addComponent(cbClientes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel7)\r\n .addComponent(txtUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel8)\r\n .addComponent(cbOrcamento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 23, Short.MAX_VALUE)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(btnCadastrar)\r\n .addComponent(btnConfirmar)\r\n .addComponent(btnAlterar))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(btnCancelar)\r\n .addComponent(btnVoltar1)\r\n .addComponent(btnExcluir)\r\n .addComponent(btnBuscaPedido))\r\n .addContainerGap())\r\n );\r\n\r\n pack();\r\n }",
"public void creoVehiculo() {\n\t\t\n\t\tAuto a= new Auto(false, 0);\n\t\ta.encender();\n\t\ta.setPatente(\"saraza\");\n\t\ta.setCantPuertas(123);\n\t\ta.setBaul(true);\n\t\t\n\t\tSystem.out.println(a);\n\t\t\n\t\tMoto m= new Moto();\n\t\tm.encender();\n\t\tm.frenar();\n\t\tm.setManubrio(true);\n\t\tm.setVelMax(543);\n\t\tm.setPatente(\"zas 241\");\n\t\tVehiculo a1= new Auto(true, 0);\n\t\ta1.setPatente(\"asd 423\");\n\t\t((Auto)a1).setBaul(true);\n\t\t((Auto)a1).setCantPuertas(15);\n\t\tif (a1 instanceof Auto) {\n\t\t\tAuto autito= (Auto) a1;\n\t\t\tautito.setBaul(true);\n\t\t\tautito.setCantPuertas(531);\n\t\t\t\n\t\t}\n\t\tif (a1 instanceof Moto) {\n\t\t\tMoto motito=(Moto) a1;\n\t\t\tmotito.setManubrio(false);\n\t\t\tmotito.setVelMax(15313);\n\t\t\t\n\t\t\t\n\t\t}\n\t\tif (a1 instanceof Camion) {\n\t\t\tCamion camioncito=(Camion) a1;\n\t\t\tcamioncito.setAcoplado(false);\n\t\t\tcamioncito.setPatente(\"ge\");\n\t\t\t\n\t\t\t\n\t\t}\n\t\tVehiculo a2= new Moto();\n\t\tSystem.out.println(a2);\n\t\ta1.frenar();\n\t\t\n\t\tArrayList<Vehiculo>listaVehiculo= new ArrayList<Vehiculo>();\n\t\tlistaVehiculo.add(new Auto(true, 53));\n\t\tlistaVehiculo.add(new Moto());\n\t\tlistaVehiculo.add(new Camion());\n\t\tfor (Vehiculo vehiculo : listaVehiculo) {\n\t\t\tSystem.out.println(\"clase:\" +vehiculo.getClass().getSimpleName());\n\t\t\tvehiculo.encender();\n\t\t\tvehiculo.frenar();\n\t\t\tSystem.out.println(\"=======================================\");\n\t\t\t\n\t\t}\n\t}",
"@Override\n\tpublic void create(Empleado e) {\n\t\tSystem.out.println(\"Graba el empleado \" + e + \" en la BBDD.\");\n\t}"
] | [
"0.7389781",
"0.71863",
"0.7041937",
"0.69959754",
"0.69548655",
"0.68892854",
"0.67406166",
"0.67198074",
"0.671699",
"0.66738427",
"0.6650236",
"0.66438097",
"0.66402256",
"0.66241056",
"0.65011895",
"0.6490618",
"0.64890647",
"0.6473019",
"0.64584213",
"0.6456987",
"0.64407605",
"0.6433995",
"0.64066404",
"0.6402701",
"0.63957936",
"0.6374338",
"0.637378",
"0.6363786",
"0.635559",
"0.6346555",
"0.6341957",
"0.63174087",
"0.63029313",
"0.6290615",
"0.6277767",
"0.62739044",
"0.6269218",
"0.6253297",
"0.6239849",
"0.6235394",
"0.622683",
"0.6219278",
"0.6217624",
"0.6214416",
"0.6200599",
"0.6170889",
"0.61574644",
"0.6151033",
"0.6147657",
"0.6145875",
"0.61426145",
"0.61405826",
"0.6137852",
"0.6131622",
"0.6119476",
"0.6103225",
"0.6096796",
"0.6094823",
"0.6082928",
"0.60816574",
"0.60808784",
"0.6076879",
"0.6076056",
"0.6071857",
"0.60705584",
"0.60690576",
"0.60593784",
"0.60515416",
"0.60478497",
"0.60373193",
"0.60372776",
"0.60352486",
"0.60286593",
"0.60277194",
"0.6026048",
"0.6019297",
"0.6018735",
"0.60106766",
"0.6001828",
"0.59994775",
"0.59958726",
"0.599523",
"0.5990018",
"0.59868145",
"0.59828544",
"0.59645057",
"0.59617805",
"0.5957284",
"0.5951311",
"0.5945612",
"0.59446156",
"0.593356",
"0.5930011",
"0.5929875",
"0.5923476",
"0.59210324",
"0.591183",
"0.5907068",
"0.59057975",
"0.59018135"
] | 0.76508576 | 0 |
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. | @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
notificarPopup = new javax.swing.JPopupMenu();
jPanel1 = new javax.swing.JPanel();
jLabel8 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
errorLabel = new javax.swing.JLabel();
pedidoPanel = new javax.swing.JPanel();
jLabel9 = new javax.swing.JLabel();
jLabel10 = new javax.swing.JLabel();
numReferenciaTextField = new javax.swing.JTextField();
cantidadTextField = new javax.swing.JTextField();
jLabel11 = new javax.swing.JLabel();
finalizarPedidoButton = new javax.swing.JButton();
noFinalizarButton = new javax.swing.JButton();
introducirRefYCantButton = new javax.swing.JButton();
datosAbonadoPanel = new javax.swing.JPanel();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
jLabel5 = new javax.swing.JLabel();
nombreLabel = new javax.swing.JLabel();
apellidosLabel = new javax.swing.JLabel();
telefonoLabel = new javax.swing.JLabel();
emailLabel = new javax.swing.JLabel();
abonadoIncorrectoButton = new javax.swing.JButton();
abonadoCorrectoButton = new javax.swing.JButton();
jLabel7 = new javax.swing.JLabel();
jPanel2 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
numAbonadoTextField = new javax.swing.JTextField();
buscarButton = new javax.swing.JButton();
buscarPorParametrosButton = new javax.swing.JButton();
jLabel12 = new javax.swing.JLabel();
volverButton = new javax.swing.JButton();
cancelarButton = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jLabel8.setFont(new java.awt.Font("Ubuntu", 1, 18)); // NOI18N
jLabel8.setText("Pedido:");
jLabel6.setFont(new java.awt.Font("Ubuntu", 1, 18)); // NOI18N
jLabel6.setText("Datos Abonado:");
errorLabel.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N
errorLabel.setForeground(java.awt.Color.red);
errorLabel.setText("jLabel12");
jLabel9.setText("Nº Referencia:");
jLabel10.setText("Cantidad:");
numReferenciaTextField.setEnabled(false);
cantidadTextField.setEnabled(false);
jLabel11.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N
jLabel11.setText("Finalizar pedido:");
finalizarPedidoButton.setText("Si");
finalizarPedidoButton.setEnabled(false);
finalizarPedidoButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
finalizarPedidoButtonActionPerformed(evt);
}
});
noFinalizarButton.setText("No");
noFinalizarButton.setEnabled(false);
noFinalizarButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
noFinalizarButtonActionPerformed(evt);
}
});
introducirRefYCantButton.setText("Introducir");
introducirRefYCantButton.setEnabled(false);
introducirRefYCantButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
introducirRefYCantButtonActionPerformed(evt);
}
});
javax.swing.GroupLayout pedidoPanelLayout = new javax.swing.GroupLayout(pedidoPanel);
pedidoPanel.setLayout(pedidoPanelLayout);
pedidoPanelLayout.setHorizontalGroup(
pedidoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pedidoPanelLayout.createSequentialGroup()
.addGroup(pedidoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(pedidoPanelLayout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(finalizarPedidoButton, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(51, 51, 51)
.addComponent(noFinalizarButton))
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, pedidoPanelLayout.createSequentialGroup()
.addComponent(jLabel9)
.addGap(18, 18, 18)
.addComponent(numReferenciaTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, pedidoPanelLayout.createSequentialGroup()
.addComponent(jLabel10)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(cantidadTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(174, 174, 174))
.addGroup(pedidoPanelLayout.createSequentialGroup()
.addGroup(pedidoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel11)
.addGroup(pedidoPanelLayout.createSequentialGroup()
.addGap(133, 133, 133)
.addComponent(introducirRefYCantButton)))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
pedidoPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {cantidadTextField, numReferenciaTextField});
pedidoPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {finalizarPedidoButton, noFinalizarButton});
pedidoPanelLayout.setVerticalGroup(
pedidoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(pedidoPanelLayout.createSequentialGroup()
.addGap(16, 16, 16)
.addGroup(pedidoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel9)
.addComponent(numReferenciaTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(pedidoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel10)
.addComponent(cantidadTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addComponent(introducirRefYCantButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 35, Short.MAX_VALUE)
.addGroup(pedidoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pedidoPanelLayout.createSequentialGroup()
.addComponent(jLabel11)
.addGap(73, 73, 73))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pedidoPanelLayout.createSequentialGroup()
.addGroup(pedidoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(finalizarPedidoButton)
.addComponent(noFinalizarButton))
.addGap(22, 22, 22))))
);
pedidoPanelLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {cantidadTextField, numReferenciaTextField});
pedidoPanelLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {finalizarPedidoButton, noFinalizarButton});
jLabel2.setText("Nombre:");
jLabel3.setText("Apellidos:");
jLabel4.setText("Teléfono:");
jLabel5.setText("Email:");
abonadoIncorrectoButton.setText("No");
abonadoIncorrectoButton.setEnabled(false);
abonadoIncorrectoButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
abonadoIncorrectoButtonActionPerformed(evt);
}
});
abonadoCorrectoButton.setText("Si");
abonadoCorrectoButton.setEnabled(false);
abonadoCorrectoButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
abonadoCorrectoButtonActionPerformed(evt);
}
});
jLabel7.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N
jLabel7.setText("¿Es el abonado que buscaba?");
javax.swing.GroupLayout datosAbonadoPanelLayout = new javax.swing.GroupLayout(datosAbonadoPanel);
datosAbonadoPanel.setLayout(datosAbonadoPanelLayout);
datosAbonadoPanelLayout.setHorizontalGroup(
datosAbonadoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(datosAbonadoPanelLayout.createSequentialGroup()
.addGroup(datosAbonadoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(datosAbonadoPanelLayout.createSequentialGroup()
.addGap(63, 63, 63)
.addComponent(abonadoCorrectoButton, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(29, 29, 29)
.addComponent(abonadoIncorrectoButton, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(datosAbonadoPanelLayout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel7))
.addGroup(datosAbonadoPanelLayout.createSequentialGroup()
.addGap(30, 30, 30)
.addGroup(datosAbonadoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(datosAbonadoPanelLayout.createSequentialGroup()
.addComponent(jLabel3)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(apellidosLabel))
.addGroup(datosAbonadoPanelLayout.createSequentialGroup()
.addComponent(jLabel2)
.addGap(18, 18, 18)
.addComponent(nombreLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(datosAbonadoPanelLayout.createSequentialGroup()
.addGroup(datosAbonadoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel4)
.addComponent(jLabel5))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(datosAbonadoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(emailLabel)
.addComponent(telefonoLabel))))))
.addContainerGap(32, Short.MAX_VALUE))
);
datosAbonadoPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {apellidosLabel, emailLabel, nombreLabel, telefonoLabel});
datosAbonadoPanelLayout.setVerticalGroup(
datosAbonadoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(datosAbonadoPanelLayout.createSequentialGroup()
.addGap(23, 23, 23)
.addGroup(datosAbonadoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel2)
.addComponent(nombreLabel))
.addGap(18, 18, 18)
.addGroup(datosAbonadoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel3)
.addComponent(apellidosLabel))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(datosAbonadoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel4)
.addComponent(telefonoLabel))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(datosAbonadoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel5)
.addComponent(emailLabel))
.addGap(41, 41, 41)
.addComponent(jLabel7)
.addGap(16, 16, 16)
.addGroup(datosAbonadoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(abonadoIncorrectoButton)
.addComponent(abonadoCorrectoButton))
.addContainerGap(60, Short.MAX_VALUE))
);
datosAbonadoPanelLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {apellidosLabel, emailLabel, nombreLabel, telefonoLabel});
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(39, 39, 39)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(datosAbonadoPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel6))
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(154, 154, 154)
.addComponent(jLabel8))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(141, 141, 141)
.addComponent(pedidoPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 274, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(127, 127, 127)
.addComponent(errorLabel)))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addGap(37, 37, 37)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel6)
.addComponent(jLabel8))
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(18, 18, 18)
.addComponent(datosAbonadoPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(9, 9, 9)
.addComponent(pedidoPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(18, 18, 18)
.addComponent(errorLabel)
.addContainerGap(18, Short.MAX_VALUE))
);
jLabel1.setText("Nº Abonado:");
buscarButton.setText("Buscar");
buscarButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
buscarButtonActionPerformed(evt);
}
});
buscarPorParametrosButton.setText("Buscar por parámetros");
buscarPorParametrosButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
buscarPorParametrosButtonActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel1)
.addGap(18, 18, 18)
.addComponent(numAbonadoTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(buscarButton)
.addGap(98, 98, 98)
.addComponent(buscarPorParametrosButton)
.addContainerGap(96, Short.MAX_VALUE))
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
.addContainerGap(24, Short.MAX_VALUE)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(numAbonadoTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel1)
.addComponent(buscarButton)
.addComponent(buscarPorParametrosButton))
.addGap(42, 42, 42))
);
jLabel12.setFont(new java.awt.Font("Ubuntu", 1, 24)); // NOI18N
jLabel12.setText("CREAR PEDIDO ABONADO");
volverButton.setText("Volver");
volverButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
volverButtonActionPerformed(evt);
}
});
cancelarButton.setText("Cancelar");
cancelarButton.setEnabled(false);
cancelarButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cancelarButtonActionPerformed(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel12)
.addGap(283, 283, 283))
.addGroup(layout.createSequentialGroup()
.addGap(116, 116, 116)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 728, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(54, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addGap(61, 61, 61)
.addComponent(volverButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(cancelarButton)
.addGap(43, 43, 43))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap(52, Short.MAX_VALUE)
.addComponent(jLabel12)
.addGap(33, 33, 33)
.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(cancelarButton)
.addComponent(volverButton))
.addGap(30, 30, 30))
);
pack();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Form() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public frmRectangulo() {\n initComponents();\n }",
"public form() {\n initComponents();\n }",
"public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }",
"public FormListRemarking() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n \n }",
"public FormPemilihan() {\n initComponents();\n }",
"public GUIForm() { \n initComponents();\n }",
"public FrameForm() {\n initComponents();\n }",
"public TorneoForm() {\n initComponents();\n }",
"public FormCompra() {\n initComponents();\n }",
"public muveletek() {\n initComponents();\n }",
"public Interfax_D() {\n initComponents();\n }",
"public quanlixe_form() {\n initComponents();\n }",
"public SettingsForm() {\n initComponents();\n }",
"public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }",
"public Soru1() {\n initComponents();\n }",
"public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }",
"public soal2GUI() {\n initComponents();\n }",
"public EindopdrachtGUI() {\n initComponents();\n }",
"public MechanicForm() {\n initComponents();\n }",
"public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }",
"public BloodDonationGUI() {\n initComponents();\n }",
"public quotaGUI() {\n initComponents();\n }",
"public PatientUI() {\n initComponents();\n }",
"public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }",
"public Oddeven() {\n initComponents();\n }",
"public myForm() {\n\t\t\tinitComponents();\n\t\t}",
"public Magasin() {\n initComponents();\n }",
"public intrebarea() {\n initComponents();\n }",
"public RadioUI()\n {\n initComponents();\n }",
"public NewCustomerGUI() {\n initComponents();\n }",
"public ZobrazUdalost() {\n initComponents();\n }",
"public FormUtama() {\n initComponents();\n }",
"public p0() {\n initComponents();\n }",
"public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }",
"public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }",
"public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }",
"public form2() {\n initComponents();\n }",
"public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}",
"public kunde() {\n initComponents();\n }",
"public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }",
"public MusteriEkle() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\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 .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }",
"public frmMain() {\n initComponents();\n }",
"public frmMain() {\n initComponents();\n }",
"public DESHBORDPANAL() {\n initComponents();\n }",
"public frmVenda() {\n initComponents();\n }",
"public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }",
"public Botonera() {\n initComponents();\n }",
"public FrmMenu() {\n initComponents();\n }",
"public OffertoryGUI() {\n initComponents();\n setTypes();\n }",
"public JFFornecedores() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\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, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }",
"public vpemesanan1() {\n initComponents();\n }",
"public EnterDetailsGUI() {\n initComponents();\n }",
"public Kost() {\n initComponents();\n }",
"public frmacceso() {\n initComponents();\n }",
"public UploadForm() {\n initComponents();\n }",
"public FormHorarioSSE() {\n initComponents();\n }",
"public HW3() {\n initComponents();\n }",
"public Managing_Staff_Main_Form() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\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 .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"public sinavlar2() {\n initComponents();\n }",
"public P0405() {\n initComponents();\n }",
"public IssueBookForm() {\n initComponents();\n }",
"public MiFrame2() {\n initComponents();\n }",
"public Choose1() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }",
"public GUI_StudentInfo() {\n initComponents();\n }",
"public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }",
"public JFrmPrincipal() {\n initComponents();\n }",
"public bt526() {\n initComponents();\n }",
"public Pemilihan_Dokter() {\n initComponents();\n }",
"public Ablak() {\n initComponents();\n }",
"@Override\n\tprotected void initUi() {\n\t\t\n\t}",
"@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\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.createParallelGroup(\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\tAlignment.LEADING)\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.addComponent(label22,\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\tGroupLayout.PREFERRED_SIZE,\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\tGroupLayout.DEFAULT_SIZE,\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\tGroupLayout.PREFERRED_SIZE)\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.addGroup(\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\tlayout.createSequentialGroup()\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\t.addGap(3)\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\t.addComponent(\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\t\t\tlabel23,\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\t\t\tGroupLayout.PREFERRED_SIZE,\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\t\t\tGroupLayout.DEFAULT_SIZE,\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\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}",
"public Pregunta23() {\n initComponents();\n }",
"public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }",
"public AvtekOkno() {\n initComponents();\n }",
"public busdet() {\n initComponents();\n }",
"public ViewPrescriptionForm() {\n initComponents();\n }",
"public Ventaform() {\n initComponents();\n }",
"public Kuis2() {\n initComponents();\n }",
"public CreateAccount_GUI() {\n initComponents();\n }",
"public POS1() {\n initComponents();\n }",
"public Carrera() {\n initComponents();\n }",
"public EqGUI() {\n initComponents();\n }",
"public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\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 .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }",
"public nokno() {\n initComponents();\n }",
"public dokter() {\n initComponents();\n }",
"public ConverterGUI() {\n initComponents();\n }",
"public hitungan() {\n initComponents();\n }",
"public Modify() {\n initComponents();\n }",
"public frmAddIncidencias() {\n initComponents();\n }",
"public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }"
] | [
"0.7321342",
"0.7292121",
"0.7292121",
"0.7292121",
"0.72863305",
"0.7249828",
"0.7213628",
"0.7209084",
"0.7197292",
"0.71912086",
"0.7185135",
"0.7159969",
"0.7148876",
"0.70944786",
"0.70817256",
"0.7057678",
"0.69884527",
"0.69786763",
"0.69555986",
"0.69548863",
"0.69453996",
"0.69434965",
"0.69369817",
"0.6933186",
"0.6929363",
"0.69259083",
"0.69255763",
"0.69123995",
"0.6911665",
"0.6894565",
"0.6894252",
"0.68922615",
"0.6891513",
"0.68894076",
"0.6884006",
"0.68833494",
"0.6882281",
"0.6879356",
"0.68761575",
"0.68752",
"0.6872568",
"0.68604666",
"0.68577915",
"0.6856901",
"0.68561065",
"0.6854837",
"0.68547136",
"0.6853745",
"0.6853745",
"0.68442935",
"0.6838013",
"0.6837",
"0.6830046",
"0.68297213",
"0.68273175",
"0.682496",
"0.6822801",
"0.6818054",
"0.68177056",
"0.6812038",
"0.68098444",
"0.68094784",
"0.6809155",
"0.680804",
"0.68033874",
"0.6795021",
"0.67937285",
"0.6793539",
"0.6791893",
"0.6790516",
"0.6789873",
"0.67883795",
"0.67833847",
"0.6766774",
"0.6766581",
"0.67658913",
"0.67575616",
"0.67566",
"0.6754101",
"0.6751978",
"0.6741716",
"0.6740939",
"0.6738424",
"0.6737342",
"0.6734709",
"0.672855",
"0.6728138",
"0.6721558",
"0.6716595",
"0.6716134",
"0.6715878",
"0.67096144",
"0.67083293",
"0.6703436",
"0.6703149",
"0.6701421",
"0.67001027",
"0.66999036",
"0.66951054",
"0.66923416",
"0.6690235"
] | 0.0 | -1 |
End of variables declaration//GENEND:variables | public String getNumeroAbonado() {
return numAbonadoTextField.getText();
} | {
"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 |
Allow public readonly access to the count of error messages | public static int count() {
return errorCount;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getErrorCount();",
"public int getErrorCount() {\n return this._errorCount;\n }",
"public int getErrorCount()\r\n {\r\n \treturn errorCount;\r\n }",
"public int errorCount() {\n\t\treturn errorCount;\n\t}",
"public int getErrorCount() {\n return error_.size();\n }",
"public Long getErrorCount() {\n return this.errorCount;\n }",
"public void incrementErrorCount() {\n\t\terrorCount++;\n\t}",
"public Integer getErrorCnt() {\r\n return errorCnt;\r\n }",
"public final int getErrorCount()\n\t{\n\t\treturn errorCount_;\n\t}",
"public int getErrorcount() {\n return errorcount;\n }",
"public int getErrorCount() {\r\n\t\treturn errorHandler.getErrorCount();\r\n\t}",
"int getMessageCount();",
"int getMessageCount();",
"int getMessageCount();",
"int getMessageCount();",
"int getMessageCount();",
"public int getErrorCounter() {\n return errorCounter;\n }",
"public int getNumberOfErrors() {\n return errors;\n }",
"public static int getErrorTotal() {\n return errorCount;\n }",
"public int getErrorCount() {\n\t\treturn errors.size();\n\t}",
"public void setErrorcount(int value) {\n this.errorcount = value;\n }",
"public void setErrorCount(Long errorCount) {\n this.errorCount = errorCount;\n }",
"public static void registerError() {\r\n errorCount++;\r\n }",
"private int getMessageCount() {\r\n return mMessages.length;\r\n }",
"private synchronized void updateErrorCount(int errorCount) {\r\n\t\tthis.errorCount += errorCount;\r\n\t}",
"public void setErrorCnt(Integer errorCnt) {\r\n this.errorCnt = errorCnt;\r\n }",
"public int getErrors() {\n return errors;\n }",
"public int getErrorCount() {\n if (errorBuilder_ == null) {\n return error_.size();\n } else {\n return errorBuilder_.getCount();\n }\n }",
"public Long getErr_count() {\n return err_count;\n }",
"int getMessagesCount();",
"int getMessagesCount();",
"int getMessagesCount();",
"public int getErrors() {\n return errors;\n }",
"int getMsgCount();",
"int getMsgCount();",
"public abstract int getMessageSize();",
"public int getMessageCount() {\n return message_.size();\n }",
"public int getMessageCount() {\n return message_.size();\n }",
"public int getMessageCount() {\n return message_.size();\n }",
"public int getMessageCount() {\n return message_.size();\n }",
"public int getMessageCount() {\n return message_.size();\n }",
"public void setErrorCounter(int value) {\n errorCounter = value;\n }",
"int getInvalidLoginCount();",
"public int getErrorCount() {\r\n return root.getErrorCount();\r\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 long getExceptionCount();",
"public int getErrorCountByRepeat() {\n\t\t\n\t\tif (!hasERR) {\n\t\t\treturn -1;\n\t\t}\n\t\ttry {\n\t\t\treturn getSegments().getByCodeAndIndex(ERR, 1).getFields().item(0).getNonEmptyCount();\n\t\t} catch (HL7V2Exception e) {\n\t\t\treturn -1;\n\t\t}\n\t}",
"@Override\n\tpublic int getMessageCounter() {\n\t\treturn counter;\n\t}",
"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 Integer getMessageCount() {\r\n return messageCount;\r\n }",
"@Override\n public int numberOfMessages() {\n return messages.size();\n }",
"public void cleanErrorMessages() {\r\n\r\n }",
"public java.lang.String getErrorcount()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ERRORCOUNT$4);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }",
"public int getMessagesCount() {\n return messages_.size();\n }",
"public Integer getNumError() {\n return numError;\n }",
"public int getProblemCount();",
"public int getMissedCallsCount();",
"int getExceptionsCount();",
"public static long getClientErrors() {\n return clientErrors;\n }",
"public org.apache.xmlbeans.XmlString xgetErrorcount()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlString target = null;\r\n target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ERRORCOUNT$4);\r\n return target;\r\n }\r\n }",
"public int getMsgCount() {\n return instance.getMsgCount();\n }",
"public int getMsgCount() {\n return instance.getMsgCount();\n }",
"public int getMessagesCount() {\n return messages_.size();\n }",
"public void setErr_count(Long err_count) {\n this.err_count = err_count;\n }",
"public synchronized int getMessageCount() {\n return _references.size();\n }",
"public void clearErrorCount() {\n\t\terrorCount = 0;\n\t}",
"@Override\n\tpublic long countMemberExcep() {\n\t\treturn 0;\n\t}",
"public static long getServerErrors() {\n return serverErrors;\n }",
"int getMessageIdCount();",
"private void error(String message) {\n errors++;\n System.err.println(\"Line \" + token.line + \",\"\n + \" Col \" + token.col + \": \"\n + message);\n }",
"public int getBadCount() {\n return badCount;\n }",
"private int getFailCount() {\n\t\t\t\t\treturn record.getIntProperty(DatabasePasswordComposite.PASSWORD_FAILS, 0);\n\t\t\t\t}",
"@Test(dataProvider = \"validData\")\r\n\tpublic void testGetMessages(int valid) {\r\n\t\tint result = pages.pagesCount();\r\n\t\tAssert.assertEquals(result, valid);\r\n\t}",
"public int getFailedCheckCount() {\n return iFailedCheckCount;\n }",
"public void setErrors(int err) {\n errors = err;\n }",
"public int getNumberOfFailedFiles() {\n return numberOfFailedFiles;\n }",
"public static int getNumberOfCrashes() {\r\n\t\treturn errors.size();\r\n\t}",
"public List<String> getErrorMessages();",
"public void xsetErrorcount(org.apache.xmlbeans.XmlString errorcount)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlString target = null;\r\n target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ERRORCOUNT$4);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(ERRORCOUNT$4);\r\n }\r\n target.set(errorcount);\r\n }\r\n }",
"public static int getFailCount()\r\n\t{\r\n\t\treturn failCount;\r\n\t}",
"public int error() {\n return this.error;\n }",
"public int getMsgCount() {\n return msg_.size();\n }",
"public int getMsgCount() {\n return msg_.size();\n }",
"java.lang.String listMessageCounter() throws java.lang.Exception;",
"@Override\n public int getMessageSize()\n {\n return 0;\n }",
"public void setError(int value) {\n this.error = value;\n }",
"public int getTotalNumOfMsg(){ return allmessage.size();}",
"public int errorStringLength()\n {\n return frameLength() - offendingHeaderFrameLength() - ErrorFlyweight.HEADER_LENGTH;\n }",
"int getFieldViolationsCount();",
"public final void AddError()\n\t{\n\t\terrorCount_++;\n\t\tentryValid_ = false;\n\t}",
"public int error_sync_size() {\r\n return 3;\r\n }",
"public void setNumberOfFailedFiles(int value) {\n this.numberOfFailedFiles = value;\n }",
"public int getErrorIndex() {\r\n return textErrorIndex;\r\n }",
"public java.lang.Integer getN_error() {\n return n_error;\n }",
"@Override\n\tpublic int numberOfMessages() {\n\t\treturn 0;\n\t}",
"public int getError() {\n return error;\n }",
"private void incrementErrors() {\n totalErrors++;\n totalTunitErrors++;\n }",
"int getNumberOfSpecifiedExceptions();",
"public int getErrorNo() {\n return this.errorNo;\n }",
"public int getErrorNumber() {\n return errorNumber;\n }"
] | [
"0.78349864",
"0.7301117",
"0.7294126",
"0.72640705",
"0.71688646",
"0.7162506",
"0.71457404",
"0.71162754",
"0.70900685",
"0.7051778",
"0.7028875",
"0.7022404",
"0.7022404",
"0.7022404",
"0.7022404",
"0.7022404",
"0.6977874",
"0.6948736",
"0.6882643",
"0.6854523",
"0.6842468",
"0.6806925",
"0.6781137",
"0.67480654",
"0.67457825",
"0.67184675",
"0.67141134",
"0.6666709",
"0.6653579",
"0.6617694",
"0.6617694",
"0.6617694",
"0.66095376",
"0.6501604",
"0.6501604",
"0.64437723",
"0.6440672",
"0.6440672",
"0.6440672",
"0.6440672",
"0.6440672",
"0.6418099",
"0.63853997",
"0.63437206",
"0.63303",
"0.6307821",
"0.629423",
"0.6281012",
"0.62694275",
"0.6253895",
"0.6236792",
"0.62299687",
"0.62294465",
"0.62290704",
"0.6199358",
"0.6189214",
"0.6176489",
"0.6149688",
"0.6143325",
"0.6133882",
"0.61307126",
"0.61307126",
"0.612635",
"0.61029255",
"0.60980695",
"0.6098009",
"0.6090936",
"0.6088204",
"0.60868114",
"0.6080873",
"0.60552186",
"0.6047495",
"0.6043826",
"0.6042826",
"0.60377973",
"0.6026928",
"0.6018192",
"0.6007529",
"0.59960836",
"0.59873533",
"0.5980881",
"0.5979798",
"0.5979798",
"0.5979331",
"0.5975448",
"0.5972921",
"0.597275",
"0.59674984",
"0.59415805",
"0.5935938",
"0.59273183",
"0.5923016",
"0.5922196",
"0.5921522",
"0.5910195",
"0.59097886",
"0.59027535",
"0.5902124",
"0.58807933",
"0.5855526"
] | 0.7509476 | 1 |
Report nonfatal errors, output a message and return | public static void warn( String message ) {
System.err.println( "Logic: " + message );
errorCount = errorCount + 1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void report_fatal_error(String message, Object info) {\n report_error(message, info);\n System.out.println(\"ENTRO\");\n //System.exit(1);\n }",
"public void fatal(String message);",
"public void report_fatal_error(String message, Object info) {\r\n report_error(message, info);\r\n System.exit(1);\r\n }",
"public abstract boolean isFatal();",
"protected static int mainImpl(final String[] args) {\n final GUIFeedback feedback = new GUIFeedback(\"Packaging error logs for submission\");\n try {\n if (args.length != 1) {\n throw new IllegalArgumentException(\"Invalid number of arguments - expected path to property file\");\n }\n new BundleErrorReportInfo(feedback, args[0]).run();\n return 0;\n } catch (final Throwable t) {\n LOGGER.error(\"Caught exception\", t);\n feedback.shout(t.getMessage() != null ? t.getMessage() : \"Couldn't package error logs\");\n return 1;\n }\n }",
"void outputError(String message) {\n\n fatalCount++;\n/*\n if (fatalCount == 1) {\n //fatalErrorsTable.addRow(ec.cr1ColRow(\n // \"Fatal errors\", true, \"red\", IHAlign.CENTER));\n TableRow row = new TableRow();\n row.addCell(new TableDataCell(\n \"<font color=red><b>Fatal errors</b></font>\").setHAlign(IHAlign.CENTER));\n fatalErrorsTable.addRow(row);\n } // if (fatalCount == 1)\n //fatalErrorsTable.addRow(ec.cr1ColRow(message));\n TableRow row = new TableRow();\n row.addCell(new TableDataCell(message));\n fatalErrorsTable.addRow(row);\n*/\n ec.writeFileLine(reportFile, message);\n if (dbg) System.out.println(\"<br>outputError: message = \" + message);\n }",
"@Override\n\tpublic void fatal(Marker marker, String message) {\n\n\t}",
"@Override\n\tpublic void fatal(Message msg) {\n\t}",
"@Override\n\tpublic void fatal(Marker marker, Message msg) {\n\n\t}",
"@Override\n\tpublic void fatal(Marker marker, String message, Object p0) {\n\n\t}",
"public void report_fatal_error(String message, Object info) throws java.lang.Exception {\r\n done_parsing();\r\n report_error(message, info);\r\n }",
"@Override\n\tpublic void fatal(Object message) {\n\n\t}",
"public static void fatal( String message ) {\n\twarn( message );\n\tSystem.exit( 1 );\n }",
"@Override\n\tpublic void fatal(Marker marker, Object message) {\n\n\t}",
"@Override\n\tpublic void fatal(Marker marker, MessageSupplier msgSupplier) {\n\n\t}",
"@Override\n\tpublic void fatal(Marker marker, CharSequence message) {\n\n\t}",
"@Override\n\tpublic void fatal(CharSequence message) {\n\n\t}",
"@Override\n\tpublic void fatal(Marker marker, CharSequence message, Throwable t) {\n\n\t}",
"@Override\n\tpublic void fatal(Marker marker, String message, Object p0, Object p1) {\n\n\t}",
"@Override\n\tpublic void fatal(Marker marker, Message msg, Throwable t) {\n\n\t}",
"@Override\n\tpublic void fatal(Marker marker, Object message, Throwable t) {\n\n\t}",
"@Override\n\tpublic void fatal(Marker marker, String message, Throwable t) {\n\n\t}",
"@Override\n\tpublic void fatal(Marker marker, String message, Object... params) {\n\n\t}",
"public void error();",
"@Override\n\tpublic void fatal(Marker marker, Supplier<?> msgSupplier) {\n\n\t}",
"@Override\n\tpublic void fatal(MessageSupplier msgSupplier) {\n\n\t}",
"@Override\n\tpublic void fatal(String message, Object p0, Object p1) {\n\n\t}",
"@Override\n\tpublic void fatal(String message, Object p0) {\n\n\t}",
"@Override\n\tpublic void fatal(String message, Object... params) {\n\n\t}",
"@Override\n\tpublic void fatal(CharSequence message, Throwable t) {\n\n\t}",
"public static int error () {\n System.out.println(\"ERROR\");\n hasError = true;\n return -1;\n }",
"void onFatal();",
"@Override\n\tpublic void fatal(Marker marker, String message, Object p0, Object p1, Object p2) {\n\n\t}",
"@Override\n\tpublic void fatal(Message msg, Throwable t) {\n\n\t}",
"@Override\n\tpublic void fatal(Object message, Throwable t) {\n\n\t}",
"void printError(String errorMsg, boolean displayHelp);",
"@Override\n\tpublic void fatal(String message, Object p0, Object p1, Object p2) {\n\n\t}",
"private static void exitOnError(final String errorMsg)\n {\n System.out.println(errorMsg);\n System.exit(0);\n }",
"public void fatal(Exception ex) {\n\t\t\n\t}",
"@Override\n\tpublic void fatal(Marker marker, String message, Object p0, Object p1, Object p2, Object p3) {\n\n\t}",
"@Override\n\tpublic void fatal(String message, Object p0, Object p1, Object p2, Object p3) {\n\n\t}",
"@Override\n\tpublic void fatal(Supplier<?> msgSupplier) {\n\n\t}",
"@Override\n\tpublic void fatal(Marker marker, MessageSupplier msgSupplier, Throwable t) {\n\n\t}",
"@Override\n\tpublic void fatal(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5, Object p6, Object p7, Object p8, Object p9) {\n\n\t}",
"public void sendError()\n {\n \tString resultText = Integer.toString(stdID);\n \tresultText += \": \";\n\t\tfor(int i = 0; i<registeredCourses.size();i++)\n\t\t{\n\t\t\tresultText += registeredCourses.get(i);\n\t\t\tresultText += \" \";\n\t\t}\n\t\tresultText += \"--\";\n\t\tresultText += \" \";\n\t\tresultText += Integer.toString(semesterNum);\n\t\tresultText += \" \";\n\t\tresultText += Integer.toString(0); \n\t\tresultText += \" \";\n\t\tprintResults.writeResult(resultText);\n \tSystem.exit(1);\n }",
"default String error(String... args) {\n String message = create(args);\n Reporter.log(message);\n getLogger().error(message);\n return message;\n }",
"@Override\n\tpublic void fatal(Marker marker, Supplier<?> msgSupplier, Throwable t) {\n\n\t}",
"@Override\n\tpublic void fatal(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5, Object p6, Object p7) {\n\n\t}",
"@Override\n\tpublic void fatal(String message, Object p0, Object p1, Object p2, Object p3, Object p4) {\n\n\t}",
"@Override\n\tpublic void fatal(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5, Object p6, Object p7, Object p8) {\n\n\t}",
"@Override\n\tpublic void fatal(String message, Object p0, Object p1, Object p2, Object p3, Object p4,\n\t\t\tObject p5, Object p6, Object p7, Object p8, Object p9) {\n\n\t}",
"@Test\n public void localAction_stderrIsReported() throws Exception {\n if (OS.getCurrent() == OS.WINDOWS) {\n return;\n }\n write(\n \"BUILD\",\n \"genrule(\",\n \" name = 'foo',\",\n \" srcs = [],\",\n \" outs = ['out/foo.txt'],\",\n \" cmd = 'echo my-error-message > $@',\",\n \")\",\n \"genrule(\",\n \" name = 'foobar',\",\n \" srcs = [':foo'],\",\n \" outs = ['out/foobar.txt'],\",\n \" cmd = 'cat $(location :foo) >&2 && exit 1',\",\n \" tags = ['no-remote'],\",\n \")\");\n RecordingOutErr outErr = new RecordingOutErr();\n this.outErr = outErr;\n\n assertThrows(BuildFailedException.class, () -> buildTarget(\"//:foobar\"));\n\n assertOutputContains(outErr.errAsLatin1(), \"my-error-message\");\n }",
"@Override\n\tpublic void fatal(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4) {\n\n\t}",
"@Override\n\tpublic void fatal(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5, Object p6) {\n\n\t}",
"public void fatalError(String msg) {\n\t\tLog.e(\"FATAL ERROR\", msg);\n\t\tSystem.exit(0);\n\t}",
"@Override\n\tpublic void fatal(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5) {\n\n\t}",
"@Override\n public void reportError(String msg) {\n JOptionPane.showMessageDialog(null, msg);\n }",
"public void fatal(String message, Throwable throwable);",
"@Override\n\tpublic void fatal(String message, Object p0, Object p1, Object p2, Object p3, Object p4,\n\t\t\tObject p5, Object p6, Object p7, Object p8) {\n\n\t}",
"public boolean isFatalEnabled()\n/* */ {\n/* 266 */ return getLogger().isFatalErrorEnabled();\n/* */ }",
"static void fail(String message) {\n Log.error(message);\n System.exit(1);\n }",
"@Override\n\tpublic boolean isFatalEnabled() {\n\t\treturn false;\n\t}",
"public void fatal(Object message)\n/* */ {\n/* 226 */ if (message != null) {\n/* 227 */ getLogger().fatalError(String.valueOf(message));\n/* */ }\n/* */ }",
"private static void error(String msg) {\r\n\t\tlogger.severe(msg);\r\n\t\tSystem.exit(0);\r\n\t}",
"public void fatalError(String s)\r\n\t{\n\t\tForm form = new Form(\"Fatal Error\");\r\n\t\tform.append(new StringItem(null, s));\r\n\t\tform.addCommand(exitCommand);\r\n\t\tform.setCommandListener(this);\r\n\t\tDisplay.getDisplay(this).setCurrent(form);\r\n\t}",
"void showError(String message);",
"void showError(String message);",
"@Override\n\tpublic void fatal(String message, Object p0, Object p1, Object p2, Object p3, Object p4,\n\t\t\tObject p5, Object p6, Object p7) {\n\n\t}",
"@Override\n\tpublic void fatal(MessageSupplier msgSupplier, Throwable t) {\n\n\t}",
"@Override\n\tpublic void fatal(String message, Object p0, Object p1, Object p2, Object p3, Object p4,\n\t\t\tObject p5, Object p6) {\n\n\t}",
"@Override\n\tpublic void fatal(String message, Supplier<?>... paramSuppliers) {\n\n\t}",
"private void fail(String message) {\n\t\t// we're pretty dramatic here, if a resource isn't available\n\t\t// we dump the message and exit the game\n\t\tLogger.severe(message);\n\t\tSystem.exit(0);\n\t}",
"public void correctErrors();",
"@Override\n\tpublic void fatal(Marker marker, String message, Supplier<?>... paramSuppliers) {\n\n\t}",
"Object getFailonerror();",
"Object getFailonerror();",
"public String error();",
"java.lang.String getErr();",
"public void printFailure() {\n //\n }",
"@Override\n\tpublic void fatal(Supplier<?> msgSupplier, Throwable t) {\n\n\t}",
"public void usageError(String msg) {\n System.err.println(\"Usage error: \" + msg + \"\\n\");\n printUsage(System.err);\n System.exit(1);\n }",
"String errorMessage();",
"private static void printUsageExitError(){\n\t\tSystem.out.println(usage);\n\t\tSystem.exit(1);\n\t}",
"void reportCompileFailed(final String message)\n {\n this.printMessage(message);\n }",
"@Override\n\tpublic void fatal(String message, Object p0, Object p1, Object p2, Object p3, Object p4,\n\t\t\tObject p5) {\n\n\t}",
"protected void ERROR(String message)\n\t{\n\t\t//allow children to modify output\n\t\tPRINT(message);\n\t\tSystem.exit(1);\n\t}",
"public final void fatal(Component reporter, String message)\n\t{\n\t\tadd(new FeedbackMessage(reporter, message, FeedbackMessage.FATAL));\n\t}",
"boolean hasErrormessage();",
"void showErrorMsg(String string);",
"java.lang.String getErrmsg();",
"@Override\n\tpublic boolean isFatalEnabled(Marker marker) {\n\t\treturn false;\n\t}",
"@Override\n public boolean isSurroundingFatal() {\n return true;\n }",
"public void error(String message);",
"boolean hadErrors();",
"private static void printErrorMessage() {\n System.out.println(\"Oh no! It looks like I wasn't able to understand the arguments you passed in :(\"\n + \"\\nI can only handle arguments passed in a format like the following: 1/2 * 3/4\\n\");\n }",
"void err( Object msg );",
"void fatal(String messageKey, Throwable throwable, Object... args);",
"boolean hasErrmsg();",
"public void fatal(Object message, Throwable t)\n/* */ {\n/* 240 */ if (message != null) {\n/* 241 */ getLogger().fatalError(String.valueOf(message), t);\n/* */ }\n/* */ }",
"public static void main(String[] args){\n \t\tfatalError();\n \t\tSystem.out.println(\"Termination not requested.\");\n \t}",
"boolean documentFreeOfErrors();"
] | [
"0.6903755",
"0.67780584",
"0.6719263",
"0.6536158",
"0.64411277",
"0.63985485",
"0.63801444",
"0.6329488",
"0.6319524",
"0.6287272",
"0.628493",
"0.6259168",
"0.6258693",
"0.6258224",
"0.6215914",
"0.61926687",
"0.6191165",
"0.6158848",
"0.61389005",
"0.61363006",
"0.61276567",
"0.6123008",
"0.6099719",
"0.60982203",
"0.6094155",
"0.6087993",
"0.60545045",
"0.60538214",
"0.60462284",
"0.60439944",
"0.60419995",
"0.60385793",
"0.60339046",
"0.6028839",
"0.6027964",
"0.6016713",
"0.6010866",
"0.6003207",
"0.6002206",
"0.6000512",
"0.5993756",
"0.599229",
"0.5970495",
"0.5963905",
"0.59480894",
"0.59464854",
"0.5933875",
"0.5918986",
"0.59135896",
"0.5911429",
"0.5907799",
"0.59039",
"0.58803684",
"0.587189",
"0.58517903",
"0.5849286",
"0.5841704",
"0.584124",
"0.58376575",
"0.5835754",
"0.58258885",
"0.5809903",
"0.5806007",
"0.57980365",
"0.57499105",
"0.5743811",
"0.5743811",
"0.57424825",
"0.5741908",
"0.5740003",
"0.57074434",
"0.57000244",
"0.56962353",
"0.56877345",
"0.56678593",
"0.56678593",
"0.56651366",
"0.5657539",
"0.56573397",
"0.5654279",
"0.56459403",
"0.56442446",
"0.5633006",
"0.5631912",
"0.56216043",
"0.5616062",
"0.56059587",
"0.55847853",
"0.5580321",
"0.5578451",
"0.5568346",
"0.5538965",
"0.55362326",
"0.55296314",
"0.5524694",
"0.5523704",
"0.5520534",
"0.55187196",
"0.5469677",
"0.54533505",
"0.544398"
] | 0.0 | -1 |
Report fatal errors, output a message and exit, never to return | public static void fatal( String message ) {
warn( message );
System.exit( 1 );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void fatalError(String msg) {\n\t\tLog.e(\"FATAL ERROR\", msg);\n\t\tSystem.exit(0);\n\t}",
"public void report_fatal_error(String message, Object info) {\r\n report_error(message, info);\r\n System.exit(1);\r\n }",
"public static void main(String[] args){\n \t\tfatalError();\n \t\tSystem.out.println(\"Termination not requested.\");\n \t}",
"public void fatal(String message);",
"@Override\n\tpublic void fatal(Message msg) {\n\t}",
"public void report_fatal_error(String message, Object info) {\n report_error(message, info);\n System.out.println(\"ENTRO\");\n //System.exit(1);\n }",
"public void fatal(Exception ex) {\n\t\t\n\t}",
"@Override\n\tpublic void fatal(Marker marker, Message msg) {\n\n\t}",
"@Override\n\tpublic void fatal(Message msg, Throwable t) {\n\n\t}",
"@Override\n\tpublic void fatal(Object message) {\n\n\t}",
"@Override\n\tpublic void fatal(String message, Object p0, Object p1) {\n\n\t}",
"@Override\n\tpublic void fatal(Marker marker, String message, Object p0) {\n\n\t}",
"@Override\n\tpublic void fatal(Marker marker, Message msg, Throwable t) {\n\n\t}",
"@Override\n\tpublic void fatal(Object message, Throwable t) {\n\n\t}",
"@Override\n\tpublic void fatal(String message, Object p0, Object p1, Object p2, Object p3) {\n\n\t}",
"@Override\n\tpublic void fatal(String message, Object p0) {\n\n\t}",
"@Override\n\tpublic void fatal(Marker marker, String message) {\n\n\t}",
"@Override\n\tpublic void fatal(String message, Object p0, Object p1, Object p2) {\n\n\t}",
"@Override\n\tpublic void fatal(Marker marker, MessageSupplier msgSupplier) {\n\n\t}",
"@Override\n\tpublic void fatal(Marker marker, String message, Object p0, Object p1) {\n\n\t}",
"private static void exitOnError(final String errorMsg)\n {\n System.out.println(errorMsg);\n System.exit(0);\n }",
"@Override\n\tpublic void fatal(Marker marker, Object message) {\n\n\t}",
"@Override\n\tpublic void fatal(Marker marker, String message, Throwable t) {\n\n\t}",
"@Override\n\tpublic void fatal(Marker marker, Object message, Throwable t) {\n\n\t}",
"@Override\n\tpublic void fatal(String message, Object p0, Object p1, Object p2, Object p3, Object p4,\n\t\t\tObject p5, Object p6, Object p7, Object p8, Object p9) {\n\n\t}",
"@Override\n\tpublic void fatal(String message, Object... params) {\n\n\t}",
"@Override\n\tpublic void fatal(Marker marker, MessageSupplier msgSupplier, Throwable t) {\n\n\t}",
"@Override\n\tpublic void fatal(String message, Object p0, Object p1, Object p2, Object p3, Object p4,\n\t\t\tObject p5, Object p6, Object p7, Object p8) {\n\n\t}",
"@Override\n\tpublic void fatal(CharSequence message, Throwable t) {\n\n\t}",
"@Override\n\tpublic void fatal(String message, Object p0, Object p1, Object p2, Object p3, Object p4,\n\t\t\tObject p5, Object p6) {\n\n\t}",
"@Override\n\tpublic void fatal(MessageSupplier msgSupplier) {\n\n\t}",
"@Override\n\tpublic void fatal(String message, Object p0, Object p1, Object p2, Object p3, Object p4) {\n\n\t}",
"private static void error(String msg) {\r\n\t\tlogger.severe(msg);\r\n\t\tSystem.exit(0);\r\n\t}",
"@Override\n\tpublic void fatal(Marker marker, String message, Object p0, Object p1, Object p2) {\n\n\t}",
"@Override\n\tpublic void fatal(Marker marker, CharSequence message, Throwable t) {\n\n\t}",
"protected static int mainImpl(final String[] args) {\n final GUIFeedback feedback = new GUIFeedback(\"Packaging error logs for submission\");\n try {\n if (args.length != 1) {\n throw new IllegalArgumentException(\"Invalid number of arguments - expected path to property file\");\n }\n new BundleErrorReportInfo(feedback, args[0]).run();\n return 0;\n } catch (final Throwable t) {\n LOGGER.error(\"Caught exception\", t);\n feedback.shout(t.getMessage() != null ? t.getMessage() : \"Couldn't package error logs\");\n return 1;\n }\n }",
"@Override\n\tpublic void fatal(Marker marker, String message, Object p0, Object p1, Object p2, Object p3) {\n\n\t}",
"public void fatalError(String s)\r\n\t{\n\t\tForm form = new Form(\"Fatal Error\");\r\n\t\tform.append(new StringItem(null, s));\r\n\t\tform.addCommand(exitCommand);\r\n\t\tform.setCommandListener(this);\r\n\t\tDisplay.getDisplay(this).setCurrent(form);\r\n\t}",
"public void fatal(Object message)\n/* */ {\n/* 226 */ if (message != null) {\n/* 227 */ getLogger().fatalError(String.valueOf(message));\n/* */ }\n/* */ }",
"@Override\n\tpublic void fatal(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5, Object p6, Object p7, Object p8, Object p9) {\n\n\t}",
"@Override\n\tpublic void fatal(CharSequence message) {\n\n\t}",
"@Override\n\tpublic void fatal(Marker marker, String message, Object... params) {\n\n\t}",
"@Override\n\tpublic void fatal(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5, Object p6, Object p7) {\n\n\t}",
"@Override\n\tpublic void fatal(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5, Object p6, Object p7, Object p8) {\n\n\t}",
"@Override\n\tpublic void fatal(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5, Object p6) {\n\n\t}",
"@Override\n\tpublic void fatal(String message, Object p0, Object p1, Object p2, Object p3, Object p4,\n\t\t\tObject p5, Object p6, Object p7) {\n\n\t}",
"@Override\n\tpublic void fatal(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4) {\n\n\t}",
"@Override\n\tpublic void fatal(Marker marker, Supplier<?> msgSupplier) {\n\n\t}",
"private static void fatalError(Exception e) {\n\t\tif (SwingUtilities.isEventDispatchThread()) {\n\t\t\tfinal StringWriter stacktraceW = new StringWriter();\n\t\t\te.printStackTrace(new PrintWriter(stacktraceW, true));\n\n\t\t\tjavax.swing.JOptionPane\n\t\t\t\t\t.showMessageDialog(null,\n\t\t\t\t\t\t\te.getClass() + \"\\n\" + e.getLocalizedMessage() + \"\\n\\nStacktrace:\\n\"\n\t\t\t\t\t\t\t\t\t+ stacktraceW.getBuffer().toString(),\n\t\t\t\t\t\t\t\"Fatal Error\", javax.swing.JOptionPane.ERROR_MESSAGE);\n\t\t\te.printStackTrace();\n\t\t} else {\n\t\t\t// If not on EDT, then schedule for execution on EDT\n\t\t\ttry {\n\t\t\t\tSwingUtilities.invokeAndWait(new Runnable() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tfatalError(e);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} catch (InvocationTargetException | InterruptedException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic void fatal(Marker marker, Supplier<?> msgSupplier, Throwable t) {\n\n\t}",
"@Override\n\tpublic void fatal(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5) {\n\n\t}",
"@Override\n\tpublic void fatal(Marker marker, CharSequence message) {\n\n\t}",
"@Override\n\tpublic void fatal(String message, Object p0, Object p1, Object p2, Object p3, Object p4,\n\t\t\tObject p5) {\n\n\t}",
"public void fatal(String message, Throwable throwable);",
"public void fatal(Object message, Throwable t)\n/* */ {\n/* 240 */ if (message != null) {\n/* 241 */ getLogger().fatalError(String.valueOf(message), t);\n/* */ }\n/* */ }",
"@Override\n\tpublic void fatal(MessageSupplier msgSupplier, Throwable t) {\n\n\t}",
"void fatal(String messageKey, Throwable throwable, Object... args);",
"@Override\n\tpublic void fatal(Supplier<?> msgSupplier) {\n\n\t}",
"private static void errorQuit(String message) \n\t{\n\t\tSystem.out.println(message);\n\t\tSystem.exit(1);\n\t}",
"void onFatal();",
"public void fatal(String msg) {\n LOGGER_BASE.fatal(msg);\n }",
"static void fail(String message) {\n Log.error(message);\n System.exit(1);\n }",
"public void report_fatal_error(String message, Object info) throws java.lang.Exception {\r\n done_parsing();\r\n report_error(message, info);\r\n }",
"@Override\n\tpublic void fatal(Supplier<?> msgSupplier, Throwable t) {\n\n\t}",
"@SuppressWarnings(\"unused\")\n protected void fatal(String msg) {\n if (this.getContainer() != null && this.getContainer().getLogger().isFatalEnabled()) {\n this.getContainer().getLogger().fatal(msg);\n }\n }",
"private static void exit()\n {\n System.out.println(\"Graceful exit\");\n System.exit(0);\n }",
"public abstract boolean isFatal();",
"private static void printUsageExitError(){\n\t\tSystem.out.println(usage);\n\t\tSystem.exit(1);\n\t}",
"private static void error( Exception e ) {\n e.printStackTrace();\n System.exit(-1);\n }",
"@Override\n public void fatal(String message) {\n if (Level.FATAL.getPriority() <= level.getPriority()) {\n print(\"FATAL: \" + message);\n }\n }",
"public static void errorAndExit() {\n System.out.println(\"USAGE:\");\n System.out.println(\"java MonkeySim <num_monkeys>\");\n System.out.println(\"<num_monkeys> must be a positive signed 32-bit integer\");\n System.exit(1);\n }",
"public boolean isFatalEnabled()\n/* */ {\n/* 266 */ return getLogger().isFatalErrorEnabled();\n/* */ }",
"public static void main(String args[]) {\n System.exit(0);\n }",
"public static void main(String[] args) {\n System.exit(0);\n }",
"protected void ERROR(String message)\n\t{\n\t\t//allow children to modify output\n\t\tPRINT(message);\n\t\tSystem.exit(1);\n\t}",
"public final void fatal(Component reporter, String message)\n\t{\n\t\tadd(new FeedbackMessage(reporter, message, FeedbackMessage.FATAL));\n\t}",
"public static void error(String msg) {\n System.err.println(\"Interpreter error: \" + msg);\n System.exit(-1);\n }",
"void outputError(String message) {\n\n fatalCount++;\n/*\n if (fatalCount == 1) {\n //fatalErrorsTable.addRow(ec.cr1ColRow(\n // \"Fatal errors\", true, \"red\", IHAlign.CENTER));\n TableRow row = new TableRow();\n row.addCell(new TableDataCell(\n \"<font color=red><b>Fatal errors</b></font>\").setHAlign(IHAlign.CENTER));\n fatalErrorsTable.addRow(row);\n } // if (fatalCount == 1)\n //fatalErrorsTable.addRow(ec.cr1ColRow(message));\n TableRow row = new TableRow();\n row.addCell(new TableDataCell(message));\n fatalErrorsTable.addRow(row);\n*/\n ec.writeFileLine(reportFile, message);\n if (dbg) System.out.println(\"<br>outputError: message = \" + message);\n }",
"public void usageError(String msg) {\n System.err.println(\"Usage error: \" + msg + \"\\n\");\n printUsage(System.err);\n System.exit(1);\n }",
"public static void main(String[] args) {\n\t\tint test = 0;\n\t\ttry{\n\t\t\tSystem.out.println(\"Hello World!\");\n\t\t\tif( test == 0 )\n\t\t\t\tthrow new Error(\"test\");\n\t\t\tSystem.out.println(\"Hello World!\");\n\t\t\tSystem.out.println(\"Hello World!\");\n\t\t\tSystem.out.println(\"Hello World!\");\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\n\tpublic void fatal(String message, Supplier<?>... paramSuppliers) {\n\n\t}",
"@Override\n\tpublic void fatal(Marker marker, String message, Supplier<?>... paramSuppliers) {\n\n\t}",
"@Override\n\tpublic boolean isFatalEnabled() {\n\t\treturn false;\n\t}",
"public DukeFatalException(String msg) {\n super(msg + \" Exiting Duke now...\");\n }",
"@JRubyMethod(name = \"fatal\")\n public IRubyObject fatal(final ThreadContext context,\n final IRubyObject msg, final Block block) {\n return context.runtime.newBoolean( add(FATAL, context, msg, block) );\n }",
"final private static void abort (final String message) {\n\t\tSystem.out.println(message) ;\n\t\tSystem.exit (1) ;\n }",
"public void fatal(Object message) {\n this.logger.fatal(message);\n }",
"protected final void fatal() throws SAXException {\n SAXParseException spe = new SAXParseException(\n \"Cannot recover after last error. Any further errors will be ignored.\", tokenizer);\n if (errorHandler != null) {\n errorHandler.fatalError(spe);\n }\n throw spe;\n }",
"private void fail(String message) {\n\t\t// we're pretty dramatic here, if a resource isn't available\n\t\t// we dump the message and exit the game\n\t\tLogger.severe(message);\n\t\tSystem.exit(0);\n\t}",
"public void fatalError(SAXParseException e) throws SAXException {\r\n\t\tERROR_CODE = -1;\r\n\t\tstack.clear();\r\n\t\tstack.push(new EFGString(\"Fatal error on line \"\r\n\t\t\t\t+ _locator.getLineNumber() + \", column \"\r\n\t\t\t\t+ _locator.getColumnNumber() + \":\\n\\t\" + e.getMessage()));\r\n\t\tSystem.err.println(\"Fatal error on line \" + _locator.getLineNumber()\r\n\t\t\t\t+ \", column \" + _locator.getColumnNumber() + \":\\n\\t\"\r\n\t\t\t\t+ e.getMessage());\r\n\t\tthrow e;\r\n\t}",
"public static void fatal(String stepName, String description) \n\t{\n\t\ttry{\n\t\t\ttest.log(LogStatus.FATAL, stepName, description);\n\t\t\tReporter.blnStatus=false;\n\t\t}catch(Exception e){fnPrintException(e);}\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tlog.debug(\"Debugging\");\n\t\tlog.info(\"Just FYI\");\n\t\tlog.error(\"Error message\");\n\n\t\tlog.fatal(\"Fatal Error\");\n\t}",
"public static void die(String... msg)\n {\n if (msg.length == 0)\n System.exit(1);\n System.err.println(msg[0]);\n System.exit(1);\n }",
"static void goodbye() {\n printGoodbyeMessage();\n System.exit(0);\n }",
"@Override\n\tpublic boolean isFatalEnabled(Marker marker) {\n\t\treturn false;\n\t}",
"public void fail(Exception e, String msg) {\r\n System.err.println(msg + \": \" + e);\r\n System.exit(1);\r\n }",
"static public void order66() {\n System.exit(0);\n }",
"public ProcessManagerException getFatalException() {\r\n return fatalException;\r\n }",
"@Override\n public boolean isSurroundingFatal() {\n return true;\n }",
"@SuppressWarnings(\"unused\")\n public static void fatal(String message) {\n FacesContext.getCurrentInstance()\n .addMessage(null,\n new FacesMessage(FacesMessage.SEVERITY_FATAL,\n FacesUtils.getlocalizedString(ResourceBundles.GENERAL, \"fatal\") + \"!\",\n message));\n }"
] | [
"0.75060767",
"0.7363449",
"0.72334033",
"0.71830016",
"0.71251476",
"0.7032012",
"0.6990918",
"0.6925294",
"0.6897276",
"0.6891846",
"0.6886927",
"0.6870044",
"0.68620986",
"0.68289745",
"0.682361",
"0.68147147",
"0.6805332",
"0.68048656",
"0.67774427",
"0.6767309",
"0.67672646",
"0.6712892",
"0.6712226",
"0.6704493",
"0.67008424",
"0.66769665",
"0.6672661",
"0.66702545",
"0.6667609",
"0.66529197",
"0.6650316",
"0.66457295",
"0.662499",
"0.6620993",
"0.6619312",
"0.6613926",
"0.66069806",
"0.660174",
"0.65982443",
"0.6588271",
"0.65748906",
"0.6569935",
"0.6564361",
"0.65620714",
"0.6557428",
"0.65544146",
"0.6517718",
"0.649235",
"0.649066",
"0.6481289",
"0.64790773",
"0.6465113",
"0.64357215",
"0.64262086",
"0.6384504",
"0.6384357",
"0.637161",
"0.6348364",
"0.6297009",
"0.62667483",
"0.624236",
"0.6236586",
"0.622274",
"0.6182795",
"0.6172596",
"0.61546665",
"0.6152798",
"0.61195815",
"0.610778",
"0.6107067",
"0.6088354",
"0.6012115",
"0.59816104",
"0.5970578",
"0.5968541",
"0.5942974",
"0.59346896",
"0.59206814",
"0.59190416",
"0.5895451",
"0.58904785",
"0.58875763",
"0.58732337",
"0.5855474",
"0.58489025",
"0.5843186",
"0.58413863",
"0.5822586",
"0.57864136",
"0.5785947",
"0.5762931",
"0.5753025",
"0.57256174",
"0.56927437",
"0.56854683",
"0.56811243",
"0.564378",
"0.563276",
"0.5603102",
"0.56019205"
] | 0.7358032 | 2 |
Get next name without skipping to next line (unlike sc.Next()) | public static String nextName( Scanner sc ) {
sc.skip( whitespace );
sc.skip( name );
return sc.match().group();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected String getNextName(String descriptor) throws Exception;",
"public String nextName() {\n expect(JsonType.NAME);\n\n String name = readString();\n skipWhitespace(input);\n char read = input.read();\n if (read != ':') {\n throw new JsonException(\n \"Unable to read name. Expected colon separator, but saw '\" + read + \"'\");\n }\n return name;\n }",
"String getNext();",
"String getNext();",
"private static String getName(){\r\n\t\treturn new StringBuilder(input.next()).substring(0,3);\r\n\t}",
"private String getNextLine() throws IOException {\n final BufferedReader in = this.in;\n if (in == null) {\n throw new NoSuchElementException();\n } else {\n final String nextLine = this.in.readLine();\n if (nextLine == null) {\n throw new NoSuchElementException();\n }\n return nextLine;\n }\n }",
"public String readNextText(final String name) {\r\n\t\tfinal StringBuilder result = new StringBuilder();\r\n\t\treturn result.toString();\r\n\t}",
"@Override\r\n\tpublic String next() {\n\t\tString nx;\r\n\r\n\t\tnx = p.getNext();\r\n\r\n\t\tif (nx != null) {\r\n\t\t\tthisNext = true;\r\n\t\t\tinput(nx);\r\n\t\t}\r\n\t\treturn nx;\r\n\t}",
"@Override\n public String next() {\n return bikes[currentIndex++];\n }",
"public String nextIdentifier()\n {\n int end = scanForIdentifier();\n if (end == position)\n return null;\n String result = input.substring(position, end);\n position = end;\n return result;\n }",
"public static String readNextLine() {\n return sc.nextLine();\n }",
"private String readPlayerName () {\n String name = \"\";\n while (name == \"\") {\n System.out.print(\"Enter player name: \");\n System.out.flush();\n name = in.next();\n in.nextLine();\n }\n return name;\n }",
"public String nextFileName() {\n\n\t\t// Get the next file from the search\n\n\t\ttry {\n\t\t\tString fileName = null;\n\t\t\twhile (m_rs.next()) {\n\t\t\t\tfileName = m_rs.getString(\"name\");\n\t\t\t\tif (m_filter == null || m_filter.matchesPattern(fileName) == true)\n\t\t\t\t\treturn fileName;\n\t\t\t}\n\t\t} catch (SQLException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}",
"public String next() {\n try {\n String result = fNextLine;\n if (fNextLine != null) {\n fNextLine = fIn.readLine();\n if (fNextLine == null) {\n fIn.close();\n }\n }\n\n return result;\n } catch (IOException e) {\n throw new IllegalArgumentException(e);\n }\n }",
"public String getName(String str) {\n\t\tSystem.out.print(str+\"할 학생 이름 입력 \");\n\t\tString name = sc.next();\n\t\treturn name;\n\t}",
"public String next()\r\n\t{\r\n\t\tif(st == null || !st.hasMoreTokens())\r\n\t\t\tnewst();\r\n\t\treturn st.nextToken();\r\n\t}",
"@Override\n public String next() {\n if (!nextElementSet && !setNextElement()) {\n throw new NoSuchElementException();\n }\n nextElementSet = false;\n return nextElement;\n }",
"private String next() {\n if (console) {\n return con.next();\n }\n return scan.next();\n }",
"@Override\n public String nextString() {\n last = (last + 1) % str.length;\n return str[last];\n }",
"@Override\n\tpublic String getNext() throws IOException {\n\t\ttry {\n\t\t\t// Ignore space, tab, newLine, commentary\n\t\t\tint nextVal = reader.read();\n\t\t\tnextVal = this.ignore(nextVal);\n\n\t\t\treturn (!isEndOfFile(nextVal)) ? this.getInstruction(nextVal) : null;\n\t\t} catch (java.io.IOException e) {\n\t\t\tthrow new IOException();\n\t\t}\n\n\t}",
"private String readWhoPlaysFirst () {\n String name, player1Name, player2Name;\n name = \"\";\n player1Name = player1.name();\n player2Name = player2.name();\n while (!(name.equals(player1Name.toLowerCase()) ||\n name.equals(player2Name.toLowerCase()) )) {\n System.out.print(\n \"Who plays first? (\" + player1Name +\n \" or \" + player2Name + \"): \");\n System.out.flush();\n name = in.next();\n name = name.toLowerCase();\n in.nextLine();\n }\n if (name.equals(player1Name.toLowerCase()))\n return player1Name;\n else\n return player2Name;\n }",
"private String name() {\n\t\tif (currentIndex >= data.length\n\t\t\t\t|| !Character.isLetter(data[currentIndex])) {\n\t\t\tthrow new LexerException();\n\t\t}\n\n\t\tString value = String.valueOf(data[currentIndex++]);\n\t\twhile (currentIndex < data.length\n\t\t\t\t&& (Character.isLetter(data[currentIndex])\n\t\t\t\t\t\t|| data[currentIndex] == '_'\n\t\t\t\t\t\t|| Character.isDigit(data[currentIndex]))) {\n\t\t\tvalue += data[currentIndex++];\n\t\t}\n\n\t\treturn value;\n\t}",
"@Override\r\n\tpublic String nextElement() {\n\t\treturn it.next();\r\n\t}",
"public NodeP findPatient (String name){\r\n NodeP current = front;\r\n \r\n while (!current.getPatient().getName().trim().equalsIgnoreCase(name)){\r\n current = current.getNext();\r\n }\r\n return current;\r\n }",
"@Override\r\n\t\tpublic E next() {\n\t\t\tcaret = caret.next();\r\n\t\t\tif (caret == null)\r\n\t\t\t\tthrow new NoSuchElementException();\r\n\t\t\tnextIndex++;\r\n\t\t\treturn caret.n.data[caret.idx];\r\n\t\t}",
"public E next()\r\n {\r\n E valueToReturn;\r\n\r\n if (!hasNext())\r\n throw new NoSuchElementException(\"The lister is empty\");\r\n \r\n // get the string from the node\r\n valueToReturn = cursor.getData();\r\n \r\n // advance the cursor to the next node\r\n cursor = cursor.getLink();\r\n \r\n return valueToReturn;\r\n }",
"public String getNextTask(String name){\n\t\tfor(int i =0;i<taskList.size();i++){\n\t\t\tif(name.equals(taskList.get(i).getName())){\n\t\t\t\tif(taskList.get(i).\n\t\t\t\t\tgetImportant()==true && taskList.get(i).\n\t\t\t\t\tgetUrgent()==false && taskList.get(i).\n\t\t\t\t\tgetStatus().equals(\"todo\")){\n\t\t\t\t\treturn taskList.get(i).getPrint();\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t\n\t\t}\n\t\t//System.out.println(\"This is end: \");\n\t\treturn \"null\";\n\t}",
"public String nextName(String descriptor) throws Exception\n {\n // Log the name usage globally across all namespaces\n String name = getNextName(descriptor);\n Integer intCount = (Integer)frequency.get(name);\n if (intCount == null)\n {\n frequency.put(name, new Integer(0));\n }\n else\n {\n frequency.remove(name);\n frequency.put(name, new Integer(intCount.intValue() + 1));\n }\n return name;\n }",
"private String getNextLine(Scanner input)\n\t{\n\t\tString line = input.nextLine().trim();\n\t\twhile ((line.length() == 0 || line.startsWith(\"#\") || line.startsWith(\"!\")) && input.hasNext())\n\t\t\tline = input.nextLine().trim();\n\t\tif (line.startsWith(\"#\") || line.startsWith(\"!\"))\n\t\t\tline = \"\";\n\t\treturn line;\n\t}",
"public String nextLine() {\n\t\treturn null;\r\n\t}",
"@Override\r\n public String next() {\n if(current<m_list.size())\r\n {\r\n String str = m_list.get(current);\r\n current++;\r\n return str;\r\n }\r\n m_list = getNextLevel(m_list, m_chars);\r\n current = 1;\r\n return m_list.get(0);\r\n \r\n }",
"private String getName() {\n System.out.println(\"Enter contact name\");\n return scannerForAddressBook.scannerProvider().nextLine();\n }",
"String getNextIdent (boolean startsWithAlpha) {\n int p = m_pos;\n char c = getChar ();\n if (startsWithAlpha && isAlpha (c) == false) { return null; }\n while ( isAlpha (c) || isNumber (c) || isSpecial (c) ) {\n c = getNextChar ();\n }\n return m_buffer.substring (p, m_pos);\n }",
"private String nextLine(BufferedReader reader) throws IOException {\n String ln = reader.readLine();\n if (ln != null) {\n int ci = ln.indexOf('#');\n if (ci >= 0)\n ln = ln.substring(0, ci);\n ln = ln.trim();\n }\n return ln;\n }",
"public String getName() {\n return this.lineName;\n }",
"Split getNext();",
"private String readNextLine() {\n StringBuilder sb = new StringBuilder();\n\n try {\n BufferedReader br = new BufferedReader(new InputStreamReader(stream));\n sb.append(br.readLine());\n } catch (IOException e) {\n e.fillInStackTrace();\n }\n\n return sb.toString();\n }",
"private String getNext(String current)\n\t{\n\t\tif(!chain.containsKey(current))\n\t\t\treturn null;\n\t\t\n\t\tSet<String> nextOptions = chain.get(current);\n\t\t\n\t\tif(nextOptions == null || nextOptions.size() == 0)\n\t\t\treturn null;\n\t\t\n\t\tObject[] nextArray = nextOptions.toArray();\n\t\t\n\t\treturn (String)(nextArray[(int)(Math.random() * nextArray.length)]); //get one from nextArray randomly\n\t}",
"java.lang.String getNextStep();",
"public String getNextLabel () {\n return nextLabel;\n }",
"public String readNextLine() throws IOException {\n if (this.reader == null) {\n return null;\n }\n\n boolean openNext = false;\n String line;\n while ((line = this.reader.readLine()) == null) {\n // The current file is read at the end, ready to read next one\n this.close(this.index);\n\n if (++this.index < this.readables.size()) {\n // Open the second or subsequent readables, need\n this.reader = this.open(this.index);\n openNext = true;\n } else {\n return null;\n }\n }\n // Determine if need to skip duplicate header\n if (openNext && isDuplicateHeader(line)) {\n line = this.readNextLine();\n }\n return line;\n }",
"public String getNextToken() {\n return this.nextToken;\n }",
"public String getNextToken() {\n return this.nextToken;\n }",
"public String getNextToken() {\n return this.nextToken;\n }",
"public String getNextToken() {\n return this.nextToken;\n }",
"public String readFirstLine() {\n if ( scanner.hasNextLine() ) {\n return scanner.nextLine();\n }\n return \"\";\n }",
"private List<String> nextRecord() {\n\t\t\t\t\tList<String> record = new LinkedList<String>();\n\t\t\t\t\twhile (lines.hasNext()) {\n\t\t\t\t\t\tString line = lines.next();\n\t\t\t\t\t\tif (line.startsWith(\"---\")) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\trecord.add(line);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\treturn record;\n\t\t\t\t}",
"Long getNextSequence(String seqName);",
"public char next()\n {\n char current = text[position];\n\n if (position > 0 && text[position - 1] == '\\n')\n {\n lineNo++;\n begin = position;\n }\n\n position++;\n\n return current;\n }",
"private String nextToken()\n {\n // ensure that the current line has a token\n while (line == null || !line.hasMoreTokens())\n {\n try\n {\n // attempt to input another line\n String newLine = in.readLine();\n if (newLine == null) // end of file encountered\n throw new MyInputException(\"End of file\");\n\n // convert newLine to tokens\n line = new StringTokenizer(newLine);\n }\n catch (IOException e)\n {throw new MyInputException(e.getMessage());}\n\n }\n\n // extract and return the next token\n return line.nextToken();\n }",
"public String getNextToken() {\n return nextToken;\n }",
"public String[] readNext() {\n\t\treturn null;\n\t}",
"protected Word getNext()\n/* */ {\n/* 63 */ Word token = null;\n/* 64 */ if (this.lexer == null) {\n/* 65 */ return token;\n/* */ }\n/* */ try {\n/* 68 */ token = this.lexer.next();\n/* 69 */ while (token == WhitespaceLexer.crValue) {\n/* 70 */ if (this.eolIsSignificant) {\n/* 71 */ return token;\n/* */ }\n/* 73 */ token = this.lexer.next();\n/* */ }\n/* */ }\n/* */ catch (IOException e) {}\n/* */ \n/* */ \n/* 79 */ return token;\n/* */ }",
"public A getName()\n {\n return first;\n }",
"public String nextLine()\n\t{\t\t\n\t\t\n\t\treturn this.getIn().nextLine();\n\t}",
"public Object nextElement () {\r\n return same_name_methods.elementAt (--same_name_methods_index);\r\n }",
"public static String getName(){\r\n String name = \"\";\r\n do{\r\n System.out.println(\"Please enter your name and press enter\");\r\n name = sc.nextLine();\r\n name = name.trim(); \r\n if(name.equals(\"\")){\r\n System.out.println(\"Error: Please put in name\");\r\n }\r\n }while(name.equals(\"\")); \r\n return name;\r\n }",
"public void getNames() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.println(\"Please enter a name: \");\n\t\twhile (sc.hasNextLine()) {\n\t\t\tString name = sc.nextLine();\n\t\t\tif (name.equals(\"\")) {\n\t\t\t\t//User is finished.\n\t\t\t\tSystem.out.println(\"Exiting the program\");\n\t\t\t\tSystem.exit(1);\n\t\t\t} else {\n\t\t\t\tgetSimilarNames(name);\n\t\t\t\tSystem.out.println(\"Please enter a name: \");\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public JsonToken nextToken()\n {\n if (_needEntry) {\n if (!_contents.hasNext()) {\n _currentName = null;\n _current = null;\n return null;\n }\n _needEntry = false;\n _current = _contents.next();\n _currentName = (_current == null) ? null : _current.getKey();\n return JsonToken.FIELD_NAME;\n }\n _needEntry = true;\n return FxNodeAsToken.asToken(_current.getValue());\n }",
"private String next(int i) throws IOException {\r\n\t\tif(buffer!=null) {\r\n\t\t\tString s=buffer;\r\n\t\t\tbuffer=null;\r\n\t\t\treturn s;\r\n\t\t}\r\n\t\tif (i==0) {\r\n\t\t\treturn in.readLine();\r\n\t\t} else return in2.readLine();\r\n\t}",
"@Override\n public E next() throws NoSuchElementException{\n lastItem = it.next();\n nextCount++;\n return(lastItem);\n }",
"public String readLine(){\n\t\tString line;\n\t\ttry{\n\t\t\tline=scanner.nextLine();\n\t\t}catch (NoSuchElementException e){\n\t\t\tline=null;\n\t\t}\n\t\treturn line;\n\t}",
"void next();",
"public final T next()\n {\n return skip(1);\n }",
"@Override\r\n public Object next() {\r\n if (this.hasNext()) {\r\n Object temp = this.nextMatchingFile;\r\n this.nextMatchingFile = this.callNext();\r\n return temp;\r\n } else {\r\n throw new NoSuchElementException(\"There is no other file object in the directory.\");\r\n }\r\n}",
"private String readLine() {\n\t\ttry {\n\t\t\treturn reader.nextLine();\t\n\t\t} catch (NoSuchElementException e) {\n\t\t\treturn null;\n\t\t}\n\t}",
"public final String next() {\n if (this.task_set == null)\n throw new IllegalStateException(\"must initialize the scheduler before using it\");\n\n String next = scheduler_next();\n return next;\n }",
"int next();",
"public String getNextToken() {\n return nextToken;\n }",
"@Override\n public T next() {\n T n = null;\n if (hasNext()) {\n // Give it to them.\n n = next;\n next = null;\n // Step forward.\n it = it.next;\n stop -= 1;\n } else {\n // Not there!!\n throw new NoSuchElementException();\n }\n return n;\n }",
"public abstract T next() throws NoSuchElementException;",
"private String nextLine() {\n if (console) {\n return con.nextLine();\n }\n return scan.nextLine();\n\n }",
"@Override\n\t\tpublic UserInfo next() {\n\t\t\tUserInfo info = userinfos.get(current);\n\t\t\tcurrent++;\n\t\t\treturn info;\n\t\t}",
"@Override\n\t\tpublic int next() {\n\t\t\treturn current++;\n\t\t}",
"@Override\n @Nonnull\n @CheckReturnValue\n public SplitString next() {\n if (offset == array.length) {\n throw new IllegalStateException(\"No more arguments to read\");\n }\n return array[offset++];\n }",
"@Override\n public Token next() throws IOException {\n\n if (hasNext()) {\n String next = splits.get(current++);\n if (isString(next)) {\n return new StringToken(next.substring(1, next.length() - 1));\n }\n if (isNumber(next)) {\n return new NumberToken(Double.parseDouble(next));\n }\n if (isSymbol(next)) {\n return new SymbolToken(next.charAt(0));\n }\n if (isName(next)) {\n return new NameToken(next);\n }\n throw new IOException(\"Invalid input.\");\n }\n\n return null;\n }",
"String getNextToken(java.util.StringTokenizer t) {\n return (t.hasMoreTokens() ? t.nextToken() : \"\");\n }",
"public String next() {\r\n\t\tif(firstVal) {\r\n\t\t\tfirstVal = true;\r\n\t\t\treturn getOutput();\r\n\t\t}\r\n\r\n\t\t// Build next lexicographic string and we use the getters to return, we use a finder method to accomplish this task.\r\n\t\tStringBuilder build = new StringBuilder(output);\r\n\t\tsetOutput((outputter(build, build.length()-1)).toString());\r\n\t\treturn getOutput();\r\n\t}",
"private char NEXT() {\r\n if (in >= input.length()) return '\\0';\r\n return (char) input.charAt(in);\r\n }",
"private String getFirstName() {\n System.out.println(\"Enter Your Last Name Of First Letter In Capital \");\n return sc.next();\n }",
"public String getNextMacro() throws IOException {\n\t\ttry {\n\t\t\tint pos = (int)reader.getFilePointer();\n\t\t\tint nextVal = reader.read();\n\t\t\tnextVal = ignore(nextVal);\n\t\t\tif (isMacro(nextVal)) {\n\t\t\t\treadUntilEndOfLine(nextVal);\n\t\t\t\treturn next;\n\t\t\t}\n\t\t\treader.seek(pos);\n\t\t\treturn null;\n\t\t} catch (java.io.IOException e) {\n\t\t\tthrow new IOException();\n\t\t}\n\t}",
"private int getNext() throws IOException {\n int ch;\n do {\n do {\n ch = in.read();\n\n // Ignore newlines and carage returns\n while ((ch == '\\n') || (ch == '\\r')) {\n ch = in.read();\n }\n\n if (ch == '{') {\n mDepth++;\n } else if (ch == '}') {\n mDepth--;\n }\n\n if (mLastCharWasInTextDepth && (mDepth != TEXT_DEPTH)) {\n // Return a blank every time when skipping a format group to avoid\n // two words being concatinated\n // Example: 'little{\\someGroup}cat' should not become 'littlecat',\n // but 'little cat'\n mLastCharWasInTextDepth = false;\n\n if (ch == -1) {\n return -1;\n } else {\n return ' ';\n }\n }\n }\n while (ch == '{' || ch == '}');\n }\n while ((mDepth != TEXT_DEPTH) && (ch != -1));\n\n mLastCharWasInTextDepth = true;\n\n return ch;\n }",
"@Override\r\n\t\t\t\t\tpublic K next() {\r\n\t\t\t\t\t\treturn nextEntry().getKey();//next() returns the key\r\n\t\t\t\t\t}",
"public Parameter readFirstParameter(String name) throws IOException {\r\n Parameter param = readNextParameter();\r\n Parameter result = null;\r\n \r\n while ((param != null) && (result == null)) {\r\n if (param.getName().equals(name)) {\r\n result = param;\r\n }\r\n \r\n param = readNextParameter();\r\n }\r\n \r\n this.stream.close();\r\n return result;\r\n }",
"public String next() {\n return words[rng.nextInt(words.length)];\n }",
"public Character next() {\n if (!hasNext())\n throw new NoSuchElementException();\n return string.charAt(index++);\n }",
"protected int getNextToken(){\n if( currentToken == 1){\n currentToken = -1;\n }else{\n currentToken = 1;\n }\n return currentToken;\n }",
"public String nextToken()\n {\n\n if (currentPosition >= maxPosition)\n {\n throw new NoSuchElementException();\n }\n\n int start = currentPosition;\n\n while ((currentPosition < maxPosition)\n && Character.isLetterOrDigit(str.charAt(currentPosition)))\n {\n currentPosition++;\n }\n\n if ((start == currentPosition)\n && (!Character.isLetterOrDigit(str.charAt(currentPosition))))\n {\n currentPosition++;\n }\n\n return str.substring(start, currentPosition);\n }",
"private void getNextToken() throws IOException {\n if (tok.ttype==LexAnn.TT_EOL) {\n if (code.getCurLine() < maxLine) {\n code.setCurLine(code.getCurLine()+1);\n tok.setString(code.getLine());\n tok.nextToken();\n } else {\n tok.ttype=LexAnn.TT_EOF; //the only place this gets set\n }\n } else {\n tok.nextToken();\n }\n }",
"private Token nextToken() {\n Token token = scanner.nextToken();\n lastSourcePosition = token.location.end;\n return token;\n }",
"public void next() throws IOException {\r\n if (hasNext()) {\r\n line = next;\r\n next = null;\r\n\r\n int split = line.indexOf('=');\r\n fid = line.substring(0, split);\r\n text = line.substring(split + 1).split(\"\\\\|\", -1);//use -1 as limit to include empty trailing spaces\r\n if (type.getAttributeCount() != text.length)\r\n throw new DataSourceException(\"format error: expected \" + type.getAttributeCount()\r\n + \" attributes, but found \" + text.length + \". [\" + line + \"]\");\r\n } else {\r\n throw new NoSuchElementException();\r\n }\r\n }",
"public Task getNextTask(final String name) {\n return null;\n }",
"public void next() {\n\t\t}",
"public abstract String getFirstLine();",
"public String getNext() {\n return nextStation;\n }",
"public String getNextLine() throws IOException {\n\n String currentLine = nextLine;\n this.nextLine = bufferedReader.readLine();\n\n return currentLine;\n }",
"@Override\r\n\tpublic T next() throws NoSuchElementException{\n\t\tif (hasNext()) {\r\n\t\t\tT curr = next.getData();\r\n\t\t\tnext = next.getNext();\r\n\t\t\treturn curr;\r\n\t\t}\r\n\t\telse throw new NoSuchElementException();\r\n\t\t\r\n\t}",
"private Object getNext(String txt, String originalText) {\n return getNext(txt, originalText, null);\n }",
"@Override\n\t\tpublic Character next() {\n\t\t\treturn elements.poll();\n\t\t}",
"public VCFLine getNextLine () throws IOException {\n\t\tgoNextLine();\n\t\treturn reader.getCurrentLine();\n\t}"
] | [
"0.697474",
"0.66500276",
"0.6634982",
"0.6634982",
"0.65042317",
"0.6321853",
"0.6308041",
"0.6307251",
"0.6295489",
"0.6259855",
"0.61629844",
"0.6104316",
"0.6085636",
"0.60227066",
"0.59301144",
"0.5879797",
"0.5855514",
"0.584721",
"0.58436394",
"0.58385277",
"0.5771328",
"0.5762411",
"0.57586855",
"0.5752251",
"0.57520276",
"0.57499707",
"0.5739139",
"0.5718562",
"0.5715454",
"0.5682652",
"0.56512076",
"0.5641793",
"0.5641381",
"0.56388015",
"0.563628",
"0.5620817",
"0.561826",
"0.5613368",
"0.5607442",
"0.5601543",
"0.5600923",
"0.5600367",
"0.5600367",
"0.5600367",
"0.5600367",
"0.5578396",
"0.55774784",
"0.5571094",
"0.556407",
"0.5550767",
"0.55476916",
"0.5546687",
"0.55399126",
"0.5533366",
"0.5519373",
"0.54982805",
"0.549364",
"0.5476945",
"0.5475539",
"0.54750776",
"0.54708964",
"0.54642624",
"0.5458234",
"0.5448006",
"0.5447151",
"0.54328233",
"0.5430628",
"0.54275525",
"0.5424979",
"0.5403759",
"0.54036367",
"0.5395428",
"0.5390848",
"0.538944",
"0.53729767",
"0.5362254",
"0.53599006",
"0.5350556",
"0.5349876",
"0.53471845",
"0.5345105",
"0.5344065",
"0.5342304",
"0.533164",
"0.5319212",
"0.531473",
"0.53132325",
"0.5305499",
"0.5293117",
"0.52882093",
"0.52755684",
"0.5261391",
"0.52537113",
"0.5251015",
"0.5248418",
"0.5242491",
"0.5241537",
"0.52383244",
"0.5228782",
"0.5225461"
] | 0.7452206 | 0 |
what pin of the destination name of a wire is sourcesrcpindestinationdstpin construct a new wire by scanning its description from the source file | public Wire( Scanner sc ) throws ConstructorFailure {
String sourceName = sc.next();
srcPin = sc.next();
String dstName = sc.next();
dstPin = sc.next();
//Bug: In the above, what if there are no next inputs?
source = Logic.findGate( sourceName );
destination = Logic.findGate( dstName );
if (source == null) {
Errors.warn( "No such source gate: Wire "
+ sourceName + " " + srcPin + " "
+ dstName + " " + dstPin
);
throw new ConstructorFailure();
}
if (destination == null) {
Errors.warn( "No such destination gate: Wire "
+ sourceName + " " + srcPin + " "
+ dstName + " " + dstPin
);
throw new ConstructorFailure();
}
// take care of source and destination pins
// Bug: This is a start, but in the long run, it might not be right
source.registerOutput( srcPin );
destination.registerInput( dstPin );
if (sc.hasNextFloat()) {
delay = sc.nextFloat();
if (delay < 0.0F) {
Errors.warn( "Negative delay: Wire "
+ sourceName + " " + srcPin + " "
+ dstName + " " + dstPin + " "
+ delay
);
delay = 99999.0F; // no failure needed, use bogus value
}
} else {
Errors.warn( "Floating point delay expected: Wire "
+ sourceName + " " + srcPin + " "
+ dstName + " " + dstPin + " "
);
delay = 99999.0F; // no failure needed, use bogus value
}
ScanSupport.lineEnd( sc, this.toString() );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private byte[] obtainPackets4Source(Packet packet){\n\t\t//filter IPV6\n\t\tif(packet.contains(IpPacket.class)){\n\t\t\t\n\t\t\tIpPacket ipPkt = packet.get(IpPacket.class);\n\t\t\tIpHeader ipHeader = ipPkt.getHeader();\n\t\t\n\t\t\tbyte[] src=ipHeader.getSrcAddr().getAddress();\n\t\t\tbyte[] dest = ipHeader.getDstAddr().getAddress();\n\t\t\t//source\n\t\tif(LogicController.headerChoice==1){\n\t\t\treturn src;\n\t\t\t\n\t\t\t\n\t\t}else if(LogicController.headerChoice==2){\n\t\t//source dest\n\t\t\treturn ByteArrays.concatenate(src, dest);\n\t\t\t\n\t\t}else if(LogicController.headerChoice==3){\n\t\t//3: source source port\n\t\t\tif(packet.contains(TcpPacket.class)){\n\t\t\t\tTcpPacket tcpPkt = packet.get(TcpPacket.class);\n\t\t\t\tTcpHeader theader = tcpPkt.getHeader();\n\t\t\t\tbyte[] port = theader.getSrcPort().valueAsString().getBytes();\n\t\t\t\treturn ByteArrays.concatenate(src,port);\n\t\t\t}else if(packet.contains(UdpPacket.class)){\n\t\t\tUdpPacket udpPacket = packet.get(UdpPacket.class);\n\t\t\t\tUdpHeader uh = udpPacket.getHeader();\n\t\t\t\tbyte[] port = uh.getSrcPort().valueAsString().getBytes();\n\t\t\t\treturn ByteArrays.concatenate(src,port);\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn ByteArrays.concatenate(src, dest);\n\t\t\t}\t\t\t\n\t\t\t\n\t\t}else if(LogicController.headerChoice==4){\n\t\t\t//4: dest dest port\t\n\t\t\tif(packet.contains(TcpPacket.class)){\n\t\t\t\tTcpPacket tcpPkt = packet.get(TcpPacket.class);\n\t\t\t\tTcpHeader theader = tcpPkt.getHeader();\n\t\t\t\tbyte[] port = ByteArrays.toByteArray(theader.getDstPort().valueAsInt());\n\t\t\t\treturn ByteArrays.concatenate(dest,port);\n\t\t\t}else if(packet.contains(UdpPacket.class)){\n\t\t\tUdpPacket udpPacket = packet.get(UdpPacket.class);\n\t\t\t\tUdpHeader uh = udpPacket.getHeader();\n\t\t\t\tbyte[] port = uh.getDstPort().valueAsString().getBytes();\n\t\t\t\treturn ByteArrays.concatenate(dest,port);\n\t\t\t}\n\t\t\t\n\t\t\telse{\n\t\t\t\treturn ByteArrays.concatenate(src, dest);\n\t\t\t}\n\t\t}else if(LogicController.headerChoice==5){\n\t\t\t \n\t\t\tif(packet.contains(TcpPacket.class)){\n\t\t\t\t\t\t\t\n\t\t\t\tTcpPacket tcpPkt = packet.get(TcpPacket.class);\n\t\t\t\tTcpHeader theader = tcpPkt.getHeader();\n\t\t\t\t\n\t\t\t\tbyte[] a = ByteArrays.concatenate(src,dest);\n\t\t\t\t //byte[] ipHeaderBytes = ByteArrays.concatenate(a,new byte[]{ipHeader.getProtocol().value().byteValue()});\n\t\t\t\t \n\t\t\t\t byte[] tVal =ByteArrays.concatenate(theader.getSrcPort().valueAsString().getBytes(),theader.getDstPort().valueAsString().getBytes());\n\t\t\t\t \n\t\t\t\t//src,dst,protocol,\n\t\t\t\t\t//Key key = new Key(ByteArrays.concatenate(ipHeaderBytes,tVal));\n\t\t\t\t\t\n\t\t\t\t\t//source\n\t\t\t\t\t//return new byte[](key,1);\n\t\t\t\t return ByteArrays.concatenate(a,tVal);\n\t\t\t\t \n\t\t\t}else if(packet.contains(UdpPacket.class)){\n\t\t\t\t\n\t\t\t\tUdpPacket tcpPkt = packet.get(UdpPacket.class);\n\t\t\t\tUdpHeader theader = tcpPkt.getHeader();\n\t\n\tbyte[] a = ByteArrays.concatenate(src,dest);\n\t //byte[] ipHeaderBytes = ByteArrays.concatenate(a,new byte[]{ipHeader.getProtocol().value().byteValue()});\n\t \n\t byte[] tVal =ByteArrays.concatenate(theader.getSrcPort().valueAsString().getBytes(),theader.getDstPort().valueAsString().getBytes());\n\t \n\t//src,dst,protocol,\n\t\t//Key key = new Key(ByteArrays.concatenate(ipHeaderBytes,tVal));\n\t\t\n\t\t//source\n\t\t//return new byte[](key,1);\n\t return ByteArrays.concatenate(a,tVal);\t \n}\n\t\t\t\n\t\t\telse{\n\t\t\t\treturn ByteArrays.concatenate(src,dest);\n\t\t\t}\n\t\t\t\n\t\t}else{\n\t\t\treturn ByteArrays.concatenate(src,dest);\n\t\t}\n\t}else{\n\t\treturn null;}\n\t}",
"private static Instruction getSRCFromRegister(Instruction instruction)\n\t{\n\t\tRegisgerName_Value<String, Integer> src1 = instruction.getSrc1();\n\t\tRegisgerName_Value<String, Integer> src2 = instruction.getSrc2();\n\t\tRegisgerName_Value<String, Integer> destination = instruction.getDestination();\n\t\tboolean isSrc1Valid = true, isSrc2Valid = true, isDestValid = true;\n\t\tboolean isBalValid = true;\n\n\t\tif (src1 != null)\n\t\t{\n\t\t\tisSrc1Valid = checkFlowDependencies(src1, \"E\");\n\t\t\tinstruction.setSrc1(readRegister(src1));\n\t\t}\n\t\tif (src2 != null)\n\t\t{\n\t\t\tisSrc2Valid = checkFlowDependencies(src2, \"E\");\n\t\t\tinstruction.setSrc2(readRegister(src2));\n\t\t}\n\t\tif (instruction.getOperation().equals(TypesOfOperations.BAL))\n\t\t{\n\t\t\tisBalValid = checkFlowDependencies(destination, \"E\");\n\t\t\tinstruction.setDestination(-1);\n\t\t}\n\t\tif (instruction.getOperation().equals(TypesOfOperations.STORE))\n\t\t{\n\t\t\tisDestValid = checkFlowDependencies(destination, \"E\") && checkFlowDependencies(destination, \"E2\")\n\t\t\t\t\t&& checkFlowDependencies(destination, \"M\");\n\t\t\tif (!isDestValid)\n\t\t\t{\n\t\t\t\tisDestValid = true;\n\t\t\t\tinstruction.setDestination(-1);\n\t\t\t} else\n\t\t\t{\n\t\t\t\tinstruction.setDestination(readRegister(destination));\n\t\t\t}\n\t\t\tisValidSource = isSrc1Valid && isSrc2Valid && isDestValid;\n\t\t\treturn instruction;\n\t\t}\n\t\tisValidSource = isSrc1Valid && isSrc2Valid && isBalValid;\n\t\treturn instruction;\n\t}",
"ElementCircuit getSource();",
"public void findDestination() {\n\t\t\n\t}",
"java.lang.String getSource();",
"java.lang.String getSource();",
"String getSource();",
"String getDest();",
"public interface Destination {\n String readLabel();\n}",
"public interface Destination {\n public String readLabel();\n}",
"private DatagramPacket injectSourceAndDestinationData(DatagramPacket packet)\n\t{\n\t\t\n\t\tbyte[] ipxBuffer = Arrays.copyOf(packet.getData(), packet.getLength());\n\t\tint bufferLength = ipxBuffer.length + 9;\n\t\t\n\t\tbyte[] wrappedBuffer = Arrays.copyOf(ipxBuffer, bufferLength);\n\t\twrappedBuffer[bufferLength - 9] = 0x01;\n\t\twrappedBuffer[bufferLength - 8] = (byte) (packet.getAddress().getAddress()[0]);\n\t\twrappedBuffer[bufferLength - 7] = (byte) (packet.getAddress().getAddress()[1]);\n\t\twrappedBuffer[bufferLength - 6] = (byte) (packet.getAddress().getAddress()[2]);\n\t\twrappedBuffer[bufferLength - 5] = (byte) (packet.getAddress().getAddress()[3]);\n\t\twrappedBuffer[bufferLength - 4] = (byte) (packet.getPort() >> 8);\n\t\twrappedBuffer[bufferLength - 3] = (byte) packet.getPort();\n\t\twrappedBuffer[bufferLength - 2] = (byte) (ipxSocket.getLocalPort() >> 8);\n\t\twrappedBuffer[bufferLength - 1] = (byte) ipxSocket.getLocalPort();\n\t\t\n\t\treturn new DatagramPacket(wrappedBuffer, bufferLength);\n\t}",
"public static PacketSource makePacketSource(String name) {\n\tif (name == null)\n\t name = \"sf@localhost:9001\"; // default source\n\n\tParseArgs parser = new ParseArgs(name, \"@\");\n\tString source = parser.next();\n\tString args = parser.next();\n\tPacketSource retVal = null;\n\t\n\n\tif (source.equals(\"sf\"))\n\t retVal = makeArgsSF(args);\n\tif (source.equals(\"old-sf\"))\n\t retVal = makeArgsOldSF(args);\n\tif (source.equals(\"dummy\"))\n\t retVal = makeDummy();\n\tif (source.equals(\"old-serial\"))\n\t retVal = makeArgsOldSerial(args);\n\tif (source.equals(\"old-network\"))\n\t retVal = makeArgsOldNetwork(args);\n\tif (source.equals(\"serial\"))\n\t retVal = makeArgsSerial(args);\n\tif (source.equals(\"network\"))\n\t retVal = makeArgsNetwork(args);\n\tif (source.equals(\"tossim-serial\"))\n\t retVal = makeArgsTossimSerial(args);\n\tif (source.equals(\"tossim-radio\"))\n\t retVal = makeArgsTossimRadio(args);\n\t//System.err.println(\"Built a Packet source for \"+Platform.getPlatformName(retVal.getPlatform()));\n\treturn retVal;\n }",
"private void createSource(String sourceName, String content) {\n\t\t\n\t}",
"String getSourceString();",
"public interface Source {\n /** NewTextSource creates a new Source from the input text string. */\n static Source newTextSource(String text) {\n return newStringSource(text, \"<input>\");\n }\n\n /** NewStringSource creates a new Source from the given contents and description. */\n static Source newStringSource(String contents, String description) {\n // Compute line offsets up front as they are referred to frequently.\n IntArrayList offsets = new IntArrayList();\n for (int i = 0; i <= contents.length(); ) {\n if (i > 0) {\n // don't add '0' for the first line, it's implicit\n offsets.add(i);\n }\n int nl = contents.indexOf('\\n', i);\n if (nl == -1) {\n offsets.add(contents.length() + 1);\n break;\n } else {\n i = nl + 1;\n }\n }\n\n return new SourceImpl(contents, description, offsets);\n }\n\n /** NewInfoSource creates a new Source from a SourceInfo. */\n static Source newInfoSource(SourceInfo info) {\n return new SourceImpl(\n \"\", info.getLocation(), info.getLineOffsetsList(), info.getPositionsMap());\n }\n\n /**\n * Content returns the source content represented as a string. Examples contents are the single\n * file contents, textbox field, or url parameter.\n */\n String content();\n\n /**\n * Description gives a brief description of the source. Example descriptions are a file name or ui\n * element.\n */\n String description();\n\n /**\n * LineOffsets gives the character offsets at which lines occur. The zero-th entry should refer to\n * the break between the first and second line, or EOF if there is only one line of source.\n */\n List<Integer> lineOffsets();\n\n /**\n * LocationOffset translates a Location to an offset. Given the line and column of the Location\n * returns the Location's character offset in the Source, and a bool indicating whether the\n * Location was found.\n */\n int locationOffset(Location location);\n\n /**\n * OffsetLocation translates a character offset to a Location, or false if the conversion was not\n * feasible.\n */\n Location offsetLocation(int offset);\n\n /**\n * NewLocation takes an input line and column and produces a Location. The default behavior is to\n * treat the line and column as absolute, but concrete derivations may use this method to convert\n * a relative line and column position into an absolute location.\n */\n Location newLocation(int line, int col);\n\n /** Snippet returns a line of content and whether the line was found. */\n String snippet(int line);\n}",
"public String parseSrc() throws Exception{\n\t\tr = new FileReader(userArg); \r\n\t\tst = new StreamTokenizer(r);\r\n\t\t st.eolIsSignificant(true);\r\n\t\t st.commentChar(46);\r\n\t\t st.whitespaceChars(9, 9);\r\n\t\t st.whitespaceChars(32, 32);\r\n\t\t st.wordChars(39, 39);\r\n\t\t st.wordChars(44, 44);\r\n\t\t \r\n\t\t //first we check for a specified start address\r\n\t\t while (InstructionsRead < 2) {\r\n\t\t \tif (st.sval != null) {\r\n\t\t \t\tInstructionsRead++;\r\n\t\t \t\tif (st.sval.equals(\"START\")) {\r\n\t\t \t\twhile(st.ttype != StreamTokenizer.TT_NUMBER) {\r\n\t\t \t\t\tst.nextToken();\r\n\t\t \t\t}\r\n\t\t \t\tDDnval = st.nval;\r\n\t\t \t\tstartAddress = Integer.parseInt(\"\" + DDnval.intValue(), 16);\r\n\t\t \t\tlocctr = startAddress;\r\n\t\t \t\tsLocctr = Integer.toHexString(locctr.intValue());\r\n\t\t \t\tif (sLocctr.length() == 1) {\r\n\t\t \t\t\tSystem.out.println(\"locctr: 000\" + Integer.toHexString(locctr.intValue()));\r\n\t\t \t\t}\r\n\t\t \t\telse if (sLocctr.length() == 2) {\r\n\t\t \t\t\tSystem.out.println(\"locctr: 00\" + Integer.toHexString(locctr.intValue()));\r\n\t\t \t\t}\r\n\t\t \t\telse if (sLocctr.length() == 3 ) {\r\n\t\t \t\t\tSystem.out.println(\"locctr: 0\" + Integer.toHexString(locctr.intValue()));\r\n\t\t \t\t}\r\n\t\t \t\telse {\r\n\t\t \t\t\tSystem.out.println(\"locctr: \" + Integer.toHexString(locctr.intValue()));\r\n\t\t \t\t}\r\n\t\t \t\t//writer.write(\"\" + locctr); //should write to IF, not working yet 2/15/2011\r\n\t\t \t\tstartSpecified = true;\r\n\t\t \t\t}\r\n\t\t \t\telse if (!st.sval.equals(\"START\") && InstructionsRead < 2) { //this should be the program name, also could allow for label here potentially...\r\n\t\t \t\t\t//this is the name of the program\r\n\t\t \t\t\t//search SYMTAB for label etc. \r\n\t\t \t\t\tname = st.sval;\r\n\t\t \t\t}\r\n\t\t \t}\r\n\t\t st.nextToken();\r\n\t\t }\r\n\t\t if (!startSpecified) {\r\n\t\t \tstartAddress = 0;\r\n\t\t \tlocctr = startAddress;\r\n\t\t }\r\n\t\t startAddress2 = startAddress;\r\n\t\t /*\r\n\t\t ATW = Integer.toHexString(startAddress2.intValue());\r\n\t\t \r\n\t\t for (int i = 0; i<(6-ATW.length()); i++){\r\n\t\t \tmyWriter.write(\"0\");\r\n\t\t }\r\n\t\t myWriter.write(ATW);\r\n\t\t myWriter.newLine();//end of line for now; in ReadIF when this line is read and translated to object code, the program length will be tacked on the end\r\n\t\t */\r\n\t\t \r\n\t\t //Now that startAddress has been established, we move on to the main parsing loop\r\n\t\t while (st.ttype != StreamTokenizer.TT_EOF) { //starts parsing to end of file\r\n\t\t \t//System.out.println(\"Stuck in eof\");\r\n\t\t \t//iLocctr = locctr.intValue();\r\n\t\t \tinstFound = false;\r\n\t\t \topcodeDone = false;\r\n\t\t \tlabelDone = false;\r\n\t\t \tmoveOn = true;\r\n\t\t \t//constantCaseW = false;\r\n\t\t \tconstantCaseB = false;\r\n\t\t \txfound = false;\r\n\t\t \tcfound = false;\r\n\t\t \t\r\n\t\t \tInstructionsRead = 0; //init InsRead to 0 at the start of each line\r\n\t\t \tSystem.out.println(\"new line\");\r\n\t\t \tSystem.out.println(\"Ins read: \" + InstructionsRead);\r\n\t\t \tsLocctr = Integer.toHexString(locctr.intValue());\r\n\t \t\tif (sLocctr.length() == 1) {\r\n\t \t\t\tSystem.out.println(\"locctr: 000\" + Integer.toHexString(locctr.intValue()));\r\n\t \t\t}\r\n\t \t\telse if (sLocctr.length() == 2) {\r\n\t \t\t\tSystem.out.println(\"locctr: 00\" + Integer.toHexString(locctr.intValue()));\r\n\t \t\t}\r\n\t \t\telse if (sLocctr.length() == 3 ) {\r\n\t \t\t\tSystem.out.println(\"locctr: 0\" + Integer.toHexString(locctr.intValue()));\r\n\t \t\t}\r\n\t \t\telse {\r\n\t \t\t\tSystem.out.println(\"locctr: \" + Integer.toHexString(locctr.intValue()));\r\n\t \t\t}\r\n\t\t \tif (foundEnd()) {\r\n\t\t \t\tbreak;\r\n\t\t \t}\r\n\t\t \twhile (st.ttype != StreamTokenizer.TT_EOL) {//breaks up parsing by lines so that InstructionsRead will be a useful count\r\n\t\t \t\t\r\n\t\t \t\tmoveOn = true;\r\n\t\t \t\tif (st.ttype == StreamTokenizer.TT_WORD) { \r\n\t\t \t\t\tInstructionsRead++;\r\n\t\t \t\t\tSystem.out.println(st.sval);\r\n\t\t \t\t\tSystem.out.println(\"Instructions Read: \" + InstructionsRead);\r\n\t\t \t\t\tif (foundEnd()) {\r\n\t\t \t\t\t\tbreak;\r\n\t\t \t\t\t}\r\n\t\t \t\t\t/*\r\n\t\t \t\t\t * The whole instructinsread control architecture doesn't quite work, because\r\n\t\t \t\t\t * the ST doesn't count the whitespace it reads in. This is by design because\r\n\t\t \t\t\t * the prof specified that whitespace is non-regulated and thus we cannot\r\n\t\t \t\t\t * predict exactly how many instances of char dec value 32 (space) will appear\r\n\t\t \t\t\t * before and/or between the label/instruction/operand 'fields'. \r\n\t\t \t\t\t * \r\n\t\t \t\t\t * What we could try alternatively is to structure the control around'\r\n\t\t \t\t\t * the optab, since it it static and populated pre-runtime. The schema might\r\n\t\t \t\t\t * go something like this: first convert whatever the sval or nval is to string.\r\n\t\t \t\t\t * Then call the optab.searchOpcode method with the resultant string as the input\r\n\t\t \t\t\t * parameter. If the string is in optab then it is an instruction and the ST is in the\r\n\t\t \t\t\t * instruction 'field' and boolean foundInst is set to true. If it is not in optab AND a boolean variable foundInst which resets to\r\n\t\t \t\t\t * false at the beginning of each new line is still false, then it is a label being declared in the label 'field'\r\n\t\t \t\t\t * If it is not in the optab AND foundInst is true, then the ST is at the operand 'field'.\r\n\t\t \t\t\t * This should work even if the prof has a crappy line with just a label declaration and no instruction or operand, because there\r\n\t\t \t\t\t * definitely cannot be an operand without an instruction...\r\n\t\t \t\t\t */\r\n\t\t \t\t\tif (instFound){\r\n\t\t \t\t\t\tprocessOperand(st);\r\n\t\t \t\t\t}\r\n\t\t \t\t\tif (!instFound) {//this is either label or instruction field\r\n\t\t \t\t\t\t//before anything, search optab to see if this might be the opcode\r\n\t\t \t\t\t\t//if it is an opcode, send it to the opcode processing function\r\n\t\t \t\t\t\tif (st.sval.equals(\"WORD\") || st.sval.equals(\"BYTE\")){//these are the directives... not technically instructions, but they go in the instruction field\r\n\t\t \t\t\t\t\tresCount = 0;\r\n\t\t \t\t\t\t\tif (st.sval.equals(\"WORD\")){\r\n\t\t \t\t\t\t\t\tif (hexDigitCount >= 55){\r\n\t\t \t\t\t\t\t\t\tnewTHandle();\r\n\t\t \t\t\t\t\t\t}\r\n\t\t \t\t\t\t\t\thexDigitCount += 6;\r\n\t\t \t\t\t\t\t}\r\n\t\t \t\t\t\t\tif (st.sval.equals(\"BYTE\")){\r\n\t\t \t\t\t\t\t\tconstantCaseB = true;\r\n\t\t \t\t\t\t\t}\r\n\t\t \t\t\t\t\tinstFound = true;\r\n\t\t \t\t\t\t\tprocessOpcode(st);\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\telse if (st.sval.equals(\"RESW\") || st.sval.equals(\"RESB\")){//these are the directives... not technically instructions, but they go in the instruction field\r\n\t\t \t\t\t\t\tresCount++;\r\n\t\t \t\t\t\t\tnewTHandle();\r\n\t\t \t\t\t\t\tinstFound = true;\r\n\t\t \t\t\t\t\tprocessOpcode(st);\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\telse if (optab.searchOpcode(st.sval)) {//if true this is the instruction\r\n\t\t \t\t\t\t\tresCount = 0;\r\n\t\t \t\t\t\t\tif (hexDigitCount >= 55){\r\n\t \t\t\t\t\t\t\tnewTHandle();\r\n\t \t\t\t\t\t\t}\r\n\t\t \t\t\t\t\thexDigitCount += 6;\r\n\t\t \t\t\t\t\tinstFound = true;\r\n\t\t \t\t\t\t\tprocessOpcode(st);\r\n\t\t \t\t\t\t\t//InstructionsRead++;\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\telse {//otherwise this is the label\r\n\t\t \t\t\t\t\tprocessLabel(st);\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\t\r\n\t\t \t\t\t\t\r\n\t\t \t\t\t\t\r\n\t\t \t\t\t}\r\n\t\t \t\t\t//else{ //if instFound is true, this must be the operand field\r\n\t\t \t\t\t\t\r\n\t\t \t\t\t\t//processOperand(st);\r\n\t\t \t\t\t//}\r\n\t\t \t\t\t//if (InstructionsRead == 3) {//this is the operand field\r\n\t\t \t\t\t\t//processOperand();\r\n\t\t \t\t\t\t\r\n\t\t \t\t\t//}\r\n\t\t \t\t}\r\n\t\t \t\t\r\n\t\t \t\tif (st.ttype == StreamTokenizer.TT_NUMBER) {\r\n\t\t \t\t\tInstructionsRead++;\r\n\t\t \t\t\tif (!instFound) {//this is either label or instruction field\r\n\t\t \t\t\t\t//before anything, search optab to see if this might be the opcode\r\n\t\t \t\t\t\t//if it is an opcode, send it to the opcode processing function\r\n\t\t \t\t\t\tif (NtoString(st.nval).equals(\"WORD\") || NtoString(st.nval).equals(\"BYTE\")){//these are the directives... not technically instructions, but they go in the instruction field\r\n\t\t \t\t\t\t\tresCount = 0;\r\n\t\t \t\t\t\t\tif (NtoString(st.nval).equals(\"WORD\")){\r\n\t\t \t\t\t\t\t\tif (hexDigitCount >= 55){\r\n\t\t \t\t\t\t\t\t\tnewTHandle();\r\n\t\t \t\t\t\t\t\t}\r\n\t\t \t\t\t\t\t\thexDigitCount += 6;\r\n\t\t \t\t\t\t\t}\r\n\t\t \t\t\t\t\tif (NtoString(st.nval).equals(\"BYTE\")){\r\n\t\t \t\t\t\t\t\tconstantCaseB = true;\r\n\t\t \t\t\t\t\t}\r\n\t\t \t\t\t\t\tinstFound = true;\r\n\t\t \t\t\t\t\tprocessOpcodeN(st);\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\tif (NtoString(st.nval).equals(\"RESW\") || NtoString(st.nval).equals(\"RESB\")){//these are the directives... not technically instructions, but they go in the instruction field\r\n\t\t \t\t\t\t\tresCount++;\r\n\t\t \t\t\t\t\tnewTHandle();\r\n\t\t \t\t\t\t\tinstFound = true;\r\n\t\t \t\t\t\t\tprocessOpcodeN(st);\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\telse if (optab.searchOpcode(\"\" + st.nval)) {\r\n\t\t \t\t\t\t\tresCount = 0;\r\n\t\t \t\t\t\t\tif (hexDigitCount >= 55){\r\n\t \t\t\t\t\t\t\tnewTHandle();\r\n\t \t\t\t\t\t\t}\r\n\t\t \t\t\t\t\thexDigitCount += 6;\r\n\t\t \t\t\t\t\tinstFound = true;\r\n\t\t \t\t\t\t\tprocessOpcodeN(st);\r\n\t\t \t\t\t\t\t//InstructionsRead++;\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\telse {\r\n\t\t \t\t\t\t\tprocessLabelN(st);\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\telse{ //this is the operand field\r\n\t\t \t\t\t\tprocessOperandN(st);\r\n\t\t \t\t\t}\r\n\t\t \t\t}\r\n\t\t \t\t\r\n\t\t \tif (moveOn){\r\n\t\t \tst.nextToken(); //read next token in current line\r\n\t\t \t}\r\n\t\t \t}\r\n\t\t \t////write line just finished to IF eventually\r\n\t\t if (moveOn){\r\n\t\t st.nextToken(); //read first token of next line\t\r\n\t\t }\r\n\t\t }\r\n\t\t programLength = (locctr - startAddress); \r\n\t\t programLength2 = programLength;\r\n\t\t System.out.println(\" !!prgmlngth2:\" + Integer.toHexString(programLength2.intValue()));\r\n\t\t /*\r\n\t\t sProgramLength = Integer.toHexString(programLength2.intValue());\r\n\t\t for (int i = 0; i<(6-sProgramLength.length()); i++){\r\n\t\t \tmyWriter.write(\"0\");\r\n\t\t }\r\n\t\t myWriter.write(sProgramLength);\r\n\t\t myWriter.close();\r\n\t\t ////myWriter.close();\r\n\t\t \r\n\t\t */\r\n\t\t r.close();\r\n\t\t System.out.println(\"?????!?!?!?!?ALPHA?!?!?!?!?!??!?!?!\");\r\n\t\t if (hexDigitCount/2 < 16){\r\n\t\t \tlineLength.add(\"0\" + Integer.toHexString(hexDigitCount/2));\r\n\t\t }\r\n\t\t else{\r\n\t\t lineLength.add(Integer.toHexString(hexDigitCount/2));\r\n\t\t }\r\n\t\t for (int i = 0; i<lineLength.size(); i++){\r\n\t\t System.out.println(lineLength.get(i));\r\n\t\t }\r\n\t\t // System.out.println(hexDigitCount);\r\n\t\t ReadIF pass2 = new ReadIF(this.optab,this.symtab,this.startAddress2,this.programLength2,this.name,this.lineLength,this.userArg);\r\n\t\t return st.sval;\r\n\t\t \r\n\t\t\r\n\r\n\t}",
"@VTID(27)\n java.lang.String getSourceName();",
"public String source(String src)\n\t{\n\t\tint i;\n\t\tString [] toks = src.split(\"\\\\s+\");\n\t\tString ret = toks[sourceStart];\n\t\tfor (i = sourceStart + 1; i < sourceEnd; i++) {\n\t\t\tret += \" \" + toks[i];\n\t\t}\n\t\treturn ret;\n\t}",
"private DestinationDefinition loadDestination(XMLStreamReader reader) throws XMLStreamException {\n\n DestinationDefinition destination = new DestinationDefinition();\n\n destination.setName(reader.getAttributeValue(null, \"name\"));\n\n String create = reader.getAttributeValue(null, \"create\");\n if (create != null) {\n destination.setCreate(CreateOption.valueOf(create));\n }\n\n String type = reader.getAttributeValue(null, \"type\");\n if (type != null) {\n destination.setDestinationType(DestinationType.valueOf(type));\n }\n\n loadProperties(reader, destination, \"destination\");\n\n return destination;\n\n }",
"String getDestinationName();",
"public SequentialNameMapping(Sentence source, Sentence sink)\n\t{\n\t\tSentencePattern pattern1 = new SentencePattern(source);\n\t\tSentencePattern pattern2 = new SentencePattern(sink);\n\n\t\tif (!pattern1.equals(pattern2))\n\t\t\tthrow new IllegalArgumentException(\"Different sentence Patterns: \" + pattern1 + \" vs. \" + pattern2);\n\n\t\tpattern = pattern1;\n\n\t\tList<CompName> sourceCompList = source.getCompositeNames();\n\t\tList<CompName> sinkCompList = sink.getCompositeNames();\n\n\t\tfor (int i = 0; i < sourceCompList.size(); i++)\n\t\t{\n\t\t\tCompName sourceElement = sourceCompList.get(i);\n\t\t\tCompName sinkElement = sinkCompList.get(i);\n\t\t\tsourceToSink.put(sourceElement, sinkElement);\n\t\t\tsinkToSource.put(sinkElement, sourceElement);\n\n\t\t\tif (sourceElement.getGeoNames().size() == sinkElement.getGeoNames().size())\n\t\t\t{\n\t\t\t\tfor (int j = 0; j < sourceElement.getGeoNames().size(); j++)\n\t\t\t\t{\n\t\t\t\t\tsourceToSink.put(new CompName(sourceElement.getGeoNames().get(j)),\n\t\t\t\t\t\t\tnew CompName(sinkElement.getGeoNames().get(j)));\n\t\t\t\t\tsinkToSource.put(new CompName(sinkElement.getGeoNames().get(j)),\n\t\t\t\t\t\t\tnew CompName(sourceElement.getGeoNames().get(j)));\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t}",
"int getNameSourceStart();",
"public abstract String getSource();",
"@Override\n\tpublic Object visitDeclaration_SourceSink(Declaration_SourceSink declaration_SourceSink, Object arg)\n\t\t\tthrows Exception {\n\t\tfv = cw.visitField(ACC_STATIC, declaration_SourceSink.name, \"Ljava/lang/String;\", null, null);\n\t\tfv.visitEnd();\n\t\tif(declaration_SourceSink.source!=null){\n\t\t\tdeclaration_SourceSink.source.visit(this, arg);\n\t\t\tmv.visitFieldInsn(PUTSTATIC, className, declaration_SourceSink.name, \"Ljava/lang/String;\");\n\t\t}\n\t\treturn null;\n\t}",
"private void processDetect(String destinationIP) {\n WeightedGraph graph = WeightedGraph.createFromLSD(this.routerDesc, this.lsd);\n WeightedGraph.Vertex root = graph.getVertex(this.routerDesc.simulatedIPAddress);\n WeightedGraph.Vertex target = graph.getVertex(destinationIP);\n\n if(target == null) {\n LOG.info(\"No target found\");\n return;\n }\n\n graph.execute(root);\n\n List<WeightedGraph.Vertex> path = graph.getPath(target);\n if(path == null) {\n LOG.info(\"No path found\");\n } else {\n WeightedGraph.Vertex from = null;\n StringBuilder pathBuild = new StringBuilder();\n\n for(WeightedGraph.Vertex v : path) {\n if(from != null) {\n WeightedGraph.Edge e = graph.getEdge(from, v);\n pathBuild.append(\" ->(\").append(e.cost).append(\") \");\n }\n\n pathBuild.append(v.value + \" \");\n from = v;\n }\n\n LOG.info(pathBuild.toString());\n }\n }",
"private Map<VWBetw, Set<VWBetw>> prepareSourceDestinationMap(\n KeyedGraph<VWBetw, Edge> graph,\n int sourceIndex,\n int destinationIndex) throws DriverException {\n // Initialize the map.\n Map<VWBetw, Set<VWBetw>> map =\n new HashMap<VWBetw, Set<VWBetw>>();\n // Go throught the source-destination table and insert each\n // pair into the map.\n for (int i = 0;\n i < sourceDestinationTable.getRowCount();\n i++) {\n Value[] row = sourceDestinationTable.getRow(i);\n \n VWBetw sourceVertex = graph.getVertex(\n row[sourceIndex].getAsInt());\n VWBetw destinationVertex = graph.getVertex(\n row[destinationIndex].getAsInt());\n \n Set<VWBetw> targets = map.get(sourceVertex);\n // Lazy initialize if the destinations set is null.\n if (targets == null) {\n targets = new HashSet<VWBetw>();\n map.put(sourceVertex, targets);\n }\n // Add the destination.\n targets.add(destinationVertex);\n }\n return map;\n }",
"public java.lang.String getDestination(){return this.destination;}",
"String getDest_typ();",
"String getAddress( String filename, String generator);",
"@Override\n public String toString() {\n return source + \" \" + destination;\n }",
"private void source_to_dest_path(int source, int dest, int[] forward_dist_tab, int[] list_Prevoius_Node, ArrayList<Integer> del_router)\n\t{\n\t\tif(del_router != null && del_router.contains(dest))\n\t\t\tSystem.out.println(\"Router \"+ (dest+1) +\" is deleted\");\n\t\telse if(del_router != null && del_router.contains(source))\n\t\t\tSystem.out.println(\"Router \"+ (source+1) +\" is deleted\");\n\t\telse\n\t\t{\n\t\t\tint[] prevNodes_List = list_Prevoius_Node;\n\t\t\tint k = dest;\n\t\t\tString path = \"\" + (dest+1);\n\t\t\t\n\t\t\t//Check if node is reachable that if it is connected in the graph then only proceed further\n\t\t\tif(forward_dist_tab[dest] != INFINITE_DIST)\n\t\t\t{\n\t\t\t\twhile(prevNodes_List[k] != source)\n\t\t\t\t{\n\t\t\t\t\tpath += \" >- \" + (prevNodes_List[k] + 1);\n\t\t\t\t\tk = prevNodes_List[k];\n\t\t\t\t}\n\t\t\t\t//for source node\n\t\t\t\tpath += \" >- \" + (source+1);\n\t\t\t\t\n\t\t\t\t//Back traversal is done using the previous node list\n\t\t\t\tString disp_path= new StringBuilder(path).reverse().toString();\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"\\nShortest distance from \"+ (source+1) +\" to \"+ (dest+1) +\":\");\n\t\t\t\tSystem.out.println(\"PATH: \"+ disp_path);\n\t\t\t\tSystem.out.println(\"COST: \" + forward_dist_tab[dest]);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"\\nRouter \"+ (dest+1) +\" is dead or unreachable.\");\n\t\t\t}\n\t\t}\n\t}",
"public interface SourceToFileLocation {\n\n /**\n *\n * @return the name of the source column corresponding to the sink column\n */\n String getSourceCol();\n\n /**\n *\n * @return the name of the field in FileLocation mapping to the source column.\n */\n String getCanonicalFieldName();\n}",
"public String getSource ();",
"DestinationNameParameter destinationType(DestinationType destinationType);",
"String getSourceVariablePart();",
"int getSourcePort();",
"public void setSDPair(String newSource, String newTarget) {\r\n\t\tthis.source = newSource;\r\n\t\tthis.target = newTarget;\r\n\t}",
"public String toString(){\n\tString sourceName;\n\tString destinationName;\n\t// its possible the wire has no source gate so this avoids null\n\t// pointer errors\n\tif( source == null){\n\t sourceName = \"No wire source\";\n\t} else {\n\t sourceName = this.source.name;\n\t}\n\t// provides the same check for destination gates\n\tif( destination == null ){\n\t destinationName = \"No wire destination\";\n\t} else {\n\t destinationName = this.destination.name;\n\t}\n\treturn \"Wire \" + sourceName + \" \"+ srcPin + \" \" +\n\t\tdestinationName + \" \" + \" \" + dstPin\n\t\t+ \" \" + delay;\n }",
"InboundHeadersParameter destinationName(String destinationName);",
"public String getSource();",
"void generateConnectionSource(JavaConnectionSourceDefinition definition, LogicalProducer producer) throws GenerationException;",
"Variable getSourceVariable();",
"Target convert(Source source);",
"public void setSource (String source);",
"private void constructSourceMetadata() throws Exception {\n final String masterTag = \"ifg\";\n final String slaveTag = \"dummy\";\n\n // get sourceMaster & sourceSlave MetadataElement\n final MetadataElement masterMeta = AbstractMetadata.getAbstractedMetadata(sourceProduct);\n final String slaveMetadataRoot = AbstractMetadata.SLAVE_METADATA_ROOT;\n\n /* organize metadata */\n\n // put sourceMaster metadata into the masterMap\n metaMapPut(masterTag, masterMeta, sourceProduct, masterMap);\n\n // pug sourceSlave metadata into slaveMap\n MetadataElement[] slaveRoot = sourceProduct.getMetadataRoot().getElement(slaveMetadataRoot).getElements();\n for (MetadataElement meta : slaveRoot) {\n metaMapPut(slaveTag, meta, sourceProduct, slaveMap);\n }\n\n }",
"public Node(String name, boolean isSource) {\n\t\tthis.name = name;\n\t\tthis.isSource = isSource;\n\t\tif (name.endsWith(\"}\")) {\n\t\t\tthis.name = name.substring(0, name.lastIndexOf(\"{\"));\n\t\t\tString [] split = name.substring(name.lastIndexOf(\"{\") + 1, name.length() - 1).split(\"\\\\-\");\n\t\t\tsourceStart = Integer.parseInt(split[0]);\n\t\t\tsourceEnd = Integer.parseInt(split[1]);\n\t\t}\n\t}",
"Optional<String> getSource();",
"public static String sourceHelp() {\n\treturn\n\" sf@HOSTNAME:PORTNUMBER - a serial forwarder\\n\" +\n\" serial@SERIALPORT:BAUDRATE - a mote connected to a serial port\\n\" +\n\" (using TOSBase protocol)\\n\" +\n\" network@HOSTNAME:PORTNUMBER - a mote whose serial port is accessed over\\n\" +\n\" the network (using TOSBase protocol)\\n\" +\n\" old-serial@SERIALPORT[:BAUDRATE][,PACKET-SIZE]\\n\" +\n\" - a mote connected to a serial port\\n\" +\n\" (old, broken protocol - avoid if possible)\\n\" +\n\" old-network@HOSTNAME:PORTNUMBER[,PACKET-SIZE]\\n\" +\n\" - a mote whose serial port is accessed over\\n\" +\n\" the network (old, broken protocol)\\n\" +\n\" dummy - a packet sink and dummy-packet source\\n\" +\n\" tossim-serial[@HOSTNAME] - the serial port of tossim node 0\\n\"+\n\" tossim-radio[@HOSTNAME] - the radios of tossim nodes\\n\"+\n\"where BAUDRATE can be a specific baud rate or a mote model name\\n\"+\n\"(e.g., mica2 or mica2dot). Specifying a mote model name picks the standard\\n\"+\n\"baud-rate for that mote. PACKET-SIZE is the packet-size (default 36) for\\n\"+\n\"old, broken protocols.\\n\" +\n\"Examples: serial@COM1:mica2, serial@COM2:19200, sf@localhost:9000\";\n }",
"Node getSourceNode();",
"int getDestinationPort();",
"int getDestinationPort();",
"@Override\n public String getName() {\n return source.getName();\n }",
"private void installRuleToHostSrc(String destVertex,short vlanNum, short inPort)\n\t{\n\t\tinstallRule(destVertex, m_switchSrcPortToHostSource, vlanNum,RULE_TYPE.DEST_IPV4 );\n\t\tinstallRule(destVertex, m_switchSrcPortToHostSource, vlanNum,RULE_TYPE.DEST_ARP);\n\t}",
"public void setDestination(String destination1) {\r\n this.destination = destination1;\r\n }",
"private void buildSourceTable()\n {\n // validate\n Util.argCheckNull(_dt);\n\n // get entities\n try\n {\n DataSourceDobj ds = _dt.getSourceDataSource();\n Util.argCheckNull(ds);\n Vector entities = ds.getEntities();\n\n // iterate entities\n EntityDobj ent;\n for(int i = 0; entities != null && i < entities.size(); i++)\n {\n // get the entity\n ent = (EntityDobj)entities.elementAt(i);\n\n // add to source table if not in target table\n if(ent != null)\n {\n // search target list\n boolean inTarget = false;\n TransferEntity te;\n for(int j = 0; !inTarget && j < _lstTarget.getDefaultModel().getSize(); j++)\n {\n te = (TransferEntity)_lstTarget.getDefaultModel().getElementAt(j);\n if(te != null && te.getSourceEntityName().equalsIgnoreCase(ent.getName()))\n inTarget = true;\n }\n\n // if !inTarget add to source\n if(!inTarget)\n _lstSource.addItem(ent);\n }\n }\n }\n catch(Exception e)\n {\n throw new RuntimeException(\"TransferEntitiesPanel.buildSourceTable: \" + e.toString());\n }\n }",
"private GraphConnection CreateConnection(String source, String destination) {\n\t\tif (nodes.size() == 0) {\r\n\t\t\tthrow new IllegalStateException(\"Nodes needed\");\r\n\t\t}\r\n\r\n\t\telse {\r\n\t\t\tGraphNode src = null;\r\n\t\t\tGraphNode dest = null;\r\n\t\t\tfor (GraphNode node : nodes) {\r\n\t\t\t\tif (node.getText().equals(source)) {\r\n\t\t\t\t\tsrc = node;\r\n\t\t\t\t} else if (node.getText().equals(destination)) {\r\n\t\t\t\t\tdest = node;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (src == null || dest == null) {\r\n\t\t\t\tthrow new IllegalStateException(\r\n\t\t\t\t\t\t\"At least one of the nodes doesn't exist\");\r\n\t\t\t} else {\r\n\t\t\t\treturn new GraphConnection(graph, SWT.None, src, dest);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void populateDestStationCodes() {\n\t\ttry {\n\t\t\tString stationCode = handler.getStationCode();\n\t\t\tStationsDTO[] station = null;\n\t\t\tif (stationCode != null) {\n\t\t\t\tstation = handler.getAllAssociatedStations();\n\t\t\t}\n\t\t\tif (null != station) {\n\t\t\t\tint len = station.length;\n\n\t\t\t\tfor (int i = 0; i < len; i++) {\n\t\t\t\t\tcoStation.add(station[i].getName() + \" - \"\n\t\t\t\t\t\t\t+ station[i].getId());\n\t\t\t\t}\n\n\t\t\t}\n\t\t} catch (Exception exception) {\n\t\t\texception.printStackTrace();\n\t\t}\n\t}",
"public abstract Element getSourceElement(Element forElement) throws IOException;",
"public void setSource(String source);",
"public String find(String start, String theDest) {\n\t\tint hops = 1;\n\t\tString result = \"\";\n\t\tif(nodes.containsKey(theDest)) {\n\t\t\tfor(Integer portNum : nodes.get(start).port.keySet()){\n\t\t\t\thops = 1;\n\t\t\t\tresult += sequence + \"\\t\\t\" + theDest + \"\\t \" + portNum + \"\\t \" + findNodes(nodes.get(start).port.get(portNum), hops, theDest) + \"\\t \" + nodes.get(theDest).time + \"\\n\";\n\t\t\t\tsequence++;\n\t\t\t}\n\t\t} else if(start.equals(theDest)) {\n\t\t\tresult = \"Same address\";\n\t\t}else {\n\t\t\tresult = \"address not found\";\n\t\t}\n\t\tsequence++;\n\t\treturn result;\n\t}",
"private ArrayList<Pair> getPossibleDestinations(int sourceRow, int sourceCol, int dr, int dc) {\n ArrayList<Pair> possibleDest = new ArrayList<>();\n\n for (int i = 1; i < 8; i++) {\n\n int destRow = sourceRow + dr * i;\n int destCol = sourceCol + dc * i;\n\n if (0 <= destRow && destRow < 8 && 0 <= destCol && destCol < 8)\n possibleDest.add(new Pair<>(destRow, destCol));\n else\n break;\n }\n\n return possibleDest;\n }",
"final public void fieldFromSrc(){\n List<String> lines = readSrc();\n size = Integer.parseInt(lines.get(0));\n Tile[] tiles = new Tile[size*size];\n int count = 0;\n Tile t;\n \n char[][] fieldChars = new char[size][size];\n \n for(int Y=0; Y<size; Y++){\n for(int X=0; X<size; X++){\n try{\n fieldChars[X][Y] = lines.get(Y+1).charAt(X);\n }catch(StringIndexOutOfBoundsException e){\n System.out.println(e);\n }\n }\n }\n \n for(int Y=0; Y<size; Y++){\n for(int X=0; X<size; X++){\n Coordinaat C = new Coordinaat(X,Y); \n switch(fieldChars[X][Y]){\n case 'M' : \n t = new Muur(C); \n break;\n case 'V' :\n t = new Veld(C);\n break;\n case 'E' :\n t = new EindVeld(C);\n break;\n default :\n t = new Tile(C);\n break;\n }\n tiles[count] = t;\n count++;\n }\n }\n \n fillField(tiles,size);\n createMoveAbles(lines.subList(size+2, lines.size()));\n }",
"Integer destinationPort();",
"public static void findShortestRoadMap(String fileName, String source, String dest, String outputName){\n try {\n PrintWriter writer = new PrintWriter(outputName, \"UTF-8\");\n\n Dijkstra d = new Dijkstra(new Graph(fileName));\n writer.println(d.getPath(source, dest));\n writer.close();\n\n System.out.println(\"Wrote path to file \" + outputName);\n } catch (Exception e){\n e.printStackTrace();\n }\n }",
"private Resource findDDRSource(Resource resource) {\n Resource answer = null;\n if (resource != null) {\n ValueMap properties = resource.getValueMap();\n String ddrTargetPath = properties.get(DDR_TARGET_PROPERTY_NAME, String.class);\n if (ddrTargetPath == null) {\n answer = findDDRSource(resource.getParent());\n } else {\n answer = resource;\n }\n }\n return answer;\n }",
"public final int findMaxFlow(final String[] sources, final String[] destinations) {\r\n\t\t//TODO Add you code here\r\n if(Arrays.equals(sources, destinations)){\r\n return SOURCES_SAME_AS_DESTINATIONS;\r\n } else{\r\n Node startNode;\r\n String sourceName = sources[0];\r\n String sinkName = destinations[0];\r\n\r\n //check if sources/sinks exists and if multiple sources/sinks, create \"superSource/-Sink\"\r\n boolean sourceNotFound = false;\r\n if (sources.length > 1){\r\n sourceNotFound = addSuperNode(\"superSource\", sources);\r\n sourceName = \"superSource\";\r\n }else\r\n sourceNotFound = findNode(sourceName) == null;\r\n boolean destinationNotFound = false;\r\n if (destinations.length > 1){\r\n destinationNotFound = addSuperNode(\"superSink\", destinations);\r\n sinkName = \"superSink\";\r\n }else\r\n destinationNotFound = findNode(sinkName) == null;\r\n\r\n if(sourceNotFound && destinationNotFound)\r\n return NO_SOURCE_DESTINATION_FOUND;\r\n else if (sourceNotFound)\r\n return NO_SOURCE_FOUND;\r\n else if (destinationNotFound)\r\n return NO_DESTINATION_FOUND;\r\n\r\n //set flow to 0\r\n setZero();\r\n ArrayList<Node> path = new ArrayList<>();\r\n startNode = findNode(sourceName);\r\n //find first path, if no path found return NO_PATH\r\n Node pathNode = pathfinder.findPathFlow(sourceName, sinkName, nodes);\r\n if (pathNode.getName().equals(\"null\") && pathNode.getDelay() == -4)\r\n return NO_PATH;\r\n //main loop;\r\n while (pathNode.getName() != \"null\") {\r\n double flow = Double.POSITIVE_INFINITY;\r\n path.clear();\r\n //find minimum residual capacity in path as new flow\r\n while (pathNode != null) {\r\n path.add(pathNode);\r\n if (pathNode != startNode && pathNode.getEdgeToPrevious().getResidualFlow() < flow)\r\n flow = pathNode.getEdgeToPrevious().getResidualFlow();\r\n pathNode = pathNode.getPreviousInPath();\r\n }\r\n //add min(new flow. residual capacity) to old flow, and subtract same from residual capacity\r\n for (int i = 0; i < path.size(); i++) {\r\n if (path.get(i) != startNode) {\r\n path.get(i).getEdgeToPrevious().setFlow(path.get(i).getEdgeToPrevious().getFlow() + Math.min(flow, path.get(i).getEdgeToPrevious().getResidualFlow()));\r\n path.get(i).getEdgeToPrevious().setResidualFlow(path.get(i).getEdgeToPrevious().getResidualFlow() - Math.min(flow, path.get(i).getEdgeToPrevious().getResidualFlow()));\r\n }\r\n }\r\n //find next path\r\n pathNode = pathfinder.findPathFlow(sourceName, sinkName, nodes);\r\n }\r\n //after algorithm is done maximum flow is the summation of all the outgoing flows of all the sources/destinations\r\n return startNode.getOutgoingFlow();\r\n }\r\n\t}",
"Type getSource();",
"private void checkSourcesAndDestinationsExistence(final LinkDTO dto) throws FunctionalException {\n\t\tif (dto.getSources() == null) {\n\t\t\tthrow new FunctionalException(FunctionalException.Code.NULL_ARGUMENT, null, \"(source component)\");\n\t\t}\n\t\tif (dto.getDestinations() == null) {\n\t\t\tthrow new FunctionalException(FunctionalException.Code.NULL_ARGUMENT, null, \"(destination component)\");\n\t\t}\n\t\t// check existence of sources and destination Components\n\t\tfor (HasNameAndIdDTO compDTO : dto.getSources()) {\n\t\t\tif (explorer.getComponentByID(compDTO.getId()) == null) {\n\t\t\t\tthrow new FunctionalException(FunctionalException.Code.TARGET_NOT_FOUND, null, \"(source component)\");\n\t\t\t}\n\t\t}\n\t\tfor (HasNameAndIdDTO compDTO : dto.getDestinations()) {\n\t\t\tif (explorer.getComponentByID(compDTO.getId()) == null) {\n\t\t\t\tthrow new FunctionalException(FunctionalException.Code.TARGET_NOT_FOUND, null, \"(destination component)\"\n\t\t\t\t\t\t+ compDTO.getId());\n\t\t\t}\n\t\t}\n\t}",
"MafSource readSource(File sourceFile);",
"State getSource();",
"private void addEdgeWithLabel(NasmInst source, NasmLabel destination) {\n if (source == null || destination == null)\n throw new FgException(\"ERROR: Can't create an edge without a source and a destination\");\n\n if (systemCalls.contains(destination.toString()))\n return; // System call: iprintLF, readline or atoi. No edge needed\n\n NasmInst destinationInst = label2Inst.get(destination.toString());\n if (destinationInst == null)\n throw new FgException(\"ERROR: No instruction matching with the given label\");\n addEdgeWithInst(source, destinationInst);\n }",
"public interface Source {\r\n\t\t\t\t\t\r\n\t/** A source needs to have funds or credit available so it can have money pulled from it for\r\n\t * whatever purpose the funds are needed. This is the predict loss implementation for use\r\n\t * with the prediction algorithm. It processes the loss for this source by updating its\r\n\t * prediction rows appropriately (i.e. removing or adding to the sources funds or credit). This\r\n\t * method should also be capable of handling an add back to the source.\r\n\t * \r\n\t * @param destinationDescription - a string description of what the funds are being used for. Used for the transaction history\r\n\t * @param lossAmount - the amount of funds needed\r\n\t * @param addBack - true if the destination is a budget item and that budget item has funds to add back to the source\r\n\t * @param addBackAmount - the amount to add back to the source (if applicable)\r\n\t * @param dayIndex - the date as an index or offset from prediction start date\r\n\t * \r\n\t */\r\n\tpublic void predictLossForDayIndex(String destinationDescription, double lossAmount, boolean addBack, double addBackAmount, int dayIndex);\r\n\t\r\n\t/**\r\n\t * A source should be able to tells us a unique description of itself (its name).\r\n\t * @return this source's unique name\r\n\t */\r\n\tpublic String name();\r\n}",
"private void doPinNames() {\n final String RESERVED = \"Reserved\";\n\n if (donePinNames) {\n return;\n }\n donePinNames = true;\n StringBuilder sb = new StringBuilder();\n sb.append(\n \"/**\\n\"+\n \" * LLWU pin sources\\n\"+\n \" */\\n\"+\n \"enum LlwuPin : uint32_t {\\n\"\n );\n InfoTable pinTable = getPeripheral().getSignalTables().get(0);\n for (int index=0; index<32; index++) {\n String choiceName = \"llwu_pe\"+((index/4)+1)+\"_wupe\"+index;\n ChoiceVariable choiceVar = safeGetChoiceVariable(choiceName);\n if (choiceVar == null) {\n continue;\n }\n String llwuPinName;\n if (index>=pinTable.table.size()) {\n // Pin not in table (doesn't exist)\n choiceVar.enable(false);\n llwuPinName = RESERVED;\n }\n else {\n // Look up possible pin mapping in table\n Signal signal = pinTable.table.elementAt(index);\n Pin mappablePin = null;\n if (signal != null) {\n TreeSet<MappingInfo> pinMappings = signal.getPinMapping();\n for (MappingInfo pinMapping:pinMappings) {\n if (pinMapping.getMux() == MuxSelection.mux1) {\n mappablePin = pinMapping.getPin();\n }\n }\n }\n if (mappablePin == null) {\n // No mappable pin\n choiceVar.enable(false);\n llwuPinName = RESERVED;\n }\n else {\n // Mappable pin\n choiceVar.enable(true);\n llwuPinName = mappablePin.getName();\n }\n }\n if (llwuPinName != RESERVED) {\n String llwuPinLine = String.format(\n \" LlwuPin_%-15s = %2d, //!< Wake-up pin LLWU_P%d\\n\", \n capitalCase(llwuPinName), index, index); \n sb.append(llwuPinLine);\n }\n choiceVar.setDescription(choiceVar.getDescription() + \" - \"+llwuPinName);\n }\n sb.append(\"};\\n\\n\");\n StringVariable llwuPinsVar = new StringVariable(\"LlwuPins\", getPeripheral().makeKey(\"LlwuPins\"));\n llwuPinsVar.setValue(sb.toString());\n llwuPinsVar.setDerived(true);\n getPeripheral().addVariable(llwuPinsVar);\n\n sb = new StringBuilder();\n sb.append(\n \"/**\\n\"+\n \" * LLWU peripheral sources\\n\"+\n \" */\\n\"+\n \"enum LlwuPeripheral : uint32_t {\\n\"\n );\n for (int index=0; index<=7; index++) {\n String choiceName = \"llwu_me_wume\"+index;\n BooleanVariable choiceVar = safeGetBooleanVariable(choiceName);\n String llwuPeripheralName;\n if (choiceVar != null) {\n llwuPeripheralName = choiceVar.getDescription();\n String llwuPeripheralLine = String.format(\n \" LlwuPeripheral_%-15s = (1<<%d), //!< Wake-up peripheral LLWU_M%dIF\\n\", \n capitalCase(llwuPeripheralName), index, index\n );\n sb.append(llwuPeripheralLine);\n }\n }\n sb.append(\"};\\n\\n\");\n StringVariable llwuPeripheralsVar = new StringVariable(\"LlwuPeripherals\", getPeripheral().makeKey(\"LlwuPeripherals\"));\n llwuPeripheralsVar.setValue(sb.toString());\n llwuPeripheralsVar.setDerived(true);\n getPeripheral().addVariable(llwuPeripheralsVar);\n }",
"public String copy(SQLGenerator dstGen, String srcConstraint,\n boolean includeDstGenFields) throws SQLException{\n \n if (dstGen==null) return null;\n srcConstraint = srcConstraint==null ? \"\" : \" where \" + srcConstraint;\n \n String q = \"select * from \" + dstGen.getTableName() + srcConstraint;\n \n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(q);\n ResultSetMetaData rsmd = rs.getMetaData();\n int colCount = rsmd.getColumnCount();\n \n while (rs.next()){\n SQLGenerator gen = (SQLGenerator)dstGen.clone();\n for (int i=1; i<=colCount; i++){\n String colName = rsmd.getColumnName(i);\n String colValue = rs.getString(i);\n if ((dstGen.getFieldValue(colName))==null){\n if (colValue!=null)\n gen.setField(colName, colValue);\n }\n else if (!includeDstGenFields){\n if(dstGen.getFieldValue(colName).equals(\"\"))\n gen.removeField(colName);\n }\n }\n \n log(gen.insertStatement());\n stmt.executeUpdate(gen.insertStatement());\n }\n \n if (includeDstGenFields)\n return null;\n else\n return searchEngine.getLastInsertID();\n }",
"java.lang.String getDestRange();",
"@Override\n public String getDestination() {\n return this.dest;\n }",
"public static List<String> getstrcpyConstraints(String dest, String srcContent){\n\t\tList<String> constraints = new ArrayList<String>();\n\t\tString assertion = \"(assert (= \" + dest + \" \" + srcContent + \"))\";\n\t\tconstraints.add(assertion);\n\t\treturn constraints;\n\t}",
"private void addEdgeWithInst(NasmInst source, NasmInst destination) {\n if (source == null || destination == null)\n throw new FgException(\"ERROR: Can't create an edge without a source and a destination\");\n Node from = inst2Node.get(source);\n Node to = inst2Node.get(destination);\n if (from == null || to == null)\n throw new FgException(\"ERROR: No nodes matching with given Source or destination \");\n graph.addEdge(from, to);\n }",
"public void addSDESInfo(RTCPSDES chunk) {\n int ci = 0;\n while (ci < chunk.items.length && chunk.items[ci].type != 1) {\n ci++;\n }\n String s = new String(chunk.items[ci].data);\n String sourceinfocname = null;\n if (this.sourceInfo != null) {\n sourceinfocname = this.sourceInfo.getCNAME();\n }\n if (!(this.sourceInfo == null || s.equals(sourceinfocname))) {\n this.sourceInfo.removeSSRC(this);\n this.sourceInfo = null;\n }\n if (this.sourceInfo == null) {\n this.sourceInfo = this.cache.sourceInfoCache.get(s, this.ours);\n this.sourceInfo.addSSRC(this);\n }\n if (chunk.items.length > 1) {\n for (int i = 0; i < chunk.items.length; i++) {\n s = new String(chunk.items[i].data);\n switch (chunk.items[i].type) {\n case 2:\n if (this.name != null) {\n this.name.setDescription(s);\n break;\n } else {\n this.name = new SourceDescription(2, s, 0, false);\n break;\n }\n case 3:\n if (this.email != null) {\n this.email.setDescription(s);\n break;\n } else {\n this.email = new SourceDescription(3, s, 0, false);\n break;\n }\n case 4:\n if (this.phone != null) {\n this.phone.setDescription(s);\n break;\n } else {\n this.phone = new SourceDescription(4, s, 0, false);\n break;\n }\n case 5:\n if (this.loc != null) {\n this.loc.setDescription(s);\n break;\n } else {\n this.loc = new SourceDescription(5, s, 0, false);\n break;\n }\n case 6:\n if (this.tool != null) {\n this.tool.setDescription(s);\n break;\n } else {\n this.tool = new SourceDescription(6, s, 0, false);\n break;\n }\n case 7:\n if (this.note != null) {\n this.note.setDescription(s);\n break;\n } else {\n this.note = new SourceDescription(7, s, 0, false);\n break;\n }\n case 8:\n if (this.priv != null) {\n this.priv.setDescription(s);\n break;\n } else {\n this.priv = new SourceDescription(8, s, 0, false);\n break;\n }\n default:\n break;\n }\n }\n }\n }",
"public CreateDirectConnectTunnelRequest(CreateDirectConnectTunnelRequest source) {\n if (source.DirectConnectId != null) {\n this.DirectConnectId = new String(source.DirectConnectId);\n }\n if (source.DirectConnectTunnelName != null) {\n this.DirectConnectTunnelName = new String(source.DirectConnectTunnelName);\n }\n if (source.DirectConnectOwnerAccount != null) {\n this.DirectConnectOwnerAccount = new String(source.DirectConnectOwnerAccount);\n }\n if (source.NetworkType != null) {\n this.NetworkType = new String(source.NetworkType);\n }\n if (source.NetworkRegion != null) {\n this.NetworkRegion = new String(source.NetworkRegion);\n }\n if (source.VpcId != null) {\n this.VpcId = new String(source.VpcId);\n }\n if (source.DirectConnectGatewayId != null) {\n this.DirectConnectGatewayId = new String(source.DirectConnectGatewayId);\n }\n if (source.Bandwidth != null) {\n this.Bandwidth = new Long(source.Bandwidth);\n }\n if (source.RouteType != null) {\n this.RouteType = new String(source.RouteType);\n }\n if (source.BgpPeer != null) {\n this.BgpPeer = new BgpPeer(source.BgpPeer);\n }\n if (source.RouteFilterPrefixes != null) {\n this.RouteFilterPrefixes = new RouteFilterPrefix[source.RouteFilterPrefixes.length];\n for (int i = 0; i < source.RouteFilterPrefixes.length; i++) {\n this.RouteFilterPrefixes[i] = new RouteFilterPrefix(source.RouteFilterPrefixes[i]);\n }\n }\n if (source.Vlan != null) {\n this.Vlan = new Long(source.Vlan);\n }\n if (source.TencentAddress != null) {\n this.TencentAddress = new String(source.TencentAddress);\n }\n if (source.CustomerAddress != null) {\n this.CustomerAddress = new String(source.CustomerAddress);\n }\n if (source.TencentBackupAddress != null) {\n this.TencentBackupAddress = new String(source.TencentBackupAddress);\n }\n if (source.CloudAttachId != null) {\n this.CloudAttachId = new String(source.CloudAttachId);\n }\n if (source.BfdEnable != null) {\n this.BfdEnable = new Long(source.BfdEnable);\n }\n if (source.NqaEnable != null) {\n this.NqaEnable = new Long(source.NqaEnable);\n }\n if (source.BfdInfo != null) {\n this.BfdInfo = new BFDInfo(source.BfdInfo);\n }\n if (source.NqaInfo != null) {\n this.NqaInfo = new NQAInfo(source.NqaInfo);\n }\n }",
"String getRouteDest();",
"X86.Reg gen_dest_operand();",
"private CanonizeSource() {}",
"int getDestination();",
"public IDnaStrand getInstance(String source);",
"Destination getDestination();",
"public void addBasedOnPacketIn(IOFSwitch sw, OFPacketIn pin, FloodlightContext cntx, OFPort outPort) {\n }",
"public NodeKey createNodeKeyWithSource( String sourceName );",
"public String getDestinationResource() {\r\n\t\treturn destinationSource;\r\n\t}",
"protected void copyCreateStation(NbaDst work) {\n\t\tif (!work.getNbaSources().isEmpty()) {\n\t\t\tNbaSource nbaSource = (NbaSource) work.getNbaSources().get(0);\n\t\t\tNbaLob sourceLob = nbaSource.getNbaLob();\n\t\t\twork.getWorkItem().setCreateNode(sourceLob.getCreateStation());\n\t\t}\n\t}",
"Target convert(Source source, Target target);",
"@Test\n public void testDest2()\n {\n System.out.println(\"dest\");\n String destAD = \"MD\";\n assertEquals(\"011\", N2TCode.dest(destAD));\n }",
"void generateWireSource(JavaSourceDefinition definition, LogicalReference reference, EffectivePolicy policy) throws GenerationException;",
"public void bouger(int origine, int destination) {\n\t\t\n\t}",
"public abstract void buildStartSource(OutputStream out, SourceObjectDeclared o) throws IOException;",
"public void setDestination(String destination) {\r\n this.destination = destination;\r\n }",
"DatasetFileService getSource();",
"@Override\r\n\tpublic String toShortString() {\r\n\t\treturn \"->F: \" + destination;\r\n\t}",
"public void outsource()\n\t{\n\t\tconstructPrefix();\t \n\t}",
"boolean isSource();"
] | [
"0.57431895",
"0.557282",
"0.54222083",
"0.5416555",
"0.5358431",
"0.5358431",
"0.53421104",
"0.5341254",
"0.5328331",
"0.5304399",
"0.52895",
"0.5286827",
"0.5267889",
"0.52226967",
"0.51732975",
"0.514795",
"0.51439995",
"0.5070386",
"0.5062261",
"0.50553185",
"0.50524753",
"0.5049773",
"0.5042999",
"0.50181264",
"0.49869937",
"0.49838856",
"0.49698326",
"0.4964008",
"0.49457872",
"0.49442697",
"0.49337718",
"0.49307287",
"0.49276102",
"0.49168998",
"0.49154428",
"0.49144012",
"0.49037403",
"0.48974195",
"0.48836267",
"0.48821384",
"0.48729935",
"0.4872717",
"0.48708242",
"0.48682156",
"0.47900036",
"0.47774974",
"0.47763178",
"0.4771228",
"0.47656482",
"0.4757244",
"0.4757244",
"0.47542813",
"0.47537205",
"0.47510305",
"0.47457185",
"0.47349834",
"0.4731022",
"0.47260875",
"0.47237077",
"0.4716042",
"0.4713446",
"0.4711371",
"0.4708911",
"0.47049865",
"0.46976584",
"0.46949095",
"0.46909848",
"0.46861064",
"0.4684808",
"0.46816048",
"0.46771932",
"0.46758837",
"0.4662993",
"0.4658522",
"0.46562576",
"0.46542594",
"0.46513006",
"0.46399584",
"0.4636965",
"0.46317098",
"0.4630809",
"0.4627376",
"0.4624941",
"0.46232158",
"0.46224886",
"0.46181467",
"0.46124738",
"0.46083102",
"0.46055284",
"0.4604678",
"0.46044096",
"0.46034423",
"0.46024665",
"0.4597521",
"0.4593833",
"0.45869672",
"0.45867342",
"0.45764944",
"0.45702124",
"0.4567068"
] | 0.46041268 | 91 |
output the wire in a form like that used for input | public String toString(){
String sourceName;
String destinationName;
// its possible the wire has no source gate so this avoids null
// pointer errors
if( source == null){
sourceName = "No wire source";
} else {
sourceName = this.source.name;
}
// provides the same check for destination gates
if( destination == null ){
destinationName = "No wire destination";
} else {
destinationName = this.destination.name;
}
return "Wire " + sourceName + " "+ srcPin + " " +
destinationName + " " + " " + dstPin
+ " " + delay;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void render() {\n System.out.println(this.input);\n return;\n }",
"@Override\n\tprotected void renderInternal(PrintWriter writer) {\n\t\tnew TagWriter(writer)\n\t\t\t.startEmpty(\"input\")\n\t\t\t.attribute(\"type\", \"text\")\n\t\t\t.attribute(\"style\", \"display:none\")\n\t\t\t.end();\n\t\t\n\t\tsuper.renderInternal(writer);\n\t}",
"public static void printField(){\n System.out.println(\"---------\");\r\n for (char[] cell : output) {\r\n System.out.print(\"| \");\r\n for (char value : cell) {\r\n System.out.print(value + \" \");\r\n }\r\n System.out.print(\"|\\n\");\r\n }\r\n System.out.println(\"---------\");\r\n }",
"private void buildOutput() {\n\t\tsalesSlip.addName(itemField.getText());\n\t\tsalesSlip.addPrice(Double.parseDouble(costField.getText()), Integer.parseInt(quantityField.getText()));\n\t\tsalesSlip.addQuantity(Integer.parseInt(quantityField.getText()));\n\t\tsalesSlip.updatePrice();\n\t\t\n\t\ttextArea.append(salesSlip.generateOutput(salesSlip.numItems-1));\n\t\ttextArea.append(\"\\n\");\n\t\t\n\t\ttotalArea.setText(\"$\" + salesSlip.totalPrice);\n\t}",
"@Override \n\tpublic String toString() {\n\t\treturn stringForm;\n\t}",
"private static void printCircuit() {\n\tfor (Gate i: gates) {\n\t System.out.println( i.toString() );\n\t}\n\tfor (Wire r: wires) {\n\t System.out.println( r.toString() );\n\t}\n }",
"public void handleSendBtn(ActionEvent actionEvent) throws IOException {\n Socket socket = ConnSocket.getInstance();\n InputStream inputStream = socket.getInputStream();\n OutputStream outputStream = socket.getOutputStream();\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream, true);\n //String [] userInfo = {textField.getText(), nameLabel.getText()};\n out.println(textField.getText());\n\n }",
"@Override\n\tvoid output() {\n\t\t\n\t}",
"private void outHex(){\n\t\tSystem.out.println(binary);\n\t\tpw.println(binary);\n\t\t\n\t}",
"private void outputMe() {\n\t\tif (changeCount > 2) changeCount = 4 - (changeCount & 1);\n\t\tif (outputValue) {\n\t\t\tSystem.out.append( trueArray[ changeCount ] );\n\t\t} else {\n\t\t\tSystem.out.append( falseArray[ changeCount ] );\n\t\t}\n\t\tchangeCount = 0;\n\t}",
"@Override\n public String toString() {\n System.out.print(super.toString());\n System.out.print(\"This form was encrypted using: \" + encryption);\n return \"\";\n }",
"public String GeneralForm() {\n return \"==================================================================================================================\" + \"\\n\" +\n \"city humidity description wind coordination\" + \"\\n\" +\n \"==================================================================================================================\";\n\n }",
"private void display() {\n // TODO add your handling code here:\n String body = \"<ns1:SinglePayoutRequest>\\n\"\n + \"\t<ns1:CardPayoutRequest>\\n\"\n + \"\t\t<ns1:Account>\\n\"\n + \"\t\t\t<ns1:PayGateId>\" + payGateIDField.getText() + \"</ns1:PayGateId>\\n\"\n + \"\t\t\t<ns1:Password>\" + passwordField.getText() + \"</ns1:Password>\\n\"\n + \"\t\t</ns1:Account>\\n\"\n + \"\t\t<ns1:Customer>\\n\"\n + \"\t\t\t<ns1:FirstName>\" + firstnameField.getText() + \"</ns1:FirstName>\\n\"\n + \"\t\t\t<ns1:LastName>\" + lastnameField.getText() + \"</ns1:LastName>\\n\"\n + \"\t\t\t<ns1:Email>\" + emailField.getText() + \"</ns1:Email>\\n\"\n + \"\t\t</ns1:Customer>\\n\"\n + \"\t\t<ns1:CardNumber>\" + cardNumberField.getText() + \"</ns1:CardNumber>\\n\"\n + \"\t\t<ns1:CardExpiryDate>\" + cardExpiryDateField.getText() + \"</ns1:CardExpiryDate>\\n\"\n + \"\t\t<ns1:Order>\\n\"\n + \"\t\t\t<ns1:MerchantOrderId>\" + merchantOrderIDField.getText() + \"</ns1:MerchantOrderId>\\n\"\n + \"\t\t\t<ns1:Currency>\" + currencyField.getText() + \"</ns1:Currency>\\n\"\n + \"\t\t\t<ns1:Amount>\" + amountField.getText() + \"</ns1:Amount>\\n\"\n + \"\t\t</ns1:Order>\\n\"\n + \"\t</ns1:CardPayoutRequest>\\n\"\n + \"</ns1:SinglePayoutRequest>\\n\";\n requestArea.setText(body);\n }",
"public String render() {\n\t\tresetOutput();\n\t\trenderBorder();\n\t\trenderPlayerWalls();\n\t\trenderTargetTiles();\n\t\trenderPlayers();\n\n\t\treturn this.buildOutput();\n\t}",
"public void output() {\n System.out.printf(\"Dien tich: %.2f \\n\", getArea());\n System.out.printf(\"Chu vi: %.2f \\n\", getPeripheral());\n }",
"@Override\n\tpublic String render()\n\t{\n\t\tFreemarkerView view = new FreemarkerView(MolgenisForm.class.getPackage().getName().replace(\".\", \"/\")\n\t\t\t\t+ \"/MolgenisForm.ftl\", getModel());\n\t\tview.addParameter(\"content\", layout.render());\n\t\tString result = view.render();\n\t\treturn result;\n\t}",
"public abstract String visualize(byte input);",
"public void actionPerformed(ActionEvent ae)\r\n\r\n\t {\r\n ta.append(\"Me: \"+tf.getText()+\"\\n\");\t\t \r\n\r\n\t pw.println(tf.getText());//write the value of textfield into PrintWriter\r\n\r\n\t tf.setText(\"\");//clean the textfield\r\n\r\n\t }",
"@Override\n\tpublic void serializeUI() {\n\t\t\n\t}",
"@Override\n\tpublic void doSerializeUI() {\n\t\t\n\t}",
"java.lang.String getOutput();",
"@Override\r\n public void enterSap(gFiboParser.SapContext ctx) {\r\n output = \"<span class=\\\"Simbolos\\\">\" + ctx.getText() + \"</span>\";\r\n\r\n buf = output.getBytes();\r\n try {\r\n salida.write(buf);\r\n } catch (Exception e) {\r\n System.err.println(e.getMessage());;\r\n }\r\n }",
"public String inputForm() {\n return inputDataTraveler.validateData();\n }",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getInput() != null)\n sb.append(\"Input: \").append(getInput()).append(\",\");\n if (getOutput() != null)\n sb.append(\"Output: \").append(getOutput());\n sb.append(\"}\");\n return sb.toString();\n }",
"public void display()\n\t{\n\t\tSystem.out.println(\"Bike No.\\t\"+\n\t\t\t\t\"Phone no.\\t\"+\n\t\t\t\t\"Name\\t\"+\n\t\t\t\t\"No. of days\\t\"+\n\t\t\t\t\"Charge\");\n\t\tSystem.out.println(bno+\n\t\t\t\t\"\\t\"+phno+\n\t\t\t\t\"\\t\"+name+\n\t\t\t\t\"\\t\"+days+\n\t\t\t\t\"\\t\"+charge);\n\t}",
"public void display(){\n System.out.println(\"\\n Car 2:\");\n System.out.println(toString());\n }",
"public void outputForGraphviz() {\n\t\tString label = \"\";\n\t\tfor (int j = 0; j <= lastindex; j++) {\n\t\t\tif (j > 0) label += \"|\";\n\t\t\tlabel += \"<p\" + ptrs[j].myname + \">\";\n\t\t\tif (j != lastindex) label += \"|\" + String.valueOf(keys[j+1]);\n\t\t\t// Write out any link now\n\t\t\tBTree.writeOut(myname + \":p\" + ptrs[j].myname + \" -> \" + ptrs[j].myname + \"\\n\");\n\t\t\t// Tell your child to output itself\n\t\t\tptrs[j].outputForGraphviz();\n\t\t}\n\t\t// Write out this node\n\t\tBTree.writeOut(myname + \" [shape=record, label=\\\"\" + label + \"\\\"];\\n\");\n\t}",
"@Override\n public String print() {\n return this.text + \"\\n\" + \"1. \" + this.option1.text + \"\\n\" + \"2. \" + this.option2.text;\n }",
"public JPanel buildConsole()\n\t{\n\t\tJPanel output = new JPanel(new BorderLayout());\n\t\tString hold = \"\";\n\t\t\n output.setBorder (new TitledBorder(new EtchedBorder(),\"Console\")); //Create the border\n output.setPreferredSize(new Dimension(50,150)); //Set the size of the JPanel\n console.insert(hold,0);\n console.setLineWrap(true);\n console.setWrapStyleWord(true);\n console.setEditable(false); //Does not allow the user to edit the output\n JScrollPane Cscroll = new JScrollPane (console); //Create a JScrollPane object\n Cscroll.setVerticalScrollBarPolicy ( ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED ); //Set the scroll bars to appear when necessary\n output.add(Cscroll); //Add the scroll to the JPanel\n textField = new JTextField();\n output.add(BorderLayout.PAGE_END, textField);\n \n\t\treturn output;\n\t}",
"@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 input = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n output = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n \n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n \n jLabel1.setText(\"Input\");\n \n jLabel2.setText(\"Output\");\n \n output.setEnabled(false);\n \n jButton1.setText(\"Pig Latin\");\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.setText(\"Flame\");\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 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 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jLabel2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(output)\n .addComponent(input, javax.swing.GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE)))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jButton1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 89, Short.MAX_VALUE)\n .addComponent(jButton2)))\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 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(input, 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(output, 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(jButton1)\n .addComponent(jButton2))\n .addContainerGap(27, Short.MAX_VALUE))\n );\n \n pack();\n }",
"public static String compile(InputPin pin) {\n String index1String = \"\\t\\t\\t\\t\\tindex_1(\" + compileArray(pin.getParent().getIndex1()) + \");\\n\";\n String output = \"\\n\\t\\tpin(\" + pin.getName() + \") {\\n\" + \"\\t\\t\\tcapacitance : \"\n + Model.formatFloat(pin.getCapacitance()) + \" ;\\n\" + \"\\t\\t\\tdirection : input ;\\n\" + \"\\t\\t\\t\"\n + pin.getUnsupportedData().replaceAll(\"\\n\", \"\\n\\t\\t\\t\");\n if (!pin.getInputPowers().isEmpty()) {\n output += \"\\n\\t\\t\\tinternal_power() {\\n\";\n for (InputPower inputPower : pin.getInputPowers()) {\n String valuesString = \"\\t\\t\\t\\t\\tvalues(\" + compileArray(inputPower.getValues()) + \");\\n\";\n output += \"\\n\\t\\t\\t\\t\" + inputPower.getPowGroup().name().toLowerCase() + \"() {\\n\" + index1String\n + valuesString + \"\\t\\t\\t\\t}\\n\";\n }\n output += \"\\t\\t\\t}\\n\";\n }\n output += \"\\n\\t\\t}\";\n return output;\n }",
"public abstract Object getOutput ();",
"String getOutput();",
"void actionButton ( ) throws IOException {\n String textOfField = this.gui.wdgInputText.getText();\n this.gui.widgOutput.append(\"Button1 \" + (++this.ctKeyStroke1) + \" time, text=\" + textOfField + \"\\n\");\n }",
"public static void outputRecord() {\r\n System.out.println(\"First Name: Len\");\r\n System.out.println(\"Last Name: Payne\");\r\n System.out.println(\"College: Lambton College\");\r\n }",
"@Override\r\n\tpublic List getInput() {\n\t\treturn super.getInput();\r\n\t}",
"protected abstract void renderControlOn(KmHtmlBuilder out);",
"public void print() {\n \tfor (int i=0; i < this.table.height; i++) {\n \t\tfor (int j=0; j < this.table.width; j++) {\n \t\t\tString tmp = \"e\";\n \t\t\tif(this.table.field[i][j].head != null) {\n \t\t\t\ttmp = \"\";\n \t\t\t\tswitch (this.table.field[i][j].head.direction) {\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\ttmp+=\"^\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\ttmp+=\">\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\ttmp+=\"V\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\ttmp+=\"<\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n \t\t\t}\n \t\t\telse if(this.table.field[i][j].obj != null) {\n \t\t\t\ttmp = this.table.field[i][j].obj.name;\n \t\t\t}\n \t\t\tSystem.out.print(\" \" + tmp);\n \t\t}\n \t\t\tSystem.out.println(\"\");\n \t}\n }",
"@Override\n public void emitOutput() {\n }",
"@Override\n public void encodeBegin(FacesContext ctx) throws IOException {\n if (param) {\n return;\n }\n ResponseWriter w = ctx.getResponseWriter();\n String id = getClientId(ctx);\n if (!simple) {\n w.startElement(TR, this);\n w.startElement(TD, this);\n String vn = getVarname();\n String d = vn;\n if (description != null) {\n d = description;\n } else {\n int ix = vn.lastIndexOf('.');\n if (ix != -1) {\n d = vn.substring(ix + 1);\n if (d.equals(\"Enable\") && ix > 1) {\n ix = vn.lastIndexOf('.', ix - 1);\n if (ix != -1) {\n d = vn.substring(ix + 1);\n d.replace('.', ' ');\n }\n if (d.startsWith(\"{i}.\")) {\n d = d.substring(4);\n }\n }\n }\n }\n w.writeText(d, null);\n w.endElement(TD);\n w.startElement(TD, this);\n }\n w.startElement(\"input\", this);\n Parameter dm = getDataModel();\n String type = (dm != null) ? dm.getType() : \"string\";\n if (fNew) {\n String value = getVariableValue(varname);\n if (value == null) {\n if (dm != null && dm.getDefaultValue() != null) {\n value = dm.getDefaultValue();\n if (value.startsWith(\"\\\"\") && value.endsWith(\"\\\"\")) {\n value = value.substring(1, value.length() - 1);\n }\n if (value.equals(\"-\") || value.equals(\"<Empty>\")) {\n value = \"\";\n }\n } else {\n value = \"\";\n }\n }\n setValue(value);\n }\n\n if (type.equals(\"boolean\")) {\n w.writeAttribute(\"type\", \"checkbox\", null);\n Object value = getValue();\n if (value != null && getValue().equals(\"1\")) {\n w.writeAttribute(\"checked\", \"checked\", null);\n }\n } else {\n w.writeAttribute(\"type\", \"text\", null);\n w.writeAttribute(\"value\", getValue(), \"value\");\n w.writeAttribute(\"size\", 50, \"size\");\n }\n w.writeAttribute(\"name\", id, \"name\");\n w.endElement(\"input\");\n if ((type.equals(Type.INT.toString()) || type.equals(Type.UNSIGNEDINT.toString())) && dm != null) {\n if (dm.getMin() != Parameter.INFINITY_LOW || dm.getMax() != Parameter.INFINITY_HIGH) {\n w.writeText(\"[\" + (dm.getMin() == Parameter.INFINITY_LOW ? \"unbound\" : dm.getMin()) + \"..\" + (dm.getMax() == Parameter.INFINITY_HIGH ? \"unbound\" : dm.getMax()) + \"]\", null);\n }\n }\n\n if (!simple) {\n w.endElement(TD);\n\n w.startElement(TD, this);\n } else {\n w.writeText(\" \", null);\n }\n if (valid != Parameter.VALIDATION_OK) {\n if (dm == null) {\n dm = Parameter.lookup(varname);\n }\n if (dm != null) {\n switch (valid) {\n case Parameter.VALIDATION_BADDATE:\n case Parameter.VALIDATION_BADBOOLEAN:\n case Parameter.VALIDATION_BADINT:\n w.writeText(\"Value not valid for type \" + type, null);\n break;\n case Parameter.VALIDATION_TOOBIG:\n w.writeText(\"Value exceeds maximum of \" + dm.getMax(), null);\n break;\n case Parameter.VALIDATION_TOOSMALL:\n w.writeText(\"Value less than minimum of \" + dm.getMin(), null);\n break;\n case Parameter.VALIDATION_TOOLONG:\n w.writeText(\"Value longer than \" + dm.getMaxLength(), null);\n break;\n }\n } else {\n w.writeText(\"Can not validate\", null);\n }\n }\n if (!simple) {\n w.endElement(TD);\n w.endElement(TR);\n }\n }",
"@Override\n\t\t\tpublic void print() {\n\t\t\t\t\n\t\t\t}",
"@Override\n public void print() {\n System.out.println(\"VIn:- \"+getVehicalIndentificationNumber());\n System.out.println(\"Description:- \"+getVechicalDiscription());\n System.out.println(\"Manufacturer:- \"+getManufacturerName());\n System.out.println(\"isSelfDrive:- \"+getSelfDrive());\n System.out.println(\"isInsured:- \"+getInsured());\n System.out.println(\"insuranceProviderName:- \"+getInsuranceProviderName());\n System.out.println(\"NumberOfSeat:- \"+getNoOfSeat());\n System.out.println(\"FuelType:- \"+getFuelType());\n System.out.println(\"BaseRate:- \"+getBaseRate());\n System.out.println(\"RatePerKm:- \"+getRatePerKm());\n System.out.println(\"VehicleType:- \"+getVehicleType());\n System.out.println(\"Color:- \"+getColor());\n }",
"public boolean printOutput(){\n output = \"<html>\";\n output += \"Thank you for your evaluation<br><br>\"; \n output += \"Name: \" + name.getText() + \"<br>\";\n output += \"Matric: \" + matric.getText() + \"<br>\";\n if(code_selection.equals(\"[Select]\") || code.getSelectedItem().equals(\"\") || \n name.getText().equals(\"\") || matric.getText().equals(\"\") || \n rb_selection.equals(\"\") || cb_selection.equals(\"\")){\n \n JOptionPane.showMessageDialog(null, \"All field must be fill, Thank you..\");\n return false;\n }\n output += \"Course: \" + code_selection + \"<br>\";\n output += \"Rating: \" + rb_selection + \"<br>\";\n output += \"Outcome: \" + cb_selection + \"<br>\";\n output += \"</html>\"; \n lbl_output.setText(output);\n jsp.getViewport().revalidate();\n return true;\n }",
"protected static void outputFrame(JFrame frame, JLabel title, JPanel inputsPanel, JButton connectButton,\n int buttonBottomSpacing) {\n JPanel container = new JPanel();\n container.setLayout(new BoxLayout(container, BoxLayout.PAGE_AXIS));\n container.add(title);\n container.add(new JSeparator(SwingConstants.HORIZONTAL));\n container.add(inputsPanel);\n container.add(Box.createRigidArea(new Dimension(0, 25)));\n container.add(connectButton);\n container.add(Box.createRigidArea(new Dimension(0, buttonBottomSpacing)));\n\n frame.setContentPane(container);\n frame.setSize(new Dimension(800, 600));\n frame.setLocationRelativeTo(null);\n frame.setVisible(true);\n }",
"private void print() {\n printInputMessage();\n printFrequencyTable();\n printCodeTable();\n printEncodedMessage();\n }",
"public void generateHTML(java.io.PrintWriter p, int rowNo) throws Exception {\r\n if (!_visible)\r\n return;\r\n\r\n if (!getEnabled()) {\r\n String out = getValue(rowNo, true);\r\n if (out != null) \r\n out = fixSpecialHTMLCharacters(out);\r\n else\r\n out = \"\";\r\n\r\n // Code added in an attempt to remove unsightly ' ' in the HtmlTelephonecomponent and\r\n // HtmlSSNComponent.\r\n // The premise is that the ' ' was introduced to provide for the case when the field\r\n // is disabled and when the string is empty or null\r\n // The IF statement is introduced to do as much without impacting non-null and non-empty strings\r\n if ((out == null) || ((out != null) && (out.equals(\"\"))))\r\n out += \" \";\r\n\r\n if (_disabledFontStartTag != null)\r\n p.print(_disabledFontStartTag + out + _disabledFontEndTag);\r\n else\r\n p.print(out);\r\n return;\r\n }\r\n\r\n String name = getName();\r\n if (rowNo > -1)\r\n name += \"_\" + rowNo;\r\n String tag = \"<input type=\\\"text\\\" id=\\\"\" + name + \"\\\" name=\\\"\" + name +\"\\\"\";\r\n\r\n if (_maxLength > 0)\r\n tag += \" maxlength=\\\"\" + _maxLength + \"\\\"\";\r\n\r\n if (_size > 0) {\r\n int size = _size;\r\n tag += \" size=\\\"\" + size + \"\\\"\";\r\n }\r\n\r\n\r\n String value = getValue(rowNo, true);\r\n\r\n if (value != null)\r\n tag += \" value=\\\"\" + fixSpecialHTMLCharacters(value) + \"\\\"\";\r\n\r\n\r\n if (_class != null)\r\n tag += \" class=\\\"\" + _class + \"\\\"\";\r\n\r\n if (_format != null)\r\n tag += \" format=\\\"\" + _format + \"\\\"\";\r\n\r\n if (_emptyok)\r\n tag += \" emptyok=\\\"True\\\"\";\r\n\r\n if (_tabindex > -1)\r\n tag += \" tabindex=\\\"\" + _tabindex + \"\\\"\";\r\n\r\n if (_title != null)\r\n tag += \" title=\\\"\" + _title + \"\\\"\";\r\n\r\n tag += \"/>\";\r\n\r\n\r\n p.print(tag);\r\n }",
"public void display() {\n \t\tSystem.out.printf(\"|%6s \", String.valueOf(idNumber));\n\t\tSystem.out.printf(\"|%13s |\", name);\n\t\tSystem.out.printf(\"%10s |\", quantity);\n\t\tSystem.out.printf(\"%8.2f |\", price);\n\t\tSystem.out.printf(\"%16s |\", \" \");\n\t\tSystem.out.printf(\"%16s |\", \" \");\n\t\tSystem.out.println();\n }",
"public void encode (String input){\n\t\tfor (int j=rotors.length-1;j>=1; --j)\n\t\t{\n\t\t\trotors[j].setNeighbour1(rotors[j-1]);\n\t\t}\n\t\ttry{\n\t\t\tfor (int i = 0; i <= input.length() - 1; ++i){\n\t\t\t\tString type = new String(\"direct\");\n\t\t\t\tchar in = input.charAt(i);\n\t\t\t\tfor (int j = 0; j <= elements.size() - 1; ++j){\n\t\t\t\t\telements.get(j).transmitInput(in, type);\n\t\t\t\t\tin = elements.get(j).receiveOutput();\n\t\t\t\t\tif (in == 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (in == 0) \n\t\t\t\t\tbreak;\n\t\t\t\ttype = \"inverse\";\n\t\t\t\tfor (int j = elements.size() - 2; j >= 0; --j){\n\t\t\t\t\telements.get(j).transmitInput(in, type);\n\t\t\t\t\tin = elements.get(j).receiveOutput();\n\t\t\t\t\tif (in == 0) break;\n\t\t\t\t}\n\t\t\t\tif (in == 0) continue;\n\t\t\t\tSystem.out.print(in);\n\t\t\t}\n\t\t}catch (NullPointerException e){\n\t\t\treturn;\n\t\t}\n\t}",
"@Override\n\tvoid putData() {\n\t\tSystem.out.println(\"Brand : \"+brand);\n\t\tSystem.out.println(\"Model : \"+model);\n\t\tSystem.out.println(\"Year of manufacture : \"+year_of_manufacture);\n\t\tSystem.out.println(\"CC : \"+cc);\n\t}",
"public Patient_Record_Output()\n\t\t{\n\t\t\tadd(new Centered_Text_Panel(\"Results:\"));\n\t\t}",
"private JTextField getM_fldSend()\n {\n if( m_fldSend == null )\n {\n m_fldSend = new JTextField();\n m_fldSend.addActionListener( new java.awt.event.ActionListener()\n {\n public void actionPerformed( java.awt.event.ActionEvent e )\n {\n JTextField fld = (JTextField) e.getSource();\n String send = fld.getText();\n m_Driver.send( send.getBytes() );\n//\t\t\t\t m_Driver.send( \"\\r\\n\\u0004\".getBytes() );\n m_Driver.send( \"\\r\".getBytes() );\n m_Driver.setRespondTimeout( 15000 );\n }\n } );\n }\n return m_fldSend;\n }",
"public Output(Input input)\n {\n outputHelper = new OutputHelper();\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n add(outputHelper);\n setSize(Constants.WIDTH, Constants.HEIGHT);\n setVisible(true);\n addMouseListener(input);\n addMouseMotionListener(input);\n addKeyListener(input);\n }",
"SModel getOutputModel();",
"private void writeMenu(MessageEvent e) {\n\t\tresponseContent.setLength(0);\r\n\r\n\t\t// create Pseudo Menu\r\n\t\tresponseContent.append(\"<html>\");\r\n\t\tresponseContent.append(\"<head>\");\r\n\t\tresponseContent.append(\"<title>Netty Test Form</title>\\r\\n\");\r\n\t\tresponseContent.append(\"</head>\\r\\n\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<body bgcolor=white><style>td{font-size: 12pt;}</style>\");\r\n\r\n\t\tresponseContent.append(\"<table border=\\\"0\\\">\");\r\n\t\tresponseContent.append(\"<tr>\");\r\n\t\tresponseContent.append(\"<td>\");\r\n\t\tresponseContent.append(\"<h1>Netty Test Form</h1>\");\r\n\t\tresponseContent.append(\"Choose one FORM\");\r\n\t\tresponseContent.append(\"</td>\");\r\n\t\tresponseContent.append(\"</tr>\");\r\n\t\tresponseContent.append(\"</table>\\r\\n\");\r\n\r\n\t\t// GET\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<CENTER>GET FORM<HR WIDTH=\\\"75%\\\" NOSHADE color=\\\"blue\\\"></CENTER>\");\r\n\t\tresponseContent.append(\"<FORM ACTION=\\\"/formget\\\" METHOD=\\\"GET\\\">\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<input type=hidden name=getform value=\\\"GET\\\">\");\r\n\t\tresponseContent.append(\"<table border=\\\"0\\\">\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td>Fill with value: <br> <input type=text name=\\\"info\\\" size=10></td></tr>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td>Fill with value: <br> <input type=text name=\\\"secondinfo\\\" size=20>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td>Fill with value: <br> <textarea name=\\\"thirdinfo\\\" cols=40 rows=10></textarea>\");\r\n\t\tresponseContent.append(\"</td></tr>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td><INPUT TYPE=\\\"submit\\\" NAME=\\\"Send\\\" VALUE=\\\"Send\\\"></INPUT></td>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<td><INPUT TYPE=\\\"reset\\\" NAME=\\\"Clear\\\" VALUE=\\\"Clear\\\" ></INPUT></td></tr>\");\r\n\t\tresponseContent.append(\"</table></FORM>\\r\\n\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<CENTER><HR WIDTH=\\\"75%\\\" NOSHADE color=\\\"blue\\\"></CENTER>\");\r\n\r\n\t\t// POST\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<CENTER>POST FORM<HR WIDTH=\\\"75%\\\" NOSHADE color=\\\"blue\\\"></CENTER>\");\r\n\t\tresponseContent.append(\"<FORM ACTION=\\\"/formpost\\\" METHOD=\\\"POST\\\">\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<input type=hidden name=getform value=\\\"POST\\\">\");\r\n\t\tresponseContent.append(\"<table border=\\\"0\\\">\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td>Fill with value: <br> <input type=text name=\\\"info\\\" size=10></td></tr>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td>Fill with value: <br> <input type=text name=\\\"secondinfo\\\" size=20>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td>Fill with value: <br> <textarea name=\\\"thirdinfo\\\" cols=40 rows=10></textarea>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td>Fill with file (only file name will be transmitted): <br> \"\r\n\t\t\t\t\t\t+ \"<input type=file name=\\\"myfile\\\">\");\r\n\t\tresponseContent.append(\"</td></tr>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td><INPUT TYPE=\\\"submit\\\" NAME=\\\"Send\\\" VALUE=\\\"Send\\\"></INPUT></td>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<td><INPUT TYPE=\\\"reset\\\" NAME=\\\"Clear\\\" VALUE=\\\"Clear\\\" ></INPUT></td></tr>\");\r\n\t\tresponseContent.append(\"</table></FORM>\\r\\n\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<CENTER><HR WIDTH=\\\"75%\\\" NOSHADE color=\\\"blue\\\"></CENTER>\");\r\n\r\n\t\t// POST with enctype=\"multipart/form-data\"\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<CENTER>POST MULTIPART FORM<HR WIDTH=\\\"75%\\\" NOSHADE color=\\\"blue\\\"></CENTER>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<FORM ACTION=\\\"/formpostmultipart\\\" ENCTYPE=\\\"multipart/form-data\\\" METHOD=\\\"POST\\\">\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<input type=hidden name=getform value=\\\"POST\\\">\");\r\n\t\tresponseContent.append(\"<table border=\\\"0\\\">\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td>Fill with value: <br> <input type=text name=\\\"info\\\" size=10></td></tr>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td>Fill with value: <br> <input type=text name=\\\"secondinfo\\\" size=20>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td>Fill with value: <br> <textarea name=\\\"thirdinfo\\\" cols=40 rows=10></textarea>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td>Fill with file: <br> <input type=file name=\\\"myfile\\\">\");\r\n\t\tresponseContent.append(\"</td></tr>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td><INPUT TYPE=\\\"submit\\\" NAME=\\\"Send\\\" VALUE=\\\"Send\\\"></INPUT></td>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<td><INPUT TYPE=\\\"reset\\\" NAME=\\\"Clear\\\" VALUE=\\\"Clear\\\" ></INPUT></td></tr>\");\r\n\t\tresponseContent.append(\"</table></FORM>\\r\\n\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<CENTER><HR WIDTH=\\\"75%\\\" NOSHADE color=\\\"blue\\\"></CENTER>\");\r\n\r\n\t\tresponseContent.append(\"</body>\");\r\n\t\tresponseContent.append(\"</html>\");\r\n\r\n\t\tChannelBuffer buf = ChannelBuffers.copiedBuffer(\r\n\t\t\t\tresponseContent.toString(), CharsetUtil.UTF_8);\r\n\t\t// Build the response object.\r\n\t\tHttpResponse response = new DefaultHttpResponse(HttpVersion.HTTP_1_1,\r\n\t\t\t\tHttpResponseStatus.OK);\r\n\t\tresponse.setContent(buf);\r\n\t\tresponse.setHeader(HttpHeaders.Names.CONTENT_TYPE,\r\n\t\t\t\t\"text/html; charset=UTF-8\");\r\n\t\tresponse.setHeader(HttpHeaders.Names.CONTENT_LENGTH,\r\n\t\t\t\tString.valueOf(buf.readableBytes()));\r\n\t\t// Write the response.\r\n\t\te.getChannel().write(response);\r\n\t}",
"@Override\n public void output(Word value){ \n Integer integerValue = value.getUnsignedValue();\n int intValue = (int)integerValue; \n guiDisplay.append(String.valueOf((char)intValue)); \n guiDisplay.setCaretPosition(guiDisplay.getDocument().getLength());\n }",
"@Override\r\n\tpublic String toString() {\r\n\t\treturn super.toString() + Z.fmt(\"accesskey\", getHtmlAccessKey())\r\n\t\t\t+ Z.fmt(\"cols\", \"\" + getHtmlCols())\r\n//\t\t\t\t+ Z.fmt(\"defaultvalue\", \"\" + getHtmlExtValue())\r\n\t\t\t+ Z.fmt(\"disabled\", \"\" + getHtmlDisabled())\r\n\t\t\t+ Z.fmt(\"name\", \"\" + getHtmlName())\r\n\t\t\t+ Z.fmt(\"readonly\", \"\" + getHtmlReadOnly())\r\n\t\t\t+ Z.fmt(\"tabindex\", \"\" + getHtmlTabIndex())\r\n\t\t\t+ Z.fmt(\"type\", \"\" + getHtmlType())\r\n\t\t\t+ Z.fmt(\"value\", getHtmlValue())\r\n\t\t\t+ Z.fmt(\"autofocus\", getHtmlAutoFocus()) \r\n\t\t\t+ Z.fmt(\"placeholder\", getHtmlPlaceholder())\r\n\t\t\t+ Z.fmt(\"required\", getHtmlRequired()) ;\r\n\t}",
"public String getEncodedForm()\n {\n return Base64.encodeToString(mForm.gotoRoot().toBytes(), Base64.DEFAULT); \n }",
"INPUT createINPUT();",
"public Element getOutput(){\n\t\treturn output;\n\t}",
"private void formWriteBegin() {\n\t\tsendData = new byte[4];\n\t\tsendData[0] = 0;\n\t\tsendData[1] = 4;\n\t\tsendData[2] = 0;\n\t\tsendData[3] = 0;\n\t\t\n\t\t// Now that the data has been set up, let's form the packet.\n\t\tsendPacket = new DatagramPacket(sendData, 4, receivePacket.getAddress(),\n\t\t\t\treceivePacket.getPort());\t\n\t}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n response.setContentType(\"text/html;charset=UTF-8\");\n PrintWriter out = response.getWriter();\n try {\n out.println(\"<!DOCTYPE html>\");\n out.println(\"<html>\");\n out.println(\"<head>\");\n out.println(\"<title>conversion de monedas</title>\");\n out.println(\"</head>\");\n out.println(\"<body>\");\n out.println(\"<h1>Generar matriz caracol</h1>\");\n\n out.println(\"<form action='' method='post'>\");\n out.println(\"Tamaño de matriz nxn:\");\n out.println(\"<input type='number' name='tamano' required>\");\n out.println(\"<br><br>\");\n out.println(\"<input type='submit' value=Procesar>\");\n out.println(\"</form>\");\n\n out.println(\"</body>\");\n out.println(\"</html>\");\n } finally {\n out.close();\n }\n\n }",
"public String toString() {\n\t\treturn getOriginalInput();\n\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tinput(input.getText().toString());\n\t\t\t\tshow.setText(output.toString());\n\t\t\t}",
"public void printToScreen() {\n String type = \"\";\n switch (this.type) {\n case 1:\n type = \"Fashion\";\n break;\n case 2:\n type = \"Electronic\";\n break;\n case 3:\n type = \"Consumable\";\n break;\n case 4:\n type = \"Household appliance\";\n break;\n }\n// System.out.println(\"Type : \" + type);\n System.out.printf(\"%6d%15s%6f%20s\\n\", id, name, price, type);\n }",
"void show() {\r\n System.out.println(\"Weight of the Cycle is = \" + weight);\r\n System.out.println(\"Name of the Cycle is = \" + name);\r\n }",
"public String getInputFormView() {\n\t\treturn inputFormView;\n\t}",
"@Override\r\n\t\t\tpublic void print() {\n\t\t\t\t\r\n\t\t\t}",
"public void print() {\n System.out.print(\"[ \" + value + \":\" + numSides + \" ]\");\n }",
"private void writeTagInputTextarea(Textbox textbox, Set<String> textboxValues, StringWriter out, RDFaMetaWriter writer, RDFRepository _repository) throws IOException {\n\t\tout.append(\"<div>\\n\");\n\t\tif (textbox.getRaulRows().isEmpty()) {\n\t\t\tSet<Boolean> setBoolean = new HashSet<Boolean>();\n\t\t\tIterator<Boolean> iteratorInputHidden = textbox.getRaulHiddens().iterator();\n\t\t\tif (!textbox.getRaulHiddens().isEmpty()) {\n\t\t\t\twhile (iteratorInputHidden.hasNext()) {\n\t\t\t\t\tBoolean var = iteratorInputHidden.next();\n\t\t\t\t\tif (!setBoolean.contains(var)) {\n\t\t\t\t\t\tif (var) {\n\t\t\t\t\t\t\tout.append(\"\t<input type=\\\"hidden\\\"\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tout.append(\"\t<input type=\\\"text\\\"\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsetBoolean.add(var);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsetBoolean.add(var);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tout.append(\"\t<input type=\\\"text\\\"\");\t\t\t\t\n\t\t\t}\n\t\t} else {\n\t\t\tout.append(\"<textarea\");\n\n\t\t}\n\t\tif (!textbox.getRaulClasses().isEmpty()) {\n\t\t\tIterator<String> iteratorClasses = textbox.getRaulClasses().iterator();\n\t\t\twriteTagClass(iteratorClasses, out);\n\t\t}\n\t\tIterator<String> iteratorIds = textbox.getRaulIds().iterator();\n\t\twriteTagIds(iteratorIds, out);\n\t\tIterator<String> iteratorNames = textbox.getRaulNames().iterator();\n\t\twriteTagNames(iteratorNames, out);\n\t\tIterator<String> iteratorTitles = textbox.getRaulTitles().iterator();\n\t\twriteTagTitles(iteratorTitles, out);\t\t\n\t\tif (!textbox.getRaulRows().isEmpty()) {\n\t\t\tIterator<Integer> iteratorRows = textbox.getRaulRows().iterator();\n\t\t\twriteTagRows(iteratorRows, out);\n\t\t\tIterator<String> iteratorSizes = textbox.getRaulSizes().iterator();\n\t\t\twriteTagCols(iteratorSizes, out);\n\t\t\t//out.append(\"></textarea>\\n\");\n\t\t\tout.append(\">\");\n\t\t\ttry {\n\t\t\t\twriteTagTagInputTextareaValue(textboxValues, out, writer, _repository);\n\t\t\t} catch (RepositoryException e) {\t\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (QueryEvaluationException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tout.append(\"</textarea>\\n\");\n\t\t\t\n\t\t} else {\n\t\t\tout.append(\" value=\\\"\");\n\t\t\ttry {\n\t\t\t\twriteTagTagInputTextareaValue(textboxValues, out, writer, _repository);\n\t\t\t} catch (RepositoryException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (QueryEvaluationException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tout.append(\"\\\"\");\n\t\t\tout.append(\"/>\\n\");\n\t\t}\n\t\tout.append(\"</div>\\n\");\n\t}",
"private void readForm() {\n }",
"@Override\n\tpublic String toString() {\n\t\treturn name + \" (bauds: \" + bauds + \", dataBits: \" + dataBits\n\t\t\t\t+ \", stopBits: \" + stopBits + \", parity: \" + parity\n\t\t\t\t+ \", flowControl: \" + flowControl + \")\";\n\t}",
"public void printProtocol()\n\t{\n\t\tString commands[] = {\"A\", \"UID\", \"S\", \"F\"};\n\t\t\n\t\tHashtable<String, String> commandDescription = new Hashtable<String, String>();\n\t\tHashtable<String, String> subStringCommands = new Hashtable<String, String>();\n\t\tcommandDescription.put(\"A\", \"Sends audio data using _ as a regex\");\n\t\tcommandDescription.put(\"UID\", \"Specifies the user's id so that the Network.Server may verify it\");\n\t\tcommandDescription.put(\"S\", \"Specifies server commands.\");\n\t\tcommandDescription.put(\"F\", \"Specifies audio format.\");\n\t\tsubStringCommands.put(\"A\", \"No commands\");\n\t\tsubStringCommands.put(\"UID\", \"No sub commands\");\n\t\tsubStringCommands.put(\"S\", \"Sub commands are: \\nclose - Closes the server.\\ndisconnect - Disconnects the client from the server.\\nclumpSize {int}\");\n\t\tsubStringCommands.put(\"F\", \"Split Audio specifications between spaces. The ordering is {float SampleRate, int sampleSizeInBits, int channels, int frameSize, float frameRate\");\n\t\t\n\t\tfor (String str: commands)\n\t\t{\n\t\t\tSystem.out.printf(\"Command format:\\n %s.xxxxxxx\\n\", str);\n\t\t\tSystem.out.printf(\"Command %s\\n Description: %s \\n sub commands %s\\n\", str, commandDescription.get(str),subStringCommands.get(str));\n\t\t\t\n\t\t}\n\t}",
"public void printInformation() {\n\n System.out.println(\"Name: \" + name);\n System.out.println(\"Weight: \" + weight);\n System.out.println(\"Shape: \" + shape);\n System.out.println(\"Color: \" + color);\n }",
"public String getOutput() {\n return output;\n }",
"public String toString() {\n/* 97 */ StringBuffer stringBuffer = new StringBuffer();\n/* 98 */ for (byte b = 0; b < this.controls.length; b++) {\n/* 99 */ if (b != 0) {\n/* 100 */ stringBuffer.append(\", \");\n/* 101 */ if (b + 1 == this.controls.length) {\n/* 102 */ stringBuffer.append(\"and \");\n/* */ }\n/* */ } \n/* 105 */ stringBuffer.append(this.controls[b].getType());\n/* */ } \n/* */ \n/* 108 */ return new String(getType() + \" Control containing \" + stringBuffer + \" Controls.\");\n/* */ }",
"public String toString() {\n return gate;\n }",
"public void display() {\n\t\tSystem.out.print(\"\\nPC \");\n\t\tmPC.display(true);\n\t\tSystem.out.print(\" \");\n\n\t\tSystem.out.print(\"IR \");\n\t\tmPC.display(true);\n\t\tSystem.out.print(\" \");\n\n\t\tSystem.out.print(\"CC \");\n\t\tmCC.display(true);\n\t\tSystem.out.println(\" \");\n\n\t\tfor (int i = 0; i < MAX_REGISTERS; i++) {\n\t\t\tSystem.out.printf(\"R%d \", i);\n\t\t\tmRegisters[i].display(true);\n\t\t\tif (i % 3 == 2) {\n\t\t\t\tSystem.out.println();\n\t\t\t} else {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println();\n\n\t\tfor (int i = 0; i < MAX_MEMORY; i++) {\n\t\t\tSystem.out.printf(\"%3d \", i);\n\t\t\tmMemory[i].display(true);\n\t\t\tif (i % 3 == 2) {\n\t\t\t\tSystem.out.println();\n\t\t\t} else {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println();\n\n\t}",
"private void displayPowers()\n {\n //Fetch powers\n currentPowerset = power.getPowerSet();\n //Clear output\n txtPowerDisplay.setText(\"\");\n powerString = \"\";\n //For each item in the list, fetch its name and append with a next line\n for (int i = 0; i < currentPowerset.size(); i++)\n {\n powerString += currentPowerset.get(i);\n powerString += \"\\n\";\n }\n //Display the generated string to the user\n txtPowerDisplay.setText(powerString);\n }",
"@Override\n public String toString() {\n return super.toString() + \"| Weight: \" + weight + \"\" + \"| Time of PIN: \" + timePin + \"| Size of Screem: \" + sizeScreem;\n }",
"private void outDec(){\n\t\tSystem.out.println(binary);\n\t\tpw.println(binary);\n\t\t\n\t}",
"private void writeInstancePanel() {\n \t\tgetView().getComboInstance().clear();\n \t\tfor (int i = 0; i<Storage_access.getNumberOfInstance(); i++)\n \t\t\tgetView().getComboInstance().addItem(\"\"+Storage_access.getInstanceLocalNum(i)+\": \"+Storage_access.getInstanceDesc(i));\n \t\t//Storage_access.printStorage();\n \t\t\n \t}",
"public String getInput()\t\n\t{\t//start of getInput method\n\t\treturn inputMsg;\n\t}",
"public String getDisplay() {\n\t\tString output;\n\t\tStringBuilder tempout = new StringBuilder();\n\t\tfor(Entry<String, ParkingSpace> entry:hashmap.entrySet()) {\n\t\t\tString key = entry.getKey();\n\t\t\tVehicle temp = entry.getValue().getVehicle();\n\t\t\ttempout.append(\"Plate# \" + key + \" \" + temp.toString() + \"\\n\");\n\t\t}\n\t\toutput = tempout.toString();\n\t\treturn output;\n\t}",
"@Override\n public void buildView(IModelForm modelForm) {\n FormSection inputSection = modelForm.addSection(\"Input\");\n inputSection.addEntityListField(_inputGrids, new Grid3dTimeDepthSpecification());\n inputSection.addEntityComboField(_velocityVolume, new VelocityVolumeSpecification());\n inputSection.addEntityComboField(_aoi, AreaOfInterest.class).showActiveFieldToggle(_aoiFlag);\n\n // Build the conversion section.\n FormSection parameterSection = modelForm.addSection(\"Conversion\");\n parameterSection.addRadioGroupField(_conversionMethod, Method.values());\n\n // Build the output section.\n FormSection outputSection = modelForm.addSection(\"Output\");\n outputSection.addTextField(_outputGridSuffix);\n }",
"public Output getOutput() {\n\t\treturn output;\n\t}",
"public void display()\n\t{\n\t\tSystem.out.println(data+\" \");\n\t}",
"private void printEncodedMessage() {\n System.out.print(\"\\nPrinting the encoded message\");\n System.out.print(\"\\n\" + encodedMessage + \"\\n\");\n System.out.println();\n }",
"@Override\r\n public void display(PrintWriter out) {\r\n if (this.nrBasic > 0) {\r\n out.println(\"Basic\");\r\n } else {\r\n super.display(out);\r\n }\r\n }",
"void display()\r\n\t{\r\n\t\tSystem.out.println(\"bikeid=\"+bikeid+\" bike name==\"+bikename);\r\n\t}",
"public final XmlSpecialForm specialForm ()\r\n {\r\n return _value.specialForm();\r\n }",
"public OutputConsole() {\n initComponents();\n setSize (1520, 750);\n }",
"private void render() {\n StringBuilder builder = new StringBuilder();\n builder.append(horizontalEdge).append(\"\\n\");\n for (int i = 0; i < this.height; i++) {\n builder.append(VERTICAL_CHAR);\n for (int j = 0; j < this.width; j++) {\n builder.append(pixels[i][j]);\n }\n builder.append(VERTICAL_CHAR);\n builder.append(\"\\n\");\n }\n builder.append(horizontalEdge);\n System.out.printf(builder.toString());\n }",
"public String print() {\n\t\tString offID = getID();\n\t\tString offName = getName();\n\t\tint offAge = getAge();\n\t\tString offState = getState();\n\t\tString data = String.format(\"ID: %-15s \\t Name: %-35s \\t Age: %-15s \\t State: %s\", offID, offName, offAge, offState);\n\t\treturn data;\n\t}",
"private void printLeagueOfLegendsAccount() {\r\n JFrame recordWindow = new JFrame(\"Print out account details\");\r\n// recordWindow.setLocationRelativeTo(null);\r\n// recordWindow.getContentPane().setLayout(new BoxLayout(recordWindow.getContentPane(), BoxLayout.Y_AXIS));\r\n initiateAccountPrintFields(recordWindow);\r\n new Frame(recordWindow);\r\n// recordWindow.pack();\r\n// recordWindow.setVisible(true);\r\n }",
"public ReactiveValue<T> output() {\n\t\t/*\n\t\t * This records dependency on the state machine. No dependency is recorded on the controlled computation itself.\n\t\t */\n\t\treturn output.value();\n\t}",
"public void toStrings() {\n String output = \"\";\n output += \"Gen Price: $\" + genPrice + \"0\"+ \"\\n\";\n output += \"Bronze Price: $\" + bronzePrice +\"0\"+ \"\\n\";\n output += \"Silver Price: $\" + silverPrice +\"0\"+ \"\\n\";\n output += \"Gold Price: $\" + goldPrice +\"0\"+ \"\\n\";\n output += \"Vip Price: $\" + vipPrice +\"0\"+ \"\\n\";\n System.out.println(output);\n }",
"public static void encode() {\n char[] symbols = initializeSymbols();\n int position;\n while (!BinaryStdIn.isEmpty()) {\n char symbol = BinaryStdIn.readChar();\n position = 0;\n while (symbols[position] != symbol) {\n position++;\n }\n BinaryStdOut.write(position, BITS_PER_BYTE);\n System.arraycopy(symbols, 0, symbols, 1, position);\n symbols[0] = symbol;\n }\n BinaryStdOut.close();\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 HeadingLabel = new javax.swing.JLabel();\n UserInputLabel = new javax.swing.JLabel();\n UserInputText = new javax.swing.JTextField();\n UserOutputLabel = new javax.swing.JLabel();\n DrobzitsOutputLabel = new javax.swing.JLabel();\n DrobzitsLabel = new javax.swing.JLabel();\n ClickwicksOutputLabel = new javax.swing.JLabel();\n ClickwicksLabel = new javax.swing.JLabel();\n GazoontightsOutputLabel = new javax.swing.JLabel();\n GazoontightsLabel = new javax.swing.JLabel();\n FrazointsOutputLabel = new javax.swing.JLabel();\n FrazointsLabel = new javax.swing.JLabel();\n BlointointsOutputLabel = new javax.swing.JLabel();\n BlointointsLabel = new javax.swing.JLabel();\n VrobitsLabel = new javax.swing.JLabel();\n EnterButton = new javax.swing.JButton();\n OutputLabel = new javax.swing.JLabel();\n VrobitsOutputLabel = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel1.setBackground(new java.awt.Color(0, 204, 204));\n\n HeadingLabel.setFont(new java.awt.Font(\"256 Bytes\", 0, 36)); // NOI18N\n HeadingLabel.setText(\"Planet Zirboin\");\n\n UserInputLabel.setFont(new java.awt.Font(\"AachenDEEMed\", 0, 14)); // NOI18N\n UserInputLabel.setText(\"Enter your vrobits:\");\n\n UserInputText.setFont(new java.awt.Font(\"AachenDEEMed\", 0, 14)); // NOI18N\n\n UserOutputLabel.setFont(new java.awt.Font(\"AachenDEEMed\", 0, 14)); // NOI18N\n UserOutputLabel.setText(\"You have:\");\n\n DrobzitsOutputLabel.setFont(new java.awt.Font(\"AachenDEEMed\", 0, 14)); // NOI18N\n\n DrobzitsLabel.setFont(new java.awt.Font(\"AachenDEEMed\", 0, 14)); // NOI18N\n DrobzitsLabel.setText(\"Drobzits\");\n\n ClickwicksOutputLabel.setFont(new java.awt.Font(\"AachenDEEMed\", 0, 14)); // NOI18N\n\n ClickwicksLabel.setFont(new java.awt.Font(\"AachenDEEMed\", 0, 14)); // NOI18N\n ClickwicksLabel.setText(\"Clickwicks\");\n\n GazoontightsOutputLabel.setFont(new java.awt.Font(\"AachenDEEMed\", 0, 14)); // NOI18N\n\n GazoontightsLabel.setFont(new java.awt.Font(\"AachenDEEMed\", 0, 14)); // NOI18N\n GazoontightsLabel.setText(\"Gazoontights\");\n\n FrazointsOutputLabel.setFont(new java.awt.Font(\"AachenDEEMed\", 0, 14)); // NOI18N\n\n FrazointsLabel.setFont(new java.awt.Font(\"AachenDEEMed\", 0, 14)); // NOI18N\n FrazointsLabel.setText(\"Frazoints\");\n\n BlointointsOutputLabel.setFont(new java.awt.Font(\"AachenDEEMed\", 0, 14)); // NOI18N\n\n BlointointsLabel.setFont(new java.awt.Font(\"AachenDEEMed\", 0, 14)); // NOI18N\n BlointointsLabel.setText(\"Blointoints\");\n\n VrobitsLabel.setFont(new java.awt.Font(\"AachenDEEMed\", 0, 14)); // NOI18N\n VrobitsLabel.setText(\"Vrobits\");\n\n EnterButton.setFont(new java.awt.Font(\"AachenDEEMed\", 0, 14)); // NOI18N\n EnterButton.setText(\"Enter\");\n EnterButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n EnterButtonActionPerformed(evt);\n }\n });\n\n OutputLabel.setFont(new java.awt.Font(\"AachenDEEMed\", 0, 14)); // NOI18N\n\n VrobitsOutputLabel.setFont(new java.awt.Font(\"AachenDEEMed\", 0, 14)); // 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(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap(53, Short.MAX_VALUE)\n .addComponent(HeadingLabel)\n .addGap(95, 95, 95))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(ClickwicksOutputLabel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 21, Short.MAX_VALUE)\n .addComponent(DrobzitsOutputLabel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addComponent(BlointointsOutputLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(VrobitsOutputLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(GazoontightsOutputLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(FrazointsOutputLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(28, 28, 28)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(ClickwicksLabel)\n .addComponent(DrobzitsLabel))\n .addGap(18, 18, 18)\n .addComponent(OutputLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(GazoontightsLabel)\n .addComponent(FrazointsLabel)\n .addComponent(BlointointsLabel)\n .addComponent(VrobitsLabel))\n .addGap(0, 0, Short.MAX_VALUE))))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()\n .addComponent(UserInputLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(UserInputText, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(EnterButton)))\n .addGap(20, 20, 20))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(26, 26, 26)\n .addComponent(UserOutputLabel)\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(HeadingLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(UserInputLabel)\n .addComponent(UserInputText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(EnterButton))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(UserOutputLabel)\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(DrobzitsOutputLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(DrobzitsLabel))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(ClickwicksOutputLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(ClickwicksLabel)))\n .addComponent(OutputLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(GazoontightsLabel))\n .addComponent(GazoontightsOutputLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(16, 16, 16)\n .addComponent(FrazointsLabel))\n .addComponent(FrazointsOutputLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(BlointointsLabel)\n .addComponent(BlointointsOutputLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(VrobitsLabel)\n .addComponent(VrobitsOutputLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 23, 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(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 }",
"@Override\n public String toString() {\n \treturn this.getUsername()+\"\\t\\t\"+this.getTel()+\"\\t\\t\"+this.getPassword()+\"\\t\"+this.getMembertypeid()+\"\\t\\t\"+this.getIntegral()+\"\\t\\t\"+this.getAddress();\n }",
"public void printInfo() {\n\t\tString nodeType = \"\";\n\t\tif (nextLayerNodes.size() == 0) {\n\t\t\tnodeType = \"Output Node\";\n\t\t} else if (prevLayerNodes.size() == 0) {\n\t\t\tnodeType = \"Input Node\";\n\t\t} else {\n\t\t\tnodeType = \"Hidden Node\";\n\t\t}\n\t\tSystem.out.printf(\"%n-----Node Values %s-----%n\", nodeType);\n\t\tSystem.out.printf(\"\tNumber of nodes in next layer: %d%n\", nextLayerNodes.size());\n\t\tSystem.out.printf(\"\tNumber of nodes in prev layer: %d%n\", prevLayerNodes.size());\n\t\tSystem.out.printf(\"\tNext Layer Node Weights:%n\");\n\t\tNode[] nextLayer = new Node[nextLayerNodes.keySet().toArray().length];\n\t\tfor (int i = 0; i < nextLayer.length; i++) {\n\t\t\tnextLayer[i] = (Node) nextLayerNodes.keySet().toArray()[i];\n\t\t}\n\t\tfor (int i = 0; i < nextLayerNodes.size(); i++) {\n\t\t\tSystem.out.printf(\"\t\t# %f%n\", nextLayerNodes.get(nextLayer[i]));\n\t\t}\n\t\tSystem.out.printf(\"%n\tPartial err partial out = %f%n%n\", getPartialErrPartialOut());\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn this.i + \" \" + this.w;\n\t}"
] | [
"0.6122462",
"0.591646",
"0.57936853",
"0.5726596",
"0.5550252",
"0.5540604",
"0.54788464",
"0.5407625",
"0.53829134",
"0.53469366",
"0.5338901",
"0.53271544",
"0.5315031",
"0.5239454",
"0.5228856",
"0.52283937",
"0.52123713",
"0.51664025",
"0.5157073",
"0.5142217",
"0.5134869",
"0.51303476",
"0.5127268",
"0.51136214",
"0.510122",
"0.5099775",
"0.5089459",
"0.50670946",
"0.5032737",
"0.5020496",
"0.5016187",
"0.5015497",
"0.50003487",
"0.49971431",
"0.49915552",
"0.4983431",
"0.49700963",
"0.496413",
"0.49597508",
"0.4955205",
"0.49549648",
"0.49544895",
"0.4943451",
"0.49369687",
"0.49328232",
"0.49275374",
"0.49237046",
"0.49211788",
"0.49188018",
"0.49139303",
"0.49119872",
"0.49088338",
"0.49078283",
"0.49044946",
"0.48863345",
"0.4883929",
"0.4883688",
"0.48802888",
"0.48801112",
"0.48800257",
"0.48750445",
"0.4874504",
"0.48619378",
"0.4856578",
"0.4855751",
"0.48515052",
"0.48429427",
"0.48384506",
"0.48376665",
"0.48357785",
"0.48351336",
"0.48328316",
"0.48261577",
"0.48240903",
"0.4822272",
"0.4817718",
"0.48059595",
"0.48054922",
"0.4803646",
"0.48013672",
"0.47995168",
"0.4795807",
"0.47910193",
"0.47870174",
"0.47868964",
"0.47849882",
"0.4783155",
"0.4780633",
"0.4768563",
"0.47674635",
"0.47668442",
"0.47659907",
"0.47655305",
"0.4764626",
"0.47605363",
"0.4757715",
"0.475556",
"0.47547677",
"0.47475046",
"0.47472775",
"0.4743708"
] | 0.0 | -1 |
Bug: The need for the above really depends on the gate kind | public static Gate newGate( Scanner sc ) throws ConstructorFailure {
// going to write a whole bunch of new junk here and then slowly
// remove what I no longer need. This code is ages from being able
// to be compiled
String name = ScanSupport.nextName( sc );
if( " ".equals( name )){
Errors.warn( "No gate name provided" );
throw new ConstructorFailure();
}
if (Logic.findGate( name ) != null) {
Errors.warn( "Gate redefined: " + name );
throw new ConstructorFailure();
}
String type = ScanSupport.nextName( sc );
if( "or".equals( type ) ){
return new orGate( sc, name );
} else if ( "and".equals( type )){
return new andGate( sc, name );
} else if ( "not".equals( type )){
return new notGate( sc, name );
} else if ( "const".equals( type )){
return new constant( sc, name );
} else {
Errors.warn( "Gate " + name + " " + type
+ " has an invalid type" );
throw new ConstructorFailure();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void testX1andX2orNotX1() {\n \tCircuit circuit = new Circuit();\n \t\n \tBoolean b1 = Boolean.TRUE;\n \tBoolean b2 = Boolean.FALSE;\n \tAnd and = (And) circuit.getFactory().getGate(Gate.AND);\n\t\tNot not = (Not) circuit.getFactory().getGate(Gate.NOT);\n\t\tOr or = (Or) circuit.getFactory().getGate(Gate.OR);\n\t\tand.setLeftInput(b1);\n\t\tand.setRightInput(b2);\n\t\tand.eval();\n\t\tnot.setInput(b1);\n\t\tnot.eval();\n\t\tor.setLeftInput(and.getOutput());\n\t\tor.setRightInput(not.getOutput());\n\t\tassertEquals(Boolean.FALSE, or.eval());\n\t\tassertEquals(Boolean.FALSE, circuit.eval());\n//\t\t==========================================\n\t\tb1 = Boolean.FALSE;\n \tb2 = Boolean.TRUE;\n// \tand.eval();\n// \tnot.eval();\n \tassertEquals(Boolean.FALSE, circuit.eval());\n// \t============================================\n \tDouble d1 = 0.0;\n \tDouble d2 = 1.0;\n \tand.setLeftInput(d1);\n\t\tand.setRightInput(d2);\n\t\tnot.setInput(d1);\n\t\tor.setLeftInput(and.getOutput());\n\t\tor.setRightInput(not.getOutput());\n \tassertEquals( new Double(1.0), or.eval());\n// \t============================================\n \td1 = 0.5;\n \td2 = 0.5;\n \tand.setLeftInput(d1);\n\t\tand.setRightInput(d2);\n \tand.eval();\n \tnot.setInput(d1);\n \tnot.eval();\n\t\tor.setLeftInput(and.getOutput());\n\t\tor.setRightInput(not.getOutput());\n \tassertEquals( new Double(0.625), or.eval());\n// \t============================================\n \ttry {\n \td1 = 0.5;\n \td2 = 2.0;\n \tand.setLeftInput(d1);\n \t\tand.setRightInput(d2);\n \tand.eval();\n \tnot.setInput(d1);\n \tnot.eval();\n \t\tor.setLeftInput(and.getOutput());\n \t\tor.setRightInput(not.getOutput());\n \tassertEquals( new Double(0.625), or.eval());\n \t} catch (IllegalArgumentException e) {\n \t\tSystem.err.println(\"IllegalArgumentException: \" + e.getMessage());\n \t}\n\n }",
"public OrGate() {\n\t\tsuper(2, 1);\n\t}",
"@Override\n\tpublic void visit(BitwiseOr arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void visit(BitwiseOr arg0) {\n\n\t}",
"@Override public byte isBitShape(Type t) { throw AA.unimpl(); }",
"public boolean rightDistributive( Operator op){\n\t return false;\n }",
"DoubleBinaryOperator getPendingBinaryOperation();",
"int CONVOLVE() { return 44; }",
"private void e()\r\n/* 273: */ {\r\n/* 274:278 */ this.r = false;\r\n/* 275:279 */ this.s = false;\r\n/* 276:280 */ this.t = false;\r\n/* 277:281 */ this.u = false;\r\n/* 278:282 */ this.v = false;\r\n/* 279: */ }",
"public interface WireloopReward extends RewardInterface {\n /** steps don't cost anything\n * \n * @return constant zero */\n static WireloopReward freeSteps() {\n return (s, a, n) -> RealScalar.ZERO;\n }\n\n /** steps are more expensive than reward along x\n * \n * @return constant zero */\n static WireloopReward constantCost() {\n return (s, a, n) -> RealScalar.of(-1.4); // -1.2\n }\n\n /***************************************************/\n static Scalar id_x(Tensor state) {\n return state.Get(0);\n }\n}",
"void mo15871a(StateT statet);",
"public String getName() { return \"Gate\"; }",
"public boolean isGateFull(){return GateFull;}",
"@Override\r\n\tpublic int getGateDepth() {\r\n\t\treturn gateDepth;\r\n\t}",
"Object findOperatorNeedCheck();",
"UOp createUOp();",
"FiberGate createFiberGate();",
"private void nextState() {\n int x;\n int y;\n y = st3;\n x = (st0 & MASK) ^ st1 ^ st2;\n x ^= (x << SH0);\n y ^= (y >>> SH0) ^ x;\n st0 = st1;\n st1 = st2;\n st2 = x ^ (y << SH1);\n st3 = y;\n st1 ^= parameter.getMat1(y);\n st2 ^= parameter.getMat2(y);\n }",
"private DiscretePotentialOperations() {\r\n\t}",
"private final boolean e() {\n /*\n r15 = this;\n r2 = 0\n r1 = 0\n dtd r0 = r15.m // Catch:{ all -> 0x008e }\n if (r0 != 0) goto L_0x000d\n dtd r0 = new dtd // Catch:{ all -> 0x008e }\n r0.<init>() // Catch:{ all -> 0x008e }\n r15.m = r0 // Catch:{ all -> 0x008e }\n L_0x000d:\n int r0 = r15.k // Catch:{ all -> 0x008e }\n dtd r3 = r15.m // Catch:{ all -> 0x008e }\n int r3 = r3.a // Catch:{ all -> 0x008e }\n int r0 = r0 - r3\n if (r0 <= 0) goto L_0x039e\n dvk r3 = r15.g // Catch:{ all -> 0x008e }\n if (r3 == 0) goto L_0x0356\n byte[] r3 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 == 0) goto L_0x0025\n int r3 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r4.length // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 != r4) goto L_0x0032\n L_0x0025:\n r3 = 2097152(0x200000, float:2.938736E-39)\n int r3 = java.lang.Math.min(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r3 = new byte[r3] // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r15.h = r3 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 0\n r15.i = r3 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0032:\n byte[] r3 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.length // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3 - r4\n int r6 = java.lang.Math.min(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r7 = r15.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r8 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r9 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n boolean r0 = r7.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != 0) goto L_0x00ac\n r0 = 1\n L_0x0047:\n java.lang.String r3 = \"GzipInflatingBuffer is closed\"\n defpackage.cld.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 0\n r0 = 1\n r5 = r3\n L_0x004f:\n if (r0 == 0) goto L_0x02ef\n int r3 = r6 - r5\n if (r3 <= 0) goto L_0x02ef\n dvm r0 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.ordinal() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n switch(r0) {\n case 0: goto L_0x00ae;\n case 1: goto L_0x0148;\n case 2: goto L_0x0171;\n case 3: goto L_0x01d7;\n case 4: goto L_0x01fc;\n case 5: goto L_0x0221;\n case 6: goto L_0x0256;\n case 7: goto L_0x0289;\n case 8: goto L_0x02a2;\n case 9: goto L_0x02e9;\n default: goto L_0x005e;\n } // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x005e:\n java.lang.AssertionError r0 = new java.lang.AssertionError // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r3 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = java.lang.String.valueOf(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r4 = java.lang.String.valueOf(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r4.length() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r4 + 15\n java.lang.StringBuilder r5 = new java.lang.StringBuilder // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r5.<init>(r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r4 = \"Invalid state: \"\n java.lang.StringBuilder r4 = r5.append(r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.StringBuilder r3 = r4.append(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = r3.toString() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0087:\n r0 = move-exception\n java.lang.RuntimeException r3 = new java.lang.RuntimeException // Catch:{ all -> 0x008e }\n r3.<init>(r0) // Catch:{ all -> 0x008e }\n throw r3 // Catch:{ all -> 0x008e }\n L_0x008e:\n r0 = move-exception\n if (r2 <= 0) goto L_0x00ab\n dxe r3 = r15.a\n r3.a(r2)\n dxh r3 = r15.j\n dxh r4 = defpackage.dxh.BODY\n if (r3 != r4) goto L_0x00ab\n dvk r3 = r15.g\n if (r3 == 0) goto L_0x03c9\n dzo r2 = r15.d\n long r4 = (long) r1\n r2.d(r4)\n int r2 = r15.r\n int r1 = r1 + r2\n r15.r = r1\n L_0x00ab:\n throw r0\n L_0x00ac:\n r0 = 0\n goto L_0x0047\n L_0x00ae:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 10\n if (r0 >= r3) goto L_0x00ba\n r0 = 0\n goto L_0x004f\n L_0x00ba:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.c() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 35615(0x8b1f, float:4.9907E-41)\n if (r0 == r3) goto L_0x00d4\n java.util.zip.ZipException r0 = new java.util.zip.ZipException // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = \"Not in GZIP format\"\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x00cd:\n r0 = move-exception\n java.lang.RuntimeException r3 = new java.lang.RuntimeException // Catch:{ all -> 0x008e }\n r3.<init>(r0) // Catch:{ all -> 0x008e }\n throw r3 // Catch:{ all -> 0x008e }\n L_0x00d4:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 8\n if (r0 == r3) goto L_0x00e6\n java.util.zip.ZipException r0 = new java.util.zip.ZipException // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = \"Unsupported compression method\"\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x00e6:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.j = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvl r4 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 6\n dvk r3 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r10 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r10.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3 - r10\n if (r3 <= 0) goto L_0x03d9\n r0 = 6\n int r0 = java.lang.Math.min(r3, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r3 = r3.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r10 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r10 = r10.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r11 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r11 = r11.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.update(r10, r11, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n defpackage.dvk.a(r3, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = 6 - r0\n r3 = r0\n L_0x0118:\n if (r3 <= 0) goto L_0x013b\n r0 = 512(0x200, float:7.175E-43)\n byte[] r10 = new byte[r0] // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 0\n L_0x011f:\n if (r0 >= r3) goto L_0x013b\n int r11 = r3 - r0\n r12 = 512(0x200, float:7.175E-43)\n int r11 = java.lang.Math.min(r11, r12) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r12 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r12 = r12.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r13 = 0\n r12.a(r10, r13, r11) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r12 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r12 = r12.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r13 = 0\n r12.update(r10, r13, r11) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 + r11\n goto L_0x011f\n L_0x013b:\n dvk r0 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 6\n defpackage.dvk.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.HEADER_EXTRA_LEN // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0148:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 4\n r3 = 4\n if (r0 == r3) goto L_0x0156\n dvm r0 = defpackage.dvm.HEADER_NAME // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0156:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 2\n if (r0 >= r3) goto L_0x0162\n r0 = 0\n goto L_0x004f\n L_0x0162:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.c() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.k = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.HEADER_EXTRA // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0171:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r7.k // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 >= r3) goto L_0x017e\n r0 = 0\n goto L_0x004f\n L_0x017e:\n dvl r10 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r7.k // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r0 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 - r3\n if (r0 <= 0) goto L_0x03d6\n int r0 = java.lang.Math.min(r0, r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r3 = r3.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r11 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r11 = r11.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r12 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r12 = r12.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.update(r11, r12, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n defpackage.dvk.a(r3, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r4 - r0\n r3 = r0\n L_0x01a8:\n if (r3 <= 0) goto L_0x01cb\n r0 = 512(0x200, float:7.175E-43)\n byte[] r11 = new byte[r0] // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 0\n L_0x01af:\n if (r0 >= r3) goto L_0x01cb\n int r12 = r3 - r0\n r13 = 512(0x200, float:7.175E-43)\n int r12 = java.lang.Math.min(r12, r13) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r13 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r13 = r13.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r14 = 0\n r13.a(r11, r14, r12) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r13 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r13 = r13.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r14 = 0\n r13.update(r11, r14, r12) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 + r12\n goto L_0x01af\n L_0x01cb:\n dvk r0 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n defpackage.dvk.b(r0, r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.HEADER_NAME // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x01d7:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 8\n r3 = 8\n if (r0 != r3) goto L_0x01f5\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x01e1:\n int r3 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 <= 0) goto L_0x01f3\n int r3 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 != 0) goto L_0x01e1\n r0 = 1\n L_0x01ee:\n if (r0 != 0) goto L_0x01f5\n r0 = 0\n goto L_0x004f\n L_0x01f3:\n r0 = 0\n goto L_0x01ee\n L_0x01f5:\n dvm r0 = defpackage.dvm.HEADER_COMMENT // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x01fc:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 16\n r3 = 16\n if (r0 != r3) goto L_0x021a\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0206:\n int r3 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 <= 0) goto L_0x0218\n int r3 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 != 0) goto L_0x0206\n r0 = 1\n L_0x0213:\n if (r0 != 0) goto L_0x021a\n r0 = 0\n goto L_0x004f\n L_0x0218:\n r0 = 0\n goto L_0x0213\n L_0x021a:\n dvm r0 = defpackage.dvm.HEADER_CRC // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0221:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 2\n r3 = 2\n if (r0 != r3) goto L_0x024f\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 2\n if (r0 >= r3) goto L_0x0234\n r0 = 0\n goto L_0x004f\n L_0x0234:\n java.util.zip.CRC32 r0 = r7.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n long r10 = r0.getValue() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = (int) r10 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 65535(0xffff, float:9.1834E-41)\n r0 = r0 & r3\n dvl r3 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.c() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 == r3) goto L_0x024f\n java.util.zip.ZipException r0 = new java.util.zip.ZipException // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = \"Corrupt GZIP header\"\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x024f:\n dvm r0 = defpackage.dvm.INITIALIZE_INFLATER // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0256:\n java.util.zip.Inflater r0 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != 0) goto L_0x027e\n java.util.zip.Inflater r0 = new java.util.zip.Inflater // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 1\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.g = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0262:\n java.util.zip.CRC32 r0 = r7.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.reset() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r7.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 - r3\n if (r0 <= 0) goto L_0x0284\n java.util.zip.Inflater r3 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r7.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.setInput(r4, r10, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.INFLATING // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x027b:\n r0 = 1\n goto L_0x004f\n L_0x027e:\n java.util.zip.Inflater r0 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.reset() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x0262\n L_0x0284:\n dvm r0 = defpackage.dvm.INFLATER_NEEDS_INPUT // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x027b\n L_0x0289:\n int r0 = r9 + r5\n int r0 = r7.a(r8, r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r5 + r0\n dvm r0 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r4 = defpackage.dvm.TRAILER // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != r4) goto L_0x029e\n boolean r0 = r7.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r5 = r3\n goto L_0x004f\n L_0x029e:\n r0 = 1\n r5 = r3\n goto L_0x004f\n L_0x02a2:\n java.util.zip.Inflater r0 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 == 0) goto L_0x02c7\n r0 = 1\n L_0x02a7:\n java.lang.String r3 = \"inflater is null\"\n defpackage.cld.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r7.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != r3) goto L_0x02c9\n r0 = 1\n L_0x02b3:\n java.lang.String r3 = \"inflaterInput has unconsumed bytes\"\n defpackage.cld.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r0 = r7.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 512(0x200, float:7.175E-43)\n int r0 = java.lang.Math.min(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != 0) goto L_0x02cb\n r0 = 0\n goto L_0x004f\n L_0x02c7:\n r0 = 0\n goto L_0x02a7\n L_0x02c9:\n r0 = 0\n goto L_0x02b3\n L_0x02cb:\n r3 = 0\n r7.e = r3 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.f = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r3 = r7.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r7.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.a(r4, r10, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.Inflater r3 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r7.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.setInput(r4, r10, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.INFLATING // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x02e9:\n boolean r0 = r7.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x004f\n L_0x02ef:\n if (r0 == 0) goto L_0x0301\n dvm r0 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r3 = defpackage.dvm.HEADER // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != r3) goto L_0x0334\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 10\n if (r0 >= r3) goto L_0x0334\n L_0x0301:\n r0 = 1\n L_0x0302:\n r7.n = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r0 = r15.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r0.l // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r4 = 0\n r0.l = r4 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r2 = r2 + r3\n dvk r0 = r15.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r0.m // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r4 = 0\n r0.m = r4 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r1 = r1 + r3\n if (r5 != 0) goto L_0x0342\n if (r2 <= 0) goto L_0x0332\n dxe r0 = r15.a\n r0.a(r2)\n dxh r0 = r15.j\n dxh r3 = defpackage.dxh.BODY\n if (r0 != r3) goto L_0x0332\n dvk r0 = r15.g\n if (r0 == 0) goto L_0x0336\n dzo r0 = r15.d\n long r2 = (long) r1\n r0.d(r2)\n int r0 = r15.r\n int r0 = r0 + r1\n r15.r = r0\n L_0x0332:\n r0 = 0\n L_0x0333:\n return r0\n L_0x0334:\n r0 = 0\n goto L_0x0302\n L_0x0336:\n dzo r0 = r15.d\n long r4 = (long) r2\n r0.d(r4)\n int r0 = r15.r\n int r0 = r0 + r2\n r15.r = r0\n goto L_0x0332\n L_0x0342:\n dtd r0 = r15.m // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r3 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dxv r3 = defpackage.dxw.a(r3, r4, r5) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.a(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 + r5\n r15.i = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x000d\n L_0x0356:\n dtd r3 = r15.n // Catch:{ all -> 0x008e }\n int r3 = r3.a // Catch:{ all -> 0x008e }\n if (r3 != 0) goto L_0x0386\n if (r2 <= 0) goto L_0x0378\n dxe r0 = r15.a\n r0.a(r2)\n dxh r0 = r15.j\n dxh r3 = defpackage.dxh.BODY\n if (r0 != r3) goto L_0x0378\n dvk r0 = r15.g\n if (r0 == 0) goto L_0x037a\n dzo r0 = r15.d\n long r2 = (long) r1\n r0.d(r2)\n int r0 = r15.r\n int r0 = r0 + r1\n r15.r = r0\n L_0x0378:\n r0 = 0\n goto L_0x0333\n L_0x037a:\n dzo r0 = r15.d\n long r4 = (long) r2\n r0.d(r4)\n int r0 = r15.r\n int r0 = r0 + r2\n r15.r = r0\n goto L_0x0378\n L_0x0386:\n dtd r3 = r15.n // Catch:{ all -> 0x008e }\n int r3 = r3.a // Catch:{ all -> 0x008e }\n int r0 = java.lang.Math.min(r0, r3) // Catch:{ all -> 0x008e }\n int r2 = r2 + r0\n dtd r3 = r15.m // Catch:{ all -> 0x008e }\n dtd r4 = r15.n // Catch:{ all -> 0x008e }\n dxv r0 = r4.a(r0) // Catch:{ all -> 0x008e }\n dtd r0 = (defpackage.dtd) r0 // Catch:{ all -> 0x008e }\n r3.a(r0) // Catch:{ all -> 0x008e }\n goto L_0x000d\n L_0x039e:\n if (r2 <= 0) goto L_0x03ba\n dxe r0 = r15.a\n r0.a(r2)\n dxh r0 = r15.j\n dxh r3 = defpackage.dxh.BODY\n if (r0 != r3) goto L_0x03ba\n dvk r0 = r15.g\n if (r0 == 0) goto L_0x03bd\n dzo r0 = r15.d\n long r2 = (long) r1\n r0.d(r2)\n int r0 = r15.r\n int r0 = r0 + r1\n r15.r = r0\n L_0x03ba:\n r0 = 1\n goto L_0x0333\n L_0x03bd:\n dzo r0 = r15.d\n long r4 = (long) r2\n r0.d(r4)\n int r0 = r15.r\n int r0 = r0 + r2\n r15.r = r0\n goto L_0x03ba\n L_0x03c9:\n dzo r1 = r15.d\n long r4 = (long) r2\n r1.d(r4)\n int r1 = r15.r\n int r1 = r1 + r2\n r15.r = r1\n goto L_0x00ab\n L_0x03d6:\n r3 = r4\n goto L_0x01a8\n L_0x03d9:\n r3 = r0\n goto L_0x0118\n */\n throw new UnsupportedOperationException(\"Method not decompiled: defpackage.dxd.e():boolean\");\n }",
"boolean isOp();",
"public boolean g()\r\n/* 94: */ {\r\n/* 95:94 */ return this.g;\r\n/* 96: */ }",
"abstract String getOp();",
"Operator.Type getOperation();",
"double passer();",
"X86.Reg gen_dest_operand();",
"@Override\n\tpublic void visit(BitwiseXor arg0) {\n\t\t\n\t}",
"public boolean b() {\n/* 365 */ switch (this.h) {\n/* */ case 0:\n/* */ case 1:\n/* 368 */ return true;\n/* */ case 2:\n/* 370 */ return false;\n/* */ } \n/* 372 */ throw new IllegalArgumentException(\"Non JPEG 2000 part I component transformation\");\n/* */ }",
"@Override\n\tpublic void visit(BitwiseAnd arg0) {\n\t\t\n\t}",
"private int m10275g(int i) {\r\n return (i >>> 1) ^ (-(i & 1));\r\n }",
"public abstract void mo9254f(boolean z);",
"public vx i()\r\n/* 185: */ {\r\n/* 186:212 */ return vx.a;\r\n/* 187: */ }",
"interface GateInOut {\r\n\tpublic void enterGate();\r\n\tpublic void exitGate();\r\n}",
"public interface DoorMat extends PowerableMat, DirectionalMat, OpenableMat\n{\n /**\n * Bit flag defining half-part of door.\n * If bit is set to 0, then it's bottom part.\n */\n byte HALF_FLAG = 0x8; // 0 -> bottom part of dors\n /**\n * Bit flag defining if door is closed.\n * Works only for bottom part of door.\n * If bit is set to 0, then door is closed\n */\n byte OPEN_FLAG = 0x4; // 0 -> door is closed, only for bottom part\n /**\n * Bit flag defining if door is powered.\n * Works only for top part of door.\n * If bit is set to 0, then door is unpowered\n */\n byte POWERED_FLAG = 0x2; // 0 -> door is closed, only for top part\n /**\n * Bit flag defining if door have hinge on left side\n * Works only for top part of door.\n * If bit is set to 0, then door have hinge on left side\n */\n byte HINGE_FLAG = 0x1; // 0 -> door have hinge on left side, only for top part\n\n /**\n * Returns sub-type of Door, it will always return top part of block with selected powered state.\n *\n * @param isPowered if door should be powered\n * @param hingeOnRightSide if door should have hinge on right side.\n *\n * @return sub-type of Door\n */\n DoorMat getType(boolean isPowered, boolean hingeOnRightSide);\n\n /**\n * Returns sub-type of Door, it will always return buttom part of block with selected {@link BlockFace} and open state.\n *\n * @param face facing of door\n * @param isOpen if door should be open\n *\n * @return sub-type of Door\n */\n DoorMat getType(BlockFace face, boolean isOpen);\n\n\n /**\n * @return true if this is top part of door.\n */\n boolean isTopPart();\n\n /**\n * Return sub-type of door based on half-part state/\n *\n * @param top if it should be top part of door\n *\n * @return sub-type of door.\n */\n DoorMat getTopPart(boolean top);\n\n /**\n * Returns facing direction ({@link BlockFace}) of door, only bottom part of door defining facing.\n *\n * @return facing direction ({@link BlockFace}) of door.\n *\n * @throws RuntimeException if this is top part of door\n */\n @Override\n BlockFace getBlockFacing() throws RuntimeException;\n\n /**\n * Return sub-type of door based on {@link BlockFace}, it can be used only on bottop part of door.\n *\n * @param face facing direction ({@link BlockFace}) of door.\n *\n * @return sub-type of door.\n *\n * @throws RuntimeException if this is top part of door\n */\n @Override\n DoorMat getBlockFacing(BlockFace face) throws RuntimeException;\n\n /**\n * Returns true if door is open, only bottom part of door defining if door is open.\n *\n * @return true if door is open.\n *\n * @throws RuntimeException if this is top part of door\n */\n @Override\n boolean isOpen() throws RuntimeException;\n\n /**\n * Return sub-type of door based on open state, it can be used only on bottop part of door.\n *\n * @param open if it should be open type\n *\n * @return sub-type of door.\n *\n * @throws RuntimeException if this is top part of door\n */\n @Override\n DoorMat getOpen(boolean open) throws RuntimeException;\n\n /**\n * Returns true if door is powered, only top part of door defining if door is powered.\n *\n * @return true if door is powered.\n *\n * @throws RuntimeException if this is bottom part of door\n */\n @Override\n boolean isPowered() throws RuntimeException;\n\n /**\n * Return sub-type of door based on powered state, it can be used only on top part of door.\n *\n * @param powered if it should be powered type\n *\n * @return sub-type of door.\n *\n * @throws RuntimeException if this is bottom part of door\n */\n @Override\n DoorMat getPowered(boolean powered) throws RuntimeException;\n\n /**\n * Returns true if door has hinge on rgiht side, only top part of door defining side of hinge.\n *\n * @return true if door has hinge on rgiht side.\n *\n * @throws RuntimeException if this is bottom part of door\n */\n boolean hasHingeOnRightSide() throws RuntimeException;\n\n /**\n * Return sub-type of door based on hinge side, it can be used only on top part of door.\n *\n * @param onRightSide if door should have hinge on right side.\n *\n * @return sub-type of door.\n *\n * @throws RuntimeException if this is bottom part of door\n */\n DoorMat getHingeOnRightSide(boolean onRightSide) throws RuntimeException;\n\n\n @SuppressWarnings(\"JavaDoc\")\n static byte combine(final boolean isPowered, final boolean hingeOnRightSide)\n {\n byte result = HALF_FLAG;\n if (isPowered)\n {\n result |= POWERED_FLAG;\n }\n if (hingeOnRightSide)\n {\n result |= HINGE_FLAG;\n }\n return result;\n }\n\n @SuppressWarnings(\"JavaDoc\")\n static byte combine(final BlockFace face, final boolean isOpen)\n {\n byte result = isOpen ? OPEN_FLAG : 0x0;\n switch (face)\n {\n case SOUTH:\n result |= 0x1;\n break;\n case WEST:\n result |= 0x2;\n break;\n case NORTH:\n result |= 0x3;\n break;\n default:\n break;\n }\n return result;\n }\n}",
"private void testGate(final ManagementGate origGate, final ManagementGate copyGate) {\n\n\t\tassertEquals(origGate.getIndex(), copyGate.getIndex());\n\t\tassertEquals(origGate.isInputGate(), copyGate.isInputGate());\n\t\tassertEquals(origGate.getNumberOfForwardEdges(), copyGate.getNumberOfForwardEdges());\n\t\tassertEquals(origGate.getNumberOfBackwardEdges(), copyGate.getNumberOfBackwardEdges());\n\n\t\tfor (int i = 0; i < origGate.getNumberOfForwardEdges(); i++) {\n\n\t\t\tfinal ManagementEdge origEdge = origGate.getForwardEdge(i);\n\t\t\tfinal ManagementEdge copyEdge = copyGate.getForwardEdge(i);\n\n\t\t\ttestEdge(origEdge, copyEdge);\n\t\t}\n\n\t\tfor (int i = 0; i < origGate.getNumberOfBackwardEdges(); i++) {\n\n\t\t\tfinal ManagementEdge origEdge = origGate.getBackwardEdge(i);\n\t\t\tfinal ManagementEdge copyEdge = copyGate.getBackwardEdge(i);\n\n\t\t\ttestEdge(origEdge, copyEdge);\n\t\t}\n\t}",
"public String toString() {\n return gate;\n }",
"public LogicGate( String name, float delay ) {\n\tsuper( name, delay );\n }",
"public abstract void bepaalGrootte();",
"protected bed e()\r\n/* 210: */ {\r\n/* 211:245 */ return new bed(this, new IBlockData[] { a, b });\r\n/* 212: */ }",
"public AGateway getGateway()\r\n/* 16: */ {\r\n/* 17:36 */ return this.gateway;\r\n/* 18: */ }",
"protected abstract IStoreFastLane make_express();",
"public int c(Block parambec)\r\n/* 199: */ {\r\n/* 200:232 */ int i = 0;\r\n/* 201: */ \r\n/* 202:234 */ i |= ((EnumDirection)parambec.getData(a)).a();\r\n/* 203:236 */ if (parambec.getData(b) == bdu.b) {\r\n/* 204:237 */ i |= 0x8;\r\n/* 205: */ }\r\n/* 206:240 */ return i;\r\n/* 207: */ }",
"public interface ControlSequenceExpression /*extends ControlSequence*/ {\n byte[] interpret();\n}",
"public void visit(BinConditionalExpression x){\n }",
"public interface ChannelSignal {\r\n\r\n /**\r\n * Channel enum used to define which channel a signal applies to if needed\r\n * in one of the textures.\r\n */\r\n public enum Channel {\r\n\r\n RED, GREEN, BLUE, ALPHA;\r\n }\r\n\r\n /**\r\n * \r\n * @param u\r\n * u Component used to determine the output signal value\r\n * @param v\r\n * v Component used to determine the output signal value\r\n * @return\r\n * the value of the output signal\r\n */\r\n double getValue(double u, double v);\r\n}",
"int CONVOLVE() { return 22; }",
"@Override\n\tpublic void visit(BitwiseXor arg0) {\n\n\t}",
"public int getGateNumber() {\n return gateNumber;\n }",
"public boolean leftDistributive( Operator op){\n\t return false;\n }",
"@Override\n\tpublic void visit(BitwiseAnd arg0) {\n\n\t}",
"@Override\n public void function() {\n App.memory.setMemory(op2, Memory.convertBSToBoolArr(Memory.length32(Integer.toBinaryString(\n op1 * Integer.parseInt(App.memory.getMemory(op2, 1 << 2 + 2 + 1), 2)))));\n }",
"public abstract void mo6549b();",
"godot.wire.Wire.Basis getBasis();",
"XORGateway createXORGateway();",
"static void recorreT(){\r\n\tStruct aux=lt;\r\n\twhile(aux!=null){\r\n\t\taux.view();\r\n\t\taux=aux.sig;\r\n\t}\r\n }",
"X86.Operand gen_source_operand(boolean imm_ok, X86.Reg temp);",
"@Test\n public void testTargetSquares_cannotEnterGate() {\n Board board = new Board(p1, p2);\n Token ant = p1.getFromSupply(BugType.SPIDER);\n board.addToken(ant, 0, 3);\n board.addToken(p2.getFromSupply(BugType.QUEEN_BEE), 1, 0);\n board.addToken(p2.getFromSupply(BugType.SPIDER), 2, 0);\n board.addToken(p2.getFromSupply(BugType.GRASSHOPPER), 2, 1);\n board.addToken(p2.getFromSupply(BugType.SOLDIER_ANT), 0, 1);\n board.addToken(p2.getFromSupply(BugType.BEETLE), 0, 2);\n\n List<Hex> targets = Rules.getInstance().getTargetHexes(ant, board);\n assertEquals(2, targets.size());\n assertTrue(targets.contains(board.getHex(-1, 1)));\n assertTrue(targets.contains(board.getHex(3, 1)));\n }",
"public OrGate( String name, float delay ) {\n\tsuper( name, delay );\n }",
"static void lwl_be(UINT32 op)\n\t{\n\t\toffs_t offs = SIMMVAL + RSVAL32;\n\t\tdata32_t temp = RLONG(offs & ~3);\n\t\tif (RTREG)\n\t\t{\n\t\t\tif (!(offs & 3)) RTVAL64 = (INT32)temp;\n\t\t\telse\n\t\t\t{\n\t\t\t\tint shift = 8 * (offs & 3);\n\t\t\t\tRTVAL64 = (INT32)((RTVAL32 & (0x00ffffff >> (24 - shift))) | (temp << shift));\n\t\t\t}\n\t\t}\n\t}",
"public AndGate( String name, float delay ) {\n\tsuper( name, delay );\n }",
"public static void make( Scanner sc ) {\n // First worry about the gate name\n final String name\n = ScanSupport.scanName( sc, () -> \"Gate has missing name\" );\n if (name == null) {\n ScanSupport.finishLine(\n sc, () -> \"Gate: followed by\"\n );\n return;\n }\n if (findGate( name ) != null) {\n Errors.warn( \"Gate \" + name + \": name reused\" );\n ScanSupport.finishLine(\n sc, () -> \"Gate \" + name + \": followed by\"\n );\n return;\n }\n\n // Second get the gate kind\n final String kind = ScanSupport.scanName(\n sc, () -> \"Gate \" + name + \": kind missing\"\n );\n if (kind == null) {\n ScanSupport.finishLine(\n sc, () -> \"Gate \" + name + \": followed by\"\n );\n return;\n }\n\n // Finally construct the right kind of gate\n if (\"xor\".equals( kind )) {\n allGates.add( new XorGate( sc, name ) );\n } else if (\"threshold\".equals( kind )) {\n allGates.add( new ThresholdGate( sc, name ) );\n } else if (\"input\".equals( kind )) {\n allGates.add( new InputGate( sc, name ) );\n } else if (\"output\".equals( kind )) {\n allGates.add( new OutputGate( sc, name ) );\n } else {\n Errors.warn( \"Gate \" + name + \" \" + kind + \": kind unknown\" );\n ScanSupport.finishLine(\n sc, () -> \"Gate \" + name + \" \" + kind + \": followed by\"\n );\n }\n }",
"protected boolean func_70814_o() { return true; }",
"abstract void accelarator();",
"abstract void mo4372a(zzwt zzwt, cu cuVar);",
"private void m5276b(C1070b op) {\n m5283g(op);\n }",
"protected TwoInputGate( String name, float delay ) {\n\tsuper( name, delay );\n }",
"public boolean h()\r\n/* 189: */ {\r\n/* 190:187 */ return this.g;\r\n/* 191: */ }",
"public boolean getBit(Point2D.Double p) {\n// System.out.println(\"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\");\n// System.out.println(\"Getting Point x=\"+p.x+ \", y=\"+p.y);\n// System.out.println(\"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\");\n return get((int) ((int)x * ((int)p.y - 1) + (int)p.y));\n \n }",
"public void test4_c() {/*\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},\n\t\t\t\t{ 0, 1, -1},\n\t\t\t\t{ 0, 0, 1}\n });\n\t\tgdEdge1.producedDomain = convertIntTableToPIPDRational(2, 0, new int[][]{ // (0..+inf, 1..+inf)\n\t\t\t\t{ 1, 0, 0},\n\t\t\t\t{ 0, 1, -1}\n\t\t});\n\n\t\tgdEdge2.dataDependence = convertIntTableToAffineTrafoRational(new int[][]{ // (i - 1, j + 7) \n\t\t\t\t{ 1, 0, -1},\n\t\t\t\t{ 0, 1, 7},\n\t\t\t\t{ 0, 0, 1}\n });\n\t\tgdEdge2.producedDomain = convertIntTableToPIPDRational(2, 0, new int[][]{ // (1..+inf, 0..+inf)\n\t\t\t\t{ 1, 0, -1},\n\t\t\t\t{ 0, 1, 0}\n\t\t});\n\n\t\tgdVertex.computationDomain = convertIntTableToPIPDRational(2, 0, new int[][]{ // (1..+inf, 1..+inf)\n\t\t\t\t{ 1, 0, -1},\n\t\t\t\t{ 0, 1, -1}\n\t\t});\n\t\t\n\t\tgdGraph.calculateFeautrierSchedule(false);\n\t\n\t\tgdGraph.<Rational>codeGeneration(Rational.ZERO, Rational.ONE);\n\t*/}",
"public Object visitUnaryPlusExpression(GNode n) {\n nonboolean = true;\n \n return dispatch(n.getGeneric(0));\n }",
"public boolean isDirect()\r\n/* 76: */ {\r\n/* 77:111 */ return false;\r\n/* 78: */ }",
"@Override\n\tpublic void tanCongKeXau() {\n\n\t}",
"public abstract C0631bt mo9251e(boolean z);",
"@Override\n\tpublic int infer(Structure struct) {\n\t\treturn 0;\n\t}",
"protected void func_70628_a(boolean flag, int i) {\n/* 395 */ if (this.field_70170_p.field_73012_v.nextBoolean())\n/* 396 */ func_70099_a(ConfigItems.FLUX_CRYSTAL.func_77946_l(), this.field_70131_O / 2.0F); \n/* */ }",
"public abstract void mo70713b();",
"public int mo9774x() {\n /*\n r5 = this;\n int r0 = r5.f9082i\n int r1 = r5.f9080g\n if (r1 != r0) goto L_0x0007\n goto L_0x006a\n L_0x0007:\n byte[] r2 = r5.f9079f\n int r3 = r0 + 1\n byte r0 = r2[r0]\n if (r0 < 0) goto L_0x0012\n r5.f9082i = r3\n return r0\n L_0x0012:\n int r1 = r1 - r3\n r4 = 9\n if (r1 >= r4) goto L_0x0018\n goto L_0x006a\n L_0x0018:\n int r1 = r3 + 1\n byte r3 = r2[r3]\n int r3 = r3 << 7\n r0 = r0 ^ r3\n if (r0 >= 0) goto L_0x0024\n r0 = r0 ^ -128(0xffffffffffffff80, float:NaN)\n goto L_0x0070\n L_0x0024:\n int r3 = r1 + 1\n byte r1 = r2[r1]\n int r1 = r1 << 14\n r0 = r0 ^ r1\n if (r0 < 0) goto L_0x0031\n r0 = r0 ^ 16256(0x3f80, float:2.278E-41)\n L_0x002f:\n r1 = r3\n goto L_0x0070\n L_0x0031:\n int r1 = r3 + 1\n byte r3 = r2[r3]\n int r3 = r3 << 21\n r0 = r0 ^ r3\n if (r0 >= 0) goto L_0x003f\n r2 = -2080896(0xffffffffffe03f80, float:NaN)\n r0 = r0 ^ r2\n goto L_0x0070\n L_0x003f:\n int r3 = r1 + 1\n byte r1 = r2[r1]\n int r4 = r1 << 28\n r0 = r0 ^ r4\n r4 = 266354560(0xfe03f80, float:2.2112565E-29)\n r0 = r0 ^ r4\n if (r1 >= 0) goto L_0x002f\n int r1 = r3 + 1\n byte r3 = r2[r3]\n if (r3 >= 0) goto L_0x0070\n int r3 = r1 + 1\n byte r1 = r2[r1]\n if (r1 >= 0) goto L_0x002f\n int r1 = r3 + 1\n byte r3 = r2[r3]\n if (r3 >= 0) goto L_0x0070\n int r3 = r1 + 1\n byte r1 = r2[r1]\n if (r1 >= 0) goto L_0x002f\n int r1 = r3 + 1\n byte r2 = r2[r3]\n if (r2 >= 0) goto L_0x0070\n L_0x006a:\n long r0 = r5.mo9776z()\n int r0 = (int) r0\n return r0\n L_0x0070:\n r5.f9082i = r1\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p213q.p217b.p301c.p302a.p311j0.p312a.C3656k.C3659c.mo9774x():int\");\n }",
"protected bed e()\r\n/* 124: */ {\r\n/* 125:136 */ return new bed(this, new IBlockData[] { a });\r\n/* 126: */ }",
"private boolean canGenericOperatorsBeRewrite(Expression virtExpr){\r\n\r\n\t for(GenericNames name : GenericNames.values()){\r\n\t\tif(!name.equals(GenericNames.ON_NEW_NAME))\r\n\t\t if(!this.canOperatorBeRewrittenForExpression(name, virtExpr))\r\n\t\t\treturn false;\r\n\t }\r\n\t\treturn true;\r\n\t}",
"public interface C11922a {\n void bvR();\n }",
"public abstract void mo32006dL(boolean z);",
"void gen() {\n X86.Operand mleft = src1.gen_source_operand(false,tempReg1); \r\n X86.Operand mright = src2.gen_source_operand(true,tempReg2); \r\n X86.emit2(\"cmp\" + X86.Size.Q,mright,mleft);\r\n X86.emit0(\"j\" + op.X86_name() + \" F\" + funcNumber + \"_\" + lab.name);\r\n }",
"@Override\r\n\tpublic void visit(BinaryExpression binaryExpression) {\n\r\n\t}",
"String getOp();",
"String getOp();",
"String getOp();",
"@Override\r\n\tpublic void visit(SimplePin pin) {\n\t\tboolean pinMod;\r\n\t\tif (isForward()) {\r\n\t\t\tpinMod = pin.propagateValuesForward();\r\n\t\t} else {\r\n\t\t\tpinMod = pin.propagateValuesBackward();\r\n\t\t}\r\n\t\tmodified |= pinMod;\r\n\t}",
"@Override\n public BinaryFunc get() { return new AbsPlus(); }",
"public abstract int mo123248g();",
"public R visit(BinOp n) {\n R _ret=null;\n String s0 = (String)n.f0.accept(this);\n simple_exp=0;\n String s1 = (String)n.f1.accept(this);\n simple_exp=0;\n String s2 = (String)n.f2.accept(this);\n int temp = new_temp++;\n System.out.println(\"MOVE TEMP \"+temp + \" \"+s0+\" \"+s1+\" \"+s2);\n return (R)(\"TEMP \"+temp);\n }",
"N getTarget();",
"protected abstract T mo2623i();",
"protected void o()\r\n/* 156: */ {\r\n/* 157:179 */ int i = 15 - aib.b(this);\r\n/* 158:180 */ float f = 0.98F + i * 0.001F;\r\n/* 159: */ \r\n/* 160:182 */ this.xVelocity *= f;\r\n/* 161:183 */ this.yVelocity *= 0.0D;\r\n/* 162:184 */ this.zVelocity *= f;\r\n/* 163: */ }",
"public void alg_BLOCKCONVEYER(){\nBlock.value=true;\nSystem.out.println(\"block\");\n\n}",
"public boolean b(IBlockAccess paramard, BlockPosition paramdt)\r\n/* 31: */ {\r\n/* 32:46 */ return true;\r\n/* 33: */ }",
"@Test\n public void testSingleChannelNoBarriers() throws Exception {\n BufferOrEvent[] sequence = {\n createBuffer(0), createBuffer(0),\n createBuffer(0), createEndOfPartition(0)\n };\n inputGate = createCheckpointedInputGate(1, sequence);\n\n for (BufferOrEvent boe : sequence) {\n assertEquals(boe, inputGate.pollNext().get());\n }\n\n assertEquals(0L, inputGate.getAlignmentDurationNanos());\n }",
"@Test\n public void convertAFby() {\n DistEventType x = DistEventType.LocalEvent(\"x\", 0);\n DistEventType y = DistEventType.LocalEvent(\"y\", 0);\n\n TemporalInvariantSet synInvs = new TemporalInvariantSet();\n synInvs.add(new AlwaysFollowedInvariant(x, y, \"t\"));\n List<dynoptic.invariants.BinaryInvariant> dynInvs = DynopticMain\n .synInvsToDynInvs(synInvs);\n assertTrue(dynInvs.size() == 1);\n\n BinaryInvariant dInv = dynInvs.iterator().next();\n assertTrue(dInv instanceof AlwaysFollowedBy);\n assertTrue(dInv.getFirst().equals(x));\n assertTrue(dInv.getSecond().equals(y));\n }",
"public abstract double accept(TopologyVisitor visitor);",
"protected abstract T getNormalFlagValue();",
"private c b(c blk, int i) {\n/* 585 */ int w = blk.g;\n/* 586 */ int h = blk.h;\n/* */ \n/* */ \n/* 589 */ if (blk.a() != 4) {\n/* 590 */ if (this.j == null || this.j.a() != 4) {\n/* 591 */ this.j = (c)new d();\n/* */ }\n/* 593 */ this.j.g = w;\n/* 594 */ this.j.h = h;\n/* 595 */ this.j.e = blk.e;\n/* 596 */ this.j.f = blk.f;\n/* 597 */ blk = this.j;\n/* */ } \n/* */ \n/* */ \n/* 601 */ float[] outdata = (float[])blk.b();\n/* */ \n/* */ \n/* 604 */ if (outdata == null || outdata.length < w * h) {\n/* 605 */ outdata = new float[h * w];\n/* 606 */ blk.a(outdata);\n/* */ } \n/* */ \n/* */ \n/* 610 */ if (i >= 0 && i <= 2) {\n/* */ int j;\n/* */ \n/* */ \n/* 614 */ if (this.m == null)\n/* 615 */ this.m = new e(); \n/* 616 */ if (this.n == null)\n/* 617 */ this.n = new e(); \n/* 618 */ if (this.o == null)\n/* 619 */ this.o = new e(); \n/* 620 */ this.o.g = blk.g;\n/* 621 */ this.o.h = blk.h;\n/* 622 */ this.o.e = blk.e;\n/* 623 */ this.o.f = blk.f;\n/* */ \n/* */ \n/* 626 */ this.m = (e)this.e.getInternCompData((c)this.m, 0);\n/* 627 */ int[] data0 = (int[])this.m.b();\n/* 628 */ this.n = (e)this.e.getInternCompData((c)this.n, 1);\n/* 629 */ int[] data1 = (int[])this.n.b();\n/* 630 */ this.o = (e)this.e.getInternCompData((c)this.o, 2);\n/* 631 */ int[] data2 = (int[])this.o.b();\n/* */ \n/* */ \n/* 634 */ blk.k = (this.m.k || this.n.k || this.o.k);\n/* */ \n/* 636 */ blk.i = 0;\n/* 637 */ blk.j = w;\n/* */ \n/* */ \n/* */ \n/* */ \n/* 642 */ int k = w * h - 1;\n/* 643 */ int k0 = this.m.i + (h - 1) * this.m.j + w - 1;\n/* 644 */ int k1 = this.n.i + (h - 1) * this.n.j + w - 1;\n/* 645 */ int k2 = this.o.i + (h - 1) * this.o.j + w - 1;\n/* */ \n/* 647 */ switch (i) {\n/* */ \n/* */ case 0:\n/* 650 */ for (j = h - 1; j >= 0; j--) {\n/* 651 */ for (int mink = k - w; k > mink; k--, k0--, k1--, k2--) {\n/* 652 */ outdata[k] = 0.299F * data0[k0] + 0.587F * data1[k1] + 0.114F * data2[k2];\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 658 */ k0 -= this.m.j - w;\n/* 659 */ k1 -= this.n.j - w;\n/* 660 */ k2 -= this.o.j - w;\n/* */ } \n/* */ break;\n/* */ \n/* */ \n/* */ case 1:\n/* 666 */ for (j = h - 1; j >= 0; j--) {\n/* 667 */ for (int mink = k - w; k > mink; k--, k0--, k1--, k2--) {\n/* 668 */ outdata[k] = -0.16875F * data0[k0] - 0.33126F * data1[k1] + 0.5F * data2[k2];\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 674 */ k0 -= this.m.j - w;\n/* 675 */ k1 -= this.n.j - w;\n/* 676 */ k2 -= this.o.j - w;\n/* */ } \n/* */ break;\n/* */ \n/* */ \n/* */ case 2:\n/* 682 */ for (j = h - 1; j >= 0; j--) {\n/* 683 */ for (int mink = k - w; k > mink; k--, k0--, k1--, k2--) {\n/* 684 */ outdata[k] = 0.5F * data0[k0] - 0.41869F * data1[k1] - 0.08131F * data2[k2];\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 690 */ k0 -= this.m.j - w;\n/* 691 */ k1 -= this.n.j - w;\n/* 692 */ k2 -= this.o.j - w;\n/* */ } \n/* */ break;\n/* */ } \n/* */ } else {\n/* 697 */ if (i >= 3) {\n/* */ \n/* */ \n/* */ \n/* */ \n/* 702 */ e indb = new e(blk.e, blk.f, w, h);\n/* */ \n/* */ \n/* */ \n/* */ \n/* 707 */ this.e.getInternCompData((c)indb, i);\n/* 708 */ int[] indata = (int[])indb.b();\n/* */ \n/* */ \n/* 711 */ int k = w * h - 1;\n/* 712 */ int k0 = indb.i + (h - 1) * indb.j + w - 1;\n/* 713 */ for (int j = h - 1; j >= 0; j--) {\n/* 714 */ for (int mink = k - w; k > mink; k--, k0--) {\n/* 715 */ outdata[k] = indata[k0];\n/* */ }\n/* */ \n/* 718 */ k0 += indb.g - w;\n/* */ } \n/* */ \n/* */ \n/* 722 */ blk.k = indb.k;\n/* 723 */ blk.i = 0;\n/* 724 */ blk.j = w;\n/* 725 */ return blk;\n/* */ } \n/* */ \n/* */ \n/* 729 */ throw new IllegalArgumentException();\n/* */ } \n/* 731 */ return blk;\n/* */ }"
] | [
"0.59774965",
"0.5903696",
"0.57840234",
"0.5670295",
"0.56205577",
"0.5427167",
"0.5263975",
"0.5228391",
"0.5225113",
"0.5178564",
"0.51116234",
"0.5104363",
"0.50781864",
"0.5071945",
"0.5065781",
"0.50599915",
"0.50585145",
"0.50556296",
"0.50461805",
"0.5036907",
"0.5020219",
"0.50199234",
"0.5013829",
"0.50098366",
"0.50049984",
"0.5003249",
"0.49987435",
"0.49921367",
"0.4981295",
"0.4970889",
"0.49689662",
"0.49667388",
"0.4963634",
"0.49616823",
"0.49592245",
"0.49551007",
"0.49545124",
"0.49446929",
"0.4933632",
"0.49336168",
"0.49203598",
"0.49188897",
"0.49083185",
"0.49022582",
"0.48971352",
"0.48943633",
"0.48851103",
"0.48791873",
"0.48658776",
"0.48633963",
"0.4843483",
"0.4842799",
"0.48418894",
"0.48373806",
"0.48360118",
"0.48306718",
"0.4830252",
"0.48193264",
"0.4818119",
"0.48143294",
"0.48068655",
"0.4799598",
"0.47981903",
"0.47931218",
"0.47847643",
"0.47828886",
"0.47825935",
"0.47789773",
"0.47735837",
"0.47726485",
"0.47714576",
"0.47709656",
"0.47686368",
"0.4766402",
"0.47632515",
"0.4758857",
"0.47522876",
"0.4749195",
"0.4746019",
"0.47443518",
"0.4742579",
"0.47418958",
"0.47364804",
"0.47360444",
"0.47360444",
"0.47360444",
"0.47354177",
"0.4734822",
"0.47342885",
"0.47303632",
"0.4729064",
"0.47275499",
"0.471213",
"0.4711558",
"0.47068685",
"0.47059098",
"0.4702804",
"0.47023013",
"0.47016087",
"0.47003183"
] | 0.48876727 | 46 |
tell the gate that one of its input pins is in use | public void registerInput( String pinName ) {
//Bug: all we do is prevent inputs from being used twice, more later
for (String s: inputs) {
if (s.equals( pinName )) {
Errors.warn( "Input reused: " + name + " " + pinName );
}
}
inputs.add( pinName );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract boolean sjekkPIN(int pin);",
"public void enableInputs();",
"public void inputChangeEvent( float time, int dstPin, boolean v ) {\n\tErrors.fatal( \"Input should never change: \" + toString() );\n }",
"private boolean needPIN() {\n return datafacade.getInt(\"pin\")!=-1;\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n int inPin = Integer.parseInt(txtPin.getText());\n\n //Compares the input value with the set pin\n if(inPin == 6942){\n txtPin.setText(\"Pin Accepted\");\n txtPin.enable(false);\n btnPrint.setVisible(true);\n } else {\n txtPin.setText(\"\");\n JOptionPane.showMessageDialog(JOptionPane.getRootFrame(),\n \"Wrong pin number\",\n \"Wrong pin\",\n JOptionPane.WARNING_MESSAGE);\n }\n }",
"@Override\n public int getPinState(){\n return 0;\n }",
"public abstract void inputChangeEvent( float time, int dstPin, boolean v );",
"private boolean poleSwitchEngaged(){\n return true; //poleSwitch.get();\n }",
"public boolean lockInput() {\n return input.setStation(this);\n }",
"public void pin();",
"public void pin();",
"interface GateInOut {\r\n\tpublic void enterGate();\r\n\tpublic void exitGate();\r\n}",
"public void inputChangeEvent( float time, int dstPin, boolean v ) {\n\tvalue = !v;\n\t Simulator.schedule(\n\t new Simulator.Event( time\n\t\t + (delay * 0.95f)\n\t\t + PRNG.randomFloat( delay * 0.1f ) ) {\n\t\t void trigger() {\n\t\t\t outputChangeEvent( this.time );\n\t\t }\n\t\t}\n\t );\n }",
"synchronized void giveInput(int input) {\n this.input = input;\n inputGiven = true;\n notifyAll();\n }",
"public void xboxIntakeOuttake()\n {\n //Whether or not we are intaking from the bottom or front. If from front, value is negative.\n double intakeDirection = 1.0;\n if (RobotMap.assistantDriverController.getBumper(Hand.kRight))\n intakeDirection = -1.0;\n\n //Spins the motors when the button is pressed. THIS IS ONLY RUN ONCE UNTIL THE BUTTON IS RELEASED AND PRESSED AGAIN\n if (RobotMap.assistantDriverController.getXButtonPressed())\n {\n spinIntake( RobotMap.manipulatorSpeedModifier * intakeDirection); //Spin the intake\n RobotMap.ballInIntake = !RobotMap.ballInIntake;\n }\n //Only stop the motors when the button is released\n else if (RobotMap.assistantDriverController.getXButtonReleased())\n {\n spinIntake(RobotMap.MOTOR_FULL_STOP); //Stop the intake from spinning\n RobotMap.manipulatorSpeedModifier = RobotMap.MANIPULATOR_SLOW_SPEED;\n }\n else if (!RobotMap.ballIntakeStopSwitch.get() && RobotMap.ballInIntake)\n {\n System.out.println(\"stop\");\n spinIntake(RobotMap.MOTOR_FULL_STOP); //Stop the intake from spinning when the ball is inside\n RobotMap.manipulatorSpeedModifier = RobotMap.MOTOR_FULL_SPEED;\n }\n }",
"@Test\n\tpublic void invalidation() {\n\t\tp.pin(\"key\", () -> \"value\");\n\t\t// Pins are initially valid.\n\t\tassertTrue(p.valid());\n\t\t// Invalidation simply marks them as invalid.\n\t\tp.invalidate();\n\t\tassertFalse(p.valid());\n\t\t// Invalidation is inherited.\n\t\tReactivePins c = new ReactivePins();\n\t\tc.parent(p);\n\t\tassertFalse(c.valid());\n\t\tReactivePins gc = new ReactivePins();\n\t\tgc.parent(c);\n\t\tassertFalse(gc.valid());\n\t\t// Pins are valid if the whole hierarchy is valid.\n\t\tReactivePins vp = new ReactivePins();\n\t\tp.pin(\"key\", () -> \"value\");\n\t\tc.parent(vp);\n\t\tassertTrue(c.valid());\n\t\tassertTrue(gc.valid());\n\t\t// Empty pin collection is always valid since there are no pins to invalidate.\n\t\tReactivePins ep = new ReactivePins();\n\t\tep.invalidate();\n\t\tc.parent(ep);\n\t\tassertTrue(ep.valid());\n\t\tassertTrue(c.valid());\n\t\tassertTrue(gc.valid());\n\t}",
"public void releaseInput() {\n input.releaseStation();\n }",
"public Boolean isInputOver() {\n if (this.currentState == states.INPUT) {\n return true;\n }\n return false;\n }",
"public void setPin(int pin);",
"boolean isInputNeuron();",
"@Override\r\n\tpublic void visit(SimplePin pin) {\n\t\tboolean pinMod;\r\n\t\tif (isForward()) {\r\n\t\t\tpinMod = pin.propagateValuesForward();\r\n\t\t} else {\r\n\t\t\tpinMod = pin.propagateValuesBackward();\r\n\t\t}\r\n\t\tmodified |= pinMod;\r\n\t}",
"public void inputChange(int idx, boolean newState) {\n if (disabled) return;\n\n circuit.inputs[idx] = newState;\n\n notifyInputChanged(idx, newState);\n\n try {\n circuit.input(newState, idx);\n } catch (Exception e) {\n circuit.debug(RCPrefs.getErrorColor() + \"On input: \" + e.getMessage());\n e.printStackTrace();\n }\n }",
"@Override\r\n public void ProcessControlPIN(PinDataControl ControlData) {\n }",
"boolean motorsAreBusy();",
"public void Interrupt_on_Changes(int pins) throws IOException {\n int value = (int)mDevice.readRegByte( INTCON );\n value &= ~pins;\n mDevice.writeRegByte( INTCON, (byte)value );\n value = (int)mDevice.readRegByte( GPINTEN );\n value |= pins;\n mDevice.writeRegByte( GPINTEN, (byte)value );\n }",
"public boolean select() {\n\n // The applet declines to be selected\n // if the pin is blocked.\n if ( pin.getTriesRemaining() == 0 )\n return false;\n\n return true;\n\n }",
"public void SetInputPins(int pins) throws IOException {\n byte value = mDevice.readRegByte( IODIR );\n mDevice.writeRegByte( IODIR, (byte)(value | pins));\n }",
"InputPin getSecond();",
"boolean hasSignal();",
"boolean hasIsInputTo();",
"public void unpin();",
"public void unpin();",
"@Override\n\tpublic boolean triggers(AbstractInformationState is) {\n\t\treturn (((IUNetworkInformationState) is).currentContribIntegratesNextInput());\n\t}",
"public static void unfocusInputProcessor(){\n for (InputProcessor ip : inactiveInpProcssrs) {\n inpMulPlex.addProcessor(ip);\n }\n }",
"public boolean select(){\n\t\tif(PIN.getTriesRemaining() == 0){\n\t\t\treturn false;\t\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t}",
"public boolean canBeSwappedOut();",
"void onPinEntered(String pin);",
"public void pin() {\n this.pin = new Vec(this.pos);\n }",
"public interface IPinListener\n{\n /**\n * Invoked by a Pin when its value changes. The argument \n * is the component to which the Pin belongs.\n * @param c\n * parent component for the Pin invoking this method\n */\n public void update(IComponent c);\n}",
"public void reportMouseIn()\n\t{\n\t\tif(!mouseIn)\n\t\t{\n\t\t\tmouseIn = true;\n\t\t\ttarget.onEnter();\n\t\t}\n\t}",
"public void deselect(){\n\t\tPIN.reset();\n\t}",
"public boolean pinUseCount(ImmutableNodeInst pin)\n {\n int numConnections = getNumConnections(pin);\n if (numConnections > 2) return false;\n if (hasExports(pin)) return true;\n if (numConnections == 0) return false;\n return true;\n }",
"public void setCargoIntakeState() {\n blueLED.set(false);\n greenLED.set(false);\n if (!redLED.get() && timer.get() >= pulseTime) {\n redLED.startPulse();\n timer.stop();\n timer.reset();\n }\n else if (redLED.get() && timer.get() > pulseTime) {\n redLED.set(false);\n }\n else {\n timer.start();\n }\n }",
"public boolean select()\n {\n if ( pin.getTriesRemaining() == 0 )\n return false;\n return true;\n }",
"public void checkInputs() {\n\n gearShift = driveStick.getXButtonReleased();\n slow = driveStick.getAButtonReleased();\n\n manualClimb = driveStick.getBumper(Hand.kLeft) && driveStick.getBumper(Hand.kRight);\n\n //climbToggle = driveStick.getBumperReleased(Hand.kLeft);\n climbToggle = false;\n climbRelease = driveStick.getStartButton();\n\n resetBalls = gunnerStick.getStartButtonReleased();\n visionShoot = gunnerStick.getBButtonReleased();\n manualShoot = gunnerStick.getYButton();\n distShoot = gunnerStick.getAButton();\n intakeToggle = gunnerStick.getBumperReleased(Hand.kRight);\n hoodToggle = gunnerStick.getBumperReleased(Hand.kLeft);\n intakeReverse = gunnerStick.getXButtonReleased();\n magazineReverse = gunnerStick.getBackButton();\n\n\n //Switch statement to determine controls for the driver\n switch (driverScheme) {\n case \"Reverse Turning\":\n XSpeed = -driveStick.getY(Hand.kLeft);\n ZRotation = driveStick.getX(Hand.kRight);\n break;\n default:\n XSpeed = driveStick.getY(Hand.kLeft);\n ZRotation = -driveStick.getX(Hand.kRight);\n break;\n }\n\n //Switch statement to determine controls for the gunner\n switch (gunnerScheme) {\n case \"Fun Mode\":\n\n discoToggle = gunnerStick.getBackButtonReleased();\n break;\n\n default:\n\n // if ((gunnerStick.getTriggerAxis(Hand.kRight) >= 0.75) && (gunnerStick.getTriggerAxis(Hand.kLeft) >= 0.75) && !overriding) {\n // overrideSafeties = !overrideSafeties;\n // overriding = true;\n // } else if ((gunnerStick.getTriggerAxis(Hand.kRight) <= 0.75) && (gunnerStick.getTriggerAxis(Hand.kLeft) <= 0.75)) {\n // overriding = false;\n // }\n\n break;\n }\n }",
"@Test\n public void testTargetSquares_cannotEnterGate() {\n Board board = new Board(p1, p2);\n Token ant = p1.getFromSupply(BugType.SPIDER);\n board.addToken(ant, 0, 3);\n board.addToken(p2.getFromSupply(BugType.QUEEN_BEE), 1, 0);\n board.addToken(p2.getFromSupply(BugType.SPIDER), 2, 0);\n board.addToken(p2.getFromSupply(BugType.GRASSHOPPER), 2, 1);\n board.addToken(p2.getFromSupply(BugType.SOLDIER_ANT), 0, 1);\n board.addToken(p2.getFromSupply(BugType.BEETLE), 0, 2);\n\n List<Hex> targets = Rules.getInstance().getTargetHexes(ant, board);\n assertEquals(2, targets.size());\n assertTrue(targets.contains(board.getHex(-1, 1)));\n assertTrue(targets.contains(board.getHex(3, 1)));\n }",
"public interface ProfilePINEnable\n {\n /**\n * no need input pin\n */\n String NEEDLESS_INPUT = \"0\";\n\n /**\n * need input pin\n */\n String NEED_INPUT = \"1\";\n }",
"public void enterHatchingState() {\n\n\t}",
"public void SetOutputPins(int pins ) throws IOException {\n byte value = mDevice.readRegByte( IODIR );\n mDevice.writeRegByte( IODIR, (byte)(value & (~pins)));\n }",
"void toggleInAir() {\n inAir = !inAir;\n }",
"@Override\n public void writeOut(Circuit circuit, boolean state, int index) {\n outputPins[index].setState(state);\n for (ChipListener l : listeners) l.outputChanged(Chip.this, index, state);\n }",
"public void setCargoOuttakeState() {\n greenLED.set(true);\n redLED.set(false);\n blueLED.set(false);\n }",
"void toggleEntered() {\n entered = !entered;\n }",
"void enableDigital();",
"public int registerInput( Wire w, String pinName ) {\n\tErrors.warn( \"Illegal input pin: \" + name + \" \" + pinName );\n\treturn -1;\n }",
"public boolean hasInputs() {\n return fieldSetFlags()[4];\n }",
"private void updateInterestOps() {\n var interesOps = 0;\n if (state != State.CLOSED && bbin.hasRemaining()) {\n interesOps = interesOps | SelectionKey.OP_READ;\n }\n if (bbout.position() != 0) {\n interesOps |= SelectionKey.OP_WRITE;\n }\n if (interesOps == 0) {\n silentlyClose();\n return;\n }\n key.interestOps(interesOps);\n }",
"void nullInputSwitch(SNodeReference _switch) throws GenerationCanceledException, GenerationFailureException;",
"void suspendInput();",
"private void updateInterestOps() {\n var interesOps = 0;\n if (!closed && bbin.hasRemaining()) {\n interesOps = interesOps | SelectionKey.OP_READ;\n }\n if (bbout.position() != 0) {\n interesOps |= SelectionKey.OP_WRITE;\n }\n if (interesOps == 0) {\n silentlyClose();\n return;\n }\n key.interestOps(interesOps);\n }",
"InputPin getFirst();",
"@Test\n void checkINorOut() throws IOException {\n Receptionist res = new Receptionist();\n HotelOperation.scanner = new Scanner(\"y 1 101 -2 -1\");\n assertEquals(0,res.checkINorOut(\"CHECK IN\"));\n HotelOperation.scanner = new Scanner(\"y 1 101 -2 -1\");\n assertEquals(0,res.checkINorOut(\"CHECK OUT\"));\n\n }",
"public void indicateNot() {\r\n notIndicated = true;\r\n }",
"private void updateInterestOps() {\n\t\tvar interesOps = 0;\n\t\tif (!closed && bbin.hasRemaining()) {\n\t\t\tinteresOps = interesOps | SelectionKey.OP_READ;\n\t\t}\n\t\tif (!closed && bbout.position() != 0) {\n\t\t\tinteresOps |= SelectionKey.OP_WRITE;\n\t\t}\n\t\tif (interesOps == 0) {\n\t\t\tsilentlyClose();\n\t\t\treturn;\n\t\t}\n\t\tkey.interestOps(interesOps);\n\t}",
"private void OpenPinInput(int pin, int mode) { // = 0xE0.. // = 0x90..\r\n int whom = (((mode & 0x10) << 1) + 0x20) ^ mode; // -> ANALOG_/DIGITAL_MESSAGE\r\n Timer trix = EatOften;\r\n if (SpeakEasy){\r\n System.out.println(\"F%%F/OpPinInp #\" + pin + \" = \" + mode);\r\n }\r\n if(mode == Arduino.REPORT_VERSION){\r\n whom = mode; // = 0xF9\r\n } else if (mode == Arduino.PULSECOUNT){\r\n whom = mode; // = 7\r\n } else if (mode != Arduino.REPORT_DIGITAL){ // = 0xD0\r\n if (mode != Arduino.REPORT_ANALOG) {\r\n whom = 0; // = 0xC0\r\n }\r\n }\r\n if (whom > 0){\r\n ArduPiModes[pin & 15] = whom;\r\n } else {\r\n trix = null;\r\n }\r\n if (trix == null){ // log any failure..\r\n System.out.println(\" (F%%F/OpPinIn) failed: \" + whom + \"/\" + mode);\r\n return;\r\n } else if (trix.getDelay() == 0) { // start up input thread..\r\n trix.setDelay(1);\r\n trix.start();\r\n if (SpeakEasy){\r\n System.out.println(\" (F%%F/OpPinIn) Timer start OK\");\r\n }\r\n }\r\n Send3bytes(mode | pin & 15, 1, 0);\r\n }",
"public static void main(String[] args) {\n\n Scanner scanner = new Scanner(System.in);\n\n\n int correctPin = 3535;\n int userPin = 0;\n do {\n System.out.print(\"Please enter a pin:\"); // bu kesinlikle kontrol eder si o si...\n userPin = scanner.nextInt();\n }while (userPin != correctPin);\n System.out.println(\"You are logged in!\");\n\n\n\n\n }",
"public void setInput(boolean inputA, boolean inputB) {\n mAndGate.setInput(inputA, inputB);\n mXorGate.setInput(inputA, inputB);\n }",
"public void disableInputs();",
"public void setPIN (String PIN);",
"public boolean is_set_inputs() {\n return this.inputs != null;\n }",
"public void releasePingLock() {\r\n\t\tbeingPinged.set(false);\r\n\t}",
"public boolean lockOutput() {\n return output.setStation(this);\n }",
"public boolean isInactive() {\n return !nativeInput.get();\n }",
"private boolean isInputAllowed() {\n return entered && gameRenderer != null && gameRenderer.isDyingUnitAnimationCompleted() &&\n inGameContext != null && inGameContext.isActionCompleted() && inputAllowed && !blockAllInput;\n }",
"public void deselect() {\n\n // reset the pin value\n pin.reset();\n\n }",
"boolean isOutputNeuron();",
"public boolean isInputPortOpen(int portNumber) { throw new RuntimeException(\"Stub!\"); }",
"public void pressed() \r\n\t{\r\n\t\tparity = !parity;\r\n\t\t\r\n\t}",
"@Override\n\t\t\t public void handleGpioPinDigitalStateChangeEvent(GpioPinDigitalStateChangeEvent event) {\n\t\t\t System.out.println(\" --> GPIO PIN STATE CHANGE: \" + event.getPin() + \" = \" + event.getState());\n\t\t\t System.out.println(\" Testing anticuado detected !!! \");\n\t\t\t\t\t\t\tif(event.getPin().getPin() == RaspiPin.GPIO_07) {\n\t\t\t\t\t\t\t\tSystem.out.println(\"<-- GPIO07, High? \"+(event.getState()==PinState.HIGH) + \", val= \"+event.getState().toString());\n\t\t\t\t\t\t\t\tif(event.getState()==PinState.HIGH) {\n\t\t\t\t\t\t\t\t\tcerrando = true;\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"--- Estado HIGH\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(cerrando && event.getState()==PinState.LOW) {\n\t\t\t\t\t\t\t\t\tled1.low();\n\t\t\t\t\t\t\t\t\tcerrando = false;\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"--- Estado LOW. Simula flanco de bajada\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t }",
"public void landFromLatch() {\n }",
"public void registerOutput( String pinName ) {\n\t//Bug: we do nothing about this here, it'll get more fun later\n }",
"public boolean isHolding();",
"public boolean switchOut(Pokemon p) {\n return false;\n }",
"public void checkState() {\r\n\t\tout.println(state);\r\n\t\tif(getEnergy() < 80 && getOthers() > 5) {\r\n\t\t\tstate = 1;\r\n\t\t\tturnLeft(getHeading() % 90);\r\n\t\t\tahead(moveAmount);\r\n\t\t}\r\n\t\telse if(getEnergy() < 80 && getOthers() < 5) {\r\n\t\t\tstate = 0;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tstate = 0;\r\n\t\t}\r\n\t\t\r\n\t}",
"private void updateStateOnce() {\n for(int i = 0; i < maskArray.length; i++) {\n for (int j = 0; j < maskArray[i].length; j++) {\n\n if (maskArray[i][j] == 1){\n stateArray[i][j] = stateGenerator.generateElementState();\n }\n\n }\n }\n }",
"boolean isSignal();",
"public boolean checkIn(){\n return state.checkIn();\n }",
"public boolean hasOutputs() {\n return fieldSetFlags()[5];\n }",
"public ConvergenceInputModelState()\n {\n this.inputModelReady = false;\n this.systemUpdated = false;\n }",
"public void playerMissedBall(){ active = false;}",
"@Override\n public void onPinChange(int pinLength, String intermediatePin) {\n }",
"@FXML\n public void noiseEvent() {\n emulator.noiseEvent(noiseCheckbox.isSelected());\n }",
"public boolean isEntered();",
"void user_in(boolean e)\n\t\t{\n\t\t\tthis.init = true;\n\t\t\tthis.enable = e;\n\t\t}",
"public boolean lockForPing() {\r\n\t\treturn beingPinged.compareAndSet(false, true);\r\n\t}",
"synchronized void setInterrupted() {\n stopped = true;\n inputGiven = true;\n notifyAll();\n }",
"abstract public boolean isPickedBy(Point p);",
"public void interactWhenSteppingOn() {\r\n\t\t\r\n\t}",
"boolean hasUpdateMask();",
"boolean hasUpdateMask();"
] | [
"0.58509713",
"0.5733031",
"0.5730423",
"0.5722082",
"0.57107186",
"0.5660157",
"0.5638973",
"0.5621898",
"0.56146514",
"0.5609557",
"0.5609557",
"0.53898364",
"0.5341708",
"0.5304604",
"0.5301651",
"0.5268056",
"0.525991",
"0.5259747",
"0.52508324",
"0.52506506",
"0.52310634",
"0.5231056",
"0.52158475",
"0.51911914",
"0.5172141",
"0.5142968",
"0.51236755",
"0.50967884",
"0.50963223",
"0.50933886",
"0.5084887",
"0.5084887",
"0.5084818",
"0.5082928",
"0.5072844",
"0.5051577",
"0.5047585",
"0.50419384",
"0.5037031",
"0.50350124",
"0.5027655",
"0.5025586",
"0.5021609",
"0.50130844",
"0.5000467",
"0.49934617",
"0.4987269",
"0.4980487",
"0.4967569",
"0.49648196",
"0.49612653",
"0.49455142",
"0.49409795",
"0.49359787",
"0.49255678",
"0.49227276",
"0.49194312",
"0.4913623",
"0.49010777",
"0.49000046",
"0.48966447",
"0.48941943",
"0.4893442",
"0.48853037",
"0.48711792",
"0.48671523",
"0.48602098",
"0.48593602",
"0.48574933",
"0.48542622",
"0.4853197",
"0.4840109",
"0.48310673",
"0.48289737",
"0.482635",
"0.48253915",
"0.4825296",
"0.48245764",
"0.4821865",
"0.4820016",
"0.48153043",
"0.48092183",
"0.48045748",
"0.48038116",
"0.4803584",
"0.4799304",
"0.47950915",
"0.47914684",
"0.47906703",
"0.47898695",
"0.4787818",
"0.47877657",
"0.4787232",
"0.47860253",
"0.47830236",
"0.47821146",
"0.47805578",
"0.47790796",
"0.47788462",
"0.47788462"
] | 0.5268985 | 15 |
tell the gate that one of its output pins is in use | public void registerOutput( String pinName ) {
//Bug: we do nothing about this here, it'll get more fun later
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void writeOut(Circuit circuit, boolean state, int index) {\n outputPins[index].setState(state);\n for (ChipListener l : listeners) l.outputChanged(Chip.this, index, state);\n }",
"public boolean lockOutput() {\n return output.setStation(this);\n }",
"public void SetOutputPins(int pins ) throws IOException {\n byte value = mDevice.readRegByte( IODIR );\n mDevice.writeRegByte( IODIR, (byte)(value & (~pins)));\n }",
"boolean isOutputNeuron();",
"public boolean hasOutputs() {\n return fieldSetFlags()[5];\n }",
"private boolean poleSwitchEngaged(){\n return true; //poleSwitch.get();\n }",
"public void setCargoOuttakeState() {\n greenLED.set(true);\n redLED.set(false);\n blueLED.set(false);\n }",
"public void pin();",
"public void pin();",
"public void setOut(boolean out) {\n this.out = out;\n }",
"public abstract boolean sjekkPIN(int pin);",
"@Override\n public int getPinState(){\n return 0;\n }",
"interface GateInOut {\r\n\tpublic void enterGate();\r\n\tpublic void exitGate();\r\n}",
"public void Interrupt_on_Changes(int pins) throws IOException {\n int value = (int)mDevice.readRegByte( INTCON );\n value &= ~pins;\n mDevice.writeRegByte( INTCON, (byte)value );\n value = (int)mDevice.readRegByte( GPINTEN );\n value |= pins;\n mDevice.writeRegByte( GPINTEN, (byte)value );\n }",
"public void outputChangeEvent( float time ) {\n\tSystem.out.println(\n\t \"At \" + time + \" \" + toString() + \" true \" + \" changes to true\"\n\t);\n\tfor (Wire w: outgoingTrue) {\n\t w.inputChangeEvent( time, true );\n\t}\n }",
"public boolean canBeSwappedOut();",
"public boolean isOut() {\n return out;\n }",
"public abstract boolean supportsMultipleOutputs();",
"@Override\n public void actionPerformed(ActionEvent e) {\n int inPin = Integer.parseInt(txtPin.getText());\n\n //Compares the input value with the set pin\n if(inPin == 6942){\n txtPin.setText(\"Pin Accepted\");\n txtPin.enable(false);\n btnPrint.setVisible(true);\n } else {\n txtPin.setText(\"\");\n JOptionPane.showMessageDialog(JOptionPane.getRootFrame(),\n \"Wrong pin number\",\n \"Wrong pin\",\n JOptionPane.WARNING_MESSAGE);\n }\n }",
"public abstract void inputChangeEvent( float time, int dstPin, boolean v );",
"boolean motorsAreBusy();",
"OutputPin getResult();",
"OutputPin getResult();",
"boolean isPeripheralAccess();",
"private boolean hasOtherOutput(DeviceId inDeviceId, StaticPacketTrace trace, ConnectPoint cp) {\n return trace.getHitChains(inDeviceId).stream().filter(groupsInDevice ->\n !groupsInDevice.outputPort().equals(cp)).count() > 0;\n }",
"public void enableInputs();",
"public boolean switchOut(Pokemon p) {\n return false;\n }",
"private boolean needPIN() {\n return datafacade.getInt(\"pin\")!=-1;\n }",
"public boolean clockedOut() {\n return state instanceof ClockedOut;\n }",
"final void channelInterestChangedCallback() {\n Channel ch = getIOChannel();\n if (ch != null) {\n boolean writable = ch.isWritable();\n\n eventSerializeLock.lock();\n try {\n if (previousEvent == OUTPUT_DISABLED && writable) {\n fireOutputRecovered();\n } else if (previousEvent == OUTPUT_RECOVERED && !writable) {\n fireOutputDisabled();\n }\n } finally {\n eventSerializeLock.unlock();\n }\n }\n }",
"public void clockOut()\n {\n if(!(state instanceof ClockedOut))\n setState(\"Clock-Out\");\n }",
"public boolean sunIsOut(){\n \n if (sunOut == true) {\n return true;\n }else {\n return false;\n }\n }",
"public boolean isOn()\n {\n // Check the pin state\n return ledPin.isHigh();\n }",
"public native int cGPIOWrite(int pin, boolean value);",
"public void inputChangeEvent( float time, int dstPin, boolean v ) {\n\tErrors.fatal( \"Input should never change: \" + toString() );\n }",
"public void inputChangeEvent( float time, int dstPin, boolean v ) {\n\tvalue = !v;\n\t Simulator.schedule(\n\t new Simulator.Event( time\n\t\t + (delay * 0.95f)\n\t\t + PRNG.randomFloat( delay * 0.1f ) ) {\n\t\t void trigger() {\n\t\t\t outputChangeEvent( this.time );\n\t\t }\n\t\t}\n\t );\n }",
"public boolean pinUseCount(ImmutableNodeInst pin)\n {\n int numConnections = getNumConnections(pin);\n if (numConnections > 2) return false;\n if (hasExports(pin)) return true;\n if (numConnections == 0) return false;\n return true;\n }",
"public boolean lockInput() {\n return input.setStation(this);\n }",
"public void releaseInput() {\n input.releaseStation();\n }",
"@Override\r\n\tpublic void visit(SimplePin pin) {\n\t\tboolean pinMod;\r\n\t\tif (isForward()) {\r\n\t\t\tpinMod = pin.propagateValuesForward();\r\n\t\t} else {\r\n\t\t\tpinMod = pin.propagateValuesBackward();\r\n\t\t}\r\n\t\tmodified |= pinMod;\r\n\t}",
"private void switchOnFlag(int flag) {\r\n\t\tsim40.memory[Simulator.STATUS_ADDRESS]|= (1<<flag);\r\n\t}",
"public void setPin(int pin);",
"public void xboxIntakeOuttake()\n {\n //Whether or not we are intaking from the bottom or front. If from front, value is negative.\n double intakeDirection = 1.0;\n if (RobotMap.assistantDriverController.getBumper(Hand.kRight))\n intakeDirection = -1.0;\n\n //Spins the motors when the button is pressed. THIS IS ONLY RUN ONCE UNTIL THE BUTTON IS RELEASED AND PRESSED AGAIN\n if (RobotMap.assistantDriverController.getXButtonPressed())\n {\n spinIntake( RobotMap.manipulatorSpeedModifier * intakeDirection); //Spin the intake\n RobotMap.ballInIntake = !RobotMap.ballInIntake;\n }\n //Only stop the motors when the button is released\n else if (RobotMap.assistantDriverController.getXButtonReleased())\n {\n spinIntake(RobotMap.MOTOR_FULL_STOP); //Stop the intake from spinning\n RobotMap.manipulatorSpeedModifier = RobotMap.MANIPULATOR_SLOW_SPEED;\n }\n else if (!RobotMap.ballIntakeStopSwitch.get() && RobotMap.ballInIntake)\n {\n System.out.println(\"stop\");\n spinIntake(RobotMap.MOTOR_FULL_STOP); //Stop the intake from spinning when the ball is inside\n RobotMap.manipulatorSpeedModifier = RobotMap.MOTOR_FULL_SPEED;\n }\n }",
"private void fireOutputDisabled() {\n previousEvent = OUTPUT_DISABLED;\n ownerPool.getIPCEventProcessor().execute(new OrderedExecutorService.KeyRunnable<StreamOutputChannel<PAYLOAD>>() {\n\n @Override\n public void run() {\n for (IPCEventListener l : outputDisableListeners) {\n l.triggered(outputDisabledEvent);\n }\n }\n\n @Override\n public StreamOutputChannel<PAYLOAD> getKey() {\n return StreamOutputChannel.this;\n }\n });\n }",
"public void setCargoIntakeState() {\n blueLED.set(false);\n greenLED.set(false);\n if (!redLED.get() && timer.get() >= pulseTime) {\n redLED.startPulse();\n timer.stop();\n timer.reset();\n }\n else if (redLED.get() && timer.get() > pulseTime) {\n redLED.set(false);\n }\n else {\n timer.start();\n }\n }",
"void enableDigital();",
"public void landFromLatch() {\n }",
"protected void outputChange( int value ) {\n final int comp = 1 - value;\n System.out.println(\n \"time \" + Simulation.time + \" \" + comp + \"->\" + value + \" \" + this\n );\n for (Wire w: outgoing) w.inputChange( value );\n }",
"@Test\n void checkINorOut() throws IOException {\n Receptionist res = new Receptionist();\n HotelOperation.scanner = new Scanner(\"y 1 101 -2 -1\");\n assertEquals(0,res.checkINorOut(\"CHECK IN\"));\n HotelOperation.scanner = new Scanner(\"y 1 101 -2 -1\");\n assertEquals(0,res.checkINorOut(\"CHECK OUT\"));\n\n }",
"boolean hasSignal();",
"public void unpin();",
"public void unpin();",
"@Test\n public void testTargetSquares_cannotEnterGate() {\n Board board = new Board(p1, p2);\n Token ant = p1.getFromSupply(BugType.SPIDER);\n board.addToken(ant, 0, 3);\n board.addToken(p2.getFromSupply(BugType.QUEEN_BEE), 1, 0);\n board.addToken(p2.getFromSupply(BugType.SPIDER), 2, 0);\n board.addToken(p2.getFromSupply(BugType.GRASSHOPPER), 2, 1);\n board.addToken(p2.getFromSupply(BugType.SOLDIER_ANT), 0, 1);\n board.addToken(p2.getFromSupply(BugType.BEETLE), 0, 2);\n\n List<Hex> targets = Rules.getInstance().getTargetHexes(ant, board);\n assertEquals(2, targets.size());\n assertTrue(targets.contains(board.getHex(-1, 1)));\n assertTrue(targets.contains(board.getHex(3, 1)));\n }",
"public void setSensorOff() {\n\n }",
"public void switchOn();",
"public boolean getDefaultOutputsEnabled();",
"public void chipDestroyed(CommandSender destroyer) {\n shutdown();\n\n for (OutputPin o : outputPins) o.setState(false);\n\n try {\n circuit.destroyed();\n } catch (Exception e) {\n circuit.error(\"Error while calling destroyed(): \" + e.getMessage());\n e.printStackTrace();\n }\n notifyChipDestroyed(destroyer);\n }",
"public void setDefaultOutputsEnabled( boolean enabled );",
"public void run() {\n\t\tfinal GpioController gpio = GpioFactory.getInstance();\n\t\tfinal GpioPinDigitalOutput fOn = gpio.provisionDigitalOutputPin(\n\t\t\t\tRaspiPin.GPIO_01, \"FrontOn\", PinState.HIGH);\n\t\tfinal GpioPinDigitalOutput IOback = gpio.provisionDigitalOutputPin(\n\t\t\t\tRaspiPin.GPIO_15, \"Back\", PinState.LOW);\n\t\tfinal GpioPinDigitalOutput IOfront = gpio.provisionDigitalOutputPin(\n\t\t\t\tRaspiPin.GPIO_16, \"Front\", PinState.LOW);\n\n\t\t// pin 6 on. 10 left, 11 right.\n\t\tfinal GpioPinDigitalOutput tOn = gpio.provisionDigitalOutputPin(\n\t\t\t\tRaspiPin.GPIO_06, \"turnOn\", PinState.HIGH);\n\t\tfinal GpioPinDigitalOutput IOleft = gpio.provisionDigitalOutputPin(\n\t\t\t\tRaspiPin.GPIO_10, \"Left\", PinState.LOW);\n\t\tfinal GpioPinDigitalOutput IOright = gpio.provisionDigitalOutputPin(\n\t\t\t\tRaspiPin.GPIO_11, \"Right\", PinState.LOW);\n\t\tSystem.out.println(\"initilised GPIO pins\");\n\t\t\n\t\twhile (keepgoing) {\n\t\t\tswitch (front) {\n\t\t\tcase 0:\n\t\t\t\tIOfront.setState(PinState.HIGH);\n\t\t\t\tIOback.setState(PinState.LOW);\n\t\t\t\t//sets pins for not moving\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tIOfront.setState(PinState.LOW);\n\t\t\t\tIOback.setState(PinState.LOW);\n\t\t\t\t//sets pins for \n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tIOfront.setState(PinState.LOW);\n\t\t\t\tIOback.setState(PinState.HIGH);\n\t\t\t\t//sets pins for backwards\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tswitch (side) {\n\t\t\tcase 0:\n\t\t\t\tIOleft.setState(PinState.HIGH);\n\t\t\t\tIOright.setState(PinState.LOW);\n\t\t\t\t//sets pins for left\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tIOleft.setState(PinState.LOW);\n\t\t\t\tIOright.setState(PinState.LOW);\n\t\t\t\t//sets pins for not turning\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tIOleft.setState(PinState.LOW);\n\t\t\t\tIOright.setState(PinState.HIGH);\n\t\t\t\t//sets pins for right\n\t\t\t\tbreak;\n\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\tgpio.shutdown();\n\n\t}",
"public void toggleSignal() {\n if (green) {\n green = false;\n } else {\n green = true;\n }\n }",
"public void SetInputPins(int pins) throws IOException {\n byte value = mDevice.readRegByte( IODIR );\n mDevice.writeRegByte( IODIR, (byte)(value | pins));\n }",
"boolean hasOutput();",
"public void pin() {\n this.pin = new Vec(this.pos);\n }",
"public interface IPinListener\n{\n /**\n * Invoked by a Pin when its value changes. The argument \n * is the component to which the Pin belongs.\n * @param c\n * parent component for the Pin invoking this method\n */\n public void update(IComponent c);\n}",
"private void convert(int pinNum) {\n\t\tgpio = GpioFactory.getInstance();\n\t\tif (pins[pinNum] == null) {\n\t\t\tswitch (pinNum) {\n\t\t\t// Pins for pi1\n\t\t\tcase 0:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_00, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_01, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_02, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_03, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_04, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_05, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_06, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_07, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_08, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_09, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_10, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 11:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_11, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 12:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_12, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 13:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_13, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 14:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_14, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 15:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_15, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 16:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_16, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\n\t\t\t// Pins for pi2, will not through exeption for pi1\n\t\t\tcase 17:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_17, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 18:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_18, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 19:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_19, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 20:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_20, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 21:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_21, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 22:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_22, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 23:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_23, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 24:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_24, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 25:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_25, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 26:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_26, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 27:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_27, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 28:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_28, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 29:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_29, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\n\t\t\t// Null if pin dosent exist\n\t\t\tdefault:\n\t\t\t\tpins[pinNum] = null;\n\t\t\t}\n\t\t}\n\t}",
"public void releasePingLock() {\r\n\t\tbeingPinged.set(false);\r\n\t}",
"protected abstract void useOutput(float output, float setpoint);",
"@Override\n public void powerOn() {\n if(isOn)System.out.println(\"The Projector is already ON!\");\n else{\n System.out.println(\"The Projector is now ON!\");\n isOn = true;\n }\n }",
"@Override\r\n public void ProcessControlPIN(PinDataControl ControlData) {\n }",
"public void notifySwitchAway() { }",
"public void updateOn(boolean on) {\r\n\t\toutString = \"O\" + on + \"\\n\";\r\n\t\tmyPort.write(outString);\r\n\t\tSystem.out.println(outString);\r\n\t}",
"public int handler(int offset) {\n return (portA_out & ddrA) | (portA_in & ~ddrA);\n }",
"public void releaseOutput() {\n output.releaseStation();\n }",
"void actOut(PetriP[] pp) {\n if (buffer < 0) return;\n\n for (int j = 0; j < outP.size(); j++) {\n pp[outP.get(j)].increaseMark(quantOut.get(j));\n }\n if (num == 0 && (timeOut.size() == 1)) {\n timeOut.set(0, Double.MAX_VALUE);\n } else {\n timeOut.remove(num);\n }\n\n buffer--;\n if (observedMin > buffer) {\n observedMin = buffer;\n }\n }",
"public void on() {\n // Sets the LED pin state to 1 (high)\n ledPin.high();\n }",
"@Override\n\t\t\t public void handleGpioPinDigitalStateChangeEvent(GpioPinDigitalStateChangeEvent event) {\n\t\t\t System.out.println(\" --> GPIO PIN STATE CHANGE: \" + event.getPin() + \" = \" + event.getState());\n\t\t\t System.out.println(\" Testing anticuado detected !!! \");\n\t\t\t\t\t\t\tif(event.getPin().getPin() == RaspiPin.GPIO_07) {\n\t\t\t\t\t\t\t\tSystem.out.println(\"<-- GPIO07, High? \"+(event.getState()==PinState.HIGH) + \", val= \"+event.getState().toString());\n\t\t\t\t\t\t\t\tif(event.getState()==PinState.HIGH) {\n\t\t\t\t\t\t\t\t\tcerrando = true;\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"--- Estado HIGH\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(cerrando && event.getState()==PinState.LOW) {\n\t\t\t\t\t\t\t\t\tled1.low();\n\t\t\t\t\t\t\t\t\tcerrando = false;\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"--- Estado LOW. Simula flanco de bajada\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t }",
"public void onWrite(int value) {\n \t\t\tboolean newLatch = (value & 1) != 0;\n \t\t\tif (newLatch != joyLatch) {\n \t\t\t\tcurButton = 0;\n \t\t\t}\n \t\t\tjoyLatch = newLatch;\n \t\t}",
"public boolean canOutput(IBlockAccess world, int x, int y, int z, ForgeDirection dir)\r\n/* 19: */ {\r\n/* 20:18 */ return false;\r\n/* 21: */ }",
"public void setSensorOn() {\n\n }",
"public void connect_PEExit(BOOL newIV){\n PEExit = newIV;\n }",
"public void emit() {\n synchronized (this) {\n if (this.emitting) {\n this.missed = true;\n return;\n }\n this.emitting = true;\n emitLoop();\n }\n }",
"public void emit() {\n synchronized (this) {\n if (this.emitting) {\n this.missed = true;\n return;\n }\n this.emitting = true;\n emitLoop();\n }\n }",
"private void switchOffFlag(int flag) {\r\n\t\tsim40.memory[Simulator.STATUS_ADDRESS] = ~(~sim40.memory[Simulator.STATUS_ADDRESS] | (1<<flag));\r\n\t}",
"public void alg_HOLDTOKEN(){\nTokenOut.value=false;\nSystem.out.println(\"hold\");\n\n}",
"public void indicateNot() {\r\n notIndicated = true;\r\n }",
"@Override\n\tprotected boolean canImplicitlyHandleUnknownOutputs()\n\t{\n\t\treturn false;\n\t}",
"public void setRegisterWriteControl() {\r\n // registers.setRegWrite();\r\n //this.registerWrite.setData(1);\r\n //registers.setRegWriteControl(this.registerWrite);\r\n }",
"public void propagateSignal() {\r\n\t\tif (enabled) {\r\n\t\t\tdouble input = in.getOutput();\r\n\t\t\tdouble output = input * weight;\r\n\t\t\tout.addInput(output);\r\n\t\t\tactivated = true;\r\n\t\t}\r\n\t}",
"void toggleInAir() {\n inAir = !inAir;\n }",
"@FXML\n private void setOut(){\n\n updateGUI();\n drivingTransition.play();\n Main.gang.setMoving(true);\n\n HealthClass.checkGameOver();\n\n if (Runtime.getRuntime().availableProcessors() + Main.main.startingThreads > Thread.activeCount()) TravelTask();\n }",
"public void setCargoIntookState() {\n redLED.set(true);\n greenLED.set(false);\n blueLED.set(false);\n }",
"public void raise(){\r\n elevatorTalon1.set(basePWM);\r\n elevatorTalon2.set(basePWM * pwmModifier);\r\n }",
"@Override\n public void handleGpioPinDigitalStateChangeEvent(GpioPinDigitalStateChangeEvent event) {\n System.out.println(\" --> GPIO PIN STATE CHANGE: \" + event.getPin() + \" = \" + event.getState());\n }",
"@Input(\"onOn\")\n synchronized public void onOn() {\n try {\n _switchJMXSource.setValue(true);\n } catch (PropertyVetoException e) {}\n }",
"public void planted(){\r\n\t\tenable = false; \r\n\t\tcount = 0; \r\n\t}",
"public void reportSuccess() {\n Crashlytics.logBreadcrumb(\"MuunLockOverlay: reportSuccess\");\n\n pinInput.setSuccess();\n }",
"public void activate() {\n double dotProduct = 0;\n for (Synapse s : super.getSynapsesIn()) {\n dotProduct += s.getNeuronFrom().getOutput() * s.getWeight();\n }\n super.setOutput(sigmoidFunction(dotProduct));\n }",
"private void clearInPort() {\n \n inPort_ = 0;\n }",
"private void clearInPort() {\n \n inPort_ = 0;\n }",
"public boolean getPinValue() {\n boolean ret = false;\n for (Boolean val : sourceBlocks.values())\n ret = ret | val;\n \n return ret;\n }"
] | [
"0.58527476",
"0.5789524",
"0.5756229",
"0.56426364",
"0.563568",
"0.55401087",
"0.55119133",
"0.5463319",
"0.5463319",
"0.5441305",
"0.54215986",
"0.5418969",
"0.5343702",
"0.5342695",
"0.52915967",
"0.52675766",
"0.5249702",
"0.5242069",
"0.52322525",
"0.51881534",
"0.51780486",
"0.51734877",
"0.51734877",
"0.5165644",
"0.5157153",
"0.5152902",
"0.5150941",
"0.5148681",
"0.5126577",
"0.5082998",
"0.50828135",
"0.50746596",
"0.5074331",
"0.50672984",
"0.5064931",
"0.50634843",
"0.5034276",
"0.5032846",
"0.50267476",
"0.5026114",
"0.502472",
"0.49902484",
"0.49831766",
"0.49756366",
"0.49725387",
"0.49691698",
"0.49651483",
"0.4953205",
"0.49495396",
"0.49489892",
"0.49381387",
"0.49381387",
"0.49338248",
"0.49249232",
"0.49226427",
"0.49158862",
"0.49010313",
"0.48863825",
"0.48817626",
"0.48792595",
"0.48649827",
"0.4862269",
"0.48585272",
"0.48564404",
"0.48514295",
"0.4850667",
"0.48420218",
"0.48401952",
"0.483012",
"0.48290637",
"0.4828864",
"0.48288473",
"0.48270816",
"0.48260963",
"0.48220658",
"0.48088387",
"0.480853",
"0.4808435",
"0.48055843",
"0.48018664",
"0.47987765",
"0.47987765",
"0.4793252",
"0.47899616",
"0.47824538",
"0.47702867",
"0.47693568",
"0.47640777",
"0.4763887",
"0.47615305",
"0.4759682",
"0.4757599",
"0.47471485",
"0.4746708",
"0.47464842",
"0.47445512",
"0.4729209",
"0.47260326",
"0.47260326",
"0.47256985"
] | 0.5602949 | 5 |
output the gate in a form like that used for input | protected String myString(){
return( "gate " + name );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String toString() {\n return gate;\n }",
"public JPanel getPanel() { return gate; }",
"public String getName() { return \"Gate\"; }",
"public String toString() {\n\t\treturn \"gate output \" + name + ' ' + delay;\n\t}",
"@Override\n public String toString() {\n return gateAdr + \", \" + postNr + \" \" + postSted;\n }",
"private void outputMe() {\n\t\tif (changeCount > 2) changeCount = 4 - (changeCount & 1);\n\t\tif (outputValue) {\n\t\t\tSystem.out.append( trueArray[ changeCount ] );\n\t\t} else {\n\t\t\tSystem.out.append( falseArray[ changeCount ] );\n\t\t}\n\t\tchangeCount = 0;\n\t}",
"private static void printCircuit() {\n\tfor (Gate i: gates) {\n\t System.out.println( i.toString() );\n\t}\n\tfor (Wire r: wires) {\n\t System.out.println( r.toString() );\n\t}\n }",
"@Override\n public void render() {\n System.out.println(this.input);\n return;\n }",
"public String toString() {\n\treturn \"gate \" + name + \" or \" + delay;\n }",
"public String toString() {\n\treturn \"gate \" + name + \" and \" + delay;\n }",
"public String toString(){\n\t\tString out=\"\";\n\t\tif (type == \"op\"){\n\t\t\treturn out + operand;\n\t\t}\n\t\telse{\n\t\t\treturn out + value ;\n\t\t}\n\t}",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getInput() != null)\n sb.append(\"Input: \").append(getInput()).append(\",\");\n if (getOutput() != null)\n sb.append(\"Output: \").append(getOutput());\n sb.append(\"}\");\n return sb.toString();\n }",
"public static void make( Scanner sc ) {\n // First worry about the gate name\n final String name\n = ScanSupport.scanName( sc, () -> \"Gate has missing name\" );\n if (name == null) {\n ScanSupport.finishLine(\n sc, () -> \"Gate: followed by\"\n );\n return;\n }\n if (findGate( name ) != null) {\n Errors.warn( \"Gate \" + name + \": name reused\" );\n ScanSupport.finishLine(\n sc, () -> \"Gate \" + name + \": followed by\"\n );\n return;\n }\n\n // Second get the gate kind\n final String kind = ScanSupport.scanName(\n sc, () -> \"Gate \" + name + \": kind missing\"\n );\n if (kind == null) {\n ScanSupport.finishLine(\n sc, () -> \"Gate \" + name + \": followed by\"\n );\n return;\n }\n\n // Finally construct the right kind of gate\n if (\"xor\".equals( kind )) {\n allGates.add( new XorGate( sc, name ) );\n } else if (\"threshold\".equals( kind )) {\n allGates.add( new ThresholdGate( sc, name ) );\n } else if (\"input\".equals( kind )) {\n allGates.add( new InputGate( sc, name ) );\n } else if (\"output\".equals( kind )) {\n allGates.add( new OutputGate( sc, name ) );\n } else {\n Errors.warn( \"Gate \" + name + \" \" + kind + \": kind unknown\" );\n ScanSupport.finishLine(\n sc, () -> \"Gate \" + name + \" \" + kind + \": followed by\"\n );\n }\n }",
"public int getGateNumber() {\n return gateNumber;\n }",
"public String toString() {\n\treturn \"gate \" + name + \" not \" + delay;\n }",
"public static String compile(InputPin pin) {\n String index1String = \"\\t\\t\\t\\t\\tindex_1(\" + compileArray(pin.getParent().getIndex1()) + \");\\n\";\n String output = \"\\n\\t\\tpin(\" + pin.getName() + \") {\\n\" + \"\\t\\t\\tcapacitance : \"\n + Model.formatFloat(pin.getCapacitance()) + \" ;\\n\" + \"\\t\\t\\tdirection : input ;\\n\" + \"\\t\\t\\t\"\n + pin.getUnsupportedData().replaceAll(\"\\n\", \"\\n\\t\\t\\t\");\n if (!pin.getInputPowers().isEmpty()) {\n output += \"\\n\\t\\t\\tinternal_power() {\\n\";\n for (InputPower inputPower : pin.getInputPowers()) {\n String valuesString = \"\\t\\t\\t\\t\\tvalues(\" + compileArray(inputPower.getValues()) + \");\\n\";\n output += \"\\n\\t\\t\\t\\t\" + inputPower.getPowGroup().name().toLowerCase() + \"() {\\n\" + index1String\n + valuesString + \"\\t\\t\\t\\t}\\n\";\n }\n output += \"\\t\\t\\t}\\n\";\n }\n output += \"\\n\\t\\t}\";\n return output;\n }",
"java.lang.String getOutput();",
"public abstract Object getOutput ();",
"public void removeGate(){\n\t\t\n\t\t//remove the child gates and set them to null\n\t\twhile(this.child1!=null){\n\t\t\tthis.child1.removeGate();\n\t\t\t\n\t\t\tthis.child1 = null;\n\t\t}\n\n\t\twhile(this.child2!=null){\n\t\t\tthis.child2.removeGate();\n\t\t\tthis.child2 = null;\n\t\t}\n\t\t\n\t\tLineComponent.lines.remove(this.comp);\n\t\tthis.comp = null;\n\t\t\n\t\t//remove the gate from gateList and remove the JLabels\n\t\tDigitalCircuitUI.gateList.remove(this);\n\t\tDigitalCircuitUI.labels.remove(this);\n\t\t\n\t\t//if gate is an input, remove it from input list\n\t\tif(this.isInput()){\n\t\t\tDigitalCircuitUI.inputList.remove(this);\n\t\t}\n\t\t\n\t\t//remove the activeLabel for inputs\n\t\tContainer parent = this.getParent();\n\t\tif(parent != null){\n\t\t\tif(this.isInput()){\n\t\t\t\tparent.remove(((Input)this).activeLabel);\n\t\t\t\t//DigitalCircuitUI.inputTag--;\n\t\t\t}\n\t\t\tparent.remove(this);\n\t\t\tparent.revalidate();\n\t\t\tparent.repaint();\n\t\t}\n\t\t\n\t\t//set the parent gate's child/children to null\n\t\tif(this.pGate != null){\n\t\t\tif(this.pGate.child1 == this){\n\t\t\t\tthis.pGate.child1 = null;\n\t\t\t}\n\t\t\t\n\t\t\tif(this.pGate.child2 == this){\n\t\t\t\tthis.pGate.child2 = null;\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic String toString() {\n\t\tswitch(type) {\n\t\tcase CLOSURE : return \"*\";\n\t\tcase CONCATENATION : return \"\";\n\t\tcase LPAREN : return \"(\";\n\t\tcase RPAREN : return \")\";\n\t\tcase UNION : return \"|\";\n\t\tdefault: return value;\n\t\t}\n\t}",
"public String getOutput() {\n TopologicalOrderIterator<String, DefaultEdge> iterator =\n new TopologicalOrderIterator<>(steps, Comparator.comparing((String x) -> x));\n\n // Traverse the DAG and store each vertex to a StringBuilder\n // to output once traversal is completed\n StringBuilder sb = new StringBuilder();\n while (iterator.hasNext()) {\n sb.append(iterator.next());\n }\n\n return sb.toString();\n }",
"@Test\n public void helloGraph() {\n skynetMedium.SkyNet.Input.GameInput in=new skynetMedium.SkyNet.Input.GameInput(4,4,1);\n in.addLinkDescr(1,2);\n //in.addLinkDescr(0, 2);\n in.addLinkDescr(1, 0);\n //in.addLinkDescr(2, 3);\n in.addGateWay(2);\n in.setAgent(1);\n \n List<SkyNet.Input.PathToGate> path=in.pathToGates();\n for(SkyNet.Input.PathToGate ptg : path){\n System.err.println(\"= \"+ptg);\n }\n }",
"public static String compile(OutputPin pin) {\n String index1String = \"\\t\\t\\t\\t\\tindex_1(\" + compileArray(pin.getParent().getIndex1()) + \");\\n\";\n String index2String = \"\\t\\t\\t\\t\\tindex_2(\" + compileArray(pin.getParent().getIndex2()) + \");\\n\";\n String output = \"\\n\\t\\tpin(\" + pin.getName() + \") {\\n\" + \"\\t\\t\\tdirection : output ;\\n\" + \"\\t\\t\\tfunction : \\\"(\"\n + pin.getOutputFunction() + \")\\\" ;\\n\" + \"\\t\\t\\tmax_capacitance : \"\n + Model.formatFloat(pin.getMaxCapacitance()) + \" ;\\n\" + \"\\t\\t\\tmin_capacitance : \"\n + Model.formatFloat(pin.getMinCapacitance()) + \" ;\\n\";\n for (InputPin relatedPin : pin.getParent().getInPins()) {\n boolean usedPin = false;\n for (OutputPower outputPower : pin.getOutputPowers()) {\n if (outputPower.getRelatedPin().getName().equals(relatedPin.getName())) {\n if (!usedPin) {\n output += \"\\n\\t\\t\\tinternal_power() {\\n\" + \"\\t\\t\\t\\trelated_pin : \\\"\" + relatedPin.getName()\n + \"\\\" ;\\n\";\n usedPin = true;\n }\n String valuesString = \"\\t\\t\\t\\t\\tvalues(\";\n for (float[] valuesArray : outputPower.getValues()) {\n valuesString += compileArray(valuesArray) + \",\\\\\\n\\t\\t\\t\\t\\t \";\n }\n valuesString = valuesString.substring(0, valuesString.length() - 15);\n output += \"\\n\\t\\t\\t\\t\" + outputPower.getPowGroup().name().toLowerCase() + \"() {\\n\" + index1String\n + index2String + valuesString + \");\\n\\t\\t\\t\\t}\\n\";\n }\n }\n if (usedPin) {\n output += \"\\t\\t\\t}\\n\";\n }\n }\n for (InputPin relatedPin : pin.getParent().getInPins()) {\n for (TimingSense timingSense : pin.getAvailableTimSen()) {\n for (TimingType timingType : pin.getAvailableTimType()) {\n boolean usedCombination = false;\n for (Timing timing : pin.getTimings()) {\n if (timing.getRelatedPin().getName().equals(relatedPin.getName())\n && timing.getTimSense().equals(timingSense) && timing.getTimType().equals(timingType)) {\n if (!usedCombination) {\n output += \"\\n\\t\\t\\ttiming() {\\n\" + \"\\t\\t\\t\\trelated_pin : \\\"\" + relatedPin.getName()\n + \"\\\" ;\\n\" + \"\\t\\t\\t\\ttiming_sense : \" + timingSense.name().toLowerCase()\n + \" ;\\n\" + \"\\t\\t\\t\\ttiming_type : \" + timingType.name().toLowerCase() + \" ;\\n\";\n usedCombination = true;\n }\n String valuesString = \"\\t\\t\\t\\t\\tvalues(\";\n for (float[] valuesArray : timing.getValues()) {\n valuesString += compileArray(valuesArray) + \",\\\\\\n\\t\\t\\t\\t\\t \";\n }\n valuesString = valuesString.substring(0, valuesString.length() - 15);\n valuesString += \"); \\n\";\n output += \"\\n\\t\\t\\t\\t\" + timing.getTimGroup().name().toLowerCase() + \"() {\\n\" + index1String\n + index2String + valuesString + \"\\t\\t\\t\\t}\\n\";\n }\n }\n if (usedCombination) {\n output += \"\\t\\t\\t}\\n\";\n }\n }\n }\n }\n output += \"\\n\\t\\t}\";\n return output;\n }",
"interface GateInOut {\r\n\tpublic void enterGate();\r\n\tpublic void exitGate();\r\n}",
"public void draw() {\n if (numSides <= 6) {\n System.out.println(\"- - - - - -\");\n \n for (int i = numSides - 2; i < numSides; i++) {\n System.out.print(\" | \");\n for (int j = 0; j < this.value ; j++) {\n if (value == 1) {\n System.out.print(\" \");\n }\n if (i % 2 == 0) {\n System.out.print(\"*\");\n } else {\n System.out.print(\" \");\n }\n if (value == 1) {\n System.out.print(\" \");\n }\n }\n }\n System.out.println(\"\");\n System.out.println(\"- - - - - -\");\n } else {\n print();\n }\n }",
"String getOutput();",
"public String toString() {\n\t\tString circuit = \"(\" + left + \"/\\\\\" + right + \")\";\n\t\treturn circuit;\n\t}",
"@Override\n public String toString() {\n Helpers f = new Helpers();\n Expression left = super.getLeft();\n Expression right = super.getRight();\n\n if (super.isBonus()) {\n // x * y -> xy\n if (left instanceof Var && right instanceof Var) {\n return \"(\" + left.toString() + \"\" + right.toString() + \")\";\n }\n // 4 * x -> 4x\n if (right instanceof Var) {\n return \"(\" + left.toString() + \"\" + right.toString() + \")\";\n }\n // x * 4 -> 4x\n if (left instanceof Var) {\n return \"(\" + right.toString() + \"\" + left.toString() + \")\";\n }\n // 4 * (x^2) -> 4(x^2)\n if (right instanceof Pow) {\n return \"(\" + left.toString() + \"\" + right.toString() + \")\";\n }\n // 4 * (xy) -> 4xy\n if (right instanceof Mult) {\n if (((Mult) right).getLeft() instanceof Var && ((Mult) right).getRight() instanceof Var) {\n return \"(\" + left.toString() + \"\" + f.removeOuterParentheses(right.toString()) + \")\";\n }\n }\n }\n return \"(\" + left.toString() + \" * \" + right.toString() + \")\";\n }",
"default void print() {\r\n\t\tGenerator.getInstance().getLogger().debug(\"Operation matrix:\\r\");\r\n\t\tString ans = \" operation \";\r\n\t\tfor (double i = 0; i < this.getOperationMap().keySet().size(); i++) {\r\n\t\t\tfinal Element element1 = this.get(i);\r\n\t\t\tans += element1 + \" \";\r\n\t\t}\r\n\t\tLogManager.getLogger(FiniteSemiGroup.class).debug(ans);\r\n\t\tfor (double i = 0; i < this.getOperationMap().keySet().size(); i++) {\r\n\t\t\tfinal Element element1 = this.get(i);\r\n\t\t\tans = element1 + \" \";\r\n\t\t\tfor (double j = 0; j < this.getOperationMap().keySet().size(); j++) {\r\n\t\t\t\tfinal Element element2 = this.get(j);\r\n\t\t\t\tans += \" \" + this.getOperationMap().get(element1).get(element2) + \" \";\r\n\t\t\t}\r\n\t\t\tLogManager.getLogger(FiniteSemiGroup.class).debug(ans);\r\n\t\t}\r\n\t}",
"public OrGate() {\n\t\tsuper(2, 1);\n\t}",
"public String getOutput() {\n return String.format(\"DCode: %-7.0f \\\"%-9s\\\" \\t - %5.3fmm x %5.3fmm - \\t Area: %6.3fmm² \\t Area Ratio: %5.2f \\t Transfer Effeciency: %2.1f \\t Number of apertures: %-5.0f\"\n , (double) dCode\n , shape\n , x\n , y\n , getArea()\n , getAreaRatio()\n , getTransferEffeciency()\n , (double) numbOfApertures);\n }",
"public void output() {\n System.out.printf(\"Dien tich: %.2f \\n\", getArea());\n System.out.printf(\"Chu vi: %.2f \\n\", getPeripheral());\n }",
"@Override\n\tvoid output() {\n\t\t\n\t}",
"public ReactiveValue<T> output() {\n\t\t/*\n\t\t * This records dependency on the state machine. No dependency is recorded on the controlled computation itself.\n\t\t */\n\t\treturn output.value();\n\t}",
"public String toString(){\n\t\tStringBuilder sb = new StringBuilder();\n\t\tif(isFlag()==true){\n\t\t\t\tif(isDownBlock()==true){\n\t\t\t\t\tsb.append(\"g\"); //use G represent the goal\n\t\t\t\t\t\t\t\t\t\t// if down block is a block use small letter\n\t\t\t\t}\n\t\t\t\telse if(isRobot()==true){\n\t\t\t\t\tsb.append(\"V\"); //flag and robot on same position VICTORY!\n\t\t\t\t}\n\t\t\t\telse sb.append(\"G\"); \t\t\n\t\t\t}\n\t\telse if(isRobot()==true){\n\t\t\tif(isDownBlock()==true){\n\t\t\t\tsb.append(\"r\");//use R represent the Robot\n\t\t\t\t\t// if down move is a block use small letter\n\t\t\t}\n\t\t\telse sb.append(\"R\");\n\t\t}\n\t\telse{\n\t\t\tif(isDownBlock()==true){\n\t\t\t\tsb.append(\"_\"); \n\t\t\t\t//if down move is blocked then use underline\n\t\t\t}\n\t\t\telse sb.append(\"O\"); // use o represent the grid\n\t\t}\n\t\t\t\n\t\tif(isRightBlock()==true){\n\t\t\tsb.append(\"|\"); //best way to represent right block\n\t\t}\n\t\telse{\n\t\t\tsb.append(\" \"); // if no block just a space\n\t\t}\n\t\treturn sb.toString();\n\t}",
"public String toString() {\n\treturn \"gate \" + name + \" const \" + delay;\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 jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n path1 = new javax.swing.JLabel();\n dis1 = new javax.swing.JTextField();\n gen1 = new javax.swing.JTextField();\n gen2 = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n path2 = new javax.swing.JLabel();\n dis2 = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n\n jLabel1.setText(\"The result will be \");\n\n jLabel2.setText(\"Method1:\");\n\n jLabel3.setText(\"Genearation:\");\n\n jLabel4.setText(\"Distance:\");\n\n jLabel5.setText(\"Path:\");\n\n path1.setText(\"jLabel6\");\n\n dis1.setEnabled(false);\n\n gen1.setEnabled(false);\n\n gen2.setEnabled(false);\n\n jLabel6.setText(\"Method2:\");\n\n jLabel7.setText(\"Genearation:\");\n\n jLabel8.setText(\"Distance:\");\n\n jLabel9.setText(\"Path:\");\n\n path2.setText(\"jLabel6\");\n\n dis2.setEnabled(false);\n\n jButton1.setText(\"Display\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(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(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(path2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(dis2, javax.swing.GroupLayout.DEFAULT_SIZE, 144, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jLabel7, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel6, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(gen2)))\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 157, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(gen1))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(dis1, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addComponent(jButton1))\n .addGap(0, 168, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(path1, 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 .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(gen1, 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(jLabel4)\n .addComponent(dis1, 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(jLabel5)\n .addComponent(path1))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel6)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7)\n .addComponent(gen2, 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(jLabel8)\n .addComponent(dis2, 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(jLabel9)\n .addComponent(path2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton1)\n .addContainerGap(43, Short.MAX_VALUE))\n );\n }",
"@Override\n public String toString() {\n return String.format(\"Estadio\\n Nombre: %s \\t Tipo: %s \\t Capacidad: %d\",getNombre(),getTipo(), getCapacidad());\n \n }",
"public void outputForGraphviz() {\n\t\tString label = \"\";\n\t\tfor (int j = 0; j <= lastindex; j++) {\n\t\t\tif (j > 0) label += \"|\";\n\t\t\tlabel += \"<p\" + ptrs[j].myname + \">\";\n\t\t\tif (j != lastindex) label += \"|\" + String.valueOf(keys[j+1]);\n\t\t\t// Write out any link now\n\t\t\tBTree.writeOut(myname + \":p\" + ptrs[j].myname + \" -> \" + ptrs[j].myname + \"\\n\");\n\t\t\t// Tell your child to output itself\n\t\t\tptrs[j].outputForGraphviz();\n\t\t}\n\t\t// Write out this node\n\t\tBTree.writeOut(myname + \" [shape=record, label=\\\"\" + label + \"\\\"];\\n\");\n\t}",
"public void calcOutput()\n\t{\n\t}",
"@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 input = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n output = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n \n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n \n jLabel1.setText(\"Input\");\n \n jLabel2.setText(\"Output\");\n \n output.setEnabled(false);\n \n jButton1.setText(\"Pig Latin\");\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.setText(\"Flame\");\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 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 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jLabel2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(output)\n .addComponent(input, javax.swing.GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE)))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jButton1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 89, Short.MAX_VALUE)\n .addComponent(jButton2)))\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 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(input, 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(output, 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(jButton1)\n .addComponent(jButton2))\n .addContainerGap(27, Short.MAX_VALUE))\n );\n \n pack();\n }",
"@Override\n\tpublic String toString() {\n\t\treturn String.format(\" %s %s\", operador, exp);\n\t}",
"public double calculateOutputForInstance(Instance inst)\r\n\t{\r\n\t\tint k =0;\r\n\t\tfor(Node input_temp: inputNodes)\r\n\t\t{\r\n\t\t\tif(input_temp.getType()==0)\r\n\t\t\t{\r\n\t\t\t\tinput_temp.setInput(inst.attributes.get(k));\r\n\t\t\t}\r\n\t\t\tk++;\r\n\t\t}\r\n\r\n\t\t// set output\r\n\t\tfor(Node hidden_temp: hiddenNodes)\r\n\t\t{\r\n\t\t\thidden_temp.calculateOutput();\r\n\t\t}\r\n\r\n\t\toutputNode.calculateOutput();\r\n\t\t\r\n\t\treturn outputNode.getOutput();\r\n\r\n\t}",
"public void toGrammar() {\n System.out.println(\"<binary_expression> -> <arithmeitc_expression> <arithmetic_op> <arithmetic_expression>\");\n left.toGrammar();\n operator.toGrammar();\n right.toGrammar();\n prefix();\n }",
"public static Gate scan( Scanner sc ) {\n\t\tif (outputList.isEmpty()) {\n\t\t\tSimulator.schedule(\n\t\t\t\t1,\n\t\t\t\t(float time) -> displayHeaders( time )\n\t\t\t);\n\t\t}\n\n\t\t// now do the scan as for any other gate\n\t\tOutput g = new Output();\n\t\tg.scan( sc, inputs );\n\t\tif (g.name == null) g = null;\n\n\t\t// and finally, remember this in the output list\n\t\tif (g != null) outputList.add( g );\n\t\treturn g;\n\t}",
"public String toString()\r\n\t{\r\n\t\tcheckInitialization();\r\n\t\treturn equationString + \" = \" + getResult();\r\n\t}",
"public void print() {\n print$$dsl$guidsl$guigs();\n System.out.print( \" eqn =\" + eqn );\n }",
"public String getSolutionDotFormat() {\n StringBuilder solution = new StringBuilder();\n\n String input = \"\\\"Workflow INPUT\\\"\";\n String output = \"\\\"Workflow OUTPUT\\\"\";\n boolean inputDefined = false;\n boolean outputDefined = false;\n\n for (TypeNode workflowInput : this.workflowInputTypeStates) {\n if (!inputDefined) {\n solution.append(input + \" [shape=box, color = red];\\n\");\n inputDefined = true;\n }\n solution.append(input + \"->\" + workflowInput.getNodeID() + \";\\n\");\n solution.append(workflowInput.getDotDefinition());\n }\n\n for (ModuleNode currTool : this.moduleNodes) {\n solution.append(currTool.getDotDefinition());\n for (TypeNode toolInput : currTool.getInputTypes()) {\n if (!toolInput.isEmpty()) {\n solution.append(\n toolInput.getNodeID() + \"->\" + currTool.getNodeID() + \"[label = in, fontsize = 10];\\n\");\n }\n }\n for (TypeNode toolOutput : currTool.getOutputTypes()) {\n if (!toolOutput.isEmpty()) {\n solution.append(toolOutput.getDotDefinition());\n solution.append(\n currTool.getNodeID() + \"->\" + toolOutput.getNodeID() + \" [label = out, fontsize = 10];\\n\");\n }\n }\n }\n for (TypeNode workflowOutput : this.workflowOutputTypeStates) {\n if (!outputDefined) {\n solution.append(output + \" [shape=box, color = red];\\n\");\n outputDefined = true;\n }\n solution.append(workflowOutput.getDotDefinition());\n solution.append(workflowOutput.getNodeID() + \"->\" + output + \";\\n\");\n }\n\n return solution.toString();\n }",
"@Override\n public String toString() {\n return op.toString();\n }",
"private void actionGeneratePattern() {\n GPatternPanel gpatPanel = new GPatternPanel();\n int result = JOptionPane.showConfirmDialog(this, gpatPanel,\n \"Generate pattern\", JOptionPane.OK_CANCEL_OPTION);\n if (result == JOptionPane.OK_OPTION) { // Afirmative\n try {\n float ratioInh = Float\n .parseFloat(gpatPanel.tfields[GPatternPanel.idxINH]\n .getText());\n float ratioAct = Float\n .parseFloat(gpatPanel.tfields[GPatternPanel.idxACT]\n .getText());\n\n // validate ratios\n if ((ratioInh < 0 || ratioInh > 1.0)\n || (ratioAct < 0 || ratioAct > 1.0)\n || (ratioInh + ratioAct > 1.0)) {\n throw new NumberFormatException();\n }\n\n if (gpatPanel.btns[GPatternPanel.idxREG].isSelected()) {\n genRegularPattern(ratioInh, ratioAct);\n } else if (gpatPanel.btns[GPatternPanel.idxRND].isSelected()) {\n genRandomPattern(ratioInh, ratioAct);\n }\n\n Graphics g = layoutPanel.getGraphics();\n layoutPanel.writeToGraphics(g);\n } catch (NumberFormatException ne) {\n JOptionPane.showMessageDialog(null, \"Invalid ratio.\");\n }\n }\n }",
"public String operate() {\r\n\r\n\t\t// Logger log = Logger.getLogger(IterationFactory.class);\r\n\t\tDecimalFormat form = new DecimalFormat(\"0.0000\");\r\n\t\tStringBuffer sb = new StringBuffer();\r\n\t\tOperationFactory operateF;\r\n\t\tList<Integer> valueList;\r\n\r\n\t\tIterator<String> inputItr = this.getInputList().iterator();\r\n\r\n\t\tIterator<Character> opItr = this.getOperator().iterator();\r\n\r\n\t\ttry {\r\n\t\t\t/* Domain check */\r\n\t\t\tif (this.getInputList().size() <= 1 && this.getInputList().size() >= 10) {\r\n\t\t\t\tthrow new ValuePairOutOfLimit(this.getInputList().size());\r\n\t\t\t}\r\n\r\n\t\t\twhile (inputItr.hasNext()) {\r\n\r\n\t\t\t\t/* To get individual operands from operand sets */\r\n\t\t\t\tvalueList = u.toValueList(inputItr.next());\r\n\t\t\t\tIterator<Integer> valItr = valueList.iterator();\r\n\r\n\t\t\t\t/* Check for validity of operands and string format */\r\n\t\t\t\tif (valueList.size() < Constant.TWO)\r\n\t\t\t\t\tthrow new OperandException();\r\n\t\t\t\tif (valueList.size() > Constant.TWO)\r\n\t\t\t\t\tthrow new StringFormatException();\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t * If there is empty operator string default operator sets to\r\n\t\t\t\t * plus\r\n\t\t\t\t */\r\n\t\t\t\tif (operator.size() == 0)\r\n\t\t\t\t\toperateF = new OperationFactory(valItr.next(), valItr.next(), Constant.PLUS);\r\n\t\t\t\telse\r\n\t\t\t\t\toperateF = new OperationFactory(valItr.next(), valItr.next(), opItr.next());\r\n\r\n\t\t\t\t/* Output */\r\n\t\t\t\tsb.append(operateF.getmOp().getmOperand1() + operateF.getmOp().getmWord()\r\n\t\t\t\t\t\t+ operateF.getmOp().getmOperand2() + \" = \" + form.format(operateF.operate()) + \"\\n\");\r\n\r\n\t\t\t\t/*To reset operator iterator.*/\r\n\t\t\t\tif (!opItr.hasNext())\r\n\t\t\t\t\topItr = this.getOperator().iterator();\r\n\t\t\t}\r\n\t\t} catch (IntegerOutOfLimit e) {\r\n\t\t\tsb.append(e);\r\n\t\t} catch (InvalidOperator e) {\r\n\t\t\tsb.append(e);\r\n\t\t} catch (OperandException e) {\r\n\t\t\tsb.append(e);\r\n\t\t} catch (StringFormatException e) {\r\n\t\t\tsb.append(e);\r\n\t\t} catch (ValuePairOutOfLimit e) {\r\n\t\t\tsb.append(e);\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}",
"private void buildOutput() {\n\t\tsalesSlip.addName(itemField.getText());\n\t\tsalesSlip.addPrice(Double.parseDouble(costField.getText()), Integer.parseInt(quantityField.getText()));\n\t\tsalesSlip.addQuantity(Integer.parseInt(quantityField.getText()));\n\t\tsalesSlip.updatePrice();\n\t\t\n\t\ttextArea.append(salesSlip.generateOutput(salesSlip.numItems-1));\n\t\ttextArea.append(\"\\n\");\n\t\t\n\t\ttotalArea.setText(\"$\" + salesSlip.totalPrice);\n\t}",
"private String generateInput() {\n Random rdm = new Random();\n int r, r_m, r_M, c = 0, c_max;\n String input = \"\";\n char ops[] = {'+', '-', '*', '/'};\n\n //r_m = 1;\n //r_M = 100;\n //c_max = rdm.nextInt(r_M - r_m + 1) + r_m;\n c_max = 4;\n\n if(c_max%2 == 0)\n c_max += 1;\n\n while(c < c_max){\n if(c%2 == 0){\n r_m = 0;\n //r_M = 1000;\n r_M = 9;\n r = rdm.nextInt(r_M - r_m + 1) + r_m;\n input += Integer.toString(r);\n } else {\n /* 4 operators [0-3] */\n r_m = 0;\n r_M = 3;\n /* get a random operation */\n r = rdm.nextInt(r_M - r_m + 1) + r_m;\n input += ops[r];\n }\n c++;\n }\n return input;\n }",
"@Override\n\tpublic String toString()\n\t{\n\t\tStringBuilder stringBuilder = new StringBuilder();\n\t\tfor (int i = 0; i < 2 * size + 1; i++)\n\t\t{\n\t\t\tstringBuilder.append(\"-\");\n\t\t}\n\t\tstringBuilder.append(\"\\n|\");\n\t\tfor (int i = 0; i < state.size(); i++)\n\t\t{\n\t\t\tstringBuilder.append(state.get(i)).append(\"|\");\n\t\t\tif (i % size == size - 1 && i < state.size() - 1)\n\t\t\t{\n\t\t\t\tstringBuilder.append(\"\\n|\");\n\t\t\t}\n\t\t}\n\t\tstringBuilder.append(\"\\n\");\n\t\tfor (int i = 0; i < 2 * size + 1; i++)\n\t\t{\n\t\t\tstringBuilder.append(\"-\");\n\t\t}\n\t\treturn stringBuilder.toString();\n\t}",
"public String toString() {\n\t\tif (justnow.equals(\"east\")){\n\t\t\treturn \">\";\n\t\t}\n\t\tif (justnow.equals(\"south\")){\n\t\t\treturn \"v\";\n\t\t}\n\t\tif (justnow.equals(\"west\")){\n\t\t\treturn \"<\";\n\t\t}\n\t\tif (justnow.equals(\"north\")){\n\t\t\treturn \"^\";\n\t\t}\n\t\telse{\n\t\t\treturn \">\";\n\t\t}\n\t}",
"public void readSign()\n\t{\n\t\tboolean[][] boolTable = getTable();\n\t\tSwingUtilities.invokeLater(new Runnable()\n\t\t{\n\t\t public void run()\n\t\t {\n\t\t \tview.sPanel.updateTable(boolTable); // aktualizacja tablicy wypełenień w panelu do wyświetlania interpretacji znaku\n\t\t }\n\t\t});\n\t\t\n\t\tArrayList<Double> table = new ArrayList<Double>();\n\t\t\n\t\tfor(int i=0; i<10; ++i) // przygotowanie tablicy wejść dla sieci neuronowej\n\t\t\tfor(int j=0; j<7; ++j)\n\t\t\t\tif(boolTable[i][j])\n\t\t\t\t\ttable.add(1.0d);\n\t\t\t\telse\n\t\t\t\t\ttable.add(0.0d);\n\t\t\n\t\tSwingUtilities.invokeLater(new Runnable()\n\t\t{\n\t\t public void run()\n\t\t {\n\t\t \tview.label.setLabelText(model.getOutput(table)); // ustawienie zawartości pola tekstowego\n\t\t }\n\t\t});\n\t\t\n\t}",
"public abstract boolean getOutput();",
"private void ShowRep(Integer[] op) {\n System.out.print(\" \" + this.opCodeStrings[op[0]]);\n for (int i = 1; i < 13; i++) {\n if ((i - 1) % 4 == 0)\n System.out.print(\" | \");\n if (op[i] != null)\n System.out.print(\" \" + op[i]);\n else\n System.out.print(\" - \");\n }\n System.out.println();\n }",
"public String getOperator()\r\n\t{\r\n\t\tSystem.out.println(\"Choose the any operation from the following operations:\");\r\n System.out.println(\"1.+\");\r\n System.out.println(\"2.-\");\r\n System.out.println(\"3.*\");\r\n System.out.println(\"4./\");\r\n \r\n\t\tString op=sc.next();\r\n\t\treturn op;\r\n\t}",
"public String display(){\r\n\t\tif(this.AWD==true){\r\n\t\t\treturn super.display()+\" \"+model+\" \"+this.price+\"$ SF: \"+this.safetyRating+\" RNG: \" +this.maxRange+\" AWD\";\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn super.display()+\" \"+model+\" \"+this.price+\"$ SF: \"+this.safetyRating+\" RNG: \" +this.maxRange+\" 2WD\";\r\n\t\t}\r\n \r\n\t}",
"SModel getOutputModel();",
"public static void printField(){\n System.out.println(\"---------\");\r\n for (char[] cell : output) {\r\n System.out.print(\"| \");\r\n for (char value : cell) {\r\n System.out.print(value + \" \");\r\n }\r\n System.out.print(\"|\\n\");\r\n }\r\n System.out.println(\"---------\");\r\n }",
"@Override \n\tpublic String toString() {\n\t\treturn stringForm;\n\t}",
"@Override\n public String toString() { return '(' + left.toString() + ' ' + operation.toString() + ' ' + right.toString() + ')'; }",
"@Override\n public String toString() { return '(' + left.toString() + ' ' + operation.toString() + ' ' + right.toString() + ')'; }",
"private void displayOutput() {\n\t\tlevel = 2;\n\t\t// Level 1 by default\n\t\ttreeBWLevel1.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\tJLabel text = new JLabel(firstState.getName());\n\t\ttext.setFont(new Font(\"Serif\", Font.BOLD, 16));\n\t\ttext.setForeground(Color.white);\n\t\ttreeBWLevel1.add(text);\n\n\t\tfirstBlock.setTreeLabel(treeBWLevel1);\n\n\t\tline = new Line2D.Double(550, 975, 100, 200);\n\n\t\t// Since , NFA's are practically never ending, we have kept our\n\t\t// implementation upto 4 levels.\n\t\twhile (level != 5) {\n\t\t\tint parentTreeNo = 0;\n\t\t\tfor (StateBlockTreeNo block : previousBlock) {\n\t\t\t\tint currentLevelCounter = 0;\n\t\t\t\tint temp;\n\t\t\t\tHashMap<StateBlock, ArrayList<TransitionBlock>> list = block.getStateBlock().getStateTransitionList();\n\t\t\t\tfor (Map.Entry<StateBlock, ArrayList<TransitionBlock>> entry : list.entrySet()) {\n\t\t\t\t\tStateBlock key = entry.getKey();\n\t\t\t\t\tArrayList<TransitionBlock> value = entry.getValue();\n\t\t\t\t\tfor (TransitionBlock transitionBlock : value) {\n\n\t\t\t\t\t\tString stateName = \"\" + key.getName().toString();\n\t\t\t\t\t\tJLabel stateNo = new JLabel(stateName);\n\t\t\t\t\t\tstateNo.setFont(new Font(\"Serif\", Font.BOLD, 16));\n\t\t\t\t\t\tstateNo.setForeground(Color.white);\n\t\t\t\t\t\t++currentLevelCounter;\n\t\t\t\t\t\tStateBlockTreeNo stateBlockTreeNo = new StateBlockTreeNo();\n\t\t\t\t\t\tstateBlockTreeNo.setStateBlock(key);\n\t\t\t\t\t\tstateBlockTreeNo.setTreeNo(((block.getTreeNo() - 1) * 3) + currentLevelCounter);\n\t\t\t\t\t\tstateBlockTreeNo.setTreeLabel(labelList.get(new Integer(Integer.toString(level) + Integer.toString(stateBlockTreeNo.getTreeNo()))));\n\t\t\t\t\t\tstateBlockTreeNo.setForestPosition(new Integer(Integer.toString(level) + Integer.toString(stateBlockTreeNo.getTreeNo())));\n\n\t\t\t\t\t\tblock.getTreeConnectionList().put(stateBlockTreeNo, transitionBlock.getName());\n\n\t\t\t\t\t\tint x = labelList.get(new Integer(Integer.toString(level) + Integer.toString(stateBlockTreeNo.getTreeNo()))).getX();\n\t\t\t\t\t\tint y = labelList.get(new Integer(Integer.toString(level) + Integer.toString(stateBlockTreeNo.getTreeNo()))).getY();\n\t\t\t\t\t\tJLabel transitionLabel = new JLabel();\n\t\t\t\t\t\tlabelList.get(new Integer(Integer.toString(level) + Integer.toString(stateBlockTreeNo.getTreeNo()))).setLayout(new FlowLayout(FlowLayout.CENTER));\n\t\t\t\t\t\tlabelList.get(new Integer(Integer.toString(level) + Integer.toString(stateBlockTreeNo.getTreeNo()))).add(stateNo);\n\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * if (level == 4) { transitionLabel.setBounds(x, y +\n\t\t\t\t\t\t * 40, 30, 30); transitionLabel.setIcon(new\n\t\t\t\t\t\t * ImageIcon(\"image/appleLevel4.png\"))); //\n\t\t\t\t\t\t * labelList.get(new Integer(Integer.toString(level) //\n\t\t\t\t\t\t * + //\n\t\t\t\t\t\t * Integer.toString(stateBlockTreeNo.getTreeNo()))).\n\t\t\t\t\t\t * setIcon(new // ImageIcon(\"image/treeLevel4.png\")));\n\t\t\t\t\t\t * transitionValue.setFont(new Font(\"Serif\", Font.BOLD,\n\t\t\t\t\t\t * 10)); fl.setVgap(10); } else {\n\t\t\t\t\t\t * transitionLabel.setBounds(x + 55, y, 40, 40);\n\t\t\t\t\t\t * transitionLabel.setIcon(new\n\t\t\t\t\t\t * ImageIcon(\"image/apple.png\")));\n\t\t\t\t\t\t * transitionValue.setFont(new Font(\"Serif\", Font.BOLD,\n\t\t\t\t\t\t * 16)); // labelList.get(new\n\t\t\t\t\t\t * Integer(Integer.toString(level) // + //\n\t\t\t\t\t\t * Integer.toString\n\t\t\t\t\t\t * (stateBlockTreeNo.getTreeNo()))).setIcon(new //\n\t\t\t\t\t\t * ImageIcon(\"image/tree.png\"))); fl.setVgap(15); }\n\t\t\t\t\t\t */\n\n\t\t\t\t\t\tJLabel transitionValue = new JLabel();\n\t\t\t\t\t\ttransitionValue = appleLabels.get(Integer.parseInt(block.getTreeLabel().getName() + stateBlockTreeNo.getTreeLabel().getName()));\n\n\t\t\t\t\t\tSystem.out.println(Integer.parseInt(block.getTreeLabel().getName() + stateBlockTreeNo.getTreeLabel().getName()));\n\t\t\t\t\t\tString transitionText = transitionBlock.getName();\n\t\t\t\t\t\ttransitionValue.setFont(new Font(\"Serif\", Font.BOLD, 20));\n\t\t\t\t\t\ttransitionValue.setForeground(Color.WHITE);\n\t\t\t\t\t\ttransitionValue.setText(transitionText);\n\t\t\t\t\t\ttransitionValue.setHorizontalTextPosition(JLabel.CENTER);\n\t\t\t\t\t\ttransitionValue.setVerticalTextPosition(JLabel.CENTER);\n\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * JLabel transitionValue = new JLabel(transitionText);\n\t\t\t\t\t\t * transitionValue.setForeground(Color.white);\n\t\t\t\t\t\t * FlowLayout fl = new FlowLayout(FlowLayout.CENTER);\n\t\t\t\t\t\t * transitionLabel =\n\t\t\t\t\t\t * appleLabels.get(Integer.parseInt(block\n\t\t\t\t\t\t * .getTreeLabel().getName() +\n\t\t\t\t\t\t * stateBlockTreeNo.getTreeLabel().getName()));\n\t\t\t\t\t\t * transitionValue.setFont(new Font(\"Serif\", Font.BOLD,\n\t\t\t\t\t\t * 16)); transitionLabel.setLayout(fl);\n\t\t\t\t\t\t * transitionLabel.add(transitionValue);\n\t\t\t\t\t\t */\n\n\t\t\t\t\t\tactionPanel.add(transitionValue);\n\n\t\t\t\t\t\tcurrentBlock.add(stateBlockTreeNo);\n\t\t\t\t\t}\n\t\t\t\t\ttemp = currentLevelCounter / 3;\n\t\t\t\t\tcurrentLevelCounter = currentLevelCounter * (temp + 1);\n\t\t\t\t}\n\t\t\t\tparentTreeNo++;\n\t\t\t}\n\t\t\tlevel++;\n\t\t\tpreviousBlock = (ArrayList<StateBlockTreeNo>) currentBlock.clone();\n\t\t\tcurrentBlock.clear();\n\n\t\t}\n\n\t}",
"@Override\n\tpublic String toString() {\n\t\tString str = labelTemplate.toString();\n\t\tswitch (type) {\n\t\tcase SET: str += \":=\"; break;\n\t\tcase DISCARD: str += \"!=\"; break;\n\t\tcase ADD: str += \"+=\"; break;\n\t\t}\n\t\tstr += valueTemplate.toString();\n\t\treturn str;\n\t}",
"public void displayOperations() {\n\n System.out.println(\"\" +\n \"Select Operation for GasPump 2 : \\n\" +\n \"0.) Activate \\n\" +\n \"1.) Start \\n\" +\n \"2.) PayCredit \\n\" +\n \"3.) Reject \\n\" +\n \"4.) PayDebit \\n\" +\n \"5.) Pin \\n\" +\n \"6.) Cancel \\n\" +\n \"7.) Approved \\n\" +\n \"8.) Diesel \\n\" +\n \"9.) Regular \\n\" +\n \"10.) Super \\n\" +\n \"11.) StartPump\\n\" +\n \"12.) PumpGallon\\n\" +\n \"13.) StopPump \\n\" +\n \"14.) FullTank \\n\" +\n \"q.) Quit\\n\");\n }",
"public String toString() {\n return \"(\" + getExpLeft().toString() + \" * \" + getExpRight().toString() + \")\";\n }",
"@Override\n public GeneratingResult generate(String condition) {\n StringBuilder text = new StringBuilder();\n String code = \"\";\n String instructions = \"\";\n try\n {\n JSONObject graph = new JSONObject();\n double[] inputNeuronsValues = new double[inputNeuronsAmount];\n\n int inputNeuronsAmount = Consts.inputNeuronsAmount;\n int outputNeuronsAmount = Consts.outputNeuronsAmount;\n\n int amountOfHiddenLayers = Consts.amountOfHiddenLayers;\n int amountOfNodesInHiddenLayer = Consts.amountOfNodesInHiddenLayer;\n int[] hiddenLayerNodesAmount = new int[amountOfHiddenLayers];\n\n final String[] activationFunctions = Consts.activationFunctions;\n int currentActivationFunctionIndex = generateRandomIntRange(0, activationFunctions.length - 1);\n String currentActivationFunction = activationFunctions[currentActivationFunctionIndex];\n JSONObject randomGraph = generateVariant(currentActivationFunction);\n\n double[][] edgeWeight = (double[][]) randomGraph.get(\"edgeWeight\");\n int[][] edges = (int[][]) randomGraph.get(\"edges\");\n int[] nodesLevel = (int[]) randomGraph.get(\"nodesLevel\");\n int[] nodes = (int[]) randomGraph.get(\"nodes\");\n double[] nodesValue = (double[]) randomGraph.get(\"nodesValue\");\n\n for (int i = 0; i < inputNeuronsAmount; i++)\n {\n text.append(\"input(X\").append(i).append(\") = \").append(nodesValue[i]).append(\". \");\n }\n\n graph.put(\"edgeWeight\", edgeWeight);\n graph.put(\"nodes\", nodes);\n graph.put(\"nodesLevel\", nodesLevel);\n graph.put(\"nodesValue\", nodesValue);\n graph.put(\"edges\", edges);\n graph.put(\"hiddenNodesLeft\", hiddenLayerNodesAmount);\n graph.put(\"inputNeuronsAmount\", inputNeuronsAmount);\n graph.put(\"outputNeuronsAmount\", outputNeuronsAmount);\n graph.put(\"amountOfHiddenLayers\", amountOfHiddenLayers);\n graph.put(\"amountOfNodesInHiddenLayer\", amountOfNodesInHiddenLayer);\n graph.put(\"inputNeuronsValues\", inputNeuronsValues);\n graph.put(\"currentActivationFunction\", currentActivationFunction);\n\n text.append(\"Фунция активации – \").append(currentActivationFunction).append(\".\");\n\n code = graph.toString();\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n\n return new GeneratingResult(text.toString(), code, instructions);\n }",
"public String buildDotString(){\n\t\tString ret=\"digraph NFA{\\n\";\n\t\tint numStarts=0;\n\t\tfor (State s : theStates){\n\t\t\tif(s.getAccept())\n\t\t\t\tret+=\"\\t\"+s.getIndex()+\"[shape=doublecircle]\\n\";\n\t\t\tif(s.getStart()){\n\t\t\t\tString startlbl=\"start\"+(numStarts++);\n\t\t\t\tret+=\"\\t\"+startlbl+\"[shape=none,label=\\\"\\\"]\\n\";\n\t\t\t\tret+=\"\\t\"+startlbl+\"->\"+s.getIndex()+\"[color=green]\\n\";\n\t\t\t}\n\t\t\tfor (Object withChar : s.getToStates().keySet()){\n\t\t\t\t//TODO: combine arrows with same from/to\n\t\t\t\tfor (Integer toNode : (ArrayList<Integer>)s.getToStates().get(withChar)){\n\t\t\t\t\t//find similar arrows\n\t\t\t\t\tString arrowName=(String)withChar;\n\t\t\t\t\t/*for (Object otherChar : s.getToStates().keySet()){\n\t\t\t\t\t\tfor (Integer sameNodeIdx : (ArrayList<Integer>)s.getToStates().get(withChar)){\n\t\t\t\t\t\t\tif(sameNodeIdx==toNode) arrowName+=\",\"+otherChar;\n\t\t\t\t\t\t}\n\t\t\t\t\t}*/\n\t\t\t\t\tret+=\"\\t\"+s.getIndex()+\" -> \"+toNode+\"[label=\\\"\"+arrowName+\"\\\"]\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tret+=\"}\";\n\t\treturn ret;\n\t}",
"public String toString()\n {\n String output;\t\n\t\n if (this.undefined == true)\t\n \toutput = \"Undefined\";\n else\t\n \toutput = \"\" + this.getNumerator() + \" / \" + this.getDenominator();\n \t\n return output;\t\n\n }",
"@Override\npublic void actionPerformed(ActionEvent ae) {\nObject obj = ae.getSource(); \n\nif(obj == myCalcView.getJbt_one()){ \n myCalcView.getJtf_result().setText(myCalcView.getJtf_result().getText()+\"1\"); \n}else if(obj == myCalcView.getJbt_two()){ \n myCalcView.getJtf_result().setText(myCalcView.getJtf_result().getText()+\"2\"); \n}else if(obj == myCalcView.getJbt_plus()){ \n v1 = myCalcView.getJtf_result().getText(); \n System.out.println(\"v1 : \"+v1); \n op = \"+\"; \n myCalcView.getJtf_result().setText(\"\"); \n}else if(obj == myCalcView.getJbt_equals()){ \n v2 = myCalcView.getJtf_result().getText(); \n System.out.println(\"v1:\"+v1 +\"-> v2 : \"+v2+\" op : \"+op); \n String result = calcurate(v1,v2,op); \n myCalcView.getJtf_result().setText(result); \n}else if(obj == myCalcView.getJbt_clear()){ \n myCalcView.getJtf_result().setText(\"\"); \n} \n}",
"public String getGateStatus() { \n\t\t\treturn gateStatus;\n\t\t}",
"@Override\n\tpublic void generateOutput(ModInstance callingInst, OutputBuilder outputBuilder) {\n\t\tif (callingInst == null) return;\n\t\t\n\t\tSignalProperties signalProperties = new SignalProperties(callingInst); // extract properties\n\t\toutputBuilder.pushInstance(signalProperties); // instance path is valid after this\n\n\t\toutputBuilder.addSignal(signalProperties); // add signal to verilog structures\n\t\toutputBuilder.popInstance();\n\t}",
"public void display()\n\t{\n\t\tSystem.out.println(\"Bike No.\\t\"+\n\t\t\t\t\"Phone no.\\t\"+\n\t\t\t\t\"Name\\t\"+\n\t\t\t\t\"No. of days\\t\"+\n\t\t\t\t\"Charge\");\n\t\tSystem.out.println(bno+\n\t\t\t\t\"\\t\"+phno+\n\t\t\t\t\"\\t\"+name+\n\t\t\t\t\"\\t\"+days+\n\t\t\t\t\"\\t\"+charge);\n\t}",
"@Override\n\tpublic String toString() {\n\t\tString str = \"(\";\n\t\tif(this.error) str += \"1 - \";\n\t\tint i = 0;\n\t\tfor(String component : this.components) {\n\t\t\tif(i != 0) {\n\t\t\t\tstr += \" * \";\n\t\t\t}\n\t\t\tstr += component;\n\t\t\ti++;\n\t\t}\n\t\treturn str + \")\";\n\t}",
"Output createOutput();",
"public String toGraphviz() {\n StringBuilder b = new StringBuilder(\"digraph {\\n\");\n\n // Assign states consecutive numbers.\n Set<State> states = model.getStates();\n Map<State, Integer> stateOrdering = new HashMap<State, Integer>();\n int number = 0;\n for (State s : states) {\n stateOrdering.put(s, number++);\n }\n\n for (State s : states) {\n b.append(\" \").append(stateOrdering.get(s));\n if (s.isAccept())\n b.append(\" [shape=doublecircle,label=\\\"\\\"];\\n\");\n else\n b.append(\" [shape=circle,label=\\\"\\\"];\\n\");\n if (s == model.getInitialState()) {\n b.append(\" initial [shape=plaintext,label=\\\"\\\"];\\n\");\n b.append(\" initial -> \").append(stateOrdering.get(s))\n .append(\"\\n\");\n }\n for (Transition t : s.getTransitions()) {\n int source = stateOrdering.get(s);\n int dest = stateOrdering.get(t.getDest());\n char cur = t.getMin();\n appendDotTransition(b, encodings.getString(cur), source, dest);\n while (cur < t.getMax()) {\n cur++;\n appendDotTransition(b, encodings.getString(cur), source,\n dest);\n }\n }\n }\n return b.append(\"}\\n\").toString();\n }",
"public String toString() {\n\t\treturn getOriginalInput();\n\t}",
"@Override public String toDot() {\r\n String middle = \"\";\r\n switch(operator) {\r\n case AND : \r\n middle = \"&\";\r\n break;\r\n case NOR :\r\n case OR : \r\n middle = \"∨\";\r\n break;\r\n case IMPLIES : \r\n middle = \"=>\";\r\n break;\r\n default : assert false;\r\n }\r\n middle = left.toDot() + \" \" + middle + \" \" + right.toDot();\r\n if ( operator == Token.NOR )\r\n return \"¬ (\"+middle+\")\";\r\n else\r\n return middle;\r\n }",
"public String getInputor() {\r\n\t\treturn inputor;\r\n\t}",
"public String toString() {\r\n String function = \"\";\r\n //in order to print function as a string, we must go through all the possibilities of\r\n //how snytax between how functions are written and my be interpreted should be explored.\r\n //for instance if a term = 0 such as sin(0), you wouldnt write sin(0). Or x^0, you would\r\n //simply represent this as 1.\r\n //using if else statements within a for loop i scan through all the terms stored in the \r\n //arrays and print them accordingly following proper syntax for writing equations,\r\n //it is quite a bit of code and i found it difficult annotating this method since\r\n //it was mainly logic.\r\n boolean start = true;\r\n for(int i = 0; i < cindex; i++){\r\n boolean nothing = false;\r\n if(start){\r\n if(co[i] == 0){\r\n nothing = true;\r\n }else if(co[i] == -1){\r\n function += \"-\";\r\n start = false;\r\n }else if(co[i] == 1){\r\n start = false;\r\n if(degree[i] == 0){\r\n function += String.format(\"%.02f\", co[i]);\r\n }\r\n }else{\r\n function += String.format(\"%.02f\", co[i]);\r\n start = false;\r\n }\r\n }else{\r\n if(co[i] == 0){\r\n nothing = true;\r\n }else if(co[i] == -1){\r\n function += \"-\";\r\n }else if(co[i] == 1){\r\n function += \"+\";\r\n }else if(co[i] > 0){\r\n function += \"+\" + String.format(\"%.02f\", co[i]);\r\n }else{\r\n function += String.format(\"%.02f\", co[i]);\r\n }\r\n }\r\n if(!nothing){\r\n if(degree[i] == 1){\r\n function += \"x\";\r\n }else if(degree[i] == 0){\r\n function = function;\r\n }else if(degree[i] > 0){\r\n function += \"x^\" + String.format(\"%.02f\", degree[i]);\r\n }else{\r\n function += \"x^(\" + String.format(\"%.02f\", degree[i]) + \")\";\r\n }\r\n }\r\n }\r\n for(int i = 0; i < sinindex; i++){\r\n boolean nothing = false;\r\n if(sind[i] != 0){\r\n if(start){\r\n if(sinc[i] == 0){\r\n nothing = true;\r\n }else if(sinc[i] == -1){\r\n function += \"-\";\r\n start = false;\r\n }else if(sinc[i] == 1){\r\n start = false;\r\n }else{\r\n function += String.format(\"%.02f\", sinc[i]);\r\n start = false;\r\n }\r\n }else{\r\n if(sinc[i] == 0){\r\n nothing = true;\r\n }else if(sinc[i] == -1){\r\n function += \"-\";\r\n }else if(sinc[i] == 1){\r\n function += \"+\";\r\n }else if(sinc[i] > 0){\r\n function += \"+\" + String.format(\"%.02f\", sinc[i]);\r\n }else{\r\n function += String.format(\"%.02f\", sinc[i]);\r\n }\r\n }\r\n }\r\n if(!nothing){\r\n if(sind[i] == 1){\r\n function += \"sin(x)\";\r\n }else if(sind[i] == -1){\r\n function += \"sin(-x)\";\r\n }else if(sind[i] == 0){\r\n function = function;\r\n }else{\r\n function += \"sin(\" + String.format(\"%.02f\", sind[i]) + \"x)\";\r\n }\r\n }\r\n }\r\n for(int i = 0; i < tanindex; i++){\r\n boolean nothing = false;\r\n if(tand[i] != 0){\r\n if(start){\r\n if(tanc[i] == 0){\r\n nothing = true;\r\n }else if(tanc[i] == -1){\r\n function += \"-\";\r\n start = false;\r\n }else if(tanc[i] == 1){\r\n start = false;\r\n }else{\r\n function += String.format(\"%.02f\", tanc[i]);\r\n start = false;\r\n }\r\n }else{\r\n if(tanc[i] == 0){\r\n nothing = true;\r\n }else if(tanc[i] == -1){\r\n function += \"-\";\r\n }else if(tanc[i] == 1){\r\n function += \"+\";\r\n }else if(tanc[i] > 0){\r\n function += \"+\" + String.format(\"%.02f\", tanc[i]);\r\n }else{\r\n function += String.format(\"%.02f\", tanc[i]);\r\n }\r\n }\r\n }\r\n if(!nothing){\r\n if(tand[i] == 1){\r\n function += \"tan(x)\";\r\n }else if(tand[i] == -1){\r\n function += \"tan(-x)\";\r\n }else if(tand[i] == 0){\r\n function = function;\r\n }else{\r\n function += \"tan(\" + String.format(\"%.02f\", tand[i]) + \"x)\";\r\n }\r\n }\r\n }\r\n for(int i = 0; i < cosindex; i++){\r\n boolean nothing = false;\r\n if(start){\r\n if(cosc[i] == 0){\r\n nothing = true;\r\n }else if(cosc[i] == -1){\r\n function += \"-\";\r\n start = false;\r\n }else if(cosc[i] == 1){\r\n start = false;\r\n }else{\r\n function += String.format(\"%.02f\", cosc[i]);\r\n start = false; \r\n }\r\n }else{\r\n if(cosc[i] == 0){\r\n nothing = true;\r\n }else if(cosc[i] == -1){\r\n function += \"-\";\r\n }else if(cosc[i] == 1){\r\n function += \"+\";\r\n }else if(cosc[i] > 0){\r\n function += \"+\" + String.format(\"%.02f\", cosc[i]);\r\n }else{\r\n function += String.format(\"%.02f\", cosc[i]);\r\n }\r\n }\r\n if(!nothing){\r\n if(cosd[i] == 1){\r\n function += \"cos(x)\";\r\n }else if(cosd[i] == -1){\r\n function += \"cos(-x)\";\r\n }else if(cosd[i] == 0){\r\n function = function;\r\n }else{\r\n function += \"cos(\" + String.format(\"%.02f\", cosd[i]) + \"x)\";\r\n }\r\n }\r\n }\r\n return function;\r\n\t}",
"public static void main (String[] args){\n Scanner s=new Scanner(System.in);\n int n=s.nextInt();\n if(n%2==1)\n {\n n=n/2;\n n++;\n }\n else\n {\n n=n/2;\n }\n for(int i=1;i<=n;i++)\n {\n for(int k=1;k<=i-1;k++)\n {\n System.out.print(\" \");\n }\n for(int j=1;j<=((2*n-1)-2*(i-1));j++)\n {\n if(j==1||j==((2*n-1)-2*(i-1)))\n System.out.print(\"*\");\n else\n System.out.print(\" \");\n }\n System.out.println();\n }\n for(int i=2;i<=n;i++)\n {\n for(int k=1;k<=n-i;k++)\n {\n System.out.print(\" \");\n }\n for(int j=1;j<i*2;j++)\n {\n if(j==1||j==(i*2-1))\n System.out.print(\"*\");\n else\n System.out.print(\" \");\n }\n System.out.println();\n }\n\t}",
"public String inputForm() {\n return inputDataTraveler.validateData();\n }",
"public void term()\n \t{\n \t\tTechEditWizardData data = wizard.getTechEditData();\n \t\tdata.setGateLength(TextUtils.atof(length.getText()));\n\t\tdata.setGateWidth(TextUtils.atof(width.getText()));\n \t\tdata.setGateContactSpacing(TextUtils.atof(contactSpacing.getText()));\n \t\tdata.setGateSpacing(TextUtils.atof(spacing.getText()));\n \t}",
"public String toDisplay(){\n\t\treturn String.format(\"%s | %c | %.2f | %.2f\",name ,gender ,taxableIncome ,taxAmount);\n\t}",
"void Print()\n {\n int quadLabel = 1;\n String separator;\n\n System.out.println(\"CODE\");\n\n Enumeration<Quadruple> e = this.Quadruple.elements();\n e.nextElement();\n\n while (e.hasMoreElements())\n {\n Quadruple nextQuad = e.nextElement();\n String[] quadOps = nextQuad.GetOps();\n System.out.print(quadLabel + \": \" + quadOps[0]);\n for (int i = 1; i < nextQuad.GetQuadSize(); i++)\n {\n System.out.print(\" \" + quadOps[i]);\n if (i != nextQuad.GetQuadSize() - 1)\n {\n System.out.print(\",\");\n } else System.out.print(\"\");\n }\n System.out.println(\"\");\n quadLabel++;\n }\n }",
"public void print()\r\n\t\t{\r\n\t\tSystem.out.println(\"AETInteractions object\");\r\n\t\tSystem.out.println(\"Input interactions\");\r\n\t\t// stampa le interazioni di input\r\n\t\tif (getInIn() != null) getInIn().print();\r\n\t\tSystem.out.println(\"Output interactions\");\r\n\t\t// stampa le interazioni di output\r\n\t\tif (getOuIn() != null) getOuIn().print();\r\n\t\t}",
"@Override\n public Pane visualization() {\n //TODO: this will be replaced with the correct addition visualizer\n HBox layout = new HBox();\n layout.setSpacing(0);\n layout.setAlignment(Pos.TOP_LEFT);\n Visualizer vis = new AdditionVisualizer();\n layout.getChildren().addAll(left.visualization(), vis.drawString(this.getValue()), right.visualization());\n return layout;\n }",
"public String toString() {\n\t\tStringBuffer buffer = new StringBuffer();\n\t\tthis.createSpecSection(buffer);\n\t\tthis.createOperatorSection(buffer);\n\t\treturn buffer.toString();\n\t}",
"private void initComponents() {\n java.awt.GridBagConstraints gridBagConstraints;\n \n gate = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n width = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n length = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n contactSpacing = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n spacing = new javax.swing.JTextField();\n image = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n \n getContentPane().setLayout(new java.awt.GridBagLayout());\n \n setTitle(\"Gate\");\n setName(\"\");\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowClosing(java.awt.event.WindowEvent evt) {\n closeDialog(evt);\n }\n });\n \n gate.setLayout(new java.awt.GridBagLayout());\n \n jLabel1.setText(\"Width (B):\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(1, 4, 1, 0);\n gate.add(jLabel1, gridBagConstraints);\n \n width.setColumns(8);\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.insets = new java.awt.Insets(1, 0, 1, 2);\n gate.add(width, gridBagConstraints);\n \n jLabel2.setText(\"Length (A):\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(1, 4, 1, 0);\n gate.add(jLabel2, gridBagConstraints);\n \n length.setColumns(8);\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.insets = new java.awt.Insets(1, 0, 1, 2);\n gate.add(length, gridBagConstraints);\n \n jLabel3.setText(\"Contact spacing (C):\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 4;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(1, 4, 1, 0);\n gate.add(jLabel3, gridBagConstraints);\n \n contactSpacing.setColumns(8);\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 4;\n gridBagConstraints.insets = new java.awt.Insets(1, 0, 1, 2);\n gate.add(contactSpacing, gridBagConstraints);\n \n jLabel4.setText(\"Spacing (D):\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 5;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(1, 4, 1, 0);\n gate.add(jLabel4, gridBagConstraints);\n \n spacing.setColumns(8);\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 5;\n gridBagConstraints.insets = new java.awt.Insets(1, 0, 1, 2);\n gate.add(spacing, gridBagConstraints);\n \n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.gridwidth = 2;\n gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4);\n gate.add(image, gridBagConstraints);\n \n jLabel7.setText(\"All values are in nanometers\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 6;\n gridBagConstraints.gridwidth = 2;\n gridBagConstraints.insets = new java.awt.Insets(4, 4, 1, 0);\n gate.add(jLabel7, gridBagConstraints);\n \n jLabel5.setText(\"Gate Parameters\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.gridwidth = 2;\n gridBagConstraints.insets = new java.awt.Insets(4, 0, 4, 0);\n gate.add(jLabel5, gridBagConstraints);\n \n getContentPane().add(gate, new java.awt.GridBagConstraints());\n \n pack();\n }",
"public String GeneralForm() {\n return \"==================================================================================================================\" + \"\\n\" +\n \"city humidity description wind coordination\" + \"\\n\" +\n \"==================================================================================================================\";\n\n }",
"public Element getOutput(){\n\t\treturn output;\n\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tinput(input.getText().toString());\n\t\t\t\tshow.setText(output.toString());\n\t\t\t}",
"@Override\n public String toString() {\n System.out.print(super.toString());\n System.out.print(\"This form was encrypted using: \" + encryption);\n return \"\";\n }",
"public T getOutput() {\r\n\t\treturn outputGraph;\r\n\t}",
"public void calculateOutput() {\n inputSum = 0.0;\n //for output (linear) neuron\n if (layer == 0) {\n for (int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getInput()[i];\n }\n }\n //for Sigmoidal neurons\n else {\n for(int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getNeurons()[layer - 1][i].output;\n }\n }\n if (enableConstAddend) {\n inputSum += weights[inputs];\n }\n output = activate(inputSum);\n }",
"public void print() {\n\t// Skriv ut en grafisk representation av kösituationen\n\t// med hjälp av klassernas toString-metoder\n System.out.println(\"A -> B\");\n System.out.println(r0);\n System.out.println(\"B -> C\");\n System.out.println(r1);\n System.out.println(\"turn\");\n System.out.println(r2);\n //System.out.println(\"light 1\");\n System.out.println(s1);\n //System.out.println(\"light 2\");\n System.out.println(s2);\n }",
"public void encode (String input){\n\t\tfor (int j=rotors.length-1;j>=1; --j)\n\t\t{\n\t\t\trotors[j].setNeighbour1(rotors[j-1]);\n\t\t}\n\t\ttry{\n\t\t\tfor (int i = 0; i <= input.length() - 1; ++i){\n\t\t\t\tString type = new String(\"direct\");\n\t\t\t\tchar in = input.charAt(i);\n\t\t\t\tfor (int j = 0; j <= elements.size() - 1; ++j){\n\t\t\t\t\telements.get(j).transmitInput(in, type);\n\t\t\t\t\tin = elements.get(j).receiveOutput();\n\t\t\t\t\tif (in == 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (in == 0) \n\t\t\t\t\tbreak;\n\t\t\t\ttype = \"inverse\";\n\t\t\t\tfor (int j = elements.size() - 2; j >= 0; --j){\n\t\t\t\t\telements.get(j).transmitInput(in, type);\n\t\t\t\t\tin = elements.get(j).receiveOutput();\n\t\t\t\t\tif (in == 0) break;\n\t\t\t\t}\n\t\t\t\tif (in == 0) continue;\n\t\t\t\tSystem.out.print(in);\n\t\t\t}\n\t\t}catch (NullPointerException e){\n\t\t\treturn;\n\t\t}\n\t}"
] | [
"0.6863843",
"0.59450716",
"0.5667534",
"0.5619157",
"0.5594991",
"0.5524784",
"0.55211735",
"0.54806226",
"0.547926",
"0.54671776",
"0.54241055",
"0.53400296",
"0.53238195",
"0.53056204",
"0.5296865",
"0.5291443",
"0.5224183",
"0.5218183",
"0.51989305",
"0.5154696",
"0.51413596",
"0.51380014",
"0.51266366",
"0.5125107",
"0.50865525",
"0.50848824",
"0.5084064",
"0.50791013",
"0.50787157",
"0.50733876",
"0.50605303",
"0.50598085",
"0.5039875",
"0.50343454",
"0.5028712",
"0.50121",
"0.5009862",
"0.500302",
"0.49832478",
"0.49830344",
"0.49785003",
"0.4973847",
"0.4973097",
"0.49696657",
"0.49615112",
"0.4942866",
"0.49391562",
"0.49253076",
"0.49212492",
"0.49179927",
"0.49149814",
"0.49076483",
"0.49043",
"0.4898845",
"0.48922345",
"0.48831508",
"0.48652148",
"0.48643687",
"0.48577753",
"0.48522222",
"0.48454398",
"0.484455",
"0.4831572",
"0.48295173",
"0.48295173",
"0.4818967",
"0.4810427",
"0.479972",
"0.4795377",
"0.47864145",
"0.47862914",
"0.47841674",
"0.47831005",
"0.47800106",
"0.4778105",
"0.47763872",
"0.47744393",
"0.47727865",
"0.47727835",
"0.47707617",
"0.47660488",
"0.4762235",
"0.4758564",
"0.47514883",
"0.47501767",
"0.47471344",
"0.47453722",
"0.47426382",
"0.47410706",
"0.47388694",
"0.47358996",
"0.4735363",
"0.4730799",
"0.4725438",
"0.47243458",
"0.4721971",
"0.4705201",
"0.4705017",
"0.4704176",
"0.47012803"
] | 0.4781946 | 73 |
see lecture notes for 10/03/2017 to see how to solve instatiation problems | orGate( Scanner sc, String name ){
this.name = name;
ScanSupport.lineEnd( sc, name);
this.createDelay(sc);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private DiscretePotentialOperations() {\r\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t\tInstitude i1=new Institude(10,\"Pune\",new Branch(11,\"Bas\",new Subject(20,\"Java\",new Topic\r\n\t\t\t\t(30,\"Method Overloading\",new SubTopic(40,\"Method Overriding\",new Question(50,\"What is class\"))))));\r\n\t\t\r\n\t\tSystem.out.println(i1);\r\n\t\t\r\n\t\t\r\n//\t\tInstitude i1=new Institude();\r\n//\t\ti1.setId(10);\r\n//\t\ti1.setName(\"Pune\");\r\n//\t\t\r\n//\t\tBranch b1=new Branch();\r\n//\t\tb1.setId(11);\r\n//\t\tb1.setName(\"Bsc\");\r\n//\t\t\r\n//\t\tSubject s1=new Subject();\r\n//\t\ts1.setId(20);\r\n//\t\ts1.setName(\"Java\");\r\n//\t\t\r\n//\t\tTopic t1=new Topic();\r\n//\t\tt1.setId(30);\r\n//\t\tt1.setName(\"Method Overloading\");\r\n//\t\t\r\n//\t\tSubTopic s2=new SubTopic();\r\n//\t\ts2.setId(40);\r\n//\t\ts2.setName(\"Method overriding\");\r\n//\t\t\r\n//\t\tQuestion q1=new Question();\r\n//\t\tq1.setId(50);\r\n//\t\tq1.setName(\"What is Class ?\");\r\n//\t\t\r\n//\t\t\r\n//\t\ti1.setB1(b1);\r\n//\t\tb1.setS1(s1);\r\n//\t\ts1.setT1(t1);\r\n//\t\tt1.setSt(s2);\r\n//\t\ts2.setQ1(q1);\r\n//\t\t\r\n//\t\tSystem.out.println(i1);\r\n\t\r\n\t\t}",
"@Test(timeout = 4000)\n public void test34() throws Throwable {\n Discretize discretize0 = new Discretize();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"relational\", arrayList0, 30);\n discretize0.setInputFormat(instances0);\n BinarySparseInstance binarySparseInstance0 = new BinarySparseInstance(2);\n // Undeclared exception!\n try { \n discretize0.input(binarySparseInstance0);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // Instance has no dataset assigned!!\n //\n verifyException(\"weka.core.RelationalLocator\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test25() throws Throwable {\n Attribute attribute0 = new Attribute((String) null, (String) null);\n LinkedList<Attribute> linkedList0 = new LinkedList<Attribute>();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>(linkedList0);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"date\", arrayList0, 0);\n Instances instances1 = new Instances(instances0);\n double[] doubleArray0 = new double[1];\n SparseInstance sparseInstance0 = new SparseInstance(1, doubleArray0);\n SparseInstance sparseInstance1 = new SparseInstance((Instance) sparseInstance0);\n instances0.add((Instance) sparseInstance1);\n Discretize discretize0 = new Discretize(\"@attribute\");\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.setMakeBinary(true);\n assertTrue(discretize0.getMakeBinary());\n \n Discretize discretize1 = new Discretize();\n boolean boolean0 = discretize1.setInputFormat(instances1);\n assertFalse(boolean0);\n }",
"private void generalise(Instance newInst) throws Exception {\n\n Exemplar first = m_ExemplarsByClass[(int) newInst.classValue()];\n int n = 0;\n\n /* try to generalise with the n first exemplars */\n while(n < m_NumAttemptsOfGene && first != null){\n\t \n /* find the nearest one starting from first */\n Exemplar closest = first, cur = first;\n double smallestDist = first.squaredDistance(newInst), dist;\n while(cur.nextWithClass != null){\n\tcur = cur.nextWithClass;\n\tdist = cur.squaredDistance(newInst);\n\tif(dist < smallestDist){\n\t smallestDist = dist;\n\t closest = cur;\n\t}\n }\n\n /* remove the Examplar from NNge's lists */\n if(closest == first)\n\tfirst = first.nextWithClass;\n removeExemplar(closest); \n\n /* try to generalise */\n closest.preGeneralise(newInst);\n if(!detectOverlapping(closest)){\n\tclosest.validateGeneralisation();\n\taddExemplar(closest);\n\treturn;\n }\n\n /* it didn't work, put ungeneralised exemplar on the top of the lists */\n closest.cancelGeneralisation();\n addExemplar(closest);\t\t\t\n\n n++;\n }\n\n /* generalisation failled : add newInst as a new Examplar */\n Exemplar newEx = new Exemplar(this, m_Train, 5, newInst.classValue());\n newEx.generalise(newInst);\n initWeight(newEx);\n addExemplar(newEx);\n }",
"void findInstantiations (final Buffers buffers)\n\t{\n\t\tbuffers.removeDecayedChunks();\n\n\t\tHashSet<Instantiation> set = new HashSet<Instantiation>();\n\t\tbuffers.sortGoals();\n\n\t\tif (buffers.numGoals() == 0)\n\t\t{\n for (Production p : productions.values()) {\n Instantiation inst = p.instantiate(buffers);\n if (inst != null) set.add(inst);\n }\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor (int i=0 ; set.isEmpty() && i<buffers.numGoals() ; i++)\n\t\t\t{\n\t\t\t\tbuffers.tryGoal (i);\n\t\t\t\tif (threadedCognitionTrace)\n\t\t\t\t\tmodel.output (\"*** (tct) trying goal \" + buffers.get(Symbol.goal));\n for (Production p : productions.values()) {\n Instantiation inst = p.instantiate(buffers);\n if (inst != null) set.add(inst);\n }\n\t\t\t}\n\t\t}\n\n\t\tif (threadedCognitionTrace)\n\t\t\tmodel.output (\"*** (tct) found \"+set.size()+\" match\"+(set.size()==1 ? \"\" : \"es\"));\n\n\t\tif (!set.isEmpty())\n\t\t{\n\t\t\tif (conflictSetTrace) model.output (\"Conflict Set:\");\n\t\t\tIterator<Instantiation> itInst = set.iterator();\n\t\t\tInstantiation highestU = itInst.next();\n\t\t\tif (conflictSetTrace) model.output (\"* (\" + String.format(\"%.3f\",highestU.getUtility()) + \") \" + highestU);\n\t\t\twhile (itInst.hasNext())\n\t\t\t{\n\t\t\t\tInstantiation inst = itInst.next();\n\t\t\t\tif (conflictSetTrace) model.output (\"* (\" + String.format(\"%.3f\",inst.getUtility()) + \") \" + inst);\n\t\t\t\tif (inst.getUtility() > highestU.getUtility()) highestU = inst;\n\t\t\t}\n\n\t\t\tfinal Instantiation finalInst = highestU;\n\t\t\tif (conflictSetTrace) model.output (\"-> (\" + String.format(\"%.3f\",finalInst.getUtility()) + \") \" + finalInst);\n\n\t\t\tif (finalInst.getProduction().isBreakPoint())\n\t\t\t{\n\t\t\t\tmodel.addEvent (new Event (model.getTime() + .049,\n\t\t\t\t\t\t\"procedural\", \"about to fire \" + finalInst.getProduction().getName().getString().toUpperCase())\n\t\t\t\t{\n\t\t\t\t\tpublic void action() {\n\t\t\t\t\t\tmodel.output (\"------\", \"break\");\n\t\t\t\t\t\tmodel.stop();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tString extra = \"\";\n\t\t\tif (buffers.numGoals() > 1)\n\t\t\t{\n\t\t\t\tChunk goal = buffers.get(Symbol.goal);\n\t\t\t\textra = \" [\" + ((goal!=null) ? goal.getName().getString() : \"nil\") + \"]\";\n\t\t\t}\n\n\t\t\tmodel.addEvent (new Event (model.getTime() + .050,\n\t\t\t\t\t\"procedural\", \"** \" + finalInst.getProduction().getName().getString().toUpperCase() + \" **\" + extra)\n\t\t\t{\n\t\t\t\tpublic void action() {\n\t\t\t\t\tfire (finalInst, buffers);\n\t\t\t\t\tfindInstantiations (buffers);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}",
"private void _setInstanceInfo() {\n int subClass, superClass;\n\n for (int i = 0; i < CLASS_NUM; i++) {\n switch (i) {\n case CS_C_UNIV:\n break;\n case CS_C_DEPT:\n break;\n case CS_C_FULLPROF:\n instances_[i].num = _getRandomFromRange(FULLPROF_MIN, FULLPROF_MAX);\n break;\n case CS_C_VISITINGPROF:\n instances_[i].num = _getRandomFromRange(VISITINGPROF_MIN, VISITINGPROF_MAX);\n break;\n case CS_C_ASSOPROF:\n instances_[i].num = _getRandomFromRange(ASSOPROF_MIN, ASSOPROF_MAX);\n break;\n case CS_C_ASSTPROF:\n instances_[i].num = _getRandomFromRange(ASSTPROF_MIN, ASSTPROF_MAX);\n break;\n case CS_C_LECTURER:\n instances_[i].num = _getRandomFromRange(LEC_MIN, LEC_MAX);\n break;\n case CS_C_UNDERSTUD:\n instances_[i].num = _getRandomFromRange(R_UNDERSTUD_FACULTY_MIN *\n instances_[CS_C_FACULTY].total,\n R_UNDERSTUD_FACULTY_MAX *\n instances_[CS_C_FACULTY].total);\n break;\n case CS_C_VISITSTUD:\n instances_[i].num = _getRandomFromRange(R_VISITSTUD_FACULTY_MIN *\n instances_[CS_C_FACULTY].total,\n R_VISITSTUD_FACULTY_MAX *\n instances_[CS_C_FACULTY].total);\n break; \n case CS_C_GRADSTUD:\n instances_[i].num = _getRandomFromRange(R_GRADSTUD_FACULTY_MIN *\n instances_[CS_C_FACULTY].total,\n R_GRADSTUD_FACULTY_MAX *\n instances_[CS_C_FACULTY].total);\n break;\n case CS_C_TA:\n instances_[i].num = _getRandomFromRange(instances_[CS_C_GRADSTUD].total /\n R_GRADSTUD_TA_MAX,\n instances_[CS_C_GRADSTUD].total /\n R_GRADSTUD_TA_MIN);\n break;\n case CS_C_RA:\n instances_[i].num = _getRandomFromRange(instances_[CS_C_GRADSTUD].total /\n R_GRADSTUD_RA_MAX,\n instances_[CS_C_GRADSTUD].total /\n R_GRADSTUD_RA_MIN);\n break;\n case CS_C_RESEARCHGROUP:\n instances_[i].num = _getRandomFromRange(RESEARCHGROUP_MIN, RESEARCHGROUP_MAX);\n break;\n default:\n instances_[i].num = CLASS_INFO[i][INDEX_NUM];\n break;\n }\n instances_[i].total = instances_[i].num;\n subClass = i;\n while ( (superClass = CLASS_INFO[subClass][INDEX_SUPER]) != CS_C_NULL) {\n instances_[superClass].total += instances_[i].num;\n subClass = superClass;\n }\n }\n }",
"public static void main(String[] args) {\n Animal a1 = new Animal();\n \n //objeto animal parametrizado\n Animal a2 = new Animal(LocalDate.of(2020, 6, 4), \"Saphi\", Animal.Tipo.GATO, 400, Animal.Estado.DURMIENDO);\n \n //imprimir a1 y a2\n System.out.println(\"Animal a1:\\n \" + a1.toString());\n System.out.println(\"Animal a2:\\n \" + a2.toString());\n \n \n //clonar a2 en a3\n Animal a3 = Animal.clonar(a2);\n System.out.println(\"Animal a3:\\n\" + a3.toString());\n \n //contador de instancias\n System.out.println(\"N de instancias: \" + Animal.getContadorInstancias());\n \n //creacion de dos personas\n Persona p1 = new Persona(\"Juan\", 33);\n Persona p2 = new Persona(\"Alba\", 21);\n \n //p1 despierta a los animales\n p1.llamar(a1);\n p1.llamar(a2);\n p1.llamar(a3);\n\n //p2 juega con a2 12m min\n p2.jugar(a2, 120);\n System.out.println(\"Peso de a2 despues de jugar con p2: \" + a2.getGramos());\n \n \n //p1 alimenta a a1 1000 gramos, nuevo peso\n p1.alimentar(a1, 1000);\n System.out.println(\"Peso de a1 despues de comer: \" + a1.getGramos());\n \n //FALTA CONTROLAR EXCEPCION\n \n //p1 juega con a1 200 min, nuevo peso\n// p1.jugar(a1, 200);\n// System.out.println(\"El animal a1 pesa \" + a1.getGramos() + \" después de jugar\");\n \n \n }",
"public abstract double classify(Instance e);",
"public Instance(Instance inst){\r\n\t\tthis.isTrain = inst.isTrain;\r\n\t\tthis.numInputAttributes = inst.numInputAttributes;\r\n\t\tthis.numOutputAttributes = inst.numOutputAttributes;\r\n\t\tthis.numUndefinedAttributes = inst.numUndefinedAttributes;\r\n\r\n\t\tthis.anyMissingValue = Arrays.copyOf(inst.anyMissingValue, inst.anyMissingValue.length);\r\n\r\n\t\tthis.nominalValues = new String[inst.nominalValues.length][];\r\n\t\tfor(int i=0;i<nominalValues.length;i++){\r\n\t\t\tthis.nominalValues[i] = Arrays.copyOf(inst.nominalValues[i],inst.nominalValues[i].length);\r\n\t\t}\r\n\r\n\t\tthis.intNominalValues = new int[inst.intNominalValues.length][];\r\n\t\tfor(int i=0;i<nominalValues.length;i++){\r\n\t\t\tthis.intNominalValues[i] = Arrays.copyOf(inst.intNominalValues[i],inst.intNominalValues[i].length);\r\n\t\t}\r\n\r\n\t\tthis.realValues = new double[inst.realValues.length][];\r\n\t\tfor(int i=0;i<realValues.length;i++){\r\n\t\t\tthis.realValues[i] = Arrays.copyOf(inst.realValues[i],inst.realValues[i].length);\r\n\t\t}\r\n\r\n\t\tthis.missingValues = new boolean[inst.missingValues.length][];\r\n\t\tfor(int i=0;i<missingValues.length;i++){\r\n\t\t\tthis.missingValues[i] = Arrays.copyOf(inst.missingValues[i],inst.missingValues[i].length);\r\n\t\t}\r\n\t}",
"public abstract double initialise();",
"public abstract int classifyInstance(Instance instance) throws Exception;",
"@Test\n\tpublic final void testPartialInstantiation() throws Exception {\n\t\tfinal IPRProof proof = prRoot.createChild(IPRProof.ELEMENT_TYPE, null, null);\n\n\t\tfinal IProverSequent seq = TestLib.genSeq(factory,\n\t\t\t\t\" x ∈ ℕ\" + \";; y ∈ ℕ\" + \";; (∀a,b· a ∈ ℕ ∧ b ∈ ℕ ⇒ a+b ∈ ℕ)\" + \"|- x+y ∈ ℕ\");\n\t\tfinal IProofTree proofTree = ProverFactory.makeProofTree(seq, null);\n\t\tfinal Predicate univ = getFirstUnivHyp(seq);\n\t\tITactic tactic;\n\n\t\t// Apply AllD with a full instantiation\n\t\ttactic = Tactics.allD(univ, \"x\", \"y\");\n\t\ttactic.apply(proofTree.getRoot(), null);\n\t\tcheckProofTreeSerialization(proof, proofTree, true);\n\t\tproofTree.getRoot().pruneChildren();\n\n\t\t// Apply AllD with a partial instantiation (only \"a\")\n\t\ttactic = Tactics.allD(univ, \"x\", null);\n\t\ttactic.apply(proofTree.getRoot(), null);\n\t\tcheckProofTreeSerialization(proof, proofTree, true);\n\t\tproofTree.getRoot().pruneChildren();\n\n\t\t// Apply AllD with a partial instantiation (only \"b\")\n\t\ttactic = Tactics.allD(univ, null, \"y\");\n\t\ttactic.apply(proofTree.getRoot(), null);\n\t\tcheckProofTreeSerialization(proof, proofTree, true);\n\t\tproofTree.getRoot().pruneChildren();\n\t}",
"Reproducible newInstance();",
"public interface IKataSolution\n extends IKataCommonSolution {\n\n public enum ACTION {\n TURN_LEFT, TURN_RIGHT, FORWARD, STAY\n }\n\n public enum ORIENTATION {\n UP (270), DOWN(90), LEFT(0), RIGHT(180);\n public int angle;\n ORIENTATION (int _angle) {\n angle = _angle;\n }\n public ORIENTATION moveLeft () {\n switch (this) {\n case UP: return LEFT;\n case DOWN: return RIGHT;\n case LEFT: return DOWN;\n case RIGHT: return UP;\n }\n return this;\n }\n public ORIENTATION moveRight () {\n switch (this) {\n case UP: return RIGHT;\n case DOWN: return LEFT;\n case LEFT: return UP;\n case RIGHT: return DOWN;\n }\n return this;\n }\n }\n\n public enum ITEM {\n EMPTY, PLANT, ANIMAL, END\n }\n\n public abstract class Animal {\n /**\n * Number of plants the animal ate\n */\n public int points;\n /**\n * Method to react to changing environmental conditions\n *\n * @param orientation animal's current orientation\n * @param view item currently in front of animal\n * @return action to do\n */\n public abstract ACTION react (ORIENTATION orientation, ITEM view);\n }\n\n /**\n * Factory method for an animal\n *\n * @param count count of animals to create\n * @param lastGeneration array of 'Animal' from last generation\n * @return array of 'Animal' instances\n */\n public abstract Animal[] createGeneration (int count, Animal[] lastGeneration);\n\n /**\n * If true, last generation will be visualized\n */\n public boolean visualizeLastGeneration ();\n\n /**\n * Defines how many generations of evolution should be tested\n * (minimum is 100, maximum is 10000)\n *\n * @return count of generations to test\n */\n public int countOfGenerations ();\n}",
"private PerfectSquares() {\n register(new Solution1());\n register(new Solution2());\n register(new Solution3());\n register(new Solution4());\n register(new Solution5());\n register(new Solution6());\n register(new Solution7());\n }",
"public void train() {\n\t\tfor (Instance ins : arrTrainInstances) {\n\t\t\tif (ins.scorePmi_E1E2 > largestPMI)\n\t\t\t\tlargestPMI = ins.scorePmi_E1E2;\n\t\t}\n\t\tSystem.out.println(\"Largest PMI: \" + largestPMI);\n\n\t\tfor (Instance ins : arrTrainInstances) {\n\t\t\tins.scorePmi_E1E2 = ins.scorePmi_E1E2 / largestPMI;\n\t\t}\n\n\t\tfor (Instance ins : arrTestInstances) {\n\t\t\tins.scorePmi_E1E2 = ins.scorePmi_E1E2 / largestPMI;\n\t\t}\n\n\t\tint sizeD0 = arrD0.size();\n\t\tint sizeD1 = arrD1.size();\n\t\tint sizeD2 = arrD2.size();\n\t\tint sizeD3 = arrD3.size();\n\n\t\tint sizeMin = Math.min(sizeD0, Math.min(sizeD1, Math\n\t\t\t\t.min(sizeD2, sizeD3)));\n\t\tSystem.out.println(\"sizeMin=\" + sizeMin);\n\n\t\tint n = instanceNums.length;\n\n\t\tboolean flag = false;\n\n\t\tint count = 0;\n\n\t\tfor (int i = 0; i < n; i++) {\n\n\t\t\tint k = instanceNums[i];\n\n\t\t\tif (k > sizeMin) {\n\t\t\t\tk = sizeMin;\n\t\t\t\tinstanceNums[i] = k;\n\t\t\t\tflag = true;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"\\nk=\" + k);\n\n\t\t\tArrayList<Instance> arrSub0 = getInstances(arrD0, k);\n\t\t\tArrayList<Instance> arrSub1 = getInstances(arrD1, k);\n\t\t\tArrayList<Instance> arrSub2 = getInstances(arrD2, k);\n\t\t\tArrayList<Instance> arrSub3 = getInstances(arrD3, k);\n\n\t\t\tArrayList<Instance> arrTrains = new ArrayList<Instance>();\n\t\t\tarrTrains.addAll(arrSub0);\n\t\t\tarrTrains.addAll(arrSub1);\n\t\t\tarrTrains.addAll(arrSub2);\n\t\t\tarrTrains.addAll(arrSub3);\n\t\t\tCollections.shuffle(arrTrains);\n\n\t\t\tSystem.out.println(\"Training size: \" + arrTrains.size());\n\n\t\t\ttrain(arrTrains);\n\n\t\t\tdouble acc = test();\n\t\t\tacc = test();\n\n\t\t\taccuracies[i] = acc;\n\n\t\t\tcount++;\n\n\t\t\tif (flag == true)\n\t\t\t\tbreak;\n\n\t\t}\n\n\t\tfor (int i = 0; i < count; i++) {\n\t\t\tSystem.out.print(\" | \" + \"K=\" + instanceNums[i]);\n\t\t}\n\t\tSystem.out.println();\n\n\t\tfor (int i = 0; i < count; i++) {\n\n\t\t\tDecimalFormat df = new DecimalFormat(\"#.####\");\n\t\t\tString res = df.format(accuracies[i]);\n\t\t\tSystem.out.print(\" | \" + res);\n\t\t}\n\t\tSystem.out.println();\n\t}",
"@Test(timeout = 4000)\n public void test27() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n double[] doubleArray0 = new double[1];\n SparseInstance sparseInstance0 = new SparseInstance(5.0, doubleArray0);\n try { \n naiveBayesMultinomialText0.distributionForInstance(sparseInstance0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // DenseInstance doesn't have access to a dataset!\n //\n verifyException(\"weka.core.AbstractInstance\", e);\n }\n }",
"public static void main(String[] args) throws IOException, ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {\n\n Class objectClass = LazyMethodSingleton.class;\n\n Constructor constructor = objectClass.getDeclaredConstructor();\n constructor.setAccessible(true);\n\n LazyMethodSingleton instance = LazyMethodSingleton.getInstance();\n LazyMethodSingleton newInstance = (LazyMethodSingleton) constructor.newInstance();\n\n// HungrySingleton instance = HungrySingleton.getInstance();\n// HungrySingleton newInstance = (HungrySingleton) constructor.newInstance();\n\n// LazyStaticInnerClassSingleton instance = LazyStaticInnerClassSingleton.getInstance();\n// LazyStaticInnerClassSingleton newInstance = (LazyStaticInnerClassSingleton) constructor.newInstance();\n\n System.out.println(instance);\n System.out.println(newInstance);\n System.out.println(instance == newInstance);\n\n\n\n\n }",
"@Test(timeout = 4000)\n public void test091() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n BinarySparseInstance binarySparseInstance0 = new BinarySparseInstance(11);\n IBk iBk0 = new IBk();\n try { \n evaluation0.evaluationForSingleInstance((Classifier) iBk0, (Instance) binarySparseInstance0, true);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // DenseInstance doesn't have access to a dataset!\n //\n verifyException(\"weka.core.AbstractInstance\", e);\n }\n }",
"public static void finalPresentationInstance() {\n\t\tProblem p = Parser\n\t\t\t\t.parseInstance(\"/Users/thieboutdewitte/Documents/Kulak/Bach2/GegevensstructEnAlg/Project/Implementation/JobShopScheduling/TestInstanceDewitte.txt\");\n\t\tSystem.out.println(p);\n\t\tSolution s = TabuSearch.getInitialSolution(p);\n\t\tSystem.out.println(s);\n\t\tSolution optS = TabuSearch.tabuSearch(p);\n\t\tSystem.out.println(optS);\n\t}",
"@Override\n\tpublic void visit(Instanceof n) {\n\t\t\n\t}",
"abstract String classify(Instance inst);",
"public AncientEgyptianMultiplication( ) {\r\n }",
"@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }",
"@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }",
"public Naive() {\n\n }",
"@Test(timeout = 4000)\n public void test22() throws Throwable {\n Discretize discretize0 = new Discretize(\"If set to true< equal-frequency binning will be used instead of equal-wi~th binnwng.\");\n discretize0.setIgnoreClass(true);\n discretize0.getOptions();\n System.setCurrentTimeMillis(2L);\n int[] intArray0 = new int[7];\n intArray0[0] = 7;\n intArray0[1] = (-2122219132);\n intArray0[2] = (-3985);\n intArray0[3] = 6;\n intArray0[4] = 19;\n intArray0[5] = (-3677);\n intArray0[6] = 4080;\n BinarySparseInstance binarySparseInstance0 = new BinarySparseInstance(0.0, intArray0, 445);\n SparseInstance sparseInstance0 = new SparseInstance((SparseInstance) binarySparseInstance0);\n // Undeclared exception!\n try { \n discretize0.convertInstance(sparseInstance0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test058() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n BinarySparseInstance binarySparseInstance0 = new BinarySparseInstance(1752);\n double[] doubleArray0 = new double[9];\n try { \n evaluation0.evaluateModelOnce(doubleArray0, (Instance) binarySparseInstance0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // DenseInstance doesn't have access to a dataset!\n //\n verifyException(\"weka.core.AbstractInstance\", e);\n }\n }",
"@Test\n\tpublic void testPublicInstanceVars() {\n\t\tip = new ImagePlus();\n\t\tassertFalse(ip.changes);\n\t\t/* OBSOLETE\n\t\tassertEquals(1.0,ip.pixelHeight,0.0);\n\t\tassertEquals(1.0,ip.pixelWidth,0.0);\n\t\tassertEquals(\"pixel\",ip.unit);\n\t\tassertEquals(\"pixel\",ip.units);\n\t\tassertFalse(ip.sCalibrated);\n\t\t*/\n\t}",
"@Override\n protected void inputObjects() {\n alpha1 = Utils.computeRandomNumber(Modulus, sp);\n alpha2 = Utils.computeRandomNumber(Modulus, sp);\n gamma = Utils.computeRandomNumber(Modulus, sp);\n gammaTilde = Utils.computeRandomNumber(Modulus, sp);\n\n capC = g2.modPow(gamma, Modulus);\n capCTilde = g2.modPow(gammaTilde, Modulus);\n\n beta1 = alpha1.multiply(x);\n beta2 = alpha2.multiply(x);\n BigInteger capU1 = t_i.modPow(alpha1, Modulus).multiply(b_i.modPow(beta1.negate(), Modulus))\n .mod(Modulus);\n BigInteger capU2 = g1.modPow(alpha1, Modulus).multiply(g2.modPow(alpha2, Modulus)).mod(Modulus);\n\n objects.put(\"tInverse\", t.modInverse(Modulus));\n objects.put(\"b\", b);\n objects.put(\"g1\", g1);\n objects.put(\"g2\", g2);\n objects.put(\"U1Inverse\", capU1.modInverse(Modulus));\n objects.put(\"U2Inverse\", capU2.modInverse(Modulus));\n objects.put(\"CInverse\", capC.modInverse(Modulus));\n objects.put(\"CTildeInverse\", capCTilde.modInverse(Modulus));\n objects.put(\"t_i\", t_i);\n objects.put(\"b_iInverse\", b_i.modInverse(Modulus));\n }",
"@Test(timeout = 4000)\n public void test06() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[] doubleArray0 = new double[0];\n int[] intArray0 = new int[4];\n intArray0[0] = 2749;\n intArray0[1] = (-2);\n intArray0[2] = 0;\n intArray0[3] = 0;\n SparseInstance sparseInstance0 = new SparseInstance((-40.152), doubleArray0, intArray0, 919);\n // Undeclared exception!\n try { \n discretize0.input(sparseInstance0);\n fail(\"Expecting exception: IllegalStateException\");\n \n } catch(IllegalStateException e) {\n //\n // No input instance format defined\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }",
"public void solution() {\n\t\t\n\t}",
"@Test public void test_4() throws Exception {\n yetihelper.Helper v76=new yetihelper.Helper(); // time:1355223203509\n int v77=-2147483647; // time:1355223203509\n java.lang.Integer v78=v76.dummyInteger((int)v77); // time:1355223203509\n material.Square v79=new material.Square((java.lang.Integer)v78,(java.lang.Integer)v78); // time:1355223203509\n java.lang.Integer v80=v79.getRow(); // time:1355223203509\n material.Square v286=new material.Square((java.lang.Integer)v80,(java.lang.Integer)null); // time:1355223203642\n int v2252=v286.hashCode();\n /**BUG FOUND: RUNTIME EXCEPTION**/ // time:1355223207190\n /**YETI EXCEPTION - START \n java.lang.NullPointerException\n \tat material.Square.hashCode(Square.java:49)\n YETI EXCEPTION - END**/ \n /** original locs: 4674 minimal locs: 7**/\n \n }",
"public static void main(String[] args){\n\n System.out.println(\"====Testing CannibalProblem class====\");\n\n CannibalProblem cp = new CannibalProblem(3,3,1,0,0,0); // start: (3,3,1)\n CannibalProblem cp2 = new CannibalProblem(3,3,1,0,0,0); // start (3,2,1)\n System.out.println(cp.startNode);\n System.out.println(cp.startNode.getDepth());\n System.out.println(cp.startNode.hashCode());\n\n System.out.println(cp.startNode.equals(cp.startNode));\n System.out.println(cp.startNode.equals(cp2.startNode));\n\n System.out.println(cp.startNode.goalTest());\n System.out.println(cp.startNode.getSuccessors().get(2).getSuccessors());\n\n }",
"@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }",
"@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }",
"public void trainOnInstance(Instance inst) {\n\t\t\t\t\t\t\n\t\t\ttry{\t\t\t\t\n\t\t\t\tinstancesSeen++;\n\t\t\t\tupdateStats(inst);\n\t\t\t\t\n\t\t\t\tDoubleVector normaliezedExtendedInstance = PrepareExtendedFeatureVector(inst) ;\n\t\t\t\tdouble normaliezedTargetValue= NormalizeTarget(inst) ;\n\t\t\t\tResultSummary resultSummary = getMemberships (normaliezedExtendedInstance,normaliezedTargetValue) ;\n\t\t\t\t\n\t\t\t\tdouble error = resultSummary.getNormaliezedTargetValue() - resultSummary.getFinalPrediction() ;\n\t\t\t\tthis.CurModSSE += Math.pow(error, 2) ;\n\t\t\t\t\n\t\t\t\t// checking a possible drift\n//\t\t\t\tboolean drift =checkChangeDetection() ;\n//\t\t\t\tif (drift)\n//\t\t\t\t\tthis.countChangeDetected++ ;\n\t\t\t\tboolean drift = false ;\n\t\t\t\tif ((this.instancesSeen % graceperiod)==0){\n\t\t\t\t\tdrift =checkChangeDetection() ;\n\t\t\t\t\tif (drift){\n\t\t\t\t\t\tthis.countChangeDetected++ ;\n//\t\t\t\t\t\tthis.clearAllStats();\n\t\t\t\t\t\tthis.currentValidCandidates.clear() ;\n\t\t\t\t\t\tthis.currentNonReadyCandidates.clear() ;\n\t\t\t\t\t\tcurrentSystemVersion++ ;\n\t\t\t\t\t\tSystem.out.println(\"########After a drift################\");\n\t\t\t\t\t\tSystem.out.println(this);\n\t\t\t\t\t\tSystem.out.println(\"########################\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n// \t\tVarianceRationREduction\n\t\t\t\tif (learningCriteriaOption.getChosenIndex()==1) {\n\t\t\t\t\t// checking a possible extension\n//\t\t\t\t\tif (this.instancesSeen > graceperiod && !drift ) {\n\t\t\t\t\tif (!drift ) {\n\t\t\t\t\t\tboolean systemChanged = false ;\n\t\t\t\t\t\tVector <RuleVR> removeRules= new Vector<RuleVR>() ;\n\t\t\t\t\t\tVector <RuleVR> newRules= new Vector<RuleVR>() ;\n\t\t\t\t\t\tfor (FuzzyRule rule : rs){\n\t\t\t\t\t\t\tVector <RuleVR> expansions = ((RuleVR)rule).tryToExpand(confidence, tau) ;\n\t\t\t\t\t\t\tif (expansions != null) {\n\t\t\t\t\t\t\t\tsystemChanged = true ;\n\t\t\t\t\t\t\t\tif (chooseSingleRuleOption.isSet()) {\n\t\t\t\t\t\t\t\t\tif (expansions.get(0).getInitialMerit() > expansions.get(1).getInitialMerit()) {\n\t\t\t\t\t\t\t\t\t\tnewRules.add(expansions.get(0)) ;\n\t\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\t\tnewRules.add(expansions.get(1)) ;\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (rule !=defaultRule)\n\t\t\t\t\t\t\t\t\t\tremoveRules.add((RuleVR)rule) ;\n\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\tremoveRules.add((RuleVR)rule) ;\n\t\t\t\t\t\t\t\t\tnewRules.addAll(expansions) ;\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\tif (systemChanged) {\n\t\t\t\t\t\t\trs.removeAll(removeRules) ;\n\t\t\t\t\t\t\trs.addAll(newRules) ;\n\t\t\t\t\t\t\tthis.clearAllStats();\n\t\t\t\t\t\t\tcurrentSystemVersion++ ;\n\t\t\t\t\t\t\tSystem.out.println(\"########################\");\n\t\t\t\t\t\t\tSystem.out.println(this);\n\t\t\t\t\t\t\tSystem.out.println(\"########################\");\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}//RMSEReduction\n\t\t\t\telse{\n\t\t\t\t\t// checking a possible extension\n\t\t\t\t\tif (this.instancesSeen > graceperiod && !drift ) {\n\t\t\t\t\t\tExtendedCandidateErrR bestExtension = this.checkValidExpansion();\n\t\t\t\t\t\tif ((bestExtension != null)) {\n\t\t\t\t\t\t\tif (chooseSingleRuleOption.isSet()) {\n\t\t\n\t\t\t\t\t\t\t\tVector<RuleErrR> newRules = bestExtension.CreateRuleFromExtension() ;\n\t\t\t\t\t\t\t\tif (bestExtension.getParentRule()!=defaultRule)\n\t\t\t\t\t\t\t\t\trs.remove(bestExtension.getParentRule()) ;\n\t\t\t\t\t\t\t\t\n\t\t//\t\t\t\t\t\tWe must choose the best candidate here!\n\t\t\t\t\t\t\t\tdouble [] SSESingleExtenstions = bestExtension.getMeanSSESingleExension() ;\n\t\t\t\t\t\t\t\tif (SSESingleExtenstions[0]<SSESingleExtenstions[1])\n\t\t\t\t\t\t\t\t\trs.add(newRules.get(0)) ;\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\trs.add(newRules.get(1)) ;\t\n\t\t\t\t\t\t\t\t\t\n\t\t//\t\t\t\t\t\trs.addAll(newRules) ;\n\t\t\t\t\t\t\t\tif (bestExtension.getParentRule()==defaultRule)\n\t\t\t\t\t\t\t\t\tdefaultRule.buildExtendedCandidates(bestExtension.getAttributeIndex());\n\t\t\n\t\t\t\t\t\t\t\tthis.clearAllStats();\n\t\t\t\t\t\t\t\tthis.currentValidCandidates.clear() ;\n\t\t\t\t\t\t\t\tthis.currentNonReadyCandidates.clear() ;\n\t\t\t\t\t\t\t\tcurrentSystemVersion++ ;\n\t\t\t\t\t\t\t\tSystem.out.println(\"########################\");\n\t\t\t\t\t\t\t\tSystem.out.println(this);\n\t\t\t\t\t\t\t\tSystem.out.println(\"########################\");\t\t\t\t\t\t\n\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tExtendedCandidateErrR cbestExtension = this.checkValidExpansion();\n\n\t\t\t\t\t\t\t\tVector<RuleErrR> newRules = bestExtension.CreateRuleFromExtension() ;\n\t\t\t\t\t\t\t\trs.remove(bestExtension.getParentRule()) ;\n\t\t\t\t\t\t\t\trs.addAll(newRules) ;\n\t\t\t\t\t\t\t\tthis.clearAllStats();\n\t\t\t\t\t\t\t\tthis.currentValidCandidates.clear() ;\n\t\t\t\t\t\t\t\tthis.currentNonReadyCandidates.clear() ;\n\t\t\t\t\t\t\t\tcurrentSystemVersion++ ;\n\t\t\t\t\t\t\t\tSystem.out.println(\"########################\");\n\t\t\t\t\t\t\t\tSystem.out.println(this);\n\t\t\t\t\t\t\t\tSystem.out.println(\"########################\");\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t\tif (chooseSingleRuleOption.isSet()) {\n\t\t\t\t\tdouble maxMembership = 0 ;\n\t\t\t\t\tfor (ResultSummary.ResultPair resultPair: resultSummary.getResultPairs()) {\n\t\t\t\t\t\tresultPair.getRule().trainOnInstance(resultSummary, resultPair);\n\t\t\t\t\t\tmaxMembership = Math.max(maxMembership, resultPair.getMembership()) ;\n\t\t\t\t\t}\n\t\t\t\t\tif (maxMembership < max_Membership_For_Choosing_Single_Rule)\n\t\t\t\t\t\tdefaultRule.trainOnInstance(resultSummary, resultSummary.getResultPairDefaultRule()) ;\n\t\t\t\t}else{\n\t\t\t\t\tfor (ResultSummary.ResultPair resultPair: resultSummary.getResultPairs()) {\n\t\t\t\t\t\tresultPair.getRule().trainOnInstance(resultSummary, resultPair);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}catch (Exception ex){\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}",
"private int addAllInstanceEdges(Boolean makeInsertion, Instance instance, Map<Integer, Edge> instanceEdges,\n int deletions, int error, InstanceNode instanceNode, int edgeIndex, int ch,\n PatternNode patternNode, Gene[] patternGenes) {\n int curr_error = error;\n int nextEdgeIndex;\n int exact_instance_count = 0;\n\n //go over all outgoing edges\n for (Map.Entry<Integer, Edge> entry : instanceEdges.entrySet()) {\n int nextCh = entry.getKey();\n Edge nextEdge = entry.getValue();\n InstanceNode nextNode = instanceNode;\n\n if (ch == nextCh) {\n curr_error = error;\n exact_instance_count = nextEdge.getDest().getCountInstancePerGenome();\n } else {\n //Substitution - the chars are different, increment error\n curr_error = error + 1;\n }\n\n //The label contains only 1 char, go to next instanceNode\n if (nextEdge.getLabel().getLength() == 1) {\n nextNode = nextEdge.getDest();\n nextEdge = null;\n nextEdgeIndex = -1;\n } else {//label contains more the 1 char, increment edgeIndex\n nextEdgeIndex = edgeIndex + 1;\n }\n\n if (makeInsertion) {\n if (ch != nextCh) {\n int minimalInstanceIndex = instance.getMinimalInstanceIndex();\n Gene gene = patternGenes[minimalInstanceIndex];\n //Gene instanceGene = gi.getLetter(nextCh);\n if (gi.getLetter(gene) == nextCh) {\n minimalInstanceIndex += 1;\n }\n\n if (minimalInstanceIndex < patternGenes.length) {\n String extendedInstanceString = \"\";\n Instance nextInstance = new Instance(nextNode, nextEdge, nextEdgeIndex, error, deletions,\n instance.getInsertions() + 1, extendedInstanceString,\n instance.getLength() + 1, minimalInstanceIndex);\n extendInstance(patternGenes, patternNode, nextInstance, ch);\n countNodesInDataTree++;\n }\n }\n } else {\n addInstanceToPattern(patternNode, instance, nextCh, nextNode, nextEdge, nextEdgeIndex, curr_error, deletions);\n }\n }\n return exact_instance_count;\n }",
"public static void main(String[] args) {\n A plain = new A(\"Water\",5.25);\n B sample0 = new B(\"Ice\",100.0,2.5); // Ice that is 2.5 units tall\n C sample1 = new C(\"Slurry\",720.6,45); // Slurry that is 45 wide\n C sample2 = new C(\"Old Slurry\",50.15,30.9); // Slurry that is 30 wide\n D sample3 = new D(\"Unknown\",13.3,41.1,\"blue\"); \n // try some methods and responses\n System.out.println(\"sample0 is\\n\" + sample0);\n System.out.println(\"\\nIs sample1 wider than sample2: \" + sample1.isWider(sample2)); \n System.out.println(\"\\nIs sample0 taller than itself: \" + sample0.isTaller(sample0)); \n System.out.println(\"\\nsample3 is\\n\" + sample3);\n sample3.changeColor(\"white\");\n sample3.addWidth(1000.0);\n sample3.addWeight(100.0);\n System.out.println(\"\\nsample3 now is\\n\" + sample3);\n }",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }",
"@Override\n\tpublic double classifyInstance(Instance arg0) throws Exception {\n\t\treturn 0;\n\t}",
"private void checkDerivedInstances() throws UnableToResolveForeignEntityException {\r\n \r\n if (currentModuleTypeInfo.isExtension()) {\r\n //don't add derived instances again for an adjunct module.\r\n return;\r\n }\r\n \r\n final ModuleName currentModuleName = currentModuleTypeInfo.getModuleName(); \r\n \r\n \r\n \r\n for (int i = 0, nTypeConstructors = currentModuleTypeInfo.getNTypeConstructors(); i < nTypeConstructors; ++i) {\r\n \r\n TypeConstructor typeCons = currentModuleTypeInfo.getNthTypeConstructor(i);\r\n \r\n //use private functions equalsInt, lessThanInt etc as the instance resolving functions for\r\n //the Eq, Ord and Enum instances of an enum type. This saves class file space and which could be quite bulky for\r\n //long enum types, since the Ord methods do case-of-cases and so have length proportional to the square of\r\n //the number of data constructors. It also saves on compilation time. Benchmarks show that there is no\r\n //runtime performance impact.\r\n final boolean useCompactEnumDerivedInstances = \r\n TypeExpr.isEnumType(typeCons) && !typeCons.getName().equals(CAL_Prelude.TypeConstructors.Boolean);\r\n \r\n //this flag is used to ensure that the fromInt toInt Helper functions\r\n //are added at most once for each instance type\r\n boolean addedIntHelpers = false;\r\n \r\n for (int j = 0, nDerivedInstances = typeCons.getNDerivedInstances(); j < nDerivedInstances; ++j) {\r\n \r\n QualifiedName typeClassName = typeCons.getDerivingClauseTypeClassName(j);\r\n TypeClass typeClass = currentModuleTypeInfo.getVisibleTypeClass(typeClassName);\r\n final SourceRange declarationPosition = typeCons.getDerivingClauseTypeClassPosition(j);\r\n \r\n //If the type is T a b c, then the instance type for type class C will be \r\n //(C a, C b, C c) => T a b c\r\n TypeConsApp instanceType = makeInstanceType(typeCons, typeClass); \r\n \r\n ClassInstance classInstance;\r\n \r\n //make sure the toInt fromInt helpers are added if the \r\n //class needs them\r\n if (!addedIntHelpers && \r\n (typeClassName.equals(CAL_Prelude.TypeClasses.Enum) ||\r\n typeClassName.equals(CAL_Prelude.TypeClasses.IntEnum) ||\r\n typeClassName.equals(CAL_QuickCheck.TypeClasses.Arbitrary))) {\r\n\r\n TypeExpr intType = compiler.getTypeChecker().getTypeConstants().getIntType();\r\n TypeExpr fromIntHelperTypeExpr = TypeExpr.makeFunType(intType, instanceType);\r\n TypeExpr toIntHelperTypeExpr = TypeExpr.makeFunType(instanceType, intType);\r\n \r\n addDerivedInstanceFunction(derivedInstanceFunctionGenerator.makeFromIntHelper(typeCons), fromIntHelperTypeExpr, declarationPosition);\r\n addDerivedInstanceFunction(derivedInstanceFunctionGenerator.makeToIntHelper(typeCons), toIntHelperTypeExpr, declarationPosition);\r\n\r\n addedIntHelpers = true;\r\n }\r\n \r\n \r\n //add the definitions of the instance functions \r\n if (typeClassName.equals(CAL_Prelude.TypeClasses.Eq)) {\r\n \r\n classInstance = checkDerivedEqInstance(typeCons, instanceType, typeClass, useCompactEnumDerivedInstances, declarationPosition); \r\n \r\n } else if (typeClassName.equals(CAL_Prelude.TypeClasses.Ord)) {\r\n \r\n classInstance = checkDerivedOrdInstance(typeCons, instanceType, typeClass, useCompactEnumDerivedInstances, declarationPosition); \r\n\r\n } else if (typeClassName.equals(CAL_Prelude.TypeClasses.Bounded)) {\r\n \r\n addDerivedInstanceFunction(derivedInstanceFunctionGenerator.makeMinBoundInstanceFunction(typeCons), instanceType, declarationPosition);\r\n addDerivedInstanceFunction(derivedInstanceFunctionGenerator.makeMaxBoundInstanceFunction(typeCons), instanceType, declarationPosition);\r\n \r\n classInstance = new ClassInstance(currentModuleName, instanceType, typeClass, null, ClassInstance.InstanceStyle.DERIVING);\r\n \r\n } else if (typeClassName.equals(CAL_Prelude.TypeClasses.Enum)) { \r\n \r\n TypeExpr listTypeExpr = compiler.getTypeChecker().getTypeConstants().makeListType(instanceType);\r\n TypeExpr intType = compiler.getTypeChecker().getTypeConstants().getIntType();\r\n TypeExpr upFromTypeExpr = TypeExpr.makeFunType(instanceType, listTypeExpr);\r\n TypeExpr upFromThenTypeExpr = TypeExpr.makeFunType(instanceType, upFromTypeExpr);\r\n TypeExpr upFromThenToTypeExpr = TypeExpr.makeFunType(instanceType, upFromThenTypeExpr);\r\n \r\n TypeExpr upFromToTypeExpr = TypeExpr.makeFunType(instanceType, upFromTypeExpr); \r\n TypeExpr upFromToHelperTypeExpr = \r\n TypeExpr.makeFunType(intType, TypeExpr.makeFunType(intType, listTypeExpr)); \r\n \r\n TypeExpr upFromThenToHelperExpr =\r\n TypeExpr.makeFunType(intType, TypeExpr.makeFunType(intType, TypeExpr.makeFunType(intType, listTypeExpr)));\r\n \r\n\r\n addDerivedInstanceFunction(derivedInstanceFunctionGenerator.makeUpFromToHelper(typeCons), \r\n upFromToHelperTypeExpr, declarationPosition);\r\n addDerivedInstanceFunction(derivedInstanceFunctionGenerator.makeUpFromThenToHelperUp(typeCons), \r\n upFromThenToHelperExpr, declarationPosition);\r\n addDerivedInstanceFunction(derivedInstanceFunctionGenerator.makeUpFromThenToHelperDown(typeCons), \r\n upFromThenToHelperExpr, declarationPosition);\r\n \r\n addDerivedInstanceFunction(derivedInstanceFunctionGenerator.makeEnumUpFromThenInstanceFunction(typeCons), \r\n upFromThenTypeExpr, declarationPosition);\r\n addDerivedInstanceFunction(derivedInstanceFunctionGenerator.makeEnumUpFromThenToInstanceFunction(typeCons), \r\n upFromThenToTypeExpr, declarationPosition);\r\n \r\n addDerivedInstanceFunction(derivedInstanceFunctionGenerator.makeEnumUpFromToInstanceFunction(typeCons), \r\n upFromToTypeExpr, declarationPosition);\r\n addDerivedInstanceFunction(derivedInstanceFunctionGenerator.makeEnumUpFromInstanceFunction(typeCons), \r\n upFromTypeExpr, declarationPosition);\r\n \r\n classInstance = new ClassInstance(currentModuleName, instanceType, typeClass, \r\n new QualifiedName[] {\r\n ClassInstance.makeInternalInstanceMethodName(CAL_Prelude.Functions.upFrom.getUnqualifiedName(), typeCons.getName()),\r\n ClassInstance.makeInternalInstanceMethodName(CAL_Prelude.Functions.upFromThen.getUnqualifiedName(), typeCons.getName()),\r\n ClassInstance.makeInternalInstanceMethodName(CAL_Prelude.Functions.upFromTo.getUnqualifiedName(), typeCons.getName()),\r\n ClassInstance.makeInternalInstanceMethodName(CAL_Prelude.Functions.upFromThenTo.getUnqualifiedName(), typeCons.getName())\r\n }, \r\n ClassInstance.InstanceStyle.DERIVING);\r\n \r\n } else if (typeClassName.equals(CAL_Prelude.TypeClasses.Outputable)) {\r\n \r\n classInstance = checkDerivedOutputableInstance(typeCons, instanceType, typeClass, declarationPosition);\r\n \r\n } else if (typeClassName.equals(CAL_Prelude.TypeClasses.Inputable)) {\r\n \r\n if(typeCons.getNDataConstructors() > 0) {\r\n TypeExpr jObjectTypeExpr = TypeExpr.makeNonParametricType(currentModuleTypeInfo.getVisibleTypeConstructor(CAL_Prelude.TypeConstructors.JObject));\r\n TypeExpr inputTypeExpr = TypeExpr.makeFunType(jObjectTypeExpr, instanceType);\r\n addDerivedInstanceFunction(derivedInstanceFunctionGenerator.makeAlgebraicInputInstanceMethod(typeCons), inputTypeExpr, declarationPosition);\r\n\r\n classInstance = new ClassInstance(currentModuleName, instanceType, typeClass, null, ClassInstance.InstanceStyle.DERIVING);\r\n \r\n } else {\r\n //will be a foreign type (and not a built-in type or type defined by an algebraic data declaration).\r\n //Unlike any of the other derived instances, the class methods for the derived Inputable class are\r\n //added late in the ExpressionGenerator. This is because \r\n //a) there is a distinct method for each foreign object type (it must do a cast, and that cast is type specific.\r\n //b) there is no direct way to represent the cast in CAL (although derived Inputable and Outputable instances can\r\n // be used to do the job, once this feature is in place!)\r\n \r\n classInstance = new ClassInstance(currentModuleName, instanceType, typeClass, null, ClassInstance.InstanceStyle.DERIVING);\r\n }\r\n \r\n } else if (typeClassName.equals(CAL_Debug.TypeClasses.Show)) {\r\n \r\n classInstance = checkDerivedShowInstance(typeCons, instanceType, typeClass, declarationPosition); \r\n \r\n } else if (typeClassName.equals(CAL_QuickCheck.TypeClasses.Arbitrary)) {\r\n \r\n if (typeCons.getForeignTypeInfo() != null) {\r\n throw new IllegalStateException(\"Arbitrary instances cannot be derived for foreign types\"); \r\n }\r\n \r\n //this type represents a Gen for the current instance type.\r\n TypeExpr genInstanceType =\r\n new TypeConsApp(\r\n currentModuleTypeInfo.getVisibleTypeConstructor(CAL_QuickCheck.TypeConstructors.Gen),\r\n new TypeExpr [] {instanceType}); \r\n \r\n //this type represents the type (Gen a)\r\n TypeExpr genAType =\r\n new TypeConsApp(\r\n currentModuleTypeInfo.getVisibleTypeConstructor(CAL_QuickCheck.TypeConstructors.Gen),\r\n new TypeExpr [] {TypeExpr.makeParametricType()} ); \r\n\r\n TypeExpr coarbitraryFunctionType = TypeExpr.makeFunType(instanceType, TypeExpr.makeFunType(genAType, genAType)); \r\n \r\n addDerivedInstanceFunction(derivedInstanceFunctionGenerator.makeArbitraryFunction(typeCons), genInstanceType, declarationPosition);\r\n addDerivedInstanceFunction(derivedInstanceFunctionGenerator.makeCoArbitraryFunction(typeCons), coarbitraryFunctionType, declarationPosition);\r\n \r\n classInstance = new ClassInstance(currentModuleName, instanceType, typeClass, \r\n new QualifiedName[] {\r\n ClassInstance.makeInternalInstanceMethodName(\"arbitrary\", typeCons.getName()),\r\n ClassInstance.makeInternalInstanceMethodName(\"coarbitrary\", typeCons.getName()),\r\n CAL_QuickCheck_internal.Functions.generateInstanceDefault\r\n }, \r\n InstanceStyle.DERIVING);\r\n \r\n \r\n } else if (typeClassName.equals(CAL_Prelude.TypeClasses.IntEnum)) {\r\n \r\n // algebraic types (only enumeration types are permitted; the DerivedInstanceFunctionGenerator methods will check that)\r\n if(typeCons.getForeignTypeInfo() != null) {\r\n throw new IllegalStateException(\"IntEnum instances cannot be derived for foreign types\"); \r\n }\r\n \r\n TypeExpr maybeTypeExpr = \r\n new TypeConsApp(\r\n currentModuleTypeInfo.getVisibleTypeConstructor(CAL_Prelude.TypeConstructors.Maybe),\r\n new TypeExpr[] {instanceType});\r\n\r\n TypeExpr intType = compiler.getTypeChecker().getTypeConstants().getIntType();\r\n TypeExpr intToEnumTypeExpr = TypeExpr.makeFunType(intType, instanceType);\r\n TypeExpr intToEnumCheckedTypeExpr = TypeExpr.makeFunType(intType, maybeTypeExpr);\r\n\r\n addDerivedInstanceFunction(derivedInstanceFunctionGenerator.makeEnumIntToEnumFunction(typeCons), intToEnumTypeExpr, declarationPosition);\r\n addDerivedInstanceFunction(derivedInstanceFunctionGenerator.makeEnumIntToEnumCheckedFunction(typeCons), intToEnumCheckedTypeExpr, declarationPosition);\r\n \r\n classInstance = new ClassInstance(currentModuleName, instanceType, typeClass, \r\n new QualifiedName[] {\r\n ClassInstance.makeInternalInstanceMethodName(\"intToEnum\", typeCons.getName()),\r\n ClassInstance.makeInternalInstanceMethodName(\"intToEnumChecked\", typeCons.getName()),\r\n ClassInstance.makeInternalInstanceMethodName(\"toIntHelper\", typeCons.getName())}, \r\n InstanceStyle.DERIVING);\r\n \r\n } else {\r\n // static checks in DataDeclarationChecker will have logged an error message for classes that we cannot\r\n // derive an instance for, so this exception won't be shown to the user as an internal coding error (although it\r\n // will cause further compilation to halt with \"unable to recover from previous compilation errors\").\r\n throw new IllegalStateException(\"Invalid deriving type class.\");\r\n }\r\n \r\n currentModuleTypeInfo.addClassInstance(classInstance); \r\n } \r\n } \r\n }",
"@Test(timeout = 4000)\n public void test22() throws Throwable {\n Discretize discretize0 = new Discretize(\"^yH*TVC#\\\"|tm,k2XpGN\");\n String[] stringArray0 = new String[2];\n int[] intArray0 = new int[7];\n intArray0[0] = 89;\n intArray0[2] = 89;\n discretize0.useEqualFrequencyTipText();\n boolean boolean0 = discretize0.m_MakeBinary;\n BinarySparseInstance binarySparseInstance0 = new BinarySparseInstance(2269);\n FileSystemHandling.shouldAllThrowIOExceptions();\n SparseInstance sparseInstance0 = new SparseInstance((SparseInstance) binarySparseInstance0);\n BinarySparseInstance binarySparseInstance1 = new BinarySparseInstance((Instance) binarySparseInstance0);\n int int0 = 3872;\n // Undeclared exception!\n try { \n binarySparseInstance1.toStringNoWeight(89);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.SparseInstance\", e);\n }\n }",
"private void generalise(Instance inst) throws Exception {\n\n if(m_ClassValue != inst.classValue())\n\tthrow new Exception(\"Exemplar.generalise : Incompatible instance's class.\");\n\n add(inst);\n\n /* extends each range in order to cover inst */\n for(int i = 0; i < numAttributes(); i++){\n\t \n\tif(inst.isMissing(i))\n\t throw new Exception(\"Exemplar.generalise : Generalisation with missing feature impossible.\");\n\n\tif(i == classIndex())\n\t continue;\n\t \n\tif(attribute(i).isNumeric()){\n\t if(m_MaxBorder[i] < inst.value(i)) \n\t m_MaxBorder[i] = inst.value(i);\n\t if(inst.value(i) < m_MinBorder[i]) \n\t m_MinBorder[i] = inst.value(i); \n\t\t\n\t} else {\n\t m_Range[i][(int) inst.value(i)] = true;\n\t}\n }\n }",
"public abstract void mo2624j();",
"@Test(timeout = 4000)\n public void test066() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n double[] doubleArray0 = new double[1];\n DenseInstance denseInstance0 = new DenseInstance(119.4494703242, doubleArray0);\n instances0.add((Instance) denseInstance0);\n Evaluation evaluation0 = null;\n try {\n evaluation0 = new Evaluation(instances0);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }",
"@Test public void test_3() throws Exception {\n yetihelper.Helper v76=new yetihelper.Helper(); // time:1355223203509\n int v77=-2147483647; // time:1355223203509\n java.lang.Integer v78=v76.dummyInteger((int)v77); // time:1355223203509\n material.Square v79=new material.Square((java.lang.Integer)v78,(java.lang.Integer)v78); // time:1355223203509\n java.lang.Integer v80=v79.getRow(); // time:1355223203509\n material.Square v286=new material.Square((java.lang.Integer)v80,(java.lang.Integer)null); // time:1355223203642\n material.Board v313=new material.Board(); // time:1355223203665\n material.Piece v321=v313.getSquare((material.Square)v286);\n /**BUG FOUND: RUNTIME EXCEPTION**/ // time:1355223203669\n /**YETI EXCEPTION - START \n java.lang.NullPointerException\n \tat material.Square.hashCode(Square.java:49)\n \tat java.util.HashMap.get(Unknown Source)\n \tat material.Board.getSquare(Board.java:64)\n YETI EXCEPTION - END**/ \n /** original locs: 1384 minimal locs: 8**/\n \n }",
"@Test(timeout = 4000)\n public void test74() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n double[] doubleArray0 = new double[0];\n SparseInstance sparseInstance0 = new SparseInstance(0.0, doubleArray0);\n try { \n naiveBayesMultinomialText0.updateClassifier(sparseInstance0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // DenseInstance doesn't have access to a dataset!\n //\n verifyException(\"weka.core.AbstractInstance\", e);\n }\n }",
"@RepeatedTest(20)\n void subTest(){\n assertEquals(f.sub(f), new Float(decimal-decimal));\n assertEquals(f.sub(g), new Float(decimal-random));\n assertEquals(f.sub(i), new Float(decimal-seed));\n assertEquals(f.sub(bi), new Float(decimal-bi.toInt(bi.getBinary())));\n assertEquals(i.sub(f), new Float(seed-decimal));\n assertEquals(i.sub(i), new Int(seed-seed));\n assertEquals(i.sub(bi), new Int(seed-bi.toInt(bi.getBinary())));\n\n //nulls\n //Bool - ITypes\n assertEquals(bot.sub(st),Null);\n assertEquals(bof.sub(st),Null);\n assertEquals(bot.sub(bot),Null);\n assertEquals(bof.sub(bot), Null);\n assertEquals(bot.sub(f), Null);\n assertEquals(bof.sub(i), Null);\n assertEquals(bot.sub(bi), Null);\n //Float - ITypes \\ {Numbers}\n assertEquals(f.sub(st), Null);\n assertEquals(f.sub(bot), Null);\n assertEquals(f.sub(bof), Null);\n //Int - ITypes \\ {Numbers}\n assertEquals(i.sub(st), Null);\n assertEquals(i.sub(bot),Null);\n assertEquals(i.sub(bof), Null);\n //Binary - ITypes \\ {Int, Binary}\n assertEquals(bi.sub(st), Null);\n assertEquals(bi.sub(bot), Null);\n assertEquals(bi.sub(f), Null);\n //NullType subtractions\n assertEquals(Null.sub(st), Null);\n assertEquals(Null.sub(bof), Null);\n assertEquals(Null.sub(f), Null);\n assertEquals(Null.sub(i), Null);\n assertEquals(Null.sub(bi), Null);\n assertEquals(Null.sub(Null), Null);\n assertEquals(st.sub(Null), Null);\n assertEquals(bot.sub(Null), Null);\n assertEquals(f.sub(Null), Null);\n assertEquals(i.sub(Null), Null);\n assertEquals(bi.sub(Null), Null);\n }",
"@Test(timeout = 4000)\n public void test000() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"]!pZ174<n,\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[8];\n doubleArray0[0] = (double) (-2);\n doubleArray0[1] = (double) (-2);\n doubleArray0[2] = (double) (-1);\n doubleArray0[3] = (double) (-2);\n doubleArray0[4] = (double) (-2);\n doubleArray0[5] = (double) (-1);\n doubleArray0[6] = (double) (-1);\n doubleArray0[7] = (double) (-2);\n try { \n evaluation0.evaluationForSingleInstance(doubleArray0, (Instance) null, false);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.classifiers.Evaluation\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test00() throws Throwable {\n Discretize discretize0 = new Discretize(\"Y\");\n discretize0.makeBinaryTipText();\n BinarySparseInstance binarySparseInstance0 = new BinarySparseInstance(3337);\n int int0 = 82;\n // Undeclared exception!\n try { \n binarySparseInstance0.isMissing((Attribute) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.AbstractInstance\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }",
"public static void main(String[] args){\n Object[] doubleArgs = new Object[]{4.2, 3.9};\n try {\n Class rectangleDefinition = Class.forName(\"com.interview.basics.java.Rectangle\");\n Class[] doubleArgsClass = new Class[]{double.class, double.class};\n Constructor doubleArgsConstructor = rectangleDefinition.getConstructor(doubleArgsClass);\n Rectangle rectangle = (Rectangle) doubleArgsConstructor.newInstance(doubleArgs);\n\n Method areaMethod = rectangleDefinition.getDeclaredMethod(\"area\");\n Double area = (Double) areaMethod.invoke(rectangle);\n System.out.println(area);\n\n //will get a runtime exception of java.lang.IllegalAccessException\n //only when try to invoke private method or visit a private member.\n Method doubleSizeMethod = rectangleDefinition.getDeclaredMethod(\"doubleSize\");\n doubleSizeMethod.invoke(rectangle);\n\n Field xfield = rectangleDefinition.getDeclaredField(\"x\");\n System.out.println(xfield.get(rectangle));\n\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n } catch (InvocationTargetException e) {\n e.printStackTrace();\n } catch (InstantiationException e) {\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (NoSuchFieldException e) {\n e.printStackTrace();\n }\n\n Person person = new Person(\"summer\", \"summerzhao\", \"interview,algorithm,tools\".split(\",\"));\n System.out.println(JavaDumpper.dump(person, 0));\n\n }",
"public abstract int numOfSameTypeNeighbourToReproduce();",
"public static void main(String[] args) {\n\t\tString pol1=\"1x^3+3x^2+7x^1+21x^0\";\r\n\t\tString pol2=\"1x^2+7x^0\";\r\n\t\tString adunare=\"+1x^3+4x^2+7x^1+28x^0\";\r\n\t\tString scadere=\"+1x^3+2x^2+7x^1+14x^0\";\r\n\t\tString inmultire=\"+1x^5+3x^4+14x^3+42x^2+49x^1+147x^0\";\r\n\t\tString restul=\"\";\r\n\t\tString catul=\"+1.0x^1+3.0x^0\";\r\n\t\tString derivare=\"+3x^2+6x^1+7x^0\";\r\n\t\tString integrare=\"+0.25x^4+1.0x^3+3.5x^2+21.0x^1\";\r\n\t\tPolinom p1=new Polinom();\r\n\t\tPolinom p2=new Polinom();\r\n\t\tPolinom p1copie=new Polinom();\r\n\t\ttry {\r\n\t\t\tp1=p1.crearePolinom(pol1, 3);\r\n\t\t\tp1copie=p1.crearePolinom(pol1, 3);\r\n\t\t\tp2=p2.crearePolinom(pol2, 2);\r\n\t\t} catch (IllegalInputException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\r\n\t\tPolinom p3=p1.adunarePolinom(p2, 4);\r\n\t\tString rezAdunare=p3.afisPolinomIntreg();\r\n\t\tPolinom p4=p1.scaderePolinom(p2, 4);\r\n\t\tString rezScadere=p4.afisPolinomIntreg();\r\n\t\tPolinom p5=p1.inmultirePolinom(p2, 6);\r\n\t\tString rezInmultire=p5.afisPolinomIntreg();\r\n\t\tString cat=p1.impartirePolinom(p2, 3, 2);\r\n\t\tString rest=p1copie.impartirePolinom(p2, 3, 2);\r\n\t\tPolinom p7=p1.derivarePolinom(3);\r\n\t\tString rezDerivare=p7.afisPolinomReal();\r\n\t\tPolinom p8=p1.integrarePolinom(4);\r\n\t\tString rezIntegrare=p8.afisPolinomReal();\r\n\t\t\r\n\t\tassert adunare!=rezAdunare : \"Nu se verifica adunarea!\";\r\n\t\tassert scadere!=rezScadere : \"Nu se verifica scaderea!\";\r\n\t\tassert inmultire!=rezInmultire : \"Nu se verifica inmultirea!\";\r\n\t\tassert derivare!=rezDerivare : \"Nu se verifica derivarea!\";\r\n\t\tassert integrare!=rezIntegrare : \"Nu se verifica integrarea!\";\r\n\t\tassert catul!=cat : \"Nu se verifica adunarea!\";\r\n\t\tassert restul!=rest : \"Nu se verifica adunarea!\";\r\n\t\t\r\n\t\t\r\n\t}",
"@Test(timeout = 4000)\n public void test057() 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[0];\n BinarySparseInstance binarySparseInstance0 = new BinarySparseInstance((-737.608359939284), doubleArray0);\n try { \n evaluation0.evaluationForSingleInstance(doubleArray0, binarySparseInstance0, false);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 0\n //\n verifyException(\"weka.classifiers.Evaluation\", e);\n }\n }",
"public static void main(String[] args) {\n\t\tInstanceVariable h1=new InstanceVariable();\n\t\th1.name=\"zeynep\";\n\t\th1.lastName=\"celik\";\n\t\tSystem.out.println(InstanceVariable.brain);//first way\n\t\tSystem.out.println(h1.brain);//second way\n\t\tSystem.out.println(brain);//third way\n\t\tSystem.out.println(h1.eyes+\" \"+nose+\" \"+brain);\n\t\t\n\t\t\n\t\tInstanceVariable h2=new InstanceVariable();\n\t\th2.name=\"hasan\";\n\t\th2.lastName=\"celik\";\n\t\tSystem.out.println(h2.eyes+\" \"+nose+\" \"+brain);\n\t\tInstanceVariable h3=new InstanceVariable();\n\t\th3.name=\"nili\";\n\t\th3.lastName=\"celik\";\n\t\tSystem.out.println(h3.name+h3.lastName);\n\t\tSystem.out.println(h3.eyes+\" \"+nose+\" \"+brain);\n\t\t\n\t}",
"private static void Demo4() {\n\t\tClass<?> class1 = null;\r\n\t\tPerson person1 = null;\r\n\t\tPerson person2 = null;\r\n\t\ttry {\r\n\t\t\tclass1 = Class.forName(\"CH16.Person\");\r\n\t\t\tConstructor<?>[] con = class1.getConstructors();\r\n\t\t\ttry {\r\n\t\t\t\tperson1 = (Person) con[0].newInstance(20, \"Hongten\");\r\n\t\t\t\tSystem.out.println(person1.getAge() + \";\" + person1.getName());\r\n\t\t\t\tperson2 = (Person) con[1].newInstance();\r\n\t\t\t\tperson2.setAge(100);\r\n\t\t\t\tperson2.setName(\"haha\");\r\n\t\t\t\tSystem.out.println(person2.getAge() + \";\" + person2.getName());\r\n\r\n\t\t\t} catch (InstantiationException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} catch (IllegalAccessException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} catch (IllegalArgumentException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} catch (InvocationTargetException 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} catch (ClassNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}",
"@Test(timeout = 4000)\n public void test08() throws Throwable {\n Discretize discretize0 = new Discretize(\"Incorrect Multi-Instance format, must be 'NOMINAL att, RELATIONAL att, CLASS att'!\");\n discretize0.m_UseBinNumbers = false;\n discretize0.m_IgnoreClass = true;\n discretize0.getCutPoints(0);\n discretize0.desiredWeightOfInstancesPerIntervalTipText();\n assertFalse(discretize0.getFindNumBins());\n \n discretize0.setFindNumBins(true);\n assertTrue(discretize0.getFindNumBins());\n }",
"private static void LessonInstanceVsStatic() {\n System.out.println(MathHelper.E);\n System.out.println(MathHelper.PI);\n System.out.println(MathHelper.square(5));\n //Three helper methods for StringHelper\n System.out.println(StringHelper.removeLeadingAndTrailingSpaces(\" Hello \"));\n System.out.println(StringHelper.removeAllSpace(\" He ll o !\"));\n System.out.println(StringHelper.yelling(\"hello\"));\n //Three helper methods for MathHelper\n System.out.println(MathHelper.cubed(5));\n System.out.println(MathHelper.areaOfRectangle(2,3));\n System.out.println(MathHelper.perimeterOfRectangle(4, 5));\n\n }",
"private void updateMI(Instance inst) throws Exception {\n\n if(m_NumFoldersMI < 1){\n throw new Exception(\"NNge.updateMI : incorrect number of folders ! Option I must be greater than 1.\");\n }\n\n m_MI_NumClass[(int) inst.classValue()]++;\n m_MI_NumInst++;\n\n /* for each attribute */\n for(int attrIndex = 0; attrIndex < m_Train.numAttributes(); attrIndex++){\n\n /* which is the class attribute */\n if(m_Train.classIndex() == attrIndex)\n\tcontinue;\n\n /* which is a numeric attribute */\n else if(m_Train.attribute(attrIndex).isNumeric()){\n\t\t\n\t/* if max-min have to be updated */\n\tif(Double.isNaN(m_MI_MaxArray[attrIndex]) ||\n\t Double.isNaN(m_MI_MinArray[attrIndex]) ||\n\t m_MI_MaxArray[attrIndex] < inst.value(attrIndex) || \n\t inst.value(attrIndex) < m_MI_MinArray[attrIndex]){\n\n\t /* then update them */\n\t if(Double.isNaN(m_MI_MaxArray[attrIndex])) m_MI_MaxArray[attrIndex] = inst.value(attrIndex);\n\t if(Double.isNaN(m_MI_MinArray[attrIndex])) m_MI_MinArray[attrIndex] = inst.value(attrIndex);\n\t if(m_MI_MaxArray[attrIndex] < inst.value(attrIndex)) m_MI_MaxArray[attrIndex] = inst.value(attrIndex);\n\t if(m_MI_MinArray[attrIndex] > inst.value(attrIndex)) m_MI_MinArray[attrIndex] = inst.value(attrIndex);\n\t\t \n\t /* and re-compute everything from scratch... (just for this attribute) */\n\t double delta = (m_MI_MaxArray[attrIndex] - m_MI_MinArray[attrIndex]) / (double) m_NumFoldersMI;\n\n\t /* for each interval */\n\t for(int inter = 0; inter < m_NumFoldersMI; inter++){\n\n\t m_MI_NumAttrInter[attrIndex][inter] = 0;\n\n\t /* for each class */\n\t for(int cclass = 0; cclass < m_Train.numClasses(); cclass++){\n\t\t\t \n\t m_MI_NumAttrClassInter[attrIndex][cclass][inter] = 0;\n\n\t /* count */\n\t Enumeration enu = m_Train.enumerateInstances();\n\t while(enu.hasMoreElements()){\n\t\tInstance cur = (Instance) enu.nextElement();\n\t\tif(( (m_MI_MinArray[attrIndex] + inter * delta) <= cur.value(attrIndex) ) &&\n\t\t ( cur.value(attrIndex) <= (m_MI_MinArray[attrIndex] + (inter + 1) * delta) ) &&\n\t\t ( cur.classValue() == cclass ) ){\n\t\t m_MI_NumAttrInter[attrIndex][inter]++;\n\t\t m_MI_NumAttrClassInter[attrIndex][cclass][inter]++;\n\t\t}\n\t }\n\t }\n\t }\n\t\t\n\t /* max-min don't have to be updated */\n\t} else {\n\n\t /* still have to incr the card of the correct interval */\n\t double delta = (m_MI_MaxArray[attrIndex] - m_MI_MinArray[attrIndex]) / (double) m_NumFoldersMI;\n\t\t \n\t /* for each interval */\n\t for(int inter = 0; inter < m_NumFoldersMI; inter++){\n\t /* which contains inst*/\n\t if(( (m_MI_MinArray[attrIndex] + inter * delta) <= inst.value(attrIndex) ) &&\n\t ( inst.value(attrIndex) <= (m_MI_MinArray[attrIndex] + (inter + 1) * delta) )){\n\t m_MI_NumAttrInter[attrIndex][inter]++;\n\t m_MI_NumAttrClassInter[attrIndex][(int) inst.classValue()][inter]++;\n\t }\n\t }\n\t}\n\t\t\n\t/* update the mutual information of this attribute... */\n\tm_MI[attrIndex] = 0;\n\t\t\n\t/* for each interval, for each class */\n\tfor(int inter = 0; inter < m_NumFoldersMI; inter++){\n\t for(int cclass = 0; cclass < m_Train.numClasses(); cclass++){\n\t double pXY = ((double) m_MI_NumAttrClassInter[attrIndex][cclass][inter]) / ((double) m_MI_NumInst);\n\t double pX = ((double) m_MI_NumClass[cclass]) / ((double) m_MI_NumInst);\n\t double pY = ((double) m_MI_NumAttrInter[attrIndex][inter]) / ((double) m_MI_NumInst);\n\n\t if(pXY != 0)\n\t m_MI[attrIndex] += pXY * Utils.log2(pXY / (pX * pY));\n\t }\n\t}\n\t\t\n\t/* which is a nominal attribute */\n } else if (m_Train.attribute(attrIndex).isNominal()){\n\t\t\n\t/*incr the card of the correct 'values' */\n\tm_MI_NumAttrValue[attrIndex][(int) inst.value(attrIndex)]++;\n\tm_MI_NumAttrClassValue[attrIndex][(int) inst.classValue()][(int) inst.value(attrIndex)]++;\n\t\t\n\t/* update the mutual information of this attribute... */\n\tm_MI[attrIndex] = 0;\n\t\t\n\t/* for each nominal value, for each class */\n\tfor(int attrValue = 0; attrValue < m_Train.attribute(attrIndex).numValues() + 1; attrValue++){\n\t for(int cclass = 0; cclass < m_Train.numClasses(); cclass++){\n\t double pXY = ((double) m_MI_NumAttrClassValue[attrIndex][cclass][attrValue]) / ((double) m_MI_NumInst);\n\t double pX = ((double) m_MI_NumClass[cclass]) / ((double) m_MI_NumInst);\n\t double pY = ((double) m_MI_NumAttrValue[attrIndex][attrValue]) / ((double) m_MI_NumInst);\n\t if(pXY != 0)\n\t m_MI[attrIndex] += pXY * Utils.log2(pXY / (pX * pY));\n\t }\n\t}\n\n\t/* not a nominal attribute, not a numeric attribute */\n } else {\n\tthrow new Exception(\"NNge.updateMI : Cannot deal with 'string attribute'.\");\n }\n }\t\n }",
"@Test\n public void test24() throws Throwable {\n double[] doubleArray0 = new double[5];\n PolynomialFunctionLagrangeForm polynomialFunctionLagrangeForm0 = new PolynomialFunctionLagrangeForm(doubleArray0, doubleArray0);\n try { \n UnivariateRealSolverUtils.solve((UnivariateRealFunction) polynomialFunctionLagrangeForm0, (-628.8590785579964), 31.140624862635367);\n fail(\"Expecting exception: Exception\");\n \n } catch(Exception e) {\n //\n // Abscissa 0 is duplicated at both indices 1 and 1\n //\n assertThrownBy(\"org.apache.commons.math.analysis.polynomials.PolynomialFunctionLagrangeForm\", e);\n }\n }",
"public abstract SolutionPartielle solutionInitiale();",
"public static void main (String[] param) {\n Fraction x = new Fraction (-8, 15);\n Fraction y = new Fraction (5, -6);\n Fraction z = null;\n try {\n z = (Fraction)x.clone();\n } catch (CloneNotSupportedException e) {};\n Fraction t = new Fraction (16, -30);\n System.out.println (x + \" times \" + y + \" is \" + x.times (y));\n System.out.println (x + \" plus \" + y + \" is \" + x.plus (y));\n System.out.println (x + \" minus \" + y + \" is \" + x.minus (y));\n System.out.println (x + \" divideBy \" + y + \" is \" + x.divideBy (y));\n System.out.println (x + \" compareTo \" + y + \" is \" + x.compareTo (y));\n System.out.println (x.inverse() + \" integer part is \" \n + x.inverse().integerPart());\n System.out.println (x.inverse() + \" fraction part is \"\n + x.inverse().fractionPart());\n System.out.println (x + \" is approximately \" + \n String.valueOf (x.toDouble()));\n System.out.println (Math.PI + \" is approximately \" + \n Fraction.toFraction (Math.PI, 7)\n + \" or \" + Fraction.toFraction (Math.PI, 7).toDouble());\n Fraction ff = Fraction.valueOf (\"-4/7\");\n System.out.println (ff);\n System.out.println (\"hashCode of x: \" + x.hashCode());\n System.out.println (\"hashCode of y: \" + y.hashCode());\n System.out.println (\"hashCode of z: \" + z.hashCode());\n System.out.println (\"hashCode of t: \" + t.hashCode());\n }",
"void checkTypesOfInstanceMethodResolvingFunctions() {\r\n \r\n for (int i = 0, nClassInstances = currentModuleTypeInfo.getNClassInstances(); i < nClassInstances; ++i) { \r\n \r\n ClassInstance classInstance = currentModuleTypeInfo.getNthClassInstance(i);\r\n \r\n ParseTreeNode instanceNode = classInstanceMap.get(classInstance.getIdentifier());\r\n if (instanceNode == null) {\r\n // This can occur if we are compiling an adjunct to a module that contains instance declarations.\r\n continue;\r\n }\r\n instanceNode.verifyType(CALTreeParserTokenTypes.INSTANCE_DEFN);\r\n \r\n ParseTreeNode instanceMethodListNode = instanceNode.getChild(2);\r\n instanceMethodListNode.verifyType(CALTreeParserTokenTypes.INSTANCE_METHOD_LIST);\r\n \r\n TypeClass typeClass = classInstance.getTypeClass(); \r\n \r\n for (final ParseTreeNode instanceMethodNode : instanceMethodListNode) {\r\n \r\n instanceMethodNode.verifyType(CALTreeParserTokenTypes.INSTANCE_METHOD);\r\n \r\n ParseTreeNode optionalInstanceMethodCALDocNode = instanceMethodNode.firstChild();\r\n optionalInstanceMethodCALDocNode.verifyType(CALTreeParserTokenTypes.OPTIONAL_CALDOC_COMMENT);\r\n \r\n ParseTreeNode classMethodNameNode = optionalInstanceMethodCALDocNode.nextSibling();\r\n classMethodNameNode.verifyType(CALTreeParserTokenTypes.VAR_ID); \r\n String classMethodName = classMethodNameNode.getText(); \r\n \r\n ClassMethod classMethod = typeClass.getClassMethod(classMethodName); \r\n QualifiedName resolvingFunctionName = classMethodNameNode.nextSibling().toQualifiedName();\r\n \r\n TypeExpr instanceMethodType;\r\n {\r\n TypeExpr classMethodType = classMethod.getTypeExpr();\r\n TypeVar classTypeVar = classMethodType.getTypeClassTypeVar(typeClass.getTypeClassTypeVarName());\r\n classTypeVar.setInstance(classInstance.getType());\r\n instanceMethodType = classMethodType;\r\n }\r\n \r\n TypeExpr resolvingFunctionType = compiler.getTypeChecker().getEntity(resolvingFunctionName).getTypeExpr(); \r\n \r\n if (instanceMethodType.getGenericClassConstrainedPolymorphicVars(null).size() != 0 ||\r\n resolvingFunctionType.getGenericClassConstrainedPolymorphicVars(null).size() != 0) {\r\n //if either the instance method type or the resolving function type involve constrained type vars, then they\r\n //must have identically the same type. For example, for equals in the Eq-List instance, the types of the instance\r\n //method and the resolving instance must both be: Eq a => [a] -> [a] -> Boolean.\r\n if (!instanceMethodType.sameType(resolvingFunctionType)) {\r\n compiler.logMessage(new CompilerMessage(classMethodNameNode, new MessageKind.Error.ResolvingFunctionForInstanceMethodHasWrongTypeSpecific(resolvingFunctionName.getQualifiedName(), classMethodName, instanceMethodType.toString(), resolvingFunctionType.toString())));\r\n \r\n } \r\n } else {\r\n //we allow extra flexibility here, so that e.g. withing the Eq-Integer instance, we can define fromInteger as id (rather than idInteger).\r\n if (!TypeExpr.canPatternMatch(instanceMethodType, resolvingFunctionType, currentModuleTypeInfo)) {\r\n compiler.logMessage(new CompilerMessage(classMethodNameNode, new MessageKind.Error.ResolvingFunctionForInstanceMethodHasWrongTypeGeneral(resolvingFunctionName.getQualifiedName(), classMethodName, instanceMethodType.toString(), resolvingFunctionType.toString())));\r\n } \r\n } \r\n } \r\n } \r\n }",
"@Test(timeout = 4000)\n public void test01() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n int[] intArray0 = new int[0];\n BinarySparseInstance binarySparseInstance0 = new BinarySparseInstance(8.0, intArray0, (-1545));\n // Undeclared exception!\n try { \n naiveBayesMultinomialText0.tokenizeInstance(binarySparseInstance0, true);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // DenseInstance doesn't have access to a dataset!\n //\n verifyException(\"weka.core.AbstractInstance\", e);\n }\n }",
"public static void main(String[] args) {\n\t\tHeros h1 = new Heros(\"timi\", 123.5, 0.8, 100, 95);\r\n\t\tSupports s1 = new Supports(\"daqiao\", 200.2, 0.3, 50, 80, 30);\r\n\t\ts1.healself();\r\n\t\ts1.heal(h1);\r\n\t\tSystem.out.println(h1.life);\r\n\t\tSystem.out.println(s1.life);\r\n\t\ts1.run();\r\n\t\tHeros ssx = new Heros();\r\n\t\tADheros ad1 = new ADheros();\r\n\t\tAPheros ap1 = new APheros();\r\n\t\tssx.kill(ad1);\r\n\t\tssx.kill(ap1);\r\n\t\tItems it1 = new Items(\"Paul\");\r\n\t\tItems it2 = new Items(\"Kobe\", 180);\r\n\t\tSystem.out.println(it1.toString());\r\n\t\tSystem.out.println(it1.equals(s1));\r\n\t\tSystem.out.println(it1.equals(it2));\r\n\t\t\r\n\t\tOuterClass oc1 = new OuterClass(10);\r\n\t\tOuterClass.InnerClass in1 = oc1.new InnerClass(); //内部类实例化的固定格式!\r\n\t\tSystem.out.println(in1.getOa());\r\n\t\toc1.creatClass();\r\n\r\n\t}",
"private Solution() { }",
"private Solution() { }",
"public abstract Self epsilon();",
"public void buildClassifier(Instances data) throws Exception {\n\n // can classifier handle the data?\n getCapabilities().testWithFail(data);\n\n // remove instances with missing class\n data = new Instances(data);\n data.deleteWithMissingClass();\n \n /* initialize the classifier */\n\n m_Train = new Instances(data, 0);\n m_Exemplars = null;\n m_ExemplarsByClass = new Exemplar[m_Train.numClasses()];\n for(int i = 0; i < m_Train.numClasses(); i++){\n m_ExemplarsByClass[i] = null;\n }\n m_MaxArray = new double[m_Train.numAttributes()];\n m_MinArray = new double[m_Train.numAttributes()];\n for(int i = 0; i < m_Train.numAttributes(); i++){\n m_MinArray[i] = Double.POSITIVE_INFINITY;\n m_MaxArray[i] = Double.NEGATIVE_INFINITY;\n }\n\n m_MI_MinArray = new double [data.numAttributes()];\n m_MI_MaxArray = new double [data.numAttributes()];\n m_MI_NumAttrClassInter = new int[data.numAttributes()][][];\n m_MI_NumAttrInter = new int[data.numAttributes()][];\n m_MI_NumAttrClassValue = new int[data.numAttributes()][][];\n m_MI_NumAttrValue = new int[data.numAttributes()][];\n m_MI_NumClass = new int[data.numClasses()];\n m_MI = new double[data.numAttributes()];\n m_MI_NumInst = 0;\n for(int cclass = 0; cclass < data.numClasses(); cclass++)\n m_MI_NumClass[cclass] = 0;\n for (int attrIndex = 0; attrIndex < data.numAttributes(); attrIndex++) {\n\t \n if(attrIndex == data.classIndex())\n\tcontinue;\n\t \n m_MI_MaxArray[attrIndex] = m_MI_MinArray[attrIndex] = Double.NaN;\n m_MI[attrIndex] = Double.NaN;\n\t \n if(data.attribute(attrIndex).isNumeric()){\n\tm_MI_NumAttrInter[attrIndex] = new int[m_NumFoldersMI];\n\tfor(int inter = 0; inter < m_NumFoldersMI; inter++){\n\t m_MI_NumAttrInter[attrIndex][inter] = 0;\n\t}\n } else {\n\tm_MI_NumAttrValue[attrIndex] = new int[data.attribute(attrIndex).numValues() + 1];\n\tfor(int attrValue = 0; attrValue < data.attribute(attrIndex).numValues() + 1; attrValue++){\n\t m_MI_NumAttrValue[attrIndex][attrValue] = 0;\n\t}\n }\n\t \n m_MI_NumAttrClassInter[attrIndex] = new int[data.numClasses()][];\n m_MI_NumAttrClassValue[attrIndex] = new int[data.numClasses()][];\n\n for(int cclass = 0; cclass < data.numClasses(); cclass++){\n\tif(data.attribute(attrIndex).isNumeric()){\n\t m_MI_NumAttrClassInter[attrIndex][cclass] = new int[m_NumFoldersMI];\n\t for(int inter = 0; inter < m_NumFoldersMI; inter++){\n\t m_MI_NumAttrClassInter[attrIndex][cclass][inter] = 0;\n\t }\n\t} else if(data.attribute(attrIndex).isNominal()){\n\t m_MI_NumAttrClassValue[attrIndex][cclass] = new int[data.attribute(attrIndex).numValues() + 1];\t\t\n\t for(int attrValue = 0; attrValue < data.attribute(attrIndex).numValues() + 1; attrValue++){\n\t m_MI_NumAttrClassValue[attrIndex][cclass][attrValue] = 0;\n\t }\n\t}\n }\n }\n m_MissingVector = new double[data.numAttributes()];\n for(int i = 0; i < data.numAttributes(); i++){\n if(i == data.classIndex()){\n\tm_MissingVector[i] = Double.NaN;\n } else {\n\tm_MissingVector[i] = data.attribute(i).numValues();\n }\n }\n\n /* update the classifier with data */\n Enumeration enu = data.enumerateInstances();\n while(enu.hasMoreElements()){\n update((Instance) enu.nextElement());\n }\t\n }",
"@Test\n public void test28() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n CostSensitiveClassifier costSensitiveClassifier0 = new CostSensitiveClassifier();\n CostMatrix costMatrix0 = costSensitiveClassifier0.getCostMatrix();\n Evaluation evaluation0 = null;\n try {\n evaluation0 = new Evaluation(instances0, costMatrix0);\n fail(\"Expecting exception: Exception\");\n \n } catch(Exception e) {\n //\n // Cost matrix not compatible with data!\n //\n }\n }",
"@Test(timeout = 4000)\n public void test10() throws Throwable {\n Discretize discretize0 = new Discretize();\n // Undeclared exception!\n try { \n discretize0.input((Instance) null);\n fail(\"Expecting exception: IllegalStateException\");\n \n } catch(IllegalStateException e) {\n //\n // No input instance format defined\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }",
"@Test\n public void test21() throws Throwable {\n IllinoisSolver illinoisSolver0 = new IllinoisSolver();\n Minus minus0 = new Minus();\n double double0 = illinoisSolver0.solve(4037, (UnivariateRealFunction) minus0, (double) 4037, 0.0, (double) 4037);\n }",
"@Test\n public void testAreCoupsValid() {\n Joueur NORD = new Joueur(\"NORD\");\n Joueur SUD = new Joueur(\"SUD\");\n\n NORD.setAscendant(30); // les bases sont mis à 30 pour une meilleur manipulation\n NORD.setDescendant(30); //\n SUD.setAscendant(30); //\n SUD.setDescendant(30); //\n\n SUD.jeu.set(0, 12);\n SUD.jeu.set(1, 39);\n SUD.jeu.set(2, 46);\n SUD.jeu.set(3, 59);\n SUD.jeu.set(4, 22);\n SUD.jeu.set(5, 14);\n\n assertTrue(Regles.areCoupsValid(Input.decomposer(\"12v 39^ 46^\"), SUD.clone(), NORD.clone()));\n assertTrue(Regles.areCoupsValid(Input.decomposer(\"14v 12v\"), SUD.clone(), NORD.clone()));\n assertTrue(Regles.areCoupsValid(Input.decomposer(\"12^' 39^ 46^\"), SUD.clone(), NORD.clone()));\n assertTrue(Regles.areCoupsValid(Input.decomposer(\"12v 39v' 46^\"), SUD.clone(), NORD.clone()));\n\n assertFalse(Regles.areCoupsValid(Input.decomposer(\"12^ 39v 46^'\"), SUD.clone(), NORD.clone()));\n assertFalse(Regles.areCoupsValid(Input.decomposer(\"14^ 22v'\"), SUD.clone(), NORD.clone()));\n assertFalse(Regles.areCoupsValid(Input.decomposer(\"19^ 39v' 46^\"), SUD.clone(), NORD.clone()));\n assertFalse(Regles.areCoupsValid(Input.decomposer(\"14v' 39v 46^\"), SUD.clone(), NORD.clone()));\n\n }",
"public double calculateOutputForInstance(Instance inst)\r\n\t{\r\n\t\tint k =0;\r\n\t\tfor(Node input_temp: inputNodes)\r\n\t\t{\r\n\t\t\tif(input_temp.getType()==0)\r\n\t\t\t{\r\n\t\t\t\tinput_temp.setInput(inst.attributes.get(k));\r\n\t\t\t}\r\n\t\t\tk++;\r\n\t\t}\r\n\r\n\t\t// set output\r\n\t\tfor(Node hidden_temp: hiddenNodes)\r\n\t\t{\r\n\t\t\thidden_temp.calculateOutput();\r\n\t\t}\r\n\r\n\t\toutputNode.calculateOutput();\r\n\t\t\r\n\t\treturn outputNode.getOutput();\r\n\r\n\t}",
"@Test\n public void test22() throws Throwable {\n double[] doubleArray0 = new double[5];\n PolynomialFunctionLagrangeForm polynomialFunctionLagrangeForm0 = new PolynomialFunctionLagrangeForm(doubleArray0, doubleArray0);\n try { \n UnivariateRealSolverUtils.solve((UnivariateRealFunction) polynomialFunctionLagrangeForm0, (-79.6956205713495), 0.5, 1.0);\n fail(\"Expecting exception: Exception\");\n \n } catch(Exception e) {\n //\n // Abscissa 0 is duplicated at both indices 1 and 1\n //\n assertThrownBy(\"org.apache.commons.math.analysis.polynomials.PolynomialFunctionLagrangeForm\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test15() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n SparseInstance sparseInstance0 = new SparseInstance(1950);\n try { \n naiveBayesMultinomialText0.updateClassifier((Instance) sparseInstance0, false);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // DenseInstance doesn't have access to a dataset!\n //\n verifyException(\"weka.core.AbstractInstance\", e);\n }\n }",
"public static void main(String[] args)\r\n\t{\n\t\r\n\t\tson s=new son();\r\n\t\ts.mul();\r\n\t\ts.add();\r\n\t\ts.A();\r\n\t\t\r\n\r\n\t}",
"public static void main(String[] args) throws Exception {\r\n Expression e = new Plus(new Mult(2, \"x\"), new Plus(new Sin(new Mult(4, \"y\")), new Pow(\"e\", \"x\")));\r\n System.out.println(e);\r\n Map<String, Double> assignment = new TreeMap<String, Double>();\r\n assignment.put(\"x\", 2.0);\r\n assignment.put(\"y\", 0.25);\r\n assignment.put(\"e\", 2.71);\r\n System.out.println(e.evaluate(assignment));\r\n e = e.differentiate(\"x\");\r\n System.out.println(e);\r\n System.out.println(e.evaluate(assignment));\r\n System.out.println(e.simplify());\r\n System.out.println(e);\r\n }",
"@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }",
"private void generateInitialSolution(Instance instance) {\n currentSol = new Solution(instance);\n switch (INITIAL) {\n case 0: mostValuePerWeightFirst(instance);\n case 1: leastWeightFirst(instance);\n default: randomConfiguration(instance);\n }\n // Set current best solution to initial solution\n bestSol = new Solution(currentSol);\n }",
"@Test\n public void testMetastableMemberships()\n {\n IDoubleArray M = null;\n int nstates = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.metastableMemberships(M, nstates);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"static void setExample(int n) throws Exception {\n int j=n-1;\n PetriNet net = new PetriNet(n);\n PetriNet.setNet(net);\n \n int[] eins=new int[n]; \n Arrays.fill(eins, 1);\n m0 = new Marking(eins);\n \n int[] zwei=new int[n]; \n Arrays.fill(zwei, 2); \n mF = new Marking(zwei);\n \n for (int i = 0; i < n; i++) {\n int[] tmin = new int[n]; \n int[] tdelta = new int[n]; \n Arrays.fill(tmin, 1);\n Arrays.fill(tdelta, -1); \n tdelta[i]=n-1;\n if(i==j) tdelta[i]=n;\n PNTransition t = new PNTransition(tmin, tdelta);\n net.addTransition(t);\n }\n int[] temp=new int[n]; \n Arrays.fill(temp, -n-1); \n temp[j]=-n;\n Inequality ineq=new Inequality(temp);\n boolean findC = ineq.findC();\n System.out.println(\"check-k for: \"+n+\": \"+findC);\n System.out.println(ineq.toString());\n\n }",
"public static void main(String[] args) {\n Homework1 hw1 = new Homework1();\n\n System.out.println(\"===Problem 1===\");\n hw1.problem1();\n\n System.out.println(\"===Problem 2===\");\n System.out.println(hw1.topInt(1.5));\n System.out.println(hw1.topInt(5.1));\n System.out.println(hw1.topInt(1.0));\n System.out.println(hw1.topInt(-4.2));\n\n\n System.out.println(\"===Problem 3===\");\n hw1.draw4x4('-');\n hw1.draw4x4('4');\n\n System.out.println(\"===Problem 4===\");\n System.out.println(hw1.citationName(\"Alastair\", \"Reynolds\"));\n System.out.println(hw1.citationName(\"Grace\", \"Hopper\"));\n\n System.out.println(\"===Problem 5===\");\n System.out.println(String.valueOf(hw1.min3(1.0, 2.0, 3.0)));\n System.out.println(String.valueOf(hw1.min3(4.0, 3.0, 2.0)));\n System.out.println(String.valueOf(hw1.min3(0.5, 0.1, 0.5)));\n \n System.out.println(\"===Problem 6===\");\n System.out.println(hw1.fibonacci(0));\n System.out.println(hw1.fibonacci(1));\n System.out.println(hw1.fibonacci(2));\n System.out.println(hw1.fibonacci(3));\n System.out.println(hw1.fibonacci(10));\n System.out.println(hw1.fibonacci(25));\n \n \n System.out.println(\"===Problem 7===\");\n //System.out.println(hw1.isPalindrome(\"racecar\"));\n //System.out.println(hw1.isPalindrome(\"cat\"));\n //System.out.println(hw1.isPalindrome(\"hannah\"));\n //System.out.println(hw1.isPalindrome(\"saippuakivikauppias\"));\n }",
"@Test(timeout = 4000)\n public void test68() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.m_useStopList = true;\n double[] doubleArray0 = new double[0];\n BinarySparseInstance binarySparseInstance0 = new BinarySparseInstance(0.693147181, doubleArray0);\n naiveBayesMultinomialText0.tokenizeInstance(binarySparseInstance0, false);\n // Undeclared exception!\n try { \n naiveBayesMultinomialText0.tokenizeInstance(binarySparseInstance0, true);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // DenseInstance doesn't have access to a dataset!\n //\n verifyException(\"weka.core.AbstractInstance\", e);\n }\n }",
"@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }",
"public void makeInstance() {\n\t\t// Create the attributes, class and text\n\t\tFastVector fvNominalVal = new FastVector(2);\n\t\tfvNominalVal.addElement(\"ad1\");\n\t\tfvNominalVal.addElement(\"ad2\");\n\t\tAttribute attribute1 = new Attribute(\"class\", fvNominalVal);\n\t\tAttribute attribute2 = new Attribute(\"text\",(FastVector) null);\n\t\t// Create list of instances with one element\n\t\tFastVector fvWekaAttributes = new FastVector(2);\n\t\tfvWekaAttributes.addElement(attribute1);\n\t\tfvWekaAttributes.addElement(attribute2);\n\t\tinstances = new Instances(\"Test relation\", fvWekaAttributes, 1); \n\t\t// Set class index\n\t\tinstances.setClassIndex(0);\n\t\t// Create and add the instance\n\t\tInstance instance = new Instance(2);\n\t\tinstance.setValue(attribute2, text);\n\t\t// Another way to do it:\n\t\t// instance.setValue((Attribute)fvWekaAttributes.elementAt(1), text);\n\t\tinstances.add(instance);\n \t\tSystem.out.println(\"===== Instance created with reference dataset =====\");\n\t\tSystem.out.println(instances);\n\t}",
"@Test\n public void test13() throws Throwable {\n IllinoisSolver illinoisSolver0 = new IllinoisSolver();\n Asin asin0 = new Asin();\n illinoisSolver0.setup(5, asin0, 907.1500599825578, 16, 16);\n // Undeclared exception!\n try { \n illinoisSolver0.doSolve();\n } catch(IllegalArgumentException e) {\n //\n // endpoints do not specify an interval: [907.15, 16]\n //\n assertThrownBy(\"org.apache.commons.math.analysis.solvers.UnivariateRealSolverUtils\", e);\n }\n }",
"public OptimismPessimismCalculator() {\n mostPositive = 0;\n mostPositiveDoc = null;\n mostNegative = 0;\n mostNegativeDoc = null;\n biggestDifference = 0;\n biggestDifferenceDoc = null;\n \n publisherOptimism = new HashMap<>();\n publisherPessimism = new HashMap<>();\n regionOptimism = new HashMap<>();\n regionPessimism = new HashMap<>();\n dayOptimism = new HashMap<>();\n dayPessimism = new HashMap<>();\n weekdayOptimism = new HashMap<>();\n weekdayPessimism = new HashMap<>();\n }",
"public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }",
"public static void main(String[] args) throws InstantiationException, IllegalAccessException, ClassNotFoundException, NoSuchMethodException, SecurityException, IllegalArgumentException, InvocationTargetException, CloneNotSupportedException {\n\t\tStudent st = new Student();\n\t\tst.setName(\"Madan\");\n\t\t\n\t\t//2 Using new instance method of class\n\t\tStudent st1 = (Student) Class.forName(\"com.home.Student\").newInstance();\n\t\tst1.setName(\"Mohan\");\n\t\t\n\t\t\n\t\t//3 using new instance of constructor\n\t\tConstructor<Student> cs = Student.class.getConstructor();\t\t\n\t\tStudent st2 = cs.newInstance();\n\t\tst2.setName(\"Nautiyal\");\n\t\t\n\t\t//4 using clone method\n\t\tStudent st3 = (Student) st.clone();\n\t\t\n\t\t\n\t\tSystem.out.println(\"Object 1 \" + st.getName());\n\t\tSystem.out.println(\"Object 2 \"+ st1.getName());\n\t\tSystem.out.println(\"Object 3 \"+st2.getName());\n\t\tSystem.out.println(\"Object 4 \"+st3.getName());\n\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\tNumero n1=new Numero(7);\n\t\tNumero n2=new Numero(5);\n\t\tint n3=6;\n\t\t\n\t\tSystem.out.println(\"La suma de:\" + n1.getN() + \"+\" + n3 + \" es:\" + n1.sumar(n3));\n\t\tSystem.out.println(\"La suma de:\" + n2.getN() + \"+\" + n3 + \" es:\" + n2.sumar(n3));\n\t\tSystem.out.println(\"La multiplicacion de:\" + n1.getN() + \"*\" + n3 + \" es:\" + n1.multiplicar(n3));\n\t\tSystem.out.println(\"La multiplicacion de:\" + n2.getN() + \"*\" + n3 + \" es:\" + n2.multiplicar(n3));\n\t\tSystem.out.println(\"El numero \" + n1.getN() + \" es par? \" + n1.esPar());\n\t\tSystem.out.println(\"El numero \" + n2.getN() + \" es par? \" + n2.esPar());\n\t\tSystem.out.println(\"El numero \" + n1.getN() + \" es primo? \" + n1.esPrimo());\n\t\tSystem.out.println(\"El numero \" + n2.getN() + \" es primo? \" + n2.esPrimo());\n\t\tSystem.out.println(n1.convertirAString());\n\t\tSystem.out.println(n2.convertirAString());\n\t\tSystem.out.println(\"El numero \" + n1.getN() + \" en formato double es: \" + n1.convertirADouble());\n\t\tSystem.out.println(\"El numero \" + n2.getN() + \" en formato double es: \" + n2.convertirADouble());\n\t\tint exp=2;\n\t\tSystem.out.println(\"El numero \" + n1.getN() + \" elevado a \" + exp + \" da como resultado \" + n1.calcularPotencia(exp));\n\t\tSystem.out.println(\"El numero \" + n2.getN() + \" elevado a \" + exp + \" da como resultado \" + n2.calcularPotencia(exp));\n\t\tSystem.out.println(\"El numero \" + n1.getN() + \" en base 2 es \" + n1.pasarBase2());\n\t\tSystem.out.println(\"El numero \" + n2.getN() + \" en base 2 es \" + n2.pasarBase2());\n\t\tSystem.out.println(\"El factorial de \" + n1.getN() + \" es \" + n1.calcularFactorial());\n\t\tSystem.out.println(\"El factorial de \" + n2.getN() + \" es \" + n2.calcularFactorial());\n\t\tint comb=2;\n\t\tSystem.out.println(\"El numero combinatorio de \" + n1.getN() + \" y \" + comb + \" es: \" + n1.numeroCombinatorio(comb));\n\t\tSystem.out.println(\"El numero combinatorio de \" + n2.getN() + \" y \" + comb + \" es: \" + n2.numeroCombinatorio(comb));\n\t\tSystem.out.println(\"Mellizos? \" + n1.esPrimoMellizo(n1, n2));\n\t\tint n=20;\n\t\t//primos utilizando un for\n\t\tfor(int i=2;i<=n;i++){\n\t\t\tint a=0;\n\t\t\tfor(int j=1;j<=n;j++){\n\t\t\t\tif(i%j==0){\n\t\t\t\t\ta+=1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(a==2){\n\t\t\t\tSystem.out.println(\"Numero: \" + i);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\n\t}",
"private void setupInheritanceStructure() throws PhiException{\n\n a = new PhiCollection();\n b = new PhiCollection();\n c = new PhiCollection();\n d = new PhiCollection();\n aSuper = new PhiCollection();\n bSuper = new PhiCollection();\n PhiCollection cSuper = new PhiCollection();\n\n //Setup inheritance\n aSuper.createMember(new PhiInt(1));\n aSuper.setUnnamed(0, b);\n aSuper.setUnnamed(1, c);\n a.setNamed(\"super\", aSuper);\n\n bSuper.createMember(new PhiInt(0));\n bSuper.setUnnamed(0, d);\n b.setNamed(\"super\", bSuper);\n\n cSuper.createMember(new PhiInt(0));\n cSuper.setUnnamed(0, d);\n c.setNamed(\"super\", cSuper);\n\n //Fill collections\n a.createMember(new PhiSymbol(\"test1\"));\n a.createMember(new PhiInt(0));\n a.setNamed(\"test1\", new PhiString(\"a\"));\n a.setUnnamed(0, new PhiInt(1));\n\n b.createMember(new PhiSymbol(\"test1\"));\n b.createMember(new PhiSymbol(\"test2\"));\n b.createMember(new PhiInt(0));\n b.setNamed(\"test1\", new PhiString(\"b\"));\n b.setNamed(\"test2\", new PhiString(\"x\"));\n b.setUnnamed(0, new PhiInt(2));\n\n c.createMember(new PhiSymbol(\"test1\"));\n c.createMember(new PhiInt(1));\n c.setNamed(\"test1\", new PhiString(\"c\"));\n c.setUnnamed(0, new PhiInt(3));\n c.setUnnamed(1, new PhiInt(5));\n\n d.createMember(new PhiSymbol(\"test1\"));\n d.createMember(new PhiSymbol(\"test2\"));\n d.createMember(new PhiInt(1));\n d.setNamed(\"test1\", new PhiString(\"d\"));\n d.setNamed(\"test2\", new PhiString(\"y\"));\n d.setUnnamed(0, new PhiInt(4));\n d.setUnnamed(1, new PhiInt(6));\n }",
"public interface NumberLatticeElement extends MiddleCandidateLatticeElement<NumberLatticeElement>, Coercible {\n NumberLatticeElement bottom = new BottomNumberLatticeElementImpl();\n NumberLatticeElement top = new TopNumberLatticeElementImpl();\n NumberLatticeElement uIntTop = new UIntTopNumberLatticeElementImpl();\n NumberLatticeElement notUIntTop = new NotUIntTopNumberLatticeElementImpl();\n static NumberLatticeElement generateNumberLatticeElement(Number i){\n if(i.doubleValue() == i.intValue() && i.intValue() >= 0){\n return new UIntNumberLatticeElementImpl(i.intValue());\n }\n return new NotUIntNumberLatticeElementImpl(i);\n }\n\n static Number parseNumberString(String text){\n if(text.matches(\"^(([-+]?[1-9][0-9]*)|0)$\")){\n return Integer.parseInt(text);\n }\n\n if(text.matches(\"^([+-]?(0[xX][0-9a-fA-F]+))$\")){\n return Long.decode(text);\n }\n\n if(text.matches(\"^([+-]?(0[0-7]+)$)\")){\n return Long.decode(text);\n }\n\n if(text.matches(\"^([+-](0b[01]+))$\")) {\n return Integer.parseInt(text.substring(3), 2);\n }\n if(text.matches(\"^(0b[01]+)$\")){\n return Integer.parseInt(text.substring(2), 2);\n }\n\n if(text.matches(\"^([+-]?(([0-9]*[\\\\.][0-9]+)|([0-9]+[\\\\.][0-9]*)))$\")){\n return Double.parseDouble(text);\n }\n\n if(text.matches(\"^([+-]?(([0-9]+|([0-9]*[\\\\.][0-9]+)|([0-9]+[\\\\.][0-9]*))[eE][+-]?[0-9]+))$\")){\n return Double.valueOf(text).longValue();\n }\n return null;\n }\n\n NumberLatticeElement increment();\n NumberLatticeElement decrement();\n\n NumberLatticeElement add(NumberLatticeElement other);\n\n NumberLatticeElement subtract(NumberLatticeElement other);\n\n NumberLatticeElement multiply(NumberLatticeElement other);\n\n ValueLatticeElement divide(NumberLatticeElement other);\n\n ValueLatticeElement modulo(NumberLatticeElement other);\n\n NumberLatticeElement exponent(NumberLatticeElement other);\n\n BooleanLatticeElement equalOperation(NumberLatticeElement other);\n\n BooleanLatticeElement notEqual(NumberLatticeElement other);\n\n BooleanLatticeElement greaterThan(NumberLatticeElement other);\n\n BooleanLatticeElement lessThan(NumberLatticeElement other);\n\n BooleanLatticeElement greaterThanOrEqual(NumberLatticeElement other);\n\n BooleanLatticeElement lessThanOrEqual(NumberLatticeElement numberLatticeElement);\n\n NumberLatticeElement minus();\n}",
"@Test\n public void testSelfInstanceTwoVarsReflectionObjectCycle() {\n final SelfInstanceTwoVarsReflectionTestFixture test = new SelfInstanceTwoVarsReflectionTestFixture();\n assertEquals(this.toBaseString(test) + \"[otherType=\" + test.getOtherType().toString() + \",typeIsSelf=\" + this.toBaseString(test) + \"]\", test.toString());\n }",
"@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }",
"void checkClassInstanceDefinitions(ModuleLevelParseTrees moduleLevelParseTrees) throws UnableToResolveForeignEntityException { \r\n \r\n checkForOverlappingInstances(moduleLevelParseTrees.getModuleDefnNode());\r\n \r\n List<ParseTreeNode> instanceDefnNodes = moduleLevelParseTrees.getInstanceDefnNodes(); \r\n \r\n //add the built-in class instance declarations \"instance Typeable T where ...\" for each type T\r\n //where this is possible (all of the type variables must have kind *).\r\n addTypeableInstances();\r\n\r\n checkDerivedInstances();\r\n \r\n for (final ParseTreeNode instanceNode : instanceDefnNodes) { \r\n \r\n instanceNode.verifyType(CALTreeParserTokenTypes.INSTANCE_DEFN);\r\n \r\n ClassInstance classInstance = checkClassInstanceDefinition(instanceNode);\r\n ClassInstanceIdentifier instanceIdentifier = classInstance.getIdentifier(); \r\n classInstanceMap.put(instanceIdentifier, instanceNode); \r\n }\r\n \r\n //Now do the static analysis on the instance declarations that must wait for a \r\n //second pass over the instance declarations.\r\n \r\n //If there is a C-T instance, and C' is a superclass of C, then there is a C'-T instance in scope.\r\n //So for example, if there is an instance Ord-Foo, there must be an instance Eq-Foo in the current module \r\n //or in some module imported directly or indirectly into the current module.\r\n //Note: we only need to check immediate superclasses (i.e. parents) since the parents will check for their parents.\r\n \r\n //The constraints on the type variables in C-T must imply the constraints\r\n //on the type variables in C'-T. What this means, is that if (Cij' a) is a constraint for C'-T, then (Dij' a)\r\n //is a constraint for D-T where Dij' is Cij' or a subclass.\r\n //The reason for this is so that we can derive a dictionary for C'-T given a dictionary for C-T. \r\n \r\n for (int i = 0, nInstances = currentModuleTypeInfo.getNClassInstances(); i < nInstances; ++i) {\r\n \r\n ClassInstance classInstance = currentModuleTypeInfo.getNthClassInstance(i); \r\n if (classInstance.isUniversalRecordInstance()) {\r\n //todoBI it is not valid to skip this check. Need to do more work here in this case.\r\n //this path happens during adjunct checking.\r\n continue;\r\n }\r\n \r\n TypeClass typeClass = classInstance.getTypeClass(); \r\n TypeExpr instanceType = classInstance.getType();\r\n \r\n List<Set<TypeClass>> childVarConstraints = classInstance.getSuperclassPolymorphicVarConstraints(); \r\n \r\n for (int j = 0, nParents = typeClass.getNParentClasses(); j < nParents; ++j) {\r\n \r\n TypeClass parentClass = typeClass.getNthParentClass(j);\r\n \r\n ClassInstanceIdentifier parentInstanceId = ClassInstanceIdentifier.make(parentClass.getName(), instanceType);\r\n \r\n ClassInstance parentInstance = currentModuleTypeInfo.getVisibleClassInstance(parentInstanceId);\r\n \r\n if (parentInstance == null) { \r\n //superclass instance declaration is missing \r\n ParseTreeNode instanceNode = classInstanceMap.get(classInstance.getIdentifier());\r\n String requiredParentInstanceName = ClassInstance.getNameWithContext(parentClass, instanceType, ScopedEntityNamingPolicy.FULLY_QUALIFIED);\r\n compiler.logMessage(new CompilerMessage(instanceNode, new MessageKind.Error.SuperclassInstanceDeclarationMissing(requiredParentInstanceName, classInstance.getNameWithContext())));\r\n } \r\n \r\n List<SortedSet<TypeClass>> parentVarConstraints = parentInstance.getDeclaredPolymorphicVarConstraints(); \r\n \r\n if (parentVarConstraints.size() != childVarConstraints.size()) {\r\n //this situation should be handled by earlier checking\r\n throw new IllegalArgumentException();\r\n } \r\n \r\n for (int varN = 0; varN < parentVarConstraints.size(); ++varN) {\r\n //the constraints on the varNth type variable that are not implied by the constraints on the child instance\r\n Set<TypeClass> unsatisfiedConstraints = new HashSet<TypeClass>(parentVarConstraints.get(varN));\r\n unsatisfiedConstraints.removeAll(childVarConstraints.get(varN));\r\n \r\n if (!unsatisfiedConstraints.isEmpty()) {\r\n \r\n ParseTreeNode instanceNode = classInstanceMap.get(classInstance.getIdentifier());\r\n // ClassInstanceChecker: the constraints on the instance declaration {classInstance.getNameWithContext()} must \r\n // imply the constraints on the parent instance declaration {parentInstance.getNameWithContext()}.\\n In particular, \r\n // the class constraint {((TypeClass)unsatisfiedConstraints.iterator().next()).getName()} on type variable number \r\n // {varN} in the parent instance is not implied.\r\n compiler.logMessage(new CompilerMessage(instanceNode, new MessageKind.Error.ConstraintsOnInstanceDeclarationMustImplyConstraintsOnParentInstance( \r\n classInstance.getNameWithContext(), parentInstance.getNameWithContext(), unsatisfiedConstraints.iterator().next().getName().getQualifiedName(), varN)));\r\n break;\r\n } \r\n } \r\n } \r\n } \r\n }",
"public static void main(String[] args) {\n\t\tTwoSumIII_DataStructureDesign result = new TwoSumIII_DataStructureDesign();\n\t\tresult.add(1);\n\t\tresult.add(3);\n\t\tresult.add(5);\n\t\tSystem.out.println(result.find(4));\n\t\tSystem.out.println(result.find(7));\n\t}"
] | [
"0.59460264",
"0.58077383",
"0.5717888",
"0.5699649",
"0.56016433",
"0.5588691",
"0.5579626",
"0.55590796",
"0.55307865",
"0.5519551",
"0.5508427",
"0.5473175",
"0.54509926",
"0.54212946",
"0.54128706",
"0.54118687",
"0.5405789",
"0.5405237",
"0.5392875",
"0.53851575",
"0.5348139",
"0.5336205",
"0.53337467",
"0.5307045",
"0.53069425",
"0.52853847",
"0.5259652",
"0.52500993",
"0.5246017",
"0.52372545",
"0.5234267",
"0.522964",
"0.52199197",
"0.5210851",
"0.52056825",
"0.52046174",
"0.52035636",
"0.5201781",
"0.5195402",
"0.51888514",
"0.5188659",
"0.518643",
"0.51750433",
"0.5163425",
"0.5162716",
"0.5149554",
"0.5147695",
"0.514419",
"0.51375276",
"0.5134974",
"0.512835",
"0.5122142",
"0.51177996",
"0.5111605",
"0.51111776",
"0.51097274",
"0.50976616",
"0.50976586",
"0.5095816",
"0.5095257",
"0.5094402",
"0.5091611",
"0.5091584",
"0.5086623",
"0.5086275",
"0.50850916",
"0.50816655",
"0.5074097",
"0.5071778",
"0.5071402",
"0.5071402",
"0.5068761",
"0.5063519",
"0.50603956",
"0.5060383",
"0.5058842",
"0.50568694",
"0.50522846",
"0.5049245",
"0.50474906",
"0.5046591",
"0.50441873",
"0.5043522",
"0.5042141",
"0.5041192",
"0.50408924",
"0.5037169",
"0.50364906",
"0.5035985",
"0.50329095",
"0.50309366",
"0.50272393",
"0.50263804",
"0.5026362",
"0.50258654",
"0.5023122",
"0.50230694",
"0.50207365",
"0.50166214",
"0.5009064",
"0.5007196"
] | 0.0 | -1 |
not sure that it needs any arguements | andGate( Scanner sc, String name ){
this.name = name;
ScanSupport.lineEnd( sc, name);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\n\tprotected void initParams() {\n\t\t\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"public void smell() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"private void strin() {\n\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\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}",
"protected void setupParameters() {\n \n \n\n }",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n\tpublic void call() {\n\t\t\n\t}",
"private void kk12() {\n\n\t}",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"private void test() {\n\n\t}",
"@Override\n\tpublic void function() {\n\t\t\n\t}",
"@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\n\t}",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"@Override\n\tprotected void prepare() {\n\t\t\n\t}",
"private void sub() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\n\tpublic void einkaufen() {\n\t}",
"public static void main(String[] args)\r\t{",
"@Override\n\tpublic void apply() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\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}",
"public void method_4270() {}",
"@Override\r\n \tpublic void process() {\n \t\t\r\n \t}",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n protected void init() {\n }",
"private Rekenhulp()\n\t{\n\t}",
"@Override\r\n\t\t\tpublic void test() {\n\t\t\t}",
"@Override\n\tpublic void input() {\n\t\t\n\t}",
"@Override\r\n\tprotected void execute() {\r\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"public static void main(String args[]) throws Exception\n {\n \n \n \n }",
"@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}",
"@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tpublic void nghe() {\n\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\r\n\tpublic void runn() {\n\t\t\r\n\t}",
"@Override\n public void init() {\n }",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n protected void execute() {\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}",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void processExecute() {\n\r\n\t}",
"private void validateInputParameters(){\n\n }",
"public void mo38117a() {\n }",
"@Override\n public void apply() {\n }",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"private Infer() {\n\n }",
"protected Doodler() {\n\t}",
"private FlyWithWings(){\n\t\t\n\t}",
"public void use()\n\t{\n\t}",
"public void stg() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void doExeception(Map<String, Object> args)\n {\n \n }",
"@Override\n public void doExeception(Map<String, Object> args)\n {\n \n }",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\n public void memoria() {\n \n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\r\n\tpublic void init() {}",
"@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}",
"public contrustor(){\r\n\t}",
"@Override\n\tpublic void prepare() {\n\t\t\n\t}",
"public abstract void mo70713b();",
"@Override\n void init() {\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}"
] | [
"0.6399592",
"0.6396188",
"0.62476707",
"0.622151",
"0.6208073",
"0.6169608",
"0.6144591",
"0.60180396",
"0.60180396",
"0.5988086",
"0.5948092",
"0.59457386",
"0.5940191",
"0.59381056",
"0.5936728",
"0.59252256",
"0.5914325",
"0.5875014",
"0.5865231",
"0.5865231",
"0.5865176",
"0.585137",
"0.58263856",
"0.5821839",
"0.5804156",
"0.58031076",
"0.5789125",
"0.5779313",
"0.57670134",
"0.5765568",
"0.57593477",
"0.57433546",
"0.5742265",
"0.57375765",
"0.57261807",
"0.57236874",
"0.5706866",
"0.5705967",
"0.57029015",
"0.5698038",
"0.56907636",
"0.5659768",
"0.5657167",
"0.5657167",
"0.5656148",
"0.56541854",
"0.56469214",
"0.56436336",
"0.5636322",
"0.5633278",
"0.5621958",
"0.56197816",
"0.5615442",
"0.56026036",
"0.56017727",
"0.5596396",
"0.5596378",
"0.559306",
"0.55907565",
"0.5563398",
"0.55551",
"0.5551271",
"0.55475396",
"0.55410445",
"0.55357736",
"0.55300194",
"0.55300194",
"0.55300194",
"0.55300194",
"0.55300194",
"0.5517197",
"0.55170333",
"0.55165106",
"0.5516161",
"0.55153453",
"0.5510929",
"0.55079454",
"0.55052084",
"0.55015385",
"0.5501015",
"0.5499684",
"0.5498009",
"0.5497959",
"0.5491666",
"0.54900926",
"0.54900926",
"0.5486618",
"0.54855657",
"0.5482632",
"0.54770064",
"0.5475517",
"0.5475517",
"0.5475517",
"0.54753214",
"0.54751915",
"0.54751843",
"0.54750305",
"0.54736125",
"0.5466594",
"0.5466594",
"0.54665375"
] | 0.0 | -1 |
Find a gate by textual name in the set gates | public static Gate findGate( String s ) {
// quick and dirty implementation
for (Gate i: gates) {
if (i.name.equals( s )) {
return i;
}
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static Gate findGate( String n ) {\n for (Gate g: allGates) {\n if (g.name.equals( n )) return g;\n }\n return null;\n }",
"public String getName() { return \"Gate\"; }",
"private Shape find(String name, ArrayList<Shape> listShapes, ArrayList<Command> commands) {\r\n for (Shape shape : listShapes) {\r\n if (shape.getName().equals(name)) {\r\n return shape;\r\n }\r\n }\r\n throw new IllegalArgumentException(\"Cannot find shape.\");\r\n }",
"public static RepresentacionGrafica getByName(String name) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tRepresentacionGrafica result = VALUES_ARRAY[i];\n\t\t\tif (result.getName().equals(name)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"private Node getNode(String name) {\n for(Iterator<Node> i = nodes.iterator(); i.hasNext();) {\n Node n = i.next();\n if(n.getName().equalsIgnoreCase(name)){\n return n;\n };\n }\n return null;\n }",
"public static ArrayList<Net> makeNetDatabase(ArrayList<Gate> gates, String name) {\n ArrayList<Net> netDatabase = new ArrayList<>();\n try {\n BufferedReader rd = new BufferedReader(new FileReader(name));\n String line;\n while (true) {\n line = rd.readLine();\n if (line == null) break;\n String[] words = line.split(\",\");\n\n int gateNumber1 = Integer.valueOf(words[0]);\n int gateNumber2 = Integer.valueOf(words[1]);\n\n Gate gate1 = gates.get(gateNumber1);\n Gate gate2 = gates.get(gateNumber2);\n\n Net net = new Net(gate1, gate2);\n netDatabase.add(net);\n }\n rd.close();\n } catch (IOException ex) {\n System.err.println(\"Error: \" + ex);\n }\n return netDatabase;\n }",
"public static ArrayList<Gate> makeGateDatabase(String name) {\n ArrayList<Gate> gateDatabase = new ArrayList<>();\n try {\n BufferedReader rd = new BufferedReader(new FileReader(name));\n String line;\n while (true) {\n line = rd.readLine();\n if (line == null) break;\n String[] words = line.split(\",\");\n\n int lineNumber = Integer.valueOf(words[0]);\n int x = Integer.valueOf(words[1]);\n int y = Integer.valueOf(words[2]);\n\n gateDatabase.add(new Gate(lineNumber, x, y));\n }\n rd.close();\n } catch (IOException ex) {\n System.err.println(\"Error: \" + ex);\n }\n return gateDatabase;\n }",
"public abstract SmartObject findIndividualName(String individualName);",
"private NFAState checkIfExists(String name) {\n\t\tNFAState ret = null;\n\t\tfor(NFAState s : states){\n\t\t\tif(s.getName().equals(name)){\n\t\t\t\tret = s;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}",
"public Gift getGift(String name) {\r\n return GiftList.get(name);\r\n }",
"public static RefinementPhases getByName(String name) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tRefinementPhases result = VALUES_ARRAY[i];\n\t\t\tif (result.getName().equals(name)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"private NFAState checkIfExists(String name) {\r\n\t\tNFAState ret = null;\r\n\t\tfor (NFAState s : states) {\r\n\t\t\tif (s.getName().equals(name)) {\r\n\t\t\t\tret = s;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ret;\r\n\t}",
"public String searchByName(String name){\n for(Thing things: everything){\n if(things.getName().equalsIgnoreCase(name)){\n return things.toString();\n }\n }\n return \"Cannot Find given Name\";\n }",
"public static AGG_State getReference( String s )\n {\n return( (AGG_State)( nameHash.get( s ) ) );\n }",
"private SymObject find(String name) {\n SymObject object = table.find(name);\n if (object == SymbolTable.OBJECT_NONE) {\n error(name + \" can't be resolved to a name\");\n }\n\n return object;\n }",
"public tudresden.ocl20.core.jmi.ocl.commonmodel.Operation lookupOperation(java.lang.String name, List paramTypes) {\n Operation op;\n \n //UML-MOF-Common\n Iterator allOperationsIt = allOperations().iterator();\n while(allOperationsIt.hasNext()){\n op = (Operation) allOperationsIt.next(); \n if(name.equals(op.getNameA()) && op.hasMatchingSignature(paramTypes)){\n return op;\n } \n }\n\n return null;\n }",
"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 }",
"Object find(String name);",
"public boolean contains(String name) {\n return generators.containsKey(name);\n }",
"protected Set locateBlock(final String blockName) {\n Set matches = new java.util.HashSet();\n for (Iterator it = blocks.keySet().iterator(); it.hasNext(); ) {\n Object b = it.next();\n if (b.toString().endsWith('.' + blockName)) {\n matches.add(b);\n }\n }\n return matches;\n }",
"private boolean findRelCfgName(String name,\n Collection<PSRelationshipConfigName> names)\n {\n for (PSRelationshipConfigName cfgname : names)\n {\n if (cfgname.getName().equals(name))\n return true;\n }\n\n return false;\n }",
"public GraphNode<?> get(String name) {\n\t\tfor(GraphNode<?> node : nodes) {\n\t\t\tif(node.data.equals(name))\n\t\t\t\treturn node;\n\t\t}\n\t\treturn null;\n\t}",
"static private AssociatedElement getSynonym(String name, ArrayList<AssociatedElement> synonyms)\r\n\t{\r\n\t\tfor(AssociatedElement synonym : synonyms)\r\n\t\t\tif(synonym.getName().equals(name)) return synonym;\r\n\t\treturn null;\r\n\t}",
"Interface getInterfaceByName(ConnectPoint connectPoint, String name);",
"public Amount<Mineral> searchByName(String name){\n\t\tfor(int i=0; i<this.mineralList.size(); i++) {\n\t\t\tif(this.mineralList.get(i).getObject().getName() == name)\n\t\t\t\treturn this.mineralList.get(i);\n\t\t}\n\t\treturn null;\n\t}",
"public Notation getNotation(String name) {\r\n return (Notation)notations.get(name);\r\n }",
"protected Gate( String n ) {\n name = n;\n }",
"public Instruction getInstructionContaining(Address addr);",
"public InputNeuron getInputNeuronFromName(String name) {\n\t\tfor (InputNeuron neuron : inputLayer) {\n\t\t\tif (name.equals(neuron.getName())) {\n\t\t\t\treturn neuron;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public Town getVertex(String name) {\n\t\tfor (Town t : towns) {\n\t\t\tif (t.getName().equals(name)) {\n\t\t\t\treturn t;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public Operator nameToOperator(String name) {\r\n return operators.get(name);\r\n }",
"private Command getCommandByName(String name) {\n for (Command command : commands) {\n if (command.getName().equals(name)) {\n return command;\n }\n }\n return null;\n }",
"Expertise findByName(String name);",
"Aggregator retrieveAggregatorByNameCode(String mnemonic) throws RepoxException;",
"public Node getNode(String name) {\n Node result = super.getNode(name);\n\n if (result == null) {\n byte type = gateClass.getPinType(name);\n int index = gateClass.getPinNumber(name);\n if (type == CompositeGateClass.INTERNAL_PIN_TYPE)\n result = internalPins[index];\n }\n\n return result;\n }",
"public Gift getGift(Gift gift) {\r\n if(containsGift(gift)) {\r\n return GiftList.get(gift.getName());\r\n }\r\n else {\r\n throw new java.util.NoSuchElementException(\"A gift with this name could not be found\");\r\n }\r\n }",
"Tag findByName(String name);",
"@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/featuregates/{name}\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<FeatureGate> readFeatureGate(\n @Path(\"name\") String name);",
"public static Gate newGate( Scanner sc ) throws ConstructorFailure {\n\t// going to write a whole bunch of new junk here and then slowly\n\t// remove what I no longer need. This code is ages from being able\n\t// to be compiled\n\tString name = ScanSupport.nextName( sc ); \n\tif( \" \".equals( name )){\n\t Errors.warn( \"No gate name provided\" ); \n\t throw new ConstructorFailure(); \n\t}\t\t\n\tif (Logic.findGate( name ) != null) {\n\t Errors.warn( \"Gate redefined: \" + name );\n\t throw new ConstructorFailure();\n\t}\n\t\n\tString type = ScanSupport.nextName( sc ); \n\t\n\tif( \"or\".equals( type ) ){\n\t return new orGate( sc, name ); \n\t} else if ( \"and\".equals( type )){\n\t return new andGate( sc, name ); \n\t} else if ( \"not\".equals( type )){ \n\t return new notGate( sc, name ); \n\t} else if ( \"const\".equals( type )){\n\t return new constant( sc, name ); \n\t} else {\n\t Errors.warn( \"Gate \" + name + \" \" + type\n\t\t\t+ \" has an invalid type\" );\n\t\n\t throw new ConstructorFailure();\n\t}\n }",
"Heaver findByName(String name);",
"public String toString() {\n return gate;\n }",
"public Guest getGuest(String name) {\n\t\tString checkName = name.toUpperCase();\n for (Guest guest : guestList) {\n if (guest.getName().toUpperCase().equals(checkName)){\n return guest;\n }\n }\n return null;\n }",
"public static PseudostateKind getByName(String name) {\r\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\r\n\t\t\tPseudostateKind result = VALUES_ARRAY[i];\r\n\t\t\tif (result.getName().equals(name)) {\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public static SendMethod findByName(String name) {\n\t\tfor (SendMethod sendMethod : SendMethod.values()) {\n\t\t\tif (sendMethod.getName().equals(name)) {\n\t\t\t\treturn sendMethod;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"String getName( String name );",
"public static void make( Scanner sc ) {\n // First worry about the gate name\n final String name\n = ScanSupport.scanName( sc, () -> \"Gate has missing name\" );\n if (name == null) {\n ScanSupport.finishLine(\n sc, () -> \"Gate: followed by\"\n );\n return;\n }\n if (findGate( name ) != null) {\n Errors.warn( \"Gate \" + name + \": name reused\" );\n ScanSupport.finishLine(\n sc, () -> \"Gate \" + name + \": followed by\"\n );\n return;\n }\n\n // Second get the gate kind\n final String kind = ScanSupport.scanName(\n sc, () -> \"Gate \" + name + \": kind missing\"\n );\n if (kind == null) {\n ScanSupport.finishLine(\n sc, () -> \"Gate \" + name + \": followed by\"\n );\n return;\n }\n\n // Finally construct the right kind of gate\n if (\"xor\".equals( kind )) {\n allGates.add( new XorGate( sc, name ) );\n } else if (\"threshold\".equals( kind )) {\n allGates.add( new ThresholdGate( sc, name ) );\n } else if (\"input\".equals( kind )) {\n allGates.add( new InputGate( sc, name ) );\n } else if (\"output\".equals( kind )) {\n allGates.add( new OutputGate( sc, name ) );\n } else {\n Errors.warn( \"Gate \" + name + \" \" + kind + \": kind unknown\" );\n ScanSupport.finishLine(\n sc, () -> \"Gate \" + name + \" \" + kind + \": followed by\"\n );\n }\n }",
"public static Animal getByName(String name) {\n for(var animal : animals){\n if(animal.getName().equalsIgnoreCase(name))\n return animal;\n }\n return null;\n\n //Diffrent way of finding the animal\n /*return animals.stream()\n .filter(a -> a.getName().equalsIgnoreCase(name))\n .findAny()\n .orElse(null);*/\n }",
"org.openxmlformats.schemas.drawingml.x2006.main.STGeomGuideName xgetName();",
"private int findIngredientByName(String name){\r\n for(int i = 0; i < ingredients.size(); i++){\r\n if(ingredients.get(i).getName().equals(name)){\r\n return i;\r\n }\r\n }\r\n\r\n return -1;\r\n }",
"public static Direction findByName(String name) {\n Direction result = null;\n for (Direction direction : values()) {\n if (direction.name().equalsIgnoreCase(name)) {\n result = direction;\n break;\n }\n }\n return result;\n }",
"String findRelation(String person1, String person2);",
"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 PgIndex getIndex(final String name) {\n PgIndex index = null;\n \n for (PgIndex curIndex : indexes) {\n if (curIndex.getName().equals(name)) {\n index = curIndex;\n \n break;\n }\n }\n \n return index;\n }",
"public State findStateByName(String stateName) throws Exception {\n for (State state : getStates()) {\n if (state.getStateName().equals(stateName))\n return state;\n }\n return null;\n }",
"public static Node findByName (Node bst, String name){\n\t\tif(bst != null){\n\t\t\tif(bst.getName().equals(name)){\n\t\t\t\tSystem.out.println(\"The node \" + bst + \" is found!\");\n\t\t\t\treturn bst;\t\t\t\t\t\t\t\n\t\t\t}else if(bst.getName().compareTo(name)>0){\n\t\t\t\tSystem.out.println(bst.getLeft().getName() + \" <- \" + bst.getName());\n\t\t\t\treturn findByName(bst.getLeft(), name);\n\t\t\t}else{ \n\t\t\t\tSystem.out.println(bst.getName() + \" -> \" + bst.getRight().getName());\n\t\t\t\treturn findByName(bst.getRight(), name);\n\t\t\t\n\t\t\t}\n\t\t}else\n\t\treturn null;\n\t}",
"@Test\n public void helloGraph() {\n skynetMedium.SkyNet.Input.GameInput in=new skynetMedium.SkyNet.Input.GameInput(4,4,1);\n in.addLinkDescr(1,2);\n //in.addLinkDescr(0, 2);\n in.addLinkDescr(1, 0);\n //in.addLinkDescr(2, 3);\n in.addGateWay(2);\n in.setAgent(1);\n \n List<SkyNet.Input.PathToGate> path=in.pathToGates();\n for(SkyNet.Input.PathToGate ptg : path){\n System.err.println(\"= \"+ptg);\n }\n }",
"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}",
"andGate( Scanner sc, String name ){\n\tthis.name = name; \n\tScanSupport.lineEnd( sc, name); \n }",
"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 }",
"static public Calibration getCalFromName(String name_in) {\r\n for (Calibration cal : registeredCals) {\r\n if (cal.name.equals(name_in)) {\r\n return cal;\r\n }\r\n }\r\n return null;\r\n }",
"public static Instance<PlaceNode> findPlaceByName(String name, List<Instance<PlaceNode>> allPlaces)\r\n\t{\t\r\n\t\tfor (Instance<PlaceNode> p : allPlaces)\r\n\t\t{\r\n\t\t\tif (p.toString().equals(name))\r\n\t\t\t{\r\n\t\t\t\treturn p;\r\n\t\t\t}\r\n\t\t}\r\n\t\tthrow new java.lang.Error(\"No place with this name could be found.\");\r\n\t}",
"private int getIndexForName(String teammateName) {\r\n\t\tfor (int x = 0; x < targetTracking.size(); x++) {\r\n\t\t\tif (targetTracking.get(x).getAlly().getName().equals(teammateName)) {\r\n\t\t\t\treturn x;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1;\r\n\t}",
"public GlobalSimilarityElement getFSGENode(String name){\n\n GlobalSimilarityElement gse = null;\n if(name.equalsIgnoreCase(utils.Utils.ParticularSimilGLNode)){\n gse = new ParticularSimilGLNode();\n gse.setName(utils.Utils.ParticularSimilGLNode);\n gse.setEsTemporal(false);\n }else if(name.equalsIgnoreCase(utils.Utils.TemporalSimilGLNode)){\n gse = new TemporalSimilGLNode();\n gse.setEsTemporal(true);\n gse.setName(utils.Utils.TemporalSimilGLNode);\n\n }\n return gse;\n\n }",
"public abstract ServiceLocator find(String name);",
"public static Iterator <Gate> iterator() {\n return allGates.iterator();\n }",
"public int findGnetGroup() {\r\n int cr, num = 0;\r\n //TODO\r\n // if (Controls.getInstance().getGnet() == null) {\r\n // return 0;\r\n // }\r\n // cr = Controls.getInstance().getGnet().getTargetVariable();\r\n //for (int i = 0; i < models.size(); i++) {\r\n // if (getModel(i) != null) {\r\n // if (getModel(i).getTargetVariable() == cr) {\r\n // num++;\r\n // }\r\n // }\r\n //}\r\n return num;\r\n }",
"public Country findByName(String name);",
"public int findNet(String name) {\r\n if (name.indexOf(\" \") > 0) {\r\n int k = Integer.valueOf(name.substring(name.indexOf(\" \") + 1));\r\n for (int i = 0; i < models.size(); i++) {\r\n if (getModel(i) != null) {\r\n if (getModel(i).getName().compareTo(name.substring(0, name.indexOf(\" \"))) == 0) {\r\n if (k-- == 0) {\r\n return i;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n /*\r\n * //todo FIXME inkonzistentne spravanie\r\n * Ak mame iba jeden model, tak ho necislujeme a nasledujuci kod je v poriadku\r\n * Ak mame viacero modelov (ensemble) tak nasledujuci for-cyklus vrati prvu najdenu siet\r\n * s danym menom, t.j. nakde siet s 'menom' \"NAME 0\"\r\n */\r\n for (int i = 0; i < models.size(); i++) {\r\n if (getModel(i) != null) {\r\n if (getModel(i).getName().compareTo(name) == 0) { //the same name\r\n return i;\r\n }\r\n }\r\n }\r\n return -1; //search failed\r\n }",
"public boolean graveyardContains(String name) {\n AssassinNode current = gYardFront;\n return contains(name, current);\n }",
"@Nullable\n\tpublic MethodNode searchMethodByShortName(String name) {\n\t\tfor (MethodNode m : methods) {\n\t\t\tif (m.getMethodInfo().getName().equals(name)) {\n\t\t\t\treturn m;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public Expression determine(String s);",
"public NodeP findPatient (String name){\r\n NodeP current = front;\r\n \r\n while (!current.getPatient().getName().trim().equalsIgnoreCase(name)){\r\n current = current.getNext();\r\n }\r\n return current;\r\n }",
"public static CurveCharKind getByName(String name) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tCurveCharKind result = VALUES_ARRAY[i];\n\t\t\tif (result.getName().equals(name)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public T get(String name) {\n for (int i = maps.size() - 1; i >= 0; i--) {\n HashMap<String, T> scope = maps.get(i);\n T t = scope.get(name);\n if (t != null) return t; // Found it!\n }\n return null; // Not found\n }",
"public static NameLocator name(String name) {\n return new NameLocator(name);\n }",
"public Visitor getVisitorByName(String name) {\n\t\tfor (Visitor visitor : visitors) {\n\t\t\tif(visitor.getName().equals(name)) {\n\t\t\t\treturn visitor;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"static public Person searchPerson(String name) {\n return personMap.get(name);\n }",
"public Person find(String name) {\n\t\tfor (Person person : listOfPeople) {\n\t\t\tif(person.getName().contains(name)) {\n\t\t\t\treturn person;\n\t\t\t}\n\t\t}\n\t\treturn null; // only reached if person with name not found by search.\n\t}",
"public Archangel buscarName(String name){\n\tboolean val = false;\n Archangel angel = null;\n\tfor(int i =0;i<arch.length && !val;i++){\n\t\tif(arch[i]!=null){\n\t\tif(arch[i].getName().equalsIgnoreCase(name)){\n\t\t\tangel = arch[i];\n\t\t\tval = true;\n\t\t}\n\t}\n\t\telse{\n\t\t\tval=true;\n\t\t}\n\t\t}\n\t\nreturn angel;\n\n}",
"public synchronized OptionSet findOptionSetReturnOptionSet(String name)\n {\n\tfor (OptionSet T_opset: opset){\n\t\tif (T_opset.getName().equals(name)){\n\t\t\treturn T_opset;\n\t\t}}\n\t System.out.println(name+\" is not exist in find\");\n\treturn null;\n\t}",
"public static Symbol getSymbolOfName(String name, Traversable tr) {\n Symbol ret = null;\n Traversable t = tr;\n while (ret == null && t != null) {\n if (t instanceof SymbolTable) {\n for (Symbol symbol : getSymbols((SymbolTable)t)) {\n if (name.equals(symbol.getSymbolName())) {\n ret = symbol;\n break;\n }\n }\n }\n t = t.getParent();\n }\n return ret;\n }",
"public TreePath findByName(JTree tree, String[] names) {\n TreeNode root = (TreeNode) tree.getModel().getRoot();\n return find2(tree, new TreePath(root), names, 0, true);\n }",
"public List<Place> getGates(GateType typeRequested) {\n\t\tList<Place> gatesRequested = new ArrayList<Place>();\n\t\tfor(Place p: placesByUri.values()){\n\t\t\tboolean pIsGate = p.getGate() != null;\n\t\t\tif(pIsGate){\n\t\t\t\tboolean typeIsEqual = true;\n\t\t\t\tif(typeRequested != null){\n\t\t\t\t\ttypeIsEqual = p.getGate().getType().\n\t\t\t\t\t\t\t\t\tequals(typeRequested);\n\t\t\t\t}\t\t\t\t\t\n\t\t\t\tif(typeIsEqual){\n\t\t\t\t\tgatesRequested.add(p);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn gatesRequested;\n\t}",
"Road findByName(String toFind, ArrayList<Road> list)\n\t{\n\t\tRoad tmp;\n\t\tIterator<Road> it = list.iterator();\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\ttmp = it.next();\n\t\t\tif(tmp.getName().equals(toFind))\n\t\t\t{\n\t\t\t\treturn tmp;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public abstract T findByName(String name) ;",
"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}",
"private GraphNode getGraphNode(String name, Graph graph) {\n\t\tGraphNode node = graph.nodeMap.get(name);\n\t\tif (node == null) {\n\t\t\tServiceNode n;\n\t\t\tif (name.equals(\"Input\"))\n\t\t\t\tn = inputNode;\n\t\t\telse if (name.equals(\"Output\"))\n\t\t\t\tn = outputNode;\n\t\t\telse\n\t\t\t\tn = serviceMap.get(name);\n\t\t\tnode = new GraphNode(n, this);\n\t\t\tgraph.nodeMap.put(name, node);\n\t\t}\n\t\treturn node;\n\t}",
"public VisualState getVisualState(String name) {\r\n\t\tVisualState visualState = null;\r\n\t\tfor (int i=0; i<visualStates.size(); i++) {\r\n\t\t\tif (visualStates.get(i).getStateName().equals(name)) {\r\n\t\t\t\tvisualState = visualStates.get(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn visualState;\r\n\t}",
"String lookupMashFromName(String name);",
"public int getId(String name){\r\n\t\tfor(int i=0; i<graphSize; i++){\r\n\t\t\tif(myGraph[i].name.compareToIgnoreCase(name) == 0){\r\n\t\t\t\treturn i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1;\r\n\t}",
"public static EBackendType getBackendByName(String name) {\n\t\treturn availableBackends().filter(backend -> backend.cc_name.equalsIgnoreCase(name)).findFirst().orElse(EBackendType.DEFAULT);\n\t}",
"public int search(String name){\n\t\tfor(Map.Entry<String, Integer> e : map.entrySet()){\n\t\t\tif(e.getKey().equals(name)){\n\t\t\t\treturn e.getValue();\n\t\t\t}\n\t\t}\n\t\tthrow new NullPointerException();\n\t\t/*\n\t\twhile(pointer < locations.length){\n\t\t\tif(locations[pointer].getName() == name){\n\t\t\t\tmap.put(locations[pointer].getName(), locations[pointer].getID());\n\t\t\t\tpointer++;\n\t\t\t\treturn locations[pointer - 1].getID();\n\t\t\t} else {\n\t\t\t\tmap.put(locations[pointer].getName(), locations[pointer].getID());\n\t\t\t\tpointer++;\n\t\t\t}\n\t\t}\n\t\tthrow new NullPointerException();\n\t\t*/\n\t}",
"public static DistributionState getByName(String name) {\r\n for(int i = 0; i < VALUES_ARRAY.length; ++i) {\r\n DistributionState result = VALUES_ARRAY[i];\r\n if(result.getName().equals(name)) {\r\n return result;\r\n }\r\n }\r\n return null;\r\n }",
"public boolean match(String name) {\n\t\t\treturn (this.equals(directions.get(name.toUpperCase())));\n\t\t}",
"public static RepresentacionGrafica get(String literal) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tRepresentacionGrafica result = VALUES_ARRAY[i];\n\t\t\tif (result.toString().equals(literal)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tprivate List<Gene> getAllByName(String name, Session session) {\n\t\tQuery query = session.createQuery(\"select distinct(g) from Xref as x1, Xref as x2, TranscriptToXref as tx1, TranscriptToXref as tx2, Dbname as db, Gene as g where\" +\n\t\t\t\t\" x1.displayId= :name and\" +\n\t\t\t\t\" x1.xrefId=tx1.xref and\" +\n\t\t\t\t\" tx1.transcript=tx2.transcript and\" +\n\t\t\t\t\" tx2.xref=x2.xrefId and\" +\n\t\t\t\t\" x2.dbname=db.dbnameId and\" +\n\t\t\t\t\" db.name='ensembl_gene' and\" +\n\t\t\t\t\" x2.displayId=g.stableId\").setParameter(\"name\", name.trim()); //and t.gene=g.geneId\" , Transcript as t\n\t\treturn (List<Gene>)query.list();\n\t}",
"private StateVertex getStateInGraph(StateVertex state) {\n\t\tSet<StateVertex> states = getAllStates();\n\n\t\tfor (StateVertex st : states) {\n\t\t\tif (state.equals(st)) {\n\t\t\t\treturn st;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}",
"private String reg(SSAStatement s) {\n return registers[freeRegisters[s.getRegister()]];\n }",
"private OperatorPair chooseOperators(String name) {\n\t\t\n\t\tswitch(name) {\n\t\t\n\t\tcase \"sin\":\n\t\t\treturn new OperatorPair(SIN, ASIN);\n\t\t\t\n\t\tcase \"cos\":\n\t\t\treturn new OperatorPair(COS, ACOS);\n\t\t\t\n\t\tcase \"tan\":\n\t\t\treturn new OperatorPair(TAN, ATAN);\n\t\t\t\n\t\tcase \"ctg\":\n\t\t\treturn new OperatorPair(CTG, ACTG);\n\t\t\t\n\t\tcase \"log\":\n\t\t\treturn new OperatorPair(LOG, LOG_INV);\n\t\t\t\n\t\tcase \"ln\":\n\t\t\treturn new OperatorPair(LN, LN_INV);\n\t\t\n\t\tcase \"1/x\":\n\t\t\treturn new OperatorPair(X_INV, X_INV);\n\t\t\t\n\t\tdefault:\n\t\t\tthrow new IllegalStateException(\"Invalid unary operator\");\n\t\t}\n\t}",
"public static Icon lookup(String name) \r\n\t{\r\n\t\tEntry\t\ttab[] = m_table;\r\n\t\tEntry\t\te;\r\n\t\tint\t\t\tindex;\r\n\t\r\n\t\tif (tab != null) {\r\n\t\t\tindex = (name.hashCode() & 0x7FFFFFFF) % tab.length;\r\n\t\r\n\t\t\tfor (e = tab[index] ; e != null ; e = e.m_next) {\r\n\t\t\t\tif (name.compareTo(e.m_name) == 0) {\r\n\t\t\t\t\treturn(e.m_value);\r\n\t\t}\t}\t}\r\n\t\treturn null;\r\n\t}"
] | [
"0.7250432",
"0.5583547",
"0.53737134",
"0.528022",
"0.5204758",
"0.50965786",
"0.50395256",
"0.4998982",
"0.49981198",
"0.4979453",
"0.4968718",
"0.4965262",
"0.49623504",
"0.49541694",
"0.49428996",
"0.4911102",
"0.48970118",
"0.48885712",
"0.48153773",
"0.47860378",
"0.47757655",
"0.47697997",
"0.47376624",
"0.47219327",
"0.47034413",
"0.46974564",
"0.46922672",
"0.46522954",
"0.4633262",
"0.46263707",
"0.46200195",
"0.46190408",
"0.46167052",
"0.46111652",
"0.4607037",
"0.46069956",
"0.46054986",
"0.46048075",
"0.46032575",
"0.46029392",
"0.4601868",
"0.46008593",
"0.45999476",
"0.45943105",
"0.459412",
"0.45832992",
"0.4574867",
"0.4573847",
"0.45712614",
"0.45593184",
"0.4544345",
"0.45341164",
"0.45335132",
"0.45311362",
"0.45231068",
"0.45190984",
"0.45172673",
"0.4513976",
"0.44985116",
"0.44954088",
"0.44934085",
"0.4489865",
"0.44841018",
"0.448305",
"0.44795293",
"0.44756112",
"0.44752547",
"0.4474687",
"0.4471678",
"0.44634473",
"0.4454152",
"0.4453642",
"0.44532278",
"0.4451122",
"0.44480982",
"0.44421136",
"0.44363675",
"0.44354394",
"0.44322798",
"0.44284064",
"0.44176367",
"0.4415301",
"0.44149792",
"0.44125772",
"0.4411121",
"0.44016886",
"0.4397282",
"0.43832535",
"0.43829864",
"0.4377231",
"0.4376561",
"0.43742606",
"0.4374087",
"0.43715662",
"0.43695247",
"0.43660852",
"0.4364916",
"0.43645692",
"0.43610957",
"0.43544585"
] | 0.7581383 | 0 |
Initialize this logic circuit by scanning its description | private static void readCircuit( Scanner sc ) {
while (sc.hasNext()) {
String command = sc.next();
if ("gate".equals( command )) {
try {
gates.add( Gate.newGate( sc ) );
} catch (Gate.ConstructorFailure e) {
// do nothing, the constructor already reported the error
}
} else if ("wire".equals( command )) {
try {
wires.add( new Wire( sc ) );
} catch (Wire.ConstructorFailure e) {
// do nothing, the constructor already reported the error
}
} else if ("--".equals( command )) {
sc.nextLine();
} else {
Errors.warn( "unknown command: " + command );
sc.nextLine();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n public void initialize(List<Gdl> description) {\r\n try {\r\n \tdescription = sanitizeDistinct(description);\r\n\t\t\tpropNet = OptimizingPropNetFactory.create(description);\r\n\t\t\t//propNet.renderToFile(\"propnet.dot\");\r\n\t\t\troles = propNet.getRoles();\r\n\t\t\tinitPropnetVars();\r\n\t\t\tfor (Component c : propNet.getComponents()) {\r\n\t\t\t\tc.crystalize();\r\n\t\t\t}\r\n } catch (InterruptedException e) {\r\n throw new RuntimeException(e);\r\n }\r\n }",
"protected void initialize() {\n\t\tsquaredInputs = false;\n\t\t// SmartDashboard.putString(\"DB/LED 0\", \"TeleOpDrive is init\");\n\t}",
"public void robotInit() {\n // North.registerCommand(\"setSetpoint\", (params) -> ??, [\"Setpoint\"]);\n // North.registerCondition(\"atSetpoint\", elevator::atSetpoint);\n\n //NOTE: init(name, size, logic provider, drive & nav)\n North.init(/*NorthUtils.readText(\"name.txt\")*/ \"lawn chair\", 24/12, 24/12, drive);\n North.default_drive_controller = HoldController.I;\n\n UsbCamera camera = CameraServer.getInstance().startAutomaticCapture();\n camera.setResolution(640, 480);\n }",
"public void robotInit() {\r\n\t\t// Create and start the compressor. It will control pressure automagically\r\n\t\tCompressor comp = new Compressor(RobotMap.pneumaticPreasureSwitch, RobotMap.compresserRelay);\r\n\t\tcomp.start();\r\n\r\n\t\t// instantiate the command used for the autonomous period\r\n\t\tautonomousCommand = new Autonomous();\r\n\r\n\t\t// Initialize all subsystems\r\n\t\tCommandBase.init();\r\n\t}",
"public void robotInit() {\n\t\toi = OI.getInstance();\r\n\t\t\r\n\t\t// instantiate the command used for the autonomous and teleop period\r\n\t\treadings = new D_SensorReadings();\r\n\t\t// Start pushing values to the SD.\r\n\t\treadings.start();\r\n\t\t//Gets the single instances of driver and operator, from OI. \r\n\t\tdriver = oi.getDriver();\r\n\t\toperator = oi.getOperator();\r\n\r\n\t\t//Sets our default auto to NoAuto, if the remainder of our code doesn't seem to work. \r\n\t\tauto = new G_NoAuto();\r\n\t\t\r\n\t\t//Sets our teleop commandGroup to T_TeleopGroup, which contains Kaj,ELevator, Intake, and Crossbow Commands. \r\n\t\tteleop = new T_TeleopGroup();\r\n\t\t\r\n\t}",
"protected void initialize() { \n param1 = SmartDashboard.getNumber(\"param1\");\n param2 = SmartDashboard.getNumber(\"param2\");\n param3 = SmartDashboard.getNumber(\"param3\");\n param4 = SmartDashboard.getNumber(\"param4\");\n command = new C_DriveBasedOnEncoderWithTwist(param1, param2, param3);\n }",
"@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initialized Interative TeleOp Mode\");\n telemetry.update();\n\n // Initialize the hardware variables. Note that the strings used here as parameters\n // to 'get' must correspond to the names assigned during the robot configuration\n // step (using the FTC Robot Controller app on the phone).\n leftDrive = hardwareMap.dcMotor.get(\"leftDrive\");\n rightDrive = hardwareMap.dcMotor.get(\"rightDrive\");\n armMotor = hardwareMap.dcMotor.get(\"armMotor\");\n\n leftGrab = hardwareMap.servo.get(\"leftGrab\");\n rightGrab = hardwareMap.servo.get(\"rightGrab\");\n colorArm = hardwareMap.servo.get(\"colorArm\");\n leftTop = hardwareMap.servo.get(\"leftTop\");\n rightTop = hardwareMap.servo.get(\"rightTop\");\n\n /*\n left and right drive = motion of robot\n armMotor = motion of arm (lifting the grippers)\n extendingArm = motion of slider (used for dropping the fake person)\n left and right grab = grippers to get the blocks\n */\n\n }",
"public void init() {\n // Define and Initialize Motors (note: need to use reference to actual OpMode).\n leftDrive = myOpMode.hardwareMap.get(DcMotor.class, \"left_drive\");\n rightDrive = myOpMode.hardwareMap.get(DcMotor.class, \"right_drive\");\n armMotor = myOpMode.hardwareMap.get(DcMotor.class, \"arm\");\n\n // To drive forward, most robots need the motor on one side to be reversed, because the axles point in opposite directions.\n // Pushing the left stick forward MUST make robot go forward. So adjust these two lines based on your first test drive.\n // Note: The settings here assume direct drive on left and right wheels. Gear Reduction or 90 Deg drives may require direction flips\n leftDrive.setDirection(DcMotor.Direction.REVERSE);\n rightDrive.setDirection(DcMotor.Direction.FORWARD);\n\n // If there are encoders connected, switch to RUN_USING_ENCODER mode for greater accuracy\n // leftDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n // rightDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n // Define and initialize ALL installed servos.\n leftHand = myOpMode.hardwareMap.get(Servo.class, \"left_hand\");\n rightHand = myOpMode.hardwareMap.get(Servo.class, \"right_hand\");\n leftHand.setPosition(MID_SERVO);\n rightHand.setPosition(MID_SERVO);\n\n myOpMode.telemetry.addData(\">\", \"Hardware Initialized\");\n myOpMode.telemetry.update();\n }",
"public void init() {\n robot.init(hardwareMap);\n robot.liftUpDown.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.liftRotate.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.liftRotate.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n robot.liftUpDown.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n robot.blinkinLedDriver.setPattern(RevBlinkinLedDriver.BlinkinPattern.GREEN);\n\n }",
"protected void initialize() {\n\t\tthis.oi = Robot.getInstance().getOI();\n\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 }",
"@Override\n public void init() {\n robot.init(hardwareMap, telemetry, false);\n //robot.resetServo();\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.addData(\"Status\", \"Initialized\");\n // robot.FL.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n // robot.FR.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n // robot.BL.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n // robot.BR.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n }",
"@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initializing\");\n\n // Initialize the hardware variables. Note that the strings used here as parameters\n // to 'get' must correspond to the names assigned during the robot configuration\n // step (using the FTC Robot Controller app on the phone).\n leftDrive = hardwareMap.get(DcMotor.class, \"left_drive\");\n rightDrive = hardwareMap.get(DcMotor.class, \"right_drive\");\n elev = hardwareMap.get(DcMotor.class, \"elev\");\n arm = hardwareMap.get(DcMotor.class,\"arm\");\n hook = hardwareMap.get(Servo.class,\"hook\");\n claw = hardwareMap.get(Servo.class,\"claw\");\n\n // Most robots need the motor on one side to be reversed to drive forward\n // Reverse the motor that runs backwards when connected directly to the battery\n leftDrive.setDirection(DcMotor.Direction.FORWARD);\n rightDrive.setDirection(DcMotor.Direction.REVERSE);\n elev.setDirection(DcMotor.Direction.REVERSE);\n arm.setDirection(DcMotor.Direction.REVERSE);\n elev.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n arm.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n lowerLimit = hardwareMap.digitalChannel.get(\"lower_limit\");\n upperLimit = hardwareMap.digitalChannel.get(\"upper_limit\");\n lowerLimit.setMode(DigitalChannel.Mode.INPUT);\n upperLimit.setMode(DigitalChannel.Mode.INPUT);\n\n// rightElev.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER); // Encoder on Left Elev only\n\n // Tell the driver that initialization is complete.\n telemetry.addData(\"Status\", \"Initialized\");\n }",
"protected void initialize() {\n \tif (temp.equalsIgnoreCase(\"RRR\")) {\n\t\t\tauto = AutoSelect.RightRightRight;\n\t\t}else if (temp.equalsIgnoreCase(\"RRL\")) {\n\t\t\tauto = AutoSelect.RightRightLeft;\n\t\t}else if (temp.equalsIgnoreCase(\"RLR\")) {\n\t\t\tauto = AutoSelect.RightLeftRight;\n\t\t}else if (temp.equalsIgnoreCase(\"RLL\")) {\n\t\t\tauto = AutoSelect.RightLeftLeft;\n\t\t}else if (temp.equalsIgnoreCase(\"LRR\")) {\n\t\t\tauto = AutoSelect.LeftRightRight;\n\t\t}else if (temp.equalsIgnoreCase(\"LRL\")) {\n\t\t\tauto = AutoSelect.LeftRightLeft;\n\t\t}else if (temp.equalsIgnoreCase(\"LLR\")) {\n\t\t\tauto = AutoSelect.LeftLeftRight;\n\t\t}else {\n\t\t\tauto = AutoSelect.LeftLeftLeft;\n\t\t}\n \t\n \tDriverStation.reportError(\"------------------------------------------------\", false);\n \tDriverStation.reportError(\"-------------------AutonomousMid----------------\", false);\n \tDriverStation.reportError(\"------------------\" + auto + \"--------------\", false);\n \tDriverStation.reportError(\"------------------------------------------------\", false);\n }",
"public void init() {\r\n resources = new Vector<ResourcesElement>();\r\n informations = new Vector<InformationElement>();\r\n output = null;\r\n spec = DEFAULT_SPEC;\r\n version = null;\r\n codeBase = null;\r\n href = null;\r\n allPermissions = false;\r\n j2eePermissions = false;\r\n isComponent = false;\r\n applicationDesc = null;\r\n appletDesc = null;\r\n installerDesc = null;\r\n }",
"@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initialized\");\n\n // Initialize the hardware variables. Note that the strings used here as parameters\n // to 'get' must correspond to the names assigned during the robot configuration\n // step (using the FTC Robot Controller app on the phone).\n left = hardwareMap.get(DcMotor.class, \"left\");\n right = hardwareMap.get(DcMotor.class, \"right\");\n wrist = hardwareMap.crservo.get(\"wrist\");\n extension = hardwareMap.get(DcMotor.class, \"extension\");\n lift = hardwareMap.get(DcMotor.class, \"lift\");\n\n\n //lift = hardwareMap.get(DcMotor.class, \"lift\");\n bucket = hardwareMap.servo.get(\"bucket\");\n //fBucket = hardwareMap.get(DcMotor.class, \"fBucket\");\n //fBucket.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n left.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n right.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n lift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n extension.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n collection = hardwareMap.crservo.get(\"collection\");\n //lift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n // Most robots need the motor on one side to be reversed to drive forward\n // Reverse the motor that runs backwards when connected directly to the battery\n left.setDirection(DcMotor.Direction.FORWARD);\n right.setDirection(DcMotor.Direction.REVERSE);\n //lift.setDirection(DcMotor.Direction.FORWARD);\n // fBucket.setDirection(DcMotor.Direction.FORWARD);\n lift.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n lift.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n // Tell the driver that initialization is complete.\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.addData(\"left\", left.getPower());\n telemetry.addData(\"right\", right.getPower());\n //telemetry.addData(\"lift\", lift.getPower());\n telemetry.addData(\"collection\", collection.getPower());\n //wrist.setPosition(-1);\n //telemetry.addData(\"fBucket\", fBucket.getPower());\n //Robot robot = new Robot(lift, extension, wrist, bucket, collection, drive);\n }",
"public void robotInit() {\n RobotMap.init();\n driveTrain = new DriveTrain();\n oi = new OI();\n flippy = new Flipper();\n flappy = new Flapper();\n autonomousCommand = new AutoFlip();\n \n OI.init();\n CommandBase.init();\n autoChooser = new SendableChooser();\n autoChooser.addDefault(\"Flap Left\", new AutoFlip());\n SmartDashboard.putData(\"Autonomous_Mode\", autoChooser); \n }",
"@Override\n public void init() {\n /* Initialize the hardware variables.\n * The init() method of the hardware class does all the work here\n */\n robot.init(hardwareMap);\n robot.FL.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot.FL.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n }",
"private void initDevice() {\n device = new Device();\n device.setManufacture(new Manufacture());\n device.setInput(new Input());\n device.setPrice(new Price());\n device.getPrice().setCurrency(\"usd\");\n device.setCritical(DeviceCritical.FALSE);\n }",
"public void robotInit() {\n\t\toi = new OI();\n // instantiate the command used for the autonomous period\n }",
"@Override\r\n public void init() {\r\n BackRight = hardwareMap.dcMotor.get(\"BackRight\");\r\n BackLeft = hardwareMap.dcMotor.get(\"BackLeft\");\r\n FrontRight = hardwareMap.dcMotor.get(\"FrontRight\");\r\n FrontLeft = hardwareMap.dcMotor.get(\"FrontLeft\");\r\n FrontRight.setDirection(DcMotor.Direction.REVERSE);\r\n BackRight.setDirection(DcMotor.Direction.REVERSE);\r\n\r\n TreadLeft = hardwareMap.dcMotor.get(\"TreadLeft\");\r\n TreadRight = hardwareMap.dcMotor.get(\"TreadRight\");\r\n\r\n ArmMotor = hardwareMap.dcMotor.get(\"ArmMotor\");\r\n }",
"public void robotInit()\n\t{\n\t\toi = new OI();\n\t\t// instantiate the command used for the autonomous period\n\t\t// autonomousCommand = new Driver();\n\t}",
"@Override\n public void init() {\n // Get references to dc motors and set initial mode and direction\n // It appears all encoders are reset upon robot startup, but just in case, set all motor\n // modes to Stop-And-Reset-Encoders during initialization.\n motorLeftA = hardwareMap.dcMotor.get(MOTOR_DRIVE_LEFT_A);\n motorLeftA.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n motorLeftA.setDirection(DcMotor.Direction.FORWARD);\n\n motorLeftB = hardwareMap.dcMotor.get(MOTOR_DRIVE_LEFT_B);\n motorLeftB.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n motorLeftB.setDirection(DcMotor.Direction.FORWARD);\n\n motorRightA = hardwareMap.dcMotor.get(MOTOR_DRIVE_RIGHT_A);\n motorRightA.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n motorRightA.setDirection(DcMotor.Direction.REVERSE);\n\n motorRightB = hardwareMap.dcMotor.get(MOTOR_DRIVE_RIGHT_B);\n motorRightB.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n motorRightB.setDirection(DcMotor.Direction.REVERSE);\n\n //motorGlyphLift = hardwareMap.dcMotor.get(GLYPH_LIFT);\n //motorGlyphLift.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n //motorGlyphLift.setDirection(DcMotor.Direction.FORWARD);\n\n sGlyphL = hardwareMap.servo.get(GLYPH_LEFT);\n //sGlyphL.scaleRange(0,180);\n\n sGlyphR = hardwareMap.servo.get(GLYPH_RIGHT);\n sGem = hardwareMap.servo.get(Gem);\n\n //Initialize vex motor\n sGLift = hardwareMap.crservo.get(Servo_GlyphLift);\n\n //sGLift.setPower(0);\n\n //sGLift2 = hardwareMap.servo.get(Servo_GlyphLift);\n\n BNO055IMU.Parameters parameters = new BNO055IMU.Parameters();\n parameters.angleUnit = BNO055IMU.AngleUnit.DEGREES;\n\n imu = hardwareMap.get(BNO055IMU.class, \"imu\");\n imu.initialize(parameters);\n\n imu = hardwareMap.get(BNO055IMU.class,\"imu\");\n imu.initialize(parameters);\n\n //servoGlyph1.setPosition(180);\n //servoGlyph2.setPosition(180);\n\n bDirection = true;\n }",
"@Override\n public void init() {\n \n \n rightFront = hardwareMap.dcMotor.get(\"frontR\");\n rightBack = hardwareMap.dcMotor.get(\"backR\");\n \n \n \n rightFront.setDirection(DcMotor.Direction.FORWARD); \n rightBack.setDirection(DcMotor.Direction.FORWARD);\n \n \n \n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Say\", \"Hello Driver\"); //\n }",
"protected abstract void initHardwareCriteria();",
"protected void initialize() {\n\t\tLiquidCrystal lcd = RobotMap.lcd;\n\t\tlcd.clear();\n\n\t\tRobotMap.chassisfrontLeft.set(0);\n\t\tRobotMap.chassisfrontRight.set(0);\n\t\tRobotMap.chassisrearRight.set(0);\n\t\tRobotMap.climberclimbMotor.set(0);\n\t\tRobotMap.floorfloorLift.set(0);\n\t\tRobotMap.acquisitionacquisitionMotor.set(0);\n\n\t\t\n\t\t}",
"@Override\n public void init() {\n robot.init(hardwareMap);\n telemetry.addData(\"Status\", \"Initialized\");\n }",
"public void initialize(IHD ihd_1){\n ihd1 = ihd_1;\n ihd2 = ihd_1;\n input1 = 0;\n input2 = 0;\n output1 = false;\n output2 = false;\n IHD_limit = 5;\n }",
"protected abstract void initHardwareInstructions();",
"@Override\n public void init() {\n /* Initialize the hardware variables.\n * The init() method of the hardware class does all the work here\n */\n robot.init(hardwareMap);\n\n robot.leftDriveMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot.rightDriveMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n // Possibly add a delay\n robot.leftDriveMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n robot.rightDriveMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Say\", \"Hello Driver\"); //\n }",
"public void robotInit() {\n RobotMap.init();\n initDashboardInput();\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n driveTrain = new DriveTrain();\n power = new Power();\n arm = new Arm();\n sensors = new Sensors();\n ballGrabberSubsystem = new BallGrabberSubsystem();\n winch = new Winch();\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n // OI must be constructed after subsystems. If the OI creates Commands\n //(which it very likely will), subsystems are not guaranteed to be\n // constructed yet. Thus, their requires() statements may grab null\n // pointers. Bad news. Don't move it.\n oi = new OI();\n\n // instantiate the command used for the autonomous period\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=AUTONOMOUS\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=AUTONOMOUS\n\n arcadeDrive = new ArcadeDrive();\n\n readPreferences();\n }",
"public void robotInit(){\n\t\tSmartDashboard.putNumber(\"Climber Arm Speed: \", 0.5);\n\t\tSmartDashboard.putNumber(\"Climber Winch Speed: \", 0.25);\n\t}",
"@Override\n public void init() {\n robot.init(hardwareMap);\n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Status\", \"Initialized\"); //\n }",
"@Override public void init() {\n /// Important Step 2: Get access to a list of Expansion Hub Modules to enable changing caching methods.\n all_hubs_ = hardwareMap.getAll(LynxModule.class);\n /// Important Step 3: Option B. Set all Expansion hubs to use the MANUAL Bulk Caching mode\n for (LynxModule module : all_hubs_ ) {\n switch (motor_read_mode_) {\n case BULK_READ_AUTO:\n module.setBulkCachingMode(LynxModule.BulkCachingMode.AUTO);\n break;\n case BULK_READ_MANUAL:\n module.setBulkCachingMode(LynxModule.BulkCachingMode.MANUAL);\n break;\n case BULK_READ_OFF:\n default:\n module.setBulkCachingMode(LynxModule.BulkCachingMode.OFF);\n break;\n }\n }\n\n /// Use the hardwareMap to get the dc motors and servos by name.\n\n motorLF_ = hardwareMap.get(DcMotorEx.class, lfName);\n motorLB_ = hardwareMap.get(DcMotorEx.class, lbName);\n motorRF_ = hardwareMap.get(DcMotorEx.class, rfName);\n motorRB_ = hardwareMap.get(DcMotorEx.class, rbName);\n motorLF_.setDirection(DcMotor.Direction.REVERSE);\n motorLB_.setDirection(DcMotor.Direction.REVERSE);\n\n // map odometry encoders\n verticalLeftEncoder = hardwareMap.get(DcMotorEx.class, verticalLeftEncoderName);\n verticalRightEncoder = hardwareMap.get(DcMotorEx.class, verticalRightEncoderName);\n horizontalEncoder = hardwareMap.get(DcMotorEx.class, horizontalEncoderName);\n\n if( USE_ENCODER_FOR_TELEOP ) {\n motorLF_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorLF_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motorLB_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorLB_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motorRF_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorRF_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motorRB_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorRB_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n verticalLeftEncoder.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n verticalRightEncoder.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n horizontalEncoder.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n motorLF_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motorLB_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motorRF_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motorRB_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n }\n\n if( USE_INTAKE ) {\n motor_left_intake_ = hardwareMap.get(DcMotorEx.class, \"motorLeftIntake\");\n motor_right_intake_ = hardwareMap.get(DcMotorEx.class, \"motorRightIntake\");\n motor_right_intake_.setDirection(DcMotor.Direction.REVERSE) ;\n\n motor_left_intake_.setMode( DcMotor.RunMode.STOP_AND_RESET_ENCODER );\n motor_left_intake_.setMode( DcMotor.RunMode.RUN_USING_ENCODER );\n motor_right_intake_.setMode( DcMotor.RunMode.STOP_AND_RESET_ENCODER );\n motor_right_intake_.setMode( DcMotor.RunMode.RUN_USING_ENCODER );\n\n servo_left_intake_ = hardwareMap.servo.get(\"servoLeftIntake\");\n servo_left_intake_pos_ = CR_SERVO_STOP ;\n servo_left_intake_.setPosition(CR_SERVO_STOP);\n servo_right_intake_ = hardwareMap.servo.get(\"servoRightIntake\");\n servo_right_intake_pos_ = CR_SERVO_STOP ;\n servo_right_intake_.setPosition(CR_SERVO_STOP);\n }\n if( USE_LIFT ) {\n motor_lift_ = hardwareMap.get(DcMotorEx.class, \"motorLift\");\n motor_lift_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motor_lift_.setMode( DcMotor.RunMode.STOP_AND_RESET_ENCODER );\n power_lift_ = 0.0;\n if( USE_RUN_TO_POS_FOR_LIFT ) {\n motor_lift_.setTargetPosition(0);\n motor_lift_.setMode( DcMotor.RunMode.RUN_TO_POSITION ); // must call setTargetPosition() before switching to RUN_TO_POSISTION\n } else {\n motor_lift_.setMode( DcMotor.RunMode.RUN_USING_ENCODER);\n }\n last_stone_lift_enc_ = -1;\n }\n\n if( USE_STONE_PUSHER ) {\n servo_pusher_ = hardwareMap.servo.get(\"servoPusher\");\n servo_pusher_.setPosition(PUSHER_INIT);\n servo_pusher_pos_ = PUSHER_INIT;\n }\n if( USE_STONE_GATER ) {\n servo_gater_ = hardwareMap.servo.get(\"servoGater\");\n servo_gater_.setPosition(GATER_INIT);\n servo_gater_pos_ = GATER_INIT;\n }\n\n if( USE_ARM ) {\n servo_arm_ = hardwareMap.servo.get(\"servoArm\");\n servo_arm_.setPosition(ARM_INIT);\n servo_arm_pos_ = ARM_INIT;\n servo_claw_ = hardwareMap.servo.get(\"servoClaw\");\n servo_claw_.setPosition(CLAW_OPEN);\n servo_claw_pos_ = CLAW_OPEN;\n }\n\n if( USE_HOOKS ) {\n servo_left_hook_ = hardwareMap.servo.get(\"servoLeftHook\");\n servo_left_hook_.setPosition(LEFT_HOOK_UP);\n servo_left_hook_pos_ = LEFT_HOOK_UP;\n servo_right_hook_ = hardwareMap.servo.get(\"servoRightHook\");\n servo_right_hook_.setPosition(RIGHT_HOOK_UP);\n servo_right_hook_pos_ = RIGHT_HOOK_UP;\n }\n\n if( USE_PARKING_STICKS ) {\n servo_left_park_ = hardwareMap.servo.get(\"servoLeftPark\");\n servo_left_park_.setPosition(LEFT_PARK_IN);\n servo_left_park_pos_ = LEFT_PARK_IN;\n servo_right_park_ = hardwareMap.servo.get(\"servoRightPark\");\n servo_right_park_.setPosition(RIGHT_PARK_IN);\n servo_right_park_pos_ = RIGHT_PARK_IN;\n }\n\n if( USE_RGB_FOR_STONE ) {\n rev_rgb_range_ = hardwareMap.get(LynxI2cColorRangeSensor.class, \"stoneColor\");\n //rev_rgb_range_ = hardwareMap.get(LynxI2cColorRangeSensor.class, \"stoneColorV3\"); // different interface for V3, can't define it as LynxI2cColorRangeSensor anymore, 2020/02/29\n if( rev_rgb_range_!=null ) {\n if( AUTO_CALIBRATE_RGB ) {\n int alpha = rev_rgb_range_.alpha();\n //double dist = rev_rgb_range_.getDistance(DistanceUnit.CM);\n double dist = rev_rgb_range_.getDistance(DistanceUnit.METER);\n if( alpha>=MIN_RGB_ALPHA && alpha<100000 ) {\n rev_rgb_alpha_init_ = alpha;\n }\n if( AUTO_CALIBRATE_RGB_RANGE && !Double.isNaN(dist) ) {\n if( dist>MIN_RGB_RANGE_DIST && dist<MAX_RGB_RANGE_DIST ) {\n rev_rgb_dist_init_ = dist;\n }\n }\n }\n }\n }\n if( USE_RGBV3_FOR_STONE ) {\n //rgb_color_stone_ = hardwareMap.get(ColorSensor.class, \"stoneColorV3\");\n rgb_range_stone_ = hardwareMap.get(DistanceSensor.class, \"stoneColorV3\");\n if( AUTO_CALIBRATE_RANGE && rgb_range_stone_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RGB_RANGE_STONE);\n if( dis>0.0 && dis<0.2 ) {\n rgb_range_stone_dist_init_ = dis;\n break;\n }\n }\n }\n }\n\n if( USE_RIGHT_RANGE ) {\n range_right_ = (Rev2mDistanceSensor) (hardwareMap.get(DistanceSensor.class, \"rightRange\"));\n if( AUTO_CALIBRATE_RANGE && range_right_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RANGE_RIGHT);\n if( dis>0.01 && dis<2.0 ) {\n range_right_dist_init_ = dis;\n break;\n }\n }\n }\n }\n if( USE_LEFT_RANGE ) {\n range_left_ = (Rev2mDistanceSensor) (hardwareMap.get(DistanceSensor.class, \"leftRange\"));\n if( AUTO_CALIBRATE_RANGE && range_left_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RANGE_LEFT);\n if( dis>0.01 && dis<2.0 ) {\n range_left_dist_init_ = dis;\n break;\n }\n }\n }\n }\n\n if( USE_RANGE_FOR_STONE) {\n range_stone_ = (Rev2mDistanceSensor) (hardwareMap.get(DistanceSensor.class, \"stoneRange\"));\n if( AUTO_CALIBRATE_RANGE && range_stone_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RANGE_STONE);\n if( dis>0.01 && dis<0.5 ) {\n range_stone_dist_init_ = dis;\n break;\n }\n }\n }\n }\n\n if( USE_INTAKE_MAG_SWITCH ) {\n intake_mag_switch_ = hardwareMap.get(DigitalChannel.class, \"intake_mag_switch\");\n intake_mag_switch_.setMode(DigitalChannelController.Mode.INPUT);\n intake_mag_prev_state_ = intake_mag_switch_.getState();\n intake_mag_change_time_ = 0.0;\n }\n if( USE_STONE_LIMIT_SWITCH ) {\n stone_limit_switch_ = hardwareMap.get(DigitalChannel.class, \"stone_limit_switch\");\n stone_limit_switch_.setMode(DigitalChannelController.Mode.INPUT);\n stone_limit_switch_prev_state_ = stone_limit_switch_.getState();\n }\n\n\n /////***************************** JOY STICKS *************************************/////\n\n /// Set joystick deadzone, any value below this threshold value will be considered as 0; moved from init() to init_loop() to aovid crash\n if(gamepad1!=null) gamepad1.setJoystickDeadzone( JOYSTICK_DEAD_ZONE );\n if(gamepad2!=null) gamepad2.setJoystickDeadzone( JOYSTICK_DEAD_ZONE );\n\n resetControlVariables();\n }",
"public void robotInit() {\n\t\toi = new OI();\n chooser = new SendableChooser();\n chooser.addDefault(\"Default Auto\", new ExampleCommand());\n// chooser.addObject(\"My Auto\", new MyfAutoCommand());\n SmartDashboard.putData(\"Auto mode\", chooser);\n \n //Drive\n //this.DriveTrain = new DriveTrain();\n \t//RobotMap.robotDrive1.arcadeDrive(oi.stickLeft);\n \n //Buttons\n // oi.button1.whenPressed(new SetMaxMotorOutput());\n \n //Ultrasonic\n sonic1 = new Ultrasonic(0,1);\n sonic1.setAutomaticMode(true);\n \n }",
"public void robotInit() {\n\t\toi = new OI();\n\t\t\n\t\tteleopCommand = new TeleopCommand();\n }",
"public void initialize()\n {\n }",
"@Override\n public void init() {\n\n stevens_IMU = new AdafruitBNO055IMU(hardwareMap.i2cDeviceSynch.get(\"IMU\"));\n\n parameters = new BNO055IMU.Parameters();\n\n success = stevens_IMU.initialize(parameters);\n telemetry.addData(\"Success: \", success);\n\n doDaSleep(500);\n\n }",
"@Override\n public void init() {\n leftDrive = hardwareMap.get(DcMotor.class, \"left_drive\");\n rightDrive = hardwareMap.get(DcMotor.class, \"right_drive\");\n }",
"@objid (\"4bb3363c-38e1-48f1-9894-6dceea1f8d66\")\n public void init() {\n }",
"public void initialiseCRISTDiscovery() {\n\t}",
"@Override\n public void init() {\n\n robot.init(hardwareMap);\n\n // Tell the driver that initialization is complete.\n\n telemetry.addData(\"Robot Mode:\", \"Initialized\");\n telemetry.update();\n }",
"public void init() {\n \n }",
"public static void initialize()\n\t{\n\t\t// USB\n\t\tdriveJoystick = new EJoystick(getConstantAsInt(USB_DRIVE_STICK));\n\t\tcontrolGamepad = new EGamepad(getConstantAsInt(USB_CONTROL_GAMEPAD));\n\n\t\t// Power Panel\n\t\tpowerPanel = new PowerDistributionPanel();\n\n\t\t//Compressor\n\t\tcompressor = new Compressor(Constants.getConstantAsInt(Constants.PCM_CAN));\n\t\tcompressor.start();\n\t}",
"@BeforeEach\n @SuppressWarnings(\"unchecked\")\n public void init() {\n SENTINEL_VALUE = \"$$$\";\n PIPE_CAPACITY = 40;\n STOP_WORDS = new String[] { \"a\", \"am\", \"an\", \"and\", \"at\", \"on\", \"or\", \"so\", \"the\" };\n STOP_WORDS_MAP = new HashMap<>();\n Arrays.stream(STOP_WORDS).forEach(w -> STOP_WORDS_MAP.put(w.toLowerCase(), true));\n\n\n input = (Pipe<String>) PipeFactory.build(\"java.lang.String\", 100);\n output = (Pipe<String>) PipeFactory.build(\"java.lang.String\", 100);\n signal = new CountDownLatch(1);\n }",
"@Override\n public void robotInit() \n {\n CommandBase.init();\n PIDCommandBase.init();\n\n CameraServer.getInstance().startAutomaticCapture();\n\n start.addDefault(\"Left\", Autonomous.StartPosition.LEFT);\n start.addObject(\"Center\", Autonomous.StartPosition.CENTER);\n start.addObject(\"Right\", Autonomous.StartPosition.RIGHT);\n SmartDashboard.putData(\"Start\", start);\n \n chooser.addObject(\"Scale\", Autonomous.AutoMode.SCALE);\n chooser.addObject(\"Switch\", Autonomous.AutoMode.SWITCH);\n chooser.addDefault(\"Drive\", Autonomous.AutoMode.DRIVE);\n SmartDashboard.putData(\"Auto Mode\", chooser);\n\n compressor = new Compressor();\n compressor.start();\n }",
"private void init(String flag, String description) {\r\n\t\t\tthis.flag = flag;\r\n\t\t\tisDefault = false;\r\n\t\t\tsupported = false;\r\n\t\t\tvalue = null;\r\n\t\t\t\r\n\t\t\tif(description != null) {\r\n\t\t\t\tMatcher matcher = Pattern.compile(\"(.+?);(.+)\").matcher(description);\r\n\t\t\t\tif(matcher.matches()) {\r\n\t\t\t\t\tthis.supportedValues = matcher.group(1).trim();\r\n\t\t\t\t\tthis.description = matcher.group(2).trim();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.description = description.trim();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}",
"public void init() {\n\t\t}",
"public void init(HardwareMap ahwMap) {\n // Save reference to Hardware map\n hwMap = ahwMap;\n\n // Define and Initialize Motors\n// imu = hwMap.get(BNO055IMU.class, \"imu\");\n\n leftFront = hwMap.get(DcMotor.class, \"left_front\");//hub2 - port 0\n rightFront = hwMap.get(DcMotor.class, \"right_front\");//hub2 - port 1\n leftBack = hwMap.get(DcMotor.class, \"left_back\");//hub2 - port 2\n rightBack = hwMap.get(DcMotor.class, \"right_back\");//hub2 - port 3\n\n leftFront.setDirection(DcMotor.Direction.FORWARD);\n leftBack.setDirection(DcMotor.Direction.FORWARD);\n rightFront.setDirection(DcMotor.Direction.FORWARD);\n rightBack.setDirection(DcMotor.Direction.FORWARD);\n\n leftFront.setPower(0);\n leftBack.setPower(0);\n rightFront.setPower(0);\n rightBack.setPower(0);\n\n\n // May want to use RUN_USING_ENCODERS if encoders are installed.\n }",
"@Override\r\n public void init() {\r\n // Define and Initialize Motors\r\nFL = hardwareMap.get(DcMotor.class, \"Front Left\");\r\n FR = hardwareMap.get(DcMotor.class, \"Front Right\");\r\n BL = hardwareMap.get(DcMotor.class, \"Back Left\");\r\n BR = hardwareMap.get(DcMotor.class, \"Back Right\");\r\n\r\n\r\nFL.setDirection(DcMotor.Direction.FORWARD);\r\n FR.setDirection(DcMotor.Direction.REVERSE);\r\n BL.setDirection(DcMotor.Direction.FORWARD);\r\n BR.setDirection(DcMotor.Direction.REVERSE);\r\n // Set all motors to zero power\r\n FL.setPower(0);\r\n FR.setPower(0);\r\n BL.setPower(0);\r\n BR.setPower(0); }",
"public void initialize() {\n leftfrontmotor.setIdleMode(CANSparkMax.IdleMode.kBrake);\n leftrearmotor.setIdleMode(CANSparkMax.IdleMode.kBrake);\n rightfrontmotor.setIdleMode(CANSparkMax.IdleMode.kBrake);\n rightrearmotor.setIdleMode(CANSparkMax.IdleMode.kBrake);\n\n leftfrontmotor.setOpenLoopRampRate(Constants.DriveBase.MotorControllers.openramprate);\n leftrearmotor.setOpenLoopRampRate(Constants.DriveBase.MotorControllers.openramprate);\n rightfrontmotor.setOpenLoopRampRate(Constants.DriveBase.MotorControllers.openramprate);\n rightrearmotor.setOpenLoopRampRate(Constants.DriveBase.MotorControllers.openramprate);\n \n\n // More Motor Tunes (to occur during each initialization period):\n leftfrontmotor.getEncoder().setPositionConversionFactor(Constants.DriveBase.Encoders.encoderconversion);\n leftrearmotor.getEncoder().setPositionConversionFactor(Constants.DriveBase.Encoders.encoderconversion);\n rightfrontmotor.getEncoder().setPositionConversionFactor(Constants.DriveBase.Encoders.encoderconversion);\n rightrearmotor.getEncoder().setPositionConversionFactor(Constants.DriveBase.Encoders.encoderconversion);\n\n turnController.setSetpoint(Constants.DriveBase.Controllers.zero);\n turnController.setTolerance(Constants.DriveBase.Controllers.turntollerance);\n\n driveController.setSetpoint(Constants.DriveBase.Controllers.zero);\n driveController.setTolerance(Constants.DriveBase.Controllers.drivetollerance);\n\n ballTurnController.setSetpoint(Constants.DriveBase.Controllers.zero);\n ballTurnController.setTolerance(Constants.DriveBase.Controllers.balltollerance);\n\n ballDriveController.setSetpoint(Constants.DriveBase.Controllers.balldrive);\n ballDriveController.setTolerance(Constants.DriveBase.Controllers.balldrivetollerance);\n \n reset();\n }",
"@Override\n public void init() {\n touchSensor1 = hardwareMap.touchSensor.get(\"touchSensor1\");\n lightSensor1 = hardwareMap.lightSensor.get(\"lightSensor1\");\n motorLeft1 = hardwareMap.dcMotor.get(\"motorLeft1\");\n motorLeft2 = hardwareMap.dcMotor.get(\"motorLeft2\");\n motorRight1 = hardwareMap.dcMotor.get(\"motorRight1\");\n motorRight2 = hardwareMap.dcMotor.get(\"motorRight2\");\n\n //Setup Hardware\n motorLeft1.setDirection(DcMotor.Direction.REVERSE);\n motorLeft2.setDirection(DcMotor.Direction.REVERSE);\n\n // Set up the parameters with which we will use our IMU. Note that integration\n // algorithm here just reports accelerations to the logcat log; it doesn't actually\n // provide positional information.\n BNO055IMU.Parameters parameters = new BNO055IMU.Parameters();\n parameters.angleUnit = BNO055IMU.AngleUnit.DEGREES;\n parameters.accelUnit = BNO055IMU.AccelUnit.METERS_PERSEC_PERSEC;\n parameters.calibrationDataFile = \"AdafruitIMUCalibration.json\"; // see the calibration sample opmode\n parameters.loggingEnabled = true;\n parameters.loggingTag = \"IMU\";\n // parameters.accelerationIntegrationAlgorithm = new JustLoggingAccelerationIntegrator();\n\n // Retrieve and initialize the IMU. We expect the IMU to be attached to an I2C port\n // on a Core Device Interface Module, configured to be a sensor of type \"AdaFruit IMU\",\n // and named \"imu\".\n imu = hardwareMap.get(BNO055IMU.class, \"imu\");\n imu.initialize(parameters);\n\n currentState = MotorState.WAIT_TO_START;\n nextState = MotorState.WAIT_TO_START;\n count = 0;\n composeTelemetry();\n }",
"protected void initialize ()\n\t{\n\t\tSubsystems.goalVision.processNewImage();\n\t\t\n \t//Send positive values to go forwards.\n \tSubsystems.transmission.setLeftJoystickReversed(true);\n \tSubsystems.transmission.setRightJoystickReversed(true);\n\t}",
"protected void initialize() {\n\t\televator.zeroEncoder();\n\t}",
"protected void initialize() {\n\t\tRobot.motor.getPIDController().setPID(SmartDashboard.getDouble(\"MotorP\"), SmartDashboard.getDouble(\"MotorI\"), SmartDashboard.getDouble(\"MotorD\"));\n\t\tRobot.motor.setOutputRange(0, 1);\n\t\tRobot.motor.setSetpoint(SmartDashboard.getDouble(\"MotorSpeed\"));\n \tRobot.motor.enable();\n }",
"public void initialize(IHD ihd_1, IHD ihd_2){\n ihd1 = ihd_1;\n ihd2 = ihd_2;\n input1 = 0;\n input2 = 0;\n output1 = false;\n output2 = false;\n IHD_limit = 30;\n }",
"@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initialized\");\n\n // Initialize the hardware variables. Note that the strings used here as parameters\n // to 'get' must correspond to the names assigned during the robot configuration\n // step (using the FTC Robot Controller app on the phone).\n\n VinceHardwareBruinBot robot = new VinceHardwareBruinBot();\n // Inititalize last wheel speed\n for (int i = 0; i < lastwheelSpeeds.length; i++){\n lastwheelSpeeds[i] = 0;\n }\n robot.init(hardwareMap);\n {\n //init all drive wheels\n leftFrontDrive = robot.leftFrontDrive;\n rightFrontDrive = robot.rightFrontDrive;\n leftRearDrive = robot.leftRearDrive;\n rightRearDrive = robot.rightRearDrive;\n\n // init all other motors & servos\n intakeMotor = robot.intakeMotor;\n wobbleMotor = robot.wobbleMotor;\n ringShooterMotor = robot.ringShooterMotor;\n\n fireServo = robot.fireServo;\n\n //init imu\n imu = robot.imu;\n }\n initVuforiaNavigation();\n\n // Reset the wobble motor - Use a repeatable starting position\n wobbleMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n /*\n // Get PID constants for wobble motor\n int motorIndex = ((robot.wobbleMotor).getPortNumber());\n DcMotorControllerEx motorControllerEx = (DcMotorControllerEx)robot.wobbleMotor.getController();\n PIDCoefficients pidModified = motorControllerEx.getPIDCoefficients(motorIndex, DcMotor.RunMode.RUN_TO_POSITION);\n\n // change coefficients using methods included with DcMotorEx class.\n PIDCoefficients pidNew = new PIDCoefficients(10, 2, 3);\n motorControllerEx.setPIDCoefficients(motorIndex, DcMotor.RunMode.RUN_TO_POSITION, pidNew);\n */\n //wobbleMotor.setPIDFCoefficients(DcMotor.RunMode.RUN_TO_POSITION,pidNew);\n // Tell the driver that initialization is complete.\n telemetry.addData(\"Status\", \"Initialized\");\n }",
"public void initFromResource() {\n String[] hwStrings = Resources.getSystem().getStringArray(17236074);\n if (hwStrings != null) {\n for (String hwString : hwStrings) {\n HardwareConfig hw = new MtkHardwareConfig(hwString);\n if (hw.type == 0) {\n updateOrInsert(hw, mModems);\n } else if (hw.type == 1) {\n updateOrInsert(hw, mSims);\n }\n }\n }\n }",
"private void initialiseByHand() {\n Configuration production = new Configuration(\"api.example.com\", false, 2000);\n Configuration staging = new Configuration(\"api-staging.example.com\", false, 2000);\n Configuration debug = new Configuration(\"api-dev.example.com\", true, 1000);\n Map<String, Configuration> baseVariants = new HashMap<>();\n baseVariants.put(PRODUCTION, production);\n baseVariants.put(STAGING, staging);\n baseVariants.put(DEBUG, debug);\n Neanderthal.initialise(this, baseVariants, PRODUCTION);\n }",
"@Override public void init() {\n drive = MecanumDrive.standard(hardwareMap); // Comment this line if you, for some reason, don't need to use the drive motors\n\n // Uncomment the next three lines if you need to use the gyroscope\n // gyro = IMUGyro.standard(hardwareMap);\n // gyro.initialize();\n // gyro.calibrate();\n\n // Uncomment the next two lines if you need to use the vision system\n // vision = new Vision(hardwareMap);\n // vision.init();\n\n // Uncomment the next line if you have a servo\n // myServo = hardwareMap.get(Servo.class, \"myServo\");\n\n /** Place any code that should run when INIT is pressed here. **/\n }",
"public Circuit(String s) {\r\n name = s;\r\n }",
"@Override\n public void init() {\n /* Initialize the hardware variables.\n * The init() method of the hardware class does all the work here\n */\n robot.init(hardwareMap);\n\n //ColorSensor colorSensor;\n //colorSensor = hardwareMap.get(ColorSensor.class, \"Sensor_Color\");\n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Say\", \"Hello Driver\"); //\n }",
"public void robotInit() {\n RobotMap.init();\n driveWithJoystick = new DriveTrain();\n \n oi = new OI();\n }",
"@Override\n public void init() {\n runtime.reset();\n robot.init(hardwareMap);\n\n telemetry.addData(\"Status\", \"Initialized\");\n }",
"public static void init() {\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n drivetrainSpeedController1 = new CANTalon(1);\n LiveWindow.addActuator(\"Drivetrain\", \"Speed Controller 1\", (CANTalon) drivetrainSpeedController1);\n \n drivetrainSpeedController2 = new CANTalon(2);\n LiveWindow.addActuator(\"Drivetrain\", \"Speed Controller 2\", (CANTalon) drivetrainSpeedController2);\n drivetrainSpeedController3 = new CANTalon(3);\n LiveWindow.addActuator(\"Drivetrain\", \"Speed Controller 2\", (CANTalon) drivetrainSpeedController3);\n drivetrainSpeedController4 = new CANTalon(4);\n LiveWindow.addActuator(\"Drivetrain\", \"Speed Controller 2\", (CANTalon) drivetrainSpeedController4);\n drivetrainSpeedController5 = new CANTalon(5);\n LiveWindow.addActuator(\"Drivetrain\", \"Speed Controller 2\", (CANTalon) drivetrainSpeedController5);\n drivetrainSpeedController6 = new CANTalon(6);\n LiveWindow.addActuator(\"Drivetrain\", \"Speed Controller 2\", (CANTalon) drivetrainSpeedController6);\n \n drivetrainRobotDrive21 = new RobotDrive(drivetrainSpeedController1, drivetrainSpeedController2, drivetrainSpeedController3, drivetrainSpeedController4, drivetrainSpeedController5, drivetrainSpeedController6);\n \n drivetrainRobotDrive21.setSafetyEnabled(true);\n drivetrainRobotDrive21.setExpiration(0.1);\n drivetrainRobotDrive21.setSensitivity(0.5);\n drivetrainRobotDrive21.setMaxOutput(1.0);\n\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n }",
"public static void chsrInit(){\n for(int i = 0; i < chsrDesc.length; i++){\n chsr.addOption(chsrDesc[i], chsrNum[i]);\n }\n chsr.setDefaultOption(chsrDesc[2] + \" (Default)\", chsrNum[2]); //Default MUST have a different name\n SmartDashboard.putData(\"JS/Choice\", chsr);\n SmartDashboard.putString(\"JS/Choosen\", chsrDesc[chsr.getSelected()]); //Put selected on sdb\n }",
"public void init() {\r\n\r\n\t}",
"public void robotInit() {\n\t\t\n\t\tupdateDashboard();\n\t\t\n \tautoChooser = new SendableChooser();\n \tautoChooser.addDefault(\"Default Autonomous does nothing!\", new Default());\n \t// Default Autonomous does nothing\n \tautoChooser.addObject(\"Cross the Low Bar Don't Run This it doesn't work\", new LowBar());\n \tautoChooser.addObject(\"Cross Rough Patch/Stone Wall\", new Main());\n \tautoChooser.addObject(\"Cross the Low Bar, Experimental!\", new LowBarEx());\n \t//autoChooser.addObject(\"If Jonathan lied to us and we can cross twice\", new RoughPatch());\n \tCameraServer server = CameraServer.getInstance();\n\n \tserver.setQuality(50);\n \t\n \tSmartDashboard.putData(\"Autonomous\", autoChooser);\n\n \tserver.startAutomaticCapture(\"cam0\");\n \tLowBar.gyro.reset();\n \t\n \tDriverStation.reportWarning(\"The Robot is locked and loaded. Time to kick some ass guys!\", !(server.isAutoCaptureStarted()));\n\n\t}",
"@Override\n\tpublic void robotInit() {\n\t\tm_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n\t\tm_chooser.addOption(\"My Auto\", kCustomAuto);\n\t\tSmartDashboard.putData(\"Auto choices\", m_chooser);\n\n\t\tJoy = new Joystick(0);\n\t\ts1 = new DoubleSolenoid(1, 0);\n\t\ts2 = new DoubleSolenoid(2, 3);\n\t\tairCompressor = new Compressor();\n\t\ttriggerValue = false;\n\t\ts1Value = false;\n\t}",
"public void init() {\n\n\t}",
"public void init() {\n\n\t}",
"public void init() {\n\n\t}",
"public void initialize() {\n // TODO\n }",
"@Override\n protected void initialize() {\n hpIntake.setMode(HatchPanelIntake.Follower.WRIST, HBRSubsystem.Mode.PID);\n hpIntake.setPIDMode(HatchPanelIntake.Follower.WRIST, HBRSubsystem.PIDMode.POSITION);\n hpIntake.setILimit(HatchPanelIntake.Follower.WRIST, 0);\n hpIntake.setFeedforward(HatchPanelIntake.Follower.WRIST, 0.0, 0.0, 0.0);\n hpIntake.setFeedback(HatchPanelIntake.Follower.WRIST, 0.3, 0.0, 0.0);\n hpIntake.resetIntegrator(HatchPanelIntake.Follower.WRIST);\n hpIntake.setEnabled(true);\n hpIntake.setSetpoint(HatchPanelIntake.Follower.WRIST, HatchPanelIntake.positions[position.ordinal()]);\n hpIntake.tellSetpoint(HatchPanelIntake.positions[position.ordinal()]);\n }",
"public void init() {\n }",
"public void init() {\n }",
"public void init() {\n }",
"public void init() {\n }",
"private void init() {\n }",
"private void init() {\n }",
"private void init() {\n }",
"private void init() {\n }",
"public Scania() {\r\n\t\tinitList();\r\n\t\tmakerName = \"Scania\";\r\n\t\tRandom rand = new Random();\r\n\t\tint chooseBit = rand.nextInt(2); // higher chance of better one ;)\r\n\t\tif (chooseBit == 1) {\r\n\t\t\tmodelName = \"R 2012\";\r\n\t\t} else {\r\n\t\t\tmodelName = \"Streamline\";\r\n\t\t}\r\n\t}",
"private void init() {\n }",
"@Override\n\tpublic void teleopInit() {\n\t\tif (m_autonomousCommand != null) {\n\t\t\tm_autonomousCommand.cancel();\n\t\t}\n\t\t\n\t\tSmartDashboard.putData(\"Stow Robot\", new PreMatchPresets());\n\t\t\n\t\tgetSwitchColor();\n\t\tchassis.chassisInit();\n\t\tintake.intakeInit();\n\t\tarm.armInit();\n\t\televator.elevatorInit();\n\t\tSmartDashboard.putNumber(\"Arm Pot Value\", Robot.arm.getArmPot());\n\n//\t\tSmartDashboard.putData(\"high\", new ShuttleHigh());\n\t}",
"private void initHardware(){\n }",
"public RobotNumInit() {\n initComponents();\n setName(\"InitRobotCard\");\n }",
"@Override\r\n public void init() {\r\n /* Initialize the hardware variables.\r\n * The init() method of the hardware class does all the work here\r\n */\r\n robot.init(hardwareMap);\r\n\r\n // Send telemetry message to signify robot waiting;\r\n telemetry.addData(\"Status\", \"Initialized\");\r\n }",
"@Override\n public void init() {\n imu = new IMU(hardwareMap, \"imu\");\n left = hardwareMap.get(DcMotor.class, \"left\");\n right = hardwareMap.get(DcMotor.class, \"right\");\n\n left.setDirection(DcMotorSimple.Direction.FORWARD);\n right.setDirection(DcMotorSimple.Direction.REVERSE);\n }",
"private void initialize() {\n }",
"@Override \n public void init() {\n intakeLeft = hardwareMap.crservo.get(\"intakeLeft\");\n intakeRight = hardwareMap.crservo.get(\"intakeRight\");\n topLeft = hardwareMap.servo.get(\"topLeft\");\n bottomLeft = hardwareMap.servo.get(\"bottomRight\");\n topRight = hardwareMap.servo.get(\"topRight\");\n bottomRight = hardwareMap.servo.get(\"bottomRight\");\n lift = hardwareMap.dcMotor.get(\"lift\");\n }",
"public void initialize() {\r\n }",
"protected void initialize() {\n translator = new PIDOutputTranslator();\n controller = new PIDController(0.0001, 0, 0, pitch.pitchEncoder, translator);\n \n //controller.setSetpoint(pitch.getEncoder() + angle);\n //controller.setPercentTolerance(1);\n \n //THIS IS NOT THE RIGHT RANGE\n //I made it this way so that we would not break the robot\n //we need to test the range of the encoder\n //we need to find where zero is\n //then we can update this input range!\n //controller.setInputRange(0, 1);\n //controller.enable();\n }",
"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}",
"private void init() {\n myNodeDetails = new NodeDetails();\n try {\n //port will store value of port used for connection\n //eg: port = 5554*2 = 11108\n String port = String.valueOf(Integer.parseInt(getMyNodeId()) * 2);\n //nodeIdHash will store hash of nodeId =>\n // eg: nodeIdHash = hashgen(5554)\n String nodeIdHash = genHash(getMyNodeId());\n myNodeDetails.setPort(port);\n myNodeDetails.setNodeIdHash(nodeIdHash);\n myNodeDetails.setPredecessorPort(port);\n myNodeDetails.setSuccessorPort(port);\n myNodeDetails.setSuccessorNodeIdHash(nodeIdHash);\n myNodeDetails.setPredecessorNodeIdHash(nodeIdHash);\n myNodeDetails.setFirstNode(true);\n\n if (getMyNodeId().equalsIgnoreCase(masterPort)) {\n chordNodeList = new ArrayList<NodeDetails>();\n chordNodeList.add(myNodeDetails);\n }\n\n } catch (Exception e) {\n Log.e(TAG,\"**************************Exception in init()**********************\");\n e.printStackTrace();\n }\n }",
"public void init() {\n\t\t\n\t}",
"public static void init() {\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n\n frisbeeRollerFrisbeeRoller = new Talon(FRISBEE_ROLLER_CHANNEL);\n\n conveyorMotor = new Talon(CONV_MOTOR_CHANNEL);\n\n spatulaMotor = new Relay(SPATULA_MOTOR_CHANNEL);\n\n loadTalon = new Talon(LOADER_TALON);\n\n elevateTalon = new Talon(ELEVATE_TALON);\n\n try {\n driveTrainrearRightTalon = new CANJaguar(REAR_RIGHT_JAG_CHANNEL);\n\n driveTrainfrontRightTalon = new CANJaguar(FRONT_RIGHT_JAG_CHANNEL);\n\n driveTrainfrontLeftTalon = new CANJaguar(FRONT_LEFT_JAG_CHANNEL);\n\n driveTrainrearLeftTalon = new CANJaguar(REAR_LEFT_JAG_CHANNEL);\n\n shootershooterJag = new CANJaguar(SHOOTER_JAG_CHANNEL);\n } catch (CANTimeoutException ex) {\n ex.printStackTrace();\n }\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n }",
"@Override\r\n\tpublic void init() { \r\n\t\t\r\n\t\tsession = -1;\r\n\t\t\r\n\t\tProgressDif = 0;\r\n\t\tnoisFact = 0;\r\n\t\tcompromiseFact = 0;\r\n\t\t\r\n\t\tcompromiseLearn = 20;\r\n\t\tprogressLearn = 10;\r\n\t\tnoisLearn = 0.2;\r\n\t\t\r\n\t\treservationPanic = 0.2;\r\n\t\tmyBids = new ArrayList<Pair<Bid,Double>>();\r\n\t\topponentBidsA = new Vector<ArrayList<Pair<Bid,Double>>>();\r\n\t\topponentBidsB = new Vector<ArrayList<Pair<Bid,Double>>>();\r\n\r\n\t\tdf = utilitySpace.getDiscountFactor();\r\n\t\tif (df==0) df = 1; \r\n\r\n\t\ttry {\r\n\t\t\tinitStates();\r\n\t\t} catch (Exception e) {\r\n \t\t\te.printStackTrace();\r\n\t\t}\t\t\r\n\t}",
"@Override\n public void robotInit()\n {\n wireUpOperatorInterface();\n chooser.setDefaultOption(\"Default Auto\", driveCommand);\n // chooser.addOption(\"My Auto\", new MyAutoCommand());\n SmartDashboard.putData(\"Auto mode\", chooser);\n }",
"public void init() {\n\t\tinit(\"1,0 3,0 5,0 7,0 9,0 0,1 2,1 4,1 6,1 8,1 1,2 3,2 5,2 7,2 9,2 0,3 2,3 4,3 6,3 8,3\", \n\t\t\t \"1,6 3,6 5,6 7,6 9,6 0,7 2,7 4,7 6,7 8,7 1,8 3,8 5,8 7,8 9,8 0,9 2,9 4,9 6,9 8,9\"); \n }",
"public void init (HardwareMap ahwMap) {\n\n hwMap = ahwMap;\n\n // Initialize the hardware variables.\n lDrive = hwMap.get(DcMotor.class, \"lDrive\");\n rDrive = hwMap.get(DcMotor.class, \"rDrive\");\n\n //Setting direction of motor's rotation\n lDrive.setDirection(DcMotor.Direction.REVERSE);\n rDrive.setDirection(DcMotor.Direction.FORWARD);\n\n //setting motors to use Encoders\n setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n setZeroMode(DcMotor.ZeroPowerBehavior.BRAKE);\n //setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER); // Temporary until encoders fixed\n\n //Setting motors with zero power when initializing\n setMotorPower(0.0, 0.0);\n }"
] | [
"0.6489825",
"0.6124246",
"0.6106129",
"0.60467076",
"0.5999615",
"0.5978998",
"0.5960923",
"0.594189",
"0.5936541",
"0.5920582",
"0.5919218",
"0.58910334",
"0.58718634",
"0.5846088",
"0.58372575",
"0.5822256",
"0.5806131",
"0.577388",
"0.57663447",
"0.57623905",
"0.5755986",
"0.57252437",
"0.57235163",
"0.5716432",
"0.571216",
"0.57119364",
"0.57035315",
"0.5701146",
"0.56883156",
"0.56815434",
"0.56794924",
"0.56749827",
"0.56577873",
"0.5648089",
"0.56437707",
"0.5638071",
"0.56329864",
"0.5630144",
"0.5623712",
"0.56224793",
"0.56220615",
"0.56210417",
"0.56174153",
"0.56149155",
"0.56053275",
"0.56049705",
"0.56033975",
"0.56021047",
"0.5598107",
"0.55949533",
"0.55935687",
"0.55909926",
"0.55833685",
"0.55828637",
"0.558002",
"0.55767393",
"0.5571995",
"0.556748",
"0.5565306",
"0.55628926",
"0.5554101",
"0.5546676",
"0.5537835",
"0.55346406",
"0.5531335",
"0.55297196",
"0.5526346",
"0.5516824",
"0.55087996",
"0.55037004",
"0.55037004",
"0.55037004",
"0.54938036",
"0.5485957",
"0.54818654",
"0.54818654",
"0.54818654",
"0.54818654",
"0.54807997",
"0.54807997",
"0.54807997",
"0.54807997",
"0.5479293",
"0.5478425",
"0.5476286",
"0.5475883",
"0.54756206",
"0.54706764",
"0.54678154",
"0.5465162",
"0.5448248",
"0.54455274",
"0.5443425",
"0.5443019",
"0.54416114",
"0.5437978",
"0.54377675",
"0.5435474",
"0.54319763",
"0.5429907",
"0.54280263"
] | 0.0 | -1 |
Print out the wire network to system.out | private static void printCircuit() {
for (Gate i: gates) {
System.out.println( i.toString() );
}
for (Wire r: wires) {
System.out.println( r.toString() );
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void printNode(){\n\t\tSystem.out.println(\"\\nCurrent neigbor: \" + serventList.size());\n\t\tfor(int i = 0;i<serventList.size();i++){\n\t\t\tServentInfo b = serventList.get(i);\n\t\t\tSystem.out.println(\"(\" + b.IP + \":\" + b.port + \"); \");\n\t\t}\n\t\tSystem.out.println(\"\");\n\t}",
"public void dump() {\n System.out.println(\"ID : \"+hostID);\n for (int i=0; i<hostAddresses.size(); i++) System.out.println(\" - addresse : \"+hostAddresses.elementAt(i).getNormalizedAddress());\n System.out.println(\"CPU : \"+cpuLoad);\n System.out.println(\"Memoire : \"+memoryLoad);\n System.out.println(\"Batterie : \"+batteryLevel);\n System.out.println(\"Threads : \"+numberOfThreads);\n System.out.println(\"CMs : \"+numberOfBCs);\n System.out.println(\"connecteurs : \"+numberOfConnectors);\n System.out.println(\"connecteurs entree reseau : \"+numberOfConnectorsNetworkInputs);\n System.out.println(\"connecteurs sortie reseau : \"+numberOfConnectorsNetworkOutputs);\n System.out.println(\"Traffic PF entree : \"+networkPFInputTraffic);\n System.out.println(\"Traffic PF sortie : \"+networkPFOutputTraffic);\n System.out.println(\"Traffic application entree : \"+networkApplicationInputTraffic);\n System.out.println(\"Traffic application sortie : \"+networkApplicationOutputTraffic);\n }",
"private void printNetworks() {\n// for (GeneticNeuralNetwork network : networks)\n// System.out.println(network);\n// System.out.println(\"----------***----------\");\n// ////\n }",
"void dump() {\n\t\tSystem.out.print(\"I am: \" + (territoryID));\n\t\tSystem.out.print(\"\\tNeighbour of:\");\n\n\t}",
"public void print() {\n\t\tint l = 0;\n\t\tSystem.out.println();\n\t\tfor (int v = 0; v < vertexList.length; v++) {\n\t\t\tSystem.out.print(vertexList[v].id);\n\t\t\tfor (Neighbor nbr = vertexList[v].adjList; nbr != null; nbr = nbr.next) {\n\t\t\t\tSystem.out.print(\" -> \" + vertexList[nbr.vertexNumber].id + \"(\"\n\t\t\t\t\t\t+ nbr.weight + \")\");\n\t\t\t\tl++;\n\t\t\t}\n\t\t\tSystem.out.println(\"\\n\");\n\t\t}\n\t\tSystem.out.println(\"Number of edges = \" + l / 2);\n\t}",
"private void print() {\n printInputMessage();\n printFrequencyTable();\n printCodeTable();\n printEncodedMessage();\n }",
"public void printProtocol()\n\t{\n\t\tString commands[] = {\"A\", \"UID\", \"S\", \"F\"};\n\t\t\n\t\tHashtable<String, String> commandDescription = new Hashtable<String, String>();\n\t\tHashtable<String, String> subStringCommands = new Hashtable<String, String>();\n\t\tcommandDescription.put(\"A\", \"Sends audio data using _ as a regex\");\n\t\tcommandDescription.put(\"UID\", \"Specifies the user's id so that the Network.Server may verify it\");\n\t\tcommandDescription.put(\"S\", \"Specifies server commands.\");\n\t\tcommandDescription.put(\"F\", \"Specifies audio format.\");\n\t\tsubStringCommands.put(\"A\", \"No commands\");\n\t\tsubStringCommands.put(\"UID\", \"No sub commands\");\n\t\tsubStringCommands.put(\"S\", \"Sub commands are: \\nclose - Closes the server.\\ndisconnect - Disconnects the client from the server.\\nclumpSize {int}\");\n\t\tsubStringCommands.put(\"F\", \"Split Audio specifications between spaces. The ordering is {float SampleRate, int sampleSizeInBits, int channels, int frameSize, float frameRate\");\n\t\t\n\t\tfor (String str: commands)\n\t\t{\n\t\t\tSystem.out.printf(\"Command format:\\n %s.xxxxxxx\\n\", str);\n\t\t\tSystem.out.printf(\"Command %s\\n Description: %s \\n sub commands %s\\n\", str, commandDescription.get(str),subStringCommands.get(str));\n\t\t\t\n\t\t}\n\t}",
"public void printInfo() {\n\t\tString nodeType = \"\";\n\t\tif (nextLayerNodes.size() == 0) {\n\t\t\tnodeType = \"Output Node\";\n\t\t} else if (prevLayerNodes.size() == 0) {\n\t\t\tnodeType = \"Input Node\";\n\t\t} else {\n\t\t\tnodeType = \"Hidden Node\";\n\t\t}\n\t\tSystem.out.printf(\"%n-----Node Values %s-----%n\", nodeType);\n\t\tSystem.out.printf(\"\tNumber of nodes in next layer: %d%n\", nextLayerNodes.size());\n\t\tSystem.out.printf(\"\tNumber of nodes in prev layer: %d%n\", prevLayerNodes.size());\n\t\tSystem.out.printf(\"\tNext Layer Node Weights:%n\");\n\t\tNode[] nextLayer = new Node[nextLayerNodes.keySet().toArray().length];\n\t\tfor (int i = 0; i < nextLayer.length; i++) {\n\t\t\tnextLayer[i] = (Node) nextLayerNodes.keySet().toArray()[i];\n\t\t}\n\t\tfor (int i = 0; i < nextLayerNodes.size(); i++) {\n\t\t\tSystem.out.printf(\"\t\t# %f%n\", nextLayerNodes.get(nextLayer[i]));\n\t\t}\n\t\tSystem.out.printf(\"%n\tPartial err partial out = %f%n%n\", getPartialErrPartialOut());\n\t}",
"private void print_addr() {\n try(final DatagramSocket socket = new DatagramSocket()){\n socket.connect(InetAddress.getByName(\"8.8.8.8\"), 10002);\n System.out.println(socket.getLocalAddress().getHostAddress()+\":\"+port);\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void printGraphStructure() {\n\t\tSystem.out.println(\"Vector size \" + nodes.size());\n\t\tSystem.out.println(\"Nodes: \"+ this.getSize());\n\t\tfor (int i=0; i<nodes.size(); i++) {\n\t\t\tSystem.out.print(\"pos \"+i+\": \");\n\t\t\tNode<T> node = nodes.get(i);\n\t\t\tSystem.out.print(node.data+\" -- \");\n\t\t\tIterator<EDEdge<W>> it = node.lEdges.listIterator();\n\t\t\twhile (it.hasNext()) {\n\t\t\t\tEDEdge<W> e = it.next();\n\t\t\t\tSystem.out.print(\"(\"+e.getSource()+\",\"+e.getTarget()+\", \"+e.getWeight()+\")->\" );\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public void dump(PrintWriter pw) {\n WifiPowerStats s = buildProto();\n if (s!=null) {\n pw.println(\"Wifi power metrics:\");\n pw.println(\"Logging duration (time on battery): \" + s.loggingDurationMs);\n pw.println(\"Energy consumed by wifi (mAh): \" + s.energyConsumedMah);\n pw.println(\"Amount of time wifi is in idle (ms): \" + s.idleTimeMs);\n pw.println(\"Amount of time wifi is in rx (ms): \" + s.rxTimeMs);\n pw.println(\"Amount of time wifi is in tx (ms): \" + s.txTimeMs);\n pw.println(\"Amount of time kernel is active because of wifi data (ms): \"\n + s.wifiKernelActiveTimeMs);\n pw.println(\"Amount of time wifi is in sleep (ms): \" + s.sleepTimeMs);\n pw.println(\"Amount of time wifi is scanning (ms): \" + s.scanTimeMs);\n pw.println(\"Number of packets sent (tx): \" + s.numPacketsTx);\n pw.println(\"Number of bytes sent (tx): \" + s.numBytesTx);\n pw.println(\"Number of packets received (rx): \" + s.numPacketsRx);\n pw.println(\"Number of bytes sent (rx): \" + s.numBytesRx);\n pw.println(\"Energy consumed across measured wifi rails (mAh): \"\n + new DecimalFormat(\"#.##\").format(s.monitoredRailEnergyConsumedMah));\n }\n WifiRadioUsage wifiRadioUsage = buildWifiRadioUsageProto();\n pw.println(\"Wifi radio usage metrics:\");\n pw.println(\"Logging duration (time on battery): \" + wifiRadioUsage.loggingDurationMs);\n pw.println(\"Amount of time wifi is in scan mode while on battery (ms): \"\n + wifiRadioUsage.scanTimeMs);\n }",
"public void printGraph(){\n\t\tSystem.out.println(\"[INFO] Graph: \" + builder.nrNodes + \" nodes, \" + builder.nrEdges + \" edges\");\r\n\t}",
"@Override\n\tpublic String dumpState() {\n\t\tStringBuilder sb = new StringBuilder(super.dumpState());\n\t\tsb.append(\"\\nListening on: \");\n\t\t//if ( mServerSocket != null ) sb.append(mServerSocket.toString());\n\t\t//if ( mDatagramSocket != null ) sb.append(mDatagramSocket.toString());\n\t\tsb.append(\"\\n\");\n\t\treturn sb.toString();\n\t}",
"public void print(){\n String res = \"\" + this.number;\n for(Edge edge: edges){\n res += \" \" + edge.toString() + \" \";\n }\n System.out.println(res.trim());\n }",
"public void print() {\n System.out.println(\"Scheme print:\");\n System.out.println(\" Blocks:\");\n for (Block block : this.blocks) {\n // System.out.println(\" \" + block.getName() + \" (\" + block.getID() + \")\");\n for (Integer id : block.getConnections()) {\n System.out.println(\" \" + id);\n }\n //System.out.println(\" \" + block.outputs.getFirst().getDstID());\n }\n /*System.out.println(\" Connections:\");\n for (Con connection : this.connections) {\n System.out.println(\" [\" + connection.src + \"]---[\" + connection.dst + \"]\");\n }*/\n if(this.queue_set){\n System.out.println(\" Queue: \" + this.queue);\n }\n else{\n System.out.println(\" Queue not loaded\");\n }\n }",
"public static String DeviceConnected(){\n StringBuilder outputDC = new StringBuilder();\n String cmd = \"route print\";\n try{\n outputDC.append(getCommand(cmd));\n }\n catch(Throwable se){\n se.printStackTrace();\n }\n return outputDC.toString();\n }",
"public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }",
"public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }",
"public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }",
"public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }",
"public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }",
"public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }",
"public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }",
"public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }",
"public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }",
"public void print() {\n\t\tSystem.out.println(\"针式打印机打印了\");\n\t\t\n\t}",
"public void print() {\n System.out.println(toString());\n }",
"public void dump()\n {\n System.out.println(toString());\n }",
"public void printOut() {\n System.out.println(\"\\t\" + result + \" = icmp \" + cond.toLowerCase() + \" \" + type + \" \" + op1 + \", \" + op2 );\n\n // System.out.println(\"\\t\" + result + \" = bitcast i1 \" + temp + \" to i32\");\n }",
"public void print() {\n\t\tSystem.out.println(toString());\n\t}",
"public String printOutput(driver driver){\n \t\tString street = new String();\n \t\tif(name == driver.start.option1.name){\n \t\t\t\tstreet = driver.start.outStreet1;\n \t\t\t}\n \t\t\telse{\n \t\t\t\tstreet = driver.start.outStreet2;\n \t\t\t}\n \tString printStr = \"Driver \" + driver.id + \" heading from \" + driver.start.name + \" to \" + name + \" via \" + street;\n \treturn printStr;\n \t\n \t}",
"private void dumpNetwork(NetworkExt net)\n {\n log(\"*\");\n log(\"* Network Information\");\n assertNotNull(\"Network Name cannot be null\", net.getName());\n log(\"* Network Name: \" + net.getName());\n assertTrue(\"NetworkID should be greater than zero\", net.getNetworkID() > 0);\n log(\"* Network ID: \" + net.getNetworkID());\n assertNotNull(\"Network ServiceInformationType cannot be null\", net.getServiceInformationType());\n log(\"* Network ServiceInformationType: \" + net.getServiceInformationType());\n assertNotNull(\"Network UpdateTime cannot be null\", net.getUpdateTime());\n long now = new Date().getTime();\n long oneYearAgo = now - (1000 * 60 * 60 * 24 * 365);\n long oneYearAhead = now + (1000 * 60 * 60 * 24 * 365);\n assertTrue(\"ServiceDetails' Update time should not be more than a year off\", (oneYearAgo < net.getUpdateTime()\n .getTime())\n && (oneYearAhead > net.getUpdateTime().getTime()));\n log(\"* Network UpdateTime: \" + net.getUpdateTime());\n assertNotNull(\"Network Locator cannot be null\", net.getLocator());\n log(\"* Network Locator: \" + net.getLocator());\n assertNotNull(\"Network Handle cannot be null\", net.getNetworkHandle());\n log(\"* Network Handle: \" + net.getNetworkHandle());\n assertNotNull(\"Networks's Transport cannot be null\", net.getTransport());\n }",
"public void print() {\r\n\t\t System.out.println(toString());\r\n\t }",
"public void printMachine(){\n\t\tfor(State s:theStates){\n\t\t\tSystem.out.println(s);\n\t\t}\n\t}",
"public void print() {\n System.out.println(\"Nome: \" + nome);\n System.out.println(\"Telefone: \" + telefone);\n }",
"public void print(){\r\n System.out.println(toString());\r\n }",
"public void printCountersAndDiagnostics() {\n\t\tSystem.out.println(\"Node \" + myAssignedID + \"::\" + \"\\t\" + \"Sent\" + \"\\t\"\n\t\t\t\t+ \"Rec'd\" + \"\\t\" + \"Relayed\" + \"\\t\" + \"SumSent\" + \"\\t\"\n\t\t\t\t+ \"SumRecd\");\n\t\tSystem.out.println(\"\\t\\t\" + this.sendTracker + \"\\t\"\n\t\t\t\t+ this.receiveTracker + \"\\t\" + this.relayTracker + \"\\t\"\n\t\t\t\t+ this.sendSummation + \"\\t\" + this.receiveSummation);\n\t}",
"public void print() {\n\t// Skriv ut en grafisk representation av kösituationen\n\t// med hjälp av klassernas toString-metoder\n System.out.println(\"A -> B\");\n System.out.println(r0);\n System.out.println(\"B -> C\");\n System.out.println(r1);\n System.out.println(\"turn\");\n System.out.println(r2);\n //System.out.println(\"light 1\");\n System.out.println(s1);\n //System.out.println(\"light 2\");\n System.out.println(s2);\n }",
"public void print(){\r\n\t\tSystem.out.println(\"Size of each block:\\t\\t\" + this.blockSize);\r\n\t\tSystem.out.println(\"Total Number of Inodes:\\t\\t\" + this.inodeCount);\r\n\t\tSystem.out.println(\"Total Number of Blocks:\\t\\t\" + this.blocksCount);\r\n\t\tSystem.out.println(\"Number of Free Blocks:\\t\\t\" + this.freeBlocksCount);\r\n\t\tSystem.out.println(\"Number of Free Inodes:\\t\\t\" + this.freeInodesCount);\r\n\t\tSystem.out.println(\"First Data Block:\\t\\t\" + this.firstDataBlock);\r\n\t\tSystem.out.println(\"Last Written Date and Time:\\t\" + GeneralUtils.getDateFromLong(this.wTime));\r\n\t\tSystem.out.println(\"First Inode:\\t\\t\\t\" + this.firstInode);\r\n\t\tSystem.out.println(\"Inode Size:\\t\\t\\t\" + this.inodeSize);\r\n\t}",
"public void print()\n {\n chatarea.append(\"Sender:(\"+port.getText()+\")\"+System.lineSeparator()+msgarea.getText()+System.lineSeparator());\n }",
"void printFleet(ConsolePrinter printer);",
"private static void print(Object msg){\n if (WAMClient.Debug){\n System.out.println(msg);\n }\n\n }",
"public void printWorkload() {\n System.out.println(\"Routing Station \" + stationNumber + \" Has Total Workload Of \" + workload);\n }",
"private void outHex(){\n\t\tSystem.out.println(binary);\n\t\tpw.println(binary);\n\t\t\n\t}",
"public String toString(){\n\tString sourceName;\n\tString destinationName;\n\t// its possible the wire has no source gate so this avoids null\n\t// pointer errors\n\tif( source == null){\n\t sourceName = \"No wire source\";\n\t} else {\n\t sourceName = this.source.name;\n\t}\n\t// provides the same check for destination gates\n\tif( destination == null ){\n\t destinationName = \"No wire destination\";\n\t} else {\n\t destinationName = this.destination.name;\n\t}\n\treturn \"Wire \" + sourceName + \" \"+ srcPin + \" \" +\n\t\tdestinationName + \" \" + \" \" + dstPin\n\t\t+ \" \" + delay;\n }",
"private void printMyRoutingTable()\n {\n\tString str;\n\tmyGUI.println(\"My Distance table and routes\");\n str = F.format(\"dst |\", 15);\n for (int i = 0; i < RouterSimulator.NUM_NODES; i++) {\n str += (F.format(i, 15));\n }\n myGUI.println(str);\n for (int i = 0; i < str.length(); i++) {\n myGUI.print(\"-\");\n }\n str = F.format(\"cost |\", 15);\n for (int i = 0; i < RouterSimulator.NUM_NODES; i++) {\n str += F.format(myDistTable[i], 15);\n }\n myGUI.println();\n myGUI.println(str);\n str = F.format(\"route |\", 15);\n for (int i = 0; i < RouterSimulator.NUM_NODES; i++) {\n str += F.format(route[i], 15);\n }\n myGUI.println(str);\n myGUI.println();\n myGUI.println(\"--------------------------------------------\");\n myGUI.println();\n\n }",
"public void print() {\n System.out.println(\"Command: \" + command);\n }",
"public void getInfo() {\n System.out.println(\"INFO Node : \"+address+ \" connected to nodes \");\n for(Node node : getConnectedNodes()){\n System.out.print(\"Node :\"+node.getAddress()+\" with edge : \");\n getEdge(this, node).printEdge();\n }\n \n }",
"public void printGraph() {\n\t\tStringJoiner j = new StringJoiner(\", \");\n\t\tfor(Edge e : edgeList) {\n\t\t\tj.add(e.toString());\n\t\t}\n\t\t\n\t\tSystem.out.println(j.toString());\n\t}",
"public void printAddress()\r\n {\r\n address.printAddress();\r\n }",
"public void printAddress()\r\n {\r\n address.printAddress();\r\n }",
"public static void Print() {\n\t\tSystem.out.println(\"Ticks: total \" + totalTicks + \", idle \" + idleTicks + \", system \" + systemTicks + \", user \"\n\t\t\t\t+ userTicks);\n\n\t\tSystem.out.println(\"Disk I/O: reads \" + numDiskReads + \", writes \" + numDiskWrites);\n\t\tSystem.out.println(\"Console I/O: reads \" + numConsoleCharsRead + \", writes \" + numConsoleCharsWritten);\n\t\tSystem.out.println(\"Paging: faults \" + numPageFaults);\n\n\t\tSystem.out.println(\"Network I/O: packets received \" + numPacketsRecvd + \", sent \" + numPacketsSent);\n\t}",
"@Override\n\tpublic void showInfo() {\n\t\tSystem.out.println(\"Machine Interface \" + id);\n\t}",
"public void print() {\n System.out.println(this.toString());\n }",
"@Override\n\t\tpublic void print() {\n\n\t\t}",
"@Override\n\t\t\tpublic void print() {\n\t\t\t\t\n\t\t\t}",
"public void print() {\n\t\tfor (int count = 0; count < adjacencyList.length; count++) {\n\t\t\tLinkedList<Integer> edges = adjacencyList[count];\n\t\t\tSystem.out.println(\"Adjacency list for \" + count);\n\n\t\t\tSystem.out.print(\"head\");\n\t\t\tfor (Integer edge : edges) {\n\t\t\t\tSystem.out.print(\" -> \" + edge);\n\t\t\t}\n\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public void print()\n {\n System.out.println();\n System.out.println(\"Ticket to \" + destination +\n \" Price : \" + price + \" pence \" + \n \" Issued \" + issueDateTime);\n System.out.println();\n }",
"public void print() {\n\t\tNetwork.netPrintln(\"`direction ID: \" + this.ID);\n\t\tNetwork.netPrintln(\"DirType: \" + dir);\n\t}",
"public void print() {\n\t\tSystem.out.println(\"ONOMA IDIOKTITH: \" + fname);\n\t\tSystem.out.println(\"EPWNYMO IDIOKTITH: \" + lname);\n\t\tSystem.out.println(\"DIEUTHINSH FARMAKEIOU: \" + address);\n\t\tSystem.out.println(\"THLEFWNO FARMAKEIOU: \" + telephone);\n\t\tSystem.out.println();\n\t}",
"public void printInfo() {\n\t\tSystem.out.println(\"User: \" + userName);\n\t\tSystem.out.println(\"Login: \" + loginName);\n\t\tSystem.out.println(\"Host: \" + hostName);\n\t}",
"public void print()\n\t{\n\t\tSystem.out.println(\"Speed Component: speed = \" + this.speed\n\t\t\t\t + \" vel ( x = \" + vel.x + \" , y = \" + vel.y);\n\t}",
"public void printInformation() {\n\n System.out.println(\"Name: \" + name);\n System.out.println(\"Weight: \" + weight);\n System.out.println(\"Shape: \" + shape);\n System.out.println(\"Color: \" + color);\n }",
"public void printGraph() {\n\t\tSystem.out.println(\"-------------------\");\n\t\tSystem.out.println(\"Printing graph...\");\n\t\tSystem.out.println(\"Vertex=>[Neighbors]\");\n\t\tIterator<Integer> i = vertices.keySet().iterator();\n\t\twhile(i.hasNext()) {\n\t\t\tint name = i.next();\n\t\t\tSystem.out.println(name + \"=>\" + vertices.get(name).printNeighbors());\n\t\t}\n\t\tSystem.out.println(\"-------------------\");\n\t}",
"public void show() {\n\n\t\tNode n = head;\n\t\twhile (n.next != null) {\n\t\t\t//logger.info(n.data);\n\t\t\tn = n.next;\n\t\t}\n\t\t//logger.info(n.data);\n\n\t}",
"protected void printAll() {\n\t\tSystem.out.println(\"Network maps\");\n\t\tSystem.out.println(\"\tAddresses\");\n\t\ttry {\n\t\t\tPreparedStatement pstmt = \n\t\t\t\t\tthis.agent.getDatabaseManager().getConnection().prepareStatement(\n\t\t\t\t\t\t\tthis.agent.getDatabaseManager().selectAll);\n\t ResultSet rs = pstmt.executeQuery();\n\t // loop through the result set\n while (rs.next()) {\n \t System.out.printf(\"%s -> %s\\n\", rs.getString(\"username\"), rs.getString(\"address\"));\n }\n\t\t} catch (Exception e) {\n\t\t\tAgent.errorMessage(\n\t\t\t\t\tString.format(\"ERROR when trying to get all the address of the table users in the database\\n\"), e);\n\t\t}\n\t\tSystem.out.println(\"\tmapSockets\");\n\t\tfor (String u: this.mapSockets.keySet()) {\n\t\t\tSystem.out.printf(\"%s -> %s\\n\", u, this.mapSockets.get(u));\n\t\t}\n\t}",
"private void printGraphModel() {\n System.out.println(\"Amount of nodes: \" + graphModel.getNodes().size() +\n \" || Amount of edges: \" + graphModel.getEdges().size());\n System.out.println(\"Nodes:\");\n int i = 0;\n for (Node n : graphModel.getNodes()) {\n System.out.println(\"#\" + i + \" \" + n.toString());\n i++;\n }\n System.out.println(\"Edges:\");\n i = 0;\n for (Edge e : graphModel.getEdges()) {\n System.out.println(\"#\" + i + \" \" + e.toString());\n i++;\n }\n }",
"public static void printPacket(byte[] packet) {\r\n\t\tSystem.out.println(\"0 8 16 24\");\r\n\t\tint counter=1;\r\n\t\tfor(byte b: packet) {\r\n\t\t System.out.print(Integer.toBinaryString(b & 255 | 256).substring(1) + \" \");\r\n\t\t if(counter%4 ==0) {\r\n\t\t \tSystem.out.println();\r\n\t\t }\r\n\t\t counter++;\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void testEtherNet() {\n\t\tSystem.out.println(\"ethernet test success\");\n\t\t\n\t}",
"public void print() {\n\t\tSystem.out.println(name + \" -- \" + rating + \" -- \" + phoneNumber);\n\t}",
"@Override\n public String toString() {\n final StringBuilder buffer = new StringBuilder(90);\n InetAddressUtils.formatAddress(buffer, localAddress);\n buffer.append(\"<->\");\n InetAddressUtils.formatAddress(buffer, remoteAddress);\n return buffer.toString();\n }",
"public static void tcp_peeraddr_print( Socket com )\n{\n InetSocketAddress isa = \n (InetSocketAddress)com.getRemoteSocketAddress();\n InetAddress ia = isa.getAddress();\n String peerhostaddr = ia.getHostAddress();\n int peerportno = isa.getPort();\n stdout.printf(\"connection (hash== %s) from %s:%d\\n\", \n com.hashCode(), peerhostaddr, peerportno );\n}",
"public void print(Node node) \n{\n PrintWriter w = new PrintWriter(new OutputStreamWriter(System.out), true);\n print(node, w);\n}",
"public void printTheInstance() {\n System.out.println(\"The instance is: \");\n this.printSources();\n System.out.print(\"\\n\");\n this.printDestinations();\n System.out.print(\"\\n\");\n this.printCosts();\n }",
"public void printInfo(){\n\t\tSystem.out.println(\"id : \" + id + \" label : \" + label);\n\t\tSystem.out.println(\"vms : \" );\n\t\tfor(VirtualMachine v : vms){\n\t\t\tv.printInfo();\n\t\t}\n\t}",
"public void printConnector(org.sparx.Connector connector) {\r\n\t\t/* PROTECTED REGION ID(java.implementation._17_0_5_12d203c6_1363936416379_5142_1880) ENABLED START */\r\n\t\tStringBuilder sb = new StringBuilder(\"\\n\");\r\n\t\tsb.append(\"Type = \" + connector.GetType());\r\n\t\tsb.append(\"\\n\");\r\n\t\tsb.append(\"GUID -> \" + connector.GetConnectorGUID());\r\n\t\tsb.append(\"\\n\");\r\n\t\t\r\n\t\t// connector properties to string\r\n\t\tsb.append(propertiesToString(connector.GetProperties()));\r\n\t\t\r\n\t\tsb.append(\"direction: \" + connector.GetDirection());\r\n\t\tsb.append(\"\\n\");\r\n\t\tsb.append(\"client: \" + connector.GetClientID());\r\n\t\tsb.append(\"\\n\");\r\n\t\tsb.append(\"supplier: \" + connector.GetSupplierID());\r\n\t\tsb.append(\"\\n\");\r\n\t\tsb.append(\"SupplierEnd Navigable: \" + connector.GetSupplierEnd().GetNavigable());\r\n\t\tsb.append(\"\\n\");\r\n\t\tsb.append(\"Supplier Cardinality: \" + connector.GetSupplierEnd().GetCardinality());\r\n\t\tsb.append(\"\\n\");\r\n\t\tsb.append(\"ClientEnd Navigable: \" + connector.GetClientEnd().GetNavigable());\r\n\t\tsb.append(\"\\n\");\r\n\t\tsb.append(\"Client Cardinality: \" + connector.GetClientEnd().GetCardinality());\r\n\t\tsb.append(\"\\n\");\r\n\t\tsb.append(\"Subtype: \" + connector.GetSubtype());\r\n\t\tsb.append(\"\\n\");\r\n\t\tsb.append(\"Stateflags: \" + connector.GetStateFlags());\r\n\t\tsb.append(\"\\n\");\r\n\t\tsb.append(\"Alias: \" + connector.GetAlias());\r\n\t\tsb.append(\"\\n\");\r\n\t\tsb.append(\"Type: \" + connector.GetType());\r\n\t\tsb.append(\"\\n\");\r\n\t\tsb.append(\"MetaType: \" + connector.GetMetaType());\r\n\t\tsb.append(\"\\n\");\r\n\t\tsb.append(\"Eventflags: \" + connector.GetEventFlags());\r\n\t\tsb.append(\"\\n\");\r\n\t\tsb.append(\"propertieCount: \" + connector.GetProperties().GetCount());\r\n\t\tsb.append(\"\\n\");\r\n\t\t\r\n\t\tsb.append(\"supplierEnd Aggregation: \" + connector.GetSupplierEnd().GetAggregation());\r\n\t\tsb.append(\"\\n\");\r\n\t\tsb.append(\"clientEnd Aggregation: \" + connector.GetClientEnd().GetAggregation());\r\n\t\tsb.append(\"\\n\");\r\n\t\t\r\n\t\t// custom properties\r\n\t\tsb.append(customPropertiesToString(connector.GetCustomProperties()));\r\n\t\t\r\n\t\tsb.append(\"StereoType = \" + connector.GetStereotype());\r\n\t\tsb.append(\"\\n\");\r\n\t\tsb.append(\"StereoTypeEx = \" + connector.GetStereotypeEx());\r\n\t\tsb.append(\"\\n\");\r\n\t\t\r\n\t\t// connector constraints to string\r\n\t\tsb.append(connectorConstraintsToString(connector.GetConstraints()));\r\n\t\t\r\n\t\t// connectorTagged values\r\n\t\tsb.append(connectorTagsToString(connector.GetTaggedValues()));\r\n\t\t\r\n\t\tLOG.debug(sb.toString());\r\n\t\t/* PROTECTED REGION END */\r\n\t}",
"public String toString()\r\n\t{\r\n\t\treturn this.mac+\",\"+this.ssid+\",\"+this.channel+\",\"+this.signal+\",\";\r\n\t\t\r\n\t}",
"public void print() {\n System.out.print(\"[ \" + value + \":\" + numSides + \" ]\");\n }",
"public void printContents(){\n System.out.println(this);\n System.out.println(\"Occupied by: \" + pieceAtVertex + \"\\n Neighbors:\" + neighbors);\n }",
"public void print(){\n\t\t\tNode current = head;\n\t\t\tSystem.out.println(\"--------------------------\");\n\t\t\twhile(current != null) \n\t\t\t{\n\t\t\t\tSystem.out.println(current.data);\n\t\t\t\tcurrent = current.next;\n\t\t\t}\n\t}",
"public void printGS(){\r\n\t\tLogger.append(\" ITANet locations:\t\");\r\n\t\tfor (int i = 0; i < this.locVec.length; i++)\r\n\t\t\tLogger.append(this.locVec[i] + \" \");\r\n\t\tLogger.append(\"\\r\\n\");\r\n\r\n\t\tLogger.append(\" Interruption vector:\t\");\r\n\t\tfor(int i = 0; i < this.interVec.length; i++){\r\n\t\t\tif(this.interVec[i] == true)\r\n\t\t\t\tLogger.append(\"true \");\r\n\t\t\telse\r\n\t\t\t\tLogger.append(\"false \");\r\n\t\t}\r\n\t\tLogger.append(\"\\r\\n\");\r\n\r\n\t\tLogger.append(\" CPUStack:\t\");\r\n\t\tthis.stack.printAllEle();\r\n\t\tLogger.append(\"\\r\\n\");\r\n\r\n\t\tLogger.append(\" Control variable:\t\");\r\n\t\tthis.cvMap.printAllEle();\r\n\t\tLogger.append(\"\\r\\n\");\r\n\t\t\r\n\t\tLogger.append(\" IRQSwitch: \");\r\n\t\tthis.switches.print();\r\n\t\tLogger.append(\"\\r\\n\");\r\n\t}",
"public void dump(java.io.PrintStream out) {\n for (int i=0; i<registers.length; ++i) {\n if (registers[i] == null) continue;\n out.print(i+\": \"+registers[i]+\" \");\n }\n out.println();\n }",
"@Override\r\n\t\t\tpublic void print() {\n\t\t\t\t\r\n\t\t\t}",
"public void dumpCommand() {\r\n System.out.println(_board);\r\n }",
"void printstate()\n\t{\n\t\toperation.printstate();\n\t}",
"public void print () {\r\n System.out.println(\"Place \"+name+\": lat \"+lat+\" lon \"+lon+\r\n \" elevation \"+ele);\r\n }",
"public void print_dev() {\n\t\tSystem.out.println(\r\n\t\t\t\t\t\t\t\t\t\"[System] 펫 정보입니다.\\n 이름 : \"+TMGCSYS.tmgcName\r\n\t\t\t\t\t\t\t\t+\t\", 레벨 : \"+TMGCSYS.tmgcLV+\", 경험치 : \"+TMGCSYS.tmgcEXP+\"/\"+(100*TMGCSYS.tmgcLV)\r\n\t\t\t\t\t\t\t\t+\t\", 체력 : \"+TMGCSYS.tmgcHP+\", 스트레스 : \"+TMGCSYS.tmgcStress+\"\\n\\n\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Function Limit Count\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Eat : \"+TMGCSYS.tmgcLimitEat+\", Sleep : \"+TMGCSYS.tmgcLimitSleep\r\n\t\t\t\t\t\t\t\t+\t\", Walk : \"+TMGCSYS.tmgcLimitWalk+\", Study : \"+TMGCSYS.tmgcLimitStudy+\"\\n\\n\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Character Ability\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" STR : \"+TMGCSYS.tmgcSTR+\", INT : \"+TMGCSYS.tmgcINT\r\n\t\t\t\t\t\t\t\t+\t\", DEB : \"+TMGCSYS.tmgcDEB+\", HET : \"+TMGCSYS.tmgcHET+\"\\n\\n\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Character Job : \"+TMGCSYS.tmgc2ndJob\r\n\t\t\t\t\t\t\t\t);\r\n\t}",
"public void regDump() {\r\n\t\t// Print each available register (id) and its value\r\n\t\tfor (int i = 0; i < NUMGENREG; i++) {\r\n\t\t\tSystem.out.print(\"r\" + i + \"=\" + m_registers[i] + \" \");\r\n\t\t}// for\r\n\t\t\r\n\t\t// Removed unnecessary concatenation\r\n\t\tSystem.out.print(\"PC=\" + getPC());\r\n\t\tSystem.out.print(\" SP=\" + getSP());\r\n\t\tSystem.out.print(\" BASE=\" + getBASE());\r\n\t\tSystem.out.print(\" LIM=\" + getLIM());\r\n\t\tSystem.out.println(\"\");\r\n\t}",
"public void printDGraph(){\n System.out.println(this.toString());\n }",
"public void print() {\n btprint(c);\n }",
"protected void printIP_Port(){\n\t\tFile iP_PortFile = new File(System.getProperty(\"user.dir\")+\"/IP_and_Port.txt\");\n\n\t\t\ttry{\n\t\t\t\tif(!iP_PortFile.exists()){\n\t\t\t\t\tiP_PortFile.createNewFile();\n\t\t\t\t}\n\t\t\t\tFileWriter fstreamsuper = new FileWriter(iP_PortFile);\n\t\t\t\tBufferedWriter outIP = new BufferedWriter(fstreamsuper);\n\n\n\t\t\t\toutIP.write(getIP());\n\t\t\t\toutIP.newLine();\n\t\t\t\toutIP.write(port);\n\n\t\t\t\toutIP.close();\n\t\t\t}catch(IOException e){\n\t\t\t\tSystem.out.println(\"File error creating IP_port file\");\n\t\t\t}\n\n\t}",
"public void output() {\n System.out.printf(\"Dien tich: %.2f \\n\", getArea());\n System.out.printf(\"Chu vi: %.2f \\n\", getPeripheral());\n }",
"public double printOutput() {\r\n return calculateNetPay();\r\n }",
"void printMST();",
"public String print(){\r\n\t\t\r\n\t\treturn String.format(\"%9d\\t%-5s\\t\\t%-3d\\t\\t%-15s\",\r\n\t\t\t\tthis.engineNumber, \r\n\t\t\t\tthis.companyName, \r\n\t\t\t\tthis.numberOfRailCars, \r\n\t\t\t\tthis.destinationCity);\r\n\t}",
"private void wifiName() {\n\t\tSystem.out.println(\"The wifi name is Redmi\");\n\t}",
"public void printStatus(){\n System.out.println(\"Nodes: \" + \n getVertexCount() + \" Edges: \" + \n getEdgeCount()); \n //and \" + getEdgeCount() + \" edges active.\");\n }",
"public void display() {\r\n int v;\r\n Node n;\r\n \r\n for(v=1; v<=V; ++v){\r\n System.out.print(\"\\nadj[\" + toChar(v) + \"] ->\" );\r\n for(n = adj[v]; n != z; n = n.next) \r\n System.out.print(\" |\" + toChar(n.vert) + \" | \" + n.wgt + \"| ->\"); \r\n }\r\n System.out.println(\"\");\r\n }",
"public void print()\r\n\t\t{\r\n\t\tSystem.out.println(\"AETInteractions object\");\r\n\t\tSystem.out.println(\"Input interactions\");\r\n\t\t// stampa le interazioni di input\r\n\t\tif (getInIn() != null) getInIn().print();\r\n\t\tSystem.out.println(\"Output interactions\");\r\n\t\t// stampa le interazioni di output\r\n\t\tif (getOuIn() != null) getOuIn().print();\r\n\t\t}",
"private void diplay() {\n\t\tSystem.out.println(new StringBuilder(HUMIDITY_CONSTANT + humidity + TEMPRETURE_CONSTANT + temp\n\t\t\t\t+ PRESSURE_CONSTANT + pressure));\n\n\t}"
] | [
"0.7228915",
"0.6957467",
"0.66704065",
"0.6478969",
"0.6427015",
"0.6397989",
"0.6385403",
"0.63809603",
"0.6352528",
"0.62512505",
"0.6232342",
"0.620309",
"0.6192734",
"0.61389434",
"0.6102355",
"0.60813534",
"0.6045015",
"0.6045015",
"0.6045015",
"0.6045015",
"0.6045015",
"0.6045015",
"0.6045015",
"0.6045015",
"0.6045015",
"0.60333073",
"0.6018909",
"0.60144246",
"0.6012122",
"0.60036457",
"0.59529805",
"0.5940754",
"0.5934658",
"0.59332645",
"0.5928641",
"0.59136283",
"0.5890698",
"0.5890309",
"0.5889442",
"0.5882522",
"0.5847804",
"0.5846448",
"0.58310217",
"0.58305657",
"0.5820746",
"0.58121103",
"0.5806169",
"0.58031607",
"0.5795107",
"0.5783053",
"0.5783053",
"0.57806647",
"0.5777237",
"0.5764652",
"0.57638353",
"0.5757888",
"0.57523847",
"0.5745952",
"0.5739849",
"0.57343554",
"0.57328564",
"0.57319945",
"0.5727518",
"0.57271045",
"0.57074606",
"0.56970984",
"0.56894135",
"0.568451",
"0.56688595",
"0.56547475",
"0.5648385",
"0.5647878",
"0.564749",
"0.56400555",
"0.5639119",
"0.5637905",
"0.5620915",
"0.56120306",
"0.56090206",
"0.5597326",
"0.5596241",
"0.5592377",
"0.5590517",
"0.5585515",
"0.5584839",
"0.5584812",
"0.5582964",
"0.5576859",
"0.55764496",
"0.5573718",
"0.5566943",
"0.5565047",
"0.5558078",
"0.55532044",
"0.5552685",
"0.5551018",
"0.5550788",
"0.5538696",
"0.5537683",
"0.55376744"
] | 0.7006638 | 1 |
Step 1: Find the contract whose Initiate(3) is completed from contract Details. Step 2: Get the details to review Risk,Financial Data, Collateral,Client outreach dtls.. Step 3: If successful, update the workflowReview table with updatedBy and updatedOn and statusId. Step 4: Also, update workflowEdit with Pending Status. Step 5: Also update the contractDetails table with statusId with stage review. | @RequestMapping(value = "review/workflow", method = RequestMethod.POST)
public Contract reviewWorkflow(@RequestBody int contractid) {
Contract con = contractService.findByContractIdAndCurrStatusId(contractid, WorkflowStageEnums.Initiate.ordinal() + 1);
if(null != con) {
Date updatedOn = new Timestamp(System.currentTimeMillis());
List<WorkflowReview> lstworkflowReview = workflowReviewService.findByContractIdAndStatusId(contractid,WorkflowStageCompletionResultEnums.Pending.ordinal() + 1);//pending=1
if(null != lstworkflowReview && lstworkflowReview.size() > 0)
{
WorkflowReview workflowReview = lstworkflowReview.get(0);
workflowReview.setComments("Review is completed");
workflowReview.setStatusId(WorkflowStageCompletionResultEnums.Completed.ordinal() + 1);
workflowReview.setUpdatedBy(workflowReview.getAssignedTo());
workflowReview.setUpdatedOn(updatedOn);
workflowReviewService.saveWorkflowReview(workflowReview);
WorkflowEdit workflowEdit = new WorkflowEdit();
workflowEdit.setAssignedTo(workflowReview.getAssignedTo());
workflowEdit.setContractId(contractid);
workflowEdit.setComments("Edit is pending");
updatedOn = new Timestamp(System.currentTimeMillis());
workflowEdit.setCreatedOn(updatedOn);
workflowEdit.setStatusId(WorkflowStageCompletionResultEnums.Pending.ordinal() + 1);
workflowEdit.setUpdatedOn(updatedOn);
workflowEditService.saveWorkflowEdit(workflowEdit);
con.setCurrStatusId(WorkflowStageEnums.Review.ordinal() + 1);
con = contractService.saveContract(con);
}
}
return con;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public WorkflowResponse execute(WorkflowDTO workflowDTO) throws WorkflowException {\n\n if (log.isDebugEnabled()) {\n log.debug(\"Executing API State change Workflow.\");\n }\n if (stateList != null) {\n Map<String, List<String>> stateActionMap = getSelectedStatesToApprove();\n APIStateWorkflowDTO apiStateWorkFlowDTO = (APIStateWorkflowDTO) workflowDTO;\n\n if (stateActionMap.containsKey(apiStateWorkFlowDTO.getApiCurrentState().toUpperCase())\n && stateActionMap.get(apiStateWorkFlowDTO.getApiCurrentState().toUpperCase())\n .contains(apiStateWorkFlowDTO.getApiLCAction())) {\n\n String callBackURL = apiStateWorkFlowDTO.getCallbackUrl();\n String message = \"Approval request for API state change action \" + apiStateWorkFlowDTO.getApiLCAction()\n + \" from \" + apiStateWorkFlowDTO.getApiCurrentState() + \" state for the API \"\n + apiStateWorkFlowDTO.getApiName() + \" : \" + apiStateWorkFlowDTO.getApiVersion() + \" by \"\n + apiStateWorkFlowDTO.getApiProvider() + \"\";\n apiStateWorkFlowDTO.setWorkflowDescription(message);\n apiStateWorkFlowDTO.setMetadata(\"CurrentState\", apiStateWorkFlowDTO.getApiCurrentState());\n apiStateWorkFlowDTO.setMetadata(\"Action\", apiStateWorkFlowDTO.getApiLCAction());\n apiStateWorkFlowDTO.setMetadata(\"ApiName\", apiStateWorkFlowDTO.getApiName());\n apiStateWorkFlowDTO.setMetadata(\"ApiVersion\", apiStateWorkFlowDTO.getApiVersion());\n apiStateWorkFlowDTO.setMetadata(\"ApiProvider\", apiStateWorkFlowDTO.getApiProvider());\n apiStateWorkFlowDTO.setMetadata(\"Invoker\", apiStateWorkFlowDTO.getInvoker());\n apiStateWorkFlowDTO.setMetadata(\"TenantId\", String.valueOf(apiStateWorkFlowDTO.getTenantId()));\n\n apiStateWorkFlowDTO.setProperties(\"action\", apiStateWorkFlowDTO.getApiLCAction());\n apiStateWorkFlowDTO.setProperties(\"apiName\", apiStateWorkFlowDTO.getApiName());\n apiStateWorkFlowDTO.setProperties(\"apiVersion\", apiStateWorkFlowDTO.getApiVersion());\n apiStateWorkFlowDTO.setProperties(\"apiProvider\", apiStateWorkFlowDTO.getApiProvider());\n apiStateWorkFlowDTO.setProperties(\"currentState\", apiStateWorkFlowDTO.getApiCurrentState());\n\n super.execute(workflowDTO);\n } else {\n // For any other states, act as simple workflow executor.\n workflowDTO.setStatus(WorkflowStatus.APPROVED);\n // calling super.complete() instead of complete() to act as the simpleworkflow executor\n super.complete(workflowDTO);\n }\n } else {\n String msg = \"State change list is not provided. Please check <stateList> element in workflow-extensions.xml\";\n log.error(msg);\n throw new WorkflowException(msg);\n }\n return new GeneralWorkflowResponse();\n }",
"@Override\n public WorkflowResponse complete(WorkflowDTO workflowDTO) throws WorkflowException {\n if (log.isDebugEnabled()) {\n log.debug(\"Completing API State change Workflow..\");\n }\n workflowDTO.setUpdatedTime(System.currentTimeMillis());\n super.complete(workflowDTO);\n String externalWorkflowRef = workflowDTO.getExternalWorkflowReference();\n try {\n ApiMgtDAO apiMgtDAO = ApiMgtDAO.getInstance();\n Workflow workflow = apiMgtDAO.getworkflowReferenceByExternalWorkflowReference(externalWorkflowRef);\n String apiName = workflow.getMetadata(\"ApiName\");\n String action = workflow.getMetadata(\"Action\");\n String providerName = workflow.getMetadata(\"ApiProvider\");\n String version = workflow.getMetadata(\"ApiVersion\");\n String invoker = workflow.getMetadata(\"Invoker\");\n String currentStatus = workflow.getMetadata(\"CurrentState\");\n int tenantId = workflowDTO.getTenantId();\n try {\n //tenant flow is already started from the rest api service impl. no need to start from here\n PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(invoker);\n Registry registry = ServiceReferenceHolder.getInstance().getRegistryService()\n .getGovernanceUserRegistry(invoker, tenantId);\n APIIdentifier apiIdentifier = new APIIdentifier(providerName, apiName, version);\n GenericArtifact apiArtifact = APIUtil.getAPIArtifact(apiIdentifier, registry);\n if (WorkflowStatus.APPROVED.equals(workflowDTO.getStatus())) {\n String targetStatus;\n apiArtifact.invokeAction(action, APIConstants.API_LIFE_CYCLE);\n targetStatus = apiArtifact.getLifecycleState();\n if (!currentStatus.equals(targetStatus)) {\n apiMgtDAO.recordAPILifeCycleEvent(apiIdentifier, currentStatus.toUpperCase(),\n targetStatus.toUpperCase(), invoker, tenantId);\n }\n if (log.isDebugEnabled()) {\n String logMessage = \"API Status changed successfully. API Name: \" + apiIdentifier.getApiName()\n + \", API Version \" + apiIdentifier.getVersion() + \", New Status : \" + targetStatus;\n log.debug(logMessage);\n }\n }\n } catch (RegistryException e) {\n String errorMsg = \"Could not complete api state change workflow\";\n log.error(errorMsg, e);\n throw new WorkflowException(errorMsg, e);\n }\n } catch (APIManagementException e) {\n String errorMsg = \"Could not complete api state change workflow\";\n log.error(errorMsg, e);\n }\n return new GeneralWorkflowResponse();\n }",
"private JSONObject updateHeaderStatus(Connection con, String clientId, String orgId,\n String roleId, String userId, BudgetAdjustment objAdjustment, String appstatus,\n String comments, Date currentDate, VariablesSecureApp vars,\n NextRoleByRuleVO paramNextApproval, String Lang, String documentType) {\n String adjustMentId = null, pendingapproval = null, reserveRoleId = \"\";\n JSONObject return_obj = new JSONObject();\n Boolean isDirectApproval = false, reserve = false;\n String alertRuleId = \"\", alertWindow = AlertWindow.BudgetAdjustment;\n User objUser = OBDal.getInstance().get(User.class, vars.getUser());\n User objCreater = objAdjustment.getCreatedBy();\n NextRoleByRuleVO nextApproval = paramNextApproval;\n try {\n OBContext.setAdminMode();\n // NextRoleByRuleVO nextApproval = NextRoleByRule.getNextRole(con, clientId, orgId,\n // roleId,userId, Resource.PURCHASE_REQUISITION, 0.00);\n\n String BudgetAdjustementid = objAdjustment.getId();\n JSONObject tableData = new JSONObject();\n tableData.put(\"headerColumn\", ApprovalTables.Budget_Adjustment_HEADER_COLUMN);\n tableData.put(\"tableName\", ApprovalTables.Budget_Adjustment_Table);\n tableData.put(\"headerId\", objAdjustment.getId());\n tableData.put(\"roleId\", roleId);\n EutNextRole nextRole = null;\n boolean isBackwardDelegation = false;\n HashMap<String, String> role = null;\n String qu_next_role_id = \"\";\n String delegatedFromRole = null;\n String delegatedToRole = null;\n JSONObject fromUserandRoleJson = new JSONObject();\n String fromUser = userId;\n String fromRole = roleId;\n boolean isDummyRole = false;\n isDirectApproval = Utility.isDirectApproval(tableData);\n\n // find the submitted role org/branch details\n Role submittedRoleObj = null;\n String submittedRoleOrgId = null;\n\n if (objAdjustment.getNextRole() != null) {\n if (objAdjustment.getEfinSubmittedRole() != null\n && objAdjustment.getEfinSubmittedRole().getEutReg() != null) {\n submittedRoleOrgId = objAdjustment.getEfinSubmittedRole().getEutReg().getId();\n } else {\n submittedRoleOrgId = orgId;\n }\n } else if (objAdjustment.getNextRole() == null) {\n submittedRoleObj = OBContext.getOBContext().getRole();\n if (submittedRoleObj != null && submittedRoleObj.getEutReg() != null) {\n submittedRoleOrgId = submittedRoleObj.getEutReg().getId();\n } else {\n submittedRoleOrgId = orgId;\n }\n }\n\n // get alert rule id\n OBQuery<AlertRule> queryAlertRule = OBDal.getInstance().createQuery(AlertRule.class,\n \"as e where e.client.id='\" + clientId + \"' and e.efinProcesstype='\" + alertWindow + \"'\");\n if (queryAlertRule.list().size() > 0) {\n AlertRule objRule = queryAlertRule.list().get(0);\n alertRuleId = objRule.getId();\n }\n\n /**\n * fetching from roleId and userId based on delegated user / forwarder/ direct approver\n **/\n if (objAdjustment.getNextRole() != null) {\n fromUserandRoleJson = forwardDao.getFromuserAndFromRoleWhileApprove(\n objAdjustment.getNextRole(), userId, roleId, clientId, submittedRoleOrgId,\n Resource.BUDGET_ENTRY_RULE, isDummyRole, isDirectApproval);\n if (fromUserandRoleJson != null && fromUserandRoleJson.length() > 0) {\n if (fromUserandRoleJson.has(\"fromUser\"))\n fromUser = fromUserandRoleJson.getString(\"fromUser\");\n if (fromUserandRoleJson.has(\"fromRole\"))\n fromRole = fromUserandRoleJson.getString(\"fromRole\");\n if (fromUserandRoleJson.has(\"isDirectApproval\"))\n isDirectApproval = fromUserandRoleJson.getBoolean(\"isDirectApproval\");\n }\n\n } else {\n fromUser = userId;\n fromRole = roleId;\n }\n\n if ((objAdjustment.getNextRole() == null)) {\n // nextApproval = NextRoleByRule.getNextRole(con, clientId, orgId, roleId, userId,\n // documentType, 0.00);\n nextApproval = NextRoleByRule.getLineManagerBasedNextRole(\n OBDal.getInstance().getConnection(), clientId, submittedRoleOrgId, fromRole, fromUser,\n Resource.BUDGET_ADJUSTMENT_RULE, BigDecimal.ZERO, fromUser, false,\n objAdjustment.getDocumentStatus());\n // check reserve role\n reserveRoleId = roleId;\n // reserve = UtilityDAO.getReserveFundsRole(documentType, roleId, orgId,\n // BudgetAdjustementid);\n } else {\n if (isDirectApproval) {\n // nextApproval = NextRoleByRule.getNextRole(con, clientId, orgId, roleId, userId,\n // documentType, 0.00);\n nextApproval = NextRoleByRule.getLineManagerBasedNextRole(\n OBDal.getInstance().getConnection(), clientId, submittedRoleOrgId, fromRole, fromUser,\n Resource.BUDGET_ADJUSTMENT_RULE, BigDecimal.ZERO, fromUser, false,\n objAdjustment.getDocumentStatus());\n reserveRoleId = roleId;\n /*\n * reserve = UtilityDAO.getReserveFundsRole(documentType, roleId, orgId,\n * BudgetAdjustementid);\n */\n if (nextApproval != null && nextApproval.hasApproval()) {\n nextRole = OBDal.getInstance().get(EutNextRole.class, nextApproval.getNextRoleId());\n if (nextRole.getEutNextRoleLineList().size() > 0) {\n for (EutNextRoleLine objNextRoleLine : nextRole.getEutNextRoleLineList()) {\n OBQuery<UserRoles> userRole = OBDal.getInstance().createQuery(UserRoles.class,\n \"role.id='\" + objNextRoleLine.getRole().getId() + \"'\");\n role = NextRoleByRule.getbackwardDelegatedFromAndToRoles(\n OBDal.getInstance().getConnection(), clientId, orgId,\n userRole.list().get(0).getUserContact().getId(), documentType, \"\");\n delegatedFromRole = role.get(\"FromUserRoleId\");\n delegatedToRole = role.get(\"ToUserRoleId\");\n isBackwardDelegation = NextRoleByRule.isBackwardDelegation(\n OBDal.getInstance().getConnection(), clientId, orgId, delegatedFromRole,\n delegatedToRole, fromUser, documentType, 0.00);\n if (isBackwardDelegation)\n break;\n }\n }\n }\n if (isBackwardDelegation) {\n nextApproval = NextRoleByRule.getNextRole(OBDal.getInstance().getConnection(), clientId,\n submittedRoleOrgId, delegatedFromRole, userId, documentType, 0.00);\n reserveRoleId = delegatedFromRole;\n // reserve = UtilityDAO.getReserveFundsRole(documentType, delegatedFromRole, orgId,\n // BudgetAdjustementid);\n }\n } else {\n role = NextRoleByRule.getDelegatedFromAndToRoles(OBDal.getInstance().getConnection(),\n clientId, submittedRoleOrgId, fromUser, documentType, qu_next_role_id);\n\n delegatedFromRole = role.get(\"FromUserRoleId\");\n delegatedToRole = role.get(\"ToUserRoleId\");\n\n if (delegatedFromRole != null && delegatedToRole != null)\n nextApproval = NextRoleByRule.getDelegatedNextRole(OBDal.getInstance().getConnection(),\n clientId, submittedRoleOrgId, delegatedFromRole, delegatedToRole, fromUser,\n documentType, 0.00);\n reserveRoleId = delegatedFromRole;\n /*\n * reserve = UtilityDAO.getReserveFundsRole(documentType, delegatedFromRole, orgId,\n * BudgetAdjustementid);\n */\n }\n }\n if (nextApproval != null && nextApproval.getErrorMsg() != null\n && nextApproval.getErrorMsg().equals(\"NoManagerAssociatedWithRole\")) {\n return_obj.put(\"count\", 3);\n } else if (nextApproval != null && nextApproval.hasApproval()) {\n // get old nextrole line user and role list\n HashMap<String, String> alertReceiversMap = forwardDao\n .getNextRoleLineList(objAdjustment.getNextRole(), Resource.BUDGET_ADJUSTMENT_RULE);\n ArrayList<String> includeRecipient = new ArrayList<String>();\n nextRole = OBDal.getInstance().get(EutNextRole.class, nextApproval.getNextRoleId());\n objAdjustment.setUpdated(new java.util.Date());\n objAdjustment.setUpdatedBy(OBContext.getOBContext().getUser());\n objAdjustment.setDocumentStatus(\"EFIN_IP\");\n objAdjustment.setNextRole(nextRole);\n nextRole = OBDal.getInstance().get(EutNextRole.class, nextApproval.getNextRoleId());\n // get alert recipient\n OBQuery<AlertRecipient> receipientQuery = OBDal.getInstance()\n .createQuery(AlertRecipient.class, \"as e where e.alertRule.id='\" + alertRuleId + \"'\");\n\n forwardDao.getAlertForForwardedUser(objAdjustment.getId(), alertWindow, alertRuleId,\n objUser, clientId, Constants.APPROVE, objAdjustment.getDocno(), Lang, vars.getRole(),\n objAdjustment.getEUTForward(), Resource.BUDGET_ADJUSTMENT_RULE, alertReceiversMap);\n\n // set alerts for next roles\n if (nextRole.getEutNextRoleLineList().size() > 0) {\n // delete alert for approval alerts\n // OBQuery<Alert> alertQuery = OBDal.getInstance().createQuery(Alert.class,\n // \"as e where e.referenceSearchKey='\" + objAdjustment.getId()\n // + \"' and e.alertStatus='NEW'\");\n // if (alertQuery.list().size() > 0) {\n // for (Alert objAlert : alertQuery.list()) {\n // objAlert.setAlertStatus(\"SOLVED\");\n // }\n // }\n String Description = sa.elm.ob.finance.properties.Resource.getProperty(\"finance.ba.wfa\",\n Lang) + \" \" + objCreater.getName();\n for (EutNextRoleLine objNextRoleLine : nextRole.getEutNextRoleLineList()) {\n AlertUtility.alertInsertionRole(objAdjustment.getId(), objAdjustment.getDocno(),\n objNextRoleLine.getRole().getId(), \"\", objAdjustment.getClient().getId(),\n Description, \"NEW\", alertWindow, \"finance.ba.wfa\", Constants.GENERIC_TEMPLATE);\n // get user name for delegated user to insert on approval history.\n OBQuery<EutDocappDelegateln> delegationln = OBDal.getInstance().createQuery(\n EutDocappDelegateln.class,\n \" as e left join e.eUTDocappDelegate as hd where hd.role.id ='\"\n + objNextRoleLine.getRole().getId() + \"' and hd.fromDate <='\" + currentDate\n + \"' and hd.date >='\" + currentDate + \"' and e.documentType='EUT_119'\");\n if (delegationln != null && delegationln.list().size() > 0) {\n\n AlertUtility.alertInsertionRole(objAdjustment.getId(), objAdjustment.getDocno(),\n delegationln.list().get(0).getRole().getId(),\n delegationln.list().get(0).getUserContact().getId(),\n objAdjustment.getClient().getId(), Description, \"NEW\", alertWindow,\n \"finance.Budget.wfa\", Constants.GENERIC_TEMPLATE);\n\n includeRecipient.add(delegationln.list().get(0).getRole().getId());\n if (pendingapproval != null)\n pendingapproval += \"/\" + delegationln.list().get(0).getUserContact().getName();\n else\n pendingapproval = String.format(Constants.sWAITINGFOR_S_APPROVAL,\n delegationln.list().get(0).getUserContact().getName());\n }\n // add next role recipient\n includeRecipient.add(objNextRoleLine.getRole().getId());\n }\n }\n // existing Recipient\n if (receipientQuery.list().size() > 0) {\n for (AlertRecipient objAlertReceipient : receipientQuery.list()) {\n includeRecipient.add(objAlertReceipient.getRole().getId());\n OBDal.getInstance().remove(objAlertReceipient);\n }\n }\n // avoid duplicate recipient\n HashSet<String> incluedSet = new HashSet<String>(includeRecipient);\n Iterator<String> iterator = incluedSet.iterator();\n while (iterator.hasNext()) {\n AlertUtility.insertAlertRecipient(iterator.next(), null, clientId, alertWindow);\n }\n objAdjustment.setAction(\"AP\");\n if (pendingapproval == null)\n pendingapproval = nextApproval.getStatus();\n\n log.debug(\n \"doc sts:\" + objAdjustment.getDocumentStatus() + \"action:\" + objAdjustment.getAction());\n return_obj.put(\"count\", 1);\n // count = 1;\n // Waiting For Approval flow\n\n } else {\n OBContext.setAdminMode(true);\n\n // get old nextrole line user and role list\n HashMap<String, String> alertReceiversMap = forwardDao\n .getNextRoleLineList(objAdjustment.getNextRole(), Resource.BUDGET_ADJUSTMENT_RULE);\n\n ArrayList<String> includeRecipient = new ArrayList<String>();\n // nextRole = OBDal.getInstance().get(EutNextRole.class, nextApproval.getNextRoleId());\n\n objAdjustment.setUpdated(new java.util.Date());\n objAdjustment.setUpdatedBy(OBContext.getOBContext().getUser());\n objAdjustment.setDocumentStatus(\"EFIN_AP\");\n Role objCreatedRole = null;\n User objCreatedUser = OBDal.getInstance().get(User.class,\n objAdjustment.getCreatedBy().getId());\n if (objCreatedUser.getADUserRolesList().size() > 0) {\n objCreatedRole = objCreatedUser.getADUserRolesList().get(0).getRole();\n }\n /*\n * OBQuery<Alert> alertQuery = OBDal.getInstance().createQuery(Alert.class,\n * \"as e where e.referenceSearchKey='\" + objAdjustment.getId() +\n * \"' and e.alertStatus='NEW'\"); if (alertQuery.list().size() > 0) { for (Alert objAlert :\n * alertQuery.list()) { objAlert.setAlertStatus(\"SOLVED\"); } }\n */\n // get alert recipient\n OBQuery<AlertRecipient> receipientQuery = OBDal.getInstance()\n .createQuery(AlertRecipient.class, \"as e where e.alertRule.id='\" + alertRuleId + \"'\");\n\n forwardDao.getAlertForForwardedUser(objAdjustment.getId(), alertWindow, alertRuleId,\n objUser, clientId, Constants.APPROVE, objAdjustment.getDocno(), Lang, vars.getRole(),\n objAdjustment.getEUTForward(), Resource.BUDGET_ADJUSTMENT_RULE, alertReceiversMap);\n\n // check and insert recipient\n if (receipientQuery.list().size() > 0) {\n for (AlertRecipient objAlertReceipient : receipientQuery.list()) {\n includeRecipient.add(objAlertReceipient.getRole().getId());\n OBDal.getInstance().remove(objAlertReceipient);\n }\n }\n includeRecipient.add(objCreatedRole.getId());\n // avoid duplicate recipient\n HashSet<String> incluedSet = new HashSet<String>(includeRecipient);\n Iterator<String> iterator = incluedSet.iterator();\n while (iterator.hasNext()) {\n AlertUtility.insertAlertRecipient(iterator.next(), null, clientId, alertWindow);\n } // set alert for requester\n String Description = sa.elm.ob.finance.properties.Resource\n .getProperty(\"finance.ba.approved\", Lang) + \" \" + objUser.getName();\n AlertUtility.alertInsertionRole(objAdjustment.getId(), objAdjustment.getDocno(),\n objAdjustment.getRole().getId(), objAdjustment.getCreatedBy().getId(),\n objAdjustment.getClient().getId(), Description, \"NEW\", alertWindow,\n \"finance.ba.approved\", Constants.GENERIC_TEMPLATE);\n objAdjustment.setNextRole(null);\n objAdjustment.setAction(\"PD\");\n return_obj.put(\"count\", 2);\n // count = 2;\n // Final Approval Flow\n }\n\n OBDal.getInstance().save(objAdjustment);\n adjustMentId = objAdjustment.getId();\n if (!StringUtils.isEmpty(adjustMentId)) {\n\n if (return_obj.getInt(\"count\") != 3) {\n JSONObject historyData = new JSONObject();\n historyData.put(\"ClientId\", clientId);\n historyData.put(\"OrgId\", orgId);\n historyData.put(\"RoleId\", roleId);\n historyData.put(\"UserId\", userId);\n historyData.put(\"HeaderId\", adjustMentId);\n historyData.put(\"Comments\", comments);\n historyData.put(\"Status\", appstatus);\n historyData.put(\"NextApprover\", pendingapproval);\n historyData.put(\"HistoryTable\", ApprovalTables.Budget_Adjustment_HISTORY);\n historyData.put(\"HeaderColumn\", ApprovalTables.Budget_Adjustment_HEADER_COLUMN);\n historyData.put(\"ActionColumn\", ApprovalTables.Budget_Adjustment_DOCACTION_COLUMN);\n\n Utility.InsertApprovalHistory(historyData);\n }\n\n }\n // OBDal.getInstance().flush();\n // check reserve role\n reserve = UtilityDAO.getReserveFundsRole(documentType, fromRole, orgId, BudgetAdjustementid,\n BigDecimal.ZERO);\n return_obj.put(\"reserve\", reserve);\n // delete the unused nextroles in eut_next_role table.\n DocumentRuleDAO.deleteUnusedNextRoles(OBDal.getInstance().getConnection(), documentType);\n\n // after approved by forwarded user removing the forward and rmi id\n if (objAdjustment.getEUTForward() != null) {\n forwardDao.setForwardStatusAsDraft(objAdjustment.getEUTForward());\n objAdjustment.setEUTForward(null);\n }\n if (objAdjustment.getEUTReqmoreinfo() != null) {\n forwardDao.setForwardStatusAsDraft(objAdjustment.getEUTReqmoreinfo());\n objAdjustment.setEUTReqmoreinfo(null);\n objAdjustment.setREQMoreInfo(\"N\");\n }\n OBDal.getInstance().save(objAdjustment);\n } catch (Exception e) {\n log.error(\"Exception in updateHeaderStatus in IssueRequest: \", e);\n OBDal.getInstance().rollbackAndClose();\n try {\n return_obj.put(\"count\", 0);\n return_obj.put(\"reserve\", false);\n } catch (JSONException e1) {\n\n }\n return return_obj;\n } finally {\n OBContext.restorePreviousMode();\n }\n return return_obj;\n }",
"public void findOrderAndfindContracts() {\n log.info(\"OrdersBean : findOrderAndfindContracts!\");\n ordersEntity = findOrders_ByIdUsers_andStatusIsPending();\n if (ordersEntity != null) {\n contractsBean.findAllContracts(ordersEntity.getId());\n calculatePriceOrder();\n setCptContracts(contractsBean.countContractsByIdOrder(ordersEntity.getId()));\n }\n }",
"@org.junit.Test\r\n public void testUpdateReview3() throws Exception {\r\n System.out.println(\"updateReview3\");\r\n Long id = new Long(0);\r\n Review review = new Review(new Long(0), \"Max\", 9, \"It's excellent\");\r\n service.insertReview(review);\r\n Review review2 = new Review(new Long(0), null, 2, \"Disappointing\");\r\n try{\r\n Review result = service.updateReview(review2, id);\r\n }catch(BusinessException ex){\r\n return;\r\n }\r\n fail(\"Accepted null author name\");\r\n }",
"public void setFormData(){\r\n try{\r\n if(vecSpecialReviewData != null){\r\n SpecialReviewFormBean specialReviewFormBean = null;\r\n for(int index = 0; index < vecSpecialReviewData.size(); index++){\r\n specialReviewFormBean = (SpecialReviewFormBean)vecSpecialReviewData.elementAt(index);\r\n \r\n // Case# 3110: Special review in prop dev linked to protocols - Start\r\n if(enableProtocolToDevProposalLink == 1 && specialReviewFormBean .getSpecialReviewCode() == specialReviewTypeCode){\r\n specialReviewFormBean .setSpecialReviewCode(specialReviewTypeCode);\r\n // 4154: Problems in IRB Linking - Start\r\n// specialReviewFormBean .setApprovalCode(linkedToIRBCode);\r\n// specialReviewFormBean .setApplicationDate(null);\r\n// specialReviewFormBean .setApprovalDate(null);\r\n // 4154: Problems in IRB Linking - End\r\n if(specialReviewFormBean.getProtocolSPRevNumber()!= null){\r\n ProtocolInfoBean protocolInfoBean = getProtocolDetails(specialReviewFormBean.getProtocolSPRevNumber().trim());\r\n if(protocolInfoBean!= null){\r\n if(protocolInfoBean.getProtocolStatusDesc() != null && !protocolInfoBean.getProtocolStatusDesc().equals(\"\")){\r\n specialReviewFormBean.setApprovalDescription(protocolInfoBean.getProtocolStatusDesc());\r\n }\r\n if(protocolInfoBean.getApplicationDate() != null && !protocolInfoBean.getApplicationDate().equals(\"\")){\r\n specialReviewFormBean.setApplicationDate(protocolInfoBean.getApplicationDate());\r\n }\r\n if(protocolInfoBean.getApprovalDate() != null && !protocolInfoBean.getApprovalDate().equals(\"\")){\r\n specialReviewFormBean.setApprovalDate(protocolInfoBean.getApprovalDate());\r\n }\r\n // 4154: Problems in IRB Linking - Start\r\n // Enabled for COEUSQA-3726 : Issue with IRB linking - while adding a special review in proposal dev application is incorrectly updating the approval type code - Start\r\n if(protocolInfoBean.getProtocolNumber() != null){\r\n specialReviewFormBean .setApprovalCode(linkedToIRBCode);\r\n }\r\n // Enabled for COEUSQA-3726 : Issue with IRB linking - while adding a special review in proposal dev application is incorrectly updating the approval type code - End\r\n // 4154: Problems in IRB Linking - End\r\n }\r\n }\r\n //Added for COEUSQA-3119- Need to implement IACUC link to Award, IP, Prop Dev, and IRB - start\r\n //If ENABLE_IACUC_TO_DEV_PROPOSAL_LINK is 1 and special review code is of type Animal Usage then it should display the\r\n //iacuc details of that special review.\r\n } else if(enableIacucToDevProposalLink == 1 && specialReviewFormBean .getSpecialReviewCode() == specialRevTypeCodeParamForIacuc){\r\n specialReviewFormBean .setSpecialReviewCode(specialRevTypeCodeParamForIacuc);\r\n if(specialReviewFormBean.getProtocolSPRevNumber()!= null){\r\n edu.mit.coeus.iacuc.bean.ProtocolInfoBean protocolInfoBean = \r\n getIacucProtocolDetails(specialReviewFormBean.getProtocolSPRevNumber().trim());\r\n if(protocolInfoBean!= null){\r\n if(protocolInfoBean.getProtocolStatusDesc() != null && !CoeusGuiConstants.EMPTY_STRING.equals(protocolInfoBean.getProtocolStatusDesc())){\r\n specialReviewFormBean.setApprovalDescription(protocolInfoBean.getProtocolStatusDesc());\r\n }\r\n if(protocolInfoBean.getApplicationDate() != null && !CoeusGuiConstants.EMPTY_STRING.equals(protocolInfoBean.getApplicationDate())){\r\n specialReviewFormBean.setApplicationDate(protocolInfoBean.getApplicationDate());\r\n }\r\n if(protocolInfoBean.getApprovalDate() != null && !CoeusGuiConstants.EMPTY_STRING.equals(protocolInfoBean.getApprovalDate())){\r\n specialReviewFormBean.setApprovalDate(protocolInfoBean.getApprovalDate());\r\n }\r\n // Enabled for COEUSQA-3726 : Issue with IRB linking - while adding a special review in proposal dev application is incorrectly updating the approval type code - Start\r\n if(protocolInfoBean.getProtocolNumber() != null){\r\n specialReviewFormBean .setApprovalCode(linkedToIACUCCode);\r\n }\r\n // Enabled for COEUSQA-3726 : Issue with IRB linking - while adding a special review in proposal dev application is incorrectly updating the approval type code - End\r\n }\r\n }\r\n }\r\n //Added for COEUSQA-3119- Need to implement IACUC link to Award, IP, Prop Dev, and IRB - end\r\n \r\n //Added for COEUSQA-2984 : Statuses in special review - start\r\n /*\r\n * When proposal will be in progress and it is human usage linkage it should display the current status of the protocol(special review)\r\n * But once proposal is submitted it should not display the current status of the protocol\r\n */\r\n else{\r\n int statusCode = getCreationStatusCode();\r\n \r\n ProposalSpecialReviewFormBean proposalSpecialReviewFormBean = null;\r\n if(PROPOSAL_SUBMITTED_STATUS != statusCode && SPECIAL_REVIEW_FOR_HUMAN_SUBJECTS == specialReviewFormBean .getSpecialReviewCode()){\r\n //Added for COEUSQA-3367 : Unknown error opening dev proposal - Error with IACUC link - start\r\n //Added for COEUSQA-3418 : Special Reviews approval type & other details do not \"stick\" in Dev Proposal, IP, or Award - start\r\n //if parameter ENABLE_PROTOCOL_TO_DEV_PROPOSAL_LINK is enabled then only special review should display the original status\r\n if(specialReviewFormBean.getProtocolSPRevNumber()!=null && enableProtocolToDevProposalLink == 1){\r\n ProtocolInfoBean protocolInfoBean = getProtocolDetails(specialReviewFormBean.getProtocolSPRevNumber().trim());\r\n if(protocolInfoBean.getProtocolStatusDesc()!= null){\r\n specialReviewFormBean.setApprovalDescription(protocolInfoBean.getProtocolStatusDesc());\r\n }\r\n if(protocolInfoBean.getProtocolStatusDesc()== null && specialReviewFormBean.getApprovalDescription()!=null){\r\n specialReviewFormBean.setApprovalDescription(specialReviewFormBean.getApprovalDescription());\r\n }\r\n }\r\n //Added for COEUSQA-3418 : Special Reviews approval type & other details do not \"stick\" in Dev Proposal, IP, or Award - end\r\n //Added for COEUSQA-3367 : Unknown error opening dev proposal - Error with IACUC link - end\r\n }\r\n //If there is no protocol status code in DB for particular special review and proposal is in submitted status\r\n //then it should display the actual status of the protocol(special review)\r\n if(PROPOSAL_SUBMITTED_STATUS == statusCode && specialReviewFormBean.getProtocolStatusCode()== 0 &&\r\n SPECIAL_REVIEW_FOR_HUMAN_SUBJECTS == specialReviewFormBean .getSpecialReviewCode()){\r\n //Added for COEUSQA-3367 : Unknown error opening dev proposal - Error with IACUC link - start\r\n if(specialReviewFormBean.getProtocolSPRevNumber()!=null){\r\n ProtocolInfoBean protocolInfoBean = getProtocolDetails(specialReviewFormBean.getProtocolSPRevNumber().trim());\r\n if(protocolInfoBean.getProtocolStatusDesc()!= null){\r\n specialReviewFormBean.setApprovalDescription(protocolInfoBean.getProtocolStatusDesc());\r\n }\r\n if(protocolInfoBean.getProtocolStatusDesc()== null && specialReviewFormBean.getApprovalDescription()!=null){\r\n specialReviewFormBean.setApprovalDescription(specialReviewFormBean.getApprovalDescription());\r\n }\r\n }\r\n //Added for COEUSQA-3367 : Unknown error opening dev proposal - Error with IACUC link - end\r\n }\r\n \r\n //Added for COEUSQA-3119- Need to implement IACUC link to Award, IP, Prop Dev, and IRB - start\r\n //When proposal will be in progress and it is human usage linkage it should display the current status of the protocol(special review)\r\n //But once proposal is submitted it should not display the current status of the protocol\r\n if(PROPOSAL_SUBMITTED_STATUS != statusCode && SPECIAL_REVIEW_FOR_ANIMAL_USAGE == specialReviewFormBean .getSpecialReviewCode()){\r\n //Added for COEUSQA-3367 : Unknown error opening dev proposal - Error with IACUC link - start\r\n //Added for COEUSQA-3418 : Special Reviews approval type & other details do not \"stick\" in Dev Proposal, IP, or Award - start\r\n //if parameter ENABLE_IACUC_TO_DEV_PROPOSAL_LINK is enabled then only special review should display the original status\r\n if(specialReviewFormBean.getProtocolSPRevNumber()!=null && enableIacucToDevProposalLink == 1){\r\n edu.mit.coeus.iacuc.bean.ProtocolInfoBean protocolInfoBean = getIacucProtocolDetails(specialReviewFormBean.getProtocolSPRevNumber().trim());\r\n if(protocolInfoBean.getProtocolStatusDesc()!= null){\r\n specialReviewFormBean.setApprovalDescription(protocolInfoBean.getProtocolStatusDesc());\r\n }\r\n if(protocolInfoBean.getProtocolStatusDesc()== null && specialReviewFormBean.getApprovalDescription()!=null){\r\n specialReviewFormBean.setApprovalDescription(specialReviewFormBean.getApprovalDescription());\r\n }\r\n }\r\n //Added for COEUSQA-3418 : Special Reviews approval type & other details do not \"stick\" in Dev Proposal, IP, or Award - end\r\n //Added for COEUSQA-3367 : Unknown error opening dev proposal - Error with IACUC link - end\r\n \r\n }\r\n\r\n //If there is no protocol status code in DB for particular special review and proposal is in submitted status\r\n //then it should display the actual status of the protocol(special review)\r\n if(PROPOSAL_SUBMITTED_STATUS == statusCode && specialReviewFormBean.getProtocolStatusCode()== 0 &&\r\n SPECIAL_REVIEW_FOR_ANIMAL_USAGE == specialReviewFormBean .getSpecialReviewCode()){\r\n //Added for COEUSQA-3367 : Unknown error opening dev proposal - Error with IACUC link - start\r\n if(specialReviewFormBean.getProtocolSPRevNumber()!=null){\r\n edu.mit.coeus.iacuc.bean.ProtocolInfoBean protocolInfoBean = getIacucProtocolDetails(specialReviewFormBean.getProtocolSPRevNumber().trim());\r\n if(protocolInfoBean.getProtocolStatusDesc()!= null){\r\n specialReviewFormBean.setApprovalDescription(protocolInfoBean.getProtocolStatusDesc());\r\n }\r\n if(protocolInfoBean.getProtocolStatusDesc()== null && specialReviewFormBean.getApprovalDescription()!=null){\r\n specialReviewFormBean.setApprovalDescription(specialReviewFormBean.getApprovalDescription());\r\n }\r\n }\r\n //Added for COEUSQA-3367 : Unknown error opening dev proposal - Error with IACUC link - end\r\n }\r\n //Added for COEUSQA-3119- Need to implement IACUC link to Award, IP, Prop Dev, and IRB - end\r\n }\r\n //Added for COEUSQA-2984 : Statuses in special review - end\r\n \r\n// // Case# 3110: Special review in prop dev linked to protocols - End\r\n\r\n if(specialReviewFormBean.getAcType() != null && specialReviewFormBean.getAcType().equals(\"D\")){\r\n /*\r\n *Fix for Bugid #2435\r\n *Create delete vector instance if its null\r\n *Geo on 09-29-2006\r\n *BEGIN\r\n */\r\n if(vecDelSpecialReviewData==null) vecDelSpecialReviewData = new Vector();\r\n /*\r\n *END #2435\r\n */\r\n vecDelSpecialReviewData.addElement(specialReviewFormBean);\r\n vecSpecialReviewData.removeElementAt(index);\r\n index--;\r\n }\r\n }\r\n //Added for case#3183 - Proposal Hierarchy - starts\r\n //To update the records in the table after syncing.\r\n// specialReviewForm.setFormData();\r\n specialReviewForm.setTableEditors();\r\n if(((DefaultTableModel) specialReviewForm.tblSpecialReview.getModel()).getRowCount() >0){\r\n (specialReviewForm.tblSpecialReview.getSelectionModel()).setSelectionInterval(0, 0);\r\n }\r\n //Added for case#3183 - Proposal Hierarchy - ends\r\n // Commented for Case# 3110: Special review in prop dev linked to protocols - Start\r\n// // Case # 2021\r\n// for(int index=0;index<vecSpecialReviewData.size();index++){\r\n// specialReviewFormBean = (SpecialReviewFormBean)vecSpecialReviewData.get(index);\r\n// //Added/Modified for case#2990 - start\r\n// if(specialReviewFormBean.getSpecialReviewCode() == 1){\r\n// if(specialReviewFormBean.getProtocolSPRevNumber()!= null){\r\n// ProtocolInfoBean protocolInfoBean = getProtocolDetails(specialReviewFormBean.getProtocolSPRevNumber().trim());\r\n// if(protocolInfoBean!= null){\r\n// if(protocolInfoBean.getProtocolStatusDesc() != null && !protocolInfoBean.getProtocolStatusDesc().equals(\"\")){\r\n// specialReviewFormBean.setApprovalDescription(protocolInfoBean.getProtocolStatusDesc());\r\n// }\r\n// if(protocolInfoBean.getApplicationDate() != null && !protocolInfoBean.getApplicationDate().equals(\"\")){\r\n// specialReviewFormBean.setApplicationDate(protocolInfoBean.getApplicationDate());\r\n// }\r\n// if(protocolInfoBean.getApprovalDate() != null && !protocolInfoBean.getApprovalDate().equals(\"\")){\r\n// specialReviewFormBean.setApprovalDate(protocolInfoBean.getApprovalDate());\r\n// }\r\n// }\r\n// }\r\n// }\r\n// //Added/Modified for case#2990 - end\r\n// }// Case # 2021\r\n // Commented for Case# 3110: Special review in prop dev linked to protocols - End\r\n }\r\n }catch (CoeusException ex){\r\n ex.printStackTrace();\r\n CoeusOptionPane.showErrorDialog(ex.getMessage());\r\n }\r\n }",
"@org.junit.Test\r\n public void testUpdateReview4() throws Exception {\r\n System.out.println(\"updateReview4\");\r\n Long id = new Long(0);\r\n Review review = new Review(new Long(0), \"Max\", 9, \"It's excellent\");\r\n service.insertReview(review);\r\n Review review2 = new Review(new Long(0), \"\", 2, \"Disappointing\");\r\n try{\r\n Review result = service.updateReview(review2, id);\r\n }catch(BusinessException ex){\r\n return;\r\n }\r\n fail(\"Accepted empty author name\");\r\n }",
"public void setFormDataProtocol(){\r\n try{\r\n if(vecSpecialReviewData != null){\r\n SpecialReviewFormBean specialReviewFormBean = null;\r\n for(int index = 0; index < vecSpecialReviewData.size(); index++){\r\n specialReviewFormBean = (SpecialReviewFormBean)vecSpecialReviewData.elementAt(index);\r\n\r\n // Case# 3110: Special review in prop dev linked to protocols - Start\r\n if(enableProtocolToDevProposalLink == 1 && specialReviewFormBean .getSpecialReviewCode() == specialReviewTypeCode){\r\n specialReviewFormBean .setSpecialReviewCode(specialReviewTypeCode);\r\n // 4154: Problems in IRB Linking - Start\r\n// specialReviewFormBean .setApprovalCode(linkedToIRBCode);\r\n// specialReviewFormBean .setApplicationDate(null);\r\n// specialReviewFormBean .setApprovalDate(null);\r\n // 4154: Problems in IRB Linking - End\r\n if(specialReviewFormBean.getProtocolSPRevNumber()!= null){\r\n ProtocolInfoBean protocolInfoBean = getProtocolDetails(specialReviewFormBean.getProtocolSPRevNumber().trim());\r\n if(protocolInfoBean!= null){\r\n if(protocolInfoBean.getProtocolStatusDesc() != null && !protocolInfoBean.getProtocolStatusDesc().equals(\"\")){\r\n specialReviewFormBean.setApprovalDescription(protocolInfoBean.getProtocolStatusDesc());\r\n }\r\n if(protocolInfoBean.getApplicationDate() != null && !protocolInfoBean.getApplicationDate().equals(\"\")){\r\n specialReviewFormBean.setApplicationDate(protocolInfoBean.getApplicationDate());\r\n }\r\n if(protocolInfoBean.getApprovalDate() != null && !protocolInfoBean.getApprovalDate().equals(\"\")){\r\n specialReviewFormBean.setApprovalDate(protocolInfoBean.getApprovalDate());\r\n }\r\n \r\n // : Problems in IRB Linking - Start\r\n// if(protocolInfoBean.getProtocolStatusDesc()!= null ){\r\n// specialReviewFormBean.setApprovalDescription(protocolInfoBean.getProtocolStatusDesc());\r\n// }else{\r\n// specialReviewFormBean.setApprovalDescription(\"newTest\");\r\n// }\r\n //Status Changing....\r\n// if(protocolInfoBean.getProtocolNumber() != null){\r\n// specialReviewFormBean .setApprovalCode(linkedToIRBCode);\r\n// }\r\n // : Problems in IRB Linking - End\r\n }\r\n }\r\n }\r\n // Case# 3110: Special review in prop dev linked to protocols - End\r\n\r\n if(specialReviewFormBean.getAcType() != null && specialReviewFormBean.getAcType().equals(\"D\")){\r\n /*\r\n *Fix for Bugid #2435\r\n *Create delete vector instance if its null\r\n *Geo on 09-29-2006\r\n *BEGIN\r\n */\r\n if(vecDelSpecialReviewData==null) vecDelSpecialReviewData = new Vector();\r\n /*\r\n *END #2435\r\n */\r\n vecDelSpecialReviewData.addElement(specialReviewFormBean);\r\n vecSpecialReviewData.removeElementAt(index);\r\n index--;\r\n }\r\n }\r\n// //Added for case#3183 - Proposal Hierarchy - starts\r\n// //To update the records in the table after syncing.\r\n//// specialReviewForm.setFormData();\r\n// specialReviewForm.setTableEditors();\r\n// if(((DefaultTableModel) specialReviewForm.tblSpecialReview.getModel()).getRowCount() >0){\r\n// (specialReviewForm.tblSpecialReview.getSelectionModel()).setSelectionInterval(0, 0);\r\n// }\r\n //Added for case#3183 - Proposal Hierarchy - ends\r\n // Commented for Case# 3110: Special review in prop dev linked to protocols - Start\r\n// // Case # 2021\r\n// for(int index=0;index<vecSpecialReviewData.size();index++){\r\n// specialReviewFormBean = (SpecialReviewFormBean)vecSpecialReviewData.get(index);\r\n// //Added/Modified for case#2990 - start\r\n// if(specialReviewFormBean.getSpecialReviewCode() == 1){\r\n// if(specialReviewFormBean.getProtocolSPRevNumber()!= null){\r\n// ProtocolInfoBean protocolInfoBean = getProtocolDetails(specialReviewFormBean.getProtocolSPRevNumber().trim());\r\n// if(protocolInfoBean!= null){\r\n// if(protocolInfoBean.getProtocolStatusDesc() != null && !protocolInfoBean.getProtocolStatusDesc().equals(\"\")){\r\n// specialReviewFormBean.setApprovalDescription(protocolInfoBean.getProtocolStatusDesc());\r\n// }\r\n// if(protocolInfoBean.getApplicationDate() != null && !protocolInfoBean.getApplicationDate().equals(\"\")){\r\n// specialReviewFormBean.setApplicationDate(protocolInfoBean.getApplicationDate());\r\n// }\r\n// if(protocolInfoBean.getApprovalDate() != null && !protocolInfoBean.getApprovalDate().equals(\"\")){\r\n// specialReviewFormBean.setApprovalDate(protocolInfoBean.getApprovalDate());\r\n// }\r\n// }\r\n// }\r\n// }\r\n// //Added/Modified for case#2990 - end\r\n// }// Case # 2021\r\n // Commented for Case# 3110: Special review in prop dev linked to protocols - End\r\n }\r\n }catch (CoeusException ex){\r\n ex.printStackTrace();\r\n CoeusOptionPane.showErrorDialog(ex.getMessage());\r\n }\r\n }",
"@org.junit.Test\r\n public void testUpdateReview6() throws Exception {\r\n System.out.println(\"updateReview6\");\r\n Long id = new Long(0);\r\n Review review = new Review(new Long(0), \"Max\", 9, \"It's excellent\");\r\n service.insertReview(review);\r\n Review review2 = new Review(new Long(0), \"Jack\", 2, null);\r\n try{\r\n Review result = service.updateReview(review2, id);\r\n }catch(BusinessException ex){\r\n return;\r\n }\r\n fail(\"Accepted null review text\");\r\n }",
"private void updrec() {\n\t\tsavedata();\n\t\tcontractDetail.retrieve(stateVariable.getXwordn(), stateVariable.getXwabcd());\n\t\tnmfkpinds.setPgmInd36(! lastIO.isFound());\n\t\tnmfkpinds.setPgmInd66(isLastError());\n\t\t// BR00011 Product found on Contract_Detail and NOT ERROR(CONDET)\n\t\tif (! nmfkpinds.pgmInd36() && ! nmfkpinds.pgmInd66()) {\n\t\t\trestoredata();\n\t\t\tcontractDetail.update();\n\t\t\tnmfkpinds.setPgmInd99(isLastError());\n\t\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\t\tmsgObjIdx = setMsgObj(\"Y2U0007\", \"\", msgObjIdx, messages);\n\t\t\t\tstateVariable.setZmsage(subString(errmsg, 1, 78));\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tstateVariable.setZmsage(subString(errmsg, 1, 78));\n\t\t}\n\t}",
"public static String control_send_review_change_email_request() throws IOException {\r\n \r\n String output = \"\";\r\n String file_stream = \"\";\r\n \r\n if (send_review_change_email_request.equals(\"Edit\")) {\r\n \r\n connection = use_connection;\r\n \r\n set_security_code(new_security_code);\r\n set_row_id(row_id);\r\n set_item_id(item_id);\r\n \r\n if (change_security_code().equals(\"success\")) {\r\n\r\n if (!(search_particular_review().get(0).get(0).equals(\"fail\"))\r\n && !(search_particular_review().get(0).get(0).equals(\"no review\"))\r\n && search_particular_review().get(0).size() == 1) {\r\n \r\n URL url_for_post_request = new URL(Config.domain() + \"/third-party/email-forwarders/send-email-change-review-request/\");\r\n \r\n Map<String, Object> parameter = new LinkedHashMap<>();\r\n \r\n parameter.put(\"domain\", Config.domain());\r\n parameter.put(\"row_id\", search_particular_review().get(0).get(0));\r\n parameter.put(\"item_id\", search_particular_review().get(1).get(0));\r\n parameter.put(\"rating\", search_particular_review().get(2).get(0));\r\n \r\n if (search_particular_review().get(3).get(0).equals(\"\")\r\n || search_particular_review().get(3).get(0).replaceAll(\" \", \"\").length() == 0) {\r\n \r\n parameter.put(\"subject\", \"No subject\");\r\n } else {\r\n \r\n parameter.put(\"subject\", search_particular_review().get(3).get(0));\r\n }\r\n \r\n if (search_particular_review().get(4).get(0).equals(\"\")\r\n || search_particular_review().get(4).get(0).replaceAll(\" \", \"\").length() == 0) {\r\n \r\n parameter.put(\"description\", \"No comment\");\r\n } else {\r\n \r\n parameter.put(\"description\", search_particular_review().get(4).get(0));\r\n }\r\n \r\n if (search_particular_review().get(5).get(0).equals(\"\")\r\n || search_particular_review().get(5).get(0).replaceAll(\" \", \"\").length() == 0) {\r\n \r\n parameter.put(\"name\", \"Anonymous\");\r\n } else {\r\n \r\n parameter.put(\"name\", search_particular_review().get(5).get(0));\r\n }\r\n \r\n if (search_particular_review().get(6).get(0).equals(\"\")\r\n || search_particular_review().get(6).get(0).replaceAll(\" \", \"\").length() == 0) {\r\n \r\n parameter.put(\"email\", \"[email protected]\");\r\n } else {\r\n \r\n parameter.put(\"email\", search_particular_review().get(6).get(0));\r\n }\r\n \r\n parameter.put(\"security_code\", search_particular_review().get(7).get(0));\r\n \r\n StringBuilder post_data = new StringBuilder();\r\n \r\n for (Map.Entry<String, Object> each_parameter : parameter.entrySet()) {\r\n \r\n if (post_data.length() != 0) {\r\n \r\n post_data.append('&');\r\n }\r\n \r\n post_data.append(URLEncoder.encode(each_parameter.getKey(), \"UTF-8\"));\r\n post_data.append('=');\r\n post_data.append(URLEncoder.encode(String.valueOf(each_parameter.getValue()), \"UTF-8\"));\r\n }\r\n \r\n byte[] post_data_bytes = post_data.toString().getBytes(\"UTF-8\");\r\n \r\n HttpURLConnection file_connection = (HttpURLConnection)url_for_post_request.openConnection();\r\n file_connection.setRequestMethod(\"POST\");\r\n file_connection.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded\");\r\n file_connection.setRequestProperty(\"Content-Length\", String.valueOf(post_data_bytes.length));\r\n file_connection.setDoOutput(true);\r\n file_connection.getOutputStream().write(post_data_bytes);\r\n \r\n Reader read_input = new BufferedReader(\r\n new InputStreamReader(file_connection.getInputStream(), \"UTF-8\"));\r\n \r\n for (int each_character; (each_character = read_input.read()) >= 0;) {\r\n \r\n file_stream += (char)each_character;\r\n }\r\n \r\n if (file_stream.equals(\"success\")) {\r\n \r\n Show_Reviews_Update.form_messages.add(\"success - send email change review request\");\r\n } \r\n }\r\n }\r\n \r\n output = Show_Reviews_Update.show_form_messages();\r\n \r\n try {\r\n \r\n use_connection.close();\r\n } catch (SQLException e) {\r\n }\r\n \r\n Show_Reviews_Update.form_messages.clear();\r\n }\r\n \r\n return output;\r\n }",
"public String rejectApprovedApplication(Bwfl_permit_tracking_action act){\n\n\n\t\t\tint saveStatus = 0;\n\t\t\tConnection con = null;\n\t\t\tPreparedStatement pstmt = null;\t\t\t\n\t\t\tString updtQr = \"\";\n\t\t\tString delQr = \"\";\n\t\t\tString insQr = \"\";\n\t\t\tint seq = getRejctedSeq();\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\ttry {\n\t\t\t\tcon = ConnectionToDataBase.getConnection();\n\t\t\t\tcon.setAutoCommit(false);\n\t\t\t\tDate date = new Date();\n\t\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"HH:mm:ss\");\n\t\t\t\tString time = sdf.format(cal.getTime());\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\n\n\t\t\t\t\tupdtQr = \t\" UPDATE bwfl_license.import_permit_20_21 \"+\n\t\t\t\t\t\t\t \t\" SET deo_time=?, deo_date=?, deo_remark=?, \"+\n\t\t\t\t\t\t\t \t\" deo_user=?, vch_approved=?, vch_status=?, import_fee_challan_no=?, spcl_fee_challan_no=? \" +\n\t\t\t\t\t\t\t \t\" WHERE id=? AND district_id=? AND login_type=? AND app_id=? \";\n\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\tpstmt = con.prepareStatement(updtQr);\n\n\n\t\t\t\t\tpstmt.setString(1, time);\n\t\t\t\t\tpstmt.setDate(2, Utility.convertUtilDateToSQLDate(new Date()));\n\t\t\t\t\tpstmt.setString(3, act.getFillRemrks());\t\n\t\t\t\t\tpstmt.setString(4, ResourceUtil.getUserNameAllReq().trim());\n\t\t\t\t\tpstmt.setString(5, \"REJECTED\");\n\t\t\t\t\tpstmt.setString(6, \"Rejected By DEO after Approval\");\n\t\t\t\t\tpstmt.setString(7, null);\n\t\t\t\t\tpstmt.setString(8, null);\n\t\t\t\t\tpstmt.setInt(9, act.getRequestID());\n\t\t\t\t\tpstmt.setInt(10, act.getDistrictId());\n\t\t\t\t\tpstmt.setString(11, act.getLoginType());\n\t\t\t\t\tpstmt.setInt(12, act.getAppId());\n\t\n\t\t\t\t\tsaveStatus = pstmt.executeUpdate();\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"status1------rejectttt----- \"+saveStatus);\n\t\t\t\t\t\t\n\t\t\t\t\tif(saveStatus > 0){\n\t\t\t\t\t\n\t\t\t\t\t\tinsQr = \t\" INSERT INTO bwfl_license.rejected_permit_after_approval_20_21( \" +\n\t\t\t\t\t\t\t\t\t\" seq, district_id, bwfl_id, bwfl_type, cr_date, approval_time, approval_remark, \" +\n\t\t\t\t\t\t\t\t\t\" approval_user, approval_date, lic_no, permit_nmbr, login_type, reject_dt_time, reject_remark, app_id_fk) \" +\n\t\t\t\t\t\t\t\t\t\" VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); \";\n\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\tpstmt = con.prepareStatement(insQr);\n\n\n\t\t\t\t\tpstmt.setInt(1, seq);\n\t\t\t\t\tpstmt.setInt(2, act.getDistrictId());\n\t\t\t\t\tpstmt.setInt(3, act.getBwflId());\n\t\t\t\t\tpstmt.setString(4, act.getLicenseType());\n\t\t\t\t\tpstmt.setDate(5, Utility.convertUtilDateToSQLDate(new Date()));\n\t\t\t\t\tpstmt.setString(6, act.getApprovalTym());\n\t\t\t\t\tpstmt.setString(7, act.getDeoRemrks());\n\t\t\t\t\tpstmt.setString(8, act.getApprovalUser());\n\t\t\t\t\tpstmt.setDate(9, Utility.convertUtilDateToSQLDate(act.getApprovalDate()));\n\t\t\t\t\tpstmt.setString(10, act.getLicenseNmbr());\t\n\t\t\t\t\tpstmt.setString(11, act.getPermitNmbr());\n\t\t\t\t\tpstmt.setString(12, act.getLoginType());\n\t\t\t\t\tpstmt.setString(13, dateFormat.format(new Date()));\n\t\t\t\t\tpstmt.setString(14, act.getFillRemrks());\n\t\t\t\t\tpstmt.setInt(15, act.getAppId());\n\n\t\t\t\t\tsaveStatus = pstmt.executeUpdate();\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"status2------rejectttt----- \"+saveStatus);\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif(saveStatus > 0){\n\t\t\t\t\t\tfor (int i = 0; i < act.getDisplayBrandDetails().size(); i++) {\n\n\t\t\t\t\t\t\tBwfl_permit_tracking_dt dt = (Bwfl_permit_tracking_dt) act.getDisplayBrandDetails().get(i);\n\n\t\t\t\t\t\t\tsaveStatus = 0;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(act.getLoginType().equalsIgnoreCase(\"BWFL\")){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdelQr = \t\" DELETE FROM bwfl_license.mst_bottling_plan_20_21 \"+\t\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t\t \t\t\" WHERE int_distillery_id=? AND int_brand_id=? AND int_pack_id=? AND plan_dt=? \" +\n\t\t\t\t\t\t\t\t \t\t\" AND permitno=? AND (finalized_flag!='F' or finalized_flag IS NULL) \";\n\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\tpstmt = con.prepareStatement(delQr);\n\t\t\t\n\t\t\t\n\t\t\t\t\t\t\t\tpstmt.setInt(1, act.getBwflId());\n\t\t\t\t\t\t\t\tpstmt.setInt(2, dt.getBrandId_dt());\n\t\t\t\t\t\t\t\tpstmt.setInt(3, dt.getPckgID_dt());\n\t\t\t\t\t\t\t\tpstmt.setDate(4, Utility.convertUtilDateToSQLDate(act.getApprovalDate()));\n\t\t\t\t\t\t\t\tpstmt.setString(5, act.getPermitNmbr());\t\n\t\t\t\n\t\t\t\t\t\t\t\tsaveStatus = pstmt.executeUpdate();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(act.getLoginType().equalsIgnoreCase(\"FL2D\")){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdelQr = \t\" DELETE FROM fl2d.mst_stock_receive_20_21 \"+\t\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t\t \t\t\" WHERE int_fl2d_id=? AND int_brand_id=? AND int_pack_id=? AND plan_dt=? \" +\n\t\t\t\t\t\t\t\t \t\t\" AND permit_no=? AND (finalized_flag!='F' or finalized_flag IS NULL) \";\n\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\tpstmt = con.prepareStatement(delQr);\n\t\t\t\n\t\t\t\n\t\t\t\t\t\t\t\tpstmt.setInt(1, act.getBwflId());\n\t\t\t\t\t\t\t\tpstmt.setInt(2, dt.getBrandId_dt());\n\t\t\t\t\t\t\t\tpstmt.setInt(3, dt.getPckgID_dt());\n\t\t\t\t\t\t\t\tpstmt.setDate(4, Utility.convertUtilDateToSQLDate(act.getApprovalDate()));\n\t\t\t\t\t\t\t\tpstmt.setString(5, act.getPermitNmbr());\t\n\t\t\t\n\t\t\t\t\t\t\t\tsaveStatus = pstmt.executeUpdate();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tSystem.out.println(\"status3------rejectttt----- \"+saveStatus);\n\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t\n\n\t\t\t\tif (saveStatus > 0) {\n\t\t\t\t\tcon.commit();\n\t\t\t\t\tact.closeApplication();\n\t\t\t\t\tFacesContext.getCurrentInstance().addMessage(null,new FacesMessage(FacesMessage.SEVERITY_INFO,\n\t\t\t\t\t\" Application Rejected !!! \",\"Application Rejected !!!\"));\n\t\t\t\t\t\n\n\t\t\t\t} else {\n\t\t\t\t\tFacesContext.getCurrentInstance().addMessage(null,new FacesMessage(FacesMessage.SEVERITY_ERROR,\n\t\t\t\t\t\"Error !!! \", \"Error!!!\"));\n\n\t\t\t\t\tcon.rollback();\n\n\t\t\t\t}\n\t\t\t} catch (Exception se) {\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null,new FacesMessage(se.getMessage(), se.getMessage()));\n\t\t\t\tse.printStackTrace();\n\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (pstmt != null)\n\t\t\t\t\t\tpstmt.close();\n\t\t\t\t\tif (con != null)\n\t\t\t\t\t\tcon.close();\n\n\t\t\t\t} catch (Exception se) {\n\t\t\t\t\tse.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn \"\";\n\n\t\t\n\t\t}",
"@org.junit.Test\r\n public void testUpdateReview7() throws Exception {\r\n System.out.println(\"updateReview7\");\r\n Long id = new Long(0);\r\n Review review = new Review(new Long(0), \"Max\", 9, \"It's excellent\");\r\n service.insertReview(review);\r\n Review review2 = new Review(new Long(0), \"Jack\", 2, \"\");\r\n try{\r\n Review result = service.updateReview(review2, id);\r\n }catch(BusinessException ex){\r\n return;\r\n }\r\n fail(\"Accepted empty review text\");\r\n }",
"private void completeReview(long ticketId, ApprovalDTO dto, boolean reject, String reason)\n throws PortalServiceException {\n CMSUser user = ControllerHelper.getCurrentUser();\n Enrollment ticketDetails = enrollmentService.getTicketDetails(user, ticketId);\n \n long processInstanceId = ticketDetails.getProcessInstanceId();\n if (processInstanceId <= 0) {\n throw new PortalServiceException(\"Requested profile is not available for approval.\");\n }\n try {\n List<TaskSummary> availableTasks = businessProcessService.getAvailableTasks(user.getUsername(),\n Arrays.asList(user.getRole().getDescription()));\n boolean found = false;\n for (TaskSummary taskSummary : availableTasks) {\n if (taskSummary.getName().equals(APPROVAL_TASK_NAME)\n && taskSummary.getProcessInstanceId() == processInstanceId) {\n found = true;\n long taskId = taskSummary.getId();\n\n if (!reject) {\n // apply approver changes\n ProviderInformationType provider = applyChanges(dto, taskId);\n businessProcessService.completeReview(taskId, user.getUsername(),\n Arrays.asList(user.getRole().getDescription()), provider, false, reason);\n } else {\n businessProcessService.completeReview(taskId, user.getUsername(),\n Arrays.asList(user.getRole().getDescription()), null, true, reason);\n }\n }\n }\n if (!found) {\n throw new PortalServiceException(\"You do not have access to the requested operation.\");\n }\n } catch (Exception ex) {\n throw new PortalServiceException(\"Error while invoking process server.\", ex);\n }\n }",
"@org.junit.Test\r\n public void testUpdateReview5() throws Exception {\r\n System.out.println(\"updateReview5\");\r\n Long id = new Long(0);\r\n Review review = new Review(new Long(0), \"Max\", 9, \"It's excellent\");\r\n service.insertReview(review);\r\n Review review2 = new Review(new Long(0), \"Jack\", null, \"Disappointing\");\r\n try{\r\n Review result = service.updateReview(review2, id);\r\n }catch(BusinessException ex){\r\n return;\r\n }\r\n fail(\"Accepted null rating\");\r\n }",
"@Override\n public APIStateChangeResponse changeLifeCycleStatus(String orgId, ApiTypeWrapper apiTypeWrapper, String action,\n Map<String, Boolean> checklist) throws APIManagementException{\n APIStateChangeResponse response = new APIStateChangeResponse();\n try {\n PrivilegedCarbonContext.startTenantFlow();\n PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(this.username);\n PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(this.tenantDomain, true);\n\n String targetStatus;\n String providerName;\n String apiName;\n String apiContext;\n String apiType;\n String apiVersion;\n String currentStatus;\n String uuid;\n int apiOrApiProductId;\n boolean isApiProduct = apiTypeWrapper.isAPIProduct();\n String workflowType;\n\n if (isApiProduct) {\n APIProduct apiProduct = apiTypeWrapper.getApiProduct();\n providerName = apiProduct.getId().getProviderName();\n apiName = apiProduct.getId().getName();\n apiContext = apiProduct.getContext();\n apiType = apiProduct.getType();\n apiVersion = apiProduct.getId().getVersion();\n currentStatus = apiProduct.getState();\n uuid = apiProduct.getUuid();\n apiOrApiProductId = apiMgtDAO.getAPIProductId(apiTypeWrapper.getApiProduct().getId());\n workflowType = WorkflowConstants.WF_TYPE_AM_API_PRODUCT_STATE;\n } else {\n API api = apiTypeWrapper.getApi();\n providerName = api.getId().getProviderName();\n apiName = api.getId().getApiName();\n apiContext = api.getContext();\n apiType = api.getType();\n apiVersion = api.getId().getVersion();\n currentStatus = api.getStatus();\n uuid = api.getUuid();\n apiOrApiProductId = apiMgtDAO.getAPIID(uuid);\n workflowType = WorkflowConstants.WF_TYPE_AM_API_STATE;\n }\n String gatewayVendor = apiMgtDAO.getGatewayVendorByAPIUUID(uuid);\n\n WorkflowStatus apiWFState = null;\n WorkflowDTO wfDTO = apiMgtDAO.retrieveWorkflowFromInternalReference(Integer.toString(apiOrApiProductId),\n workflowType);\n if (wfDTO != null) {\n apiWFState = wfDTO.getStatus();\n }\n\n // if the workflow has started, then executor should not fire again\n if (!WorkflowStatus.CREATED.equals(apiWFState)) {\n response = executeStateChangeWorkflow(currentStatus, action, apiName, apiContext, apiType,\n apiVersion, providerName, apiOrApiProductId, uuid, gatewayVendor, workflowType);\n // get the workflow state once the executor is executed.\n wfDTO = apiMgtDAO.retrieveWorkflowFromInternalReference(Integer.toString(apiOrApiProductId),\n workflowType);\n if (wfDTO != null) {\n apiWFState = wfDTO.getStatus();\n response.setStateChangeStatus(apiWFState.toString());\n } else {\n response.setStateChangeStatus(WorkflowStatus.APPROVED.toString());\n }\n }\n\n // only change the lifecycle if approved\n // apiWFState is null when simple wf executor is used because wf state is not stored in the db.\n if (WorkflowStatus.APPROVED.equals(apiWFState) || apiWFState == null) {\n LifeCycleUtils.changeLifecycle(this.username, this, orgId, apiTypeWrapper, action, checklist);\n JSONObject apiLogObject = new JSONObject();\n apiLogObject.put(APIConstants.AuditLogConstants.NAME, apiName);\n apiLogObject.put(APIConstants.AuditLogConstants.CONTEXT, apiContext);\n apiLogObject.put(APIConstants.AuditLogConstants.VERSION, apiVersion);\n apiLogObject.put(APIConstants.AuditLogConstants.PROVIDER, providerName);\n APIUtil.logAuditMessage(APIConstants.AuditLogConstants.API, apiLogObject.toString(),\n APIConstants.AuditLogConstants.LIFECYCLE_CHANGED, this.username);\n }\n } catch (APIPersistenceException e) {\n handleException(\"Error while accessing persistence layer\", e);\n } finally {\n PrivilegedCarbonContext.endTenantFlow();\n }\n return response;\n }",
"@Test\n public void updateWorkflow_200() throws Exception {\n\n // PREPARE THE DATABASE\n // Fill in the workflow db\n addMOToDb(1);\n Integer id = addMOToDb(2).getId();\n addMOToDb(3);\n\n // PREPARE THE TEST\n Workflow mo = new Workflow();\n mo.setName(\"New My_Workflow\");\n mo.setDescription(\"New Description of my new workflow\");\n mo.setRaw(\"New Workflow new content\");\n\n // DO THE TEST\n Response response = callAPI(VERB.PUT, \"/mo/\" + id.toString(), mo);\n\n // CHECK RESULTS\n int status = response.getStatus();\n assertEquals(200, status);\n\n String body = response.readEntity(String.class);\n assertEquals(\"\", body);\n }",
"private APIStateWorkflowDTO setAPIStateWorkflowDTOParameters(String currentStatus, String action, String name,\n String context, String apiType, String version,\n String providerName, int apiOrApiProductId,\n String uuid, String gatewayVendor, String workflowType,\n WorkflowExecutor apiStateWFExecutor) {\n\n WorkflowProperties workflowProperties = getAPIManagerConfiguration().getWorkflowProperties();\n APIStateWorkflowDTO stateWorkflowDTO = new APIStateWorkflowDTO();\n stateWorkflowDTO.setApiCurrentState(currentStatus);\n stateWorkflowDTO.setApiLCAction(action);\n stateWorkflowDTO.setApiName(name);\n stateWorkflowDTO.setApiContext(context);\n stateWorkflowDTO.setApiType(apiType);\n stateWorkflowDTO.setApiVersion(version);\n stateWorkflowDTO.setApiProvider(providerName);\n stateWorkflowDTO.setGatewayVendor(gatewayVendor);\n stateWorkflowDTO.setCallbackUrl(workflowProperties.getWorkflowCallbackAPI());\n stateWorkflowDTO.setExternalWorkflowReference(apiStateWFExecutor.generateUUID());\n stateWorkflowDTO.setTenantId(tenantId);\n stateWorkflowDTO.setTenantDomain(this.tenantDomain);\n stateWorkflowDTO.setWorkflowType(workflowType);\n stateWorkflowDTO.setStatus(WorkflowStatus.CREATED);\n stateWorkflowDTO.setCreatedTime(System.currentTimeMillis());\n stateWorkflowDTO.setWorkflowReference(Integer.toString(apiOrApiProductId));\n stateWorkflowDTO.setInvoker(this.username);\n stateWorkflowDTO.setApiUUID(uuid);\n String workflowDescription = \"Pending lifecycle state change action: \" + action;\n stateWorkflowDTO.setWorkflowDescription(workflowDescription);\n return stateWorkflowDTO;\n }",
"private void reDrowStatusCard() {\n \t\tint currentInstance= Storage_access.getCurrentProjectInstanceBDDID() ;\n \t\t\n \t\tdispatcher.execute(new GetActivityStateAction(currentInstance), new AsyncCallback<GetActivityStateActionResult>() {\n \n \t\n \n \t\t\t@Override public void onFailure(Throwable arg0) {\n \t\t\t\tSystem.out.println(\"!!!!!!!!!!!!!!!!!!!!!**** failed to get activities status\");\n \n \t\t\t}\n \n \t\t\t@Override public void onSuccess(GetActivityStateActionResult result) {\n \t\t\t\tfor (int i=0; i< Storage_access.getNumberOfCard(); i++) {\n \t\t\t\t\tString card = Storage_access.getCard(i);\n \t\t\t\t\tActivityState_dto a = result.getActivitiesState().get(\"\"+Storage_access.getBddIdCard(card));\n \t\t\t\t\tif (a == null) \n \t\t\t\t\t\tStorage_access.revoveFromSlot(i);\t\n \t\t\t\t\telse \n \t\t\t\t\t\tStorage_access.setSlotCard(i, a.getDay(), a.getPeriod());\t\n \t\t\t\t\t\n \t\t\t\t}\n \t\t\t\teventBus.fireEvent( \n \t\t\t\t\t\tnew BoardViewChangedEvent(getView().getCombo_viewChoice1().getSelectedIndex(),\n \t\t\t\t\t\t\t\t\t\t\t\t getView().getCombo_viewChoice2().getSelectedIndex())\n \t\t\t\t\t\t);\n \t\t\t\t//Storage_access.printStorage();\n \t\t\t}\n \n \t\t\t});\n \n \t\t\n \t}",
"@Override\n public void executeAction() throws Exception {\n ContestServiceFacade contestServiceFacade = getContestServiceFacade();\n TCSubject currentUser = DirectStrutsActionsHelper.getTCSubjectFromSession();\n\n // get contest data and phases\n long contestId = getProjectId();\n SoftwareCompetition softwareCompetition \n = contestServiceFacade.getSoftwareContestByProjectId(currentUser, contestId);\n\n // set dashboard data etc. for the data above the final-fix tab\n DirectUtils.setDashboardData(currentUser, getProjectId(), viewData,\n getContestServiceFacade(), !DirectUtils.isStudio(softwareCompetition));\n ContestStatsDTO contestStats = DirectUtils.getContestStats(currentUser, getProjectId(), softwareCompetition);\n this.viewData.setContestStats(contestStats);\n\n this.viewData.setContestId(getProjectId());\n\n // Prepare the data for final fixes\n Phase[] phases = softwareCompetition.getProjectPhases().getAllPhases();\n Phase lastPhase = phases[phases.length - 1];\n\n // get final fix status\n boolean isApproval = lastPhase.getPhaseType().getId() == PhaseType.APPROVAL_PHASE.getId();\n boolean isFinalReview = lastPhase.getPhaseType().getId() == PhaseType.FINAL_REVIEW_PHASE.getId();\n \n // Get the winning submission\n Submission winningSubmission = null;\n List<Submission> submissions = DirectUtils.getStudioContestSubmissions(contestId,\n ContestRoundType.FINAL, currentUser, getContestServiceFacade());\n for (Submission submission : submissions) {\n if (submission.getPlacement() != null && submission.getPlacement() == 1) {\n winningSubmission = submission;\n }\n }\n\n if (isApproval) {\n boolean isApprovalRejected = false;\n Review[] reviewsByPhase =\n getProjectServices().getReviewsByPhase(contestId, lastPhase.getId());\n if (reviewsByPhase.length == 0) {\n this.viewData.setDataUnavailable(true);\n return;\n }\n Review approvalReview = reviewsByPhase[0];\n Comment approvalComment = DirectUtils\n .getReviewCommentByTypeId(CommentType.COMMENT_TYPE_APPROVAL_REVIEW.getId(), approvalReview);\n if (approvalComment != null) {\n isApprovalRejected = \"Rejected\".equalsIgnoreCase(String.valueOf(approvalComment.getExtraInfo()));\n }\n if (isApprovalRejected) {\n if (approvalReview.isCommitted()) {\n this.viewData.setFinalFixStatus(FinalFixStatus.IN_PROGRESS);\n } else {\n this.viewData.setFinalFixStatus(FinalFixStatus.NOT_STARTED);\n \n // Bind the Final Fix details based on approval review to view\n StudioFinalFix finalFix = new StudioFinalFix();\n Item[] approvalReviewItems = approvalReview.getAllItems();\n List<com.topcoder.direct.services.view.dto.contest.studio.Comment> finalFixComments \n = new ArrayList<com.topcoder.direct.services.view.dto.contest.studio.Comment>();\n for (Item item : approvalReviewItems) {\n Comment[] itemComments = item.getAllComments();\n for (Comment itemComment : itemComments) {\n com.topcoder.direct.services.view.dto.contest.studio.Comment com\n = new com.topcoder.direct.services.view.dto.contest.studio.Comment();\n com.setComment(itemComment.getComment());\n finalFixComments.add(com);\n }\n }\n finalFix.setComments(finalFixComments);\n finalFix.setSubmission(winningSubmission);\n this.viewData.setFinalFixes(Arrays.asList(finalFix));\n \n // Get the details for winning submitter\n if (winningSubmission != null) {\n Resource[] resources = softwareCompetition.getResources();\n for (int i = 0; i < resources.length; i++) {\n Resource resource = resources[i];\n if (resource.getId() == winningSubmission.getUpload().getOwner()) {\n this.viewData.setWinnerResource(resource);\n }\n }\n }\n }\n } else {\n throw new DirectException(\"The submission is already approved\");\n }\n } else if (isFinalReview) {\n Phase precedingPhase = phases[phases.length - 2];\n boolean isFinalFixPreceding = precedingPhase.getPhaseType().getId() == PhaseType.FINAL_FIX_PHASE.getId();\n boolean isPrecedingPhaseOpen = (precedingPhase.getPhaseStatus().getId() == PhaseStatus.OPEN.getId());\n boolean isPrecedingPhaseClosed = (precedingPhase.getPhaseStatus().getId() == PhaseStatus.CLOSED.getId());\n \n if (isFinalFixPreceding) {\n if (isPrecedingPhaseOpen) {\n this.viewData.setFinalFixStatus(FinalFixStatus.IN_PROGRESS);\n } else if (isPrecedingPhaseClosed) {\n Review[] reviewsByPhase =\n getProjectServices().getReviewsByPhase(contestId, lastPhase.getId());\n if (reviewsByPhase.length == 0) {\n this.viewData.setDataUnavailable(true);\n return;\n }\n Review finalReview = reviewsByPhase[0];\n \n Comment finalReviewComment = DirectUtils.getReviewCommentByTypeId(\n CommentType.COMMENT_TYPE_FINAL_REVIEW.getId(), finalReview);\n if (finalReviewComment == null) {\n this.viewData.setFinalFixStatus(FinalFixStatus.REVIEW);\n } else if (\"Rejected\".equalsIgnoreCase(String.valueOf(finalReviewComment.getExtraInfo()))) {\n if (finalReview.isCommitted()) {\n this.viewData.setFinalFixStatus(FinalFixStatus.IN_PROGRESS);\n } else {\n this.viewData.setFinalFixStatus(FinalFixStatus.REVIEW);\n }\n } else if (\"Approved\".equalsIgnoreCase(String.valueOf(finalReviewComment.getExtraInfo()))) {\n this.viewData.setFinalFixStatus(FinalFixStatus.COMPLETED);\n }\n }\n }\n\n // Bind data for all existing final fixes to view \n if (this.viewData.getFinalFixStatus() != FinalFixStatus.NOT_STARTED) {\n // Get the Final Fix submissions and convert them into map per project phase for faster lookup\n List<Submission> finalFixSubmissions = DirectUtils.getStudioContestSubmissions(contestId,\n ContestRoundType.STUDIO_FINAL_FIX_SUBMISSION, currentUser, getContestServiceFacade());\n Map<Long, Submission> finalFixSubmissionsMap = new HashMap<Long, Submission>();\n for (Submission finalFixSubmission : finalFixSubmissions) {\n finalFixSubmissionsMap.put(finalFixSubmission.getUpload().getProjectPhase(), finalFixSubmission);\n }\n\n List<StudioFinalFix> finalFixes = new ArrayList<StudioFinalFix>();\n for (int i = 0; i < phases.length; i++) {\n Phase phase = phases[i];\n if (phase.getPhaseType().getId() == PhaseType.FINAL_FIX_PHASE.getId()) {\n Review[] reviewsByPhase =\n getProjectServices().getReviewsByPhase(contestId, phases[i + 1].getId());\n if (reviewsByPhase.length == 0) {\n this.viewData.setDataUnavailable(true);\n return;\n }\n Review finalReview = reviewsByPhase[0];\n StudioFinalFix finalFix = new StudioFinalFix();\n Item[] finalReviewItems = finalReview.getAllItems();\n List<com.topcoder.direct.services.view.dto.contest.studio.Comment> finalFixComments\n = new ArrayList<com.topcoder.direct.services.view.dto.contest.studio.Comment>();\n Comment finalReviewAdditionalComment = null;\n for (Item item : finalReviewItems) {\n Comment[] itemComments = item.getAllComments();\n for (Comment itemComment : itemComments) {\n if (itemComment.getCommentType().getId() == CommentType.COMMENT_TYPE_REQUIRED.getId()) {\n com.topcoder.direct.services.view.dto.contest.studio.Comment com\n = new com.topcoder.direct.services.view.dto.contest.studio.Comment();\n com.setComment(itemComment.getComment());\n if (itemComment.getExtraInfo() != null) {\n com.setFixed(\"Fixed\".equalsIgnoreCase(String.valueOf(itemComment.getExtraInfo())));\n }\n finalFixComments.add(com);\n } else if (itemComment.getCommentType().getId() ==\n CommentType.COMMENT_TYPE_FINAL_REVIEW.getId()) {\n finalReviewAdditionalComment = itemComment;\n }\n }\n }\n finalFix.setComments(finalFixComments);\n if (finalReviewAdditionalComment != null) {\n finalFix.setAdditionalComment(finalReviewAdditionalComment.getComment());\n }\n finalFix.setSubmission(finalFixSubmissionsMap.get(phase.getId()));\n finalFix.setCommitted(finalReview.isCommitted());\n finalFixes.add(finalFix);\n }\n }\n this.viewData.setFinalFixes(finalFixes);\n }\n }\n }",
"@org.junit.Test\r\n public void testUpdateReview2() throws Exception {\r\n System.out.println(\"updateReview2\");\r\n Long id = null;\r\n Review review = new Review(new Long(0), \"Max\", 9, \"It's excellent\");\r\n service.insertReview(review);\r\n Review review2 = new Review(new Long(0), \"Jack\", 2, \"Disappointing\");\r\n try{\r\n Review result = service.updateReview(review2, id);\r\n }catch(BusinessException ex){\r\n return;\r\n }\r\n fail(\"Accepted null id\");\r\n }",
"@Test\n public void testDeleteUserAfterReplacingUser6() throws Exception {\n /*\n * This test has the following setup:\n * - Step 1: user B\n * - Step 2: user C\n * - Step 3: user B\n *\n * This test will perform the following checks:\n * - create a workspace item, and let it move to step 1\n * - Approve it by user B\n * - verify that the item moved to step 2\n * - Approve it by user C\n * - verify that the item moved to step 3\n * - claim it by user B, but don’t approve it\n * - delete user B\n * - verify the delete is refused\n * - add user D to workflow step 1\n * - add user D to workflow step 3\n * - delete user B\n * - verify the delete succeeds\n * - Verify user D can now claim and approve it\n * - verify that the item is archived\n */\n context.turnOffAuthorisationSystem();\n\n Community parent = CommunityBuilder.createCommunity(context).build();\n Collection collection = CollectionBuilder.createCollection(context, parent)\n .withWorkflowGroup(1, workflowUserB)\n .withWorkflowGroup(2, workflowUserC)\n .withWorkflowGroup(3, workflowUserB)\n .build();\n\n WorkspaceItem wsi = WorkspaceItemBuilder.createWorkspaceItem(context, collection)\n .withSubmitter(workflowUserA)\n .withTitle(\"Test item full workflow\")\n .withIssueDate(\"2019-03-06\")\n .withSubject(\"ExtraEntry\")\n .build();\n\n Workflow workflow = XmlWorkflowServiceFactory.getInstance().getWorkflowFactory().getWorkflow(collection);\n\n XmlWorkflowItem workflowItem = xmlWorkflowService.startWithoutNotify(context, wsi);\n MockHttpServletRequest httpServletRequest = new MockHttpServletRequest();\n httpServletRequest.setParameter(\"submit_approve\", \"submit_approve\");\n\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, REVIEW_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, REVIEW_STEP, REVIEW_ACTION);\n\n executeWorkflowAction(httpServletRequest, workflowUserC, workflow, workflowItem, EDIT_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserC, workflow, workflowItem, EDIT_STEP, EDIT_ACTION);\n\n assertDeletionOfEperson(workflowUserB, false);\n addUserToWorkflowGroup(workflowUserD, collection, REVIEW_ROLE);\n addUserToWorkflowGroup(workflowUserD, collection, FINAL_EDIT_ROLE);\n assertDeletionOfEperson(workflowUserB, true);\n\n\n executeWorkflowAction(httpServletRequest, workflowUserD, workflow, workflowItem, FINAL_EDIT_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserD, workflow, workflowItem, FINAL_EDIT_STEP,\n FINAL_EDIT_ACTION);\n\n assertTrue(workflowItem.getItem().isArchived());\n\n }",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n try (PrintWriter out = response.getWriter()) {\n /* TODO output your page here. You may use following sample code. */\n\n HttpSession session = request.getSession();\n\n UserDAO UserDAO = new UserDAO();\n\n if (request.getParameter(\"auditSE\") != null) {\n\n session.setAttribute(\"auditSE\", request.getParameter(\"auditSE\"));\n ServletContext context = getServletContext();\n RequestDispatcher dispatcher = context.getRequestDispatcher(\"/MULTIPLE-auditTrailSE.jsp\");\n dispatcher.forward(request, response);\n }\n\n if (request.getParameter(\"checklist\") != null) {\n ServletContext context = getServletContext();\n RequestDispatcher dispatcher = context.getRequestDispatcher(\"/MULTIPLE-approveSEProposalChecklist.jsp\");\n dispatcher.forward(request, response);\n }\n if (request.getParameter(\"approve\") != null) {\n SE SE = UserDAO.retrieveSEBySEID(Integer.parseInt(request.getParameter(\"approve\")));\n if (session.getAttribute(\"unit\").toString().equals(UserDAO.getUnitByUserID(Integer.parseInt(session.getAttribute(\"userID\").toString()))) && session.getAttribute(\"position\").toString().contains(\"Department Chair\")) {\n if(SE.getDepartment().equals(\"ADEALM\")){\n UserDAO.updateStep(3, Integer.parseInt(request.getParameter(\"approve\")));\n UserDAO.updateDeptUnitRemarks(request.getParameter(\"remarks1\"), Integer.parseInt(request.getParameter(\"approve\")));\n UserDAO.approveDeptChair(Integer.parseInt(request.getParameter(\"approve\")));\n \n UserDAO.updateExternalRemarks(\"N/A\", Integer.parseInt(request.getParameter(\"approve\")));\n UserDAO.approveADEALM(Integer.parseInt(request.getParameter(\"approve\")));\n } else {\n UserDAO.updateStep(2, Integer.parseInt(request.getParameter(\"approve\")));\n UserDAO.updateDeptUnitRemarks(request.getParameter(\"remarks1\"), Integer.parseInt(request.getParameter(\"approve\")));\n UserDAO.approveDeptChair(Integer.parseInt(request.getParameter(\"approve\")));\n }\n \n }\n\n if (session.getAttribute(\"unit\").toString().equals(UserDAO.getUnitByUserID(Integer.parseInt(session.getAttribute(\"userID\").toString()))) && session.getAttribute(\"position\").toString().contains(\"Unit Chair\")) {\n UserDAO.updateStep(2, Integer.parseInt(request.getParameter(\"approve\")));\n UserDAO.updateUnitChairRemarks(request.getParameter(\"remarks1\"), Integer.parseInt(request.getParameter(\"approve\")));\n UserDAO.approveUnitChair(Integer.parseInt(request.getParameter(\"approve\")));\n }\n\n if (session.getAttribute(\"unit\").toString().equals(UserDAO.getUnitByUserID(Integer.parseInt(session.getAttribute(\"userID\").toString()))) && session.getAttribute(\"position\").toString().contains(\"ADEALM\")) {\n UserDAO.updateStep(3, Integer.parseInt(request.getParameter(\"approve\")));\n UserDAO.updateExternalRemarks(request.getParameter(\"remarks1\"), Integer.parseInt(request.getParameter(\"approve\")));\n UserDAO.approveADEALM(Integer.parseInt(request.getParameter(\"approve\")));\n }\n\n if (session.getAttribute(\"unit\").toString().equals(UserDAO.getUnitByUserID(Integer.parseInt(session.getAttribute(\"userID\").toString()))) && session.getAttribute(\"position\").toString().contains(\"Social Engagement Director\")) {\n UserDAO.updateStep(3, Integer.parseInt(request.getParameter(\"approve\")));\n UserDAO.updateSEDirectorRemarks(request.getParameter(\"remarks1\"), Integer.parseInt(request.getParameter(\"approve\")));\n UserDAO.approveSEDirector(Integer.parseInt(request.getParameter(\"approve\")));\n }\n\n if (session.getAttribute(\"unit\").toString().equals(UserDAO.getUnitByUserID(Integer.parseInt(session.getAttribute(\"userID\").toString()))) && session.getAttribute(\"position\").toString().contains(\"Dean\")) {\n UserDAO.updateStep(4, Integer.parseInt(request.getParameter(\"approve\")));\n UserDAO.updateDeanRemarks(request.getParameter(\"remarks1\"), Integer.parseInt(request.getParameter(\"approve\")));\n UserDAO.approveDean(Integer.parseInt(request.getParameter(\"approve\")));\n }\n\n if (session.getAttribute(\"unit\").toString().equals(UserDAO.getUnitByUserID(Integer.parseInt(session.getAttribute(\"userID\").toString()))) && session.getAttribute(\"position\").toString().contains(\"VP/VC\")) {\n UserDAO.updateStep(4, Integer.parseInt(request.getParameter(\"approve\")));\n UserDAO.updateVPVCRemarks(request.getParameter(\"remarks1\"), Integer.parseInt(request.getParameter(\"approve\")));\n UserDAO.approveVPVC(Integer.parseInt(request.getParameter(\"approve\")));\n }\n\n java.util.Date dt = new java.util.Date();\n java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat(\"yyyy-MM-dd HH:mm\");\n java.text.SimpleDateFormat sdf2 = new java.text.SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n \n Notification n = new Notification();\n n.setBody(\"Program: \" + UserDAO.getProgramName(Integer.parseInt(request.getParameter(\"approve\"))) + \"\\n\" + sdf.format(dt));\n \n SimpleDateFormat myFormat = new SimpleDateFormat(\"yyyy-mm-dd\");\n java.util.Date javaDate = new java.util.Date();\n String input1 = new java.sql.Date(javaDate.getTime()).toString();\n String input2 = SE.getActualDate().toString();\n\n try {\n java.util.Date date1 = myFormat.parse(input1);\n java.util.Date date2 = myFormat.parse(input2);\n long diff = date2.getTime() - date1.getTime();\n long days = (diff / (1000*60*60*24));\n\n if(days <= 14){\n n.setTitle(\"Urgent SE Proposal ready for Approval\");\n } else if (days >= 15){\n n.setTitle(\"SE Proposal ready for Approval\");\n }\n } catch (ParseException ex) {\n Logger.getLogger(addSE2.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n n.setDt(sdf2.format(dt));\n\n if (session.getAttribute(\"unit\").toString().equals(UserDAO.getUnitByUserID(Integer.parseInt(session.getAttribute(\"userID\").toString()))) && session.getAttribute(\"position\").toString().contains(\"Department Chair\")) {\n n.setUserID(UserDAO.getUserIDforNotifsADEALM(UserDAO.getUnitByUserID(Integer.parseInt(session.getAttribute(\"userID\").toString()))));\n n.setRedirect(\"/SIGNATORIES-approveSEProposal2.jsp\");\n n.setAttribute(SE.getId());\n }\n\n if (session.getAttribute(\"unit\").toString().equals(UserDAO.getUnitByUserID(Integer.parseInt(session.getAttribute(\"userID\").toString()))) && session.getAttribute(\"position\").toString().contains(\"ADEALM\")) {\n n.setUserID(UserDAO.getUserIDforNotifsDean(UserDAO.getUnitByUserID(Integer.parseInt(session.getAttribute(\"userID\").toString()))));\n n.setRedirect(\"/SIGNATORIES-approveSEProposal3.jsp\");\n n.setAttribute(SE.getId());\n }\n\n if (session.getAttribute(\"unit\").toString().equals(UserDAO.getUnitByUserID(Integer.parseInt(session.getAttribute(\"userID\").toString()))) && session.getAttribute(\"position\").toString().contains(\"Social Engagement Director\")) {\n n.setUserID(UserDAO.getUserIDforNotifsVPVC(UserDAO.getUnitByUserID(Integer.parseInt(session.getAttribute(\"userID\").toString()))));\n n.setRedirect(\"/SIGNATORIES-approveSEProposal3.jsp\");\n n.setAttribute(SE.getId());\n }\n\n if (session.getAttribute(\"unit\").toString().equals(UserDAO.getUnitByUserID(Integer.parseInt(session.getAttribute(\"userID\").toString()))) && session.getAttribute(\"position\").toString().contains(\"Dean\")) {\n n.setUserID(UserDAO.getUserIDforNotifsNeil());\n n.setRedirect(\"/MULTIPLE-approveSEProposal3.jsp\");\n n.setAttribute(SE.getId());\n }\n\n if (session.getAttribute(\"unit\").toString().equals(UserDAO.getUnitByUserID(Integer.parseInt(session.getAttribute(\"userID\").toString()))) && session.getAttribute(\"position\").toString().contains(\"Unit Chair\")) {\n n.setUserID(UserDAO.getUserIDforNotifsSEDirector(UserDAO.getUnitByUserID(Integer.parseInt(session.getAttribute(\"userID\").toString()))));\n n.setRedirect(\"/SIGNATORIES-approveSEProposal2.jsp\");\n n.setAttribute(SE.getId());\n }\n\n if (session.getAttribute(\"unit\").toString().equals(UserDAO.getUnitByUserID(Integer.parseInt(session.getAttribute(\"userID\").toString()))) && session.getAttribute(\"position\").toString().contains(\"VP/VC\")) {\n n.setUserID(UserDAO.getUserIDforNotifsNeil());\n n.setRedirect(\"/MULTIPLE-approveSEProposal3.jsp\");\n n.setAttribute(SE.getId());\n }\n\n UserDAO.AddNotification(n);\n\n Notification n2 = new Notification();\n n2.setTitle(\"SE Proposal Approved\");\n\n if (session.getAttribute(\"unit\").toString().equals(UserDAO.getUnitByUserID(Integer.parseInt(session.getAttribute(\"userID\").toString()))) && session.getAttribute(\"position\").toString().contains(\"Department Chair\")) {\n n2.setBody(UserDAO.getProgramName(Integer.parseInt(request.getParameter(\"approve\"))) + \" approved the Department Chair! It will now be taken to the ADEALM.\" + \"\\n\" + sdf.format(dt));\n }\n\n if (session.getAttribute(\"unit\").toString().equals(UserDAO.getUnitByUserID(Integer.parseInt(session.getAttribute(\"userID\").toString()))) && session.getAttribute(\"position\").toString().contains(\"Unit Chair\")) {\n n2.setBody(UserDAO.getProgramName(Integer.parseInt(request.getParameter(\"approve\"))) + \" approved by the Unit Chair! It will now be taken to the SE Director.\" + \"\\n\" + sdf.format(dt));\n }\n\n if (session.getAttribute(\"unit\").toString().equals(UserDAO.getUnitByUserID(Integer.parseInt(session.getAttribute(\"userID\").toString()))) && session.getAttribute(\"position\").toString().contains(\"ADEALM\")) {\n n2.setBody(UserDAO.getProgramName(Integer.parseInt(request.getParameter(\"approve\"))) + \" approved by the ADEALM! It will now be taken to the Dean.\" + \"\\n\" + sdf.format(dt));\n }\n\n if (session.getAttribute(\"unit\").toString().equals(UserDAO.getUnitByUserID(Integer.parseInt(session.getAttribute(\"userID\").toString()))) && session.getAttribute(\"position\").toString().contains(\"Social Engagement Director\")) {\n n2.setBody(UserDAO.getProgramName(Integer.parseInt(request.getParameter(\"approve\"))) + \" approved by the SE Director! It will now be taken to the VP/VC.\" + \"\\n\" + sdf.format(dt));\n }\n\n if (session.getAttribute(\"unit\").toString().equals(UserDAO.getUnitByUserID(Integer.parseInt(session.getAttribute(\"userID\").toString()))) && session.getAttribute(\"position\").toString().contains(\"VP/VC\")) {\n n2.setBody(UserDAO.getProgramName(Integer.parseInt(request.getParameter(\"approve\"))) + \" approved by the VP/VC! It will now be taken to COSCA.\" + \"\\n\" + sdf.format(dt));\n\n Notification n3 = new Notification();\n n3.setBody(\"Program: \" + UserDAO.getProgramName(Integer.parseInt(request.getParameter(\"approve\"))) + \"\\n\" + sdf.format(dt));\n\n try {\n java.util.Date date1 = myFormat.parse(input1);\n java.util.Date date2 = myFormat.parse(input2);\n long diff = date2.getTime() - date1.getTime();\n long days = (diff / (1000*60*60*24));\n\n if(days <= 14){\n n3.setTitle(\"Urgent SE Proposal ready for Approval\");\n } else if (days >= 15){\n n3.setTitle(\"SE Proposal ready for Approval\");\n }\n } catch (ParseException ex) {\n Logger.getLogger(addSE2.class.getName()).log(Level.SEVERE, null, ex);\n }\n n3.setDt(sdf2.format(dt));\n n3.setUserID(UserDAO.getUserIDforNotifsNeil());\n n3.setRedirect(\"/MULTIPLE-approveSEProposal3.jsp\");\n n3.setAttribute(SE.getId());\n UserDAO.AddNotification(n3);\n }\n\n if (session.getAttribute(\"unit\").toString().equals(UserDAO.getUnitByUserID(Integer.parseInt(session.getAttribute(\"userID\").toString()))) && session.getAttribute(\"position\").toString().contains(\"Dean\")) {\n n2.setBody(UserDAO.getProgramName(Integer.parseInt(request.getParameter(\"approve\"))) + \" has been approved by the Dean! It will now be taken to COSCA.\" + \"\\n\" + sdf.format(dt));\n }\n\n n2.setUserID(UserDAO.getSEOwner(Integer.parseInt(request.getParameter(\"approve\"))));\n n2.setDt(sdf2.format(dt));\n n2.setRedirect(\"/MULTIPLE-viewPendingSEProgramDetails.jsp\");\n n2.setAttribute(SE.getId());\n UserDAO.AddNotification(n2);\n\n request.setAttribute(\"successSE1\", \"You have successfully approved the SE Proposal!\");\n ServletContext context = getServletContext();\n if (session.getAttribute(\"position\").toString().contains(\"ADEALM\")) {\n RequestDispatcher dispatcher = context.getRequestDispatcher(\"/ADEALM-home.jsp\");\n dispatcher.forward(request, response);\n } else if (session.getAttribute(\"position\").equals(\"CCS - Dean\") || session.getAttribute(\"position\").equals(\"COS - Dean\")\n || session.getAttribute(\"position\").equals(\"GCOE - Dean\") || session.getAttribute(\"position\").equals(\"RVRCOB - Dean\") || session.getAttribute(\"position\").equals(\"COL - Dean\")\n || session.getAttribute(\"position\").equals(\"BAGCED - Dean\") || session.getAttribute(\"position\").equals(\"CLA - Dean\") || session.getAttribute(\"position\").equals(\"SOE - Dean\")\n || session.getAttribute(\"position\").toString().contains(\"Department Chair\") || session.getAttribute(\"position\").toString().contains(\"Unit Chair\")\n || session.getAttribute(\"position\").toString().contains(\"Social Engagement Director\") || session.getAttribute(\"position\").toString().contains(\"VP/VC\")) {\n RequestDispatcher dispatcher = context.getRequestDispatcher(\"/SIGNATORIES-home.jsp\");\n dispatcher.forward(request, response);\n }\n }\n\n if (request.getParameter(\"revise\") != null) {\n SE SE = UserDAO.retrieveSEBySEID(Integer.parseInt(request.getParameter(\"revise\")));\n \n java.util.Date dt = new java.util.Date();\n java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat(\"yyyy-MM-dd HH:mm\");\n java.text.SimpleDateFormat sdf2 = new java.text.SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n \n Notification n3 = new Notification();\n n3.setTitle(\"SE Proposal for Revision\");\n if (session.getAttribute(\"unit\").toString().equals(UserDAO.getUnitByUserID(Integer.parseInt(session.getAttribute(\"userID\").toString()))) && session.getAttribute(\"position\").toString().contains(\"Department Chair\")) {\n UserDAO.reviseSE(Integer.parseInt(request.getParameter(\"revise\")));\n UserDAO.updateDeptUnitRemarks(request.getParameter(\"remarks1\"), Integer.parseInt(request.getParameter(\"revise\")));\n UserDAO.reviseDeptChair(Integer.parseInt(request.getParameter(\"revise\")));\n n3.setBody(UserDAO.getProgramName(Integer.parseInt(request.getParameter(\"revise\"))) + \" has some revisions before it is approved by the Department Chair.\" + \"\\n\" + sdf.format(dt));\n n3.setDt(sdf2.format(dt));\n n3.setUserID(UserDAO.getSEOwner(Integer.parseInt(request.getParameter(\"revise\"))));\n n3.setRedirect(\"/MULTIPLE-viewPendingSEProgramDetails.jsp\");\n n3.setAttribute(SE.getId());\n }\n\n if (session.getAttribute(\"unit\").toString().equals(UserDAO.getUnitByUserID(Integer.parseInt(session.getAttribute(\"userID\").toString()))) && session.getAttribute(\"position\").toString().contains(\"ADEALM\")) {\n UserDAO.reviseSE(Integer.parseInt(request.getParameter(\"revise\")));\n UserDAO.updateExternalRemarks(request.getParameter(\"remarks1\"), Integer.parseInt(request.getParameter(\"revise\")));\n UserDAO.reviseADEALM(Integer.parseInt(request.getParameter(\"revise\")));\n n3.setBody(UserDAO.getProgramName(Integer.parseInt(request.getParameter(\"revise\"))) + \" has some revisions before it is approved by the ADEALM.\" + \"\\n\" + sdf.format(dt));\n n3.setDt(sdf2.format(dt));\n n3.setUserID(UserDAO.getSEOwner(Integer.parseInt(request.getParameter(\"revise\"))));\n n3.setRedirect(\"/MULTIPLE-viewPendingSEProgramDetails.jsp\");\n n3.setAttribute(SE.getId());\n }\n\n if (session.getAttribute(\"unit\").toString().equals(UserDAO.getUnitByUserID(Integer.parseInt(session.getAttribute(\"userID\").toString()))) && session.getAttribute(\"position\").toString().contains(\"Dean\")) {\n UserDAO.reviseSE(Integer.parseInt(request.getParameter(\"revise\")));\n UserDAO.updateDeanRemarks(request.getParameter(\"remarks1\"), Integer.parseInt(request.getParameter(\"revise\")));\n UserDAO.reviseDean(Integer.parseInt(request.getParameter(\"revise\")));\n n3.setBody(UserDAO.getProgramName(Integer.parseInt(request.getParameter(\"revise\"))) + \" has some revisions before it is approved by the Dean.\" + \"\\n\" + sdf.format(dt));\n n3.setDt(sdf2.format(dt));\n n3.setUserID(UserDAO.getSEOwner(Integer.parseInt(request.getParameter(\"revise\"))));\n n3.setRedirect(\"/MULTIPLE-viewPendingSEProgramDetails.jsp\");\n n3.setAttribute(SE.getId());\n }\n\n if (session.getAttribute(\"unit\").toString().equals(UserDAO.getUnitByUserID(Integer.parseInt(session.getAttribute(\"userID\").toString()))) && session.getAttribute(\"position\").toString().contains(\"Unit Chair\")) {\n UserDAO.reviseSE(Integer.parseInt(request.getParameter(\"revise\")));\n UserDAO.updateUnitChairRemarks(request.getParameter(\"remarks1\"), Integer.parseInt(request.getParameter(\"revise\")));\n UserDAO.reviseUnitChair(Integer.parseInt(request.getParameter(\"revise\")));\n n3.setBody(UserDAO.getProgramName(Integer.parseInt(request.getParameter(\"revise\"))) + \" has some revisions before it is approved by the Unit Chair.\" + \"\\n\" + sdf.format(dt));\n n3.setDt(sdf2.format(dt));\n n3.setUserID(UserDAO.getSEOwner(Integer.parseInt(request.getParameter(\"revise\"))));\n n3.setRedirect(\"/MULTIPLE-viewPendingSEProgramDetails.jsp\");\n n3.setAttribute(SE.getId());\n }\n\n if (session.getAttribute(\"unit\").toString().equals(UserDAO.getUnitByUserID(Integer.parseInt(session.getAttribute(\"userID\").toString()))) && session.getAttribute(\"position\").toString().contains(\"Social Engagement Director\")) {\n UserDAO.reviseSE(Integer.parseInt(request.getParameter(\"revise\")));\n UserDAO.updateSEDirectorRemarks(request.getParameter(\"remarks1\"), Integer.parseInt(request.getParameter(\"revise\")));\n UserDAO.reviseSEDirector(Integer.parseInt(request.getParameter(\"revise\")));\n n3.setBody(UserDAO.getProgramName(Integer.parseInt(request.getParameter(\"revise\"))) + \" has some revisions before it is approved by the SE Director.\" + \"\\n\" + sdf.format(dt));\n n3.setDt(sdf2.format(dt));\n n3.setUserID(UserDAO.getSEOwner(Integer.parseInt(request.getParameter(\"revise\"))));\n n3.setRedirect(\"/MULTIPLE-viewPendingSEProgramDetails.jsp\");\n n3.setAttribute(SE.getId());\n }\n\n if (session.getAttribute(\"unit\").toString().equals(UserDAO.getUnitByUserID(Integer.parseInt(session.getAttribute(\"userID\").toString()))) && session.getAttribute(\"position\").toString().contains(\"VP/VC\")) {\n UserDAO.reviseSE(Integer.parseInt(request.getParameter(\"revise\")));\n UserDAO.updateVPVCRemarks(request.getParameter(\"remarks1\"), Integer.parseInt(request.getParameter(\"revise\")));\n UserDAO.reviseVPVC(Integer.parseInt(request.getParameter(\"revise\")));\n n3.setBody(UserDAO.getProgramName(Integer.parseInt(request.getParameter(\"revise\"))) + \" has some revisions before it is approved by the VP/VC.\" + \"\\n\" + sdf.format(dt));\n n3.setDt(sdf2.format(dt));\n n3.setUserID(UserDAO.getSEOwner(Integer.parseInt(request.getParameter(\"revise\"))));\n n3.setRedirect(\"/MULTIPLE-viewPendingSEProgramDetails.jsp\");\n n3.setAttribute(SE.getId());\n }\n\n UserDAO.AddNotification(n3);\n\n request.setAttribute(\"reviseSE1\", \"The requesting unit has been notified for a proposal revision.\");\n ServletContext context = getServletContext();\n if (session.getAttribute(\"position\").toString().contains(\"ADEALM\")) {\n RequestDispatcher dispatcher = context.getRequestDispatcher(\"/ADEALM-home.jsp\");\n dispatcher.forward(request, response);\n } else if (session.getAttribute(\"position\").equals(\"CCS - Dean\") || session.getAttribute(\"position\").equals(\"COS - Dean\")\n || session.getAttribute(\"position\").equals(\"GCOE - Dean\") || session.getAttribute(\"position\").equals(\"RVRCOB - Dean\") || session.getAttribute(\"position\").equals(\"COL - Dean\")\n || session.getAttribute(\"position\").equals(\"BAGCED - Dean\") || session.getAttribute(\"position\").equals(\"CLA - Dean\") || session.getAttribute(\"position\").equals(\"SOE - Dean\")\n || session.getAttribute(\"position\").toString().contains(\"Department Chair\") || session.getAttribute(\"position\").toString().contains(\"Unit Chair\")\n || session.getAttribute(\"position\").toString().contains(\"Social Engagement Director\") || session.getAttribute(\"position\").toString().contains(\"VP/VC\")) {\n RequestDispatcher dispatcher = context.getRequestDispatcher(\"/SIGNATORIES-home.jsp\");\n dispatcher.forward(request, response);\n }\n }\n\n if (request.getParameter(\"reject\") != null) {\n SE SE = UserDAO.retrieveSEBySEID(Integer.parseInt(request.getParameter(\"reject\")));\n \n Notification n3 = new Notification();\n n3.setTitle(\"SE Proposal Rejected\");\n \n java.util.Date dt = new java.util.Date();\n java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat(\"yyyy-MM-dd HH:mm\");\n java.text.SimpleDateFormat sdf2 = new java.text.SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\n if (session.getAttribute(\"unit\").toString().equals(UserDAO.getUnitByUserID(Integer.parseInt(session.getAttribute(\"userID\").toString()))) && session.getAttribute(\"position\").toString().contains(\"Department Chair\")) {\n UserDAO.updateDeptUnitRemarks(request.getParameter(\"remarks1\"), Integer.parseInt(request.getParameter(\"reject\")));\n UserDAO.rejectDeptChair(Integer.parseInt(request.getParameter(\"reject\")));\n n3.setBody(UserDAO.getProgramName(Integer.parseInt(request.getParameter(\"reject\"))) + \" has been rejected by the Department Chair. Reason: \" + request.getParameter(\"remarks1\") + \"\\n\" + sdf.format(dt));\n n3.setDt(sdf2.format(dt));\n n3.setUserID(UserDAO.getSEOwner(Integer.parseInt(request.getParameter(\"reject\"))));\n n3.setRedirect(\"/MULTIPLE-viewSEProgramDetails.jsp\");\n n3.setAttribute(SE.getId());\n \n UserDAO.rejectSE(Integer.parseInt(request.getParameter(\"reject\")));\n }\n\n if (session.getAttribute(\"unit\").toString().equals(UserDAO.getUnitByUserID(Integer.parseInt(session.getAttribute(\"userID\").toString()))) && session.getAttribute(\"position\").toString().contains(\"Unit Chair\")) {\n UserDAO.updateDeptUnitRemarks(request.getParameter(\"remarks1\"), Integer.parseInt(request.getParameter(\"reject\")));\n UserDAO.rejectUnitChair(Integer.parseInt(request.getParameter(\"reject\")));\n n3.setBody(UserDAO.getProgramName(Integer.parseInt(request.getParameter(\"reject\"))) + \" has been rejected by the Unit Chair. Reason: \" + request.getParameter(\"remarks1\") + \"\\n\" + sdf.format(dt));\n n3.setDt(sdf2.format(dt));\n n3.setUserID(UserDAO.getSEOwner(Integer.parseInt(request.getParameter(\"reject\"))));\n n3.setRedirect(\"/MULTIPLE-viewSEProgramDetails.jsp\");\n n3.setAttribute(SE.getId());\n \n UserDAO.rejectSE(Integer.parseInt(request.getParameter(\"reject\")));\n }\n\n if (session.getAttribute(\"unit\").toString().equals(UserDAO.getUnitByUserID(Integer.parseInt(session.getAttribute(\"userID\").toString()))) && session.getAttribute(\"position\").toString().contains(\"ADEALM\")) {\n UserDAO.updateExternalRemarks(request.getParameter(\"remarks1\"), Integer.parseInt(request.getParameter(\"reject\")));\n UserDAO.rejectADEALM(Integer.parseInt(request.getParameter(\"reject\")));\n n3.setBody(UserDAO.getProgramName(Integer.parseInt(request.getParameter(\"reject\"))) + \" has been rejected by the ADEALM. Reason: \" + request.getParameter(\"remarks1\") + \"\\n\" + sdf.format(dt));\n n3.setDt(sdf2.format(dt));\n n3.setUserID(UserDAO.getSEOwner(Integer.parseInt(request.getParameter(\"reject\"))));\n n3.setRedirect(\"/MULTIPLE-viewSEProgramDetails.jsp\");\n n3.setAttribute(SE.getId());\n \n UserDAO.rejectSE(Integer.parseInt(request.getParameter(\"reject\")));\n }\n\n if (session.getAttribute(\"unit\").toString().equals(UserDAO.getUnitByUserID(Integer.parseInt(session.getAttribute(\"userID\").toString()))) && session.getAttribute(\"position\").toString().contains(\"Social Engagement Director\")) {\n UserDAO.updateExternalRemarks(request.getParameter(\"remarks1\"), Integer.parseInt(request.getParameter(\"reject\")));\n UserDAO.rejectSEDirector(Integer.parseInt(request.getParameter(\"reject\")));\n n3.setBody(UserDAO.getProgramName(Integer.parseInt(request.getParameter(\"reject\"))) + \" has been rejected by the SE Director. Reason: \" + request.getParameter(\"remarks1\") + \"\\n\" + sdf.format(dt));\n n3.setDt(sdf2.format(dt));\n n3.setUserID(UserDAO.getSEOwner(Integer.parseInt(request.getParameter(\"reject\"))));\n n3.setRedirect(\"/MULTIPLE-viewSEProgramDetails.jsp\");\n n3.setAttribute(SE.getId());\n \n UserDAO.rejectSE(Integer.parseInt(request.getParameter(\"reject\")));\n }\n\n if (session.getAttribute(\"unit\").toString().equals(UserDAO.getUnitByUserID(Integer.parseInt(session.getAttribute(\"userID\").toString()))) && session.getAttribute(\"position\").toString().contains(\"Dean\")) {\n UserDAO.updateDeanRemarks(request.getParameter(\"remarks1\"), Integer.parseInt(request.getParameter(\"reject\")));\n UserDAO.rejectDean(Integer.parseInt(request.getParameter(\"reject\")));\n n3.setBody(UserDAO.getProgramName(Integer.parseInt(request.getParameter(\"reject\"))) + \" has been rejected by the Dean. Reason: \" + request.getParameter(\"remarks1\") + \"\\n\" + sdf.format(dt));\n n3.setDt(sdf.format(dt));\n n3.setUserID(UserDAO.getSEOwner(Integer.parseInt(request.getParameter(\"reject\"))));\n n3.setRedirect(\"/MULTIPLE-viewSEProgramDetails.jsp\");\n n3.setAttribute(SE.getId());\n \n UserDAO.rejectSE(Integer.parseInt(request.getParameter(\"reject\")));\n }\n\n if (session.getAttribute(\"unit\").toString().equals(UserDAO.getUnitByUserID(Integer.parseInt(session.getAttribute(\"userID\").toString()))) && session.getAttribute(\"position\").toString().contains(\"VP/VC\")) {\n UserDAO.updateDeanRemarks(request.getParameter(\"remarks1\"), Integer.parseInt(request.getParameter(\"reject\")));\n UserDAO.rejectVPVC(Integer.parseInt(request.getParameter(\"reject\")));\n n3.setBody(UserDAO.getProgramName(Integer.parseInt(request.getParameter(\"reject\"))) + \" has been rejected by the VP/VC. Reason: \" + request.getParameter(\"remarks1\") + \"\\n\" + sdf.format(dt));\n n3.setDt(sdf2.format(dt));\n n3.setUserID(UserDAO.getSEOwner(Integer.parseInt(request.getParameter(\"reject\"))));\n n3.setRedirect(\"/MULTIPLE-viewSEProgramDetails.jsp\");\n n3.setAttribute(SE.getId());\n \n UserDAO.rejectSE(Integer.parseInt(request.getParameter(\"reject\")));\n }\n\n UserDAO.AddNotification(n3);\n\n request.setAttribute(\"rejectSE1\", \"You have rejected the proposal.\");\n ServletContext context = getServletContext();\n if (session.getAttribute(\"position\").toString().contains(\"ADEALM\")) {\n RequestDispatcher dispatcher = context.getRequestDispatcher(\"/ADEALM-home.jsp\");\n dispatcher.forward(request, response);\n } else if (session.getAttribute(\"position\").equals(\"CCS - Dean\") || session.getAttribute(\"position\").equals(\"COS - Dean\")\n || session.getAttribute(\"position\").equals(\"GCOE - Dean\") || session.getAttribute(\"position\").equals(\"RVRCOB - Dean\") || session.getAttribute(\"position\").equals(\"COL - Dean\")\n || session.getAttribute(\"position\").equals(\"BAGCED - Dean\") || session.getAttribute(\"position\").equals(\"CLA - Dean\") || session.getAttribute(\"position\").equals(\"SOE - Dean\")\n || session.getAttribute(\"position\").toString().contains(\"Department Chair\") || session.getAttribute(\"position\").toString().contains(\"Unit Chair\")\n || session.getAttribute(\"position\").toString().contains(\"Social Engagement Director\") || session.getAttribute(\"position\").toString().contains(\"VP/VC\")) {\n RequestDispatcher dispatcher = context.getRequestDispatcher(\"/SIGNATORIES-home.jsp\");\n dispatcher.forward(request, response);\n }\n }\n }\n }",
"private void EditPlanGlidepathTestAllCombinations(RiskTolerance riskTolerance) throws Exception {\n //Create and login user, link dag accounts and get to the edit plan page\n EditPlanDirectToManaged editPlanPage = signUpAndReachEditPlan();\n //Modify RTQ and verify all combinations of age/rtq driven investment objectives are shown and updated correctly\n changeAndVerifyRTQ(editPlanPage, riskTolerance);\n checkInvalidInformation(editPlanPage);\n //Save plan and verify changes are persistent on the Portfolio Analysis Page\n //Re-enter the default age to retirement values under current RTQ selection\n Reporter.log(\"Verifying that changes were saved and are showing correctly on the Portfolio Analysis Page\",true);\n PortfolioAnalysisPage portfolioAnalysisPageAgain = editPlanPage.goBackToPortfolioAnalysis();\n softAssert.assertTrue(portfolioAnalysisPageAgain.verifyRetirementIncomeNoProjectionButtonDisplayed());\n InvestmentStrategyObject investmentStrategy = new InvestmentStrategyObject(riskTolerance,\n Constants.DEFAULT_RETIREMENT_AGE - Constants.DEFAULT_USER_AGE);\n //Fill in projected retirement income and check for elements visibility\n checkProjectedIncomeAfter(portfolioAnalysisPageAgain, investmentStrategy);\n //Check for invalid projection error message\n Reporter.log(\"Filling invalid projection values and verifying correct error messages are displayed.\", true);\n softAssert.assertTrue(portfolioAnalysisPageAgain.checkInvalidProjectionErrorDisplay());\n softAssert.assertAll();\n }",
"@Test\n public void testDeleteUserWhenMultipleUser6() throws Exception {\n /*\n * This test has the following setup:\n * - Step 1: user B and D\n * - Step 2: user C and D\n * - Step 3: user B and D\n *\n * This test will perform the following checks:\n * - create a workspace item, and let it move to step 1\n * - Approve it by user B\n * - verify that the item moved to step 2\n * - Approve it by user C\n * - verify that the item moved to step 3\n * - claim it by user B, but don’t approve it\n * - delete user B\n * - verify the delete succeeds\n * - Verify user D can now claim and approve it\n * - verify that the item is archived\n */\n context.turnOffAuthorisationSystem();\n\n Community parent = CommunityBuilder.createCommunity(context).build();\n Collection collection = CollectionBuilder.createCollection(context, parent)\n .withWorkflowGroup(1, workflowUserB, workflowUserD)\n .withWorkflowGroup(2, workflowUserC, workflowUserD)\n .withWorkflowGroup(3, workflowUserB, workflowUserD)\n .build();\n\n WorkspaceItem wsi = WorkspaceItemBuilder.createWorkspaceItem(context, collection)\n .withSubmitter(workflowUserA)\n .withTitle(\"Test item full workflow\")\n .withIssueDate(\"2019-03-06\")\n .withSubject(\"ExtraEntry\")\n .build();\n\n Workflow workflow = XmlWorkflowServiceFactory.getInstance().getWorkflowFactory().getWorkflow(collection);\n\n XmlWorkflowItem workflowItem = xmlWorkflowService.startWithoutNotify(context, wsi);\n MockHttpServletRequest httpServletRequest = new MockHttpServletRequest();\n httpServletRequest.setParameter(\"submit_approve\", \"submit_approve\");\n\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, REVIEW_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, REVIEW_STEP, REVIEW_ACTION);\n\n\n executeWorkflowAction(httpServletRequest, workflowUserC, workflow, workflowItem, EDIT_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserC, workflow, workflowItem, EDIT_STEP, EDIT_ACTION);\n\n\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, FINAL_EDIT_STEP, CLAIM_ACTION);\n assertDeletionOfEperson(workflowUserB, true);\n\n executeWorkflowAction(httpServletRequest, workflowUserD, workflow, workflowItem, FINAL_EDIT_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserD, workflow, workflowItem, FINAL_EDIT_STEP,\n FINAL_EDIT_ACTION);\n\n assertTrue(workflowItem.getItem().isArchived());\n\n }",
"@Test\n public void testDeleteUserAfterReplacingUser1() throws Exception {\n /*\n * This test has the following setup:\n * - Step 1: user B\n * - Step 2: user C\n * - Step 3: user B\n *\n * This test will perform the following checks:\n * - create a workspace item, and let it move to step 1\n * - approve it by user B\n * - verify that the item moved to step 2\n * - Approve it by user C\n * - delete user B\n * - verify the delete is refused\n * - add user D to workflow step 3\n * - delete user B\n * - verify the delete is refused\n * - add user D to workflow step 1\n * - delete user B\n * - verify the delete succeeds\n * - Approve it by user D\n * - verify that the item is archived\n */\n context.turnOffAuthorisationSystem();\n\n Community parent = CommunityBuilder.createCommunity(context).build();\n Collection collection = CollectionBuilder.createCollection(context, parent)\n .withWorkflowGroup(1, workflowUserB)\n .withWorkflowGroup(2, workflowUserC)\n .withWorkflowGroup(3, workflowUserB)\n .build();\n\n WorkspaceItem wsi = WorkspaceItemBuilder.createWorkspaceItem(context, collection)\n .withSubmitter(workflowUserA)\n .withTitle(\"Test item full workflow\")\n .withIssueDate(\"2019-03-06\")\n .withSubject(\"ExtraEntry\")\n .build();\n\n Workflow workflow = XmlWorkflowServiceFactory.getInstance().getWorkflowFactory().getWorkflow(collection);\n\n XmlWorkflowItem workflowItem = xmlWorkflowService.startWithoutNotify(context, wsi);\n MockHttpServletRequest httpServletRequest = new MockHttpServletRequest();\n httpServletRequest.setParameter(\"submit_approve\", \"submit_approve\");\n\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, REVIEW_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, REVIEW_STEP, REVIEW_ACTION);\n\n\n executeWorkflowAction(httpServletRequest, workflowUserC, workflow, workflowItem, EDIT_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserC, workflow, workflowItem, EDIT_STEP, EDIT_ACTION);\n\n assertDeletionOfEperson(workflowUserB, false);\n\n addUserToWorkflowGroup(workflowUserD, collection, FINAL_EDIT_ROLE);\n assertDeletionOfEperson(workflowUserB, false);\n addUserToWorkflowGroup(workflowUserD, collection, REVIEW_ROLE);\n\n assertDeletionOfEperson(workflowUserB, true);\n\n executeWorkflowAction(httpServletRequest, workflowUserD, workflow, workflowItem, FINAL_EDIT_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserD, workflow, workflowItem, FINAL_EDIT_STEP,\n FINAL_EDIT_ACTION);\n\n assertTrue(workflowItem.getItem().isArchived());\n\n }",
"@SkipValidation\r\n\tpublic String editMR() throws Exception{\r\n\t\t\r\n\t\tSystem.out.println(\"In Edit Action Class---->>>> In editMR Method------>emp_id = \"+addMRPojo.getEmp_id());\r\n\t\tterritoryListValueRemoved = dao_impl.fetchTerritory(); \r\n\t\t\r\n\t\t\r\n\t\tmrEditList = dao_impl.editMR(addMRPojo);\t\r\n\t\tbloodGrpList = dao_impl.fetchBloodGroup();\r\n\t\t stateList = dao_impl.fetchState();\r\n\t\t cityList = dao_impl.fetchCity();\r\n\t\t dsgnList = dao_impl.fetchDesignation();\r\n\t\t\r\n//Set date from database to string type and set the selected list of territory for edit and view page\r\n\t\t\r\n\t\tIterator<AddMRActionPojo> dsd= mrEditList.iterator();\r\n\t\twhile(dsd.hasNext()){\r\n\t\t\tAddMRActionPojo actionPojo=\t(AddMRActionPojo) dsd.next();\r\n\t\t\t//System.out.println(\"check\"+actionPojo.getDoj_db());\r\n/*\r\n * Set the date to string type \r\n */\r\n\t\t\t\r\n\t\t\tif(actionPojo.getDoj_db() != null )\r\n\t\t\t{\r\n\t\t\t\tactionPojo.setDoj(new SimpleDateFormat(\"dd/MM/yyyy\").format(actionPojo.getDoj_db()));\r\n\t\t\t\t//addMRPojo.setDoj(actionPojo.getDoj());\r\n\t\t\t}\r\n\t\t\tif(actionPojo.getDob_db() != null )\r\n\t\t\t{\r\n\t\t\t\tactionPojo.setDob(new SimpleDateFormat(\"dd/MM/yyyy\").format(actionPojo.getDob_db()));\r\n\t\t\t\t//addMRPojo.setDob(actionPojo.getDob());\r\n\t\t\t}\r\n\t\t\t\r\n/*\r\n * Populate the terrValues from the List which contains DB info of MR\r\n\t */\r\n\t\t\ttry{\r\n\t\t\t\tString tempTer_id = actionPojo.getTer_id();\r\n\t\t\t\tString delimiter = \",\"; \t\t\t\t\t\t//To classify string from the DB\r\n\t\t\t\t\r\n\t\t\t\tif(tempTer_id != null)\r\n\t\t\t\t{\r\n\t\t\t\t\ttemp = tempTer_id.split(delimiter);\t\t\t\t//split method is used to split the string value with a string regex (here it is delimiter) coming from DB as in DB if multiple select value is stored then In DB it is stored as one string separated by a comma(,).\r\n\t\t\t\t\tfor(int i =0 ; i < temp.length ; i++){\t\t\t//for loop to check only\r\n\t\t\t\t\t\tSystem.out.println(\"temp[\"+i+\"] ---> \"+temp[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tterrValues = Arrays.asList(temp);\t\t\t\t//Convert string array to list\r\n\t\t\t\t\tSystem.out.println(\" --> After converting String Array to List <--\");\r\n\t\t\t\t\tfor (String e : terrValues) \t\t\t\t\t//forEach loop to check only\r\n\t\t\t\t { \r\n\t\t\t\t System.out.println(\"terrValues : \"+e); \r\n\t\t\t\t } \r\n\t\t\t\t\t\r\n\t\t\t\t\t territoryListValueInEdit = dao_impl.searchValueOfTerr(terrValues);\r\n\t\t\t\t\t\r\n\t\t\t\t\t/*for (AddTerritoryActionPojo a : territoryListValueInEdit) \t\t\t\t\t//forEach loop to check only\r\n\t\t\t\t\t{ \r\n\t\t\t\t\t\tSystem.out.println(\"territoryListValueInEdit : \"+a.getTer_id()+\" --> \"+a.getTerritory()); \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}*/\r\n\t\t\t\t\t \r\n\t\t\t\t\t \r\n /*\r\n * Logic to remove item from one list to another\r\n */\r\n\t\t for(Iterator<AddTerritoryActionPojo> itr = territoryListValueRemoved.iterator();itr.hasNext();) \r\n\t\t { \r\n\t\t AddTerritoryActionPojo element = itr.next(); \r\n\t\t \r\n\t\t for(Iterator<AddTerritoryActionPojo> itrWhichHasToBeRemoved = territoryListValueInEdit.iterator();itrWhichHasToBeRemoved.hasNext();) \r\n\t\t\t { \r\n\t\t\t AddTerritoryActionPojo elementToRemove = itrWhichHasToBeRemoved.next(); \r\n\t\t\t if(element.getTer_id().trim().equals(elementToRemove.getTer_id().trim())) \r\n\t\t\t { \r\n\t\t\t itr.remove();\r\n\t\t\t System.out.println(\"element --> \"+element.getTer_id());\r\n\t\t\t System.out.println(\"elementToRemove --> \"+elementToRemove.getTer_id());\r\n\t\t\t } \r\n\t\t\t }\r\n\t\t } \r\n\t\t /* for (AddTerritoryActionPojo b : territoryListValueRemoved) \t\t\t\t\t//forEach loop to check only\r\n\t\t\t\t\t{ \r\n\t\t\t\t\t\tSystem.out.println(\"territoryListValueRemoved : \"+b.getTer_id()+\" --> \"+b.getTerritory()); \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}*/ \r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}catch(Exception e){\r\n\t\t\t\tSystem.out.println(\"Exception While converting multiple territory to single territory\"+e);\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\t\r\n\t\treturn \"SUCCESS\";\r\n\t}",
"public void processRequest(OAPageContext pageContext, OAWebBean webBean)\r\n {\r\n super.processRequest(pageContext, webBean);\r\n \r\n\r\n String sequenceNo = pageContext.getParameter(\"pSequenceNo\");\r\n String pItemKey = pageContext.getParameter(\"pItemKey\");\r\n\r\n // String pItemKey = \"INDIV-317\";\r\n\r\n OAApplicationModule am = pageContext.getApplicationModule(webBean);\r\n\r\n // System.out.println(\"ApprDetailsCO > Itemkey: \" + pItemKey);\r\n // Serializable[] initApproversParams = new String[2];\r\n Serializable[] reviewPSParams = { pItemKey };\r\n\r\n am.invokeMethod(\"reviewPS\", reviewPSParams);\r\n\r\n\r\n \r\n \r\n /*OAViewObject vo = (OAViewObject)am.findViewObject(\"XxupPerPublicServiceHeaderEOVO1\");\r\n\r\n \r\n String type = \"\";\r\n if(vo!=null){\r\n \r\n \r\n Row row = vo.getCurrentRow();\r\n \r\n if(row!=null) {\r\n System.out.println(\"ya\");\r\n }\r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n pageContext.putDialogMessage(new OAException(type));*/\r\n \r\n// OAViewObject pshVO = (OAViewObject) am.findViewObject(\"XxupPerPSHeaderTrEOVO1\");\r\n// pshVO.executeQuery();\r\n \r\n \r\n }",
"public int update(ReviewVO review_memberVO);",
"@Override\r\n\tpublic void update(ReviewDTO dto) throws Exception {\n\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n private void preOperation(\n Map<String, Object> req, String userId, Map<String, Integer> contentStateHolder)\n throws ParseException {\n\n SimpleDateFormat simpleDateFormat = ProjectUtil.getDateFormatter();\n simpleDateFormat.setLenient(false);\n\n Util.DbInfo dbInfo = Util.dbInfoMap.get(JsonKey.LEARNER_CONTENT_DB);\n req.put(JsonKey.ID, generatePrimaryKey(req, userId));\n contentStateHolder.put(\n (String) req.get(JsonKey.ID), ((BigInteger) req.get(JsonKey.STATUS)).intValue());\n Response response =\n cassandraOperation.getRecordById(\n dbInfo.getKeySpace(), dbInfo.getTableName(), (String) req.get(JsonKey.ID));\n\n List<Map<String, Object>> resultList =\n (List<Map<String, Object>>) response.getResult().get(JsonKey.RESPONSE);\n\n if (!(resultList.isEmpty())) {\n Map<String, Object> result = resultList.get(0);\n int currentStatus = (int) result.get(JsonKey.STATUS);\n int requestedStatus = ((BigInteger) req.get(JsonKey.STATUS)).intValue();\n\n Integer currentProgressStatus = 0;\n if (isNotNull(result.get(JsonKey.CONTENT_PROGRESS))) {\n currentProgressStatus = (Integer) result.get(JsonKey.CONTENT_PROGRESS);\n }\n if (isNotNull(req.get(JsonKey.CONTENT_PROGRESS))) {\n Integer requestedProgressStatus =\n ((BigInteger) req.get(JsonKey.CONTENT_PROGRESS)).intValue();\n if (requestedProgressStatus > currentProgressStatus) {\n req.put(JsonKey.CONTENT_PROGRESS, requestedProgressStatus);\n } else {\n req.put(JsonKey.CONTENT_PROGRESS, currentProgressStatus);\n }\n } else {\n req.put(JsonKey.CONTENT_PROGRESS, currentProgressStatus);\n }\n\n Date accessTime = parseDate(result.get(JsonKey.LAST_ACCESS_TIME), simpleDateFormat);\n Date requestAccessTime = parseDate(req.get(JsonKey.LAST_ACCESS_TIME), simpleDateFormat);\n\n Date completedDate = parseDate(result.get(JsonKey.LAST_COMPLETED_TIME), simpleDateFormat);\n Date requestCompletedTime = parseDate(req.get(JsonKey.LAST_COMPLETED_TIME), simpleDateFormat);\n\n int completedCount;\n if (!(isNullCheck(result.get(JsonKey.COMPLETED_COUNT)))) {\n completedCount = (int) result.get(JsonKey.COMPLETED_COUNT);\n } else {\n completedCount = 0;\n }\n int viewCount;\n if (!(isNullCheck(result.get(JsonKey.VIEW_COUNT)))) {\n viewCount = (int) result.get(JsonKey.VIEW_COUNT);\n } else {\n viewCount = 0;\n }\n\n if (requestedStatus >= currentStatus) {\n req.put(JsonKey.STATUS, requestedStatus);\n if (requestedStatus == 2) {\n req.put(JsonKey.COMPLETED_COUNT, completedCount + 1);\n req.put(JsonKey.LAST_COMPLETED_TIME, compareTime(completedDate, requestCompletedTime));\n } else {\n req.put(JsonKey.COMPLETED_COUNT, completedCount);\n }\n req.put(JsonKey.VIEW_COUNT, viewCount + 1);\n req.put(JsonKey.LAST_ACCESS_TIME, compareTime(accessTime, requestAccessTime));\n req.put(JsonKey.LAST_UPDATED_TIME, ProjectUtil.getFormattedDate());\n\n } else {\n req.put(JsonKey.STATUS, currentStatus);\n req.put(JsonKey.VIEW_COUNT, viewCount + 1);\n req.put(JsonKey.LAST_ACCESS_TIME, compareTime(accessTime, requestAccessTime));\n req.put(JsonKey.LAST_UPDATED_TIME, ProjectUtil.getFormattedDate());\n req.put(JsonKey.COMPLETED_COUNT, completedCount);\n }\n\n } else {\n // IT IS NEW CONTENT SIMPLY ADD IT\n Date requestCompletedTime = parseDate(req.get(JsonKey.LAST_COMPLETED_TIME), simpleDateFormat);\n if (null != req.get(JsonKey.STATUS)) {\n int requestedStatus = ((BigInteger) req.get(JsonKey.STATUS)).intValue();\n req.put(JsonKey.STATUS, requestedStatus);\n if (requestedStatus == 2) {\n req.put(JsonKey.COMPLETED_COUNT, 1);\n req.put(JsonKey.LAST_COMPLETED_TIME, compareTime(null, requestCompletedTime));\n req.put(JsonKey.COMPLETED_COUNT, 1);\n } else {\n req.put(JsonKey.COMPLETED_COUNT, 0);\n }\n\n } else {\n req.put(JsonKey.STATUS, ProjectUtil.ProgressStatus.NOT_STARTED.getValue());\n req.put(JsonKey.COMPLETED_COUNT, 0);\n }\n\n int progressStatus = 0;\n if (isNotNull(req.get(JsonKey.CONTENT_PROGRESS))) {\n progressStatus = ((BigInteger) req.get(JsonKey.CONTENT_PROGRESS)).intValue();\n }\n req.put(JsonKey.CONTENT_PROGRESS, progressStatus);\n\n req.put(JsonKey.VIEW_COUNT, 1);\n Date requestAccessTime = parseDate(req.get(JsonKey.LAST_ACCESS_TIME), simpleDateFormat);\n\n req.put(JsonKey.LAST_UPDATED_TIME, ProjectUtil.getFormattedDate());\n\n if (requestAccessTime != null) {\n req.put(JsonKey.LAST_ACCESS_TIME, (String) req.get(JsonKey.LAST_ACCESS_TIME));\n } else {\n req.put(JsonKey.LAST_ACCESS_TIME, ProjectUtil.getFormattedDate());\n }\n }\n }",
"@Test\n public void testDeleteUserAfterReplacingUser3() throws Exception {\n /*\n * This test has the following setup:\n * - Step 1: user B\n * - Step 2: user C\n * - Step 3: user B\n *\n * This test will perform the following checks:\n * - create a workspace item, and let it move to step 1\n * - delete user C\n * - verify the delete is refused\n * - add user D to workflow step 2\n * - delete user C\n * - verify the delete succeeds\n * - Approve it by user B\n * - verify that the item moved to step 2\n * - Approve it by user D\n * - verify that the item moved to step 3\n * - Approve it by user B\n * - verify that the item is archived\n */\n context.turnOffAuthorisationSystem();\n\n Community parent = CommunityBuilder.createCommunity(context).build();\n Collection collection = CollectionBuilder.createCollection(context, parent)\n .withWorkflowGroup(1, workflowUserB)\n .withWorkflowGroup(2, workflowUserC)\n .withWorkflowGroup(3, workflowUserB)\n .build();\n\n WorkspaceItem wsi = WorkspaceItemBuilder.createWorkspaceItem(context, collection)\n .withSubmitter(workflowUserA)\n .withTitle(\"Test item full workflow\")\n .withIssueDate(\"2019-03-06\")\n .withSubject(\"ExtraEntry\")\n .build();\n\n Workflow workflow = XmlWorkflowServiceFactory.getInstance().getWorkflowFactory().getWorkflow(collection);\n\n XmlWorkflowItem workflowItem = xmlWorkflowService.startWithoutNotify(context, wsi);\n MockHttpServletRequest httpServletRequest = new MockHttpServletRequest();\n httpServletRequest.setParameter(\"submit_approve\", \"submit_approve\");\n\n assertDeletionOfEperson(workflowUserC, false);\n addUserToWorkflowGroup(workflowUserD, collection, EDIT_ROLE);\n assertDeletionOfEperson(workflowUserC, true);\n\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, REVIEW_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, REVIEW_STEP, REVIEW_ACTION);\n\n\n executeWorkflowAction(httpServletRequest, workflowUserD, workflow, workflowItem, EDIT_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserD, workflow, workflowItem, EDIT_STEP, EDIT_ACTION);\n\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, FINAL_EDIT_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, FINAL_EDIT_STEP,\n FINAL_EDIT_ACTION);\n\n assertTrue(workflowItem.getItem().isArchived());\n\n }",
"@Test(groups={TestGroups.SMOKE,TestGroups.REGRESSION},testName=\"Ineligibility_Reason_Edit_By_Adding_ValidData\")\n\t\tpublic void verifyEditByAddingValidData(){\n\t\tExtentTestManager.getTest().getTest().setName(\"Ineligibility_Reason_Edit_By_Adding_ValidData\");\n\t\tExtentTestManager.getTest().assignCategory(\"Module:ABL\");\n\t\tLoginPage loginPage=new LoginPage(driver);\n\t\tCyncHomePage cyncHomePage=loginPage.doLogin();\n\t\tAssert.assertEquals(cyncHomePage.getSuccessfulMessage(), \"Signed in Successfully\");\n\n\t\t//Step1:click on Ineligibility Reason to open page\n\t\tIneligibilityReasonsPage IneligibilityReasonsPage = cyncHomePage.getCyncMenus().openIneligibilityReasons();\n\t\tExtentTestManager.getTest().log(LogStatus.PASS, \"Step1:click on Ineligibility Reasons to open page\");\n\n\t\t//Step2:First Check box selected on Ineligibility Reason screen\n\t\tAssert.assertTrue(IneligibilityReasonsPage.checkBoxSelection());\n\t\tExtentTestManager.getTest().log(LogStatus.PASS, \"Step2:Successfully Selected first record on the Ineligibility reasons screen\");\n\n\t\t//Step2:Click on edit button\n\t\tAssert.assertTrue(IneligibilityReasonsPage.clickOnEditButton());\n\t\tExtentTestManager.getTest().log(LogStatus.PASS, \"Step3:Successfully clicked on the edit button on the Ineligibility reasons screen\");\n\n\t\tString IneligibilityReasonEdit=\"Ineligibility Reasons - Edit\";\n\t\t//Step3:verify the Ineligibility Reason page header\n\t\tAssert.assertTrue(IneligibilityReasonsPage.IneligibilityReasonsEditHeader(IneligibilityReasonEdit));\n\t\tExtentTestManager.getTest().log(LogStatus.PASS, \"Step4:Successfully verified Ineligibility-Reasons Edit page header\");\n\t\t\t\n\t\tString codeData=\"aaaa\";\n\t\t//Step3:add the data to the Code text box\n\t\tAssert.assertTrue(IneligibilityReasonsPage.addValueToCodeTextBox(codeData));\n\t\tExtentTestManager.getTest().log(LogStatus.PASS, \"Step5:Successfully passing data to the code text box\");\n\n\t\tString descriptionData=\"bbbb\";\n\t\t//Step4:add data to the Description text box\n\t\tAssert.assertTrue(IneligibilityReasonsPage.addValueToDescriptionTextBox(descriptionData));\n\t\tExtentTestManager.getTest().log(LogStatus.PASS, \"Step6:Successfully passing data to the Description text box\");\n\n\t\t//step5:click on save\n\t\tAssert.assertTrue(IneligibilityReasonsPage.saveonEditScreen());\n\t\tExtentTestManager.getTest().log(LogStatus.PASS, \"Step7:clicked on save button on Ineligibility Reason add screen sucessfully\");\n\n\n\t\tString SuccessMsgData=\"Record Updated Successfully\";\n\t\t//Step6:Verifying of message is done successfully.\n\t\tAssert.assertTrue(IneligibilityReasonsPage.verifyMessageOnAfterSave1(SuccessMsgData));\n\t\tExtentTestManager.getTest().log(LogStatus.PASS, \"Step8:Verifying of Success message is done successfully.\");\n\n\t}",
"protected void commitRequirements(NbaRequirementRequestVO reqRequestVO, List reqs, String partyID, long personCode, long personSeq, NbaTXLife nbaTXLife, NbaDst nbaDst)\n throws NbaBaseException {\n \n Policy policy = nbaTXLife.getPolicy(); \n boolean hasManualOrderedOrFollowedUpWork = false; \n NbaRequirement nbaReq = null;\n String user = reqRequestVO.getNbaUserVO().getUserID();\n NbaLob lob = reqRequestVO.getNbaDst().getNbaLob();\n int count = reqs.size();\n for (int i = 0; i < count; i++) {\n nbaReq = (NbaRequirement) reqs.get(i);\n if (nbaReq.isActionAdd()) {\n nbaReq.setPersonCode(personCode);\n nbaReq.setPersonSeq(personSeq);\n RequirementInfo reqInfo = new NbaRequirementUtils().createRequirementInfo(reqRequestVO.getNbaTXLife(), lob, nbaReq, getNbaOLifEId(nbaTXLife), partyID);//ALS2886, ALS4243, APSL1427\n RequirementInfoExtension reqInfoExt = NbaUtils.getFirstRequirementInfoExtension(reqInfo); \n NbaRequirementUtils.addProviderInfo(nbaReq.getVendor(), reqInfoExt);\n reqInfoExt.setReqOrderReason(nbaReq.getReqOrdReason()); //NBLXA-1895\n reqInfoExt.setFollowUpDate(nbaReq.getFollowUpDate()); //APSL3545\n reqInfo.setRequirementInfoUniqueID(NbaRequirementUtils.generateRequirementInfoUniqueID(nbaTXLife, reqInfo));\n nbaReq.setUniqueID(reqInfo.getRequirementInfoUniqueID());\n reqInfo.setUserCode(user);\n NbaRequirementUtils.createRequirementTransaction(nbaDst, nbaReq);\n reqInfo.setAppliesToPartyID(nbaTXLife.getPartyId(personCode));\n policy.addRequirementInfo(reqInfo);\n policy.setActionUpdate();\n if (nbaReq.hasDoctor() || ! NbaUtils.isBlankOrNull(nbaReq.getFullName())) { //NBLXA-1343\n addDoctorToRequirement(nbaTXLife, nbaReq, reqInfo);\n }\n //END NBA130\n //QC12292 APSL3402 deleted code \n } else if (nbaReq.isActionUpdate()) {\n \tRequirementInfo reqInfo = nbaTXLife.getRequirementInfo(nbaReq.getRequirementInfoUniqueID()); //NBA208-36\n RequirementInfoExtension reqInfoExt = NbaUtils.getFirstRequirementInfoExtension(reqInfo); //NBA208-36\n if (nbaReq.getTransactionID() != null) {\t//Null if only Review was changed\t//NBA208-36\n\t if (nbaReq.getStatus() == NbaOliConstants.OLI_REQSTAT_RECEIVED) {\n\t NbaRequirementUtils.satisfyRequirement(nbaDst, nbaReq, reqInfo);\n\t } else {\n\t NbaRequirementUtils.updateRequirement(nbaDst, nbaReq);\n\t }\n\t }\t//NBA208-36\n NbaRequirementUtils.updateRequirement(nbaTXLife, nbaReq);\n //NBA208-36 code deleted\n NbaRequirementUtils.addProviderInfo(nbaReq.getVendor(), reqInfoExt); \n reqInfo.setReqStatus(nbaReq.getStatus());\n reqInfo.setRequirementDetails(nbaReq.getMessage());\n if(reqInfo.getReqStatus() == NbaOliConstants.OLI_REQSTAT_RECEIVED && !reqInfo.hasReceivedDate()) { //SPR3436 //ALS3039\n reqInfo.setReceivedDate(new Date());\t//SPR3436\n reqInfoExt.setReceivedDateTime(NbaUtils.getStringFromDateAndTime(new Date()));//QC20240\n }\t//SPR3436\n if(reqInfo.getReqStatus() == NbaOliConstants.OLI_REQSTAT_WAIVED) { //ALS2271\n reqInfo.setStatusDate(new Date());\t//ALS2271\n } //ALS2271\n\n reqInfo.setActionUpdate();\n if (nbaReq.hasDoctor() || ! NbaUtils.isBlankOrNull(nbaReq.getFullName())) { // NBLXA-1343\n \tupdateDoctorToRequirement(nbaTXLife, nbaReq, reqInfo, reqRequestVO); //NBA224\n }\n if (nbaReq.getManualOrderedFollowedUp() != null) {\n updateRequirementForManualOrderedOrFollowedUp(nbaTXLife, nbaReq, reqInfo);\n hasManualOrderedOrFollowedUpWork = true;\n }\n }\n commitRequirementReviews(nbaTXLife, nbaReq, partyID, user);\n \n resetLastReqIndicator(nbaTXLife, partyID,reqRequestVO,nbaDst,nbaReq);//NBLXA186-NBLXA127\n }\n \n if (hasManualOrderedOrFollowedUpWork) { \n createCompletedAggregateWork(reqRequestVO); \n } \n }",
"public void validate() {\n ASPManager mgr = getASPManager();\n ASPTransactionBuffer trans = mgr.newASPTransactionBuffer();\n ASPCommand cmd;\n String val = mgr.readValue(\"VALIDATE\");\n// String PRICE = \"\";\n \n \n if (\"CONTRACT_ID\".equals(val)) {\n cmd = trans.addCustomFunction(\"GETCONTRACTNAME\", \n \"PROJECT_CONTRACT_API.Get_Contract_Desc\", \"CONTRACT_NAME\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n cmd = trans.addCustomFunction(\"GETSECONDSIDE\", \n \"PROJECT_CONTRACT_API.Get_Secend_Side\", \"SECOND_SIDE\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n trans = mgr.validate(trans);\n String contractName = trans.getValue(\"GETCONTRACTNAME/DATA/CONTRACT_NAME\");\n String SECONDSIDE = trans.getValue(\"GETSECONDSIDE/DATA/SECOND_SIDE\");\n trans.clear();\n cmd = trans.addCustomFunction(\"GETSECONDSIDENAME\", \n \"SUPPLIER_INFO_API.GET_NAME\", \"SECOND_SIDE_NAME\");\n cmd.addParameter(\"SECOND_SIDE\",SECONDSIDE);\n \n trans = mgr.validate(trans);\n \n String SECONDSIDENAME = trans.getValue(\"GETSECONDSIDENAME/DATA/SECOND_SIDE_NAME\");\n\n String txt = ((mgr.isEmpty(contractName)) ? \"\" : contractName ) + \"^\"\n + ((mgr.isEmpty(SECONDSIDE)) ? \"\" : SECONDSIDE ) + \"^\" \n + ((mgr.isEmpty(SECONDSIDENAME)) ? \"\" : SECONDSIDENAME ) + \"^\";\n \n mgr.responseWrite(txt);\n }\n mgr.endResponse();\n }",
"public void validate() {\n ASPManager mgr = getASPManager();\n ASPTransactionBuffer trans = mgr.newASPTransactionBuffer();\n ASPCommand cmd;\n String val = mgr.readValue(\"VALIDATE\");\n// String PRICE = \"\";\n \n \n if (\"CONTRACT_ID\".equals(val)) {\n cmd = trans.addCustomFunction(\"GETCONTRACTNAME\", \n \"PROJECT_CONTRACT_API.Get_Contract_Desc\", \"CONTRACT_NAME\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n cmd = trans.addCustomFunction(\"GETSECONDSIDE\", \n \"PROJECT_CONTRACT_API.Get_Secend_Side\", \"SECOND_SIDE\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n trans = mgr.validate(trans);\n String contractName = trans.getValue(\"GETCONTRACTNAME/DATA/CONTRACT_NAME\");\n String SECONDSIDE = trans.getValue(\"GETSECONDSIDE/DATA/SECOND_SIDE\");\n trans.clear();\n cmd = trans.addCustomFunction(\"GETSECONDSIDENAME\", \n \"SUPPLIER_INFO_API.GET_NAME\", \"SECOND_SIDE_NAME\");\n cmd.addParameter(\"SECOND_SIDE\",SECONDSIDE);\n \n trans = mgr.validate(trans);\n \n String SECONDSIDENAME = trans.getValue(\"GETSECONDSIDENAME/DATA/SECOND_SIDE_NAME\");\n\n String txt = ((mgr.isEmpty(contractName)) ? \"\" : contractName ) + \"^\"\n + ((mgr.isEmpty(SECONDSIDE)) ? \"\" : SECONDSIDE ) + \"^\" \n + ((mgr.isEmpty(SECONDSIDENAME)) ? \"\" : SECONDSIDENAME ) + \"^\";\n \n mgr.responseWrite(txt);\n }\n mgr.endResponse();\n }",
"@Override\n protected Void doInBackground(Object... params) {\n //Get parameters\n option = (String) params[0];\n title = (String) params[1];\n content = (String) params[2];\n type = (String) params[3];\n\n if(type.equals(COURSE_TYPE)) {\n\n if(option.equals(SUBMIT_OPERATION)) {\n //Construct Course Review\n CourseReview review = new CourseReview(\n id, uid, title,content,locationStr, null);\n //Insert into DB\n CourseReviewUtil courseReviewUtil =\n new CourseReviewUtil();\n result = courseReviewUtil.insertCourseReview(review);\n if(courseReviewDraft != null) {\n CourseReviewDraftUtil courseReviewDraftUtil = new CourseReviewDraftUtil();\n courseReviewDraftUtil.deleteDraft(courseReviewDraft.getId());\n }\n } else {\n if(courseReviewDraft == null) {\n //Construct Course Review Draft\n CourseReviewDraft review = new CourseReviewDraft(\n id, uid, title, content);\n //Insert into DB\n CourseReviewDraftUtil courseReviewDraftUtil =\n new CourseReviewDraftUtil();\n result = courseReviewDraftUtil.insertCourseReviewDraft(review);\n }else {\n courseReviewDraft.setTitle(title);\n Log.d(\"save and update\", title);\n courseReviewDraft.setContent(content);\n Log.d(\"save and update\", content);\n CourseReviewDraftUtil courseReviewDraftUtil = new CourseReviewDraftUtil();\n result = courseReviewDraftUtil.updateDraft(courseReviewDraft.getId(),courseReviewDraft);\n Log.d(\"save and update\", Boolean.toString(result));\n }\n }\n\n } else {\n\n if(option.equals(SUBMIT_OPERATION)) {\n //Construct Faculty Review\n FacultyReview review = new FacultyReview(\n uid, id, title, content, locationStr, null);\n //Insert into DB\n FacultyReviewUtil facultyReviewUtil =\n new FacultyReviewUtil();\n result = facultyReviewUtil.insertFacultyReview(review);\n if(facultyReviewDraft != null) {\n FacultyReviewDraftUtil facultyReviewDraftUtil = new FacultyReviewDraftUtil();\n facultyReviewDraftUtil.deleteDraft(facultyReviewDraft.getFid());\n }\n } else {\n if(facultyReviewDraft==null) {\n //Construct Faculty Review Draft\n FacultyReviewDraft facultyReviewDraft = new FacultyReviewDraft(\n id, uid, title, content);\n //Insert into DB\n FacultyReviewDraftUtil facultyReviewDraftUtil =\n new FacultyReviewDraftUtil();\n result = facultyReviewDraftUtil.insertFacultyReviewDraft(facultyReviewDraft);\n }else{\n facultyReviewDraft.setTitle(title);\n Log.d(\"save and update\", title);\n facultyReviewDraft.setContent(content);\n Log.d(\"save and update\", content);\n FacultyReviewDraftUtil facultyReviewDraftUtil = new FacultyReviewDraftUtil();\n result = facultyReviewDraftUtil.updateDraft(facultyReviewDraft.getFid(), facultyReviewDraft);\n Log.d(\"save and update\", Boolean.toString(result));\n }\n\n }\n }\n return null;\n }",
"@Test\n public void testDeleteUserAfterReplacingUser5() throws Exception {\n /*\n * This test has the following setup:\n * - Step 1: user B\n * - Step 2: user C\n * - Step 3: user B\n *\n * This test will perform the following checks:\n * - create a workspace item, and let it move to step 1\n * - Approve it by user B\n * - verify that the item moved to step 2\n * - claim it by user C, but don’t approve it\n * - delete user C\n * - verify the delete is refused\n * - add user D to workflow step 2\n * - delete user C\n * - verify the delete succeeds\n * - Verify user D can now claim and approve it\n * - verify that the item moved to step 3\n * - verify that user B can claim and approve it\n * - verify that the item is archived\n */\n context.turnOffAuthorisationSystem();\n\n Community parent = CommunityBuilder.createCommunity(context).build();\n Collection collection = CollectionBuilder.createCollection(context, parent)\n .withWorkflowGroup(1, workflowUserB)\n .withWorkflowGroup(2, workflowUserC)\n .withWorkflowGroup(3, workflowUserB)\n .build();\n\n WorkspaceItem wsi = WorkspaceItemBuilder.createWorkspaceItem(context, collection)\n .withSubmitter(workflowUserA)\n .withTitle(\"Test item full workflow\")\n .withIssueDate(\"2019-03-06\")\n .withSubject(\"ExtraEntry\")\n .build();\n\n Workflow workflow = XmlWorkflowServiceFactory.getInstance().getWorkflowFactory().getWorkflow(collection);\n\n XmlWorkflowItem workflowItem = xmlWorkflowService.startWithoutNotify(context, wsi);\n MockHttpServletRequest httpServletRequest = new MockHttpServletRequest();\n httpServletRequest.setParameter(\"submit_approve\", \"submit_approve\");\n\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, REVIEW_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, REVIEW_STEP, REVIEW_ACTION);\n\n executeWorkflowAction(httpServletRequest, workflowUserC, workflow, workflowItem, EDIT_STEP, CLAIM_ACTION);\n\n assertDeletionOfEperson(workflowUserC, false);\n addUserToWorkflowGroup(workflowUserD, collection, EDIT_ROLE);\n assertDeletionOfEperson(workflowUserC, true);\n\n executeWorkflowAction(httpServletRequest, workflowUserD, workflow, workflowItem, EDIT_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserD, workflow, workflowItem, EDIT_STEP, EDIT_ACTION);\n\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, FINAL_EDIT_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, FINAL_EDIT_STEP,\n FINAL_EDIT_ACTION);\n\n assertTrue(workflowItem.getItem().isArchived());\n\n }",
"public void actionSetAudit_actionPerformed(ActionEvent e) throws Exception {\n\t\t\tsuper.actionSetAudit_actionPerformed(e);\n\t\t\tif(KDTableUtil.getSelectedRow(tblMain) == null){\n\t\t\t\tMsgBox.showWarning(this, \"请先选中行!\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t int currRow = -1;\n\t\t\t String chcek = null;\n\t\t\t int[] selectRows = KDTableUtil.getSelectedRows(this.tblMain);\n\t\t\t for (int i = 0; i < selectRows.length; i++) {\n\t\t\t currRow = selectRows[i];\n\t\t\t String ObjectPK = this.tblMain.getRow(currRow).getCell(\"id\").getValue().toString();\n\t\t\t if (!ObjectPK.equals(chcek)) {\n\t\t\t \t FeesWarrantInfo fwinfo= FeesWarrantFactory.getRemoteInstance().getFeesWarrantInfo(new ObjectUuidPK(ObjectPK));\n\t\t\t if (FDCBillStateEnum.SUBMITTED.equals(fwinfo.getState()))\n\t\t\t {\n\t\t\t \tfwinfo.setState(FDCBillStateEnum.AUDITTED);\n\t\t\t \tFeesWarrantFactory.getRemoteInstance().update(new ObjectUuidPK(ObjectPK),fwinfo);\n\t\t\t }else{\n\t\t\t \t MsgBox.showError(\" 第\" + (selectRows[i] + 1) + \"行 单据状态已提交,不能审批!\");\n\t\t\t }\n\t\t\t chcek = ObjectPK;\n\t\t\t }\n\t\t\t }\n\t\t\t actionRefresh_actionPerformed(e);\n\t\t\t if (chcek == null) {\n\t\t\t MsgBox.showInfo(\" 请选中一行!\");\n\t\t\t SysUtil.abort();\n\t\t\t }\n\t\t}",
"public void updateCommitRecordState() {\n\n List<String> lsNames = new ArrayList<>();\n lsNames = projectDb.listAllProjectNames();\n\n for (String name : lsNames) {\n\n Map<String, Integer> map = commitRecordDb.getCommitRecordStateCounts(name);\n\n int bs = 0;\n int ini = 0;\n int utf = 0;\n int csf = 0;\n int cpf = 0;\n\n if (map.containsKey(StatusEnum.BUILD_SUCCESS.getTypeName())) {\n bs = map.get(StatusEnum.BUILD_SUCCESS.getTypeName());\n }\n\n if (map.containsKey(StatusEnum.INITIALIZATION.getTypeName())) {\n ini = map.get(StatusEnum.INITIALIZATION.getTypeName());\n }\n\n if (map.containsKey(StatusEnum.UNIT_TEST_FAILURE.getTypeName())) {\n utf = map.get(StatusEnum.UNIT_TEST_FAILURE.getTypeName());\n }\n\n if (map.containsKey(StatusEnum.CHECKSTYLE_FAILURE.getTypeName())) {\n csf = map.get(StatusEnum.CHECKSTYLE_FAILURE.getTypeName());\n }\n\n if (map.containsKey(StatusEnum.COMPILE_FAILURE.getTypeName())) {\n cpf = map.get(StatusEnum.COMPILE_FAILURE.getTypeName());\n }\n\n int ccs = 0;\n ccs = bs + utf + csf + cpf;\n\n boolean check;\n check = crsdb.checkCommitRecordStatehw(name);\n\n if (check) {\n crsdb.updateCommitRecordState(name, bs, csf, cpf, utf, ini, ccs);\n\n } else {\n crsdb.addCommitRecordState(name, bs, csf, cpf, utf, ini, ccs);\n }\n\n }\n\n }",
"public interface ContinuingEducationService extends EducatonCommonService<ContinuingEducationModel>\r\n{\r\n\tpublic ContinuingEducationModel getByPK(ContinuingEducationPKModel pk) throws AAException;\r\n\t\t\r\n\t/**\r\n\t * Check all the continuing educations in specific cap, if all conditions are matched then return true.\r\n\t *\r\n\t * @param capID\r\n\t * @return true - passed , false - not passed\r\n\t * @throws AAException \r\n\t * @throws RemoteException \r\n\t */\r\n\tpublic boolean isContinuingEducationPassed(CapIDModel capID) throws AAException, RemoteException;\r\n\t\r\n\t/**\r\n\t * Get the total required hours by cap type\r\n\t *\r\n\t * @param capType\t\t\tthe specific cap type model\r\n\t * @return\r\n\t * @throws RemoteException\r\n\t * @throws AAException\r\n\t */\r\n\tpublic double getTotalRequiredHours(CapTypeModel capType) throws RemoteException, AAException;\r\n\r\n\t/**\r\n\t * Get all continuing education info according to the specific cap ID and merge condition.\r\n\t *\r\n\t * @param source\r\n\t * @param isMergeRef true - merge reference data to daily side. false - only return daily side data. \r\n\t * @return \r\n\t * @throws AAException \r\n\t * @throws RemoteException \r\n\t */\r\n\tList<ContinuingEducationModel> getModelsByCapID(CapIDModel capId, boolean isMergeRef) throws AAException, RemoteException;\r\n\t\r\n\t/**\r\n\t * Check if task status is allowed to change. If the task status is configuired to be checked \r\n\t * before changing, then check if task's app have passed the continuing education. \r\n\t *\r\n\t * @param taskItem\r\n\t * @return\r\n\t * @throws AAException \r\n\t * @throws RemoteException \r\n\t */\r\n\tboolean isWorkflowStatusCanBeChanged(TaskItemModel taskItem) throws AAException, RemoteException;\r\n\t\r\n\t/**\r\n\t * Auto approve required cehs.\r\n\t * \r\n\t * @param capId the cap id\r\n\t * @param callerID TODO\r\n\t * \r\n\t * @throws AAException the AA exception\r\n\t * @throws RemoteException the remote exception\r\n\t */\r\n\tpublic void autoApproveRequiredCEHs(CapIDModel capId, String callerID) throws AAException, RemoteException;\r\n\r\n\t/**\r\n\t * Auto approve cont edus.\r\n\t * \r\n\t * @param contEduList the cont edu list\r\n\t * @param capID the cap id\r\n\t * @param callerID the caller id\r\n\t * \r\n\t * @return the int\r\n\t * \r\n\t * @throws AAException the AA exception\r\n\t * @throws RemoteException the remote exception\r\n\t */\r\n\tpublic int autoApproveContEdus(List<ContinuingEducationModel> contEduList, CapIDModel capID, String callerID)\r\n\t\t\tthrows AAException, RemoteException;\r\n\t\r\n}",
"@Test\n public void updateAll_501() throws Exception {\n\n // PREPARE THE DATABASE\n // Fill in the workflow db\n addMOToDb(1);\n addMOToDb(2);\n addMOToDb(3);\n\n Workflow mo = new Workflow();\n\n // PREPARE THE TEST\n // Nothing to do\n\n // DO THE TEST\n Response response = callAPI(VERB.PUT, \"/mo/\", mo);\n\n // CHECK RESULTS\n int status = response.getStatus();\n assertEquals(501, status);\n\n String body = response.readEntity(String.class);\n assertEquals(\"\", body);\n\n }",
"@LogMethod\r\n private void editResults()\r\n {\n navigateToFolder(getProjectName(), TEST_ASSAY_FLDR_LAB1);\r\n clickAndWait(Locator.linkWithText(TEST_ASSAY));\r\n waitAndClickAndWait(Locator.linkWithText(\"view results\"));\r\n DataRegionTable table = new DataRegionTable(\"Data\", getDriver());\r\n assertEquals(\"No rows should be editable\", 0, DataRegionTable.updateLinkLocator().findElements(table.getComponentElement()).size());\r\n assertElementNotPresent(Locator.button(\"Delete\"));\r\n\r\n // Edit the design to make them editable\r\n ReactAssayDesignerPage assayDesignerPage = _assayHelper.clickEditAssayDesign(true);\r\n assayDesignerPage.setEditableResults(true);\r\n assayDesignerPage.clickFinish();\r\n\r\n // Try an edit\r\n navigateToFolder(getProjectName(), TEST_ASSAY_FLDR_LAB1);\r\n clickAndWait(Locator.linkWithText(TEST_ASSAY));\r\n clickAndWait(Locator.linkWithText(\"view results\"));\r\n DataRegionTable dataTable = new DataRegionTable(\"Data\", getDriver());\r\n assertEquals(\"Incorrect number of results shown.\", 10, table.getDataRowCount());\r\n doAndWaitForPageToLoad(() -> dataTable.updateLink(dataTable.getRowIndex(\"Specimen ID\", \"AAA07XK5-05\")).click());\r\n setFormElement(Locator.name(\"quf_SpecimenID\"), \"EditedSpecimenID\");\r\n setFormElement(Locator.name(\"quf_VisitID\"), \"601.5\");\r\n setFormElement(Locator.name(\"quf_testAssayDataProp5\"), \"notAnumber\");\r\n clickButton(\"Submit\");\r\n assertTextPresent(\"Could not convert value: \" + \"notAnumber\");\r\n setFormElement(Locator.name(\"quf_testAssayDataProp5\"), \"514801\");\r\n setFormElement(Locator.name(\"quf_Flags\"), \"This Flag Has Been Edited\");\r\n clickButton(\"Submit\");\r\n assertTextPresent(\"EditedSpecimenID\", \"601.5\", \"514801\");\r\n assertElementPresent(Locator.xpath(\"//img[@src='/labkey/Experiment/flagDefault.gif'][@title='This Flag Has Been Edited']\"), 1);\r\n assertElementPresent(Locator.xpath(\"//img[@src='/labkey/Experiment/unflagDefault.gif'][@title='Flag for review']\"), 9);\r\n\r\n // Try a delete\r\n dataTable.checkCheckbox(table.getRowIndex(\"Specimen ID\", \"EditedSpecimenID\"));\r\n doAndWaitForPageToLoad(() ->\r\n {\r\n dataTable.clickHeaderButton(\"Delete\");\r\n assertAlert(\"Are you sure you want to delete the selected row?\");\r\n });\r\n\r\n // Verify that the edit was audited\r\n goToSchemaBrowser();\r\n viewQueryData(\"auditLog\", \"ExperimentAuditEvent\");\r\n assertTextPresent(\r\n \"Data row, id \",\r\n \", edited in \" + TEST_ASSAY + \".\",\r\n \"Specimen ID changed from 'AAA07XK5-05' to 'EditedSpecimenID'\",\r\n \"Visit ID changed from '601.0' to '601.5\",\r\n \"testAssayDataProp5 changed from blank to '514801'\",\r\n \"Deleted data row.\");\r\n }",
"public interface ContractService {\n\n /**\n * 获取授权提现函信息\n * @return\n */\n WithdrawalLetter getWithdrawalLetterInfo(Long id) throws Exception;\n\n\n /**\n * 获取 借款服务协议变量 信息\n * @return\n */\n LoanServiceAgreement getLoanServiceAgreementInfo(Long id) throws Exception;\n\n\n /**\n *\n * 获取 电子签名数字证书用户申请确认函s 信息\n * @return\n */\n ElectronicLetter getElectronicLetterInfo(Long id) throws Exception;\n /**\n * 获取个人信息采集协议数据\n * @param userId 用户主键\n * @return 协议数据\n */\n PersonalInfoProtocolResForm getPersonalInfoCollectionProtocol(Long userId) throws Exception;\n\n /**\n * 获取企业信息采集协议数据\n * @param userId 用户主键\n * @return 协议数据\n */\n CompanyInfoProtocolResForm getCompanyInfoCollectionProtocol(Long userId) throws Exception;\n\n /**\n * 获取网络借贷平台借款情况披露及承诺书\n * @param userId 用户主键\n * @return 协议数据\n */\n LoanGuaranteeProtocolResForm getLoanGuaranteeProtocol(Long userId) throws Exception;\n\n /**\n * 获取网络借贷平台借款情况披露及承诺书\n * @param userId 用户主键\n * @param reqForm 请求参数\n * @return 协议数据\n */\n LoanGuaranteeProtocolResForm getLoanGuaranteeProtocol(Long userId, LoanGuaranteeProtocolReqForm reqForm) throws Exception;\n\n /**\n * 公司立即签署\n * @param id\n * @param procurationSignatureReqForm\n * @return\n * @throws Exception\n */\n Map<String,Object> companyImmediatelySigned(Long id,ProcurationSignatureReqForm procurationSignatureReqForm) throws Exception;\n\n /**\n * 个人立即签署\n * @param id\n * @param procurationSignatureReqForm\n * @return\n * @throws Exception\n */\n Map<String,Object> personalImmediatelySigned(Long id, ProcurationSignatureReqForm procurationSignatureReqForm) throws Exception;\n\n /**\n * 获取担保函\n * @param orderNo 订单编号\n * @param userId 用户主键\n * @return 协议数据\n */\n GuarantorLetterResForm getGuaranteeLetter(String orderNo, Long userId) throws Exception;\n\n\n Map<String,Object> personFormValidate(PersonReqForm personReqForm);\n\n Map<String,Object> companyFormValidate(String otherLoanAmt, String signatoryName, String signatoryIdentity, String mobile, String smCode,MultipartFile file);\n}",
"@Test\n public void testDeleteUserWhenMultipleUser3() throws Exception {\n /*\n * This test has the following setup:\n * - Step 1: user B and D\n * - Step 2: user C and D\n * - Step 3: user B and D\n *\n * This test will perform the following checks:\n * - create a workspace item, and let it move to step 1\n * - delete user C\n * - verify the delete succeeds\n * - Approve it by user B\n * - verify that the item moved to step 2\n * - Approve it by user D\n * - verify that the item moved to step 3\n * - Approve it by user B\n * - verify that the item is archived\n */\n context.turnOffAuthorisationSystem();\n\n Community parent = CommunityBuilder.createCommunity(context).build();\n Collection collection = CollectionBuilder.createCollection(context, parent)\n .withWorkflowGroup(1, workflowUserB, workflowUserD)\n .withWorkflowGroup(2, workflowUserC, workflowUserD)\n .withWorkflowGroup(3, workflowUserB, workflowUserD)\n .build();\n\n WorkspaceItem wsi = WorkspaceItemBuilder.createWorkspaceItem(context, collection)\n .withSubmitter(workflowUserA)\n .withTitle(\"Test item full workflow\")\n .withIssueDate(\"2019-03-06\")\n .withSubject(\"ExtraEntry\")\n .build();\n\n Workflow workflow = XmlWorkflowServiceFactory.getInstance().getWorkflowFactory().getWorkflow(collection);\n\n XmlWorkflowItem workflowItem = xmlWorkflowService.startWithoutNotify(context, wsi);\n MockHttpServletRequest httpServletRequest = new MockHttpServletRequest();\n httpServletRequest.setParameter(\"submit_approve\", \"submit_approve\");\n\n assertDeletionOfEperson(workflowUserC, true);\n\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, REVIEW_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, REVIEW_STEP, REVIEW_ACTION);\n\n executeWorkflowAction(httpServletRequest, workflowUserD, workflow, workflowItem, EDIT_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserD, workflow, workflowItem, EDIT_STEP, EDIT_ACTION);\n\n\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, FINAL_EDIT_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, FINAL_EDIT_STEP,\n FINAL_EDIT_ACTION);\n\n assertTrue(workflowItem.getItem().isArchived());\n\n }",
"private LCSRevisableEntity updateRevisableEntry(String reventityVR, String sourceVersion,\n\t\t\tString costsheetVersion,String specVersion, String nrfCode,\n\t\t\tString materialDescription, String source, String costsheet,\n\t\t\tString specName, String IBTINSTOREMONTH, String styleNumber,Collection bomMOAStringColl) throws WTException ,\n\t\t\tWTPropertyVetoException \n\t\t\t{\n\t\t\t\tLCSLog.debug(CLASSNAME+\"updateRevisableEntry(), this is a Existing entry\");\n\t\n\t\tLCSRevisableEntity existingIBTMaterialRevObj = null;\n\t\tLCSRevisableEntityLogic revisableEntityLogic = new LCSRevisableEntityLogic();\n\n\t\tLCSLog.debug(CLASSNAME+\"updateRevisableEntry -- >existing Revisable entity Id is found\");\n\t\tLCSLog.debug(CLASSNAME+\"updateRevisableEntry(),,reventityVR -- \" + reventityVR);\n\n\t\t// get the existing revisable entity object\n\t\texistingIBTMaterialRevObj = (LCSRevisableEntity) LCSQuery\n\t\t\t\t.findObjectById(\"VR:com.lcs.wc.foundation.LCSRevisableEntity:\"\n\t\t\t\t\t\t+ reventityVR);\n\t\t// create a new client model object and load the revisable entity\n\t\t//LCSRevisableEntityClientModel existingentryModel = new LCSRevisableEntityClientModel();\n\t\t// load\n\t\t//existingentryModel.load(FormatHelper.getObjectId(existingentry));\n\t\t//LCSLog.debug(\"existingentry : --\" + existingentry.getValue(\"name\"));\n\t\t// set the value of sourcing config version ID\n\t\texistingIBTMaterialRevObj.setValue(LFIBTConstants.IBTSOURCINGCONFIG,\n\t\t\t\tsourceVersion);\n\t\t// set the value of costsheet version\n\t\tif (FormatHelper.hasContent(costsheetVersion)) {\n\t\t\texistingIBTMaterialRevObj.setValue(LFIBTConstants.IBTCOSTSHEET,\n\t\t\t\tcostsheetVersion);\n\t\t}\n\t\t//added for 7.6\n\t\t\n\t\t/*if(strActivity.equalsIgnoreCase(\"PERSIST\")){\n\t\texistingentryModel.setValue(\"lfIBTComments\",\n\t\t\t\t\"PERSIST\");\t\n\t\t}else{\n\t\texistingentryModel.setValue(\"lfIBTComments\",\n\t\t\t\t\"COSTSHEET\");\t*/\n\t\t//if (FormatHelper.hasContent(LFIBTConstants.IBTMATERIALSTATUS)) {\n\t\t//existingentryModel.setValue(LFIBTConstants.IBTMATERIALSTATUS,\n\t\t//\t\t\"Update\");\n\t\t//}\n\t\t//}\n\t\t//added for 7.6\n\t \t//Create BOM MOA Rows..\n\t\t//LFIBTUtil.setBOMMOARows(existingentryModel, \"lfIBTBOMDetails\", bomMOAStringColl, \"update\");\n\t\t\n\t\texistingIBTMaterialRevObj.setValue(LFIBTConstants.IBTSPECIFICATION, specVersion);\n\t\texistingIBTMaterialRevObj.setValue(LFIBTConstants.STAGINSPECNAME, specName);\t\t\n\t\t// set the value of nrf code att\n\t\tif (FormatHelper.hasContent(nrfCode)) {\n\t\t\texistingIBTMaterialRevObj.setValue(LFIBTConstants.IBTNRFCODE, nrfCode);\n\t\t}\n\n\t\t// update the material description\n\t\tif (FormatHelper.hasContent(materialDescription)) {\n\t\t\texistingIBTMaterialRevObj.setValue(LFIBTConstants.IBTMATERIALDESC,\n\t\t\t\t\tmaterialDescription);\n\t\t}\n\t\t// update the source name\n\t\tif (FormatHelper.hasContent(source)) {\n\t\t\texistingIBTMaterialRevObj.setValue(LFIBTConstants.IBTSTAGINGSOURCENAME,\n\t\t\t\t\tsource);\n\t\t}\n\t\t// update the costsheet name\n\t\tif (FormatHelper.hasContent(costsheet)) {\n\t\t\texistingIBTMaterialRevObj.setValue(LFIBTConstants.IBTSTAGINGCOSTSHEETNAME,\n\t\t\t\t\tcostsheet);\n\t\t}\n\t\t// Update the In store Month\n\t\tif (FormatHelper.hasContent(IBTINSTOREMONTH)) {\n\t\t\texistingIBTMaterialRevObj.setValue(LFIBTConstants.IBTINSTOREMONTH,\n\t\t\t\t\tIBTINSTOREMONTH);\n\t\t}\n\n\t\t// Update Style Number\n\t\tif (FormatHelper.hasContent(styleNumber)) {\n\t\t\texistingIBTMaterialRevObj.setValue(LFIBTConstants.IBTSTYLENUMBER,\n\t\t\t\t\tstyleNumber);\n\t\t}\n\n\t\t// update the check box\n\t\t//existingentryModel\n\t\t//\t\t.setValue(LFIBTConstants.IBTUPDATECHECK, Boolean.TRUE);\n\t\t\n\t\tLCSRevisableEntity ibtMaterialRev = (LCSRevisableEntity)revisableEntityLogic.saveRevisableEntity(existingIBTMaterialRevObj);\n\t\t\n\t\tLCSLog.debug(CLASSNAME+\"updateRevisableEntry(), Calling setBOMMOARows()\");\n\t\t\n\t\n\t\tLFIBTUtil.setBOMMOARows(ibtMaterialRev, \"lfIBTBOMDetails\", bomMOAStringColl, \"update\");\n return ibtMaterialRev;\n\t}",
"@SustainScreen(name = \"Case Workflow Summary\", description = \"Index of all workflow related to a case.\", module = SustainModule.WORKFLOW, type = ScreenType.USER,\n inputs = {\n @ScreenInput(name = \"caseId\", description = \"case ID\", type = ScreenInputType.REQUIRED)\n }\n )\n public ActionForward doExecute(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) {\n Long caseId = IdUtil.toId(request.getParameter(\"caseId\"));\n Case cse = Case.get(caseId);\n request.setAttribute(\"cse\", cse);\n\n List<WMActivityInst> openedManual = new ArrayList<WMActivityInst>();\n List<WMActivityInst> closedManual = new ArrayList<WMActivityInst>();\n List<WMActivityInst> suspendedAuto = new ArrayList<WMActivityInst>();\n List<WMActivityInst> closedAuto = new ArrayList<WMActivityInst>();\n\n List<WMActivityInst> opened = WMActivityInst.findOpenedByCase(cse);\n for (WMActivityInst task : opened) {\n if (task.isAuto() && task.isOpenSuspendedState()) {\n suspendedAuto.add(task);\n } else if (task.isManual()) {\n openedManual.add(task);\n }\n }\n\n List<WMActivityInst> closed = WMActivityInst.findClosedByCase(cse);\n for (WMActivityInst task : closed) {\n if (task.isAuto()) {\n closedAuto.add(task);\n } else if (task.isManual()) {\n closedManual.add(task);\n }\n }\n\n\n Comparator<? super WMActivityInst> openTaskComparator = new Comparator<WMActivityInst>() {\n public int compare(WMActivityInst t1, WMActivityInst t2) {\n return new CompareToBuilder().append(t1.getStartDate(), t2.getStartDate()).toComparison();\n }\n };\n Comparator<? super WMActivityInst> closeTaskComparator = new Comparator<WMActivityInst>() {\n public int compare(WMActivityInst t1, WMActivityInst t2) {\n return new CompareToBuilder().append(t1.getEndDate(), t2.getEndDate())\n .append(t1.getStartDate(), t2.getStartDate()).toComparison();\n }\n };\n Collections.sort(openedManual, openTaskComparator);\n Collections.sort(closedManual, closeTaskComparator);\n Collections.sort(suspendedAuto, openTaskComparator);\n Collections.sort(closedAuto, closeTaskComparator);\n\n request.setAttribute(\"openedManual\", openedManual);\n request.setAttribute(\"closedManual\", closedManual);\n request.setAttribute(\"suspendedAuto\", suspendedAuto);\n request.setAttribute(\"closedAuto\", closedAuto);\n\n return mapping.findForward(\"workflows\");\n }",
"@Then(\"^: proceed to checkout$\")\r\n\tpublic void proceed_to_checkout() throws Throwable {\n\t\tobj.update();\r\n\t}",
"@Override\n\tpublic String approveLeaveByLeaveRequestId(String leaveRequestId, String leaveApproveReason,\n\t\t\tString changeLeaveType,final float cl,final float el,final float plwp) {\n\t\t//String moveRowIntoHistory=\"INSERT INTO emp_leave_history select * from emp_leave_requests_tbl where requestId = '\"+leaveRequestId+\"'\";\n\t\t//super.getJdbcTemplate().execute(moveRowIntoHistory);\n\t\t//String deleteRowByEmpid=\"delete from emp_leave_requests_tbl where requestId='\"+leaveRequestId+\"'\";\n\t\t//super.getJdbcTemplate().execute(deleteRowByEmpid);\n\t\t//String squery =\"select lh.empid,lh.leaveType,lh.leaveCategory,lh.totalDays,lh.lwpDays,lh.lwp,lh.inAccount,lh.leaveDays from emp_leave_history as lh where lh.requestId=?\";\n\t\tString squery =\"select lh.empid,lh.leaveType,lh.leaveCategory,lh.totalDays,lh.lwpDays,lh.lwp,lh.inAccount,lh.leaveDays from emp_leave_requests_tbl as lh where lh.requestId=?\";\n\t\tif(!BASApplicationConstants.NO_CHANGE.equalsIgnoreCase(changeLeaveType)) {\n\t\t\t FaculityLeaveMasterEntity faculityLeaveMasterEntity = super.getJdbcTemplate().queryForObject(squery,new Object[] {leaveRequestId},new BeanPropertyRowMapper<FaculityLeaveMasterEntity>(FaculityLeaveMasterEntity.class));\n\t\t\t\tLeaveBalanceEntity leaveBalanceEntity=findLeaveCurrentLeaveBalanceByEmpId(faculityLeaveMasterEntity.getEmpid()+\"\");\n\t\t\t\tif(BASApplicationConstants.CL_LEAVE.equalsIgnoreCase(faculityLeaveMasterEntity.getLeaveType())) {\n\t\t\t\t\tif(BASApplicationConstants.EL_LEAVE.equalsIgnoreCase(changeLeaveType)) {\n\t\t\t\t\t\t\tfloat cel=0;\n\t\t\t\t\t\t String elDays=null;\n\t\t\t\t\t\t\tString lwpdays=faculityLeaveMasterEntity.getLwpDays();\n\t\t\t\t\t\t float lwp=faculityLeaveMasterEntity.getLwp();//2.5 , el=1.5\n\t\t\t\t\t\t float tel=leaveBalanceEntity.getEl(); //1\n\t\t\t\t\t\t float remel=tel-lwp; //remel =>>remainning el /5 //5.5\n\t\t\t\t\t\t if(remel>0) {\n\t\t\t\t\t\t \tlwp=0;\n\t\t\t\t\t\t \telDays=lwpdays;\n\t\t\t\t\t\t \tlwpdays=null;\n\t\t\t\t\t\t \tcel=faculityLeaveMasterEntity.getLwp();\n\t\t\t\t\t\t }else{\n\t\t\t\t\t\t \tlwp=-remel; //when lwp>=total el\n\t\t\t\t\t\t \tcel=faculityLeaveMasterEntity.getLwp();\n\t\t\t\t\t\t \t///2\n\t\t\t\t\t\t \tint lwpCount=(int)Math.ceil(lwp);\n\t\t\t\t\t\t \tint lwpLessCount=(int)Math.floor(lwp);\n\t\t\t\t\t\t \tString lwpdaysTokens[]=lwpdays.split(\",\");\n\t\t\t\t\t\t \t elDays=\"\";\n\t\t\t\t\t\t for(int x=0;x<lwp;x++) { //\n\t\t\t\t\t\t \telDays=elDays+lwpdaysTokens[lwpdaysTokens.length-1-x]+\",\";\n\t\t\t\t\t\t }\n\t\t\t\t\t\t lwpdays=\"\";\n\t\t\t\t\t\t for(int x=0;x<lwpdaysTokens.length-lwp;x++) { //\n\t\t\t\t\t\t \tlwpdays=lwpdays+lwpdaysTokens[x]+\",\";\n\t\t\t\t\t\t }\n\t\t\t\t\t\t }\n\t\t\t\t\t\t String updateLeaveStatus=\"update emp_leave_requests_tbl set elDays=?,cel=?,lwp=?,lwpDays=?,changeLeaveType=? where requestId='\"+leaveRequestId+\"'\";\n\t\t\t\t\t\t super.getJdbcTemplate().update(updateLeaveStatus,new Object[]{elDays,cel,lwp,lwpdays,changeLeaveType});\n\t\t\t\t\t\t updateEmployeeEL(leaveBalanceEntity.getEmpNo(),0F);\n\t\t\t\t\t}\n\t\t\t\t}else if(BASApplicationConstants.EL_LEAVE.equalsIgnoreCase(faculityLeaveMasterEntity.getLeaveType())) {\n\t\t\t\t\t if(BASApplicationConstants.LWP_LEAVE.equalsIgnoreCase(changeLeaveType)) {\n\t\t\t\t\t\t float totalDays=faculityLeaveMasterEntity.getTotalDays();\n\t\t\t\t\t\t String totalLeaveDays=faculityLeaveMasterEntity.getLeaveDays();\n\t\t\t\t\t\t\tString lwpDays=faculityLeaveMasterEntity.getLwpDays();\n\t\t\t\t\t\t\tlwpDays=totalLeaveDays+lwpDays;\n\t\t\t\t\t\t\tfloat lwp=totalDays;\n\t\t\t\t\t\t\tupdateEmployeeEL(faculityLeaveMasterEntity.getEmpid()+\"\",totalDays-faculityLeaveMasterEntity.getLwp()); \n\t\t\t\t\t\t\tString updateLeaveStatus=\"update emp_leave_requests_tbl set leaveDays=?,lwp=?,lwpDays=?,changeLeaveType=? where requestId='\"+leaveRequestId+\"'\";\n\t\t\t\t\t\t\tsuper.getJdbcTemplate().update(updateLeaveStatus,new Object[]{null,lwp,lwpDays,changeLeaveType});\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif(BASApplicationConstants.LWP_LEAVE.equalsIgnoreCase(changeLeaveType)){\n\t\t\t\t\t float totalDays=faculityLeaveMasterEntity.getTotalDays();\n\t\t\t\t\t String totalLeaveDays=faculityLeaveMasterEntity.getLeaveDays();\n\t\t\t\t\t\tString lwpDays=faculityLeaveMasterEntity.getLwpDays();\n\t\t\t\t\t\tlwpDays=totalLeaveDays+(lwpDays!=null?lwpDays:\"\");\n\t\t\t\t\t\tfloat lwp=totalDays;\n\t\t\t\t\t\t//updateEmployeeEL(faculityLeaveMasterEntity.getEmpid()+\"\",totalDays-faculityLeaveMasterEntity.getLwp()); \n\t\t\t\t\t\tString updateLeaveStatus=\"update emp_leave_requests_tbl set leaveDays=?,lwp=?,lwpDays=?,changeLeaveType=? where requestId='\"+leaveRequestId+\"'\";\n\t\t\t\t\t\tsuper.getJdbcTemplate().update(updateLeaveStatus,new Object[]{null,lwp,lwpDays,changeLeaveType});\n\t\t\t\t }else if(BASApplicationConstants.CL_LEAVE.equalsIgnoreCase(changeLeaveType)){\n\t\t\t\t\t float totalDays=faculityLeaveMasterEntity.getTotalDays();\n\t\t\t\t\t\tupdateEmployeeCL(faculityLeaveMasterEntity.getEmpid()+\"\",totalDays); \n\t\t\t\t\t\tString updateLeaveStatus=\"update emp_leave_requests_tbl set changeLeaveType=? where requestId='\"+leaveRequestId+\"'\";\n\t\t\t\t\t\tsuper.getJdbcTemplate().update(updateLeaveStatus,new Object[]{changeLeaveType});\n\t\t\t\t }else if(BASApplicationConstants.EL_LEAVE.equalsIgnoreCase(changeLeaveType)){\n\t\t\t\t\t float totalDays=faculityLeaveMasterEntity.getTotalDays();\n\t\t\t\t\t\tupdateEmployeeEL(faculityLeaveMasterEntity.getEmpid()+\"\",totalDays); \n\t\t\t\t\t\tString updateLeaveStatus=\"update emp_leave_requests_tbl set changeLeaveType=? where requestId='\"+leaveRequestId+\"'\";\n\t\t\t\t\t\tsuper.getJdbcTemplate().update(updateLeaveStatus,new Object[]{changeLeaveType});\n\t\t\t\t }\n\t\t\t\t\t\n\t\t\t}\n\t\t}//end of no change\n\t\t\n\t\t//Approving the status of Management and moving record from leave_request_tbl into leave_history_tbl\n\t\tapproveLeaveByManagementRequestId(leaveRequestId,leaveApproveReason);\n\t/*\tString updateLeaveStatus=\"update emp_leave_requests_tbl set description=?,hrApproval=?,dom=? where requestId='\"+leaveRequestId+\"'\";\n\t\tsuper.getJdbcTemplate().update(updateLeaveStatus,new Object[]{leaveApproveReason,LeaveStatus.APPROVED_STATUS,DateUtils.getCurrentTimestatmp()});*/\n\t\treturn BaoConstants.SUCCESS;\n\t}",
"@Override\r\n public List<CreditRequest> getReviewedRequests() {\n List<CreditRequest> result = new ArrayList<CreditRequest>();\r\n for (CreditOperation operation : operations) {\r\n if (operation.getStatus() == CreditOperationStatus.REVIEW_SUCCEDED) {\r\n CreditRequest request = findRequestById(operation.getCreditRequestId());\r\n if (request != null) {\r\n result.add(request);\r\n } else {\r\n System.out.println(\"request not found for id: \" + operation.getCreditRequestId());\r\n }\r\n }\r\n }\r\n return result;\r\n }",
"@Override\r\n\tpublic int updateCensusForm(String status,String empClock) {\n\t\treturn exemptTeamMemberDAO.updateCensusForm(status,empClock);\r\n\t}",
"public static void contractors(){\n NewProject.contract_name = getInput(\"Please enter the NEW name of the contractor:\");\r\n\r\n NewProject.contract_tel = getInput(\"Please enter the NEW telephone number of the contractor:\");\r\n\r\n NewProject.contract_email = getInput(\"Please enter the NEW email of the contractor:\");\r\n\r\n NewProject.contract_address = getInput(\"Please enter the NEW email of the contractor:\");\r\n\r\n UpdateData.updateContractor();\r\n updateMenu();\t//Return back to previous menu.\r\n }",
"public void setSpecialReviewCode() {\r\n try {\r\n //CoeusVector cvParameter = queryEngine.executeQuery(queryKey,CoeusParameterBean.class,CoeusVector.FILTER_ACTIVE_BEANS);\r\n boolean isHumanSubFetched = false;\r\n boolean isAnimalUsagefetched = false;\r\n for (int index=0;index<cvParameters.size();index++) {\r\n CoeusParameterBean coeusParameterBean=(CoeusParameterBean)cvParameters.elementAt(index);\r\n //get the value for the SPL_REV_TYPE_CODE_HUMAN parameter\r\n if(HUMAN_SUBJECTS.equals(coeusParameterBean.getParameterName())){\r\n if(CoeusConstants.SPL_REV_TYPE_CODE_HUMAN.equals(coeusParameterBean.getParameterName())){\r\n specialReviewTypeCode = Integer.parseInt(coeusParameterBean.getParameterValue());\r\n specialReviewForm.setSpecialRevTypeCode(coeusParameterBean.getParameterValue());\r\n isHumanSubFetched = true;\r\n }\r\n }\r\n //Added for the COEUSQA-3119- Need to implement IACUC link to Award, IP, Prop Dev, and IRB - start\r\n //getting the data for parameter IACUC_SPL_REV_TYPE_CODE\r\n else if(ANIMAL_USAGE.equals(coeusParameterBean.getParameterName())) {\r\n if(CoeusConstants.IACUC_SPL_REV_TYPE_CODE.equals(coeusParameterBean.getParameterName())){\r\n specialRevTypeCodeParamForIacuc = Integer.parseInt(coeusParameterBean.getParameterValue());\r\n specialReviewForm.setSpecialRevTypeCodeForIacuc(coeusParameterBean.getParameterValue());\r\n isAnimalUsagefetched = true;\r\n }\r\n }\r\n //if value for both SPL_REV_TYPE_CODE_HUMAN and IACUC_SPL_REV_TYPE_CODE are fetched then break the loop\r\n if(isHumanSubFetched && isAnimalUsagefetched ){\r\n break;\r\n }\r\n //Added for the COEUSQA-3119- Need to implement IACUC link to Award, IP, Prop Dev, and IRB - end\r\n }\r\n }catch(Exception exception) {\r\n \r\n }\r\n }",
"public @ResponseBody Contract updateContract(@RequestBody Contract Contract);",
"@Step\n\tpublic void verify_AWB_and_RWO_pages_after_pipeline_for_the_captured_data(String sChange, String sDisposition, String DpType,String user) throws Throwable{\n\t\t\n\t\tExcelUtils.LoadEllData();\n\t\t\n\n\t\tHashMap<Integer, HashMap<String, String>> sEllData = ProjectVariables.sSubsequentEllData;\n\t\t\n\t\tSerenity.setSessionVariable(\"user\").to(user);\n\n\t\tint iRowCount = sEllData.size();\n\t\tint i =1;\n\t\tboolean blnRows = false;\n\n\t\tfor (i=1;i<=iRowCount;i++){\n\t\t\t\n\t\t\tString sExecution = sEllData.get(i).get(\"Execution\");\n\t\t\t\n\t\t\tif (sExecution.equalsIgnoreCase(\"Y\")){\n\t\t\t\tSerenity.setSessionVariable(\"client\").to(ProjectVariables.sSubsequentEllData.get(i).get(\"Client\"));\n\t\t\t\tSerenity.setSessionVariable(\"user\").to(user);\n\t\t\t\tSerenity.setSessionVariable(\"Medicalpolicy\").to(ProjectVariables.sSubsequentEllData.get(i).get(\"Medical_Policy\"));\n\t\t\t\tSerenity.setSessionVariable(\"Topic\").to(ProjectVariables.sSubsequentEllData.get(i).get(\"Topic\"));\n\t\t\t\tSerenity.setSessionVariable(\"DPkey\").to(ProjectVariables.sSubsequentEllData.get(i).get(\"i_DP Key\"));\n\t\t\t\tSerenity.setSessionVariable(\"Disposition\").to(ProjectVariables.sSubsequentEllData.get(i).get(\"Disposition_captured\"));\t\n\t\t\t\tSerenity.setSessionVariable(\"RFP_Presentation\").to(ProjectVariables.sSubsequentEllData.get(i).get(\"Prstn_Set_RFP\"));\n\t\t\t\tSerenity.setSessionVariable(\"NotRFP_Presentation\").to(ProjectVariables.sSubsequentEllData.get(i).get(\"Prstn_NotSet_RFP\"));\n\t\t\t\tSerenity.setSessionVariable(\"RFP_Savings\").to(ProjectVariables.sSubsequentEllData.get(i).get(\"O_Savings_NotSet_RFP\"));\n\t\t\t\tString sClientkey=CPWPage.RetrieveTheClientkeyfromgivenClientthroughservice(Serenity.sessionVariableCalled(\"client\").toString());\n\t\t\t\tSerenity.setSessionVariable(\"clientkey\").to(sClientkey);\n\t\t\t}\t\t\n\t\t}\n\t\t\n\t\t\n\t\toCPWPage.SelectPayer(\"\", Serenity.sessionVariableCalled(\"client\").toString());\n\t\tswitch(sChange.toUpperCase()){\n\t\tcase \"DP RETIRE\":\n\t\t\toCPWPage.SelectPolicySelectionAndApplyFilters(Serenity.sessionVariableCalled(\"Topic\").toString(),\"Topic\");\n\t\t\toCPWPage.verifygridcolumnsinAWBPae(DpType);\n\t\t\tAssert.assertFalse(\"'No results found that meet the search criteria.' message is displayed in the AWB Grid for the Medical policy ==>\"+\"Medicaid - New York State Policy\",objSeleniumUtils.is_WebElement_Displayed(StringUtils.replace(oCPWPage.Div_contains_text, \"value\", \"No results found that meet the search criteria.\")));\n\t\t\tArrayList<String> DPKeylist = new ArrayList();\n\t\t\tDPKeylist.add(Serenity.sessionVariableCalled(\"DPkey\").toString());\n\n\t\t\toCPWPage.verify_the_captured_data_is_not_displayed_in_the_given(DPKeylist, \"DPkey\", DpType);//mp no need\n\t\t\t///\n\t\t\toCPWPage.Open_the_Review_Worked_Opportunity_Page();\n\t\t\tAssert.assertTrue(\"Unable to enter the DPkey in the search field of Reviewwoked Opportunity Page, DPkey ===>\"+DPKeylist, objSeleniumUtils.Enter_given_Text_Element(oCPWPage.sSearchField_RWOpp,Serenity.sessionVariableCalled(\"DPkey\").toString()));\n\n\t\t\tAssert.assertTrue(\"Unable to click the search icon beside search box in the Reviewwoked Opportunity Page\", objSeleniumUtils.clickGivenXpath(oCPWPage.AWBgriSearchbutton));\n\n\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_5_Seconds);\n\t\t\tAssert.assertTrue(\"Captured DPKey is not displaying in the Review Worked Opp Grid,Captured DPKey ===>\"+DPKeylist+\",Disposition ==>\", objSeleniumUtils.is_WebElement_Displayed(StringUtils.replace(oCPWPage.ButtonContainsText, \"value\",Serenity.sessionVariableCalled(\"DPkey\").toString())));\n\t\t\tbreak;\n\t\tcase \"MP RETIRE\":\n\t\t\toCPWPage.selectgivenFiltersMP_Topic(Serenity.sessionVariableCalled(\"Medicalpolicy\").toString(),\"MP\");\n\t\t\toCPWPage.verifygridcolumnsinAWBPae(DpType);\n\t\t\toCPWPage.Open_the_Review_Worked_Opportunity_Page();\n\t\t\tAssert.assertTrue(\"Unable to enter the MP in the search field of Reviewwoked Opportunity Page, MP ===>\"+Serenity.sessionVariableCalled(\"Medicalpolicy\").toString(), objSeleniumUtils.Enter_given_Text_Element(oCPWPage.sSearchField_RWOpp,Serenity.sessionVariableCalled(\"Medicalpolicy\").toString()));\n\n\t\t\tAssert.assertTrue(\"Unable to click the search icon beside search box in the Reviewwoked Opportunity Page\", objSeleniumUtils.clickGivenXpath(oCPWPage.AWBgriSearchbutton));\n\n\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_5_Seconds);\n\t\t\tAssert.assertTrue(\"Captured DPKey is not displaying in the Review Worked Opp Grid,Captured MP ===>\"+Serenity.sessionVariableCalled(\"Medicalpolicy\").toString()+\",Disposition ==>\", objSeleniumUtils.is_WebElement_Displayed(StringUtils.replace(oCPWPage.ButtonContainsText, \"value\",Serenity.sessionVariableCalled(\"Medicalpolicy\").toString())));\n\t\t\tbreak;\n\t\tcase \"TOPIC RETIRE\":\n\t\t\toCPWPage.selectgivenFiltersMP_Topic(Serenity.sessionVariableCalled(\"Medicalpolicy\").toString(),\"Topic\");\n\t\t\toCPWPage.verifygridcolumnsinAWBPae(DpType);\n\t\t\toCPWPage.Open_the_Review_Worked_Opportunity_Page();\n\t\t\tAssert.assertTrue(\"Unable to enter the Topic in the search field of Reviewwoked Opportunity Page, Topic ===>\"+Serenity.sessionVariableCalled(\"Topic\").toString(), objSeleniumUtils.Enter_given_Text_Element(oCPWPage.sSearchField_RWOpp,Serenity.sessionVariableCalled(\"Topic\").toString()));\n\n\t\t\tAssert.assertTrue(\"Unable to click the search icon beside search box in the Reviewwoked Opportunity Page\", objSeleniumUtils.clickGivenXpath(oCPWPage.AWBgriSearchbutton));\n\n\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_5_Seconds);\n\t\t\tAssert.assertTrue(\"Captured DPKey is not displaying in the Review Worked Opp Grid,Captured Topic ===>\"+Serenity.sessionVariableCalled(\"Topic\").toString()+\",Disposition ==>\", objSeleniumUtils.is_WebElement_Displayed(StringUtils.replace(oCPWPage.ButtonContainsText, \"value\",Serenity.sessionVariableCalled(\"Topic\").toString())));\n\t\t\tbreak;\n\t\tcase \"DP DESCRIPTION\":\n\t\t\toCPWPage.Open_the_Review_Worked_Opportunity_Page();\n\t\t\tAssert.assertTrue(\"Unable to enter the DPKey in the search field of Reviewwoked Opportunity Page, DPkey ===>\"+Serenity.sessionVariableCalled(\"DPkey\").toString(), objSeleniumUtils.Enter_given_Text_Element(oCPWPage.sSearchField_RWOpp,Serenity.sessionVariableCalled(\"DPkey\").toString()));\n\n\t\t\tAssert.assertTrue(\"Unable to click the search icon beside search box in the Reviewwoked Opportunity Page\", objSeleniumUtils.clickGivenXpath(oCPWPage.AWBgriSearchbutton));\n\n\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_5_Seconds);\n\t\t\tAssert.assertTrue(\"Captured DPKey is not displaying in the Review Worked Opp Grid,Captured DPkey ===>\"+Serenity.sessionVariableCalled(\"DPkey\").toString()+\",Disposition ==>\", objSeleniumUtils.is_WebElement_Displayed(StringUtils.replace(oCPWPage.ButtonContainsText, \"value\",Serenity.sessionVariableCalled(\"DPkey\").toString())));\n\t\t\tAssert.assertTrue(\"Captured DP description is not displaying in the Review Worked Opp Grid,Captured discription ===>\"+Serenity.sessionVariableCalled(\"DPDesc\").toString()+\",Disposition ==>\", objSeleniumUtils.is_WebElement_Displayed(StringUtils.replace(oCPWPage.Span_contains_text, \"value\",Serenity.sessionVariableCalled(\"DPDesc\").toString())));\n\t\t\tAssert.assertTrue(\"Unable to click the DPKey in Reviewwoked Opportunity Page\", objSeleniumUtils.clickGivenXpath(StringUtils.replace(oCPWPage.ButtonContainsText, \"value\",Serenity.sessionVariableCalled(\"DPkey\").toString())));\n\t\t\tAssert.assertTrue(\"Captured DP description is not displaying in the Review Worked Opp Grid,Captured discription ===>\"+Serenity.sessionVariableCalled(\"DPDesc\").toString()+\",Disposition ==>\", objSeleniumUtils.is_WebElement_Displayed(StringUtils.replace(oCPWPage.Span_contains_text, \"value\",Serenity.sessionVariableCalled(\"DPDesc\").toString())));\n\t\t\tbreak;\n\t\tcase \"TOPIC NAME\":\n\t\t\toCPWPage.selectgivenFiltersMP_Topic(Serenity.sessionVariableCalled(\"Topic\").toString(),\"Topic\");\n\t\t\toCPWPage.verifygridcolumnsinAWBPae(DpType);\n\t\t\toCPWPage.Open_the_Review_Worked_Opportunity_Page();\n\t\t\tAssert.assertTrue(\"Unable to enter the Topic in the search field of Reviewwoked Opportunity Page, Topic ===>\"+Serenity.sessionVariableCalled(\"Topic\").toString(), objSeleniumUtils.Enter_given_Text_Element(oCPWPage.sSearchField_RWOpp,Serenity.sessionVariableCalled(\"Topic\").toString()));\n\n\t\t\tAssert.assertTrue(\"Unable to click the search icon beside search box in the Reviewwoked Opportunity Page\", objSeleniumUtils.clickGivenXpath(oCPWPage.AWBgriSearchbutton));\n\n\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_5_Seconds);\t\t\t\n\t\t\tAssert.assertTrue(\"Captured Topic is not displaying in the Review Worked Opp Grid,Captured Topic ===>\"+Serenity.sessionVariableCalled(\"Topic\").toString()+\",Disposition ==>\", objSeleniumUtils.is_WebElement_Displayed(StringUtils.replace(oCPWPage.labelcontainstext, \"value\",Serenity.sessionVariableCalled(\"Topic\").toString())));\n\t\t\tbreak;\n\t\tcase \"MP NAME\":\n\t\t\toCPWPage.selectgivenFiltersMP_Topic(Serenity.sessionVariableCalled(\"Medicalpolicy\").toString(),\"MP\");\n\t\t\toCPWPage.verifygridcolumnsinAWBPae(DpType);\n\t\t\toCPWPage.Open_the_Review_Worked_Opportunity_Page();\n\t\t\tAssert.assertTrue(\"Unable to enter the MP in the search field of Reviewwoked Opportunity Page, MP ===>\"+Serenity.sessionVariableCalled(\"Medicalpolicy\").toString(), objSeleniumUtils.Enter_given_Text_Element(oCPWPage.sSearchField_RWOpp,Serenity.sessionVariableCalled(\"Medicalpolicy\").toString()));\n\n\t\t\tAssert.assertTrue(\"Unable to click the search icon beside search box in the Reviewwoked Opportunity Page\", objSeleniumUtils.clickGivenXpath(oCPWPage.AWBgriSearchbutton));\n\n\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_5_Seconds);\t\t\t\n\t\t\tAssert.assertTrue(\"Captured MP is not displaying in the Review Worked Opp Grid,Captured MP ===>\"+Serenity.sessionVariableCalled(\"Medicalpolicy\").toString()+\",Disposition ==>\", objSeleniumUtils.is_WebElement_Displayed(StringUtils.replace(oCPWPage.labelcontainstext, \"value\",Serenity.sessionVariableCalled(\"Medicalpolicy\").toString())));\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tAssert.assertTrue(\"case not found::\"+sChange, false);\n\t\tbreak;\n\t\t\t\n\t\t}\n\t\t\t\n\t}",
"public void testUpdateInvoiceAccuracy() throws Exception {\n Invoice invoice = new Invoice();\n\n invoice.setId(4);\n invoice.setCreationDate(new Date());\n invoice.setCreationUser(\"tc\");\n invoice.setModificationDate(new Date());\n invoice.setModificationUser(\"tc\");\n invoice.setCompanyId(5);\n invoice.setProjectId(8);\n invoice.setInvoiceNumber(\"invoiceNumber\");\n invoice.setPaid(true);\n invoice.setDueDate(new Date());\n invoice.setInvoiceDate(new Date());\n invoice.setPurchaseOrderNumber(\"purchaseOrderNumber\");\n invoice.setSalesTax(new BigDecimal(5));\n\n ExpenseEntry entry = new ExpenseEntry();\n entry.setAmount(new BigDecimal(5));\n ExpenseEntry[] expenseEntries = new ExpenseEntry[] {entry};\n invoice.setExpenseEntries(expenseEntries);\n\n PaymentTerm paymentTerm = new PaymentTerm();\n paymentTerm.setId(3);\n invoice.setPaymentTerm(paymentTerm);\n\n FixedBillingEntry fixedBillingEntry = new FixedBillingEntry();\n FixedBillingEntry[] fixedBillingEntries = new FixedBillingEntry[] {fixedBillingEntry};\n invoice.setFixedBillingEntries(fixedBillingEntries);\n\n InvoiceServiceDetail detail = new InvoiceServiceDetail();\n detail.setAmount(new BigDecimal(8));\n detail.setId(4);\n InvoiceServiceDetail[] serviceDetails = new InvoiceServiceDetail[] {detail};\n invoice.setServiceDetails(serviceDetails);\n\n InvoiceStatus invoiceStatus = new InvoiceStatus(4, \"description\", \"user\", \"user\", new Date(), new Date());\n invoice.setInvoiceStatus(invoiceStatus);\n\n invoiceSessionBean.updateInvoice(invoice, true);\n\n }",
"public void updateDraftInfo(Draft draft) {\n // add necessary code here ********\n }",
"@Test\n public void testDeleteUserWhenMultipleUser2() throws Exception {\n /*\n * This test has the following setup:\n * - Step 1: user B and D\n * - Step 2: user C and D\n * - Step 3: user B and D\n *\n * This test will perform the following checks:\n * - create a workspace item, and let it move to step 1\n * - delete user B\n * - verify the delete succeeds\n * - Approve it by user D\n * - verify that the item moved to step 2\n * - Approve it by user C\n * - verify that the item moved to step 3\n * - Approve it by user D\n * - verify that the item is archived\n */\n context.turnOffAuthorisationSystem();\n\n Community parent = CommunityBuilder.createCommunity(context).build();\n Collection collection = CollectionBuilder.createCollection(context, parent)\n .withWorkflowGroup(1, workflowUserB, workflowUserD)\n .withWorkflowGroup(2, workflowUserC, workflowUserD)\n .withWorkflowGroup(3, workflowUserB, workflowUserD)\n .build();\n\n WorkspaceItem wsi = WorkspaceItemBuilder.createWorkspaceItem(context, collection)\n .withSubmitter(workflowUserA)\n .withTitle(\"Test item full workflow\")\n .withIssueDate(\"2019-03-06\")\n .withSubject(\"ExtraEntry\")\n .build();\n\n Workflow workflow = XmlWorkflowServiceFactory.getInstance().getWorkflowFactory().getWorkflow(collection);\n\n XmlWorkflowItem workflowItem = xmlWorkflowService.startWithoutNotify(context, wsi);\n MockHttpServletRequest httpServletRequest = new MockHttpServletRequest();\n httpServletRequest.setParameter(\"submit_approve\", \"submit_approve\");\n\n assertDeletionOfEperson(workflowUserB, true);\n\n executeWorkflowAction(httpServletRequest, workflowUserD, workflow, workflowItem, REVIEW_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserD, workflow, workflowItem, REVIEW_STEP, REVIEW_ACTION);\n\n executeWorkflowAction(httpServletRequest, workflowUserC, workflow, workflowItem, EDIT_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserC, workflow, workflowItem, EDIT_STEP, EDIT_ACTION);\n\n\n executeWorkflowAction(httpServletRequest, workflowUserD, workflow, workflowItem, FINAL_EDIT_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserD, workflow, workflowItem, FINAL_EDIT_STEP,\n FINAL_EDIT_ACTION);\n\n assertTrue(workflowItem.getItem().isArchived());\n\n }",
"@Test\n public void testDeleteUserAfterReplacingUser2() throws Exception {\n /*\n * This test has the following setup:\n * - Step 1: user B\n * - Step 2: user C\n * - Step 3: user B\n *\n * This test will perform the following checks:\n * - create a workspace item, and let it move to step 1\n * - delete user B\n * - verify the delete is refused\n * - add user D to workflow step 1\n * - add user D to workflow step 3\n * - delete user B\n * - verify the delete succeeds\n * - Approve it by user D\n * - verify that the item moved to step 2\n * - Approve it by user C\n * - Approve it by user D\n * - verify that the item is archived\n */\n context.turnOffAuthorisationSystem();\n\n Community parent = CommunityBuilder.createCommunity(context).build();\n Collection collection = CollectionBuilder.createCollection(context, parent)\n .withWorkflowGroup(1, workflowUserB)\n .withWorkflowGroup(2, workflowUserC)\n .withWorkflowGroup(3, workflowUserB)\n .build();\n\n WorkspaceItem wsi = WorkspaceItemBuilder.createWorkspaceItem(context, collection)\n .withSubmitter(workflowUserA)\n .withTitle(\"Test item full workflow\")\n .withIssueDate(\"2019-03-06\")\n .withSubject(\"ExtraEntry\")\n .build();\n\n Workflow workflow = XmlWorkflowServiceFactory.getInstance().getWorkflowFactory().getWorkflow(collection);\n\n XmlWorkflowItem workflowItem = xmlWorkflowService.startWithoutNotify(context, wsi);\n MockHttpServletRequest httpServletRequest = new MockHttpServletRequest();\n httpServletRequest.setParameter(\"submit_approve\", \"submit_approve\");\n\n assertDeletionOfEperson(workflowUserB, false);\n addUserToWorkflowGroup(workflowUserD, collection, REVIEW_ROLE);\n addUserToWorkflowGroup(workflowUserD, collection, FINAL_EDIT_ROLE);\n assertDeletionOfEperson(workflowUserB, true);\n\n executeWorkflowAction(httpServletRequest, workflowUserD, workflow, workflowItem, REVIEW_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserD, workflow, workflowItem, REVIEW_STEP, REVIEW_ACTION);\n\n\n executeWorkflowAction(httpServletRequest, workflowUserC, workflow, workflowItem, EDIT_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserC, workflow, workflowItem, EDIT_STEP, EDIT_ACTION);\n\n executeWorkflowAction(httpServletRequest, workflowUserD, workflow, workflowItem, FINAL_EDIT_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserD, workflow, workflowItem, FINAL_EDIT_STEP,\n FINAL_EDIT_ACTION);\n\n assertTrue(workflowItem.getItem().isArchived());\n\n }",
"@Suspendable\n @Override\n public Void call() throws FlowException {\n // We retrieve the notary identity from the network map.\n final Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n QueryCriteria queryCriteria = new QueryCriteria.LinearStateQueryCriteria(null, ImmutableList.of(this.linearId),\n Vault.StateStatus.UNCONSUMED, null);\n List<StateAndRef<NDAState>> ndaStates = getServiceHub().getVaultService().queryBy(NDAState.class, queryCriteria).getStates();\n\n // We create the transaction components.\n NDAState outputState = new NDAState(getOurIdentity(), crmParty, \"APPROVED\");\n StateAndContract outputStateAndContract = new StateAndContract(outputState, LEGAL_CONRACT_ID);\n List<PublicKey> requiredSigners = ImmutableList.of(getOurIdentity().getOwningKey(), crmParty.getOwningKey());\n Command cmd = new Command<>(new LegalContract.Approve(), requiredSigners);\n\n // We create a transaction builder and add the components.\n final TransactionBuilder txBuilder = new TransactionBuilder();\n txBuilder.addInputState(ndaStates.get(0));\n txBuilder.setNotary(notary);\n txBuilder.withItems(outputStateAndContract, cmd);\n\n // Signing the transaction.\n final SignedTransaction signedTx = getServiceHub().signInitialTransaction(txBuilder);\n // Creating a session with the other party.\n FlowSession otherpartySession = initiateFlow(crmParty);\n // Obtaining the counterparty's signature.\n SignedTransaction fullySignedTx = subFlow(new CollectSignaturesFlow(\n signedTx, ImmutableList.of(otherpartySession), CollectSignaturesFlow.tracker()));\n // Finalising the transaction.\n subFlow(new FinalityFlow(fullySignedTx));\n return null;\n }",
"public void checkOfficeActionPeriod1(){\n\n System.out.println(\"checking Office Action period 1 status for filings : \"+firstOfficeActionDuration);\n\n BaseTradeMarkApplicationService baseTradeMarkApplicationService = serviceBeanFactory.getBaseTradeMarkApplicationService();\n\n\n for(Iterator<BaseTrademarkApplication> iter = baseTradeMarkApplicationService.findAll().iterator(); iter.hasNext(); ) {\n\n BaseTrademarkApplication current = iter.next();\n if(current.getApplicationFilingDate() != null && current.getFilingStatus().equals(\"Non-Final Action Mailed\") == true){\n // check that date + duration against current time\n if((current.getApplicationFilingDate().getTime() + current.getBlackOutPeriod() + current.getOfficeActionResponsePeriod()) < new Date().getTime()){\n\n System.out.println(\"Filing has expired from the office action period\");\n\n // check if office action has been completed ..\n for(Iterator<OfficeActions> iter3 = current.getOfficeActions().iterator(); iter3.hasNext(); ) {\n OfficeActions current3 = iter3.next();\n\n if(current3.isOfficeActionCompleted() == false && current.getFilingStatus().contains(\"Abandoned\") == false){\n\n // remove office action ..or set it to inactive\n // so on the dashboard. we only show actions that are active\n //\n // do the same thing. create petition object and attach it to the filing\n Petition petition = new Petition();\n petition.setParentMarkImagePath(current.getTradeMark().getTrademarkImagePath());\n petition.setStandardCharacterMark(current.isStandardTextMark());\n petition.setStandardCharacterText(current.getTradeMark().getTrademarkStandardCharacterText());\n petition.setParentMarkOwnerName(current.getPrimaryOwner().getOwnerDisplayname());\n petition.setParentSerialNumber(current.getTrademarkName());\n petition.setParentRegistrationNumber(current.getRegistrationID());\n\n petition.setActionID(String.valueOf(current3.getInternalID()));\n\n long dueDate = new Date().getTime()+current.getBlackOutPeriod()+current.getOfficeActionResponsePeriod()+current.getPetitionPeriod();\n petition.setDueDate(new Date(dueDate));\n\n\n current.setFilingStatus(\"Abandoned - Failure to Respond or Late Response\");\n petition.setOfficeActionCode(\"Abandoned - Failure to Respond or Late Response\");\n petition.setPetitionTitle(\"Failure to Respond Timely to Office Action\");\n\n petition.setActivePetition(true);\n current.addPetition(petition);\n petition.setTrademarkApplication(current);\n current3.setActiveAction(false);\n\n FilingDocumentEvent filingDocumentEvent = new FilingDocumentEvent();\n filingDocumentEvent.setEventDescription(\"Filing Abandoned\");\n\n filingDocumentEvent.setDocumentType(\"XML\");\n Date date = new Date();\n filingDocumentEvent.setEventDate(date);\n\n current.addFilingDocumentEvent(filingDocumentEvent);\n\n\n // go back and set any active actions to in-active\n //for(Iterator<OfficeActions> iter2 = current.getOfficeActions().iterator(); iter2.hasNext(); ) {\n // OfficeActions current2 = iter2.next();\n // current2.setActiveAction(false);\n\n //}\n\n baseTradeMarkApplicationService.save(current);\n\n\n }\n\n\n\n }\n\n\n\n // only execute below code if office action is not completed...\n\n\n }\n else{\n System.out.println(\"filing is still in respond to office action period or filing is in a different state\");\n\n\n }\n }\n else{\n if(current.getFilingStatus().equals(\"TEAS RF New Application\") || current.getFilingStatus().equals(\"New Application\") ){\n if((current.getApplicationFilingDate().getTime() + current.getBlackOutPeriod() + current.getOfficeActionResponsePeriod() ) < new Date().getTime()){\n boolean acceptedFiling = true;\n\n for(Iterator<OfficeActions> iter4 = current.getOfficeActions().iterator(); iter4.hasNext(); ) {\n OfficeActions current4 = iter4.next();\n if(current4.isActiveAction() && current4.getOfficeActionCode().equals(\"global default action\") == false){\n if(current4.isOfficeActionCompleted() == true){\n // skip examiner review period\n // filing is accepted\n // change filing status\n // create filing document event\n\n current4.setActiveAction(false);\n\n\n\n }\n else {\n acceptedFiling = false;\n\n System.out.println(\"office action is not completed\");\n }\n\n }\n\n\n }\n\n if(acceptedFiling == true){\n current.setFilingStatus(\"Accepted Filing\");\n current.setApplicationAcceptedDate(new Date());\n\n // create accepted filing date\n\n\n\n\n FilingDocumentEvent filingDocumentEvent = new FilingDocumentEvent();\n filingDocumentEvent.setEventDescription(\"Filing Accepted\");\n\n filingDocumentEvent.setDocumentType(\"XML\");\n Date date = new Date();\n filingDocumentEvent.setEventDate(date);\n\n current.addFilingDocumentEvent(filingDocumentEvent);\n\n\n // go back and set any active actions to in-active\n //for(Iterator<OfficeActions> iter2 = current.getOfficeActions().iterator(); iter2.hasNext(); ) {\n // OfficeActions current2 = iter2.next();\n // current2.setActiveAction(false);\n\n //}\n\n baseTradeMarkApplicationService.save(current);\n\n }\n // if there are no office actions ..it is also compelete\n\n }\n // check for accepted filings\n }\n\n\n\n\n\n\n\n\n\n\n\n\n }\n\n }\n\n }",
"private int doComp() {\n\t\tDbTime totalTime = pubService.getDbTime();\n\t\tString beginDate = \"\";\n\t\tString endDate = pubService.getTotalDateStr();\n\t\tString yesterdayStr = pubService.getYesterdayStr();\n\t\t\n\t\tReBankAccept reBankAccept = new ReBankAccept();\n\t\treBankAccept.setOrgId(1);\n\t\treBankAccept.setCheckType(\"N\");\n\t\tList<ReBankAccept> reBankAcceptList= sqlSessionTemplate.selectList(\"com.tmount.db.order.dao.ReBankAcceptMapper.selectBySelective\",reBankAccept);\n\t\tSystem.out.println(\"...records...\"+reBankAcceptList.size()+\"...\");\n\t\tfor(ReBankAccept aReBankAccept:reBankAcceptList){\n\t\t\t\n\t\t\tString billOrder = aReBankAccept.getBankAccept()+\"\";\n\t\t\tDate payTime = aReBankAccept.getPayTime();\n\t\t\tSimpleDateFormat df = new SimpleDateFormat(\"yyyyMMdd\");\n\t\t\tGregorianCalendar gc = new GregorianCalendar();\n\t\t\tgc.setTime(payTime); \n\t\t\tString payDate=df.format(gc.getTime());\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(\"payDate = \"+ payDate);\n\t\t\tSystem.out.println(\"billOrder = \"+ billOrder);\n\t\t\t\n\t\t\tStringBuffer strbuf = new StringBuffer();\n\t\t\tiRet = settle.QuerySingleOrder(payDate,billOrder,strbuf);\n\t\t\tif (iRet == 0)\n\t\t\t{\n\t\t\t\t//System.out.println(strbuf);\n\t\t\t\tString[] strArr = strbuf.toString().split(\"\\n\");\n\t\t\t\tif(strArr.length!=4){\n\t\t\t\t\tSystem.out.println(\"...strbuf format error...\");\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t\tString billData = strArr[0];//交易日期\n\t\t\t\tString dealData = strArr[1];//处理日期\n\t\t\t\tString orderStatus = strArr[2];//定单状态 0-已结帐,1-已撤销,2-部分结帐,3-退款,4-未结帐,5-无效状态,6-未知状态\n\t\t\t\tString strAmount = strArr[3];//定单金额\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"billData:[\"+billData+\"]\");\n\t\t\t\tSystem.out.println(\"dealData:[\"+dealData+\"]\");\n\t\t\t\tSystem.out.println(\"orderStatus:[\"+orderStatus+\"]\");\n\t\t\t\tSystem.out.println(\"strAmount:[\"+strAmount+\"]\");\n\t\t\t\t\n\t\t\t\tif(\"0\".equals(orderStatus)){\n\t\t\t\t\tif(\"Y\".equals(aReBankAccept.getPayType())){//已经是支付状态\n\t\t\t\t\t\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\tint payCount = sqlSessionTemplate.selectOne(\"com.tmount.db.order.dao.ReBankOrderAcceptMapper.countPayStatusByBankAccept\",aReBankAccept.getBankAccept());\n\t\t\t\t\t\tif(payCount>0){//银行流水对应的商城订单有支付完成的\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}else{//银行流水对应的商城订单没有支付完成的,对该未结账订单进行 支付(商城的支付服务逻辑)、结账\n\t\t\t\t\t\t\tOrderService orderservice = new OrderService();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tlong payId = 0;\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tpayId = orderService.userBankOrderPay(aReBankAccept.getBankAccept(),1,\"通过对账程序对本地的订单进行缴费\");\n\t\t\t\t\t\t\t\tSystem.out.println(\"@:***payId***[\"+payId+\"]\");\n\t\t\t\t\t\t\t} catch (ShopBusiException e) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t} catch (ShopParamException e) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//此处调用封装支付服务的函数,并将函数返回值赋给payId\n\t\t\t\t\t\t\taReBankAccept.setPayType(\"Y\");\n\t\t\t\t\t\t\taReBankAccept.setPayCommitTime(pubService.getDbTime().getDbTime());\n\t\t\t\t\t\t\taReBankAccept.setPayId(payId);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\taReBankAccept.setCheckType(\"Y\");\t\n\t\t\t\t\tsqlSessionTemplate.update(\"com.tmount.db.order.dao.ReBankAcceptMapper.updateByPrimaryKeySelective\", aReBankAccept);\n\t\t\t\t\t\n\t\t\t\t\t//入银行结算表 对账成功写结算表\n\t\t\t\t\tBkBankChangeAccept bkBankChangeAccept = new BkBankChangeAccept();\n\t\t\t\t\tbkBankChangeAccept.setBankAccept(aReBankAccept.getBankAccept());\n\t\t\t\t\tbkBankChangeAccept.setOrgId(aReBankAccept.getOrgId());\n\t\t\t\t\tbkBankChangeAccept.setPrice(aReBankAccept.getPrice());\n\t\t\t\t\tbkBankChangeAccept.setPayTime(aReBankAccept.getPayTime());\n\t\t\t\t\tbkBankChangeAccept.setPayId(aReBankAccept.getPayId());\n\t\t\t\t\tsqlSessionTemplate.insert(\"com.tmount.db.order.dao.BkBankChangeAcceptMapper.insertSelective\",bkBankChangeAccept);\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"...iRet...\"+iRet);\n\t\t\t\tSystem.out.println(settle.GetLastErr(iRet));\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"...totalTime.getDbTime().getHours()...\"+totalTime.getDbTime().getHours());\n\t\t\t\tSystem.out.println(\"...Long.parseLong(payDate)...\"+Long.parseLong(payDate));\n\t\t\t\tSystem.out.println(\"...Long.parseLong(pubService.getYesterdayStr())...\"+Long.parseLong(pubService.getYesterdayStr()));\n\t\t\t\t//招商银行订单的有效期是到第二天的1点(这里防止有遗漏,设置到两点之后失效)\n\t\t\t\tif(totalTime.getDbTime().getHours()>1&&Long.parseLong(payDate)<= Long.parseLong(pubService.getYesterdayStr())){\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tmoveHis(aReBankAccept);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\treturn 0;\n\t}",
"@Test\n public void testDeleteUserAfterReplacingUser4() throws Exception {\n /*\n * This test has the following setup:\n * - Step 1: user B\n * - Step 2: user C\n * - Step 3: user B\n *\n * This test will perform the following checks:\n * - create a workspace item, and let it move to step 1\n * - claim it by user B, but don’t approve it\n * - delete user B\n * - verify the delete is refused\n * - add user D to workflow step 1\n * - add user D to workflow step 3\n * - delete user B\n * - verify the delete succeeds\n * - Verify user D can now claim and approve it\n * - verify that the item moved to step 2\n * - claim it by user C\n * - approve it by user C\n * - verify that the item moved to step 3\n * - Verify user D can claim and approve it\n * - verify that the item is archived successfully\n */\n context.turnOffAuthorisationSystem();\n\n Community parent = CommunityBuilder.createCommunity(context).build();\n Collection collection = CollectionBuilder.createCollection(context, parent)\n .withWorkflowGroup(1, workflowUserB)\n .withWorkflowGroup(2, workflowUserC)\n .withWorkflowGroup(3, workflowUserB)\n .build();\n\n WorkspaceItem wsi = WorkspaceItemBuilder.createWorkspaceItem(context, collection)\n .withSubmitter(workflowUserA)\n .withTitle(\"Test item full workflow\")\n .withIssueDate(\"2019-03-06\")\n .withSubject(\"ExtraEntry\")\n .build();\n\n Workflow workflow = XmlWorkflowServiceFactory.getInstance().getWorkflowFactory().getWorkflow(collection);\n\n XmlWorkflowItem workflowItem = xmlWorkflowService.startWithoutNotify(context, wsi);\n MockHttpServletRequest httpServletRequest = new MockHttpServletRequest();\n httpServletRequest.setParameter(\"submit_approve\", \"submit_approve\");\n\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, REVIEW_STEP, CLAIM_ACTION);\n\n assertDeletionOfEperson(workflowUserB, false);\n addUserToWorkflowGroup(workflowUserD, collection, REVIEW_ROLE);\n addUserToWorkflowGroup(workflowUserD, collection, FINAL_EDIT_ROLE);\n assertDeletionOfEperson(workflowUserB, true);\n\n executeWorkflowAction(httpServletRequest, workflowUserD, workflow, workflowItem, REVIEW_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserD, workflow, workflowItem, REVIEW_STEP, REVIEW_ACTION);\n\n\n executeWorkflowAction(httpServletRequest, workflowUserC, workflow, workflowItem, EDIT_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserC, workflow, workflowItem, EDIT_STEP, EDIT_ACTION);\n\n executeWorkflowAction(httpServletRequest, workflowUserD, workflow, workflowItem, FINAL_EDIT_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserD, workflow, workflowItem, FINAL_EDIT_STEP,\n FINAL_EDIT_ACTION);\n\n assertTrue(workflowItem.getItem().isArchived());\n\n }",
"@Test\n public void testDeleteUserWhenMultipleUser5() throws Exception {\n /*\n * This test has the following setup:\n * - Step 1: user B and D\n * - Step 2: user C and D\n * - Step 3: user B and D\n *\n * This test will perform the following checks:\n * - create a workspace item, and let it move to step 1\n * - Approve it by user B\n * - verify that the item moved to step 2\n * - claim it by user C, but don’t approve it\n * - delete user C\n * - verify the delete succeeds\n * - Verify user D can now claim and approve it\n * - verify that the item moved to step 3\n * - Approve it by user B\n * - verify that the item is archived\n */\n context.turnOffAuthorisationSystem();\n\n Community parent = CommunityBuilder.createCommunity(context).build();\n Collection collection = CollectionBuilder.createCollection(context, parent)\n .withWorkflowGroup(1, workflowUserB, workflowUserD)\n .withWorkflowGroup(2, workflowUserC, workflowUserD)\n .withWorkflowGroup(3, workflowUserB, workflowUserD)\n .build();\n\n WorkspaceItem wsi = WorkspaceItemBuilder.createWorkspaceItem(context, collection)\n .withSubmitter(workflowUserA)\n .withTitle(\"Test item full workflow\")\n .withIssueDate(\"2019-03-06\")\n .withSubject(\"ExtraEntry\")\n .build();\n\n Workflow workflow = XmlWorkflowServiceFactory.getInstance().getWorkflowFactory().getWorkflow(collection);\n\n XmlWorkflowItem workflowItem = xmlWorkflowService.startWithoutNotify(context, wsi);\n MockHttpServletRequest httpServletRequest = new MockHttpServletRequest();\n httpServletRequest.setParameter(\"submit_approve\", \"submit_approve\");\n\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, REVIEW_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, REVIEW_STEP, REVIEW_ACTION);\n\n executeWorkflowAction(httpServletRequest, workflowUserC, workflow, workflowItem, EDIT_STEP, CLAIM_ACTION);\n assertDeletionOfEperson(workflowUserC, true);\n\n executeWorkflowAction(httpServletRequest, workflowUserD, workflow, workflowItem, EDIT_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserD, workflow, workflowItem, EDIT_STEP, EDIT_ACTION);\n\n\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, FINAL_EDIT_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, FINAL_EDIT_STEP,\n FINAL_EDIT_ACTION);\n\n assertTrue(workflowItem.getItem().isArchived());\n\n }",
"@Test\n public void callToAboutToSubmitHandler_willWriteDraftFinalDecisionToCaseWithGeneratedDateAsNowWhenSubmittedGeneratedDateIsNull() throws Exception {\n setup();\n setJsonAndReplace(\"callback/writeFinalDecisionDescriptor\" + getBenefitType() + \".json\", Arrays.asList(\"START_DATE_PLACEHOLDER\", \" \\\"writeFinalDecisionGeneratedDate\\\" : \\\"GENERATED_DATE\\\",\"), Arrays.asList(\"2018-10-10\", \" \\\"writeFinalDecisionGeneratedDate\\\" : null,\"));\n\n MockHttpServletResponse response = getResponse(getRequestWithAuthHeader(json, \"/ccdAboutToSubmit\"));\n assertHttpStatus(response, HttpStatus.OK);\n PreSubmitCallbackResponse<SscsCaseData> result = deserialize(response.getContentAsString());\n\n assertEquals(Collections.EMPTY_SET, result.getErrors());\n\n assertNull(result.getData().getOutcome());\n\n\n assertNotNull(result.getData().getSscsFinalDecisionCaseData().getWriteFinalDecisionGeneratedDate());\n assertEquals(LocalDate.now().toString(), result.getData().getSscsFinalDecisionCaseData().getWriteFinalDecisionGeneratedDate());\n\n assertEquals(DRAFT_DECISION_NOTICE.getValue(), result.getData().getSscsDocument().get(0).getValue().getDocumentType());\n assertEquals(LocalDate.now().toString(), result.getData().getSscsDocument().get(0).getValue().getDocumentDateAdded());\n assertEquals(\"Draft Decision Notice generated on \" + LocalDate.now().format(DateTimeFormatter.ofPattern(\"dd-MM-YYYY\")) + \".pdf\", result.getData().getSscsDocument().get(0).getValue().getDocumentFileName());\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n SingleWorkflowResponse getWorkflowResponse = stub.getWorkflow(\n GetWorkflowRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setWorkflowId(WORKFLOW_ID)\n .build()\n );\n\n if (getWorkflowResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Get workflow failed, status: \" + getWorkflowResponse.getStatus());\n }\n\n Workflow workflow = getWorkflowResponse.getWorkflow();\n\n System.out.println(\"The workflow consists of these models:\");\n for (WorkflowNode workflowNode: workflow.getNodesList()) {\n Model model = workflowNode.getModel();\n System.out.println(model.getId());\n }\n\n }",
"public void updateCSOfChangeObject(Context context, String strProgProjId, String strChangeObjectID) throws Exception {\n logger.debug(\"PSS_enoECMChangeRequest : updateCSOfChangeObject : START\");\n try {\n if (UIUtil.isNotNullAndNotEmpty(strProgProjId) && UIUtil.isNotNullAndNotEmpty(strChangeObjectID)) {\n BusinessObject busProgProjObj = new BusinessObject(strProgProjId);\n User usrProgProjProjectName = busProgProjObj.getProjectOwner(context);\n String strProgProjProjectName = usrProgProjProjectName.toString();\n BusinessObject busChangeObj = new BusinessObject(strChangeObjectID);\n User usrChangeProjectName = busChangeObj.getProjectOwner(context);\n String strChangeObjectProjectName = usrChangeProjectName.toString();\n if (!strProgProjProjectName.equalsIgnoreCase(strChangeObjectProjectName)) {\n MqlUtil.mqlCommand(context, \"history off\", true, false);\n boolean isContextPushed = false;\n ContextUtil.pushContext(context, PropertyUtil.getSchemaProperty(context, TigerConstants.PERSON_USER_AGENT), DomainConstants.EMPTY_STRING, DomainConstants.EMPTY_STRING);\n isContextPushed = true;\n busChangeObj.open(context);\n busChangeObj.setProjectOwner(context, strProgProjProjectName);\n busChangeObj.update(context);\n busChangeObj.close(context);\n if (isContextPushed) {\n ContextUtil.popContext(context);\n isContextPushed = false;\n }\n MqlUtil.mqlCommand(context, \"history on\", true, false);\n\n String strMqlHistory = \"modify bus $1 add history $2 comment $3\";\n\n StringBuffer sbInfo = new StringBuffer();\n sbInfo.append(\"project: \");\n sbInfo.append(strProgProjProjectName);\n\n MqlUtil.mqlCommand(context, strMqlHistory, strChangeObjectID, \"change\", sbInfo.toString() + \" was \" + strChangeObjectProjectName);\n\n }\n }\n logger.debug(\"PSS_enoECMChangeRequest : updateCSOfChangeObject : END\");\n } catch (Exception ex) {\n logger.error(\"Error in PSS_enoECMChangeRequest : updateCSOfChangeObject : ERROR \", ex);\n throw ex;\n }\n }",
"@Test\n public void testDeleteUserWhenMultipleUser4() throws Exception {\n /*\n * This test has the following setup:\n * - Step 1: user B and D\n * - Step 2: user C and D\n * - Step 3: user B and D\n *\n * This test will perform the following checks:\n * - create a workspace item, and let it move to step 1\n * - claim it by user B, but don’t approve it\n * - delete user B\n * - verify the delete succeeds\n * - Verify user D can now claim and approve it\n * - verify that the item moved to step 2\n * - Approve it by user C\n * - verify that the item moved to step 3\n * - Approve it by user D\n * - verify that the item is archived\n */\n context.turnOffAuthorisationSystem();\n\n Community parent = CommunityBuilder.createCommunity(context).build();\n Collection collection = CollectionBuilder.createCollection(context, parent)\n .withWorkflowGroup(1, workflowUserB, workflowUserD)\n .withWorkflowGroup(2, workflowUserC, workflowUserD)\n .withWorkflowGroup(3, workflowUserB, workflowUserD)\n .build();\n\n WorkspaceItem wsi = WorkspaceItemBuilder.createWorkspaceItem(context, collection)\n .withSubmitter(workflowUserA)\n .withTitle(\"Test item full workflow\")\n .withIssueDate(\"2019-03-06\")\n .withSubject(\"ExtraEntry\")\n .build();\n\n Workflow workflow = XmlWorkflowServiceFactory.getInstance().getWorkflowFactory().getWorkflow(collection);\n\n XmlWorkflowItem workflowItem = xmlWorkflowService.startWithoutNotify(context, wsi);\n MockHttpServletRequest httpServletRequest = new MockHttpServletRequest();\n httpServletRequest.setParameter(\"submit_approve\", \"submit_approve\");\n\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, REVIEW_STEP, CLAIM_ACTION);\n\n assertDeletionOfEperson(workflowUserB, true);\n\n executeWorkflowAction(httpServletRequest, workflowUserD, workflow, workflowItem, REVIEW_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserD, workflow, workflowItem, REVIEW_STEP, REVIEW_ACTION);\n\n executeWorkflowAction(httpServletRequest, workflowUserC, workflow, workflowItem, EDIT_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserC, workflow, workflowItem, EDIT_STEP, EDIT_ACTION);\n\n\n executeWorkflowAction(httpServletRequest, workflowUserD, workflow, workflowItem, FINAL_EDIT_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserD, workflow, workflowItem, FINAL_EDIT_STEP,\n FINAL_EDIT_ACTION);\n\n assertTrue(workflowItem.getItem().isArchived());\n\n }",
"@Override\r\n\tpublic void updateSprintStatus(String card_id, String box_id, String user) {\n\t\t\r\n\t}",
"@Test\n public void testDeleteUserWhenMultipleUser1() throws Exception {\n /*\n * This test has the following setup:\n * - Step 1: user B and D\n * - Step 2: user C and D\n * - Step 3: user B and D\n *\n * This test will perform the following checks:\n * - create a workspace item, and let it move to step 1\n * - approve it by user B\n * - verify that the item moved to step 2\n * - Approve it by user C\n * - delete user B\n * - verify the delete succeeds\n * - Approve it by user D\n * - verify that the item is archived\n */\n context.turnOffAuthorisationSystem();\n\n Community parent = CommunityBuilder.createCommunity(context).build();\n Collection collection = CollectionBuilder.createCollection(context, parent)\n .withWorkflowGroup(1, workflowUserB, workflowUserD)\n .withWorkflowGroup(2, workflowUserC, workflowUserD)\n .withWorkflowGroup(3, workflowUserB, workflowUserD)\n .build();\n\n WorkspaceItem wsi = WorkspaceItemBuilder.createWorkspaceItem(context, collection)\n .withSubmitter(workflowUserA)\n .withTitle(\"Test item full workflow\")\n .withIssueDate(\"2019-03-06\")\n .withSubject(\"ExtraEntry\")\n .build();\n\n Workflow workflow = XmlWorkflowServiceFactory.getInstance().getWorkflowFactory().getWorkflow(collection);\n\n XmlWorkflowItem workflowItem = xmlWorkflowService.startWithoutNotify(context, wsi);\n MockHttpServletRequest httpServletRequest = new MockHttpServletRequest();\n httpServletRequest.setParameter(\"submit_approve\", \"submit_approve\");\n\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, REVIEW_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, REVIEW_STEP, REVIEW_ACTION);\n\n executeWorkflowAction(httpServletRequest, workflowUserC, workflow, workflowItem, EDIT_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserC, workflow, workflowItem, EDIT_STEP, EDIT_ACTION);\n\n assertDeletionOfEperson(workflowUserB, true);\n\n executeWorkflowAction(httpServletRequest, workflowUserD, workflow, workflowItem, FINAL_EDIT_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserD, workflow, workflowItem, FINAL_EDIT_STEP,\n FINAL_EDIT_ACTION);\n\n assertTrue(workflowItem.getItem().isArchived());\n\n }",
"@Test\n\tpublic void FRAN_5594_Verify_user_able_to_comment_the_post() throws Exception {\n\t\tArrayList<ContentData> listReview = everContentAPI.getEverContent();\n\t\tContentData selectedContent = listReview.get(0);\n\t\tString postBody = selectedContent.getPostBody();\n\t\tselectedContent = everContentAPI.getContentDetail(selectedContent.getContentKey());\n\t\tint beforeCommentCount = selectedContent.getCommentCount();\n\t\t\t\t\n\t\t\t\t\n\t\tloginPage = new LoginWithUsernamePage(driver);\n\t\tloginPage.doLoginProcess(Constant.ACCOUNT_EMAIL_1, Constant.ACCOUNT_PASSWORD_1);\n\t\thomePage = new HomePage(driver);\n\t\tassertTrue(homePage.isActive(), \"User is not in Homepage\", \"You're in Home page\");\n\n\t\tdriver.sleep(5);\n\t\treviewDetailPage = homePage.selectReviewNearYouByIndex(1);\n\t\tassertTrue(reviewDetailPage.isActive(), \"Review detail screen is not displayed\",\n\t\t\t\t\"Review detail screen is displayed\");\n\n\t\tString currentReviewBusinessName = reviewDetailPage.getBusinessName();\n\t\tString currentReviewDescription = reviewDetailPage.getReviewDescription();\n\n\t\tassertEquals(currentReviewBusinessName, selectedContent.getCorporateGroup().getDisplayName(),\n\t\t\t\t\"Business name of current review is displayed incorrectly\",\n\t\t\t\t\"Business name of current review is displayed correctly\");\n\t\tassertEquals(currentReviewDescription, postBody,\n\t\t\t\t\"Review description of current review is displayed incorrectly\",\n\t\t\t\t\"Review description of current review is displayed correctly\");\n\n\t\treviewCommentPage = reviewDetailPage.clickCommentReview();\n\t\t\n\t\tassertTrue(reviewCommentPage.isActive(), \"Comment screen is not displayed\",\n\t\t\t\t\"Comment screen is displayed\");\n\t\t\n\t\t//post a comment and verify new comment displayed\n\t\tString commentString = \"test comment : \" + Common.randomAlphaNumeric(10);\n\t\treviewCommentPage.postComment(commentString);\n\t\tassertTrue(reviewCommentPage.isNewCommentAdded(commentString), \"Cannot find new comment in screen\",\n\t\t\t\t\"New comment is displayed\");\n\t\t\n\t\t//get content again from API\n\t\tselectedContent = everContentAPI.getContentDetail(selectedContent.getContentKey());\n\t\tassertEquals(selectedContent.getCommentCount(),beforeCommentCount + 1,\"API verification: Comment count is not increased\",\"API verification: Comment count is increased correctly\");\n\t\t\n\t}",
"@Override\n\tpublic String approveLeaveByLeaveRequestIdTemp(String leaveRequestId, String leaveApproveReason,\n\t\t\tString changeLeaveType,final float mpcl,final float mpel,final float mplwp) {\n\t\t//String moveRowIntoHistory=\"INSERT INTO emp_leave_history select * from emp_leave_requests_tbl where requestId = '\"+leaveRequestId+\"'\";\n\t\t//super.getJdbcTemplate().execute(moveRowIntoHistory);\n\t\t//String deleteRowByEmpid=\"delete from emp_leave_requests_tbl where requestId='\"+leaveRequestId+\"'\";\n\t\t//super.getJdbcTemplate().execute(deleteRowByEmpid);\n\t\t//String squery =\"select lh.empid,lh.leaveType,lh.leaveCategory,lh.totalDays,lh.lwpDays,lh.lwp,lh.inAccount,lh.leaveDays from emp_leave_history as lh where lh.requestId=?\";\n\t\tString squery =\"select lh.empid,lh.leaveType,lh.leaveCategory,lh.totalDays,lh.lwpDays,lh.lwp,lh.cel,lh.ccl,lh.inAccount,lh.leaveDays,lh.leaveDates from emp_leave_requests_tbl as lh where lh.requestId=?\";\n\t FaculityLeaveMasterEntity faculityLeaveMasterEntity = super.getJdbcTemplate().queryForObject(squery,new Object[] {leaveRequestId},new BeanPropertyRowMapper<FaculityLeaveMasterEntity>(FaculityLeaveMasterEntity.class));\n\t\t\n\t List<String> leaveTypes=new ArrayList<String>();\n\t leaveTypes.add(\"CL\");\n\t leaveTypes.add(\"EL\");\n\t leaveTypes.add(\"LWP\");\n\t \n\t\tif(!BASApplicationConstants.NO_CHANGE.equalsIgnoreCase(changeLeaveType) && !leaveTypes.contains(faculityLeaveMasterEntity.getLeaveType()) && mplwp>0) {\n\t\t\tString leaveDates=faculityLeaveMasterEntity.getLeaveDates();\t\n\t\t\tList<String> dateTokensList=new ArrayList<String>();\n\t\t\tsetComputedDatesForLeaveTypes(leaveDates, faculityLeaveMasterEntity.getTotalDays(), mplwp, dateTokensList);\n\t\t\tString updateLeaveComputatedDates=\"update emp_leave_requests_tbl set ccl=?,leaveDays=?,lwp=?,lwpDays=? where requestId='\"+leaveRequestId+\"'\";\n\t\t\tObject[] pdata=new Object[]{mpcl,dateTokensList.get(0),mplwp,dateTokensList.get(1)};\n\t\t\tsuper.getJdbcTemplate().update(updateLeaveComputatedDates,pdata);\n\t\t}\n\t\telse if(!BASApplicationConstants.NO_CHANGE.equalsIgnoreCase(changeLeaveType)) {\n\t\t\t LeaveBalanceEntity leaveBalanceEntity=findLeaveCurrentLeaveBalanceByEmpId(faculityLeaveMasterEntity.getEmpid()+\"\");\n\t\t\t\t//finding total leaves applied and checking whether mcl is less than available cls\n\t\t\t\tfloat totalAvailableCls=leaveBalanceEntity.getCl();\n\t\t\t\tString totalClLeavesDays=faculityLeaveMasterEntity.getLeaveDays();\n\t\t\t\tint totalClLeavesCountDays=0;\n\t\t\t\tif(totalClLeavesDays!=null && totalClLeavesDays.length()>0) {\n\t\t\t\t\tString totalDaysTokens[]=totalClLeavesDays.split(\",\");\n\t\t\t\t\ttotalClLeavesCountDays=totalDaysTokens.length;\n\t\t\t\t\t\tfor(String str:totalDaysTokens) {\n\t\t\t\t\t\t\tfloat cp=Float.parseFloat(str.substring(str.indexOf(\"(\")+1,str.indexOf(\")\")));\n\t\t\t\t\t\t\ttotalAvailableCls=totalAvailableCls+cp;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//if modified cl is less than available CL of the employee\n\t\t\t\t//04(1),05(0.75),\n\t\t\t\tString totalDbClDays=\"\";\n\t\t\t\tif(mpcl<totalAvailableCls) {\n\t\t\t\t\t //float remainingCl=totalAvailableCls -mpcl; //1.75 ->>.25\n\t\t\t\t\t String totalDaysTokens[]=totalClLeavesDays.split(\",\");\n\t\t\t\t\t if(totalClLeavesCountDays==1) {\n\t\t\t\t\t\t \t//current computated cl into applied leaves request tables\n\t\t\t\t\t\t \tfloat ccl=Float.parseFloat(totalDaysTokens[0].substring(totalDaysTokens[0].indexOf(\"(\")+1,totalDaysTokens[0].indexOf(\")\")));\n\t\t\t\t\t\t \tif((ccl-mpcl) >0) {\n\t\t\t\t\t\t \t\t totalDbClDays=totalDaysTokens[0].substring(0,2)+\"(\"+(ccl-mpcl)+\")\";\n\t\t\t\t\t\t \t}\n\t\t\t\t\t }else{\n\t\t\t\t\t\t int mpclcount=(int) Math.ceil(mpcl);\n\t\t\t\t\t\t float tmpcl=mpcl;\n\t\t\t\t\t\t for(int i=0;i<mpclcount;i++) {\n\t\t\t\t\t\t \t if(tmpcl>=1) {\n\t\t\t\t\t\t \t\t totalDbClDays=totalDbClDays+\",\"+totalDaysTokens[i]; \n\t\t\t\t\t\t \t }\t \n\t\t\t\t\t\t \t else {\n\t\t\t\t\t\t \t\t totalDbClDays=totalDbClDays+\",\"+ totalDaysTokens[i].substring(0, 2)+\"(\"+tmpcl+\")\"; \n\t\t\t\t\t\t \t }\t\t \n\t\t\t\t\t\t \t tmpcl=tmpcl-1;\n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t} //end of CL computation\n\t\t\t\t\n\t\t\t\t//compute total leaves dd from dates\n\t\t\t\t//2016-07-04,2016-07-05,2016-07-06\n\t\t\t\tString leaveDates=faculityLeaveMasterEntity.getLeaveDates();\n\t\t\t\tString ddDates=\"\";\n\t\t\t\tString leaveDatesTokens[]=leaveDates.split(\",\");\n\t\t\t\tfor(String dddate:leaveDatesTokens) {\n\t\t\t\t\t\tString dddateTokens[]=dddate.split(\"-\");\n\t\t\t\t\t\tString dd=dddateTokens[2];\n\t\t\t\t\t\tddDates=ddDates+dd+\",\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Case 1 when all CL ,EL,LWP is not zero\n\t\t\t\tif(mpcl>0 && mpel>0 && mplwp>0) {\n\t\t\t\t\t\t\t\tString cldates=ddDates+\"-> (\"+mpcl+\")\";\n\t\t\t\t\t\t\t\tString eldates=ddDates+\"-> (\"+mpel+\")\";\n\t\t\t\t\t\t\t\tString lwpdates=ddDates+\"-> (\"+mplwp+\")\";\n\t\t\t\t\t\t\t\tString updateLeaveComputatedDates=\"update emp_leave_requests_tbl set ccl=?,leaveDays=?,lwp=?,lwpDays=?,cel=?,elDays=? where requestId='\"+leaveRequestId+\"'\";\n\t\t\t\t\t\t\t\tObject[] pdata=new Object[]{mpcl,cldates,mplwp,lwpdates,mpel,eldates};\n\t\t\t\t\t\t\t\tsuper.getJdbcTemplate().update(updateLeaveComputatedDates,pdata);\n\t\t\t\t}else if(mpcl>0 && mplwp>0 && mpel==0) {\n\t\t\t\t\t\tList<String> dateTokensList=new ArrayList<String>();\n\t\t\t\t\t\tsetComputedDatesForLeaveTypes(leaveDates, faculityLeaveMasterEntity.getTotalDays(), mplwp, dateTokensList);\n\t\t\t\t\t\tString updateLeaveComputatedDates=\"update emp_leave_requests_tbl set ccl=?,leaveDays=?,lwp=?,lwpDays=?,cel=?,elDays=? where requestId='\"+leaveRequestId+\"'\";\n\t\t\t\t\t\tObject[] pdata=new Object[]{mpcl,dateTokensList.get(0),mplwp,dateTokensList.get(1),0,\"\"};\n\t\t\t\t\t\tsuper.getJdbcTemplate().update(updateLeaveComputatedDates,pdata);\n\t\t\t\t}else if(mpcl>0 && mpel>0 && mplwp==0) {\n\t\t\t\t\tList<String> dateTokensList=new ArrayList<String>();\n\t\t\t\t\tsetComputedDatesForLeaveTypes(leaveDates, faculityLeaveMasterEntity.getTotalDays(), mpel, dateTokensList);\n\t\t\t\t\tString updateLeaveComputatedDates=\"update emp_leave_requests_tbl set ccl=?,leaveDays=?,lwp=?,lwpDays=?,cel=?,elDays=? where requestId='\"+leaveRequestId+\"'\";\n\t\t\t\t\tObject[] pdata=new Object[]{mpcl,dateTokensList.get(0),0,\"\",mpel,dateTokensList.get(1)};\n\t\t\t\t\tsuper.getJdbcTemplate().update(updateLeaveComputatedDates,pdata);\n\t\t\t\t}else if(mpcl==0 && mpel>0 && mplwp>0) {\n\t\t\t\t\tList<String> dateTokensList=new ArrayList<String>();\n\t\t\t\t\tsetComputedDatesForLeaveTypes(leaveDates, faculityLeaveMasterEntity.getTotalDays(), mplwp, dateTokensList);\n\t\t\t\t\tString updateLeaveComputatedDates=\"update emp_leave_requests_tbl set ccl=?,leaveDays=?,lwp=?,lwpDays=?,cel=?,elDays=? where requestId='\"+leaveRequestId+\"'\";\n\t\t\t\t\tObject[] pdata=new Object[]{0,\"\",mplwp,dateTokensList.get(1),mpel,dateTokensList.get(0)};\n\t\t\t\t\tsuper.getJdbcTemplate().update(updateLeaveComputatedDates,pdata);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tLeavesModifiedEntity leavesModifiedEntity=findModifiedLeaveByRequestId(leaveRequestId);\n\t\t\t\tfloat clbalanceDiff=leavesModifiedEntity.getCl()-mpcl;\n\t\t\t\tfloat elbalanceDiff=leavesModifiedEntity.getEl()-mpel;\n\t\t\t\tString updateLeaveBalance=\"\";\n\t\t\t\tif(clbalanceDiff>0 && elbalanceDiff>0){\n\t\t\t\t\t updateLeaveBalance=\"update emp_leave_balance set CL=CL+\"+clbalanceDiff+\", EL=EL+\"+elbalanceDiff+\" where empid=\"+faculityLeaveMasterEntity.getEmpid();\n\t\t\t\t}else if(clbalanceDiff<=0 && elbalanceDiff<=0){\n\t\t\t\t\t updateLeaveBalance=\"update emp_leave_balance set CL=CL-\"+clbalanceDiff+\", EL=EL-\"+elbalanceDiff+\" where empid=\"+faculityLeaveMasterEntity.getEmpid();\n\t\t\t\t}else if(clbalanceDiff<=0 && elbalanceDiff>0){\n\t\t\t\t\t updateLeaveBalance=\"update emp_leave_balance set CL=CL-\"+clbalanceDiff+\", EL=EL+\"+elbalanceDiff+\" where empid=\"+faculityLeaveMasterEntity.getEmpid();\n\t\t\t\t} if(clbalanceDiff>0 && elbalanceDiff<=0){\n\t\t\t\t\t updateLeaveBalance=\"update emp_leave_balance set CL=CL+\"+clbalanceDiff+\", EL=EL-\"+elbalanceDiff+\" where empid=\"+faculityLeaveMasterEntity.getEmpid();\n\t\t\t\t}\n\t\t\t\tsuper.getJdbcTemplate().update(updateLeaveBalance);\n\t}\n\t\t\n\t\t//end of no change\n\t\t//Approving the status of Management and moving record from leave_request_tbl into leave_history_tbl\n\t\tapproveLeaveByManagementRequestId(leaveRequestId,leaveApproveReason);\n\t\t//update Leave Balance Table\n\t\t\n\t/*\tString updateLeaveStatus=\"update emp_leave_requests_tbl set description=?,hrApproval=?,dom=? where requestId='\"+leaveRequestId+\"'\";\n\t\tsuper.getJdbcTemplate().update(updateLeaveStatus,new Object[]{leaveApproveReason,LeaveStatus.APPROVED_STATUS,DateUtils.getCurrentTimestatmp()});*/\n\t\treturn BaoConstants.SUCCESS;\n\t}",
"@org.junit.Test\r\n public void testUpdateReview1() throws Exception {\r\n System.out.println(\"updateReview1\");\r\n Long id = new Long(0);\r\n Review review = new Review(new Long(0), \"Max\", 9, \"It's excellent\");\r\n service.insertReview(review);\r\n Review review2 = new Review(new Long(0), \"Jack\", 2, \"Disappointing\");\r\n Review result = service.updateReview(review2, id);\r\n assertEquals(review2, result);\r\n }",
"private void callWebUrlApproval(String recordId, String tabId, String proj,\n\t\t\tString app_title, int i) {\n\t\ttry {\n\t\t\tString server = MyApplication.getServer();\n\t\t\tString encoded = MyApplication.getEncodedUserCred();\n\t\t\tLog.v(\"DATA\", tabId + \"\\n\" + recordId + \"\\n\" + proj + \"\\n\" + server\n\t\t\t\t\t+ \"\\n\" + encoded);\n\n\t\t\tString req_web_url = server\n\t\t\t\t\t+ \"/tmtrack/srcmobile/index.html?form=request&tableid=\"\n\t\t\t\t\t+ tabId + \"&recordid=\" + recordId + \"&projectid=\" + proj\n\t\t\t\t\t+ \"&usrcredentials=\" + encoded + \"&WEBURL=\" + server\n\t\t\t\t\t+ \"&millisec=\" + System.currentTimeMillis() + \"&AUTH_TYPE=\"\n\t\t\t\t\t+ MyApplication.getLoggedInUrlType() + \"&USER_LOGIN=\"\n\t\t\t\t\t+ MyApplication.getUserID() + \"&USER_PWD=\"\n\t\t\t\t\t+ MyApplication.getPassWord();\n\n\t\t\tif (Network_Available.hasConnection(ApproContext)) {\n\n\t\t\t\tif (MyApplication.getLoggedInUrlType()\n\t\t\t\t\t\t.equalsIgnoreCase(\"type1\")) {\n\t\t\t\t\tLog.v(\"type 1\", \"type 1 url........\");\n\n\t\t\t\t}\n\n\t\t\t\telse if (MyApplication.getLoggedInUrlType().equalsIgnoreCase(\n\t\t\t\t\t\t\"type2\")) {\n\t\t\t\t\tLog.v(\"type 2\", \"type 2 url........\");\n\t\t\t\t\tif (!isXlarge) {\n\t\t\t\t\t\tIntent req_go = new Intent(Approval.this,\n\t\t\t\t\t\t\t\tApproval_webview.class);\n\t\t\t\t\t\treq_go.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP\n\t\t\t\t\t\t\t\t| Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY);\n\t\t\t\t\t\treq_go.putExtra(\"finurl\", req_web_url);\n\t\t\t\t\t\treq_go.putExtra(\"title\", app_title);\n\t\t\t\t\t\treq_go.putExtra(\"position\", i);\n\t\t\t\t\t\tMyApplication.setApp_url(req_web_url);\n\t\t\t\t\t\tMyApplication.setApp_title(app_title);\n\t\t\t\t\t\tstartActivity(req_go);\n\t\t\t\t\t\toverridePendingTransition(R.anim.push_right_in,\n\t\t\t\t\t\t\t\tR.anim.push_right_out);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tappApprovalWeb.clearView();\n\t\t\t\t\t\tLoadWebViewUrl(req_web_url, i);\n\t\t\t\t\t}\n\t\t\t\t} else if (MyApplication.getLoggedInUrlType().equalsIgnoreCase(\n\t\t\t\t\t\t\"type3\")) {\n\n\t\t\t\t\tif (MyApplication.getEntryToWebForms()) {\n\n\t\t\t\t\t\tif (!isXlarge) {\n\t\t\t\t\t\t\tIntent req_go = new Intent(Approval.this,\n\t\t\t\t\t\t\t\t\tApproval_webview.class);\n\t\t\t\t\t\t\treq_go.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP\n\t\t\t\t\t\t\t\t\t| Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY);\n\t\t\t\t\t\t\treq_go.putExtra(\"finurl\", req_web_url);\n\n\t\t\t\t\t\t\tint y = 0;\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\ty = MyApplication.getApprovalList().size();\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treq_go.putExtra(\"title\", \"\");\n\t\t\t\t\t\t\tMyApplication.setApp_url(req_web_url);\n\t\t\t\t\t\t\tMyApplication.setApp_title(\"\");\n\n\t\t\t\t\t\t\treq_go.putExtra(\"btnTextA\", \"Approvals(\" + y + \")\");\n\t\t\t\t\t\t\tstartActivity(req_go);\n\t\t\t\t\t\t\toverridePendingTransition(R.anim.push_right_in,\n\t\t\t\t\t\t\t\t\tR.anim.push_right_out);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tappApprovalWeb.clearView();\n\t\t\t\t\t\t\tLoadWebViewUrl(req_web_url, i);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmakediallog(\n\t\t\t\t\t\t\t\t\"info\",\n\t\t\t\t\t\t\t\t\"Your Serena Request Center service is not up to date. Please contact your administrator.\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (disDialog == 0) {\n\t\t\t\t\tdisDialog = 5;\n\t\t\t\t\tmakediallog(\"No network connection\",\n\t\t\t\t\t\t\t\"You must be connected to the internet to use this app\");\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t}",
"@Test\r\n\r\n\tpublic void testUpdateStatus() {\r\n\t\tString status = \"accept\";\r\n\t\twhen(backgroundVerificationAndLeaseAdminRepository.findByEmail(\"[email protected]\"))\r\n\t\t\t\t.thenReturn(backgroundverification1);\r\n\t\twhen(backgroundVerificationAndLeaseAdminRepository.save(backgroundverification1))\r\n\t\t\t\t.thenReturn(backgroundverification1);\r\n\t\tBackgroundverification backgroundverification = backgroundVerificationAndLeaseAdmnServiceImpl\r\n\t\t\t\t.updateStatus(\"[email protected]\", status);\r\n\t\tassertEquals(\"accept\", backgroundverification.getApp_bgc_status());\r\n\r\n\t}",
"@Then(\"user clicks on edit consignment\")\r\n\tpublic void user_clicks_on_edit_consignment() {\n\t\tWebElement element = Browser.session.findElement(By.xpath(\"//*[@id='consignments-rows']//button[1]\"));\r\n\t\telement.click();\r\n\t\telement = Browser.session.findElement(By.xpath(\"//a[text()='Edit consignment info']\"));\r\n\t\telement.click();\r\n\t}",
"@Test\n public void updateWorkflow_400() throws Exception {\n\n // PREPARE THE DATABASE\n // Fill in the workflow db\n addMOToDb(1);\n addMOToDb(2);\n addMOToDb(3);\n\n // PREPARE THE TEST\n String badId = \"bad_id\";\n Workflow mo = new Workflow();\n mo.setName(\"New My_Workflow\");\n mo.setDescription(\"New Description of my new workflow\");\n mo.setRaw(\"New Workflow new content\");\n\n // DO THE TEST\n Response response = callAPI(VERB.PUT, \"/mo/\" + badId, mo);\n\n // CHECK RESULTS\n int status = response.getStatus();\n assertEquals(400, status);\n\n String body = response.readEntity(String.class);\n assertEquals(\"\", body);\n }",
"public ApiResponse updateStatus(List<Df00201VO> list){\n List<DfDegree> dfList = ModelMapperUtils.mapList(list,DfDegree.class);\n DfDegree orgItem = null;\n int index = 0;\n String changeStatus = \"\";\n for (DfDegree item : dfList) {\n changeStatus = list.get(index).getChangeStatus() == \"\" ? \"Draft\" : list.get(index).getChangeStatus();\n orgItem = repository.findOne(item.getId());\n item.setStatusUuid(CommonCodeUtils.getCodeDetailUuid(\"CD115\",changeStatus));\n item.setInsertDate(orgItem.getInsertDate());\n item.setInsertUuid(orgItem.getInsertUuid());\n if(changeStatus.equals(\"Draft\")){\n item.setTerminatorUuid(\"\");\n item.setEndDate(null);\n item.setEndYn(\"N\");\n }\n repository.save(item);\n index++;\n }\n return ApiResponse.of(ApiStatus.SUCCESS, \"SUCCESS\");\n }",
"protected void updateCaseWithNewStatus(NbaDst caseDst,NbaDst tranDst) throws NbaBaseException { //NBLXA -1983\n \ttry {\n \t\tif (NbaConstants.A_QUEUE_UNDERWRITER_HOLD.equals(caseDst.getQueue())) {\n \t\t\t//Start NBLXA -1983\n \t\t\t/* Reinsurance Responses are bundled unless and until all the responses are received on the case. But if response for additional info is received case route to UW */\n \t\t\tboolean isFinalReplRecieve= true; \n \t\t\tif(((!NbaUtils.isBlankOrNull(tranDst.getNbaLob().hasAdditionalInfo()) && (!tranDst.getNbaLob().getAdditionalInfo()) ) ||\n \t\t\t\t\tNbaUtils.isBlankOrNull(tranDst.getNbaLob().hasAdditionalInfo()))){\n \t\t\t\tsetNbaTxLife(doHoldingInquiry(caseDst));\n \t\t\t\tif(!NbaUtils.isBlankOrNull(getNbaTxLife())){\n \t\t\t\t\tLong appType=getNbaTxLife().getPolicy().getApplicationInfo().getApplicationType();\n \t\t\t\t\tApplicationInfo appInfo = getNbaTxLife().getPolicy().getApplicationInfo();\n \t\t\t\t\tApplicationInfoExtension appInfoExt = NbaUtils.getFirstApplicationInfoExtension(appInfo);\n \t\t\t\t\tif( NbaOliConstants.OLI_ACTTYPE_1000500003 !=appType && NbaOliConstants.OLI_APPTYPE_SIMPLIFIEDISSUE !=appType \n \t\t\t\t\t\t\t&& (!NbaUtils.isBlankOrNull(appInfoExt) && !NbaUtils.isContractChange(getNbaTxLife()) && NbaUtils.isBlankOrNull(appInfoExt.getReopenDate()))){\n \t\t\t\t\t\tNbaDst parentCase = retrieveParentWork(tranDst, true,true);\n \t\t\t\t\t\tList transactions = parentCase.getNbaTransactions();\n \t\t\t\t\t\tNbaTransaction transaction = null; \t\t\n \t\t\t\t\t\tfor (int i = 0; i < transactions.size(); i++) {\n \t\t\t\t\t\t\ttransaction = (NbaTransaction) transactions.get(i);\n \t\t\t\t\t\t\tif (!tranDst.getID().equalsIgnoreCase( transaction.getID()) && NbaConstants.A_WT_REINSURANCE.equals(transaction.getWorkType()) && !transaction.isInEndQueue()) {\n \t\t\t\t\t\t\t\tisFinalReplRecieve =false;\n \t\t\t\t\t\t\t\tbreak;\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t\tif(isFinalReplRecieve){\n \t\t\t\t//End NBLXA -1983\n \t\t\t\tupdateCaseStatus(caseDst);\n \t\t\t}\n \t\t\t//NBA208-32\n \t\t\tcaseDst.getCase().getWorkItemChildren().clear(); //clear child transaction\n \t\t\tcaseDst.setUpdate();\n \t\t}\n \t}catch (NbaBaseException e) {\n \t\tif (e.isFatal()) {\n \t\t\tthrow e;\n \t\t}\n \t\tgetLogger().logException(e);\n \t\tthrow new NbaBaseException(\"Unable to retrieve new status for case work item, reason: \" + e.getMessage(), e);\n \t}\n }",
"@Test\r\n\tpublic void testPendingInterviewList() throws Exception {\r\n\t\tList<Candidate> candidateList = new ArrayList<Candidate>();\r\n\t\tCandidate candidate = getCandidateObj();\r\n\t\tcandidate.setInterview(getInterview());\r\n\t\tcandidateList.add(candidate);\r\n\r\n\t\tList<ShowCandidateDTO> showCandidateList = new ArrayList<ShowCandidateDTO>();\r\n\t\tshowCandidateList.add(getShowCandidateDTO());\r\n\r\n\t\twhen(candidateRepository.candidatePendingInterviewApproval(anyLong())).thenReturn(candidateList);\r\n\t\twhen(interviewerService.pendingInterviewApprovalList(anyLong())).thenReturn(showCandidateList);\r\n\r\n\t\tmockMvc.perform(MockMvcRequestBuilders.get(\"/getpenddingapproval/1\"))\r\n\t\t\t\t.andExpect(MockMvcResultMatchers.status().isOk());\r\n\t}",
"protected void retirePreviousAuthorizations() {\n List<Document> relatedDocs = getTravelDocumentService().getDocumentsRelatedTo(this, TravelDocTypes.TRAVEL_AUTHORIZATION_DOCUMENT,\n TravelDocTypes.TRAVEL_AUTHORIZATION_AMEND_DOCUMENT);\n\n //updating the related's document appDocStatus to be retired\n final DocumentAttributeIndexingQueue documentAttributeIndexingQueue = KewApiServiceLocator.getDocumentAttributeIndexingQueue();\n try {\n for (Document document : relatedDocs){\n if (!document.getDocumentNumber().equals(this.getDocumentNumber())) {\n ((TravelAuthorizationDocument) document).updateAndSaveAppDocStatus(TravelAuthorizationStatusCodeKeys.RETIRED_VERSION);\n documentAttributeIndexingQueue.indexDocument(document.getDocumentNumber());\n }\n }\n }\n catch (WorkflowException we) {\n throw new RuntimeException(\"Workflow document exception while updating related documents\", we);\n }\n }",
"@Test(dependsOnMethods = \"testCreate\")\n\tpublic void testApprove() throws Exception{\n\t\tString url = getProperty(BT_REST_URL)+BOOSTBLOCK_APPROVE+\"/\";\n\t\tlog.info(\"approve boostandblock resturi = \"+url);\n\t\tfor (Integer boostBlockId : getBoostAndBlocksMap().keySet()) {\n\t\t\tHttpEntity<Integer> entity = new HttpEntity<Integer>(getHeaders());\n\t\t\tResponseEntity<String> response = getRestTemplate().exchange(url+boostBlockId, HttpMethod.PUT, entity, String.class);\n\t\t\tassertNotNull(response);\n\t\t\tString boostResponseString = response.getBody();\n\t\t\tlog.info(\"approve boost response = \"+boostResponseString);\n\t\t\tJSONObject boostResponse = new JSONObject(boostResponseString);\n\t\t\tassertTrue(boostResponse.has(\"data\"));\n\t\t\tJSONObject data = (JSONObject)boostResponse.get(\"data\");\n\t\t\tassertTrue(data.has(\"status\"));\n\t\t\tString status = (String)data.get(\"status\");\n\t\t\tlog.info(\"approve boost status = \"+boostBlockId+\" status = \"+status);\n\t\t\tassertNotNull(status);\n\t\t\tassertEquals(status,\"Approved\");\n\t\t}\n\t}",
"@Override\n public void execute(DelegateExecution delegateExecution) throws Exception {\n JsonValue candidate = delegateExecution.getVariableTyped(\"new_candidate\");\n Integer candidate_id = (Integer) delegateExecution.getVariable(\"candidate_id\");\n\n // Convert birthdate\n String s_birth_date = candidate.getValue().prop(\"birth_date\").stringValue();\n java.util.Date util_birth_date = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\").parse(s_birth_date);\n java.sql.Date birth_date = new java.sql.Date(util_birth_date.getTime());\n\n // Prepare Update Statement\n String candidate_update =\n \"UPDATE Candidate SET \" +\n //\"first_name = \\'\" + candidate.getValue().prop(\"first_name\").stringValue() + \"\\', \" +\n //\"last_name = \\'\" + candidate.getValue().prop(\"last_name\").stringValue() + \"\\', \" +\n \"sex = \\'\" + candidate.getValue().prop(\"sex\").stringValue() + \"\\', \" +\n \"email = \\'\" + candidate.getValue().prop(\"email\").stringValue() + \"\\', \" +\n \"title = \\'\" + candidate.getValue().prop(\"title\").stringValue() + \"\\', \" +\n \"address = \\'\" + candidate.getValue().prop(\"address\").stringValue() + \"\\' \" +\n //\"birth_date = \\'\" + birth_date + \"\\' \" +\n \"WHERE candidate_id = \" + candidate_id;\n\n Connection con = DriverManager.getConnection(\"jdbc:h2:./camunda-db\", \"sa\", \"sa\");\n PreparedStatement statement = con.prepareStatement(candidate_update);\n Integer index = statement.executeUpdate();\n\n // Index = Updated PK id\n System.out.println(index);\n\n // insert new application to db\n String application_insert = \"INSERT INTO Application ( CA_AP_FK, FK_job_Opening_Id) VALUES (?,?)\";\n PreparedStatement statement_application = con.prepareStatement(application_insert, Statement.RETURN_GENERATED_KEYS);\n statement_application.setInt(1, candidate_id);\n statement_application.setInt(2, (Integer) delegateExecution.getVariable(\"openingId\"));\n statement_application.executeUpdate();\n ResultSet rs_application = statement_application.getGeneratedKeys();\n\n if (rs_application.next()){\n // set process variable required for next step\n delegateExecution.setVariable(\"applications_received\", true);\n delegateExecution.setVariable(\"candidate_email\", \"[email protected]\");\n delegateExecution.setVariable(\"candidate_confirmation_text\", \"hello this is a test\");\n\n // add application to collection\n String application = \"{\\\"application_id\\\" : \\\"\" + rs_application.getInt(1) + \"\\\",\"\n + \"\\\"candidate_id\\\" : \\\"\" + candidate_id + \"\\\",\"\n + \"\\\"first_name\\\" : \\\"\" + candidate.getValue().prop(\"first_name\").stringValue() + \"\\\",\"\n + \"\\\"last_name\\\" : \\\"\" + candidate.getValue().prop(\"last_name\").stringValue() + \"\\\",\"\n + \"\\\"cv\\\" : \\\"\" + \"cv link\" + \"\\\"\"\n + \"}\";\n\n System.out.println(application);\n SpinJsonNode application_json = JSON(application);\n\n JsonValueImpl collApplication = (JsonValueImpl) delegateExecution.getVariableTyped(\"collectedApplications\");\n\n SpinJsonNode application_collection = JSON(collApplication.getValueSerialized());\n\n if (!application_collection.hasProp(\"applications\")){\n application_collection.prop(\"applications\", application_json);\n }\n else{\n application_collection.prop(\"applications\").append(application_json);\n }\n delegateExecution.setVariable(\"collectedApplications\", application_collection);\n }\n else {\n //error\n }\n }",
"@Override\n public void onResponse(final Transaction transaction, final String requestId, final PoyntError poyntError) throws RemoteException {\n AdjustTransactionRequest adjustTransactionRequest = new AdjustTransactionRequest();\n adjustTransactionRequest.setEmvData(emvData1);\n\n final ElavonTransactionRequest request = convergeMapper.getTransactionUpdateRequest(\n transaction.getFundingSource().getEntryDetails(),\n transaction.getProcessorResponse().getRetrievalRefNum(),\n adjustTransactionRequest);\n convergeService.update(request, new ConvergeCallback<ElavonTransactionResponse>() {\n @Override\n public void onResponse(final ElavonTransactionResponse elavonResponse) {\n if (elavonResponse.isSuccess()) {\n Log.d(TAG, \"Successfully Captured EMV Data for: \" + transaction.getId());\n } else {\n Log.e(TAG, \"Failed to capture EMV Data for: \" + transaction.getId());\n }\n }\n\n @Override\n public void onFailure(final Throwable t) {\n Log.e(TAG, \"Failed to capture EMV Data for: \" + transaction.getId());\n }\n });\n }",
"private void upgradeToDataApprovalWorkflows()\r\n {\r\n if ( executeSql( \"update dataset set approvedata = approvedata where datasetid < 0\" ) < 0 )\r\n {\r\n return; // Already converted because dataset.approvedata no longer exists.\r\n }\r\n\r\n executeSql( \"insert into dataapprovalworkflow ( workflowid, uid, created, lastupdated, name, periodtypeid, userid, publicaccess ) \"\r\n + \"select \" + statementBuilder.getAutoIncrementValue() + \", \" + statementBuilder.getUid() + \", now(), now(), ds.name, ds.periodtypeid, ds.userid, ds.publicaccess \"\r\n + \"from (select datasetid from dataset where approvedata = true union select distinct datasetid from dataapproval) as a \"\r\n + \"join dataset ds on ds.datasetid = a.datasetid\" );\r\n\r\n executeSql( \"insert into dataapprovalworkflowlevels (workflowid, dataapprovallevelid) \"\r\n + \"select w.workflowid, l.dataapprovallevelid from dataapprovalworkflow w \"\r\n + \"cross join dataapprovallevel l\" );\r\n\r\n executeSql( \"update dataset set workflowid = ( select w.workflowid from dataapprovalworkflow w where w.name = dataset.name)\" );\r\n executeSql( \"alter table dataset drop column approvedata cascade\" ); // Cascade to SQL Views, if any.\r\n\r\n executeSql( \"update dataapproval set workflowid = ( select ds.workflowid from dataset ds where ds.datasetid = dataapproval.datasetid)\" );\r\n executeSql( \"alter table dataapproval drop constraint dataapproval_unique_key\" );\r\n executeSql( \"alter table dataapproval drop column datasetid cascade\" ); // Cascade to SQL Views, if any.\r\n\r\n log.info( \"Added any workflows needed for approvble datasets and/or approved data.\" );\r\n }",
"public void run()\n\t\t\t{\n\t\t\t\tlong waitTime = 25;\n\t\t\t\t\n\t\t\t\tfor (int i = 0; i < 5; i++)\n\t\t\t\t{\n\t\t\t\t\tboolean auditSucceeded = false;\n\t\t\t\t\t\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tauditSucceeded = doAuditStellentUpdate(userId, gfid, recordId, updateKind);\n\t\t\t\t\t} catch (SQLException e)\n\t\t\t\t\t{\n\t\t\t\t\t\tauditSucceeded = false;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (auditSucceeded)\n\t\t\t\t\t\treturn;\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//Wait progressively longer, up to three times...\n\t\t\t\t\t\t\tThread.sleep(waitTime);\n\t\t\t\t\t\t\twaitTime = 2*waitTime;\n\t\t\t\t\t\t} catch(InterruptedException ie)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//do nothing... just continue...\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\n\t\t\t}",
"@Test\n public void callToAboutToSubmitHandler_willWriteDraftFinalDecisionToCaseWithGeneratedDateAsNowWhenSubmittedGeneratedDateIsSet() throws Exception {\n setup();\n setJsonAndReplace(\"callback/writeFinalDecisionDescriptor\" + getBenefitType() + \".json\", Arrays.asList(\"START_DATE_PLACEHOLDER\", \"GENERATED_DATE\"), Arrays.asList(\"2018-10-10\", \"2018-10-12\"));\n\n MockHttpServletResponse response = getResponse(getRequestWithAuthHeader(json, \"/ccdAboutToSubmit\"));\n assertHttpStatus(response, HttpStatus.OK);\n PreSubmitCallbackResponse<SscsCaseData> result = deserialize(response.getContentAsString());\n\n assertEquals(Collections.EMPTY_SET, result.getErrors());\n\n assertNull(result.getData().getOutcome());\n\n\n assertNotNull(result.getData().getSscsFinalDecisionCaseData().getWriteFinalDecisionGeneratedDate());\n\n assertEquals(LocalDate.now().toString(), result.getData().getSscsFinalDecisionCaseData().getWriteFinalDecisionGeneratedDate());\n\n assertEquals(DRAFT_DECISION_NOTICE.getValue(), result.getData().getSscsDocument().get(0).getValue().getDocumentType());\n assertEquals(LocalDate.now().toString(), result.getData().getSscsDocument().get(0).getValue().getDocumentDateAdded());\n assertEquals(\"Draft Decision Notice generated on \" + LocalDate.now().format(DateTimeFormatter.ofPattern(\"dd-MM-YYYY\")) + \".pdf\", result.getData().getSscsDocument().get(0).getValue().getDocumentFileName());\n }",
"public boolean ApproveReimbursement(int employeeID, int reimburseID, String reason, int status);",
"@Transactional(readOnly=false , propagation=Propagation.REQUIRED)\r\n\tpublic void approveEditData ( DATA approvedData , String approverUserId ) throws Exception;",
"public static String updateCalEvent(HttpServletRequest request, HttpServletResponse response) {\r\n \tDelegator delegator = (Delegator) request.getAttribute(\"delegator\");\r\n LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute(\"dispatcher\");\r\n //getting form values using parameter map\r\n Map<String,Object> params = UtilHttp.getParameterMap(request);\r\n String returnValue = ModelService.RESPOND_SUCCESS;\r\n Map<String, Object> result = null;\r\n Map<String, Object> context = new HashMap<String,Object>();\r\n try {\r\n \t//Edit Form Fields data\r\n \tcontext.put(\"workEffortId\", params.get(\"workEffortId\"));\r\n \tcontext.put(\"workEffortName\", params.get(\"workEffortName\"));\r\n \t\t//for user Permissions\r\n \t\tGenericValue userLogin = delegator.findOne(\"UserLogin\", UtilMisc.toMap(\"userLoginId\", \"system\"), true);\r\n \t\tcontext.put(\"userLogin\", userLogin);\r\n \t\t\r\n \t\tresult = dispatcher.runSync(\"updateWorkEffort\", context);\r\n \t\t\r\n \t\tif(result.get(\"responseMessage\") == ModelService.RESPOND_SUCCESS)\r\n \t\t{\r\n \t\t\tcontext.clear();//clear the context data\r\n \t\t\tcontext.put(\"textData\", params.get(\"textData\"));\r\n \t\t\tcontext.put(\"dataResourceId\", params.get(\"workEffortId\"));\r\n \t\t\tcontext.put(\"userLogin\", userLogin);\r\n \t\t\t//For Three services send same updated date\r\n \t\t\tcontext.put(\"lastUpdatedStamp\", new Timestamp(System.currentTimeMillis()));\r\n \t\t\tcontext.put(\"lastUpdatedTxStamp\", new Timestamp(System.currentTimeMillis()));\r\n \t\t\t//Service for update textData\r\n \t\t\tresult = dispatcher.runSync(\"updateElectronicText\", context);\r\n \t\t\t\r\n \t\t\tif(result.get(\"dataResourceId\")!=null) {\r\n\t \t\t\tcontext.put(\"dataResourceId\", result.get(\"dataResourceId\"));\r\n\t \t\t\t//Service for update data Resource\r\n\t \t\t\tdispatcher.runSync(\"updateDataResource\", context);\r\n\t \t\t\tcontext.put(\"contentId\", result.get(\"dataResourceId\"));\r\n\t \t\t\t//service for update Content\r\n\t \t\t\tdispatcher.runSync(\"updateContent\", context);\r\n \t\t\t}\r\n \t\t\t\r\n \t\t}\r\n }\r\n catch (Exception e) {\r\n \te.printStackTrace();\r\n\t\t}\r\n if(UtilValidate.isNotEmpty(result)){\r\n\t if (!result.containsKey(ModelService.RESPONSE_MESSAGE)) {\r\n\t \treturnValue = ModelService.RESPOND_SUCCESS;\r\n\t } else {\r\n\t \treturnValue = (String) result.get(ModelService.RESPONSE_MESSAGE);\r\n\t }\r\n }\r\n request.setAttribute(\"responseMessage\", \"Event Updated..\");\r\n return returnValue;\r\n }",
"public int getWorkflowId(){return workflowId;}",
"public void testQuery() throws Exception {\n DummyApprovalRequest req1 = new DummyApprovalRequest(reqadmin, null, caid, SecConst.EMPTY_ENDENTITYPROFILE, false);\n DummyApprovalRequest req2 = new DummyApprovalRequest(admin1, null, caid, SecConst.EMPTY_ENDENTITYPROFILE, false);\n DummyApprovalRequest req3 = new DummyApprovalRequest(admin2, null, 3, 2, false);\n\n approvalSessionRemote.addApprovalRequest(admin1, req1, gc);\n approvalSessionRemote.addApprovalRequest(admin1, req2, gc);\n approvalSessionRemote.addApprovalRequest(admin1, req3, gc);\n\n // Make som queries\n Query q1 = new Query(Query.TYPE_APPROVALQUERY);\n q1.add(ApprovalMatch.MATCH_WITH_APPROVALTYPE, BasicMatch.MATCH_TYPE_EQUALS, \"\" + req1.getApprovalType());\n\n List result = approvalSessionRemote.query(admin1, q1, 0, 3, \"cAId=\" + caid, \"(endEntityProfileId=\" + SecConst.EMPTY_ENDENTITYPROFILE + \")\");\n assertTrue(\"Result size \" + result.size(), result.size() >= 2 && result.size() <= 3);\n\n result = approvalSessionRemote.query(admin1, q1, 1, 3, \"cAId=\" + caid, \"(endEntityProfileId=\" + SecConst.EMPTY_ENDENTITYPROFILE + \")\");\n assertTrue(\"Result size \" + result.size(), result.size() >= 1 && result.size() <= 3);\n\n result = approvalSessionRemote.query(admin1, q1, 0, 1, \"cAId=\" + caid, \"(endEntityProfileId=\" + SecConst.EMPTY_ENDENTITYPROFILE + \")\");\n assertTrue(\"Result size \" + result.size(), result.size() == 1);\n\n Query q2 = new Query(Query.TYPE_APPROVALQUERY);\n q2.add(ApprovalMatch.MATCH_WITH_STATUS, BasicMatch.MATCH_TYPE_EQUALS, \"\" + ApprovalDataVO.STATUS_WAITINGFORAPPROVAL, Query.CONNECTOR_AND);\n q2.add(ApprovalMatch.MATCH_WITH_REQUESTADMINCERTSERIALNUMBER, BasicMatch.MATCH_TYPE_EQUALS, reqadmincert.getSerialNumber().toString(16));\n\n result = approvalSessionRemote.query(admin1, q1, 1, 3, \"cAId=\" + caid, \"(endEntityProfileId=\" + SecConst.EMPTY_ENDENTITYPROFILE + \")\");\n assertTrue(\"Result size \" + result.size(), result.size() >= 1 && result.size() <= 3);\n\n // Remove the requests\n int id1 = ((ApprovalDataVO) approvalSessionRemote.findApprovalDataVO(admin1, req1.generateApprovalId()).iterator().next()).getId();\n int id2 = ((ApprovalDataVO) approvalSessionRemote.findApprovalDataVO(admin1, req2.generateApprovalId()).iterator().next()).getId();\n int id3 = ((ApprovalDataVO) approvalSessionRemote.findApprovalDataVO(admin1, req3.generateApprovalId()).iterator().next()).getId();\n approvalSessionRemote.removeApprovalRequest(admin1, id1);\n approvalSessionRemote.removeApprovalRequest(admin1, id2);\n approvalSessionRemote.removeApprovalRequest(admin1, id3);\n }",
"public void onClick(DialogInterface dialog, int which) {\n\n if (txtReprintBillNo.getText().toString().equalsIgnoreCase(\"\")) {\n messageDialog.Show(\"Warning\", \"Please enter Bill Number\");\n setInvoiceDate();\n return;\n } else if (tv_inv_date.getText().toString().equalsIgnoreCase(\"\")) {\n messageDialog.Show(\"Warning\", \"Please enter Bill Date\");\n setInvoiceDate();\n return;\n } else {\n try {\n int billStatus =0;\n int billNo = Integer.valueOf(txtReprintBillNo.getText().toString());\n String date_reprint = tv_inv_date.getText().toString();\n tvDate.setText(date_reprint);\n Date date = new SimpleDateFormat(\"dd-MM-yyyy\").parse(date_reprint);\n Cursor LoadItemForReprint = db.getItemsFromBillItem_new(\n billNo, String.valueOf(date.getTime()));\n if (LoadItemForReprint.moveToFirst()) {\n Cursor cursor = db.getBillDetail_counter(billNo, String.valueOf(date.getTime()));\n if (cursor != null && cursor.moveToFirst()) {\n billStatus = cursor.getInt(cursor.getColumnIndex(\"BillStatus\"));\n if (billStatus == 0) {\n messageDialog.Show(\"Warning\", \"This bill has been deleted\");\n setInvoiceDate();\n return;\n }\n String pos = cursor.getString(cursor.getColumnIndex(\"POS\"));\n String custStateCode = cursor.getString(cursor.getColumnIndex(\"CustStateCode\"));\n if (pos != null && !pos.equals(\"\") && custStateCode != null && !custStateCode.equals(\"\") && !custStateCode.equalsIgnoreCase(pos)) {\n chk_interstate.setChecked(true);\n int index = getIndex_pos(custStateCode);\n spnr_pos.setSelection(index);\n //System.out.println(\"reprint : InterState\");\n } else {\n chk_interstate.setChecked(false);\n spnr_pos.setSelection(0);\n //System.out.println(\"reprint : IntraState\");\n }\n fTotalDiscount = cursor.getFloat(cursor.getColumnIndex(\"TotalDiscountAmount\"));\n float discper = cursor.getFloat(cursor.getColumnIndex(\"DiscPercentage\"));\n reprintBillingMode = cursor.getInt(cursor.getColumnIndex(\"BillingMode\"));\n\n tvDiscountPercentage.setText(String.format(\"%.2f\", discper));\n tvDiscountAmount.setText(String.format(\"%.2f\", fTotalDiscount));\n tvBillNumber.setText(txtReprintBillNo.getText().toString());\n\n tvIGSTValue.setText(String.format(\"%.2f\", cursor.getDouble(cursor.getColumnIndex(\"IGSTAmount\"))));\n tvTaxTotal.setText(String.format(\"%.2f\", cursor.getDouble(cursor.getColumnIndex(\"CGSTAmount\"))));\n tvServiceTaxTotal.setText(String.format(\"%.2f\", cursor.getDouble(cursor.getColumnIndex(\"SGSTAmount\"))));\n tvSubTotal.setText(String.format(\"%.2f\", cursor.getDouble(cursor.getColumnIndex(\"TaxableValue\"))));\n tvBillAmount.setText(String.format(\"%.2f\", cursor.getDouble(cursor.getColumnIndex(\"BillAmount\"))));\n\n LoadItemsForReprintBill(LoadItemForReprint);\n Cursor crsrBillDetail = db.getBillDetail_counter(Integer.valueOf(txtReprintBillNo.getText().toString()));\n if (crsrBillDetail.moveToFirst()) {\n customerId = (crsrBillDetail.getString(crsrBillDetail.getColumnIndex(\"CustId\")));\n }\n }\n\n } else {\n messageDialog.Show(\"Warning\",\n \"No Item is present for the Bill Number \" + txtReprintBillNo.getText().toString() +\", Dated :\"+tv_inv_date.getText().toString());\n setInvoiceDate();\n return;\n }\n if(reprintBillingMode ==4 && billStatus ==2)\n {\n strPaymentStatus = \"Cash On Delivery\";\n }\n else\n strPaymentStatus = \"Paid\";\n isReprint = true;\n PrintNewBill();\n // update bill reprint count\n int Result = db\n .updateBillRepintCounts(Integer.parseInt(txtReprintBillNo.getText().toString()));\n ClearAll();\n if (!(crsrSettings.getInt(crsrSettings.getColumnIndex(\"Tax\")) == 1)) { // reverse tax\n REVERSETAX = true;\n }else\n {\n REVERSETAX = false;\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }",
"public static void updateAutoEncumbrancechanges(EscmProposalMgmt proposalmgmt, boolean isCancel) {\n try {\n OBContext.setAdminMode();\n BigDecimal amt = BigDecimal.ZERO, amtTemp = BigDecimal.ZERO;\n List<EscmProposalmgmtLine> prolineList = proposalmgmt.getEscmProposalmgmtLineList();\n EscmProposalMgmt baseProposalObj = proposalmgmt.getEscmBaseproposal();\n List<EscmProposalmgmtLine> baseProlineList;\n BigDecimal diff = BigDecimal.ZERO;\n\n // checking with propsal line\n for (EscmProposalmgmtLine proposalline : prolineList) {\n if (!proposalline.isSummary()\n && (proposalline.getStatus() == null || !proposalline.getStatus().equals(\"CL\"))) {\n EfinBudgetManencumlines encline = proposalline.getEfinBudgmanencumline();\n if (isCancel) {\n\n if (encline.getManualEncumbrance().getAppliedAmount().compareTo(BigDecimal.ZERO) == 1) {\n\n if (proposalmgmt.getEscmBaseproposal() == null) {\n\n amt = encline.getAPPAmt().subtract(proposalline.getLineTotal());\n encline.setAPPAmt(amt);\n amtTemp = amtTemp.add(proposalline.getLineTotal());\n if (encline.getManualEncumbrance().getAppliedAmount().subtract(amtTemp)\n .compareTo(BigDecimal.ZERO) == 0 && baseProposalObj == null)\n encline.getManualEncumbrance().setDocumentStatus(\"CA\");\n }\n if (proposalmgmt.getEscmBaseproposal() == null)\n BidManagementDAO.insertEncumbranceModification(encline,\n proposalline.getLineTotal().negate(), null, \"PRO\", null, null);\n } else {\n // This else is for the particular case (proposal->po, po cancel and proposal\n // cancel)\n encline.getManualEncumbrance().setDocumentStatus(\"CA\");\n break;\n }\n\n } else {\n\n if (baseProposalObj == null) {\n if (encline != null) {\n encline.getManualEncumbrance().setDocumentStatus(\"DR\");\n // remove associated proposal line refernce\n if (encline.getEscmProposalmgmtLineEMEfinBudgmanencumlineIDList().size() > 0) {\n for (EscmProposalmgmtLine proLineList : encline\n .getEscmProposalmgmtLineEMEfinBudgmanencumlineIDList()) {\n proLineList.setEfinBudgmanencumline(null);\n OBDal.getInstance().save(proLineList);\n }\n }\n\n OBDal.getInstance().remove(encline);\n }\n }\n }\n /*\n * Trigger changes EfinEncumbarnceRevision.updateBudgetInquiry(encline,\n * encline.getManualEncumbrance(), proposalline.getLineTotal().negate());\n */\n }\n }\n\n // for cancel case if there exist a previous version, then update the encumbrance based on\n // the previous version values (Adding new records in the modification tab based on the new\n // and old proposal)\n if (isCancel) {\n if (baseProposalObj != null) {\n for (EscmProposalmgmtLine newproposalline : prolineList) {\n if (!newproposalline.isSummary()) {\n if (newproposalline.getStatus() == null) {\n EfinBudgetManencumlines encline = newproposalline.getEfinBudgmanencumline();\n diff = newproposalline.getLineTotal()\n .subtract(newproposalline.getEscmOldProposalline() != null\n ? newproposalline.getEscmOldProposalline().getLineTotal()\n : BigDecimal.ZERO);\n if (diff.compareTo(BigDecimal.ZERO) != 0) {\n ProposalManagementActionMethod.insertEncumbranceModification(encline,\n diff.negate(), null, false);\n encline.setAPPAmt(encline.getAPPAmt().add(diff.negate()));\n OBDal.getInstance().save(encline);\n }\n } else if (newproposalline.getStatus() != null\n && newproposalline.getEscmOldProposalline() != null\n && newproposalline.getEscmOldProposalline().getStatus() == null) {\n EfinBudgetManencumlines encline = newproposalline.getEfinBudgmanencumline();\n diff = newproposalline.getEscmOldProposalline() != null\n ? newproposalline.getEscmOldProposalline().getLineTotal()\n : BigDecimal.ZERO;\n if (diff.compareTo(BigDecimal.ZERO) != 0) {\n ProposalManagementActionMethod.insertEncumbranceModification(encline, diff, null,\n false);\n encline.setAPPAmt(encline.getAPPAmt().add(diff));\n OBDal.getInstance().save(encline);\n }\n }\n }\n }\n }\n }\n OBDal.getInstance().flush();\n } catch (final Exception e) {\n log.error(\"Exception in updateManualEncumAppAmt after Reject : \", e);\n } finally {\n OBContext.restorePreviousMode();\n }\n }",
"public NbaAutomatedProcessResult executeProcess(NbaUserVO user, NbaDst work) throws NbaBaseException {\n\t\tif (!initialize(user, work)) {\n\t\t\treturn getResult();\n\t\t}\n\t\tif (getLogger().isDebugEnabled()) { \n\t\t\tgetLogger().logDebug(\"RequirementOrdered for contract \" + getWork().getNbaLob().getPolicyNumber());\n\t\t}\n\n\t\t//retrieve the sources for this work item\n\t\t//NBA213 deleted code\n\t\tNbaAwdRetrieveOptionsVO retrieveOptionsValueObject = new NbaAwdRetrieveOptionsVO();\n\t\tretrieveOptionsValueObject.setWorkItem(getWork().getID(), false);\n\t\tretrieveOptionsValueObject.requestSources();\n\t\t// SPR3009 code deleted\n\t\tsetWork(retrieveWorkItem(getUser(), retrieveOptionsValueObject));\t//SPR3009, NBA213\n\t\t//NBA213 deleted code\n\t\tisAdditionalInfo = checkIfAdditionalInfo(getWork());//ALS5494 Checks if the WI is additional Info WI\n\t\t// call awd to lookup matching items\t\n\t\tNbaSearchVO searchVO = null;\n\t\tsearchVO = lookupWork();\n\t\tcopyCreateStation(getWork());//AXAL3.7.20 ALS5191\n\t\treinitializeFields();//AXAL3.7.20\n\t\t// any work items found?\n\t\t// begin SPR2806\n\t\tif(isAdditionalInfo) {//ALS5494\n\t\t\tprocessAdditionalInfo(searchVO);\n\t\t}else {\n\t\t\tif (isLookupDataFound()) { // if there are no matching work items found\t\t//SPR2992\n\t\t\t\tif (searchVO.getSearchResults() != null && searchVO.getSearchResults().isEmpty()) {\n\t\t\t\t\tprocessUnmatchedWorkitem();\n\t\t\t\t}else {\n\t\t\t\t //begin SPR3009\n\t\t\t\t\ttry {\n\t // retrieve and lock matching work items\n\t processMatchingWorkItems(searchVO.getSearchResults());\n\t } catch (Exception e) {\n\t handleProcessingException(e);\n\t }\n\t try {\n\t updateCaseWorkItems();\n\t updatePermanentWorkItems();\n\t updateTempWorkItems();\n\t } catch (NbaBaseException e) {\n\t handleUpdateException(e);\n\t }\n\t if (result == null) {\n\t setResult(new NbaAutomatedProcessResult(NbaAutomatedProcessResult.SUCCESSFUL, getPassStatus(), getPassStatus()));\n\t }\n\t //end SPR3009 \n\t\t\t\t}\n\t\t\t\tif (result == null) {\n\t\t\t\t\tsetResult(new NbaAutomatedProcessResult(NbaAutomatedProcessResult.SUCCESSFUL, \"SUSPENDED\", \"SUSPENDED\"));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t setWork(getOrigWorkItem()); //SPR3009\n\t\t\t\tchangeStatus(getFailStatus());\n\t\t\t\taddComment(\"Minimum data for AWD lookup not present\");\n\t\t\t\tdoUpdateWorkItem();\n\t\t\t\tsetResult(new NbaAutomatedProcessResult(NbaAutomatedProcessResult.FAILED, getFailStatus(), getFailStatus()));\n\t\t\t}\n\t\t\t//end SPR2806\n\t\t}\n\t\treturn result;\n\t}",
"private void checkInvestmentStrategies(EditPlanDirectToManaged editPlanPage, Constants.RiskTolerance riskTolerance) throws Exception {\n InvestmentStrategyObject investmentStrategy = new InvestmentStrategyObject(riskTolerance,\n Constants.DEFAULT_RETIREMENT_AGE - Constants.DEFAULT_USER_AGE);\n //Assert that the correct investment strategy and asset allocation is presented correctly based on the default test user 25 years to retirement\n softAssert.assertTrue(editPlanPage.verifyAssetAllocation(investmentStrategy));\n softAssert.assertTrue(editPlanPage.verifyInvestmentObjective(investmentStrategy.investmentObjective));\n\n for(Constants.GlidePath glidePath: Constants.GlidePath.values()) {\n if((riskTolerance == Constants.RiskTolerance.AGGRESSIVE || riskTolerance == Constants.RiskTolerance.MODERATE) && glidePath == Constants.GlidePath.INCOME_WITH_CAPITAL_PRESERVATION)\n continue;\n\n int yearsToRetirement = Constants.DEFAULT_YEARS_FOR_GLIDEPATH.get(new AbstractMap.SimpleEntry(riskTolerance,glidePath));\n\n editPlanPage.updateRetirementAge((Constants.DEFAULT_USER_AGE + yearsToRetirement) + \"\");\n\n investmentStrategy = new InvestmentStrategyObject(riskTolerance, yearsToRetirement);\n softAssert.assertTrue(editPlanPage.verifyAssetAllocation(investmentStrategy));\n softAssert.assertTrue(editPlanPage.verifyInvestmentObjective(investmentStrategy.investmentObjective));\n\n PortfolioAnalysisPage portfolioAnalysisPageAgain = editPlanPage.goBackToPortfolioAnalysis();\n //Verify that asset allocation changed\n softAssert.assertTrue(portfolioAnalysisPageAgain.verifyRetirementIncomeNoProjectionButtonDisplayed());\n softAssert.assertTrue(portfolioAnalysisPageAgain.verifyRetirementIncomePreDisplay());\n softAssert.assertTrue(portfolioAnalysisPageAgain.verifyCorrectInvestmentStartegy((Constants.DEFAULT_USER_AGE + yearsToRetirement) + \"\", investmentStrategy.investmentObjective));\n softAssert.assertTrue(portfolioAnalysisPageAgain.verifyCorrectAssetAllocation2(investmentStrategy));\n\n editPlanPage = portfolioAnalysisPageAgain.clickOnEditInPlaceTrigger();\n }\n }",
"public void fetchEmployeeDetailsByEmployeeId(EmpCredit empCredit, HttpServletRequest request, String employeeId, boolean editFlag){\r\n\t\ttry {\r\n\t\t\tString empDetailQuery = \"SELECT HRMS_CENTER.CENTER_NAME, HRMS_RANK.RANK_NAME, NVL(SALGRADE_TYPE,' '),\"\r\n\t\t\t\t\t+ \" SALGRADE_CODE, HRMS_EMP_OFFC.EMP_ID, HRMS_SALARY_MISC.GROSS_AMT,\"\r\n\t\t\t\t\t+ \" DECODE(HRMS_SALARY_MISC.SAL_EPF_FLAG,'Y','true','N','false'), NVL(SAL_ACCNO_REGULAR,' '),\" \r\n\t\t\t\t\t+ \" NVL(SAL_PANNO,' '), NVL(DEPT_NAME,' '), DEPT_ID , NVL(TO_CHAR(EMP_REGULAR_DATE,'DD-MM-YYYY'),' '),\"\r\n\t\t\t\t\t+ \" NVL(CADRE_NAME,' '), HRMS_EMP_OFFC.EMP_CADRE \" \r\n\t\t\t\t\t+ \" FROM HRMS_EMP_OFFC \" \r\n\t\t\t\t\t+ \" INNER JOIN HRMS_RANK ON (HRMS_RANK.RANK_ID=HRMS_EMP_OFFC.EMP_RANK)\" \r\n\t\t\t\t\t+ \" INNER JOIN HRMS_CENTER ON (HRMS_EMP_OFFC.EMP_CENTER = HRMS_CENTER.CENTER_ID)\" \r\n\t\t\t\t\t+ \" LEFT JOIN HRMS_TITLE ON (HRMS_EMP_OFFC.EMP_TITLE_CODE = HRMS_TITLE.TITLE_CODE)\" \r\n\t\t\t\t\t+ \" LEFT JOIN HRMS_DEPT ON (HRMS_DEPT.DEPT_ID = HRMS_EMP_OFFC.EMP_DEPT )\"\r\n\t\t\t\t\t+ \" LEFT JOIN HRMS_CADRE ON (HRMS_CADRE.CADRE_ID = HRMS_EMP_OFFC.EMP_CADRE)\"\r\n\t\t\t\t\t+ \" LEFT JOIN HRMS_SALGRADE_HDR ON(HRMS_EMP_OFFC.EMP_SAL_GRADE=HRMS_SALGRADE_HDR.SALGRADE_CODE)\" \r\n\t\t\t\t\t+ \" LEFT JOIN HRMS_SALARY_MISC ON(HRMS_SALARY_MISC.EMP_ID = HRMS_EMP_OFFC.EMP_ID)\" \r\n\t\t\t\t\t+ \" LEFT JOIN HRMS_FORMULABUILDER_HDR ON(HRMS_FORMULABUILDER_HDR.FORMULA_ID = HRMS_SALARY_MISC.FORMULA_ID)\" \r\n\t\t\t\t\t+ \" WHERE HRMS_EMP_OFFC.EMP_ID=\"+employeeId;\r\n\t\t\r\n\t\t\tObject empDetailObj[][] = getSqlModel().getSingleResult(empDetailQuery);\r\n\t\t\t\r\n\t\t\tif(empDetailObj!=null && empDetailObj.length>0){\r\n\t\t\t\t\r\n\t\t\t\tempCredit.setEmpCenter(String.valueOf(empDetailObj[0][0]));\r\n\t\t\t\tempCredit.setEmpRank(String.valueOf(empDetailObj[0][1]));\r\n\t\t\t\tempCredit.setGradeName(String.valueOf(empDetailObj[0][2]));\r\n\t\t\t\tempCredit.setGradeId(String.valueOf(empDetailObj[0][3]));\r\n\t\t\t\tempCredit.setEmpId(String.valueOf(empDetailObj[0][4]));\r\n\t\t\t\tempCredit.setGrsAmt(String.valueOf(empDetailObj[0][5]));\r\n\t\t\t\tempCredit.setPfFlag(String.valueOf(empDetailObj[0][6]));\r\n\t\t\t\tempCredit.setEmpAccountNo(String.valueOf(empDetailObj[0][7]));\r\n\t\t\t\tempCredit.setEmpPanNo(String.valueOf(empDetailObj[0][8]));\r\n\t\t\t\tempCredit.setEmpDeptName(String.valueOf(empDetailObj[0][9]));\r\n\t\t\t\tempCredit.setEmpDeptId(String.valueOf(empDetailObj[0][11]));\r\n\t\t\t\tempCredit.setJoiningDate(String.valueOf(empDetailObj[0][11]));\r\n\t\t\t\tempCredit.setEmpGradeName(String.valueOf(empDetailObj[0][12]));\r\n\t\t\t\tempCredit.setEmpGradeId(String.valueOf(empDetailObj[0][13]));\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tshowEmp(empCredit, request, employeeId, editFlag);\r\n\t}",
"public void getApprovalInfo() {\n setLoadingText(\"正在获取新审批数据......\");\n Log.e(\"ApprovalInfo\", \"getting.\");\n approvalDataList = new ArrayList<ApprovalData>();\n approvalJsonList.add(new ApprovalJSONOperate(UID).setAct(this).getApprovalInfo(approvalDataList));\n }",
"private void patchPaymentDetailsStatusUpdateIsSaved(final PaymentStatus paymentOutcome) throws IOException {\n\n // Given\n final String checkout_id = \"123456789\";\n final String payment_id = \"987654321\";\n final String eric_header = \"EricHeader\";\n final LocalDateTime paidAt = LocalDateTime.now();\n\n final MockHttpServletRequest request = new MockHttpServletRequest();\n request.addHeader(ApiSdkManager.getEricPassthroughTokenHeader(), eric_header);\n request.setRequestURI(\"/basket/checkouts/\" + checkout_id + \"/payment\");\n\n final BasketPaymentRequestDTO paymentStatusUpdate = new BasketPaymentRequestDTO();\n paymentStatusUpdate.setStatus(paymentOutcome);\n paymentStatusUpdate.setPaidAt(paidAt);\n paymentStatusUpdate.setPaymentReference(payment_id);\n\n final PaymentApi paymentSummary = new PaymentApi();\n paymentSummary.setStatus(\"paid\");\n paymentSummary.setAmount(\"211.03\");\n paymentSummary.setLinks(new HashMap<String, String>() {{\n put(\"resource\", \"/basket/checkouts/\" + checkout_id + \"/payment\");\n }});\n\n when(checkoutService.getCheckoutById(checkout_id)).thenReturn(Optional.of(checkout));\n when(checkout.getData()).thenReturn(checkoutData);\n if (paymentOutcome.equals(PaymentStatus.PAID)) {\n mockCheckoutDataItems();\n when(apiClientService.getPaymentSummary(\"EricHeader\", payment_id)).thenReturn(paymentSummary);\n }\n\n // When\n controllerUnderTest.patchBasketPaymentDetails(paymentStatusUpdate, request, checkout_id, \"requestId\");\n\n // Then\n verify(checkoutData).setStatus(paymentOutcome);\n if (paymentOutcome.equals(PaymentStatus.PAID)) {\n verify(checkoutData).setPaidAt(paidAt);\n verify(checkoutData).setPaymentReference(payment_id);\n }\n verify(checkoutService).saveCheckout(checkout);\n }",
"@Override\r\n protected void updateCI(RepositoryAction action, boolean preview)\r\n throws DataFormatException, IOException, SQLException, IllegalArgumentException {\r\n action.assertHasProperty(OLD_VALUE);\r\n action.assertHasProperty(NEW_VALUE);\r\n\r\n String newValue = action.getProperties().get(\"newValue\");\r\n int cnt = 0;\r\n\r\n if (!preview) {\r\n\r\n String sql = lookupSql(action, preview);\r\n /*\r\n * update CI for XLR requires a select which returns a result set then for each,\r\n * get content blob, modify content blob then update the record with new ci type\r\n * and modified content blob\r\n */\r\n\r\n ResultSet result = null;\r\n String[] stringArray = createSqlArray(sql);\r\n NamedParamStatement pstmtSelect = null;\r\n PreparedStatement secondPstmtUpdate = null;\r\n Boolean origCommitState = dbconn.getAutoCommit();\r\n\r\n // ensure we have two sql statments\r\n // We expect the first statement to be the select and\r\n // the second statement is the update\r\n if (stringArray != null && stringArray.length == 2) {\r\n try {\r\n // Turn autocommit off\r\n dbconn.setAutoCommit(false);\r\n\r\n pstmtSelect = new NamedParamStatement(this.dbconn, stringArray[0]);\r\n pstmtSelect = populateNamedParamStmt(action, pstmtSelect);\r\n result = pstmtSelect.executeQuery();\r\n if (result != null) {\r\n while (result.next()) {\r\n int ci_uid = result.getInt(\"ci_uid\");\r\n\r\n byte [] currentBytes = null;\r\n\r\n if (dbType == DbType.POSTGRESQL){\r\n currentBytes = result.getBytes(\"content\");\r\n }\r\n else {\r\n Blob blobContent = result.getBlob(\"content\");\r\n currentBytes = convertBlobToByteArray(blobContent);\r\n }\r\n \r\n String blobString = new String(CompressionUtils.decompress(currentBytes));\r\n // Now, update blob\r\n String updatedBlobString = updateBlob(blobString, \"type\", newValue);\r\n\r\n //System.out.println(\"******BEGIN - this is the updated content blob for xlr - update ci\");\r\n //System.out.println(updatedBlobString);\r\n \r\n byte[] newByteArray = CompressionUtils.compress(updatedBlobString.getBytes());\r\n\r\n secondPstmtUpdate = dbconn.prepareStatement(stringArray[1]);\r\n secondPstmtUpdate.setString(1, action.getProperties().get(\"newValue\"));\r\n\r\n if (dbType == DbType.POSTGRESQL){\r\n secondPstmtUpdate.setBytes(2, newByteArray);\r\n }\r\n else {\r\n Blob blobFromBytes = dbconn.createBlob();\r\n int numWritten = blobFromBytes.setBytes(1, newByteArray);\r\n //System.out.println(\"******END - numWritten to blob = \"+numWritten+\", size = \"+blobFromBytes.length()+\", this is the updated content blob for xlr - update task\");\r\n // old way Blob blobFromBytes = new javax.sql.rowset.serial.SerialBlob(newByteArray); \r\n secondPstmtUpdate.setBlob(2, blobFromBytes); \r\n }\r\n\r\n secondPstmtUpdate.setInt(3, ci_uid);\r\n\r\n cnt = secondPstmtUpdate.executeUpdate();\r\n }\r\n\r\n } else {\r\n os.println(String.format(\"\\n%sUpdate CI from %s to %s. 0 row(s) altered. %s\",\r\n (preview ? \"[PREVIEW] \" : \"\"), action.getProperties().get(OLD_VALUE),\r\n action.getProperties().get(NEW_VALUE), \"No records found to update.\"));\r\n }\r\n\r\n // successfully reached the end, so commit\r\n //os.println(\"About to commit the database transaction.\");\r\n dbconn.commit();\r\n os.println(String.format(\"\\n%sUpdate CI from %s to %s. %d row(s) altered.\", (preview ? \"[PREVIEW] \" : \"\"),\r\n action.getProperties().get(OLD_VALUE), action.getProperties().get(\"newValue\"), cnt));\r\n if(cnt>0 && action.getMessage() != null && !action.getMessage().isEmpty()){\r\n os.println(\"\\tAttention: \"+action.getMessage());\r\n }\r\n } catch (SQLException se){\r\n dbconn.rollback();\r\n os.println(\"\\nERROR: SQLExecption thrown, so database transcaction has been rolled back.\");\r\n throw se; \r\n } finally {\r\n try {\r\n if(dbconn != null) dbconn.setAutoCommit(origCommitState);\r\n if (result != null) result.close();\r\n if (secondPstmtUpdate != null) secondPstmtUpdate.close();\r\n if (pstmtSelect != null) pstmtSelect.close();\r\n } catch (Exception e) {\r\n }\r\n }\r\n\r\n } else {\r\n throw new IllegalArgumentException(\r\n \"updateCI mapping must contain two SQL statements, a SELECT and an UPDATE.\");\r\n }\r\n\r\n } else {\r\n // perform preview action\r\n cnt = processAction(action, preview);\r\n os.println(String.format(\"\\n%sUpdate CI from %s to %s. %d row(s) altered.\", (preview ? \"[PREVIEW] \" : \"\"),\r\n action.getProperties().get(OLD_VALUE), action.getProperties().get(\"newValue\"), cnt));\r\n \r\n }\r\n }"
] | [
"0.6133974",
"0.57006377",
"0.53529716",
"0.51636106",
"0.51530594",
"0.51119053",
"0.510597",
"0.5097769",
"0.5020745",
"0.4998036",
"0.49843505",
"0.49810144",
"0.4979623",
"0.49758407",
"0.49540395",
"0.49147752",
"0.49006408",
"0.48892608",
"0.48885235",
"0.4879593",
"0.48744512",
"0.4854111",
"0.48216188",
"0.47994483",
"0.47985387",
"0.4795157",
"0.47800747",
"0.47798207",
"0.47760922",
"0.47646123",
"0.4747774",
"0.474613",
"0.4742711",
"0.47278652",
"0.4727166",
"0.4727166",
"0.47240242",
"0.47159165",
"0.47124353",
"0.47123328",
"0.47062644",
"0.47026706",
"0.46942696",
"0.4692809",
"0.46912816",
"0.46762294",
"0.46704486",
"0.46702358",
"0.46594942",
"0.46577334",
"0.46555352",
"0.4654291",
"0.46538484",
"0.46532494",
"0.46478552",
"0.4642107",
"0.4638202",
"0.46368223",
"0.46309474",
"0.46230954",
"0.46121326",
"0.46109784",
"0.4610348",
"0.46099046",
"0.46074197",
"0.4607242",
"0.46029916",
"0.46006462",
"0.4598571",
"0.45969856",
"0.45932817",
"0.45909762",
"0.45886937",
"0.45833942",
"0.45707378",
"0.4568134",
"0.45645422",
"0.4557629",
"0.4557057",
"0.45549724",
"0.4553278",
"0.45501885",
"0.454538",
"0.45440564",
"0.45357046",
"0.4534277",
"0.45342577",
"0.45342153",
"0.45315862",
"0.4530211",
"0.45276326",
"0.45253387",
"0.45187303",
"0.45154384",
"0.45136294",
"0.45125857",
"0.4505462",
"0.45002156",
"0.44973955",
"0.44971672"
] | 0.7480736 | 0 |
.clarifai.api.UserAppIDSet user_app_id = 1; | boolean hasUserAppId(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"com.clarifai.grpc.api.UserAppIDSet getUserAppId();",
"com.clarifai.grpc.api.UserAppIDSet getUserAppId();",
"com.clarifai.grpc.api.UserAppIDSetOrBuilder getUserAppIdOrBuilder();",
"com.clarifai.grpc.api.UserAppIDSetOrBuilder getUserAppIdOrBuilder();",
"public void setUserId(){\n AdGyde.setClientUserId(\"ADG1045984\");\n Toast.makeText(this, \"UserId = ADG1045984\", Toast.LENGTH_SHORT).show();\n }",
"ApplicationId appId();",
"short appId();",
"public void setAppId(String value)\r\n {\r\n getSemanticObject().setProperty(data_appId, value);\r\n }",
"public String getAppId();",
"public void setAppid(String appid) {\n this.appid = appid;\n }",
"public static void setConfig(String userId, String appId, String config)\n\t{\t\n\t}",
"public void setAD_User_ID (int AD_User_ID);",
"public String getApplicationId();",
"public void setApplicationID(String value) {\n this.applicationID = value;\n }",
"public String getAppid() {\n return appid;\n }",
"public String getAppid() {\n return appid;\n }",
"@Override\n\tpublic void setUserId(long userId) {\n\t\t_scienceApp.setUserId(userId);\n\t}",
"public void setId(User user) {\n this.id = new GoogleInfoKey(user);\n }",
"public abstract String getApplicationId();",
"public void setAppID(String appID) {\n this.appID = appID;\n }",
"public static void setAppId(String id) {\n if (Platform.appId == null) {\n Platform.appId = id;\n // reset originId\n Platform.originId = null;\n log.info(\"application instance ID set to {}\", Platform.appId);\n } else {\n throw new IllegalArgumentException(\"application instance ID is already set\");\n }\n }",
"public String getAppuserid() {\n return appuserid;\n }",
"private String getLuisAppId() {\n return this.getString(R.string.luisAppID);\n }",
"public void setIdUser(int value) {\n this.idUser = value;\n }",
"public void setIduser(int aIduser) {\n iduser = aIduser;\n }",
"public void setAppName(String appName);",
"public void setAuthId(java.lang.String param){\r\n \r\n if (param != null){\r\n //update the setting tracker\r\n localAuthIdTracker = true;\r\n } else {\r\n localAuthIdTracker = false;\r\n \r\n }\r\n \r\n this.localAuthId=param;\r\n \r\n\r\n }",
"public AppID getIdentifier () ;",
"public void setAppId(Long AppId) {\n this.AppId = AppId;\n }",
"public void setID(String username){\n this.clientID = username+\": \"+clientID;\n \n }",
"public String getAppId() {\r\n return appId;\r\n }",
"public void setUser1X_ID (int User1X_ID);",
"void setUser(final ApplicationUser user);",
"public void setUserid(java.lang.String value) {\n this.userid = value;\n }",
"public boolean setClient(Object clientApp){\r\n if (clientApp==null) return (false);\r\n varContextObject=clientApp; \r\n varContextFields=clientApp.getClass().getFields();\r\n return (true);\r\n }",
"public void setId_user(int id_user) {\r\n this.id_user = id_user;\r\n }",
"Appinfo createAppinfo();",
"public String getAppID() {\n return appID;\n }",
"public void setUser1W_ID (int User1W_ID);",
"public Builder setAppId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n appId_ = value;\n onChanged();\n return this;\n }",
"public Builder setAppId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n appId_ = value;\n onChanged();\n return this;\n }",
"public Long getAppId() {\n return this.AppId;\n }",
"private void setUserId(int value) {\n \n userId_ = value;\n }",
"@Attribute(order = 200, validators = { RequiredValueValidator.class })\n\t\tString applicationId();",
"public void setId_user(int id_user) {\n this.id_user = id_user;\n }",
"public void setAppuserid(String appuserid) {\n this.appuserid = appuserid == null ? null : appuserid.trim();\n }",
"@Override\n\tpublic String getAppId() {\n\t\treturn app.getAppId();\n\t}",
"@Override\n\tpublic void setApplicationId(long applicationId) {\n\t\t_userSync.setApplicationId(applicationId);\n\t}",
"void setDefaultApp(String id);",
"public void setApp(PR1 application){\n this.application = application;\n }",
"public void setUserId(long userId);",
"public void setUserId(long userId);",
"public void setUserId(long userId);",
"public void setUserId(long userId);",
"Builder fromApp(ApplicationId appId);",
"public void setUser1_ID (int User1_ID);",
"public void setUser1_ID (int User1_ID);",
"String getComponentAppId();",
"public void setIdUser(String idUser) {\n\t\tthis.idUser = idUser;\n\t}",
"public void setUserId(Long userId)\n/* */ {\n/* 80 */ this.userId = userId;\n/* */ }",
"public String getUserID();",
"public void setBundleID(long param){\n localBundleIDTracker = true;\n \n this.localBundleID=param;\n \n\n }",
"public void setUser1Y_ID (int User1Y_ID);",
"public AppUser(Long in_userId) {\r\n\t\tthis.setUserId(in_userId);\r\n\t}",
"void setComponentAppId(String componentAppId);",
"public interface AppIdCallback {\n String getAppId();\n}",
"public void setCallingUser(entity.User value);",
"public void setPresentid(java.lang.String param){\r\n \r\n if (param != null){\r\n //update the setting tracker\r\n localPresentidTracker = true;\r\n } else {\r\n localPresentidTracker = false;\r\n \r\n }\r\n \r\n this.localPresentid=param;\r\n \r\n\r\n }",
"public void setApId(long value) {\n this.apId = value;\n }",
"public interface BugRegisterInfor {\n String APP_ID = \"6b82b51788\";\n String APP_KEY = \"09872b4e-8da9-442c-b1ac-4e904829e2d8\";\n}",
"public void setUserid(Integer userid) {\n this.userid = userid;\n }",
"public void setUserid(Integer userid) {\n this.userid = userid;\n }",
"public void setUserid(Integer userid) {\n this.userid = userid;\n }",
"public void setUserid(Integer userid) {\n this.userid = userid;\n }",
"public void setUserid(Integer userid) {\n this.userid = userid;\n }",
"public void setUserid(Integer userid) {\n this.userid = userid;\n }",
"public void setUserid(Integer userid) {\n this.userid = userid;\n }",
"public void setUserid(Integer userid) {\n this.userid = userid;\n }",
"public void setUserid(Integer userid) {\n this.userid = userid;\n }",
"public void setUserid(Integer userid) {\n this.userid = userid;\n }",
"public void setUserid(Integer userid) {\n this.userid = userid;\n }",
"public void setUserid(Integer userid) {\n this.userid = userid;\n }",
"String getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();"
] | [
"0.76256806",
"0.76256806",
"0.6751339",
"0.6751339",
"0.63550764",
"0.61067605",
"0.60613406",
"0.60395926",
"0.58157873",
"0.5790636",
"0.57730806",
"0.57723117",
"0.5710018",
"0.5695878",
"0.56843317",
"0.56843317",
"0.5672764",
"0.56627274",
"0.56597555",
"0.56276387",
"0.56211203",
"0.5614863",
"0.56002074",
"0.55764216",
"0.55663663",
"0.5561437",
"0.5535066",
"0.5506824",
"0.54880476",
"0.5464258",
"0.54637915",
"0.5450545",
"0.54313314",
"0.5425707",
"0.5425205",
"0.5423729",
"0.5422022",
"0.54197925",
"0.540496",
"0.5392579",
"0.5392579",
"0.53592545",
"0.53546363",
"0.5348649",
"0.5342708",
"0.5335267",
"0.53351206",
"0.5328945",
"0.5324139",
"0.5315325",
"0.53028",
"0.53028",
"0.53028",
"0.53028",
"0.53022444",
"0.53021365",
"0.53021365",
"0.5301078",
"0.53010774",
"0.5299295",
"0.52842814",
"0.52837944",
"0.52807415",
"0.52747655",
"0.5263792",
"0.5253083",
"0.5222181",
"0.5217471",
"0.52158856",
"0.52084666",
"0.51927346",
"0.51927346",
"0.51927346",
"0.51927346",
"0.51927346",
"0.51927346",
"0.51927346",
"0.51927346",
"0.51927346",
"0.51927346",
"0.51927346",
"0.51927346",
"0.5190969",
"0.515056",
"0.515056",
"0.515056",
"0.515056",
"0.515056",
"0.515056",
"0.515056",
"0.515056",
"0.515056",
"0.515056",
"0.515056",
"0.515056",
"0.515056",
"0.515056",
"0.515056",
"0.515056"
] | 0.5550676 | 27 |
.clarifai.api.UserAppIDSet user_app_id = 1; | com.clarifai.grpc.api.UserAppIDSet getUserAppId(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"com.clarifai.grpc.api.UserAppIDSetOrBuilder getUserAppIdOrBuilder();",
"com.clarifai.grpc.api.UserAppIDSetOrBuilder getUserAppIdOrBuilder();",
"public void setUserId(){\n AdGyde.setClientUserId(\"ADG1045984\");\n Toast.makeText(this, \"UserId = ADG1045984\", Toast.LENGTH_SHORT).show();\n }",
"ApplicationId appId();",
"short appId();",
"public void setAppId(String value)\r\n {\r\n getSemanticObject().setProperty(data_appId, value);\r\n }",
"public String getAppId();",
"public void setAppid(String appid) {\n this.appid = appid;\n }",
"public static void setConfig(String userId, String appId, String config)\n\t{\t\n\t}",
"public void setAD_User_ID (int AD_User_ID);",
"public String getApplicationId();",
"public void setApplicationID(String value) {\n this.applicationID = value;\n }",
"public String getAppid() {\n return appid;\n }",
"public String getAppid() {\n return appid;\n }",
"@Override\n\tpublic void setUserId(long userId) {\n\t\t_scienceApp.setUserId(userId);\n\t}",
"public void setId(User user) {\n this.id = new GoogleInfoKey(user);\n }",
"public abstract String getApplicationId();",
"public void setAppID(String appID) {\n this.appID = appID;\n }",
"public static void setAppId(String id) {\n if (Platform.appId == null) {\n Platform.appId = id;\n // reset originId\n Platform.originId = null;\n log.info(\"application instance ID set to {}\", Platform.appId);\n } else {\n throw new IllegalArgumentException(\"application instance ID is already set\");\n }\n }",
"public String getAppuserid() {\n return appuserid;\n }",
"private String getLuisAppId() {\n return this.getString(R.string.luisAppID);\n }",
"public void setIdUser(int value) {\n this.idUser = value;\n }",
"public void setIduser(int aIduser) {\n iduser = aIduser;\n }",
"public void setAppName(String appName);",
"boolean hasUserAppId();",
"boolean hasUserAppId();",
"public void setAuthId(java.lang.String param){\r\n \r\n if (param != null){\r\n //update the setting tracker\r\n localAuthIdTracker = true;\r\n } else {\r\n localAuthIdTracker = false;\r\n \r\n }\r\n \r\n this.localAuthId=param;\r\n \r\n\r\n }",
"public AppID getIdentifier () ;",
"public void setAppId(Long AppId) {\n this.AppId = AppId;\n }",
"public String getAppId() {\r\n return appId;\r\n }",
"public void setID(String username){\n this.clientID = username+\": \"+clientID;\n \n }",
"public void setUser1X_ID (int User1X_ID);",
"void setUser(final ApplicationUser user);",
"public boolean setClient(Object clientApp){\r\n if (clientApp==null) return (false);\r\n varContextObject=clientApp; \r\n varContextFields=clientApp.getClass().getFields();\r\n return (true);\r\n }",
"public void setUserid(java.lang.String value) {\n this.userid = value;\n }",
"public void setId_user(int id_user) {\r\n this.id_user = id_user;\r\n }",
"Appinfo createAppinfo();",
"public String getAppID() {\n return appID;\n }",
"public void setUser1W_ID (int User1W_ID);",
"public Builder setAppId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n appId_ = value;\n onChanged();\n return this;\n }",
"public Builder setAppId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n appId_ = value;\n onChanged();\n return this;\n }",
"public Long getAppId() {\n return this.AppId;\n }",
"private void setUserId(int value) {\n \n userId_ = value;\n }",
"@Attribute(order = 200, validators = { RequiredValueValidator.class })\n\t\tString applicationId();",
"public void setId_user(int id_user) {\n this.id_user = id_user;\n }",
"@Override\n\tpublic String getAppId() {\n\t\treturn app.getAppId();\n\t}",
"public void setAppuserid(String appuserid) {\n this.appuserid = appuserid == null ? null : appuserid.trim();\n }",
"@Override\n\tpublic void setApplicationId(long applicationId) {\n\t\t_userSync.setApplicationId(applicationId);\n\t}",
"void setDefaultApp(String id);",
"public void setApp(PR1 application){\n this.application = application;\n }",
"public void setUserId(long userId);",
"public void setUserId(long userId);",
"public void setUserId(long userId);",
"public void setUserId(long userId);",
"Builder fromApp(ApplicationId appId);",
"String getComponentAppId();",
"public void setUser1_ID (int User1_ID);",
"public void setUser1_ID (int User1_ID);",
"public void setIdUser(String idUser) {\n\t\tthis.idUser = idUser;\n\t}",
"public void setUserId(Long userId)\n/* */ {\n/* 80 */ this.userId = userId;\n/* */ }",
"public String getUserID();",
"public void setBundleID(long param){\n localBundleIDTracker = true;\n \n this.localBundleID=param;\n \n\n }",
"public void setUser1Y_ID (int User1Y_ID);",
"public AppUser(Long in_userId) {\r\n\t\tthis.setUserId(in_userId);\r\n\t}",
"void setComponentAppId(String componentAppId);",
"public interface AppIdCallback {\n String getAppId();\n}",
"public void setCallingUser(entity.User value);",
"public void setPresentid(java.lang.String param){\r\n \r\n if (param != null){\r\n //update the setting tracker\r\n localPresentidTracker = true;\r\n } else {\r\n localPresentidTracker = false;\r\n \r\n }\r\n \r\n this.localPresentid=param;\r\n \r\n\r\n }",
"public void setApId(long value) {\n this.apId = value;\n }",
"public interface BugRegisterInfor {\n String APP_ID = \"6b82b51788\";\n String APP_KEY = \"09872b4e-8da9-442c-b1ac-4e904829e2d8\";\n}",
"public void setUserid(Integer userid) {\n this.userid = userid;\n }",
"public void setUserid(Integer userid) {\n this.userid = userid;\n }",
"public void setUserid(Integer userid) {\n this.userid = userid;\n }",
"public void setUserid(Integer userid) {\n this.userid = userid;\n }",
"public void setUserid(Integer userid) {\n this.userid = userid;\n }",
"public void setUserid(Integer userid) {\n this.userid = userid;\n }",
"public void setUserid(Integer userid) {\n this.userid = userid;\n }",
"public void setUserid(Integer userid) {\n this.userid = userid;\n }",
"public void setUserid(Integer userid) {\n this.userid = userid;\n }",
"public void setUserid(Integer userid) {\n this.userid = userid;\n }",
"public void setUserid(Integer userid) {\n this.userid = userid;\n }",
"public void setUserid(Integer userid) {\n this.userid = userid;\n }",
"String getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();"
] | [
"0.675112",
"0.675112",
"0.63546145",
"0.6106961",
"0.6061832",
"0.60400426",
"0.5816435",
"0.57911766",
"0.5772788",
"0.5772107",
"0.5710057",
"0.5695659",
"0.568511",
"0.568511",
"0.56726515",
"0.56622803",
"0.5659865",
"0.5628104",
"0.5621385",
"0.56152785",
"0.56011575",
"0.55758107",
"0.5565742",
"0.556234",
"0.5550265",
"0.5550265",
"0.55343705",
"0.550764",
"0.54883236",
"0.54646677",
"0.54644144",
"0.54500544",
"0.54304296",
"0.5425704",
"0.5425378",
"0.54231244",
"0.54225934",
"0.5420767",
"0.5404407",
"0.53928983",
"0.53928983",
"0.5359972",
"0.5354203",
"0.53485996",
"0.534206",
"0.5336244",
"0.5335084",
"0.5327971",
"0.5324603",
"0.5315541",
"0.5302448",
"0.5302448",
"0.5302448",
"0.5302448",
"0.53020644",
"0.53020096",
"0.5301675",
"0.5301675",
"0.5300717",
"0.52994263",
"0.5284185",
"0.52839833",
"0.52801114",
"0.5274536",
"0.5263997",
"0.52527887",
"0.5221465",
"0.52172035",
"0.5215117",
"0.52092254",
"0.5192581",
"0.5192581",
"0.5192581",
"0.5192581",
"0.5192581",
"0.5192581",
"0.5192581",
"0.5192581",
"0.5192581",
"0.5192581",
"0.5192581",
"0.5192581",
"0.5190738",
"0.51504093",
"0.51504093",
"0.51504093",
"0.51504093",
"0.51504093",
"0.51504093",
"0.51504093",
"0.51504093",
"0.51504093",
"0.51504093",
"0.51504093",
"0.51504093",
"0.51504093",
"0.51504093",
"0.51504093",
"0.51504093"
] | 0.7625713 | 1 |
.clarifai.api.UserAppIDSet user_app_id = 1; | com.clarifai.grpc.api.UserAppIDSetOrBuilder getUserAppIdOrBuilder(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"com.clarifai.grpc.api.UserAppIDSet getUserAppId();",
"com.clarifai.grpc.api.UserAppIDSet getUserAppId();",
"public void setUserId(){\n AdGyde.setClientUserId(\"ADG1045984\");\n Toast.makeText(this, \"UserId = ADG1045984\", Toast.LENGTH_SHORT).show();\n }",
"ApplicationId appId();",
"short appId();",
"public void setAppId(String value)\r\n {\r\n getSemanticObject().setProperty(data_appId, value);\r\n }",
"public String getAppId();",
"public void setAppid(String appid) {\n this.appid = appid;\n }",
"public void setAD_User_ID (int AD_User_ID);",
"public static void setConfig(String userId, String appId, String config)\n\t{\t\n\t}",
"public String getApplicationId();",
"public void setApplicationID(String value) {\n this.applicationID = value;\n }",
"public String getAppid() {\n return appid;\n }",
"public String getAppid() {\n return appid;\n }",
"@Override\n\tpublic void setUserId(long userId) {\n\t\t_scienceApp.setUserId(userId);\n\t}",
"public void setId(User user) {\n this.id = new GoogleInfoKey(user);\n }",
"public abstract String getApplicationId();",
"public void setAppID(String appID) {\n this.appID = appID;\n }",
"public static void setAppId(String id) {\n if (Platform.appId == null) {\n Platform.appId = id;\n // reset originId\n Platform.originId = null;\n log.info(\"application instance ID set to {}\", Platform.appId);\n } else {\n throw new IllegalArgumentException(\"application instance ID is already set\");\n }\n }",
"public String getAppuserid() {\n return appuserid;\n }",
"private String getLuisAppId() {\n return this.getString(R.string.luisAppID);\n }",
"public void setIdUser(int value) {\n this.idUser = value;\n }",
"public void setIduser(int aIduser) {\n iduser = aIduser;\n }",
"public void setAppName(String appName);",
"boolean hasUserAppId();",
"boolean hasUserAppId();",
"public void setAuthId(java.lang.String param){\r\n \r\n if (param != null){\r\n //update the setting tracker\r\n localAuthIdTracker = true;\r\n } else {\r\n localAuthIdTracker = false;\r\n \r\n }\r\n \r\n this.localAuthId=param;\r\n \r\n\r\n }",
"public AppID getIdentifier () ;",
"public void setAppId(Long AppId) {\n this.AppId = AppId;\n }",
"public void setID(String username){\n this.clientID = username+\": \"+clientID;\n \n }",
"public String getAppId() {\r\n return appId;\r\n }",
"public void setUser1X_ID (int User1X_ID);",
"void setUser(final ApplicationUser user);",
"public void setUserid(java.lang.String value) {\n this.userid = value;\n }",
"public boolean setClient(Object clientApp){\r\n if (clientApp==null) return (false);\r\n varContextObject=clientApp; \r\n varContextFields=clientApp.getClass().getFields();\r\n return (true);\r\n }",
"public void setId_user(int id_user) {\r\n this.id_user = id_user;\r\n }",
"Appinfo createAppinfo();",
"public String getAppID() {\n return appID;\n }",
"public void setUser1W_ID (int User1W_ID);",
"public Builder setAppId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n appId_ = value;\n onChanged();\n return this;\n }",
"public Builder setAppId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n appId_ = value;\n onChanged();\n return this;\n }",
"public Long getAppId() {\n return this.AppId;\n }",
"private void setUserId(int value) {\n \n userId_ = value;\n }",
"@Attribute(order = 200, validators = { RequiredValueValidator.class })\n\t\tString applicationId();",
"public void setId_user(int id_user) {\n this.id_user = id_user;\n }",
"@Override\n\tpublic String getAppId() {\n\t\treturn app.getAppId();\n\t}",
"public void setAppuserid(String appuserid) {\n this.appuserid = appuserid == null ? null : appuserid.trim();\n }",
"@Override\n\tpublic void setApplicationId(long applicationId) {\n\t\t_userSync.setApplicationId(applicationId);\n\t}",
"void setDefaultApp(String id);",
"public void setApp(PR1 application){\n this.application = application;\n }",
"public void setUserId(long userId);",
"public void setUserId(long userId);",
"public void setUserId(long userId);",
"public void setUserId(long userId);",
"public void setUser1_ID (int User1_ID);",
"public void setUser1_ID (int User1_ID);",
"public void setIdUser(String idUser) {\n\t\tthis.idUser = idUser;\n\t}",
"Builder fromApp(ApplicationId appId);",
"String getComponentAppId();",
"public void setUserId(Long userId)\n/* */ {\n/* 80 */ this.userId = userId;\n/* */ }",
"public String getUserID();",
"public void setBundleID(long param){\n localBundleIDTracker = true;\n \n this.localBundleID=param;\n \n\n }",
"public void setUser1Y_ID (int User1Y_ID);",
"public AppUser(Long in_userId) {\r\n\t\tthis.setUserId(in_userId);\r\n\t}",
"void setComponentAppId(String componentAppId);",
"public interface AppIdCallback {\n String getAppId();\n}",
"public void setCallingUser(entity.User value);",
"public void setPresentid(java.lang.String param){\r\n \r\n if (param != null){\r\n //update the setting tracker\r\n localPresentidTracker = true;\r\n } else {\r\n localPresentidTracker = false;\r\n \r\n }\r\n \r\n this.localPresentid=param;\r\n \r\n\r\n }",
"public void setApId(long value) {\n this.apId = value;\n }",
"public interface BugRegisterInfor {\n String APP_ID = \"6b82b51788\";\n String APP_KEY = \"09872b4e-8da9-442c-b1ac-4e904829e2d8\";\n}",
"public void setUserid(Integer userid) {\n this.userid = userid;\n }",
"public void setUserid(Integer userid) {\n this.userid = userid;\n }",
"public void setUserid(Integer userid) {\n this.userid = userid;\n }",
"public void setUserid(Integer userid) {\n this.userid = userid;\n }",
"public void setUserid(Integer userid) {\n this.userid = userid;\n }",
"public void setUserid(Integer userid) {\n this.userid = userid;\n }",
"public void setUserid(Integer userid) {\n this.userid = userid;\n }",
"public void setUserid(Integer userid) {\n this.userid = userid;\n }",
"public void setUserid(Integer userid) {\n this.userid = userid;\n }",
"public void setUserid(Integer userid) {\n this.userid = userid;\n }",
"public void setUserid(Integer userid) {\n this.userid = userid;\n }",
"public void setUserid(Integer userid) {\n this.userid = userid;\n }",
"String getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();"
] | [
"0.7626253",
"0.7626253",
"0.63556314",
"0.61067635",
"0.60612375",
"0.60389894",
"0.5815697",
"0.5789717",
"0.5772906",
"0.5772335",
"0.57101506",
"0.56953317",
"0.5684587",
"0.5684587",
"0.5673191",
"0.5663154",
"0.56600285",
"0.5626862",
"0.5620631",
"0.5615524",
"0.5601279",
"0.5576802",
"0.556687",
"0.55611867",
"0.55503917",
"0.55503917",
"0.55350137",
"0.5507859",
"0.5486905",
"0.5465032",
"0.54636663",
"0.5451418",
"0.54310024",
"0.54261076",
"0.54247785",
"0.54241157",
"0.542239",
"0.5420196",
"0.5405545",
"0.5391938",
"0.5391938",
"0.53593874",
"0.53549695",
"0.5348362",
"0.5343073",
"0.53355235",
"0.53350383",
"0.532761",
"0.532403",
"0.53147274",
"0.53033334",
"0.53033334",
"0.53033334",
"0.53033334",
"0.5302956",
"0.5302956",
"0.530188",
"0.53011423",
"0.53010184",
"0.5299818",
"0.5285601",
"0.52840763",
"0.528152",
"0.5275066",
"0.5262592",
"0.52527887",
"0.52220076",
"0.5217533",
"0.5215779",
"0.5208883",
"0.5193594",
"0.5193594",
"0.5193594",
"0.5193594",
"0.5193594",
"0.5193594",
"0.5193594",
"0.5193594",
"0.5193594",
"0.5193594",
"0.5193594",
"0.5193594",
"0.5192268",
"0.51518315",
"0.51518315",
"0.51518315",
"0.51518315",
"0.51518315",
"0.51518315",
"0.51518315",
"0.51518315",
"0.51518315",
"0.51518315",
"0.51518315",
"0.51518315",
"0.51518315",
"0.51518315",
"0.51518315",
"0.51518315"
] | 0.6751714 | 3 |
string concept_id = 2; | java.lang.String getConceptId(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getConcept();",
"public static void getRoomConcept(String concept)\n\t{\n\t\t\n\t}",
"Concept getConcept(String id);",
"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();",
"java.lang.String getStringId();",
"java.lang.String getStringId();",
"String getIdNumber();",
"String mo10312id();",
"public void setIdAuthority(String theString) {\n\t \r\n }",
"com.google.protobuf.ByteString\n getConceptIdBytes();",
"String labPlanId();",
"String experimentId();",
"public void setID(String value) {\n tokenString_ID = value;\n }",
"@DISPID(-2147417110)\n @PropPut\n void id(\n java.lang.String rhs);",
"java.lang.String getID();",
"@XmlElement\n private Long getConceptId() {\n return concept != null ? concept.getId() : null;\n }",
"public String getConcept() {\n\t\treturn concept;\n\t}",
"public String getIdentifierString();",
"String getID();",
"String getID();",
"String getID();",
"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();",
"java.lang.String getId();",
"java.lang.String getRecognitionId();",
"public static String getZDLElementTypeId(String concept) {\r\n\t\tString elementTypeId = null;\r\n\t\tif (concept != null) {\r\n\t\t\telementTypeId = ZDLElementType.ZDL_ELEMENT_TYPE_ID__BASE\r\n\t\t\t\t+ UML2Util.getValidJavaIdentifier(concept.replaceAll(\":\", //$NON-NLS-1$\r\n\t\t\t\t\t\"_\")); //$NON-NLS-1$\r\n\t\t}\r\n\t\treturn elementTypeId;\r\n\t}",
"java.lang.String getIdentifier();",
"public String getId(String s){\n for (int i = 0; i<length; i++){\n if(wallList.get(i).getName().equalsIgnoreCase(s))\n id = wallList.get(i).getId();\n }\n return id;\n }",
"private String putUnderscore(String concept) {\n\t\tStringBuffer newConcept = new StringBuffer(\"\");\n\t\t// concept = concept.replace(\" \", \"_\");\n\t\tStringTokenizer token = new StringTokenizer(concept, \" \");\n\t\tboolean firstTest = true;\n\t\twhile (token.hasMoreTokens()) {\n\t\t\tif (!firstTest) {\n\t\t\t\tnewConcept.append(\"_\");\n\t\t\t}\n\t\t\tfirstTest = false;\n\t\t\tString str = (String) token.nextElement();\n\t\t\tnewConcept.append(str);\n\t\t}\n\n\t\tconcept = newConcept.toString();\n\n\t\treturn concept;\n\n\t}",
"int getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"Concept getConceptName();",
"String getSlingId();",
"private String idString(int occurrence) {\n if (occurrence == 0) {\n return null;\n }\n String stringRep = \"\";\n while (occurrence > 0) {\n // generate character from A-Z and add to stringRep\n char nextChar = (char) ((occurrence - 1) % 26 + 'A');\n stringRep = nextChar + stringRep;\n occurrence = (occurrence - 1) / 26;\n }\n return stringRep;\n }",
"int getQuestID();"
] | [
"0.64319813",
"0.61727816",
"0.6135722",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.5804606",
"0.58017325",
"0.58017325",
"0.578562",
"0.5775669",
"0.57229006",
"0.5672262",
"0.5670577",
"0.5658011",
"0.561288",
"0.5582229",
"0.5571544",
"0.5569897",
"0.5566465",
"0.5555172",
"0.55440736",
"0.55440736",
"0.55440736",
"0.55440736",
"0.55150753",
"0.55150753",
"0.55150753",
"0.55150753",
"0.55150753",
"0.55150753",
"0.55150753",
"0.55150753",
"0.55150753",
"0.55150753",
"0.55150753",
"0.55150753",
"0.55150753",
"0.55150753",
"0.55150753",
"0.55150753",
"0.55150753",
"0.55150753",
"0.55150753",
"0.5513496",
"0.5506321",
"0.5463247",
"0.54490435",
"0.5445132",
"0.541152",
"0.54113454",
"0.54113454",
"0.54113454",
"0.54113454",
"0.54113454",
"0.54113454",
"0.54113454",
"0.54110456",
"0.5390866",
"0.53734297",
"0.53322667"
] | 0.72886676 | 0 |
string concept_id = 2; | com.google.protobuf.ByteString
getConceptIdBytes(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getConceptId();",
"String getConcept();",
"public static void getRoomConcept(String concept)\n\t{\n\t\t\n\t}",
"Concept getConcept(String id);",
"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();",
"java.lang.String getStringId();",
"java.lang.String getStringId();",
"String getIdNumber();",
"String mo10312id();",
"public void setIdAuthority(String theString) {\n\t \r\n }",
"String labPlanId();",
"String experimentId();",
"public void setID(String value) {\n tokenString_ID = value;\n }",
"@DISPID(-2147417110)\n @PropPut\n void id(\n java.lang.String rhs);",
"java.lang.String getID();",
"@XmlElement\n private Long getConceptId() {\n return concept != null ? concept.getId() : null;\n }",
"public String getConcept() {\n\t\treturn concept;\n\t}",
"public String getIdentifierString();",
"String getID();",
"String getID();",
"String getID();",
"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();",
"java.lang.String getId();",
"java.lang.String getRecognitionId();",
"public static String getZDLElementTypeId(String concept) {\r\n\t\tString elementTypeId = null;\r\n\t\tif (concept != null) {\r\n\t\t\telementTypeId = ZDLElementType.ZDL_ELEMENT_TYPE_ID__BASE\r\n\t\t\t\t+ UML2Util.getValidJavaIdentifier(concept.replaceAll(\":\", //$NON-NLS-1$\r\n\t\t\t\t\t\"_\")); //$NON-NLS-1$\r\n\t\t}\r\n\t\treturn elementTypeId;\r\n\t}",
"java.lang.String getIdentifier();",
"public String getId(String s){\n for (int i = 0; i<length; i++){\n if(wallList.get(i).getName().equalsIgnoreCase(s))\n id = wallList.get(i).getId();\n }\n return id;\n }",
"private String putUnderscore(String concept) {\n\t\tStringBuffer newConcept = new StringBuffer(\"\");\n\t\t// concept = concept.replace(\" \", \"_\");\n\t\tStringTokenizer token = new StringTokenizer(concept, \" \");\n\t\tboolean firstTest = true;\n\t\twhile (token.hasMoreTokens()) {\n\t\t\tif (!firstTest) {\n\t\t\t\tnewConcept.append(\"_\");\n\t\t\t}\n\t\t\tfirstTest = false;\n\t\t\tString str = (String) token.nextElement();\n\t\t\tnewConcept.append(str);\n\t\t}\n\n\t\tconcept = newConcept.toString();\n\n\t\treturn concept;\n\n\t}",
"int getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"Concept getConceptName();",
"String getSlingId();",
"private String idString(int occurrence) {\n if (occurrence == 0) {\n return null;\n }\n String stringRep = \"\";\n while (occurrence > 0) {\n // generate character from A-Z and add to stringRep\n char nextChar = (char) ((occurrence - 1) % 26 + 'A');\n stringRep = nextChar + stringRep;\n occurrence = (occurrence - 1) / 26;\n }\n return stringRep;\n }",
"int getQuestID();"
] | [
"0.7289324",
"0.64320993",
"0.6172994",
"0.6135658",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58050615",
"0.58017826",
"0.58017826",
"0.57859427",
"0.57755274",
"0.5723301",
"0.5670667",
"0.5658383",
"0.5613306",
"0.55819654",
"0.5571862",
"0.557067",
"0.5566659",
"0.55553627",
"0.55443054",
"0.55443054",
"0.55443054",
"0.55443054",
"0.5515606",
"0.5515606",
"0.5515606",
"0.5515606",
"0.5515606",
"0.5515606",
"0.5515606",
"0.5515606",
"0.5515606",
"0.5515606",
"0.5515606",
"0.5515606",
"0.5515606",
"0.5515606",
"0.5515606",
"0.5515606",
"0.5515606",
"0.5515606",
"0.5515606",
"0.5514148",
"0.55066216",
"0.5463484",
"0.54494387",
"0.5444819",
"0.54116803",
"0.5411553",
"0.5411553",
"0.5411553",
"0.5411553",
"0.5411553",
"0.5411553",
"0.5411553",
"0.54109734",
"0.5391414",
"0.5373447",
"0.53327036"
] | 0.56729007 | 52 |
repeated .clarifai.api.ConceptLanguage concept_languages = 3; | java.util.List<com.clarifai.grpc.api.ConceptLanguage>
getConceptLanguagesList(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"com.clarifai.grpc.api.ConceptLanguage getConceptLanguages(int index);",
"java.util.List<? extends com.clarifai.grpc.api.ConceptLanguageOrBuilder> \n getConceptLanguagesOrBuilderList();",
"com.clarifai.grpc.api.ConceptLanguageOrBuilder getConceptLanguagesOrBuilder(\n int index);",
"int getConceptLanguagesCount();",
"speech.multilang.Params.DecisionPointParams.Type getType();",
"public void addLanguage(String value) {\n/* 230 */ addStringToBag(\"language\", value);\n/* */ }",
"default List<String> assignedConcepts(Source code){\n return assignedConcepts(code, ImmutableSet.of());\n }",
"speech.multilang.Params.SemanticLangidParams getSemanticLangidParams();",
"@Test\n public void listAllAvailableLanguages() throws IOException {\n System.out.println(\n \"Language preprocessing components for the following languages are available:\\n \"\n + String.join(\", \", LanguageComponents.languages()));\n }",
"Builder addLearningResourceType(Text value);",
"@DISPID(-2147413012)\n @PropGet\n java.lang.String language();",
"@DISPID(-2147413103)\n @PropGet\n java.lang.String lang();",
"interface Language {\n HashMap<String,String> colorMap= new HashMap<>();\n String getColor(String myToken);\n String defaultColor = \"black\";\n}",
"public LanguageSkill() {\n\t}",
"String getConcept();",
"void mo1927a(NLPResponseData nLPResponseData);",
"public Alternatives getAlternatives_3() { return cAlternatives_3; }",
"speech.multilang.Params.DecisionPointParams getDecisionPointParams();",
"public String[] getLanguages() {\n/* 238 */ return getStringArray(\"language\");\n/* */ }",
"public interface DublinCoreConstants {\n \n /** Creates a new instance of Class */\n public static int DC_TITLE = 0;\n public static int DC_CREATOR = 1;\n public static int DC_SUBJECT = 2;\n public static int DC_DATE = 3;\n public static int DC_TYPE= 4;\n public static int DC_FORMAT= 5;\n public static int DC_IDENTIFIER = 6;\n public static int DC_COLLECTION = 7;\n public static int DC_COVERAGE = 8;\n \n public static int SUPPORTED_NUMBER = 9;\n \n public static final String[] DC_FIELDS = {\"title\",\"creator\",\"subject\",\"date\",\"type\",\"format\",\"identifier\",\"collection\",\"coverage\"};\n public static final String DC_NAMESPACE = \"dc:\";\n \n}",
"speech.multilang.Params.ScoringControllerParams.Type getType();",
"public static void initializeToolsAndResourcesForDemo(IDictionary dict) throws MalformedURLException, IOException {\n wordnet_dict = dict;\n wordnet_dict.open();\n\n // Choose wordnet sources to be used\n wordnetResources.add(\"synonyms\");\n //wordnetResources.add(\"antonyms\");\n //wordnetResources.add(\"hypernyms\");\n\n Properties split_props = new Properties();\n //Properties including lemmatization\n //props.put(\"annotators\", \"tokenize, ssplit, pos, lemma\");\n //Properties without lemmatization\n split_props.put(\"annotators\", \"tokenize, ssplit, pos\");\n split_props.put(\"tokenize.language\", \"en\");\n split_pipeline = new StanfordCoreNLP(split_props);\n\n Properties lemma_props = new Properties();\n lemma_props.put(\"annotators\", \"tokenize, ssplit, pos, lemma\");\n lemma_props.put(\"tokenize.language\", \"en\");\n lemma_pipeline = new StanfordCoreNLP(lemma_props);\n\n Properties entityMentions_props = new Properties();\n entityMentions_props.put(\"annotators\", \"tokenize, ssplit, truecase, pos, lemma, ner, entitymentions\");\n entityMentions_props.put(\"tokenize.language\", \"en\");\n entityMentions_props.put(\"truecase.overwriteText\", \"true\");\n entityMentions_pipeline = new StanfordCoreNLP(entityMentions_props);\n\n Properties compound_props = new Properties();\n compound_props.put(\"annotators\", \"tokenize, ssplit, truecase, pos, parse\");\n compound_props.put(\"tokenize.language\", \"en\");\n compound_props.put(\"truecase.overwriteText\", \"true\");\n compounds_pipeline = new StanfordCoreNLP(compound_props);\n\n spotlight = new Spotlight();\n\n chanel = new LODSyndesisChanel();\n\n }",
"public void setJurisdictions(entity.AppCritJurisdiction[] value);",
"@Test\n void adjectivesCommonList() {\n //boolean flag = false;\n NLPAnalyser np = new NLPAnalyser();\n List<CoreMap> sentences = np.nlpPipeline(\"RT This made my day good; glad @JeremyKappell is standing up against bad #ROC’s disgusting mayor. \"\n + \"Former TV meteorologist Jeremy Kappell suing real Mayor Lovely Warren\"\n + \"https://t.co/rJIV5SN9vB worst(Via NEWS 8 WROC)\");\n ArrayList<String> adj = np.adjectives(sentences);\n for (String common : np.getCommonWords()) {\n assertFalse(adj.contains(common));\n }\n }",
"Builder addInLanguage(Language.Builder value);",
"public Language() {\r\n\t}",
"private void buildLanguageModel() {\n int total = 0;\n Map<Integer, Integer> wordCount = new HashMap<>();\n for (List<Integer> story : corpus.getStories()) {\n for (Integer word : story) {\n total++;\n if (wordCount.get(word) == null) wordCount.put(word, 0);\n wordCount.put(word, wordCount.get(word) + 1);\n }\n }\n wordValues = new HashMap<>();\n for (Map.Entry<Integer, Integer> entry : wordCount.entrySet()) {\n wordValues.put(entry.getKey(), total * 1.0 / entry.getValue());\n }\n }",
"public interface Bottlable {\n\n /**\n * Get the number of optional attribute fields.\n *\n * @return number of optional attribute fields\n */\n int getNumberOfOptionalAttributeFields();\n\n\n /**\n * Get the number of necessary attributes for the key generation.\n *\n * @return number of necessary attributes\n */\n int getNumberOfNecessaryAttributes();\n\n /**\n * Get the number of optional attributes, for a given field of optional attributes.\n *\n * @param field the number of the optional attribute field, for which the number of\n * attributes is queried.\n * @return number of optional attributes\n */\n int getNumberOfOptionalAttributes(final int field);\n\n /**\n * Get the number of optional attributes that must be identical for a successful match.\n *\n * @param field the number of the optional attribute field, for which the similarity threshold is\n * queried\n * @return number of necessary optional attributes, must be smaller than getNumberOfOptionalAttributes()\n */\n int getSimilarityThreshold(final int field);\n\n /**\n * Return a single necessary Attribute. Must return at least getNumberOfNecessaryAttributes()\n * times a valid not null String.\n *\n * @return a necessary Attribute\n */\n @NonNull\n String getNecessaryAttribute();\n\n /**\n * Return a single optional Attribute. Must return at least getNumberOfOptionalAttributes() times a valid not null String.\n *\n * @param field the number of the optional attribute field, for which the similarity threshold is\n * queried\n * @return an optional Attribute\n */\n @NonNull\n String getOptionalAttribute(final int field);\n}",
"public interface LibraryConstant {\n\n public interface LanguageConstant {\n\n public static String JAVA=\"JAVA\";\n public static String C=\"C\";\n public static String CPP=\"C++\";\n }\n\n public interface StyleConstant {\n\n //pre-defined Styles\n\n public static final String NORMAL=\"NORMAL\";\n public static final String BOLD=\"BOLD\";\n public static final String ITALIC=\"ITALIC\";\n public static final String UNDERLINE=\"UNDERLINE\";\n public static final String SUPERSCRIPT=\"SUPERSCRIPT\";\n public static final String SUBSCRIPT=\"SUBSCRIPT\";\n\n\n }\n}",
"default List<String> assignedConcepts(List<Source> sources){\n return assignedConcepts(10, sources);\n }",
"@ApiModelProperty(required = true, value = \"Language codes for the schemas available.\")\n @JsonProperty(\"Languages\")\n public List<String> getLanguages() {\n return languages;\n }",
"public static Set<String> getEnglishWords()\n{\n return english_words;\n}",
"public Alternatives getAlternatives_9() { return cAlternatives_9; }",
"public interface DictionaryCorrectior {\n\n\t/**\n\t * get correction word that have the most possibility from the misspelled text\n\t * @author liyuan\n\t * \n\t */\n\tpublic String getCorrectionWord(String misspell);\n\t\n\t\n\t\n\t/**\n\t * get a list of correction words from the misspelled text\n\t * @author liyuan\n\t * \n\t */\n\tpublic String[] getCorrectionList(String misspell);\n}",
"public interface LanguageProvider {\n\tLanguageService study();\n}",
"ConceptsType createConceptsType();",
"public static void main(String[] args){\r\n Language myLang = new Language(\"Willish\", 5, \"Mars\", \"verb-noun-verb-adjective\");\r\n Mayan mayan = new Mayan(\"Ki'che'\", 2330000);\r\n SinoTibetan sino1 = new SinoTibetan(\"Chinese Tibetan\", 100000);\r\n SinoTibetan sino2 = new SinoTibetan(\"Tibetan\", 200000);\r\n ArrayList<Language> langList = new ArrayList<Language>();\r\n langList.add(myLang);\r\n langList.add(mayan);\r\n langList.add(sino1);\r\n langList.add(sino2);\r\n \r\n for (Language allLangs : langList){\r\n allLangs.getInfo();\r\n }\r\n }",
"@DefaultLocale(\"fr\")\n@Generate(format={\"com.google.gwt.i18n.rebind.format.PropertiesFormat\"},locales={\"en\"})\npublic interface I18nConsts extends Constants {\n\t@DefaultStringArrayValue({\"France\",\"Espagne\",\"Belgique\"})\n\tString[] countries();\n}",
"Builder addLearningResourceType(String value);",
"MotifLearner(){\n notes = new ArrayList<>();\n times = new ArrayList<>();\n }",
"@DISPID(-2147413012)\n @PropPut\n void language(\n java.lang.String rhs);",
"public abstract void newSpeechConcepts(long ms, int n);",
"public interface LanguageInterface {\n public void setLanguage();\n}",
"private EnumUnderTest( String... strings ) {\n\t\tlanguages = Arrays.asList( strings );\n\t}",
"int countByExample(RepStuLearningExample example);",
"@Test\n public void testSpecies() throws IOException, UIMAException {\n /*String Text = \"In this text we talk about humans and mice. Because a mouse is no killifish nor a caenorhabditis elegans. Thus, c. elegans is now abbreviated as well as n. furzeri .\";\n\n JCas jCas = JCasFactory.createText(Text);\n\n //AnalysisEngineDescription engine = createEngineDescription(LinnaeusSpecies.class);\n AnalysisEngineDescription engine = createEngineDescription(LinnaeusSpecies.class);\n SimplePipeline.runPipeline(jCas, engine);\n\n String[] casSpecies = (String[]) JCasUtil.select(jCas, Organism.class).stream().map(a -> a.getCoveredText()).toArray(String[]::new);\n //String[] casID = (String[]) JCasUtil.select(jCas, Organism.class).stream().map(b -> b.getId()).toArray(String[]::new);\n\n String[] testSpecies = new String[] {\"humans\", \"mice\", \"mouse\", \"killifish\", \"caenorhabditis elegans\", \"c. elegans\", \"n. furzeri\"};\n //String[] testID = new String[] {\"9606\", \"10090\", \"10090\", \"34780\", \"6239\", \"6239\", \"105023\"};\n\n assertArrayEquals(testSpecies, casSpecies);*/\n //assertArrayEquals(testID, casID);\n }",
"public interface ApiPathConstants {\n\n // The media type constants\n String APPLICATION_JSON = \"application/json\";\n String ACCEPT_APPLICATION_JSON = \"Accept=application/json\";\n\n // Need to match below variables according to the cbr project\n String DEFAULT_CASEBASE = \"CaseBase0\";\n String DEFAULT_CONCEPT = \"Car\";\n String DEFAULT_AMAL_FUNCTION = \"CarFunc\";\n String DEFAULT_ATTR_ID = \"Color\";\n\n // The number of retrieved cases per query as preferred by the user.\n String DEFAULT_NO_OF_CASES = \"-1\";\n String NO_OF_RETURNED_CASES = \"k\";\n\n\n // myCBR-rest API: core vocabulary - single\n String PROJECT = \"project\";\n String CONCEPT \t= \"concept\";\n String CASEBASE \t= \"casebase\";\n String AMAL_FUNCTION= \"amalgamationFunction\";\n String ATTR \t= \"attribute\";\n String CASE \t= \"case\";\n String INSTANCE\t= \"instance\";\n String VALUE \t= \"value\";\n String SIM_FUNCTION = \"similarityFunction\";\n String LIST = \"list\";\n String NEW = \"new\";\n\n String EPHEMERAL \t= \"ephemeral\";\n String ANALYTICS \t= \"analytics\";\n\n\n // myCBR-rest API: core vocabulary - multiple\n String S \t\t\t= \"s\";\n String CONCEPTS \t\t= CONCEPT \t+ S;\n String CASEBASES \t\t= CASEBASE \t+ S;\n String AMAL_FUNCTIONS\t= AMAL_FUNCTION + S;\n String ATTRS \t\t= ATTR \t\t+ S;\n String CASES \t\t= CASE \t\t+ S;\n String INSTANCES\t\t= INSTANCE \t+ S;\n String VALUES \t\t= VALUE \t+ S;\n String SIM_FUNCTIONS \t= SIM_FUNCTION\t+ S;\n\n\n // myCBR-rest API: ID vocabulary\n String ID \t\t\t= \"ID\";\n String CONCEPT_ID \t\t= CONCEPT \t+ ID;\n String CASEBASE_ID \t\t= CASEBASE \t+ ID;\n String AMAL_FUNCTION_ID \t= AMAL_FUNCTION + ID;\n String ATTR_ID \t\t= ATTR \t\t+ ID;\n String NEW_ATTR_ID \t\t= NEW + ATTR \t\t+ ID;\n String ATTR_IDS = ATTR \t\t+ ID + S;\n String CASE_ID \t\t= CASE \t\t+ ID;\n String INSTANCE_ID \t\t= INSTANCE \t+ ID;\n String SIM_FUNCTION_ID\t= SIM_FUNCTION \t+ ID;\n //String ATTR_ID_LIST \t\t= ATTR \t\t+ ID + LIST;\n\n\n // myCBR-rest API: type vocabulary specific names\n String TYPE \t\t= \"Type\";\n String AMAL_FUNCTION_TYPE \t= AMAL_FUNCTION + TYPE;\n String ATTR_TYPE \t \t= ATTR + TYPE;\n\n\n // Path variables\n\n // Path pattern: /___ss\n String PATH \t\t=\"/\";\n String PATH_PROJECT = PATH + PROJECT;\n String PATH_CONCEPTS \t= PATH + CONCEPTS;\n String PATH_CASEBASES \t= PATH + CASEBASES;\n String PATH_AMAL_FUNCTIONS = PATH + AMAL_FUNCTIONS;\n String PATH_CASES \t\t= PATH + CASES;\n String PATH_ATTRIBUTES \t= PATH + ATTRS;\n String PATH_VALUE_RANGE = PATH + VALUE + \"Range\";\n String PATH_SIM_FUNCTIONS = PATH + SIM_FUNCTIONS;\n\n String PATH_EPHEMERAL = PATH + EPHEMERAL;\n String PATH_ANALYTICS = PATH + ANALYTICS;\n\n\n // Path pattern: /___s/{___ID}\n String PATH_CONCEPT_ID\t = PATH_CONCEPTS + \"/{\" + CONCEPT_ID \t + \"}\";\n String PATH_CASEBASE_ID \t = PATH_CASEBASES + \"/{\" + CASEBASE_ID \t + \"}\";\n String PATH_AMAL_FUNCTION_ID = PATH_AMAL_FUNCTIONS + \"/{\" + AMAL_FUNCTION_ID+ \"}\";\n String PATH_CASE_ID \t = PATH_CASES + \"/{\" + CASE_ID\t + \"}\";\n String PATH_ATTR_ID \t = PATH_ATTRIBUTES + \"/{\" + ATTR_ID + \"}\";\n String PATH_SIM_FUNCTION_ID = PATH_SIM_FUNCTIONS + \"/{\" + SIM_FUNCTION_ID + \"}\";\n //String PATH_ATTR_ID_LIST \t = PATH_ATTRIBUTES + \"/{\" + ATTR_ID_LIST + \"}\";\n String PATH_NEW_ATTR_ID \t = PATH_ATTRIBUTES + \"/{\" + NEW_ATTR_ID + \"}\";\n\n\n // Path pattern: /concepts/{conceptID}/___s\n String PATH_CONCEPT_CASEBASES \t= PATH_CONCEPT_ID + PATH_CASEBASES;\n String PATH_CONCEPT_AMAL_FUNCTIONS = PATH_CONCEPT_ID + PATH_AMAL_FUNCTIONS;\n String PATH_CONCEPT_CASES \t \t= PATH_CONCEPT_ID + PATH_CASES;\n String PATH_CONCEPT_ATTRS \t \t= PATH_CONCEPT_ID + PATH_ATTRIBUTES;\n\n\n // Path pattern: /concepts/{conceptID}/___s/{___ID}\n String PATH_CONCEPT_CASEBASE_ID \t = PATH_CONCEPT_ID + PATH_CASEBASE_ID;\n String PATH_CONCEPT_AMAL_FUNCTION_ID = PATH_CONCEPT_ID + PATH_AMAL_FUNCTION_ID;\n String PATH_CONCEPT_CASE_ID \t = PATH_CONCEPT_ID + PATH_CASE_ID;\n String PATH_CONCEPT_ATTR_ID\t \t = PATH_CONCEPT_ID + PATH_ATTR_ID;\n //String PATH_CONCEPT_ATTR_ID_LIST\t \t = PATH_CONCEPT_ID + PATH_ATTR_ID_LIST;\n\n\n //Path pattern: /concepts/{conceptID}/casebases/{casebaseID}/___s\n String PATH_CONCEPT_CASEBASE_AMAL_FUNCTIONS = PATH_CONCEPT_CASEBASE_ID + PATH_AMAL_FUNCTIONS;\n String PATH_CONCEPT_CASEBASE_CASES = PATH_CONCEPT_CASEBASE_ID + PATH_CASES;\n\n //Path pattern: /concepts/{conceptID}/casebases/{casebaseID}/___s/{___ID}\n String PATH_CONCEPT_CASEBASE_AMAL_FUNCTION_ID = PATH_CONCEPT_CASEBASE_ID + PATH_AMAL_FUNCTION_ID;\n String PATH_CONCEPT_CASEBASE_CASE_ID = PATH_CONCEPT_CASEBASE_ID + PATH_CASE_ID;\n\n //Path pattern: /concepts/{conceptID}/attributes/{attributeID}/valueRange\n String PATH_CONCEPT_ATTR_VALUE_RANGE = PATH_CONCEPT_ATTR_ID + PATH_VALUE_RANGE;\n\n //Path pattern: /concepts/{conceptID}/attributes/{attributeID}/___s\n String PATH_CONCEPT_ATTR_SIM_FUNCTIONS = PATH_CONCEPT_ATTR_ID + PATH_SIM_FUNCTIONS;\n\n //Path pattern: /concepts/{conceptID}/attributes/{attributeID}/___s/{___ID}\n String PATH_CONCEPT_ATTR_SIM_FUNCTION_ID = PATH_CONCEPT_ATTR_ID + PATH_SIM_FUNCTION_ID;\n\n\n //Path pattern: /ephemeral/concepts/{conceptID}/amalgamationFunctions/{amalgamationFunctionID}s\n String PATH_EPHEMERAL_CONCEPT_AMAL_FUNCTION_ID = PATH_EPHEMERAL + PATH_CONCEPT_AMAL_FUNCTION_ID;\n\n //Path pattern: /analytics/concepts/{conceptID}/amalgamationFunctions/{amalgamationFunctionID}\n String PATH_ANALYTICS_CONCEPT_AMAL_FUNCTION_ID = PATH_ANALYTICS + PATH_CONCEPT_AMAL_FUNCTION_ID;\n\n String COMPUTE_SELF_SIMLARITY = \"computeSelfSimilarity\";\n String RETRIEVAL_BY_CASE_IDS = \"retrievalByCaseIDs\";\n String RETRIEVAL_BY_CASE_ID_WITH_CONTENT = \"retrievalByCaseIDWithContent\";\n\n // Path pattern: /___\n String PATH_SELF_SIMLARITY \t\t= PATH + COMPUTE_SELF_SIMLARITY;\n String PATH_RETRIEVAL \t\t\t= PATH + RETRIEVAL_BY_CASE_IDS;\n String PATH_RETRIEVAL_BY_CASE_ID_WITH_CONTENT \t= PATH + RETRIEVAL_BY_CASE_ID_WITH_CONTENT;\n\n String PATH_CONCEPT_CASEBASE_SELF_SIMLARITY = PATH_CONCEPT_CASEBASE_ID + PATH_SELF_SIMLARITY;\n\n String PATH_DEFAULT_EPHEMERAL = PATH_EPHEMERAL + PATH_CONCEPT_CASEBASE_AMAL_FUNCTION_ID;\n String PATH_EPHEMERAL_RETRIEVAL = PATH_DEFAULT_EPHEMERAL + PATH_RETRIEVAL;\n String PATH_EPHEMERAL_RETRIEVAL_WITH_CONTENT = PATH_DEFAULT_EPHEMERAL + PATH_RETRIEVAL_BY_CASE_ID_WITH_CONTENT;\n String PATH_EPHEMERAL_SELF_SIMILARITY = PATH_DEFAULT_EPHEMERAL + PATH_SELF_SIMLARITY;\n}",
"FeatureConcept createFeatureConcept();",
"public CandidateAnswerVariant_Type(JCas jcas, Type casType) {\n super(jcas, casType);\n casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());\n\n \n casFeat_occurrences = jcas.getRequiredFeatureDE(casType, \"occurrences\", \"uima.cas.FSList\", featOkTst);\n casFeatCode_occurrences = (null == casFeat_occurrences) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_occurrences).getCode();\n\n \n casFeat_candidateId = jcas.getRequiredFeatureDE(casType, \"candidateId\", \"uima.cas.String\", featOkTst);\n casFeatCode_candidateId = (null == casFeat_candidateId) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_candidateId).getCode();\n\n \n casFeat_text = jcas.getRequiredFeatureDE(casType, \"text\", \"uima.cas.String\", featOkTst);\n casFeatCode_text = (null == casFeat_text) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_text).getCode();\n\n \n casFeat_alternativeNames = jcas.getRequiredFeatureDE(casType, \"alternativeNames\", \"uima.cas.StringList\", featOkTst);\n casFeatCode_alternativeNames = (null == casFeat_alternativeNames) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_alternativeNames).getCode();\n\n \n casFeat_uri = jcas.getRequiredFeatureDE(casType, \"uri\", \"uima.cas.String\", featOkTst);\n casFeatCode_uri = (null == casFeat_uri) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_uri).getCode();\n\n \n casFeat_docId = jcas.getRequiredFeatureDE(casType, \"docId\", \"uima.cas.String\", featOkTst);\n casFeatCode_docId = (null == casFeat_docId) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_docId).getCode();\n\n }",
"public interface OwlClass extends OwlResource {\n\tenum ALTERNATIVE {\n\t\tCLASS, ENUMERATED\n\t};\n\n\tenum MODALITY {\n\t\tCOMPLETE, PARTIAL\n\t};\n\n\tpublic ALTERNATIVE getAlternative();\n\n\tpublic OwlClassDescription[] getClassDescriptionArray();\n\n\tpublic OwlClassDescription[] getDisjointClassArray();\n\n\tpublic OwlClassDescription[] getEquivalentClassArray();\n\n\tpublic SemanticId[] getIndividualIdArray();\n\n\tpublic MODALITY getModality();\n\n\tpublic OwlClassDescription[] getSubClassOfArray();\n\n}",
"public static void caso31(){\n\t FilterManager fm= new FilterManager(\"resources/stopWordsList.txt\",\"resources/useCaseWeight.properties\");\n\t\t\tQualityAttributeBelongable qualityAttributeBelongable = new OntologyManager(\"file:resources/caso3.owl\",\"file:resources/caso3.repository\",fm);\n\t\t\tMap<QualityAttributeInterface,Double> map = qualityAttributeBelongable.getWordPertenence(\"response1\");\n\t\t\tif(map==null){\n\t\t\t\tSystem.out.println(\"El map es null\");\n\t\t\t}else{\n\t\t\t\tMapUtils.imprimirMap(map);\n\t\t\t}\n\t}",
"List<Language> getAll();",
"CLanguage getClanguage();",
"Lingua getLingua();",
"private Vocabulary() {\n }",
"public interface MetaData {\r\n\r\n\tpublic static final String CV_SBML = \"SBML\";\r\n\r\n\tpublic static final String ET_SBML = \"SBML_import\";\r\n\r\n\tpublic static final String AN_SBO = \"SBO\";\r\n\r\n\tpublic static final String RT_CONSUMED_BY = \"cs_by\";\r\n\r\n\tpublic static final String RT_PRODUCED_BY = \"pd_by\";\r\n\r\n\tpublic static final String RT_REGULATED_BY = \"rg_by\";\r\n\r\n\tpublic static final String RT_TRANSFORMATION_OF = \"transformation_of\";\r\n\r\n\tpublic static final String CC_REACTION = \"Reaction\";\r\n\r\n\tpublic static final String CC_COMPOUND = \"Comp\";\r\n\r\n\tpublic static final String CC_CELCOMP = \"CelComp\";\r\n\r\n}",
"static WordList get(Language language) {\n return switch (language) {\n case ENGLISH -> readResource(\"bip39_english.txt\");\n };\n }",
"Builder addInLanguage(Text value);",
"public Alternatives getAlternatives_11() { return cAlternatives_11; }",
"public void setLanguageList(Language[] languageList) {\n this.languageList = languageList;\n }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }"
] | [
"0.7333542",
"0.6911888",
"0.6803772",
"0.65125555",
"0.55658317",
"0.5514909",
"0.5497754",
"0.5459166",
"0.5378045",
"0.5338909",
"0.53268355",
"0.530514",
"0.5277348",
"0.52727586",
"0.52325135",
"0.52217007",
"0.51904005",
"0.5183695",
"0.517394",
"0.5150441",
"0.5136571",
"0.5101077",
"0.50959027",
"0.50948334",
"0.5088408",
"0.50651485",
"0.50630367",
"0.5047023",
"0.502983",
"0.5028259",
"0.5013519",
"0.4974659",
"0.49592355",
"0.49544743",
"0.4936377",
"0.49356225",
"0.49317366",
"0.49314365",
"0.4926086",
"0.49129292",
"0.49020812",
"0.49018425",
"0.4899164",
"0.4897982",
"0.48935905",
"0.48880023",
"0.4884576",
"0.48804635",
"0.48799944",
"0.4877656",
"0.48681986",
"0.48661616",
"0.4864123",
"0.48519415",
"0.48496643",
"0.48485738",
"0.4845488",
"0.4838871",
"0.48374414",
"0.48363456",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366"
] | 0.70189124 | 1 |
repeated .clarifai.api.ConceptLanguage concept_languages = 3; | com.clarifai.grpc.api.ConceptLanguage getConceptLanguages(int index); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.util.List<com.clarifai.grpc.api.ConceptLanguage> \n getConceptLanguagesList();",
"java.util.List<? extends com.clarifai.grpc.api.ConceptLanguageOrBuilder> \n getConceptLanguagesOrBuilderList();",
"com.clarifai.grpc.api.ConceptLanguageOrBuilder getConceptLanguagesOrBuilder(\n int index);",
"int getConceptLanguagesCount();",
"speech.multilang.Params.DecisionPointParams.Type getType();",
"public void addLanguage(String value) {\n/* 230 */ addStringToBag(\"language\", value);\n/* */ }",
"default List<String> assignedConcepts(Source code){\n return assignedConcepts(code, ImmutableSet.of());\n }",
"speech.multilang.Params.SemanticLangidParams getSemanticLangidParams();",
"@Test\n public void listAllAvailableLanguages() throws IOException {\n System.out.println(\n \"Language preprocessing components for the following languages are available:\\n \"\n + String.join(\", \", LanguageComponents.languages()));\n }",
"Builder addLearningResourceType(Text value);",
"@DISPID(-2147413012)\n @PropGet\n java.lang.String language();",
"@DISPID(-2147413103)\n @PropGet\n java.lang.String lang();",
"interface Language {\n HashMap<String,String> colorMap= new HashMap<>();\n String getColor(String myToken);\n String defaultColor = \"black\";\n}",
"public LanguageSkill() {\n\t}",
"String getConcept();",
"void mo1927a(NLPResponseData nLPResponseData);",
"public Alternatives getAlternatives_3() { return cAlternatives_3; }",
"speech.multilang.Params.DecisionPointParams getDecisionPointParams();",
"public String[] getLanguages() {\n/* 238 */ return getStringArray(\"language\");\n/* */ }",
"public interface DublinCoreConstants {\n \n /** Creates a new instance of Class */\n public static int DC_TITLE = 0;\n public static int DC_CREATOR = 1;\n public static int DC_SUBJECT = 2;\n public static int DC_DATE = 3;\n public static int DC_TYPE= 4;\n public static int DC_FORMAT= 5;\n public static int DC_IDENTIFIER = 6;\n public static int DC_COLLECTION = 7;\n public static int DC_COVERAGE = 8;\n \n public static int SUPPORTED_NUMBER = 9;\n \n public static final String[] DC_FIELDS = {\"title\",\"creator\",\"subject\",\"date\",\"type\",\"format\",\"identifier\",\"collection\",\"coverage\"};\n public static final String DC_NAMESPACE = \"dc:\";\n \n}",
"speech.multilang.Params.ScoringControllerParams.Type getType();",
"public static void initializeToolsAndResourcesForDemo(IDictionary dict) throws MalformedURLException, IOException {\n wordnet_dict = dict;\n wordnet_dict.open();\n\n // Choose wordnet sources to be used\n wordnetResources.add(\"synonyms\");\n //wordnetResources.add(\"antonyms\");\n //wordnetResources.add(\"hypernyms\");\n\n Properties split_props = new Properties();\n //Properties including lemmatization\n //props.put(\"annotators\", \"tokenize, ssplit, pos, lemma\");\n //Properties without lemmatization\n split_props.put(\"annotators\", \"tokenize, ssplit, pos\");\n split_props.put(\"tokenize.language\", \"en\");\n split_pipeline = new StanfordCoreNLP(split_props);\n\n Properties lemma_props = new Properties();\n lemma_props.put(\"annotators\", \"tokenize, ssplit, pos, lemma\");\n lemma_props.put(\"tokenize.language\", \"en\");\n lemma_pipeline = new StanfordCoreNLP(lemma_props);\n\n Properties entityMentions_props = new Properties();\n entityMentions_props.put(\"annotators\", \"tokenize, ssplit, truecase, pos, lemma, ner, entitymentions\");\n entityMentions_props.put(\"tokenize.language\", \"en\");\n entityMentions_props.put(\"truecase.overwriteText\", \"true\");\n entityMentions_pipeline = new StanfordCoreNLP(entityMentions_props);\n\n Properties compound_props = new Properties();\n compound_props.put(\"annotators\", \"tokenize, ssplit, truecase, pos, parse\");\n compound_props.put(\"tokenize.language\", \"en\");\n compound_props.put(\"truecase.overwriteText\", \"true\");\n compounds_pipeline = new StanfordCoreNLP(compound_props);\n\n spotlight = new Spotlight();\n\n chanel = new LODSyndesisChanel();\n\n }",
"public void setJurisdictions(entity.AppCritJurisdiction[] value);",
"@Test\n void adjectivesCommonList() {\n //boolean flag = false;\n NLPAnalyser np = new NLPAnalyser();\n List<CoreMap> sentences = np.nlpPipeline(\"RT This made my day good; glad @JeremyKappell is standing up against bad #ROC’s disgusting mayor. \"\n + \"Former TV meteorologist Jeremy Kappell suing real Mayor Lovely Warren\"\n + \"https://t.co/rJIV5SN9vB worst(Via NEWS 8 WROC)\");\n ArrayList<String> adj = np.adjectives(sentences);\n for (String common : np.getCommonWords()) {\n assertFalse(adj.contains(common));\n }\n }",
"Builder addInLanguage(Language.Builder value);",
"public Language() {\r\n\t}",
"private void buildLanguageModel() {\n int total = 0;\n Map<Integer, Integer> wordCount = new HashMap<>();\n for (List<Integer> story : corpus.getStories()) {\n for (Integer word : story) {\n total++;\n if (wordCount.get(word) == null) wordCount.put(word, 0);\n wordCount.put(word, wordCount.get(word) + 1);\n }\n }\n wordValues = new HashMap<>();\n for (Map.Entry<Integer, Integer> entry : wordCount.entrySet()) {\n wordValues.put(entry.getKey(), total * 1.0 / entry.getValue());\n }\n }",
"public interface Bottlable {\n\n /**\n * Get the number of optional attribute fields.\n *\n * @return number of optional attribute fields\n */\n int getNumberOfOptionalAttributeFields();\n\n\n /**\n * Get the number of necessary attributes for the key generation.\n *\n * @return number of necessary attributes\n */\n int getNumberOfNecessaryAttributes();\n\n /**\n * Get the number of optional attributes, for a given field of optional attributes.\n *\n * @param field the number of the optional attribute field, for which the number of\n * attributes is queried.\n * @return number of optional attributes\n */\n int getNumberOfOptionalAttributes(final int field);\n\n /**\n * Get the number of optional attributes that must be identical for a successful match.\n *\n * @param field the number of the optional attribute field, for which the similarity threshold is\n * queried\n * @return number of necessary optional attributes, must be smaller than getNumberOfOptionalAttributes()\n */\n int getSimilarityThreshold(final int field);\n\n /**\n * Return a single necessary Attribute. Must return at least getNumberOfNecessaryAttributes()\n * times a valid not null String.\n *\n * @return a necessary Attribute\n */\n @NonNull\n String getNecessaryAttribute();\n\n /**\n * Return a single optional Attribute. Must return at least getNumberOfOptionalAttributes() times a valid not null String.\n *\n * @param field the number of the optional attribute field, for which the similarity threshold is\n * queried\n * @return an optional Attribute\n */\n @NonNull\n String getOptionalAttribute(final int field);\n}",
"public interface LibraryConstant {\n\n public interface LanguageConstant {\n\n public static String JAVA=\"JAVA\";\n public static String C=\"C\";\n public static String CPP=\"C++\";\n }\n\n public interface StyleConstant {\n\n //pre-defined Styles\n\n public static final String NORMAL=\"NORMAL\";\n public static final String BOLD=\"BOLD\";\n public static final String ITALIC=\"ITALIC\";\n public static final String UNDERLINE=\"UNDERLINE\";\n public static final String SUPERSCRIPT=\"SUPERSCRIPT\";\n public static final String SUBSCRIPT=\"SUBSCRIPT\";\n\n\n }\n}",
"default List<String> assignedConcepts(List<Source> sources){\n return assignedConcepts(10, sources);\n }",
"@ApiModelProperty(required = true, value = \"Language codes for the schemas available.\")\n @JsonProperty(\"Languages\")\n public List<String> getLanguages() {\n return languages;\n }",
"public static Set<String> getEnglishWords()\n{\n return english_words;\n}",
"public Alternatives getAlternatives_9() { return cAlternatives_9; }",
"public interface DictionaryCorrectior {\n\n\t/**\n\t * get correction word that have the most possibility from the misspelled text\n\t * @author liyuan\n\t * \n\t */\n\tpublic String getCorrectionWord(String misspell);\n\t\n\t\n\t\n\t/**\n\t * get a list of correction words from the misspelled text\n\t * @author liyuan\n\t * \n\t */\n\tpublic String[] getCorrectionList(String misspell);\n}",
"public interface LanguageProvider {\n\tLanguageService study();\n}",
"ConceptsType createConceptsType();",
"public static void main(String[] args){\r\n Language myLang = new Language(\"Willish\", 5, \"Mars\", \"verb-noun-verb-adjective\");\r\n Mayan mayan = new Mayan(\"Ki'che'\", 2330000);\r\n SinoTibetan sino1 = new SinoTibetan(\"Chinese Tibetan\", 100000);\r\n SinoTibetan sino2 = new SinoTibetan(\"Tibetan\", 200000);\r\n ArrayList<Language> langList = new ArrayList<Language>();\r\n langList.add(myLang);\r\n langList.add(mayan);\r\n langList.add(sino1);\r\n langList.add(sino2);\r\n \r\n for (Language allLangs : langList){\r\n allLangs.getInfo();\r\n }\r\n }",
"@DefaultLocale(\"fr\")\n@Generate(format={\"com.google.gwt.i18n.rebind.format.PropertiesFormat\"},locales={\"en\"})\npublic interface I18nConsts extends Constants {\n\t@DefaultStringArrayValue({\"France\",\"Espagne\",\"Belgique\"})\n\tString[] countries();\n}",
"Builder addLearningResourceType(String value);",
"MotifLearner(){\n notes = new ArrayList<>();\n times = new ArrayList<>();\n }",
"@DISPID(-2147413012)\n @PropPut\n void language(\n java.lang.String rhs);",
"public abstract void newSpeechConcepts(long ms, int n);",
"public interface LanguageInterface {\n public void setLanguage();\n}",
"private EnumUnderTest( String... strings ) {\n\t\tlanguages = Arrays.asList( strings );\n\t}",
"int countByExample(RepStuLearningExample example);",
"@Test\n public void testSpecies() throws IOException, UIMAException {\n /*String Text = \"In this text we talk about humans and mice. Because a mouse is no killifish nor a caenorhabditis elegans. Thus, c. elegans is now abbreviated as well as n. furzeri .\";\n\n JCas jCas = JCasFactory.createText(Text);\n\n //AnalysisEngineDescription engine = createEngineDescription(LinnaeusSpecies.class);\n AnalysisEngineDescription engine = createEngineDescription(LinnaeusSpecies.class);\n SimplePipeline.runPipeline(jCas, engine);\n\n String[] casSpecies = (String[]) JCasUtil.select(jCas, Organism.class).stream().map(a -> a.getCoveredText()).toArray(String[]::new);\n //String[] casID = (String[]) JCasUtil.select(jCas, Organism.class).stream().map(b -> b.getId()).toArray(String[]::new);\n\n String[] testSpecies = new String[] {\"humans\", \"mice\", \"mouse\", \"killifish\", \"caenorhabditis elegans\", \"c. elegans\", \"n. furzeri\"};\n //String[] testID = new String[] {\"9606\", \"10090\", \"10090\", \"34780\", \"6239\", \"6239\", \"105023\"};\n\n assertArrayEquals(testSpecies, casSpecies);*/\n //assertArrayEquals(testID, casID);\n }",
"public interface ApiPathConstants {\n\n // The media type constants\n String APPLICATION_JSON = \"application/json\";\n String ACCEPT_APPLICATION_JSON = \"Accept=application/json\";\n\n // Need to match below variables according to the cbr project\n String DEFAULT_CASEBASE = \"CaseBase0\";\n String DEFAULT_CONCEPT = \"Car\";\n String DEFAULT_AMAL_FUNCTION = \"CarFunc\";\n String DEFAULT_ATTR_ID = \"Color\";\n\n // The number of retrieved cases per query as preferred by the user.\n String DEFAULT_NO_OF_CASES = \"-1\";\n String NO_OF_RETURNED_CASES = \"k\";\n\n\n // myCBR-rest API: core vocabulary - single\n String PROJECT = \"project\";\n String CONCEPT \t= \"concept\";\n String CASEBASE \t= \"casebase\";\n String AMAL_FUNCTION= \"amalgamationFunction\";\n String ATTR \t= \"attribute\";\n String CASE \t= \"case\";\n String INSTANCE\t= \"instance\";\n String VALUE \t= \"value\";\n String SIM_FUNCTION = \"similarityFunction\";\n String LIST = \"list\";\n String NEW = \"new\";\n\n String EPHEMERAL \t= \"ephemeral\";\n String ANALYTICS \t= \"analytics\";\n\n\n // myCBR-rest API: core vocabulary - multiple\n String S \t\t\t= \"s\";\n String CONCEPTS \t\t= CONCEPT \t+ S;\n String CASEBASES \t\t= CASEBASE \t+ S;\n String AMAL_FUNCTIONS\t= AMAL_FUNCTION + S;\n String ATTRS \t\t= ATTR \t\t+ S;\n String CASES \t\t= CASE \t\t+ S;\n String INSTANCES\t\t= INSTANCE \t+ S;\n String VALUES \t\t= VALUE \t+ S;\n String SIM_FUNCTIONS \t= SIM_FUNCTION\t+ S;\n\n\n // myCBR-rest API: ID vocabulary\n String ID \t\t\t= \"ID\";\n String CONCEPT_ID \t\t= CONCEPT \t+ ID;\n String CASEBASE_ID \t\t= CASEBASE \t+ ID;\n String AMAL_FUNCTION_ID \t= AMAL_FUNCTION + ID;\n String ATTR_ID \t\t= ATTR \t\t+ ID;\n String NEW_ATTR_ID \t\t= NEW + ATTR \t\t+ ID;\n String ATTR_IDS = ATTR \t\t+ ID + S;\n String CASE_ID \t\t= CASE \t\t+ ID;\n String INSTANCE_ID \t\t= INSTANCE \t+ ID;\n String SIM_FUNCTION_ID\t= SIM_FUNCTION \t+ ID;\n //String ATTR_ID_LIST \t\t= ATTR \t\t+ ID + LIST;\n\n\n // myCBR-rest API: type vocabulary specific names\n String TYPE \t\t= \"Type\";\n String AMAL_FUNCTION_TYPE \t= AMAL_FUNCTION + TYPE;\n String ATTR_TYPE \t \t= ATTR + TYPE;\n\n\n // Path variables\n\n // Path pattern: /___ss\n String PATH \t\t=\"/\";\n String PATH_PROJECT = PATH + PROJECT;\n String PATH_CONCEPTS \t= PATH + CONCEPTS;\n String PATH_CASEBASES \t= PATH + CASEBASES;\n String PATH_AMAL_FUNCTIONS = PATH + AMAL_FUNCTIONS;\n String PATH_CASES \t\t= PATH + CASES;\n String PATH_ATTRIBUTES \t= PATH + ATTRS;\n String PATH_VALUE_RANGE = PATH + VALUE + \"Range\";\n String PATH_SIM_FUNCTIONS = PATH + SIM_FUNCTIONS;\n\n String PATH_EPHEMERAL = PATH + EPHEMERAL;\n String PATH_ANALYTICS = PATH + ANALYTICS;\n\n\n // Path pattern: /___s/{___ID}\n String PATH_CONCEPT_ID\t = PATH_CONCEPTS + \"/{\" + CONCEPT_ID \t + \"}\";\n String PATH_CASEBASE_ID \t = PATH_CASEBASES + \"/{\" + CASEBASE_ID \t + \"}\";\n String PATH_AMAL_FUNCTION_ID = PATH_AMAL_FUNCTIONS + \"/{\" + AMAL_FUNCTION_ID+ \"}\";\n String PATH_CASE_ID \t = PATH_CASES + \"/{\" + CASE_ID\t + \"}\";\n String PATH_ATTR_ID \t = PATH_ATTRIBUTES + \"/{\" + ATTR_ID + \"}\";\n String PATH_SIM_FUNCTION_ID = PATH_SIM_FUNCTIONS + \"/{\" + SIM_FUNCTION_ID + \"}\";\n //String PATH_ATTR_ID_LIST \t = PATH_ATTRIBUTES + \"/{\" + ATTR_ID_LIST + \"}\";\n String PATH_NEW_ATTR_ID \t = PATH_ATTRIBUTES + \"/{\" + NEW_ATTR_ID + \"}\";\n\n\n // Path pattern: /concepts/{conceptID}/___s\n String PATH_CONCEPT_CASEBASES \t= PATH_CONCEPT_ID + PATH_CASEBASES;\n String PATH_CONCEPT_AMAL_FUNCTIONS = PATH_CONCEPT_ID + PATH_AMAL_FUNCTIONS;\n String PATH_CONCEPT_CASES \t \t= PATH_CONCEPT_ID + PATH_CASES;\n String PATH_CONCEPT_ATTRS \t \t= PATH_CONCEPT_ID + PATH_ATTRIBUTES;\n\n\n // Path pattern: /concepts/{conceptID}/___s/{___ID}\n String PATH_CONCEPT_CASEBASE_ID \t = PATH_CONCEPT_ID + PATH_CASEBASE_ID;\n String PATH_CONCEPT_AMAL_FUNCTION_ID = PATH_CONCEPT_ID + PATH_AMAL_FUNCTION_ID;\n String PATH_CONCEPT_CASE_ID \t = PATH_CONCEPT_ID + PATH_CASE_ID;\n String PATH_CONCEPT_ATTR_ID\t \t = PATH_CONCEPT_ID + PATH_ATTR_ID;\n //String PATH_CONCEPT_ATTR_ID_LIST\t \t = PATH_CONCEPT_ID + PATH_ATTR_ID_LIST;\n\n\n //Path pattern: /concepts/{conceptID}/casebases/{casebaseID}/___s\n String PATH_CONCEPT_CASEBASE_AMAL_FUNCTIONS = PATH_CONCEPT_CASEBASE_ID + PATH_AMAL_FUNCTIONS;\n String PATH_CONCEPT_CASEBASE_CASES = PATH_CONCEPT_CASEBASE_ID + PATH_CASES;\n\n //Path pattern: /concepts/{conceptID}/casebases/{casebaseID}/___s/{___ID}\n String PATH_CONCEPT_CASEBASE_AMAL_FUNCTION_ID = PATH_CONCEPT_CASEBASE_ID + PATH_AMAL_FUNCTION_ID;\n String PATH_CONCEPT_CASEBASE_CASE_ID = PATH_CONCEPT_CASEBASE_ID + PATH_CASE_ID;\n\n //Path pattern: /concepts/{conceptID}/attributes/{attributeID}/valueRange\n String PATH_CONCEPT_ATTR_VALUE_RANGE = PATH_CONCEPT_ATTR_ID + PATH_VALUE_RANGE;\n\n //Path pattern: /concepts/{conceptID}/attributes/{attributeID}/___s\n String PATH_CONCEPT_ATTR_SIM_FUNCTIONS = PATH_CONCEPT_ATTR_ID + PATH_SIM_FUNCTIONS;\n\n //Path pattern: /concepts/{conceptID}/attributes/{attributeID}/___s/{___ID}\n String PATH_CONCEPT_ATTR_SIM_FUNCTION_ID = PATH_CONCEPT_ATTR_ID + PATH_SIM_FUNCTION_ID;\n\n\n //Path pattern: /ephemeral/concepts/{conceptID}/amalgamationFunctions/{amalgamationFunctionID}s\n String PATH_EPHEMERAL_CONCEPT_AMAL_FUNCTION_ID = PATH_EPHEMERAL + PATH_CONCEPT_AMAL_FUNCTION_ID;\n\n //Path pattern: /analytics/concepts/{conceptID}/amalgamationFunctions/{amalgamationFunctionID}\n String PATH_ANALYTICS_CONCEPT_AMAL_FUNCTION_ID = PATH_ANALYTICS + PATH_CONCEPT_AMAL_FUNCTION_ID;\n\n String COMPUTE_SELF_SIMLARITY = \"computeSelfSimilarity\";\n String RETRIEVAL_BY_CASE_IDS = \"retrievalByCaseIDs\";\n String RETRIEVAL_BY_CASE_ID_WITH_CONTENT = \"retrievalByCaseIDWithContent\";\n\n // Path pattern: /___\n String PATH_SELF_SIMLARITY \t\t= PATH + COMPUTE_SELF_SIMLARITY;\n String PATH_RETRIEVAL \t\t\t= PATH + RETRIEVAL_BY_CASE_IDS;\n String PATH_RETRIEVAL_BY_CASE_ID_WITH_CONTENT \t= PATH + RETRIEVAL_BY_CASE_ID_WITH_CONTENT;\n\n String PATH_CONCEPT_CASEBASE_SELF_SIMLARITY = PATH_CONCEPT_CASEBASE_ID + PATH_SELF_SIMLARITY;\n\n String PATH_DEFAULT_EPHEMERAL = PATH_EPHEMERAL + PATH_CONCEPT_CASEBASE_AMAL_FUNCTION_ID;\n String PATH_EPHEMERAL_RETRIEVAL = PATH_DEFAULT_EPHEMERAL + PATH_RETRIEVAL;\n String PATH_EPHEMERAL_RETRIEVAL_WITH_CONTENT = PATH_DEFAULT_EPHEMERAL + PATH_RETRIEVAL_BY_CASE_ID_WITH_CONTENT;\n String PATH_EPHEMERAL_SELF_SIMILARITY = PATH_DEFAULT_EPHEMERAL + PATH_SELF_SIMLARITY;\n}",
"FeatureConcept createFeatureConcept();",
"public CandidateAnswerVariant_Type(JCas jcas, Type casType) {\n super(jcas, casType);\n casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());\n\n \n casFeat_occurrences = jcas.getRequiredFeatureDE(casType, \"occurrences\", \"uima.cas.FSList\", featOkTst);\n casFeatCode_occurrences = (null == casFeat_occurrences) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_occurrences).getCode();\n\n \n casFeat_candidateId = jcas.getRequiredFeatureDE(casType, \"candidateId\", \"uima.cas.String\", featOkTst);\n casFeatCode_candidateId = (null == casFeat_candidateId) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_candidateId).getCode();\n\n \n casFeat_text = jcas.getRequiredFeatureDE(casType, \"text\", \"uima.cas.String\", featOkTst);\n casFeatCode_text = (null == casFeat_text) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_text).getCode();\n\n \n casFeat_alternativeNames = jcas.getRequiredFeatureDE(casType, \"alternativeNames\", \"uima.cas.StringList\", featOkTst);\n casFeatCode_alternativeNames = (null == casFeat_alternativeNames) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_alternativeNames).getCode();\n\n \n casFeat_uri = jcas.getRequiredFeatureDE(casType, \"uri\", \"uima.cas.String\", featOkTst);\n casFeatCode_uri = (null == casFeat_uri) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_uri).getCode();\n\n \n casFeat_docId = jcas.getRequiredFeatureDE(casType, \"docId\", \"uima.cas.String\", featOkTst);\n casFeatCode_docId = (null == casFeat_docId) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_docId).getCode();\n\n }",
"public interface OwlClass extends OwlResource {\n\tenum ALTERNATIVE {\n\t\tCLASS, ENUMERATED\n\t};\n\n\tenum MODALITY {\n\t\tCOMPLETE, PARTIAL\n\t};\n\n\tpublic ALTERNATIVE getAlternative();\n\n\tpublic OwlClassDescription[] getClassDescriptionArray();\n\n\tpublic OwlClassDescription[] getDisjointClassArray();\n\n\tpublic OwlClassDescription[] getEquivalentClassArray();\n\n\tpublic SemanticId[] getIndividualIdArray();\n\n\tpublic MODALITY getModality();\n\n\tpublic OwlClassDescription[] getSubClassOfArray();\n\n}",
"public static void caso31(){\n\t FilterManager fm= new FilterManager(\"resources/stopWordsList.txt\",\"resources/useCaseWeight.properties\");\n\t\t\tQualityAttributeBelongable qualityAttributeBelongable = new OntologyManager(\"file:resources/caso3.owl\",\"file:resources/caso3.repository\",fm);\n\t\t\tMap<QualityAttributeInterface,Double> map = qualityAttributeBelongable.getWordPertenence(\"response1\");\n\t\t\tif(map==null){\n\t\t\t\tSystem.out.println(\"El map es null\");\n\t\t\t}else{\n\t\t\t\tMapUtils.imprimirMap(map);\n\t\t\t}\n\t}",
"List<Language> getAll();",
"CLanguage getClanguage();",
"Lingua getLingua();",
"private Vocabulary() {\n }",
"public interface MetaData {\r\n\r\n\tpublic static final String CV_SBML = \"SBML\";\r\n\r\n\tpublic static final String ET_SBML = \"SBML_import\";\r\n\r\n\tpublic static final String AN_SBO = \"SBO\";\r\n\r\n\tpublic static final String RT_CONSUMED_BY = \"cs_by\";\r\n\r\n\tpublic static final String RT_PRODUCED_BY = \"pd_by\";\r\n\r\n\tpublic static final String RT_REGULATED_BY = \"rg_by\";\r\n\r\n\tpublic static final String RT_TRANSFORMATION_OF = \"transformation_of\";\r\n\r\n\tpublic static final String CC_REACTION = \"Reaction\";\r\n\r\n\tpublic static final String CC_COMPOUND = \"Comp\";\r\n\r\n\tpublic static final String CC_CELCOMP = \"CelComp\";\r\n\r\n}",
"static WordList get(Language language) {\n return switch (language) {\n case ENGLISH -> readResource(\"bip39_english.txt\");\n };\n }",
"Builder addInLanguage(Text value);",
"public Alternatives getAlternatives_11() { return cAlternatives_11; }",
"public void setLanguageList(Language[] languageList) {\n this.languageList = languageList;\n }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }"
] | [
"0.70178807",
"0.69103855",
"0.6802317",
"0.651211",
"0.5567115",
"0.5515031",
"0.5497891",
"0.54596484",
"0.53775334",
"0.53402954",
"0.5327648",
"0.53057975",
"0.5277139",
"0.5273925",
"0.5234392",
"0.52232295",
"0.5190439",
"0.51850134",
"0.51732075",
"0.5151061",
"0.5137015",
"0.5102041",
"0.50955796",
"0.5094827",
"0.50890183",
"0.5066506",
"0.5062627",
"0.50478226",
"0.5029864",
"0.5028362",
"0.501239",
"0.49745637",
"0.4959458",
"0.49545085",
"0.49373385",
"0.49367476",
"0.4932915",
"0.49302858",
"0.49270177",
"0.49133512",
"0.4903076",
"0.4902699",
"0.48996308",
"0.48973492",
"0.48935765",
"0.48885265",
"0.48851365",
"0.4881426",
"0.48804888",
"0.4878009",
"0.4868998",
"0.4865623",
"0.48648256",
"0.4853599",
"0.48506376",
"0.4848752",
"0.48465124",
"0.48396578",
"0.48380253",
"0.48361105",
"0.48186278",
"0.48186278",
"0.48186278",
"0.48186278",
"0.48186278",
"0.48186278",
"0.48186278",
"0.48186278",
"0.48186278",
"0.48186278",
"0.48186278",
"0.48186278",
"0.48186278",
"0.48186278",
"0.48186278",
"0.48186278",
"0.48186278",
"0.48186278",
"0.48186278",
"0.48186278",
"0.48186278",
"0.48186278",
"0.48186278",
"0.48186278",
"0.48186278",
"0.48186278",
"0.48186278",
"0.48186278",
"0.48186278",
"0.48186278",
"0.48186278",
"0.48186278",
"0.48186278",
"0.48186278",
"0.48186278",
"0.48186278",
"0.48186278",
"0.48186278",
"0.48186278",
"0.48186278"
] | 0.73326385 | 0 |
repeated .clarifai.api.ConceptLanguage concept_languages = 3; | int getConceptLanguagesCount(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"com.clarifai.grpc.api.ConceptLanguage getConceptLanguages(int index);",
"java.util.List<com.clarifai.grpc.api.ConceptLanguage> \n getConceptLanguagesList();",
"java.util.List<? extends com.clarifai.grpc.api.ConceptLanguageOrBuilder> \n getConceptLanguagesOrBuilderList();",
"com.clarifai.grpc.api.ConceptLanguageOrBuilder getConceptLanguagesOrBuilder(\n int index);",
"speech.multilang.Params.DecisionPointParams.Type getType();",
"public void addLanguage(String value) {\n/* 230 */ addStringToBag(\"language\", value);\n/* */ }",
"default List<String> assignedConcepts(Source code){\n return assignedConcepts(code, ImmutableSet.of());\n }",
"speech.multilang.Params.SemanticLangidParams getSemanticLangidParams();",
"@Test\n public void listAllAvailableLanguages() throws IOException {\n System.out.println(\n \"Language preprocessing components for the following languages are available:\\n \"\n + String.join(\", \", LanguageComponents.languages()));\n }",
"Builder addLearningResourceType(Text value);",
"@DISPID(-2147413012)\n @PropGet\n java.lang.String language();",
"@DISPID(-2147413103)\n @PropGet\n java.lang.String lang();",
"interface Language {\n HashMap<String,String> colorMap= new HashMap<>();\n String getColor(String myToken);\n String defaultColor = \"black\";\n}",
"public LanguageSkill() {\n\t}",
"String getConcept();",
"void mo1927a(NLPResponseData nLPResponseData);",
"public Alternatives getAlternatives_3() { return cAlternatives_3; }",
"speech.multilang.Params.DecisionPointParams getDecisionPointParams();",
"public String[] getLanguages() {\n/* 238 */ return getStringArray(\"language\");\n/* */ }",
"public interface DublinCoreConstants {\n \n /** Creates a new instance of Class */\n public static int DC_TITLE = 0;\n public static int DC_CREATOR = 1;\n public static int DC_SUBJECT = 2;\n public static int DC_DATE = 3;\n public static int DC_TYPE= 4;\n public static int DC_FORMAT= 5;\n public static int DC_IDENTIFIER = 6;\n public static int DC_COLLECTION = 7;\n public static int DC_COVERAGE = 8;\n \n public static int SUPPORTED_NUMBER = 9;\n \n public static final String[] DC_FIELDS = {\"title\",\"creator\",\"subject\",\"date\",\"type\",\"format\",\"identifier\",\"collection\",\"coverage\"};\n public static final String DC_NAMESPACE = \"dc:\";\n \n}",
"speech.multilang.Params.ScoringControllerParams.Type getType();",
"public static void initializeToolsAndResourcesForDemo(IDictionary dict) throws MalformedURLException, IOException {\n wordnet_dict = dict;\n wordnet_dict.open();\n\n // Choose wordnet sources to be used\n wordnetResources.add(\"synonyms\");\n //wordnetResources.add(\"antonyms\");\n //wordnetResources.add(\"hypernyms\");\n\n Properties split_props = new Properties();\n //Properties including lemmatization\n //props.put(\"annotators\", \"tokenize, ssplit, pos, lemma\");\n //Properties without lemmatization\n split_props.put(\"annotators\", \"tokenize, ssplit, pos\");\n split_props.put(\"tokenize.language\", \"en\");\n split_pipeline = new StanfordCoreNLP(split_props);\n\n Properties lemma_props = new Properties();\n lemma_props.put(\"annotators\", \"tokenize, ssplit, pos, lemma\");\n lemma_props.put(\"tokenize.language\", \"en\");\n lemma_pipeline = new StanfordCoreNLP(lemma_props);\n\n Properties entityMentions_props = new Properties();\n entityMentions_props.put(\"annotators\", \"tokenize, ssplit, truecase, pos, lemma, ner, entitymentions\");\n entityMentions_props.put(\"tokenize.language\", \"en\");\n entityMentions_props.put(\"truecase.overwriteText\", \"true\");\n entityMentions_pipeline = new StanfordCoreNLP(entityMentions_props);\n\n Properties compound_props = new Properties();\n compound_props.put(\"annotators\", \"tokenize, ssplit, truecase, pos, parse\");\n compound_props.put(\"tokenize.language\", \"en\");\n compound_props.put(\"truecase.overwriteText\", \"true\");\n compounds_pipeline = new StanfordCoreNLP(compound_props);\n\n spotlight = new Spotlight();\n\n chanel = new LODSyndesisChanel();\n\n }",
"public void setJurisdictions(entity.AppCritJurisdiction[] value);",
"@Test\n void adjectivesCommonList() {\n //boolean flag = false;\n NLPAnalyser np = new NLPAnalyser();\n List<CoreMap> sentences = np.nlpPipeline(\"RT This made my day good; glad @JeremyKappell is standing up against bad #ROC’s disgusting mayor. \"\n + \"Former TV meteorologist Jeremy Kappell suing real Mayor Lovely Warren\"\n + \"https://t.co/rJIV5SN9vB worst(Via NEWS 8 WROC)\");\n ArrayList<String> adj = np.adjectives(sentences);\n for (String common : np.getCommonWords()) {\n assertFalse(adj.contains(common));\n }\n }",
"Builder addInLanguage(Language.Builder value);",
"public Language() {\r\n\t}",
"private void buildLanguageModel() {\n int total = 0;\n Map<Integer, Integer> wordCount = new HashMap<>();\n for (List<Integer> story : corpus.getStories()) {\n for (Integer word : story) {\n total++;\n if (wordCount.get(word) == null) wordCount.put(word, 0);\n wordCount.put(word, wordCount.get(word) + 1);\n }\n }\n wordValues = new HashMap<>();\n for (Map.Entry<Integer, Integer> entry : wordCount.entrySet()) {\n wordValues.put(entry.getKey(), total * 1.0 / entry.getValue());\n }\n }",
"public interface Bottlable {\n\n /**\n * Get the number of optional attribute fields.\n *\n * @return number of optional attribute fields\n */\n int getNumberOfOptionalAttributeFields();\n\n\n /**\n * Get the number of necessary attributes for the key generation.\n *\n * @return number of necessary attributes\n */\n int getNumberOfNecessaryAttributes();\n\n /**\n * Get the number of optional attributes, for a given field of optional attributes.\n *\n * @param field the number of the optional attribute field, for which the number of\n * attributes is queried.\n * @return number of optional attributes\n */\n int getNumberOfOptionalAttributes(final int field);\n\n /**\n * Get the number of optional attributes that must be identical for a successful match.\n *\n * @param field the number of the optional attribute field, for which the similarity threshold is\n * queried\n * @return number of necessary optional attributes, must be smaller than getNumberOfOptionalAttributes()\n */\n int getSimilarityThreshold(final int field);\n\n /**\n * Return a single necessary Attribute. Must return at least getNumberOfNecessaryAttributes()\n * times a valid not null String.\n *\n * @return a necessary Attribute\n */\n @NonNull\n String getNecessaryAttribute();\n\n /**\n * Return a single optional Attribute. Must return at least getNumberOfOptionalAttributes() times a valid not null String.\n *\n * @param field the number of the optional attribute field, for which the similarity threshold is\n * queried\n * @return an optional Attribute\n */\n @NonNull\n String getOptionalAttribute(final int field);\n}",
"public interface LibraryConstant {\n\n public interface LanguageConstant {\n\n public static String JAVA=\"JAVA\";\n public static String C=\"C\";\n public static String CPP=\"C++\";\n }\n\n public interface StyleConstant {\n\n //pre-defined Styles\n\n public static final String NORMAL=\"NORMAL\";\n public static final String BOLD=\"BOLD\";\n public static final String ITALIC=\"ITALIC\";\n public static final String UNDERLINE=\"UNDERLINE\";\n public static final String SUPERSCRIPT=\"SUPERSCRIPT\";\n public static final String SUBSCRIPT=\"SUBSCRIPT\";\n\n\n }\n}",
"default List<String> assignedConcepts(List<Source> sources){\n return assignedConcepts(10, sources);\n }",
"@ApiModelProperty(required = true, value = \"Language codes for the schemas available.\")\n @JsonProperty(\"Languages\")\n public List<String> getLanguages() {\n return languages;\n }",
"public static Set<String> getEnglishWords()\n{\n return english_words;\n}",
"public Alternatives getAlternatives_9() { return cAlternatives_9; }",
"public interface DictionaryCorrectior {\n\n\t/**\n\t * get correction word that have the most possibility from the misspelled text\n\t * @author liyuan\n\t * \n\t */\n\tpublic String getCorrectionWord(String misspell);\n\t\n\t\n\t\n\t/**\n\t * get a list of correction words from the misspelled text\n\t * @author liyuan\n\t * \n\t */\n\tpublic String[] getCorrectionList(String misspell);\n}",
"public interface LanguageProvider {\n\tLanguageService study();\n}",
"ConceptsType createConceptsType();",
"public static void main(String[] args){\r\n Language myLang = new Language(\"Willish\", 5, \"Mars\", \"verb-noun-verb-adjective\");\r\n Mayan mayan = new Mayan(\"Ki'che'\", 2330000);\r\n SinoTibetan sino1 = new SinoTibetan(\"Chinese Tibetan\", 100000);\r\n SinoTibetan sino2 = new SinoTibetan(\"Tibetan\", 200000);\r\n ArrayList<Language> langList = new ArrayList<Language>();\r\n langList.add(myLang);\r\n langList.add(mayan);\r\n langList.add(sino1);\r\n langList.add(sino2);\r\n \r\n for (Language allLangs : langList){\r\n allLangs.getInfo();\r\n }\r\n }",
"@DefaultLocale(\"fr\")\n@Generate(format={\"com.google.gwt.i18n.rebind.format.PropertiesFormat\"},locales={\"en\"})\npublic interface I18nConsts extends Constants {\n\t@DefaultStringArrayValue({\"France\",\"Espagne\",\"Belgique\"})\n\tString[] countries();\n}",
"Builder addLearningResourceType(String value);",
"MotifLearner(){\n notes = new ArrayList<>();\n times = new ArrayList<>();\n }",
"@DISPID(-2147413012)\n @PropPut\n void language(\n java.lang.String rhs);",
"public abstract void newSpeechConcepts(long ms, int n);",
"public interface LanguageInterface {\n public void setLanguage();\n}",
"private EnumUnderTest( String... strings ) {\n\t\tlanguages = Arrays.asList( strings );\n\t}",
"int countByExample(RepStuLearningExample example);",
"@Test\n public void testSpecies() throws IOException, UIMAException {\n /*String Text = \"In this text we talk about humans and mice. Because a mouse is no killifish nor a caenorhabditis elegans. Thus, c. elegans is now abbreviated as well as n. furzeri .\";\n\n JCas jCas = JCasFactory.createText(Text);\n\n //AnalysisEngineDescription engine = createEngineDescription(LinnaeusSpecies.class);\n AnalysisEngineDescription engine = createEngineDescription(LinnaeusSpecies.class);\n SimplePipeline.runPipeline(jCas, engine);\n\n String[] casSpecies = (String[]) JCasUtil.select(jCas, Organism.class).stream().map(a -> a.getCoveredText()).toArray(String[]::new);\n //String[] casID = (String[]) JCasUtil.select(jCas, Organism.class).stream().map(b -> b.getId()).toArray(String[]::new);\n\n String[] testSpecies = new String[] {\"humans\", \"mice\", \"mouse\", \"killifish\", \"caenorhabditis elegans\", \"c. elegans\", \"n. furzeri\"};\n //String[] testID = new String[] {\"9606\", \"10090\", \"10090\", \"34780\", \"6239\", \"6239\", \"105023\"};\n\n assertArrayEquals(testSpecies, casSpecies);*/\n //assertArrayEquals(testID, casID);\n }",
"public interface ApiPathConstants {\n\n // The media type constants\n String APPLICATION_JSON = \"application/json\";\n String ACCEPT_APPLICATION_JSON = \"Accept=application/json\";\n\n // Need to match below variables according to the cbr project\n String DEFAULT_CASEBASE = \"CaseBase0\";\n String DEFAULT_CONCEPT = \"Car\";\n String DEFAULT_AMAL_FUNCTION = \"CarFunc\";\n String DEFAULT_ATTR_ID = \"Color\";\n\n // The number of retrieved cases per query as preferred by the user.\n String DEFAULT_NO_OF_CASES = \"-1\";\n String NO_OF_RETURNED_CASES = \"k\";\n\n\n // myCBR-rest API: core vocabulary - single\n String PROJECT = \"project\";\n String CONCEPT \t= \"concept\";\n String CASEBASE \t= \"casebase\";\n String AMAL_FUNCTION= \"amalgamationFunction\";\n String ATTR \t= \"attribute\";\n String CASE \t= \"case\";\n String INSTANCE\t= \"instance\";\n String VALUE \t= \"value\";\n String SIM_FUNCTION = \"similarityFunction\";\n String LIST = \"list\";\n String NEW = \"new\";\n\n String EPHEMERAL \t= \"ephemeral\";\n String ANALYTICS \t= \"analytics\";\n\n\n // myCBR-rest API: core vocabulary - multiple\n String S \t\t\t= \"s\";\n String CONCEPTS \t\t= CONCEPT \t+ S;\n String CASEBASES \t\t= CASEBASE \t+ S;\n String AMAL_FUNCTIONS\t= AMAL_FUNCTION + S;\n String ATTRS \t\t= ATTR \t\t+ S;\n String CASES \t\t= CASE \t\t+ S;\n String INSTANCES\t\t= INSTANCE \t+ S;\n String VALUES \t\t= VALUE \t+ S;\n String SIM_FUNCTIONS \t= SIM_FUNCTION\t+ S;\n\n\n // myCBR-rest API: ID vocabulary\n String ID \t\t\t= \"ID\";\n String CONCEPT_ID \t\t= CONCEPT \t+ ID;\n String CASEBASE_ID \t\t= CASEBASE \t+ ID;\n String AMAL_FUNCTION_ID \t= AMAL_FUNCTION + ID;\n String ATTR_ID \t\t= ATTR \t\t+ ID;\n String NEW_ATTR_ID \t\t= NEW + ATTR \t\t+ ID;\n String ATTR_IDS = ATTR \t\t+ ID + S;\n String CASE_ID \t\t= CASE \t\t+ ID;\n String INSTANCE_ID \t\t= INSTANCE \t+ ID;\n String SIM_FUNCTION_ID\t= SIM_FUNCTION \t+ ID;\n //String ATTR_ID_LIST \t\t= ATTR \t\t+ ID + LIST;\n\n\n // myCBR-rest API: type vocabulary specific names\n String TYPE \t\t= \"Type\";\n String AMAL_FUNCTION_TYPE \t= AMAL_FUNCTION + TYPE;\n String ATTR_TYPE \t \t= ATTR + TYPE;\n\n\n // Path variables\n\n // Path pattern: /___ss\n String PATH \t\t=\"/\";\n String PATH_PROJECT = PATH + PROJECT;\n String PATH_CONCEPTS \t= PATH + CONCEPTS;\n String PATH_CASEBASES \t= PATH + CASEBASES;\n String PATH_AMAL_FUNCTIONS = PATH + AMAL_FUNCTIONS;\n String PATH_CASES \t\t= PATH + CASES;\n String PATH_ATTRIBUTES \t= PATH + ATTRS;\n String PATH_VALUE_RANGE = PATH + VALUE + \"Range\";\n String PATH_SIM_FUNCTIONS = PATH + SIM_FUNCTIONS;\n\n String PATH_EPHEMERAL = PATH + EPHEMERAL;\n String PATH_ANALYTICS = PATH + ANALYTICS;\n\n\n // Path pattern: /___s/{___ID}\n String PATH_CONCEPT_ID\t = PATH_CONCEPTS + \"/{\" + CONCEPT_ID \t + \"}\";\n String PATH_CASEBASE_ID \t = PATH_CASEBASES + \"/{\" + CASEBASE_ID \t + \"}\";\n String PATH_AMAL_FUNCTION_ID = PATH_AMAL_FUNCTIONS + \"/{\" + AMAL_FUNCTION_ID+ \"}\";\n String PATH_CASE_ID \t = PATH_CASES + \"/{\" + CASE_ID\t + \"}\";\n String PATH_ATTR_ID \t = PATH_ATTRIBUTES + \"/{\" + ATTR_ID + \"}\";\n String PATH_SIM_FUNCTION_ID = PATH_SIM_FUNCTIONS + \"/{\" + SIM_FUNCTION_ID + \"}\";\n //String PATH_ATTR_ID_LIST \t = PATH_ATTRIBUTES + \"/{\" + ATTR_ID_LIST + \"}\";\n String PATH_NEW_ATTR_ID \t = PATH_ATTRIBUTES + \"/{\" + NEW_ATTR_ID + \"}\";\n\n\n // Path pattern: /concepts/{conceptID}/___s\n String PATH_CONCEPT_CASEBASES \t= PATH_CONCEPT_ID + PATH_CASEBASES;\n String PATH_CONCEPT_AMAL_FUNCTIONS = PATH_CONCEPT_ID + PATH_AMAL_FUNCTIONS;\n String PATH_CONCEPT_CASES \t \t= PATH_CONCEPT_ID + PATH_CASES;\n String PATH_CONCEPT_ATTRS \t \t= PATH_CONCEPT_ID + PATH_ATTRIBUTES;\n\n\n // Path pattern: /concepts/{conceptID}/___s/{___ID}\n String PATH_CONCEPT_CASEBASE_ID \t = PATH_CONCEPT_ID + PATH_CASEBASE_ID;\n String PATH_CONCEPT_AMAL_FUNCTION_ID = PATH_CONCEPT_ID + PATH_AMAL_FUNCTION_ID;\n String PATH_CONCEPT_CASE_ID \t = PATH_CONCEPT_ID + PATH_CASE_ID;\n String PATH_CONCEPT_ATTR_ID\t \t = PATH_CONCEPT_ID + PATH_ATTR_ID;\n //String PATH_CONCEPT_ATTR_ID_LIST\t \t = PATH_CONCEPT_ID + PATH_ATTR_ID_LIST;\n\n\n //Path pattern: /concepts/{conceptID}/casebases/{casebaseID}/___s\n String PATH_CONCEPT_CASEBASE_AMAL_FUNCTIONS = PATH_CONCEPT_CASEBASE_ID + PATH_AMAL_FUNCTIONS;\n String PATH_CONCEPT_CASEBASE_CASES = PATH_CONCEPT_CASEBASE_ID + PATH_CASES;\n\n //Path pattern: /concepts/{conceptID}/casebases/{casebaseID}/___s/{___ID}\n String PATH_CONCEPT_CASEBASE_AMAL_FUNCTION_ID = PATH_CONCEPT_CASEBASE_ID + PATH_AMAL_FUNCTION_ID;\n String PATH_CONCEPT_CASEBASE_CASE_ID = PATH_CONCEPT_CASEBASE_ID + PATH_CASE_ID;\n\n //Path pattern: /concepts/{conceptID}/attributes/{attributeID}/valueRange\n String PATH_CONCEPT_ATTR_VALUE_RANGE = PATH_CONCEPT_ATTR_ID + PATH_VALUE_RANGE;\n\n //Path pattern: /concepts/{conceptID}/attributes/{attributeID}/___s\n String PATH_CONCEPT_ATTR_SIM_FUNCTIONS = PATH_CONCEPT_ATTR_ID + PATH_SIM_FUNCTIONS;\n\n //Path pattern: /concepts/{conceptID}/attributes/{attributeID}/___s/{___ID}\n String PATH_CONCEPT_ATTR_SIM_FUNCTION_ID = PATH_CONCEPT_ATTR_ID + PATH_SIM_FUNCTION_ID;\n\n\n //Path pattern: /ephemeral/concepts/{conceptID}/amalgamationFunctions/{amalgamationFunctionID}s\n String PATH_EPHEMERAL_CONCEPT_AMAL_FUNCTION_ID = PATH_EPHEMERAL + PATH_CONCEPT_AMAL_FUNCTION_ID;\n\n //Path pattern: /analytics/concepts/{conceptID}/amalgamationFunctions/{amalgamationFunctionID}\n String PATH_ANALYTICS_CONCEPT_AMAL_FUNCTION_ID = PATH_ANALYTICS + PATH_CONCEPT_AMAL_FUNCTION_ID;\n\n String COMPUTE_SELF_SIMLARITY = \"computeSelfSimilarity\";\n String RETRIEVAL_BY_CASE_IDS = \"retrievalByCaseIDs\";\n String RETRIEVAL_BY_CASE_ID_WITH_CONTENT = \"retrievalByCaseIDWithContent\";\n\n // Path pattern: /___\n String PATH_SELF_SIMLARITY \t\t= PATH + COMPUTE_SELF_SIMLARITY;\n String PATH_RETRIEVAL \t\t\t= PATH + RETRIEVAL_BY_CASE_IDS;\n String PATH_RETRIEVAL_BY_CASE_ID_WITH_CONTENT \t= PATH + RETRIEVAL_BY_CASE_ID_WITH_CONTENT;\n\n String PATH_CONCEPT_CASEBASE_SELF_SIMLARITY = PATH_CONCEPT_CASEBASE_ID + PATH_SELF_SIMLARITY;\n\n String PATH_DEFAULT_EPHEMERAL = PATH_EPHEMERAL + PATH_CONCEPT_CASEBASE_AMAL_FUNCTION_ID;\n String PATH_EPHEMERAL_RETRIEVAL = PATH_DEFAULT_EPHEMERAL + PATH_RETRIEVAL;\n String PATH_EPHEMERAL_RETRIEVAL_WITH_CONTENT = PATH_DEFAULT_EPHEMERAL + PATH_RETRIEVAL_BY_CASE_ID_WITH_CONTENT;\n String PATH_EPHEMERAL_SELF_SIMILARITY = PATH_DEFAULT_EPHEMERAL + PATH_SELF_SIMLARITY;\n}",
"FeatureConcept createFeatureConcept();",
"public CandidateAnswerVariant_Type(JCas jcas, Type casType) {\n super(jcas, casType);\n casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());\n\n \n casFeat_occurrences = jcas.getRequiredFeatureDE(casType, \"occurrences\", \"uima.cas.FSList\", featOkTst);\n casFeatCode_occurrences = (null == casFeat_occurrences) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_occurrences).getCode();\n\n \n casFeat_candidateId = jcas.getRequiredFeatureDE(casType, \"candidateId\", \"uima.cas.String\", featOkTst);\n casFeatCode_candidateId = (null == casFeat_candidateId) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_candidateId).getCode();\n\n \n casFeat_text = jcas.getRequiredFeatureDE(casType, \"text\", \"uima.cas.String\", featOkTst);\n casFeatCode_text = (null == casFeat_text) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_text).getCode();\n\n \n casFeat_alternativeNames = jcas.getRequiredFeatureDE(casType, \"alternativeNames\", \"uima.cas.StringList\", featOkTst);\n casFeatCode_alternativeNames = (null == casFeat_alternativeNames) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_alternativeNames).getCode();\n\n \n casFeat_uri = jcas.getRequiredFeatureDE(casType, \"uri\", \"uima.cas.String\", featOkTst);\n casFeatCode_uri = (null == casFeat_uri) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_uri).getCode();\n\n \n casFeat_docId = jcas.getRequiredFeatureDE(casType, \"docId\", \"uima.cas.String\", featOkTst);\n casFeatCode_docId = (null == casFeat_docId) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_docId).getCode();\n\n }",
"public interface OwlClass extends OwlResource {\n\tenum ALTERNATIVE {\n\t\tCLASS, ENUMERATED\n\t};\n\n\tenum MODALITY {\n\t\tCOMPLETE, PARTIAL\n\t};\n\n\tpublic ALTERNATIVE getAlternative();\n\n\tpublic OwlClassDescription[] getClassDescriptionArray();\n\n\tpublic OwlClassDescription[] getDisjointClassArray();\n\n\tpublic OwlClassDescription[] getEquivalentClassArray();\n\n\tpublic SemanticId[] getIndividualIdArray();\n\n\tpublic MODALITY getModality();\n\n\tpublic OwlClassDescription[] getSubClassOfArray();\n\n}",
"public static void caso31(){\n\t FilterManager fm= new FilterManager(\"resources/stopWordsList.txt\",\"resources/useCaseWeight.properties\");\n\t\t\tQualityAttributeBelongable qualityAttributeBelongable = new OntologyManager(\"file:resources/caso3.owl\",\"file:resources/caso3.repository\",fm);\n\t\t\tMap<QualityAttributeInterface,Double> map = qualityAttributeBelongable.getWordPertenence(\"response1\");\n\t\t\tif(map==null){\n\t\t\t\tSystem.out.println(\"El map es null\");\n\t\t\t}else{\n\t\t\t\tMapUtils.imprimirMap(map);\n\t\t\t}\n\t}",
"List<Language> getAll();",
"CLanguage getClanguage();",
"Lingua getLingua();",
"private Vocabulary() {\n }",
"public interface MetaData {\r\n\r\n\tpublic static final String CV_SBML = \"SBML\";\r\n\r\n\tpublic static final String ET_SBML = \"SBML_import\";\r\n\r\n\tpublic static final String AN_SBO = \"SBO\";\r\n\r\n\tpublic static final String RT_CONSUMED_BY = \"cs_by\";\r\n\r\n\tpublic static final String RT_PRODUCED_BY = \"pd_by\";\r\n\r\n\tpublic static final String RT_REGULATED_BY = \"rg_by\";\r\n\r\n\tpublic static final String RT_TRANSFORMATION_OF = \"transformation_of\";\r\n\r\n\tpublic static final String CC_REACTION = \"Reaction\";\r\n\r\n\tpublic static final String CC_COMPOUND = \"Comp\";\r\n\r\n\tpublic static final String CC_CELCOMP = \"CelComp\";\r\n\r\n}",
"static WordList get(Language language) {\n return switch (language) {\n case ENGLISH -> readResource(\"bip39_english.txt\");\n };\n }",
"Builder addInLanguage(Text value);",
"public Alternatives getAlternatives_11() { return cAlternatives_11; }",
"public void setLanguageList(Language[] languageList) {\n this.languageList = languageList;\n }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }"
] | [
"0.7333542",
"0.70189124",
"0.6911888",
"0.6803772",
"0.55658317",
"0.5514909",
"0.5497754",
"0.5459166",
"0.5378045",
"0.5338909",
"0.53268355",
"0.530514",
"0.5277348",
"0.52727586",
"0.52325135",
"0.52217007",
"0.51904005",
"0.5183695",
"0.517394",
"0.5150441",
"0.5136571",
"0.5101077",
"0.50959027",
"0.50948334",
"0.5088408",
"0.50651485",
"0.50630367",
"0.5047023",
"0.502983",
"0.5028259",
"0.5013519",
"0.4974659",
"0.49592355",
"0.49544743",
"0.4936377",
"0.49356225",
"0.49317366",
"0.49314365",
"0.4926086",
"0.49129292",
"0.49020812",
"0.49018425",
"0.4899164",
"0.4897982",
"0.48935905",
"0.48880023",
"0.4884576",
"0.48804635",
"0.48799944",
"0.4877656",
"0.48681986",
"0.48661616",
"0.4864123",
"0.48519415",
"0.48496643",
"0.48485738",
"0.4845488",
"0.4838871",
"0.48374414",
"0.48363456",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366"
] | 0.65125555 | 4 |
repeated .clarifai.api.ConceptLanguage concept_languages = 3; | java.util.List<? extends com.clarifai.grpc.api.ConceptLanguageOrBuilder>
getConceptLanguagesOrBuilderList(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"com.clarifai.grpc.api.ConceptLanguage getConceptLanguages(int index);",
"java.util.List<com.clarifai.grpc.api.ConceptLanguage> \n getConceptLanguagesList();",
"com.clarifai.grpc.api.ConceptLanguageOrBuilder getConceptLanguagesOrBuilder(\n int index);",
"int getConceptLanguagesCount();",
"speech.multilang.Params.DecisionPointParams.Type getType();",
"public void addLanguage(String value) {\n/* 230 */ addStringToBag(\"language\", value);\n/* */ }",
"default List<String> assignedConcepts(Source code){\n return assignedConcepts(code, ImmutableSet.of());\n }",
"speech.multilang.Params.SemanticLangidParams getSemanticLangidParams();",
"@Test\n public void listAllAvailableLanguages() throws IOException {\n System.out.println(\n \"Language preprocessing components for the following languages are available:\\n \"\n + String.join(\", \", LanguageComponents.languages()));\n }",
"Builder addLearningResourceType(Text value);",
"@DISPID(-2147413012)\n @PropGet\n java.lang.String language();",
"@DISPID(-2147413103)\n @PropGet\n java.lang.String lang();",
"interface Language {\n HashMap<String,String> colorMap= new HashMap<>();\n String getColor(String myToken);\n String defaultColor = \"black\";\n}",
"public LanguageSkill() {\n\t}",
"String getConcept();",
"void mo1927a(NLPResponseData nLPResponseData);",
"public Alternatives getAlternatives_3() { return cAlternatives_3; }",
"speech.multilang.Params.DecisionPointParams getDecisionPointParams();",
"public String[] getLanguages() {\n/* 238 */ return getStringArray(\"language\");\n/* */ }",
"public interface DublinCoreConstants {\n \n /** Creates a new instance of Class */\n public static int DC_TITLE = 0;\n public static int DC_CREATOR = 1;\n public static int DC_SUBJECT = 2;\n public static int DC_DATE = 3;\n public static int DC_TYPE= 4;\n public static int DC_FORMAT= 5;\n public static int DC_IDENTIFIER = 6;\n public static int DC_COLLECTION = 7;\n public static int DC_COVERAGE = 8;\n \n public static int SUPPORTED_NUMBER = 9;\n \n public static final String[] DC_FIELDS = {\"title\",\"creator\",\"subject\",\"date\",\"type\",\"format\",\"identifier\",\"collection\",\"coverage\"};\n public static final String DC_NAMESPACE = \"dc:\";\n \n}",
"speech.multilang.Params.ScoringControllerParams.Type getType();",
"public static void initializeToolsAndResourcesForDemo(IDictionary dict) throws MalformedURLException, IOException {\n wordnet_dict = dict;\n wordnet_dict.open();\n\n // Choose wordnet sources to be used\n wordnetResources.add(\"synonyms\");\n //wordnetResources.add(\"antonyms\");\n //wordnetResources.add(\"hypernyms\");\n\n Properties split_props = new Properties();\n //Properties including lemmatization\n //props.put(\"annotators\", \"tokenize, ssplit, pos, lemma\");\n //Properties without lemmatization\n split_props.put(\"annotators\", \"tokenize, ssplit, pos\");\n split_props.put(\"tokenize.language\", \"en\");\n split_pipeline = new StanfordCoreNLP(split_props);\n\n Properties lemma_props = new Properties();\n lemma_props.put(\"annotators\", \"tokenize, ssplit, pos, lemma\");\n lemma_props.put(\"tokenize.language\", \"en\");\n lemma_pipeline = new StanfordCoreNLP(lemma_props);\n\n Properties entityMentions_props = new Properties();\n entityMentions_props.put(\"annotators\", \"tokenize, ssplit, truecase, pos, lemma, ner, entitymentions\");\n entityMentions_props.put(\"tokenize.language\", \"en\");\n entityMentions_props.put(\"truecase.overwriteText\", \"true\");\n entityMentions_pipeline = new StanfordCoreNLP(entityMentions_props);\n\n Properties compound_props = new Properties();\n compound_props.put(\"annotators\", \"tokenize, ssplit, truecase, pos, parse\");\n compound_props.put(\"tokenize.language\", \"en\");\n compound_props.put(\"truecase.overwriteText\", \"true\");\n compounds_pipeline = new StanfordCoreNLP(compound_props);\n\n spotlight = new Spotlight();\n\n chanel = new LODSyndesisChanel();\n\n }",
"public void setJurisdictions(entity.AppCritJurisdiction[] value);",
"@Test\n void adjectivesCommonList() {\n //boolean flag = false;\n NLPAnalyser np = new NLPAnalyser();\n List<CoreMap> sentences = np.nlpPipeline(\"RT This made my day good; glad @JeremyKappell is standing up against bad #ROC’s disgusting mayor. \"\n + \"Former TV meteorologist Jeremy Kappell suing real Mayor Lovely Warren\"\n + \"https://t.co/rJIV5SN9vB worst(Via NEWS 8 WROC)\");\n ArrayList<String> adj = np.adjectives(sentences);\n for (String common : np.getCommonWords()) {\n assertFalse(adj.contains(common));\n }\n }",
"Builder addInLanguage(Language.Builder value);",
"public Language() {\r\n\t}",
"private void buildLanguageModel() {\n int total = 0;\n Map<Integer, Integer> wordCount = new HashMap<>();\n for (List<Integer> story : corpus.getStories()) {\n for (Integer word : story) {\n total++;\n if (wordCount.get(word) == null) wordCount.put(word, 0);\n wordCount.put(word, wordCount.get(word) + 1);\n }\n }\n wordValues = new HashMap<>();\n for (Map.Entry<Integer, Integer> entry : wordCount.entrySet()) {\n wordValues.put(entry.getKey(), total * 1.0 / entry.getValue());\n }\n }",
"public interface Bottlable {\n\n /**\n * Get the number of optional attribute fields.\n *\n * @return number of optional attribute fields\n */\n int getNumberOfOptionalAttributeFields();\n\n\n /**\n * Get the number of necessary attributes for the key generation.\n *\n * @return number of necessary attributes\n */\n int getNumberOfNecessaryAttributes();\n\n /**\n * Get the number of optional attributes, for a given field of optional attributes.\n *\n * @param field the number of the optional attribute field, for which the number of\n * attributes is queried.\n * @return number of optional attributes\n */\n int getNumberOfOptionalAttributes(final int field);\n\n /**\n * Get the number of optional attributes that must be identical for a successful match.\n *\n * @param field the number of the optional attribute field, for which the similarity threshold is\n * queried\n * @return number of necessary optional attributes, must be smaller than getNumberOfOptionalAttributes()\n */\n int getSimilarityThreshold(final int field);\n\n /**\n * Return a single necessary Attribute. Must return at least getNumberOfNecessaryAttributes()\n * times a valid not null String.\n *\n * @return a necessary Attribute\n */\n @NonNull\n String getNecessaryAttribute();\n\n /**\n * Return a single optional Attribute. Must return at least getNumberOfOptionalAttributes() times a valid not null String.\n *\n * @param field the number of the optional attribute field, for which the similarity threshold is\n * queried\n * @return an optional Attribute\n */\n @NonNull\n String getOptionalAttribute(final int field);\n}",
"public interface LibraryConstant {\n\n public interface LanguageConstant {\n\n public static String JAVA=\"JAVA\";\n public static String C=\"C\";\n public static String CPP=\"C++\";\n }\n\n public interface StyleConstant {\n\n //pre-defined Styles\n\n public static final String NORMAL=\"NORMAL\";\n public static final String BOLD=\"BOLD\";\n public static final String ITALIC=\"ITALIC\";\n public static final String UNDERLINE=\"UNDERLINE\";\n public static final String SUPERSCRIPT=\"SUPERSCRIPT\";\n public static final String SUBSCRIPT=\"SUBSCRIPT\";\n\n\n }\n}",
"default List<String> assignedConcepts(List<Source> sources){\n return assignedConcepts(10, sources);\n }",
"@ApiModelProperty(required = true, value = \"Language codes for the schemas available.\")\n @JsonProperty(\"Languages\")\n public List<String> getLanguages() {\n return languages;\n }",
"public static Set<String> getEnglishWords()\n{\n return english_words;\n}",
"public Alternatives getAlternatives_9() { return cAlternatives_9; }",
"public interface DictionaryCorrectior {\n\n\t/**\n\t * get correction word that have the most possibility from the misspelled text\n\t * @author liyuan\n\t * \n\t */\n\tpublic String getCorrectionWord(String misspell);\n\t\n\t\n\t\n\t/**\n\t * get a list of correction words from the misspelled text\n\t * @author liyuan\n\t * \n\t */\n\tpublic String[] getCorrectionList(String misspell);\n}",
"public interface LanguageProvider {\n\tLanguageService study();\n}",
"ConceptsType createConceptsType();",
"@DefaultLocale(\"fr\")\n@Generate(format={\"com.google.gwt.i18n.rebind.format.PropertiesFormat\"},locales={\"en\"})\npublic interface I18nConsts extends Constants {\n\t@DefaultStringArrayValue({\"France\",\"Espagne\",\"Belgique\"})\n\tString[] countries();\n}",
"public static void main(String[] args){\r\n Language myLang = new Language(\"Willish\", 5, \"Mars\", \"verb-noun-verb-adjective\");\r\n Mayan mayan = new Mayan(\"Ki'che'\", 2330000);\r\n SinoTibetan sino1 = new SinoTibetan(\"Chinese Tibetan\", 100000);\r\n SinoTibetan sino2 = new SinoTibetan(\"Tibetan\", 200000);\r\n ArrayList<Language> langList = new ArrayList<Language>();\r\n langList.add(myLang);\r\n langList.add(mayan);\r\n langList.add(sino1);\r\n langList.add(sino2);\r\n \r\n for (Language allLangs : langList){\r\n allLangs.getInfo();\r\n }\r\n }",
"Builder addLearningResourceType(String value);",
"MotifLearner(){\n notes = new ArrayList<>();\n times = new ArrayList<>();\n }",
"@DISPID(-2147413012)\n @PropPut\n void language(\n java.lang.String rhs);",
"public abstract void newSpeechConcepts(long ms, int n);",
"public interface LanguageInterface {\n public void setLanguage();\n}",
"private EnumUnderTest( String... strings ) {\n\t\tlanguages = Arrays.asList( strings );\n\t}",
"int countByExample(RepStuLearningExample example);",
"@Test\n public void testSpecies() throws IOException, UIMAException {\n /*String Text = \"In this text we talk about humans and mice. Because a mouse is no killifish nor a caenorhabditis elegans. Thus, c. elegans is now abbreviated as well as n. furzeri .\";\n\n JCas jCas = JCasFactory.createText(Text);\n\n //AnalysisEngineDescription engine = createEngineDescription(LinnaeusSpecies.class);\n AnalysisEngineDescription engine = createEngineDescription(LinnaeusSpecies.class);\n SimplePipeline.runPipeline(jCas, engine);\n\n String[] casSpecies = (String[]) JCasUtil.select(jCas, Organism.class).stream().map(a -> a.getCoveredText()).toArray(String[]::new);\n //String[] casID = (String[]) JCasUtil.select(jCas, Organism.class).stream().map(b -> b.getId()).toArray(String[]::new);\n\n String[] testSpecies = new String[] {\"humans\", \"mice\", \"mouse\", \"killifish\", \"caenorhabditis elegans\", \"c. elegans\", \"n. furzeri\"};\n //String[] testID = new String[] {\"9606\", \"10090\", \"10090\", \"34780\", \"6239\", \"6239\", \"105023\"};\n\n assertArrayEquals(testSpecies, casSpecies);*/\n //assertArrayEquals(testID, casID);\n }",
"public interface ApiPathConstants {\n\n // The media type constants\n String APPLICATION_JSON = \"application/json\";\n String ACCEPT_APPLICATION_JSON = \"Accept=application/json\";\n\n // Need to match below variables according to the cbr project\n String DEFAULT_CASEBASE = \"CaseBase0\";\n String DEFAULT_CONCEPT = \"Car\";\n String DEFAULT_AMAL_FUNCTION = \"CarFunc\";\n String DEFAULT_ATTR_ID = \"Color\";\n\n // The number of retrieved cases per query as preferred by the user.\n String DEFAULT_NO_OF_CASES = \"-1\";\n String NO_OF_RETURNED_CASES = \"k\";\n\n\n // myCBR-rest API: core vocabulary - single\n String PROJECT = \"project\";\n String CONCEPT \t= \"concept\";\n String CASEBASE \t= \"casebase\";\n String AMAL_FUNCTION= \"amalgamationFunction\";\n String ATTR \t= \"attribute\";\n String CASE \t= \"case\";\n String INSTANCE\t= \"instance\";\n String VALUE \t= \"value\";\n String SIM_FUNCTION = \"similarityFunction\";\n String LIST = \"list\";\n String NEW = \"new\";\n\n String EPHEMERAL \t= \"ephemeral\";\n String ANALYTICS \t= \"analytics\";\n\n\n // myCBR-rest API: core vocabulary - multiple\n String S \t\t\t= \"s\";\n String CONCEPTS \t\t= CONCEPT \t+ S;\n String CASEBASES \t\t= CASEBASE \t+ S;\n String AMAL_FUNCTIONS\t= AMAL_FUNCTION + S;\n String ATTRS \t\t= ATTR \t\t+ S;\n String CASES \t\t= CASE \t\t+ S;\n String INSTANCES\t\t= INSTANCE \t+ S;\n String VALUES \t\t= VALUE \t+ S;\n String SIM_FUNCTIONS \t= SIM_FUNCTION\t+ S;\n\n\n // myCBR-rest API: ID vocabulary\n String ID \t\t\t= \"ID\";\n String CONCEPT_ID \t\t= CONCEPT \t+ ID;\n String CASEBASE_ID \t\t= CASEBASE \t+ ID;\n String AMAL_FUNCTION_ID \t= AMAL_FUNCTION + ID;\n String ATTR_ID \t\t= ATTR \t\t+ ID;\n String NEW_ATTR_ID \t\t= NEW + ATTR \t\t+ ID;\n String ATTR_IDS = ATTR \t\t+ ID + S;\n String CASE_ID \t\t= CASE \t\t+ ID;\n String INSTANCE_ID \t\t= INSTANCE \t+ ID;\n String SIM_FUNCTION_ID\t= SIM_FUNCTION \t+ ID;\n //String ATTR_ID_LIST \t\t= ATTR \t\t+ ID + LIST;\n\n\n // myCBR-rest API: type vocabulary specific names\n String TYPE \t\t= \"Type\";\n String AMAL_FUNCTION_TYPE \t= AMAL_FUNCTION + TYPE;\n String ATTR_TYPE \t \t= ATTR + TYPE;\n\n\n // Path variables\n\n // Path pattern: /___ss\n String PATH \t\t=\"/\";\n String PATH_PROJECT = PATH + PROJECT;\n String PATH_CONCEPTS \t= PATH + CONCEPTS;\n String PATH_CASEBASES \t= PATH + CASEBASES;\n String PATH_AMAL_FUNCTIONS = PATH + AMAL_FUNCTIONS;\n String PATH_CASES \t\t= PATH + CASES;\n String PATH_ATTRIBUTES \t= PATH + ATTRS;\n String PATH_VALUE_RANGE = PATH + VALUE + \"Range\";\n String PATH_SIM_FUNCTIONS = PATH + SIM_FUNCTIONS;\n\n String PATH_EPHEMERAL = PATH + EPHEMERAL;\n String PATH_ANALYTICS = PATH + ANALYTICS;\n\n\n // Path pattern: /___s/{___ID}\n String PATH_CONCEPT_ID\t = PATH_CONCEPTS + \"/{\" + CONCEPT_ID \t + \"}\";\n String PATH_CASEBASE_ID \t = PATH_CASEBASES + \"/{\" + CASEBASE_ID \t + \"}\";\n String PATH_AMAL_FUNCTION_ID = PATH_AMAL_FUNCTIONS + \"/{\" + AMAL_FUNCTION_ID+ \"}\";\n String PATH_CASE_ID \t = PATH_CASES + \"/{\" + CASE_ID\t + \"}\";\n String PATH_ATTR_ID \t = PATH_ATTRIBUTES + \"/{\" + ATTR_ID + \"}\";\n String PATH_SIM_FUNCTION_ID = PATH_SIM_FUNCTIONS + \"/{\" + SIM_FUNCTION_ID + \"}\";\n //String PATH_ATTR_ID_LIST \t = PATH_ATTRIBUTES + \"/{\" + ATTR_ID_LIST + \"}\";\n String PATH_NEW_ATTR_ID \t = PATH_ATTRIBUTES + \"/{\" + NEW_ATTR_ID + \"}\";\n\n\n // Path pattern: /concepts/{conceptID}/___s\n String PATH_CONCEPT_CASEBASES \t= PATH_CONCEPT_ID + PATH_CASEBASES;\n String PATH_CONCEPT_AMAL_FUNCTIONS = PATH_CONCEPT_ID + PATH_AMAL_FUNCTIONS;\n String PATH_CONCEPT_CASES \t \t= PATH_CONCEPT_ID + PATH_CASES;\n String PATH_CONCEPT_ATTRS \t \t= PATH_CONCEPT_ID + PATH_ATTRIBUTES;\n\n\n // Path pattern: /concepts/{conceptID}/___s/{___ID}\n String PATH_CONCEPT_CASEBASE_ID \t = PATH_CONCEPT_ID + PATH_CASEBASE_ID;\n String PATH_CONCEPT_AMAL_FUNCTION_ID = PATH_CONCEPT_ID + PATH_AMAL_FUNCTION_ID;\n String PATH_CONCEPT_CASE_ID \t = PATH_CONCEPT_ID + PATH_CASE_ID;\n String PATH_CONCEPT_ATTR_ID\t \t = PATH_CONCEPT_ID + PATH_ATTR_ID;\n //String PATH_CONCEPT_ATTR_ID_LIST\t \t = PATH_CONCEPT_ID + PATH_ATTR_ID_LIST;\n\n\n //Path pattern: /concepts/{conceptID}/casebases/{casebaseID}/___s\n String PATH_CONCEPT_CASEBASE_AMAL_FUNCTIONS = PATH_CONCEPT_CASEBASE_ID + PATH_AMAL_FUNCTIONS;\n String PATH_CONCEPT_CASEBASE_CASES = PATH_CONCEPT_CASEBASE_ID + PATH_CASES;\n\n //Path pattern: /concepts/{conceptID}/casebases/{casebaseID}/___s/{___ID}\n String PATH_CONCEPT_CASEBASE_AMAL_FUNCTION_ID = PATH_CONCEPT_CASEBASE_ID + PATH_AMAL_FUNCTION_ID;\n String PATH_CONCEPT_CASEBASE_CASE_ID = PATH_CONCEPT_CASEBASE_ID + PATH_CASE_ID;\n\n //Path pattern: /concepts/{conceptID}/attributes/{attributeID}/valueRange\n String PATH_CONCEPT_ATTR_VALUE_RANGE = PATH_CONCEPT_ATTR_ID + PATH_VALUE_RANGE;\n\n //Path pattern: /concepts/{conceptID}/attributes/{attributeID}/___s\n String PATH_CONCEPT_ATTR_SIM_FUNCTIONS = PATH_CONCEPT_ATTR_ID + PATH_SIM_FUNCTIONS;\n\n //Path pattern: /concepts/{conceptID}/attributes/{attributeID}/___s/{___ID}\n String PATH_CONCEPT_ATTR_SIM_FUNCTION_ID = PATH_CONCEPT_ATTR_ID + PATH_SIM_FUNCTION_ID;\n\n\n //Path pattern: /ephemeral/concepts/{conceptID}/amalgamationFunctions/{amalgamationFunctionID}s\n String PATH_EPHEMERAL_CONCEPT_AMAL_FUNCTION_ID = PATH_EPHEMERAL + PATH_CONCEPT_AMAL_FUNCTION_ID;\n\n //Path pattern: /analytics/concepts/{conceptID}/amalgamationFunctions/{amalgamationFunctionID}\n String PATH_ANALYTICS_CONCEPT_AMAL_FUNCTION_ID = PATH_ANALYTICS + PATH_CONCEPT_AMAL_FUNCTION_ID;\n\n String COMPUTE_SELF_SIMLARITY = \"computeSelfSimilarity\";\n String RETRIEVAL_BY_CASE_IDS = \"retrievalByCaseIDs\";\n String RETRIEVAL_BY_CASE_ID_WITH_CONTENT = \"retrievalByCaseIDWithContent\";\n\n // Path pattern: /___\n String PATH_SELF_SIMLARITY \t\t= PATH + COMPUTE_SELF_SIMLARITY;\n String PATH_RETRIEVAL \t\t\t= PATH + RETRIEVAL_BY_CASE_IDS;\n String PATH_RETRIEVAL_BY_CASE_ID_WITH_CONTENT \t= PATH + RETRIEVAL_BY_CASE_ID_WITH_CONTENT;\n\n String PATH_CONCEPT_CASEBASE_SELF_SIMLARITY = PATH_CONCEPT_CASEBASE_ID + PATH_SELF_SIMLARITY;\n\n String PATH_DEFAULT_EPHEMERAL = PATH_EPHEMERAL + PATH_CONCEPT_CASEBASE_AMAL_FUNCTION_ID;\n String PATH_EPHEMERAL_RETRIEVAL = PATH_DEFAULT_EPHEMERAL + PATH_RETRIEVAL;\n String PATH_EPHEMERAL_RETRIEVAL_WITH_CONTENT = PATH_DEFAULT_EPHEMERAL + PATH_RETRIEVAL_BY_CASE_ID_WITH_CONTENT;\n String PATH_EPHEMERAL_SELF_SIMILARITY = PATH_DEFAULT_EPHEMERAL + PATH_SELF_SIMLARITY;\n}",
"FeatureConcept createFeatureConcept();",
"public CandidateAnswerVariant_Type(JCas jcas, Type casType) {\n super(jcas, casType);\n casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());\n\n \n casFeat_occurrences = jcas.getRequiredFeatureDE(casType, \"occurrences\", \"uima.cas.FSList\", featOkTst);\n casFeatCode_occurrences = (null == casFeat_occurrences) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_occurrences).getCode();\n\n \n casFeat_candidateId = jcas.getRequiredFeatureDE(casType, \"candidateId\", \"uima.cas.String\", featOkTst);\n casFeatCode_candidateId = (null == casFeat_candidateId) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_candidateId).getCode();\n\n \n casFeat_text = jcas.getRequiredFeatureDE(casType, \"text\", \"uima.cas.String\", featOkTst);\n casFeatCode_text = (null == casFeat_text) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_text).getCode();\n\n \n casFeat_alternativeNames = jcas.getRequiredFeatureDE(casType, \"alternativeNames\", \"uima.cas.StringList\", featOkTst);\n casFeatCode_alternativeNames = (null == casFeat_alternativeNames) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_alternativeNames).getCode();\n\n \n casFeat_uri = jcas.getRequiredFeatureDE(casType, \"uri\", \"uima.cas.String\", featOkTst);\n casFeatCode_uri = (null == casFeat_uri) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_uri).getCode();\n\n \n casFeat_docId = jcas.getRequiredFeatureDE(casType, \"docId\", \"uima.cas.String\", featOkTst);\n casFeatCode_docId = (null == casFeat_docId) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_docId).getCode();\n\n }",
"public interface OwlClass extends OwlResource {\n\tenum ALTERNATIVE {\n\t\tCLASS, ENUMERATED\n\t};\n\n\tenum MODALITY {\n\t\tCOMPLETE, PARTIAL\n\t};\n\n\tpublic ALTERNATIVE getAlternative();\n\n\tpublic OwlClassDescription[] getClassDescriptionArray();\n\n\tpublic OwlClassDescription[] getDisjointClassArray();\n\n\tpublic OwlClassDescription[] getEquivalentClassArray();\n\n\tpublic SemanticId[] getIndividualIdArray();\n\n\tpublic MODALITY getModality();\n\n\tpublic OwlClassDescription[] getSubClassOfArray();\n\n}",
"public static void caso31(){\n\t FilterManager fm= new FilterManager(\"resources/stopWordsList.txt\",\"resources/useCaseWeight.properties\");\n\t\t\tQualityAttributeBelongable qualityAttributeBelongable = new OntologyManager(\"file:resources/caso3.owl\",\"file:resources/caso3.repository\",fm);\n\t\t\tMap<QualityAttributeInterface,Double> map = qualityAttributeBelongable.getWordPertenence(\"response1\");\n\t\t\tif(map==null){\n\t\t\t\tSystem.out.println(\"El map es null\");\n\t\t\t}else{\n\t\t\t\tMapUtils.imprimirMap(map);\n\t\t\t}\n\t}",
"List<Language> getAll();",
"CLanguage getClanguage();",
"Lingua getLingua();",
"private Vocabulary() {\n }",
"public interface MetaData {\r\n\r\n\tpublic static final String CV_SBML = \"SBML\";\r\n\r\n\tpublic static final String ET_SBML = \"SBML_import\";\r\n\r\n\tpublic static final String AN_SBO = \"SBO\";\r\n\r\n\tpublic static final String RT_CONSUMED_BY = \"cs_by\";\r\n\r\n\tpublic static final String RT_PRODUCED_BY = \"pd_by\";\r\n\r\n\tpublic static final String RT_REGULATED_BY = \"rg_by\";\r\n\r\n\tpublic static final String RT_TRANSFORMATION_OF = \"transformation_of\";\r\n\r\n\tpublic static final String CC_REACTION = \"Reaction\";\r\n\r\n\tpublic static final String CC_COMPOUND = \"Comp\";\r\n\r\n\tpublic static final String CC_CELCOMP = \"CelComp\";\r\n\r\n}",
"static WordList get(Language language) {\n return switch (language) {\n case ENGLISH -> readResource(\"bip39_english.txt\");\n };\n }",
"Builder addInLanguage(Text value);",
"public Alternatives getAlternatives_11() { return cAlternatives_11; }",
"public void setLanguageList(Language[] languageList) {\n this.languageList = languageList;\n }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }"
] | [
"0.7332505",
"0.70174694",
"0.6803061",
"0.6512835",
"0.5565492",
"0.5514856",
"0.5496935",
"0.54585266",
"0.53770053",
"0.5339303",
"0.53268",
"0.5304535",
"0.5277535",
"0.52718323",
"0.5232228",
"0.5221515",
"0.5190006",
"0.51830447",
"0.51728094",
"0.5150765",
"0.51364756",
"0.5100877",
"0.5095768",
"0.50936234",
"0.50890374",
"0.50651115",
"0.5062534",
"0.50480205",
"0.502938",
"0.50279313",
"0.50132036",
"0.4974179",
"0.4958406",
"0.495304",
"0.4936549",
"0.49359983",
"0.493078",
"0.4930226",
"0.49267393",
"0.49122098",
"0.49026978",
"0.4902177",
"0.48998386",
"0.48980916",
"0.48935485",
"0.48876655",
"0.48849654",
"0.48814064",
"0.48802286",
"0.48775664",
"0.4868551",
"0.48647973",
"0.4862954",
"0.48517817",
"0.48492384",
"0.48487517",
"0.48457685",
"0.4839277",
"0.4837101",
"0.48363453",
"0.48177814",
"0.48177814",
"0.48177814",
"0.48177814",
"0.48177814",
"0.48177814",
"0.48177814",
"0.48177814",
"0.48177814",
"0.48177814",
"0.48177814",
"0.48177814",
"0.48177814",
"0.48177814",
"0.48177814",
"0.48177814",
"0.48177814",
"0.48177814",
"0.48177814",
"0.48177814",
"0.48177814",
"0.48177814",
"0.48177814",
"0.48177814",
"0.48177814",
"0.48177814",
"0.48177814",
"0.48177814",
"0.48177814",
"0.48177814",
"0.48177814",
"0.48177814",
"0.48177814",
"0.48177814",
"0.48177814",
"0.48177814",
"0.48177814",
"0.48177814",
"0.48177814",
"0.48177814"
] | 0.6910596 | 2 |
repeated .clarifai.api.ConceptLanguage concept_languages = 3; | com.clarifai.grpc.api.ConceptLanguageOrBuilder getConceptLanguagesOrBuilder(
int index); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"com.clarifai.grpc.api.ConceptLanguage getConceptLanguages(int index);",
"java.util.List<com.clarifai.grpc.api.ConceptLanguage> \n getConceptLanguagesList();",
"java.util.List<? extends com.clarifai.grpc.api.ConceptLanguageOrBuilder> \n getConceptLanguagesOrBuilderList();",
"int getConceptLanguagesCount();",
"speech.multilang.Params.DecisionPointParams.Type getType();",
"public void addLanguage(String value) {\n/* 230 */ addStringToBag(\"language\", value);\n/* */ }",
"default List<String> assignedConcepts(Source code){\n return assignedConcepts(code, ImmutableSet.of());\n }",
"speech.multilang.Params.SemanticLangidParams getSemanticLangidParams();",
"@Test\n public void listAllAvailableLanguages() throws IOException {\n System.out.println(\n \"Language preprocessing components for the following languages are available:\\n \"\n + String.join(\", \", LanguageComponents.languages()));\n }",
"Builder addLearningResourceType(Text value);",
"@DISPID(-2147413012)\n @PropGet\n java.lang.String language();",
"@DISPID(-2147413103)\n @PropGet\n java.lang.String lang();",
"interface Language {\n HashMap<String,String> colorMap= new HashMap<>();\n String getColor(String myToken);\n String defaultColor = \"black\";\n}",
"public LanguageSkill() {\n\t}",
"String getConcept();",
"void mo1927a(NLPResponseData nLPResponseData);",
"public Alternatives getAlternatives_3() { return cAlternatives_3; }",
"speech.multilang.Params.DecisionPointParams getDecisionPointParams();",
"public String[] getLanguages() {\n/* 238 */ return getStringArray(\"language\");\n/* */ }",
"public interface DublinCoreConstants {\n \n /** Creates a new instance of Class */\n public static int DC_TITLE = 0;\n public static int DC_CREATOR = 1;\n public static int DC_SUBJECT = 2;\n public static int DC_DATE = 3;\n public static int DC_TYPE= 4;\n public static int DC_FORMAT= 5;\n public static int DC_IDENTIFIER = 6;\n public static int DC_COLLECTION = 7;\n public static int DC_COVERAGE = 8;\n \n public static int SUPPORTED_NUMBER = 9;\n \n public static final String[] DC_FIELDS = {\"title\",\"creator\",\"subject\",\"date\",\"type\",\"format\",\"identifier\",\"collection\",\"coverage\"};\n public static final String DC_NAMESPACE = \"dc:\";\n \n}",
"speech.multilang.Params.ScoringControllerParams.Type getType();",
"public static void initializeToolsAndResourcesForDemo(IDictionary dict) throws MalformedURLException, IOException {\n wordnet_dict = dict;\n wordnet_dict.open();\n\n // Choose wordnet sources to be used\n wordnetResources.add(\"synonyms\");\n //wordnetResources.add(\"antonyms\");\n //wordnetResources.add(\"hypernyms\");\n\n Properties split_props = new Properties();\n //Properties including lemmatization\n //props.put(\"annotators\", \"tokenize, ssplit, pos, lemma\");\n //Properties without lemmatization\n split_props.put(\"annotators\", \"tokenize, ssplit, pos\");\n split_props.put(\"tokenize.language\", \"en\");\n split_pipeline = new StanfordCoreNLP(split_props);\n\n Properties lemma_props = new Properties();\n lemma_props.put(\"annotators\", \"tokenize, ssplit, pos, lemma\");\n lemma_props.put(\"tokenize.language\", \"en\");\n lemma_pipeline = new StanfordCoreNLP(lemma_props);\n\n Properties entityMentions_props = new Properties();\n entityMentions_props.put(\"annotators\", \"tokenize, ssplit, truecase, pos, lemma, ner, entitymentions\");\n entityMentions_props.put(\"tokenize.language\", \"en\");\n entityMentions_props.put(\"truecase.overwriteText\", \"true\");\n entityMentions_pipeline = new StanfordCoreNLP(entityMentions_props);\n\n Properties compound_props = new Properties();\n compound_props.put(\"annotators\", \"tokenize, ssplit, truecase, pos, parse\");\n compound_props.put(\"tokenize.language\", \"en\");\n compound_props.put(\"truecase.overwriteText\", \"true\");\n compounds_pipeline = new StanfordCoreNLP(compound_props);\n\n spotlight = new Spotlight();\n\n chanel = new LODSyndesisChanel();\n\n }",
"public void setJurisdictions(entity.AppCritJurisdiction[] value);",
"@Test\n void adjectivesCommonList() {\n //boolean flag = false;\n NLPAnalyser np = new NLPAnalyser();\n List<CoreMap> sentences = np.nlpPipeline(\"RT This made my day good; glad @JeremyKappell is standing up against bad #ROC’s disgusting mayor. \"\n + \"Former TV meteorologist Jeremy Kappell suing real Mayor Lovely Warren\"\n + \"https://t.co/rJIV5SN9vB worst(Via NEWS 8 WROC)\");\n ArrayList<String> adj = np.adjectives(sentences);\n for (String common : np.getCommonWords()) {\n assertFalse(adj.contains(common));\n }\n }",
"Builder addInLanguage(Language.Builder value);",
"public Language() {\r\n\t}",
"private void buildLanguageModel() {\n int total = 0;\n Map<Integer, Integer> wordCount = new HashMap<>();\n for (List<Integer> story : corpus.getStories()) {\n for (Integer word : story) {\n total++;\n if (wordCount.get(word) == null) wordCount.put(word, 0);\n wordCount.put(word, wordCount.get(word) + 1);\n }\n }\n wordValues = new HashMap<>();\n for (Map.Entry<Integer, Integer> entry : wordCount.entrySet()) {\n wordValues.put(entry.getKey(), total * 1.0 / entry.getValue());\n }\n }",
"public interface Bottlable {\n\n /**\n * Get the number of optional attribute fields.\n *\n * @return number of optional attribute fields\n */\n int getNumberOfOptionalAttributeFields();\n\n\n /**\n * Get the number of necessary attributes for the key generation.\n *\n * @return number of necessary attributes\n */\n int getNumberOfNecessaryAttributes();\n\n /**\n * Get the number of optional attributes, for a given field of optional attributes.\n *\n * @param field the number of the optional attribute field, for which the number of\n * attributes is queried.\n * @return number of optional attributes\n */\n int getNumberOfOptionalAttributes(final int field);\n\n /**\n * Get the number of optional attributes that must be identical for a successful match.\n *\n * @param field the number of the optional attribute field, for which the similarity threshold is\n * queried\n * @return number of necessary optional attributes, must be smaller than getNumberOfOptionalAttributes()\n */\n int getSimilarityThreshold(final int field);\n\n /**\n * Return a single necessary Attribute. Must return at least getNumberOfNecessaryAttributes()\n * times a valid not null String.\n *\n * @return a necessary Attribute\n */\n @NonNull\n String getNecessaryAttribute();\n\n /**\n * Return a single optional Attribute. Must return at least getNumberOfOptionalAttributes() times a valid not null String.\n *\n * @param field the number of the optional attribute field, for which the similarity threshold is\n * queried\n * @return an optional Attribute\n */\n @NonNull\n String getOptionalAttribute(final int field);\n}",
"public interface LibraryConstant {\n\n public interface LanguageConstant {\n\n public static String JAVA=\"JAVA\";\n public static String C=\"C\";\n public static String CPP=\"C++\";\n }\n\n public interface StyleConstant {\n\n //pre-defined Styles\n\n public static final String NORMAL=\"NORMAL\";\n public static final String BOLD=\"BOLD\";\n public static final String ITALIC=\"ITALIC\";\n public static final String UNDERLINE=\"UNDERLINE\";\n public static final String SUPERSCRIPT=\"SUPERSCRIPT\";\n public static final String SUBSCRIPT=\"SUBSCRIPT\";\n\n\n }\n}",
"default List<String> assignedConcepts(List<Source> sources){\n return assignedConcepts(10, sources);\n }",
"@ApiModelProperty(required = true, value = \"Language codes for the schemas available.\")\n @JsonProperty(\"Languages\")\n public List<String> getLanguages() {\n return languages;\n }",
"public static Set<String> getEnglishWords()\n{\n return english_words;\n}",
"public Alternatives getAlternatives_9() { return cAlternatives_9; }",
"public interface DictionaryCorrectior {\n\n\t/**\n\t * get correction word that have the most possibility from the misspelled text\n\t * @author liyuan\n\t * \n\t */\n\tpublic String getCorrectionWord(String misspell);\n\t\n\t\n\t\n\t/**\n\t * get a list of correction words from the misspelled text\n\t * @author liyuan\n\t * \n\t */\n\tpublic String[] getCorrectionList(String misspell);\n}",
"public interface LanguageProvider {\n\tLanguageService study();\n}",
"ConceptsType createConceptsType();",
"public static void main(String[] args){\r\n Language myLang = new Language(\"Willish\", 5, \"Mars\", \"verb-noun-verb-adjective\");\r\n Mayan mayan = new Mayan(\"Ki'che'\", 2330000);\r\n SinoTibetan sino1 = new SinoTibetan(\"Chinese Tibetan\", 100000);\r\n SinoTibetan sino2 = new SinoTibetan(\"Tibetan\", 200000);\r\n ArrayList<Language> langList = new ArrayList<Language>();\r\n langList.add(myLang);\r\n langList.add(mayan);\r\n langList.add(sino1);\r\n langList.add(sino2);\r\n \r\n for (Language allLangs : langList){\r\n allLangs.getInfo();\r\n }\r\n }",
"@DefaultLocale(\"fr\")\n@Generate(format={\"com.google.gwt.i18n.rebind.format.PropertiesFormat\"},locales={\"en\"})\npublic interface I18nConsts extends Constants {\n\t@DefaultStringArrayValue({\"France\",\"Espagne\",\"Belgique\"})\n\tString[] countries();\n}",
"Builder addLearningResourceType(String value);",
"MotifLearner(){\n notes = new ArrayList<>();\n times = new ArrayList<>();\n }",
"@DISPID(-2147413012)\n @PropPut\n void language(\n java.lang.String rhs);",
"public abstract void newSpeechConcepts(long ms, int n);",
"public interface LanguageInterface {\n public void setLanguage();\n}",
"private EnumUnderTest( String... strings ) {\n\t\tlanguages = Arrays.asList( strings );\n\t}",
"int countByExample(RepStuLearningExample example);",
"@Test\n public void testSpecies() throws IOException, UIMAException {\n /*String Text = \"In this text we talk about humans and mice. Because a mouse is no killifish nor a caenorhabditis elegans. Thus, c. elegans is now abbreviated as well as n. furzeri .\";\n\n JCas jCas = JCasFactory.createText(Text);\n\n //AnalysisEngineDescription engine = createEngineDescription(LinnaeusSpecies.class);\n AnalysisEngineDescription engine = createEngineDescription(LinnaeusSpecies.class);\n SimplePipeline.runPipeline(jCas, engine);\n\n String[] casSpecies = (String[]) JCasUtil.select(jCas, Organism.class).stream().map(a -> a.getCoveredText()).toArray(String[]::new);\n //String[] casID = (String[]) JCasUtil.select(jCas, Organism.class).stream().map(b -> b.getId()).toArray(String[]::new);\n\n String[] testSpecies = new String[] {\"humans\", \"mice\", \"mouse\", \"killifish\", \"caenorhabditis elegans\", \"c. elegans\", \"n. furzeri\"};\n //String[] testID = new String[] {\"9606\", \"10090\", \"10090\", \"34780\", \"6239\", \"6239\", \"105023\"};\n\n assertArrayEquals(testSpecies, casSpecies);*/\n //assertArrayEquals(testID, casID);\n }",
"public interface ApiPathConstants {\n\n // The media type constants\n String APPLICATION_JSON = \"application/json\";\n String ACCEPT_APPLICATION_JSON = \"Accept=application/json\";\n\n // Need to match below variables according to the cbr project\n String DEFAULT_CASEBASE = \"CaseBase0\";\n String DEFAULT_CONCEPT = \"Car\";\n String DEFAULT_AMAL_FUNCTION = \"CarFunc\";\n String DEFAULT_ATTR_ID = \"Color\";\n\n // The number of retrieved cases per query as preferred by the user.\n String DEFAULT_NO_OF_CASES = \"-1\";\n String NO_OF_RETURNED_CASES = \"k\";\n\n\n // myCBR-rest API: core vocabulary - single\n String PROJECT = \"project\";\n String CONCEPT \t= \"concept\";\n String CASEBASE \t= \"casebase\";\n String AMAL_FUNCTION= \"amalgamationFunction\";\n String ATTR \t= \"attribute\";\n String CASE \t= \"case\";\n String INSTANCE\t= \"instance\";\n String VALUE \t= \"value\";\n String SIM_FUNCTION = \"similarityFunction\";\n String LIST = \"list\";\n String NEW = \"new\";\n\n String EPHEMERAL \t= \"ephemeral\";\n String ANALYTICS \t= \"analytics\";\n\n\n // myCBR-rest API: core vocabulary - multiple\n String S \t\t\t= \"s\";\n String CONCEPTS \t\t= CONCEPT \t+ S;\n String CASEBASES \t\t= CASEBASE \t+ S;\n String AMAL_FUNCTIONS\t= AMAL_FUNCTION + S;\n String ATTRS \t\t= ATTR \t\t+ S;\n String CASES \t\t= CASE \t\t+ S;\n String INSTANCES\t\t= INSTANCE \t+ S;\n String VALUES \t\t= VALUE \t+ S;\n String SIM_FUNCTIONS \t= SIM_FUNCTION\t+ S;\n\n\n // myCBR-rest API: ID vocabulary\n String ID \t\t\t= \"ID\";\n String CONCEPT_ID \t\t= CONCEPT \t+ ID;\n String CASEBASE_ID \t\t= CASEBASE \t+ ID;\n String AMAL_FUNCTION_ID \t= AMAL_FUNCTION + ID;\n String ATTR_ID \t\t= ATTR \t\t+ ID;\n String NEW_ATTR_ID \t\t= NEW + ATTR \t\t+ ID;\n String ATTR_IDS = ATTR \t\t+ ID + S;\n String CASE_ID \t\t= CASE \t\t+ ID;\n String INSTANCE_ID \t\t= INSTANCE \t+ ID;\n String SIM_FUNCTION_ID\t= SIM_FUNCTION \t+ ID;\n //String ATTR_ID_LIST \t\t= ATTR \t\t+ ID + LIST;\n\n\n // myCBR-rest API: type vocabulary specific names\n String TYPE \t\t= \"Type\";\n String AMAL_FUNCTION_TYPE \t= AMAL_FUNCTION + TYPE;\n String ATTR_TYPE \t \t= ATTR + TYPE;\n\n\n // Path variables\n\n // Path pattern: /___ss\n String PATH \t\t=\"/\";\n String PATH_PROJECT = PATH + PROJECT;\n String PATH_CONCEPTS \t= PATH + CONCEPTS;\n String PATH_CASEBASES \t= PATH + CASEBASES;\n String PATH_AMAL_FUNCTIONS = PATH + AMAL_FUNCTIONS;\n String PATH_CASES \t\t= PATH + CASES;\n String PATH_ATTRIBUTES \t= PATH + ATTRS;\n String PATH_VALUE_RANGE = PATH + VALUE + \"Range\";\n String PATH_SIM_FUNCTIONS = PATH + SIM_FUNCTIONS;\n\n String PATH_EPHEMERAL = PATH + EPHEMERAL;\n String PATH_ANALYTICS = PATH + ANALYTICS;\n\n\n // Path pattern: /___s/{___ID}\n String PATH_CONCEPT_ID\t = PATH_CONCEPTS + \"/{\" + CONCEPT_ID \t + \"}\";\n String PATH_CASEBASE_ID \t = PATH_CASEBASES + \"/{\" + CASEBASE_ID \t + \"}\";\n String PATH_AMAL_FUNCTION_ID = PATH_AMAL_FUNCTIONS + \"/{\" + AMAL_FUNCTION_ID+ \"}\";\n String PATH_CASE_ID \t = PATH_CASES + \"/{\" + CASE_ID\t + \"}\";\n String PATH_ATTR_ID \t = PATH_ATTRIBUTES + \"/{\" + ATTR_ID + \"}\";\n String PATH_SIM_FUNCTION_ID = PATH_SIM_FUNCTIONS + \"/{\" + SIM_FUNCTION_ID + \"}\";\n //String PATH_ATTR_ID_LIST \t = PATH_ATTRIBUTES + \"/{\" + ATTR_ID_LIST + \"}\";\n String PATH_NEW_ATTR_ID \t = PATH_ATTRIBUTES + \"/{\" + NEW_ATTR_ID + \"}\";\n\n\n // Path pattern: /concepts/{conceptID}/___s\n String PATH_CONCEPT_CASEBASES \t= PATH_CONCEPT_ID + PATH_CASEBASES;\n String PATH_CONCEPT_AMAL_FUNCTIONS = PATH_CONCEPT_ID + PATH_AMAL_FUNCTIONS;\n String PATH_CONCEPT_CASES \t \t= PATH_CONCEPT_ID + PATH_CASES;\n String PATH_CONCEPT_ATTRS \t \t= PATH_CONCEPT_ID + PATH_ATTRIBUTES;\n\n\n // Path pattern: /concepts/{conceptID}/___s/{___ID}\n String PATH_CONCEPT_CASEBASE_ID \t = PATH_CONCEPT_ID + PATH_CASEBASE_ID;\n String PATH_CONCEPT_AMAL_FUNCTION_ID = PATH_CONCEPT_ID + PATH_AMAL_FUNCTION_ID;\n String PATH_CONCEPT_CASE_ID \t = PATH_CONCEPT_ID + PATH_CASE_ID;\n String PATH_CONCEPT_ATTR_ID\t \t = PATH_CONCEPT_ID + PATH_ATTR_ID;\n //String PATH_CONCEPT_ATTR_ID_LIST\t \t = PATH_CONCEPT_ID + PATH_ATTR_ID_LIST;\n\n\n //Path pattern: /concepts/{conceptID}/casebases/{casebaseID}/___s\n String PATH_CONCEPT_CASEBASE_AMAL_FUNCTIONS = PATH_CONCEPT_CASEBASE_ID + PATH_AMAL_FUNCTIONS;\n String PATH_CONCEPT_CASEBASE_CASES = PATH_CONCEPT_CASEBASE_ID + PATH_CASES;\n\n //Path pattern: /concepts/{conceptID}/casebases/{casebaseID}/___s/{___ID}\n String PATH_CONCEPT_CASEBASE_AMAL_FUNCTION_ID = PATH_CONCEPT_CASEBASE_ID + PATH_AMAL_FUNCTION_ID;\n String PATH_CONCEPT_CASEBASE_CASE_ID = PATH_CONCEPT_CASEBASE_ID + PATH_CASE_ID;\n\n //Path pattern: /concepts/{conceptID}/attributes/{attributeID}/valueRange\n String PATH_CONCEPT_ATTR_VALUE_RANGE = PATH_CONCEPT_ATTR_ID + PATH_VALUE_RANGE;\n\n //Path pattern: /concepts/{conceptID}/attributes/{attributeID}/___s\n String PATH_CONCEPT_ATTR_SIM_FUNCTIONS = PATH_CONCEPT_ATTR_ID + PATH_SIM_FUNCTIONS;\n\n //Path pattern: /concepts/{conceptID}/attributes/{attributeID}/___s/{___ID}\n String PATH_CONCEPT_ATTR_SIM_FUNCTION_ID = PATH_CONCEPT_ATTR_ID + PATH_SIM_FUNCTION_ID;\n\n\n //Path pattern: /ephemeral/concepts/{conceptID}/amalgamationFunctions/{amalgamationFunctionID}s\n String PATH_EPHEMERAL_CONCEPT_AMAL_FUNCTION_ID = PATH_EPHEMERAL + PATH_CONCEPT_AMAL_FUNCTION_ID;\n\n //Path pattern: /analytics/concepts/{conceptID}/amalgamationFunctions/{amalgamationFunctionID}\n String PATH_ANALYTICS_CONCEPT_AMAL_FUNCTION_ID = PATH_ANALYTICS + PATH_CONCEPT_AMAL_FUNCTION_ID;\n\n String COMPUTE_SELF_SIMLARITY = \"computeSelfSimilarity\";\n String RETRIEVAL_BY_CASE_IDS = \"retrievalByCaseIDs\";\n String RETRIEVAL_BY_CASE_ID_WITH_CONTENT = \"retrievalByCaseIDWithContent\";\n\n // Path pattern: /___\n String PATH_SELF_SIMLARITY \t\t= PATH + COMPUTE_SELF_SIMLARITY;\n String PATH_RETRIEVAL \t\t\t= PATH + RETRIEVAL_BY_CASE_IDS;\n String PATH_RETRIEVAL_BY_CASE_ID_WITH_CONTENT \t= PATH + RETRIEVAL_BY_CASE_ID_WITH_CONTENT;\n\n String PATH_CONCEPT_CASEBASE_SELF_SIMLARITY = PATH_CONCEPT_CASEBASE_ID + PATH_SELF_SIMLARITY;\n\n String PATH_DEFAULT_EPHEMERAL = PATH_EPHEMERAL + PATH_CONCEPT_CASEBASE_AMAL_FUNCTION_ID;\n String PATH_EPHEMERAL_RETRIEVAL = PATH_DEFAULT_EPHEMERAL + PATH_RETRIEVAL;\n String PATH_EPHEMERAL_RETRIEVAL_WITH_CONTENT = PATH_DEFAULT_EPHEMERAL + PATH_RETRIEVAL_BY_CASE_ID_WITH_CONTENT;\n String PATH_EPHEMERAL_SELF_SIMILARITY = PATH_DEFAULT_EPHEMERAL + PATH_SELF_SIMLARITY;\n}",
"FeatureConcept createFeatureConcept();",
"public CandidateAnswerVariant_Type(JCas jcas, Type casType) {\n super(jcas, casType);\n casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());\n\n \n casFeat_occurrences = jcas.getRequiredFeatureDE(casType, \"occurrences\", \"uima.cas.FSList\", featOkTst);\n casFeatCode_occurrences = (null == casFeat_occurrences) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_occurrences).getCode();\n\n \n casFeat_candidateId = jcas.getRequiredFeatureDE(casType, \"candidateId\", \"uima.cas.String\", featOkTst);\n casFeatCode_candidateId = (null == casFeat_candidateId) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_candidateId).getCode();\n\n \n casFeat_text = jcas.getRequiredFeatureDE(casType, \"text\", \"uima.cas.String\", featOkTst);\n casFeatCode_text = (null == casFeat_text) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_text).getCode();\n\n \n casFeat_alternativeNames = jcas.getRequiredFeatureDE(casType, \"alternativeNames\", \"uima.cas.StringList\", featOkTst);\n casFeatCode_alternativeNames = (null == casFeat_alternativeNames) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_alternativeNames).getCode();\n\n \n casFeat_uri = jcas.getRequiredFeatureDE(casType, \"uri\", \"uima.cas.String\", featOkTst);\n casFeatCode_uri = (null == casFeat_uri) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_uri).getCode();\n\n \n casFeat_docId = jcas.getRequiredFeatureDE(casType, \"docId\", \"uima.cas.String\", featOkTst);\n casFeatCode_docId = (null == casFeat_docId) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_docId).getCode();\n\n }",
"public interface OwlClass extends OwlResource {\n\tenum ALTERNATIVE {\n\t\tCLASS, ENUMERATED\n\t};\n\n\tenum MODALITY {\n\t\tCOMPLETE, PARTIAL\n\t};\n\n\tpublic ALTERNATIVE getAlternative();\n\n\tpublic OwlClassDescription[] getClassDescriptionArray();\n\n\tpublic OwlClassDescription[] getDisjointClassArray();\n\n\tpublic OwlClassDescription[] getEquivalentClassArray();\n\n\tpublic SemanticId[] getIndividualIdArray();\n\n\tpublic MODALITY getModality();\n\n\tpublic OwlClassDescription[] getSubClassOfArray();\n\n}",
"public static void caso31(){\n\t FilterManager fm= new FilterManager(\"resources/stopWordsList.txt\",\"resources/useCaseWeight.properties\");\n\t\t\tQualityAttributeBelongable qualityAttributeBelongable = new OntologyManager(\"file:resources/caso3.owl\",\"file:resources/caso3.repository\",fm);\n\t\t\tMap<QualityAttributeInterface,Double> map = qualityAttributeBelongable.getWordPertenence(\"response1\");\n\t\t\tif(map==null){\n\t\t\t\tSystem.out.println(\"El map es null\");\n\t\t\t}else{\n\t\t\t\tMapUtils.imprimirMap(map);\n\t\t\t}\n\t}",
"List<Language> getAll();",
"CLanguage getClanguage();",
"Lingua getLingua();",
"private Vocabulary() {\n }",
"public interface MetaData {\r\n\r\n\tpublic static final String CV_SBML = \"SBML\";\r\n\r\n\tpublic static final String ET_SBML = \"SBML_import\";\r\n\r\n\tpublic static final String AN_SBO = \"SBO\";\r\n\r\n\tpublic static final String RT_CONSUMED_BY = \"cs_by\";\r\n\r\n\tpublic static final String RT_PRODUCED_BY = \"pd_by\";\r\n\r\n\tpublic static final String RT_REGULATED_BY = \"rg_by\";\r\n\r\n\tpublic static final String RT_TRANSFORMATION_OF = \"transformation_of\";\r\n\r\n\tpublic static final String CC_REACTION = \"Reaction\";\r\n\r\n\tpublic static final String CC_COMPOUND = \"Comp\";\r\n\r\n\tpublic static final String CC_CELCOMP = \"CelComp\";\r\n\r\n}",
"static WordList get(Language language) {\n return switch (language) {\n case ENGLISH -> readResource(\"bip39_english.txt\");\n };\n }",
"Builder addInLanguage(Text value);",
"public Alternatives getAlternatives_11() { return cAlternatives_11; }",
"public void setLanguageList(Language[] languageList) {\n this.languageList = languageList;\n }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }",
"public Alternatives getAlternatives() { return cAlternatives; }"
] | [
"0.7333542",
"0.70189124",
"0.6911888",
"0.65125555",
"0.55658317",
"0.5514909",
"0.5497754",
"0.5459166",
"0.5378045",
"0.5338909",
"0.53268355",
"0.530514",
"0.5277348",
"0.52727586",
"0.52325135",
"0.52217007",
"0.51904005",
"0.5183695",
"0.517394",
"0.5150441",
"0.5136571",
"0.5101077",
"0.50959027",
"0.50948334",
"0.5088408",
"0.50651485",
"0.50630367",
"0.5047023",
"0.502983",
"0.5028259",
"0.5013519",
"0.4974659",
"0.49592355",
"0.49544743",
"0.4936377",
"0.49356225",
"0.49317366",
"0.49314365",
"0.4926086",
"0.49129292",
"0.49020812",
"0.49018425",
"0.4899164",
"0.4897982",
"0.48935905",
"0.48880023",
"0.4884576",
"0.48804635",
"0.48799944",
"0.4877656",
"0.48681986",
"0.48661616",
"0.4864123",
"0.48519415",
"0.48496643",
"0.48485738",
"0.4845488",
"0.4838871",
"0.48374414",
"0.48363456",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366",
"0.48185366"
] | 0.6803772 | 3 |
formats tour startDate and startTime according to the preferences | private String formatStartDate(final TourData _tourData) {
final DateTime dtTourStart = _tourData.getTourStartTime();
final DateTime dtTourEnd = dtTourStart.plusSeconds((int) _tourData.getTourRecordingTime());
return String.format(
net.tourbook.ui.Messages.Tour_Tooltip_Format_DateWeekTime,
_dateFormatter.print(dtTourStart.getMillis()),
_timeFormatter.print(dtTourStart.getMillis()),
_timeFormatter.print(dtTourEnd.getMillis()),
dtTourStart.getWeekOfWeekyear());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void updateStartTime() {\n Date date = startTimeCalendar.getTime();\n String startTime = new SimpleDateFormat(\"HH:mm\").format(date);\n startHourText.setText(startTime);\n }",
"public void formatDateTime() {\n // Check if type of parsing is for display or not. \n // If it is for display, no need to check if date has already passed.\n if (parseType != 2) {\n startDate = dtFormat.formatDate(startDate,0);\n endDate = dtFormat.formatDate(endDate,0);\n } else {\n startDate = dtFormat.formatDate(startDate,1);\n endDate = dtFormat.formatDate(endDate,1);\n }\n \n startTime = dtFormat.formatTime(startTime);\n endTime = dtFormat.formatTime(endTime);\n }",
"@Override\n public String getBeginTimeString() {\n if(beginTime != null)\n return (ShortDateFormat.format(beginTime));\n else\n return \"\";\n }",
"public String getDate(){ return this.start_date;}",
"@Override\n public String toString(){\n String format = \"%1$-30s %2$-20s %3$-20s %4$-12s %5$-3s %6$-12s\";\n return String.format(format, this.title, this.stream, this.type,\n this.start_date.format(DateTimeFormatter.ofPattern(data.daTiFormat)), \"-\", this.end_date.format(DateTimeFormatter.ofPattern(data.daTiFormat)));}",
"java.lang.String getStartDate();",
"private void setDate(String beginning, String end){\n try {\n\n this.beginTime=ShortDateFormat.parse(beginning);\n this.endTime = ShortDateFormat.parse(end);\n }\n catch(ParseException ex){\n System.out.println(\"Error Parsing the time, please enter valid time, dont forget to include am/pm \" +ex.getMessage());\n System.exit(1);\n }\n }",
"private String parseTime(TimePicker start){\n String time = \"\";\n if (start.getHour() < 10){\n time += \"0\" + start.getHour() + \":\";\n } else {\n time += start.getHour() + \":\";\n }\n if (start.getMinute() < 10){\n time += \"0\" + start.getMinute();\n } else {\n time += start.getMinute();\n }\n return time;\n }",
"public String getBeginTime(){return beginTime;}",
"public void setBeginTime(String time){beginTime = time;}",
"private static Date dateToString(Date start) {\n\t\treturn start;\n\t}",
"private String multipleStartTimes() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tif (startTimes.size() > 1) {\n\t\t\tsb.append(\"Flera starttider? \");\n\t\t\tfor (int i = 1; i < startTimes.size(); i++) {\n\t\t\t\tsb.append(startTimes.get(i) + \" \");\n\t\t\t}\n\t\t\tsb.append(\"; \");\n\t\t}\n\t\treturn sb.toString();\n\t}",
"private void updateDateHeading(Calendar startDate) {\r\n TextView textViewDateHeading = findViewById(R.id.tv_current_heading);\r\n\r\n String dateHeading = \"\";\r\n SimpleDateFormat dateFormat;\r\n\r\n // Check if endDate is today, so either today or this week is displayed\r\n Calendar today = Calendar.getInstance();\r\n if((endDate.get(Calendar.DAY_OF_YEAR) == today.get(Calendar.DAY_OF_YEAR))\r\n && (endDate.get(Calendar.YEAR) == today.get(Calendar.YEAR))) {\r\n if(dataType.equals(\"NON-SED\")) {\r\n dateHeading = getString(R.string.day_heading_today);\r\n } else {\r\n dateHeading = getString(R.string.week_heading_this_week);\r\n }\r\n } else { // not today or this week\r\n if(dataType.equals(\"NON-SED\")) {\r\n dateFormat = new SimpleDateFormat(getString(R.string.day_heading_date_format));\r\n dateHeading = dateFormat.format(endDate.getTime());\r\n } else {\r\n dateFormat = new SimpleDateFormat(getString(R.string.week_heading_date_format));\r\n dateHeading = getString(R.string.week_heading_with_dates,\r\n dateFormat.format(startDate.getTime()),\r\n dateFormat.format(endDate.getTime()));\r\n }\r\n }\r\n\r\n textViewDateHeading.setText(dateHeading);\r\n }",
"public String getTime_start() {\n return time_start;\n }",
"@Override\n public String getStartInfo() {\n\n return startTime(null, DateFormat.SHORT);\n }",
"public String getFormattedTimeFromStart() {\r\n if (history.getNumberOfJumpsSoFar() == 0) {\r\n return \"00:00\";\r\n }\r\n\r\n double time = history.getTimeFromStart();\r\n double maxTime = 59.59;\r\n if (time < maxTime) {\r\n return String.format(\"%02d:%02d\", (int) (time % 60), (int) (time * 100 % 100));\r\n } else {\r\n return \"59:59\";\r\n }\r\n }",
"public void setStartTime(String startTime) {\n this.startTime = startTime;\n }",
"public void setStartTime(String startTime) {\n this.startTime = startTime;\n }",
"public void setStartTime(Date startTime) {\r\n this.startTime = startTime;\r\n }",
"String getStartDate();",
"public void formatoTiempo() {\n String segundos, minutos, hora;\n\n hora = hrs < 10 ? String.valueOf(\"0\" + hrs) : String.valueOf(hrs);\n\n minutos = min < 10 ? String.valueOf(\"0\" + min) : String.valueOf(min);\n\n jLabel3.setText(hora + \" : \" + minutos + \" \" + tarde);\n }",
"@SuppressWarnings(\"unused\")\n private String makeEventStart(Course item) {\n LocalTime startTime;\n if (mRounded) {\n startTime = item.getRoundedStartTime();\n } else {\n startTime = item.getStartTime();\n }\n return makeEventStart(LocalDateTime.of(item.getStartDate(), startTime));\n }",
"public String getStartTime();",
"public String getStartTime();",
"public void setStarttime(Date starttime) {\n this.starttime = starttime;\n }",
"public void setStarttime(Date starttime) {\n this.starttime = starttime;\n }",
"public String getStarttime() {\n return starttime;\n }",
"public String getStartTimeString() {\n return startTimeString;\n }",
"public String getStartText() {\n return \"Thursday 20 to 7\";\n }",
"private void constructVssDateTimeFormat() {\n vssDateTimeFormat = new SimpleDateFormat(\"'Date: '\" + this.dateFormat + \" 'Time: 'hh:mma\"); \n }",
"public void setStartTime(String startTime) {\n this.startTime = startTime;\n }",
"public void setStartTime(String startTime) {\n this.startTime = startTime;\n }",
"public void setStartTime(String startTime) {\n this.startTime = startTime;\n }",
"public void setStartTime(Date startTime) {\n this.startTime = startTime;\n }",
"public void setStartTime(Date startTime) {\n this.startTime = startTime;\n }",
"public void setStartTime(Date startTime) {\n this.startTime = startTime;\n }",
"public void setStartTime(Date startTime) {\n this.startTime = startTime;\n }",
"public String getStartTime() {\n return startTime;\n }",
"private String makeEventStart(LocalDateTime date) {\n String name = \"DTSTART\";\n return formatTimeProperty(date, name) + \"\\n\";\n }",
"public abstract void setStartTime(Date startTime);",
"public String getStartDate();",
"private void updateDatedeparture() {\n String myFormat = \"MM/dd/yy\";\n SimpleDateFormat sdf = new SimpleDateFormat(myFormat, Locale.FRANCE);\n\n departureDate.setText(sdf.format(myCalendar.getTime()));\n }",
"public void setStartTime( Date startTime ) {\n this.startTime = startTime;\n }",
"java.lang.String getArrivalTime();",
"java.lang.String getArrivalTime();",
"public String getBeginTime() {\n/* 28 */ return this.beginTime;\n/* */ }",
"public String getStartDttm() {\n\t\t\n\t\tif (this.predefinedPeriod.getType() == PredefinedPeriodType.YEAR) {\n\t\t\treturn String.format(\"%04d\",this.predefinedPeriod.getCalendarFrom().get(Calendar.YEAR)) + \"-01-01 00:00:00.000\"; \n\t\t} else if (this.predefinedPeriod.getType() == PredefinedPeriodType.MONTH) {\n\t\t\treturn String.format(\"%04d\",this.predefinedPeriod.getCalendarFrom().get(Calendar.YEAR)) + \"-\" + \n\t\t\t\t\t String.format(\"%02d\",this.predefinedPeriod.getCalendarFrom().get(Calendar.MONTH) + 1) + \"-01 00:00:00.000\";\n\t\t} else if (this.predefinedPeriod.getType() == PredefinedPeriodType.DAY) {\n\t\t\treturn String.format(\"%04d\", this.predefinedPeriod.getCalendarFrom().get(Calendar.YEAR)) + \"-\" + \n\t\t\t\t\t String.format(\"%02d\", this.predefinedPeriod.getCalendarFrom().get(Calendar.MONTH) + 1) + \n\t\t\t\t\t String.format(\"%02d\", this.predefinedPeriod.getCalendarFrom().get(Calendar.DAY_OF_MONTH)) + \" 00:00:00.000\";\n\t\t\t\n\t\t} else if (this.predefinedPeriod.getType() == PredefinedPeriodType.HOUR) {\n\t\t\treturn String.format(\"%04d\",this.predefinedPeriod.getCalendarFrom().get(Calendar.YEAR)) + \"-\" + \n\t\t\t\t\t String.format(\"%02d\",this.predefinedPeriod.getCalendarFrom().get(Calendar.MONTH) + 1) + \"-\" +\n\t\t\t\t\t String.format(\"%02d\",this.predefinedPeriod.getCalendarFrom().get(Calendar.DAY_OF_MONTH)) + \" \" + \n\t\t\t\t\t String.format(\"%02d\",this.predefinedPeriod.getCalendarFrom().get(Calendar.HOUR_OF_DAY)) + \":00:00.000\";\n\t\t\t\n\t\t} else if (this.predefinedPeriod.getType() == PredefinedPeriodType.INT_LT_HOUR) {\n\t\t\treturn String.format(\"%04d\",this.predefinedPeriod.getCalendarFrom().get(Calendar.YEAR)) + \"-\" + \n\t\t\t\t\t String.format(\"%02d\",this.predefinedPeriod.getCalendarFrom().get(Calendar.MONTH) + 1) + \"-\" + \n\t\t\t\t\t String.format(\"%02d\",this.predefinedPeriod.getCalendarFrom().get(Calendar.DAY_OF_MONTH)) + \" \" + \n\t\t\t\t\t String.format(\"%02d\",this.predefinedPeriod.getCalendarFrom().get(Calendar.HOUR_OF_DAY)) + \":\" + \n\t\t\t\t\t String.format(\"%02d\",this.predefinedPeriod.getCalendarFrom().get(Calendar.MINUTE)) + \":\" +\n\t\t\t\t\t String.format(\"%02d\",this.predefinedPeriod.getCalendarFrom().get(Calendar.SECOND)) + \".000\";\n\n\t\t} \n\t\t\n\t\treturn null;\n\t}",
"public String getStartDate() {\n return startDate;\n }",
"void setStartTime(java.util.Calendar startTime);",
"public void setStartTime(Date startTime) {\n\t\tthis.startTime = startTime;\n\t}",
"public void setStartTime(Date startTime) {\n\t\tthis.startTime = startTime;\n\t}",
"public void setStartTime(Date startTime) {\n\t\tthis.startTime = startTime;\n\t}",
"public void setStartTime(Date startTime) {\n\t\tthis.startTime = startTime;\n\t}",
"public String startTime(){\r\n\t\treturn startTime;\r\n\t}",
"private static String timeLine()\n {\n return String.format(STR_FORMAT_1 + STR_FORMAT_2, TIME_STR, TIME);\n }",
"public String getEndTime(){return endTime;}",
"public void setStart(final String start) {\n\tthis.start = LocalTime.parse(start, DateTimeFormatter.ofPattern(\"hh:mma\", Locale.US));\n }",
"public String getStartTime() {\n return startTime;\n }",
"public String getStartTime() {\n return startTime;\n }",
"public String getStartTime() {\n return startTime;\n }",
"public String getStartTime() {\n return startTime;\n }",
"default void onCustomStartTimeChanged(LocalTime startTime) {}",
"@Override\n public void onClick(View v) {\n EditText editText_Name = (EditText) findViewById(R.id.editText_Name);\n EditText editText_Cnt = (EditText) findViewById(R.id.editText_Cnt);\n DatePicker datePick_dateBeg = (DatePicker) findViewById(R.id.datePick_dateBeg);\n\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n\n if (editText_Cnt.getText().length() == 0) {\n Context context = getApplicationContext();\n CharSequence text = \"Необходимо задать количество людей в туре\";\n int duration = Toast.LENGTH_SHORT;\n\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n return;\n }\n\n if (editText_Name.getText().length() == 0) {\n Context context = getApplicationContext();\n CharSequence text = \"Необходимо задать название тура\";\n int duration = Toast.LENGTH_SHORT;\n\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n return;\n }\n\n\n\n /* = new Tour(editText_Name.getText().toString(), Integer.parseInt(editText_Cnt.getText().toString()),\n \"'\" + datePick_dateBeg.getYear() + \"-\" +\n String.format(\"%2s\", datePick_dateBeg.getMonth()+1).replace(\" \",\"0\") +\n \"-\" + String.format(\"%2s\", datePick_dateBeg.getDayOfMonth()).replace(\" \",\"0\") +\n \" 00:00:00'\"\n ); */\n\n\n Tour tour = db.getTour(tour_id);\n tour.setDate_begin(/*datePick_dateBeg.getYear() + \"-\" +\n String.format(\"%2s\", datePick_dateBeg.getMonth()+1).replace(\" \",\"0\") +\n \"-\" + String.format(\"%2s\", datePick_dateBeg.getDayOfMonth()).replace(\" \",\"0\") +\n \" 00:00:00\"*/\n dateFormat.parse(\n datePick_dateBeg.getYear() + \"-\" +\n (datePick_dateBeg.getMonth() + 1) +\n \"-\" + datePick_dateBeg.getDayOfMonth(), parsePosition)\n // + \" 00:00:00\"\n );\n tour.setTourist_cnt(Integer.parseInt(editText_Cnt.getText().toString()));\n tour.setName(editText_Name.getText().toString());\n\n db = new DatabaseHandler(getApplicationContext());\n // int tour_id = db.createTour(tour);\n db.updateTour(tour);\n db.closeDB();\n\n Log.e(LOG, \"tour.getDate_begin() \" + tour.getDate_begin());\n Log.e(LOG, \"tour.getDate_end()\" + tour.getDate_end());\n\n Log.e(LOG, \"dateFormat.parse: \" + \"'\" + datePick_dateBeg.getYear() + \"-\" +\n String.format(\"%2s\", datePick_dateBeg.getMonth() + 1).replace(\" \", \"0\") +\n \"-\" + String.format(\"%2s\", datePick_dateBeg.getDayOfMonth()).replace(\" \", \"0\") +\n \" 00:00:00'\");\n /* // Intent i = new Intent(CreateTourActivity.this, CreateCurrencyActivity.class);\n Intent i = new Intent(CreateTourActivity.this, SelectCurrenciesForTourActivity.class);\n i.putExtra(\"tour_id\", tour_id);\n startActivity(i); */\n finish(); // Завершить текущую активность.\n }",
"public void setStartDate(Date s);",
"public void setStartTimeString(String startTimeString) {\n this.startTimeString = startTimeString;\n }",
"@Override\n\tpublic String toString(){\n\t\treturn \"START=\"+startDate+\", END=\"+endDate+\",\"+label+\",\"+notes+\",\"+locationAddress+\",\"+startPlaceAddress+\",\"+actStatus.name();\n\t}",
"public void setStartDate(Date start)\r\n {\r\n this.startDate = start;\r\n }",
"public void setShowStartTime(Date showStartTime) {\n\t\tthis.showStartTime = showStartTime;\n\t}",
"@Override\n public String getEndTimeString() {\n if(endTime != null)\n return (ShortDateFormat.format(endTime));\n else\n return \"\";\n }",
"@Override\n public String getArrivalString() {\n return this.arriveDate + \" \" + this.arriveTime;\n }",
"private void showTimePicker(final EditText editText, final boolean isStartType) {\n Calendar mcurrentTime = Calendar.getInstance();\n int hour = mcurrentTime.get(Calendar.HOUR_OF_DAY);\n int minute = mcurrentTime.get(Calendar.MINUTE);\n TimePickerDialog mTimePicker;\n mTimePicker = new TimePickerDialog(mActivity, R.style.DialogTheme, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker timePicker, int selectedHour, int selectedMinute) {\n if (isStartType) {\n Calendar datetime = Calendar.getInstance();\n Calendar c = Calendar.getInstance();\n datetime.set(Calendar.HOUR_OF_DAY, selectedHour);\n datetime.set(Calendar.MINUTE, selectedMinute);\n if (datetime.getTimeInMillis() > c.getTimeInMillis()) {\n// it's after current\n editText.setText(parseTimeToTimeDate(String.format(Locale.getDefault(), \"%02d\", selectedHour) + \":\" +\n String.format(Locale.getDefault(), \"%02d\", selectedMinute)));\n } else {\n// it's before current'\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.start_time_cant_be_less));\n\n }\n } else {\n if (!checktimings(etBeginTime.getText().toString(), parseTimeToTimeDate(String.format(Locale.getDefault(), \"%02d\", selectedHour) + \":\" +\n String.format(Locale.getDefault(), \"%02d\", selectedMinute)))) {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.end_time_cant_less));\n } else if (pickUpTime != null && !pickUpTime.equals(\"\") && !appUtils.matchSameTime(appUtils.parseDateToTime(pickUpTime), selectedHour + \":\" + selectedMinute)) {\n appUtils.showAlertDialog(mActivity, \"\", getString(R.string.same_pickup_time), getString(R.string.ok), \"\", null);\n } else {\n editText.setText(parseTimeToTimeDate(String.format(Locale.getDefault(), \"%02d\", selectedHour) + \":\" +\n String.format(Locale.getDefault(), \"%02d\", selectedMinute)));\n }\n }\n }\n }, hour, minute, true);//Yes 24 hour time\n mTimePicker.setTitle(\"\");\n mTimePicker.show();\n }",
"public String toString(){\n\t\tDateTimeFormatter fmt = DateTimeFormat.forPattern(\"dd-MM-yyyy HH:mm\");\n\t\treturn \"Estimated completion: \" + fmt.print(super.getEstimatedEndTime());\n\t}",
"private String formatTimeProperty(LocalDateTime date, String name) {\n String property;\n String time = formatTimeToICS(date);\n property = name + \";\" + mTZID + \":\" + time;\n return property;\n }",
"private String formatDateForVSS(Date d) {\n SimpleDateFormat sdf = new SimpleDateFormat(this.dateFormat + \";hh:mma\");\n \t\tString vssFormattedDate = sdf.format(d);\n \t\treturn vssFormattedDate.substring(0, vssFormattedDate.length() - 1);\n \t}",
"void setStartDate(Date startDate);",
"public String getStartTime() {\n return this.StartTime;\n }",
"public void setStartTime(Calendar startTime) {\r\n\t\tthis.startTime = startTime;\r\n\t}",
"public void setStartTime(String StartTime) {\n this.StartTime = StartTime;\n }",
"private void timeInitializer(View view){\n currentDate = view.findViewById(R.id.schedule_textView_currentDate);\n GregorianCalendar now = new GregorianCalendar();\n DateFormat df= DateFormat.getDateInstance(DateFormat.SHORT);\n currentDate.setText(df.format(now.getTime()));\n\n currentWeek=view.findViewById(R.id.calendar_week_switch);\n Calendar c = Calendar.getInstance();\n c.setTime(new Date());\n int num_week = c.get(Calendar.WEEK_OF_YEAR);\n if(num_week%2==0){\n currentWeek.setText(R.string.even);\n isEven=true;\n }\n else{\n currentWeek.setText(R.string.odd);\n isEven=false;\n }\n\n }",
"@Override\n public void run() {\n tourName.setText(tour.getStr(Tour.name));\n tourDesc.setText(tour.getStr(Tour.description));\n price.setText((tour.getDbl(\"price\")).toString());\n language.setText(tour.getStr(\"language\"));\n additionalAccommodation.setText(tour.getStr(\"additional_accomadation\"));\n additionalFood.setText(tour.getStr(\"additional_food\"));\n additionalTransport.setText(tour.getStr(\"additional_transport\"));\n startDateText.setText(tour.getStr(\"firstStart_date\"));\n endDateText.setText(tour.getStr(\"firstEnd_date\"));\n // try {\n // location.setText(user.getStr(\"address:street\"));\n // } catch (Exception e) {\n // e.printStackTrace();\n //}\n }",
"public void setStartTime(String startTime) {\n this.startTime = startTime == null ? null : startTime.trim();\n }",
"public Date getShowStartTime() {\n\t\treturn showStartTime;\n\t}",
"public void setStartDate(String startDate) {\n this.startDate = startDate;\n }",
"public void setTime_start(java.lang.String time_start) {\r\n this.time_start = time_start;\r\n }",
"public String getStartTime()\n {\n return this.startTime;\n }",
"public void setHC_WorkStartDate2 (Timestamp HC_WorkStartDate2);",
"public String getStartDateTimeString() {\n return startDateTimeString;\n }",
"public void updateText() {\n\n dateText = dateFormat.format(c.getTime());\n timeText = timeFormat.format(c.getTime());\n dateEt.setText(dateText + \" \"+ timeText);\n}",
"public java.lang.String getTime_start() {\r\n return time_start;\r\n }",
"public Date getStartTimeDate() {\n return startTimeDate;\n }",
"public String getStartDate() {\n return startDate;\n }",
"public abstract Date getStartTime();",
"private String timeConversion() {\n Calendar local = Calendar.getInstance();\n Calendar GMT = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\"));\n\n //Time from the PINPoint\n int hours, minutes, seconds, day, month, year;\n hours = (record[10] & 0xF8) >> 3;\n minutes = ((record[10] & 0x07) << 3) + ((record[11] & 0xE0) >> 5);\n seconds = ((record[11] & 0x1F) << 1) + ((record[12] & 0x80) >> 7);\n seconds += (record[12] & 0x7F) / 100;\n day = (record[13] & 0xF8) >> 3;\n month = ((record[13] & 0x07) << 1) + ((record[14] & 0x80) >> 7);\n year = (record[14] & 0x7F) + 2000;\n \n month--; //Months in java are 0-11, PINPoint = 1-12;\n\n //Set GMTs time to be the time from the PINPoint\n GMT.set(Calendar.DAY_OF_MONTH, day);\n GMT.set(Calendar.MONTH, month);\n GMT.set(Calendar.YEAR, year);\n GMT.set(Calendar.HOUR_OF_DAY, hours);\n GMT.set(Calendar.MINUTE, minutes);\n GMT.set(Calendar.SECOND, seconds);\n\n //Local is set to GMTs time but with the correct timezone\n local.setTimeInMillis(GMT.getTimeInMillis());\n\n //Set Local time to be the time converted from GMT\n int lHours, lMinutes, lSeconds, lDay, lMonth, lYear;\n lHours = local.get(Calendar.HOUR_OF_DAY);\n lMinutes = local.get(Calendar.MINUTE);\n lSeconds = local.get(Calendar.SECOND);\n lDay = local.get(Calendar.DAY_OF_MONTH);\n lMonth = local.get(Calendar.MONTH);\n\n lMonth++; //Months in java are 0-11, humans read 1-12\n\n lYear = local.get(Calendar.YEAR);\n\n return hR(lMonth) + \"/\" + hR(lDay) + \"/\" + lYear + \" \" + hR(lHours) + \":\" + hR(lMinutes) + \":\" + hR(lSeconds);\n }",
"public void setStartTimeDate(Date startTimeDate) {\n this.startTimeDate = startTimeDate;\n }",
"private String getTimingt(Long pastvalue) {\n DateTime zulu = DateTime.now(DateTimeZone.UTC);\n // DateTimeFormatter formatter = DateTimeFormat.forPattern(\"HH:mm:ss am\");\n Date date = new Date(pastvalue);\n// formattter\n SimpleDateFormat formatter= new SimpleDateFormat(\"hh:mm a\");\n formatter.setTimeZone(TimeZone.getDefault());\n// Pass date object\n return formatter.format(date );\n /*\n long mint = TimeUnit.MILLISECONDS.toMinutes(zulu.toInstant().getMillis() - pastvalue);\n\n if (mint < 60) {\n if (mint > 1)\n return \"Hace \" + mint + \" minutos\";\n else\n return \"Hace \" + mint + \" minuto\";\n } else {\n long horas = TimeUnit.MILLISECONDS.toHours(zulu.toDate().getTime() - pastvalue);\n\n if (horas < 24) {\n if (horas > 1)\n return \"Hace \" + horas + \" horas\";\n else\n return \"Hace \" + horas + \" hora\";\n } else {\n long dias = TimeUnit.MILLISECONDS.toDays(zulu.toDate().getTime() - pastvalue);\n\n if (dias > 1) {\n return \"Hace \" + dias + \" dias\";\n } else\n return \"Hace \" + dias + \" dia\";\n }\n\n\n }*/\n }",
"private void customTime(boolean shouldStart) {\n\n if (customCalendar == null) {\n customCalendar = Calendar.getInstance();\n customYear = customCalendar.get(Calendar.YEAR);\n customMonth = customCalendar.get(Calendar.MONTH);\n customDay = customCalendar.get(Calendar.DAY_OF_MONTH);\n }\n\n timeDialog = new DatePickerDialog(this, this, customYear, customMonth, customDay);\n timeDialog.show();\n if (shouldStart) {\n Toasty.info(StatActivity.this, \"Selection start time\").show();\n } else {\n Toasty.info(StatActivity.this, \"Select end time\").show();\n }\n }",
"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}",
"java.lang.String getDepartureTime();",
"java.lang.String getDepartureTime();",
"String getSpokenDateString(Context context) {\n int flags = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_SHOW_DATE;\n return DateUtils.formatDateTime(context, mDeliveryTime, flags);\n }"
] | [
"0.6269547",
"0.62355846",
"0.5950287",
"0.5933665",
"0.57788235",
"0.5753041",
"0.5735577",
"0.5718038",
"0.5709577",
"0.56245",
"0.56170225",
"0.5616922",
"0.561384",
"0.56025994",
"0.5596673",
"0.55966365",
"0.5537549",
"0.5537549",
"0.55328655",
"0.5532465",
"0.5513921",
"0.55095565",
"0.5501737",
"0.5501737",
"0.5494883",
"0.5494883",
"0.54890144",
"0.5481168",
"0.5467157",
"0.54669076",
"0.54657406",
"0.54657406",
"0.54657406",
"0.546166",
"0.546166",
"0.546166",
"0.546166",
"0.5443065",
"0.5404209",
"0.53928673",
"0.53794986",
"0.5354727",
"0.5353335",
"0.53532946",
"0.53532946",
"0.5349758",
"0.533655",
"0.53285336",
"0.5324726",
"0.5323212",
"0.5323212",
"0.5323212",
"0.5323212",
"0.53180605",
"0.5312212",
"0.5304817",
"0.5298653",
"0.5295329",
"0.5295329",
"0.5295329",
"0.5295329",
"0.52886295",
"0.52763945",
"0.5269409",
"0.52621967",
"0.5249132",
"0.52485293",
"0.52391136",
"0.52316517",
"0.5229204",
"0.52201146",
"0.5217126",
"0.52139264",
"0.52127177",
"0.52093524",
"0.52065855",
"0.5204863",
"0.5204841",
"0.5196664",
"0.519486",
"0.5192253",
"0.5189947",
"0.51860577",
"0.518277",
"0.5180839",
"0.5169154",
"0.51659095",
"0.516588",
"0.51649207",
"0.5164429",
"0.5162977",
"0.5160104",
"0.5158549",
"0.51573837",
"0.5152152",
"0.5151858",
"0.514565",
"0.514029",
"0.514029",
"0.51325774"
] | 0.7050593 | 0 |
performs the actual PDF generation info and examples at: | public void printPDF(final IXmlSerializable object, final PrintSettings printSettings)
throws FileNotFoundException, FOPException, TransformerException {
boolean canWriteFile = true;
FileOutputStream pdfContentStream = null;
BufferedOutputStream pdfContent = null;
try {
// setup pdf outpoutStream
final File pdfFile = new File(printSettings.getCompleteFilePath());
if (pdfFile.exists()) {
if (printSettings.isOverwriteFiles()) {
// overwrite is enabled in the UI
} else {
final FileCollisionBehavior fileCollisionBehaviour = new FileCollisionBehavior();
canWriteFile = net.tourbook.ui.UI.confirmOverwrite(fileCollisionBehaviour, pdfFile);
if (fileCollisionBehaviour.value == FileCollisionBehavior.DIALOG_IS_CANCELED) {
return;
}
}
}
if (canWriteFile) {
pdfContentStream = new FileOutputStream(pdfFile);
pdfContent = new BufferedOutputStream(pdfContentStream);
// setup xml input source
final String xml = object.toXml();
// // debug logging
// System.err.println("--------------------------------------------------------");
// System.err.println(object.toXml());
// System.err.println("--------------------------------------------------------");
// XStream xStream = new XStream();
// try {
// FileUtils.writeStringToFile(new File("/home/jkl/tourdata_xs.xml"),
// xStream.toXML(object));
// } catch (IOException e) {
// e.printStackTrace();
// }
// prepare xsl file for transformation
final ClassLoader classLoader = getClass().getClassLoader();
final InputStream xslFile = classLoader.getResourceAsStream(TOURDATA_2_FO_XSL);
StreamSource xmlSource;
try {
xmlSource = new StreamSource(new ByteArrayInputStream(xml.getBytes("UTF-8"))); //$NON-NLS-1$
} catch (final UnsupportedEncodingException e) {
//if UTF-8 fails, try default encoding
xmlSource = new StreamSource(new ByteArrayInputStream(xml.getBytes()));
e.printStackTrace();
}
// setup xsl stylesheet source
final StreamSource xslSource = new StreamSource(xslFile);
// get transformer
final TransformerFactory tfactory = TransformerFactory.newInstance();
final Transformer transformer = tfactory.newTransformer(xslSource);
// setup FOP
final FOUserAgent foUserAgent = _fopFactory.newFOUserAgent();
foUserAgent.setProducer(this.getClass().getName());
final Fop fop = _fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, pdfContent);
setTranslationParameters(transformer);
setTransformationParameters((TourData) object, transformer, printSettings);
// perform transformation
final Result res = new SAXResult(fop.getDefaultHandler());
transformer.transform(xmlSource, res);
// launch the pdf file (will only work if the user has a registered pdf viewer installed)
Program.launch(printSettings.getCompleteFilePath());
try {
xslFile.close();
} catch (final IOException e) {
e.printStackTrace();
}
}
} finally {
if (pdfContent != null) {
try {
pdfContent.close();
} catch (final IOException e) {
e.printStackTrace();
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void generarDocP(){\n generarPdf(this.getNombre());\n }",
"public static void main(String[] args) throws DocumentException, IOException {\n \t\n// // step 1\n// Document document = new Document();\n \n // step 1: creation of the document with a certain size and certain margins\n Document document = new Document(PageSize.A4, 50, 50, 50, 50);\n \n // step 2: create a writer (we have many type of writer, eg HtmlWriter, PdfWriter)\n PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(RESULT));\n \n /* step 3: BEFORE open the document we add some meta information to the document (that properties can be viewed with adobe reader or right click-properties)\n * they don't appear in the document view\n */\n document.addAuthor(\"Author Test\"); \n document.addSubject(\"This is the result of a Test.\"); \n \n // step 4\n document.open();\n \n //The com.itextpdf.text.Image is used to add images to IText PDF documents\n Image image1 = Image.getInstance(\"src/main/resources/sms.png\");\n document.add(image1);\n \n // step 5\n /*\n access at the content under the new pdf document just created (ie the writer object that i can control/move)\n PdfContentByte is the object that contains the text to write and the content of a page (it offer the methods to add content to a page)\n */\n PdfContentByte canvas = writer.getDirectContentUnder();\n \n //Sets the compression level to be used for streams written by the writer.\n writer.setCompressionLevel(0);\n canvas.saveState(); \n canvas.beginText(); \n //move the writer to tha X,Y position\n canvas.moveText(360, 788); \n canvas.setFontAndSize(BaseFont.createFont(), 12);\n \n Rectangle rectangle = new Rectangle(400, 300);\n rectangle.setBorder(2);\n document.add(rectangle);\n \n /* \n Writes something to the direct content using a convenience method\n A Phrase is a series of Chunks (A Chunk is the smallest significant part of text that can be added to a document)\n \n Conclusion: A chunk is a String with a certain Font ---> A Phrase is a series of Chunk\n Both Chunck and Font has a Font field (but if a Chunk haven't a Font uses the one of the Phrase that own it)\n */\n \n //------- Two modes to set a Phrase: --------\n \n //mode 1) set the phrase directly without a separate chunk object\n Phrase hello = new Phrase(\"Hello World3\");\n document.add(hello);\n \n //mode 2) create before a chunk, adjust it and after assign it to a Phrase(s) \n Chunk chunk2 = new Chunk(\"Setting the Font\", FontFactory.getFont(\"dar-black\"));\n chunk2.setUnderline(0.5f, -1.5f);\n \n Phrase p1 = new Phrase(chunk2);\n document.add(p1); \n \n canvas.showText(\"Hello sms\"); \n canvas.endText(); \n canvas.restoreState(); \n \n document.add(Chunk.NEWLINE);\n \n //i chunk posso aggiungerli solo tramite l'oggetto Document ?\n Chunk chunk = new Chunk(\"I'm a chunk\");\n chunk.setBackground(BaseColor.GRAY, 1f, 0.5f, 1f, 1.5f);\n document.add(chunk);\n \n /*\n * A Paragraph is a series of Chunks and/or Phrases, has the same qualities of a Phrase, but also some additional layout-parameters\n * A paragraph is a sub-section in the document. After each Paragraph a CRLF is added\n */\n Paragraph paragraph = new Paragraph(\"A:\\u00a0\");\n Chunk chunk1 = new Chunk(\"I'm a chunk1\");\n paragraph.add(chunk1);\n paragraph.setAlignment(Element.ALIGN_JUSTIFIED);\n document.add(paragraph);\n \n \n //----- Add a table to the document ------\n \n //A cell in a PdfPTable\n PdfPCell cell;\n \n PdfPTable table = new PdfPTable(2); //in argument vis the number of column\n table.setWidths(new int[]{ 1, 2 }); //the width of the first and second cell. The number of element in the array must be equal at the number of column\n \n table.addCell(\"Name:\");\n cell = new PdfPCell();\n //We can attach event at the cell\n //cell.setCellEvent(new TextFields(1));\n table.addCell(cell);\n \n table.addCell(\"Loginname:\");\n cell = new PdfPCell();\n //cell.setCellEvent(new TextFields(2));\n table.addCell(cell);\n \n table.addCell(\"Password:\");\n cell = new PdfPCell(); \n table.addCell(cell);\n \n table.addCell(\"Reason:\");\n cell = new PdfPCell(); \n cell.setFixedHeight(60);\n table.addCell(cell);\n \n document.add(table);\n \n //add an horizontal line\n LineSeparator ls = new LineSeparator(); \n ls.setLineWidth(0);\n document.add(new Chunk(ls));\n \n Anchor pdfRef = new Anchor(\"http://www.java2s.com\");\n document.add(pdfRef);\n \n // step 5\n document.close();\n }",
"private void getPDF(){\r\n\t\t\r\n\t\tif(request.getParameter(\"exportType\").equals(PDFGenerator.EXPORT_ADMIN)){\r\n\t\t\tgetAdministration(); // pdf uses same data\r\n\t\t} else if(request.getParameter(\"exportType\").equals(PDFGenerator.EXPORT_TEACHER)){\r\n\t\t\tgetEventRegistration(); // pdf uses same data\r\n\t\t}\r\n\t\t\r\n\t\tPDFGenerator pdfGen = new PDFGenerator();\r\n\t\tpdfGen.createDocument(request, response);\r\n\t\t\r\n\t\tString eventTitle = \"all\";\r\n\t\t\r\n\t}",
"private static void pdfFilesOutput() {\n\n // make output directory if it doesn't already exist\n new File(\"output\").mkdirs();\n\n Output airportFlightCounter = new AirportFlightCounter(airports);\n Output flightInventory = new FlightInventory(flights);\n Output flightPassengerCounter = new FlightPassengerCounter(flights);\n Output mileageCounter = new MileageCounter(flights, airports);\n\n try {\n airportFlightCounter.toPDFFile();\n flightInventory.toPDFFile();\n flightPassengerCounter.toPDFFile();\n mileageCounter.toPDFFile();\n } catch (DocumentException | FileNotFoundException e) {\n logger.error(\"Could not write to one or more PDF files - please close any open instances of that file\");\n e.printStackTrace();\n }\n\n logger.info(\"Output to PDF files completed\");\n }",
"public static void main(String[] args) throws IOException {\n\t PDDocument document = new PDDocument();\n\n\t //Creating a blank page\n\t PDPage blankPage = new PDPage();\n\t \n\t //Adding the blank page to the document\n\t document.addPage( blankPage );\n\n\t //Creating the PDDocumentInformation object \n\t PDDocumentInformation pdd = document.getDocumentInformation();\n\n\t //Setting the author of the document\n\t pdd.setAuthor(\"Tutorialspoint\");\n\t \n\t // Setting the title of the document\n\t pdd.setTitle(\"Sample document\"); \n\t \n\t //Setting the creator of the document \n\t pdd.setCreator(\"PDF Examples\"); \n\t \n\t //Setting the subject of the document \n\t pdd.setSubject(\"Example document\"); \n\t \n\t //Setting the created date of the document \n\t Calendar date = new GregorianCalendar();\n\t date.set(2015, 11, 5); \n\t pdd.setCreationDate(date);\n\t //Setting the modified date of the document \n\t date.set(2016, 6, 5); \n\t pdd.setModificationDate(date); \n\t \n\t //Setting keywords for the document \n\t pdd.setKeywords(\"sample, first example, my pdf\"); \n\t \n\t \n\t PDPageContentStream contentStream = new PDPageContentStream(document, blankPage);\n\t \n\t //Begin the Content stream \n\t contentStream.beginText(); \n\t \n\t //Setting the font to the Content stream \n\t contentStream.setFont(PDType1Font.TIMES_ROMAN, 12);\n\n\t //Setting the position for the line \n\t contentStream.newLineAtOffset(25, 500);\n\n\t String text = \"This is the sample document and we are adding content to it.\";\n\n\t //Adding text in the form of string \n\t contentStream.showText(text); \n\n\t //Ending the content stream\n\t contentStream.endText();\n\n\t System.out.println(\"Content added\");\n\n\t //Closing the content stream\n\t contentStream.close();\n\t \n\t //Saving the document \n\t document.save(\"doc_attributes.pdf\");\n\n\t System.out.println(\"Properties added successfully \");\n\t \n\t //Closing the document\n\t document.close();\n\t}",
"@Override\n\tpublic void buildPdfDocument(Map<String, Object> model, Document doc, PdfWriter writer,\n\t\t\tHttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\tExportExam exportExam = (ExportExam) model.get(\"exportExam\");\n\t\tExportExam exportExam2 = (ExportExam) model.get(\"exportExam2\");\n\t\tListExam listExam = null;\n\t\tListExam listExam2 = null;\n\t\tif(exportExam!=null){\n\t\tlistExam = exportExam.listExam;\n\t\t}\n\t if(exportExam2!=null){\n\t\tlistExam2 = exportExam2.listExam;\n\t\t}\n\t\n\t\tString url = request.getRequestURL().toString();\n\t\tString baseURL = url.substring(0, url.length() - request.getRequestURI().length()) + request.getContextPath();\n\t\tString path = baseURL + \"/resources/fonts/vuArial.ttf\";\n\t\tFontFactory.register(path);\n\t\t\n\t\t//\"C:\\\\Users\\\\HennessyVox\\\\Downloads\\\\Compressed\\\\vuArial.ttf\"\n\t\t//Font fontHeader = FontFactory.getFont(FONT, BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);\n\t\tBaseFont base = BaseFont.createFont(path, BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);\n\t\t Font fontHeader = new Font(base, 10, Font.NORMAL);\n\t\t Font fontHeader2 = new Font(base, 10, Font.UNDERLINE);\n\t\t Font fontContent = new Font(base, 11, Font.NORMAL);\n\t\t Font fontAnswent = new Font(base, 11, Font.NORMAL, BaseColor.RED);\n\t\t Font fontTitle = new Font(base, 12, Font.BOLD);\n\t\t Font fontNumber = new Font(base, 11, Font.BOLD);\n\t\t//Font fontHeader = new Font(FontFamily.TIMES_ROMAN, 12, Font.NORMAL);\n\t String SchoolHeader = \"TRƯỜNG ĐẠI HỌC BÁCH KHOA TP HCM\";\n\t\t\n\t // Get faulty info.\n\t\n\t \n\t\ttry {\n\t\t\t\n\t\t\t if(listExam!=null){\n\t\t\t\t System.out.println(\"=============================================================\");\n\t\t\t\t int CoutExam = 1;\n\t\t\t String FacultyHeader = exportExam.getFaulty().toUpperCase();\n\t\t\t \t\n\t\t\t /// String FacultyHeader = \"KHOA KHOA HỌC VÀ KỸ THUẬT MÁY TÍNH\";\n\t\t\t String InfoStudentHeader1 = \"Họ Tên : ..........................\";\n\t\t\t String InfoStudentHeader2 = \"MSSV : ..........................\";\n\t\t\t PdfPTable table = new PdfPTable(new float[] { 75, 25 });\n\t\t\t table.setWidthPercentage(100);\n\t\t\t \n\t\t\t table.addCell(getCell(new Paragraph(SchoolHeader,fontHeader), PdfPCell.ALIGN_LEFT));\n\t\t\t \n\t\t\t table.addCell(getCell(new Paragraph(InfoStudentHeader1,fontHeader), PdfPCell.ALIGN_RIGHT));\n\t\t\t table.addCell(getCell(new Paragraph(FacultyHeader,fontHeader2), PdfPCell.ALIGN_LEFT));\n\t\t\t table.addCell(getCell(new Paragraph(InfoStudentHeader2,fontHeader), PdfPCell.ALIGN_RIGHT));\n\t\t\t table.setSpacingAfter(10);\n\t\t\t doc.add(table);\n\t\t\t \n\t\t\t // ADD title\n\t\t\t //Font fontTitle = FontFactory.getFont(FONT, BaseFont.IDENTITY_H, BaseFont.EMBEDDED);\n\t\t\t //String titleExam = \"ĐỀ KIỂM TRA CUỐI KÌ 2017\";\n\t\t\t // System.out.println(exportExam.getExamName().toUpperCase());\n\t\t\t String titleExam = exportExam.getExamName().toUpperCase();\n\t\t\t \n\t\t\t Paragraph pHeader = new Paragraph(titleExam,fontTitle);\n\t\t\t pHeader.setAlignment(Paragraph.ALIGN_CENTER);\n\t\t\t doc.add(pHeader);\n\t\t\t \n\t\t\t String SubjectExam = \"Môn Thi : \" +exportExam.getSubjectName();\n\t\t\t String CodeExam = \"Mã đề : \" + exportExam.getCode();\n\t\t\t String timeExam = \"Thời gian : \" + exportExam.getTime();\n\t\t\t Font fontSubject = new Font(base, 10, Font.NORMAL);\n\t\t\t Font fontExam = new Font(base, 10, Font.NORMAL);\n\t\t\t \n\t\t\t PdfPTable table2 = new PdfPTable(2);\n\t\t\t table2.setWidthPercentage(80);\n\t\t\t //System.out.println(Charset.forName(\"UTF-8\").encode(SchoolHeader));\n\n\t\t\t table2.addCell(getCell(new Paragraph(SubjectExam,fontSubject), PdfPCell.ALIGN_LEFT));\n\t\t\t \n\t\t\t table2.addCell(getCell(new Paragraph(timeExam,fontExam), PdfPCell.ALIGN_RIGHT));\n\t\t\t table2.addCell(getCell(new Paragraph(CodeExam,fontExam), PdfPCell.ALIGN_LEFT));\n\t\t\t table2.addCell(getCell(new Paragraph(\"\",fontHeader), PdfPCell.ALIGN_RIGHT));\n\t\t\t table2.setSpacingBefore(5);\n\t\t\t doc.add(table2);\n\t\t\t \n\t\t\t String noteExam = exportExam.getNoteExam();\n\t\t\t Font fontNote = new Font(base, 8, Font.ITALIC);\n\t\t\t \n\t\t\t Paragraph pNote = new Paragraph(noteExam, fontNote);\n\t\t\t pNote.setAlignment(Paragraph.ALIGN_MIDDLE);\n\t\t\t doc.add(pNote);\n\t\t\t PdfPTable table3 = new PdfPTable(1);\n\t\t\t table3.setSpacingBefore(5);\n\t\t\t table3.setWidthPercentage(80);\n\t\t\t Font finalExam = new Font(base, 10, Font.NORMAL);\n\t\t\t table3.addCell(getCell(new Paragraph(\"*****\",finalExam), PdfPCell.ALIGN_CENTER));\n\t\t\t doc.add(table3);\n\t\t\t\t \n\t\t\t for(int i = 0; i < listExam.blockRootQuestion.size() ; i++){\n\t\t\t\t System.out.println(\"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\");\n\t\t\t\t \n\t\t\t\t List listBlock = new List(List.UNORDERED);\n\t\t\t\t listBlock.setAutoindent(false);\n\t\t\t\t // listBlock.setSymbolIndent(20);\t\n\t\t\t\t listBlock.add(new ListItem(new Paragraph(listExam.blockRootQuestion.get(i).rootQuestionBlock.getContent(),fontContent)));\n\t\t\t System.out.println(\"########### Block NAME \" +listExam.blockRootQuestion.get(i).rootQuestionBlock.getContent());\n\t\t\t\t \n\t\t\t\t doc.add(listBlock);\n\t\t\t \n\t\t\t \n\t\t \tSystem.out.println(\"########### SIZE QUESTION \" +listExam.blockRootQuestion.get(i).questionList.size());\n \n\t\t\t for(int j = 0 ; j < listExam.blockRootQuestion.get(i).questionList.size(); j++){\t\n\t\t\t \tSystem.out.println(\"########### QUESTION NAME \" +listExam.blockRootQuestion.get(i).questionList.get(j).question.getContent());\n\t\t\t\t\t\t\n\t\t\t \t List listQuestion = new List(List.UNORDERED);\n\t\t\t\t\t listQuestion.setListSymbol(\"\");\n\t\t\t \t\n\t\t\t \t//SingleQuestion questionPDF = null;\n\t\t\t \t//questionPDF = listExam.blockRootQuestion.get(i).questionList.get(j);\n\t\t\t \tStringBuilder sb = new StringBuilder();\n\t\t\t\t\t\tsb.append(\"Câu \");\n\t\t\t\t\t\tsb.append(CoutExam);\n\t\t\t\t\t\tsb.append(\". \");\n\t\t\t\t\t\tString strI = sb.toString();\n\t\t\t \t//strI = new Paragraph(strI, fontNumber);\n\t\t\t \t//listQuestion.setPostSymbol(strI);\n\t\t\t \tSystem.out.println(strI);\n\t\t\t listQuestion.add(new ListItem(new Paragraph(strI + listExam.blockRootQuestion.get(i).questionList.get(j).question.getContent(), fontContent)));\n\t\t\t listQuestion.setIndentationLeft(10);\n\t\t\t doc.add(listQuestion);\n\t\t\t List listAnswerPDF = new List(List.ORDERED, List.ALPHABETICAL);\n\t\t\t for(int k = 0; k < listExam.blockRootQuestion.get(i).questionList.get(j).answerList.size(); k++){\n\t\t\t\t\t System.out.println(\"########### Answer NAME \" +listExam.blockRootQuestion.get(i).questionList.get(j).answerList.get(k).getContent());\n\t\t\t \t listAnswerPDF.add(new ListItem(new Paragraph(listExam.blockRootQuestion.get(i).questionList.get(j).answerList.get(k).getContent(), fontContent))); \t \n\t\t\t }\n\t\t\t listAnswerPDF.setIndentationLeft(25);\n\t\t\t doc.add(listAnswerPDF);\n\t\t\t CoutExam++;\n\t\t\t }\n\t\t\t doc.add( Chunk.NEWLINE ); \n\t\t\t }\n\t\t\t // doc.close();\n\t\t\t listExam =null;\n\t\t\t }\n\t\t\t /*\n\t\t\t * Export Answer\n\t\t\t */\n\t\t\telse if(listExam2!=null){\n\t\t\t\t int CoutExam = 1;\n\t\t\t\t System.out.println(\"#######################################################\");\n\t\t\t\t String FacultyHeader = exportExam2.getFaulty().toUpperCase();\n\t\t\t \t\n\t\t\t\t /// String FacultyHeader = \"KHOA KHOA HỌC VÀ KỸ THUẬT MÁY TÍNH\";\n\t\t\t\t String InfoStudentHeader1 = \"Họ Tên : ..........................\";\n\t\t\t\t String InfoStudentHeader2 = \"MSSV : ..........................\";\n\t\t\t\t PdfPTable table = new PdfPTable(new float[] { 75, 25 });\n\t\t\t\t table.setWidthPercentage(100);\n\t\t\t\t \n\t\t\t\t table.addCell(getCell(new Paragraph(SchoolHeader,fontHeader), PdfPCell.ALIGN_LEFT));\n\t\t\t\t \n\t\t\t\t table.addCell(getCell(new Paragraph(InfoStudentHeader1,fontHeader), PdfPCell.ALIGN_RIGHT));\n\t\t\t\t table.addCell(getCell(new Paragraph(FacultyHeader,fontHeader2), PdfPCell.ALIGN_LEFT));\n\t\t\t\t table.addCell(getCell(new Paragraph(InfoStudentHeader2,fontHeader), PdfPCell.ALIGN_RIGHT));\n\t\t\t\t table.setSpacingAfter(10);\n\t\t\t\t doc.add(table);\n\t\t\t\t \n\t\t\t\t // ADD title\n\t\t\t\t //Font fontTitle = FontFactory.getFont(FONT, BaseFont.IDENTITY_H, BaseFont.EMBEDDED);\n\t\t\t\t //String titleExam = \"ĐỀ KIỂM TRA CUỐI KÌ 2017\";\n\t\t\t\t // System.out.println(exportExam.getExamName().toUpperCase());\n\t\t\t\t String titleExam = exportExam2.getExamName().toUpperCase();\n\t\t\t\t \n\t\t\t\t Paragraph pHeader = new Paragraph(titleExam,fontTitle);\n\t\t\t\t pHeader.setAlignment(Paragraph.ALIGN_CENTER);\n\t\t\t\t doc.add(pHeader);\n\t\t\t\t \n\t\t\t\t String SubjectExam = \"Môn Thi : \" +exportExam2.getSubjectName();\n\t\t\t\t String CodeExam = \"Mã đề : \" + exportExam2.getCode();\n\t\t\t\t String timeExam = \"Thời gian : \" + exportExam2.getTime();\n\t\t\t\t Font fontSubject = new Font(base, 10, Font.NORMAL);\n\t\t\t\t Font fontExam = new Font(base, 10, Font.NORMAL);\n\t\t\t\t \n\t\t\t\t PdfPTable table2 = new PdfPTable(2);\n\t\t\t\t table2.setWidthPercentage(80);\n\t\t\t\t //System.out.println(Charset.forName(\"UTF-8\").encode(SchoolHeader));\n\n\t\t\t\t table2.addCell(getCell(new Paragraph(SubjectExam,fontSubject), PdfPCell.ALIGN_LEFT));\n\t\t\t\t \n\t\t\t\t table2.addCell(getCell(new Paragraph(timeExam,fontExam), PdfPCell.ALIGN_RIGHT));\n\t\t\t\t table2.addCell(getCell(new Paragraph(CodeExam,fontExam), PdfPCell.ALIGN_LEFT));\n\t\t\t\t table2.addCell(getCell(new Paragraph(\"\",fontHeader), PdfPCell.ALIGN_RIGHT));\n\t\t\t\t table2.setSpacingBefore(5);\n\t\t\t\t doc.add(table2);\n\t\t\t\t \n\t\t\t\t String noteExam = exportExam2.getNoteExam();\n\t\t\t\t Font fontNote = new Font(base, 8, Font.ITALIC);\n\t\t\t\t \n\t\t\t\t Paragraph pNote = new Paragraph(noteExam, fontNote);\n\t\t\t\t pNote.setAlignment(Paragraph.ALIGN_MIDDLE);\n\t\t\t\t doc.add(pNote);\n\t\t\t\t PdfPTable table3 = new PdfPTable(1);\n\t\t\t\t table3.setSpacingBefore(5);\n\t\t\t\t table3.setWidthPercentage(80);\n\t\t\t\t Font finalExam = new Font(base, 10, Font.NORMAL);\n\t\t\t\t table3.addCell(getCell(new Paragraph(\"*****\",finalExam), PdfPCell.ALIGN_CENTER));\n\t\t\t\t doc.add(table3);\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t for(int i = 0; i < listExam2.blockRootQuestion.size() ; i++){\n\t\t\t\t\t System.out.println(\"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\");\n\t\t\t\t\t \n\t\t\t\t\t List listBlock = new List(List.UNORDERED);\n\t\t\t\t\t listBlock.setAutoindent(false);\n\t\t\t\t\t // listBlock.setSymbolIndent(20);\t\n\t\t\t\t\t listBlock.add(new ListItem(new Paragraph(listExam2.blockRootQuestion.get(i).rootQuestionBlock.getContent(),fontContent)));\n\t\t\t\t System.out.println(\"########### Block NAME \" +listExam2.blockRootQuestion.get(i).rootQuestionBlock.getContent());\n\t\t\t\t\t \n\t\t\t\t\t doc.add(listBlock);\n\t\t\t\t \n\t\t\t\t \n\t\t\t \tSystem.out.println(\"########### SIZE QUESTION \" +listExam2.blockRootQuestion.get(i).questionList.size());\n\t \n\t\t\t\t for(int j = 0 ; j < listExam2.blockRootQuestion.get(i).questionList.size(); j++){\t\n\t\t\t\t \tSystem.out.println(\"########### QUESTION NAME \" +listExam2.blockRootQuestion.get(i).questionList.get(j).question.getContent());\n\t\t\t\t\t\t\t\n\t\t\t\t \t List listQuestion = new List(List.UNORDERED);\n\t\t\t\t\t\t listQuestion.setListSymbol(\"\");\n\t\t\t\t \t\n\t\t\t\t \t//SingleQuestion questionPDF = null;\n\t\t\t\t \t//questionPDF = listExam.blockRootQuestion.get(i).questionList.get(j);\n\t\t\t\t \tStringBuilder sb = new StringBuilder();\n\t\t\t\t\t\t\tsb.append(\"Câu \");\n\t\t\t\t\t\t\tsb.append(CoutExam);\n\t\t\t\t\t\t\tsb.append(\". \");\n\t\t\t\t\t\t\tString strI = sb.toString();\n\t\t\t\t \t//strI = new Paragraph(strI, fontNumber);\n\t\t\t\t \t//listQuestion.setPostSymbol(strI);\n\t\t\t\t \tSystem.out.println(strI);\n\t\t\t\t listQuestion.add(new ListItem(new Paragraph(strI + listExam2.blockRootQuestion.get(i).questionList.get(j).question.getContent(), fontContent)));\n\t\t\t\t listQuestion.setIndentationLeft(10);\n\t\t\t\t doc.add(listQuestion);\n\t\t\t\t List listAnswerPDF = new List(List.ORDERED, List.ALPHABETICAL);\n\t\t\t\t for(int k = 0; k < listExam2.blockRootQuestion.get(i).questionList.get(j).answerList.size(); k++){\n\t\t\t\t\t\t System.out.println(\"########### Answer NAME \" +listExam2.blockRootQuestion.get(i).questionList.get(j).answerList.get(k).getContent());\n\t\t\t\t\t\t if(listExam2.blockRootQuestion.get(i).questionList.get(j).answerList.get(k).getIssolution())\n\t\t\t\t \t listAnswerPDF.add(new ListItem(new Paragraph(listExam2.blockRootQuestion.get(i).questionList.get(j).answerList.get(k).getContent(), fontAnswent)));\n\t\t\t\t \t else \n\t\t\t\t\t \tlistAnswerPDF.add(new ListItem(new Paragraph(listExam2.blockRootQuestion.get(i).questionList.get(j).answerList.get(k).getContent(), fontContent)));\n\t\t\t\t }\n\t\t\t\t listAnswerPDF.setIndentationLeft(25);\n\t\t\t\t doc.add(listAnswerPDF);\n\t\t\t\t CoutExam++;\n\t\t\t\t }\n\t\t\t\t doc.add( Chunk.NEWLINE );\n\t\t\t\t }\n\t\t\t\t doc.close();\n\t\t\t\t listExam2=null;\n\t\t\t }\n\t\t\t model.clear();\n\t\t\t doc.close();\n\t\t\t exportExam = null;\n\t\t\t// exportExam2 = null;\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"ERROR \"+ e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"@Test\r\n\tpublic void testCreatePdf(){\n\t}",
"public static void main( String[] args ) throws Exception\n {\n if( args.length != 2 )\n {\n System.out.println(\"Usage: <input pdf> <output file>\");\n }\n else\n {\n \tFile file = new File(\"./\"+args[0]);\n \tPDDocument document = PDDocument.load(file);\n\n \t List<PDPage> documentPages = document.getDocumentCatalog().getAllPages();\n\n \t\n try\n {\n \tPDPage page = documentPages.get(0);\n //document.addPage(page);\n List annotations = page.getAnnotations();\n\n // Setup some basic reusable objects/constants\n // Annotations themselves can only be used once!\n\n float inch = 72;\n PDGamma colourGreen = new PDGamma();\n colourGreen.setG(1);\n PDGamma colourBlue = new PDGamma();\n colourBlue.setB(1);\n\n PDBorderStyleDictionary borderThick = new PDBorderStyleDictionary();\n borderThick.setWidth(inch/12); // 12th inch\n PDBorderStyleDictionary borderThin = new PDBorderStyleDictionary();\n borderThin.setWidth(inch/72); // 1 point\n PDBorderStyleDictionary borderULine = new PDBorderStyleDictionary();\n borderULine.setStyle(PDBorderStyleDictionary.STYLE_UNDERLINE);\n borderULine.setWidth(inch/72); // 1 point\n\n float pw = page.getMediaBox().getUpperRightX();\n float ph = page.getMediaBox().getUpperRightY();\n\n // Add the markup annotation, a highlight to PDFBox text\n PDFont font = PDType1Font.HELVETICA_BOLD;\n PDAnnotationTextMarkup txtMark = new PDAnnotationTextMarkup(PDAnnotationTextMarkup.SUB_TYPE_HIGHLIGHT);\n txtMark.setColour(colourBlue);\n txtMark.setConstantOpacity((float)0.1); // Make the highlight 20% transparent\n\n // Set the rectangle containing the markup\n\n float textWidth = (font.getStringWidth( \"PDFBox\" )/1000) * 18;\n PDRectangle position = new PDRectangle();\n position.setLowerLeftX(inch);\n position.setLowerLeftY( ph-inch-18 );\n position.setUpperRightX(72 + textWidth);\n position.setUpperRightY(ph-inch);\n txtMark.setRectangle(position);\n\n // work out the points forming the four corners of the annotations\n // set out in anti clockwise form (Completely wraps the text)\n // OK, the below doesn't match that description.\n // It's what acrobat 7 does and displays properly!\n float[] quads = new float[8];\n\n quads[0] = position.getLowerLeftX(); // x1\n quads[1] = position.getUpperRightY()-2; // y1\n quads[2] = position.getUpperRightX(); // x2\n quads[3] = quads[1]; // y2\n quads[4] = quads[0]; // x3\n quads[5] = position.getLowerLeftY()-2; // y3\n quads[6] = quads[2]; // x4\n quads[7] = quads[5]; // y5\n\n txtMark.setQuadPoints(quads);\n txtMark.setContents(\"Highlighted since it's important\");\n\n annotations.add(txtMark);\n\n\n \n\n // Now a square annotation\n\n PDAnnotationSquareCircle aSquare =\n new PDAnnotationSquareCircle( PDAnnotationSquareCircle.SUB_TYPE_SQUARE);\n aSquare.setContents(\"Square Annotation\");\n aSquare.setColour(colourGreen); // Outline in red, not setting a fill\n aSquare.setBorderStyle(borderThick);\n aSquare.setConstantOpacity((float)0.1);\n\n // Place the annotation on the page, we'll make this 1\" (72points) square\n // 3.5\" down, 1\" in from the right on the page\n\n position = new PDRectangle(); // Reuse the variable, but note it's a new object!\n position.setLowerLeftX(pw-(2*inch)); // 1\" in from right, 1\" wide\n position.setLowerLeftY(ph-(float)(3.5*inch) - inch); // 1\" height, 3.5\" down\n position.setUpperRightX(pw-inch); // 1\" in from right\n position.setUpperRightY(ph-(float)(3.5*inch)); // 3.5\" down\n aSquare.setRectangle(position);\n\n // add to the annotations on the page\n annotations.add(aSquare);\n\n\n\n document.save(args[1]);\n }\n finally\n {\n document.close();\n }\n }\n }",
"public static void main(String[] args) throws Exception {\n PdfDocument doc = new PdfDocument();\r\n //Set margin\r\n PdfUnitConvertor unitCvtr = new PdfUnitConvertor();\r\n PdfMargins margin = new PdfMargins();\r\n margin.setTop(unitCvtr.convertUnits(2.54f, PdfGraphicsUnit.Centimeter, PdfGraphicsUnit.Point));\r\n margin.setBottom(margin.getTop());\r\n margin.setLeft(unitCvtr.convertUnits(3.17f, PdfGraphicsUnit.Centimeter, PdfGraphicsUnit.Point));\r\n margin.setRight(margin.getLeft());\r\n\r\n drawCover(doc.getSections().add(), margin);\r\n drawContent(doc.getSections().add(), margin);\r\n drawPageNumber(doc.getSections().get(1), margin, 1, doc.getSections().get(1).getCount());\r\n\r\n //Save pdf file.\r\n doc.saveToFile(\"output/pagination.pdf\");\r\n doc.close();\r\n }",
"@Test\n\tpublic void testAllExampleGenerations() {\n\t\ttry {\n\t\t\tOdfHelper.main(null);\n\t\t} catch (Exception ex) {\n\t\t\tLOG.log(Level.SEVERE, null, ex);\n\t\t\tAssert.fail(ex.toString());\n\t\t}\n\t}",
"public interface PdfProvider {\n /**\n * Create a thumbnail image for a given PDF file.\n *\n * @param inputFile Input file.\n * @param outputStream OutputStream, to which the thumbnail is written. Important: Stream is not closed!\n * @param format Output file format given as a MIME type.\n * @param width Width in pixel.\n * @param height Height in pixel.\n * @param quality Quality factor for output compression.\n * @param speedHint Speed factor for conversion.\n * @throws Exception on any error opening the file, converting the file or writing to the output.\n */\n\n void createThumbNail(File inputFile, OutputStream outputStream,\n String format, int width, int height,\n ConversionCommand.CompressionQuality quality,\n ConversionCommand.SpeedHint speedHint) throws Exception;\n\n PdfDocumentInformation getDocumentInformation(File pdfFile) throws Exception;\n\n int countPages(File pdfFile) throws Exception;\n\n void createPdfFromImages(File[] imageFiles, PdfDocumentInformation documentInformation, File outputPdfFile) throws Exception;\n\n void createPdfFromImages(byte[][] imageFileByteArrays, PdfDocumentInformation documentInformation,\n int width, int height, OutputStream outputStream) throws Exception;\n}",
"private void createPdf(String sometext) {\n PdfDocument document = new PdfDocument();\n // crate a page description\n PdfDocument.PageInfo pageInfo = new PdfDocument.PageInfo.Builder(300, 600, 1).create();\n // start a page\n PdfDocument.Page page = document.startPage(pageInfo);\n Canvas canvas = page.getCanvas();\n Paint paint = new Paint();\n paint.setColor(Color.RED);\n canvas.drawCircle(50, 50, 30, paint);\n paint.setColor(Color.BLACK);\n canvas.drawText(sometext, 80, 50, paint);\n //canvas.drawt\n // finish the page\n document.finishPage(page);\n // draw text on the graphics object of the page\n // Create Page 2\n pageInfo = new PdfDocument.PageInfo.Builder(300, 600, 2).create();\n page = document.startPage(pageInfo);\n canvas = page.getCanvas();\n paint = new Paint();\n paint.setColor(Color.BLUE);\n canvas.drawCircle(100, 100, 100, paint);\n document.finishPage(page);\n\n // write the document content\n String directory_path = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) + \"/mypdf/\";\n File file = new File(directory_path);\n if (!file.exists()) {\n file.mkdirs();\n }\n double random_double = Math.random() * (999999 - 999 + 1) + 999;\n String targetPdf = directory_path + String.valueOf(random_double) + \".pdf\";\n File filePath = new File(targetPdf);\n try {\n document.writeTo(new FileOutputStream(filePath));\n Toast.makeText(this, \"Done\", Toast.LENGTH_LONG).show();\n } catch (IOException e) {\n Log.e(\"main\", \"error \" + e.toString());\n Toast.makeText(this, \"Something wrong: \" + e.toString(), Toast.LENGTH_LONG).show();\n }\n // close the document\n document.close();\n }",
"public void onStartPage(PdfWriter writer, Document document){}",
"public void generatePDF(String directory, String nameOfTheDocument) throws Exception{\n\t\t\n\t\t//Create empty document (instance of Document classe from Apose.Words)\n\t\tDocument doc = new Document();\n\t\t\n\t\t//Every word document have section, so now we are creating section\n\t\tSection section = new Section(doc);\n\t\tdoc.appendChild(section);\n\t\t\n\t\tsection.getPageSetup().setPaperSize(PaperSize.A4);\n\t\tsection.getPageSetup().setHeaderDistance (35.4); // 1.25 cm\n\t\tsection.getPageSetup().setFooterDistance (35.4); // 1.25 cm\n\t\t\n\t\t//Crating the body of section\n\t\tBody body = new Body(doc);\n\t\tsection.appendChild(body);\n\t\t\n\t\t//Crating paragraph\n\t\tParagraph paragraph = new Paragraph(doc);\n\t\t\n\t\tparagraph.getParagraphFormat().setStyleName(\"Heading 1\");\n\t\tparagraph.getParagraphFormat().setAlignment(ParagraphAlignment.CENTER);\n\t\t//Crating styles\n\t\tStyle style = doc.getStyles().add(StyleType.PARAGRAPH, \"Style1\");\n\t\tstyle.getFont().setSize(24);\n\t\tstyle.getFont().setBold(true);\n\t\tstyle.getFont().setColor(Color.RED);\n\t\t//paragraph.getParagraphFormat().setStyle(style);\n\t\tbody.appendChild(paragraph);\n\t\t\n\t\tStyle styleForIntroduction = doc.getStyles().add(StyleType.PARAGRAPH, \"Style2\");\n\t\tstyle.getFont().setSize(40);\n\t\tstyle.getFont().setBold(false);\n\t\tstyle.getFont().setItalic(true);\n\t\tstyle.getFont().setColor(Color.CYAN);\n\t\t\n\t\tStyle styleForText = doc.getStyles().add(StyleType.PARAGRAPH, \"Style3\");\n\t\tstyle.getFont().setSize(15);\n\t\tstyle.getFont().setBold(false);\n\t\tstyle.getFont().setItalic(false);\n\t\tstyle.getFont().setColor(Color.BLACK);\n\t\t\n\t\t//Crating run of text\n\t\tRun textRunHeadin1 = new Run(doc);\n\t\ttry {\n\t\t\ttextRunHeadin1.setText(\"Probni test fajl\" + \"\\r\\r\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tparagraph.appendChild(textRunHeadin1);\n\t\t\n\t\t\n\t\t//Creating paragraph1 for every question in list\n\t\tfor (Question question : questions) {\n\t\t\t\n\t\t\t\n\t\t\t\t//Paragraph for Instruction Question\n\t\t\t\tParagraph paragraphForInstruction = new Paragraph(doc);\n\t\t\t\tparagraphForInstruction.getParagraphFormat().setStyleName(\"Heading 1\");\n\t\t\t\tparagraphForInstruction.getParagraphFormat().setAlignment(ParagraphAlignment.LEFT);\n\t\t\t\tparagraphForInstruction.getParagraphFormat().setStyle(styleForIntroduction);\n\t\t\t\tparagraphForInstruction.getParagraphFormat().setStyleName(\"Heading 3\");\n\t\t\t\t\n\t\t\t\tRun runIntroduction = new Run(doc);\n\t\t\t\t\n\t\t\t\trunIntroduction.getFont().setColor(Color.BLUE);\n\t\t\t\ttry {\n\t\t\t\t\trunIntroduction.setText(((Question)question).getTextInstructionForQuestion()+\"\\r\");\n\t\t\t\t} catch (Exception 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\tparagraphForInstruction.appendChild(runIntroduction);\n\t\t\t\tbody.appendChild(paragraphForInstruction);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//Paragraph for Question\n\t\t\t\tParagraph paragraphForQuestion = new Paragraph(doc);\n\t\t\t\tparagraphForQuestion.getParagraphFormat().setStyleName(\"Heading 1\");\n\t\t\t\tparagraphForQuestion.getParagraphFormat().setAlignment(ParagraphAlignment.LEFT);\n\t\t\t\tparagraphForQuestion.getParagraphFormat().setStyle(styleForText);\n\t\t\t\tparagraphForQuestion.getParagraphFormat().setStyleName(\"Normal\");\n\t\t\t\t\n\t\t\t\tRun runText = new Run(doc);\n\t\t\t\tif(question instanceof QuestionBasic){\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\trunText.setText(((QuestionBasic)question).toStringForDocument()+\"\\r\");\n\t\t\t\t\t} catch (Exception 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}\t\n\t\t\t\t\n\t\t\t\tif(question instanceof QuestionFillTheBlank){\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\trunText.setText(((QuestionFillTheBlank)question).toStringForDocument());\n\t\t\t\t\t} catch (Exception 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}\t\n\t\t\t\t\n\t\t\t\tif(question instanceof QuestionMatching){\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\trunText.setText(((QuestionMatching)question).toStringForDocument());\n\t\t\t\t\t} catch (Exception 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}\t\n\t\t\t\t\n\t\t\t\tif(question instanceof QuestionTrueOrFalse){\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\trunText.setText(((QuestionTrueOrFalse)question).toStringForDocument());\n\t\t\t\t\t} catch (Exception 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}\t\n\t\t\t\t\n\t\t\t\tparagraphForQuestion.appendChild(runText);\n\t\t\t\tbody.appendChild(paragraphForQuestion);\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\tdoc.save(directory + nameOfTheDocument +\".pdf\");\n\t\t\n\t}",
"public void manipulatePdf(String dest) throws IOException, SQLException {\n DatabaseConnection connection = new HsqldbConnection(\"filmfestival\");\n\n PdfDocument pdfDoc = new PdfDocument(new PdfWriter(DEST));\n Document doc = new Document(pdfDoc);\n doc.setMargins(54, 36, 36, 36);\n\n HeaderHandler headerHandler = new HeaderHandler();\n pdfDoc.addEventHandler(PdfDocumentEvent.START_PAGE, headerHandler);\n\n WatermarkHandler watermarkHandler = new WatermarkHandler();\n pdfDoc.addEventHandler(PdfDocumentEvent.END_PAGE, watermarkHandler);\n\n template = new PdfFormXObject(new Rectangle(550, 803, 30, 30));\n PdfCanvas canvas = new PdfCanvas(template, pdfDoc);\n\n\n bold = PdfFontFactory.createFont(StandardFonts.HELVETICA_BOLD);\n italic = PdfFontFactory.createFont(StandardFonts.HELVETICA_OBLIQUE);\n normal = PdfFontFactory.createFont(StandardFonts.HELVETICA);\n\n Statement stm = connection.createStatement();\n ResultSet rs = stm.executeQuery(\n \"SELECT country, id FROM film_country ORDER BY country\");\n int d = 1;\n while (rs.next()) {\n headerHandler.setHeader(rs.getString(\"country\"));\n if (1 != d) {\n doc.add(new AreaBreak());\n }\n Set<Movie> movies =\n new TreeSet<>(new MovieComparator(MovieComparator.BY_YEAR));\n movies.addAll(PojoFactory.getMovies(connection, rs.getString(\"id\")));\n for (Movie movie : movies) {\n doc.add(new Paragraph(movie.getMovieTitle()).setFont(bold));\n if (movie.getOriginalTitle() != null)\n doc.add(new Paragraph(movie.getOriginalTitle()).setFont(italic));\n doc.add(new Paragraph(String.format(\"Year: %d; run length: %d minutes\",\n movie.getYear(), movie.getDuration())).setFont(normal));\n doc.add(PojoToElementFactory.getDirectorList(movie));\n }\n d++;\n }\n\n canvas.beginText();\n try {\n canvas.setFontAndSize(PdfFontFactory.createFont(StandardFonts.HELVETICA), 12);\n } catch (IOException e) {\n e.printStackTrace();\n }\n canvas.moveText(550, 803);\n canvas.showText(Integer.toString(pdfDoc.getNumberOfPages()));\n canvas.endText();\n canvas.stroke();\n\n doc.close();\n connection.close();\n }",
"public static void main(String[] args) throws IOException {\n\t\tPdf pdf1 = new Pdf();\n\t\t// Assign a security instance to Pdf object\n\t\tpdf1.setSecurity(new Security());\n\t\t// Restrict annotation modification\n\t\tpdf1.getSecurity().isAnnotationsModifyingAllowed(false);\n\t\t// Restrict contents modification\n\t\tpdf1.getSecurity().isContentsModifyingAllowed(false);\n\t\t// Restrict copying the data\n\t\tpdf1.getSecurity().isCopyingAllowed(false);\n\t\t// Allow to print the document\n\t\tpdf1.getSecurity().isCopyingAllowed(true);\n\t\t// Restrict form filling\n\t\tpdf1.getSecurity().isFormFillingAllowed(false);\n\t\t// Add a section in the Pdf\n\t\tSection sec1 = pdf1.getSections().add();\n\t\t// Create a text paragraph\n\t\tText text1 = new Text(sec1, \"this is text content\");\n\t\t// Set the top maring of text paragraph to 30\n\t\ttext1.getMargin().setTop(30);\n\t\t// Add the text paragraph to the section\n\t\tsec1.getParagraphs().add(text1);\n\t\t// Save the Pdf\n\t\tFileOutputStream fileOut = new FileOutputStream(new File(\"Test.pdf\"));\n\t\tpdf1.save(fileOut);\n\t}",
"public void createPDF(Loan loan, boolean isSwedish, String path, int count, String pathname) \n throws FileNotFoundException, DocumentException {\n log.info(\"createPDF : {} -- {}\", path, isSwedish);\n\n this.isSwedish = isSwedish;\n\n switch (pathname) {\n case \"local\":\n externalPath = LOCAL_EXTERNAL_FILES;\n break;\n case \"dina-loans\":\n externalPath = REMOTE_EXTERNAL_FILES_LOANS;\n break;\n default:\n externalPath = REMOTE_EXTERNAL_FILES_AS;\n break;\n }\n\n StringBuilder sb = new StringBuilder();\n sb.append(path);\n sb.append(\"/loanrequest_\");\n sb.append(loan.getId());\n\n File summaryAdminFile = new File(sb.toString() + \"_admin.pdf\"); \n sb.append(\".pdf\");\n File summaryFile = new File(sb.toString().trim()); \n\n document = new Document(PageSize.LETTER);\n adminDocument = new Document(PageSize.LETTER);\n PdfWriter.getInstance(document, new FileOutputStream(summaryFile));\n PdfWriter.getInstance(adminDocument, new FileOutputStream(summaryAdminFile));\n document.open();\n adminDocument.open();\n\n addTitle(loan);\n addContact(loan);\n\n switch (count) {\n case 9:\n addLoanRequestForScientificPurpose(loan);\n addLoanSampleList(loan);\n if (!RequestType.Information.isInformation(loan.getType())) {\n if (RequestType.Physical.isPhysical(loan.getType())) {\n addDestructiveInformation(loan);\n } else {\n addPhotoInformation(loan);\n }\n addCITESInformation(loan);\n } break;\n case 7:\n addEducationRequest(loan);\n break;\n default:\n addCommercialInformation(loan);\n break;\n }\n\n if (!RequestType.Information.isInformation(loan.getType())) {\n addTermsOfLoanAgreement();\n }\n document.close();\n adminDocument.close();\n }",
"@Test\n public void testPDFGeneration() throws Exception {\n FileInputStream xmlInputStream = new FileInputStream(new File(\"test/paper.xml\"));\n byte[] pdfBytes = new Publisher(\"target/frameworks/\").generatePdf(xmlInputStream);\n \n try (FileOutputStream pdfFile = new FileOutputStream(\"target/paper.pdf\")) {\n IOUtils.write(pdfBytes, pdfFile);\n }\n }",
"public void create() {\n PDDocument document = new PDDocument();\n PDPage page = new PDPage();\n document.addPage(page);\n\n // Create a new font object selecting one of the PDF base fonts\n PDFont font = PDType1Font.HELVETICA_BOLD;\n try (document) {\n // Start a new content stream which will \"hold\" the to be created content\n writeDataToDocument(document, page, font);\n // Save the results and ensure that the document is properly closed:\n document.save(\"Hello World.pdf\");\n } catch (IOException ioException) {\n ioException.printStackTrace();\n }\n }",
"public void ReportPdf(Context context, String date, String name, String reportnum, List<EditText> goals, List<EditText> objectives, List<EditText> task,List<EditText> deadline,List<EditText> status ){\n PdfDocument document = new PdfDocument();\n\n // crate a page description\n PdfDocument.PageInfo pageInfo =\n new PdfDocument.PageInfo.Builder(500, 1500, 2).create();\n\n // start a page\n PdfDocument.Page page = document.startPage(pageInfo);\n\n Canvas canvas = page.getCanvas();\n\n Paint paint = new Paint();\n paint.setColor(Color.BLUE);\n canvas.drawText(\"SIMBA EDUCATION\",220,140,paint);\n paint.setColor(Color.BLACK);\n canvas.drawText(\"Report\",10,160,paint);\n canvas.drawText(\"Dated\"+\" :\"+date,10,180,paint);\n canvas.drawText(\"Name\"+\" :\"+name,10,200,paint);\n\n\n //goals label section\n canvas.drawText(\"Goals\",100,240,paint);\n\n //goals Section\n int y0 = 240;\n int y = 0 ;\n\n for (int i = 0 ;i < goals.size() ; i++){\n y = y0+20;\n y0 = y;\n\n canvas.drawText(\"-> \" + goals.get(i).getText().toString(), 10, y, paint);\n\n }\n\n //objectives label section\n canvas.drawText(\"Objectives\",100,y+10,paint);\n\n //objectives Section\n for (int i = 0 ;i < objectives.size() ; i++){\n y0 = y+20;\n y = y0;\n canvas.drawText(\"* -> \" + objectives.get(i).getText().toString(), 10, y0, paint);\n\n }\n\n\n\n //new line code\n\n status.get(0).append(\"\\n\");\n //task label section\n\n\n\n\n for (int i = 0 ;i < 1; i++){\n y = y0+30;\n y0 = y;\n canvas.drawText(\"Task\", 10, y, paint);\n canvas.drawText(\"Deadline\", 150, y, paint);\n canvas.drawText(\"Status\", 280, y, paint);\n\n }\n\n //task section\n\n for (int i = 0 ;i < task.size() ; i++){\n y0 = y+50;\n y = y0;\n\n int x =y0+40;\n int z = x+20;\n z = x;\n\n int q = 20;\n\n\n // canvas.drawText(\"Tasks\",100,y0+10,paint);\n\n canvas.drawText(task.get(i).getText().toString(), 10, y0, paint);\n canvas.drawText(deadline.get(i).getText().toString(),150,y0,paint);\n canvas.drawText(status.get(i).getText().toString(),280,y0,paint);\n\n }\n\n\n\n\n paint.setColor(Color.RED);\n\n canvas.drawText(\"Designed by Kidkudzy \", 220,1460,paint);\n\n\n\n\n\n\n\n\n\n //canvas.drawCircle(50, 50, 30, paint);\n\n document.finishPage(page);\n\n // write the document content\n File folder = new File(Environment.getExternalStorageDirectory() +\n File.separator + \"REPORTit/Reports/\");\n boolean success = true;\n if (!folder.exists()) {\n success = folder.mkdirs();\n }\n if (success) {\n // Do something on success\n } else {\n // Do something else on failure\n }\n //appending cuurent timestamp to my generated file\n\n Date_Operations dateOp = new Date_Operations();\n String currenttime = dateOp.GetCurrentTimeAndDate();\n\n\n\n String targetPdf = \"/sdcard/REPORTit/Reports/Report\"+currenttime+\".pdf\";\n //String targetPdf = \"/sdcard/REPORTit/Reports/Report.pdf\";\n File filePath = new File(targetPdf);\n try {\n document.writeTo(new FileOutputStream(filePath));\n Toast.makeText(context, \"Pdf stored in \\n \" + targetPdf, Toast.LENGTH_LONG).show();\n } catch (IOException e) {\n e.printStackTrace();\n Toast.makeText(context, \"Something wrong: \" + e.toString(),\n Toast.LENGTH_LONG).show();\n }\n document.close();\n }",
"@Override\r\n\tpublic void createPDF(HttpServletRequest request, OutputStream os) {\n\t\t\r\n\t}",
"@Override\n\tpublic void createPDF(){\n File xsltFile = new File(RESOURCES_DIR + \"/pdfBook.xsl\");\n \n // the XML file which provides the input\n StreamSource xmlSource = new StreamSource(file);\n \n // create an instance of fop factory\n FopFactory fopFactory = FopFactory.newInstance();\n \n // a user agent is needed for transformation\n FOUserAgent foUserAgent = fopFactory.newFOUserAgent();\n \n // Setup output\n OutputStream out = null;\n try {\n\t\t\tout = new java.io.FileOutputStream(OUTPUT_DIR + \"/output.pdf\");\n\t\t} catch (FileNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\n try {\n // Construct fop with desired output format\n Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, out);\n\n // Setup XSLT\n TransformerFactory factory = TransformerFactory.newInstance();\n Transformer transformer = factory.newTransformer(new StreamSource(xsltFile));\n\n // Resulting SAX events (the generated FO) must be piped through to\n // FOP\n Result res = new SAXResult(fop.getDefaultHandler());\n\n // Start XSLT transformation and FOP processing\n // That's where the XML is first transformed to XSL-FO and then\n // PDF is created\n try {\n\t\t\t\ttransformer.transform(xmlSource, res);\n\t\t\t} catch (TransformerException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n } catch (FOPException | TransformerConfigurationException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t} finally {\n try {\n\t\t\t\tout.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n }\n }",
"public static void main(String[] args) throws DocumentException, IOException {\n\t\t// step 1\n\t\t// landscape format because width > height\n\t\tDocument document = new Document(new Rectangle(792, 612));\n\t\t// step 2\n\t\tPdfWriter.getInstance(document, new FileOutputStream(RESULT));\n\t\t// step 3\n\t\tdocument.open();\n\t\t// step 4\n\t\tdocument.add(new Paragraph(\"Hello World\"));\n\t\t// step 5\n\t\tdocument.close();\n\t}",
"public void testCreate () throws IOException {\n\t PDDocument document = new PDDocument(); \r\n\t \r\n\t //Saving the document\r\n\t document.save(\"./my_doc.pdf\");\r\n\t \r\n\t System.out.println(\"PDF created\"); \r\n\t \r\n\t //Closing the document \r\n\t document.close();\r\n\t}",
"static public void main(String args[]) throws IOException, DocumentException, XMPException {\n File file = new File(DEST);\n file.getParentFile().mkdirs();\n new Sample06_Zugferd().createPdf(DEST);\n }",
"public static void main(String[] args) {\n\t\ttry {\n\t\t\t//Can't use filename directly\n//\t\t\tPdfReader reader1 = new PdfReader(\"SimpleRegistrationForm.pdf\");\n//\t\t\tPdfReader reader2 = new PdfReader(\"TextFields.pdf\");\n\t\t\tPdfReader reader1 = new PdfReader(PdfTestRunner.getActivity().getResources().openRawResource(R.raw.simpleregistrationform));\n\t\t\tPdfReader reader2 = new PdfReader(PdfTestRunner.getActivity().getResources().openRawResource(R.raw.textfields));\n\t\t\tPdfCopyFields copy = new PdfCopyFields(new FileOutputStream(android.os.Environment.getExternalStorageDirectory() + java.io.File.separator + \"droidtext\" + java.io.File.separator + \"concatenatedforms.pdf\"));\n\t\t\tcopy.addDocument(reader1);\n\t\t\tcopy.addDocument(reader2);\n\t\t\tcopy.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void genPDF(String qfname)\r\n\t{\n\t\tboolean res = loadQg(qfname);\r\n\t\tif(!res)\r\n\t\t{\r\n\t\t\tmsg = \"(PDFW:GenPDF) Can not load questions from: \"+qfname;\r\n\t\t\tJOptionPane.showMessageDialog(null, msg);\r\n\t\t\treturn;\r\n\t\t}\r\n\t}",
"public void generarDoc(){\n generarDocP();\n }",
"public void PdfCreate() {\n\t\t\n\t\tDocument document = new Document();\n\t\ttry {\n\t\t\tPdfWriter.getInstance(document, new FileOutputStream(outputFileName));\n\t\t\tList<String> lineBlockAsString = new ArrayList<String>();\n\t\t\tint FORMAT = 0;\n\t\t\tint SIZE = 13;\n\t\t\tthis.lineblocksSIZE = 0;\n\t\t\tdocument.open();\n\t\t\t//Read all the Lineblocks and get the Format and Style from each one\n\n\t\t\tfor(LineBlock lineblock : lineBlocks) {\n\t\t\t\tPhrase phrase = new Phrase();\n\t\t\t\t\n\t\t\t\tFORMAT = 0;\n\t\t\t\tSIZE = 13;\n\t\t\t\t\n\t\t\t\tswitch (lineblock.getFormat()) {\n\t\t\t\t\n\t\t\t\t\tcase BOLD:\n\t\t\t\t\t\tFORMAT = Font.BOLD;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase ITALICS:\n\t\t\t\t\t\tFORMAT = Font.ITALIC;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tFORMAT = Font.NORMAL;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tswitch (lineblock.getStyle()) {\n\t\t\t\t\t\n\t\t\t\t\tcase OMITTED: \n\t\t\t\t\t\tFORMAT = Font.UNDEFINED;\n\t\t\t\t\t\tbreak;\t\n\t\t\t\t\tcase H1:\n\t\t\t\t\t\tSIZE = 16;\n\t\t\t\t\t\tFORMAT = Font.BOLD;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase H2:\n\t\t\t\t\t\tSIZE = 16;\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif(FORMAT == Font.UNDEFINED) //omit rule\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\t//write inside the outputFileName.pdf based on the input Ruleset\n\t\t\t\tthis.lineblocksSIZE ++;\n\t\t\t\tFont font = new Font(FontFamily.TIMES_ROMAN, SIZE, FORMAT);\n\t\t\t\tlineBlockAsString = lineblock.getLines();\n\t\t\t\tfor(String line : lineBlockAsString) {\n\t\t\t\t\tChunk chunk = new Chunk(line, font);\t\t\t\t\n\t\t\t\t\tphrase.add(chunk);\t\t\t\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\tParagraph p = new Paragraph();\n\t\t\t\tp.add(phrase);\n\t\t\t\tdocument.add(p);\n\t\t\t\tdocument.add(Chunk.NEWLINE);\n\t\t\t}\n\t\t} catch (FileNotFoundException | DocumentException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tdocument.close();\n\t}",
"public static void main(String args[]) throws Exception {\n\t String filePath = \"test.pdf\";\r\n\t \r\n\t String pdfText = FileReader.getFile(filePath, 581, 584); \r\n\t text_position.position(580, 584);\r\n\t \r\n//\t String pdfText = FileReader.getFile(filePath, 396, 407); \r\n//\t text_position.position(395, 407);\r\n\r\n\t txtCreate.creatTxtFile(\"test\");\r\n\t txtCreate.writeTxtFile(pdfText);\r\n\t xmlCreater.getXML(\"test.txt\");\r\n }",
"ByteArrayOutputStream createPDF(String templateName, Map<String, Object> params,\n String companyId, String notificationType);",
"public void createPdf() {\n\t\tDocument document = new Document();\n\t\ttry {\n\t\t\tPdfWriter.getInstance(document, new FileOutputStream(fileName));\n\t\t\tFont header = new Font(Font.FontFamily.HELVETICA, 15, Font.BOLD);\n\t\t\tdocument.open();\n\t\t\t// set the title on the page as \"My Albums\"\n\t\t\tif (state.equals(\"a\")) {\n\t\t\t\tParagraph aHead = new Paragraph();\n\t\t\t\taHead.setFont(header);\n\t\t\t\taHead.add(\"My Albums\\n\\n\");\n\t\t\t\tdocument.add(aHead);\n\t\t\t}\n\t\t\t// or set the title on the page as \"My Publications\"\n\t\t\telse if (state.equals(\"p\")) {\n\t\t\t\tParagraph pHead = new Paragraph();\n\t\t\t\tpHead.setFont(header);\n\t\t\t\tpHead.add(\"My Publications\\n\\n\");\n\t\t\t\tdocument.add(pHead);\n\t\t\t}\n\t\t\t// create the table of albums/publications\n\t\t\tdocument.add(createTable());\n\t\t\tdocument.close();\n\t\t\tFile f = new File(fileName);\n\t\t\ttry {\n\t\t\t\tDesktop.getDesktop().browse(f.toURI());\n\t\t\t}\n\t\t\tcatch(IOException e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (DocumentException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void createPdf(Context context) {\n PdfDocument document = new PdfDocument();\n\n // crate a page description\n PdfDocument.PageInfo pageInfo =\n new PdfDocument.PageInfo.Builder(500, 500, 2).create();\n\n // start a page\n PdfDocument.Page page = document.startPage(pageInfo);\n\n Canvas canvas = page.getCanvas();\n\n Paint paint = new Paint();\n paint.setColor(Color.CYAN);\n\n //canvas.drawCircle(50, 50, 30, paint);\n\n document.finishPage(page);\n\n\n // Create Page 2\n pageInfo = new PdfDocument.PageInfo.Builder(500, 600, 1).create();\n page = document.startPage(pageInfo);\n canvas = page.getCanvas();\n paint = new Paint();\n paint.setColor(Color.BLUE);\n\n\n //print alldata to pdf\n\n\n Cursor res = myDb.GetSumOfColumns(\"Subscriptions\", \"amount\");\n Cursor result = myDb.GetSumOfColumns(\"Expenses\", \"amount\");\n Cursor cashResult = myDb.GetPayModeTotals(\"Subscriptions\", \"paymode\", \"Cash\");\n Cursor EcocashResult = myDb.GetPayModeTotals(\"Subscriptions\", \"paymode\", \"EcoCash\");\n Cursor BankcashResult = myDb.GetPayModeTotals(\"Subscriptions\", \"paymode\", \"Bank\");\n\n if (res.moveToFirst() && result.moveToFirst() && cashResult.moveToFirst() && EcocashResult.moveToFirst()\n && BankcashResult.moveToFirst()) {\n\n String alldata = res.getString(0);\n String allexpe = result.getString(0);\n String cashres = cashResult.getString(0);\n String ecores = EcocashResult.getString(0);\n String bankres = BankcashResult.getString(0);\n\n int income = 0;\n try {\n\n income = parseInt(alldata) - parseInt(allexpe);\n } catch (Exception e) {\n income = 0;\n }\n\n canvas.drawText(\"Income and Expenditure Statement for the period from ?? to ??\", 100, 160, paint);\n canvas.drawText(\"Income Received : \", 30, 210, paint);\n canvas.drawText(\" Cash : ' \" + cashres + \"' \", 30, 230, paint);\n canvas.drawText(\" Ecocash: ' \" + ecores + \"' \", 30, 250, paint);\n canvas.drawText(\" Bank : ' \" + bankres + \"' \", 30, 270, paint);\n canvas.drawText(\" Total : ' \" + alldata + \" '\", 30, 290, paint);\n canvas.drawText(\"Less Expenses : \", 30, 310, paint);\n canvas.drawText(\" Expense '( \" + allexpe + \")' \", 30, 330, paint);\n canvas.drawText(\"Net Income : \", 30, 350, paint);\n canvas.drawText(\" : Net ' \" + income + \" '\", 30, 370, paint);\n canvas.drawText(\"Compiled By: Secretary _______________ \", 30, 460, paint);\n canvas.drawText(\"Date : \", 30, 490, paint);\n\n }\n\n\n // finish the page\n document.finishPage(page);\n\n // write the document content\n File folder = new File(Environment.getExternalStorageDirectory() +\n File.separator + \"EasySecretary/Income Expenditure/\");\n boolean success = true;\n if (!folder.exists()) {\n success = folder.mkdirs();\n }\n if (success) {\n // Do something on success\n } else {\n // Do something else on failure\n }\n //appending cuurent timestamp to my generated file\n\n Date_Operations dateOp = new Date_Operations();\n String currenttime = dateOp.GetCurrentTimeAndDate();\n\n\n //String targetPdf = \"/sdcard/EasySecretary/Income and Expenditure '\"+currenttime+\"'.pdf\";\n String targetPdf = \"/sdcard/EasySecretary/Income Expenditure/Income and Expenditure \"+currenttime+\".pdf\";\n File filePath = new File(targetPdf);\n try {\n document.writeTo(new FileOutputStream(filePath));\n Toast.makeText(context, \"Pdf stored in \\n \" + targetPdf, Toast.LENGTH_LONG).show();\n } catch (IOException e) {\n e.printStackTrace();\n Toast.makeText(context, \"Something wrong: \" + e.toString(),\n Toast.LENGTH_LONG).show();\n }\n\n // close the document\n document.close();\n\n }",
"public static void main(String[] args) {\n PdfDocument pdf = new PdfDocument();\r\n\r\n PdfPageBase page = pdf.getPages().add();\r\n\r\n Rectangle2D rectangle2D = new Rectangle.Float();\r\n rectangle2D.setFrame(new Point2D.Double(10,10),new Dimension(100,100));\r\n\r\n PdfPopupAnnotation annotation = new PdfPopupAnnotation(rectangle2D, \"test\");\r\n annotation.setIcon(PdfPopupIcon.Help);\r\n annotation.setOpen(true);\r\n annotation.setAuthor(\"e-iceblue\");\r\n annotation.setSubject(\"subject_popup\");\r\n annotation.setColor(new PdfRGBColor(255,0,150));\r\n\r\n page.getAnnotationsWidget().add(annotation);\r\n String result = \"output/setAuthorAndSubjectForPdfPopupAnnotation.pdf\";\r\n\r\n //Save the document\r\n pdf.saveToFile(result);\r\n\t}",
"public static void main(String[] args) throws Exception {\n List<Chapter> chapterList = new ArrayList();\n BaseFont bfChinese = BaseFont.createFont(\"simhei.ttf\", BaseFont.IDENTITY_H,BaseFont.NOT_EMBEDDED);\n// BaseFont bfChinese = BaseFont.createFont(\"cjk_registry\", \"UniGB-UCS2-H\", false);\n Integer size = 28;\n \n Font font = new Font(bfChinese, size, Font.BOLD);\n for (int i = 1; i <= 10; i++) {\n Chunk chapTitle = new Chunk(\"The \" + i + \" chapter\", font);\n Chapter chapter = new Chapter(new Paragraph(chapTitle), i);\n chapTitle.setLocalDestination(chapter.getTitle().getContent());\n \n Paragraph chapterContent = new Paragraph(\"章节内容第1行\\n章节内容第2行\\n章节内容第3行\\n章节内容第4行\\n\" + i, font);\n chapterContent.setLeading(size * 1.1f);\n chapter.add(chapterContent);\n \n for (int j = 0; j < i; j++) {\n Chunk secTitle = new Chunk(\" 二级The \" + (j + 1) + \" section\");\n Section section = chapter.addSection(new Paragraph(secTitle));\n secTitle.setLocalDestination(section.getTitle().getContent());\n section.setIndentationLeft(10);\n section.add(new Paragraph(\"mangocool mangocool测试1aa1 \"\n + \"\\nmangocool mangocool 内容bb2\"\n + \"\\nmangocool mangocool 内容cc3\", font));\n \n section.add(new Paragraph(\"mangocool mangocool测试1aa1 \"\n + \"\\nmangocool mangocool 内容bb2\"\n + \"\\nmangocool mangocool 内容cc3\", font));\n }\n// content.add(chapter);\n chapterList.add(chapter);\n }\n// content.close();\n\n Document document = new Document(PageSize.A4, 50, 50, 50, 50);\n // add index page.\n String FILE_DIR = \"C:\\\\e\\\\test/\";\n String path = FILE_DIR + \"createSamplePDF.pdf\";\n FileOutputStream os = new FileOutputStream(path);\n PdfWriter writer = PdfWriter.getInstance(document, os);\n IndexEvent indexEvent = new IndexEvent();\n writer.setPageEvent(indexEvent);\n document.open();\n// Chapter indexChapter = new Chapter(\"Index:\", -1);\n// indexChapter.setNumberDepth(-1);// not show number style\n// PdfPTable table = new PdfPTable(2);\n// for (Map.Entry<String, Integer> index : event.index.entrySet()) {\n// PdfPCell left = new PdfPCell(new Phrase(index.getKey()));\n// left.setBorder(Rectangle.NO_BORDER);\n// Chunk pageno = new Chunk(index.getValue() + \"zzZZ章节\");\n// pageno.setLocalGoto(index.getKey());\n// PdfPCell right = new PdfPCell(new Phrase(pageno));\n// right.setHorizontalAlignment(Element.ALIGN_RIGHT);\n// right.setBorder(Rectangle.NO_BORDER);\n// table.addCell(left);\n// table.addCell(right);\n// }\n// indexChapter.add(table);\n// document.add(indexChapter);\n // add content chapter\n for (Chapter c : chapterList) {\n document.add(c);\n indexEvent.body = true;\n }\n document.close();\n os.close();\n }",
"public void createPdf(String dest) throws IOException, DocumentException, XMPException {\n Document document = new Document(PageSize.A4.rotate());\n //PDF/A-3b\n //Create PdfAWriter with the required conformance level\n PdfAWriter writer = PdfAWriter.getInstance(document, new FileOutputStream(dest), PdfAConformanceLevel.ZUGFeRD);\n writer.setPdfVersion(PdfWriter.VERSION_1_7);\n //Create XMP metadata\n writer.createXmpMetadata();\n writer.getXmpWriter().setProperty(PdfAXmpWriter.zugferdSchemaNS, PdfAXmpWriter.zugferdDocumentFileName, \"invoice.xml\");\n //====================\n document.open();\n //PDF/A-3b\n //Set output intents\n ICC_Profile icc = ICC_Profile.getInstance(new FileInputStream(ICC));\n writer.setOutputIntents(\"Custom\", \"\", \"http://www.color.org\", \"sRGB IEC61966-2.1\", icc);\n //===================\n\n Paragraph p = new Paragraph();\n //PDF/A-3b\n //Embed font\n p.setFont(FontFactory.getFont(FONT, BaseFont.WINANSI, BaseFont.EMBEDDED, 20));\n //=============\n Chunk c = new Chunk(\"The quick brown \");\n p.add(c);\n Image i = Image.getInstance(FOX);\n c = new Chunk(i, 0, -24);\n p.add(c);\n c = new Chunk(\" jumps over the lazy \");\n p.add(c);\n i = Image.getInstance(DOG);\n c = new Chunk(i, 0, -24);\n p.add(c);\n document.add(p);\n\n PdfDictionary parameters = new PdfDictionary();\n parameters.put(PdfName.MODDATE, new PdfDate());\n PdfFileSpecification fileSpec = writer.addFileAttachment(\n \"ZUGFeRD invoice\", null, XML,\n \"invoice.xml\", \"application/xml\",\n AFRelationshipValue.Alternative, parameters);\n PdfArray array = new PdfArray();\n array.add(fileSpec.getReference());\n writer.getExtraCatalog().put(PdfName.AF, array);\n\n document.close();\n }",
"@RequiresApi(api = Build.VERSION_CODES.KITKAT)\n public void CreatePdf(View view) throws IOException {\n\n // file path and file name\n int i = 1;\n String dir = Environment.getExternalStorageDirectory() + \"/Documents/\";\n String filePath = new File(dir, sName + \"_result_\" + i + \".pdf\").toString();\n File pdfFile = new File(filePath);\n while (pdfFile.exists()) {\n i++;\n filePath = new File(dir, sName + \"_result_\" + i + \".pdf\").toString();\n pdfFile = new File(filePath);\n }\n\n FileOutputStream fOut = new FileOutputStream(filePath);\n PdfWriter pdfWriter = new PdfWriter(fOut);\n\n PdfDocument pdfDocument = new PdfDocument(pdfWriter);\n Document document = new Document(pdfDocument);\n\n // setting title\n document.add(new Paragraph(sName)\n .setBold()\n .setUnderline()\n .setFontSize(30)\n .setTextAlignment(TextAlignment.CENTER));\n document.add(new Paragraph(\" \"));\n\n Table table = new Table(new float[] { 80, 80, 80, 80, 80, 80, 80 });\n\n //setting column headings\n for (String header : columnHeaders)\n table.addCell(new Paragraph(header).setBold());\n\n // fill data\n for (FinalCompetitorData competitorData : competitorsList) {\n table.addCell(new Paragraph(competitorData.rank + \"\"));\n table.addCell(new Paragraph(competitorData.boatClass + \"\"));\n table.addCell(new Paragraph(competitorData.sailNo + \"\"));\n table.addCell(new Paragraph(competitorData.helmName + \"\"));\n table.addCell(new Paragraph(competitorData.crewName + \"\"));\n table.addCell(new Paragraph(competitorData.PY + \"\"));\n table.addCell(new Paragraph(competitorData.points + \"\"));\n }\n\n document.add(table);\n document.close();\n Toast.makeText(DisplaySeriesResult.this, \"PDF created, check Documents!!\", Toast.LENGTH_LONG).show();\n }",
"public static void main(String[] args) {\n JFileChooser f = new JFileChooser();\n f.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n f.showSaveDialog(null);\n\n //System.out.println(f.getCurrentDirectory());\n \n \n String destinationFolder = f.getSelectedFile().toString();\n \n //check if OS is Windows, Linux or Mac and change file path\n String operatingSystem = System.getProperty(\"os.name\").toLowerCase();\n char c = operatingSystem.charAt(0);\n String FILE = \"\";\n if (c == 'w') {\n \tFILE = destinationFolder + \"\\\\FirstPdf.pdf\";\n } else {\n \tFILE = destinationFolder + \"/FirstPdf.pdf\";\n }\n \n\n\n try {\n Document document = new Document();\n PdfWriter.getInstance(document, new FileOutputStream(FILE));\n\n //create new font for the unicode symbols\n //font is in fonts folder\n BaseFont baseFont = BaseFont.createFont(\"fonts/arialuni.ttf\", BaseFont.IDENTITY_H, true);\n Font fontRed = new Font(baseFont, 18, Font.BOLD, BaseColor.RED);\n Font fontBlack = new Font(baseFont, 18, Font.BOLD, BaseColor.BLACK);\n document.open();\n\n //create table with 4 columns\n PdfPTable table = new PdfPTable(4);\n\n //create table header row\n PdfPCell c1 = new PdfPCell(new Phrase(\"Hearts\"));\n c1.setBorder(Rectangle.NO_BORDER);\n c1.setHorizontalAlignment(Element.ALIGN_CENTER);\n table.addCell(c1);\n\n c1 = new PdfPCell(new Phrase(\"Diamonds\"));\n c1.setBorder(Rectangle.NO_BORDER);\n c1.setHorizontalAlignment(Element.ALIGN_CENTER);\n table.addCell(c1);\n\n c1 = new PdfPCell(new Phrase(\"Clubs\"));\n c1.setBorder(Rectangle.NO_BORDER);\n c1.setHorizontalAlignment(Element.ALIGN_CENTER);\n table.addCell(c1);\n\n c1 = new PdfPCell(new Phrase(\"Spades\"));\n c1.setBorder(Rectangle.NO_BORDER);\n c1.setHorizontalAlignment(Element.ALIGN_CENTER);\n table.addCell(c1);\n table.setHeaderRows(1);\n\n\n //cards symbols and suites\n String[] cards = {\"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"J\", \"Q\", \"K\", \"A\"};\n String[] symbols = {\"\\u2665\", \"\\u2666\", \"\\u2663\", \"\\u2660\"};\n\n for (int i = 0; i < 13; i++) {\n for (int j = 0; j < 4; j++) {\n //fill cards, first two cards - red, other two - black\n if ( j < 2) {\n c1 = new PdfPCell(new Phrase(cards[i] + symbols[j], fontRed));\n } else {\n c1 = new PdfPCell(new Phrase(cards[i] + symbols[j], fontBlack));\n }\n c1.setVerticalAlignment(Element.ALIGN_MIDDLE);\n c1.setHorizontalAlignment(Element.ALIGN_CENTER);\n c1.setBackgroundColor(BaseColor.LIGHT_GRAY);\n c1.setBorderColor(BaseColor.WHITE);\n c1.setFixedHeight(150);\n\n c1.setBorderWidth(20);\n table.addCell(c1);\n table.setHorizontalAlignment(Element.ALIGN_CENTER);\n }\n }\n\n document.add(table);\n\n document.close();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n System.out.println(\"You can find your file at: \" + FILE);\n }",
"@Override\r\n\tpublic BatchResult generatePDFOutputBatch(Map<String, PathOrUrl> templates, Map<String, Document> data, PDFOutputOptions pdfOutputOptions, BatchOptions batchOptions)\r\n\t\t\tthrows OutputServiceException {\n\t\tthrow new UnsupportedOperationException(\"Not implemented yet.\");\r\n\t}",
"public byte[] runPdfExport() throws DocumentException, IOException, JRException, TalentStudioException {\n\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n\n if (isResultSetEmpty(jasperPrint.getPages())) {\n document = new Document(PageSize.A4);\n writer = PdfWriter.getInstance(document, outputStream);\n document.open();\n final Paragraph noResult = new Paragraph(getHeading(getMessage(\"no.results\")));\n noResult.setAlignment(Rectangle.ALIGN_CENTER);\n document.add(noResult);\n document.add(new Paragraph(\"\\n\"));\n\n } else {\n createDocument(jasperPrint.getPages());\n writer = PdfWriter.getInstance(document, outputStream);\n document.open();\n //below three lines force to be zoom at 100 and focus page 1\n document.newPage();\n PdfDestination destination = new PdfDestination(PdfDestination.XYZ, 0, -1, 1);\n writer.setOpenAction(PdfAction.gotoLocalPage(1, destination, writer));\n\n\n List<JRPrintPage> pages = jasperPrint.getPages();\n\n\n addPageHeader(document);\n\n for (JRPrintPage page : pages) {\n\n JRExporterGridCell[][] grid = getGrid(page);\n\n PdfPTable table = getTable(1);\n table.getDefaultCell().setBorder(Rectangle.BOX);\n int emptyRowCount = 0;\n for (int i = 0; i < grid.length; i++) {\n JRExporterGridCell[] jrExporterGridCells = grid[i];\n if (!isNullRow(jrExporterGridCells)) {\n\n\n int oddEvenNo = i - emptyRowCount;\n Color rowColor = null;\n if (oddEvenNo > 0) {\n\n if (oddEvenNo % 2 == 0) {\n rowColor = getDataBackgroundEvenColor();\n } else {\n rowColor = getDataBackgroundOddColor();\n }\n\n }\n\n PdfPTable subTable = getTable(jrExporterGridCells.length);\n subTable.getDefaultCell().setBorder(Rectangle.NO_BORDER);\n subTable.getDefaultCell().setPadding(0);\n\n for (int j = 0; j < jrExporterGridCells.length; j++) {\n JRExporterGridCell jrExporterGridCell = jrExporterGridCells[j];\n\n final JRPrintElement jrPrintElement = jrExporterGridCell.getElement();\n\n\n if (jrPrintElement instanceof JRPrintText) {\n final JRPrintText element = (JRPrintText) jrExporterGridCell.getElement();\n\n String style = element.getStyle() != null ? element.getStyle().getName() : \"\";\n\n final String text = element.getText();\n\n if (TEMPLATE_HEADER.equalsIgnoreCase(style)) {\n final Paragraph paragraph = getHeading(text);\n final PdfPCell pCell = new PdfPCell(paragraph);\n pCell.setBackgroundColor(getHeaderBackgroundColor());\n subTable.addCell(pCell);\n } else if (TEMPLATE_GROUP.equalsIgnoreCase(style)) {\n if (StringUtils.hasText(text)) {\n Paragraph paragraph = getGroupHeading(text);\n PdfPCell groupHeader = new PdfPCell(paragraph);\n groupHeader.setColspan(jrExporterGridCells.length);\n groupHeader.setBackgroundColor(getHeaderGroupBackgroundColor());\n\n subTable.addCell(groupHeader);\n } else {\n //empty header\n final PdfPCell pCell = new PdfPCell();\n pCell.setBackgroundColor(rowColor);\n subTable.addCell(pCell);\n }\n\n } else {\n\n if (!isAddImageColumn(j, text, subTable, rowColor)) {\n final Paragraph paragraph = getText(text);\n final PdfPCell pdfPCell = new PdfPCell(paragraph);\n pdfPCell.setBackgroundColor(rowColor);\n subTable.addCell(pdfPCell);\n }\n }\n\n\n } else if (jrPrintElement instanceof JRTemplatePrintRectangle) {\n final PdfPCell pCell = new PdfPCell();\n pCell.setBackgroundColor(rowColor);\n subTable.addCell(pCell);\n\n } else if (jrPrintElement instanceof JRBasePrintElement) {\n\n } else {\n\n\n final PdfPCell pCell = new PdfPCell();\n pCell.setBackgroundColor(rowColor);\n subTable.addCell(pCell);\n }\n }\n\n table.getDefaultCell().setPadding(0);\n subTable.completeRow();\n\n clearEmptyRows(subTable);\n\n table.addCell(subTable);\n\n synchronizeTableMemory(table, i);\n\n } else {\n emptyRowCount++;\n }\n }\n document.add(table);\n }\n }\n document.close();\n\n return outputStream.toByteArray();\n }",
"public TbPdfInfoExample() {\n oredCriteria = new ArrayList<Criteria>();\n }",
"public void createReturnedBooksByTeachers(String filename) {\r\n \r\n // create a pdf\r\n Document document = new Document(PageSize.A4,5,5,20,40);\r\n \r\n try {\r\n \r\n String sql = \"SELECT * FROM teacherreturns\";\r\n pstmt = con.prepareStatement(sql);\r\n rs=pstmt.executeQuery();\r\n \r\n Font bfBold12 = new Font(Font.FontFamily.TIMES_ROMAN, 11, Font.BOLD, BaseColor.BLACK);\r\n Font bfBold = new Font(Font.FontFamily.TIMES_ROMAN, 11);\r\n \r\n PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(filename));\r\n HeaderFooterPageEvent event = new HeaderFooterPageEvent();\r\n writer.setPageEvent(event);\r\n \r\n document.open();\r\n addMetaData(document);\r\n \r\n //school info\r\n Paragraph intro = new Paragraph(\"\"+schoolName+\"\\n\"\r\n + \"\"+schoolAddress+\" \"+ schoolRegion+\"\\n\"\r\n + \"Website: \"+ schoolWebsite+\"\\n\"\r\n + \"Returned books by teachers ( Full report) as at \"+ LocalDate.now() +\"\\n\\r\",bfBold12);\r\n intro.setAlignment(Element.ALIGN_CENTER); \r\n document.add(intro);\r\n \r\n // Add a table\r\n float[] columnWidths = {1f,2f,1.5f,2f,1f,1.8f,2f};\r\n PdfPTable issuedBookTable = new PdfPTable(columnWidths);\r\n issuedBookTable.setWidthPercentage(90f);\r\n \r\n insertCell(issuedBookTable, \"Tch. ID\", Element.ALIGN_LEFT, 1, bfBold12); \r\n insertCell(issuedBookTable, \"Tch. Name\", Element.ALIGN_LEFT, 1, bfBold12);\r\n insertCell(issuedBookTable, \"Subject\", Element.ALIGN_LEFT, 1, bfBold12);\r\n insertCell(issuedBookTable, \"Book title\", Element.ALIGN_LEFT, 1, bfBold12);\r\n insertCell(issuedBookTable, \"Class\", Element.ALIGN_LEFT, 1, bfBold12);\r\n insertCell(issuedBookTable, \"Returned Qnty\", Element.ALIGN_MIDDLE, 1, bfBold12);\r\n insertCell(issuedBookTable, \"Date Returned\", Element.ALIGN_LEFT, 1, bfBold12);\r\n \r\n while (rs.next()) {\r\n String bookID = rs.getString(\"teacher_ID\");\r\n insertCell(issuedBookTable, bookID, Element.ALIGN_LEFT, 1, bfBold);\r\n \r\n String subject = rs.getString(\"teacher_name\");\r\n insertCell(issuedBookTable, subject, Element.ALIGN_LEFT, 1, bfBold); \r\n \r\n String title = rs.getString(\"book_subject\");\r\n insertCell(issuedBookTable, title, Element.ALIGN_LEFT, 1, bfBold);\r\n \r\n String classbook = rs.getString(\"book_title\");\r\n insertCell(issuedBookTable, classbook, Element.ALIGN_LEFT, 1, bfBold);\r\n \r\n String publisher = rs.getString(\"book_class\");\r\n insertCell(issuedBookTable, publisher, Element.ALIGN_LEFT, 1, bfBold);\r\n \r\n int qnty = rs.getInt(\"quantity_returned\"); \r\n insertCell(issuedBookTable, String.valueOf(qnty), Element.ALIGN_LEFT, 1, bfBold);\r\n \r\n String date = rs.getString(\"date_returned\");\r\n insertCell(issuedBookTable, date, Element.ALIGN_LEFT, 1, bfBold);\r\n \r\n \r\n }\r\n \r\n document.add(issuedBookTable);\r\n \r\n document.close();\r\n pstmt.close();\r\n \r\n \r\n } catch (DocumentException | FileNotFoundException ex) {\r\n Logger.getLogger(ReportPrintingController.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (SQLException ex) { \r\n Logger.getLogger(ReportPrintingController.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n \r\n }",
"private void createPdf(CartReceiptResponse receiptResponse, HttpServletResponse response, Locale localeObj)\n throws DocumentException, IOException {\n /* Get the output stream for writing PDF object */\n final OutputStream out = response.getOutputStream();\n Document document = new Document();\n PdfWriter writer = PdfWriter.getInstance(document, out);\n document.open();\n\n\t\t/* Start Add Image */ \n /* add Logo image based on application id Getting Image path from Resource bundle*/\n final String logoFileClasspath = getMessage(localeObj, \"pdf.receipt.logoImageUrl\");\n URL path = PdfServlet.class.getClassLoader().getResource(logoFileClasspath);\n if (null == path) {\n throw new FileNotFoundException(\"unable to find logoImage in classpath: \" + logoFileClasspath);\n }\n Image logoImage = Image.getInstance(path);\n\n\t\t/* Start of Bill Submit Section */\n PdfPTable logoImageTable = new PdfPTable(1);/* Table for the Logo Image */\n /* Logo added to PDF cell constructor */\n PdfPCell logoImageCell = new PdfPCell(logoImage);\n PdfPCell logoBlankSpaceCell = new PdfPCell(new Phrase(\" \", getFont(WHITE_COLOR, 8, Font.BOLD)));\n cellAlignment(logoImageCell, Element.ALIGN_CENTER, \"\", 0);\n cellAddingToTable(logoImageTable, logoImageCell, Rectangle.LEFT | Rectangle.TOP | Rectangle.RIGHT, 0, 0);\n\n cellAlignment(logoImageCell, Element.ALIGN_LEFT, \"\", 0);\n cellAddingToTable(logoImageTable, logoBlankSpaceCell, Rectangle.LEFT | Rectangle.RIGHT, 0, 0);\n document.add(logoImageTable);\n /* End Add Logo Image */ \n\n\t\t/* create PDF header section */\n pdfReceiptIdSection(receiptResponse, document, localeObj);\n /* Designing bill transaction information to show biller name and amount*/\n designBillTransactionInfo(receiptResponse, document, localeObj);\n /* create payment method section */\n pdfPaymentMethod(receiptResponse, document, localeObj);\n /* Appending line below the document */\n pdfInfoMessage(document, localeObj);\n /* New page creating for merging existing PdF page in to current PDF */\n document.newPage();\n try {\n getPdfFromAwsLink(writer, localeObj);/* Call to merge existing PDF to current PDf */\n } catch (final Exception e) {\n LOGGER.error(\"trouble while merging PDF disclosure\", e);\n }\n document.close();\n LOGGER.debug(\"End PDF Created \");\n }",
"public void createPdf(String savePath,String filename,int orderNumber, Customer customer, Owner owner,List<Product> productSet) throws DocumentException, MalformedURLException, IOException {\r\n\r\n\t\t\ttry {\r\n\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tDocument document = new Document(PageSize.A4, 40, 20, 0, 0);\r\n\t\t\t\tPdfWriter.getInstance(document, new FileOutputStream(savePath + \"/\" + filename + orderNumber + \".pdf\"));\r\n\t\t\t\tdocument.open();\r\n\r\n\t\t\r\n\t\t\t\t\r\n\t\t\t\tImage img = Image.getInstance(\r\n\t\t\t\t\t\t\"C:/Users/svens/eclipse-workspace/GetIt/src/main/resources/images/GetItLogo_Redux.png\");\r\n\t\t\t\timg.setAlignment(Element.ALIGN_BASELINE);\r\n\r\n\t\t\t\tPdfPTable table = new PdfPTable(3);\r\n\t\t\t\ttable.setWidthPercentage(100);\r\n\t\t\t\ttable.setSpacingBefore(150f);\r\n\t\t\t\ttable.setWidths(new int[] { 2, 1, 2 });\r\n\t\t\t\tPdfPCell cell = new PdfPCell(\r\n\t\t\t\t\t\tnew Phrase(owner.getCompanyName() + \"\\n\" + owner.getFirstName() +\"\\n\"+ owner.getLastname() + \r\n\t\t\t\t\t\t\t\t\"\\n\"+ owner.getAddress() , font1));\r\n\t\t\t\tcell.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE);\r\n\t\t\t\tcell.setBorder(0);\r\n\t\t\t\ttable.addCell(cell);\r\n\r\n\t\t\t\tPdfPCell cellrg = new PdfPCell(new Phrase(\"Rechnung\" + orderNumber, font2));\r\n\t\t\t\tcellrg.setBorder(0);\r\n\t\t\t\tcellrg.setVerticalAlignment(PdfPCell.ALIGN_BOTTOM);\r\n\t\t\t\tcellrg.setHorizontalAlignment(PdfPCell.ALIGN_CENTER);\r\n\t\t\t\ttable.addCell(cellrg);\r\n\r\n\t\t\t\tPdfPCell cell2 = new PdfPCell();\r\n\t\t\t\tcell2.setBorder(0);\r\n\t\t\t\tcell2.setHorizontalAlignment(PdfPCell.RIGHT);\r\n\t\t\t\ttable.getDefaultCell().setVerticalAlignment(Element.ALIGN_MIDDLE);\r\n\r\n\t\t\t\ttable.addCell(cell2);\r\n\t\t\t\tdocument.add(table);\r\n\r\n\t\t\t\tDate date = new Date();\r\n\t\t\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"dd.MM.yyyy\");\r\n\t\t\t\tStringBuilder dateBuilder = new StringBuilder(dateFormat.format(date));\r\n\t\t\t\tParagraph leftDate = new Paragraph();\r\n\t\t\t\tleftDate.setAlignment(Element.ALIGN_RIGHT);\r\n\t\t\t\tleftDate.setFont(font1);\r\n\t\t\t\tleftDate.add(\"\" + dateBuilder);\r\n\r\n\t\t\t\tdocument.add(new LineSeparator());\r\n\r\n\t\t\t\tdocument.add(leftDate);\r\n\t\t\t\tdocument.add(new Paragraph(\"\"));\r\n\r\n\t\t\t\t// Adress\r\n\t\t\t\tPdfPTable adressTable = new PdfPTable(2);\r\n\t\t\t\tadressTable.setHorizontalAlignment(PdfPTable.ALIGN_RIGHT);\r\n\t\t\t\tadressTable.setSpacingBefore(40f);\r\n\t\t\t\tadressTable.setWidthPercentage(96f);\r\n\t\t\t\tcell = new PdfPCell(\r\n\t\t\t\t\t\tnew Phrase(\"Herr\\n\"+ customer.getName() + \" \" + customer.getLastname()+\"\\n\" + customer.getAddress(), font2));\r\n\t\t\t\tcell.setBorder(0);\r\n\t\t\t\tadressTable.addCell(cell);\r\n\t\t\t\tChunk chunk = new Chunk(\"Rechnungsnummer: \"+ orderNumber + \"\\nKundennummer: \" +\r\n\t\t\t\tcustomer.getCustomer_id() + \"\\nRechnungsdatum: \" + dateBuilder, font1);\r\n\t\t\t\tcell = new PdfPCell(new Phrase(chunk));\r\n\t\t\t\tcell.setHorizontalAlignment(PdfPCell.ALIGN_RIGHT);\r\n\t\t\t\tcell.setBorder(0);\r\n\t\t\t\tadressTable.addCell(cell);\r\n\r\n\t\t\t\tdocument.add(adressTable);\r\n\r\n\t\t\t\t// Products\r\n\t\t\t\tPdfPTable productTable = new PdfPTable(4);\r\n\t\t\t\tproductTable.setPaddingTop(200);\r\n\t\t\t\tproductTable.setSpacingBefore(50);\r\n\t\t\t\tproductTable.addCell(\"QTY\");\r\n\t\t\t\tproductTable.addCell(\"Name\");\r\n\t\t\t\tproductTable.addCell(\"Price\");\r\n\t\t\t\tproductTable.addCell(\"Amount\");\r\n\r\n\t\t\t\tdouble total = 0;\r\n\t\t\t\tint tax = 20;\r\n\r\n\t\t\t\t// Iterate over Set to display different Products\r\n\t\t\t\tfor (int i = 0; i < productSet.size(); i++) {\r\n\r\n\t\t\t\t\tproductTable.addCell(productSet.get(i).intToString(productSet.get(i).getQuantity()));\r\n\t\t\t\t\tproductTable.addCell(productSet.get(i).getName());\r\n\t\t\t\t\tproductTable.addCell(productSet.get(i).doubleToString(productSet.get(i).getPrice()));\r\n\t\t\t\t\tproductTable.addCell(\r\n\t\t\t\t\t\t\tproductSet.get(i).doubleToString(productSet.get(i).getPrice() * productSet.get(i).getQuantity()));\r\n\r\n\t\t\t\t\ttotal = total + productSet.get(i).getPrice() * productSet.get(i).getQuantity();\r\n\r\n\t\t\t\t}\r\n\t\t\t\tdouble subTotal = total / 100 * (100 - tax);\r\n\r\n\t\t\t\tcell = new PdfPCell(new Phrase(\" \"));\r\n\t\t\t\tcell.setBorder(0);\r\n\t\t\t\tproductTable.addCell(cell);\r\n\t\t\t\tproductTable.addCell(cell);\r\n\t\t\t\tproductTable.addCell(cell);\r\n\t\t\t\tproductTable.addCell(cell);\r\n\r\n\t\t\t\t\r\n\t\t\t\tfont3.setColor(255, 255, 255);\r\n\t\t\t\tPdfPCell cellSubtotal = new PdfPCell(new Phrase(\"Subtotal\",font3));\r\n\t\t\t\tcellSubtotal.setBackgroundColor(color);\r\n\r\n\t\t\t\tproductTable.addCell(cell);\r\n\t\t\t\tproductTable.addCell(cellSubtotal);\r\n\t\t\t\tproductTable.addCell(\"Tax 20%\");\r\n\t\t\t\tproductTable.addCell(\"Total\");\r\n\r\n\t\t\t\tproductTable.addCell(cell);\r\n\t\t\t\tproductTable.addCell(Double.toString(subTotal));\r\n\t\t\t\tproductTable.addCell(Double.toString(total - total / 100 * (100 - tax)));\r\n\t\t\t\tproductTable.addCell(Double.toString(total));\r\n\t\t\t\t\r\n\t\t\t\tproductTable.setSpacingAfter(500);\r\n\t\t\t\tdocument.add(productTable);\r\n\r\n\t\t\t\t//BUSINESS OWNER INFORMATION\r\n\t\t\t\tPdfPTable businessTable = new PdfPTable(2);\r\n\r\n\t\t\t\tcell = new PdfPCell(\r\n\t\t\t\t\t\tnew Phrase(owner.getBankName() +\"\\nBLZ: \" + owner.getBankCode() + \" \" + owner.getAccountNumber(), font1));\r\n\t\t\t\tcell.setVerticalAlignment(PdfPCell.BOTTOM);\r\n\t\t\t\tcell.setBorder(0);\r\n\r\n\t\t\t\tbusinessTable.addCell(cell);\r\n\r\n\t\t\t\tcell = new PdfPCell(\r\n\t\t\t\t\t\tnew Phrase(\"\\n BIC: \" + owner.getBic() + \"\\n UID: \" + owner.getUid(),font1));\r\n\t\t\t\tcell.setVerticalAlignment(PdfPCell.BOTTOM);\r\n\t\t\t\tcell.setBorder(0);\r\n\t\t\t\tbusinessTable.addCell(cell);\r\n\t\t\t\t\r\n\t\t\t\tdocument.add(businessTable);\r\n\r\n\r\n\t\t\t\tdocument.close();\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t}",
"private static void usage() {\n System.err.println(\"Usage: java org.apache.pdfbox.examples.pdmodel.PrintTextLocations <input-pdf>\");\n }",
"private void createPDF(OutputStream os,String htmlFileName) {\n\t\tLog.info(\"url : \"+htmlFileName);\r\n //String HTML_TO_PDF = \"D:\\\\ConvertedFile.pdf\";\r\n // OutputStream os = new FileOutputStream(HTML_TO_PDF); \r\n \r\n /* File myhtml = new File(htmlFileName);\r\n FileInputStream fileinput = null;\r\n BufferedInputStream mybuffer = null;\r\n DataInputStream datainput = null;\r\n\r\n fileinput = new FileInputStream(myhtml);\r\n mybuffer = new BufferedInputStream(fileinput);\r\n datainput = new DataInputStream(mybuffer);\r\n\r\n while (datainput.available() != 0) {\r\n \t\r\n \tif(datainput.readLine().)\r\n \tSystem.out.println(datainput.readLine());\r\n \t}\r\n*/\r\n try {\r\n\t ITextRenderer renderer = new ITextRenderer();\r\n\t Log.info(\"Skill PDF Export->Create PDF->File name: \" + htmlFileName);\r\n\t renderer.setDocument(new File(htmlFileName)); \r\n\t renderer.layout();\r\n\t renderer.createPDF(os); \r\n\t os.close();\r\n }catch (Exception e) {\r\n \tLog.error(\"Error in SkillPdfExport\",e);\r\n }\r\n\t}",
"public void PDF() {\n try {\r\n /* try {\r\n ImageIO.write(Imagen, \"png\", new File(Path + \"1\" + \".png\"));\r\n } catch (IOException ex) {\r\n Logger.getLogger(panelprincipal.getName()).log(Level.SEVERE, null, ex);\r\n }*/\r\n Image imagen = Image.getInstance(jfc.getSelectedFile().getPath() + \"#\" + \".png\");\r\n imagen.scaleAbsolute(500, 400);\r\n imagen.setAlignment(Element.ALIGN_CENTER);\r\n FileOutputStream archivo = new FileOutputStream(jfc.getSelectedFile().getPath() + \".PDF\");\r\n Document d = new Document();\r\n PdfWriter.getInstance(d, archivo);\r\n PDF creacion = new PDF();\r\n d.open();\r\n d.setPageSize(PageSize.LETTER);\r\n d.add(creacion.setTitulo(nombrediagrama));\r\n //doc.add(new Paragraph(\" Carlos Wilfredo Romero Maradiaga \\n\"));\r\n d.add(imagen);\r\n // doc.add(pdf.getCuerpo(\"\\nCódigo Generado:\\n\"));\r\n /* if (codigo.length()<2) {\r\n doc.add(pdf.getCuerpo(\"Para poder visualizar el código, primero debe generarlo desde el Sistema y vuelva a guardar el archivo.\"));\r\n } else {\r\n doc.add(pdf.getCuerpo(codigo));\r\n */\r\n d.close();\r\n JOptionPane.showMessageDialog(null, \"El PDF se genero excelente\", \"Excelente\", JOptionPane.INFORMATION_MESSAGE);\r\n } catch (Exception e) {\r\n }\r\n }",
"@SuppressWarnings(\"unchecked\")\n @Override\n protected void buildPdfDocument(Map<String, Object> model, Document document, PdfWriter writer,\n HttpServletRequest request, HttpServletResponse response) throws Exception {\n createNewPdfByTemplate(model,document,writer,request,response);\n\n }",
"public static void main(ArrayList<Vacation> vac,ArrayList<Medical> med,ArrayList<Doc> doc,FullWorker fw,Time tim,Stuff stf,Stuffl stfl,float sal,int hou) {\n try {\n Document document = new Document();\n PdfWriter.getInstance(document, new FileOutputStream(FILE));\n document.open();\n addMetaData(document);\n addTitlePage(document);\n //addContent(document);\n addPersonal(document,fw,sal,hou);\n addWorker(document,stf,stfl);\n addTime(document,tim);\n addVacation(document, vac);\n addDocument(document,doc);\n addMedical(document, med);\n document.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private void generateInvoice(String clientID, String selectedMovieTheater, String selectedMovieOriginalName, String selectedScreeningId, int seatListSize) {\n\n AdministratorSQLiteOpenHelper administratorSQLiteOpenHelper = new AdministratorSQLiteOpenHelper(this, \"CineTEC\", null, 1);\n SQLiteDatabase sqLiteDatabase = administratorSQLiteOpenHelper.getWritableDatabase();\n\n PdfDocument pdfDocument = new PdfDocument();\n\n PdfDocument.PageInfo pageInfo = new PdfDocument.PageInfo.Builder(1200, 2010, 1).create();\n PdfDocument.Page page = pdfDocument.startPage(pageInfo);\n\n Canvas canvas = page.getCanvas();\n\n Paint titlePaint = new Paint();\n\n Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.logo);\n Bitmap bitmapLogo = Bitmap.createScaledBitmap(bitmap, 580, 300, false);\n\n canvas.drawBitmap(bitmapLogo, -100, 120, titlePaint);\n\n titlePaint.setTextAlign(Paint.Align.RIGHT);\n titlePaint.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.BOLD));\n titlePaint.setTextSize(70);\n canvas.drawText(\"CineTEC\", 1150, 150, titlePaint);\n\n titlePaint.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.NORMAL));\n titlePaint.setTextSize(35);\n canvas.drawText(\"Barrio Escalante, Avenida 7, San José, Costa Rica\", 1150, 250, titlePaint);\n canvas.drawText(\"(+506) 2555 5555\", 1150, 300, titlePaint);\n canvas.drawText(\"[email protected]\", 1150, 350, titlePaint);\n canvas.drawText(\"www.cinetec.cr\", 1150, 450, titlePaint);\n\n canvas.drawLine(50, 500, 1150, 500, titlePaint);\n\n Paint paint = new Paint();\n\n // Getting client by id\n Cursor cursor = sqLiteDatabase.rawQuery(\"SELECT * FROM CLIENT WHERE ID=\" + clientID, null);\n\n String firstName = \"\";\n String lastName = \"\";\n String secLastName = \"\";\n String phoneNumber = \"\";\n\n while(cursor.moveToNext()) {\n\n firstName = cursor.getString(1);\n lastName = cursor.getString(2);\n secLastName = cursor.getString(3);\n phoneNumber = cursor.getString(6);\n\n }\n\n paint.setTextAlign(Paint.Align.LEFT);\n paint.setTextSize(35);\n canvas.drawText(\"Invoice issued for:\", 50, 550, paint);\n\n paint.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.BOLD));\n paint.setTextSize(50);\n canvas.drawText(firstName + \" \" + lastName + \" \" + secLastName, 50, 600, paint);\n\n paint.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.NORMAL));\n paint.setTextSize(35);\n canvas.drawText(\"(+506) \" + phoneNumber, 50, 700, paint);\n\n Date date = new Date();\n DateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n DateFormat timeFormat = new SimpleDateFormat(\"HH:mm\");\n\n paint.setTextAlign(Paint.Align.RIGHT);\n canvas.drawText(\"Payment Date: \" + dateFormat.format(date) + \" \" + timeFormat.format(date), 1150, 700, paint);\n canvas.drawText(\"Invoice Date: \" + dateFormat.format(date) + \" \" + timeFormat.format(date), 1150, 750, paint);\n\n paint.setStyle(Paint.Style.FILL);\n paint.setTextAlign(Paint.Align.LEFT);\n canvas.drawText(\"Movie\", 50, 850, paint);\n canvas.drawText(\"Screening\", 300, 850, paint);\n canvas.drawText(\"Theater\", 500, 850, paint);\n canvas.drawText(\"Price\", 700, 850, paint);\n canvas.drawText(\"Quantity\", 850, 850, paint);\n canvas.drawText(\"Total\", 1050, 850, paint);\n\n canvas.drawLine(50, 870, 1150, 870, paint);\n\n // Getting seats by screening id\n cursor = sqLiteDatabase.rawQuery(\"SELECT * FROM SCREENING WHERE ID=\" + selectedScreeningId, null);\n\n String hour = \"\";\n\n while(cursor.moveToNext()) {\n\n hour = cursor.getString(3);\n\n }\n\n String subTotal = Integer.toString(3097 * seatListSize);\n\n canvas.drawText(selectedMovieOriginalName, 50, 920, paint);\n canvas.drawText(hour + \":00\", 330, 920, paint);\n canvas.drawText(selectedMovieTheater, 500, 920, paint);\n canvas.drawText(\"₡ 3097\", 680, 920, paint);\n canvas.drawText(Integer.toString(seatListSize), 910, 920, paint);\n canvas.drawText(\"₡ \" + subTotal, 1040, 920, paint);\n\n canvas.drawLine(690, 1000, 1150, 1000, paint);\n\n String total = Integer.toString(3500 * seatListSize);\n\n paint.setTextAlign(Paint.Align.RIGHT);\n canvas.drawText(\"Subtotal:\", 830, 1050, paint);\n canvas.drawText(\"₡ \" + subTotal, 1150, 1050, paint);\n\n canvas.drawText(\"IVA:\", 830, 1100, paint);\n canvas.drawText(\"13 %\", 1150, 1100, paint);\n\n canvas.drawText(\"Total:\", 830, 1150, paint);\n canvas.drawText(\"₡ \" + total, 1150, 1150, paint);\n\n pdfDocument.finishPage(page);\n\n String pathFile = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).toString();\n\n File file = new File(pathFile, \"/CineTEC_Invoice.pdf\");\n\n try {\n\n pdfDocument.writeTo(new FileOutputStream(file));\n\n } catch (FileNotFoundException e) {\n\n e.printStackTrace();\n\n } catch (IOException e) {\n\n e.printStackTrace();\n\n }\n\n pdfDocument.close();\n\n }",
"public static void main(String[] args) throws Exception {\n String[] arrays = BillPraser.getInstance().generateBillCodeAndNumber(\"D:\\\\log\\\\pdf\\\\liantong.pdf\");\n System.out.println(Arrays.toString(arrays));\n// testFindNextStr();\n }",
"public void execute() throws XDocletException {\n\t\tsetPublicId(DD_PUBLICID_20);\n\t\tsetSystemId(DD_SYSTEMID_20);\n\n\t\t// will not work .... dumper.xdt does not exist\n\t\t/*\n\t\tsetTemplateURL(getClass().getResource(\"resources/dumper.xdt\"));\n\t\tsetDestinationFile(\"dump\");\n\t\tSystem.out.println(\"Generating dump\");\n\t\tstartProcess();\n\t\t*/\n\n\n\t\tsetTemplateURL(getClass().getResource(WEBSPHERE_EJB_JAR_XML_TEMPLATE_FILE));\n\t\tsetDestinationFile(\"ejb-jar.xml\");\n\t\tSystem.out.println(\"Generating ejb-jar.xml\");\n\t\tstartProcess();\n\n setTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_BND_TEMPLATE_FILE));\n setDestinationFile(WEBSPHERE_DD_BND_FILE_NAME);\n System.out.println(\"Generating \" + WEBSPHERE_DD_BND_FILE_NAME);\n startProcess();\n\n setTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_EXT_TEMPLATE_FILE));\n setDestinationFile(WEBSPHERE_DD_EXT_FILE_NAME);\n System.out.println(\"Generating \" + WEBSPHERE_DD_EXT_FILE_NAME);\n startProcess();\n \n setTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_EXT_PME_TEMPLATE_FILE));\n setDestinationFile(WEBSPHERE_DD_EXT_PME_FILE_NAME);\n System.out.println(\"Generating \" + WEBSPHERE_DD_EXT_PME_FILE_NAME);\n startProcess();\n\n /*\n setTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_ACCESS_BEAN_TEMPLATE_FILE));\n setDestinationFile(WEBSPHERE_DD_ACCESS_FILE_NAME);\n System.out.println(\"Generating \" + WEBSPHERE_DD_ACCESS_FILE_NAME);\n startProcess();\n */\n \n\t\tsetTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_MAPXMI_TEMPLATE_FILE));\n\t\tsetDestinationFile(\"backends/\" + getDb() + \"/Map.mapxmi\");\n\t\tSystem.out.println(\"Generating backends/\" + getDb() + \"/Map.mapxmi\");\n\t\tstartProcess();\n \n setTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_DBXMI_TEMPLATE_FILE));\n setDestinationFile(\"backends/\" + getDb() + \"/\" + getSchema() + \".dbxmi\");\n System.out.println(\"Generating backends/\" + getDb() + \"/\" + getSchema() + \".dbxmi\");\n startProcess();\n \n\t\tsetTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_SCHXMI_TEMPLATE_FILE));\n\t\tsetDestinationFile(\"backends/\" + getDb() + \"/\" + getSchema() + \"_\" + getUser() + \"_sql.schxmi\");\n\t\tSystem.out.println(\"Generating backends/\" + getDb() + \"/\" + getSchema() + \"_\" + getUser() + \"_sql.schxmi\");\n\t\tstartProcess();\n\t\t\n\t\tCollection classes = getXJavaDoc().getSourceClasses();\n\t\tfor (ClassIterator i = XCollections.classIterator(classes); i.hasNext();) {\n\t\t\tXClass clazz = i.next();\n\t\t\t//System.out.print(\">> \" + clazz.getName());\n\t\t\t// check tag ejb:persistence + sub tag table-name\n\t\t\tXTag tag = clazz.getDoc().getTag(\"ejb:persistence\");\n\t\t\tif (tag != null) {\n\t\t\t\tString tableName = tag.getAttributeValue(\"table-name\");\n\t\t\t\t//System.out.println(\"ejb:persistence table-name = '\" + tableName + \"'\");\n\t\t\t\tString destinationFileName = \"backends/\" + getDb() + \"/\" + getSchema() + \"_\" + getUser() + \"_sql_\" + tableName + \".tblxmi\";\n\t\t\t\tSystem.out.println(\"Generating \" + destinationFileName);\n\t\t\t\t\n\t\t\t\tsetTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_TBLXMI_TEMPLATE_FILE));\n\t\t\t\tsetDestinationFile(destinationFileName);\n\t\t\t\tsetHavingClassTag(\"ejb:persistence\");\n\t\t\t\tsetCurrentClass(clazz);\n\t\t\t\tstartProcess();\n\t\t\t}\n\t\t\t// Now, check for relationships \n\t\t\tfor (Iterator methods = clazz.getMethods().iterator(); methods.hasNext();) {\n\t\t\t\tXMethod method = (XMethod)methods.next();\n\t\t\t\tif (method.getDoc().hasTag(\"websphere:relation\")) {\n\t\t\t\t\tString tableName = method.getDoc().getTagAttributeValue(\"websphere:relation\",\"table-name\");\n\t\t\t\t\tsetTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_RELATIONSHIP_TBLXMI_TEMPLATE_FILE));\n\t\t\t\t\tString destinationFileName = \"backends/\" + getDb() + \"/\" + getSchema() + \"_\" + getUser() + \"_sql_\" + tableName + \".tblxmi\";\n\t\t\t\t\tsetDestinationFile(destinationFileName);\n\t\t\t\t\tsetCurrentClass(clazz);\n\t\t\t\t\tsetCurrentMethod(method);\n\t\t\t\t\tSystem.out.println(\"\\tGenerating M-M Relationship table: \" + destinationFileName);\n\t\t\t\t\tstartProcess();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\t\n\n\t\t}\n\n/*\n if (atLeastOneCmpEntityBeanExists()) {\n setTemplateURL(getClass().getResource(WEBSPHERE_SCHEMA_TEMPLATE_FILE));\n setDestinationFile(WEBSPHERE_DD_SCHEMA_FILE_NAME);\n startProcess();\n }\n*/\n }",
"public void createAllTeachersCopies(String filename) {\r\n \r\n // create a pdf\r\n Document document = new Document(PageSize.A4,5,5,20,40);\r\n \r\n try {\r\n \r\n String sql = \"SELECT * FROM teachercopy\";\r\n pstmt = con.prepareStatement(sql);\r\n rs=pstmt.executeQuery();\r\n \r\n Font bfBold12 = new Font(Font.FontFamily.TIMES_ROMAN, 11, Font.BOLD, BaseColor.BLACK);\r\n Font bfBold = new Font(Font.FontFamily.TIMES_ROMAN, 11);\r\n \r\n PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(filename));\r\n HeaderFooterPageEvent event = new HeaderFooterPageEvent();\r\n writer.setPageEvent(event);\r\n \r\n document.open();\r\n addMetaData(document);\r\n \r\n //school info\r\n Paragraph intro = new Paragraph(\"\"+schoolName+\"\\n\"\r\n + \"\"+schoolAddress+\" \"+ schoolRegion+\"\\n\"\r\n + \"Website: \"+ schoolWebsite+\"\\n\"\r\n + \"All teacher copies as at \"+ LocalDate.now() +\"\\n\\r\",bfBold12);\r\n intro.setAlignment(Element.ALIGN_CENTER); \r\n document.add(intro);\r\n \r\n \r\n \r\n // Add a table\r\n float[] columnWidths = {2.3f,2f,2.5f,1f,2f,1f};\r\n PdfPTable issuedBookTable = new PdfPTable(columnWidths);\r\n issuedBookTable.setWidthPercentage(90f);\r\n \r\n insertCell(issuedBookTable, \"Book ID\", Element.ALIGN_LEFT, 1, bfBold12); \r\n insertCell(issuedBookTable, \"Subject\", Element.ALIGN_LEFT, 1, bfBold12);\r\n insertCell(issuedBookTable, \"Title\", Element.ALIGN_LEFT, 1, bfBold12);\r\n insertCell(issuedBookTable, \"Class\", Element.ALIGN_LEFT, 1, bfBold12);\r\n insertCell(issuedBookTable, \"Publisher\", Element.ALIGN_LEFT, 1, bfBold12);\r\n insertCell(issuedBookTable, \"Issued?\", Element.ALIGN_LEFT, 1, bfBold12);\r\n \r\n while (rs.next()) {\r\n String bookID = rs.getString(\"book_id\");\r\n insertCell(issuedBookTable, bookID, Element.ALIGN_LEFT, 1, bfBold);\r\n \r\n String subject = rs.getString(\"book_subject\");\r\n insertCell(issuedBookTable, subject, Element.ALIGN_LEFT, 1, bfBold); \r\n \r\n String title = rs.getString(\"book_title\");\r\n insertCell(issuedBookTable, title, Element.ALIGN_LEFT, 1, bfBold);\r\n \r\n String classbook = rs.getString(\"book_class\");\r\n insertCell(issuedBookTable, classbook, Element.ALIGN_LEFT, 1, bfBold);\r\n \r\n String publisher = rs.getString(\"book_publisher\");\r\n insertCell(issuedBookTable, publisher, Element.ALIGN_LEFT, 1, bfBold);\r\n \r\n boolean iaAvail = rs.getBoolean(\"book_isAvail\");\r\n String available = null;\r\n if (iaAvail) {\r\n available = \"No\";\r\n } else {\r\n available = \"Yes\";\r\n }\r\n insertCell(issuedBookTable, available, Element.ALIGN_LEFT, 1, bfBold);\r\n \r\n \r\n }\r\n \r\n document.add(issuedBookTable);\r\n \r\n document.close();\r\n pstmt.close();\r\n \r\n \r\n } catch (DocumentException | FileNotFoundException ex) {\r\n Logger.getLogger(ReportPrintingController.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (SQLException ex) { \r\n Logger.getLogger(ReportPrintingController.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n \r\n }",
"@SneakyThrows\n private void pdfReport() {\n NotificationUtil.warningAlert(\"Warning\", \"Nothing to export\", NotificationUtil.SHORT);\n ServiceFactory.getPdfService().projectReport(table.getItems());\n }",
"public static void main(String[] args) {\n\t\tDocument pdfDocument = new Document(\"input.pdf\");\n\t\tString outHtmlFile = \"resultant.html\";\n\t\t// Create HtmlSaveOption with tested feature\n\t\tHtmlSaveOptions saveOptions = new HtmlSaveOptions();\n\t\tsaveOptions.setFixedLayout(true);\n\t\t// save images in PNG format instead of SVG\n\t\tsaveOptions.RasterImagesSavingMode = HtmlSaveOptions.RasterImagesSavingModes.AsEmbeddedPartsOfPngPageBackground;\n\t\t// save output as HTML\n\t\tpdfDocument.save(outHtmlFile, saveOptions);\n\t}",
"public void crearPDF()\r\n\t{\r\n\t\tif (!new File(ruta).exists())\r\n\t\t\t(new File(ruta)).mkdirs();\r\n\r\n\t\tFile[] files = (new File(ruta)).listFiles();\r\n\t\tString ruta = \"\";\r\n\t\tif (files.length == 0) {\r\n\t\t\truta = this.ruta + huesped + \"0\" + \".pdf\";\r\n\t\t} else {\r\n\t\t\tString path = files[files.length - 1].getAbsolutePath();\r\n\t\t\tString num = path.substring(path.length() - 5, path.length() - 4);\r\n\r\n\t\t\truta = this.ruta + huesped + (Integer.parseInt(num) + 1) + \".pdf\";\r\n\t\t}\r\n\r\n\t\tSimpleDateFormat formato = new SimpleDateFormat(\"dd/MM/YYYY\");\r\n\t\t\r\n\t\tcabecera = \"\\n\"+\"Resonance Home\" + \"\\n\"+ \r\n \"Armenia, Quindio\" + \"\\n\" + \r\n \"Colombia\" + \"\\n\\n\" + \r\n\t\t\t\t\"Fecha \" + reserva.getFecha().toString() + \"\\n\\n\\n\";\r\n\t\tcontenido = \"Reserva de hospedaje: \"+ reserva.getHospedaje().getId() + \"\\n\" + \r\n \t\"Titulo del Hospedaje: \" + reserva.getHospedaje().getTitulo() + \" \" + \"\\n\" +\r\n \t\"Dirección: \" + reserva.getHospedaje().getDireccion().getDireccion() + \", \" + reserva.getHospedaje().getDireccion().toString() + \"\\n\" +\r\n\t\t\t\t\"Anfitrion: \" + nombreAnfitrion + \"\\n\" + \"Correo: \" + emailAnfitrion + \"\\n\\n\\n\" + \"Huesped: \"\r\n\t\t\t\t+ nombreHuesped + \"\\n\" +\r\n \t\"Metodo de pago: \" + reserva.getTarjeta().getNumeroT() + \" Tarjeta de credito\" + \"\\n\\n\" +\r\n \tformato.format(reserva.getFechaInicial()) + \" hasta \"+ formato.format(reserva.getFechaFinal()) +\"\\n\\n\" +\r\n \t\"Descripcion\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalor\" + \"\\n\\n\" + \r\n\t\t\t\t\"Huespedes\" + \"\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"\r\n\t\t\t\t+ reserva.getNumeroHuespedes() + \"\\n\" +\r\n\t\t\t\t\"Alojamiento\" + \"\t\t\t\t\t\t\t\t\t\t\t\t\t \" + precioCompleto + \"\\n\"\r\n\t\t\t\t+ \"Tarifa de limpieza\" + \"\t\t\t\t \t \" + precioLimpieza + \"\\n\" + \"Comision por servicio\"\r\n\t\t\t\t+ \"\t\t\t\t\t\" + precioComision + \"\\n\\n\";\r\n\t\tpiePagina = \"TOTAL \" + \" \" + \"$ \" + reserva.getValor() + \"\\n\" ;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tFileOutputStream archivo = new FileOutputStream(ruta);\r\n\t\t\tDocument doc = new Document(PageSize.A5, 10, 10, 10, 10);\r\n\t\t\tPdfWriter.getInstance(doc, archivo);\r\n\t\t\tdoc.open();\r\n\t\t\tdoc.add(obtenerCabecera(cabecera));\r\n\t\t\tdoc.add(obtenerContenido(contenido));\r\n\t\t\tdoc.add(obtenerPiePagina(piePagina));\r\n\t\t\tdoc.close();\r\n\t\t\tthis.ruta = ruta;\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tSystem.out.println(\"\" + e);\r\n\t\t}\r\n\r\n\t}",
"public void foreachPSorPDFinInputPath(ParameterHelper _aParam)\n {\n // TODO: auslagern in eine function, die ein Interface annimmt.\n String sInputPath = _aParam.getInputPath();\n File aInputPath = new File(sInputPath);\n// if (!aInputPath.exists())\n// {\n// GlobalLogWriter.println(\"Error, InputPath or File in InputPath doesn't exists. Please check: '\" + sInputPath + \"'\");\n// assure(\"Error, InputPath or File in InputPath doesn't exists. Please check: '\" + sInputPath + \"'\", false);\n// }\n if (aInputPath.isDirectory())\n {\n // check a whole directory\n // a whole directory\n FileFilter aFileFilter = FileHelper.getFileFilterPSorPDF();\n traverseDirectory(aFileFilter, _aParam);\n }\n else\n {\n // the inputpath contains a file\n if (sInputPath.toLowerCase().endsWith(\".ini\"))\n {\n IniFile aIniFile = new IniFile(_aParam.getInputPath());\n while (aIniFile.hasMoreElements())\n {\n String sKey = (String)aIniFile.nextElement();\n String sPath = FileHelper.getPath(_aParam.getInputPath());\n String sEntry = FileHelper.appendPath(sPath, sKey);\n File aFile = new File(sEntry);\n assure(\"File '\" + sEntry + \"' doesn't exists.\", aFile.exists(), true);\n if (aFile.exists())\n {\n callEntry(sEntry, _aParam);\n }\n }\n }\n else\n {\n // call for a single pdf/ps file\n if (sInputPath.toLowerCase().endsWith(\".ps\") ||\n sInputPath.toLowerCase().endsWith(\".pdf\") ||\n sInputPath.toLowerCase().endsWith(\".prn\"))\n {\n callEntry(sInputPath, _aParam);\n }\n else\n {\n String sInputPathWithPDF = sInputPath + \".pdf\";\n File aInputPathWithPDF = new File(sInputPathWithPDF);\n\n if (aInputPathWithPDF.exists() &&\n _aParam.getReferenceType().toLowerCase().equals(\"pdf\"))\n {\n // create PDF only if a pdf file exists and creatortype is set to PDF\n callEntry(sInputPathWithPDF, _aParam);\n }\n else\n {\n String sInputPathWithPS = sInputPath + \".ps\";\n \n File aInputPathWithPS = new File(sInputPathWithPS);\n if (aInputPathWithPS.exists())\n {\n callEntry(sInputPathWithPS, _aParam);\n }\n else\n {\n String sPath = FileHelper.getPath(sInputPath);\n String sBasename = FileHelper.getBasename(sInputPath);\n\n // there exist an index file, therefore we assume the given\n // file is already converted to postscript or pdf\n runThroughEveryReportInIndex(sPath, sBasename, _aParam);\n }\n }\n }\n }\n }\n }",
"@FXML\n\tpublic void generarPDFClick(ActionEvent event) {\n\t\tString htmlContent = this.examen.getTitolHtml()+this.examen.getEnunciatHtml()+System.lineSeparator();\n\n\t\tPdfManager manager;\n\t\ttry {\n\t\t\tmanager = new PdfManager(\"Examen.pdf\");\n\n\t\t\tmanager.generarPDF( htmlContent );\n\n\t\t\tFile pdfGenerat = new File(\"Examen.pdf\");\n\n\t\t\tHostServices hostServices = Model.getInstance().getApp().getHostServices();\n\t hostServices.showDocument(pdfGenerat.getAbsolutePath());\n\n\t\t} catch (Excepcio e) {\n\t\t\t//e.printStackTrace();\n\t\t MenuController.mostrarError(\"Examen a PDF\", \"Error generant el document. \"+e.getMessage());\n\t\t}\n\t}",
"public static void main(String[] args) throws IOException {\n\n int[] h = new int[26];\n\n// String[] hItems = scanner.nextLine().split(\" \");\n// scanner.skip(\"(\\r\\n|[\\n\\r\\u2028\\u2029\\u0085])?\");\n\n// for (int i = 0; i < 26; i++) {\n// int hItem = Integer.parseInt(hItems[i]);\n// h[i] = hItem;\n// }\n h[0] = 1;\n h[1] = 3;\n h[2] = 1;\n h[3] = 3;\n h[4] = 1;\n h[5] = 4;\n h[6] = 1;\n h[7] = 3;\n h[8] = 2;\n h[9] = 5;\n h[10] = 5;\n h[11] = 5;\n h[12] = 5;\n h[13] = 5;\n h[14] = 5;\n h[15] = 5;\n h[16] = 5;\n h[17] = 5;\n h[18] = 5;\n h[19] = 5;\n h[20] = 5;\n h[21] = 5;\n h[22] = 5;\n h[23] = 5;\n h[24] = 5;\n h[25] = 7;\n\n\n String word = \"zaba\";\n\n int result = designerPdfViewer(h, word);\n\n// bufferedWriter.write(String.valueOf(result));\n// bufferedWriter.newLine();\n//\n// bufferedWriter.close();\n\n// scanner.close();\n }",
"@Override\r\n\tpublic File createPDF() {\n\t\treturn null;\r\n\t}",
"protected void addTitlePage(Document doc) throws Exception {\n \n \t\tdoc.add(new Paragraph(\"\\n\\n\\n\\n\"));\r\t\t\t\n // data dictionary\n Font font = FontFactory.getFont(FontFactory.HELVETICA_BOLD, 22);\n \t\tParagraph prg = new Paragraph(\"Data Dictionary\", font);\n prg.setAlignment(Element.ALIGN_CENTER);\n doc.add(prg);\n \n doc.add(new Paragraph(\"\\n\\n\\n\\n\\n\\n\\n\\n\\n\"));\n \n // full definition\n font = FontFactory.getFont(FontFactory.HELVETICA_BOLD, 14);\n prg = new Paragraph(\"Definition of\", font);\n prg.setAlignment(Element.ALIGN_CENTER);\n doc.add(prg);\n \n // dataset name\n font = FontFactory.getFont(FontFactory.HELVETICA_BOLD, 26);\n prg = new Paragraph(dsName, font);\n \t\tprg.setAlignment(Element.ALIGN_CENTER);\n \t\tdoc.add(prg);\n \t\t\n \t\t// dataset word\n font = FontFactory.getFont(FontFactory.HELVETICA, 14);\n \t\tprg = new Paragraph(\"dataset\", font);\n prg.setAlignment(Element.ALIGN_CENTER);\n doc.add(prg);\n \n \t\tdoc.add(new Paragraph(\"\\n\\n\"));\n \t\t\n \t\t// version\n \t\tprg = new Paragraph();\n \t\tprg.add(new Chunk(\"Version: \", font));\n \t\tprg.add(new Chunk(dsVersion, font));\n \t\tprg.setAlignment(Element.ALIGN_CENTER);\n \t\tdoc.add(prg);\n \t\t\n \t\t// date\n \t\t//prg = new Paragraph(getTitlePageDate());\n \t\t//prg.setAlignment(Element.ALIGN_CENTER);\n \t\t//doc.add(prg);\n \n doc.add(new Paragraph(\"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\"));\n \n // European Environment Agency\n font = FontFactory.getFont(FontFactory.TIMES_BOLD, 12);\n prg = new Paragraph(\"European Environment Agency\", font);\n prg.setAlignment(Element.ALIGN_CENTER);\n \n if (!Util.voidStr(logo)){\n Image img = Image.getInstance(logo);\n img.setAlignment(Image.LEFT);\n \n prg.add(new Chunk(img, 0, 0));\n }\n \n doc.add(prg);\n }",
"private void generatePdf(){\n drawContent();\n\n itemList.clear(); //clear the temporary list of number of items\n\n // clear the form\n AddedItem = 0;\n\n EditText[] AllText = { pay1, pay2, detail1, detail2, item, qty, price, Remark };\n for (EditText e: AllText)\n e.setText(\"\");\n\n items = findViewById(R.id.itemAdded);\n items.setText(\"Item Added: \");\n }",
"public static void main(String[] args) {\n\t\tDocument html = new HtmlDocument();\n\t\thtml.open();\n\t\thtml.close();\n\n\t\tDocument pdf = new PdfDocument();\n\t\tpdf.open();\n\t\tpdf.close();\n\t}",
"public PDF()\n {\n \n i_hdl = create_Handler();\n }",
"public void nuevoReporteVentasCiudad(ArrayList<Producto> Datos) throws IOException {\n Document documento = null;\r\n try {\r\n //Direccion root\r\n FileOutputStream ficheroPdf = new FileOutputStream(\"C:\\\\Users\\\\panle\\\\Documents\\\\ReporteVentasCiudad.pdf\");\r\n //FileOutputStream ficheroPdf = new FileOutputStream(\"user.dir/tmp\", \"ReporteProductos.pdf\");\r\n //File tempfile = new File(\"user.dir/tmp\", \"tempfile.txt\"); \r\n documento = new Document();\r\n // Se asocia el documento al OutputStream y se indica que el espaciado entre\r\n // lineas sera de 20. Esta llamada debe hacerse antes de abrir el documento\r\n PdfWriter.getInstance(documento, ficheroPdf).setInitialLeading(20);\r\n\r\n // Se abre el documento\r\n documento.open();\r\n documento.add(new Paragraph(\"REPORTE VENTAS POR CIUDAD\",\r\n FontFactory.getFont(\"ARIAL\", // fuente\r\n 16, // tamaño\r\n Font.ITALIC, // estilo\r\n BaseColor.BLACK))); // color\r\n\r\n PdfPTable tabla = new PdfPTable(3);//#campos(columnas) para la tabla\r\n Font font = new Font(FontFamily.COURIER, 6, Font.BOLD, BaseColor.BLACK);\r\n PdfPCell cell = new PdfPCell(new Phrase(\"Celdas\", font));\r\n\r\n documento.add(new Paragraph(\"\\n\"));\r\n\r\n Image img = Image.getInstance(\"C:\\\\Users\\\\logo.png\");\r\n documento.add(img);\r\n documento.add(new Paragraph(\"\\n\"));\r\n\r\n int conta = 0;\r\n\r\n cell.setBorder(Rectangle.TITLE);\r\n tabla.addCell(\"DESCRIPCION\");\r\n tabla.addCell(\"REFERENCIA\");\r\n tabla.addCell(\"TIPO\");\r\n\r\n while (conta < Datos.size()) {\r\n cell.setBorder(Rectangle.NO_BORDER);\r\n tabla.addCell(Datos.get(conta).getDESCRIPCION());\r\n tabla.addCell(Datos.get(conta).getREFERENCIA());\r\n tabla.addCell(Datos.get(conta).getTIPO());\r\n conta++;\r\n }\r\n\r\n documento.add(tabla);\r\n documento.close();\r\n\r\n } catch (FileNotFoundException | DocumentException e) {\r\n System.out.println(\"Error al generar Reporte Productos, por:\");\r\n e.printStackTrace();\r\n }\r\n }",
"private void createPdf(String name, String date, String address, String price) {\r\n Calendar calanderInstance = Calendar.getInstance();\r\n SimpleDateFormat currentDate = new SimpleDateFormat(\"MM dd,yyyy\");\r\n String mdate = currentDate.format(calanderInstance.getTime());\r\n String html = \"<!doctype html>\\n\" +\r\n \"<html lang=\\\"en\\\">\\n\" +\r\n \" <head>\\n\" +\r\n \" <title>Title</title>\\n\" +\r\n \" <!-- Required meta tags -->\\n\" +\r\n \" <meta charset=\\\"utf-8\\\">\\n\" +\r\n \" <meta name=\\\"viewport\\\" content=\\\"width=device-width, initial-scale=1, shrink-to-fit=no\\\">\\n\" +\r\n \"\\n\" +\r\n \" <!-- Bootstrap CSS -->\\n\" +\r\n \" <link rel=\\\"stylesheet\\\" href=\\\"https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css\\\" integrity=\\\"sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T\\\" crossorigin=\\\"anonymous\\\">\\n\" +\r\n \" </head>\\n\" +\r\n \" <body>\\n\" +\r\n \" <div class=\\\"container\\\">\\n\" +\r\n \" <h2 class=\\\" text-center\\\">Invoice</h2>\\n\" +\r\n \" <h5 class=\\\"text-center\\\">Designer Club Order History </h5>\\n\" +\r\n \" <h3 >\" + name + \"</h3>\\n\" +\r\n \" <P>Service Details and shipped status</p>\\n\" +\r\n \" <div class=\\\"container row\\\">\\n\" +\r\n \" <p style=\\\"font-weight:bold; margin-right:10px;\\\">Date:</p><p>\" + mdate + \"</p>\\n\" +\r\n \" </div>\\n\" +\r\n \" <table class=\\\"table table-bordered table-sm table-striped m-10px\\\">\\n\" +\r\n \" <thead class=\\\"thead-inverse\\\">\\n\" +\r\n \" <tr>\\n\" +\r\n \" <th>Order Date</th>\\n\" +\r\n \" <th>Address</th>\\n\" +\r\n \" <th>Shipped Status</th>\\n\" +\r\n \" <th>Shipped Date</th>\\n\" +\r\n \" <th>Payment</th>\\n\" +\r\n \" </tr>\\n\" +\r\n \" </thead>\\n\" +\r\n \" <tbody>\\n\" +\r\n \" <tr>\\n\" +\r\n \" <td>\" + date + \"</td>\\n\" +\r\n \" <td>\" + address + \"</td>\\n\" +\r\n \" <td>\" + shippedStatus + \"</td>\\n\" +\r\n \" <td>\" + shippedDate + \"</td>\\n\" +\r\n \" <td>Cash On delevary</td>\\n\" +\r\n \" </tr>\\n\" +\r\n \" </tbody>\\n\" +\r\n \" </table>\\n\" +\r\n \" \\n\" +\r\n \" <h4 class=\\\"text-right\\\" style=\\\"font-weight:bold;\\\">Total</h4>\\n\" +\r\n \" <h4 class=\\\"text-right\\\">\" + price + \"</h4>\\n\" +\r\n \" \\n\" +\r\n \" </div>\\n\" +\r\n \" <!-- Optional JavaScript -->\\n\" +\r\n \" <!-- jQuery first, then Popper.js, then Bootstrap JS -->\\n\" +\r\n \" <script src=\\\"https://code.jquery.com/jquery-3.3.1.slim.min.js\\\" integrity=\\\"sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo\\\" crossorigin=\\\"anonymous\\\"></script>\\n\" +\r\n \" <script src=\\\"https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js\\\" integrity=\\\"sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1\\\" crossorigin=\\\"anonymous\\\"></script>\\n\" +\r\n \" <script src=\\\"https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js\\\" integrity=\\\"sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM\\\" crossorigin=\\\"anonymous\\\"></script>\\n\" +\r\n \" </body>\\n\" +\r\n \"</html>\";\r\n webView.loadDataWithBaseURL(null, html, \"text/html\", \"utf-8\", null);\r\n }",
"public void foreachResultCreateHTML(ParameterHelper _aParam)\n {\n // TODO: auslagern in eine function, die ein Interface annimmt.\n String sInputPath = _aParam.getInputPath();\n File aInputPath = new File(sInputPath);\n// if (!aInputPath.exists())\n// {\n// GlobalLogWriter.println(\"Error, InputPath or File in InputPath doesn't exists. Please check: '\" + sInputPath + \"'\");\n// assure(\"Error, InputPath or File in InputPath doesn't exists. Please check: '\" + sInputPath + \"'\", false);\n// }\n\n // call for a single ini file\n if (sInputPath.toLowerCase().endsWith(\".ini\") )\n {\n callEntry(sInputPath, _aParam);\n }\n else\n {\n // check if there exists an ini file\n String sPath = FileHelper.getPath(sInputPath); \n String sBasename = FileHelper.getBasename(sInputPath);\n\n runThroughEveryReportInIndex(sPath, sBasename, _aParam);\n \n // Create a HTML page which shows locally to all files in .odb\n if (sInputPath.toLowerCase().endsWith(\".odb\"))\n {\n String sIndexFile = FileHelper.appendPath(sPath, \"index.ini\");\n File aIndexFile = new File(sIndexFile);\n if (aIndexFile.exists())\n { \n IniFile aIniFile = new IniFile(sIndexFile);\n\n if (aIniFile.hasSection(sBasename))\n {\n // special case for odb files\n int nFileCount = aIniFile.getIntValue(sBasename, \"reportcount\", 0);\n ArrayList<String> aList = new ArrayList<String>();\n for (int i=0;i<nFileCount;i++)\n {\n String sValue = aIniFile.getValue(sBasename, \"report\" + i);\n\n String sPSorPDFName = getPSorPDFNameFromIniFile(aIniFile, sValue);\n if (sPSorPDFName.length() > 0)\n {\n aList.add(sPSorPDFName);\n }\n }\n if (aList.size() > 0)\n {\n // HTML output for the odb file, shows only all other documents.\n HTMLResult aOutputter = new HTMLResult(sPath, sBasename + \".ps.html\" );\n aOutputter.header(\"content of DB file: \" + sBasename);\n aOutputter.indexSection(sBasename);\n \n for (int i=0;i<aList.size();i++)\n {\n String sPSFile = aList.get(i);\n\n // Read information out of the ini files\n String sIndexFile2 = FileHelper.appendPath(sPath, sPSFile + \".ini\");\n IniFile aIniFile2 = new IniFile(sIndexFile2);\n String sStatusRunThrough = aIniFile2.getValue(\"global\", \"state\");\n String sStatusMessage = \"\"; // aIniFile2.getValue(\"global\", \"info\");\n aIniFile2.close();\n\n\n String sHTMLFile = sPSFile + \".html\";\n aOutputter.indexLine(sHTMLFile, sPSFile, sStatusRunThrough, sStatusMessage);\n }\n aOutputter.close();\n\n// String sHTMLFile = FileHelper.appendPath(sPath, sBasename + \".ps.html\");\n// try\n// {\n//\n// FileOutputStream out2 = new FileOutputStream(sHTMLFile);\n// PrintStream out = new PrintStream(out2);\n//\n// out.println(\"<HTML>\");\n// out.println(\"<BODY>\");\n// for (int i=0;i<aList.size();i++)\n// {\n// // <A href=\"link\">blah</A>\n// String sPSFile = (String)aList.get(i);\n// out.print(\"<A href=\\\"\");\n// out.print(sPSFile + \".html\");\n// out.print(\"\\\">\");\n// out.print(sPSFile);\n// out.println(\"</A>\");\n// out.println(\"<BR>\");\n// }\n// out.println(\"</BODY></HTML>\");\n// out.close();\n// out2.close();\n// }\n// catch (java.io.IOException e)\n// {\n// \n// }\n }\n }\n aIniFile.close();\n }\n\n }\n }\n }",
"public void createPdf(String filename)\n throws SQLException, DocumentException, IOException {\n \t// Create a database connection\n DatabaseConnection connection = new HsqldbConnection(\"filmfestival\");\n // step 1\n Document document = new Document(PageSize.A4.rotate());\n // step 2\n PdfWriter.getInstance(document, new FileOutputStream(filename));\n // step 3\n document.open();\n // step 4\n document.add(getTable(connection));\n // step 5\n document.close();\n // close the database connection\n connection.close();\n }",
"public void createTeachersCopiesIssued(String filename) {\r\n \r\n // create a pdf\r\n Document document = new Document(PageSize.A4,5,5,20,40);\r\n \r\n try {\r\n \r\n String sql = \"SELECT * FROM teachercopy WHERE book_isAvail = false \";\r\n pstmt = con.prepareStatement(sql);\r\n rs=pstmt.executeQuery();\r\n \r\n Font bfBold12 = new Font(Font.FontFamily.TIMES_ROMAN, 11, Font.BOLD, BaseColor.BLACK);\r\n Font bfBold = new Font(Font.FontFamily.TIMES_ROMAN, 11);\r\n \r\n PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(filename));\r\n HeaderFooterPageEvent event = new HeaderFooterPageEvent();\r\n writer.setPageEvent(event);\r\n \r\n document.open();\r\n addMetaData(document);\r\n \r\n //school info\r\n Paragraph intro = new Paragraph(\"\"+schoolName+\"\\n\"\r\n + \"\"+schoolAddress+\" \"+ schoolRegion+\"\\n\"\r\n + \"Website: \"+ schoolWebsite+\"\\n\"\r\n + \"Issued teacher copies as at \"+ LocalDate.now() +\"\\n\\r\",bfBold12);\r\n intro.setAlignment(Element.ALIGN_CENTER); \r\n document.add(intro);\r\n \r\n \r\n \r\n // Add a table\r\n float[] columnWidths = {2.3f,2f,2.5f,1f,2f,2f};\r\n PdfPTable issuedBookTable = new PdfPTable(columnWidths);\r\n issuedBookTable.setWidthPercentage(90f);\r\n \r\n insertCell(issuedBookTable, \"Book ID\", Element.ALIGN_LEFT, 1, bfBold12); \r\n insertCell(issuedBookTable, \"Subject\", Element.ALIGN_LEFT, 1, bfBold12);\r\n insertCell(issuedBookTable, \"Title\", Element.ALIGN_LEFT, 1, bfBold12);\r\n insertCell(issuedBookTable, \"Class\", Element.ALIGN_LEFT, 1, bfBold12);\r\n insertCell(issuedBookTable, \"Publisher\", Element.ALIGN_LEFT, 1, bfBold12);\r\n insertCell(issuedBookTable, \"Issued To\", Element.ALIGN_LEFT, 1, bfBold12);\r\n \r\n while (rs.next()) {\r\n String bookID = rs.getString(\"book_id\");\r\n insertCell(issuedBookTable, bookID, Element.ALIGN_LEFT, 1, bfBold);\r\n \r\n String subject = rs.getString(\"book_subject\");\r\n insertCell(issuedBookTable, subject, Element.ALIGN_LEFT, 1, bfBold); \r\n \r\n String title = rs.getString(\"book_title\");\r\n insertCell(issuedBookTable, title, Element.ALIGN_LEFT, 1, bfBold);\r\n \r\n String classbook = rs.getString(\"book_class\");\r\n insertCell(issuedBookTable, classbook, Element.ALIGN_LEFT, 1, bfBold);\r\n \r\n String publisher = rs.getString(\"book_publisher\");\r\n insertCell(issuedBookTable, publisher, Element.ALIGN_LEFT, 1, bfBold);\r\n \r\n String issuedTo = rs.getString(\"teacher_issued\");\r\n insertCell(issuedBookTable, issuedTo, Element.ALIGN_LEFT, 1, bfBold);\r\n \r\n \r\n }\r\n \r\n document.add(issuedBookTable);\r\n \r\n document.close();\r\n pstmt.close();\r\n \r\n \r\n } catch (DocumentException | FileNotFoundException ex) {\r\n Logger.getLogger(ReportPrintingController.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (SQLException ex) { \r\n Logger.getLogger(ReportPrintingController.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n \r\n }",
"@SuppressWarnings(\"unused\")\n private void generateInfo()\n {\n }",
"public void postProcessPDF(Object document) throws IOException, BadElementException, DocumentException {\n Document pdf = (Document) document;\n\n pdf.add(new Paragraph(\"\\n Total cost: $\" + getTotal()));\n\n ServletContext servletContext = (ServletContext) FacesContext.getCurrentInstance().getExternalContext().getContext();\n String theguy = servletContext.getRealPath(\"\") + File.separator + \"resources\" + File.separator + \"img\" + File.separator + \"theguy.png\";\n\n pdf.add(Image.getInstance(theguy));\n\n pdf.close();\n }",
"private void generateIdfOutput()\n{\n getValidWords();\n scanDocuments();\n outputResults();\n}",
"public void onCreatePdf(View view) {\n\n\t\t// Images used in the PDF should be JPG images, stored as Assets\n\t\tbyte[] stickerBmp = Pdf.getAssetJpgBytes(this, JPG_SRC);\n\n\t\t// Create a new PDF\n\t\tPdf pdf = new Pdf();\n\t\tStream stream = pdf.addPage();\n\n\t\t// Add some text at a specific position\n\t\t// The coordinate system is setup where the origin (0,0) is at the\n\t\t// bottom left corner\n\t\tstream.addText(\"This is a test pdf.\", PDF_HEADER_FONT_SIZE, 100, 50, RED);\n\n\t\t// Add some text with a different color\n\t\tstream.addText(userText.getText().toString(), BLUE, PDF_HEADER_FONT_SIZE);\n\n\t\t// Add a line with a color and a width\n\t\tstream.addHorizontalLine(GREEN, LINE_WIDTH);\n\n\t\t// Add an image at a specific coordinate (top right corner of the page)\n\t\tstream.addBmpImage(Pages.PAGE_WIDTH - (int) Stream.MARGIN_HORIZONTAL - JPG_WIDTH, Pages.PAGE_HEIGHT - (int) Stream.MARGIN_VERTICAL - JPG_HEIGHT,\n\t\t\t\tJPG_WIDTH, JPG_HEIGHT, stickerBmp);\n\n\t\t// Get the raw PDF bytes like this:\n\t\tbyte[] pdfBytes = pdf.getPDF();\n\n\t\t// Optionally, write the bytes out to a file:\n\t\tFile file = Pdf.writePdf(this, pdfBytes, PDF_PDFNAME);\n\n\t\t// Show the PDF in an external viewer\n\t\tIntent intent = new Intent(Intent.ACTION_VIEW);\n\t\tUri uri = Uri.fromFile(file);\n\t\tintent.setDataAndType(uri, MIME_TYPE_PDF);\n\t\tstartActivity(intent);\n\n\t}",
"private void addMetaData() {\r\n\t\tdocument.open();\r\n\t\tdocument.addTitle(\"My first PDF\");\r\n\t\tdocument.addSubject(\"Using iText\");\r\n\t\tdocument.addKeywords(\"Java, PDF, iText\");\r\n\t\tdocument.addAuthor(\"Lars Vogel\");\r\n\t\tdocument.addCreator(\"Lars Vogel\");\r\n\t\tdocument.close();\r\n\t}",
"public static void main(String args[]) throws IOException {\n\t File file = new File(\"fdpModification.pdf\");\n\t PDDocument document = PDDocument.load(file);\n\n\t //Retrieving the pages of the document\n\t PDPage page = document.getPage(1);\n\t PDPageContentStream contentStream = new PDPageContentStream(document, page);\n\n\t //Begin the Content stream\n\t contentStream.beginText();\n\t contentStream.moveTextPositionByAmount(7, 105);\n\t contentStream.setFont(PDType1Font.HELVETICA, 12);\n\t contentStream.drawString(\"Normal text and \");\n\t contentStream.setFont(PDType1Font.HELVETICA_BOLD, 12);\n\t contentStream.drawString(\"bold text\");\n\t contentStream.moveTextPositionByAmount(0, -25);\n\t contentStream.setFont(PDType1Font.HELVETICA_OBLIQUE, 12);\n\t contentStream.drawString(\"Italic text and \");\n\t contentStream.setFont(PDType1Font.HELVETICA_BOLD_OBLIQUE, 12);\n\t contentStream.drawString(\"bold italic text\");\n\t contentStream.endText();\n\n\t contentStream.setLineWidth(.5f);\n\n\t contentStream.beginText();\n\t contentStream.moveTextPositionByAmount(7, 55);\n\t contentStream.setFont(PDType1Font.HELVETICA, 12);\n\t contentStream.drawString(\"Normal text and \");\n\t contentStream.appendRawCommands(\"2 Tr\\n\");\n\t contentStream.drawString(\"artificially bold text\");\n\t contentStream.appendRawCommands(\"0 Tr\\n\");\n\t contentStream.moveTextPositionByAmount(0, -25);\n\t contentStream.appendRawCommands(\"1 Tr\\n\");\n\t contentStream.drawString(\"Artificially outlined text\");\n\t contentStream.appendRawCommands(\"0 Tr\\n\");\n\t contentStream.setTextMatrix(1, 0, .2f, 1, 7, 5);\n\t contentStream.drawString(\"Artificially italic text and \");\n\t contentStream.appendRawCommands(\"2 Tr\\n\");\n\t contentStream.drawString(\"bold italic text\");\n\t contentStream.appendRawCommands(\"0 Tr\\n\");\n\t //Setting the font to the Content streamt\n\t contentStream.setFont(PDType1Font.TIMES_ROMAN, 12);\n\n\t //Setting the position for the line\n\t contentStream.newLineAtOffset(0, 0);\n\n //Setting the leading\n contentStream.setLeading(14.5f);\n\n //Setting the position for the line\n contentStream.newLineAtOffset(25, 725);\n\n String text1 = \"This is an example of adding text to a page in the pdf document. we can add as many lines\";\n String text2 = \"as we want like this using the ShowText() method of the ContentStream class\";\n\n //Adding text in the form of string\n contentStream. showText(text1);\n contentStream.newLine();\n contentStream. showText(text2);\n //Ending the content stream\n contentStream.endText();\n\n System.out.println(\"Content added\");\n\n //Closing the content stream\n contentStream.close();\n\n //Saving the document\n document.save(new File(\"newtou.pdf\"));\n\n //Closing the document\n document.close();\n }",
"public void createIssuedBooksToTeachers(String filename) {\r\n \r\n // create a pdf\r\n Document document = new Document(PageSize.A4,5,5,20,40);\r\n \r\n try {\r\n \r\n String sql = \"SELECT * FROM teacherissued\";\r\n pstmt = con.prepareStatement(sql);\r\n rs=pstmt.executeQuery();\r\n \r\n Font bfBold12 = new Font(Font.FontFamily.TIMES_ROMAN, 11, Font.BOLD, BaseColor.BLACK);\r\n Font bfBold = new Font(Font.FontFamily.TIMES_ROMAN, 11);\r\n \r\n PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(filename));\r\n HeaderFooterPageEvent event = new HeaderFooterPageEvent();\r\n writer.setPageEvent(event);\r\n \r\n document.open();\r\n addMetaData(document);\r\n \r\n //school info\r\n Paragraph intro = new Paragraph(\"\"+schoolName+\"\\n\"\r\n + \"\"+schoolAddress+\" \"+ schoolRegion+\"\\n\"\r\n + \"Website: \"+ schoolWebsite+\"\\n\"\r\n + \"Issued books to teachers as at \"+ LocalDate.now() +\"\\n\\r\",bfBold12);\r\n intro.setAlignment(Element.ALIGN_CENTER); \r\n document.add(intro);\r\n \r\n // Add a table\r\n float[] columnWidths = {1f,2f,1.5f,2f,1f,1.8f,2f};\r\n PdfPTable issuedBookTable = new PdfPTable(columnWidths);\r\n issuedBookTable.setWidthPercentage(90f);\r\n \r\n insertCell(issuedBookTable, \"Tch. ID\", Element.ALIGN_LEFT, 1, bfBold12); \r\n insertCell(issuedBookTable, \"Tch. Name\", Element.ALIGN_LEFT, 1, bfBold12);\r\n insertCell(issuedBookTable, \"Subject\", Element.ALIGN_LEFT, 1, bfBold12);\r\n insertCell(issuedBookTable, \"Book title\", Element.ALIGN_LEFT, 1, bfBold12);\r\n insertCell(issuedBookTable, \"Class\", Element.ALIGN_LEFT, 1, bfBold12);\r\n insertCell(issuedBookTable, \"Issued Qnty\", Element.ALIGN_MIDDLE, 1, bfBold12);\r\n insertCell(issuedBookTable, \"Date Issued\", Element.ALIGN_LEFT, 1, bfBold12);\r\n \r\n while (rs.next()) {\r\n String bookID = rs.getString(\"teacher_ID\");\r\n insertCell(issuedBookTable, bookID, Element.ALIGN_LEFT, 1, bfBold);\r\n \r\n String subject = rs.getString(\"teacher_name\");\r\n insertCell(issuedBookTable, subject, Element.ALIGN_LEFT, 1, bfBold); \r\n \r\n String title = rs.getString(\"book_subject\");\r\n insertCell(issuedBookTable, title, Element.ALIGN_LEFT, 1, bfBold);\r\n \r\n String classbook = rs.getString(\"book_title\");\r\n insertCell(issuedBookTable, classbook, Element.ALIGN_LEFT, 1, bfBold);\r\n \r\n String publisher = rs.getString(\"book_class\");\r\n insertCell(issuedBookTable, publisher, Element.ALIGN_LEFT, 1, bfBold);\r\n \r\n int qnty = rs.getInt(\"quantity_issued\"); \r\n insertCell(issuedBookTable, String.valueOf(qnty), Element.ALIGN_LEFT, 1, bfBold);\r\n \r\n String date = rs.getString(\"date_issued\");\r\n insertCell(issuedBookTable, date, Element.ALIGN_LEFT, 1, bfBold);\r\n \r\n \r\n }\r\n \r\n document.add(issuedBookTable);\r\n \r\n document.close();\r\n pstmt.close();\r\n \r\n \r\n } catch (DocumentException | FileNotFoundException ex) {\r\n Logger.getLogger(ReportPrintingController.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (SQLException ex) { \r\n Logger.getLogger(ReportPrintingController.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n \r\n }",
"@Override\n\tprotected void buildPdfDocument(Map<String, Object> model, Document document, PdfWriter writer,\n\t\t\tHttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\tSystem.out.println(\"At PDFBuilder\");\n // List<Item> itemDisplayList = (List<Item>) model.get(\"itemList\");\n \n document.add(new Paragraph(\"Items Available\"));\n \n PdfPTable table = new PdfPTable(5);\n table.setWidthPercentage(100.0f);\n table.setWidths(new float[] {3.0f, 2.0f, 2.0f, 2.0f, 1.0f});\n table.setSpacingBefore(10);\n \n \n // define font for table header row\n Font font = FontFactory.getFont(FontFactory.HELVETICA);\n font.setColor(BaseColor.WHITE);\n \n // define table header cell\n PdfPCell cell = new PdfPCell();\n cell.setBackgroundColor(BaseColor.BLUE);\n cell.setPadding(5);\n \n /* for (Item aItem : itemDisplayList) {\n \ttable.addCell(String.valueOf(aItem.getId()));\n table.addCell(aItem.getItem_name());\n }\n */\n System.out.println(\"At PDFBuilder2\");\n document.add(table);\n\t}",
"public void gerarRelatorioMedico() {\n Document documento = new Document(PageSize.A4.rotate());\n \n //Defina as margens\n documento.setMargins(40f, 40f, 150f, 40f);\n \n try {\n CabecalhoRodapeEvento inserircabecalho = new CabecalhoRodapeEvento();\n \n //Cria um arquivo relatorio.pdf com o documento\n PdfWriter.getInstance(documento, new FileOutputStream(\"relatorioMedico.pdf\")).setPageEvent(inserircabecalho);\n \n documento.open();\n \n Paragraph tituloDoRelatorio = new Paragraph(new Phrase(20F, \"RELATÓRIO DOS MÉDICOS CADASTRADOS\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 15F)));\n tituloDoRelatorio.setAlignment(Element.ALIGN_CENTER);\n\n documento.add(tituloDoRelatorio);\n \n Table tabelaMedicos = new Table(6);\n tabelaMedicos.setBorder(10);\n tabelaMedicos.setBorderWidth(2);\n tabelaMedicos.setBorderColor(Color.black);\n tabelaMedicos.setPadding(2);\n //tabelaMedicos.setSpacing(0);\n tabelaMedicos.setWidth(100f);\n tabelaMedicos.setWidths(new float[]{10f, 30f, 20f, 10f, 15f, 15f});\n \n Paragraph paragrafoCrm = new Paragraph(new Phrase(12F, \"CRM\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 10F)));\n paragrafoCrm.setAlignment(Element.ALIGN_CENTER);\n \n Paragraph paragrafoNome = new Paragraph(new Phrase(12F, \"NOME\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 10F)));\n paragrafoNome.setAlignment(Element.ALIGN_CENTER);\n \n Paragraph paragrafoEspecialidade = new Paragraph(new Phrase(12F, \"ESPECIALIDADE\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 10F)));\n paragrafoEspecialidade.setAlignment(Element.ALIGN_CENTER);\n \n Paragraph paragrafoSexo = new Paragraph(new Phrase(12F, \"SEXO\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 10F)));\n paragrafoSexo.setAlignment(Element.ALIGN_CENTER);\n \n Paragraph paragrafoSalario = new Paragraph(new Phrase(12F, \"SALARIO\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 10F)));\n paragrafoSalario.setAlignment(Element.ALIGN_CENTER);\n \n Paragraph paragrafoDataNascimento = new Paragraph(new Phrase(12F, \"DATA NASCIMENTO\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 10F)));\n paragrafoDataNascimento.setAlignment(Element.ALIGN_CENTER);\n \n Cell celulaMedicoCrm = new Cell(paragrafoCrm);\n Cell celulaMedicoNome = new Cell(paragrafoNome);\n Cell celulaMedicoEspecialidade = new Cell(paragrafoEspecialidade);\n Cell celulaMedicoSexo = new Cell(paragrafoSexo);\n Cell celulaMedicoSalario = new Cell(paragrafoSalario);\n Cell celulaMedicoDataNascimento = new Cell(paragrafoDataNascimento);\n \n celulaMedicoCrm.setHeader(true);\n tabelaMedicos.addCell(celulaMedicoCrm);\n tabelaMedicos.addCell(celulaMedicoNome);\n tabelaMedicos.addCell(celulaMedicoEspecialidade);\n tabelaMedicos.addCell(celulaMedicoSexo);\n tabelaMedicos.addCell(celulaMedicoSalario);\n tabelaMedicos.addCell(celulaMedicoDataNascimento);\n \n //definindo alinhamento, cores do cabeçalho da tabela\n for (int i = 0; i < tabelaMedicos.getColumns(); i++) {\n\n Cell celula = (Cell) tabelaMedicos.getElement(0, i);\n celula.setHorizontalAlignment(Element.ALIGN_CENTER);\n celula.setBackgroundColor(Color.yellow);\n celula.setBorderColor(Color.black);\n\n }\n \n for(Medico medico : listarTodosMedicos()) {\n paragrafoCrm = new Paragraph(new Phrase(15F, \"\"+ medico.getCRM(),\n FontFactory.getFont(FontFactory.HELVETICA, 9F)));\n paragrafoCrm.setAlignment(Element.ALIGN_CENTER);\n celulaMedicoCrm = new Cell(paragrafoCrm);\n celulaMedicoCrm.setBorderColor(Color.black);\n celulaMedicoCrm.setHorizontalAlignment(Element.ALIGN_CENTER);\n tabelaMedicos.addCell(celulaMedicoCrm);\n \n paragrafoNome = new Paragraph(new Phrase(15F, \"\"+ medico.getNome(),\n FontFactory.getFont(FontFactory.HELVETICA, 9F)));\n paragrafoNome.setAlignment(Element.ALIGN_CENTER);\n celulaMedicoNome = new Cell(paragrafoNome);\n celulaMedicoNome.setBorderColor(Color.black);\n celulaMedicoNome.setHorizontalAlignment(Element.ALIGN_LEFT);\n tabelaMedicos.addCell(celulaMedicoNome);\n \n paragrafoEspecialidade = new Paragraph(new Phrase(15F, \"\"+ medico.getEspecialidade(),\n FontFactory.getFont(FontFactory.HELVETICA, 9F)));\n paragrafoEspecialidade.setAlignment(Element.ALIGN_CENTER);\n celulaMedicoEspecialidade = new Cell(paragrafoEspecialidade);\n celulaMedicoEspecialidade.setBorderColor(Color.black);\n celulaMedicoEspecialidade.setHorizontalAlignment(Element.ALIGN_CENTER);\n tabelaMedicos.addCell(celulaMedicoEspecialidade);\n \n paragrafoSexo = new Paragraph(new Phrase(15F, \"\"+ medico.getSexo(),\n FontFactory.getFont(FontFactory.HELVETICA, 9F)));\n paragrafoSexo.setAlignment(Element.ALIGN_CENTER);\n celulaMedicoSexo = new Cell(paragrafoSexo);\n celulaMedicoSexo.setBorderColor(Color.black);\n celulaMedicoSexo.setHorizontalAlignment(Element.ALIGN_CENTER);\n tabelaMedicos.addCell(celulaMedicoSexo);\n \n paragrafoSalario = new Paragraph(new Phrase(15F, \"R$ \"+ medico.getSalario(),\n FontFactory.getFont(FontFactory.HELVETICA, 9F)));\n paragrafoSalario.setAlignment(Element.ALIGN_CENTER);\n celulaMedicoSalario = new Cell(paragrafoSalario);\n celulaMedicoSalario.setBorderColor(Color.black);\n celulaMedicoSalario.setHorizontalAlignment(Element.ALIGN_CENTER);\n tabelaMedicos.addCell(celulaMedicoSalario);\n \n paragrafoDataNascimento = new Paragraph(new Phrase(15F, \"\"+ sdf.format(medico.getDataDeNascimento()),\n FontFactory.getFont(FontFactory.HELVETICA, 9F)));\n paragrafoDataNascimento.setAlignment(Element.ALIGN_CENTER);\n celulaMedicoDataNascimento = new Cell(paragrafoDataNascimento);\n celulaMedicoDataNascimento.setBorderColor(Color.black);\n celulaMedicoDataNascimento.setHorizontalAlignment(Element.ALIGN_CENTER);\n tabelaMedicos.addCell(celulaMedicoDataNascimento);\n \n } \n \n documento.add(tabelaMedicos);\n \n Runtime.getRuntime().exec(new String[]{\"cmd.exe\", \"/c\", \"start\", \"relatorioMedico.pdf\"});\n \n documento.close();\n \n } catch (DocumentException ex) {\n System.out.println(ex);\n } catch (FileNotFoundException ex) {\n System.out.println(ex);\n } catch (IOException ex) {\n System.out.println(ex);\n } catch (SQLException ex) {\n System.out.println(ex);\n }\n }",
"public static void main(String[] args) throws IOException {\n\r\n int[] h = new int[26];\r\n\r\n String[] hItems = scanner.nextLine().split(\" \");\r\n scanner.skip(\"(\\r\\n|[\\n\\r\\u2028\\u2029\\u0085])?\");\r\n\r\n for (int i = 0; i < 26; i++) {\r\n int hItem = Integer.parseInt(hItems[i]);\r\n h[i] = hItem;\r\n }\r\n\r\n String word = scanner.nextLine();\r\n\r\n int result = designerPdfViewer(h, word);\r\n\r\n System.out.println(result);\r\n //bufferedWriter.write(String.valueOf(result));\r\n //bufferedWriter.newLine();\r\n\r\n //bufferedWriter.close();\r\n\r\n scanner.close();\r\n }",
"public void buildSectionOne(Document document) throws DocumentException, IOException, JSONException {\n PdfPTable titleTable = new PdfPTable ( 1 );\n titleTable.setWidthPercentage ( 100 );\n\n // Strategy\n titleTable.addCell ( ReportTemplate.getSectionHeaderCell ( \"Featured Strategy: \" + selectedStrategy ) );\n\n /**\n * @changed - Abhishek\n * @date - 11-02-2016\n * @desc - Applied format of $xxx,xxx\n */\n // Estimate Income\n titleTable.addCell ( ReportTemplate.getSectionSubHeaderCellWithBoxBorder ( \"Estimated Income: $\" + estimatedIncome ) );\n\n document.add ( titleTable );\n\n // Add Charts Now\n PdfPTable contentTable = new PdfPTable ( 2 );\n contentTable.setWidthPercentage ( 100 );\n\n // Create 3d Pie Chart Section\n PdfPCell pieChartSectionCell = ReportTemplate.getBoxBorderCell ();\n pieChartSectionCell.addElement ( getPieChartSection () );\n contentTable.addCell ( pieChartSectionCell );\n\n // Create Bar Chart Section\n PdfPCell barChartSectionCell = ReportTemplate.getBoxBorderCell ();\n barChartSectionCell.addElement ( getResourceManagementTable () );\n contentTable.addCell ( barChartSectionCell );\n document.add ( contentTable );\n //document.newPage();\n\n PdfPTable contentTable2 = new PdfPTable ( 2 );\n contentTable2.setWidthPercentage ( 100 );\n\n // Add Risk Management Section\n PdfPCell riskManagementSectionCell = ReportTemplate.getBoxBorderWithoutLeftPaddingCell ();\n riskManagementSectionCell.addElement ( getRiskManagementTable () );\n contentTable2.addCell ( riskManagementSectionCell );\n\n // Add Conservation Management Section\n\n Paragraph conservationParagraph = new Paragraph ();\n\n conservationParagraph.add ( new Chunk ( \"Conservation Management\\n\\n\", ReportTemplate.TIMESROMAN_12_BOLD ) );\n conservationParagraph.add ( new Chunk ( \"Conservation Goals\\n\", ReportTemplate.TIMESROMAN_10_NORMAL) );\n /**\n * @changed - Abhishek\n * @date - 12-12-2015\n * @updated - 11-01-2016\n */\n ReportDataPage1.ConservationPracticeBean conservationBean = reportDataPage1.getLandUnderConservationPractice ();\n\n /**\n * @changed - Abhishek\n * @updated - 11-01-2016\n */\n conservationParagraph.add ( new Chunk ( AgricultureStandardUtils.doubleWithOneDecimal( Double.parseDouble (conservationBean.getProfitFromConservation () ) ) + \" % Est. Income under conservation practices\\n\" +\n AgricultureStandardUtils.doubleWithOneDecimal( Double.parseDouble (conservationBean.getLandUnderConservation () ) ) + \" % Acreage under conservation practices\", ReportTemplate.TIMESROMAN_10_NORMAL ) );\n\n PdfPCell conservationManagementSectionCell = ReportTemplate.getBoxBorderWithoutLeftPaddingCell ();\n conservationManagementSectionCell.addElement ( conservationParagraph );\n contentTable2.addCell ( conservationManagementSectionCell );\n\n contentTable2.setKeepTogether(true);\n document.add ( contentTable2 );\n\n\n /*getIncomeUnderConservationPractice(farmInfoView);*/\n\n }",
"public void nuevoReporteProductos(ArrayList<Producto> Datos) throws IOException {\n Document documento = null;\r\n try {\r\n //Direccion root\r\n FileOutputStream ficheroPdf = new FileOutputStream(\"C:\\\\Users\\\\panle\\\\Documents\\\\ReporteProductos.pdf\");\r\n //FileOutputStream ficheroPdf = new FileOutputStream(\"user.dir/tmp\", \"ReporteProductos.pdf\");\r\n //File tempfile = new File(\"user.dir/tmp\", \"tempfile.txt\"); \r\n documento = new Document();\r\n // Se asocia el documento al OutputStream y se indica que el espaciado entre\r\n // lineas sera de 20. Esta llamada debe hacerse antes de abrir el documento\r\n PdfWriter.getInstance(documento, ficheroPdf).setInitialLeading(20);\r\n\r\n // Se abre el documento\r\n documento.open();\r\n documento.add(new Paragraph(\"REPORTE PRODUCTOS\",\r\n FontFactory.getFont(\"ARIAL\", // fuente\r\n 16, // tamaño\r\n Font.ITALIC, // estilo\r\n BaseColor.BLACK))); // color\r\n\r\n PdfPTable tabla = new PdfPTable(3);//#campos(columnas) para la tabla\r\n Font font = new Font(FontFamily.COURIER, 6, Font.BOLD, BaseColor.BLACK);\r\n PdfPCell cell = new PdfPCell(new Phrase(\"Celdas\", font));\r\n\r\n documento.add(new Paragraph(\"\\n\"));\r\n\r\n Image img = Image.getInstance(\"C:\\\\Users\\\\logo.png\");\r\n documento.add(img);\r\n documento.add(new Paragraph(\"\\n\"));\r\n\r\n int conta = 0;\r\n\r\n cell.setBorder(Rectangle.TITLE);\r\n tabla.addCell(\"DESCRIPCION\");\r\n tabla.addCell(\"REFERENCIA\");\r\n tabla.addCell(\"TIPO\");\r\n\r\n while (conta < Datos.size()) {\r\n cell.setBorder(Rectangle.NO_BORDER);\r\n tabla.addCell(Datos.get(conta).getDESCRIPCION());\r\n tabla.addCell(Datos.get(conta).getREFERENCIA());\r\n tabla.addCell(Datos.get(conta).getTIPO());\r\n conta++;\r\n }\r\n\r\n documento.add(tabla);\r\n documento.close();\r\n\r\n } catch (FileNotFoundException | DocumentException e) {\r\n System.out.println(\"Error al generar Reporte Productos, por:\");\r\n e.printStackTrace();\r\n }\r\n }",
"public static void main(String[] args) {\n\t\tString path = \"Test1.pdf\";\n\t\t\n\n\t}",
"private void createPdf()\n {\n Document document = new Document();\n try {\n String path = Environment.getExternalStorageDirectory().getAbsolutePath()+\"/Meal Counter\";\n File directory = new File(path);\n if(!directory.exists())\n directory.mkdir();\n\n File file = new File(directory,sharedPreferenceData.getmyCurrentSession()+\".pdf\");\n reportPath = file.getAbsolutePath();\n FileOutputStream fileOutputStream = new FileOutputStream(file);\n PdfWriter.getInstance(document,fileOutputStream);\n document.setPageSize(PageSize.A4);\n document.open();\n Paragraph paragraph;\n Font smallFont = new Font(Font.FontFamily.TIMES_ROMAN,22.0f,Font.NORMAL, BaseColor.BLACK);\n Font largeFont = new Font(Font.FontFamily.TIMES_ROMAN,30.0f,Font.BOLD, BaseColor.BLACK);\n paragraph = new Paragraph(\"Session : #\"+sharedPreferenceData.getmyCurrentSession()+\"\\n\\n\"+\n \"Total Taka ------ \"+monthlyTaka+\"\\n\"+\n \"Total Meal ------ \"+monthlyMeal+\"\\n\"+\n \"Total Cost ------ \"+monthlyCost+\"\\n\"+\n \"Remain ------ \"+remain+\"\\n\"+\n \"Meal rate ------ \"+mealRate+\"\\n\\n\\n\",largeFont);\n paragraph.setAlignment(Paragraph.ALIGN_CENTER);\n //document.add(paragraph);\n\n float[] columnWidth = {6f,9f,9f,9f,9f,9f};\n PdfPTable table = new PdfPTable(columnWidth);\n table.setWidthPercentage(90f);\n\n insertDataIntoTable(table,\"Serial\", Element.ALIGN_CENTER,1,smallFont);\n insertDataIntoTable(table,\"Name\", Element.ALIGN_CENTER,1,smallFont);\n insertDataIntoTable(table,\"Taka\", Element.ALIGN_CENTER,1,smallFont);\n insertDataIntoTable(table,\"Meal\", Element.ALIGN_CENTER,1,smallFont);\n insertDataIntoTable(table,\"Cost\", Element.ALIGN_CENTER,1,smallFont);\n insertDataIntoTable(table,\"Status\", Element.ALIGN_CENTER,1,smallFont);\n table.setHeaderRows(1);\n\n for(int i=0;i<modelList.size();i++)\n {\n insertDataIntoTable(table,String.valueOf(i+1),Element.ALIGN_CENTER,1,smallFont);\n insertDataIntoTable(table,modelList.get(i).getId(),Element.ALIGN_CENTER,1,smallFont);\n insertDataIntoTable(table,modelList.get(i).getTaka(),Element.ALIGN_CENTER,1,smallFont);\n insertDataIntoTable(table,modelList.get(i).getName(),Element.ALIGN_CENTER,1,smallFont);\n insertDataIntoTable(table,modelList.get(i).getDate(),Element.ALIGN_CENTER,1,smallFont);\n insertDataIntoTable(table,modelList.get(i).getStatus(),Element.ALIGN_CENTER,1,smallFont);\n }\n\n paragraph.add(table);\n document.add(paragraph);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (DocumentException e) {\n e.printStackTrace();\n }finally {\n document.close();\n\n }\n }",
"public void gerarRelatorioPaciente() {\n Document documento = new Document(PageSize.A4.rotate());\n \n //Defina as margens\n documento.setMargins(40f, 40f, 150f, 40f);\n \n try {\n CabecalhoRodapeEvento inserircabecalho = new CabecalhoRodapeEvento();\n \n //Cria um arquivo relatorio.pdf com o documento\n PdfWriter.getInstance(documento, new FileOutputStream(\"relatorioPaciente.pdf\")).setPageEvent(inserircabecalho);\n \n documento.open();\n \n Paragraph tituloDoRelatorio = new Paragraph(new Phrase(20F, \"RELATÓRIO DOS PACIENTES CADASTRADOS\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 15F)));\n tituloDoRelatorio.setAlignment(Element.ALIGN_CENTER);\n\n documento.add(tituloDoRelatorio);\n \n Table tabelaPacientes = new Table(7);\n tabelaPacientes.setBorder(10);\n tabelaPacientes.setBorderWidth(2);\n tabelaPacientes.setBorderColor(Color.black);\n tabelaPacientes.setPadding(2);\n //tabelaPacientes.setSpacing(0);\n tabelaPacientes.setWidth(100f);\n tabelaPacientes.setWidths(new float[]{5f, 10f, 25f, 7f, 13f, 28f, 12f});\n \n Paragraph paragrafoId = new Paragraph(new Phrase(12F, \"ID\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 10F)));\n paragrafoId.setAlignment(Element.ALIGN_CENTER);\n \n Paragraph paragrafoCpf = new Paragraph(new Phrase(12F, \"CPF\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 10F)));\n paragrafoCpf.setAlignment(Element.ALIGN_CENTER);\n \n Paragraph paragrafoNome = new Paragraph(new Phrase(12F, \"NOME\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 10F)));\n paragrafoNome.setAlignment(Element.ALIGN_CENTER);\n \n Paragraph paragrafoSexo = new Paragraph(new Phrase(12F, \"SEXO\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 10F)));\n paragrafoSexo.setAlignment(Element.ALIGN_CENTER);\n \n Paragraph paragrafoTelefone = new Paragraph(new Phrase(12F, \"TELEFONE\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 10F)));\n paragrafoTelefone.setAlignment(Element.ALIGN_CENTER);\n \n Paragraph paragrafoEndereco = new Paragraph(new Phrase(12F, \"ENDEREÇO\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 10F)));\n paragrafoEndereco.setAlignment(Element.ALIGN_CENTER);\n \n Paragraph paragrafoDataNascimento = new Paragraph(new Phrase(12F, \"DATA NASCIMENTO\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 10F)));\n paragrafoDataNascimento.setAlignment(Element.ALIGN_CENTER);\n \n Cell celulaPacienteId = new Cell(paragrafoId);\n Cell celulaPacienteCpf = new Cell(paragrafoCpf);\n Cell celulaPacienteNome = new Cell(paragrafoNome);\n Cell celulaPacienteSexo = new Cell(paragrafoSexo);\n Cell celulaPacienteTelefone = new Cell(paragrafoTelefone);\n Cell celulaPacienteEndereco = new Cell(paragrafoEndereco);\n Cell celulaPacienteDataNascimento = new Cell(paragrafoDataNascimento);\n \n celulaPacienteId.setHeader(true);\n tabelaPacientes.addCell(celulaPacienteId);\n tabelaPacientes.addCell(celulaPacienteCpf);\n tabelaPacientes.addCell(celulaPacienteNome);\n tabelaPacientes.addCell(celulaPacienteSexo);\n tabelaPacientes.addCell(celulaPacienteTelefone);\n tabelaPacientes.addCell(celulaPacienteEndereco);\n tabelaPacientes.addCell(celulaPacienteDataNascimento);\n \n //definindo alinhamento, cores do cabeçalho da tabela\n for (int i = 0; i < tabelaPacientes.getColumns(); i++) {\n\n Cell celula = (Cell) tabelaPacientes.getElement(0, i);\n celula.setHorizontalAlignment(Element.ALIGN_CENTER);\n celula.setBackgroundColor(Color.yellow);\n celula.setBorderColor(Color.black);\n\n }\n \n for(Paciente paciente : listarTodosPacientes()) {\n paragrafoId = new Paragraph(new Phrase(15F, \"\"+ paciente.getId(),\n FontFactory.getFont(FontFactory.HELVETICA, 9F)));\n paragrafoId.setAlignment(Element.ALIGN_CENTER);\n celulaPacienteId = new Cell(paragrafoId);\n celulaPacienteId.setBorderColor(Color.black);\n celulaPacienteId.setHorizontalAlignment(Element.ALIGN_CENTER);\n tabelaPacientes.addCell(celulaPacienteId);\n \n paragrafoCpf = new Paragraph(new Phrase(15F, \"\"+ paciente.getCpf(),\n FontFactory.getFont(FontFactory.HELVETICA, 9F)));\n paragrafoCpf.setAlignment(Element.ALIGN_CENTER);\n celulaPacienteCpf = new Cell(paragrafoCpf);\n celulaPacienteCpf.setBorderColor(Color.black);\n celulaPacienteCpf.setHorizontalAlignment(Element.ALIGN_CENTER);\n tabelaPacientes.addCell(celulaPacienteCpf);\n \n paragrafoNome = new Paragraph(new Phrase(15F, \"\"+ paciente.getNome(),\n FontFactory.getFont(FontFactory.HELVETICA, 9F)));\n paragrafoNome.setAlignment(Element.ALIGN_CENTER);\n celulaPacienteNome = new Cell(paragrafoNome);\n celulaPacienteNome.setBorderColor(Color.black);\n celulaPacienteNome.setHorizontalAlignment(Element.ALIGN_LEFT);\n tabelaPacientes.addCell(celulaPacienteNome);\n \n paragrafoSexo = new Paragraph(new Phrase(15F, \"\"+ paciente.getSexo(),\n FontFactory.getFont(FontFactory.HELVETICA, 9F)));\n paragrafoSexo.setAlignment(Element.ALIGN_CENTER);\n celulaPacienteSexo = new Cell(paragrafoSexo);\n celulaPacienteSexo.setBorderColor(Color.black);\n celulaPacienteSexo.setHorizontalAlignment(Element.ALIGN_CENTER);\n tabelaPacientes.addCell(celulaPacienteSexo);\n \n paragrafoTelefone = new Paragraph(new Phrase(15F, paciente.getTelefone(),\n FontFactory.getFont(FontFactory.HELVETICA, 9F)));\n paragrafoTelefone.setAlignment(Element.ALIGN_CENTER);\n celulaPacienteTelefone = new Cell(paragrafoTelefone);\n celulaPacienteTelefone.setBorderColor(Color.black);\n celulaPacienteTelefone.setHorizontalAlignment(Element.ALIGN_CENTER);\n tabelaPacientes.addCell(celulaPacienteTelefone);\n \n paragrafoEndereco = new Paragraph(new Phrase(15F, paciente.getEndereco(),\n FontFactory.getFont(FontFactory.HELVETICA, 9F)));\n paragrafoEndereco.setAlignment(Element.ALIGN_CENTER);\n celulaPacienteEndereco = new Cell(paragrafoEndereco);\n celulaPacienteEndereco.setBorderColor(Color.black);\n celulaPacienteEndereco.setHorizontalAlignment(Element.ALIGN_CENTER);\n tabelaPacientes.addCell(celulaPacienteEndereco);\n \n paragrafoDataNascimento = new Paragraph(new Phrase(15F, \"\"+ sdf.format(paciente.getDataDeNascimento()),\n FontFactory.getFont(FontFactory.HELVETICA, 9F)));\n paragrafoDataNascimento.setAlignment(Element.ALIGN_CENTER);\n celulaPacienteDataNascimento = new Cell(paragrafoDataNascimento);\n celulaPacienteDataNascimento.setBorderColor(Color.black);\n celulaPacienteDataNascimento.setHorizontalAlignment(Element.ALIGN_CENTER);\n tabelaPacientes.addCell(celulaPacienteDataNascimento);\n \n } \n \n documento.add(tabelaPacientes);\n \n Runtime.getRuntime().exec(new String[]{\"cmd.exe\", \"/c\", \"start\", \"relatorioPaciente.pdf\"});\n \n documento.close();\n \n } catch (DocumentException ex) {\n System.out.println(ex);\n } catch (FileNotFoundException ex) {\n System.out.println(ex);\n } catch (IOException ex) {\n System.out.println(ex);\n } catch (SQLException ex) {\n System.out.println(ex);\n }\n }",
"@Override\r\n\tpublic boolean writeDocument(Collection<IDataHandler> datas, Document document, PdfWriter writer,\r\n\t\t\tProgressBarFrame pBFrame) throws Exception {\n\t\tdocument.open();\r\n\t\t\r\n\t\t// Creation de la BaseFfont par defaut\r\n\t BaseFont basefont = BaseFont.createFont(BaseFont.HELVETICA, BaseFont.CP1252, BaseFont.EMBEDDED);\r\n\t\t// Creation de la Font concrete\r\n\t Font baseConcreteFont = new Font (basefont, 12, Font.NORMAL);\r\n\t \r\n\t\t// On creer un Iterator pour les donnees\r\n\t\tIterator<IDataHandler> datasIterator = datas.iterator();\r\n\t\t\r\n\t\t// On obtient le progres courant de la ProgressBar\r\n\t\tint counter = pBFrame.getProgress();\r\n\t\t\r\n\t\t// On definit le nombre d'increment pour la ProgressBar en fonction du nombre de donnee et de son degre d'avancement prealable\r\n\t\tint progressIncrement = ProgressBarFrame.MY_MAXIMUM - counter / datas.size();\r\n\t\t\r\n\t\t// On itere sur les parties\r\n\t\twhile (datasIterator.hasNext()) {\r\n\t\t\t\r\n\t\t\t// La partie courante\r\n\t\t\tIDataHandler currentDataPart = datasIterator.next();\r\n\t\t\t// L'iterator sur les donnees de la partie courante\r\n\t\t\tIterator<Collection<Object>> currentPartIter = currentDataPart.getDataStorage().iterator();\r\n\t\t\t\r\n\t\t\t// L'Iterator sur les types de donnees\r\n\t\t\tIterator<Object> datasTypeIter = currentPartIter.next().iterator();\r\n\t\t\t// L'Iterator sur les donnes\r\n\t\t\tIterator<Object> datasIter = currentPartIter.next().iterator();\r\n\t\t\t\r\n\t\t\t// On creer un paragraphe\r\n\t\t\tParagraph para = new Paragraph();\r\n\t\t\t\r\n\t\t\t// On ajoute le titre du paragraphe\r\n\t\t\tpara.add(new Phrase(currentDataPart.getPartTitle(), baseConcreteFont));\r\n\t\t\t// On ajoute une nouvelle ligne\r\n\t\t\tpara.add(Chunk.NEWLINE);\r\n\t\t\t\r\n\t\t\t// Tous ce qui releve des tableaux est une tentative de mise en page a l'aide de tableau mais c'est un echec\r\n\t\t\t// On cree un tableau a 2 colonnes : titre donnee\r\n\t\t\t//PdfPTable table = new PdfPTable(2);\r\n\t\t\t// On enleve les bordures (ne fonctionne pas mais bon...)\r\n\t\t\t//table.getDefaultCell().setBorder(Rectangle.NO_BORDER);\r\n\t\t\t\r\n\t\t\t/*\r\n\t\t\t// On creer des float pour determiner la largeur que doivent prendre les colonnes\r\n\t\t\tfloat[] tableCellsWidths = new float[] {0f, 0f};\r\n\t\t\t\r\n\t\t\t// On creer un tableau de cellules a ajoute a la fin\r\n\t\t\tArrayList<PdfPCell> tableCells = new ArrayList<PdfPCell>();\r\n\t\t\t*/\r\n\t\t\t\r\n\t\t\t// On itere sur le type de donne\r\n\t\t\twhile (datasTypeIter.hasNext()) {\r\n\t\t\t\r\n\t\t\t\tswitch ((IDataHandler.DataType)datasTypeIter.next()) {\r\n\t\t\t\t\t// Si c'est une String\r\n\t\t\t\t\tcase STRING:\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// On obtient le titre\r\n\t\t\t\t\t\t/*String stringTitle = (String)datasIter.next();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// On calcul sa largeur pour la mise en page\r\n\t\t\t\t\t\tfloat titleWidth = baseConcreteFont.getCalculatedBaseFont(true).getWidthPoint(stringTitle, baseConcreteFont.getCalculatedSize()); \r\n\t\t\t\t\t\tif (titleWidth > tableCellsWidths[0]) {\r\n\t\t\t\t\t\t\ttableCellsWidths[0] = titleWidth;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// On ajoute le titre dans la premiere colonne\r\n\t\t\t\t\t\tPdfPCell title = new PdfPCell(new Phrase (stringTitle, baseConcreteFont));\r\n\t\t\t\t\t\t// On enleve les bordures\r\n\t\t\t\t\t\ttitle.setBorder(Rectangle.NO_BORDER);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\ttableCells.add(title);\r\n\t\r\n\t\t\t\t\t\t// On obtient la donnee correspondante\r\n\t\t\t\t\t\tString stringData = (String)datasIter.next();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// On calcul sa largeur pour la mise en page\r\n\t\t\t\t\t\tfloat dataWidth = baseConcreteFont.getCalculatedBaseFont(true).getWidthPoint(stringData, baseConcreteFont.getCalculatedSize()); \r\n\t\t\t\t\t\tif (dataWidth > tableCellsWidths[1]) {\r\n\t\t\t\t\t\t\ttableCellsWidths[1] = dataWidth;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Puis on met la valeur dans la seconde colonne\r\n\t\t\t\t\t\tPdfPCell stringDataCell = new PdfPCell(new Phrase (stringData, baseConcreteFont));\r\n\t\t\t\t\t\t// On enleve les bordures\r\n\t\t\t\t\t\tstringDataCell.setBorder(Rectangle.NO_BORDER);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\ttableCells.add(stringDataCell);\r\n\t\t\t\t\t\t*/\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// On ajoute le titre de la donnee\r\n\t\t\t\t\t\tpara.add(new Phrase ((String)datasIter.next(), baseConcreteFont));\r\n\t\t\t\t\t\t// Puis on ajoute la donnee\r\n\t\t\t\t\t\tpara.add(new Phrase ((String)datasIter.next(), baseConcreteFont));\r\n\t\t\t\t\t\t// Enfin on ajoute un saut de ligne\r\n\t\t\t\t\t\tpara.add(Chunk.NEWLINE);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t// Si c'est un graphe\r\n\t\t\t\t\tcase JFREECHART :\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// On obtient le PdfContentByte du PdfWriter\r\n\t\t\t\t\t\tPdfContentByte contentByte = writer.getDirectContent();\r\n\t\t\t\t\t\t// A partir de ca, on cree un PdfTemplate avec les tailles de l'instance\r\n\t\t\t PdfTemplate template = contentByte.createTemplate(chartWidth, chartHeight);\r\n\t\t\t \r\n\t\t\t // On crer l'objet Graphics2D dans le template qui en prend toute la place\r\n\t\t\t\t\t\tGraphics2D graphics2d = new PdfGraphics2D(template, chartWidth, chartHeight);\r\n\t\t\t \r\n\t\t\t\t\t\t// On crer un Rectangle2D avec la bonne taille\r\n\t\t\t java.awt.geom.Rectangle2D rectangle2d = new java.awt.geom.Rectangle2D.Double(0, 0, chartWidth,\r\n\t\t\t \t\tchartHeight);\r\n\t\t\t \r\n\t\t\t // On obtient le graphe\r\n\t\t\t JFreeChart chart = (JFreeChart) datasIter.next();\r\n\t\t\t // On le dessine dans le rectangle a l'interieur du Graphics2D\r\n\t\t\t chart.draw(graphics2d, rectangle2d);\r\n\t\t\t \r\n\t\t\t // On libere la memoire du Graphics2D\r\n\t\t\t graphics2d.dispose();\r\n\t\t\t \r\n\t\t\t // On obtient un objet Image a partir du template\r\n\t\t\t Image chartImage = Image.getInstance(template);\r\n\t\t\t \r\n\t\t\t // Que l'on peut ajouter normalement dans le Paragraphe\r\n\t\t\t para.add(chartImage);\r\n\t\t\t // Enfin on ajoute un saut de ligne\r\n\t\t\t para.add(Chunk.NEWLINE);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t// Si c'est une Image\r\n\t\t\t\t\tcase IMAGE :\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// On obtient l'objet awt.Image (different de IText.Image)\r\n\t\t\t\t\t\tjava.awt.Image image = (java.awt.Image) datasIter.next();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// On le convertit en IText.Image que l'on insere dans le paragraphe\r\n\t\t\t\t\t\tpara.add(Image.getInstance(image, null));\r\n\t\t\t\t\t\tbreak;\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t// Si le type est inconnue, on lance une Exception\r\n\t\t\t\t\t\tthrow new Exception (\"data type not handled\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//para.add(Chunk.NEWLINE);\r\n\t\t\t}\r\n\t\t\t// On definit les largeurs du tableau\r\n\t\t\t/*table.setWidths(tableCellsWidths);\r\n\t\t\t\r\n\t\t\t// On ajoute toutes les cellules\r\n\t\t\tfor (PdfPCell cell : tableCells) {\r\n\t\t\t\ttable.addCell(cell);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Enfin, on ajoute le tableau au paragraphe\r\n\t\t\tpara.add(table);\r\n\t\t\t*/\r\n\t\t\t// S'il y a une suite, on ajoute une nouvelle page\r\n\t\t\tif (datasTypeIter.hasNext()) {\r\n\t\t\t\tpara.add(Chunk.NEWPAGE);\r\n\t\t\t}\r\n\t\t\t// On ajout le paragraphe au document\r\n\t\t\tdocument.add(para);\r\n\t\t\t\r\n\t\t\t// S'il y a eu un ajout de nouvelle page, on indique au Document de prevoir une nouvelle page\r\n\t\t\tif (datasTypeIter.hasNext()) {\r\n\t\t\t\tdocument.newPage();\r\n\t\t\t}\r\n\t\r\n\t\t\t// On met a jour la ProgressBar\r\n\t\t\tcounter += progressIncrement;\r\n\t\t\tpBFrame.updateBar(counter);\r\n\t\t}\r\n\t\t\r\n\t\t// A la fin, on ferme tous les flux\r\n\t\tdocument.close();\r\n\t\twriter.close();\r\n\t\r\n\t\t// Renvoie de réussite\r\n\t\treturn true;\r\n\t}",
"public static List<Page> processPDF(byte[] theFile, PageProcessor pp,\n int startPage, int endPage, String encoding, String password,\n List<AdjacencyGraph<GenericSegment>> adjGraphList, boolean GUI)\n throws DocumentProcessingException\n {\n\n\n boolean toConsole = false;\n if (password == null)\n password = \"\";\n if (encoding == null || encoding == \"\")\n encoding = DEFAULT_ENCODING;\n\n if (startPage == 0)\n startPage = 1;\n if (endPage == 0)\n endPage = Integer.MAX_VALUE;\n\n ByteArrayInputStream inStream = new ByteArrayInputStream(theFile);\n PDDocument document = null;\n\n try {\n\n PDFObjectExtractor extractor = new PDFObjectExtractor();\n// PDDocument document = null;\n document = PDDocument.load( inStream );\n // document.print();\n if( document.isEncrypted() )\n {\n try\n {\n document.decrypt( password );\n }\n catch( InvalidPasswordException e )\n {\n if(!(password == null || password == \"\"))//they supplied the wrong password\n {\n throw new DocumentProcessingException\n (\"Error: The supplied password is incorrect.\");\n }\n else\n {\n //they didn't suppply a password and the default of \"\" was wrong.\n throw new DocumentProcessingException\n ( \"Error: The document is encrypted.\" );\n }\n } catch (CryptographyException e) {\n throw new DocumentProcessingException(e);\n }\n }\n\n extractor.setStartPage( startPage );\n extractor.setEndPage( endPage );\n // stripper.writeText( document, output );\n\n List<PDFPage> thePages = extractor.findObjects(document);\n List<Page> theResult = new ArrayList<Page>();\n\n startPage = extractor.getStartPage();\n endPage = extractor.getEndPage();\n\n // now the DU part\n\n Iterator<PDFPage> pageIter = thePages.iterator();\n int currentPage = -1;\n while(pageIter.hasNext())\n {\n currentPage ++;\n PDFPage thePage = pageIter.next();\n\n Page resultPage = pp.processPage(thePage);\n theResult.add(resultPage);\n if (adjGraphList != null)\n adjGraphList.add(pp.getAdjGraph());\n\n }\n\n // 17.11.10 document-wide processing for headers, footers, etc.\n if (!GUI)\n theResult = pp.processDocPages(theResult, null);\n\n // move to finally block somewhere?\n if( document != null )\n {\n document.close();\n }\n return theResult;\n }\n catch (IOException e)\n {\n e.printStackTrace();\n throw new DocumentProcessingException(e);\n }\n\n }",
"@Override\n public void processPages(File imageFile, File outputFile) throws Exception {\n instance.setDatapath(datapath);\n instance.setLanguage(language);\n instance.setPageSegMode(Integer.parseInt(pageSegMode));\n instance.setOcrEngineMode(Integer.parseInt(ocrEngineMode));\n\n List<RenderedFormat> renderedFormats = new ArrayList<RenderedFormat>();\n\n for (String format : outputFormats.toUpperCase().split(\",\")) {\n renderedFormats.add(RenderedFormat.valueOf(format));\n }\n\n instance.createDocuments(imageFile.getPath(), outputFile.getPath(), renderedFormats);\n }",
"@Override\n public void make(@NonNull List<GenericPaint> genericPaintList) {\n PdfDocument.Page page = this.document.startPage(this.pageInfo);\n Canvas c = page.getCanvas();\n\n this.paintTitle(c);\n this.printCustomerInformation(c);\n this.paintSubtitle(c);\n this.paintPrintInformation(c);\n this.paintTableHeader(c);\n this.paintTableSum(c);\n this.paintFooter(c);\n\n this.document.finishPage(page);\n\n this.write();\n }",
"public static void main(String[] args) throws IOException, FileNotFoundException {\n\t\t\n\t\t\n\t\tString regex = \"[0-9]+\";\n\t\tString data = \"1313\";\n\t\tSystem.out.println(data.matches(regex));\n\t\tString regex1 = \"[0-9]+\";\n\t\tString data1 = \" 112121 sdf \";\n\t\tSystem.out.println(data1.matches(regex1));\n\t\tString []arr = data1.split(\"\\\\s\"); \n\t\tSystem.out.println(arr.length);\n\t\tSystem.out.println(data1.replaceAll(\"\\\\s+\", \" \").trim());\n\t\t\n\t\t\n\t\t/*\n\t\tFile f=new File(\"D:\\\\april.pdf\");\n\t FileInputStream fileIn;\n\t PdfReader reader;\n\t try {\n\t fileIn=new FileInputStream(f);\n\t reader=new PdfReader(fileIn);\n\t HashMap<String, String> merged=reader.getInfo();\n\t // ByteArrayInputStream bIn=new ByteArrayInputStream(merged);\n\t //BufferedReader bR=new BufferedReader(new InputStreamReader(bIn));\n\t //String line;\n\t //while ((line=bR.readLine()) != null) {\n\t //System.out.println(line);\n\t //}\n\t reader.close();\n\t fileIn.close();\n\t }\n\t catch ( IOException e) {\n\t System.err.println(\"Couldn't read file '\" );\n\t System.err.println(e);\n\t }*/\n\t\t\n\t\t\n\t\t\n\t\t\n\t/*\tfloat width = 612;\n\t\tfloat height = 792;\n\t\tfloat hX = 320, tX = 340, cX = 100;\n\t\tfloat hY = 0, tY = 580, cY = 200;\n\t\tfloat hW = width - hX, tW = width - tX, cW = 100;\n\t\tfloat hH = 80, tH = height - tY, cH = 60;\n\t\tRectangle header = new Rectangle( 150, 150);\n\t\t//\t\tRectangle totals = new Rectangle(cH, cH, cH, cH);\n\t\t//totals.setBounds(tX, tY, tW, tH);\n\t\t//Rectangle customer = new Rectangle();\n\t\t//customer.setBounds(cX, cY, cW, cH);\n\t\tPDFTextStripperByArea stripper = new PDFTextStripperByArea();\n\t\t//stripper.\n\t\t//stripper.addRegion(\"totals\", totals);\n\t\t//stripper.addRegion(\"customer\", customer);\n\t\tstripper.setSortByPosition(true);\n\t\tint j = 0;\n\t\tList pages = pd.getDocumentCatalog().getAllPages();\n\t\tfor (PDPage page : pages) {\n\t\t\tstripper.extractRegions(page);\n\t\t\tList regions = stripper.getRegions();\n\t\t\tfor (String region : regions) {\n\t\t\t\tString text = stripper.getTextForRegion(region);\n\t\t\t\tSystem.out.println(\"Region: \" + region + \" on Page \" + j);\n\t\t\t\tSystem.out.println(\"\\tText: \\n\" + text);\n\t\t\t}\n\t\t\tj++;\n\t\t}*/\n\t}",
"public static void main(String[] args) {\n PdfFile pdfFile=new PdfFile(\"PDF File\");\n pdfFile.open();\n pdfFile.close();\n pdfFile.edit();\n WordFile wordFile=new WordFile(\"Word File\");\n wordFile.open();\n wordFile.close();\n wordFile.edit();\n JavaFile javaFile=new JavaFile(\"Java File\");\n javaFile.open();\n javaFile.close();\n javaFile.edit();\n\n }",
"@Override\n public List<OmOrderHeaders> printPDF(IRequest requestCtx, @StdWho List<OmOrderHeaders> States) {\n PDFReport pdfPrint = new PDFReport();\n\n OmOrderHeaders notice=null;\n //List<OmOrderHeaders> trade=new ArrayList<OmOrderHeaders>();\n\n for (OmOrderHeaders state : States) {\n if (state.getHeaderId() != null) {\n notice=state;\n }\n }\n\n File file = new File(\"C:\\\\Users\\\\PB\\\\Desktop\\\\\"+notice.getOrderNumber()+\".pdf\");\n List<OmOrderLines> omOrderLines = omOrderLinesMapper.selectSumPrice(notice);\n\n\n try {\n\n BaseFont bfChinese=PDFReport.bfChinese;\n Font headfont =PDFReport.headfont;\n Font keyfont=PDFReport.keyfont;\n Font textfont=PDFReport.textfont;\n\n file.createNewFile();\n Document document = new Document();\n\n document.setPageSize(PageSize.A4);\n PdfWriter.getInstance(document, new FileOutputStream(file));\n document.open();\n PdfPTable table= pdfPrint.createTable(6);\n\n table.addCell(pdfPrint.createCell(\".订单打印:\", headfont, Element.ALIGN_LEFT,6,false));\n table.addCell(pdfPrint.createCell(\" \", keyfont, Element.ALIGN_LEFT,6,false));\n table.addCell(pdfPrint.createCell(\" \", keyfont, Element.ALIGN_LEFT,6,false));\n\n\n table.addCell(pdfPrint.createCell(\"订单编号:\", keyfont, Element.ALIGN_RIGHT,0,false));\n //table.addCell(pdfPrint.createCell(notice.getOrderNumber(), textfont, Element.ALIGN_CENTER));\n table.addCell(pdfPrint.createCell(notice.getOrderNumber(), textfont,Element.ALIGN_LEFT));\n table.addCell(pdfPrint.createCell(\"公司名称:\", keyfont, Element.ALIGN_RIGHT,0,false));\n OrgCompanys orgCompanys = orgCompanysMapper.selectByPrimaryKey(notice.getCompanyId());\n table.addCell(pdfPrint.createCell(orgCompanys.getCompanyName(), textfont, Element.ALIGN_LEFT));\n ArCustomers arCustomers = arCustomersMapper.selectByPrimaryKey(notice.getCustomerId());\n table.addCell(pdfPrint.createCell(\"客户名称:\", keyfont, Element.ALIGN_RIGHT,0,false));\n table.addCell(pdfPrint.createCell(arCustomers.getCustomerName(), textfont, Element.ALIGN_LEFT));\n table.addCell(pdfPrint.createCell(\" \", keyfont, Element.ALIGN_LEFT,6,false));\n\n\n table.addCell(pdfPrint.createCell(\"订单日期:\", keyfont, Element.ALIGN_RIGHT,0,false));\n table.addCell(pdfPrint.createCell(new SimpleDateFormat(\"yyyy/MM/dd\").format(notice.getOrderDate()), textfont, Element.ALIGN_LEFT));\n long sum = 0;\n for(int i=0;i<omOrderLines.size();i++) {\n OmOrderLines ot = new OmOrderLines();\n ot = omOrderLines.get(i);\n sum = sum + ot.getOrderdQuantity()*ot.getUnitSellingPrice();\n\n }\n\n\n table.addCell(pdfPrint.createCell(\"订单总金额:\", keyfont, Element.ALIGN_RIGHT,0,false));\n table.addCell(pdfPrint.createCell(String.valueOf(sum), textfont, Element.ALIGN_LEFT));\n table.addCell(pdfPrint.createCell(\"订单状态:\", keyfont, Element.ALIGN_RIGHT,0,false));\n String s=\"\";\n if(notice.getOrderStatus().equals(\"NEW\")){\n s=\"新建\";\n }else if(notice.getOrderStatus().equals(\"SUBMITED\")){\n s=\"已提交\";\n }else if(notice.getOrderStatus().equals(\"APPROVED\")){\n s=\"已审批\";\n }else if(notice.getOrderStatus().equals(\"REJECTED\")){\n s=\"已拒绝\";\n }\n table.addCell(pdfPrint.createCell(s, textfont, Element.ALIGN_LEFT));\n table.addCell(pdfPrint.createCell(\" \", keyfont, Element.ALIGN_LEFT,6,false));\n table.addCell(pdfPrint.createCell(\" \", keyfont, Element.ALIGN_LEFT,6,false));\n\n table.addCell(pdfPrint.createCell(\"主要:\", headfont, Element.ALIGN_LEFT,6,false));\n\t\ttable.addCell(pdfPrint.createCell(\"物料编码\", textfont, Element.ALIGN_CENTER));\n\t\ttable.addCell(pdfPrint.createCell(\"物料描述\", textfont, Element.ALIGN_CENTER));\n\t\ttable.addCell(pdfPrint.createCell(\"产品单位\", textfont, Element.ALIGN_CENTER));\n\t\ttable.addCell(pdfPrint.createCell(\"数量\", textfont, Element.ALIGN_CENTER));\n table.addCell(pdfPrint.createCell(\"销售单价\", textfont, Element.ALIGN_CENTER));\n table.addCell(pdfPrint.createCell(\"金额\", textfont, Element.ALIGN_CENTER));\n\n\t\tfor(int i=0;i<omOrderLines.size();i++){\n OmOrderLines ot = new OmOrderLines ();\n ot = omOrderLines.get(i);\n InvInventoryItems invInventoryItems = invInventoryItemsMapper.selectByPrimaryKey(ot.getInventoryItemId());\n\t\t\ttable.addCell(pdfPrint.createCell(invInventoryItems.getItemCode(), textfont));\n\t\t\ttable.addCell(pdfPrint.createCell(invInventoryItems.getItemDescription(), textfont));\n\t\t\ttable.addCell(pdfPrint.createCell(ot.getOrderQuantityUom(), textfont));\n\t\t\ttable.addCell(pdfPrint.createCell(String.valueOf(ot.getOrderdQuantity()), textfont));\n table.addCell(pdfPrint.createCell(String.valueOf(ot.getUnitSellingPrice()), textfont));\n table.addCell(pdfPrint.createCell(String.valueOf(ot.getOrderdQuantity()*ot.getUnitSellingPrice()), textfont));\n\t\t}\n\t\ttry {\n\t\t\tdocument.add(table);\n\n\t\t}catch(Exception e){e.printStackTrace(); }\n\n\t\tdocument.close();\n }catch(Exception e){e.printStackTrace();}\n\n\n return States;\n }",
"public void createPdf(String filePath) throws DocumentException, FileNotFoundException, BadElementException, IOException, SQLException {\r\n Calendar date = Calendar.getInstance();\r\n String dato;\r\n dato = \"\"+date.get(Calendar.YEAR)+\"-\"+MyUtil.p0(date.get(Calendar.MONTH)+1)+\"-\"+MyUtil.p0((date.get(Calendar.DAY_OF_MONTH)))+\"-\";\r\n \r\n String name = fal.getFiremanById(model.getTimeSheet(0).getEmployeeId()).getFirstName() +\" \"+ fal.getFiremanById(model.getTimeSheet(0).getEmployeeId()).getLastName();\r\n fileName = dato + name + \".pdf\";\r\n \r\n Document document = new Document();\r\n PdfWriter.getInstance(document, new FileOutputStream(filePath+fileName));\r\n document.open();\r\n addContent(document);\r\n document.close();\r\n\r\n }",
"private void pdfPaymentMethod(CartReceiptResponse receiptResponse, Document document, Locale locale)\n throws DocumentException, IOException {\n\n LOGGER.debug(\"Entered in 'pdfPaymentMethod' method\");\n Double totalPaymentApplied = 0.0;\n PdfPTable paymentMethodTable = new PdfPTable(2);\n paymentMethodTable.setWidths(new int[]{200, 50});\n PdfPCell paymentMethodBlankSpaceCell = new PdfPCell(new Phrase(\" \", getFont(WHITE_COLOR, 8, Font.BOLD)));\n String message = getMessage(locale, \"pdf.receipt.paymentMethod\");\n Font font = getFont(BLACK_COLOR, FONT_SIZE_18, Font.BOLD);\n PdfPCell paymentMethodHeaderCell = new PdfPCell(new Phrase(message, font));\n cellAlignment(paymentMethodHeaderCell, Element.ALIGN_LEFT, GRAY_COLOR, 0);\n cellAddingToTable(paymentMethodTable, paymentMethodHeaderCell, Rectangle.NO_BORDER, 0, 0);\n\n cellAlignment(paymentMethodBlankSpaceCell, 0, GRAY_COLOR, 0);\n cellAddingToTable(paymentMethodTable, paymentMethodBlankSpaceCell, Rectangle.NO_BORDER, 2, 0);\n cellAlignment(paymentMethodBlankSpaceCell, 0, GRAY_COLOR, 0);\n cellAddingToTable(paymentMethodTable, paymentMethodBlankSpaceCell, Rectangle.NO_BORDER, 2, 0);\n\n FundingSourceResponse[] fundingSources = receiptResponse.getFundingSources();\n\n if (fundingSources.length != 0) {\n for (final FundingSourceResponse aFundingSource1 : fundingSources) {\n if (aFundingSource1 != null) {\n if (aFundingSource1.getType().equalsIgnoreCase(PdfConstants.CREDIT)) {\n LOGGER.debug(\"Entered in to credits section : \" + aFundingSource1.getType());\n creditFundingSection(locale, paymentMethodTable,\n new BigDecimal(getUsedAmountFromFunding(aFundingSource1)));\n cellAlignment(paymentMethodBlankSpaceCell, Element.ALIGN_RIGHT, GRAY_COLOR, 0);\n cellAddingToTable(paymentMethodTable, paymentMethodBlankSpaceCell, Rectangle.NO_BORDER, 2, 0);\n totalPaymentApplied = totalPaymentApplied + getUsedAmountFromFunding(aFundingSource1);\n }\n }\n }\n for (final FundingSourceResponse aFundingSource : fundingSources) {\n if (aFundingSource instanceof VestaFundingSourceResponse) {\n VestaFundingSourceResponse vestaFundingSourceResponse =\n (VestaFundingSourceResponse) aFundingSource;\n String tenderType = vestaFundingSourceResponse.getTenderType();\n CardBrand cardBrand = vestaFundingSourceResponse.getCardBrand();\n if (tenderType.equalsIgnoreCase(PdfConstants.DEBIT) ||\n tenderType.equalsIgnoreCase(PdfConstants.CREDIT)) {\n PdfPCell cardNumberCell = new PdfPCell(new Phrase(getMessage(locale, \"pdf.receipt.cardPinMsg\",\n getTenderTypeForCard(tenderType,\n locale),\n getCardBrandText(cardBrand,\n locale),\n vestaFundingSourceResponse\n .getCardLast4()),\n getFont(null, FONT_SIZE_12, Font.NORMAL)));\n PdfPCell amountSectionCell = new PdfPCell(new Phrase(getFormattedAmount(new BigDecimal(\n getUsedAmountFromFunding(vestaFundingSourceResponse))),\n getFont(null, FONT_SIZE_12, Font.NORMAL)));\n cellAlignment(cardNumberCell, Element.ALIGN_LEFT, GRAY_COLOR, 0);\n cellAddingToTable(paymentMethodTable, cardNumberCell, Rectangle.NO_BORDER, 0, 15);\n\n cellAlignment(amountSectionCell, Element.ALIGN_RIGHT, GRAY_COLOR, 0);\n cellAddingToTable(paymentMethodTable, amountSectionCell, Rectangle.NO_BORDER, 0, 0);\n chargedOnSection(locale, paymentMethodTable, paymentMethodBlankSpaceCell, receiptResponse);\n totalPaymentApplied =\n totalPaymentApplied + getUsedAmountFromFunding(vestaFundingSourceResponse);\n continue;\n }\n }\n\n if (aFundingSource != null) {\n if (getCashStatus(aFundingSource.getType())) {\n cashFundingSection(paymentMethodTable, locale, aFundingSource);\n cellAlignment(paymentMethodBlankSpaceCell, Element.ALIGN_RIGHT, GRAY_COLOR, 0);\n cellAddingToTable(paymentMethodTable, paymentMethodBlankSpaceCell, Rectangle.NO_BORDER, 2, 0);\n totalPaymentApplied = totalPaymentApplied + getUsedAmountFromFunding(aFundingSource);\n }\n }\n }\n } else {\n creditFundingSection(locale, paymentMethodTable, new BigDecimal(0));\n cellAlignment(paymentMethodBlankSpaceCell, Element.ALIGN_RIGHT, GRAY_COLOR, 0);\n cellAddingToTable(paymentMethodTable, paymentMethodBlankSpaceCell, Rectangle.NO_BORDER, 2, 0);\n totalPaymentApplied = totalPaymentApplied + 0;\n }\n\n\n calculateTotalPayment(locale, paymentMethodTable, totalPaymentApplied);\n cellAlignment(paymentMethodBlankSpaceCell, Element.ALIGN_RIGHT, GRAY_COLOR, 0);\n cellAddingToTable(paymentMethodTable, paymentMethodBlankSpaceCell, Rectangle.NO_BORDER, 2, 0);\n generatedNewCredits(locale, paymentMethodTable, receiptResponse.getCreditsGenerated());\n document.add(paymentMethodTable);\n }",
"@Override\n public void execute(HttpServletRequest request,Document document) throws Exception {\n\n Font FontChinese = WordUtil.font;//加入document:\n\n\n /** 创建文档主体内容 */\n document.add(new Paragraph(\"First page of the document.\"));// Paragraph添加文本\n document.add(new Paragraph(\"我们是害虫\", FontChinese));\n /** 创建章节对象 */\n Paragraph title1 = new Paragraph(\"第一章\", FontChinese);\n Chapter chapter1 = new Chapter(title1, 1);\n chapter1.setNumberDepth(0);\n /** 创建章节中的小节 */\n Paragraph title11 = new Paragraph(\"表格的添加\", FontChinese);\n Section section1 = chapter1.addSection(title11);\n /** 创建段落并添加到小节中 */\n Paragraph someSectionText = new Paragraph(\"下面展示的为3 X 2 表格.\",\n FontChinese);\n section1.add(someSectionText);\n /** 创建表格对象(包含行列矩阵的表格) */\n Table t = new Table(3, 2);// 2行3列\n t.setBorderColor(new Color(220, 255, 100));\n t.setPadding(5);\n t.setSpacing(5);\n t.setBorderWidth(1);\n Cell c1 = new Cell(new Paragraph(\"第一格\", FontChinese));\n t.addCell(c1);\n c1 = new Cell(\"Header2\");\n t.addCell(c1);\n c1 = new Cell(\"Header3\");\n t.addCell(c1);\n // 第二行开始不需要new Cell()\n t.addCell(\"1.1\");\n t.addCell(\"1.2\");\n t.addCell(\"1.3\");\n section1.add(t);\n /** 创建章节中的小节 */\n Paragraph title13 = new Paragraph(\"列表的添加\", FontChinese);\n Section section3 = chapter1.addSection(title13);\n /** 创建段落并添加到小节中 */\n Paragraph someSectionText3 = new Paragraph(\"下面展示的为列表.\", FontChinese);\n section3.add(someSectionText3);\n /** 创建列表并添加到pdf文档中 */\n List l = new List(true, true, 10);// 第一个参数为true,则创建一个要自行编号的列表,\n // 如果为false则不进行自行编号\n l.add(new ListItem(\"First item of list\"));\n l.add(new ListItem(\"第二个列表\", FontChinese));\n section3.add(l);\n document.add(chapter1);\n /** 创建章节对象 */\n Paragraph title2 = new Paragraph(\"第二章\", FontChinese);\n Chapter chapter2 = new Chapter(title2, 1);\n chapter2.setNumberDepth(0);\n /** 创建章节中的小节 */\n Paragraph title12 = new Paragraph(\"png图片添加\", FontChinese);\n Section section2 = chapter2.addSection(title12);\n /** 添加图片 */\n section2.add(new Paragraph(\"图片添加: 饼图\", FontChinese));\n Image png = Image.getInstance(\"D:/pie.png\");//图片的地址\n section2.add(png);\n document.add(chapter2);\n\n }",
"public void nuevoReporteVentasMueble(ArrayList<Producto> Datos) throws IOException {\n Document documento = null;\r\n try {\r\n //Direccion root\r\n FileOutputStream ficheroPdf = new FileOutputStream(\"C:\\\\Users\\\\panle\\\\Documents\\\\ReporteVentasMueble.pdf\");\r\n //FileOutputStream ficheroPdf = new FileOutputStream(\"user.dir/tmp\", \"ReporteProductos.pdf\");\r\n //File tempfile = new File(\"user.dir/tmp\", \"tempfile.txt\"); \r\n documento = new Document();\r\n // Se asocia el documento al OutputStream y se indica que el espaciado entre\r\n // lineas sera de 20. Esta llamada debe hacerse antes de abrir el documento\r\n PdfWriter.getInstance(documento, ficheroPdf).setInitialLeading(20);\r\n\r\n // Se abre el documento\r\n documento.open();\r\n documento.add(new Paragraph(\"REPORTE VENTAS POR MUEBLE\",\r\n FontFactory.getFont(\"ARIAL\", // fuente\r\n 16, // tamaño\r\n Font.ITALIC, // estilo\r\n BaseColor.BLACK))); // color\r\n\r\n PdfPTable tabla = new PdfPTable(3);//#campos(columnas) para la tabla\r\n Font font = new Font(FontFamily.COURIER, 6, Font.BOLD, BaseColor.BLACK);\r\n PdfPCell cell = new PdfPCell(new Phrase(\"Celdas\", font));\r\n\r\n documento.add(new Paragraph(\"\\n\"));\r\n\r\n Image img = Image.getInstance(\"C:\\\\Users\\\\logo.png\");\r\n documento.add(img);\r\n documento.add(new Paragraph(\"\\n\"));\r\n\r\n int conta = 0;\r\n\r\n cell.setBorder(Rectangle.TITLE);\r\n tabla.addCell(\"DESCRIPCION\");\r\n tabla.addCell(\"REFERENCIA\");\r\n tabla.addCell(\"TIPO\");\r\n\r\n while (conta < Datos.size()) {\r\n cell.setBorder(Rectangle.NO_BORDER);\r\n tabla.addCell(Datos.get(conta).getDESCRIPCION());\r\n tabla.addCell(Datos.get(conta).getREFERENCIA());\r\n tabla.addCell(Datos.get(conta).getTIPO());\r\n conta++;\r\n }\r\n\r\n documento.add(tabla);\r\n documento.close();\r\n\r\n } catch (FileNotFoundException | DocumentException e) {\r\n System.out.println(\"Error al generar Reporte Productos, por:\");\r\n e.printStackTrace();\r\n }\r\n }",
"public static void main (String args[]) {\n System.out.println(\"PDF document encryptor\");\n if (args.length <= STRENGTH || args[PERMISSIONS].length() != 8) {\n usage();\n return;\n }\n try {\n int permissions = 0;\n String p = args[PERMISSIONS];\n for (int k = 0; k < p.length(); ++k) {\n permissions |= (p.charAt(k) == '0' ? 0 : permit[k]);\n }\n System.out.println(\"Reading \" + args[INPUT_FILE]);\n PdfReader reader = new PdfReader(args[INPUT_FILE]);\n System.out.println(\"Writing \" + args[OUTPUT_FILE]);\n HashMap moreInfo = new HashMap();\n for (int k = MOREINFO; k < args.length - 1; k += 2)\n moreInfo.put(args[k], args[k + 1]);\n PdfEncryptor.encrypt(reader, new FileOutputStream(args[OUTPUT_FILE]),\n args[USER_PASSWORD].getBytes(), args[OWNER_PASSWORD].getBytes(), permissions, args[STRENGTH].equals(\"128\"), moreInfo);\n System.out.println(\"Done.\");\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void preProcessPDF(Object document) throws IOException, BadElementException, DocumentException {\n Document pdf = (Document) document;\n pdf.open();\n pdf.setPageSize(PageSize.A4);\n\n ServletContext servletContext = (ServletContext) FacesContext.getCurrentInstance().getExternalContext().getContext();\n String header = servletContext.getRealPath(\"\") + File.separator + \"resources\" + File.separator + \"img\" + File.separator + \"header.png\";\n\n pdf.add(Image.getInstance(header));\n\n pdf.add(new Paragraph(\"\\n\\n Order placed by: \" + getUserName()));\n pdf.add(new Paragraph(\" Order placed at: \" + getDate().toString()));\n pdf.add(new Paragraph(\"\\n\\n\"));\n\n }",
"public void nuevoReporteVentasFecha(ArrayList<Producto> Datos) throws IOException {\n Document documento = null;\r\n try {\r\n //Direccion root\r\n FileOutputStream ficheroPdf = new FileOutputStream(\"C:\\\\Users\\\\panle\\\\Documents\\\\ReporteVentasFecha.pdf\");\r\n //FileOutputStream ficheroPdf = new FileOutputStream(\"user.dir/tmp\", \"ReporteProductos.pdf\");\r\n //File tempfile = new File(\"user.dir/tmp\", \"tempfile.txt\"); \r\n documento = new Document();\r\n // Se asocia el documento al OutputStream y se indica que el espaciado entre\r\n // lineas sera de 20. Esta llamada debe hacerse antes de abrir el documento\r\n PdfWriter.getInstance(documento, ficheroPdf).setInitialLeading(20);\r\n\r\n // Se abre el documento\r\n documento.open();\r\n documento.add(new Paragraph(\"REPORTE VENTAS POR FECHA\",\r\n FontFactory.getFont(\"ARIAL\", // fuente\r\n 16, // tamaño\r\n Font.ITALIC, // estilo\r\n BaseColor.BLACK))); // color\r\n\r\n PdfPTable tabla = new PdfPTable(3);//#campos(columnas) para la tabla\r\n Font font = new Font(FontFamily.COURIER, 6, Font.BOLD, BaseColor.BLACK);\r\n PdfPCell cell = new PdfPCell(new Phrase(\"Celdas\", font));\r\n\r\n documento.add(new Paragraph(\"\\n\"));\r\n\r\n Image img = Image.getInstance(\"C:\\\\Users\\\\logo.png\");\r\n documento.add(img);\r\n documento.add(new Paragraph(\"\\n\"));\r\n\r\n int conta = 0;\r\n\r\n cell.setBorder(Rectangle.TITLE);\r\n tabla.addCell(\"DESCRIPCION\");\r\n tabla.addCell(\"REFERENCIA\");\r\n tabla.addCell(\"TIPO\");\r\n\r\n while (conta < Datos.size()) {\r\n cell.setBorder(Rectangle.NO_BORDER);\r\n tabla.addCell(Datos.get(conta).getDESCRIPCION());\r\n tabla.addCell(Datos.get(conta).getREFERENCIA());\r\n tabla.addCell(Datos.get(conta).getTIPO());\r\n conta++;\r\n }\r\n\r\n documento.add(tabla);\r\n documento.close();\r\n\r\n } catch (FileNotFoundException | DocumentException e) {\r\n System.out.println(\"Error al generar Reporte Productos, por:\");\r\n e.printStackTrace();\r\n }\r\n }",
"public void writePDF(RMPDFWriter aWriter)\n{\n List refs = new ArrayList(getPageCount());\n PDFXTable xref = aWriter.getXRefTable();\n for(int i=0, iMax=getPageCount(); i<iMax; i++)\n refs.add(xref.getRefString(getPage(i)));\n \n // \n _dict.put(\"Kids\", refs);\n _dict.put(\"Count\", getPageCount());\n \n // \n aWriter.writeXRefEntry(_dict);\n}",
"@Test\n void testAddMissingInformationOnAcroFormAccess()\n {\n try\n {\n byte[] pdfBytes = createAcroFormWithMissingResourceInformation();\n\n try (PDDocument pdfDocument = Loader.loadPDF(pdfBytes))\n {\n PDDocumentCatalog documentCatalog = pdfDocument.getDocumentCatalog();\n \n // this call shall trigger the generation of missing information\n PDAcroForm theAcroForm = documentCatalog.getAcroForm();\n \n // ensure that the missing information has been generated\n // DA entry\n assertEquals(\"/Helv 0 Tf 0 g \", theAcroForm.getDefaultAppearance());\n assertNotNull(theAcroForm.getDefaultResources());\n \n // DR entry\n PDResources acroFormResources = theAcroForm.getDefaultResources();\n assertNotNull(acroFormResources.getFont(COSName.getPDFName(\"Helv\")));\n assertEquals(\"Helvetica\", acroFormResources.getFont(COSName.getPDFName(\"Helv\")).getName());\n assertNotNull(acroFormResources.getFont(COSName.getPDFName(\"ZaDb\")));\n assertEquals(\"ZapfDingbats\", acroFormResources.getFont(COSName.getPDFName(\"ZaDb\")).getName());\n }\n }\n catch (IOException e)\n {\n System.err.println(\"Couldn't create test document, test skipped\");\n return;\n }\n }",
"private void startGeneration(RootDoc root) throws Configuration.Fault, Exception {\n if (root.classes().length == 0) {\n configuration.message.\n error(\"doclet.No_Public_Classes_To_Document\");\n return;\n }\n configuration.setOptions();\n configuration.getDocletSpecificMsg().notice(\"doclet.build_version\",\n configuration.getDocletSpecificBuildDate());\n ClassTree classtree = new ClassTree(configuration, configuration.nodeprecated);\n\n generateClassFiles(root, classtree);\n Util.copyDocFiles(configuration, DocPaths.DOC_FILES);\n\n PackageListWriter.generate(configuration);\n generatePackageFiles(classtree);\n generateProfileFiles();\n\n generateOtherFiles(root, classtree);\n configuration.tagletManager.printReport();\n }"
] | [
"0.7089162",
"0.703969",
"0.6824349",
"0.65453124",
"0.6531417",
"0.6497297",
"0.64821655",
"0.64530647",
"0.64356285",
"0.6398324",
"0.6391861",
"0.63152575",
"0.63087547",
"0.6288959",
"0.62458736",
"0.62198555",
"0.6214946",
"0.6212236",
"0.6189482",
"0.61661464",
"0.61558765",
"0.6155696",
"0.61119235",
"0.6103747",
"0.60873276",
"0.60580194",
"0.6045324",
"0.60340214",
"0.60258365",
"0.60244006",
"0.60169274",
"0.6008689",
"0.59949493",
"0.5985633",
"0.5983101",
"0.59721047",
"0.59612364",
"0.59260345",
"0.590579",
"0.5899344",
"0.5899169",
"0.58949155",
"0.5881839",
"0.58733684",
"0.5868625",
"0.5865448",
"0.58647496",
"0.58567125",
"0.5856477",
"0.5853836",
"0.5827883",
"0.5824034",
"0.57998335",
"0.57959914",
"0.579596",
"0.5777465",
"0.57757264",
"0.5769859",
"0.57649726",
"0.57534504",
"0.5747107",
"0.57208407",
"0.57164794",
"0.5711949",
"0.5705485",
"0.57009685",
"0.5679632",
"0.56780547",
"0.5675638",
"0.56742907",
"0.5672407",
"0.56691384",
"0.56401825",
"0.5638207",
"0.5633581",
"0.56307083",
"0.5622495",
"0.56021565",
"0.5598025",
"0.5597315",
"0.5595323",
"0.5594638",
"0.5582529",
"0.5571207",
"0.55675375",
"0.5567178",
"0.55671245",
"0.5560419",
"0.5558126",
"0.55537903",
"0.5534187",
"0.55310893",
"0.55275977",
"0.551854",
"0.55181247",
"0.55159414",
"0.5503457",
"0.5497303",
"0.548819",
"0.54771537",
"0.5460559"
] | 0.0 | -1 |
configures parameters used in the xsl transformation | private void setTransformationParameters( final TourData _tourData,
final Transformer _transformer,
final PrintSettings _printSettings) {
_transformer.setParameter("isPrintMarkers", _printSettings.isPrintMarkers()); //$NON-NLS-1$
_transformer.setParameter("isPrintDescription", _printSettings.isPrintDescription()); //$NON-NLS-1$
_transformer.setParameter("paperSize", _printSettings.getPaperSize().toString()); //$NON-NLS-1$
_transformer.setParameter("paperOrientation", _printSettings.getPaperOrientation().toString()); //$NON-NLS-1$
_transformer.setParameter("startDate", formatStartDate(_tourData)); //$NON-NLS-1$
_transformer.setParameter("unitAltitude", new Double(net.tourbook.ui.UI.UNIT_VALUE_ALTITUDE)); //$NON-NLS-1$
_transformer.setParameter("unitDistance", new Double(net.tourbook.ui.UI.UNIT_VALUE_DISTANCE)); //$NON-NLS-1$
_transformer.setParameter("unitTemperature", net.tourbook.ui.UI.UNIT_VALUE_TEMPERATURE); //$NON-NLS-1$
_transformer.setParameter("unitLabelDistance", UI.UNIT_LABEL_DISTANCE); //$NON-NLS-1$
_transformer.setParameter("unitLabelSpeed", UI.UNIT_LABEL_SPEED); //$NON-NLS-1$
_transformer.setParameter("unitLabelAltitude", UI.UNIT_LABEL_ALTITUDE); //$NON-NLS-1$
_transformer.setParameter("unitLabelTemperature", UI.UNIT_LABEL_TEMPERATURE); //$NON-NLS-1$
_transformer.setParameter("unitLabelHeartBeat", net.tourbook.ui.Messages.Value_Unit_Pulse); //$NON-NLS-1$
_transformer.setParameter("unitLabelCadence", net.tourbook.ui.Messages.Value_Unit_Cadence); //$NON-NLS-1$
_transformer.setParameter("unitLabelCalories", net.tourbook.ui.Messages.Value_Unit_Calories); //$NON-NLS-1$
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setXsl(String xsl) {\n this.xsl = xsl;\n }",
"public ArrayList getXsltParams() {\n return xsltParams;\n }",
"public static void replaceInitParams(XmlElement xml, XmlElement xmlParams)\n {\n String sTemplate = xml.getString();\n if (sTemplate != null && sTemplate.length() > 0)\n {\n String sRet = sTemplate;\n Set setMacros = Reporter.getMacroDefaults(sTemplate);\n\n // set the element's value from the specified system property\n for (Iterator i = setMacros.iterator(); i.hasNext();)\n {\n Map.Entry entry = (Map.Entry) i.next();\n String sMacro = (String) entry.getKey();\n Object oDefault = entry.getValue();\n String sDefault = (oDefault == null) ? null: oDefault.toString();\n String sValue = (xmlParams == null) ? null :\n xmlParams.getSafeElement(sMacro).getString();\n String sId = (sDefault == null) ? sMacro : sMacro + \" \" + sDefault;\n if (sValue != null && sValue.length() > 0)\n {\n sRet = sRet.replaceAll(MACRO_START + sId + MACRO_STOP, sValue);\n }\n else\n {\n if (sDefault != null)\n {\n sRet = sRet.replaceAll(MACRO_START + sId + MACRO_STOP, sDefault);\n }\n }\n }\n if (!sRet.equals(sTemplate))\n {\n xml.setString(sRet);\n }\n }\n\n // iterate for each contained element\n for (Iterator iter = xml.getElementList().iterator(); iter.hasNext();)\n {\n replaceInitParams((XmlElement) iter.next(), xmlParams);\n }\n }",
"public String getXsl() {\n return xsl;\n }",
"public void setXslt(Transformer _xslt) {\n xslt = _xslt;\n }",
"public static void saveTransformedDom(Document doc, URI theUri, URI transUri,\n HashMap<String, String> parameters)\n throws Exception {\n if (doc == null) {\n throw (new Exception(\"No_dom_to_save\"));\n }\n try {\n TransformerFactory transFac = TransformerFactory.newInstance();\n\n //DocumentBuilderFactory dFactory=DocumentBuilderFactory.newInstance();\n // must be set true for transformations\n //dFactory.setNamespaceAware(true); \n //DocumentBuilder docBuilder=dFactory.newDocumentBuilder();\n DocumentBuilder docBuilder = makeDocBuilder(true);\n Document xslDoc = docBuilder.parse(transUri.toString());\n DOMSource xslDomSource = new DOMSource(xslDoc);\n xslDomSource.setSystemId(theUri.toString());// ?? transUri\n DOMSource xmlDomSource = new DOMSource(doc);\n Transformer trans = transFac.newTransformer(xslDomSource);\n\n // all transformation properties are assumed set by transformation author\n // so no: trans.setOutputProperty(OutputKeys.xxx,\"\");\n // it would be possible to overrun properties by global options ?\n\n // deal with parameters. Simply set them as is\n if (parameters != null) {\n for (Iterator<String> it = parameters.keySet().iterator(); it.hasNext();) {\n String key = it.next();\n trans.setParameter(key, parameters.get(key));\n }\n }\n\n\n // set outputstreamwriter\n // make sure file exists\n if (!accessutils.makeCatalog(theUri)) {\n throw new Exception(\"Cant make file\");\n }\n\n java.io.FileOutputStream out = new java.io.FileOutputStream(theUri.getPath());\n java.io.OutputStreamWriter os = new java.io.OutputStreamWriter(out, trans.getOutputProperty(OutputKeys.ENCODING));\n java.io.BufferedWriter bos = new java.io.BufferedWriter(os);\n StreamResult outStream = new StreamResult(bos);\n\n // do it \n trans.transform(xmlDomSource, outStream);\n } catch (java.io.UnsupportedEncodingException ex) {\n System.out.println(\"domer:saveTransformedDom: \" + ex.getMessage());\n throw new Exception(ex.getMessage());\n } catch (TransformerConfigurationException tce) {\n System.out.println(\"domer:saveTransformedDom: \" + tce.getMessage());\n throw new Exception(tce.getMessage());\n } catch (TransformerException te) {\n System.out.println(\"domer:saveTransformedDom: \" + te.getMessage());\n throw new Exception(te.getMessage());\n } catch (FactoryConfigurationError f) {\n System.out.println(\"domer:saveTransformedDom: \" + f.getMessage());\n throw new Exception(f.getMessage());\n } catch (IOException ioe) {\n System.out.println(\"domer:saveTransformedDom: \" + ioe.getMessage());\n throw new Exception(ioe.getMessage());\n } catch (SAXException saxe) {\n System.out.println(\"domer:saveTransformedDom: \" + saxe.getMessage());\n throw new Exception(saxe.getMessage());\n } catch (IllegalArgumentException iae) {\n System.out.println(\"domer:saveTransformedDom: \" + iae.getMessage());\n throw new Exception(iae.getMessage());\n } catch (Exception e) {\n System.out.println(\"domer:saveTransformedDom: \" + e.getMessage());\n throw new Exception(e.getMessage());\n }\n }",
"public void setDefaultParameters() {\n\tsetParameterValue(\"genie.param.x\",\"genie.dfwx\");\n\tsetParameterValue(\"genie.param.x.begin\",\"-0.3\");\n\tsetParameterValue(\"genie.param.x.increment\",\"0.6\");\n\tsetParameterValue(\"genie.param.x.increment.type\",\"linear\");\n\tsetParameterValue(\"genie.param.x.end\",\"0.3\");\n\tsetParameterValue(\"genie.param.y\",\"genie.dfwy\");\n\tsetParameterValue(\"genie.param.y.begin\",\"-0.3\");\n\tsetParameterValue(\"genie.param.y.increment\",\"0.6\");\n\tsetParameterValue(\"genie.param.y.increment.type\",\"linear\");\n\tsetParameterValue(\"genie.param.y.end\",\"0.3\");\n\tsetParameterValue(\"genie.nsteps\",\"1001\");\n\tsetParameterValue(\"genie.npstp\",\"1000\");\n\tsetParameterValue(\"genie.iwstp\",\"1000\");\n\tsetParameterValue(\"genie.itstp\",\"10\");\n\tsetParameterValue(\"genie.restart\",\"n\");\n\tsetParameterValue(\"genie.tv\",\"3.65\");\n\tsetParameterValue(\"genie.ndta\",\"5\");\n\tsetParameterValue(\"genie.temp0\",\"5.0\");\n\tsetParameterValue(\"genie.temp1\",\"5.0\");\n\tsetParameterValue(\"genie.rel\",\"0.9\");\n\tsetParameterValue(\"genie.scf\",\"2.0\");\n\tsetParameterValue(\"genie.diff1\",\"2000.0\");\n\tsetParameterValue(\"genie.diff2\",\"1e-5\");\n\tsetParameterValue(\"genie.adrag\",\"2.5\");\n\tsetParameterValue(\"genie.diffamp1\",\"8111000\");\n\tsetParameterValue(\"genie.diffamp2\",\"79610\");\n\tsetParameterValue(\"genie.betaz1\",\"0.1111\");\n\tsetParameterValue(\"genie.betam1\",\"0.0\");\n\tsetParameterValue(\"genie.betaz2\",\"0.2626\");\n\tsetParameterValue(\"genie.betam2\",\"0.2626\");\n\tsetParameterValue(\"genie.scl_co2\",\"1.0\");\n\tsetParameterValue(\"genie.pc_co2_rise\",\"0.0\");\n\tsetParameterValue(\"genie.diffsic\",\"2000.0\");\n\tsetParameterValue(\"genie.tatm\",\"0.0\");\n\tsetParameterValue(\"genie.relh0_ocean\",\"0.0\");\n\tsetParameterValue(\"genie.relh0_land\",\"0.0\");\n\tsetParameterValue(\"genie.dfwx\",\"0.0\");\n\tsetParameterValue(\"genie.dfwy\",\"0.0\");\n\tsetParameterValue(\"genie.lout\",\"0000\");\n\tsetParameterValue(\"genie.lin\",\"0000.1\");\n }",
"public void setXmlx(java.lang.String param) {\r\n localXmlxTracker = param != null;\r\n\r\n this.localXmlx = param;\r\n }",
"public AnXmlTransform() {\n super();\n }",
"private static Document doTransformString(String theString, String systemId,\n URI transUri, HashMap<String, String> parameters)\n throws Exception {\n\n try {\n TransformerFactory transFac = TransformerFactory.newInstance();\n DocumentBuilder docBuilder = makeDocBuilder(true);\n\n Document xslDoc = docBuilder.parse(transUri.toString());\n //xslDoc.setXmlStandalone(true); \n DOMSource xslDomSource = new DOMSource(xslDoc,null);\n \n DOMResult xmlDomResult = new DOMResult();\n \n StreamSource inStream = new StreamSource(new StringReader(theString));\n inStream.setSystemId(systemId);\n Transformer trans = transFac.newTransformer(xslDomSource);\n\n if (parameters != null) {\n for (Iterator<String> it = parameters.keySet().iterator(); it.hasNext();) {\n String key = it.next();\n trans.setParameter(key, parameters.get(key));\n }\n }\n trans.transform(inStream, xmlDomResult);\n return (Document) xmlDomResult.getNode();\n \n } catch (FactoryConfigurationError f) {\n throw new Exception(f.getMessage());\n } catch (IOException ioe) {\n throw ioe;\n } catch (SAXException saxe) {\n throw new Exception(saxe.getMessage());\n } catch (IllegalArgumentException iae) {\n throw new Exception(iae.getMessage());\n } catch (Exception e) {\n throw new Exception(e.getMessage());\n }\n }",
"public static String saveTransformedDomToString(Document doc, URI theUri, URI transUri,\n HashMap<String, String> parameters)\n throws Exception {\n if (doc == null) {\n throw (new Exception(\"No_dom_to_save\"));\n }\n try {\n TransformerFactory transFac = TransformerFactory.newInstance();\n\n //DocumentBuilderFactory dFactory=DocumentBuilderFactory.newInstance();\n // must be set true for transformations\n //dFactory.setNamespaceAware(true); \n //DocumentBuilder docBuilder=dFactory.newDocumentBuilder();\n\n DocumentBuilder docBuilder = makeDocBuilder(true);\n Document xslDoc = docBuilder.parse(transUri.toString());\n\n DOMSource xslDomSource = new DOMSource(xslDoc);\n // where urls will be resolved. Nomeaning if we dont need\n // to access other files during transformation\n xslDomSource.setSystemId(theUri.toString());// ?? transUri | anything\n DOMSource xmlDomSource = new DOMSource(doc);\n Transformer trans = transFac.newTransformer(xslDomSource);\n\n // all transformation properties are assumed set by transformation author\n // so no: trans.setOutputProperty(OutputKeys.xxx,\"\");\n // it would be possible to overrun properties by global options ?\n\n // deal with parameters. Simply set them as is\n if (parameters != null) {\n for (Iterator<String> it = parameters.keySet().iterator(); it.hasNext();) {\n String key = it.next();\n trans.setParameter(key, parameters.get(key));\n }\n }\n\n java.io.StringWriter out = new java.io.StringWriter();\n java.io.BufferedWriter bos = new java.io.BufferedWriter(out);\n StreamResult outStream = new StreamResult(bos);\n trans.transform(xmlDomSource, outStream);\n bos.flush();\n // while testing\n String tst = out.toString().toString();\n\n return out.toString().toString();\n\n } catch (java.io.UnsupportedEncodingException ex) {\n System.out.println(\"domer:saveTransformedDom: \" + ex.getMessage());\n throw new Exception(ex.getMessage());\n } catch (TransformerConfigurationException tce) {\n System.out.println(\"domer:saveTransformedDom: \" + tce.getMessage());\n throw new Exception(tce.getMessage());\n } catch (TransformerException te) {\n System.out.println(\"domer:saveTransformedDom: \" + te.getMessage());\n throw new Exception(te.getMessage());\n } catch (FactoryConfigurationError f) {\n System.out.println(\"domer:saveTransformedDom: \" + f.getMessage());\n throw new Exception(f.getMessage());\n } catch (IOException ioe) {\n System.out.println(\"domer:saveTransformedDom: \" + ioe.getMessage());\n throw new Exception(ioe.getMessage());\n } catch (SAXException saxe) {\n System.out.println(\"domer:saveTransformedDom: \" + saxe.getMessage());\n throw new Exception(saxe.getMessage());\n } catch (IllegalArgumentException iae) {\n System.out.println(\"domer:saveTransformedDom: \" + iae.getMessage());\n throw new Exception(iae.getMessage());\n } catch (Exception e) {\n System.out.println(\"domer:saveTransformedDom: \" + e.getMessage());\n throw new Exception(e.getMessage());\n }\n }",
"protected abstract String transform(final String xmlContent, final Map<String, Object> params) throws YFormProcessorException;",
"public Transformer getXslt() {\n return xslt;\n }",
"@Override\n protected void configure() {\n flow(\"OutputParamsAsXML\")\n .from(\"http://localhost:8080\") //embedded http server that listen on 8080 port\n .filter(groovy(\"message.payload != \\\"/favicon.ico\\\"\")) //don't process the browser request for `favicon.ico`\n .transformWith(HttpRequestBodyToParamMap.class) //transform http request body to a map\n .transformWith(ObjectToXml.class) //transform the payload (map) to xml\n .messageProperties()\n .put(\"Content-Type\", \"text/xml\"); //sets the output content-type to xml\n }",
"private void processStandoffMarkup(Document docExtra) {\n\t\tDOMSnapshot snapExtra = new DOMSnapshot(docExtra, docRoot, new XMLDialect());\n\t\tfor (ITSState itssExtra : snapExtra.iterNodes()) {\n\t\t\tRuleResolver resolver = resolvers.get(itssExtra.node.getNodeName()); \n\t\t\tif (resolver != null) {\n\t\t\t\tGlobalRule rule = resolver.extractRule(snapExtra.attrReader, snapExtra.parameters, itssExtra.node);\n\t\t\t\tapplyRule(resolver, rule);\n\t\t\t}\n\t\t\t\n\t\t\tif (itssExtra.node.getNodeName().equals(\"its:param\")) {\n\t\t\t\tString name = itssExtra.node.getAttributes().getNamedItem(\"name\").getNodeValue();\n\t\t\t\tString value = itssExtra.node.getTextContent();\n\t\t\t\tparameters.add(name, value);\n\t\t\t}\n\t\t\t\n\t\t}\n\t}",
"public final void setXslPath(final File cXslPath) {\n\t\t//do nothing for deprecated method\n\t}",
"public static Node transform(Node xmlXML, Node xmlXSL, DOMResult xmlResult)\r\n throws TransformerConfigurationException,\r\n TransformerException \r\n \r\n {\r\n TransformerFactory factory = TransformerFactory.newInstance();\r\n Transformer transformer = factory.newTransformer(new DOMSource(xmlXSL));\r\n //?? In Java 5.0, using Apache Xalan for transformations, when the \r\n //?? following are in the CLASSPATH:\r\n //?? C:\\Apps\\Apache\\xalan-j_2_7_1\\xercesImpl.jar\r\n //?? C:\\Apps\\Apache\\xalan-j_2_7_1\\xml-apis.jar \r\n //?? this call to newTransformer() writes warnings and errors to \r\n //?? stdout, and doesn't throw an exception on warnings. \r\n //??\r\n //?? For errors, the stdout text looks like:\r\n //?? ERROR: 'Unsupported XSL element 'xxxsort'.'\r\n //?? FATAL ERROR: 'Could not compile stylesheet'\r\n //?? and the value of TransformerConfigurationException.getMessage() \r\n //?? is simply:\r\n //?? Could not compile stylesheet\r\n //?? instead of:\r\n //?? javax.xml.transform.TransformerConfigurationException: \r\n //?? javax.xml.transform.TransformerException: \r\n //?? javax.xml.transform.TransformerException: \r\n //?? xsl:xxxsort is not allowed in this position in the stylesheet!\r\n //??\r\n //?? For warnings, the stdout text looks like:\r\n //?? Compiler warnings:\r\n //?? Illegal attribute 'cxxxase-order'.\r\n //?? and no exception is thrown instead of it throwing \r\n //?? TransformerConfigurationException:\r\n //?? with the value of TransformerConfigurationException.getMessage() \r\n //?? being: \r\n //?? javax.xml.transform.TransformerConfigurationException: \r\n //?? javax.xml.transform.TransformerException: \r\n //?? javax.xml.transform.TransformerException: \r\n //?? \"cxxxase-order\" attribute is not allowed on the xsl:sort element!\r\n //?? \r\n //?? When xalan.jar precedes them in the CLASSPATH:\r\n //?? C:\\Apps\\Apache\\xalan-j_2_7_1\\xalan.jar\r\n //?? C:\\Apps\\Apache\\xalan-j_2_7_1\\xercesImpl.jar\r\n //?? C:\\Apps\\Apache\\xalan-j_2_7_1\\xml-apis.jar \r\n //?? there is no exception on errors either, and the stdout text looks\r\n //?? like:\r\n //?? D:\\Fred\\bristle\\javaapps\\xmltrans\\Testing\\Actual\\dummy.xsl; \r\n //?? Line #0; Column #0; xsl:xxxsort is not allowed in this position \r\n //?? in the stylesheet!\r\n //?? or:\r\n //?? D:\\Fred\\bristle\\javaapps\\xmltrans\\Testing\\Actual\\dummy.xsl; \r\n //?? Line #0; Column #0; \"cxxxase-order\" attribute is not allowed \r\n //?? on the xsl:sort element!\r\n //??\r\n //?? Should find a better parser perhaps.\r\n //??\r\n transformer.transform(new DOMSource(xmlXML), xmlResult);\r\n return xmlResult.getNode();\r\n }",
"public void transformToSecondXml();",
"public static String wrapInXSLStylesheet(String strXSL)\r\n {\r\n return \r\n \"<?xml version='1.0' ?>\\n\"\r\n + \"<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform'\\n\"\r\n + \" version='1.0'>\\n\"\r\n + strXSL\r\n + \"</xsl:stylesheet>\\n\"\r\n ;\r\n }",
"private CommonConfigBean(){\n\t\tsuper();\n\t\t\n\t\t\n\t\ttry {\n\n\t\t\tFile fXmlFile = new File(PathTool.getAbsolute(RELATIVE_FILE_PATH));\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n\t\t\tDocument doc = dBuilder.parse(fXmlFile);\n\t\t\t\t\t\n\t\t\t//optional, but recommended\n\t\t\t//read this - http://stackoverflow.com/questions/13786607/normalization-in-dom-parsing-with-java-how-does-it-work\n\t\t\tdoc.getDocumentElement().normalize();\n\n\t\t\tSystem.out.println(\"Root element :\" + doc.getDocumentElement().getNodeName());\n\t NodeList nList = doc.getElementsByTagName(\"param\");\n\t params = new HashMap<>();\n\t for (int temp = 0; temp < nList.getLength(); temp++) {\n\t Node nodo = nList.item(temp);\n\t System.out.println(\"Elemento:\" + nodo.getNodeName());\n\t if (nodo.getNodeType() == Node.ELEMENT_NODE) {\n\t Element element = (Element) nodo;\n\t params.put(element.getAttribute(\"name\"), element.getAttribute(\"value\"));\n\t }\n\t }\n\t\t\t\n\t\t\t\n\t\t } catch (Exception e) {\n\t\t \te.printStackTrace();\n\t\t }\n\t}",
"@Override\n public void configureForXmlConformance() {\n mConfig.configureForXmlConformance();\n }",
"public static void transform(final String xmlSource, final String xslFilePath, final boolean doCacheXsl,\r\n final Writer out) {\r\n transform(xmlSource, xslFilePath, 0L, doCacheXsl, out);\r\n }",
"protected void setupParameters() {\n \n \n\n }",
"public void executeDsl();",
"private XSLTTransformerFactory() {\r\n\t}",
"void setParameters() {\n\t\t\n\t}",
"@Override\n\tpublic void configure() {\n\t\tfrom(\"switchyard://EnrichService\").log(\"Received message for 'EnrichService' : ${body}\").process(new Processor() {\n\n\t\t\t@Override\n\t\t\tpublic void process(Exchange exchange) throws Exception {\n\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\tList<AdaptationTO> adaptationDirective = exchange.getIn().getHeader(\"adaptationDirective\", List.class);\n\t\t\t\tString message = (String)exchange.getIn().getBody();\n\t\t\t\t\n\t\t\t\tString xslt = (String) adaptationDirective.get(0).getData();\n\t\t\t\tStringReader reader = new StringReader(message);\n\t\t\t\tStringWriter writer = new StringWriter();\n\t\t\t\ttry {\n\t\t\t\t\tTemplates templates = tFactory.newTemplates(new StreamSource(new StringReader(xslt)));\n\t\t\t\t\tjavax.xml.transform.Transformer transformer = templates.newTransformer();\n\t\t\t\t\ttransformer.transform(new StreamSource(reader), new StreamResult(writer));\n\t\t\t\t\tmessage = writer.toString();\n\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tadaptationDirective.remove(0);\n\t\t\t\texchange.getIn().setBody(message);\n\t\t\t}\n\t\t}).log(\"Enrich body : ${body}\");\n\t\t;\n\t}",
"@Override\n protected void elaboraParametri() {\n super.elaboraParametri();\n titoloPagina = TITOLO_PAGINA;\n }",
"public void setConfigurationContext(org.apache.axis2.context.xsd.ConfigurationContext param){\n localConfigurationContextTracker = true;\n \n this.localConfigurationContext=param;\n \n\n }",
"public static String getIdentityTransformationStylesheetString()\r\n {\r\n return wrapInXSLStylesheet(getIdentityTransformationTemplateString());\r\n }",
"protected void setPropagationEffectParams() {\n\n\t\tif ( (this.site != null) && (this.eqkRupture != null)) {\n\t\t\tdistanceJBParam.setValue(eqkRupture, site);\n\t\t}\n\t}",
"public boolean setIndividualParamValueFromXML(Element el) {\n\t\treturn false;\n\t}",
"@Override\n public void toXml(XmlContext xc) {\n\n }",
"public static void transform(final String xmlSource, final String xslFilePath, final long lastModified,\r\n final boolean doCacheXsl, final Writer out) {\r\n if (logB.isDebugEnabled()) {\r\n logB.debug(\"XmlFactory.transform : enter : xslFilePath : \" + xslFilePath);\r\n }\r\n\r\n if ((xmlSource != null) && (xslFilePath != null)) {\r\n Transformer tf = null;\r\n\r\n if (doCacheXsl) {\r\n tf = loadXsl(xslFilePath);\r\n } else {\r\n final File file = new File(xslFilePath);\r\n\r\n tf = newTransformer(new StreamSource(file));\r\n }\r\n\r\n if (tf != null) {\r\n if (lastModified > 0L) {\r\n tf.setParameter(\"lastModified\", String.valueOf(lastModified));\r\n }\r\n\r\n if (logB.isDebugEnabled()) {\r\n logB.debug(\"XmlFactory.transform : XML Source : \" + xmlSource);\r\n }\r\n\r\n asString(tf, new StreamSource(new StringReader(xmlSource)), out);\r\n }\r\n }\r\n\r\n if (logB.isDebugEnabled()) {\r\n logB.debug(\"XmlFactory.transform : exit : \" + out);\r\n }\r\n }",
"@Override\n\tprotected void setParameterValues() {\n\t}",
"protected void processContextParameters()\n {\n JBossWebMetaData local = metaDataLocal.get();\n JBossWebMetaData shared = metaDataShared.get();\n\n Map<String, String> overrideParams = new HashMap<String, String>();\n\n List<ParamValueMetaData> params = local.getContextParams();\n if (params != null)\n {\n for (ParamValueMetaData param : params)\n {\n overrideParams.put(param.getParamName(), param.getParamValue());\n }\n }\n params = shared.getContextParams();\n if (params != null)\n {\n for (ParamValueMetaData param : params)\n {\n if (overrideParams.get(param.getParamName()) == null)\n {\n overrideParams.put(param.getParamName(), param.getParamValue());\n }\n }\n }\n\n for (String key : overrideParams.keySet())\n {\n context.addParameter(key, overrideParams.get(key));\n }\n\n }",
"public void setRootContext(org.apache.axis2.context.xsd.ConfigurationContext param){\n localRootContextTracker = true;\n \n this.localRootContext=param;\n \n\n }",
"protected void startCfgElement(String qName, Attributes attributes) throws SAXException {\n\t\tif (CONFIG_ROOT_ELMT.equals(qName)) {\n\t\t\tif (streamsConfigData.isStreamsAvailable()) {\n\t\t\t\tthrow new SAXParseException(StreamsResources.getStringFormatted(StreamsResources.RESOURCE_BUNDLE_NAME,\n\t\t\t\t\t\t\"ConfigParserHandler.multiple.elements\", qName), currParseLocation);\n\t\t\t}\n\t\t} else if (PROPERTY_ELMT.equals(qName)) {\n\t\t\tprocessProperty(attributes);\n\t\t} else if (FIELD_ELMT.equals(qName)) {\n\t\t\tprocessField(attributes);\n\t\t} else if (FIELD_LOC_ELMT.equals(qName)) {\n\t\t\tprocessFieldLocator(attributes);\n\t\t} else if (FIELD_MAP_ELMT.equals(qName)) {\n\t\t\tprocessFieldMap(attributes);\n\t\t} else if (PARSER_REF_ELMT.equals(qName)) {\n\t\t\tprocessParserRef(attributes);\n\t\t} else if (PARSER_ELMT.equals(qName)) {\n\t\t\tprocessParser(attributes);\n\t\t} else if (STREAM_ELMT.equals(qName)) {\n\t\t\tprocessStream(attributes);\n\t\t} else if (FILTER_ELMT.equals(qName)) {\n\t\t\tprocessFilter(attributes);\n\t\t} else if (VALUE_ELMT.equals(qName)) {\n\t\t\tprocessValue(attributes);\n\t\t} else if (EXPRESSION_ELMT.equals(qName)) {\n\t\t\tprocessFilterExpression(attributes);\n\t\t} else if (TNT4J_PROPERTIES_ELMT.equals(qName)) {\n\t\t\tprocessTNT4JProperties(attributes);\n\t\t} else if (REF_ELMT.equals(qName)) {\n\t\t\tprocessReference(attributes);\n\t\t} else if (JAVA_OBJ_ELMT.equals(qName)) {\n\t\t\tprocessJavaObject(attributes);\n\t\t} else if (PARAM_ELMT.equals(qName)) {\n\t\t\tprocessParam(attributes);\n\t\t} else if (FIELD_TRANSFORM_ELMT.equals(qName)) {\n\t\t\tprocessFieldTransform(attributes);\n\t\t} else if (EMBEDDED_ACTIVITY_ELMT.equals(qName)) {\n\t\t\tprocessEmbeddedActivity(attributes);\n\t\t} else if (CACHE_ELMT.equals(qName)) {\n\t\t\tprocessCache(attributes);\n\t\t} else if (CACHE_ENTRY_ELMT.equals(qName)) {\n\t\t\tprocessCacheEntry(attributes);\n\t\t} else if (CACHE_KEY_ELMT.equals(qName)) {\n\t\t\tprocessKey(attributes);\n\t\t} else if (FIELD_MAP_REF_ELMT.equals(qName)) {\n\t\t\tprocessFieldMapReference(attributes);\n\t\t} else if (RESOURCE_REF_ELMT.equals(qName)) {\n\t\t\tprocessResourceReference(attributes);\n\t\t} else if (CACHE_DEFAULT_VALUE_ELMT.equals(qName)) {\n\t\t\tprocessDefault(attributes);\n\t\t} else if (MATCH_EXP_ELMT.equals(qName)) {\n\t\t\tprocessMatchExpression(attributes);\n\t\t} else {\n\t\t\tthrow new SAXParseException(StreamsResources.getStringFormatted(StreamsResources.RESOURCE_BUNDLE_NAME,\n\t\t\t\t\t\"ConfigParserHandler.unknown.tag\", qName), currParseLocation);\n\t\t}\n\t}",
"protected void extract() {\n\t\tfor (ITSState nodeState : doc.iterNodes()) {\n\t\t\tNode node = nodeState.node;\n\t\t\tRuleResolver resolver = resolvers.get(node.getNodeName()); \n\t\t\tif (resolver != null) {\n\t\t\t\tGlobalRule rule = resolver.extractRule(attrReader, parameters, nodeState.node);\n\t\t\t\tapplyRule(resolver, rule);\n\t\t\t}\n\t\t\t\n\t\t\tif (node.getNodeName().equals(\"its:param\")) {\n\t\t\t\tString name = node.getAttributes().getNamedItem(\"name\").getNodeValue();\n\t\t\t\tString value = node.getTextContent();\n\t\t\t\tparameters.add(name, value);\n\t\t\t} else if (attrReader.dialect.isRules(node)) { \n\t\t\t\t// we have external link (xlink:href or link href)\n\t\t\t\tString external = attrReader.dialect.getExternalRules(node);\n\t\t\t\tif (external != null) {\n\t\t\t\t\textractExternalRules(external);\n\t\t\t\t}\n\t\t\t} else if (node.getNodeName().equals(\"script\")) {\n\t\t\t\t// we have embedded\n\t\t\t\tif (node.hasAttributes()) {\n\t\t\t\t\tif (node.getAttributes().getNamedItem(\"type\").getNodeValue().equals(\"application/its+xml\")) {\n\t\t\t\t\t\textractEmbeddedRules(node.getTextContent());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!nodeState.nodePath.contains(\"its:rules\")) {\n\t\t\t\t// unless we're in rules, look at local annotations\n\t\t\t\t// LOCAL\n\t\t\t\textractLocal(nodeState);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// process inheritance\n\t\tfor (ITSState nodeState : doc.iterNodes()) {\n\t\t\t// Elements: handle inheritance \n\t\t\tITSData parentData = getParentState(nodeState);\n\t\t\tif (parentData != null) {\n\t\t\t\t// inherit from parent\n\t\t\t\tITSData thisData = nodeItsData.get(nodeState.nodePath);\n\t\t\t\tif (thisData == null) {\n\t\t\t\t\tthisData = new ITSData();\n\t\t\t\t\tapplyRuleToNode(nodeState.nodePath, thisData);\n\t\t\t\t} \n\t\t\t\tthisData.inherit(parentData);\t\t\t\t\n\t\t\t}\t\n\t\t\t\t\t\t\n\t\t} \n\t\t\n\t\t\n\t}",
"private void populateFilter() throws TransformerConfigurationException\r\n\t{\r\n\t\tthis.filter = new AddressSet(\"./filtered.xml\");\r\n\t\tthis.filter.addElement(\"postmaster\");\r\n\t\tthis.filter.addElement(\"uucp\");\r\n\t\tthis.filter.addElement(\"mailer-daemon\");\r\n\t\tthis.filter.addElement(\"maildaemon\");\r\n\t\tthis.filter.addElement(\"majordomo\");\r\n\t\tthis.filter.addElement(\"mailerdaemon\");\r\n\t\tthis.filter.addElement(\"abuse@\");\r\n\t\tthis.filter.addElement(\"-relay\");\r\n\t\tthis.filter.addElement(\"-request@\");\r\n\t}",
"public String generateXml(Map<String, Object> parameters, String service, String version) throws TransformersException {\n\t\treturn generateXml(parameters, service, getMethodName(service), version);\n\t}",
"public XmlElement replaceParams(XmlElement xmlReports, XmlElement xmlParams)\n {\n XmlHelper.replaceSystemProperties(xmlReports, \"system-property\");\n XmlElement xmlParseParams = new SimpleElement();\n if (xmlParams != null)\n {\n XmlHelper.transformInitParams(xmlParseParams, xmlParams);\n }\n replaceInitParams(xmlReports, xmlParseParams);\n return xmlReports;\n }",
"private void setXscale() {\n\t}",
"Registry getDslRegistry();",
"public SimpleXMLPipelineConfiguration() {\n configurations = new HashMap();\n }",
"private void setTemporaryExpression(String parameterName, String expression) throws SAXException {\n Parameter parameter = currentNode.getParameter(parameterName);\n if (parameter == null)\n throw new SAXException(\"Node \" + currentNode.getName() + \" has no parameter '\" + parameterName + \"'\");\n expressionMap.put(parameter, expression);\n }",
"private void setPageSettings() {\n\n List<Element> paragraphs = br.ufrgs.artic.utils.FileUtils.getElementsByTagName(\"para\", omniPageXMLDocument.getDocumentElement());\n\n int lineCounter = 0;\n int fontSizeSum = 0;\n if (paragraphs != null && !paragraphs.isEmpty()) {\n\n int biggestTop = 0;\n int biggestLeft = 0;\n for (Element paragraphElement : paragraphs) {\n\n List<Element> linesOfParagraph = br.ufrgs.artic.utils.FileUtils.getElementsByTagName(\"ln\", paragraphElement);\n\n if (linesOfParagraph != null && !linesOfParagraph.isEmpty()) {\n for (Element lineElement : linesOfParagraph) {\n String fontFace = lineElement.getAttribute(\"fontFace\");\n\n if (fontFace == null || fontFace.isEmpty()) { //if yes, start run merge process\n augmentLineElement(lineElement);\n }\n\n if (lineElement.getAttribute(\"t\") != null && !lineElement.getAttribute(\"t\").isEmpty() &&\n lineElement.getAttribute(\"l\") != null && !lineElement.getAttribute(\"l\").isEmpty()) {\n int top = Integer.parseInt(lineElement.getAttribute(\"t\").replaceAll(\",\", \"\\\\.\"));\n\n if (top > biggestTop) {\n biggestTop = top;\n }\n\n int left = Integer.parseInt(lineElement.getAttribute(\"l\").replaceAll(\",\", \"\\\\.\"));\n\n if (left > biggestLeft) {\n biggestLeft = left;\n }\n }\n\n double fontSize = 0;\n if (lineElement.getAttribute(\"fontSize\") != null && !lineElement.getAttribute(\"fontSize\").isEmpty()) {\n fontSize = Double.valueOf(lineElement.getAttribute(\"fontSize\").replaceAll(\",\", \"\\\\.\"));\n }\n\n\n fontSizeSum += fontSize;\n lineCounter++;\n }\n }\n }\n\n averagePageFontSize = (double) fontSizeSum / lineCounter;\n\n topBucketSize = (biggestTop / 8) + 1;\n leftBucketSize = (biggestLeft / 8) + 1;\n } else {\n averagePageFontSize = null;\n }\n\n\n }",
"@Override\r\n protected void addParameters() {\r\n super.addParameters();\r\n addParameter(new AlgorithmParameter(\r\n PARAMETER_CENTER_TEMPLATES,\r\n GT._T(\"Possible replacements for {0} tags\", HtmlTagType.CENTER.getOpenTag()),\r\n new AlgorithmParameterElement[] {\r\n new AlgorithmParameterElement(\r\n \"template name\",\r\n GT._T(\"Template for replacing {0} tag\", HtmlTagType.CENTER.getOpenTag())),\r\n new AlgorithmParameterElement(\r\n \"parameter name\",\r\n GT._T(\"Parameter to use in the template for the text\"),\r\n true),\r\n new AlgorithmParameterElement(\r\n \"true/false\",\r\n GT._T(\"If replacement can be automatic\"),\r\n true),\r\n new AlgorithmParameterElement(\r\n \"explanation\",\r\n GT._T(\"Description of the template\"),\r\n true)\r\n },\r\n true));\r\n addParameter(new AlgorithmParameter(\r\n PARAMETER_STRIKE_TEMPLATES,\r\n GT._T(\"Possible replacements for {0} tags\", HtmlTagType.STRIKE.getOpenTag()),\r\n new AlgorithmParameterElement[] {\r\n new AlgorithmParameterElement(\r\n \"template name\",\r\n GT._T(\"Template for replacing {0} tag\", HtmlTagType.STRIKE.getOpenTag())),\r\n new AlgorithmParameterElement(\r\n \"parameter name\",\r\n GT._T(\"Parameter to use in the template for the text\"),\r\n true),\r\n new AlgorithmParameterElement(\r\n \"true/false\",\r\n GT._T(\"If replacement can be automatic\"),\r\n true),\r\n new AlgorithmParameterElement(\r\n \"explanation\",\r\n GT._T(\"Description of the template\"),\r\n true)\r\n },\r\n true));\r\n addParameter(new AlgorithmParameter(\r\n PARAMETER_TT_TEMPLATES,\r\n GT._T(\"Possible replacements for {0} tags\", HtmlTagType.TT.getOpenTag()),\r\n new AlgorithmParameterElement[] {\r\n new AlgorithmParameterElement(\r\n \"template name\",\r\n GT._T(\"Template for replacing {0} tag\", HtmlTagType.TT.getOpenTag())),\r\n new AlgorithmParameterElement(\r\n \"parameter name\",\r\n GT._T(\"Parameter to use in the template for the text\"),\r\n true),\r\n new AlgorithmParameterElement(\r\n \"true/false\",\r\n GT._T(\"If replacement can be automatic\"),\r\n true),\r\n new AlgorithmParameterElement(\r\n \"explanation\",\r\n GT._T(\"Description of the template\"),\r\n true)\r\n },\r\n true));\r\n }",
"MyDslFactory getMyDslFactory();",
"public void configure() {\n\n // here is a sample which processes the input files\n // (leaving them in place - see the 'noop' flag)\n // then performs content based routing on the message using XPath\n\n }",
"public PXStylesheetParser() {\n this(null);\n }",
"public void setParams(Properties lparams, int indice) throws WSException {\n\t\tTxParams consulta = new TxParams();\r\n\t\t//Crea la lista de parametros de entrada\r\n\t\t// El offset permite a los parametros de salida poseer un indice que comience donde se acaban los parametros de entrada\r\n\t\tint offset = 1;\r\n\t\ttry {\r\n\t\t\tnInparams = (String[])nparamsIn.get(indice);\r\n\t\t\tif (nInparams != null) {\r\n\t\t\t\tinParams = new Properties();\r\n\t\t\t\tfor (int i = 0; i < this.nInparams.length; i++) {\r\n\t\t\t\t\t//Se coloca como llave el indice para asi poder registrar en forma correcta los parametros\r\n\t\t\t\t\tConsSQLparams aux = (ConsSQLparams) lparams.get(nInparams[i]);\r\n\t\t\t\t\tif (aux == null)\r\n\t\t\t\t\t\tthrow new WSException(\"No se encontro el parametro \" + nInparams[i] + \" Revisar los parametros en el XML\");\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tConsParamsX parm = new ConsParamsX(aux.nomparam,aux.typeparam);\r\n\t\t\t\t\t\tinParams.put(new Integer(i + 1), parm);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Solo si hay parametros de entrada se suma el valor del ultimo indice\r\n\t\t\t\toffset = this.nInparams.length + 1;\r\n\t\t\t}\r\n\t\t\tnOutparams = (String[])nparamsOut.get(indice);\r\n\t\t\tif (nOutparams != null) {\r\n\t\t\t\toutParams = new Properties();\r\n\t\t\t\t//Crea la lista de parametros de salida\r\n\t\t\t\tfor (int i = 0; i < nOutparams.length; i++) {\r\n\t\t\t\t\t//Se coloca como llave el indice para asi poder registrar en forma correcta los parametros\r\n\t\t\t\t\t// Ojo que aca se suma el offset\r\n\t\t\t\t\toutParams.put(new Integer(i + offset), lparams.get(nOutparams[i]));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//Coloco los parametros de entrada y salida (sin valores todavia) de esta consulta en su respectiva clase\r\n\t\t\tconsulta.getParams().entrada = inParams;\r\n\t\t\tconsulta.getParams().salida = outParams;\r\n\t\t\t//Agrego la consulta a la lista contenida en esta transaccion\r\n\t\t\ttodo.add(consulta);\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tthrow new WSException(\"Clase: ConsultaTX Error: Error al cargar los objetos de parametros de entrada y de salida Msg: \" + e.getMessage());\r\n\t\t}\r\n\t}",
"public XMLEventProtocolParameters() {\n super(XMLEventProtocolParameters.class.getCanonicalName());\n\n // Set the event protocol properties for the XML event protocol\n this.setLabel(XML_EVENT_PROTOCOL_LABEL);\n\n // Set the starting and ending delimiters for text blocks of XML events\n this.setDelimiterToken(XML_TEXT_DELIMITER_TOKEN);\n\n // Set the event protocol plugin class\n this.setEventProtocolPluginClass(Apex2XMLEventConverter.class.getCanonicalName());\n }",
"@Override\n\tpublic void toPdf(File propisXml, File propisXsl) throws SAXException,\n\t\t\tIOException, TransformerConfigurationException,\n\t\t\tTransformerException {\n\t\tFopFactory fopFactory = FopFactory.newInstance(new File(\"data\\\\xml\\\\fop.xconf\"));\n\t\t\n\t\t// Setup the XSLT transformer factory\n\t\tTransformerFactory transformerFactory = new TransformerFactoryImpl();\n\t\t\n\t\t// Point to the XSL-FO file\n\t\tFile xsltFile = propisXsl;\n\n\t\t// Create transformation source\n\t\tStreamSource transformSource = new StreamSource(xsltFile);\n\t\t\n\t\tStreamSource source = new StreamSource(propisXml);\n\t\t\n\t\t//proba--------------------------\n\t\tScanner scanner = new Scanner(propisXsl);\n\t\tString text = scanner.useDelimiter(\"\\\\A\").next();\n\t\tscanner.close(); // Put this call in a finally block\n\t\tSystem.out.println(text);\n\n\t\t// Initialize user agent needed for the transformation\n\t\tFOUserAgent userAgent = fopFactory.newFOUserAgent();\n\t\t\n\t\t// Create the output stream to store the results\n\t\tByteArrayOutputStream outStream = new ByteArrayOutputStream();\n\n\t\t// Initialize the XSL-FO transformer object\n\t\tTransformer xslFoTransformer = transformerFactory.newTransformer(transformSource);\n\t\t\n\t\t// Construct FOP instance with desired output format\n\t\tFop fop = fopFactory.newFop(MimeConstants.MIME_PDF, userAgent, outStream);\n\n\t\t// Resulting SAX events \n\t\tResult res = new SAXResult(fop.getDefaultHandler());\n\n\t\t// Start XSLT transformation and FOP processing\n\t\txslFoTransformer.transform(source, res);\n\n\t\t// Generate PDF file\n\t\tFile pdfFile = new File(\"data/pdf/propisPDF.pdf\");\n\t\tOutputStream out = new BufferedOutputStream(new FileOutputStream(pdfFile));\n\t\tout.write(outStream.toByteArray());\n\n\t\tSystem.out.println(\"[INFO] File \\\"\" + pdfFile.getCanonicalPath() + \"\\\" generated successfully.\");\n\t\tout.close();\n\t\t\n\t\tSystem.out.println(\"[INFO] End.\");\n\t\t\n\t}",
"private void configure() {\r\n LogManager manager = LogManager.getLogManager();\r\n String className = this.getClass().getName();\r\n String level = manager.getProperty(className + \".level\");\r\n String filter = manager.getProperty(className + \".filter\");\r\n String formatter = manager.getProperty(className + \".formatter\");\r\n\r\n //accessing super class methods to set the parameters\r\n\r\n\r\n }",
"public void setLocalXSLT(String localXSLT) {\r\n\t\tthis.localXSLT=localXSLT;\r\n\t}",
"public void setInputXml(java.lang.String param) {\r\n localInputXmlTracker = param != null;\r\n\r\n this.localInputXml = param;\r\n }",
"public void setInputXml(java.lang.String param) {\r\n localInputXmlTracker = param != null;\r\n\r\n this.localInputXml = param;\r\n }",
"private static XStream createXStream(){\r\n\t\tXStream xstream = new XStream();\r\n\t\txstream.alias(\"configuration\", FilterConfig.class);\r\n\t\txstream.alias(\"filter\", FilterEnumeration.class);\r\n\t\txstream.alias(\"displayable\", DisplayableValue.class);\r\n\t\treturn xstream;\r\n\t}",
"public void setParameters(Properties props) {\n\n\t}",
"public void setRequestXml(org.apache.axis2.databinding.types.soapencoding.String param){\n \n this.localRequestXml=param;\n \n\n }",
"public void setRequestXml(org.apache.axis2.databinding.types.soapencoding.String param){\n \n this.localRequestXml=param;\n \n\n }",
"public void setRequestXml(org.apache.axis2.databinding.types.soapencoding.String param){\n \n this.localRequestXml=param;\n \n\n }",
"public void setRequestXml(org.apache.axis2.databinding.types.soapencoding.String param){\n \n this.localRequestXml=param;\n \n\n }",
"public void setRequestXml(org.apache.axis2.databinding.types.soapencoding.String param){\n \n this.localRequestXml=param;\n \n\n }",
"public void setRequestXml(org.apache.axis2.databinding.types.soapencoding.String param){\n \n this.localRequestXml=param;\n \n\n }",
"public void setRequestXml(org.apache.axis2.databinding.types.soapencoding.String param){\n \n this.localRequestXml=param;\n \n\n }",
"public void setRequestXml(org.apache.axis2.databinding.types.soapencoding.String param){\n \n this.localRequestXml=param;\n \n\n }",
"public void setRequestXml(org.apache.axis2.databinding.types.soapencoding.String param){\n \n this.localRequestXml=param;\n \n\n }",
"public void setRequestXml(org.apache.axis2.databinding.types.soapencoding.String param){\n \n this.localRequestXml=param;\n \n\n }",
"public void setRequestXml(org.apache.axis2.databinding.types.soapencoding.String param){\n \n this.localRequestXml=param;\n \n\n }",
"public ModelXSLTWriter(Templates templates)\n {\n\tif (templates == null) throw new IllegalArgumentException(\"Templates cannot be null\");\n\tthis.templates = templates;\n }",
"protected void renderXML(long charId, Locale locale, Map<String, String[]> params, HttpServletResponse response)\n throws FOPException, TransformerException, IOException {\n\n \tGameCharacter character = lookupCharacterById(charId, locale, params);\n\n \t\n // Source\n JAXBSource xmlSrc;\n\t\ttry {\n\t\t\tJAXBContext jc = JAXBContext.newInstance(character.getClass());\n\t\t\txmlSrc = new JAXBSource(jc, character);\n\t\t} catch (JAXBException e) {\n\t\t\tthrow new WebApplicationException(e);\n\t\t}\n \n\t\tFile xslFile = getCharacterSheetFile(character.getGame().getStylesheet(), locale);\n\t\t\n\t\tSource xslSource = new StreamSource(xslFile);\n//\t\tSource xslSource = new StreamSource(new File(xslPath, \"fochain.xsl\"));\n\n //Setup the XSL transformation\n Transformer transformer = this.transFactory.newTransformer(xslSource);\n// transformer.setParameter(\"filesdir\", character.getGame().getStylesheet());\n transformer.setURIResolver(this.uriResolver);\n\n //Start transformation and rendering process\n render(xmlSrc, transformer, response);\n }",
"private Map<String, Object> buildResourcesParameters() {\n Map<String, Object> parameters = new HashMap<String, Object>();\n \n parameters.put(\"portalSiteSelectedNodes\", getSelectedResources(StagingService.SITES_PORTAL_PATH));\n parameters.put(\"groupSiteSelectedNodes\", getSelectedResources(StagingService.SITES_GROUP_PATH));\n parameters.put(\"userSiteSelectedNodes\", getSelectedResources(StagingService.SITES_USER_PATH));\n parameters.put(\"siteContentSelectedNodes\", getSelectedResources(StagingService.CONTENT_SITES_PATH));\n parameters.put(\"applicationCLVTemplatesSelectedNodes\", getSelectedResources(StagingService.ECM_TEMPLATES_APPLICATION_CLV_PATH));\n parameters.put(\"applicationSearchTemplatesSelectedNodes\", getSelectedResources(StagingService.ECM_TEMPLATES_APPLICATION_SEARCH_PATH));\n parameters.put(\"documentTypeTemplatesSelectedNodes\", getSelectedResources(StagingService.ECM_TEMPLATES_DOCUMENT_TYPE_PATH));\n parameters.put(\"metadataTemplatesSelectedNodes\", getSelectedResources(StagingService.ECM_TEMPLATES_METADATA_PATH));\n parameters.put(\"taxonomySelectedNodes\", getSelectedResources(StagingService.ECM_TAXONOMY_PATH));\n parameters.put(\"querySelectedNodes\", getSelectedResources(StagingService.ECM_QUERY_PATH));\n parameters.put(\"driveSelectedNodes\", getSelectedResources(StagingService.ECM_DRIVE_PATH));\n parameters.put(\"scriptSelectedNodes\", getSelectedResources(StagingService.ECM_SCRIPT_PATH));\n parameters.put(\"actionNodeTypeSelectedNodes\", getSelectedResources(StagingService.ECM_ACTION_PATH));\n parameters.put(\"nodeTypeSelectedNodes\", getSelectedResources(StagingService.ECM_NODETYPE_PATH));\n parameters.put(\"registrySelectedNodes\", getSelectedResources(StagingService.REGISTRY_PATH));\n parameters.put(\"viewTemplateSelectedNodes\", getSelectedResources(StagingService.ECM_VIEW_TEMPLATES_PATH));\n parameters.put(\"viewConfigurationSelectedNodes\", getSelectedResources(StagingService.ECM_VIEW_CONFIGURATION_PATH));\n parameters.put(\"userSelectedNodes\", getSelectedResources(StagingService.USERS_PATH));\n parameters.put(\"groupSelectedNodes\", getSelectedResources(StagingService.GROUPS_PATH));\n parameters.put(\"roleSelectedNodes\", getSelectedResources(StagingService.ROLE_PATH));\n \n parameters.put(\"selectedResources\", selectedResources);\n parameters.put(\"selectedOptions\", selectedOptions);\n \n return parameters;\n }",
"void xsetLastrunresult(org.apache.xmlbeans.XmlString lastrunresult);",
"public interface XmlConstants \n{\n /** Namespace for the net.iharder.xml package: http://iharder.net/xmlizable */\n public final static String NAMESPACE = \"http://iharder.net/xmlizable\";\n \n /** Default location of XSL file for simple representation of xmlized objects. */\n public final static String DEFAULT_XSL_URL = \"http://iharder.net/xmlizable/xsl/default.xsl\";\n \n \n /* The XML element <tt>object</tt> */\n public final static String OBJECT = \"object\";\n \n /* The XML element <tt>primitive</tt> */\n public final static String PRIMITIVE = \"primitive\";\n \n /* The XML element <tt>object-array</tt> */\n public final static String OBJECT_ARRAY = \"object-array\";\n \n /* The XML element <tt>primitive-array</tt> */\n public final static String PRIMITIVE_ARRAY = \"primitive-array\";\n \n /* The XML element <tt>array-array</tt> */\n public final static String ARRAY_ARRAY = \"array-array\";\n \n /* The XML element <tt>null</tt> */\n public final static String NULL = \"null\";\n \n \n \n /* The XML element <tt>o</tt>, condensed form of <tt>object</tt> */\n public final static String OBJECT_C = \"o\";\n \n /* The XML element <tt>p</tt>, condensed form of <tt>primitive</tt> */\n public final static String PRIMITIVE_C = \"p\";\n \n /* The XML element <tt>oa</tt>, condensed form of <tt>object-array</tt> */\n public final static String OBJECT_ARRAY_C = \"oa\";\n \n /* The XML element <tt>pa</tt>, condensed form of <tt>primitive-array</tt> */\n public final static String PRIMITIVE_ARRAY_C = \"pa\";\n \n /* The XML element <tt>aa</tt>, condensed form of <tt>array-array</tt> */\n public final static String ARRAY_ARRAY_C = \"aa\";\n \n /* The XML element <tt>n</tt>, condensed form of <tt>null</tt> */\n public final static String NULL_C = \"n\";\n \n \n /* The XML attribute <tt>class</tt> */\n public final static String CLASS = \"class\";\n \n /* The XML attribute <tt>type</tt> */\n public final static String TYPE = \"type\";\n \n /* The XML attribute <tt>length</tt> */\n public final static String LENGTH = \"length\";\n \n /* The XML attribute <tt>encoding</tt> */\n public final static String ENCODING = \"encoding\";\n \n \n /* The XML attribute <tt>c</tt>, condensed form of <tt>class</tt> */\n public final static String CLASS_C = \"c\";\n \n /* The XML attribute <tt>t</tt>, condensed form of <tt>type</tt> */\n public final static String TYPE_C = \"t\";\n \n /* The XML attribute <tt>t</tt>, condensed form of <tt>type</tt> */\n public final static String LENGTH_C = \"le\";\n \n /* The XML attribute <tt>en</tt>, condensed form of <tt>encoding</tt> */\n public final static String ENCODING_C = \"en\";\n \n \n \n /* The XML \"type\" attribute value <tt>boolean</tt> */\n public final static String BOOLEAN = \"boolean\";\n \n /* The XML \"type\" attribute value <tt>byte</tt> */\n public final static String BYTE = \"byte\";\n \n /* The XML \"type\" attribute value <tt>char</tt> */\n public final static String CHAR = \"char\";\n \n /* The XML \"type\" attribute value <tt>short</tt> */\n public final static String SHORT = \"short\";\n \n /* The XML \"type\" attribute value <tt>int</tt> */\n public final static String INT = \"int\";\n \n /* The XML \"type\" attribute value <tt>long</tt> */\n public final static String LONG = \"long\";\n \n /* The XML \"type\" attribute value <tt>float</tt> */\n public final static String FLOAT = \"float\";\n \n /* The XML \"type\" attribute value <tt>double</tt> */\n public final static String DOUBLE = \"double\";\n \n /* The XML \"type\" attribute value <tt>array</tt> */\n public final static String ARRAY = \"array\";\n \n /* The XML \"encoding\" attribute value <tt>base64</tt> */\n public final static String BASE64 = \"base64\";\n \n \n /* The XML \"type\" attribute value <tt>bo</tt>, condensed form of <tt>boolean</tt> */\n public final static String BOOLEAN_C = \"bo\";\n \n /* The XML \"type\" attribute value <tt>by</tt>, condensed form of <tt>byte</tt> */\n public final static String BYTE_C = \"by\";\n \n /* The XML \"type\" attribute value <tt>c</tt>, condensed form of <tt>char</tt> */\n public final static String CHAR_C = \"c\";\n \n /* The XML \"type\" attribute value <tt>s</tt>, condensed form of <tt>short</tt> */\n public final static String SHORT_C = \"s\";\n \n /* The XML \"type\" attribute value <tt>i</tt>, condensed form of <tt>int</tt> */\n public final static String INT_C = \"i\";\n \n /* The XML \"type\" attribute value <tt>lo</tt>, condensed form of <tt>long</tt> */\n public final static String LONG_C = \"lo\";\n \n /* The XML \"type\" attribute value <tt>f</tt>, condensed form of <tt>float</tt> */\n public final static String FLOAT_C = \"f\";\n \n /* The XML \"type\" attribute value <tt>d</tt>, condensed form of <tt>double</tt> */\n public final static String DOUBLE_C = \"d\";\n \n /* The XML \"type\" attribute value <tt>a</tt>, condensed form of <tt>array</tt> */\n public final static String ARRAY_C = \"a\";\n \n /* The XML \"encoding\" attribute value <tt>base64</tt>, condensed form of <tt>base64</tt> */\n public final static String BASE64_C = \"b64\";\n \n \n \n /* The XML boolean array value <tt>true</tt> */\n public final static String TRUE = \"true\";\n \n /* The XML boolean array value <tt>false</tt> */\n public final static String FALSE = \"false\";\n \n \n /* The XML boolean array value <tt>1</tt>, condensed form of <tt>true</tt> */\n public final static String TRUE_C = \"1\";\n \n /* The XML boolean array value <tt>0</tt>, condensed form of <tt>false</tt> */\n public final static String FALSE_C = \"0\";\n \n \n \n /* The XML element <tt>entry</tt>, used for {@link java.util.Map}s. */\n public final static String MAP_ENTRY = \"entry\";\n \n /* The XML element <tt>key</tt>, used for {@link java.util.Map}s. */\n public final static String MAP_KEY = \"key\";\n \n /* The XML element <tt>value</tt>, used for {@link java.util.Map}s. */\n public final static String MAP_VALUE = \"value\";\n \n \n /* The XML element <tt>e</tt>, condensed form of <tt>entry</tt>, used for {@link java.util.Map}s. */\n public final static String MAP_ENTRY_C = \"e\";\n \n /* The XML element <tt>k</tt>, condensed form of <tt>key</tt>, used for {@link java.util.Map}s. */\n public final static String MAP_KEY_C = \"k\";\n \n /* The XML element <tt>v</tt>, condensed form of <tt>value</tt>, used for {@link java.util.Map}s. */\n public final static String MAP_VALUE_C = \"v\";\n \n \n /* The string <tt>CDATA</tt>. */\n public final static String CDATA = \"CDATA\";\n \n\n}",
"public void compose(StylesheetRoot sroot) throws TransformerException\n {\n super.compose(sroot);\n StylesheetRoot.ComposeState cstate = sroot.getComposeState();\n java.util.Vector vnames = cstate.getVariableNames();\n if(null != m_countMatchPattern)\n m_countMatchPattern.fixupVariables(vnames, cstate.getGlobalsSize());\n if(null != m_format_avt)\n m_format_avt.fixupVariables(vnames, cstate.getGlobalsSize());\n if(null != m_fromMatchPattern)\n m_fromMatchPattern.fixupVariables(vnames, cstate.getGlobalsSize());\n if(null != m_groupingSeparator_avt)\n m_groupingSeparator_avt.fixupVariables(vnames, cstate.getGlobalsSize());\n if(null != m_groupingSize_avt)\n m_groupingSize_avt.fixupVariables(vnames, cstate.getGlobalsSize());\n if(null != m_lang_avt)\n m_lang_avt.fixupVariables(vnames, cstate.getGlobalsSize());\n if(null != m_lettervalue_avt)\n m_lettervalue_avt.fixupVariables(vnames, cstate.getGlobalsSize());\n if(null != m_valueExpr)\n m_valueExpr.fixupVariables(vnames, cstate.getGlobalsSize());\n }",
"@Override\n\tprotected void initParams() {\n\t\t\n\t}",
"public String getLocalXSLT(){\r\n\t\treturn this.localXSLT;\r\n\t}",
"public static ByteArrayOutputStream applyXSL(Context context, InputStream sourceInputStream, int xslID) {\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream(32);\n \n try {\n Source source = new DOMSource(\n DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(sourceInputStream));\n Transformer transformer = TransformerFactory.newInstance().newTransformer(\n new StreamSource(context.getResources().openRawResource(xslID)));\n StreamResult result = new StreamResult(outputStream);\n transformer.transform(source, result);\n }\n catch(IOException e) {\n Log.e(LOG_TAG, Log.getStackTraceString(e));\n }\n catch(TransformerException e) {\n Log.e(LOG_TAG, Log.getStackTraceString(e));\n }\n catch(SAXException e) {\n Log.e(LOG_TAG, Log.getStackTraceString(e));\n }\n catch(ParserConfigurationException e) {\n Log.e(LOG_TAG, Log.getStackTraceString(e));\n }\n \n return outputStream;\n }",
"private XMLTreeIntExpressionEvaluator() {\n }",
"private void prepareXml()\n throws PaginatedResultSetXmlGenerationException\n {\n reset();\n if (m_taskVector.size() > 0 && m_pageNumber > -1)\n {\n addXmlHeader();\n addBody();\n }\n }",
"public static Parametros ConfiguracionParametros(String ruta){\n try{\n Parametros theParametros = new Parametros();\n List<EventoPuertaMagnetica> eventoPM = new ArrayList<>();\n File theXmlFile = new File(ruta + \"config.xml\");\n DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n Document doc = dBuilder.parse(theXmlFile);\n doc.getDocumentElement().normalize();\n\n String url_ws= doc.getDocumentElement().getElementsByTagName(\"Url_WebServices\").item(0).getTextContent();\n String id_port = doc.getDocumentElement().getElementsByTagName(\"Id_Portico\").item(0).getTextContent();\n String ip_bd = doc.getDocumentElement().getElementsByTagName(\"Base_Datos_IP\").item(0).getTextContent();\n String mani_puerta_chapa = doc.getDocumentElement().getElementsByTagName(\"Tiene_Chapa\").item(0).getTextContent();\n String dispo = doc.getDocumentElement().getElementsByTagName(\"Disposicion\").item(0).getTextContent();\n String crede_admin = doc.getDocumentElement().getElementsByTagName(\"Id_Crede_Administrador\").item(0).getTextContent();\n String loc_geo = doc.getDocumentElement().getElementsByTagName(\"Localizacion_Geografica\").item(0).getTextContent();\n\n NodeList events = doc.getDocumentElement().getElementsByTagName(\"Evento\"); //0 o mas ...\n for(int i=0; i< events.getLength(); i++){\n EventoPuertaMagnetica event = new EventoPuertaMagnetica();\n\n Node nodo = events.item(i);\n NodeList caracteristicasEvento = nodo.getChildNodes();\n\n String id_evento = caracteristicasEvento.item(0).getTextContent();\n String nombre_evento = caracteristicasEvento.item(1).getTextContent();\n\n event.set_U01B3F3(id_evento);\n event.set_DESTINO(nombre_evento);\n\n eventoPM.add(event);\n }\n theParametros.set_Url_WebServices(url_ws);\n theParametros.set_Id_Portico(id_port);\n theParametros.set_Base_Datos_IP(ip_bd);\n theParametros.set_Manipulacion_Puerta(mani_puerta_chapa);\n theParametros.set_Disposicion(dispo);\n theParametros.set_Id_CredencialAdmin(crede_admin);\n theParametros.set_Localizacion_Geografica(loc_geo);\n theParametros.set_Eventos(eventoPM);\n\n return theParametros;\n\n }catch (Exception ex){\n return null;\n }\n }",
"private void SetParameters(XmlTest test){\r\n\t\t for (Map.Entry<String,String> entry : TestsParamList.get(test.getName()).entrySet()){\r\n\t\t\t test.addParameter(entry.getKey(), entry.getValue());\r\n\t\t }\r\n\t}",
"public void setRequestXml(java.lang.String param){\n \n if (param != null){\n //update the setting tracker\n localRequestXmlTracker = true;\n } else {\n localRequestXmlTracker = true;\n \n }\n \n this.localRequestXml=param;\n \n\n }",
"public void setRequestXml(java.lang.String param){\n \n if (param != null){\n //update the setting tracker\n localRequestXmlTracker = true;\n } else {\n localRequestXmlTracker = true;\n \n }\n \n this.localRequestXml=param;\n \n\n }",
"public void setRequestXml(java.lang.String param){\n \n if (param != null){\n //update the setting tracker\n localRequestXmlTracker = true;\n } else {\n localRequestXmlTracker = true;\n \n }\n \n this.localRequestXml=param;\n \n\n }",
"public void setRequestXml(java.lang.String param){\n \n if (param != null){\n //update the setting tracker\n localRequestXmlTracker = true;\n } else {\n localRequestXmlTracker = true;\n \n }\n \n this.localRequestXml=param;\n \n\n }",
"public void setRequestXml(java.lang.String param){\n \n if (param != null){\n //update the setting tracker\n localRequestXmlTracker = true;\n } else {\n localRequestXmlTracker = true;\n \n }\n \n this.localRequestXml=param;\n \n\n }",
"public void setRequestXml(java.lang.String param){\n \n if (param != null){\n //update the setting tracker\n localRequestXmlTracker = true;\n } else {\n localRequestXmlTracker = true;\n \n }\n \n this.localRequestXml=param;\n \n\n }",
"public void setRequestXml(java.lang.String param){\n \n if (param != null){\n //update the setting tracker\n localRequestXmlTracker = true;\n } else {\n localRequestXmlTracker = true;\n \n }\n \n this.localRequestXml=param;\n \n\n }",
"public void setRequestXml(java.lang.String param){\n \n if (param != null){\n //update the setting tracker\n localRequestXmlTracker = true;\n } else {\n localRequestXmlTracker = true;\n \n }\n \n this.localRequestXml=param;\n \n\n }",
"public void setRequestXml(java.lang.String param){\n \n if (param != null){\n //update the setting tracker\n localRequestXmlTracker = true;\n } else {\n localRequestXmlTracker = true;\n \n }\n \n this.localRequestXml=param;\n \n\n }",
"void xsetSystem(org.apache.xmlbeans.XmlString system);",
"void setAppliedTo(String xpathExpression);",
"public interface NSURIResolver extends URIResolver {\n \n /**\n * Called by the processor when it encounters\n * an xsl:include, xsl:import, or document() function and the \n * object can not be resolved by the its relative path.\n * (javax.xml.transform.URIResolver.resolve(String href, String base) \n * has returned null)\n * \n * \n * @param tartgetNamespace of the imported schema.\n *\n * @return A Source object, or null if the namespace cannot be resolved.\n * \n * @throws TransformerException if an error occurs when trying to\n * resolve the URI.\n */\n public Source resolveByNS(String tartgetNamespace)\n throws TransformerException;\n\n}",
"@Override\n public void fromXML(Node node)\n {\n super.fromXML(node);\n\n NodeList children = node.getChildNodes();\n\n for (int j = 0; j < children.getLength(); j++)\n {\n Node child = children.item(j);\n\n if (child.getNodeName().equalsIgnoreCase(\"lethal-range\"))\n {\n this.setLethalRange(Double.parseDouble(child.getTextContent()));\n }\n else if (child.getNodeName().equalsIgnoreCase(\"pk\"))\n {\n this.setPk(Double.parseDouble(child.getTextContent()));\n }\n else if (child.getNodeName().equalsIgnoreCase(\"max-gs\"))\n {\n this.setMaxGs(Double.parseDouble(child.getTextContent()));\n }\n }\n }",
"private void handleParameters(Node node, ParamType paramType) {\n\n Parameters parameters = new Parameters();\n parameters.setName(node.attributes().get(\"name\").toString());\n Map<String, Object> parameter = new HashMap<String, Object>();\n\n Iterator<Node> itr = node.childNodes();\n while (itr.hasNext()) {\n Node childNode = itr.next();\n String key = childNode.attributes().get(\"name\").toString();\n String value = childNode.attributes().get(\"value\").toString();\n parameter.put(key, value);\n }\n parameters.setParameter(parameter);\n switch (paramType) {\n\n case TESTSUITE:\n testSuite.addParameters(parameters);\n break;\n case TESTCASE:\n currentTestCase.addParameters(parameters);\n break;\n case TESTSTEP:\n currentTestStep.addParameters(parameters);\n break;\n case PERMUTATION:\n currentPermutation.addParameters(parameters);\n break;\n }\n\n }",
"public void configure(Element node) throws Exception;",
"public void setProperties() {\r\n\t\tconfigProps.setProperty(\"Root\", textRoot.getText());\r\n\t\tconfigProps.setProperty(\"Map\", textMap.getText());\r\n\t\tconfigProps.setProperty(\"Out\", textOut.getText());\r\n\t\tconfigProps.setProperty(\"ReportTypeName\",textrtn.getText());\r\n\t\tconfigProps.setProperty(\"ReportedByPersonName\",textrbpn.getText());\r\n\t\tconfigProps.setProperty(\"ReportedDate\",textrd.getText());\r\n\t\tdt.Map = textMap.getText();\r\n\t\tdt.Root = textRoot.getText();\r\n\t\tdt.Out = textOut.getText();\r\n\t\tdt.setReportHeaderData(textrtn.getText(), textrbpn.getText(), textrd.getText());\r\n\t}"
] | [
"0.61892253",
"0.56643796",
"0.55818963",
"0.5560465",
"0.55462474",
"0.5308361",
"0.5285081",
"0.5262344",
"0.52118915",
"0.5205314",
"0.5167271",
"0.51523924",
"0.5131361",
"0.5116479",
"0.5116222",
"0.5086255",
"0.5071148",
"0.505866",
"0.50572056",
"0.4974029",
"0.49473026",
"0.49363968",
"0.4923201",
"0.48962662",
"0.48907444",
"0.48601374",
"0.4838382",
"0.48159215",
"0.48082507",
"0.48076174",
"0.4787728",
"0.47848633",
"0.47794282",
"0.47598904",
"0.47544712",
"0.47187376",
"0.4713061",
"0.47107887",
"0.47000396",
"0.46822426",
"0.46742108",
"0.46728662",
"0.46639287",
"0.46608123",
"0.46534023",
"0.46482363",
"0.46429515",
"0.4630724",
"0.46268457",
"0.4607752",
"0.46003458",
"0.45990393",
"0.4591837",
"0.45893177",
"0.4583224",
"0.45803142",
"0.457916",
"0.457916",
"0.45740557",
"0.45696422",
"0.45598507",
"0.45598507",
"0.45598507",
"0.45598507",
"0.45598507",
"0.45598507",
"0.45598507",
"0.45598507",
"0.45598507",
"0.45598507",
"0.45598507",
"0.45594442",
"0.45551473",
"0.4553177",
"0.45457113",
"0.45434254",
"0.4537564",
"0.4536409",
"0.45237586",
"0.45228282",
"0.45212078",
"0.45203742",
"0.45199695",
"0.4514455",
"0.45118886",
"0.45118886",
"0.45118886",
"0.45118886",
"0.45118886",
"0.45118886",
"0.45118886",
"0.45118886",
"0.45118886",
"0.4509683",
"0.4501848",
"0.44942313",
"0.4494156",
"0.44922754",
"0.44914973",
"0.4477619"
] | 0.5512976 | 5 |
questions.add(new Question(1, false, "false", "asdf")); questions.add(new Question(2, true, "true", "asdf")); | @Override
public int onStartCommand(Intent intent, int flags, int startId) {
questions.addAll(DataUtil.loadQuestions("data.csv", this));
return Service.START_NOT_STICKY;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public MultipleAnswerQuestion(String question ,boolean isSingleAnswered)\r\n {\r\n super(question,isSingleAnswered);\r\n this.answers = new ArrayList<>(); //Initializing the HashSet\r\n }",
"public void addQuestion(Question question);",
"private void creatingNewQuestion() {\r\n AbstractStatement<?> s;\r\n ListQuestions lq = new ListQuestions(ThemesController.getThemeSelected());\r\n switch ((String) typeQuestion.getValue()) {\r\n case \"TrueFalse\":\r\n // just to be sure the answer corresponds to the json file\r\n Boolean answer = CorrectAnswer.getText().equalsIgnoreCase(\"true\");\r\n s = new TrueFalse<>(Text.getText(), answer);\r\n break;\r\n\r\n case \"MCQ\":\r\n s = new MCQ<>(Text.getText(), TextAnswer1.getText(), TextAnswer2.getText(), TextAnswer3.getText(), CorrectAnswer.getText());\r\n break;\r\n\r\n default:\r\n s = new ShortAnswer<>(Text.getText(), CorrectAnswer.getText());\r\n break;\r\n }\r\n lq.addQuestion(new Question(s, ThemesController.getThemeSelected(), Difficulty.fromInteger((Integer) difficulty.getValue()) ));\r\n lq.writeJson(ThemesController.getThemeSelected());\r\n }",
"public void addQuestion()\r\n\t{\r\n\t\tScanner in = new Scanner (System.in);\r\n\t\tString question, a1, a2, a3, a4, correctAnswer;\r\n\r\n\t\tSystem.out.println(\"Please enter a question: \");\r\n\t\tquestion = in.nextLine();\r\n\t\t\r\n\t\tSystem.out.println(\"Please enter answer choice #1: \");\r\n\t\ta1 = in.nextLine();\r\n\t\t\r\n\t\tSystem.out.println(\"Please enter answer choice #2: \");\r\n\t\ta2 = in.nextLine();\r\n\t\t\r\n\t\tSystem.out.println(\"Please enter answer choice #3: \");\r\n\t\ta3 = in.nextLine();\r\n\t\t\r\n\t\tSystem.out.println(\"Please enter answer choice #4: \");\r\n\t\ta4 = in.nextLine();\r\n\t\t\r\n\t\tSystem.out.println(\"Please enter the correct answer (number): \");\r\n\t\tcorrectAnswer = in.nextLine();\r\n\t\t\r\n\t\t//checks input\r\n\t\twhile( !( correctAnswer.equalsIgnoreCase(\"1\") || correctAnswer.equalsIgnoreCase(\"2\") || correctAnswer.equalsIgnoreCase(\"3\") || correctAnswer.equalsIgnoreCase(\"4\") ) )\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Invalid entry. Enter again:\");\r\n\t\t\tcorrectAnswer = in.nextLine();\r\n\t\t}\r\n\t\tQuestion q = new Question ( question, a1, a2, a3, a4, correctAnswer );\r\n\t\t\r\n\t\tquestions.add(q);\r\n\t}",
"public static List<Question> getQuestions() {\n if (QUESTION == null) {\n QUESTION = new ArrayList<>();\n List<Option> options = new ArrayList<Option>();\n options.add(new Option(1, \"Radio Waves\"));\n options.add(new Option(2, \"Sound Waves\"));\n options.add(new Option(3, \"Gravity Waves\"));\n options.add(new Option(4, \"Light Waves\"));\n QUESTION.add(new Question(1, \"Which kind of waves are used to make and receive cellphone calls?\", getCategory(4), options, options.get(0)));\n\n List<Option> options2 = new ArrayList<Option>();\n options2.add(new Option(1, \"8\"));\n options2.add(new Option(2, \"6\"));\n options2.add(new Option(3, \"3\"));\n options2.add(new Option(4, \"1\"));\n QUESTION.add(new Question(2, \"How many hearts does an octopus have?\", getCategory(4), options2, options2.get(2)));\n\n List<Option> options3 = new ArrayList<Option>();\n options3.add(new Option(1, \"Newton's Law\"));\n options3.add(new Option(2, \"Hooke's law\"));\n options3.add(new Option(3, \"Darwin's Law\"));\n options3.add(new Option(4, \"Archimedes' principle\"));\n QUESTION.add(new Question(3, \"Whose law states that the force needed to extend a spring by some distance is proportional to that distance?\", getCategory(4), options3, options3.get(1)));\n\n List<Option> options4 = new ArrayList<Option>();\n options4.add(new Option(1, \"M\"));\n options4.add(new Option(2, \"$\"));\n options4.add(new Option(3, \"W\"));\n options4.add(new Option(4, \"#\"));\n QUESTION.add(new Question(4, \"What is the chemical symbol for tungsten?\", getCategory(4), options4, options4.get(2)));\n\n List<Option> options5 = new ArrayList<Option>();\n options5.add(new Option(1, \"Pulsar\"));\n options5.add(new Option(2, \"Draconis\"));\n options5.add(new Option(3, \"Aludra\"));\n options5.add(new Option(4, \"Alwaid\"));\n QUESTION.add(new Question(5, \"What is a highly magnetized, rotating neutron star that emits a beam of electromagnetic radiation?\", getCategory(4), options5, options5.get(0)));\n\n List<Option> options6 = new ArrayList<Option>();\n options6.add(new Option(1, \"2\"));\n options6.add(new Option(2, \"4\"));\n options6.add(new Option(3, \"7\"));\n options6.add(new Option(4, \"10\"));\n QUESTION.add(new Question(6, \"At what temperature is Centigrade equal to Fahrenheit?\", getCategory(4), options6, options6.get(2)));\n\n List<Option> options7 = new ArrayList<Option>();\n options7.add(new Option(1, \"Temperature\"));\n options7.add(new Option(2, \"Distance\"));\n options7.add(new Option(3, \"Light Intensity\"));\n options7.add(new Option(4, \"Noise\"));\n QUESTION.add(new Question(7, \"Kelvin is a unit to measure what?\", getCategory(4), options7, options7.get(2)));\n\n List<Option> options8 = new ArrayList<Option>();\n options8.add(new Option(1, \"Mars\"));\n options8.add(new Option(2, \"Jupiter\"));\n options8.add(new Option(3, \"Saturn\"));\n options8.add(new Option(4, \"Neptune\"));\n QUESTION.add(new Question(8, \"Triton is the largest moon of what planet?\", getCategory(4), options8, options8.get(3)));\n\n List<Option> options9 = new ArrayList<Option>();\n options9.add(new Option(1, \"Brain\"));\n options9.add(new Option(2, \"Heart\"));\n options9.add(new Option(3, \"Lungs\"));\n options9.add(new Option(4, \"Skin\"));\n QUESTION.add(new Question(9, \"What is the human body’s biggest organ?\", getCategory(4), options9, options9.get(3)));\n\n List<Option> options10 = new ArrayList<Option>();\n options10.add(new Option(1, \"Skull\"));\n options10.add(new Option(2, \"Knee Cap\"));\n options10.add(new Option(3, \"Shoulder Joint\"));\n options10.add(new Option(4, \"Backbone\"));\n QUESTION.add(new Question(10, \"What is the more common name for the patella?\", getCategory(4), options10, options10.get(1)));\n\n List<Option> options11 = new ArrayList<Option>();\n options11.add(new Option(1, \"Mother India\"));\n options11.add(new Option(2, \"The Guide\"));\n options11.add(new Option(3, \"Madhumati\"));\n options11.add(new Option(4, \"Amrapali\"));\n QUESTION.add(new Question(11, \"Which was the 1st Indian movie submitted for Oscar?\", getCategory(1), options11, options11.get(0)));\n\n List<Option> options12 = new ArrayList<Option>();\n options12.add(new Option(1, \"Gunda\"));\n options12.add(new Option(2, \"Sholey\"));\n options12.add(new Option(3, \"Satte pe Satta\"));\n options12.add(new Option(4, \"Angoor\"));\n QUESTION.add(new Question(12, \"Which film is similar to Seven Brides For Seven Brothers?\", getCategory(1), options12, options12.get(2)));\n\n List<Option> options13 = new ArrayList<Option>();\n options13.add(new Option(1, \"Rocky\"));\n options13.add(new Option(2, \"Pancham\"));\n options13.add(new Option(3, \"Chichi\"));\n options13.add(new Option(4, \"Chintu\"));\n QUESTION.add(new Question(13, \"Music Director R.D. Burman is also known as?\", getCategory(1), options13, options13.get(1)));\n\n List<Option> options14 = new ArrayList<Option>();\n options14.add(new Option(1, \"Nagarjuna\"));\n options14.add(new Option(2, \"Chiranjeevi\"));\n options14.add(new Option(3, \"Rajinikanth\"));\n options14.add(new Option(4, \"NTR\"));\n QUESTION.add(new Question(14, \"Shivaji Rao Gaikwad is the real name of which actor?\", getCategory(1), options14, options14.get(2)));\n\n List<Option> options15 = new ArrayList<Option>();\n options15.add(new Option(1, \"Geraftaar\"));\n options15.add(new Option(2, \"Hum\"));\n options15.add(new Option(3, \"Andha kanoon\"));\n options15.add(new Option(4, \"Agneepath\"));\n QUESTION.add(new Question(15, \"Name the film in which Amitabh Bachchan, Rajinikanth and Kamal Hasan worked together.\", getCategory(1), options15, options15.get(0)));\n\n List<Option> options16 = new ArrayList<Option>();\n options16.add(new Option(1, \"AR Rahman\"));\n options16.add(new Option(2, \"Bhanu Athaiya\"));\n options16.add(new Option(3, \"Gulzar\"));\n options16.add(new Option(4, \"Rasul Pookutty\"));\n QUESTION.add(new Question(16, \"First Indian to win Oscar award?\", getCategory(1), options16, options16.get(1)));\n\n List<Option> options17 = new ArrayList<Option>();\n options17.add(new Option(1, \"Jab tak hai jaan\"));\n options17.add(new Option(2, \"Rab ne bana di jodi\"));\n options17.add(new Option(3, \"Veer zara\"));\n options17.add(new Option(4, \"Ek tha tiger\"));\n QUESTION.add(new Question(17, \"Which was the last movie directed by Yash Chopra?\", getCategory(1), options17, options17.get(0)));\n\n\n List<Option> options18 = new ArrayList<Option>();\n options18.add(new Option(1, \"‘Thala’ Ajith\"));\n options18.add(new Option(2, \"Arjun Sarja\"));\n options18.add(new Option(3, \"Ashutosh Gawariker\"));\n options18.add(new Option(4, \"AK Hangal\"));\n QUESTION.add(new Question(18, \"\\\"Itna sannata kyun hai bhai?\\\" Who said this, now legendary words, in 'Sholay'?\", getCategory(1), options18, options18.get(3)));\n\n List<Option> options19 = new ArrayList<Option>();\n options19.add(new Option(1, \"Tommy\"));\n options19.add(new Option(2, \"Tuffy\"));\n options19.add(new Option(3, \"Toffy\"));\n options19.add(new Option(4, \"Timmy\"));\n QUESTION.add(new Question(19, \"What was the name of Madhuri Dixit’s dog in Hum Aapke Hain Koun?\", getCategory(1), options19, options19.get(1)));\n\n List<Option> options20 = new ArrayList<Option>();\n options20.add(new Option(1, \"Premnath\"));\n options20.add(new Option(2, \"Dilip Kumar\"));\n options20.add(new Option(3, \"Raj Kapoor\"));\n options20.add(new Option(4, \"Kishore Kumar\"));\n QUESTION.add(new Question(20, \"Beautiful actress Madhubala was married to?\", getCategory(1), options20, options20.get(3)));\n\n\n List<Option> options21 = new ArrayList<Option>();\n options21.add(new Option(1, \"Sher Khan\"));\n options21.add(new Option(2, \"Mufasa\"));\n options21.add(new Option(3, \"Simba\"));\n options21.add(new Option(4, \"Sarabi\"));\n QUESTION.add(new Question(21, \"What is the name of the young lion whose story is told in the musical 'The Lion King'?\", getCategory(2), options21, options21.get(2)));\n\n List<Option> options22 = new ArrayList<Option>();\n options22.add(new Option(1, \"Scotland\"));\n options22.add(new Option(2, \"England\"));\n options22.add(new Option(3, \"Germany\"));\n options22.add(new Option(4, \"Netherland\"));\n QUESTION.add(new Question(22, \"Which country's freedom struggle is portrayed in the Mel Gibson movie 'Braveheart'?\", getCategory(2), options22, options22.get(0)));\n\n List<Option> options23 = new ArrayList<Option>();\n options23.add(new Option(1, \"Letters to Juliet\"));\n options23.add(new Option(2, \"Saving Private Ryan\"));\n options23.add(new Option(3, \"Forest Gump\"));\n options23.add(new Option(4, \"Gone With The Wind\"));\n QUESTION.add(new Question(23, \"Which movie had this dialogue \\\"My mama always said, life was like a box of chocolates. You never know what you're gonna get.\", getCategory(2), options23, options23.get(2)));\n\n List<Option> options24 = new ArrayList<Option>();\n options24.add(new Option(1, \"Die\"));\n options24.add(new Option(2, \"Golden\"));\n options24.add(new Option(3, \"Casino\"));\n options24.add(new Option(4, \"Never\"));\n QUESTION.add(new Question(24, \"Excluding \\\"the\\\", which word appears most often in Bond movie titles?\", getCategory(2), options24, options24.get(3)));\n\n List<Option> options25 = new ArrayList<Option>();\n options25.add(new Option(1, \"Bishop\"));\n options25.add(new Option(2, \"Ash\"));\n options25.add(new Option(3, \"Call\"));\n options25.add(new Option(4, \"Carlos\"));\n QUESTION.add(new Question(25, \"Name the android in movie Alien \", getCategory(2), options25, options25.get(1)));\n\n List<Option> options26 = new ArrayList<Option>();\n options26.add(new Option(1, \"Gone with the wind\"));\n options26.add(new Option(2, \"Home footage\"));\n options26.add(new Option(3, \"With Our King and Queen Through India\"));\n options26.add(new Option(4, \"Treasure Island\"));\n QUESTION.add(new Question(26, \"Which was the first colour film to win a Best Picture Oscar?\", getCategory(2), options26, options26.get(0)));\n\n List<Option> options27 = new ArrayList<Option>();\n options27.add(new Option(1, \"Robert Redford\"));\n options27.add(new Option(2, \"Michael Douglas\"));\n options27.add(new Option(3, \"Harrison Ford\"));\n options27.add(new Option(4, \"Patrick Swayze\"));\n QUESTION.add(new Question(27, \"Who played the male lead opposite Sharon Stone in the hugely successful movie 'The Basic Instinct'?\", getCategory(2), options27, options27.get(1)));\n\n List<Option> options28 = new ArrayList<Option>();\n options28.add(new Option(1, \"10,000 BC\"));\n options28.add(new Option(2, \"Day after tomorrow\"));\n options28.add(new Option(3, \"2012\"));\n options28.add(new Option(4, \"The Noah's Ark Principle\"));\n QUESTION.add(new Question(28, \"Which Roland Emmerich movie portrays fictional cataclysmic events that were to take place in early 21st century?\", getCategory(2), options28, options28.get(2)));\n\n List<Option> options29 = new ArrayList<Option>();\n options29.add(new Option(1, \"Finding Nemo\"));\n options29.add(new Option(2, \"The Incredibles\"));\n options29.add(new Option(3, \"Monsters, Inc.\"));\n options29.add(new Option(4, \"Toy Story\"));\n QUESTION.add(new Question(29, \"What was the first movie by Pixar to receive a rating higher than G in the United States?\", getCategory(2), options29, options29.get(1)));\n\n List<Option> options30 = new ArrayList<Option>();\n options30.add(new Option(1, \"Draco\"));\n options30.add(new Option(2, \"Harry\"));\n options30.add(new Option(3, \"Hermione\"));\n options30.add(new Option(4, \"Ron\"));\n QUESTION.add(new Question(30, \"In the 'Prisoner of Azkaban', who throws rocks at Hagrid's hut so that Harry, Ron and Hermione can leave?\", getCategory(2), options30, options30.get(2)));\n\n List<Option> options31 = new ArrayList<Option>();\n options31.add(new Option(1, \"Brett Lee\"));\n options31.add(new Option(2, \"Adam Gilchrist\"));\n options31.add(new Option(3, \"Jason Gillespie\"));\n options31.add(new Option(4, \"Glenn McGrath\"));\n QUESTION.add(new Question(31, \"'Dizzy' is the nickname of what Australian player?\", getCategory(3), options31, options31.get(2)));\n\n List<Option> options32 = new ArrayList<Option>();\n options32.add(new Option(1, \"1883 between Australia and Wales\"));\n options32.add(new Option(2, \"1844 between Canada and the USA\"));\n options32.add(new Option(3, \"1869 between England and Australia\"));\n options32.add(new Option(4, \"1892 between England and India\"));\n QUESTION.add(new Question(32, \"In what year was the first international cricket match held?\", getCategory(3), options32, options32.get(1)));\n\n List<Option> options33 = new ArrayList<Option>();\n options33.add(new Option(1, \"Salim Durrani\"));\n options33.add(new Option(2, \"Farooq Engineer\"));\n options33.add(new Option(3, \"Vijay Hazare\"));\n options33.add(new Option(4, \"Mansur Ali Khan Pataudi\"));\n QUESTION.add(new Question(33, \"Which former Indian cricketer was nicknamed 'Tiger'?\", getCategory(3), options33, options33.get(3)));\n\n List<Option> options34 = new ArrayList<Option>();\n options34.add(new Option(1, \"Piyush Chawla\"));\n options34.add(new Option(2, \"Gautam Gambhir\"));\n options34.add(new Option(3, \"Irfan Pathan\"));\n options34.add(new Option(4, \"Suresh Raina\"));\n QUESTION.add(new Question(34, \"Who was named as the ICC Emerging Player of the Year 2004?\", getCategory(3), options34, options34.get(2)));\n\n List<Option> options35 = new ArrayList<Option>();\n options35.add(new Option(1, \"Subhash Gupte\"));\n options35.add(new Option(2, \"M.L.Jaisimha\"));\n options35.add(new Option(3, \"Raman Lamba\"));\n options35.add(new Option(4, \"Lala Amarnath\"));\n QUESTION.add(new Question(35, \"Which cricketer died on the field in Bangladesh while playing for Abahani Club?\", getCategory(3), options35, options35.get(2)));\n\n List<Option> options36 = new ArrayList<Option>();\n options36.add(new Option(1, \"V. Raju\"));\n options36.add(new Option(2, \"Rajesh Chauhan\"));\n options36.add(new Option(3, \"Arshad Ayub\"));\n options36.add(new Option(4, \"Narendra Hirwani\"));\n QUESTION.add(new Question(36, \"In 1987-88, which Indian spinner took 16 wickets on his Test debut?\", getCategory(3), options36, options36.get(3)));\n\n List<Option> options37 = new ArrayList<Option>();\n options37.add(new Option(1, \"Ravi Shastri\"));\n options37.add(new Option(2, \"Dilip Vengsarkar\"));\n options37.add(new Option(3, \"Sachin Tendulkar\"));\n options37.add(new Option(4, \"Sanjay Manjrekar\"));\n QUESTION.add(new Question(37, \"Which former Indian Test cricketer equalled Gary Sobers world record of six sixes in an over in a Ranji Trophy match?\", getCategory(3), options37, options37.get(0)));\n\n List<Option> options38 = new ArrayList<Option>();\n options38.add(new Option(1, \"Mohsin khan\"));\n options38.add(new Option(2, \"Wasim Akram\"));\n options38.add(new Option(3, \"Naveen Nischol\"));\n options38.add(new Option(4, \"None Of The Above\"));\n QUESTION.add(new Question(38, \"Reena Roy the Indian film actress married a cricketer?\", getCategory(3), options38, options38.get(0)));\n\n List<Option> options39 = new ArrayList<Option>();\n options39.add(new Option(1, \"London, England\"));\n options39.add(new Option(2, \"Mumbai, India\"));\n options39.add(new Option(3, \"Lahore, Pakistan\"));\n options39.add(new Option(4, \"Nairobi, Kenya\"));\n QUESTION.add(new Question(39, \"Where did Yuvraj Singh make his ODI debut?\", getCategory(3), options39, options39.get(3)));\n\n List<Option> options40 = new ArrayList<Option>();\n options40.add(new Option(1, \"Arvind De Silva\"));\n options40.add(new Option(2, \"Roshan Mahanama\"));\n options40.add(new Option(3, \"Harshan Tilakaratne\"));\n options40.add(new Option(4, \"None Of The Above\"));\n QUESTION.add(new Question(40, \"Kapil Dev's 432 (world) record breaking victim was?\", getCategory(3), options40, options40.get(2)));\n\n List<Option> options41 = new ArrayList<Option>();\n options41.add(new Option(1, \"Vatican\"));\n options41.add(new Option(2, \"Iceland\"));\n options41.add(new Option(3, \"Netherlands\"));\n options41.add(new Option(4, \"Hungary\"));\n QUESTION.add(new Question(41, \"Which country has the lowest population density of any country in Europe?\", getCategory(5), options41, options41.get(1)));\n\n List<Option> options42 = new ArrayList<Option>();\n options42.add(new Option(1, \"Cambodia\"));\n options42.add(new Option(2, \"Thailand\"));\n options42.add(new Option(3, \"Mynamar\"));\n options42.add(new Option(4, \"Bhutan\"));\n QUESTION.add(new Question(42, \"Angkor Wat, the largest religious monument in the world, is in which country?\", getCategory(5), options42, options42.get(0)));\n\n List<Option> options43 = new ArrayList<Option>();\n options43.add(new Option(1, \"Southern\"));\n options43.add(new Option(2, \"Northern and Southern\"));\n options43.add(new Option(3, \"Northern\"));\n options43.add(new Option(4, \"None of the above\"));\n QUESTION.add(new Question(43, \"Is the Tropic of Cancer in the northern or southern hemisphere?\", getCategory(5), options43, options43.get(2)));\n\n List<Option> options44 = new ArrayList<Option>();\n options44.add(new Option(1, \"Bangladesh\"));\n options44.add(new Option(2, \"Nepal\"));\n options44.add(new Option(3, \"Pakistan\"));\n options44.add(new Option(4, \"China\"));\n QUESTION.add(new Question(44, \"The Ganges flows through India and which other country?\", getCategory(5), options44, options44.get(0)));\n\n List<Option> options45 = new ArrayList<Option>();\n options45.add(new Option(1, \"Indian\"));\n options45.add(new Option(2, \"Pacific\"));\n options45.add(new Option(3, \"Arctic\"));\n options45.add(new Option(4, \"Atlantic\"));\n QUESTION.add(new Question(45, \"Which ocean lies on the east coast of the United States?\", getCategory(5), options45, options45.get(3)));\n\n List<Option> options46 = new ArrayList<Option>();\n options46.add(new Option(1, \"Prime Axis\"));\n options46.add(new Option(2, \"Lambert Line\"));\n options46.add(new Option(3, \"Prime Meridian\"));\n options46.add(new Option(4, \"Greenwich\"));\n QUESTION.add(new Question(46, \"What is the imaginary line called that connects the north and south pole?\", getCategory(5), options46, options46.get(2)));\n\n List<Option> options47 = new ArrayList<Option>();\n options47.add(new Option(1, \"Tropic of Cancer\"));\n options47.add(new Option(2, \"Tropic of Capricorn\"));\n QUESTION.add(new Question(47, \"The most northerly circle of latitude on the Earth at which the Sun may appear directly overhead at its culmination is called?\", getCategory(5), options47, options47.get(0)));\n\n List<Option> options48 = new ArrayList<Option>();\n options48.add(new Option(1, \"Nevada\"));\n options48.add(new Option(2, \"Arizona\"));\n options48.add(new Option(3, \"New Mexico\"));\n options48.add(new Option(4, \"San Fransisco\"));\n QUESTION.add(new Question(48, \"Which U.S. state is the Grand Canyon located in?\", getCategory(5), options48, options48.get(1)));\n\n List<Option> options49 = new ArrayList<Option>();\n options49.add(new Option(1, \"Indian Ocean\"));\n options49.add(new Option(2, \"Atlantic Ocean\"));\n options49.add(new Option(3, \"Pacific Ocean\"));\n options49.add(new Option(4, \"Arctic Ocean\"));\n QUESTION.add(new Question(49, \"Which is the largest body of water?\", getCategory(5), options49, options49.get(2)));\n\n List<Option> options50 = new ArrayList<Option>();\n options50.add(new Option(1, \"Maldives\"));\n options50.add(new Option(2, \"Monaco\"));\n options50.add(new Option(3, \"Tuvalu\"));\n options50.add(new Option(4, \"Vatican City\"));\n QUESTION.add(new Question(50, \"Which is the smallest country, measured by total land area?\", getCategory(5), options50, options50.get(3)));\n\n List<Option> options51 = new ArrayList<Option>();\n options51.add(new Option(1, \"1923\"));\n options51.add(new Option(2, \"1938\"));\n options51.add(new Option(3, \"1917\"));\n options51.add(new Option(4, \"1914\"));\n QUESTION.add(new Question(51, \"World War I began in which year?\", getCategory(6), options51, options51.get(3)));\n\n List<Option> options52 = new ArrayList<Option>();\n options52.add(new Option(1, \"France\"));\n options52.add(new Option(2, \"Germany\"));\n options52.add(new Option(3, \"Austria\"));\n options52.add(new Option(4, \"Hungary\"));\n QUESTION.add(new Question(52, \"Adolf Hitler was born in which country?\", getCategory(6), options52, options52.get(2)));\n\n List<Option> options53 = new ArrayList<Option>();\n options53.add(new Option(1, \"1973\"));\n options53.add(new Option(2, \"Austin\"));\n options53.add(new Option(3, \"Dallas\"));\n options53.add(new Option(4, \"1958\"));\n QUESTION.add(new Question(53, \"John F. Kennedy was assassinated in?\", getCategory(6), options53, options53.get(2)));\n\n List<Option> options54 = new ArrayList<Option>();\n options54.add(new Option(1, \"Johannes Gutenburg\"));\n options54.add(new Option(2, \"Benjamin Franklin\"));\n options54.add(new Option(3, \"Sir Isaac Newton\"));\n options54.add(new Option(4, \"Martin Luther\"));\n QUESTION.add(new Question(54, \"The first successful printing press was developed by this man.\", getCategory(6), options54, options54.get(0)));\n\n List<Option> options55 = new ArrayList<Option>();\n options55.add(new Option(1, \"The White Death\"));\n options55.add(new Option(2, \"The Black Plague\"));\n options55.add(new Option(3, \"Smallpox\"));\n options55.add(new Option(4, \"The Bubonic Plague\"));\n QUESTION.add(new Question(55, \"The disease that ravaged and killed a third of Europe's population in the 14th century is known as\", getCategory(6), options55, options55.get(3)));\n\n List<Option> options56 = new ArrayList<Option>();\n options56.add(new Option(1, \"Panipat\"));\n options56.add(new Option(2, \"Troy\"));\n options56.add(new Option(3, \"Waterloo\"));\n options56.add(new Option(4, \"Monaco\"));\n QUESTION.add(new Question(56, \"Napoleon was finally defeated at the battle known as?\", getCategory(6), options56, options56.get(2)));\n\n List<Option> options57 = new ArrayList<Option>();\n options57.add(new Option(1, \"Magellan\"));\n options57.add(new Option(2, \"Cook\"));\n options57.add(new Option(3, \"Marco\"));\n options57.add(new Option(4, \"Sir Francis Drake\"));\n QUESTION.add(new Question(57, \"Who was the first Western explorer to reach China?\", getCategory(6), options57, options57.get(2)));\n\n List<Option> options58 = new ArrayList<Option>();\n options58.add(new Option(1, \"Shah Jahan\"));\n options58.add(new Option(2, \"Chandragupta Maurya\"));\n options58.add(new Option(3, \"Humayun\"));\n options58.add(new Option(4, \"Sher Shah Suri\"));\n QUESTION.add(new Question(58, \"Who built the Grand Trunk Road?\", getCategory(6), options58, options58.get(3)));\n\n List<Option> options59 = new ArrayList<Option>();\n options59.add(new Option(1, \"Jawaharlal Nehru\"));\n options59.add(new Option(2, \"M. K. Gandhi\"));\n options59.add(new Option(3, \"Dr. Rajendra Prasad\"));\n options59.add(new Option(4, \"Dr. S. Radhakrishnan\"));\n QUESTION.add(new Question(59, \"Who was the first President of India?\", getCategory(6), options59, options59.get(2)));\n\n List<Option> options60 = new ArrayList<Option>();\n options60.add(new Option(1, \"8\"));\n options60.add(new Option(2, \"10\"));\n options60.add(new Option(3, \"5\"));\n options60.add(new Option(4, \"18\"));\n QUESTION.add(new Question(60, \"How many days did the battle of Mahabharata last?\", getCategory(6), options60, options60.get(3)));\n }\n return QUESTION;\n }",
"public static ArrayList<Question> init() {\r\n\t\t\r\n\t\tArrayList<Question> questionList = new ArrayList<Question>();\r\n\t\t\r\n\t\tquestionList.add(new Question(\"What's the capital of Finland?\", \"Helsinki\", \"Hilsinki\",\r\n\t\t\t\t\"Halsinki\", \"Hulsinki\"));\r\n\t\tquestionList.add(new Question(\"What does the fox say?\", \"Nobody really knows\", \"Woof\", \"Meow\", \"Tweet\"));\r\n\t\tquestionList.add(new Question(\"Which insect inspired the term 'computer bug'?\", \"Moth\", \"Roach\", \"Wasp\", \"Fly\"));\r\n\t\tquestionList.add(new Question(\"Who's the protagonist of the movie 'Die Hard'?\", \"John McClane\", \"Jake Peralta\", \"Harry Stamper\", \"Jake MacClane\"));\r\n\t\tquestionList.add(new Question(\"Which one of the following is NOT a star in the Big Dipper constellation (Otava)?\", \"Altair\", \"Megrez\", \"Alkaid\", \"Phecda\"));\r\n\t\tquestionList.add(new Question(\"Which one of the following is NOT a dragon on the TV-series 'Game of Thrones'?\", \"Nymeria\", \"Drogon\", \"Viserion\", \"Rhaegal\"));\r\n\t\tquestionList.add(new Question(\"How many James Bond films are there (Spectre being the latest)?\", \"24\", \"50\", \"30\", \"26\"));\r\n\t\tquestionList.add(new Question(\"What breed is Sauli Niinistö and Jenni Haukio's dog Lennu?\", \"Boston terrier\", \"French bulldog\", \"Chihuahua\", \"Golden retriever\"));\r\n\t\tquestionList.add(new Question(\"Who has composed the Finnish national anthem, 'Maamme'?\", \"Fredrik Pacius\", \"Jean Sibelius\", \"Robert Kajanus\", \"Armas Launis\"));\r\n\t\tquestionList.add(new Question(\"What is the largest desert in the world called?\", \"Sahara\", \"Kalahari\", \"Thar\", \"Sonoran\"));\r\n\t\tquestionList.add(new Question(\"What is the name of the horse that is often seen in the streets of Turku?\", \"Kullannuppu\", \"Hulmuharja\", \"Ilon Pilke\", \"Valo\"));\r\n\t\tquestionList.add(new Question(\"How many different known species of shark are there?\", \"Over 400\", \"Less than 100\", \"200\", \"340\"));\r\n\t\t\r\n\t\t\r\n\t\treturn questionList;\r\n\t\t\r\n\t}",
"public Test(List<Question> questions) {\n\t\tthis.questions = questions;\n\t}",
"public Question(){}",
"void addQuestions(String surveyId, List<Question> questions);",
"public void addQuestion(Question a) {\n quesCollec.add(a);\n }",
"@Override\n public void add(String question, String answer){\n questions.add(question);\n answers.add(answer);\n\n }",
"private void addQuestion() {\n Question q = new Question(\n \"¿Quien propuso la prueba del camino básico ?\", \"Tom McCabe\", \"Tom Robert\", \"Tom Charlie\", \"Tom McCabe\");\n this.addQuestion(q);\n\n\n Question q1 = new Question(\"¿Qué es una prueba de Caja negra y que errores desean encontrar en las categorías?\", \"Hace una cobertura de declaraciones del código, ramas, caminos y condiciones\", \"esta basada en la funcionalidad de los módulos del programa\", \" determina la funcionalidad del sistema\", \" determina la funcionalidad del sistema\");\n this.addQuestion(q1);\n Question q2 = new Question(\"¿Qué es la complejidad ciclomática es una métrica de calidad software?\", \"Hace una cobertura de declaraciones del código, ramas, caminos y condiciones\", \"esta basada en la funcionalidad de los módulos del programa\", \"basada en el cálculo del número\", \"basada en el cálculo del número\");\n this.addQuestion(q2);\n //preguntas del quiz II\n Question q3=new Question(\"Las pruebas de caja blanca buscan revisar los caminos, condiciones, \" +\n \"particiones de control y datos, de las funciones o módulos del sistema; \" +\n \"para lo cual el grupo de diseño de pruebas debe:\",\n \"Conformar un grupo de personas para que use el sistema nuevo\",\n \"Ejecutar sistema nuevo con los datos usados en el sistema actual\",\n \"Generar registro de datos que ejecute al menos una vez cada instrucción\",\n \"Generar registro de datos que ejecute al menos una vez cada instrucción\");\n this.addQuestion(q3);\n Question q4=new Question(\"¿Las pruebas unitarias son llamadas?\",\n \"Pruebas del camino\", \"Pruebas modulares\",\n \"Pruebas de complejidad\", \"Pruebas modulares\");\n this.addQuestion(q4);\n Question q5=new Question(\"¿Qué es una prueba de camino básico?\",\n \"Hace una cobertura de declaraciones del código\",\n \"Permite determinar si un modulo esta listo\",\n \"Técnica de pueba de caja blanca\",\n \"Técnica de pueba de caja blanca\" );\n this.addQuestion(q5);\n Question q6=new Question(\"Prueba de camino es propuesta:\", \"Tom McCabe\", \"McCall \", \"Pressman\",\n \"Tom McCabe\");\n this.addQuestion(q6);\n Question q7=new Question(\"¿Qué es complejidad ciclomatica?\",\"Grafo de flujo\",\"Programming\",\n \"Metrica\",\"Metrica\");\n this.addQuestion(q7);\n //preguntas del quiz III\n Question q8 = new Question(\n \"¿Se le llama prueba de regresión?\", \"Se tienen que hacer nuevas pruebas donde se han probado antes\",\n \"Manten informes detallados de las pruebas\", \"Selección de los usuarios que van a realizar las pruebas\",\n \"Se tienen que hacer nuevas pruebas donde se han probado antes\");\n this.addQuestion(q8);\n Question q9 = new Question(\"¿Cómo se realizan las pruebas de regresión?\",\n \"Selección de los usuarios que van a realizar las pruebas\",\n \"Se tienen que hacer nuevas pruebas donde se han probado antes\", \"A través de herramientas de automatización de pruebas\", \"A través de herramientas de automatización de pruebas\");\n this.addQuestion(q9);\n Question q10 = new Question(\"¿Cuándo ya hay falta de tiempo para ejecutar casos de prueba ya ejecutadas se dejan?\",\n \"En primer plano\", \"En segundo plano\", \"En tercer plano\", \"En segundo plano\");\n this.addQuestion(q10);\n //preguntas del quiz IV\n Question q11 = new Question(\n \"¿En qué se enfocan las pruebas funcionales?\",\n \"Enfocarse en los requisitos funcionales\", \"Enfocarse en los requisitos no funcionales\",\n \"Verificar la apropiada aceptación de datos\", \"Enfocarse en los requisitos funcionales\");\n this.addQuestion(q11);\n Question q12 = new Question(\"Las metas de estas pruebas son:\", \"Verificar la apropiada aceptación de datos\",\n \"Verificar el procesamiento\", \"Verificar la apropiada aceptación de datos, procedimiento y recuperación\",\n \"Verificar la apropiada aceptación de datos, procedimiento y recuperación\");\n this.addQuestion(q12);\n Question q13 = new Question(\"¿En qué estan basadas este tipo de pruebas?\",\n \"Hace una cobertura de declaraciones del código, ramas, caminos y condiciones\",\n \"Esta basada en la funcionalidad de los módulos del programa\",\n \"Técnicas de cajas negra\", \"Técnicas de cajas negra\");\n this.addQuestion(q13);\n //preguntas del quiz V\n Question q14 = new Question(\n \"¿Cúal es el objetivo de esta técnica?\", \"Identificar errores introducidos por la combinación de programas probados unitariamente\",\n \"Decide qué acciones tomar cuando se descubren problemas\",\n \"Verificar que las interfaces entre las componentes de software funcionan correctamente\",\n \"Identificar errores introducidos por la combinación de programas probados unitariamente\");\n this.addQuestion(q14);\n Question q15 = new Question(\"¿Cúal es la descripción de la Prueba?\",\n \"Hace una cobertura de declaraciones del código, ramas, caminos y condiciones\",\n \"Esta basada en la funcionalidad de los módulos del programa\",\n \"Describe cómo verificar que las interfaces entre las componentes de software funcionan correctamente\",\n \"Describe cómo verificar que las interfaces entre las componentes de software funcionan correctamente\");\n this.addQuestion(q15);\n Question q16 = new Question(\"Por cada caso de prueba ejecutado:\",\n \"Hace una cobertura de declaraciones del código, ramas, caminos y condiciones\",\n \"Esta basada en la funcionalidad de los módulos del programa\",\n \"Comparar el resultado esperado con el resultado obtenido\", \"Comparar el resultado esperado con el resultado obtenido\");\n this.addQuestion(q16);\n //preguntas del quiz VI\n Question q17 = new Question(\n \"Este tipo de pruebas sirven para garantizar que la calidad del código es realmente óptima:\",\n \"Pruebas Unitarias\", \"Pruebas de Calidad de Código\",\n \"Pruebas de Regresión\", \"Pruebas de Calidad de Código\");\n this.addQuestion(q17);\n Question q18 = new Question(\"Pruebas de Calidad de código sirven para: \",\n \"Hace una cobertura de declaraciones del código, ramas, caminos y condiciones\",\n \"Verificar que las especificaciones de diseño sean alcanzadas\",\n \"Garantizar la probabilidad de tener errores o bugs en la codificación\", \"Garantizar la probabilidad de tener errores o bugs en la codificación\");\n this.addQuestion(q18);\n Question q19 = new Question(\"Este análisis nos indica el porcentaje que nuestro código desarrollado ha sido probado por las pruebas unitarias\",\n \"Cobertura\", \"Focalización\", \"Regresión\", \"Cobertura\");\n this.addQuestion(q19);\n\n Question q20 = new Question( \"¿Qué significa V(G)?\",\n \"Número de Regiones\", \"Número de Aristas\", \"Número de Nodos\", \"Número de Regiones\");\n this.addQuestion(q20);\n\n Question q21 = new Question( \"¿Qué significa A?\",\n \"Número de Regiones\", \"Número de Aristas\", \"Número de Nodos\", \"Número de Aristas\");\n this.addQuestion(q21);\n\n Question q22 = new Question( \"¿Qué significa N?\",\n \"Número de Regiones\", \"Número de Aristas\", \"Número de Nodos\", \"Número de Nodos\");\n this.addQuestion(q22);\n\n Question q23 = new Question( \"¿Qué significa P?\",\n \"Número de Regiones\", \"Número de Aristas\", \"Número de Nodos Predicado\", \"Número de Nodos Predicado\");\n this.addQuestion(q23);\n Question q24 = new Question( \"De cuantás formas se puede calcular la complejidad ciclomatica V(G):\",\n \"3\", \"1\", \"2\", \"3\");\n this.addQuestion(q24);\n\n // END\n }",
"List<Question> getQuestions();",
"public interface Question {\n public String question();\n public String answer();\n public void setQuestion(String q);\n public void setAnswer(String a);\n public boolean isMultipleChoice();\n}",
"public List<MultQuestion> multChoiceQuestions(int qid);",
"List<SurveyQuestion> getSurveyQuestionsByQuestions(List<Question> questions);",
"public Question() {\n\n }",
"public Test(ArrayList<WrittenQuestion> questions){\r\n\t\tmyQuestions = new ArrayList<WrittenQuestion>();\r\n\t\tfor(WrittenQuestion q : questions){\r\n\t\t\tif(q instanceof Question){\r\n\t\t\t\tmyQuestions.add(new Question((Question)q));\r\n\t\t\t}else{\r\n\t\t\t\tmyQuestions.add(new WrittenQuestion(q));\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(allIDs==null){\r\n\t\t\tallIDs = new ArrayList<Integer>();\r\n\t\t\tfor (int i = 0; i<1000; i++){\r\n\t\t\t\tallIDs.add(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tRandom r = new Random();\r\n\t\tid = allIDs.remove((int)(r.nextInt(allIDs.size())));\r\n\r\n\t}",
"public void addQuestions() {\n\t\tboolean addNewQuestion = true;\n\t\tString text;\n\t\tQuestion q;\n\t\tString promptResponse;\n\t\t\n\t\twhile (addNewQuestion) {\n\t\t\tSystem.out.print(\"Enter question: \");\n\t\t\ttext = System.console().readLine();\n\t\t\tq = new QuestionImpl(questionId, text);\n\t\t\tthis.questionId++;\n\t\t\tq.addAnswers();\n\t\t\tthis.questions.add(q);\n\n\t\t\tSystem.out.print(\"Hit Return to add another question or q to quit: \");\n\t\t\tpromptResponse = System.console().readLine();\n\t\t\tif (promptResponse.equals(\"q\") ||\n\t\t\t\t\tpromptResponse.equals(\"Q\") ||\n\t\t\t\t\tpromptResponse.equals(\"quit\") ||\n\t\t\t\t\tpromptResponse.equals(\"Quit\")) {\n\t\t\t\taddNewQuestion = false;\n\t\t\t}\n\t\t}\n\t}",
"private void addQuestion() {\n if (modifiable()) {\n try {\n this.questions.add(Question.fromInput(gradeable()));\n } catch (UserInputException e) {\n System.err.println(e.getMessage());\n }\n } else {\n System.err.println(\"Can not modify this by add a question.\");\n }\n }",
"public Test() {\n\t\tquestions = new LinkedList<Question>();\n\t}",
"void addQuestionAnswer(Answer answer);",
"private void setFAQs () {\n\n QuestionDataModel question1 = new QuestionDataModel(\n \"What is Psychiatry?\", \"Psychiatry deals with more extreme mental disorders such as Schizophrenia, where a chemical imbalance plays into an individual’s mental disorder. Issues coming from the “inside” to “out”\\n\");\n QuestionDataModel question2 = new QuestionDataModel(\n \"What Treatments Do Psychiatrists Use?\", \"Psychiatrists use a variety of treatments – including various forms of psychotherapy, medications, psychosocial interventions, and other treatments (such as electroconvulsive therapy or ECT), depending on the needs of each patient.\");\n QuestionDataModel question3 = new QuestionDataModel(\n \"What is the difference between psychiatrists and psychologists?\", \"A psychiatrist is a medical doctor (completed medical school and residency) with special training in psychiatry. A psychologist usually has an advanced degree, most commonly in clinical psychology, and often has extensive training in research or clinical practice.\");\n QuestionDataModel question4 = new QuestionDataModel(\n \"What is Psychology ?\", \"Psychology is the scientific study of the mind and behavior, according to the American Psychological Association. Psychology is a multifaceted discipline and includes many sub-fields of study such areas as human development, sports, health, clinical, social behavior, and cognitive processes.\");\n QuestionDataModel question5 = new QuestionDataModel(\n \"What is psychologists goal?\", \"Those with issues coming from the “outside” “in” (i.e. lost job and partner so feeling depressed) are better suited with psychologists, they offer guiding you into alternative and healthier perspectives in tackling daily life during ‘talk therapy’\");\n QuestionDataModel question6 = new QuestionDataModel(\n \"What is the difference between psychiatrists and psychologists?\", \"Psychiatrists can prescribe and psychologists cannot, they may be able to build a report and suggest medications to a psychiatrist but it is the psychiatrist that has the final say.\");\n QuestionDataModel question7 = new QuestionDataModel(\n \"What is a behavioural therapist?\", \"A behavioural therapist such as an ABA (“Applied Behavioural Analysis”) therapist or an occupational therapist focuses not on the psychological but rather the behavioural aspects of an issue. In a sense, it can be considered a “band-aid” fix, however, it has consistently shown to be an extremely effective method in turning maladaptive behaviours with adaptive behaviours.\");\n QuestionDataModel question8 = new QuestionDataModel(\n \"Why behavioral therapy?\", \"Cognitive-behavioral therapy is used to treat a wide range of issues. It's often the preferred type of psychotherapy because it can quickly help you identify and cope with specific challenges. It generally requires fewer sessions than other types of therapy and is done in a structured way.\");\n QuestionDataModel question9 = new QuestionDataModel(\n \"Is behavioral therapy beneficial?\", \"Psychiatrists can prescribe and psychologists cannot, they may be able to build a report and suggest medications to a psychiatrist but it is the psychiatrist that has the final say.\");\n QuestionDataModel question10 = new QuestionDataModel(\n \"What is alternative therapy?\", \"Complementary and alternative therapies typically take a holistic approach to your physical and mental health.\");\n QuestionDataModel question11 = new QuestionDataModel(\n \"Can they treat mental health problems?\", \"Complementary and alternative therapies can be used as a treatment for both physical and mental health problems. The particular problems that they can help will depend on the specific therapy that you are interested in, but many can help to reduce feelings of depression and anxiety. Some people also find they can help with sleep problems, relaxation, and feelings of stress.\");\n QuestionDataModel question12 = new QuestionDataModel(\n \"What else should I consider before starting therapy?\", \"Only you can decide whether a type of treatment feels right for you, But it might help you to think about: What do I want to get out of it? Could this therapy be adapted to meet my needs?\");\n\n ArrayList<QuestionDataModel> faqs1 = new ArrayList<>();\n ArrayList<QuestionDataModel> faqs2 = new ArrayList<>();\n ArrayList<QuestionDataModel> faqs3 = new ArrayList<>();\n ArrayList<QuestionDataModel> faqs4 = new ArrayList<>();\n faqs1.add(question1);\n faqs1.add(question2);\n faqs1.add(question3);\n faqs2.add(question4);\n faqs2.add(question5);\n faqs2.add(question6);\n faqs3.add(question7);\n faqs3.add(question8);\n faqs3.add(question9);\n faqs4.add(question10);\n faqs4.add(question11);\n faqs4.add(question12);\n\n\n CategoryDataModel category1 = new CategoryDataModel(R.drawable.psychaitry,\n \"Psychiatry\",\n \"Psychiatry is the medical specialty devoted to the diagnosis, prevention, and treatment of mental disorders.\",\n R.drawable.psychiatry_q);\n\n CategoryDataModel category2 = new CategoryDataModel(R.drawable.psychology,\n \"Psychology\",\n \"Psychology is the science of behavior and mind which includes the study of conscious and unconscious phenomena.\",\n R.drawable.psychology_q);\n\n CategoryDataModel category3 = new CategoryDataModel(R.drawable.behavioral_therapy,\n \"Behavioral Therapy\",\n \"Behavior therapy is a broad term referring to clinical psychotherapy that uses techniques derived from behaviorism\",\n R.drawable.behaviour_therapy_q);\n CategoryDataModel category4 = new CategoryDataModel(R.drawable.alternative_healing,\n \"Alternative Therapy\",\n \"Complementary and alternative therapies typically take a holistic approach to your physical and mental health.\",\n R.drawable.alternative_therapy_q);\n\n String FAQ1 = \"What is Psychiatry?\";\n String FAQ2 = \"What is Psychology?\";\n String FAQ3 = \"What is Behavioral Therapy?\";\n String FAQ4 = \"What is Alternative Therapy?\";\n String FAQ5 = \"Report a problem\";\n\n FAQsDataModel FAQsDataModel1 = new FAQsDataModel(FAQ1, category1,faqs1);\n FAQsDataModel FAQsDataModel2 = new FAQsDataModel(FAQ2, category2,faqs2);\n FAQsDataModel FAQsDataModel3 = new FAQsDataModel(FAQ3, category3,faqs3);\n FAQsDataModel FAQsDataModel4 = new FAQsDataModel(FAQ4, category4,faqs4);\n FAQsDataModel FAQsDataModel5 = new FAQsDataModel(FAQ5, category4,faqs4);\n\n\n\n if (mFAQs.isEmpty()) {\n\n mFAQs.add(FAQsDataModel1);\n mFAQs.add(FAQsDataModel2);\n mFAQs.add(FAQsDataModel3);\n mFAQs.add(FAQsDataModel4);\n mFAQs.add(FAQsDataModel5);\n\n\n }\n }",
"public void startSingleQuestionSet() {\n this.singleQuestionSet = new HashSet<>();//creates a new singleQuestionSet\n for (Question q : this.getForm().getQuestionList()) {//for every question in the question list of the current form\n if (q.getType().getId() == 2) {//if the question is type Single Question\n Quest newQuest = new Quest();//creates a new Quest\n newQuest.setqQuestion(q);//adds the current question to the new Quest\n this.singleQuestionSet.add(newQuest);//adds the new Quest to the new singleQuestionSet\n }\n }\n }",
"public Collection<Question> getQuestions();",
"public void setQuestions(){\r\n question.setTestname(test.getText().toString());\r\n question.setQuestion(ques.getText().toString());\r\n question.setOption1(opt1.getText().toString());\r\n question.setOption2(opt2.getText().toString());\r\n question.setOption3(opt3.getText().toString());\r\n int num = Integer.parseInt(correct.getText().toString());\r\n question.setAnswerNumber(num);\r\n long check = db.addToDb(question);\r\n if(check == -1){\r\n Toast.makeText(getBaseContext(), \"Question already exists\", Toast.LENGTH_LONG).show();\r\n }else{\r\n Toast.makeText(getBaseContext(), \"Question added\", Toast.LENGTH_LONG).show();\r\n }\r\n }",
"Question(String ques, String opt1, String opt2, String opt3, String opt4) {\n this.ques = ques;\n this.opt1 = opt1;\n this.opt2 = opt2;\n this.opt3 = opt3;\n this.opt4 = opt4;\n }",
"public SurveyWithQuestions (SurveyMetaData survey, List<SurveyQuestion> questions)\n {\n this.survey = survey;\n this.questions = questions;\n }",
"@Override\n public void add(Question q) {\n try {\n c = DBConncetion.getConnection();\n int type = q.getType() == MultipleChoice ? 1 : 2; // 1 = MC , 2 = FB\n System.out.println(type);\n String sql = \"Insert into mainquestion \\n\" +\n \"Values (?,?,?,?,0,0,0)\";\n PreparedStatement pstmt = c.prepareStatement(sql);\n pstmt.setString(1,String.valueOf(q.getId()));\n pstmt.setString(2,q.getTitle());\n pstmt.setString(3,String.valueOf(q.getTime()));\n pstmt.setString(4,String.valueOf(type));\n pstmt.executeUpdate();\n if (type == 1) {\n sql = \"Insert into multiplechoice \\n\" +\n \"Values (?,?,?,?,?,?)\";\n MultipleChoice mc = (MultipleChoice) q;\n String[] answers = mc.getAnswers();\n pstmt = c.prepareStatement(sql);\n pstmt.setString(1,String.valueOf(q.getId()));\n pstmt.setString(2,answers[0]);\n pstmt.setString(3,answers[1]);\n pstmt.setString(4,answers[2]);\n pstmt.setString(5,answers[3]);\n pstmt.setString(6,mc.getCorrectAnswers());\n pstmt.executeUpdate();\n } else {\n sql = \"Insert into fill_blank Values(?,?)\";\n FillBlank fb = (FillBlank) q;\n pstmt = c.prepareStatement(sql);\n pstmt.setString(1,String.valueOf(q.getId()));\n pstmt.setString(2,fb.getCorrectAnswer());\n pstmt.executeUpdate();\n }\n } catch (Exception e) {\n throw new LoadSaveException(\"Error while adding\");\n }\n }",
"@Override\n\tpublic boolean addQuestion(QuestionObject question) {\n\t\tif (question != null && !questionComposite.checkExist(question)) {\n\t\t\tquestionComposite.add(question);\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}",
"private void addQuestion(Questions question) {\n ContentValues cv = new ContentValues();\n cv.put(QuestionsTable.Column_Question, question.getQuestion());\n cv.put(QuestionsTable.Column_Option1, question.getOption1());\n cv.put(QuestionsTable.Column_Option2, question.getOption2());\n cv.put(QuestionsTable.Column_Option3, question.getOption3());\n cv.put(QuestionsTable.Column_Option4, question.getOption4());\n cv.put(QuestionsTable.Column_Answer_Nr, question.getAnswerNr());\n db.insert(QuestionsTable.Table_name, null, cv);\n }",
"public void startMultQuestionSet() {\n this.multQuestionSet = new HashSet<>();//creates a new multQuestionSet\n for (Question q : this.getForm().getQuestionList()) {//for every question in the question list of the current form\n if (q.getType().getId() == 1) {//if the question is type Multiple Question\n Quest newQuest = new Quest();//creates a new Quest\n newQuest.setqQuestion(q);//adds the current question to the new Quest\n this.multQuestionSet.add(newQuest);//adds the new Quest to the new multQuestionSet\n }\n }\n }",
"public MultipleQuestion(String question, ArrayList<String> choices){\n\t\tthis.question = question;\n\t\tthis.choices = choices;\n\t}",
"public void add( IAnswer possibleAnswer );",
"@Test\r\n\tpublic void testCreate() {\r\n\t\tQuestion q = new Question(\"Empty\", 1, 20, quizzes, null, choices);\r\n\t\tdao.create(q);\r\n\t}",
"List<Question> getQuestionsUsed();",
"Question getFirstQuestion();",
"public void generateDemoQuiz() {\n Quiz demoQuiz = new Quiz(); //Instantiate a Quiz\n Category testCategory = makeCategory(); //Make some bs categories to attach the quiz\n Question question1 = new Question(); //Make some bs questions (just one for now)\n question1.setQuestion(\"Which of the following famous scientist cured Cat Cancer?\"); //Set the question ... of the question? IDK how to word this better\n\n //Make some funny cat names\n Answer a1 = new Answer(\"H. John Whiskers\");\n Answer a2 = new Answer(\"Bartolemeu Meowser\");\n Answer a3 = new Answer(\"Catalie Portman\");\n Answer a4 = new Answer(\"Anderson Pooper\");\n\n //Build an arraylist full of said cat names\n ArrayList<Answer> answerList = new ArrayList<Answer>();\n answerList.add(a1);\n answerList.add(a2);\n answerList.add(a3);\n answerList.add(a4);\n\n //Put those answers inside that question!\n question1.setAnswerChoices(answerList);\n question1.setCorrectAnswer(a1); //Everybody knows H John Whiskers cured kitty cancer\n\n //Build an arraylist full of the question(s) you just made, in our demo case there is only one question\n ArrayList<Question> questionList = new ArrayList<Question>();\n questionList.add(question1); //Put the questions inside your list\n\n\n //Put all the data you just made into a Quiz\n demoQuiz.setQuizName(\"Famous Cat Scientists\");\n demoQuiz.setQuizCategory(testCategory);\n demoQuiz.setQuizQuestions(questionList);\n\n }",
"List<Question> selectByExample(QuestionExample example);",
"List<Question> selectByExample(QuestionExample example);",
"List<Question> selectByExample(QuestionExample example);",
"List<Question> selectByExample(QuestionExample example);",
"QuestionPick addPickDetail(Question question);",
"public void setQuestions(Vector<Question> q){\n\t\t\tquestions = q;\n\t\t}",
"private QuestionBank() {\n quesCollec = new ArrayList<Question>();\n }",
"public void addQuestionAndAnswer(String question, String answer){\n this.questionList.add(question);\n this.answerList.add(answer);\n }",
"public Question(int id, String text, ObservableArrayList<Answer> answers, boolean multiple)\n {\n this.id = id;\n this.text.set(text);\n this.answers = answers;\n this.multiple.set(multiple);\n }",
"List<Question11> selectByExample(Question11Example example);",
"public List<Question> getQuestions()\n\t{\n\t\tList<Question> shallowCopy = new ArrayList<>();\n\t\tshallowCopy.addAll(allQuestions);\n\t\treturn shallowCopy;\n\t}",
"public void createQuestion(int sid,int qid,String qtype,String qtitle,String answer_a,String answer_b,String answer_c,String answer_d);",
"public interface QuestionInterface {\n\t/**\n\t * Sets the question.\n\t * @param question to be asked\n\t */\n\tpublic void setQuestion(String question);\n\t\n\t/**\n\t * Add options to the question\n\t * @param opiton The text for the option\n\t * @param correct is this option a correct answer.\n\t */\n\tpublic void addOption(String opiton, boolean correct);\n\t\n\tpublic List<String> getOptions();\n\t\n\tpublic List<Boolean> getCorrectA();\n}",
"private static ArrayList<Quest> createQuests() {\n ArrayList<Quest> quests = new ArrayList();\n //Create Cooks assistant and imp catcher;\n\n //Imp Catcher\n ArrayList<String> itemReqs = new ArrayList();\n itemReqs.add(\"Yellow Bead\");\n itemReqs.add(\"Red Bead\");\n itemReqs.add(\"Black Bead\");\n itemReqs.add(\"While Bead\");\n QuestStep qs1 = new QuestStep(1, \"Hand in beads to wizard\", itemReqs,12337);\n ArrayList<QuestStep> questSteps = new ArrayList();\n questSteps.add(qs1);\n\n int[] skillReqs = new int[Constant.NUMBER_OF_Skills];\n for (int i = 0; i < Constant.NUMBER_OF_Skills; i++) {\n skillReqs[i] = 0;\n }\n ArrayList<String> questReqs = new ArrayList();\n Quest q1 = new Quest(\"Imp Catcher\", questSteps,12337, skillReqs, 0, questReqs);\n quests.add(q1);\n\n //Cooks assistant\n itemReqs = new ArrayList();\n itemReqs.add(\"Pot of Flour\");\n itemReqs.add(\"Egg\");\n itemReqs.add(\"Bucket of Milk\");\n qs1 = new QuestStep(1, \"Hand in ingredients to chef\", itemReqs,12850);\n questSteps = new ArrayList();\n questSteps.add(qs1);\n\n\n Quest q2 = new Quest(\"Cooks Assistant\", questSteps,12850, skillReqs, 0, questReqs);\n quests.add(q2);\n return quests;\n }",
"Question() {\n ques = opt1 = opt2 = opt3 = opt4 = null; // initializing to null\n }",
"public QuestionTF() {}",
"public void answerQuestion(){\n for (int i = 0; i < questionList.size(); i++){\r\n if (questionList.get(i).question.startsWith(\"How\")){\r\n howQuestions.add(new Question(questionList.get(i).id, questionList.get(i).question, questionList.get(i).answer));\r\n }\r\n }\r\n\r\n // Print All When Questions\r\n System.out.println(\"How Questions\");\r\n for (int i = 0; i < howQuestions.size(); i++){\r\n System.out.println(howQuestions.get(i).question);\r\n }\r\n\r\n //==== Question Entities ====\r\n // Split All When Question to only questions that have the entities\r\n if (!howQuestions.isEmpty()){\r\n if (!questionEntities.isEmpty()){\r\n for (int c = 0; c < questionEntities.size(); c++){\r\n for (int i = 0; i < howQuestions.size(); i++){\r\n if (howQuestions.get(i).question.contains(questionEntities.get(c))){\r\n answers.add(new Question(howQuestions.get(i).id, howQuestions.get(i).question, howQuestions.get(i).answer));\r\n }\r\n }\r\n }\r\n }\r\n else{\r\n if (!questionTags.isEmpty()){\r\n for (int c = 0; c < questionTags.size(); c++){\r\n for (int i = 0; i < howQuestions.size(); i++){\r\n if (howQuestions.get(i).question.contains(questionTags.get(c))){\r\n answers.add(new Question(howQuestions.get(i).id, howQuestions.get(i).question, howQuestions.get(i).answer));\r\n }\r\n }\r\n }\r\n }\r\n else{\r\n System.out.println(\"There no answer for your question !\");\r\n System.exit(0);\r\n }\r\n }\r\n }\r\n\r\n // Print All Entities Questions\r\n System.out.println(\"Questions of 'How' that have entities and tags :\");\r\n for (int i = 0; i < answers.size(); i++){\r\n for (int j = 1; j < answers.size(); j++){\r\n if (answers.get(i).id == answers.get(j).id){\r\n answers.remove(j);\r\n }\r\n }\r\n }\r\n \r\n for (int i = 0; i < answers.size(); i++){\r\n System.out.println(answers.get(i).question);\r\n }\r\n\r\n\r\n //==== Question Tags ====\r\n for (int i = 0; i < questionTags.size(); i++){\r\n for (int k = 0; k < answers.size(); k++){\r\n if (answers.get(k).question.contains(questionTags.get(i))){\r\n continue;\r\n }\r\n else{\r\n answers.remove(k);\r\n }\r\n }\r\n }\r\n }",
"public QuestionDetailExample() {\n oredCriteria = new ArrayList<Criteria>();\n }",
"public interface QuestionStore {\n\n /** Lists questions. */\n List<Question> get();\n\n /** Gets number of questions. */\n int getNumberOfQuestions();\n\n /** Gets number of wrong answers. */\n int getWrongAnswers();\n\n /** Adds a new question. */\n void add(String question, long time, boolean correct);\n\n /** Cleans up the list. */\n void cleanUp();\n}",
"public ChoiceQuestion() {\n m_choices = new ArrayList<>();\n }",
"public List<Boolean> getGivenAnswers()\n {\n return givenAnswers;\n }",
"public void addQuestion(Question question) {\n\t\tquestions.add(question);\n\t}",
"Question getQuestion();",
"public boolean isAddQuestion() {\n return isAddQuestion;\n }",
"private void fillQuestionsTable() {\n Question q1 = new Question(\"Who is NOT a Master on the Jedi council?\", \"Anakin Skywalker\", \"Obi Wan Kenobi\", \"Mace Windu\", \"Yoda\", 1);\n Question q2 = new Question(\"Who was Anakin Skywalker's padawan?\", \"Kit Fisto\", \"Ashoka Tano\", \"Barris Ofee\", \"Jacen Solo\",2);\n Question q3 = new Question(\"What Separatist leader liked to make find additions to his collection?\", \"Pong Krell\", \"Count Dooku\", \"General Grevious\", \"Darth Bane\", 3);\n Question q4 = new Question(\"Choose the correct Response:\\n Hello There!\", \"General Kenobi!\", \"You are a bold one!\", \"You never should have come here!\", \"You turned her against me!\", 1);\n Question q5 = new Question(\"What ancient combat technique did Master Obi Wan Kenobi use to his advantage throughout the Clone Wars?\", \"Kendo arts\", \"The High ground\", \"Lightsaber Form VIII\", \"Force healing\", 2);\n Question q6 = new Question(\"What was the only surviving member of Domino squad?\", \"Fives\", \"Heavy\", \"Echo\", \"Jesse\", 3);\n Question q7 = new Question(\"What Jedi brutally murdered children as a part of his descent to become a Sith?\", \"Quinlan Vos\", \"Plo Koon\", \"Kit Fisto\", \"Anakin Skywalker\", 4);\n Question q8 = new Question(\"What Sith was the first to reveal himself to the Jedi after a millenia and was subsquently cut in half shortly after?\", \"Darth Plagieus\", \"Darth Maul\", \"Darth Bane\", \"Darth Cadeus\", 2);\n Question q9 = new Question(\"What 4 armed creature operates a diner on the upper levels of Coruscant?\", \"Dexter Jettster\", \"Cad Bane\", \"Aurua Sing\", \"Dorme Amidala\", 1);\n Question q10 = new Question(\"What ruler fell in love with an underage boy and subsequently married him once he became a Jedi?\", \"Aurua Sing\", \"Duttchess Satine\", \"Mara Jade\", \"Padme Amidala\", 4);\n\n // adds them to the list\n addQuestion(q1);\n addQuestion(q2);\n addQuestion(q3);\n addQuestion(q4);\n addQuestion(q5);\n addQuestion(q6);\n addQuestion(q7);\n addQuestion(q8);\n addQuestion(q9);\n addQuestion(q10);\n }",
"@Test\n\tpublic void testGetNewQuestions() {\n\t\tList<QnaQuestion> questions = questionLogic.getNewQuestions(LOCATION1_ID);\n\t\tAssert.assertEquals(questions.size(), 2);\n\t\t\n\t\tAssert.assertTrue(questions.contains(tdp.question1_location1));\n\t\tAssert.assertTrue(questions.contains(tdp.question5_location1));\n\t}",
"public Survey() {\n\t\tthis.questions = new TreeSet<Ordered_question>( new Comparator<Ordered_question>() {\n\t\t public int compare(Ordered_question q1, Ordered_question q2) {\n\t\t \treturn Integer.compare(q1.getOrder(), q2.getOrder());\n\t\t }\n\t\t}) ;\n\t}",
"public Answers()\r\n {\r\n \r\n }",
"public QuestionnaireExample() {\n oredCriteria = new ArrayList<Criteria>();\n }",
"public List<Question> getQuestions() {\n return questionList;\n }",
"public BooleanPhenotype() {\n dataValues = new ArrayList<Boolean>();\n }",
"public void createTrueFalse() {\n Question q = new TrueFalse(this.in,this.o);\n this.o.setDisplay(\"Enter the prompt for your True/False question:\\n\");\n this.o.getDisplay();\n\n q.setPrompt(this.in.getUserInput());\n\n if (isTest) {\n Test t = (Test)this.survey;\n RCA ca = new RCA(this.in,this.o);\n\n this.o.setDisplay(\"Enter the correct answer (T/F):\\n\");\n this.o.getDisplay();\n\n ca.addResponse();\n\n while (!ca.getResponses().get(0).contains(\"T\") && !ca.getResponses().get(0).contains(\"F\")) {\n ca.removeResponse(0);\n this.o.setDisplay(\"Enter a valid answer (T/F):\\n\");\n this.o.getDisplay();\n ca.addResponse();\n }\n\n t.addAnswer(ca);\n }\n this.survey.addQuestion(q);\n }",
"public MultChoice()\n {\n super();\n answers = null;\n }",
"public void addQ (Question Q)\n {\n newQuestion = Q;\n \n enqueue();\n }",
"public void setSingleChoices() {\r\n Random randomGenerator = new Random();\r\n int singleAnswer = randomGenerator.nextInt(4);\r\n studentAnswer.add(singleAnswer); }",
"private Question setUpQuestion(List<Question> questionsList){\n int indexOfQuestion = random.nextInt(questionsList.size());\n questionToBeHandled = questionsList.get(indexOfQuestion);\n questionsList.remove(indexOfQuestion);\n return questionToBeHandled;\n }",
"public void loadQuestions() \n {\n try{\n ArrayList<QuestionPojo> questionList=QuestionDao.getQuestionByExamId(editExam.getExamId());\n for(QuestionPojo obj:questionList)\n {\n qstore.addQuestion(obj);\n }\n }\n catch(SQLException ex)\n {\n JOptionPane.showMessageDialog(null, \"Error while connecting to DB!\",\"Exception!\",JOptionPane.ERROR_MESSAGE);\n ex.printStackTrace();\n\n }\n }",
"public void addQuestion(Question quest) {\n ContentValues values = new ContentValues();\n values.put(KEY_QUES, quest.getQUESTION());\n values.put(KEY_ANSWER, quest.getANSWER());\n values.put(KEY_OPTA, quest.getOPTA());\n values.put(KEY_OPTB, quest.getOPTB());\n values.put(KEY_OPTC, quest.getOPTC());\n // Inserting Row\n db.insert(TABLE_NAME_QUEST, null, values);\n }",
"List<Question14> selectByExample(Question14Example example);",
"public List<TextQuestion> TextQuestions(int aid);",
"void add(String question, long time, boolean correct);",
"int insertSelective(Question record);",
"int insertSelective(Question record);",
"int insertSelective(Question record);",
"int insertSelective(Question record);",
"public void addQuiz(double score){\n quizzes.add(score);\n quizTotal += score;\n}",
"@Test\n void addAnswersToQuestionWhenQuestionIsGettingAdded(){\n quiz = new Quiz(69L, \"weeb quiz\", new ArrayList<>(), new User(),\"1\", new ArrayList<>());\n question = new Question(96L, new ArrayList<>(), new Quiz(), \"what's the monster inside of Yuji Itadori called?\");\n answer = new Answer(1L, \"Sukuna\", true, question);\n\n quizService.addQuiz(quiz, new User(42L, \"potato-san\", \"[email protected]\", \"iLovePotatoes420\", new ArrayList<>()));\n questionService.addQuestion(question, quiz);\n answerService.addAnswer(answer, question);\n\n String questionAnswer = \"Sukuna\";\n Optional<Question> questionNinetySix = questionService.getAllQuestions()\n .stream()\n .filter(q -> q.getQuestionId() == 96L)\n .findAny();\n\n if(questionNinetySix.isPresent()){\n String actualAnswer = questionNinetySix.get().getAnswers()\n .stream().findFirst().get().getAnswerContent();\n\n assertEquals(questionAnswer, actualAnswer);\n }\n }",
"public void setQuestion(final List<Question> question) {\n\t\tthis.question = question;\n\t}",
"int createSurvey(List<Question> questions, String userId);",
"public Saq(Question question, ArrayList<Answer> correctAnswerList, Difficulty difficulty,\n Set<Category> categories) {\n super(question, correctAnswerList, new ArrayList<>(), difficulty, categories);\n }",
"public void fillQuestionsTable() {\n\n //Hard Questions\n Questions q1 = new Questions(\"The redshift of a distant galaxy is 0·014. According to Hubble’s law, the distance of the galaxy from Earth is? \", \" 9·66 × 10e-12 m\", \" 9·32 × 10e27 m\", \"1·83 × 10e24 m\", \"1·30 × 10e26 m \", 3);\n addQuestion(q1);\n Questions q2 = new Questions(\"A ray of monochromatic light passes from air into water. The wavelength of this light in air is 589 nm. The speed of this light in water is? \", \" 2·56 × 10e2 m/s \", \"4·52 × 10e2 m/s\", \"4·78 × 10e2 m/s\", \"1·52 × 10e2 m/s\", 2);\n addQuestion(q2);\n Questions q3 = new Questions(\"A car is moving at a speed of 2·0 m s−1. The car now accelerates at 4·0 m s−2 until it reaches a speed of 14 m s−1. The distance travelled by the car during this acceleration is\", \"1.5m\", \"18m\", \"24m\", \"25m\", 3);\n addQuestion(q3);\n Questions q4 = new Questions(\"A spacecraft is travelling at 0·10c relative to a star. \\nAn observer on the spacecraft measures the speed of light emitted by the star to be?\", \"0.90c\", \"1.00c\", \"1.01c\", \"0.99c\", 2);\n addQuestion(q4);\n Questions q5 = new Questions(\"Measurements of the expansion rate of the Universe lead to the conclusion that the rate of expansion is increasing. Present theory proposes that this is due to? \", \"Redshift\", \"Dark Matter\", \"Dark Energy\", \"Gravity\", 3);\n addQuestion(q5);\n Questions q6 = new Questions(\"A block of wood slides with a constant velocity down a slope. The slope makes an angle of 30º with the horizontal axis. The mass of the block is 2·0 kg. The magnitude of the force of friction acting on the block is?\" , \"1.0N\", \"2.0N\", \"9.0N\", \"9.8N\", 4);\n addQuestion(q6);\n Questions q7 = new Questions(\"A planet orbits a star at a distance of 3·0 × 10e9 m. The star exerts a gravitational force of 1·6 × 10e27 N on the planet. The mass of the star is 6·0 × 10e30 kg. The mass of the planet is? \", \"2.4 x 10e14 kg\", \"3.6 x 10e25 kg\", \"1.2 x 10e16 kg\", \"1.6 x 10e26 kg\", 2);\n addQuestion(q7);\n Questions q8 = new Questions(\"Radiation of frequency 9·00 × 10e15 Hz is incident on a clean metal surface. The maximum kinetic energy of a photoelectron ejected from this surface is 5·70 × 10e−18 J. The work function of the metal is?\", \"2.67 x 10e-19 J\", \"9.10 x 10e-1 J\", \"1.60 x 10e-18 J\", \"4.80 x 10e-2 J\", 1);\n addQuestion(q8);\n Questions q9 = new Questions(\"The irradiance of light from a point source is 32 W m−2 at a distance of 4·0 m from the source. The irradiance of the light at a distance of 16 m from the source is? \", \"1.0 W m-2\", \"8.0 W m-2\", \"4.0 W m-2\", \"2.0 W m-2\", 4);\n addQuestion(q9);\n Questions q10 = new Questions(\"A person stands on a weighing machine in a lift. When the lift is at rest, the reading on the weighing machine is 700 N. The lift now descends and its speed increases at a constant rate. The reading on the weighing machine...\", \"Is a constant value higher than 700N. \", \"Is a constant value lower than 700N. \", \"Continually increases from 700 N. \", \"Continually decreases from 700 N. \", 2);\n addQuestion(q10);\n\n //Medium Questions\n Questions q11 = new Questions(\"What is Newtons Second Law of Motion?\", \"F = ma\", \"m = Fa\", \"F = a/m\", \"Every action has an equal and opposite reaction\", 1);\n addQuestion(q11);\n Questions q12 = new Questions(\"In s = vt, what does s stand for?\", \"Distance\", \"Speed\", \"Sin\", \"Displacement\", 4);\n addQuestion(q12);\n Questions q13 = new Questions(\"An object reaches terminal velocity when...\", \"Forward force is greater than the frictional force.\", \"All forces acting on that object are equal.\", \"Acceleration starts decreasing.\", \"Acceleration is greater than 0\", 2);\n addQuestion(q13);\n Questions q14 = new Questions(\"An Elastic Collision is where?\", \"There is no loss of Kinetic Energy.\", \"There is a small loss in Kinetic Energy.\", \"There is an increase in Kinetic Energy.\", \"Some Kinetic Energy is transferred to another type.\", 1);\n addQuestion(q14);\n Questions q15 = new Questions(\"The speed of light is?\", \"Different for all observers.\", \"The same for all observers. \", \"The same speed regardless of the medium it is travelling through. \", \"Equal to the speed of sound.\", 2);\n addQuestion(q15);\n Questions q16 = new Questions(\"What is redshift?\", \"Light moving to us, shifting to red. \", \"A dodgy gear change. \", \"Light moving away from us shifting to longer wavelengths.\", \"Another word for dark energy. \", 3);\n addQuestion(q16);\n Questions q17 = new Questions(\"Which law allows us to estimate the age of the universe?\", \"Newtons 3rd Law \", \"The Hubble-Lemaitre Law \", \"Planck's Law \", \"Wien's Law \", 2);\n addQuestion(q17);\n Questions q18 = new Questions(\"The standard model...\", \"Models how time interacts with space. \", \"Describes how entropy works. \", \"Is the 2nd Law of Thermodynamics. \", \"Describes the fundamental particles of the universe and how they interact\", 4);\n addQuestion(q18);\n Questions q19 = new Questions(\"The photoelectric effect gives evidence for?\", \"The wave model of light. \", \"The particle model of light. \", \"The speed of light. \", \"The frequency of light. \", 2);\n addQuestion(q19);\n Questions q20 = new Questions(\"AC is a current which...\", \"Doesn't change direction. \", \"Is often called variable current. \", \"Is sneaky. \", \"Changes direction and instantaneous value with time. \", 4);\n addQuestion(q20);\n\n //Easy Questions\n Questions q21 = new Questions(\"What properties does light display?\", \"Wave\", \"Particle\", \"Both\", \"Neither\", 3);\n addQuestion(q21);\n Questions q22 = new Questions(\"In V = IR, what does V stand for?\", \"Velocity\", \"Voltage\", \"Viscosity\", \"Volume\", 2);\n addQuestion(q22);\n Questions q23 = new Questions(\"The abbreviation rms typically stands for?\", \"Round mean sandwich. \", \"Random manic speed. \", \"Root manic speed. \", \"Root mean squared. \", 4);\n addQuestion(q23);\n Questions q24 = new Questions(\"Path Difference = \", \"= (m/λ) or (m + ½)/λ where m = 0,1,2…\", \"= mλ or (m + ½) λ where m = 0,1,2…\", \"= λ / m or (λ + ½) / m where m = 0,1,2…\", \" = mλ or (m + ½) λ where m = 0.5,1.5,2.5,…\", 2);\n addQuestion(q24);\n Questions q25 = new Questions(\"How many types of quark are there?\", \"6\", \"4 \", \"8\", \"2\", 1);\n addQuestion(q25);\n Questions q26 = new Questions(\"A neutrino is a type of?\", \"Baryon\", \"Gluon\", \"Lepton\", \"Quark\", 3);\n addQuestion(q26);\n Questions q27 = new Questions(\"A moving charge produces:\", \"A weak field\", \"An electric field\", \"A strong field\", \"Another moving charge\", 2);\n addQuestion(q27);\n Questions q28 = new Questions(\"What contains nuclear fusion reactors?\", \"A magnetic field\", \"An electric field\", \"A pool of water\", \"Large amounts of padding\", 1);\n addQuestion(q28);\n Questions q29 = new Questions(\"What is the critical angle of a surface?\", \"The incident angle where the angle of refraction is 45 degrees.\", \"The incident angle where the angle of refraction is 90 degrees.\", \"The incident angle where the angle of refraction is 135 degrees.\", \"The incident angle where the angle of refraction is 180 degrees.\", 2);\n addQuestion(q29);\n Questions q30 = new Questions(\"Which is not a type of Lepton?\", \"Electron\", \"Tau\", \"Gluon\", \"Muon\", 3);\n addQuestion(q30);\n }",
"public QuestionPoolItemData(){\n }",
"interface Questions\n{\n String getQuestion();\n}",
"public ArrayList<String> generateAnswers(){\r\n ArrayList<String> ans;\r\n if(qType==0){\r\n ans = new ArrayList(Arrays.asList(\"A\",\"B\",\"C\",\"D\",\"E\"));\r\n }\r\n else{\r\n ans = new ArrayList(Arrays.asList(\"Choice 1\",\"Choice 2\"));\r\n }\r\n return ans;\r\n }",
"public void setTFChoices() {\r\n Random randomGenerator = new Random();\r\n int trueFalseAnswer = randomGenerator.nextInt(2);\r\n studentAnswer.add(trueFalseAnswer);\r\n }",
"public QuestionaireImpl() {\n\t\t//cannot use working constructor because title could not be set\n\t\t//to an empty string through setTitle\n\t\tfTitle = \"\";\n\t\tsetQuestions(QuestionFactory.createCollection());\n\t\tsetAuthor(PersonFactory.getNullPerson());\n\t}",
"public ActiveSurveyQuestionItem() {\n }",
"public MovieQuestion getQuestion() {\n\t\tMovieQuestion newQ = new MovieQuestion();\n\t\tint row;\n\t\tCursor c;\n\t\tboolean okToAdd = false;\n\n\t\t// Pick random question\n\t\tswitch ((int)(Math.random()*9)) {\n\t\tcase 0: // Who directed the movie %s?\n\t\t\tc = mDb.rawQuery(\"SELECT * FROM movies\", null);\n\t\t\trow = (int)(Math.random()*c.getCount());\n\t\t\tc.moveToPosition(row);\n\t\t\tnewQ.question = String.format(QuestionTemplates.QUESTIONS[0], c.getString(1));\n\t\t\tnewQ.answers[0] = c.getString(3);\n\t\t\t\n\t\t\tLog.i(\"NewQuestion\", \"Correct:\" + c.getString(3));\n\t\t\t\n\t\t\t// Fill answers with unique wrong values\n\t\t\tfor(int i = 1; i < 4;) {\n\t\t\t\trow = (int)(Math.random()*c.getCount());\n\t\t\t\tc.moveToPosition(row);\n\t\t\t\tLog.i(\"NewQuestion\", \"Wrong:\" + c.getString(3));\n\t\t\t\t// i < 4, so we do not increment indefinitely.\n\t\t\t\tfor(int j = 0; j < i && i < 4; j++) {\n\t\t\t\t\tif(newQ.answers[j].equals(c.getString(3))) {\n\t\t\t\t\t\tokToAdd = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tokToAdd = true;\n\t\t\t\t}\n\t\t\t\tif(okToAdd)\n\t\t\t\t\tnewQ.answers[i++] = c.getString(3);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 1: // When was the movie %s released?\n\t\t\tc = mDb.rawQuery(\"SELECT * FROM movies\", null);\n\t\t\trow = (int)(Math.random()*c.getCount());\n\t\t\tc.moveToPosition(row);\n\t\t\tnewQ.question = String.format(QuestionTemplates.QUESTIONS[1], c.getString(1));\n\t\t\tnewQ.answers[0] = c.getString(2);\n\n\t\t\t// Fill answers with unique wrong values\n\t\t\tfor(int i = 1; i < 4;) {\n\t\t\t\tint wrongYear = Integer.parseInt(newQ.answers[0]) + (int)((Math.random()-.5)*50); // +/- [1-25] years\n\t\t\t\tif (wrongYear <= 2014 && wrongYear != Integer.parseInt(newQ.answers[0]))\n\t\t\t\t\tnewQ.answers[i++] = \"\" + wrongYear;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 2: // Which star was in the movie %s?\n\t\t\tc = mDb.rawQuery(\"SELECT DISTINCT m.`title`, m.`director`, s.`first_name`, s.`last_name` FROM `movies` m, `stars` s, `stars_in_movies` sm WHERE m.id = sm.movie_id AND s.id = sm.star_id AND s.id GROUP BY m.`id`, s.`first_name`, s.`last_name` ORDER BY RANDOM() LIMIT 4\", null);\n\t\t\trow = (int)(Math.random()*c.getCount());\n\t\t\tc.moveToFirst(); // only 4 results are returned.\n\t\t\tnewQ.question = String.format(QuestionTemplates.QUESTIONS[2], c.getString(0));\n\t\t\tnewQ.answers[0] = c.getString(2) +\" \"+ c.getString(3); \n\t\t\tnewQ.correctAnswerIndex = 0;\n\t\t\tfor (int j = 1; j < 4; j++) {\n\t\t\t\tc.moveToNext();\n\t\t\t\tnewQ.answers[j] = c.getString(2) +\" \"+ c.getString(3);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 3: // Which star was not in the movie %s?\n\t\t\t// The lone star, the left out one...the answer\n\t\t\tString singleActorQuery = \"SELECT mov.`title`, star.`first_name`, star.`last_name`, star.`id` FROM `movies` mov, `stars` star, \"+\n\t\t\t\t\t\"(SELECT movie_id, star_id FROM `stars_in_movies` GROUP BY movie_id HAVING COUNT(star_id) <= 1 ORDER BY RANDOM() LIMIT 1) mult \"+ \n\t\t\t\t\t\"WHERE mov.`id` = mult.`movie_id` AND star.`id`= mult.`star_id`\";\n\t\t\tc = mDb.rawQuery(singleActorQuery, null);\n\t\t\tc.moveToFirst();\n\t\t\tnewQ.correctAnswerIndex = 0;\n\t\t\tnewQ.answers[0] = c.getString(1) +\" \"+c.getString(2);\n\n\t\t\t// The cool kids: A group of actors in the same movie....excluding the lone star.\n//\t\t\tString starId = c.getString(3);\n\t\t\tString multipleActorQuery = \"SELECT mov.`title`, star.`first_name`, star.`last_name` \" +\n\t\t\t\t\t\"FROM `movies` mov, `stars` star, `stars_in_movies` sim, \" +\n\t\t\t\t\t\"(SELECT movie_id, star_id FROM `stars_in_movies` GROUP BY movie_id HAVING COUNT(star_id) > 2 ORDER BY RANDOM() LIMIT 1) mult\" +\n\t\t\t\t\t\" WHERE mov.`id` = mult.`movie_id` AND star.`id` = sim.`star_id` AND mult.`movie_id` = sim.`movie_id` \" +\n\t\t\t\t\t\"LIMIT 3\";\n\t\t\tc = mDb.rawQuery(multipleActorQuery, null);\n\t\t\tc.moveToFirst();\n\t\t\tnewQ.question = String.format(QuestionTemplates.QUESTIONS[3], c.getString(0));\n\t\t\tfor (int i = 1; i < 4; i++) {\n\t\t\t\tnewQ.answers[i] = c.getString(1) +\" \"+c.getString(2);\n\t\t\t\tc.moveToNext();\n\t\t\t}\n\n\t\t\tbreak;\n\t\tcase 4: // In which movie do the stars %s and %s appear together?\n\t\t\t// Get a movie they both star in\n\t\t\tc = mDb.rawQuery(\"SELECT m.`title`, s.`first_name`, s.`last_name`, s2.`first_name`, s2.`last_name`\" +\n\t\t\t\t\t\"FROM `movies` m, `stars` s, `stars` s2, `stars_in_movies` sm, `stars_in_movies` sm2 \" +\n\t\t\t\t\t\"WHERE m.id = sm.movie_id AND m.id = sm2.movie_id AND s.id = sm.star_id AND s2.id = sm2.star_id AND s.id != s2.id \" +\n\t\t\t\t\t\"GROUP BY m.`id`, s.`first_name`, s.`last_name` ORDER BY RANDOM() LIMIT 4\", null);\n\t\t\trow = (int)(Math.random()*c.getCount());\n\t\t\tc.moveToFirst();\n\t\t\tnewQ.question = String.format(QuestionTemplates.QUESTIONS[4], c.getString(1)+\" \"+c.getString(2), c.getString(3)+\" \"+c.getString(4));\n\t\t\tnewQ.answers[0] = c.getString(0); \n\t\t\tnewQ.correctAnswerIndex = 0;\n\t\t\tfor (int j = 1; j < 4; j++) {\n\t\t\t\tc.moveToNext();\n\t\t\t\tnewQ.answers[j] = c.getString(0);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 5: // Who directed the star %s?\n\t\t\tc = mDb.rawQuery(\"SELECT DISTINCT m.`year`, m.`director`, s.`first_name`, s.`last_name` FROM `movies` m, `stars` s, `stars_in_movies` sm WHERE m.id = sm.movie_id AND s.id = sm.star_id AND s.id GROUP BY m.`id`, s.`first_name`, s.`last_name` ORDER BY RANDOM() LIMIT 4\", null);\n\t\t\trow = (int)(Math.random()*c.getCount());\n\t\t\tc.moveToFirst(); // only 4 results are returned.\n\t\t\tnewQ.question = String.format(QuestionTemplates.QUESTIONS[5], c.getString(2) +\" \"+ c.getString(3));\n\t\t\tnewQ.answers[0] = c.getString(1); \n\t\t\tnewQ.correctAnswerIndex = 0;\n\t\t\tfor (int j = 1; j < 4; j++) {\n\t\t\t\tc.moveToNext();\n\t\t\t\tnewQ.answers[j] = c.getString(1);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 6: // Which star appears in both movies %s and %s?\n\t\t\t// Get the 2 movies with the same actor...\n\t\t\tc = mDb.rawQuery(\"SELECT mov.`id`, mov.`title`, star.`first_name`, star.`last_name`, star.`id` FROM `movies` mov, `stars_in_movies` sim, `stars` star, (SELECT movie_id, star_id, COUNT(movie_id) as cnt FROM `stars_in_movies` GROUP BY star_id HAVING COUNT(movie_id) > 3 ORDER BY RANDOM() LIMIT 1) as popular WHERE sim.`movie_id` = mov.`id` AND popular.`star_id` = sim.`star_id` AND star.`id` = sim.`star_id` LIMIT 2\", null);\n\t\t\tc.moveToFirst();\n\t\t\tString id = c.getString(4);\n\t\t\t\n\t\t\tString[] movies = new String[2];\n\t\t\tmovies[0] = c.getString(1);\n\t\t\tc.moveToNext();\n\t\t\tmovies[1] = c.getString(1);\n\t\t\t\n\t\t\tnewQ.question = String.format(QuestionTemplates.QUESTIONS[6], movies[0], movies[1]);\n\t\t\tnewQ.answers[0] = c.getString(2) +\" \"+ c.getString(3);\n\t\t\t\n\t\t\tnewQ.correctAnswerIndex = 0;\n\t\t\t\n\t\t\t// Pick 3 alternatives...\n\t\t\tc = mDb.rawQuery(\"SELECT s.first_name, s.last_name FROM stars s WHERE s.id != \"+id+\" GROUP BY s.id ORDER BY RANDOM() LIMIT 3\", null);\n\t\t\tc.moveToFirst();\n\t\t\tfor (int i = 1; i < 4; i++) {\n\t\t\t\tnewQ.answers[i] = c.getString(0) +\" \"+ c.getString(1);\n\t\t\t\tc.moveToNext();\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 7: // Which star did not appear in the same movie with the star %s?\n\t\t\t// The lone star, the left out one...the answer\n\t\t\tString singleActorQueryII = \"SELECT mov.`title`, star.`first_name`, star.`last_name`, star.`id` FROM `movies` mov, `stars` star, \"+\n\t\t\t\t\t\"(SELECT movie_id, star_id FROM `stars_in_movies` GROUP BY movie_id HAVING COUNT(star_id) <= 1 ORDER BY RANDOM() LIMIT 1) mult \"+ \n\t\t\t\t\t\"WHERE mov.`id` = mult.`movie_id` AND star.`id`= mult.`star_id`\";\n\t\t\tc = mDb.rawQuery(singleActorQueryII, null);\n\t\t\tc.moveToFirst();\n\t\t\tnewQ.correctAnswerIndex = 0;\n\t\t\tnewQ.answers[0] = c.getString(1) +\" \"+c.getString(2);\n\n\t\t\t// The cool kids: A group of actors in the same movie....excluding the lone star.\n\t\t\tString multipleActorQueryII = \"SELECT mov.`title`, star.`first_name`, star.`last_name` \" +\n\t\t\t\t\t\"FROM `movies` mov, `stars` star, `stars_in_movies` sim, \" +\n\t\t\t\t\t\"(SELECT movie_id, star_id FROM `stars_in_movies` GROUP BY movie_id HAVING COUNT(star_id) > 3 ORDER BY RANDOM() LIMIT 1) mult\" +\n\t\t\t\t\t\" WHERE mov.`id` = mult.`movie_id` AND star.`id` = sim.`star_id` AND mult.`movie_id` = sim.`movie_id` \" +\n\t\t\t\t\t\" GROUP BY star.`id`\"+\n\t\t\t\t\t\" LIMIT 4\";\n\t\t\tc = mDb.rawQuery(multipleActorQueryII, null);\n\t\t\tc.moveToFirst();\n\t\t\t// Take the first of the group and put his name in the question\n\t\t\tnewQ.question = String.format(QuestionTemplates.QUESTIONS[7], c.getString(1) +\" \"+c.getString(2));\n\t\t\tc.moveToNext();\n\t\t\tfor (int i = 1; i < 4; i++) {\n\t\t\t\tnewQ.answers[i] = c.getString(1) +\" \"+c.getString(2);\n\t\t\t\tc.moveToNext();\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault: // Who directed the star %s in year %s?\n\t\t\tc = mDb.rawQuery(\"SELECT DISTINCT m.`year`, m.`director`, s.`first_name`, s.`last_name` FROM `movies` m, `stars` s, `stars_in_movies` sm WHERE m.id = sm.movie_id AND s.id = sm.star_id AND s.id GROUP BY m.`id`, s.`first_name`, s.`last_name` ORDER BY RANDOM() LIMIT 4\", null);\n\t\t\trow = (int)(Math.random()*c.getCount());\n\t\t\tc.moveToFirst(); // only 4 results are returned.\n\t\t\tnewQ.question = String.format(QuestionTemplates.QUESTIONS[8], c.getString(2) +\" \"+ c.getString(3), c.getString(0));\n\t\t\tnewQ.answers[0] = c.getString(1); \n\t\t\tnewQ.correctAnswerIndex = 0;\n\t\t\tfor (int j = 1; j < 4; j++) {\n\t\t\t\tc.moveToNext();\n\t\t\t\tnewQ.answers[j] = c.getString(1);\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\treturn newQ;\n\t}",
"public void addQuestion(Question question) {\n \t\tquestion.setId(questionIdCounter);\n \t\tquestions.add(question);\n \t\tquestionIdCounter++;\n \t}",
"List<Question> getQuestions(String surveyId);",
"public List<Questions> getAllQuestionsHard() {\n List<Questions> questionList = new ArrayList<>();\n db = getReadableDatabase();\n Cursor c = db.rawQuery(\"SELECT * FROM \" + QuestionsTable.Table_name + \" WHERE _id BETWEEN 1 AND 10\", null);\n\n if (c.moveToFirst()){\n do {\n Questions question = new Questions();\n question.setQuestion(c.getString(c.getColumnIndex(QuestionsTable.Column_Question)));\n question.setOption1(c.getString(c.getColumnIndex(QuestionsTable.Column_Option1)));\n question.setOption2(c.getString(c.getColumnIndex(QuestionsTable.Column_Option2)));\n question.setOption3(c.getString(c.getColumnIndex(QuestionsTable.Column_Option3)));\n question.setOption4(c.getString(c.getColumnIndex(QuestionsTable.Column_Option4)));\n question.setAnswerNr(c.getInt(c.getColumnIndex(QuestionsTable.Column_Answer_Nr)));\n questionList.add(question);\n } while (c.moveToNext());\n }\n c.close();\n return questionList;\n }",
"@Override\n public List<Answer> getAnswers() {\n\n return AnswerFactory.create(\n 1, 0, -1\n );\n }",
"public void setQuestionList(ArrayList<String> questionList){\n this.questionList = questionList;\n }"
] | [
"0.66368866",
"0.6306725",
"0.6259415",
"0.61785454",
"0.61146504",
"0.6100112",
"0.6087184",
"0.60349345",
"0.60193706",
"0.59852374",
"0.5981842",
"0.5976385",
"0.592633",
"0.5882031",
"0.58745897",
"0.5862228",
"0.5794296",
"0.5785651",
"0.57845455",
"0.5771796",
"0.57235736",
"0.56846714",
"0.5657907",
"0.5614999",
"0.56134987",
"0.56052953",
"0.5601343",
"0.5598954",
"0.5595027",
"0.55723125",
"0.55667686",
"0.5550972",
"0.55399513",
"0.55184263",
"0.54910904",
"0.5486949",
"0.54828787",
"0.54771984",
"0.54678667",
"0.54678667",
"0.54678667",
"0.54678667",
"0.5458229",
"0.54581296",
"0.5450755",
"0.5443869",
"0.5443214",
"0.5427014",
"0.5426593",
"0.5421276",
"0.5419409",
"0.5409907",
"0.53858185",
"0.5375316",
"0.537155",
"0.5363104",
"0.5357971",
"0.5354894",
"0.53527737",
"0.5337122",
"0.5308552",
"0.52897555",
"0.528605",
"0.52831453",
"0.5279079",
"0.52762",
"0.5275117",
"0.52694213",
"0.5252245",
"0.5248238",
"0.52476186",
"0.5239806",
"0.5234754",
"0.5233457",
"0.5217797",
"0.5213327",
"0.5212907",
"0.51864165",
"0.5186026",
"0.5183049",
"0.5183049",
"0.5183049",
"0.5183049",
"0.5181608",
"0.51761705",
"0.5174143",
"0.51695114",
"0.5155398",
"0.51518565",
"0.5151797",
"0.51515573",
"0.51431507",
"0.5137531",
"0.5133552",
"0.5128873",
"0.51283956",
"0.5122414",
"0.51160705",
"0.51155365",
"0.51144546",
"0.51036876"
] | 0.0 | -1 |
initializing the list of files to be parsed | public ServerParser()
{
m_fileNames = new ArrayList<String>();
m_fileNames.add("xml/time_context_element.xml");
m_fileNames.add("xml/location_context_element.xml");
m_fileNames.add("xml/velocity_context_element.xml");
m_fileNames.add("xml/temperature_context_element.xml");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void init() {\n\n File folder = new File(MAP_PATH);\n File[] listOfFiles = folder.listFiles();\n\n for (int i = 0; i < Objects.requireNonNull(listOfFiles).length; i++) {\n this.mapFiles.add(new File(MAP_PATH + listOfFiles[i].getName()));\n }\n }",
"private void initList() {\r\n\t\tlist = new JList<>();\r\n\t\tFile rootFile = new File(System.getProperty(\"user.dir\"));\r\n\t\tloadFilesInFolder(rootFile);\r\n\t\tlist.addListSelectionListener(new FileListSelectionListener());\r\n\t}",
"public void start()\n {\n FileVector = FileHandler.getFileList( harvesterDirName , filterArray, false );\n iter = FileVector.iterator();\n }",
"private void parseFiles() throws ParserException{\n NodeList fileNodesList = root.getElementsByTagName(\"file\");\n for(int i=0; i<fileNodesList.getLength(); i++){\n filesToProcess.add(getFile((Element) fileNodesList.item(i)));\n }\n }",
"private DirectoryParser() {\n this.parsedFiles = new TreeMap<>();\n }",
"private void initializeFileArrays(){\n File downloadedFilesFolder = new File(MainActivity.DB_PATH);\n File[] files = downloadedFilesFolder.listFiles();\n System.out.println(\"*** \" + files.length + \" ***\");\n if(files != null){\n System.out.println(\"*** \" + files.length + \" ***\");\n for(File f : files){\n if(f != null){\n System.out.println(\"***\\n FILE FOUND - \" + f.getAbsolutePath()+\"\\nSIZE - \" +\n f.length() + \" BYTES \\n***\");\n fileNames.add(f.getName());\n fileSizes.add(f.length()+\"\");\n this.files.add(f);\n }\n }\n }\n }",
"public void initializeTree(List<FilePlanEntry> entries) {\n\t\t\n\t\tList<FilePlan> fileList = creatingFilesPlan(entries);\n\t\tSystem.out.println(fileList);\n\t\t\n\t}",
"public ImageFiles() {\n\t\tthis.listOne = new ArrayList<String>();\n\t\tthis.listTwo = new ArrayList<String>();\n\t\tthis.listThree = new ArrayList<String>();\n\t\tthis.seenImages = new ArrayList<String>();\n\t\tthis.unseenImages = new ArrayList<String>();\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}",
"private void get_file_List() {\n\tString file_name=null;\r\n\tfor (int i = 0; i < listOfFiles.length; i++) \r\n\t {\r\n\t \r\n\t if (listOfFiles[i].isFile()) \r\n\t {\r\n\t\t file_name = listOfFiles[i].getName();\r\n\t if (file_name.endsWith(\".xml\") || file_name.endsWith(\".XML\"))\r\n\t {\r\n\t file_list.add(file_name) ;\r\n\t }\r\n\t }\r\n\t }\r\n\t\r\n}",
"private void init() {\n\t\tMvcs.scanPackagePath = analyseScanPath();\n\t\tif(StringHandler.isEmpty(Mvcs.scanPackagePath))\n\t\t\tthrow new RuntimeException(\"No scan path has been set! you need to setup ScanPackage annotation\");\n\t\t\n\t\t//put all class into the list\n\t\tList<String> allClassNames = scanAllClassNames();\n\t\tif(StringHandler.isEmpty(allClassNames)) //some loader may have no return value \n\t\t\treturn ;\n\t\t\n\t\tfor(String pkgPath : allClassNames){\n\t\t\tlist.add(ClassUtil.getClass(pkgPath));\n\t\t}\n\t}",
"private static void initFileNames() {\n if (fileNames == null) {\n fileNames = new HashMap<>();\n }\n fileNames.put(\"Linked List (simple)\", \"MySimpleLinkedList\");\n fileNames.put(\"Linked List\", \"MyLinkedList\");\n fileNames.put(\"Stack\", \"MyStack\");\n fileNames.put(\"Queue\", \"MyArrayDeque\");\n fileNames.put(\"Graph\", \"MyGraph\");\n fileNames.put(\"HashTable\", \"MyHashTable\");\n fileNames.put(\"Linear Search\", \"Algorithms\");\n fileNames.put(\"Binary Search\", \"Algorithms\");\n fileNames.put(\"Bubble Sort\", \"Algorithms\");\n fileNames.put(\"Insertion Sort\", \"Algorithms\");\n fileNames.put(\"Selection Sort\", \"Algorithms\");\n fileNames.put(\"Shell Sort\", \"Algorithms\");\n fileNames.put(\"Merge Sort\", \"Algorithms\");\n fileNames.put(\"Merge Sort (in-place)\", \"Algorithms\");\n fileNames.put(\"Quick Sort\", \"Algorithms\");\n }",
"public Files(){\n this.fileNameArray.add(\"bridge_1.txt\");\n this.fileNameArray.add(\"bridge_2.txt\");\n this.fileNameArray.add(\"bridge_3.txt\");\n this.fileNameArray.add(\"bridge_4.txt\");\n this.fileNameArray.add(\"bridge_5.txt\");\n this.fileNameArray.add(\"bridge_6.txt\");\n this.fileNameArray.add(\"bridge_7.txt\");\n this.fileNameArray.add(\"bridge_8.txt\");\n this.fileNameArray.add(\"bridge_9.txt\");\n this.fileNameArray.add(\"ladder_1.txt\");\n this.fileNameArray.add(\"ladder_2.txt\");\n this.fileNameArray.add(\"ladder_3.txt\");\n this.fileNameArray.add(\"ladder_4.txt\");\n this.fileNameArray.add(\"ladder_5.txt\");\n this.fileNameArray.add(\"ladder_6.txt\");\n this.fileNameArray.add(\"ladder_7.txt\");\n this.fileNameArray.add(\"ladder_8.txt\");\n this.fileNameArray.add(\"ladder_9.txt\");\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 }",
"private static int Initialize (String[] list)\n {\n\t\tString filename, stateInput;\n \t\tint i = 0, numItems = 0;\n \t \ttry {\n System.out.print(\"Input File : \");\n Scanner stdin = new Scanner(System.in);\n filename = stdin.nextLine();\n stdin = new Scanner(new File(filename));\n\n while ((stdin.hasNext()) && (i < list.length))\n {\n stateInput = stdin.nextLine();\n System.out.println(\"S = \" + stateInput);\n list[i] = stateInput;\n i++;\n }\n numItems = i;\n }\n catch (IOException e) {\n System.out.println(e.getMessage());\n }\n return numItems;\n }",
"public void init() {\n\t\t\tfor(int i=0; i<DBDef.getINSTANCE().getListeRelDef().size(); i++) {\n\t\t\t\tDBDef.getINSTANCE().getListeRelDef().get(i);\n\t\t\t\tHeapFile hp = new HeapFile(DBDef.getINSTANCE().getListeRelDef().get(i));\n\t\t\t\tthis.heapFiles.add(hp);\n\t\t\t}\n\t\t}",
"@Override\n\tpublic synchronized void initialize() {\n\t\tFile[] files = mRootDirectory.listFiles();\n\t\tif (files == null) {\n\t\t\treturn;\n\t\t}\n\t\tfor (File file : files) {\n\t\t\tFileInputStream fis = null;\n\t\t\ttry {\n\t\t\t\tfis = new FileInputStream(file);\n\t\t\t\tCacheHeader entry = CacheHeader.readHeader(fis);\n\t\t\t\tentry.size = file.length();\n\t\t\t\tputEntry(entry.key, entry);\n\t\t\t} catch (IOException e) {\n\t\t\t\tif (file != null) {\n\t\t\t\t\tfile.delete();\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (fis != null) {\n\t\t\t\t\t\tfis.close();\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException ignored) {\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"protected void createFileList()\n {\n // get a sorted array of files\n File f = new File(appManagementDir);\n String[] files = f.list(new FileFilter(AppSettings.getFilter()));\n \n // get the adapter for this file list\n ArrayAdapter<String> a = (ArrayAdapter<String>)fileList.getAdapter();\n a.clear();\n \n // clear the check boxes\n fileList.clearChoices();\n \n if (files != null && files.length > 0)\n {\n Arrays.sort(files, 0, files.length, new Comparator<Object>() {\n \n @Override\n public int compare(Object object1, Object object2)\n {\n int comp = 0;\n if (object1 instanceof String \n && object2 instanceof String)\n {\n String str1 = (String)object1;\n String str2 = (String)object2;\n \n comp = str1.compareToIgnoreCase(str2);\n }\n \n return comp;\n }});\n \n \n // add all the files\n for (String fileName : files)\n {\n a.add(fileName);\n }\n \n fileList.invalidate();\n }\n }",
"private void populateList(File[] filesList) {\n Log.i(\"mPackage\",\"FilesList: \"+filesList.length);\n for(File file : filesList) {\n //Log.i(\"mPackage\",\"Path: \"+file);\n if(file.isDirectory()) {\n populateList(file.listFiles());\n }\n else {\n MarkerModel markerModel = new MarkerModel();\n Boolean containsObj = false;\n for(File modelFile : filesList) {\n String[] extension = modelFile.getName().split(\"\\\\.\");\n if(extension[extension.length-1].equals(\"obj\")) {\n markerModel.setObj(modelFile.getPath());\n containsObj = true;\n }\n else if(extension[extension.length-1].equals(\"mtl\"))\n markerModel.setMtl(modelFile.getPath());\n else\n markerModel.addTexture(modelFile.getPath());\n }\n if(containsObj)\n models.add(markerModel);\n return;\n //models.add(file.getPath());\n //Log.i(\"mPackage\",\"Path: \"+file.getPath());\n }\n }\n }",
"private void initialize() {\n this.docTypeList = new ArrayList<>();\n this.problemTypeList = new ArrayList<>();\n\n // The add() function should be called in the order specified since together\n // they form a mapping mechanism,\n // for example 'ENCAPSULATED' before 'POSTSCRIPT' and 'RICH' before 'TEXT'.\n\n this.docTypeList.add(\"ENCAPSULATED\");\n this.problemTypeList.add(ProblemType.NON_ENCAPSULATED_POSTSCRIPT_FILE);\n\n this.docTypeList.add(\"EXCEL\");\n this.problemTypeList.add(ProblemType.NON_MSEXCEL_FILE);\n\n this.docTypeList.add(\"GIF\");\n this.problemTypeList.add(ProblemType.NON_GIF_FILE);\n\n this.docTypeList.add(\"HTML\");\n this.problemTypeList.add(ProblemType.NON_HTML_FILE);\n\n this.docTypeList.add(\"LATEX\");\n this.problemTypeList.add(ProblemType.NON_LATEX_FILE);\n\n this.docTypeList.add(\"MPEG\");\n this.problemTypeList.add(ProblemType.NON_MP4_FILE);\n\n this.docTypeList.add(\"POSTSCRIPT\");\n this.problemTypeList.add(ProblemType.NON_POSTSCRIPT_FILE);\n\n this.docTypeList.add(\"TIFF\");\n this.problemTypeList.add(ProblemType.NON_TIFF_FILE);\n\n this.docTypeList.add(\"WORD\");\n this.problemTypeList.add(ProblemType.NON_MSWORD_FILE);\n\n this.classInitialized = true;\n\n LOG.debug(\"initialize:this.docTypeList.size {}\", this.docTypeList.size());\n LOG.debug(\"initialize:this.problemTypeList.size {}\", this.problemTypeList.size());\n }",
"public StupidContainer generateFileList() throws Exception {\n\t\tint tries = 0;\n\t\tStupidContainer parsingResults;\n\n\t\tdo {\n\t\t\ttries++;\n\t\t\tparsingResults = populateFileList();\n\n\t\t\tif (parsingResults.sourceFiles == null)\n\t\t\t\tcontinue;\n\n\t\t\tif (checkValidCodebase(parsingResults.sourceFiles.size()))\n\t\t\t\tbreak;\n\n\t\t} while (tries < ATTEMPTS);\n\n\t\tif (tries > ATTEMPTS)\n\t\t\treturn null;\n\n\t\treturn parsingResults;\n\t}",
"public void init()\r\n {\n readFile(inputFile);\r\n writeInfoFile();\r\n }",
"private void prepareAssignmentFiles() {\n for (Assignment assignment : assignments) {\n //---------- initialize the assignmentFiles array list ----------\n assignment.assignmentFiles = new ArrayList<>();\n\n //create a temporary assignment files array list\n ArrayList<File> assignmentFiles = new ArrayList<>();\n\n //---------- call the recursive findAssignmentFiles method ----------\n findAssignmentFiles(assignmentFiles, assignment.assignmentDirectory);\n\n //---------- set the language for the assignment ----------\n if (language.equals( IAGConstant.LANGUAGE_AUTO) ) {\n assignment.language = autoDetectLanguage(assignmentFiles);\n }\n else {\n assignment.language = language;\n }\n\n String[] extensions;\n\n switch (assignment.language) {\n case IAGConstant.LANGUAGE_PYTHON3:\n extensions = IAGConstant.PYTHON_EXTENSIONS;\n break;\n case IAGConstant.LANGUAGE_CPP:\n extensions = IAGConstant.CPP_EXTENSIONS;\n break;\n default: //unable to determine the language\n extensions = new String[] {};\n }\n\n //add only files of the right type to the assignment file list\n for (File f: assignmentFiles) {\n String f_extension = getFileExtension(f).toLowerCase();\n if (Arrays.asList(extensions).contains(f_extension)){\n //---------- if the extension on the file matches\n // one of the extension in the extensions list, add\n // it to the programming files list. ----------\n assignment.assignmentFiles.add(f);\n }\n }\n assignment.bAutoGraded = false; //indicate the assignment has not yet been auto-graded\n }\n\n }",
"public void moodInitialize() {\n\t\t\n\t\tFile moodDirectory = new File(\"FoodMood/src/TextFiles/\");\n\t\tmoodArray = moodDirectory.list();\n\t\tString [] names = new String[moodArray.length];\n\t\tfor(int i = 0; i < moodArray.length;i++) {\n\t\t\tnames[i] = moodArray[i].replace(\".txt\", \"\");\n\t\t}\n\t\tfor (int i = 0; i < moodArray.length; i++) {\n\t\t\tmoods.add(names[i]);\n\t\t}\n\t}",
"public void init(){\n\t\tm_Folders = new ArrayList<Folder>();\n\t\n\t\tm_Folders.add(new Folder(\"Inbox\"));\n\t\tm_Folders.add(new Folder(\"Today\"));\n\t\tm_Folders.add(new Folder(\"Next\"));\n\t\tm_Folders.add(new Folder(\"Someday/Maybe\"));\t\t\n\t}",
"private void initList() {\n\n }",
"@Override\n protected void initializeReader() {\n this.fileList = new ArrayList<>();\n this.fileListPosition = new AtomicInteger(0);\n this.currentTextAnnotation = new AtomicReference<>();\n }",
"private static ArrayList<File> buildFilesArray() {\n ArrayList<File> result = new ArrayList<>();\n rAddFilesToArray(workingDirectory, result);\n return result;\n }",
"public MultipleMGFHandler(File... allMGFFilesToParse) {\n this(\"BEGIN IONS\", allMGFFilesToParse);\n }",
"@Override\n\tprotected List<String> performScanning(String inputFilePath) {\n\t\tList<String> resultList = App.fileParser(inputFilePath);\n\t\treturn resultList;\n\t}",
"public void createFileObjects() {\n List<String> externalFiles = abbreviationsPreferences.getExternalJournalLists();\n externalFiles.forEach(name -> openFile(Paths.get(name)));\n }",
"public SourceLister() {\n this(defaultSrcDirs);\n }",
"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 DotFileEnumerator(String filePath)\n {\n String[] tempArr = new File(filePath).list();\n\n for (String s : tempArr) {\n fileList.add(filePath + \"/\" + s);\n }\n }",
"public void fillFilenames() {\r\n if (this.pl_LastFiles.getParam(\"nodelist-file\") != null\r\n && this.pl_LastFiles.getParam(\"edgelist-file\") != null) {\r\n this.nodefileText.setText(this.pl_LastFiles.getParam(\"nodelist-file\"));\r\n this.edgeFileText.setText(this.pl_LastFiles.getParam(\"edgelist-file\"));\r\n } else {\r\n this.nodefileText.setText(\"examples\" + System.getProperty(\"file.separator\") + \"20nodes.txt\");\r\n this.edgeFileText.setText(\"examples\" + System.getProperty(\"file.separator\") + \"20edges.txt\");\r\n }\r\n }",
"public void initData(ObservableList<File> fileObservableList){\n ProfileFactory profileFactory = new ProfileFactory();\n profiles = profileFactory.createAllProfiles(fileObservableList);\n buildUniqueView();\n }",
"public void init() {\n\t\tfor(int i = 0; i < 5; i++) {\n\t\t\tpageLists.add(new Page(i));\n\t\t}\n\t}",
"private void setUp(String file) {\n unorderedList = new LinkedList<>();\n orderedList = new SortedLinkedList<>();\n\n try {\n input = new Scanner(new BufferedReader(new FileReader(file)));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }",
"public List<File> getListing(){\n\t return getFileList(new File(defaultPath));\n }",
"public static ArrayList<String> parseFile(String f) throws Exception {\n\t\tArrayList<CommandNode> cmdNode = new ArrayList<CommandNode>();\n\t\tArrayList<MemoryNode> memNode = new ArrayList<MemoryNode>();\n\t\tparseFile(f,cmdNode,memNode);\n\t\treturn preCompile(cmdNode, memNode);\n\t}",
"@Before\n public void setUp() throws Exception {\n fileFinder = new FileFinder();\n testFiles = new ArrayList<>(10);\n }",
"@Override\n public void doInit() {\n if (fileLister == null) {\n throw new BeanInitializationException(\"fileLister cannot be null\");\n }\n\n //2. Initializing\n super.doInit();\n }",
"@PostConstruct\n private void loadFiles() {\n \n\n File dir = new File(Constants.DIR_PATH);\n File[] files = dir.listFiles(); //stores list of files in given paths\n String line=\"\";\n\n for(File file : files){\n try {\n br = new BufferedReader(new FileReader(file));\n br.readLine();\n while((line=br.readLine())!=null){\n\n String []token=line.split(Constants.DELIMETER);\n String fileName=file.getName().toUpperCase();\n\n FlightData newflight = new FlightData(fileName.substring(0,fileName.lastIndexOf(\".\")),token[0],token[1],token[2],token[3],token[4],token[5],Double.parseDouble(token[6]),token[7],token[8]);\n flightDataDao.insertFlightData(newflight);\n }\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n }",
"@PostConstruct\n public void init() {\n for (GithubParser parser : getBeans()) {\n List<String> events = parser.getEvents();\n for (String eventType : events) {\n this.parsers.put(eventType, parser);\n }\n }\n }",
"public Ilasm() {\n Clear();\n setIncludes(file_pattern);\n }",
"public void initialize() {\n this.loadDownloadList();\n }",
"void setInFiles(String inFilesStr) {\n\t\tString[] result = inFilesStr.split(\",\");\n\t\tfor (int x = 0; x < result.length; x++) {\n\t\t\tString fName = result[x].trim();\n\t\t\tthis.inFiles.add(new File(fName));\n\t\t}\n\t}",
"public void loadFileList() {\n\n if (mCredential.getSelectedAccountName() == null) {\n chooseAccount();\n } else {\n new MakeRequestTask(mCredential,MakeRequestTask.TASK_TYPE_FILELIST).execute();\n\n }\n }",
"protected void initialize() throws CacheException\n {\n\n final Collection<File> files = FileUtils.listFilesRecursive(this.getBaseDir());\n\n int numSuccessfullyRead = 0;\n for (final File file : files) {\n final String md5Hex = file.getName();\n if (FileCache.MD5_PATTERN.matcher(md5Hex).matches()) {\n Md5 md5;\n try {\n md5 = Md5.fromMd5Hex(md5Hex);\n } catch (final Md5Exception e) {\n throw new CacheException(\"Couldn't add file \" + file, e);\n }\n long lastModified = file.lastModified();\n final SimpleMetaData entry = new SimpleMetaData(lastModified, this.getDefaultTtl());\n if (!entry.isExpired() && !entry.isStale()) {\n this.putEntry(md5, entry);\n numSuccessfullyRead++;\n }\n }\n }\n\n this.getLogger().info(\"{}: Loaded {} entries\", this.getName(), numSuccessfullyRead);\n }",
"public void setFilesList(File nowFile) {\n enterFilePath(nowFile);\n }",
"@Override\n public HashMap initFileSet()\n {\n return null;\n }",
"private void generateFileList() {\r\n \r\n for (FileSet fileSet : cmtFileSetList) {\r\n DirectoryScanner dirScanner = fileSet.getDirectoryScanner();\r\n dirScanner.scan();\r\n String[] filelist = dirScanner.getIncludedFiles();\r\n String lineSeparator = System.getProperty(\"line.separator\");\r\n String fileSeparator = System.getProperty(\"file.separator\");\r\n \r\n BufferedWriter outputFile = null;\r\n try {\r\n outputFile = new BufferedWriter(new FileWriter(input));\r\n for (String file : filelist) {\r\n outputFile.write(dirScanner.getBasedir().toString() + fileSeparator + file\r\n + lineSeparator);\r\n }\r\n } catch (IOException e) {\r\n throw new BuildException(\"Not able to generate file list for 'cmt'. \", e);\r\n } finally {\r\n try {\r\n if (outputFile != null) {\r\n outputFile.close();\r\n }\r\n } catch (IOException ex) {\r\n // ignore exception\r\n ex = null;\r\n }\r\n }\r\n }\r\n }",
"private void initializeReferences(String inputFilename) {\n\t\tparser = new Parser(inputFilename);\n\t\tlocations = new TreeMap<>();\n\t}",
"private static void initializeLists() {\n\t\t\n\t\t//read from serialized files to assign array lists\n\t\t//customerList = (ArrayList<Customer>) readObject(customerFile);\n\t\t//employeeList = (ArrayList<Employee>) readObject(employeeFile);\n\t\t//applicationList = (ArrayList<Application>) readObject(applicationFile);\n\t\t//accountList = (ArrayList<BankAccount>) readObject(accountFile);\n\t\t\n\t\t//read from database to assign array lists\n\t\temployeeList = (ArrayList<Employee>)employeeDao.readAll();\n\t\tcustomerList = (ArrayList<Customer>)customerDao.readAll();\n\t\taccountList = (ArrayList<BankAccount>) accountDao.readAll();\n\t\tapplicationList = (ArrayList<Application>)applicationDao.readAll();\n\t\t\n\t\tassignBankAccounts();\n\t}",
"public DotFileEnumerator(File file)\n {\n fileList.add(file.toString());\n }",
"public void initComponents() {\n\t\t\n\t\tDocumentBuilder builder;\n\t\tDocumentBuilderFactory factory =DocumentBuilderFactory.newInstance();\n\t\tElement root;\n\t\tNodeList modules;\n\t\tint indexNodes;\n\t\t\n\t\ttry {\n\t\t\t\tbuilder = factory.newDocumentBuilder();\n\t\t\t\tDocument document =builder.parse(\n\t\t\t\tClassLoader.getSystemResourceAsStream(m_fileModuleNameStructure));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\troot = document.getDocumentElement();\n\t\t\t\tmodules = root.getElementsByTagName(\"module\");\n\t\t\t\t\n\t\t\t\tfor(indexNodes = 0; indexNodes < modules.getLength(); indexNodes++)\n\t\t\t\t\tparseDataOneModule(modules.item(indexNodes));\n\t\t\t\t\n\t\t\t\t\n\t\t} \n\t\tcatch (ParserConfigurationException e) \n\t\t{\n\t\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t} catch (SAXException 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\t\n\t}",
"public static void initialize() {\r\n\t\tjson = new JSONFile(filePath);\t\r\n\t}",
"private ArrayList<ArrayList<String>> initArrArrList(ArrayList<String> packetNames) throws FileNotFoundException, IOException {\n ArrayList<ArrayList<String>> arrList=new ArrayList();\n LoadAndSave las=new LoadAndSave();\n for(int x=0;x<packetNames.size();x++) {\n las.load(packetNames.get(x));\n arrList.add(las.loader1);\n arrList.add(las.loader2);\n }\n return arrList;\n \n }",
"public void initializeTaskList(TaskList taskList) throws ChandlerException {\n try {\n File savedTaskList = new File(filePath);\n savedTaskList.getParentFile().mkdirs();\n savedTaskList.createNewFile();\n\n if (savedTaskList.length() != 0) { // file is not empty\n Scanner sc = new Scanner(savedTaskList);\n while (sc.hasNextLine()) {\n Task currTask = loadTaskFromFile(sc.nextLine());\n taskList.add(currTask);\n }\n }\n } catch (IOException | ChandlerException e) { // cannot read file or contents of file do not follow format\n taskList.clear();\n throw new ChandlerException(ui.corruptFileDataError());\n }\n }",
"void initBeforeParsing() {\r\n }",
"private void parse() {\n if (workingDirectory != null) {\n Parser.initConstants(this, workingDirectory, remainderFile);\n Parser.parseIt();\n workingDirectory = null;\n remainderFile = null;\n jbParse.setEnabled(false);\n }\n }",
"private void initList() {\n long now = System.nanoTime();\n loadConfig();\n SlogEx.d(TAG, \"load config use:\" + (System.nanoTime() - now));\n }",
"private StupidContainer populateFileList() throws Exception {\n\n\t\tString root = getCodeRepo();\n\n\t\tif (root == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tArrayList<String> files = new ArrayList<String>();\n\t\tsearchDFS(new File(root).listFiles(), files);\n\n\t\tString dir = System.getProperty(\"user.dir\");\n\n\t\tif (gitDir == null)\n\t\t\treturn new StupidContainer(files, root);\n\n\t\tcommitCounts = new Hashtable<String, Integer>();\n\t\tProcess p = null;\n\n\t\tif (isOSWindows) {\n\t\t\tp = Runtime.getRuntime().exec(\n\t\t\t\t\t\"cmd /C \" + dir + \"\\\\scripts\\\\gitlog.sh \" + gitDir);\n\t\t} else {\n\t\t\tp = Runtime.getRuntime().exec(\"./scripts/gitlog.sh \" + gitDir);\n\t\t}\n\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(\n\t\t\t\tp.getInputStream()));\n\n\t\tString line = null, name;\n\t\tInteger count;\n\t\twhile ((line = in.readLine()) != null) {\n\t\t\tif (line.contains(\".java\")) {\n\t\t\t\tname = extractName(line);\n\t\t\t\tcount = commitCounts.get(name);\n\t\t\t\tif (count == null)\n\t\t\t\t\tcount = new Integer(0);\n\t\t\t\tcommitCounts.put(name, count + 1);\n\t\t\t}\n\t\t}\n\n\t\tin.close();\n\t\treturn new StupidContainer(files, root, folderName, commitCounts);\n\t}",
"protected void listUsedFiles(List<String> list){\r\n // By default do nothing\r\n }",
"private void loadFileList(File dir, final String fileType) {\n\t\tif(dir.exists()) {\n\t\t\tFilenameFilter filter = new FilenameFilter() {\n\t\t\t\tpublic boolean accept(File dir, String filename) {\n\t\t\t\t\tFile sel = new File(dir, filename);\n\t\t\t\t\treturn filename.contains(fileType) || sel.isDirectory();\n\t\t\t\t}\n\t\t\t};\n\t\t\tmFileList = mPath.list(filter);\n\t\t}\n\t\telse {\n\t\t\tmFileList= new String[0];\n\t\t}\n\t}",
"public void initializeAfterLoading() {\n sortMediaFiles();\n }",
"public void getFiles()\n\t{\n\t\tif(fileList.size() == 0)\n\t\t{\n\t\t\tSystem.out.println(\"There is no file or file not found\");\n\t\t}\n\t\tfor(int i = 0; i < fileList.size(); i++)\n\t\t{\n\t\t\tSystem.out.println(\"File is at: \" + fileList.get(i));\n\t\t}\n\t}",
"@SuppressWarnings(\"unchecked\")\n void initExisting() throws IOException {\n LOG.info(\"Initializing Existing Jobs...\");\n List<FileStatus> timestampedDirList = findTimestampedDirectories();\n Collections.sort(timestampedDirList);\n for (FileStatus fs : timestampedDirList) {\n // TODO Could verify the correct format for these directories.\n addDirectoryToSerialNumberIndex(fs.getPath());\n addDirectoryToJobListCache(fs.getPath());\n }\n }",
"public void initialize(InputStream is) {\n // Get data out of the restaurants file and store it in a readable way.\n ArrayList<String> restaurantData = getFileData(is);\n\n // Fill arrayList with restaurant objects by properly initializing restaurants.\n initializeRestaurantList(restaurantData);\n }",
"public ArrayList<Files> parseInput(String input){\r\n\t\tScanner parse = new Scanner(input);\r\n\t\tparse.useDelimiter(\";\");\r\n\t\tArrayList<Files> output = new ArrayList<Files>();\r\n\t\twhile(parse.hasNext())output.add(new Files(parse.next()));\r\n\t\tparse.close();\r\n\t\treturn output;\r\n\t}",
"public void processFiles(){\n\t\tfor(String fileName : files) {\n\t\t\ttry {\n\t\t\t\tloadDataFromFile(fileName);\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"Can't open file: \" + fileName);\n\t\t\t\tSystem.out.println();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tprintInOrder();\n\t\t\tstudents.clear();\n\t\t}\n\t}",
"public static List<String> dummyListFiles(String startDir) {\n String[] array;\n List<String> list = new ArrayList<>();\n\n File f = new File(startDir);\n\n array = f.list();\n\n for (String item : array) {\n list.add(item);\n }\n\n return list;\n }",
"private void setInitialSourceFile()\n\t{\n\t\tint largestAuthoredId = -1;\n\t\tSourceFile[] files = m_fileInfo.getFileList();\n\t\tfor (int i=0; i<files.length; ++i)\n\t\t{\n\t\t\tSourceFile sf = files[i];\n\t\t\tif (sf.getId() > largestAuthoredId && getFileType(sf) == AUTHORED_FILE)\n\t\t\t\tlargestAuthoredId = sf.getId();\n\t\t}\n\t\tif (largestAuthoredId != -1)\n\t\t\tsetListingPosition(largestAuthoredId, 1);\n\t}",
"public void initializeJFileChoosers()\r\n\t{\r\n\t\tqFileChooser = new JFileChooser();\r\n\t\textensionFilter = new FileNameExtensionFilter(\"Img\",\"jpg\",\"gif\",\"png\");\r\n\t\tqFileChooser.setFileFilter(extensionFilter);\r\n\t\tqFileChooser.setAcceptAllFileFilterUsed(false);\r\n\t\taFileChooser = new JFileChooser();\r\n\t\textensionFilter = new FileNameExtensionFilter(\"Img\",\"jpg\",\"gif\",\"png\");\r\n\t\taFileChooser.setFileFilter(extensionFilter);\r\n\t\taFileChooser.setAcceptAllFileFilterUsed(false);\r\n\t}",
"public void initParser(String file) {\n if (checkFileExists(file)) {\n parseXml(file);\n }\n }",
"public void setGroupList() {\n \n String path = \".\"; //curent folder\n String files; //files name\n File folder = new File(path); // get the folfer\n File[] listOfFiles = folder.listFiles(); //list of files\n for (int i = 0; i < listOfFiles.length; i++) {//this loop go trough the folder\n if (listOfFiles[i].isFile()) {\n files = listOfFiles[i].getName();\n if (files.endsWith(\".xls\") || files.endsWith(\".XLS\")) {//filter all the xls file\n if(!files.equalsIgnoreCase(\".xls\")){\n // add a new objet CompoundBook in a our xlsBook\n xlsBook.add(new CompoundBook(files));\n //add only the name of the file without the .xls extension\n groups.add(files.substring(0, files.lastIndexOf(\".\")));\n }\n }\n }\n }\n gList.setListData(groups); // set the group List on the GUI\n }",
"@Before\n\tpublic void initParser() {\n\t\tXMLTagParser.init(file);\n\t}",
"private Parser() {\n objetos = new ListaEnlazada();\n }",
"public MainController(){\n allShelves = new List[2];\n allShelves[0] = new List<File>(); //Beachtet die unterschiedliche Instanziierung! Was bedeutet das?\n allShelves[1] = new List<>();\n createFiles();\n }",
"public SplitFile() {\n\t}",
"public void init() {\n\n mJokes = new ArrayList<>();\n\n StringBuilder sBuilder = new StringBuilder();\n\n try {\n\n InputStream in = getClass().getResourceAsStream(\"/jokes.json\");\n BufferedReader reader = new BufferedReader(new InputStreamReader(in));\n\n String mLine = reader.readLine();\n while (mLine != null) {\n //process line\n sBuilder.append(mLine);\n mLine = reader.readLine();\n }\n\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n String jsonString = sBuilder.toString();\n\n if( jsonString != null ){\n\n JsonParser parser = new JsonParser();\n JsonObject jsonObject = parser.parse(jsonString).getAsJsonObject();\n\n JsonArray jokesArray = jsonObject.getAsJsonArray(\"jokes\");\n\n for (JsonElement element : jokesArray) {\n String joke = element.getAsJsonObject().get(\"joke\").getAsString();\n mJokes.add(joke);\n }\n }\n\n }",
"public ListIDE() {\n initComponents();\n loadAsset();\n directory = new Directory();\n }",
"public void init() {\n\t\tfor (Node node : nodes)\n\t\t\tnode.init();\n\t}",
"public ContactList(String inFileName)\n {\n filename = inFileName;\n }",
"private void initEventList(){\r\n\t\t/*\r\n\t\t * we save a valid event list in internal storage so we can load them in\r\n\t\t * our main activity. So we make sure there is either a valid one alreay in storage\r\n\t\t * or we get a fresh one from our server and save it in storage.\r\n\t\t */\r\n\t\t\r\n\t\t// first try to get an existing eventlist from storage\r\n\t\tJSONObject eventList = FileUtils.readEventListFromStorage(this);\r\n\t\t\r\n\t\tif(eventList != null) {\r\n\t\t\tif(eventListIsValid(eventList)){\r\n\t\t\t\tstartMuseek();\r\n\t\t\t} else {\r\n\t\t\t\tServerConnector.getEventListFromServer(mServerListener, mLocation);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tServerConnector.getEventListFromServer(mServerListener, mLocation);\r\n\t\t}\r\n\t\t\r\n\t}",
"private void getFiles() {\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(inputFileName);\n\t\t\tinputBuffer = new BufferedReader(fr);\n\n\t\t\tFileWriter fw = new FileWriter(outputFileName);\n\t\t\toutputBuffer = new BufferedWriter(fw);\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"File not found: \" + e.getMessage());\n\t\t\tSystem.exit(-2);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"IOException \" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-3);\n\t\t}\n\t}",
"public void ProcessFiles() {\n LOG.info(\"Processing SrcML files ...\");\n final Collection<File> allFiles = ctx.files.AllFiles();\n int processed = 0;\n final int numAllFiles = allFiles.size();\n final int logDiv = Math.max(1, Math.round(numAllFiles / 100f));\n\n for (File file : allFiles) {\n final String filePath = file.filePath;\n final FilePath fp = ctx.internFilePath(filePath);\n\n Document document = readSrcmlFile(filePath);\n DocWithFileAndCppDirectives extDoc = new DocWithFileAndCppDirectives(file, fp, document, ctx);\n\n internAllFunctionsInFile(file, document);\n processFeatureLocationsInFile(extDoc);\n\n if ((++processed) % logDiv == 0) {\n int percent = Math.round((100f * processed) / numAllFiles);\n LOG.info(\"Parsed SrcML file \" + processed + \"/\" + numAllFiles\n + \" (\" + percent + \"%) (\" + (numAllFiles - processed) + \" to go)\");\n }\n }\n\n LOG.info(\"Parsed all \" + processed + \" SrcML file(s).\");\n }",
"void read() {\n try {\n pre_list = new ArrayList<>();\n suf_list = new ArrayList<>();\n p_name = new ArrayList<>();\n stem_word = new ArrayList<>();\n\n //reading place and town name\n for (File places : place_name.listFiles()) {\n fin = new FileInputStream(places);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n place.add(temp);\n }\n\n }\n\n //reading month name\n for (File mont : month_name.listFiles()) {\n fin = new FileInputStream(mont);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n month.add(temp);\n }\n }\n\n //reading compound words first\n for (File comp_word : com_word_first.listFiles()) {\n fin = new FileInputStream(comp_word);\n scan = new Scanner(fin);\n while (scan.hasNextLine()) {\n temp = scan.nextLine();\n temp = Normalization(temp);\n comp_first.add(temp);\n }\n }\n //reading next word of the compound\n for (File comp_word_next : com_word_next.listFiles()) {\n fin = new FileInputStream(comp_word_next);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n comp_next.add(temp);\n }\n }\n //reading chi square feature\n for (File entry : chifile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n chiunion.add(temp);\n }\n newunions.clear();\n newunions.addAll(chiunion);\n chiunion.clear();\n chiunion.addAll(newunions);\n chiunion.removeAll(stop_word_list);\n chiunion.removeAll(p_name);\n chiunion.removeAll(month);\n chiunion.removeAll(place);\n }\n //reading short form from abbrivation \n for (File short_list : abbrivation_short.listFiles()) {\n fin = new FileInputStream(short_list);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n shortform.add(temp);\n }\n }\n //reading long form from the abrivation \n for (File long_list : abbrivation_long.listFiles()) {\n fin = new FileInputStream(long_list);\n scan = new Scanner(fin);\n while (scan.hasNextLine()) {\n temp = scan.nextLine();\n temp = Normalization(temp);\n longform.add(temp);\n }\n }\n //reading file from stop word\n for (File stoplist : stop_word.listFiles()) {\n fin = new FileInputStream(stoplist);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n stop_word_list.add(temp);\n }\n }\n\n //reading person name list\n for (File per_name : person_name.listFiles()) {\n fin = new FileInputStream(per_name);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n p_name.add(temp);\n }\n }\n\n //reading intersection union\n for (File entry : interfile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n interunion.add(temp);\n }\n }\n newunions.clear();\n newunions.addAll(interunion);\n interunion.clear();\n interunion.addAll(newunions);\n interunion.removeAll(stop_word_list);\n interunion.removeAll(p_name);\n interunion.removeAll(month);\n interunion.removeAll(place);\n }\n // reading ig union\n for (File entry : igfile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n igunion.add(temp);\n }\n }\n for (String str : igunion) {\n int index = igunion.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n igunion.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(igunion);\n igunion.clear();\n igunion.addAll(newunions);\n igunion.removeAll(stop_word_list);\n igunion.removeAll(p_name);\n igunion.removeAll(month);\n igunion.removeAll(place);\n }\n //read df uinfion\n for (File entry : dffile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n dfunion.add(temp);\n }\n }\n for (String str : dfunion) {\n int index = dfunion.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n dfunion.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(dfunion);\n dfunion.clear();\n dfunion.addAll(newunions);\n dfunion.removeAll(stop_word_list);\n dfunion.removeAll(p_name);\n dfunion.removeAll(month);\n dfunion.removeAll(place);\n }\n //reading unified model\n for (File entry : unionall_3.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n union_3.add(temp);\n }\n }\n for (String str : union_3) {\n int index = union_3.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n union_3.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(union_3);\n union_3.clear();\n union_3.addAll(newunions);\n union_3.removeAll(stop_word_list);\n union_3.removeAll(p_name);\n union_3.removeAll(month);\n union_3.removeAll(place);\n }\n //unified feature for the new model\n for (File entry : unified.listFiles()) {\n\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n newunion.add(temp);\n\n }\n for (String str : newunion) {\n int index = newunion.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n newunion.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(newunion);\n newunion.clear();\n newunion.addAll(newunions);\n newunion.removeAll(stop_word_list);\n newunion.removeAll(p_name);\n newunion.removeAll(month);\n newunion.removeAll(place);\n\n // newunion.addAll(newunions);\n }\n // reading test file and predict the class\n for (File entry : test_doc.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n file_test.add(temp);\n\n }\n newunions.clear();\n newunions.addAll(file_test);\n file_test.clear();\n file_test.addAll(newunions);\n file_test.removeAll(stop_word_list);\n file_test.removeAll(p_name);\n file_test.removeAll(month);\n file_test.removeAll(place);\n }\n //reading the whole document under economy class\n for (File entry : economy.listFiles()) {\n fill = new File(economy + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n economydocument[count1] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n economydocument[count1].add(temp);\n if (temp.length() < 2) {\n economydocument[count1].remove(temp);\n }\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n economydocument[count1].remove(temp);\n }\n }\n for (String str : economydocument[count1]) {\n int index = economydocument[count1].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n economydocument[count1].set(index, stem_word.get(i));\n }\n }\n }\n }\n economydocument[count1].removeAll(stop_word_list);\n economydocument[count1].removeAll(p_name);\n economydocument[count1].removeAll(month);\n economydocument[count1].removeAll(place);\n allecofeature.addAll(economydocument[count1]);\n ecofeature.addAll(economydocument[count1]);\n allfeature.addAll(ecofeature);\n all.addAll(allecofeature);\n count1++;\n\n }\n //reading the whole documents under education category \n for (File entry : education.listFiles()) {\n fill = new File(education + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n educationdocument[count2] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n educationdocument[count2].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n educationdocument[count2].remove(temp);\n }\n }\n }\n\n for (String str : educationdocument[count2]) {\n int index = educationdocument[count2].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n educationdocument[count2].set(index, stem_word.get(i));\n }\n }\n }\n educationdocument[count2].removeAll(stop_word_list);\n educationdocument[count2].removeAll(p_name);\n educationdocument[count2].removeAll(month);\n educationdocument[count2].removeAll(place);\n alledufeature.addAll(educationdocument[count2]);\n edufeature.addAll(educationdocument[count2]);\n allfeature.addAll(edufeature);\n all.addAll(alledufeature);\n count2++;\n }\n// //reading all the documents under sport category\n for (File entry : sport.listFiles()) {\n fill = new File(sport + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n sportdocument[count3] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n sportdocument[count3].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n sportdocument[count3].remove(temp);\n }\n }\n }\n\n for (String str : sportdocument[count3]) {\n int index = sportdocument[count3].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n sportdocument[count3].set(index, stem_word.get(i));\n }\n }\n }\n sportdocument[count3].removeAll(stop_word_list);\n sportdocument[count3].removeAll(p_name);\n sportdocument[count3].removeAll(month);\n sportdocument[count3].removeAll(place);\n allspofeature.addAll(sportdocument[count3]);\n spofeature.addAll(sportdocument[count3]);\n allfeature.addAll(spofeature);\n all.addAll(allspofeature);\n count3++;\n }\n\n// //reading all the documents under culture category\n for (File entry : culture.listFiles()) {\n fill = new File(culture + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n culturedocument[count4] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n\n culturedocument[count4].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n culturedocument[count4].remove(temp);\n }\n }\n\n }\n for (String str : culturedocument[count4]) {\n int index = culturedocument[count4].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n culturedocument[count4].set(index, stem_word.get(i));\n }\n }\n }\n culturedocument[count4].removeAll(stop_word_list);\n culturedocument[count4].removeAll(p_name);\n culturedocument[count4].removeAll(month);\n culturedocument[count4].removeAll(place);\n allculfeature.addAll(culturedocument[count4]);\n culfeature.addAll(culturedocument[count4]);\n allfeature.addAll(culfeature);\n all.addAll(allculfeature);\n count4++;\n\n }\n\n// //reading all the documents under accident category\n for (File entry : accident.listFiles()) {\n fill = new File(accident + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n accedentdocument[count5] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n accedentdocument[count5].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n accedentdocument[count5].remove(temp);\n }\n }\n\n }\n\n for (String str : accedentdocument[count5]) {\n int index = accedentdocument[count5].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n accedentdocument[count5].set(index, stem_word.get(i));\n }\n }\n }\n accedentdocument[count5].removeAll(stop_word_list);\n accedentdocument[count5].removeAll(p_name);\n accedentdocument[count5].removeAll(month);\n accedentdocument[count5].removeAll(place);\n allaccfeature.addAll(accedentdocument[count5]);\n accfeature.addAll(accedentdocument[count5]);\n allfeature.addAll(accfeature);\n all.addAll(allaccfeature);\n count5++;\n }\n\n// //reading all the documents under environmental category\n for (File entry : environmntal.listFiles()) {\n fill = new File(environmntal + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n environmntaldocument[count6] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n environmntaldocument[count6].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n environmntaldocument[count6].remove(temp);\n }\n }\n }\n\n for (String str : environmntaldocument[count6]) {\n int index = environmntaldocument[count6].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n environmntaldocument[count6].set(index, stem_word.get(i));\n }\n }\n }\n environmntaldocument[count6].removeAll(stop_word_list);\n environmntaldocument[count6].removeAll(p_name);\n environmntaldocument[count6].removeAll(month);\n environmntaldocument[count6].removeAll(place);\n allenvfeature.addAll(environmntaldocument[count6]);\n envfeature.addAll(environmntaldocument[count6]);\n allfeature.addAll(envfeature);\n all.addAll(allenvfeature);\n count6++;\n }\n\n// //reading all the documents under foreign affairs category\n for (File entry : foreign_affair.listFiles()) {\n fill = new File(foreign_affair + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n foreign_affairdocument[count7] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n foreign_affairdocument[count7].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n foreign_affairdocument[count7].remove(temp);\n }\n }\n\n }\n for (String str : foreign_affairdocument[count7]) {\n int index = foreign_affairdocument[count7].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n foreign_affairdocument[count7].set(index, stem_word.get(i));\n }\n }\n }\n foreign_affairdocument[count7].removeAll(stop_word_list);\n foreign_affairdocument[count7].removeAll(p_name);\n foreign_affairdocument[count7].removeAll(month);\n foreign_affairdocument[count7].removeAll(place);\n alldepfeature.addAll(foreign_affairdocument[count7]);\n depfeature.addAll(foreign_affairdocument[count7]);\n allfeature.addAll(depfeature);\n all.addAll(alldepfeature);\n count7++;\n }\n\n// //reading all the documents under law and justices category\n for (File entry : law_justice.listFiles()) {\n fill = new File(law_justice + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n law_justicedocument[count8] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n law_justicedocument[count8].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n law_justicedocument[count8].remove(temp);\n }\n }\n\n }\n for (String str : law_justicedocument[count8]) {\n int index = law_justicedocument[count8].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n law_justicedocument[count8].set(index, stem_word.get(i));\n }\n }\n }\n law_justicedocument[count8].removeAll(stop_word_list);\n law_justicedocument[count8].removeAll(p_name);\n law_justicedocument[count8].removeAll(month);\n law_justicedocument[count8].removeAll(month);\n alllawfeature.addAll(law_justicedocument[count8]);\n lawfeature.addAll(law_justicedocument[count8]);\n allfeature.addAll(lawfeature);\n all.addAll(alllawfeature);\n count8++;\n }\n\n// //reading all the documents under other category\n for (File entry : agri.listFiles()) {\n fill = new File(agri + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n agriculture[count9] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n agriculture[count9].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n agriculture[count9].remove(temp);\n }\n }\n\n }\n for (String str : agriculture[count9]) {\n int index = agriculture[count9].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n agriculture[count9].set(index, stem_word.get(i));\n }\n }\n }\n agriculture[count9].removeAll(stop_word_list);\n agriculture[count9].removeAll(p_name);\n agriculture[count9].removeAll(month);\n agriculture[count9].removeAll(place);\n allagrifeature.addAll(agriculture[count9]);\n agrifeature.addAll(agriculture[count9]);\n allfeature.addAll(agrifeature);\n all.addAll(allagrifeature);\n count9++;\n }\n //reading all the documents under politics category\n for (File entry : politics.listFiles()) {\n fill = new File(politics + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n politicsdocument[count10] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n politicsdocument[count10].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n politicsdocument[count10].remove(temp);\n }\n }\n }\n for (String str : politicsdocument[count10]) {\n int index = politicsdocument[count10].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n politicsdocument[count10].set(index, stem_word.get(i));\n }\n }\n }\n politicsdocument[count10].removeAll(stop_word_list);\n politicsdocument[count10].removeAll(p_name);\n politicsdocument[count10].removeAll(month);\n politicsdocument[count10].removeAll(place);\n allpolfeature.addAll(politicsdocument[count10]);\n polfeature.addAll(politicsdocument[count10]);\n allfeature.addAll(polfeature);\n all.addAll(allpolfeature);\n count10++;\n }\n //reading all the documents under science and technology category\n for (File entry : science_technology.listFiles()) {\n fill = new File(science_technology + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n science_technologydocument[count12] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n science_technologydocument[count12].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n science_technologydocument[count12].remove(temp);\n }\n }\n\n }\n for (String str : science_technologydocument[count12]) {\n int index = science_technologydocument[count12].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n science_technologydocument[count12].set(index, stem_word.get(i));\n }\n }\n }\n science_technologydocument[count12].removeAll(stop_word_list);\n science_technologydocument[count12].removeAll(p_name);\n science_technologydocument[count12].removeAll(month);\n science_technologydocument[count12].removeAll(place);\n allscifeature.addAll(science_technologydocument[count12]);\n scifeature.addAll(science_technologydocument[count12]);\n allfeature.addAll(scifeature);\n all.addAll(allscifeature);\n count12++;\n\n }\n\n //reading all the documents under health category\n for (File entry : health.listFiles()) {\n fill = new File(health + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n healthdocument[count13] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n healthdocument[count13].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n healthdocument[count13].remove(temp);\n }\n }\n }\n for (String str : healthdocument[count13]) {\n int index = healthdocument[count13].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n healthdocument[count13].set(index, stem_word.get(i));\n }\n }\n }\n healthdocument[count13].removeAll(stop_word_list);\n healthdocument[count13].removeAll(p_name);\n healthdocument[count13].removeAll(month);\n healthdocument[count13].removeAll(place);\n allhelfeature.addAll(healthdocument[count13]);\n helfeature.addAll(healthdocument[count13]);\n allfeature.addAll(helfeature);\n all.addAll(allhelfeature);\n count13++;\n }\n\n //reading all the file of relgion categories \n for (File entry : army_file.listFiles()) {\n fill = new File(army_file + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n army[count14] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n army[count14].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n army[count14].remove(temp);\n }\n }\n\n }\n for (String str : army[count14]) {\n int index = army[count14].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n army[count14].set(index, stem_word.get(i));\n }\n }\n }\n army[count14].removeAll(stop_word_list);\n army[count14].removeAll(p_name);\n army[count14].removeAll(month);\n army[count14].removeAll(place);\n allarmfeature.addAll(army[count14]);\n armfeature.addAll(army[count14]);\n allfeature.addAll(armfeature);\n all.addAll(allarmfeature);\n count14++;\n }\n } catch (Exception ex) {\n System.out.println(\"here\");\n }\n }",
"private void initialize() throws IOException {\n // All of this node's files are kept in this directory.\n File dir = new File(localDir);\n if (!dir.exists()) {\n if (!dir.mkdirs()) {\n throw new IOException(\"Unable to create directory: \" +\n dir.toString());\n }\n }\n\n Collection<File> data = FileUtils.listFiles(dir,\n FileFilterUtils.trueFileFilter(),\n FileFilterUtils.trueFileFilter());\n String[] files = new String[data.size()];\n Iterator<File> it = data.iterator();\n for (int i = 0; it.hasNext(); i++) {\n files[i] = it.next().getPath().substring(dir.getPath().length() + 1);\n }\n\n StartupMessage msg = new StartupMessage(InetAddress.getLocalHost()\n .getHostName(), port, id, files);\n msg.send(nameServer, namePort);\n }",
"public void init(String file) {\n\t\tif (file == null) {\n\t\t\tfile = Controller.getSourceFile();\n\t\t}\n\t\tthis.satelliteList = JSONLoader.getSatelliteList(file);\n\t\tthis.initModules();\n\t}",
"private void init() throws FileNotFoundException, TransformerConfigurationException {\n try (Scanner filesscanner = new Scanner(new File(csvlocation))) {\n while (filesscanner.hasNext()) {\n filecontent.add(filesscanner.next());\n }\n if (!filecontent.isEmpty()) {\n this.header = filecontent.get(0);\n filecontent.remove(0);\n }\n setMailtemplate();\n } catch (FileNotFoundException | TransformerConfigurationException e) {\n LOGGER.error(\"Exception occured while reading the file\", e);\n throw e;\n }\n }",
"public FileManager() {\n\t\t\n\t}",
"private void scanArgs(String [] args)\n{\n for (int i = 0; i < args.length; ++i) {\n if (args[i].startsWith(\"-\")) {\n \n }\n else { \n root_files.add(new File(args[i]));\n }\n }\n \n if (root_files.isEmpty()) {\n root_files.add(new File(DEFAULT_FILE));\n }\n if (output_file == null) output_file = new File(OUTPUT_FILE);\n}",
"private static ArrayList<User> loadInitialData(){\n\t\tArrayList<User> users = new ArrayList<User>();\n\t\t// From the users list get all the user names\n\t\tfor (String username:Utils.FileUtils.getFileLines(Global.Constants.LIST_OF_USERS)){ // refers \"users\" file\n\t\t\tArrayList<Directory> directories = new ArrayList<Directory>();\n\t\t\t// For a user name, read the names of directories registered\n\t\t\t// Note: All directory names are provided in the file bearing user name\n\t\t\tif (Utils.FileUtils.exists(Global.Constants.DIRECTORY_LOCATION + username)) { // refers to a specific user file \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // that has directories\n\t\t\t\tfor (String dir:Utils.FileUtils.getFileLines(Global.Constants.DIRECTORY_LOCATION + username)) {\n\t\t\t\t\tArrayList<String> documents = new ArrayList<String>();\n\t\t\t\t\t// For each directory, read names of files saved\n\t\t\t\t\t// Note: All file names are provided in the file bearing username$dirname\n\t\t\t\t\tif (Utils.FileUtils.exists(Global.Constants.DIRECTORY_LOCATION, username + \"$\" + dir)) {\n\t\t\t\t\t\tfor (String doc:Utils.FileUtils.getFileLines(Global.Constants.DIRECTORY_LOCATION + username + \"$\" + dir)) {\n\t\t\t\t\t\t\tdocuments.add(doc);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdirectories.add(new Directory(dir, documents));\n\t\t\t\t}\n\t\t\t}\n\t\t\tusers.add(new User(username, directories));\n\t\t}\n\t\treturn users;\n\t}",
"public Music(String...files){\n musicFiles = new ArrayList<AudioFile>();\n for(String file: files){\n musicFiles.add(new AudioFile(file));\n }\n }",
"public void parseFile(File dir) {\r\n\t\tFile[] files = dir.listFiles();\r\n\t\tfor(int i = 0; i < files.length; i++) {\r\n\t\t\tif(files[i].isDirectory()) {\r\n\t\t\t\tparseFile(files[i]);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif(!files[i].exists()) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tString fileName = files[i].getName();\r\n\t\t\t\tif(fileName.toLowerCase().endsWith(\".json\")) {\r\n\t\t\t\t\twq.execute(new Worker(library, files[i]));\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"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 }",
"private void processBulk()\n {\n File inDir = new File(m_inDir);\n String [] fileList = inDir.list();\n \n for (int j=0; j<fileList.length; j++)\n {\n String file = fileList[j];\n if (file.endsWith(\".xml\"))\n {\n m_inFile = m_inDir + \"/\" + file;\n m_localeStr = Utilities.extractLocaleFromFilename(file);\n processSingle();\n }\n }\n }",
"public void multiFileStartDocument() throws SAXException\r\n\t{\r\n\t\tsuper.startDocument();\r\n\t\ttagPath = new Stack<Path>();\r\n\t\ttagBeingIgnored = null;\r\n\t\tpassedARecord = false;\r\n\t}",
"private void readFileList() throws IOException {\n\t\tint entries = metadataFile.readInt();\n\n\t\tfor (int i = 0; i < entries; i++) {\n\t\t\tint hash = metadataFile.readInt();\n\t\t\tlong dataOffset = metadataFile.readInt() & 0xFFFFFFFFL;\n\t\t\tlong dataSize = metadataFile.readInt() & 0xFFFFFFFFL;\n\t\t\tint pathListIndex = metadataFile.readInt();\n\n\t\t\tlong position = metadataFile.getPosition();\n\t\t\tmetadataFile.setPosition(pathListOffset + 8 + (pathListIndex * 8));\n\n\t\t\tlong pathOffset = metadataFile.readInt() & 0xFFFFFFFFL;\n\t\t\tint pathSize = metadataFile.readInt();\n\n\t\t\tmetadataFile.setPosition(pathListOffset + pathOffset);\n\t\t\tString path = metadataFile.readString(pathSize).trim();\n\n\t\t\tif (hash == hash(path)) \n\t\t\t\tfileEntries.add(new RAFFileEntry(dataOffset, dataSize, path));\n\t\t\telse\n\t\t\t\tthrow new IOException(\"Invalid hash for item '\" + path + \"'.\");\n\n\t\t\tmetadataFile.setPosition(position);\n\t\t}\n\t}"
] | [
"0.71005505",
"0.6933245",
"0.67433655",
"0.6661134",
"0.6501387",
"0.64502347",
"0.6434856",
"0.6425116",
"0.6352556",
"0.63291395",
"0.6314788",
"0.628671",
"0.6275413",
"0.62452656",
"0.6240012",
"0.6227228",
"0.6210388",
"0.6209681",
"0.6175887",
"0.61630446",
"0.6129158",
"0.61092395",
"0.61001635",
"0.607158",
"0.6069802",
"0.60482407",
"0.6037533",
"0.59851",
"0.5941042",
"0.5933833",
"0.5933802",
"0.5920509",
"0.59162873",
"0.58780307",
"0.58703846",
"0.58641917",
"0.5858726",
"0.5837465",
"0.5815484",
"0.58026165",
"0.57955885",
"0.57896966",
"0.57888055",
"0.57830113",
"0.57754415",
"0.57721174",
"0.5770098",
"0.5769458",
"0.57507503",
"0.574695",
"0.57457715",
"0.57365376",
"0.57124114",
"0.5686156",
"0.5683198",
"0.5680601",
"0.56715965",
"0.566706",
"0.5665663",
"0.5656063",
"0.56509596",
"0.56484544",
"0.5646249",
"0.5631106",
"0.5615849",
"0.56049865",
"0.56029737",
"0.56025755",
"0.56022686",
"0.55987495",
"0.55895305",
"0.5589144",
"0.5585959",
"0.55822015",
"0.5578532",
"0.5577636",
"0.5576307",
"0.55746746",
"0.55710095",
"0.5555438",
"0.5551392",
"0.5550645",
"0.5549489",
"0.55467385",
"0.55457443",
"0.55264384",
"0.5525624",
"0.5520924",
"0.5518045",
"0.5516252",
"0.55154747",
"0.55093",
"0.55084974",
"0.55022365",
"0.5500577",
"0.5497166",
"0.54969126",
"0.54900914",
"0.54866254",
"0.5483713"
] | 0.6444867 | 6 |
has the purpose of obtaining the metadata of the context element | public MetadataContext parseMetadata(KXmlParser myParser)
{
MetadataContext metadata = new MetadataContext();
//<contextMetadata>
try {
myParser.nextTag();
System.out.println(myParser.getName());
//<description>
myParser.nextTag();
System.out.println(myParser.getName());
metadata.setM_description( myParser.nextText());
//<positionInfo>
myParser.nextTag();
System.out.println(myParser.getName());
metadata.setM_latitude( Double.parseDouble( myParser.getAttributeValue(0)));
metadata.setM_longitude( Double.parseDouble( myParser.getAttributeValue(1)));
//</positionInfo>
myParser.nextTag();
System.out.println(myParser.getName());
//<temporalInfo>
myParser.nextTag();
System.out.println(myParser.getName());
metadata.setM_time( myParser.nextText());
//<version>
myParser.nextTag();
metadata.setM_time( myParser.nextText());
//<unit>
myParser.nextTag();
System.out.println(myParser.getName());
metadata.setM_unit(myParser.nextText());
//</contextMetadata>
myParser.nextTag();
System.out.println(myParser.getName());
} catch (XmlPullParserException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return metadata;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getContext();",
"Map<String, Object> getContext();",
"public String getContextString();",
"public String getContext() { return context; }",
"Context getContext();",
"public Attributes getContextAttributes() {\r\n return this.atts;\r\n }",
"public IContextInformation getContextInformation()\n {\n return null;\n }",
"public String getContext() {\r\n\t\treturn context;\r\n\t}",
"public final Object getContextInfo() {\n return this.info;\n }",
"public ContextNode getContextNode();",
"public String getContext() {\n\t\treturn context;\n\t}",
"public String getContext() {\n\t\treturn this.getClass().getSimpleName();\n\t}",
"IContextNode wdGetContext();",
"public String getContextProperty() {\n return _contextProperty;\n }",
"public abstract ContextNode getContextNode();",
"public String getContext() {\n return context;\n }",
"public String getContext() {\n return context;\n }",
"public String getContext() {\n return context;\n }",
"Map<String, Object> getRequestContextLocalAttrs();",
"Context context();",
"Context context();",
"com.google.protobuf.ByteString getContext();",
"Metadata getMetaData();",
"public String tooltip()\n\t{\n\t if (contextURI==null)\n\t return \"(no context specified)\";\n\t \n\t if (contextURI.equals(Vocabulary.SYSTEM_CONTEXT.METACONTEXT))\n\t return \"MetaContext (stores data about contexts)\";\n\t \n\t if(contextURI.equals(Vocabulary.SYSTEM_CONTEXT.VOIDCONTEXT))\n\t \treturn \"VoID Context (stores statistics about contexts)\";\n\t \n\t if (type!=null && timestamp!=null)\n\t {\n\t GregorianCalendar c = new GregorianCalendar();\n\t c.setTimeInMillis(timestamp);\n\t \n\t String date = ReadWriteDataManagerImpl.dateToISOliteral(c.getTime()); \n\t \n\t if (!StringUtil.isNullOrEmpty(date))\n\t date = ValueResolver.resolveSysDate(date);\n\t \n\t String ret = \"Created by \" + type;\n\t if (type.equals(ContextType.USER))\n\t ret += \" '\"\n\t + source.getLocalName()\n\t + \"'\";\n\t else\n\t {\n\t String displaySource = null;\n\t if(source!=null)\n\t {\n\t displaySource = EndpointImpl.api().getNamespaceService().getAbbreviatedURI(source);\n\t if (StringUtil.isNullOrEmpty(displaySource))\n\t displaySource = source.stringValue(); // fallback solution: full URI\n\t }\n\t String displayGroup = null;\n\t if (group!=null)\n\t {\n\t displayGroup = EndpointImpl.api().getNamespaceService().getAbbreviatedURI(group);\n\t if (StringUtil.isNullOrEmpty(displayGroup))\n\t displayGroup = group.stringValue(); // fallback solution: full URI\n\t }\n\t \n\t ret += \" (\";\n\t ret += source==null ? \"\" : \"source='\" + displaySource + \"'\";\n\t ret += source!=null && group!=null ? \"/\" : \"\";\n\t ret += group==null ? \"\" : \"group='\" + displayGroup + \"'\";\n\t ret += \")\";\n\t }\n\t ret += \" on \" + date;\n\t if (label!=null)\n\t ret += \" (\" + label.toString() + \")\";\n\t if (state!=null && !state.equals(ContextState.PUBLISHED))\n\t ret += \" (\" + state + \")\"; \n\t return ret;\n\t }\n\t else\n\t return contextURI.stringValue();\n\t}",
"RenderingContext getContext();",
"public TaskContextMetadata getTaskContextMetadata()\n {\n return taskContextMetadata;\n }",
"@java.lang.Override public int getContextValue() {\n return context_;\n }",
"public MetaData getMetaData();",
"@Nullable\n default String getContext() {\n String contextName =\n String.valueOf(execute(DriverCommand.GET_CURRENT_CONTEXT_HANDLE).getValue());\n return \"null\".equalsIgnoreCase(contextName) ? null : contextName;\n }",
"CTX_Context getContext();",
"public java.lang.String getContext() {\n java.lang.Object ref = context_;\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 context_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"com.google.protobuf.ByteString\n getContextBytes();",
"protected NodePart getHelmetMoreDetails() {\n\t\treturn instance.nodes.get(0).parts.get(0);\n\t}",
"public IPrivateTestCompView.IContextElement currentContextElement() {\r\n return (IPrivateTestCompView.IContextElement) getCurrentElement();\r\n }",
"@Override\r\n\tpublic Map<String, Object> getMetadata() {\n\t\treturn null;\r\n\t}",
"ContextBucket getContext() {\n\treturn context;\n }",
"public Object getMetadata() {\n return this.metadata;\n }",
"@Override\r\n\tpublic Context getContext() {\r\n\t\treturn this.context;\r\n\t}",
"@java.lang.Override public int getContextValue() {\n return context_;\n }",
"public com.google.protobuf.ByteString getContext() {\n return context_;\n }",
"@JsonProperty(\"context\")\n public Context getContext() {\n return context;\n }",
"public com.google.protobuf.ByteString\n getContextBytes() {\n java.lang.Object ref = context_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n context_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString getContext() {\n return context_;\n }",
"public java.lang.String getContext() {\n java.lang.Object ref = context_;\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 context_ = s;\n return s;\n }\n }",
"String getContextId();",
"private static String getMetaDataString(Context context, String name) {\r\n\t\tString value = null;\r\n\t\tPackageManager pm = context.getPackageManager();\r\n\t\ttry {\r\n\t\t ApplicationInfo ai = pm.getApplicationInfo(context.getPackageName(), PackageManager.GET_META_DATA);\r\n\t\t value = ai.metaData.getString(name);\r\n\t\t} catch (Exception e) {\r\n\t\t Log.d(\"EasyLite\", \"Couldn't find config value: \" + name);\r\n\t\t}\r\n\t\treturn value;\r\n }",
"public Class getContextType();",
"String getDetailedDescription() {\n return context.getString(detailedDescription);\n }",
"public Map getMetadata() {\n return metadata;\n }",
"public HashMap getMetaData() ;",
"Map<String, String> getCustomMetadata();",
"public org.omg.CORBA.Context read_Context() {\n throw new org.omg.CORBA.NO_IMPLEMENT();\n }",
"java.lang.String getAttribute();",
"java.lang.String getSourceContext();",
"public com.google.protobuf.ByteString\n getContextBytes() {\n java.lang.Object ref = context_;\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 context_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public Context getContext() {\r\n\t\treturn context;\r\n\t}",
"public static MetadataContext get() {\n if (null == METADATA_CONTEXT.get()) {\n MetadataContext metadataContext = new MetadataContext();\n if (metadataLocalProperties == null) {\n metadataLocalProperties = (MetadataLocalProperties) ApplicationContextAwareUtils\n .getApplicationContext().getBean(\"metadataLocalProperties\");\n }\n\n // init custom metadata and load local metadata\n Map<String, String> transitiveMetadataMap = getTransitiveMetadataMap(metadataLocalProperties.getContent(),\n metadataLocalProperties.getTransitive());\n metadataContext.putAllTransitiveCustomMetadata(transitiveMetadataMap);\n\n // init system metadata\n metadataContext.putSystemMetadata(MetadataConstant.SystemMetadataKey.LOCAL_NAMESPACE,\n LOCAL_NAMESPACE);\n metadataContext.putSystemMetadata(MetadataConstant.SystemMetadataKey.LOCAL_SERVICE,\n LOCAL_SERVICE);\n\n METADATA_CONTEXT.set(metadataContext);\n }\n return METADATA_CONTEXT.get();\n }",
"int getMeta();",
"public org.apache.axis2.context.xsd.ServiceContext getServiceContext(){\n return localServiceContext;\n }",
"public Object getContextObject() {\n return context;\n }",
"Iterator getAttributeAxisIterator(Object contextNode) throws UnsupportedAxisException;",
"interface Context {\r\n\r\n\t\t/**\r\n\t\t * Returns the current size of the tribe.\r\n\t\t *\r\n\t\t * @return the tribe's current size\r\n\t\t */\r\n\r\n\t\tint getTribeSize();\r\n\t}",
"public OwNetworkContext getContext();",
"protected final TranslationContext context() {\n\t\treturn context;\n\t}",
"private String context(){\r\n \r\n assert iMessage!=null;\r\n assert iIndex>=0;\r\n assert iIndex<=iMessage.length();\r\n\r\n return iMessage.substring(0, iIndex)+\" ^ \"+iMessage.substring(iIndex);//return parse context\r\n \r\n }",
"java.lang.String getLinkedContext();",
"private void addContext(StringBuilder xml) {\n\t\t\n\t\tif(context != null) {\n\t\t\tstartElementWithAttributes(xml, \"Context\");\n\t\t\taddStringAttribute(xml, \"id\", context.getId());\n\t\t\taddStringAttribute(xml, \"Type\", context.getType());\n\t\t\taddStringAttribute(xml, \"contextObject\", context.getContext());\n\t\t\tcloseSimpleElementWithAttributes(xml);\n\t\t}\n\t\t\n\t}",
"public Context getContext() {\n\t\treturn context;\n\t}",
"public ELContext getELContext() {\n/* 47 */ return (ELContext)getSource();\n/* */ }",
"public String getDescription(Context context)\n\t\t{\n\t\t\tif (descriptionId == 0)\n\t\t\t\treturn null;\n\n\t\t\treturn context.getString(descriptionId);\n\t\t}",
"static Element getContextElement(Element element ,\n CompilationController controller )\n {\n if ( element instanceof TypeElement ){\n if ( hasAnnotation(element, DECORATOR) ){\n List<VariableElement> fieldsIn = ElementFilter.fieldsIn(\n controller.getElements().getAllMembers((TypeElement)element));\n for (VariableElement variableElement : fieldsIn) {\n if ( hasAnnotation(variableElement, DELEGATE)){\n return variableElement;\n }\n }\n StatusDisplayer.getDefault().setStatusText(\n NbBundle.getMessage(\n WebBeansActionHelper.class,\n \"LBL_NotDecorator\"));\n }\n return null;\n }\n return element;\n }",
"public cl_context getContext() {\r\n return context;\r\n }",
"public Map<String, Object> context() {\n return unmodifiableMap(context);\n }",
"@Override\n\tpublic String toString() {\n\t\treturn \"# \" + title + \" :\\n\" + context ;\n\t}",
"@JsonProperty(\"context\")\n @ApiModelProperty(value = \"The context for the dialog node.\")\n public Object getContext() {\n return context;\n }",
"public IContentContext getContentContext(\n )\n {return contents.getContentContext();}",
"@Override\n public LookupContext lookupContext(Element element) throws LookupException;",
"@Override\r\n\tpublic String getValue() {\r\n\t\tfinal StoryGroup group = ((KnowItBindingStoryGroup) this.binding)\r\n\t\t\t\t.getValue();\r\n\r\n\t\tfinal Context knowItContext;\r\n\r\n\t\tknowItContext = ContextFactory.getInstance().createContext(this, group);\r\n\r\n\t\treturn knowItContext.getName();\r\n\t}",
"private static void metadataGroupsIntoContext(SessionState state, Context context)\n\t{\n\n\t\tcontext.put(\"STRING\", ResourcesMetadata.WIDGET_STRING);\n\t\tcontext.put(\"TEXTAREA\", ResourcesMetadata.WIDGET_TEXTAREA);\n\t\tcontext.put(\"BOOLEAN\", ResourcesMetadata.WIDGET_BOOLEAN);\n\t\tcontext.put(\"INTEGER\", ResourcesMetadata.WIDGET_INTEGER);\n\t\tcontext.put(\"DOUBLE\", ResourcesMetadata.WIDGET_DOUBLE);\n\t\tcontext.put(\"DATE\", ResourcesMetadata.WIDGET_DATE);\n\t\tcontext.put(\"TIME\", ResourcesMetadata.WIDGET_TIME);\n\t\tcontext.put(\"DATETIME\", ResourcesMetadata.WIDGET_DATETIME);\n\t\tcontext.put(\"ANYURI\", ResourcesMetadata.WIDGET_ANYURI);\n\t\tcontext.put(\"WYSIWYG\", ResourcesMetadata.WIDGET_WYSIWYG);\n\n\t\tcontext.put(\"today\", TimeService.newTime());\n\n\t\tList metadataGroups = (List) state.getAttribute(STATE_METADATA_GROUPS);\n\t\tif(metadataGroups != null && !metadataGroups.isEmpty())\n\t\t{\n\t\t\tcontext.put(\"metadataGroups\", metadataGroups);\n\t\t}\n\n\t}",
"@Override\n\tpublic Meta_data get_Meta_data() {\n\t\tMeta_data meta_data = new Meta_data_layer(elements);\n\t\treturn meta_data;\n\t}",
"public abstract Context context();",
"Attributes getAttributes();",
"public IContextInformation[] computeContextInformation(ITextViewer viewer, int documentOffset) {\n\t\treturn null;\n\t}",
"public String getInfo()\n\t{\n\t\treturn \"Decorate\";\n\t}",
"boolean hasContext();",
"boolean hasContext();",
"public abstract String metadata(String property);",
"public IRuntimeContext getContext() {\n return fContext;\n }",
"String getAttribute();",
"public org.apache.axis2.context.xsd.ConfigurationContext getConfigurationContext(){\n return localConfigurationContext;\n }",
"public ComponentContext getContext()\n\t{\n\t\treturn context;\n\t}",
"public edu.ustb.sei.mde.morel.resource.morel.IMorelMetaInformation getMetaInformation();",
"public ModuleContext getContext() {\r\n return context;\r\n }",
"public java.lang.CharSequence getContextId() {\n return contextId;\n }",
"Object getDocumentNode(Object contextNode);",
"private Set<String> getContextRelevantLabels(CompositeControllerContext context) {\n if (context.getVertexControllerContext().isPresent()) {\n return getVertexContextRelevantLabels(context);\n }\n\n return getElementContextRelevantLabels(context);\n }",
"public Instruction loadContextNode() {\n/* 270 */ return loadCurrentNode();\n/* */ }",
"public Object getValue (Context context) throws PropertyException\n {\n return context.getProperty(_names);\n //return context.getProperty(_names[0]);\n }",
"public String getContextId() {\n return contextId;\n }",
"@Override\r\n\tpublic Context getContext() {\n\t\treturn null;\r\n\t}"
] | [
"0.70289993",
"0.6577228",
"0.65362006",
"0.6507868",
"0.64984506",
"0.641658",
"0.634284",
"0.6286766",
"0.6249544",
"0.62477887",
"0.622689",
"0.6194023",
"0.61860245",
"0.6164836",
"0.61072564",
"0.6044772",
"0.6044772",
"0.6044772",
"0.59713644",
"0.5949146",
"0.5949146",
"0.5942321",
"0.59421307",
"0.59310544",
"0.59303916",
"0.58879197",
"0.58222485",
"0.57879746",
"0.5777979",
"0.576785",
"0.5762335",
"0.57565767",
"0.5738638",
"0.5723361",
"0.57230157",
"0.57224375",
"0.5721724",
"0.57183",
"0.57068324",
"0.5676725",
"0.5671027",
"0.5669826",
"0.5669811",
"0.56554484",
"0.56500393",
"0.563947",
"0.5615784",
"0.560784",
"0.5600308",
"0.55610704",
"0.55532736",
"0.55528915",
"0.55326724",
"0.5523822",
"0.5511515",
"0.5506924",
"0.55009264",
"0.5496671",
"0.5493569",
"0.5490525",
"0.54818916",
"0.5477833",
"0.5476712",
"0.54695445",
"0.54683936",
"0.54573154",
"0.54548293",
"0.5450005",
"0.54467934",
"0.5443339",
"0.5442174",
"0.5441733",
"0.5422294",
"0.5419412",
"0.541064",
"0.54103243",
"0.5400029",
"0.5391245",
"0.5389089",
"0.53877825",
"0.5387408",
"0.5383766",
"0.53586704",
"0.53582656",
"0.53524095",
"0.53524095",
"0.534573",
"0.53423625",
"0.53364897",
"0.5334998",
"0.53319275",
"0.5328015",
"0.5326704",
"0.5318446",
"0.531559",
"0.5314625",
"0.5314515",
"0.5314259",
"0.5299743",
"0.5299269"
] | 0.60890126 | 15 |
Properties loading from configuration file. Properties passed to jvm will override configuration file settings. | public static void loadProperties()
{
Properties props = new Properties();
try {
props.load( new BufferedInputStream( ClassLoader.getSystemResourceAsStream("bench.properties") ) );
} catch (IOException ioe)
{
logger.log(Level.SEVERE, ioe.getMessage());
}
props.putAll(System.getProperties()); //overwrite
System.getProperties().putAll(props);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@SuppressWarnings(\"unchecked\")\n private void loadProperties()\n {\n File f = getPropertiesFile();\n if (!f.exists())\n return;\n \n m_props = (Map<String, Object>) PSConfigUtils.loadObjectFromFile(f);\n }",
"public void loadProperties(){\n\n\ttry{\n\t prop.load(file);\n // get the property value and print it out\n host = prop.getProperty(\"host\");\n\t port = prop.getProperty(\"port\");\n\t sslmode = prop.getProperty(\"sslmode\");\n\t source = prop.getProperty(\"source\");\n dbname = prop.getProperty(\"dbname\");\n help_url_prefix = prop.getProperty(\"base.help.url\");\n password = prop.getProperty(\"password\");\n\t user = prop.getProperty(\"user\");\t \n\t temp_dir = new File(System.getProperty(\"java.io.tmpdir\")).toString();\n\t working_dir = new File(System.getProperty(\"user.dir\")).toString();\n\t file.close();\n\t}catch(IOException ioe){\n\t\t\n\t} \n\t \n }",
"private void loadProperties(){\n\t\tProperties properties = new Properties();\n\t\ttry{\n\t\t\tlog.info(\"-------------------------------------------------------------------\");\n\t\t\tlog.info(\"Updating config settings\");\n\n\t\t\tproperties.load(Thread.currentThread().getContextClassLoader().getResourceAsStream(\"config.properties\"));\n\t\t\tservletContext.setAttribute(\"properties\", properties);\n\t\t\t\n\t\t\tthis.cswURL=(String)properties.get(\"cswURL\");\n\t\t\tthis.proxyHost=(String)properties.get(\"proxyHost\");\n\t\t\tif(!this.proxyHost.equals(\"\") && this.proxyHost != null){\n\t\t\t\tthis.proxyPort=Integer.parseInt((String)properties.get(\"proxyPort\"));\n\t\t\t}\n\t\t\tthis.feedURL=(String)properties.get(\"feedURL\");\n\t\t\tthis.servicePath=(String)properties.get(\"servicePath\");\n\t\t\tthis.dataSetPath=(String)properties.get(\"dataSetPath\");\n\t\t\tthis.opensearchPath=(String)properties.get(\"opensearchPath\");\n\t\t\tthis.downloadUUIDs=(String)properties.get(\"serviceUUIDs\");\t\n\t\t\tthis.transOpt=(String)properties.get(\"transOpt\");\t\n\t\t\t\n\t\t }catch (Exception e){\n\t\t\t log.error(e.toString(), e.fillInStackTrace());\n\t\t\t System.out.println(\"Error: \" + e.getMessage());\n\t\t }\t\n\t }",
"public void loadConfiguration() {\n Properties prop = new Properties();\n String propFileName = \".env_\" + this.dbmode.name().toLowerCase();\n InputStream inputStream = getClass().getClassLoader().getResourceAsStream(propFileName);\n try {\n if (inputStream != null) {\n prop.load(inputStream);\n } else {\n System.err.println(\"property file '\" + propFileName + \"' not found in the classpath\");\n }\n this.jdbc = prop.getProperty(\"jdbc\");\n this.host = prop.getProperty(\"host\");\n this.port = prop.getProperty(\"port\");\n this.database = prop.getProperty(\"database\");\n this.user = prop.getProperty(\"user\");\n this.password = prop.getProperty(\"password\");\n // this.sslFooter = prop.getProperty(\"sslFooter\");\n } catch (Exception e) {\n System.err.println(\"can't read property file\");\n }\n try {\n inputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private void loadData() {\n\n \tInputStream inputStream = this.getClass().getResourceAsStream(propertyFilePath);\n \n //Read configuration.properties file\n try {\n //prop.load(new FileInputStream(propertyFilePath));\n \tprop.load(inputStream);\n //prop.load(this.getClass().getClassLoader().getResourceAsStream(\"configuration.properties\"));\n } catch (IOException e) {\n System.out.println(\"Configuration properties file cannot be found\");\n }\n \n //Get properties from configuration.properties\n browser = prop.getProperty(\"browser\");\n testsiteurl = prop.getProperty(\"testsiteurl\");\n defaultUserName = prop.getProperty(\"defaultUserName\");\n defaultPassword = prop.getProperty(\"defaultPassword\");\n }",
"public static void load() {\n try {\n File confFile = SessionService.getConfFileByPath(Const.FILE_CONFIGURATION);\n UtilSystem.recoverFileIfRequired(confFile);\n // Conf file doesn't exist at first launch\n if (confFile.exists()) {\n // Now read the conf file\n InputStream str = new FileInputStream(confFile);\n try {\n properties.load(str);\n } finally {\n str.close();\n }\n }\n } catch (Exception e) {\n Log.error(e);\n Messages.showErrorMessage(114);\n }\n }",
"private void readProperties() {\n // reading config files\n if (driver == null) {\n try {\n fis = new FileInputStream(userDir + \"\\\\src\\\\main\\\\resources\\\\properties\\\\Config.properties\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n try {\n config.load(fis);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }",
"private void loadProperties() {\n try (InputStream in = getClass().getClassLoader().getResourceAsStream(PATH_TO_PROPERTIES)) {\n this.prs.load(in);\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n }",
"public static void loadProps(InputStream in) {\r\n\t\ttry {\r\n properties.load(in);\r\n } catch (IOException e) {\r\n System.out.println( \"No config.properties was found.\");\r\n e.printStackTrace();\r\n }\r\n\t}",
"void loadPropertiesFile()\n\t{\n\t\tlogger.info(\"Fetching the properties files\");\n\t\t\n\t\tconfigProp=new Properties(); \n\t\ttry{\tconfigProp.load(loadFile(\"Config.properties\"));\t\t} \n\t\tcatch (IOException e){\tAssert.assertTrue(\"Cannot initialise the Config properties file, Check if the file is corrupted\", false);\t}\t\t\t\n\t}",
"@SuppressWarnings({\"unchecked\", \"rawtypes\"})\n public void loadConfigProperties() {\n Properties properties = new Properties();\n InputStream inputStream = null;\n try {\n String configFile = Constant.CONFIGURATION_PROPERTIES;\n inputStream = RepositoryParser.class.getClassLoader().getResourceAsStream(configFile);\n // Loading the property file\n properties.load(inputStream);\n } catch (FileNotFoundException e) {\n Log.error(\"Property file was not found\");\n } catch (IOException e) {\n Log.error(\"The key was not found in the property file\");\n } finally {\n if (inputStream != null) {\n try {\n inputStream.close();\n } catch (IOException e) {\n Log.error(\"The property file was not closed\");\n }\n }\n }\n\n // Getting the corresponding value of the key in the property file\n configPropertiesMap = new HashMap<String, String>((Map) properties);\n }",
"public Properties loadConfig(){\n\t\tprintln(\"Begin loadConfig \");\n\t\tProperties prop = null;\n\t\t prop = new Properties();\n\t\ttry {\n\t\t\t\n\t\t\tprop.load(new FileInputStream(APIConstant.configFullPath));\n\n\t } catch (Exception ex) {\n\t ex.printStackTrace();\n\t println(\"Exception \"+ex.toString());\n\t \n\t }\n\t\tprintln(\"End loadConfig \");\n\t\treturn prop;\n\t\t\n\t}",
"private void loadProperties() {\n\t\tInputStream propsFile;\n\t\tProperties tempProp = new Properties();\n\n\t\ttry {\n\t\t\t//propsFile = new FileInputStream(\"plugins\\\\balloonplugin\\\\BalloonSegmentation.properties\");\n\t\t\tpropsFile = getClass().getResourceAsStream(\"/BalloonSegmentation.properties\");\n\t\t\ttempProp.load(propsFile);\n\t\t\tpropsFile.close();\n\n\t\t\t// load properties\n\t\t\tinit_channel = Integer.parseInt(tempProp.getProperty(\"init_channel\"));\t\t\t\t// initial channel selected for segmenting the cell architecture 1 - red, 2 - green, 3 - blue\n\t\t\tinit_max_pixel = Integer.parseInt(tempProp.getProperty(\"init_max_pixel\"));\t\t\t// initial max pixel intensity used for finding the doundaries of the colony of cells\n\t\t\tinit_HL = Integer.parseInt(tempProp.getProperty(\"init_HL\"));\t\t\t\t\t\t// initial H*L factor used finding seeds in the population\n\t\t\tinit_min_I = Integer.parseInt(tempProp.getProperty(\"init_min_I\"));\t\t\t\t\t// initial pixel intensity when balloon algorithm starts\n\t\t\tinit_max_I = Integer.parseInt(tempProp.getProperty(\"init_max_I\"));\t\t\t\t\t// final pixel intensity when balloon algorithm stops\n\n\t\t}\n\t\tcatch (IOException ioe) {\n\t\t\tIJ.error(\"I/O Exception: cannot read .properties file\");\n\t\t}\n\t}",
"private Properties loadConfigProperties() {\n \tProperties prop = new Properties();\n \tInputStream in = null;\n \ttry {\n \t\tin = this.getClass().getClassLoader().getResourceAsStream(\"resources/config.properties\");\n \t\tprop.load(in);\n \t} catch (IOException ex) {\n \t\tex.printStackTrace();\n \t} finally {\n \t\tif (in != null) {\n \t\t\ttry {\n \t\t\t\tin.close();\n \t\t\t} catch (IOException e) {\n \t\t\t\te.printStackTrace();\n \t\t\t}\n \t\t}\n \t}\n \treturn prop;\n\t}",
"public void setupProp() {\r\n\t\tprop = new Properties();\r\n\t\tInputStream in = getClass().getResourceAsStream(\"C:/Users/Marcus/git/EmailProgram/EmailProgram/resources/config.properties\");\r\n\t\ttry {\r\n\t\t\tprop.load(in);\r\n\t\t\tFileInputStream fin = new FileInputStream(\"C:/Users/Marcus/git/EmailProgram/EmailProgram/resources/config.properties\");\r\n\t\t\tObjectInputStream ois = new ObjectInputStream(fin);\r\n\t\t\tdblogic = (PatronDBLogic) ois.readObject();\r\n\t\t\tois.close();\r\n\r\n\t\t} catch (IOException | ClassNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"@Override\n public Properties loadProperties(String filename) {\n return testProperties;\n }",
"public void getConfigProperty() {\n Properties properties = new Properties();\n try(InputStream input = new FileInputStream(\"config.properties\");){\n properties.load(input);\n logger.info(\"BASE URL :\" + properties.getProperty(\"BASEURL\"));\n setBaseUrl(properties.getProperty(\"BASEURL\"));\n setLoginMode(properties.getProperty(\"LOGINMODE\"));\n setProjectId(properties.getProperty(\"PROJECTID\"));\n setReportId(properties.getProperty(\"REPORTID\"));\n if (!(properties.getProperty(\"PASSWORD\").trim().equals(\"\"))) {\n setPassword(properties.getProperty(\"PASSWORD\"));\n }\n if (!(properties.getProperty(\"USERNAME\").trim().equals(\"\"))) {\n setUserName(properties.getProperty(\"USERNAME\"));\n }\n }catch(IOException ex) {\n logger.debug(\"Failed to fetch value from configure file: \", ex);\n }\n\n }",
"private void loadProperties() {\n driver = JiveGlobals.getXMLProperty(\"database.defaultProvider.driver\");\n serverURL = JiveGlobals.getXMLProperty(\"database.defaultProvider.serverURL\");\n username = JiveGlobals.getXMLProperty(\"database.defaultProvider.username\");\n password = JiveGlobals.getXMLProperty(\"database.defaultProvider.password\");\n String minCons = JiveGlobals.getXMLProperty(\"database.defaultProvider.minConnections\");\n String maxCons = JiveGlobals.getXMLProperty(\"database.defaultProvider.maxConnections\");\n String conTimeout = JiveGlobals.getXMLProperty(\"database.defaultProvider.connectionTimeout\");\n // See if we should use Unicode under MySQL\n mysqlUseUnicode = Boolean.valueOf(JiveGlobals.getXMLProperty(\"database.mysql.useUnicode\")).booleanValue();\n try {\n if (minCons != null) {\n minConnections = Integer.parseInt(minCons);\n }\n if (maxCons != null) {\n maxConnections = Integer.parseInt(maxCons);\n }\n if (conTimeout != null) {\n connectionTimeout = Double.parseDouble(conTimeout);\n }\n }\n catch (Exception e) {\n Log.error(\"Error: could not parse default pool properties. \" +\n \"Make sure the values exist and are correct.\", e);\n }\n }",
"private void loadProperties() {\n\t\t\n\t\tString fldr = env.getProperty(\"response.folder\");\n\t\tthis.repo.setRootFolder( new File(fldr));;\n\t\t\n\t\tint nthConfigItem = 1;\n\t\twhile(true) {\n\t\t\tString seq = (\"\"+nthConfigItem++).trim();\n\t\t\t\n\t\t\tString xpathPropName = \"request.\" + seq + \".xpath\";\n\t\t\tString responseTextFilePropName = \"request.\" + seq + \".response.file\";\n\t\t\tString xpath = env.getProperty(xpathPropName);\n\t\t\tString responseTextFileName = env.getProperty(responseTextFilePropName);\n\t\t\tif (xpath!=null && !\"\".equals(xpath.trim())\n\t\t\t\t&& responseTextFileName!=null & !\"\".equals(responseTextFileName.trim())\t) {\n\t\t\t\t\n\t\t\t\trepo.addFile(xpath, responseTextFileName);\n\t\t\t\tController.logAlways(\"Loading config item [\" + seq + \"] xpath: [\" + rpad(xpath, 60) + \"] data file: [\" + rpad(responseTextFileName,25) + \"]\" );\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tController.logAlways(\"End of littleMock initialization. No more properties from application.properties will be loaded because either [\" + xpathPropName + \"] or [\" + responseTextFilePropName + \"] was not found in application.properties.\");\n\t\t\t\t//parameters in application.properties must be\n\t\t\t\t//in sequential order, starting at 1.\n\t\t\t\t//When we discover the first missing one, stop looking for more.\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\thumanReadableConfig = PlaybackRepository.SINGLETON.humanReadable();\n\t}",
"public static void loadProperties(String filename) {\n\n if (filename.equals(\"\")) {\n return;\n }\n propfilename = userhome + FS + filename;\n File f = new File(propfilename);\n if (f.exists()) {\n //loadProperties(propfilename);\n } else {\n propfilename = userhome + FS + \"Properties\" + FS + filename;\n f = new File(propfilename);\n if (f.exists()) {\n //loadProperties(propfilename);\n }\n }\n\n try {\n try (FileInputStream i = new FileInputStream(propfilename)) {\n prop.load(i);\n //prtProperties();\n }\n } catch (FileNotFoundException e) {\n System.out.println(\" ** Properties file not found=\" + propfilename + \" userhome=\" + userhome + \" \" + System.getProperty(\"user.home\"));\n saveProperties();\n } catch (IOException e) {\n System.out.println(\"IOException reading properties file=\" + propfilename);\n System.exit(1);\n }\n }",
"private void loadLocalConfig()\n {\n try\n {\n // Load the system config file.\n URL fUrl = Config.class.getClassLoader().getResource( PROP_FILE );\n config.setDelimiterParsingDisabled( true );\n if ( fUrl == null )\n {\n String error = \"static init: Error, null cfg file: \" + PROP_FILE;\n LOG.warn( error );\n }\n else\n {\n LOG.info( \"static init: found from: {} path: {}\", PROP_FILE, fUrl.getPath() );\n config.load( fUrl );\n LOG.info( \"static init: loading from: {}\", PROP_FILE );\n }\n\n URL fUserUrl = Config.class.getClassLoader().getResource( USER_PROP_FILE );\n if ( fUserUrl != null )\n {\n LOG.info( \"static init: found user properties from: {} path: {}\", USER_PROP_FILE, fUserUrl.getPath() );\n config.load( fUserUrl );\n }\n }\n catch ( org.apache.commons.configuration.ConfigurationException ex )\n {\n String error = \"static init: Error loading from cfg file: [\" + PROP_FILE\n + \"] ConfigurationException=\" + ex;\n LOG.error( error );\n throw new CfgRuntimeException( GlobalErrIds.FT_CONFIG_BOOTSTRAP_FAILED, error, ex );\n }\n }",
"public static void loadPropertyFile() {\r\n\t\t\r\n\t\tif (loaded) {\r\n\t\t\tthrow new IllegalStateException(\"Properties have already been loaded!\"); \r\n\t\t}\r\n\t\tloaded = true; \r\n\t\t\r\n\t\t// if property file was specified, use it instead of standard property\r\n\t\t// file\r\n\r\n\t\tString file = STANDARD_PROPERTY_FILE;\r\n\r\n\t\tif (System.getProperty(PROPERTY_WHERE_TO_FIND_PROPERTY_FILE) != null\r\n\t\t\t\t&& System.getProperty(PROPERTY_WHERE_TO_FIND_PROPERTY_FILE)\r\n\t\t\t\t\t\t.length() != 0) {\r\n\t\t\tfile = System.getProperty(PROPERTY_WHERE_TO_FIND_PROPERTY_FILE);\r\n\t\t}\r\n\r\n\t\t// load property file\r\n\t\ttry {\r\n\t\t\tProperties props = System.getProperties();\r\n\t\t\tprops.load(ClassLoader.getSystemResourceAsStream(file));\r\n\t\t\tSystem.setProperties(props);\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new RuntimeException(\"Property file was not found: \" + file\r\n\t\t\t\t\t+ \"! It must be located in the CLASSPATH and \"\r\n\t\t\t\t\t+ \"either be named 'chord.properties' or its name \"\r\n\t\t\t\t\t+ \"be specified by -Dchord.properties.file='filename'\", e);\r\n\t\t} catch (NullPointerException e) {\r\n\t\t\tthrow new RuntimeException(\"Property file was not found: \" + file\r\n\t\t\t\t\t+ \"! It must be located in the CLASSPATH and \"\r\n\t\t\t\t\t+ \"either be named 'chord.properties' or its name \"\r\n\t\t\t\t\t+ \"be specified by -Dchord.properties.file='filename'\", e);\r\n\t\t}\r\n\r\n\t}",
"private static void loadPropertiesFile() {\n checkNotNull(propertyFileName, \"propertyFileName cannot be null\");\n String currentDir = new File(\"\").getAbsolutePath();\n propertyFile = currentDir + \"/\" + propertyFileName;\n File propFile = new File(propertyFile);\n try {\n propFile.createNewFile();\n } catch (IOException ex) {\n Debugger.logMessage(ex);\n }\n\n props = new Properties();\n try {\n FileInputStream fis = new FileInputStream(propertyFile);\n props.load(fis);\n fis.close();\n } catch (IOException ex) {\n Debugger.logMessage(ex);\n }\n }",
"private void init() {\n\t\tif ( PropertiesConfigurationFilename == null ) {\n\t\t\tlogger.info(\"config.properties is default\");\n\t\t\tconfigProp = createDefaultProperties();\n\t\t} else {\n\t\t\ttry {\n\t\t\t\tlogger.info(\"config.properties is \"+ PropertiesConfigurationFilename.getAbsolutePath());\n\t\t\t\tconfigProp = new PropertiesConfiguration();\n\t\t\t\tconfigProp.load(PropertiesConfigurationFilename);\n\t\t\t} catch (ConfigurationException e) {\n\t\t\t\tlogger.error(\"Unable to open config file: \" + PropertiesConfigurationFilename.getAbsolutePath(), e);\n\t\t\t\tlogger.info(\"config.properties is default\");\n\t\t\t\tconfigProp = createDefaultProperties();\n\t\t\t}\n\t\t}\n\n\n\t\t// Load the locale information\n\t\tString locale = configProp.getString(\"locale\");\n\n\t\tconfigProp.setProperty(\"zmMsg\", ResourceBundle.getBundle(\"ZmMsg\", new Locale(locale)));\n\n\t\tconfigProp.setProperty(\"zhMsg\", ResourceBundle.getBundle(\"ZhMsg\", new Locale(locale)));\n\n\t\tconfigProp.setProperty(\"ajxMsg\", ResourceBundle.getBundle(\"AjxMsg\", new Locale(locale)));\n\n\t\tconfigProp.setProperty(\"i18Msg\", ResourceBundle.getBundle(\"I18nMsg\", new Locale(locale)));\n\n\t\tconfigProp.setProperty(\"zsMsg\", ResourceBundle.getBundle(\"ZsMsg\", new Locale(locale)));\n\n\t}",
"private Properties loadProperties() {\n Properties properties = new Properties();\n try {\n properties.load(getClass().getResourceAsStream(\"/config.properties\"));\n } catch (IOException e) {\n throw new WicketRuntimeException(e);\n }\n return properties;\n }",
"public ConfigFileReader(){\r\n\t\t \r\n\t\t BufferedReader reader;\r\n\t\t try {\r\n\t\t\t reader = new BufferedReader(new FileReader(propertyFilePath));\r\n\t\t\t properties = new Properties();\r\n\t\t\t try {\r\n\t\t\t\t properties.load(reader);\r\n\t\t\t\t reader.close();\r\n\t\t\t } catch (IOException e) {\r\n\t\t\t\t e.printStackTrace();\r\n\t\t\t }\r\n\t\t } catch (FileNotFoundException e) {\r\n\t\t\t e.printStackTrace();\r\n\t\t\t throw new RuntimeException(\"configuration.properties not found at \" + propertyFilePath);\r\n\t \t } \r\n\t }",
"public void read() {\n\t\tconfigfic = new Properties();\n\t\tInputStream input = ConfigReader.class.getClassLoader().getResourceAsStream(\"source/config.properties\");\n\t\t// on peut remplacer ConfigReader.class par getClass()\n\t\ttry {\n\t\t\tconfigfic.load(input);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public static void processConfig() {\r\n\t\tLOG.info(\"Loading Properties from {} \", propertiesPath);\r\n\t\tLOG.info(\"Opening configuration file ({})\", propertiesPath);\r\n\t\ttry {\r\n\t\t\treadPropertiesFile();\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tLOG.error(\r\n\t\t\t\t\t\"Monitoring system encountered an error while processing config file, Exiting\",\r\n\t\t\t\t\te);\r\n\t\t}\r\n\t}",
"private void getPropValues() {\n Properties prop = new Properties();\n \n InputStream inputStream = getClass().getClassLoader().getResourceAsStream(propFileName);\n try {\n prop.load(inputStream);\n } catch (IOException ex) {\n Logger.getLogger(PropResources.class.getName()).log(Level.SEVERE, null, ex);\n }\n if (inputStream == null) {\n try {\n throw new FileNotFoundException(\"ERROR: property file '\" + propFileName + \"' not found in the classpath\");\n } catch (FileNotFoundException ex) {\n Logger.getLogger(PropResources.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n // get property values\n this.defaultDirectory = prop.getProperty(\"defaultDirectory\");\n this.topicsFile = this.defaultDirectory + prop.getProperty(\"topics\");\n this.scripturesFile = this.defaultDirectory + prop.getProperty(\"scriptures\");\n this.defaultJournalXML = this.defaultDirectory + prop.getProperty(\"defaultJournalXML\");\n this.defaultJournalTxt = this.defaultDirectory + prop.getProperty(\"defaultJournalTxt\");\n }",
"private static void loadConfig()\n\t{\n\t\ttry\n\t\t{\n\t\t\tfinal Properties props = ManagerServer.loadProperties(ManagerServer.class, \"/resources/conf.properties\");\n\t\t\tasteriskIP = props.getProperty(\"asteriskIP\");\n\t\t\tloginName = props.getProperty(\"userName\");\n\t\t\tloginPwd = props.getProperty(\"password\");\n\t\t\toutboundproxy = props.getProperty(\"outBoundProxy\");\n\t\t\tasteriskPort = Integer.parseInt(props.getProperty(\"asteriskPort\"));\n\t\t}\n\t\tcatch (IOException ex)\n\t\t{\n\t\t\tLOG.error(\"IO Exception while reading the configuration file.\", ex);\n\t\t}\n\t}",
"public ReadPropertyFile()\n\t{\n\t prob = new Properties(); \n\t \n\t try\n\t {\n\t FileInputStream fis = new FileInputStream(\".//config.properties\");\n\t prob.load(fis);\n\t }\n\t catch(FileNotFoundException e)\n\t {\n\t\t System.out.println(e.getMessage());\n\t }\n catch(IOException e)\n\t {\n \t System.out.println(e.getMessage());\n\t }\n\t}",
"private final static void getProp() {\n try(InputStream fis = ConnectionBDD.class.getClassLoader().getResourceAsStream(\"conf.properties\")){\n \n props.load(fis);\n \n Class.forName(props.getProperty(\"jdbc.driver.class\"));\n \n url = props.getProperty(\"jdbc.url\");\n login = props.getProperty(\"jdbc.login\");\n password = props.getProperty(\"jdbc.password\");\n \n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (FileNotFoundException e1) {\n e1.printStackTrace();\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n }",
"public ConfigFileReader(){\r\n\t\tBufferedReader reader;\r\n\t\ttry {\r\n\t\t\treader = new BufferedReader(new FileReader(propertyFilePath));\r\n\t\t\tproperties = new Properties();\r\n\t\t\ttry {\r\n\t\t\t\tproperties.load(reader);\r\n\t\t\t\treader.close();\r\n\t\t\t}catch(IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}catch(FileNotFoundException ex) {\r\n\t\t\tSystem.out.println(\"Configuration.properties not found at \"+propertyFilePath);\r\n\t\t}\r\n\t}",
"private static Properties loadOverrideProperties() {\n String confFile = System.getProperty(HAPI_PROPERTIES);\n if(confFile != null) {\n try {\n Properties props = new Properties();\n props.load(new FileInputStream(confFile));\n return props;\n }\n catch (Exception e) {\n throw new ConfigurationException(\"Could not load HAPI properties file: \" + confFile, e);\n }\n }\n\n return null;\n }",
"public ReadConfigProperty() {\n\n\t\ttry {\n\t\t\tString filename = \"com/unitedcloud/resources/config.properties\";\n\t\t\tinput = ReadConfigProperty.class.getClassLoader().getResourceAsStream(filename);\n\t\t\tif (input == null) {\n\t\t\t\tSystem.out.println(\"Sorry, unable to find \" + filename);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tprop = new Properties();\n\t\t\tprop.load(input);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private static void loadConfig() throws IOException { \t\t\n final InputStream input = Main.class.getResourceAsStream(\"/configuration.properties\");\n final Properties prop = new Properties();\n \n prop.load(input);\n System.out.println(\"Configuration loaded:\"); \n\n // PostgreSQL server access config\n dbmsUrl = prop.getProperty(\"dbms_url\");\n System.out.println(\"- dbms_url: \" + dbmsUrl);\n\n dbmsUser = prop.getProperty(\"dbms_user\");\n System.out.println(\"- dbms_user: \" + dbmsUser);\n\n userPw = prop.getProperty(\"user_pw\"); \n System.out.println(\"- user_pw: \" + userPw);\n\n\n // Benchmarks config\n noTransactions = Integer.parseInt(prop.getProperty(\"no_transactions\"));\n System.out.println(\"- no_transactions: \" + noTransactions);\n\n noStatementsPerTransaction = Integer.parseInt(prop.getProperty(\"no_statements_per_transaction\")); \n System.out.println(\"- no_statements_per_transaction: \" + noStatementsPerTransaction);\n\n noSelectStatements = Integer.parseInt(prop.getProperty(\"no_select_statements\")); \n System.out.println(\"- no_select_statements: \" + noSelectStatements + \"\\n\");\n\n input.close();\n }",
"private void initProperties()\r\n {\r\n try\r\n {\r\n properties.load(new FileInputStream(propertiesURL));\r\n }\r\n catch (IOException ex)\r\n {\r\n log.log(DEBUG,\"\"+ex);\r\n } \r\n }",
"public Properties initProperties() {\r\n\t\tprop = new Properties();\r\n\t\ttry {\r\n\t\t\tFileInputStream fis = new FileInputStream(\"./src/main/java/com/automation/qe/config/config.properties\");\r\n\t\t\tprop.load(fis);\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\treturn prop;\r\n\t}",
"public static void loadProperties() {\n properties = new Properties();\n try {\n File f = new File(\"system.properties\");\n if (!(f.exists())) {\n OutputStream out = new FileOutputStream(f);\n }\n InputStream is = new FileInputStream(f);\n properties.load(is);\n lastDir = getLastDir();\n if (lastDir == null) {\n lastDir = \"~\";\n setLastDir(lastDir);\n }\n properties.setProperty(\"lastdir\", lastDir);\n\n // Try loading properties from the file (if found)\n properties.load(is);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void IntialProperties() {\r\n Properties prop = new Properties();\r\n try (FileInputStream input = new FileInputStream(\"./config.properties\")) {\r\n prop.load(input);\r\n generate = prop.getProperty(\"generate\");\r\n solve = prop.getProperty(\"algorithm\");\r\n setChanged();\r\n notifyObservers(\"prop\");\r\n } catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n }",
"private static Properties setup() {\n Properties props = System.getProperties();\n try {\n props.load(new FileInputStream(new File(\"src/config.properties\")));\n } catch (Exception e) {\n e.printStackTrace();\n System.exit(-1);\n }\n return props;\n }",
"private void LoadConfigFromClasspath() throws IOException \n {\n InputStream is = this.getClass().getClassLoader().getResourceAsStream(\"lrs.properties\");\n config.load(is);\n is.close();\n\t}",
"private void init(String propFilePath) {\n properties = new Properties();\n try {\n properties.load(new FileInputStream(new File(propFilePath)));\n } catch (FileNotFoundException e1) {\n logger.error(\"External properties file not found!\", e1);\n System.exit(1);\n } catch (IOException e2) {\n logger.error(\"Error while reading External properties file!\", e2);\n System.exit(1);\n }\n }",
"@BeforeSuite\n\tpublic void propertiesFileReader(){\n\t\tif(prop == null){\t\t\t\n\t\t\tprop = new Properties();\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t * if(strEnvironment.equalsIgnoreCase(\"qa\")){ prop.load(new\n\t\t\t\t * FileInputStream(qaProperty)); }else\n\t\t\t\t * if(strEnvironment.equalsIgnoreCase(\"stage\")){ prop.load(new\n\t\t\t\t * FileInputStream(stagProperty)); }else\n\t\t\t\t * if(strEnvironment.equalsIgnoreCase(\"prod\")){ prop.load(new\n\t\t\t\t * FileInputStream(prodProperty)); }\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\tif(strEnvironment.equalsIgnoreCase(\"qa\")) \n\t\t\t\t\tFileUtils.copyFile(new File(qaProperty), new File(defaultProperty));\n\t\t\t\tif(strEnvironment.equalsIgnoreCase(\"stage\"))\n\t\t\t\t\tFileUtils.copyFile(new File(stagProperty), new File(defaultProperty));\n\t\t\t\tif(strEnvironment.equalsIgnoreCase(\"prod\"))\n\t\t\t\t\tFileUtils.copyFile(new File(prodProperty), new File(defaultProperty));\n\t\t\t\t\n\t\t\t\tprop.load(new FileInputStream(defaultProperty));\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"user + pass [\"+prop.getProperty(\"username\")+\"===\"+prop.getProperty(\"password\"));\n\t\t\t\t\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public static void loadProperties(Properties p, String fileName)throws IOException {\n ClassLoader classLoader = ClassLoader.getSystemClassLoader();\n URL f = classLoader.getResource(fileName);\n FileInputStream fr = new FileInputStream(new File(fileName));\n p.load(fr);\n fr.close();\n }",
"public void setConfiguration(Properties props);",
"void load() {\n\t\ttry {\n\t\t\tfinal FileInputStream fis = new FileInputStream(propertyFile);\n\t\t\tfinal Properties newProperties = new Properties();\n\t\t\tnewProperties.load(fis);\n\t\t\ttimeLastRead = propertyFile.lastModified();\n\t\t\tproperties = newProperties;\n\t\t\tfis.close();\n\t\t} catch (final Exception e) {\n\t\t\tlogger.info(\"Property file \" + propertyFile + \" \" + e.getMessage());\n\t\t}\n\t}",
"private Config()\n {\n // Load from properties file:\n loadLocalConfig();\n // load the system property overrides:\n getExternalConfig();\n }",
"private Properties loadProperties(String fileName){\r\n\t\t\r\n\t\tProperties prop = new Properties();\r\n\t\tInputStream input = null;\r\n\r\n\t\ttry {\r\n\r\n\t\t\tinput = new FileInputStream(fileName);\r\n\t\t\tprop.load(input);\r\n\r\n\t\t} catch (IOException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tif (input != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tinput.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn prop;\t \r\n\t}",
"public Properties() {\n\n\t\tconfig = new java.util.Properties();\n\n\t\ttry {\n\t\t\tInputStream input = new FileInputStream(new File(\n\t\t\t\t\t\"ConfigurationFile.txt\"));\n\t\t\tconfig.load(input);\n\n\t\t} catch (Exception e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"public void init(){\n\t\tif(prop==null){\r\n\t\t\tprop=new Properties();\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tFileInputStream fs = new FileInputStream(System.getProperty(\"user.dir\")+\"//src//test//resources//projectconfig.properties\");\r\n\t\t\t\tprop.load(fs);\r\n\t\t\t\t\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\t\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static void loadConfigurationFile() throws IOException {\n\t\tFileInputStream fis= new FileInputStream(\"config.properties\");\n\t\tprop.load(fis);\n\t}",
"public ReadConfig() \n\t{\n\t\tFile scr = new File(\"./Configuration/config.properties\"); //property file\n\n\t\tFileInputStream fis;\n\t\ttry {\n\t\t\tfis = new FileInputStream(scr); // READ the DATA (read mode)\n\t\t\tpro = new Properties(); // pro object\n\t\t\tpro.load(fis); // Load method -load at the \n\n\t\t} catch (final Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(\"Except is \" + e.getMessage());\n\t\t} \n\t}",
"public ReadConfigFile (){\n\t\ttry {\n\t\t\tinput = ReadConfigFile.class.getClassLoader().getResourceAsStream(Constant.CONFIG_PROPERTIES_DIRECTORY);\n\t\t\tprop = new Properties();\n\t\t\tprop.load(input);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}catch ( IOException e ) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\t\t\n\t}",
"private static Properties loadProperties() {\n Properties properties;\n try (InputStream in = FHIRServerProperties.class.getClassLoader().getResourceAsStream(HAPI_PROPERTIES)) {\n properties = new Properties();\n properties.load(in);\n } catch (Exception e) {\n throw new ConfigurationException(\"Could not load HAPI properties\", e);\n }\n\n Properties overrideProps = loadOverrideProperties();\n if (overrideProps != null) {\n properties.putAll(overrideProps);\n }\n return properties;\n }",
"public Properties loadConfiguration(ServletContext context) {\n if (context == null) {\n String gripe = \"Error attempting to create a loadConfiguration from a null ServletContext!\";\n LOG.error(gripe);\n throw new IllegalArgumentException(gripe);\n }\n\n Properties properties = new Properties();\n\n // now apply our systemic defaults, then allow user to override\n applyDefaultConfiguration(context, properties);\n\n String defaultUserDirective = properties.getProperty(\"userdirective\");\n\n /*\n if the user has specified an external velocity configuration file, we'll want to search for it in the\n following order\n\n 1. relative to the context path\n 2. relative to /WEB-INF\n 3. in the class path\n */\n String configfile;\n\n if (customConfigFile != null) {\n configfile = customConfigFile;\n } else {\n configfile = \"velocity.properties\";\n }\n configfile = configfile.trim();\n\n InputStream in = null;\n String resourceLocation = null;\n\n try {\n if (context.getRealPath(configfile) != null) {\n // 1. relative to context path, i.e. /velocity.properties\n String filename = context.getRealPath(configfile);\n\n if (filename != null) {\n File file = new File(filename);\n\n if (file.isFile()) {\n resourceLocation = file.getCanonicalPath() + \" from file system\";\n in = new FileInputStream(file);\n }\n\n // 2. if nothing was found relative to the context path, search relative to the WEB-INF directory\n if (in == null) {\n file = new File(context.getRealPath(\"/WEB-INF/\" + configfile));\n\n if (file.isFile()) {\n resourceLocation = file.getCanonicalPath() + \" from file system\";\n in = new FileInputStream(file);\n }\n }\n }\n }\n\n // 3. finally, if there's no physical file, how about something in our classpath\n if (in == null) {\n in = VelocityManager.class.getClassLoader().getResourceAsStream(configfile);\n if (in != null) {\n resourceLocation = configfile + \" from classloader\";\n }\n }\n\n // if we've got something, load 'er up\n if (in != null) {\n LOG.info(\"Initializing velocity using {}\", resourceLocation);\n properties.load(in);\n }\n } catch (IOException e) {\n LOG.warn(\"Unable to load velocity configuration {}\", resourceLocation, e);\n } finally {\n if (in != null) {\n try {\n in.close();\n } catch (IOException ignore) {\n }\n }\n }\n\n // overide with programmatically set properties\n if (velocityProperties != null) {\n for (Object o : velocityProperties.keySet()) {\n String key = (String) o;\n properties.setProperty(key, this.velocityProperties.getProperty(key));\n }\n }\n\n String userdirective = properties.getProperty(\"userdirective\");\n if (userdirective == null || userdirective.trim().isEmpty()) {\n userdirective = defaultUserDirective;\n } else {\n userdirective = userdirective.trim() + \",\" + defaultUserDirective;\n }\n properties.setProperty(\"userdirective\", userdirective);\n\n // for debugging purposes, allows users to dump out the properties that have been configured\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Initializing Velocity with the following properties ...\");\n\n for (Object o : properties.keySet()) {\n String key = (String) o;\n String value = properties.getProperty(key);\n LOG.debug(\" '{}' = '{}'\", key, value);\n }\n }\n\n return properties;\n }",
"void readProperties(java.util.Properties p) {\n }",
"public void loadObject() {\n\n obj = new Properties();\n try {\n obj.load(new FileInputStream(\"./src/test/resources/config.properties\"));\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }",
"private void loadPropertiesFromFile(String propertiesFileName) {\t\t\n\t\tif ( (propertiesFileName != null) && !(propertiesFileName.isEmpty()) ) {\n\t\t\tpropertiesFileName = config_file_name;\n\t \t\ttry {\n\t \t\t\t// FileInputStream lFis = new FileInputStream(config_file_name);\n\t \t\t\t// FileInputStream lFis = getServletContext().getResourceAsStream(config_file_name);\n\t \t\t\tInputStream lFis = Thread.currentThread().getContextClassLoader().getResourceAsStream(\"config.properties\");\n\t \t\t\tif (lFis != null) {\n\t\t \t\t\tProperties lConnectionProps = new Properties();\n\t\t \t\t\tlConnectionProps.load(lFis);\n\t\t \t\t\tlFis.close();\n\t\t \t\t\tlLogger.info(DEBUG_PREFIX + \"Using configuration file \" + config_file_name);\n\t\t \t\t\tif ( lConnectionProps.getProperty(\"SsoServiceNname\") != null) ssosvc_name = lConnectionProps.getProperty(\"SsoServiceNname\");\n\t\t \t\t\tif ( lConnectionProps.getProperty(\"SsoServiceLabel\") != null) ssosvc_label = lConnectionProps.getProperty(\"SsoServiceLabel\");\n\t\t \t\t\tif ( lConnectionProps.getProperty(\"SsoServicePlan\") != null) ssosvc_plan = lConnectionProps.getProperty(\"SsoServicePlan\");\n\t\t \t\t\tif ( lConnectionProps.getProperty(\"SsoServiceCredential\") != null) ssosvc_cred_clientId = lConnectionProps.getProperty(\"SsoServiceCredential_clientId\");\n\t\t \t\t\tif ( lConnectionProps.getProperty(\"SsoServiceCredential\") != null) ssosvc_cred_secret = lConnectionProps.getProperty(\"SsoServiceCredential_secret\");\n\t\t \t\t\tif ( lConnectionProps.getProperty(\"SsoServiceCredential\") != null) ssosvc_cred_serverSupportedScope = lConnectionProps.getProperty(\"SsoServiceCredential_serverSupportedScope\");\n\t\t\tlLogger.info(DEBUG_PREFIX + \"CONFIG FILE parsing, found Scopes = \" + ssosvc_cred_serverSupportedScope + \" for service name = \" + ssosvc_name);\t\n\t\t\t Pattern seperators = Pattern.compile(\".*\\\\[ *(.*) *\\\\].*\");\n\t\t\t if (seperators != null) {\n\t\t\t \tMatcher scopeMatcher = seperators.matcher(ssosvc_cred_serverSupportedScope);\n\t\t\t\t scopeMatcher.find();\n\t\t\t\t ssosvc_cred_serverSupportedScope = scopeMatcher.group(1); // only get the first occurrence\n\t\t\t\t lLogger.info(DEBUG_PREFIX + \"CONFIG FILE parsing, retrieved first Scope = \" + ssosvc_cred_serverSupportedScope);\n\t\t\t }\n\t \t\t\tif ( lConnectionProps.getProperty(\"SsoServiceCredential\") != null) ssosvc_cred_issuerIdentifier = lConnectionProps.getProperty(\"SsoServiceCredential_issuerIdentifier\");\n\t\t \t\t\tif ( lConnectionProps.getProperty(\"SsoServiceCredential\") != null) ssosvc_cred_tokenEndpointUrl = lConnectionProps.getProperty(\"SsoServiceCredential_tokenEndpointUrl\");\n\t\t \t\t\tif ( lConnectionProps.getProperty(\"SsoServiceCredential\") != null) ssosvc_cred_authorizationEndpointUrl = lConnectionProps.getProperty(\"SsoServiceCredential_authorizationEndpointUrl\");\n\t\n\t\t \t\t\tlLogger.info(DEBUG_PREFIX + \"Using config for SSO Service with name \" + ssosvc_name);\n\t \t\t\t} else {\n\t \t\t\t\tlLogger.severe(DEBUG_PREFIX + \"Configuration file not found! Using default settings.\");\n\t \t\t\t}\n\n\t \t\t} catch (FileNotFoundException e) {\n\t \t\t\tlLogger.severe(DEBUG_PREFIX + \"Configuration file = \" + config_file_name + \" not found! Using default settings.\");\n\t \t\t\te.printStackTrace();\n\t \t\t} catch (IOException e) {\n\t \t\t\tlLogger.severe(\"SF-DEBUG: Configuration file = \" + config_file_name + \" not readable! Using default settings.\");\n\t \t\t\te.printStackTrace();\n\t \t\t}\n\t \t} else {\n\t \t\tlLogger.info(DEBUG_PREFIX + \"Configuration file = \" + config_file_name + \" not found! Using default settings.\");\n\t \t}\n\t}",
"public Properties init_prop() {\n\t\tprop = new Properties();\n\t\tString path = null;\n\t\tString env = null;\n\n\t\ttry {\n\n\t\t\tenv = System.getProperty(\"env\");\n\t\t\tSystem.out.println(\"Running on Envirnment: \" + env);\n\n\t\t\tif (env == null) {\n\t\t\t\tSystem.out.println(\"Default Envirnment: \" + \"PROD\");\n\t\t\t\tpath = \"D:\\\\Rupali\\\\Workspace\\\\HubSpotFramework\\\\src\\\\main\\\\java\\\\com\\\\qa\\\\hubspot\\\\config\\\\Config.prod.properties\";\n\n\t\t\t} else {\n\t\t\t\tswitch (env) {\n\t\t\t\tcase \"qa\":\n\t\t\t\t\tpath = \"D:\\\\Rupali\\\\Workspace\\\\HubSpotFramework\\\\src\\\\main\\\\java\\\\com\\\\qa\\\\hubspot\\\\config\\\\Config.qa.properties\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"dev\":\n\t\t\t\t\tpath = \"D:\\\\Rupali\\\\Workspace\\\\HubSpotFramework\\\\src\\\\main\\\\java\\\\com\\\\qa\\\\hubspot\\\\config\\\\Config.dev.properties\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"stage\":\n\t\t\t\t\tpath = \"D:\\\\Rupali\\\\Workspace\\\\HubSpotFramework\\\\src\\\\main\\\\java\\\\com\\\\qa\\\\hubspot\\\\config\\\\Config.stage.properties\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"prod\":\n\t\t\t\t\tpath = \"D:\\\\Rupali\\\\Workspace\\\\HubSpotFramework\\\\src\\\\main\\\\java\\\\com\\\\qa\\\\hubspot\\\\config\\\\Config.prod.properties\";\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out.println(\"Please Pass the Correct Env Value...\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tFileInputStream finput = new FileInputStream(path);\n\t\t\tprop.load(finput);\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn prop;\n\t}",
"public void readProperties() {\r\n File directory = new File(OptionItems.XML_DEFINITION_PATH);\r\n if (directory.exists()) {\r\n propertyParserXML.readPropertyDefinition(configData.getPropertyList());\r\n propertyParserXML.processPropertyDependency();\r\n }\r\n Log.info(\"info.progress_control.load_property_description\");\r\n }",
"public static void loadPropertyFile() throws IOException {\n\t\tPropertyFileReader.property = new Properties();\n\t\tPropertyFileReader.targetPlatform = System.getProperty(\"targetPlatform\");\n\t\tPropertyFileReader.targetDevice = System.getProperty(\"targetDevice\");\n\n\t\t// Load the property file based on platform and device\n\n\t\tif (PropertyFileReader.targetPlatform.equalsIgnoreCase(\"android\")) {\n\t\t\tfinal File file = new File(String.valueOf(System.getProperty(\"user.dir\"))\n\t\t\t\t\t+ \"\\\\src\\\\main\\\\resources\\\\testdata\\\\\" + PropertyFileReader.targetPlatform + \"\\\\\"\n\t\t\t\t\t+ PropertyFileReader.targetDevice + \"\\\\capabilities.properties\");\n\t\t\tPropertyFileReader.filereader = new FileReader(file);\n\t\t\tPropertyFileReader.property.load(PropertyFileReader.filereader);\n\t\t}\n\n\t\tif (PropertyFileReader.targetPlatform.equalsIgnoreCase(\"iOS\")) {\n\t\t\t// To do in case of iOS\n\t\t}\n\t}",
"public final void loadPropertiesFromFile(final String fileName)\n {\n\n Properties tempProp = PropertyLoader.loadProperties(fileName);\n fProp.putAll(tempProp);\n\n }",
"@Test\n public void testCreateFromProperties_Properties() throws Exception {\n System.out.println(\"createFromProperties\");\n Properties props = new Properties();\n props.load(Thread.currentThread().getContextClassLoader().getResourceAsStream(propertiesName));\n EngineConfiguration result = EngineConfiguration.createFromProperties(props);\n assertProperties(result);\n }",
"@BeforeClass\n\tpublic void readConfig() {\n\t\t// object creation of properties file\n\n\t\tProperties prop = new Properties();\n\n\t\t// read the file: inputstream\n\n\t\ttry {\n\t\t\tInputStream input = new FileInputStream(\"\\\\src\\\\main\\\\java\\\\config\\\\config.properties\");\n\t\t\tprop.load(input);\n\t\t\tbrowser = prop.getProperty(\"browser\");\n\t\t//\turl = prop.getProperty(\"url\");\n\t\t\t\n\t\t}\n\n\t\tcatch (IOException e) {\n\n\t\t\te.printStackTrace();\n\n\t\t}\n\t}",
"private static Properties loadProperties() throws SystemException {\r\n final Properties result;\r\n try {\r\n result = getProperties(PROPERTIES_DEFAULT_FILENAME);\r\n }\r\n catch (final IOException e) {\r\n throw new SystemException(\"properties not found.\", e);\r\n }\r\n if (LOGGER.isDebugEnabled()) {\r\n LOGGER.debug(\"Default properties: \" + result);\r\n }\r\n Properties specific;\r\n try {\r\n specific = getProperties(PROPERTIES_FILENAME);\r\n }\r\n catch (final IOException e) {\r\n specific = new Properties();\r\n if (LOGGER.isDebugEnabled()) {\r\n LOGGER.debug(\"Error on loading specific properties.\", e);\r\n }\r\n }\r\n if (LOGGER.isDebugEnabled()) {\r\n LOGGER.debug(\"Specific properties: \" + specific);\r\n }\r\n result.putAll(specific);\r\n \r\n // Load constant properties\r\n Properties constant = new Properties();\r\n try {\r\n constant = getProperties(PROPERTIES_CONSTANT_FILENAME);\r\n }\r\n catch (final IOException e) {\r\n if (LOGGER.isWarnEnabled()) {\r\n LOGGER.warn(\"Error on loading contant properties.\");\r\n }\r\n if (LOGGER.isDebugEnabled()) {\r\n LOGGER.debug(\"Error on loading contant properties.\", e);\r\n }\r\n }\r\n if (LOGGER.isDebugEnabled()) {\r\n LOGGER.debug(\"Constant properties: \" + constant);\r\n }\r\n result.putAll(constant);\r\n \r\n if (LOGGER.isDebugEnabled()) {\r\n LOGGER.debug(\"Merged properties: \" + result);\r\n }\r\n // set Properties as System-Variables\r\n for (final Object o : result.keySet()) {\r\n final String key = (String) o;\r\n String value = result.getProperty(key);\r\n value = replaceEnvVariables(value);\r\n System.setProperty(key, value);\r\n }\r\n return result;\r\n }",
"public static Properties loadProperties(String filePath) throws MnoConfigurationException {\n\t\tProperties properties = new Properties();\n\t\tInputStream input = getInputStreamFromClassPathOrFile(filePath);\n\t\ttry {\n\t\t\tproperties.load(input);\n\t\t} catch (IOException e) {\n\t\t\tthrow new MnoConfigurationException(\"Could not load properties file: \" + filePath, e);\n\t\t}\n\t\treturn properties;\n\t}",
"private static ConfigImpl loadProperties(Path path) throws IOException {\n final ConfigImpl ret;\n try (FileInputStream stream = new FileInputStream(path.toFile())) {\n try (InputStreamReader reader = new InputStreamReader(stream, UTF_8)) {\n ret = loadProperties(reader);\n }\n }\n return ret;\n }",
"@PostConstruct\n\tpublic void loadProperties() {\n\t\tproperties.put(PropertyKey.TRANSLATION_FILE_STORE, \"C:\\\\development\\\\projects\\\\mega-translator\\\\store\");\n\t}",
"private void GetConfig()\n {\n boolean useClassPath = false;\n if(configFile_ == null)\n {\n useClassPath = true;\n configFile_ = \"data.config.lvg\";\n }\n // read in configuration file\n if(conf_ == null)\n {\n conf_ = new Configuration(configFile_, useClassPath);\n }\n }",
"public ConfigFile(String fileName, String encoding) {\n InputStream inputStream = null;\n try {\n inputStream = getClassLoader().getResourceAsStream(fileName); // properties.load(ConfigFile.class.getResourceAsStream(fileName));\n if (inputStream == null) {\n throw new IllegalArgumentException(\"Properties file not found in classpath: \" + fileName);\n }\n\n properties = new Properties();\n if (fileName.endsWith(\"yml\")){\n isYml = true;\n properties= new Yaml().loadAs(new InputStreamReader(inputStream, encoding),Properties.class);\n }else\n properties.load(new InputStreamReader(inputStream, encoding));\n } catch (IOException e) {\n throw new RuntimeException(\"Error loading properties file.\", e);\n } finally {\n if (inputStream != null) try {\n inputStream.close();\n } catch (IOException e) {\n LogKit.error(e.getMessage(), e);\n }\n }\n }",
"private Properties readProperties() throws IOException {\n\t\tProperties props = new Properties();\n\t\t\n\t\tFileInputStream in = new FileInputStream(\"Config.properties\");\n\t\tprops.load(in);\n\t\tin.close();\n\t\treturn props;\n\t}",
"public static void LoadIntoConfigFiles()\n {\n \tProperties prop = new Properties();\n ///*\n \ttry {\n \t\t//set the properties value\n \n prop.setProperty(\"comp_name\", \"Teledom International Ltd\");\n prop.setProperty(\"com_city\", \"Lagos\");\n \t\tprop.setProperty(\"State\", \"Lagos\");\n \t\tprop.setProperty(\"logo_con\", \"logo.png\");\n \t\tprop.setProperty(\"front_frame\", \"front.png\");\n prop.setProperty(\"back_frame\", \"back.png\");\n \n \n \n \n \t\t//save properties to project root folder\n \t\tprop.store(new FileOutputStream(setupFileName), null);\n \n \t} catch (IOException ex) {\n \t\tex.printStackTrace();\n }\n // */\n \n \n \n }",
"private Properties loadConfig(String baseFileName, String userPathParamName) throws IOException {\n\t\tString fileName = baseFileName + \".properties\";\n\t\tProperties properties = new Properties();\n\t\ttry (InputStream configStream = ApiInitializer.class.getClassLoader().getResourceAsStream(fileName)) {\n\t\t\tif (configStream != null) {\n\t\t\t\tproperties.load(configStream);\n\t\t\t}\n\t\t}\n\n\t\t// Then, override with whatever the user set up.\n\t\tString userFilePath = servletContext.getInitParameter(userPathParamName);\n\t\tif (userFilePath == null) {\n\t\t\tuserFilePath = \"WEB-INF/\" + baseFileName + \".properties\";\n\t\t} else {\n\t\t\tPath path = Paths.get(userFilePath, baseFileName + \".properties\");\n\t\t\tuserFilePath = path.toString();\n\t\t}\n\t\ttry (InputStream inStream = servletContext.getResourceAsStream(userFilePath);) {\n\t\t\tif (inStream != null) {\n\t\t\t\tproperties.load(inStream);\n\t\t\t}\n\t\t}\n\n\t\treturn properties;\n\t}",
"private void loadProperties(){\n try {\n input = new FileInputStream(fileName);\n properties.load(input);\n } catch (IOException e) {\n System.out.println(\"--- FAILED TO LOAD GAME ---\");\n e.printStackTrace();\n } finally {\n if (input != null) {\n try {\n input.close();\n } catch (IOException e) {\n System.out.println(\"--- FAILED TO CLOSE INTPUT ---\");\n e.printStackTrace();\n }\n }\n }\n }",
"public void getPropValues() throws IOException {\r\n try {\r\n Properties prop = new Properties();\r\n String path = System.getProperty(\"user.dir\") +\"\\\\src\\\\es\\\\udc\\\\redes\\\\webserver\\\\resources\\\\\";\r\n\t String filename = \"config.properties\";\r\n inputStream = new FileInputStream(path+filename);\r\n if (inputStream != null) {\r\n prop.load(inputStream);\r\n } else {\r\n\t\tthrow new FileNotFoundException(\"property file '\"+path + filename + \"' not found\");\r\n }\r\n\t // get the property value and set in attributes\r\n\t this.PORT = prop.getProperty(\"PORT\");\r\n this.DIRECTORY_INDEX = prop.getProperty(\"DIRECTORY_INDEX\");\r\n this.DIRECTORY = System.getProperty(\"user.dir\")+ prop.getProperty(\"DIRECTORY\");\r\n this.ALLOW = prop.getProperty(\"ALLOW\");\r\n this.HOSTNAME = prop.getProperty(\"HOSTNAME\");\r\n System.out.println();\r\n } catch (Exception e) {\r\n\t\tSystem.out.println(\"Exception: \" + e);\r\n\t} finally {\r\n\t\tinputStream.close();\r\n\t}\r\n }",
"public static void loadProperties() {\r\n\t\tif (!isLoaded) {\r\n\t\t\tnew BCProperties() ;\r\n\t\t\tisLoaded = true ;\r\n\t\t}\r\n\t}",
"private void parseConfig() throws CatascopiaException {\n\t\tthis.config = new Properties();\n\t\t//load config properties file\n\t\ttry {\t\t\t\t\n\t\t\tFileInputStream fis = new FileInputStream(JCATASCOPIA_AGENT_HOME + File.separator + CONFIG_PATH);\n\t\t\tconfig.load(fis);\n\t\t\tif (fis != null)\n\t \t\tfis.close();\n\t\t} \n\t\tcatch (FileNotFoundException e) {\n\t\t\tthrow new CatascopiaException(\"config file not found\", CatascopiaException.ExceptionType.FILE_ERROR);\n\t\t} \n\t\tcatch (IOException e) {\n\t\t\tthrow new CatascopiaException(\"config file parsing error\", CatascopiaException.ExceptionType.FILE_ERROR);\n\t\t}\n\t}",
"private Properties loadProperties(String propertyFile) {\n\t\toAuthProperties = new Properties();\n\t\ttry {\n\t\t\toAuthProperties.load(App.class.getResourceAsStream(propertyFile));\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Unable to read \" + propertyFile\n\t\t\t\t\t+ \" configuration. Make sure you have a properly formatted \" + propertyFile + \" file.\");\n\t\t\treturn null;\n\t\t}\n\t\treturn oAuthProperties;\n\t}",
"private void loadProperties() {\n Path path = getSamplePropertiesPath();\n LOG.info(\"Loading Properties from {}\", path.toString());\n try {\n FileInputStream fis = new FileInputStream(getSamplePropertiesPath().toFile());\n Properties properties = new Properties();\n properties.load(fis);\n\n String privateKey = properties.getProperty(PRIVATE_KEY);\n this.credentials = Credentials.create(privateKey);\n this.contract1Address = properties.getProperty(CONTRACT1_ADDRESS);\n this.contract2Address = properties.getProperty(CONTRACT2_ADDRESS);\n this.contract3Address = properties.getProperty(CONTRACT3_ADDRESS);\n this.contract4Address = properties.getProperty(CONTRACT4_ADDRESS);\n this.contract5Address = properties.getProperty(CONTRACT5_ADDRESS);\n this.contract6Address = properties.getProperty(CONTRACT6_ADDRESS);\n\n } catch (IOException ioEx) {\n // By the time we have reached the loadProperties method, we should be sure the file\n // exists. As such, just throw an exception to stop.\n throw new RuntimeException(ioEx);\n }\n }",
"private void loadPropertiesFile(String propertiesFile) {\n\n\t\t//open the properties file.\n\t\t_props = new Properties();\n\n\t\t//sanity check the properties file\n\t\tFile f = new File(propertiesFile);\n\t\tif (!f.canRead()) {\n\t\t\t//print an error - can't read the props file.\n\t\t\tSystem.err.println(\"Properties file \" + propertiesFile + \" cannot be read.\");\n\t\t}\n\n\t\ttry {\n\t\t\t_props.load(new FileInputStream(f));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void loadPropertyFile(String filename) {\n try (InputStream is = new FileInputStream(filename)) {\n properties.load(is);\n } catch (IOException x) {\n throw new IllegalArgumentException(x);\n }\n }",
"private synchronized void readProperties()\n {\n \n String workPath = \"webserver\";\n try\n {\n workPath = (String) SageTV.api(\"GetProperty\", new Object[]{\"nielm/webserver/root\",\"webserver\"});\n }\n catch (InvocationTargetException e)\n {\n System.out.println(e);\n }\n \n // check if called within 30 secs (to prevent to much FS access)\n if (fileLastReadTime + 30000 > System.currentTimeMillis())\n {\n return;\n }\n\n // check if file has recently been loaded\n File propsFile=new File(workPath,\"extenders.properties\");\n if (fileLastReadTime >= propsFile.lastModified())\n {\n return;\n }\n\n if (propsFile.canRead())\n {\n BufferedReader in = null;\n contextNames.clear();\n try\n {\n in = new BufferedReader(new FileReader(propsFile));\n String line;\n Pattern p = Pattern.compile(\"([^=]+[^=]*)=(.*)\");\n while (null != (line = in.readLine()))\n {\n line = line.trim();\n if ((line.length() > 0) && (line.charAt(0) != '#'))\n {\n Matcher m =p.matcher(line.trim());\n if (m.matches())\n {\n contextNames.put(m.group(1).trim(), m.group(2).trim());\n }\n else\n {\n System.out.println(\"Invalid line in \"+propsFile+\"\\\"\"+line+\"\\\"\");\n }\n }\n }\n fileLastReadTime=System.currentTimeMillis();\n\n }\n catch (IOException e)\n {\n System.out.println(\"Exception occurred trying to load properties file: \"+propsFile+\"-\" + e);\n }\n finally\n {\n if (in != null)\n {\n try\n {\n in.close();\n }\n catch (IOException e) {}\n }\n }\n } \n }",
"private void loadPropertyFile(InputStream stream) throws IOException{\n\t\tproperties = new Properties();\n\t\tproperties.load(stream);\n\t}",
"@Before(order=0)\n\tpublic void getProperty() {\n\t\tconfigReader = new ConfigReaders();\n\t\tprop = configReader.init_prop();\n\t\t\n\t}",
"public void loadProperties() throws IOException\n\t{\n\t\tFile src = new File(\"D://Selenium Stuff//Selenium Workspace//OpenCartL2_28112017//ObjectRepo.properties\");\n\t\tFileInputStream fis = new FileInputStream(src);\n\t\tpro = new Properties();\n\t\tpro.load(fis);\n\t}",
"static void getProps() throws Exception {\r\n\t\tFileReader fileReader = new FileReader(\"C:\\\\repos\\\\test\\\\src\\\\main\\\\java\\\\test\\\\config.properties\");\r\n\t\tProperties properties = new Properties();\r\n\r\n\t\tproperties.load(fileReader);\r\n\r\n\t\tSystem.out.println(\"By using File Reader: \" + properties.getProperty(\"username\"));\r\n\r\n\t}",
"public HistogramConfiguration loadProperties(String propertyFileName)\n {\n HistogramConfiguration histConfig = HistogramConfiguration.getInstance();\n\n try(FileInputStream inputStream = new FileInputStream(propertyFileName))\n {\n properties.load(inputStream);\n\n histConfig.setShouldIgnoreWhiteSpaces(loadShouldIgnoreWhiteSpace());\n histConfig.setIgnoreCharacters(loadIgnoredCharactersProperties());\n\n }catch (IOException e)\n {\n e.printStackTrace();\n }\n\n return histConfig;\n }",
"public PropertyManager() {\n propFileName = System.getProperty(\"user.home\") + File.separator +\n defPropFile;\n\n recentResult = loadPropertyFile(propFileName);\n }",
"private void GetRequiredProperties() {\r\n\r\n\r\n\t\t\r\n\t\tProperties prop = new Properties();\r\n\t\t\r\n try {\r\n \r\n File file = new File(fileToRead);\r\n \r\n if (file.exists()) {\r\n logger.info(\"Config file exists\");\r\n } else {\r\n logger.error(\"Exception :: GetRequiredProperties :: Config file not found\");\r\n throw new RuntimeException(\"Exception :: GetRequiredProperties :: Config file not found\");\r\n }\r\n \r\n prop.load(new FileInputStream(file));\r\n\r\n } catch (Exception e) {\r\n\r\n logger.error(\"Exception :: GetRequiredProperties :: \" + e.getMessage(), e);\r\n\r\n throw new RuntimeException(\"Exception :: GetRequiredProperties :: \" + e.getMessage());\r\n }\r\n\r\n\t sifUrl = prop.getProperty(\"MDM_SIF_URL\");\r\n\t orsId = prop.getProperty(\"MDM_ORS_ID\");\r\n\t username = prop.getProperty(\"MDM_USER_NAME\");\r\n\t password = prop.getProperty(\"MDM_PASSWORD\");\r\n\t \r\n\t logger.info(\"SIF URL ::\" + sifUrl);\r\n\t logger.info(\"ORS ID ::\" + orsId );\r\n\t logger.info(\"User Id ::\" + username);\r\n\t logger.info(\"Password ::\" + password);\r\n\t \r\n\t\r\n\t}",
"PropertiesTask setProperties( File propertiesFile );",
"void setKarafPropertiesFileLocation(String propFile);",
"@Override\n public Configuration parseProperties(String fileUrlToProperties) throws Exception {\n fileUrlToProperties = resolvePropertiesSources(fileUrlToProperties);\n if (fileUrlToProperties != null) {\n for (String fileUrl : fileUrlToProperties.split(\",\")) {\n Properties brokerProperties = new InsertionOrderedProperties();\n if (fileUrl.endsWith(\"/\")) {\n // treat as a directory and parse every property file in alphabetical order\n File dir = new File(fileUrl);\n if (dir.exists()) {\n String[] files = dir.list(new FilenameFilter() {\n @Override\n public boolean accept(File file, String s) {\n return s.endsWith(\".properties\");\n }\n });\n if (files != null && files.length > 0) {\n Arrays.sort(files);\n for (String fileName : files) {\n try (FileInputStream fileInputStream = new FileInputStream(new File(dir, fileName));\n BufferedInputStream reader = new BufferedInputStream(fileInputStream)) {\n brokerProperties.clear();\n brokerProperties.load(reader);\n parsePrefixedProperties(this, fileName, brokerProperties, null);\n }\n }\n }\n }\n } else {\n File file = new File(fileUrl);\n try (FileInputStream fileInputStream = new FileInputStream(file);\n BufferedInputStream reader = new BufferedInputStream(fileInputStream)) {\n brokerProperties.load(reader);\n parsePrefixedProperties(this, file.getName(), brokerProperties, null);\n }\n }\n }\n }\n parsePrefixedProperties(System.getProperties(), systemPropertyPrefix);\n return this;\n }",
"public static Properties loadProperties(String filePath)\n {\n \tProperties listProperties = new Properties();\n\t\t//System.out.println(filePath);\n\n\t\tFileInputStream file = null;\n\t\ttry \n\t\t{\n\t\t\tfile = new FileInputStream(filePath);\n\t\t\t\n\t\t} \n\t\tcatch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\ttry \n\t\t{\n\t\t\t listProperties.load(file);\n\t\t} \n\t\tcatch (IOException e) \n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn listProperties;\n }",
"void loadProperties(final String fileName){\n mProperties = new Properties();\n try {\n InputStreamReader stream = new InputStreamReader(CoreLib.getAppContext().getResources().\n getAssets().open(fileName));\n mProperties.load(stream);\n }catch (IOException e){\n throw new Error(\"Make sure you have both properties file(\" + fileName + \")present under assets\");\n }\n }",
"public static void configureLocal() {\r\n configure(getProperties(true));\r\n }",
"public void loadConfig() {\n\t}",
"private static void readCitProperties(String fileName) {\n/* */ try {\n/* 91 */ ResourceLocation e = new ResourceLocation(fileName);\n/* 92 */ InputStream in = Config.getResourceStream(e);\n/* */ \n/* 94 */ if (in == null) {\n/* */ return;\n/* */ }\n/* */ \n/* */ \n/* 99 */ Config.dbg(\"CustomItems: Loading \" + fileName);\n/* 100 */ Properties props = new Properties();\n/* 101 */ props.load(in);\n/* 102 */ in.close();\n/* 103 */ useGlint = Config.parseBoolean(props.getProperty(\"useGlint\"), true);\n/* */ }\n/* 105 */ catch (FileNotFoundException var4) {\n/* */ \n/* */ return;\n/* */ }\n/* 109 */ catch (IOException var5) {\n/* */ \n/* 111 */ var5.printStackTrace();\n/* */ } \n/* */ }",
"private void initializeProperties(String propertiesFilename) throws IOException {\n this.properties = new Properties();\n\n // Set defaults for 'standard' operation.\n // properties.setProperty(FILENAME_KEY, clientHome + \"/bmo-data.tsv\");\n properties.setProperty(BMO_URI_KEY,\n \"http://www.buildingmanageronline.com/members/mbdev_export.php/download.txt\");\n\n FileInputStream stream = null;\n try {\n stream = new FileInputStream(propertiesFilename);\n properties.load(stream);\n System.out.println(\"Loading data input client properties from: \" + propertiesFilename);\n }\n catch (IOException e) {\n System.out.println(propertiesFilename\n + \" not found. Using default data input client properties.\");\n throw e;\n }\n finally {\n if (stream != null) {\n stream.close();\n }\n }\n trimProperties(properties);\n }",
"private static synchronized void setProperties(\n final String strPropertiesFilename) {\n if (msbPropertiesLoaded) {\n Verbose.warning(\"Properties already loaded; ignoring request\");\n\n return;\n }\n\n File oFile = new File(strPropertiesFilename);\n\n if (!oFile.exists()) {\n // Try to get it from jar file\n ClassLoader classLoader = Thread.currentThread()\n .getContextClassLoader();\n final InputStream input;\n\n if (classLoader == null) {\n classLoader = Class.class.getClassLoader();\n }\n input = classLoader\n .getResourceAsStream('/' + strPropertiesFilename);\n PropertyDef.setProperties(input, null);\n } else {\n PropertyDef.setProperties(new File(strPropertiesFilename), null,\n false);\n }\n if (strPropertiesFilename == DEFAULT_PROPERTIES_FILENAME) {\n oFile = new File(CUSTOMER_PROPERTIES_FILENAME);\n if (oFile.exists() && oFile.isFile()) {\n PropertyDef.addProperties(oFile);\n }\n }\n AdaptiveReplicationTool.msbPropertiesLoaded = true;\n }"
] | [
"0.75044435",
"0.73725367",
"0.736365",
"0.7225865",
"0.7173044",
"0.71703917",
"0.71508014",
"0.704264",
"0.7001537",
"0.7000228",
"0.69979364",
"0.69826424",
"0.69560736",
"0.69462335",
"0.6931208",
"0.6918859",
"0.68965536",
"0.6885825",
"0.6867764",
"0.6863343",
"0.6855265",
"0.684921",
"0.6831157",
"0.6828276",
"0.6826587",
"0.6805489",
"0.67979246",
"0.67965865",
"0.67945176",
"0.6781949",
"0.6778901",
"0.6773556",
"0.6750171",
"0.67403424",
"0.6714194",
"0.6701788",
"0.6692016",
"0.66560346",
"0.66553926",
"0.6634822",
"0.66101557",
"0.65963495",
"0.6575184",
"0.65642226",
"0.6561396",
"0.65612596",
"0.6558304",
"0.65347326",
"0.65282387",
"0.65269756",
"0.65177923",
"0.6493038",
"0.6489847",
"0.64850426",
"0.6482949",
"0.646386",
"0.6430434",
"0.6428024",
"0.6421013",
"0.64019006",
"0.63877183",
"0.6377687",
"0.63738656",
"0.6365798",
"0.63375163",
"0.6306296",
"0.6291202",
"0.62865055",
"0.62831134",
"0.6282855",
"0.62756747",
"0.62606966",
"0.6254653",
"0.62351793",
"0.62157834",
"0.62096864",
"0.6207418",
"0.6205223",
"0.61990273",
"0.6197787",
"0.61918616",
"0.61913645",
"0.61838084",
"0.61720824",
"0.615768",
"0.6155868",
"0.6149753",
"0.6146629",
"0.61400616",
"0.61387485",
"0.6136012",
"0.61343735",
"0.61228955",
"0.6122696",
"0.6121746",
"0.6106581",
"0.6091933",
"0.6082391",
"0.6081972",
"0.6078039"
] | 0.6788351 | 29 |
/ Delegate the building of the sql to the concrete impl. | abstract protected String buildSQL(BatchSQLEnum sql); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void constructExecuteSql() {\n getMetaData();\n // Validate that the primary keys are present in the underlying SQL\n StringBuilder orderBySql = new StringBuilder(super.getExecuteSql()).append(\"\\n order by \");\n switch (metaData.getDbType()) {\n case ORACLE:\n orderBySql.append(createOracleOrderedByClause ());\n break;\n case SQL_SERVER:\n orderBySql.append(createSqlServerOrderedByClause());\n break;\n case UNKNOWN:\n default:\n orderBySql.append(createUnknownDBOrderedByClause());\n }\n this.executeSql = orderBySql.toString();\n }",
"public abstract String toSQL();",
"public interface SQLTransform {\n\n\t/**\n\t * Generate code to put into cursor, the bean property value.\n\t *\n\t * @param tableEntity entity with table to target\n\t * @param methodBuilder the method builder\n\t * @param beanClass the bean class\n\t * @param beanName the bean name\n\t * @param property the property\n\t * @param cursorName the cursor name\n\t * @param indexName the index name\n\t */\n\tvoid generateReadPropertyFromCursor(SQLiteEntity tableEntity, Builder methodBuilder, TypeName beanClass, String beanName, ModelProperty property, String cursorName, String indexName);\n\n\t/**\n\t * Used when you need to use a cursor column as select's result value. \n\t *\n\t * @param methodBuilder the method builder\n\t * @param daoDefinition the dao definition\n\t * @param paramTypeName the param type name\n\t * @param cursorName the cursor name\n\t * @param indexName the index name\n\t */\n\tvoid generateReadValueFromCursor(Builder methodBuilder, SQLiteDaoDefinition daoDefinition, TypeName paramTypeName, String cursorName, String indexName);\n\n\t/**\n\t * Generate default value, null or 0 or ''.\n\t *\n\t * @param methodBuilder the method builder\n\t */\n\tvoid generateDefaultValue(Builder methodBuilder);\n\n\t/**\n\t * Write a bean property to a content writer.\n\t *\n\t * @param methodBuilder the method builder\n\t * @param beanName the bean name\n\t * @param beanClass the bean class\n\t * @param property property to write\n\t */\n\tvoid generateWriteProperty2ContentValues(Builder methodBuilder, String beanName, TypeName beanClass, ModelProperty property);\n\t\n\t/**\n\t * Write a bean property into a where condition.\n\t *\n\t * @param methodBuilder the method builder\n\t * @param beanName the bean name\n\t * @param beanClass the bean class\n\t * @param property the property\n\t */\n\tvoid generateWriteProperty2WhereCondition(Builder methodBuilder, String beanName, TypeName beanClass, ModelProperty property);\n\n\t/**\n\t * <p>\n\t * Generate code to write parameter to where condition\n\t * </p>.\n\t *\n\t * @param methodBuilder the method builder\n\t * @param method the method\n\t * @param paramName the param name\n\t * @param paramTypeName the param type name\n\t */\n\tvoid generateWriteParam2WhereCondition(Builder methodBuilder, SQLiteModelMethod method, String paramName, TypeName paramTypeName);\n\t\n\t/**\n\t * <p>Generate code to write parameter to where statement</p>.\n\t *\n\t * @param methodBuilder the method builder\n\t * @param method the method\n\t * @param paramName the param name\n\t * @param paramType the param type\n\t * @param property the property\n\t */\n\tvoid generateWriteParam2ContentValues(Builder methodBuilder, SQLiteModelMethod method, String paramName, TypeName paramType, ModelProperty property);\n\n\t/**\n\t * Generate code to set property to null value or default value.\n\t *\n\t * @param methodBuilder the method builder\n\t * @param beanClass the bean class\n\t * @param beanName the bean name\n\t * @param property the property\n\t * @param cursorName the cursor name\n\t * @param indexName the index name\n\t */\n\tvoid generateResetProperty(Builder methodBuilder, TypeName beanClass, String beanName, ModelProperty property, String cursorName, String indexName);\n\n\t/**\n\t * Associated column type.\n\t *\n\t * @return column type as string\n\t */\n\tString getColumnTypeAsString();\n\n\t/**\n\t * Gets the column type.\n\t *\n\t * @return column type\n\t */\n\tColumnAffinityType getColumnType();\n\t\n\t/**\n\t * if true, transform can be used as convertion type in a type adapter.\n\t *\n\t * @return true, if is type adapter aware\n\t */\n\tboolean isTypeAdapterAware();\n\n}",
"public abstract void toSQL(StringBuilder ret);",
"public interface QuerySql extends ConditionAble, Stream {\n\n\t/**\n\t * Add parameters to your SQL to replace the question mark?This is a more\n\t * recommended way to replace string splices\n\t * \n\t * @param paramers\n\t * @return\n\t */\n\tQuerySql addParamer(Object... paramers);\n\n\tint update();\n\n\t/**\n\t * \n\t * <p>\n\t * If you need to return a result set instead of a single item; The return type\n\t * is automatically determined by the constructor. If you want to return an\n\t * entity type, add the entity type before the {@link #list(Class)} method\n\t * \n\t * <p>\n\t * The method is equivalent to the integrator of two methods\n\t * \n\t * @see #entities(Class)\n\t * @see #maps()\n\t * \n\t */\n\t<T> List<T> list();\n\n\t<T> List<T> list(Class<T> entityClass);\n\n\t/**\n\t * \n\t * @return Returns a collection of entity class mappings.\n\t */\n\t<T> List<T> entities(Class<T> entityClass);\n\n\t/**\n\t * The result set encapsulated in the form of\n\t * {@code List<Map<String,Object>>}<br>\n\t * This will be an acceptable way to get the mapping of SQL result sets\n\t * \n\t * @return {@link List}{@code <}{@link Map}{@code <}\n\t * {@link String},{@link Object}{@code >}{@code >}\n\t */\n\tList<Map<String, Object>> maps();\n\n\t/**\n\t * \n\t * @param alias - Aliased key-value pairs, returned as aliased key-value if\n\t * matched\n\t * @return\n\t * @since 2.24\n\t */\n\tList<Map<String, Object>> maps(HashMap<String, String> alias);\n\n\t/**\n\t * The result set encapsulated in the form of {@code Map<String,Object>}<br>\n\t * This will be an acceptable way to get the mapping of SQL result sets\n\t * \n\t * @return {@link Map}{@code <} {@link String},{@link Object}{@code >}\n\t */\n\tMap<String, Object> map();\n\n\t/**\n\t * Returns a single result;The return type is automatically determined based on\n\t * the constructor, and if you want to return an entity type, add before that\n\t * \n\t * @return\n\t */\n\t<T> T unique();\n\n\t\n\t/**\n\t * Specify entity class mappings\n\t * @param entityClass - Be sure to include an {@link Id} annotation to declare the primary key\n\t * @return\n\t */\n\t<T> T unique(Class<T> entityClass);\n\t\n\t<T> T entity(Class<T> entityClass);\n\n\t/**\n\t * Gets the columns contained in the query result.\n\t * \n\t * @return\n\t */\n\tList<Column> getQueryColumns();\n\n\t@Override\n\tQuerySql addCondition(Condition cond);\n\n\t@Override\n\tQuerySql addCondition(String fieldName, Cs cs);\n\n\t@Override\n\tQuerySql addCondition(String fieldName, Cs cs, Object value);\n\n\t@Override\n\tQuerySql addCondition(Consumer<List<Condition>> conds);\n\n\t/**\n\t * An extension to the {@link Stream} interface,Returns the specified number of\n\t * results from the SQL statement\n\t * \n\t * @param count\n\t */\n\tList<Map<String, Object>> stream(int count);\n\n}",
"public RepoSQL() { // constructor implicit\r\n\t\t super();\r\n\t }",
"@Override\n public void constructQuery() {\n try {\n super.constructQuery();\n sqlQueryBuilder.append(Constants.QUERY_SELECT);\n appendColumnName();\n appendPrimaryTableName();\n appendConditions(getJoinType());\n appendClause(joinQueryInputs.clauses, true);\n sqlQueryBuilder.append(Constants.SEMI_COLON);\n queryDisplayListener.displayConstructedQuery(sqlQueryBuilder.toString());\n } catch (NoSuchClauseFoundException noSuchClauseFoundException) {\n queryDisplayListener.showException(noSuchClauseFoundException.getExceptionMessage());\n }\n }",
"private String constructSQL() {\n\t\tString sql = \"\";\n\t\tif (!minAgeSet) {\n\t\t\tsql = \"SELECT E.EMP_ID, E.EMP_FULLNAME\" + \" FROM \" + empTable\n\t\t\t+ \" E\";\n\t\t} else {\n\t\t\tsql = \"SELECT E.EMP_ID, E.EMP_FULLNAME\" + \" FROM \" + empTable\n\t\t\t+ \" E WHERE E.EMP_BIRTH_DATE <= ? \";\n\t\t}\n\n\t\toriSqlLength = sql.length();\n\n\t\tStringTokenizer empTok = new StringTokenizer(employee, \",\");\n\t\tStringTokenizer calcTok = new StringTokenizer(calcGroup, \",\");\n\t\tStringTokenizer payTok = new StringTokenizer(payGroup, \",\");\n\t\tStringTokenizer teamTok = new StringTokenizer(team, \",\");\n\n\t\t// check if any of the selects have been used.\n\n\t\tif (empTok.hasMoreTokens() && !empTok.nextToken().equalsIgnoreCase(all))\n\t\t\tsql = groupSelect(\"employee\", sql);\n\t\tif (calcTok.hasMoreTokens()\n\t\t\t\t&& !calcTok.nextToken().equalsIgnoreCase(all))\n\t\t\tsql = groupSelect(\"calcGroup\", sql);\n\t\tif (payTok.hasMoreTokens() && !payTok.nextToken().equalsIgnoreCase(all))\n\t\t\tsql = groupSelect(\"payGroup\", sql);\n\t\tif (teamTok.hasMoreTokens()\n\t\t\t\t&& !teamTok.nextToken().equalsIgnoreCase(all))\n\t\t\tsql = groupSelect(\"team\", sql);\n\t\t\n\t\treturn sql;\n\t}",
"public interface BuildProvider {\n \n /**\n * 构建器\n * - Sql Source\n * - Result Map\n *\n * @param statement\n */\n void build(MappedStatement statement);\n}",
"public abstract ResultList executeSQL(RawQuery rawQuery);",
"public abstract Statement queryToRetrieveData();",
"public interface SqlQueries {\n\n /**\n * The constant QUOTATION.\n */\n String QUOTATION = \"'\";\n\n /**\n * The constant SELECT_ALL_CARS.\n */\n String SELECT_ALL_CARS = \"SELECT * FROM Car\";\n\n /**\n * The constant SELECT_ALL_USERS.\n */\n String SELECT_ALL_USERS = \"SELECT * FROM Users\";\n\n /**\n * The constant FIND_CAR_BY_ID.\n */\n String FIND_CAR_BY_ID = \"Select * from Car Where id = \";\n\n /**\n * The constant CREATE_A_CAR.\n */\n String CREATE_A_CAR = \"insert into car values({0},{1}, {2}, {3}, {4})\";\n\n}",
"protected MappedQuery getSQL( LogicalModel model, List<Selection> selections, List<Constraint> conditions,\n List<Order> orderBy, DatabaseMeta databaseMeta, String locale, Map<String, Object> parameters,\n boolean genAsPreparedStatement, boolean disableDistinct, int limit, Constraint securityConstraint )\n throws PentahoMetadataException {\n\n SQLQueryModel query = new SQLQueryModel();\n\n // Get settings for the query model\n Object val = null;\n val = model.getProperty( \"delay_outer_join_conditions\" ); //$NON-NLS-1$\n if ( ( val != null ) && ( val instanceof Boolean ) ) {\n query.setDelayOuterJoinConditions( ( (Boolean) val ).booleanValue() );\n }\n\n Map<String, String> columnsMap = new HashMap<String, String>();\n\n // generate the formula objects for constraints\n Map<Constraint, SqlOpenFormula> constraintFormulaMap = new HashMap<Constraint, SqlOpenFormula>();\n for ( Constraint constraint : conditions ) {\n SqlOpenFormula formula =\n new SqlOpenFormula( model, databaseMeta, constraint.getFormula(), null, parameters, genAsPreparedStatement );\n formula.parseAndValidate();\n constraintFormulaMap.put( constraint, formula );\n }\n if ( securityConstraint != null ) {\n SqlOpenFormula formula =\n new SqlOpenFormula( model, databaseMeta, securityConstraint.getFormula(), null, parameters,\n genAsPreparedStatement );\n formula.parseAndValidate();\n constraintFormulaMap.put( securityConstraint, formula );\n }\n\n // These are the tables involved in the field selection\n //\n List<LogicalTable> tabs =\n getTablesInvolved( model, selections, conditions, orderBy, constraintFormulaMap, parameters,\n genAsPreparedStatement, databaseMeta, locale, securityConstraint );\n\n // Now get the shortest path between these tables.\n Path path = getShortestPathBetween( model, tabs );\n if ( path == null ) {\n throw new PentahoMetadataException( Messages.getErrorString( \"SqlGenerator.ERROR_0002_FAILED_TO_FIND_PATH\" ) ); //$NON-NLS-1$\n }\n\n List<LogicalTable> usedBusinessTables = path.getUsedTables();\n if ( path.size() == 0 ) {\n // just a selection from 1 table: pick any column...\n // Otherwise, why bother, right?\n if ( selections.size() > 0 ) {\n usedBusinessTables.add( selections.get( 0 ).getLogicalColumn().getLogicalTable() );\n }\n }\n\n Map<LogicalTable, String> tableAliases = null;\n\n if ( usedBusinessTables.size() > 0 ) {\n\n // generate tableAliases mapping\n\n int maxAliasNameWidth = SQLDialectFactory.getSQLDialect( databaseMeta ).getMaxTableNameLength();\n tableAliases = new HashMap<LogicalTable, String>();\n for ( LogicalTable table : usedBusinessTables ) {\n String uniqueAlias = generateUniqueAlias( table.getId(), maxAliasNameWidth, tableAliases.values() );\n tableAliases.put( table, uniqueAlias );\n }\n\n boolean group =\n hasFactsInIt( model, selections, conditions, constraintFormulaMap, parameters, genAsPreparedStatement,\n databaseMeta, locale );\n\n generateSelect( query, model, databaseMeta, selections, disableDistinct, limit, group, locale, tableAliases,\n columnsMap, parameters, genAsPreparedStatement );\n generateFromAndWhere( query, usedBusinessTables, model, path, conditions, tableAliases, constraintFormulaMap,\n parameters, genAsPreparedStatement, databaseMeta, locale );\n if ( group ) {\n generateGroupBy( query, model, selections, tableAliases, parameters, genAsPreparedStatement, databaseMeta,\n locale );\n }\n generateOrderBy( query, model, orderBy, databaseMeta, locale, tableAliases, columnsMap, parameters,\n genAsPreparedStatement );\n\n if ( securityConstraint != null ) {\n // apply current table aliases\n SqlOpenFormula securityFormula = constraintFormulaMap.get( securityConstraint );\n securityFormula.setTableAliases( tableAliases );\n\n // generate sql\n String sqlFormula = securityFormula.generateSQL( locale );\n query.setSecurityConstraint( sqlFormula, securityFormula.hasAggregate() );\n }\n }\n\n // this is available to classes that override sql generation behavior\n preprocessQueryModel( query, selections, tableAliases, databaseMeta );\n\n // Convert temporary param placements with Sql Prepared Statement ? values\n SQLDialectInterface dialect = SQLDialectFactory.getSQLDialect( databaseMeta );\n List<String> paramNames = null;\n String sql = dialect.generateSelectStatement( query );\n Pattern p = Pattern.compile( \"___PARAM\\\\[(.*?)\\\\]___\" ); //$NON-NLS-1$\n Matcher m = p.matcher( sql );\n StringBuffer sb = new StringBuffer();\n while ( m.find() ) {\n String paramName = m.group( 1 );\n String repl = \"?\";\n if ( parameters.get( paramName ) instanceof Object[] ) {\n Object[] paramz = (Object[]) parameters.get( paramName );\n for ( int i = 1; i < paramz.length; i++ ) {\n repl += \", ?\";\n }\n }\n m.appendReplacement( sb, repl ); //$NON-NLS-1$\n if ( paramNames == null ) {\n paramNames = new ArrayList<String>();\n }\n paramNames.add( paramName );\n }\n m.appendTail( sb );\n\n String sqlStr = sb.toString();\n if ( logger.isTraceEnabled() ) {\n logger.trace( sqlStr );\n }\n // this is available to classes that override sql generation behavior\n String sqlOutput = processGeneratedSql( sb.toString() );\n\n return new MappedQuery( sqlOutput, columnsMap, selections, paramNames );\n }",
"public QueryCore buildQuery() throws SQLException\n {\n if(l != null)\n {\n for(int i=0;i<l.size();i++)\n {\n prepStm.setObject(i+1,l.get(i));\n }\n }\n return this;\n }",
"public void makeSql() {\n\t\tfor(int i=0; i<arr_sql.length; i++) {\n\t\t\tarr_sql[i] = new StringBuffer();\n\t\t}\n\t\t\n\t\t/*\n\t\t * 공통코드 쿼리\n\t\t * 대리점구분 : CU006\n\t\t * 직판구분 : CU012\n\t\t * 지역 : SY006\n\t\t * 계약상태 : CU013\n\t\t * 사용유무 : SY011\n\t\t * 보증보험회사 : CU010\n\t\t * 하위대리점여부 : CU011\n\t\t */\n\t\tarr_sql[0].append (\"SELECT\t\t\t\t\t\t\t\t\t\t\\n\")\n\t\t\t\t .append (\"\t' ' head, ' ' detail, '전체' detail_nm \\n\")\n\t\t\t\t .append (\"FROM DUAL \\n\")\n\t\t\t\t .append (\"UNION ALL \\n\")\n\t\t\t\t .append (\"SELECT \\n\")\n\t\t\t\t .append (\"\tB.head, B.detail, B.detail_nm \\n\")\n\t\t\t\t .append (\"FROM \\n\")\n\t\t\t\t .append (\"\tSALES.TSY011 A, \\n\")\n\t\t\t\t .append (\"\tSALES.TSY010 B \\n\")\n\t\t\t\t .append (\"WHERE 1=1 \\n\")\n\t\t\t\t .append (\" AND A.head = B.head \\n\")\n\t\t\t\t .append (\" AND B.head = ? \\n\")\n\t\t\t\t .append (\" AND LENGTH (rtrim(B.detail)) > 0 \\n\");\n\t\t\n\t\t/*\n\t\t * 대리점 조회\n\t\t */\n\t\tarr_sql[1].append(\"SELECT T1.client_sid\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 매출처SID \t*/\n\t \t\t .append(\"\t\t ,T1.vend_cd \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* [회계]거래처 코드 \t*/\n\t \t\t .append(\"\t\t ,T1.client_cd \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 매출처 코드 \t*/\n\t \t\t .append(\"\t\t ,T1.client_nm \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 매출처 명 \t*/\n\t \t\t .append(\"\t\t ,T1.client_gu \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 매출처구분 :CU005 \t*/\n\t \t\t \n\t \t\t .append(\"\t\t ,T1.agen_gu \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 대리점구분 :CU006 \t*/\n\t \t\t .append(\"\t\t ,T1.dir_yn \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 직판여부 :CU012 \t*/\n\t \t\t .append(\"\t\t ,T1.area_cd \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 지역코드 :SY006 \t*/\n\t \t\t .append(\"\t\t ,T1.sal_dam_sid \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 영업담당자코드[TSY410] */\n\t \t\t .append(\"\t\t ,T1.client_dam_nm \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 매출처담당자 \t*/\n\t \t\t \n\t \t\t .append(\"\t\t ,T1.tel_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 전화번호 \t*/\n\t \t\t .append(\"\t\t ,T1.mobile_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 휴대전화 \t*/\n\t \t\t .append(\"\t\t ,T1.fax_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* FAX번호 \t*/\n\t \t\t .append(\"\t\t ,T1.e_mail \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 이메일 \t*/\n\t \t\t .append(\"\t\t ,T1.zip_cd \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 우편번호[TSY110] */\n\t \t\t \n\t \t\t .append(\"\t\t ,T1.address1 \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 주소1 \t*/\n\t \t\t .append(\"\t\t ,T1.address2 \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 주소2 \t*/\n\t \t\t .append(\"\t\t ,T1.commi_rate \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 수수료율 \t*/\n\t \t\t .append(\"\t\t ,T1.cunt_status \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 계약상태 :CU013 \t*/\n\t \t\t .append(\"\t\t ,T1.bancod \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 은행코드 [BANKCODE] */\n\t \t\t \n\t \t\t .append(\"\t\t ,T1.bank_acc_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 은행계좌번호 \t*/\n\t \t\t .append(\"\t\t ,T1.bank_acct_nm \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 예금주 \t*/\n\t \t\t .append(\"\t\t ,T1.use_yn \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 사용여부 :SY011 \t*/ \n\t \t\t .append(\"\t\t ,T1.client_url\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 홈페이지 URL\t\t\t\t*/\n\t \t\t .append(\"\t\t ,T2.sal_dam_nm \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 영업담당자명 \t*/\n\t \t\t .append(\"\t\t ,T3.vend_nm \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 거래처명 \t*/\n\t \t\t \n\t \t\t .append(\"\t\t ,T4.bannam \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 은행명 \t*/\n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'CU006',T1.agen_gu) AS agen_gu_name \t\t\t\t\t\\n\")\t/* 대리점구분명 \t\t\t\t*/ \n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'CU012',T1.dir_yn) AS dir_yn_name \t\t\t\t\t\\n\")\t/* 직판여부명 \t\t\t\t*/ \n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'SY006',T1.area_cd) AS area_nm\t\t\t\t\t\t\t\\n\")\t/* 지역명 \t\t\t\t*/\n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'CU013',T1.cunt_status) AS cunt_status_name \t\t\t\\n\")\t/* 계약상태명 \t\t\t\t*/\n\n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'SY011',T1.use_yn) AS use_yn_name \t\t\t\\n\")\t/* 사용여부명 \t\t\t \t*/\n\n\t \t\t .append(\"FROM SALES.TCU030 T1 LEFT OUTER JOIN SALES.TSY410 T2 ON T1.SAL_DAM_SID = T2.SAL_DAM_SID \\n\")\n\t \t\t .append(\"\t\t LEFT OUTER JOIN ACCOUNT.GCZM_VENDER T3 ON T1.VEND_CD = T3.VEND_CD \t\t\t\t\t\\n\")\n\t \t\t .append(\"\t\t LEFT OUTER JOIN ACCOUNT.BANKCODE T4 ON T1.BANCOD = T4.BANCOD \t\t\t\t\t\\n\")\n\t \t\t .append(\"WHERE 1 = 1 \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\n\t \t\t .append(\"\t\t AND T1.client_GU = '1' \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\");\n\t\t/*\n\t\t * 계약정보 조회\n\t\t */\n\t\tarr_sql[2].append(\"SELECT T1.client_sid\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 매출처SID \t*/\n\t\t\t\t .append(\"\t\t ,T1.cont_date\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\") \t/* 계약일자 \t*/\n\t\t\t\t .append(\"\t\t ,T1.expire_date\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 만기일자 \t*/\n\t\t\t\t .append(\"\t\t ,TO_NUMBER(T1.insur_amt) AS insur_amt\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 보험료 \t*/\n\t\t\t\t .append(\"\t\t ,T1.insur_comp_cd\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 보증보험회사:CU010 \t*/\n\t\t\t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ('CU010',T1.insur_comp_cd) AS insur_comp_cd_name\t\t\\n\") \t/* 보증보험회사명 \t\t*/ \n\t\t\t\t .append(\"FROM SALES.TCU031 T1 \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"WHERE 1=1\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\");\n\t\t \n\t\n\t\t/*\n\t\t * 지점정보 조회\n\t\t */\n\t\tarr_sql[3].append(\"SELECT T1.client_sid\t\t\t\t\t\t\t\t\t\t\t\t\\n\") \t/* 매출처SID \t\t*/\n\t\t\t\t .append(\"\t\t ,T1.branch_cd\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 지점코드 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.branch_nm \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\") \t/* 지점명 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.area_cd\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\") \t/* 지역코드:SY006 \t\t*/\n\t\t\t\t .append(\"\t\t ,T1.client_down_yn \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 하위대리점여부:CU011 \t*/\n\t\t\t\t .append(\"\t\t ,T1.empno \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 담당자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.tel_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 전화번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.mobile_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 휴대폰 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.fax_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 팩스번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.branch_url \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 지점홈페이지 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'SY006', T1.area_cd) AS area_nm\t\t\t\t\t\t\t\\n\") \t/* 지역명:SY006 \t\t*/\n\t\t\t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'CU011',T1.client_down_yn) AS client_down_yn_name \t\\n\")\t/* 하위대리점여부명 \t\t*/\n\t\t\t\t .append(\"FROM SALES.TCU032 T1\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\");\n\t\t\n\t\t\n\t\t/*\n\t\t * 대리점 등록\n\t\t */\n\n\t\tarr_sql[4].append(\"INSERT INTO SALES.TCU030 (\")\n\t\t\t\t .append(\"\t\t\t\t client_sid \\n\")\t\n\t\t\t\t .append(\"\t\t\t\t,vend_cd \\n\")\t/* [회계]거래처 코드 \t*/\n\t\t\t\t .append(\"\t\t\t\t,client_cd \\n\")\t/* 매출처 코드 \t*/\n\t\t\t\t .append(\"\t\t\t\t,client_nm \\n\")\t/* 매출처 명 \t*/\n\t\t\t\t .append(\"\t\t\t\t,client_gu \\n\")\t/* 매출처구분 :CU005 \t*/\n\t\t\t\t .append(\"\t\t\t\t,agen_gu \\n\")\t/* 대리점구분 :CU006 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t\t\t,dir_yn \\n\")\t/* 직판여부 :CU012 \t*/\n\t\t\t\t .append(\"\t\t\t\t,area_cd \\n\")\t/* 지역코드 :SY006 \t*/\n\t\t\t\t .append(\"\t\t\t\t,sal_dam_sid \\n\")\t/* 영업담당자코드[TSY410] \t*/\n\t\t\t\t .append(\"\t\t\t\t,client_dam_nm \\n\")\t/* 매출처담당자 \t*/\n\t\t\t\t .append(\"\t\t\t\t,tel_no \\n\")\t/* 전화번호 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t\t\t,mobile_no \\n\")\t/* 핸드폰 \t*/\n\t\t\t\t .append(\"\t\t\t\t,fax_no \\n\")\t/* FAX번호 \t*/\n\t\t\t\t .append(\"\t\t\t\t,e_mail \\n\")\t/* 이메일 \t*/\n\t\t\t\t .append(\"\t\t\t\t,zip_cd \\n\")\t/* 소재지우편번호[TSY110] */\n\t\t\t\t .append(\"\t\t\t\t,address1 \\n\")\t/* 소재지주소1 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t\t\t,address2 \\n\")\t/* 소재지주소2 \t*/\n\t\t\t\t .append(\"\t\t\t\t,commi_rate \t\\n\") \t/* 수수료율 \t*/\n\t\t\t\t .append(\"\t\t\t\t,cunt_status \\n\")\t/* 계약상태 :CU013 \t*/\n\t\t\t\t .append(\"\t\t\t\t,bancod\t\t\t\\n\") \t/* 은행코드 \t\t\t\t\t*/\n\t\t\t\t .append(\"\t\t\t\t,bank_acc_no \\n\")\t/* 은행계좌번호[BANKCODE] \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t\t\t,bank_acct_nm\t\\n\")\t/* 예금주 \t\t\t\t\t*/\n\t\t\t\t .append(\"\t\t\t\t,use_yn\t\t\t\\n\")\t/* 사용여부 \t\t\t\t\t*/\n\t\t\t\t\n\t\t\t\t .append(\"\t\t \t\t,u_date \t\\n\") \t/* 최종수정일자 \t*/\n\t \t\t .append(\"\t\t \t\t,u_empno \t\\n\")\t/* 최종수정자사번 \t*/\n\t \t\t .append(\"\t\t \t\t,u_ip \\n\")\t/* 최종수정IP */\t\t\t\n\t \t\t .append(\"\t\t\t\t,client_url\t\t\\n\")\t/* 홈페이지 */\n\t\t\t\t .append(\"\t\t\t)\t\t\t\t\t\\n\")\n\t\t\t\t \n\t\t\t\t .append(\"VALUES\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t(\t \t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\tSALES.SWS_TCU030_ID.NEXTVAL,?,?,?,?,?,\t\t\\n\")\t\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,SYSTIMESTAMP,?,?,?\t\\n\")\n\t\t\t\t .append(\"\t\t\t)\");\n\t\t\n\t\n\t\t\n\t\t/*\n\t\t * 계약정보 등록\n\t\t */\n\t\tarr_sql[5].append(\"INSERT INTO SALES.TCU031 ( \t\\n\")\n\t\t\t\t .append(\" \t client_SID\t\t\t\\n\")\t/* 매출처SID \t*/\n\t\t\t\t .append(\"\t\t ,cont_date\t\t\t\t\\n\") \t/* 계약일자 \t*/\n\t\t\t\t .append(\"\t\t ,expire_date\t\t\t\\n\")\t/* 만기일자 \t*/\n\t\t\t\t .append(\"\t\t ,insur_amt\t\t\t\t\\n\")\t/* 보험료 \t*/\n\t\t\t\t .append(\"\t\t ,insur_comp_cd\t\t\t\\n\")\t/* 보증보험회사:CU010 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,u_date\t\t\t\t\\n\")\t/* 최종수정일자 \t*/\n\t\t\t\t .append(\"\t\t ,u_empno \t\t\t\t\\n\") \t/* 최종수정자사번 \t*/\n\t\t\t\t .append(\"\t\t ,u_ip\t\t\t\t\t\\n\")\t/* 최종수정IP \t*/\n\t\t\t\t .append(\"\t\t)\t\t\t\t\t\t\\n\")\n\t\t\t\t \n\t\t\t\t .append(\"VALUES\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t(\t \t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\t\n\t\t\t\t .append(\"\t\t\t\tSYSTIMESTAMP,?,?\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t)\");\n\t\t\t\t\t\n\t\t/*\n\t\t * 지점정보 등록\n\t\t */\n\t\t\n\t\tarr_sql[6].append(\"INSERT INTO SALES.TCU032 ( \t\\n\")\n\t\t\t\t .append(\"\t\t client_SID\t\t\t\\n\") \t/* 매출처SID \t\t*/\n\t\t\t\t .append(\"\t\t ,branch_cd\t\t\t\t\\n\")\t/* 지점코드 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,branch_nm \t\t\t\\n\") \t/* 지점명 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,area_cd\t\t\t\t\\n\") \t/* 지역코드:SY006 \t\t*/\n\t\t\t\t .append(\"\t\t ,client_down_yn \t\t\\n\")\t/* 하위대리점여부:CU011 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,empno \t\t\t\t\\n\")\t/* 담당자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,tel_no \t\t\t\t\\n\")\t/* 전화번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,mobile_no \t\t\t\\n\")\t/* 휴대폰 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,fax_no \t\t\t\t\\n\")\t/* 팩스번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,branch_url \t\t\t\\n\")\t/* 지점홈페이지 \t\t\t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,u_date \t\t\t\t\\n\")\t/* 최종수정일자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,u_empno \t\t\t\t\\n\")\t/* 최종수정자사번 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,u_ip \t\t\t\t\\n\")\t/* 최종수정IP \t\t*/\n\t\t\t\t .append(\"\t)\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"VALUES\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t(\t \t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\t\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\tSYSTIMESTAMP,?,?\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t)\");\n\t\t\n\t\t/*\n\t\t * 대리점 수정\n\t\t */\n\n\t\tarr_sql[7].append(\"UPDATE SALES.TCU030 SET \t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t vend_cd\t\t= ? \t\t\t\t\\n\")\t/* [회계]거래처 코드 \t*/\n\t\t\t\t .append(\"\t\t,client_nm\t\t= ? \t\t\t\t\\n\")\t/* 매출처 명 \t*/\n\t\t\t\t .append(\"\t\t,agen_gu\t\t= ? \t\t\t\t \t\\n\")\t/* 대리점구분 :CU006 \t*/\n\t\t\t\t .append(\"\t\t,dir_yn\t\t\t= ? \t\t\t\t\\n\")\t/* 직판여부 :CU012 \t*/\n\t\t\t\t .append(\"\t\t,area_cd \t= ? \t\t\t\t\t\\n\")\t/* 지역코드 :SY006 \t*/\n\n\t\t\t\t .append(\"\t\t,sal_dam_sid\t= ? \t\t\t\t\t\\n\")\t/* 영업담당자코드[TSY410] */\n\t\t\t\t .append(\"\t\t,client_dam_nm\t= ? \t\t\t\t\t\\n\")\t/* 매출처담당자 \t*/\n\t\t\t\t .append(\"\t\t,tel_no = ?\t\t\t\t\t\t\\n\")\t/* 전화번호 \t*/\n\t\t\t\t .append(\"\t\t,mobile_no = ?\t\t\t\t\t\t\\n\")\t/* 핸드폰 \t*/\n\t\t\t\t .append(\"\t\t,fax_no = ?\t\t\t\t\t\t\\n\")\t/* FAX번호 \t*/\n\n\t\t\t\t .append(\"\t\t,e_mail = ?\t\t\t\t\t\t\\n\")\t/* 이메일 \t*/\n\t\t\t\t .append(\"\t\t,zip_cd = ?\t\t\t\t\t\t\\n\")\t/* 소재지우편번호[TSY110] \t*/\n\t\t\t\t .append(\"\t\t,address1 = ?\t\t\t\t\t\t\\n\")\t/* 소재지주소1 \t*/\n\t\t\t\t .append(\"\t\t,address2 = ?\t\t\t\t\t\t\\n\")\t/* 소재지주소2 \t*/\n\t\t\t\t .append(\"\t\t,commi_rate \t= ?\t\t\t\t\t\t\\n\") \t/* 수수료율 \t*/\n\n\t\t\t\t .append(\"\t\t,cunt_status = ?\t\t\t\t\t\t\\n\")\t/* 계약상태 :CU013 \t*/\n\t\t\t\t .append(\"\t\t,bancod\t\t\t= ?\t\t\t\t\t\t\\n\") \t/* 은행코드\t \t\t\t\t*/\n\t\t\t\t .append(\"\t\t,bank_acc_no = ?\t\t\t\t\t\t\\n\")\t/* 은행계좌번호[BANKCODE]\t\t*/\n\t\t\t\t .append(\"\t\t,bank_acct_nm\t= ?\t\t\t\t\t\t\\n\")\t/* 예금주 \t\t\t\t\t*/\n\t\t\t\t .append(\"\t\t,use_yn\t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 사용여부 \t\t\t\t\t*/\n\n\t\t\t\t .append(\"\t\t,u_date \t= SYSTIMESTAMP\t\t\\n\") \t/* 최종수정일자 \t*/\n\t \t\t .append(\"\t\t,u_empno \t= ?\t\t\t\t\t\t\\n\")\t/* 최종수정자사번 \t*/\n\t \t\t .append(\"\t\t,u_ip = ?\t\t\t\t\t\t\\n\")\t/* 최종수정IP */\n\t \t\t .append(\"\t,client_url = ?\t\t\t\t\t\t\\n\")\t/* 홈페이지 */\n\t\t\t\t .append (\"WHERE client_sid \t= ? \t\t\t\t\\n\");\n\t\t\t\t \n\t\t/*\n\t\t * 계약정보 수정\n\t\t */\n\t\tarr_sql[8].append(\"UPDATE SALES.TCU031 SET\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t cont_date\t\t\t= ?\t\t\t\t\t\\n\") \t/* 계약일자 \t*/\n\t\t\t\t .append(\"\t\t ,expire_date\t\t= ?\t\t\t\t\t\\n\")\t/* 만기일자 \t*/\n\t\t\t\t .append(\"\t\t ,insur_amt\t\t\t= ?\t\t\t\t\t\\n\")\t/* 보험료 \t*/\n\t\t\t\t .append(\"\t\t ,insur_comp_cd\t\t= ?\t\t\t\t\t\\n\")\t/* 보증보험회사:CU010 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,u_date\t\t\t= SYSTIMESTAMP\t\\n\")\t/* 최종수정일자 \t*/\n\t\t\t\t .append(\"\t\t ,u_empno \t\t\t= ?\t\t\t\t\t\\n\") \t/* 최종수정자사번 \t*/\n\t\t\t\t .append(\"\t\t ,u_ip\t\t\t\t= ?\t\t\t\t\t\\n\")\t/* 최종수정IP \t*/\n\t\t\t\t .append (\"WHERE client_sid \t\t= ? AND cont_date = ? \\n\");\n\t\t\t\t\n\t\t\t\t \n\t\t\t\t\t\n\t\t/*\n\t\t * 지점정보 수정\n\t\t */\n\t\t\n\t\tarr_sql[9].append(\"UPDATE SALES.TCU032 SET \t\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t branch_nm \t\t= ?\t\t\t\t\t\t\\n\") \t/* 지점명 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,area_cd\t\t\t= ?\t\t\t\t\t\t\\n\") \t/* 지역코드:SY006 \t\t*/\n\t\t\t\t .append(\"\t\t ,client_down_yn \t= ?\t\t\t\t\t\t\\n\")\t/* 하위대리점여부:CU011 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,empno \t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 담당자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,tel_no \t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 전화번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,mobile_no \t\t= ?\t\t\t\t\t\t\\n\")\t/* 휴대폰 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,fax_no \t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 팩스번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,branch_url \t\t= ?\t\t\t\t\t\t\\n\")\t/* 지점홈페이지 \t\t\t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,u_date \t\t\t= SYSTIMESTAMP\t\t\t\t\t\t\\n\")\t/* 최종수정일자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,u_empno \t\t\t= ?\t\t\\n\")\t/* 최종수정자사번 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,u_ip \t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 최종수정IP \t\t*/\n\t\t\t\t .append (\"WHERE client_sid = ? AND branch_cd \t= ?\t\t\\n\");\n\t\t\n\t\t arr_sql[10].append(\"DELETE FROM SALES.TCU030 WHERE client_sid = ?\");\t\n\t\t arr_sql[11].append(\"DELETE FROM SALES.TCU031 WHERE client_sid = ? AND cont_date = ?\");\n\t\t arr_sql[12].append(\"DELETE FROM SALES.TCU032 WHERE client_sid = ? AND branch_cd = ?\");\n\t\t \n\t\t \n\t\t /*\n\t\t * Client SID 얻어오기\n\t\t */\n\t\t\t\n\t\t\tarr_sql[13].append(\"SELECT client_sid FROM SALES.TCU030 WHERE client_cd = ?\\n\");\n\t\t\t\n\t\t/*\n\t\t * 수수료율 조회\n\t\t */\n\t\t\tarr_sql[14].append(\"SELECT\t\t\t\t\t\t\t\t\\n\")\n\t\t\t\t\t\t.append(\" T1.CLIENT_SID AS CLIENT_SID\t\\n\") /* 매출처SID */\n\t\t\t\t\t\t.append(\" ,T1.FR_DATE AS FR_DATE \t\\n\") /* 시작일자 */\n\t\t\t\t\t\t.append(\" ,T1.TO_DATE AS TO_DATE \t\\n\") /* 종료일자 */\n\t\t\t\t\t\t.append(\" ,T1.WEEKEND_YN AS WEEKEND_YN \t\\n\") /* 주말여부 */\n\t\t\t\t\t\t.append(\" ,T1.COMMI_RATE AS COMMI_RATE\t\\n\") /* 수수료율 */\n\t\t\t\t\t\t.append(\"FROM SALES.TCU033 T1 \t\\n\")\n\t\t\t\t\t\t.append(\"WHERE 1=1 \t\t\t\t\t\t\t\\n\");\n\t\t\t\t\t\t\n\t\t/*\n\t\t * 수수료율 등록\n\t\t */\n\t\t\t\n\t\t\tarr_sql[15].append(\"INSERT INTO SALES.TCU033 ( \t\\n\")\n\t\t\t\t\t\t .append(\" \t CLIENT_SID\t\t\t\\n\")\t/* 매출처SID \t*/\n\t\t\t\t\t\t .append(\"\t\t ,FR_DATE\t\t\t\t\\n\") \t/* 시작일자 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,TO_DATE\t\t\t\\n\")\t/* 종료일자 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,COMMI_RATE\t\t\t\t\\n\")\t/* 수수료율 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,WEEKEND_YN\t\t\t\\n\")\t/* 주말여부 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,I_DATE\t\t\t\t\\n\")\t/* 최종입력일자 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,I_EMPNO \t\t\t\t\\n\") \t/* 최종입력자사번 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,I_IP\t\t\t\t\t\\n\")\t/* 최종입력IP \t*/\t\t\t\t\t\t \n\t\t\t\t\t\t .append(\"\t\t ,u_date\t\t\t\t\\n\")\t/* 최종수정일자 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,u_empno \t\t\t\t\\n\") \t/* 최종수정자사번 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,u_ip\t\t\t\t\t\\n\")\t/* 최종수정IP \t*/\n\t\t\t\t\t\t .append(\"\t\t)\t\t\t\t\t\t\\n\")\n\t\t\t\t\t\t \n\t\t\t\t\t\t .append(\"VALUES\t\t\t\t\t\t\\n\")\n\t\t\t\t\t\t .append(\"\t\t\t(\t \t\t\t\\n\")\n\t\t\t\t\t\t .append(\"\t\t\t\t?,?,?,?, ?,\t\t\\n\")\t\n\t\t\t\t\t\t .append(\"\t\t\t\tSYSTIMESTAMP,?,?, SYSTIMESTAMP,?,?\t\\n\")\n\t\t\t\t\t\t .append(\"\t\t\t)\");\n\t\t/*\n\t\t * 수수료율 수정\n\t\t */\n\t\t\tarr_sql[16].append(\"UPDATE SALES.TCU033 SET\t\t\t\t\t\t\\n\") \n\t\t\t\t\t .append(\"\t\t TO_DATE\t\t\t= ?\t\t\t\t\t\\n\")\t/* 종료일자 \t*/\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t .append(\"\t\t ,COMMI_RATE\t\t= ?\t\t\t\t\t\\n\")\t/* 수수료율 \t*/\n\t\t\t\t\t .append(\"\t\t ,WEEKEND_YN\t\t= ?\t\t\t\t\t\\n\")\t/* 주말여부 \t*/\n\t\t\t\t\t \n\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t .append(\"\t\t ,u_date\t\t\t= SYSTIMESTAMP\t\\n\")\t/* 최종수정일자 \t*/\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t .append(\"\t\t ,u_empno \t\t\t= ?\t\t\t\t\t\\n\") \t/* 최종수정자사번 \t*/\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t .append(\"\t\t ,u_ip\t\t\t\t= ?\t\t\t\t\t\\n\")\t/* 최종수정IP \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\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\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t .append (\"WHERE client_sid \t\t= ? AND FR_DATE = ? AND WEEKEND_YN=? \\n\"); \n\t\t/*\n\t\t * 수수료율 삭제\n\t\t */\n\t\tarr_sql[17].append(\"DELETE FROM SALES.TCU033 WHERE client_sid = ? AND fr_date = ? AND WEEKEND_YN=? \");\t \n\t\t\t \n\n\t}",
"protected abstract PreparedResult implement( RelRoot root );",
"public interface PreparedSqlProvider {\r\n\r\n\t/**\r\n\t * This method distills the specified criteria of a query into a\r\n\t * SQL-specific object.\r\n\t * \r\n\t * @return a a SQL statement ready for processing.\r\n\t */\r\n\tpublic PreparedSql generatePreparedSql(String prefix);\r\n\r\n\t/**\r\n\t * This method distills the specified criteria of a query into a\r\n\t * SQL-specific object.\r\n\t * \r\n\t * @return a a SQL statement ready for processing.\r\n\t */\r\n\tpublic PreparedSql generatePreparedSql(BoundString prefix);\r\n\r\n}",
"@Override\n public PlainSqlQuery<T, ID> createPlainSqlQuery() {\n return null;\n }",
"public interface StatementRewriter\n{\n /**\n * Munge up the SQL as desired. Responsible for figuring out ow to bind any\n * arguments in to the resultant prepared statement.\n *\n * @param sql The SQL to rewrite\n * @param params contains the arguments which have been bound to this statement.\n * @return somethign which can provde the actual SQL to prepare a statement from\n * and which can bind the correct arguments to that prepared statement\n */\n RewrittenStatement rewrite(String sql, Binding params);\n}",
"public interface QueryExecutor {\n \n /**\n * Execute query that has neither request nor response\n *\n * @param noParamQuery query as velocity template string, it may depend on database type or other context parameters\n * @param conn connection to execute query\n */\n void executeUpdate(String noParamQuery, Connection conn);\n \n /**\n * Execute query that has no response parameters\n *\n * @param reqQuery query as velocity template string\n * @param req request query parameters\n * @param conn connection to execute query\n * @param <T> type of request\n */\n <T extends BaseDto> void executeUpdate(String reqQuery, T req, Connection conn);\n \n /**\n * Execute query that has no request parameters\n *\n * @param resQuery query as velocity template string\n * @param transformer transformer for query result\n * @param conn connection to execute query\n * @param <T> type of result\n * @return list of query results\n */\n <T extends BaseDto> List<T> executeQuery(String resQuery, QueryResultTransformer<T> transformer, Connection conn);\n \n /**\n * Execute query that has request and response\n *\n * @param reqResQuery query as velocity template string\n * @param req request query parameters\n * @param transformer transformer for query result\n * @param conn connection to execute query\n * @param <T> type of result\n * @param <V> type of request\n *\n * @return list of query results\n */\n <T extends BaseDto, V extends BaseDto> List<T> executeQuery(String reqResQuery, V req, QueryResultTransformer<T> transformer, Connection conn);\n \n /**\n * Query runner\n *\n * @return instance of query runner\n */\n default QueryRunner getQueryRunner() {\n return new QueryRunner();\n }\n\n}",
"public abstract String doTableConvert(String sql);",
"private void sqlBuilder(int sqlSelector)\n {\n String sql[] = new String[3];\n switch(sqlSelector)\n {\n case 1000: sql[0] = \"SELECT DISTINCT BRANCH_CODE FROM \"\n + \"GOSALES.BRANCH ORDER BY BRANCH_CODE\";\n sql[1] = \"SELECT DISTINCT PRODUCT_BRAND_EN FROM \"\n + \"GOSALES.PRODUCT_BRAND ORDER BY \"\n + \"PRODUCT_BRAND_EN\";\n sql[2] = \"SELECT DISTINCT PRODUCT_TYPE_EN FROM \"\n + \"GOSALES.PRODUCT_TYPE ORDER BY \"\n + \"PRODUCT_TYPE_EN\";\n initializeDropBoxes(sql, sqlSelector); \n break;\n //------------------------------------------------------------------\n case 1001: sql[0] = \"SELECT DISTINCT bran.BRANCH_CODE\\n\" \n + \"FROM GOSALES.BRANCH AS bran\\n\" \n + \"JOIN GOSALES.INVENTORY_LEVELS AS invLvls\\n\" \n + \"ON invLvls.WAREHOUSE_BRANCH_CODE = \"\n + \"bran.WAREHOUSE_BRANCH_CODE\\n\" \n + \"JOIN GOSALES.PRODUCT AS prod\\n\" \n + \"ON prod.PRODUCT_NUMBER = \"\n + \"invLvls.PRODUCT_NUMBER\\n\" \n + \"JOIN GOSALES.PRODUCT_TYPE as prodType\\n\" \n + \"ON prodType.PRODUCT_TYPE_CODE = \"\n + \"prod.PRODUCT_TYPE_CODE\\n\" \n + \"WHERE UPPER(prodType.PRODUCT_TYPE_EN) LIKE \"\n + \"UPPER('\" \n + dropBox3.getSelectedItem().toString() \n + \"') ORDER BY bran.BRANCH_CODE\";\n sql[1] = \"SELECT DISTINCT prodBrand.PRODUCT_BRAND_EN \"\n + \"FROM GOSALES.PRODUCT_BRAND AS prodBrand \"\n + \"JOIN GOSALES.SALES_TARGET AS sTar \"\n + \"ON prodBrand.PRODUCT_BRAND_CODE = \"\n + \"sTar.PRODUCT_BRAND_CODE \"\n + \"WHERE sTar.PRODUCT_TYPE_CODE = \"\n + \"(SELECT prodType.PRODUCT_TYPE_CODE \"\n + \"FROM GOSALES.PRODUCT_TYPE AS prodType \"\n + \"WHERE UPPER(prodType.PRODUCT_TYPE_EN) \"\n + \"LIKE UPPER('\" \n + dropBox3.getSelectedItem().toString() \n + \"') ORDER BY prodBrand.PRODUCT_BRAND_EN)\";\n initializeDropBoxes(sql, sqlSelector);\n break;\n //------------------------------------------------------------------\n case 1010: sql[0] = \"SELECT DISTINCT bran.BRANCH_CODE\\n\" \n + \"FROM GOSALES.BRANCH AS bran\\n\" \n + \"JOIN GOSALES.INVENTORY_LEVELS AS invLvl\\n\" \n + \"ON invLvl.WAREHOUSE_BRANCH_CODE = \"\n + \"bran.BRANCH_CODE\\n\" \n + \"JOIN GOSALES.PRODUCT AS prod\\n\" \n + \"ON prod.PRODUCT_NUMBER = \"\n + \"invLvl.PRODUCT_NUMBER\\n\" \n + \"JOIN GOSALES.PRODUCT_BRAND AS prodBrand\\n\" \n + \"ON prodBrand.PRODUCT_BRAND_CODE = \"\n + \"prod.PRODUCT_BRAND_CODE\\n\" \n + \"WHERE UPPER(prodBrand.PRODUCT_BRAND_EN) \"\n + \"LIKE UPPER('\"\n + dropBox2.getSelectedItem().toString()\n + \"')\";\n sql[2] = \"SELECT DISTINCT prodType.PRODUCT_TYPE_EN\\n\" \n + \"FROM GOSALES.PRODUCT_BRAND AS prodBrand\\n\" \n + \"JOIN GOSALES.SALES_TARGET AS saleTar\\n\" \n + \"ON saleTar.PRODUCT_BRAND_CODE = \"\n + \"prodBrand.PRODUCT_BRAND_CODE\\n\" \n + \"JOIN GOSALES.PRODUCT_TYPE AS prodType\\n\" \n + \"ON saleTar.PRODUCT_TYPE_CODE = \"\n + \"prodType.PRODUCT_TYPE_CODE\\n\" \n + \"WHERE UPPER(prodBrand.PRODUCT_BRAND_EN) \"\n + \"LIKE UPPER('\" \n + dropBox2.getSelectedItem().toString()\n + \"')\";\n initializeDropBoxes(sql, sqlSelector);\n break;\n //------------------------------------------------------------------\n case 1011: sql[0] = \"SELECT DISTINCT bran.BRANCH_CODE\\n\" \n + \"FROM GOSALES.BRANCH AS bran\\n\" \n + \"JOIN GOSALES.INVENTORY_LEVELS AS invLvl\\n\" \n + \"ON invLvl.WAREHOUSE_BRANCH_CODE = \"\n + \"bran.WAREHOUSE_BRANCH_CODE\\n\" \n + \"JOIN GOSALES.PRODUCT AS prod\\n\" \n + \"ON prod.PRODUCT_NUMBER = \"\n + \"invLvl.PRODUCT_NUMBER\\n\" \n + \"JOIN GOSALES.PRODUCT_BRAND as prodBrand\\n\" \n + \"ON prod.PRODUCT_BRAND_CODE = \"\n + \"prodBrand.PRODUCT_BRAND_CODE\\n\" \n + \"JOIN GOSALES.PRODUCT_TYPE AS prodType\\n\" \n + \"ON prod.PRODUCT_TYPE_CODE = \"\n + \"prodType.PRODUCT_TYPE_CODE\\n\" \n + \"WHERE UPPER(prodBrand.PRODUCT_BRAND_EN) \"\n + \"LIKE UPPER('\"\n + dropBox2.getSelectedItem().toString()\n + \"')\\n\" \n + \"AND UPPER(prodType.PRODUCT_TYPE_EN) \"\n + \"LIKE UPPER('\"\n + dropBox3.getSelectedItem().toString()\n + \"')\\n\" \n + \"ORDER BY bran.BRANCH_CODE\";\n initializeDropBoxes(sql, sqlSelector);\n break;\n //------------------------------------------------------------------\n case 1100: sql[1] = \"SELECT DISTINCT prodBrand.PRODUCT_BRAND_EN\\n\" \n + \"FROM GOSALES.BRANCH AS bran\\n\" \n + \"JOIN GOSALES.INVENTORY_LEVELS AS invLvl\\n\" \n + \"ON invLvl.WAREHOUSE_BRANCH_CODE = \"\n + \"bran.WAREHOUSE_BRANCH_CODE\\n\" \n + \"JOIN GOSALES.PRODUCT AS prod\\n\" \n + \"ON prod.PRODUCT_NUMBER = \"\n + \"invLvl.PRODUCT_NUMBER\\n\" \n + \"JOIN GOSALES.PRODUCT_BRAND as prodBrand\\n\" \n + \"ON prod.PRODUCT_BRAND_CODE = \"\n + \"prodBrand.PRODUCT_BRAND_CODE\\n\" \n + \"JOIN GOSALES.PRODUCT_TYPE AS prodType\\n\" \n + \"ON prod.PRODUCT_TYPE_CODE = \"\n + \"prodType.PRODUCT_TYPE_CODE\\n\" \n + \"WHERE bran.BRANCH_CODE = \"\n + dropBox1.getSelectedItem().toString()\n + \" ORDER BY prodBrand.PRODUCT_BRAND_EN\";\n sql[2] = \"SELECT DISTINCT prodType.PRODUCT_TYPE_EN\\n\" \n + \"FROM GOSALES.BRANCH AS bran\\n\" \n + \"JOIN GOSALES.INVENTORY_LEVELS AS invLvl\\n\" \n + \"ON invLvl.WAREHOUSE_BRANCH_CODE = \"\n + \"bran.WAREHOUSE_BRANCH_CODE\\n\" \n + \"JOIN GOSALES.PRODUCT AS prod\\n\" \n + \"ON prod.PRODUCT_NUMBER = \"\n + \"invLvl.PRODUCT_NUMBER\\n\" \n + \"JOIN GOSALES.PRODUCT_BRAND as prodBrand\\n\" \n + \"ON prod.PRODUCT_BRAND_CODE = \"\n + \"prodBrand.PRODUCT_BRAND_CODE\\n\" \n + \"JOIN GOSALES.PRODUCT_TYPE AS prodType\\n\" \n + \"ON prod.PRODUCT_TYPE_CODE = \"\n + \"prodType.PRODUCT_TYPE_CODE\\n\" \n + \"WHERE bran.BRANCH_CODE = \"\n + dropBox1.getSelectedItem().toString()\n + \" ORDER BY prodType.PRODUCT_TYPE_EN\";\n initializeDropBoxes(sql, sqlSelector);\n break;\n //------------------------------------------------------------------\n case 1101: sql[1] = \"SELECT DISTINCT prodBrand.PRODUCT_BRAND_EN\\n\" \n + \"FROM GOSALES.BRANCH AS bran\\n\" \n + \"JOIN GOSALES.INVENTORY_LEVELS AS invLvl\\n\" \n + \"ON invLvl.WAREHOUSE_BRANCH_CODE = \"\n + \"bran.WAREHOUSE_BRANCH_CODE\\n\" \n + \"JOIN GOSALES.PRODUCT AS prod\\n\" \n + \"ON prod.PRODUCT_NUMBER = \"\n + \"invLvl.PRODUCT_NUMBER\\n\" \n + \"JOIN GOSALES.PRODUCT_BRAND as prodBrand\\n\" \n + \"ON prod.PRODUCT_BRAND_CODE = \"\n + \"prodBrand.PRODUCT_BRAND_CODE\\n\" \n + \"JOIN GOSALES.PRODUCT_TYPE AS prodType\\n\" \n + \"ON prod.PRODUCT_TYPE_CODE = \"\n + \"prodType.PRODUCT_TYPE_CODE\\n\" \n + \"WHERE bran.BRANCH_CODE = \"\n + dropBox1.getSelectedItem().toString()\n + \" AND UPPER(prodType.PRODUCT_TYPE_EN) LIKE UPPER('\"\n + dropBox3.getSelectedItem().toString()\n + \"') ORDER BY prodBrand.PRODUCT_BRAND_EN\";\n initializeDropBoxes(sql, sqlSelector);\n break;\n //------------------------------------------------------------------\n case 1110: sql[2] = \"SELECT DISTINCT prodType.PRODUCT_TYPE_EN\\n\" \n + \"FROM GOSALES.BRANCH AS bran\\n\" \n + \"JOIN GOSALES.INVENTORY_LEVELS AS invLvl\\n\" \n + \"ON invLvl.WAREHOUSE_BRANCH_CODE = \"\n + \"bran.WAREHOUSE_BRANCH_CODE\\n\" \n + \"JOIN GOSALES.PRODUCT AS prod\\n\" \n + \"ON prod.PRODUCT_NUMBER = \"\n + \"invLvl.PRODUCT_NUMBER\\n\" \n + \"JOIN GOSALES.PRODUCT_BRAND as prodBrand\\n\" \n + \"ON prod.PRODUCT_BRAND_CODE = \"\n + \"prodBrand.PRODUCT_BRAND_CODE\\n\" \n + \"JOIN GOSALES.PRODUCT_TYPE AS prodType\\n\" \n + \"ON prod.PRODUCT_TYPE_CODE = \"\n + \"prodType.PRODUCT_TYPE_CODE\\n\" \n + \"WHERE bran.BRANCH_CODE = \"\n + dropBox1.getSelectedItem().toString()\n + \" AND UPPER(prodBrand.PRODUCT_BRAND_EN) \"\n + \"LIKE UPPER('\"\n + dropBox2.getSelectedItem().toString()\n + \"') ORDER BY prodType.PRODUCT_TYPE_EN\";\n initializeDropBoxes(sql, sqlSelector);\n break;\n //------------------------------------------------------------------\n case 2111: sql[0] = \"SELECT SUM((orderDet.quantity * \"\n + \"orderDet.unit_sale_price)) AS total\\n\" \n + \"FROM GOSALES.BRANCH AS bran\\n\" \n + \"JOIN GOSALES.INVENTORY_LEVELS AS invLvl\\n\" \n + \"ON invLvl.WAREHOUSE_BRANCH_CODE = \"\n + \"bran.WAREHOUSE_BRANCH_CODE\\n\" \n + \"JOIN GOSALES.PRODUCT AS prod\\n\" \n + \"ON prod.PRODUCT_NUMBER = \"\n + \"invLvl.PRODUCT_NUMBER\\n\" \n + \"JOIN GOSALES.PRODUCT_BRAND as prodBrand\\n\" \n + \"ON prod.PRODUCT_BRAND_CODE = \"\n + \"prodBrand.PRODUCT_BRAND_CODE\\n\" \n + \"JOIN GOSALES.PRODUCT_TYPE AS prodType\\n\" \n + \"ON prod.PRODUCT_TYPE_CODE = \"\n + \"prodType.PRODUCT_TYPE_CODE\\n\" \n + \"JOIN GOSALES.ORDER_DETAILS AS orderDet\\n\" \n + \"ON orderDet.PRODUCT_NUMBER = \"\n + \"prod.PRODUCT_NUMBER\\n\" \n + \"WHERE bran.BRANCH_CODE = \"\n + dropBox1.getSelectedItem().toString()\n + \" AND UPPER(prodBrand.PRODUCT_BRAND_EN) \"\n + \"LIKE UPPER('\"\n + dropBox2.getSelectedItem().toString()\n + \"') AND UPPER(prodType.PRODUCT_TYPE_EN) \"\n + \"LIKE UPPER('\"\n + dropBox3.getSelectedItem().toString()\n + \"')\";\n initializeDropBoxes(sql, sqlSelector);\n break;\n //------------------------------------------------------------------\n case 2000: sql[0] = \"SELECT SUM((orderDet.quantity * \"\n + \"orderDet.unit_sale_price)) AS total\\n\" \n + \"FROM GOSALES.BRANCH AS bran\\n\" \n + \"JOIN GOSALES.INVENTORY_LEVELS AS invLvl\\n\" \n + \"ON invLvl.WAREHOUSE_BRANCH_CODE = \"\n + \"bran.WAREHOUSE_BRANCH_CODE\\n\" \n + \"JOIN GOSALES.PRODUCT AS prod\\n\" \n + \"ON prod.PRODUCT_NUMBER = \"\n + \"invLvl.PRODUCT_NUMBER\\n\" \n + \"JOIN GOSALES.PRODUCT_BRAND as prodBrand\\n\" \n + \"ON prod.PRODUCT_BRAND_CODE = \"\n + \"prodBrand.PRODUCT_BRAND_CODE\\n\" \n + \"JOIN GOSALES.PRODUCT_TYPE AS prodType\\n\" \n + \"ON prod.PRODUCT_TYPE_CODE = \"\n + \"prodType.PRODUCT_TYPE_CODE\\n\" \n + \"JOIN GOSALES.ORDER_DETAILS AS orderDet\\n\" \n + \"ON orderDet.PRODUCT_NUMBER = \"\n + \"prod.PRODUCT_NUMBER\\n\";\n initializeDropBoxes(sql, sqlSelector);\n break;\n //------------------------------------------------------------------\n case 2001: sql[0] = \"SELECT SUM((orderDet.quantity * \"\n + \"orderDet.unit_sale_price)) AS total\\n\" \n + \"FROM GOSALES.BRANCH AS bran\\n\" \n + \"JOIN GOSALES.INVENTORY_LEVELS AS invLvl\\n\"\n + \"ON invLvl.WAREHOUSE_BRANCH_CODE = \"\n + \"bran.WAREHOUSE_BRANCH_CODE\\n\" \n + \"JOIN GOSALES.PRODUCT AS prod\\n\" \n + \"ON prod.PRODUCT_NUMBER = \"\n + \"invLvl.PRODUCT_NUMBER\\n\" \n + \"JOIN GOSALES.PRODUCT_BRAND as prodBrand\\n\" \n + \"ON prod.PRODUCT_BRAND_CODE = \"\n + \"prodBrand.PRODUCT_BRAND_CODE\\n\" \n + \"JOIN GOSALES.PRODUCT_TYPE AS prodType\\n\" \n + \"ON prod.PRODUCT_TYPE_CODE = \"\n + \"prodType.PRODUCT_TYPE_CODE\\n\" \n + \"JOIN GOSALES.ORDER_DETAILS AS orderDet\\n\" \n + \"ON orderDet.PRODUCT_NUMBER = \"\n + \"prod.PRODUCT_NUMBER\\n\" \n + \" WHERE UPPER(prodType.PRODUCT_TYPE_EN) LIKE \"\n + \"UPPER('\"\n + dropBox3.getSelectedItem().toString()\n +\"')\";\n initializeDropBoxes(sql, sqlSelector);\n break;\n //------------------------------------------------------------------\n case 2010: sql[0] = \"SELECT SUM((orderDet.quantity * \"\n + \"orderDet.unit_sale_price)) AS total\\n\" \n + \"FROM GOSALES.BRANCH AS bran\\n\" \n + \"JOIN GOSALES.INVENTORY_LEVELS AS invLvl\\n\" \n + \"ON invLvl.WAREHOUSE_BRANCH_CODE = \"\n + \"bran.WAREHOUSE_BRANCH_CODE\\n\" \n + \"JOIN GOSALES.PRODUCT AS prod\\n\" \n + \"ON prod.PRODUCT_NUMBER = \"\n + \"invLvl.PRODUCT_NUMBER\\n\" \n + \"JOIN GOSALES.PRODUCT_BRAND as prodBrand\\n\" \n + \"ON prod.PRODUCT_BRAND_CODE = \"\n + \"prodBrand.PRODUCT_BRAND_CODE\\n\" \n + \"JOIN GOSALES.PRODUCT_TYPE AS prodType\\n\" \n + \"ON prod.PRODUCT_TYPE_CODE = \"\n + \"prodType.PRODUCT_TYPE_CODE\\n\" \n + \"JOIN GOSALES.ORDER_DETAILS AS orderDet\\n\" \n + \"ON orderDet.PRODUCT_NUMBER = \"\n + \"prod.PRODUCT_NUMBER\\n\" \n + \"WHERE UPPER(prodBrand.PRODUCT_BRAND_EN) \"\n + \"LIKE UPPER('\"\n + dropBox2.getSelectedItem().toString()\n + \"')\";\n initializeDropBoxes(sql, sqlSelector);\n break;\n //------------------------------------------------------------------\n case 2011: sql[0] = \"SELECT SUM((orderDet.quantity * \"\n + \"orderDet.unit_sale_price)) AS total\\n\" \n + \"FROM GOSALES.BRANCH AS bran\\n\" \n + \"JOIN GOSALES.INVENTORY_LEVELS AS invLvl\\n\" \n + \"ON invLvl.WAREHOUSE_BRANCH_CODE = \"\n + \"bran.WAREHOUSE_BRANCH_CODE\\n\" \n + \"JOIN GOSALES.PRODUCT AS prod\\n\" \n + \"ON prod.PRODUCT_NUMBER = \"\n + \"invLvl.PRODUCT_NUMBER\\n\" \n + \"JOIN GOSALES.PRODUCT_BRAND as prodBrand\\n\" \n + \"ON prod.PRODUCT_BRAND_CODE = \"\n + \"prodBrand.PRODUCT_BRAND_CODE\\n\" \n + \"JOIN GOSALES.PRODUCT_TYPE AS prodType\\n\" \n + \"ON prod.PRODUCT_TYPE_CODE = \"\n + \"prodType.PRODUCT_TYPE_CODE\\n\" \n + \"JOIN GOSALES.ORDER_DETAILS AS orderDet\\n\" \n + \"ON orderDet.PRODUCT_NUMBER = \"\n + \"prod.PRODUCT_NUMBER\\n\" \n + \"WHERE UPPER(prodBrand.PRODUCT_BRAND_EN) \"\n + \"LIKE UPPER('\"\n + dropBox2.getSelectedItem().toString()\n + \"') AND UPPER(prodType.PRODUCT_TYPE_EN) \"\n + \"LIKE UPPER('\"\n + dropBox3.getSelectedItem().toString()\n + \"')\";\n initializeDropBoxes(sql, sqlSelector);\n break;\n //------------------------------------------------------------------\n case 2100: sql[0] = \"SELECT SUM((orderDet.quantity * \"\n + \"orderDet.unit_sale_price)) AS total\\n\" \n + \"FROM GOSALES.BRANCH AS bran\\n\" \n + \"JOIN GOSALES.INVENTORY_LEVELS AS invLvl\\n\" \n + \"ON invLvl.WAREHOUSE_BRANCH_CODE = \"\n + \"bran.WAREHOUSE_BRANCH_CODE\\n\" \n + \"JOIN GOSALES.PRODUCT AS prod\\n\" \n + \"ON prod.PRODUCT_NUMBER = \"\n + \"invLvl.PRODUCT_NUMBER\\n\" \n + \"JOIN GOSALES.PRODUCT_BRAND as prodBrand\\n\" \n + \"ON prod.PRODUCT_BRAND_CODE = \"\n + \"prodBrand.PRODUCT_BRAND_CODE\\n\" \n + \"JOIN GOSALES.PRODUCT_TYPE AS prodType\\n\" \n + \"ON prod.PRODUCT_TYPE_CODE = \"\n + \"prodType.PRODUCT_TYPE_CODE\\n\" \n + \"JOIN GOSALES.ORDER_DETAILS AS orderDet\\n\" \n + \"ON orderDet.PRODUCT_NUMBER = \"\n + \"prod.PRODUCT_NUMBER\\n\" \n + \"WHERE bran.BRANCH_CODE = \"\n + dropBox1.getSelectedItem().toString();\n initializeDropBoxes(sql, sqlSelector);\n break;\n //------------------------------------------------------------------\n case 2101: sql[0] = \"SELECT SUM((orderDet.quantity * \"\n + \"orderDet.unit_sale_price)) AS total\\n\" \n + \"FROM GOSALES.BRANCH AS bran\\n\" \n + \"JOIN GOSALES.INVENTORY_LEVELS AS invLvl\\n\" \n + \"ON invLvl.WAREHOUSE_BRANCH_CODE = \"\n + \"bran.WAREHOUSE_BRANCH_CODE\\n\" \n + \"JOIN GOSALES.PRODUCT AS prod\\n\" \n + \"ON prod.PRODUCT_NUMBER = \"\n + \"invLvl.PRODUCT_NUMBER\\n\" \n + \"JOIN GOSALES.PRODUCT_BRAND as prodBrand\\n\" \n + \"ON prod.PRODUCT_BRAND_CODE = \"\n + \"prodBrand.PRODUCT_BRAND_CODE\\n\" \n + \"JOIN GOSALES.PRODUCT_TYPE AS prodType\\n\" \n + \"ON prod.PRODUCT_TYPE_CODE = \"\n + \"prodType.PRODUCT_TYPE_CODE\\n\" \n + \"JOIN GOSALES.ORDER_DETAILS AS orderDet\\n\" \n + \"ON orderDet.PRODUCT_NUMBER = \"\n + \"prod.PRODUCT_NUMBER\\n\" \n + \"WHERE bran.BRANCH_CODE = \"\n + dropBox1.getSelectedItem().toString()\n + \" AND UPPER(prodType.PRODUCT_TYPE_EN) \"\n + \"LIKE UPPER('\"\n + dropBox3.getSelectedItem().toString()\n + \"')\";\n initializeDropBoxes(sql, sqlSelector);\n break;\n \n }\n }",
"private void compile() throws QueryException, MappingException {\n \t\tLOG.trace( \"Compiling query\" );\n \t\ttry {\n \t\t\tParserHelper.parse( new PreprocessingParser( tokenReplacements ),\n \t\t\t\t\tqueryString,\n \t\t\t\t\tParserHelper.HQL_SEPARATORS,\n \t\t\t\t\tthis );\n \t\t\trenderSQL();\n \t\t}\n \t\tcatch ( QueryException qe ) {\n \t\t\tqe.setQueryString( queryString );\n \t\t\tthrow qe;\n \t\t}\n \t\tcatch ( MappingException me ) {\n \t\t\tthrow me;\n \t\t}\n \t\tcatch ( Exception e ) {\n \t\t\tLOG.debug( \"Unexpected query compilation problem\", e );\n \t\t\te.printStackTrace();\n \t\t\tQueryException qe = new QueryException( \"Incorrect query syntax\", e );\n \t\t\tqe.setQueryString( queryString );\n \t\t\tthrow qe;\n \t\t}\n \n \t\tpostInstantiate();\n \n \t\tcompiled = true;\n \n \t}",
"public interface MysqldataQueryDao {\n public List<Map<String, Object>> Querydata(String sql);\n public List<Map<String, Object>> Querymaindata(String sql);\n\n}",
"public abstract void applyToQuery(DatabaseQuery theQuery, GenerationContext context);",
"private void executeQuery() {\n }",
"SelectQuery createSelectQuery();",
"void build(ISqlClauseBuilder builder);",
"private static SqlScalars generateSqlForPerson(OptionsId options) {\n SqlScalars sqlScalars = new SqlScalars();\n // Make sure to set the alias for the files for the Transformation into the class\n sqlScalars.addToSql(\"SELECT DISTINCT p.id,p.name,\");\n sqlScalars.addToSql(\"p.first_name AS firstName,\");\n sqlScalars.addToSql(\"p.last_name AS lastName,\");\n sqlScalars.addToSql(\"p.birth_day AS birthDay,\");\n sqlScalars.addToSql(\"p.birth_place AS birthPlace,\");\n sqlScalars.addToSql(\"p.birth_name AS birthName,\");\n sqlScalars.addToSql(\"p.death_day AS deathDay,\");\n sqlScalars.addToSql(\"p.death_place AS deathPlace\");\n sqlScalars.addToSql(DataItemTools.addSqlDataItems(options.splitDataItems(), \"p\").toString());\n sqlScalars.addToSql(\"FROM person p\");\n\n if (options.getId() > 0L) {\n sqlScalars.addToSql(\"WHERE p.status\" + SQL_IGNORE_STATUS_SET);\n sqlScalars.addToSql(\"AND id=:id\");\n sqlScalars.addParameter(LITERAL_ID, options.getId());\n } else {\n if (MapUtils.isNotEmpty(options.splitJobs())) {\n sqlScalars.addToSql(\", cast_crew c\");\n }\n sqlScalars.addToSql(\"WHERE p.status\" + SQL_IGNORE_STATUS_SET);\n\n if (MapUtils.isNotEmpty(options.splitJobs())) {\n sqlScalars.addToSql(\"AND p.id=c.person_id\");\n sqlScalars.addToSql(\"AND c.job IN (:jobs)\");\n sqlScalars.addParameter(\"jobs\", options.getJobTypes());\n }\n\n // Add the search string\n sqlScalars.addToSql(options.getSearchString(false));\n // This will default to blank if there's no sort required\n sqlScalars.addToSql(options.getSortString());\n }\n\n sqlScalars.addScalar(LITERAL_ID, LongType.INSTANCE);\n sqlScalars.addScalar(LITERAL_NAME, StringType.INSTANCE);\n sqlScalars.addScalar(LITERAL_FIRST_NAME, StringType.INSTANCE);\n sqlScalars.addScalar(LITERAL_LAST_NAME, StringType.INSTANCE);\n sqlScalars.addScalar(LITERAL_BIRTH_DAY, DateType.INSTANCE);\n sqlScalars.addScalar(LITERAL_BIRTH_PLACE, StringType.INSTANCE);\n sqlScalars.addScalar(LITERAL_BIRTH_NAME, StringType.INSTANCE);\n sqlScalars.addScalar(LITERAL_DEATH_DAY, DateType.INSTANCE);\n sqlScalars.addScalar(LITERAL_DEATH_PLACE, StringType.INSTANCE);\n\n // add Scalars for additional data item columns\n DataItemTools.addDataItemScalars(sqlScalars, options.splitDataItems());\n\n return sqlScalars;\n }",
"public interface SQLConverter {\n String convert(Statement statement, Object params, String mapperId);\n}",
"public abstract String createQuery();",
"SQLCall createSQLCall();",
"@Override\n\tpublic String onPrepareStatement(String sql) {\n\t\tif(!sql.contains(INSERT)){\n\t\t\t// We have to handle criteria query bit differently since\n\t\t\t// Hibernate framework is adding extra comment (/* criteria query */) to the query.\n\t\t\tif(sql.contains(\"/* criteria query */\")){\n\t\t\t\tsql = sql.replace(\"/* criteria query */\", \"\");\n\t\t\t}\n\t\t\treturn sql;\n\t\t}\n\t\tif(sql.contains(SEPARATOR+INSERT)){\n\t\t\treturn sql;\n\t\t}\n\t\tString modelClass=\"\";\n\t\tString calComment = \"\";\n\t\t\n\t\tStringBuilder fullQuery = new StringBuilder(sql);\n\t\t// Manipulating the existing comment \n\t\ttry{\n\t\t\tif (sql.indexOf(\"/* \") != -1){\n\t\t\t\tString str = sql.substring(sql.indexOf(\"/*\")+2, sql.indexOf(\"*/\")-1);\n\t\t\t\tmodelClass = str.substring(str.lastIndexOf('.')+1,str.length());\n\t\t\t}\n\t\t\t\n\t\t\tcalComment = modelClass+SEPARATOR+INSERT ;\n\t\t\tsql = sql.substring(sql.indexOf(\"*/\")+2).trim();\n\t\t\tfullQuery = new StringBuilder(sql.length());\n\t\t\t\n\t\t\tfullQuery.append(\"/* \").append(calComment).append(\n\t\t\t\t\t\" */ \").append(sql);\n\t\t}catch (Exception e) {\n\t\t\t// No Operation -- Stick to original query and comment\n\t\t}\n\t\t\n\t\treturn fullQuery.toString();\n\t}",
"default String preprocessSQL(String sql, QueryParameters queryParameters, SessionFactoryImplementor factory,\n\t\t\t\t\t\t List<AfterLoadAction> afterLoadActions) {\n\t\t// I believe this method is only needed for query-type loaders\n\t\treturn sql;\n\t}",
"@Override\r\n\tpublic Sql sql(SqlManager sqlManager) {\n\t\treturn null;\r\n\r\n\t}",
"protected String generateSQL() {\n String fields = generateFieldsJSON();\n return String.format(QUERY_PATTERN, fields, esQuery.generateQuerySQL(), from, size);\n }",
"private DbQuery() {}",
"private void executeRequest(String sql) {\n\t}",
"Object executeSelectQuery(String sql) { return null;}",
"public interface BaseQueryBuilder {\n\n /**\n * \n * 查询构建完成\n * \n * @return {@link EsdslBuilder}\n * @since JDK 1.8\n */\n EsdslBuilder queryDone();\n}",
"public interface SQLStatementWrapper\n\t{\n\t/**\n\t * Wrap an SQL statement for execution, e.g. by appending a terminator\n\t * @param statement SQL statement to wrap\n\t * @return Wrapped statement\n\t */\n\tpublic String wrapStatement(String statement);\n\t}",
"public interface OrderDAOI{ \r\n\r\n \r\n enum SQL {\r\n\t\tGETALLUSERSORDERSBYID(\"SELECT * FROM TSR_ADMIN.TSR_ORDER WHERE CUSTOMER_ID=?\"),\r\n GETORDERBYDATE(\"SELECT * FROM TSR_ADMIN.TSR_ORDER WHERE ORDER_DATE=?\"),\r\n GETORDERBYID(\"SELECT * FROM TSR_ADMIN.TSR_ODER WHERE ORDER_ID=?\");\r\n\t\t\r\n\t\tString query;\r\n\t\t\r\n\t\tSQL(String givenQuery){\r\n\t\t\tquery = givenQuery;\r\n\t\t}\r\n\t\t\r\n\t\tString getQuery() {\r\n\t\t\treturn query;\r\n\t\t}\r\n }\r\n\r\n /**\r\n * getAllUsersOrdersById gets all of a users orders.\r\n * @param userId the user's ID \r\n * @return A list of orders type List\r\n */\r\n public List<Order> getAllUsersOrdersById(long userId);\r\n\r\n /**\r\n * getOrdersByDate gets all orders on a specified date\r\n * @param date the date of the order(s)\r\n * @return a List of Orders type List\r\n */\r\n public List<Order> getOrdersByDate(Date date);\r\n\r\n /**\r\n * getOrderByid returns an order specified by the ID\r\n * @param orderId the order's Id\r\n * @return a list of Orders type List\r\n */\r\n public Order getOrderById(long orderId);\r\n\r\n}",
"public interface MySQLDBQuery {\n\n\tString QUERY_ADD_SLOT = \"insert into slot (s_size) values (?)\";\n\tString QUERY_FIND_SLOT = \"select s_id, s_size, s_covered from slot where s_size = ? and s_covered = ? and s_id not in (select s_id from slot_has_vehicle) limit 1\";\n\tString QUERY_GET_SLOT_STATISTICS = \"select count(1) as all_slot, (select count(1) from slot where s_covered > 0) as reserve_slot from slot\";\n\tString QUERY_GET_FIND_A_SLOT = \"select s_id, s_size, s_covered from slot where s_id = ?\";\n\tString QUERY_FREE_SLOT_RESERVATION = \"update slot_has_vehicle set sl_end = now() where sl_id = ?\";\n\tString QUERY_OCCUPY_A_SLOT = \"insert into slot_has_vehicle (s_id, v_id) values (?,?)\";\n\tString QUERY_GET_SLOT_RESERVATION_BY_ID = \"select sl_id, s_id, v_id, sl_start, sl_end from slot_has_vehicle where sl_id = ?\";\n\tString QUERY_FIND_SLOT_OCCUPIED_BY_VEHICLE = \"select sl_id, s_id, v_id, sl_start, sl_end from slot_has_vehicle where v_id = (select v_id from vehicle where v_reg_num = ?) and sl_end IS NULL\";\n\tString QUERY_GET_VEHICLE_BY_REG_NUMBER = \"select v_id, v_reg_num, v_type from vehicle where v_reg_num=?\";\n\tString QUERY_CREATE_A_VEHICLE = \"insert into vehicle (v_reg_num, v_type) values (?,?)\";\n\tString QUERY_DELETE_SLOT_RESERVATION = \"delete from slot_has_vehicle where sl_id=?\";\n}",
"private String buildQuery(String ... sql) {\n\t\tfinal StringBuffer sb = new StringBuffer();\n\t\t\n\t\tfor (String s : sql) {\n\t\t\tsb.append(ParsingUtil.QUERY + \" \" + s + \"\\n\");\n\t\t}\n\t\t\n\t\treturn sb.toString(); \n\t}",
"public List sqlQuery(String sql,Object... params);",
"public interface BaseDao {\n\n int getTotalCount(SelectArgs selectArgs);\n\n List<Map<String,Object>> queryList(SelectArgs selectArgs);\n\n int addRecord (InsertArgs insertArgs);\n}",
"private void setSql() {\n sql = sqlData.getSql();\n }",
"protected String processGeneratedSql( String sql ) {\n return sql;\n }",
"public interface SQLGenerator {\n\n public void insertRecordsToDatabase() throws Exception;\n\n}",
"protected AbstractJoSQLFilter ()\n {\n\n }",
"protected String buildDataQuery() {\n StringBuilder sql = new StringBuilder(\"select\");\n String delim = \" \";\n for (String vname : getColumnNames()) {\n sql.append(delim).append(vname);\n delim = \", \";\n }\n \n Element ncElement = getNetcdfElement();\n \n String table = ncElement.getAttributeValue(\"dbTable\");\n if (table == null) {\n String msg = \"No database table defined. Must set 'dbTable' attribute.\";\n _logger.error(msg);\n throw new TSSException(msg);\n }\n sql.append(\" from \" + table);\n \n String predicate = ncElement.getAttributeValue(\"predicate\");\n if (predicate != null) sql.append(\" where \" + predicate);\n \n //Order by time.\n String tname = getTimeVarName();\n sql.append(\" order by \"+tname+\" ASC\");\n \n return sql.toString();\n }",
"protected void runSQL(String sql) {\n\t\ttry {\n\t\t\tDataSource dataSource = itemPublicacaoPersistence.getDataSource();\n\n\t\t\tDB db = DBManagerUtil.getDB();\n\n\t\t\tsql = db.buildSQL(sql);\n\t\t\tsql = PortalUtil.transformSQL(sql);\n\n\t\t\tSqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,\n\t\t\t\t\tsql);\n\n\t\t\tsqlUpdate.update();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow new SystemException(e);\n\t\t}\n\t}",
"public void finalPass() throws Exception {\n if (_CommandText != null)\n _CommandText.finalPass();\n \n if (_QueryParameters != null)\n _QueryParameters.finalPass();\n \n // verify the data source\n DataSourceDefn ds = null;\n if (OwnerReport.getDataSourcesDefn() != null && OwnerReport.getDataSourcesDefn().getItems() != null)\n {\n ds = OwnerReport.getDataSourcesDefn().get___idx(_DataSourceName);\n }\n \n if (ds == null)\n {\n OwnerReport.rl.logError(8,\"Query references unknown data source '\" + _DataSourceName + \"'\");\n return ;\n }\n \n _DataSourceDefn = ds;\n IDbConnection cnSQL = ds.sqlConnect(null);\n if (cnSQL == null || _CommandText == null)\n return ;\n \n // Treat this as a SQL statement\n String sql = _CommandText.evaluateString(null,null);\n IDbCommand cmSQL = null;\n IDataReader dr = null;\n try\n {\n cmSQL = cnSQL.CreateCommand();\n cmSQL.CommandText = addParametersAsLiterals(null,cnSQL,sql,false);\n if (this._QueryCommandType == QueryCommandTypeEnum.StoredProcedure)\n cmSQL.CommandType = CommandType.StoredProcedure;\n \n addParameters(null,cnSQL,cmSQL,false);\n dr = cmSQL.ExecuteReader(CommandBehavior.SchemaOnly);\n if (dr.FieldCount < 10)\n _Columns = new ListDictionary();\n else\n // Hashtable is overkill for small lists\n _Columns = new Hashtable(dr.FieldCount); \n for (int i = 0;i < dr.FieldCount;i++)\n {\n QueryColumn qc = new QueryColumn(i, dr.GetName(i), Type.GetTypeCode(dr.GetFieldType(i)));\n try\n {\n _Columns.Add(qc.colName, qc);\n }\n catch (Exception __dummyCatchVar0)\n {\n // name has already been added to list:\n // According to the RDL spec SQL names are matched by Name not by relative\n // position: this seems wrong to me and causes this problem; but\n // user can fix by using \"as\" keyword to name columns in Select\n // e.g. Select col as \"col1\", col as \"col2\" from tableA\n OwnerReport.rl.LogError(8, String.Format(\"Column '{0}' is not uniquely defined within the SQL Select columns.\", qc.colName));\n }\n \n }\n }\n catch (Exception e)\n {\n OwnerReport.rl.logError(4,\"SQL Exception during report compilation: \" + e.Message + \"\\r\\nSQL: \" + sql);\n }\n finally\n {\n if (cmSQL != null)\n {\n cmSQL.Dispose();\n if (dr != null)\n dr.Close();\n \n }\n \n }\n return ;\n }",
"protected void execute() {}",
"default With withSQL(final String sql) {\r\n\t\treturn with((String) null).sql(sql);\r\n\t}",
"public interface Sql extends Terminable {\n\n /**\n * Gets the Hikari instance backing the datasource\n *\n * @return the hikari instance\n */\n @Nonnull\n HikariDataSource getHikari();\n\n /**\n * Gets a connection from the datasource.\n *\n * <p>The connection should be returned once it has been used.</p>\n *\n * @return a connection\n */\n @Nonnull\n Connection getConnection() throws SQLException;\n\n /**\n * Gets a {@link SqlStream} instance for this {@link Sql}.\n *\n * @return a instance of the stream library for this connection.\n */\n @Nonnull\n SqlStream stream();\n\n /**\n * Executes a database statement with no preparation.\n *\n * <p>This will be executed on an asynchronous thread.</p>\n *\n * @param statement the statement to be executed\n * @return a Promise of an asynchronous database execution\n * @see #execute(String) to perform this action synchronously\n */\n @Nonnull\n default Promise<Void> executeAsync(@Language(\"MySQL\") @Nonnull String statement) {\n return Schedulers.async().run(() -> this.execute(statement));\n }\n\n /**\n * Executes a database statement with no preparation.\n *\n * <p>This will be executed on whichever thread it's called from.</p>\n *\n * @param statement the statement to be executed\n * @see #executeAsync(String) to perform the same action asynchronously\n */\n default void execute(@Language(\"MySQL\") @Nonnull String statement) {\n this.execute(statement, stmt -> {});\n }\n\n /**\n * Executes a database statement with preparation.\n *\n * <p>This will be executed on an asynchronous thread.</p>\n *\n * @param statement the statement to be executed\n * @param preparer the preparation used for this statement\n * @return a Promise of an asynchronous database execution\n * @see #executeAsync(String, SqlConsumer) to perform this action synchronously\n */\n @Nonnull\n default Promise<Void> executeAsync(@Language(\"MySQL\") @Nonnull String statement, @Nonnull SqlConsumer<PreparedStatement> preparer) {\n return Schedulers.async().run(() -> this.execute(statement, preparer));\n }\n\n /**\n * Executes a database statement with preparation.\n *\n * <p>This will be executed on whichever thread it's called from.</p>\n *\n * @param statement the statement to be executed\n * @param preparer the preparation used for this statement\n * @see #executeAsync(String, SqlConsumer) to perform this action asynchronously\n */\n void execute(@Language(\"MySQL\") @Nonnull String statement, @Nonnull SqlConsumer<PreparedStatement> preparer);\n\n /**\n * Executes a database query with no preparation.\n *\n * <p>This will be executed on an asynchronous thread.</p>\n *\n * <p>In the case of a {@link SQLException} or in the case of\n * no data being returned, or the handler evaluating to null,\n * this method will return an {@link Optional#empty()} object.</p>\n *\n * @param query the query to be executed\n * @param handler the handler for the data returned by the query\n * @param <R> the returned type\n * @return a Promise of an asynchronous database query\n * @see #query(String, SqlFunction) to perform this query synchronously\n */\n default <R> Promise<Optional<R>> queryAsync(@Language(\"MySQL\") @Nonnull String query, @Nonnull SqlFunction<ResultSet, R> handler) {\n return Schedulers.async().supply(() -> this.query(query, handler));\n }\n\n /**\n * Executes a database query with no preparation.\n *\n * <p>This will be executed on whichever thread it's called from.</p>\n *\n * <p>In the case of a {@link SQLException} or in the case of\n * no data being returned, or the handler evaluating to null,\n * this method will return an {@link Optional#empty()} object.</p>\n *\n * @param query the query to be executed\n * @param handler the handler for the data returned by the query\n * @param <R> the returned type\n * @return the results of the database query\n * @see #queryAsync(String, SqlFunction) to perform this query asynchronously\n */\n default <R> Optional<R> query(@Language(\"MySQL\") @Nonnull String query, @Nonnull SqlFunction<ResultSet, R> handler) {\n return this.query(query, stmt -> {}, handler);\n }\n\n /**\n * Executes a database query with preparation.\n *\n * <p>This will be executed on an asynchronous thread.</p>\n *\n * <p>In the case of a {@link SQLException} or in the case of\n * no data being returned, or the handler evaluating to null,\n * this method will return an {@link Optional#empty()} object.</p>\n *\n * @param query the query to be executed\n * @param preparer the preparation used for this statement\n * @param handler the handler for the data returned by the query\n * @param <R> the returned type\n * @return a Promise of an asynchronous database query\n * @see #query(String, SqlFunction) to perform this query synchronously\n */\n default <R> Promise<Optional<R>> queryAsync(@Language(\"MySQL\") @Nonnull String query, @Nonnull SqlConsumer<PreparedStatement> preparer, @Nonnull SqlFunction<ResultSet, R> handler) {\n return Schedulers.async().supply(() -> this.query(query, preparer, handler));\n }\n /**\n * Executes a database query with preparation.\n *\n * <p>This will be executed on whichever thread it's called from.</p>\n *\n * <p>In the case of a {@link SQLException} or in the case of\n * no data being returned, or the handler evaluating to null,\n * this method will return an {@link Optional#empty()} object.</p>\n *\n * @param query the query to be executed\n * @param preparer the preparation used for this statement\n * @param handler the handler for the data returned by the query\n * @param <R> the returned type\n * @return the results of the database query\n * @see #queryAsync(String, SqlFunction) to perform this query asynchronously\n */\n <R> Optional<R> query(@Language(\"MySQL\") @Nonnull String query, @Nonnull SqlConsumer<PreparedStatement> preparer, @Nonnull SqlFunction<ResultSet, R> handler);\n\n /**\n * Executes a batched database execution.\n *\n * <p>This will be executed on an asynchronous thread.</p>\n *\n * <p>Note that proper implementations of this method should determine\n * if the provided {@link BatchBuilder} is actually worth of being a\n * batched statement. For instance, a BatchBuilder with only one\n * handler can safely be referred to {@link #executeAsync(String, SqlConsumer)}</p>\n *\n * @param builder the builder to be used.\n * @return a Promise of an asynchronous batched database execution\n * @see #executeBatch(BatchBuilder) to perform this action synchronously\n */\n default Promise<Void> executeBatchAsync(@Nonnull BatchBuilder builder) {\n return Schedulers.async().run(() -> this.executeBatch(builder));\n }\n\n /**\n * Executes a batched database execution.\n *\n * <p>This will be executed on whichever thread it's called from.</p>\n *\n * <p>Note that proper implementations of this method should determine\n * if the provided {@link BatchBuilder} is actually worth of being a\n * batched statement. For instance, a BatchBuilder with only one\n * handler can safely be referred to {@link #execute(String, SqlConsumer)}</p>\n *\n * @param builder the builder to be used.\n * @see #executeBatchAsync(BatchBuilder) to perform this action asynchronously\n */\n void executeBatch(@Nonnull BatchBuilder builder);\n\n /**\n * Gets a {@link BatchBuilder} for the provided statement.\n *\n * @param statement the statement to prepare for batching.\n * @return a BatchBuilder\n */\n BatchBuilder batch(@Language(\"MySQL\") @Nonnull String statement);\n}",
"public QueryExecution createQueryExecution(Query qry);",
"public void Query() {\n }",
"public void parse_sql(String sql, Boolean as_is) throws ConnectorConfigException{\n\t\tif (as_is){\n\t\t\tfieldset = sql;\n\t\t\treturn;\n\t\t}\n\t\tPattern limit_regex = Pattern.compile(\"[ \\n]+limit[\\n ,0-9]\", Pattern.CASE_INSENSITIVE);\n\t\tPattern where_regex = Pattern.compile(\"[ \\n]+where\", Pattern.CASE_INSENSITIVE);\n\t\tPattern from_regex = Pattern.compile(\"[ \\n]+from\", Pattern.CASE_INSENSITIVE);\n\t\tPattern select_regex = Pattern.compile(\"select\", Pattern.CASE_INSENSITIVE);\n\t\tPattern order_regex = Pattern.compile(\"[ \\n]+order[ ]+by\", Pattern.CASE_INSENSITIVE);\n\t\tPattern empty_regex = Pattern.compile(\"[ ]+\", Pattern.CASE_INSENSITIVE);\n\t\tPattern groupby_regex = Pattern.compile(\"[ \\n]+group[ \\n]+by[ \\n]+\", Pattern.CASE_INSENSITIVE);\n\n\t\tsql = limit_regex.split(sql)[0]; //drop limit part;\n\n\t\tif (groupby_regex.split(sql).length > 1){ //workaround for GROUP BY in sql\n\t\t\tset_source(\"(\"+sql+\") dhx_group_table\");\n\t\t\treturn;\n\t\t}\n\t\t\t\n\t\t//locate select part\n\t\tString[] data = from_regex.split(sql,2);\n\t\tset_fieldset(select_regex.split(data[0],2)[1]);\n\t\t\n\t\tString [] table_data = where_regex.split(data[1],2);\n\t\tif (table_data.length>1){ //where construction exists\n\t\t\tset_source(table_data[0]);\n\t\t\tString [] where_data = order_regex.split(table_data[1]);\n\t\t\tset_filter(where_data[0]);\n\t\t\tif (where_data.length==1) return; //all parsed\n\t\t\tsql = where_data[1].trim();\n\t\t} else { //check order \n\t\t\tString [] order_data = order_regex.split(table_data[0],2);\n\t\t\tset_source(order_data[0]);\n\t\t\tif (order_data.length==1) return; //all parsed\n\t\t\tsql = order_data[1].trim();\n\t\t}\n\t\t\n\t\tif (!sql.equals(\"\")){\n\t\t\tString [] order_details = empty_regex.split(sql);\n\t\t\tset_sort(order_details[0],order_details[1]);\n\t\t}\n\t}",
"public String prepareSql(ProductDTO product){\n String SQL_SELECT = \"SELECT * FROM products \";\n String SQL_WHERE = \" WHERE quantity>0 \";\n String SQL_NAME = \"\";\n String SQL_PRICE = \"\";\n String SQL_CATEGORY = \"\";\n StringBuilder SQL_PRODUCT_DETAILS =new StringBuilder();\n List<String> product_details = new ArrayList<>();\n if (product.getName() != null) {\n SQL_NAME = \" AND name LIKE '%\" + product.getName() + \"%'\";\n }\n if (product.getMinPrice() != 0 || product.getMaxPrice() != 0) {\n if (product.getMaxPrice() == 0 && product.getMinPrice() != 0) {\n SQL_PRICE = \" AND price > \" + product.getMinPrice();\n } else if (product.getMinPrice() == 0 && product.getMaxPrice() != 0) {\n SQL_PRICE = \" AND price < \" + product.getMaxPrice();\n } else {\n SQL_PRICE = \" AND price BETWEEN \" + product.getMinPrice() + \" AND \" + product.getMaxPrice() + \" \";\n }\n }\n\n if (product.getCategory() != null) {\n SQL_CATEGORY = \" AND id_category=\" + product.getCategory().getId() + \" \";\n }\n if (!product.getProductDetailsList().isEmpty()) {\n int count=1;\n for (ProductDetails pd : product.getProductDetailsList()) {\n product_details.add(\" SELECT id_product FROM product_details WHERE id_parameter=\"\n + pd.getParameter().getId() + \" AND value='\" + pd.getValue() + \"'\");\n }\n SQL_PRODUCT_DETAILS.append(\" AND id IN (SELECT T1.id_product FROM (\"+product_details.get(0)+\") AS T1 \");\n product_details.remove(0);\n Iterator iterator = product_details.iterator();\n while (iterator.hasNext()) {\n count++;\n SQL_PRODUCT_DETAILS.append(\" JOIN ( \"+iterator.next()+\") AS T\"+count+\" ON T\"+(count-1)+\".id_product=T\"+count+\".id_product \");\n }\n SQL_PRODUCT_DETAILS.append(\" )\");\n }\n return SQL_SELECT + SQL_WHERE+SQL_NAME + SQL_PRICE + SQL_CATEGORY + SQL_PRODUCT_DETAILS;\n }",
"public interface SqlExecutor {\n /**\n * SqlExecutor shall be ready to accept all other calls after start() is called.\n * However, it shall NOT store the ExecutionContext for future use, as each\n * call will be given an ExecutionContext which may differ from this one.\n *\n * @param context The ExecutionContext at the time of the call.\n * @throws ExecutorException if the Executor encounters an error.\n */\n void start(ExecutionContext context) throws ExecutorException;\n\n /**\n * Indicates no further calls will be made thus it's safe for the executor to clean up.\n *\n * @param context The ExecutionContext at the time of the call.\n * @throws ExecutorException if the Executor encounters an error.\n */\n void stop(ExecutionContext context) throws ExecutorException;\n\n /**\n *\n * @return An EnvironmentVariableHandler that handles executor specific environment variables\n */\n EnvironmentVariableHandler getEnvironmentVariableHandler();\n\n /**\n * @param context The ExecutionContext at the time of the call.\n * @return A list of table names. Could be empty.\n * @throws ExecutorException if the Executor encounters an error.\n */\n List<String> listTables(ExecutionContext context) throws ExecutorException;\n\n /**\n * @param context The ExecutionContext at the time of the call.\n * @param tableName Name of the table to get the schema for.\n * @return Schema of the table.\n * @throws ExecutorException if the Executor encounters an error.\n */\n SqlSchema getTableSchema(ExecutionContext context, String tableName) throws ExecutorException;\n\n /**\n * @param context The ExecutionContext at the time of the call.\n * @param statement statement to execute\n * @return The query result.\n * @throws ExecutorException if the Executor encounters an error.\n */\n QueryResult executeQuery(ExecutionContext context, String statement) throws ExecutorException;\n\n\n /**\n * @return how many rows available for reading.\n * @throws ExecutorException if the Executor encounters an error.\n */\n int getRowCount() throws ExecutorException;\n\n /**\n * Row starts at 0. Executor shall keep the data retrieved.\n * For now we get strings for display but we might want strong typed values.\n *\n * @param context The ExecutionContext at the time of the call.\n * @param startRow Start row index (inclusive)\n * @param endRow End row index (inclusive)\n * @return A list of row data represented by a String array.\n * @throws ExecutorException if the Executor encounters an error.\n */\n List<String[]> retrieveQueryResult(ExecutionContext context, int startRow, int endRow) throws ExecutorException;\n\n\n /**\n * Consumes rows from query result. Executor shall drop them, as \"consume\" indicates.\n * ALL data before endRow (inclusive, including data before startRow) shall be deleted.\n *\n * @param context The ExecutionContext at the time of the call.\n * @param startRow Start row index (inclusive)\n * @param endRow End row index (inclusive)\n * @return available data between startRow and endRow (both are inclusive)\n * @throws ExecutorException if the Executor encounters an error.\n */\n List<String[]> consumeQueryResult(ExecutionContext context, int startRow, int endRow) throws ExecutorException;\n\n /**\n * Executes all the NON-QUERY statements in the sqlFile.\n * Query statements are ignored as it won't make sense.\n *\n * @param context The ExecutionContext at the time of the call.\n * @param file A File object to read statements from.\n * @return Execution result.\n * @throws ExecutorException if the Executor encounters an error.\n */\n NonQueryResult executeNonQuery(ExecutionContext context, File file) throws ExecutorException;\n\n /**\n * @param context The ExecutionContext at the time of the call.\n * @param statements A list of non-query sql statements.\n * @return Execution result.\n * @throws ExecutorException if the Executor encounters an error.\n */\n NonQueryResult executeNonQuery(ExecutionContext context, List<String> statements) throws ExecutorException;\n\n /**\n * @param context The ExecutionContext at the time of the call.\n * @param exeId Execution ID.\n * @throws ExecutorException if the Executor encounters an error.\n */\n void stopExecution(ExecutionContext context, int exeId) throws ExecutorException;\n\n\n /**\n * Removing an ongoing execution shall result in an error. Stop it first.\n *\n * @param context The ExecutionContext at the time of the call\n * @param exeId Execution ID.\n * @throws ExecutorException if the Executor encounters an error.\n */\n void removeExecution(ExecutionContext context, int exeId) throws ExecutorException;\n\n /**\n * @param execId Execution ID.\n * @return ExecutionStatus.\n * @throws ExecutorException if the Executor encounters an error.\n */\n ExecutionStatus queryExecutionStatus(int execId) throws ExecutorException;\n\n /**\n * @param context The ExecutionContext at the time of the call.\n * @return A list of SqlFunction.\n * @throws ExecutorException if the Executor encounters an error.\n */\n List<SqlFunction> listFunctions(ExecutionContext context) throws ExecutorException;\n\n /**\n * Gets the version of this executor.\n * @return A String representing the version of the executor. This function does NOT throw an\n * ExecutorException as the caller has nothing to do to \"recover\" if the function fails.\n */\n String getVersion();\n}",
"abstract protected void execute();",
"public interface DatabaseCondition extends SQLObject {\n \n}",
"public void setSql(String sql) {\n this.sql = sql;\n }",
"void runQueries();",
"public IEntityBacked query(SqlStatement sql) throws DataStoreException {\r\n \t\tlogger.warn(\"Naive implementation - considerable performance problems!\");\r\n \r\n \t\tConnection connection;\r\n \t\ttry {\r\n \t\t\tconnection = getConnection();\r\n \t\t\tStatement createStatement = connection.createStatement();\r\n \t\t\tResultSet executeQuery = createStatement.executeQuery(sql.getCommandText());\r\n \t\t\treturn new IEntityBacked(executeQuery, connection);\r\n \t\t} catch (SQLException e) {\r\n \t\t\tthrow new DataStoreException(e);\r\n \t\t}\r\n \t}",
"RewrittenStatement rewrite(String sql, Binding params);",
"public interface QueryBuilder {\n QueryBuilder from();\n QueryBuilder where();\n QueryBuilder orderBy();\n QueryBuilder groupBy();\n Object execute(Object... args);\n Object execute(Tuple args);\n}",
"private BaseQueryImpl<?> construct(CriteriaBuilderImpl cb, CommonTree tree) {\n \t\tfinal Tree type = tree.getChild(0);\n \t\tif (type.getType() == JpqlParser.SELECT) {\n \t\t\treturn this.constructSelectQuery(cb, tree);\n \t\t}\n \t\telse if (type.getType() == JpqlParser.DELETE) {\n \t\t\treturn this.constructDeleteQuery(cb, tree);\n \t\t}\n \t\telse {\n \t\t\treturn this.constructUpdateQuery(cb, tree);\n \t\t}\n \t}",
"public interface ChecklistItemDAOQuery {\n public final static String UUID = \"select REPLACE(UUID(),'-','')\";\n public final static String CREATE_ITEM = \"insert into checklist_items (id, taskid, title) \"+\n \"values (unhex(?), unhex(?), ?)\";\n public final static String CHECK_ITEM = \"update checklist_items set checked=TRUE WHERE id=unhex(?)\";\n public final static String GET_ITEM_BY_ID = \"select hex(i.id) as id, hex(i.taskid) as taskid, i.user_checked as user_checked, i.title, i.checked from checklist_items i where i.id=unhex(?)\";\n public final static String GET_ITEMS_FROM_TASK = \"select hex(i.id) as id, hex(i.taskid) as taskid, i.user_checked as user_checked, i.title, i.checked from checklist_items i where i.taskid=unhex(?)\";\n}",
"public interface HSQLExecutor<T> extends HSQLCommon {\r\n\r\n\t/**\r\n\t * Execute the HSQL.\r\n\t * \r\n\t * @param hsql\r\n\t * the HSQL\r\n\t * @param tableNames\r\n\t * the table names\r\n\t * @return the object\r\n\t * @throws HSQLException\r\n\t * when error occurs\r\n\t */\r\n\tpublic T execute(String hsql, String[] tableNames) throws HSQLException;\r\n}",
"protected String preprocessSQL(String sql, QueryParameters parameters, Dialect dialect)\n \t\t\tthrows HibernateException {\n \n \t\tsql = applyLocks( sql, parameters.getLockOptions(), dialect );\n \n \t\treturn getFactory().getSettings().isCommentsEnabled() ?\n \t\t\t\tprependComment( sql, parameters ) : sql;\n \t}",
"public ResultSet doQuery( String sql) throws SQLException {\r\n\t\tif (dbConnection == null)\r\n\t\t\treturn null;\r\n\t\t// prepare sql statement\r\n\t\toutstmt = dbConnection.prepareStatement(sql);\r\n\t\tif (outstmt == null)\r\n\t\t\treturn null;\r\n\t\tif (outstmt.execute()){\r\n\t\t\t//return stmt.getResultSet(); //old\r\n\t\t\toutrs = outstmt.getResultSet();\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn null;\r\n\t\treturn outrs;\r\n\t}",
"public Sql(String sql) {\n \n this();\n append(sql);\n }",
"public abstract void run(Context context) throws SQLException;",
"public abstract List createNativeSQLQuery(String query);",
"@Override\n public synchronized ResultSet executeQuery(String sql)\n throws SQLException {\n\n // tinySQL only supports one result set at a time, so\n // don't let them get another one, just in case it's\n // hanging out.\n //\n tinySQLResultSet trs;\n result = null; \n statementString = sql;\n\n // create a new tinySQLResultSet with the tsResultSet\n // returned from connection.executetinySQL()\n //\n if ( debug ) {\n System.out.println(\"executeQuery conn is \" + connection.toString());\n }\n trs = new tinySQLResultSet(connection.executetinySQL(this), this);\n return trs; \n }",
"protected void runSQL(String sql) {\n\t\ttry {\n\t\t\tDataSource dataSource = csclPollsChoicePersistence.getDataSource();\n\n\t\t\tDB db = DBManagerUtil.getDB();\n\n\t\t\tsql = db.buildSQL(sql);\n\t\t\tsql = PortalUtil.transformSQL(sql);\n\n\t\t\tSqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(\n\t\t\t\tdataSource, sql);\n\n\t\t\tsqlUpdate.update();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow new SystemException(e);\n\t\t}\n\t}",
"SELECT createSELECT();",
"public interface BackTestOperation {\n\n\n @Select( \"SELECT * FROM ${listname}\")\n public ArrayList<BackTestDailyResultPo> getResult(@Param(\"listname\") String resultid);\n\n @Select(\" SELECT resultid FROM backtesting WHERE userid = #{0,jdbcType=BIGINT} AND sid = #{1,jdbcType=BIGINT} AND start = #{2,jdbcType=LONGVARCHAR}\\n\" +\n \" AND end = #{3,jdbcType=LONGVARCHAR}\")\n public String getResultid(String userid, String strategyid, String startdate, String enddate);\n}",
"@Override\n\tpublic final Iterable<R> execute() {\n\t\t\n\t\treturn new Iterable<R>() {\n\t\t\t\n\t\t\t@Override \n\t\t\tpublic Iterator<R> iterator() {\n\t\t\t\t\n\t\t\t\treturn AbstractMultiQuery.this.iterator();\n\t\t\t\t\n\t\t\t}\n\t\t};\n\t\t\n\t}",
"public abstract ResultList executeQuery(DatabaseQuery query);",
"public interface EmpDao {\n\n\n /**\n * 根据参数查询列表\n * @param map\n * @return\n */\n\n// select empno,ENAME,job,mgr,hiredate,sal,comm,deptno from emp\n @Select(\"<script>\" +\n \"select a.empno,a.ename,a.job,a.mgr,to_char(a.hiredate,'yyyy-mm-dd') hiredate,a.sal,a.comm,a.deptno,a.mgrname,a.dname,a.rn from \" +\n \"(select b.*,rownum rn from \" +\n \"(select e.*,d.dname from (select e1.*,e2.ename mgrname from emp e1 left join emp e2 on e1.mgr=e2.empno) e left join dept d on e.deptno=d.deptno \" +\n \"<where>\" +\n \"<if test='ename!=null'>and e.ename like '%'||#{ename}||'%' </if>\" +\n \"<if test='job!=null'>and e.job like '%'||#{job}||'%' </if>\" +\n \"</where>\" +\n \"order by empno desc) b where rownum < #{end}) a where a.rn > #{start}\" +\n \"</script>\")\n List<Map> getList(Map map);\n\n\n /**\n * 带条件查询总条数\n * @param map\n * @return\n */\n @Select(\"<script>\"+\n \"select count(*) from emp <where>\" +\n \"<if test='ename != null'> and ename like '%${ename}%'</if>\"+\n \"<if test='job != null'> and job like '%${job}%'</if>\"+\n \"</where></script>\")\n int getPageCount(Map map);\n /**\n * 添加\n * @param map\n * @return\n */\n// seq_emp_id.nextval,ename, job, hiredate, sal, comm,deptno\n @Insert(\"insert into emp values(seq_emp_id.nextval,#{ENAME},#{JOB},#{MGR},to_date(#{HIREDATE},'yyyy-mm-dd'),#{SAL},#{COMM},#{DEPTNO})\")\n int add(Map map);\n\n\n /**\n * 更新\n * @param map\n * @return\n */\n @Update(\"update emp set ename=#{ENAME},job=#{JOB},mgr=#{MGR},hiredate=to_date(#{HIREDATE},'yyyy-mm-dd'),sal=#{SAL},comm=#{COMM},deptno=#{DEPTNO} where empno=#{EMPNO}\")\n int update(Map map);\n\n /**\n * 删除\n * @param deptNo\n * @return\n */\n @Delete(\"delete from emp where empno=#{EMPNO}\")\n int delete(int deptNo);\n\n /**\n * 获取所有部门,用于页面数据绑定\n * @return\n */\n @Select(\"select deptno,dname from dept\")\n List<Map> getDeptType();\n\n /**\n * 获取所有职位,用于页面数据绑定\n * @return\n */\n @Select(\"select distinct(job) from emp\")\n List<Map> getJob();\n\n /**\n * 获取上司,用于页面数据绑定\n * @return\n */\n @Select(\"select empno,ename from emp where job='PRESIDENT' or job='MANAGER' or job='ANALYST'\")\n List<Map> getMgr();\n\n\n}",
"@Override\r\n public PlanNode makePlan(SelectClause selClause,\r\n List<SelectClause> enclosingSelects) {\r\n\r\n // For HW1, we have a very simple implementation that defers to\r\n // makeSimpleSelect() to handle simple SELECT queries with one table,\r\n // and an optional WHERE clause.\r\n\r\n PlanNode plan = null;\r\n\r\n if (enclosingSelects != null && !enclosingSelects.isEmpty()) {\r\n throw new UnsupportedOperationException(\r\n \"Not implemented: enclosing queries\");\r\n }\r\n\r\n FromClause fromClause = selClause.getFromClause();\r\n // case for when no From clause is present. Creates a ProjectNode.\r\n if (fromClause == null) {\r\n plan = new ProjectNode(selClause.getSelectValues());\r\n plan.prepare();\r\n return plan;\r\n }\r\n // implementation of our ExpressionProcessor\r\n AggregateFinder processor = new AggregateFinder();\r\n\r\n List<SelectValue> selectValues = selClause.getSelectValues();\r\n // call helper function to recursively handle From Clause\r\n plan = processFromClause(fromClause, selClause, processor);\r\n Expression whereExpr = selClause.getWhereExpr();\r\n if (whereExpr != null){\r\n whereExpr.traverse(processor);\r\n if (!processor.aggregates.isEmpty()) {\r\n throw new InvalidSQLException(\"Can't have aggregates in WHERE\\n\");\r\n }\r\n plan = PlanUtils.addPredicateToPlan(plan, whereExpr);\r\n }\r\n\r\n\r\n for (SelectValue sv : selectValues) {\r\n // Skip select-values that aren't expressions\r\n if (!sv.isExpression())\r\n continue;\r\n\r\n Expression e = sv.getExpression().traverse(processor);\r\n sv.setExpression(e);\r\n }\r\n\r\n Map<String, FunctionCall> colMap = processor.initMap();\r\n\r\n List<Expression> groupByExprs = selClause.getGroupByExprs();\r\n\r\n\r\n if (!groupByExprs.isEmpty() || !colMap.isEmpty()){\r\n plan = new HashedGroupAggregateNode(plan, groupByExprs, colMap);\r\n }\r\n\r\n Expression havingExpr = selClause.getHavingExpr();\r\n if (havingExpr != null){\r\n havingExpr.traverse(processor);\r\n selClause.setHavingExpr(havingExpr);\r\n plan = PlanUtils.addPredicateToPlan(plan, havingExpr);\r\n }\r\n\r\n\r\n\r\n List<OrderByExpression> orderByExprs = selClause.getOrderByExprs();\r\n if (orderByExprs.size() > 0){\r\n // need to do something about order by clause.\r\n plan = new SortNode(plan, orderByExprs);\r\n }\r\n\r\n if (!selClause.isTrivialProject())\r\n plan = new ProjectNode(plan, selectValues);\r\n\r\n plan.prepare();\r\n return plan;\r\n }",
"private String buildSelect() {\r\n\t\tString select = \"select all_source.line, ' '||replace(all_source.TEXT,chr(9),' ')|| ' ' line from all_source where 2=2 \";\r\n\t\tString ownerCondition = \"\";\r\n\t\tString ownerInnerCondition = \"\";\r\n\t\tString beginProcedureCondition = \"\";\r\n\r\n\t\tif (!oraJdbcDTO.dbSchema.equals(\"\")) {\r\n\t\t\townerCondition = \" and all_source.OWNER = ? \";\r\n\t\t\townerInnerCondition = \" and all_source1.OWNER = ? \";\r\n\t\t}\r\n\t\tif (!oraJdbcDTO.packageName.equals(\"\")) {\r\n\t\t\t// Procedure in package\r\n\t\t\tbeginProcedureCondition = \"and all_source.name = ?\\n\"\r\n\t\t\t\t\t+ \"and all_source.TYPE = 'PACKAGE'\\n\"\r\n\t\t\t\t\t+ \"and all_source.line >=\\n\"\r\n\t\t\t\t\t+ \" (select min(all_source1.line)\\n\"\r\n\t\t\t\t\t+ \" from all_source all_source1 where 2=2 \"\r\n\t\t\t\t\t+ ownerInnerCondition\r\n\t\t\t\t\t+ \" and all_source1.name = ?\\n\"\r\n\t\t\t\t\t+ \" and all_source1.TYPE = 'PACKAGE'\\n\"\r\n\t\t\t\t\t+ \" and instr(upper(all_source1.TEXT), ?) > 0)\";\r\n\t\t\t;\r\n\t\t} else {\r\n\t\t\t// Single procedure or function\r\n\t\t\tbeginProcedureCondition = \"and all_source.name = ?\\n\"\r\n\t\t\t\t\t+ \"and all_source.TYPE in ('PROCEDURE','FUNCTION')\";\r\n\t\t}\r\n\t\tselect = select + beginProcedureCondition + \" and all_source.line >= ?\"\r\n\t\t\t\t+ ownerCondition + \" order by all_source.line\";\r\n\r\n\t\treturn select;\r\n\t}",
"public void createQueryProcessor() throws IOException {\n\t\tfor(int i=0; i<=payload.getnumber_of_grouping_variables();i++) {\n\t\t\tlistMapsAggregates.add(new HashMap<String, String>());\n\t\t}\n\t\tfor(int i=0;i<payload.getnumber_of_aggregate_functions();i++) {\n\t\t\tString[] temp = payload.getaggregate_functions().get(i).split(\"_\",3);\n\t\t\tlistMapsAggregates.get(Integer.parseInt(temp[0])).put(temp[1], temp[2]);//(key,value) -> (aggregate function , column name)\n\t\t}\n\t\tStringBuilder fileData = new StringBuilder();\n\t\tfileData.append(\"package dbmsProject;\\r\\n\\r\\n\" + \n\t\t\t\t\"import java.io.FileOutputStream;\\r\\n\" + \n\t\t\t\t\"import java.io.IOException;\\r\\n\" + \n\t\t\t\t\"import java.text.DateFormat;\\r\\n\" + \n\t\t\t\t\"import java.text.DecimalFormat;\\r\\n\" + \n\t\t\t\t\"import java.text.SimpleDateFormat;\\r\\n\" + \n\t\t\t\t\"import java.util.ArrayList;\\r\\n\" + \n\t\t\t\t\"import java.util.Calendar;\\r\\n\" + \n\t\t\t\t\"import java.util.HashMap;\\r\\n\");\n\t\tfileData.append(\"\\r\\npublic class QueryProcessor{\\n\");\n\t\tfileData.append(\"\tprivate SalesTable salesTable;\\n\");\n\t\tfileData.append(\"\tprivate ExpTree expTree;\\n\");\n\t\tfileData.append(\"\tprivate Payload payload;\\n\");\n\t\tfileData.append(\"\tprivate Helper helper;\\n\");\n\t\tfileData.append(\"\tprivate ArrayList<HashMap<String,String>> listMapsAggregates;\\r\\n\" + \n\t\t\t\t\t\t\"\tprivate HashMap<String, Double> aggregatesMap;\\r\\n\" + \n\t\t\t\t\t\t\"\tprivate ArrayList<HashMap<String, ArrayList<InputRow>>> allGroups;\\r\\n\" + \n\t\t\t\t\t\t\"\tprivate ArrayList<ArrayList<String>> allGroupKeyStrings;\\r\\n\" + \n\t\t\t\t\t\t\"\tprivate ArrayList<ArrayList<InputRow>> allGroupKeyRows;\\n\");\n\t\tfileData.append(\"\\r\\n\tpublic QueryProcessor(SalesTable salesTable, Payload payload){\\n\");\n\t\tfileData.append(\"\t\tthis.aggregatesMap = new HashMap<String, Double>();\\n\");\n\t\tfileData.append(\"\t\tthis.salesTable=salesTable;\\n\");\n\t\tfileData.append(\"\t\tthis.payload=payload;\\n\");\n\t\tfileData.append(\"\t\tthis.expTree=new ExpTree();\\n\");\n\t\tfileData.append(\"\t\tthis.helper=new Helper();\\n\"\n\t\t\t\t\t\t+ \"\t\tthis.allGroupKeyRows = new ArrayList<ArrayList<InputRow>>();\\r\\n\" + \n\t\t\t\t\t\t\"\t\tthis.allGroupKeyStrings = new ArrayList<ArrayList<String>>();\\r\\n\" + \n\t\t\t\t\t\t\"\t\tthis.listMapsAggregates = new ArrayList<HashMap<String,String>>();\\r\\n\"\t+\n\t\t\t\t\t\t\"\t\tthis.allGroups = new ArrayList<HashMap<String, ArrayList<InputRow>>>();\\n\");\n\t\tfileData.append(\"\t}\\n\");\n\t\tfileData.append(\"\\r\\n\tpublic ArrayList<InputRow> createInputSet(){\\n\");\n\t\tfileData.append(\"\t\tArrayList<InputRow> inputResultSet = new ArrayList<InputRow>();\\n\");\n\t\tfileData.append(\"\t\tfor(SalesTableRow row: salesTable.getResultSet()) {\\n\");\n\t\tfileData.append(\"\t\t\tInputRow ir=new InputRow();\\n\");\n\t\tfor(String var: this.projectionVars) {\n\t\t\tfileData.append(\"\t\t\tir.set\"+varPrefix+var+\"(row.get\"+var+\"());\\n\");\n\t\t}\n\t\tfileData.append(\"\t\t\tinputResultSet.add(ir);\\n\");\n\t\tfileData.append(\"\t\t}\\n\");\n\t\tfileData.append(\"\t\treturn inputResultSet;\\n\");\n\t\tfileData.append(\"\t}\\n\");\n\t\t\n//OUTPUT ROW CREATION LOGIC\n\t\tfileData.append(\"\\r\\n\tpublic OutputRow convertInputToOutputRow(InputRow inputRow, String str, ArrayList<String> strList){\\n\");\n\t\tfileData.append(\"\t\tString temp=\\\"\\\";\\n\");\n\t\tfileData.append(\"\t\tOutputRow outputRow = new OutputRow();\\n\");\n\t\tfor(String select: payload.getselect_variables()) {\n\t\t\tif(helper.columnMapping.containsKey(select)) {\n\t\t\t\tfileData.append(\"\t\toutputRow.set\"+varPrefix+select+\"(inputRow.get\"+varPrefix+select+\"());\\n\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tString temp=select;\n\t\t\t\tif(select.contains(\"/\")) select=select.replaceAll(\"/\", \"_divide_\");\n\t\t\t\tif(select.contains(\"*\")) select=select.replaceAll(\"*\", \"_multiply_\");\n\t\t\t\tif(select.contains(\"+\")) select=select.replaceAll(\"+\", \"_add_\");\n\t\t\t\tif(select.contains(\"-\")) select=select.replaceAll(\"-\", \"_minus_\");\n\t\t\t\tif(select.contains(\")\")) select=select.replaceAll(\"[)]+\", \"\");\n\t\t\t\tif(select.contains(\"(\")) select=select.replaceAll(\"[(]+\", \"\");\n\t\t\t\tfileData.append(\"\t\ttemp = prepareClause(inputRow, inputRow, \\\"\"+temp+\"\\\", str, strList);\\n\");\n\t\t\t\tfileData.append(\"\t\tif(temp.contains(\\\"(\\\")) temp = expTree.execute(temp);\\r\\n\");\n\t\t\t\tfileData.append(\"\t\tif(temp.equals(\\\"discard_invalid_entry\\\")) return null;\\n\");\n\t\t\t\tfileData.append(\"\t\toutputRow.set\"+varPrefix+select+\"(Double.parseDouble(temp));\\n\");\n\t\t\t}\n\t\t}\n\t\tfileData.append(\"\t\treturn outputRow;\\n\");\n\t\tfileData.append(\"\t}\\n\");\n\t\t\n//WHERE CLAUSE EXECUTOR\n\t\tfileData.append(\"\\r\\n\tpublic ArrayList<InputRow> executeWhereClause(ArrayList<InputRow> inputResultSet) {\\r\\n\" + \n\t\t\t\t\"\t\tint i=0;\\r\\n\" + \n\t\t\t\t\"\t\twhile(i<inputResultSet.size()) {\\r\\n\" + \n\t\t\t\t\"\t\t\tString condition=prepareClause(inputResultSet.get(i), inputResultSet.get(i), payload.getWhereClause(), \\\"\\\", new ArrayList<String>());\\r\\n\" + \n\t\t\t\t\"\t\t\tif(condition.equals(\\\"discard_invalid_entry\\\") || !Boolean.parseBoolean(expTree.execute(condition))){\\r\\n\" + \n\t\t\t\t\"\t\t\t\tinputResultSet.remove(i);\\r\\n\" + \n\t\t\t\t\"\t\t\t\tcontinue;\\r\\n\" + \n\t\t\t\t\"\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\ti++;\\r\\n\" + \n\t\t\t\t\"\t\t}\\r\\n\" + \n\t\t\t\t\"\t\treturn inputResultSet;\\r\\n\" + \n\t\t\t\t\"\t}\\n\");\n\n//REFINE CLAUSE FOR PROCESSING\n\t\tfileData.append(\"\\r\\n\tpublic String prepareClause(InputRow row, InputRow rowZero, String condition, String str, ArrayList<String> strList) {\\r\\n\" + \n\t\t\t\t\"\t\tfor(int i=0;i<strList.size();i++) {\\r\\n\" + \n\t\t\t\t\"\t\t\tif(condition.contains(i+\\\"_\\\")) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\tboolean flag=false;\\r\\n\" + \n\t\t\t\t\"\t\t\t\tfor(String ag : payload.getaggregate_functions()) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tif(!ag.contains(i+\\\"\\\")) continue;\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tif(condition.contains(ag)) flag=true;\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tcondition=condition.replaceAll(ag, ag+\\\"_\\\"+strList.get(i));\\r\\n\" + \n\t\t\t\t\"\t\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\t\tif(flag) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tboolean changeFlag=false;\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tfor(String key : aggregatesMap.keySet()) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\t\tif(condition.contains(key)) changeFlag=true;\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\t\tcondition = condition.replaceAll(key, Double.toString(aggregatesMap.get(key)));\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tif(!changeFlag) return \\\"discard_invalid_entry\\\";\\r\\n\" + \n\t\t\t\t\"\t\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\\r\\n\" + \n\t\t\t\t\"\t\tif(condition.contains(\\\".\\\")) {\\r\\n\");\n\t\tfor(String var: projectionVars) {\n\t\t\tif(helper.columnMapping.get(var)==0 || helper.columnMapping.get(var)==1 || helper.columnMapping.get(var)==5)\n\t\t\t\tfileData.append(\"\t\t\tcondition=condition.replaceAll(\\\"[0-9]+\\\\\\\\.\"+var+\"\\\", row.get\"+varPrefix+var+\"());\\r\\n\");\n\t\t\telse\n\t\t\t\tfileData.append(\"\t\t\tcondition=condition.replaceAll(\\\"[0-9]+\\\\\\\\.\"+var+\"\\\", Integer.toString(row.get\"+varPrefix+var+\"()));\\r\\n\");\n\t\t}\n\t\tfileData.append(\"\t\t}\\n\");\n\t\t\n\t\tfor(String var: projectionVars) {\n\t\t\tif(helper.columnMapping.get(var)==0 || helper.columnMapping.get(var)==1 || helper.columnMapping.get(var)==5)\n\t\t\t\tfileData.append(\"\t\tcondition=condition.replaceAll(\\\"\"+var+\"\\\", rowZero.get\"+varPrefix+var+\"());\\r\\n\");\n\t\t\telse\n\t\t\t\tfileData.append(\"\t\tcondition=condition.replaceAll(\\\"\"+var+\"\\\", Integer.toString(rowZero.get\"+varPrefix+var+\"()));\\r\\n\");\n\t\t}\n\t\t\n\t\tfileData.append(\n\t\t\t\t\"\t\tcondition=condition.replaceAll(\\\"\\\\\\\\s+\\\", \\\"\\\");\\r\\n\" + \n\t\t\t\t\"\t\tcondition=condition.replaceAll(\\\"\\\\\\\"\\\", \\\"\\\");\\r\\n\" + \n\t\t\t\t\"\t\tcondition=condition.replaceAll(\\\"\\\\'\\\", \\\"\\\");\\r\\n\" + \n\t\t\t\t\"\t\t\\r\\n\" + \n\t\t\t\t\"\t\treturn condition;\\r\\n\" + \n\t\t\t\t\"\t}\\n\");\n\n//CREATE GROUPS\t\t\n\t\tfileData.append(\"\\r\\n\tpublic void createListsBasedOnSuchThatPredicate(ArrayList<InputRow> inputResultSet) {\\r\\n\" + \n\t\t\t\t\"\t\t\\r\\n\" + \n\t\t\t\t\"\t\tfor(int i=0;i<=payload.getnumber_of_grouping_variables();i++) {\\r\\n\" + \n\t\t\t\t\"\t\t\tArrayList<String> groupKeyStrings = new ArrayList<String>();\\r\\n\" + \n\t\t\t\t\"\t\t\tArrayList<InputRow> groupKeyRows = new ArrayList<InputRow>();\\r\\n\" + \n\t\t\t\t\"\t\t\tfor(InputRow row : inputResultSet) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\tStringBuilder temp=new StringBuilder();\\r\\n\" + \n\t\t\t\t\"\t\t\t\tInputRow groupRow = new InputRow();\\r\\n\" + \n\t\t\t\t\"\t\t\t\tfor(String group: payload.getGroupingAttributesOfAllGroups().get(i)) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tint col = helper.columnMapping.get(group);\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tswitch(col) {\\r\\n\");\n\t\tfor(String var: projectionVars) {\n\t\t\tfileData.append(\"\t\t\t\t\t\tcase \"+helper.columnMapping.get(var)+\":\"+\"{temp.append(row.get\"+varPrefix+var+\"()+\\\"_\\\"); groupRow.set\"+varPrefix+ var+ \"(row.get\"+varPrefix+var+\"()); break;}\\r\\n\");\n\t\t}\n\t\tfileData.append(\"\t\t\t\t\t}\\n\"+\n\t\t\t\t\"\t\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\t\tString s=temp.toString();\\r\\n\" + \n\t\t\t\t\"\t\t\t\tif(s.charAt(s.length()-1)=='_') s=s.substring(0, s.length()-1);\\r\\n\" + \n\t\t\t\t\"\t\t\t\tif( !groupKeyStrings.contains(s) ) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tgroupKeyStrings.add(s);\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tgroupKeyRows.add(groupRow);\\r\\n\" + \n\t\t\t\t\"\t\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\tallGroupKeyRows.add(groupKeyRows);\\r\\n\" + \n\t\t\t\t\"\t\t\tallGroupKeyStrings.add(groupKeyStrings);\\r\\n\" + \n\t\t\t\t\"\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\\r\\n\" + \n\t\t\t\t\"\t\tfor(int i=0;i<=payload.getnumber_of_grouping_variables();i++) {\\r\\n\" + \n\t\t\t\t\"\t\t\tHashMap<String, ArrayList<InputRow>> res = new HashMap<String, ArrayList<InputRow>>();\\r\\n\" + \n\t\t\t\t\"\t\t\tString suchThat = payload.getsuch_that_predicates().get(i);\\r\\n\" + \n\t\t\t\t\"\t\t\tfor(int j=0;j<allGroupKeyRows.get(i).size();j++) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\tInputRow zeroRow = allGroupKeyRows.get(i).get(j);\\r\\n\" + \n\t\t\t\t\"\t\t\t\tArrayList<InputRow> groupMember = new ArrayList<InputRow>();\\r\\n\" + \n\t\t\t\t\"\t\t\t\tfor(InputRow salesRow : inputResultSet) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tString condition = prepareClause(salesRow, zeroRow, suchThat, \\\"\\\", new ArrayList<String>());\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tif(Boolean.parseBoolean(expTree.execute(condition))) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\t\tgroupMember.add(salesRow);\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\t\tres.put(allGroupKeyStrings.get(i).get(j), new ArrayList<InputRow>(groupMember));\\r\\n\" + \n\t\t\t\t\"\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\tallGroups.add(new HashMap<String, ArrayList<InputRow>>(res));\\r\\n\" + \n\t\t\t\t\"\t\t}\\r\\n\" + \n\t\t\t\t\"\t}\\n\");\n\t\t\n//GETGROUPING VARIABLE METHOD\n\t\tfileData.append(\"\\r\\n\tpublic String getGroupingVariable(int i, InputRow row) {\\r\\n\" + \n\t\t\t\t\"\t\tswitch(i) {\\r\\n\");\n\t\tfor(String var: projectionVars) {\n\t\t\tif(helper.columnMapping.get(var)==0||helper.columnMapping.get(var)==1||helper.columnMapping.get(var)==5)\n\t\t\t\tfileData.append(\"\t\t\tcase \"+helper.columnMapping.get(var)+\": return row.get\"+varPrefix+var+\"();\\r\\n\");\n\t\t\telse if(helper.columnMapping.get(var)==7)\n\t\t\t\tfileData.append(\"\t\t\tcase \"+helper.columnMapping.get(var)+\": return \\\"all\\\"\");\n\t\t\telse\n\t\t\t\tfileData.append(\"\t\t\tcase \"+helper.columnMapping.get(var)+\": return Integer.toString(row.get\"+varPrefix+var+\"());\\r\\n\");\n\t\t}\n\t\tfileData.append(\"\t\t}\\r\\n\");\n\t\tfileData.append(\"\t\treturn \\\"__Garbage__\\\";\\r\\n\");\n\t\tfileData.append(\"\t}\\n\");\n\t\t\n//COMPUTE AGGREGATES METHOD\n\t\tfileData.append(\"\\r\\n\tpublic void computeAggregates(ArrayList<InputRow> inputResultSet) {\t\\r\\n\" + \n\t\t\t\t\"\t\tdouble val=0;\\r\\n\"+\n\t\t\t\t\"\t\tfor(int i=0; i<=payload.getnumber_of_grouping_variables();i++) {\\r\\n\" + \n\t\t\t\t\"\t\t\tlistMapsAggregates.add(new HashMap<String, String>());\\r\\n\" + \n\t\t\t\t\"\t\t}\\r\\n\" + \n\t\t\t\t\"\t\tfor(int i=0;i<payload.getnumber_of_aggregate_functions();i++) {\\r\\n\" + \n\t\t\t\t\"\t\t\tString[] temp = payload.getaggregate_functions().get(i).split(\\\"_\\\",3);\\r\\n\" + \n\t\t\t\t\"\t\t\tlistMapsAggregates.get(Integer.parseInt(temp[0])).put(temp[1], temp[2]);//(key,value) -> (aggregate function , column name)\\r\\n\" + \n\t\t\t\t\"\t\t}\\r\\n\"+\n\t\t\t\t\"\t\tint nGroupingVariables=0;\\r\\n\"+\n\t\t\t\t\"\t\taggregatesMap = new HashMap<>();\\r\\n\"+\n\t\t\t\t\"\t\tHashMap<String,Double> tempAggregatesMap;\\r\\n\");\n\t\t\n\t\tfor(int nGroupingVariables=0;nGroupingVariables<=payload.getnumber_of_grouping_variables();nGroupingVariables++) {\n\t\t\tfileData.append(\"\\n\t\tnGroupingVariables=\"+nGroupingVariables+\";\\r\\n\");\n\t\t\tfileData.append(\n\t\t\t\t\t\t\t\"\t\ttempAggregatesMap = new HashMap<String,Double>();\\r\\n\" + \n\t\t\t\t\t\t\t\"\t\t\\r\\n\" + \n\t\t\t\t\t\t\t\"\t\tfor(int i=0;i<allGroupKeyRows.get(nGroupingVariables).size(); i++) {\\r\\n\" + \n\t\t\t\t\t\t\t\"\t\t\tInputRow zeroRow = allGroupKeyRows.get(nGroupingVariables).get(i);\\r\\n\" );\n\t\t\t\n\t\t\t//MFvsEMF\n\t\t\tif(isGroupMF(nGroupingVariables)) fileData.append(\"\t\t\tfor(InputRow row: allGroups.get(nGroupingVariables).get(allGroupKeyStrings.get(nGroupingVariables).get(i)))\t{\\r\\n\");\n\t\t\telse fileData.append(\"\t\t\tfor(InputRow row: inputResultSet) {\\r\\n\");\n\t\t\t\n\t\t\tfileData.append(\"\t\t\t\tString condition = payload.getsuch_that_predicates().get(nGroupingVariables);\\r\\n\" + \n\t\t\t\t\t\t\t\"\t\t\t\tString str = allGroupKeyStrings.get(nGroupingVariables).get(i);\\r\\n\" + \n\t\t\t\t\t\t\t\"\t\t\t\tArrayList<String> strList = new ArrayList<String>();\\r\\n\" + \n\t\t\t\t\t\t\t\"\t\t\t\tfor(int j=0;j<=payload.getnumber_of_grouping_variables();j++) strList.add(str);\\r\\n\" +\n\t\t\t\t\t\t\t\"\t\t\t\tcondition= prepareClause(row, zeroRow, condition, str, strList);\\r\\n\" + \n\t\t\t\t\t\t\t\"\t\t\t\tif(condition.equals(\\\"discard_invalid_entry\\\") || !Boolean.parseBoolean(expTree.execute(condition))) continue;\\r\\n\"\n\t\t\t\t\t\t\t);\n\t\t\tString key1 = nGroupingVariables+\"_sum_\"+listMapsAggregates.get(nGroupingVariables).get(\"sum\");\n\t\t\tString key2 = nGroupingVariables+\"_avg_\"+listMapsAggregates.get(nGroupingVariables).get(\"avg\");\n\t\t\tString key3 = nGroupingVariables+\"_min_\"+listMapsAggregates.get(nGroupingVariables).get(\"min\");\n\t\t\tString key4 = nGroupingVariables+\"_max_\"+listMapsAggregates.get(nGroupingVariables).get(\"max\");\n\t\t\tString key5 = nGroupingVariables+\"_count_\"+listMapsAggregates.get(nGroupingVariables).get(\"count\");\n\t\t\tString key6 = nGroupingVariables+\"_count_\"+listMapsAggregates.get(nGroupingVariables).get(\"avg\");\n\t\t\t\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"sum\")) \n\t\t\t\tfileData.append(\"\t\t\t\tString key1=\\\"\"+key1+\"\\\";\\r\\n\");\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"avg\")) {\n\t\t\t\tfileData.append(\"\t\t\t\tString key2=\\\"\"+key2+\"\\\";\\r\\n\");\n\t\t\t\tfileData.append(\"\t\t\t\tString key6=\\\"\"+key6+\"\\\";\\r\\n\");\n\t\t\t}\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"min\"))\n\t\t\t\tfileData.append(\"\t\t\t\tString key3=\\\"\"+key3+\"\\\";\\r\\n\");\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"max\"))\n\t\t\t\tfileData.append(\"\t\t\t\tString key4=\\\"\"+key4+\"\\\";\\r\\n\");\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"count\"))\n\t\t\t\tfileData.append(\"\t\t\t\tString key5=\\\"\"+key5+\"\\\";\\r\\n\");\n\t\t\t\n\t\t\tfileData.append(\"\t\t\t\tfor(String ga: payload.getGroupingAttributesOfAllGroups().get(nGroupingVariables)) {\\r\\n\");\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"sum\")) \n\t\t\t\tfileData.append(\"\t\t\t\t\tkey1=key1+\\\"_\\\"+ getGroupingVariable(helper.columnMapping.get(ga), zeroRow);\\r\\n\");\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"avg\")) {\n\t\t\t\tfileData.append(\"\t\t\t\t\tkey2=key2+\\\"_\\\"+ getGroupingVariable(helper.columnMapping.get(ga), zeroRow);\\r\\n\");\n\t\t\t\tfileData.append(\"\t\t\t\t\tkey6=key6+\\\"_\\\"+ getGroupingVariable(helper.columnMapping.get(ga), zeroRow);\\r\\n\");\n\t\t\t}\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"min\"))\n\t\t\t\tfileData.append(\"\t\t\t\t\tkey3=key3+\\\"_\\\"+ getGroupingVariable(helper.columnMapping.get(ga), zeroRow);\\r\\n\");\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"max\"))\n\t\t\t\tfileData.append(\"\t\t\t\t\tkey4=key4+\\\"_\\\"+ getGroupingVariable(helper.columnMapping.get(ga), zeroRow);\\r\\n\");\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"count\"))\n\t\t\t\tfileData.append(\"\t\t\t\t\tkey5=key5+\\\"_\\\"+ getGroupingVariable(helper.columnMapping.get(ga), zeroRow);\\r\\n\");\n\t\t\tfileData.append(\"\t\t\t\t}\\r\\n\");\n\t\t\t\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"sum\")) {\n\t\t\t\tfileData.append(\"\t\t\tval=tempAggregatesMap.getOrDefault(key1, 0.0)+Double.parseDouble(getGroupingVariable(helper.columnMapping.get(listMapsAggregates.get(nGroupingVariables).get(\\\"sum\\\")), row));\\r\\n\" + \n\t\t\t\t\"\t\t\ttempAggregatesMap.put(key1, val);\\r\\n\");\n\t\t\t}\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"avg\")) {\n\t\t\t\tfileData.append(\"\t\t\tval=tempAggregatesMap.getOrDefault(key2, 0.0)+Double.parseDouble(getGroupingVariable(helper.columnMapping.get(listMapsAggregates.get(nGroupingVariables).get(\\\"avg\\\")), row));\\r\\n\"+\n\t\t\t\t\"\t\t\ttempAggregatesMap.put(key2, val);\\r\\n\"+\n\t\t\t\t\"\t\t\ttempAggregatesMap.put(key6, tempAggregatesMap.getOrDefault(key6, 0.0)+1);\\r\\n\");\n\t\t\t}\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"min\")) {\n\t\t\t\tfileData.append(\"\t\t\tval=Math.min( tempAggregatesMap.getOrDefault(key3, Double.MAX_VALUE) , Double.parseDouble(getGroupingVariable(helper.columnMapping.get(listMapsAggregates.get(nGroupingVariables).get(\\\"min\\\")), row)));\\r\\n\"+\n\t\t\t\t\"\t\t\ttempAggregatesMap.put(key3, val);\\r\\n\");\n\t\t\t}\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"max\")) {\n\t\t\t\tfileData.append(\"\t\t\tval=Math.max( tempAggregatesMap.getOrDefault(key4, Double.MIN_VALUE) , Double.parseDouble(getGroupingVariable(helper.columnMapping.get(listMapsAggregates.get(nGroupingVariables).get(\\\"max\\\")), row)));\\r\\n\"+\n\t\t\t\t\"\t\t\ttempAggregatesMap.put(key4, val);\");\n\t\t\t}\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"count\")) {\n\t\t\t\tfileData.append(\"\t\t\ttempAggregatesMap.put(key5, tempAggregatesMap.getOrDefault(key5, 0.0)+1);\\r\\n\");\n\t\t\t}\n\t\t\tfileData.append(\"\t\t\t}\\r\\n\");\n\t\t\tfileData.append(\"\t\t}\\r\\n\");\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"avg\")) {\n\t\t\t\tfileData.append(\n\t\t\t\t\"\t\tfor(String key: tempAggregatesMap.keySet()) {\\r\\n\"+\n\t\t\t\t\"\t\t\tif(key.contains(\\\"_avg_\\\"))\\r\\n\"+\n\t\t\t\t\"\t\t\t\ttempAggregatesMap.put(key, tempAggregatesMap.get(key)/tempAggregatesMap.get(key.replace(\\\"_avg_\\\", \\\"_count_\\\")));\\r\\n\"+\n\t\t\t\t\"\t\t}\\r\\n\");\n\t\t\t}\n\t\t\tfileData.append(\"\t\taggregatesMap.putAll(tempAggregatesMap);\\r\\n\");\n\t\t}\n\t\t\n\t\tfileData.append(\"\t}\\n\");\n\n//PREPARE THE RESULTS AND ADD THEM TO A LIST OF OUTPUTROW\n\t\tfileData.append(\"\\r\\n\tpublic ArrayList<OutputRow> createOutputResultSet() {\\r\\n\" + \n\t\t\t\t\"\t\tArrayList<OutputRow> outputRowList = new ArrayList<OutputRow>();\\r\\n\"+\n\t\t\t\t\"\t\tfor(int i=0; i<allGroupKeyRows.get(0).size();i++) {\\r\\n\" + \n\t\t\t\t\"\t\t\tString str=allGroupKeyStrings.get(0).get(i);\\r\\n\" + \n\t\t\t\t\"\t\t\tString[] tempStr = str.split(\\\"_\\\");\\r\\n\" + \n\t\t\t\t\"\t\t\tArrayList<String> strList = new ArrayList<String>();\\r\\n\" + \n\t\t\t\t\"\t\t\tfor(int j=0; j<=payload.getnumber_of_grouping_variables(); j++) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\tString ss = \\\"\\\";\\r\\n\" + \n\t\t\t\t\"\t\t\t\tint k=0;\\r\\n\" + \n\t\t\t\t\"\t\t\t\tfor(String gz: payload.getgrouping_attributes()) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tif(payload.getGroupingAttributesOfAllGroups().get(j).contains(gz)) ss=ss+tempStr[k++]+\\\"_\\\";\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\telse k++;\\r\\n\" + \n\t\t\t\t\"\t\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\t\tstrList.add(ss.substring(0, ss.length()-1));\\r\\n\" + \n\t\t\t\t\"\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\t//having check\\r\\n\" + \n\t\t\t\t\"\t\t\tif(payload.isHavingClause()) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\tString condition= prepareClause(allGroupKeyRows.get(0).get(i), allGroupKeyRows.get(0).get(i), payload.getHavingClause(), str, strList);\\r\\n\" + \n\t\t\t\t\"\t\t\t\tif(condition.equals(\\\"discard_invalid_entry\\\") || !Boolean.parseBoolean(expTree.execute(condition))) continue;\\r\\n\" + \n\t\t\t\t\"\t\t\t}\\r\\n\" + \n\t\t\t\t\"\\r\\n\" + \n\t\t\t\t\"\t\t\tOutputRow outputRow= convertInputToOutputRow(allGroupKeyRows.get(0).get(i), str, strList);\\r\\n\"+\n\t\t\t\t\"\t\t\tif(outputRow!=null){\\r\\n\" + \n\t\t\t\t\"\t\t\t\toutputRowList.add(outputRow);\\r\\n\"+\n\t\t\t\t\"\t\t\t}\\r\\n\"+\t\n\t\t\t\t\"\t\t}\\r\\n\" + \n\t\t\t\t\"\t\treturn outputRowList;\\r\\n\"+\n\t\t\t\t\"\t}\\n\");\n\t\t\n//PRINT THE OUTPUT ROW\n\t\tfileData.append(\"\\r\\n\tpublic void printOutputResultSet(ArrayList<OutputRow> outputResultSet) throws IOException{\\r\\n\");\n\t\tfileData.append(\"\t\tCalendar now = Calendar.getInstance();\\r\\n\" + \n\t\t\t\t\"\t\tDateFormat dateFormat = new SimpleDateFormat(\\\"MM/dd/yyyy HH:mm:ss\\\");\\r\\n\" + \n\t\t\t\t\"\t\tStringBuilder fileData = new StringBuilder();\\r\\n\" + \n\t\t\t\t\"\t\tfileData.append(\\\"TIME (MM/dd/yyyy HH:mm:ss)::::\\\"+dateFormat.format(now.getTime())+\\\"\\\\r\\\\n\\\");\\r\\n\" + \n\t\t\t\t\"\t\tString addDiv = \\\" -------------- \\\";\\r\\n\" + \n\t\t\t\t\"\t\tString divide = \\\"\\\";\\r\\n\" + \n\t\t\t\t\"\t\tString header=\\\"\\\";\"+\n\t\t\t\t\"\t\tfor(String select: payload.getselect_variables()) {\\r\\n\" + \n\t\t\t\t\"\t\t\tif(select.contains(\\\"0_\\\")) select=select.substring(2);\\r\\n\" + \n\t\t\t\t\"\t\t\theader=header+\\\" \\\"+select;\\r\\n\" + \n\t\t\t\t\"\t\t\tfor(int i=0;i<14-select.length();i++) header=header+\\\" \\\";\\r\\n\" + \n\t\t\t\t\"\t\t\tdivide=divide+addDiv;\\r\\n\"+\n\t\t\t\t\"\t\t}\\r\\n\" + \n\t\t\t\t\"\t\tSystem.out.println(divide); fileData.append(divide+\\\"\\\\r\\\\n\\\");\\r\\n\" + \n\t\t\t\t\"\t\tSystem.out.println(header); fileData.append(header+\\\"\\\\r\\\\n\\\");\\r\\n\" + \n\t\t\t\t\"\t\tSystem.out.println(divide); fileData.append(divide+\\\"\\\\r\\\\n\\\");\\r\\n\" + \n\t\t\t\t//\"\t\tSystem.out.println(); fileData.append(\\\"\\\\r\\\\n\\\");\\r\\n\" + \n\t\t\t\t\"\t\tString ansString=\\\"\\\";\\r\\n\" + \n\t\t\t\t\"\t\tDecimalFormat df = new DecimalFormat(\\\"#.####\\\");\\r\\n\");\n\t\tfileData.append(\"\t\tfor(OutputRow outputRow: outputResultSet) {\\r\\n\");\n\t\tfileData.append(\"\t\t\tString answer=\\\"\\\";\\r\\n\");\n\t\t\n\t\tfor(String select: payload.getselect_variables()) {\n\t\t\tif(helper.columnMapping.containsKey(select)) {\n\t\t\t\tint col = helper.columnMapping.get(select);\n\t\t\t\tif(col==0|| col==1|| col==5) {\n\t\t\t\t\t//string\n\t\t\t\t\tfileData.append(\"\t\t\tansString=outputRow.get\"+varPrefix+select+\"();\\r\\n\");\n\t\t\t\t\tfileData.append(\"\t\t\tanswer=answer+\\\" \\\"+ansString;\\r\\n\");\n\t\t\t\t\tfileData.append(\"\t\t\tfor(int k=0;k<14-ansString.length();k++) answer=answer+\\\" \\\";\\r\\n\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t//int\n\t\t\t\t\tfileData.append(\"\t\t\tansString = Integer.toString(outputRow.get\"+varPrefix+select+\"());\\r\\n\");\n\t\t\t\t\tfileData.append(\"\t\t\tfor(int k=0;k<12-ansString.length();k++) answer=answer+\\\" \\\";\\r\\n\");\n\t\t\t\t\tfileData.append(\"\t\t\tanswer=answer+ansString+\\\" \\\";\\r\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//double\n\t\t\t\tif(select.contains(\"/\")) select=select.replaceAll(\"/\", \"_divide_\");\n\t\t\t\tif(select.contains(\"*\")) select=select.replaceAll(\"*\", \"_multiply_\");\n\t\t\t\tif(select.contains(\"+\")) select=select.replaceAll(\"+\", \"_add_\");\n\t\t\t\tif(select.contains(\"-\")) select=select.replaceAll(\"-\", \"_minus_\");\n\t\t\t\tif(select.contains(\")\")) select=select.replaceAll(\"[)]+\", \"\");\n\t\t\t\tif(select.contains(\"(\")) select=select.replaceAll(\"[(]+\", \"\");\n\t\t\t\tfileData.append(\"\t\t\tansString = df.format(outputRow.get\"+varPrefix+select+\"());\\r\\n\");\n\t\t\t\tfileData.append(\"\t\t\tfor(int k=0;k<12-ansString.length();k++) answer=answer+\\\" \\\";\\r\\n\");\n\t\t\t\tfileData.append(\"\t\t\tanswer=answer+ansString+\\\" \\\";\\r\\n\");\n\t\t\t}\n\t\t}\n\t\tfileData.append(\"\t\t\tSystem.out.println(answer); fileData.append(answer+\\\"\\\\r\\\\n\\\");\\r\\n\");\n\t\tfileData.append(\"\t\t}\\r\\n\");\n\t\tfileData.append(\"\t\tFileOutputStream fos = new FileOutputStream(\\\"queryOutput/\"+payload.fileName+\"\\\");\\r\\n\" + \n\t\t\t\t\"\t\tfos.write(fileData.toString().getBytes());\\r\\n\" + \n\t\t\t\t\"\t\tfos.flush();\\r\\n\" + \n\t\t\t\t\"\t\tfos.close();\\r\\n\");\n\t\tfileData.append(\"\t}\\r\\n\");\n\t\t\n\t\t\n//DRIVER METHOD OF THE QUERY PROCESSOR\n\t\tfileData.append(\"\\r\\n\tpublic void process() throws IOException{\\r\\n\" + \n\t\t\t\t\"\t\tArrayList<InputRow> inputResultSet = createInputSet();\\r\\n\" + \n\t\t\t\t\"\t\tif(payload.getIsWhereClause()) inputResultSet = executeWhereClause(inputResultSet);\\r\\n\" + \n\t\t\t\t\"\t\tif(payload.getnumber_of_grouping_variables()>0) createListsBasedOnSuchThatPredicate(inputResultSet);\\r\\n\" + \n\t\t\t\t\"\t\tcomputeAggregates(inputResultSet);\\r\\n\" + \n\t\t\t\t\"\t\tArrayList<OutputRow> outputResultSet = createOutputResultSet();\\r\\n\" + \n\t\t\t\t\"\t\tprintOutputResultSet(outputResultSet);\\r\\n\"+\n\t\t\t\t\"\t}\\n\");\n\t\t\n\t\tfileData.append(\"}\");\n\t\tFileOutputStream fos = new FileOutputStream(\"src/dbmsProject/QueryProcessor.java\");\n\t\tfos.write(fileData.toString().getBytes());\n\t\tfos.flush();\n\t\tfos.close();\n\t}",
"public void execute() throws SQLException {\n\t\tif (this.ds == null) {\n\t\t\tthrow new RuntimeException(\n\t\t\t\"Please pass a DataSource to the ListSqlHelper!\");\n\t\t}\n\t\t\n\t\texecuteCountSql();\n\t\texecuteItemRangeSql();\n\t}",
"public interface Sqlable {\n\n Map<String, Object> getSqlMap();\n\n String getTableName();\n\n}",
"public interface FluentJdbc {\n /**\n * Creates a Query API on a connection provided by the ConnectionProvider. Fails if no ConnectionProvider is set.\n * @return Query API on a connection provided by the ConnectionProvider\n */\n Query query();\n\n /**\n * Creates a Query API using a given managed connection\n *\n * @param connection managed sql Connection\n * @return Query API for the given connection\n */\n Query queryOn(Connection connection);\n}",
"protected String getLoadSql(String table,\r\n Class type,\r\n OrderedMap mapping,\r\n String whereClause) throws DataLayerException {\r\n StringBuffer sql = new StringBuffer(\"select \");\r\n PropertyDescriptor[] pds = null;\r\n boolean isaMap = false;\r\n \r\n try {\r\n isaMap = DatabaseDriver.isaMap(type); \r\n if (! isaMap) {\r\n // POJO\r\n pds = BeanUtils.getPropertyDescriptors(type, mapping);\r\n if (pds == null || pds.length == 0) {\r\n if (type == null) {\r\n throw new DataLayerException(\r\n \"Error creating Insert SQL. Bean Discriptors are missing. Type is NULL.\");\r\n } else {\r\n throw new DataLayerException(\r\n \"Error creating Insert SQL. Bean Discriptors are missing. Type = \"\r\n + type.getName());\r\n } \r\n }\r\n boolean first = true;\r\n for (int i = 0; i < pds.length; i++) {\r\n if (!first)\r\n sql.append(\", \");\r\n else\r\n first = false;\r\n sql.append(pds[i].getName());\r\n }\r\n } else {\r\n // Map\r\n boolean first = true;\r\n Iterator it = mapping.iterator();\r\n log.debug(\"Selecting columns:\");\r\n while (it.hasNext()) {\r\n Field field = (Field)it.next();\r\n if (StringUtils.isNullOrEmpty(field.getPattern())) {\r\n log.debug(\" \" + field.getName());\r\n if (! first)\r\n sql.append(\", \");\r\n else\r\n first = false;\r\n sql.append(field.getName());\r\n } \r\n }\r\n }\r\n\r\n sql.append(\" from \");\r\n sql.append(table);\r\n sql.append(\" \");\r\n sql.append(whereClause);\r\n return sql.toString();\r\n } catch (java.lang.Exception e) {\r\n throw new DataLayerException(\"Unable to generate SQL to load data from the database.\",\r\n e);\r\n }\r\n }",
"private RunQueriesEx setupQueries() {\n RunQueriesEx queries = new RunQueriesEx();\n \n //for each column in our table, update one of our lists\n for(int i = 0; i < this.dataTable.getColumnCount(); i++) {\n this.updateList(i);\n }\n \n updateEmptyLists(); //pads any lists that didn't get updates with empty strings\n \n //add a new query for each row in the table\n for(int i = 0; i < this.dataTable.getRowCount(); i++) {\n queries.add(this.createQueryFromRow(i));\n }\n \n return queries;\n }",
"@Override\n public boolean execute(String sql) throws SQLException {\n\n // a result set object\n //\n tsResultSet r;\n\n // execute the query \n //\n r = connection.executetinySQL(this);\n\n // check for a null result set. If it wasn't null,\n // use it to create a tinySQLResultSet, and return whether or\n // not it is null (not null returns true).\n //\n if( r == null ) {\n result = null;\n } else {\n result = new tinySQLResultSet(r, this);\n }\n return (result != null);\n\n }",
"public QueryCore executionQ() throws SQLException\n {\n rs = prepStm.executeQuery();\n return this;\n }",
"protected void createSelectStatement() throws Exception\n {\n selectStatement = new SQLStatementWithParams();\n\n // Generate the SQL and collect all host variables needed to execute it later\n generateSelectClause( wrqInfo, selectStatement );\n generateFromClause( wrqInfo, selectStatement );\n generateWhereClause( wrqInfo, selectStatement );\n generateGroupingClause( wrqInfo, selectStatement );\n generateHavingClause( wrqInfo, selectStatement );\n generateOrderClause( wrqInfo, selectStatement );\n }",
"public interface Query<T> extends SqlOperation {\n\n public T fill(ResultSet resultSet) throws SQLException;\n}",
"public MappedQuery generateSql( Query query, String locale, IMetadataDomainRepository repo,\n DatabaseMeta databaseMeta, Map<String, Object> parameters, boolean genAsPreparedStatement )\n throws PentahoMetadataException {\n\n Constraint securityConstraint = null;\n\n if ( repo != null ) {\n String mqlSecurityConstraint = repo.generateRowLevelSecurityConstraint( query.getLogicalModel() );\n if ( StringUtils.isNotBlank( mqlSecurityConstraint ) ) {\n securityConstraint = new Constraint( CombinationType.AND, mqlSecurityConstraint );\n }\n }\n\n // resolve any missing parameters with default values\n if ( parameters == null && query.getParameters().size() > 0 ) {\n parameters = new HashMap<String, Object>();\n }\n for ( Parameter param : query.getParameters() ) {\n if ( !parameters.containsKey( param.getName() ) ) {\n parameters.put( param.getName(), param.getDefaultValue() );\n }\n }\n\n return getSQL( query.getLogicalModel(), query.getSelections(), query.getConstraints(), query.getOrders(),\n databaseMeta, locale, parameters, genAsPreparedStatement, query.getDisableDistinct(), query.getLimit(),\n securityConstraint );\n }",
"@Override\n public void execute() {}",
"protected void runSQL(String sql) {\n\t\ttry {\n\t\t\tDataSource dataSource = wfms_Position_AuditPersistence.getDataSource();\n\n\t\t\tDB db = DBManagerUtil.getDB();\n\n\t\t\tsql = db.buildSQL(sql);\n\t\t\tsql = PortalUtil.transformSQL(sql);\n\n\t\t\tSqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,\n\t\t\t\t\tsql);\n\n\t\t\tsqlUpdate.update();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow new SystemException(e);\n\t\t}\n\t}",
"protected void runSQL(String sql) {\n\t\ttry {\n\t\t\tDataSource dataSource = monthlyTradingPersistence.getDataSource();\n\n\t\t\tDB db = DBManagerUtil.getDB();\n\n\t\t\tsql = db.buildSQL(sql);\n\t\t\tsql = PortalUtil.transformSQL(sql);\n\n\t\t\tSqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,\n\t\t\t\t\tsql);\n\n\t\t\tsqlUpdate.update();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow new SystemException(e);\n\t\t}\n\t}",
"protected T selectImpl(String sql, String... paramentros) {\n\t\tCursor cursor = null;\n\t\ttry {\n\t\t\tcursor = BancoHelper.db.rawQuery(sql, paramentros);\n\t\t\t\n\t\t\tif (cursor.getCount() > 0 && cursor.moveToFirst()) {\n\t\t\t\treturn fromCursor(cursor);\n\t\t\t}\n\n\t\t\tthrow new RuntimeException(\"Não entrou no select\");\n\n\t\t} finally {\n\n\t\t\tif (cursor != null && !cursor.isClosed()) {\n\t\t\t\tcursor.close();\n\t\t\t}\n\t\t}\n\n\t}"
] | [
"0.6610283",
"0.65436137",
"0.6498206",
"0.6445604",
"0.6326645",
"0.631047",
"0.61952275",
"0.61809886",
"0.60628587",
"0.6051978",
"0.60511464",
"0.60197514",
"0.59991026",
"0.5998534",
"0.598744",
"0.5972822",
"0.5955672",
"0.59382147",
"0.5936671",
"0.59347636",
"0.5922222",
"0.5911398",
"0.5879865",
"0.58776706",
"0.58766675",
"0.5859123",
"0.58273417",
"0.58260816",
"0.5823532",
"0.5819732",
"0.5816957",
"0.5813407",
"0.5812307",
"0.58021075",
"0.5790635",
"0.57617587",
"0.5738775",
"0.5720622",
"0.56949735",
"0.56899196",
"0.56883365",
"0.5679484",
"0.5679008",
"0.565487",
"0.5648173",
"0.563936",
"0.56357557",
"0.5626681",
"0.5605512",
"0.5598405",
"0.55967444",
"0.55950755",
"0.55904275",
"0.55708945",
"0.55686224",
"0.5567733",
"0.5567154",
"0.5564104",
"0.5555125",
"0.5551419",
"0.55490214",
"0.5525197",
"0.5523644",
"0.5521536",
"0.55192983",
"0.55079836",
"0.5503493",
"0.549979",
"0.5495627",
"0.549347",
"0.5487814",
"0.54807013",
"0.54801595",
"0.54799193",
"0.5466384",
"0.5465616",
"0.54622686",
"0.54615176",
"0.54562277",
"0.54555523",
"0.5448671",
"0.5448656",
"0.54475343",
"0.54328585",
"0.543157",
"0.5431281",
"0.5423056",
"0.54174745",
"0.54174066",
"0.54123175",
"0.5410855",
"0.5410524",
"0.54103655",
"0.54095536",
"0.5409324",
"0.5403601",
"0.54012233",
"0.53983766",
"0.5397739",
"0.5396899"
] | 0.6612766 | 0 |
Constructs a Card Object | public Card(String name, String description, String flavorText,
Boolean scorable, int cost) {
this.name = name;
this.description = description;
this.flavorText = flavorText;
this.scorable = scorable;
this.cost = cost;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Card () {}",
"public Card()\n {}",
"public Card() { this(12, 3); }",
"Card(){\t \n}",
"public Card()\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************ Start Card Method *****************/\n\n\t// Set face value to null\n\tfaceValue = null;\n\n\t// Set true value to 0\n\ttrueValue = 0;\n\n\t// Set suit to null\n\tsuit = null;\n\n\t// Set picture to null\n\tpicture = null;\n\n }",
"public de.uni_koblenz.jgralabtest.schemas.gretl.pddsl.Card createCard();",
"public Card(String name) {\n setValue(name);\n }",
"public Card() {\n var random = new SecureRandom();\n var allTypes = Type.values();\n var allSuits = Suit.values();\n this.type = allTypes[random.nextInt(10)];\n this.suit = allSuits[random.nextInt(4)];\n }",
"public Card() {\n this(new Random().nextInt(54));\n establishHierarchicalValue();\n }",
"public Card(){\n this.name = \"\";\n this.description = \"\";\n this.element = null;\n this.img = \"\";\n }",
"Cards(String cardName, String cardDes, int puntosHabilidad) {\n this.nombre = cardName;\n this.descripcion = cardDes;\n this.puntos = puntosHabilidad;\n }",
"public CardGameFramework()\n {\n this(1, 0, 0, null, 4, 13);\n }",
"public Card()\n {\n suit = 0;\n rank = Card.ACE;\n }",
"public Card(){\n suit = 0;\n rank = 0;\n }",
"public Card build() {\n return new Card(frontFace, backFace);\n }",
"public CardGameFramework() {\n this(1, 0, 0, null, 4, 13);\n }",
"public BaseballCard(){\r\n\r\n\t}",
"Cards(String cardName, String cardDes, int ataque, int defensa) {\n this.nombre = cardName;\n this.descripcion = cardDes;\n this.puntos = ataque;\n this.def = defensa;\n }",
"Card(int num,String suit){\n this.number = num;\n this.suits = suit;\n }",
"public card(){\n\t\tname = \"blank\";\n\t\ttype = \"blank\";\n\t\tcost = 0;\n\t\tgold = 0;\n\t\tvictory_points = 0;\n\t\taction = 0;\n\t\tbuy = 0;\n\t\tcard= 0;\n\t\tattack = false;\n\t}",
"public Card()\n {\n suite = \"\";\n number = \"\";\n value = 0;\n aceValue = 1;\n hasBeenPicked = false;\n }",
"private Card(Color c, Rank r) {\n this.nbCard = pack(c,r);\n }",
"public Card(int value)\n {\n //initialize the value instance variable\n this.value = value;\n }",
"public Card(String id, String name) {\n \t\tsameID = new String[MINILEN];\n \t\tfor (int i = 0; i < sameID.length; i++) {\n \t\t\tsameID[i] = \"\";\n \t\t}\n \t\tsetID(id);\n \t\t// setName(id);\n \t\tsetCardName(name);\n \n \t\trealCardName = name;\n \n \t\teffects = new ArrayList<String>();\n \t\teffects_e = new ArrayList<String>();\n \t\tflavorText = \"\";\n \t\tflavorText_e = \"\";\n \t\tsetCurrentState(State.NONE);\n \t\t// imageFile = new File(\"FieldImages/cardBack-s.jpg\");\n \t\timageResource = \"/resources/FieldImages/cardBack-s.jpg\";\n \t\tbackResource = \"/resources/FieldImages/cardBack-s.jpg\";\n \t\tsetAssociatedCards(new ArrayList<Card>());\n \t\tsetAttributes(new ArrayList<Attribute>());\n \t\t// addMouseListener(this);\n \t}",
"public PlayingCard(){\n\t\tsuper();\n\t}",
"public Card(int x) {\n\t\tid = x;\n\t}",
"public Card(String cardFace, String cardSuit) {\r\n this.face = cardFace; // initialize face of card\r\n this.suit = cardSuit; // initialize suit of card\r\n }",
"public Card(String type,String value)\n {\n this.type = type;\n this.value = value;\n }",
"public Card (int aRank , int aSuit)\n {\n this.ranks = aRank;\n this.suits = aSuit;\n }",
"public Card(){\n\t\trank = (int) (Math.random()*(13-1));\n\t\tsuit = (int) (Math.random()*4);\n\t}",
"public CardRequest() {\r\n card = new MSRData(); // an empty one\r\n }",
"public Card(int v, Suit s) {\n this.value = v;\n this.suit = s;\n //this.specialTypeOfCard = NOT_FACE_NOT_ACE;\n\n }",
"public Card(Card card) {\n this.set(card.value, card.suit);\n }",
"public PaymentCard() {\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 Card() {\n this(new VCard());\n vcard.getProperties().add(Version.VERSION_4_0);\n\n version = 4;\n }",
"public Card(String name, String description) {\n\t\tthis.name = name;\n\t\tthis.description = description;\n\t}",
"public Card(String suit, int value)\n {\n this.suit = suit;\n this.value = value;\n \n }",
"public Card (Rank rank, Suit suit)\n {\n this.rank = rank;\n this.suit = suit;\n }",
"public Cardholder(String name, String address, int cardNumber){\n this.name = name;\n this.address = address;\n this.cardNumber = cardNumber;\n }",
"public Card() {\n\t\tthis.suit = \" \";\n this.rank = 0;\n this.face = \" \";\n this.color = \" \";\n\t}",
"public Card (Suit s, int v) {\n suit = s;\n val = v;\n }",
"public CreditCard ()\r\n\t{\r\n\t\t\r\n\t}",
"abstract public Vcard createVcard();",
"public Card(int value, int suit)\n {\n cardValue = value;\n cardSuit = suit;\n }",
"public Card(String[] card) {\r\n\t\tthis.deckIndex = Integer.parseInt(card[0]);\r\n\t\tthis.suit = (char) Integer.parseInt(card[1]);\r\n\t\tthis.name = (char) Integer.parseInt(card[2]);\r\n\t\tthis.ordinal = Integer.parseInt(card[3]);\r\n\t\tthis.value = Integer.parseInt(card[4]);\r\n\t}",
"public Card(String s, int c)\r\n { suit = s;\r\n count = c;\r\n }",
"public UserCard() {\n this(DSL.name(\"b2c_user_card\"), null);\n }",
"Card(Color color) {\n this.color = color;\n }",
"public Card(int cardNumber, JButton jButton) {//upon creation;\n this.cardNumber = cardNumber;//set the card number of this card;\n this.jButton = jButton;//set the JButton of this card;\n// System.out.println(cardNumber);//SOUT the card numbers;\n }",
"public Card(int s, int v){\n\t\t//make a card with suit s and value v\n\t\tsuit = s;\n\t\tvalue = v; \n\t\t\n\t}",
"public LaundryCard() {\n\t}",
"public Card(int s, int r)\n {\n suit = s;\n rank = r;\n }",
"public Card(int s, int r){\n suit = s;\n rank = r;\n }",
"public Card(Suit suit, Value value){\n this.value = value;\n this.suit = suit;\n }",
"public Card()\n {\n // initialise instance variables\n message = new ArrayList<String>();\n message.add(\"Sorry!\");\n message.add(\"One\");\n message.add(\"Two\");\n message.add(\"Three\");\n message.add(\"Four\");\n }",
"public Card makeCopy(){\n return new Card(vimage);\n }",
"public Card(int cardRank, int cardSuit){\n this.rank = cardRank;\n this.suit = cardSuit;\n }",
"public Deck(){\n\t\tcount = 51;\n\t\tcards = new Card[52];\n\t\trand = new Random();\n\t\tfor(Suit suit : Suit.values()){\n\t\t\tfor (int i = 2; i < 15; i++) {\n\t\t\t\tcards[suit.ordinal()*13 + i - 2] = new Card(suit,i);\n\t\t\t}\n\t\t}\n\t}",
"public Card(short rank, short suit){\r\n this.rank = rank;\r\n this.suit = suit;\r\n }",
"public ViewCard(@NotNull Card modelCard)\n {\n super(CARD_WIDTH, CARD_HEIGHT, CARD_DEPTH, \"file:./res/\" + getFileName(modelCard),\n CARD_FACE_TEXTURE_WIDTH, CARD_FACE_TEXTURE_HEIGHT);\n this.modelCard = modelCard;\n }",
"public CluedCard(GameMode mode) {\n\t\tthis(null, null, mode);\n\t}",
"public Card(FrontFace frontFace, BackFace backFace) {\n this.frontFace = frontFace;\n this.backFace = backFace;\n }",
"public Card(int tempNum, int tempSuit)\n {\n num = tempNum;\n suit = tempSuit;\n }",
"public Card(final VCard vcard) {\n this.vcard = vcard;\n prevLastmod = getLastmod();\n }",
"public Card(User user) {\n\t\tsuper();\n\t\tthis.user=user;\n\t\tuser.setCard(this);\n\t}",
"public Card(int cType){\n this.cardType = cType;\n scaleCard(this.cardType);\n this.isClick = false;\n }",
"public Card()\r\n {\r\n rand = new Random();\r\n value = rand.nextInt(28); \r\n // Assigning value\r\n if (value >= 14) // Check if value is greater than 14 then value = value - 14;\r\n value -= 14;\r\n // Assigning color\r\n rand = new Random();\r\n // Switch statement for assigning different colors\r\n switch(rand.nextInt(4) )\r\n {\r\n case 0: color = \"Red\"; \r\n break;\r\n case 1: color = \"Green\"; \r\n break;\r\n case 2: color = \"Blue\"; \r\n break;\r\n case 3: color = \"Yellow\"; \r\n break;\r\n }\r\n // If the card is a wild card and value is greater than or equal to 13 then none value is assigned to color variable\r\n if (value >= 13)\r\n color = \"none\";\r\n }",
"public Cards( boolean fullPack)\r\n {\r\n cards = new Card[ NOOFCARDSINFULLPACK ];\r\n valid = 0;\r\n \r\n if ( fullPack)\r\n createFullPackOfCards();\r\n }",
"public CardGame(){\n this.handOne = new Hand();\n this.handTwo = new Hand();\n this.gameDeck = new Deck();\n this.playerScore = 0;\n this.oppoScore = 0;\n }",
"Card(String n, int ps[], int pr[], int y, ImageIcon i){\r\n\t\tname = n;\r\n\t\tprereqSkill = ps;\r\n\t\tprereqRoom = pr;\r\n\t\tyear = y;\r\n\t\timg = i;\r\n\t\tretCA = CardAction.NONE;\t\t\r\n\t}",
"public Deck() {\n cards = new Card[52];\n size = 0;\n for (int suit = Card.SPADES; suit <= Card.CLUBS; suit++) {\n for (int rank = Card.ACE; rank <= Card.KING; rank++) {\n cards[size] = new Card(rank, suit);\n size += 1;\n }\n }\n }",
"public CreditCard(int pin, String number, String holder, Date expiryDate, int cvc){\r\n this.pin = pin;\r\n this.number = number;\r\n this.holder = holder;\r\n this.expiryDate = expiryDate;\r\n this.cvc = cvc;\r\n}",
"Board() {\n this.cardFactory = new CardFactory(this);\n }",
"public BJCard(Suit s, Value gVal)\r\n {\r\n suit = s;\r\n value= gVal;\r\n }",
"public Hand(Shuffleable cards) {\n this.setLayout(new BorderLayout());\n this.cards = cards;\n this.busted = false; //Player not busted by default\n this.value = 0; //Value starts at 0\n values.add(0);\n nameLabel = new JLabel(\"\", SwingConstants.LEFT); //Initializes name label\n valueLabel = new JLabel(\"Value: \" + value, SwingConstants.LEFT); //Initilizes value label\n cardPane = new JPanel(new FlowLayout());\n cardPane.setBackground(Color.GREEN); //Background color green\n this.add(nameLabel, BorderLayout.NORTH);\n this.add(valueLabel, BorderLayout.SOUTH);\n this.add(cardPane, BorderLayout.CENTER);\n }",
"public CardDetail(String suit, String rank){\r\n this.suit = suit;\r\n this.rank = rank;\r\n }",
"public Card(String inFaceValue, int inTrueValue, String inSuit, ImageIcon inPicture)\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************ Start Card Method *****************/\n\n\t// Set face value\n\tfaceValue = inFaceValue;\n\n\t// Set true value\n\ttrueValue = inTrueValue;\n\n\t// Set suit\n\tsuit = inSuit;\n\n\t// Set picture\n\tpicture = inPicture;\n\n }",
"public Card(char value, Suit suit) {\n this.set(value, suit);\n }",
"public CardInformationExample() {\n oredCriteria = new ArrayList<Criteria>();\n }",
"public Card(Rank rank, Suit suit)\n\t{\n\t\tthis.rank = rank;\n\t\tthis.suit = suit;\n\t}",
"public Card(int v, Suit s, String special) {\n this.value = v;\n this.suit = s;\n this.specialTypeOfCard = special;\n\n }",
"public Builder setCards(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n cards_ = value;\n onChanged();\n return this;\n }",
"public BlackjackHand() {\n super(0);\n aceCount = 0;\n cards = new ArrayList<>();\n }",
"public Card(int suit, int rank) {\n\n // pre-condition: suit and rank are valid\n \n this.suit = suit;\n this.rank = rank;\n }",
"public DeckOfCards() {\n\n String faces[] = {\"Ace\", \"Deuce\", \"Three\", \"Four\", \"Five\", \"Six\", \"Seven\", \"Eight\", \"Nine\", \"Ten\", \"Jack\", \"Queen\", \"King\"};\n String suits[] = {\"Hearts\", \"Diamonds\", \"Clubs\", \"Spades\"};\n\n deck = new Card[NUMBER_OF_CARDS]; //create an array of card objects (52)\n currentCard = 0;\n randomNumbers = new Random();\n\n //Populate deck with card objects\n for(int count = 0; count < deck.length; count++){\n deck[count] = new Card(faces[count % 13], suits[count / 13]);\n //first 13 cards will be ace through king of hearts then ace though king of diamonds etc...\n\n }\n\n }",
"public Deck( ) {\r\n int ordinal;\r\n alalSets = new ArrayList<>();\r\n \r\n // load the cards\r\n for ( ordinal = 1; ordinal <= 13; ordinal++) {\r\n for( int iCount = 1; iCount <= 4; iCount++) {\r\n // the deck adds one set which contains one card\r\n \r\n ArrayList<Card> redCardSet = new ArrayList<>();\r\n Card redCard = new Card();\r\n redCard.value = ordinal;\r\n redCard.color = Enums.RED;\r\n redCardSet.add(redCard); // add card to set\r\n alalSets.add( redCardSet ); // add set to deck\r\n\r\n ArrayList<Card> blackCardSet = new ArrayList<>();\r\n Card blackCard = new Card();\r\n blackCard.value = ordinal;\r\n blackCard.color = Enums.BLACK;\r\n blackCardSet.add(blackCard);\r\n alalSets.add( blackCardSet );\r\n }\r\n }\r\n }",
"public Hand(){\n cards = new ArrayList<Card>();\n }",
"public Deck() {\n generateDeckOfCards();\n }",
"public CardPile() {\n \n this.pila = new Stack<ICard>();\n this.tamano = 0;\n }",
"public MageTowerCard() {\n\t\tsuper(cardName, cardId, cardCost);\n\t}",
"public Card(int cardType){\r\n\r\n\t\tScanner inputFile = null;\r\n\r\n\t\ttry {\r\n\r\n\t\t\tinputFile = new Scanner(new File(\"cards.txt\")).useDelimiter(\",\");\r\n\t\t\t\r\n\t\t\t//reads in text file by row\r\n\t\t\tfor(int row = 1; row < cardType; row++){\r\n\t\t\t\tinputFile.nextLine();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//sets the card name, number of cards and the coin values\r\n\t\t\tsetCardName(inputFile.next());\r\n\t\t\tsetNumberOfCards(Integer.valueOf(inputFile.next()));\r\n\t\t\tfor(int coinNumber = 1; coinNumber < 5; coinNumber++)\r\n\t\t\t\tcoin[coinNumber] = Integer.valueOf(inputFile.next());\r\n\t\t\t\r\n\r\n\t\t} catch (FileNotFoundException error) {\r\n\r\n\t\t\tSystem.err.println(\"File not found - check the file name\");\r\n\r\n\t\t}\r\n\t\t\r\n\t}",
"public Hand()\n {\n cards = new ArrayList<Card>();\n }",
"public Card(char s, int r) {\n this.suit = s;\n this.rank = r;\n }",
"public Card(String inputFrontInfo, String inputBackInfo, Date inputStartTime, int inputID) {\n frontInfo = inputFrontInfo;\n backInfo = inputBackInfo;\n startTime = inputStartTime;\n cardID = inputID;\n\n }",
"public CardStack()\n {\n cards = new Vector<Card>();\n }",
"public CardCollection() {\n cards = new ArrayList<>();\n }",
"public CareerCard (String name)\r\n {\r\n super (name);\r\n setDegreeRequired ();\r\n setMaxPayRaise ();\r\n }",
"CardNumber(int number) {\r\n this.number = number;\r\n }",
"public Card(String value, String suit) {\n this.value = value;\n this.suit = suit;\n }"
] | [
"0.8219015",
"0.7965876",
"0.77801573",
"0.77382445",
"0.75989383",
"0.75534165",
"0.7475822",
"0.7445035",
"0.7441012",
"0.7438649",
"0.7405022",
"0.7358737",
"0.7334442",
"0.7310112",
"0.7294291",
"0.72936153",
"0.72741586",
"0.71834666",
"0.7181025",
"0.7157086",
"0.712898",
"0.71174604",
"0.70910007",
"0.70707464",
"0.7050646",
"0.70276225",
"0.7018615",
"0.70011336",
"0.6991946",
"0.6972457",
"0.69547415",
"0.6947072",
"0.6925366",
"0.69144696",
"0.6914276",
"0.6911928",
"0.6911685",
"0.6881188",
"0.68798137",
"0.6869408",
"0.6863092",
"0.68594474",
"0.6829855",
"0.6821608",
"0.681796",
"0.6763099",
"0.6738847",
"0.6714838",
"0.66952384",
"0.66817147",
"0.6659167",
"0.6653761",
"0.66454107",
"0.66334593",
"0.66167724",
"0.6600839",
"0.6567971",
"0.65558195",
"0.6554767",
"0.65479445",
"0.65378064",
"0.6533502",
"0.65296733",
"0.65189767",
"0.6513889",
"0.6507925",
"0.6489682",
"0.6485478",
"0.6475841",
"0.64534724",
"0.64483035",
"0.6439241",
"0.64392215",
"0.64358085",
"0.6427495",
"0.64140886",
"0.641378",
"0.64031404",
"0.63972896",
"0.6389364",
"0.63878477",
"0.63870186",
"0.63851124",
"0.63488424",
"0.6346203",
"0.63440365",
"0.63308597",
"0.631937",
"0.6316699",
"0.63148814",
"0.63113195",
"0.6303773",
"0.6301159",
"0.62990034",
"0.62984526",
"0.6295202",
"0.6290943",
"0.6283901",
"0.6250401",
"0.62444365"
] | 0.68237805 | 43 |
gets and returns the Card name | public String getName() {
return name;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getCardName() {\n \t\treturn cardName;\n \t}",
"public String getCardName(){\n return type.getType() + \" of \" + suit.getSuit();\n }",
"public String getCardName() {\r\n\t\treturn cardName;\r\n\t}",
"public String getCardName()\n {\n String returnString = \"\";\n if(num == 14)\n {\n returnString+=(\"Ace\");\n }\n else if(num == 11)\n {\n returnString+=(\"Jack\");\n }\n else if(num == 12)\n {\n returnString+=(\"Queen\");\n }\n else if(num == 13)\n {\n returnString+=(\"King\");\n }\n else\n {\n returnString+=(num);\n }\n returnString+=(\" of \");\n if(suit == 1)\n {\n returnString+=(\"Spades\");\n }\n else if(suit == 2)\n {\n returnString+=(\"Hearts\");\n }\n else if(suit == 3)\n {\n returnString+=(\"Diamonds\");\n }\n else\n {\n returnString+=(\"Clubs\");\n }\n return returnString;\n }",
"public UnoCard getCardByName(String cardName){\n Drawable color_change_plus4 = this.appContext.getResources().getDrawable(R.drawable.color_change_plus4);\n Drawable card_back = this.appContext.getResources().getDrawable(R.drawable.card_back);\n UnoCard card = new UnoCard(this.appContext, deckPos, new Point(20, 20), color_change_plus4, card_back, \"Color Change Plus 4\", \"\", \"COLOR CHANGE PLUS 4\", \"COLOR CHANGE PLUS 4\");\n for (UnoCard c : this.cards){\n if (c.getName().equals(cardName)){\n card = c;\n break;\n }\n }\n return card;\n }",
"private String getName() {\n System.out.println(\"Enter contact name\");\n return scannerForAddressBook.scannerProvider().nextLine();\n }",
"public static String getCard(Card c)\n\t{\n\t\tString name=\"/cards/\";\n\n\t\t//Value of card\n\t\tint value =c.getValue();\n\t\tswitch(value)\n\t\t{\n\t\tcase 1:\n\t\t\tname+=\"A\";\n\t\t\tbreak;\n\t\tcase 11:\n\t\t\tname+=\"J\";\n\t\t\tbreak;\n\t\tcase 12:\n\t\t\tname+=\"Q\";\n\t\t\tbreak;\n\t\tcase 13:\n\t\t\tname+=\"K\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tname+=String.valueOf(value);\n\t\t}\n\n\t\t//suit of card\n\t\tint suit=c.getSuit();\n\t\tswitch(suit)\n\t\t{\n\t\tcase 0:\n\t\t\tname+=\"C\";\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tname+=\"D\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tname+=\"H\";\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tname+=\"S\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"invalid suit\");\n\t\t}\n\t\tname+=\".png\";\n\t\treturn name;\n\t}",
"public java.lang.String getCardTypeName() {\r\n return cardTypeName;\r\n }",
"public String getCardName(Integer cardNumber){\n if(playerHand.get(cardNumber) == null){\n return \"CardEmpty_small\";\n } else{\n return playerHand.get(cardNumber).getName();\n }\n }",
"public void setCardName(String name) {\n \t\tthis.cardName = name;\n \t\tsetUniqueID(UUID.randomUUID());\n \t}",
"public String get卡名and類型Name() {\r\n return \"[\" + 卡名 + \"-\" + CardType.CARD_TYPE_NAME[類型] + \"] \";\r\n }",
"public String getCreditCardName() {\n return getCreditCardName(getCreditCardType());\n }",
"String getCardLastName(String bookingRef);",
"public String getCard(int buttonID)\n {\n String cardName = \"\";\n\n switch(buttonID)\n {\n case 0: cardName = \"2H\"; break;\n case 1: cardName = \"3H\"; break;\n case 2: cardName = \"4H\"; break;\n case 3: cardName = \"5H\"; break;\n case 4: cardName = \"6H\"; break;\n case 5: cardName = \"7H\"; break;\n case 6: cardName = \"8H\"; break;\n case 7: cardName = \"9H\"; break;\n case 8: cardName = \"10H\"; break;\n case 9: cardName = \"JH\"; break;\n case 10: cardName = \"QH\"; break;\n case 11: cardName = \"KH\"; break;\n case 12: cardName = \"AH\"; break;\n case 13: cardName = \"2D\"; break;\n case 14: cardName = \"3D\"; break;\n case 15: cardName = \"4D\"; break;\n case 16: cardName = \"5D\"; break;\n case 17: cardName = \"6D\"; break;\n case 18: cardName = \"7D\"; break;\n case 19: cardName = \"8D\"; break;\n case 20: cardName = \"9D\"; break;\n case 21: cardName = \"10D\"; break;\n case 22: cardName = \"JD\"; break;\n case 23: cardName = \"QD\"; break;\n case 24: cardName = \"KD\"; break;\n case 25: cardName = \"AD\"; break;\n case 26: cardName = \"2C\"; break;\n case 27: cardName = \"3C\"; break;\n case 28: cardName = \"4C\"; break;\n case 29: cardName = \"5C\"; break;\n case 30: cardName = \"6C\"; break;\n case 31: cardName = \"7C\"; break;\n case 32: cardName = \"8C\"; break;\n case 33: cardName = \"9C\"; break;\n case 34: cardName = \"10C\"; break;\n case 35: cardName = \"JC\"; break;\n case 36: cardName = \"QC\"; break;\n case 37: cardName = \"KC\"; break;\n case 38: cardName = \"AC\"; break;\n case 39: cardName = \"2S\"; break;\n case 40: cardName = \"3S\"; break;\n case 41: cardName = \"4S\"; break;\n case 42: cardName = \"5S\"; break;\n case 43: cardName = \"6S\"; break;\n case 44: cardName = \"7S\"; break;\n case 45: cardName = \"8S\"; break;\n case 46: cardName = \"9S\"; break;\n case 47: cardName = \"10S\"; break;\n case 48: cardName = \"JS\"; break;\n case 49: cardName = \"QS\"; break;\n case 50: cardName = \"KS\"; break;\n case 51: cardName = \"AS\"; break;\n\n }\n\n return cardName;\n }",
"private static String getName(){\r\n\t\treturn new StringBuilder(input.next()).substring(0,3);\r\n\t}",
"public void printCardHoldersName(ArrayList<VentraCard> cards) {\n \t\n \tfor(int i=0; i<cards.size(); i++) {\n \t\tSystem.out.println(\"Name \"+ cards.get(i).getFullName()+\" Cardnumber: \"+cards.get(i).getCardNumber());\n \t}\n }",
"public java.lang.String getCardID() {\r\n return localCardID;\r\n }",
"String getCardFirstName(String bookingRef);",
"public Card(String name) {\n setValue(name);\n }",
"String getPlayerName();",
"public String cardDisplay(){\n if(this.faceDown) {\n return \"Bicycle\";}\n else{ return \"Friendly Names of: \" + this.rank + \":\"+this.suit;\n\n }\n }",
"String getName() ;",
"public String get_card(int index){\r\n return String.valueOf(hand.get(index).get_value()) + hand.get(index).get_suit() + \".jpg\";\r\n }",
"public java.lang.String getCardNo() {\r\n return localCardNo;\r\n }",
"public java.lang.String getCardNo() {\r\n return localCardNo;\r\n }",
"protected String getName(){\n sharedPref = getSharedPreferences(AppCSTR.PREF_NAME, Context.MODE_PRIVATE);\n //Log.d(\"TYPE\", sharedPref.getString(\"accountType\", null));\n return sharedPref.getString(AppCSTR.ACCOUNT_NAME, null);\n }",
"java.lang.String getBankName();",
"char[] getName();",
"private Card murdererName(UI ui, Player currentPlayer) {\n CardPanel cardPanel = new CardPanel(ui.getBoard(), ui.getCmd(), \"characters\");\n ui.getLayers().add(cardPanel, Integer.valueOf(6));\n cardPanel.showPanel();\n ui.getInfo().addText(\"Enter the name of the character you want to question from the list below\"); // prompt\n\n // display all the characters to the player that they can select\n for (int i = 0; i < CHARACTER_NAMES.length; i++) {\n ui.getInfo().addText(CHARACTER_NAMES[i].toString().substring(0,1) + CHARACTER_NAMES[i].toString().substring(1).toLowerCase());\n }\n\n CharacterNames murderer = null;\n String murderersName;\n // check the input from the user whether it is a character name, help command, notes command or the wrong input\n do {\n murderersName = ui.getCmd().getCommand().toLowerCase();\n switch (murderersName) {\n case \"mustard\":\n case \"joey\":\n System.out.println(\"MERP\");\n murderer = CharacterNames.JOEY;\n System.out.println(\"DERP\");\n break;\n case \"scarlet\":\n case \"phoebe\":\n murderer = CharacterNames.PHOEBE;\n break;\n case \"white\":\n case \"monica\":\n murderer = CharacterNames.MONICA;\n break;\n case \"green\":\n case \"chandler\":\n murderer = CharacterNames.CHANDLER;\n break;\n case \"plum\":\n case \"ross\":\n murderer = CharacterNames.ROSS;\n break;\n case \"peacock\":\n case \"rachel\":\n murderer = CharacterNames.RACHEL;\n break;\n case \"notes\":\n currentPlayer.getPlayerNotes().showNotes(currentPlayer);\n break;\n case \"help\":\n ui.getInfo().addText(\"Enter the player from the list above to question!\");\n break;\n default:\n ui.getInfo().addText(\"That was an invalid entry, enter ther player from the list above to question!\");\n break;\n }\n } while (murderer == null); // while the player input was not a character\n\n cardPanel.removePanel();\n ui.getLayers().remove(cardPanel);\n return new Card(murderer.toString()); // return a card with the murderer selected by the user\n }",
"String getName( );",
"java.lang.String getGameName();",
"java.lang.String getGameName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();"
] | [
"0.795263",
"0.7793953",
"0.7772358",
"0.7436137",
"0.7070384",
"0.7045951",
"0.69826245",
"0.6928439",
"0.6712774",
"0.6667026",
"0.6563868",
"0.65540445",
"0.65352887",
"0.6481422",
"0.6460211",
"0.64381903",
"0.6353717",
"0.6338054",
"0.6319884",
"0.6289567",
"0.6273747",
"0.6272437",
"0.6257343",
"0.6253146",
"0.6253146",
"0.62514573",
"0.6243809",
"0.6242067",
"0.62334347",
"0.62319124",
"0.62270385",
"0.62270385",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754",
"0.62186754"
] | 0.0 | -1 |
gets and returns the Card functional description | public String getDescription() {
return description;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getDisplay_description();",
"java.lang.String getDesc();",
"String getDesc();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"public String cardDisplay(){\n if(this.faceDown) {\n return \"Bicycle\";}\n else{ return \"Friendly Names of: \" + this.rank + \":\"+this.suit;\n\n }\n }",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String getFpDescription();",
"@Override\n\tpublic String cardDetail() {\n\t\treturn atmCard.cardDetail();\n\t}",
"public String getDescription(){\r\n \tString retVal = this.description;\r\n return retVal;\r\n }",
"public String displayCard()\n {\n card = \"\";\n \n switch(cardValue)\n {\n case 11:\n card+= \"J\";\n break;\n case 12:\n card+= \"Q\";\n break;\n case 13:\n card+= \"K\";\n break;\n case 14:\n card+= \"A\";\n break; \n default:\n card+= String.valueOf(cardValue); \n break;\n }\n \n switch(cardSuit){\n case 0:\n card+= \" of Clubs\";\n break;\n case 1:\n card+= \" of Diamonds\";\n break;\n case 2:\n card+= \" of Spades\";\n break;\n case 3:\n card+= \" of Hearts\";\n break;\n default:\n break;\n }\n \n return card;\n }",
"public String getDescription() {\n return sdesc;\n }",
"String getDescription() {\n if (description == null) {\n return null;\n }\n if (basicControl) {\n return String.format(\"%s %s\", context.getString(description), context.getString(R.string.basicControl));\n }\n return context.getString(description);\n }",
"public String getDescription() {\n return (desc);\n }",
"public String getCardName(){\n return type.getType() + \" of \" + suit.getSuit();\n }",
"String getDescription1();",
"public String getDescription()\r\n {\r\n\treturn desc;\r\n }",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public abstract String getDescription ( );",
"public String getDescription ();",
"public String getcDescription() {\n return cDescription;\n }",
"private static void printDescriptionCard(String cardName){\n String descWeaponFound = descriptionWeaponFoundOnView(cardName);\n String descPowerUpFound = descriptionPowerUpFoundOnView(cardName);\n String descToPrint;\n if(descWeaponFound == null && descPowerUpFound == null){\n System.out.println(\"The card you are searching for is not visible to you now, or does not exist.\");\n }\n else{\n if(descWeaponFound != null){\n descToPrint = descWeaponFound;\n }\n else{\n descToPrint = descPowerUpFound;\n }\n System.out.println(\"\\\"\" + descToPrint + \"\\\"\");\n }\n }"
] | [
"0.7403749",
"0.7123801",
"0.7107613",
"0.70891595",
"0.70891595",
"0.70891595",
"0.70891595",
"0.70891595",
"0.70891595",
"0.70891595",
"0.70891595",
"0.70891595",
"0.70891595",
"0.70891595",
"0.70891595",
"0.70891595",
"0.70891595",
"0.70891595",
"0.70891595",
"0.70891595",
"0.70891595",
"0.70891595",
"0.70891595",
"0.70891595",
"0.70891595",
"0.70891595",
"0.70891595",
"0.70891595",
"0.70891595",
"0.70891595",
"0.70891595",
"0.70891595",
"0.70891595",
"0.70891595",
"0.70891595",
"0.70891595",
"0.70891595",
"0.70891595",
"0.70891595",
"0.70891595",
"0.70891595",
"0.70794",
"0.7030761",
"0.7030761",
"0.7030761",
"0.7030761",
"0.7030761",
"0.7030761",
"0.7030761",
"0.7030761",
"0.7030761",
"0.697913",
"0.697913",
"0.697913",
"0.697913",
"0.697913",
"0.697913",
"0.697913",
"0.697913",
"0.697913",
"0.697913",
"0.697913",
"0.697913",
"0.6943413",
"0.6918551",
"0.69120765",
"0.6828678",
"0.6809588",
"0.6807189",
"0.6803834",
"0.6773378",
"0.67553306",
"0.6736742",
"0.6660979",
"0.6660979",
"0.6660979",
"0.6660979",
"0.6660979",
"0.6660979",
"0.6660979",
"0.6660979",
"0.6660979",
"0.6660979",
"0.6660979",
"0.6660979",
"0.6660979",
"0.6660979",
"0.6660979",
"0.6660979",
"0.6660979",
"0.6660979",
"0.6660979",
"0.6660979",
"0.6660979",
"0.6660979",
"0.6660979",
"0.6660979",
"0.6647809",
"0.6647308",
"0.6634474",
"0.66322595"
] | 0.0 | -1 |
gets and returns the Card representational description | public String getFlavorText() {
return flavorText;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getDisplay_description();",
"java.lang.String getDesc();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDesc();",
"public String getDescription(){\r\n \tString retVal = this.description;\r\n return retVal;\r\n }",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"public String getDescription() {\n return (desc);\n }",
"public String getDescription() {\n return sdesc;\n }",
"@Override\n\tpublic String getdescription() {\n\t\treturn this.description.getDesc();\n\t}",
"public String getDescription(){\n\n //returns the value of the description field\n return this.description;\n }",
"public String getDescription()\r\n\t{\treturn this.description;\t}",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription()\r\n {\r\n\treturn desc;\r\n }",
"public String getDescription()\r\n {\r\n return this.aDescription ;\r\n }",
"public java.lang.String getDescription(){\r\n return this.description;\r\n }",
"String getDescription() {\n if (description == null) {\n return null;\n }\n if (basicControl) {\n return String.format(\"%s %s\", context.getString(description), context.getString(R.string.basicControl));\n }\n return context.getString(description);\n }",
"public String getDesc()\r\n {\r\n return description;\r\n }",
"public abstract String getDescription ( );",
"public String getDescription(){\n return getString(KEY_DESCRIPTION);\n }",
"public String getDescription ();",
"@Override\n\tpublic String cardDetail() {\n\t\treturn atmCard.cardDetail();\n\t}"
] | [
"0.7727304",
"0.7649847",
"0.76210856",
"0.76210856",
"0.76210856",
"0.76210856",
"0.76210856",
"0.76210856",
"0.76210856",
"0.76210856",
"0.76210856",
"0.75102925",
"0.75102925",
"0.75102925",
"0.75102925",
"0.75102925",
"0.75102925",
"0.75102925",
"0.75102925",
"0.75102925",
"0.75102925",
"0.75102925",
"0.75102925",
"0.75102925",
"0.75102925",
"0.75102925",
"0.75102925",
"0.75102925",
"0.75102925",
"0.75102925",
"0.75102925",
"0.75102925",
"0.75102925",
"0.75102925",
"0.75102925",
"0.75102925",
"0.75102925",
"0.75102925",
"0.75102925",
"0.75102925",
"0.75102925",
"0.75102925",
"0.75102925",
"0.75102925",
"0.75102925",
"0.75102925",
"0.75102925",
"0.75102925",
"0.75102925",
"0.74696887",
"0.74214077",
"0.7273505",
"0.7273505",
"0.7273505",
"0.7273505",
"0.7273505",
"0.7273505",
"0.7273505",
"0.7273505",
"0.7273505",
"0.7273505",
"0.7273505",
"0.7273505",
"0.7224271",
"0.722164",
"0.7199913",
"0.71939546",
"0.71484435",
"0.712792",
"0.712792",
"0.712792",
"0.712792",
"0.712792",
"0.712792",
"0.712792",
"0.712792",
"0.712792",
"0.712792",
"0.712792",
"0.712792",
"0.712792",
"0.712792",
"0.712792",
"0.712792",
"0.712792",
"0.712792",
"0.712792",
"0.712792",
"0.712792",
"0.712792",
"0.712792",
"0.712792",
"0.7118092",
"0.7117974",
"0.7107647",
"0.7089207",
"0.7065668",
"0.70532554",
"0.70523185",
"0.70490974",
"0.70427567"
] | 0.0 | -1 |
gets and returns the Card's scorability | public Boolean isScorable() {
return scorable;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getHighCard() {\r\n return highCard;\r\n }",
"public Suit getSuit() {\n return cardSuit;\n }",
"public Integer getIscard() {\n return iscard;\n }",
"public int getVictoryCards() {\n \t\treturn victory;\n \t}",
"public String getCardSuit() {\n return Csuit;\n }",
"@Override\n\tpublic float desireability() {\n\t\tAgentSpace agentSpace = Blackboard.inst().getSpace(AgentSpace.class, _obj.getName());\n\t\tMap<String,FoodEntry> map = agentSpace.getScentMemories().getFirst();\n\t\tif (map == null || map.size() == 0) { \n\t\t\t// we don't smell anything\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tAgentSpace space = Blackboard.inst().getSpace(AgentSpace.class, _obj.getName());\n\t\tBoundedEntry bounded = space.getBounded(Variable.energy);\n\t\tfloat pct = bounded.getValue() / bounded.getMax();\n\t\treturn 1 - (pct*pct);\n\t}",
"public String getSuit()\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************** Start getSuit Method *****************/\n\n\t// Return suit of card\n return suit;\n\n }",
"public int getSuit() {\n\t\tif (!this.isCard()) {\n\t\t\tSystem.out.println(\"Error! \" + id + \" isn't a card!\");\n\t\t\treturn 0;\n\t\t} else if (id < 14)\n\t\t\treturn 1;\n\t\telse if (id >= 14 && id < 27)\n\t\t\treturn 2;\n\t\telse if (id >= 27 && id < 40)\n\t\t\treturn 3;\n\t\telse\n\t\t\treturn 4;\n\t}",
"public float getSecurity() {\n return security;\n }",
"public int getCardValue()\n {\n return cardValue; \n }",
"public String GetComputerCard(int value){\n return handComputer.get(value);\n }",
"public int getInstabilityScore();",
"public int highCardVal()\n\t{\n\t\tint value = 0;\n\t\t\n\t\tfor (int i=0; i<MAX_CARDS; i++)\n\t\t\tvalue += hand[i].getValue();\n\t\t\n\t\treturn value;\n\t}",
"public short getHandThrowDamage();",
"public Integer getCardtype() {\n return cardtype;\n }",
"public Card getCard() {\n return this.card;\n }",
"public Card getCard() {\n return this.card;\n }",
"public double getStability() {\r\n return stability;\r\n }",
"public int getSuit()\n {\n return suit;\n }",
"public Integer getRedCards() {\n return this.redCards;\n }",
"public int getSuit()\n {\n return suit;\n }",
"public Integer getSecurity() {\n return security;\n }",
"public int getSuit() {\n return this.suit;\n }",
"public Integer getRoomcard() {\n return roomcard;\n }",
"public Card getWinningCard() {\n return winningCard;\n }",
"public int getSuit() {\r\n return suit;\r\n }",
"public int getSuit(){\n\t\treturn suit; \n\t}",
"public int getStability() {\n return this.stability;\n }",
"public int getCardSlot() {\n return cardSlot;\n }",
"public int getSuit(){\n return suit;\n }",
"private static int suitAsInt(Card card) {\n return card.getSuit().ordinal();\n }",
"public short getSuit(){\n\t\treturn srtSuit;\r\n\t}",
"public static double getCardCounter() {\n\t\treturn cardCounter;\n\t}",
"public int getResourceCardHandSize() {\n\t\t return resourceCardHand.getResourceCardHandSize();\n\t }",
"public Card inspectCard(int k)\r\n {\r\n if (0 <= k && k < numCards && myCards[k] != null && \r\n myCards[k].getErrorFlag() == true)\r\n {\r\n return myCards[k];\r\n }\r\n return new Card('E', Card.Suit.valueOf(\"SPADES\"));\r\n }",
"int getCap();",
"public int getSuit() {\n return suit;\n }",
"public int getSuit() {\n return suit;\n }",
"private Type stealResource() {\n \t\tint count = getResourceCount();\n \t\tif (count <= 0)\n \t\t\treturn null;\n \n \t\t// pick random card\n \t\tint select = (int) (Math.random() * count);\n \t\tfor (int i = 0; i < resources.length; i++) {\n \t\t\tif (select < resources[i]) {\n \t\t\t\tuseResources(Type.values()[i], 1);\n \t\t\t\treturn Type.values()[i];\n \t\t\t}\n \n \t\t\tselect -= resources[i];\n \t\t}\n \n \t\treturn null;\n \t}",
"int getStrength();",
"int getStrength();",
"public int getCardsToDraw() {\r\n return cardsToDraw;\r\n }",
"Symbol getActiveCard();",
"public String getCapStatus() {\n return capStatus;\n }",
"public Integer getYellowCards() {\n return this.yellowCards;\n }",
"public int CardsOnDeck()\n\t{\n\t\treturn cardNumber;\n\t}",
"public int getSimCardState() {\n return ((TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE))\n .getSimState();\n }",
"public double getReliability() {\r\n return reliability;\r\n }",
"public int getScore() {\r\n\t\treturn deck.getScore() + extraVictory;\r\n\t}",
"public int getSuit() {\n\t\treturn suit;\n\t}",
"public int chooseQuality(ServicesDuel sd, ServicesCharacter schar, Character A, Character B){\n\n\t\tString option = \"\";\n\t\tint resultado = 0;\n\n\t\tdo{\n\t\t\tSystem.out.println(\"Elige la habilidad con la que deseas atacar:\");\n\t\t\toption = this.sc.nextLine();\n\t\t\toption = option.toLowerCase();\n\t\t\t\n\t\t\tswitch (option){\n\t\t\tcase \"fuerza\": resultado = sd.compareQuality(schar.getQualityValue(A, \"Fuerza\"), schar.getQualityValue(B, \"Fuerza\")); break;\n\t\t\tcase \"velocidad\": resultado = sd.compareQuality(schar.getQualityValue(A, \"Velocidad\"), schar.getQualityValue(B, \"Velocidad\")); break;\n\t\t\tcase \"inteligencia\": resultado = sd.compareQuality(schar.getQualityValue(A, \"Inteligencia\"), schar.getQualityValue(B, \"Inteligencia\")); break;\n\t\t\tcase \"help\": System.out.println(\"FUERZA - VELOCIDAD - INTELIGENCIA\"); option = \"error\"; break;\n\t\t\tdefault: System.out.println(\"Opcion no reconocida, ingresa help para ver las opciones disponibles.\"); option = \"error\"; break;\n\t\t\t}\n\t\t}while (option == \"error\");\n\n\t\treturn resultado;\n\t}",
"int getDefense();",
"int getDefense();",
"int getDefense();",
"int getDefense();",
"int getDefense();",
"int getDefense();",
"int getDamage();",
"int getDamage();",
"int getDamage();",
"int getDamage();",
"int getDamage();",
"int getSs();",
"public String getCardRequired() {\n return cardRequired1;\n }",
"public int getFishingSkill();",
"public Card inspectCard(int k) {\n if (k >= this.numCards || k < 0)\n return new Card('0', Card.Suit.spades);\n else\n return new Card(this.myCards[k]);\n }",
"public int getHandValue() {\n\t\tint value = 0;\n\t\tint aces = 0;\n\t\tfor (Card card : cardHand) {\n\t\t\t// convert suits to 10\n\t\t\tif (card.getValue() > 10) {\n\t\t\t\tvalue += 10;\n\t\t\t} else if (card.getValue() == 1) {\n\t\t\t\taces++;\n\t\t\t} else {\n\t\t\t\tvalue += card.getValue();\n\t\t\t}\n\t\t}\n\t\tvalue += calculateAce(value, aces);\n\n\t\treturn value;\n\t}",
"double getReliability();",
"int getHat();",
"public Integer getScdx() {\n return scdx;\n }",
"public double getHeardPercentCS() {\n return heardPercentCS;\n }",
"int getAllowedCredit();",
"public Card() {\n this.set('A', Suit.spades);\n }",
"public Card.Face getHighestCard(){\n return uniqueFaces.getFirst();\n }",
"public String GetHumanCard(int value){\n return handHuman.get(value);\n }",
"public List<Integer> askPlayerCardsToUse();",
"public String toString(){\n String card = null; \n //clubs\n if(suit==1){\n \tcard = \"c\" + Integer.toString(value);\n }\n //diamonds\n if(suit==2){\n \tcard = \"d\" + Integer.toString(value);\n }\n //hearts\n if(suit==3){\n \tcard = \"h\" + Integer.toString(value);\n }\n //spades\n if(suit==4){\n \tcard = \"s\" + Integer.toString(value);\n }\n return card; \n\t}",
"private int highCard() {\n\t\tint highCard = 0;\n\t\tfor (int counter = 0; counter < Constants.HAND_SIZE; counter++) {\n\t\t\tif (hand[counter].getValueIndex() > highCard) {\n\t\t\t\thighCard = hand[counter].getValueIndex();\n\t\t\t}\n\t\t}\n\t\tresult.setPrimaryValuePos(highCard);\n\t\treturn highCard;\n\t}",
"public String getSuit()\r\n {\r\n return suit;\r\n }",
"public java.lang.Integer getStorageCard() throws java.rmi.RemoteException;",
"public int getClipCardUses() {\n\t\tint d = 0;\n\n\t\tfor (Order o : orders) {\n\t\t\tfor (Payment p : o.getPayments()) {\n\t\t\t\tif (p.getPaymentType() == PaymentType.CLIP_CARD) {\n\t\t\t\t\td += p.getAmount();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn d;\n\t}",
"Card inspectCard(int k)\n {\n\n Card errorReturn = new Card('E', Card.Suit.spades); // in rare cases\n\n if (k < 0 || k >= numCards)\n return errorReturn;\n else\n return myCards[k];\n }",
"public String getSuit()\r\n { return suit; }",
"AbilityDamage getAbilityDamage();",
"@Override\n public int guessCardValue(Player p) {\n return Card.PRINCESS;\n }",
"public int getDamage() {\n //TODO\n return 1;\n }",
"public int getHealthGain();",
"public static int resultBlackjack()\n\t{\n\t\t//return 0 for no black jack, return 1 for player blackjack, return for dealer blackjack, return 3 for double blackjack\n\t\tboolean player =isBlackjack(playersCards),dealer=isBlackjack(dealersCards);\n\t\tif(!player && !dealer)\n\t\t\treturn 0;\n\t\telse if(player && !dealer)\n\t\t\treturn 1;\n\t\telse if(!player && dealer)\n\t\t\treturn 2;\n\t\telse\n\t\t\treturn 3;\n\t}",
"public int getSuit ()\n {\n return this.suits; \n }",
"public String getSuit()\r\n\t{\r\n\t\treturn suit;\r\n\t}",
"public char getSuit(){\n return Suits;\n }",
"public java.lang.String getDisabilities () {\n\t\treturn disabilities;\n\t}",
"public PhysicalCard getSourceCard() {\n return _source;\n }",
"int getHealth();",
"public short getSiegeWeaponDamage();",
"float getSteamSupplyRating2();",
"public char getRarity(){\n return rarity;\n }",
"int getSuperEffectiveChargeAttacksUsed();",
"public int getHealth();",
"public String getSuit() {\r\n return suit;\r\n }",
"public int getScore() {\n\t\tint darkDisks = 0;\r\n\t\tint lightDisks = 0;\r\n\r\n\t\tfor(Character c : board){\r\n\t\t\tif(c == '1'){\r\n\t\t\t\tdarkDisks++;\r\n\t\t\t}\r\n\t\t\telse if(c == '2'){\r\n\t\t\t\tlightDisks++;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t//If dark wins\r\n\t\tif(darkDisks > lightDisks){\r\n\t\t\treturn 1;\r\n\t\t}\r\n\r\n\t\t//If light wins\r\n\t\telse if(darkDisks < lightDisks){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\r\n\t\t//For a tie\r\n\t\telse if(darkDisks == lightDisks){\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t//Return 0 on a tie\r\n\t\treturn 0;\r\n\t}"
] | [
"0.63046664",
"0.6281905",
"0.6183887",
"0.61724365",
"0.60985667",
"0.60177976",
"0.6010687",
"0.59963155",
"0.5993926",
"0.59144706",
"0.58726686",
"0.5817007",
"0.58133084",
"0.5811674",
"0.5802213",
"0.5794709",
"0.5770184",
"0.5752631",
"0.5734461",
"0.57294244",
"0.57280695",
"0.5726974",
"0.5717815",
"0.57116956",
"0.5708385",
"0.57063276",
"0.5695682",
"0.569198",
"0.5690223",
"0.5680233",
"0.5676871",
"0.5676446",
"0.5665558",
"0.5645909",
"0.5645665",
"0.564521",
"0.5641636",
"0.5641636",
"0.56248224",
"0.56143427",
"0.56143427",
"0.559621",
"0.5595132",
"0.5588937",
"0.5572473",
"0.55723417",
"0.55635464",
"0.55625933",
"0.5552867",
"0.5534485",
"0.5533329",
"0.5525632",
"0.5525632",
"0.5525632",
"0.5525632",
"0.5525632",
"0.5525632",
"0.55242467",
"0.55242467",
"0.55242467",
"0.55242467",
"0.55242467",
"0.5523702",
"0.551834",
"0.5517887",
"0.55149126",
"0.5506062",
"0.5488918",
"0.54663223",
"0.5457847",
"0.54575545",
"0.5451251",
"0.5446351",
"0.54423183",
"0.54389334",
"0.5438647",
"0.5438296",
"0.5435962",
"0.54358155",
"0.54335654",
"0.5430507",
"0.54303586",
"0.54164237",
"0.54149586",
"0.5409603",
"0.54073215",
"0.5405686",
"0.5403643",
"0.53902185",
"0.5386651",
"0.538589",
"0.5384435",
"0.5384377",
"0.5383037",
"0.5378186",
"0.5377609",
"0.5371246",
"0.53697294",
"0.5362361",
"0.53617233",
"0.5359502"
] | 0.0 | -1 |
gets and returns the Card cost | public int getCost() {
return cost;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getCost();",
"int getCost();",
"int getCost();",
"public int getCost(){\r\n\t\treturn this.cost;\r\n\t}",
"public int getCost() {\n \t\treturn cost;\n \t}",
"double getCost();",
"double getCost();",
"public double getCost() {\t\t \n\t\treturn cost;\n\t}",
"public int getCost()\n {\n return cost;\n }",
"public int getCost() {\n return cost;\n }",
"public Number getCost()\r\n {\r\n return (m_cost);\r\n }",
"public int get_cost() {\n return (int)getUIntElement(offsetBits_cost(), 16);\n }",
"public double getCost() {\r\n\t \treturn(cost);\r\n\t}",
"public int getCost() {\n\t\treturn cost;\n\t}",
"@Pure\n\tdouble getCost();",
"public double getCost() {\r\n return cost;\r\n }",
"public Integer getCost() {\r\n\t\treturn cost;\r\n\t}",
"public double getCost()\r\n\t{\treturn this.cost;\t}",
"public double getCost() {\r\n\t\treturn cost;\r\n\t}",
"public int getCost(){\n return this.cost;\n }",
"public Integer getCost() {\n return cost;\n }",
"public String getCost() {\n return cost;\n }",
"@Override\r\n public int getCost() {\r\n return cost;\r\n }",
"public double getcost() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\treturn room.getcost() + cost;\r\n\t}",
"public BigDecimal getCost() {\r\n return cost;\r\n }",
"public double getCost() {\n return cost;\n }",
"public double getCost() {\n return cost;\n }",
"public double getCost() {\n\t\treturn this.cost;\n\t}",
"public double getCost() {\n\t\treturn this.cost;\n\t}",
"public double getCost() {\n\t\treturn cost;\n\t}",
"public double getCost() {\n\n\t\treturn cost;\n\t}",
"public BigDecimal getCost() {\n return this.cost;\n }",
"public float getCost() {\r\n\t\treturn this.cost.floatValue();\r\n\t}",
"public String getCost() {\n\t\tString t = doc.get(\"cost\");\n\n\t\tif (t == null) {\n\t\t\treturn \"\";\n\t\t} else {\n\t\t\treturn t;\n\t\t}\n\t}",
"public double getCost() {\n\t\t\n\t\tdouble cost = 0;\n\t\t\n\t\tif (Objects.equals(Size, \"small\"))\n\t\t\tcost = 7.00;\n\t\telse if (Objects.equals(Size, \"medium\"))\n\t\t\tcost = 9.00;\n\t\telse if (Objects.equals(Size, \"large\"))\n\t\t\tcost = 11.00;\n\t\t\n\t\tcost += (Cheese - 1)*1.50;\n\t\tcost += Ham*1.50;\n\t\tcost += Pepperoni*1.50;\n\t\t\n\t\treturn cost;\t\t\n\t}",
"public double cost() {\n\t\t\n\t\treturn 150.00;\n\t}",
"public int cost() {\n\t\treturn value;\n\t}",
"public int getCost() {\n/* 69 */ return this.cost;\n/* */ }",
"@Override\r\n\tpublic double cost() {\n\t\treturn this.cost;\r\n\t}",
"@Override\n public int getCost() {\n\n\n //return cost converted to int\n return (int) cost;\n }",
"public double getCost(){\n return cost;\n }",
"@Override\n\tpublic double cost() {\n\t\treturn Double.parseDouble(rateOfLatte);\n\t}",
"@Override\n public double getCost() {\n return cost;\n }",
"@Override\n public int getCost() {\n return iceCreamPrice + topPrice;\n }",
"public double cost()\n\t{\n\t\treturn _dblCost;\n\t}",
"public double getTotalCost() {\r\n\t\treturn cost;\r\n\t}",
"public int getCost()\r\n\t{\n\t\treturn 70000;\r\n\t}",
"public abstract int getCost();",
"public abstract int getCost();",
"public abstract int getCost();",
"double getTotalCost();",
"public CostInfo getCostInfo();",
"@Override\n\tpublic double cost() {\n\t\tdouble price = good.cost();\n\t\treturn price+price/2;\n\t}",
"public double getCost()\n\t{\n\t\treturn 0.9;\n\t}",
"public double getCost() {\n return price;\n }",
"@NotNull\n public BigDecimal getCost() {\n return cost;\n }",
"public String retrieveCost() {\n // Check if there's a valid cost.\n String cost = _costET.getText().toString();\n if (cost == null || cost.equals(\"\")) {\n Toast.makeText(AddActivity.this, \"Please enter a cost amount.\", Toast.LENGTH_LONG).show();\n return \"\";\n }\n // Check if cost matches the format.\n Pattern costP = Pattern.compile(\"^((([1-9]\\\\d*)?\\\\d)(\\\\.\\\\d\\\\d)?)|$\");\n Matcher costM = costP.matcher(cost);\n if (!costM.find()) {\n Toast.makeText(AddActivity.this, \"Please input the cost with 2 decimal places.\", Toast.LENGTH_LONG).show();\n return \"\";\n }\n return cost;\n }",
"public Number getActualCost()\r\n {\r\n return (m_actualCost);\r\n }",
"public Money getCost(){\r\n return this.cost;\r\n }",
"public String getCost() {\n // Formats the cost amount into money format.\n NumberFormat n = NumberFormat.getCurrencyInstance(Locale.US);\n String s = n.format(Double.parseDouble(_cost));\n return s;\n }",
"public double getTotalCost() {\r\n return totalCost;\r\n }",
"public int getCost() {\n\t\treturn (int) Math.round(weight*price_per_pound);\n\t\t\n\t}",
"@Override\n public int getCost() {\n int price = (int) Math.round(this.weight * this.pricePerLbs); //get the price of the cookies in the form of an int\n return price; //return the price\n\n }",
"public double getCost() {\r\n\t\t\r\n\t\tif (super.getSize() == \"Small\") { totalCost = 2.00; }\r\n\t\t\r\n\t\tif (super.getSize() == \"Medium\") { totalCost = 2.50; }\r\n\t\t\r\n\t\tif (super.getSize() == \"Large\") { totalCost = 3.00; }\r\n\t\t\r\n\t\treturn totalCost;\r\n\t}",
"@Override\r\n\tpublic double getCost() {\n\t\treturn this.cost_of_icecream;\r\n\t}",
"public abstract double getCost();",
"public double getCost() {\n\t\treturn 1.25;\n\t}",
"public int calculateCost() {\n int premium = surety.calculatePremium(insuredValue);\n SuretyType suretyType = surety.getSuretyType();\n int commission = (int) Math.round(premium * vehicle.getCommission(suretyType));\n return premium + commission;\n }",
"@Override\n public double cost()\n {\n return this.price * this.number;\n }",
"public String getTotalCost() {\n return this.TotalCost;\n }",
"@Override\n\tpublic double getCost() {\n\t\treturn price * weight; // cost = price of the candy * weight of candies\n\t}",
"public double getCost() \n { \n return super.getCost() +22;\n }",
"public int getCreditCost() {\n\t\treturn 0;\n\t}",
"public float getTotalCost() {\n return this.totalCost;\n }",
"public double getTotalCost() {\n cost = spr.calculateCost();\n return cost;\n }",
"@Override public double getCosto(){\n double d = 190.00;\n return d;\n }",
"@Override\n public double getCost() {\n\t return 13;\n }",
"@Override\n public double getCost() {\n /**\n * @return the cost of Ice Cream\n */\n // TODO Auto-generated method stub\n return this.cost;\n }",
"int getResourceCost();",
"public double cost() {\n return roomType.cost() + COST;\n }",
"public double calcCost() {\n // $2 per topping.\n double cost = 2 * (this.cheese + this.pepperoni + this.ham);\n // size cost\n switch (this.size) {\n case \"small\":\n cost += 10;\n break;\n case \"medium\":\n cost += 12;\n break;\n case \"large\":\n cost += 14;\n break;\n default:\n }\n return cost;\n }",
"public double get_basic_cost() {\n\t\treturn basiccost;\n\t}",
"private int getCost(final String name) {\n\t\treturn getValue(name, COST);\n\t}",
"public int getInitCost(){\n\t\treturn price;\n\t}",
"public CP getProductServiceUnitCost() { \r\n\t\tCP retVal = this.getTypedField(13, 0);\r\n\t\treturn retVal;\r\n }",
"public double getCosts();",
"public double GetCost() {\n if( LotSize != CurLotSize ) {\n double CostPerShot = Cost / (double) LotSize;\n return CommonTools.RoundFractionalTons( CostPerShot * (double) CurLotSize );\n }\n return Cost;\n }",
"String getTotalCost() {\n return Double.toString(totalCost);\n }",
"public double getTotalCost(){\r\n\t\t//return the totalCost to the App\r\n\t\treturn totalCost;\r\n\t}",
"public double getCost() {\n return quantity*ppu;\n\n }",
"public int[] getCost(){\n\t\treturn this.cost;\n\t}",
"public double getCost() {\n double price = 0;\n price += this.numPizzas * this.pizzaType.getCost();\n if(this.numPizzas >= 20) // Discount if >=20 pizzas\n return price * 0.9;\n else if(this.numPizzas >= 10) // Discount if between 10 and 20 pizzas\n return price * 0.95;\n return price; // No discount\n }",
"@Override\n\tpublic double cost() {\n\t\treturn 2.19;\n\t}",
"public double calculateCost(Purchase purchase);",
"public double getTotal() {\n return totalCost;\n }",
"@Pure\n\tdouble getEstimatedCost();",
"public java.math.BigDecimal getTotalCost () {\n\t\treturn totalCost;\n\t}",
"public double cost()\n\t{\n\t\treturn (price * weight);\n\t}",
"double calculateDeliveryCost(Cart cart);"
] | [
"0.7626033",
"0.7626033",
"0.7626033",
"0.75656796",
"0.75317806",
"0.75298727",
"0.75298727",
"0.74570835",
"0.7433428",
"0.7432642",
"0.7400502",
"0.7342009",
"0.7339469",
"0.7326244",
"0.7302713",
"0.72969764",
"0.7289721",
"0.7289055",
"0.7272821",
"0.72489387",
"0.72453046",
"0.72411746",
"0.7235705",
"0.72355384",
"0.7232439",
"0.7226311",
"0.7226311",
"0.72255033",
"0.72255033",
"0.721695",
"0.7179885",
"0.71736556",
"0.717161",
"0.7166535",
"0.7164313",
"0.71515894",
"0.71173865",
"0.7104903",
"0.710211",
"0.7097818",
"0.7054072",
"0.70134634",
"0.7005758",
"0.6959404",
"0.6955984",
"0.6952391",
"0.69495815",
"0.693172",
"0.693172",
"0.693172",
"0.6927348",
"0.6921757",
"0.6918435",
"0.6917985",
"0.69103694",
"0.69038075",
"0.6902539",
"0.6896412",
"0.6889458",
"0.6884659",
"0.6879408",
"0.6870334",
"0.6868571",
"0.6853464",
"0.68456805",
"0.68411887",
"0.68375266",
"0.6804527",
"0.68029165",
"0.679025",
"0.6780796",
"0.6776966",
"0.67678255",
"0.67537034",
"0.67497146",
"0.67462444",
"0.673367",
"0.67163515",
"0.6711265",
"0.66938347",
"0.66805166",
"0.66746",
"0.6667226",
"0.66635925",
"0.66631377",
"0.66626704",
"0.6661424",
"0.6642376",
"0.66423297",
"0.6637568",
"0.66357195",
"0.6620123",
"0.66179913",
"0.6598825",
"0.6578097",
"0.6568207",
"0.6562338",
"0.655717",
"0.654603"
] | 0.7430124 | 11 |
Card's default play method. Removes card from hand. | public void play(PlasterClash p) {
p.currentPlayer().getHand().remove(this);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void playCard() {\n\t\t\r\n\t}",
"public void playCard(PlayingCard card){\n\t\tplayed = hand.remove(hand.indexOf(card));\t\t\n\t}",
"@Override\n\tpublic void playCard() {\n\t\t\n\t}",
"public Card playCard() {\n Card card = this.myCards[this.numCards - 1];\n this.myCards[this.numCards - 1] = null;\n this.numCards--;\n return card;\n }",
"@Override\r\n\tpublic void playMonumentCard() {\n\t\t\r\n\t}",
"public Card playCard()\r\n {\r\n Card removedCard = new Card('E', Card.Suit.valueOf(\"SPADES\"));\r\n if (numCards <= 0)\r\n {\r\n return removedCard;\r\n }\r\n Card playedCard = new Card(myCards[numCards - 1].getValue(),\r\n myCards[numCards - 1].getSuit());\r\n myCards[numCards - 1] = removedCard;\r\n numCards--;\r\n return playedCard;\r\n }",
"public Card playCard(int index)\n\t{\n\t\treturn currentHand.remove(index);\n\t}",
"void playMonumentCard();",
"@Override\n\tpublic void cardInPlay() {\n\t\tIPlayer playedOn = this.game.getOtherPlayer();\n\t\tif(!playedOn.getFaction().equals(Faction.Cultist)){\n\t\t\tplayedOn.setFaction(Faction.UNAFFILIATED);\n\t\t}\n\t\tthis.setDiscard();\n\t}",
"public abstract CardAction play(Player p);",
"public void cancelCard() {}",
"public void play() {\r\n this.cardDeck = new JavaDeck();\r\n cardDeck.shuffle();\r\n dealerHand = new JavaHand(2);\r\n dealerHand.DiscardHand();\r\n addDealerCard();\r\n }",
"public Card playCard()\n {\n\n Card errorReturn = new Card('E', Card.Suit.spades); // in rare cases\n\n if (numCards == 0)\n return errorReturn;\n else\n return myCards[--numCards];\n }",
"public void play(GameController game){\n game.trashCard(this);\n \n }",
"public Card flip() {\n\t\treturn hand.remove(0);\n\t}",
"public void clearHand(){\n\t\tthis.hand = new ArrayList<Card>();\n\t}",
"@Override\r\n\tpublic void playSoldierCard() {\n\t\t\r\n\t}",
"public void emptyHand();",
"public void clearHand() {\n\t\t_hand.clearHand();\n\n\t}",
"@Override\r\n\tpublic Bet whatToPlay() {\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic void play() {\n\t\t\n\t}",
"@Override\n\tpublic void play() {\n\n\t}",
"void undoPlay();",
"public PlayingCard(){\n\t\tsuper();\n\t}",
"public void resetHand()\r\n\t{\r\n\t\thandCount = 0;\r\n\t\tstand = false;\r\n\t}",
"public void discard(Card card) {\n if (!myTurn()) {\n return;\n }\n // CardAction cardAct = new CardAction(card, \"Discard: \" + card.getName());\n // history.add(cardAct);\n\n if (handPile.contains(card)) {\n tmpDiscardPile.add(card);\n handPile.remove(card);\n } else {\n tmpDiscardPile.add(card);\n }\n }",
"public void discard(Card card) {\n discardPile.add(card);\n }",
"public void clearHand() {\n\t\thand.clear();\n\t}",
"public void playAgain() {\r\n\t\t\r\n\t\tscreen.reset();\r\n\t\t\r\n\t}",
"public void playCard(int player, int card) {\n }",
"public void togglePlay() { }",
"public void removePresentCard() {\n storageCards.remove();\n }",
"public Card giveMeACardForPlayer() {\n Card cardToGive = new Card(storageCards.peek().getCardMode(), storageCards.peek().getColor(), storageCards.peek().getScore());\n storageCards.remove();\n return cardToGive;\n }",
"@Override\r\npublic void Play() {\n\t\r\n}",
"public void resetDeck() {\n cards.addAll(removedCards);\n removedCards.clear();\n }",
"public Card PlayCard() {\n\t Card ret = null;\n\t Card card;\n\t if (mCardCount > 0) {\n\t\t // To work out what card to play, see what cards can be played\n\t\t \tCard[] playableCards;\n\t\t \tplayableCards = mRules.GetPlayableCards();\n\t\t \tCard[] selectedCards;\n\t\t \tselectedCards = new Card[8];\n\t\t \tint iNumSelectableCards = 0;\n\t\t \tfor (int i = 0; i < 8; i++)\n\t\t \t\tselectedCards[i] = null;\n\t \tfor (int i = 0; i < mCardCount; i++){\n\t \t\tcard = mCard[i];\n\t \t\tswitch (card.GetSuit()){\n\t \t\tcase Card.HEARTS:\n\t \t\t\t\n\t \t\t\t// Card is a heart, can it be played?\n\t \t\t\t// Is it a seven, it can be played...\n\t \t\t\tif (card.GetValue() == 7){\n\t \t\t\t\tselectedCards[Rules.HEARTS8] = card;\n\t \t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t// and must be played first\n\t \t\t\t\tplayableCards[Rules.HEARTS8] = new Card(8,Card.HEARTS);\n\t \t\t\t\tplayableCards[Rules.HEARTS6] = new Card(6,Card.HEARTS);\n\t \t\t\t\tplayableCards[Rules.CLUBS8] = new Card(7,Card.CLUBS);\n\t \t\t\t\tplayableCards[Rules.DIAMONDS8] = new Card(7,Card.DIAMONDS);\n\t \t\t\t\tplayableCards[Rules.SPADES8] = new Card(7,Card.SPADES);\n\t \n\t \t\t\t\treturn card;\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() < 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.HEARTS6])){\n\t \t\t\t\t\tselectedCards[Rules.HEARTS6] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t\t//Log.i(\"\",\" Playing card \" + (card.GetValue()) + \" , \" +card.GetSuit());\n\t \t\t\t\t\t//Log.i(\"\",\" Updating playable card \" + (card.GetValue()-1) + \" , \" +Card.HEARTS);\t \t\t\t\t\t\n\t \t\t\t\t\t//playableCards[Rules.HEARTS6] = new Card(card.GetValue()-1,Card.HEARTS);\n\t \t\t\t\t\t//return card;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() > 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.HEARTS8])){\n\t \t\t\t\t\tselectedCards[Rules.HEARTS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t\t//Log.i(\"\",\" Playing card \" + (card.GetValue()) + \" , \" +card.GetSuit());\n\t \t\t\t\t\t//Log.i(\"\",\" Updating playable card \" + (card.GetValue()+1) + \" , \" +Card.HEARTS);\t \t\t\t\t\t\n\t \t\t\t\t\t//playableCards[Rules.HEARTS8] = new Card(card.GetValue()+1,Card.HEARTS);\n\t \t\t\t\t\t//return card;\n\t \t\t\t\t}\n\t \t\t\t}\t \t\t\t\n\t \t\t\t\n\t \t\t\tbreak;\n\t \t\tcase Card.DIAMONDS:\n\t \t\t\t// Is it a seven, it can be played...\n\t \t\t\tif (card.GetValue() == 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.DIAMONDS8])){\n\t \t\t\t\t\tselectedCards[Rules.DIAMONDS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\t\n\t \t\t\tif (card.GetValue() < 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.DIAMONDS6])){\n\t \t\t\t\t\tselectedCards[Rules.DIAMONDS6] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() > 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.DIAMONDS8])){\n\t \t\t\t\t\tselectedCards[Rules.DIAMONDS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\t\t \t\t\t\n\t \t\t\t\n\t \t\t\tbreak;\n\t \t\t\t\n\t \t\tcase Card.CLUBS:\n\t \t\t\t// Is it a seven, it can be played...\n\t \t\t\tif (card.GetValue() == 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS8])){\n\t \t\t\t\t\tselectedCards[Rules.CLUBS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\t \t\t\t\t\n\t \t\t\t}\n\t \t\t\t\n\t \t\t\tif (card.GetValue() < 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS6])){\n\t \t\t\t\t\tselectedCards[Rules.CLUBS6] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() > 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS8])){\n\t \t\t\t\t\tselectedCards[Rules.CLUBS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\t\t \t\t\t\n\t \t\t\tbreak;\n\t \t\t\t\n\t \t\tcase Card.SPADES:\n\t \t\t\t// Is it a seven, it can be played...\n\t \t\t\tif (card.GetValue() == 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.SPADES8])){\n\t \t\t\t\t\tselectedCards[Rules.SPADES8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\t \t\t\t\t\n\t \t\t\t}\n\t \t\t\t\n\t \t\t\tif (card.GetValue() < 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.SPADES6])){\n\t \t\t\t\t\tselectedCards[Rules.SPADES6] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() > 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.SPADES8])){\n\t \t\t\t\t\tselectedCards[Rules.SPADES8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\t \t\t\t\n\t \t\t\tbreak;\n\n\t \t\t\t\t \t\t\t\n\t \t\t}\n\t\n\t \t}\t\n\t \t\n\t \t// Now go through the selectable cards and see which is best to be played\n\t \tif (iNumSelectableCards == 0)\n\t \t\treturn ret;\n\t \t\n\t \tint iPos;\n\t \tcard = null;\n\t \tif (iNumSelectableCards == 1){\n\t\t\t \tfor (int i = 0; i < 8; i++)\n\t\t\t \t\tif (selectedCards[i] != null){\n\t\t\t \t\t\tcard = selectedCards[i];\n\t\t\t \t\t\tbreak;\n\t\t\t \t\t}\n\t\t\t \t\t\t \t\n\t \t}\n\t \telse {\n\t\t\t String sDifficulty = mRules.mView.GetSettings().getString(\"Difficulty\", \"0\");// 0 = hard, 1 = easy\n\t\t\t int iDifficulty = Integer.parseInt(sDifficulty);\n\t\t\t if (iDifficulty == EASY){\n\t\t\t \t// Get a random card from the playable ones\n\t\t\t\t\t Random generator = new Random();\n\t\t\t\t\t int randomIndex = generator.nextInt( iNumSelectableCards );\n\t\t\t\t\t int iCount = 0;\n\t\t\t\t\t \tfor (int i = 0; i < 8; i++){\n\t\t\t\t\t \t\tif (selectedCards[i] != null){\n\t\t\t\t\t \t\t\tif (iCount == randomIndex){\n\t\t\t\t\t \t\t\t\tcard = selectedCards[i];\n\t\t\t\t\t \t\t\t\tbreak;\n\t\t\t\t\t \t\t\t}\n\t\t\t\t\t \t\t\telse iCount++;\n\t\t\t\t\t \t\t}\t\n\t\t\t\t\t \t}\n\t\t\t }\n\t\t\t else {\n\t\t\t \tiPos = GetBestCard(selectedCards);\n\t\t\t \tcard = selectedCards[iPos];\n\t\t\t }\n\t \t}\n\t \t\n\t \tswitch (card.GetSuit()){\n \t\tcase Card.HEARTS:\t \t\n \t\t\tif (card.GetValue() == 7){\n \t\t\t\t// and must be played first\n \t\t\t\tplayableCards[Rules.HEARTS8] = new Card(8,Card.HEARTS);\n \t\t\t\tplayableCards[Rules.HEARTS6] = new Card(6,Card.HEARTS);\n \t\t\t\tplayableCards[Rules.CLUBS8] = new Card(7,Card.CLUBS);\n \t\t\t\tplayableCards[Rules.DIAMONDS8] = new Card(7,Card.DIAMONDS);\n \t\t\t\tplayableCards[Rules.SPADES8] = new Card(7,Card.SPADES);\n \n \t\t\t\treturn card;\n \t\t\t}\n \t\t\tif (card.GetValue() < 7){\n \t\t\t\tif (card.Equals(playableCards[Rules.HEARTS6])){\n \t\t\t\t\tplayableCards[Rules.HEARTS6] = new Card(card.GetValue()-1,Card.HEARTS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (card.GetValue() > 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.HEARTS8])){ \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.HEARTS8] = new Card(card.GetValue()+1,Card.HEARTS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\t \t\t\t\n \t\t\t\n \t\t\tbreak; \n \t\tcase Card.DIAMONDS:\n \t\t\t// Is it a seven, it can be played...\n \t\t\tif (card.GetValue() == 7){\n \t\t\t\tif (playableCards[Rules.HEARTS8] != null && playableCards[Rules.HEARTS8].GetValue() > 7){\n\t \t\t\t\tplayableCards[Rules.DIAMONDS8] = new Card(8,Card.DIAMONDS);\n\t \t\t\t\tplayableCards[Rules.DIAMONDS6] = new Card(6,Card.DIAMONDS);\t \t\t\t\t\t\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\tif (card.GetValue() < 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.DIAMONDS6])){\t \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.DIAMONDS6] = new Card(card.GetValue()-1,Card.DIAMONDS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (card.GetValue() > 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.DIAMONDS8])){\t \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.DIAMONDS8] = new Card(card.GetValue()+1,Card.DIAMONDS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\t\t \t\t\t\n \t\t\t\n \t\t\tbreak; \n \t\t\t\n \t\tcase Card.CLUBS:\n \t\t\t// Is it a seven, it can be played...\n \t\t\tif (card.GetValue() == 7){\n\n \t\t\t\tif (playableCards[Rules.HEARTS8] != null && playableCards[Rules.HEARTS8].GetValue() > 7){\n\t \t\t\t\tplayableCards[Rules.CLUBS8] = new Card(8,Card.CLUBS);\n\t \t\t\t\tplayableCards[Rules.CLUBS6] = new Card(6,Card.CLUBS);\t \t\t\t\t\t\n \t\t\t\t\treturn card;\n \t\t\t\t}\t \t\t\t\t\n \t\t\t}\n \t\t\t\n \t\t\tif (card.GetValue() < 7){\n \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS6])){\n \t\t\t\t\tplayableCards[Rules.CLUBS6] = new Card(card.GetValue()-1,Card.CLUBS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (card.GetValue() > 7){\n \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS8])){\n \t\t\t\t\tLog.i(\"\",\" Updating playable card \" + (card.GetValue()+1) + \" , \" +Card.CLUBS);\n \t\t\t\t\tplayableCards[Rules.CLUBS8] = new Card(card.GetValue()+1,Card.CLUBS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\t\t \t\t\t\n \t\t\tbreak; \n \t\tcase Card.SPADES:\n \t\t\t// Is it a seven, it can be played...\n \t\t\tif (card.GetValue() == 7){\n \t\t\t\tif (playableCards[Rules.HEARTS8] != null && playableCards[Rules.HEARTS8].GetValue() > 7){\n\t \t\t\t\tplayableCards[Rules.SPADES8] = new Card(8,Card.SPADES);\n\t \t\t\t\tplayableCards[Rules.SPADES6] = new Card(6,Card.SPADES);\t \t\t\t\t\t\n \t\t\t\t\treturn card;\n \t\t\t\t}\t \t\t\t\t\n \t\t\t}\n \t\t\t\n \t\t\tif (card.GetValue() < 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.SPADES6])){ \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.SPADES6] = new Card(card.GetValue()-1,Card.SPADES);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (card.GetValue() > 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.SPADES8])){\t \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.SPADES8] = new Card(card.GetValue()+1,Card.SPADES);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\t \t\t\t\n \t\t\tbreak;\n \t\t\t\n\t \t}\n\t \n\t }\n\t return ret;\n }",
"public void resetHand() {\n this.myCards = new Card[MAX_CARDS];\n this.numCards = 0;\n }",
"@Override\n public void playStop() {\n }",
"public void action(ActionCard card) {\n if (!myTurn()) {\n return;\n }\n if (handPile.contains(card)) {\n specialAction = card.performAction(this);\n while (specialAction.getDraw() > 0) {\n this.draw(1);\n specialAction.reduceDraw();\n }\n // CardAction cardAct = new CardAction(card, \"Play: \" + card.getName());\n // history.add(cardAct);\n }\n }",
"@Override\n public void visit(PlayCardMove move) {\n ICard cardToPlay = move.getCard();\n\n if (!isValidPlay(cardToPlay)) {\n return;\n }\n\n ArrayList<ICard> hand = hands.get(currentTurn);\n\n hand.remove(cardToPlay);\n discardPile.push(cardToPlay);\n\n // detect game over\n if (hand.size() == 0) {\n isGameOver = true;\n winner = currentTurn;\n }\n\n if (!isGameOver) {\n cardToPlay.onPlay(this);\n }\n }",
"public void play() {\n\t\t\r\n\t}",
"private void ResetGame(){\n this.deck = new Deck();\n humanPlayer.getHand().clear();\n humanPlayer.setWager(0);\n dealer.getHand().clear();\n }",
"@Override\n\tpublic void play() {\n\t\tGuitar.super.play();\n\t\tPiano.super.play();\n\t}",
"@Override\r\n public void play()\r\n {\n\r\n }",
"@Override\n public Card playCard() {\n List<Card> rank1 = new ArrayList<>();\n List<Card> rank2 = new ArrayList<>();\n List<Card> rank3 = new ArrayList<>();\n List<Card> rank4 = new ArrayList<>();\n for (Card card : cardsInHand) {\n if (card.getRank().equals(Card.Rank.EIGHT)) {\n rank1.add(card);\n break;\n } else if (card.getSuit().equals(idealSuit)\n && card.getRank().equals(idealRank)\n && (topCard.getSuit().equals(card.getSuit())\n || topCard.getRank().equals(card.getRank()))) {\n rank2.add(card);\n } else if ((card.getSuit().equals(idealSuit) || card.getRank().equals(idealRank))\n && (topCard.getSuit().equals(card.getSuit())\n || topCard.getRank().equals(card.getRank()))) {\n rank3.add(card);\n } else if (topCard.getSuit().equals(card.getSuit())\n || topCard.getRank().equals(card.getRank())) {\n rank4.add(card);\n }\n }\n List<List<Card>> playPossibilities = new ArrayList<>(Arrays.asList(rank1, rank2, rank3, rank4));\n for (List<Card> list : playPossibilities) {\n if (list.size() > 0) {\n cardsInHand.remove(list.get(0));\n return list.get(0);\n }\n }\n // This method will never return null if shouldDrawCard() is called beforehand.\n return null;\n }",
"public void clearHand() {\n cards.clear();\n aceCount = 0;\n setSize(0);\n }",
"public void resetActiveHand() {\n\t\tif (activeHand != null) {\n\t\t\tactiveHand.setActive(false);\n\t\t\tactiveHand = null;\n\t\t}\n\n\t}",
"@Override\r\n\tpublic String doSound() {\n\t\treturn null;\r\n\t}",
"public void play(){\n\t\t\n\t}",
"protected abstract void internalPlay();",
"@Override\r\n\tpublic boolean canPlay() {\n\t\treturn false;\r\n\t}",
"public void resetPlayer() {\n\t\tthis.carrotCards = 65;\n\t\tthis.playerSpace = 0;\n\n\t}",
"@Override\n\tpublic ServerResponse movesDiscardCards(DiscardedCards cards) {\n\t\treturn null;\n\t}",
"public void playAgain();",
"public Card deal()\r\n\t{\r\n\t\tCard card = deck.remove(0);\r\n\t\treturn card;\r\n\t}",
"@Override\n public Card cardToPlay(TurnState state, CardSet hand) {\n //Causes the player to spend a certain amount of time for each card\n double currentTime = System.currentTimeMillis();\n Card card = underlyingPlayer.cardToPlay(state, hand);\n try {\n long totalTime;\n if ((totalTime = (minTime - ((long) System.currentTimeMillis() - (long) currentTime))) > 0) {\n Thread.sleep(totalTime);\n }\n } catch (InterruptedException e) {\n }\n return card;\n }",
"ICard turnOver();",
"public void playCard(ActionCard card, Integer selectedPlayer)\n {\n System.out.println(\"gui: playCard: \" + card + \", selected: \" + selectedPlayer);\n // Guard against this\n if (!isTurn || this.played)\n {\n return;\n }\n \n if(card instanceof PrivateTip || card instanceof Snoop) \n {\n if(selectedPlayer == null) \n {\n JOptionPane.showMessageDialog(null, \"Please select \"\n + \"a player in the \"\n + \"Player Listing (Upper right) that is not yourself!\", \n \"Warning\", \n JOptionPane.ERROR_MESSAGE); \n return;\n }\n }\n\n if (card instanceof Suggestion)\n {\n this.played = true;\n // prompt for solution\n suggestionScreen = new AccusationScreen(this, true, (Suggestion)card);\n suggestionScreen.setVisible(true);\n }\n else\n {\n this.played = clientController.playActionCard(card, selectedPlayer);\n if(!this.played)\n {\n mainGameScreen.notifyUser(\"Play failed: To Play this card,\"\n + \" please select a CluePlayer from the 'Players' list,\"\n + \" then click on this card.\");\n }\n }\n\n }",
"void togglePlay();",
"public abstract void play();",
"public abstract void play();",
"public void resetHand()\r\n {\r\n myCards = new Card[MAX_CARDS];\r\n numCards = 0;\r\n }",
"@Override\n public boolean canUseCard(){\n return false;\n }",
"@Override\r\n public void moveCard() {\n \r\n }",
"void dealTheCards();",
"public void Play();",
"public void hideCard()\n {\n ArrayList<Card> superCards = super.removeCards();\n if (hiddenCard != null) {\n super.addCard(Card.getEmptyCard());\n super.addCards(superCards.subList(1, superCards.size()));\n }\n hidden = true;\n }",
"public void cardWasUsed(Card card) {\r\n\t\tthis.hand.remove(card);\r\n\t\tthis.discard.add(card);\r\n\t}",
"public void remove(Card card) {\n if (!myTurn()) {\n return;\n }\n if (handPile.contains(card)) {\n //history.add(new CardAction(card, \"Remove: \" + card.getName()));\n handPile.remove(card);\n }\n }",
"public void reset(){\n super.reset();\n this.troef = CardColor.NONE;\n }",
"public void play() {\n\t\tpanel.remove(easy);\n\t\tpanel.remove(hard);\n\t\tdown.setVisible(true);\n\t\tmarket.setVisible(true);\n\t\tinfo.setVisible(true);\n\t}",
"@Override\n\tpublic void nowPlaying() {\n\t}",
"@Override\r\n\tpublic void playRoadBuildingCard() {\n\t\t\r\n\t}",
"public DiscardDeck() {\n\t\tthis.content = new ArrayList<Card>();\n\t}",
"public Card dealCard() {\n if (deck.size() == 52) {\n shuffle();\n }\n Card temp;\n temp = deck.get(0);\n remove(0);\n return temp;\n }",
"void playCurrentStationCard();",
"public boolean playCard(Card card){\n boolean b = effectHandler.playCard( card , null);\n return b;\n }",
"public Card drawFromDeck() {\n\t\treturn cards.remove(0);\n\t}",
"public void shuffleThePresentCardToTheEnd() {\n storageCards.add(storageCards.remove());\n }",
"default public void clickPlay() {\n\t\tremoteControlAction(RemoteControlKeyword.PLAY);\n\t}",
"public void flipCard() {\n this.faceUp = !faceUp;\n }",
"public void remove(Card card) {\r\n\t\tcards.remove(card);\r\n\t}",
"public void playTurn() {\r\n\r\n }",
"@Override\n public void clear() {\n beginMyTurn();\n }",
"ICard deal();",
"public PlayCardMessage(Card card, Action action) {\r\n\t\tsuper(Message.PLAY_CARD);\r\n\t\tthis.cardName = card.getTitle();\r\n\t\tthis.action = action;\r\n\t}",
"public Card drawCard() {\n return deck.pop();\n }",
"public Card giveCard()\n {\n return deck.pop();\n }",
"public Card drawCard() {\n Card c = cards.get(0);//get a card\n cards.remove(0);//remove the card form the deck that's given out\n discard.add(c);//so the card given out is added to the discard list\n return c;//return a card object\n\n }",
"public void clearHand() {\n\t\tthis.aHand = new Chips[aHand.length];\n\t}",
"public void resetDeck() {\r\n\t\tcards = new ArrayList<Card>();\r\n\t\tfor (Suit f : Suit.values())\r\n\t\t\tfor (int i = 2; i < 15; i++)\r\n\t\t\t\tcards.add(new Card(i, f));\r\n\r\n\t}",
"public void SpecialCardAction(UNOCard aCard) {\n\t\t\n\t\tif (aCard.getName() == \"Reverse\") { // Reverse card is played, so game direction is switched\n\t\t\tif (gameDirection == \"right\") {\n\t\t\t\tgameDirection = \"left\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\tgameDirection = \"right\";\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (aCard.getName() == \"Skip\") {\n\t\t\tif (gameDirection == \"right\") { // If Game is moving in one direction\n\t\t\t\tcurrentPlayerToPlayIndex = currentPlayerToPlayIndex + 2; // player next to play is skipped\n\t\t\t\tif (currentPlayerToPlayIndex >= players.size()) {\n\t\t\t\t\tcurrentPlayerToPlayIndex = currentPlayerToPlayIndex - players.size();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (gameDirection == \"left\") { // If Game is moving in other direction\n\t\t\t\tcurrentPlayerToPlayIndex = currentPlayerToPlayIndex - 2; // player next to play is skipped\n\t\t\t\tif (currentPlayerToPlayIndex <= 0) {\n\t\t\t\t\tcurrentPlayerToPlayIndex = currentPlayerToPlayIndex + players.size();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tcurrentPlayerToPlay = players.get(currentPlayerToPlayIndex); // Next Player to play a card\n\t\t\n\t\tif (aCard.getName() == \"Draw Two\") { // If a Draw Two Card is played, the enxt player to play is dealt two cards\n\t\t\tif (gameDirection == \"right\") {\n\t\t\t\tif (currentPlayerToPlayIndex < players.size()) {\n\t\t\t\t\tplayers.get(currentPlayerToPlayIndex + 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t\tplayers.get(currentPlayerToPlayIndex + 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tplayers.get(0).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t\tplayers.get(0).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (gameDirection == \"left\") {\n\t\t\t\tif (currentPlayerToPlayIndex != 0) {\n\t\t\t\t\tplayers.get(currentPlayerToPlayIndex - 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t\tplayers.get(currentPlayerToPlayIndex - 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tplayers.get(players.size() - 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t\tplayers.get(players.size() - 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (aCard.getName() == \"Wild\") { // Wild is played, function called to ask user for new color\n\t\t\tWildIsPlayedAskUserForColor();\n\t\t}\n\t\t\n\t\tif (aCard.getName() == \"Wild Draw Four\") {\n\t\t\tif (gameDirection == \"right\") { // if game direction is this way\n\t\t\t\tif (currentPlayerToPlayIndex < players.size()) {\n\t\t\t\t\tplayers.get(currentPlayerToPlayIndex + 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t\tplayers.get(currentPlayerToPlayIndex + 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t\tplayers.get(currentPlayerToPlayIndex + 1).getPlayersHand().add(GameUNODeck.DealACard()); // draw four cards\n\t\t\t\t\tplayers.get(currentPlayerToPlayIndex + 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tplayers.get(0).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t\tplayers.get(0).getPlayersHand().add(GameUNODeck.DealACard()); // draw four cards\n\t\t\t\t\tplayers.get(0).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t\tplayers.get(0).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (gameDirection == \"left\") { // if game direction is this way\n\t\t\t\tif (currentPlayerToPlayIndex != 0) {\n\t\t\t\t\tplayers.get(currentPlayerToPlayIndex - 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t\tplayers.get(currentPlayerToPlayIndex - 1).getPlayersHand().add(GameUNODeck.DealACard()); // draw four cards\n\t\t\t\t\tplayers.get(currentPlayerToPlayIndex - 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t\tplayers.get(currentPlayerToPlayIndex - 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tplayers.get(players.size() - 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t\tplayers.get(players.size() - 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t\tplayers.get(players.size() - 1).getPlayersHand().add(GameUNODeck.DealACard()); // draw four cards\n\t\t\t\t\tplayers.get(players.size() - 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t}\n\t\t\t}\n\t\t\tWildIsPlayedAskUserForColor();\n\t\t}\n\t\t\n\t}",
"public TrainCard draw(){\n TrainCard card = cardDeck.get(0);\n cardDeck.remove(0);\n return card;\n }",
"public void unsetChanceCardShuffle() {\n ChanceCardShuffle = false;\n }",
"void playMonopolyCard(String resource);",
"public void play() {\n\t\tplay(true, true);\n\t}",
"public ArrayList<PlayingCard> getHand();",
"public Card chooseFromHand(String sign , String colorName){\n Scanner scanner = new Scanner(System.in);\n Card chosenCard = null;\n int cardIndex;\n do{\n System.out.println(\"which cart ? (-1 to pick up card from cardDeck) ?\");\n cardIndex =scanner.nextInt();\n// scanner.nextLine();\n if(cardIndex == -1){\n ArrayList<Card> playableCards = playableNormalCards(sign , colorName);\n if(playableCards.size() == 0){\n return null;\n }\n else {\n System.out.println(\"you still can play : \");\n for(Card card : playableCards){\n System.out.print(card + \" \");\n }\n System.out.println();\n }\n }\n else if(cardIndex<=0 ||cardIndex > hand.size()){\n System.out.println(\"not valid input\");\n System.out.println(\"please try again : \");\n }\n else if(hand.get(cardIndex-1).getSign().equals(\"B\")){\n chosenCard = hand.get(cardIndex -1);\n }\n else if((!(hand.get(cardIndex-1).getSign().equals(sign))) &&\n (!(hand.get(cardIndex-1).getColorName().equals(colorName)))){\n System.out.println(\"not playable card\");\n System.out.println(\"please try again : \");\n }\n else{\n chosenCard = hand.get(cardIndex - 1);\n }\n\n }while(cardIndex <= 0 || cardIndex > hand.size() || chosenCard == null);\n\n\n hand.remove(chosenCard);\n return chosenCard;\n }",
"public void discardCard(int player, Card card) {\r\n\t\tplayers.get(player).removeCard(card);\r\n\t\tdiscardPile.addCard(card);\r\n\t}",
"void play();"
] | [
"0.7685783",
"0.7634678",
"0.7623676",
"0.71239865",
"0.71151304",
"0.6782385",
"0.6751528",
"0.66157573",
"0.65942824",
"0.6568754",
"0.654527",
"0.6538543",
"0.6522078",
"0.64884126",
"0.6452768",
"0.6441427",
"0.6388188",
"0.6371467",
"0.6335863",
"0.6332924",
"0.6292231",
"0.6284277",
"0.6255058",
"0.6243228",
"0.6242966",
"0.6230098",
"0.62210286",
"0.6213987",
"0.62122023",
"0.62106436",
"0.614421",
"0.6126688",
"0.6085697",
"0.6085616",
"0.60748786",
"0.60722774",
"0.6055816",
"0.60486937",
"0.6034909",
"0.6030333",
"0.60041285",
"0.5997564",
"0.5992371",
"0.5988984",
"0.59710383",
"0.596624",
"0.5963577",
"0.5948826",
"0.5944849",
"0.5941966",
"0.59396285",
"0.5938784",
"0.5938002",
"0.5929806",
"0.5919751",
"0.59165627",
"0.5911079",
"0.5903715",
"0.58990496",
"0.5883676",
"0.5883676",
"0.5876162",
"0.58745754",
"0.586968",
"0.5856991",
"0.5852773",
"0.5852609",
"0.5836587",
"0.5836012",
"0.5833345",
"0.58172077",
"0.5814191",
"0.58094776",
"0.58031183",
"0.58022976",
"0.5799597",
"0.5793433",
"0.57844996",
"0.5765828",
"0.5759021",
"0.5751057",
"0.5749753",
"0.5736121",
"0.57258385",
"0.5718964",
"0.57147354",
"0.5710464",
"0.57057196",
"0.5704105",
"0.56982505",
"0.5696476",
"0.56859934",
"0.5685289",
"0.5680729",
"0.56806636",
"0.5676117",
"0.567565",
"0.5673885",
"0.5667446",
"0.56637746"
] | 0.6322543 | 20 |
Plays card to the play zone. | public void playToPlayZone(PlasterClash p) {
p.getPlayZone().add(this);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void playCard() {\n\t\t\r\n\t}",
"@Override\n\tpublic void playCard() {\n\t\t\n\t}",
"@Override\r\n\tpublic void playMonumentCard() {\n\t\t\r\n\t}",
"void playMonumentCard();",
"void playCurrentStationCard();",
"public void playCard(int player, int card) {\n }",
"@Override\r\n\tpublic void playSoldierCard() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void playRoadBuildingCard() {\n\t\t\r\n\t}",
"private void play() {\n\t\tParcel pc = Parcel.obtain();\n\t\tParcel pc_reply = Parcel.obtain();\n\t\ttry {\n\t\t\tSystem.out.println(\"DEBUG>>>pc\" + pc.toString());\n\t\t\tSystem.out.println(\"DEBUG>>>pc_replay\" + pc_reply.toString());\n\t\t\tib.transact(1, pc, pc_reply, 0);\n\t\t} catch (RemoteException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"public abstract CardAction play(Player p);",
"void playMonopolyCard(String resource);",
"public void play() {\r\n this.cardDeck = new JavaDeck();\r\n cardDeck.shuffle();\r\n dealerHand = new JavaHand(2);\r\n dealerHand.DiscardHand();\r\n addDealerCard();\r\n }",
"public void play() {\n System.out.println(\"Player \" + this.name + \" started to play...\");\n System.out.println(\"Current balance: \" + getTotalAsset());\n\n // roll a dice to move\n int steps = rollDice();\n System.out.println(\"Player diced \" + steps);\n\n // move\n move(steps);\n Land land = Map.getLandbyIndex(position);\n\n // land triggered purchase or opportunity events\n land.trigger();\n\n System.out.println(\"Player \" + this.name + \"has finished.\");\n }",
"public void playCard(IPlayer owner){\n // Wont play card unless a player has it\n if(command == \"Move1\"){\n owner.Move(owner.getPlayerDir());\n }\n else if(command == \"Move2\"){\n for (Integer i=0; i < 2; i++) {\n owner.Move(owner.getPlayerDir());\n }\n }\n else if(command == \"Move3\"){\n for (Integer i=0; i < 3; i++) {\n owner.Move(owner.getPlayerDir());\n }\n }\n else if (command == \"MoveBack\"){\n owner.Move(dirCtrl.invertDirection(owner.getPlayerDir()));\n }\n else if(command == \"TurnRight\"){\n owner.Turn(TurnDirection.RIGHT);\n }\n else if(command == \"TurnLeft\"){\n owner.Turn(TurnDirection.LEFT);\n }\n else if(command == \"Turn180\"){\n owner.Turn(TurnDirection.BACKWARDS);\n }\n }",
"public void play(GameController game){\n game.trashCard(this);\n \n }",
"public void play() {\n\t\tplay(true, true);\n\t}",
"public void play() {\n try {\n mSessionBinder.play(mContext.getPackageName(), mCbStub);\n } catch (RemoteException e) {\n Log.wtf(TAG, \"Error calling play.\", e);\n }\n }",
"public void play() {\n\t\t\r\n\t}",
"private void playCard(int slotId) {\n boolean isSlotEmpty = Comm.get().gameLogic.getEngine().getSystem(MinionSystem.class).isSlotEmpty(slotId);\n if(!isSlotEmpty) return;\n\n //play it\n CardComponent cc = ccMapper.get(draggingEntity);\n PlayCard playCard = Comm.get().getCommand(PlayCard.class);\n playCard.targetSlot = slotId; // the slot we want to put this minion on\n playCard.targetPlayer = Comm.get().gameLogic.uniqueUserId; // todo: make this possible to target other player too\n playCard.targetType = 0; //todo: targeting minion, but make it possible to target hero as well.\n playCard.setCardComponent(cc);\n Comm.get().executeCommand(playCard);\n\n // do some fake hiding animation, which will come back if anything\n TransformComponent tc = draggingEntity.getComponent(TransformComponent.class);\n tc.initActorIfNotInited();\n tc.addAction(Actions.sequence(\n Actions.fadeOut(0.3f),\n Actions.delay(1.5f),\n Actions.fadeIn(0.1f)\n ));\n tc.tint.a = 0;\n }",
"public void playCard(ActionCard card, Integer selectedPlayer)\n {\n System.out.println(\"gui: playCard: \" + card + \", selected: \" + selectedPlayer);\n // Guard against this\n if (!isTurn || this.played)\n {\n return;\n }\n \n if(card instanceof PrivateTip || card instanceof Snoop) \n {\n if(selectedPlayer == null) \n {\n JOptionPane.showMessageDialog(null, \"Please select \"\n + \"a player in the \"\n + \"Player Listing (Upper right) that is not yourself!\", \n \"Warning\", \n JOptionPane.ERROR_MESSAGE); \n return;\n }\n }\n\n if (card instanceof Suggestion)\n {\n this.played = true;\n // prompt for solution\n suggestionScreen = new AccusationScreen(this, true, (Suggestion)card);\n suggestionScreen.setVisible(true);\n }\n else\n {\n this.played = clientController.playActionCard(card, selectedPlayer);\n if(!this.played)\n {\n mainGameScreen.notifyUser(\"Play failed: To Play this card,\"\n + \" please select a CluePlayer from the 'Players' list,\"\n + \" then click on this card.\");\n }\n }\n\n }",
"public void play() {\n field.draw();\n userTurn();\n if(! field.isFull()) {\n computerTurn();\n }\n }",
"public final void play() {\n\t\tinitialize();\n\t\tstartPlay();\n\t\tendPlay();\n\t}",
"@Override\n\tpublic void cardInPlay() {\n\t\tIPlayer playedOn = this.game.getOtherPlayer();\n\t\tif(!playedOn.getFaction().equals(Faction.Cultist)){\n\t\t\tplayedOn.setFaction(Faction.UNAFFILIATED);\n\t\t}\n\t\tthis.setDiscard();\n\t}",
"public void hitCard() {\n if (this.state == GameState.ROUNDACTIVE) {\n Seat s = this.getSeat(seatPlaying);\n if (s.hasPlayer()) {\n Hand h = s.getPlayer().getHands().get(0);\n h.addCard(this.deck.dealCard());\n if (h.getIsBusted()) {\n this.activeHandStand();\n }\n }\n repaintAll();\n }\n }",
"public PlayCardMessage(Card card, Action action) {\r\n\t\tsuper(Message.PLAY_CARD);\r\n\t\tthis.cardName = card.getTitle();\r\n\t\tthis.action = action;\r\n\t}",
"public PlayingCard(){\n\t\tsuper();\n\t}",
"public void play(){\n\t\t\n\t}",
"public Card playCard() {\n Card card = this.myCards[this.numCards - 1];\n this.myCards[this.numCards - 1] = null;\n this.numCards--;\n return card;\n }",
"public void putCard(Cards cards) {\n playedCards.add(cards);\n }",
"public void action(ActionCard card) {\n if (!myTurn()) {\n return;\n }\n if (handPile.contains(card)) {\n specialAction = card.performAction(this);\n while (specialAction.getDraw() > 0) {\n this.draw(1);\n specialAction.reduceDraw();\n }\n // CardAction cardAct = new CardAction(card, \"Play: \" + card.getName());\n // history.add(cardAct);\n }\n }",
"@Override\r\n\tpublic void playMonopolyCard(ResourceType resource) {\n\t\t\r\n\t}",
"public void play() {\n\t\t// setting up\n\t\tdeck = new Deck();\n\t\tdeck.shuffle();\n\t\tint turn = 0;\n\t\tRandom rand = new Random();\n\t\tCardRank previousCardRank = null;\n\t\tboolean snapTime = false;\n\t\t\n\t\t// the turning card loop, which ends when two cards with the same value/rank are revealed\n\t\t// or when no cards are left in the deck\n\t\twhile (!snapTime) {\n\t\t\tString currentPlayer = (turn % 2 == 0) ? player1 : player2;\n\t\t\t\n\t\t\tint timeout = 1000 + rand.nextInt(1000);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tTimeUnit.MILLISECONDS.sleep((long) timeout);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tCard nextCard = deck.turnCard();\n\t\t\t\n\t\t\t// possible draw if no cards are left in the deck\n\t\t\tif (nextCard == null) {\n\t\t\t\tSystem.out.println(\"No cards left in the deck! It's a draw!\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tSystem.out.println(currentPlayer + \" turns card \\'\" + nextCard + \"\\'\");\n\t\t\t\n\t\t\tturn++;\n\t\t\t\n\t\t\t// trigger the end of the turning card loop\n\t\t\tif (nextCard.getCardRank() == previousCardRank) {\n\t\t\t\tsnapTime = true;\n\t\t\t}\n\t\t\tpreviousCardRank = nextCard.getCardRank();\n\t\t}\n\t\t\n\t\t// simulate the time needed for both players to say \"SNAP!\"\n\t\tint snapTimeoutP1 = 500 + rand.nextInt(1000);\n\t\tint snapTimeoutP2 = 500 + rand.nextInt(1000);\n\t\t\n\t\t// rare draw situation, if the two players say \"SNAP!\" at the same time\n\t\tif (snapTimeoutP1 == snapTimeoutP2) {\n\t\t\ttry {\n\t\t\t\tTimeUnit.MILLISECONDS.sleep((long) snapTimeoutP1);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tSystem.out.println(\"SNAP! It's a draw!\");\n\t\t}\n\t\t// in most cases, a player will say \"SNAP!\" first, and they will be the winner\n\t\telse {\n\t\t\tString result = String.format(\"SNAP! %s is the winner!\", (snapTimeoutP1 < snapTimeoutP2) ? player1 : player2);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tTimeUnit.MILLISECONDS.sleep((long) Math.min(snapTimeoutP1, snapTimeoutP2));\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\t\t}\n\t}",
"public boolean playCard(Card card){\n boolean b = effectHandler.playCard( card , null);\n return b;\n }",
"@Override\n\tpublic void play() {\n\n\t}",
"@Override\n\tpublic void play() {\n\t\t\n\t}",
"protected void playS()\n\t\t{\n\t\t\tplayer.start();\n\t\t}",
"default public void clickPlay() {\n\t\tremoteControlAction(RemoteControlKeyword.PLAY);\n\t}",
"public void ActonCard() {\n\t}",
"public void play() { player.resume();}",
"public void Play();",
"public Card playCard()\r\n {\r\n Card removedCard = new Card('E', Card.Suit.valueOf(\"SPADES\"));\r\n if (numCards <= 0)\r\n {\r\n return removedCard;\r\n }\r\n Card playedCard = new Card(myCards[numCards - 1].getValue(),\r\n myCards[numCards - 1].getSuit());\r\n myCards[numCards - 1] = removedCard;\r\n numCards--;\r\n return playedCard;\r\n }",
"public void addCard(PlayingCard aCard);",
"public void playCard(PlayingCard card){\n\t\tplayed = hand.remove(hand.indexOf(card));\t\t\n\t}",
"@Override\n public Card cardToPlay(TurnState state, CardSet hand) {\n //Causes the player to spend a certain amount of time for each card\n double currentTime = System.currentTimeMillis();\n Card card = underlyingPlayer.cardToPlay(state, hand);\n try {\n long totalTime;\n if ((totalTime = (minTime - ((long) System.currentTimeMillis() - (long) currentTime))) > 0) {\n Thread.sleep(totalTime);\n }\n } catch (InterruptedException e) {\n }\n return card;\n }",
"public void cardToAll() {\n\t\tfor(ClientThread player: players) {\n\t\t\tcardToOne(player);\n\t\t\ttry {Thread.sleep(200);}catch(Exception exc) {exc.printStackTrace();}\n\t\t}\n\t}",
"public void playTurn() {\r\n\r\n }",
"@Override\r\n\tpublic void play() {\n\t\tSystem.out.println(\"Play Movie\");\r\n\t\t\r\n\t}",
"void play();",
"private void makePlay() {\n\t\teating = true;\n\t\ttama.setLayoutX(200);\n\n\t\tplay = new Sprite(6, 6, 360, 379, new Image(\"file:./res/images/basketball.png\"), 1, 1000);\n\t\tplay.setLayoutX(140);\n\t\tplay.setLayoutY(190);\n\t\tplay.setScaleX(0.5);\n\t\tplay.setScaleY(0.5);\n\t\tgrid.getChildren().addAll(play);\n\t\tPauseTransition pause = new PauseTransition(Duration.millis(1000));\n\t\tpause.setOnFinished(e -> {\n\t\t\tgrid.getChildren().remove(play);\n\t\t\ttama.setLayoutX(190);\n\t\t\teating = false;\n\t\t\tmodel.getController().playWith();\n\t\t});\n\t\tpause.play();\n\n\t}",
"public static void playScream()\n {\n scream.play();\n }",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tplayer.start();\r\n\t\t\t}",
"public PlayingCard(int points, String display) {\r\n\t\tthis.points = points;\r\n\t\tthis.display = display;\r\n\t}",
"public void playCard(int index) {\r\n\t\tCard c = deck.hand.get(index);\r\n\t\tif(c.isAction() && actions > 0 && access.gamePhase < 2) {\r\n\t\t\taccess.gamePhase = 1;\r\n\t\t\tif(!deck.play.contains(new Champion())) actions--;\r\n\t\t\tdeck.playCard(index);\r\n\t\t\tc.performAction();\r\n\t\t\tnotifyObservers();\r\n\t\t}\r\n\t\telse if(c.isTreasure() && access.gamePhase < 3) {\r\n\t\t\taccess.gamePhase = 1;\r\n\t\t\taddTreasure(c.getTreasure());\r\n\t\t\tdeck.playCard(index);\r\n\t\t\tc.performAction();\r\n\t\t\tnotifyObservers();\r\n\t\t}\r\n\t}",
"public void PlayerToPlayNext(UNOCard aCard) {\n\t\tif (gameDirection == \"right\") { // If Game is moving in one direction\n\t\t\tcurrentPlayerToPlayIndex++;\n\t\t\tif (currentPlayerToPlayIndex >= players.size()) {\n\t\t\t\tcurrentPlayerToPlayIndex = currentPlayerToPlayIndex - players.size();\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (gameDirection == \"left\") { // If Game is moving in other direction\n\t\t\tcurrentPlayerToPlayIndex--;\n\t\t\tif (currentPlayerToPlayIndex <= 0) {\n\t\t\t\tcurrentPlayerToPlayIndex = currentPlayerToPlayIndex + players.size();\n\t\t\t}\n\t\t}\n\t\t\n\t\tcurrentPlayerToPlay = players.get(currentPlayerToPlayIndex); // Next Player to play a card\n\t}",
"public synchronized void sendCardFromDeck () {\n\t\t// Draw card from deck\n\t\tCard drawnCard = deck.drawCard();\n\t\t// Inform the player that a card will be sent\n\t\tsendMessage (\"Signal:SendCardFromDeck\", currentPlayer);\n\t\tsendCard (drawnCard, currentPlayer);\n\t}",
"public boolean playCard(Card card, Enemy enemy){\n if( isGameOver() )return false;\n if( card.isHasTarget() && !enemyController.hasEnemy(enemy) )return false;\n\n System.out.println(\"IN PLAYCARD METHOD\");\n boolean b = effectHandler.playCard( card , enemy);\n System.out.println( \"HAND CARDS : \");\n for( int i = 0 ; i < piles.getHandPile().getCards().size() ; i++ ){\n System.out.println( piles.getHandPile().getCards().get(i).getName() );\n }\n\n return b;\n }",
"public void otherPlay(int pos, GameCard card){\n System.out.println(pos);\n int cardColor = playerCardsList.get(turnCounter % playerCardsList.size()).get(pos).color.get().ordinal();\n int cardNumber = playerCardsList.get(turnCounter % playerCardsList.size()).get(pos).number.get();\n int number = playedCardPile.get(cardColor).number.get();\n if (cardNumber - 1 ==number){\n playedCardPile.set(cardColor, playerCardsList.get(turnCounter % playerCardsList.size()).get(pos));}\n playerCardsList.get(turnCounter % playerCardsList.size()).set(pos, card);\n notifyObservors();\n\n }",
"public void drawCard(Card card) {\n hand.addCard(card);\n }",
"@Override\n\tpublic void play() {\n\t\tSystem.out.println(\"We played Snokker today\");\n\t\t\n\t\t\n\t}",
"public void DisplayWithOneCard() {\n\t\tplayers = new ArrayList<Player>();\n\t\tplayer1 = new Player(\"Nick\");\n\t\tplayer2 = new Player(\"Ausitn\");\n\t\tplayers.add(player1);\n\t\tplayers.add(player2);\n\t\tgame = new GameState();\n\t\tgame.initializeServer(players);\n\t\tRulesEngine.setColour(game, String.valueOf(Type.BLUE));\n\t\t\n\t\tgame.setTurn(0);\n\t\t\n\t\t\n\t\t//create cards to be added to player's hand and target's display\n\t\tCard redCard = new Card(Type.RED, 4);\n\t\t\n\t\t//Give one of the players a riposte card to play\n\t\tCard riposte = new Card(Type.ACTION, Card.RIPOSTE);\n\t\tgame.getAllPlayers().get(0).getHand().add(riposte);\n\t\t\n\t\t//Give target player a custom display\n\t\tgame.getDisplay(1).add(redCard);\n\t}",
"public void playGame() {\n show();\n while (gameStatus) {\n if (canPut(players.get((state.getTurn())))) {\n int choice = -1;\n while (gameStatus) {\n choice = controls.get(state.getTurn()).putCard(currentCard);\n if (validInput(players.get((state.getTurn())), choice)) {\n System.out.println(players.get(state.getTurn()).getCards().get(choice).toString());\n try{Thread.sleep(1000);}catch(InterruptedException ignored){}\n break;\n }\n }\n decide(players.get(state.getTurn()), players.get(state.getTurn()).getCards().get(choice));\n }\n try{Thread.sleep(500);}catch(InterruptedException ignored){}\n checkFinish();\n if (gameStatus) {\n state.nextTurn();\n show();\n }\n }\n }",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tplay();\n\t\t\t}",
"public void playRound(CuarentaGame game){\n Player human = game.getHumanPlayer();\n Player computer = game.getComputerPlayer();\n Player activePlayer;\n \n for(int i=0; i<10; i++){\n // For now, human player starts always. This isn't quite intended, but not important right now\n if(i%2==0)\n activePlayer = human;\n else\n activePlayer = computer;\n // choose a card to play\n \n // choose next actions\n \n // add points accordingly\n\n // check win condition\n\n }\n\n human.addPoints(calculatePointsFromDiscardPile(game.getHumanPlayer()));\n computer.addPoints(calculatePointsFromDiscardPile(game.getComputerPlayer()));\n }",
"void makePlay(int player) {\n }",
"public void runTheGame() {\n\t\txPlayer.setOpponent(oPlayer);\n\t\toPlayer.setOpponent(xPlayer);\n\t\tboard.display();\n\t\txPlayer.play();\n\t}",
"void play() {\n\n ArrayList<Card> cardsInMiddle = new ArrayList<>();\n\n Card[] lastCardsPlayed = new Card[numOfPlayers];\n\n //simulation of each player flipping their next card\n for (int i = 0; i < players.length; i++) {\n lastCardsPlayed[i] = players[i].getNextCard();\n cardsInMiddle.add(lastCardsPlayed[i]);\n\n }\n\n //if there's a tie\n while (tieForCards(lastCardsPlayed)) {\n //check to see if players have enough cards to continue\n //if not, then clear that players hand and game will end\n WarPlayer lessThan3Cards = tryGetPlayerWithLessThanThreeCards();\n if (lessThan3Cards != null) {\n lessThan3Cards.getHand().clear();\n return;\n }\n\n //simulation of flipping 2 extra cards\n for (int i = 0; i < players.length; i++) {\n cardsInMiddle.add(players[i].getNextCard());\n cardsInMiddle.add(players[i].getNextCard());\n\n Card lastCard = players[i].getNextCard();\n cardsInMiddle.add(lastCard);\n lastCardsPlayed[i] = lastCard;\n }\n }\n setLastCardsPlayed(lastCardsPlayed);\n\n //determining who gets all the cards played for the round\n int highestCardIndex = largestCard(lastCardsPlayed);\n players[highestCardIndex].addCards(cardsInMiddle);\n players[highestCardIndex].addPoints(cardsInMiddle.size() / numOfPlayers);\n }",
"void pauseCurrentStationCard();",
"public void playTurn(){\r\n\t\t// all exceptions in this method are caught, because if this method throws an exception\r\n\t\t// the AIPlayer will not draw/discard a card and the program will freeze\r\n\t\ttry{\r\n\t\t\tupdateLastCardDiscarded();\r\n\t\t}catch(Exception e){\r\n\t\t\tSystem.out.println(\"AIPlayer, lastCard: \" + e.toString());\r\n\t\t}\r\n\t\ttry{\r\n\t\t\tif(!(drawOrPickUp()^bestChoice(BEST_CHOICE_AT_FIFTY))){ // choose whether to draw from the deck or pick up from the stack\r\n\t\t\t\tif(!game.getRound().drawFromDiscard()) // If picking up from the discard is not possible,\r\n\t\t\t\t\tgame.getRound().drawFromDeck(); // draw from the deck instead\r\n\t\t\t}else{\r\n\t\t\t\tgame.getRound().drawFromDeck();\r\n\t\t\t}\r\n\t\t}catch(Exception e){\r\n\t\t\tSystem.out.println(\"AIPlayer, draw: \" + e.toString());\r\n\t\t\tgame.getRound().drawFromDeck(); // if something goes wrong, draw\r\n\t\t}\r\n\r\n\t\ttry{\r\n\t\t\tgroup = new Groups(this, getHand());\r\n\t\t\tif(!hasLaidDownPhase() && group.getCompletePhaseGroups() != null && // if the AI player, hasn't laid down PhaseGroups\r\n\t\t\t\t\tgroup.getCompletePhaseGroups().length == Configuration.getNumberRequired(getPhase()) && // will lay down the right number of phasesGroups\r\n\t\t\t\t\tgetGame().getRound().getTurnNumber() >= 8 - (difficulty/10)) // is past a certain turn number based off difficulty\r\n\t\t\t\taddPhaseGroups(group.getCompletePhaseGroups()); \r\n\t\t}catch(Exception e){\r\n\t\t\tSystem.out.println(\"AIPlayer, laydown: \" + e.toString()); // laid down all my cards Hand92,AI90afterAI74\r\n\t\t}\r\n\r\n\t\ttry{\r\n\t\t\tif(hasLaidDownPhase())\r\n\t\t\t\tplayOffPhases();\r\n\t\t}catch(Exception e){\r\n\t\t\tSystem.out.println(\"AIPlayer, playoff: \" + e.toString());\r\n\t\t}\r\n\r\n\t\ttry{\r\n\t\t\tlastCardDiscarded = discardCard();\r\n\t\t\tgame.getRound().discard(lastCardDiscarded); // discard\r\n\t\t}catch(Phase10Exception e){\t\r\n\t\t}catch(Exception e){\r\n\t\t\tlastCardDiscarded = getHand().getCard(0);\r\n\t\t\tgame.getRound().discard(lastCardDiscarded);\r\n\t\t\tSystem.out.println(\"AIPlayer, discard: \" + e.toString());\r\n\t\t}\r\n\t}",
"@Override\n public void putCardMode() {\n gameboardPanel.putCardMode();\n leaderCardsPanel.disableProductionButtons();\n }",
"public Card PlayCard() {\n\t Card ret = null;\n\t Card card;\n\t if (mCardCount > 0) {\n\t\t // To work out what card to play, see what cards can be played\n\t\t \tCard[] playableCards;\n\t\t \tplayableCards = mRules.GetPlayableCards();\n\t\t \tCard[] selectedCards;\n\t\t \tselectedCards = new Card[8];\n\t\t \tint iNumSelectableCards = 0;\n\t\t \tfor (int i = 0; i < 8; i++)\n\t\t \t\tselectedCards[i] = null;\n\t \tfor (int i = 0; i < mCardCount; i++){\n\t \t\tcard = mCard[i];\n\t \t\tswitch (card.GetSuit()){\n\t \t\tcase Card.HEARTS:\n\t \t\t\t\n\t \t\t\t// Card is a heart, can it be played?\n\t \t\t\t// Is it a seven, it can be played...\n\t \t\t\tif (card.GetValue() == 7){\n\t \t\t\t\tselectedCards[Rules.HEARTS8] = card;\n\t \t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t// and must be played first\n\t \t\t\t\tplayableCards[Rules.HEARTS8] = new Card(8,Card.HEARTS);\n\t \t\t\t\tplayableCards[Rules.HEARTS6] = new Card(6,Card.HEARTS);\n\t \t\t\t\tplayableCards[Rules.CLUBS8] = new Card(7,Card.CLUBS);\n\t \t\t\t\tplayableCards[Rules.DIAMONDS8] = new Card(7,Card.DIAMONDS);\n\t \t\t\t\tplayableCards[Rules.SPADES8] = new Card(7,Card.SPADES);\n\t \n\t \t\t\t\treturn card;\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() < 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.HEARTS6])){\n\t \t\t\t\t\tselectedCards[Rules.HEARTS6] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t\t//Log.i(\"\",\" Playing card \" + (card.GetValue()) + \" , \" +card.GetSuit());\n\t \t\t\t\t\t//Log.i(\"\",\" Updating playable card \" + (card.GetValue()-1) + \" , \" +Card.HEARTS);\t \t\t\t\t\t\n\t \t\t\t\t\t//playableCards[Rules.HEARTS6] = new Card(card.GetValue()-1,Card.HEARTS);\n\t \t\t\t\t\t//return card;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() > 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.HEARTS8])){\n\t \t\t\t\t\tselectedCards[Rules.HEARTS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t\t//Log.i(\"\",\" Playing card \" + (card.GetValue()) + \" , \" +card.GetSuit());\n\t \t\t\t\t\t//Log.i(\"\",\" Updating playable card \" + (card.GetValue()+1) + \" , \" +Card.HEARTS);\t \t\t\t\t\t\n\t \t\t\t\t\t//playableCards[Rules.HEARTS8] = new Card(card.GetValue()+1,Card.HEARTS);\n\t \t\t\t\t\t//return card;\n\t \t\t\t\t}\n\t \t\t\t}\t \t\t\t\n\t \t\t\t\n\t \t\t\tbreak;\n\t \t\tcase Card.DIAMONDS:\n\t \t\t\t// Is it a seven, it can be played...\n\t \t\t\tif (card.GetValue() == 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.DIAMONDS8])){\n\t \t\t\t\t\tselectedCards[Rules.DIAMONDS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\t\n\t \t\t\tif (card.GetValue() < 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.DIAMONDS6])){\n\t \t\t\t\t\tselectedCards[Rules.DIAMONDS6] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() > 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.DIAMONDS8])){\n\t \t\t\t\t\tselectedCards[Rules.DIAMONDS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\t\t \t\t\t\n\t \t\t\t\n\t \t\t\tbreak;\n\t \t\t\t\n\t \t\tcase Card.CLUBS:\n\t \t\t\t// Is it a seven, it can be played...\n\t \t\t\tif (card.GetValue() == 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS8])){\n\t \t\t\t\t\tselectedCards[Rules.CLUBS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\t \t\t\t\t\n\t \t\t\t}\n\t \t\t\t\n\t \t\t\tif (card.GetValue() < 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS6])){\n\t \t\t\t\t\tselectedCards[Rules.CLUBS6] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() > 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS8])){\n\t \t\t\t\t\tselectedCards[Rules.CLUBS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\t\t \t\t\t\n\t \t\t\tbreak;\n\t \t\t\t\n\t \t\tcase Card.SPADES:\n\t \t\t\t// Is it a seven, it can be played...\n\t \t\t\tif (card.GetValue() == 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.SPADES8])){\n\t \t\t\t\t\tselectedCards[Rules.SPADES8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\t \t\t\t\t\n\t \t\t\t}\n\t \t\t\t\n\t \t\t\tif (card.GetValue() < 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.SPADES6])){\n\t \t\t\t\t\tselectedCards[Rules.SPADES6] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() > 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.SPADES8])){\n\t \t\t\t\t\tselectedCards[Rules.SPADES8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\t \t\t\t\n\t \t\t\tbreak;\n\n\t \t\t\t\t \t\t\t\n\t \t\t}\n\t\n\t \t}\t\n\t \t\n\t \t// Now go through the selectable cards and see which is best to be played\n\t \tif (iNumSelectableCards == 0)\n\t \t\treturn ret;\n\t \t\n\t \tint iPos;\n\t \tcard = null;\n\t \tif (iNumSelectableCards == 1){\n\t\t\t \tfor (int i = 0; i < 8; i++)\n\t\t\t \t\tif (selectedCards[i] != null){\n\t\t\t \t\t\tcard = selectedCards[i];\n\t\t\t \t\t\tbreak;\n\t\t\t \t\t}\n\t\t\t \t\t\t \t\n\t \t}\n\t \telse {\n\t\t\t String sDifficulty = mRules.mView.GetSettings().getString(\"Difficulty\", \"0\");// 0 = hard, 1 = easy\n\t\t\t int iDifficulty = Integer.parseInt(sDifficulty);\n\t\t\t if (iDifficulty == EASY){\n\t\t\t \t// Get a random card from the playable ones\n\t\t\t\t\t Random generator = new Random();\n\t\t\t\t\t int randomIndex = generator.nextInt( iNumSelectableCards );\n\t\t\t\t\t int iCount = 0;\n\t\t\t\t\t \tfor (int i = 0; i < 8; i++){\n\t\t\t\t\t \t\tif (selectedCards[i] != null){\n\t\t\t\t\t \t\t\tif (iCount == randomIndex){\n\t\t\t\t\t \t\t\t\tcard = selectedCards[i];\n\t\t\t\t\t \t\t\t\tbreak;\n\t\t\t\t\t \t\t\t}\n\t\t\t\t\t \t\t\telse iCount++;\n\t\t\t\t\t \t\t}\t\n\t\t\t\t\t \t}\n\t\t\t }\n\t\t\t else {\n\t\t\t \tiPos = GetBestCard(selectedCards);\n\t\t\t \tcard = selectedCards[iPos];\n\t\t\t }\n\t \t}\n\t \t\n\t \tswitch (card.GetSuit()){\n \t\tcase Card.HEARTS:\t \t\n \t\t\tif (card.GetValue() == 7){\n \t\t\t\t// and must be played first\n \t\t\t\tplayableCards[Rules.HEARTS8] = new Card(8,Card.HEARTS);\n \t\t\t\tplayableCards[Rules.HEARTS6] = new Card(6,Card.HEARTS);\n \t\t\t\tplayableCards[Rules.CLUBS8] = new Card(7,Card.CLUBS);\n \t\t\t\tplayableCards[Rules.DIAMONDS8] = new Card(7,Card.DIAMONDS);\n \t\t\t\tplayableCards[Rules.SPADES8] = new Card(7,Card.SPADES);\n \n \t\t\t\treturn card;\n \t\t\t}\n \t\t\tif (card.GetValue() < 7){\n \t\t\t\tif (card.Equals(playableCards[Rules.HEARTS6])){\n \t\t\t\t\tplayableCards[Rules.HEARTS6] = new Card(card.GetValue()-1,Card.HEARTS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (card.GetValue() > 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.HEARTS8])){ \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.HEARTS8] = new Card(card.GetValue()+1,Card.HEARTS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\t \t\t\t\n \t\t\t\n \t\t\tbreak; \n \t\tcase Card.DIAMONDS:\n \t\t\t// Is it a seven, it can be played...\n \t\t\tif (card.GetValue() == 7){\n \t\t\t\tif (playableCards[Rules.HEARTS8] != null && playableCards[Rules.HEARTS8].GetValue() > 7){\n\t \t\t\t\tplayableCards[Rules.DIAMONDS8] = new Card(8,Card.DIAMONDS);\n\t \t\t\t\tplayableCards[Rules.DIAMONDS6] = new Card(6,Card.DIAMONDS);\t \t\t\t\t\t\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\tif (card.GetValue() < 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.DIAMONDS6])){\t \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.DIAMONDS6] = new Card(card.GetValue()-1,Card.DIAMONDS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (card.GetValue() > 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.DIAMONDS8])){\t \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.DIAMONDS8] = new Card(card.GetValue()+1,Card.DIAMONDS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\t\t \t\t\t\n \t\t\t\n \t\t\tbreak; \n \t\t\t\n \t\tcase Card.CLUBS:\n \t\t\t// Is it a seven, it can be played...\n \t\t\tif (card.GetValue() == 7){\n\n \t\t\t\tif (playableCards[Rules.HEARTS8] != null && playableCards[Rules.HEARTS8].GetValue() > 7){\n\t \t\t\t\tplayableCards[Rules.CLUBS8] = new Card(8,Card.CLUBS);\n\t \t\t\t\tplayableCards[Rules.CLUBS6] = new Card(6,Card.CLUBS);\t \t\t\t\t\t\n \t\t\t\t\treturn card;\n \t\t\t\t}\t \t\t\t\t\n \t\t\t}\n \t\t\t\n \t\t\tif (card.GetValue() < 7){\n \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS6])){\n \t\t\t\t\tplayableCards[Rules.CLUBS6] = new Card(card.GetValue()-1,Card.CLUBS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (card.GetValue() > 7){\n \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS8])){\n \t\t\t\t\tLog.i(\"\",\" Updating playable card \" + (card.GetValue()+1) + \" , \" +Card.CLUBS);\n \t\t\t\t\tplayableCards[Rules.CLUBS8] = new Card(card.GetValue()+1,Card.CLUBS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\t\t \t\t\t\n \t\t\tbreak; \n \t\tcase Card.SPADES:\n \t\t\t// Is it a seven, it can be played...\n \t\t\tif (card.GetValue() == 7){\n \t\t\t\tif (playableCards[Rules.HEARTS8] != null && playableCards[Rules.HEARTS8].GetValue() > 7){\n\t \t\t\t\tplayableCards[Rules.SPADES8] = new Card(8,Card.SPADES);\n\t \t\t\t\tplayableCards[Rules.SPADES6] = new Card(6,Card.SPADES);\t \t\t\t\t\t\n \t\t\t\t\treturn card;\n \t\t\t\t}\t \t\t\t\t\n \t\t\t}\n \t\t\t\n \t\t\tif (card.GetValue() < 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.SPADES6])){ \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.SPADES6] = new Card(card.GetValue()-1,Card.SPADES);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (card.GetValue() > 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.SPADES8])){\t \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.SPADES8] = new Card(card.GetValue()+1,Card.SPADES);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\t \t\t\t\n \t\t\tbreak;\n \t\t\t\n\t \t}\n\t \n\t }\n\t return ret;\n }",
"void play(){\n\n\t\tnew X.PlayXicon().root.setOnClickListener(Play_TestsPresenter::cc);\n\t}",
"public void startPlayBack() {\n\t\tif (android.os.Environment.getExternalStorageState().equals(\n\t\t\t\tandroid.os.Environment.MEDIA_MOUNTED)) {\n\t\t\ttry {\n\t\t\t\tmPlayer.start();\n\t\t\t} catch (IllegalStateException e) {\n\t\t\t}\n\t\t} else {\n\t\t\tToast.makeText(mContext, \"sdcard not available\", Toast.LENGTH_LONG).show();\n\t\t}\n\t}",
"public Card playCard(int k) {\n //If k is invalid, return an invalid card.\n if (k >= this.numCards || k < 0)\n return new Card('0', Card.Suit.spades);\n else {\n //Return the card in that position, and\n //move all of the cards after that card\n //back by one position.\n Card card = new Card(this.myCards[k]);\n for (int i = k + 1; i < this.numCards; i++) {\n this.myCards[i - 1] = this.myCards[i];\n this.myCards[i] = null;\n }\n this.numCards--;\n return card;\n }\n }",
"private void playThisCard(UnoCard clickedCard) throws NotYourTurnException, InvalidMoveException {\n\t\t// Check player's turn\n\t\tif (!isHisTurn(clickedCard)) {\n\t\t\tthrow new NotYourTurnException();\n\t\t} else {\n\n\t\t\t// Card validation\n\t\t\tif (isValidMove(clickedCard)) {\n\n\t\t\t\tplayedCards().add(clickedCard);\n\n\t\t\t\tremovePlayedCard(clickedCard);\n\n\t\t\t\t// function cards ??\n if (clickedCard instanceof ActionCard) {\n performAction(clickedCard);\n\n }\n\n\t\t\t\tfor (GameListener listener : gameListeners) {\n\t\t\t\t\tlistener.cardPlayed(clickedCard);\n\t\t\t\t}\n\n\t\t\t\tcheckResults();\n\t\t\t} else {\n\t\t\t\tthrow new InvalidMoveException();\n\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void playStart() {\n }",
"@Override\n public void play(){\n \n // while neither player is dead\n while (continueGame()) {\n \n // both player and cpu draw a card and display the card\n player.play();\n System.out.printf(\"%s has drawn %s \\n\", player.getPlayerID(), \n player.getCard());\n cpu.play();\n System.out.printf(\"%s has drawn %s \\n\", cpu.getPlayerID(), \n cpu.getCard());\n \n // checks if the player wins the round\n if (winRound(player, cpu)) {\n // adds the cards to the gamedeck then the game deck to the\n // player deck\n winner(player, cpu, gameDeck);\n player.getWinningsPile().addCards(gameDeck.showCards().subList(0\n , gameDeck.getSize()));\n // empties the game deck\n gameDeck.showCards().clear();\n System.out.printf(\"%s wins round\\n\", player.getPlayerID());\n } else if (winRound(cpu, player)) { // if the cpu wins\n // adds the cards to the gamedeck then the game deck to the\n // cpu deck\n winner(cpu, player, gameDeck);\n cpu.getWinningsPile().addCards(gameDeck.showCards().subList(0, \n gameDeck.getSize()));\n // empties the game deck\n gameDeck.showCards().clear();\n System.out.println(\"CPU wins round\");\n } else {\n // if its a draw, check to see if either the cpu or player is\n // dying, if so, dont add the card to the gameDeck\n if (!(player.isDying())) {\n gameDeck.addCard(player.getCard());\n player.clearCard();\n }\n if (!(cpu.isDying())) {\n gameDeck.addCard(cpu.getCard());\n cpu.clearCard();\n }\n System.out.println(\"DRAW\");\n }\n // shows the current status of the game\n System.out.printf(\"%s's deck: %d winnings: %d \\n\", \n player.getPlayerID(), player.getDeck().getSize(), \n player.getWinningsPile().getSize());\n System.out.printf(\"CPU deck: %d winnings: %d \\n\", \n cpu.getDeck().getSize(), \n cpu.getWinningsPile().getSize());\n System.out.println(\"Press Enter to go to the next round\");\n in.nextLine();\n }\n //display the winner\n declareWinner();\n }",
"public void switchToCardMatching() {\n Intent cardMatching = new Intent(this, CardMatchingGameActivity.class);\n startActivity(cardMatching);\n }",
"public void play() {\n try {\n if (clip != null) {\n new Thread() {\n public void run() {\n synchronized (clip) {\n clip.stop();\n clip.setFramePosition(0);\n clip.start();\n }\n }\n }.start();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"@Override\r\n public void moveCard() {\n \r\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}",
"public void play() {\n\t\tSystem.out.println(\"playing \"+title);\r\n\t}",
"private void addCard() {\n Intent intent = new Intent(this, NewCard.class);\n intent.putExtra(\"cardSetId\", cardSetId);\n startActivity(intent);\n }",
"public void currentPlayerDrawCard() {\n Player currentPlayer = turnManager.currentPlayer();\n UnoCard newCard = getNextCard();\n currentPlayer.obtainCard(newCard);\n\n for (GameListener gameListener : gameListeners) {\n gameListener.cardDrawn();\n }\n\t}",
"@Override\n public void onClick(View v) {\n play(v);\n }",
"@Override\n\tpublic void play() {\n\t\tSystem.out.println(\"打击乐器奏乐~~!\");\n\t}",
"private void playTurn()\n {\n try\n {\n XMLHandler.saveGame(game, GAME_CLONE_PATH);\n }\n catch(IOException | JAXBException | SAXException ex)\n {\n // TODO... ConsoleUtils.message(\"An internal save error has occured, terminating current game\");\n gameEnded = true;\n return;\n }\n \n moveCycle();\n \n if (!game.validateGame()) \n {\n IllegalBoardPenalty();\n }\n \n String gameOverMessage = game.isGameOver();\n if (gameOverMessage != null) \n {\n //TODO: ConsoleUtils.message(gameOverMessage);\n gameEnded = true;\n }\n \n game.switchPlayer();\n }",
"protected abstract void internalPlay();",
"public void showCard(View view) {\n String cardID = view.getTag().toString();\n grimoire.setCard(cardID);\n\n Intent intent = new Intent(GrimoireCardSelectionActivity.this, GrimoireCardActivity.class);\n startActivity(intent);\n }",
"public void play() {\n\t\tSystem.out.println(\"TCL 电视机播放中...\");\r\n\t}",
"public void playContent() {\n this.taskHandler.run(this::inlinePlay);\n }",
"public void play() {\n Selection selection;\n if ((selection = master.getWindowManager().getMain().getSelection()) == null) {\n startPlay();\n playShow(nextStartTime, -1 / 1000.0);\n } else {\n playSelection(selection);\n playShow(selection.start, selection.duration);\n }\n }",
"private void playGame() {\n\t\t\n\t\t/* take 1$ from the wallet to play game */\n\t\tsetWallet(-1);\n\t\t\n\t\t/* generate 3 random slots */\n\t\tslot1 = getSlot();\n\t\tslot2 = getSlot();\n\t\tslot3 = getSlot();\n\t\tslotBox1 = getSlotBox(slot1);\n\t\tslotBox2 = getSlotBox(slot2);\n\t\tslotBox3 = getSlotBox(slot3);\n\t\t\n\t\t/* draw slots on the screen and compute result*/\n\t\tadd(slotBox1, 100, 100);\n\t\tadd(slotBox2, 250, 100);\n\t\tadd(slotBox3, 400, 100);\n\t\t\n\t\tString result = gameOutcome(slot1, slot2, slot3);\n\t\ttopText = new GLabel(result);\n\t\tmidText = new GLabel(\"You now have \" + getWallet() + \"$.\");\n\t\tbotText = new GLabel(\"Click to play\");\n\t\ttopText.setFont(\"Serif-24\");\n\t\tmidText.setFont(\"Serif-24\");\n\t\tbotText.setFont(\"Serif-24\");\n\t\tadd(topText, 100, 250);\n\t\tadd(midText, 100, 280);\n\t\tadd(botText, 100, 310);\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 void catchCard(){\r\n changePlace(deck);\r\n changePlace(hand);\r\n }",
"public void playSound() {\n\t\tmediaPlayer.play();\n\t}",
"public abstract void play();",
"public abstract void play();",
"public void play() {\n\n int turn = 1;\n\n while (!isCheckMate()) {\n System.out.println(\"Turn \" + turn++);\n board.print();\n playTurn(whitePlayer);\n board.print();\n playTurn(blackPlayer);\n }\n }",
"public void play() {\r\n\t\tSystem.out.println(\"Playing Cricket with ball and bat\");\r\n\t}",
"public void play() {\r\n\t\tif (logger.isDebugEnabled())\r\n\t\t\tlogger.debug(\"Play\");\r\n\t\t\r\n\t\t// Start game\r\n\t\tif (state == GameState.CREATED) {\r\n\t\t\t// Change state\r\n\t\t\tstate = GameState.PLAYING;\r\n\t\t\t\r\n\t\t\t// Start scheduling thread\r\n\t\t\tstart();\r\n\t\t}\r\n\t\t// Resume game\r\n\t\telse if (state == GameState.PAUSED || state == GameState.WAITING_FRAME) {\r\n\t\t\t// Change state\r\n\t\t\tstate = GameState.PLAYING;\r\n\t\t\t\r\n\t\t\t// Wake scheduling thread up\r\n\t\t\twakeUp();\r\n\t\t}\r\n\t}"
] | [
"0.7729296",
"0.7586702",
"0.7383592",
"0.7143579",
"0.7056927",
"0.6888459",
"0.6764091",
"0.6717147",
"0.66646695",
"0.6592885",
"0.65782684",
"0.6556899",
"0.6492474",
"0.6489548",
"0.6489194",
"0.6461302",
"0.64482355",
"0.6426991",
"0.6409414",
"0.63171124",
"0.62882775",
"0.62878144",
"0.6248491",
"0.6219651",
"0.6217742",
"0.6152999",
"0.61419713",
"0.6128062",
"0.6117414",
"0.6092896",
"0.6090899",
"0.6087956",
"0.6082923",
"0.6019432",
"0.60173666",
"0.60131097",
"0.59860367",
"0.5985873",
"0.59426886",
"0.5941004",
"0.59167945",
"0.5912755",
"0.5905599",
"0.5903999",
"0.5867481",
"0.5866968",
"0.5859355",
"0.5850325",
"0.5847315",
"0.58472383",
"0.58471185",
"0.58380705",
"0.5824436",
"0.5816632",
"0.58044475",
"0.58014405",
"0.57928437",
"0.57788855",
"0.5775127",
"0.57696044",
"0.5760772",
"0.5756238",
"0.57548916",
"0.57491404",
"0.57362324",
"0.5735744",
"0.5730368",
"0.57273346",
"0.572542",
"0.5724904",
"0.57217664",
"0.5709833",
"0.5709507",
"0.5706194",
"0.57001567",
"0.5686925",
"0.56777406",
"0.5677379",
"0.56773496",
"0.566593",
"0.5660218",
"0.56576234",
"0.56502765",
"0.56421465",
"0.5639687",
"0.5634647",
"0.56195825",
"0.561821",
"0.5613745",
"0.56009525",
"0.5595767",
"0.5591969",
"0.5579083",
"0.5570752",
"0.5569611",
"0.55650645",
"0.55650645",
"0.5559103",
"0.55587864",
"0.55586845"
] | 0.6201926 | 25 |
compares the cost of a card with inputted card | public int compareTo(Card other) {
return this.getCost() - other.getCost();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int canBuy(SimpleResList cardCost) {\r\n\t\tint totalNeeded = cardCost.getTotalRes();\r\n\t\tint numLeft = totalNeeded;\r\n\r\n\t\tif ((numLeft = cardCost.subtract(resList)) == 0)\r\n\t\t\treturn totalNeeded;\r\n\r\n\t\tArrayList<SimpleResList> copySellOrList = new ArrayList<SimpleResList>(\r\n\t\t\t\tsellOrList);\r\n\r\n\t\tboolean listChanged = true;\r\n\t\tint numMatch;\r\n\t\twhile (listChanged) {\r\n\t\t\tlistChanged = false;\r\n\t\t\tfor (SimpleResList srl : copySellOrList) {\r\n\t\t\t\tnumMatch = srl.findNumMatches(cardCost);\r\n\t\t\t\tif (numMatch == 0) {\r\n\t\t\t\t\tcopySellOrList.remove(srl);\r\n\t\t\t\t\tlistChanged = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif (numMatch == 1) {\r\n\t\t\t\t\t// int dif = cardCost.getTotalRes();\r\n\t\t\t\t\tnumLeft = cardCost.subtract(srl);\r\n\t\t\t\t\tcopySellOrList.remove(srl);\r\n\t\t\t\t\tlistChanged = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (cardCost.getTotalRes() == 0\r\n\t\t\t\t\t|| cardCost.getTotalRes() <= copySellOrList.size()) {\r\n\t\t\t\treturn totalNeeded;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn totalNeeded - numLeft;\r\n\t}",
"int compareValue(Card c);",
"@Test\r\n public void testPayByCard() {\r\n \r\n int cost = 60;\r\n \r\n instance.payByCard(cost);\r\n \r\n }",
"public static int calculateCard(Card c)\n\t{\n\t\tint value=c.getValue();\n\t\tif(value>=10)\n\t\t\treturn 10;\n\t\telse if(value==1)\n\t\t\treturn 11;\n\t\treturn value;\n\t}",
"private int GetBestCard(Card[] card) {\n\t int iPos = 0;\n\t int iWeightTemp = 0;\n\t int iWeight[] = new int[8];\n\t for (int i = 0; i < 8; i++){\n\t\t iWeight[i] = -1;\n\t }\n\t // For each selectable card, work out a weight, the highest weight is the one selected.\n\t // The weight is worked out by the distance another of the players cards is from playable ones, with no playable cards in between\n\t Card myCard, nextCard;\n\t for (int i = 0; i < 8; i++){\n\t\t if (card[i] != null){\n\t\t\t // if card value > 7\n\t\t\t if (card[i].GetValue() > 7){\n\t\t\t\t // do you have cards that are higher than this card\n\t\t\t\t myCard = card[i];\n\t\t\t\t iWeightTemp = 0;\n\t\t\t \tfor (int j = 0; j < mCardCount; j++){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() > myCard.GetValue()){\n\t\t\t \t\t\tif (nextCard.GetValue() - myCard.GetValue() > iWeightTemp)\n\t\t\t \t\t\t\tiWeightTemp = nextCard.GetValue() - myCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t \tiWeight[i] = iWeightTemp;\n\t\t\t \t\t\n\t\t\t }\n\t\t\t if (card[i].GetValue() < 7){\n\t\t\t\t // do you have cards that are lower than this card\n\t\t\t\t myCard = card[i];\n\t\t\t\t iWeightTemp = 0;\n\t\t\t \tfor (int j = mCardCount-1; j >=0; j--){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() < myCard.GetValue()){\n\t\t\t \t\t\tif (myCard.GetValue() - nextCard.GetValue() > iWeightTemp)\n\t\t\t \t\t\t\tiWeightTemp = myCard.GetValue() - nextCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t \tiWeight[i] = iWeightTemp;\n\t\t\t \t\t\n\t\t\t }\t\n\t\t\t if (card[i].GetValue() == 7){\n\t\t\t\t // do you have cards that are in this suit\n\t\t\t\t myCard = card[i];\n\t\t\t\t int iWeightTemp1;\n\t\t\t\t iWeightTemp = 0;\n\t\t\t\t iWeightTemp1 = 0;\n\t\t\t\t // do you have cards that are higher than this card\n\t\t\t \tfor (int j = 0; j < mCardCount; j++){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() > myCard.GetValue()){\n\t\t\t \t\t\tif (nextCard.GetValue() - myCard.GetValue() > iWeightTemp)\n\t\t\t \t\t\t\tiWeightTemp = nextCard.GetValue() - myCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t \tmyCard = card[i];\n\t\t\t \t// do you have cards that are lower than this card\n\t\t\t \tfor (int j = mCardCount-1; j >=0; j--){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() < myCard.GetValue()){\n\t\t\t \t\t\tif (myCard.GetValue() - nextCard.GetValue() > iWeightTemp1)\n\t\t\t \t\t\t\tiWeightTemp1 = myCard.GetValue() - nextCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t} \t\n\t\t\t \tiWeight[i] = iWeightTemp + iWeightTemp1;\n\t\t\t \t\t\n\t\t\t }\t\t\t \n\t\t }\n\t\t \t \n\t }\n\t boolean bLoopAceKing = true;\n\t int iMaxTemp = 0;\n\t int iMaxCount = 0;\t\n\t int[] iMaxs;\n\t iMaxs = new int[8];\n\t while (bLoopAceKing){\n\t\t for (int i = 0; i < 8; i++){\n\t\t\t if (iWeight[i] >= iMaxTemp){\n\t\t\t\t if (iWeight[i] == iMaxTemp){\n\t\t\t\t\t iMaxs[iMaxCount] = i;\n\t\t\t\t\t iMaxCount++;\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t\t\t iMaxTemp = iWeight[i];\n\t\t\t\t\t iMaxs = new int[8];\n\t\t\t\t\t iMaxCount = 0;\n\t\t\t\t\t iMaxs[iMaxCount] = i;\n\t\t\t\t\t iMaxCount++;\n\t\t\t\t }\t\t\t \n\t\t\t }\t \n\t\t }\n\t\t boolean bAceKing = false;\n\t\t // If the top weight is zero, meaning your options don't help you, then play the one that is closest to ace/king\n\t\t if (iMaxTemp == 0 && iMaxCount > 1){\n\t\t\t for (int k = 0; k < iMaxCount; k++){\n\t\t\t\t\t iWeight[iMaxs[k]] = Math.abs(card[iMaxs[k]].GetValue()-7);\n\t\t\t\t\t bAceKing = true;\t\t\t\t \n\t\t\t } \t\t \n\t\t }\n\t\t if (bAceKing){\n\t\t\t bLoopAceKing = true;\n\t\t\t iMaxs = new int[8];\n\t\t\t iMaxTemp = 0;\n\t\t\t iMaxCount = 0;\t\t\t \n\t\t }\n\t\t else \n\t\t\t bLoopAceKing = false;\n\t }\n\t if (iMaxCount == 1)\n\t\t iPos = iMaxs[iMaxCount-1];\n\t else {\n\t\t Random generator = new Random();\n\t\t int randomIndex = generator.nextInt( iMaxCount );\n\t\t iPos = iMaxs[randomIndex];\n\t }\n\t\t \n\t return iPos;\n\t \n }",
"public double calculateCost(Purchase purchase);",
"public int compare(Card card1, Card card2){ // works the same as a compareTo method thought for suits\n if (card1.getSuit() != card2.getSuit()){ // Sorts spades first, then diamonds, hearts, and finally clubs.\n return card1.getSuit() - card2.getSuit();\n } else {\n return card1.getValue() - card2.getValue();\n }\n }",
"boolean similarCard(Card c);",
"public int calculateCost() {\n int premium = surety.calculatePremium(insuredValue);\n SuretyType suretyType = surety.getSuretyType();\n int commission = (int) Math.round(premium * vehicle.getCommission(suretyType));\n return premium + commission;\n }",
"public int compareCost(Crops a) {\n\t\t\n\t\t\n\t\treturn (int) (this.Cost - a.Cost);\n\t}",
"public boolean playCard(Cards card, Players player) {\n boolean higher = false;\n int compare = 0;\n if (playedCards.size() == 0 || this.playAgain(player)) { //to check if it is a new game or this is a new round\n if (card instanceof TrumpCards) { //to check if the first played card is a supertrump card\n setCategory(((TrumpCards) card).cardEffect());\n }\n higher = true;\n } else {\n if (card instanceof NormCards) { //to check if the played card is a normal card\n if (getLastCard() instanceof NormCards) { //to check whether the last played card is a normal card or a supertrump card\n if (category.equals(\"H\")) {\n Float now = new Float(((NormCards) card).getHardness());\n Float last = new Float(((NormCards) getLastCard()).getHardness());\n compare = now.compareTo(last);\n } else if (category.equals(\"S\")) {\n Float now = new Float(((NormCards) card).getSpecGravity());\n Float last = new Float(((NormCards) getLastCard()).getSpecGravity());\n compare = now.compareTo(last);\n } else if (category.equals(\"C\")) {\n Float now = new Float(((NormCards) card).getCleavageValue());\n Float last = new Float(((NormCards) getLastCard()).getCleavageValue());\n compare = now.compareTo(last);\n } else if (category.equals(\"CA\")) {\n Float now = new Float(((NormCards) card).getCrustalAbunVal());\n Float last = new Float(((NormCards) getLastCard()).getCrustalAbunVal());\n compare = now.compareTo(last);\n } else if (category.equals(\"EV\")) {\n Float now = new Float(((NormCards) card).getEcoValueValue());\n Float last = new Float(((NormCards) getLastCard()).getEcoValueValue());\n compare = now.compareTo(last);\n\n }\n if (compare > 0) {\n higher = true;\n } else {\n System.out.println(\"The selected card does not has higher value!\");\n }\n } else { //or else, the last played card is a supertrump card\n higher = true;\n }\n } else { //or else, the played is a supertrump card\n setCategory(((TrumpCards) card).cardEffect());\n higher = true;\n }\n }\n return higher;\n }",
"double calculateDeliveryCost(Cart cart);",
"private boolean checkCost(int owner, ItemType item) {\n\t\tint[] cost = item.getCost();\n\t\tResourceManager rm = (ResourceManager) GameManager.get()\n\t\t\t\t.getManager(ResourceManager.class);\n\t\tif (rm.getRocks(owner) < cost[0]) {\n\t\t\treturn false;\n\t\t} else if (rm.getCrystal(owner) < cost[1]) {\n\t\t\treturn false;\n\t\t} else if (rm.getBiomass(owner) < cost[2]) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"@Test\n\tpublic void testCardCoinDiscount() throws NotEnoughResourcesException, NotEnoughPointsException{\n\t\t// bonus is 1 coin\n\t\tInteger expectedCoins = 3;\n\t\t// card 3 is Triumphal Arch (cost: 2 stones and 2 coins)\n\t\ttestResourcesDecorator.resourcesForBuilding(testPlayer,testGameHandler.mainBoard.buildingMap.get(3));\n\t\t// card 1 is Preacher (cost: 2 coins)\n\t\ttestResourcesDecorator.coinsForCharacter(testPlayer,testGameHandler.mainBoard.characterMap.get(1));\n\t\t// card 3 is Repairing the Church (cost: 1 wood, 1 stone, 1 coin)\n\t\ttestResourcesDecorator.resourcesForVenture(testPlayer,testGameHandler.mainBoard.ventureMap.get(3));\n\t\tassertEquals(expectedCoins,testPlayer.resources.getCoins());\n\t\t\n\t}",
"public boolean match(CreditLimit data){\n Operation op;\n op = new Operation();\n boolean result = false;\n if (this.card_type.equalsIgnoreCase(data.card_type)){\n\n // Checking if an operator is contains in the rule to be matched\n if(op.containsExpression(this.num_credit_card)){\n System.out.println(\">>> Contains expression: \"+ this.num_credit_card + \" \"+ this.toString());\n if (this.num_credit_card.contains(\"<=\")){\n int num_credit_card = Integer.parseInt(data.num_credit_card.replace(\"<=\", \"\"));\n if ( num_credit_card <= op.getOperand()){\n System.out.println(\"input \" + num_credit_card + \" is <= \" + op.getOperand());\n return true;\n }\n }\n\n if (this.num_credit_card.contains(\">\")){\n int num_credit_card = Integer.parseInt(data.num_credit_card);\n if ( num_credit_card > op.getOperand()){\n System.out.println(\"input \" + num_credit_card + \" is > \" + op.getOperand());\n return true;\n }\n }\n\n// switch(op.getOperator()){\n// case 1:\n// System.out.println(\"match >\");\n// break;\n// case 5:\n// System.out.println(\"match <\");\n// break;\n// case 6:\n// System.out.println(\"match >\");\n// break;\n// }\n } else {\n if(this.num_credit_card.equalsIgnoreCase(data.num_credit_card)){\n if(this.home_owner.equalsIgnoreCase(\"x\")){\n result= true;\n }\n } else {\n result = false;\n }\n }\n\n } else {\n result = false;\n }\n\n return result;\n }",
"@Override\n public boolean isLegal(List<Integer> selectedCards)\n {\n //checks if the two cards selected added together equal 13\n if(selectedCards.size() == 2)\n {\n if(containsSum13(selectedCards))\n {\n \treturn true;\n }\n }\n \n //checks if the selected card is a K\n if(selectedCards.size() == 1)\n {\n \treturn containsK(selectedCards);\n }\n return false;\n \n }",
"public boolean matches(Card otherCard) {\r\n if (suit==otherCard.suit() && pointValue == otherCard.pointValue() && rank == otherCard.rank())\r\n return true;\r\n else\r\n return false;\r\n }",
"int getCost();",
"int getCost();",
"int getCost();",
"@Override\n\tpublic double cost() {\n\t\tdouble price = good.cost();\n\t\treturn price+price/2;\n\t}",
"public double returnBoxCost(double cardGradeCost, double colourOptPercent, double reinfPercent, double sealablePercent){\n\t\tdouble sum = cardGradeCost + ((cardGradeCost * colourOptPercent) / 100) + ((cardGradeCost * reinfPercent) / 100)\n\t\t\t\t+ ((cardGradeCost * sealablePercent) / 100); \n\t\tdouble computeTotal = 0.00;\n\t\t\n\t\tDecimalFormat df = new DecimalFormat(\"##.##\");\t\n\t\t\n\t\ttry{\n\t\t\tcomputeTotal = Double.valueOf(df.format(sum));\n\t\t\t}catch(NumberFormatException nme){\n\t\t\t\t\n\t\t\t}\n\t\treturn computeTotal;\n\t}",
"double getCost();",
"double getCost();",
"public void compute(){\r\n\r\n\t\ttotalCost=(capAmount*CAPCOST)+(hoodyAmount*HOODYCOST)+(shirtAmount*SHIRTCOST);\r\n\t}",
"public String retrieveCost() {\n // Check if there's a valid cost.\n String cost = _costET.getText().toString();\n if (cost == null || cost.equals(\"\")) {\n Toast.makeText(AddActivity.this, \"Please enter a cost amount.\", Toast.LENGTH_LONG).show();\n return \"\";\n }\n // Check if cost matches the format.\n Pattern costP = Pattern.compile(\"^((([1-9]\\\\d*)?\\\\d)(\\\\.\\\\d\\\\d)?)|$\");\n Matcher costM = costP.matcher(cost);\n if (!costM.find()) {\n Toast.makeText(AddActivity.this, \"Please input the cost with 2 decimal places.\", Toast.LENGTH_LONG).show();\n return \"\";\n }\n return cost;\n }",
"CarPaymentMethod creditCardNumber(String cardNumber);",
"public void addCard(int card) {\n cards[numCards] = card;\n numCards++;\n \n if (card == 1) {\n score = score + 11;\n numSoft++;\n }\n else if(card == 11 || card == 12 || card == 13) {\n score = score + 10;\n }\n else {\n score = score + card;\n }\n \n //Decreases any aces from 11 to 1 if the score is above 21\n while(numSoft > 0 && score > 21){\n score = score - 10;\n numSoft--;\n }\n }",
"public int compareBySuit(Card otherCard){\n\t\tint num = 0;\n\t\tif (this.suit == otherCard.suit)\n\t\t\tnum = 0;\n\t\telse if (this.suit > otherCard.suit)\n\t\t\tnum = 1;\n\t\telse if (this.suit < otherCard.suit)\n\t\t\tnum = -1;\n\t\treturn num;\n\t}",
"public static double Cost(double boxes, double Cost) {\n\tdouble pay = boxes * Cost;\n\treturn pay;\n}",
"public static void main(String[] args) {\r\n\t\tCard aceHearts = new Card(\"Ace\", \"Hearts\", 14);\r\n\t\tSystem.out.println(aceHearts.rank());\r\n\t\tSystem.out.println(aceHearts.suit());\r\n\t\tSystem.out.println(aceHearts.pointValue());\r\n\t\tSystem.out.println(aceHearts.toString());\r\n\t\tCard tenDiamonds = new Card(\"Ten\", \"Diamonds\", 10);\r\n\t\tSystem.out.println(tenDiamonds.rank());\r\n\t\tSystem.out.println(tenDiamonds.suit());\r\n\t\tSystem.out.println(tenDiamonds.pointValue());\r\n\t\tSystem.out.println(tenDiamonds.toString());\r\n\t\tCard fiveSpades = new Card(\"Five\", \"Spades\", 5);\r\n\t\tSystem.out.println(fiveSpades.rank());\r\n\t\tSystem.out.println(fiveSpades.suit());\r\n\t\tSystem.out.println(fiveSpades.pointValue());\r\n\t\tSystem.out.println(fiveSpades.toString());\r\n\t\tSystem.out.println(aceHearts.matches(tenDiamonds));\r\n\t\tSystem.out.println(aceHearts.matches(fiveSpades));\r\n\t\tSystem.out.println(aceHearts.matches(aceHearts));\r\n\t\tSystem.out.println(tenDiamonds.matches(fiveSpades));\r\n\t\tSystem.out.println(tenDiamonds.matches(aceHearts));\r\n\t\tSystem.out.println(tenDiamonds.matches(tenDiamonds));\r\n\t\tSystem.out.println(fiveSpades.matches(aceHearts));\r\n\t\tSystem.out.println(fiveSpades.matches(tenDiamonds));\r\n\t\tSystem.out.println(fiveSpades.matches(fiveSpades));\r\n\t}",
"double getTotalCost();",
"public int evaluateCardScore(int score, int rank) {\n //If the card is an ace\n if (rank == 0) {\n //If the score is 11 or greater, 11 value is bad\n if (score > 10)\n return 1;\n //if the score is 10 or less, 11 will raise score close to 21\n else\n return 11;\n }\n //Card is a court it is worth 10\n else if (rank > 9)\n return 10;\n //Any other card is worth its rank+1\n else\n return rank + 1;\n }",
"private static int total_cost(String a)\n {\n int sum = 0;\n for(int x = 0; x < a.length(); x++)\n {\n sum += (find_cost(\"\"+a.charAt(x)));\n }\n return sum;\n }",
"private static boolean hasFunds(double cost)\n {\n if (Clock.getRoundNum() < 200) { //TODO edit this out if necessary\n return rc.getTeamOre() > cost;\n } else {\n return rc.getTeamOre() > cost*2;\n }\n }",
"static int getComputerCard(Card playerCard) {\n //The computer will iterate through different possible cards it might choose to play.\n //This represents a chosen card at any given time.\n Card possibleCard = null;\n //The position in the computer's hand where the possibleCard is stored.\n int cardPosition = 0;\n //True if the computer has a card of higher value than the player's.\n boolean hasHigherCard = false;\n //Iterate through the computer's hand, trying to find a card higher than the player's\n for (int i = 0; i < highCardGame.getHand(0).getNumCards(); i++) {\n if (playerCard.compareTo(highCardGame.getHand(0).inspectCard(i)) < 0) {\n //The computer has a higher card.\n if (possibleCard != null) {\n //If this card is lower than the possible card, but can still beat the player, then replace possible card.\n if (possibleCard.compareTo(highCardGame.getHand(0).inspectCard(i)) > 0) {\n possibleCard = new Card(highCardGame.getHand(0).inspectCard(i));\n cardPosition = i;\n }\n } else {\n //If the computer has not yet chosen a possible card, choose this one.\n possibleCard = new Card(highCardGame.getHand(0).inspectCard(i));\n hasHigherCard = true;\n cardPosition = i;\n }\n }\n }\n if (!hasHigherCard) {\n //If the computer does not have a card that can beat the player, then feed the lowest card\n //that the computer has to the player.\n for (int i = 0; i < highCardGame.getHand(0).getNumCards(); i++)\n if (playerCard.compareTo(highCardGame.getHand(0).inspectCard(i)) >= 0) {\n if (possibleCard != null) {\n if (possibleCard.compareTo(highCardGame.getHand(0).inspectCard(i)) > 0) {\n possibleCard = new Card(highCardGame.getHand(0).inspectCard(i));\n cardPosition = i;\n }\n } else {\n possibleCard = highCardGame.getHand(0).inspectCard(i);\n cardPosition = i;\n }\n }\n }\n return cardPosition;\n }",
"public static void main(String[] args) {\n double carMiles;\n double carHalon;\n double carCost;\n\n Scanner sc = new Scanner(System.in);\n\n System.out.println(\"Введите пробег автомобиля в американских милях:\");\n carMiles = sc.nextInt();\n\n System.out.println(\"Введите расход топлива автомобиля в галонах на милю:\");\n carHalon = sc.nextInt();\n\n System.out.println(\"Введите стоимость автомобиля $:\");\n carCost = sc.nextInt();\n\n //перевод в европейскую систему\n System.out.println(\"Пробег автомобиля: \" + carMiles * 1.61 + \"км\"); //формул: http://www.for6cl.uznateshe.ru/mili-v-kilometry/\n\n System.out.println(\"Расход топлива автомобиля: \" + ( 378.5 / ( carHalon * 1.609 )) + \" литров на 100 км\" ); // формула: https://planetcalc.ru/4357/\n\n System.out.println(\"Стоимость автомобиля: \" + carCost * 28.3 + \" грн\");\n\n\n\n }",
"private static int find_cost(String a)\n {\n int store = 0;\n List<String> name = new ArrayList<String>(library.return_name());\n for(int x = 0; x < name.size(); x++)\n {\n if(name.get(x).charAt(0) == a.charAt(0))\n store = x;\n }\n List<Integer> cost = new ArrayList<Integer>(library.return_cost());\n return cost.get(store); \n }",
"public int cardValue(Card card) //translate string into card's numerical value\r\n {\r\n if (card.face.equals(\"Deuce\"))\r\n return 2;\r\n if (card.face.equals(\"Three\"))\r\n return 3;\r\n if (card.face.equals(\"Four\"))\r\n return 4;\r\n if (card.face.equals(\"Five\"))\r\n return 5;\r\n if (card.face.equals(\"Six\"))\r\n return 6;\r\n if (card.face.equals(\"Seven\"))\r\n return 7;\r\n if (card.face.equals(\"Eight\"))\r\n return 8;\r\n if (card.face.equals(\"Nine\"))\r\n return 9;\r\n if (card.face.equals(\"Ten\"))\r\n return 10;\r\n if (card.face.equals(\"Jack\"))\r\n return 11;\r\n if (card.face.equals(\"Queen\"))\r\n return 12;\r\n if (card.face.equals(\"King\"))\r\n return 13;\r\n if (card.face.equals(\"Ace\"))\r\n return 14;\r\n return -2;\r\n }",
"if (charge == adhocTicket.getCharge()) {\n System.out.println(\"Charge is passed\");\n }",
"public float assess(Card card) {\n int grade = 0;\n \n List<Review> reviewList = card.getReviews();\n \n if(reviewList.isEmpty()) {\n grade = Professor.HAS_NEVER_BEEN_REVIEWED;\n } else {\n // TODO : vérifier que les noeuds \"review\" sont bien classés par date croissante\n if(!isSorted(reviewList)) System.out.println(\"Unsorted card detected : \" + card);\n \n for(Review review : reviewList) {\n if(review.getResult().equals(Review.RIGHT_ANSWER_STRING)) {\n grade++;\n } else {\n grade = 0;\n }\n }\n }\n \n return grade;\n }",
"public void discountPrices()\n {\n System.out.print( \"Enter amount of purchases: \" );\n int cost = scan.nextInt();\n int discount = cost - cost / 10;\n if ( cost > 1000 )\n {\n System.out.print( \"Discounted price: \" + discount );\n }\n else\n {\n System.out.print( \"Discounted price: \" + cost );\n }\n\n }",
"public double calcCost() {\n // $2 per topping.\n double cost = 2 * (this.cheese + this.pepperoni + this.ham);\n // size cost\n switch (this.size) {\n case \"small\":\n cost += 10;\n break;\n case \"medium\":\n cost += 12;\n break;\n case \"large\":\n cost += 14;\n break;\n default:\n }\n return cost;\n }",
"public int compareTo(Card cr1) {\n// if suits don't match, figure out who is highest suit\n if (suit != cr1.getSuit()) {\n int suitIndex = 0, cr1Index = 0;\n for (int i = 0; i < SUITCARDS.length; i++) {\n if (suit == SUITCARDS[i]) {\n suitIndex = i;\n }\n if (cr1.suit == SUITCARDS[i]) {\n cr1Index = i;\n }\n }\n// way I organized the array means lower index is worse\n if (suitIndex > cr1Index)\n return 1;\n else if (suitIndex < cr1Index)\n return -1;\n else\n return 0;\n }\n// if suits do match, figure out which card is higher\n else {\n int suitIndex = 0, cr1Index = 0;\n for (int j = 0; j < FACECARDS.length; j++) {\n if (value == FACECARDS[j]) {\n suitIndex = j;\n }\n if (cr1.value == FACECARDS[j]) {\n cr1Index = j;\n }\n }\n\n if (suitIndex > cr1Index)\n return 1;\n else if (suitIndex < cr1Index)\n return -1;\n else\n return 0;\n }\n }",
"public double cost()\n\t{\n\t\t//initiates the price variable\n\t\tdouble price = 0;\n\t\t\n\t\t//if the customer is aged between 18 and 64 years and is not a student\n\t\tif (this.age >= 18 && this.age <= 64 && !this.isStudent)\n\t\t{\n\t\t\t//the price is $10\n\t\t\tprice = 10;\n\t\t}\n\t\t\n\t\t//if not, but it has less than 18 years\n\t\telse if (this.age < 18)\n\t\t{\n\t\t\t//the price is 7\n\t\t\tprice = 7;\n\t\t}\n\t\t\n\t\t//why between 10 and 25 if people aged less than 18 pay 7 dollars?\n\t\t//it would not make sense someone aged 17 and is not a student pay $7\n\t\t//if someone aged 17 and is a student pay $8.50\n\t\t\n\t\t//if not, but the age is bigger than 10 and less than 25 and is a student\n\t\telse if (this.age >= 10 && this.age <= 25 && this.isStudent)\n\t\t{\n\t\t\t//give 15% of discount\n\t\t\tprice = 0.85f * 10;\n\t\t}\n\t\t\n\t\t//if not, but the age is bigger than 25 and is a students\n\t\telse if (this.age > 25 && this.isStudent)\n\t\t{\n\t\t\t//give 10% of discount\n\t\t\tprice = 0.90f * 10;\n\t\t}\n\t\t\n\t\t//if not, but the age is bigger than 64 and is not a student\n\t\telse if (this.age > 64 && !this.isStudent)\n\t\t{\n\t\t\t//give 7% of discount\n\t\t\tprice = 0.93f * 10;\n\t\t}\n //returns the price \n\t\treturn price;\n\t}",
"public int compare(Object card1, Object card2) throws ClassCastException{\n if (!((card1 instanceof Card) && (card2 instanceof Card))){\r\n throw new ClassCastException(\"A Card object was expeected. Parameter 1 class: \" + card1.getClass() \r\n + \" Parameter 2 class: \" + card2.getClass());\r\n }\r\n\r\n short suit1 = ((Card)card1).getSuit();\r\n short suit2 = ((Card)card2).getSuit();\r\n\r\n return suit1 - suit2;\r\n }",
"public boolean canCredit(double amount);",
"public double returnBoxCost(double cardGradeCost, double colourOptPercent, double reinfPercent, double sealablePercent, int qty, double length, double width, double height){\n\t\tdouble sum = cardGradeCost + (cardGradeCost * colourOptPercent / 100) + (cardGradeCost * reinfPercent / 100)\n\t\t\t\t+ (cardGradeCost * sealablePercent / 100); \n\t\t\n\t\tdouble computeTotal = 0;\n\t\tDecimalFormat df = new DecimalFormat(\"##.##\");\n\t\ttry{\n\t\t\tcomputeTotal = Double.valueOf(calcSurfaceAreaOfBox(length, width, height, sum, qty));\n\t\t\n\t\t\treturn Double.valueOf(df.format(computeTotal));\n\t\t\n\t\t}catch(NumberFormatException nme){\n\t\t\treturn 0.00;\n\t\t}\n\t}",
"public int compareSuits(Card anotherCard) {\n\t\treturn getSuit().compareTo(anotherCard.getSuit());\n\t}",
"@Override\n\tpublic void updateTotalCost(String card, double cost) {\n\t\tConnection conn = null;\n\t\ttry {\n\t\t\tconn = DbcpConnectionPool.getConnection();\n\t\t\tCallableStatement cstmt = conn.prepareCall(\"{call Member_updateTotalCost(?,?)}\");\n\t\t\tcstmt.setString(1, card);\n\t\t\tcstmt.setDouble(2, cost);\n\t\t\tcstmt.executeUpdate();\n\t\t\tcstmt.close();\n\t\t\tconn.close();\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 void testForLargestCardInTrick() {\n Dealer testDealer = new Dealer();\n\n Suit suit1 = Suit.DIAMONDS;\n Suit suit2 = Suit.SPADES;\n Suit suit3 = Suit.SPADES;\n Suit suit4 = Suit.DIAMONDS;\n \n Rank rank1 = Rank.TWO;\n Rank rank2 = Rank.KING;\n Rank rank3 = Rank.ACE;\n Rank rank4 = Rank.FIVE;\n\n Card card1 = new Card(suit1,rank1,false);\n Card card2 = new Card(suit2,rank2,false);\n Card card3 = new Card(suit3,rank3,false);\n Card card4 = new Card(suit4,rank4,false);\n\n \n testDealer.addToPlayedCards(card1);\n testDealer.addToPlayedCards(card2);\n testDealer.addToPlayedCards(card3);\n testDealer.addToPlayedCards(card4);\n\n assertEquals(card4 , testDealer.getLargestCardFromTrick());\n }",
"public int compareTo(Card other) {\n if (other == null) {\n return 1;\n } else {\n int valueComp = Integer.compare(this.value, other.value);\n if (valueComp == 0) {\n return Integer.compare(this.getSuitInt(), other.getSuitInt());\n } else {\n return valueComp;\n }\n }\n }",
"public void verifyCards() {\n\t\t\n\t\tString text = myTextField.getText();\n\t\tString settext = setText.getText();\n\t\t\n\t\t// Stack for cards\n\t\tStack<Integer> cardNums = new Stack<Integer>();\n\t\tStack<Integer>tmpCard = new Stack<Integer>(); \n\t\t// Set up Stack for numbers\n\t\tStack<Integer> nums = new Stack<Integer>();\n\t\tStack<Integer>tmpNums = new Stack<Integer>(); \n\n\t\t// Set up Stack for Operators\n\t\tStack<Character> ops = new Stack<Character>();\n\n\t\t\n\t\tchar[] cardChars = settext.toCharArray();\n\t\t\n\t\t\n\t\tfor (int i = 0; i < cardChars.length; i++) {\n\t\t\tif (cardChars[i] >= '1' && cardChars[i] <= '9') {\n\t\t\t\tStringBuffer sbuf = new StringBuffer();\n\t\t\t\t\n\t\t\t\t// If there is more than one digit in a number, check, then push if so\n\t\t\t\twhile (i < cardChars.length && cardChars[i] >= '0' && cardChars[i] <= '9') {\n\t\t\t\t\tsbuf.append(cardChars[i++]);\n\t\t\t\t\tcardNums.push(Integer.parseInt(sbuf.toString()));\n\t\t\t\t\ttmpCard.push(Integer.parseInt(sbuf.toString()));\n\t\t\t\t}\n\t\t\t\tSystem.out.println(cardNums.peek()); \n\t\t\t\tSystem.out.println(tmpCard.peek()); \n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\tchar[] chars = text.toCharArray();\n\t\t\n\t\t\n\t\tmyTextField.textProperty().addListener(new ChangeListener<String>() {\n @Override\n public void changed(ObservableValue<? extends String> observable, String oldValue, \n String newValue) {\n if (!newValue.matches(\"\\\\d*\")) {\n \tmyTextField.setText(newValue.replaceAll(\"[^\\\\d\\\\h+-/*]\", \"\"));\n }\n }\n });\n \n\n\t\tfor (int i = 0; i < chars.length; i++) {\n\n\t\t\t// Do the stack for numbers, if its 0 - 9, means its a number\n\t\t\tif (chars[i] >= '1' && chars[i] <= '9') {\n\t\t\t\tStringBuffer sbuf = new StringBuffer();\n\t\t\t\t\n\t\t\t\t// If there is more than one digit in a number, check, then push if so\n\t\t\t\twhile (i < chars.length && chars[i] >= '0' && chars[i] <= '9') {\n\t\t\t\t\tsbuf.append(chars[i++]);\n\t\t\t\t\tnums.push(Integer.parseInt(sbuf.toString()));\n\t\t\t\t\ttmpNums.push(Integer.parseInt(sbuf.toString()));\n\n\t\t\t\t}\n\t\t\t\tSystem.out.println(nums.peek());\n\t\t\t}\n\t\t\t\n\t\t\t// open brace, pushed to operator stack\n\t\t\telse if (chars[i] == '(')\n\t\t\t\tops.push(chars[i]);\n\n\t\t\t// Closing brace, now solve\n\t\t\telse if (chars[i] == ')') {\n\t\t\t\t// look at the top of the stack, see if there was a ( brace before the ) brace\n\t\t\t\twhile (ops.peek() != '(')\n\t\t\t\t\tnums.push(operatorCases(ops.pop(), nums.pop(), nums.pop()));\n\t\t\t\tops.pop();\n\t\t\t}\n\n\t\t\n\t\t\telse if (chars[i] == '+' || chars[i] == '-' || chars[i] == '*' || chars[i] == '/') {\n\n\t\t\t\twhile (!ops.empty() && precedenceOrder(chars[i], ops.peek()))\n\t\t\t\t\tnums.push(operatorCases(ops.pop(), nums.pop(), nums.pop()));\n\t\t\t\tops.push(chars[i]);\n\t\t\t}\n\t\t\t\n\t\t}\n\t \n\t\t// pop out the tmp values, then check to see if they equal eachother for validation.\n\n\t\t\nint cardP1 = tmpCard.pop(); \nint cardP2 = tmpCard.pop(); \nint cardP3 = tmpCard.pop(); \nint cardP4 = tmpCard.pop(); \n\n\nint numP1 = tmpNums.pop(); \nint numP2 = tmpNums.pop(); \nint numP3 = tmpNums.pop(); \nint numP4 = tmpNums.pop(); \nint whileLoopGood = 0; \nboolean resultWhile;\nresultWhile = false;\nwhile(!resultWhile) { \n\twhile(numP1 == cardP1 || numP1 == cardP2 || numP1 == cardP3 || numP1 == cardP4) {\n\t\twhile(numP2 == cardP1 || numP2 == cardP2 || numP2 == cardP3 || numP2 == cardP4) {\n\t\t\twhile(numP3 == cardP1 || numP3 == cardP2 || numP3 == cardP3 || numP3 == cardP4) {\n\t\t\t\twhile(numP4 == cardP1 || numP4 == cardP2 || numP4 == cardP3 || numP4 == cardP4) {\n\t\t\t\t\twhileLoopGood = 1;\n\t\t\t\t\tresultWhile = true; \n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbreak; \n\t\t}\n\t\tbreak;\n\t}\n\tbreak;\n}\n\n//if the while loop does reach the final desitintion then user did not type in correctly. \n\n\n\n\t\t// Entire expression has been parsed at this point, apply remaining\n\t\t// ops to remaining nums\n\t\twhile (!ops.empty())\n\t\t\tnums.push(operatorCases(ops.pop(), nums.pop(), nums.pop()));\n\n\t\t// Result is on the top of the numbs Stack so Return the Top of number stack\n\t\t// Check to see if the number is equal to 24\n\t\tint result = nums.pop();\n\t\tif (result != 24) {\n\t\t\ttxtFldAns.setText(\"Wrong : \" + result + \" is NOT equal to 24\");\n\t\t\tif(whileLoopGood == 0) {\n\t\t\t\ttxtFldAns.setText(\"You must use all 4 cards Once and only once\");\n\t\t\t\t}\n\t\t} else\n\t\t\ttxtFldAns.setText(\"Correct : \" + result + \" is equal to 24\");\n\t\tif(whileLoopGood == 0) {\n\t\t\ttxtFldAns.setText(\"You must use all 4 cards Once and only once\");\n\t\t\t}\n\t}",
"public void payment(double total_sales_of_transaction) {\n String payment_typ = \"\";\n Scanner scan = new Scanner(System.in);\n\n System.out.printf(\"Which payment type do you wish to use?\\n\");\n System.out.printf(\"1. Cash\\n\");\n System.out.printf(\"2. Card\\n\");\n \n\n do {\n System.out.printf(\"Please enter your choice :\");\n try {\n choice = scan.nextInt();\n } catch (InputMismatchException e) {\n scan.next();\n System.out.println(\"Something went wrong.\\n\");\n }\n } while (choice<1 || choice >2);\n\n \n\n\n if (choice == 2) {\n boolean valid_ccN = false;\n cerdit_card_ID = scan.nextLine();\n while (valid_ccN == false) {\n valid_ccN = verifiying_payment(cerdit_card_ID);\n if(valid_ccN == true){break;}\n scan.next();\n System.out.println(\"Please enter a valid CC number :\");\n cerdit_card_ID = scan.nextLine();\n }\n\n System.out.println(\"Your payment has been accpeted.\\n\");\n payment_typ = \"CC\";\n payment_used = \"CARD\";\n\n } else {\n verifiying_payment();\n payment_typ = \"C\";\n payment_used = \"CASH\";\n\n }\n\n payment_id = generate_payment_ID(payment_typ);\n printPaymentSummary();\n }",
"int main()\n{\n int f_amt,f_dis,f_shp,s_amt,s_dis,s_shp,a_amt,a_dis,a_shp,f_tot,s_tot,a_tot;\n std::cin>>f_amt>>f_dis>>f_shp>>s_amt>>s_dis>>s_shp>>a_amt>>a_dis>>a_shp;\n f_dis=(f_amt/100)*f_dis;\n s_dis=(s_amt/100)*s_dis;\n a_dis=(a_amt/100)*a_dis;\n f_tot=(f_amt-f_dis)+f_shp;\n s_tot=(s_amt-s_dis)+s_shp;\n a_tot=(a_amt-a_dis)+a_shp;\n std::cout<<\"In Flipkart Rs.\"<<f_tot;\n std::cout<<\"\\nIn Snapdeal Rs.\"<<s_tot;\n std::cout<<\"\\nIn Amazon Rs.\"<<a_tot;\n if((f_tot<s_tot)&&(f_tot<a_tot)||(f_tot==s_tot)&&(f_tot<a_tot)){\n std::cout<<\"\\nHe will prefer Flipkart\";\n }\n else if((s_tot<f_tot)&&(s_tot<a_tot)||(s_tot==a_tot)&&(s_tot<f_tot)){\n std::cout<<\"\\nHe will prefer Snapdeal\";\n \n }\n else if((a_tot<f_tot)&&(a_tot<s_tot)){\n std::cout<<\"\\nHe will prefer Amazon\";\n }\n}",
"public static void main(String[] args) {\n\t\tjava.util.Scanner stdin = new java.util.Scanner(System.in);\n\t\tSystem.out.println(\"Enter the credit card number: \");\n\t\tString creditCard = stdin.next();\n\n\t\t// First check that the card has a known prefix and a valid length for that prefix\n\t\tboolean validLength = true;\n\t\tString cardType = null;\n\t\tif (creditCard.startsWith(\"34\") || creditCard.startsWith(\"37\")) {\n\t\t\t// American Express\n\t\t\tvalidLength = (creditCard.length() == 15);\n\t\t\tcardType = \"American Express\";\n\t\t} else if (creditCard.startsWith(\"4\")) {\n\t\t\t// Visa\n\t\t\tvalidLength = (creditCard.length() == 13 || creditCard.length() == 16 || creditCard.length() == 19);\n\t\t\tcardType = \"Visa\";\n\t\t} else if (creditCard.startsWith(\"5\")) {\n\t\t\t// MasterCard \n\t\t\tint prefix = Integer.valueOf(creditCard.substring(0, 2));\n\t\t\tif (prefix >= 51 && prefix <= 55) {\n\t\t\t\tvalidLength = (creditCard.length() == 16);\n\t\t\t\tcardType = \"MasterCard\";\n\t\t\t}\n\t\t}\n\n\t\t// If card type is unknown, exit with no further checks\n\t\tif (cardType == null) {\n\t\t\tSystem.out.println(\"Unknown card type\");\n\t\t\tSystem.exit(0);\n\t\t} \n\t\t\n\t\t// Known card type -- print it out and check length\n\t\tSystem.out.println(\"Card type: \" + cardType);\n\t\tif (!validLength) {\n\t\t\tSystem.out.println(\"Invalid length\");\n\t\t\tSystem.exit(0);\n\t\t}\n\n\n\t\t\n\t\tstdin.close();\n\t}",
"public int getCardVal(){\n\t\tint aces = 0;\n\t\tif(cardString.charAt(0) == 'J' || cardString.charAt(0) == 'Q' || cardString.charAt(0) == 'K' || cardString.charAt(0) == 'T'){\n\t\t\tcardValue = 10;\n\t\t}\n\t\telse if(cardString.charAt(0) == 'A'){\n\t\t\tcardValue = 11;\n\t\t}\n\t\telse{\n\t\t\tcardValue = Character.getNumericValue(cardString.charAt(0));\n\t\t}\n\t\treturn cardValue;\n\t}",
"public static void main(String[] args) {\n\t\tCustomer customer = new Customer(true);\r\n\t\tdouble amount = 105.78;\r\n\t\tdouble donation;\r\n\t\tString cardType= \" \";\r\n\t\t//YOUR CODE GOES BELOW THIS LINE\r\n\t\tCreditCard creditcard = new CreditCard(customer, amount, donation=0);\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\t\r\n\t\t\r\n\t\t// call for setCardname\r\n\t\tsetCardname(creditcard, scan);\r\n\t\t\r\n\t\t// set card type\r\n\t\tcardType= getCardType(scan, cardType);\r\n\t\t\r\n\t\t// request the card number\r\n\t\tsetCardnumber(creditcard, scan);\r\n\t\t\r\n\t\t//request the expiration date\r\n\t\tsetExpirationDate (creditcard,scan);\r\n\t\r\n\t\t// request the Security Code\r\n\t\tsetSecurityCode (creditcard,scan);\r\n\t\t\r\n\t\t// request billing address\r\n\t\tsetBillingAddress(creditcard, scan);\r\n\t\t\r\n\t\t//request shipping address\r\n\t\tSystem.out.println(\"Shipping address:\\n\" + \"Press 1 if the shipping address is the same as the customer address \\n\" +\r\n\t\t\t\t \"Press 2 if the shipping address is a new address \");\r\n\t\tsetShippingAddress( creditcard, customer, scan);\r\n\t\t\r\n\t\t//\r\n\t\t// get donation\r\n\t\t//\r\n\t\tString userAnswer= (scan.nextLine()).toUpperCase();\r\n\t\tSystem.out.println(\"Would you like to donate? Yes/No: \");\r\n\t\tuserAnswer= (scan.nextLine()).toUpperCase();\r\n\t\t\r\n\t\tif (userAnswer.equals(\"YES\"))\r\n\t\t\tdonation= getDonation(customer, creditcard, scan, donation, amount);\r\n\t\telse\r\n\t\t\tSystem.out.println(\" \");\t\r\n\t\t\r\n\t\t//\r\n\t\t// print summary\r\n\t\t//\r\n\t\tSystem.out.println(\"---------------------------------------------------------------------------\\n\"\r\n\t\t +(customer.firstName).toUpperCase() + \",\" + \"Here Is Your Purchase Summary:\\n\"\r\n\t\t\t\t + \"------------------------------------------------------------------------------\");\r\n\t\tprintSummary( customer, creditcard, donation, cardType, amount,scan);\r\n\t\t\r\n\t\tLastCheck(customer, creditcard, donation, cardType, amount, scan);\r\n\t\t\r\n\t\tscan.close();\r\n\t}",
"public static double getJaccard() {\n\t\tdouble match = 0;\n\t\tdouble unmatch = 0;\n\t\tfor(int i = 1;i<=totalGenes;i++) {\n\t\t\tint c1 = actualClusters.get(i);\n\t\t\tint r1 = resultClusters.get(i);\n\t\t\tfor(int j=1;j<=totalGenes;j++) {\n\t\t\t\tint c2 = actualClusters.get(j);\n\t\t\t\tint r2 = resultClusters.get(j);\n\t\t\t\tif(c1 == c2 && r1 == r2)\n\t\t\t\t\tmatch++;\n\t\t\t\telse if( (c1 == c2 && r1 != r2) || (c1 != c2 && r1 == r2))\n\t\t\t\t\tunmatch++;\n\t\t\t}\n\t\t}\n\t\tdouble jacard = match/(match+unmatch);\n\t\treturn jacard;\n\t}",
"private boolean checkCost(int owner, ItemType item) {\n\t\t\t\t\treturn false;\n\t\t\t\t}",
"public static void chargeHire(int minutes) {\n int time = minutes;\n double cost;\n\n if(time >= 0 && time <30) {\n cost = 0;\n }\n else {\n if(time >30 && time < 60) {\n cost = 0.5;\n }\n else {\n if(time > 60 && time < 120) {\n cost = 1.50;\n }\n else{\n if(time > 120 && time <180) {\n cost = 6.50;\n }\n else {\n\n int numOfHalfHours = (time/30);\n int b = (numOfHalfHours - 5);\n int c = (b*2);\n cost = (6.50 + c);\n }\n }\n }\n }\n System.out.println(\"€\" +cost);\n if(cost <= accountBalance) {\n accountBalance = (accountBalance - cost);\n// System.out.println(\"Bike rent successful! you have been charged\" + cost);\n Receipt.printSlip(cost);\n }\n else {\n System.out.println(\"There were insuficient funds in your account.\" + \"\\n\" +\n \"We will now charge the credit card you have provided us instead.\");\n }\n }",
"public boolean containsSum13(List<Integer> selectedCards) \n {\n //2 loops to check every combination of 2 in selectedCards \n for(int i = 0;i < selectedCards.size()-1;i++)\n {\n for(int n = i+1;n < selectedCards.size();n++)\n {\n \t//checks if 2 cards added together equals 13\n \tif(cardAt(selectedCards.get(i)).pointValue()+cardAt(selectedCards.get(n)).pointValue() == 13)\n \t{\n \t\treturn true;\n \t}\n }\n }\n return false;\n }",
"public int value(){\r\n\t\t\r\n\t\tthis.sort();\r\n\t\t\r\n\t\tint result = 0;\r\n\t\t\r\n\t\tfor(int i = this.cardCount()-1; i >= 0; i--){\r\n\t\t\tif(this.getCard(i).getValue().compareTo(CardValue.ACE) == 0){\r\n\t\t\t\tif(result <= 10 - i)\r\n\t\t\t\t\tresult += 11;\r\n\t\t\t\telse\r\n\t\t\t\t\tresult += 1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.getCard(i).getValue().compareTo(CardValue.TEN) == 0 ||\r\n\t\t\t\tthis.getCard(i).getValue().compareTo(CardValue.JACK) == 0 ||\r\n\t\t\t\tthis.getCard(i).getValue().compareTo(CardValue.QUEEN) == 0 ||\r\n\t\t\t\tthis.getCard(i).getValue().compareTo(CardValue.KING) == 0 ){\r\n\t\t\t\tresult += 10;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.getCard(i).getValue().compareTo(CardValue.TWO) == 0){\r\n\t\t\t\tresult += 2;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.getCard(i).getValue().compareTo(CardValue.THREE) == 0){\r\n\t\t\t\tresult += 3;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.getCard(i).getValue().compareTo(CardValue.FOUR) == 0){\r\n\t\t\t\tresult += 4;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.getCard(i).getValue().compareTo(CardValue.FIVE) == 0){\r\n\t\t\t\tresult += 5;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.getCard(i).getValue().compareTo(CardValue.SIX) == 0){\r\n\t\t\t\tresult += 6;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.getCard(i).getValue().compareTo(CardValue.SEVEN) == 0){\r\n\t\t\t\tresult += 7;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.getCard(i).getValue().compareTo(CardValue.EIGHT) == 0){\r\n\t\t\t\tresult += 8;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.getCard(i).getValue().compareTo(CardValue.NINE) == 0){\r\n\t\t\t\tresult += 9;\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn result;\r\n\t}",
"public int calculScore(Deck deck)\n {\n return 0;\n }",
"public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint n = scan.nextInt();\n\t\tint m = scan.nextInt();\n\t\tint[] card = new int[n];\n\n\t\tfor(int i=0; i<card.length; i++) {\n\t\t\tcard[i] = scan.nextInt();\n\t\t}\n\n\t\tint result = 0;\n\t\tint temp = 0;\n\n\t\tfor(int i=0; i<n-2; i++) \n\t\t\tfor(int j=i+1; j<n-1; j++) \n\t\t\t\tfor(int k=j+1; k<n; k++) {\n\t\t\t\t\tresult = card[i] + card[j] + card[k];\n\t\t\t\t\tif(result <= m) {\n\t\t\t\t\t\tif(temp <= result)\n\t\t\t\t\t\t\ttemp = result;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\tSystem.out.println(temp);\n\t\tscan.close();\n\t}",
"public DebitCard(String n, int c, int p, Date e, Customer h, Provider p) {}",
"public double calcCost(){\n double cost = 0;\n cost += pMap.get(size);\n cost += cMap.get(crust);\n //Toppings are priced at 3.00 for 3-4 topppings, and 4.0 for 5+ toppings\n \n if(toppings !=null)\n {\n if((toppings.length == 3) || (toppings.length == 4)){\n cost += 3.0;\n }\n if (toppings.length > 4){\n cost += 4.0;\n }\n }\n \n return cost;\n }",
"@Test\n void testForLargestCardInTrickComparingRank() {\n Dealer testDealer = new Dealer();\n\n Suit suit1 = Suit.DIAMONDS;\n Suit suit2 = Suit.SPADES;\n Suit suit3 = Suit.DIAMONDS;\n Suit suit4 = Suit.DIAMONDS;\n \n Rank rank1 = Rank.TWO;\n Rank rank2 = Rank.KING;\n Rank rank3 = Rank.ACE;\n Rank rank4 = Rank.FIVE;\n\n Card card1 = new Card(suit1,rank1,false);\n Card card2 = new Card(suit2,rank2,false);\n Card card3 = new Card(suit3,rank3,false);\n Card card4 = new Card(suit4,rank4,false);\n\n \n testDealer.addToPlayedCards(card1);\n testDealer.addToPlayedCards(card2);\n testDealer.addToPlayedCards(card3);\n testDealer.addToPlayedCards(card4);\n\n assertEquals(card3 , testDealer.getLargestCardFromTrick());\n }",
"public void orderChecker()\n {\n System.out.print( \"Number of bolts: \" );\n int bolts = scan.nextInt();\n System.out.print( \"Number of nuts: \" );\n int nuts = scan.nextInt();\n System.out.print( \"Number of washers: \" );\n int washers = scan.nextInt();\n if ( nuts >= bolts )\n {\n if ( washers >= 2 * bolts )\n {\n System.out.println( \"Check the Order: Order is OK.\" );\n }\n else\n {\n System.out.println( \"Check the Order: Too few washers.\" );\n }\n }\n else\n {\n System.out.println( \"Check the Order: Too few nuts.\" );\n if ( ( washers < 2 * bolts ) )\n {\n System.out.println( \"Check the Order: Too few washers.\" );\n }\n }\n\n final int boltPrice = 5;\n final int nutPrice = 3;\n final int washerPrice = 1;\n int cost = boltPrice * bolts + nutPrice * nuts + washerPrice * washers;\n System.out.println( \"Total cost: \" + cost );\n }",
"public void dealerAskCard() {\n int dealerScore = this.getDealerHand().getActualValue();\n while (dealerScore < 17) {\n Card card = this.deck.deal(this.getDealerHand());\n dealerScore = this.getDealerHand().getActualValue();\n }\n }",
"private int calculateScore(){\n int score = 0;\n for(Card card : hand){\n score += card.getScore();\n }\n return score;\n }",
"@Test\n\tpublic void caseCostWithCorrectInput() {\n\t\tFloat cost = 50f;\n\t\tboolean isNameValid;\n\t\ttry {\n\t\t\tisNameValid = StringNumberUtil.positiveNumberUtil(cost);\n\t\t\tassertTrue(isNameValid);\n\t\t} catch (NumberException e) {\n\t\t\tfail();\n\t\t}\n\t\t\n\t}",
"private static boolean checkIfNeedMore(int[] costToPayToCheck){\n boolean result = false;\n List<PowerUpLM> copyOfPowerUpLMList = copyOf(tmpAmmoInPowerUp);\n\n if(costToPayToCheck[GeneralInfo.RED_ROOM_ID] > 0){\n result = true;\n }\n else{\n tmpAmmoInAmmoBox[GeneralInfo.RED_ROOM_ID] = 0;\n for(PowerUpLM power: copyOfPowerUpLMList){\n if(power.getGainAmmoColor().equals(AmmoType.RED))\n tmpAmmoInPowerUp.remove(power);\n }\n }\n\n if(costToPayToCheck[GeneralInfo.BLUE_ROOM_ID] > 0){\n result = true;\n }\n else{\n tmpAmmoInAmmoBox[GeneralInfo.BLUE_ROOM_ID] = 0;\n for(PowerUpLM power: copyOfPowerUpLMList){\n if (power.getGainAmmoColor().equals(AmmoType.BLUE))\n tmpAmmoInPowerUp.remove(power);\n }\n }\n\n if(costToPayToCheck[GeneralInfo.YELLOW_ROOM_ID] > 0){\n result = true;\n }\n else{\n tmpAmmoInAmmoBox[GeneralInfo.YELLOW_ROOM_ID] = 0;\n for(PowerUpLM power: copyOfPowerUpLMList){\n if(power.getGainAmmoColor().equals(AmmoType.YELLOW))\n tmpAmmoInPowerUp.remove(power);\n }\n }\n\n return result;\n }",
"public void calculateCost(){\n if(this.isChair){\n for(int i = 0; i < this.chairs.length; i++){\n this.cost += this.chairs[i].getPrice();\n }\n }\n //if furniture type is chair, add up cost of all items in list\n if(this.isDesk){\n for(int i = 0; i < this.desks.length; i++){\n this.cost += this.desks[i].getPrice();\n }\n }\n //if furniture type is chair, add up cost of all items in list\n if(this.isFiling){\n for(int i = 0; i < this.filingCabinets.length; i++){\n this.cost += this.filingCabinets[i].getPrice();\n }\n }\n //if furniture type is chair, add up cost of all items in list\n if(this.isLamp){\n for(int i = 0; i < this.lamps.length; i++){\n this.cost += this.lamps[i].getPrice();\n }\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent resultIntent) {\n super.onActivityResult(requestCode, resultCode, resultIntent);\n if (requestCode == 1) {\n if (resultCode == Activity.RESULT_OK) {\n int price = resultIntent.getIntExtra(\"Price\", Integer.MAX_VALUE);\n if (playerStats.getPlayerCash() - price >= 0) {\n this.playerStats.subtractPlayerCash(price);\n this.masterDeck.unlockCard(resultIntent.getStringExtra(\"Name\"));\n this.adapter.notifyItemChanged(resultIntent.getIntExtra(\"Position\", -1));\n showCash();\n showCardStats();\n } else {\n Toast.makeText(CardLibraryActivity.this, \"Not enough minerals.\", Toast.LENGTH_SHORT).show();\n }\n }\n }\n }",
"public int getCardValue(int card) {\n\t\tint result = card;\n\t\tswitch (card) {\n\t\tcase 11:\n\t\tcase 12:\n\t\tcase 13:\n\t\t\tresult = 10;\n\t\t}\n\t\treturn result;\n\t}",
"public int compareTo(Card c){\n\t\tint answer = 0;\n\t\tif (this.value<c.value){\n\t\t\tanswer=-1;\n\t\t}\n\t\tif (this.value>c.value){\n\t\t\tanswer=1; \n\t\t}\n\t\t\n\t\t//if tie, resolve by suit\n\t\tif (this.value==c.value){\n\t\t\tif(this.suit<c.suit){\n\t\t\t\tanswer =-1; \t\t\t\t\n\t\t\t}\n\t\t\tif(this.suit>c.suit){\n\t\t\t\tanswer = 1; \n\t\t\t}\n\t\t}\n\t\treturn answer; \n\n\t}",
"@Then(\"^user selects and validates credit cards$\")\r\n\t public void selctcardstocompareandValidate(DataTable table) {\r\n\t\t try {\r\n\t\t WebElement ele;\r\n\t\t List<Map<String, String>> ccards = table.asMaps(String.class, String.class);\r\n\t String cc1 = ccards.get(0).get(\"card1\");\r\n\t String cc2 = ccards.get(0).get(\"card2\");\r\n\t \r\n\t\t//selecting card1\r\n\t ele=dbsdriver.findElement(By.xpath(\"//div[text()='\"+cc1+\"']/../../..//div[text()='Compare']/..//div\"));\r\n\t\t((JavascriptExecutor) dbsdriver).executeScript(\"arguments[0].scrollIntoView(true);\", ele);\r\n\t\twait.until(ExpectedConditions.elementToBeClickable(ele));\r\n\t\t((JavascriptExecutor) dbsdriver).executeScript(\"arguments[0].click();\",ele );\r\n\t\tThread.sleep(2500);\t\r\n\t\t\r\n\t\t//selecting card2\r\n\t\tele=dbsdriver.findElement(By.xpath(\"//div[text()='\"+cc2+\"']/../../..//div[text()='Compare']/..//div\"));\r\n\t\t((JavascriptExecutor) dbsdriver).executeScript(\"arguments[0].scrollIntoView(true);\", ele);\r\n\t\t((JavascriptExecutor) dbsdriver).executeScript(\"arguments[0].click();\", ele);\r\n\t\t\r\n\t\t//click on compare button\r\n\t\tdbsdriver.findElement(By.xpath(\"//button[@id='cardCompareBtn']\")).click();\r\n\t\ttest.log(LogStatus.PASS, \"user selected cards and clicked on compare button\");\r\n\t\t//validate the data displayed for each card for comparison\r\n\t\tcreditcardspage.validatecredicarddata(table);\r\n\t\t } catch (Exception e) {\r\n\t\t\t test.log(LogStatus.FAIL, e);\r\n\t\t\tcreditcardspage.aborttest(e+\"\");\r\n\t\t}\r\n\t }",
"public boolean isApplicable(DevelopmentCard card) {\n\t\treturn (this.familyMember.getActionValue()\n\t\t\t\t+ this.getPlayer().getBonuses().getActivationVariation(card.getCardType())\n\t\t\t\t+ paidServants >= card.getActivationCost());\n\t}",
"public void playGame(){\n for(int i = 0; i<2; i++) {\n userCards.add(dealCards());\n computerCards.add(dealCards());\n }\n while(!isGameOver) {\n userScore = calculateScore(userCards);\n computerScore = calculateScore(computerCards);\n\n System.out.println(\"your cards: \" + userCards + \", current score: \" + userScore);\n System.out.println(\"Computer's first card: \" + computerCards.get(0));\n\n if (userScore == 0 || computerScore == 0 || userScore > 21) {\n isGameOver = true;\n }else{\n System.out.print(\"Type 'y' to get another card, type 'n' to pass: \");\n userInput = scanUserInput.nextLine();\n if(userInput.equalsIgnoreCase(\"y\")){\n userCards.add(dealCards());\n } else{\n isGameOver = true;\n }\n }\n }\n\n //computer turn if user opts to not draw another card\n while(computerScore !=0 && computerScore <17){\n computerCards.add(dealCards());\n computerScore = calculateScore(computerCards);\n }\n\n System.out.println(\"Your final hand: \"+ userCards+\", final score: \"+ userScore);\n System.out.println(\"Computer's final hand: \"+computerCards+\", final score: \"+computerScore);\n System.out.println(compareScore(userScore, computerScore));\n\n Scanner scanUserInput = new Scanner(System.in);\n System.out.print(\"Do you want to play a game of Blackjack? Type 'y' or 'n': \");\n String userInput = scanUserInput.nextLine();\n if(userInput.equalsIgnoreCase(\"y\")){\n new BlackJack().playGame();\n }\n }",
"public static void main(String[] args) {\n\n String input = \"Pants\";\n int balance = 100;\n\n if (input.equals(\"Blanket\") || input.equals(\"Charger\") ||\n input.equals(\"Hat\") || input.equals(\"Headphones\") ||\n input.equals(\"Pants\") || input.equals(\"Pillow\") ||\n input.equals(\"Socks\") || input.equals(\"USB cable\")) {\n if (input.equals(\"Blanket\")) {\n balance -= 60;\n } else if (input.equals(\"Charger\")) {\n balance -= 15;\n } else if (input.equals(\"Hat\")) {\n balance -= 25;\n } else if (input.equals(\"Headphones\")) {\n balance -= 30;\n } else if (input.equals(\"Pants\")) {\n balance -= 50;\n } else if (input.equals(\"Pillow\")) {\n balance -= 40;\n } else if (input.equals(\"Socks\")) {\n balance -= 5;\n } else if (input.equals(\"USB cable\")) {\n balance -= 10;\n }\n System.out.println(\"Thank you for your purchase! \");\n System.out.print(\"Your current balance is: \" + balance + \"$\");\n } else if (input.equals(\"Laptop\") || input.equals(\"Smartphone\")) {\n System.out.println(\"Sorry, not enough funds on your gift card!\");\n } else {\n System.out.println(\"Invalid item!\");\n }\n }",
"public static void checkBlackjack()\n\t{\n\t\tint result=resultBlackjack();\n\t\tif(result==1)\n\t\t{\n\t\t\tcurrentVal.setText(\"Blackjack!\");\n\t\t\tdealerVal.setText(String.valueOf(calculateHand(dealersCards)));\n\t\t\tbet*=2;\n\t\t\tfor(int i=1;i<dealersCards.size();i++)\n\t\t\t\tdealerCardImg[i].setIcon(new ImageIcon(Gameplay.class.getResource(getCard(dealersCards.get(i)))));\n\t\t\twin();\n\t\t\tlblUpdate.setText(\"Blackjack! You win twice your bet!\");\n\t\t\tclearHands();\n\t\t\tbetting();\n\t\t}\n\t\telse if(result==2)\n\t\t{\n\t\t\tdealerVal.setText(\"Blackjack!\");\n\t\t\tfor(int i=1;i<dealersCards.size();i++)\n\t\t\t\tdealerCardImg[i].setIcon(new ImageIcon(Gameplay.class.getResource(getCard(dealersCards.get(i)))));\n\t\t\tlose();\n\t\t\tlblUpdate.setText(\"Dealer got a blackjack. You automatically lose.\");\n\t\t\tclearHands();\n\t\t\tbetting();\n\t\t}\n\t\telse if(result==3)\n\t\t{\n\t\t\tdealerVal.setText(\"Blackjack!\");\n\t\t\tcurrentVal.setText(\"Blackjack!\");\n\t\t\tlblUpdate.setText(\"You and the dealer got blackjacks! No money exchanges hands.\");\n\t\t\tfor(int i=1;i<dealersCards.size();i++)\n\t\t\t\tdealerCardImg[i].setIcon(new ImageIcon(Gameplay.class.getResource(getCard(dealersCards.get(i)))));\n\t\t\tpush();\n\t\t\tclearHands();\n\t\t\tbetting();\n\t\t}\n\t}",
"public double getCost() {\n\t\t\n\t\tdouble cost = 0;\n\t\t\n\t\tif (Objects.equals(Size, \"small\"))\n\t\t\tcost = 7.00;\n\t\telse if (Objects.equals(Size, \"medium\"))\n\t\t\tcost = 9.00;\n\t\telse if (Objects.equals(Size, \"large\"))\n\t\t\tcost = 11.00;\n\t\t\n\t\tcost += (Cheese - 1)*1.50;\n\t\tcost += Ham*1.50;\n\t\tcost += Pepperoni*1.50;\n\t\t\n\t\treturn cost;\t\t\n\t}",
"public int askWhatPermitCards(List<PermitCard> cards);",
"private void checkBuyCard(PropertyCard card) {\n\t\tboolean almostComplete = checkCollection(this, card);\n\t\tif(almostComplete) {\n\t\t\tboolean boughtCard = buyCard(card);\n\t\t\tif(!boughtCard) {\n\t\t\t\tboolean madeChanges = checkPayment(card.getPrice());\n\t\t\t\tif(madeChanges) {\n\t\t\t\t\tbuyCard(card);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tboolean opponentAlmostComplete = false;\n\t\t\tfor(Player p: getPlayers()) {\n\t\t\t\tif(checkCollection(p,card)) {\n\t\t\t\t\topponentAlmostComplete = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(opponentAlmostComplete) {\n\t\t\t\tbuyCard(card);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif(getMoney()-card.getPrice()>=100) {\n\t\t\t\t\tbuyCard(card);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public double calcCost() {\n if (pizzaSize.equals(\"small\")) {\n return 10.0 + ((cheeseToppings + pepperoniToppings + veggieToppings) * 2);\n\n }\n else if (pizzaSize.equals(\"medium\")) {\n return 12.0 + ((cheeseToppings + pepperoniToppings + veggieToppings) * 2);\n }\n else {\n return 14.0 + ((cheeseToppings + pepperoniToppings + veggieToppings) * 2);\n }\n }",
"public int compareTo(Card card) {\n\t\tint thisRank = this.rank;\n\t\tint cardRank = card.rank;\n\n\t\tif(thisRank == 0 || thisRank == 1) \n\t\t\tthisRank +=13;\n\t\tif(cardRank == 0 || cardRank == 1) \n\t\t\tcardRank+=13;\n\t\tif(thisRank < cardRank)\n\t\t\treturn -1;\n\t\telse if(thisRank > cardRank)\n\t\t\treturn 1;\n\t\telse {\n\t\t\tif(this.getSuit() > card.getSuit())\n\t\t\t\treturn 1;\n\t\t\telse if(this.getSuit() < card.getSuit())\n\t\t\t\treturn -1;\n\t\t\telse \n\t\t\t\treturn 0;\n\t\t}\n\t}",
"public static boolean isValid(String _card){\r\n\t\t//communication with sumOfDoubleEvenPlace() and sumOfOddPlace()\r\n\t\tsumOfDoubleEvenPlace(_card);\r\n\t\tsumOfOddPlace(_card);\r\n\t\tgetCompany(_card);\r\n\t\tString _errorLength = \"Invalid number of digits.\";\r\n\t\tString _errorInvalid = \"Invalid credit card number.\";\r\n\t\t\r\n\t\t//condition for valid credit card.\r\n\t\tif((getCompany(_card) != _errorInvalid) && (getCompany(_card) != _errorLength)){\r\n\t\t\tif((sumOfDoubleEvenPlace(_card) + sumOfOddPlace(_card) != 0)){\t//if user enters all zeroes\r\n\t\t\t\tif ((sumOfDoubleEvenPlace(_card) + sumOfOddPlace(_card)) % 10 == 0 ){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\t\r\n\t}",
"@Override\r\n\tpublic int cost() {\n\t\treturn b1.cost() + 1;\r\n\t}",
"private void checkCardMatch(Card card1, Card card2) {\n if(card1.getColor().getColor() == card2.getColor().getColor()){\n card1.setCardState(CardState.MATCHED);\n card2.setCardState(CardState.MATCHED);\n\n playerManager.incrementScore();\n } else{\n card1.flipCard();\n card2.flipCard();\n }\n cardsClicked = new Card[2];\n switchPlayer();\n setRandomColors();\n checkGameOver();\n }",
"public String returnBoxCost(double cardGradeCost, String colourOption, String reinfBotOption, \n\t\t\tString reinfCornOption, String sealOption){\n\t\tdouble colOptPercent = 0.00;\n\t\tdouble reinfPercent = 0.00;\n\t\tdouble sealPercent = 0.00;\n\t\t\n\t\tif(colourOption.equals(\"2\")){\n\t\t\tcolOptPercent = 15.00;\n\t\t}else if(colourOption.equals(\"1\")){\n\t\t\tcolOptPercent = 12.00;\n\t\t}else{\n\t\t\tcolOptPercent = 0.00;\n\t\t}\n\t\t\n\t\tif((reinfBotOption.equals(\"true\")) && (reinfCornOption.equals(\"true\"))){\n\t\t\treinfPercent = 17.00;\n\t\t}else if((reinfBotOption.equals(\"true\")) && (reinfCornOption.equals(\"false\"))){\n\t\t\treinfPercent = 10.00;\n\t\t}else if((reinfBotOption.equals(\"false\")) && (reinfCornOption.equals(\"true\"))){\n\t\t\treinfPercent = 7.00;\n\t\t}else if((reinfBotOption.equals(\"true\")) && (reinfCornOption.equals(\"select\"))){\n\t\t\treinfPercent = 10.00;\n\t\t}else if((reinfBotOption.equals(\"select\")) && (reinfCornOption.equals(\"false\"))){\n\t\t\treinfPercent = 7.00;\n\t\t}else{\n\t\t\treinfPercent = 0.00;\n\t\t}\n\t\t\n\t\tif(sealOption.equals(\"true\")){\n\t\t\tsealPercent = 5.00;\n\t\t}else if(sealOption.equals(\"false\")){\n\t\t\tsealPercent = 0.00;\n\t\t}else{\n\t\t\tsealPercent = 0.00;\n\t\t}\n\t\t\n\t\tdouble sum = cardGradeCost+((cardGradeCost*colOptPercent)/100) + ((cardGradeCost*reinfPercent)/100)\n\t\t\t\t+ ((cardGradeCost*sealPercent)/100); \n\t\n\t\tDecimalFormat df = new DecimalFormat(\"##.##\");\t\n\t\treturn df.format(sum);\n\t}",
"public void Execution() {\n //Inspector specifies that a new inspection may be started.\n control.startInspection();\n \n //Inspector instructs program to close garage door.\n control.closeDoor();\n \n //Inspector enters vehicle’s license number.\n RegNoDTO regNo = input();\n \n //Get the regNo's cost. \n getCost(regNo);\n \n\n boolean isCash = false;\n int cash = 0;\n \n boolean input= true;\n while(input==true){ \n scanPaymentMethod = new Scanner (System.in);\n \n System.out.println(\"choose weather u r going to pay by cash or card by typing (cash) or (card)\");\n String userPaymentChoice =scanPaymentMethod.nextLine();\n switch (userPaymentChoice) {\n case \"cash\":\n isCash=true;\n input=false;\n \n break;\n case \"card\":\n isCash=false;\n input=false;\n \n break;\n default:\n System.out.println(\"you should enter cash or card!\");\n \n break;\n }\n }\n try{\n while(cash>0){\n System.out.println(\"the amount of cash u have in your card or in ur hand (doesnot matter for the moment)\");\n cash = scanPaymentMethod.nextInt();\n }\n }\n catch (Exception e){\n System.out.println(\"please enter the word (cash) or the word (card)\");\n System.out.println(\"please as well make sure the amount of money is numbers\");\n }\n \n \n \n \n \n System.out.println(\"your balance is: \" + control.Paying(isCash, cash,regNo));\n \n \n \n \n \n \n //add Oberver\n control.addObserver(inspectionStats);\n \n //Inspector performs the specified inspection.\n inspect(regNo);\n \n }",
"@Test\n\tpublic void testDeductMoney() {\n\t\tcard.addMoney(500);\n\t\tcard.deductMoney(200);\n\t\tassertEquals(400.0, card.getBalance());\n\t}",
"public static void main(String[] args) {\n Scanner leer = new Scanner(System.in);\r\n \r\n System.out.println(\"Ingrese #Cuenta del cliente A: \");\r\n cuentaA = parseInt(leer.nextLine());\r\n System.out.println(\"Ingrese #Cuenta del cliente B: \");\r\n cuentaB = parseInt(leer.nextLine());\r\n System.out.println(\"Ingrese monto a trasferir: \");\r\n monto = parseInt(leer.nextLine());\r\n System.out.println(\"Ingrese el banco de destino: \"); \r\n banco = leer.nextLine();\r\n \r\n\r\n if((cuentaA==cuentaCliente)&&(banco==bancoCliente)&&(saldoCliente>monto)&&(saldoCliente>costoTransaccion)&&(hora>=9 && hora <=12)||(hora>=15&&hora <=20))//comprobar cuentas\r\n {\r\n if((cuentaB==cuentaDestino))\r\n {\r\n costoTransaccion = 100;\r\n }\r\n else\r\n {\r\n costoTransaccion = 0;\r\n }\r\n aprobado=true;\r\n montoTransaccion = monto;\r\n System.out.println(\"Transaccion de: \"+montoTransaccion+ \" exitosa\"+\" Costo de transaccion: \"+costoTransaccion+ \"\");\r\n System.out.println(\"Saldo anterior del cliente: \"+saldoCliente+\"\\n\"+\"Saldo Actual del cliente: \"+(saldoCliente - costoTransaccion));\r\n }\r\n }",
"public int getCost(Tile<T> n1, Tile<T> n2);",
"@Override\n\tpublic double cost() {\n\t\treturn Double.parseDouble(rateOfLatte);\n\t}",
"public int compareTo(Card c){\n if(rank == c.rank){\n if(suit == c.suit){\n return 0;\n }\n else if(suit > c.suit){\n return 1;\n }\n else{\n return -1;\n }\n }\n else{\n if(rank == c.rank){\n return 0;\n }\n else if(rank > c.rank){\n return 1;\n }\n else{\n return -1;\n }\n }\n \n\t}",
"@Test\n public void TestBCABBACBCB() {\n HashMap<Character, Product> productList = new HashMap<Character, Product>();\n Product product = new Product('A', 20, 2, 1);\n productList.put(product.getName(), product);\n\n product = new Product('B', 50, 5, 3);\n productList.put(product.getName(), product);\n\n product = new Product('C', 30, 3, 2);\n productList.put(product.getName(), product);\n\n com.jama.domain.Supermarket supermarket = new com.jama.domain.Supermarket(productList);\n\n try {\n int totalPrice = supermarket.checkout(\"BCABBACBCB\");\n assertEquals(\"Total prices are not equal.\", new Integer(230), new Integer(totalPrice));\n }\n catch (Exception e)\n {\n fail(e.getMessage());\n }\n }",
"public boolean spendCash(int cost){\n if(cost > mCash){\n return false;\n }\n mCash -= cost;\n return true;\n }",
"CarPaymentMethod processCreditCard();"
] | [
"0.639418",
"0.62933695",
"0.61456436",
"0.6117914",
"0.60307556",
"0.59586734",
"0.5926095",
"0.59154165",
"0.5864304",
"0.58623606",
"0.58492756",
"0.5833679",
"0.57743514",
"0.57705265",
"0.572438",
"0.56969744",
"0.56933963",
"0.56729835",
"0.56729835",
"0.56729835",
"0.56704056",
"0.5660988",
"0.563241",
"0.563241",
"0.5631592",
"0.56174046",
"0.56031656",
"0.55923206",
"0.5583879",
"0.5565442",
"0.55638874",
"0.55572915",
"0.55469716",
"0.5531211",
"0.55242246",
"0.5508523",
"0.54967374",
"0.54750717",
"0.546953",
"0.546924",
"0.54568905",
"0.54550695",
"0.5453718",
"0.5452606",
"0.5446724",
"0.5444462",
"0.5444341",
"0.54437065",
"0.54416215",
"0.5437639",
"0.54283434",
"0.5424332",
"0.5416797",
"0.541183",
"0.5405975",
"0.54030675",
"0.54003704",
"0.5399391",
"0.5398679",
"0.53910375",
"0.53877085",
"0.53795373",
"0.53662837",
"0.53662527",
"0.5360077",
"0.53492707",
"0.53472453",
"0.5346064",
"0.53430504",
"0.53373235",
"0.53305435",
"0.5326235",
"0.53247666",
"0.53181726",
"0.53170836",
"0.5309182",
"0.53032076",
"0.53001547",
"0.5289151",
"0.52857673",
"0.5282017",
"0.52744323",
"0.5269503",
"0.5266513",
"0.5262305",
"0.52586424",
"0.5257644",
"0.5255485",
"0.5254839",
"0.5250221",
"0.52491206",
"0.52464205",
"0.52447045",
"0.5244501",
"0.5244267",
"0.5241119",
"0.5240301",
"0.5239327",
"0.5237157",
"0.52356493"
] | 0.59024954 | 8 |
overrides object's equals method comparing it to Card name instead | @Override
public boolean equals(Object other) {
if (null == other) {
return false;
}
if (this == other) {
return true;
}
if (!(other instanceof Card)) {
return false;
}
Card that = (Card) other;
return this.getName().equals(that.getName());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic boolean equals(Card anotherCard){\n\t\t\n\t}",
"@Override\n public boolean equals(Object otherObject) {\n if (this == otherObject) return true;\n if (!(otherObject instanceof Card)) return false;\n Card card = (Card) otherObject;\n return suit == card.suit &&\n rank == card.rank;\n }",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Card)) {\n return false;\n }\n Card other = (Card) object;\n if ((this.cardPK == null && other.cardPK != null) || (this.cardPK != null && !this.cardPK.equals(other.cardPK))) {\n return false;\n }\n return true;\n }",
"@Override\n public boolean equals(Object other) {\n if (other == this) {\n return true;\n }\n\n if (!(other instanceof Card)) {\n return false;\n }\n\n Card otherCard = (Card) other;\n return otherCard.getFrontFace().equals(getFrontFace())\n && otherCard.getBackFace().equals(getBackFace());\n }",
"@Override\r\n\tpublic boolean equals(Object card) {\r\n\t\tBlackjackCard c = (BlackjackCard)card;\r\n\t\treturn (this.suit == c.getSuit() && this.value == c.getValue());\r\n\t}",
"public boolean equals(Object obj){\r\n\t\tif(!(obj instanceof BaseballCard))\r\n\t\t\treturn false;\r\n\t\tBaseballCard compareable = (BaseballCard) obj;\r\n\t\t\r\n\t\treturn(this.getPrice()==(compareable.getPrice())&&this.getYear()==\r\n\t\t\t\t(compareable.getYear())&&this.getSizeX()==(compareable.getSizeX())\r\n\t\t\t\t&&this.getSizeY()==(compareable.getSizeY())&&this.getName()==\r\n\t\t\t\tcompareable.getName()&&this.getManufacturer()==compareable.getManufacturer());\r\n\t\t\r\n\t}",
"@Override\n public boolean equals(Object c)\n {\n boolean retVal = false;\n if( c instanceof Card) {\n Card temp = (Card) c;\n if ( temp.getValue().equals(this.value))\n retVal = true;\n }\n return retVal;\n }",
"@Override\n public boolean equals( Object obj ) {\n if (this == obj) {\n return true;\n }\n\n if (obj == null) {\n return false;\n }\n\n if (getClass() != obj.getClass()) {\n return false;\n }\n\n Deck other = (Deck)obj;\n // Due to the possibility of duplicates, deck comparison is a notch trickier.\n // Our approach is to count the cards in each deck then ensure that the cards\n // and counts are the same.\n return tally().equals(other.tally());\n }",
"public boolean equals(Card c)\n {\n if (rank == c.rank)\n return true;\n else\n return false;\n }",
"public boolean equals(Object object) {\n\n if (object == null || object.getClass() != this.getClass()) {\n return false;\n }\n\n Card other;\n other = (Card) object;\n\n return getRank() == other.getRank() && getSuit() == other.getSuit();\n }",
"@Override\n public boolean equals(Object other) {\n if (other == this) {\n return true;\n }\n\n // instanceof handles nulls\n if (!(other instanceof PersonCard)) {\n return false;\n }\n\n // state check\n PersonCard card = (PersonCard) other;\n return id.getText().equals(card.id.getText())\n && person.equals(card.person);\n }",
"@Override\n public boolean equals(Object object) {\n if (this == object) {\n return true;\n }\n if (object == null || getClass() != object.getClass()) {\n return false;\n }\n CardBalance that = (CardBalance) object;\n return Objects.equals(dollar, that.dollar)\n && Objects.equals(cent, that.cent);\n }",
"public boolean equals(Card other) {\n return this.compareTo(other) == 0;\n }",
"public boolean equals(Card OtherCard){\n\t\treturn (this.equals(OtherCard));\n\t}",
"@Override\n public boolean equals(Object other) {\n if (other == this) {\n return true;\n }\n\n // instanceof handles nulls\n if (!(other instanceof PersonCard)) {\n return false;\n }\n\n // state check\n PersonCard card = (PersonCard) other;\n return displayedIndex == card.getDisplayedIndex()\n && staff.equals(card.staff);\n }",
"public boolean equals(Card card){\n return (this.getCardValue() == card.getCardValue());\n }",
"@Override\n public boolean equals(Object other) {\n if (other == this) {\n return true;\n }\n\n // instanceof handles nulls\n if (!(other instanceof DateCard)) {\n return false;\n }\n\n // state check\n DateCard card = (DateCard) other;\n return id.getText().equals(card.id.getText())\n && date.equals(card.date);\n }",
"@Override\n public final boolean equals(final Object other) {\n return super.equals(other);\n }",
"@Override\n\tpublic boolean equals(Object obj) {\n\t\tif (this == obj)\n\t\t\treturn true;\n\t\t//check if object is null\n\t\tif (obj == null)\n\t\t\treturn false;\n\t\t//check if object is from difference class\n\t\tif (getClass() != obj.getClass())\n\t\t\treturn false;\n\t\t//check if name is different\n\t\tSport other = (Sport) obj;\n\t\tif (sport != other.sport)\n\t\t\treturn false;\n\t\treturn true;\n\t}",
"@Test\n\tpublic void testDeckEquals() {\n\t\t\n\t\tStandardDeckClass oneDeck = new StandardDeckClass();\n\t\tStandardDeckClass testDeck = new StandardDeckClass();\n\t\t\n\t\tboolean isSame = oneDeck.equals(testDeck);\n\t\t\n\t\tassertEquals(\"equals method not working as expected\", true, isSame);\n\t\t\n\t}",
"boolean similarCard(Card c);",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof CardDetail)) {\n return false;\n }\n CardDetail other = (CardDetail) object;\n if ((this.cardDetailPK == null && other.cardDetailPK != null) || (this.cardDetailPK != null && !this.cardDetailPK.equals(other.cardDetailPK))) {\n return false;\n }\n return true;\n }",
"@Override\n public boolean equals(Object other) {\n if (other == this) {\n return true;\n }\n\n // instanceof handles nulls\n if (!(other instanceof EventCard)) {\n return false;\n }\n\n // state check\n EventCard card = (EventCard) other;\n return id.getText().equals(card.id.getText())\n && event.equals(card.event);\n }",
"@Override\n public boolean equals(Object o){\n if (o == this) { //True if it's this instance\n return true;\n }\n if (!(o instanceof LeaderCard))\n return false;\n\n //Check if same values\n LeaderCard c = (LeaderCard) o;\n return this.getId() == c.getId() && this.getVictoryPoints() == c.getVictoryPoints() && this.getRequirement().equals(c.getRequirement()) &&\n this.getSpecialAbility().equals(c.getSpecialAbility()) && this.inGame == c.inGame;\n }",
"public boolean valueEquals(Card c) {\n return this.cardNum == c.cardNum;\n }",
"@Override\r\n public boolean equals(Account account) {\r\n \tif (account instanceof Savings) {\r\n \t\t \tif (super.stringEquals(super.getName(), account.getName()) == true) {\r\n \t\t \t\treturn true;\r\n \t\t \t}\r\n \t \t}\r\n \t \treturn false;\r\n }",
"@Override\n public final boolean equals( Object obj ) {\n return super.equals(obj);\n }",
"@Override\n public boolean equals(Object obj) {\n return this == obj;\n }",
"@Override\n public boolean equals(Object other) {\n if (other == this) {\n return true;\n }\n\n // instanceof handles nulls\n if (!(other instanceof QuestionCard)) {\n return false;\n }\n\n // state check\n QuestionCard card = (QuestionCard) other;\n return this.id.getText().equals(card.id.getText())\n && this.question.equals(card.question);\n }",
"@Override\n\tpublic boolean equals(Object obj) {\n if (obj == this) { \n return true; \n } \n // Check if obj is an instance of Position or not \n if (!(obj instanceof Player)) { \n return false; \n } \n // Type cast obj to \"Player\" so that we can compare the name & side attributes \n Player p = (Player) obj; \n return ( this.name == p.getName() && this.side == p.getSide() ); \n }",
"public boolean equals(Object other){\r\n Car nuCar = (Car)other;\r\n if(super.equals(nuCar)){\r\n if(this.model==nuCar.model&&this.AWD==nuCar.AWD){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }else{\r\n return false;\r\n }\r\n\t}",
"@Override\n public boolean equals(Object obj) {\n return super.equals(obj);\n }",
"public boolean betterEquals(Object obj)\n\t{\n\t\tif (obj instanceof Player)\n\t\t{\n\t\t\tPlayer other = (Player) obj;\n\t\t\treturn this.name.equals(other.name) && this.pawn == other.pawn;\n\t\t}\n\t\treturn false;\n\t}",
"@Override public boolean equals(Object object);",
"@Override\n public boolean equals(Object obj) {\n return this == obj;\n }",
"@Override\n public boolean equals(final Object obj) {\n return super.equals(obj);\n }",
"@Override\n\t\tpublic boolean equals(Object obj) {\n\t\t\treturn super.equals(obj);\n\t\t}",
"@Override\r\n public boolean equals(Object obj) {\r\n return super.equals(obj);\r\n }",
"@Override\r\n \tpublic boolean equals(final Object obj) {\r\n \t\t// Insert code to compare the receiver and obj here.\r\n \t\t// This implementation forwards the message to super. You may replace or supplement this.\r\n \t\t// NOTE: obj might be an instance of any class\r\n \t\treturn super.equals(obj);\r\n \t}",
"@Override\n public boolean equals(Object otherPlayer) {\n return otherPlayer != null && mName.contentEquals(((Player)otherPlayer).mName);\n }",
"@Override\n public boolean equals(Object other) \n {\n Student s = (Student)other; \n return this.name.equals(s.getName()) && this.id.equals(s.getId()); \n }",
"@Override\n public final boolean equals(Object obj) {\n return super.equals(obj);\n }",
"@Override\n public boolean equals(Object obj) {\n \n //TODO: Complete Method\n \n return true;\n }",
"@Override\n public boolean equals(Object obj) {\n return super.equals(obj);\n }",
"public static boolean sameCard(Card card1, Card card2){\r\n return (card1.rank == card2.rank && card1.suit == card2.suit);\r\n }",
"@Override\r\n\tpublic boolean equals(Object obj) {\n\t\treturn super.equals(obj);\r\n\t}",
"@Override\r\n\tpublic boolean equals(Object obj) {\n\t\treturn super.equals(obj);\r\n\t}",
"@Override\r\n\tpublic boolean equals(Object obj) {\n\t\treturn super.equals(obj);\r\n\t}",
"@Override\n public boolean equals(Object other) {\n return super.equals(other);\n }",
"public boolean equals(Card c) {\n if (this.getValue() == c.getValue() && this.getSuit() == c.getSuit())\n return true;\n return false;\n }",
"@Override\n public abstract boolean equals(Object obj);",
"@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n\n //jesli obiekt porownywany jest null\n //albo jesli kasy obiektow sa rozne\n //to nie ten sam obiekt\n if (o == null || getClass() != o.getClass()) return false;\n\n\n Car car = (Car) o;\n\n //jak juz powyzsze przeszlo to porownojemy wszystkie pole ktore chcemy\n //brac jako okreslajace nepowtarzalnosc naszego obiektu\n return maxSpeed == car.maxSpeed && //\n name.equals(car.name) && // zapis jednej lini w wielu\n engine.equals(car.engine); //\n }",
"@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn super.equals(obj);\n\t}",
"@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn super.equals(obj);\n\t}",
"@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn super.equals(obj);\n\t}",
"@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn super.equals(obj);\n\t}",
"@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn super.equals(obj);\n\t}",
"@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn super.equals(obj);\n\t}",
"public boolean equals(Object obj)\n {\n //first, make sure objects are equal at the base\n //which also handles null and type for person check\n boolean baseResult = super.equals(obj);\n if (!baseResult)\n {\n return false;\n }\n \n //next, make sure it's a commander, and not just any old person\n if (!(obj instanceof Commander))\n {\n return false;\n }\n \n //cast and compare specific properties for equality:\n Commander c = (Commander)obj;\n return (this.getSerialNumber().equals(c.getSerialNumber())\n && this.getRank().equals(c.getRank()));\n }",
"public boolean isEqual(Object objectname1, Object objectname2, Class<?> voClass) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean equals(Object obj){\n\t\treturn super.equals(obj);\n\t}",
"@Override\n boolean equals(Object obj);",
"@Override\n public boolean match(Card card) {\n if (card.getColor().equals(\"BLACK\"))\n return true;\n\n return (card.getColor().equals(this.getColor())\n || card.getValue().equals(this.getValue()));\n }",
"@Override\n public boolean equals(Object air) {\n if (!(air instanceof AirObject)) {\n return false;\n }\n return ((AirObject)air).getName().equals(this.getName());\n }",
"@Override\n\tpublic boolean equals(Object target) {\n\t\treturn name.equals(((Person)target).getName());\n\t}",
"@Test\n\tpublic void testDeckEqualsAgain() {\n\t\t\n\t\tStandardDeckClass oneDeck = new StandardDeckClass();\n\t\tVegasDeckClass testDeck = new VegasDeckClass();\n\t\t\n\t\tboolean isSame = oneDeck.equals(testDeck);\n\t\t\n\t\tassertEquals(\"equals method not working as expected\", false, isSame);\n\t}",
"@Override\n public abstract boolean equals(Object other);",
"@Override\n public abstract boolean equals(Object other);",
"@Override\n\tpublic abstract boolean equals(Object other);",
"public boolean equals(Object ob){\n return name.equals(((PhoneRecord)ob).getName());\n }",
"@Override\n public boolean equals(Object obj) {\n if (obj == this) {\n return true;\n }\n if (obj == null || obj.getClass() != getClass()) {\n return false;\n }\n Receipt receipt = (Receipt) obj;\n return receipt.getReceiptId().toString() == this.receiptId.toString()\n && receipt.getTimePlaced().compareTo(this.timePlaced) == 0\n && receipt.getCard() == this.card\n && receipt.getCart() == this.cart;\n }",
"@Override\n public boolean equals(Object other) {\n return this == other;\n }",
"@Override\r\n public boolean equals(Object o) {\r\n if (this == o) return true;\r\n if (o == null || getClass() != o.getClass()) return false;\r\n\r\n Player player = (Player) o;\r\n\r\n return name.equals(player.getName());\r\n }",
"@Override\n boolean equals(Object other);",
"@Override\n public boolean equals(Object other) {\n return other == this // short circuit if same object\n || (other instanceof Product // instanceof handles nulls\n && productName.equals(((Product) other).productName)); // state check\n }",
"@Override \n boolean equals(Object obj);",
"public abstract boolean equals(Object other);",
"@Override\n public boolean equals(Object o) {\n return this == o;\n }",
"@Override\n public boolean equals(Object other) {\n if (other.getClass() == getClass()) {\n return hashCode() == other.hashCode();\n }\n\n return false;\n }",
"public boolean equals(Object obj) {\r\n\t\tif (this == obj) return true;\r\n\t\tif (!(obj instanceof AlfClass)) return false;\r\n\t\tAlfClass other = (AlfClass) obj;\r\n\t\tif (this.name.equalsIgnoreCase(other.name))\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic boolean equals(Object obj) {\n\t\tChefVO chef = (ChefVO) obj;\r\n\t\t\r\n\t\tif(this == chef)\r\n\t\t\treturn true;\r\n\t\tif(this.getFirstName() != chef.getFirstName())\r\n\t\t\treturn false;\r\n\t\tif(this.getLastName() != chef.getLastName())\r\n\t\t\treturn false;\r\n\t\tif(!this.getColorApron().equals(chef.getColorApron()))\r\n\t\t\treturn false;\r\n\t\t\r\n\t\treturn true;\r\n\t}",
"@Override\n\tpublic boolean equals(Object obj) {\n\t\tif (obj == null) \n\t\t\treturn false;\n\t\t\n\t\tif (!(obj instanceof Player))\n\t\t\treturn false;\n\t\t\n\t\tPlayer other = (Player) obj;\n\t\t\n\t\treturn this.getName().equals(other.getName());\n\t}",
"@Override\r\n\tpublic boolean equals(Object ob){\n\t\tItem itemob=(Item)ob;\t//transfer object type to Item type\r\n\t\tif(this.UID==itemob.UID && this.TITLE==itemob.TITLE && this.NOOFCOPIES==itemob.NOOFCOPIES) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public boolean isEqual(MatchingCardsTile other){\n return this.getNumber() == other.getNumber();\n }",
"public boolean isEqual(Card card) {\n\t\treturn imageLink.equals(card.getURL());\n\t}",
"@Override\r\n\tpublic boolean equals(Object o) {\r\n\t\tif (o instanceof Seed) {\r\n\t\t\tSeed s = (Seed) o;\r\n\t\t\tCards cs1, cs2;\r\n\r\n\t\t\tif (this.size() != s.size()) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tfor (int i = 0; i < s.size(); i++) {\r\n\t\t\t\tcs1 = s.get(i);\r\n\t\t\t\tcs2 = this.get(i);\r\n\t\t\t\tif (cs1.getCardsType() != cs2.getCardsType()\r\n\t\t\t\t\t\t|| cs1.getCardsValue() != cs2.getCardsValue()) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}",
"@Override\n\tpublic boolean equalsEntity(ACLDriver object) {\n\t\treturn false;\n\t}",
"@Override\n public boolean equals(Object other) {\n if (this == other) {\n return true;\n }\n if (other == null || getClass() != other.getClass()) {\n return false;\n }\n StockItem<?> stockItem = (StockItem<?>) other;\n return product.equals(stockItem.product);\n }",
"@Override\n\tpublic final boolean equals(Object obj) {\n\t\tif (this == obj) {\n\t\t\treturn true;\n\t\t}\n\t\tif (obj == null) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!(obj instanceof DawsonBallotItem)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tDawsonBallotItem itemObj = (DawsonBallotItem) obj;\n\t\tif (this.choice.equalsIgnoreCase(itemObj.choice)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"@Override\n\t\tpublic boolean equals(final Object obj)\n\t\t{\n\t\t\tif (this == obj)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\tif (obj instanceof AbsorberInfo)\n\t\t\t{\n\t\t\t\treturn ((AbsorberInfo) obj).absorber == absorber;\n\t\t\t}\n\t\t\t\n\t\t\treturn false;\n\t\t}",
"@Override\n public abstract boolean equals(final Object o);",
"@Override\n public abstract boolean equals(final Object o);",
"@Override\n public boolean equals(Object o1) {\n return super.equals(o1);\n }",
"@Override\n\t\tpublic boolean equals(Object o)\n\t\t{\n\t\t\tif(o==null) return false;\n\t\t\tif(this==o) return true;\n\t\t\tif(this.getClass()!=o.getClass()) return false;\n\n\t\t\tChannel channel =(Channel)o;\n\t\t\treturn this.name.equals(channel.name);\n\t\t}",
"@Override\n public boolean equals(Object obj) {\n\n return id.equals(((BacInfo) obj).id);\n\n }",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Bd)) {\n return false;\n }\n Bd other = (Bd) object;\n if ((this.name == null && other.name != null) || (this.name != null && !this.name.equals(other.name))) {\n return false;\n }\n return true;\n }",
"public abstract boolean equals(Object o);",
"@Override\n public boolean equals(Object obj)\n {\n if (obj instanceof AbstractMorph)\n {\n AbstractMorph morph = (AbstractMorph) obj;\n\n return morph.name.equals(this.name);\n }\n\n return super.equals(obj);\n }",
"@Override\n boolean equals(Object o);",
"@Override\n\tpublic boolean equals(Object o) {\n\t\treturn super.equals(o);\n\t}"
] | [
"0.82124674",
"0.7662579",
"0.74975413",
"0.7322548",
"0.7221635",
"0.7213113",
"0.7137252",
"0.7116097",
"0.7090119",
"0.7069784",
"0.7065302",
"0.70243174",
"0.69689834",
"0.6944188",
"0.69272286",
"0.6843431",
"0.68383026",
"0.6804984",
"0.68016773",
"0.68004775",
"0.6796282",
"0.67863184",
"0.6775098",
"0.67614853",
"0.6755753",
"0.6744061",
"0.673458",
"0.67272335",
"0.67101014",
"0.6703895",
"0.66955394",
"0.66822034",
"0.66784114",
"0.6670552",
"0.66666454",
"0.6663289",
"0.6657805",
"0.6653973",
"0.66310275",
"0.662713",
"0.6626226",
"0.66199327",
"0.6618334",
"0.661441",
"0.66128695",
"0.6608713",
"0.6608713",
"0.6608713",
"0.6602943",
"0.65772235",
"0.6576052",
"0.6565656",
"0.6560669",
"0.6560669",
"0.6560669",
"0.6560669",
"0.6560669",
"0.6560669",
"0.6555104",
"0.655367",
"0.6530049",
"0.6525059",
"0.6522245",
"0.6507603",
"0.6507471",
"0.6496527",
"0.64918274",
"0.64918274",
"0.6488859",
"0.64859545",
"0.6481496",
"0.6456984",
"0.64537305",
"0.64518774",
"0.6444629",
"0.64396524",
"0.64357084",
"0.64142966",
"0.6385456",
"0.6375434",
"0.6373334",
"0.6354188",
"0.6353538",
"0.63534385",
"0.6345148",
"0.6336172",
"0.6335356",
"0.6323166",
"0.63229346",
"0.6319872",
"0.63191605",
"0.63191605",
"0.6318784",
"0.63104504",
"0.63087165",
"0.6308094",
"0.6300448",
"0.62928474",
"0.628723",
"0.62826395"
] | 0.83405316 | 0 |
overrides object's hashCode method | public int hashCode() {
int result = 6;
result = 31 * result * name.hashCode();
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t public int hashCode();",
"@Override\n int hashCode();",
"@Override\n public abstract int hashCode();",
"@Override\n public abstract int hashCode();",
"@Override\n public abstract int hashCode();",
"@Override\n public int hashCode();",
"@Override \n int hashCode();",
"@Override\r\n \tpublic int hashCode() {\r\n \t\t// Insert code to generate a hash code for the receiver here.\r\n \t\t// This implementation forwards the message to super. You may replace or supplement this.\r\n \t\t// NOTE: if two objects are equal (equals(Object) returns true) they must have the same hash code\r\n \t\treturn super.hashCode();\r\n \t}",
"public abstract int hashCode();",
"@Override\n\t\tpublic int hashCode()\n\t\t{\n\t\t\treturn super.hashCode(); //Default implementation; may need to bring in line to equals\n\t\t}",
"public int hashCode() { return super.hashCode(); }",
"@Override\r\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\r\n\t}",
"@Override\r\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\r\n\t}",
"@Override\r\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\r\n\t}",
"public final int hashCode() {\n return super.hashCode();\n }",
"public int hashCode();",
"public int hashCode();",
"public int hashCode();",
"public int hashCode();",
"public int hashCode() {\r\n \treturn super.hashCode();\r\n }",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"@Override\r\n public int hashCode() {\r\n return super.hashCode();\r\n }",
"@Override\n public int hashCode() {\n return super.hashCode();\n }",
"@Override\n public int hashCode() {\n return super.hashCode();\n }",
"@Override\n public int hashCode() {\n return super.hashCode();\n }",
"@Override\n public int hashCode() {\n return super.hashCode();\n }",
"public int hashCode() {\r\n\t return super.hashCode();\r\n\t}",
"@Override\n public final int hashCode() {\n return super.hashCode();\n }",
"public int hashCode()\n {\n return super.hashCode();\n }",
"@Override\n public int hashCode() {\n return super.hashCode();\n }",
"@Override\n public int hashCode()\n {\n return hashCode;\n }",
"int hashCode();",
"int hashCode();",
"@Override // com.google.common.base.Equivalence\n public int doHash(Object o) {\n return o.hashCode();\n }",
"public /*override*/ int GetHashCode() \r\n {\r\n return super.GetHashCode(); \r\n }",
"@Override\n public int hashCode() {\n return hashCode;\n }",
"public synchronized int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"@Override // com.google.common.base.Equivalence\n public int doHash(Object o) {\n return System.identityHashCode(o);\n }",
"public int hashCode() {\n return super.hashCode() ^ 0x1;\n }",
"@Override\n public int hashCode() {\n return hashcode;\n }",
"@Override\n public int hashCode() {\n return 1;\n }",
"@Override\n\tpublic int hashCode() { // NOPMD (forward hashcode)\n\t\treturn super.hashCode();\n\t}",
"@Override\n public int hashCode() {\n return this.getClass().hashCode();\n }",
"int\thashCode();",
"@Override\n public int hashCode() {\n return this.toString().hashCode();\n }",
"@Override\r\n public int hashCode() {\r\n return this.toString().hashCode();\r\n }",
"@Override\r\n\t\tpublic int hashCode() {\n\t\t\treturn 0;\r\n\t\t}",
"public int hashCode() {\n\t\treturn hash(objects); //return the hash code of the objects\n\t}",
"@Override\n public int hashCode() {\n return System.identityHashCode(this);\n }",
"@Override\n public int hashCode() { \n return this.toString().hashCode();\n }",
"@Override\n public int hashCode() {\n return System.identityHashCode(this);\n }",
"@Override\n public int hashCode() {\n return Objects.hash(this.getValue());\n }",
"@Override\r\n \tpublic int hashCode() {\n \t\treturn id.hashCode();\r\n \t}",
"protected abstract int hashOfObject(Object key);",
"@Override\n public int hashCode() {\n int hash = 7;\n hash = 29 * hash + Objects.hashCode(this.id);\n hash = 29 * hash + Objects.hashCode(this.name);\n return hash;\n }",
"@Override\n public int hashCode() {\n return this.id.hashCode();\n }",
"public int hashCode() {\n return Objects.hashCode(this);\n }",
"@Override\n public int hashCode() {\n return Objects.hash(id);\n }",
"@Override\n public int hashCode() {\n return 0;\n }",
"public int hashCode()\r\n/* 124: */ {\r\n/* 125:126 */ return this.id;\r\n/* 126: */ }",
"@Override\n public int hashCode() {\n return -63 * super.hashCode();\n }",
"@Override\n public int hashCode() {\n int result = 17;\n result = 31 * result + x + y;\n return result;\n }",
"public int hashCode() {\n/* 69 */ int var1 = super.hashCode();\n/* 70 */ var1 = 31 * var1 + this.allowedValues.hashCode();\n/* 71 */ return var1;\n/* */ }",
"@Override\n public int hashCode()\n {\n return this.value.hashCode();\n }",
"@Override\n\tpublic int hashCode() {\n\t\t\n\t\treturn (int)id * name.hashCode() * email.hashCode();\n\t\t//int hash = new HashCodeBuilder(17,37).append(id).append(name); //can be added from Apache Commons Lang's HashCodeBuilder class\n\t}",
"@Override\n public int hashCode() {\n return Objects.hash(name, type, id);\n }",
"@Override \r\n\tpublic int hashCode(){\r\n\t\treturn (new Double(this.getX()).hashCode()) + (new Double(this.getY()).hashCode());\r\n\t}",
"@Override\n public int hashCode() {\n return Long.hashCode(this.getId());\n }",
"@Override\n\t\tpublic int hashCode()\n\t\t{\n\t\t\treturn absorber.getObjectId();\n\t\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn Double.hashCode(getX()) + \n\t\t\t\tDouble.hashCode(getY()) * 971;\n\t}",
"@Override\n public int hashCode() {\n return toString().hashCode();\n }",
"@Override\n public int hashCode() {\n return toString().hashCode();\n }",
"@Override\r\n public int hashCode() {\r\n return jsObject.hashCode();\r\n }",
"@Override\n\tpublic int hashCode() {\n\t\treturn Objects.hashCode(super.hashCode(), getAmount(), getSize(), fluid);\n\t}",
"@Override\n public int hashCode() {\n return Double.valueOf(lat).hashCode() + Double.valueOf(lon).hashCode();\n }",
"@Override\r\n\t\t\t\tpublic int hashCode() {\r\n\t\t\t\t\t// Método hashcode aleatório projetado para ser geralmente único\r\n\t\t\t\t\treturn this.x + this.y * 256;\r\n\t\t\t\t}",
"@Override\r\n public int hashCode() {\r\n return (id != null) \r\n ? (this.getClass().hashCode() + id.hashCode()) \r\n : super.hashCode();\r\n }",
"@Override\n public int hashCode(){\n return 42;\n }",
"@Override\r\n\tpublic int hashCode()\r\n\t{\r\n\t\tint hash = 1;\r\n\t\thash = hash * Constants.HASH_PRIME + entityInterface.hashCode();\r\n\t\treturn hash;\r\n\t}",
"@Override\n public int hashCode() {\n return Objects.hash(color,id);\n }",
"@Override\n public int hashCode() {\n return this.data.hashCode();\n }",
"@Override\n public int hashCode() {\n return Objects.hash(myInt, myLong, myString, myBool, myOtherInt);\n }",
"public int hashCode() {\n\t\treturn src.hashCode() ^ dst.hashCode() ^ data_len ^ type ^ group ^ data.hashCode();\n\t}"
] | [
"0.86153233",
"0.8569667",
"0.8569554",
"0.8569554",
"0.8569554",
"0.85046935",
"0.8436218",
"0.83908755",
"0.8377985",
"0.83454835",
"0.8297275",
"0.8217672",
"0.8217672",
"0.8217672",
"0.81879854",
"0.81626034",
"0.81626034",
"0.81626034",
"0.81626034",
"0.8147919",
"0.8143593",
"0.8143593",
"0.8143593",
"0.8143593",
"0.8143593",
"0.8143593",
"0.8143593",
"0.8143593",
"0.8143593",
"0.8143593",
"0.81338817",
"0.8108006",
"0.8108006",
"0.8108006",
"0.8108006",
"0.8096691",
"0.80601305",
"0.80402225",
"0.80387175",
"0.8018125",
"0.8016208",
"0.8016208",
"0.80121136",
"0.7993652",
"0.7952381",
"0.7949688",
"0.7824846",
"0.7736471",
"0.7720293",
"0.77197146",
"0.7706416",
"0.7702227",
"0.76975906",
"0.7671491",
"0.7653438",
"0.76521105",
"0.7649976",
"0.76346046",
"0.76340693",
"0.76326966",
"0.7596791",
"0.7579128",
"0.75769055",
"0.75563",
"0.7535408",
"0.7535142",
"0.7515761",
"0.7512814",
"0.751248",
"0.75104916",
"0.75000435",
"0.7496469",
"0.7493011",
"0.7491783",
"0.7481092",
"0.7477367",
"0.7473931",
"0.74680096",
"0.7463389",
"0.7463389",
"0.7463389",
"0.7463389",
"0.7463389",
"0.7463389",
"0.7463389",
"0.7463389",
"0.7463389",
"0.7460263",
"0.7435474",
"0.7435474",
"0.7423449",
"0.7418773",
"0.7416951",
"0.7413757",
"0.74058497",
"0.740087",
"0.73925394",
"0.73889714",
"0.73817676",
"0.7379919",
"0.73758924"
] | 0.0 | -1 |
overrides object's toString method to return card name and cost | @Override
public String toString() {
return (getName() + " (" + getCost() + ")");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String toString() {\n\t\treturn \"\\nCard Name: \" + getName() +\n\t\t\t\t\"\\nMultiverse Id: \" + getMultiverseid() +\n\t\t\t\t\"\\nMana Cost: \" + getManaCost();\n\t}",
"public String toString() {\n // return \"Card {suit: \"+getSuitString()+\", rank: \"+getRankString()+\"}\";\n return \"{\"+getSuitString()+\",\"+getRankString()+\"}\";\n }",
"public String toString(){\r\n String output = \"\";\r\n //Display the name \r\n output += this.name;\r\n //Turn the cost int in cents to a string in dollars\r\n String totalcost = DessertShoppe.cents2dollarsAndCents(getCost());\r\n //Print out a space between the name and where the cost needs to be\r\n for (int i = this.name.length(); i < DessertShoppe.RECEIPT_WIDTH - totalcost.length(); i++){\r\n output+=\" \";\r\n }\r\n //Print outt he cost string with the dollar sign\r\n output += totalcost;\r\n return output;\r\n \r\n }",
"public String toString() {\n return \"The card has \" + this.balance + \" euros\";\n }",
"@Override\n public String toString() {\n CardValue cardValue = new CardValue(value).invoke();\n\n // Change the value to the actual name when printing out\n // the card.\n\n return cardValue.getValueName() + \" of \" + suit;\n }",
"public String toString()\n\t{\n\t\treturn (super.toString() + \" Weight: \" + weight + \" oz. Price: \" + cost());\n\t}",
"@Override\n public String toString() {\n\n //convert cents to dollars using cents2dollarsAndCents\n String output = DessertShoppe.cents2dollarsAndCents(this.getCost());\n //create string storing cost in a string \n String costLength = Integer.toString(this.getCost());\n //find spacing needed between name and cost in reciept by subtracting 30(total spaces) by \n //length of name and length of cost\n int spacing = 30 - super.getName().length() - costLength.length() - 1;\n //loop through an add a space each time up to \"spacing\" integer\n for (int i = 0; i < spacing; i++) {\n output = \" \" + output;\n }\n //return name of cookie along with cost along with the right format posting amount of pounds with cost per pound\n return this.weight + \" lbs. \" + \"@ $\" + DessertShoppe.cents2dollarsAndCents(this.pricePerLbs) + \" /lb.\\n\" + this.getName() + output;\n }",
"public String toString(){//method of return card number and balance\r\n return \"Card no:\" +number+\" has a balance of: \"+balance; \r\n }",
"public String toString(){\n String r = \"\";\n String s = \"\";\n switch(rank){\n case 1: r = \"Ace\"; break;\n case 2: r = \"Two\"; break;\n case 3: r = \"Three\"; break;\n case 4: r = \"Four\"; break;\n case 5: r = \"Five\"; break;\n case 6: r = \"Six\"; break;\n case 7: r = \"Seven\"; break;\n case 8: r = \"Eight\"; break;\n case 9: r = \"Nine\"; break;\n case 10: r = \"Ten\"; break;\n case 11: r = \"Jack\"; break; \n case 12: r = \"Queen\"; break;\n case 13: r = \"King\"; break;\n }\n \n switch(suit) {\n case 1: s = \" of Clubs\"; break;\n case 2: s = \" of Diamonds\"; break;\n case 3: s = \" of Hearts\"; break;\n case 4: s = \" of Spades\"; break;\n }\n return r + s; //returns the name of the card\n }",
"@Override\r\n public String toString(){\n StringBuilder displayCard = new StringBuilder();\r\n \r\n if(rank==11)\r\n {\r\n displayCard.append(\"Jack\");\r\n }\r\n else if(rank==12)\r\n {\r\n displayCard.append(\"Queen\");\r\n }\r\n else if(rank == 13)\r\n {\r\n displayCard.append(\"King\");\r\n }\r\n else if(rank==14)\r\n {\r\n displayCard.append(\"Ace\");\r\n }\r\n else\r\n {\r\n displayCard.append(rank);\r\n }\r\n displayCard.append(\" of \"); //setting the format of the output\r\n \r\n if(suit==0)\r\n {\r\n displayCard.append(\"Spades\");\r\n }\r\n else if(suit==1)\r\n {\r\n displayCard.append(\"Hearts\");\r\n }\r\n else if(suit==2)\r\n {\r\n displayCard.append(\"Clubs\");\r\n }\r\n else if(suit==3)\r\n {\r\n displayCard.append(\"Diamonds\");\r\n }\r\n //return the result of an entire cmombined string\r\n return displayCard.toString();\r\n }",
"public String toString(){\n String card = null; \n //clubs\n if(suit==1){\n \tcard = \"c\" + Integer.toString(value);\n }\n //diamonds\n if(suit==2){\n \tcard = \"d\" + Integer.toString(value);\n }\n //hearts\n if(suit==3){\n \tcard = \"h\" + Integer.toString(value);\n }\n //spades\n if(suit==4){\n \tcard = \"s\" + Integer.toString(value);\n }\n return card; \n\t}",
"@Override\n public String toString() {\n return \"Card{\"\n + \"frontInfo='\" + frontInfo\n + '\\''\n + \", backInfo='\" + backInfo\n + '\\''\n + \", startTime=\" + startTime\n + \", ID=\" + cardID\n + '}';\n }",
"public String toString() {\n if(this.getName()==null) {\n String output = String.format(\"%40.2f\\n\", this.getCost());\n return output;\n }else {\n String output = String.format(\"%-15s(IceCream)%15.2f\\n\\n%s(IceCream) calories:%.0f\\n\\n\",\n this.getName(),this.getCost(),this.getName(),this.getCalories());\n return output;\n /**\n * @return A string with the data from this class such as the name, cost, calories and formats the string by using the String.format method.\n */\n }\n\n }",
"@Override\n public String toString() {\n int width = DessertShoppe.RECEIPT_WIDTH; //get the width of the receipt\n int widthCand = width - (super.getName()).length(); //get the width of the candy receipt\n\n //get all of the information needed to output for the given candy\n String output = this.weight + \" lbs. @ $\" + DessertShoppe.cents2dollarsAndCents(this.pricePerLbs) + \" /lb. \\n\" + super.getName();\n String candCost = DessertShoppe.cents2dollarsAndCents(this.getCost()); //get the cost of the candy\n output += String.format(\"%\" + widthCand + \"s%n\", candCost); //format the line to fi properly to the receipt\n return output; //return the formatted output\n }",
"public String toString()\n {\n \tNumberFormat fmt = NumberFormat.getCurrencyInstance();\n \tString item;\n \tif (name.length() >= 8)\n \t\titem = name + \"\\t\";\n \telse\n \t\titem = name + \"\\t\\t\";\n \treturn (item + \" \" + fmt.format(price) + \"\\t \" + quantity \n \t\t\t+ \"\\t\\t\" + fmt.format(price*quantity));\n }",
"public String toString() {\r\n\t\treturn super.display() + \"\\n\" + listAllCards() + \r\n\t\t\t\t\"Purchased tickets: \\n\" + listAllTickets() +\r\n\t\t\t\t\"___________________________________________\";\r\n\t}",
"@Override\n public String toString(){\n return \"\" + item.name + \" \" + item.price + \" Coins\";\n }",
"@Override\r\n\tpublic String toString()\r\n\t{\r\n\t\treturn new String(\"Le prix:\"+this.cost+\", Le tpsRep: \"+this.tpsRep);\r\n\t}",
"public String toString() {\r\n\t\tString retVal = \"Description: \" + getDescription()+ \" Cost: \" + getCost() + \" Calories: \" + getCalories() ;\r\n\t\treturn retVal;\r\n\t}",
"public String toString()\n\t{\n\treturn\n\t\t\t//is the customer a student ? \"Yes, do it\" : \"No, do it\"\n\t\t\t\"CUSTOMER DETAILS: \" + this.name + \" age: \" + this.age + \" Student? \" + (this.isStudent ? \"Yes\" : \"No\")\n\t\t\t+ \"\\n\" + \n\t\t\t//returns the final price of the ticket using the get method\n\t\t\t//the String.format gives the decimal ccurrent format for currency\n\t\t\tString.format(\"TOTAL COST: $%1.2f\", cost())\n\t\t\t+ \"\\n\" + \n\t\t\t\"------------------------------------------------------------\";\n\t}",
"@Override\r\n\tpublic String toString() {\r\n\t\treturn name + \" (Deck, \" + cards.size() + \" cards)\";\r\n\t}",
"public String toString() {\n NumberFormat formatter = NumberFormat.getCurrencyInstance();\n return firstName + lastName + \"\\n\" + cardNum + \"\\n\" + email + \"\\n\" + formatter.format(accCreditLimit);\n }",
"public String toString() {\n String color = translateColor(card.getColor());\n StringBuilder build = new StringBuilder();\n build.append(color).append(\" \").append(color).append(card.getCardID()).append(color).append(\" \").append(Color.reset()).append(\"\\n\").append(color).append(\"╔════\").append(color).append(\"Level\").append(color).append(\"════╗\").append(Color.reset()).append(\"\\n\").append(color).append(\"║ \").append(color).append(card.getLevel()).append(color).append(\" ║\").append(Color.reset()).append(\"\\n\").append(color).append(\"╠════\").append(color).append(\"Cost\").append(color).append(\"═════╣\").append(Color.reset()).append(\"\\n\");\n for (Resource resource : card.getCost().keySet()) {\n build.append(color).append(\"║ \").append(CLI.colorResource(resource)).append(card.getCost().get(resource)).append(\" \").append(CLI.shapeResource(resource)).append(color).append(\" ║\").append(Color.reset()).append(\"\\n\");\n }\n build.append(color).append(\"╠═\").append(color).append(\"Production\").append(color).append(\"══╣\").append(Color.reset()).append(\"\\n\");\n for (Resource resource : card.getProductionPower().getConsumedResources().keySet()) {\n build.append(color).append(\"║ \").append(CLI.colorResource(resource)).append(card.getProductionPower().getConsumedResources().get(resource)).append(\" \").append(CLI.shapeResource(resource)).append(color).append(\" ║\").append(Color.reset()).append(\"\\n\");\n }\n if (card.getProductionPower().getRequiredResourceOfChoice() != 0) {\n build.append(color).append(\"║ \").append(color).append(+card.getProductionPower().getRequiredResourceOfChoice()).append(\" \").append(\"?\").append(color).append(\" ║\").append(Color.reset()).append(\"\\n\");\n }\n build.append(color).append(\"║ \").append(color).append(\"--->>> \").append(color).append(\" ║ \").append(Color.reset()).append(\"\\n\");\n for (Resource resource : card.getProductionPower().getProducedResources().keySet()) {\n build.append(color).append(\"║ \").append(CLI.colorResource(resource)).append(card.getProductionPower().getProducedResources().get(resource)).append(\" \").append(CLI.shapeResource(resource)).append(color).append(\" ║\").append(Color.reset()).append(\"\\n\");\n }\n if (card.getProductionPower().getFaithPointsProduced() != 0) {\n build.append(color).append(\"║ \").append(color).append(+card.getProductionPower().getFaithPointsProduced()).append(\" \").append(\"+\").append(color).append(\" ║\").append(Color.reset()).append(\"\\n\");\n }\n if (card.getProductionPower().getProducedResourceOfChoice() != 0) {\n build.append(color).append(\"║ \").append(color).append(+card.getProductionPower().getProducedResourceOfChoice()).append(\" \").append(\"?\").append(color).append(\" ║\").append(Color.reset()).append(\"\\n\");\n }\n\n\n build.append(color).append(\"╠═══\").append(color).append(\"VPoints\").append(color).append(\"═══╣\").append(Color.reset()).append(\"\\n\");\n if (card.getVictoryPoints() < 10) {\n build.append(color).append(\"║ \").append(color).append(card.getVictoryPoints()).append(color).append(\" ║\").append(Color.reset()).append(\"\\n\");\n } else\n build.append(color).append(\"║ \").append(color).append(card.getVictoryPoints()).append(color).append(\" ║\").append(Color.reset()).append(\"\\n\");\n build.append(color).append(\"╚════\").append(color).append(color).append(\"═════════╝\").append(Color.reset()).append(\"\\n\");\n build.append((color + \" \" + color + color + \" \" + Color.reset() + \"\\n\").repeat(5));\n return build.toString();\n }",
"@Override\n public String toString() {\n return name+\" : \"+ CommonUtils.formatCurrency(amount);\n }",
"@Override\n public String toString() {\n return \"Currency: \" + name + \" - Rate: \" + rate;\n }",
"public String toString(){\n\t\treturn \"Title: \" + title + \"\\nAuthor: \" + author + \"\\nSubject: \" + subject + \"\\nisbn: \" + \n\t\t\t\t\tisbn + String.format( \"\\nPrice: $%.2f\", cost );\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn String.format(\"%s: $%.2f\", name, price);\n\t}",
"@Override\n public String toString(){\n \n return String.format(\"%-8d%-10s%-10s%-10s %.2f\\t%-6b\", getCustNumber(), getFirstName(), getSurname(),\n getPhoneNum(), getCredit(), canRent);\n }",
"public String toString() {\r\n\t\t\r\n\t\tString cardSuit = \"\";\r\n\t\tString cardRank = \"\";\r\n\t\tString cardString = \"\";\r\n\t\t\r\n\t\t\r\n\t\tint cs = getSuit();\r\n\t\tint cr = getRank();\r\n\t\t\r\n\t\tswitch(cr) {\r\n\t\tcase 1:\r\n\t\t\tcardRank = \"ace\";\r\n\t\t\tbreak;\r\n\t\tcase 2: \r\n\t\t\tcardRank =\"2\";\r\n\t\t\tbreak;\r\n\t\tcase 3: \r\n\t\t\tcardRank =\"3\";\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tcardRank =\"4\";\r\n\t\t\tbreak;\r\n\t\tcase 5:\r\n\t\t\tcardRank =\"5\";\r\n\t\t\tbreak;\r\n\t\tcase 6:\r\n\t\t\tcardRank =\"6\";\r\n\t\t\tbreak;\r\n\t\tcase 7:\r\n\t\t\tcardRank =\"7\";\r\n\t\t\tbreak;\r\n\t\tcase 8:\r\n\t\t\tcardRank =\"8\";\r\n\t\t\tbreak;\r\n\t\tcase 9:\r\n\t\t\tcardRank =\"9\";\r\n\t\t\tbreak;\r\n\t\tcase 10:\r\n\t\t\tcardRank =\"10\";\r\n\t\t\tbreak;\r\n\t\tcase 11:\r\n\t\t\tcardRank =\"jack\";\r\n\t\t\tbreak;\r\n\t\tcase 12:\r\n\t\t\tcardRank =\"queen\";\r\n\t\t\tbreak;\r\n\t\tcase 13:\r\n\t\t\tcardRank =\"king\";\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tcardRank = \"n/a\";\r\n\t\t\t\r\n\t\t}//switch rank\r\n\t\t\r\n\t\t//got a string representation of the rank\r\n\t\t//now get a string representation of the siut\r\n\t\t\r\n\t\tswitch(cs) {\r\n\t\tcase 0:\r\n\t\t\tcardSuit = \"hearts\";\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t\tcardSuit = \"diamonds\";\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tcardSuit = \"clubs\";\r\n\t\t\tbreak; \r\n\t\tcase 3:\r\n\t\t\tcardSuit = \"spades\";\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tcardSuit = \"n/a\";\r\n\t\t\t\r\n\t\t}\r\n\t\tcardString = \"file:cards/\"+cardRank+\"_of_\"+cardSuit+\".png\";\r\n\t\t\r\n\t\treturn cardString;\r\n\t\t\r\n\t}",
"@Override\n public String toString (){\n return \"Party name is \" + this.partyName + \" total cost is \" + this.totalCost;\n }",
"@Override\n\tpublic String toString() {\n\t\treturn amount + \" \" + currency; \n\t}",
"@Override\n public String toString() {\n return \"\" + currency + amount;\n }",
"public String toString() {\n String cardListOutput = \"\";\n for (Card aCard : this.cards) {\n cardListOutput += aCard.toString() + \"\\n\";\n }\n return cardListOutput;\n }",
"@Override\n\tpublic String cardDetail() {\n\t\treturn atmCard.cardDetail();\n\t}",
"protected String printCard(){\r\n return ranks[rank] + \" of \" + suits[suit];\r\n }",
"@Override\n public String toString()\n {\n return super.toString() + \" \" + this.extended + \" \" + this.price + \n \" \" + this.number;\n }",
"public String toString()\r\n\t{\r\n\t\tString output = \" \";\r\n\t\tString specialModifier = \" \";\r\n\t\tif(this.isSpecial())\r\n\t\t{\r\n\t\t\tspecialModifier = \" *\";\r\n\t\t}\r\n\t\t\t\r\n\t\toutput = String.format(\"%-9s%-5s%-19s%s%.2f\",getType(), specialModifier, this.getName(),\"$ \", this.getPrice());\r\n\t\t//code to be done here\r\n\t\t\r\n\t\t\r\n\t\treturn output;\r\n\t}",
"public String toString() {\n if (inCatlog) {\n return name + \" \" + quantity + \" \" + price;\n }\n return name + \" \" + quantity;\n }",
"@Override\r\n public final String toString(){\n if(this.rank.equals(RANKS[0])){ \r\n\t\t\treturn \"no card\"; \r\n\t\t}\r\n\t\t\r\n int r = getRank();\r\n if( r >= 2 && r <= 14 ){\r\n return r + getSuit().substring(0,1);\r\n\t\t}\r\n return \"no card\";\r\n }",
"public String toString() {\n\t\treturn \"\\t\" + this.getName() + \" \" + this.getAmount();\n\t}",
"public String toString() {\n\t\treturn (customerName + \" has \" + balance + \" dollars.\");\n\t}",
"public String toString(){\r\n\t\t\r\n\t\tString result = \"\";\r\n\t\tfor (int i = 0; i < this.cardCount()-1; i++)\r\n\t\t\tresult += this.getCard(i).toString() + \", \";\r\n\t\t\r\n\t\treturn result + this.getCard(this.cardCount()-1).toString() + \" has Blackjack value \" + this.value();\r\n\t}",
"public String toString() {\n\t\treturn String.format(\"%-6s %-8s\", pileNum, numOfCards) + card.toString();\n\t}",
"public String toString() {\r\n\t\treturn name + \" @\" + worth; \r\n\t}",
"public String toString() {\n return \"\" + year + \" \" + make + \" \" + model + \", \" + color + \", \" + getTrans() + \", $\" + price;\n }",
"public String toString(){\n return \"Hand: \" + cards; \n }",
"public String toString() {\n if (this.errorFlag == true)\n return \"[INVALID CARD]\";\n else\n return this.value + \" of \" + suit.toString();\n }",
"@Override\n\tpublic String toString(){\n\t\treturn (printBuildingName(type) + \"(\" + printBuildingCost(cost) + \")\");\n\t\t\n\t}",
"@Override\n public String toString() {\n StringBuilder builder = new StringBuilder();\n builder.append(itemName + \" \" + price + \"kr \" + tax + \"% \");\n return builder.toString();\n }",
"public String toString() {\n final StringBuilder buffer = new StringBuilder() ;\n final DecimalFormat df = new DecimalFormat( \"#00.00\" ) ;\n\n buffer.append( StringUtil.rightPad( this.symbol, 20 ) ) ;\n buffer.append( StringUtil.leftPad( \"\" + getNumActiveCashUnits(), 5 ) ) ;\n buffer.append( StringUtil.leftPad( df.format( this.avgCashUnitPrice ), 10 ) ) ;\n buffer.append( StringUtil.leftPad( df.format( this.realizedProfit ), 10 ) ) ;\n buffer.append( StringUtil.leftPad( df.format( getUnRealizedCashProfit() ), 10 ) ) ;\n\n return buffer.toString() ;\n }",
"@Override\n public String toString() {\n return \"stock: \" + stock + \"\\n\" +\n \"cost: \" + itemPrice + \"\\n\";\n }",
"@Override\n public String toString() {\n return super.toString() +\n \"\\nChemical Name: \" + chemicalName +\n \"\\nHazards: \" + hazards +\n \"\\nPrecautions: \" + precautions +\n \"\\nFirst Aid: \" + firstAid +\n \"\\nUses: \" + uses;\n }",
"public String toString()\n\t{\n\t\treturn this.value+\" \"+this.currency;\n\t}",
"public String toString () {\r\n // write out amount of cash\r\n String stuffInWallet = \"The total amount of Bills in your wallet is: $\" + getAmountInBills() + \"\\n\" +\r\n \"The total amount of Coins in your wallet is: $\" + getAmountInCoins() + \"\\n\";\r\n\r\n // add in the charge (credit and debit) cards\r\n // for each element in the chargeCards list, calls its toString method\r\n for ( int i = 0; i < chargeCards.size(); i++ ) {\r\n stuffInWallet += chargeCards.get( i ) + \"\\n\";\r\n }\r\n\r\n for ( int i = 0; i < idCards.size(); i++ ) {\r\n stuffInWallet += idCards.get( i ) + \"\\n\";\r\n }\r\n\r\n return stuffInWallet;\r\n }",
"@Override\n\tpublic String toString() { // output\n\t\tString s = \"Flight #\" + getFlightNumber() + \" Cargo: \" + cargoCapacity\n\t\t\t\t+ \"/\" + getMaximumCapacity() + \" cu/ft. \" + +cargoWeight + \"/\"\n\t\t\t\t+ getMaximumWeight() + \" lbs.\";\n\t\ts += \" \\n CARGO DETAILS: \\n\";\n\t\tfor (int i = 0; i < getCargoInPlane().getSize(); i++) {\n\t\t\ts += \"\\t\" + getCargoInPlane().get(i) + \"\\n\";\n\t\t}\n\n\t\tif (getCargoInPlane().isEmpty()) {\n\t\t\ts += \"\\t\" + \"NO CARGO\"; // if nothing on plane\n\t\t}\n\t\treturn s; // the original string of all info\n\t}",
"public String displayCard()\n {\n card = \"\";\n \n switch(cardValue)\n {\n case 11:\n card+= \"J\";\n break;\n case 12:\n card+= \"Q\";\n break;\n case 13:\n card+= \"K\";\n break;\n case 14:\n card+= \"A\";\n break; \n default:\n card+= String.valueOf(cardValue); \n break;\n }\n \n switch(cardSuit){\n case 0:\n card+= \" of Clubs\";\n break;\n case 1:\n card+= \" of Diamonds\";\n break;\n case 2:\n card+= \" of Spades\";\n break;\n case 3:\n card+= \" of Hearts\";\n break;\n default:\n break;\n }\n \n return card;\n }",
"@Override\r\n\tpublic String toString() \r\n\t{\r\n\t\tif(totalCost>0)\r\n\t\t{\r\n\t\t\treturn \"Vendor Name : \"+vendorName+\"\\nAddress : \"+vendorAddress+\"\\nSource Location : \"+sourceLoc\r\n\t\t\t\t\t+\"\\nDestination Location : \"+destinationLoc+\"\\nTotal Cost is : \"+totalCost;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn \"Invalid data\";\r\n\t\t}\r\n\t}",
"public String toString() {\n return String.format(\"%s:%n\\t%-10s: %s%n\\t%-10s: %s%n\\t%-10s: $%.2f%n\\t%-10s: %s%n\\t%-10s: %s%n\", \n \"Boat\", \"Model\", getVehicleModel(), \"Color\", getVehicleColor(), \"Cost\", getVehicleCost(), \n \"Type\", getBoatType(), \"Made of\", getBoatConstruct());\n }",
"@Override\n public String toString(){\n return String.format(\"%s%s%s%n%s%s%n \",super.toString(),\"The taxes is \",calcTaxes(),\n \"The total cost is \",calcCost());\n }",
"public String toString()\r\n {\r\n StringBuilder sBuilder = new StringBuilder();\r\n sBuilder.append(\"Hand: \");\r\n sBuilder.append(\"\\n\");\r\n if (numCards == 0)\r\n {\r\n sBuilder.append(\"Out of Cards\");\r\n return sBuilder.toString();\r\n }\r\n for (int i = 0; i < numCards; i++)\r\n {\r\n if (myCards[i] != null)\r\n {\r\n if (i != numCards - 1)\r\n {\r\n if ((i + 1) % 10 == 0 && i != 0)\r\n {\r\n sBuilder.append(myCards[i].toString());\r\n sBuilder.append(\"\\n\");\r\n } else\r\n {\r\n {\r\n sBuilder.append(myCards[i].toString());\r\n sBuilder.append(\", \");\r\n }\r\n }\r\n\r\n } else\r\n {\r\n sBuilder.append(myCards[i].toString());\r\n }\r\n }\r\n }\r\n return sBuilder.toString();\r\n }",
"@Override\n\tpublic String toString() {\n\t\treturn description + \", \" + billAmount + \", \" + tipAmount + \", \" + totalAmount;\n\t}",
"public String toString() {\n\t\treturn \"This Airplane is manufactured by \" + this.brand +\". It costs \" + this.price + \"$ and its horse power is \" + this.horsePower + \".\";\n\t}",
"public String toString() {\r\n return \"Car with registration number: \" + super.toString();\r\n }",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder(rank.toString());\n sb.append(\" \");\n sb.append(suit.toString());\n\n return sb.toString();\n }",
"@Override\n public String toString(){\n String printString = profile.toString();\n printString = printString + \"Payment $\";\n printString = printString + payDue;\n return printString;\n }",
"@Override // Inherited from the Object class.\n public String toString() {\n return \"gear: \" + gear + \" cadence: \" + cadence + \" speed: \" + speed +\n \" name: \" + name;\n }",
"public String toString() {\n return getName() + \", \" + getAuthor() + \", \" + getPrice();\n }",
"public String toString(){\n return super.toString() +\n \"\\n\\tStock Price: $\" + currentStockPrice;\n }",
"@Override\r\n\tpublic String toString() {\r\n\t\treturn (\"Suit: \"+this.suit+\"\\nValue: \"+this.value);\r\n\t}",
"public String toString()\n {\n return value + \" \" + suit;\n }",
"@Override\r\n public String toString() {\r\n\r\n int num = 1;\r\n String output = String.format(\"Player Name: %s%n%nCurrent \"\r\n + \"Card Ranks:%n\", getName());\r\n for (Card x : currentCards) {\r\n output += String.format(\"%d. %s%n\", num, x.getRank().name());\r\n num++;\r\n\r\n }\r\n return output;\r\n }",
"@Override\n public String toString(){\n return (this.name + \" \" + this.score);\n }",
"public String toString(){\n return getName() + getDetails() + getPhone();\n }",
"public String cardDisplay(){\n if(this.faceDown) {\n return \"Bicycle\";}\n else{ return \"Friendly Names of: \" + this.rank + \":\"+this.suit;\n\n }\n }",
"public String toString() {\n return \"The \" + value + \" of \" + suit;\n }",
"public String toString() {\r\n return \"Product: \" + this.product + \", Amount: \" + this.amount;\r\n }",
"@Override\n public String toString() {\n return \"Car \" + this.id + \". Size : \" + this.size\n + \".\\nOrientation :\" + this.orientation\n + \". Current position : \" + this.currentPosition;\n }",
"public String toString()\r\n {\r\n return super.toString() + \"\\nPrice: $\" + this.pizzaPrice();\r\n }",
"public String toString()\n\t{\n\t\tString output=\"Chip ID: \"+theChipId+\" Name: \"+theName+\" Pet Type: \"+ thePetType+\" Age: \"+theAge+\"\";\n\t\treturn output;\n\t}",
"public String getCardName(){\n return type.getType() + \" of \" + suit.getSuit();\n }",
"public String toString() {\n return (\"Item: \" + itemCode + \" \" + itemName + \" \" + itemQuantityInStock + \" price: $\" + df.format(itemPrice) +\" cost: $\"+ df.format(itemCost) + \" farm supplier: \" + farmName);\n }",
"@Override\n public String toString() {\n String str = \"\";\n \n str += String.format(\"%-20s: %s\\n\", \"Name\", name);\n str += String.format(\"%-20s: %s\\n\", \"Gender\", gender);\n str += String.format(\"%-20s: %s\\n\\n\", \"Email\", email);\n \n str += String.format(\"%-20s %-30s %-10s %s\\n\", \"Course\", \"Name\", \"Credit\", \"Score\");\n str += \"---------------------------------------------------------------\\n\";\n str += String.format(\"%-20s %-30s: %-10.1f %.1f\\n\", \"Course 1\", \n course1.getCourseName(), course1.getCredit(), course1.calcFinalScore());\n str += String.format(\"%-20s %-30s: %-10.1f %.1f\\n\", \"Course 2\", \n course2.getCourseName(), course2.getCredit(), course3.calcFinalScore());\n str += String.format(\"%-20s %-30s: %-10.1f %.1f\\n\", \"Course 3\", \n course3.getCourseName(), course3.getCredit(), course3.calcFinalScore());\n str += String.format(\"%-20s: %d\\n\", \"Passed Courses\", calcPassedCourseNum());\n str += String.format(\"%-20s: %.1f\\n\", \"Passed Courses\", calcTotalCredit());\n \n return str;\n }",
"public String toString()\r\n\t{\r\n\t return \"Accnt nbr \"+getAcctNbr()+\" has balance of $\"+twoDigits.format(getBalance());\r\n\t}",
"public String toString() {\n\t\t\treturn String.format(\"%s \\t %s \\t %s \\t $%12.2f \\t %10.2f%% \\t\\t $%12.2f\\n\", \"Gold\", this.getCustomer(), this.getAccountNumber(), this.getAccountBalance(), this.getGoldInterestRate(), this.getGoldInterestAmount());\n\t}",
"public String toString(){\n String s = (\"Name: \" + this.name + \" Top Speed: \" + this.topSpeed);\n System.out.println(s);\n return s;\n }",
"public String toString(){\r\n\t\tString str = \"<\";\r\n\t\tString nameOne;\r\n\t\tif (isSuperGiant() == true){\r\n\t\t\tnameOne = \"SuperGiant\";\r\n\t\t}\r\n\t\telse{\r\n\t\t\tnameOne = \"Red Giant\";\r\n\t\t}\r\n\t\tString nameTwo = getName();\r\n\t\tdouble massOne = getMass();\r\n\t\tdouble sizeOne = getSize();\r\n\t\tString strMass = roundOffTo2DecPlaces((float) massOne);\r\n\t\tString strSize = roundOffTo2DecPlaces((float) sizeOne);\r\n\t\tstr = str+nameTwo+\"> Is a \"+nameOne+\" Star with mass = <\"+strMass+\">KG and size = <\"+strSize+\"> miles.\";\r\n\t\treturn str;\r\n\t}",
"@Override String toString();",
"public String toString() {\n\t\t\tStringBuilder str = new StringBuilder();\n\t\t\tstr.append(\"Hand ID: \" + getHandId() + \"<br>\");\n\t\t\tstr.append(\"Hand Wager: <font color = red>\" + moneyFormat.format(getHandWager()) + \"</font><br>\");\n\t\t\tstr.append(\"Dealer Total: <font color = red>\" + getDealerTotal() + \"</font><br>\");\n\t\t\tstr.append(\"Player Total: <font color = red>\" + getPlayerTotal() + \"</font><br>\");\n\t\t\tstr.append(\"Hand Outcome: <font color = red>\" + getHandOutcome().substring(0, (getHandOutcome().length() - 2)) + \"</font><br>\" );\n\t\t\tstr.append(\"Post-Hand Player Wallet: <font color = red>\" + moneyFormat.format(getPlayerWallet()) + \"</font><br><br>\");\n\t\t\t\t\n\t\t\treturn str.toString();\t\t\n\t\t}",
"@Override\n\tpublic String toString() {\n\t\tString strSuit = suit.toString().substring(0, 1);\n\t\tstrSuit += suit.toString().toLowerCase()\n\t\t\t\t.substring(1, suit.toString().length());\n\n\t\treturn strSuit + value;\t\n\t}",
"public String toString(){\r\n // creating instance\r\n StringBuilder sb = new StringBuilder();\r\n if(!isAvailable()){\r\n if(veh.getSize() == VehicleSize.Bus){\r\n sb.append('B');\r\n } else if (veh.getSize() == VehicleSize.Car){\r\n sb.append('C');\r\n } else {\r\n sb.append('M');\r\n }\r\n } else {\r\n if(sizeOfSp == VehicleSize.Bus){\r\n sb.append('b');\r\n } else if (sizeOfSp == VehicleSize.Car){\r\n sb.append('c');\r\n } else {\r\n sb.append('m');\r\n }\r\n }\r\n // return statement\r\n return sb.toString();\r\n }",
"@Override\n public String toString () {\n DecimalFormat df= new DecimalFormat(\"####0.00\");\n return \"- $\"+df.format(amount) + \" |\" + entryType.getTypeName() + \"| \" + enterTime;\n }",
"public String toString() {\n System.out.println(this.getName() +\":\");\n System.out.println(\"Balance: $\" + this.getBalance());\n System.out.println(\"Monthly Interest: $\" + this.getMonthlyInterest());\n System.out.println(\"Date Created: \" + this.getDateCreated());\n System.out.println();\n return \"\";\n }",
"@Override\n public String toString() {\n String text = \"\";\n\n text += super.toString();\n text += \"Potatoes price per kilo: \" + potatoesPrice + \" €\"; \n return text;\n }",
"public java.lang.String toString() {\n\t\tString s=\"\";\n\t\ts+=String.format(\"%.2f\", weight);\n\t\t//s+=Double.toString(weight);\n\t\ts+=\" lbs. @ \";\n\t\ts+=DessertShoppe.cents2dollarsAndCents(price_per_pound);\n\t\ts+=\" /lb.\\t \\n\";\n\t\ts+=String.format(\"%-25s%6s\\n\",name, DessertShoppe.cents2dollarsAndCents(this.getCost()));\n\t\treturn s;\n\t}",
"public String toString() {\n String ret = \"\\n*****\" + title + \"*****\" + \"\\n\" + description + \"\\nBusiness Contact: \" + contact\n + \"\\nSupply List: \";\n for (String supply : supplies) {\n ret += \"\\n-\" + supply;\n }\n ret += \"\\nPrice: $\" + price + \"\\n\";\n return ret;\n }",
"public String toString() {\r\n\t\treturn \"The \" + makeAndModel + \" is made in \" + country + \", has a 0-60 time of \"\r\n\t\t\t\t+ zeroTo60 + \" seconds, and costs $\" + totalCost + \".\";\r\n\t\t}",
"@Override\n public String toString() {\n return \"Credit hours: \" + this.creditHours + \"\\nFee per credit hour: $\" + this.feePerCreditHour + \"\\nScholarship amount: $\" + this.scholarshipAmount + \"\\nHealth insurance amount per annum: $\" + this.healthInsurancePerAnnum ;\n }",
"public String toString() {\n return \"$\"+getDollars() +\".\"+ getCents();\n }",
"public String toString(){\n\t\treturn String.format(\"Address: %s\\nType: %s\\nPrice: %.2f\\nOwner: %s\",getAddress(),getType(),getPrice(),getOwner());\n\t}",
"@Override\n public String toString() {\n return (getId() + \" \" + getName() + \" \" + getPrice() + \" \" + getStock() \n + \" \" + getMin() + \" \" + getMax());\n }"
] | [
"0.81528115",
"0.78821146",
"0.7863834",
"0.7743196",
"0.75685513",
"0.74937016",
"0.74029344",
"0.73591405",
"0.73367083",
"0.73233896",
"0.73011583",
"0.72753936",
"0.72707254",
"0.7219165",
"0.72177047",
"0.7208151",
"0.7191179",
"0.7152853",
"0.7151701",
"0.713572",
"0.7116351",
"0.71076375",
"0.7093429",
"0.70872307",
"0.70847666",
"0.704995",
"0.7042168",
"0.70409507",
"0.7027891",
"0.7022683",
"0.7022124",
"0.7018242",
"0.69974965",
"0.6980631",
"0.6952074",
"0.695124",
"0.694272",
"0.6939131",
"0.69366515",
"0.6928741",
"0.69214815",
"0.6918035",
"0.6910217",
"0.6909646",
"0.69014424",
"0.6893897",
"0.68874913",
"0.68874514",
"0.6874598",
"0.68469876",
"0.6843791",
"0.6795845",
"0.6788816",
"0.67833745",
"0.6782231",
"0.6778691",
"0.67694545",
"0.6744845",
"0.6744766",
"0.6733317",
"0.67261463",
"0.67195076",
"0.67168444",
"0.66699505",
"0.666815",
"0.6664405",
"0.6651955",
"0.6649755",
"0.6631281",
"0.66238433",
"0.6623323",
"0.66155654",
"0.6610366",
"0.66041887",
"0.6600094",
"0.6596983",
"0.6594094",
"0.6586688",
"0.658605",
"0.65747666",
"0.65679055",
"0.65649354",
"0.6560307",
"0.65522194",
"0.65488064",
"0.6547979",
"0.6545012",
"0.6544869",
"0.65427804",
"0.6536377",
"0.65361536",
"0.65350306",
"0.6527851",
"0.6526102",
"0.6524477",
"0.6522873",
"0.6518753",
"0.65186155",
"0.65130377",
"0.65130126"
] | 0.7797981 | 3 |
null out current tags | public void clear(boolean nulltags) {
Arrays.fill(tags, null);
numTags = 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void clearHasTag() {\n \n hasTag_ = 0;\n }",
"void unsetTag();",
"public Canary clearTagsEntries() {\n this.tags = null;\n return this;\n }",
"public void clearTagArray(){\n\t\t\n\t\ttagArray.clear();\n\t\t\n\t}",
"void deleteUnusedTags();",
"public void clearRemovalTag() {\n\t levelOfRemoval = 0;\n\t}",
"@Override\n\tpublic Tag getTag() {\n\t\treturn null;\n\t}",
"public void clearFields() {\n tags.clear();\n tagText.setText(\"\");\n ((ImageView)findViewById(R.id.picture)).setImageResource(android.R.color.transparent);\n }",
"public Proposal clearTagsEntries() {\n this.tags = null;\n return this;\n }",
"public void setIdTagsOff () {\n\t\tidTags = false;\n\t}",
"public Dataset clearTagsEntries() {\n this.tags = null;\n return this;\n }",
"private void removeEmptyFormatting(ArrayList p_tags)\n {\n boolean b_changed = true;\n\n emptytag: while (b_changed)\n {\n for (int i = 0, max = p_tags.size() - 1; i < max; i++)\n {\n Object o1 = p_tags.get(i);\n Object o2 = p_tags.get(i + 1);\n\n if (o1 instanceof HtmlObjects.Tag\n && o2 instanceof HtmlObjects.EndTag)\n {\n HtmlObjects.Tag tag = (HtmlObjects.Tag) o1;\n HtmlObjects.EndTag etag = (HtmlObjects.EndTag) o2;\n\n if (tag.tag.equalsIgnoreCase(etag.tag)\n && tag.partnerId == etag.partnerId)\n {\n p_tags.remove(i + 1);\n p_tags.remove(i);\n\n continue emptytag;\n }\n }\n }\n\n b_changed = false;\n }\n }",
"public com.babbler.ws.io.avro.model.BabbleValue.Builder clearTags() {\n tags = null;\n fieldSetFlags()[4] = false;\n return this;\n }",
"private void cleanupRawTags(ArrayList p_tags)\n {\n // Find the paired tags that belong together.\n // !!! DO NOT RELY ON PAIRING STATUS. Some prop changes start\n // after <seg> but close after </seg> and even after </tu>!!!\n assignPairingStatus(p_tags);\n\n // Basic cleanup: remove surrounding <p> and inner <o:p>\n removeParagraphTags(p_tags);\n\n // Remove revision markers when they were ON accidentally\n // before translating documents or during an alignment task\n // (WinAlign).\n removePropRevisionMarkers(p_tags);\n\n // Cleanup INS/DEL revisions similarly.\n removeDelRevisions(p_tags);\n applyInsRevisions(p_tags);\n\n // WinAligned files can contain endnotes (and footnotes, but I\n // think in Word-HTML they're both endnotes).\n removeEndNotes(p_tags);\n\n // Remove empty spans that are created from superfluous\n // original formatting in Word (<span color=blue></span>)\n removeEmptyFormatting(p_tags);\n\n // Leave the rest to the Word-HTML Extractor.\n }",
"private void initializeTag()\n {\n Iterator<node_info> it=this.ga.getV().iterator();\n while(it.hasNext())\n {\n it.next().setTag(Double.POSITIVE_INFINITY);\n }\n }",
"public Builder clearTag() {\n if (tagBuilder_ == null) {\n tag_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000080);\n onChanged();\n } else {\n tagBuilder_.clear();\n }\n return this;\n }",
"public void clear() {\n context = null;\n nestedElements.clear();\n }",
"@Override\n public void reset() throws IOException {\n lemmaListIndex = 0;\n lemmaList = Collections.emptyList();\n tagsList.clear();\n super.reset();\n }",
"public static Tag emptyTag() {\n\t\treturn new Tag(NAME, \"\");\n\t}",
"public Builder clearTag() {\n \n tag_ = getDefaultInstance().getTag();\n onChanged();\n return this;\n }",
"public void clearEntityTagsForSelectedEntities() {\n getRTParent().clearEntityTagsForSelectedEntities();\n }",
"void setNilTag();",
"public void setEmptyTags (String[] tags) {\n\t\temptyTags = tags;\n\t}",
"public void clear() {\n // super.clear(); BUG: fix me\n if (tokenStack != null) {\n tokenStack.clear();\n }\n }",
"@Override\n\tpublic Tag getPreTag() {\n\t\treturn null;\n\t}",
"private void removeInsTag(ArrayList p_tags, HtmlObjects.Tag p_tag)\n {\n int i_start = 0;\n int i_end = 0;\n\n loop: for (int i = 0, max = p_tags.size(); i < max; i++)\n {\n Object o = p_tags.get(i);\n\n if (o == p_tag)\n {\n i_start = i;\n\n for (int j = i + 1; j < max; j++)\n {\n Object o1 = p_tags.get(j);\n\n if (o1 instanceof HtmlObjects.EndTag)\n {\n HtmlObjects.EndTag etag = (HtmlObjects.EndTag) o1;\n\n if (p_tag.tag.equalsIgnoreCase(etag.tag)\n && p_tag.partnerId == etag.partnerId)\n {\n i_end = j;\n break loop;\n }\n }\n }\n }\n }\n\n if (i_start >= 0 && i_end > i_start)\n {\n p_tags.subList(i_end - 1, i_end + 1).clear();\n p_tags.subList(i_start, i_start + 2).clear();\n }\n }",
"private void removeTagAndContent(ArrayList p_tags, HtmlObjects.Tag p_tag)\n {\n int i_start = 0;\n int i_end = 0;\n\n loop: for (int i = 0, max = p_tags.size(); i < max; i++)\n {\n Object o = p_tags.get(i);\n\n if (o == p_tag)\n {\n i_start = i;\n\n for (int j = i + 1; j < max; j++)\n {\n Object o1 = p_tags.get(j);\n\n if (o1 instanceof HtmlObjects.EndTag)\n {\n HtmlObjects.EndTag etag = (HtmlObjects.EndTag) o1;\n\n if (p_tag.tag.equalsIgnoreCase(etag.tag)\n && p_tag.partnerId == etag.partnerId)\n {\n i_end = j;\n break loop;\n }\n }\n }\n }\n }\n\n if (i_start >= 0 && i_end > i_start)\n {\n p_tags.subList(i_start, i_end + 1).clear();\n }\n }",
"public void reset(){\r\n \tif (blank != null){\r\n \t\tblank.clear();\r\n \t}\r\n \tif (blankNode != null){\r\n \t\tblankNode.clear();\r\n \t}\r\n }",
"public void clearLinkRemovalTags() {\n\tfor (Link l : allLinks)\n\t l.clearRemovalTag();\n }",
"public void clear() {\n\t\thighlightsByToken.clear();\n\t}",
"@Override\n\tpublic Tag getPosTag() {\n\t\treturn null;\n\t}",
"public ITag[] getTags() {\n \t\t\t\t\t\t\t\t\treturn null;\n \t\t\t\t\t\t\t\t}",
"@Override\n public void reset()\n {\n this.titles = new ABR();\n this.years = new ABR();\n this.votes = new ABR();\n this.director = new ABR();\n\n for(int i = 0; i < this.movies.length; i++)\n this.movies.set(i, null);\n }",
"public CreatePricingRuleRequest clearTagsEntries() {\n this.tags = null;\n return this;\n }",
"private void tagZero(graph g) {\n\t\tCollection<node_data> temp = g.getV();\n\t\tfor (node_data node : temp) {\n\t\t\tnode.setTag(0);\n\t\t}\n\t}",
"public void resetCurrentElement() {\r\n\t\tcurrentNode = firstNode;\r\n\t}",
"public void clear() {\r\n\t\tthis.document = null;\r\n\t\tthis.elements.clear();\r\n\t}",
"@Override\n\t\t\tpublic void onFetchedTags(FetchedTagsEvent event) {\n\t\t\t\tselectedTag.setHTML(\"\");\n\t\t\t\treportTable.clear();\n\t\t\t\treportTable.removeAllRows();\n\t\t\t\t\n\t\t\t\trenderTags(event.getTags());\n\t\t\t}",
"public void removeAll() {\n start = null;\n _size = 0;\n }",
"@Override\n\tpublic String getTagName() {\n\t\treturn null;\n\t}",
"private void cleanGarbageInfos()\r\n\t{\r\n\t\tfinal Iterator<SubscriberInfo> lIter = this.subscriberInfos.iterator();\r\n\t\twhile (lIter.hasNext())\r\n\t\t{\r\n\t\t\tfinal SubscriberInfo lInfo = lIter.next();\r\n\t\t\tif (lInfo.isGarbage())\r\n\t\t\t{\r\n\t\t\t\tlIter.remove();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public String [] getTags() {\n\t\treturn null;\n\t}",
"public void clearLinks(){\r\n varContextObject=null; \r\n varContextFields=null; \r\n }",
"private void clean() {\n //use iterator\n Iterator<Long> it = nodes.keySet().iterator();\n while (it.hasNext()) {\n Long node = it.next();\n if (nodes.get(node).adjs.isEmpty()) {\n it.remove();\n }\n }\n }",
"public void clearFaceletsHtmlCash() {\r\n \t\tfaceletsHtmlTagInfoCache.clear();\r\n \t\ttldFaceletsHtmlElementsByPrefix.clear();\r\n \t}",
"public BeanTagInfo() {\r\n beanClass = null;\r\n parent = null;\r\n }",
"public void emptySelectionLists() {\n\t\tArrayList selectionsCopy = new ArrayList();\n\t\tselectionsCopy.addAll(selections);\n\t\tIterator it = selectionsCopy.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tXsdNode node = (XsdNode) it.next();\n\t\t\tunselectNode(node);\n\t\t}\n\t\tlineNode = null;\n\t\telementFilters = new HashMap();\n\t}",
"@Override\r\n\tpublic Tag getParent() {\n\t\treturn null;\r\n\t}",
"public void removeHighlight(Object tag) {}",
"public void deleteAllTags(boolean toResetName){\r\n\t\ttags.clear();\r\n\t\tsetChanged();\r\n\t\tnotifyObservers();\r\n\t\tclearChanged();\r\n\t\tdeleteObservers();\t\r\n\t\t\r\n\t\tif (toResetName){\r\n\t\t\tsetName();\r\n\t\t}\r\n\t}",
"public void unsetTag(String tagName);",
"void discard(T1XTemplateTag tag) {\n final int listLength = methodStatusList.size();\n MethodStatus ms = methodStatusList.get(listLength - 1);\n // ok to destroy ms.asSet\n ms.atSet.retainAll(generating);\n // throw it away if we generated advice type that was not wanted.\n if (ms.atSet.isEmpty()) {\n ms.output = false;\n // Checkstyle: resume Indentation check\n int index = listLength - 2;\n while (index >= 0) {\n ms = methodStatusList.get(index);\n if (ms.tag == null) {\n ms.output = false;\n } else if (ms.tag != tag) {\n return;\n }\n index--;\n }\n }\n }",
"@Override\r\n public void clear(){\r\n root = null;\r\n }",
"@Override\n public void nullstill() {\n Node<T> curr= hode;\n while (curr!=null){\n Node<T> p= curr.neste;\n curr.forrige=curr.neste= null;\n curr.verdi= null;\n curr= p;\n }\n hode= hale= null;\n endringer++;\n antall=0;\n }",
"@Override\n public void clear()\n {\n explore(null);\n }",
"public void suppressionRdV_all() {\n //on vide l'agenda de ses elements\n for (RdV elem_agenda : this.agd) {\n this.getAgenda().remove(elem_agenda);\n }\n //on reinitialise a null l'objet agenda\n //this.agd = null;\n }",
"public void reset()\n {\n pages.clear();\n ePortfolioTitle = \"\";\n selectedPage = null;\n }",
"@Override\n\t\t\tpublic void clear() {\n\t\t\t\t\n\t\t\t}",
"public void clear()\n {\n if (nodes != null)\n {\n detachNodes(nodes);\n nodes = null;\n namedNodes = null;\n }\n }",
"public void popAll() {\n\n top = null;\n }",
"@Override\n public void release() {\n // do *not* reset tag attributes\n }",
"public CreateQueueRequest clearTagsEntries() {\n this.tags = null;\n return this;\n }",
"public Tags() {\n set (\"\");\n }",
"public Builder clearHasTag() {\n copyOnWrite();\n instance.clearHasTag();\n return this;\n }",
"@Override\n\tpublic List<Tag> getAllTags() throws Exception {\n\t\treturn null;\n\t}",
"public void setNull(){\n for (int i = 0; i < Nodes.size(); i++){\n this.References.add(null);\n }\n }",
"public void clear(){\n firstNode = null;\n lastNode = null;\n }",
"@Override\n public void clear() {\n root = null;\n }",
"public void clear() {\n\t\troot = null;\n\t\tcount = 0;\n\t}",
"public void reset() {\n counters = null;\n counterMap = null;\n counterValueMap = null;\n }",
"public ArrayList<Tag> getCurrentTagList() {\n if (!tags.isEmpty()) {\n return tags.get(tags.size() - 1);\n }\n return null;\n }",
"public void clear() {\n lists = new TernarySearchTree<>();\n }",
"@Override\r\n\t\t\tpublic void reset() {\n\t\t\t\t\r\n\t\t\t}",
"public void clear()\n {\n current = null;\n size = 0;\n }",
"public Builder clearTagValue() {\n bitField0_ = (bitField0_ & ~0x00000001);\n tagValue_ = getDefaultInstance().getTagValue();\n onChanged();\n return this;\n }",
"void unsetBegin();",
"@Override\n\t\tpublic void clear() {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void clear() {\n\t\t\t\n\t\t}",
"void removeTag(String tag){tags.remove(tag);}",
"protected void deleteAllTag() {\n\t\tReaderDataBase.deleteAll(this);\n\t}",
"private void clean(Element e, String tag) {\n Elements targetList = e.getElementsByTag(tag);\n targetList.remove();\n }",
"public void clear()\n {\n rst = \"\";\n indent = 0;\n lastLineLength = 0;\n rawInlineHtmlEnabled = false;\n }",
"public void clear(){\n root = null;\n count = 0;\n }",
"public void clear() {\n root = null;\n }",
"public void clear() {\n root = null;\n }",
"public void reset() {\n\t\t\t\t\r\n\t\t\t}",
"private void clearContentIdToEmbeddingTokens() {\n contentIdToEmbeddingTokens_ = emptyProtobufList();\n }",
"private static String noTag(String name) {\n Matcher tagMatcher = TAG_REGEX.matcher(name);\n if (tagMatcher.find()) {\n return tagMatcher.replaceAll(\"\").trim();\n }\n return name;\n }",
"public void reset() {\n aCollection = this.asciiMathLibraryBlock.getOwnedElement().stream().filter(e -> e instanceof NamedElement).collect(Collectors.toList());\n cCollection = this.customFuncBlock.getOwnedElement().stream().filter(e -> e instanceof NamedElement).collect(Collectors.toList());\n }",
"private void nullify() {\n paint = null;\n bg1 = null;\n bg2 = null;\n madafacka = null;\n for(int i=0; i<enemies.size(); i++){\n enemies.remove(i);\n i--;\n }\n currentSprite = null;\n ship = null;\n shipleft1 = null;\n shipleft2 = null;\n shipright1 = null;\n shipright2 = null;\n basicInv1 = null;\n basicInv2 = null;\n badBoyAnim = null;\n\n // Call garbage collector to clean up memory.\n System.gc();\n }",
"public void reset() {\n bb.clear();\n cb.clear();\n found = false;\n }",
"public void clear() {\n this.top = null;\n }",
"public void clear() {\n count = 0;\n root = null;\n }",
"@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}",
"public void unset(){\n\t\tcurrentInst = -1;\n\t}",
"private List<Tag> getTags() {\r\n\r\n\t\treturn getTags(null);\r\n\r\n\t}",
"public void clear()\r\n {\r\n first = null;\r\n last = null;\r\n count = 0;\r\n }"
] | [
"0.72711617",
"0.70527774",
"0.6935374",
"0.6917035",
"0.67385024",
"0.6557437",
"0.654588",
"0.64974755",
"0.64550054",
"0.6430049",
"0.64088935",
"0.63597554",
"0.62692773",
"0.617897",
"0.61491966",
"0.61240643",
"0.61120254",
"0.61114854",
"0.60732996",
"0.60471576",
"0.60350937",
"0.6028661",
"0.60199004",
"0.60093063",
"0.598271",
"0.5971641",
"0.59613085",
"0.5949225",
"0.5905962",
"0.59023994",
"0.5896103",
"0.5891553",
"0.58818805",
"0.5866171",
"0.5856475",
"0.5847657",
"0.5840609",
"0.58346564",
"0.58112425",
"0.58058167",
"0.5801784",
"0.57895494",
"0.57764775",
"0.5775033",
"0.577344",
"0.5765068",
"0.5764593",
"0.5746131",
"0.57409346",
"0.57360905",
"0.57332057",
"0.57292646",
"0.5726102",
"0.57251203",
"0.57246387",
"0.5723386",
"0.5720607",
"0.57127345",
"0.5712415",
"0.57097167",
"0.57087785",
"0.57076955",
"0.5703934",
"0.57032156",
"0.5701748",
"0.56768286",
"0.5669762",
"0.5665145",
"0.56562364",
"0.5653817",
"0.56278753",
"0.5626041",
"0.56257933",
"0.5624905",
"0.5621734",
"0.56123525",
"0.5612106",
"0.5612106",
"0.561022",
"0.56089354",
"0.5608477",
"0.5601521",
"0.55956125",
"0.55862653",
"0.55862653",
"0.5582638",
"0.55824995",
"0.5580234",
"0.5579168",
"0.55767614",
"0.5576075",
"0.5575103",
"0.55744994",
"0.5572188",
"0.5572188",
"0.5572188",
"0.5572188",
"0.5571894",
"0.5570431",
"0.5562385"
] | 0.6456594 | 8 |
find Tag by key NOTE: key must be internal() | public Tag get(String key) {
for (int i = 0; i < numTags; i++) {
if (tags[i].key == key)
return tags[i];
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n public Object findElement(Object key) {\r\n\r\n // Search for node possibly containing key\r\n TFNode node = search(root(), key);\r\n \r\n // Note the index of where the key should be\r\n int index = FFGTE(node, key);\r\n\r\n // If the index is greater than the number of items in the node, the key is not in the node\r\n if (index < node.getNumItems()) {\r\n // Look for key in node\r\n if (treeComp.isEqual(node.getItem(index).key(), key)) {\r\n return node.getItem(index);\r\n }\r\n }\r\n\r\n // The search hit a leaf without finding the key\r\n return null;\r\n }",
"public V find (K key) throws KeyNotFoundException {\n\t\treturn findKey(root, key);\n\t}",
"@Nullable IStrongSlot find(LuaValue key);",
"public String getDPTag(String key)\r\n {\n return tagHash.get(key).toString();\r\n }",
"public V search(K key);",
"private RadixTree find(Signature key) {\n if (key.isEmpty()) {\n return this;\n } else {\n for (Signature label : children.keySet()) {\n if (label.equals(key)) {\n return children.get(label);\n } else if (label.isPrefix(key)) {\n RadixTree child = children.get(label);\n int len = label.size();\n return child.find(key.suffix(len));\n }\n }\n }\n\n return null;\n }",
"public E find(K key){\n\t\tE output= null;\n\t\t\n\t\tint i = 0;\n\t\twhile (i<keys.length && output == null){\n\t\t\tif(keys[i] != null && keys[i].equals(key))\n\t\t\t\toutput = elem[i];\n\t\t\ti = i + 1;\n\t\t}\n\t\treturn output;\n\t}",
"public Entry find(Object key) {\n int i = compFunction(key.hashCode());\n SList chain = buckets[i];\n try {\n for (SListNode n = (SListNode) chain.front(); n.isValidNode(); n = (SListNode) n.next()) {\n Entry e = (Entry) n.item();\n if (e.key.equals(key)) {\n return e;\n }\n }\n } catch(InvalidNodeException e) {\n System.out.println(e);\n }\n return null;\n }",
"public TValue find(TKey key) {\n Node n = bstFind(key, mRoot); // find the Node containing the key if any\n if (n == null || n == NIL_NODE)\n throw new RuntimeException(\"Key not found\");\n return n.mValue;\n }",
"private Node find(String key) {\n Node now = head;\n while (now != null) {\n if (now.pairStringString.getKey().equals(key)) {\n return now;\n }\n now = now.next;\n }\n return null;\n }",
"public V search(K key) throws KeyNotFoundException {\n\tif (!RBT.containsKey(key))\n\t throw new KeyNotFoundException();\n return (V) RBT.get(key);\n }",
"public Entry<K, V> find(K key) {\r\n try {\r\n int hash = key.hashCode();\r\n ListNode<Entry<K, V>> node = table[compFunction(hash)].front();\r\n if (node.isValidNode()) {\r\n return (Entry<K, V>) node.getItem();\r\n }\r\n } catch (Exception e) {\r\n System.out.println(\"Unhashable key: \" + e);\r\n }\r\n return null;\r\n }",
"private ListNode find(K key) {\r\n\t\t\tif (key == null) throw new NullPointerException();\r\n\t\t\tListNode current = header;\r\n\t\t\twhile (current != null) {\r\n\t\t\t\tif (current.key.equals(key)) return current;\r\n\t\t\t\tcurrent = current.next;\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t}",
"public V find(K key) {\n Node<K,V> node = root;\n while (node != null) {\n int cmp = key.compareTo(node.key);\n if (cmp < 0) {\n node = node.left;\n } else if (cmp > 0) {\n node = node.right;\n } else {\n return node.value;\n }\n }\n return null;\n }",
"public Entry find(Object key) {\r\n Entry entry_with_key = new Entry();\r\n entry_with_key.key = key; \r\n int comp_hash = compFunction(entry_with_key.key.hashCode());\r\n if (hash_table[comp_hash] == null) {\r\n return null;\r\n } else {\r\n DList searching = hash_table[comp_hash];\r\n for(Object entry: searching){\r\n if(((Entry) entry).key().equals(key)){\r\n return (Entry) entry;\r\n }\r\n }\r\n return null;\r\n \r\n }\r\n\r\n\r\n }",
"public static __Tag getTagSub(String tag) {\n\t return map.get(tag);\n\t}",
"public static __Tag getTagSub(String tag) {\n\t return map.get(tag);\n\t}",
"static boolean tagExists(CompoundTag tag, String key) {\n return tag.getValue().get(key) != null;\n }",
"Tag findByName(String name);",
"public V lookup(K key);",
"Tag findById(int id);",
"public TFNode findNode(Object key) {\r\n\r\n // Search for node possibly containing key\r\n TFNode node = search(root(), key);\r\n\r\n // Note the index of where the key should be\r\n int index = FFGTE(node, key);\r\n\r\n // If the index is greater than the number of items in the node, the key is not in the node\r\n if (index < node.getNumItems()) {\r\n // Look for key in node\r\n if (treeComp.isEqual(node.getItem(index).key(), key)) {\r\n return node;\r\n }\r\n }\r\n\r\n // The search hit a leaf without finding the key\r\n return null;\r\n }",
"public Node find(int key) // find node with given key\n\t{ // (assumes non-empty tree)\n\t\tNode current = root; // start at root\n\t\tif(current == null) {\n\t\t\treturn null;\n\t\t}\n\t\twhile(current.iData != key) // while no match,\n\t\t{\n\t\t\tif(key < current.iData) // go left?\n\t\t\t\tcurrent = current.leftChild;\n\t\t\telse // or go right?\n\t\t\t\tcurrent = current.rightChild;\n\t\t\tif(current == null) // if no child,\n\t\t\t\treturn null; // didn't find it\n\t\t}\n\t\treturn current; // found it\n\t}",
"public Node find(int key) {\n Node current = root; // start at root\n while (current.iData != key) {\n // while no match\n if (key < current.iData)\n // go left\n current = current.leftChild;\n else\n current = current.rightChild;\n if (current == null) // if no child, didn't find it\n return null;\n }\n return current; // found it\n }",
"public String search(Integer key) {\n\t\treturn root.search(key);\n\t}",
"public String find(int key) {\n\t\t//YOUR CODE HERE\n\t\tif (root == null) {\n\t\t\treturn null;\n\t\t}\n\t\treturn find(key,root);\n\t}",
"private Node<Pair<K, V>> search(\n BiDirectionalNullTerminatedTailedLinkedList<Pair<K, V>> list,\n K key) {\n\n for (Node<Pair<K, V>> i = list.getHead().getNext(); i != list.getTail();\n i = i.getNext()) {\n if (i.getData().key.equals(key)) {\n return i;\n }\n }\n\n return null;\n }",
"private BTNode search(BTNode btNode, DataPair key) {\n int i =0;\n while (i < btNode.mCurrentKeyNum && key.compareTo(btNode.mKeys[i]) > 0)\n i++;\n\n if (i < btNode.mCurrentKeyNum && key.compareTo(btNode.mKeys[i])==0)\n return btNode;//btNode.mKeys[i];\n if (btNode.mIsLeaf)\n return null;\n return search(btNode.mChildren[i],key);\n }",
"public V lookup(K key) {\n\t\tTree<K, V> t = this;\n\t\treturn lookup(t, key);\n\t}",
"public BTreeNode search(long key) {\n\t\treturn searcher(root, key);\n\t}",
"public RBNode<T> search(T key) {\r\n return search1(key);\r\n//\t\treturn search2(root, key); //recursive version\r\n }",
"public String getTagKey() {\n return tagKey;\n }",
"public Value find(Value key) {\n\t\tValue v = get(key);\n\t\tif (v != null)\n\t\t\treturn v;\n\t\tif (parent != null)\n\t\t\treturn parent.find(key);\n\t\treturn null;\n\t}",
"private Node _locate(Object key){\n\t\tint hashCode = key.hashCode();\r\n\t\tint bucketNum = hashCode % _numBuckets;\r\n\t\treturn _locate(key, bucketNum);\r\n\t}",
"public Node namedItem(final String key) {\n final int length = getLength();\n for (int i = 0; i < length; i++) {\n final Node n = item(0);\n if (n instanceof Element) {\n final Element element = (Element) n;\n if (key.equals(element.getAttribute(\"id\")) || key.equals(element.getAttribute(\"name\"))) {\n return n;\n }\n }\n\n }\n return null;\n }",
"private Node<Pair<K, V>> findItem(K key) {\n Node<Pair<K, V>> result = null;\n\n int hash1 = hash1(key);\n\n if (table[hash1] != null) {\n Node<Pair<K, V>> node = search(table[hash1].list, key);\n\n if (node != null) {\n result = node;\n }\n }\n\n int hash2 = hash2(key);\n\n if (table[hash2] != null && result == null) {\n Node<Pair<K, V>> node = search(table[hash2].list, key);\n\n if (node != null) {\n result = node;\n }\n }\n\n return result;\n }",
"public void setTagKey(String tagKey) {\n this.tagKey = tagKey;\n }",
"public DataItem find(int key){\n\t\tint hashVal = hashFunc(key);\n\t\tint stepSize = hashFunc2(key);\n\t\twhile(hashArray[hashVal] != null){\n\t\t\tif(hashArray[hashVal].getKey() == key){\n\t\t\t\tDataItem temp = hashArray[hashVal]; //find the item\n\t\t\t\treturn temp;\n\t\t\t}\n\t\t\thashVal += stepSize;\n\t\t\thashVal %= arraySize;\n\t\t}\n\t\treturn null;\n\t}",
"@Override\n\tpublic K lookup(K key) {\n\t\treturn lookup(root, key);\n\t}",
"public RBNode<T, E> searchAndRetrieve(T key) {\r\n\t\tRBNode<T, E> c = root;\r\n\t\tRBNode<T, E> p = nillLeaf;\r\n\t\twhile (c != nillLeaf) {\r\n\t\t\t// if when comparing if it hasnt found the key go to the left\r\n\t\t\tif (key.compareTo(c.uniqueKey) < 0) {\r\n\t\t\t\tp = c;\r\n\t\t\t\tc = c.leftChild;\r\n\t\t\t}\r\n\t\t\t// if when comparing if it hasnt found the key go to the right\r\n\t\t\telse if (key.compareTo(c.uniqueKey) > 0) {\r\n\t\t\t\tp = c;\r\n\t\t\t\tc = c.rightChild;\r\n\t\t\t}\r\n\t\t\t// they are equal\r\n\t\t\telse {\r\n\t\t\t\tp = c;\r\n\t\t\t\tc = c.leftChild;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn p;\r\n\t}",
"public abstract boolean lookup(Key key);",
"public OrderedPair search(String key) {\n return getRoot().search(key.toLowerCase());\n }",
"public T get(Object key)\n\t{\n\t\tif(root == null || key == null)\n\t\t\treturn null;\n\t\tif(!(key instanceof CharSequence))\n\t\t\treturn null;\n\t\treturn root.get((CharSequence)key,0);\n\t}",
"private K lookup(BSTnode<K> n, K key) {\n\t\tif (n == null) {// if key is not present\n\t\t\treturn null;\n\t\t}\n\t\tif (key.equals(n.getKey())) {// if key is present, return the match to\n\t\t\t\t\t\t\t\t\t\t// be incremented\n\t\t\treturn n.getKey();\n\t\t}\n\t\tif (key.compareTo(n.getKey()) < 0) {\n\t\t\t// key < this node's key; look in left subtree\n\t\t\treturn lookup(n.getLeft(), key);\n\t\t}\n\n\t\telse {\n\t\t\t// key > this node's key; look in right subtree\n\t\t\treturn lookup(n.getRight(), key);\n\t\t}\n\t}",
"private int findCategory(String key) {\n VueMetadataElement vme = null;\n int i = -1;\n try {\n for (i=0;i<getCategoryListSize();i++) {\n vme = getCategoryListElement(i);\n if (key.equals(vme.key))\n return i;\n }\n } catch (Throwable t) {\n Log.error(\"searching for \" + Util.tags(key) + \" at index \" + i + \" with \" + vme, t);\n }\n return -1;\n }",
"public Object lookup(String key){\n ListNode<String,Object> temp = getNode(key);\n if(temp != null)\n return temp.value;\n else\n return null;\n }",
"public KeyedItem retrieve(Comparable searchKey);",
"public V get(K key) {\n int hashCode = scaledHashCode(key);\n OwnLinkedList<K, V> list = table[hashCode];\n if (list == null) {\n return null;\n }\n PairNode<K, V> result = list.search(key);\n if (result == null) {\n return null;\n }\n return result.getValue();\n }",
"public String lookup(String key){\n Node N;\n N = findKey(root, key);\n return ( N == null ? null : N.item.value );\n }",
"private Node findKey(String key){\n Node N = front;\n while(N != null){\n if(N.key.equals(key)){\n return N; \n }\n else{\n N = N.next; \n }\n }\n return null;\n }",
"public V getElementByKey(K key) {\n\t\tif (cacheMap.containsKey(key)) {\n\t\t\telementHit(key);\n\t\t}\n\t\treturn cacheMap.get(key);\n\t}",
"public MyBinaryNode<K> search(K key) {\n\t\t\n\t\treturn searchRecursive(root, key);\n\t}",
"Object getKey();",
"public T search(K key) {\n\t\tfor (T item : list) {\n\t\t\tif (item.matches(key)) {\n\t\t\t\treturn item;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public String find(String key) {\n\t\t\n\t\tsearchProbe = 0;\n\t\tint h = hash(key);\n\t\twhile(table[h]!=null) {\n\t\t\t\n\t\t\tif(table[h].toString().substring(0, 19).equals(key)) {\n\t\t\t\treturn table[h].toString();\n\t\t\t}\n\t\t\tsearchProbe++;\n\t\t\th=(h+1)%getTablesize();\n\t\t}\n\t\t\n\t\t\n\treturn \"Not Found\";\n\t}",
"public Entry find(Object key) {\n int hashCode = key.hashCode();\n int index = compFunction(hashCode);\n\n if(defTable[index].isEmpty()) {\n return null;\n }\n\n Entry entry = new Entry();\n ListNode current = defTable[index].front();\n\n try{\n while(true) {\n if(((Entry) current.item()).key().equals(key)) {\n entry.key = key;\n entry.value = ((Entry) current.item()).value();\n return entry;\n }\n if(current==defTable[index].back()) {\n break;\n }\n current = current.next();\n }\n } catch(Exception err) {\n System.out.println(err);\n }\n return null;\n }",
"public boolean search(String key){\n DataPair dp = getDataPair(key);\n BTNode out=null;\n if (dp != null)\n out = search(dp);\n return out != null;\n }",
"String search(int key);",
"private Node findKey(Node R, String targetKey){ \n if(R == null || R.item.key.equals(targetKey)) return R;\n if(R.item.key.compareToIgnoreCase(targetKey)>0) return findKey(R.left, targetKey);\n else return findKey(R.right, targetKey); //(R.item.key.compareToIgnoreCase(targetKey)>0) \n }",
"public java.lang.String getTagsOrThrow(\n java.lang.String key) {\n if (key == null) { throw new java.lang.NullPointerException(); }\n java.util.Map<java.lang.String, java.lang.String> map =\n internalGetTags().getMap();\n if (!map.containsKey(key)) {\n throw new java.lang.IllegalArgumentException();\n }\n return map.get(key);\n }",
"public java.lang.String getTagsOrThrow(\n java.lang.String key) {\n if (key == null) { throw new java.lang.NullPointerException(); }\n java.util.Map<java.lang.String, java.lang.String> map =\n internalGetTags().getMap();\n if (!map.containsKey(key)) {\n throw new java.lang.IllegalArgumentException();\n }\n return map.get(key);\n }",
"public TreeNode find(Integer searchKey) {\n\t\treturn root.find(searchKey);\n\t}",
"private KeyedItem retrieve(BinarySearchTree currentNode, Comparable key){\r\n\t\t\r\n\t\t//item to return if found\r\n\t\tKeyedItem item = null;\r\n\t\t\r\n\t\t//Node is null, we are at a empty leaf. Item not found\r\n\t\tif(currentNode == null){\r\n\t\t\tthrow new TreeException(\"Key not found. Tree is empty.\");\r\n\t\t}\r\n\t\t//Check right tree if key is greater\r\n\t\telse if(currentNode.getRoot().getKey().compareTo(key) < 0){\r\n\t\t\titem = retrieve(currentNode.getRightChild(), key);\r\n\t\t}\r\n\t\t//Check left tree if key is less than\r\n\t\telse if(currentNode.getRoot().getKey().compareTo(key) > 0){\r\n\t\t\titem = retrieve(currentNode.getLeftChild(), key);\r\n\t\t}\r\n\t\t//Key is equal, found the item\r\n\t\telse if(currentNode.getRoot().getKey().compareTo(key) == 0){\r\n\t\t\titem = currentNode.getRoot();\r\n\t\t}\r\n\t\t\r\n\t\treturn item;\r\n\t}",
"private Node getChild(char key) {\n for (Node child : children) {\n if (child.getKey() == key) {\n return child;\n }\n }\n return null;\n }",
"java.lang.String getTag();",
"java.lang.String getTag();",
"V get(final K key);",
"V getEntry(K key);",
"public Node search(K key) {\n\t\tNode currentNode = this.mRoot;\n\t\t// start from the root of the tree that calls the method\n\t\twhile (currentNode != mSentinel && key.compareTo(currentNode.getKey()) != 0) {\n\t\t\t// if the current node is not empty and its key is not equal to the\n\t\t\t// search key\n\t\t\tif (key.compareTo(currentNode.getKey()) < 0) {\n\t\t\t\tcurrentNode = currentNode.getLeftChild();\n\t\t\t\t// go left if the search key is lower\n\t\t\t} else {\n\t\t\t\tcurrentNode = currentNode.getrightChild();\n\t\t\t\t// go right if the search key is higher\n\t\t\t}\n\t\t\t// break the loop if the search key matches the node key\n\t\t}\n\t\tif (currentNode == mSentinel) {\n\t\t\treturn null;\n\t\t\t// if there is not a match return nu;;\n\t\t} else {\n\t\t\treturn currentNode;\n\t\t\t// return the first node with the same key as the search key\n\t\t}\n\t}",
"public Node search(int key) {\n\t\t\t Node node=root;\n\t while (node!= nil){\n\t if(node.id==key){\n\t \treturn node;\n\t }\n\t else if(node.id<key){\n\t \tnode=node.right;\n\t }\n\t else{\n\t \tnode=node.left;\n\t } \n\t }\n\t //key not found in the tree\n\t return nil;\n\t }",
"public V searchValue (K key) {\n\t\tfor (Map.Entry<K, V> entry : this.entrySet()) {\n\t\t\tif (entry.getKey() == key) {\n\t\t\t\treturn entry.getValue();\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public int getIndexOf(K key);",
"public static Object lookup(Object ob, String key) throws XMLBuildException {\r\n FilterAJ filter = XmlParser.pojoToWrapper.get(ob);\r\n if (key == null) {\r\n throw new XMLBuildException(\"object \" + filter.getName() +\" lookup null key\" );\r\n }\r\n\t\t\r\n\t\tif (filter == null)\r\n\t\t\treturn null;\r\n\t\tConcurrentHashMap st = filter.getSymbolTable();\r\n\t\tFilterAJ o = (FilterAJ) st.get(key);\r\n\t\tif (o != null) {\r\n\t\t\treturn o.getPojo();\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"K getKey();",
"K getKey();",
"K getKey();",
"K getKey();",
"MetaTag findByName(String metaTagName) ;",
"@Override\r\n\tpublic CacheTreeNode searchTreeNode(String key) {\n\t\tassert (StringUtils.isNotEmpty(key));\r\n\t\tCacheTreeNode node = (CacheTreeNode)this.getCacheData(SUPER_ROOT_KEY);\r\n\t\tif(node != null){\r\n\t\t\treturn node.search(key);\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"UrlMap findByKey(String key);",
"java.lang.String getKey();",
"java.lang.String getKey();",
"java.lang.String getKey();",
"java.lang.String getKey();",
"java.lang.String getKey();",
"java.lang.String getKey();",
"E find(KeyType key) {\n int position = findPosKey(key);\n if (mArray[position].state == FHhashQP.ACTIVE) {\n return mArray[findPosKey(key)].data;\n } else {\n throw new NoSuchElementException();\n }\n }",
"BListKey getKey();",
"public Object getAttribute(Object key);",
"@Override\n\t@TimeComplexity(\"O(log n)\")\n\tpublic V get(K key) {\n\t/* TCJ\n\t * Binary search operation: log n\n\t */\n\t\tint j = findIndex(key);\n\t\tif ( j == size() || key.compareTo(map.get(j).getKey()) != 0 ) { return null; }\n\t\treturn map.get(j).getValue();\n\t}",
"public HPTNode<K, V> search(List<K> key) {\n check(key);\n int size = key.size();\n\n // Start at the root, and only search lower in the tree if it is\n // large enough to produce a match.\n HPTNode<K, V> current = root;\n for (int i = 0; i < size; i++) {\n if (current == null || (size - i) > current.maxDepth()) {\n return null;\n }\n current = find(current, i, key.get(i), false);\n }\n if (current == null || current.values == null) {\n return null;\n }\n return current.values.isEmpty() ? null : current;\n }",
"public Object findRecord(Object key) \n\t{\n\t check(\"find\", key);\n \n\t Object record = htRecords.get(key);\n\t if ( record != null )\n\t {\n\t\t //--- Return a copy of the record\n\t return copy ( record );\n\t }\n\t else\n\t {\n\t return null ;\n\t }\n\t}",
"@Override\n public boolean search(K key) {\n if (rootNode == null)\n return false;\n try {\n return exist(key, rootNode);\n } catch (IllegalArgumentException e) {\n System.out.println(e.getMessage());\n return false;\n }\n }",
"public Node getNode(String key) {\n \ttmp = first;\n \tint i;\n \tfor (i=0;i<len;i++) {\n \t\tif (tmp.key == key) {\n \t\t\treturn tmp;\n \t\t}\n \t\ttmp = tmp.getNext();\n \t}\n \treturn null;\n }",
"V get(Object key);",
"public String query(String key) {\n\n Connection conn = null;\n PreparedStatement stmt = null;\n\n try {\n\n conn = cpds.getConnection();\n String sql = \"SELECT text FROM q2 WHERE `idtag` = '\" + key + \"'\";\n stmt = conn.prepareStatement(sql);\n ResultSet rs = stmt.executeQuery();\n String result = null;\n if (rs.next()) {\n result = rs.getString(\"text\");\n }\n return result;\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n if (stmt != null) {\n try {\n stmt.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n if (conn != null) {\n try {\n conn.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n }\n return null;\n }",
"public Object get(Object key) {\n\t\tint index = key.hashCode() % SLOTS;\n\t\t// check if key is already present in that slot/bucket.\n\t\tfor(Pair p:table[index]) {\n\t\t\tif(key.equals(p.key))\n\t\t\t\treturn p.value;\n\t\t}\n\t\t// if not found, return null\n\t\treturn null;\n\t}",
"public T get(T key) {\n\t\tNode<T> node = root;\n\t\twhile (node != null) {\n\t\t\tif (key.compareTo(node.value) == 0) {\n\t\t\t\treturn node.value;\n\t\t\t} else if (key.compareTo(node.value) < 0) {\n\t\t\t\tnode = node.right;\n\t\t\t} else {\n\t\t\t\tnode = node.left;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public V get(Object key) {\r\n\t\tif (key == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tint slotIndex = Math.abs(key.hashCode()) % table.length;\r\n\r\n\t\tif (table[slotIndex] == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tTableEntry<K, V> currentElement = table[slotIndex];\r\n\r\n\t\tdo {\r\n\t\t\tif (currentElement.key.equals(key)) {\r\n\t\t\t\treturn currentElement.value;\r\n\t\t\t}\r\n\r\n\t\t\tcurrentElement = currentElement.next;\r\n\t\t} while (currentElement != null);\r\n\r\n\t\treturn null;\r\n\t}",
"public V get(K key) {\r\n int hash = key.hashCode() % data.length;\r\n if (hash < 0){\r\n hash *= -1;\r\n }\r\n V result = null;\r\n if (data[hash] != null) {\r\n Node currentNode = data[hash];\r\n while (currentNode != null) {\r\n if (currentNode.key == key || currentNode.key.equals(key)) {\r\n result = (V) currentNode.value;\r\n }\r\n currentNode = currentNode.next;\r\n }\r\n }\r\n return result;\r\n }"
] | [
"0.69128275",
"0.666514",
"0.6570228",
"0.65162915",
"0.6448829",
"0.64236087",
"0.64170617",
"0.6394228",
"0.6382925",
"0.63618153",
"0.63103783",
"0.6297818",
"0.62807",
"0.6241103",
"0.6233209",
"0.6232001",
"0.6232001",
"0.6231499",
"0.6201527",
"0.6175707",
"0.61570597",
"0.6155136",
"0.61533916",
"0.614509",
"0.6145049",
"0.6139405",
"0.6124086",
"0.6099517",
"0.6090897",
"0.6083639",
"0.60704255",
"0.60698587",
"0.6055093",
"0.60357654",
"0.6030366",
"0.6023963",
"0.6005101",
"0.6004828",
"0.60043633",
"0.59805536",
"0.5979419",
"0.5951419",
"0.5946022",
"0.59006464",
"0.58984065",
"0.58936715",
"0.58867913",
"0.58735526",
"0.5873538",
"0.5872512",
"0.58721644",
"0.5865601",
"0.58625096",
"0.5861753",
"0.5856725",
"0.5845942",
"0.58444494",
"0.58368313",
"0.5830282",
"0.58218884",
"0.58053124",
"0.576774",
"0.576281",
"0.575764",
"0.5757161",
"0.5757161",
"0.5753311",
"0.57504463",
"0.57499284",
"0.57341295",
"0.5695889",
"0.5694083",
"0.5678137",
"0.5676569",
"0.5676569",
"0.5676569",
"0.5676569",
"0.5664897",
"0.5656022",
"0.5640207",
"0.56351966",
"0.56351966",
"0.56351966",
"0.56351966",
"0.56351966",
"0.56351966",
"0.5634706",
"0.5633939",
"0.56273425",
"0.56171876",
"0.56128824",
"0.56097996",
"0.56085306",
"0.560335",
"0.56006145",
"0.5588032",
"0.558043",
"0.5579462",
"0.5578984",
"0.5574169"
] | 0.76938325 | 0 |
The default constructor for a packet | public Packet(int source, int dest, int DSCP){
try{
this.source = source;
this.dest = dest;
this.DSCP = DSCP;
}
catch(Exception e){
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Packet() {\n\t}",
"public PacketBuilder() {\n\t\tthis(1024);\n\t}",
"public PacketHandler() {}",
"public CapsPacketExtension()\n {\n }",
"public Packet(PacketId packetId, String message)\n {\n this.packetId = packetId;\n this.message = message;\n\n }",
"protected AbstractReadablePacket() {\n this.constructor = createConstructor();\n }",
"public RtpPacketTest() {\n\n\t}",
"public LCMultiblockPacket() {\n\t}",
"public Message(Socket s, Packet p) {\n // userName = \"\";\n socket = s;\n packet = p;\n }",
"public Packet1Login () { \n }",
"public Packet(String data){\n\t\t\tthis(data, CkSum.genCheck(data));\n\t\t}",
"public SyncFluidPacket() {\n }",
"public RoutePacket() {\n super(DEFAULT_MESSAGE_SIZE);\n amTypeSet(AM_TYPE);\n }",
"public Packet createPacket() {\n\t\treturn new Packet((ByteBuffer) buffer.flip());\n\t}",
"public Packet(final long unique) {\r\n\t\ttype = EvidenceType.NONE;\r\n\t\tcommand = EvidenceBuilder.LOG_CREATE;\r\n\t\tid = unique;\r\n\t\tdata = null;\r\n\t}",
"public Packet(int packetNumber) {\n\t\tthis.packetNumber = packetNumber;\n\t}",
"public NetworkData() {\n }",
"public Packet(Packet packetIn) {\n this.id = packetIn.getId();\n this.yCoordinate = packetIn.getyCoordinate();\n this.xCoordinate = packetIn.getxCoordinate();\n this.previousHop = packetIn.getPreviousHop();\n this.sequenceNumber = packetIn.getSequenceNumber();\n this.speed = packetIn.getSpeed();\n this.sourceNode = packetIn.getSourceNode();\n this.packetType = packetIn.getPacketType();\n this.portNumber = packetIn.getPortNumber();\n this.idTo = packetIn.getIdTo();\n this.packetType = packetIn.getPacketType();\n }",
"public LSRPacket() {\n linkID = \"\";\n adv_router = \"\";\n }",
"public ResponsePacket() {\n MacAddr = new ArrayList<String>();\n content = new ArrayList<String>();\n }",
"FJPacket( AutoBuffer ab, int ctrl ) { _ab = ab; _ctrl = ctrl; }",
"public AbstractPacketizer()\n {\n addControl(new PSC());\n }",
"public Payload() {}",
"private SourceRconPacketFactory() {\n }",
"public PacketGrabber() {\n //Log.d(TAG, \"PacketGrabber created...\");\n //gameState = -1;\n }",
"public Ethernet() {\n super();\n this.vlanID = VLAN_UNTAGGED;\n }",
"public RequestPacket(String protocol) {\n super();\n parseProtocol(protocol);\n }",
"public Payload() {\n\t}",
"UDPInstance() {\n this(null, null, null, null);\n }",
"public PacketHeader(byte buffer[])\n\t\t{\n\t\t\n\t\t}",
"public EthernetStaticIP() {\n }",
"public Packet(int PCKT_RI_, int PCKT_SRC_ID_, int pcktNr_, int sizeInBits_, double tCreation_){\r\n\t\tPCKT_RI=PCKT_RI_;\r\n\t\tPCKT_SRC_ID=PCKT_SRC_ID_;\r\n\t\tpcktNr=pcktNr_;\r\n\t\tsizeInBits=sizeInBits_;\r\n\t\ttCreation=tCreation_;\r\n\t}",
"public PacketBuilder(int capacity) {\n\t\tbuffer = ByteBuffer.allocate(capacity);\n\t}",
"public ArtPollPacket() {\n this((byte) 0b00000110, ArtNetPriorityCodes.DP_CRITICAL);\n }",
"public Packet(int sequenceNumber, String sourceNode, int portNumber, int id, int previousHop, double speed, double xCoordinate, double yCoordinate,\n long currentTime, int packetType) {\n this.sequenceNumber = sequenceNumber;\n this.previousHop = previousHop;\n this.id = id;\n this.speed = speed;\n this.xCoordinate = xCoordinate;\n this.yCoordinate = yCoordinate;\n this.sourceNode = sourceNode;\n this.currentTime = currentTime;\n this.packetType = packetType;\n this.portNumber = portNumber;\n\n idTo = 0;\n }",
"public PacketAssembler()\n {\n \tthis.theTreeMaps = new TreeMap<Integer, TreeMap<Integer,String>>();\n \tthis.countPerMessage = new TreeMap<Integer,Integer>();\n }",
"public Stack() {}",
"public Packet(int sequenceNumber, String sourceNode, int portNumber, int id, int previousHop, double speed, double xCoordinate, double yCoordinate,\n long currentTime, int packetType, int idTo) {\n this.sequenceNumber = sequenceNumber;\n this.previousHop = previousHop;\n this.id = id;\n this.speed = speed;\n this.xCoordinate = xCoordinate;\n this.yCoordinate = yCoordinate;\n this.sourceNode = sourceNode;\n this.currentTime = currentTime;\n this.packetType = packetType;\n this.portNumber = portNumber;\n this.idTo = idTo;\n\n }",
"public TransferredPacketExtension()\n {\n super(NAMESPACE, ELEMENT_NAME);\n }",
"public PacketInputStream ()\n {\n _buffer = ByteBuffer.allocate(INITIAL_BUFFER_CAPACITY);\n }",
"public AuthPacket()\n\t{\n\t\tuserID = \"\";\n\t\tpassword = \"\";\n\t\tstudentName = \"\";\n\t\tnew_password = \"\";\n\t\tchangePass = false;\n\t\tgrantAccess = false;\n\t\tstandard = -1;\n\t\terrorCode = -1;\n\t}",
"public DiscoveryPacket(BigInteger networkId) {\n this.networkId = networkId;\n }",
"public MyStack() {\r\n\t\tthis(DEFAULT_CAPACITY);\r\n\t}",
"public RoutePacket(byte[] data) {\n super(data);\n amTypeSet(AM_TYPE);\n }",
"public NetworkAdapter() {\n }",
"public Card() { this(12, 3); }",
"public RoutePacket(byte[] data, int base_offset) {\n super(data, base_offset);\n amTypeSet(AM_TYPE);\n }",
"public Packet(String data, String checksum) {\n\t\t\tthis.data = data;\n\t\t\tthis.checksum = checksum;\n\t\t}",
"public Card () {}",
"public DtoIP4MacPair() {}",
"public Node()\r\n {\r\n initialize(null);\r\n lbl = id;\r\n }",
"public Block() {\n this((byte) 0, (byte) 0);\n }",
"public PValuePacket(PValuePacket pvalue) {\n\t\tsuper(pvalue);\n\t\tthis.ballot = pvalue.ballot;\n\t\tthis.medianCheckpointedSlot = pvalue.medianCheckpointedSlot;\n\t\tthis.packetType = pvalue.getType();\n\t\tthis.recovery = false; // true only when created from json\n\t}",
"public Message() {\n\t\tsuper();\n\t}",
"public NetworkSource() {\n }",
"public NbMessage(short[] packet) {\n /**\n * Parse using shorts\n */\n this.packet = packet;\n byte header = (byte) ((packet[0] & 0b1111000000000000) >> 12);\n this.isValid = (header == DATA_HEADER);\n this.subheader = (packet[0] & 0b0000111000000000) >> 9;\n this.channel = (packet[0] & 0b0000000111000000) >> 6;\n this.header = (packet[0] & 0b1111000000000000) >> 12;\n this.data = packet[1];\n }",
"public Connection() {\n\t\t\n\t}",
"public RoutePacket(int data_length) {\n super(data_length);\n amTypeSet(AM_TYPE);\n }",
"private Protocol() {}",
"protected abstract void createPacketData();",
"public static PacketSource makeDummy() {\n\treturn new DummySource();\n }",
"public Packet(int ID_, Type type_, String message_, int destinationID)\r\n\t{\r\n\t\tthis.ID = ID_;\r\n\t\tthis.type = type_;\r\n\t\tthis.message = message_;\r\n\t\tthis.dID = destinationID;\r\n\t}",
"public CardRequest() {\r\n card = new MSRData(); // an empty one\r\n }",
"public ChatReceivePacket(ChatReceivePacket packet) {\n super(packet);\n this.messageContext = packet.getMessageContext();\n this.clientId = packet.getClientId();\n this.fromName = packet.getFromName();\n this.message = packet.getMessage();\n }",
"public TrackClientPacketHandler() \n {\n super(Constants.DEVICE_CODE);\n }",
"protected CardCommandAPDU() {\n }",
"public Node() {\n\t}",
"public RoutePacket(byte[] data, int base_offset, int data_length) {\n super(data, base_offset, data_length);\n amTypeSet(AM_TYPE);\n }",
"private ServerEntityMetadataPacket() {}",
"public UDPclient()\n\t{\n\t}",
"public Data() {}",
"public LcpPacketFactory(PppParser parent) {\n parent.super(0xc021);\n packetFactories = new LcpPacketMap(this);\n configFactories = new LcpConfigMap(this);\n\n // Register LCP configuration option factories\n new LcpConfigMruFactory(this);\n new LcpConfigAccmFactory(this);\n new LcpConfigAuthFactory(this);\n new LcpConfigQualityFactory(this);\n new LcpConfigMagicNumFactory(this);\n new LcpConfigPfcFactory(this);\n new LcpConfigAcfcFactory(this);\n\n // Register LCP packet parser factories\n new LcpPacketConfigureFactory(this, configFactories, Types.REQ);\n new LcpPacketConfigureFactory(this, configFactories, Types.ACK);\n new LcpPacketConfigureFactory(this, configFactories, Types.NAK);\n new LcpPacketConfigureFactory(this, configFactories, Types.REJ);\n new LcpPacketTerminateFactory(this, LcpPacketTerminateFactory.Types.REQ);\n new LcpPacketTerminateFactory(this, LcpPacketTerminateFactory.Types.ACK);\n \n }",
"public Stack() {\r\n this(20);\r\n }",
"public Node() {\r\n\t}",
"public Node() {\r\n\t}",
"public UdpPacketSender() {\r\n\t\ttry {\r\n\t\t\tthis.socket = new DatagramSocket();\r\n\t\t} catch (final SocketException e) {\r\n\t\t\tlog.log(Level.SEVERE, e.getMessage(), e);\r\n\t\t}\r\n\t}",
"public Message(){}",
"protected Block(short id) {\n this(id, (byte) 0);\n }",
"public Message() {}",
"public Message() {}",
"public PaymentCard() {\n\t}",
"DnsMessage(int id) {\n header = newHeader(id);\n }",
"public Stack() {\r\n\t\tthis(capacity);\r\n\t}",
"public RoutePacket(int data_length, int base_offset) {\n super(data_length, base_offset);\n amTypeSet(AM_TYPE);\n }",
"public Node() {\n }",
"public Mocket()\n throws IOException\n {\n init (null);\n }",
"public Node(){}",
"protected Tile() {\n super();\n }",
"public StackImpl() {\r\n\t\t\r\n\t}",
"public ProtoVehicle() {\n super();\n }",
"@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }",
"public Generic(){\n\t\tthis(null);\n\t}",
"defaultConstructor(){}",
"public PingWebSocketFrame(ByteBuf binaryData) {\n/* 40 */ super(binaryData);\n/* */ }",
"public Node() {}",
"public Node() {}",
"public Node() {}",
"public Node() {}",
"public Node(){\n\n\t\t}",
"public Player()\n // POST: A default Player object is created with all class members set to 0\n\t{\n\t\tthis(2000, 0);\n\t}"
] | [
"0.8793962",
"0.7748382",
"0.72830826",
"0.7244727",
"0.7081021",
"0.70791566",
"0.70141655",
"0.7005786",
"0.6966049",
"0.6962662",
"0.6946647",
"0.6934468",
"0.68551326",
"0.6820514",
"0.6682915",
"0.66578573",
"0.66479796",
"0.66243356",
"0.6584366",
"0.6561475",
"0.65474635",
"0.6536999",
"0.6522072",
"0.6504422",
"0.65027875",
"0.6457966",
"0.6402347",
"0.63880163",
"0.63713104",
"0.6369696",
"0.6353659",
"0.63507205",
"0.63492894",
"0.6314293",
"0.6294491",
"0.62148774",
"0.6213078",
"0.6208727",
"0.6207696",
"0.6201853",
"0.6178144",
"0.6157273",
"0.61543787",
"0.6134498",
"0.61305785",
"0.6116608",
"0.61059237",
"0.60962236",
"0.6079778",
"0.6077567",
"0.60772127",
"0.6057291",
"0.60547465",
"0.60473007",
"0.6037613",
"0.603546",
"0.60331017",
"0.60301214",
"0.6026442",
"0.60139364",
"0.6008394",
"0.6007891",
"0.6007748",
"0.6007104",
"0.6006275",
"0.5981627",
"0.5963834",
"0.5961775",
"0.59610456",
"0.59412766",
"0.593412",
"0.59308",
"0.5929771",
"0.592843",
"0.592843",
"0.5923108",
"0.5922579",
"0.5917284",
"0.5916092",
"0.5916092",
"0.5910979",
"0.59015316",
"0.5898692",
"0.58964723",
"0.5893484",
"0.58864194",
"0.5886093",
"0.58807456",
"0.5871021",
"0.58634317",
"0.5862286",
"0.5861503",
"0.58581215",
"0.5857441",
"0.5849484",
"0.5849484",
"0.5849484",
"0.5849484",
"0.58480346",
"0.58459693"
] | 0.67665833 | 14 |
Adds an MPLS header to a packet | public void addMPLSheader(MPLS header){
MPLSheader.add(header);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addHeader(String s, String s1) {\n\t\t\n\t}",
"private void addHeader() {\n \n \t\t// StartNr; Namn; #Varv; Totaltid; Varv1; Varv2; Varv3; Start;\n \t\t// Varvning1; Varvning2; Mål\n \n \t\tsb.append(\"Plac; StartNr; Namn; #Varv; Totaltid; \");\n \t\tfor (int i = 0; i < maxNbrOfLaps; i++) {\n \t\t\tsb.append(\"Varv\");\n \t\t\tsb.append(i + 1 + \"; \");\n \t\t}\n \t\tsb.append(\"\\n\");\n \t}",
"public void addHeader(String sipHeader) {\n String hdrString = sipHeader.trim() + \"\\n\";\n try {\n HeaderParser parser =\n ParserFactory.createParser(sipHeader);\n SIPHeader sh = parser.parse();\n this.attachHeader(sh,false);\n } catch (ParseException ex) {\n this.unrecognizedHeaders.add(hdrString);\n }\n }",
"public void addHeader(javax.sip.header.Header sipHeader) {\n \t// Content length is never stored. Just computed.\n SIPHeader sh = (SIPHeader) sipHeader;\n try {\n if (sipHeader instanceof ViaHeader) {\n attachHeader(sh,false,true);\n } else {\n attachHeader(sh,false,false);\n }\n } catch (SIPDuplicateHeaderException ex) {\n \t try {\n \t if (sipHeader instanceof ContentLength) {\n \t\tContentLength cl = (ContentLength) sipHeader;\n \t\tcontentLengthHeader.setContentLength(cl.getContentLength());\n \t }\n \t } catch (InvalidArgumentException e) {}\n }\n }",
"@Override\n public void addHeader(String arg0, String arg1) {\n\n }",
"void addHeader(String headerName, String headerValue);",
"public void addHeader(String key, String header);",
"public void setHeader(SIPHeaderList sipHeaderList) {\n this.setHeader((Header)sipHeaderList);\n }",
"public static void header(String s) {\n\t\t// header2.set(s);\n\t}",
"public abstract void addMimeHeader(String name, String value);",
"@Override\n\tpublic void addHeader(String name, String value) {\n\t}",
"void setHeader(java.lang.String header);",
"public MPLS popMPLSheader(){\r\n\t\treturn MPLSheader.poll();\r\n\t}",
"HttpClientRequest addHeader(CharSequence name, CharSequence value);",
"private void serializeHeader(ByteBuffer buffer){\n buffer.putShort(msgType); //2B\n if(srcIP==null) srcIP=\"\";\n String srcIP_temp = srcIP;\n for(int i=0; i<15-srcIP.length(); i++) {\n srcIP_temp = srcIP_temp + \" \";\n }\n buffer.put(srcIP_temp.getBytes()); //15B\n buffer.putInt(srcPort); //4B\n buffer.putFloat(desCost); //4B\n\n String desIP_temp = desIP;\n for(int i=0; i<15-desIP.length(); i++) {\n desIP_temp = desIP_temp + \" \";\n }\n buffer.put(desIP_temp.getBytes()); //15B\n buffer.putInt(desPort);\n }",
"LProtoHeader LProtoHeader(Token t, LProtoNameNode name, RoleDeclList rs,\n\t\t\tNonRoleParamDeclList ps);",
"public PacketHeader(byte buffer[])\n\t\t{\n\t\t\n\t\t}",
"public void addHeaderLine(String line) throws MessagingException {\n/* 493 */ throw new IllegalWriteException(\"POP3 messages are read-only\");\n/* */ }",
"public interface L3Header {\n\n int getMinimumHeaderLength();\n\n int getTotalLength(ByteBuffer packet);\n\n boolean isMatch(ByteBuffer packet);\n\n}",
"public void setPlayerListHeader ( String header ) {\n\t\texecute ( handle -> handle.setPlayerListHeader ( header ) );\n\t}",
"public void addToResponseHeader(String s) {\n\t\tif (!responseAdded) {\n\t\t\tthis.addedResponseHeaders = new ArrayList<String>();\n\t\t\tthis.responseAdded = true;\n\t\t}\n\t\tthis.addedResponseHeaders.add(s);\n\t}",
"private void attachHeader(SIPHeader h) {\n if (h == null) throw new IllegalArgumentException(\"null header!\");\n try {\n if (h instanceof SIPHeaderList) {\n SIPHeaderList hl = (SIPHeaderList) h;\n if (hl.isEmpty()) {\n return;\n }\n }\n attachHeader(h,false,false);\n } catch ( SIPDuplicateHeaderException ex) {\n // InternalErrorHandler.handleException(ex);\n }\n }",
"public SIPMessage() {\n this.unrecognizedHeaders = new LinkedList();\n this.headers = new LinkedList();\n nameTable = new Hashtable();\n \ttry {\n \tthis.attachHeader(new ContentLength(0),false);\n \t} catch (Exception ex) {}\n }",
"private void emitHeader(OutputStream stream) throws IOException {\n int header = 0x0;\n header |= WORKBUF_PROTOCOL_VERSION;\n stream.write(TfWorkbufProtocol.intToFourBytes(header));\n }",
"T addAtHead(T t) {\n return header.addAtHead(t);\n }",
"public void addHeader(String name, String value) throws MessagingException {\n/* 420 */ throw new IllegalWriteException(\"POP3 messages are read-only\");\n/* */ }",
"@Override\n public void setHeader(String arg0, String arg1) {\n\n }",
"public void setHeader(Header sipHeader) {\n SIPHeader header = (SIPHeader) sipHeader;\n if (header == null)\n throw new IllegalArgumentException(\"null header!\");\n try {\n if (header instanceof SIPHeaderList) {\n SIPHeaderList hl = (SIPHeaderList) header;\n // Ignore empty lists.\n if (hl.isEmpty()) return;\n }\n this.removeHeader(header.getHeaderName());\n attachHeader(header,true,false);\n } catch ( SIPDuplicateHeaderException ex) {\n InternalErrorHandler.handleException(ex);\n }\n }",
"public void addHeader(Header header) {\n mHeaderList.add(header);\n }",
"private void serverHeader(\n HttpHeaderFW header)\n {\n serverHeader |= header.name().value().equals(context.nameBuffer(54));\n }",
"private void write_adts_header(byte[] frame, int offset) {\n frame[offset] = (byte) 0xff;\n frame[offset + 1] = (byte) 0xf0;\n // versioin 0 for MPEG-4, 1 for MPEG-2 (1-bit)\n frame[offset + 1] |= 0 << 3;\n // layer 0 (2-bit)\n frame[offset + 1] |= 0 << 1;\n // protection absent: 1 (1-bit)\n frame[offset + 1] |= 1;\n // profile: audio_object_type - 1 (2-bit)\n frame[offset + 2] = (SrsAacObjectType.AacLC - 1) << 6;\n // sampling frequency index: 4 (4-bit)\n frame[offset + 2] |= (4 & 0xf) << 2;\n // channel configuration (3-bit)\n frame[offset + 2] |= (2 & (byte) 0x4) >> 2;\n frame[offset + 3] = (byte) ((2 & (byte) 0x03) << 6);\n // original: 0 (1-bit)\n frame[offset + 3] |= 0 << 5;\n // home: 0 (1-bit)\n frame[offset + 3] |= 0 << 4;\n // copyright id bit: 0 (1-bit)\n frame[offset + 3] |= 0 << 3;\n // copyright id start: 0 (1-bit)\n frame[offset + 3] |= 0 << 2;\n // frame size (13-bit)\n frame[offset + 3] |= ((frame.length - 2) & 0x1800) >> 11;\n frame[offset + 4] = (byte) (((frame.length - 2) & 0x7f8) >> 3);\n frame[offset + 5] = (byte) (((frame.length - 2) & 0x7) << 5);\n // buffer fullness (0x7ff for variable bitrate)\n frame[offset + 5] |= (byte) 0x1f;\n frame[offset + 6] = (byte) 0xfc;\n // number of data block (nb - 1)\n frame[offset + 6] |= 0x0;\n }",
"private void setupHeader(Message msg) throws MessagingException {\n }",
"public void addIntHeader(String s, int i) {\n\t\t\n\t}",
"void setHeader(String headerName, String headerValue);",
"public SecuritiesSettlementTransactionAllegementNotificationV02 addSplmtryData(SupplementaryData1 splmtryData) {\n getSplmtryData().add(splmtryData);\n return this;\n }",
"public PcapPktHdr() {\n\t\tthis.seconds = System.currentTimeMillis() / 1000; // In seconds\n\t\tthis.useconds = (int) (System.nanoTime() / 1000); // Microseconds\n\n\t\tthis.caplen = 0;\n\t\tthis.len = 0;\n\t}",
"private static String getPSMHeader() {\r\n return \"PSM No.\" + SEP\r\n + \"Spectrum title\" + SEP\r\n + \"Peptide Sequence\" + SEP\r\n + \"Protein Accession\" + SEP\r\n + \"Intensity Score\" + SEP\r\n + \"Matched Peaks\" + SEP;\r\n }",
"public void add(AisPacket p) {\n throw new UnsupportedOperationException(\"Stream is immutable\");// default stream is immutable.\n }",
"public void nextPacket(PcapHeader header, JBuffer buffer, T user);",
"private NetFlowHeader prepareHeader() throws IOException {\n NetFlowHeader internalHeader;\n int numBytesRead = 0;\n int lenRead = 0;\n WrappedByteBuf buf;\n byte[] headerArray;\n\n // Read header depending on stream version (different from flow version)\n if (streamVersion == 1) {\n // Version 1 has static header\n // TODO: verify header size for stream version 1\n lenRead = NetFlowHeader.S1_HEADER_SIZE - METADATA_LENGTH;\n internalHeader = new NetFlowHeader(streamVersion, byteOrder);\n } else {\n // Version 3 with dynamic header size\n headerArray = new byte[HEADER_OFFSET_LENGTH];\n numBytesRead = in.read(headerArray, 0, HEADER_OFFSET_LENGTH);\n if (numBytesRead != HEADER_OFFSET_LENGTH) {\n throw new UnsupportedOperationException(\"Short read while loading header offset\");\n }\n\n buf = WrappedByteBuf.init(headerArray, byteOrder);\n int headerSize = (int)buf.getUnsignedInt(0);\n if (headerSize <= 0) {\n throw new UnsupportedOperationException(\"Failed to load header of size \" + headerSize);\n }\n\n // Actual header length, determine how many bytes to read\n lenRead = headerSize - METADATA_LENGTH - HEADER_OFFSET_LENGTH;\n internalHeader = new NetFlowHeader(streamVersion, byteOrder, headerSize);\n }\n\n // allocate buffer for length to read\n headerArray = new byte[lenRead];\n numBytesRead = in.read(headerArray, 0, lenRead);\n if (numBytesRead != lenRead) {\n throw new UnsupportedOperationException(\"Short read while loading header data\");\n }\n // build buffer\n buf = WrappedByteBuf.init(headerArray, byteOrder);\n\n // resolve stream version (either 1 or 3)\n if (streamVersion == 1) {\n internalHeader.setFlowVersion((short)buf.getUnsignedShort(0));\n internalHeader.setStartCapture(buf.getUnsignedInt(2));\n internalHeader.setEndCapture(buf.getUnsignedInt(6));\n internalHeader.setHeaderFlags(buf.getUnsignedInt(10));\n internalHeader.setRotation(buf.getUnsignedInt(14));\n internalHeader.setNumFlows(buf.getUnsignedInt(18));\n internalHeader.setNumDropped(buf.getUnsignedInt(22));\n internalHeader.setNumMisordered(buf.getUnsignedInt(26));\n // Read hostname fixed bytes\n byte[] hostnameBytes = new byte[NetFlowHeader.S1_HEADER_HN_LEN];\n buf.getBytes(30, hostnameBytes, 0, hostnameBytes.length);\n internalHeader.setHostname(new String(hostnameBytes));\n // Read comments fixed bytes\n byte[] commentsBytes = new byte[NetFlowHeader.S1_HEADER_CMNT_LEN];\n buf.getBytes(30 + hostnameBytes.length, commentsBytes, 0, commentsBytes.length);\n internalHeader.setComments(new String(commentsBytes));\n\n // Dereference arrays\n hostnameBytes = null;\n commentsBytes = null;\n } else {\n // Resolve TLV (type-length value)\n // Set decode pointer to first tlv\n int dp = 0;\n int left = lenRead;\n // Smallest TLV is 2+2+0 (null TLV)\n // tlv_t - TLV type, tlv_l - TLV length, tlv_v - TLV value\n int tlv_t = 0;\n int tlv_l = 0;\n int tlv_v = 0;\n\n // Byte array for holding Strings\n byte[] pr;\n\n while (left >= 4) {\n // Parse type, store in host byte order\n tlv_t = buf.getUnsignedShort(dp);\n dp += 2;\n left -= 2;\n\n // Parse len, store in host byte order\n tlv_l = buf.getUnsignedShort(dp);\n dp += 2;\n left -= 2;\n\n // Parse val\n tlv_v = dp;\n\n // Point decode buffer at next tlv\n dp += tlv_l;\n left -= tlv_l;\n\n // TLV length check\n if (left < 0) {\n break;\n }\n\n switch(tlv_t) {\n // FT_TLV_VENDOR\n case 0x1:\n internalHeader.setVendor(buf.getUnsignedShort(tlv_v));\n break;\n // FT_TLV_EX_VER\n case 0x2:\n internalHeader.setFlowVersion((short) buf.getUnsignedShort(tlv_v));\n break;\n // FT_TLV_AGG_VER\n case 0x3:\n internalHeader.setAggVersion(buf.getUnsignedByte(tlv_v));\n break;\n // FT_TLV_AGG_METHOD\n case 0x4:\n internalHeader.setAggMethod(buf.getUnsignedByte(tlv_v));\n break;\n // FT_TLV_EXPORTER_IP\n case 0x5:\n internalHeader.setExporterIP(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_CAP_START\n case 0x6:\n internalHeader.setStartCapture(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_CAP_END\n case 0x7:\n internalHeader.setEndCapture(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_HEADER_FLAGS\n case 0x8:\n internalHeader.setHeaderFlags(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_ROT_SCHEDULE\n case 0x9:\n internalHeader.setRotation(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_FLOW_COUNT\n case 0xA:\n internalHeader.setNumFlows(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_FLOW_LOST\n case 0xB:\n internalHeader.setNumDropped(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_FLOW_MISORDERED\n case 0xC:\n internalHeader.setNumMisordered(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_PKT_CORRUPT\n case 0xD:\n internalHeader.setNumCorrupt(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_SEQ_RESET\n case 0xE:\n internalHeader.setSeqReset(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_CAP_HOSTNAME\n case 0xF:\n pr = new byte[tlv_l];\n buf.getBytes(tlv_v, pr, 0, pr.length);\n // Expected null-terminated string\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n\n internalHeader.setHostname(new String(pr, 0, pr.length - 1));\n break;\n // FT_TLV_COMMENTS\n case 0x10:\n pr = new byte[tlv_l];\n buf.getBytes(tlv_v, pr, 0, pr.length);\n // Expected null-terminated string\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n internalHeader.setComments(new String(pr, 0, pr.length - 1));\n break;\n // FT_TLV_IF_NAME\n case 0x11:\n // uint32_t, uint16_t, string:\n // - IP address of device\n // - ifIndex of interface\n // - interface name\n long ip = buf.getUnsignedInt(tlv_v);\n int ifIndex = buf.getUnsignedShort(tlv_v + 4);\n pr = new byte[tlv_l - 4 - 2];\n buf.getBytes(tlv_v + 4 + 2, pr, 0, pr.length);\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n internalHeader.setInterfaceName(ip, ifIndex, new String(pr, 0, pr.length - 1));\n break;\n // FT_TLV_IF_ALIAS\n case 0x12:\n // uint32_t, uint16_t, uint16_t, string:\n // - IP address of device\n // - ifIndex count\n // - ifIndex of interface (count times)\n // - alias name\n long aliasIP = buf.getUnsignedInt(tlv_v);\n int aliasIfIndexCnt = buf.getUnsignedShort(tlv_v + 4);\n int aliasIfIndex = buf.getUnsignedShort(tlv_v + 4 + 2);\n pr = new byte[tlv_l - 4 - 2 - 2];\n buf.getBytes(tlv_v + 4 + 2 + 2, pr, 0, pr.length);\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n\n internalHeader.setInterfaceAlias(aliasIP, aliasIfIndexCnt, aliasIfIndex,\n new String(pr, 0, pr.length - 1));\n break;\n // Case 0x0\n default:\n break;\n }\n }\n buf = null;\n pr = null;\n }\n return internalHeader;\n }",
"@Override\n public void addHeader(Div headerDiv)\n {\n getHeaders().add(headerDiv);\n headerDiv.addClass(JQLayoutCSSThemeBlockNames.UI_Layout_Header.toString());\n //getChildren().add(headers.size() - 1, headerDiv);\n }",
"public void setHeaders(java.util.List headers) {\n ListIterator listIterator = headers.listIterator();\n while(listIterator.hasNext()) {\n SIPHeader sipHeader = (SIPHeader) listIterator.next();\n try {\n this.attachHeader(sipHeader,false);\n } catch (SIPDuplicateHeaderException ex) {}\n }\n }",
"protected void addPreamble()\n {\n openStartTag(xmlType());\n addSpace();\n addKeyValuePair(VERSION, \"1.0\");\n addSpace();\n addKeyValuePair(PRS_ID, \"PRS\" + System.currentTimeMillis());\n addSpace();\n addKeyValuePair(LOCALE, getLocale());\n closeTag();\n }",
"public void setHeader(String header) {\n this.header = header;\n }",
"private synchronized void create_head(){\n\t\t// Take current time\n\t\thead_time = System.currentTimeMillis();\n\t\tdouble lcl_head_time = head_time/1000.0;\n\t\tString time = Double.toString(lcl_head_time);\n\t\t \n\t\theader.append(\"protocol: 1\\n\");\n\t\theader.append(\"experiment-id: \" + oml_exp_id + \"\\n\");\n\t\theader.append(\"start_time: \" + time + \"\\n\");\n\t\theader.append(\"sender-id: \" + oml_name + \"-sender\\n\");\n\t\theader.append(\"app-name: \" + oml_app_name + \"\\n\");\n\t}",
"public void fillHeader(ByteBuffer buffer) {\n buffer.put((byte) (this.version << 4 | this.internetHeaderLen));\n buffer.put((byte) this.DSCP);\n buffer.putShort((short) this.headerLen);\n\n buffer.putInt(this.whyAreFlags3Bits);\n\n buffer.put((byte) this.timeToLive);\n buffer.put((byte) this.protocol);\n buffer.putShort((short) this.checksum);\n\n buffer.put(this.source.getAddress());\n buffer.put(this.target.getAddress());\n }",
"public Encoding addHeader(String key, HeaderInfo value) {\n\t\theaders = mapBuilder(headers).sparse().add(key, value).build();\n\t\treturn this;\n\t}",
"public LsAcknowledge(OspfPacketHeader ospfHeader) {\n populateHeader(ospfHeader);\n }",
"public void setHeader(JMSControl.HeaderType type,Object value);",
"@Override\n public void addIntHeader(String arg0, int arg1) {\n\n }",
"private void decodeHeader(Packet p){\n \t// Client parent isn't null so client is authenticated\n \tif (client != null)\n \t\tp.header = client.getCrypt().decrypt(p.header);\n \t\n \tif(realm.getVersion() < Versions.VERSION_MOP){\n \t\tByteBuffer toHeader = ByteBuffer.allocate(6);\n \ttoHeader.order(ByteOrder.LITTLE_ENDIAN);\n \ttoHeader.put(p.header);\n \ttoHeader.position(0);\n \t\t\tp.size = (short) (toHeader.get() << 8);\n \t\t\tp.size |= toHeader.get() & 0xFF;\n \t\t\tp.size -= 4;\n \t\t\tp.nOpcode = (short) toHeader.getInt();\n \t p.header = toHeader.array();\n \t} else{\n \t\tif(client != null){\n \t\t\tByteBuffer toHeader = ByteBuffer.allocate(4);\n \ttoHeader.order(ByteOrder.LITTLE_ENDIAN);\n \ttoHeader.put(p.header,0, 4);\n \ttoHeader.position(0);\n \tint header = toHeader.getInt();\n \t\tint size = ((header >> 13));\n \t\tint opcode = (header & 0x1FFF);\n \t \tp.header[0] = (byte)(0xFF & size);\n \t \tp.header[1] = (byte)(0xFF & (size >> 8));\n \t \tp.header[2] = (byte)(0xFF & opcode);\n \t \tp.header[3] = (byte)(0xFF & (opcode >> 8));\n \t\t}\n \t\t\n \t\tByteBuffer toHeader = ByteBuffer.allocate((realm.getVersion() <= Versions.VERSION_CATA) ? 6 : 4);\n \ttoHeader.order(ByteOrder.LITTLE_ENDIAN);\n \ttoHeader.put(p.header, 0, (realm.getVersion() <= Versions.VERSION_CATA) ? 6 : 4);\n \ttoHeader.position(0);\n \n \t p.size = toHeader.getShort();\n \tp.nOpcode = toHeader.getShort();\n \tp.header = toHeader.array();\n \t}\n \n }",
"public void setHeader(String _header) {\n\t\tthis.header = _header;\n\t}",
"public void setHeader(String header) {\n\t\t_header = header;\n\t}",
"private void addRecordHeader()\n {\n addIndent();\n openStartTag(RECORD);\n addSpace();\n addKeyValuePair(RECORD_PROFILE_ID, \"\" + m_recProf.getId());\n addSpace();\n addKeyValuePair(SEQ_NUM, \"SN\" + m_seqNum++);\n closeTag();\n }",
"public abstract void setMimeHeader(String name, String value);",
"RequestBuilder addHeaderParameter(String key, String value);",
"public void attachHeader( SIPHeader header,\n boolean replaceFlag, boolean top)\n throws SIPDuplicateHeaderException {\n if (header == null) {\n throw new NullPointerException(\"null header\");\n }\n \n SIPHeader h;\n \n if (ListMap.hasList(header) &&\n ! SIPHeaderList.class.isAssignableFrom(header.getClass())) {\n SIPHeaderList hdrList = ListMap.getList(header);\n hdrList.add(header);\n h = hdrList;\n } else {\n h = header;\n }\n \n if (replaceFlag) {\n nameTable.remove(header.getName().toLowerCase());\n } else if (nameTable.containsKey(header.getName().toLowerCase()) &&\n ! (h instanceof SIPHeaderList)){\n \t\tif (h instanceof ContentLength) {\n \t \t try {\n \t\t ContentLength cl = (ContentLength) header;\n \t\t contentLengthHeader.setContentLength(cl.getContentLength());\n \t \t } catch (InvalidArgumentException e) {}\n \t\t}\n \t\t// Just ignore duplicate header.\n \t\treturn;\n }\n \n SIPHeader originalHeader = (SIPHeader)getHeader(header.getName());\n \n // Delete the original header from our list structure.\n if (originalHeader != null) {\n ListIterator li = headers.listIterator();\n \n while (li.hasNext()) {\n SIPHeader next = (SIPHeader) li.next();\n if (next.equals(originalHeader)) {\n li.remove();\n }\n }\n }\n \n \n if (getHeader(header.getName()) == null) {\n nameTable.put(header.getName().toLowerCase(),h);\n headers.add(h);\n } else {\n if (h instanceof SIPHeaderList) {\n SIPHeaderList hdrlist = (SIPHeaderList) nameTable.get\n (header.getName().toLowerCase());\n if (hdrlist != null) hdrlist.concatenate((SIPHeaderList)h,top);\n else nameTable.put(h.getName().toLowerCase(),h);\n } else {\n nameTable.put(h.getName().toLowerCase(),h);\n }\n }\n \n // Direct accessor fields for frequently accessed headers.\n if (h instanceof From) {\n this.fromHeader = (From)h;\n } else if (h instanceof ContentLength) {\n this.contentLengthHeader = (ContentLength) h;\n } else if (h instanceof To) {\n this.toHeader = (To)h;\n } else if (h instanceof CSeq) {\n this.cSeqHeader = (CSeq) h;\n } else if (h instanceof CallID) {\n this.callIdHeader = (CallID) h;\n } else if (h instanceof MaxForwards) {\n this.maxForwardsHeader = (MaxForwards) h;\n \t}\n \n }",
"@Test\n\t\tpublic void testAddHeader() throws Exception{\n\t\t\temail.addHeader(this.goodHeaderName, this.goodHeaderValue);\n\t\t}",
"protected void setP1(byte p1) {\n\theader[2] = p1;\n }",
"public MPLS getFirstMPLS() {\r\n\t\treturn this.MPLSheader.peek();\r\n\t}",
"public void parseHeader() {\n\t\tthis.release = (Integer) this.headerData.get(0);\n\t\tthis.endian = (ByteOrder) this.headerData.get(1);\n\t\tthis.K = (Short) this.headerData.get(2);\n\t\tthis.datasetLabel = (String) this.headerData.get(4);\n\t\tthis.datasetTimeStamp = (String) this.headerData.get(5);\n\t\tthis.mapOffset = (Integer) this.headerData.get(6);\n\t}",
"public void setHeader(String header) {\n\t\tthis.header = header;\n\t}",
"protected void addDynamicHeaders() {\n }",
"public T addHeader(String name,String value){\n if(TextUtils.isEmpty(name) || TextUtils.isEmpty(value)){\n throw new EasyNetException(\"header name or value is empty\");\n }\n if(headers == null){\n headers = new ArrayMap<>(5);\n }\n headers.put(name,value);\n return (T) this;\n }",
"@Override\n public void addHSL(float H, float S, float L) {\n\n }",
"public void addDateHeader(String s, long l) {\n\t\t\n\t}",
"public void headerRecord(RecordInput recordInput) {\n }",
"private static byte[] createHeader(int payloadLen, int psecret, int step, int studentID) {\n\t\tbyte[] header = new byte[ServerValuesHolder.HEADER_LENGTH];\n\t\tbyte[] payloadLen_b = new byte[4];\n\t\tbyte[] psecret_b = new byte[4];\n\t\tbyte[] step_b = new byte[2];\n\t\tbyte[] studentID_b = new byte[2];\n\t\t\n\t\t//convert to byte[]\n\t\tpayloadLen_b=ByteBuffer.allocate(4).putInt(payloadLen).array();\n\t\tpsecret_b=ByteBuffer.allocate(4).putInt(psecret).array();\n\t\tstep_b=ByteBuffer.allocate(4).putInt(step).array();\n\t\tstudentID_b=ByteBuffer.allocate(4).putInt(studentID).array();\n\t\t\n\t\t//copy to header\n\t\tSystem.arraycopy(payloadLen_b, 0, header, 0, 4);\n\t\tSystem.arraycopy(psecret_b, 0, header, 4, 4);\n\t\tSystem.arraycopy(step_b, 2, header, 8, 2);\n\t\tSystem.arraycopy(studentID_b, 2, header, 10, 2);\n\t\t\n\t\treturn header;\n\t}",
"public static byte[] addHeader(byte[] packet, int sequenceNumber, int eofFlag) {\n\t\tpacket[0] = (byte) (sequenceNumber >>> 8);\n\t\tpacket[1] = (byte) sequenceNumber;\n\t\tpacket[2] = (byte) eofFlag;\n\t\treturn packet;\n\t}",
"public void addHeader(String name, String value) {\n\t\t\tthis.header.put(name, value);\n\t\t}",
"HttpClientRequest header(CharSequence name, CharSequence value);",
"RequestBuilder addHeaderParameter(String key, List<String> values);",
"private static MessageHeader createMetaHeader(byte[] meta) {\n\t\tObject[] iov;\n\t\tif(meta != null) {\n\t\t\tiov = new Object[2];\n\t\t\tiov[0] = meta;\n\t\t\tiov[1] = JALP_BREAK_STR;\n\t\t} else {\n\t\t\tiov = new Object[1];\n\t\t\tiov[0] = JALP_BREAK_STR;\n\t\t}\n\n\t\tMessageHeader mh = new MessageHeader();\n\t\tmh.setIov(iov);\n\n\t\treturn mh;\n\t}",
"void addHeader(HttpServletResponse response, String name, String value);",
"public void add(String headerName, String headerValue)\r\n/* 342: */ {\r\n/* 343:509 */ List<String> headerValues = (List)this.headers.get(headerName);\r\n/* 344:510 */ if (headerValues == null)\r\n/* 345: */ {\r\n/* 346:511 */ headerValues = new LinkedList();\r\n/* 347:512 */ this.headers.put(headerName, headerValues);\r\n/* 348: */ }\r\n/* 349:514 */ headerValues.add(headerValue);\r\n/* 350: */ }",
"public void addHeader(String name, String value) {\n this.header.put(name, value);\n }",
"@Test\n public void headers() throws Exception {\n peer.sendFrame().settings(new Settings());\n peer.acceptFrame();// ACK\n\n peer.acceptFrame();// SYN_STREAM\n\n peer.acceptFrame();// PING\n\n peer.sendFrame().headers(false, 3, TestUtil.headerEntries(\"a\", \"android\"));\n peer.sendFrame().headers(false, 3, TestUtil.headerEntries(\"c\", \"c3po\"));\n peer.sendFrame().ping(true, 1, 0);\n peer.play();\n // play it back\n Http2Connection connection = connect(peer);\n Http2Stream stream = connection.newStream(TestUtil.headerEntries(\"b\", \"banana\"), true);\n connection.writePingAndAwaitPong();// Ensure that the HEADERS has been received.\n\n Assert.assertEquals(Headers.of(\"a\", \"android\"), stream.takeHeaders());\n Assert.assertEquals(Headers.of(\"c\", \"c3po\"), stream.takeHeaders());\n // verify the peer received what was expected\n MockHttp2Peer.InFrame synStream = peer.takeFrame();\n Assert.assertEquals(TYPE_HEADERS, synStream.type);\n MockHttp2Peer.InFrame ping = peer.takeFrame();\n Assert.assertEquals(TYPE_PING, ping.type);\n }",
"Header createHeader();",
"public void writeHeader() throws IOException, FileNotFoundException {\n\n EndianCorrectOutputStream ecs;\n ByteArrayOutputStream baos;\n FileOutputStream fos;\n short s, ss[];\n byte b, bb[], ext_blob[];\n int hsize;\n int i, n;\n int extlist[][];\n\n\n // header is 348 except nii and anz/hdr w/ extensions is 352\n hsize = Nifti1.ANZ_HDR_SIZE;\n if ((header.isDs_is_nii()) || (header.getExtension()[0] != 0)) {\n hsize += 4;\n }\n\n try {\n\n baos = new ByteArrayOutputStream(hsize);\n fos = new FileOutputStream(header.getDs_hdrname());\n\n ecs = new EndianCorrectOutputStream(baos, header.isBig_endian());\n\n\n ecs.writeIntCorrect(header.getSizeof_hdr());\n\n if (header.getData_type_string().length() >= 10) {\n ecs.writeBytes(header.getData_type_string().substring(0, 10));\n } else {\n ecs.writeBytes(header.getData_type_string().toString());\n for (i = 0; i < (10 - header.getData_type_string().length()); i++) {\n ecs.writeByte(0);\n }\n }\n\n if (header.getDb_name().length() >= 18) {\n ecs.writeBytes(header.getDb_name().substring(0, 18));\n } else {\n ecs.writeBytes(header.getDb_name().toString());\n for (i = 0; i < (18 - header.getDb_name().length()); i++) {\n ecs.writeByte(0);\n }\n }\n\n ecs.writeIntCorrect(header.getExtents());\n\n ecs.writeShortCorrect(header.getSession_error());\n\n ecs.writeByte((int) header.getRegular().charAt(0));\n\n b = packDimInfo(header.getFreq_dim(), header.getPhase_dim(), header.getSlice_dim());\n ecs.writeByte((int) b);\n\n for (i = 0; i < 8; i++) {\n ecs.writeShortCorrect(header.getDim()[i]);\n }\n\n for (i = 0; i < 3; i++) {\n ecs.writeFloatCorrect(header.getIntent()[i]);\n }\n\n ecs.writeShortCorrect(header.getIntent_code());\n\n ecs.writeShortCorrect(header.getDatatype());\n\n ecs.writeShortCorrect(header.getBitpix());\n\n ecs.writeShortCorrect(header.getSlice_start());\n\n for (i = 0; i < 8; i++) {\n ecs.writeFloatCorrect(header.getPixdim()[i]);\n }\n\n\n ecs.writeFloatCorrect(header.getVox_offset());\n\n ecs.writeFloatCorrect(header.getScl_slope());\n ecs.writeFloatCorrect(header.getScl_inter());\n\n ecs.writeShortCorrect(header.getSlice_end());\n\n ecs.writeByte((int) header.getSlice_code());\n\n ecs.writeByte((int) packUnits(header.getXyz_unit_code(), header.getT_unit_code()));\n\n\n ecs.writeFloatCorrect(header.getCal_max());\n ecs.writeFloatCorrect(header.getCal_min());\n\n ecs.writeFloatCorrect(header.getSlice_duration());\n\n ecs.writeFloatCorrect(header.getToffset());\n\n ecs.writeIntCorrect(header.getGlmax());\n ecs.writeIntCorrect(header.getGlmin());\n\n ecs.write(setStringSize(header.getDescrip(), 80), 0, 80);\n ecs.write(setStringSize(header.getAux_file(), 24), 0, 24);\n\n\n ecs.writeShortCorrect(header.getQform_code());\n ecs.writeShortCorrect(header.getSform_code());\n\n for (i = 0; i < 3; i++) {\n ecs.writeFloatCorrect(header.getQuatern()[i]);\n }\n for (i = 0; i < 3; i++) {\n ecs.writeFloatCorrect(header.getQoffset()[i]);\n }\n\n for (i = 0; i < 4; i++) {\n ecs.writeFloatCorrect(header.getSrow_x()[i]);\n }\n for (i = 0; i < 4; i++) {\n ecs.writeFloatCorrect(header.getSrow_y()[i]);\n }\n for (i = 0; i < 4; i++) {\n ecs.writeFloatCorrect(header.getSrow_z()[i]);\n }\n\n\n ecs.write(setStringSize(header.getIntent_name(), 16), 0, 16);\n ecs.write(setStringSize(header.getMagic(), 4), 0, 4);\n\n\n // nii or anz/hdr w/ ext. gets 4 more\n if ((header.isDs_is_nii()) || (header.getExtension()[0] != 0)) {\n for (i = 0; i < 4; i++) {\n ecs.writeByte((int) header.getExtension()[i]);\n }\n }\n\n /** write the header blob to disk */\n baos.writeTo(fos);\n\n } catch (IOException ex) {\n throw new IOException(\"Error: unable to write header file \" + header.getDs_hdrname() + \": \" + ex.getMessage());\n }\n\n\n\n /** write the extension blobs **/\n try {\n\n ////// extensions\n if (header.getExtension()[0] != 0) {\n\n baos = new ByteArrayOutputStream(Nifti1.EXT_KEY_SIZE);\n ecs = new EndianCorrectOutputStream(baos, header.isBig_endian());\n extlist = header.getExtensionsList();\n n = extlist.length;\n for (i = 0; i < n; i++) {\n // write size, code\n ecs.writeIntCorrect(extlist[i][0]);\n ecs.writeIntCorrect(extlist[i][1]);\n baos.writeTo(fos);\n baos.reset();\n\n // write data blob\n ext_blob = (byte[]) header.getExtension_blobs().get(i);\n fos.write(ext_blob, 0, extlist[i][0] - Nifti1.EXT_KEY_SIZE);\n }\n }\n\n fos.close();\n } catch (IOException ex) {\n throw new IOException(\"Error: unable to write header extensions for file \" + header.getDs_hdrname() + \": \" + ex.getMessage());\n }\n\n\n }",
"void xsetHeader(org.apache.xmlbeans.XmlString header);",
"protected void header(String s, boolean beforeLabel) {\n if (beforeLabel)\n System.out.println(\"before array: \" + s);\n else System.out.println(\"after array: \" + s);\n }",
"public void attachHeader( SIPHeader h, boolean replaceflag )\n throws SIPDuplicateHeaderException {\n this.attachHeader(h, replaceflag, false);\n }",
"@Override\n public void addHeaderView(View v) {\n if (mHeaderFooterHelper == null)\n mHeaderFooterHelper = new HeaderFooterHelper();\n int headerSize = getHeaderSize();\n mHeaderFooterHelper.addHeaderView(v);\n notifyItemInserted(headerSize);\n }",
"public void setHeader(String name, String value) throws MessagingException {\n/* 402 */ throw new IllegalWriteException(\"POP3 messages are read-only\");\n/* */ }",
"protected void parseFlvSequenceHeader(byte[] data) throws UnsupportedOperationException, IOException {\n // Sound format: first 4 bits\n final int soundFormatInt = (data[0] >>> 4) & 0x0f;\n try {\n audioFormat = AudioFormat.valueOf(soundFormatInt);\n } catch (IllegalArgumentException ex) {\n throw new UnsupportedOperationException(\"Sound format not supported: \" + soundFormatInt);\n }\n switch (audioFormat) {\n case AAC:\n delegateWriter = new AacWriter(out);\n break;\n case MP3:\n delegateWriter = new Mp3Writer(out);\n break;\n default:\n throw new UnsupportedOperationException(\"Sound format not supported: \" + audioFormat);\n }\n }",
"protected void updateHeader() {\n\t}",
"@Override\r\n\tpublic void loadHeader() {\n\r\n\t}",
"public static void writeHeader(DataOutput dos,SpectrumHeader spectrumHeader) throws IOException {\n\n\t\tdos.write(fileSignature);\n\t\tdos.writeInt(spectrumHeader.k);\n\t\tdos.writeLong(spectrumHeader.nkmers);\n\t}",
"public interface Header {\n\n short getId();\n\n String getPhone();\n\n short getNo();\n\n short getLength();\n\n EncryptType getEncryptType();\n}",
"public void setHeader(String header) {\n\t\tthis.header = header;\n\t\tthis.handleConfig(\"header\", header);\n\t}",
"public interface PrivacyHeader extends Header\n{\n\n /**\n * Name of PrivacyHeader\n */\n public final static String NAME = \"Privacy\";\n\n\n /**\n * Set Privacy header value\n * @param privacy -- privacy type to set.\n */\n public void setPrivacy(String privacy) throws ParseException;\n\n /**\n * Get Privacy header value\n * @return privacy token name\n */\n public String getPrivacy();\n\n\n}",
"public void addLinkStateHeader(LsaHeader lsaHeader) {\n if (!linkStateHeaders.contains(lsaHeader)) {\n linkStateHeaders.add(lsaHeader);\n }\n }",
"public Header( String headerCode) {\n\t\tsuper(tag(Header.class), headerCode); \n\t}",
"public void addRequestHeader(String name, String value);",
"public IPv6Header(int[] pkt) {\n this();\n for(int i = 0; i < Setting.values().length; i++) {\n String name = (Setting.values())[i].toString();\n setHeaderSetting(name,pkt);\n }\n }",
"private static MessageHeader createDataHeader(byte[] bufferBytes, int length) {\n\n\t\tObject[] iov = new Object[1];\n\n\t\tif (length != BUFFER_SIZE) {\n\t\t\tbyte[] lastBuffer = new byte[length];\n\t\t\tSystem.arraycopy(bufferBytes, 0, lastBuffer, 0, length);\n\t\t\tbufferBytes = lastBuffer;\n\t\t}\n\t\tiov[0] = bufferBytes;\n\n\t\tMessageHeader mh = new MessageHeader();\n\t\tmh.setIov(iov);\n\n\t\treturn mh;\n\t}",
"@Override\n public void addHeader(HeaderText headerDivString)\n {\n Div headerDiv = new Div();\n headerDiv.add(headerDivString);\n addHeader(headerDiv);\n }",
"public void writeHeader(int filelength, int shptype, SHPEnvelope mbr) throws IOException {\n\n header = new byte[ShapeConst.SHAPE_FILE_HEADER_LENGTH];\n\n ByteUtils.writeBEInt(header, 0, ShapeConst.SHAPE_FILE_CODE);\n ByteUtils.writeBEInt(header, 24, filelength / 2);\n ByteUtils.writeLEInt(header, 28, ShapeConst.SHAPE_FILE_VERSION);\n ByteUtils.writeLEInt(header, 32, shptype);\n ShapeUtils.writeBox(header, 36, mbr);\n\n rafShp.seek(0);\n rafShp.write(header, 0, ShapeConst.SHAPE_FILE_HEADER_LENGTH);\n }",
"public synchronized void setPreamble(String preamble) throws MessagingException {\n/* 396 */ this.preamble = preamble;\n/* */ }",
"public void addHeader(String name,String value)\n\t{\n\t\tmAdditionalHttpHeaders.put(name, value);\n\t}"
] | [
"0.6257059",
"0.6100692",
"0.6068293",
"0.5814382",
"0.5788572",
"0.5773261",
"0.5729729",
"0.570147",
"0.5664481",
"0.55612653",
"0.55041116",
"0.5487742",
"0.5450254",
"0.5422845",
"0.53824466",
"0.5379631",
"0.5348183",
"0.5331204",
"0.5320227",
"0.52685225",
"0.52622294",
"0.5253638",
"0.52254885",
"0.5217197",
"0.5199823",
"0.51602674",
"0.5160028",
"0.5148413",
"0.5145528",
"0.5128192",
"0.5118423",
"0.51056385",
"0.51013935",
"0.5057418",
"0.50240165",
"0.5018988",
"0.5008351",
"0.50026244",
"0.50009245",
"0.4980767",
"0.49744597",
"0.49556297",
"0.4942019",
"0.49353805",
"0.49335697",
"0.49270144",
"0.49194646",
"0.49127367",
"0.49115324",
"0.49102044",
"0.49054378",
"0.49011305",
"0.4890052",
"0.48701426",
"0.48686314",
"0.48606643",
"0.48597884",
"0.48592672",
"0.48440376",
"0.48303422",
"0.48222622",
"0.48208237",
"0.4814527",
"0.48012984",
"0.4794083",
"0.4790498",
"0.47808483",
"0.4771552",
"0.4769917",
"0.47608167",
"0.47590843",
"0.4752161",
"0.47493666",
"0.47480032",
"0.4747065",
"0.47399563",
"0.4731517",
"0.47158766",
"0.4712258",
"0.4698622",
"0.46955112",
"0.46809903",
"0.46797904",
"0.46727222",
"0.4671435",
"0.4670632",
"0.466564",
"0.46644065",
"0.46592999",
"0.46545044",
"0.46431434",
"0.4641997",
"0.46402714",
"0.46376708",
"0.46357968",
"0.4632106",
"0.46313548",
"0.46224335",
"0.46169493",
"0.4613867"
] | 0.7730241 | 0 |
Pops an MPLS header from the packet | public MPLS popMPLSheader(){
return MPLSheader.poll();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void decodeHeader(Packet p){\n \t// Client parent isn't null so client is authenticated\n \tif (client != null)\n \t\tp.header = client.getCrypt().decrypt(p.header);\n \t\n \tif(realm.getVersion() < Versions.VERSION_MOP){\n \t\tByteBuffer toHeader = ByteBuffer.allocate(6);\n \ttoHeader.order(ByteOrder.LITTLE_ENDIAN);\n \ttoHeader.put(p.header);\n \ttoHeader.position(0);\n \t\t\tp.size = (short) (toHeader.get() << 8);\n \t\t\tp.size |= toHeader.get() & 0xFF;\n \t\t\tp.size -= 4;\n \t\t\tp.nOpcode = (short) toHeader.getInt();\n \t p.header = toHeader.array();\n \t} else{\n \t\tif(client != null){\n \t\t\tByteBuffer toHeader = ByteBuffer.allocate(4);\n \ttoHeader.order(ByteOrder.LITTLE_ENDIAN);\n \ttoHeader.put(p.header,0, 4);\n \ttoHeader.position(0);\n \tint header = toHeader.getInt();\n \t\tint size = ((header >> 13));\n \t\tint opcode = (header & 0x1FFF);\n \t \tp.header[0] = (byte)(0xFF & size);\n \t \tp.header[1] = (byte)(0xFF & (size >> 8));\n \t \tp.header[2] = (byte)(0xFF & opcode);\n \t \tp.header[3] = (byte)(0xFF & (opcode >> 8));\n \t\t}\n \t\t\n \t\tByteBuffer toHeader = ByteBuffer.allocate((realm.getVersion() <= Versions.VERSION_CATA) ? 6 : 4);\n \ttoHeader.order(ByteOrder.LITTLE_ENDIAN);\n \ttoHeader.put(p.header, 0, (realm.getVersion() <= Versions.VERSION_CATA) ? 6 : 4);\n \ttoHeader.position(0);\n \n \t p.size = toHeader.getShort();\n \tp.nOpcode = toHeader.getShort();\n \tp.header = toHeader.array();\n \t}\n \n }",
"public MPLS getFirstMPLS() {\r\n\t\treturn this.MPLSheader.peek();\r\n\t}",
"public void cut_header()\n {\n String [] content= header.split(\"-\"); //cut one of the header when forward message back\n header=null;\n for(int i=0;i<content.length-1;i++)\n {\n header=header+\"-\"+content[i];\n }\n }",
"public void parseHeader() {\n\t\tthis.release = (Integer) this.headerData.get(0);\n\t\tthis.endian = (ByteOrder) this.headerData.get(1);\n\t\tthis.K = (Short) this.headerData.get(2);\n\t\tthis.datasetLabel = (String) this.headerData.get(4);\n\t\tthis.datasetTimeStamp = (String) this.headerData.get(5);\n\t\tthis.mapOffset = (Integer) this.headerData.get(6);\n\t}",
"public PcapPktHdr() {\n\t\tthis.seconds = System.currentTimeMillis() / 1000; // In seconds\n\t\tthis.useconds = (int) (System.nanoTime() / 1000); // Microseconds\n\n\t\tthis.caplen = 0;\n\t\tthis.len = 0;\n\t}",
"public void addMPLSheader(MPLS header){\r\n\t\tMPLSheader.add(header);\r\n\t}",
"void unsetHeader();",
"public std_msgs.msg.dds.Header getHeader()\n {\n return header_;\n }",
"public PacketHeader Receive(char[] data)\n\t{\n\t\tPacketHeader hdr = inHdr;\n\n\t\tinHdr.mLength = 0;\n\t\t//if (hdr.length != 0)\n\t\t//\tbcopy(inbox, data, hdr.length);\n\t\treturn hdr;\n\t}",
"LProtoHeader LProtoHeader(Token t, LProtoNameNode name, RoleDeclList rs,\n\t\t\tNonRoleParamDeclList ps);",
"public SIPMessage() {\n this.unrecognizedHeaders = new LinkedList();\n this.headers = new LinkedList();\n nameTable = new Hashtable();\n \ttry {\n \tthis.attachHeader(new ContentLength(0),false);\n \t} catch (Exception ex) {}\n }",
"public void removeHeader(String name) throws MessagingException {\n/* 435 */ throw new IllegalWriteException(\"POP3 messages are read-only\");\n/* */ }",
"public Header parseHeader(CharArrayBuffer buffer) throws ParseException {\n/* 445 */ return (Header)new BufferedHeader(buffer);\n/* */ }",
"private NetFlowHeader prepareHeader() throws IOException {\n NetFlowHeader internalHeader;\n int numBytesRead = 0;\n int lenRead = 0;\n WrappedByteBuf buf;\n byte[] headerArray;\n\n // Read header depending on stream version (different from flow version)\n if (streamVersion == 1) {\n // Version 1 has static header\n // TODO: verify header size for stream version 1\n lenRead = NetFlowHeader.S1_HEADER_SIZE - METADATA_LENGTH;\n internalHeader = new NetFlowHeader(streamVersion, byteOrder);\n } else {\n // Version 3 with dynamic header size\n headerArray = new byte[HEADER_OFFSET_LENGTH];\n numBytesRead = in.read(headerArray, 0, HEADER_OFFSET_LENGTH);\n if (numBytesRead != HEADER_OFFSET_LENGTH) {\n throw new UnsupportedOperationException(\"Short read while loading header offset\");\n }\n\n buf = WrappedByteBuf.init(headerArray, byteOrder);\n int headerSize = (int)buf.getUnsignedInt(0);\n if (headerSize <= 0) {\n throw new UnsupportedOperationException(\"Failed to load header of size \" + headerSize);\n }\n\n // Actual header length, determine how many bytes to read\n lenRead = headerSize - METADATA_LENGTH - HEADER_OFFSET_LENGTH;\n internalHeader = new NetFlowHeader(streamVersion, byteOrder, headerSize);\n }\n\n // allocate buffer for length to read\n headerArray = new byte[lenRead];\n numBytesRead = in.read(headerArray, 0, lenRead);\n if (numBytesRead != lenRead) {\n throw new UnsupportedOperationException(\"Short read while loading header data\");\n }\n // build buffer\n buf = WrappedByteBuf.init(headerArray, byteOrder);\n\n // resolve stream version (either 1 or 3)\n if (streamVersion == 1) {\n internalHeader.setFlowVersion((short)buf.getUnsignedShort(0));\n internalHeader.setStartCapture(buf.getUnsignedInt(2));\n internalHeader.setEndCapture(buf.getUnsignedInt(6));\n internalHeader.setHeaderFlags(buf.getUnsignedInt(10));\n internalHeader.setRotation(buf.getUnsignedInt(14));\n internalHeader.setNumFlows(buf.getUnsignedInt(18));\n internalHeader.setNumDropped(buf.getUnsignedInt(22));\n internalHeader.setNumMisordered(buf.getUnsignedInt(26));\n // Read hostname fixed bytes\n byte[] hostnameBytes = new byte[NetFlowHeader.S1_HEADER_HN_LEN];\n buf.getBytes(30, hostnameBytes, 0, hostnameBytes.length);\n internalHeader.setHostname(new String(hostnameBytes));\n // Read comments fixed bytes\n byte[] commentsBytes = new byte[NetFlowHeader.S1_HEADER_CMNT_LEN];\n buf.getBytes(30 + hostnameBytes.length, commentsBytes, 0, commentsBytes.length);\n internalHeader.setComments(new String(commentsBytes));\n\n // Dereference arrays\n hostnameBytes = null;\n commentsBytes = null;\n } else {\n // Resolve TLV (type-length value)\n // Set decode pointer to first tlv\n int dp = 0;\n int left = lenRead;\n // Smallest TLV is 2+2+0 (null TLV)\n // tlv_t - TLV type, tlv_l - TLV length, tlv_v - TLV value\n int tlv_t = 0;\n int tlv_l = 0;\n int tlv_v = 0;\n\n // Byte array for holding Strings\n byte[] pr;\n\n while (left >= 4) {\n // Parse type, store in host byte order\n tlv_t = buf.getUnsignedShort(dp);\n dp += 2;\n left -= 2;\n\n // Parse len, store in host byte order\n tlv_l = buf.getUnsignedShort(dp);\n dp += 2;\n left -= 2;\n\n // Parse val\n tlv_v = dp;\n\n // Point decode buffer at next tlv\n dp += tlv_l;\n left -= tlv_l;\n\n // TLV length check\n if (left < 0) {\n break;\n }\n\n switch(tlv_t) {\n // FT_TLV_VENDOR\n case 0x1:\n internalHeader.setVendor(buf.getUnsignedShort(tlv_v));\n break;\n // FT_TLV_EX_VER\n case 0x2:\n internalHeader.setFlowVersion((short) buf.getUnsignedShort(tlv_v));\n break;\n // FT_TLV_AGG_VER\n case 0x3:\n internalHeader.setAggVersion(buf.getUnsignedByte(tlv_v));\n break;\n // FT_TLV_AGG_METHOD\n case 0x4:\n internalHeader.setAggMethod(buf.getUnsignedByte(tlv_v));\n break;\n // FT_TLV_EXPORTER_IP\n case 0x5:\n internalHeader.setExporterIP(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_CAP_START\n case 0x6:\n internalHeader.setStartCapture(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_CAP_END\n case 0x7:\n internalHeader.setEndCapture(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_HEADER_FLAGS\n case 0x8:\n internalHeader.setHeaderFlags(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_ROT_SCHEDULE\n case 0x9:\n internalHeader.setRotation(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_FLOW_COUNT\n case 0xA:\n internalHeader.setNumFlows(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_FLOW_LOST\n case 0xB:\n internalHeader.setNumDropped(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_FLOW_MISORDERED\n case 0xC:\n internalHeader.setNumMisordered(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_PKT_CORRUPT\n case 0xD:\n internalHeader.setNumCorrupt(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_SEQ_RESET\n case 0xE:\n internalHeader.setSeqReset(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_CAP_HOSTNAME\n case 0xF:\n pr = new byte[tlv_l];\n buf.getBytes(tlv_v, pr, 0, pr.length);\n // Expected null-terminated string\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n\n internalHeader.setHostname(new String(pr, 0, pr.length - 1));\n break;\n // FT_TLV_COMMENTS\n case 0x10:\n pr = new byte[tlv_l];\n buf.getBytes(tlv_v, pr, 0, pr.length);\n // Expected null-terminated string\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n internalHeader.setComments(new String(pr, 0, pr.length - 1));\n break;\n // FT_TLV_IF_NAME\n case 0x11:\n // uint32_t, uint16_t, string:\n // - IP address of device\n // - ifIndex of interface\n // - interface name\n long ip = buf.getUnsignedInt(tlv_v);\n int ifIndex = buf.getUnsignedShort(tlv_v + 4);\n pr = new byte[tlv_l - 4 - 2];\n buf.getBytes(tlv_v + 4 + 2, pr, 0, pr.length);\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n internalHeader.setInterfaceName(ip, ifIndex, new String(pr, 0, pr.length - 1));\n break;\n // FT_TLV_IF_ALIAS\n case 0x12:\n // uint32_t, uint16_t, uint16_t, string:\n // - IP address of device\n // - ifIndex count\n // - ifIndex of interface (count times)\n // - alias name\n long aliasIP = buf.getUnsignedInt(tlv_v);\n int aliasIfIndexCnt = buf.getUnsignedShort(tlv_v + 4);\n int aliasIfIndex = buf.getUnsignedShort(tlv_v + 4 + 2);\n pr = new byte[tlv_l - 4 - 2 - 2];\n buf.getBytes(tlv_v + 4 + 2 + 2, pr, 0, pr.length);\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n\n internalHeader.setInterfaceAlias(aliasIP, aliasIfIndexCnt, aliasIfIndex,\n new String(pr, 0, pr.length - 1));\n break;\n // Case 0x0\n default:\n break;\n }\n }\n buf = null;\n pr = null;\n }\n return internalHeader;\n }",
"static void unwrapEthernet(byte[] packet) {\n System.out.println(\"--------Ethernet Header-----------\");\n int i = 0;\n\n System.out.println(\"Destination Mac Address = \" + getNByteAddress(packet, i, 6));\n i += 6;\n\n System.out.println(\"Source Mac Address = \" + getNByteAddress(packet, i, 6));\n i += 6;\n\n System.out.println(\"Length : \" + packet.length + \" bytes\");\n\n System.out.println(\"Ethertype: \" + getNextNBytesHex(packet, i, 2)); // TODO check other values\n i += 2;\n\n unwrapIP(packet, i);\n }",
"private void clearHeader(){\n\t\theader = new ChildMessage();\n\t}",
"public interface L3Header {\n\n int getMinimumHeaderLength();\n\n int getTotalLength(ByteBuffer packet);\n\n boolean isMatch(ByteBuffer packet);\n\n}",
"void dropPkt();",
"IAudioHeader readHeader(InputStream inputStream) throws AudioReaderException, InvalidFormatException;",
"public void\n removeHeader(String headerName, boolean top) {\n // System.out.println(\"removeHeader \" + headerName);\n SIPHeader toRemove =\n (SIPHeader) nameTable.get(headerName.toLowerCase());\n // nothing to do then we are done.\n if (toRemove == null) return;\n if (toRemove instanceof SIPHeaderList) {\n SIPHeaderList hdrList = (SIPHeaderList) toRemove;\n if (top) hdrList.removeFirst();\n else hdrList.removeLast();\n // Clean up empty list\n if (hdrList.isEmpty()) {\n ListIterator li = this.headers.listIterator();\n while (li.hasNext()) {\n SIPHeader sipHeader = (SIPHeader) li.next();\n if (sipHeader.getName().equalsIgnoreCase(headerName)) \n \t\t\tli.remove();\n }\n }\n } else {\n this.nameTable.remove(headerName.toLowerCase());\n if (toRemove instanceof From) {\n this.fromHeader = null;\n } else if (toRemove instanceof To) {\n this.toHeader = null;\n } else if (toRemove instanceof CSeq) {\n this.cSeqHeader = null;\n } else if (toRemove instanceof CallID) {\n this.callIdHeader = null;\n } else if (toRemove instanceof MaxForwards) {\n this.maxForwardsHeader = null;\n } else if (toRemove instanceof ContentLength) {\n this.contentLengthHeader = null;\n }\n ListIterator li = this.headers.listIterator();\n while (li.hasNext()) {\n SIPHeader sipHeader = (SIPHeader) li.next();\n if (sipHeader.getName().equalsIgnoreCase(headerName)) \n \t\t\tli.remove();\n }\n }\n \n }",
"java.lang.String getHeader();",
"void removeHeader(String headerName);",
"public void nextPacket(PcapHeader header, JBuffer buffer, T user);",
"public PHeader getHeader() {\n\t\treturn header;\n\t}",
"protected void parseFlvSequenceHeader(byte[] data) throws UnsupportedOperationException, IOException {\n // Sound format: first 4 bits\n final int soundFormatInt = (data[0] >>> 4) & 0x0f;\n try {\n audioFormat = AudioFormat.valueOf(soundFormatInt);\n } catch (IllegalArgumentException ex) {\n throw new UnsupportedOperationException(\"Sound format not supported: \" + soundFormatInt);\n }\n switch (audioFormat) {\n case AAC:\n delegateWriter = new AacWriter(out);\n break;\n case MP3:\n delegateWriter = new Mp3Writer(out);\n break;\n default:\n throw new UnsupportedOperationException(\"Sound format not supported: \" + audioFormat);\n }\n }",
"public ProtocolObject unpack(ByteBuffer inBuffer) {\n \tInteger payloadLength = inBuffer.getInt();\n \t\n \t// Styx by default uses length exclusive from the length header\n if(inBuffer.remaining() < payloadLength-HEADER_SIZE)\n throw new IllegalStateException(\"Packet not fully read! Want \" + payloadLength + \" bytes, available: \" + inBuffer.remaining());\n \n int classId = BinaryData.asUnsigned(inBuffer.get());\n ProtocolObject po = factory.create(classId);\n try {\n\t\t\tpo.load(new PacketInputStream(inBuffer));\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException(\"error unpacking buffer\", e);\n\t\t}\n\n return po;\n }",
"com.didiyun.base.v1.HeaderOrBuilder getHeaderOrBuilder();",
"public byte [] getTransportHeader_DL(int payloadLength) {\n byte [] packet = new byte[ETH_HEADER_SIZE];\n packet[0] = (byte)(_downloader_servicePort | 0x80);\n packet[1] = _downloader_servicePort ;\n packet[2] = control;\n //packet[3] = (byte) _interfaceKind.ordinal();\n packet[3] = (byte) 0x02;\n\n // length bytes, length is 2 bytes\n int Value0 = payloadLength & 0x00ff;\n int Value1 = payloadLength >> 8;\n packet[4] = (byte)Value0;\n packet[5] = (byte)Value1;\n packet[6] = (byte)_messageProtocol.ordinal();\n packet[7] = (byte)0;\n\n int xorValue = packet[0];\n\n packet[7] = GetTransportMessageCheckSum(packet);\n return packet;\n }",
"private void serializeHeader(ByteBuffer buffer){\n buffer.putShort(msgType); //2B\n if(srcIP==null) srcIP=\"\";\n String srcIP_temp = srcIP;\n for(int i=0; i<15-srcIP.length(); i++) {\n srcIP_temp = srcIP_temp + \" \";\n }\n buffer.put(srcIP_temp.getBytes()); //15B\n buffer.putInt(srcPort); //4B\n buffer.putFloat(desCost); //4B\n\n String desIP_temp = desIP;\n for(int i=0; i<15-desIP.length(); i++) {\n desIP_temp = desIP_temp + \" \";\n }\n buffer.put(desIP_temp.getBytes()); //15B\n buffer.putInt(desPort);\n }",
"@Override\n\t\tpublic String getHeader(String name) {\n\t\t\treturn null;\n\t\t}",
"static void unwrapIP(byte[] packet, int offset) {\n System.out.println(\"---------IP--------------\");\n\n int i = offset;\n\n System.out.println(\"Version : \" + ((packet[i] & 0xF0) >> 4));\n System.out.println(\"Header Length : \" + (packet[i] & 0x0F) * 4 + \" bytes\");\n int interHeaderLength = packet[i] & 0x0F;\n i += 1;\n\n String[] precedenceValues = {\"Routine\", \"Priority\", \"Immediate\", \"Flash\", \"Flash Override\", \"Critical\",\n \"Internetwork Control\", \"Network Control\"};\n System.out.println(\"Type of Service : \" + String.format(\"0x%02x\", Byte.toUnsignedInt(packet[i])));\n int precedenceNumber = ((packet[i] & 0b11100000) >> 5);\n int delay = ((packet[i] & 0b00010000) >> 4);\n int throughput = ((packet[i] & 0b00001000) >> 3);\n int reliability = ((packet[i] & 0b00000100) >> 2);\n int cost = ((packet[i] & 0b00000010) >> 1);\n int mbz = ((packet[i] & 0b00000001) >> 4);\n System.out.println(\"\\t xxx. .... = \" + precedenceNumber + \"(\" + precedenceValues[precedenceNumber] + \") (Precedence) \");\n System.out.printf(\"\\t ...%d .... = %s\\n\", delay, (delay == 0 ? \"Normal Delay\" : \"Low Delay\"));\n System.out.printf(\"\\t .... %d... = %s\\n\", throughput, (throughput == 0 ? \"Normal Throughput\" : \"High Throughput\"));\n System.out.printf(\"\\t .... .%d.. = %s\\n\", reliability, (reliability == 0 ? \"Normal Reliability\" : \"High Relia\"));\n System.out.printf(\"\\t .... ..%d. = %s\\n\", cost, (cost == 0 ? \"Normal Cost\" : \"Low Cost\"));\n System.out.printf(\"\\t .... ...%d = %s\\n\", mbz, \"Checking bit\");\n i += 1;\n\n System.out.println(\"Total Length : \" + getNextNBytesLong(packet, i, 2) + \" bytes\");\n i += 2;\n System.out.println(\"Identification : \" + getNextNBytesLong(packet, i, 2));\n i += 2;\n\n System.out.println(\"Flags : \" + String.format(\"0x%02X\", (packet[i] & 0b11100000) >> 5));\n int doFrag = ((packet[i] & 0b01000000) >> 6);\n int moreFrag = ((packet[i] & 0b00100000) >> 5);\n System.out.printf(\".%d.. .... = %s\\n\", doFrag, (doFrag == 0 ? \"ok to fragment \" : \"do not fragment\"));\n System.out.printf(\"..%d. .... = %s\\n\", moreFrag, (moreFrag == 1 ? \"more fragments \" : \"last fragment\"));\n\n System.out.println(\"Fragment Offset = \" +\n (((Byte.toUnsignedInt(packet[i]) & 0b00011111) << (3 + 8)) +\n Byte.toUnsignedInt(packet[i + 1]) + \" bytes\")\n );\n i += 2;\n\n System.out.println(\"Time to live: \" + Byte.toUnsignedInt(packet[i]) + \" seconds/hop\");\n i += 1;\n\n // Assuming only ICMP, TCP and UDP packets exist\n String packetProtocol = (packet[i] == 17 ? \"UDP\" : packet[i] == 1 ? \"ICMP\" : \"TCP\");\n System.out.println(\"Protocol : \" + packet[i] + \" (\" + packetProtocol + \")\");\n i += 1;\n\n System.out.println(\"Header Checksum : 0x\" + getNextNBytesHex(packet, i, 2));\n i += 2;\n\n offset = i + 4;\n System.out.print(\"Source Address: \");\n for (; i < offset; i++) {\n System.out.print(Byte.toUnsignedInt(packet[i]) + (i + 1 == offset ? \"\\n\" : \".\"));\n }\n\n offset = i + 4;\n System.out.print(\"Destination Address: \");\n for (; i < offset; i++) {\n System.out.print(Byte.toUnsignedInt(packet[i]) + (i + 1 == offset ? \"\\n\" : \".\"));\n }\n\n if (interHeaderLength > 5) {\n System.exit(42);//TODO add options\n } else {\n System.out.println(\"No Options\");\n }\n\n switch (packetProtocol) {\n case \"UDP\":\n unwrapUDP(packet, offset);\n break;\n case \"TCP\":\n unwrapTCP(packet, offset);\n break;\n case \"ICMP\":\n unwrapICMP(packet, offset);\n break;\n default:\n System.out.println(\"Unknown protocol\");\n System.exit(42);\n }\n }",
"static void unwrapTCP(byte[] packet, int i) {\n System.out.println(\"\\n----------TCP-----------\");\n System.out.println(\"Source Port : \" + getNextNBytesLong(packet, i, 2));\n i += 2;\n\n System.out.println(\"Destination Port : \" + getNextNBytesLong(packet, i, 2));\n i += 2;\n\n System.out.println(\"Sequence Number : \" + getNextNBytesLong(packet, i, 4));\n i += 4;\n\n System.out.println(\"Acknowledgement Number : \" + getNextNBytesLong(packet, i, 4));\n i += 4;\n\n System.out.println(\"Data Offset : \" +\n (((Byte.toUnsignedInt(packet[i]) & 0b11110000) >> 4)) + \" bytes\");\n i += 1;\n\n\n int isUrgent = ((packet[i] & 0b00100000) >> 5);\n int isAck = ((packet[i] & 0b00010000) >> 4);\n int isPush = ((packet[i] & 0b00001000) >> 3);\n int isReset = ((packet[i] & 0b00000100) >> 2);\n int isSyn = ((packet[i] & 0b00000010) >> 1);\n int isFin = ((packet[i] & 0b00000001));\n\n System.out.println(\"Flags : \" + Integer.toHexString(packet[i] & 0b00111111));\n System.out.printf(\"\\t..%d. .... = %s\\n\", isUrgent, (isUrgent == 1 ? \"URGENT \" : \"No urgent pointer\"));\n System.out.printf(\"\\t...%d .... = %s\\n\", isAck, (isAck == 1 ? \"Acknowledgement \" : \"No acknowledgment\"));\n System.out.printf(\"\\t.... %d... = %s\\n\", isPush, (isPush == 1 ? \"Push \" : \"No push\"));\n System.out.printf(\"\\t.... .%d.. = %s\\n\", isReset, (isReset == 1 ? \"Reset \" : \"no reset\"));\n System.out.printf(\"\\t.... ..%d. = %s\\n\", isSyn, (isSyn == 1 ? \"SYN \" : \"no syn\"));\n System.out.printf(\"\\t.... ...%d = %s\\n\", isFin, (isFin == 1 ? \"FIN \" : \"no fin\"));\n i += 1;\n\n System.out.println(\"Window = \" + getNextNBytesLong(packet, i, 2));\n i += 2;\n\n System.out.println(\"Checksum = 0x\" + getNextNBytesHex(packet, i, 2));\n i += 2;\n\n System.out.println(\"Urgent pointer = \" + getNextNBytesLong(packet, i, 2));\n i += 2;\n\n // TODO offset\n\n i += 2;\n while (i < packet.length) {\n System.out.println(getNextNBytesHex(packet, i, 16) + \"\\t\\t\\t\" + getAsciiRepresentation(packet, i, 16));\n i += 16;\n }\n }",
"protected void setP1(byte p1) {\n\theader[2] = p1;\n }",
"public void delHeader(String key);",
"public abstract void removeMimeHeader(String header);",
"static void unwrapICMP(byte[] packet, int i) {\n System.out.println(\"----------ICMP-------------\");\n System.out.println(\"Type : \" + getNextNBytesLong(packet, i++, 1));\n System.out.println(\"Code : \" + getNextNBytesLong(packet, i++, 1));\n System.out.println(\"Checksum : 0x\" + getNextNBytesHex(packet, i, 2));\n i += 2;\n\n System.out.println(\"Rest of Header:\");\n while (i < packet.length) {\n System.out.println(getNextNBytesHex(packet, i, 16) + \"\\t\\t\\t\" + getAsciiRepresentation(packet, i, 16));\n i += 16;\n }\n }",
"private void parsePacket() {\n\n // Request a new data buffer if no data is currently available.\n if (receiveBuffer == null) {\n socketHandle.read(DEFAULT_REQUEST_SIZE).addDeferrable(this, true);\n return;\n }\n\n // Attempt to parse the next packet. This can result in malformed message\n // exceptions which are passed back to the caller or buffer underflow exceptions\n // which result in a request for more data.\n final int startPosition = receiveBuffer.position();\n try {\n\n // Extract the main header byte and message length. If this fails the connection\n // is unrecoverable and must be closed.\n final int headerByte = 0xFF & receiveBuffer.get();\n final ControlPacketType controlPacketType = ControlPacketType.getControlPacketType(headerByte);\n if (controlPacketType == null) {\n throw new MalformedPacketException(\"Invalid control packet type\");\n }\n final int messageLength = VarLenQuantity.create(receiveBuffer).getValue();\n\n // Determine whether there is sufficient data in the buffer to parse the full\n // message. If not, request further data in an expanded buffer.\n if (messageLength > receiveBuffer.remaining()) {\n receiveBuffer.position(startPosition);\n fillReceiveBuffer(5 + messageLength);\n return;\n }\n\n // Parse the packet body, based on the known control packet type.\n ControlPacket parsedPacket;\n switch (controlPacketType) {\n case CONNECT:\n parsedPacket = ConnectPacket.parsePacket(messageLength, receiveBuffer);\n break;\n case CONNACK:\n parsedPacket = ConnackPacket.parsePacket(messageLength, receiveBuffer);\n break;\n case PUBLISH:\n parsedPacket = PublishPacket.parsePacket(headerByte, messageLength, receiveBuffer);\n break;\n case SUBSCRIBE:\n case UNSUBSCRIBE:\n parsedPacket = SubscribePacket.parsePacket(controlPacketType, messageLength, receiveBuffer);\n break;\n case SUBACK:\n parsedPacket = SubackPacket.parsePacket(messageLength, receiveBuffer);\n break;\n default:\n parsedPacket = ControlPacket.parsePacket(controlPacketType, messageLength, receiveBuffer);\n break;\n }\n\n // Include packet tracing if required.\n if (logger.getLogLevel() == Level.FINER) {\n logger.log(Level.FINER, \"RX \" + parsedPacket.tracePacket(false, false));\n } else if (logger.getLogLevel() == Level.FINEST) {\n logger.log(Level.FINEST, \"RX \" + parsedPacket.tracePacket(false, true));\n }\n\n // Hand off the received packet.\n deferredReceive.callback(parsedPacket);\n deferredReceive = null;\n\n // After parsing the packet, release any fully consumed buffers.\n if (!receiveBuffer.hasRemaining()) {\n socketService.releaseByteBuffer(receiveBuffer);\n receiveBuffer = null;\n }\n }\n\n // Request more data on a buffer underflow. This doubles the size of the request\n // buffer and then attempts to fill it.\n catch (final BufferUnderflowException error) {\n receiveBuffer.position(startPosition);\n fillReceiveBuffer(2 * receiveBuffer.remaining());\n }\n\n // Handle fatal errors.\n catch (final Exception error) {\n deferredReceive.errback(error);\n deferredReceive = null;\n }\n }",
"com.didiyun.base.v1.Header getHeader();",
"public String rplysetpkt(byte []p1,byte[] id1,byte[] T1,byte[] ip1,byte[] no1)\r\n\t{\n\t\treturn \"hi\";\r\n\t}",
"public Object removeFirst() {\r\n Object first = header.next.element;\r\n remove(header.next);\r\n return first;\r\n }",
"public void clearHeader() {\n\t\theader.setLength(0);\n\t}",
"public String getHeader();",
"public void unpack(MAVLinkPayload payload) {\n payload.resetIndex();\n\n this.p1x = payload.getFloat();\n\n this.p1y = payload.getFloat();\n\n this.p1z = payload.getFloat();\n\n this.p2x = payload.getFloat();\n\n this.p2y = payload.getFloat();\n\n this.p2z = payload.getFloat();\n\n this.frame = payload.getUnsignedByte();\n\n }",
"public ProtocolObject unpack(GameTransportPacket packet) {\n ProtocolObject gamePacket;\r\n gamePacket = styxDecoder.unpack(ByteBuffer.wrap(packet.gamedata));\r\n return gamePacket;\r\n }",
"@Test\n\tpublic void testDecodeFromStreamWithPauseInMiddleOfHeaders() throws Exception {\n\n\t\tByteArrayOutputStream bos = new ByteArrayOutputStream();\n\t\tString msg = \"POST /AppName HTTP/1.1\\r\\n\" + \"Content-Type: application/hl7-v2; charset=ISO-8859-2\\r\\n\" + \"Content-Length: \" + ourSampleMessage.getBytes(StandardCharsets.ISO_8859_1).length + \"\\r\\n\" + \"Authorization: Basic aGVsbG86d29ybGQ=\\r\\n\" + \"\\r\\n\";\n\t\tbos.write(msg.getBytes(StandardCharsets.ISO_8859_1));\n\t\tbos.write(ourSampleMessage.getBytes(\"ISO-8859-2\"));\n\t\tAbstractHl7OverHttpDecoder d = new Hl7OverHttpRequestDecoder();\n\n\t\tByteArrayInputStream bais = new ByteArrayInputStream(bos.toByteArray());\n\t\tSplitInputStream is = new SplitInputStream(bais, 30);\n\n\t\td.readHeadersAndContentsFromInputStreamAndDecode(is);\n\n\t\tassertEquals(0, bais.available());\n\t\tassertTrue(d.getConformanceProblems().toString(), d.getConformanceProblems().isEmpty());\n\t\tassertEquals(Charset.forName(\"ISO-8859-2\"), d.getCharset());\n\t\tassertTrue(d.isCharsetExplicitlySet());\n\t\tassertEquals(\"application/hl7-v2\", d.getContentType());\n\t\tassertEquals(ourSampleMessage, d.getMessage());\n\t\tassertEquals(\"hello\", d.getUsername());\n\t\tassertEquals(\"world\", d.getPassword());\n\t\tassertEquals(\"/AppName\", d.getPath());\n\n\t}",
"private static String getPSMHeader() {\r\n return \"PSM No.\" + SEP\r\n + \"Spectrum title\" + SEP\r\n + \"Peptide Sequence\" + SEP\r\n + \"Protein Accession\" + SEP\r\n + \"Intensity Score\" + SEP\r\n + \"Matched Peaks\" + SEP;\r\n }",
"public byte[] getFramePacket()\r\n/* 203: */ {\r\n/* 204:164 */ Packet211TileDesc pkt = new Packet211TileDesc();\r\n/* 205:165 */ pkt.subId = 9;\r\n/* 206:166 */ writeToPacket(pkt);\r\n/* 207:167 */ pkt.headout.write(pkt.subId);\r\n/* 208:168 */ return pkt.toByteArray();\r\n/* 209: */ }",
"public void removeHeader(String headerName) {\n \n if (headerName == null) throw new NullPointerException(\"null arg\");\n SIPHeader toRemove =\n (SIPHeader) nameTable.get(headerName.toLowerCase());\n // nothing to do then we are done.\n if (toRemove == null) return;\n nameTable.remove(headerName.toLowerCase());\n // Remove the fast accessor fields.\n if (toRemove instanceof From) {\n this.fromHeader = null;\n } else if (toRemove instanceof To) {\n this.toHeader = null;\n } else if (toRemove instanceof CSeq) {\n this.cSeqHeader = null;\n } else if (toRemove instanceof CallID) {\n this.callIdHeader = null;\n } else if (toRemove instanceof MaxForwards) {\n this.maxForwardsHeader = null;\n } else if (toRemove instanceof ContentLength) {\n this.contentLengthHeader = null;\n }\n \n ListIterator li = this.headers.listIterator();\n while (li.hasNext()) {\n SIPHeader sipHeader = (SIPHeader) li.next();\n if (sipHeader.getName().equalsIgnoreCase(headerName)) li.remove();\n \n }\n }",
"public byte[] getHeader() {\n\treturn header;\n }",
"@Test\n public void serverReadsHeadersDataHeaders() throws Exception {\n peer.sendFrame().settings(new Settings());\n peer.acceptFrame();// ACK\n\n peer.acceptFrame();// SYN_STREAM\n\n peer.acceptFrame();// DATA\n\n peer.acceptFrame();// HEADERS\n\n peer.sendFrame().headers(true, 3, TestUtil.headerEntries(\"a\", \"android\"));\n peer.acceptFrame();// PING\n\n peer.sendFrame().ping(true, 1, 0);// PING\n\n peer.play();\n // play it back\n Http2Connection connection = connect(peer);\n Http2Stream stream = connection.newStream(TestUtil.headerEntries(\"b\", \"banana\"), true);\n BufferedSink out = Okio.buffer(stream.getSink());\n out.writeUtf8(\"c3po\");\n out.close();\n stream.writeHeaders(TestUtil.headerEntries(\"e\", \"elephant\"), false, false);\n connection.writePingAndAwaitPong();\n Assert.assertEquals(0, connection.openStreamCount());\n // verify the peer received what was expected\n MockHttp2Peer.InFrame synStream = peer.takeFrame();\n Assert.assertEquals(TYPE_HEADERS, synStream.type);\n Assert.assertFalse(synStream.outFinished);\n Assert.assertEquals(3, synStream.streamId);\n Assert.assertEquals((-1), synStream.associatedStreamId);\n Assert.assertEquals(TestUtil.headerEntries(\"b\", \"banana\"), synStream.headerBlock);\n MockHttp2Peer.InFrame requestData = peer.takeFrame();\n Assert.assertArrayEquals(\"c3po\".getBytes(StandardCharsets.UTF_8), requestData.data);\n MockHttp2Peer.InFrame nextFrame = peer.takeFrame();\n Assert.assertEquals(TestUtil.headerEntries(\"e\", \"elephant\"), nextFrame.headerBlock);\n }",
"public void fillHeader(ByteBuffer buffer) {\n buffer.put((byte) (this.version << 4 | this.internetHeaderLen));\n buffer.put((byte) this.DSCP);\n buffer.putShort((short) this.headerLen);\n\n buffer.putInt(this.whyAreFlags3Bits);\n\n buffer.put((byte) this.timeToLive);\n buffer.put((byte) this.protocol);\n buffer.putShort((short) this.checksum);\n\n buffer.put(this.source.getAddress());\n buffer.put(this.target.getAddress());\n }",
"public String getHeaderType() { return \"modem\"; }",
"public VCFHeader getHeader();",
"@Override\n public ByteBuffer getIppHeader(URL url) throws UnsupportedEncodingException {\n return getIppHeader(url, createAttributeMap());\n }",
"@Override\n public IRecord procHeader(IRecord r)\n {\n return r;\n }",
"private void emitHeader(OutputStream stream) throws IOException {\n int header = 0x0;\n header |= WORKBUF_PROTOCOL_VERSION;\n stream.write(TfWorkbufProtocol.intToFourBytes(header));\n }",
"public void rplybkpkt(byte[]rply) \r\n\t{\n\t}",
"public AbstractPacketDO getPacket() {\n\t\tString headers = headerTableModel.getHeaders();\n\n\t\t// get the xml content\n\t\tOutputStream os = new ByteArrayOutputStream();\n\t\ttm.prettyPrint(os);\n\t\tString xml = os.toString();\n\t\txml = xml.trim();\n\t\txml += \"\\n\";\n\n\t\tString content = \"\";\n\n\t\tif (headers.contains(\"Content-Length\")) {\n\t\t\tint contentLength = xml.getBytes().length;\n\t\t\theaders = headers.replaceAll(\"Content-Length:\\\\s\\\\d+\",\n\t\t\t\t\tString.format(\"Content-Length: %d\", contentLength));\n\t\t\tcontent = headers + \"\\r\\n\" + xml;\n\t\t} else {\n\t\t\tcontent = headers + \"\\r\\n\";\n\t\t}\n\n\t\tif (packet != null) {\n\t\t\tpacket.setData(content.getBytes());\n\t\t}\n\n\t\treturn packet;\n\t}",
"TupleHeader getHeader() {\n return header;\n }",
"public PacketHeader(byte buffer[])\n\t\t{\n\t\t\n\t\t}",
"String getHeader(String headerName);",
"@Override\r\n public String getMessageHeaderValueInOccurrence(int occurrence, String hdr) {\n return null;\r\n }",
"private static byte[] createHeader(int payloadLen, int psecret, int step, int studentID) {\n\t\tbyte[] header = new byte[ServerValuesHolder.HEADER_LENGTH];\n\t\tbyte[] payloadLen_b = new byte[4];\n\t\tbyte[] psecret_b = new byte[4];\n\t\tbyte[] step_b = new byte[2];\n\t\tbyte[] studentID_b = new byte[2];\n\t\t\n\t\t//convert to byte[]\n\t\tpayloadLen_b=ByteBuffer.allocate(4).putInt(payloadLen).array();\n\t\tpsecret_b=ByteBuffer.allocate(4).putInt(psecret).array();\n\t\tstep_b=ByteBuffer.allocate(4).putInt(step).array();\n\t\tstudentID_b=ByteBuffer.allocate(4).putInt(studentID).array();\n\t\t\n\t\t//copy to header\n\t\tSystem.arraycopy(payloadLen_b, 0, header, 0, 4);\n\t\tSystem.arraycopy(psecret_b, 0, header, 4, 4);\n\t\tSystem.arraycopy(step_b, 2, header, 8, 2);\n\t\tSystem.arraycopy(studentID_b, 2, header, 10, 2);\n\t\t\n\t\treturn header;\n\t}",
"public DNSHeader (BigEndianDecoder decoder)\n {\n\n this.id = decoder.decodeShort();\n this.flag = decoder.decodeShort();\n this.questionCount = decoder.decodeShort();\n this.answerCount = decoder.decodeShort();\n this.nameServerCount = decoder.decodeShort();\n this.additionalFullRRCount = decoder.decodeShort();\n\n }",
"@Override\n public IRecord procHeader(IRecord r) {\n return r;\n }",
"public static void header(String s) {\n\t\t// header2.set(s);\n\t}",
"public void printIcmpHeader(Byte[] data) {\n Byte[] icmpData = Arrays.copyOfRange(data, startByte, data.length);\n\n System.out.println(type + \"----- \" + type + \"Header -----\");\n System.out.println(type);\n\n Util util = new Util();\n\n String binary = util.byteArrToBinary(icmpData);\n\n // This is to keep track of where we left off from the last bit\n int startBit = 0;\n\n for (String title : dataTypes.keySet()) {\n int bitLen = dataTypes.get(title)[0];\n int processType = dataTypes.get(title)[1];\n int unitNum = dataTypes.get(title)[2];\n String binaryChunk = binary.substring(startBit, startBit + bitLen);\n\n printHeaderContent(title, processType, unitNum, binaryChunk);\n // Advance the cursor for keeping track of the bit\n startBit += bitLen;\n }\n System.out.println(type);\n }",
"private void setupHeader(Message msg) throws MessagingException {\n }",
"@Test\n public void headers() throws Exception {\n peer.sendFrame().settings(new Settings());\n peer.acceptFrame();// ACK\n\n peer.acceptFrame();// SYN_STREAM\n\n peer.acceptFrame();// PING\n\n peer.sendFrame().headers(false, 3, TestUtil.headerEntries(\"a\", \"android\"));\n peer.sendFrame().headers(false, 3, TestUtil.headerEntries(\"c\", \"c3po\"));\n peer.sendFrame().ping(true, 1, 0);\n peer.play();\n // play it back\n Http2Connection connection = connect(peer);\n Http2Stream stream = connection.newStream(TestUtil.headerEntries(\"b\", \"banana\"), true);\n connection.writePingAndAwaitPong();// Ensure that the HEADERS has been received.\n\n Assert.assertEquals(Headers.of(\"a\", \"android\"), stream.takeHeaders());\n Assert.assertEquals(Headers.of(\"c\", \"c3po\"), stream.takeHeaders());\n // verify the peer received what was expected\n MockHttp2Peer.InFrame synStream = peer.takeFrame();\n Assert.assertEquals(TYPE_HEADERS, synStream.type);\n MockHttp2Peer.InFrame ping = peer.takeFrame();\n Assert.assertEquals(TYPE_PING, ping.type);\n }",
"public short getParameter() throws TFTPPacketException;",
"private void parseHeader()\n throws IOException {\n\n while (headerPending) {\n\n // check if we have a complete line\n int eol = -1;\n while (eol < 0) {\n for (int i = 0; (eol < 0) && (i < nEncoded); ++i) {\n if (encoded[i] == '\\n') {\n eol = i;\n }\n } \n if (eol < 0) {\n // we don't have enough characters\n if (readEncodedBytes() < 0) {\n throw new IOException(\"missing uuencode header\");\n }\n }\n }\n \n if (eol == 0) {\n eol = 1;\n System.arraycopy(encoded, eol, encoded, 0, nEncoded - eol);\n nEncoded -= 1;\n } else\n if ((eol < 4) || (encoded[0] != 'b') || (encoded[1] != 'e')\n || (encoded[2] != 'g') || (encoded[3] != 'i') || (encoded[4] != 'n')) {\n // this is not the header line, skip it\n \t//System.out.println(\"eol:\" + eol);\n \t//System.out.println(\"srcpos: \" + (eol + 1) + \" \" + (nEncoded - eol));\n System.arraycopy(encoded, eol + 1, encoded, 0,\n nEncoded - eol);\n nEncoded -= eol;\n } else {\n\n // skip the whitespace characters\n int i = 5;\n while ((i < eol) && Character.isWhitespace((char) encoded[i])) {\n ++i;\n }\n\n if (((i + 2) < eol)\n && (encoded[i] >= '0') && (encoded[i] <= '7')\n && (encoded[i+1] >= '0') && (encoded[i+1] <= '7')\n && (encoded[i+2] >= '0') && (encoded[i+2] <= '7')) {\n \n // store the permissions\n userPerms = encoded[i] - '0';\n groupPerms = encoded[i+1] - '0';\n othersPerms = encoded[i+2] - '0';\n\n // in order to allow space in file names, uudecode as provided in\n // version 4.3.x of the GNU sharutils package uses a single space\n // between permissions and file name\n if (encoded[i+3] == ' ') {\n i += 4;\n\n // store the file name (which may contain space characters)\n StringBuffer buffer = new StringBuffer();\n while (i < eol) {\n buffer.append((char) encoded[i++]);\n }\n name = buffer.toString();\n\n // set up state for data decoding\n headerPending = false;\n System.arraycopy(encoded, eol + 1, encoded, 0, nEncoded - eol);\n nEncoded -= eol;\n firstQuantum = 1;\n current = 0;\n return;\n\n }\n }\n\n throw new IOException(\"malformed uuencode header\");\n\n }\n\n }\n\n }",
"public interface Packet {\n /**\n * Read body from byte buffer\n * @param bb \n * @throws java.lang.Exception \n */\n void readBody(ByteBuf bb, TranscoderContext context) throws Exception;\n \n /**\n * Write body to byte buffer\n * @param bb \n * @param context \n * @throws java.lang.Exception \n */\n void writeBody(ByteBuf bb, TranscoderContext context) throws Exception;\n \n /**\n * Calculate and return body size in bytes\n * @param context\n * @return \n */\n int calculateBodyLength(TranscoderContext context);\n \n /**\n * Calculate and set field with body length\n * @param context\n */\n void calculateAndSetBodyLength(TranscoderContext context);\n \n /**\n * Get body length from field\n * @return \n */\n int getBodyLength();\n\n /**\n * Get sequence number field value\n * @return \n */\n int getSequenceNumber();\n \n /**\n * Set sequence number field value\n * @param sequenceNumber \n */\n void setSequenceNumber(int sequenceNumber); \n}",
"T removeFromHead() {\n if (this.size() == 0) {\n throw new RuntimeException(\"Cannot remove from an empty list\");\n }\n return header.removeFromHead();\n }",
"private void addHeader() {\n \n \t\t// StartNr; Namn; #Varv; Totaltid; Varv1; Varv2; Varv3; Start;\n \t\t// Varvning1; Varvning2; Mål\n \n \t\tsb.append(\"Plac; StartNr; Namn; #Varv; Totaltid; \");\n \t\tfor (int i = 0; i < maxNbrOfLaps; i++) {\n \t\t\tsb.append(\"Varv\");\n \t\t\tsb.append(i + 1 + \"; \");\n \t\t}\n \t\tsb.append(\"\\n\");\n \t}",
"public void removeReceived() {\n\t if (LogWriter.needsLogging(LogWriter.TRACE_DEBUG))\n LogWriter.logMessage(LogWriter.TRACE_DEBUG, \"removeReceived()\" );\n Via via=(Via)sipHeader;\n via.removeParameter(Via.RECEIVED);\n }",
"public SecureMessageHeader getSecureMessageHeader() {\r\n\t\treturn this.secureMessageHeader;\r\n\t}",
"org.apache.xmlbeans.XmlString xgetHeader();",
"public String getHeader()\r\n\t{\r\n\t\treturn header;\r\n\t}",
"protected void parseHeaderLine(String unparsedLine) {\r\n\r\n\t\tif (DEBUG)\r\n\t\t\tSystem.out.println(\"HEADER LINE = \" + unparsedLine);\r\n\r\n\t\tStringTokenizer t = new StringTokenizer(unparsedLine, \" ,\\042\\011\");\r\n\t\tString tok = null;\r\n\r\n\t\tfor (int i = 0; t.hasMoreTokens(); i++) {\r\n\t\t\ttok = t.nextToken();\r\n\t\t\tif (DEBUG)\r\n\t\t\t\tSystem.out.println(\"token \" + i + \"=[\" + tok + \"]\");\r\n\t\t\tif (tok.equalsIgnoreCase(CHAN_HEADER)) {\r\n\t\t\t\t_chanIndex = i;\r\n\t\t\t\tif (DEBUG)\r\n\t\t\t\t\tSystem.out.println(\"chan_header=\" + i);\r\n\t\t\t}\r\n\t\t\tif (tok.equalsIgnoreCase(DIST_HEADER)) {\r\n\t\t\t\t_distIndex = i;\r\n\t\t\t\tif (DEBUG)\r\n\t\t\t\t\tSystem.out.println(\"dist_header=\" + i);\r\n\t\t\t}\r\n\t\t\tif (tok.equalsIgnoreCase(FILENAME_HEADER)) {\r\n\t\t\t\t_filenameIndex = i;\r\n\t\t\t\tif (DEBUG)\r\n\t\t\t\t\tSystem.out.println(\"filename_header=\" + i);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (DEBUG)\r\n\t\t\tSystem.out.println(\r\n\t\t\t\t\t\"_chanIndex, _distIndex, _filenameIndex=\" + _chanIndex + \",\" + _distIndex + \",\" + _filenameIndex);\r\n\r\n\t}",
"public void unsetSenderHeaderName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(SENDERHEADERNAME$24, 0);\n }\n }",
"private DecoderState readHeaders(ByteBuf in) {\n\n DecoderState nextState = DecoderState.READ_HEADERS;\n String line;\n\n // Read as long as we haven't reached the end of the headers (i.e.\n // the next state) and we have full lines to read.\n while (nextState == DecoderState.READ_HEADERS && (line = readLine(in))\n != null) {\n\n if (line.isEmpty()) {\n nextState = DecoderState.READ_BODY;\n }\n else {\n int pos = line.indexOf(COLON_CHAR);\n if (pos > 0) {\n String key = line.substring(0, pos);\n\n // The spec defines that only the first occurrance of a header\n // should be preserved in a single frame.\n if (!headers.getHeaderNames().contains(key)) {\n\n // Move past the colon delimiter.\n pos++;\n\n // Extract the value and decode header value as per the spec. Is\n // there a faster way to do this than a bunch of individual\n // replaces?\n String value = pos >= line.length() ? null : line.substring(pos).\n replace(OCTET_92_92, OCTET_92)\n .replace(OCTET_92_99, OCTET_58)\n .replace(OCTET_92_110, OCTET_10)\n .replace(OCTET_92_114, OCTET_13);\n\n headers.put(key, value);\n }\n }\n else {\n // Invalid frame. A header must contain a ':'.\n throw new CorruptedFrameException(\"Header must contain a name and \"\n + \"value separated by a colon character.\");\n }\n }\n }\n\n return nextState;\n }",
"public void getPackByte(DataPacket packet) {\n\t\t\tint limit = 10;\r\n\t\t\tint newFrameSep = 0x3c;\r\n\t\t\t// bytes avail = packet.getDataSize() - limit;\r\n\t\t\t// write(lbuf, limit, 32)\r\n\t\t\t// write(newFrame)\r\n\t\t\t// limit += 32;\r\n\t\t\t// check packet.getDataSize() - limit > 31\r\n\t\t\tbyte[] lbuf = new byte[packet.getDataSize()];\r\n\t\t\ttry {\r\n\t\t\tif ( packet.getDataSize() > 0)\r\n\r\n\t\t\t\tlbuf = packet.getDataAsArray();\r\n\t\t\t//first frame includes the 1 byte frame header whose value should be used \r\n\t\t\t// to write subsequent frame separators \r\n\r\n\r\n\t\t\t\t\tobuff.write(lbuf, limit, 32);\r\n\r\n\t\t\t\tlimit += 32;\r\n\t\t\t\r\n\t\t do {\r\n\r\n\t\t \t\t obuff.write(newFrameSep); \r\n\t\t\t\t\tobuff.write(lbuf, limit, 31);\r\n\t\t\t\t\tlimit += 31;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\r\n\t\t \t \r\n\t\t } while (packet.getDataSize() - limit > 31);\t\t\t\t\t\t\t\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}",
"public byte getP1() {\n\treturn (byte) (header[2] & 0xFF);\n }",
"public ChildMessage getHeader(){return header;}",
"private void dispatchWapPdu(byte[] pdu) {\n int index = 0;\n int transactionId = pdu[index++] & 0xFF;\n int pduType = pdu[index++] & 0xFF;\n int headerLength = 0;\n\n if ((pduType != WAP_PDU_TYPE_PUSH) &&\n (pduType != WAP_PDU_TYPE_CONFIRMED_PUSH)) {\n Log.w(TAG, \"Received non-PUSH WAP PDU. Type = \" + pduType);\n return;\n }\n\n /**\n * Parse HeaderLen(unsigned integer).\n * From wap-230-wsp-20010705-a section 8.1.2\n * The maximum size of a uintvar is 32 bits.\n * So it will be encoded in no more than 5 octets.\n */\n int temp = 0;\n do {\n temp = pdu[index++];\n headerLength = headerLength << 7;\n headerLength |= temp & 0x7F;\n } while ((temp & 0x80) != 0);\n\n int headerStartIndex = index;\n\n /**\n * Parse Content-Type.\n * From wap-230-wsp-20010705-a section 8.4.2.24\n *\n * Content-type-value = Constrained-media | Content-general-form\n * Content-general-form = Value-length Media-type\n * Media-type = (Well-known-media | Extension-Media) *(Parameter)\n * Value-length = Short-length | (Length-quote Length)\n * Short-length = <Any octet 0-30> (octet <= WAP_PDU_SHORT_LENGTH_MAX)\n * Length-quote = <Octet 31> (WAP_PDU_LENGTH_QUOTE)\n * Length = Uintvar-integer\n */\n // Parse Value-length.\n if ((pdu[index] & 0xff) <= WAP_PDU_SHORT_LENGTH_MAX) {\n // Short-length.\n index++;\n } else if (pdu[index] == WAP_PDU_LENGTH_QUOTE) {\n // Skip Length-quote.\n index++;\n // Skip Length.\n // Now we assume 8bit is enough to store the content-type length.\n index++;\n }\n String mimeType;\n switch (pdu[headerStartIndex])\n {\n case DRM_RIGHTS_XML:\n mimeType = DRM_RIGHTS_XML_MIME_TYPE;\n break;\n case DRM_RIGHTS_WBXML:\n mimeType = DRM_RIGHTS_WBXML_MIME_TYPE;\n break;\n case WAP_SI_MIME_PORT:\n // application/vnd.wap.sic\n mimeType = WAP_SI_MIME_TYPE;\n break;\n case WAP_SL_MIME_PORT:\n mimeType = WAP_SL_MIME_TYPE;\n break;\n case WAP_CO_MIME_PORT:\n mimeType = WAP_CO_MIME_TYPE;\n break;\n default:\n int start = index;\n\n // Skip text-string.\n // Now we assume the mimetype is Extension-Media.\n while (pdu[index++] != '\\0') {\n ;\n }\n mimeType = new String(pdu, start, index-start-1);\n break;\n }\n\n // XXX Skip the remainder of the header for now\n int dataIndex = headerStartIndex + headerLength;\n byte[] data;\n if (pdu[headerStartIndex] == WAP_CO_MIME_PORT)\n {\n // because SMSDispatcher can't parse push headers \"Content-Location\" and\n // X-Wap-Content-URI, so pass the whole push to CO application.\n data = pdu;\n } else\n {\n data = new byte[pdu.length - dataIndex];\n System.arraycopy(pdu, dataIndex, data, 0, data.length);\n }\n\n // Notify listeners about the WAP PUSH\n Intent intent = new Intent(Intents.WAP_PUSH_RECEIVED_ACTION);\n intent.setType(mimeType);\n intent.putExtra(\"transactionId\", transactionId);\n intent.putExtra(\"pduType\", pduType);\n intent.putExtra(\"data\", data);\n\n if (mimeType.equals(MMS_MIME_TYPE)) {\n mPhone.getContext().sendBroadcast(\n intent, \"android.permission.RECEIVE_MMS\");\n } else {\n mPhone.getContext().sendBroadcast(\n intent, \"android.permission.RECEIVE_WAP_PUSH\");\n }\n }",
"SmilHead getHead();",
"public NetFlowHeader getHeader() throws IOException {\n if (header == null) {\n header = prepareHeader();\n }\n\n return header;\n }",
"@Override\r\n public void dataPacketReceived(RtpSession session, RtpParticipantInfo participant, DataPacket packet) {\n \tgetPackByte(packet);\r\n \t\r\n // \tSystem.err.println(\"Ssn 1 packet seqn: typ: datasz \" +packet.getSequenceNumber() + \" \" +packet.getPayloadType() +\" \" +packet.getDataSize());\r\n // \tSystem.err.println(\"Ssn 1 packet sessn: typ: datasz \" + session.getId() + \" \" +packet.getPayloadType() +\" \" +packet.getDataSize());\r\n // latch.countDown();\r\n }",
"public Object getHeader() {\n return header;\n }",
"public void setPayload(byte[] pld) throws TFTPPacketException;",
"private DatagramPacket parsePacket(DatagramPacket packet) {\n byte[] dataPacket = packet.getData();\n /**\n * Code ported to use the new parseData(byte[]) function\n */\n byte[][] information = helper.parseData(dataPacket);\n System.out.println(\"Time: \" + System.currentTimeMillis() + \"\\t\" + \n \"sequence_number=\" + new String(information[1]));\n sequenceNo = Integer.parseInt(new String(information[1]));\n byte[] payload = information[2];\n if(new String(information[3]).trim().equalsIgnoreCase(\"END\"))\n lastPacket = true;\n if (!receivedPacketList.containsKey(sequenceNo)) {\n receivedPacketList.put(sequenceNo, payload);\n expectedList.remove(Integer.valueOf(sequenceNo));\n }\n else\n System.out.println(\"Time: \" + System.currentTimeMillis() + \"\\t\" + \"Packet repeat\");\n sequenceNo = (sequenceNo + 1) % Constants.WINDOW_SIZE;\n String ackString = \"ACK \" + sequenceNo + \" \\n\\r\";\n byte[] ackPacket = ackString.getBytes();\n DatagramPacket acknowledge = new DatagramPacket(ackPacket,\n ackPacket.length,\n ip,\n port\n );\n return acknowledge;\n }",
"private static HeaderData readHeader(byte[] data) throws UnknownHostException {\n\t\tInetAddress ip = InetAddress.getByAddress(Arrays.copyOfRange(data, 4, 8));\n\t\t\n\t\tString label = new String(Arrays.copyOfRange(data, 0, 4), Charset.forName(\"UTF-8\"));\n\n\t\tint port = 0;\n\t\tport += data[8] << 24 & 0xFF000000;\n\t\tport += data[9] << 16 & 0xFF0000;\n\t\tport += data[10] << 8 & 0xFF00;\n\t\tport += data[11] & 0xFF;\n\t\t\n\t\treturn new HeaderData(label, ip, port);\n\t}",
"ComponentHeaderType getHeader();",
"public byte [] getTransportHeader_Generic(int payloadLength) {\n byte [] packet = new byte[ETH_HEADER_SIZE];\n packet[0] = (byte)(_generic_servicePort | 0x80);\n packet[1] = _generic_servicePort ;\n packet[2] = control;\n //packet[3] = (byte) _interfaceKind.ordinal();\n packet[3] = (byte) 0x02;\n\n // length bytes, length is 2 bytes\n int Value0 = payloadLength & 0x00ff;\n int Value1 = payloadLength >> 8;\n packet[4] = (byte)Value0;\n packet[5] = (byte)Value1;\n packet[6] = (byte)_messageProtocol.ordinal();\n packet[7] = (byte)0;\n\n int xorValue = packet[0];\n\n packet[7] = GetTransportMessageCheckSum(packet);\n return packet;\n }",
"protected void handleHeaderFrame(DataInputStream payload) throws IOException {\n synchronized (command) {\n int classId = payload.readUnsignedShort();\n if (classId != command.getMethod().getClassId()) {\n //throw exception\n }\n int weight = payload.readUnsignedShort();\n if (weight != 0) {\n //throw exception\n }\n long bodySize = payload.readLong();\n ContentHeader contentHeader = new ContentHeader(bodySize);\n contentHeader.readProperties(payload);\n command.setContentHeader(contentHeader);\n if (bodySize != 0) {\n command.setCommandStatus(CommandStatus.EXPECTING_CONTENT_BODY);\n } else {\n command.setCommandStatus(CommandStatus.COMPLETE);\n handleCompleteCommand(command);\n }\n }\n }",
"public void clear() {\r\n modCount++;\r\n header.next = header.previous = header;\r\n size = 0;\r\n }",
"FJPacket( AutoBuffer ab, int ctrl ) { _ab = ab; _ctrl = ctrl; }",
"private void write_adts_header(byte[] frame, int offset) {\n frame[offset] = (byte) 0xff;\n frame[offset + 1] = (byte) 0xf0;\n // versioin 0 for MPEG-4, 1 for MPEG-2 (1-bit)\n frame[offset + 1] |= 0 << 3;\n // layer 0 (2-bit)\n frame[offset + 1] |= 0 << 1;\n // protection absent: 1 (1-bit)\n frame[offset + 1] |= 1;\n // profile: audio_object_type - 1 (2-bit)\n frame[offset + 2] = (SrsAacObjectType.AacLC - 1) << 6;\n // sampling frequency index: 4 (4-bit)\n frame[offset + 2] |= (4 & 0xf) << 2;\n // channel configuration (3-bit)\n frame[offset + 2] |= (2 & (byte) 0x4) >> 2;\n frame[offset + 3] = (byte) ((2 & (byte) 0x03) << 6);\n // original: 0 (1-bit)\n frame[offset + 3] |= 0 << 5;\n // home: 0 (1-bit)\n frame[offset + 3] |= 0 << 4;\n // copyright id bit: 0 (1-bit)\n frame[offset + 3] |= 0 << 3;\n // copyright id start: 0 (1-bit)\n frame[offset + 3] |= 0 << 2;\n // frame size (13-bit)\n frame[offset + 3] |= ((frame.length - 2) & 0x1800) >> 11;\n frame[offset + 4] = (byte) (((frame.length - 2) & 0x7f8) >> 3);\n frame[offset + 5] = (byte) (((frame.length - 2) & 0x7) << 5);\n // buffer fullness (0x7ff for variable bitrate)\n frame[offset + 5] |= (byte) 0x1f;\n frame[offset + 6] = (byte) 0xfc;\n // number of data block (nb - 1)\n frame[offset + 6] |= 0x0;\n }",
"public String getHeader() {\n\t\treturn _header;\n\t}",
"private void expectHeader(int length, PacketHandler handler) throws Exception {\n\t\tLog.d(TAG, \"expectHeader, length:\"+length+\",handler:\"+handler);\n\t\t\n\t\tif (length == 0) {\n\t\t\thandler.onPacket(null);\n\t\t\treturn;\n\t\t}\n\t\tthis.expectBuffer = (ByteBuffer) Util.chunkSlice(this.headerBuffer, this.expectOffset, this.expectOffset + length); /// this.headerBuffer.slice(this.expectOffset, this.expectOffset + length);\n\t\tthis.expectHandler = handler;\n\t\tint toRead = length;\n\t\twhile (toRead > 0 && this.overflow.size() > 0) {\n\t\t\tByteBuffer fromOverflow = this.overflow.remove(this.overflow.size() - 1); ///this.overflow.pop();\n\t\t\tif (toRead < fromOverflow.capacity()) this.overflow.add((ByteBuffer) Util.chunkSlice(fromOverflow, toRead, fromOverflow.capacity())/*fromOverflow.slice(toRead)*/);\n\t\t\tint read = Math.min(fromOverflow.capacity(), toRead);\n\n\t\t\tBufferUtil.fastCopy(read, (ByteBuffer) fromOverflow, this.expectBuffer, this.expectOffset);\n\n\t\t\tthis.expectOffset += read;\n\t\t\ttoRead -= read;\n\t\t}\n\t\t\n\t\tLog.d(TAG, \"expectHeader, expectBuffer:\"+expectBuffer+\",expectOffset:\"+expectOffset);\n\t\t\n\t}"
] | [
"0.62708956",
"0.55550104",
"0.5506377",
"0.54841655",
"0.5338778",
"0.5324107",
"0.5216382",
"0.52076554",
"0.5169057",
"0.51436913",
"0.51365334",
"0.5098239",
"0.5094649",
"0.506286",
"0.50346947",
"0.49864793",
"0.49657473",
"0.49553314",
"0.49184024",
"0.48890212",
"0.4881671",
"0.48439962",
"0.48424187",
"0.48269475",
"0.48206502",
"0.48161244",
"0.48123175",
"0.48087898",
"0.48012146",
"0.47968134",
"0.47889078",
"0.47612223",
"0.47570398",
"0.47520813",
"0.47514054",
"0.47449997",
"0.4707749",
"0.4706724",
"0.46942443",
"0.46910056",
"0.46843842",
"0.4674888",
"0.4646387",
"0.46462977",
"0.463601",
"0.46258545",
"0.46091065",
"0.46049345",
"0.45961994",
"0.45887247",
"0.45716488",
"0.45661724",
"0.4557394",
"0.45523417",
"0.4550449",
"0.4543632",
"0.45397902",
"0.45377302",
"0.45367828",
"0.4535975",
"0.45333385",
"0.45304242",
"0.4527872",
"0.45225805",
"0.4521503",
"0.45181152",
"0.45076197",
"0.45061585",
"0.45008984",
"0.44996995",
"0.44973376",
"0.44921404",
"0.44886038",
"0.44885466",
"0.44843477",
"0.44843006",
"0.44806263",
"0.4480431",
"0.44801435",
"0.44748932",
"0.4469021",
"0.4465224",
"0.44609696",
"0.44527748",
"0.44505146",
"0.4442072",
"0.44409043",
"0.4433637",
"0.44279358",
"0.44027513",
"0.4401098",
"0.43942663",
"0.43773752",
"0.4366102",
"0.43633467",
"0.43626043",
"0.43560097",
"0.43390888",
"0.43353125",
"0.43349546"
] | 0.78480417 | 0 |
Returns the source ip address of this packet | public int getSource(){
return this.source;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String sourceIPAddress() {\n return this.sourceIPAddress;\n }",
"public String getIpSource() {\n return getPropertyAsString(IP_SOURCE, \"\");\n }",
"java.lang.String getDestinationIp();",
"String getDestIpAddress() {\n return destIpAddress;\n }",
"public String getIp() {\n return getIpString(inetAddress);\n }",
"public String getIpAddress()\n\t{\n\t\t/* TODO: The IP address returned is in this format: /127.0.0.1:9845\n\t\t * Rewrite to remove the unnessecary data. */\n\t\treturn getSession().getIpAddress();\n\t}",
"java.lang.String getIp();",
"java.lang.String getIp();",
"java.lang.String getIp();",
"java.lang.String getIp();",
"java.lang.String getIp();",
"java.lang.String getIp();",
"java.lang.String getIp();",
"java.lang.String getIp();",
"public java.lang.String getDestinationIp() {\n java.lang.Object ref = destinationIp_;\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 destinationIp_ = s;\n return s;\n }\n }",
"public IPAddr getSender() {\n if (sender == null) {\n sender = new IPAddr(packet.getAddress());\n }\n return sender;\n }",
"public String getIp() {\n return (String) get(24);\n }",
"public java.lang.String getIpfrom() {\n return ipfrom;\n }",
"public java.lang.String getDestinationIp() {\n java.lang.Object ref = destinationIp_;\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 destinationIp_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"String getIpDst();",
"java.lang.String getSnIp();",
"java.lang.String getSnIp();",
"public String destinationIPAddress() {\n return this.destinationIPAddress;\n }",
"public InetAddress getIpAddress() \n\t{\n\t\treturn ipAddress;\n\t}",
"public int getIp() {\n return ip_;\n }",
"public int getIp() {\n return ip_;\n }",
"public int getIp() {\n return ip_;\n }",
"public String getIp() {\n Object ref = ip_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n ip_ = s;\n return s;\n }\n }",
"public int getIp() {\n return ip_;\n }",
"public String getIp() {\n Object ref = ip_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n ip_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }",
"public java.lang.String getIp() {\n java.lang.Object ref = ip_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n ip_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getIp() {\n java.lang.Object ref = ip_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n ip_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getIp() {\n java.lang.Object ref = ip_;\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 ip_ = s;\n return s;\n }\n }",
"public java.lang.String getIp() {\n java.lang.Object ref = ip_;\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 ip_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getIp() {\n java.lang.Object ref = ip_;\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 ip_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getIp() {\n java.lang.Object ref = ip_;\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 ip_ = s;\n }\n return s;\n }\n }",
"public String getSrcAddress1() {\r\n return (String) getAttributeInternal(SRCADDRESS1);\r\n }",
"@java.lang.Override\n public java.lang.String getIp() {\n java.lang.Object ref = ip_;\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 ip_ = s;\n return s;\n }\n }",
"public java.lang.String getIp() {\n java.lang.Object ref = ip_;\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 ip_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getIp() {\n java.lang.Object ref = ip_;\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 ip_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public int getSource() {\n\t\treturn source;\n\t}",
"public String sourceAddressPrefix() {\n return this.sourceAddressPrefix;\n }",
"public java.lang.String getIp() {\n java.lang.Object ref = ip_;\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 ip_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public int getInIp() {\n return instance.getInIp();\n }",
"public int getInIp() {\n return instance.getInIp();\n }",
"public String getLocalIpAddress()\n {\n \t\n \treturn null;\n }",
"public String getIpAddress() {\n return ipAddress;\n }",
"public String getIpAddress() {\n return ipAddress;\n }",
"public String getIp() {\n\t\treturn ip.getText();\n\t}",
"public String getIpAddress() {\n return ipAddress;\n }",
"public int getIp() {\n return instance.getIp();\n }",
"public int getIp() {\n return instance.getIp();\n }",
"public int getS1Ip() {\n return instance.getS1Ip();\n }",
"public java.lang.String getIp () {\r\n\t\treturn ip;\r\n\t}",
"public java.lang.String getIp () {\r\n\t\treturn ip;\r\n\t}",
"public long getSource()\r\n { return src; }",
"public String getSource() {\n Object ref = source_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n source_ = s;\n }\n return s;\n }\n }",
"public InetAddress getIP();",
"public java.lang.String getSnIp() {\n java.lang.Object ref = snIp_;\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 snIp_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getSnIp() {\n java.lang.Object ref = snIp_;\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 snIp_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getSnIp() {\n java.lang.Object ref = snIp_;\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 snIp_ = s;\n return s;\n }\n }",
"public java.lang.String getSnIp() {\n java.lang.Object ref = snIp_;\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 snIp_ = s;\n return s;\n }\n }",
"public int getS1Ip() {\n return s1Ip_;\n }",
"@Override\n\tpublic String getIp() {\n\t\treturn ip;\n\t}",
"String getIp();",
"String getIp();",
"public String getIp();",
"public int getInIp() {\n return inIp_;\n }",
"public int getInIp() {\n return inIp_;\n }",
"public String getIp() {\r\n return ip;\r\n }",
"public String getSource() {\n Object ref = source_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n source_ = s;\n }\n return s;\n } else {\n return (String) ref;\n }\n }",
"public java.lang.String getIp() {\r\n return ip;\r\n }",
"public String getIPAddress () {\n\t\treturn _ipTextField.getText();\n\t}",
"String getRemoteIpAddress();",
"private String getIpAddress() throws SocketException {\n String ip = null;\n\n Enumeration networkInterfaces = NetworkInterface.getNetworkInterfaces();\n\n while (networkInterfaces.hasMoreElements()) {\n NetworkInterface networkInterface = (NetworkInterface) networkInterfaces.nextElement();\n\n if (networkInterface.getName().equals(\"eth0\") || networkInterface.getName().equals(\"wlan0\")) {\n Enumeration inetAddresses = networkInterface.getInetAddresses();\n\n while (inetAddresses.hasMoreElements()) {\n InetAddress inetAddress = (InetAddress) inetAddresses.nextElement();\n if (inetAddress instanceof Inet4Address) {\n ip = inetAddress.getHostAddress();\n }\n }\n }\n }\n \n return ip;\n }",
"public String getIp() {\n return ip;\n }",
"public String getIp() {\n return ip;\n }",
"public static String getIP() {\n\t\treturn ip;\r\n\t}",
"java.lang.String getAgentIP();",
"public java.lang.String getSource() {\n java.lang.Object ref = source_;\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 source_ = s;\n return s;\n }\n }",
"public String getIp() {\n return ip;\n }",
"public String getIp() {\n return ip;\n }",
"public String getIp() {\n return ip;\n }",
"public String getIp() {\n return ip;\n }",
"public String getIp() {\n return ip;\n }",
"public String getIp() {\n return ip;\n }",
"public String getSource() {\n\t\treturn (String) _object.get(\"source\");\n\t}",
"public static String getLocalIpAddress() {\n\t\tInetAddress inetAddress = getLocalInetAddress();\n\t\tif (inetAddress != null) {\n\t\t\treturn inetAddress.getHostAddress();\n\t\t} else {\n\t\t\treturn \"\";\n\t\t}\n\t}",
"public Byte getSource() {\r\n return source;\r\n }",
"public String getIP() {\n return this.IP;\n }",
"public String ipAddress() {\n return this.ipAddress;\n }",
"public String get_ipaddress() throws Exception {\n\t\treturn this.ipaddress;\n\t}",
"public IpAddress getIpAddressValue() throws JNCException {\n return (IpAddress)getValue(\"ip-address\");\n }",
"String getOriginIpAddress() {\n return originIpAddress;\n }",
"com.google.protobuf.ByteString\n getDestinationIpBytes();",
"public int getSrc() {\n\t\treturn src;\n\t}",
"public long getSourceId() {\n return sourceId_;\n }",
"public java.lang.String getIP() {\r\n return IP;\r\n }",
"public long getSourceId() {\n return sourceId_;\n }",
"public String getSource() {\n return mSource;\n }"
] | [
"0.7909437",
"0.73024297",
"0.70414317",
"0.6731609",
"0.6729017",
"0.6650779",
"0.65836114",
"0.65836114",
"0.65836114",
"0.65836114",
"0.65836114",
"0.65836114",
"0.65836114",
"0.65836114",
"0.6564744",
"0.65327394",
"0.6531795",
"0.6524011",
"0.6514175",
"0.64923394",
"0.6481287",
"0.6481287",
"0.63850033",
"0.63699913",
"0.63684803",
"0.63684803",
"0.63684803",
"0.63562495",
"0.6354089",
"0.6335607",
"0.6329357",
"0.6329357",
"0.6322219",
"0.6318466",
"0.6318466",
"0.6318466",
"0.6316835",
"0.6314191",
"0.6310769",
"0.6309955",
"0.6309837",
"0.6296328",
"0.6290507",
"0.6261246",
"0.6261246",
"0.62547326",
"0.6230252",
"0.6230252",
"0.6225865",
"0.62187845",
"0.6217224",
"0.6217224",
"0.6214794",
"0.6205944",
"0.6205944",
"0.6204156",
"0.61975276",
"0.61974037",
"0.6194854",
"0.6194854",
"0.6184514",
"0.6184514",
"0.61637884",
"0.61595434",
"0.6158771",
"0.6158771",
"0.6151831",
"0.6128186",
"0.6128186",
"0.6114065",
"0.61134106",
"0.61078554",
"0.6104861",
"0.60963523",
"0.6089559",
"0.60848737",
"0.6081517",
"0.60769683",
"0.60685056",
"0.60571045",
"0.6049599",
"0.6049599",
"0.6049599",
"0.6049599",
"0.6049599",
"0.6049599",
"0.6045843",
"0.6045693",
"0.6042808",
"0.6027373",
"0.6007464",
"0.6006057",
"0.59980845",
"0.5993066",
"0.5988951",
"0.5987439",
"0.59870917",
"0.5985801",
"0.5982052",
"0.5973385"
] | 0.6188628 | 60 |
Returns the destination ip address of this packet | public int getDest(){
return this.dest;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getDestinationIp();",
"public String destinationIPAddress() {\n return this.destinationIPAddress;\n }",
"public java.lang.String getDestinationIp() {\n java.lang.Object ref = destinationIp_;\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 destinationIp_ = s;\n return s;\n }\n }",
"public java.lang.String getDestinationIp() {\n java.lang.Object ref = destinationIp_;\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 destinationIp_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"String getDestIpAddress() {\n return destIpAddress;\n }",
"com.google.protobuf.ByteString\n getDestinationIpBytes();",
"public com.google.protobuf.ByteString\n getDestinationIpBytes() {\n java.lang.Object ref = destinationIp_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n destinationIp_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"String getIpDst();",
"public com.google.protobuf.ByteString\n getDestinationIpBytes() {\n java.lang.Object ref = destinationIp_;\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 destinationIp_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public int getSqAnDestination() {\n if (packetHeader == null)\n return PacketHeader.BROADCAST_ADDRESS;\n return packetHeader.getDestination();\n }",
"String getDestinationAddress() {\n return this.resolvedDestination.destinationAddress;\n }",
"public InetSocketAddress getDestination () {\n\t\treturn origin;\n\t}",
"public Integer getDestination() {\n\t\treturn new Integer(destination);\n\t}",
"NetworkInterfaceIpConfiguration destinationNetworkInterfaceIpConfiguration();",
"public int getDestination() {\r\n\t\treturn destination;\r\n\t}",
"public String getIp() {\n return (String) get(24);\n }",
"public String sourceIPAddress() {\n return this.sourceIPAddress;\n }",
"public String getIp() {\n return getIpString(inetAddress);\n }",
"java.lang.String getIp();",
"java.lang.String getIp();",
"java.lang.String getIp();",
"java.lang.String getIp();",
"java.lang.String getIp();",
"java.lang.String getIp();",
"java.lang.String getIp();",
"java.lang.String getIp();",
"public int getDst() {\n\t\treturn dst;\n\t}",
"int getDestination();",
"public String getIPAddress()\n {\n return fIPAddress;\n }",
"public IPAddress getIPAddress() {\n return iPAddress;\n }",
"public InetAddress getIP();",
"public int getIp() {\n return instance.getIp();\n }",
"public int getIp() {\n return instance.getIp();\n }",
"public java.lang.String getDestination() {\n java.lang.Object ref = destination_;\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 destination_ = s;\n return s;\n }\n }",
"public int getIp() {\n return ip_;\n }",
"public int getIp() {\n return ip_;\n }",
"public int getIp() {\n return ip_;\n }",
"public int getIp() {\n return ip_;\n }",
"public String getDestination()\n\t{\n\t\treturn notification.getString(Attribute.Request.DESTINATION);\n\t}",
"public int getDestination() {\n\t\treturn finalDestination;\n\t}",
"public long getDestinationId() {\n return destinationId_;\n }",
"public InetAddress getIP()\r\n\r\n {\r\n InetAddress ip=null;\r\n try{\r\n WifiManager wifi = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);\r\n DhcpInfo dhcp = wifi.getDhcpInfo();\r\n int dip=dhcp.ipAddress;\r\n byte[] quads = new byte[4];\r\n for (int k = 0; k < 4; k++)\r\n quads[k] = (byte) (dip >> (k * 8));\r\n ip= InetAddress.getByAddress(quads);\r\n } catch (UnknownHostException e) {\r\n e.printStackTrace();\r\n }\r\n return ip;\r\n }",
"private int relayPayloadDestination(OverlayNodeSendsData event) {\n\t\tint destination = event.getDestID();\n\t\tif (nodesToSendTo.getConnections().containsKey(destination))\n\t\t\treturn destination;\n\t\telse { // determine which routing entry to send it to\n\t\t\tint bestHopLen = 128;\n\t\t\tint bestHop = 0;\n\t\t\tboolean increasedHopDist = false;\n\t\t\tboolean finalFlag = false;\n\t\t\tif (event.getDestID() < myAssignedID)\n\t\t\t\tdestination += 128; // previously 127\n\t\t\tfor (Map.Entry<Integer, TCPConnection> entry : nodesToSendTo.getConnections()\n\t\t\t\t\t.entrySet()) {\n\t\t\t\tint possibleHop = entry.getKey();\n\t\t\t\tif (possibleHop < myAssignedID) {\n\t\t\t\t\tpossibleHop += 128;\n\t\t\t\t\tincreasedHopDist = true;\n\t\t\t\t} else {\n\t\t\t\t\tincreasedHopDist = false;\n\t\t\t\t}\n\t\t\t\tif (possibleHop < destination\n\t\t\t\t\t\t&& ((destination - possibleHop) < bestHopLen)) {\n\t\t\t\t\tbestHopLen = destination - possibleHop;\n\t\t\t\t\tbestHop = possibleHop;\n\t\t\t\t\tfinalFlag = increasedHopDist;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (finalFlag)\n\t\t\t\tbestHop -= 128;\n\t\t\treturn bestHop;\n\t\t}\n\t}",
"public long getDestinationId() {\n return destinationId_;\n }",
"public String getIPAddress () {\n\t\treturn _ipTextField.getText();\n\t}",
"public DestAddress getHostAddress()\r\n {\r\n return hostAddress;\r\n }",
"public java.lang.String getDestination() {\n java.lang.Object ref = destination_;\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 destination_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getDestination() {\r\n\t\treturn this.destination;\r\n\t}",
"EndpointAddress getDestinationAddress();",
"public String getDestination(){\r\n\t\treturn route.getDestination();\r\n\t}",
"int getDestinationPort() {\n return this.resolvedDestination.destinationPort;\n }",
"public java.lang.String getIpfrom() {\n return ipfrom;\n }",
"public int getDestinationPort() {\n return destinationPort_;\n }",
"public String getDestination() {\n return this.destination;\n }",
"public String getRemoteIPAddress() {\n String xForwardedFor = getRequestHeader(\"X-Forwarded-For\");\n\n if (!Utils.isEmpty(xForwardedFor)) {\n System.out.println(\"The xForwardedFor address is: \" + xForwardedFor + \"\\n\");\n return xForwardedFor.split(\"\\\\s*,\\\\s*\", 2)[0]; // The xForwardFor is a comma separated string: client,proxy1,proxy2,...\n }\n\n return getRequest().getRemoteAddr();\n }",
"public int getDestinationPort() {\n return destinationPort_;\n }",
"public String getDestination() {\r\n\t\treturn destination;\r\n\t}",
"@Override\r\n public String getIPAddress() {\r\n return address;\r\n }",
"public com.google.protobuf.ByteString\n getDestinationBytes() {\n java.lang.Object ref = destination_;\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 destination_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"int getDestinationPort();",
"int getDestinationPort();",
"public String getDestination() {\r\n return destination;\r\n }",
"public com.google.protobuf.ByteString\n getDestinationBytes() {\n java.lang.Object ref = destination_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n destination_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public String getDestination() {\n\t\treturn destination;\n\t}",
"public String getIp() {\n Object ref = ip_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n ip_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }",
"public java.lang.String getDestination()\n {\n return this._destination;\n }",
"public String getDestination() {\n return destination;\n }",
"public String getIp() {\n Object ref = ip_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n ip_ = s;\n return s;\n }\n }",
"public java.lang.String getDestination() {\n return destination;\n }",
"java.lang.String getSnIp();",
"java.lang.String getSnIp();",
"public String getIp() {\n\t\treturn ip.getText();\n\t}",
"String getIp();",
"String getIp();",
"public String getIp();",
"public SocketAddress getRemoteAddress() {\n return socket.getRemoteSocketAddress();\n }",
"public String getUdpAddress() {\n\t\tfinal String key = ConfigNames.UDP_ADDRESS.toString();\n\n\t\tif (getJson().isNull(key)) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn getJson().getString(key);\n\t}",
"public String getDestination() {\r\n return this.destination;\r\n }",
"public int get_addr() {\n return (int)getUIntElement(offsetBits_addr(), 16);\n }",
"public InetAddress getAddress() {\n return ip;\n }",
"public Long getDestinationNumber() {\n return this.destinationNumber;\n }",
"public static int offset_dest() {\n return (0 / 8);\n }",
"public int getAddr() {\n return addr_;\n }",
"public String getDst() {\r\n\t\treturn dst;\r\n\t}",
"public java.lang.String getIp() {\n java.lang.Object ref = ip_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n ip_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getIp() {\n java.lang.Object ref = ip_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n ip_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getIp() {\n java.lang.Object ref = ip_;\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 ip_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getIp() {\n java.lang.Object ref = ip_;\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 ip_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public long getAddress() {\n return origin + originOffset;\n }",
"public java.lang.String getIp() {\n java.lang.Object ref = ip_;\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 ip_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getIp() {\n java.lang.Object ref = ip_;\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 ip_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getIp() {\n java.lang.Object ref = ip_;\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 ip_ = s;\n }\n return s;\n }\n }",
"public String get_ipaddress() throws Exception {\n\t\treturn this.ipaddress;\n\t}",
"public String getIP() {\n return this.IP;\n }",
"String getRemoteIpAddress();",
"public int getAddr() {\n return addr_;\n }",
"public InetAddress getIPAddress ( ) { return _IPAddress; }",
"public java.lang.String getIp() {\n java.lang.Object ref = ip_;\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 ip_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getIp() {\n java.lang.Object ref = ip_;\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 ip_ = s;\n return s;\n }\n }",
"public String getDestinationId()\n {\n return destinationId; // Field is final; no need to sync.\n }"
] | [
"0.8402904",
"0.8057579",
"0.79245317",
"0.7901471",
"0.7708959",
"0.7624557",
"0.7476961",
"0.74410194",
"0.7389889",
"0.7148443",
"0.6946437",
"0.6822355",
"0.6773004",
"0.6658362",
"0.65593904",
"0.6451762",
"0.6431667",
"0.64084905",
"0.6360913",
"0.6360913",
"0.6360913",
"0.6360913",
"0.6360913",
"0.6360913",
"0.6360913",
"0.6360913",
"0.6347035",
"0.62861097",
"0.6259558",
"0.62354577",
"0.61835355",
"0.61786723",
"0.61786723",
"0.617827",
"0.61733556",
"0.61733556",
"0.61733556",
"0.61650443",
"0.6159878",
"0.61547637",
"0.6141567",
"0.6135675",
"0.612659",
"0.6120208",
"0.61178064",
"0.6107084",
"0.6101481",
"0.6101126",
"0.6076327",
"0.6071516",
"0.6062665",
"0.60624284",
"0.6060799",
"0.60607177",
"0.60591716",
"0.60524577",
"0.6052072",
"0.6043688",
"0.603346",
"0.6032823",
"0.6032823",
"0.60301197",
"0.6022989",
"0.6022553",
"0.60169226",
"0.6016809",
"0.60135555",
"0.6006835",
"0.6000927",
"0.599956",
"0.599956",
"0.59990275",
"0.5992248",
"0.5992248",
"0.59918964",
"0.5987112",
"0.59862417",
"0.5982902",
"0.59824294",
"0.5966847",
"0.59637314",
"0.5963143",
"0.596254",
"0.59589463",
"0.595685",
"0.595685",
"0.5951735",
"0.5951523",
"0.5950575",
"0.5949775",
"0.5949775",
"0.5949775",
"0.59447944",
"0.59428376",
"0.5942288",
"0.5941079",
"0.5940481",
"0.5929982",
"0.59209484",
"0.5914568"
] | 0.6333019 | 27 |
Set the DSCP field | public void setDSCP(int dSCP) {
this.DSCP = dSCP;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setSipDscp(int dscp);",
"public void setVideoDscp(int dscp);",
"@SystemApi\n @NonNull\n public Builder setDscp(@IntRange(from = DSCP_MIN, to = DSCP_MAX) int dscp) {\n if (dscp < DSCP_MIN || dscp > DSCP_MAX) {\n throw new IllegalArgumentException(\"Invalid DSCP value\");\n }\n mDscp = dscp;\n return this;\n }",
"protected void setDpc(int dpc) {\n this.dpc = dpc;\n }",
"public void setAudioDscp(int dscp);",
"@SystemApi\n @IntRange(from = DSCP_MIN, to = DSCP_MAX)\n public int getDscp() {\n return mDscp;\n }",
"public void setDPZeitschrift(String value){\n\t\tthis.m_bIsDirty = (this.m_bIsDirty || (!value.equals(this.m_sDPZeitschrift)));\n\t\tthis.m_sDPZeitschrift=value;\n\t}",
"public void setField(String field, String contents) throws RemoteException;",
"public void setDPHeft(String value){\n\t\tthis.m_bIsDirty = (this.m_bIsDirty || (!value.equals(this.m_sDPHeft)));\n\t\tthis.m_sDPHeft=value;\n\t}",
"@Override\n public void set(DP value) {\n if (value == null || \"\".equals(value)) {\n isValid.set(true);\n source.set(null);\n return;\n }\n final SP parsed;\n try {\n parsed = formatter.parse(value);\n } catch (Exception e) {\n isValid.set(false);\n // we failed to parse the value, but still treat this as touching the source property\n source.setTouched(true);\n return;\n }\n isValid.set(true);\n source.set(parsed);\n }",
"public void setDPURL(String value){\n\t\tthis.m_bIsDirty = (this.m_bIsDirty || (!value.equals(this.m_sDPURL)));\n\t\tthis.m_sDPURL=value;\n\t}",
"public void setField(String value) {\n JsoHelper.setAttribute(jsObj, \"field\", value);\n }",
"public void setDPBuchtitel(String value){\n\t\tthis.m_bIsDirty = (this.m_bIsDirty || (!value.equals(this.m_sDPBuchtitel)));\n\t\tthis.m_sDPBuchtitel=value;\n\t}",
"public void port_SET(char src)\n { set_bytes((char)(src) & -1L, 1, data, 4); }",
"public void setValue(String value) throws SdpException {\n\t\tif (value == null)\n\t\t\tthrow new SdpException(\"The value is null\");\n\t\telse {\n\t\t\tNameValue nameValue = getAttribute();\n\t\t\tif (nameValue == null)\n\t\t\t\tnameValue = new NameValue();\n\t\t\tnameValue.setValue(value);\n\t\t\tsetAttribute(nameValue);\n\t\t}\n\t}",
"public void setScdx(Integer scdx) {\n this.scdx = scdx;\n }",
"public DuckSourceRemote setDuckSecurity(DuckSecurity duckSecurity);",
"public void port_SET(char src)\n { set_bytes((char)(src) & -1L, 1, data, 20); }",
"public void port_SET(char src)\n { set_bytes((char)(src) & -1L, 1, data, 20); }",
"public void setDsCPF(java.lang.String dsCPF) {\n this.dsCPF = dsCPF;\n }",
"public void setValue(String value) {\n\t this.valueS = value;\n\t }",
"public Packet(int source, int dest, int DSCP){\r\n\t\ttry{\r\n\t\t\tthis.source = source;\r\n\t\t\tthis.dest = dest;\r\n\t\t\tthis.DSCP = DSCP;\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void setScat_cd(final java.lang.String scat_cd) {\n\t\tthis.scat_cd = scat_cd;\n\t}",
"public void set(String fieldName, Object value) {\n\t\tcommandList.add(new SetCommand(fieldName, value));\n\t}",
"public void setValueCd(String valueCd) {\n this.valueCd = valueCd;\n }",
"public void setSDI( DbKey sdi )\n\t{\n\t\tthis.sdi = sdi;\n\t}",
"public static <T> void setField(Class<T> clz, T instance, String fieldName, Object value) {\n Field field = getAccessible(() -> clz.getDeclaredField(fieldName));\n performReflectionAction(() -> field.set(instance, value));\n }",
"public void set(Object requestor, String field, JComponent comp);",
"@Override\n public void setField (String fieldToModify, String value, Double duration) {\n\n }",
"public <T> void setProperty(String field, T value) {\n try {\n Field f = this.getClass().getDeclaredField(field); \n f.set(this, value);\n } catch (NoSuchFieldException ex) {\n System.out.println(\"Field no found...\");\n System.out.println(ex.getMessage());\n\n } catch (IllegalAccessException ex) {\n System.out.println(ex.getMessage());\n }\n }",
"void setPath(DrivePath path);",
"public void set(Object requestor, String field);",
"public void setInputPasswordValue(String value){\n WebElement passwordField = driver.findElement(inputPasswordLocator); \n // setValue(passwordField, value);\n // System.out.println(\"Value after set: \" + passwordField.getAttribute(\"value\"));\n passwordField.sendKeys(value);\n //shift + tab\n // actions.sendKeys(Keys.TAB).perform();\n WebElement deptidField = driver.findElement(inputTextDeptidLocator);\n actions.click(deptidField).perform();\n }",
"public void setValue(String value) {\n set (value);\n }",
"public void setDcrp(String dcrp) {\n\t\tthis.dcrp = dcrp == null ? null : dcrp.trim();\n\t}",
"@Override\n public void set(T value) throws Exception {\n _curator.setData().forPath(_zkPath, toZkBytes(value));\n }",
"public void setDPReihe(String value){\n\t\tthis.m_bIsDirty = (this.m_bIsDirty || (!value.equals(this.m_sDPReihe)));\n\t\tthis.m_sDPReihe=value;\n\t}",
"public void setSammelTransfer(SammelTransfer s) throws RemoteException;",
"void setDevkey(String devkey);",
"private <T> void setField(Field field, Object object, T fieldInstance) {\n try {\n field.setAccessible(true);\n field.set(object, fieldInstance);\n } catch (IllegalArgumentException ex) {\n Logger.getLogger(CDIC.class.getName()).log(Level.SEVERE, \"Feld \" + field.getName() + \" ist kein Objekt!\", ex);\n } catch (IllegalAccessException ex) {\n Logger.getLogger(CDIC.class.getName()).log(Level.SEVERE, \"Feld \" + field.getName() + \" ist nicht zugreifbar!\", ex);\n } finally {\n field.setAccessible(false);\n }\n }",
"public void setDPIndex(String value){\n\t\tthis.m_bIsDirty = (this.m_bIsDirty || (!value.equals(this.m_sDPIndex)));\n\t\tthis.m_sDPIndex=value;\n\t}",
"void setDatty(Datty newDatty);",
"public void setField(String aValue) {\n String oldValue = field;\n field = aValue;\n changeSupport.firePropertyChange(\"field\", oldValue, aValue);\n }",
"protected void setValue( String strValue )\n {\n _strValue = strValue;\n }",
"public void setTpd(gov.nih.nlm.ncbi.www.SeqIdDocument.SeqId.Tpd tpd)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n gov.nih.nlm.ncbi.www.SeqIdDocument.SeqId.Tpd target = null;\r\n target = (gov.nih.nlm.ncbi.www.SeqIdDocument.SeqId.Tpd)get_store().find_element_user(TPD$34, 0);\r\n if (target == null)\r\n {\r\n target = (gov.nih.nlm.ncbi.www.SeqIdDocument.SeqId.Tpd)get_store().add_element_user(TPD$34);\r\n }\r\n target.set(tpd);\r\n }\r\n }",
"public void setValueDs(String valueDs) {\n this.valueDs = valueDs;\n }",
"public void setValue(String fieldName, Object value) {\n try {\n Field field = FieldUtils.getField(object.getClass(), fieldName, true);\n if (field != null) {\n FieldUtils.writeField(field, object, value, true);\n } else {\n logger.error(\"Unable to set value on field because the field does not exits on class: \" + object.getClass());\n }\n } catch (IllegalAccessException e) {\n logger.error(e);\n }\n }",
"public void setMSCD(java.lang.String MSCD) {\n this.MSCD = MSCD;\n }",
"public void setKey(KeyField key)\n\tthrows SdpException {\n\tif (key == null)\n\t throw new SdpException(\"The key is null\");\n\tsetKeyField(key);\n }",
"public void setParameter(short param) throws TFTPPacketException;",
"public void setDigest(Digest d) {\n passDown(new Event(Event.SET_DIGEST, d));\n }",
"protected static void setParam(Object o, Field f, CommandSetting s, String key) throws ReflectiveOperationException,\r\n\t\t\tNameNotFoundException, IllegalArgumentException, notFoundException, CannotConvertException {\n\t\tf.setAccessible(true);\r\n\t\tClass<?> cls = f.getType();\r\n\t\tif (cls == int.class) {\r\n\t\t\tf.set(o, s.getAsInt(key));\r\n\t\t} else if (cls == double.class) {\r\n\t\t\tf.set(o, s.getAsDouble(key));\r\n\t\t} else if (cls == boolean.class) {\r\n\t\t\tf.set(o, s.getAsBool(key));\r\n\t\t} else if (Sequence.class.isAssignableFrom(cls)) {\r\n\t\t\tassert false;\r\n\r\n\t\t\t// f.set(o, Sequence.getSequence(s.getAsStr(key)));\r\n\t\t} else {\r\n\t\t\tf.set(o, s.get(key));\r\n\t\t}\r\n\t}",
"private void setField( String fieldName, String value )\n {\n JTextField field =\n ( JTextField ) fields.get(fieldName);\n\n field.setText(value);\n }",
"public void setFddbr(String fddbr) {\r\n this.fddbr = fddbr;\r\n }",
"public void setMedia(MediaField media)\n\tthrows SdpException {\n\tif (media == null)\n\t throw new SdpException(\"The media is null\");\n\tmediaField = media;\n }",
"public void setS(String s);",
"public void setTipoDiscapacidad(TipoDiscapacidad tipoDiscapacidad)\r\n/* 229: */ {\r\n/* 230:420 */ this.tipoDiscapacidad = tipoDiscapacidad;\r\n/* 231: */ }",
"public void setSpPassword(java.lang.String param){\r\n \r\n if (param != null){\r\n //update the setting tracker\r\n localSpPasswordTracker = true;\r\n } else {\r\n localSpPasswordTracker = false;\r\n \r\n }\r\n \r\n this.localSpPassword=param;\r\n \r\n\r\n }",
"public void setData(D s){\n\t\tdata = s;\n\t}",
"public void setServicioCreditoTributario(ServicioCreditoTributario servicioCreditoTributario)\r\n/* 96: */ {\r\n/* 97:117 */ this.servicioCreditoTributario = servicioCreditoTributario;\r\n/* 98: */ }",
"public void setDPSeitenangaben(String value){\n\t\tthis.m_bIsDirty = (this.m_bIsDirty || (!value.equals(this.m_sDPSeitenangaben)));\n\t\tthis.m_sDPSeitenangaben=value;\n\t}",
"public void setValue(String value);",
"public void setValue(String value);",
"public void setValue(String value);",
"public void setValue(String value);",
"public abstract void setCod_dpto(java.lang.String newCod_dpto);",
"public void setFieldValue(String value){\r\n\t\ttextBox.setValue(value);\r\n\t}",
"public void setSWDES(int param) {\r\n this.localSWDES = param;\r\n }",
"public void setDw(String dw) {\n this.dw = dw;\n }",
"public void setField(String field) {\n this.field = field;\n }",
"public void setD ( boolean d ) {\n\n\tthis.d = d;\n }",
"public void setBandwidth(String name,\n\t\t\t int value)\n\tthrows SdpException {\n\tif (name == null)\n\t throw new SdpException(\"The name is null\");\n\telse {\n\t for (int i = 0; i < bandwidthFields.size(); i++) {\n\t\tBandwidthField bandwidthField = (BandwidthField) \n\t\t bandwidthFields.elementAt(i);\n\t\tString type = bandwidthField.getBwtype();\n\t\tif (type != null && \n\t\t type.equals(name)) \n\t\t bandwidthField.setBandwidth(value);\n\t }\n \n\t}\n }",
"public void setSDT(int value) {\n this.sdt = value;\n }",
"public void set(Object requestor, String field, JDialog comp);",
"public void setDireccion(String direccion);",
"public void setDstPort(int dstPort) {\n\t\tlog.trace(\"Set dstPort to [{}]\", dstPort);\n\t\tthis.dstPort = dstPort;\n\t}",
"public void setD(String d) {\n this.d = d == null ? null : d.trim();\n }",
"private void setDrivingPIDS(PID pid) {\n driverFR.setPid(pid);\n driverFL.setPid(pid);\n driverFL.setPid(pid);\n driverBL.setPid(pid);\n }",
"public void set_dest(short value) {\n setUIntElement(offsetBits_dest(), 8, value);\n }",
"public void setData(String d) {\n _data = d.getBytes();\n }",
"void setValue(String value);",
"void setValue(String value);",
"@Override\n public boolean setOption( ControlOption tempTlv ){ \n\n boolean retVal = true; \n if( !super.setOption(tempTlv)){\n \n byte[] theValue = tempTlv.getValue();\n switch( tempTlv.getType()){\n case OPTION_SOCKS_OPERATION:\n theSocksOperation = theValue[0];\n break;\n case OPTION_HANDLER_ID:\n theHandlerId = SocketUtilities.byteArrayToInt(theValue);\n break;\n default:\n retVal = false;\n break;\n } \n }\n return retVal;\n }",
"public void setValue(String s, double d){\n\t\tset(new Variable(s,d));\t\t// Create a new variable and then use it to set the value in the dictionary\n\t}",
"public void setDPTitel(String value){\n\t\tthis.m_bIsDirty = (this.m_bIsDirty || (!value.equals(this.m_sDPTitel)));\n\t\tthis.m_sDPTitel=value;\n\t}",
"public void setSfdw(String sfdw) {\n this.sfdw = sfdw == null ? null : sfdw.trim();\n }",
"public void setDSCRF(java.lang.String DSCRF) {\n this.DSCRF = DSCRF;\n }",
"public FieldInstruction setField(BCField field) {\n if (field == null)\n return setFieldIndex(0);\n return setField(field.getDeclarer().getName(), field.getName(),\n field.getTypeName());\n }",
"public void setDwt(double dwt) {\n\t\t_tempNoTiceShipMessage.setDwt(dwt);\n\t}",
"public void cog_SET(char src)\n { set_bytes((char)(src) & -1L, 2, data, 6); }",
"public void setValue(String value)\n {\n this.value = value;\n }",
"public void set(String s);",
"public void setValue(String value) {\n\t\tthis.value = value;\n\t}",
"public void setDataIntoField(String fieldLabel, String value){\n reporter.info(\"Set data \"+value+\" into field\"+fieldLabel);\n setText(LOCATORS.getBy(COMPONENT_NAME,\"FIELD_INPUT_BY_NAME\",fieldLabel),value,SHORT_TIMEOUT);\n }",
"public Builder setTransferTxt(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n transferTxt_ = value;\n onChanged();\n return this;\n }",
"public void setValue( String value )\n {\n this.value = value;\n }",
"public void setSelPort(int d, int index) {\n \tsetSelPort(d, index, true);\n }",
"@Override\n\tpublic void setField5(java.lang.String field5) {\n\t\t_second.setField5(field5);\n\t}",
"public void setValue (String Value);",
"public void set(ControlMode controlMode, double value)\n {\n switch (controlMode)\n {\n case Throttle:\n super.set(value);\n// System.out.printf(\"Port: %d value %f\\n\", port, value);\n break;\n case Position:\n super.getPIDController().setReference(value, ControlType.kPosition);\n break;\n case Velocity:\n super.getPIDController().setReference(value, ControlType.kVelocity);\n break;\n }\n }"
] | [
"0.6747486",
"0.66402835",
"0.6082793",
"0.5835632",
"0.57476795",
"0.55335295",
"0.5532566",
"0.5489073",
"0.5485284",
"0.5388673",
"0.534774",
"0.52982706",
"0.51846856",
"0.5170313",
"0.51546216",
"0.5151883",
"0.5136067",
"0.5134711",
"0.5134711",
"0.5117554",
"0.51169795",
"0.5111688",
"0.50800323",
"0.50486034",
"0.5032356",
"0.5025651",
"0.5022801",
"0.5015704",
"0.50156623",
"0.5012544",
"0.5008077",
"0.50070846",
"0.49850896",
"0.49820602",
"0.49817324",
"0.49660316",
"0.49658707",
"0.4965162",
"0.49321347",
"0.49305734",
"0.49295825",
"0.49288583",
"0.4927313",
"0.49188364",
"0.4917001",
"0.49130312",
"0.48911867",
"0.48904496",
"0.48904306",
"0.487793",
"0.48747987",
"0.4874554",
"0.4871292",
"0.48562992",
"0.48511434",
"0.48491398",
"0.4834816",
"0.48257223",
"0.48242074",
"0.48107123",
"0.4805928",
"0.48031342",
"0.48031342",
"0.48031342",
"0.48031342",
"0.48030558",
"0.47991884",
"0.47890234",
"0.47883195",
"0.47877187",
"0.47825673",
"0.4781051",
"0.47787583",
"0.47750995",
"0.47711024",
"0.47400233",
"0.47340465",
"0.47322097",
"0.47242683",
"0.47192225",
"0.47070977",
"0.47070977",
"0.46999696",
"0.46987292",
"0.46953306",
"0.46945655",
"0.4690734",
"0.4687122",
"0.468259",
"0.46733537",
"0.46731982",
"0.46723554",
"0.46722797",
"0.46720982",
"0.46717495",
"0.46605933",
"0.46587434",
"0.46557608",
"0.46520612",
"0.46500617"
] | 0.7320918 | 0 |
Returns the DSCP field | public int getDSCP() {
return this.DSCP;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@SystemApi\n @IntRange(from = DSCP_MIN, to = DSCP_MAX)\n public int getDscp() {\n return mDscp;\n }",
"public String getDField(int position){\n\t\treturn dfield.get(position);\n\t}",
"public int getSipDscp();",
"public java.lang.String getDsCPF() {\n return dsCPF;\n }",
"java.lang.String getField1414();",
"java.lang.String getField1668();",
"java.lang.String getField1408();",
"String getField();",
"public void setDSCP(int dSCP) {\r\n\t\tthis.DSCP = dSCP;\r\n\t}",
"java.lang.String getField1536();",
"java.lang.String getField1516();",
"java.lang.String getField1634();",
"java.lang.String getField1644();",
"java.lang.String getField1564();",
"java.lang.String getField1658();",
"java.lang.String getField1653();",
"java.lang.String getField1657();",
"java.lang.String getField1563();",
"java.lang.String getField1640();",
"java.lang.String getField1667();",
"java.lang.String getField1615();",
"java.lang.String getField1662();",
"java.lang.String getField1750();",
"@Override\n\tpublic String getField(String key) {\n\t\treturn gp.getValue(key);\n\t}",
"java.lang.String getField1562();",
"java.lang.String getField1568();",
"java.lang.String getField1663();",
"java.lang.String getField1604();",
"java.lang.String getField1676();",
"java.lang.String getField1645();",
"java.lang.String getField1633();",
"java.lang.String getField1647();",
"java.lang.String getField1611();",
"java.lang.String getField1660();",
"java.lang.String getField1116();",
"java.lang.String getField1635();",
"java.lang.String getField1532();",
"java.lang.String getField1623();",
"java.lang.String getField1666();",
"java.lang.String getField1643();",
"java.lang.String getField1661();",
"java.lang.String getField1558();",
"java.lang.String getField1696();",
"java.lang.String getField1603();",
"java.lang.String getField1654();",
"java.lang.String getField1656();",
"java.lang.String getField1394();",
"java.lang.String getField1606();",
"java.lang.String getField1572();",
"java.lang.String getField1646();",
"java.lang.String getField1612();",
"java.lang.String getField1694();",
"java.lang.String getField1622();",
"java.lang.String getField1416();",
"java.lang.String getField1614();",
"java.lang.String getField1677();",
"java.lang.String getField1674();",
"java.lang.String getField1652();",
"java.lang.String getField1504();",
"java.lang.String getField1613();",
"java.lang.String getField1268();",
"java.lang.String getField1625();",
"java.lang.String getField1669();",
"java.lang.String getField1216();",
"java.lang.String getField1621();",
"java.lang.String getField1544();",
"java.lang.String getField1406();",
"java.lang.String getField1678();",
"java.lang.String getField1553();",
"java.lang.String getField1698();",
"java.lang.String getField1596();",
"java.lang.String getField1626();",
"java.lang.String getField1695();",
"public String getField()\n {\n return field;\n }",
"java.lang.String getField1464();",
"java.lang.String getField1546();",
"java.lang.String getField1152();",
"java.lang.String getField1557();",
"public String getDcrp() {\n\t\treturn dcrp;\n\t}",
"java.lang.String getField1524();",
"java.lang.String getField1688();",
"java.lang.String getField1692();",
"java.lang.String getField1432();",
"java.lang.String getField1627();",
"java.lang.String getField1468();",
"java.lang.String getField1762();",
"java.lang.String getField1609();",
"java.lang.String getField1062();",
"java.lang.String getField1673();",
"java.lang.String getField1642();",
"java.lang.String getField1686();",
"java.lang.String getField1716();",
"java.lang.String getField1641();",
"java.lang.String getField1693();",
"java.lang.String getField1659();",
"java.lang.String getField1638();",
"java.lang.String getField1462();",
"java.lang.String getField1316();",
"java.lang.String getField1527();",
"java.lang.String getField1620();"
] | [
"0.6534479",
"0.62496585",
"0.60489225",
"0.602682",
"0.5966303",
"0.58907604",
"0.5884304",
"0.5870271",
"0.58634084",
"0.5836765",
"0.58323896",
"0.58267033",
"0.58235365",
"0.5823175",
"0.58202636",
"0.5811323",
"0.5808903",
"0.5807062",
"0.5803819",
"0.57999027",
"0.57965565",
"0.5795085",
"0.5790602",
"0.57900256",
"0.578923",
"0.57888937",
"0.5785591",
"0.5780793",
"0.57802784",
"0.57795316",
"0.5775817",
"0.57714564",
"0.5770634",
"0.57658374",
"0.57649326",
"0.57614756",
"0.57603633",
"0.5760317",
"0.5759012",
"0.57535195",
"0.5752084",
"0.57434005",
"0.5741806",
"0.57403827",
"0.57392466",
"0.5738209",
"0.5735596",
"0.57351524",
"0.5730553",
"0.57290477",
"0.57274944",
"0.5722636",
"0.5721795",
"0.5719398",
"0.57193303",
"0.5715296",
"0.57145226",
"0.5714498",
"0.5714235",
"0.5712854",
"0.5711895",
"0.5710949",
"0.57066655",
"0.5705924",
"0.57046914",
"0.5703396",
"0.56962734",
"0.5692584",
"0.56923276",
"0.5692289",
"0.5691273",
"0.56911737",
"0.5689434",
"0.56892896",
"0.5687542",
"0.56867194",
"0.56817096",
"0.5681085",
"0.5680652",
"0.56804895",
"0.56799656",
"0.56794876",
"0.56789035",
"0.5678603",
"0.5677689",
"0.56760097",
"0.56751686",
"0.5675168",
"0.56727743",
"0.56692946",
"0.56684417",
"0.5666451",
"0.5666048",
"0.56656253",
"0.56654555",
"0.56654334",
"0.5665372",
"0.5664927",
"0.56642437",
"0.56624246"
] | 0.6085562 | 2 |
Returns the trace ID for this cell | public int getTraceID(){
return this.traceID;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public long getTraceId() {\n\t\treturn this.traceInformation.getTraceId();\n\t}",
"public String getTraceId() {\n return traceId;\n }",
"public int getLineID()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(LINEID$2, 0);\n if (target == null)\n {\n return 0;\n }\n return target.getIntValue();\n }\n }",
"int getCellid();",
"public long getTraceTag() {\n return traceTag_;\n }",
"public long getTraceTag() {\n return traceTag_;\n }",
"public Number getLineId() {\n return (Number)getAttributeInternal(LINEID);\n }",
"public Number getLineId() {\n return (Number)getAttributeInternal(LINEID);\n }",
"public StrColumn getScatterId() {\n return delegate.getColumn(\"scatter_id\", DelegatingStrColumn::new);\n }",
"public int getCellid() {\n return cellid_;\n }",
"public int getCellid() {\n return cellid_;\n }",
"long getTraceTag();",
"public org.apache.xmlbeans.XmlInt xgetLineID()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlInt target = null;\n target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(LINEID$2, 0);\n return target;\n }\n }",
"public abstract long getTrace();",
"public long getCellId(int index) {\n return cellId_.getLong(index);\n }",
"public Number getLineId() {\n return (Number) getAttributeInternal(LINEID);\n }",
"public String getUniqueId(int row);",
"private String getCellId(Element elem) {\n if (elem == null) {\n return null;\n }\n String cellId = elem.getAttribute(CELL_ATTRIBUTE);\n return (cellId == null) || (cellId.length() == 0) ? null : cellId;\n }",
"public String getCellIdProperty() {\r\n return getAttributeAsString(\"cellIdProperty\");\r\n }",
"public long getCellId(int index) {\n return cellId_.getLong(index);\n }",
"public String getLineId() {\n return lineId;\n }",
"public int getSeatId() {\n return getRow() * 8 + getColumn();\n }",
"public String getCellid() {\r\n return cellid;\r\n }",
"public String getCellid() {\n return cellid;\n }",
"public String getCellid() {\n return cellid;\n }",
"public java.lang.Long getTiag_id();",
"public int lineNum() {\n return myId.lineNum();\n }",
"public long getId() {\n\t\treturn _tempNoTiceShipMessage.getId();\n\t}",
"public String getCallIdentifier() {\n return callIdHeader.getCallId();\n }",
"public String getIdForRow(int row);",
"int getTrainSegId();",
"public int getTrajectoryID() {\n return trajectoryid;\n }",
"int getLogId();",
"public RowID getRowID() {\n return (RowID)getAttributeInternal(ROWID);\n }",
"public RowID getRowID() {\n return (RowID)getAttributeInternal(ROWID);\n }",
"public int getTID();",
"public int getRecordId(int reschtid){\r\n\r\n\t\tIndex ind = chtidA.getIndex();\r\n\t\tfor (int i=0; i<(int)ind.getSize(); i++){\r\n\t\t\tint chtid = chtidA.getInt(ind.set(i));\r\n\t\t\tif (chtid == reschtid) return i;\r\n\t\t}\t\r\n\t\t\t \r\n\t\treturn -1;\r\n\t}",
"java.lang.String getSymbolId();",
"public int getID(){\n\t\treturn this.EDGE_ID;\n\t}",
"public int getRowid() {\n\t\treturn rowid;\n\t}",
"public int getLineNo()\n\t{\n\t\treturn getIntColumn(OFF_LINE_NO, LEN_LINE_NO);\n\t}",
"public long getId() {\n return ctTableColumn.getId();\n }",
"public String getTrace() {\n return trace;\n }",
"static void drawCellID() { // draws a cross at each cell centre\n\t\tfloat xc,yc;\n\t\t//GeneralPath path = new GeneralPath();\n\t\tif (currentStage[currentSlice-1]>1)\n\t\t{\n\t\t\tfor (int i=0;i<pop.N;i++)\n\t\t\t{\n\t\t\t\txc = (float) ( (Balloon)(pop.BallList.get(i)) ).x0;\n\t\t\t\tyc = (float) ( (Balloon)(pop.BallList.get(i)) ).y0;\n\t\t\t\tfloat arm = 5;\n\n\t\t\t\t// Label Cell number\n\t\t\t\tTextRoi TROI = new TextRoi((int)xc, (int)yc, (\"\"+i),new Font(\"SansSerif\", Font.BOLD, 12));\n\t\t\t\tTROI.setNonScalable(false);\n\t\t\t\tOL.add(TROI);\n\t\t\t}\n\t\t}\n\t}",
"public long threadId();",
"public StrColumn getGoId() {\n return delegate.getColumn(\"go_id\", DelegatingStrColumn::new);\n }",
"public String getLineNumber() \n\t{\n\t\treturn getNumber().substring(9,13);\n\t}",
"public long getId() {\n\t\treturn graphicFrame.getNvGraphicFramePr().getCNvPr().getId();\n\t}",
"public String getCallId();",
"public int getId() {\n\t\treturn this.ordinal();\n\t}",
"public String getCalledNumber() throws FrameException {\n try {\n byte data[] = (byte[])infoElements.get(new Integer(InfoElement.CALLED_NUMBER));\n return new String(data);\n } catch (Exception e) {\n throw new FrameException(e);\n }\n }",
"public Integer getRowNumber() {\n\t\tif (isRowNumber) {\n\t\t\treturn (int) lineId;\n\t\t}\n\t\treturn null;\n\t}",
"public StrColumn getRobotId() {\n return delegate.getColumn(\"robot_id\", DelegatingStrColumn::new);\n }",
"public int getRowNo() {\n return rowIndex+1;\n }",
"long getEncounterId();",
"public String getRowID(int i) {\n \treturn rowID[i];\n }",
"public StrColumn getEntryId() {\n return delegate.getColumn(\"entry_id\", DelegatingStrColumn::new);\n }",
"public StrColumn getEntryId() {\n return delegate.getColumn(\"entry_id\", DelegatingStrColumn::new);\n }",
"public StrColumn getEntryId() {\n return delegate.getColumn(\"entry_id\", DelegatingStrColumn::new);\n }",
"public int getLineNr() {\n return this.lineNr;\n }",
"public String getID() {\n\t\treturn this.region.getFileName();\n\t}",
"public java.lang.Long getSeqTairObjectId() {\n return ((Est)dto).getSeqTairObjectId();\n }",
"public StrColumn getSheetId() {\n return delegate.getColumn(\"sheet_id\", DelegatingStrColumn::new);\n }",
"@Override\n\tpublic long getId() {\n\t\treturn _dmGTShipPosition.getId();\n\t}",
"int getLineID(Vector<Integer> lineIDs,Vector<Integer> lineDepIDs, Vector<String> lineCodes, String cellValue, int depID);",
"public Map<String, String> getTraceContext() {\n if (this.tracing == null) {\n DDLogger.getLoggerImpl().debug(\"No tracing context; unable to get Trace ID\");\n return null;\n }\n return this.tracing.getLogCorrelationTraceAndSpanIDsMap();\n }",
"public String getSessionId() {\n\t\treturn this.traceInformation.getSessionId();\n\t}",
"int getSourceSnId();",
"public static String getDatapointId(Table t)\n\t{\n\t\treturn \"T\" + t.getId();\n\t}",
"public int getTileId() {\n\t\treturn tileId;\n\t}",
"public String getId() {\n\t\treturn Integer.toString(this.hashCode());\n\t}",
"public int getCrashID(){\n\t\treturn crash_id;\n\t}",
"public int getLineNum() {\n\t\treturn lineNum;\n\t}",
"public int getRecordLineNumber();",
"private int getEthIdx() {\n return this.colStartOffset + 3;\n }",
"public Number getLineNumber() {\n return (Number)getAttributeInternal(LINENUMBER);\n }",
"@Array({81}) \n\t@Field(9) \n\tpublic Pointer<Byte > InstrumentID() {\n\t\treturn this.io.getPointerField(this, 9);\n\t}",
"public int getID() {\n return graphConfig.getIndex();\n }",
"public EI getPayerTrackingID() { \r\n\t\tEI retVal = this.getTypedField(5, 0);\r\n\t\treturn retVal;\r\n }",
"@Override\n public String getTrace() {\n return trace;\n }",
"java.lang.String getHeaderTableId();",
"public String getId() {\n return this.getClass().getSimpleName() + \"@\" + this.hashCode();\n }",
"public final int getId() {\n\t\treturn this.accessor.getId();\n\t}",
"public int getLineNo();",
"String get_row_id()\n {\n return row_id;\n }",
"public Long getID() {\n return this.getID(GridCellIDType.NON_ADAPTIVE);\n }",
"public Integer getBlockID() {\n this.next_id++;\n return this.next_id;\n }",
"public long getRowID()\n\t{ return m_nRowID ; }",
"public Long getRowKey() {\n return (Long) getAttributeInternal(ROWKEY);\n }",
"public static int getLineNumber() {\n return Thread.currentThread().getStackTrace()[2].getLineNumber();\n }",
"public String getTrace() throws RemoteException;",
"public static int getIdentifier(){\n\t\tif(index > ids.size() - 1){\n\t\t\tindex = 0;\n\t\t}\n\t\t// Post increment is used here, returns index then increments index\n\t\treturn ids.get(index++);\n\t}",
"public int getCallId() {\n return this.mCallId;\n }",
"public Number getIrHeaderId() {\n return (Number) getAttributeInternal(IRHEADERID);\n }",
"public Integer getLogid() {\n return logid;\n }",
"public long getId()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ID$6);\n if (target == null)\n {\n return 0L;\n }\n return target.getLongValue();\n }\n }",
"public Number getHeaderId() {\n return (Number)getAttributeInternal(HEADERID);\n }",
"public Number getHeaderId() {\n return (Number)getAttributeInternal(HEADERID);\n }",
"long getSourceId();",
"public Integer getRowNo() {\n return rowNo;\n }"
] | [
"0.72947514",
"0.70585364",
"0.6395495",
"0.6358816",
"0.6193949",
"0.6158934",
"0.61446023",
"0.61446023",
"0.61253726",
"0.61086315",
"0.61007077",
"0.6081036",
"0.6047464",
"0.6039531",
"0.6028695",
"0.60260606",
"0.6020174",
"0.5967442",
"0.5961937",
"0.5927731",
"0.5777796",
"0.57641625",
"0.57434064",
"0.57277995",
"0.57277995",
"0.5704014",
"0.5690194",
"0.56623065",
"0.56565934",
"0.56497645",
"0.5642833",
"0.554008",
"0.5530827",
"0.5514875",
"0.5514875",
"0.5480686",
"0.5463882",
"0.54504836",
"0.5450296",
"0.5447994",
"0.54476285",
"0.5441411",
"0.54325944",
"0.5428815",
"0.54158324",
"0.54027784",
"0.5400787",
"0.5367573",
"0.53648037",
"0.53624535",
"0.5362431",
"0.5345546",
"0.53382695",
"0.5331588",
"0.532318",
"0.5322721",
"0.5320909",
"0.5320909",
"0.5320909",
"0.5305633",
"0.52971417",
"0.5274566",
"0.5263743",
"0.52636886",
"0.5262944",
"0.52576625",
"0.5254065",
"0.52525437",
"0.5247256",
"0.5244377",
"0.5243764",
"0.52367",
"0.5226447",
"0.5223134",
"0.5221885",
"0.52175486",
"0.52138907",
"0.5210744",
"0.5204597",
"0.52043253",
"0.5194726",
"0.51885825",
"0.5183082",
"0.5177473",
"0.5174375",
"0.516448",
"0.5162762",
"0.51611406",
"0.5161055",
"0.5158494",
"0.5140755",
"0.51396525",
"0.51382935",
"0.5135091",
"0.5118639",
"0.5112808",
"0.5110677",
"0.5110677",
"0.5100394",
"0.50983894"
] | 0.7280576 | 1 |
Get first MPLS header | public MPLS getFirstMPLS() {
return this.MPLSheader.peek();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public MPLS popMPLSheader(){\r\n\t\treturn MPLSheader.poll();\r\n\t}",
"public String getFirst(String headerName)\r\n/* 336: */ {\r\n/* 337:496 */ List<String> headerValues = (List)this.headers.get(headerName);\r\n/* 338:497 */ return headerValues != null ? (String)headerValues.get(0) : null;\r\n/* 339: */ }",
"org.apache.xmlbeans.XmlString xgetHeader();",
"public std_msgs.msg.dds.Header getHeader()\n {\n return header_;\n }",
"java.lang.String getHeader();",
"com.didiyun.base.v1.Header getHeader();",
"public String getHeader();",
"public Object getFirst() {\r\n if (size == 0)\r\n throw new NoSuchElementException();\r\n\r\n return header.next.element;\r\n }",
"String getHeader(String headerName);",
"public String getHeader()\r\n\t{\r\n\t\treturn header;\r\n\t}",
"public Element first() {\n if(isEmpty()) return null;\n else return header.getNextNode().getContent();\n }",
"public PHeader getHeader() {\n\t\treturn header;\n\t}",
"public E first() {\n if(isEmpty()){\n return null;\n }else{\n return header.getNext().getElement();\n }\n }",
"public VCFHeader getHeader();",
"ComponentHeaderType getHeader();",
"private static String getPSMHeader() {\r\n return \"PSM No.\" + SEP\r\n + \"Spectrum title\" + SEP\r\n + \"Peptide Sequence\" + SEP\r\n + \"Protein Accession\" + SEP\r\n + \"Intensity Score\" + SEP\r\n + \"Matched Peaks\" + SEP;\r\n }",
"public String getHeader() {\n\t\treturn _header;\n\t}",
"public String getHeader1() {\n return header1;\n }",
"public abstract boolean isFirstLineHeader();",
"public Object getHeader() {\n return header;\n }",
"public String getHeader() {\n return header;\n }",
"public String getHeader() {\n return header;\n }",
"SmilHead getHead();",
"public NetFlowHeader getHeader() throws IOException {\n if (header == null) {\n header = prepareHeader();\n }\n\n return header;\n }",
"public String getHeader() {\n\t\t\treturn header;\n\t\t}",
"public String getHeaderLine() {\r\n\t\tif(header == null)return \"\";\r\n\t\treturn header;\r\n\t}",
"stockFilePT102.StockHeaderDocument.StockHeader getStockHeader();",
"public String getHeader() {\n\t\tString header = \"id\" + \",\" + \"chrId\" + \",\" + \"strand\" + \",\" + \"TSS\" + \",\" + \"PolyASite\"\n\t\t\t\t\t\t+ \",\" + \"5SSPos\" + \",\" + \"3SSPos\" + \",\" + \"intronLength\" + \",\" + \"terminalExonLength\"\n\t\t\t\t\t\t+ \",\" + \"BPS_3SS_distance\" + \",\" + \"PolyPyGCContent\" + \",\" + \"IntronGCContent\" + \",\" + \"terminalExonGCContent\"\n\t\t\t\t\t\t+ \",\" + \"5SS\" + \",\" + \"3SS\" + \",\" + \"BPS\"\n\t\t\t\t\t\t+ \",\" + \"5SSRank\" + \",\" + \"3SSRank\" + \",\" + \"BPSRank\"\n\t\t\t\t\t\t+ \",\" + \"5SSLevenshteinDistance\" + \",\" + \"3SSLevenshteinDistance\" + \",\" + \"BPSLevenshteinDistance\";\n\t\treturn header; \n\t}",
"public Object removeFirst() {\r\n Object first = header.next.element;\r\n remove(header.next);\r\n return first;\r\n }",
"TupleHeader getHeader() {\n return header;\n }",
"public LinkedListItr first( )\n {\n return new LinkedListItr( header.next );\n }",
"public String getHeader() {\n\t\treturn header.toString();\n\t}",
"public String getHeader() {\n\t\tif (null != this.header) {\n\t\t\treturn this.header;\n\t\t}\n\t\tValueExpression _ve = getValueExpression(\"header\");\n\t\tif (_ve != null) {\n\t\t\treturn (String) _ve.getValue(getFacesContext().getELContext());\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}",
"private String collectHeading(Document doc) {\n String heading = doc.select(\"[class^=header1 style]\").first().text();\r\n\r\n return heading;\r\n }",
"@Override\n\t\tpublic String getHeader(String name) {\n\t\t\treturn null;\n\t\t}",
"public String getHeader(final String name) {\n final Collection<String> strings = headers.get(name);\n return strings == null ? null : strings.iterator().next();\n }",
"public Header parseHeader(CharArrayBuffer buffer) throws ParseException {\n/* 445 */ return (Header)new BufferedHeader(buffer);\n/* */ }",
"public byte[] getHeader() {\n\treturn header;\n }",
"private void readHeader() {\n version = \"\";\n XmlNode node = _document.SelectSingleNode(\"//ovf:Envelope\", _xmlNS);\n if (node != null) {\n version = node.attributes.get(\"ovf:version\").getValue();\n }\n }",
"public void addMPLSheader(MPLS header){\r\n\t\tMPLSheader.add(header);\r\n\t}",
"public java.lang.String getHeaderName() {\r\n return headerName;\r\n }",
"public Header getHeader(String headerName) {\n if (headerName == null) throw new NullPointerException(\"bad name\");\n SIPHeader sipHeader = (SIPHeader)\n this.nameTable.get(headerName.toLowerCase());\n if (sipHeader instanceof SIPHeaderList)\n return (Header) ((SIPHeaderList) sipHeader).getFirst();\n else return (Header) sipHeader;\n }",
"@Override\n public StreamHeader getHeader() throws Exception {\n return header;\n }",
"public Class<?> header() {\n return header;\n }",
"public String getHeaderName() {\n\tString value = getString(ATTR_HEADER_NAME, null);\n\treturn value;\n }",
"public static String getHeader() {\n return \"S I R\";\n }",
"public DnsHeader header() {\n return header;\n }",
"public Header getHeader() {\n\t\treturn this.header;\n\t}",
"public Stmt getPreHead() {\r\n\t\treturn preHeader;\r\n\t}",
"public String[] composeHeader() {\n\t\treturn null;\n\t}",
"public String getPlayerListHeader ( ) {\n\t\treturn extract ( handle -> handle.getPlayerListHeader ( ) );\n\t}",
"public SAMFileHeader getFileHeader() {\n return dest.getFileHeader();\n }",
"public float getFirstSSN(){\n\t\t return FirstSSN;\n\t\t }",
"String getHeadLiteral();",
"public IMAGE_FILE_HEADER getFileHeader() { return peHeader; }",
"public java.lang.String getFirstNm() {\n return firstNm;\n }",
"private NetFlowHeader prepareHeader() throws IOException {\n NetFlowHeader internalHeader;\n int numBytesRead = 0;\n int lenRead = 0;\n WrappedByteBuf buf;\n byte[] headerArray;\n\n // Read header depending on stream version (different from flow version)\n if (streamVersion == 1) {\n // Version 1 has static header\n // TODO: verify header size for stream version 1\n lenRead = NetFlowHeader.S1_HEADER_SIZE - METADATA_LENGTH;\n internalHeader = new NetFlowHeader(streamVersion, byteOrder);\n } else {\n // Version 3 with dynamic header size\n headerArray = new byte[HEADER_OFFSET_LENGTH];\n numBytesRead = in.read(headerArray, 0, HEADER_OFFSET_LENGTH);\n if (numBytesRead != HEADER_OFFSET_LENGTH) {\n throw new UnsupportedOperationException(\"Short read while loading header offset\");\n }\n\n buf = WrappedByteBuf.init(headerArray, byteOrder);\n int headerSize = (int)buf.getUnsignedInt(0);\n if (headerSize <= 0) {\n throw new UnsupportedOperationException(\"Failed to load header of size \" + headerSize);\n }\n\n // Actual header length, determine how many bytes to read\n lenRead = headerSize - METADATA_LENGTH - HEADER_OFFSET_LENGTH;\n internalHeader = new NetFlowHeader(streamVersion, byteOrder, headerSize);\n }\n\n // allocate buffer for length to read\n headerArray = new byte[lenRead];\n numBytesRead = in.read(headerArray, 0, lenRead);\n if (numBytesRead != lenRead) {\n throw new UnsupportedOperationException(\"Short read while loading header data\");\n }\n // build buffer\n buf = WrappedByteBuf.init(headerArray, byteOrder);\n\n // resolve stream version (either 1 or 3)\n if (streamVersion == 1) {\n internalHeader.setFlowVersion((short)buf.getUnsignedShort(0));\n internalHeader.setStartCapture(buf.getUnsignedInt(2));\n internalHeader.setEndCapture(buf.getUnsignedInt(6));\n internalHeader.setHeaderFlags(buf.getUnsignedInt(10));\n internalHeader.setRotation(buf.getUnsignedInt(14));\n internalHeader.setNumFlows(buf.getUnsignedInt(18));\n internalHeader.setNumDropped(buf.getUnsignedInt(22));\n internalHeader.setNumMisordered(buf.getUnsignedInt(26));\n // Read hostname fixed bytes\n byte[] hostnameBytes = new byte[NetFlowHeader.S1_HEADER_HN_LEN];\n buf.getBytes(30, hostnameBytes, 0, hostnameBytes.length);\n internalHeader.setHostname(new String(hostnameBytes));\n // Read comments fixed bytes\n byte[] commentsBytes = new byte[NetFlowHeader.S1_HEADER_CMNT_LEN];\n buf.getBytes(30 + hostnameBytes.length, commentsBytes, 0, commentsBytes.length);\n internalHeader.setComments(new String(commentsBytes));\n\n // Dereference arrays\n hostnameBytes = null;\n commentsBytes = null;\n } else {\n // Resolve TLV (type-length value)\n // Set decode pointer to first tlv\n int dp = 0;\n int left = lenRead;\n // Smallest TLV is 2+2+0 (null TLV)\n // tlv_t - TLV type, tlv_l - TLV length, tlv_v - TLV value\n int tlv_t = 0;\n int tlv_l = 0;\n int tlv_v = 0;\n\n // Byte array for holding Strings\n byte[] pr;\n\n while (left >= 4) {\n // Parse type, store in host byte order\n tlv_t = buf.getUnsignedShort(dp);\n dp += 2;\n left -= 2;\n\n // Parse len, store in host byte order\n tlv_l = buf.getUnsignedShort(dp);\n dp += 2;\n left -= 2;\n\n // Parse val\n tlv_v = dp;\n\n // Point decode buffer at next tlv\n dp += tlv_l;\n left -= tlv_l;\n\n // TLV length check\n if (left < 0) {\n break;\n }\n\n switch(tlv_t) {\n // FT_TLV_VENDOR\n case 0x1:\n internalHeader.setVendor(buf.getUnsignedShort(tlv_v));\n break;\n // FT_TLV_EX_VER\n case 0x2:\n internalHeader.setFlowVersion((short) buf.getUnsignedShort(tlv_v));\n break;\n // FT_TLV_AGG_VER\n case 0x3:\n internalHeader.setAggVersion(buf.getUnsignedByte(tlv_v));\n break;\n // FT_TLV_AGG_METHOD\n case 0x4:\n internalHeader.setAggMethod(buf.getUnsignedByte(tlv_v));\n break;\n // FT_TLV_EXPORTER_IP\n case 0x5:\n internalHeader.setExporterIP(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_CAP_START\n case 0x6:\n internalHeader.setStartCapture(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_CAP_END\n case 0x7:\n internalHeader.setEndCapture(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_HEADER_FLAGS\n case 0x8:\n internalHeader.setHeaderFlags(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_ROT_SCHEDULE\n case 0x9:\n internalHeader.setRotation(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_FLOW_COUNT\n case 0xA:\n internalHeader.setNumFlows(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_FLOW_LOST\n case 0xB:\n internalHeader.setNumDropped(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_FLOW_MISORDERED\n case 0xC:\n internalHeader.setNumMisordered(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_PKT_CORRUPT\n case 0xD:\n internalHeader.setNumCorrupt(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_SEQ_RESET\n case 0xE:\n internalHeader.setSeqReset(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_CAP_HOSTNAME\n case 0xF:\n pr = new byte[tlv_l];\n buf.getBytes(tlv_v, pr, 0, pr.length);\n // Expected null-terminated string\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n\n internalHeader.setHostname(new String(pr, 0, pr.length - 1));\n break;\n // FT_TLV_COMMENTS\n case 0x10:\n pr = new byte[tlv_l];\n buf.getBytes(tlv_v, pr, 0, pr.length);\n // Expected null-terminated string\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n internalHeader.setComments(new String(pr, 0, pr.length - 1));\n break;\n // FT_TLV_IF_NAME\n case 0x11:\n // uint32_t, uint16_t, string:\n // - IP address of device\n // - ifIndex of interface\n // - interface name\n long ip = buf.getUnsignedInt(tlv_v);\n int ifIndex = buf.getUnsignedShort(tlv_v + 4);\n pr = new byte[tlv_l - 4 - 2];\n buf.getBytes(tlv_v + 4 + 2, pr, 0, pr.length);\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n internalHeader.setInterfaceName(ip, ifIndex, new String(pr, 0, pr.length - 1));\n break;\n // FT_TLV_IF_ALIAS\n case 0x12:\n // uint32_t, uint16_t, uint16_t, string:\n // - IP address of device\n // - ifIndex count\n // - ifIndex of interface (count times)\n // - alias name\n long aliasIP = buf.getUnsignedInt(tlv_v);\n int aliasIfIndexCnt = buf.getUnsignedShort(tlv_v + 4);\n int aliasIfIndex = buf.getUnsignedShort(tlv_v + 4 + 2);\n pr = new byte[tlv_l - 4 - 2 - 2];\n buf.getBytes(tlv_v + 4 + 2 + 2, pr, 0, pr.length);\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n\n internalHeader.setInterfaceAlias(aliasIP, aliasIfIndexCnt, aliasIfIndex,\n new String(pr, 0, pr.length - 1));\n break;\n // Case 0x0\n default:\n break;\n }\n }\n buf = null;\n pr = null;\n }\n return internalHeader;\n }",
"public abstract String header();",
"PageHeader getPageHeader();",
"PageHeader getPageHeader();",
"@Override\n public RaftNode getHeader() {\n return allNodes.getHeader();\n }",
"com.didiyun.base.v1.HeaderOrBuilder getHeaderOrBuilder();",
"IAudioHeader readHeader(InputStream inputStream) throws AudioReaderException, InvalidFormatException;",
"public abstract SOAPHeader getSOAPHeader() throws SOAPException;",
"private void IdentifyHeaderAndFooter() {\n receipt_Header = receipt_lines.length > 0 ? receipt_lines[0] : null;\n receipt_Footer = receipt_lines.length > 1 ? receipt_lines[receipt_lines.length - 1].split(\" \")[0] : null;\n }",
"public String getHead() {\n\t\t\tString vS = \"NONE\";\n\t\t\tif (length != 0) vS = head.getValue();\n\t\treturn vS;\n\t\t}",
"public ElementHeader getControlFlowHeader()\n {\n return controlFlowHeader;\n }",
"public Header getRequestHeader(String headerName) {\n if (headerName == null) {\n return null;\n } else {\n return getRequestHeaderGroup().getCondensedHeader(headerName);\n }\n }",
"public java.lang.String getHeaderName () {\n\t\treturn headerName;\n\t}",
"public void parseHeader() {\n\t\tthis.release = (Integer) this.headerData.get(0);\n\t\tthis.endian = (ByteOrder) this.headerData.get(1);\n\t\tthis.K = (Short) this.headerData.get(2);\n\t\tthis.datasetLabel = (String) this.headerData.get(4);\n\t\tthis.datasetTimeStamp = (String) this.headerData.get(5);\n\t\tthis.mapOffset = (Integer) this.headerData.get(6);\n\t}",
"public JspElement getFirst() {\r\n\treturn _first;\r\n}",
"public HeadComponent getHead() {\n\t\treturn (HeadComponent) snake.getLast();\n\t}",
"private void readHeader() throws IOException {\n\n header = new byte[ShapeConst.SHAPE_FILE_HEADER_LENGTH];\n\n /*\n * Make sure we're at the beginning of the file\n */\n rafShp.seek(0); \n\n rafShp.read(header, 0, ShapeConst.SHAPE_FILE_HEADER_LENGTH);\n\n int fileCode = ByteUtils.readBEInt(header, 0);\n\n if (fileCode != ShapeConst.SHAPE_FILE_CODE) {\n\n throw new IOException(\"Invalid file code, \" + \"probably not a shape file\");\n\n }\n\n fileVersion = ByteUtils.readLEInt(header, 28);\n\n if (fileVersion != ShapeConst.SHAPE_FILE_VERSION) {\n\n throw new IOException(\"Unable to read shape files with version \" +\n fileVersion);\n\n }\n\n fileLength = ByteUtils.readBEInt(header, 24);\n\n /* \n * convert from 16-bit words to 8-bit bytes\n */\n fileLength *= 2;\n\n fileShapeType = ByteUtils.readLEInt(header, 32);\n\n /*\n * read ESRIBoundingBox and convert to SHPEnvelope\n */\n fileMBR = new SHPEnvelope(ShapeUtils.readBox(header, 36));\n\n }",
"public Optional<String> header(String header) {\n return this.header.getHeader(header);\n }",
"public Header getHeaderByKey(String key);",
"public String getHeaderField(String paramString) {\n/* 270 */ return this.delegate.getHeaderField(paramString);\n/* */ }",
"private static String getPeptideHeader() {\r\n return \"Spectrum\" + SEP\r\n + \"Peptide Sequence\" + SEP\r\n + \"No. Peptide Spectrum Matches\" + SEP\r\n + \"Protein Accession\" + SEP\r\n + \"Protein Description\" + SEP;\r\n }",
"public String headerLine() {\n return headerLine;\n }",
"private org.gwtbootstrap3.client.ui.PanelHeader get_f_PanelHeader39() {\n return build_f_PanelHeader39();\n }",
"public TempTableHeader getHeader1() { return header1; }",
"public String getFirst(String[] headers, String key)\n\t{\n\t\tint i;\n\t\tString value = \"\";\n\t\tString line = \"\";\n\t\tString[] arr;\n\t\tString key2 = \"\";\n\t\tfor(i = 0; i<headers.length; i++)\n\t\t{\n\t\t\tline = headers[i].trim();\n\t\t\tif(line.contains(\":\"))\n\t\t\t{\n\t\t\t\tarr = line.split(\"\\\\:\", 2);\n\t\t\t\tkey2 = arr[0].trim();\n\t\t\t\tif(key2.compareToIgnoreCase(key) == 0)\n\t\t\t\t{\n\t\t\t\t\tvalue = arr[1].trim();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn value;\n\t}",
"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 }",
"private HorizontalLayout getHeader() {\n HorizontalLayout header = new HorizontalLayout();\n header.setWidth(\"100%\");\n header.setHeight(\"100px\");\n // TODO move this into a separate HeaderView class\n header.addComponent(new Label(\"Patient Management System Team Green\"));\n return header;\n }",
"Rule Header() {\n // Push 1 HeaderNode onto the value stack\n return Sequence(\n FirstOf(\n Include(),\n CppInclude(),\n Namespace()),\n actions.pushHeaderNode());\n }",
"public LinkedListIterator<AnyType> first() {\n return new LinkedListIterator<AnyType>(header.next);\n }",
"public final String getHead() {\n \t\treturn head;\n \t}",
"public SSLHeadingWidgetComponent getHeading()\r\n\t{\r\n\t\treturn getHeading( getSession().getSessionContext() );\r\n\t}",
"public String getbyHeader(){\n String byHed=driver.findElement(byHeader).getText();\n return byHed;\n }",
"@Override\n\tpublic Map<String, String> getHeader() {\n\t\treturn this.header;\n\t}",
"public List<byte[]> getHeader() {\n\t\treturn this.fileHeader;\n\t}",
"public String fieldHeader(int fld_i) { return flds[fld_i]; }",
"public String getHeader() {\n\t\tString item_text = getQuantityString(getCount());\n\t\tString header = getActivity().getString(R.string.browse_items_text, item_text, getCount());\n\t\treturn header;\n\t}",
"public HeaderElement prefixUpToFirstMulti() {\n HeaderElement result = new HeaderElement(column);\n for (HeaderNamePart namePart : nameParts) {\n if (namePart.multi) {\n result.add(namePart);\n return result;\n }\n result.add(namePart);\n }\n return null;\n }",
"@Override\r\n public String getMessageHeaderValueInOccurrence(int occurrence, String hdr) {\n return null;\r\n }",
"public RTCMHeader getRtcmHeader()\n {\n\treturn this.rtcmHeader;\n }",
"private org.gwtbootstrap3.client.ui.PanelHeader get_f_PanelHeader49() {\n return build_f_PanelHeader49();\n }",
"public void mapHeader(){\r\n\t\tString header = readNextLine();\r\n\t\tif (header == null) return;\r\n\t\t\r\n\t\tString split[] = header.split(Constants.SPLIT_MARK);\r\n\t\tfor (int i=0; i < Constants.HEADER.length; i++){\r\n\t\t\tmapHeader.put(Constants.HEADER[i], Constants.UNKNOWN);\r\n\t\t\tfor (int j = 0; j < split.length; j++){\r\n\t\t\t\tif (Constants.HEADER[i].equals(split[j])){\r\n\t\t\t\t\tmapHeader.put(Constants.HEADER[i], j);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public final native int getHeading() /*-{\n return this.getHeading() || 0;\n }-*/;",
"public static String getHeaderLine()\n {\n return \"j2ksec,eid,lat,lon,depth,mag\";\n }",
"@Transient\n public String getSlimGridHeading() {\n\tList<MarkerGridHeading> headings = this.getGridHeadings();\n\tif ((headings != null) && (headings.size() > 0)) {\n\t return headings.get(0).getHeadingAbbreviation();\n\t}\n\treturn null;\n }"
] | [
"0.7202505",
"0.6925936",
"0.64975756",
"0.6438977",
"0.64365584",
"0.64339894",
"0.64278084",
"0.64193577",
"0.6383684",
"0.6294447",
"0.62814337",
"0.6267727",
"0.623245",
"0.622894",
"0.62077504",
"0.61789423",
"0.614319",
"0.6125238",
"0.61192805",
"0.611843",
"0.608677",
"0.608677",
"0.6069944",
"0.6000496",
"0.599947",
"0.59927714",
"0.5957886",
"0.59549993",
"0.59393704",
"0.59115714",
"0.5887349",
"0.58749074",
"0.5853726",
"0.5825222",
"0.5811139",
"0.5778595",
"0.57631373",
"0.5746019",
"0.57371175",
"0.573141",
"0.5722007",
"0.5708535",
"0.5707862",
"0.5706573",
"0.56986976",
"0.5697573",
"0.56940067",
"0.5691261",
"0.569035",
"0.56868815",
"0.5685496",
"0.56821835",
"0.5677787",
"0.5666824",
"0.5665495",
"0.5656367",
"0.5655172",
"0.56529397",
"0.5641945",
"0.5641945",
"0.56177926",
"0.5613236",
"0.5602676",
"0.5600247",
"0.5599983",
"0.55916107",
"0.5589731",
"0.5587513",
"0.5584641",
"0.55705595",
"0.55612457",
"0.55538553",
"0.5548224",
"0.55274886",
"0.55179876",
"0.5517921",
"0.55164534",
"0.55068773",
"0.55063605",
"0.55057114",
"0.54963446",
"0.54810184",
"0.54758674",
"0.54706377",
"0.54680693",
"0.5445443",
"0.54415554",
"0.5439644",
"0.54346144",
"0.5432251",
"0.54301345",
"0.5429675",
"0.5428434",
"0.5411436",
"0.5409407",
"0.54092145",
"0.5408604",
"0.5407533",
"0.5405526",
"0.5404439"
] | 0.8014683 | 0 |
smallest: should be negative, the first bit is 1, all other 1s are to the rightmost | public int nextSmallest(int n){
int countOnes = 0;
while(n>0){
if( (n&1) > 0){
countOnes++;
}
n = n>>1;
}
int countZeroes = 32 - countOnes;
int num = 0;
for(int i=0;i<countZeroes;i++){
num = (num<<1)+1;
}
return (~(num << (countOnes-1))) & (-1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static long lowestOneBit(long i) {\r\n // HD, Section 2-1\r\n return i & -i;\r\n }",
"static int min(int a, int b) { return a < b ? a : b; }",
"private static int searchSmallest(List<Integer> input) {\n\t\tint left = 0;\n\t\tint right = input.size()-1;\n\t\t\n\t\twhile(left < right) {\n\t\t\tint mid = left + (right-left)/2 + 1; System.out.println(\"mid=\" + mid);\n\t\t\t\n\t\t\tif(input.get(left) > input.get(mid)) {//smallest in left half\n\t\t\t\tright = mid-1;\n\t\t\t}else {\n\t\t\t\tleft = mid+1;\n\t\t\t}\n\t\t}\n\t\treturn left;//left=right now\n\t}",
"public static long highestOneBit(long i) {\r\n // HD, Figure 3-1\r\n i |= (i >> 1);\r\n i |= (i >> 2);\r\n i |= (i >> 4);\r\n i |= (i >> 8);\r\n i |= (i >> 16);\r\n i |= (i >> 32);\r\n return i - (i >>> 1);\r\n }",
"public static int minBits(long l) {\n\t\treturn Long.SIZE - Long.numberOfLeadingZeros(l);\n\t}",
"private int smallestF(){\r\n int smallest = 100000;\r\n int smallestIndex = 0;\r\n int size = _openSet.size();\r\n for(int i=0;i<size;i++){\r\n int thisF = _map.get_grid(_openSet.get(i)).get_Fnum();\r\n if(thisF < smallest){\r\n smallest = thisF;\r\n smallestIndex = i;\r\n }\r\n }\r\n return smallestIndex;\r\n }",
"private static int getMin(int[] original) {\n int min =original[0];\n for(int i = 1; i < original.length; i++) {\n if(original[i] < min) min = original[i];\n }\n return min;\n }",
"public static int min(int bitwidth) {\n return bitwidth < 1 ? 0 : 0 - (1 << (bitwidth - 1));\n }",
"public byte get_min() {\n return (byte)getSIntBEElement(offsetBits_min(), 8);\n }",
"static int findMin0(int[] nums) {\r\n \r\n // **** sanity check ****\r\n if (nums.length == 1)\r\n return nums[0];\r\n\r\n // **** check if there is no rotation ****\r\n if (nums[nums.length - 1] > nums[0])\r\n return nums[0];\r\n\r\n // **** loop looking for the next smallest value ****\r\n for (int i = 0; i < nums.length - 1; i++) {\r\n if (nums[i] > nums[i + 1])\r\n return nums[i + 1];\r\n }\r\n\r\n // **** min not found ****\r\n return -1;\r\n }",
"int min() {\n\t\t// added my sort method in the beginning to sort our array\n\t\tint n = array.length;\n\t\tint temp = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 1; j < (n - i); j++) {\n\t\t\t\tif (array[j - 1] > array[j]) {\n\t\t\t\t\ttemp = array[j - 1];\n\t\t\t\t\tarray[j - 1] = array[j];\n\t\t\t\t\tarray[j] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// finds the first term in the array --> first term should be min if\n\t\t// sorted\n\t\tint x = array[0];\n\t\treturn x;\n\t}",
"int getMin() \n\t{ \n\t\tint x = min.pop(); \n\t\tmin.push(x); \n\t\treturn x; \n\t}",
"private Node smallest(Node p){\n if(p == null){\n return null;\n }\n Node smallest = p;\n while(smallest.left!=null){\n smallest = smallest.left;\n }\n return smallest;\n }",
"int minverse(int z)\n {\n int to,t1;\n int q,y;\n if(z<=1)\n return z;\n t1=0x10001/z;\n y=0x10001%z;\n if(y==1)\n return (0xffff&(1-t1));\n to=1;\n do\n {\n q=z/y;\n z=z%y;\n to+=q*t1;\n if(z==1)\n return to;\n q=y/z;\n y=y%z;\n t1+=q*to;\n }while(y!=1);\n return (0xffff&(1-t1));\n }",
"int min();",
"int getMin( int min );",
"private WAVLNode min(WAVLNode x) {\n\t while(x.left!=EXT_NODE) {\r\n \tx=x.left;\r\n }\r\n return x;\r\n }",
"public int getSmallestNodeIndex() {\n\t\tHuffmanTreeNode[] heap = this.getHuffmanHeap();\n\t\tint smallest = 0;\n\t\t\n\t\tfor (int i = 1; i < heap.length; i++) {\n\t\t\tif (heap[smallest].compareTo(heap[i]) > 0)\n\t\t\t\tsmallest = i;\n\t\t}\n\t\t\n\t\treturn smallest;\n\t}",
"public Node binomialHeapMinimum() {\n\t\tNode y = null;\n\t\tNode x = this.head;\n\t\tint min = Integer.MAX_VALUE;\n\t\twhile(x!=null) {\n\t\t\tif (x.key < min) {\n\t\t\t\tmin = x.key;\n\t\t\t\ty = x;\n\t\t\t}\n\t\t\tx = x.rightSibling;\n\t\t}\n\t\treturn y;\n\t}",
"public abstract int getMinimumValue();",
"int getMinValue(AVLTreeNode node)\r\n {\n if (node == null) return Integer.MIN_VALUE;\r\n\r\n // if this is the left-most node\r\n if (node.left == null) return node.key;\r\n\r\n return getMinValue(node.left);\r\n }",
"public int getMinimumInteger() {\n/* 190 */ return (int)this.min;\n/* */ }",
"@Override\n public int pullNextComplementaryEdgeId(int smallest) {\n if (edgeId >= smallest) {\n return ++edgeId;\n } else {\n return pullNextComplementaryEdgeIdAdviser(smallest);\n }\n }",
"public static int min(int a, int b) {\n return b + ((a - b) & (a - b) >> 31);\n }",
"private int min(int a, int b) {\n\t\treturn a<b?a:b;\n\t}",
"private static int min(int d1,int d2){\n\t\treturn d1<d2?d1:d2;\n\t}",
"int minPriority(){\n if (priorities.length == 0)\n return -1;\n\n int index = 0;\n int min = priorities[index];\n\n for (int i = 1; i < priorities.length; i++){\n if ((priorities[i]!=(-1))&&(priorities[i]<min)){\n min = priorities[i];\n index = i;\n }\n }\n return values[index];\n }",
"public static int min(int[] a){\r\n\t\tint m = a[0];\r\n\t\tfor( int i=1; i<a.length; i++ )\r\n if( m > a[i] ) m = a[i];\r\n\t\treturn m;\r\n\t}",
"public int minkeys() {\n\t\tint min = 0;\n\t\tif (parentref == null) {\n\t\t\treturn 1;\n\t\t}\n\t\tmin = (int)Math.ceil((degree) / 2.0) - 1;\n\t\t//min = (int)Math.ceil(degree / 2.0);\n\t\treturn Math.max(min, 0);\n\t}",
"static int findMin(int[] nums) {\r\n \r\n // **** sanity check(s) ****\r\n if (nums.length == 1)\r\n return nums[0];\r\n\r\n // **** initialization ****\r\n int left = 0;\r\n int right = nums.length - 1;\r\n\r\n // **** check if there is no rotation ****\r\n if (nums[right] > nums[left])\r\n return nums[left];\r\n\r\n // **** binary search approach ****\r\n while (left < right) {\r\n\r\n // **** compute mid point ****\r\n int mid = left + (right - left) / 2;\r\n\r\n // **** check if we found min ****\r\n if (nums[mid] > nums[mid + 1])\r\n return nums[mid + 1];\r\n\r\n if (nums[mid - 1] > nums[mid])\r\n return nums[mid];\r\n\r\n // **** decide which way to go ****\r\n if (nums[mid] > nums[0])\r\n left = mid + 1; // go right\r\n else\r\n right = mid - 1; // go left\r\n }\r\n\r\n // **** min not found (needed to keep the compiler happy) ****\r\n return 69696969;\r\n }",
"private static int leftBump(int[] a) {\n for (int i = 2; i <= a.length; i++) {\n if (a[i] < a[i - 1]) {\n return i - 1;\n }\n }\n return -1;\n }",
"private double getLowest()\n {\n if (currentSize == 0)\n {\n return 0;\n }\n else\n {\n double lowest = scores[0];\n for (int i = 1; i < currentSize; i++)\n {\n if (scores[i] < lowest)\n {\n scores[i] = lowest;\n }\n }\n return lowest;\n }\n }",
"private Node findSmallest(Node curr) {\n Node prev = null;\n while(curr != null && !curr.isNull) {\n prev = curr;\n curr = curr.left;\n }\n return prev != null ? prev : curr;\n }",
"public BigInteger shiftLeftOneBit() {\n return signum() == 0 ? this : BitLevel.shiftLeftOneBit(this);\n }",
"int left(int i) { return i<<1; }",
"private Node getSuccessorBasedOnMin(Node node) {\n Node successor = localMinAndItsParent(node)[0];\n Node successorParent = localMinAndItsParent(node)[1];\n if (successor != node.rightChild) {\n successorParent.leftChild = successor.rightChild;\n successor.rightChild = node.rightChild;\n }\n return successor;\n }",
"private static int minimum(BinarySearchTreeNode<Integer> root) {\n if (root == null) {\n return Integer.MAX_VALUE;\n }\n\n int leftMin = minimum(root.left);\n int rightMin = minimum(root.right);\n\n return Math.min(root.data, Math.min(leftMin, rightMin));\n }",
"public int eightMin(int[] array) {\n\t\tcountMin++;\n\t\tif (array.length != 8)\n\t\t\treturn -1;\n\t\telse {\n\t\t\tint min = array[0];\n\t\t\tint pos = 0;\n\n\t\t\tfor (int i = 1; i < array.length; i++) {\n\t\t\t\tif (array[i] < min) {\n\t\t\t\t\tpos = i;\n\t\t\t\t\tmin = array[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn pos;\n\t\t}\n\t}",
"protected BinaryNode<AnyType> findMin(BinaryNode<AnyType> t) {\n\t\tif (t != null)\n\t\t\twhile (t.left != null)\n\t\t\t\tt = t.left;\n\n\t\treturn t;\n\t}",
"public int getMinimumValue() {\n/* 276 */ return -this.s.getMaximumValue();\n/* */ }",
"public static int minBytes(long l) {\n\t\tint bits = minBits(l);\n\t\tif (bits == 0)\n\t\t\treturn 1;\n\t\treturn ((bits - 1) >>> 3) + 1;\n\t}",
"public TreeNode smallest() {\n\t\tif(root == null) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tTreeNode current = root; \n\t\t\twhile(current.getLeftChild() != null) {\n\t\t\t\tcurrent = current.getLeftChild();\n\t\t\t}\n\t\t\treturn current;\n\t\t}\n\t}",
"private long minKey() {\n if (left.size == 0) return key;\n // make key 'absolute' (i.e. relative to the parent of this):\n return left.minKey() + this.key;\n }",
"public static int min(int a, int b) {\t\n\t\treturn ((a<b)?a:b);\n\t}",
"public int minElement() {\n\t\tNode min=root;\n\t\tint out=-1;\n\t\twhile(min!=null) {\n\t\t\tout=min.data;\n\t\t\tmin=min.left;\n\t\t}\n\t\treturn out;\n\t}",
"final int getSmallestType() {\n return LEAST_TYPE_CODE;\n }",
"int getMin() {\n\t\tif (stack.size() > 0) {\n\t\t\treturn minEle;\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\t}",
"public int getMinIntValue();",
"public int extractMinimum() {\n \n //O(log_2(w))\n int min = minimum();\n\n if (min == -1) {\n assert(xft.size() == 0);\n return -1;\n }\n \n remove(min);\n \n return min;\n }",
"public T smallest(Node node) {\n while (node.left != null) {\n node = node.left;\n }\n return node.element;\n }",
"public static int getMin(int[] array) {\n //TODO: write code here\n int min = array[0];\n for(int a : array) {\n min = a < min ? a : min;\n }\n return min;\n }",
"public int minValue(Node node) {\n /* loop down to find the rightmost leaf */\n Node current = node;\n while (current.left != null)\n current = current.left;\n\n return (current.key);\n }",
"public int findSmallest() {\n\t/*\n\t Cases:\n\t If last or only node, return datum\n\n\t Otherwise:\n\t Return whatever is smaller: \n\t The datum of the current node,\n\t or the datum of the next node \n\t*/ \n\tif (next == null) return datum; \n\telse {\n\t int nextDatum = next.findSmallest();\n\t if (nextDatum < datum) return nextDatum;\n\t else return datum;\n\t}\n }",
"private Node getLowestNode(Set<Node> openSet)\r\n {\r\n // find the node with the least f\r\n double minF = Double.MAX_VALUE;\r\n Node[] openArray = openSet.toArray(new Node[0]);\r\n\r\n Node q = null;\r\n for (int i = 0; i < openArray.length; ++i)\r\n {\r\n if (openArray[i].f < minF) \r\n {\r\n minF = openArray[i].f;\r\n q = openArray[i];\r\n }\r\n }\r\n return q;\r\n }",
"public int minFlipsMonoIncr(String S) {\n \n int n = S.length();\n int[] nLeftOnes = new int[n]; // inclusive\n \n int cnt = 0;\n for (int i = 0; i < n; i++) {\n if(S.charAt(i) == '1') {\n cnt++;\n }\n nLeftOnes[i] = cnt;\n }\n \n // scan for best partition\n // if we split to the right hand side of ith element\n // we need to flip all the left ones = nLeftOnes[i]\n // + all the right zeros = (n - nLeftOnes[n - 1]) - ((i + 1) - nLeftOnes[i])\n // corner case is flip all the zeros to one\n // that is (n - nLeftOnes[n - 1])\n \n int cMin = Integer.MAX_VALUE;\n for (int i = 0; i < n; i++) {\n cMin = Math.min(cMin, nLeftOnes[i] + (n - nLeftOnes[n - 1]) - ((i + 1) - nLeftOnes[i]));\n }\n cMin = Math.min(cMin, n - nLeftOnes[n - 1]);\n \n return cMin;\n \n }",
"private static int firstGreaterEqual(int[] A, int target) {\n int low = 0, high = A.length;\n while (low < high) {\n int mid = low + ((high - low) >> 1);\n //low <= mid < high\n if (A[mid] < target) {\n low = mid + 1;\n } else {\n //should not be mid-1 when A[mid]==target.\n //could be mid even if A[mid]>target because mid<high.\n high = mid;\n }\n }\n return low;\n }",
"public static void minEl1(List<Integer> list){\n int min = list.stream().reduce(Integer.MAX_VALUE, (x,y)->x<y ? x : y);\n System.out.println(min);\n }",
"public int getLowestChromID();",
"public int minimum() {\n \n if (xft.size() == 0) {\n return -1;\n }\n \n Integer repr = xft.minimum();\n \n assert(repr != null);\n \n return repr.intValue();\n }",
"public Integer smallest() {\n if (root != null) {\n return root.smallest();\n }\n return null;\n }",
"static int minVal(int a, int b, int c, int d){ //minVal function evaluates the lowest value takes 4 ints and returns an int\n \n //logic: (logic table)\n //\n int[] val = new int[]{a, b, c, d}; //loads it into a array to make it easier to cycle through\n if(a == minVal(val[0], val[1])){//if a is smaller than b\n if (a == minVal(val[0], val[2])){// if a is smaller than c\n if(a == minVal(val[0], val[3])) //if a is smaller than d, return a\n return a;\n return val[3]; // if d is not smaller than a but a is smaller than the rest return d\n }//end if\n else if(c == minVal(val[2], val[3])) //if a is smaller than b but not smaller than c, check if c is smaller than d\n return val[2];//return c\n return val[3];// if a is smaller than b but not smaller than c, and c is not smaller than d, return d \n }//end if \n else{ //if(b == minVal(val[0], val[1])){ //if b is smaller than a\n if (b == minVal(val[1], val[2])){ //if b is smaller than c\n if(b == minVal(val[1], val[3])) //if b is smaller than d, return b\n return b;\n return val[3];// if d is not smaller than a but a is smaller than the rest return d\n }//end if\n else if(c == minVal(val[2], val[3]))//if a is smaller than b but not smaller than c, check if c is smaller than d\n return val[2];//return c\n return val[3];// if a is smaller than b but not smaller than c, and c is not smaller than d, return d \n }//end else\n \n }",
"private int findMin(int[] nums) {\n if (nums == null || nums.length == 0) return -1;\n int left = 0;\n int right = nums.length - 1;\n while (left < right) {\n int mid = left + (right - left) / 2;\n if (nums[mid] >= nums[left] && nums[mid] > nums[right]) {\n left = mid + 1;\n } else if (nums[mid] == nums[right]) {\n while (mid < right && nums[mid] == nums[right]) {\n right--;\n }\n } else {\n right = mid;\n }\n }\n return nums[left];\n }",
"public static int indexOfSmallestElement(int[] array) {\n\t\tint min = array[0];\n\t\tint minIndex = 0;\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tif (array[i] < min) {\n\t\t\t\tmin = array[i];\n\t\t\t\tminIndex = i;\n\t\t\t}\n\t\t}\n\t\treturn minIndex;\t\n\t}",
"public static int findMin(){\n int min = array[0];\n for(int x = 1; x<array.length; x++ ){\n if(array[x]<min){\n min=array[x];\n }\n }\n return min;\n}",
"static int minimumAbsoluteDifferenceSlower(int[] arr) {\n int smallest = 0;\n for (int i = 0; i < arr.length; i++) {\n for (int j = i + 1; j < arr.length; j++) {\n int current = Math.abs(arr[i] - arr[j]);\n if (i == 0) {\n smallest = current;\n } else if (smallest > current) {\n smallest = current;\n }\n }\n }\n\n return smallest;\n }",
"public int findMinValue(Node root) {\n if(root == null) {\n return Integer.MAX_VALUE;\n }\n int output = (int)root.getData();\n int outputOnLeft = findMinValue(root.getLeftChildNode());\n int outputOnRight = findMinValue(root.getRightChildNode());\n if(outputOnLeft < output) {\n output = outputOnLeft;\n }\n if(outputOnRight < output) {\n output = outputOnRight;\n }\n return output;\n }",
"int min() {\n return min;\r\n }",
"public int min(int[] array) {\n if (array == null || array.length == 0){\n return 0;\n }\n int min = array[0];\n for(int i = 0; i < array.length; i++){\n if (array[i] < min){\n min = array[i];\n }\n }\n return min;\n }",
"double getLeft(double min);",
"int Smallest()throws EmptyException {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyException();\n\t\t}\n\t\tNode curr = head;\n\t\tint min = curr.data;\n\t\twhile (curr.next != null) {\n\t\t\tif (curr.next.data < min) {\n\t\t\t\tmin = curr.next.data;\n\t\t\t}\n\t\t\tcurr = curr.next;\n\t\t}\n\t\treturn min;\n\t}",
"public Side leftLowest(Side other) {\n\t\tif (this == other) return this;\n\t\treturn this.level <= other.level ? this : other;\n\t}",
"private static int findIndexOfSmallest(float[] vector) {\n\t\tint index = -1;\n\t\tfloat value = Float.MAX_VALUE;\n\t\tfloat temp;\n\t\tfor (int d=0; d<Constants.ACCEL_DIM; ++d) {\n\t\t\ttemp = vector[d];\n\t\t\tif (temp<0.0f)\n\t\t\t\ttemp = -temp;\n\t\t\t\n\t\t\tif (temp<value) {\n\t\t\t\tvalue = temp;\n\t\t\t\tindex = d;\n\t\t\t}\n\t\t}\n\t\treturn index;\n\t}",
"public abstract Key getSmallest();",
"public static int min(int i, int j) {\n\t\treturn (i < j) ? i : j;\n\t}",
"public int min(ArrayList<Integer> list) {\r\n int minValue = Integer.MAX_VALUE;\r\n\r\n for (int i : list) {\r\n if (i < minValue) {\r\n minValue = i;\r\n\r\n }\r\n\r\n }\r\n return minValue;\r\n }",
"public int findMin() {\n\t\tint min = (int)data.get(0);\n\t\tfor (int count = 1; count < data.size(); count++)\n\t\t\tif ((int)data.get(count) < min)\n\t\t\t\tmin = (int)data.get(count);\n\t\treturn min;\n\t}",
"E minVal();",
"public static int minIndex(int a, int b)\n {\n return (a < 0) ? b\n : (b < 0) ? a\n : Math.min(a, b);\n }",
"public int getMinFloor();",
"private static int min_value(State curr_state) {\n\t\tcounterMinimax++;\r\n\r\n\t\t//Check if the current state is a terminal state, if it is, return\r\n\t\t//its terminal value\r\n\t\tif(curr_state.isTerminal()){\r\n\t\t\treturn curr_state.getScore();\r\n\t\t}\r\n\r\n\t\tint min_value = Integer.MAX_VALUE;\r\n\t\t//Get the successors of the current state, as light always runs second\r\n\t\t//it will call minValue;\r\n\t\tState[] successors = curr_state.getSuccessors('2');\r\n\r\n\t\tif(successors.length == 0 && curr_state.isTerminal() == false){\r\n\t\t\tmin_value = Math.min(min_value, max_value(curr_state));\r\n\t\t}\r\n\r\n\r\n\t\t//Select the successor that returns the smallest(optimal) value\r\n\t\tfor(State state : successors){\r\n\t\t\tmin_value = Math.min(min_value, max_value(state));\r\n\t\t}\r\n\r\n\r\n\t\treturn min_value;\r\n\t}",
"public int findMin() {\r\n\t\treturn this.min.value;\r\n\t}",
"private K smallest(BSTnode<K> n) {\n\t\tif (n.getLeft() == null) {\n\t\t\treturn n.getKey();\n\t\t} else {\n\t\t\treturn smallest(n.getLeft());\n\t\t}\n\t}",
"protected final int getMin() {\n\treturn(this.min);\n }",
"private Node minNode(Node node) {\n Node updt = node;\n // Finding the leftmost leaf\n while (updt.left != null) {\n updt = updt.left;\n }\n return updt;\n }",
"public int minJump(int[] array) {\n if (array == null || array.length <= 1) {\n return 0;\n }\n int[] minJump = new int[array.length];\n minJump[0] = 0;\n for (int i = 1; i < array.length; i++) {\n minJump[i] = -1;\n for (int j = i - 1; j >= 0; j--) {\n if (j + array[j] >= i && minJump[j] != -1) {\n if (minJump[j] + 1 < minJump[i] || minJump[i] == -1) {\n minJump[i] = minJump[j] + 1;\n }\n }\n }\n }\n return minJump[minJump.length - 1];\n }",
"public final boolean minimum(){\r\n\t\treturn minimum;\r\n\t}",
"private BinaryNode<AnyType> findMin( BinaryNode<AnyType> t )\r\n\t{\r\n\t\tif( t == null )\r\n\t\t\treturn null;\r\n\t\telse if( t.left == null )\r\n\t\t\treturn t;\r\n\t\treturn findMin( t.left );\r\n\t}",
"int minKey(float key[], Boolean mstSet[]){\n float min = Float.MAX_VALUE;\n int min_index = -1;\n \n for (int v = 0; v < V; v++)\n if (mstSet[v] == false && key[v] < min) {\n min = key[v];\n min_index = v;\n }\n \n return min_index;\n }",
"public int getMinimun(){\n int lowGrade = grades[0]; //assume que grades[0] é a menor nota\n \n //faz um loop pelo array de notas\n for(int grade: grades){\n //se nota for mais baixa que lowGrade, essa note é atribuida a lowGrade\n if(grade < lowGrade){\n lowGrade = grade;\n }\n }\n \n return lowGrade;\n }",
"public static short min(final short[] data) {\r\n short min = Short.MAX_VALUE;\r\n for (final short element : data) {\r\n if (min > element) {\r\n min = element;\r\n }\r\n }\r\n return min;\r\n }",
"public int minSwaps(int[] data) {\n int n = 0;\n for (int i : data) {\n \tif (i == 1) n++;\n }\n if (n == 1) return 0;\n int zeroCount = 0;\n for (int i = 0; i < n; i++) {\n \tif (data[i] == 0) zeroCount++;\n }\n int result = zeroCount;\n for (int i = n; i < data.length; i++) {\n \tif (data[i] == 0) zeroCount++;\n \tif (data[i - n] == 0) zeroCount--;\n \tresult = Math.min(result, zeroCount);\n }\n return result;\n }",
"public static int findMinimum(int[] array) {\n if (array == null || array.length == 0) {\n return Integer.MIN_VALUE;\n }\n int left = 0;\n int right = array.length -1;\n int element = findPivot(array, left, right);\n return element;\n }",
"public int removeMin() {\n // FILL IN CODE\n\n return -1; // don't forget to change it\n }",
"public static int MIN_VALUE(State state){\n if(TERMINAL_TEST(state)){\n //System.out.println(\"Found a terminal state on min\\n:\"+state);\n return UTILITY(state);\n }\n if(SUCCESSOR(state).size()==0){\n return UTILITY(state);\n }\n int v = positiveInf;\n for(State s:SUCCESSOR(state)){\n v = Math.min(v, MAX_VALUE(s));\n }\n return v;\n }",
"public int minJump(int[] array) {\n if (array == null || array.length == 0) {\n return 0;\n }\n int[] minJump = new int[array.length];\n for (int i = array.length - 1; i >= 0; i--) {\n if (i + array[i] >= array.length) {\n minJump[i] = 1;\n } else {\n for (int j = array[i]; j >= 1; j--) {\n if (minJump[i + j] > 0 && (minJump[i + j] + 1 < minJump[i] || minJump[i] == 0)) {\n minJump[i] = minJump[i + j] + 1;\n }\n }\n }\n }\n return minJump[0] == 0 ? -1 : minJump[0];\n }",
"private Point lowestFInOpen() {\n\t\tPoint lowestP = null;\n\t\tfor (Point p : openset) {\n\t\t\tif (lowestP == null) \n\t\t\t\tlowestP = p;\n\t\t\telse if (fscores.get(p) < fscores.get(lowestP))\n\t\t\t\tlowestP = p;\n\t\t}\n\t\treturn lowestP;\n\t}",
"static int min(int a, int b) {\n return Math.min(a, b);\n }",
"public static int alwaysPickLeftmost(int[] arr, int left, int right) {\n return left;\n }",
"public static int getMin(int[] inputArray){\n int minValue = inputArray[0];\n for(int i=1; i<inputArray.length;i++){\n if(inputArray[i] < minValue){\n minValue=inputArray[i];\n }\n }\n return minValue;\n }",
"private static Node min(Node root) {\n\t\tif(root.left == null) {\n\t\t\treturn root;\n\t\t}\n\t\treturn min(root.left);\n\t}"
] | [
"0.754237",
"0.6506039",
"0.63041365",
"0.6283111",
"0.6253774",
"0.62514406",
"0.6241591",
"0.6233381",
"0.6227295",
"0.61834276",
"0.61788464",
"0.6167415",
"0.61418533",
"0.61416763",
"0.61281806",
"0.6125974",
"0.6105583",
"0.60731363",
"0.6054926",
"0.60191184",
"0.60080075",
"0.5986168",
"0.59815156",
"0.59760153",
"0.59693104",
"0.5968532",
"0.59672856",
"0.59328574",
"0.59297436",
"0.5923272",
"0.59107155",
"0.59014046",
"0.5899562",
"0.5888766",
"0.5888053",
"0.5876632",
"0.58749986",
"0.5867077",
"0.58597463",
"0.58555585",
"0.5854463",
"0.5852778",
"0.5845771",
"0.58303994",
"0.5828736",
"0.58225894",
"0.58222747",
"0.581801",
"0.5811502",
"0.57967097",
"0.57851356",
"0.5782711",
"0.57794744",
"0.57725173",
"0.5772073",
"0.57675546",
"0.5760488",
"0.57542336",
"0.5751261",
"0.57477623",
"0.57459086",
"0.5745727",
"0.57454306",
"0.57362944",
"0.57336533",
"0.57312727",
"0.5728213",
"0.57255304",
"0.57201856",
"0.5717541",
"0.57120293",
"0.57093656",
"0.570458",
"0.5704246",
"0.57038724",
"0.57035863",
"0.5701527",
"0.5685942",
"0.5683514",
"0.56825125",
"0.56821436",
"0.5666145",
"0.5664986",
"0.5661604",
"0.5659863",
"0.56588626",
"0.56565595",
"0.5656118",
"0.5654625",
"0.56515855",
"0.5648189",
"0.5645524",
"0.5643333",
"0.56412894",
"0.56402683",
"0.56348264",
"0.56294876",
"0.56256896",
"0.5624183",
"0.56238914"
] | 0.7070416 | 1 |
largest: should be positive, the first bit is 0, all other 1s are to the leftmost, except the first bit | public int nextLargest(int n){
int countOnes = 0;
while(n>0){
if( (n&1) > 0){
countOnes++;
}
n = n>>1;
}
int num = 0;
for(int i=0;i<countOnes;i++){
num = (num<<1)+1;
}
num = num << (31 - countOnes);
return num;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static long highestOneBit(long i) {\r\n // HD, Figure 3-1\r\n i |= (i >> 1);\r\n i |= (i >> 2);\r\n i |= (i >> 4);\r\n i |= (i >> 8);\r\n i |= (i >> 16);\r\n i |= (i >> 32);\r\n return i - (i >>> 1);\r\n }",
"public static int maxOnesLength(int num){\n int rest;\n int flipCount = 0;\n int maxOnes = -1;\n int currMaxOnes = 0;\n int tempMaxOnes = 0;\n\n while(num != 0){\n rest = num % 2;\n num = num / 2;\n\n if(rest == 1){ // Current bit is 1\n currMaxOnes++;\n\n // Keep track of the right ones for the next reset of currMaxOnes\n tempMaxOnes = (flipCount == 1) ? tempMaxOnes + 1 : tempMaxOnes;\n\n } else if (rest == 0){ // Current bit is 0\n if (flipCount == 0){\n currMaxOnes++;\n flipCount++;\n tempMaxOnes = 1;\n } else { // One flip already done so reset currMaxOnes\n \n // Update the max\n maxOnes = (currMaxOnes > maxOnes) ? currMaxOnes : maxOnes;\n currMaxOnes = tempMaxOnes;\n tempMaxOnes = 0;\n flipCount = 1;\n }\n }\n }\n\n return maxOnes;\n }",
"public int heapExtractMax(){\n\t\tint max = a[0];\t\n\t\ta[0] = a[n-1];\n\t\ta[n-1] = Integer.MIN_VALUE;\n\t\tn--;\n\t\tmaxHeapfy(0);\t\t\n\t\treturn max;\n\t}",
"public static int max(int bitwidth) {\n return bitwidth < 1 ? -1 : (1 << (bitwidth - 1)) - 1;\n }",
"public int largestMirror(int[] arr)\n\t{\n\t\tif(arr.length==0)\n\t\t{\n\t\t\tthrow new AssertionError(\"Array is Empty\");\n\t\t}\n\t\tint i=0,j=0,temp=0,max=0,count=0;\n\t\twhile(i<arr.length-1)\n\t\t{\n\t\t\tcount=0;\n\t\t\ttemp=i;\n\t\t\tj=arr.length-1;\n\t\t\twhile(j>=temp)\n\t\t\t{\n\t\t\t\tif(arr[temp]==arr[j])\n\t\t\t\t{\n\t\t\t\t\tcount++;\n\t\t\t\t\tif(temp==j)count++;\n\t\t\t\t\ttemp++;\n\t\t\t\t}\n\t\t\t\telse if(count>0)break;\n\t\t\t\tif(max<count) \n\t\t\t\t\tmax=count;\n\t\t\t\tj--;\n\t\t\t\t\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn max;\n\t}",
"private static int max_value(State curr_state) {\n\t\tcounterMinimax++; \r\n\r\n\r\n\t\t//Check if the current state is a terminal state, if it is, return\r\n\t\t//its terminal value\r\n\t\tif(curr_state.isTerminal()){\r\n\t\t\treturn curr_state.getScore();\r\n\t\t}\r\n\r\n\t\tint max_value = Integer.MIN_VALUE;\r\n\t\tState[] successors = curr_state.getSuccessors('1');\r\n\r\n\t\tif(successors.length == 0 && curr_state.isTerminal() == false){\r\n\t\t\tmax_value = Math.max(max_value, min_value(curr_state));\r\n\t\t}\r\n\t\t//\t\telse if(successors.length != 0 && curr_state.isTerminal() == false){\r\n\r\n\t\t//Get the successors of the current state, as dark always runs first\r\n\t\t//it will call maxValue;\r\n\r\n\r\n\t\t//Select the successor that returns the biggest value\r\n\t\tfor(State state : successors){\r\n\t\t\tmax_value = Math.max(max_value, min_value(state));\r\n\t\t}\t\r\n\t\t//\t\t}\r\n\t\treturn max_value;\r\n\t}",
"public int findMaxValue(Node root) {\n if(root == null) {\n return Integer.MIN_VALUE;\n }\n int output = (int)root.getData();\n int leftOutput = findMaxValue(root.getLeftChildNode());\n int rightOutput = findMaxValue(root.getRightChildNode());\n if(leftOutput > output){\n output = leftOutput;\n }\n if(rightOutput > output) {\n output = rightOutput;\n }\n return output;\n\n }",
"private Node largest(Node p){\n if(p == null){\n return null;\n }\n Node largest = p;\n while(largest.right != null){\n largest = largest.right;\n }\n return largest;\n }",
"int getMaxValue(AVLTreeNode node) {\n if (node == null) return Integer.MAX_VALUE;\r\n\r\n // if this is the left-most node\r\n if (node.right == null) return node.key;\r\n\r\n return getMinValue(node.right);\r\n }",
"int max() {\n\t\t// added my sort method in the beginning to sort out array\n\t\tint n = array.length;\n\t\tint temp = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 1; j < (n - i); j++) {\n\n\t\t\t\tif (array[j - 1] > array[j]) {\n\t\t\t\t\ttemp = array[j - 1];\n\t\t\t\t\tarray[j - 1] = array[j];\n\t\t\t\t\tarray[j] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// finds the last term in the array --> if array is sorted then the last\n\t\t// term should be max\n\t\tint x = array[array.length - 1];\n\t\treturn x;\n\t}",
"public static long lowestOneBit(long i) {\r\n // HD, Section 2-1\r\n return i & -i;\r\n }",
"private int getMax(TreeNode root) {\n\t\twhile(root.right!=null)\n\t\t\troot=root.right;\n\t\treturn root.val;\n\t}",
"public static int flipBits(int a) {\n if(~a == 0)\n return Integer.SIZE;\n int maxlen=0, currlen=0, prevlen=0;\n\n while(a != 0) {\n if((a&1) == 1) {\n currlen++;\n } else if((a&1) == 0) {\n prevlen = (a&2) == 0 ? 0 : currlen;\n currlen=0;\n }\n maxlen = Math.max(currlen + prevlen + 1, maxlen);\n a >>>= 1;\n }\n return maxlen;\n }",
"public int maximum() {\n \n if (xft.size() == 0) {\n return -1;\n }\n \n Integer maxRepr = xft.maximum();\n \n assert(maxRepr != null);\n \n int index = maxRepr.intValue()/binSz;\n \n TreeMap<Integer, Integer> map = getTreeMap(index);\n \n assert(map != null);\n \n Entry<Integer, Integer> lastItem = map.lastEntry();\n \n assert(lastItem != null);\n \n return lastItem.getKey();\n }",
"public static int maxOne(int arr[]) {\n\t\tint n =arr.length;\n\t\tint newArr[]= new int[n];\n\t\tint j=0;\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tif (arr[i]== 0) {\n\t\t\t\tnewArr[j]=i;\n\t\t\t\tj++;\n\t\t\t}\n\t\t}\n\t\tint max=0;\n\t\tint temp=0;\n\t\tfor (int i=1; i<=j; i++) {\n\t\t\ttemp=newArr[i]- newArr[i-1];\n\t\t\tmax=Math.max(max, temp);\n\t\t}\n\treturn max+1;\n\t}",
"public int longestZigZag(TreeNode root) {\n // left -> 0, right -> 1\n dfs(root, 0, 0);\n dfs(root, 1, 0);\n return max;\n }",
"public static int findLargest(int[] data){\n\t\tint lo=0, hi=data.length-1;\n\t\tint mid = (lo+hi)/2;\n\t\tint N = data.length-1;\n\t\twhile (lo <= hi){\n\t\t\tint val = data[mid];\n\t\t\tif(mid == 0 ) return (val > data[mid+1]) ? mid : -1;\n\t\t\telse if(mid == N) return (val > data[mid-1]) ? mid : -1;\n\t\t\telse{\n\t\t\t\tint prev = data[mid-1];\n\t\t\t\tint next = data[mid+1];\n\t\t\t\tif(prev < val && val < next) lo=mid+1;\n\t\t\t\telse if(prev > val && val > next) hi = mid-1;\n\t\t\t\telse return mid; // prev > val && val > next // is the only other case\n\t\t\t\tmid = (lo+hi)/2;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}",
"public byte get_max() {\n return (byte)getSIntBEElement(offsetBits_max(), 8);\n }",
"public int pollMax() {\n if (isEmpty()) throw new IllegalStateException(\"heap is empty\");\n int maxValue = a[0];\n a[0] = a[size - 1];\n size--;\n maxHeapify(0);\n return maxValue;\n }",
"public static int maxValue(int [] array){\n int hold = array[0];\n for(int i = 1; i < array.length; i++){\n if(array[i] > hold){\n hold = array[i];\n }\n }\n return hold;\n }",
"public int largestIsland(int[][] grid) {\n // First of all calculate the area of all of the islands. Assign unique id to every island.\n // Island ids start from 2 because our grid already has numbers 0 and 1\n // Replace the 1's of the island with the id of the island. Create a map of the island id and the area\n // Then again iterate over every element in the grid. Now, everytime we get zero (0), replace the zero \n // with one (1) and look at all four sides of the replace one. If we have island at any side of the \n // replaced one the add the area of that island to the max area and count the replaced one in it.\n if (grid == null || grid.length == 0) {\n return 0;\n }\n \n int max = 0;\n int islandId = 2;\n int row = grid.length;\n int col = grid[0].length;\n Map<Integer, Integer> islandArea = new HashMap<Integer, Integer>();\n int[][] directions = {{1, 0}, {-1, 0}, {0, 1}, {0, -1}};\n \n // Finding the area of every island\n for (int i = 0; i < row; i++) {\n for (int j = 0; j < col; j++) {\n if (grid[i][j] == 1) {\n int sizeOfCurrentIsland = getIslandSize(grid, i, j, islandId);\n max = Math.max(max, sizeOfCurrentIsland);\n islandArea.put(islandId++, sizeOfCurrentIsland);\n }\n }\n }\n \n // Iterating over the grid again and see if we change the value of zero (0) then what would be the max\n // area of the island.\n for (int i = 0; i < row; i++) {\n for (int j = 0; j < col; j++) {\n if (grid[i][j] == 0) {\n Set<Integer> setOfIslands = new HashSet<Integer>();\n for (int[] direction : directions) {\n int x = direction[0] + i;\n int y = direction[1] + j;\n if (x > -1 && y > -1 && x < row && y < col && grid[x][y] != 0) {\n setOfIslands.add(grid[x][y]);\n }\n }\n // Count current zero as well. So, sum is initialized to 1\n int sum = 1;\n \n for (int num : setOfIslands) {\n int value = islandArea.get(num);\n sum += value;\n }\n \n max = Math.max(max, sum);\n }\n }\n }\n \n return max;\n }",
"int getMaximum();",
"public static int MAX_VALUE(State state){\n if(TERMINAL_TEST(state)){\n //System.out.println(\"Found a terminal state on min\\n:\"+state);\n return UTILITY(state);\n }\n if(SUCCESSOR(state).size()==0){\n return UTILITY(state);\n }\n int v = negativeInf;\n for(State s:SUCCESSOR(state)){\n v = Math.max(v, MIN_VALUE(s));\n }\n return v;\n }",
"private BinaryNode max(BinaryNode node) {\n if (node == null) return node.parent;\n else if (node.right == null) return node;\n else return max(node.right);\n }",
"private static int getMax(int[] original) {\n int max = original[0];\n for(int i = 1; i < original.length; i++) {\n if(original[i] > max) max = original[i];\n }\n return max;\n }",
"public static int max(int[] a){\r\n\t\tint m = a[0];\r\n\t\tfor( int i=1; i<a.length; i++ )\r\n\t\t\tif( m < a[i] ) m = a[i];\r\n\t\treturn m;\r\n\t}",
"AVLTreeNode Max() {\r\n\r\n AVLTreeNode current = root;\r\n\r\n /* loop down to find the leftmost leaf */\r\n while (current.right != null)\r\n current = current.right;\r\n\r\n return current;\r\n\r\n\r\n }",
"public static int getMax(float[][] storage) {\n float []arr=new float[WINDOW];\n for (int i = 0;i<WINDOW;i++){\n arr[i]=storage[i][1];\n }\n\n if(arr==null||arr.length==0){\n return 0;//如果数组为空 或者是长度为0 就返回null\n }\n int maxIndex=0;//假设第一个元素为最小值 那么下标设为0\n int[] arrnew=new int[2];//设置一个 长度为2的数组 用作记录 规定第一个元素存储最小值 第二个元素存储下标\n for(int i =0;i<arr.length-1;i++){\n if(arr[maxIndex]<arr[i+1]){\n maxIndex=i+1;\n }\n }\n arrnew[0]=(int)arr[maxIndex];\n arrnew[1]=maxIndex;\n\n return arrnew[0];\n }",
"private void getMaxValue(){\n maxValue = array[0];\n for(int preIndex = -1; preIndex<number; preIndex++){\n for(int sufIndex = preIndex+1; sufIndex<=number;sufIndex++){\n long maxTmp = getPrefixValue(preIndex)^getSuffixCValue(sufIndex);\n if(maxTmp>maxValue){\n maxValue = maxTmp;\n }\n }\n }\n System.out.println(maxValue);\n }",
"public int nEigenOneOrGreater(){\n if(!this.pcaDone)this.pca();\n return this.greaterThanOneLimit;\n }",
"private static int maxValue(int[] a) {\n\t\tint max_value =0;\r\n\t\tint current_max=0;\r\n\t\t\r\n\t\tfor(int i=0;i<a.length;i++)\r\n\t\t{\r\n\t\t\tcurrent_max += a[i];\r\n\t\t\tmax_value= Math.max(max_value, current_max);\r\n\t\t\tif(a[i]<0)\r\n\t\t\t\tcurrent_max=0;\r\n\t\t}\r\n\t\t\r\n\t\treturn max_value;\r\n\t}",
"public int theHighest() {\r\n\t\tint highest = 0;\r\n\t\tfor(int i = 0; i < rows_size; i++) {\r\n\t\t\tfor(int j = 0; j < columns_size; j++) {\r\n\t\t\t\tif(game[i][j].getValue() > highest)\r\n\t\t\t\t\thighest = game[i][j].getValue();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn highest;\r\n\t}",
"public static int minBits(long l) {\n\t\treturn Long.SIZE - Long.numberOfLeadingZeros(l);\n\t}",
"public int max() {\n\t\treturn 0;\n\t}",
"public static int max(int[] a) {\n\t\tint b=a[0];\r\n\t\tfor(int i=0;i<a.length;i++) {\r\n\t\t\tif(a[i]>b) {\r\n\t\t\t\tb=a[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn b;\r\n\t}",
"protected final IntervalNode treeMax() {\n\tIntervalNode x = this;\n\twhile(x.right != IntervalNode.nullIntervalNode) {\n\t x = x.right;\n\t}\n\treturn(x);\n }",
"public static void main(String[] args) {\n\t\tString binary = Integer.toBinaryString(5);\r\n int count=0;\r\n int max=0;\r\n for(int i=0; i<binary.length();i++){\r\n \tif(binary.charAt(i)=='1'){\r\n count++;\r\n if(count>max)\r\n max=count;\r\n }else{\r\n count=0;\r\n }\r\n }\r\n System.out.println(max);\r\n\r\n\t}",
"private int deleteMax() {\n int ret = heap[0];\n heap[0] = heap[--size];\n\n // Move root back down\n int pos = 0;\n while (pos < size / 2) {\n int left = getLeftIdx(pos), right = getRightIdx(pos);\n\n // Compare left and right child elements and swap accordingly\n if (heap[pos] < heap[left] || heap[pos] < heap[right]) {\n if (heap[left] > heap[right]) {\n swap(pos, left);\n pos = left;\n } else {\n swap(pos, right);\n pos = right;\n }\n } else {\n break;\n }\n }\n\n return ret;\n }",
"static int extractHeapMax(int[] ar){\r\n\t\tif(heapSize<1) return -1;\r\n\t\tint max = ar[1];\r\n\t\tswap(ar,1,heapSize);\r\n\t\theapSize-=1;\r\n\t\tmax_heapify(ar, 1);\r\n\t\treturn max;\r\n\t}",
"int max();",
"int getMax( int max );",
"public void buildMaxHeap(Comparable[] array) {\n\t\tint n = array.length; //number of elements need to build\n\n\t\tfor (int pos = n/2; pos >= 1; pos--) { //start from position n/2\n\t\t\tint i = pos;\n\t\t\tComparable tmp = array[i - 1];\n\t\t\tboolean check = false;\n\n\t\t\twhile (!check && (2 * i <= n) ) {\n\t\t\t\tint j = 2 * i;\n\t\t\t\tif (j < n) {\n\t\t\t\t\t//choose the larger element\n\t\t\t\t\tif (array[j - 1].compareTo(array[j]) < 0 ) {\n\t\t\t\t\t\tj++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( tmp.compareTo(array[j - 1]) > 0 ) {\n\t\t\t\t\tcheck = true;\n\t\t\t\t} else {\n\t\t\t\t\tarray[i - 1] = array[j - 1];\n\t\t\t\t\ti = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tarray[i - 1] = tmp;\n\t\t}\n\t}",
"public int largest(int[][] matrix) {\n // Write your solution here\n if (matrix.length == 0 || matrix[0].length == 0) {\n return 0;\n }\n int[][] M1 = new int[matrix.length][matrix[0].length];\n leftToRight(matrix, M1);\n int[][] M2 = new int[matrix.length][matrix[0].length];\n rightToLeft(matrix, M2);\n int[][] M3 = new int[matrix.length][matrix[0].length];\n bottomToUp(matrix, M3);\n int[][] M4 = new int[matrix.length][matrix[0].length];\n upToBottom(matrix, M4);\n int global_max = 0;\n for (int i = 0; i < matrix.length; i++) {\n for (int j = 0; j < matrix[0].length; j++) {\n int arm = 0;\n int left = M1[i][j];\n int right = M2[i][j];\n arm = Math.min(left, right);\n int bottom = M3[i][j];\n arm = Math.min(arm, bottom);\n int up = M4[i][j];\n arm = Math.min(arm, up);\n if (arm > global_max) {\n global_max = arm;\n }\n }\n }\n return global_max;\n }",
"int max(int a, int b) \n { \n return (a > b) ? a : b; \n }",
"public int maxElement() {\n\t\tNode max=root;\n\t\tint out=-1;\n\t\twhile(max!=null) {\n\t\t\tout=max.data;\n\t\t\tmax=max.right;\n\t\t}\n\t\treturn out;\n\t}",
"public long getMaxIfShift() {\n return localMaxIfShift;\n }",
"public int getMax()\n {\n return 0;\n }",
"protected final void setMax() {\n\n\tint prevmax = this.max;\n\n\tint i1 = this.high;\n\tint i2 = left.max;\n\tint i3 = right.max;\n\n\tif ((i1 >= i2) && (i1 >= i3)) {\n\t this.max = i1;\n\t} else if ((i2 >= i1) && (i2 >= i3)) {\n\t this.max = i2;\n\t} else {\n\t this.max = i3;\n\t}\n\t\n\tif ((p != IntervalNode.nullIntervalNode) &&\n\t (prevmax != this.max)) {\n \t p.setMax();\n\t}\n }",
"public static int getLeftMostSetBitPosition(int integer){\n\t\t\n\t\tint ret = -1 ;\n\t\tif(integer < 0){\n\t\t\treturn Integer.SIZE -1 ;\n\t\t}\n\t\t\n\t\twhile(integer > 0){\n\t\t\tret++;\n\t\t\tinteger = integer >> 1;\n\t\t}\n\t\t\n\t\treturn ret ;\n\t\t\n\t}",
"public int nextSmallest(int n){\n\t\t\n\t\tint countOnes = 0;\n\t\twhile(n>0){\n\t\t\tif( (n&1) > 0){\n\t\t\t\tcountOnes++;\n\t\t\t}\n\t\t\tn = n>>1;\n\t\t}\n\t\t\n\t\tint countZeroes = 32 - countOnes;\n\t\tint num = 0;\n\t\tfor(int i=0;i<countZeroes;i++){\n\t\t\tnum = (num<<1)+1;\n\t\t}\n\t\treturn (~(num << (countOnes-1))) & (-1);\n\t\t\n\t}",
"public static short highestPrime(short maxNum)\n { \n for (short i = maxNum ; i >= 1 ; i--) \n {\n if(isPrime(i))\n {\n return i;\n }\n }\n return 0;\n }",
"public void findMaxComb() {\n\t\tHashMap<Integer, HashSet<Integer>> adj = new HashMap<Integer, HashSet<Integer>>();\n\t\tfor (int row=0; row< w; row++) {\n\t\t\tfor (int col=0; col<l; col++) {\n\t\t\t\tHashSet<Integer> hs = new HashSet<Integer>();\n\t\t\t\t//go left\n\t\t\t\tif (inBoard(row, col-1) && visited[row][col-1] != visited[row][col]) //in board and not equal\n\t\t\t\t\ths.add(visited[row][col-1]);\n\n\t\t\t\t//go up\n\t\t\t\tif (inBoard(row-1, col) && visited[row-1][col] != visited[row][col])\n\t\t\t\t\ths.add(visited[row-1][col]);\n\n\t\t\t\t//go right\n\t\t\t\tif (inBoard(row, col+1) && visited[row][col+1] != visited[row][col])\n\t\t\t\t\ths.add(visited[row][col+1]);\n\n\t\t\t\t//go down\n\t\t\t\tif (inBoard(row+1, col) && visited[row+1][col] != visited[row][col])\n\t\t\t\t\ths.add(visited[row+1][col]);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (adj.containsKey(visited[row][col])) {\n\t\t\t\t\tHashSet<Integer> tt = adj.get(visited[row][col]);\n\t\t\t\t\ttt.addAll(hs);//union, return boolen\n\t\t\t\t\tadj.put(visited[row][col], tt); \n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tadj.put(visited[row][col], hs);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tint tempMax = 0;\n\t\tfor (Integer key : adj.keySet()) {\n\t\t\tfor (Integer ele : adj.get(key)) {\n\t\t\t\ttempMax = Math.max(tempMax, map.get(key) + map.get(ele));\n\t\t\t}\n\t\t}\n\t\tmaxComb = tempMax;\n\t}",
"public long maxValue() {\n return 0;\n }",
"public int determineHighestVal() {\n if (playerCards[0].value > playerCards[1].value) {\n return playerCards[0].value;\n }\n return playerCards[1].value;\n\n }",
"private BinaryNode<AnyType> findMax( BinaryNode<AnyType> t )\r\n\t{\r\n\t\tif( t != null )\r\n\t\t\twhile( t.right != null )\r\n\t\t\t\tt = t.right;\r\n\r\n\t\treturn t;\r\n\t}",
"private static int max(int lhs, int rhs) {\r\n return lhs > rhs ? lhs : rhs;\r\n }",
"public int extractMaximum() {\n \n int max = maximum();\n\n if (max == -1) {\n assert(xft.size() == 0);\n return -1;\n }\n \n remove(max);\n \n return max;\n }",
"int getMax();",
"private int findMax(NodeTest root)\n\t{\n\t\t//traverse all of the right NodeTests of the root to find the last one at the right.\n\t\twhile (root.right != null)\n\t\t{\n\t\t\troot = root.right;\n\t\t}\n\t\t//being that it is a BST it is safe to assume that the last NodeTest to the right of the root\n\t\t//is the largest value\n\t\treturn root.data;\n\t}",
"public static int getMaximum(int[] array) {\n int length = array.length;\n int max = array[0];\n for (int i = 1; i < length; i++) {\n if(max < array[i]) {\n max = array[i];\n }\n }\n\n Arrays.sort(array);\n// return array[length - 1];\n return max;\n }",
"protected final int getMax() {\n\treturn(this.max);\n }",
"static Integer maximumProductOfAllEntriesButOneByCountingZeroAndNegatives(Integer array[]) {\n int zeroes = 0;\n int negatives = 0;\n\n for (int i = 0; i < array.length; i++) {\n if (array[i] < 0) negatives++;\n else if (array[i] == 0) zeroes++;\n }\n\n if (zeroes > 1) return 0;\n\n int indexToExclude = -1;\n\n if ((negatives % 2 == 1)) {\n // find the greatest negative and discard it\n for (int i = 0; i < array.length; i++) {\n if ((array[i] < 0) && ((indexToExclude == -1) || (array[i] > array[indexToExclude]))) indexToExclude = i;\n }\n } else {\n // find the minimum non-negative and discard it\n\n if (array.length - negatives > 0) {\n for (int i = 0; i < array.length; i++) {\n if ((array[i] >= 0) && ((indexToExclude == -1) || (array[i] < array[indexToExclude]))) indexToExclude = i;\n }\n } else { // all negatives\n // find the lowest negative and discard\n\n for (int i = 0; i < array.length; i++) {\n if ((array[i] < 0) && ((indexToExclude == -1) || (array[i] < array[indexToExclude]))) indexToExclude = i;\n }\n }\n }\n\n int product = 1;\n for (int i = 0; i < array.length; i++) {\n if (i != indexToExclude) product *= array[i];\n }\n\n return product;\n }",
"public SplayNode maximum(SplayNode x) {\n\t\t while(x.right != null)\n\t\t x = x.right;\n\t\t return x;\n\t\t }",
"public int leftMostColumnWithOne(BinaryMatrix binaryMatrix) {\n\n int rows = binaryMatrix.dimensions().get(0);\n int cols = binaryMatrix.dimensions().get(1);\n\n // Set pointers to the top-right corner.\n int currentRow = 0;\n int currentCol = cols - 1;\n\n // Repeat the search until it goes off the grid.\n while (currentRow < rows && currentCol >= 0) {\n if (binaryMatrix.get(currentRow, currentCol) == 0) {\n currentRow++;\n } else {\n currentCol--;\n }\n }\n\n // If we never left the last column, this is because it was all 0's.\n return (currentCol == cols - 1) ? -1 : currentCol + 1;\n }",
"public abstract boolean testRightmostBit();",
"@Override\n public int highestRequest() {\n int c = Long.numberOfLeadingZeros( get() );\n if ( c == 64 ) {\n c = -1;\n } else {\n c = 64 - 1 - c;\n }\n return c;\n }",
"public int maxValue(Node node) {\n /* loop down to find the rightmost leaf */\n Node current = node;\n while (current.right != null)\n current = current.right;\n\n return (current.key);\n }",
"public static void main(String[] args) {\n int[] arr={24,34,56,98,2,59};\r\n int val =arr [0];\r\n for(int i=0;i<arr.length;i++){\r\n \t if(arr[i]>val){\r\n \t\t val=arr[i];\r\n \t }\r\n }\r\n System.out.println(\"largest value\"+ val);\r\n\t}",
"public static int maximo (int[] array) {\n\t\tint max = array[0], i;\n\t\t\n\t\tfor (i = 1; i < array.length; i++) {\n\t\t\tif (array[i] > max) {\n\t\t\t\tmax = array[i];\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn max;\n\t}",
"private long top_mask(int col) {\r\n return (long)1 << height - 1 << col*(height+1);\r\n }",
"public int getMaximumInteger() {\n/* 244 */ return (int)this.max;\n/* */ }",
"public TreeNode largest() {\n\t\tif(root == null) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tTreeNode current = root; \n\t\t\twhile(current.getRightChild() != null) {\n\t\t\t\tcurrent = current.getRightChild();\n\t\t\t}\n\t\t\treturn current;\n\t\t}\n\t}",
"static int maxStolenValue(int[] values) {\n if(values.length == 0) return 0;\n int[] dp = new int[values.length + 1];\n dp[0] = 0;\n dp[1] = values[0];\n for(int i=2; i<=values.length; i++){\n int value1 = values[i-1] + dp[i-2];\n int value2 = values[i-2];\n if(i>=3) value2 += dp[i-3];\n dp[i] = Math.max(value1, value2);\n }\n return dp[values.length];\n }",
"protected BigInteger buildMajorBits() {\n BigInteger ret = BigInteger.ZERO;\n final IPeaksSpectrum highestNPeaks = asMajorPeaks();\n final List<IPeak> iPeaks = ((PeaksSpectrum) highestNPeaks).internalGetPeaks();\n for (IPeak pk : iPeaks) {\n ret = ret.setBit((int) pk.getMz());\n }\n return ret;\n }",
"static int max(int a, int b) {\n\t\treturn a > b ? a : b;\n\t}",
"public static Node lmax(Node root) {\n\t\twhile(root.right!=null) {\r\n\t\t\troot=root.right;\r\n\t\t}\r\n\t\treturn root;\r\n\t}",
"public int getOldest(){\n\t\tCurrentSets = getCurrentSets();\n\t\tOldest = 0;\n\t\tSmallestValue = blocks[0].getAge();\n\t\tif(CurrentSets == 1){\n\t\t\treturn 0;\n\t\t}\n\t\telse if(CurrentSets == 2){\n\t\t\tif(blocks[0].getAge() > blocks[1].getAge())\n\t\t\t\treturn 1;\n\t\t\telse\n\t\t\t\treturn 0;\n\t\t}\n\t\tfor(i = 0; i < CurrentSets - 1; i++){\n\t\t\tif(blocks[i].getAge() < SmallestValue){\n\t\t\t\tOldest = i;\n\t\t\t\tSmallestValue = blocks[i].getAge();\n\t\t\t}\n\t\t}\n\t\treturn Oldest;\n\t}",
"public abstract int getMaximumValue();",
"private int largestPowerOf2(int n) { \n\t\tint res = 2;\n\t\twhile (res < n) {\n\t\t\tint rem = res;\n\t\t\tres = (int) Math.pow(res, 2);\n\t\t\tif (res > n)\n\t\t\t\treturn rem;\n\t\t}\n\t\treturn res;\n\t}",
"private BinaryNode<AnyType> findMax(BinaryNode<AnyType> t) {\r\n\t\tif (t != null)\r\n\t\t\twhile (t.right != null)\r\n\t\t\t\tt = t.right;\r\n\r\n\t\treturn t;\r\n\t}",
"private static int max(int[] array) {\n int result = array[0];\n for (int x : array)\n result = Math.max(x, result);\n return result;\n }",
"public final void max() {\n\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tif (secondTopMostValue > topMostValue) {\n\t\t\t\tpush(secondTopMostValue);\n\t\t\t} else {\n\t\t\t\tpush(topMostValue);\n\t\t\t}\n\t\t}\n\t}",
"public int findMax(){\n return nilaiMaks(this.root);\n }",
"public static int max(treenode root)\n {\n treenode curr=root;\n while(curr.right!=null)\n {\n curr=curr.right;\n }\n return curr.val;\n }",
"static int[] buildMaxHeap(int [] arr) {\n\t\tint n = arr.length;\n\t\tint startIdx = (n / 2) - 1;\n\t\tfor(int i = startIdx; i >= 0; i--)\n\t\t\theapify(arr, n, i);\n\t\treturn arr;\n\t}",
"static int findGreatestValue(int x, int y) {\r\n\t\t\r\n\t\tif(x>y)\r\n\t\t\treturn x;\r\n\t\telse\r\n\t\t return y;\r\n\t}",
"public long getMostSignificantBits() { throw new RuntimeException(\"Stub!\"); }",
"private int findMaxValue( XTreeNode<E> rootNode ) {\n\t\tif( rootNode == null ) {\n\t\t\treturn Integer.MIN_VALUE;\n\t\t}\n\n\t\tint rootValue = (Integer) rootNode.getData();\n\t\tint maxValue = rootValue;\n\n\t\tint leftValue = findMaxValue( rootNode.getLeftChild() );\n\t\tint rightValue = findMaxValue( rootNode.getRightChild() );\n\n\t\t// not using if else if, as need to compare three values - root, left, right\n\t\tif( leftValue > rootValue ) {\n\t\t\tmaxValue = leftValue;\n\t\t}\n\t\tif( rightValue > maxValue ) {\n\t\t\tmaxValue = rightValue;\n\t\t}\n\t\treturn maxValue;\n\t}",
"public int findMaxValueWithoutRecursion() {\n\t\tQueue<XTreeNode<Integer>> collectedNodes = new LinkedList<>();\n\t\tcollectedNodes.add( (XTreeNode<Integer>) this );\n\n\t\tint maxValue = Integer.MIN_VALUE;\n\t\twhile( !collectedNodes.isEmpty() ) {\n\t\t\tXTreeNode<Integer> node = collectedNodes.poll();\n\t\t\tmaxValue = node.getData() > maxValue ? node.getData() : maxValue;\n\n\t\t\tif( node.getLeftChild() != null ) {\n\t\t\t\tcollectedNodes.add( node.getLeftChild() );\n\t\t\t}\n\t\t\tif( node.getRightChild() != null ) {\n\t\t\t\tcollectedNodes.add( node.getRightChild() );\n\t\t\t}\n\t\t}\n\t\treturn maxValue;\n\t}",
"private static int maxIndex(int[] vals) {\n \n int indOfMax = 0;\n int maxSoFar = vals[0];\n \n for (int i=1;i<vals.length;i++){\n \n if (vals[i]>maxSoFar) {\n maxSoFar = vals[i];\n indOfMax = i;\n }\n }\n \n return indOfMax;\n }",
"public long getMaximumLong() {\n/* 233 */ return this.max;\n/* */ }",
"private static int longestConsecutiveSetBit(int num){\n int c= 0;\n int l =0;\n while(num >0){\n if((num & 1) == 0){\n if(c>l){\n l =c;\n }\n c= 0;\n }else {\n c += (num & 1);\n\n }\n num >>=1;\n }\n if(c>l){\n return c;\n }\n return l;\n }",
"public int getMaxFloor();",
"private BinaryNode<AnyType> findMax(BinaryNode<AnyType> t) {\n\t\tif (t != null)\n\t\t\twhile (t.right != null)\n\t\t\t\tt = t.right;\n\n\t\treturn t;\n\t}",
"public int rob1(int[] nums) {\n int n = nums.length;\n if(n == 0) return 0;\n if(n == 1) return nums[0];\n int max = nums[0];\n for(int i = 1; i < n; i++){\n int local = Math.max(nums[i - 1], nums[i] + (i > 1 ? nums[i - 2] : 0));\n nums[i] = local;\n max = Math.max(local, max);\n }\n return max;\n }",
"static public long max(long[] valarray) {\r\n long max = 0;\r\n for (long i : valarray) {\r\n if (i > max)\r\n max = i;\r\n }\r\n return max;\r\n }",
"public int maxOnLeft(int pos){\n int max=0;\n for(int i=0;i<pos;i++){\n if (t[i]>max){\n max=t[i];\n }\n }\n return max;\n }",
"int max(int a, int b)\n\t{\n\t\treturn(a>b)?a:b;\n\t}",
"public static int getMax(int[] array) {\n //TODO: write code here\n int max = array[0];\n for(int a : array) {\n max = a > max ? a : max;\n }\n return max;\n }",
"public static int[] zeroMax1(int[] nums) {\n\t\tfor(int i=0;i<nums.length;i++) \n\t\t\t\t{\n\t\t\t\t\tif(nums[i]==0) \n\t\t\t\t\t{\n\t\t\t\t\t\tfor(int j=i;j<nums.length;j++)\n\t\t\t\t\t\t{ \n\t\t\t\t\t\t\tif(nums[j]%2!=0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tint[] arr= {nums[j]};\n\t\t\t\t\t\t\t\tint maxNo=0;\n\t\t\t\t\t\t\t\tfor(int t=0;t<arr.length;t++)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif(arr[t]>maxNo)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tmaxNo=arr[t];\n\t\t\t\t\t\t\t\t\t\tnums[i]=maxNo;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t \n\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\treturn nums;\n\t\t}"
] | [
"0.7337718",
"0.61511064",
"0.6113955",
"0.60509527",
"0.5882972",
"0.5840029",
"0.5838727",
"0.5825941",
"0.57879543",
"0.5774615",
"0.576142",
"0.57511634",
"0.57022077",
"0.56889653",
"0.5686115",
"0.5676613",
"0.56659514",
"0.5662746",
"0.5620126",
"0.5613038",
"0.5609904",
"0.5605888",
"0.55991054",
"0.5586244",
"0.5585863",
"0.5584275",
"0.5578454",
"0.557701",
"0.5575096",
"0.5571072",
"0.55697143",
"0.55675423",
"0.55604964",
"0.5544629",
"0.554197",
"0.5539831",
"0.55359",
"0.5528134",
"0.5523055",
"0.5515284",
"0.5508701",
"0.55044955",
"0.5502918",
"0.5502679",
"0.550098",
"0.5498843",
"0.549736",
"0.54941183",
"0.54928595",
"0.5491382",
"0.5486975",
"0.5482647",
"0.5480784",
"0.5475718",
"0.5470246",
"0.54694474",
"0.54663986",
"0.5465713",
"0.5462776",
"0.5462658",
"0.5457717",
"0.5452819",
"0.5452185",
"0.544912",
"0.5447863",
"0.5446787",
"0.54365987",
"0.54354686",
"0.5435161",
"0.5434972",
"0.54294205",
"0.54261774",
"0.5425414",
"0.54092515",
"0.5404287",
"0.5404268",
"0.53998715",
"0.5399265",
"0.5394157",
"0.53915983",
"0.53910017",
"0.53883165",
"0.53872854",
"0.5386035",
"0.538389",
"0.53838557",
"0.5381834",
"0.5379352",
"0.53715885",
"0.536921",
"0.53683215",
"0.53662574",
"0.5366239",
"0.53651696",
"0.5361274",
"0.53469276",
"0.53433555",
"0.534287",
"0.53427255",
"0.53380233"
] | 0.66693425 | 1 |
TODO Autogenerated method stub | public static void main(String[] args) {
} | {
"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 |
weight should be in kgs height should be in cms age should be in years For bmi and bmr, when the user is inputting, need to invoke set methods as constructor wont do it | public User(String userId) {
this.name= null;
this.userId= userId;
this.height= 0;
this.gymFrequency= 0;
this.loseGainPerWeek= 0;
this.age= 0;
this.waterReminder= 0;
this.weight= 0;
this.gender= null;
// this.goal= goal;
this.restrictions="none";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public BMI(String name, double weight, double height)\n {\n this.name = name;\n this.weight = weight;\n this.height = height;\n }",
"public static void main( String [] args )\n {\n Scanner input = new Scanner( System.in );\n\n int weightInput = 0; // Init weight input\n int heightInput = 0; // Init height input\n\n double weightKg = 0; // Init weight conversion\n double heightM = 0; // Init height conversion\n\n double actual = 0;\n float bmi = 0; // Init calculated bmi\n\n\n System.out.println(\"\\n\\n\");\n System.out.print( \"Enter body weight(lbs):\" ); // promt for weight\n weightInput = input.nextInt(); // Input weight value\n\n System.out.print( \"Enter body height(in):\" ); // promt for height\n heightInput = input.nextInt(); // Input height value\n\n weightKg = weightInput * .45349237 ; // convert weight\n heightM = heightInput * .0254 ; // convert height\n\n actual = weightKg / (heightM * heightM); // calculate BMI\n\n bmi = (float) actual; //simplify BMI\n\n // Output BMI and Chart\n System.out.println(\"\\n\");\n System.out.println(\"-------------------------------\");\n System.out.println(\"Your Body Mass Index: \" + bmi);\n System.out.println(\"-------------------------------\");\n System.out.println(\"\\n\");\n System.out.println(\"-------------------------------\");\n System.out.println(\"Underweight: less than 18.5\");\n System.out.println(\"Normal: 18.5 – 24.9\");\n System.out.println(\"Overweight: 25 – 29.9\");\n System.out.println(\"Obese: 30 or greater\");\n System.out.println(\"-------------------------------\");\n System.out.println(\"\\n\\n\");\n\n\n }",
"public C05_BMI(String name, int age, double weight, double height) {\n\t\tsuper();\n\t\tthis.name = name;\n\t\tthis.age = age;\n\t\tthis.weight = weight;\n\t\tthis.height = height;\n\t}",
"public double getBMI(){\n bmi = weight * KG_PER_POUND / (height * METERS_PER_INCH *height * METERS_PER_INCH);\n return (bmi);\n}",
"public C05_BMI() {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\t\r\n\r\n\t\t\tScanner sc = new Scanner(System.in);\r\n\r\n\t\t\tSystem.out.println(\"Bitte geben Sie ihr Körpergewicht in KG an: \");\r\n\t\t\tdouble Gewicht = sc.nextDouble();\r\n\t\t\tSystem.out.print(\"Bitte geben Sie ihre Körpergröße in m an: \");\r\n\t\t\tdouble Groesse = sc.nextDouble();\r\n\t\t\tSystem.out.print(\"Bitte geben Sie ihr Alter an: \");\r\n\t\t\tdouble Alter = sc.nextDouble();\r\n\t\t\t\r\n\t\t\tdouble BMI = Gewicht/(Groesse*Groesse);\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Der BMI Beträgt \" + BMI);\r\n\t\t\tSystem.out.println(\"__________________________\");\r\n\r\n\t\tif (Alter >= 19 && Alter <= 24) {\r\n\t\t\tif (BMI >= 19 && BMI <= 24) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt im optimalen Bereich\");\r\n\t\t\t} else if (BMI < 19) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt unterhalb des optimalen Berecihs\");\r\n\t\t\t} else if (BMI > 24) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt oberhalb des optimalen Berecihs\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (Alter >= 25 && Alter <= 34) {\r\n\t\t\tif (BMI >= 20 && BMI <= 25) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt im optimalen Bereich\");\r\n\t\t\t} else if (BMI < 20) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt unterhalb des optimalen Berecihs\");\r\n\t\t\t} else if (BMI > 25) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt oberhalb des optimalen Berecihs\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\telse if (Alter >= 35 && Alter <= 44) {\r\n\t\t\tif (BMI >= 21 && BMI <= 26) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt im optimalen Bereich\");\r\n\t\t\t} else if (BMI < 21) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt unterhalb des optimalen Berecihs\");\r\n\t\t\t} else if (BMI > 26) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt oberhalb des optimalen Berecihs\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\telse if (Alter >= 45 && Alter <= 54) {\r\n\t\t\tif (BMI >= 22 && BMI <= 27) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt im optimalen Bereich\");\r\n\t\t\t} else if (BMI < 22) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt unterhalb des optimalen Berecihs\");\r\n\t\t\t} else if (BMI > 27) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt oberhalb des optimalen Berecihs\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\telse if (Alter >= 55 && Alter <= 64) {\r\n\t\t\tif (BMI >= 23 && BMI <= 28) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt im optimalen Bereich\");\r\n\t\t\t} else if (BMI < 23) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt unterhalb des optimalen Berecihs\");\r\n\t\t\t} else if (BMI > 28) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt oberhalb des optimalen Berecihs\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\telse if (Alter >= 64) {\r\n\t\t\tif (BMI >= 24 && BMI <= 29) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt im optimalen Bereich\");\r\n\t\t\t} else if (BMI < 24) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt unterhalb des optimalen Berecihs\");\r\n\t\t\t} else if (BMI > 29) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt oberhalb des optimalen Berecihs\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\t}",
"public static void main(String[] args)\r\n\t{\n\t\tfloat lbs, heightin, kg, heightm, BMI=0;\r\n\t\tint count;\r\n\t\t\r\n\t\tSystem.out.println(\"Metric or Imperial? \\n 1. Imperial\t2. Metric\");\r\n\t\tScanner scnr = new Scanner(System.in);\r\n\t\tcount = scnr.nextInt();\r\n\t\t\r\n\t\twhile(count != 1 || count != 2)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Metric or Imperial? \\n 1. Imperial\t2. Metric\");\r\n\t\t\tcount = scnr.nextInt();\r\n\t\t\tif(count == 1 || count == 2)\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\tif(count == 1)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Enter weight in pounds: \");\r\n\t\t\tlbs = scnr.nextFloat();\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Enter height in inches: \");\r\n\t\t\theightin = scnr.nextFloat();\r\n\t\t\t\r\n\t\t\tBMI = 703*lbs / (heightin*heightin);\r\n\t\t}\r\n\t\t\r\n\t\telse if(count == 2)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Enter weight in kilograms: \");\r\n\t\t\tkg = scnr.nextFloat();\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Enter height in meters: \");\r\n\t\t\theightm = scnr.nextFloat();\r\n\t\t\t\r\n\t\t\tscnr.close();\t\t\t\r\n\t\t\tBMI = kg / (heightm*heightm);\r\n\t\t}\r\n\t\t\r\n\t\t//Display BMI value for user\r\n\t\tSystem.out.println(\"Your BMI is: \" + BMI);\r\n\t\t\r\n\t\tif(BMI < 18.5)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"A BMI less than 18.5 indicates that you are underweight.\");\r\n\t\t}\r\n\t\telse if(BMI <= 24.9)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"A BMI between 18.5 and 24.9 is a healthy BMI\");\r\n\t\t}\r\n\t\telse if(BMI <= 29.9)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"A BMI between 25 and 29.9 indicates that you are overweight\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t//Last case does not need an if statement\r\n\t\t\tSystem.out.println(\"A BMI greater than 30 indicates that you are obese.\");\r\n\t\t}\r\n\t\treturn;\r\n\t}",
"public static double bmiCalculator (double weight, double height) { \n double bmi = weight/(height*height); // calculates BMI with formula\n System.out.println(\"Your BMI is \" + String.valueOf(bmi).substring(0, 2)); // prints rounded BMI value\n \n // announces what the BMI value of the user means\n if (bmi > 50 || bmi < 10) {\n System.out.println(\"That doesn't sound right.\");\n System.out.println(\"Please ensure that the correct information has been inputted.\");\n }\n else if (bmi < 18) {\n System.out.println(\"That means you are underweight.\");\n }\n else if (bmi >= 18 && bmi <= 24) {\n System.out.println(\"That means you are healthy.\");\n }\n else if (bmi > 24 && bmi <= 29) {\n System.out.println(\"That means you are overweight.\");\n }\n else if (bmi > 29 && bmi <= 39) {\n System.out.println(\"That means you are obese.\");\n }\n else if (bmi > 39) {\n System.out.println(\"That means you are extremely obese.\");\n }\n else { // if BMI is above 50\n System.out.println(\"Are you okay?\");\n System.out.println(\"That doesn't sound right.\");\n System.out.println(\"Please ensure that the correct information has been inputted.\");\n }\n return bmi; //returns the user bmi value\n }",
"public float calculateBmi() {\n\t\t\tScanner scan = new Scanner(System.in);\n\t\t\tint weight, height, system;\n\t\t\tfloat BMI;\n\t\t\tBMI = 0;\n\t\t\theight=1;\n\t\t\tweight=1;\n\t\t\tsystem = scan.nextInt();\n\t\t\tif(system == 1) {\n\t\t\t\tSystem.out.println(\"Please enter your weight in pounds and your height in inches\");\n\t\t\t\n\t\t\tweight = scan.nextInt();\n\t\t\theight = scan.nextInt();\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif(weight <= 0 || height <=0) //exit if neg value\n\t\t\t\tSystem.exit(0);\n\t\t\t\n\t\t\tBMI = 703*weight/(height*height); //Calc BMI\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\telse if(system == 2) {\n\t\t\t\tSystem.out.println(\"Please enter your weight in kilograms and your height in meters\");\t\n\t\t\t\t\n\t\t\t\tweight = scan.nextInt();\n\t\t\t\theight = scan.nextInt();\n\t\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\tif(weight <= 0 || height <=0) //exit if neg value\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\n\t\t\t\tBMI = weight/(height*height); //Calc BMI\n\t\t\t\t}\n\t\t\t\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tcalculateBmi();\n\t\t\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println (\"Your BMI is\");\n\t\t\tSystem.out.println (BMI\t);\n\t\t\treturn BMI;\n\t\t}",
"public static void main(String[] args) {\r\n\t\tScanner scan = new Scanner(System.in);\r\n\r\n\t\tSystem.out.println(\"Enter your weight in pounds:\");\r\n\t\tdouble pounds = scan.nextDouble();\r\n\t\t\r\n\t\tSystem.out.println(\"Enter your height in feet followed by a space then additional inches:\");\r\n\t\tdouble feets = scan.nextDouble();\r\n\t\tdouble inches = scan.nextDouble();\r\n\t\t\r\n\t\tdouble BMI = 0;\r\n\t\tdouble poundsToKgs = pounds/2.2;\r\n\t\tdouble heightToMeters = (feets*12 + inches)*0.0254;\r\n\t\t\r\n\t\tBMI=poundsToKgs/(heightToMeters*heightToMeters);\r\n\t\t\r\n\t\tSystem.out.println(\"Your BMI is \" + BMI );\r\n\r\n\t\tif(BMI<18.5) {\r\n\t\t\tSystem.out.println(\"Your risk factory is Underweight\");\r\n\t\t}else if(BMI>=25 && BMI<25) {\r\n\t\t\tSystem.out.println(\"Your risk factory is Normal Weight\");\r\n\t\t}else if(BMI>=25 && BMI<30) {\r\n\t\t\tSystem.out.println(\"Your risk factory is Overweight\");\r\n\t\t}else {\r\n\t\t\tSystem.out.println(\"Your risk factory is Obese\");\r\n\t\t}\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\r\n\r\n\t\tScanner scan = new Scanner(System.in);\r\n\r\n\t\tSystem.out.print(\"You weight in pounds:\");\r\n\t\tint weight = scan.nextInt();\r\n\r\n\t\tSystem.out.print(\"Your height in feet and inches:\");\r\n\t\tdouble height = scan.nextFloat();\r\n\r\n\t\tdouble lbsInKg = weight / 2.2046; // lbs to kg\r\n\r\n\t\tdouble feetInInch = height * 12; // all the inches\r\n\r\n\t\tdouble heightInchToMeter = feetInInch * 0.0254; // all the meters\r\n\r\n\t\tdouble bmi = lbsInKg / (heightInchToMeter * heightInchToMeter);\r\n\r\n\t\tSystem.out.println(\"Your BMI is \" + bmi);\r\n\r\n\t\tif (bmi < 18.5) {\r\n\t\t\tSystem.out.println(\"Your risk factory Underweight\");\r\n\t\t} else if (bmi >= 18.5 && bmi < 25) {\r\n\t\t\tSystem.out.println(\"Normal Weight\");\r\n\t\t} else if (bmi >= 25 && bmi < 30) {\r\n\t\t\tSystem.out.println(\"Overweight\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Obese\");\r\n\t\t}\r\n\r\n\t}",
"public void getWeightAndHeight(String weightText, String heightText){\n //parse double from user input in JTextField\n height = Double.parseDouble(heightText);\n weight = Double.parseDouble(weightText);\n }",
"private void setWeight(float weight){\n this.weight = weight;\n }",
"@SuppressWarnings( \"unchecked\" )\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents(){\n java.awt.GridBagConstraints gridBagConstraints;\n\n bmiPanel = new javax.swing.JPanel();\n heightLabel = new javax.swing.JLabel();\n heightField = new javax.swing.JTextField();\n mLabel = new javax.swing.JLabel();\n weightLabel = new javax.swing.JLabel();\n weightField = new javax.swing.JTextField();\n kgLabel = new javax.swing.JLabel();\n bmiLabel = new javax.swing.JLabel();\n bmiField = new javax.swing.JTextField();\n\n setDefaultCloseOperation( javax.swing.WindowConstants.EXIT_ON_CLOSE );\n setTitle( \"BMI checker\" );\n setLocationByPlatform( true );\n setResizable( false );\n\n bmiPanel.setBorder( javax.swing.BorderFactory.createEmptyBorder( 5, 5, 5, 5 ) );\n bmiPanel.setLayout( new java.awt.GridBagLayout() );\n\n heightLabel.setText( \"Height:\" );\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;\n gridBagConstraints.insets = new java.awt.Insets( 4, 2, 4, 6 );\n bmiPanel.add( heightLabel, gridBagConstraints );\n\n heightField.setName( \"heightLabel\" ); // NOI18N\n heightField.setPreferredSize( new java.awt.Dimension( 100, 21 ) );\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.insets = new java.awt.Insets( 4, 4, 4, 4 );\n bmiPanel.add( heightField, gridBagConstraints );\n\n mLabel.setText( \"m\" );\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.insets = new java.awt.Insets( 4, 2, 4, 2 );\n bmiPanel.add( mLabel, gridBagConstraints );\n\n weightLabel.setText( \"Weight:\" );\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;\n gridBagConstraints.insets = new java.awt.Insets( 4, 2, 4, 6 );\n bmiPanel.add( weightLabel, gridBagConstraints );\n\n weightField.setName( \"weightLabel\" ); // NOI18N\n weightField.setPreferredSize( new java.awt.Dimension( 100, 21 ) );\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.insets = new java.awt.Insets( 4, 4, 4, 4 );\n bmiPanel.add( weightField, gridBagConstraints );\n\n kgLabel.setText( \"kg\" );\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.insets = new java.awt.Insets( 4, 2, 4, 2 );\n bmiPanel.add( kgLabel, gridBagConstraints );\n\n bmiLabel.setText( \"BMI:\" );\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;\n gridBagConstraints.insets = new java.awt.Insets( 4, 2, 4, 6 );\n bmiPanel.add( bmiLabel, gridBagConstraints );\n\n bmiField.setEditable( false );\n bmiField.setDisabledTextColor( new java.awt.Color( 0, 0, 0 ) );\n bmiField.setName( \"bmiLabel\" ); // NOI18N\n bmiField.setPreferredSize( new java.awt.Dimension( 100, 21 ) );\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.insets = new java.awt.Insets( 4, 4, 4, 4 );\n bmiPanel.add( bmiField, gridBagConstraints );\n\n getContentPane().add( bmiPanel, java.awt.BorderLayout.CENTER );\n\n pack();\n }",
"public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n \n // Prompt the user to enter weight in pounds\n System.out.print(\"Enter weight in pounds: \");\n double weightInPounds = input.nextDouble();\n \n // Prompt the user to enter height in inches\n System.out.print(\"Enter height in inches: \");\n double heightInInches = input.nextDouble();\n \n // Convert weight from pounds to kilograms\n double weightInKilograms = weightInPounds * 0.45359237;\n \n // Convert height from inches to meters\n double heightInMeters = heightInInches * 0.0254;\n \n // Compute the Body Mass Index\n double bodyMassIndex = weightInKilograms / Math.pow(heightInMeters, 2);\n\n // Display the result\n System.out.println(\"BMI is \" + bodyMassIndex);\n }",
"public /*static 절차지향*/ String getBmi(String name, String weight, String height) {\n\t\tdouble bmi = Double.parseDouble(weight) / (Double.parseDouble(height)*Double.parseDouble(height)/10000);\n\t\tSystem.out.printf(\"%s 의 BMI는 %f로 %s입니다.\\n\",name, bmi, (bmi > 30) ? \"고도비만\" : (bmi > 25) ? \"비만\" : (bmi > 23) ? \"과체중\" : (bmi > 18.5) ? \"정상\" : \"저체중\");\n\t\treturn String.valueOf(bmi);\n\t\t\n\t}",
"private void findBMI(View view) {\n enterWeight = (EditText) findViewById(R.id.enterWeight);\n enterHeight = (EditText) findViewById(R.id.enterHeight);\n enterInches = (EditText) findViewById(R.id.enterInches);\n TextView BMIResult = (TextView) findViewById(R.id.BMIResult);\n TextView bodyState = (TextView) findViewById(R.id.bodyState);\n Button calculate = (Button) findViewById(R.id.calculate);\n }",
"public double calculateBMI()\n {\n double bmi = (weight / (height * height)) * 703;\n bmi = Math.round(bmi * 100)/100.0;\n return bmi;\n }",
"public void heightWeightTest() {\r\n\t\tif(Step.Wait.forElementVisible(QuoteForm_ComponentObject.feetDropDownLocator, \"Feet drop-down\", 5)) {\r\n\t\t\tdropDownTest(QuoteForm_ComponentObject.feetDropDownLocator, QuoteForm_ComponentObject.feetDefaultLocator, \r\n\t\t\t\t\tQuoteForm_ComponentObject.feetValidSelectionLocator, QuoteForm_ComponentObject.feetInvalidSelectionLocator, \"FT.\", \"6\");\r\n\t\t}\r\n\t\tif(Step.Wait.forElementVisible(QuoteForm_ComponentObject.inchesDropDownLocator, \"Inches drop-down\", 5)) {\r\n\t\t\tdropDownTest(QuoteForm_ComponentObject.inchesDropDownLocator, QuoteForm_ComponentObject.inchesDefaultLocator,\r\n\t\t\t\t\tQuoteForm_ComponentObject.inchesValidSelectionLocator, QuoteForm_ComponentObject.inchesInvalidSelectionLocator, \"IN.\", \"1\");\r\n\t\t}\r\n\t\tif(Step.Wait.forElementVisible(QuoteForm_ComponentObject.weightInputLocator, \"Weight input field\", 5)) {\r\n\t\t\tString weightPlaceHolderLBS = Step.Extract.getContent(QuoteForm_ComponentObject.weightInputLocator, \"Weight placeholder\", \"placeholder\");\r\n\t\t\t\r\n\t\t\tif(weightPlaceHolderLBS.contentEquals(\"LBS.\")) {\r\n\t\t\t\tStep.Passed(\"Weight text box displays 'LBS.' as a placeholder\");\r\n\t\t\t} else {\r\n\t\t\t\tStep.Failed(\"Weight text box does not display 'LBS.' as a placeholder\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tStep.Action.typeText(QuoteForm_ComponentObject.weightInputLocator, \"Weight input field\", \"2345\");\r\n\t\t\tString weightSpecified = Step.Extract.getContentUsingJS(QuoteForm_ComponentObject.weightInputLocator,\r\n\t\t\t\t\t\"Weight input field content\");\r\n\t\t\tif(weightSpecified.length() > 3) {\r\n\t\t\t\tStep.Failed(\"Weight input field accepts more than 3 digits\");\r\n\t\t\t} else {\r\n\t\t\t\tStep.Passed(\"Weight input field does not accept more than 3 digits\");\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic void setWeight(double weight) {\n\t\t\r\n\t}",
"public void setWeight(double w){\n weight = w;\n }",
"public static double bmi(int weight, int height) {\n\t\t\n\t\tif(height == 0) {\n\t\t\tthrow new IllegalArgumentException(\"Die Werte fuer height muss ungleich 0 sein.\");\n\t\t\t\n\t\t} else {\n\t\t\tdouble bmiValue = (double)weight / (height * height);\n\t\t\treturn 1000*bmiValue;\n\t\t}\n\n\t}",
"public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n//\t\tprompts users for all info needed\n\t\tSystem.out.println(\"Enter your name:\");\n\t\tString name = input.nextLine();\n\t\t\n\t\tSystem.out.println(name + \", enter your height in inches:\");\n\t\tdouble height = input.nextDouble();\n\t\tdouble heightCon = height * 0.0254;\n\t\t\n\t\tSystem.out.println(name + \", enter your weight in pounds:\");\n\t\tdouble weight = input.nextDouble();\n\t\tdouble weightCon = weight * 0.45359237;\n//\t\tchecks to see if value is valid, and if so it will continue to compute the BMI value\n\t\tdouble bmi = 0;\n\t\tif(weight > 0 && height > 0) {\n\t\t\tbmi = weightCon / (Math.pow(heightCon, 2));\n\t}\n//\t\tcompares the BMI result with the standards and determines which weighting class you belong in \n\t\tString bmiResult;\n\t\tif(bmi < 18.5 && bmi > 0) {\n\t\t\t bmiResult = \"Underweight\";\n\t\t}\n\t\telse if(bmi >= 18.5 && bmi < 25.0){\n\t\t\t bmiResult = \"Normal\";\n\t\t}\n\t\telse if(bmi >= 25.0 && bmi < 30.0) {\n\t\t\t bmiResult = \"Overweight\";\n\t\t}\n\t\telse { \n\t\t\t bmiResult = \"Obese\";\n\t\t}\n//\t\tprints out the final information\n\t\tSystem.out.println(name + \", your BMI is \" + bmi);\n\t\tSystem.out.println(\"You are \" + bmiResult);\n\t\t\t\n\t\t\n\n\t\t\n\t\t\n\t\t\n\t\tinput.close();\n\t}",
"public IdealWeightCalculator() {\n initComponents();\n }",
"public HumanBuilder setWeight(double weight) {\n\t\t\t/*\n\t\t\t * if weight is a minus or 0 then will assign the value 0.1 to the weight of \n\t\t\t * the Human myHumaan\n\t\t\t */\n\t\t\tif(weight<=0)\n\t\t\t\tweight=0.1;\n\t\t\tmyHuman.weight=weight;\n\t\t\treturn this;\n\t\t}",
"private void setWeight() {\n \tthis.trainWeight = (this.trainCars*TRAIN_WEIGHT) + (this.crew + this.numPassengers) * AVE_PASSENGER_WEIGHT;\n }",
"public void set() {\r\n\t\tage = 19;\r\n\t\tname = \"ΎΛ·»\";\r\n\t\theight = 161;\r\n\t\tsetWeight(50);\r\n\t\tSystem.out.println(getWeight());\r\n\t}",
"@SuppressWarnings(\"deprecation\")\n\tprivate void initComponent() {\n\t\tString[] str = null;\n\t\tString state = null;\n\t\tStringBuffer advices = new StringBuffer();\n\t\tbmi = Double.parseDouble(Decimaltool.getDoublePrecision(user\n\t\t\t\t.getWeight() / Math.pow(user.getHeight() / 100, 2)));\n\t\tage = Datetool.getDateYear(Datetool.getCurrentTime()).getYear()\n\t\t\t\t- Datetool.getDateYear(user.getBirthday()).getYear();\n\t\tif (user.getGender().equals(\"男\")) {\n\t\t\tweight_rate = Double.parseDouble(Decimaltool.getSinglePrecision(1.2\n\t\t\t\t\t* bmi + 0.23 * age - 5.4 - 10.8 * 1));\n\t\t\tif (weight_rate <= 5) {\n\t\t\t\tstate = \"低脂型\";\n\t\t\t} else if (weight_rate <= 9 && weight_rate > 5) {\n\t\t\t\tstate = \"竞技型\";\n\t\t\t} else if (weight_rate > 9 && weight_rate <= 12) {\n\t\t\t\tstate = \"健美型\";\n\t\t\t} else if (weight_rate > 12 && weight_rate <= 15) {\n\t\t\t\tstate = \"运动型\";\n\t\t\t} else if (weight_rate > 15 && weight_rate <= 18) {\n\t\t\t\tstate = \"标准型\";\n\t\t\t} else if (weight_rate > 18 && weight_rate <= 25) {\n\t\t\t\tstate = \"偏胖型\";\n\t\t\t} else if (weight_rate > 25) {\n\t\t\t\tstate = \"肥胖型\";\n\t\t\t}\n\t\t\tadvices.append(\"理想指数在15~18%之间\");\n\t\t} else if (user.getGender().equals(\"女\")) {\n\t\t\tweight_rate = Double.parseDouble(Decimaltool.getSinglePrecision(1.2\n\t\t\t\t\t* bmi + 0.23 * age - 5.4 - 10.8 * 0));\n\t\t\tif (weight_rate < 11) {\n\t\t\t\tstate = \"低脂型\";\n\t\t\t} else if (weight_rate >= 11 && weight_rate < 17) {\n\t\t\t\tstate = \"竞技型\";\n\t\t\t} else if (weight_rate >= 17 && weight_rate < 19) {\n\t\t\t\tstate = \"健美型\";\n\t\t\t} else if (weight_rate >= 19 && weight_rate < 25) {\n\t\t\t\tstate = \"苗条型\";\n\t\t\t} else if (weight_rate >= 25 && weight_rate <= 28) {\n\t\t\t\tstate = \"标准型\";\n\t\t\t} else if (weight_rate > 28 && weight_rate <= 30) {\n\t\t\t\tstate = \"偏胖型\";\n\t\t\t} else if (weight_rate > 30) {\n\t\t\t\tstate = \"肥胖型\";\n\t\t\t}\n\t\t\tadvices.append(\"理想指数在25~28%之间\");\n\t\t}\n\t\tstr = user.getExercise_type().toString().split(\"[ ]\");\n\t\tr.setProgress((float) (weight_rate));\n\t\tr.setExplanation(\"体脂率\");\n\n\t\tindex.setText(state);\n\t\texercise_type.setText(str[0]);\n\t\tadvices.append(\"\\n\" + str[1]);\n\t\ttips.setText(advices);\n\t}",
"public void setSalary(double fromage)\r\n {\r\n mySalary = fromage;\r\n }",
"public Doctor(float weight, int age, double height, int years, String specialty){\r\n\t\t//This calls the human's constructor, so a human object for the doctor can be created.\r\n\t\tsuper(weight, age, height);\r\n\t\t//the field years is set\r\n\t\tthis.years = years;\r\n\t\t//The field specialty is set\r\n\t\tthis.specialty = specialty;\r\n\t}",
"private float calculateBMI (float weight, float height) {\n height = height/100;\n// System.out.println(height);\n double x = Math.pow(height,2);\n// System.out.println(x);\n double a = weight / x;\n// System.out.print(a);\n return (float) a;\n }",
"public void setWeight(double weight) {\r\n this.weight = weight;\r\n }",
"public void setWeight(double weight){\n\t\tthis.weight = weight;\n\t}",
"@Override\n\tpublic void setWeight(final double weight) {\n\n\t}",
"public void setWeight(double weight) {\n this.weight = weight;\n }",
"public void setWeight(final double pWeight){this.aWeight = pWeight;}",
"public void femaleHightMonths(){\n {\n DatabaseAccess databaseAccess = DatabaseAccess.getInstance(getApplicationContext());////gets database instances\n databaseAccess.open();// opens the database connection\n etAge_h = findViewById(R.id.et_Hage);;// gets the id of the editText_wAge(from the xml layout using this method\n BH = Double.parseDouble(etB_h.getText().toString());//BW is birth_weight changes the string value of user input to double\n CH = Double.parseDouble(etC_h.getText().toString());//CW is current_weight changes the string value of user input to double\n\n Age_month = etAge_h.getText().toString();//get text from user input in age text editer\n Age_m = Integer.valueOf(Age_month);//convert the string value of age_week in to integer\n if(Age_m<=13)//if age given in the input is less than or equal to 13 weeks\n {\n\n String p1st = databaseAccess.getGhm1p(Age_month);//we used the getGhm1p method to get 1%\n String p3rd = databaseAccess.getGhm3p(Age_month);//we used the getGhm3p method to get 3%\n String p15th = databaseAccess.getGhm15p(Age_month);//we used the getGhm15p method to get 15%\n String p50th = databaseAccess.getGhm50p(Age_month);//we used the getGhm50p method to get 50%\n String p85th = databaseAccess.getGhm85p(Age_month);//we used the getGhm85p method to get 85%\n String p97th = databaseAccess.getGhm97p(Age_month);//we used the getGhm97p method to get 97%\n p1 = Double.parseDouble(p1st);//changes the string value of 1st % weight in kg to double type\n p3 = Double.parseDouble(p3rd);//changes the string value of 3% weight in kg to double type\n p15 = Double.parseDouble(p15th);//changes the string value of 15% weight in kg to double type\n p50 = Double.parseDouble(p50th);//changes the string value of 50% weight in kg to double type\n p85 = Double.parseDouble(p85th);//changes the string value of 85% weight in kg to double type\n p97 = Double.parseDouble(p97th);//changes the string value of 97% weight in kg to double type\n switch (Age_month) {\n case \"0\": {//case 0 is when age is given 0\n if (BH <= p1)//if BH Hight input is less than 1%\n {\n setContentView(R.layout.activity_result);//sets the content view to another layout the results will be displayed on activity_result layout.\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2\n tv.setText(\" growth rate is : 0 %\" );//sets text to the textviw tv\n GraphView g = findViewById(R.id.graph);//gets the id for graph\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {//creates line graph with datapoint series\n new DataPoint(Age_m, BH)});//gets the datapoint x,y values from user input age and birth hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//sets title for the result\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setDataPointsRadius(10);//sets dataPoint radius to 10\n series4.setThickness(8);//sets dataPoint thickness to 8\n graphGirlsH();//WHO girls Hight to age growth chart\n }\n else if (BH >p1 &&BH <= p3)//if BH birth hight input is greater than 1% and less than or equal to 3 %\n {\n AG = (BH - p1);// AG Average gain is equal to BH mines the value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per month equal to the value of 3% minus the value fo 1%\n GPW = (AG) / AGPW;// GPW gain per month rate is equal to the ratio of calculated Average gain per standard Average gain per month\n PercentH = (GPW * 0.02)+0.01; // Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {//creates line graph with datapoint series\n new DataPoint(Age_m, BH)});//gets the datapoint x,y values from user input age and birth hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(String.valueOf(rate.format(PercentH)));//sets title for the result\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls weight to age growth chart\n }\n\n else if (BH > p3 && BH <= p15)//if BH(birth hight) input is greater than 3% and less than or equal to 15 %\n {\n AG = (BH - p3);// AG Average gain is equal to BH minus the value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per month equal to the WHO Standard value of 15% minus 3%\n GPW = (AG)/AGPW; // AGPW;GPW gain per month rate is equal to the ratio of calculated Average gain per standard Average gain per month\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(Age_m, BH)});//gets the datapoint x,y values from user input age and birth hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls Hight to age growth chart\n }\n else if (BH > p15 && BH <= p50)//if BH(birth hight) input is greater than 15% and less than or equal to 50 %\n {\n AG = (BH - p15);// AG Average gain is equal to BH minus WHO standard value of value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per month equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain per standard Average gain per month\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(Age_m, BH)});//gets the datapoint x,y values from user input age and birth hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls Hight to age growth chart\n\n }\n else if (BH > p50 && BH <=p85)//if BH(birth hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (BH - p50);// AG Average gain is equal to BH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per month equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(Age_m, BH)});//gets the datapoint x,y values from user input age and birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (BH > p85 && BH <=p97)//if BH(birth hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (BH - p85);// AG Average gain is equal to BH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per month equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, BH)});//gets the datapoint x,y values from user input age and birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, BH)});//gets the datapoint x,y values from user input age and birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"100%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls hight to age growth chart\n }\n }\n break;\n case \"1\": //case 1 is when the given age is 1 month\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value is given user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per month equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value is user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per month equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value is set to user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per month equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value is set to user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per week equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value is set to user input age,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per month equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(Age_m, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n }\n\n break;\n case \"2\": //case 2 is when the given age is 2 months\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per month equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per month equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per month equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per month equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per week equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO boys hight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(Age_m, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n }\n break;\n case \"3\": //case 3 is when the given age is 3 months\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per month equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per week equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user imput age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per month equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per month equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per month equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(Age_m, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n }\n\n break;\n case \"4\": //case 4 is when the given age is 4 MONTHS\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per month equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per month equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per month equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per month equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per week equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(Age_m, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n }\n break;\n case \"5\": //case 5 is when the given age is 5 months\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO gight hight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per week equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per month equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per month equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per month equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per month equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(Age_m, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value form user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n }\n break;\n case \"6\": //case 6 is when the given age is 6 months\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per month equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per month equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per month equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per month equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per month equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(Age_m, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n }\n break;\n case \"7\": //case 7 is when the given age is 7 months\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per month equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per month equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per month equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n { new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hightto age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per month equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per month equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(Age_m, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n }\n break;\n case \"8\": //case 8 is when the given age is 8 months\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per month equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per month equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per month equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO gight hight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per month equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per month equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(Age_m, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n }\n break;\n case \"9\": //case 9 is when the given age is 9 months\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per month equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per month equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value is from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per month equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per month equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per month equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value is from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(Age_m, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value is from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n }\n break;\n case \"10\": //case 10 is when the given age is 10 months\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per month equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per month equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value is from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per month equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value is from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per month equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value is from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per month equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(Age_m, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value is from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n }\n break;\n case \"11\": //case 11 is when the given age is 11 months\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value is from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per month equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per month equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per month equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value is from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per month equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per month equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(Age_m, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value fromu user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n }\n break;\n case \"12\": //case 12 is when the given age is 12 month\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per month equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per month equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per month equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per month equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value fromuser input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per month equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(Age_m, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value is from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n }\n break;\n\n }\n }\n\n else{\n\n Toast.makeText(getApplicationContext(),\"The app is valid for Age up to 12 months \",Toast.LENGTH_LONG).show();//pop up message\n }\n databaseAccess.close();//database connection closed\n }\n }",
"@Override\n public void setWeight(double w) {\n this.weight = w;\n\n }",
"private Human(int age,String name,double weight) {\n\t\tthis.age=age;\n\t\tthis.name=name;\n\t\tthis.weight=weight;\n\t\thumanCounter++;\n\t}",
"public double BMI () {\n\t\treturn ( weight / ( height * height ) ) * 703;\n\t}",
"public double getBMI() {\n\t\tdouble heightInFeetDbl = insuredPersonInfoDTO.getFeets() + (insuredPersonInfoDTO.getInches() * 0.08333);\n//\t\tlong heightInFeet = Math.round(heightInFeetDbl);\n\t\t\n\t\t// 1lb = 0.45kg\n\t\tdouble weightInKg = insuredPersonInfoDTO.getWeight() * 0.45;\n\t\t\n\t\t// 1ft = 0.3048 meter\n\t\tdouble heightInMeter = heightInFeetDbl * 0.3048;\n\t\t\n//\t\tlong bmiWeight = Math.round(weightInKg / (heightInMeter * heightInMeter));\n\t\tdouble bmiWeight = weightInKg / (heightInMeter * heightInMeter);\n\t\t\n\t\tif (insuredPersonInfoDTO.getFeets() == 0 || insuredPersonInfoDTO.getWeight() == 0\n\t\t\t\t|| bmiWeight == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tDecimalFormat df = new DecimalFormat(\"#.##\"); \n\t\tString bmiWeightStr = df.format(bmiWeight);\n\n\t\t// storing height in inches at below formula\n\t\tinsuredPersonInfoDTO.setHeight(insuredPersonInfoDTO.getFeets() * 12 + insuredPersonInfoDTO.getInches());\n\t\t\n\t\treturn Double.parseDouble(bmiWeightStr);\n\t}",
"public void setWeight(int x)\n {\n weightCarried=x;\n }",
"public com.luisjrz96.streaming.birthsgenerator.models.BirthInfo.Builder setWeight(float value) {\n validate(fields()[7], value);\n this.weight = value;\n fieldSetFlags()[7] = true;\n return this;\n }",
"public synchronized void setWeight(int weight){\n\t\tthis.personWeight = weight; \n\t}",
"public void setWage(double wage) {\r\n this.wage = wage;\r\n }",
"public void setWage(double wage) {\r\n this.wage = wage;\r\n }",
"private void Rating(int minAge)\r\n {\r\n this.minAge = minAge;\r\n }",
"public void setWeight(int weight){\n\t\tthis.weight = weight;\n\t}",
"public void setWeight(int w){\n\t\tweight = w;\n\t}",
"public void setWeight(Double weight) {\n this.weight = weight;\n }",
"public void setWeight(double weight){\n\t\tthis._weight = weight;\n\t}",
"public SpaceWeights(int weight)\n {\n earthWeight = weight;\n }",
"public void setWeight(String newValue);",
"public void setWeight(float w) {\n weight = w;\n }",
"public void setWeight(double weight) {\n\t\tthis.weight = weight;\n\t}",
"public double getWeight(){return this.aWeight;}",
"public void setAge(int age) { this.age = age; }",
"public static void main(String args[]) {\n\t\tint height;\n\t\t// open the variables to store the user's weight\n\t\tint weight;\n\t\tScanner myScanner;\n\t\tmyScanner = new Scanner(System.in);\n\t\t// ask to input the height\n\t\tSystem.out.print(\"Input your height (in centimeters): \");\n\t\t// read the input of height\n\t\theight = myScanner.nextInt();\n\t\t// ask to input the weight\n\t\tSystem.out.print(\"Input your weight (in kilograms): \");\n\t\t// read the input of weight\n\t\tweight = myScanner.nextInt();\n\t\t// to have the blank line for clear format\n\t\tSystem.out.println(\"\");\n\t\t// calculates and prints the BMI\n\t\tSystem.out.println(\"Your BMI is: \"\n\t\t\t\t+ (weight / (Math.pow((double) height / 100, 2))));\n\t\tMain test = new Main();\n\t\tSystem.out.println(test.x);\n\t}",
"private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.getContentPane().setBackground(new Color(255, 255, 255));\r\n\t\tframe.setBounds(100, 100, 450, 511);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\r\n\t\tpanel.setBackground(Color.DARK_GRAY);\r\n\t\tpanel.setBounds(10, 95, 414, 187);\r\n\t\tframe.getContentPane().add(panel);\r\n\t\tpanel.setLayout(null);\r\n\t\t\r\n\t\tJLabel lblNewLabel = new JLabel(\"Height(m)\");\r\n\t\tlblNewLabel.setFont(new Font(\"Stencil\", Font.PLAIN, 13));\r\n\t\tlblNewLabel.setForeground(new Color(255, 255, 255));\r\n\t\tlblNewLabel.setBackground(new Color(255, 255, 255));\r\n\t\tlblNewLabel.setBounds(97, 29, 86, 21);\r\n\t\tpanel.add(lblNewLabel);\r\n\t\t\r\n\t\tH = new JTextField();\r\n\t\tH.setBounds(244, 29, 86, 20);\r\n\t\tpanel.add(H);\r\n\t\tH.setColumns(10);\r\n\t\t\r\n\t\tJLabel lblNewLabel_1 = new JLabel(\"Weight(KG)\");\r\n\t\tlblNewLabel_1.setFont(new Font(\"Stencil\", Font.PLAIN, 14));\r\n\t\tlblNewLabel_1.setForeground(new Color(255, 255, 255));\r\n\t\tlblNewLabel_1.setBackground(new Color(255, 255, 255));\r\n\t\tlblNewLabel_1.setBounds(97, 72, 86, 14);\r\n\t\tpanel.add(lblNewLabel_1);\r\n\t\t\r\n\t\tW = new JTextField();\r\n\t\tW.setBounds(244, 69, 86, 20);\r\n\t\tpanel.add(W);\r\n\t\tW.setColumns(10);\r\n\t\t\r\n\t\tJLabel lblNewLabel_2 = new JLabel(\"BMI :\");\r\n\t\tlblNewLabel_2.setForeground(new Color(255, 255, 255));\r\n\t\tlblNewLabel_2.setFont(new Font(\"Stencil\", Font.PLAIN, 16));\r\n\t\tlblNewLabel_2.setBounds(64, 115, 46, 14);\r\n\t\tpanel.add(lblNewLabel_2);\r\n\t\t\r\n\t\tbmi = new JTextField();\r\n\t\tbmi.setBounds(126, 112, 86, 20);\r\n\t\tpanel.add(bmi);\r\n\t\tbmi.setColumns(10);\r\n\t\t\r\n\t\tJLabel re = new JLabel(\"\");\r\n\t\tre.setForeground(new Color(255, 255, 255));\r\n\t\tre.setBounds(262, 115, 89, 14);\r\n\t\tpanel.add(re);\r\n\t\t\r\n\t\tJButton cal = new JButton(\"Calculate\");\r\n\t\tcal.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tfloat r1=Float.parseFloat(H.getText());\r\n\t\t\t\tfloat r2=Float.parseFloat(W.getText());\r\n\t\t\t\tfloat res=(float)(r2/(r1*r1));\r\n\t\t\t\tbmi.setText(String.valueOf(res));\r\n\t\t\t\tif(res<=18.5)\r\n\t\t\t\t{\r\n\t\t\t\t\tre.setForeground(Color.YELLOW);\r\n\t\t\t\t\tre.setText(\"Under Weight\");\r\n\t\t\t\t}\r\n\t\t\t\telse if(res>18.5&&res<24.9)\r\n\t\t\t\t{\r\n\t\t\t\t\tre.setForeground(Color.GREEN);\r\n\t\t\t\t\tre.setText(\"Normal Weight\");\r\n\t\t\t\t}\r\n\t\t\t\telse if(res>25&&res<29.9)\r\n\t\t\t\t{\r\n\t\t\t\t\tre.setForeground(Color.ORANGE);\r\n\t\t\t\t\tre.setText(\"OverWeight\");\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tre.setForeground(Color.RED);\r\n\t\t\t\tre.setText(\"Obese\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tcal.setBounds(50, 153, 89, 23);\r\n\t\tpanel.add(cal);\r\n\t\t\r\n\t\tJButton clr = new JButton(\"Clear\");\r\n\t\tclr.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tH.setText(\"\");\r\n\t\t\t\tW.setText(\"\");\r\n\t\t\t\tbmi.setText(\"\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tclr.setBounds(171, 153, 89, 23);\r\n\t\tpanel.add(clr);\r\n\t\t\r\n\t\tJButton ex = new JButton(\"Exit\");\r\n\t\tex.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tSystem.exit(0);\r\n\t\t\t}\r\n\t\t});\r\n\t\tex.setBounds(284, 153, 89, 23);\r\n\t\tpanel.add(ex);\r\n\t\t\r\n\t\tJPanel panel2 = new JPanel();\r\n\t\tpanel2.setBackground(Color.LIGHT_GRAY);\r\n\t\tpanel2.setBounds(10, 293, 414, 169);\r\n\t\tframe.getContentPane().add(panel2);\r\n\t\tpanel2.setLayout(null);\r\n\t\t\r\n\t\ttable = new JTable();\r\n\t\ttable.setBackground(new Color(255, 255, 255));\r\n\t\ttable.setFillsViewportHeight(true);\r\n\t\ttable.setSurrendersFocusOnKeystroke(true);\r\n\t\ttable.setModel(new DefaultTableModel(\r\n\t\t\tnew Object[][] {\r\n\t\t\t\t{\"UnderWeight\", \"UnderWeight\", \"Normal Weight\", \"Obese\"},\r\n\t\t\t\t{\"< 18.5\", \"18.5 to 24.9\", \"25 to 29.9\", \"> 30\"},\r\n\t\t\t},\r\n\t\t\tnew String[] {\r\n\t\t\t\t\"UnderWeight\", \"Normal Weight\", \"Over Weight\", \"Obese\"\r\n\t\t\t}\r\n\t\t) {\r\n\t\t\tboolean[] columnEditables = new boolean[] {\r\n\t\t\t\ttrue, true, true, false\r\n\t\t\t};\r\n\t\t\tpublic boolean isCellEditable(int row, int column) {\r\n\t\t\t\treturn columnEditables[column];\r\n\t\t\t}\r\n\t\t});\r\n\t\ttable.getColumnModel().getColumn(0).setResizable(false);\r\n\t\ttable.getColumnModel().getColumn(0).setPreferredWidth(77);\r\n\t\ttable.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));\r\n\t\ttable.setColumnSelectionAllowed(true);\r\n\t\ttable.setCellSelectionEnabled(true);\r\n\t\ttable.setBounds(25, 112, 349, 46);\r\n\t\tpanel2.add(table);\r\n\t\t\r\n\t\tJPanel panel_2 = new JPanel();\r\n\t\tpanel_2.setBackground(Color.LIGHT_GRAY);\r\n\t\tpanel_2.setBounds(10, 11, 414, 73);\r\n\t\tframe.getContentPane().add(panel_2);\r\n\t\tpanel_2.setLayout(null);\r\n\t\t\r\n\t\tJLabel lblNewLabel_4 = new JLabel(\"BODY MASS INDEX\");\r\n\t\tlblNewLabel_4.setForeground(new Color(255, 255, 255));\r\n\t\tlblNewLabel_4.setFont(new Font(\"Bernard MT Condensed\", Font.BOLD | Font.ITALIC, 15));\r\n\t\tlblNewLabel_4.setBounds(132, 11, 136, 32);\r\n\t\tpanel_2.add(lblNewLabel_4);\r\n\t}",
"public void setWeight(Integer weight) {\n this.weight = weight;\n }",
"public ByWeight(String name, double cost, double units)\n\t{\n\t\tsuper(name);\n\t\tprice = cost;\n\t\tweight = units;\n\t}",
"public static double calculateBMR(double currentWeightPassed, int heightPassed, int agePassed, String sexPassed) {\n double weightMetric = currentWeightPassed / 2.2;\n double heightMetric = heightPassed * 2.54;\n if(currentWeightPassed > 0 && heightPassed > 0 && agePassed > 0) {\n if (sexPassed.equals(\"Male\")) {\n return 5 + (10 * weightMetric) + (6.25 * heightMetric) - (5 * agePassed);\n } else {\n return -161 + (10 * weightMetric) + (6.25 * heightMetric) - (5 * agePassed);\n }\n }\n else {\n return 0; //if 0/null notify in fragment?\n }\n }",
"public void setAge(int age) { \n\t\t this.age = age; \n\t}",
"public static void main(String[] args) {\r\n Scanner in = new Scanner(System.in);\r\n System.out.println(\"Please, enter the height\");\r\n float height = in.nextFloat();\r\n System.out.println(\"Please, enter the weight\");\r\n float weight = in.nextFloat();\r\n float idealWeight = height - 110;\r\n\r\n if (idealWeight < weight){\r\n System.out.println(\"You need to loose \" + (weight - idealWeight) + \"kg\");\r\n } else if (idealWeight > weight){\r\n System.out.println(\"You need to gain \" + (idealWeight - weight) + \"kg\");\r\n } else {\r\n System.out.println(\"Your weight is perfect\");\r\n }\r\n }",
"public WeightingModel(){}",
"public void setWeight(String weight) {\n this.weight = weight;\n }",
"public static double calculateBMI(int weight, int height) {\n double heightSquared = height * height;\n double unconverted = weight / heightSquared;\n double converted = unconverted * 703;\n return converted;\n }",
"public abstract double getWeight ();",
"public void setAge(double age) {\r\n\t\tif (age <= 2) setAge(age * 10.5);\r\n\t\telse setAge(21 + (4 * (age - 2)));\r\n\t}",
"public void setGradingWeight(double weight){\n \tgradingWeight = weight;\n }",
"private void createDog() {\n String weight = this.weight.getText();\n try {\n int intWeight = Integer.parseInt(weight);\n backToGui();\n } catch (NumberFormatException ex) {\n createFrame(\"Weight Input Not Valid\");\n } catch (WeightException w) {\n createFrame(\"Weight must be between 0 and 200\");\n }\n revalidate();\n repaint();\n }",
"public void setHOB(float hob);",
"public static void main(String[] args) throws IOException {\n Mian object = new Mian();\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String l = br.readLine();\n object.SetUpValues(l);\n String x = br.readLine();\n object.SetBalls(x);\n System.out.println(object.MaxWeight());\n }",
"public void setWeight(int w) {\n\t\tweight = w;\n\t}",
"public void setWeight(float value) {\n this.weight = value;\n }",
"public Salmon(String manufacturer, String productName, double price, int minimumAge,\n double weight) {\n super(PRODUCT_TYPE, manufacturer, productName, price, minimumAge, weight);\n }",
"public void femaleHightWeeks(){\n DatabaseAccess databaseAccess = DatabaseAccess.getInstance(getApplicationContext());////gets database instances\n databaseAccess.open();// opens the database connection\n etAge_h = findViewById(R.id.et_Hage);// gets the id of the editText_wAge(from the xml layout using this method\n BH = Double.parseDouble(etB_h.getText().toString());//BW is birth_weight changes the string value of user input to double\n CH = Double.parseDouble(etC_h.getText().toString());//CW is current_weight changes the string value of user input to double\n\n Age_week = etAge_h.getText().toString();//get text from user input in age text editer\n Age_w = Integer.valueOf(Age_week);//convert the string value of age_week in to integer\n\n if(Age_w<=13)//if age given in the input is less than or equal to 13 weeks\n {\n\n String p1st = databaseAccess.getGhw1p(Age_week);//we used the getGhw1p method to get 1%\n String p3rd = databaseAccess.getGhw3p(Age_week);//we used thegetgetGhw3p method to get 3%\n String p15th = databaseAccess.getGhw15p(Age_week);//we used the getGhw15P method to get 15%\n String p50th = databaseAccess.getGhw50p(Age_week);//we used the getGhw50p method to get 50%\n String p85th = databaseAccess.getGhw85p(Age_week);//we used the getGhw85p method to get 85%\n String p97th = databaseAccess.getGhw97p(Age_week);//we used the getGhw97p method to get 97%\n p1 = Double.parseDouble(p1st);//changes the string value of 1st % weight in kg to double type\n p3 = Double.parseDouble(p3rd);//changes the string value of 3% weight in kg to double type\n p15 = Double.parseDouble(p15th);//changes the string value of 15% weight in kg to double type\n p50 = Double.parseDouble(p50th);//changes the string value of 50% weight in kg to double type\n p85 = Double.parseDouble(p85th);//changes the string value of 85% weight in kg to double type\n p97 = Double.parseDouble(p97th);//changes the string value of 97% weight in kg to double type\n switch (Age_week) {\n case \"0\": {//case 0 is when age is given 0 week\n if (BH <= p1)//if BH Hight input is less than 1%\n {\n setContentView(R.layout.activity_result);//sets the content view to another layout the results will be displayed on activity_result layout.\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2\n tv.setText(\" growth rate is : 0 %\" );//sets text to the textviw tv\n GraphView g = findViewById(R.id.graph);//gets the id for graph\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {//creates line graph with datapoint series\n new DataPoint(Age_w, BH)});//gets the datapoint x,y values from user input age and birth hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(String.valueOf(rate.format(PercentH)));//sets title for the result\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setDataPointsRadius(10);//sets dataPoint radius to 10\n series4.setThickness(8);//sets dataPoint thickness to 8\n graphGirlsH();//WHO girls Hight to age growth chart\n }\n else if (BH >p1 &&BH <= p3)//if BH birth hight input is greater than 1% and less than or equal to 3 %\n {\n AG = (BH - p1);// AG Average gain is equal to BH mines the value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per week equal to the value of 3% minus the value fo 1%\n GPW = (AG) / AGPW;// GPW gain per week rate is equal to the ratio of calculated Average gain per standard Average gain per week\n PercentH = (GPW * 0.02)+0.01; // Percentile Hight result\n setContentView(R.layout.activity_result); //sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {//creates line graph with datapoint series\n new DataPoint(Age_w, BH)});//gets the datapoint x,y values from user input age and birth hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(String.valueOf(rate.format(PercentH)));//sets title for the result\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls hight to age growth chart\n }\n\n else if (BH > p3 && BH <= p15)//if BH(birth hight) input is greater than 3% and less than or equal to 15 %\n {\n AG = (BH - p3);// AG Average gain is equal to BH minus the value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per week equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW; // AGPW;GPW gain per week rate is equal to the ratio of calculated Average gain per standard Average gain per week\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(Age_w, BH)});//gets the datapoint x,y values from user input age and birth hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls Hight to age growth chart\n }\n else if (BH > p15 && BH <= p50)//if BH(birth hight) input is greater than 15% and less than or equal to 50 %\n {\n AG = (BH - p15);// AG Average gain is equal to BH minus WHO standard value of value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per week equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain per standard Average gain per week\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(Age_w, BH)});//gets the datapoint x,y values from user input age and birth hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls Hight to age growth chart\n\n }\n else if (BH > p50 && BH <=p85)//if BH(birth hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (BH - p50);// AG Average gain is equal to BH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per week equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(Age_w, BH)});//gets the datapoint x,y values from user input age and birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls Hight to age growth chart\n }\n else if (BH > p85 && BH <=p97)//if BH(birth hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (BH - p85);// AG Average gain is equal to BH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per week equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_w, BH)});//gets the datapoint x,y values from user input age and birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls Hight to age growth chart\n }\n else {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_w, BH)});//gets the datapoint x,y values from user input age and birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls Hight to age growth chart\n }\n }\n break;\n case \"1\": //case 1 is when the given age is 1 week\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls Hight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per week equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per week equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per week equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per week equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per week equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(0, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n }\n\n break;\n case \"2\": //case 2 is when the given age is 2 weekS\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per week equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per week equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per week equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per week equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per week equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(0, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n }\n break;\n case \"3\": //case 3 is when the given age is 3 weekS\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per week equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per week equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per week equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per week equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per week equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(0, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n }\n\n break;\n case \"4\": //case 4 is when the given age is 4 weekS\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per week equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per week equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per week equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per week equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per week equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(0, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n }\n break;\n case \"5\": //case 1 is when the given age is 1 week\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per week equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per week equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per week equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per week equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per week equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(1, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n }\n break;\n case \"6\": //case 6 is when the given age is 6 weeks\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per week equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per week equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per week equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per week equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per week equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(1, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n }\n break;\n case \"7\": //case 7 is when the given age is 7 weekS\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per week equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per week equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per week equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n { new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per week equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per week equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(1, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n }\n break;\n case \"8\": //case 8 is when the given age is 8 weekS\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per week equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per week equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per week equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per week equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per week equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(1, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n }\n break;\n case \"9\": //case 9 is when the given age is 9 weekS\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per week equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per week equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per week equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per week equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per week equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(2, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n }\n break;\n case \"10\": //case 10 is when the given age is 10 weekS\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per week equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per week equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per week equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per week equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per week equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(2, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n }\n break;\n case \"11\": //case 11 is when the given age is 11 weekS\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per week equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per week equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per week equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per week equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per week equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(2, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n }\n break;\n case \"12\": //case 12 is when the given age is 12 weekS\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per week equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per week equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per week equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per week equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per week equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\");//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(2, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n }\n break;\n case \"13\": //case 13 is when the given age is 13 weekS\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(3, CH)});//gets the datapoint x value is set to 3 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per week equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(3, CH)});//gets the datapoint x value is set to 3 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per week equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(3, CH)});//gets the datapoint x value is set to 3 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per week equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(3, CH)});//gets the datapoint x value is set to 3 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per week equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(3, CH)});//gets the datapoint x value is set to 3 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per week equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(3, CH)});//gets the datapoint x value is set to 3 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(3, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value is set to 3 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n }\n break;\n }\n }\n\n else{\n\n Toast.makeText(getApplicationContext(),\"Fill Age In Months \",Toast.LENGTH_LONG).show();//pop up message\n }\n databaseAccess.close();//database connection closed\n }",
"private static String bmiClassification (Double bmi) {\n String bmiToString = \"\";\n\n if (bmi < 18.5)\n bmiToString = \"Underweight\";\n else if (bmi < 25.0)\n bmiToString = \"Normal\";\n else if (bmi < 30.0)\n bmiToString = \"Overweight\";\n else if (bmi >= 30.0)\n bmiToString = \"Obese\";\n\n return bmiToString;\n }",
"public double getWage(){\r\n return wage; \r\n }",
"@Override\n public double calculateBMI(Patient patient) {\n double height = patient.getHeight()*0.01;\n double bmi = patient.getWeight() /(height*height);\n return bmi;\n }",
"void setAge(int age);",
"public String calculateBMI(String calcLabel){\n //formula for calculating BMI\n BMI = (weight * 703) / (height * height);\n //cast double to int to remove decimal place\n int nHeight = (int) height;\n int nWeight = (int) weight;\n //return calculation to user in appropriate JLabel\n return calcLabel = (\"The Body Mass Index for a height of \" + nHeight +\n \" and a weight of \" + nWeight + \" is: \" + BMI);\n }",
"public static double avgCalculator (String gender, int age, double bmi) {\n double avg = 0;\n\n // AGES: 5 , 6 , 7, 8 , 9 , 10 , 11, 12, 13, 14, 15, 16, 17, 18, 19\n double [] boyBMIavg = {15.3, 15.3, 15.5, 15.8, 16.1, 16.5, 17.0, 17.6, 18.3, 19.1, 19.8, 20.6, 21.2, 21.8, 22.2};\n double [] girlBMIavg = {15.2, 15.3, 15.4, 15.7, 16.1, 16.7, 17.3, 18.1, 18.9, 19.6, 20.3, 20.6, 21.1, 21.3, 21.4};\n \n // C H I L D R E N \n if (age < 19) { \n if (gender.equals(\"male\")) { \n avg = boyBMIavg [age -5]; // the bmi of an average boy based on age is retrieved from the array\n }\n else if (gender.equals(\"female\")) { \n avg = girlBMIavg [age -5]; // the bmi of an average girl based on age is retrieved from the array\n }\n else {\n System.out.println(\"error in gender value\"); // in case the gender value is not 'male' or 'female', sorry nonbinaries\n }\n }\n\n // A D U L T S \n else { \n if (gender.equals(\"male\")) {\n avg = 26.5; // the bmi of an average adult male is 26.5 \n }\n else if (gender.equals(\"female\")) {\n avg = 26.6; // the bmi of an average adult female is 26.6\n }\n else {\n System.out.println(\"error in gender value\"); // in case the gender value is not 'male' or 'female', sorry nonbinaries\n }\n }\n\n System.out.println(\"The average BMI for \" + gender + \"s at the age of \" + age + \" is about \" + avg ); // announces average\n \n //compares user to average\n double diff = 0; // the difference of user vs average is preset to zero\n\n // HIGHER BMI THAN AVERAGE\n if (bmi > avg) {\n diff = bmi - avg; // difference is calculated\n if (diff <= 0.5) { // if they are within .5 of the average, it is considered close enough\n System.out.println(\"Your BMI, \" + String.valueOf(bmi).substring(0, 2) + \", is only a little higher than the average, \" + avg );\n System.out.println(\"You're doing pretty well :)\");\n }\n else { // if the gap is large, it is announced\n System.out.println(\"Your BMI, \" + String.valueOf(bmi).substring(0, 2) + \", is much larger than the average, \" + avg + \", with a difference of \" + String.valueOf(diff).substring(0, 3));\n System.out.println(\"In comparison to the average, you're a little overweight.\");\n }\n }\n\n // LOWER BMI THAN AVERAGE\n else if (bmi < avg) {\n diff = avg - bmi; // difference is calculated\n if (diff <= 0.5) { // if they are within .5 of the average, it is considered close enough\n System.out.println(\"Your BMI, \" + String.valueOf(bmi).substring(0, 2) + \", is only a little lower than the average, \" + avg );\n System.out.println(\"You're doing pretty well :)\");\n }\n else { // if the gap is large, it is announced\n System.out.println(\"Your BMI, \" + String.valueOf(bmi).substring(0, 2) + \", is much smaller than the average, \" + avg + \", with a difference of \" + String.valueOf(diff).substring(0, 3));\n System.out.println(\"In comparison to the average, you're a little underweight.\");\n } \n }\n\n // SAME BMI AS AVERAGE\n else { // if the difference is zero\n System.out.println(\"Your BMI, \" + String.valueOf(bmi).substring(0, 2) + \", is the exact same as the average, \" + avg );\n System.out.println(\"You're doing great :)\");\n }\n return avg;\n }",
"public void setKiloWatts(int kiloWatts){\n\tthis.kiloWatts=kiloWatts;\n}",
"public void setWeight (java.lang.Double weight) {\r\n\t\tthis.weight = weight;\r\n\t}",
"public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\t\tdouble weight;\n\t\tdouble inches;\n\t\tSystem.out.println(\"Please enter your weight(pounds): \");\n\t\tweight = input.nextDouble();\n\t\tSystem.out.println(\"Please enter your height(inches): \");\n\t\tinches = input.nextDouble();\n\t\tdouble result = (weight*0.45359237)/(inches * 0.0254 * inches * 0.0254);\n\t\tSystem.out.println(\"Body Mass Index is: \" + result);\n\t}",
"@Override\n\tpublic Bmi getBmi(int weight, float height) {\n\t\t RestTemplate restTemplate = new RestTemplate();\n\t\t \n\t\t Bmi bmi = restTemplate.getForObject(BASE_URL + BMI_URL, Bmi.class, weight, height);\n\t\t logger.debug(\"BMI Info :\" + bmi);\n\t\treturn bmi;\n\t}",
"public static double getBasalMetabolicRate(User user) {\n double BMR;\n\n double age = (double) user.getAge();\n double height = user.getHeight();\n double weight = user.getWeight();\n\n if (user.isMale()) {\n BMR = (13.397 * weight) + (4.799 * height) + (5.677 * age) + 88.362;\n } else {\n BMR = (9.247 * weight) + (3.098 * height) + (4.33 * age) + 447.593;\n }\n return BMR;\n }",
"public void setB(double b){\n this.b=b;\n }",
"public void setWeight(final int weight) {\n this.weight = weight;\n }",
"private void recordWeight(double weight) {\r\n\r\n\t\tthis.weight = weight;\r\n\t\tif (weight <= 3) {\r\n\t\t\tcategory = \"N/A\";\r\n\t\t} else if ((weight >= 3.1) && (weight <= 4.5)) {\r\n\t\t\tcategory = \"LIGHT\";\r\n\t\t} else if ((weight >= 4.51) && (weight <= 8.0)) {\r\n\t\t\tcategory = \"MEDIUM\";\r\n\t\t} else if (weight > 8.0) {\r\n\t\t\tcategory = \"HEAVY\";\r\n\t\t}\r\n\r\n\t}",
"public void setAge(int age){\n this.age = age;\n }",
"public double getWeight(){\n return weight;\n }",
"public void setAge(int age)\r\n {\r\n this.age = age;\r\n }",
"public static void main(String args[]){\n //Main method to execute\n //Defining some variables to get input from user\n double height;\n double weight;\n String name;\n int age;\n //Creating Scanner object to get input\n Scanner input = new Scanner(System.in);\n //Creating a guiding message to guide user about what to enter\n System.out.print(\"Enter your Name:\");\n //Taking the input\n name = input.next();\n //Creating a guiding message to guide user about what to enter\n System.out.print(\"Enter your Age:\");\n //Taking the input\n age = input.nextInt();\n //Creating a guiding message to guide user about what to enter\n System.out.print(\"Enter your weight in pounds:\");\n //Taking the input\n weight = input.nextDouble();\n //Creating a guiding message to guide user about what to enter\n System.out.print(\"Enter your height in inches:\");\n //Taking the input\n height = input.nextDouble();\n //Creating the object person1 using the values taken from user\n BodyMassIndexCalculator person1 = new BodyMassIndexCalculator(name,age,weight,height);\n //Using the copy constructor to copy same values from person1 to person2\n BodyMassIndexCalculator person2 = new BodyMassIndexCalculator(person1);\n System.out.println();\n //Calling the getBMI() method on person1 to get BMI value\n person1.getBMI();\n //Printing BMI value and Status\n System.out.println(\"Your BMI is \"+ person1.bmi);\n System.out.println(person1.getStatus());\n System.out.println(\"The object generated using copy constructor:\");\n //Invoking getBMI() method on copied object to verify the copy constructor\n person2.getBMI();\n //Printing out the results\n System.out.println(\"Your BMI is \"+ person2.bmi);\n System.out.println(person2.getStatus());\n \n }",
"public ActionProgrammer(String firstName, String lastName,\r\nString socialSecurityNumber, int month, int year, \r\ndouble wage, double pieces) {\r\nsuper(firstName, lastName, socialSecurityNumber, month, year);\r\n\r\nif (wage < 0.0) { // validate wage\r\n throw new IllegalArgumentException(\r\n \"Hourly wage must be >= 0.0\");\r\n}\r\n\r\nif ((pieces < 0.0) || (pieces > 168.0)) { // validate hours\r\n throw new IllegalArgumentException(\r\n \"Hours worked must be >= 0.0 and <= 168.0\");\r\n}\r\n\r\nthis.wage = wage;\r\nthis.pieces = pieces;\r\n}",
"protected void onChange_BirthProbability() {\n onChange_BirthProbability_xjal( BirthProbability );\n }",
"public void calculateMMage() {\n\t\t\n\t}",
"public AgeData (int age) {\n if (age<0){\n throw new IllegalArgumentException ();\n }\n this.age = age;\n total=1;\n }",
"abstract public double getBegBal(int yr);",
"public int getWeight();"
] | [
"0.7491573",
"0.70549625",
"0.6949782",
"0.667269",
"0.65731263",
"0.6498808",
"0.63972586",
"0.63937175",
"0.6383899",
"0.6347084",
"0.63189054",
"0.6315716",
"0.6288466",
"0.6239145",
"0.6151759",
"0.6143376",
"0.6127921",
"0.6115932",
"0.6111319",
"0.6093732",
"0.60799426",
"0.60788816",
"0.60727537",
"0.6068494",
"0.6065263",
"0.60650355",
"0.60473543",
"0.60385513",
"0.6017426",
"0.60046583",
"0.6003185",
"0.5986899",
"0.5943004",
"0.59226596",
"0.5919655",
"0.5909526",
"0.5891976",
"0.5889907",
"0.58868957",
"0.5867724",
"0.5853233",
"0.5823245",
"0.5822125",
"0.58204895",
"0.578418",
"0.578418",
"0.57793075",
"0.57715607",
"0.5764007",
"0.57605594",
"0.5741178",
"0.5726493",
"0.57180953",
"0.57162696",
"0.56965923",
"0.5688894",
"0.5688159",
"0.5687441",
"0.5684629",
"0.56667846",
"0.5653062",
"0.5634828",
"0.56251687",
"0.56242526",
"0.56222105",
"0.5614166",
"0.5611316",
"0.5597939",
"0.55851144",
"0.5565353",
"0.556373",
"0.5557229",
"0.5552673",
"0.5540915",
"0.5535679",
"0.55324244",
"0.5526622",
"0.5503746",
"0.5500458",
"0.5488659",
"0.54874283",
"0.54861987",
"0.5479353",
"0.54748726",
"0.5473088",
"0.5467911",
"0.5467413",
"0.54601383",
"0.5452565",
"0.5451908",
"0.54518175",
"0.54501355",
"0.5447",
"0.5438838",
"0.5437975",
"0.54323477",
"0.542969",
"0.5420876",
"0.5392176",
"0.5385649",
"0.5380044"
] | 0.0 | -1 |
added func to calculate req number of calories per day | public void setCalDay() {
float goal_bmr;
if(gender=="male") {
goal_bmr= (float) (10 * (weight+loseGainPerWeek) + 6.25 * height - 5 * age + 5);
}
else {
goal_bmr=(float) (10 * (weight+loseGainPerWeek) + 6.25 * height - 5 * age - 161);
}
switch (gymFrequency) {
case 0:calDay = goal_bmr*1.2;
break;
case 1:
case 2:
case 3:calDay = goal_bmr*1.375;
break;
case 4:
case 5:calDay = goal_bmr*1.55;
break;
case 6:
case 7:calDay = goal_bmr*1.725;
break;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private int calculateCalories(int steps) {\n\t\treturn (int) (steps * 0.25);\n\t}",
"public int daysOverdue(int today);",
"private void calcCalories()\n\t{\n\t\tif (getIntensity() == 1)\n\t\t{\n\t\t\tbikeCal = 10 * bikeTime; \n\t\t}\n\t\telse if (getIntensity() == 2)\n\t\t{\n\t\t\tbikeCal = 14.3 * bikeTime; \n\t\t}\n\t\telse {\n\t\t\tJOptionPane.showMessageDialog(null, \"error\");\n\t\t}\n\t}",
"public static int getWorkoutClimbCount(Calendar day, Context mContext) {\n DatabaseHelper handler = new DatabaseHelper(mContext);\n SQLiteDatabase database = handler.getWritableDatabase();\n\n int dayLength = 86400000 - 2;\n\n day.set(Calendar.HOUR, 0);\n day.set(Calendar.MINUTE, 0);\n day.set(Calendar.SECOND, 0);\n day.set(Calendar.MILLISECOND, 1);\n\n long dayStart = day.getTimeInMillis();\n long dayEnd = dayStart + dayLength;\n\n //grade type\n String[] projection = {\n DatabaseContract.CalendarTrackerEntry._ID,\n DatabaseContract.CalendarTrackerEntry.COLUMN_DATE,\n DatabaseContract.CalendarTrackerEntry.COLUMN_ISCLIMB};\n String whereClause = DatabaseContract.CalendarTrackerEntry.COLUMN_ISCLIMB + \"=? AND \" + DatabaseContract.CalendarTrackerEntry.COLUMN_DATE + \" BETWEEN ? AND ?\";\n String[] whereValue = {String.valueOf(DatabaseContract.IS_GYMCLIMB), String.valueOf(dayStart), String.valueOf(dayEnd)};\n Cursor cursor = database.query(DatabaseContract.CalendarTrackerEntry.TABLE_NAME,\n projection,\n whereClause,\n whereValue,\n null,\n null,\n null);\n\n int output = cursor.getCount();\n\n try {\n return output;\n } finally {\n cursor.close();\n database.close();\n handler.close();\n }\n }",
"@Override\n\tpublic List<?> getNumberOfPatientPerDay() {\n\t\treturn ar.findAppointmentCount();\n\t}",
"public int getNumDaysForComponent(Record record);",
"public int sumCalories() {\n int calories = 0;\n\n for (Food f : units) {\n calories += f.getCalories();\n }\n\n return calories;\n }",
"public int getHowManyInPeriod();",
"public int getShipPartsNeededCount() {\n return (maxDays * 2) / 3;\n }",
"int getNumberDays();",
"public double countCalories() {\n double count = 0;\n\n for (VegetablePortion vegetablePortion : list) {\n count += vegetablePortion.getVegetable().getCalories() * vegetablePortion.getWeight();\n }\n\n return count;\n }",
"@Override\r\n\tpublic int getDayCount(Date date) {\n\t\tString hql = \"select cc.count from cinema_condition cc where cc.date = ?\";\r\n\t\tQuery query = this.getCurrentSession().createQuery(hql);\r\n\t\tquery.setParameter(0, date);\r\n\t\tif(query.uniqueResult()==null){\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tint resutl = (Integer) query.uniqueResult();\r\n\t\treturn resutl;\r\n\t}",
"public int getCantidadCalles();",
"public static int getWorkoutCount(Calendar day, Context mContext) {\n DatabaseHelper handler = new DatabaseHelper(mContext);\n SQLiteDatabase database = handler.getWritableDatabase();\n int dayLength = 86400000 - 2;\n\n day.set(Calendar.HOUR, 0);\n day.set(Calendar.MINUTE, 0);\n day.set(Calendar.SECOND, 0);\n day.set(Calendar.MILLISECOND, 1);\n\n long dayStart = day.getTimeInMillis();\n long dayEnd = dayStart + dayLength;\n\n //grade type\n String[] projection = {\n DatabaseContract.CalendarTrackerEntry._ID,\n DatabaseContract.CalendarTrackerEntry.COLUMN_DATE,\n DatabaseContract.CalendarTrackerEntry.COLUMN_ISCLIMB};\n String whereClause = DatabaseContract.CalendarTrackerEntry.COLUMN_ISCLIMB + \"=? AND \" + DatabaseContract.CalendarTrackerEntry.COLUMN_DATE + \" BETWEEN ? AND ?\";\n String[] whereValue = {String.valueOf(DatabaseContract.IS_WORKOUT), String.valueOf(dayStart), String.valueOf(dayEnd)};\n\n Cursor cursor = database.query(DatabaseContract.CalendarTrackerEntry.TABLE_NAME,\n projection,\n whereClause,\n whereValue,\n null,\n null,\n null);\n\n int output = cursor.getCount();\n\n try {\n return output;\n } finally {\n cursor.close();\n database.close();\n handler.close();\n }\n }",
"public int calcDays() {\n\t\tint days = day-1;\r\n\t\tdays += ((month-1)*30);\r\n\t\tdays += ((year -2000) * (12*30));\r\n\t\treturn days;\r\n\t}",
"public int sumCalories(Meal m) {\n List<Food> foodsByMeal = getFoodsByMeal(m);\n int calories = 0;\n\n for (Food f : foodsByMeal) {\n calories += f.getCalories();\n }\n\n return calories;\n }",
"public int getTotalDays() {\r\n int totalDays = 0;\r\n for (int d = 0; d < 5; d++) {\r\n for (int h = 0; h < 13; h++) {\r\n if (weekData[d][h] != 0) {\r\n totalDays += 1;\r\n break;\r\n }\r\n }\r\n }\r\n return totalDays;\r\n }",
"public static ArrayList<Integer> getWorkoutClimbMonthCount(Calendar day, Context mContext) {\n DatabaseHelper handler = new DatabaseHelper(mContext);\n SQLiteDatabase database = handler.getWritableDatabase();\n\n long dayLength = 86400000;\n\n day.set(Calendar.HOUR, 0);\n day.set(Calendar.MINUTE, 0);\n day.set(Calendar.SECOND, 0);\n day.set(Calendar.MILLISECOND, 0);\n\n long monthStart = day.getTimeInMillis();\n long monthEnd = monthStart + dayLength * 42;\n Log.i(LOG_TAG, \"Month Start: \" + monthStart + \" | Month End: \" + monthEnd);\n\n ArrayList<Integer> eventsList = new ArrayList<>(42);\n for (int i = 0; i < 42; i++) {\n eventsList.add(0);\n }\n\n //grade type\n String[] projection = {\n DatabaseContract.CalendarTrackerEntry._ID,\n DatabaseContract.CalendarTrackerEntry.COLUMN_DATE,\n DatabaseContract.CalendarTrackerEntry.COLUMN_ISCLIMB};\n String whereClause = DatabaseContract.CalendarTrackerEntry.COLUMN_ISCLIMB + \"=? AND \" + DatabaseContract.CalendarTrackerEntry.COLUMN_DATE + \" BETWEEN ? AND ?\";\n String[] whereValue = {String.valueOf(DatabaseContract.IS_GYMCLIMB), String.valueOf(monthStart), String.valueOf(monthEnd)};\n Cursor cursor = database.query(DatabaseContract.CalendarTrackerEntry.TABLE_NAME,\n projection,\n whereClause,\n whereValue,\n null,\n null,\n null);\n\n int idColumnOutput = cursor.getColumnIndex(DatabaseContract.CalendarTrackerEntry.COLUMN_DATE);\n\n int cursorCount = cursor.getCount();\n Log.i(LOG_TAG, \"idColumnOutput: \" + idColumnOutput + \" | cursorCount: \" + cursorCount);\n\n if (cursorCount != 0) {\n //cursor.moveToFirst();\n while (cursor.moveToNext()) {\n long outputDate = cursor.getLong(idColumnOutput);\n long outputDay = (outputDate - monthStart) / dayLength;\n Log.i(LOG_TAG, \"outputDate: \" + outputDate + \" | outputDay: \" + outputDay);\n eventsList.set((int) outputDay, 1);\n }\n }\n\n try {\n return eventsList;\n } finally {\n cursor.close();\n database.close();\n handler.close();\n }\n }",
"private void calculateWidthPerDay() {\n if (drawConfig.timeColumnWidth == 0) {\n drawConfig.timeColumnWidth = drawConfig.timeTextWidth + config.timeColumnPadding * 2;\n }\n // Calculate the available width for each day\n drawConfig.widthPerDay = getWidth()\n - drawConfig.timeColumnWidth\n - config.columnGap * (config.numberOfVisibleDays - 1);\n drawConfig.widthPerDay = drawConfig.widthPerDay / config.numberOfVisibleDays;\n }",
"public int getCalories() {\n return calories;\n }",
"int countByExample(AoD5e466WorkingDayExample example);",
"public double getCalories() {\n\t\tdouble mealCalories = 0;\n\t\tfor (String foodName : meal) {\n\t\t\tdouble calories = foodDetail.get(foodName).getCalories();\n\t\t\tdouble portion = foodPortion.get(foodName);\n\t\t\tmealCalories += calories * portion;\n\t\t}\n\t\treturn mealCalories;\n\t}",
"public Long calculateTotalAgingForFirstDay(Integer day, LocalDateTime endDateParam, LocalDateTime startDateParam,\n\t\t\tInteger totalSecondRest, List<KPIServiceHourRest> ticketRests) {\n/*\t\t \n * 9:02-8:29-restAging\n *\t\t 8:29:00,9:10:00,\n *\t\t 8:30:00, 9:00\n *\t\t Istirahat jam 8:30-9:00 \n *\t\t long restAging=0L<\n *\t \n *\t if(startDateParam<restStart && startDateParam<restEnd)\n *\t {\n *\t \t\t8:29<8:30 Y, 8:29<9:00 Y\n *\t \t\trestAging=9:00:00-8:30:00\n *\t \t \t 8:29<11:30 Y, 8:29<1:00:00 Y\n *\t \t\trestAging=9:00:00-8:30:00\n *\n *\t \t\t9:10<8:29 N, 9:10<9:00 N\n *\t \t\tbreak;\n *\t \t\t8:29<11:30 Y, 8:29<1:00 Y\n *\t }\n */\n\t\t Long totalAging=new Long(0);\n\t \t Long totalAgingOnRest=0L;\n\t \t for(KPIServiceHourRest ticketRest:ticketRests){\n\t \t\t if(day==ticketRest.getDay()){\n\t \t\t\t LocalDateTime restStart=LocalDateTime.fromDateFields(ticketRest.getFromTimeRest());\n\t\t LocalDateTime restEnd=LocalDateTime.fromDateFields(ticketRest.getToTimeRest());\n\t\t if(CustomDateUtils.compareTime(new DateTime(startDateParam.toDateTime()), new DateTime(restStart.toDateTime()))<=0\n\t\t \t\t && CustomDateUtils.compareTime(new DateTime(startDateParam.toDateTime()), new DateTime(restEnd.toDateTime()))<=0){\n\t\t \t totalAgingOnRest+=secondTotalAgingBetweenDate(restEnd.toDate().getTime(), restStart.toDate().getTime(), 0L);\n\t\t }\n\t \t\t }\n\t \t }\n\t \t totalAging=secondTotalAgingBetweenDate(endDateParam.toDate().getTime(),startDateParam.toDate().getTime(),totalAgingOnRest);\n return totalAging;\n\t}",
"public Integer getTotalDays()\r\n/* 68: */ {\r\n/* 69:67 */ return this.totalDays;\r\n/* 70: */ }",
"public int getLBR_CollectionReturnDays();",
"public static int getClimbCount(Calendar day, Context mContext) {\n DatabaseHelper handler = new DatabaseHelper(mContext);\n SQLiteDatabase database = handler.getWritableDatabase();\n\n int dayLength = 86400000 - 2;\n\n day.set(Calendar.HOUR, 0);\n day.set(Calendar.MINUTE, 0);\n day.set(Calendar.SECOND, 0);\n day.set(Calendar.MILLISECOND, 1);\n\n long dayStart = day.getTimeInMillis();\n long dayEnd = dayStart + dayLength;\n\n //grade type\n String[] projection = {\n DatabaseContract.CalendarTrackerEntry._ID,\n DatabaseContract.CalendarTrackerEntry.COLUMN_DATE,\n DatabaseContract.CalendarTrackerEntry.COLUMN_ISCLIMB};\n String whereClause = DatabaseContract.CalendarTrackerEntry.COLUMN_ISCLIMB + \"=? AND \" + DatabaseContract.CalendarTrackerEntry.COLUMN_DATE + \" BETWEEN ? AND ?\";\n String[] whereValue = {String.valueOf(DatabaseContract.IS_CLIMB), String.valueOf(dayStart), String.valueOf(dayEnd)};\n\n Cursor cursor = database.query(DatabaseContract.CalendarTrackerEntry.TABLE_NAME,\n projection,\n whereClause,\n whereValue,\n null,\n null,\n null);\n\n int output = cursor.getCount();\n\n try {\n return output;\n } finally {\n cursor.close();\n database.close();\n handler.close();\n }\n }",
"public final double calculateCarbon() {\n\n if (calories > 2000) {\n allowedCarbonPerYear = 2200 * quantity;\n\n } else {\n allowedCarbonPerYear = 2000 * quantity;\n }\n allowedCarbonPerDay = (double) allowedCarbonPerYear / (double) 365;\n // String strDouble = String.format(\"%.2f\", allowedCarbonPerDay);\n // System.out.println(strDouble);\n return allowedCarbonPerDay;\n\n }",
"Integer getDaysSpanned();",
"public int getCalories() {\n return this.calories += ((this.protein * 4) + (this.carbohydrates * 4) + (this.fats * 9));\n }",
"public static int countDays(List<MonitoredData> data){\n System.out.println(\"3) How many times has appeared each activity for each day: \");\n long result = 0;\n ArrayList<String> days = new ArrayList<>();\n ArrayList<MonitoredData> dataTrunc = new ArrayList<>();\n for (int i=0; i<data.size(); i++){\n String day = \"\";\n day += data.get(i).getStartTime().charAt(8);\n day += data.get(i).getStartTime().charAt(9);\n days.add(day);\n }\n for (int i=0; i<data.size(); i++){\n dataTrunc.add(data.get(i));\n if (i<days.size()-1){\n if (!days.get(i+1).equals(days.get(i))){\n System.out.println(\" Day \" + days.get(i) + \" ::: \" + countActivitiesWholePeriod(dataTrunc));\n dataTrunc.clear();\n }\n }else{\n System.out.println(\" Day \" + days.get(i) + \" ::: \" + countActivitiesWholePeriod(dataTrunc));\n }\n }\n Stream<String> daysStream = days.stream();\n result = daysStream\n .distinct()\n .count();\n return (int)result;\n }",
"public double calcTotalCaloriesBurned() {\n double sum = 0.0;\n for (ExerciseModel exercise : exercises) {\n sum += exercise.getCalories();\n }\n\n return sum;\n }",
"public abstract int daysInMonth(DMYcount DMYcount);",
"public double getPer_day(){\n\t\tdouble amount=this.num_of_commits/365;\n\t\treturn amount;\n\t}",
"private double calculateTotalFeesEarned(ArrayList<Pair<Fees, Time>> timeslots) {\n double sumOfFees = 0.00;\n for (DayOfWeek day : DayOfWeek.values()) {\n sumOfFees += calculateFeesEarnedEachDayOfWeek(timeslots, day);\n }\n return sumOfFees;\n }",
"public double usageCost() {\r\n double totalCost = 0;\r\n for (Booking aBooking: getBookings()) {\r\n long diff = (aBooking.getDateTo().getTime() \r\n - aBooking.getDateFrom().getTime());\r\n int noOfDays = (int) ((diff / (1000 * 60 * 60 * 24)) + 1);\r\n totalCost += noOfDays * 50;\r\n }\r\n return totalCost;\r\n }",
"public int getCalories () {\n\t\treturn this.calories;\n\t}",
"public static ArrayList<Integer> getWorkoutMonthCount(Calendar day, Context mContext) {\n DatabaseHelper handler = new DatabaseHelper(mContext);\n SQLiteDatabase database = handler.getWritableDatabase();\n\n long dayLength = 86400000;\n\n day.set(Calendar.HOUR, 0);\n day.set(Calendar.MINUTE, 0);\n day.set(Calendar.SECOND, 0);\n day.set(Calendar.MILLISECOND, 0);\n\n long monthStart = day.getTimeInMillis();\n long monthEnd = monthStart + dayLength * 42;\n Log.i(LOG_TAG, \"Month Start: \" + monthStart + \" | Month End: \" + monthEnd);\n\n ArrayList<Integer> eventsList = new ArrayList<>(42);\n for (int i = 0; i < 42; i++) {\n eventsList.add(0);\n }\n\n //grade type\n String[] projection = {\n DatabaseContract.CalendarTrackerEntry._ID,\n DatabaseContract.CalendarTrackerEntry.COLUMN_DATE,\n DatabaseContract.CalendarTrackerEntry.COLUMN_ISCLIMB};\n String whereClause = DatabaseContract.CalendarTrackerEntry.COLUMN_ISCLIMB + \"=? AND \" + DatabaseContract.CalendarTrackerEntry.COLUMN_DATE + \" BETWEEN ? AND ?\";\n String[] whereValue = {String.valueOf(DatabaseContract.IS_WORKOUT), String.valueOf(monthStart), String.valueOf(monthEnd)};\n\n Cursor cursor = database.query(DatabaseContract.CalendarTrackerEntry.TABLE_NAME,\n projection,\n whereClause,\n whereValue,\n null,\n null,\n null);\n\n int idColumnOutput = cursor.getColumnIndex(DatabaseContract.CalendarTrackerEntry.COLUMN_DATE);\n\n int cursorCount = cursor.getCount();\n Log.i(LOG_TAG, \"idColumnOutput: \" + idColumnOutput + \" | cursorCount: \" + cursorCount);\n\n if (cursorCount != 0) {\n //cursor.moveToFirst();\n while (cursor.moveToNext()) {\n long outputDate = cursor.getLong(idColumnOutput);\n long outputDay = (outputDate - monthStart) / dayLength;\n Log.i(LOG_TAG, \"outputDate: \" + outputDate + \" | outputDay: \" + outputDay);\n eventsList.set((int) outputDay, 1);\n }\n }\n\n try {\n return eventsList;\n } finally {\n cursor.close();\n database.close();\n handler.close();\n }\n }",
"private static void incrementDate() {\n\t\ttry {\r\n\t\t\tint days = Integer.valueOf(input(\"Enter number of days: \")).intValue();\r\n\t\t\tcalculator.incrementDate(days); // variable name changes CAL to calculator\r\n\t\t\tlibrary.checkCurrentLoans(); // variable name changes LIB to library\r\n\t\t\toutput(sdf.format(cal.date())); // variable name changes SDF to sdf , CAL to cal , method changes Date() to date()\r\n\t\t\t\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\t output(\"\\nInvalid number of days\\n\");\r\n\t\t}\r\n\t}",
"public int getCalories(){\r\n \tint retVal = this.calories;\r\n return retVal;\r\n }",
"private void updateCurrentCalories() {\n currentCalories = 0;\n currentFats = 0;\n currentCarbs = 0;\n currentProteins = 0;\n for (Food food : foodListView.getItems()) {\n currentCalories += food.getCalories();\n currentFats += food.getFat().getAmount();\n currentCarbs += food.getCarbs().getAmount();\n currentProteins += food.getProtein().getAmount();\n }\n }",
"public int avgTrafficPerDay(){\r\n \r\n int trav=apstate.gettravellers();\r\n\t\tint days=apstate.getdays();\r\n\t\tint items=apstate.getitems();\r\n \r\n int avg_traffic_per_day=trav/days;\r\n \r\n return avg_traffic_per_day;\r\n }",
"public void calculateVacationDays(){\n }",
"private static int getPreiousNumApis(final int compId, final Date date, final int envId) {\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setTime(date);\n\t\tcal.add(Calendar.DATE, -1);\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tCriteria ctrStsCrit = session.createCriteria(ApiStatusEntity.class, \"as\");\n\t\tctrStsCrit.add(Restrictions.eq(\"as.component.componentId\",compId));\n\t\tctrStsCrit.add(Restrictions.eq(\"as.environment.environmentId\",envId));\n\t\tctrStsCrit.add(Restrictions.eq(\"as.statusDate\", new java.sql.Date(cal.getTimeInMillis()) ));\n\t\tctrStsCrit.setMaxResults(1);\n\t\tApiStatusEntity apiSts =(ApiStatusEntity) ctrStsCrit.uniqueResult();\n\t\tint totalApi = 0;\n\t\tif(apiSts != null){\n\t\t\ttotalApi = apiSts.getTotalApi();\n\t\t}\n\t\ttxn.commit();\n\t\treturn totalApi;\n\t}",
"public int calculateFrequentRenterPoints(final int daysRented) {\n return frequentRenterPoints + ((daysRented > rentalPeriod) ? frequentRenterBonus : 0);\n }",
"int getMessageCounterHistoryDayLimit();",
"public Integer get_count_of_days(String Created_date_String, String Expire_date_String) {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yy\", Locale.getDefault());\n\n Date Created_convertedDate = null, Expire_CovertedDate = null, todayWithZeroTime = null;\n try {\n Created_convertedDate = dateFormat.parse(Created_date_String);\n Expire_CovertedDate = dateFormat.parse(Expire_date_String);\n\n Date today = new Date();\n\n todayWithZeroTime = dateFormat.parse(dateFormat.format(today));\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n Calendar c_cal = Calendar.getInstance();\n c_cal.setTime(todayWithZeroTime);\n int c_year = c_cal.get(Calendar.YEAR);\n int c_month = c_cal.get(Calendar.MONTH);\n int c_day = c_cal.get(Calendar.DAY_OF_MONTH);\n\n\n Calendar e_cal = Calendar.getInstance();\n e_cal.setTime(Expire_CovertedDate);\n int e_year = e_cal.get(Calendar.YEAR);\n int e_month = e_cal.get(Calendar.MONTH);\n int e_day = e_cal.get(Calendar.DAY_OF_MONTH);\n\n Calendar date1 = Calendar.getInstance();\n Calendar date2 = Calendar.getInstance();\n\n date1.clear();\n date1.set(c_year, c_month, c_day);\n date2.clear();\n date2.set(e_year, e_month, e_day);\n\n long diff = date2.getTimeInMillis() - date1.getTimeInMillis();\n\n long dayCount = diff / (24 * 60 * 60 * 1000);\n\n return (int) dayCount;\n }",
"public static ArrayList<Integer> getClimbMonthCount(Calendar day, Context mContext) {\n DatabaseHelper handler = new DatabaseHelper(mContext);\n SQLiteDatabase database = handler.getWritableDatabase();\n\n long dayLength = 86400000;\n\n day.set(Calendar.HOUR, 0);\n day.set(Calendar.MINUTE, 0);\n day.set(Calendar.SECOND, 0);\n day.set(Calendar.MILLISECOND, 0);\n\n long monthStart = day.getTimeInMillis();\n long monthEnd = monthStart + dayLength * 42;\n //Log.i(LOG_TAG, \"Month Start: \" + monthStart + \" | Month End: \" + monthEnd);\n\n ArrayList<Integer> eventsList = new ArrayList<>(42);\n for (int i = 0; i < 42; i++) {\n eventsList.add(0);\n }\n\n //grade type\n String[] projection = {\n DatabaseContract.CalendarTrackerEntry._ID,\n DatabaseContract.CalendarTrackerEntry.COLUMN_DATE,\n DatabaseContract.CalendarTrackerEntry.COLUMN_ISCLIMB};\n String whereClause = DatabaseContract.CalendarTrackerEntry.COLUMN_ISCLIMB + \"=? AND \" + DatabaseContract.CalendarTrackerEntry.COLUMN_DATE + \" BETWEEN ? AND ?\";\n String[] whereValue = {String.valueOf(DatabaseContract.IS_CLIMB), String.valueOf(monthStart), String.valueOf(monthEnd)};\n\n Cursor cursor = database.query(DatabaseContract.CalendarTrackerEntry.TABLE_NAME,\n projection,\n whereClause,\n whereValue,\n null,\n null,\n null);\n\n int idColumnOutput = cursor.getColumnIndex(DatabaseContract.CalendarTrackerEntry.COLUMN_DATE);\n\n int cursorCount = cursor.getCount();\n //Log.i(LOG_TAG, \"idColumnOutput: \" + idColumnOutput + \" | cursorCount: \" + cursorCount);\n\n if (cursorCount != 0) {\n //cursor.moveToFirst();\n while (cursor.moveToNext()) {\n long outputDate = cursor.getLong(idColumnOutput);\n long outputDay = (outputDate - monthStart) / dayLength;\n //Log.i(LOG_TAG, \"outputDate: \" + outputDate + \" | outputDay: \" + outputDay);\n eventsList.set((int) outputDay, 1);\n }\n }\n\n try {\n return eventsList;\n } finally {\n cursor.close();\n database.close();\n handler.close();\n }\n }",
"private int getDays() {\n\t\tlong arrival = arrivalDate.toEpochDay();\n\t\tlong departure = departureDate.toEpochDay();\n\t\tint days = (int) Math.abs(arrival - departure);\n\n\t\treturn days;\n\t}",
"int getActAmountCount();",
"public int avgProhibitedItemsPerDay(){\r\n \r\n int trav=apstate.gettravellers();\r\n\t\tint days=apstate.getdays();\r\n\t\tint items=apstate.getitems();\r\n \r\n int avg_prohibited_items_per_day=items/days;\r\n \r\n return avg_prohibited_items_per_day;\r\n }",
"public int computeFine(int today);",
"RESPONSE tally();",
"private int jobLength(){\n LocalDate completedLocalDate = LocalDate.of(this.dateCompleted.getYear(), \n this.dateCompleted.getMonth(), this.dateCompleted.getDay());\n \n LocalDate startedLocalDate = LocalDate.of(this.dateStarted.getYear(), \n this.dateStarted.getMonth(), this.dateStarted.getDay());\n \n return startedLocalDate.until(completedLocalDate).getDays();\n }",
"public int getLBR_ProtestDays();",
"private int sizeForHashTable()\n {\n String compare=\"\";\n int numberOfdates = 0;\n for (int i=0; i <= hourly.size();i++)\n {\n if (i==0)\n {\n numberOfdates +=1;\n compare = data.get(i).getFCTTIME().getPretty();\n }else if(compare != data.get(i).getFCTTIME().getPretty())\n {\n numberOfdates+=1;\n compare = data.get(i).getFCTTIME().getPretty();\n }\n }\n return numberOfdates;\n }",
"double getTodaysExpenditureAmount() {\n Long time = new Date().getTime();\n Date date = new Date(time - time % (DAY_DURATION));\n return getExpenditureAmount(date.getTime(), date.getTime() + (DAY_DURATION));\n }",
"@Test\n public void reduceNumber() throws Exception {\n Date date = new Date();\n int updateCount = seckillDao.reduceNumber(1000,date);\n System.out.println(updateCount);\n }",
"@Override\n public double calculatePayDay()\n {\n double perWeekEarned = hourlyRate * hoursPerWeek;\n return (double)Math.round(perWeekEarned * 100) / 100;\n }",
"int getNewlyAvailableQuestsCount();",
"static int birthday(List<Integer> s, int d, int m) \n {\n int[] sum=new int[m];\n int total;\n \n int temp=0;\n int count=0;\n while(true)\n {\n total=0;\n for(int y=0; y<sum.length; y++)\n {\n \n sum[y]=s.get(y+temp);\n }\n for(int x : sum)\n {\n total += x;\n }\n if(total==d)\n {\n count++;\n }\n temp++;\n if(temp>(s.size()-sum.length))\n {\n break;\n }\n }\n return count;\n }",
"protected int getTotalEnrolled() {\n return getTotalEnrolledEvening() + getTotalEnrolledMorning();\n }",
"long getExpirations();",
"Map<Long, Map<Long, Map<Date, Collection<DailyTimePostTotal>>>> calculateDailyTotals(Collection<IncidentResourceVo> incidentResources, Collection<Date> dates);",
"long countByExample(UvStatDayExample example);",
"private int check15Days(DateInfo date) {\r\n\t\t// creates cd calender stores date stored in CD\r\n\t\tint totalCD, cdMonth, cdDay, cdYear;\r\n\t\tDateInfo maturityDate = new DateInfo(super.getDate());\r\n\t\tint totalTrans, tMonth, tDay, tYear;\r\n\r\n\t\tint mature= maturityDate.getMatureLength();\r\n\t\tCalendar cD = Calendar.getInstance();\r\n\t\tcD.clear();\r\n\t\tcD.set(Calendar.MONTH, maturityDate.getMonth());\r\n\t\tcD.set(Calendar.YEAR, maturityDate.getYear());\r\n\t\tcD.set(Calendar.DATE, maturityDate.getDay());\r\n\r\n\t\t// adds the term to compare the dates\r\n\r\n\t\tcD.add(Calendar.MONTH, +mature);\r\n\t\tcdMonth = 30 * cD.get(Calendar.MONTH);\r\n\t\tcdDay = cD.get(Calendar.DATE);\r\n\t\tcdYear = 365 * cD.get(Calendar.YEAR);\r\n\t\ttotalCD = cdMonth + cdDay + cdYear;\r\n\r\n\t\ttMonth = 30 * date.getMonth();\r\n\t\ttDay = date.getDay();\r\n\t\ttYear = 365 * date.getYear();\r\n\t\ttotalTrans = tMonth + tDay + tYear;\r\n\r\n\t\treturn (totalTrans - totalCD);\r\n\r\n\t}",
"public Double calcMovieRentalPrice(Integer unitPrice, Integer numOfDays);",
"int getTotalDepositCount();",
"@Override\t\n\tpublic int getPricePerDay() {\n\t\treturn pricePerDay;\n\t}",
"@Override\n\tpublic int ddayCount(String memberNo) {\n\t\treturn dDao.ddayCount(sqlSession, memberNo);\n\t}",
"private int calculateNumberOfDaysOfWeek (DayOfWeek dayOfWeek) {\n LocalDate dateIterator = startDate.with(nextOrSame(dayOfWeek));\n if (dateIterator.isAfter(endDate)) {\n return 0;\n }\n\n int numberOfDayOfWeek = 1;\n\n while (dateIterator.isBefore(endDate)) {\n dateIterator = dateIterator.with(next(dayOfWeek));\n if (dateIterator.isBefore(endDate) || dateIterator.isEqual(endDate)) {\n numberOfDayOfWeek++;\n }\n }\n\n return numberOfDayOfWeek;\n }",
"@Override\r\n\tpublic int[] getDayPeople() {\n\t\tint[] result = new int[7];\r\n\t\tDate date = DateUtil.getCurrentDate();\r\n\t\tresult[0] = cinemaConditionDao.getDayCount(date);\r\n\t\tfor(int i=0;i<6;i++){\r\n\t\t\tdate = DateUtil.getDayBefore(date);\r\n\t\t\tresult[i+1] = cinemaConditionDao.getDayCount(date);\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public int numOfRentDays(int roomId, DateTime rentDate) throws NumberFormatException, IOException {\n\n\t\tint minimum = 2;\n\t\tint maximum = 10;\n\n\t\tif(rooms.get(roomId) instanceof Suite) {\n\t\t\tmaximum = DateTime.diffDays(rooms.get(roomId).lastMaintenanceDate, rentDate) + 10;\n\n\t\t}\n\n\t\tif(rentDate.isWeekend()) {\n\t\t\tSystem.out.println(\"It's finally the weekend!\");\n\t\t\tminimum = 3;\n\n\t\t}\n\n\t\twhile (true) {\n\t\t\tSystem.out.println(\"How many days would you like to rent this room?\" );\n\t\t\tint input = Integer.parseInt(br.readLine());\n\n\t\t\tif (input > maximum) {\n\t\t\t\tSystem.out.println(\"You can only rent this room for \" + maximum + \" days\");\n\t\t\t\tcontinue;\n\n\t\t\t} else if (input < minimum) {\n\t\t\t\tSystem.out.println(\"You must rent this room for at least \" + minimum + \" days\");\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\treturn input;\n\n\t\t}\n\t}",
"@Override\n\tpublic int getTotalCount(Integer cate_code) {\n\t\treturn mapper.getTotalCount(cate_code);\n\t}",
"@Test\n public void computeFactor_SummerTimeDay() {\n long startTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-03-22 00:00:00\");\n long endTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-03-31 23:59:59\");\n BillingInput billingInput = BillingInputFactory.newBillingInput(\n \"2012-03-01 00:00:00\", \"2012-04-01 00:00:00\");\n\n // when\n double factor = calculator.computeFactor(PricingPeriod.DAY,\n billingInput, startTimeUsage, endTimeUsage, true, true);\n\n // then\n assertEquals(10, factor, 0);\n }",
"Map<Date, Integer> getFullImpressions(Step step) throws SQLException;",
"public int getFulfillmentTimeInDays () {\n return 0;\n }",
"public double countDailyBudget() {\n return countBalance() / 30;\n }",
"public void setCalories(int calories) {\n\t\tthis.calories = calories; \n\t}",
"public int getTodayCount(){\n\t\tint count = 0;\n\t\tfor ( Task task : m_Tasks ){\n\t\t\tif( task.folder.equals(\"Today\") && !task.done) count++;\n\t\t}\n\t\treturn count;\n\t}",
"@Override\r\n\tpublic int getCount(Date dateStart, Date dateEnd) {\n\t\tString hql = \"select sum(cc.count) from cinema_condition cc where cc.date >= ? and cc.date <= ?\";\r\n\t\tQuery query = this.getCurrentSession().createQuery(hql);\r\n\t\tquery.setParameter(0, dateStart);\r\n\t\tquery.setParameter(1, dateEnd);\r\n\t\tif(query.uniqueResult()==null){\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tint result = ((Long) query.uniqueResult()).intValue();\r\n\t\treturn result;\r\n\t}",
"int getEducationsCount();",
"private static int getPreiousNumInstance(final int compId, final Date date, final int envId) {\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setTime(date);\n\t\tcal.add(Calendar.DATE, -1);\n\t\t\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tCriteria ctrStsCrit = session.createCriteria(ContainerStatsEntity.class, \"cs\");\n\t\tctrStsCrit.add(Restrictions.eq(\"cs.component.componentId\",compId));\n\t\tctrStsCrit.add(Restrictions.eq(\"cs.environment.environmentId\",envId));\n\t\tctrStsCrit.add(Restrictions.eq(\"cs.statsDate\", new java.sql.Date(cal.getTimeInMillis()) ));\n\t\tctrStsCrit.setMaxResults(1);\n\t\tContainerStatsEntity conSts =(ContainerStatsEntity) ctrStsCrit.uniqueResult();\n\t\tint totalContainer = 0;\n\t\tif(conSts != null){\n\t\t\ttotalContainer = conSts.getTotalContainer();\n\t\t}\n\t\ttxn.commit();\n\t\treturn totalContainer;\n\t\t\t\t\t\n\t}",
"private void appointmentReport() {\n Set<String> types = new HashSet<>();\n Set<Month> months = new HashSet<>();\n HashMap<String, Integer> numberByType = new HashMap<>();\n HashMap<Month, Integer> numberByMonth = new HashMap<>();\n\n for (Appointment appointment: Data.getAppointments()) {\n months.add(appointment.getStart().toLocalDateTime().getMonth());\n types.add(appointment.getType());\n }\n\n for (String type: types) {\n int count = 0;\n for (Appointment appointment: Data.getAppointments()) {\n\n if (type.equals(appointment.getType())) {\n count++;\n }\n numberByType.put(type, count);\n }\n }\n for (Month month: months) {\n int count = 0;\n for (Appointment appointment: Data.getAppointments()) {\n if (month.equals(appointment.getStart().toLocalDateTime().getMonth())) {\n count++;\n }\n numberByMonth.put(month, count);\n }\n }\n\n reportText.appendText(\"Report of the number of appointments by type:\\n\\n\");\n reportText.appendText(\"Count \\t\\tType\\n\");\n numberByType.forEach((k,v) -> reportText.appendText(v + \"\\t\\t\" + k + \"\\n\"));\n reportText.appendText(\"\\n\\n\\nReport of the number of appointments by Month:\\n\\n\");\n reportText.appendText(\"Count \\t\\tMonth\\n\");\n numberByMonth.forEach((k,v) -> reportText.appendText(v + \"\\t\\t\" + k + \"\\n\"));\n\n }",
"public int getTotalNumberOfWorkingDays(List<LocalDate> dateList) {\n\n int cont = 0;\n for (LocalDate date : dateList) {\n\n if (dateDiffOfWeekend(date)) {\n\n cont++;\n }\n }\n\n return cont;\n }",
"public int getNumberOfLastDayEvents() {\n int counter = 0;\n long currentTimeSeconds = getCurrentTimeInSeconds();\n for (int i = 0; i < records.length; i++) {\n synchronized (records[i]) {\n if (currentTimeSeconds - records[i].getLastTimeReset() < SECONDS_IN_DAY) {\n counter += records[i].getCount();\n }\n }\n }\n\n return counter;\n }",
"public int calculatingDailyWage() {\n\t\tsalary = workingHrs * wagePerHr;\n\t\treturn salary;\n\t}",
"public void calcularCost() {\r\n cost = 0;\r\n int a = 0;\r\n try {\r\n String r = DataR.toString()+ \" \" + horaR;\r\n String d = DataD.toString()+ \" \" + horaD;\r\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss\");\r\n Date dateR = simpleDateFormat.parse(r);\r\n Date dateD = simpleDateFormat.parse(d);\r\n a = (int) ((dateD.getTime() - dateR.getTime())/(1000*3600));\r\n \r\n \r\n } catch (ParseException ex) {\r\n Logger.getLogger(Reserva.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n if(a > 24) {\r\n cost += 15*(a/(24));\r\n a -= (((int)(a/24))*24);\r\n }\r\n if(a%3600 == 0) {\r\n cost += 1;\r\n }\r\n if(a%3600 > 0) {\r\n cost += 1;\r\n }\r\n \r\n }",
"int calDateWeek(int mC,int yC,int mG,int yG){\n int x = 0,i,countW=0;\n if(yC<=yG){\n for(i = yC; i < yG; i++)\n countW+=52;\n }\n\n countW -= mC;\n countW += mG;\n countW *= 4;\n return (countW);\n }",
"long getTotalDoExamTime();",
"private double calculateFeesEarnedEachDayOfWeek(ArrayList<Pair<Fees, Time>> timeslots, DayOfWeek day) {\n return daysOfWeek[day.ordinal()] * timeslots.stream()\n .filter(p -> convertDayOfWeek(p.getValue().getDay()).equals(day))\n .mapToDouble(p -> p.getValue().getTuitionHours() * p.getKey().getFeesValue())\n .sum();\n }",
"private BigInteger computeTotalWays(){\n Map<BigInteger, Integer> sumdices = new ConcurrentHashMap<>();\n dice.stream()\n .map( die -> new BigInteger(die.getSides().toString()) )\n .forEach((c) -> {\n sumdices.compute(c, (k,v) -> {return v == null ? 1 : v + 1; });\n });\n \n // How many ways to roll a die are in total.\n return sumdices.entrySet().stream()\n .map(e -> { return e.getKey().pow(e.getValue()); })\n .reduce(BigInteger.ZERO, (a,b) -> a.add(b) );\n \n }",
"long countByExample(FinMonthlySnapModelExample example);",
"public static int \tdayCounter (String duration) {\n\n\t\tlogger.finer(\"Day Counter used\");\n\n\t\tint x = 0 ;\n\t\tif(duration.equalsIgnoreCase(\"DAY\")) {\n\t\t\tx = 1; \n\t\t}\n\t\tif(duration.equalsIgnoreCase(\"WEEK\")) {\n\t\t\tx = 7;\n\t\t}\n\t\tif(duration.equalsIgnoreCase(\"MONTH\")) {\n\t\t\tx = 30;\n\t\t}\n\t\treturn x;\n\t}",
"public int countByTodoDateTime(Date todoDateTime);",
"public void addDailySteps(int steps) {\n totalSteps+=steps;day++;\n if (steps>=STEPS) activeDay++;\n }",
"public void setDays(int n) {\n this.days = n;\n this.total = this.days * this.price;\n }",
"public int getTotRuptures();",
"public int getCantCalif() {\n\t\tint calificacion = 0;\n\t\tfor (Episodio episodio : this.episodios) {\n\t\t\tif (episodio.isFlag()) {\n\t\t\t\tcalificacion += episodio.getCalificacion();\n\t\t\t}\n\t\t}\n\t\treturn calificacion;\n\t}",
"@Test\n public void computeFactor_WinterTimeDay() {\n long startTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-10-21 00:00:00\");\n long endTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-10-30 23:59:59\");\n BillingInput billingInput = BillingInputFactory.newBillingInput(\n \"2012-10-01 00:00:00\", \"2012-11-01 00:00:00\");\n\n // when\n double factor = calculator.computeFactor(PricingPeriod.DAY,\n billingInput, startTimeUsage, endTimeUsage, true, true);\n\n // then\n assertEquals(10, factor, 0);\n }",
"long getTotalAcceptCount();",
"public int determineDayRandomly() {\n\t\treturn 0;\r\n\t}"
] | [
"0.62065536",
"0.60917765",
"0.6077303",
"0.59998375",
"0.59834653",
"0.5971183",
"0.5969344",
"0.5939618",
"0.5930622",
"0.5912987",
"0.5911069",
"0.59034413",
"0.59014153",
"0.5872093",
"0.5866555",
"0.58554024",
"0.5836008",
"0.5803784",
"0.57978976",
"0.5770995",
"0.57614696",
"0.5758027",
"0.5757916",
"0.5741072",
"0.5736107",
"0.5734956",
"0.5721412",
"0.57105726",
"0.5692184",
"0.5668741",
"0.566402",
"0.56548065",
"0.5652773",
"0.5647721",
"0.5630671",
"0.5614123",
"0.56080055",
"0.5587749",
"0.55860025",
"0.55820847",
"0.55769783",
"0.5574706",
"0.55736876",
"0.55543035",
"0.5550896",
"0.5547748",
"0.5547459",
"0.5545068",
"0.5537437",
"0.55351317",
"0.5523424",
"0.5513797",
"0.55123883",
"0.55044454",
"0.54963833",
"0.54948246",
"0.54847914",
"0.54810137",
"0.5473452",
"0.5470491",
"0.5461489",
"0.5450979",
"0.5449853",
"0.54475534",
"0.54439",
"0.5431517",
"0.5428686",
"0.54219484",
"0.54200363",
"0.54117894",
"0.5411215",
"0.540924",
"0.5406451",
"0.5406009",
"0.540459",
"0.5396783",
"0.53912455",
"0.53813165",
"0.5374619",
"0.5367848",
"0.53545284",
"0.53513587",
"0.5344601",
"0.5343688",
"0.53415275",
"0.5336963",
"0.5329263",
"0.5327636",
"0.5323859",
"0.5320855",
"0.5317558",
"0.5311302",
"0.53086895",
"0.52966064",
"0.5293656",
"0.52923596",
"0.5290067",
"0.5287583",
"0.5284399",
"0.5282607",
"0.5277979"
] | 0.0 | -1 |
The main constructor for Payment objects | public Payment(double amountPaid, int method, Timestamp date, int cardDetailsID, int invoiceID){
this.recordID = recordID;
this.amountPaid = amountPaid;
this.method = method;
this.date = date;
this.cardDetailsID = cardDetailsID;
this.invoiceID = invoiceID;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public CashPayment()\n {\n super();\n }",
"public PaymentDetails () {\n\t}",
"public PaymentMethod()\n {\n }",
"public PaymentCard() {\n\t}",
"public VoucherPayment() {\r\n }",
"public Payroll()\r\n\t{\r\n\t\t\r\n\t}",
"public BoletoPaymentRequest() {\n\n }",
"public Merchant() {\n\n\t}",
"public creditPayment(String nm,String expdate,long no,double paymentAmount)\n{\nname=nm;\nexdate=expdate;\ncardnumber=no;\namount = paymentAmount;\n}",
"public HLCPaymentDetails() { }",
"public Merchant() {}",
"public ModelPayment(double payment) {\n this.payment = payment;\n }",
"public CreditCard ()\r\n\t{\r\n\t\t\r\n\t}",
"public Payment2() {\n initComponents();\n }",
"public PaymentTransaction() {\n\t\tsuper(\"PAYMENT_TRANSACTION\", edu.uga.csci4050.group3.jooq.team3.Team3.TEAM3);\n\t}",
"public InvoiceBalance()\n {\n }",
"public Payments() {\n initComponents();\n }",
"public Payments() {\n initComponents();\n }",
"protected Settlement() {\n // empty constructor\n }",
"private PaymentType(String payment) {\n this.payment = payment;\n }",
"public Payment(User to, User from, double cashAmount, String paymentName) {\n this.cashAmount = cashAmount;\n this.to = to;\n this.from = from;\n this.paymentName = paymentName;\n paymentID = rand.nextInt(max - min + 1) + min;\n }",
"public Payment(Amount cost) {\r\n\t\tthis.cost = cost;\r\n\t\tthis.amount = cost;\r\n\t}",
"public SavingsAccount()\n {\n super();\n this.interestRate = DEFAULT_RATE;\n System.out.println(\"Constructor is called.\");\n }",
"public Payment(Amount paidAmount, SaleTotal total) {\r\n this.paidAmount = paidAmount;\r\n this.total = total;\r\n }",
"public FeeAccount ()\n {\n }",
"public Purp() {\n }",
"public MoneyTransfer() {\n }",
"public Bank() {\n\t\tsuper();\n\t}",
"public CuentaDeposito() {\n super();\n }",
"public Checkout() {}",
"public Payment(double actualCost) {\n this.actualCost = actualCost;\n }",
"public payments() {\n initComponents();\n }",
"public BankAcc(){\r\n //uses another constuctor\r\n this(593,2.5,\"Deg\",\"Deg\",\"Deg\");\r\n System.out.println(\"EMpty\");;\r\n }",
"public Currency() {\n // Instances built via this constructor have undefined behavior.\n }",
"public PaymentDetailPojo() {\n }",
"public PaymentmethodRecord() {\n super(Paymentmethod.PAYMENTMETHOD);\n }",
"public FundingDetails() {\n super();\n }",
"public Bank() {\n\n }",
"public Payment(WebDriver driver)\n\t{\n\t\tPageFactory.initElements(driver, this);\n\t}",
"public XxGamMaPaymentReqVOImpl() {\n }",
"public GoldCoin(){\n \tinit();\n }",
"protected MoneyFactory() {\n\t}",
"public PriceBreakdown() {\n }",
"public Bank(){\n this(\"Seneca@York\", 0);\n }",
"Customer() \n\t{\n\t}",
"@Test\n public void purchaseCustomConstructor_isCorrect() throws Exception {\n\n int purchaseId = 41;\n int userId = 99;\n int accountId = 6541;\n double price = 99.99;\n String date = \"02/19/2019\";\n String time = \"12:12\";\n String category = \"test category\";\n String location = \"test location\";\n String comment = \"test comment\";\n\n //Create empty purchase\n Purchase purchase = new Purchase(purchaseId, userId, accountId, price, date, time, category, location, comment);\n\n // Verify Values\n assertEquals(purchaseId, purchase.getPurchaseId());\n assertEquals(userId, purchase.getUserId());\n assertEquals(accountId, purchase.getAccountId());\n assertEquals(price, purchase.getPrice(), 0);\n assertEquals(date, purchase.getDate());\n assertEquals(time, purchase.getTime());\n assertEquals(category, purchase.getCategory());\n assertEquals(location, purchase.getLocation());\n assertEquals(comment, purchase.getComment());\n }",
"protected PrintBill() \r\n\t{/* nothing needed, but this prevents a public no-arg constructor from being created automatically */}",
"public PaymentStatusPoll() {\n }",
"public Loyalty() {}",
"public BankAccount() {\n this(12346, 5.00, \"Default Name\", \"Default Address\", \"default phone\");\n }",
"public dc_wallet() {}",
"private Bank() {\r\n\t\tsuper();\r\n\t\tlogService = new Logger(\"driverName\");\r\n\t\tlogger = new Logger(\"driverName\");\r\n\t\tthis.balance = balance;\r\n\t\tthis.clients = new Client[100];\r\n\t}",
"public PAYMENTS() {\n initComponents();\n }",
"static Sbpayment newInstance() {\n return new DefaultSbpayment();\n }",
"public CustomerNew () {\n\t\tsuper();\n\t}",
"public Pricing()\n\t{\n\t\tprice = INITIALPRICE;\n\t}",
"public PurchaseList() {\n }",
"public pay() {\n initComponents();\n }",
"public PassCost() {\r\n\r\n }",
"public J_Payment() {\n initComponents();\n }",
"protected Betaling()\r\n\t{\r\n\t\t\r\n\t}",
"public PaymentRequest() {\r\n items = new ArrayList();\r\n }",
"public TransferMarket() {\n }",
"public BankAcc(int accNum, double bal, String name, String email, String phone){\r\n System.out.println(\"DONE\");\r\n //can do some validation in the other functions\r\n //not nessacary\r\n setAccNum(accNum);\r\n this.bal=bal;\r\n this.name=name;\r\n this.email=email;\r\n this.phone=phone;\r\n\r\n }",
"public Produto() {}",
"public BrokerAlgo() {}",
"public CreditRating() {\n }",
"public CurrencyConversion() {\n }",
"public Pitonyak_09_02() {\r\n }",
"public SavingsAccount() {\n\t}",
"public Wallet() {\n total_bal = 10;\n }",
"public LaundryCard() {\n\t}",
"public Supermarket()\n {\n }",
"public ReturnCash(){\n\t\t\n\t}",
"public PaymentPage(WebDriver driver) {\n\t\tsuper(driver);\n\t}",
"public Pasien() {\r\n }",
"public Supermarket() {\n }",
"public StudentFee() {\n }",
"public Customer () {\n\t\tsuper();\n\t}",
"@Test\n public void billCustomConstructor_isCorrect() throws Exception {\n\n int billId = 100;\n String billName = \"test Bill\";\n int userId = 101;\n int accountId = 202;\n double billAmount = 300.25;\n String dueDate = \"02/02/2018\";\n int occurrenceRte = 1;\n\n //Create empty bill\n Bill bill = new Bill(billId,userId,accountId,billName,billAmount,dueDate,occurrenceRte);\n\n // Verify Values\n assertEquals(billId, bill.getBillId());\n assertEquals(billName, bill.getBillName());\n assertEquals(userId, bill.getUserId());\n assertEquals(accountId, bill.getAccountId());\n assertEquals(billAmount, bill.getBillAmount(), 0);\n assertEquals(dueDate, bill.getDueDate());\n assertEquals(occurrenceRte, bill.getOccurrenceRte());\n }",
"public Potencial() {\r\n }",
"public LoyaltyCard(String theTitle, String theFirstName, \r\n String theLastName, String street, \r\n String town, String postcode, \r\n String theCardNumber)\r\n {\r\n title = theTitle; \r\n firstName = theFirstName;\r\n lastName = theLastName;\r\n address = new LoyaltyCardAddress(street, town, postcode);\r\n cardNumber = theCardNumber;\r\n points = 0;\r\n }",
"public Order() {\n\t}",
"public Dealer()\n {\n\n\n }",
"public Customer(){}",
"private Payment(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public Supermarket() {\n }",
"public PromoBonusImpl() {\n }",
"Customer() {\n }",
"public AddPurchaseDetail() {\r\n super();\r\n }",
"public Trade() {\n\t}",
"public SavingsAccount() {\n super();\n }",
"private PurchaseDB() {}",
"public BankAccount()\n {\n \t//intializing instance variables\n \t//at the time object creation constuctor executes \n \t\n \taccountHolderName=\"unknow\";\n \taccountBalance=0;\n \t\n }",
"public Product() {\n\t}",
"public Customer() {\n\t}",
"public Customer() {\n\t}",
"public prueba()\r\n {\r\n }",
"@SuppressWarnings(\"unused\")\r\n private Rental() {\r\n }",
"Constructor() {\r\n\t\t \r\n\t }"
] | [
"0.8022714",
"0.8010355",
"0.7987303",
"0.78804547",
"0.78086275",
"0.7555792",
"0.7389275",
"0.7285341",
"0.72687274",
"0.72644866",
"0.7226094",
"0.7175793",
"0.7114416",
"0.71116906",
"0.70313084",
"0.69982266",
"0.69780856",
"0.69780856",
"0.696686",
"0.69442207",
"0.6916467",
"0.691423",
"0.6834103",
"0.68338156",
"0.6823464",
"0.6815182",
"0.6814008",
"0.68058145",
"0.6757102",
"0.6749956",
"0.6698781",
"0.6692589",
"0.66789424",
"0.66765094",
"0.66721106",
"0.66648847",
"0.66645825",
"0.6653237",
"0.66526467",
"0.6647683",
"0.6633201",
"0.6632673",
"0.66268915",
"0.66235864",
"0.6617631",
"0.66004413",
"0.65983635",
"0.65980715",
"0.6592257",
"0.65851915",
"0.65619963",
"0.65601856",
"0.65600985",
"0.6549631",
"0.65479976",
"0.6525363",
"0.6518745",
"0.6504392",
"0.65028554",
"0.6490449",
"0.6478563",
"0.64750326",
"0.64677095",
"0.64505064",
"0.64495355",
"0.64415514",
"0.64388436",
"0.6438391",
"0.6433998",
"0.6428232",
"0.64227515",
"0.64207494",
"0.64183116",
"0.6402452",
"0.63963395",
"0.639296",
"0.63920003",
"0.6384178",
"0.63650846",
"0.6364296",
"0.63557774",
"0.63551176",
"0.6352036",
"0.6350681",
"0.6349218",
"0.63487744",
"0.634658",
"0.6344041",
"0.6336977",
"0.6330189",
"0.6328368",
"0.63253546",
"0.6309351",
"0.62994295",
"0.62986267",
"0.6298139",
"0.6298139",
"0.62975985",
"0.6294523",
"0.62878525"
] | 0.6997921 | 16 |
Returns a number that represents the amount paid | public double getAmountPaid(){
return amountPaid;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"double getPaidAmount();",
"double getPaid();",
"public double getPaid() {\n return paid_;\n }",
"double getUnpaidAmount();",
"public double getPaid() {\n return paid_;\n }",
"public BigDecimal getPaidNum() {\n return paidNum;\n }",
"public double getTotalAmountPaid(){\n\t\tdouble amount = getAmountOfFixedPayments()*no_years*no_payments_yearly;\n\t\tdouble result = Math.round(amount*100.0) / 100.0;\n\t\treturn result;\n\t}",
"public BigDecimal getmPaid() {\n return mPaid;\n }",
"public BigDecimal getPayAmt();",
"public java.math.BigDecimal getAmountPaid () {\n\t\treturn amountPaid;\n\t}",
"public double getAmountPaid() {\r\n\t\treturn amountPaid;\r\n\t}",
"public Amount getAmountPaid() {\n return this.amountPaid;\n }",
"@Override\n public double payment(double amount) {\n return amount * 98 / 100 ;\n }",
"double getMoney();",
"public double pay(double amountPaid,String currency){\n \n saleDTO = sale.createSaleDTO();\n paymentDTO = new PaymentDTO(amountPaid,currency);\n double change = Math.round((paymentDTO.getAmountPaid() - saleDTO.getTotalPrice()) * 100.0) / 100.0;\n\n cashRegister.updateAmountInRegister(amountPaid - change);\n return change;\n\n }",
"int getMoney();",
"public Double amountDueForPayment() {\n DecimalFormat df = new DecimalFormat(\"#.##\");\n int numGroupMembers = AppVariables.currentUser.getGroup().getGroupMembers().size();\n\n // if payment made by current user, should be amount owed\n // which is the payment amount - (payment amount) / #groupmembers\n if (username.equals(AppVariables.currentUser.getUsername())) {\n return Double.valueOf(df.format(amountSpent- amountSpent/numGroupMembers));\n }\n\n return Double.valueOf(df.format(amountSpent/numGroupMembers));\n\n\n }",
"public double getPaymentAmount() {\n\t\tdouble amount = 0.0;\n\t\tString content = \"\";\n\t\t\n\t\tWebElement temp = (new WebDriverWait(driver, waitTime))\n\t\t\t\t.until(ExpectedConditions.presenceOfElementLocated(By.id(\"totalAmt\")));\t\t\n\t\tcontent = temp.findElement(By.xpath(\"span[2]\")).getAttribute(\"innerHTML\");\n\t\tamount = Double.parseDouble(content);\n\t\treturn amount;\n\t}",
"public BigDecimal getCpmPaid() {\n return cpmPaid;\n }",
"public double getPaymentAmount() {\n\t\treturn baseSalary+this.grossSales*this.commissionRate;\r\n\t}",
"public double getTotalPayment() {\n double totalPayment = getMonthlyPayment() * numberOfYears * 12;\n \n return totalPayment;\n }",
"long getAmount();",
"@Override\n public double calculatePay ()\n {\n double commissionPay = this.sales * this.rate / 100;\n return commissionPay;\n }",
"int getMoneyValue();",
"int getMoneyValue();",
"float getAmount();",
"@Override\n public String pay(int amount) {\n return (amount +\" paid with credit/debit card.\");\n }",
"public double calculatePay() {\n\t\treturn 0;\r\n\t}",
"public double dollarTorp()\r\n\t{\r\n\t\treturn getAmount() * 14251.25;\r\n\t}",
"int getAmount();",
"public double getPayment() {\n\t\treturn getNumHours() * getHourlyRates();\n\t}",
"public BigDecimal getCmPaid() {\n return cmPaid;\n }",
"int getBonusMoney();",
"@Override\n\tpublic double getPayment() {\n\t\treturn baseSalary + (this.getGrossSales() * this.getCommissionRate());\n\t}",
"public double getTotalPayments(){return this.total;}",
"public long getAmount();",
"public long getAmount();",
"public static void amountPaid(){\n NewProject.tot_paid = Double.parseDouble(getInput(\"Please enter NEW amount paid to date: \"));\r\n\r\n UpdateData.updatePayment();\r\n updateMenu();\t//Return back to previous menu.\r\n\r\n }",
"public int getTotalAmount();",
"BigDecimal getAmount();",
"public BigDecimal getPayAmount() {\n return payAmount;\n }",
"public double getAmountToPay() {\r\n\t\treturn amountToPay;\r\n\t}",
"public int getMoney() {\n return wallet.getMoney();\n }",
"public String getTotalPayment() {\n return totalPayment;\n }",
"public float getPayableAmount() {\n /**\n * { var_description }.\n */\n float dscnt = NUM3 * coupon;\n /**\n * { item_description }.\n */\n return (getTotalAmount() * (1f - dscnt)) * NUM5;\n }",
"public double getMoney() {\n double wallet = console.promptForDouble(\"PLEASE ENTER SOME MONEY: \");\n return wallet;\n\n }",
"public BigDecimal getEntrustPaid() {\n return entrustPaid;\n }",
"public double getPaymentDue()\n\t{\n\t\tif(this.inProgress())\n\t\t{\n\t\t\tdouble start = ParkingRateUtil.calculateCost(this.clock.getTime()-this.currentTicket.getStartTime());\n\t\t\tdouble payed = ParkingRateUtil.calculateCost(this.currentTicket.getPaymentTime()-this.currentTicket.getStartTime());\n\t\t\tif(this.currentTicket.getPaymentTime() != 0)\n\t\t\t{\n\t\t\t\tif (this.clock.getTime()-this.currentTicket.getPaymentTime()>ParkingRateUtil.EXIT_TIME_LIMIT)\n\t\t\t\t{return start-payed;}\n\t\t\t\treturn payed;\n\t\t\t}\n\t\t\treturn start;\n\t\t}\n\t\treturn 0.0;\n\t}",
"public long getMoney() {\n return money;\n }",
"public BigDecimal getPbackPaid() {\n return pbackPaid;\n }",
"public BigDecimal getPayAmt() {\n\t\treturn payAmt;\n\t}",
"public long calcRemaining(){\n return getGrandTotal() - getTotalPaid();\n }",
"TotalInvoiceAmountType getTotalInvoiceAmount();",
"public double calculateChangeToGive() {\r\n\t\treturn amountPaid - amountToPay;\r\n\t}",
"public double pay(){\n\t\treturn payRate;\n\t}",
"public Amount pay(Amount amountPaid){\n this.amountPaid = amountPaid;\n payment.setAmountPaid(amountPaid);\n \n change = payment.getCalculatedChange();\n \n return change;\n }",
"public int getMoney() {\n \t\treturn money;\n \t}",
"public double getBalanceDue(double paymentMade){\n balanceDue -= paymentMade;\n return balanceDue;\n }",
"@Override \r\n public double getPaymentAmount() \r\n { \r\n return getQuantity() * getPricePerItem(); // calculate total cost\r\n }",
"public int getMoney() {\n return money_;\n }",
"public Long getPayamount() {\n return payamount;\n }",
"private double requestCashPayment(double total) {\n double paid = 0;\n while (paid < total) {\n double entered = ScannerHelper.getDoubleInput(\"Enter amount paid: \", 0);\n paid += entered;\n System.out.printf(\"Accepted $%.2f in cash, Remaining amount to pay: $%.2f\\n\", entered, (total - paid >= 0) ? total - paid : 0);\n }\n return paid;\n }",
"public double getMoney() {\n\t\treturn totalMoney;\n\t}",
"ch.crif_online.www.webservices.crifsoapservice.v1_00.Amount getAmount();",
"public int getMoney()\n {\n return money;\n }",
"public int getMoney() {\n return this.budget;\n }",
"int getNumberPaymentReceipt();",
"public static BigDecimal calcTotalMoney()\n {\n SharedPreferences defaultSP;\n defaultSP = PreferenceManager.getDefaultSharedPreferences(MainActivity.mActivity);\n manualTime = Integer.valueOf(defaultSP.getString(\"moneyMode\", \"4\"));\n boolean plus = PolyApplication.plus;\n PolyApplication app = ((PolyApplication) MainActivity.mActivity.getApplication());\n\n if(!plus)\n {\n\n if (manualTime == 4 && app.user.getMeals() > 0)\n {\n today.setToNow();\n int minutes = (today.hour * 60) + today.minute;\n if (minutes >= 420 && minutes <= 599)\n {\n money = mealWorth[0];\n } else if (minutes >= 600 && minutes <= 1019)\n {\n money = mealWorth[1];\n } else if (minutes >= 1020 && minutes <= 1214)\n {\n money = mealWorth[2];\n } else\n {\n money = mealWorth[3];\n }\n return money.subtract(moneySpent).setScale(2);\n } else if(app.user.getMeals() > 0)\n {\n return mealWorth[manualTime].subtract(moneySpent).setScale(2);\n }\n else\n {\n return new BigDecimal(0.00).subtract(moneySpent).setScale(2);\n }\n }\n else\n {\n return ((PolyApplication) MainActivity.mActivity.getApplication()).user.getPlusDollars().subtract(moneySpent);\n }\n }",
"public BigDecimal getPercentageProfitPLimit();",
"public double getPrincipalAmount(){return this.principal_amount;}",
"public int getMoney() {\n return money_;\n }",
"ch.crif_online.www.webservices.crifsoapservice.v1_00.Amount getCapitalPayed();",
"public double getMoney() { //Not useful for the project but used on the test.\n\t\treturn money;\n\t}",
"public double getMoney() {\n return money_;\n }",
"public BigDecimal getLineNetAmt();",
"public double getMoney() {\n return money_;\n }",
"public double getAmountEarned(){\r\n return getSalary() + getBonus() + getCommission() * getNumSales();\r\n }",
"public int getMoney(){\n\t\treturn money;\n\t}",
"public int getMoney(){\n\t\treturn money;\n\t}",
"public double getUnpaidBalance() \r\n\t{\r\n\t\t\r\n\t\treturn unpaidBalance;\r\n\t\t\r\n\t}",
"public static double getPayment(double r, double n, double p, double f, boolean t)\r\n\t{\t\t\r\n\t\treturn FinanceLib.pmt(r, n, p, f, t);\r\n\t}",
"public double calculatePay() \r\n\t{\r\n\t\treturn (payRate*hoursWorked);\r\n\t}",
"public int getMoney() {\n return money;\n }",
"public int getMoney() {\r\n\t\treturn money;\r\n\t}",
"public int getMoney() {\r\n\t\treturn money;\r\n\t}",
"public Double getTotalBuyMoney() {\r\n return totalBuyMoney;\r\n }",
"public double getCurrentPay() {\n return currentPay;\n }",
"public java.lang.String getExpPaid () {\n\t\treturn expPaid;\n\t}",
"@Override\n public double pay() {\n double payment = super.pay() + (this.commision_rate * this.total_sales);\n this.total_sales = 0;\n return payment;\n }",
"public int getMoney()\n\t{\n\t\treturn money;\n\t}",
"double getTotalProfit();",
"public double getMonthlyPayment() {\n double monthlyInterestRate = annualInterestRate / 1200;\n double monthlyPayment = loanAmount * monthlyInterestRate / (1 - (1 / Math.pow(1 + monthlyInterestRate, numberOfYears * 12)));\n \n return monthlyPayment;\n }",
"@Override \n public double getPaymentAmount() \n { \n return getWeeklySalary(); \n }",
"@Override\r\n\tpublic int getPayCheque() {\n\t\treturn profit+annuelSalary;\r\n\t\t\r\n\t}",
"public java.lang.Long getAmountPaidInCents() {\n return amountPaidInCents;\n }",
"public long getAmountRequested();",
"double purchasePrice();",
"public int getRonPayment(boolean isDealer) {\r\n int output;\r\n if (isDealer) {\r\n output = basicPoints * 6;\r\n } else {\r\n output = basicPoints * 4;\r\n }\r\n \r\n return (int)(100*Math.ceil(output/100.0));\r\n }",
"public double getMoney() {\n return this.money;\n }",
"public double getAmountOfFixedPayments(){\n\t\tdouble amount = (principal_amount * (interest_rate / 100)) / (no_payments_yearly * (1 - Math.pow((1+(interest_rate/100)/no_payments_yearly), -no_years*no_payments_yearly)));\n\t\tdouble result = Math.round(amount * 100.0) / 100.0;\n\t\treturn result;\n\t}"
] | [
"0.8195395",
"0.78005403",
"0.7538518",
"0.7508683",
"0.7502134",
"0.746434",
"0.7344085",
"0.7276772",
"0.72375774",
"0.7184611",
"0.7122953",
"0.7084992",
"0.7041687",
"0.69697493",
"0.694068",
"0.687331",
"0.68631333",
"0.6854825",
"0.6777224",
"0.6761761",
"0.67329204",
"0.6730623",
"0.6690974",
"0.66605264",
"0.66605264",
"0.6654443",
"0.6653751",
"0.66521686",
"0.6643844",
"0.66421217",
"0.6635318",
"0.66199493",
"0.65987587",
"0.65881544",
"0.658286",
"0.6570789",
"0.6570789",
"0.6520086",
"0.6496156",
"0.6490616",
"0.64666843",
"0.64565814",
"0.64333373",
"0.6430487",
"0.64085275",
"0.6399156",
"0.63961816",
"0.63881594",
"0.6386791",
"0.63736093",
"0.6360081",
"0.63590837",
"0.63530624",
"0.6339862",
"0.6338427",
"0.63137347",
"0.63041246",
"0.6299553",
"0.6294595",
"0.6280238",
"0.6264033",
"0.6254978",
"0.6250586",
"0.624276",
"0.6237075",
"0.6231605",
"0.6230063",
"0.6230017",
"0.62273335",
"0.622505",
"0.62240225",
"0.6222245",
"0.6218278",
"0.6211958",
"0.6208582",
"0.6206845",
"0.61908597",
"0.61880165",
"0.61880165",
"0.61839926",
"0.61834496",
"0.61808753",
"0.61796653",
"0.61792195",
"0.61792195",
"0.6178351",
"0.61754614",
"0.6174968",
"0.6174849",
"0.6174073",
"0.6171025",
"0.61551225",
"0.61377317",
"0.61297804",
"0.6126924",
"0.61212295",
"0.6113643",
"0.6108452",
"0.6108179",
"0.6105658"
] | 0.683886 | 18 |
Returns the method used | public int getMethod(){
return method;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getMethod();",
"String getMethod();",
"public String getMethod ()\n {\n return method;\n }",
"public Method getMethod();",
"MethodName getMethod();",
"protected Method getMethod() {\n return method;\n }",
"Method getMethod();",
"Method getMethod();",
"private String getName() {\n return method.getName();\n }",
"String getMethodName();",
"String getMethodName();",
"public Method getMethod () {\n\t\treturn method;\n\t}",
"java.lang.String getMethodName();",
"java.lang.String getMethodName();",
"java.lang.String getMethodName();",
"java.lang.String getMethodName();",
"public Method getMethod() {\n return mMethod;\n }",
"public String getMethod() {\n\t\treturn getParameter(\"method\");\n\t}",
"@Override\n public String getMethod() {\n return METHOD_NAME;\n }",
"public String getMethod() {\n return method;\n }",
"public String getMethod() {\n return method;\n }",
"public String getMethod() {\n return method;\n }",
"@Override\n protected String getMethodName() {\n return suitename() + \"-\" + super.getMethodName();\n }",
"public String getMethod() {\n\n return this.method;\n }",
"public Method getMethod() {\n\t\treturn this.currentAction.getMethod();\n\t}",
"MethodType getMethodType();",
"public String getMethod() {\n\t\treturn method;\n\t}",
"public Method getMethod() {\n return method;\n }",
"public Method getMethod() {\n return method;\n }",
"public Method getMethod() {\n\t\treturn method;\n\t}",
"public java.lang.reflect.Method getMethod()\n {\n return __m_Method;\n }",
"public String getMethod()\n {\n if (averageRating == null) {\n return \"\";\n } else {\n return averageRating.getMethod();\n }\n }",
"public String getMethodName() {\r\n return _methodName;\r\n }",
"public String getMethodName() {\n return LOG_TAG + \":\" + this.getClass().getSimpleName() + \".\" + new Throwable().getStackTrace()[1].getMethodName();\n }",
"public Method method() {\n return method;\n }",
"String getCalled();",
"@Override\n public String getMethodName() {\n return null;\n }",
"public String getMethod() {\n\t\t\treturn method;\n\t\t}",
"public static String getCurrentMethodName(){\n\t\tString s2 = Thread.currentThread().getStackTrace()[2].getMethodName();\n// System.out.println(\"s0=\"+s0+\" s1=\"+s1+\" s2=\"+s2);\n\t\t//s0=getStackTrace s1=getCurrentMethodName s2=run\n\t\treturn s2;\n\t}",
"public String getMethodName() {\n return methodName;\n }",
"public String getMethodName() {\n return methodName;\n }",
"public String getGetMethodName() {\n return m_getMethodName;\n }",
"public String getMethodName() {\n\t\treturn this.methodName;\n\t}",
"public String getMethodName() {\n\t\treturn this.methodName;\n\t}",
"public String getMethodName() {\n\t\treturn methodName;\n\t}",
"public Method getActionMethod() {\n return this.method;\n }",
"Methodsig getMethod();",
"public String methodBase() {\n\t\tString tmp = name;\n\t\ttmp = tmp.replaceFirst(\"^get\", \"\");\n\t\ttmp = tmp.replaceFirst(\"^is\", \"\");\n\t\treturn tmp.substring(0,1).toLowerCase()+tmp.substring(1);\n\t}",
"ClassMember getMethod () { return method; }",
"public String getMethodName() {\n\t\t\treturn methodName;\n\t\t}",
"public String getCurrentMethodName () {\n String currentMethod = getCurrentElement(ElementKind.METHOD);\n if (currentMethod == null) return \"\";\n else return currentMethod;\n }",
"@Override\n\t\tpublic String getMethod() {\n\t\t\treturn null;\n\t\t}",
"public InputMethod getMethod() {\n return method;\n }",
"public Method getTestMethod()\r\n {\r\n return method.getMethod();\r\n }",
"public StrColumn getMethod() {\n return delegate.getColumn(\"method\", DelegatingStrColumn::new);\n }",
"public String toString() {\n\t\treturn methodName;\n\t}",
"public HttpMethod method() {\n return method;\n }",
"public static String getCurrentMethodName() {\n\t\tStackTraceElement stackTraceElements[] = (new Throwable()).getStackTrace();\n\t\tString fullString = stackTraceElements[1].toString();\n\t\tint stringEnd = fullString.indexOf('(');\n\t\tString fullName = fullString.substring(0, stringEnd);\n\t\tint start = fullName.lastIndexOf('.') + 1;\n\t\tString methodName = fullName.substring(start);\n\n\t\treturn methodName;\n\t}",
"public MethodProxy getMethod() {\n\t\treturn null;\n\t}",
"public HttpMethod method() {\n\t\treturn method;\n\t}",
"public abstract jq_Method getDefiningMethod();",
"public HttpMethod getMethod()\r\n/* 29: */ {\r\n/* 30:56 */ return this.method;\r\n/* 31: */ }",
"private String getGetMethodName() {\n assert name != null;\n if (field != null && (field.getType() == Boolean.class\n || \"boolean\".equals(field.getType().getName()))) {\n return \"is\" + upperFirstChar(name);\n }\n return \"get\" + upperFirstChar(name);\n }",
"private static String getCallingMethodInfo()\r\n\t{\r\n\t\tThrowable fakeException = new Throwable();\r\n\t\tStackTraceElement[] stackTrace = fakeException.getStackTrace();\r\n\r\n\t\tif (stackTrace != null && stackTrace.length >= 2)\r\n\t\t{\r\n\t\t\tStackTraceElement s = stackTrace[2];\r\n\t\t\tif (s != null)\r\n\t\t\t{\r\n\t\t\t\treturn s.getFileName() + \"(\" + s.getMethodName() + \":\" + s.getLineNumber() + \"):\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}",
"String getCaller();",
"@Nullable\n abstract Method getMethod();",
"@JsonIgnore\n public java.lang.reflect.Method getMethod() {\n return this.method;\n }",
"public String getName() {\n return nameRule.getMethodName();\n }",
"public Method getLoadedMethod() {\n return method;\n }",
"public Param getProcessingMethod();",
"public HttpMethod getMethod()\r\n/* 44: */ {\r\n/* 45: 78 */ return HttpMethod.valueOf(this.servletRequest.getMethod());\r\n/* 46: */ }",
"public abstract RlcpMethod getMethod();",
"public int getMethodValue() {\n return method_;\n }",
"@Override\n\t\tpublic ITestNGMethod getMethod() {\n\t\t\treturn null;\n\t\t}",
"public HttpMethod getMethod() {\n return method;\n }",
"public java.lang.String getMethodName() {\r\n\t\t\tjava.lang.Object ref = methodName_;\r\n\t\t\tif (ref instanceof java.lang.String) {\r\n\t\t\t\treturn (java.lang.String) ref;\r\n\t\t\t} else {\r\n\t\t\t\tcom.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\r\n\t\t\t\tjava.lang.String s = bs.toStringUtf8();\r\n\t\t\t\tif (bs.isValidUtf8()) {\r\n\t\t\t\t\tmethodName_ = s;\r\n\t\t\t\t}\r\n\t\t\t\treturn s;\r\n\t\t\t}\r\n\t\t}",
"public java.lang.String getMethodName() {\r\n\t\t\t\tjava.lang.Object ref = methodName_;\r\n\t\t\t\tif (!(ref instanceof java.lang.String)) {\r\n\t\t\t\t\tjava.lang.String s = ((com.google.protobuf.ByteString) ref)\r\n\t\t\t\t\t\t\t.toStringUtf8();\r\n\t\t\t\t\tmethodName_ = s;\r\n\t\t\t\t\treturn s;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn (java.lang.String) ref;\r\n\t\t\t\t}\r\n\t\t\t}",
"public String getMethod(String request) {\n return request.split(\" \")[0];\n }",
"public static String getCurrentMethodName() {\n Exception e = new Exception();\n StackTraceElement trace = e.fillInStackTrace().getStackTrace()[1];\n String name = trace.getMethodName();\n String className = trace.getClassName();\n int line = trace.getLineNumber();\n return \"[CLASS:\" + className + \" - METHOD:\" + name + \" LINE:\" + line + \"]\";\n }",
"@Nullable @NotEmpty public String getMethod() {\n return StringSupport.trimOrNull(method);\n }",
"@Override\n public int getMethod() {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"b89def63-26ff-4cb0-98cc-9b6cee3e0e29\");\n return method;\n }",
"ResourceMethod getMethodType();",
"public HTTPRequestMethod getMethod();",
"public String getRequestMethod(){\n return this.requestMethod;\n }",
"private String parseMethod() {\n\t\tString[] splitted = command.split(\":\", 2);\n\t\tif (splitted.length == 1) {\n\t\t\treturn splitted[0];\n\t\t} else {\n\t\t\treturn splitted[1] + splitted[0].substring(0, 1).toUpperCase() + splitted[0].substring(1);\n\t\t}\n\t}",
"public String isMethod() {\n return isNameExpr;\n }",
"public AnalysisMethod getAnalysisMethod() {\n return method;\n }",
"public java.lang.Long getOpcmethod() {\n\t\treturn getValue(test.generated.pg_catalog.tables.PgOpclass.PG_OPCLASS.OPCMETHOD);\n\t}",
"public SubmitMethod getLastMethod() {\n return lastMethod_;\n }",
"public static String currentMethodName() {\n String fm = CURRENT_TEST.get();\n if (fm != null) {\n return fm;\n } else {\n return \"<no current test>\";\n }\n }",
"public String getCheckMethod() {\r\n return checkMethod;\r\n }",
"public int getMethodValue() {\n return method_;\n }",
"public java.lang.String getMethodName() {\n java.lang.Object ref = methodName_;\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 methodName_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getMethodName() {\n java.lang.Object ref = methodName_;\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 methodName_ = s;\n }\n return s;\n }\n }",
"public int getHighestMethod() {\n\t\treturn HighestMethod;\n\t}",
"public java.lang.String getMethodName() {\n java.lang.Object ref = methodName_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n methodName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getMethodName() {\n java.lang.Object ref = methodName_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n methodName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"protected final MethodModel methodFor( MethodDescriptor desc ) {\t\t\t\t\n\t\treturn context.methodFor( desc );\n\t}",
"public String getRequestMethod()\n {\n return requestMethod;\n }",
"protected ResourceMethod getMethod( int theMethodIndex ) {\r\n\t\tConditions.checkParameter( theMethodIndex >= 0 && theMethodIndex < methods.length, \"theMethodIndex\", \"The specific method index is not within range.\" );\r\n\t\t\r\n\t\treturn methods[ theMethodIndex ];\r\n\t}"
] | [
"0.80037767",
"0.80037767",
"0.7727529",
"0.76733625",
"0.75900507",
"0.7525846",
"0.752241",
"0.752241",
"0.7490081",
"0.7483931",
"0.7483931",
"0.7425753",
"0.7411579",
"0.7411579",
"0.7411579",
"0.7411579",
"0.7400076",
"0.7368733",
"0.736167",
"0.734984",
"0.734984",
"0.734984",
"0.7345279",
"0.7331722",
"0.7323698",
"0.7306705",
"0.7300693",
"0.72925574",
"0.72925574",
"0.7288113",
"0.7286607",
"0.72161734",
"0.7210508",
"0.72098154",
"0.7207882",
"0.71671563",
"0.71436036",
"0.7137393",
"0.7097577",
"0.70907885",
"0.70907885",
"0.70655864",
"0.70572996",
"0.70572996",
"0.69556874",
"0.6929475",
"0.6902044",
"0.68986577",
"0.68931085",
"0.68197805",
"0.6797949",
"0.6774591",
"0.67573595",
"0.67558205",
"0.66922957",
"0.6672923",
"0.6632453",
"0.66112167",
"0.6609785",
"0.6605908",
"0.65926975",
"0.65892047",
"0.65881723",
"0.65755796",
"0.65490925",
"0.65439826",
"0.6536258",
"0.6529432",
"0.6521588",
"0.65205604",
"0.64939374",
"0.64171034",
"0.6409217",
"0.6403132",
"0.63940644",
"0.63907546",
"0.63884586",
"0.6373469",
"0.6366633",
"0.63432217",
"0.6341918",
"0.6341171",
"0.63344246",
"0.6333949",
"0.632211",
"0.6321716",
"0.63182527",
"0.6308408",
"0.63067013",
"0.630645",
"0.6295586",
"0.62947947",
"0.6292644",
"0.6292644",
"0.6287122",
"0.6269885",
"0.6269885",
"0.6242774",
"0.6230106",
"0.62278765"
] | 0.7617951 | 4 |
Returns the date when payment was made | public Timestamp getDate(){
return date;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Date getPAYMENT_DATE() {\r\n return PAYMENT_DATE;\r\n }",
"public Date getPAYMENT_DATE() {\r\n return PAYMENT_DATE;\r\n }",
"@Override\n\tpublic java.util.Date getPaymentDate() {\n\t\treturn _esfShooterAffiliationChrono.getPaymentDate();\n\t}",
"public String getReturnDate();",
"public String getLastPaymentDate() {\n\t\treturn stateEqualMasterDao.getElementValueList(\"PAYMENT_DATE\").get(0);\n\t}",
"public Date getPayDate() {\n\t\treturn payDate;\n\t}",
"public java.util.Date getPaymentreceiptdate () {\r\n\t\treturn paymentreceiptdate;\r\n\t}",
"private void calculatePaymentDate() {\n\t\t\tBmoReqPayType bmoReqPayType = (BmoReqPayType)reqPayTypeListBox.getSelectedBmObject();\n\t\t\tif (bmoReqPayType == null && bmoRequisition.getReqPayTypeId().toInteger() > 0) {\n\t\t\t\tbmoReqPayType = bmoRequisition.getBmoReqPayType();\n\t\t\t}\n\t\t\tif (bmoReqPayType != null) {\n\t\t\t\tif (!deliveryDateBox.getTextBox().getValue().equals(\"\")) {\n\t\t\t\t\tDate dueDate = DateTimeFormat.getFormat(getUiParams().getSFParams().getDateFormat()).parse(deliveryDateBox.getTextBox().getValue());\n\t\t\t\t\tCalendarUtil.addDaysToDate(dueDate, bmoReqPayType.getDays().toInteger());\n\t\t\t\t\tpaymentDateBox.getDatePicker().setValue(dueDate);\n\t\t\t\t\tpaymentDateBox.getTextBox().setValue(GwtUtil.dateToString(dueDate, getSFParams().getDateFormat()));\n\t\t\t\t}\n\t\t\t} else reqPayTypeListBox.setSelectedId(\"-1\");\t\t\t\t\n\t\t}",
"public String getIncomingPaymentDate() {\n return incomingPaymentDate;\n }",
"public Date getPaymentTime() {\n\t\treturn paymentTime;\n\t}",
"Date getDueDate();",
"Date getDueDate();",
"public String getPaymentday() {\n return paymentday;\n }",
"java.lang.String getOrderDate();",
"public Date getCheckoutDate() {\n return checkoutDate;\n }",
"public String getReturningDate() {\r\n return returningDate;\r\n }",
"Date getInvoicedDate();",
"public java.util.Date getPaidDate () {\n\t\treturn paidDate;\n\t}",
"public Date getTransactrateDate() {\n return transactrateDate;\n }",
"public Date getDate() {\n return order.getDate();\n }",
"Date getCreateDate();",
"Date getCreateDate();",
"public Date getPaidTime() {\n return paidTime;\n }",
"public String getPayoutDate() {\n return payoutDate;\n }",
"public Date getPayTime() {\n return payTime;\n }",
"public Date getPayTime() {\n return payTime;\n }",
"public String Get_date() \n {\n \n return date;\n }",
"public String getReceivalDate(){\n\t\treturn this.receivalDate;\n\t}",
"LocalDate getCheckInDate();",
"@Override\r\n\tpublic long getPaidDateTime() {\n\t\treturn 0;\r\n\t}",
"public Date getPaySlipDate() {\n return paySlipDate;\n }",
"public java.util.Date getSignDate() {\n\t\treturn _tempNoTiceShipMessage.getSignDate();\n\t}",
"java.lang.String getDate();",
"Date getDate();",
"Date getDate();",
"Date getDate();",
"Date getCheckedOutDate();",
"public Date getDateOfPurchase() {\n return dateOfPurchase;\n }",
"Date getCheckedOut();",
"Date getDateCreated();",
"public Date getCreateDate();",
"public Date getCreateDate();",
"public Date getCreateDate();",
"protected Date getReturnDate() \t{ return this.returnDate; }",
"public LocalDate getDateOfPurchase() {\n return dateOfPurchase;\n }",
"private String getDate()\r\n\t{\r\n\t\tCalendar cal = Calendar.getInstance();\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\");\r\n\t\treturn sdf.format(cal.getTime());\r\n\t}",
"public Date getDueDate() {\n\t\treturn date; //changed DaTe to date\r\n\t}",
"public LocalDate getDate() {\r\n\t\treturn loanDate;\r\n\t}",
"long getSettlementDate();",
"public Timestamp getDateConfirm() {\n\t\treturn (Timestamp) get_Value(\"DateConfirm\");\n\t}",
"long getTradeDate();",
"public Date getCommencDate() {\n return commencDate;\n }",
"public String getPurchaseDate()\n {\n return purchaseDate;\n }",
"Date getRequestedAt();",
"public Date getDebitStartDate() {\n return debitStartDate;\n }",
"public Date getDate() {\n if ( expiryDate.isSIPDate() ) {\n Calendar c=( (SIPDate)expiryDate ).getJavaCal();\n return c.getTime();\n }\n else return null; \n }",
"public Date getDateInvoice() {\n return dateInvoice;\n }",
"public String getDate()\r\n\t{\r\n\t\treturn date;\r\n\t}",
"public String getDate()\r\n\t{\r\n\t\treturn date;\r\n\t}",
"public String getPurchaseDate() {\n return purchaseDate;\n }",
"public String getDueDate()\r\n {\r\n return dueDate;\r\n }",
"com.google.type.Date getAcquireDate();",
"public Date getWishPaymentTime() {\n return wishPaymentTime;\n }",
"public int getDate() {\n return date ;\n }",
"public Date getMATURITY_ENTRY_POSTED_DATE() {\r\n return MATURITY_ENTRY_POSTED_DATE;\r\n }",
"long getDate() { return (act != null ? act.getDate() : 0); }",
"Date getCreatedDate();",
"@Override\n\tpublic java.util.Date getCreateDate() {\n\t\treturn _candidate.getCreateDate();\n\t}",
"String getDate();",
"String getDate();",
"LocalDate getDate();",
"public String getCurrentDate() {\n return createdDate;\n }",
"public String getDate()\n\t\t{\n\t\t\treturn date;\n\t\t}",
"public Date getdate() {\n\t\treturn new Date(date.getTime());\n\t}",
"public Date getRecdate() {\n return recdate;\n }",
"public String getDate() {\r\n return date;\r\n }",
"public int getTranDate()\n\t{\n\t\treturn tranDate;\n\t}",
"public String getReturnDate() {\n\t\treturn returnDateElement.getAttribute(\"value\");\n\t}",
"@FXML\r\n\tString getDate() {\r\n\t\t\tLocalDate creditCardExpiryDate = dpCreditCardExpiryDate.getValue();\r\n\t\t\tDateTimeFormatter formattedExpiryDate = DateTimeFormatter.ofPattern(\"yyyy-MM-dd\");\r\n\t\t\treturn formattedExpiryDate.format(creditCardExpiryDate);\r\n\t}",
"public int getDate() {\n return date;\n }",
"public int getDate() {\n return date;\n }",
"String getCoverageExpirationDate(Record inputRecord);",
"@Override\n\tpublic Date getCreateDate() {\n\t\treturn model.getCreateDate();\n\t}",
"@Override\n\tpublic Date getCreateDate() {\n\t\treturn model.getCreateDate();\n\t}",
"@Override\n\tpublic Date getCreateDate() {\n\t\treturn model.getCreateDate();\n\t}",
"public static String getDate() {\n return getDate(System.currentTimeMillis());\n }",
"public DateInfo getDate() {\r\n\t\treturn new DateInfo(super.getDate());\r\n\t\t//return new DateInfo(maturityDate);\r\n\t}",
"public Date getDate_of_admission() {\r\n return date_of_admission;\r\n }",
"public String getDate() {\n return date;\n }",
"public Date getTransdate() {\n\t\treturn transdate;\n\t}",
"public Timestamp getPurchaseDate() {\n return purchaseDate;\n }",
"public String getDate() {\r\n\t\treturn date;\r\n\t}",
"public String getDate(){\n\t\t\n\t\treturn this.date;\n\t}",
"@Override\n public java.util.Date getCreateDate() {\n return _partido.getCreateDate();\n }",
"public void setPaymentDate( Date paymentDate ) {\n this.paymentDate = paymentDate;\n }",
"public String getDate() {\n return date;\n }",
"public String getDate() {\n return date;\n }",
"public String getDate() {\n return date;\n }",
"public String getDate() {\n return date;\n }",
"public String getDate() {\n return date;\n }",
"public Calendar getReturnDate()\n {\n /*New Calendar for Return Date*/\n Calendar dueDate = Calendar.getInstance();\n\n /*Month is Current Month*/\n dueDate.set(today.MONTH, today.get(today.MONTH));\n /*Year is Current Year*/\n dueDate.set(today.YEAR, today.get(today.YEAR));\n /*Due Date is 21 Days Later*/\n dueDate.set(today.DATE, today.get(today.DATE + 21));\n\n return dueDate;\n }"
] | [
"0.77218133",
"0.77218133",
"0.75104433",
"0.7151166",
"0.7147799",
"0.7138441",
"0.7128706",
"0.7108933",
"0.7091059",
"0.70870423",
"0.698439",
"0.698439",
"0.6862222",
"0.6837165",
"0.6779182",
"0.6746673",
"0.6720037",
"0.66754293",
"0.6649265",
"0.6639368",
"0.6613838",
"0.6613838",
"0.65797144",
"0.6572438",
"0.65677357",
"0.65677357",
"0.6564606",
"0.65533954",
"0.6550732",
"0.65294707",
"0.64990896",
"0.6470955",
"0.64682156",
"0.64614725",
"0.64614725",
"0.64614725",
"0.64586556",
"0.64442074",
"0.64290017",
"0.64198095",
"0.64192104",
"0.64192104",
"0.64192104",
"0.6419043",
"0.6413644",
"0.63914424",
"0.6384573",
"0.63794905",
"0.6374524",
"0.63642514",
"0.6363015",
"0.6350951",
"0.6350014",
"0.63378775",
"0.63375044",
"0.63301593",
"0.6318776",
"0.6313643",
"0.6313643",
"0.6307248",
"0.63005173",
"0.6298898",
"0.6283968",
"0.62670046",
"0.6260872",
"0.62539244",
"0.624864",
"0.6240534",
"0.6238072",
"0.6238072",
"0.62308514",
"0.6230112",
"0.6225952",
"0.62218034",
"0.62212855",
"0.6218265",
"0.6217901",
"0.62147397",
"0.62125736",
"0.6210691",
"0.6210691",
"0.6209502",
"0.6206376",
"0.6206376",
"0.6206376",
"0.62051535",
"0.62020296",
"0.62018913",
"0.6199447",
"0.61891377",
"0.61871815",
"0.6185247",
"0.6181581",
"0.61794204",
"0.6172486",
"0.6170307",
"0.6170307",
"0.6170307",
"0.6170307",
"0.6170307",
"0.6165386"
] | 0.0 | -1 |
Returns the id of the card used for payment | public int getCardDetailsID(){
return cardDetailsID;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Long getCardId() {\r\n return cardId;\r\n }",
"public int getId() {\n//\t\tif (!this.isCard())\n//\t\t\treturn 0;\n\t\treturn id;\n\t}",
"public String getIdCard() {\n return idCard;\n }",
"public String getIdCard() {\n\t\treturn idCard;\n\t}",
"public int getCardID() {\n return cardID;\n }",
"public String getIdCard() {\r\n return idCard;\r\n }",
"public String getIdcard() {\n return idcard;\n }",
"public String getIdcard() {\r\n return idcard;\r\n }",
"public String getIdcard() {\r\n return idcard;\r\n }",
"public String getIdcard() {\r\n return idcard;\r\n }",
"public String getIdCardNo() {\n return idCardNo;\n }",
"public String getIdCardNo() {\n\t\treturn idCardNo;\n\t}",
"public int getC_Payment_ID();",
"public java.lang.String getCardID() {\r\n return localCardID;\r\n }",
"public String getUserCardId() {\n return userCardId;\n }",
"public String getPaymentIdByEncryptedString() {\n return commonPaymentServiceBaseUrl + \"/pis/payment/{payment-id}\";\n }",
"public int getC_Payment_ID() {\n\t\tInteger ii = (Integer) get_Value(\"C_Payment_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}",
"public String getCardPk() {\r\n return (String) getAttributeInternal(CARDPK);\r\n }",
"public java.lang.String getIDCardNo() {\r\n return localIDCardNo;\r\n }",
"public java.lang.String getIDCardNo() {\r\n return localIDCardNo;\r\n }",
"public Long getShoppingCardId() {\n return shoppingCardId;\n }",
"public static String aPaymentId() {\n return \"123456\";\n }",
"public String m18472f() {\n return this.cardId;\n }",
"public long getLoyaltyCardId() {\n return loyaltyCardId;\n }",
"Card getCard(UUID cardId);",
"public int getCardNumber() {\n return cardNumber;\n }",
"public String getIdentityCard() {\n return identityCard;\n }",
"public String getCardNumber() {\n return this.account;\n }",
"public int[] getPaymentCardNumber() {\n\t\treturn paymentCardNumber;\n\t}",
"public java.lang.String getCardNo() {\r\n return localCardNo;\r\n }",
"public java.lang.String getCardNo() {\r\n return localCardNo;\r\n }",
"public String getCardNumber()\n {\n return cardNumber;\n }",
"public String getDevCardID() {\n return DevCardID;\n }",
"CarPaymentMethod creditCardNumber(String cardNumber);",
"String getReceiptId();",
"public String getCardNumber()\r\n {\r\n return cardNumber;\r\n }",
"public String getCardNo() {\n return cardNo;\n }",
"@Test\n public void testGetCardID() {\n DevCard devCard = new DevCard(cost, level, color, victoryPoints, productionPower);\n String s = devCard.getCardID();\n }",
"public String getCardNumber() {\n return cardNumber;\n }",
"public String getCardNo() {\n\t\treturn cardNo;\n\t}",
"protected String getID(){\n sharedPref = getSharedPreferences(AppCSTR.PREF_NAME, Context.MODE_PRIVATE);\n //Log.d(\"ID\", sharedPref.getString(\"id\", null));\n return sharedPref.getString(AppCSTR.ACCOUNT_ID, null);\n }",
"public String getCardCode() {\n\t\t\treturn cardCode;\n\t\t}",
"public String getCardNumber() {\n\t\treturn cardNumber;\n\t}",
"public int CCID() {\n\t\treturn this.creditCardIDNum;\n\t}",
"public int deleteCard() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\treturn CreditCardDA.deleteCard(id);\r\n\t}",
"public String getIdCardExpiration() {\n\t\treturn idCardExpiration;\n\t}",
"public double getCardNumber() {\n\t\treturn cardNumber;\n\t}",
"public int getCreditCardNumber() {\n return creditCardNumber;\n }",
"public java.lang.String getCardSerNo() {\r\n return localCardSerNo;\r\n }",
"String getAccountID();",
"String getAccountID();",
"public void setIdcard(String idcard) {\r\n this.idcard = idcard;\r\n }",
"public String getAgentidcard() {\r\n\t\treturn agentidcard;\r\n\t}",
"@ApiModelProperty(value = \"Unique identifier for this stored card\")\r\n public Integer getCustomerProfileCreditCardId() {\r\n return customerProfileCreditCardId;\r\n }",
"String getTransactionID();",
"public Long getPayId() {\r\n return payId;\r\n }",
"Long getCurrencyId();",
"public int getC_Currency_ID();",
"public int getC_BankAccount_ID();",
"@NotNull\n @Override\n public final String getUniqueID() {\n return \"charge\";\n }",
"@ZAttr(id=1)\n public String getId() {\n return getAttr(Provisioning.A_zimbraId, null);\n }",
"int getMoneyID();",
"int getMoneyID();",
"int getMoneyID();",
"String getTheirPartyId();",
"public int getCardSlot() {\n return cardSlot;\n }",
"public int getNumber(){return cardNumber;}",
"public int getNumber(){\n return cardNumber;\n }",
"public String getMerchantNo();",
"public Integer getCardtype() {\n return cardtype;\n }",
"@ApiModelProperty(required = true, value = \"internal domestic payment order identifier\")\n public String getId() {\n return id;\n }",
"public int getCardBillDepositId(UUID cardId, YearMonth billDate) throws BankException {\n logger.warning(\"This account does not support this feature\");\n throw new BankException(\"This account does not support this feature\");\n }",
"private String getCardNumber() {\n try {\n String cardNumberWithoutSpaces = cardNumber.getAttribute(\"value\").replaceAll(\" \", \"\");\n int cardLength = cardNumberWithoutSpaces.length();\n return cardNumberWithoutSpaces.substring(cardLength - 4, cardLength);\n }\n catch (Exception ex) {\n // no action\n }\n return null;\n }",
"public void setIdCard(String idCard) {\n\t\tthis.idCard = idCard;\n\t}",
"long getCaptureFestivalId();",
"public int getValue() {\n\t\tif (!this.isCard()) {\n\t\t\tSystem.out.println(\"Error! \" + id + \" isn't a card!\");\n\t\t\treturn 0;\n\t\t} else if (id % 13 != 0)\n\t\t\treturn id % 13;\n\t\telse\n\t\t\treturn 13;\n\t}",
"public String getCardIdInfo(String pCardNumber){\n \n TypedQuery<Long> getCardIdQuery = em.createQuery(\"SELECT c.cardId FROM Cards c WHERE c.cardNumber = :vCardNumber \", Long.class);\n getCardIdQuery.setParameter(\"vCardNumber\", pCardNumber);\n // Long cardId = getCardIdQuery.getSingleResult();\n Long cardId = 0l;\n List<Long> results = getCardIdQuery.getResultList();\n if(!results.isEmpty()){\n \n cardId = results.get(0);\n }\n TypedQuery<BigInteger> getCustomerIdQuery = em.createQuery(\"SELECT c.customerId FROM Cards c WHERE c.cardNumber = :vCardNumber \", BigInteger.class);\n getCustomerIdQuery.setParameter(\"vCardNumber\", pCardNumber);\n // BigInteger customerId = getCustomerIdQuery.getSingleResult();\n BigInteger customerId = BigInteger.valueOf(0);\n List<BigInteger> results1 = getCustomerIdQuery.getResultList();\n if(!results1.isEmpty()){\n \n customerId = results1.get(0);\n }\n \n String cardIdInfo = cardId + \"/\" + customerId;\n \n return cardIdInfo;\n }",
"public int getActiveId(){\n if (this.id == -1){\n //if id is not set which it should be but in the case it isn't grab from shared preferences.\n //check if the shared preferences even has a deck id to begin with\n this.id = this.sharedPreferences.getInt(Preferences.ACTIVE_DECK_ID, -1);\n return this.id;\n }\n return this.id;\n }",
"public int getCardType() {\n\t\t\treturn cardType;\n\t\t}",
"public int getCardBillExpenditureId(UUID cardId, YearMonth billDate) throws BankException {\n logger.warning(\"This account does not support this feature\");\n throw new BankException(\"This account does not support this feature\");\n }",
"public void setIdcard(String idcard) {\n\t\tthis.idcard = idcard;\n\t}",
"public String getCurrencyid() {\n return currencyid;\n }",
"public Integer getCreditid() {\n return creditid;\n }",
"public void setIdCardNo(String idCardNo) {\n this.idCardNo = idCardNo;\n }",
"public void setCardId(Long cardId) {\r\n this.cardId = cardId;\r\n }",
"String getCustomerID();",
"com.cantor.drop.aggregator.model.CFTrade.SecurityIdType getSecIdType();",
"int getNumberPaymentReceipt();",
"String getBillingAccountTermId();",
"public Long getNetworkCard() {\n return this.NetworkCard;\n }",
"java.lang.String getFortId();",
"@Override\n\tpublic java.lang.String getCard() {\n\t\treturn _esfShooterAffiliationChrono.getCard();\n\t}",
"public java.lang.Long getCardTransno () {\r\n\t\treturn cardTransno;\r\n\t}",
"public String getSCardNo() {\n return sCardNo;\n }",
"String getMspId();",
"public String getCartId()\n\t{\n\t\treturn getCartId( getSession().getSessionContext() );\n\t}",
"protected String getCourseID(){\n sharedPref = getSharedPreferences(AppCSTR.PREF_NAME, Context.MODE_PRIVATE);\n //Log.d(\"ID\", sharedPref.getString(\"id\", null));\n return sharedPref.getString(AppCSTR.ACCOUNT_COURSE, null);\n }",
"java.lang.String getSignatureProviderId();",
"String getIdNumber();",
"String getCreatorId();"
] | [
"0.76781934",
"0.74926805",
"0.7460837",
"0.74602157",
"0.7453622",
"0.74407804",
"0.7405226",
"0.7357569",
"0.7357569",
"0.7357569",
"0.7281959",
"0.7266028",
"0.72184527",
"0.7197861",
"0.7105637",
"0.6793052",
"0.6773832",
"0.6740446",
"0.6739623",
"0.6739623",
"0.6710789",
"0.6688127",
"0.66689646",
"0.66152203",
"0.66000557",
"0.65671045",
"0.6508262",
"0.6475899",
"0.63686323",
"0.6366097",
"0.6366097",
"0.63620216",
"0.6319877",
"0.6298218",
"0.62903917",
"0.62837017",
"0.6281709",
"0.62704957",
"0.6253339",
"0.62110347",
"0.6176939",
"0.6151731",
"0.61311203",
"0.61080337",
"0.61072993",
"0.61002874",
"0.60926056",
"0.6087922",
"0.6063891",
"0.60562265",
"0.60562265",
"0.6011664",
"0.5999925",
"0.597446",
"0.5973191",
"0.5969185",
"0.594416",
"0.5937678",
"0.5926359",
"0.59085995",
"0.5884063",
"0.5852437",
"0.5852437",
"0.5852437",
"0.58515203",
"0.5836187",
"0.5835246",
"0.58309156",
"0.5815896",
"0.5803332",
"0.579477",
"0.57763666",
"0.57690054",
"0.57554793",
"0.5750491",
"0.5741617",
"0.57395035",
"0.57348555",
"0.57299834",
"0.5727298",
"0.5719877",
"0.57176095",
"0.5709853",
"0.5702982",
"0.5698688",
"0.5690969",
"0.56855553",
"0.5680662",
"0.5679337",
"0.5667198",
"0.5663833",
"0.5662057",
"0.56566775",
"0.56560457",
"0.5654204",
"0.5652802",
"0.5651721",
"0.5651561",
"0.5648724",
"0.56458795"
] | 0.6701116 | 21 |
Returns the id of the invoice | public int getInvoiceID(){
return invoiceID;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Long getInvoiceId();",
"public int getC_Invoice_ID();",
"public int getUlIdInvoInvoice()\r\n {\r\n return this._ulIdInvoInvoice;\r\n }",
"public int getInvoiceNumber() {\n return invoiceNumber;\n }",
"public int getInvoiceNumber() {\n return invoiceNumber;\n }",
"public java.lang.String getInvoiceNo () {\n\t\treturn invoiceNo;\n\t}",
"Invoice getById(int invoiceId);",
"public Guid getInvoiceRecipientId() {\r\n return invoiceRecipientId;\r\n }",
"public String getInvoice() {\n return invoice;\n }",
"public Invoice findById(long id);",
"public String getInvoiceNumber() {\n return invoiceNumber;\n }",
"public java.lang.String getInvoice() {\r\n return invoice;\r\n }",
"String getReceiptId();",
"public Integer getInvoiceDetailId() {\r\n return this.invoiceDetailId;\r\n }",
"void setInvoiceId(Long invoiceId);",
"public String getInoId();",
"Diadoc.Api.Proto.Recognition.RecognitionProtos.RecognizedInvoice getInvoice();",
"@RequestMapping(value = \"/{id}\", method = RequestMethod.GET)\n public Invoice getInvoiceById(@PathVariable int id) {\n return DatabaseInvoicePostgre.getInvoiceById(id);\n }",
"public java.lang.String getInvoiceTemplateId() {\n return invoiceTemplateId;\n }",
"public Diadoc.Api.Proto.Recognition.RecognitionProtos.RecognizedInvoice getInvoice() {\n if (invoiceBuilder_ == null) {\n return invoice_;\n } else {\n return invoiceBuilder_.getMessage();\n }\n }",
"public Invoice getInvoice() {\n return invoice;\n }",
"public int getID(OrderItem oi){\n int id;\n id=findID(oi);\n return id;\n }",
"private Integer obtainWarehouseId(Invoice invoice) {\r\n\t\ttry {\r\n\t\t\tIManagerBean invoiceDetailBean = BeanManager.getManagerBean(InvoiceDetail.class);\r\n\t\t\tCriteria criteria = new Criteria();\r\n\t\t\tcriteria.addEqualExpression(invoiceDetailBean.getFieldName(IFinanceAlias.INVOICE_DETAIL_INVOICE_ID), invoice.getId());\r\n\t\t\tcriteria.addEqualExpression(invoiceDetailBean.getFieldName(IFinanceAlias.INVOICE_DETAIL_SOURCE), InvoiceSource.DIRECT_PURCHASE);\r\n\t\t\tIterator iter = invoiceDetailBean.getList(criteria, 0, 1).iterator();\r\n\t\t\tIncomeDetail incomeDetail = null;\r\n\t\t\tif(iter.hasNext()){\r\n\t\t\t\tInvoiceDetail invoiceDetail = (InvoiceDetail)iter.next();\r\n\t\t\t\tincomeDetail = obtainIncomeDetail(invoiceDetail.getDeliveryDetail());\r\n\t\t\t}else{\r\n\t\t\t\tcriteria = new Criteria();\r\n\t\t\t\tcriteria.addEqualExpression(invoiceDetailBean.getFieldName(IFinanceAlias.INVOICE_DETAIL_INVOICE_ID), invoice.getId());\r\n\t\t\t\titer = invoiceDetailBean.getList(criteria, 0, 1).iterator();\r\n\t\t\t\tif(iter.hasNext()){\r\n\t\t\t\t\tInvoiceDetail invoiceDetail = (InvoiceDetail)iter.next();\r\n\t\t\t\t\tincomeDetail = obtainIncomeDetail(invoiceDetail.getDeliveryDetail());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(incomeDetail != null){\r\n\t\t\t\treturn incomeDetail.getWarehouse().getId();\r\n\t\t\t}\r\n\t\t} catch (ManagerBeanException e) {\r\n\t\t\tLOGGER.log(Level.SEVERE, \"Error obtaining warehouse for invoice with id= \" + invoice.getId(), e);\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public Diadoc.Api.Proto.Recognition.RecognitionProtos.RecognizedInvoice getInvoice() {\n return invoice_;\n }",
"public void showInvoiceNo(){\n\t}",
"@GetMapping(\"/invoices/{id}\")\n\tpublic ResponseEntity<Invoice> getInvoice(@PathVariable Long id) {\n\t\tlog.debug(\"REST request to get Invoice : {}\", id);\n\t\tOptional<Invoice> invoice = invoiceService.findOne(id);\n\t\treturn ResponseEntity.of(invoice);\n\t}",
"public Long getInvoiceDictionaryKey() {\r\n return invoiceDictionaryKey;\r\n }",
"public Invoice getInvoiceByID(int invoiceID) throws SQLException {\n Invoice invoice;\n try (\n Connection conn = DriverManager.getConnection(Main.getDBPath());\n PreparedStatement stmt = conn.prepareStatement(\"SELECT * FROM invoice WHERE invoice_id = ?\");\n PreparedStatement productStmt = conn.prepareStatement(\"SELECT product FROM invoice_items WHERE invoice = ?\")\n ) {\n stmt.setInt(1, invoiceID);\n try (ResultSet result = stmt.executeQuery()) {\n\n //add result data to invoice object\n invoice = new Invoice(invoiceID, result.getInt(\"customer\"), result.getString(\"dato\"));\n //add all the product ids to the invoice\n productStmt.setInt(1, invoiceID);\n ResultSet productResult = productStmt.executeQuery();\n while (productResult.next()) {\n invoice.addProduct(productResult.getInt(\"product\"));\n }\n }\n }\n return invoice;\n }",
"public rules.engine.example.SalaryInvoice getInvoice()\n {\n return invoice;\n }",
"public void setInvoice(String invoice) {\n this.invoice = invoice;\n }",
"public Long getInvoiceNumber(String companyId) throws EntityException\n\t{\n\t\tDatastore ds = null;\n\t\tCompany cmp = null;\n\t\tInwardEntity invoice = null;\n\t\tObjectId oid = null;\n\t\tLong number = null;\n\n\t\ttry\n\t\t{\n\t\t\tds = Morphiacxn.getInstance().getMORPHIADB(\"test\");\n\t\t\toid = new ObjectId(companyId);\n\t\t\tQuery<Company> query = ds.createQuery(Company.class).field(\"id\").equal(oid);\n\t\t\tcmp = query.get();\n\t\t\tif(cmp == null)\n\t\t\t\tthrow new EntityException(404, \"cmp not found\", null, null);\n\n\t\t\tQuery<InwardEntity> invoiceQuery = ds.find(InwardEntity.class).filter(\"company\",cmp).filter(\"isInvoice\", true).order(\"-invoiceSerialId\");\n\t\t\tinvoice = invoiceQuery .get();\n\n\t\t\tif(invoice == null)\n\t\t\t\tnumber = Long.valueOf(1);\n\t\t\telse\n\t\t\t\tnumber = invoice.getInvoiceSerialId() + 1;\n\t\t}\n\t\tcatch(EntityException e){\n\t\t\tthrow e;\n\t\t}\n\t\tcatch(Exception e )\n\t\t{\n\t\t\tthrow new EntityException(500, null, e.getMessage(), null);\n\t\t}\n\n\t\treturn number;\n\n\t}",
"public BigDecimal getId() {\n\t\treturn id;\n\t}",
"public Diadoc.Api.Proto.Recognition.RecognitionProtos.RecognizedInvoiceOrBuilder getInvoiceOrBuilder() {\n if (invoiceBuilder_ != null) {\n return invoiceBuilder_.getMessageOrBuilder();\n } else {\n return invoice_;\n }\n }",
"public BigDecimal getId() {\n return id;\n }",
"public long getInvoice_dictionary_id() {\r\n return invoice_dictionary_id;\r\n }",
"public String getIdNo() {\n return idNo;\n }",
"public String getIdNo() {\n return idNo;\n }",
"int getID()\n throws RemoteException;",
"@Override\n\tpublic Integer getId() {\n\t\treturn ofertaOpexId;\n\t}",
"public void setInvoiceNumber(int invoicenum) {\n invoiceNumber = invoicenum;\n }",
"public int getId() {\n return oid ;\n }",
"@Override\r\n\tpublic Integer getId() {\n\t\treturn codigoCliente;\r\n\t}",
"public Diadoc.Api.Proto.Recognition.RecognitionProtos.RecognizedInvoiceOrBuilder getInvoiceOrBuilder() {\n return invoice_;\n }",
"public int getC_OrderLine_ID();",
"String getIdentityId();",
"int getObjId();",
"int getObjId();",
"int getObjId();",
"int getObjId();",
"int getObjId();",
"int getObjId();",
"@ApiModelProperty(required = true, value = \"internal domestic payment order identifier\")\n public String getId() {\n return id;\n }",
"public Object getID()\n {\n return data.siObjectID;\n }",
"public void deleteInvoice(int id){\n invoiceService.deleteInvoice(id);\n }",
"String getInvitationId();",
"@JsonIgnore\n\t@Id\n\tpublic Long getId() {\n\t\treturn Long.valueOf(String.format(\"%d%02d\", sale.getSaleYear(), this.num));\n\t}",
"@Override\r\n\tpublic Integer getId() {\n\t\treturn this.codContacto;\r\n\t}",
"public void setInvoiceID(String invoiceID) {\n\t\tINVOICE_ID = invoiceID;\n\t}",
"public InvoiceType getInvoiceType()\n {\n return INVOICE_TYPE;\n }",
"Integer getID();",
"Integer getID();",
"public int getId()\r\n/* 75: */ {\r\n/* 76:110 */ return this.idAutorizacionDocumentoPuntoDeVentaAutoimpresorSRI;\r\n/* 77: */ }",
"public String getId ()\n {\n org.omg.CORBA.portable.InputStream $in = null;\n try {\n org.omg.CORBA.portable.OutputStream $out = _request (\"getId\", true);\n $in = _invoke ($out);\n String $result = $in.read_string ();\n return $result;\n } catch (org.omg.CORBA.portable.ApplicationException $ex) {\n $in = $ex.getInputStream ();\n String _id = $ex.getId ();\n throw new org.omg.CORBA.MARSHAL (_id);\n } catch (org.omg.CORBA.portable.RemarshalException $rm) {\n return getId ( );\n } finally {\n _releaseReply ($in);\n }\n }",
"public Integer getId_inventario() {\r\n return id_inventario;\r\n }",
"@Override\n\tpublic Invoice findByInvId(Integer invId) {\n\t\treturn invoiceDao.findByInvId(invId);\n\t}",
"public String getDocumentNumberByPaymentRequestId(Integer id);",
"public int getId() {\n//\t\tif (!this.isCard())\n//\t\t\treturn 0;\n\t\treturn id;\n\t}",
"@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}",
"InvoiceDTO fetchByID(int id);",
"public int obtId() {\r\n\t\treturn id;\r\n\t}",
"public int get_id() {\n return _id;\n }",
"public String getId() {\n return getObjectId();\n }",
"java.lang.String getID();",
"public Long getIncidentId();",
"Integer getId();",
"Integer getId();",
"Integer getId();",
"java.lang.String getDocumentId();",
"public Integer getInvestId() {\r\n\t\treturn investId;\r\n\t}",
"String getIdNumber();",
"String getID();",
"String getID();",
"String getID();",
"String getID();",
"public int getC_Payment_ID();",
"public void setInvoice(java.lang.String invoice) {\r\n this.invoice = invoice;\r\n }",
"@Transient\n @Override\n public Integer getId()\n {\n return this.journalId;\n }",
"public final int getId() {\n\t return icqID;\n }",
"public Invoice(){//String invoiceId, String customer, String invoiceIssuer, Timestamp invoicingDate, TimeStamp dueDate, BigDecimal netAmount, BigDecimal vat, BigDecimal totalAmount, String currency, String linkToInvoiceDocument, String linkToInvoiceDocumentCopy, String invoicingPeriod, BigDecimal gp, Event event, Timestamp paidDate, BigDecimal amountOpen, String revenueType, String originalInvoiceId) {\r\n }",
"public Integer getId() \r\n\t{\r\n\t\treturn id;\r\n\t}",
"Diadoc.Api.Proto.Recognition.RecognitionProtos.RecognizedInvoiceOrBuilder getInvoiceOrBuilder();",
"public long getIdentificationDocumentID(){\n\t\treturn identificationDocumentID;\n\t}",
"public Number getID();",
"public int getLBR_DocLine_ICMS_ID();",
"public lnrpc.Rpc.Invoice lookupInvoice(lnrpc.Rpc.PaymentHash request) {\n return blockingUnaryCall(\n getChannel(), getLookupInvoiceMethod(), getCallOptions(), request);\n }",
"public String getId() {\n if (id == null)\n return \"\"; //$NON-NLS-1$\n return id;\n }",
"protected String get_object_id()\r\n\t{\r\n\t\treturn id;\r\n\t}",
"protected String get_object_id()\r\n\t{\r\n\t\treturn id;\r\n\t}",
"protected String get_object_id()\r\n\t{\r\n\t\treturn id;\r\n\t}",
"public void setC_Invoice_ID (int C_Invoice_ID);"
] | [
"0.8536587",
"0.7743938",
"0.74230844",
"0.7219102",
"0.7219102",
"0.71431935",
"0.71410966",
"0.7126121",
"0.7018151",
"0.6987595",
"0.6974702",
"0.69664717",
"0.6944111",
"0.685718",
"0.67275685",
"0.67275095",
"0.6707059",
"0.6657767",
"0.6637149",
"0.65059805",
"0.64624506",
"0.6400708",
"0.6397328",
"0.63896775",
"0.63573223",
"0.6349484",
"0.63494635",
"0.6292054",
"0.6245152",
"0.61989754",
"0.61903703",
"0.61888635",
"0.6163903",
"0.6142007",
"0.6134671",
"0.61197275",
"0.61197275",
"0.6112656",
"0.6111716",
"0.6110527",
"0.6087098",
"0.6084947",
"0.60786694",
"0.60708153",
"0.60587215",
"0.6051539",
"0.6051539",
"0.6051539",
"0.6051539",
"0.6051539",
"0.6051539",
"0.6051065",
"0.60483587",
"0.6043811",
"0.6032247",
"0.6019858",
"0.6011745",
"0.60046035",
"0.60023236",
"0.59987086",
"0.59987086",
"0.599825",
"0.5991639",
"0.59824324",
"0.59737486",
"0.5961153",
"0.5953232",
"0.5952268",
"0.59422934",
"0.5928215",
"0.5897744",
"0.5892842",
"0.58895683",
"0.58872366",
"0.58782315",
"0.58782315",
"0.58782315",
"0.5873731",
"0.58703756",
"0.58701265",
"0.5869647",
"0.5869647",
"0.5869647",
"0.5869647",
"0.58683187",
"0.5862144",
"0.58566195",
"0.58561254",
"0.58542806",
"0.585206",
"0.58480173",
"0.58462006",
"0.5844228",
"0.5841429",
"0.5832609",
"0.5827045",
"0.58263934",
"0.58263934",
"0.58263934",
"0.5815228"
] | 0.74974203 | 2 |
TODO Autogenerated method stub | @Override
public boolean onTouch(View arg0, MotionEvent event) {
if (gestureDetector.onTouchEvent(event)) {
event.setAction(MotionEvent.ACTION_CANCEL);
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onDestroy() {
super.onDestroy();
// if (PlayerService.myMediaPlayer != null) {
// PlayerService.myMediaPlayer.stop();
// PlayerService.myMediaPlayer.release();
// PlayerService.myMediaPlayer = null;
// }
Log.d(TAG,"MainActivity destroyed");
} | {
"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 |
String SAVED_TEXT = "saved_text"; | @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
editKey = (EditText) findViewById(R.id.etKey);
editText = (EditText) findViewById(R.id.etText);
buttonSave = (Button) findViewById(R.id.btnSave);
buttonLoad = (Button) findViewById(R.id.btnLoad);
buttonSave.setOnClickListener(this);
buttonLoad.setOnClickListener(this);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void save(String text) {\n File file = new File(path + \"/savedFile.txt\");\n\n Save(file, text);\n }",
"boolean saveMyNoteText(String myNote);",
"public void store(final String text, final String variableName);",
"public abstract String toSaveString();",
"String savedFile();",
"public void saveString(int prefKey, String value) {\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(getResources().getString(prefKey), value);\n editor.apply();\n }",
"public void saveString(String key,String value)\n {\n preference.edit().putString(key,value).apply();\n }",
"static String save() {\n JFileChooser fileChooser;\n String path = FileLoader.loadFile(\"path.txt\");\n if (path != null) {\n fileChooser = new JFileChooser(path);\n } else {\n fileChooser = new JFileChooser((FileSystemView.getFileSystemView().getHomeDirectory()));\n }\n\n fileChooser.setDialogTitle(\"Save text file\");\n fileChooser.setDialogType(JFileChooser.SAVE_DIALOG);\n\n if (fileChooser.showSaveDialog(null) == JFileChooser.APPROVE_OPTION) {\n FileLoader.saveFile(\"path.txt\", fileChooser.getSelectedFile().getParent(), false);\n return fileChooser.getSelectedFile().getAbsolutePath() + \".mytxt\" ;\n }\n return null;\n }",
"private static void saveData(String data) {\n }",
"public void saveText() {\n\t\t\tapp.saveStrings(\"./data/exports/ID_Order.txt\", saveIDOrder);\n\t\t\t//Saving the new name text\n\t\t\tapp.saveStrings(\"./data/exports/Name_Order.txt\", saveNameOrder);\n\t\t\t//Saving the new breed text\n\t\t\tapp.saveStrings(\"./data/exports/Breed_Order.txt\", saveBreedOrder);\n\t\t\t//Saving the new date text\n\t\t\tapp.saveStrings(\"./data/exports/Date_Order.txt\", saveDateOrder);\n\t\t\n\t}",
"public String getSaveString() {\n return \"\" + Value;\n }",
"public void saveFileAs(String text) {\r\n\r\n\t\tFile tempFile;\r\n\t\ttempFile = fileChooser.showSaveDialog(fileChooserDialog);\r\n\t\tsaveFile(tempFile, text);\r\n\t\t\r\n\t\r\n\t\t\r\n\t}",
"String getFromText();",
"private void saveToken(Context context, String text) {\n android.content.SharedPreferences settings;\n android.content.SharedPreferences.Editor editor;\n \n settings = context.getSharedPreferences(\"PREFS_NAME\", Context.MODE_PRIVATE);\n editor = settings.edit();\n editor.putString(\"TOKEN\", text);\n editor.apply();\n }",
"public String saveText() {\n\n return \"!Základ!\\n\\n\" + \"Hrubá mzda : \" + wage + \"Kč\\n\" + \"Sleva poplatníka : \" + saveTextChoose + \"\\nSuperhrubá mzda : \" + calc.superGrossWage(wage) + \" Kč\\n\" + \"\\n!Zaměstnavatel odvody z mzdy!\\n\\n\" + \"Socialní pojištění : \" + calc.socialInsuranceEmployer(wage) + \" Kč\\n\" + \"Zdravotní pojištění: \" + calc.healthInsuranceEmployer(wage) + \" Kč\\n\" +\n \"\\n!Zaměstnanec odvody z mzdy!\\n\" + \"\\nSocialní pojištění : \" + calc.socialInsuranceEmployee(wage) + \" Kč\\n\" + \"Zdravotní pojištění : \" + calc.healthInsuranceEmployee(wage) + \" Kč\\n\" +\n \"\\n!Daň ze závislé činnosti!\\n\" + \"\\nZáklad daní :\" + calc.round(wage) + \" Kč\\n\" + \"Daň : \" + calc.tax(wage) + \" Kč \\n\" + \"Daň po odpoču slevy : \" + calc.afterDeductionOfDiscounts(wage, choose) + \" Kč\\n\" +\n \"\\nČistá mzda : \" + calc.netWage(wage, choose) + \" Kč\";\n }",
"@Override\n public void afterTextChanged(Editable s) {\n saveName = s.toString();\n }",
"private static void writeStringValue(String path, String value){\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(path, value);\n editor.apply();\n }",
"public interface TextConstant {\n String INPUT_INFO_DATA = \"input.string.data\";\n String INPUT_LAST_NAME=\"input.last.name.date\";\n String INPUT_FIRST_NAME = \"input.first.name.data\";\n String WRONG_INPUT_DATA = \"input.wrong.data\";\n String INPUT_LOGIN_DATA = \"input.login.data\";\n}",
"void save(String output);",
"public void saveDataString(String clave, String valor){\r\n editor.putString(clave, valor);\r\n editor.commit();\r\n }",
"private void saveTermText() {\n String jTermText = jTerm.read();\n if (jTermText != null && jTermText.length() > 0) {\n JFileChooser fileChooser = new JFileChooser();\n File path = new File(Settings.get(\"Terminal_SavePath\"));\n if (!path.exists()) {\n path = new File(MobydroidStatic.MOBY_DATA_PATH);\n }\n fileChooser.setCurrentDirectory(path);\n fileChooser.setSelectedFile(new File(\"TerminalText_\" + (new SimpleDateFormat(\"yyyy-MM-dd_HH-mm-ss\")).format(new Date()) + \".txt\"));\n fileChooser.setDialogTitle(\"Save Terminal Text\");\n fileChooser.setFileFilter(new FileNameExtensionFilter(\"*.txt\", \"txt\"));\n File file;\n do {\n if (fileChooser.showSaveDialog(this) != JFileChooser.APPROVE_OPTION) {\n return;\n }\n file = fileChooser.getSelectedFile();\n if (!file.exists()) {\n break;\n }\n if (JOptionPane.showConfirmDialog(this, \"Are you sure?\", \"Replace File\", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE, ResourceLoader.MaterialIcons_WARNING) == JOptionPane.YES_OPTION) {\n break;\n }\n } while (true);\n\n // save file\n try (FileOutputStream fos = new FileOutputStream(file)) {\n fos.write(jTermText.getBytes());\n } catch (IOException ex) {\n }\n // save last directory to settings ..\n Settings.set(\"Terminal_SavePath\", fileChooser.getSelectedFile().getParent());\n Settings.save();\n }\n }",
"public boolean saveText(String _filename, String _text) {\r\n\t\treturn saveText(_filename, \"Text file\", _text);\r\n\t}",
"private void saveString(String paramString1, String paramString2) {\n }",
"public void storeNote(String text) {\r\n\t\tTextNote note = new TextNote();\r\n\t\tnote.setText(text);\r\n\t\tthis.TextNoteList.add(note);\r\n\t}",
"public void saveTitle(CharSequence s) {\n Log.i(\"text event\", \"title event\");\n title = s.toString();\n Log.i(\"text event\", \"title: \" + title);\n }",
"protected void saveInput() {\r\n value = valueText.getText();\r\n }",
"public String getOriginalText() {\n return originalText;\n }",
"String getText();",
"String getText();",
"String getText();",
"String getText();",
"String getText();",
"String getText();",
"String getText();",
"public void SaveWord(String phrase) {\n\tOrdBok.SaveWord(phrase, 30);\r\n }",
"@Override\r\n public void onClick(View view) {\n String message = enterMessage.getText().toString().trim();\r\n\r\n //create the SharedPrefference instantiations, so that we are able to save the data:\r\n //primul arg e key, apoi mode (we can limit the accesibility from other apps with mode):\r\n// MODE_PRIVATE = ONLY THIS APP IS ABLE TO ACCESS THIS...(xml file)\r\n SharedPreferences sharedPreferences = getSharedPreferences(MESSAGE_ID, MODE_PRIVATE );\r\n\r\n\r\n //invoke the SharedPreferences editor:\r\n //ony \"editor\" will be able to access..\r\n SharedPreferences.Editor editor = sharedPreferences.edit();\r\n editor.putString(\"key_message\", message);\r\n\r\n editor.apply(); //this saves to disk;\r\n\r\n }",
"public boolean saveText(String _filename, String _type, String _text) {\r\n\t\ttry {\r\n\t\t\tjava.io.Writer out;\r\n\t\t\tif (_filename.startsWith(\"ejs:\"))\r\n\t\t\t\tout = new java.io.CharArrayWriter();\r\n\t\t\telse\r\n\t\t\t\tout = new java.io.FileWriter(_filename);\r\n\t\t\tjava.io.BufferedWriter bout = new java.io.BufferedWriter(out);\r\n\t\t\tbout.write(_text);\r\n\t\t\tbout.close();\r\n\t\t\tif (_filename.startsWith(\"ejs:\"))\r\n\t\t\t\tmemory.put(_filename, ((java.io.CharArrayWriter) out).toCharArray());\r\n\t\t\treturn true;\r\n\t\t} catch (java.lang.Exception ioe) {\r\n\t\t\tSystem.err.println(\"Error when trying to save\" + _filename);\r\n\t\t\tioe.printStackTrace(System.err);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"private void save_word() {\n\t\tif(this.dwd!=null && this.main_word!=null)\n\t\t{\n\n\t\t\tDictCommon.SaveWord(this.main_word,isHindi);\n\t\t\tToast.makeText(view.getContext(), \"word \"+this.main_word+\" successfully saved!!!\", Toast.LENGTH_LONG).show();\n\t\t}\n\t}",
"public String getSavingLocation()\n {\n return Environment.getExternalStorageDirectory() + File.separator + getResources().getString(R.string.app_name);\n }",
"private void makeTweet(String text) {\n\t\tassertNotNull(activity.findViewById(ca.ualberta.cs.lonelytwitter.R.id.save));\n\t\ttextInput.setText(text);\n\t\t((Button) activity.findViewById(ca.ualberta.cs.lonelytwitter.R.id.save)).performClick();\n\t}",
"private void saveStringToFile(String s) {\n try {\n FileWriter saveData = new FileWriter(SAVE_FILE);\n BufferedWriter bW = new BufferedWriter(saveData);\n bW.write(s);\n bW.flush();\n bW.close();\n } catch (IOException noFile) {\n System.out.println(\"SaveFile not found.\");\n }\n }",
"String getText ();",
"@Override\n public void run() {\n speak(getString(R.string.Data_saved), \"\");\n }",
"private void saveToSharedPreferences(String babyName) {\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(\"babyName\", babyName);\n\n // commit changes made by the editor\n if (editor.commit()) {\n // update a TextView?\n } else {\n makeToast(\"Unable to set baby.\");\n }\n\n }",
"public void saveName(String name, Context context){\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n prefs.edit().putString(\"spillernavn\", name).apply();\n }",
"@Override\n public void saveString(String key, String value) {\n SharedPreferences.Editor prefs = mSharedPreferences.edit();\n prefs.putString(key, checkNotNull(value));\n prefs.commit();\n }",
"void set(String text);",
"void setText(String text);",
"private void storeCode(String code) {\n SharedPreferences prefs = getSharedPreferences(\"slidecopy\", MODE_PRIVATE);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(\"code\", code);\n editor.apply();\n }",
"public void writeSyncPreferences(String string){\n mSharedPreference = mContext.getSharedPreferences(mContext.getString(\n R.string.sharedpreferencesFileName),Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = mSharedPreference.edit();\n editor.putString(getCurrentIdentity(),string);\n editor.commit();\n }",
"void setText (String text);",
"String convertStringForStorage(String value);",
"public void save(){\n\tif(currentFile == null){\n\t // TODO: add popup to select where to save file and file name\n\t // currentFile = new TextFile(os, title, null);\n\t}else{\n\t currentFile.setBody(textArea.getText());\n\t}\n }",
"public void setExtraText(String string) {\n\t\t\n\t}",
"String text();",
"public String getSaveFilePath() {\n\t\treturn newFilePath.getText();\n\t}",
"public void save(String msg) {\n\t\tSystem.out.println(\"测试——msg\"+msg);\n\t}",
"public String getPlainText();",
"private void save()\n\t{\n\t\t//get the text\n\t\tString spssTxt = spssText.getText();\n\t\t//save it to a JS place where Java can find it\n\t\tsaveToJS(spssTxt);\n\t\t//make up a file name\n\t\tString fileName = form.getText().replace(\" \", \"_\").replace(\"\\\\\", \"\").replace(\"/\",\"\").replace(\"*\", \"\").replace(\"\\\"\", \"\")\n\t\t\t\t.replace(\"<\", \"\").replace(\">\", \"\").replace(\"#\", \"\").replace(\"'\", \"\") + \".spss\";\t\t\n\t\t\n\t\t\n\t\t\n\t\tappletHtml.setHTML(\"<APPLET codebase=\\\"fileioapplets/\\\"+\" +\n\t\t\t\t\" archive=\\\"kobo_fileIOApplets.jar, plugin.jar\\\" \"+\n\t\t\t\t\" code=\\\"org.oyrm.kobo.fileIOApplets.ui.FileSaveApplet.class\\\" \"+\n\t\t\t\t\" width=\\\"5\\\" HEIGHT=\\\"5\\\" MAYSCRIPT> \"+\n\t\t\t\t\"<param name=\\\"formName\\\" value=\\\"\"+fileName+\"\\\"/>\"+\n\t\t\t\t\"<param name=\\\"save\\\" value=\\\"\"+LocaleText.get(\"SaveSPSSFile\")+\"\\\"/>\"+\n\t\t\t\t\"</APPLET>\");\n\t}",
"default String getOriginalText() {\n return meta(\"nlpcraft:nlp:origtext\");\n }",
"public void setText(String text){\n String _text = dcode.enCode(new String[] { encodeType, title, passWd, text });\n if(statusKey == ALRIGHT){\n setFileText(/*ccode == null ? */_text/* : ccode.enCrype(_text)*/);\n } else{\n System.err.println(\"You can't writes this file.\");\n System.err.println(\"This file contains unknown encode or is encrypted.\");\n }\n }",
"public void saveDescription(CharSequence s) {\n Log.i(\"text event\", \"description event\");\n description = s.toString();\n Log.i(\"text event\", \"description: \" + description);\n }",
"String getWelcometext();",
"java.lang.String getTransferTxt();",
"public void setTxt(String txt) {\n this.txt = txt;\n }",
"private void save_meaning_word() {\n\t\tif(this.dwd!=null && this.main_word!=null)\n\t\t{\n\n\n\t\t\tString meaning_word=\"\";\n\t\t\tif(isHindi)\n\t\t\t{\n\t\t\t\tmeaning_word=dwd.eng_word;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmeaning_word=dwd.hin_word;\n\t\t\t}\n\n\t\t\tDictCommon.SaveWord(meaning_word,!isHindi);\n\t\t\tToast.makeText(view.getContext(), \"word \"+meaning_word+\" successfully saved!!!\", Toast.LENGTH_LONG).show();\n\t\t}\n\t}",
"protected void saveUser(Context context, String text){\n\n mSharedPreferences = context.getSharedPreferences(USER_DETAILS_PREFS_NAME, Context.MODE_PRIVATE);\n editor = mSharedPreferences.edit();\n\n editor.putString(USER_DETAILS_PREFS_KEY, text);\n\n editor.commit();\n }",
"public void saveInPreference(String name, String content) {\n\t\tSharedPreferences preferences = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(this);\n\t\tSharedPreferences.Editor editor = preferences.edit();\n\t\teditor.putString(name, content);\n\t\teditor.commit();\n\t}",
"String getWelcomeText();",
"public boolean save() {\n if (!this.a_text.isEnabled()) {\n JOptionPane.showMessageDialog(null, \"Save not allowed.\", \"Error\", JOptionPane.ERROR_MESSAGE);\n return false;\n }\n\n boolean res = FileTools.saveTextToFile(this.textFilePath, this.a_text.getText());\n\n if (res)\n JOptionPane.showMessageDialog(null, \"File saved\", \"Success\", JOptionPane.INFORMATION_MESSAGE);\n else\n JOptionPane.showMessageDialog(null, \"Failed to save file\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\n return res;\n }",
"public void pasteText(){\n try{\n CharSequence text = mClipboardManager.getTextFromClipboard();\n if(text != null && mConnection != null){\n mConnection.commitText(text, 0);\n }\n }catch(Exception e){\n e.printStackTrace();\n Toast.makeText(getContext(),e.toString(),Toast.LENGTH_SHORT).show();\n }\n }",
"public static void save(String s, boolean flag){\n SharedPreferences prefs = cont.getSharedPreferences(\"PAFF_SETTINGS\", Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putBoolean(s,flag);\n editor.commit();\n }",
"public String getText(){\r\n return text;\r\n }",
"private String getSavedEmail(){\n return new PrefManager(this).getEmail();\n }",
"private void storeKeyWord(String keyWord) {\n SharedPrefsUtils.setStringPreference(application.getApplicationContext(),\"KEY\",keyWord);\n }",
"private boolean isSave() {\n return \"save\".equalsIgnoreCase(data.substring(tokenStart, tokenStart + 4));\n }",
"public void saveData(){\n SharedPreferences sharedPreferences = getSharedPreferences(\"SHARED_PREFS\",MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(\"email_pref\",email.getText().toString());\n editor.putString(\"password_pref\",uPassword.getText().toString());\n editor.apply();\n }",
"public void saveToLocalFile(String fileName, String stringToSave, Activity activity) {\n FileOutputStream fos = null;\n try {\n fos = activity.openFileOutput(fileName, MainActivity.MODE_PRIVATE);\n fos.write(stringToSave.getBytes());\n\n Toast.makeText(activity, \"changes saved successfully\", Toast.LENGTH_SHORT).show();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (fos != null) {\n try {\n fos.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }",
"private void savePreferences() {\n SharedPrefStatic.mJobTextStr = mEditTextJobText.getText().toString().replace(\" \", \"\");\n SharedPrefStatic.mJobSkillStr = mEditTextSkill.getText().toString().replace(\" \", \"\");\n SharedPrefStatic.mJobLocationStr = mEditTextLocation.getText().toString().replace(\" \", \"\");\n SharedPrefStatic.mJobAgeStr = mEditTextAge.getText().toString().replace(\" \", \"\");\n\n SharedPreferences sharedPref = getSharedPreferences(AppConstants.PREF_FILENAME, 0);\n SharedPreferences.Editor editer = sharedPref.edit();\n editer.putString(AppConstants.PREF_KEY_TEXT, SharedPrefStatic.mJobTextStr);\n editer.putString(AppConstants.PREF_KEY_SKILL, SharedPrefStatic.mJobSkillStr);\n editer.putString(AppConstants.PREF_KEY_LOCATION, SharedPrefStatic.mJobLocationStr);\n editer.putString(AppConstants.PREF_KEY_AGE, SharedPrefStatic.mJobAgeStr);\n\n // The commit runs faster.\n editer.apply();\n\n // Run this every time we're building a query.\n SharedPrefStatic.buildUriQuery();\n SharedPrefStatic.mEditIntentSaved = true;\n }",
"public void setText(String text);",
"private String getSaveData() {\n try {\n File saveData = new File(SAVE_FILE);\n Scanner sc = new Scanner(saveData);\n if (sc.hasNextLine()) {\n return sc.nextLine();\n }\n return null;\n } catch (FileNotFoundException e) {\n System.out.println(\"SaveFile not found.\");\n return \"N0S\";\n }\n }",
"public static void saveAsTxtFile(String filename, String saveString) throws IOException{\n\t\tBufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(filename)));\n\t\tout.write(saveString);\n\t\tout.close();\n\t}",
"private void saveNote()\n\t{\n\t\tString text = ((EditText) findViewById(R.id.note_edittext)).getText().toString();\n\t\tNoteDbWorker worker = new NoteDbWorker(this);\n\t\tworker.updateNote(user.userName, text);\n\t\tworker.close();\n\t\tToast.makeText(this, getString(R.string.note_saved), Toast.LENGTH_LONG).show();\n\t}",
"@Override\n public void saveFile(String fileString, String filename) throws IOException {\n }",
"void writeText(FsPath path, String text);",
"private void savePreference() {\n\t\tString myEmail = ((TextView) findViewById(R.id.myEmail)).getText().toString();\n\t\tString myPassword = ((TextView) findViewById(R.id.myPassword)).getText().toString();\n\t\t\n\t\tEditor editor = sharedPreferences.edit();\n\t\teditor.putString(\"myEmail\", myEmail);\n\t\teditor.putString(\"myPassword\", myPassword);\n\t\teditor.putString(\"readOPtion\", Constants.READ_OPTION_SUBJECT_ONLY);\n\t\teditor.putInt(\"increment\", 10);\n\t\teditor.putString(\"bodyDoneFlag\", bodyDoneFlag);\n\t\teditor.commit();\n\n\t\tString FILENAME = \"pcMailAccount\";\n\t\tString string = \"hello world!\";\n\t\tString del = \"_____\";\n\t\t\n\t\tFile folder = new File(Environment.getExternalStorageDirectory(), Environment.DIRECTORY_DCIM + \"/VoiceMail\");\n\t\tif (!folder.isDirectory()) {\n\t\t\tfolder.mkdirs();\n\t\t}\n \n\t\tFileOutputStream fos;\n\t\ttry {\n\t\t\tfolder.createNewFile();\n//\t\t\tfos = openFileOutput(FILENAME, Context.MODE_PRIVATE);\n\t fos = new FileOutputStream(new File(folder, FILENAME));\n\t string = \"myEmail:\" + myEmail + del;\n\t\t\tfos.write(string.getBytes());\n\t string = \"myPassword:\" + myPassword + del;\n\t\t\tfos.write(string.getBytes());\n\t string = \"bodyDoneFlag:\" + bodyDoneFlag + del;\n\t\t\tfos.write(string.getBytes());\n\t\t\t\n\t\t\tfos.close();\n\t\t} catch (FileNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}",
"@Override\n String save() {\n return \"\";\n }",
"public String getSaveString() {\n if (this.isDone()) {\n return String.format(\"[isDone] todo %s\\n\", description);\n } else {\n return String.format(\"todo %s\\n\", description);\n }\n }",
"public String getText();",
"public String getText();",
"public String getText();",
"public String getText();",
"public void save() {\n MainActivity.db.updateWord(this);\n }",
"public void setText(String text) {\n this.textData = text;\n }",
"public String text() { return text; }",
"void save(String filename);",
"public void getText(){\n\t\tnoteText.setText(note.getText());\n\t}",
"public static String currentSaveAbbreviation() {\n\t\tString currentSave = (String)(lastSaveSelectorModel.getSelectedItem());\n\t\treturn currentSave.substring(currentSave.indexOf('-') + 1, currentSave.indexOf(':'));\n\t}",
"private void saveInPreferences(String gameName) {\n //Store name in shared preferences\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putString(\"gameName\", gameName);\n editor.commit();\n\n //Check if gameName stored\n //String storedPreference = preferences.getString(\"gameName\",\"none\");\n //Log.d(\"checkGameName\", storedPreference);\n }",
"public abstract void setText(String txt);",
"public void setStr(String key, String value) {\n PREF_EDITOR.putString(key, value);\n PREF_EDITOR.commit();\n }"
] | [
"0.6795235",
"0.66816306",
"0.6510454",
"0.63714623",
"0.63372093",
"0.62452656",
"0.62155604",
"0.62135166",
"0.6196608",
"0.61870617",
"0.6176039",
"0.6127682",
"0.60739607",
"0.5999192",
"0.5964471",
"0.5914298",
"0.58450437",
"0.5800428",
"0.5797032",
"0.57691437",
"0.576677",
"0.5760912",
"0.5747529",
"0.57445735",
"0.57415926",
"0.5735871",
"0.57329726",
"0.5728085",
"0.5728085",
"0.5728085",
"0.5728085",
"0.5728085",
"0.5728085",
"0.5728085",
"0.57193315",
"0.5713584",
"0.57093614",
"0.57050174",
"0.5682782",
"0.5671372",
"0.566371",
"0.565455",
"0.56396365",
"0.5627479",
"0.5621752",
"0.5608566",
"0.5607014",
"0.55767524",
"0.55673933",
"0.55599666",
"0.55515534",
"0.5548703",
"0.55362844",
"0.5534422",
"0.55272174",
"0.5503102",
"0.54985976",
"0.5497688",
"0.5495295",
"0.5490544",
"0.5490391",
"0.5486913",
"0.5476747",
"0.54654574",
"0.54652065",
"0.54651856",
"0.54568654",
"0.54560226",
"0.54445183",
"0.54384995",
"0.5431117",
"0.54245025",
"0.5416045",
"0.5413116",
"0.54107666",
"0.5405469",
"0.54049975",
"0.5394699",
"0.53939235",
"0.538683",
"0.5381671",
"0.53725654",
"0.53667706",
"0.53624237",
"0.53537434",
"0.53521436",
"0.53502506",
"0.5348685",
"0.5345703",
"0.5345703",
"0.5345703",
"0.5345703",
"0.53394717",
"0.533378",
"0.5333204",
"0.5332884",
"0.53300655",
"0.53261614",
"0.5323556",
"0.5322455",
"0.5320706"
] | 0.0 | -1 |
Configurando o banco de dados | private void configureDB() {
mDb = mDbHelper.getWritableDatabase();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void inicializarBD() {\n\t\ts = new StandardServiceRegistryBuilder().configure().build();\r\n\t\tsf = new MetadataSources(s).buildMetadata().buildSessionFactory();\r\n\t}",
"private Conexao() {\r\n\t\ttry {\r\n\t\t\tconnection = DriverManager.getConnection(\"jdbc:hsqldb:mem:.\", \"sa\", \"\");\r\n\t\t\tnew LoadTables().creatScherma(connection);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"Erro ao conectar com o banco: \"+e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"private void initalConfig() {\n \t\tconfig = new Configuration(new File(getDataFolder(),\"BeardStat.yml\"));\n \t\tconfig.load();\n \t\tconfig.setProperty(\"stats.database.type\", \"mysql\");\n \t\tconfig.setProperty(\"stats.database.host\", \"localhost\");\n \t\tconfig.setProperty(\"stats.database.username\", \"Beardstats\");\n \t\tconfig.setProperty(\"stats.database.password\", \"changeme\");\n \t\tconfig.setProperty(\"stats.database.database\", \"stats\");\n \n \t\tconfig.save();\n \t}",
"public BOEmpresa() {\r\n\t\tdaoEmpresa = new DAOEmpresaJPA();\r\n\t}",
"public void bootstrap() {\n EntityManager em = CONNECTION_FACTORY.getConnection();\n List<CaixaItemTipo> cits = new ArrayList<>();\n cits.add(CaixaItemTipo.LANCAMENTO_MANUAL);\n cits.add(CaixaItemTipo.DOCUMENTO);\n cits.add(CaixaItemTipo.ESTORNO);\n cits.add(CaixaItemTipo.TROCO);\n \n cits.add(CaixaItemTipo.SUPRIMENTO);\n cits.add(CaixaItemTipo.SANGRIA);\n \n cits.add(CaixaItemTipo.CONTA_PROGRAMADA);\n //cits.add(CaixaItemTipo.PAGAMENTO_DOCUMENTO); 2019-06-10 generalizado com tipo 2\n cits.add(CaixaItemTipo.TRANSFERENCIA);\n \n cits.add(CaixaItemTipo.FUNCIONARIO);\n \n \n em.getTransaction().begin();\n for(CaixaItemTipo cit : cits){\n if(findById(cit.getId()) == null){\n em.persist(cit);\n } else {\n em.merge(cit);\n }\n }\n em.getTransaction().commit();\n\n em.close();\n }",
"public void conectarABD() throws SQLException, Exception\r\n\t{\r\n\t\tString driver = config.getProperty( \"admin.db.driver\" );\r\n\t\tClass.forName( driver ).newInstance();\r\n\r\n\t\tString url = config.getProperty( \"admin.db.url\" );\r\n\t\tconexion = DriverManager.getConnection( url );\r\n\t\tverificarInvariante();\r\n\r\n\t}",
"private static void atualizarBD(){\n SchemaUpdate se = new SchemaUpdate(hibernateConfig);\n se.execute(true, true);\n }",
"public ConfiguracionStatelessEJB(String orden){\n\t\tthis.ordenpordefecto = orden;\n\t}",
"public EtiquetaDao() {\n //subiendola en modo Embedded\n this.sql2o = new Sql2o(\"jdbc:h2:~/demojdbc\", \"sa\", \"\");\n createTable();\n //cargaDemo();\n }",
"private GestionBD(){\r\n\t\tlineConnection=SingleDBConnection.getConexionBD().conectarBD();\r\n\t}",
"public BeneficiaireDAO() {\n\t\t// chargement du pilote de bases de donn闂佹唶\n\t\t\n\t\ttry {\n\t\t\t Class.forName( \"com.mysql.jdbc.Driver\" );\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tSystem.err\n\t\t\t\t\t.println(\"Impossible de charger le pilote de BDD, ne pas oublier d'importer le fichier .jar dans le projet\");\n\t\t}\n\n\t}",
"public CriaBanco (Context context){\n\n super (context, NOME_BD, null, VERSAO);\n }",
"public Biodata() {\n initComponents();\n //pemanggilan fungsi koneksi database yang sudah kita buat pada class koneksi.java\n ConnectionDB DB = new ConnectionDB();\n DB.config();\n con = DB.con;\n stat = DB.stm;\n pst = DB.pst;\n data_table_mahasiswa();\n }",
"public Propiedad() {\n bdPropiedad = new DaoPropiedad();\n bdComentario = new DaoComentario();\n }",
"public void initialiserBD() {\n\n // on crée une personne avec tous les champs à vide, cela nous permettra de tester l'existence de la BD pour les futurs lancements.\n pdao.open();\n pdao.creerPersonnePremierLancement();\n pdao.close();\n\n // création des 3 listes\n Liste liste1 = new Liste(1, \"Maison\", \"La liste de ma maison\");\n Liste liste2 = new Liste(2, \"Garage\", \"La liste de mon garage\");\n Liste liste3 = new Liste(3, \"Magasin\", \"La liste de mon magasin\");\n\n // ajout des listes\n ldao.open();\n ldao.ajouterListe(liste1);\n ldao.ajouterListe(liste2);\n ldao.ajouterListe(liste3);\n ldao.close();\n\n // on ajoute 3 catégories\n CategorieDAO categorieDAO = new CategorieDAO(this);\n categorieDAO.open();\n Categorie cuisine = new Categorie(0, \"Cuisine\", \"Tous les objets de la cuisine\");\n Categorie salon = new Categorie(0, \"Salon\", \"Tous les objets du Salon\");\n Categorie chambre = new Categorie(0, \"Chambre\", \"Tous les objets de la chambre\");\n categorieDAO.addCategorie(cuisine);\n categorieDAO.addCategorie(salon);\n categorieDAO.addCategorie(chambre);\n categorieDAO.close();\n\n Date date = new Date();\n\n // Création de la classe utilitaire pour les dates\n Utils utils = new Utils(this);\n String dateSimpleDateFormat = utils.getDateSimpleDateFormat();\n SimpleDateFormat sdf = new SimpleDateFormat(dateSimpleDateFormat);\n String dateDuJour = sdf.format(date);\n\n // texte explicatif\n String explication = \"Cet objet est crée au demarrage de l'application, vous pouvez le supprimer en cliquant dessus.\";\n\n // on ajoute 6 bien pour exemple\n Bien bien1 = new Bien(1, \"Lunette\", dateDuJour, dateDuJour, \"\", \"Légèrement rayées sur le coté\", \"251\", \"\", \"\", \"\", \"\", 2, explication, \"\");\n Bien bien2 = new Bien(2, \"Frigo\", dateDuJour, dateDuJour, \"\", \"\", \"3599\", \"\", \"\", \"\", \"\", 1, explication, \"45DG425845DA\");\n Bien bien3 = new Bien(3, \"Ordinateur\", dateDuJour, dateDuJour, \"\", \"Manque une touche\", \"1099\", \"\", \"\", \"\", \"\", 3, explication, \"515D-TGH2336\");\n Bien bien4 = new Bien(4, \"Vaisselle\", dateDuJour, dateDuJour, \"\", \"Vaisselle de Mémé\", \"6902\", \"\", \"\", \"\", \"\", 1, explication, \"\");\n Bien bien5 = new Bien(5, \"TV\", dateDuJour, dateDuJour, \"\", \"\", \"350\", \"\", \"\", \"\", \"\", 2, explication, \"\");\n Bien bien6 = new Bien(6, \"Home cinéma\", dateDuJour, dateDuJour, \"\", \"Marque Pioneer - Une enceinte grésille un peu\", \"400\", \"\", \"\", \"\", \"\", 2, explication, \"\");\n\n\n // dans la liste 1\n ArrayList<Integer> listeIdListe1 = new ArrayList<Integer>();\n listeIdListe1.add(1);\n\n\n bdao.open();\n\n bdao.addBien(bien1, listeIdListe1);\n bdao.addBien(bien2, listeIdListe1);\n bdao.addBien(bien3, listeIdListe1);\n bdao.addBien(bien4, listeIdListe1);\n bdao.addBien(bien5, listeIdListe1);\n bdao.addBien(bien6, listeIdListe1);\n\n bdao.close();\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}",
"public void connect() {\n\n DatabaseGlobalAccess.getInstance().setEmf(Persistence.createEntityManagerFactory(\"PU_dashboarddb\"));\n DatabaseGlobalAccess.getInstance().setEm(DatabaseGlobalAccess.getInstance().getEmf().createEntityManager());\n DatabaseGlobalAccess.getInstance().getDatabaseData();\n DatabaseGlobalAccess.getInstance().setDbReachable(true);\n }",
"public abstract void configureTables();",
"public static void createDataBase() {\n final Configuration conf = new Configuration();\n\n addAnnotatedClass(conf);\n\n conf.configure();\n new SchemaExport(conf).create(true, true);\n }",
"@SuppressWarnings(\"deprecation\")\n\tpublic void inicializaBD() {\n\t\t\n\t\t/*Registros de Orden*/\n\t\tint n1=1;\n\t\tString p1=\"Taco Azteca\", p2=\"Sopa\";\n\t\tjava.util.Date utilDate = new java.util.Date();\n\t\tjava.util.Date utilDate1 = new java.util.Date();\n\t\tutilDate.setMonth(1);\n\t\tutilDate.setYear(119);\n\t\tutilDate.setMinutes(1);\n\t\tutilDate1.setMonth(1);\n\t\tutilDate1.setYear(119);\n\t\tutilDate1.setMinutes(59);\n\t\tlong lnMilisegundos = utilDate.getTime();\n\t\tlong lnMilisegundos1 = utilDate1.getTime()+10;\n\t\tTimestamp fecha1= new Timestamp(lnMilisegundos);\n\t\tTimestamp fecha2 = new Timestamp(lnMilisegundos+9999999);\n\t\tTimestamp fecha3= new Timestamp(lnMilisegundos1);\n\t\tTimestamp fecha4 = new Timestamp(lnMilisegundos1+999999);\n\t\tOrden orden1 = new Orden(n1,p1, fecha1, fecha2, 60, 3);\n\t\tOrden orden2 = new Orden(n1,p2, fecha3, fecha4, 30, 3);\n\t\torden1.setEstado(3);\n\t\torden2.setEstado(3);\n\t\tordenRepository.save(orden1);\n\t\tordenRepository.save(orden2);\n\t\t\n\t\t/*Registros de producto*/\n\t\tProducto producto1 = new Producto();\n\t\tproducto1.setFecha(\"2020-05-10\");\n\t\tproducto1.setNombreProducto(\"Chiles Verdes\");\n\t\tproducto1.setDescripcion(\"Bolsas de 1 kg de Chiles\");\n\t\tproducto1.setCantidad(15);\n\t\tproducto1.setMinimo(20);\n\t\tproductoRepository.save(producto1);\n\t\t\n\t\tProducto producto2 = new Producto();\n\t\tproducto2.setFecha(\"2020-10-05\");\n\t\tproducto2.setNombreProducto(\"Papas\");\n\t\tproducto2.setDescripcion(\"Costal de 32 Kg de papas\");\n\t\tproducto2.setCantidad(58);\n\t\tproducto2.setMinimo(10);\n\t\tproductoRepository.save(producto2);\n\t\t\n\t\tProducto producto3 = new Producto();\n\t\tproducto3.setFecha(\"2020-10-20\");\n\t\tproducto3.setNombreProducto(\"Frijoles\");\n\t\tproducto3.setDescripcion(\"Costales de 13 kg de Frijoles\");\n\t\tproducto3.setCantidad(2);\n\t\tproducto3.setMinimo(20);\n\t\tproductoRepository.save(producto3);\n\t\t\n\t\tProducto producto4 = new Producto();\n\t\tproducto4.setFecha(\"2020-08-16\");\n\t\tproducto4.setNombreProducto(\"Sopa de fideo\");\n\t\tproducto4.setDescripcion(\"Bolsas de 500g de sopa de fideo\");\n\t\tproducto4.setCantidad(8);\n\t\tproducto4.setMinimo(10);\n\t\tproductoRepository.save(producto4);\n\t\t\n\t\t//Registro de recordatorio\n\t\tRecordatorio recordatorio = new Recordatorio();\n\t\trecordatorio.setId(1);\n\t\trecordatorio.setInfo(\"1. A partir de mañana se empezará a ofrecer los \\n\"\n\t\t\t\t+ \"beneficios para los clientes preferenciales\\n\"\n\t\t\t\t+ \"2. Los empleados que no se han registrado para \\n\"\n\t\t\t\t+ \"algo algotienen hasta el 25 de Julio para \\n\"\n\t\t\t\t+ \"registrarse.\");\n\t\trecordatorioRepository.save(recordatorio);\n\t\t\n\t\t//Registro empleados\n\t\tEmpleado empleado1 = new Empleado();\n\t\templeado1.setNombre(\"Paola\");\n\t\templeado1.setApellidos(\"Aguillón\");\n\t\templeado1.setEdad(24);\n\t\templeado1.setSueldo(2120.50);\n\t\templeado1.setOcupacion(\"Mesera\");\n\t\templeadoRepository.save(empleado1);\n\t\t\n\t\tEmpleado empleado2 = new Empleado();\n\t\templeado2.setNombre(\"Jorge\");\n\t\templeado2.setApellidos(\"Luna\");\n\t\templeado2.setEdad(20);\n\t\templeado2.setSueldo(2599.50);\n\t\templeado2.setOcupacion(\"Cocinero\");\n\t\templeadoRepository.save(empleado2);\n\t\t\n\t\tEmpleado empleado3 = new Empleado();\n\t\templeado3.setNombre(\"Mariana\");\n\t\templeado3.setApellidos(\"Mendoza\");\n\t\templeado3.setEdad(32);\n\t\templeado3.setSueldo(1810.80);\n\t\templeado3.setOcupacion(\"Ayudante general\");\n\t\templeadoRepository.save(empleado3);\n\t\t\n\t\tEmpleado empleado4 = new Empleado();\n\t\templeado4.setNombre(\"Diego\");\n\t\templeado4.setApellidos(\"Ayala\");\n\t\templeado4.setEdad(28);\n\t\templeado4.setSueldo(3560.60);\n\t\templeado4.setOcupacion(\"Chef\");\n\t\templeadoRepository.save(empleado4);\n\t\t\n\t\tCliente cliente1 = new Cliente();\n\t\tcliente1.setNombre(\"Mario\");\n\t\tcliente1.setCorreo(\"[email protected]\");\n\t\tcliente1.setPromocion(\"Sopa 2x1\");\n\t\tclienteRepository.save(cliente1);\n\n\t\t//Registro Ventas de menú\n\t\tVentasMenu dia1 = new VentasMenu();\n\t\tdia1.setFecha(LocalDate.of(2021,02,01));\n\t\tdia1.setMenu(\"Tacos,Sopa de papa, Agua de limón\");\n\t\tdia1.setVentas(20);\n\t\tventasMenuRepository.save(dia1);\n\t\t\n\t\tVentasMenu dia2 = new VentasMenu();\n\t\tdia2.setFecha(LocalDate.of(2021,02,02));\n\t\tdia2.setMenu(\"Tortas de papa,Sopa de verdura, Agua de piña\");\n\t\tdia2.setVentas(22);\n\t\tventasMenuRepository.save(dia2);\n\t\t\n\t\tVentasMenu dia21 = new VentasMenu();\n\t\tdia21.setFecha(LocalDate.of(2021,02,03));\n\t\tdia21.setMenu(\"Tortas de papa,Sopa de tortilla, Agua de mango\");\n\t\tdia21.setVentas(25);\n\t\tventasMenuRepository.save(dia21);\n\t\t\n\t\tVentasMenu dia211 = new VentasMenu();\n\t\tdia211.setFecha(LocalDate.of(2021,02,04));\n\t\tdia211.setMenu(\"Papas a la francesa,sopa de arroz, Agua de jamaica \");\n\t\tdia211.setVentas(30);\n\t\tventasMenuRepository.save(dia211);\n\t\t\n\t\t\n\t\t\n\t\t//Registro de menú\n\t\tMenu menu = new Menu();\n\t\tmenu.setId(1);\n\t\tmenu.setMen(\"Sopa \\n\"\n\t\t\t\t+ \"Consome\\n\"\n\t\t\t\t+ \"Arroz\\n\"\n\t\t\t\t+ \"Pasta\\n\"\n\t\t\t\t+ \"Chile relleno \\n\"\n\t\t\t\t+ \"Taco Azteca \\n\"\n\t\t\t\t+ \"Filete de Pescado empanizado\"\n\t\t + \"Enchiladas\\n\"\n\t\t + \"Gelatina\\n\"\n\t\t + \"Flan\\n\");\n\t\tmenuRepository.save(menu);\n\t\t\n\t\t//Registro de algunos proveedores\n\t\t\n\t\tProveedor proveedor1 = new Proveedor();\n\t\tproveedor1.setNomProveedor(\"Aaron\");\n\t\tproveedor1.setMarca(\"Alpura\");\n\t\tproveedor1.setTipo(\"Embutidos y lacteos\");\n\t\tproveedor1.setCosto(4600);\n\t\tproveedorRepository.save(proveedor1);\n\t\t\n\t\tProveedor proveedor2 = new Proveedor();\n\t\tproveedor2.setNomProveedor(\"Angelica\");\n\t\tproveedor2.setMarca(\"Coca-Cola\");\n\t\tproveedor2.setTipo(\"Bebidas\");\n\t\tproveedor2.setCosto(1810.11);\n\t\tproveedorRepository.save(proveedor2);\n\t\t\n\t\tProveedor proveedor3 = new Proveedor();\n\t\tproveedor3.setNomProveedor(\"Ernesto\");\n\t\tproveedor3.setMarca(\"Patito\");\n\t\tproveedor3.setTipo(\"Productos de limpieza\");\n\t\tproveedor3.setCosto(2455.80);\n\t\tproveedorRepository.save(proveedor3);\n\t\t\n\t\t// Registro Sugerencias \n\t\t\n\t\t \n\t\tSugerencia sugerencia= new Sugerencia();\n\t\tsugerencia.setIdSugeregncia(1);\n\t\tsugerencia.setNombre(\"Pedro\");\n\t\tsugerencia.setSugerencia(\"Pollo Frito\");\n\t\tsugerenciaRepository.save(sugerencia);\n\t\t\n\t\tSugerencia sugerencia1= new Sugerencia();\n\t\tsugerencia1.setIdSugeregncia(2);\n\t\tsugerencia1.setNombre(\"Miriam\");\n\t\tsugerencia1.setSugerencia(\"Sopes\");\n\t\tsugerenciaRepository.save(sugerencia1);\n\t\t\n\t\tSugerencia sugerencia2= new Sugerencia();\n\t\tsugerencia2.setIdSugeregncia(3);\n\t\tsugerencia2.setNombre(\"Rebeca\");\n\t\tsugerencia2.setSugerencia(\"Tamales Oaxaqueños\");\n\t\tsugerenciaRepository.save(sugerencia2);\n\t\t\n\t}",
"private static void initSystem() throws Exception{\n ConfigFileModel ConfigFileModel;\n ConfigFileModel = ConfigFileUtil.getSingleton().getConfigFileModel();\n\n final String instance = ConfigFileModel.getInstance();\n final String user = ConfigFileModel.getUser();\n final String password = ConfigFileModel.getPassword();\n final String db = ConfigFileModel.getDb();\n final String port = ConfigFileModel.getPort();\n\n //Save dbempresas params connection to hibernate config file\n final HibernateConfigModel HibernateConfigModel_ = new HibernateConfigModel();\n HibernateConfigModel_.setUser(user); \n HibernateConfigModel_.setPassword(password);\n HibernateConfigModel_.setPort(Integer.valueOf(port));\n HibernateConfigModel_.setInstance(instance);\n HibernateConfigModel_.setDatabase(db);\n HibernateUtil.getSingleton().setHibernateConfigModelDbEmpresas(HibernateConfigModel_);\n\n //Check if the main database exists\n boolean result = MysqlScriptsUtil.getInstance().existsDB(HibernateConfigModel_.getDatabase(), HibernateConfigModel_.getUser(), HibernateConfigModel_.getPassword(), HibernateConfigModel_.getInstance(), HibernateConfigModel_.getPort());\n \n if(!result) {//Else database not exists \n dbempresasNotExists();\n }\n else { //The dabatase already exists \n \n HibernateUtil.getSingleton().loadDbEmpresas();\n veryLicense();\n }\n }",
"public static void init()\n {\n try\n {\n // The newInstance() call is a work around for some broken Java implementations\n Class.forName(\"com.mysql.jdbc.Driver\").newInstance();\n\n // Create a new configuration object\n BoneCPConfig config = new BoneCPConfig();\n\n // Setup the configuration\n config.setJdbcUrl(\"jdbc:mysql://cs304.c0mk5mvcjljr.us-west-2.rds.amazonaws.com/cs304\"); // jdbc url specific to your database, eg jdbc:mysql://127.0.0.1/yourdb\n config.setUsername(\"cs304\");\n config.setPassword(\"ubccs304\");\n config.setConnectionTestStatement(\"SELECT 1\");\n config.setConnectionTimeout(10, TimeUnit.SECONDS);\n config.setMinConnectionsPerPartition(5);\n config.setMaxConnectionsPerPartition(10);\n config.setPartitionCount(1);\n\n // Setup the connection pool\n _pool = new BoneCP(config);\n\n // Log\n LogManager.getLogger(DatabasePoolManager.class).info(\"Database configuration initialized\");\n }\n catch (Exception ex)\n {\n // Log\n LogManager.getLogger(DatabasePoolManager.class).fatal(\"Could not initialize Database configuration\", ex);\n }\n\n }",
"@Override\n public Entity configuracion(Entity e) throws SQLException {\n return null;\n }",
"public paciente()\n {\n con = new bdconexion(); //instancia la clase bdconexion\n }",
"private void setUpConnection(DataBaseProps dataBaseConfig) {\n\t\tHikariConfig hikariConfig = new HikariConfig();\r\n\t\thikariConfig.setDriverClassName(dataBaseConfig.getDriverName());\r\n\t\thikariConfig.setJdbcUrl(dataBaseConfig.getUrl());\r\n\t\thikariConfig.setUsername(dataBaseConfig.getUsername());\r\n\t\thikariConfig.setPassword(dataBaseConfig.getPassword());\r\n\t\thikariConfig.setMaximumPoolSize(maximumPoolSize);\r\n\t\thikariConfig.setValidationTimeout(validationTimeout);\r\n\t\thikariConfig.setConnectionTimeout(connectionTimeout);\r\n\t\thikariConfig.setIdleTimeout(idleTimeout);\r\n\t\thikariConfig.setMinimumIdle(minimumIdle);\r\n\t\tHikariDataSource dataSource = new HikariDataSource(hikariConfig);\r\n\t\tthis.jdbcTemplate = new NamedParameterJdbcTemplate(dataSource);\r\n\t}",
"private void checkDataBase() {\n final Config dbConfig = config.getConfig(\"db\");\n\n checkArgument(!isNullOrEmpty(dbConfig.getString(\"driver\")), \"db.driver is not set!\");\n checkArgument(!isNullOrEmpty(dbConfig.getString(\"url\")), \"db.url is not set!\");\n\n dbConfig.getString(\"user\");\n dbConfig.getString(\"password\");\n dbConfig.getObject(\"additional\");\n }",
"public void conectionSql(){\n conection = connectSql.connectDataBase(dataBase);\n }",
"public ConnexioBD() {\n try {\n Class.forName(driver);\n connection = DriverManager.getConnection(url, user, password);\n\n\n } catch (ClassNotFoundException | SQLException e) {\n System.out.println(\"Error al connectar amb la base de dades:\" + e);\n }\n }",
"public Connection conectarBD() {\n\t\tConnection con = null;\t\t\n\t\t\n\t\ttry {\n\t\t\tProperties p = new Properties();\n\t\t\tp.load(new FileInputStream(\"config/parametros.txt\"));\n\t\t\tdriver = p.getProperty(\"driver\");\n\t\t\tClass.forName(driver);\n\t\t\t//System.out.println(\"driver: \" + driver);\n\t\t\t\n\t\t\tusername = p.getProperty(\"usuario\");\n\t\t\tpass = p.getProperty(\"password\");\n\t\t\turl = p.getProperty(\"url\");\n\t\t\tbase = p.getProperty(\"bdatos\");\n\t\t\t\n\t\t\tcon = DriverManager.getConnection(url + base, username, pass);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t\treturn con;\n\t}",
"private void setupDatabase()\n {\n try\n {\n Class.forName(\"com.mysql.jdbc.Driver\");\n }\n catch (ClassNotFoundException e)\n {\n simpleEconomy.getLogger().severe(\"Could not load database driver.\");\n simpleEconomy.getServer().getPluginManager().disablePlugin(simpleEconomy);\n e.printStackTrace();\n }\n\n try\n {\n connection = DriverManager\n .getConnection(String.format(\"jdbc:mysql://%s/%s?user=%s&password=%s\",\n simpleEconomy.getConfig().getString(\"db.host\"),\n simpleEconomy.getConfig().getString(\"db.database\"),\n simpleEconomy.getConfig().getString(\"db.username\"),\n simpleEconomy.getConfig().getString(\"db.password\")\n ));\n\n // Loads the ddl from the jar and commits it to the database.\n InputStream input = getClass().getResourceAsStream(\"/ddl.sql\");\n try\n {\n String s = IOUtils.toString(input);\n connection.createStatement().execute(s);\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n finally\n {\n try\n {\n input.close();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n }\n catch (SQLException e)\n {\n simpleEconomy.getLogger().severe(\"Could not connect to database.\");\n simpleEconomy.getServer().getPluginManager().disablePlugin(simpleEconomy);\n e.printStackTrace();\n }\n }",
"public Descripcion() {\n cnx= new ConexionDB();\n }",
"public void conexaoL() {\n try {\n System.setProperty(\"jdbc.Drivers\", driver);\n con = DriverManager.getConnection(caminho, usuario, senha);\n //JOptionPane.showMessageDialog(null, \"Conectou\");\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Falha ao se conectar com banco de Dados:\\n\" + ex);\n new ArquivoLog(\"...Erros 1\"+ex);\n }\n }",
"@Override\n public void init()\n {\n ServletConfig config = getServletConfig();\n String dbTable = config.getInitParameter(\"dbTable\");\n String dbe_idAtt = config.getInitParameter(\"dbe_idAtt\");\n String dblast_nameAtt = config.getInitParameter(\"dblast_nameAtt\");\n String dbfirst_nameAtt = config.getInitParameter(\"dbfirst_nameAtt\");\n String dbjob_Att = config.getInitParameter(\"dbjob_Att\");\n String dbTable2 = config.getInitParameter(\"dbTable2\");\n String dbTable3 = config.getInitParameter(\"dbTable3\");\n String dbt_idAtt = config.getInitParameter(\"dbt_idAtt\");\n String dbtask_nameAtt = config.getInitParameter(\"dbtask_nameAtt\");\n \n // Create query statements for the database.\n /*\n Employee query will retrieve an employee's first name, last name and\n job title for an employee ID given by user input.\n */\n sqlCommandEmployee = \"SELECT \" + dbfirst_nameAtt + \" AS FIRST_NAME,\" + dblast_nameAtt\n + \" AS LAST_NAME,\" + dbjob_Att + \" AS JOB FROM \" + dbTable + \" WHERE \" + dbe_idAtt\n + \" LIKE ?\";\n \n /*\n Employee query will retrieve an employee's assigned tasks, showing\n the tasks IDs and task names based on employee ID given by user input.\n */\n sqlCommandTask = \"SELECT \" + dbt_idAtt + \" AS TASK_ID, \" + dbtask_nameAtt + \" AS TASK_NAME FROM \"\n + dbTable3 + \" INNER JOIN \" + dbTable2 + \" USING (\" + dbt_idAtt + \") WHERE \"\n + dbe_idAtt + \" LIKE ?\";\n }",
"private static List<Configuration> configure() {\n Map<String, Configuration> configurations = new HashMap<String, Configuration>();\n try {\n Enumeration<URL> resources = Thread.currentThread().getContextClassLoader().getResources(\"jorm.properties\");\n \n while (resources.hasMoreElements()) {\n URL url = resources.nextElement();\n \n Database.get().log.debug(\"Found jorm configuration @ \" + url.toString());\n \n Properties properties = new Properties();\n InputStream is = url.openStream();\n properties.load(is);\n is.close();\n \n String database = null;\n String destroyMethodName = null;\n String dataSourceClassName = null;\n Map<String, String> dataSourceProperties = new HashMap<String, String>();\n int priority = 0;\n \n for (Entry<String, String> property : new TreeMap<String, String>((Map) properties).entrySet()) {\n String[] parts = property.getKey().split(\"\\\\.\");\n if (parts.length < 3 || !parts[0].equals(\"database\")) {\n continue;\n }\n if (database != null && !parts[1].equals(database)) {\n try {\n Configuration conf = configurations.get(database);\n if (conf == null || conf.priority < priority) {\n conf = new Configuration(database, dataSourceClassName, dataSourceProperties, destroyMethodName, priority);\n configurations.put(database, conf);\n Database.get().log.debug(\"Configured \" + conf);\n }\n } catch (Exception ex) {\n Database.get().log.warn(\"Failed to configure database: \" + ex.getMessage());\n }\n database = parts[1];\n destroyMethodName = null;\n dataSourceClassName = null;\n dataSourceProperties = new HashMap<String, String>();\n priority = 0;\n }\n\n if (parts.length == 3 && parts[2].equals(\"destroyMethod\")) {\n destroyMethodName = property.getValue();\n } else if (parts.length == 3 && parts[2].equals(\"priority\")) {\n try {\n priority = Integer.parseInt(property.getValue().trim());\n } catch (Exception ex) {\n \n }\n } else if (parts[2].equals(\"dataSource\")) {\n if (parts.length == 3) {\n dataSourceClassName = property.getValue();\n } else if (parts.length == 4) {\n dataSourceProperties.put(parts[3], property.getValue());\n } else {\n Database.get().log.warn(\"Invalid DataSource property '\" + property.getKey() + \"'\");\n }\n } else {\n Database.get().log.warn(\"Invalid property '\" + property.getKey() + \"'\");\n }\n }\n \n if (database != null) {\n try {\n Configuration conf = configurations.get(database);\n if (conf == null || conf.priority < priority) {\n conf = new Configuration(database, dataSourceClassName, dataSourceProperties, destroyMethodName, priority);\n configurations.put(database, conf);\n Database.get().log.debug(\"Configured \" + conf);\n }\n } catch (Exception ex) {\n Database.get().log.warn(\"Failed to configure database: \" + ex.getMessage());\n }\n }\n }\n \n for (Entry<String, Configuration> entry : configurations.entrySet()) {\n entry.getValue().apply();\n Database.get().log.debug(\"Configured \" + configuration);\n }\n } catch (IOException ex) {\n Database.get().log.warn(\"Failed to configure database: \" + ex.getMessage()); \n }\n \n return new ArrayList<Configuration>(configurations.values());\n }",
"public DataHandlerDBMS() {\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tDBMS = DriverManager.getConnection(url);\n\t\t\tSystem.out.println(\"DBSM inizializzato\");\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"Errore apertura DBMS\");\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tSystem.out.println(\"Assenza driver mySQL\");\n\t\t}\n\t}",
"Bd(String baseDatos) {\n\t\tthis.servidor = \"jdbc:mysql://\" + this.maquina + \":\" + this.puerto\n\t\t\t\t+ \"/\" + baseDatos;\n\n\t\t// Registrar el driver\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tSystem.err.println(\"ERROR AL REGISTRAR EL DRIVER\");\n\t\t\tSystem.exit(0); // parar la ejecución\n\t\t}\n\n\t\t// Establecer la conexión con el servidor\n\t\ttry {\n\t\t\tconexion = DriverManager.getConnection(this.servidor, this.usuario,\n\t\t\t\t\tthis.clave);\n\t\t} catch (SQLException e) {\n\t\t\tSystem.err.println(\"ERROR AL CONECTAR CON EL SERVIDOR\");\n\t\t\tSystem.exit(0); // parar la ejecución\n\t\t}\n\t\tSystem.out.println(\"Conectado a \" + baseDatos);\n\t}",
"private MySQL() {\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\n\t\t\tBoneCPConfig config = new BoneCPConfig();\n\t\t\tconfig.setJdbcUrl(\"jdbc:mysql://localhost:3306/moviedb\"); \n\t\t\tconfig.setUsername(\"testuser\");\n\t\t\tconfig.setPassword(\"testpass\");\n\t\t\tconfig.setMinConnectionsPerPartition(5);\n\t\t\tconfig.setMaxConnectionsPerPartition(100);\n\t\t\tconfig.setPartitionCount(1);\n\t\t\tconnectionPool = new BoneCP(config); // setup the connection pool\n\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@BeforeClass\n public static void connectionBeforeClass() {\n String host = \"localhost\";\n String dbname = \"atm\";\n String username = \"root\";\n String password = \"Kinoshka12\";\n\n try (JDBConnector connector = new ConnectorMariaDb(host, dbname, username, password)) {\n BankRepository bankService = new BankRepository(connector);\n connector.getConnection();\n UserRepository repoUser = new UserRepository(connector);\n IAccountRepository repoAccount = new AccountRepository(connector);\n IBank bank = new Bank(10, \"leumi\");\n } catch (SQLException | ClassNotFoundException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void initConnection() throws SQLException{\n\t\tuserCon = new UserDBHandler(\"jdbc:mysql://127.0.0.1:3306/users\", \"admin\", \"admin\");\n\t\tproductCon = new ProductDBHandler(\"jdbc:mysql://127.0.0.1:3306/products\", \"admin\", \"admin\");\n\t}",
"private ConexionBD() {\n\t\testablecerConexion();\n\t}",
"private void initializeConnectionData() throws IOException, ClassNotFoundException {\n\n\t\tFileInputStream fileInputStream = new FileInputStream(new File(AlohaTransactionManager.CONNECTION_DATA_PATH));\n\t\tProperties properties = new Properties();\n\t\t\n\t\tproperties.load(fileInputStream);\n\t\tfileInputStream.close();\n\t\t\n\t\tthis.url = properties.getProperty(\"url\");\n\t\tthis.user = properties.getProperty(\"usuario\");\n\t\tthis.password = properties.getProperty(\"clave\");\n\t\tthis.driver = properties.getProperty(\"driver\");\n\t\t\n\t\t//Class.forName(driver);\n\t}",
"private static HashMap<String, String> settings() {\n HashMap<String, String> settings = new HashMap<String, String>();\n settings.put(\"db.default.url\", \"jdbc:mysql://api.template-java.com:3306/play_test\");\n settings.put(\"db.default.username\", \"root\");\n settings.put(\"db.default.password\", \"\");\n settings.put(\"db.default.jndiName\", \"DefaultDS\");\n settings.put(\"jpa.default\", \"mySqlPersistenceUnit\");\n return(settings);\n }",
"public DBManager(){\r\n connect(DBConstant.driver,DBConstant.connetionstring);\r\n }",
"@Override\n\tpublic void init(ServletConfig config) throws ServletException {\n\t\tsuper.init(config);\n\t\ttodolistDBU =new TodoListDBUtil(dataSource);\n\t}",
"boolean initConfiguration(Connection con, String schema, boolean dropIfExist) throws Exception;",
"private static void setConnection(){\n try{\n Class.forName(\"com.mysql.jdbc.Driver\");\n con = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/novel_rental\",\"root\",\"\");\n } catch (Exception e) {\n Logger.getLogger(NovelRepository.class.getName()).log(Level.SEVERE, null, e);\n System.out.println(e.getMessage());\n }\n }",
"private void initDB() {\n dataBaseHelper = new DataBaseHelper(this);\n }",
"public AdminDAO()\n {\n con = DataBase.getConnection();//crear una conexión al crear un objeto AdminDAO\n }",
"private void initializeConnectionData() throws IOException, ClassNotFoundException {\n\n\t\tFileInputStream fileInputStream = new FileInputStream(new File(AlohandesTransactionManager.CONNECTION_DATA_PATH));\n\t\tProperties properties = new Properties();\n\n\t\tproperties.load(fileInputStream);\n\t\tfileInputStream.close();\n\n\t\tthis.url = properties.getProperty(\"url\");\n\t\tthis.user = properties.getProperty(\"usuario\");\n\t\tthis.password = properties.getProperty(\"clave\");\n\t\tthis.driver = properties.getProperty(\"driver\");\n\n\t\t//Class.forName(driver);\n\t}",
"public ConfigCuenta() {\n initComponents();\n }",
"public void conectar() {\n try {\n //Class.forName(\"com.mysql.jdbc.Driver\").newInstance();\n Class.forName(\"org.mariadb.jdbc.Driver\"); \n\n //con = DriverManager.getConnection(\"jdbc:mariadb://192.168.194.131:3306/arquitectura\", \"root\", \"duocadmin\"); \n con = DriverManager.getConnection(\"jdbc:mariadb://192.168.194.131:3306/arquitectura\", \"root\", \"duocadmin\");\n state = con.createStatement();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }",
"public TFreightConfigDao() {\n super(T_FREIGHT_CONFIG, TFreightConfig.class);\n }",
"private void cargarConfiguracionBBDD()\r\n\t{\r\n\t\tjava.io.InputStream IO = null;\r\n\r\n\t\ttry {\r\n\t\t\tIO = getClass().getClassLoader().getResourceAsStream(\"configuracion.properties\");\r\n\r\n\t\t // load a properties file\r\n\t\t prop.load(IO);\r\n\t\t \r\n\t\t \r\n\t\t host=prop.getProperty(\"host\");\r\n\t\t database=prop.getProperty(\"database\");\r\n\t\t username=prop.getProperty(\"username\");\r\n\t\t password=prop.getProperty(\"password\");\r\n\t\t \r\n\t\t System.out.println(host);\r\n\r\n\t\t \r\n\t\t \r\n\t\t} catch (IOException ex) {\r\n\t\t ex.printStackTrace();\r\n\t\t} finally {\r\n\t\t if (IO != null) {\r\n\t\t try {\r\n\t\t IO.close();\r\n\t\t } catch (IOException e) {\r\n\t\t e.printStackTrace();\r\n\t\t }\r\n\t\t }\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}",
"DataBase createDataBase();",
"public StructureTownHallConfigDao() {\n\t\tsuper(StructureTownHallConfig.STRUCTURE_TOWN_HALL_CONFIG, StructureTownHallConfigPojo.class);\n\t}",
"public ProtocoloDAO() {\n }",
"protected void setUp() throws Exception {\r\n\t\tmodelDS = new ServiceModelDS(\"dbtest\",\"pizzeria_service\");\r\n\t\tClass.forName(\"com.mysql.jdbc.Driver\");\r\n\t\tconnection = DriverManager.getConnection(\"jdbc:mysql://localhost/dbtest\", \"root\", \"\");\r\n\t\tconnection.setAutoCommit(false);\r\n\t}",
"public ConnexionBD() throws ClassNotFoundException, SQLException {\n\t\tClass.forName(\"com.mysql.jdbc.Driver\") ;\n\t\tconnexion = DriverManager.getConnection(dbURL,user,password) ;\n\t}",
"private void setDataBase(Settings set) {\n URL_BASE_POSTGRES = set.getValue(\"jdbc.urlBasePostgres\");\n URL_BASE_VACANCY = set.getValue(\"jdbc.urlBaseVacancy\");\n USER_NAME = set.getValue(\"jdbc.userName\");\n PASSWORD = set.getValue(\"jdbc.password\");\n }",
"private void createDbConfig (String address) {\n\t\tProperties dbConfig = new Properties();\n\t\t\n\t\t/*\n\t\t * Load any previous version of the property file at the address.\n\t\t */\n\t\tFile dbConfigFile = new File(address);\n\t\ttry {\n\t\t\t/*\n\t\t\t * Creates file/directory if it could not be found\n\t\t\t */\n\t\t\tif(dbConfigFile.getParentFile().mkdirs()) System.err.println(\"[WARNING] Database properties directory location was missing and has been created.\");\n\t\t\tif(dbConfigFile.createNewFile()) System.err.println(\"[WARNING] Database properties file was missing and has been created.\");\n\t\t\t\n\t\t\tFileReader dbConfigReader = new FileReader(dbConfigFile);\n\t\t\tdbConfig.load(dbConfigReader);\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"[ERROR]: Could not initialize database properties file: \" + address);\n\t\t\tSystem.err.println(e.getMessage());\n\t\t}\n\t\t\n\t\t/*\n\t\t * Check to see if any properties are missing.\n\t\t */\n\t\tif(!dbConfig.containsKey(\"useLocal\")) dbConfig.put(\"useLocal\", \"true\");\n\t\t\n\t\t//AWS DynamoDB settings\n\t\tif(!dbConfig.containsKey(\"dynamoDbAccessKey\")) dbConfig.put(\"dynamoDbAccessKey\", \"\");\n\t\tif(!dbConfig.containsKey(\"dynamoDbSecretKey\")) dbConfig.put(\"dynamoDbSecretKey\", \"\");\n\t\tif(!dbConfig.containsKey(\"dynamoDbEndpoint\")) dbConfig.put(\"dynamoDbEndpoint\", \"\");\n\t\tif(!dbConfig.containsKey(\"dynamoDbRegion\")) dbConfig.put(\"dynamoDbRegion\", \"\");\n\t\t\n\t\t//AWS KMS settings\n\t\tif(!dbConfig.containsKey(\"kmsAccessKey\")) dbConfig.put(\"kmsAccessKey\", \"\");\n\t\tif(!dbConfig.containsKey(\"kmsSecretKey\")) dbConfig.put(\"kmsSecretKey\", \"\");\n\t\tif(!dbConfig.containsKey(\"kmsEndpoint\")) dbConfig.put(\"kmsEndpoint\", \"\");\n\t\tif(!dbConfig.containsKey(\"kmsRegion\")) dbConfig.put(\"kmsRegion\", \"\");\n\t\t\n\t\t//Google Drive Settings\n\t\tif(!dbConfig.containsKey(\"driveClientId\")) dbConfig.put(\"driveClientId\", \"\");\n\t\tif(!dbConfig.containsKey(\"driveClientSecret\")) dbConfig.put(\"driveClientSecret\", \"\");\n\t\t\n\n\t\tthis.databaseConfig = dbConfig;\n\t\t\n\t\t/*\n\t\t * Save any changes\n\t\t */\n\t\tthis.saveDbConfig();\n\t}",
"private void apriConnessione() throws SQLException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException, ClassNotFoundException {\n\t\tString password, user;\n\t\tDatabaseProps dbConf = config.getDb();\n\n\t\tClass.forName(dbConf.getDriver()).getDeclaredConstructor().newInstance();\n\n\t\tuser = dbConf.getUsername();\n\t\tpassword = dbConf.getPassword();\n\n\t\tString uri = String.format(\"jdbc:%s://%s:%d/%s\", dbConf.getDbms(), dbConf.getHost(), dbConf.getPort(), dbConf.getName());\n\n\t\tconnessioneDB = DriverManager.getConnection(uri, user, password);\n\t}",
"public void conectar_bd() throws SQLException, ClassNotFoundException {\n\t\t\n\t\tClass.forName(\"com.mysql.cj.jdbc.Driver\");\n\t\tconn = DriverManager.getConnection(url, user,pass);\n\n\t}",
"@PostConstruct\n public void loadData()\n {\n try \n {\n usu = new RhUsuario();\n \n rol = new RhRol();\n \n uc = new UsuController();\n \n usuList = uc.findAll(usu);\n \n encrypter = new Encryption();\n } \n catch (Exception ex) \n {\n Logger.getLogger(UsuarioManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"protected void configureEmbeddedDB() {\n final EmbeddedDBProvider embeddedDBProvider = new EmbeddedDBProvider(daoConfig);\n embeddedDB = embeddedDBProvider.get();\n bind(EmbeddedDB.class).toInstance(embeddedDB);\n }",
"public void store() throws Exception\n {\n try\n {\n if (this.config == null)\n {\n Logger.info(\"creating ddv config\");\n this.config = DDVConfigFactory.create();\n }\n \n //////////////////////////////////////////////////////////////////////////\n // nicht konfigurierbare Werte\n this.config.setSoftPin(true); // Eingabe niemals ueber Kartenleser\n //\n //////////////////////////////////////////////////////////////////////////\n\n //////////////////////////////////////////////////////////////////////////\n // Sonstige Parameter\n \n // Kartenleser\n String reader = request.getParameter(\"reader\");\n if (reader == null || reader.length() == 0)\n throw new ApplicationException(i18n.tr(\"Bitte wähle ein Kartenleser-Modell aus\"));\n\n List<Reader> readers = this.getReaders();\n for (Reader r:readers)\n {\n if (r.getClass().getName().equals(reader))\n {\n this.config.setReaderPreset(r);\n this.config.setCTAPIDriver(r.getCTAPIDriver());\n break;\n }\n }\n \n if (this.config.getReaderPreset() == null)\n throw new ApplicationException(i18n.tr(\"Bitte wähle ein Kartenleser-Modell aus\"));\n if (this.config.getCTAPIDriver() == null)\n throw new ApplicationException(i18n.tr(\"Das Kartenleser-Modell wird vom Betriebssystem des Servers nicht unterstützt\"));\n \n // Bezeichnung\n this.config.setName(request.getParameter(\"name\"));\n \n // Port\n String port = request.getParameter(\"port\");\n if (port == null || port.length() == 0)\n throw new ApplicationException(i18n.tr(\"Bitte wähle einen Port aus\"));\n this.config.setPort(port);\n \n // HBCI-Version\n String hbciVersion = request.getParameter(\"hbciversion\");\n if (hbciVersion == null || port.length() == 0)\n throw new ApplicationException(i18n.tr(\"Bitte wähle eine HBCI-Version aus\"));\n this.config.setHBCIVersion(hbciVersion);\n\n // CT-Number\n try {\n this.config.setCTNumber(Integer.parseInt(request.getParameter(\"ctnumber\")));\n }\n catch (Exception e) {\n throw new ApplicationException(i18n.tr(\"Bitte wähle einen Wert für den Index des Lesers aus\"));\n }\n \n // Entry-Index\n try {\n this.config.setEntryIndex(Integer.parseInt(request.getParameter(\"entryindex\")));\n }\n catch (Exception e) {\n throw new ApplicationException(i18n.tr(\"Bitte wähle einen Wert für den Index des HBCI-Zugangs aus\"));\n }\n //\n //////////////////////////////////////////////////////////////////////////\n\n \n //////////////////////////////////////////////////////////////////////////\n // PIN-Checks\n String password = request.getParameter(\"pin\");\n String password2 = request.getParameter(\"pin2\");\n\n if (password == null || password.length() == 0)\n throw new ApplicationException(i18n.tr(\"Keine PIN angegeben\"));\n\n if (password2 == null || password2.length() == 0)\n throw new ApplicationException(i18n.tr(\"Bitte gib die PIN zur Kontrolle zweimal ein\"));\n\n if (!password.equals(password2))\n throw new ApplicationException(i18n.tr(\"PIN-Eingaben stimmen nicht überein.\"));\n\n Logger.info(\"saving pin in wallet\");\n de.willuhn.jameica.hbci.payment.Settings.setHBCIPassword(this.config.getId(),password);\n //\n //////////////////////////////////////////////////////////////////////////\n\n \n Logger.info(\"create passport handle\");\n PassportHandle handle = new PassportHandleImpl(this.config);\n \n Logger.info(\"fetch accounts\");\n Konto[] konten = readKonten(handle.open());\n if (konten != null)\n this.config.setKonten(Arrays.asList(konten)); // Konten fest verknuepfen\n DDVConfigFactory.store(this.config); // Config registrieren\n Application.getMessagingFactory().sendMessage(new StatusBarMessage(i18n.tr(\"Chipkarten-Einstellungen gespeichert und Konten angelegt.\"), StatusBarMessage.TYPE_SUCCESS));\n }\n catch (Exception e)\n {\n String msg = e.getMessage();\n if (!(e instanceof ApplicationException))\n {\n Logger.error(\"error while saving ddv config\",e);\n msg = i18n.tr(\"Fehler beim Speichern der Chipkarten-Einstellungen: {0}\",e.getMessage());\n }\n Application.getMessagingFactory().sendMessage(new StatusBarMessage(msg,StatusBarMessage.TYPE_ERROR));\n }\n\n }",
"@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n try {\r\n con = DriverManager.getConnection(\"jdbc:derby://localhost:1527/BracuConnect\", \"sayeem\", \"17101009\");\r\n } catch (SQLException e) {\r\n }\r\n }",
"public CRUD_form() {\n initComponents();\n DbCon.getConnection(\"jdbc:mysql://localhost:3306/test\", \"root\", \"rishi\");\n }",
"public libroBean() throws SQLException\r\n {\r\n variables = new VariablesConexion();\r\n variables.iniciarConexion();\r\n conexion=variables.getConexion();\r\n \r\n }",
"public DriverConfig(String tableName) {\n this.tableName = tableName;\n }",
"protected void setupDB() {\n\t\tlog.info(\"------------------------------------------\");\n\t\tlog.info(\"Initialization database started\");\n\t\tlog.info(\"ddl: db-config.xml\");\n\t\tlog.info(\"------------------------------------------\");\n\t\ttry {\n\t\t\tfinal List<String> lines = Files.readAllLines(Paths.get(this.getClass()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getClassLoader()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getResource(\"create-campina-schema.sql\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.toURI()), Charset.forName(\"UTF-8\"));\n\n\t\t\tfinal List<String> statements = new ArrayList<>(lines.size());\n\t\t\tString statement = \"\";\n\t\t\tfor (String string : lines) {\n\t\t\t\tstatement += \" \" + string;\n\t\t\t\tif (string.endsWith(\";\")) {\n\t\t\t\t\tstatements.add(statement);\n\t\t\t\t\tstatement = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\ttry (final Connection con = conManager.getConnection(Boolean.FALSE)) {\n\t\t\t\ttry (final PreparedStatement pstmt = con.prepareStatement(\"DROP SCHEMA IF EXISTS campina\")) {\n\t\t\t\t\tpstmt.executeUpdate();\n\t\t\t\t}\n\t\t\t\tfor (String string : statements) {\n\t\t\t\t\tlog.info(\"Executing ddl: \" + string);\n\t\t\t\t\ttry (final PreparedStatement pstmt = con.prepareStatement(string)) {\n\t\t\t\t\t\tpstmt.executeUpdate();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\tthrow new IllegalStateException(\"Could not setup db\", e);\n\t\t\t}\n\t\t} catch (Throwable e) {\n\t\t\tlog.error(\"Could not setup database\", e);\n\t\t\tthrow new IllegalStateException(\"ddl file load failed\", e);\n\t\t}\n\t\tlog.info(\"------------------------------------------\");\n\t\tlog.info(\"Initialization database finished\");\n\t\tlog.info(\"------------------------------------------\");\n\t}",
"public void init() {\n\r\n\t\ttry {\r\n\r\n\t\t\t//// 등록한 bean 에 있는 datasource를 가져와서 Connection을 받아온다\r\n\t\t\tcon = ds.getConnection();\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}",
"@Override\n public void initializeConnection() throws SQLException, ClassNotFoundException {\n \n Class.forName(\"com.mysql.jdbc.Driver\");\n //setConnection(DriverManager.getConnection(\"jdbc:mysql://localhost/rabidusDB\",\"root\",\"password\"));\n setConnection(DriverManager.getConnection( host + \":3306/\" + databaseName, user, password));\n \n }",
"public RequisicaoDAO() {\n em = JPAUtil.initConnection();\n }",
"public FormConnexio(String url, String bdd, String usuari, String contrasenya) {\n initComponents();\n configuracio(url, bdd, usuari, contrasenya);\n }",
"private DatabaseConnectionService() {\n ds = new HikariDataSource();\n ds.setMaximumPoolSize(20);\n ConfigProperties configProperties = ConfigurationLoader.load();\n if (configProperties == null) {\n throw new RuntimeException(\"Unable to read the config.properties.\");\n }\n ds.setDriverClassName(configProperties.getDatabaseDriverClassName());\n ds.setJdbcUrl(configProperties.getDatabaseConnectionUrl());\n ds.addDataSourceProperty(\"user\", configProperties.getDatabaseUsername());\n ds.addDataSourceProperty(\"password\", configProperties.getDatabasePassword());\n ds.setAutoCommit(false);\n }",
"@Before\n public void inicializaBaseDatos() throws Exception {\n app = Helpers.fakeApplication(settings());\n databaseTester = new JndiDatabaseTester(\"DefaultDS\");\n IDataSet initialDataSet = new FlatXmlDataSetBuilder().build(new\n FileInputStream(\"test/resources/tareas_dataset_1.xml\"));\n databaseTester.setDataSet(initialDataSet);\n databaseTester.onSetup();\n }",
"@WebMethod\t\r\n\t public void initializeBD(){\r\n\t\tDataAccess dBManager=new DataAccess();\r\n\t\tdBManager.initializeDB();\r\n\t\tdBManager.close();\r\n\t}",
"public BaseDatos(String url, String user, String pass) {\n \n //asignacion de los atributos de clase\n this.url = url;\n this.user = user;\n this.pass = pass;\n \n try{\n Class.forName(\"com.mysql.jdbc.Driver\"); // importamos el driver de la base de datos \n conexion= DriverManager.getConnection(url,user,pass); // creamos la conexion a la base de datos\n }catch(SQLException e){\n System.out.println(\"Error de sql:_ \"+e.getMessage());\n }catch(ClassNotFoundException ex){\n System.out.println(\"No se pudo cargar el driver MySQL:_\"+ex.getMessage());\n }\n \n }",
"public OnibusDAO() {}",
"public DatabaseConfig(String conf) throws InvalidConnectionDataException {\n if (conf == null) {\n throw new InvalidConnectionDataException();\n }\n\n HashMap<String, String> map = new HashMap<>();\n\n try (Stream<String> stream = Files.lines(Paths.get(conf))) {\n stream.forEach(line -> addToMap(line, map));\n } catch (IOException e) {\n throw new InvalidConnectionDataException();\n }\n assignFields(map);\n validateFields();\n }",
"public void configs() {\n adaptadorRecyclerView = new AdaptadorRecyclerView(new ArrayList<>(), this);//configuramos el adaptador; necesitamos implementar interfaz OnItemClickListener y sobreescribir sus metodos\n recyclerView.setLayoutManager(new LinearLayoutManager(this));//configuramos la recyclerView\n recyclerView.setAdapter(adaptadorRecyclerView);\n }",
"public void editConfig(DatabaseConfig databaseConfig) {\n }",
"public setup() {\n dbConnection = \"jdbc:\"+DEFAULT_DB_TYPE+\"://\"+DEFAULT_DB_HOST+\":\"+DEFAULT_DB_PORT+\"/\"+DEFAULT_DB_PATH;\n dbType = DEFAULT_DB_TYPE;\n dbUser = DEFAULT_DB_USER;\n dbPass = DEFAULT_DB_PASSWORD;\n beginSetup();\n }",
"public CadastroDeEmpresa() {\n initComponents();\n preencherTabela(\"select * from empresa order by id\");\n }",
"public TelaEmpresa() {\n initComponents();\n conexao = ModuloConexao.conector();\n }",
"@WebMethod\n\tpublic void initializeBD() {\n\t\tdbManager.open(false);\n\t\tdbManager.initializeDB();\n\t\tdbManager.close();\n\t}",
"public BemPessoaDAOImpl() {\n\t\tsuper(\"PESQUISAR_BEM_PESSOA\");\n\t}",
"public void setDatabase(Connection _db);",
"@PostConstruct\n\tpublic void init() {\n\t\t/*\n\t\t * Esta parte se usó para añadir alumnos, senseis y cursos de prueba cuando la\n\t\t * base de datos usaba create-drop, ahora que los datos son persitentes no es\n\t\t * necesario, dejo aqui esta parte del código por si os fueran de utilidad para\n\t\t * realizar algunas pruebas durante las correcciones.\n\t\t * \n\t\t * Alumno a = new Alumno(\"Jorge\", \"Garrido\", \"Rodríguez\", \"[email protected]\",\n\t\t * \"20072517A\", \"651666999\", LocalDate.of(1997, 04, 02), \"Cádiz\", 11550,\n\t\t * \"Chipiona\", \"Avd/Almería 74\", \"\", \"Marrón-Negro\", LocalDate.now(), \"Si\",\n\t\t * \"Alergia estacional\"); Alumno b = new Alumno(\"Sara\", \"Clarke\", \"Swuch\",\n\t\t * \"[email protected]\", \"00055521J\", \"000555444\", LocalDate.of(1999, 05, 19),\n\t\t * \"Cádiz\", 12550, \"Jerez\", \"Calle fino\", \"\", \"Azul\", LocalDate.now(), \"Si\",\n\t\t * \"\"); Alumno c = new Alumno(\"Antonio\", \"Peinado\", \"Rodríguez\",\n\t\t * \"[email protected]\", \"01247857H\", \"651666999\", LocalDate.of(1998, 05, 19),\n\t\t * \"Cádiz\", 11550, \"Chipiona\", \"calle girasol,20\", \"\", \"Blanco\",\n\t\t * LocalDate.now(), \"No\", \"Asma\"); Alumno d = new Alumno(\"Marina\", \"Figueroa\",\n\t\t * \"Flores\", \"[email protected]\", \"57489624G\", \"651666999\", LocalDate.of(1994,\n\t\t * 05, 19), \"Cádiz\", 11550, \"Chipiona\", \"AVD/Rosaleda sn\", \"\", \"Marrón\",\n\t\t * LocalDate.now(), \"No\", \"\"); Alumno e = new Alumno(\"Daniel\", \"Villanueva\",\n\t\t * \"Garcia\", \"[email protected]\", \"3333333E\", \"651666999\", LocalDate.of(1988,\n\t\t * 05, 19), \"Cádiz\", 11550, \"Chipiona\", \"Avd/Miguel Cervantes, 52\", \"\", \"Negro\",\n\t\t * LocalDate.now(), \"Si\", \"\"); Alumno f = new Alumno(\"Lorena\", \"Cespedes\",\n\t\t * \"Roman\", \"[email protected]\", \"2222222D\", \"651666999\", LocalDate.of(1989,\n\t\t * 05, 19), \"Cádiz\", 11550, \"Chipiona\", \"Avd/Andalucía,15\", \"\", \"Amarillo\",\n\t\t * LocalDate.now(), \"Si\", \"\"); Alumno g = new Alumno(\"Sergio\", \"Arques\",\n\t\t * \"Tubio\", \"[email protected]\", \"1111111C\", \"651666999\", LocalDate.of(1996,\n\t\t * 05, 19), \"Cádiz\", 11550, \"Chipiona\", \"calle/ Castaño, 10\", \"\", \"Verde\",\n\t\t * LocalDate.now(), \"No\", \"\"); Alumno h = new Alumno(\"Elon\", \"Musk\", \"Ramirez\",\n\t\t * \"[email protected]\", \"0000000B\", \"651666999\", LocalDate.of(2004, 05, 19),\n\t\t * \"Cádiz\", 11550, \"Chipiona\", \"Avd/Neptuno, 7\", \"\", \"Blanco-Amarillo\",\n\t\t * LocalDate.now(), \"No\", \"\");\n\t\t * \n\t\t * alumnoServicio.save(a); alumnoServicio.save(b); alumnoServicio.save(c);\n\t\t * alumnoServicio.save(d); alumnoServicio.save(e); alumnoServicio.save(f);\n\t\t * alumnoServicio.save(g); alumnoServicio.save(h);\n\t\t * \n\t\t * Curso nuevoA = new Curso(2021, \"Juveniles\", 25.00); Curso nuevoB = new\n\t\t * Curso(2021, \"Alevines\", 25.00); Curso nuevoC = new Curso(2021, \"Adultos\",\n\t\t * 30.00);\n\t\t * \n\t\t * cursoServicio.save(nuevoA); cursoServicio.save(nuevoB);\n\t\t * cursoServicio.save(nuevoC);\n\t\t * \n\t\t * Sensei sa = new Sensei(\"Jose María\", null, null, null, null, null, null,\n\t\t * null, 0, null, null, null, \"Negro 1 DAN\", 1150.00); Sensei sb = new\n\t\t * Sensei(\"Ramón\", null, null, null, null, null, null, null, 0, null, null,\n\t\t * null, \"Negro 5 DAN\", 1150.00); Sensei sc = new Sensei(\"Abraham\", null, null,\n\t\t * null, null, null, null, null, 0, null, null, null, \"Negro 3 DAN\", 1150.00);\n\t\t * \n\t\t * senseiServicio.save(sa); senseiServicio.save(sb); senseiServicio.save(sc);\n\t\t * \n\t\t * sa.addCurso(nuevoA); cursoServicio.edit(nuevoA);\n\t\t * \n\t\t * sb.addCurso(nuevoB); cursoServicio.edit(nuevoB);\n\t\t * \n\t\t * sc.addCurso(nuevoC); cursoServicio.edit(nuevoC);\n\t\t * \n\t\t * nuevoC.addAlumno(a); alumnoServicio.edit(a);\n\t\t * \n\t\t * nuevoA.addAlumno(b); alumnoServicio.edit(b);\n\t\t * \n\t\t * nuevoB.addAlumno(c); alumnoServicio.edit(c);\n\t\t * \n\t\t * nuevoC.addAlumno(d); alumnoServicio.edit(d);\n\t\t * \n\t\t * nuevoC.addAlumno(e); alumnoServicio.edit(e);\n\t\t * \n\t\t * nuevoA.addAlumno(f); alumnoServicio.edit(f); nuevoA.addAlumno(g);\n\t\t * alumnoServicio.edit(g);\n\t\t * \n\t\t * nuevoA.addAlumno(h); alumnoServicio.edit(h);\n\t\t */\n\t}",
"private void setupDatabase() throws SQLException {\n\t\tdb.open(\"localhost\", 3306, \"wow\", \"greeneconomyapple\");\n\t\tdb.use(\"auctionscan\");\n\t}",
"public static void SetupORM(Connection con) {\n // Add all ORM models here\n User.Initialize(con);\n Milestone.Initialize(con);\n Planner.Initialize(con);\n }",
"public void onConfigure(dbHelper helper){\n\n }",
"public CadastroPessoas() throws ClassNotFoundException, SQLException {\n initComponents();\n modeloModel = (DefaultTableModel) tabelaPessoa.getModel();\n updateTabela();\n\n \n \n }",
"public ConectarBD(String pNombreServidor, String pNumeroPuerto, String pNombreBD, String pUsuario, String pPassword) {\n try {\n Class.forName(\"org.postgresql.Driver\").newInstance();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n try {\n String cone = \"jdbc:postgresql://\" + pNombreServidor + \":\" + pNumeroPuerto + \"/\" + pNombreBD;\n dbConecta = DriverManager.getConnection(cone, pUsuario, pPassword);\n } catch (SQLException sqlEx) {\n sqlEx.printStackTrace();\n }\n }",
"public vistaAlojamientos() {\n initComponents();\n \n try {\n miConn = new Conexion(\"jdbc:mysql://localhost/turismo\", \"root\", \"\");\n ad = new alojamientoData(miConn);\n \n } catch (ClassNotFoundException ex) {\n Logger.getLogger(vistaAlojamientos.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n \n }",
"public static void abrirConexao() throws SQLException {\n\t\tDriverManager.registerDriver(new FBDriver());\n\t\tobjcon = DriverManager.getConnection(\n\t\t\t\t\"jdbc:firebirdsql:server1b/3050:D:/PROGRAM FILES/FIREBIRD/LTP4/BDVendas.GDB\", \n\t\t\t\t\"SYSDBA\", \"masterkey\");\n\t}",
"public DataBaseConnector()\n {\n dataSource = new SQLServerDataSource();\n dataSource.setServerName(\"EASV-DB2\");\n dataSource.setPortNumber(1433);\n dataSource.setDatabaseName(\"AutistMovies\");\n dataSource.setUser(\"CS2017A_15\");\n dataSource.setPassword(\"Bjoernhart1234\");\n }",
"public AppModel() throws SQLException, ClassNotFoundException, IOException {\n modelLogger.debug(\"Mode logger\");\n dataBaseConnector = new DataBaseDownloader(\"jdbc:mysql://mysql.agh.edu.pl:3306/mtobiasz\",\"mtobiasz\", \"csjH6UN5BPS7VvYY\");\n String buyTableName = \"exchange_buy\";\n String sellTableName = \"exchange_sell\";\n buyMap = dataBaseConnector.getKeysAndVals(buyTableName);\n sellMap = dataBaseConnector.getKeysAndVals(sellTableName);\n }",
"public DatabaseConnector() {\n HikariConfig config = new HikariConfig();\n config.setJdbcUrl(\"jdbc:postgresql://localhost:5547/go_it_homework\");\n config.setUsername(\"postgres\");\n config.setPassword(\"Sam@64hd!+4\");\n this.ds = new HikariDataSource(config);\n ds.setMaximumPoolSize(5);\n }",
"private void initConfig() throws DatabaseAccessException {\n\t\tStatement stmt = null;\n\n\t\ttry {\n\t\t\tstmt = this.connection.createStatement();\n\n\t\t\t// With synchronous OFF, SQLite continues without syncing\n\t\t\t// as soon as it has handed data off to the operating system.\n\t\t\tstmt.execute(\"PRAGMA synchronous = OFF;\");\n\n\t\t\t// The MEMORY journaling mode stores the rollback journal in volatile RAM.\n\t\t\t// This saves disk I/O but at the expense of database safety and integrity.\n\t\t\tstmt.execute(\"PRAGMA journal_mode = MEMORY;\");\n\n\t\t\t// The journal_size_limit pragma may be used to limit the size of rollback-journal.\n\t\t\t// -1 means no limit.\n\t\t\tstmt.execute(\"PRAGMA journal_size_limit = -1;\");\n\n\t\t\t// If the argument N is negative, then the number of cache pages\n\t\t\t// is adjusted to use approximately N*1024 bytes of memory.\n\t\t\tstmt.execute(\"PRAGMA cache_size = -50000;\");\n\n\t\t\t// Once an encoding has been set for a database, it cannot be changed.\n\t\t\tstmt.execute(\"PRAGMA encoding = \\\"UTF-8\\\";\");\n\n\t\t\t// When temp_store is MEMORY temporary tables and indices are kept\n\t\t\t// in as if they were pure in-memory databases memory.\n\t\t\tstmt.execute(\"PRAGMA temp_store = MEMORY;\");\n\n\t\t\tstmt.close();\n\n\t\t} catch (SQLException e) {\n\t\t\tthrow new DatabaseAccessException(Failure.CONFIG);\n\t\t}\n\t}"
] | [
"0.68723744",
"0.6594592",
"0.6149901",
"0.6127034",
"0.60059685",
"0.59899104",
"0.59577966",
"0.5849833",
"0.5818573",
"0.5816633",
"0.58098584",
"0.5785404",
"0.5770526",
"0.5758038",
"0.56933945",
"0.5685397",
"0.566851",
"0.5663755",
"0.56325054",
"0.5626456",
"0.561082",
"0.5604726",
"0.5583373",
"0.5575891",
"0.5572533",
"0.5571847",
"0.55087996",
"0.54753006",
"0.5472617",
"0.54507965",
"0.54455435",
"0.54430485",
"0.54361373",
"0.541309",
"0.5409211",
"0.5406746",
"0.53988624",
"0.538962",
"0.53829795",
"0.53827673",
"0.5365399",
"0.5363827",
"0.5359644",
"0.5355405",
"0.53536236",
"0.534975",
"0.5345447",
"0.5344382",
"0.5336201",
"0.53273255",
"0.53219825",
"0.5320044",
"0.53158695",
"0.53096366",
"0.5307889",
"0.5300663",
"0.5295198",
"0.5294687",
"0.5293029",
"0.5285617",
"0.5275724",
"0.52627224",
"0.5256241",
"0.5255174",
"0.52524984",
"0.52442884",
"0.5241069",
"0.5240901",
"0.5233843",
"0.52257735",
"0.52240294",
"0.5221924",
"0.5220719",
"0.5213944",
"0.5207567",
"0.5207141",
"0.52031136",
"0.5199193",
"0.5194694",
"0.5190509",
"0.51891375",
"0.518595",
"0.5183932",
"0.5179225",
"0.51746523",
"0.51739705",
"0.51685923",
"0.5168363",
"0.51656723",
"0.5163514",
"0.51586175",
"0.5156929",
"0.515609",
"0.5150862",
"0.5150254",
"0.5149023",
"0.51472014",
"0.51409316",
"0.5140208",
"0.5138238"
] | 0.58110046 | 10 |
Test that waiting on a request that never completes times out | @Test
public void testTimeout() throws Exception {
ProduceRequestResult request = new ProduceRequestResult(topicPartition);
FutureRecordMetadata future = new FutureRecordMetadata(request, relOffset,
RecordBatch.NO_TIMESTAMP, 0, 0, Time.SYSTEM);
assertFalse(future.isDone(), "Request is not completed");
try {
future.get(5, TimeUnit.MILLISECONDS);
fail("Should have thrown exception.");
} catch (TimeoutException e) { /* this is good */
}
request.set(baseOffset, RecordBatch.NO_TIMESTAMP, null);
request.done();
assertTrue(future.isDone());
assertEquals(baseOffset + relOffset, future.get().offset());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void timeoutInactiveRequests() throws Exception {\n final Semaphore semaphore = new Semaphore(1);\n final int responseSize = 16;\n RpcHandler handler = new RpcHandler() {\n @Override\n public void receive(\n TransportClient client,\n ByteBuffer message,\n RpcResponseCallback callback) {\n try {\n semaphore.acquire();\n callback.onSuccess(ByteBuffer.allocate(responseSize));\n } catch (InterruptedException e) {\n // do nothing\n }\n }\n\n @Override\n public StreamManager getStreamManager() {\n return defaultManager;\n }\n };\n\n context = new TransportContext(conf, handler);\n server = context.createServer();\n clientFactory = context.createClientFactory();\n TransportClient client = clientFactory.createClient(TestUtils.getLocalHost(), server.getPort());\n\n // First completes quickly (semaphore starts at 1).\n TestCallback callback0 = new TestCallback();\n client.sendRpc(ByteBuffer.allocate(0), callback0);\n callback0.latch.await();\n assertEquals(responseSize, callback0.successLength);\n\n // Second times out after 10 seconds, with slack. Must be IOException.\n TestCallback callback1 = new TestCallback();\n client.sendRpc(ByteBuffer.allocate(0), callback1);\n callback1.latch.await(60, TimeUnit.SECONDS);\n assertNotNull(callback1.failure);\n assertTrue(callback1.failure instanceof IOException);\n\n semaphore.release();\n }",
"@Test\n public void furtherRequestsDelay() throws Exception {\n final byte[] response = new byte[16];\n final StreamManager manager = new StreamManager() {\n @Override\n public ManagedBuffer getChunk(long streamId, int chunkIndex) {\n Uninterruptibles.sleepUninterruptibly(FOREVER, TimeUnit.MILLISECONDS);\n return new NioManagedBuffer(ByteBuffer.wrap(response));\n }\n };\n RpcHandler handler = new RpcHandler() {\n @Override\n public void receive(\n TransportClient client,\n ByteBuffer message,\n RpcResponseCallback callback) {\n throw new UnsupportedOperationException();\n }\n\n @Override\n public StreamManager getStreamManager() {\n return manager;\n }\n };\n\n context = new TransportContext(conf, handler);\n server = context.createServer();\n clientFactory = context.createClientFactory();\n TransportClient client = clientFactory.createClient(TestUtils.getLocalHost(), server.getPort());\n\n // Send one request, which will eventually fail.\n TestCallback callback0 = new TestCallback();\n client.fetchChunk(0, 0, callback0);\n Uninterruptibles.sleepUninterruptibly(1200, TimeUnit.MILLISECONDS);\n\n // Send a second request before the first has failed.\n TestCallback callback1 = new TestCallback();\n client.fetchChunk(0, 1, callback1);\n Uninterruptibles.sleepUninterruptibly(1200, TimeUnit.MILLISECONDS);\n\n // not complete yet, but should complete soon\n assertEquals(-1, callback0.successLength);\n assertNull(callback0.failure);\n callback0.latch.await(60, TimeUnit.SECONDS);\n assertTrue(callback0.failure instanceof IOException);\n\n // make sure callback1 is called.\n callback1.latch.await(60, TimeUnit.SECONDS);\n // failed at same time as previous\n assertTrue(callback1.failure instanceof IOException);\n }",
"void await(long timeout, TimeUnit unit) throws InterruptedException;",
"void await(long timeout, TimeUnit timeUnit) throws InterruptedException;",
"private static boolean testNotFound() {\r\n\t\t// use ExecutorService to manage threads\r\n\t\tExecutorService executor = Executors.newFixedThreadPool(1);\r\n\t\t\r\n\t\tlogger.finest(\"sending request\");\r\n\t\tURL url = urlList.get(0);\r\n\t\t\r\n\t\ttry {\r\n\t\t\tURL notFoundURL = new URL(url.getProtocol(), url.getHost(), url.getPort(), url.getFile() + \"random\");\r\n\t\t\tHttpClient client = new HttpClient(notFoundURL);\r\n\t\t\texecutor.execute(client);\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t\tlogger.severe(\"problem formatting URL\");\r\n\t\t}\r\n\t\t\r\n\t\t// wait for test to finish\r\n\t\tlogger.finest(\"waiting for request to complete...\");\r\n\t\texecutor.shutdown(); \r\n\t\twhile (!executor.isTerminated())\r\n\t\t\tThread.yield(); // return the control to system\r\n\t\tlogger.finest(\"not found request completed\");\r\n\t\t\r\n\t\treturn true;\r\n\t}",
"public void testHttpFailureRetries() {\n delayTestFinish(RUNASYNC_TIMEOUT);\n runAsync1(0);\n }",
"@Test\r\n void timeoutNotExceeded() {\n assertTimeout(ofMinutes(2), () -> {\r\n // Perform task that takes less than 2 minutes.\r\n });\r\n }",
"private static boolean testBadRequest() {\r\n\t\t// use ExecutorService to manage threads\r\n\t\tExecutorService executor = Executors.newFixedThreadPool(1);\r\n\t\t\r\n\t\t// send all rquests sequentially\r\n\t\tlogger.finest(\"sending bad requests\");\r\n\t\tURL url = urlList.get(0);\r\n\t\t\r\n\t\tfor (String request : badRequests) { \r\n\t\t\tHttpHandler client = new HttpHandler(request, url);\r\n\t\t\texecutor.execute(client);\r\n\t\t}\r\n\t\t\r\n\t\t// wait for test to finish\r\n\t\tlogger.finest(\"waiting for requests to complete...\");\r\n\t\texecutor.shutdown(); \r\n\t\twhile (!executor.isTerminated())\r\n\t\t\tThread.yield(); // return the control to system\r\n\t\tlogger.finest(\"all bad requests completed\");\r\n\t\t\r\n\t\treturn true;\r\n\t}",
"public Status waitUntilFinished();",
"Future timeoutIn(long timeout, TimeUnit timeUnit);",
"void await(long timeout, TimeUnit timeUnit)\n throws InterruptedException;",
"V get(long timeout, TimeUnit timeUnit) throws PromiseBrokenException, TimeoutException, InterruptedException;",
"public boolean awaitUninterruptibly(long timeout, TimeUnit unit)\r\n/* 279: */ {\r\n/* 280: */ try\r\n/* 281: */ {\r\n/* 282:307 */ return await0(unit.toNanos(timeout), false);\r\n/* 283: */ }\r\n/* 284: */ catch (InterruptedException e)\r\n/* 285: */ {\r\n/* 286:310 */ throw new InternalError();\r\n/* 287: */ }\r\n/* 288: */ }",
"@Test\r\n public void test_stop() throws InterruptedException {\r\n final CountDownLatch expectedTimeoutReceivedLatch = new CountDownLatch(1);\r\n final CountDownLatch timeoutWhichShouldNeverBeReceivedLatch = new CountDownLatch(2);\r\n final IExpiryAction<Long> timeoutAction = new IExpiryAction<Long>() {\r\n @Override\r\n public void onTimeout(final Long payload) {\r\n //\r\n // count-down our latches. The first latch only requires one\r\n // invocation, the second expects two (though the second should\r\n // never be received)\r\n //\r\n expectedTimeoutReceivedLatch.countDown();\r\n timeoutWhichShouldNeverBeReceivedLatch.countDown();\r\n }\r\n };\r\n\r\n final int taskTimeout = 100;\r\n final ExpiryViceroy<Long> timeoutManager = ExpiryViceroy.start(timeoutAction, taskTimeout,\r\n TimeUnit.MILLISECONDS);\r\n\r\n //\r\n // ensure it's running - add a task which will expire\r\n //\r\n timeoutManager.onStartTask(Long.valueOf(1));\r\n final boolean timeoutReached = expectedTimeoutReceivedLatch.await(1, TimeUnit.SECONDS);\r\n Assert.assertTrue(\"timeout reached\", timeoutReached);\r\n\r\n //\r\n // now kill the timeout manager ...\r\n //\r\n timeoutManager.stop();\r\n\r\n //\r\n // ... and submit another task.\r\n //\r\n timeoutManager.onStartTask(Long.valueOf(2));\r\n final boolean timeoutNeverReceived = timeoutWhichShouldNeverBeReceivedLatch.await(taskTimeout + 100,\r\n TimeUnit.MILLISECONDS);\r\n Assert.assertFalse(\"a second timeout should never have been called\", timeoutNeverReceived);\r\n }",
"public void testFairTimedOffer() {\n final SynchronousQueue q = new SynchronousQueue(true);\n Thread t = new Thread(new Runnable() {\n public void run() {\n try {\n\n threadAssertFalse(q.offer(new Object(), SHORT_DELAY_MS, TimeUnit.MILLISECONDS));\n q.offer(new Object(), LONG_DELAY_MS, TimeUnit.MILLISECONDS);\n\t\t\tthreadShouldThrow();\n } catch (InterruptedException success){}\n }\n });\n\n try {\n t.start();\n Thread.sleep(SMALL_DELAY_MS);\n t.interrupt();\n t.join();\n } catch (Exception e){\n unexpectedException();\n }\n }",
"public void testTimedOffer() {\n final SynchronousQueue q = new SynchronousQueue();\n Thread t = new Thread(new Runnable() {\n public void run() {\n try {\n\n threadAssertFalse(q.offer(new Object(), SHORT_DELAY_MS, TimeUnit.MILLISECONDS));\n q.offer(new Object(), LONG_DELAY_MS, TimeUnit.MILLISECONDS);\n\t\t\tthreadShouldThrow();\n } catch (InterruptedException success){}\n }\n });\n\n try {\n t.start();\n Thread.sleep(SMALL_DELAY_MS);\n t.interrupt();\n t.join();\n } catch (Exception e){\n unexpectedException();\n }\n }",
"public void testFairInterruptedTimedPoll() {\n Thread t = new Thread(new Runnable() {\n public void run() {\n try {\n SynchronousQueue q = new SynchronousQueue(true);\n assertNull(q.poll(SHORT_DELAY_MS, TimeUnit.MILLISECONDS));\n } catch (InterruptedException success){\n }\n }});\n t.start();\n try {\n Thread.sleep(SHORT_DELAY_MS);\n t.interrupt();\n t.join();\n }\n catch (InterruptedException ie) {\n\t unexpectedException();\n }\n }",
"@Test\n public void testConnectionNoIdleTimeout() throws Exception {\n long timeoutMillis = TimeUnit.SECONDS.toMillis(CONNECTION_IDLE_TIMEOUT_SECS) + 500;\n URL url = new URL(resolveURI(\"/v1/timeout/\" + timeoutMillis));\n HttpURLConnection urlConnection = openURL(url);\n Assert.assertEquals(200, urlConnection.getResponseCode());\n urlConnection.disconnect();\n }",
"private void checkTimeout() {\n/* 169 */ if (this.socket != null) {\n/* */ \n/* 171 */ long i = this.keepaliveTimeoutMs;\n/* */ \n/* 173 */ if (this.listRequests.size() > 0)\n/* */ {\n/* 175 */ i = 5000L;\n/* */ }\n/* */ \n/* 178 */ long j = System.currentTimeMillis();\n/* */ \n/* 180 */ if (j > this.timeLastActivityMs + i)\n/* */ {\n/* 182 */ terminate(new InterruptedException(\"Timeout \" + i));\n/* */ }\n/* */ } \n/* */ }",
"void awaitNanos(final long timeout) throws InterruptedException;",
"int hardTimeout();",
"public abstract boolean await(long timeout, TimeUnit unit)\n\t\t\tthrows InterruptedException;",
"@Test\n public void testTakeWillWaitTillSubmitCompletes() {\n final BoundedCompletionService<String> ecs = new BoundedCompletionService<String>(\n new ExecutorCompletionService<String>(e));\n final int delaySecs = 1;\n try {\n Assert.assertNull(ecs.poll());\n Thread t = new Thread() {\n @Override\n public void run() {\n ecs.submit(new StringDelayableCallable(\"String delayab\", delaySecs));\n }\n };\n t.start();\n long t1 = System.nanoTime();\n Future<String> f = ecs.take();\n Assert.assertNotNull(f);\n Assert.assertTrue(f.isDone());\n long t2 = System.nanoTime();\n System.out.println(t2 - t1);\n Assert.assertTrue(t2 > t1 + delaySecs * 100000000L); // Need to check that take will wait till submit completes\n } catch (Exception ex) {\n unexpectedException();\n }\n }",
"boolean awaitMessages(long timeout) throws InterruptedException;",
"private void waitFor(long nanos) throws TimeoutException {\n if (done) {\n return;\n }\n\n synchronized (waitObj) {\n long waitTo = System.nanoTime() + nanos;\n while (!done) {\n nanos = waitTo - System.nanoTime();\n if (nanos <= 0) {\n throw new TimeoutException();\n }\n try {\n waitObj.wait(nanos / 1000000, (int) (nanos % 1000000));\n } catch (InterruptedException ex) {\n ex.printStackTrace(System.err);\n }\n }\n }\n if (excpetion != null) {\n throw excpetion;\n }\n }",
"@Test\n public void testTakeWontWaitWithinSemaphoreSize() {\n final int factor = 4;\n final int semaphoreSize = 5;\n final int iterations = semaphoreSize * factor;\n final BoundedCompletionService<String> ecs = new BoundedCompletionService<String>(\n new ExecutorCompletionService<String>(e), semaphoreSize);\n final int delaySecs = 1;\n try {\n Assert.assertNull(ecs.poll());\n Thread t = new Thread() {\n @Override\n public void run() {\n for (int i = 0; i < iterations; i++)\n ecs.submit(new StringDelayableCallable(\"String delayab\", delaySecs));\n }\n };\n t.start();\n for (int i = 0; i < factor; i++)\n for (int j = 0; j < semaphoreSize; j++) {\n long t1 = System.nanoTime();\n Future<String> f = ecs.take();\n long t2 = System.nanoTime();\n Assert.assertNotNull(f);\n Assert.assertTrue(f.isDone());\n System.out.println(\"t2-t1(ms):\" + (t2 - t1) / 1000000L);\n if (j == 0)\n Assert.assertTrue((t2 - t1) / 1000000L > 0L); // it should be milliseconds at the boundary of semaphore size\n else {\n Assert.assertTrue((t2 - t1) / 100000000L == 0L);//it should not be decaseconds\n Assert.assertTrue((t2 - t1) / 1000L > 0L); //it should be in microseconds here\n }\n }\n } catch (Exception ex) {\n unexpectedException();\n }\n }",
"@Test\r\n public void test_callbackInvokedWhenATaskExpires() throws InterruptedException {\r\n final List<String> timeouts = new ArrayList<String>();\r\n final IExpiryAction<String> action = new IExpiryAction<String>() {\r\n @Override\r\n public void onTimeout(final String payload) {\r\n timeouts.add(payload);\r\n }\r\n };\r\n final int taskTimeout = 100;\r\n final ExpiryViceroy<String> viceroy = ExpiryViceroy.start(action, taskTimeout, TimeUnit.MILLISECONDS);\r\n\r\n //\r\n // start/complete a load of tasks which won't expire,\r\n // unless for some reason the code below manages to take longer\r\n // than a second to complete!\r\n //\r\n final long start = System.currentTimeMillis();\r\n final Collection<Delayed> tasks = new ArrayList<Delayed>();\r\n for (int i = 10; --i >= 0;) {\r\n final Delayed task = viceroy.onStartTask(\"Task \" + i);\r\n tasks.add(task);\r\n }\r\n for (final Delayed task : tasks) {\r\n viceroy.onTaskComplete(task);\r\n }\r\n final long duration = System.currentTimeMillis() - start;\r\n\r\n if (duration >= taskTimeout) {\r\n final String errorFormat = \"PRECONDITION FAILED: The test code was expected to take less than %dms, but it took %dms\";\r\n final String message = String.format(errorFormat, Long.valueOf(taskTimeout), Long.valueOf(duration));\r\n Assert.assertTrue(message, duration < taskTimeout);\r\n }\r\n Assert.assertTrue(\"No tasks should've timed out\", timeouts.isEmpty());\r\n\r\n //\r\n // now start a task which will expire\r\n //\r\n final String timeoutPayload = \"this will timeout!\";\r\n final Delayed task = viceroy.onStartTask(timeoutPayload);\r\n\r\n Thread.sleep(taskTimeout * 2); // allow it to time-out\r\n\r\n // confirm the task complete, but it's too late.\r\n viceroy.onTaskComplete(task);\r\n\r\n Assert.assertEquals(\"A timeout was expected\", Integer.valueOf(1), Integer.valueOf(timeouts.size()));\r\n Assert.assertEquals(timeoutPayload, timeouts.get(0));\r\n\r\n viceroy.stop();\r\n }",
"@Test\n public void timeoutCleanlyClosesClient() throws Exception {\n final Semaphore semaphore = new Semaphore(0);\n final int responseSize = 16;\n RpcHandler handler = new RpcHandler() {\n @Override\n public void receive(\n TransportClient client,\n ByteBuffer message,\n RpcResponseCallback callback) {\n try {\n semaphore.acquire();\n callback.onSuccess(ByteBuffer.allocate(responseSize));\n } catch (InterruptedException e) {\n // do nothing\n }\n }\n\n @Override\n public StreamManager getStreamManager() {\n return defaultManager;\n }\n };\n\n context = new TransportContext(conf, handler);\n server = context.createServer();\n clientFactory = context.createClientFactory();\n\n // First request should eventually fail.\n TransportClient client0 =\n clientFactory.createClient(TestUtils.getLocalHost(), server.getPort());\n TestCallback callback0 = new TestCallback();\n client0.sendRpc(ByteBuffer.allocate(0), callback0);\n callback0.latch.await();\n assertTrue(callback0.failure instanceof IOException);\n assertFalse(client0.isActive());\n\n // Increment the semaphore and the second request should succeed quickly.\n semaphore.release(2);\n TransportClient client1 =\n clientFactory.createClient(TestUtils.getLocalHost(), server.getPort());\n TestCallback callback1 = new TestCallback();\n client1.sendRpc(ByteBuffer.allocate(0), callback1);\n callback1.latch.await();\n assertEquals(responseSize, callback1.successLength);\n assertNull(callback1.failure);\n }",
"@SmallTest\n @Test\n public void testNegotiationSuccessAndDoesNotTimeOut() {\n testNegotiationSuccess();\n\n mTestExecutorService.advanceTime(NEGOTIATION_TIMEOUT_MILLIS);\n\n // Even though we timeout period has passed, we should NOT have failed negotiation and the\n // state should remain negotiated.\n verify(mCallback, never()).onNegotiationFailed(eq(mDtmfTransport));\n assertEquals(DtmfTransport.STATE_NEGOTIATED, mDtmfTransport.getTransportState());\n }",
"@Test\n public void testPoll1() {\n \tBoundedCompletionService<String> ecs = new BoundedCompletionService<String>(\n new ExecutorCompletionService<String>(e));\n try {\n Assert.assertNull(ecs.poll());\n Callable<String> c = new StringTask();\n ecs.submit(c);\n Thread.sleep(SHORT_DELAY_MS);\n for (;;) {\n Future<String> f = ecs.poll();\n if (f != null) {\n Assert.assertTrue(f.isDone());\n break;\n }\n }\n } catch (Exception ex) {\n unexpectedException();\n }\n }",
"public void testTimedPoll() {\n try {\n SynchronousQueue q = new SynchronousQueue();\n assertNull(q.poll(SHORT_DELAY_MS, TimeUnit.MILLISECONDS));\n } catch (InterruptedException e){\n\t unexpectedException();\n\t}\n }",
"private void waitForServerReady() throws IOException, InterruptedException {\n\t\tfinal var httpget = new HttpGet(getPingUri());\n\t\tvar counter = 0;\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\tif (HttpStatus.SC_OK == httpclient.execute(httpget, HttpResponse::getCode)) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcheckRetries(counter);\n\t\t\t} catch (final HttpHostConnectException ex) { // NOSONAR - Wait, and check later\n\t\t\t\tlog.info(\"Check failed, retrying...\");\n\t\t\t\tcheckRetries(counter);\n\t\t\t}\n\t\t\tcounter++;\n\t\t}\n\t}",
"public void testTimedCallable() throws Exception {\n final ExecutorService[] executors = {\n Executors.newSingleThreadExecutor(),\n Executors.newCachedThreadPool(),\n Executors.newFixedThreadPool(2),\n Executors.newScheduledThreadPool(2),\n };\n\n final Runnable sleeper = new CheckedInterruptedRunnable() {\n public void realRun() throws InterruptedException {\n delay(LONG_DELAY_MS);\n }};\n\n List<Thread> threads = new ArrayList<Thread>();\n for (final ExecutorService executor : executors) {\n threads.add(newStartedThread(new CheckedRunnable() {\n public void realRun() {\n Future future = executor.submit(sleeper);\n assertFutureTimesOut(future);\n }}));\n }\n for (Thread thread : threads)\n awaitTermination(thread);\n for (ExecutorService executor : executors)\n joinPool(executor);\n }",
"public void testInterruptedTimedPoll() {\n Thread t = new Thread(new Runnable() {\n public void run() {\n try {\n SynchronousQueue q = new SynchronousQueue();\n assertNull(q.poll(SHORT_DELAY_MS, TimeUnit.MILLISECONDS));\n } catch (InterruptedException success){\n }\n }});\n t.start();\n try {\n Thread.sleep(SHORT_DELAY_MS);\n t.interrupt();\n t.join();\n }\n catch (InterruptedException ie) {\n\t unexpectedException();\n }\n }",
"@Override\n public boolean waitToProceed() {\n return false;\n }",
"public void testTimedPoll0() {\n try {\n SynchronousQueue q = new SynchronousQueue();\n assertNull(q.poll(0, TimeUnit.MILLISECONDS));\n } catch (InterruptedException e){\n\t unexpectedException();\n\t}\n }",
"@Test\n void testRequestInterleaving() throws Exception {\n final BlockerSync sync = new BlockerSync();\n testHandler.handlerBody =\n id -> {\n if (id == 1) {\n try {\n sync.block();\n } catch (InterruptedException e) {\n Thread.currentThread().interrupt();\n }\n }\n return CompletableFuture.completedFuture(new TestResponse(id.toString()));\n };\n\n // send first request and wait until the handler blocks\n final CompletableFuture<TestResponse> response1 =\n sendRequestToTestHandler(new TestRequest(1));\n sync.awaitBlocker();\n\n // send second request and verify response\n final CompletableFuture<TestResponse> response2 =\n sendRequestToTestHandler(new TestRequest(2));\n assertThat(response2.get().getStatus()).isEqualTo(\"2\");\n\n // wake up blocked handler\n sync.releaseBlocker();\n\n // verify response to first request\n assertThat(response1.get().getStatus()).isEqualTo(\"1\");\n }",
"void timedOut();",
"@Test\n @Timeout(1)\n void testTimeout() throws InterruptedException {\n TimeUnit.SECONDS.sleep(10);\n }",
"public boolean await(long timeout, TimeUnit unit)\r\n/* 235: */ throws InterruptedException\r\n/* 236: */ {\r\n/* 237:267 */ return await0(unit.toNanos(timeout), true);\r\n/* 238: */ }",
"public void testFairTimedPollWithOffer() {\n final SynchronousQueue q = new SynchronousQueue(true);\n Thread t = new Thread(new Runnable() {\n public void run() {\n try {\n threadAssertNull(q.poll(SHORT_DELAY_MS, TimeUnit.MILLISECONDS));\n q.poll(LONG_DELAY_MS, TimeUnit.MILLISECONDS);\n q.poll(LONG_DELAY_MS, TimeUnit.MILLISECONDS);\n\t\t\tthreadShouldThrow();\n } catch (InterruptedException success) { }\n }\n });\n try {\n t.start();\n Thread.sleep(SMALL_DELAY_MS);\n assertTrue(q.offer(zero, SHORT_DELAY_MS, TimeUnit.MILLISECONDS));\n t.interrupt();\n t.join();\n } catch (Exception e){\n unexpectedException();\n }\n }",
"int timeout();",
"@Test\r\n public void testSetTimeout() {\r\n // Not required\r\n }",
"@Test\n public void testSendingDataException_whenTimesOut() throws Throwable {\n final LinkedBlockingQueue<IMetricsUploadService> mockedResultsQueue =\n mock(LinkedBlockingQueue.class);\n when(mockedResultsQueue.poll(anyLong(), any())).thenReturn(null);\n\n AwMetricsLogUploader uploader = new AwMetricsLogUploader(\n /* waitForResults= */ true, /* useDefaultUploadQos= */ false);\n int status = uploader.log(SAMPLE_TEST_METRICS_LOG.toByteArray(), mockedResultsQueue);\n\n Assert.assertEquals(HttpURLConnection.HTTP_CLIENT_TIMEOUT, status);\n }",
"public void testTimedPollWithOffer() {\n final SynchronousQueue q = new SynchronousQueue();\n Thread t = new Thread(new Runnable() {\n public void run() {\n try {\n threadAssertNull(q.poll(SHORT_DELAY_MS, TimeUnit.MILLISECONDS));\n q.poll(LONG_DELAY_MS, TimeUnit.MILLISECONDS);\n q.poll(LONG_DELAY_MS, TimeUnit.MILLISECONDS);\n\t\t\tthreadShouldThrow();\n } catch (InterruptedException success) { }\n }\n });\n try {\n t.start();\n Thread.sleep(SMALL_DELAY_MS);\n assertTrue(q.offer(zero, SHORT_DELAY_MS, TimeUnit.MILLISECONDS));\n t.interrupt();\n t.join();\n } catch (Exception e){\n unexpectedException();\n }\n }",
"@Test\n public void testPoll2() {\n \tBoundedCompletionService<String> ecs = new BoundedCompletionService<String>(\n new ExecutorCompletionService<String>(e));\n try {\n Assert.assertNull(ecs.poll());\n Callable<String> c = new StringTask();\n ecs.submit(c);\n Future<String> f = ecs.poll(SHORT_DELAY_MS, TimeUnit.MILLISECONDS);\n if (f != null) Assert.assertTrue(f.isDone());\n } catch (Exception ex) {\n unexpectedException();\n }\n }",
"protected abstract void beforeWait();",
"public static void blockRequests() {\n\t\tsynchronized (isRunning) {\n\t\t\ttry {\n\t\t\t\tisRunning.set(false);\n\t\t\t\tisRunning.wait();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tisRunning.set(true);\n\t\t\t}\n\t\t}\n\t}",
"@Test\n public void testTakeBlocksWhenEmpty() throws InterruptedException {\n final int capacity = 10;\n final BoundedBuffer<Integer> bb = new BoundedBuffer<Integer>(capacity);\n\n Runnable task = new Runnable() {\n public void run() {\n try {\n bb.take();\n } catch (InterruptedException e) {\n assertEquals(InterruptedException.class, e.getClass());\n //e.printStackTrace();\n }\n }\n };\n\n Thread thread = new Thread(task);\n thread.start();\n\n\n Thread.sleep(LOCKUP_DETECT_TIMEOUT);\n try{\n thread.interrupt();\n thread.join();\n\n }\n catch(Exception e){\n e.printStackTrace();\n }\n\n\n\n\n\n }",
"public void callTheWaiter();",
"@Test\n public void testIfThreadsAreBlockedIfThereIsNothinginQueue() throws InterruptedException {\n \t\n \tqueue.addUserRequest(createUserRequest(1, 10, ElevatorDirection.UP));\n \tqueue.addUserRequest(createUserRequest(1, 8, ElevatorDirection.UP));\n \t\n final Thread t = startTestThread( new TestRunnable() {\n\t\t\t@Override\n\t\t\tprotected void runTestThread() throws Throwable {\n\t\t\t\tfor (int i = 0; i < 2; ++i) {\n\t\t\t\t\tAssert.assertNotNull(queue.pickRequest(1, ElevatorDirection.UP));\n\t\t\t\t\tlogger.debug(\"Picked Element Fron Queue\");\n }\n\t\t\t\tThread.currentThread().interrupt();\n try {\n \tqueue.pickRequest(1, ElevatorDirection.UP);\n Assert.assertFalse(true);\n } catch (InterruptedException success) {\n \tlogger.debug(\"Thread Interrupted\");\n }\n Assert.assertFalse(Thread.interrupted());\n\t\t\t}\n\t\t});\n t.start();\n \n }",
"private void setupTimeoutJob() {\n eventLoopGroup.scheduleAtFixedRate(() -> {\n\n /*\n * We cannot wait for the request infinitely, but we also cannot remove the object\n * from the queue - FIXME in case of situation when queue of waiting objects grow to X we have to\n * brake connection.\n */\n\n Iterator<RedisQueryRequest> iterator = queue.iterator();\n int i = 0;\n long timeNow = System.currentTimeMillis();\n /*\n * we are tracking 'i' because we want to do only some work, not all the work.\n * we cannot take too much time in timeout checking.\n */\n\n while (iterator.hasNext() && i < 100) {\n RedisQueryRequest current = iterator.next();\n if (current.isTimeouted()) {\n //already been here.\n continue;\n }\n long whenRequestStarted = current.getRequestTimeStart();\n long requestTimeUntilNow = timeNow - whenRequestStarted;\n if (requestTimeUntilNow >= 1000) {\n LOG.error(\"Timeouted request detected\");\n current.markTimeouted();\n current.getCompletableFuture().completeExceptionally(new TimeoutException(\"Timeout occurred.\"));\n }\n\n i++;\n }\n\n }, 100, 100, TimeUnit.MILLISECONDS);\n }",
"public void waitForNotificationOrFail() {\n new PollingCheck(5000) {\n @Override\n protected boolean check() {\n return mContentChanged;\n }\n }.run();\n mHT.quit();\n }",
"@SmallTest\n @Test\n public void testNegotiationFailsDueToTimeout() {\n mDtmfTransport.startNegotiation();\n\n mTestExecutorService.advanceTime(NEGOTIATION_TIMEOUT_MILLIS);\n\n verify(mCallback).onNegotiationFailed(eq(mDtmfTransport));\n assertEquals(DtmfTransport.STATE_NEGOTIATION_FAILED, mDtmfTransport.getTransportState());\n }",
"@Test\n public void testTripCircuitOnTimeouts() {\n try {\n HystrixCommandProperties.Setter properties = HystrixCommandPropertiesTest.getUnitTestPropertiesSetter();\n HystrixCommandMetrics metrics = getMetrics(properties);\n HystrixCircuitBreaker cb = getCircuitBreaker(key, CommandOwnerForUnitTest.OWNER_TWO, metrics, properties);\n\n // this should start as allowing requests\n assertTrue(cb.allowRequest());\n assertFalse(cb.isOpen());\n\n // timeouts\n metrics.markTimeout(2000);\n metrics.markTimeout(2000);\n metrics.markTimeout(2000);\n metrics.markTimeout(2000);\n\n // everything has been a timeout so we should not allow any requests\n assertFalse(cb.allowRequest());\n assertTrue(cb.isOpen());\n } catch (Exception e) {\n e.printStackTrace();\n fail(\"Error occurred: \" + e.getMessage());\n }\n }",
"@Test\n public void testNextWaiting() {\n }",
"@Test\r\n void timeoutNotExceededWithResult() {\n String actualResult = assertTimeout(ofMinutes(2), () -> {\r\n return \"a result\";\r\n });\r\n assertEquals(\"a result\", actualResult);\r\n }",
"public void testFairTakeFromEmpty() {\n final SynchronousQueue q = new SynchronousQueue(true);\n Thread t = new Thread(new Runnable() {\n public void run() {\n try {\n q.take();\n\t\t\tthreadShouldThrow();\n } catch (InterruptedException success){ }\n }\n });\n try {\n t.start();\n Thread.sleep(SHORT_DELAY_MS);\n t.interrupt();\n t.join();\n } catch (Exception e){\n unexpectedException();\n }\n }",
"public void testNotCancelBootstrap() throws Exception {\n bootstrapper.bootstrap();\n Thread.sleep(100);\n assertTrue(\"Should be waiting\", bootstrapper.isWaitingForNodes());\n bootstrapper.addBootstrapHost(new InetSocketAddress(\"localhost\",5000));\n Future future = bootstrapper.getPingFuture();\n assertNotNull(\"Should be pinging\", future);\n assertFalse(bootstrapper.isBootstrappingFromRouteTable());\n Thread.sleep(100);\n //now add other host: it should not cancel the previous attempt\n bootstrapper.addBootstrapHost(new InetSocketAddress(\"localhost\",6000));\n assertFalse(future.isCancelled());\n }",
"public boolean mustWait() {\n return mustWait;\n }",
"private void doWaitDueToLongResponse(BaseRequest request, long responseTime, String uri) {\n try {\n AgentConfig config = request.getLogUtil().getAgentConfig();\n long maxAgentResponseTime = config.getMaxAgentResponseTime();\n if (maxAgentResponseTime < responseTime) {\n long waitTime = Math.min(config.getMaxAgentWaitTime(), responseTime);\n LOG.warn(request.getLogUtil().getLogMessage(\"Response time to slow | delaying \" + waitTime + \" ms | url --> \" + uri, LogEventType.Script));\n Thread.sleep(waitTime);\n }\n } catch (InterruptedException e) {\n LOG.warn(\"Interrupted\", e);\n }\n }",
"public long timeout(long timeout);",
"int waitFor(String variable, int count);",
"@Test\n public void testUnfinishedTrace() throws InterruptedException\n {\n final CountDownLatch cdl = new CountDownLatch(1);\n\n final SettablePromise<Void> promise = Promises.settable();\n\n final Task<Void> task = new BaseTask<Void>()\n {\n @Override\n public Promise<Void> run(final Context context) throws Exception\n {\n cdl.countDown();\n\n // Return a promise that won't be satisfied until after out test\n return promise;\n }\n };\n\n getEngine().run(task);\n\n assertTrue(cdl.await(5, TimeUnit.SECONDS));\n\n final Trace trace = task.getTrace();\n assertShallowTraceMatches(task, trace);\n\n // Finish task\n promise.done(null);\n }",
"private void waitForStateChange(int maxTTW) throws MqttException {\n synchronized (caller) {\n if (!donext) {\n try {\n caller.wait(maxTTW);\n } catch (InterruptedException e) {\n Debug.logError(\"Timed out.\" + e.getMessage(), MODULE);\n }\n\n if (ex != null) {\n throw (MqttException) ex;\n }\n }\n donext = false;\n }\n }",
"public void testTakeFromEmpty() {\n final SynchronousQueue q = new SynchronousQueue();\n Thread t = new Thread(new Runnable() {\n public void run() {\n try {\n q.take();\n\t\t\tthreadShouldThrow();\n } catch (InterruptedException success){ }\n }\n });\n try {\n t.start();\n Thread.sleep(SHORT_DELAY_MS);\n t.interrupt();\n t.join();\n } catch (Exception e){\n unexpectedException();\n }\n }",
"void await( long millis ) throws UnavailableException;",
"public boolean awaitUninterruptibly(long timeoutMillis)\r\n/* 291: */ {\r\n/* 292: */ try\r\n/* 293: */ {\r\n/* 294:317 */ return await0(TimeUnit.MILLISECONDS.toNanos(timeoutMillis), false);\r\n/* 295: */ }\r\n/* 296: */ catch (InterruptedException e)\r\n/* 297: */ {\r\n/* 298:320 */ throw new InternalError();\r\n/* 299: */ }\r\n/* 300: */ }",
"@Test\n public void postTransaction_invalid_inTheFuture() {\n long oneSecondAgo = System.currentTimeMillis() + 1000;\n\n TransactionsBody transactionsBody = new TransactionsBody(10, oneSecondAgo);\n ResponseEntity responseEntity = transactionsEndpoint.postTransaction(transactionsBody);\n\n Mockito.verify(transactionsService, Mockito.times(0)).addTransaction(transactionsBody);\n Assert.assertEquals(204, responseEntity.getStatusCodeValue());\n }",
"public void testConnecitonFails() {\n\t\ttry {\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tConnection c = new Connection(\"localhost\", 4444, this, this);\n\t\t\t// this connection should fail... wait for that:\n\t\t\tfor (int i=0; i<10; i++) {\n\t\t\t\t// if we have a result before our max-wait-time, break\n\t\t\t\tif (connectionStatus != null)\n\t\t\t\t\tbreak;\n\t\t\t\tThread.sleep(500);\n\t\t\t}\n\t\t\t\n\t\t\tassertTrue(connectionStatus != null && connectionStatus.booleanValue() == false);\n\t\t} catch (Exception e) {\n\t\t\tassertTrue(\"should not get an exception\", false);\n\t\t}\n\t}",
"public RemoteInvocationResult waitForResult() {\n \tlong waitCount = 0;\n while (true) {\n synchronized (lock) {\n \t// so if we've been notified, we're done\n if (notified) {\n return result;\n }\n try {\n lock.wait(timeout);\n }\n catch (InterruptedException e) {\n log.debug(\"Ignored interrupt exception: \" + e, e);\n }\n // calculate the amount of time we've slept\n waitCount += timeout;\n // should we unblock even though we've timed out?\n if (joinStrategy.unblockAfterTimeout(result, waitCount)) {\n \t// TODO: how do we remove the handler if we never get another message?\n // \n // note that we use a TimeoutMap so they will be discarded after timing out\n // though we could maybe be more aggressive\n \treturn result;\n }\n }\n }\n }",
"protected void cancelTimedOutBlockRequests()\n {\n long now = System.currentTimeMillis();\n for (int i = blockRequests.size() - 1; 0 <= i; i--) {\n StdPeerMessage pm = blockRequests.get(i);\n if (pm.timestamp + DOWNLOAD_QUEUE_REQUESTS_TIMEOUT < now) {\n System.out.println(\"-Xo \" + pm.index + \" \" + (pm.begin >> 14));\n blockRequests.remove(i);\n torrent.cancelBlockRequest(pm.index, pm.begin);\n pmCache.release(pm);\n }\n }\n }",
"@Test\n public void testSocketTimeout(){\n CloseableHttpClient client = HttpClients.createDefault();\n HttpGet httpGet = new HttpGet(URL + \"/http/testSocketTimeout\");\n RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(3500).build();\n httpGet.setConfig(requestConfig);\n try {\n CloseableHttpResponse response = client.execute(httpGet);\n System.out.println(EntityUtils.toString(response.getEntity()));\n } catch (Exception e){\n e.printStackTrace();\n }\n }",
"protected abstract void afterWait();",
"public void delayTestFinish() {\r\n\t\ttry {\r\n\t\t\tlatch.await();\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\tthrow new RuntimeException(e);\t// don't expose InterruptedException to users\r\n\t\t} finally {\r\n\t\t\tlatch.reset();\r\n\t\t}\r\n\t}",
"@Test\n public void testAcceptTether() throws IOException, InterruptedException {\n createTethering(\"xyz\", NAMESPACES, REQUEST_TIME, DESCRIPTION);\n // Tethering status should be PENDING\n expectTetheringStatus(\n \"xyz\",\n TetheringStatus.PENDING,\n NAMESPACES,\n REQUEST_TIME,\n DESCRIPTION,\n TetheringConnectionStatus.INACTIVE);\n\n // Duplicate tether initiation should be ignored\n createTethering(\"xyz\", NAMESPACES, REQUEST_TIME, DESCRIPTION);\n // Tethering status should be PENDING\n expectTetheringStatus(\n \"xyz\",\n TetheringStatus.PENDING,\n NAMESPACES,\n REQUEST_TIME,\n DESCRIPTION,\n TetheringConnectionStatus.INACTIVE);\n\n TetheringControlResponseV2 expectedResponse =\n new TetheringControlResponseV2(Collections.emptyList(), TetheringStatus.PENDING);\n // Tethering status on server side should be PENDING.\n expectTetheringControlResponse(\"xyz\", HttpResponseStatus.OK, GSON.toJson(expectedResponse));\n\n // User accepts tethering on the server\n acceptTethering();\n // Tethering status should become ACTIVE\n expectTetheringStatus(\n \"xyz\",\n TetheringStatus.ACCEPTED,\n NAMESPACES,\n REQUEST_TIME,\n DESCRIPTION,\n TetheringConnectionStatus.ACTIVE);\n\n // Duplicate accept tethering should fail\n TetheringActionRequest request = new TetheringActionRequest(\"accept\");\n HttpRequest.Builder builder =\n HttpRequest.builder(HttpMethod.POST, config.resolveURL(\"tethering/connections/xyz\"))\n .withBody(GSON.toJson(request));\n HttpResponse response = HttpRequests.execute(builder.build());\n Assert.assertEquals(HttpResponseStatus.BAD_REQUEST.code(), response.getResponseCode());\n\n // Wait until we don't receive any control messages from the peer for upto the timeout interval.\n Thread.sleep(cConf.getInt(Constants.Tethering.CONNECTION_TIMEOUT_SECONDS) * 1000);\n // Tethering connection status should become INACTIVE\n expectTetheringStatus(\n \"xyz\",\n TetheringStatus.ACCEPTED,\n NAMESPACES,\n REQUEST_TIME,\n DESCRIPTION,\n TetheringConnectionStatus.INACTIVE);\n }",
"private String tryGetResponse(Request request) throws IOException {\n long startTime = System.currentTimeMillis();\n Response response;\n String responseBody;\n do {\n response = client.newCall(request).execute();\n responseBody = response.body().string();\n System.out.println(\"Got response code \" + response.code());\n } while (response.code() != 200\n && System.currentTimeMillis() - startTime < TimeUnit.SECONDS.toMillis(30));\n\n assertEquals(\n 200, response.code(), \"Unexpected response code. Got this response: \" + responseBody);\n return responseBody;\n }",
"int waitFor(String variable);",
"@Test(timeout=10000)\n public void testCancelJob() throws Exception {\n CommonClientTests.testCancelJob(client);\n }",
"@SuppressWarnings(\"unchecked\")\n public MockOutgoing<P> awaitMessage(Duration timeout, Function<Message<P>, Boolean> waitingFor) {\n this.request(1);\n CompletableFuture<Void> latch = new CompletableFuture<>();\n Consumer<Message<?>> checker = m -> {\n if (waitingFor.apply((Message<P>) m)) {\n latch.complete(null);\n } else {\n this.request(1);\n }\n };\n mockSubscriber.checkers().add(checker);\n mockSubscriber.data().forEach(checker);\n Single.create(latch, true).await(timeout);\n return this;\n }",
"private static void timeout(String user, int time) { sendMessage(\"/timeout \" + user + \" \" + time); }",
"@Test\n public void Task1() {\n given()\n .when()\n .get(\"https://httpstat.us/203\")\n .then()\n .statusCode(203)\n .contentType(ContentType.TEXT)\n ;\n }",
"@Test(expected=IllegalStateException.class)\n public void ongoingConfiguration_withRequestsRecordingDisabled() {\n initJadler().withRequestsRecordingDisabled();\n \n try {\n verifyThatRequest();\n fail(\"request recording disabled, verification must fail\");\n }\n finally {\n closeJadler();\n }\n }",
"@Test\n /*\n * Test that checks that concurrent requests to RefreshingOAuth2CredentialsInterceptor refresh\n * logic doesn't cause hanging behavior. Specifically, when an Expired condition occurs it\n * triggers a call to syncRefresh() which potentially waits for refresh that was initiated\n * from another thread either through syncRefresh() or asyncRefresh(). This test case simulates\n * that condition.\n */\n public void testRefreshDoesntHang() throws Exception {\n long start = HeaderCacheElement.TOKEN_STALENESS_MS * 10;\n setTimeInMillieconds(start);\n\n // RefreshingOAuth2CredentialsInterceptor will show that the access token is stale.\n final long expiration = start + HeaderCacheElement.TOKEN_EXPIRES_MS + 1;\n\n // Create a mechanism that will allow us to control when the accessToken is returned.\n // credentials.refreshAccessToken() will get called asynchronously and will wait until the\n // lock is notified before returning. That will allow us to set up multiple concurrent calls\n final Object lock = new Object();\n Mockito.when(credentials.refreshAccessToken()).thenAnswer(new Answer<AccessToken>() {\n @Override\n public AccessToken answer(InvocationOnMock invocation) throws Throwable {\n synchronized (lock) {\n lock.wait();\n }\n return new AccessToken(\"\", new Date(expiration));\n }\n });\n\n // Force a synchronous refresh. This ought to wait until a refresh happening in another thread\n // completes.\n Callable<Void> syncRefreshCallable = new Callable<Void>() {\n @Override\n public Void call() throws Exception {\n underTest.syncRefresh();\n return null;\n }\n };\n\n underTest =\n new RefreshingOAuth2CredentialsInterceptor(executorService, credentials);\n underTest.rateLimiter.setRate(100000);\n\n // At this point, the access token wasn't retrieved yet. The\n // RefreshingOAuth2CredentialsInterceptor considers null to be Expired.\n Assert.assertEquals(CacheState.Expired, underTest.headerCache.getCacheState());\n\n syncCall(lock, syncRefreshCallable);\n\n // Check to make sure that the AccessToken was retrieved.\n Assert.assertEquals(CacheState.Stale, underTest.headerCache.getCacheState());\n\n // Check to make sure we're no longer refreshing.\n synchronized (underTest.lock) {\n Assert.assertFalse(underTest.isRefreshing);\n }\n\n // Kick off a couple of asynchronous refreshes. Kicking off more than one shouldn't be\n // necessary, but also should not be harmful, since there are likely to be multiple concurrent\n // requests that call asyncRefresh() when the token turns stale.\n underTest.asyncRefresh();\n underTest.asyncRefresh();\n underTest.asyncRefresh();\n\n syncCall(lock, syncRefreshCallable);\n Assert.assertFalse(underTest.isRefreshing);\n }",
"protected boolean waitBeforeExecution() throws InterruptedException {\n/* 112 */ Integer mx = ((IncomingSearchRequest)getInputMessage()).getMX();\n/* */ \n/* 114 */ if (mx == null) {\n/* 115 */ log.fine(\"Invalid search request, did not contain MX header: \" + getInputMessage());\n/* 116 */ return false;\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* 122 */ if (mx.intValue() > 120 || mx.intValue() <= 0) mx = MXHeader.DEFAULT_VALUE;\n/* */ \n/* */ \n/* 125 */ if (getUpnpService().getRegistry().getLocalDevices().size() > 0) {\n/* 126 */ int sleepTime = this.randomGenerator.nextInt(mx.intValue() * 1000);\n/* 127 */ log.fine(\"Sleeping \" + sleepTime + \" milliseconds to avoid flooding with search responses\");\n/* 128 */ Thread.sleep(sleepTime);\n/* */ } \n/* */ \n/* 131 */ return true;\n/* */ }",
"public int waitFor() throws Exception {\n \n int result = future.get();\n service.shutdown();\n return result;\n }",
"T poll( int timeout, TimeUnit timeUnit )\n throws InterruptedException;",
"@Test\n public void testConnectionClose2() throws Exception {\n String oldValue = System.getProperty(\"sun.net.http.retryPost\");\n System.setProperty(\"sun.net.http.retryPost\", \"false\");\n try {\n URL url = new URL(resolveURI(\"/v1/sleep\"));\n\n // Disable the server 2 from discovery\n defaultServer2.cancelRegistration();\n\n HttpURLConnection urlConn = openURL(url);\n urlConn.setDoOutput(true);\n urlConn.setRequestMethod(\"POST\");\n\n // Sleep for 50 ms\n urlConn.getOutputStream().write(\"50\".getBytes(StandardCharsets.UTF_8));\n Assert.assertEquals(200, urlConn.getResponseCode());\n urlConn.getInputStream().close();\n urlConn.disconnect();\n\n // Now disable server1 and enable server2 from discovery\n defaultServer1.cancelRegistration();\n defaultServer2.registerServer();\n\n // Make sure the discovery change is in effect\n Assert.assertNotNull(new RandomEndpointStrategy(\n () -> ((DiscoveryServiceClient) discoveryService).discover(APP_FABRIC_SERVICE)).pick(5, TimeUnit.SECONDS));\n\n // Make a call to sleep for couple seconds\n urlConn = openURL(url);\n urlConn.setDoOutput(true);\n urlConn.setRequestMethod(\"POST\");\n urlConn.getOutputStream().write(\"3000\".getBytes(StandardCharsets.UTF_8));\n\n // Wait for the result asynchronously, while at the same time shutdown server1.\n // Shutting down server1 shouldn't affect the connection.\n CompletableFuture<Integer> result = new CompletableFuture<>();\n HttpURLConnection finalUrlConn = urlConn;\n Thread t = new Thread(() -> {\n try {\n result.complete(finalUrlConn.getResponseCode());\n } catch (Exception e) {\n result.completeExceptionally(e);\n } finally {\n try {\n finalUrlConn.getInputStream().close();\n finalUrlConn.disconnect();\n } catch (IOException e) {\n LOG.error(\"Exception when closing url connection\", e);\n }\n }\n });\n t.start();\n\n defaultServer1.stopAndWait();\n Assert.assertEquals(200, result.get().intValue());\n Assert.assertEquals(1, defaultServer1.getNumRequests());\n Assert.assertEquals(1, defaultServer2.getNumRequests());\n } finally {\n if (oldValue == null) {\n System.clearProperty(\"sun.net.http.retryPost\");\n } else {\n System.setProperty(\"sun.net.http.retryPost\", oldValue);\n }\n }\n }",
"private static boolean basicTest() {\r\n\t\t// use ExecutorService to manage threads\r\n\t\tExecutorService executor = Executors.newFixedThreadPool(1);\r\n\t\t\r\n\t\t// send all rquests sequentially\r\n\t\tlogger.finest(\"sending requests sequentially\");\r\n\t\tfor (URL url : urlList) { \r\n\t\t\tHttpClient client = new HttpClient(url);\r\n\t\t\texecutor.execute(client);\r\n\t\t}\r\n\t\t\r\n\t\t// wait for test to finish\r\n\t\tlogger.fine(\"waiting for requests to complete...\");\r\n\t\texecutor.shutdown(); \r\n\t\twhile (!executor.isTerminated())\r\n\t\t\tThread.yield(); // return the control to system\r\n\t\tlogger.fine(\"all requests completed\");\r\n\t\t\r\n\t\treturn true;\r\n\t}",
"public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException {\r\n return dead;\r\n }",
"private void awaitT(){\n try {\n game.getBarrier().await(20, TimeUnit.SECONDS);\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (BrokenBarrierException e) {\n e.printStackTrace();\n } catch (TimeoutException e) {\n trimBarrier();\n synchronized (lock){\n if(!botSignal){\n bot = new BotClient();\n new Thread(bot).start();\n botSignal = true;\n }\n\n }\n }\n }",
"@Override\n public void timeout(CellPath path) {\n fail(task, CacheException.TIMEOUT,\n \"No reply from \" + path);\n }",
"@Override\n public void run() {\n\n new Thread() {\n\n @Override\n public void run() {\n HttpGet requestForTest = new HttpGet(\"http://m.google.com\");\n try {\n new DefaultHttpClient().execute(requestForTest); // can last...\n responded = true;\n } catch (Exception e) {}\n }\n\n }.start();\n\n try {\n int waited = 0;\n while(!responded && (waited < timeout)) {\n sleep(100);\n if(!responded ) { \n waited += 100;\n }\n }\n } \n catch(InterruptedException e) {} // do nothing \n finally { \n if (!responded) { handler.sendEmptyMessage(0); } \n else { handler.sendEmptyMessage(1); }\n }\n\n }",
"protected void responseFail(){\n\t\tqueue.clear();\n\t}",
"@Test\r\n public void test_customTimeOutValues() throws InterruptedException {\r\n //\r\n // keep track of each task started, along with the timeout it was given\r\n // and time it started\r\n //\r\n final Map<String, Pair<Long, Long>> timeoutAndStartTimeByMessage = new ConcurrentHashMap<String, Pair<Long, Long>>();\r\n\r\n //\r\n // store all errors in a list, as we shouldn't make our assertions in a\r\n // separate thread\r\n //\r\n final List<String> errors = new ArrayList<String>();\r\n\r\n //\r\n // As all the tasks will timeout, keep a latch to ensure they've all\r\n // been processed\r\n // so as not to end the test too soon. This should be preferable to\r\n // simply sleeping\r\n // for a given amount of time\r\n //\r\n final int numberOfTasksToStart = 5;\r\n final CountDownLatch numberOfTasksLatch = new CountDownLatch(numberOfTasksToStart);\r\n\r\n //\r\n // each task will be started with a different timeout value, which will\r\n // be in increments of this value\r\n //\r\n final long timeoutInterval = 50;\r\n\r\n //\r\n // we will assert each timeout does not occur before it's timeout, but\r\n // also no later than a given margin for error. This is done because\r\n // this test would also pass if all tasks were given the same large\r\n // expiry value (i.e. if we start tasks to expire at 10, 20 and 30\r\n // milliseconds, they would all have expired by 1 second, but that isn't\r\n // what would be expected).\r\n //\r\n // The margin for error is given to be the same as the timeout interval\r\n //\r\n final long marginForError = timeoutInterval / 2;\r\n\r\n //\r\n // the callback will populate the errors collection (potentially)\r\n //\r\n final IExpiryAction<String> timeoutAction = new IExpiryAction<String>() {\r\n\r\n @Override\r\n public void onTimeout(final String payload) {\r\n final long now = System.currentTimeMillis();\r\n numberOfTasksLatch.countDown();\r\n\r\n final Pair<Long, Long> value = timeoutAndStartTimeByMessage.get(payload);\r\n if (value == null) {\r\n errors.add(\"No value found for \" + payload);\r\n } else {\r\n final Long timeExpiry = value.getFirst();\r\n final Long timeStarted = value.getSecond();\r\n\r\n final long duration = now - timeStarted.longValue();\r\n\r\n //\r\n // assert the duration is within an expected period\r\n //\r\n final long minExpected = timeExpiry.longValue() - marginForError;\r\n final long maxExpected = timeExpiry.longValue() + marginForError;\r\n\r\n if (duration < minExpected) {\r\n errors.add(String.format(\"%s expired after %d ms\", payload, Long.valueOf(duration)));\r\n } else {\r\n if (duration > maxExpected) {\r\n errors.add(String.format(\"%s took too long to expire after %d ms\", payload,\r\n Long.valueOf(duration)));\r\n }\r\n }\r\n }\r\n }\r\n };\r\n final ExpiryViceroy<String> taskDelegate = ExpiryViceroy.start(timeoutAction, 1, TimeUnit.SECONDS);\r\n\r\n for (int taskCount = numberOfTasksToStart; taskCount >= 1; taskCount--) {\r\n final long timeout = taskCount * timeoutInterval;\r\n final String message = \"interval \" + timeout;\r\n\r\n //\r\n // no tasks will be acknowledged as complete, so they should all\r\n // time out\r\n //\r\n taskDelegate.onStartTask(message, timeout, TimeUnit.MILLISECONDS);\r\n\r\n final Pair<Long, Long> value = new Pair<Long, Long>(Long.valueOf(timeout), Long.valueOf(System\r\n .currentTimeMillis()));\r\n timeoutAndStartTimeByMessage.put(message, value);\r\n }\r\n\r\n //\r\n // ensure all tasks have completed\r\n //\r\n numberOfTasksLatch.await(1, TimeUnit.MINUTES);\r\n taskDelegate.stop();\r\n\r\n //\r\n // assert no infractions have occurred within the callback\r\n //\r\n // TODO\r\n // Assert.assertTrue(Lists.toString(Consts.NEW_LINE, errors), errors.isEmpty());\r\n }",
"public Object waitingForKey(Jt808CommandKey commandKey, long time, TimeUnit unit) throws InterruptedException {\n this.blockingMap.put(commandKey, null);\n\n // Get result blocked\n Object result;\n try {\n log.info(\"Waiting for key {}\", commandKey);\n result = this.blockingMap.take(commandKey, time, unit);\n } finally {\n // Remove tmp waiting-flag\n this.blockingMap.remove(commandKey);\n }\n\n return result;\n }",
"public boolean delayTestFinish(int timeout) {\r\n\t\ttry {\r\n\t\t\treturn latch.await(timeout);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\tthrow new RuntimeException(e);\t// don't expose InterruptedException to users\r\n\t\t} finally {\r\n\t\t\tlatch.reset();\r\n\t\t}\r\n\t}",
"private void waitToRetry()\n {\n final int sleepTime = 2000000;\n\n if (keepTrying)\n {\n try\n {\n Thread.sleep(sleepTime);\n }\n catch (Exception error)\n {\n log.error(\"Ignored exception from sleep - probably ok\", error);\n }\n }\n }",
"public boolean acquireNoWait() {\r\n return true;\r\n }",
"public abstract void onWait();"
] | [
"0.6877465",
"0.6601529",
"0.64517343",
"0.6394682",
"0.63213617",
"0.6296904",
"0.6245825",
"0.617068",
"0.61510557",
"0.61434627",
"0.61401814",
"0.6113957",
"0.6066856",
"0.60652184",
"0.6016804",
"0.59918463",
"0.59749854",
"0.5960586",
"0.593129",
"0.5907572",
"0.5889214",
"0.5876075",
"0.587184",
"0.587177",
"0.5845047",
"0.5787055",
"0.5782468",
"0.57811713",
"0.57805693",
"0.57759845",
"0.5742239",
"0.5741192",
"0.57297355",
"0.57269835",
"0.5712896",
"0.5702881",
"0.56961375",
"0.5686119",
"0.56769437",
"0.5676476",
"0.5668129",
"0.5667232",
"0.56637704",
"0.5648035",
"0.5646478",
"0.56458324",
"0.56419617",
"0.5634751",
"0.5632285",
"0.5624651",
"0.5624056",
"0.56187516",
"0.56157386",
"0.5605783",
"0.56038433",
"0.5596974",
"0.559563",
"0.5594393",
"0.55942655",
"0.5582803",
"0.55765516",
"0.5566372",
"0.55583495",
"0.5558264",
"0.5553678",
"0.55376166",
"0.5534964",
"0.5522654",
"0.55102384",
"0.5507124",
"0.5483895",
"0.5481062",
"0.54782283",
"0.54734904",
"0.5468141",
"0.5467105",
"0.5466273",
"0.546621",
"0.5462451",
"0.54544073",
"0.5452141",
"0.54445034",
"0.5442161",
"0.5440838",
"0.5425339",
"0.5419963",
"0.5415213",
"0.5413751",
"0.5408856",
"0.54086924",
"0.54058385",
"0.5386627",
"0.53791654",
"0.53771895",
"0.5367503",
"0.5366822",
"0.53665125",
"0.5364787",
"0.53622234",
"0.536052"
] | 0.63604045 | 4 |
Test that an asynchronous request will eventually throw the right exception | @Test
public void testError() {
FutureRecordMetadata future = new FutureRecordMetadata(asyncRequest(baseOffset, new CorruptRecordException(), 50L),
relOffset, RecordBatch.NO_TIMESTAMP, 0, 0, Time.SYSTEM);
assertThrows(ExecutionException.class, future::get);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void testHttpFailureRetries() {\n delayTestFinish(RUNASYNC_TIMEOUT);\n runAsync1(0);\n }",
"@Test\n public void furtherRequestsDelay() throws Exception {\n final byte[] response = new byte[16];\n final StreamManager manager = new StreamManager() {\n @Override\n public ManagedBuffer getChunk(long streamId, int chunkIndex) {\n Uninterruptibles.sleepUninterruptibly(FOREVER, TimeUnit.MILLISECONDS);\n return new NioManagedBuffer(ByteBuffer.wrap(response));\n }\n };\n RpcHandler handler = new RpcHandler() {\n @Override\n public void receive(\n TransportClient client,\n ByteBuffer message,\n RpcResponseCallback callback) {\n throw new UnsupportedOperationException();\n }\n\n @Override\n public StreamManager getStreamManager() {\n return manager;\n }\n };\n\n context = new TransportContext(conf, handler);\n server = context.createServer();\n clientFactory = context.createClientFactory();\n TransportClient client = clientFactory.createClient(TestUtils.getLocalHost(), server.getPort());\n\n // Send one request, which will eventually fail.\n TestCallback callback0 = new TestCallback();\n client.fetchChunk(0, 0, callback0);\n Uninterruptibles.sleepUninterruptibly(1200, TimeUnit.MILLISECONDS);\n\n // Send a second request before the first has failed.\n TestCallback callback1 = new TestCallback();\n client.fetchChunk(0, 1, callback1);\n Uninterruptibles.sleepUninterruptibly(1200, TimeUnit.MILLISECONDS);\n\n // not complete yet, but should complete soon\n assertEquals(-1, callback0.successLength);\n assertNull(callback0.failure);\n callback0.latch.await(60, TimeUnit.SECONDS);\n assertTrue(callback0.failure instanceof IOException);\n\n // make sure callback1 is called.\n callback1.latch.await(60, TimeUnit.SECONDS);\n // failed at same time as previous\n assertTrue(callback1.failure instanceof IOException);\n }",
"private static boolean testBadRequest() {\r\n\t\t// use ExecutorService to manage threads\r\n\t\tExecutorService executor = Executors.newFixedThreadPool(1);\r\n\t\t\r\n\t\t// send all rquests sequentially\r\n\t\tlogger.finest(\"sending bad requests\");\r\n\t\tURL url = urlList.get(0);\r\n\t\t\r\n\t\tfor (String request : badRequests) { \r\n\t\t\tHttpHandler client = new HttpHandler(request, url);\r\n\t\t\texecutor.execute(client);\r\n\t\t}\r\n\t\t\r\n\t\t// wait for test to finish\r\n\t\tlogger.finest(\"waiting for requests to complete...\");\r\n\t\texecutor.shutdown(); \r\n\t\twhile (!executor.isTerminated())\r\n\t\t\tThread.yield(); // return the control to system\r\n\t\tlogger.finest(\"all bad requests completed\");\r\n\t\t\r\n\t\treturn true;\r\n\t}",
"public void checkException() {\n/* 642 */ checkException(voidPromise());\n/* */ }",
"private static boolean testNotFound() {\r\n\t\t// use ExecutorService to manage threads\r\n\t\tExecutorService executor = Executors.newFixedThreadPool(1);\r\n\t\t\r\n\t\tlogger.finest(\"sending request\");\r\n\t\tURL url = urlList.get(0);\r\n\t\t\r\n\t\ttry {\r\n\t\t\tURL notFoundURL = new URL(url.getProtocol(), url.getHost(), url.getPort(), url.getFile() + \"random\");\r\n\t\t\tHttpClient client = new HttpClient(notFoundURL);\r\n\t\t\texecutor.execute(client);\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t\tlogger.severe(\"problem formatting URL\");\r\n\t\t}\r\n\t\t\r\n\t\t// wait for test to finish\r\n\t\tlogger.finest(\"waiting for request to complete...\");\r\n\t\texecutor.shutdown(); \r\n\t\twhile (!executor.isTerminated())\r\n\t\t\tThread.yield(); // return the control to system\r\n\t\tlogger.finest(\"not found request completed\");\r\n\t\t\r\n\t\treturn true;\r\n\t}",
"@Test\n public void followFail() throws IOException {\n Mockito.when(mockRegisterService.register(request)).thenThrow(new IOException());\n\n Assertions.assertThrows(IOException.class, () -> {\n presenter.register(request);\n });;\n// Assertions.assertEquals(failResponse.getMessage(), presenter.follow(failRequest).getMessage());\n }",
"private String tryGetResponse(Request request) throws IOException {\n long startTime = System.currentTimeMillis();\n Response response;\n String responseBody;\n do {\n response = client.newCall(request).execute();\n responseBody = response.body().string();\n System.out.println(\"Got response code \" + response.code());\n } while (response.code() != 200\n && System.currentTimeMillis() - startTime < TimeUnit.SECONDS.toMillis(30));\n\n assertEquals(\n 200, response.code(), \"Unexpected response code. Got this response: \" + responseBody);\n return responseBody;\n }",
"@Test\n void testGivenFaultyRequestWithExceptionString_thenFail() throws Exception {\n URL u = new URL(\"http://localhost:8080/sentry-servlet/fault?exception=true\");\n HttpURLConnection conn = (HttpURLConnection)u.openConnection();\n int rc = conn.getResponseCode();\n assertThat(rc)\n .isEqualTo(500);\n }",
"@Test\n public void testSearchUserByQueryError() throws Exception {\n TestSubscriber testSubscriber = new TestSubscriber();\n Observable<ApiSearchUser> searchUserObservable = githubApi.getSearchUser(\"\", null);\n searchUserObservable.subscribe(testSubscriber);\n testSubscriber.awaitTerminalEvent();\n testSubscriber.assertError(HttpException.class);\n }",
"public void onFailure(Exception t);",
"@SuppressWarnings(\"unchecked\")\n @Test\n public void testBackenStatusUpdateError() throws Exception {\n RequestBodyEntity bodyEntityRegister = mock(RequestBodyEntity.class);\n \n HttpResponse<String> stringResponseRegister = (HttpResponse<String>) mock(HttpResponse.class);\n when(stringResponseRegister.getStatus())\n .thenReturn(400); \n when(bodyEntityRegister.asString())\n .thenReturn(stringResponseRegister); \n\n HttpRequestWithBody registerBodyMock = mock(HttpRequestWithBody.class);\n \n when(registerBodyMock.routeParam(anyString(), anyString()))\n .thenReturn(registerBodyMock);\n when(registerBodyMock.header(anyString(), anyString()))\n .thenReturn(registerBodyMock);\n when(registerBodyMock.body(anyString()))\n .thenReturn(bodyEntityRegister);\n\n // PUT mock\n when(Unirest.put(contains(\"/event/status\")))\n .thenReturn(registerBodyMock); \n \n TestWorker testWorker = new TestWorker();\n worker = getWrappedWorker(testWorker);\n worker.run();\n \n // let worker throw CommunicationException\n Envelope envelope = new Envelope(new Long(34343), false, \"graviton\", \"documents.core.app.update\");\n URL jsonFile = this.getClass().getClassLoader().getResource(\"json/queueEvent.json\");\n String message = FileUtils.readFileToString(new File(jsonFile.getFile()));\n workerConsumer.handleDelivery(\"documents.core.app.update\", envelope, new AMQP.BasicProperties(), message.getBytes()); \n }",
"@Test\n public void testFailFromClient(TestContext context) {\n NetClient client = vertx.createNetClient();\n final Async async = context.async();\n final String address = \"test\";\n client.connect(7000, \"localhost\").onComplete(context.asyncAssertSuccess(socket -> {\n\n final FrameParser parser = new FrameParser(parse -> {\n context.assertTrue(parse.succeeded());\n JsonObject frame = parse.result();\n if (\"message\".equals(frame.getString(\"type\"))) {\n context.assertEquals(true, frame.getBoolean(\"send\"));\n context.assertEquals(\"Vert.x\", frame.getJsonObject(\"body\").getString(\"value\"));\n FrameHelper.writeFrame(new JsonObject().put(\"type\",\"send\").put(\"address\",frame.getString(\"replyAddress\")).put(\"failureCode\", 1234).put(\"message\", \"ooops!\"), socket);\n }\n });\n\n socket.handler(parser);\n\n FrameHelper.sendFrame(\"register\", address, null, socket);\n\n // There is now way to know that the register actually happened, wait a bit before sending.\n vertx.setTimer( 500L, timerId -> {\n vertx.eventBus().request(address, new JsonObject().put(\"value\", \"Vert.x\")).onComplete(respMessage -> {\n context.assertTrue(respMessage.failed());\n context.assertEquals(\"ooops!\", respMessage.cause().getMessage());\n client.close();\n async.complete();\n });\n });\n\n }));\n\n }",
"@Test\n public void testSearchRepositoryByQueryError() throws Exception {\n TestSubscriber testSubscriber = new TestSubscriber();\n Observable<ApiSearchRepository> searchRepositoryObservable = githubApi.getSearchRepository(\"\", null);\n searchRepositoryObservable.subscribe(testSubscriber);\n testSubscriber.awaitTerminalEvent();\n testSubscriber.assertError(HttpException.class);\n }",
"@Test(timeout = 5000)\n\tpublic void handlePredictionFetchException() throws IOException, ExampleSubmissionException, InterruptedException {\n\n\t\tIterable<Example> examples = getExamples(\"One\", \"Two\");\n\n\t\tSocket socket = mock(Socket.class);\n\t\tByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n\t\twhen(socket.getOutputStream()).thenReturn(outputStream);\n\n\t\tInputStream inputStream = mock(InputStream.class, new Answer<Object>() {\n\n\t\t\t@Override\n\t\t\tpublic Object answer(InvocationOnMock invocation) throws Throwable {\n\t\t\t\tthrow new IOException();\n\t\t\t}\n\n\t\t});\n\n\t\twhen(socket.getInputStream()).thenReturn(inputStream);\n\n\t\tTCPIPSocketFactory socketFactory = mock(TCPIPSocketFactory.class);\n\t\twhen(socketFactory.getSocket()).thenReturn(socket);\n\n\t\tAsyncFailFastTCPIPExampleProcessor toTest = new AsyncFailFastTCPIPExampleProcessor(socketFactory, Executors.newCachedThreadPool(), examples);\n\n\t\texpectedNumberOfSkippedExamples = 0;\n\t\texpectedNumberOfSubmittedExamples = 2;\n\t\texpectedStateOnExampleSubmissionComplete = ExampleSubmissionState.Complete;\n\t\texpectedStateOnPredictionFetchComplete = PredictionFetchState.PredictionFetchFault;\n\n\t\tIterable<Prediction> predictions = toTest.submitExamples(this).getPredictionsIterable();\n\n\t\tint x = 0;\n\n\t\tfor (Prediction p : predictions) {\n\n\t\t\tx++;\n\t\t}\n\n\t\tAssert.assertEquals(0, x);\n\n\t\tcountDownLatch.await(); //wait till example submission and prediction fetch are both done.\n\n\t\t//check that all examples got there\n\t\tBufferedReader bReader = new BufferedReader(new StringReader(new String(outputStream.toByteArray())));\n\n\t\tx = 0;\n\t\tString line = null;\n\t\twhile ((line = bReader.readLine()) != null) {\n\n\t\t\tswitch (x++) {\n\n\t\t\t\tcase 0:\n\t\t\t\t\tAssert.assertEquals(\"One\", line);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 1:\n\t\t\t\t\tAssert.assertEquals(\"Two\", line);\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tAssert.fail(\"Too many examples!\");\n\t\t\t}\n\n\t\t}\n\n\t\tAssert.assertEquals(2, x);\n\n\t\tverify(socketFactory, times(1)).getSocket();\n\t\tverify(socket, times(1)).getInputStream();\n\t\tverify(socket, times(1)).getOutputStream();\n\t\tverify(socket, times(1)).shutdownOutput();\n\t\tverify(socket, times(1)).close();\n\n\t\tAssert.assertFalse(exampleReadExceptionThrown);\n\t\tAssert.assertFalse(exampleFormatExceptionThrown);\n\t\tAssert.assertFalse(exampleSubmissionExceptionThrown);\n\t\tAssert.assertTrue(predictionFetchExceptionThrown);\n\n\t\t//the completion call backs should have been fired\n\t\tAssert.assertTrue(exampleSubmissionCompleteCalled);\n\t\tAssert.assertTrue(predictionFetchCompleteCalled);\n\n\t}",
"@Test\r\n public void testClientResponseFailure() throws Exception\r\n {\r\n before();\r\n boolean ok = false;\r\n try\r\n {\r\n Foo foo = ProxyBuilder.build(Foo.class, \"http://localhost:8081/foo/\").serverMediaType(MediaType.TEXT_PLAIN_TYPE).now();\r\n String answer = foo.error();\r\n System.out.println(\"answer: \" + answer);\r\n }\r\n catch (ClientResponseFailure e)\r\n {\r\n ok = true;\r\n }\r\n catch (Throwable t)\r\n {\r\n traverseException(t);\r\n fail(\"Expected ClientResponseFailure, got \" + t);\r\n }\r\n finally\r\n {\r\n after();\r\n }\r\n assertTrue(\"Expected ClientResponseFailure, got no Exception\", ok);\r\n }",
"@Test\n public void shouldReturnTotalNumberOfRequestsAs5ForFailAsync() {\n AsyncHelloWorldService helloWorldService = mock(AsyncHelloWorldService.class);\n ScheduledExecutorService scheduler = Executors.newSingleThreadScheduledExecutor();\n\n CompletableFuture<String> failedFuture = new CompletableFuture<>();\n failedFuture.completeExceptionally(new HelloWorldException());\n given(helloWorldService.returnHelloWorld()).willReturn(failedFuture);\n\n Retry retry = Retry.of(\"metrics\", RetryConfig.<String>custom()\n .retryExceptions(Exception.class)\n .maxAttempts(5)\n .failAfterMaxAttempts(true)\n .build());\n\n Supplier<CompletionStage<String>> supplier = Retry.decorateCompletionStage(retry, scheduler, helloWorldService::returnHelloWorld);\n\n assertThat(supplier.get())\n .failsWithin(5, TimeUnit.SECONDS)\n .withThrowableOfType(ExecutionException.class)\n .havingCause();\n\n assertThat(retry.getMetrics().getNumberOfTotalCalls()).isEqualTo(5);\n }",
"private void failWithExceptionOnExecutor(CronetException e) {\n mException = e;\n // Do not call into mCallback if request is complete.\n synchronized (mNativeStreamLock) {\n if (isDoneLocked()) {\n return;\n }\n mReadState = mWriteState = State.ERROR;\n destroyNativeStreamLocked(false);\n }\n try {\n mCallback.onFailed(this, mResponseInfo, e);\n } catch (Exception failException) {\n Log.e(CronetUrlRequestContext.LOG_TAG, \"Exception notifying of failed request\",\n failException);\n }\n mInflightDoneCallbackCount.decrement();\n }",
"@Test\n public void shouldReturnTotalNumberOfRequestsAs3ForFailAsync() {\n AsyncHelloWorldService helloWorldService = mock(AsyncHelloWorldService.class);\n ScheduledExecutorService scheduler = Executors.newSingleThreadScheduledExecutor();\n\n CompletableFuture<String> failedFuture = new CompletableFuture<>();\n failedFuture.completeExceptionally(new HelloWorldException());\n given(helloWorldService.returnHelloWorld())\n .willReturn(failedFuture)\n .willReturn(completedFuture(\"Success\"));\n\n Retry retry = Retry.of(\"metrics\", RetryConfig.<String>custom()\n .retryExceptions(Exception.class)\n .maxAttempts(5)\n .failAfterMaxAttempts(true)\n .build());\n\n Supplier<CompletionStage<String>> supplier = Retry.decorateCompletionStage(retry, scheduler, helloWorldService::returnHelloWorld);\n\n String result = awaitResult(supplier.get(), 5);\n\n assertThat(retry.getMetrics().getNumberOfTotalCalls()).isEqualTo(2);\n assertThat(result).isEqualTo(\"Success\");\n }",
"@Test\n public void testFindAllException() {\n when(client.receiveFromServer()).thenThrow(new RuntimeException(\"acces denied\"));\n\n service.findAll();\n\n verify(client).sendToServer(\"findAll#PlantedPlant\");\n }",
"@Test\n public void request() throws Exception {\n\n\n }",
"@Test\n public void testExceptionThrown() throws Exception {\n final HttpResponse response = Request.Get(\"http://localhost:\" + httpPort.getValue() + CORS_EXCEPTION_ENDPOINT_PATH).addHeader(\"Origin\", CORS_DEFAULT_ORIGIN).execute().returnResponse();\n\n assertNotNull(\"Response should not be null\", response);\n\n //we should have an access control allow origin\n assertNotNull(\"Allowed origin should be present\", response.getFirstHeader(HttpHeaders.Names.ACCESS_CONTROL_ALLOW_ORIGIN));\n }",
"@NonBlocking\n void error(Throwable throwable);",
"@Override\n public void onError(Throwable e)\n {\n if (e instanceof RestException)\n {\n promise.done(((RestException) e).getResponse());\n }\n else\n {\n promise.fail(e);\n }\n }",
"@Test\n public void postTransaction_invalid_inTheFuture() {\n long oneSecondAgo = System.currentTimeMillis() + 1000;\n\n TransactionsBody transactionsBody = new TransactionsBody(10, oneSecondAgo);\n ResponseEntity responseEntity = transactionsEndpoint.postTransaction(transactionsBody);\n\n Mockito.verify(transactionsService, Mockito.times(0)).addTransaction(transactionsBody);\n Assert.assertEquals(204, responseEntity.getStatusCodeValue());\n }",
"@Test(expected = GenieServerException.class)\n public void testGetFileMethodFailureToFetch() throws GenieException {\n Mockito.when(this.s3Client.getObject(Mockito.any(GetObjectRequest.class), Mockito.any(File.class))).thenThrow(new AmazonS3Exception(\"something\"));\n final ArgumentCaptor<GetObjectRequest> argument = ArgumentCaptor.forClass(GetObjectRequest.class);\n try {\n this.s3FileTransfer.getFile(S3FileTransferImplUnitTests.S3_PATH, S3FileTransferImplUnitTests.LOCAL_PATH);\n } finally {\n Mockito.verify(this.s3Client).getObject(argument.capture(), Mockito.any());\n Assert.assertEquals(S3FileTransferImplUnitTests.S3_BUCKET, argument.getValue().getBucketName());\n Assert.assertEquals(S3FileTransferImplUnitTests.S3_KEY, argument.getValue().getKey());\n Mockito.verify(this.downloadTimer, Mockito.times(1)).record(Mockito.anyLong(), Mockito.eq(TimeUnit.NANOSECONDS));\n Mockito.verify(this.registry, Mockito.times(1)).timer(Mockito.eq(DOWNLOAD_TIMER_NAME), this.tagsCaptor.capture());\n Assert.assertEquals(MetricsUtils.newFailureTagsSetForException(new GenieServerException(\"blah\")), this.tagsCaptor.getValue());\n }\n }",
"@Test\n\t\tpublic void testRestErrorResponse() throws Exception {\n\n\t\t\tString responseBody = TestUtils.getErrorResultString();\n\t\ttry {\n\t\t\t\t\n\t\t\t\tResponseEntity<ResponseWrapper> responseEntity= prepareReponseEntity(responseBody);\n\t\t\t\t\n\t\t\t\tboolean flag=weatherService.checkForErrors(responseEntity);\n\t\t\t\tassertTrue(flag);\n\t\t\t\tthis.mockServer.verify();\n\t\t\t} catch (Exception e) {\n\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}",
"@Test\n void testNoRetryOnUnexpectedException() throws GenieCheckedException {\n Mockito\n .when(this.persistenceService.getJobArchiveLocation(JOB_ID))\n .thenReturn(Optional.of(\"Not a valid URI\"));\n\n try {\n this.archivedJobService.getArchivedJobMetadata(JOB_ID);\n } catch (final Exception ignored) {\n Mockito\n .verify(this.persistenceService, Mockito.times(1))\n .getJobArchiveLocation(JOB_ID);\n }\n }",
"void assertError(int error, String url) throws Exception {\n ServletUnitClient client = container.newClient();\n try {\n client.getResponse(url);\n fail(\"expected HTTP error \" + error + \" on \" + url);\n } catch (HttpException e) {\n assertEquals(\"Unexpected HTTP Error code for \" + url, error, e.getResponseCode());\n }\n }",
"@Test\n public void testErrorReply(TestContext context) {\n NetClient client = vertx.createNetClient();\n final Async async = context.async();\n\n vertx.eventBus().consumer(\"test\", (Message<JsonObject> msg) -> {\n msg.fail(0, \"oops!\");\n });\n\n client.connect(7000, \"localhost\").onComplete(context.asyncAssertSuccess(socket -> {\n\n final FrameParser parser = new FrameParser(parse -> {\n context.assertTrue(parse.succeeded());\n JsonObject frame = parse.result();\n\n context.assertEquals(\"err\", frame.getString(\"type\"));\n context.assertEquals(\"#backtrack\", frame.getString(\"address\"));\n\n client.close();\n async.complete();\n });\n\n socket.handler(parser);\n\n FrameHelper.sendFrame(\"send\", \"test\", \"#backtrack\", new JsonObject().put(\"value\", \"vert.x\"), socket);\n }));\n }",
"@Test(expected = AssumptionViolatedException.class)\n public void assumeThatURLDoesNotRespond() throws MalformedURLException {\n assumeThat(new URL(\"http\", \"XXXFubarXXX\", 8888, \"/index\"), URLMatchers.respondsWithStatus(200));\n assertThat(\"test should have halted because we used Assume.assumeThat()\", false, is(true));\n }",
"private CompletableFuture<Response> getExceptionalCF(Throwable t) {\n if ((t instanceof CompletionException) || (t instanceof ExecutionException)) {\n if (t.getCause() != null) {\n t = t.getCause();\n }\n }\n if (cancelled && t instanceof IOException) {\n t = new HttpTimeoutException(\"request timed out\");\n }\n return MinimalFuture.failedFuture(t);\n }",
"@Test\n public void testMultiValidateAuthorityRequestsInDifferentThreads() throws IOException, InterruptedException, ExecutionException {\n final HttpURLConnection mockedConnection = Mockito.mock(HttpURLConnection.class);\n HttpUrlConnectionFactory.setMockedHttpUrlConnection(mockedConnection);\n Util.prepareMockedUrlConnection(mockedConnection);\n\n Mockito.when(mockedConnection.getInputStream()).thenReturn(Util.createInputStream(getDiscoveryResponse()));\n Mockito.when(mockedConnection.getResponseCode()).thenReturn(HttpURLConnection.HTTP_OK);\n\n final ExecutorService executorService = Executors.newFixedThreadPool(2);\n Callable<Void> task = new Callable<Void>() {\n @Override\n public Void call() throws Exception {\n final FileMockContext context = new FileMockContext(androidx.test.platform.app.InstrumentationRegistry.getInstrumentation().getContext());\n final Discovery discovery = new Discovery(context);\n discovery.validateAuthority(new URL(\"https://login.windows.net/common\"));\n\n return null;\n }\n };\n\n final List<Callable<Void>> tasks = Collections.nCopies(2, task);\n final List<Future<Void>> results = executorService.invokeAll(tasks);\n for (final Future<Void> result : results) {\n result.get();\n }\n\n Mockito.verify(mockedConnection, Mockito.times(1)).getInputStream();\n }",
"void onFailure(Throwable error);",
"@Test\n public void testHandleInspectAddressesCorrupted() {\n final List<Long> addresses = LongStream.rangeClosed(1L, 16L).boxed().collect(Collectors.toList());\n final long badAddress = 11L;\n RequestMsg request = getRequestMsg(\n getBasicHeader(ClusterIdCheck.CHECK, EpochCheck.CHECK),\n getInspectAddressesRequestMsg(addresses)\n );\n\n ArgumentCaptor<ResponseMsg> responseCaptor = ArgumentCaptor.forClass(ResponseMsg.class);\n when(mStreamLog.contains(badAddress)).thenThrow(new DataCorruptionException());\n logUnitServer.handleMessage(request, mChannelHandlerContext, mServerRouter);\n\n // Assert that the payload has a DATA_CORRUPTION error containing the bad\n // address and that the base header fields have remained the same.\n verify(mServerRouter).sendResponse(responseCaptor.capture(), eq(mChannelHandlerContext));\n ResponseMsg response = responseCaptor.getValue();\n assertTrue(compareBaseHeaderFields(request.getHeader(), response.getHeader()));\n assertTrue(response.getPayload().hasServerError());\n assertTrue(response.getPayload().getServerError().hasDataCorruptionError());\n assertEquals(badAddress, response.getPayload().getServerError().getDataCorruptionError().getAddress());\n }",
"@Test\n void testGivenFaultyRequestWithFaultString_thenFail() throws Exception {\n URL u = new URL(\"http://localhost:8080/sentry-servlet/fault?fault=true\");\n HttpURLConnection conn = (HttpURLConnection)u.openConnection();\n int rc = conn.getResponseCode();\n assertThat(rc)\n .isEqualTo(500);\n }",
"@Test\n public void testGetEmailFromUser() throws InterruptedException {\n Callback tstCallBackSuccess = new Callback() {\n @Override\n public void onSuccess(Map<String, Object> data, String message) {\n Assert.assertEquals(data.get(\"userID\"), \"En8fRBqxPiZ13HvOabUx7uOXN2T2\");\n }\n\n @Override\n public void onFailure(String error, MyError.ErrorCode errorCode) {\n // bad\n Assert.assertEquals(1,0);\n }\n };\n Utils utils = Utils.getInstance();\n utils.getUserFromEmail(\"[email protected]\", tstCallBackSuccess);\n\n\n // now test email that is not in\n Callback tstCallBackFailure = new Callback() {\n @Override\n public void onSuccess(Map<String, Object> data, String message) {\n // this shouldnt happen\n Assert.assertEquals(1,0);\n }\n\n @Override\n public void onFailure(String error, MyError.ErrorCode errorCode) {\n Assert.assertEquals(errorCode, MyError.ErrorCode.NOT_FOUND);\n Assert.assertEquals(error, \"No Matching Email\");\n }\n };\n\n utils.getUserFromEmail(\"[email protected]\", tstCallBackFailure);\n\n\n Thread.sleep(2000);\n }",
"public void onRequestFailure(Request request, IOException e) { }",
"@Test\n void syncWithError_ShouldCallErrorCallback() {\n final SphereClient sourceClient = mock(SphereClient.class);\n final SphereClient targetClient = mock(SphereClient.class);\n when(sourceClient.getConfig()).thenReturn(SphereApiConfig.of(\"source-project\"));\n when(targetClient.getConfig()).thenReturn(SphereApiConfig.of(\"target-project\"));\n final List<Customer> customers =\n Collections.singletonList(readObjectFromResource(\"customer-no-key.json\", Customer.class));\n\n final PagedQueryResult<Customer> pagedQueryResult = mock(PagedQueryResult.class);\n when(pagedQueryResult.getResults()).thenReturn(customers);\n when(sourceClient.execute(any(CustomerQuery.class)))\n .thenReturn(CompletableFuture.completedFuture(pagedQueryResult));\n\n // test\n final CustomerSyncer customerSyncer =\n CustomerSyncer.of(sourceClient, targetClient, mock(Clock.class));\n customerSyncer.sync(null, true).toCompletableFuture().join();\n\n // assertion\n final LoggingEvent errorLog = syncerTestLogger.getAllLoggingEvents().get(1);\n assertThat(errorLog.getMessage())\n .isEqualTo(\n \"Error when trying to sync customer. Existing key: <<not present>>. Update actions: []\");\n assertThat(errorLog.getThrowable().get().getMessage())\n .isEqualTo(\n \"CustomerDraft with email: [email protected] doesn't have a key. Please make sure all customer drafts have keys.\");\n }",
"@Test\n void syncWithError_ShouldCallErrorCallback() {\n final SphereClient sourceClient = mock(SphereClient.class);\n final SphereClient targetClient = mock(SphereClient.class);\n when(sourceClient.getConfig()).thenReturn(SphereApiConfig.of(\"source-project\"));\n when(targetClient.getConfig()).thenReturn(SphereApiConfig.of(\"target-project\"));\n final List<Customer> customers =\n Collections.singletonList(readObjectFromResource(\"customer-no-key.json\", Customer.class));\n\n final PagedQueryResult<Customer> pagedQueryResult = mock(PagedQueryResult.class);\n when(pagedQueryResult.getResults()).thenReturn(customers);\n when(sourceClient.execute(any(CustomerQuery.class)))\n .thenReturn(CompletableFuture.completedFuture(pagedQueryResult));\n\n // test\n final CustomerSyncer customerSyncer =\n CustomerSyncer.of(sourceClient, targetClient, mock(Clock.class));\n customerSyncer.sync(null, true).toCompletableFuture().join();\n\n // assertion\n final LoggingEvent errorLog = syncerTestLogger.getAllLoggingEvents().get(0);\n assertThat(errorLog.getMessage())\n .isEqualTo(\n \"Error when trying to sync customer. Existing key: <<not present>>. Update actions: []\");\n assertThat(errorLog.getThrowable().get().getMessage())\n .isEqualTo(\n \"CustomerDraft with email: [email protected] doesn't have a key. Please make sure all customer drafts have keys.\");\n }",
"@Test\n public void Task1() {\n given()\n .when()\n .get(\"https://httpstat.us/203\")\n .then()\n .statusCode(203)\n .contentType(ContentType.TEXT)\n ;\n }",
"@Test\n\tpublic void testRetryTheSuccess() {\n\t\tgenerateValidRequestMock();\n\t\tworker = PowerMockito.spy(new HttpRepublisherWorker(dummyPublisher, actionedRequest));\n\t\tWhitebox.setInternalState(worker, CloseableHttpClient.class, httpClientMock);\n\t\ttry {\n\t\t\twhen(httpClientMock.execute(any(HttpRequestBase.class), any(ResponseHandler.class)))\n\t\t\t\t\t.thenThrow(new IOException(\"Exception to retry on\")).thenReturn(mockResponse);\n\n\t\t} catch (IOException e) {\n\t\t\tfail(\"Should not reach here!\");\n\t\t}\n\t\tworker.run();\n\t\t// verify should attempt to calls\n\t\ttry {\n\t\t\tverify(httpClientMock, times(2)).execute(any(HttpRequestBase.class), any(ResponseHandler.class));\n\t\t\tassertEquals(RequestState.SUCCESS, actionedRequest.getAction());\n\t\t} catch (ClientProtocolException e) {\n\t\t\tfail(\"Should not throw this exception\");\n\t\t} catch (IOException e) {\n\t\t\tfail(\"Should not throw this exception\");\n\t\t}\n\t}",
"@Test\n void errorSpan() {\n String method = \"GET\";\n URI uri = resolveAddress(\"/error\");\n\n testing.runWithSpan(\n \"parent\",\n () -> {\n try {\n doRequest(method, uri);\n } catch (Throwable ignored) {\n }\n });\n\n testing.waitAndAssertTraces(\n trace -> {\n trace.hasSpansSatisfyingExactly(\n span -> span.hasName(\"parent\").hasKind(SpanKind.INTERNAL).hasNoParent(),\n span -> assertClientSpan(span, uri, method, 500, null).hasParent(trace.getSpan(0)),\n span -> assertServerSpan(span).hasParent(trace.getSpan(1)));\n });\n }",
"@Test\n public void testBlocking() throws Exception {\n FutureRecordMetadata future = new FutureRecordMetadata(asyncRequest(baseOffset, null, 50L),\n relOffset, RecordBatch.NO_TIMESTAMP, 0, 0, Time.SYSTEM);\n assertEquals(baseOffset + relOffset, future.get().offset());\n }",
"public void testConnecitonFails() {\n\t\ttry {\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tConnection c = new Connection(\"localhost\", 4444, this, this);\n\t\t\t// this connection should fail... wait for that:\n\t\t\tfor (int i=0; i<10; i++) {\n\t\t\t\t// if we have a result before our max-wait-time, break\n\t\t\t\tif (connectionStatus != null)\n\t\t\t\t\tbreak;\n\t\t\t\tThread.sleep(500);\n\t\t\t}\n\t\t\t\n\t\t\tassertTrue(connectionStatus != null && connectionStatus.booleanValue() == false);\n\t\t} catch (Exception e) {\n\t\t\tassertTrue(\"should not get an exception\", false);\n\t\t}\n\t}",
"@Override\n\t\tpublic void asyncFailure(long id, Exception e)\n\t\t\t\tthrows ConnectorException {\n\t\t\t\n\t\t}",
"public void onFailure();",
"@Test\n public void testSynchronizedSyncAfterAuthFailed()\n throws AuthException, IOException {\n when(synchronizer.preAuth()).thenThrow(IOException.class).thenReturn(\"OK\");\n presenter.synchronize();\n try {\n presenter.syncingThread.join();\n } catch (InterruptedException e) {}\n assertEquals(SyncStatusEnum.AUTHFAILED, presenter.status);\n presenter.synchronize();\n try {\n presenter.syncingThread.join();\n } catch (InterruptedException e) {}\n assertEquals(SyncStatusEnum.PREAUTHED, presenter.status);\n }",
"void async(Callback<T> success, Callback<Throwable> error);",
"private ChannelFuture checkException(ChannelPromise promise) {\n/* 624 */ Throwable t = this.lastException;\n/* 625 */ if (t != null) {\n/* 626 */ this.lastException = null;\n/* */ \n/* 628 */ if (promise.isVoid()) {\n/* 629 */ PlatformDependent.throwException(t);\n/* */ }\n/* */ \n/* 632 */ return (ChannelFuture)promise.setFailure(t);\n/* */ } \n/* */ \n/* 635 */ return (ChannelFuture)promise.setSuccess();\n/* */ }",
"@Test\n public void testDeleteException() {\n when(client.receiveFromServer()).thenThrow(new RuntimeException(\"connection timeout\", new SocketException()));\n\n service.delete(1L);\n\n verify(client).sendToServer(\"delete#PlantedPlant\");\n verify(client).sendToServer(1L);\n }",
"@Test(timeout = 5000)\n\tpublic void handlesExampleReadException() throws IOException, ExampleSubmissionException, InterruptedException {\n\n\t\tIterator iterator = mock(Iterator.class);\n\t\twhen(iterator.hasNext()).thenReturn(true);\n\t\twhen(iterator.next()).thenThrow(ExampleReadException.class);\n\n\t\tIterable examples = mock(Iterable.class);\n\t\twhen(examples.iterator()).thenReturn(iterator);\n\n\t\tInputStream predictionInputStream = getPredictionInputStream(\"1\", \"2\", \"3\");\n\n\t\tSocket socket = mock(Socket.class);\n\t\tByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n\t\twhen(socket.getOutputStream()).thenReturn(outputStream);\n\t\twhen(socket.getInputStream()).thenReturn(predictionInputStream);\n\n\t\tTCPIPSocketFactory socketFactory = mock(TCPIPSocketFactory.class);\n\t\twhen(socketFactory.getSocket()).thenReturn(socket);\n\n\t\tAsyncFailFastTCPIPExampleProcessor toTest = new AsyncFailFastTCPIPExampleProcessor(socketFactory, Executors.newCachedThreadPool(), examples);\n\n\t\texpectedNumberOfSkippedExamples = 0;\n\t\texpectedNumberOfSubmittedExamples = 0;\n\t\texpectedStateOnExampleSubmissionComplete = ExampleSubmissionState.ExampleReadFault;\n\t\texpectedStateOnPredictionFetchComplete = PredictionFetchState.Complete;\n\n\t\tIterable<Prediction> predictions = toTest.submitExamples(this).getPredictionsIterable();\n\n\t\tint x = 0;\n\n\t\tfor (Prediction p : predictions) {\n\n\t\t\tswitch (x++) {\n\n\t\t\t\tcase 0:\n\t\t\t\t\tAssert.assertEquals(\"1\", p.getVWStringRepresentation());\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 1:\n\t\t\t\t\tAssert.assertEquals(\"2\", p.getVWStringRepresentation());\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 2:\n\t\t\t\t\tAssert.assertEquals(\"3\", p.getVWStringRepresentation());\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tAssert.fail(\"Too many predictions!\");\n\t\t\t}\n\t\t}\n\n\t\tAssert.assertEquals(3, x);\n\n\t\tcountDownLatch.await(); //wait till example submission and prediction fetch are both done.\n\n\t\tverify(socketFactory, times(1)).getSocket();\n\t\tverify(socket, times(1)).getInputStream();\n\t\tverify(socket, times(1)).getOutputStream();\n\t\tverify(socket, times(1)).shutdownOutput();\n\t\tverify(socket, times(1)).close();\n\n\t\tAssert.assertTrue(exampleReadExceptionThrown);\n\t\tAssert.assertFalse(exampleFormatExceptionThrown);\n\t\tAssert.assertFalse(exampleSubmissionExceptionThrown);\n\t\tAssert.assertFalse(predictionFetchExceptionThrown);\n\n\t\t//the completion call backs should have been fired\n\t\tAssert.assertTrue(exampleSubmissionCompleteCalled);\n\t\tAssert.assertTrue(predictionFetchCompleteCalled);\n\n\t}",
"@Test\n public void timeoutInactiveRequests() throws Exception {\n final Semaphore semaphore = new Semaphore(1);\n final int responseSize = 16;\n RpcHandler handler = new RpcHandler() {\n @Override\n public void receive(\n TransportClient client,\n ByteBuffer message,\n RpcResponseCallback callback) {\n try {\n semaphore.acquire();\n callback.onSuccess(ByteBuffer.allocate(responseSize));\n } catch (InterruptedException e) {\n // do nothing\n }\n }\n\n @Override\n public StreamManager getStreamManager() {\n return defaultManager;\n }\n };\n\n context = new TransportContext(conf, handler);\n server = context.createServer();\n clientFactory = context.createClientFactory();\n TransportClient client = clientFactory.createClient(TestUtils.getLocalHost(), server.getPort());\n\n // First completes quickly (semaphore starts at 1).\n TestCallback callback0 = new TestCallback();\n client.sendRpc(ByteBuffer.allocate(0), callback0);\n callback0.latch.await();\n assertEquals(responseSize, callback0.successLength);\n\n // Second times out after 10 seconds, with slack. Must be IOException.\n TestCallback callback1 = new TestCallback();\n client.sendRpc(ByteBuffer.allocate(0), callback1);\n callback1.latch.await(60, TimeUnit.SECONDS);\n assertNotNull(callback1.failure);\n assertTrue(callback1.failure instanceof IOException);\n\n semaphore.release();\n }",
"@Test\n public void testHttpForNotConnected() throws Exception {\n \n final CountDownLatch unsubscribed = new CountDownLatch(1);\n \n final TestChannelCreator creator = new TestChannelCreator();\n final DefaultHttpClient client = new DefaultHttpClient(creator, ENABLE_LOGGING);\n // NOT setup server for local channel\n final TestSubscriber<HttpObject> testSubscriber = new TestSubscriber<HttpObject>();\n final OnNextSensor<HttpObject> nextSensor = new OnNextSensor<HttpObject>();\n try {\n client.defineInteraction(new LocalAddress(\"test\"), \n Observable.<HttpObject>just(fullHttpRequest()).doOnNext(nextSensor))\n .compose(RxFunctions.<HttpObject>countDownOnUnsubscribe(unsubscribed))\n .subscribe(testSubscriber);\n \n unsubscribed.await();\n \n testSubscriber.awaitTerminalEvent();\n assertEquals(1, creator.getChannels().size());\n creator.getChannels().get(0).assertClosed(1);\n } finally {\n client.close();\n assertEquals(0, testSubscriber.getOnNextEvents().size());\n assertEquals(0, testSubscriber.getCompletions());\n assertEquals(1, testSubscriber.getOnErrorEvents().size());\n nextSensor.assertNotCalled();\n }\n }",
"@Test\n public void testSynchronizedAuthAuthFailed()\n throws AuthException, IOException {\n doThrow(IOException.class).when(synchronizer).auth();\n presenter.synchronize();\n try {\n presenter.syncingThread.join();\n } catch (InterruptedException e) {}\n presenter.synchronize();\n try {\n presenter.syncingThread.join();\n } catch (InterruptedException e) {}\n assertEquals(SyncStatusEnum.AUTHFAILED, presenter.status);\n }",
"void onFailure(Call<T> call, Throwable t);",
"void onFailure();",
"void onFailure();",
"void onFailure();",
"@Test\n public void testSynchronizedSyncAfterFailed() throws AuthException, IOException {\n doThrow(IOException.class).doNothing().when(synchronizer).sync();\n presenter.synchronize();\n try {\n presenter.syncingThread.join();\n } catch (InterruptedException e) {}\n assertEquals(SyncStatusEnum.PREAUTHED, presenter.status);\n presenter.synchronize();\n try {\n presenter.syncingThread.join();\n } catch (InterruptedException e) {}\n assertEquals(SyncStatusEnum.AUTHED, presenter.status);\n presenter.synchronize();\n try {\n presenter.syncingThread.join();\n } catch (InterruptedException e) {}\n assertEquals(SyncStatusEnum.FAILED, presenter.status);\n presenter.synchronize();\n try {\n presenter.syncingThread.join();\n } catch (InterruptedException e) {}\n assertEquals(SyncStatusEnum.SYNCED, presenter.status);\n }",
"@Test\n void sendGetRequest() {\n try {\n String response = HttpUtils.sendGet();\n assertFalse(response.contains(\"404\"));\n } catch (IOException e) {\n e.printStackTrace();\n fail();\n }\n }",
"void failed (Exception e);",
"@Test\n public void testTimeout() throws Exception {\n ProduceRequestResult request = new ProduceRequestResult(topicPartition);\n FutureRecordMetadata future = new FutureRecordMetadata(request, relOffset,\n RecordBatch.NO_TIMESTAMP, 0, 0, Time.SYSTEM);\n assertFalse(future.isDone(), \"Request is not completed\");\n try {\n future.get(5, TimeUnit.MILLISECONDS);\n fail(\"Should have thrown exception.\");\n } catch (TimeoutException e) { /* this is good */\n }\n\n request.set(baseOffset, RecordBatch.NO_TIMESTAMP, null);\n request.done();\n assertTrue(future.isDone());\n assertEquals(baseOffset + relOffset, future.get().offset());\n }",
"@Test\n public void testUpdateException() {\n when(client.receiveFromServer()).thenThrow(new RuntimeException(\"server down\"));\n\n service.update(1L, plantedPlant);\n\n verify(client).sendToServer(\"update#PlantedPlant\");\n verify(client).sendToServer(1L);\n verify(client).sendToServer(plantedPlant);\n }",
"@Test(expected = ExecutionException.class)\n public void callServiceMethodInWrongOrderTest() throws ExecutionException, InterruptedException {\n List<Chunk> chunkList = new ArrayList<>();\n //generate chunks\n int numOfChunksToUpload = 5;\n while (numOfChunksToUpload > 0) {\n chunkList.add(generateChunk(10));\n numOfChunksToUpload--;\n }\n\n //Start a bad producer thread\n ExecutorService executorService = Executors.newSingleThreadExecutor();\n BadProducerThread producerThread = new BadProducerThread(\"Producer1\", chunkList, 20, new ApplicationService());\n Future<String> producerResult = executorService.submit(producerThread);\n while (true) {\n if (producerResult.isDone())\n break;\n }\n log.debug(\"Result : \" + producerResult.get());\n executorService.shutdown();\n\n\n }",
"@Test\n void testGivenFaultyRequestWithNoQueryString_thenSuccess() throws Exception {\n URL u = new URL(\"http://localhost:8080/sentry-servlet/fault\");\n HttpURLConnection conn = (HttpURLConnection)u.openConnection();\n int rc = conn.getResponseCode();\n assertThat(rc)\n .isEqualTo(200);\n }",
"@Test\n public void testWithNotConfiguredPath() throws Exception {\n final Http2Client client = Http2Client.getInstance();\n final CountDownLatch latch = new CountDownLatch(1);\n final ClientConnection connection;\n try {\n connection = client.connect(new URI(\"http://localhost:17352\"), Http2Client.WORKER, Http2Client.SSL, Http2Client.BUFFER_POOL, OptionMap.EMPTY).get();\n } catch (Exception e) {\n throw new ClientException(e);\n }\n final AtomicReference<ClientResponse> reference = new AtomicReference<>();\n try {\n ClientRequest request = new ClientRequest().setPath(\"/test3\").setMethod(Methods.GET);\n request.getRequestHeaders().put(Headers.HOST, \"localhost\");\n connection.sendRequest(request, client.createClientCallback(reference, latch));\n latch.await();\n } catch (Exception e) {\n logger.error(\"Exception: \", e);\n throw new ClientException(e);\n } finally {\n IoUtils.safeClose(connection);\n }\n int statusCode = reference.get().getResponseCode();\n String responseBody = reference.get().getAttachment(Http2Client.RESPONSE_BODY);\n Assert.assertEquals(200, statusCode);\n Assert.assertEquals(\"OK\", responseBody);\n }",
"@Test\n\tpublic void exception() {\n\t\t// ReactiveValue wraps all exceptions in CompletionException.\n\t\tCompletionException ce = assertThrows(CompletionException.class, () -> p.pin(\"key\", () -> {\n\t\t\tthrow new ArithmeticException();\n\t\t}));\n\t\tassertThat(ce.getCause(), instanceOf(ArithmeticException.class));\n\t\tassertThat(p.keys(), contains(\"key\"));\n\t\t// If we try to throw another exception second time around, we will still get the first one.\n\t\tce = assertThrows(CompletionException.class, () -> p.pin(\"key\", () -> {\n\t\t\tthrow new IllegalStateException();\n\t\t}));\n\t\tassertThat(ce.getCause(), instanceOf(ArithmeticException.class));\n\t}",
"@Test\n @Category(FastTest.class)\n public void handleDownloadsExceededCorrectly() throws Exception {\n stubFor(get(urlPathMatching(\"/download/0/.*\"))\n .willReturn(aResponse()\n .withStatus(500)\n .withHeader(\"Content-Type\", \"text/html\")\n .withBodyFile(\"download-limit-exceeded.html\")));\n\n // call service under test\n migrator.migrate(getClass().getResource(TESTFILE_VALID_BOOK));\n\n // verify that our logic attempted download twice\n verify(getRequestedFor(urlEqualTo(\n \"/download/0/?token=abcdef\")));\n }",
"public Response callback() throws Exception;",
"@Test\n public void testSaveException() {\n when(client.receiveFromServer()).thenThrow(new RuntimeException(\"plant out of stock\"));\n\n service.save(plantedPlant);\n\n verify(client).sendToServer(\"save#PlantedPlant\");\n verify(client).sendToServer(plantedPlant);\n }",
"@Test\n public void testRejectedExecution() throws Exception {\n assertEquals(0, errorStorageDir.listFiles().length);\n\n for (int k = 0; k < TASK_COUNT; k++) {\n client.notify(new Throwable(\"Rejected Execution\"));\n }\n\n // the exact number of files is indeterminate (dependent on the ThreadPoolExecutor)\n File[] files = errorStorageDir.listFiles();\n assertTrue(files.length > 0);\n File errorFile = files[0];\n\n JSONObject payload = ErrorStoreTest.getJsonObjectFromReport(new Report(\"api\", errorFile));\n ErrorStoreTest.validateReportPayload(payload);\n }",
"@Override\n public V call() throws HttpRequestException {\n boolean bl = false;\n try {\n V v = this.run();\n return v;\n }\n catch (HttpRequestException httpRequestException) {\n bl = true;\n throw httpRequestException;\n }\n catch (IOException iOException) {\n bl = true;\n throw new HttpRequestException(iOException);\n }\n finally {\n this.done();\n }\n }",
"public void testNoMadeCommunication() {\n\t\t// Arrange\n\t\tString exceptionNumber = null;\n\t\tPhoneNumberDTO dto = new PhoneNumberDTO(EXISTING_NUMBER);\n\t\tGetLastMadeCommunicationService service\n\t\t\t= new GetLastMadeCommunicationService(dto);\n\t\t\n\t\t// Act\n\t\ttry {\n\t\t\tservice.execute();\n\t\t\tfail(\"Should have thrown NoMadeCommunication\");\n\t\t} catch(NoMadeCommunication nmc) {\n\t\t\texceptionNumber = nmc.getNumber();\n\t\t}\n\t\t\n\t\t// Assert\n\t\tassertEquals(\"The phone number in the exception should be \"\n\t\t\t\t+ EXISTING_NUMBER + \" but it was \" + exceptionNumber,\n\t\t\t\tEXISTING_NUMBER, exceptionNumber);\n\t}",
"@Override\n public Promise<T> exceptionallyAsync(Function<Throwable, ? extends T> fn) {\n return cast(super.exceptionallyAsync(fn));\n }",
"@org.chromium.protocolReader.JsonOptionalField\n boolean wasThrown();",
"@Test\n\tpublic void performRequestValidation() throws Exception {\n\n\t\tString responseBody = TestUtils.getValidResponse();\n\n\t\ttry {\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tResponseEntity<ResponseWrapper> responseEntity = prepareReponseEntity(responseBody);\n\n\t\t\tthis.mockServer.verify();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Test(expected=IllegalStateException.class)\n public void verifyThatRequestBeforeInitialization() {\n verifyThatRequest();\n fail(\"cannot do verification, Jadler hasn't been initialized yet\");\n }",
"@Test\n\t\tpublic void testRestSuccessfulResponse() throws Exception {\n\n\t\t\tString responseBody = TestUtils.getValidResponse();\n\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tResponseEntity<ResponseWrapper> responseEntity= prepareReponseEntity(responseBody);\n\t\t\t\t\n\t\t\t\tboolean flag=weatherService.checkForErrors(responseEntity);\n\t\t\t\tassertFalse(flag);\n\t\t\t\n\t\t\t\tthis.mockServer.verify();\n\t\t\t} catch (Exception e) {\n\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}",
"@Test\n @ConditionalIgnoreRule.ConditionalIgnore(condition = RunningOnGithubAction.class)\n public void testFailure() throws Exception {\n ExecutorService executorService = Executors.newFixedThreadPool(1);\n try {\n Future<?> future =\n executorService.submit(\n () -> {\n try {\n submitQuery(false, 0);\n } catch (SQLException e) {\n throw new RuntimeSQLException(\"SQLException\", e);\n } catch (InterruptedException e) {\n throw new IllegalStateException(\"task interrupted\", e);\n }\n });\n executorService.shutdown();\n future.get();\n fail(\"should fail and raise an exception\");\n } catch (ExecutionException ex) {\n Throwable rootCause = ex.getCause();\n assertThat(\"Runtime Exception\", rootCause, instanceOf(RuntimeSQLException.class));\n\n rootCause = rootCause.getCause();\n\n assertThat(\"Root cause class\", rootCause, instanceOf(SnowflakeSQLException.class));\n assertThat(\"Error code\", ((SnowflakeSQLException) rootCause).getErrorCode(), equalTo(390114));\n }\n }",
"@SmallTest\n @Test\n public void testNegotiationFailsDueToTimeout() {\n mDtmfTransport.startNegotiation();\n\n mTestExecutorService.advanceTime(NEGOTIATION_TIMEOUT_MILLIS);\n\n verify(mCallback).onNegotiationFailed(eq(mDtmfTransport));\n assertEquals(DtmfTransport.STATE_NEGOTIATION_FAILED, mDtmfTransport.getTransportState());\n }",
"@Test\n public void testHandleReadLogCorrupted() {\n final List<Long> addresses = LongStream.rangeClosed(1L, 10L).boxed().collect(Collectors.toList());\n final boolean cacheable = false;\n\n RequestMsg request = getRequestMsg(\n getBasicHeader(ClusterIdCheck.CHECK, EpochCheck.CHECK),\n getReadLogRequestMsg(addresses, cacheable)\n );\n\n addresses.forEach(address -> {\n if (address != 7L) {\n when(mCache.get(address, cacheable)).thenReturn(getDefaultLogData(address));\n } else {\n when(mCache.get(address, cacheable)).thenThrow(new DataCorruptionException());\n }\n });\n\n ArgumentCaptor<ResponseMsg> responseCaptor = ArgumentCaptor.forClass(ResponseMsg.class);\n logUnitServer.handleMessage(request, mChannelHandlerContext, mServerRouter);\n\n // Assert that the payload has a DATA_CORRUPTION error response with the\n // expected address, and that the base header fields have remained the same.\n verify(mServerRouter).sendResponse(responseCaptor.capture(), eq(mChannelHandlerContext));\n ResponseMsg response = responseCaptor.getValue();\n assertTrue(compareBaseHeaderFields(request.getHeader(), response.getHeader()));\n assertTrue(response.getPayload().hasServerError());\n assertTrue(response.getPayload().getServerError().hasDataCorruptionError());\n assertEquals(7L, response.getPayload().getServerError().getDataCorruptionError().getAddress());\n }",
"@Override\n\t\t\t\t\t\t\t\t\t\tpublic void onRequestFail() {\n\n\t\t\t\t\t\t\t\t\t\t}",
"@Test\n public void testCancel() throws Exception {\n\n try {\n client.makeBooking(\"Paul\", new Date(System.currentTimeMillis()), true);\n Assert.fail(\"Should have thrown a TransactionCompensatedException\");\n } catch (TransactionCompensatedException e) {\n //expected\n }\n\n Assert.assertTrue(\"Expected booking to be cancelled, but it wasn't\", client.getLastBookingStatus().equals(BookingStatus.CANCELLED));\n\n }",
"void onSynchronizationFailed(SyncException e);",
"@Test\n public void testSendingDataException_whenTimesOut() throws Throwable {\n final LinkedBlockingQueue<IMetricsUploadService> mockedResultsQueue =\n mock(LinkedBlockingQueue.class);\n when(mockedResultsQueue.poll(anyLong(), any())).thenReturn(null);\n\n AwMetricsLogUploader uploader = new AwMetricsLogUploader(\n /* waitForResults= */ true, /* useDefaultUploadQos= */ false);\n int status = uploader.log(SAMPLE_TEST_METRICS_LOG.toByteArray(), mockedResultsQueue);\n\n Assert.assertEquals(HttpURLConnection.HTTP_CLIENT_TIMEOUT, status);\n }",
"@Override\n\t public void onFailure(Throwable caught) {\n\n\t }",
"RequestSender onFailure(Consumer<Message> consumer);",
"@Test\n public void testLoad() throws Exception {\n try{\n service.load();\n } catch(Exception e){\n fail(\"Exception should not be thrown on load!!!!!\");\n }\n }",
"void shouldThrowForBadServerValue() {\n }",
"@Test\n public void asyncResultFiresListeners() {\n\n final AtomicBoolean shouldBeSet = new AtomicBoolean(false);\n\n AsyncResult<String> result = new AsyncResult<>(\"hey!\");\n result.addCallback(new ListenableFutureCallback<String>() {\n @Override\n public void onFailure(Throwable throwable) {\n fail(\"This should never happen\");\n }\n\n @Override\n public void onSuccess(String s) {\n shouldBeSet.set(true);\n }\n });\n\n assertTrue(shouldBeSet.get());\n }",
"@Test\n public void attach_exception_listener_called() {\n try {\n final String channelName = \"attach_exception_listener_called_\" + testParams.name;\n\n /* init Ably */\n ClientOptions opts = createOptions(testVars.keys[0].keyStr);\n AblyRealtime ably = new AblyRealtime(opts);\n\n /* wait until connected */\n (new ConnectionWaiter(ably.connection)).waitFor(ConnectionState.connected);\n assertEquals(\"Verify connected state reached\", ably.connection.state, ConnectionState.connected);\n\n /* create a channel; put into failed state */\n ably.connection.connectionManager.requestState(new ConnectionManager.StateIndication(ConnectionState.failed, new ErrorInfo(\"Test error\", 400, 12345)));\n (new ConnectionWaiter(ably.connection)).waitFor(ConnectionState.failed);\n assertEquals(\"Verify failed state reached\", ably.connection.state, ConnectionState.failed);\n\n /* attempt to attach */\n Channel channel = ably.channels.get(channelName);\n final ErrorInfo[] listenerError = new ErrorInfo[1];\n synchronized(listenerError) {\n channel.attach(new CompletionListener() {\n @Override\n public void onSuccess() {\n synchronized (listenerError) {\n listenerError.notify();\n }\n fail(\"Unexpected attach success\");\n }\n\n @Override\n public void onError(ErrorInfo reason) {\n synchronized (listenerError) {\n listenerError[0] = reason;\n listenerError.notify();\n }\n }\n });\n\n /* wait until the listener is called */\n while(listenerError[0] == null) {\n try { listenerError.wait(); } catch(InterruptedException e) {}\n }\n }\n\n /* verify that the listener was called with an error */\n assertNotNull(\"Verify the error callback was called\", listenerError[0]);\n assertEquals(\"Verify the given error is indicated\", listenerError[0].code, 12345);\n\n /* tidy */\n ably.close();\n } catch(AblyException e) {\n fail(e.getMessage());\n }\n\n }",
"@Test\n public void simulateNormalLoad(TestContext context) {\n Async async = context.async();\n try {\n init();\n loadSimulatedNormalData();\n\n put(\"myapi1/v1/test\").then().assertThat().statusCode(200);\n put(\"myapi2/v1/test\").then().assertThat().statusCode(200);\n } catch (Exception failed) {\n failed.printStackTrace();\n context.fail(\"Exception: \" + failed.getMessage());\n }\n\n System.out.println(\"Done\");\n\n async.complete();\n }",
"@Test(expected = ExampleSubmissionException.class)\n\tpublic void throwsExampleSubmissionException() throws IOException, ExampleSubmissionException {\n\n\t\tIterable<Example> examples = getExamples(\"One\", \"Two\", \"Three\");\n\n\t\tTCPIPSocketFactory socketFactory = mock(TCPIPSocketFactory.class);\n\t\twhen(socketFactory.getSocket()).thenThrow(UnknownHostException.class);\n\n\t\tAsyncFailFastTCPIPExampleProcessor toTest = new AsyncFailFastTCPIPExampleProcessor(socketFactory, Executors.newCachedThreadPool(), examples);\n\n\t\ttoTest.submitExamples(this);\n\n\t}",
"public void downloadFailed(Throwable t);",
"@Test\n public void testUnfinishedTrace() throws InterruptedException\n {\n final CountDownLatch cdl = new CountDownLatch(1);\n\n final SettablePromise<Void> promise = Promises.settable();\n\n final Task<Void> task = new BaseTask<Void>()\n {\n @Override\n public Promise<Void> run(final Context context) throws Exception\n {\n cdl.countDown();\n\n // Return a promise that won't be satisfied until after out test\n return promise;\n }\n };\n\n getEngine().run(task);\n\n assertTrue(cdl.await(5, TimeUnit.SECONDS));\n\n final Trace trace = task.getTrace();\n assertShallowTraceMatches(task, trace);\n\n // Finish task\n promise.done(null);\n }",
"public void testGetDownloadData_NoData() throws Exception {\n try {\n FailureTestHelper.unloadData();\n dao.getDownloadData(1);\n fail(\"EntryNotFoundException expected\");\n } catch (EntryNotFoundException e) {\n // should land here\n }\n }",
"@Test\n void testRequestInterleaving() throws Exception {\n final BlockerSync sync = new BlockerSync();\n testHandler.handlerBody =\n id -> {\n if (id == 1) {\n try {\n sync.block();\n } catch (InterruptedException e) {\n Thread.currentThread().interrupt();\n }\n }\n return CompletableFuture.completedFuture(new TestResponse(id.toString()));\n };\n\n // send first request and wait until the handler blocks\n final CompletableFuture<TestResponse> response1 =\n sendRequestToTestHandler(new TestRequest(1));\n sync.awaitBlocker();\n\n // send second request and verify response\n final CompletableFuture<TestResponse> response2 =\n sendRequestToTestHandler(new TestRequest(2));\n assertThat(response2.get().getStatus()).isEqualTo(\"2\");\n\n // wake up blocked handler\n sync.releaseBlocker();\n\n // verify response to first request\n assertThat(response1.get().getStatus()).isEqualTo(\"1\");\n }",
"@Override\n\t\t\t\t\t\tpublic void onFailure(Method method, Throwable exception) {\n\n\t\t\t\t\t\t}",
"@Override\n public void onFailure(IMqttToken asyncActionToken, Throwable exception) {\n }",
"@Override\n public void onFailure(IMqttToken asyncActionToken,\n Throwable exception) {\n }"
] | [
"0.67326546",
"0.62654436",
"0.6254543",
"0.6171326",
"0.61443686",
"0.6122452",
"0.6111305",
"0.5981824",
"0.5936044",
"0.5930516",
"0.5874946",
"0.58609074",
"0.58247656",
"0.58111817",
"0.5806495",
"0.58036304",
"0.5776917",
"0.5776584",
"0.57559466",
"0.574801",
"0.5734534",
"0.5731192",
"0.5709914",
"0.57040805",
"0.56856084",
"0.5654293",
"0.565131",
"0.56355506",
"0.56320715",
"0.56016576",
"0.558495",
"0.55696464",
"0.5550204",
"0.55436796",
"0.5539856",
"0.5539292",
"0.55345243",
"0.5515608",
"0.5510507",
"0.5508971",
"0.55084234",
"0.55004436",
"0.5490886",
"0.54899484",
"0.5475978",
"0.54692",
"0.54679525",
"0.5466627",
"0.54616624",
"0.54614854",
"0.54479295",
"0.54472697",
"0.5442439",
"0.5430968",
"0.54132843",
"0.5380131",
"0.5380131",
"0.5380131",
"0.5380097",
"0.537884",
"0.53712314",
"0.5367292",
"0.53660554",
"0.5361867",
"0.53561175",
"0.5344964",
"0.5344303",
"0.53434116",
"0.533918",
"0.5338811",
"0.5337443",
"0.533542",
"0.5335156",
"0.53232825",
"0.5303488",
"0.5299257",
"0.52951264",
"0.5294919",
"0.52926946",
"0.52819514",
"0.5280368",
"0.5263166",
"0.52552915",
"0.5250942",
"0.52317065",
"0.5231152",
"0.52295905",
"0.52291846",
"0.5224985",
"0.52223617",
"0.5218898",
"0.5218398",
"0.52171624",
"0.52070624",
"0.52047133",
"0.5196186",
"0.51924384",
"0.5192179",
"0.5191975",
"0.5187922"
] | 0.64912176 | 1 |
Test that an asynchronous request will eventually return the right offset | @Test
public void testBlocking() throws Exception {
FutureRecordMetadata future = new FutureRecordMetadata(asyncRequest(baseOffset, null, 50L),
relOffset, RecordBatch.NO_TIMESTAMP, 0, 0, Time.SYSTEM);
assertEquals(baseOffset + relOffset, future.get().offset());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void validSessionTransactionsGetOffsetTest() {\n // Insert test transaction 1.\n validSessionValidTransactionPostTest();\n\n String clutterTransaction = String.format(\"{\" +\n \"\\\"date\\\": \\\"1889-04-20T19:45:04.030Z\\\", \" +\n \"\\\"amount\\\": 23.53, \" +\n \"\\\"externalIBAN\\\": \\\"something\\\", \" +\n \"\\\"type\\\": \\\"deposit\\\", \" +\n \"\\\"description\\\" : \\\"test\\\", \" +\n \"\\\"category\\\": {\" +\n \" \\\"id\\\": %d,\" +\n \" \\\"name\\\": \\\"\" + TEST_CATEGORY_NAME + \"\\\"\" +\n \" }\" +\n \"}\", testCategoryId);\n\n // Insert test transaction 2.\n clutterTransactionId = given()\n .header(\"X-session-ID\", sessionId)\n .body(clutterTransaction)\n .post(\"api/v1/transactions\")\n .then()\n .assertThat()\n .statusCode(201)\n .extract()\n .response()\n .getBody()\n .jsonPath()\n .getInt(\"id\");\n\n // Send a valid get request with offset 1.\n int responseId = given()\n .header(\"X-session-ID\", sessionId)\n .queryParam(\"offset\", 1)\n .get(\"api/v1/transactions\")\n .then()\n .assertThat()\n .body(matchesJsonSchema(TRANSACTION_LIST_SCHEMA_PATH))\n .contentType(ContentType.JSON)\n .statusCode(200)\n .extract()\n .response()\n .getBody()\n .jsonPath()\n .getInt(\"[0].id\");\n\n assertEquals(clutterTransactionId.intValue(), responseId);\n }",
"@Test\n public void furtherRequestsDelay() throws Exception {\n final byte[] response = new byte[16];\n final StreamManager manager = new StreamManager() {\n @Override\n public ManagedBuffer getChunk(long streamId, int chunkIndex) {\n Uninterruptibles.sleepUninterruptibly(FOREVER, TimeUnit.MILLISECONDS);\n return new NioManagedBuffer(ByteBuffer.wrap(response));\n }\n };\n RpcHandler handler = new RpcHandler() {\n @Override\n public void receive(\n TransportClient client,\n ByteBuffer message,\n RpcResponseCallback callback) {\n throw new UnsupportedOperationException();\n }\n\n @Override\n public StreamManager getStreamManager() {\n return manager;\n }\n };\n\n context = new TransportContext(conf, handler);\n server = context.createServer();\n clientFactory = context.createClientFactory();\n TransportClient client = clientFactory.createClient(TestUtils.getLocalHost(), server.getPort());\n\n // Send one request, which will eventually fail.\n TestCallback callback0 = new TestCallback();\n client.fetchChunk(0, 0, callback0);\n Uninterruptibles.sleepUninterruptibly(1200, TimeUnit.MILLISECONDS);\n\n // Send a second request before the first has failed.\n TestCallback callback1 = new TestCallback();\n client.fetchChunk(0, 1, callback1);\n Uninterruptibles.sleepUninterruptibly(1200, TimeUnit.MILLISECONDS);\n\n // not complete yet, but should complete soon\n assertEquals(-1, callback0.successLength);\n assertNull(callback0.failure);\n callback0.latch.await(60, TimeUnit.SECONDS);\n assertTrue(callback0.failure instanceof IOException);\n\n // make sure callback1 is called.\n callback1.latch.await(60, TimeUnit.SECONDS);\n // failed at same time as previous\n assertTrue(callback1.failure instanceof IOException);\n }",
"@Test\n public void testTimeout() throws Exception {\n ProduceRequestResult request = new ProduceRequestResult(topicPartition);\n FutureRecordMetadata future = new FutureRecordMetadata(request, relOffset,\n RecordBatch.NO_TIMESTAMP, 0, 0, Time.SYSTEM);\n assertFalse(future.isDone(), \"Request is not completed\");\n try {\n future.get(5, TimeUnit.MILLISECONDS);\n fail(\"Should have thrown exception.\");\n } catch (TimeoutException e) { /* this is good */\n }\n\n request.set(baseOffset, RecordBatch.NO_TIMESTAMP, null);\n request.done();\n assertTrue(future.isDone());\n assertEquals(baseOffset + relOffset, future.get().offset());\n }",
"@Test(priority=15)\n\tpublic void campaign_user_with_0_offset() throws URISyntaxException, ClientProtocolException, IOException, ParseException{\n\t\ttest = extent.startTest(\"campaign_user_with_0_offset\", \"To validate whether user is able to get campaign through campaign/user api with 0 offset value\");\n\t\ttest.assignCategory(\"CFA GET /campaign/user API\");\n\t\ttest_data = HelperClass.readTestData(class_name, \"campaign_user_with_0_offset\");\n\t\tList<NameValuePair> nvps = new ArrayList<NameValuePair>();\n\t\tnvps.add(new BasicNameValuePair(\"limit\", test_data.get(1)));\n\t\tCloseableHttpResponse response = HelperClass.make_get_request(\"/v2/campaign/user\", access_token, nvps);\n\t\tAssert.assertTrue(!(response.getStatusLine().getStatusCode() == 500 || response.getStatusLine().getStatusCode() == 401), \"Invalid status code is displayed. \"+ \"Returned Status: \"+response.getStatusLine().getStatusCode()+\" \"+response.getStatusLine().getReasonPhrase());\n\t\ttest.log(LogStatus.INFO, \"Execute campaign/user api method without offset value\");\n\t\tBufferedReader rd = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));\n\t\tString line = \"\";\n\t\tJSONArray camp_data_array_without_offset = new JSONArray(), camp_data_array_with_offset = new JSONArray();\n\t\twhile ((line = rd.readLine()) != null) {\n\t\t // Convert response to JSON object\t\n\t\t JSONParser parser = new JSONParser();\n\t\t JSONObject response_json = (JSONObject) parser.parse(line);\n\t\t camp_data_array_without_offset = (JSONArray)response_json.get(\"data\");\n\t\t Assert.assertEquals(response_json.get(\"result\"), \"success\", \"API does not return success when offset value is not passed.\");\n\t\t test.log(LogStatus.PASS, \"API returns success when offset value is not passed.\");\n\t\t}\n\t\t\n\t\t// Execute campaign/user api with 0 offset value\n\t\tnvps.add(new BasicNameValuePair(\"offset\", test_data.get(2)));\n\t\tresponse = HelperClass.make_get_request(\"/v2/campaign/user\", access_token, nvps);\n\t\tAssert.assertTrue(!(response.getStatusLine().getStatusCode() == 500 || response.getStatusLine().getStatusCode() == 401), \"Invalid status code is displayed. \"+ \"Returned Status: \"+response.getStatusLine().getStatusCode()+\" \"+response.getStatusLine().getReasonPhrase());\n\t\ttest.log(LogStatus.INFO, \"Execute campaign/user api method with 0 offset value\");\n\t\trd = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));\n\t\twhile ((line = rd.readLine()) != null) {\n\t\t // Convert response to JSON object\t\n\t\t JSONParser parser = new JSONParser();\n\t\t JSONObject response_json = (JSONObject) parser.parse(line);\n\t\t camp_data_array_with_offset = (JSONArray)response_json.get(\"data\");\n\t\t Assert.assertEquals(response_json.get(\"result\"), \"success\", \"API does not return success when 0 offset value is passed.\");\n\t\t test.log(LogStatus.PASS, \"API returns success when 0 offset value is passed.\");\n\t\t}\n\t\t\n\t\tAssert.assertEquals(camp_data_array_without_offset, camp_data_array_with_offset);\n\t}",
"private String tryGetResponse(Request request) throws IOException {\n long startTime = System.currentTimeMillis();\n Response response;\n String responseBody;\n do {\n response = client.newCall(request).execute();\n responseBody = response.body().string();\n System.out.println(\"Got response code \" + response.code());\n } while (response.code() != 200\n && System.currentTimeMillis() - startTime < TimeUnit.SECONDS.toMillis(30));\n\n assertEquals(\n 200, response.code(), \"Unexpected response code. Got this response: \" + responseBody);\n return responseBody;\n }",
"@Test\n public void validSessionTransactionsGetLimitTest() {\n // Insert two transactions into the API.\n validSessionTransactionsGetOffsetTest();\n\n int size = given()\n .header(\"X-session-ID\", sessionId)\n .queryParam(\"limit\", TEST_OFFSET_NUMBER)\n .get(\"/api/v1/transactions\")\n .then()\n .assertThat()\n .statusCode(200)\n .body(matchesJsonSchema(TRANSACTION_LIST_SCHEMA_PATH))\n .contentType(ContentType.JSON)\n .extract()\n .jsonPath()\n .getList(\"$\")\n .size();\n\n assertThat(TEST_OFFSET_NUMBER, equalTo(size));\n }",
"@Test(priority=11)\n\tpublic void campaign_user_with_blank_offset() throws ClientProtocolException, IOException, URISyntaxException, ParseException{\n\t\ttest = extent.startTest(\"campaign_user_with_blank_offset\", \"To validate whether user is able to get campaign through campaign/user api with blank offset\");\n\t\ttest.assignCategory(\"CFA GET /campaign/user API\");\n\t\t// Add parameters in request\n\t\tList<NameValuePair> nvps = new ArrayList<NameValuePair>();\n\t\tnvps.add(new BasicNameValuePair(\"offset\", \"\"));\n\t\tCloseableHttpResponse response = HelperClass.make_get_request(\"/v2/campaign/user\", access_token, nvps);\n\t\tAssert.assertTrue(!(response.getStatusLine().getStatusCode() == 500 || response.getStatusLine().getStatusCode() == 401), \"Invalid status code is displayed. \"+ \"Returned Status: \"+response.getStatusLine().getStatusCode()+\" \"+response.getStatusLine().getReasonPhrase());\n\t\ttest.log(LogStatus.INFO, \"Execute campaign/user api method with blank offset value\");\n\t\tBufferedReader rd = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));\n\t\tString line = \"\";\n\t\twhile ((line = rd.readLine()) != null) {\t\t\t\n\t\t\tJSONParser parser = new JSONParser();\n\t\t\tJSONObject json = (JSONObject) parser.parse(line);\n\t\t\tString message = json.get(\"message\").toString();\n\t\t\tAssert.assertEquals(message, \"Validation errors\", \"Invalid message value is returned in response when blank offset value is passed\");\t\t\n\t\t\tJSONArray errors_array = (JSONArray)json.get(\"errors\");\n\t\t\tJSONObject error_data = (JSONObject) errors_array.get(0);\n\t\t\tString error_code = error_data.get(\"code\").toString();\n\t\t\tAssert.assertEquals(error_code, \"INVALID_REQUEST_PARAMETER\", \"Invalid code value is returned in response when blank offset value is passed\");\n\t\t\tString in_value = error_data.get(\"in\").toString();\n\t\t\tAssert.assertEquals(in_value, \"query\", \"Invalid in value is returned in response when blank offset value is passed\");\n\t\t\tString message_value = error_data.get(\"message\").toString();\n\t\t\tAssert.assertEquals(message_value, \"Invalid parameter (offset): Expected type integer but found type string\", \"Invalid message value is returned in response when blank offset value is passed\");\n\t\t\tString name_value = error_data.get(\"name\").toString();\n\t\t\tAssert.assertEquals(name_value, \"offset\", \"Invalid name value is returned in response when blank offset value is passed\");\n\t\t\tJSONArray error_path = (JSONArray)error_data.get(\"path\");\n\t\t\tAssert.assertTrue(error_path.isEmpty(), \"path is not blank when blank offset value is passed\");\n\t\t\tJSONArray sub_error_array = (JSONArray) error_data.get(\"errors\");\n\t\t\tJSONObject sub_error_data = (JSONObject) sub_error_array.get(0);\n\t\t\tString sub_error_code = sub_error_data.get(\"code\").toString();\n\t\t\tAssert.assertEquals(sub_error_code, \"INVALID_TYPE\", \"Invalid code value is returned in response when blank offset value is passed\");\n\t\t\tString sub_error_message = sub_error_data.get(\"message\").toString();\n\t\t\tJSONArray sub_error_path = (JSONArray)sub_error_data.get(\"path\");\n\t\t\tAssert.assertTrue(sub_error_path.isEmpty(), \"path is not blank when blank offset value is passed\");\n\t\t\tAssert.assertEquals(sub_error_message, \"Expected type integer but found type string\", \"Invalid message value is returned in response when blank offset value is passed\");\n\t\t\ttest.log(LogStatus.PASS, \"Check whether proper validation message is displayed when blank offset value is passed.\");\n\t\t}\t\n\t}",
"private int getChunk(byte [] buffer, int offset, String chunk) {\r\n\t\ttry {\r\n\t\t\tfor (;;) {\r\n\t\t\t\tint dataLenght = getInt(buffer, offset);\r\n\t\t\t\tif (compareBytes(buffer, offset+4, chunk)) {\r\n\t\t\t\t\treturn offset;\r\n\t\t\t\t} else {\r\n\t\t\t\t\toffset += 4 + 4 + dataLenght + 4;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {};\r\n\t\treturn -1;\r\n\t}",
"@Test\n public void employeeGetsAllTransactionsWithOffsetAndLimitShouldReturnOk() throws Exception{\n mvc.perform(get(\"/transactions?offset=1&limit=4\")\n .header(\"ApiKeyAuth\", \"1234-abcd-5678-efgh\"))\n .andExpect(status().isOk());\n }",
"void requestProcessed( C conn, int numResponseExpected ) ;",
"@Test\n public void testHandleKnownAddress() {\n final long startRange = 3L;\n final long endRange = 7L;\n\n RequestMsg request = getRequestMsg(\n getBasicHeader(ClusterIdCheck.CHECK, EpochCheck.CHECK),\n getKnownAddressRequestMsg(startRange, endRange)\n );\n\n final Set<Long> rKnown = LongStream.rangeClosed(startRange, endRange).boxed().collect(Collectors.toSet());\n when(mStreamLog.getKnownAddressesInRange(startRange, endRange)).thenReturn(rKnown);\n ArgumentCaptor<ResponseMsg> responseCaptor = ArgumentCaptor.forClass(ResponseMsg.class);\n logUnitServer.handleMessage(request, mChannelHandlerContext, mServerRouter);\n\n // Assert that the payload has a KNOWN_ADDRESS response and that the\n // base header fields have remained the same.\n verify(mServerRouter).sendResponse(responseCaptor.capture(), eq(mChannelHandlerContext));\n ResponseMsg response = responseCaptor.getValue();\n assertTrue(compareBaseHeaderFields(request.getHeader(), response.getHeader()));\n assertTrue(response.getPayload().hasKnownAddressResponse());\n\n // Assert that the response contains the expected addresses.\n assertEquals(rKnown, new HashSet<>(response.getPayload().getKnownAddressResponse().getKnownAddressList()));\n }",
"public void loadNextDataFromApi(int offset) {\n // Send an API request to retrieve appropriate paginated data\n // --> Send the request including an offset value (i.e `page`) as a query parameter.\n // --> Deserialize and construct new model objects from the API response\n // --> Append the new data objects to the existing set of items inside the array of items\n // --> Notify the adapter of the new items made with `notifyItemRangeInserted()`\n PostFetch postFetch = new PostFetch(getContext(), new AppUtils.MyInterface() {\n @Override\n public void myMethod(String response) {\n if(response.equals(\"0\")){\n Toast.makeText(getContext(), \"No internet connection\", Toast.LENGTH_SHORT).show();\n }\n else if(response.equals(\"1\")){\n Toast.makeText(getContext(), \"Unable to connect to server\", Toast.LENGTH_SHORT).show();\n }\n else {\n AppUtils.addPostsToAdapter(getContext(), response, mAdapter);\n }\n }\n });\n postFetch.execute(url, Integer.valueOf(offset*10).toString(), AppUtils.PAGE_SIZE);\n }",
"protected abstract long waitToTravel();",
"@Override\n\tpublic void DoGoToWaiting(int offset) {\n\t\t\n\t}",
"SdkHttpRequest getLastRequest();",
"void setFirstResult(int offset);",
"public void loadNextDataFromApi(int offset, View view) {\n // Send an API request to retrieve appropriate paginated data\n // --> Send the request including an offset value (i.e `page`) as a query parameter.\n // --> Deserialize and construct new model objects from the API response\n // --> Append the new data objects to the existing set of items inside the array of items\n // --> Notify the adapter of the new items made with `notifyItemRangeInserted()`\n final int curSize = tweets.size();// adapter.getItemCount();\n\n // Create the Handler object (on the main thread by default)\n Handler handler = new Handler();\n // Define the code block to be executed\n Runnable runnableCode = () -> {\n // reset only with first load.\n //scrollListener.resetState();\n Log.d(\"DEBUG\", \"before new load tweets size:\" + curSize);\n if(hasLocal) {\n adapter.clear();\n hasLocal =false;\n populateTimeline(1L,Long.MAX_VALUE - 1);\n }else {\n populateTimeline(1L, tweets.get(curSize - 1).getId());\n }\n };\n // Run the above code block on the main thread after 500 miliseconds\n handler.postDelayed(runnableCode, 500);\n }",
"@Generated\n @Selector(\"seekToOffset:error:\")\n boolean seekToOffsetError(double offsetTime, @Nullable @ReferenceInfo(type = NSError.class) Ptr<NSError> outError);",
"public void loadNextDataFromApi(int offset) {\n client.getMoreMentionsTimeline(maxId, new JsonHttpResponseHandler(){\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n\n for (int i = 0; i < response.length(); i++){\n //get json object in the position index\n //create a tweet object with json object\n //add the tweet object to the arraylist of tweets\n //notify changes to adapter\n Tweet tweet = null;\n try {\n tweet = Tweet.fromJson(response.getJSONObject(i));\n tweets.add(tweet);\n adapter.notifyItemInserted(tweets.size() - 1);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n if (tweet.uid < maxId){\n maxId = tweet.uid;\n Log.d(\"MaxId\", String.valueOf(maxId));\n }\n\n }\n }\n });\n\n }",
"void stubNextResponse(HttpExecuteResponse nextResponse, Duration delay);",
"public int getOffset(long date) { throw new RuntimeException(\"Stub!\"); }",
"@Test\n public void readPartialFile() throws Exception {\n long start = 3;\n long end = ((ReadHandlerTest.CHUNK_SIZE) * 10) - 99;\n long checksumExpected = populateInputFile(((ReadHandlerTest.CHUNK_SIZE) * 10), start, end);\n mReadHandler.onNext(buildReadRequest(start, ((end + 1) - start)));\n checkAllReadResponses(mResponses, checksumExpected);\n }",
"@Test(priority=14)\n\tpublic void campaign_user_with_negative_offset() throws ClientProtocolException, IOException, URISyntaxException, ParseException{\n\t\ttest = extent.startTest(\"campaign_user_with_negative_offset\", \"To validate whether user is able to get campaign through campaign/user api with negative offset\");\n\t\ttest.assignCategory(\"CFA GET /campaign/user API\");\n\t\ttest_data = HelperClass.readTestData(class_name, \"campaign_user_with_negative_offset\");\n\t\t// Add parameters in request\n\t\tList<NameValuePair> nvps = new ArrayList<NameValuePair>();\n\t\tString offset_value = test_data.get(2);\n\t\tnvps.add(new BasicNameValuePair(\"offset\", offset_value));\n\t\tCloseableHttpResponse response = HelperClass.make_get_request(\"/v2/campaign/user\", access_token, nvps);\n\t\tAssert.assertTrue(!(response.getStatusLine().getStatusCode() == 500 || response.getStatusLine().getStatusCode() == 401), \"Invalid status code is displayed. \"+ \"Returned Status: \"+response.getStatusLine().getStatusCode()+\" \"+response.getStatusLine().getReasonPhrase());\n\t\ttest.log(LogStatus.INFO, \"Execute campaign/list api method with negative limit value\");\n\t\tBufferedReader rd = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));\n\t\tString line = \"\";\n\t\twhile ((line = rd.readLine()) != null) {\n\t\t\t\n\t\t\tJSONParser parser = new JSONParser();\n\t\t\tJSONObject json = (JSONObject) parser.parse(line);\n\t\t\tString message = json.get(\"message\").toString();\n\t\t\tAssert.assertEquals(message, \"Validation errors\", \"Invalid message value is returned in response when negative offset value is passed\");\t\t\n\t\t\tJSONArray errors_array = (JSONArray)json.get(\"errors\");\n\t\t\tJSONObject error_data = (JSONObject) errors_array.get(0);\n\t\t\tString error_code = error_data.get(\"code\").toString();\n\t\t\tAssert.assertEquals(error_code, \"INVALID_REQUEST_PARAMETER\", \"Invalid code value is returned in response when negative offset value is passed\");\n\t\t\tString in_value = error_data.get(\"in\").toString();\n\t\t\tAssert.assertEquals(in_value, \"query\", \"Invalid in value is returned in response when negative offset value is passed\");\n\t\t\tString message_value = error_data.get(\"message\").toString();\n\t\t\tAssert.assertEquals(message_value, \"Invalid parameter (offset): Value failed JSON Schema validation\", \"Invalid message value is returned in response when negative offset value is passed\");\n\t\t\tString name_value = error_data.get(\"name\").toString();\n\t\t\tAssert.assertEquals(name_value, \"offset\", \"Invalid name value is returned in response when negative offset value is passed\");\n\t\t\tJSONArray error_path = (JSONArray)error_data.get(\"path\");\n\t\t\tArrayList<String> list = new ArrayList<String>();\n\t\t\tlist.add(\"paths\");\n\t\t\tlist.add(\"/campaign/user\");\n\t\t\tlist.add(\"get\");\n\t\t\tlist.add(\"parameters\");\n\t\t\tlist.add(\"1\");\n\t\t\tJSONArray ex_path= new JSONArray();\n\t\t\tex_path.addAll(list);\n\t\t\tAssert.assertEquals(error_path, ex_path); \n\t\t\tJSONArray sub_error_array = (JSONArray) error_data.get(\"errors\");\n\t\t\tJSONObject sub_error_data = (JSONObject) sub_error_array.get(0);\n\t\t\tString sub_error_code = sub_error_data.get(\"code\").toString();\n\t\t\tAssert.assertEquals(sub_error_code, \"MINIMUM\", \"Invalid code value is returned in response when negative offset value is passed\");\n\t\t\tString sub_error_message = sub_error_data.get(\"message\").toString();\n\t\t\tAssert.assertEquals(sub_error_message, \"Value \"+ offset_value +\" is less than minimum 0\", \"Invalid message value is returned in response when negative offset value is passed\");\n\t\t\tJSONArray sub_error_path = (JSONArray)sub_error_data.get(\"path\");\n\t\t\tAssert.assertTrue(sub_error_path.isEmpty(), \"path is not blank when negative offset value is passed\");\n\t\t\tString sub_error_description = sub_error_data.get(\"description\").toString();\n\t\t\tAssert.assertEquals(sub_error_description, \"Number of records from the beginning to start the data set from\");\n\t\t\ttest.log(LogStatus.PASS, \"Check whether proper validation message is displayed when negative offset value is passed.\");\n\t\t}\t\n\t}",
"public void testOldCacheGetsReusedLocally() throws Exception\n {\n final String asyncContents = \"Async commit contents\";\n\n TestSetup t = new TestSetup().prepare();\n String asyncRev = t.commitTestFileContents(asyncContents, \"Async commit\");\n\n File targetDir = t.createDir(\"target\");\n\n GitOperationHelper goh = createGitOperationHelper();\n goh.fetch(targetDir, t.accessData, false);\n goh.checkout(t.cacheDir, targetDir, asyncRev, null, false);\n\n String contents = FileUtils.readFileToString(new File(targetDir, \"file.txt\"));\n Assert.assertEquals(contents, asyncContents);\n }",
"private void checkAndThrowReceivedEndqryrm(int lastValidBytePositionBeforeFetch) {\n if (lastValidBytePosition_ > lastValidBytePositionBeforeFetch) {\n return;\n }\n checkAndThrowReceivedEndqryrm();\n }",
"public void customLoadMoreDataFromApi(int offset) {\n }",
"@Test\n public void offsetLessThanEgress() throws InterruptedException {\n int offset = 20;\n int egress = 80;\n this.sfcOfRendererDataListener.onDataTreeChanged(createSfcOfRendererConfig(offset, egress));\n Thread.sleep(100); // Let the thread finish\n verifySettersCalled(offset, egress);\n }",
"@MediumTest\n public void testReadWithPartialResult() throws Exception {\n this.mNewPartialData = false;\n this.mNormalEnd = false;\n final StringBuffer sb = new StringBuffer();\n AsyncResultExecutable cmd =\n CommandHelper.read(getContext(), READ_FILE, new AsyncResultListener() {\n @Override\n public void onAsyncStart() {\n /**NON BLOCK**/\n }\n @Override\n public void onAsyncEnd(boolean cancelled) {\n synchronized (ReadCommandTest.this.mSync) {\n ReadCommandTest.this.mNormalEnd = true;\n ReadCommandTest.this.mSync.notify();\n }\n }\n @Override\n public void onAsyncExitCode(int exitCode) {\n /**NON BLOCK**/\n }\n @Override\n public void onException(Exception cause) {\n fail(String.valueOf(cause));\n }\n @Override\n public void onPartialResult(Object results) {\n ReadCommandTest.this.mNewPartialData = true;\n sb.append(new String((byte[])results));\n }\n }, getConsole());\n synchronized (ReadCommandTest.this.mSync) {\n ReadCommandTest.this.mSync.wait(15000L);\n }\n try {\n if (!this.mNormalEnd && cmd != null && cmd.isCancellable() && !cmd.isCancelled()) {\n cmd.cancel();\n }\n } catch (Exception e) {/**NON BLOCK**/}\n assertTrue(\"no new partial data\", this.mNewPartialData); //$NON-NLS-1$\n assertNotNull(\"sb==null\", sb); //$NON-NLS-1$\n Log.v(TAG, String.format(\"read data: %s\", sb.toString())); //$NON-NLS-1$\n assertTrue(\"read.size > 0\", sb.length() > 0); //$NON-NLS-1$\n }",
"@Test\n public void offsetGreaterThanEgress() throws InterruptedException {\n int offset = 200;\n int egress = 10;\n this.sfcOfRendererDataListener.onDataTreeChanged(createSfcOfRendererConfig(offset, egress));\n Thread.sleep(100); // Let the thread finish\n verifySettersCalled(offset, egress);\n }",
"public boolean hasOffset() {\n return result.hasOffset();\n }",
"@Test\n void highConcurrencyOnSingleConnection() {\n SingleConnection singleConnection =\n options.getSingleConnectionFactory().apply(\"localhost\", server.httpPort());\n assumeTrue(singleConnection != null);\n\n int count = 50;\n String method = \"GET\";\n String path = \"/success\";\n URI uri = resolveAddress(path);\n\n CountDownLatch latch = new CountDownLatch(1);\n ExecutorService pool = Executors.newFixedThreadPool(4);\n for (int i = 0; i < count; i++) {\n int index = i;\n Runnable job =\n () -> {\n try {\n latch.await();\n } catch (InterruptedException e) {\n throw new AssertionError(e);\n }\n try {\n Integer result =\n testing.runWithSpan(\n \"Parent span \" + index,\n () -> {\n Span.current().setAttribute(\"test.request.id\", index);\n return singleConnection.doRequest(\n path,\n Collections.singletonMap(\"test-request-id\", String.valueOf(index)));\n });\n assertThat(result).isEqualTo(200);\n } catch (Throwable throwable) {\n if (throwable instanceof AssertionError) {\n throw (AssertionError) throwable;\n }\n throw new AssertionError(throwable);\n }\n };\n pool.submit(job);\n }\n latch.countDown();\n\n List<Consumer<TraceAssert>> assertions = new ArrayList<>();\n for (int i = 0; i < count; i++) {\n assertions.add(\n trace -> {\n SpanData rootSpan = trace.getSpan(0);\n // Traces can be in arbitrary order, let us find out the request id of the current one\n int requestId = Integer.parseInt(rootSpan.getName().substring(\"Parent span \".length()));\n\n trace.hasSpansSatisfyingExactly(\n span ->\n span.hasName(rootSpan.getName())\n .hasKind(SpanKind.INTERNAL)\n .hasNoParent()\n .hasAttributesSatisfyingExactly(\n equalTo(AttributeKey.longKey(\"test.request.id\"), requestId)),\n span -> assertClientSpan(span, uri, method, 200, null).hasParent(rootSpan),\n span ->\n assertServerSpan(span)\n .hasParent(trace.getSpan(1))\n .hasAttributesSatisfyingExactly(\n equalTo(AttributeKey.longKey(\"test.request.id\"), requestId)));\n });\n }\n\n testing.waitAndAssertTraces(assertions);\n\n pool.shutdown();\n }",
"@Test(timeout = 4000)\n public void test15() throws Throwable {\n LinkedList<byte[][]> linkedList0 = new LinkedList<byte[][]>();\n byte[][] byteArray0 = new byte[3][9];\n byte[] byteArray1 = new byte[4];\n byte byte0 = (byte)1;\n FBCachedFetcher fBCachedFetcher0 = new FBCachedFetcher(linkedList0, (FBObjectListener.FetcherListener) null);\n FileSystemHandling.shouldAllThrowIOExceptions();\n fBCachedFetcher0.getFetchSize();\n try { \n fBCachedFetcher0.absolute(0);\n fail(\"Expecting exception: FBSQLException\");\n \n } catch(FBSQLException e) {\n //\n // You cannot position to the row 0 with absolute() method.\n //\n verifyException(\"org.firebirdsql.jdbc.FBCachedFetcher\", e);\n }\n }",
"@Test\n void highConcurrency() {\n int count = 50;\n String method = \"GET\";\n URI uri = resolveAddress(\"/success\");\n\n CountDownLatch latch = new CountDownLatch(1);\n\n ExecutorService pool = Executors.newFixedThreadPool(4);\n for (int i = 0; i < count; i++) {\n int index = i;\n Runnable job =\n () -> {\n try {\n latch.await();\n } catch (InterruptedException e) {\n throw new AssertionError(e);\n }\n try {\n Integer result =\n testing.runWithSpan(\n \"Parent span \" + index,\n () -> {\n Span.current().setAttribute(\"test.request.id\", index);\n return doRequest(\n method,\n uri,\n Collections.singletonMap(\"test-request-id\", String.valueOf(index)));\n });\n assertThat(result).isEqualTo(200);\n } catch (Throwable throwable) {\n if (throwable instanceof AssertionError) {\n throw (AssertionError) throwable;\n }\n throw new AssertionError(throwable);\n }\n };\n pool.submit(job);\n }\n latch.countDown();\n\n List<Consumer<TraceAssert>> assertions = new ArrayList<>();\n for (int i = 0; i < count; i++) {\n assertions.add(\n trace -> {\n SpanData rootSpan = trace.getSpan(0);\n // Traces can be in arbitrary order, let us find out the request id of the current one\n int requestId = Integer.parseInt(rootSpan.getName().substring(\"Parent span \".length()));\n\n trace.hasSpansSatisfyingExactly(\n span ->\n span.hasName(rootSpan.getName())\n .hasKind(SpanKind.INTERNAL)\n .hasNoParent()\n .hasAttributesSatisfyingExactly(\n equalTo(AttributeKey.longKey(\"test.request.id\"), requestId)),\n span -> assertClientSpan(span, uri, method, 200, null).hasParent(rootSpan),\n span ->\n assertServerSpan(span)\n .hasParent(trace.getSpan(1))\n .hasAttributesSatisfyingExactly(\n equalTo(AttributeKey.longKey(\"test.request.id\"), requestId)));\n });\n }\n\n testing.waitAndAssertTraces(assertions);\n\n pool.shutdown();\n }",
"public void loadNextDataFromApi(int offset) {\n // Send an API request to retrieve appropriate paginated data\n // --> Send the request including an offset value (i.e `page`) as a query parameter.\n // --> Deserialize and construct new model objects from the API response\n // --> Append the new data objects to the existing set of items inside the array of items\n // --> Notify the adapter of the new items made with `notifyItemRangeInserted()`\n\n Toast.makeText(getActivity(), \"new data loading\", Toast.LENGTH_SHORT).show();\n\n final Integer count =Integer.parseInt(dataoffset)+10;\n dataoffset=count.toString();\n\n\n JsonObjectRequest fetchAllStores = new JsonObjectRequest(Request.Method.POST, \"http://omtii.com/mile/fetchpagegroupchat.php?mobno=\"+mobileno+\"&dataoffset=\"+count.toString(), null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n\n Log.d(TAG, \"more data query : \" + \"http://omtii.com/mile/fetchpagegroupchat.php?mobno=\"+mobileno+\"&dataoffset=\"+count.toString());\n\n Log.d(TAG, \"Fetch Stores: \" + response);\n showStores(response);\n //MyRecyclerView.setAdapter(adapter);\n System.err.println(\"adpter attached\");\n adapter.notifyDataSetChanged();\n System.err.println(\"data set changed attached\");\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.d(TAG, \"Fetch Stores Error: \" + error.getMessage());\n }\n });\n ApplicationController.getInstance().addToRequestQueue(fetchAllStores);\n }",
"@Test(timeout = 4000)\n public void test05() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray0 = new byte[5];\n byteArray0[0] = (byte)89;\n byteArray0[1] = (byte)71;\n byte byte0 = (byte)0;\n byteArray0[2] = (byte)0;\n int int0 = (-3383);\n // Undeclared exception!\n try { \n defaultNucleotideCodec0.getUngappedOffsetFor(byteArray0, (-3383));\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }",
"protected abstract boolean sendNextRequests();",
"private long getByteOffsetForRecordingNanos(long nanos) throws HNStreamingException, HNStreamingRangeException\n {\n try\n {\n RecordedService[] segments = getSegmentedRecordedService().getSegments();\n //not pending, no need to check for null\n RecordedService thisSegment = recordingItem.getRecording(nanos);\n long recordingSize = 0L;\n long recordingNanos = 0L;\n for (int i = 0;i<segments.length;i++)\n {\n HNStreamContentDescription thisDescription = recordingItem.getContentDescription((OcapRecordedServiceExt) segments[i]);\n\n long thisRecordingSize = HNAPIImpl.nativeServerGetNetworkContentItemSize(contentLocationType, thisDescription,\n protocolInfo.getProfileId(), protocolInfo.getContentFormat(), request.getTransformation() );\n // If native returns unknown size for this content, byte offset cannot\n // be determined. Return from here.\n if(thisRecordingSize < 0)\n {\n return -1;\n }\n if (segments[i] == thisSegment)\n {\n try\n {\n long thisNanosOffset = nanos - recordingNanos;\n long thisByteOffset = HNAPIImpl.nativeServerGetNetworkBytePositionForMediaTimeNS(contentLocationType, thisDescription,\n protocolInfo.getProfileId(), protocolInfo.getContentFormat(), request.getTransformation(), thisNanosOffset);\n // If native returns unknown byte offset for given time, overall byte offset cannot\n // be determined. Return from here.\n if(thisByteOffset < 0)\n {\n return -1;\n }\n return recordingSize + thisByteOffset;\n }\n catch (MPEMediaError err)\n {\n throw new HNStreamingException(\"Failed to retrieve network byte position \", err);\n }\n }\n recordingSize += thisRecordingSize;\n //recorded duration is millis\n recordingNanos += (segments[i].getRecordedDuration() * NANOS_PER_MILLI);\n }\n throw new HNStreamingRangeException(\"getByteOffsetForRecordingNanos - segment not found for nanos: \" + nanos + \", recording nanos: \" + recordingNanos);\n }\n catch (MPEMediaError err)\n {\n throw new HNStreamingException(\"Failed to retrieve byte offset for recording nanos: \" + nanos, err);\n }\n }",
"private boolean isByteBufferWithinCurrentRequestRange(ByteBuffer byteBuffer) {\n if (contentChannelEndOffset == -1) {\n return true;\n }\n return ((positionForNextRead + byteBuffer.remaining()) <= contentChannelEndOffset);\n }",
"public void apiSpotifyGetTracksHelper(final int playlistPos, JSONObject playlistItems, Messenger handler){\n int trackTotal = 0;\n int offset = 0;\n try {\n trackTotal = playlistItems.getInt(\"total\");\n final int offsetTotal = (int) Math.ceil((double)trackTotal/100);\n //Round up to find the amount of times we need to iterate through the paging\n for(int i = 0; i < offsetTotal; i++){\n Request request = new Request.Builder()\n .url(getString(R.string.api_spotify_gettracks, playlists.get(playlistPos).getId())+ \"?offset=\" + offset)\n .header(\"Authorization\", \"Bearer \"+ dh.getSpotifyUserToken())\n .build();\n\n Call call = client.newCall(request);\n\n final CountDownLatch countDownLatch = new CountDownLatch(1);\n\n call.enqueue(new Callback(){\n\n @Override\n public void onResponse(@NotNull Call call, @NotNull Response response){\n try {\n if(response.isSuccessful()){\n String res = response.body().string();\n Log.v(TAG, res);\n try {\n JSONObject object = new JSONObject(res);\n parseSpotifyTracks(object.getJSONArray(\"items\"), playlistPos);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }else {\n Log.e(TAG, \"Not Successful: \" + response.body().string());\n }\n countDownLatch.countDown();\n } catch (IOException e){\n Log.e(TAG, \"IO Exception caught: \", e);\n countDownLatch.countDown();\n }\n\n }\n\n @Override\n public void onFailure(@NotNull Call call, @NotNull IOException e) {\n Log.e(TAG, \"IO Exception caught: \", e);\n countDownLatch.countDown();\n }\n });\n countDownLatch.await();\n // Iterate the offset by 100\n offset += 100;\n }\n\n // determine if the last parse just happened to move on to finding the songs\n if(playlistPos == playlists.size() -1){\n findSongsAtDest(handler);\n }\n } catch (JSONException | InterruptedException e) {\n e.printStackTrace();\n\n }\n\n }",
"int getFollowRequests(AsyncResultHandler handler);",
"public static int offset_reply() {\n return (80 / 8);\n }",
"@Override\n public void onResponseTaskCompleted(Request request, Response response, OHException ohex, Object data) {\n requestingPoints = false;\n }",
"boolean hasStoreChunkResponse();",
"@Generated\n @Selector(\"fetchOffset\")\n @NUInt\n public native long fetchOffset();",
"public void requestPosition(int num)\n {\n Log.d(LOG_TAG, \"requestPosition()\");\n new Request(ip, this, num).start();\n }",
"private RetrieveResult waitForRetrieveCompletion(AsyncResult asyncResult) throws Exception {\n int poll = 0;\n long waitTimeMilliSecs = ONE_SECOND;\n String asyncResultId = asyncResult.getId();\n RetrieveResult result = null;\n do {\n Thread.sleep(waitTimeMilliSecs);\n // Double the wait time for the next iteration\n waitTimeMilliSecs *= 2;\n if (poll++ > MAX_NUM_POLL_REQUESTS) {\n throw new Exception(\"Request timed out. If this is a large set \" +\n \"of metadata components, check that the time allowed \" +\n \"by MAX_NUM_POLL_REQUESTS is sufficient.\");\n }\n result = metadataConnection.checkRetrieveStatus(\n asyncResultId, true);\n System.out.println(this.username+ \". >> Retrieve Status: \" + result.getStatus());\n } while (!result.isDone());\n\n return result;\n }",
"@Test\n public void testHandleInspectAddresses() {\n final List<Long> addresses = LongStream.rangeClosed(1L, 16L).boxed().collect(Collectors.toList());\n final List<Long> expectedEmpty = addresses.stream()\n .filter(address -> address > 9L).collect(Collectors.toList());\n\n RequestMsg request = getRequestMsg(\n getBasicHeader(ClusterIdCheck.CHECK, EpochCheck.CHECK),\n getInspectAddressesRequestMsg(addresses)\n );\n\n addresses.forEach(address -> when(mStreamLog.contains(address)).thenReturn(address < 10L));\n ArgumentCaptor<ResponseMsg> responseCaptor = ArgumentCaptor.forClass(ResponseMsg.class);\n logUnitServer.handleMessage(request, mChannelHandlerContext, mServerRouter);\n\n // Assert that the payload has an INSPECT_ADDRESSES response and that the\n // base header fields have remained the same.\n verify(mServerRouter).sendResponse(responseCaptor.capture(), eq(mChannelHandlerContext));\n ResponseMsg response = responseCaptor.getValue();\n assertTrue(compareBaseHeaderFields(request.getHeader(), response.getHeader()));\n assertTrue(response.getPayload().hasInspectAddressesResponse());\n\n // Assert that the response contains the expected addresses.\n assertEquals(expectedEmpty, response.getPayload().getInspectAddressesResponse().getEmptyAddressList());\n }",
"boolean hasChunkRequest();",
"public ProduceRequestResult asyncRequest(final long baseOffset, final RuntimeException error, final long timeout) {\n final ProduceRequestResult request = new ProduceRequestResult(topicPartition);\n Thread thread = new Thread(() -> {\n try {\n Thread.sleep(timeout);\n if (error == null) {\n request.set(baseOffset, RecordBatch.NO_TIMESTAMP, null);\n } else {\n request.set(-1L, RecordBatch.NO_TIMESTAMP, index -> error);\n }\n\n request.done();\n } catch (InterruptedException e) { }\n });\n thread.start();\n return request;\n }",
"public int getFoundOffset() { return _foundoffset; }",
"@Test\n public void testServerTask(){\n for(Double current : sampleLatLngs.keySet()) {\n tmp = current;\n try {\n runTestOnUiThread(new Runnable() {\n @Override\n public void run() {\n try {\n byte[] returnedMessage = new ServerTask().execute(URL, String.valueOf(tmp), String.valueOf(sampleLatLngs.get(tmp)), \"N/A\", \"N/A\", \"N/A\").get();\n ByteArrayInputStream in = new ByteArrayInputStream(returnedMessage);\n ObjectInputStream is = new ObjectInputStream(in);\n Message convertedMessage = (Message) is.readObject();\n ensureMessageArraySizes(convertedMessage);\n } catch (Exception e) {\n assertFalse(\"Reached an exception: \" + e.getMessage(), true);\n }\n }\n });\n } catch (Throwable throwable) {\n assertFalse(\"Reached an exception: \" + throwable.getMessage(), true);\n }\n }\n }",
"private Future<Location> receiveClientRequest(){\n return executor.submit(new Callable<Location>(){\n public Location call(){\n Location clientLocation = null;\n try {\n MulticastSocket s = new MulticastSocket(PROTOCOL_GROUP_PORT);\n s.joinGroup(InetAddress.getByName(PROTOCOL_GROUP_ADDRESS));\n\n byte buf[] = new byte[2048];\n DatagramPacket pingPacket = new DatagramPacket(buf, buf.length);\n s.receive(pingPacket);\n\n clientLocation = deserialize(pingPacket.getData());\n\n System.out.println(\"[INFO] -----------------------------------------\\n\" +\n \"[INFO] Received location request...\");\n\n s.leaveGroup(InetAddress.getByName(PROTOCOL_GROUP_ADDRESS));\n s.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return clientLocation;\n }\n });\n }",
"@Override\n public int peekUnsignedByte(int offset) throws IOException\n {\n if (offset < 0)\n {\n throw new IOException(\"offset is negative\");\n }\n if (offset == 0)\n {\n return randomAccessRead.peek();\n }\n long currentPosition = randomAccessRead.getPosition();\n if (currentPosition + offset >= randomAccessRead.length())\n {\n throw new IOException(\"Offset position is out of range \" + (currentPosition + offset)\n + \" >= \" + randomAccessRead.length());\n }\n randomAccessRead.seek(currentPosition + offset);\n int peekValue = randomAccessRead.read();\n randomAccessRead.seek(currentPosition);\n return peekValue;\n }",
"boolean hasChunkResponse();",
"public void getOffset(long date, boolean local, int[] offsets) { throw new RuntimeException(\"Stub!\"); }",
"@Test(timeout = 4000)\n public void test002() throws Throwable {\n int[] intArray0 = new int[3];\n intArray0[0] = 0;\n intArray0[1] = 1025;\n intArray0[2] = 0;\n int int0 = MethodWriter.getNewOffset(intArray0, intArray0, 187, 1139);\n assertEquals(1977, int0);\n }",
"public void testHttpFailureRetries() {\n delayTestFinish(RUNASYNC_TIMEOUT);\n runAsync1(0);\n }",
"@Override\n public void progress(long offset, long length) {\n Log.d(TAG, offset + \" of \" + length + \" bytes received\");\n }",
"int readNonBlocking(byte[] buffer, int offset, int length);",
"private static boolean testNotFound() {\r\n\t\t// use ExecutorService to manage threads\r\n\t\tExecutorService executor = Executors.newFixedThreadPool(1);\r\n\t\t\r\n\t\tlogger.finest(\"sending request\");\r\n\t\tURL url = urlList.get(0);\r\n\t\t\r\n\t\ttry {\r\n\t\t\tURL notFoundURL = new URL(url.getProtocol(), url.getHost(), url.getPort(), url.getFile() + \"random\");\r\n\t\t\tHttpClient client = new HttpClient(notFoundURL);\r\n\t\t\texecutor.execute(client);\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t\tlogger.severe(\"problem formatting URL\");\r\n\t\t}\r\n\t\t\r\n\t\t// wait for test to finish\r\n\t\tlogger.finest(\"waiting for request to complete...\");\r\n\t\texecutor.shutdown(); \r\n\t\twhile (!executor.isTerminated())\r\n\t\t\tThread.yield(); // return the control to system\r\n\t\tlogger.finest(\"not found request completed\");\r\n\t\t\r\n\t\treturn true;\r\n\t}",
"@Test\n public void test001() {\n int limit = response.extract().path(\"limit\");\n\n System.out.println(\"------------------StartingTest---------------------------\");\n System.out.println(\"The total number of limit is: \" + limit);\n System.out.println(\"------------------End of Test---------------------------\");\n\n }",
"@Test\n public void cancelRequest() throws Exception {\n long fileSize = ((ReadHandlerTest.CHUNK_SIZE) * 100) + 1;\n populateInputFile(fileSize, 0, (fileSize - 1));\n mReadHandler.onNext(buildReadRequest(0, fileSize));\n mReadHandler.onCompleted();\n checkCancel(mResponseObserver);\n }",
"public void testGetResult1Async() throws InterruptedException {\n\t\t//get through twitter\n\t\tTimeoutCallback<Result<OAuthConfig>> callback1 = new TimeoutCallback<>();\n\t\toauth.authorizeAsync(Mocks.tokens, callback1, null, 0);\n\t\ttimeout(callback1, TimeUnit.SECONDS, 10);\n\n\t\tassertTrue(\"Did not finish before timeout\", callback1.isFinished.get());\n\t\tassertTrue(format(\"Failed to get from twitter\", callback1.ref.get()), callback1.ref.get().isSuccess());\n\t\tverify(oauth.storage, times(1)).store(anyString(), any(OAuthConfig.OAuthTokens.class));\n\n\t\t//get from cache\n\t\tTimeoutCallback<Result<OAuthConfig>> callback2 = new TimeoutCallback<>();\n\t\toauth.authorizeAsync(null, callback2, null, null);\n\t\ttimeout(callback2, TimeUnit.SECONDS, 10);\n\n\t\tassertTrue(\"Did not finish before timeout\", callback2.isFinished.get());\n\t\tassertTrue(format(\"Failed to get from twitter\", callback2.ref.get()), callback2.ref.get().isSuccess());\n\t\tverify(oauth.storage, times(1)).getByKey(anyString());\n\t}",
"boolean hasOffset();",
"@Test\n public void testHandleLogAddressSpace() {\n RequestMsg request = getRequestMsg(\n getBasicHeader(ClusterIdCheck.CHECK, EpochCheck.CHECK),\n getLogAddressSpaceRequestMsg()\n );\n\n Map<UUID, StreamAddressSpace> tails = ImmutableMap.of(\n UUID.randomUUID(), new StreamAddressSpace(-1L, Collections.singleton(32L)),\n UUID.randomUUID(), new StreamAddressSpace(-1L, Collections.singleton(11L))\n );\n\n StreamsAddressResponse expectedResponse = new StreamsAddressResponse(32L, tails);\n expectedResponse.setEpoch(1L);\n\n // Return a future when the operation is added to the BatchProcessor.\n when(mBatchProcessor.<StreamsAddressResponse>addTask(BatchWriterOperation.Type.LOG_ADDRESS_SPACE_QUERY, request))\n .thenReturn(CompletableFuture.completedFuture(expectedResponse));\n\n ArgumentCaptor<ResponseMsg> responseCaptor = ArgumentCaptor.forClass(ResponseMsg.class);\n logUnitServer.handleMessage(request, mChannelHandlerContext, mServerRouter);\n\n // Assert that the payload has a LOG_ADDRESS_SPACE response and that the base\n // header fields have remained the same.\n verify(mServerRouter).sendResponse(responseCaptor.capture(), eq(mChannelHandlerContext));\n ResponseMsg response = responseCaptor.getValue();\n assertTrue(compareBaseHeaderFields(request.getHeader(), response.getHeader()));\n assertTrue(response.getPayload().hasLogAddressSpaceResponse());\n\n // Assert that the response is as expected.\n StreamsAddressResponse provided = getStreamsAddressResponse(\n response.getPayload().getLogAddressSpaceResponse().getLogTail(),\n response.getPayload().getLogAddressSpaceResponse().getEpoch(),\n response.getPayload().getLogAddressSpaceResponse().getAddressMapList()\n );\n\n assertEquals(expectedResponse.getEpoch(), provided.getEpoch());\n assertEquals(expectedResponse.getLogTail(), provided.getLogTail());\n assertEquals(expectedResponse.getAddressMap().size(), provided.getAddressMap().size());\n\n provided.getAddressMap().forEach((id, addressSpace) -> {\n assertEquals(expectedResponse.getAddressMap().get(id), addressSpace);\n });\n }",
"@Test\n void requestWithCallbackAndParent() throws Throwable {\n assumeTrue(options.getTestCallback());\n assumeTrue(options.getTestCallbackWithParent());\n\n String method = \"GET\";\n URI uri = resolveAddress(\"/success\");\n\n HttpClientResult result =\n testing.runWithSpan(\n \"parent\",\n () -> doRequestWithCallback(method, uri, () -> testing.runWithSpan(\"child\", () -> {})));\n\n assertThat(result.get()).isEqualTo(200);\n\n testing.waitAndAssertTraces(\n trace -> {\n trace.hasSpansSatisfyingExactly(\n span -> span.hasName(\"parent\").hasKind(SpanKind.INTERNAL).hasNoParent(),\n span -> assertClientSpan(span, uri, method, 200, null).hasParent(trace.getSpan(0)),\n span -> assertServerSpan(span).hasParent(trace.getSpan(1)),\n span -> span.hasName(\"child\").hasKind(SpanKind.INTERNAL).hasParent(trace.getSpan(0)));\n });\n }",
"public int getCurrentOffset () {\n if (SwingUtilities.isEventDispatchThread()) {\n return getCurrentOffset_();\n } else {\n final int[] ln = new int[1];\n try {\n SwingUtilities.invokeAndWait(new Runnable() {\n public void run() {\n ln[0] = getCurrentOffset_();\n }\n });\n } catch (InvocationTargetException ex) {\n ErrorManager.getDefault().notify(ex.getTargetException());\n } catch (InterruptedException ex) {\n // interrupted, ignored.\n }\n return ln[0];\n }\n }",
"private void fetchNextBlock() {\n try {\n \tSearchClient _client = new SearchClient(\"cubansea-instance\");\n \tWebSearchResults _results = _client.webSearch(createNextRequest());\n \t\tfor(WebSearchResult _result: _results.listResults()) {\n \t\t\tresults.add(new YahooSearchResult(_result, cacheStatus+1));\n \t\t\tcacheStatus++;\n \t\t}\n \t\tif(resultCount == -1) resultCount = _results.getTotalResultsAvailable().intValue();\n } catch (IOException e) {\n\t\t\tthrow new TechnicalError(e);\n\t\t} catch (SearchException e) {\n\t\t\tthrow new TechnicalError(e);\n\t\t}\n\t}",
"private int ensureBuffer(int offset, int length) throws IOException {\n\t\tfinal int lastPos = offset + length - 1;\n\t\tfinal int desiredSize = ((lastPos / BUFFER_SIZE) + 1) * BUFFER_SIZE;\n\t\tfinal int currentSize = this.buffer.length;\n\n\t\tif (desiredSize > currentSize) {\n\t\t\tfinal byte[] readBuffer = new byte[desiredSize - currentSize];\n\t\t\tfinal int count = this.in.read(readBuffer);\n\n\t\t\tif (count > 0) {\n\t\t\t\tfinal byte[] newBuffer = new byte[currentSize + count];\n\t\t\t\tSystem.arraycopy(this.buffer, 0, newBuffer, 0, currentSize);\n\t\t\t\tSystem.arraycopy(readBuffer, 0, newBuffer, currentSize, count);\n\t\t\t\tthis.buffer = newBuffer;\n\t\t\t}\n\t\t\treturn (lastPos < this.buffer.length) ? length : length - (lastPos - this.buffer.length + 1);\n\t\t}\n\t\treturn length;\n\t}",
"@Test(timeout = 4000)\n public void test03() throws Throwable {\n LinkedList<byte[][]> linkedList0 = new LinkedList<byte[][]>();\n FBCachedFetcher fBCachedFetcher0 = new FBCachedFetcher(linkedList0, (FBObjectListener.FetcherListener) null);\n try { \n fBCachedFetcher0.absolute((-1));\n fail(\"Expecting exception: FBSQLException\");\n \n } catch(FBSQLException e) {\n //\n // You cannot position to the row 0 with absolute() method.\n //\n verifyException(\"org.firebirdsql.jdbc.FBCachedFetcher\", e);\n }\n }",
"@Test\n void verifyMetrics() throws IOException, InterruptedException {\n HttpRequest req = HttpRequest.newBuilder()\n .GET()\n .uri(URI.create(\"https://5f6trv8063.execute-api.us-east-1.amazonaws.com/default/VespaDocSearchLambda/?jsoncallback=?&query=ranking&ranking=documentation&locale=en-US&hits=1\"))\n .build();\n HttpResponse<String> res = httpClient.send(req, HttpResponse.BodyHandlers.ofString());\n\n assertEquals(200, res.statusCode());\n\n String body = res.body();\n long hitCount = new ObjectMapper().readTree(body.substring(2, body.length()-2)) // Strip ?( ); from JSON-P response\n .get(\"root\").get(\"fields\").get(\"totalCount\").asLong();\n assert(hitCount > 50);\n }",
"@Test\n public void timeoutInactiveRequests() throws Exception {\n final Semaphore semaphore = new Semaphore(1);\n final int responseSize = 16;\n RpcHandler handler = new RpcHandler() {\n @Override\n public void receive(\n TransportClient client,\n ByteBuffer message,\n RpcResponseCallback callback) {\n try {\n semaphore.acquire();\n callback.onSuccess(ByteBuffer.allocate(responseSize));\n } catch (InterruptedException e) {\n // do nothing\n }\n }\n\n @Override\n public StreamManager getStreamManager() {\n return defaultManager;\n }\n };\n\n context = new TransportContext(conf, handler);\n server = context.createServer();\n clientFactory = context.createClientFactory();\n TransportClient client = clientFactory.createClient(TestUtils.getLocalHost(), server.getPort());\n\n // First completes quickly (semaphore starts at 1).\n TestCallback callback0 = new TestCallback();\n client.sendRpc(ByteBuffer.allocate(0), callback0);\n callback0.latch.await();\n assertEquals(responseSize, callback0.successLength);\n\n // Second times out after 10 seconds, with slack. Must be IOException.\n TestCallback callback1 = new TestCallback();\n client.sendRpc(ByteBuffer.allocate(0), callback1);\n callback1.latch.await(60, TimeUnit.SECONDS);\n assertNotNull(callback1.failure);\n assertTrue(callback1.failure instanceof IOException);\n\n semaphore.release();\n }",
"public void procRequest ()\r\n\t{\r\n\t\tthis.simTime = this.sim.getTimer();\r\n\t\tthis.request.setStartTime(simTime);\r\n\t\t//Debug/System.out.println(Fmt.time(simTime)\r\n\t\t//Debug/\t+ \": <procRequest> \" + request);\r\n\r\n\t\t//\tNeed to move from current cylinder to requested cylinder.\r\n\t\t//\tIf current == requested, no action.\r\n\t\tif (this.cylinder != this.request.getCylinder())\r\n\t\t\tthis.simTime += this.calcSeekTime(this.request.getCylinder());\r\n\t\tthis.sim.addEvent(new Event(Event.SEEK_SATISFIED, this.simTime));\r\n\t}",
"ServiceResponse<String> acquireMostBusyServerIp();",
"public boolean must_read_server(int offset, int byte_count, Runner runner) throws IOException, BadPathnameException, BadRangeException {\n boolean must = !cached(offset, byte_count) || (!local_fresh(runner.freshness_interval) && !server_fresh(runner));\n if (Constants.DEBUG) {\n if (must) {\n System.out.println (\"(log) Must read from server\");\n }\n else {\n System.out.println (\"(log) No need to read from server\");\n }\n }\n return must;\n }",
"@Test(timeout = 4000)\n public void test04() throws Throwable {\n LinkedList<byte[][]> linkedList0 = new LinkedList<byte[][]>();\n FBCachedFetcher fBCachedFetcher0 = new FBCachedFetcher(linkedList0, (FBObjectListener.FetcherListener) null);\n FileSystemHandling.shouldAllThrowIOExceptions();\n byte[][] byteArray0 = new byte[2][2];\n byte[] byteArray1 = new byte[0];\n byteArray0[0] = byteArray1;\n byte[] byteArray2 = new byte[9];\n byteArray2[0] = (byte)88;\n byteArray2[1] = (byte) (-22);\n byteArray2[2] = (byte)100;\n fBCachedFetcher0.absolute(946);\n byteArray2[3] = (byte) (-75);\n byteArray2[4] = (byte)37;\n byteArray2[5] = (byte)53;\n byteArray2[6] = (byte)43;\n byteArray2[7] = (byte)25;\n byteArray2[8] = (byte) (-43);\n byteArray0[1] = byteArray2;\n linkedList0.offerLast(byteArray0);\n try { \n fBCachedFetcher0.absolute(0);\n fail(\"Expecting exception: FBSQLException\");\n \n } catch(FBSQLException e) {\n //\n // You cannot position to the row 0 with absolute() method.\n //\n verifyException(\"org.firebirdsql.jdbc.FBCachedFetcher\", e);\n }\n }",
"@Test\r\n public void testGetOffset() {\r\n System.out.println(\"getOffset\");\r\n ConfigNode configNode = new ConfigNode(testLine);\r\n assertEquals(2, configNode.getOffset());\r\n }",
"@Test(priority=16)\n\tpublic void campaign_user_with_valid_limit_and_offset() throws URISyntaxException, ClientProtocolException, IOException, ParseException{\n\t\ttest = extent.startTest(\"campaign_user_with_valid_limit_and_offset\", \"To validate whether user is able to get campaign through campaign/user api with valid limit and offset value\");\n\t\ttest.assignCategory(\"CFA GET /campaign/user API\");\n\t\ttest_data = HelperClass.readTestData(class_name, \"campaign_user_with_valid_limit_and_offset\");\n\t\tList<NameValuePair> nvps = new ArrayList<NameValuePair>();\n\t\tnvps.add(new BasicNameValuePair(\"limit\", String.valueOf(Constants.GROUP_LEVEL-2)));\n\t\tCloseableHttpResponse response = HelperClass.make_get_request(\"/v2/campaign/user\", access_token, nvps);\n\t\tAssert.assertTrue(!(response.getStatusLine().getStatusCode() == 500 || response.getStatusLine().getStatusCode() == 401), \"Invalid status code is displayed. \"+ \"Returned Status: \"+response.getStatusLine().getStatusCode()+\" \"+response.getStatusLine().getReasonPhrase());\n\t\ttest.log(LogStatus.INFO, \"Execute campaign/user api method without offset value\");\n\t\tBufferedReader rd = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));\n\t\tString line = \"\";\n\t\tArrayList<String> camp_id = new ArrayList<>();\n\t\twhile ((line = rd.readLine()) != null) {\n\t\t \n\t\t // Convert response to JSON object\t\n\t\t JSONParser parser = new JSONParser();\n\t\t JSONObject json = (JSONObject) parser.parse(line);\n\t\t JSONArray array = (JSONArray)json.get(\"data\");\n\t\t Assert.assertEquals(json.get(\"result\"), \"success\", \"API does not return success when limit is passed and offset is not passed.\");\n\t\t test.log(LogStatus.PASS, \"API returns success when limit is passed and offset is not passed.\");\n\t\t Assert.assertEquals(json.get(\"err\"), null, \"err is not null when limit is passed and offset is not passed.\");\n\t\t test.log(LogStatus.PASS, \"err is null when limit is passed and offset is not passed.\");\n\t\t // Get the 10th campaign data from the campaign list\n\t\t for(int i=0;i<Constants.GROUP_LEVEL-2;i++){\n\t\t\t JSONObject nth_camp_data =(JSONObject) array.get(i);\n\t\t\t String nth_camp_id = nth_camp_data.get(\"campaign_id\").toString();\n\t\t\t camp_id.add(nth_camp_id);\n\t\t } \n\t\t}\n\t // Execute campaign/list api method with offset value\n\t nvps.add(new BasicNameValuePair(\"offset\", String.valueOf(Constants.GROUP_LEVEL-2)));\n\t response = HelperClass.make_get_request(\"/v2/campaign/user\", access_token, nvps);\n\t test.log(LogStatus.INFO, \"Execute campaign/user api method with offset value\");\n\t rd = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));\n\t line = \"\";\n\t while ((line = rd.readLine()) != null) {\n\t\t \n\t\t // Convert response to JSON object\t\n\t\t JSONParser parser = new JSONParser();\n\t\t JSONObject json = (JSONObject) parser.parse(line);\n\t\t JSONArray array = (JSONArray)json.get(\"data\");\n\t\t Assert.assertEquals(json.get(\"result\"), \"success\", \"API does not return success when valid limit and offset value are entered.\");\n\t\t test.log(LogStatus.PASS, \"API returns success when valid limit and offset value are entered.\");\n\t\t Assert.assertEquals(json.get(\"err\"), null, \"err is not null when valid limit and offset value are entered.\");\n\t\t test.log(LogStatus.PASS, \"err is null when valid limit and offset value are entered.\");\n\n\t\t for (int i=0; i<array.size(); i++) {\n\t\t\t JSONObject data = (JSONObject) array.get(i);\n\t\t\t Assert.assertFalse(camp_id.contains(data.get(\"campaign_id\").toString()), \"Offset is not working properly.\");\n\t\t }\n\t }\n\t}",
"private int adjustOffsetForUnitTests(int offset)\n\t{\n\t\tif (System.getProperty(\"fdbunit\")==null) //$NON-NLS-1$\n\t\t\treturn offset;\n\t\telse\n\t\t\treturn 0;\n\t}",
"@Test(description = \"This test verifies api response time\", groups = { \"topmonitor\" }, enabled = false)\n\tpublic void testResponseTime() {\n\t\tString api = \"http://economictimes.indiatimes.com/homefeed.cms?feedtype=etjson&curpg=1\";\n\t\tLong startTime = System.currentTimeMillis();\n\t\tApiHelper.getAPIResponse(api);\n\t\tLong endTime = System.currentTimeMillis();\n\t\tLong totalTime = endTime - startTime;\n\t\tDBUtil.dbInsertApi(new Date(), api, totalTime.doubleValue());\n\t}",
"@Test(timeout = 4000)\n public void test08() throws Throwable {\n LinkedList<byte[][]> linkedList0 = new LinkedList<byte[][]>();\n FBCachedFetcher fBCachedFetcher0 = new FBCachedFetcher(linkedList0, (FBObjectListener.FetcherListener) null);\n boolean boolean0 = fBCachedFetcher0.isLast();\n assertTrue(boolean0);\n }",
"@Test\n\tpublic void cursorDirtyRead() throws IOException {\n\t\tfinal ArangoCursor<VPackSlice> cursor = arango.db().query(\"FOR i IN 1..4 RETURN i\",\n\t\t\tnew AqlQueryOptions().batchSize(1).allowDirtyRead(true), VPackSlice.class);\n\t\t// get the initial result\n\t\tassertThat(cursor.hasNext(), is(true));\n\t\tassertThat(cursor.next().isInteger(), is(true));\n\t\t// get the second batch\n\t\tassertThat(cursor.hasNext(), is(true));\n\t\tassertThat(cursor.next().isInteger(), is(true));\n\t\t// close the cursor before fetching the all batches\n\t\tcursor.close();\n\t}",
"public void testSeekLocationOnCacheBoundary() throws Exception {\n \n \t// Position trace at event rank 0\n \tTmfContext context = fTrace.seekLocation(null);\n TmfEvent event = fTrace.parseEvent(context);\n assertEquals(\"Event timestamp\", 1, event.getTimestamp().getValue());\n assertEquals(\"Event rank\", 0, context.getRank());\n \n context = fTrace.seekLocation(context.getLocation());\n assertEquals(\"Event rank\", ITmfContext.UNKNOWN_RANK, context.getRank());\n \n event = fTrace.parseEvent(context);\n assertEquals(\"Event timestamp\", 1, event.getTimestamp().getValue());\n assertEquals(\"Event rank\", ITmfContext.UNKNOWN_RANK, context.getRank());\n \n event = fTrace.getNextEvent(context);\n assertEquals(\"Event timestamp\", 1, event.getTimestamp().getValue());\n assertEquals(\"Event rank\", ITmfContext.UNKNOWN_RANK, context.getRank());\n \n \t// Position trace at event rank 1000\n TmfContext tmpContext = fTrace.seekEvent(new TmfTimestamp(1001, SCALE, 0));\n context = fTrace.seekLocation(tmpContext.getLocation());\n assertEquals(\"Event rank\", ITmfContext.UNKNOWN_RANK, context.getRank());\n \n event = fTrace.parseEvent(context);\n assertEquals(\"Event timestamp\", 1001, event.getTimestamp().getValue());\n assertEquals(\"Event rank\", ITmfContext.UNKNOWN_RANK, context.getRank());\n \n event = fTrace.getNextEvent(context);\n assertEquals(\"Event timestamp\", 1001, event.getTimestamp().getValue());\n assertEquals(\"Event rank\", ITmfContext.UNKNOWN_RANK, context.getRank());\n \n \t// Position trace at event rank 4000\n tmpContext = fTrace.seekEvent(new TmfTimestamp(4001, SCALE, 0));\n context = fTrace.seekLocation(tmpContext.getLocation());\n assertEquals(\"Event rank\", ITmfContext.UNKNOWN_RANK, context.getRank());\n \n event = fTrace.parseEvent(context);\n assertEquals(\"Event timestamp\", 4001, event.getTimestamp().getValue());\n assertEquals(\"Event rank\", ITmfContext.UNKNOWN_RANK, context.getRank());\n \n event = fTrace.getNextEvent(context);\n assertEquals(\"Event timestamp\", 4001, event.getTimestamp().getValue());\n assertEquals(\"Event rank\", ITmfContext.UNKNOWN_RANK, context.getRank());\n }",
"protected final void assertResponseRead () {\n\t\t\tif(!didRead) throw new ProviderException (\"Response has not been read yet! -- whose bad?\");\n\t\t}",
"@Test\n public void testLoadATMsResponse() {\n\n // Create a delegate to test the response\n ATMDelegate delegate = new ATMDelegate() {\n @Override\n public void loadATMsPassed(List<ATM> allATMs) {\n\n assertEquals(2, allATMs.size());\n ATM atm = allATMs.get(0);\n\n assertEquals(1, atm.getId());\n assertEquals(\"Citi Bank\", atm.getName());\n assertEquals(3.50, atm.getCost(), 0.1);\n assertEquals(53.38697, atm.getLatitude(), 0.000001);\n assertEquals(-1.4776, atm.getLongitude(), 0.000001);\n }\n\n @Override\n public void loadATMsFailed(String errMessage) {\n\n fail(errMessage);\n }\n };\n\n\n // Call the method\n testConnector.loadATMS(delegate);\n }",
"@Test\n public void invalidTableOffset() throws InterruptedException {\n this.sfcOfRendererDataListener.onDataTreeChanged(createSfcOfRendererConfig(0, 100));\n Thread.sleep(SLEEP); // otherwise the failure is not detected\n verifySettersNotCalled();\n\n // Table Offset must be greater than 1\n this.sfcOfRendererDataListener.onDataTreeChanged(createSfcOfRendererConfig(1, 100));\n Thread.sleep(SLEEP); // otherwise the failure is not detected\n verifySettersNotCalled();\n\n // Table Offset must be less than 246 (255-maxTableOffset())\n this.sfcOfRendererDataListener.onDataTreeChanged(createSfcOfRendererConfig(250, 100));\n Thread.sleep(SLEEP); // otherwise the failure is not detected\n verifySettersNotCalled();\n }",
"@Test\n\tpublic final void testReceiveDoneAt() throws MPIException {\n\t\tblock.startCommunication();\n\t\tBoundaryId initialized = new BoundaryId();\n\t\tBoundaryIterator initializedIterator = block.getBoundaryIterator();\n\t\t// Values are the same in all blocks.\n\t\tBoundaryIterator oppositeIterator = block.getBoundaryIterator();\n\t\tfor (int i=0; i<2*DIMENSIONALITY; i++) {\n\t\t\tblock.receiveDoneAt(initialized);\n\t\t\tinitializedIterator.setBoundaryToIterate(initialized);\n\t\t\tBoundaryId oppositeBoundary = initialized.oppositeSide();\n\t\t\toppositeIterator.setBoundaryToIterate(oppositeBoundary);\n\t\t\twhile (oppositeIterator.isInField()) {\n\t\t\t\t// Check ghost region values.\n\t\t\t\tfor (int distance=0; distance<extent; distance++) {\n\t\t\t\t\tint dir = initialized.isLowerSide() ? -1 : 1;\n\t\t\t\t\tdouble expected = oppositeIterator.currentNeighbor(initialized.getDimension(), dir * distance);\n\t\t\t\t\tdouble actual = initializedIterator.currentNeighbor(initialized.getDimension(), dir * (1+distance));\n\t\t\t\t\tassertEquals(expected, actual, 4*Math.ulp(expected));\n\t\t\t\t}\n\t\t\t\toppositeIterator.next();\n\t\t\t\tinitializedIterator.next();\n\t\t\t}\n\t\t}\n\t\tblock.finishCommunication();\n\t}",
"@Test\n public void testHandleRangeWriteLog() {\n RequestMsg request = getRequestMsg(\n getBasicHeader(ClusterIdCheck.CHECK, EpochCheck.CHECK),\n getRangeWriteLogRequestMsg(Collections.singletonList(getDefaultLogData(1L)))\n );\n\n // Prepare a future that can be used by the caller.\n when(mBatchProcessor.<Void>addTask(BatchWriterOperation.Type.RANGE_WRITE, request))\n .thenReturn(CompletableFuture.completedFuture(null));\n\n ArgumentCaptor<ResponseMsg> responseCaptor = ArgumentCaptor.forClass(ResponseMsg.class);\n logUnitServer.handleMessage(request, mChannelHandlerContext, mServerRouter);\n\n verify(mServerRouter).sendResponse(responseCaptor.capture(), eq(mChannelHandlerContext));\n ResponseMsg response = responseCaptor.getValue();\n assertTrue(compareBaseHeaderFields(request.getHeader(), response.getHeader()));\n assertTrue(response.getPayload().hasRangeWriteLogResponse());\n }",
"public synchronized boolean poll_response(){\n return gotResponse;\n }",
"protected final int readBytesAt(int offset)\n throws IOException\n {\n // shouldn't modify mBytePtr, assumed to be 'offset'\n if (_inputSource != null) {\n int count = _inputSource.read(_inputBuffer, offset, _inputBuffer.length - offset);\n if (count > 0) {\n _inputEnd += count;\n }\n return count;\n }\n return -1;\n }",
"protected abstract void onRequestPage(boolean isRequestNext,int fromIndex,int toIndex,float x,float y);",
"public interface AsyncResponse {\n void processFinish(double calories, double date);\n}",
"private void onSuccess(AppendRowsResponse response) {\n for (int i = 0; i < inflightRequests.size(); i++) {\n AppendRowsResponse.Builder singleResponse = response.toBuilder();\n if (offsetList.get(i) > 0) {\n singleResponse.setOffset(offsetList.get(i));\n } else {\n long actualOffset = response.getOffset();\n for (int j = 0; j < i; j++) {\n actualOffset +=\n inflightRequests.get(j).message.getProtoRows().getRows().getSerializedRowsCount();\n }\n singleResponse.setOffset(actualOffset);\n }\n inflightRequests.get(i).appendResult.set(singleResponse.build());\n }\n }",
"String waitForCompletion(ClientResponse asyncResponse) {\n return waitForCompletion(asyncResponse, maxAsyncPollingRetries);\n }",
"@NotNull\n/* */ public NextAction processRequest(@NotNull Packet request) {\n/* 66 */ T param = this.argsBuilder.getParameter(request);\n/* 67 */ NoSuspendResumer resumer = new NoSuspendResumer();\n/* */ \n/* 69 */ AsyncProviderCallbackImpl callback = new AsyncProviderCallbackImpl(request, resumer);\n/* 70 */ AsyncWebServiceContext ctxt = new AsyncWebServiceContext(getEndpoint(), request);\n/* */ \n/* 72 */ LOGGER.fine(\"Invoking AsyncProvider Endpoint\");\n/* */ try {\n/* 74 */ getInvoker(request).invokeAsyncProvider(request, param, callback, (WebServiceContext)ctxt);\n/* 75 */ } catch (Throwable e) {\n/* 76 */ LOGGER.log(Level.SEVERE, e.getMessage(), e);\n/* 77 */ return doThrow(e);\n/* */ } \n/* */ \n/* 80 */ synchronized (callback) {\n/* 81 */ if (resumer.response != null) {\n/* */ \n/* */ \n/* 84 */ ThrowableContainerPropertySet tc = (ThrowableContainerPropertySet)resumer.response.getSatellite(ThrowableContainerPropertySet.class);\n/* 85 */ Throwable t = (tc != null) ? tc.getThrowable() : null;\n/* */ \n/* 87 */ return (t != null) ? doThrow(resumer.response, t) : doReturnWith(resumer.response);\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 92 */ callback.resumer = new FiberResumer();\n/* 93 */ return doSuspend();\n/* */ } \n/* */ }",
"public Data getDataAfter(Address addr);",
"protected void ensureResultsAreFetched(int last) {\n\t\twhile(last > cacheStatus) {\n\t\t\tfetchNextBlock();\n\t\t}\n\t}",
"public void testAsyncMapGetFromPassiveMember() throws Throwable {\n TestCluster<AsyncMap<String, String>> cluster = TestCluster.<AsyncMap<String, String>>builder()\n .withActiveMembers(3)\n .withPassiveMembers(2)\n .withUriFactory(id -> String.format(\"local://test%d\", id))\n .withClusterFactory(members -> new ClusterConfig().withProtocol(new LocalProtocol()).withMembers(members))\n .withResourceFactory(config -> AsyncMap.create(\"test\", config, new AsyncMapConfig().withConsistency(Consistency.WEAK).withLog(new BufferedLog())))\n .build();\n \n expectResume();\n cluster.open().thenRun(this::resume);\n await(5000);\n \n AsyncMap<String, String> activeMap = cluster.activeResources().iterator().next();\n AsyncMap<String, String> passiveMap = cluster.passiveResources().iterator().next();\n expectResume();\n activeMap.put(\"foo\", \"Hello world!\").thenRun(() -> {\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n }\n passiveMap.get(\"foo\").thenAccept(r1 -> {\n threadAssertEquals(r1, \"Hello world!\");\n resume();\n });\n });\n await(5000);\n }",
"public Response callback() throws Exception;",
"@Test\n public void testHandleInspectAddressesCorrupted() {\n final List<Long> addresses = LongStream.rangeClosed(1L, 16L).boxed().collect(Collectors.toList());\n final long badAddress = 11L;\n RequestMsg request = getRequestMsg(\n getBasicHeader(ClusterIdCheck.CHECK, EpochCheck.CHECK),\n getInspectAddressesRequestMsg(addresses)\n );\n\n ArgumentCaptor<ResponseMsg> responseCaptor = ArgumentCaptor.forClass(ResponseMsg.class);\n when(mStreamLog.contains(badAddress)).thenThrow(new DataCorruptionException());\n logUnitServer.handleMessage(request, mChannelHandlerContext, mServerRouter);\n\n // Assert that the payload has a DATA_CORRUPTION error containing the bad\n // address and that the base header fields have remained the same.\n verify(mServerRouter).sendResponse(responseCaptor.capture(), eq(mChannelHandlerContext));\n ResponseMsg response = responseCaptor.getValue();\n assertTrue(compareBaseHeaderFields(request.getHeader(), response.getHeader()));\n assertTrue(response.getPayload().hasServerError());\n assertTrue(response.getPayload().getServerError().hasDataCorruptionError());\n assertEquals(badAddress, response.getPayload().getServerError().getDataCorruptionError().getAddress());\n }"
] | [
"0.60218334",
"0.59046584",
"0.5615643",
"0.5531587",
"0.5388309",
"0.5352276",
"0.5328659",
"0.5299004",
"0.5272537",
"0.5244888",
"0.5217793",
"0.5201805",
"0.51578456",
"0.51539993",
"0.5152872",
"0.51423764",
"0.5138651",
"0.5121856",
"0.51217455",
"0.5077759",
"0.50741494",
"0.50449985",
"0.5044988",
"0.50423265",
"0.5035888",
"0.5024181",
"0.49850824",
"0.49826068",
"0.49814817",
"0.49611112",
"0.49233985",
"0.49172062",
"0.49169758",
"0.49066657",
"0.49056646",
"0.4892656",
"0.48874286",
"0.48867399",
"0.48801634",
"0.4875087",
"0.48593915",
"0.4852276",
"0.48495525",
"0.48454064",
"0.4824685",
"0.48208135",
"0.48185167",
"0.479797",
"0.4795449",
"0.47949806",
"0.47892386",
"0.47882515",
"0.47854304",
"0.4782572",
"0.47734252",
"0.47629237",
"0.47543728",
"0.47503695",
"0.47384405",
"0.47352153",
"0.4729074",
"0.47254103",
"0.4725096",
"0.47225162",
"0.47178242",
"0.4716239",
"0.47147453",
"0.47133753",
"0.47006923",
"0.46987623",
"0.46985203",
"0.46860936",
"0.4685801",
"0.46833143",
"0.46812072",
"0.4679408",
"0.46761093",
"0.46658814",
"0.46604493",
"0.46596104",
"0.4652175",
"0.46514302",
"0.46503466",
"0.4644534",
"0.4641511",
"0.46394458",
"0.46379483",
"0.463327",
"0.4629906",
"0.46277717",
"0.4627516",
"0.4620029",
"0.46190554",
"0.46187094",
"0.46153983",
"0.46148062",
"0.46146244",
"0.46135673",
"0.4607054",
"0.4602093"
] | 0.70663816 | 0 |
/ create a new request result that will be completed after the given timeout | public ProduceRequestResult asyncRequest(final long baseOffset, final RuntimeException error, final long timeout) {
final ProduceRequestResult request = new ProduceRequestResult(topicPartition);
Thread thread = new Thread(() -> {
try {
Thread.sleep(timeout);
if (error == null) {
request.set(baseOffset, RecordBatch.NO_TIMESTAMP, null);
} else {
request.set(-1L, RecordBatch.NO_TIMESTAMP, index -> error);
}
request.done();
} catch (InterruptedException e) { }
});
thread.start();
return request;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Builder makeTemporary(int timeout);",
"public RlcpResponse execute(int timeout) {\n return getMethod().getConnector().execute(this, timeout);\n }",
"public long timeout(long timeout);",
"public DeferredResult(Long timeout)\n/* */ {\n/* 87 */ this(timeout, RESULT_NONE);\n/* */ }",
"public DeferredResult(Long timeout, Object timeoutResult)\n/* */ {\n/* 97 */ this.timeoutResult = timeoutResult;\n/* 98 */ this.timeout = timeout;\n/* */ }",
"Builder withHardTimeout(int timeout);",
"Future timeoutIn(long timeout, TimeUnit timeUnit);",
"Object get(long timeout) throws RpcException;",
"@Test\n public void testTimeout() throws Exception {\n ProduceRequestResult request = new ProduceRequestResult(topicPartition);\n FutureRecordMetadata future = new FutureRecordMetadata(request, relOffset,\n RecordBatch.NO_TIMESTAMP, 0, 0, Time.SYSTEM);\n assertFalse(future.isDone(), \"Request is not completed\");\n try {\n future.get(5, TimeUnit.MILLISECONDS);\n fail(\"Should have thrown exception.\");\n } catch (TimeoutException e) { /* this is good */\n }\n\n request.set(baseOffset, RecordBatch.NO_TIMESTAMP, null);\n request.done();\n assertTrue(future.isDone());\n assertEquals(baseOffset + relOffset, future.get().offset());\n }",
"V get(long timeout, TimeUnit timeUnit) throws PromiseBrokenException, TimeoutException, InterruptedException;",
"public Builder timeoutAfter(long timeout) {\n if (timeout <= 0) {\n throw new IllegalArgumentException(\"timeout must be positive\");\n }\n this.timeout = timeout;\n return this;\n }",
"T setStartTimeout(Integer timeout);",
"public MockOutgoing<P> awaitComplete(Duration timeout) {\n whenComplete().await(timeout);\n return this;\n }",
"public long GetTimeout() { return timeout; }",
"public TimeoutMetadata(long timeout) {\n super(instance);\n this.expiry = System.currentTimeMillis() + timeout;\n }",
"public Builder timeout(long timeout) {\r\n configurationBuilder.timeout(timeout);\r\n return this;\r\n }",
"public long getTimeout() { return timeout; }",
"public void setTimeout(int timeout);",
"long getTimeout();",
"default Builder withIdleTimeout(int timeout) {\n if (timeout == 0) {\n return makePermanent();\n } else {\n return makeTemporary(timeout);\n }\n }",
"private static OkHttpClient getHttpClient(long timeout) {\n\n return new OkHttpClient\n .Builder()\n .connectTimeout(timeout, TimeUnit.SECONDS)\n .writeTimeout(10, TimeUnit.SECONDS)\n .readTimeout(30, TimeUnit.SECONDS)\n .build();\n }",
"RequestSender onTimeout(long timeout, Runnable runnable);",
"public void setResponseTimeOut(int timeOut)\n {\n fResponseTimeOut = timeOut;\n }",
"public IndicesShrink timeout(long timeout) {\n\t\taddParams(\"timeout\", timeout);\n\t\treturn this;\n\t}",
"public Delete timeout(long timeout){\n\t\taddParams(\"timeout\", timeout);\n\t\treturn this;\n\t}",
"@Override\n default UserpostPrx ice_invocationTimeout(int newTimeout)\n {\n return (UserpostPrx)_ice_invocationTimeout(newTimeout);\n }",
"int timeout();",
"private void setupTimeoutJob() {\n eventLoopGroup.scheduleAtFixedRate(() -> {\n\n /*\n * We cannot wait for the request infinitely, but we also cannot remove the object\n * from the queue - FIXME in case of situation when queue of waiting objects grow to X we have to\n * brake connection.\n */\n\n Iterator<RedisQueryRequest> iterator = queue.iterator();\n int i = 0;\n long timeNow = System.currentTimeMillis();\n /*\n * we are tracking 'i' because we want to do only some work, not all the work.\n * we cannot take too much time in timeout checking.\n */\n\n while (iterator.hasNext() && i < 100) {\n RedisQueryRequest current = iterator.next();\n if (current.isTimeouted()) {\n //already been here.\n continue;\n }\n long whenRequestStarted = current.getRequestTimeStart();\n long requestTimeUntilNow = timeNow - whenRequestStarted;\n if (requestTimeUntilNow >= 1000) {\n LOG.error(\"Timeouted request detected\");\n current.markTimeouted();\n current.getCompletableFuture().completeExceptionally(new TimeoutException(\"Timeout occurred.\"));\n }\n\n i++;\n }\n\n }, 100, 100, TimeUnit.MILLISECONDS);\n }",
"public void setQueryTimeout(long timeout) {\n queryTimeout = timeout;\n }",
"public ResourceTypeExtension withTimeout(Duration timeout) {\n this.timeout = timeout;\n return this;\n }",
"public void setTimeout(final long timeout);",
"public void handleTimeout();",
"public void setTimeout(int timeout) {\r\n\t\tconnTimeout = timeout;\r\n\t}",
"public void setTimeout(final String timeout);",
"@Override\n public LocalIntCacheStream timeout(long timeout, TimeUnit unit) {\n return this;\n }",
"public void setTimeout(int timeout) {\r\n this.timeout = timeout;\r\n }",
"public int getTimeout();",
"@Override\n public void onTimeout(TimeValue timeout) {\n run();\n }",
"void setOperationTimeout(int timeout) throws RemoteException;",
"public void setTimeout(int newTimeout) {\n this.timeout = newTimeout;\n }",
"public void setTimeout(double timeout){\n this.timeout = timeout;\n }",
"public void setTimeout(long timeout) {\n this.timeout = timeout;\n }",
"public void setTimeout(long timeout) {\n this.timeout = timeout;\n }",
"@Override\n default UserpostPrx ice_locatorCacheTimeout(int newTimeout)\n {\n return (UserpostPrx)_ice_locatorCacheTimeout(newTimeout);\n }",
"int getTimeout();",
"void newResult(Result result);",
"@Test\r\n void timeoutNotExceededWithResult() {\n String actualResult = assertTimeout(ofMinutes(2), () -> {\r\n return \"a result\";\r\n });\r\n assertEquals(\"a result\", actualResult);\r\n }",
"public void setTimeout(int timeout) {\n this.timeout = timeout;\n }",
"public Builder withConnectTimeout(int timeout) {\n this.timeout = timeout;\n return this;\n }",
"int hardTimeout();",
"public void setTimeout( int timeout ) {\n this.timeout = timeout;\n }",
"@Nonnull \r\n\tpublic static <T> Observable<T> timeoutFinish(\r\n\t\t\t@Nonnull final Observable<? extends T> source, \r\n\t\t\tfinal long time, \r\n\t\t\t@Nonnull final TimeUnit unit) {\r\n\t\treturn timeout(source, time, unit, Reactive.<T>empty());\r\n\t}",
"public HashMap<String, Object> listenForReply(int timeout) throws IOException {\n\t\tHashMap<String, Object> replyPayload = null;\n\t\tbyte[] buffer = new byte[Constants.BUFFER_SIZE];\n DatagramPacket packet = new DatagramPacket(buffer, buffer.length);\n\n\t\tsocket.setSoTimeout(timeout);\n\t\tsocket.receive(packet);\n \treplyPayload = Utils.unmarshallPayload(packet.getData());\n \treturn replyPayload;\n\t}",
"public ClientBuilder timeout(int timeout) {\n this.connectTimeout = Predicates.bigThanZero(timeout);\n this.socksTimeout = timeout;\n return this;\n }",
"public void setTimeout(org.apache.axis.types.UnsignedInt timeout) {\n this.timeout = timeout;\n }",
"public void setTimeout(long timeout)\r\n\t{\r\n\t\tthis.timeout = timeout;\r\n\t}",
"public ResponseTime finish(){\n return finish(Instant.now());\n }",
"void stubNextResponse(HttpExecuteResponse nextResponse, Duration delay);",
"JobResponse create();",
"public void setTimeout(long timeout) {\n\t\tthis.timeout = timeout;\n\t}",
"@Override\n default ManagerPrx ice_invocationTimeout(int newTimeout)\n {\n return (ManagerPrx)_ice_invocationTimeout(newTimeout);\n }",
"void timedOut();",
"public void onTimeout();",
"static void timeout(AnyRpcCallback<APIResponse> callback) {\n APIResponse apiResponse =\n APIResponse.newBuilder()\n .setError(APIResponse.ERROR.RPC_ERROR_VALUE)\n .setRpcError(RpcError.DEADLINE_EXCEEDED)\n .build();\n callback.success(apiResponse);\n // This is \"success\" in the sense that we got back a response, but one that will provoke\n // an ApiProxy.ApiDeadlineExceededException.\n }",
"public void setTimeout(Integer timeout) {\n\t\tthis.timeout = timeout;\n\t}",
"public abstract void onTimeout();",
"private void timeOut(){\n Intent intent = new Intent();\n intent.putExtra(\"timeOut\", true);\n setResult(RESULT_OK,intent);\n finish();\n }",
"public void setHttpClientRequestTimeout(int timeout) {\n this.requestTimeout = timeout;\n this.customized = true;\n }",
"public Builder closeTimeout(long timeout, TimeUnit unit) {\n if (timeout < 0) throw new IllegalArgumentException(\"closeTimeout < 0: \" + timeout);\n if (unit == null) throw new NullPointerException(\"unit == null\");\n this.closeTimeoutNanos = unit.toNanos(timeout);\n return this;\n }",
"<T> Promise<Message<T>> sendWithTimeout(String address, JsonObject message, long timeout);",
"Future<T> onTimeout(Consumer<Throwable> timeoutHandler);",
"public void setTimeout(int timeout) {\r\n\t\tthis.TIMEOUT = timeout;\r\n\t}",
"public E peek(long timeout, TimeUnit timeUnit) throws InterruptedException;",
"public void setTimeout(final int timeout) {\n this.timeout = timeout;\n }",
"public Object construct() {\n try {\n Object res;\n\n res = mTarget.invokeTimeout(mMethodName, mParams, mTimeout);\n return res;\n }\n catch (TokenFailure ex) {\n return ex;\n }\n catch (RPCException ex) {\n return ex;\n }\n catch (XMPPException ex) {\n return ex;\n }\n }",
"T call(int callTimeout) throws Exception;",
"@Override\n default IServerPrx ice_invocationTimeout(int newTimeout)\n {\n return (IServerPrx)_ice_invocationTimeout(newTimeout);\n }",
"public MasterImpl(Channel channel, long timeout) {\n this.channel = channel;\n responseTimeout = timeout;\n }",
"public TimeoutException(long time) {\n\t\tduration = time;\n\t}",
"public T handshakeTimeout(long timeout, TimeUnit unit) {\n throw new UnsupportedOperationException();\n }",
"public Builder resultsTtl(Integer resultsTtl) {\n this.resultsTtl = resultsTtl;\n return this;\n }",
"public ClientBuilder socksTimeout(int timeout) {\n this.socksTimeout = Predicates.bigThanZero(timeout);\n return this;\n }",
"void handleTimeoutTask();",
"public TimeoutModelEnumerationHandler(final long timeout) {\n super(timeout);\n }",
"public <T> CompletableFuture<T> ask(ActorRef ref, long timeoutMillisUpperBound, Object requestBody) {\n final TaskScheduler timeoutScheduler = getTimeoutScheduler();\n final CompletableFuture<T> future = new CompletableFuture<>();\n \n final AtomicBoolean taskRegion = new AtomicBoolean();\n final AwaitableAtomicReference<TimeoutTask> timeoutTaskHolder = new AwaitableAtomicReference<>();\n ingress(a -> {\n if (taskRegion.compareAndSet(false, true)) {\n final MessageBuilder mb = a.to(ref);\n mb.ask(requestBody).await(timeoutMillisUpperBound)\n .onTimeout(() -> future.completeExceptionally(new TimeoutException()))\n .onFault(f -> {\n if (f.getReason() instanceof Throwable) {\n future.completeExceptionally(f.getReason());\n } else {\n future.completeExceptionally(new FaultException(f.getReason()));\n }\n })\n .onResponse(r -> future.complete(r.body()));\n timeoutTaskHolder.set(mb.getTimeoutTask());\n }\n });\n \n future.whenComplete((t, x) -> {\n if (future.isCancelled()) {\n if (! taskRegion.compareAndSet(false, true)) {\n final TimeoutTask task = timeoutTaskHolder.awaitThenGet();\n // by forcing timeout, the pending task is removed from the ingress actor; calling this\n // a second (and subsequent) times has no further effect\n timeoutScheduler.executeNow(task);\n } else {\n timeoutTaskHolder.set(CANCELLED);\n }\n }\n });\n return future;\n }",
"public int getTimeout() {\r\n return timeout;\r\n }",
"<T> Promise<Message<T>> sendWithTimeout(String address, JsonArray message, long timeout);",
"public static <T> T doInTimeout(CallBack<T> callBack, long timeout) {\n final CallBack<T> fCallBack = callBack;\n ExecutorService exs = Executors.newCachedThreadPool();\n\n Future<T> future = exs.submit(new Callable<T>() {\n @Override\n public T call() throws Exception {\n try {\n return fCallBack.runInTimeout();\n } catch (InterruptedException e) {\n System.out.println(\"Timeout: Exiting by Exception\");\n }\n\n return null;\n }\n });\n\n long end = System.currentTimeMillis() + timeout;\n\n while (true) {\n if (null == future) {\n return null;\n }\n\n if (System.currentTimeMillis() > end) {\n future.cancel(true);\n return null;\n }\n\n try {\n if (future.isDone()) {\n return future.get();\n }\n Thread.sleep(INTERVAL);\n } catch (InterruptedException e) {\n e.printStackTrace();\n return null;\n } catch (ExecutionException e) {\n e.printStackTrace();\n return null;\n }\n }\n }",
"public LWTRTPdu timeout() throws IncorrectTransitionException;",
"public void setHttpClientTimeout(int timeout) {\n this.connectTimeout = timeout;\n this.customized = true;\n }",
"public void setTimeout(int _timeout) {\n if (timeout < 0)\n return;\n timeout = _timeout;\n }",
"@Override\n default UserpostPrx ice_timeout(int t)\n {\n return (UserpostPrx)_ice_timeout(t);\n }",
"@GET\n @ApiOperation(\"Wait for a process to finish\")\n @Produces(MediaType.APPLICATION_JSON)\n @javax.ws.rs.Path(\"/{id}/waitForCompletion\")\n public ProcessEntry waitForCompletion(@ApiParam @PathParam(\"id\") UUID instanceId,\n @ApiParam @QueryParam(\"timeout\") @DefaultValue(\"-1\") long timeout) {\n\n log.info(\"waitForCompletion ['{}', {}] -> waiting...\", instanceId, timeout);\n\n long t1 = System.currentTimeMillis();\n\n ProcessEntry r;\n while (true) {\n r = get(instanceId);\n\n ProcessStatus s = r.status();\n if (s == ProcessStatus.FINISHED ||\n s == ProcessStatus.FAILED ||\n s == ProcessStatus.CANCELLED ||\n s == ProcessStatus.TIMED_OUT) {\n return r;\n }\n\n if (timeout > 0) {\n long t2 = System.currentTimeMillis();\n if (t2 - t1 >= timeout) {\n log.warn(\"waitForCompletion ['{}', {}] -> timeout, last status: {}\", instanceId, timeout, s);\n throw new ConcordApplicationException(Response.status(Status.REQUEST_TIMEOUT).entity(r).build());\n }\n }\n\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) { // NOSONAR\n throw new ConcordApplicationException(Response.status(Status.INTERNAL_SERVER_ERROR)\n .entity(\"Request was interrputed\")\n .build());\n }\n }\n }",
"public E take(long timeout, TimeUnit timeUnit) throws InterruptedException,FileQueueClosedException;",
"public int getTimeout() {\n return timeout;\n }",
"protected void setTimeout() {\r\n\t\tTimeout timeout = new Timeout();\r\n\t\tt.schedule(timeout, TIMEOUT);\r\n\t}",
"@SuppressWarnings(\"deprecation\")\n\tpublic void timeout()\n\t{\n\t\ttry {\n\t\t\tbyte[] fileData = Server.readFileAsString(\"./resource/400.html\");\n\t\t\tString header = Server.ConstructHttpHeader(400, \"html\", fileData.length);\n\t\t\toutStream.writeBytes(header);\n\t\t\toutStream.write(fileData);\t\n\t\t\tthis.stop();\n\t\t} catch(IOException e) {\n\t\t\tSystem.out.println(\"Timeout Error\");\n\t\t}\n\t\ttry {\n\t\t\toutStream.flush();\n\t\t\t/* Interaction with this client complete, close() the socket */\n\t\t\tclientSock.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private <T> Future<T> newFuture(final T response) {\n FutureTask<T> t = new FutureTask<T>(new Callable<T>() {\n @Override\n public T call() {\n return response;\n }\n });\n t.run();\n return t;\n }",
"@Override\n protected void onRequestTimeout(Tuple request) {\n }",
"public void setTimeout (int timeout) {\n\tif (timeout >= 0)\n\t call.setTimeout (new Integer (timeout));\n }"
] | [
"0.66691947",
"0.6318682",
"0.6282498",
"0.6240814",
"0.61275154",
"0.61125624",
"0.6039673",
"0.5855137",
"0.58422863",
"0.58283484",
"0.5820129",
"0.57531756",
"0.56769687",
"0.56218493",
"0.5589155",
"0.55861825",
"0.55659616",
"0.5550304",
"0.55467993",
"0.5520289",
"0.5518231",
"0.5516871",
"0.55164635",
"0.5467777",
"0.54367846",
"0.5424903",
"0.5377481",
"0.53696966",
"0.53657234",
"0.5339487",
"0.5338313",
"0.5334907",
"0.5310306",
"0.5292569",
"0.52800584",
"0.5253208",
"0.5250017",
"0.5247083",
"0.52426076",
"0.5238199",
"0.523639",
"0.523407",
"0.523407",
"0.5231685",
"0.5231331",
"0.522209",
"0.52195597",
"0.52173734",
"0.52002907",
"0.5190306",
"0.5179105",
"0.51768607",
"0.516593",
"0.51579344",
"0.5153371",
"0.51531726",
"0.51480013",
"0.5128447",
"0.5125285",
"0.51216805",
"0.511758",
"0.5110983",
"0.5109454",
"0.5105834",
"0.50931406",
"0.50791866",
"0.5072569",
"0.5043129",
"0.50428414",
"0.5027995",
"0.50190616",
"0.50183374",
"0.5009936",
"0.5001265",
"0.5000886",
"0.4996657",
"0.49945137",
"0.49893877",
"0.49852705",
"0.49779227",
"0.49613",
"0.49282786",
"0.49208656",
"0.49182665",
"0.49173436",
"0.4909278",
"0.4904808",
"0.49018276",
"0.49000546",
"0.48991448",
"0.4891959",
"0.48886645",
"0.4887985",
"0.4882772",
"0.48784798",
"0.48777005",
"0.48720688",
"0.486903",
"0.48684752",
"0.48634967"
] | 0.59171057 | 7 |
Finds an expertise by its name | Expertise findByName(String name); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic Expert findExpertByName(String expertName) {\n\t\treturn expertRepository.findExpertByName(expertName);\n\t}",
"@Override\n\tpublic ArrayList<Expert> findExpertBySkillName(List<String> skillName) {\n\t\treturn expertRepository.findExpertBySkillName(skillName);\n\t}",
"@Override\n\tpublic ArrayList<Expert> findExpertByLanguageName(List<String> langugeName) {\n\t\treturn expertRepository.findExpertByLanguageName(langugeName);\n\t}",
"@Override\n\tpublic ArrayList<Expert> findExpertByPositionName(List<String> positionName) {\n\t\treturn expertRepository.findExpertByPositionName(positionName);\n\t}",
"public ExpertiseEntity(String expertiseName) {\n this.expertiseName = expertiseName;\n }",
"Heaver findByName(String name);",
"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}",
"public Eetakemon findEetakemon(String name){\n\n Eetakemon e = eetakemonmap.get(name);\n if (e != null){\n return e;\n }\n else {\n return null;\n }\n\n }",
"School findSchoolByName(String schoolName) throws TechnicalException;",
"Object find(String name);",
"public Privilege findByName(UserPrivilegeType name);",
"@Override\n\tpublic Expert findExpertById(int expertId) {\n\t\treturn expertRepository.findExpertById(expertId);\n\t}",
"public abstract List<Technique> findTechniqueByName(String technique);",
"public abstract SmartObject findIndividualName(String individualName);",
"public Exercise getExercise(Name name) throws ExerciseNotFoundException {\n for (Exercise e : this.exercises) {\n if (e.getName().equals(name)) {\n return e;\n }\n }\n throw new ExerciseNotFoundException();\n }",
"public String getExpertnames() {\r\n return expertnames;\r\n }",
"@Override\r\n\tpublic List<Supplies> findbyname(String name) {\n\t\treturn suppliesDao.findbyname(name);\r\n\t}",
"public List<Eetakemon> findEetakemonContain(String name){\n List<Eetakemon>resultlist = new ArrayList<Eetakemon>();\n for (String key: eetakemonmap.keySet()){\n Eetakemon e = eetakemonmap.get(key);\n if(e.getName().contains(name)){\n resultlist.add(e);\n }\n }\n return resultlist;\n }",
"Keyword findKeywordByName(String name);",
"Person findPerson(String name);",
"public Doctor findDoctorByName(String name) {\n for (Doctor doctors : Configuration.doctorList) {\n if (doctors.getName().equals(name)) {\n return doctors;\n }\n }\n return null;\n }",
"public String searchByName(String name){\n for(Thing things: everything){\n if(things.getName().equalsIgnoreCase(name)){\n return things.toString();\n }\n }\n return \"Cannot Find given Name\";\n }",
"public Department findByNameDepartment(String nameDepartment);",
"public Yng_Security findByName(String name) {\n\t\treturn securityDao.findByName(name);\r\n\t}",
"public void testgetEfoDescriptionByName() {\n EFOServiceImpl impl = new EFOServiceImpl();\n String match = \"An experimental factor in Array Express which are essentially the variable aspects of an experiment design which can be used to describe an experiment, or set of experiments, in an increasingly detailed manner.\";\n assertEquals(match, impl.getEfoDescriptionByName(\"experimental factor\"));\n }",
"public AbsenceType findByName(String name);",
"public Person find(String name) {\n\t\tfor (Person person : listOfPeople) {\n\t\t\tif(person.getName().contains(name)) {\n\t\t\t\treturn person;\n\t\t\t}\n\t\t}\n\t\treturn null; // only reached if person with name not found by search.\n\t}",
"Optional<Expert> findOne(Long id);",
"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 }",
"@Override\r\n\tpublic Userinfo findbyname(String name) {\n\t\treturn userDAO.searchUserByName(name);\r\n\t}",
"List<HelpInfo> selectByExample(HelpInfoExample example);",
"public NameSurferEntry findEntry(String name) {\n\t\tchar ch = name.charAt(0);\n\t\tif(Character.isLowerCase(ch) == true) {\n\t\t\tch = Character.toUpperCase(ch);\n\t\t}\n\t\tString otherLetters = name.substring(1);\n\t\totherLetters = otherLetters.toLowerCase();\n\t\tname = ch + otherLetters;\n\t\tif (nameFromDatabase.containsKey(name)) {\n\t\t\treturn nameFromDatabase.get(name);\n\t\t}\t\t\t\n\t\telse{\n\t\t\treturn null;\n\t\t}\n\t}",
"private Employee findEmployee(String employeeName)\n {\n int index = -1;\n //nameJRadioButtonMenuItem.doClick();\n for(int i = 0; i < employees.size(); i++)\n {\n if(employeeName.equals(employees.get(i).getName()))\n index = i;\n }\n if(index >= 0)\n return employees.get(index);\n else\n return null;\n }",
"public void searchAgent(String name) throws ImpossibleAgentException {\n if (rhineLifeAgents.contains(rhineLifeAgents.getAgent(name))) {\n Agent a = rhineLifeAgents.getAgent(name);\n a.getInfo();\n } else if (rhodeIslandAgent.contains(rhodeIslandAgent.getAgent(name))) {\n Agent a1 = rhodeIslandAgent.getAgent(name);\n a1.getInfo();\n } else {\n throw new ImpossibleAgentException();\n }\n\n }",
"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}",
"@Test public void shouldReturnTheToolIntTheListWhenSearchedByItsName() {\n\t\tgiven.imInTheMainPage();\n\t\twhen.searchByAToolName(TOOLS.ADPWEB.toolName());\n\t\tthen.mySearchWillReturnTheTools(TOOLS.ADPWEB);\n\t}",
"Authority findByName(AuthorityName name);",
"private SymObject find(String name) {\n SymObject object = table.find(name);\n if (object == SymbolTable.OBJECT_NONE) {\n error(name + \" can't be resolved to a name\");\n }\n\n return object;\n }",
"private void displayStudentByName(String name) {\n\n int falg = 0;\n\n for (Student student : studentDatabase) {\n\n if (student.getName().equals(name)) {\n\n stdOut.println(student.toString());\n\n falg = 1;\n\n break;\n }\n }\n\n if (falg == 0) {\n\n stdOut.println(\"cannot find student\\n\");\n }\n }",
"static public Person searchPerson(String name) {\n return personMap.get(name);\n }",
"@Override\r\n\tpublic Disease findByDiseaseName(String name) {\r\n\t\t// setting logger info\r\n\t\tlogger.info(\"Get the disease details By Name\");\r\n\t\treturn diseaseRepo.findByDiseaseName(name);\r\n\t}",
"@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 }",
"public Researcher getResearcherByID(int id);",
"@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 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 }",
"public void voteFor (String name)\n {\n boolean searching = true;\n int index = 0;\n\n while(searching)\n {\n if(index < pList.size())\n {\n Personality objectHolder = pList.get(index);\n String personalityName = objectHolder.getName();\n\n if(name.equals(personalityName))\n {\n objectHolder.increaseVotes(1);\n searching = false;\n }\n }\n else\n {\n System.out.println(\"No personality found with the name : \" + name);\n searching = false;\n }\n\n index++;\n }\n }",
"public PokemonSpecies findSeenSpeciesData(String name) throws PokedexException {\n PokemonSpecies rv = null;\n String nameLower = name.toLowerCase();\n Iterator<PokemonSpecies> it = pokedex.iterator();\n PokemonSpecies currentSpecies;\n while(it.hasNext()) {\n currentSpecies = it.next();\n if(currentSpecies.getSpeciesName().equals(nameLower)) {\n rv = currentSpecies;\n break;\n }\n }\n if(rv == null) {\n throw new PokedexException(String.format(Config.UNSEEN_POKEMON, name));\n }\n return rv;\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}",
"public void setExpertnames(String expertnames) {\r\n this.expertnames = expertnames;\r\n }",
"Team findByName(String name);",
"Admin selectByName(String adminName);",
"public static Object find(ArrayList<Course> list, String name) {\r\n\t\tfor (Course course : list) {\r\n\t\t\tif (course.courseName == name) {\r\n\t\t\t\treturn \"Index: \" + list.indexOf(course);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"List<Employee> findByName(String name);",
"public ListWord findAList(String name) {\n for (ListWord list: list) {\n if (list.getName().equals(name)) {\n return list;\n }\n }\n return null;\n }",
"public Tutor findTutor(final String name) {\n for (Tutor tutor : tutors) {\n if (name.equals(tutor.getName())) {\n return tutor;\n }\n }\n\n return null;\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 }",
"public Perfil findByName(PerfilName perfilName);",
"public void findHouse() {\n System.out.println(\"-----Search House-----\");\n System.out.println(\"enter id: \");\n int findId = Utility.readInt();\n //call service search method\n House h = houseService.searchHouse(findId);\n if (h != null) {\n System.out.println(h);\n } else {\n System.out.println(\"no designate house found\");\n }\n }",
"@Override\n\tpublic ArrayList<Expert> findExpertByLanguageId(List<String> langugeId) {\n\t\treturn expertRepository.findExpertByLanguageId(langugeId);\n\t}",
"public FoodInfo searchFoodInfo(String foodname){\n\t\t//boolean result = false;\n\t\tFoodInfo foodInfo = null;\n\t\ttry {\n\t\t\tConnection connection = this.getConnection();\n\t\t\tPreparedStatement stmt = connection.prepareStatement(\n\t\t\t\t\t\"SELECT * FROM foodinfo WHERE foodname=(?)\");\n\t\t\tstmt.setString(1,foodname);\n\t\t\tResultSet rs = stmt.executeQuery();\n\n\t\t\twhile(rs.next()) {\n\t\t\t\tfoodInfo = new FoodInfo();\n\t\t\t\tfoodInfo.setFoodName(rs.getString(1));\n\t\t\t\tfoodInfo.setEnergy(rs.getDouble(2));\n\t\t\t\tfoodInfo.setProtein(rs.getDouble(3));\n\t\t\t\tfoodInfo.setFiber(rs.getDouble(4));\n\t\t\t\tfoodInfo.setPrice(rs.getInt(5));\n\t\t\t}\n\t\t\trs.close();\n\t\t\tstmt.close();\n\t\t\tconnection.close();\n\n\n\t\t} catch (Exception e) {\n\t\t\tlog.info(e.getMessage());\n\t\t}\n\t\tfinally {\n\n\t\t}\n\t\treturn foodInfo;\n\t}",
"@Override\n\tpublic ArrayList<CounterExpert> countExpertBySkillName(List<String> skillName) {\n\t\treturn expertRepository.countExpertBySkillName(skillName);\n\t}",
"MongoCursor<Document> findByPersonName(String personName);",
"@Override\n\tpublic Map<String, Object> findCourseByName(String name) {\n\t\treturn cd.findCourseByName(name);\n\t}",
"public Element findByName(String name) {\n for (Element element : this){\n if (element.getName().equals(name)) return element;\n }\n return null;\n }",
"@Override\r\n\tpublic Admins getQueryByName(String aname) {\n\t\treturn adi.queryByName(aname);\r\n\t}",
"public Individual getIndividualByName(String name) throws ObjectNotFoundException{\n \t\n\t\tList<Individual> individualList = new ArrayList<>();\n\t\tindividualList = (new TeamsJsonReader()).getListOfIndividuals();\n\t\tIndividual individual = null;\n\t\tint size, counter = 0;\n\t\tfor (size = 0; size < individualList.size(); size++) {\n\t\t\tcounter = 0;\n\n\t\t\tindividual = individualList.get(size);\n\n\t\t\tif (individual.getName().equals(name)) {\n\t\t\t\tcounter = 1;\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (size == individualList.size() && counter == 0)\n\t\t\tthrow new ObjectNotFoundException(\"individual\", \"name\", name);\n\n\t\treturn individual;\n\n\n }",
"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}",
"public IReasoner findReasoner(String name, String version) {\r\n if (null == name) {\r\n throw new IllegalArgumentException(\"name must not be null\");\r\n }\r\n IReasoner reasoner = registry.findReasoner(name, version);\r\n if (null == reasoner) {\r\n throw new IllegalArgumentException(\"descriptor does not fit to a registered reasoner\");\r\n }\r\n return reasoner;\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 }",
"private Employee searchEmployee(String empName)\n {\n empName = empName.toLowerCase();\n Employee found = null;\n // Find the employee in the array list\n Iterator<Employee> emp = employees.iterator();\n while(emp.hasNext() && found == null)\n {\n myEmployee = emp.next(); //get employee from array list\n String fullName = myEmployee.getName().toLowerCase();\n String[] FirstLast = fullName.split(\" \");\n \n if (\n matchString(fullName,empName) ||\n matchString(FirstLast[0],empName) ||\n matchString(FirstLast[1],empName)\n )\n found = myEmployee;\n } \n return found;\n }",
"public void getByPropertyStudyType(String textToFind){\n\t\tStudyTypeResult studyTypeResult = getJerseyClient().resource(getBaseUrl() + \"/study_type/search/\"+textToFind).get(StudyTypeResult.class);\r\n\t\tfor (StudyTypeDTO c : studyTypeResult.getStudies()) {\r\n\t\t\tSystem.out.println(c.getName());\r\n\t\t\tSystem.out.println(c.getDescription());\r\n\t\t}\r\n\t}",
"private DFAgentDescription[] findService(String name, String type) {\n\t\ttry {\n\t\t\tServiceDescription filter = new ServiceDescription();\n\t\t\tfilter.setName(name);\n\t\t\tfilter.setType(type);\n\n\t\t\tDFAgentDescription dfd = new DFAgentDescription();\n\t\t\tdfd.addServices(filter);\n\n\t\t\tDFAgentDescription[] results = DFService.search(this, dfd);\n\t\t\treturn results;\n\n\t\t} catch (FIPAException e) {\n\t\t\tLOG.error(\"exception while searching service {}:{} : {}\", name, type, e.getMessage());\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}",
"public static EstimatingTechnique getByName(String name) {\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.getName().equals(name)) {\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public Departmentdetails getDepartmentByName(String departmentName);",
"public int findDoctors(String name) {\n\t\tint i;\n\t\tfor (i = 0; i < doc.size(); i++) {\n\t\t\tif (name.equals(doc.get(i).getName())) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}",
"E getByName(String name);",
"Lecturer getLecturerWhoOfers(Project proj)\n {\n for(Lecturer lecturer :lectors)\n {\n for(Project project :lecturer.getProjectOfered())\n {\n if(proj.equals(project))\n {\n return lecturer;\n }\n }\n }\n return null;\n }",
"@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}",
"public abstract T findByName(String name) ;",
"public String searchWomenByName() {\n getNavigate(Locators.LINK_SEARCH);\n String selectedTextInDropDown = getTextFromDropDownSelectedValue(Locators.DROP_DOWN_LIST_SORT_BY, \"name\");\n return selectedTextInDropDown;\n }",
"public Amount<Mineral> searchByName(String name){\n\t\tfor(int i=0; i<this.mineralList.size(); i++) {\n\t\t\tif(this.mineralList.get(i).getObject().getName() == name)\n\t\t\t\treturn this.mineralList.get(i);\n\t\t}\n\t\treturn null;\n\t}",
"public Enemy getEnemy(String name) {\n\n // For all enemies\n for (Entity curEnt : getEntityList()) {\n\n // If current enemy name matches given name\n if (curEnt.getName().equalsIgnoreCase(name)) {\n\n // Return enemy\n return (Enemy) curEnt;\n }\n }\n\n // If no enemy was found, return null\n return null;\n }",
"private static Person findPersonByName(EntityManager em, String name) {\n\t\tQuery query = em.createQuery(\"select p from Person p where name = :name\", Person.class);\n\t\tquery.setParameter(\"name\", name);\n\t\treturn (Person) query.getSingleResult();\n\t}",
"private void printSearchToolNameMenu(Shop shop) {\n System.out.println(\"What is the name of the tool you would like to look up?\");\n String toolName = this.userInput.nextLine();\n if (shop.searchInventory(toolName.toLowerCase())) {\n System.out.println(toolName + \" is in the shop.\");\n } else {\n System.out.println(\"Tool does not exist or invalid input, please check spelling and try again.\");\n }\n }",
"public void FindByCourseName(String depName, String courseName) {\n\t\tdNode searchNode = FindByName(depName);\n\t\tif (searchNode != null) {\n\t\t\tsearchNode.data.students.FindByCourse(courseName);\n\t\t}\n\t}",
"public Movie findMovie(String name){\n\n Movie find = null ;\n\n for (Movie movie :movies) {\n\n if(movie.getTitle().equals(name)){\n\n find = movie;\n\n }\n\n }\n\n return find;\n\n }",
"public Supplier findSupplier(int suppliernum, boolean retrieveAssociation);",
"public void getByPropertyemployee(String textToFind){\n\t\t// ejemplo buscar por propiedad direccion\n\t\tEmployeeResult employeeResult = getJerseyClient().resource(getBaseUrl() + \"/employee/search/\"+textToFind).get(EmployeeResult.class);\n\t\tfor (EmployeeDTO c : employeeResult.getEmployees()) {\n\t\t\tSystem.out.println(\"Nombre: \"+c.getName());\n\t\t\tSystem.out.println(\"Apellido: \"+c.getSurname());\n\t\t\tSystem.out.println(\"Direccion: \"+c.getAddress());\n\t\t\tSystem.out.println(\"RUC: \"+c.getRUC());\n\t\t\tSystem.out.println(\"Telefono: \"+c.getCellphone());\n\t\t}\n\t\t\n\t}",
"private static String descriptionWeaponFoundOnView(String cardName){\n String descToReturn = null;\n //search between your loaded weapons\n for(WeaponLM weapon : InfoOnView.getMyLoadedWeapons().getLoadedWeapons()){\n if(cardName.equalsIgnoreCase(weapon.getName())){\n descToReturn = detailedDescriptionWeapon(weapon);\n }\n }\n //search between the unloaded weapons of all the players\n for(PlayerDataLM player : InfoOnView.getPlayers()){\n for(WeaponLM weapon : player.getUnloadedWeapons()) {\n if (cardName.equalsIgnoreCase(weapon.getName())){\n descToReturn = detailedDescriptionWeapon(weapon);\n }\n }\n }\n //search between the weapons on the spawn points\n for(SpawnPointLM spawnPoint : InfoOnView.spawnPoints()){\n for(WeaponLM weapon : spawnPoint.getWeapons()){\n if (cardName.equalsIgnoreCase(weapon.getName())){\n descToReturn = detailedDescriptionWeapon(weapon);\n }\n }\n }\n return descToReturn;\n }",
"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 NautiLODResult getByDefinitionName(String Name) {\n for (NautiLODResult NautiLODI : this)\n if (NautiLODI.name.equals(Name))\n // Found an instance with the specified agent definition name\n return NautiLODI;\n // No matching instance for specified name\n return null;\n }",
"public static RestrictionEnzyme getEnzyme(String name)\n throws BioException\n {\n if (! nameToEnzyme.containsKey(name))\n throw new BioException(\"Unknown RestrictionEnzyme name '\"\n + name\n + \"'\");\n \n return (RestrictionEnzyme) nameToEnzyme.get(name);\n }",
"private DocumentType findByName(String name, boolean caseSensitive) {\n \tif (name == null) {\n \t\treturn null;\n \t}\n return documentTypeDAO.findByName(name, caseSensitive);\n }",
"@Override\n\tpublic Employee findPartner(String name) {\n\t\treturn null;\n\t}",
"@Override\n public boolean containsNameProfesor(String Name) {\n try {\n Entity retValue = null; \n Connection c = null;\n PreparedStatement pstmt = null;\n ResultSet rs = null;\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"SELECT * FROM persona where nombre = ?\");\n\n pstmt.setString(1, Name);\n\n rs = pstmt.executeQuery();\n\n if (rs.next()) {\n return true; \n } \n \n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n return false;\n }",
"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}",
"Tag findByName(String name);",
"Skill getSkill(String name);",
"private void displayScholarshipByName(String name) {\n\n int falg = 0;\n\n stdOut.println(name + \"\\n\");\n\n for (Scholarship scholarship : scholarshipDatabase) {\n\n stdOut.println(scholarship.getName() + \"\\n\");\n\n if (scholarship.getName().equals(name)) {\n\n stdOut.println(scholarship.toString());\n\n falg = 1;\n\n break;\n }\n }\n\n if (falg == 0) {\n\n stdOut.println(\"cannot find scholarship\\n\");\n\n }\n }",
"public SecurityUser findByName(String username);"
] | [
"0.71691096",
"0.6391864",
"0.6136667",
"0.61337626",
"0.5859704",
"0.5708162",
"0.56219244",
"0.554876",
"0.5545668",
"0.55202734",
"0.5495979",
"0.549327",
"0.5486686",
"0.5469492",
"0.54323494",
"0.537359",
"0.5351208",
"0.5350042",
"0.53497094",
"0.532638",
"0.5320505",
"0.52843165",
"0.52819073",
"0.5272027",
"0.52530146",
"0.5241597",
"0.52068913",
"0.5199885",
"0.5193977",
"0.5183866",
"0.5177735",
"0.51732004",
"0.5167776",
"0.51652116",
"0.5148813",
"0.5131282",
"0.5125193",
"0.5122277",
"0.51129377",
"0.51120925",
"0.5111717",
"0.5071791",
"0.5053662",
"0.50451875",
"0.50168324",
"0.5011527",
"0.5008101",
"0.50021076",
"0.4991329",
"0.49758774",
"0.4965114",
"0.4952962",
"0.49299854",
"0.4920059",
"0.49014077",
"0.4898152",
"0.48958498",
"0.48943317",
"0.48894513",
"0.48846948",
"0.48845828",
"0.48827758",
"0.48819026",
"0.48816252",
"0.4875284",
"0.48725742",
"0.4871329",
"0.4855904",
"0.4849072",
"0.4845643",
"0.48244435",
"0.4820526",
"0.48155195",
"0.4811886",
"0.4805108",
"0.47972673",
"0.47962764",
"0.47950256",
"0.47918326",
"0.47916484",
"0.47901988",
"0.47878984",
"0.47878653",
"0.4787566",
"0.4779802",
"0.47781998",
"0.47745913",
"0.47735316",
"0.4771522",
"0.47665977",
"0.4763437",
"0.47632483",
"0.47618544",
"0.4760665",
"0.47586364",
"0.47575244",
"0.47545514",
"0.47492644",
"0.47452947",
"0.47318584"
] | 0.80611706 | 0 |
Created by ZKQ on 2015/5/27. | public interface TEndProjectCommentDAO extends BaseDao<TEndProjectComment> {
//获取一个教师可以评审的结题
List<TEndProjectComment> findMyReviewEndPros(String teaCode, PageBean pageBean);
int findMyReviewEndProsCount(String teaCode);
List findByEndprojectcommentAdvise(Object endprojectcommentAdvise);
List findByEndprojectcommentContent(Object endprojectcommentContent);
List findByIsdeleted(Object isdeleted);
} | {
"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\n public void init() {\n\n }",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n 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}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n public void init() {\n }",
"private void init() {\n\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\n void init() {\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}",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void getExras() {\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\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void initialize() \n {\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\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"public void mo38117a() {\n }",
"@Override\n public void init() {}",
"private void kk12() {\n\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\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 protected void init() {\n }",
"public void mo4359a() {\n }",
"@Override\r\n\tpublic void init() {}",
"@Override\n\tprotected void interr() {\n\t}",
"private void poetries() {\n\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n\tpublic void afterInit() {\n\t\t\n\t}",
"@Override\n\tpublic void afterInit() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tpublic void init() {\n\t}",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n public void initialize() { \n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void settings() {\n // TODO Auto-generated method stub\n \n }",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n\tpublic void postInit() {\n\t\t\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 }",
"private void init() {\n\n\n\n }",
"@Override\n public void init() {\n\n super.init();\n\n }",
"private Rekenhulp()\n\t{\n\t}",
"private void m50366E() {\n }",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\n public void init() {\n }",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"private zza.zza()\n\t\t{\n\t\t}",
"@Override\n\tprotected void initdata() {\n\n\t}",
"protected boolean func_70814_o() { return true; }",
"@Override\n public void memoria() {\n \n }"
] | [
"0.6157695",
"0.6063208",
"0.60104537",
"0.59962785",
"0.5915975",
"0.5898719",
"0.5898719",
"0.5881903",
"0.5861248",
"0.5850831",
"0.58489937",
"0.58489937",
"0.58489937",
"0.58489937",
"0.58489937",
"0.57804036",
"0.57783204",
"0.5770405",
"0.5763345",
"0.5761989",
"0.5761364",
"0.57514894",
"0.5750831",
"0.5750102",
"0.5750102",
"0.5750102",
"0.5749483",
"0.5748314",
"0.5745752",
"0.5745752",
"0.5738728",
"0.5730255",
"0.5730255",
"0.5727249",
"0.5727249",
"0.5727249",
"0.5722354",
"0.5719285",
"0.57070625",
"0.57059425",
"0.57059425",
"0.57033485",
"0.57033485",
"0.57033485",
"0.5693657",
"0.5691204",
"0.5678271",
"0.5676669",
"0.5672429",
"0.5666517",
"0.56662536",
"0.5663354",
"0.5663354",
"0.5663354",
"0.5663354",
"0.5663354",
"0.5663354",
"0.5650571",
"0.56499165",
"0.5634803",
"0.5633593",
"0.56334466",
"0.5631899",
"0.56317055",
"0.56317055",
"0.5628356",
"0.56263226",
"0.5625303",
"0.56243616",
"0.56184137",
"0.5607461",
"0.5607215",
"0.5601177",
"0.5589942",
"0.558115",
"0.5577179",
"0.55705315",
"0.55622816",
"0.55591893",
"0.5556289",
"0.5539253",
"0.5539253",
"0.5539253",
"0.5539253",
"0.5539253",
"0.5539253",
"0.5539253",
"0.5537381",
"0.5511677",
"0.5510472",
"0.5501794",
"0.5496098",
"0.5496098",
"0.549333",
"0.5480853",
"0.5479887",
"0.54784507",
"0.5474402",
"0.54629385",
"0.54615885",
"0.54606616"
] | 0.0 | -1 |
Adds a new int to the set, if one is already there it does nothing | void add(int n); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean insert(int val) {\r\n return set.add(val);\r\n }",
"public void add(final int item) {\n if (!contains(item)) {\n set[size] = item;\n size += 1;\n }\n }",
"public void add(int add){\n if (!elementOf(add)) {\n int[] added = new int[set.length + 1];\n for(int element = 0; element < set.length; element++){\n added[element] = set[element];\n }\n added[set.length] = add; \n setSet(added);\n added = null;\n }\n }",
"public boolean insert(int val) {\n if (!set.contains(val)) {\n set.add(val);\n return true;\n } else return false;\n }",
"@Override\n public IntSet add(int x) {\n //System.out.println(\"EmptySet: Creating new singleton \" + x);\n return Singleton.newSingleton(x);\n }",
"private static void addValue(ISet set, Scanner in)\n {\n boolean contained;\n int val;\n if (set.getSize() == ISet.MAX_SIZE)\n {\n System.out.println(\"Set is already full!\");\n return;\n }\n do {\n System.out.println(\"What value to add to set?\");\n val = Integer.parseInt(in.nextLine());\n contained = set.contains(val);\n if (contained)\n System.out.println(\"That value is already in the set\");\n } while (contained);\n set.add(val);\n }",
"public boolean insert(int val) {\n if (set.containsKey(val)) return false;\n set.put(val, set.size());\n list.add(val);\n return true;\n }",
"public boolean insert(int val) {\n boolean res=!map.containsKey(val);\n if(res)\n map.put(val,new HashSet());\n map.get(val).add(li.size());\n li.add(val);\n return res;\n }",
"public boolean insert(int val) {\n if(map.containsKey(val))\n {\t\n \tmap.get(val).add(list.size());\n \tlist.add(val);\n \treturn false;\n }else{\n \tmap.put(val, new HashSet<Integer>());\n \tmap.get(val).add(list.size()); \t\n \tlist.add(val);\n \treturn true;\n }\n }",
"public boolean insert(int val) {\n if (!map.containsKey(val)) {\n map.put(val, new HashSet<>());\n }\n map.get(val).add(size);\n list.add(val);\n size++;\n return map.get(val).size() == 1;\n }",
"public boolean insert(int val) {\n if (realSet.contains(val)) return false;\n if (size == allSet.length) {\n Integer[] tmpSet = new Integer[size * 2];\n int not = 0;\n for (int i = 0; i < size; i ++) {\n if (allSet[i] == null) {\n not ++;\n continue;\n }\n tmpSet[i - not] = allSet[i];\n }\n size -= not;\n allSet = tmpSet;\n }\n realSet.add(val);\n allSet[size] = val;\n size ++;\n return true;\n\n }",
"public V addElement(T t) {\n\t\tif(multiSet.containsKey(t)){\n\t\t\tNumber newValue = ((Integer)multiSet.get(t)) + 1;\n\t\t\tmultiSet.replace(t,(V)newValue);\n\t\t\treturn (V)newValue;\n\t\t}\n\t\tNumber firstValue = 1;\n\t\tmultiSet.put(t,(V)firstValue);\n\t\treturn (V)firstValue;\n\t}",
"@Override\n public void add(Integer element) {\n if (this.contains(element) != -1) {\n return;\n }\n // when already in use\n int index = this.getIndex(element);\n if(this.data[index] != null && this.data[index] != this.thumbstone){\n int i = index + 1;\n boolean foundFreePlace = false;\n while(!foundFreePlace && i != index){\n if(this.data[i] == null && this.data[i] == this.thumbstone){\n foundFreePlace = true;\n }else{\n if(i == this.data.length - 1){\n // start at beginning.\n i = 0;\n }else{\n i++;\n }\n }\n }\n if(foundFreePlace){\n this.data[i] = element;\n }else{\n throw new IllegalStateException(\"Data Structre Full\");\n }\n }\n }",
"public void add(int element);",
"boolean add(int value);",
"public boolean add(IntSet add){\n\t\tif(contains(add)==-1){\n\t\t\tcontents.addElement(add);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean insert(int val) {\n \n if (!this.numToIdx.containsKey(val)) {\n \n this.numToIdx.put(val, new LinkedHashSet<Integer>());\n }\n \n this.nums.add(val);\n this.numToIdx.get(val).add(this.nums.size() - 1);\n \n return this.numToIdx.get(val).size() == 1;\n \n }",
"public void add(int el) {\n\t\tif (readonly)\n\t\t\tthrow new IllegalStateException(\"can't alter readonly IntervalSet\");\n\t\tadd(el, el);\n\t}",
"public void add(int number) {\n numbers.put(number, numbers.getOrDefault(number, 0)+1);\n }",
"public void add(int number) {\n\t map.put(number,map.containsKey(number)?map.get(number)+1:1);\n\t}",
"public void add(int number) {\n map.put(number, map.getOrDefault(number, 0) + 1);\n }",
"public boolean insert(int val) {\n if (!map.containsKey(val)) {\n map.put(val, lst.size());\n lst.add(val);\n return true;\n }\n return false;\n }",
"public boolean insert(int val) {\n if(map.containsKey(val)) return false;\n map.put(val, list.size());\n list.add(val);\n return true;\n }",
"public boolean insert(int val) {\n boolean contain = _map.containsKey(val);\n if ( contain ) return false;\n _map.put( val, _list.size());\n _list.add(val);\n return true;\n }",
"public void add(int number) {\n for(int num : list) set.add(num + number);\n list.add(number);\n }",
"public boolean insert(int val) {\n if(hm.containsKey(val)){\n return false;\n }\n else{\n sub.add(val);\n hm.put(val,sub.size()-1);\n return true;\n }\n\n\n\n }",
"public void add(int number) {\n // Write your code here\n if(map.containsKey(number)){\n map.put(number, map.get(number) + 1);\n }else{\n list.add(number);\n map.put(number, 1);\n }\n }",
"public void add(int number) {\n //map.put(number, map.getOrDefault(number, 0) + 1);\n if (map.containsKey(number)) {\n map.put(number, map.get(number) + 1);\n } else {\n map.put(number, 1);\n }\n }",
"public boolean insert(int val) {\n boolean alreadyExist = num2Index.containsKey(val);\n num2Index.putIfAbsent(val, new LinkedHashSet<>());\n num2Index.get(val).add(nums.size());\n nums.add(val);\n \n return !alreadyExist;\n }",
"@Override\n public boolean add(int value) {\n Entry newElement = new Entry(value);\n if (size == 0) {\n first = newElement;\n last = newElement;\n } else {\n last.next = newElement;\n newElement.previous = last;\n last = newElement;\n }\n size++;\n return true;\n }",
"public boolean insert(int val) {\n if (m.containsKey(val)) {\n return false;\n } else {\n l.add(val);\n m.put(val, l.size()-1);\n return true;\n }\n }",
"static void experiment1Day1Part2() {\n\n Set<Integer> integerList = new HashSet(); // Defining an integer Array List\n Set<Integer> setToReturn = new HashSet();\n Set<Integer> set1 = new HashSet();\n\n Scanner myFile = null;\n\n try {\n myFile = new Scanner(new FileReader(\"src/main/java/weekone/input01.txt\"));\n while (myFile.hasNext()) {\n integerList.add(myFile.nextInt());\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n if (myFile != null) {\n myFile.close();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n for (int myInt : integerList) {\n if (!set1.add(myInt)) {\n //this set is 0, but why?\n setToReturn.add(myInt);\n }\n }\n\n String test = \"test\";\n\n for (int myInt2 : setToReturn) {\n System.out.println(myInt2);\n }\n\n }",
"public boolean insert(int val) {\n if(!map.containsKey(val)){\n if(validLength == set.size()){\n set.add(val);\n map.put(val, validLength++);\n }\n else{\n map.put(val, validLength);\n set.set(validLength++, val);\n }\n return true;\n }\n else{\n return false;\n }\n }",
"public boolean add(int paramInt)\n/* */ {\n/* 179 */ ensureCapacity(this.m_entryCount + 1);\n/* 180 */ int i = -internalFind(paramInt) - 1;\n/* 181 */ if (i >= 0) {\n/* 182 */ this.m_entryCount += 1;\n/* 183 */ this.m_flagTable[i] = true;\n/* 184 */ this.m_keyTable[i] = paramInt;\n/* 185 */ return true;\n/* */ }\n/* 187 */ return false;\n/* */ }",
"public boolean insert(int val) {\n boolean contains = map.containsKey(val);\n if (contains) return false;\n map.put(val, nums.size()); // insert O(1) in map(with no collision) (linkedlist)\n nums.add(val); // linkedlist add one element in the end, O(1)\n return true;\n }",
"public boolean insert(int val) {\n boolean ret = !map.containsKey(val);\n ArrayList<Integer> l = map.computeIfAbsent(val, k -> new ArrayList<>());\n l.add(arr.size());\n arr.add(new int[]{val, l.size()-1}); \n return ret;\n }",
"void addGlobalToIfPop(Set<Integer> acc);",
"public boolean insert(int val) {\n if(map.containsKey(val)){\n map.get(val).add(nums.size());\n nums.add(val);\n return false;\n }\n map.put(val,new ArrayList<>());\n map.get(val).add(nums.size());\n nums.add(val);\n return true;\n }",
"public void add(int number) {\n if(numbers.size() > 0){\n \tSet<Integer> twoSum = numbers.stream().map(Integer::intValue).map(i -> i+number).collect(Collectors.toSet());\n twoSums.addAll(twoSum);\n }\n numbers.add(number);\n }",
"@Override\n public final boolean add(Integer e) {\n if(definedOn.contains(e)){\n return super.add(e);\n } else {\n return false;\n }\n }",
"public boolean insert(int val) {\n if (map.containsKey(val)) {\n return false;\n }\n map.put(val, val);\n return true;\n }",
"public void add(int number) {\n hash.put(number, hash.getOrDefault(number, 0) + 1);\n }",
"public void AddValue(int value)\n {\n // Check if the value already exists\n if (!_valuesToPut.contains(value))\n {\n _valuesToPut.add(value);\n Collections.sort(_valuesToPut);\n }\n }",
"public void add(int number) {\n\t if (hash.containsKey(number)) hash.put(number, 2); // two is enough\n\t else {\n\t \thash.put(number, 1);\n\t \tlist.add(number);\n\t }\n\t}",
"public void add(int number) {\n\t if(!m.containsKey(number)) {\n\t m.put(number, 0);\n\t }\n\t int pre = m.get(number);\n\t m.put(number, pre + 1);\n\t}",
"public void add(int number) {\n if (hash.containsKey(number)) {\n hash.put(number, 2);\n } else {\n hash.put(number, 1);\n }\n }",
"public void add(int number) {\n // Write your code here\n if(map.containsKey(number)) {\n map.put(number, map.get(number) + 1);\n }else {\n map.put(number, 1);\n }\n }",
"public boolean insert(int val) {\n if (lookup.containsKey(val)) return false;\n\n nums[size] = val;\n lookup.put(val, size);\n size++;\n\n return true;\n }",
"void add(int val);",
"public void insertElement(int element) {\n // if within min and max and doesnt haveElement then add the int\n if (element < MAXSETVALUE && element > MINSETVALUE && hasElement(element) != true && get != null) {\n // replacement array\n int[] arr = new int[get.length + 1];\n // copying values up to last\n for (int j = 0; j < get.length; j++)\n arr[j] = get[j];\n // inserts element\n arr[get.length] = element;\n get = arr;\n // avoiding errors\n } else if (get == null) {\n get = new int[1];\n get[0] = element;\n }\n\n }",
"public void add(int number) {\n if(map.containsKey(number)) map.put(number, map.get(number) + 1);\n else {\n map.put(number, 1);\n list.add(number);\n }\n }",
"void add(int value);",
"@Override\n\tpublic void add(Integer value) {\n\t\troot=add(root,value);\n\t\tcount++;\n\t}",
"public boolean insert(int val) {\n nums.add(val); //在列表末尾添加的元素 O(1)\n Set<Integer> set = idx.getOrDefault(val, new HashSet<Integer>());\n set.add(nums.size()-1);\n idx.put(val,set);\n return set.size()==1;\n }",
"@Test\r\n public void addAllFromSet() throws Exception {\r\n TreeSet<Integer> s = new TreeSet<>();\r\n s.addAll(sInt);\r\n assertTrue(s.contains(1));\r\n assertTrue(s.contains(2));\r\n assertTrue(s.contains(3));\r\n assertTrue(s.contains(4));\r\n assertTrue(s.contains(5));\r\n }",
"public boolean insert(int val) {\n\n return list.add(val);\n }",
"public int addItem(Itemset i);",
"void addHasInjury(Integer newHasInjury);",
"public void add()\n {\n set(++ current);\n }",
"public int inc(Object key)\r\n {\r\n return add(key, 1);\r\n }",
"public Boolean add(int value) {\n\t\t\n\t\tfor (Integer elem : elemList) {\n\t\t\tif (elem == value)\n\t\t\t\treturn false;\n\t\t}\n\t\tthis.elemList.add(value);\n\t\treturn true;\n\t}",
"public boolean insert(int val) {\n if (checkDups.containsKey(val)) {\n return false;\n }\n if (this.list.size() == this.size) {\n this.list.add(val);\n } else {\n this.list.set(this.size, val);\n }\n checkDups.put(val, this.size);\n this.size++;\n return true;\n \n }",
"public boolean insert(int val) {\n if (valToIndex.containsKey(val)) {\n return false;\n }\n \n valToIndex.put(val, A.size());\n A.add(val);\n return true;\n }",
"public void hashSet() {\n\n Set<Integer> num = new java.util.HashSet<>();\n\n num.add(3);\n num.add(11);\n num.add(6);\n\n System.out.println(num);\n\n for (int i = 1; i <= 10; i++) {\n\n if (num.contains(i)) {\n\n System.out.println(\"\\n\\t\" + i + \"\\t is found in set\");\n\n }\n\n }\n\n }",
"public boolean insert(int val) {\n if (location.containsKey(val)) {\n return false;\n }\n\n nums.add(val);\n location.put(val, nums.size() - 1);\n return true;\n }",
"public void put(int key, int value) {\n if (get(key) == -1)\n hashMap.add(new int[]{key, value});\n else {\n hashMap.stream().filter(pair -> pair[0] == key)\n .findAny()\n .map(pair -> pair[1] = value);\n }\n }",
"public void addTo(Integer element, int i)\n\t\t{buckets.get(i).add(element);}",
"@Override\n public boolean add(X x) {\n if (!allowElementsWithoutIdentification)\n throw new IllegalArgumentException(\"It is not allowed to put Elements without Identification in this Set\");\n\n return map.put(x, placeholder) == null;\n }",
"void addEmergingSymbols(Set<Integer> acc);",
"public boolean insert(int val) {\n if(!valueIndex.containsKey(val)){\n valueIndex.put(val,data.size());\n data.add(val);\n return true;\n }\n return false;\n }",
"public boolean add(T val) {\n Integer idx = hmap.get(val);\n if (idx == null) {\n int i = list.size();\n list.add(val);\n idx = new Integer(i);\n hmap.put(val, idx);\n return true;\n }\n return false;\n }",
"public Integer add();",
"public int putElement(Object key, int value)\r\n {\r\n return put(key, value);\r\n }",
"void addHasHelmet(Integer newHasHelmet);",
"@Test\n\tpublic void addSameValueTwice() {\n\t\tXSet xset = new XSet(3);\n\t\txset.add(1);\n\t\txset.add(1);\n\t\tassertTrue(xset.getSize() == 1);\n\t}",
"public static void set(int key, int value) {\n\t\t// your code here\n\t\tif (!map.containsKey(key)) {\n\t\t\tif (map.size() == size) {\n\t\t\t\tfor (Integer i : map.keySet()) {\n\t\t\t\t\tmap.remove(i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tmap.put(key, value);\n\t\t\t}\n\t\t\telse\n\t\t\t\tmap.put(key, value);\n\t\t} else {\n\t\t\tmap.remove(key);\n\t\t\tmap.put(key, value);\n\t\t}\n\n\t}",
"@Override\n public boolean addItem(T item) {\n //Make sure the Set does not already contain the item\n if(!this.contains(item)) {\n //Make sure there is enough room for the item. If there isn't\n //resize the array\n if(numItems == arr.length)\n this.ensureCap();\n //Add the item to the end and increment numItems\n arr[numItems++] = item;\n //return true\n return true;\n }\n //if item was already in set, return false\n return false;\n }",
"@Test\r\n public void testHashSetInsert()\r\n {\r\n Square s0 = new Square(1, -1),\r\n s1 = new Square(1, -1);\r\n HashSet<Square> hs = new HashSet<>();\r\n hs.add(s0);\r\n assertEquals(1, hs.size());\r\n hs.add(s1);\r\n assertEquals(1, hs.size());\r\n assertTrue(hs.contains(s0));\r\n assertTrue(hs.contains(s1));\r\n }",
"private void populate(Set<Integer> set) {\n for (int i = 0; i < 100; i++) {\n if(Time.now() % 3 == 0) {\n set.add(i);\n }\n }\n }",
"public void add(int number) {\n if (mapping.containsKey(number)) {\r\n mapping.put(number, 2);\r\n } else {\r\n mapping.put(number, 1);\r\n }\r\n insert(elements, number);\r\n return;\r\n }",
"public boolean add(int key) {\r\n\t\tint i = ArrayUtils.binarySearch(keys, size, key);\r\n\r\n\t\tif (i >= 0) {\r\n\t\t\treturn false; // already in array no need to add again\r\n\t\t} else {\r\n\t\t\ti = ~i;\r\n\r\n\t\t\tif (size >= keys.length) {\r\n\t\t\t\tint n = ArrayUtils.idealArraySize(size + 1);\r\n\r\n\t\t\t\tint[] nkeys = new int[n];\r\n\r\n\t\t\t\tSystem.arraycopy(keys, 0, nkeys, 0, keys.length);\r\n\t\t\t\tkeys = nkeys;\r\n\t\t\t}\r\n\r\n\t\t\tif (size - i != 0) {\r\n\t\t\t\tSystem.arraycopy(keys, i, keys, i + 1, size - i);\r\n\t\t\t}\r\n\r\n\t\t\tkeys[i] = key;\r\n\t\t\tsize++;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t}",
"@Test\r\n public void addWorks() throws Exception {\r\n TreeSet<Integer> s = new TreeSet<>();\r\n assertTrue(s.add(1));\r\n assertTrue(s.contains(1));\r\n assertFalse(s.add(1));\r\n }",
"public boolean insert(int val) {\n boolean inserted = !valueToIdx.containsKey(val);\n if ( inserted ) {\n int nextIdx = valueList.size();\n valueToIdx.put(val,nextIdx);\n valueList.add(val);\n }\n\n return inserted;\n }",
"public void add(int value) {\n m_value += value;\n }",
"private void addInt(int value) {\n if (LOGGER.isDebugEnabled()) {\n LOGGER.debug(\"Adding int index at \" + intCount + \" value \" + value);\n }\n ensureIntArrayCapacity(intCount + 1);\n intArray[intCount] = value;\n intCount += 1;\n }",
"public Boolean add(Integer i) {\n return list.add(i);\n }",
"MultiSet<X> add(X x);",
"public /*@ non_null @*/ JMLObjectSet<E> insert(E elem)\n throws IllegalStateException\n {\n if (has(elem)) {\n return this;\n } else if (size < Integer.MAX_VALUE) {\n return fast_insert(elem); \n } else {\n throw new IllegalStateException(\"Cannot insert into a set \"\n +\"with Integer.MAX_VALUE elements\");\n }\n }",
"public boolean insert(int val) {\n if(! valToIndex.containsKey(val)){\n // add element to list\n elementsList.add(val);\n // add val + index to map\n valToIndex.put(val, elementsList.size()-1);\n return true;\n }\n\n return false;\n }",
"public int addValue(int[] array) {\n int val = hashCode();\n for (int i : array) {\n val = addValue(i);\n }\n return val;\n }",
"public int getOrAdd(T val) {\n Integer idx = hmap.get(val);\n if (idx == null) {\n int i = list.size();\n idx = new Integer(i);\n list.add(val);\n hmap.put(val, idx);\n }\n return idx.intValue();\n }",
"public void add(int x){\n\t\tint[] index = functions(x);// get the indexes by send the value to the hash functions\n\t\tfor(int i=0; i<index.length; i++)\n\t\t\tflags[index[i]] = true; // change the relevant flags to be true\n\t}",
"@Override\n public void put(K key, V value) {\n // Note that the putHelper method considers the case when key is already\n // contained in the set which will effectively do nothing.\n root = putHelper(root, key, value);\n size += 1;\n }",
"public static void incrDuplicates() { ++duplicates; }",
"@Test\n public void AfterAddingDuplicatetheSizeShouldBeOne() throws MySetException {\n set.add(1);\n assertThat(set.size(), is(1));\n }",
"public void add(final int[] newSet) {\n for (int i: newSet) {\n add(i);\n }\n }",
"@Override\n\tpublic int add() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic int add() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic int add() {\n\t\treturn 0;\n\t}",
"@Override\r\n\tpublic int add() {\n\t\treturn 0;\r\n\t}",
"public int addValue(Object obj) {\n return foldIn((obj != null) ? obj.hashCode() : 0);\n }"
] | [
"0.71197236",
"0.6987683",
"0.6967702",
"0.68449044",
"0.68448716",
"0.67760813",
"0.66992486",
"0.6480739",
"0.6414852",
"0.62882787",
"0.6241032",
"0.62227905",
"0.61156374",
"0.60784566",
"0.607303",
"0.6058266",
"0.6053883",
"0.60504186",
"0.6039524",
"0.60358745",
"0.6029723",
"0.6014541",
"0.6005387",
"0.60028374",
"0.5971451",
"0.5965475",
"0.5962402",
"0.5960883",
"0.5954897",
"0.5938513",
"0.5927477",
"0.5923573",
"0.5909008",
"0.5896433",
"0.58962846",
"0.58931535",
"0.58916676",
"0.5882067",
"0.5876007",
"0.58697194",
"0.58696574",
"0.5854675",
"0.584985",
"0.58469075",
"0.58275664",
"0.5827507",
"0.5824519",
"0.5805745",
"0.5802175",
"0.5782317",
"0.5773662",
"0.57705843",
"0.57601094",
"0.57271814",
"0.5726343",
"0.572065",
"0.57151175",
"0.5697638",
"0.56958836",
"0.5677094",
"0.5671563",
"0.56669277",
"0.56603885",
"0.56516755",
"0.5620738",
"0.56034094",
"0.5565324",
"0.5560652",
"0.5541674",
"0.5536276",
"0.55126566",
"0.5504524",
"0.550412",
"0.55039084",
"0.54959613",
"0.5474854",
"0.54562664",
"0.5439935",
"0.54339105",
"0.5433443",
"0.5427486",
"0.54224145",
"0.5420575",
"0.541767",
"0.54155296",
"0.5408299",
"0.540453",
"0.5361469",
"0.535968",
"0.53596234",
"0.53558767",
"0.53368163",
"0.533509",
"0.5332489",
"0.5330634",
"0.53261393",
"0.53234005",
"0.53234005",
"0.53234005",
"0.53198826",
"0.53155077"
] | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.