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
Creates a new message with headers
public HeaderMessage(Map<String, AbstractHeader> headers, Object originalMessage) { this.headers = headers; this.originalMessage = originalMessage; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Header createHeader();", "private static MessageHeader createBreakHeader() {\n\n\t\tObject[] iov = new Object[1];\n\t\tiov[0] = JALP_BREAK_STR;\n\n\t\tMessageHeader mh = new MessageHeader();\n\t\tmh.setIov(iov);\n\n\t\treturn mh;\n\t}", "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}", "private void setupHeader(Message msg) throws MessagingException {\n }", "public HazelcastMQMessage(Headers headers, byte[] body) {\n super();\n this.body = body;\n this.headers = headers;\n }", "private static MessageHeader createHeader(ConnectionHeader connectionHeader, File file) {\n\n\t\tObject[] iov = new Object[4];\n\t\tiov[0] = connectionHeader.getProtocolVersion();\n\t\tiov[1]= connectionHeader.getMessageType();\n\t\tiov[2] = connectionHeader.getDataLen();\n\t\tiov[3] = connectionHeader.getMetaLen();\n\n\t\tMessageHeader mh = new MessageHeader();\n\t\tmh.setIov(iov);\n\t\tif(file != null) {\n\t\t\tmh.setFilePath(file.getAbsolutePath());\n\t\t}\n\n\t\treturn mh;\n\t}", "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}", "private HeaderBuilder createBasicHeaderMessage( int statusCode ) {\r\n\t\tHeaderBuilder builder = new HeaderBuilder();\r\n\t\treturn builder.buildHeaderBegin( statusCode, request.getHttpVersion() ).buildConnection( \"close\" );\r\n\t}", "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 Message createMessage()\n {\n return messageFactory.createMessage();\n }", "protected abstract Message createMessage(Object object, MessageProperties messageProperties);", "public static SOAPMessage createMessage(final MimeHeaders headers,\n final InputStream is) throws IOException, SOAPException {\n return messageFactory.createMessage(headers, is);\n }", "public Message newMessage(String message, Object... params) {\n/* 61 */ return new SimpleMessage(message);\n/* */ }", "protected ParseObject createMessage() {\n //format single variables appropriatly. most cases the field is an array\n ArrayList<ParseUser> nextDrinker = new ArrayList<ParseUser>();\n nextDrinker.add(mNextDrinker);\n ArrayList<String> groupName = new ArrayList<String>();\n groupName.add(mGroupName);\n\n ParseObject message = new ParseObject(ParseConstants.CLASS_MESSAGES);\n message.put(ParseConstants.KEY_SENDER_ID, ParseUser.getCurrentUser().getObjectId());\n message.put(ParseConstants.KEY_SENDER, ParseUser.getCurrentUser());\n message.put(ParseConstants.KEY_GROUP_ID, mGroupId);\n message.put(ParseConstants.KEY_GROUP_NAME, groupName);\n message.put(ParseConstants.KEY_SENDER_NAME, ParseUser.getCurrentUser().getUsername());\n message.put(ParseConstants.KEY_RECIPIENT_IDS, nextDrinker);\n message.put(ParseConstants.KEY_MESSAGE_TYPE, ParseConstants.TYPE_DRINK_REQUEST);\n\n return message;\n }", "public Message build() {\n Objects.requireNonNull(transactionIdBytes);\n\n byte[] messageBytes = new byte[MESSAGE_LEN_HEADER + length];\n\n byte[] messageTypeBytes = createMessageType();\n System.arraycopy(messageTypeBytes, 0, messageBytes, MESSAGE_POS_TYPE, MESSAGE_LEN_TYPE);\n\n byte[] lengthBytes = Bytes.intToBytes(length);\n System.arraycopy(lengthBytes, 2, messageBytes, MESSAGE_POS_LENGTH, MESSAGE_LEN_LENGTH);\n\n byte[] magicCookieBytes = Bytes.intToBytes(MAGIC_COOKIE_FIXED_VALUE);\n System.arraycopy(\n magicCookieBytes, 0, messageBytes, MESSAGE_POS_MAGIC_COOKIE, MESSAGE_LEN_MAGIC_COOKIE);\n\n System.arraycopy(\n transactionIdBytes, 0, messageBytes, MESSAGE_POS_TRANSACTION_ID,\n MESSAGE_LEN_TRANSACTION_ID);\n transactionIdBytes = null;\n\n if (attributeBytes != null && attributeBytes.length > 0) {\n System.arraycopy(\n attributeBytes, 0, messageBytes, MESSAGE_LEN_HEADER, attributeBytes.length);\n attributeBytes = null;\n }\n\n return new Message(messageBytes);\n }", "DnsMessage(int id) {\n header = newHeader(id);\n }", "public MessageHeader(Utils.MessageType messageType, String version, int senderId, String fileId, int chunkNo){\n this.messageType = messageType;\n this.version = version;\n this.senderId = senderId;\n this.fileId = fileId;\n this.chunkNo = chunkNo;\n }", "Message create(MessageInvoice invoice);", "public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6) {\n/* 118 */ return new SimpleMessage(message);\n/* */ }", "private static byte[] createHeader() {\n Random r = new Random();\n\n byte[] output = new byte[12];\n\n // Create random message id\n short messageID = (short) r.nextInt(Short.MAX_VALUE + 1);\n\n // Create a buffer we can construct the header in.\n ByteBuffer buf = ByteBuffer.wrap(output);\n\n // Place the message into the buffer.\n buf.putShort(messageID);\n\n // Sets QR, OPCODE, AA, TC, RD, RA, and RCODE\n buf.put((byte)0x01);\n buf.put((byte)0x20);\n\n // QDCOUNT, we're making one request.\n buf.putShort((short) 1);\n\n // Rest are 0\n buf.putShort((short) 0);\n buf.putShort((short) 0);\n buf.putShort((short) 0);\n\n return output;\n }", "public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3) {\n/* 93 */ return new SimpleMessage(message);\n/* */ }", "protected MimeBodyPart createMimeBodyPart(InternetHeaders headers, byte[] content) throws MessagingException {\n/* 1201 */ return new MimeBodyPart(headers, content);\n/* */ }", "public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4) {\n/* 101 */ return new SimpleMessage(message);\n/* */ }", "public MessageBuilder withHeaders(Map<String, String> headers) throws MessagingException {\n\n if (headers != null) {\n for (Map.Entry<String, String> entry : headers.entrySet()) {\n this.message.addHeader(entry.getKey(), entry.getValue());\n }\n }\n return this;\n }", "public String getMessageHeaderAsString(){\n String header;\n switch(messageType){\n case DELETE:\n header = messageType + \" \" + version + \" \" + senderId + \" \" + fileId + \" \" + Utils.CRLF + Utils.CRLF;\n break;\n case PUTCHUNK:\n header = messageType + \" \" + version + \" \" + senderId + \" \" + fileId + \" \" + chunkNo + \" \" + replicationDegree + \" \" + Utils.CRLF + Utils.CRLF;\n break;\n case ENH_AWOKE:\n header = messageType + \" \" + version + \" \" + senderId + Utils.CRLF + Utils.CRLF;\n break;\n case ENH_DELETED:\n header = messageType + \" \" + fileId + \" \" + senderId + Utils.CRLF + Utils.CRLF;\n break;\n case GETCHUNK:\n if(version.equals(Utils.ENHANCEMENT_RESTORE) || version.equals(Utils.ENHANCEMENT_ALL))\n header = messageType + \" \" + version + \" \" + senderId + \" \" + fileId + \" \" + chunkNo + \" \" + sender_access + \" \"+ Utils.CRLF + Utils.CRLF;\n else header = messageType + \" \" + version + \" \" + senderId + \" \" + fileId + \" \" + chunkNo + \" \" + Utils.CRLF + Utils.CRLF;\n break;\n default:\n header = messageType + \" \" + version + \" \" + senderId + \" \" + fileId + \" \" + chunkNo + \" \" + Utils.CRLF + Utils.CRLF;\n }\n return header;\n }", "public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8, Object p9) {\n/* 145 */ return new SimpleMessage(message);\n/* */ }", "public Message newMessage(String message, Object p0, Object p1, Object p2) {\n/* 85 */ return new SimpleMessage(message);\n/* */ }", "public Message () {\n\t\tthis.setCreationtime(Calendar.getInstance().getTimeInMillis());\n\t\tsetTimestamp();\n\t}", "protected InternetHeaders createInternetHeaders(InputStream is) throws MessagingException {\n/* 1184 */ return new InternetHeaders(is);\n/* */ }", "public HazelcastMQMessage() {\n this(new DefaultHeaders(), null);\n }", "public Message newMessage(String message, Object p0, Object p1) {\n/* 77 */ return new SimpleMessage(message);\n/* */ }", "public MessageAbstract createMessageAbstract() {\n\t\tMessageAbstract messageAbstract = new MessageAbstract();\n\t\tmessageAbstract.setId(this.id);\n\t\tmessageAbstract.setMessage(this.message);\n\t\tmessageAbstract.setSentTimestamp(this.sentTimestamp);\n\n\t\t// Add sender's user ID if available\n\t\tif (this.origin != null) {\n\t\t\tmessageAbstract.setSenderUserId(this.origin.getId());\n\t\t\tmessageAbstract.setSenderScreenName(this.origin.getScreenName());\n\t\t}\n\t\treturn messageAbstract;\n\t}", "public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7) {\n/* 127 */ return new SimpleMessage(message);\n/* */ }", "public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5) {\n/* 109 */ return new SimpleMessage(message);\n/* */ }", "public Message(String unparsedData){\n\t\theaderLines = new ArrayList<ArrayList<String>>();\n\t\tString[] headFromEntity = unparsedData.split(\"\\n\\n\", 2);\n\t\tString[] msgInfo = headFromEntity[0].split(\"\\n\");\n\t\tString[] status = msgInfo[0].split(\" \");\n\t\t\n\t\tthis.messageInfo[0]= status[0];\t\t\t\t\t// Version\n\t\tthis.messageInfo[1] = status[1];\t\t\t\t// status code\n\t\tthis.messageInfo[2] = msgInfo[0].substring(2);\t// phrase\n\t\t\n\t\tfor (int i = 1; i < msgInfo.length; i++){\n\t\t\tstatus = msgInfo[i].split(\" \");\n\t\t\theaderLines.add(new ArrayList<String>());\n\t\t\theaderLines.get(headerLines.size()-1).add(status[0]);\n\t\t\theaderLines.get(headerLines.size()-1).add(msgInfo[i].substring(status[0].length()));\n\t\t}\n\t\t\n\t\tentity = headFromEntity[1].getBytes();\n\t}", "public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8) {\n/* 136 */ return new SimpleMessage(message);\n/* */ }", "Message newMessage(Uuid id, Uuid author, Uuid conversation, String body, Time creationTime);", "public MailMessage setHeaders(MultiMap headers) {\n this.headers = headers;\n return this;\n }", "private void clearHeader(){\n\t\theader = new ChildMessage();\n\t}", "private void constructHeartbeatMessage() {\n // build head\n MessageProtobuf.Head.Builder headBuilder = MessageProtobuf.Head.newBuilder();\n headBuilder.setMsgId(UUID.randomUUID().toString());\n headBuilder.setMsgType(MsgConstant.MsgType.HEARTBEAT_MESSAGE);\n headBuilder.setTimeStamp(System.currentTimeMillis());\n\n // build message\n MessageProtobuf.Msg.Builder builder = MessageProtobuf.Msg.newBuilder();\n builder.setHead(headBuilder.build());\n\n defaultHeartbeatMessage = builder.build();\n }", "public abstract Builder headers(String... paramVarArgs);", "private static Text createHeader() {\n StringBuilder stringBuilder = new StringBuilder();\n //noinspection HardCodedStringLiteral\n stringBuilder.append(\"Offset \");\n for (int i = 0; i < 16; i++) {\n stringBuilder.append(\" 0\");\n stringBuilder.append(Integer.toHexString(i));\n }\n stringBuilder.append(System.lineSeparator()).append(System.lineSeparator());\n Text result = new Text(stringBuilder.toString());\n //noinspection HardCodedStringLiteral\n result.getStyleClass().add(\"normal\");\n return result;\n }", "protected ByteBuffer writeHeader()\n {\n ByteBuffer buffer = ByteBuffer.allocate(getMessageSize());\n buffer.order(ByteOrder.LITTLE_ENDIAN);\n\n buffer.put(HEADER.getBytes(), 0, 4);\n\n return buffer;\n }", "public void addHeaderToChild(Context ctx){\n\t\tChildInteraction cDb = new ChildInteraction(ctx);\n\t\tfor(String key : header.numbers.keySet())\n\t\t\tif(header.numbers.get(key) < 0)\n\t\t\t\theader.numbers.put(key, (int)cDb.InsertMessage(key, header.text, DB_ID));\n\t\theader.numbersToString(ctx);\n\t\tcDb.Cleanup();\n\t\tcMessages.add(header);\n\t\tclearHeader();\n\t}", "@Override\n public TransponderMessage newMessage() {\n super.newMessage();\n setModule(\"somevertical\");\n return this;\n }", "String createMessageWithPrefix();", "public Message newMessage(String message, Object p0) {\n/* 69 */ return new SimpleMessage(message);\n/* */ }", "private RendezVousPropagateMessage newPropHeader(String serviceName, String serviceParam, int ttl) {\r\n\r\n RendezVousPropagateMessage propHdr = new RendezVousPropagateMessage();\r\n propHdr.setTTL(ttl);\r\n propHdr.setDestSName(serviceName);\r\n propHdr.setDestSParam(serviceParam);\r\n UUID msgID = createMsgId();\r\n propHdr.setMsgId(msgID);\r\n addMsgId(msgID);\r\n // Add this peer to the path.\r\n propHdr.addVisited(group.getPeerID().toURI());\r\n return propHdr;\r\n }", "public MessageHeader(Utils.MessageType messageType, String version, int senderId) {\n this.messageType = messageType;\n this.version = version;\n this.senderId = senderId;\n }", "private static HttpMessage createMessage(\n String paramContent, String fileName, String contentType, String fileParamContent) {\n HttpMessage message = createBaseMessage();\n StringBuilder bodySb = new StringBuilder(320);\n bodySb.append(\"--------------------------d74496d66958873e\").append(CRLF);\n bodySb.append(\"Content-Disposition: form-data; name=\\\"person\\\"\").append(CRLF);\n bodySb.append(CRLF);\n bodySb.append(paramContent).append(CRLF);\n bodySb.append(\"--------------------------d74496d66958873e\").append(CRLF);\n bodySb.append(\"Content-Disposition: form-data; name=\\\"somefile\\\"; filename=\\\"\")\n .append(fileName)\n .append(\"\\\"\")\n .append(CRLF);\n bodySb.append(\"Content-Type: \").append(contentType).append(CRLF);\n bodySb.append(CRLF);\n bodySb.append(fileParamContent).append(CRLF);\n bodySb.append(\"--------------------------d74496d66958873e--\").append(CRLF);\n message.setRequestBody(bodySb.toString());\n return message;\n }", "protected abstract TMessage prepareMessage();", "public String constructMessage(String... keys) {\r\n\t\treturn this.constructMessage(\" \", keys);\r\n\t}", "DynamicMessage createDynamicMessage();", "private Message createMessage(final JSONObject jsonMessageSet) {\n\n final JSONArray messages = (JSONArray) jsonMessageSet.get(\"message\");\n final JSONObject jsonMessage = getRandomJsonObject(messages);\n\n final Message message = new Message();\n message.setMessageId((Integer) jsonMessage.get(\"messageId\"));\n message.setText((String) jsonMessage.get(\"text\"));\n\n final Integer tipSetId = (Integer) jsonMessage.get(\"tipSetId\");\n if (tipSetId != null) {\n message.setTipSetId(tipSetId);\n }\n\n return message;\n }", "public Message newMessage(String type) {\n\tString address = null;\n\n\t/*\n * Provide the default address from the original open.\n */\n\n\tif (((m_mode & Connector.WRITE) > 0) && (host != null)) {\n\t address = ADDRESS_PREFIX + host;\n\t if (m_iport != 0) {\n\t\taddress = address + \":\" + String.valueOf(m_iport);\n\t }\n\t}\n\n\treturn newMessage(type, address);\n }", "private void createHeaders(WritableSheet sheet)\r\n\t\t\tthrows WriteException {\n\t\taddHeader(sheet, 0, 0, reportProperties.getProperty(\"header1\"));\r\n\t\taddHeader(sheet, 1, 0, reportProperties.getProperty(\"header2\"));\r\n\t\taddHeader(sheet, 2, 0, reportProperties.getProperty(\"header3\"));\r\n\t\taddHeader(sheet, 3, 0, reportProperties.getProperty(\"header4\"));\r\n\t\t\r\n\r\n\t}", "public IndexModifierCSVMessage(MessageHeader header) {\n\t\tsuper(header);\n\t}", "public static Map<String, Object> getMessageHeaders(MQMessage message, MQRFH2 rfh2) {\n Map<String, Object> headers = new TreeMap<String, Object>();\n\n if (rfh2 != null) {\n try {\n try {\n String nmr = rfh2.getStringFieldValue(\"usr\", \"norma_message_request_type\");\n headers.put(\"norma_message_request_type\", nmr);\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n for (Element folder : rfh2.getFolders()) {\n String prefix = folder.getName() + \".\";\n for (Element element : folder.getChildren()) {\n headers.put(prefix + element.getName(), element.getValue());\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n } else if (message != null) {\n MQHeaderIterator it = new MQHeaderIterator(message);\n while (it.hasNext()) {\n MQHeader header = it.nextHeader();\n String key = header.toString();\n headers.put(key, key);\n }\n }\n\n if (message != null) {\n headers.put(\"MQMDmessageId\", message.messageId == null ? \"null\" : \"'\" + new String(message.messageId) + \"'\");\n GregorianCalendar putDateTime = message.putDateTime;\n headers.put(\"MQMDputDateTime\", putDateTime == null ? \"null\" : putDateTime.getTime().toString());\n headers.put(\"MQMDcorrelationId\", message.correlationId == null ? \"null\" : \"'\"\n + new String(message.correlationId) + \"'\");\n }\n return headers;\n }", "@Test\n\t\tpublic void testAddHeader() throws Exception{\n\t\t\temail.addHeader(this.goodHeaderName, this.goodHeaderValue);\n\t\t}", "public void addHeader(String name, String value) throws MessagingException {\n/* 420 */ throw new IllegalWriteException(\"POP3 messages are read-only\");\n/* */ }", "@Override\n\t\t\tpublic Message createMessage(Session session) throws JMSException {\n\t\t\t\tMessage m = session.createTextMessage(s);\n\t\t\t\treturn m;\n\t\t\t}", "public void createMessageId(String hostname) {\n Header header = obtainHeader();\n\n header.setField(newMessageId(hostname));\n }", "public void createMessage(int tid, int uid, int rank, String detail);", "private HeaderBuilder createSimpleHeaderMessage( int statusCode, File document, boolean allowCache ) {\r\n\t\tHeaderBuilder builder = createBasicHeaderMessage( statusCode ).buildContentTypeAndLength( document );\r\n\t\tif ( allowCache && HttpdConf.CACHE_ENABLE )\r\n\t\t\tbuilder.buildLastModified( document.lastModified() ).buildCacheControl( \"public\" );\r\n\t\treturn builder;\r\n\r\n\t}", "public MimeMessage createEmptyMessage();", "public abstract Message createMessage(String uid) throws MessagingException;", "private Message formatMessage(LogRecord record)\n\t{\n\t\treturn new Message(record);\n\t}", "public Message createFIXMessage(MessageContext msgCtx) throws IOException {\n if (log.isDebugEnabled()) {\n log.debug(\"Extracting FIX message from the message context (Message ID: \" + msgCtx.getMessageID() + \")\");\n }\n\n Message message = new Message();\n SOAPBody soapBody = msgCtx.getEnvelope().getBody();\n OMElement messageNode = soapBody.getFirstChildWithName(new QName(FIXConstants.FIX_MESSAGE));\n Iterator<OMElement> messageElements = messageNode.getChildElements();\n\n while (messageElements.hasNext()) {\n OMElement node = messageElements.next();\n //create FIX header\n if (node.getQName().getLocalPart().equals(FIXConstants.FIX_HEADER)) {\n Iterator<OMElement> headerElements = node.getChildElements();\n while (headerElements.hasNext()) {\n OMElement headerNode = headerElements.next();\n String tag = headerNode.getAttributeValue(new QName(FIXConstants.FIX_FIELD_ID));\n String value = null;\n\n OMElement child = headerNode.getFirstElement();\n if (child != null) {\n String href = headerNode.getFirstElement().\n getAttributeValue(new QName(FIXConstants.FIX_MESSAGE_REFERENCE));\n if (href != null) {\n DataHandler binaryDataHandler = msgCtx.getAttachment(href.substring(4));\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n binaryDataHandler.writeTo(outputStream);\n value = new String(outputStream.toByteArray());\n }\n } else {\n value = headerNode.getText();\n }\n\n if (value != null) {\n message.getHeader().setString(Integer.parseInt(tag), value);\n }\n }\n\n } else if (node.getQName().getLocalPart().equals(FIXConstants.FIX_BODY)) {\n //create FIX body\n Iterator<OMElement> bodyElements = node.getChildElements();\n while (bodyElements.hasNext()) {\n OMElement bodyNode = bodyElements.next();\n String tag = bodyNode.getAttributeValue(new QName(FIXConstants.FIX_FIELD_ID));\n String value = null;\n\n OMElement child = bodyNode.getFirstElement();\n if (child != null) {\n String href = bodyNode.getFirstElement().\n getAttributeValue(new QName(FIXConstants.FIX_MESSAGE_REFERENCE));\n if (href != null) {\n DataHandler binaryDataHandler = msgCtx.getAttachment(href.substring(4));\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n binaryDataHandler.writeTo(outputStream);\n value = new String(outputStream.toByteArray());\n }\n } else {\n value = bodyNode.getText();\n }\n\n if (value != null) {\n message.setString(Integer.parseInt(tag), value);\n }\n }\n } else if (node.getQName().getLocalPart().equals(FIXConstants.FIX_TRAILER)) {\n //create FIX trailer\n Iterator<OMElement> trailerElements = node.getChildElements();\n while (trailerElements.hasNext()) {\n OMElement trailerNode = trailerElements.next();\n String tag = trailerNode.getAttributeValue(new QName(FIXConstants.FIX_FIELD_ID));\n String value = null;\n\n OMElement child = trailerNode.getFirstElement();\n if (child != null) {\n String href = trailerNode.getFirstElement().\n getAttributeValue(new QName(FIXConstants.FIX_MESSAGE_REFERENCE));\n if (href != null) {\n DataHandler binaryDataHandler = msgCtx.getAttachment(href.substring(4));\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n binaryDataHandler.writeTo(outputStream);\n value = new String(outputStream.toByteArray());\n }\n } else {\n value = trailerNode.getText();\n }\n\n if (value != null) {\n message.getTrailer().setString(Integer.parseInt(tag), value);\n }\n }\n }\n }\n return message;\n }", "@Test\n public void testHeaders() {\n AbstractMessage msg = new SimpleBasicMessage(\"my msg\");\n assertNotNull(msg.getHeaders());\n assertTrue(msg.getHeaders().isEmpty());\n\n // the headers are copied internally\n Map<String, String> headers = new HashMap<String, String>();\n msg.setHeaders(headers);\n assertNotNull(msg.getHeaders());\n assertTrue(msg.getHeaders().isEmpty());\n assertNotSame(headers, msg.getHeaders());\n\n // we can't change the headers via the map returned by the getter\n try {\n msg.getHeaders().put(\"not-allowed\", \"not-allowed\");\n assert false : \"Should not have been allowed to modify the returned map\";\n } catch (UnsupportedOperationException expected) {\n // expected\n }\n\n // show that the setter completely replaces the old headers\n assertEquals(0, msg.getHeaders().size());\n headers.put(\"one\", \"111\");\n headers.put(\"two\", \"222\");\n msg.setHeaders(headers);\n assertEquals(2, msg.getHeaders().size());\n assertEquals(\"111\", msg.getHeaders().get(\"one\"));\n assertEquals(\"222\", msg.getHeaders().get(\"two\"));\n\n headers.clear();\n assertEquals(\"Clearing our map should not have affected the msg internal map\", 2, msg.getHeaders().size());\n headers.put(\"foo\", \"bar\");\n msg.setHeaders(headers);\n assertEquals(1, msg.getHeaders().size());\n assertEquals(\"bar\", msg.getHeaders().get(\"foo\"));\n }", "protected byte[] createHeader(AC35StreamMessage type, int sourceId) {\n byte[] header = super.createHeader(type);\n addFieldToByteArray(header, HEADER_SOURCE_ID, sourceId);\n return header;\n }", "public Message createMessage(Session session)\n\t\t\t\t\tthrows JMSException {\n\t\t\t\treturn session.createTextMessage(source);\n\t\t\t}", "@Override\n public MediationMessage createMessage(CamelMediationMessage message) {\n return null;\n }", "public MessageRecord() {\n super(Message.MESSAGE);\n }", "public Message createMessage(String messageText)\n {\n Message msg =\n new MessageIcqImpl(messageText,\n OperationSetBasicInstantMessaging.DEFAULT_MIME_TYPE,\n OperationSetBasicInstantMessaging.DEFAULT_MIME_ENCODING, null);\n\n return msg;\n }", "public SpreadMessage createMessage(String context, Serializable serializable) throws SpreadException {\n SpreadMessage message = super.createMessage();\n if(message==null) message = new SpreadMessage();\n message.digest((Serializable) context);\n message.digest(serializable);\n return message;\n }", "public MessageHeader(Utils.MessageType messageType, int senderId, String fileId) {\n this.messageType = messageType;\n this.senderId = senderId;\n this.fileId = fileId;\n }", "private String createNewHeader(List<String> columns)\r\n {\r\n StringBuilder sb = new StringBuilder();\r\n for (String column : columns)\r\n {\r\n sb.append(column);\r\n sb.append(SEPARATOR);\r\n }\r\n\r\n return sb.substring(0, sb.length() - 1);\r\n }", "public Message() {\n message = \"\";\n senderID = \"\";\n time = 0;\n }", "public Message() {\n\t\tsuper();\n\t}", "public Message(){\n\t\ttimeStamp = System.currentTimeMillis();\n\t}", "@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 ChildMessage getHeader(){return header;}", "private Message(MessageType handle) {\n this(handle, null, null);\n }", "public Message() {}", "public Message() {}", "public static HttpCarbonMessage createHttpCarbonMessage() {\n HttpCarbonMessage httpCarbonMessage;\n httpCarbonMessage = new HttpCarbonMessage(\n new DefaultHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.OK));\n return httpCarbonMessage;\n }", "public static void constructStartupMessage(final ByteBuf buffer) {\n /*\n * Requests headers - according to https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v4.spec\n * section #1\n *\n * 0 8 16 24 32 40\n * +---------+---------+---------+---------+---------+\n * | version | flags | stream | opcode |\n * +---------+---------+---------+---------+---------+\n */\n\n buffer.writeByte(0x04); //request\n buffer.writeBytes(new byte[]{0x00}); // flag\n buffer.writeShort(incrementAndGet()); //stream id\n buffer.writeBytes(new byte[]{0x01}); // startup\n\n /*\n * Body size - int - 4bytes.\n * Body of STARTUP message contains MAP of 1 entry, where key and value is [string]\n *\n * Size = (map size) + (key size) + (key string length) + (value size) + (value string length)\n */\n short size = (short) (2 + 2 + CQL_VERSION_KEY.length() + 2 + CQL_VERSION_VALUE.length());\n\n buffer.writeInt(size);\n\n /*\n * Write body itself, lets say that is it Map.of(\"CQL_VERSION\",\"3.0.0\") in CQL version.\n */\n\n //map sie\n buffer.writeShort(1);\n\n //key\n buffer.writeShort(CQL_VERSION_KEY.length());\n buffer.writeBytes(CQL_VERSION_KEY.getBytes());\n\n //value\n buffer.writeShort(CQL_VERSION_VALUE.length());\n buffer.writeBytes(CQL_VERSION_VALUE.getBytes());\n }", "public Message(){}", "private static void setHeaderFields (String senderOID, String receiverOID) {\n result.setITSVersion(HL7Constants.ITS_VERSION);\n result.setId(HL7MessageIdGenerator.GenerateHL7MessageId(localDeviceId));\n result.setCreationTime(HL7DataTransformHelper.CreationTimeFactory());\n result.setInteractionId(HL7DataTransformHelper.IIFactory(HL7Constants.INTERACTION_ID_ROOT, \"PRPA_IN201302UV\"));\n result.setProcessingCode(HL7DataTransformHelper.CSFactory(\"T\"));\n result.setProcessingModeCode(HL7DataTransformHelper.CSFactory(\"T\"));\n result.setAcceptAckCode(HL7DataTransformHelper.CSFactory(\"AL\"));\n \n // Create the Sender\n result.setSender(HL7SenderTransforms.createMCCIMT000100UV01Sender(senderOID));\n\n // Create the Receiver\n result.getReceiver().add(HL7ReceiverTransforms.createMCCIMT000100UV01Receiver(receiverOID));\n }", "public <T extends Message> T header(String name, String value) {\n\t\tif (StringUtils.isNotBlank(name)) {\n\t\t\tif (this.hasHeader(name)) {\n\t\t\t\tthis.removeHeader(name);\n\t\t\t}\n\t\t\tthis.headers.put(name, value);\n\t\t}\n\t\treturn (T) this;\n\t}", "private Message(Parcel in) {\n text = in.readString();\n sender = in.readString();\n target = in.readString();\n sendersLatitude = in.readDouble();\n sendersLongitude = in.readDouble();\n numHops = in.readInt();\n expirationTime = in.readLong();\n createdByUser = in.readInt();\n }", "private NdefMessage createNdefMessage(String content) {\n NdefRecord ndefRecord = createTextRecord(content);\n NdefMessage ndefMessage = new NdefMessage(new NdefRecord[]{ndefRecord});\n return ndefMessage;\n }", "protected void updateHeaders() throws MessagingException {\n/* 121 */ super.updateHeaders();\n/* 122 */ MimeBodyPart.setEncoding(this, this.encoding);\n/* */ }", "private ServerClientMessageHeader(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private Message prepareMessage(String receiver) throws MessagingException, IOException {\n Message message = new MimeMessage(makeSession());\n message.setFrom(new InternetAddress(FROM));\n message.setRecipients(\n Message.RecipientType.TO, InternetAddress.parse(receiver));\n message.setSubject(\"Bilety do Filharmonii\");\n\n String msg = \"W zalaczniku znajduje sie twoj bilet\";\n\n MimeBodyPart mimeBodyPart = new MimeBodyPart();\n mimeBodyPart.setContent(msg, \"text/html\");\n\n MimeBodyPart attachmentBodyPart = new MimeBodyPart();\n attachmentBodyPart.attachFile(new File(ticketPath));\n\n Multipart multipart = new MimeMultipart();\n multipart.addBodyPart(mimeBodyPart);\n multipart.addBodyPart(attachmentBodyPart);\n\n message.setContent(multipart);\n return message;\n }", "private Message(MessageType handle, String srcName, String text) {\n msgType = handle;\n // Save the properly formatted identifier for the user sending the\n // message.\n msgSender = srcName;\n // Save the text of the message.\n msgText = text;\n }", "@Override\n public Message fromBytes(byte[] bytes) {\n try {\n String content = new String(bytes);\n LOG.debug(\"Decoding consumer message: \"+content);\n \n JsonNode node = mapper.readTree(content);\n JsonNode headers = node.get(HEADERS);\n //LOG.info(\"MD key:\"+headers.get(\"KEY\")+\" T:\"+Thread.currentThread().getName());\n if (headers == null) {\n throw new IllegalArgumentException(\"No headers given: \"+node);\n }\n JsonNode payload = node.get(PAYLOAD);\n if (payload == null) {\n throw new IllegalArgumentException(\"No payload given: \"+node);\n }\n\n MessageBuilder<JsonNode> builder = MessageBuilder.withPayload(payload);\n Iterator<Map.Entry<String, JsonNode>> fields = headers.getFields();\n while (fields.hasNext()) {\n Map.Entry<String, JsonNode> field = fields.next();\n if (!ignoredHeaders.contains(field.getKey())) {\n builder.setHeader(field.getKey(), field.getValue().getTextValue());\n }\n }\n\n return builder.build();\n\n } catch (IOException ex) {\n throw new IllegalStateException(\"Error reading message bytes\", ex);\n }\n }", "public void createHeader() throws DocumentException\n {\n createHeader(100f, Element.ALIGN_LEFT);\n }", "public String constructMessage(String separator, String... keys) {\r\n\t\tString result = \"\";\r\n\t\tfor (String key:keys) {\r\n\t\t\tresult += this.getString(key) + separator;\r\n\t\t}\r\n\t\treturn result.substring(0, result.length()-separator.length()); // ignore last separator\r\n\t}", "public InfoMessage createInfoMessage();" ]
[ "0.6691414", "0.65118384", "0.649699", "0.6361791", "0.63551635", "0.63261974", "0.6324089", "0.62813187", "0.6279251", "0.6228606", "0.6132674", "0.61309373", "0.610907", "0.60755736", "0.6073596", "0.6073306", "0.604839", "0.6007115", "0.59679204", "0.5967494", "0.59643584", "0.59510344", "0.59483933", "0.59131455", "0.5902109", "0.59017205", "0.5881779", "0.5876286", "0.5874997", "0.58670807", "0.5861799", "0.58597904", "0.584529", "0.5833613", "0.5822208", "0.5791559", "0.5776229", "0.57754344", "0.57197857", "0.5712232", "0.5710984", "0.57053083", "0.56952524", "0.56895745", "0.5686077", "0.56769", "0.56638706", "0.56445974", "0.5643084", "0.56412226", "0.5641127", "0.56087595", "0.5573458", "0.5567834", "0.5565773", "0.5563544", "0.5554855", "0.5548421", "0.55425507", "0.55420154", "0.5540257", "0.5538174", "0.5529158", "0.5527464", "0.55269563", "0.55211574", "0.5508666", "0.55074155", "0.5495443", "0.54952854", "0.5485358", "0.54797524", "0.54642475", "0.5456746", "0.5443758", "0.5443092", "0.5436536", "0.5435406", "0.54348713", "0.5427416", "0.54066396", "0.53922474", "0.53727084", "0.53717196", "0.53717196", "0.5368009", "0.5362465", "0.53553677", "0.5348692", "0.53469497", "0.53462714", "0.534011", "0.5322252", "0.5318368", "0.5316804", "0.5307778", "0.53063124", "0.5304747", "0.53045976", "0.5304023" ]
0.66185796
1
Returns the header map of this message
public Map<String, AbstractHeader> getHeaders() { return headers; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Map<String, Header> getHeaderMap() {\n return headerMap;\n }", "public Map<String,List<String>> getHeaderMap() {\n\n\t\treturn headers;\n\t}", "public Map<String, String> getHeaderList() {\n return headerMap;\n }", "public Map getHeaders() {\r\n if (headers == null) {\r\n headers = new HashMap();\r\n }\r\n\r\n return headers;\r\n }", "Map<String, String> getHeaders();", "public Map<String, HeaderInfo> getHeaders() {\n\t\treturn headers;\n\t}", "public HashMap<String, String> getHeaderList() {\n return headerList;\n }", "Map<String, List<String>> getHeaders();", "public Map<String, List<String>> getHeaders(){\n if (this.mResponseHeaders == null){\n this.mResponseHeaders = mConnection.getHeaderFields();\n }\n return this.mResponseHeaders;\n }", "public VersionedMap getHeaders ()\n {\n return headers;\n }", "public Map<String, List<String>> getHeaders() {\n\t\t\treturn headers;\n\t\t}", "public Map<String, List<String>> getHeaderFields() {\n/* 262 */ return this.delegate.getHeaderFields();\n/* */ }", "public Map<String, String> getHeaders() {\n return Collections.unmodifiableMap(headers);\n }", "@Override\n\tpublic Map<String, String> getHeader() {\n\t\treturn this.header;\n\t}", "public List<Map<String, Map<String, Object>>> getHeader(){\n return headerDescription;\n }", "public final Map<String, String> getHeaders() {\n return Collections.unmodifiableMap(headers);\n }", "public Map<String, String> headers() {\n return this.header.headers();\n }", "public Map<String, String> readHeader() {\r\n\t\tMap<String, String> headers = null;\r\n\t\tif (advanceToTag(\"Document\")) {\r\n\t\t\tif (advanceToTag(\"Header\")) {\r\n\t\t\t\theaders = this.in.readPropertyBlock();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn headers;\r\n\t}", "public MultiMap getHeaders() {\n return headers;\n }", "@Override public Map<String, String> getHeaders() {\n return Collections.unmodifiableMap(headers);\n }", "public Map<String, List<String>> getInitialHeaders() {\n return mInitialHeaders;\n }", "public static HashMap<String, String> getHeaderDetails(){\n\t\tHashMap<String, String> data = new HashMap<>();\n\n\t\tHeaderDataDAO headerDao = DaoFactory.getHeaderDataDAO();\n\t\tHeaderData headerData = headerDao.getAllRecords().get(0);\n\t\t\n\t\tif(headerData != null){\n\t\t\tdata.put(AppConstants.G_LUID, headerData.getLuid());\n\t\t\tdata.put(AppConstants.G_OFFICE_CODE, headerData.getOfficeCode());\n\t\t\tdata.put(AppConstants.G_USER_ID, headerData.getUserId());\n\t\t\tdata.put(AppConstants.C_LOG_DATE, StringUtils.leftPad(headerData.getLogDate(), 6, \"0\"));\n\t\t\tdata.put(AppConstants.G_LOG_TIME, StringUtils.leftPad(headerData.getLogTime(), 6, \"0\"));\n\t\t\tdata.put(AppConstants.G_TRAN_FI, headerData.getTranFi());\n\t\t}\n\n\t\treturn data;\n\t}", "public static Map<String, String> getHeaders() {\n if (headers == null) {\n headers = new HashMap<>();\n headers.put(\"Content-Type\", \"application/json\");\n headers.put(\"X-Custom-Header\", \"application/json\");\n }\n return headers;\n }", "Map<String, String> getRequestHeaders();", "public HashMap<String, String> getHeader() {\n HashMap<String, String> header = new HashMap<String, String>();\n//\t\theader.put(\"Content-Type\", pref.getString(\"application/json\", \"application/json\"));\n /*header.put(\"authId\", pref.getString(KEY_USER_ID, KEY_USER_ID));\n header.put(\"authToken\", pref.getString(KEY_AUTH_TOKEN, KEY_AUTH_TOKEN));*/\n\n\n header.put(\"authId\", pref.getString(KEY_USER_ID, \"1\"));\n header.put(\"authToken\", pref.getString(KEY_AUTH_TOKEN, \"s4nbp5FibJpfEY9q\"));\n\n return header;\n }", "public Map<String, List<String>> getResponseHeaders() {\n return responseHeaders == null ? Collections.EMPTY_MAP : responseHeaders;\n }", "public Set<String> getHeaderNames() {\n return headers.keySet();\n }", "public Vector<YANG_Header> getHeaders() {\n\t\treturn headers;\n\t}", "public Map<String, List<String>> getHeaders() throws NullPointerException {\n if (headers != null) {\n return headers;\n }\n throw new NullPointerException(\"getHeaders must be called after asArray or asObject\");\n }", "public Map<String, String> getExtraHeaders() {\n return Collections.unmodifiableMap(extraHeaders);\n }", "public static Map<String, Object> getMessageHeaders(MQMessage message, MQRFH2 rfh2) {\n Map<String, Object> headers = new TreeMap<String, Object>();\n\n if (rfh2 != null) {\n try {\n try {\n String nmr = rfh2.getStringFieldValue(\"usr\", \"norma_message_request_type\");\n headers.put(\"norma_message_request_type\", nmr);\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n for (Element folder : rfh2.getFolders()) {\n String prefix = folder.getName() + \".\";\n for (Element element : folder.getChildren()) {\n headers.put(prefix + element.getName(), element.getValue());\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n } else if (message != null) {\n MQHeaderIterator it = new MQHeaderIterator(message);\n while (it.hasNext()) {\n MQHeader header = it.nextHeader();\n String key = header.toString();\n headers.put(key, key);\n }\n }\n\n if (message != null) {\n headers.put(\"MQMDmessageId\", message.messageId == null ? \"null\" : \"'\" + new String(message.messageId) + \"'\");\n GregorianCalendar putDateTime = message.putDateTime;\n headers.put(\"MQMDputDateTime\", putDateTime == null ? \"null\" : putDateTime.getTime().toString());\n headers.put(\"MQMDcorrelationId\", message.correlationId == null ? \"null\" : \"'\"\n + new String(message.correlationId) + \"'\");\n }\n return headers;\n }", "public HashMap getOutputHeader() {\n\t\treturn null;\n\t}", "public byte[] getHeader() {\n\treturn header;\n }", "public String getHeader() {\n return header;\n }", "public String getHeader() {\n return header;\n }", "public Object getHeader() {\n return header;\n }", "public String getHeader()\r\n\t{\r\n\t\treturn header;\r\n\t}", "public Header[] getRequestHeaders() {\n return getRequestHeaderGroup().getAllHeaders();\n }", "private HashMap<String, String> getHeaders() {\n mHeaders = new HashMap<>();\n // set user'token if user token is not set\n if ((this.mToken == null || this.mToken.isEmpty()) && mProfile != null)\n this.mToken = mProfile.getToken();\n\n if (this.mToken != null && !this.mToken.isEmpty()) {\n mHeaders.put(\"Authorization\", \"Token \" + this.mToken);\n Log.e(\"TOKEN\", mToken);\n }\n\n mHeaders.put(\"Content-Type\", \"application/form-data\");\n mHeaders.put(\"Accept\", \"application/json\");\n return mHeaders;\n }", "@Override\n public Map<String, String> getHeaders() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\", \"application/json\"); // header format wysłanej wiadomości - JSON\n params.put(\"Accept\", \"application/json\"); // header format otrzymanej wiadomości -JSON\n params.put(\"Consumer\", C.HEDDER_CUSTOMER); // header Consumer\n params.put(\"Authorization\", C.HEDDER_BEARER + shar.getString(C.KEY_FOR_SHAR_TOKEN, \"\")); // header Authorization\n return params;\n }", "@Override\n public Map<String, String> getHeaders() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\", \"application/json\"); // header format wysłanej wiadomości - JSON\n params.put(\"Accept\", \"application/json\"); // header format otrzymanej wiadomości -JSON\n params.put(\"Consumer\", C.HEDDER_CUSTOMER); // header Consumer\n params.put(\"Authorization\", C.HEDDER_BEARER + shar.getString(C.KEY_FOR_SHAR_TOKEN, \"\")); // header Authorization\n return params;\n }", "protected Map<String, String> getRequiredResponseHeaders()\n {\n if (requiredHttpHeaders != null)\n {\n return requiredHttpHeaders;\n }\n if (scimHttpClient.getScimClientConfig().getExpectedHttpResponseHeaders() != null)\n {\n return scimHttpClient.getScimClientConfig().getExpectedHttpResponseHeaders();\n }\n Map<String, String> requiredHttpHeaders = new HashMap<>();\n requiredHttpHeaders.put(HttpHeader.CONTENT_TYPE_HEADER, HttpHeader.SCIM_CONTENT_TYPE);\n return requiredHttpHeaders;\n }", "public List<String> getHeaders() {\n try {\n return load().getHeaderNames();\n } catch (IOException ex) {\n Logger.getLogger(IntelligentSystem.class.getName()).log(Level.SEVERE, null, ex);\n }\n return Collections.EMPTY_LIST;\n }", "public String getHeader() {\n\t\treturn _header;\n\t}", "public List<Header> getHeaderList() {\n return mHeaderList;\n }", "public Header[] getRequestHeaders();", "public String getHeader() {\n\t\t\treturn header;\n\t\t}", "Collection<String> getHeaderNames();", "public String getHeader() {\n\t\treturn header.toString();\n\t}", "public int readMapHeader() throws IOException {\n return in.readInt();\n }", "public List<byte[]> getHeader() {\n\t\treturn this.fileHeader;\n\t}", "public String getHeader();", "public AsyncResult<List<OfflineMessageHeader>> requestMessageHeaders() {\r\n ServiceDiscoveryManager serviceDiscoveryManager = xmppSession.getManager(ServiceDiscoveryManager.class);\r\n return serviceDiscoveryManager.discoverItems(null, OfflineMessage.NAMESPACE).thenApply(itemNode ->\r\n itemNode.getItems().stream()\r\n .map(item -> new OfflineMessageHeader(Jid.of(item.getName()), item.getNode()))\r\n .collect(Collectors.toList())\r\n );\r\n }", "private static Map<Short, String> getHeaderValuesMap(Document reportDocument) {\n Map<Short, String> headerValues = new HashMap<Short, String>();\n Element reportElement = reportDocument.getDocumentElement();\n NodeList thElements = reportElement.getElementsByTagName(\"th\");\n // assumes only one header row\n for (int i = 0; i < thElements.getLength(); i++) {\n headerValues.put((short) i, thElements.item(i).getTextContent());\n }\n return headerValues;\n }", "public Map<String, String> getRequestHeaders(HttpServletRequest request) {\n Map<String, String> headers = new HashMap<String, String>();\n\n if (request == null)\n return headers;\n\n Enumeration headerNames = request.getHeaderNames();\n while (headerNames.hasMoreElements()) {\n String headerName = (String) headerNames.nextElement();\n String headerVal = request.getHeader(headerName);\n\n headers.put(headerName, headerVal);\n }\n\n\n return headers;\n }", "public String[] getHeader(String name) throws MessagingException {\n/* 363 */ if (this.headers == null)\n/* 364 */ loadHeaders(); \n/* 365 */ return this.headers.getHeader(name);\n/* */ }", "@Override\n public Map<String, String> getHeaders() {\n HashMap<String, String> headers = new HashMap<>();\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\n return headers;\n }", "@Override\n public Map<String, String> getHeaders() {\n HashMap<String, String> headers = new HashMap<>();\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\n return headers;\n }", "@Override\n public Map<String, String> getHeaders() {\n HashMap<String, String> headers = new HashMap<>();\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\n return headers;\n }", "@Nonnull @NonnullElements @NotLive @Unmodifiable public List<Pair<String,String>> getHeaders() {\n return headerList;\n }", "public java.util.List<ConnectionHeaderParameter> getHeaderParameters() {\n return headerParameters;\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n return httpClientRequest.getHeaders();\n }", "@Override\n public Map<String, String> getHeaders() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"content-type\", \"application/json\");\n params.put(\"cache-control\", \"no-cache\");\n\n return params;\n }", "@Override\n public Map<String, String> getHeaders() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"content-type\", \"application/json\");\n params.put(\"cache-control\", \"no-cache\");\n\n return params;\n }", "public Map<String,String> getHeaderOverrides( ) {\r\n\t\treturn this.externalHeaderOverrides;\r\n\t}", "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 String[] getHeaders(){\n String[] headers={\"Owner Unit ID\",\"Origin Geoloc\",\"Origin Name\",\"Number of Assets\",};\n return headers;\n }", "com.didiyun.base.v1.HeaderOrBuilder getHeaderOrBuilder();", "java.lang.String getHeader();", "public Header[] getResponseHeaders() {\n return getResponseHeaderGroup().getAllHeaders();\n }", "public String[] composeHeader() {\n\t\treturn null;\n\t}", "Set<String> getHeaderNames();", "public std_msgs.msg.dds.Header getHeader()\n {\n return header_;\n }", "public PHeader getHeader() {\n\t\treturn header;\n\t}", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n return (mHeaders != null && mHeaders.size() > 3) ? mHeaders : NetworkUtils.this.getHeaders();\n }", "public String getMessageHeaderAsString(){\n String header;\n switch(messageType){\n case DELETE:\n header = messageType + \" \" + version + \" \" + senderId + \" \" + fileId + \" \" + Utils.CRLF + Utils.CRLF;\n break;\n case PUTCHUNK:\n header = messageType + \" \" + version + \" \" + senderId + \" \" + fileId + \" \" + chunkNo + \" \" + replicationDegree + \" \" + Utils.CRLF + Utils.CRLF;\n break;\n case ENH_AWOKE:\n header = messageType + \" \" + version + \" \" + senderId + Utils.CRLF + Utils.CRLF;\n break;\n case ENH_DELETED:\n header = messageType + \" \" + fileId + \" \" + senderId + Utils.CRLF + Utils.CRLF;\n break;\n case GETCHUNK:\n if(version.equals(Utils.ENHANCEMENT_RESTORE) || version.equals(Utils.ENHANCEMENT_ALL))\n header = messageType + \" \" + version + \" \" + senderId + \" \" + fileId + \" \" + chunkNo + \" \" + sender_access + \" \"+ Utils.CRLF + Utils.CRLF;\n else header = messageType + \" \" + version + \" \" + senderId + \" \" + fileId + \" \" + chunkNo + \" \" + Utils.CRLF + Utils.CRLF;\n break;\n default:\n header = messageType + \" \" + version + \" \" + senderId + \" \" + fileId + \" \" + chunkNo + \" \" + Utils.CRLF + Utils.CRLF;\n }\n return header;\n }", "String[] getHeader(String key);", "Headers getHeaders();", "@Override\n\tpublic Collection<String> getHeaderNames() {\n\t\treturn null;\n\t}", "List<String> getHeaders() {\n return forensicsTable.getHeaders();\n }", "@Override\n\t\t\tpublic Map<String, String> getHeaders() throws AuthFailureError {\n\t\t\t\tHashMap<String, String> headers = new HashMap<String, String>();\n\t\t\t\theaders.put(\"Content-Type\", \"application/json;charset=UTF-8\");\n\t\t\t\treturn headers;\n\t\t\t}", "public List<Label> getHeaderLabels() {\r\n return headerLabels;\r\n }", "public Map<String, Object> toMap() {\n Map<String, Object> map = new HashMap<>();\n map.put(\"message\", message);\n map.put(\"senderID\", senderID);\n map.put(\"time\", time);\n return map;\n }", "public java.lang.String getReqHeaders() {\n return req_headers;\n }", "public Set<QName> getHeaders() {\n\t\treturn headers;\n\t}", "public String getHeaderNames(){return header.namesText;}", "public Header getHeader() {\n\t\treturn this.header;\n\t}", "public Headers getHeaders() {\n if (headers == null) {\n headers = new DefaultHeaders();\n }\n return headers;\n }", "public java.lang.String getReqHeaders() {\n return req_headers;\n }", "public List<Header> getSessionHeaders() {\n\t\treturn Collections.unmodifiableList(sessionHeaders);\n\t}", "public DnsHeader header() {\n return header;\n }", "com.didiyun.base.v1.Header getHeader();", "public HeaderData get(String key){\r\n\t\treturn map.get(key);\r\n\t}", "public ListIterator getHeaders()\n { return headers.listIterator(); }", "public Class<?> header() {\n return header;\n }", "public HttpHeaders getHeaders()\r\n/* 63: */ {\r\n/* 64: 93 */ if (this.headers == null)\r\n/* 65: */ {\r\n/* 66: 94 */ this.headers = new HttpHeaders();\r\n/* 67: */ Enumeration headerValues;\r\n/* 68: 95 */ for (Enumeration headerNames = this.servletRequest.getHeaderNames(); headerNames.hasMoreElements(); \r\n/* 69: 98 */ headerValues.hasMoreElements())\r\n/* 70: */ {\r\n/* 71: 96 */ String headerName = (String)headerNames.nextElement();\r\n/* 72: 97 */ headerValues = this.servletRequest.getHeaders(headerName);\r\n/* 73: 98 */ continue;\r\n/* 74: 99 */ String headerValue = (String)headerValues.nextElement();\r\n/* 75:100 */ this.headers.add(headerName, headerValue);\r\n/* 76: */ }\r\n/* 77: */ }\r\n/* 78:104 */ return this.headers;\r\n/* 79: */ }", "public java.lang.String getHeaderName() {\r\n return headerName;\r\n }", "List<Header> headers();", "private String[] getHeaderColumns() {\n int length = CallLogQuery._PROJECTION.length;\n String[] columns = new String[length + 1];\n System.arraycopy(CallLogQuery._PROJECTION, 0, columns, 0, length);\n columns[length] = CallLogQuery.SECTION_NAME;\n return columns;\n }", "public String[] getHeaders()\n\t{\n\t\tString[] lines = this.header.split(\"\\\\r\\\\n\");\n\t\treturn lines;\n\t}" ]
[ "0.85400814", "0.8461468", "0.8214169", "0.78122014", "0.76102614", "0.7600301", "0.7454891", "0.7382442", "0.7377497", "0.7346974", "0.73452526", "0.734447", "0.7325687", "0.7323158", "0.731287", "0.7286371", "0.7222356", "0.71402967", "0.7083358", "0.6938493", "0.67842805", "0.6729664", "0.6722541", "0.6688706", "0.66233885", "0.6604408", "0.660072", "0.6528566", "0.6416615", "0.6392534", "0.63817513", "0.6362036", "0.6349447", "0.6336803", "0.6336803", "0.6335067", "0.6323942", "0.63202804", "0.6309672", "0.6305513", "0.6305513", "0.6281269", "0.6271678", "0.6265765", "0.6256292", "0.623208", "0.6213317", "0.6211572", "0.6178227", "0.6177098", "0.6164464", "0.61510235", "0.6130854", "0.6113744", "0.610962", "0.6104843", "0.6091125", "0.6091125", "0.6091125", "0.6065548", "0.6053114", "0.6041201", "0.6034048", "0.6034048", "0.60185456", "0.6017488", "0.6002962", "0.6000313", "0.59853196", "0.5978636", "0.59702426", "0.5958927", "0.5925312", "0.5910526", "0.59093374", "0.5907151", "0.59060997", "0.5891227", "0.58888155", "0.5878538", "0.58774894", "0.5860706", "0.5859079", "0.5855324", "0.5848822", "0.5846632", "0.5843737", "0.5841517", "0.5834347", "0.5827611", "0.5820486", "0.5819294", "0.5808512", "0.5807065", "0.5805325", "0.5795694", "0.5793583", "0.5792249", "0.5789925", "0.5787683" ]
0.75003844
6
Returns the original message, which was transported as a payload
public Object getOriginalMessage() { return originalMessage; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Payload.Inbound getInboundPayload();", "public Object getPayload() {\n return payload;\n }", "Payload getMsg();", "com.google.protobuf.ByteString getPayload();", "com.google.protobuf.ByteString getPayload();", "public byte[] getPayload() {\r\n return Utilities.copyOf(payload);\r\n }", "public String getPayload() {\n return payload;\n }", "public String getPayload() {\n return payload;\n }", "public String getPayload() {\n return payload;\n }", "public final ByteBuffer getPayload() {\n return this.payload.slice();\n }", "protected final Object getPayload() {\r\n return this.payload;\r\n }", "@Override\n\tpublic Message getPayload() {\n\t\treturn null;\n\t}", "public String getPayload() {\n return this.payload;\n }", "public byte[] getPayload();", "protected Object extractMessage(Message message) {\n\t\tif (serializer != null) {\n\t\t\treturn serializer.deserialize(message.getBody());\n\t\t}\n\t\treturn message.getBody();\n\t}", "public com.google.protobuf.ByteString getPayload() {\n return payload_;\n }", "public com.google.protobuf.ByteString getPayload() {\n return payload_;\n }", "public Payload.Outbound getOutboundPayload();", "public com.google.protobuf.ByteString getPayload() {\n return payload_;\n }", "public com.google.protobuf.ByteString getPayload() {\n return payload_;\n }", "public byte[] getPayload() {\n return mPayload;\n }", "public String getMessage() {\r\n return getPayload().optString(\"message\");\r\n }", "public String readMessage() {\r\n return new String(readMessageAsByte());\r\n }", "public java.lang.CharSequence getPayload() {\n return payload;\n }", "public int getPayload() {\n return payload;\n }", "public Payload getPayload() {\n return this.payload;\n }", "public java.lang.CharSequence getPayload() {\n return payload;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getSerializedPayload() {\n return serializedPayload_;\n }", "public Object getPayload() {\r\n return null;\r\n }", "String getRawMessage();", "public SecureMessagePayload getSecureMessagePayload() {\r\n\t\treturn this.secureMessagePayload;\r\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString getSerializedPayload() {\n return serializedPayload_;\n }", "public Source getPayload();", "public Object getMessage() {\n return m_message;\n }", "public byte[] getPayload() throws TFTPPacketException;", "@AutoEscape\n\tpublic String getPayload();", "com.google.protobuf.ByteString\n getTheMessageBytes();", "public byte[] getRawContent() {\n try {\n if (this.messageContent == null &&\n this.messageContentBytes == null &&\n this.messageContentObject == null) {\n return null;\n } else if (this.messageContentObject != null ) {\n String messageContent = this.messageContentObject.toString();\n byte[] messageContentBytes;\n ContentType contentTypeHeader =\n (ContentType)this.nameTable.get\n (ContentTypeHeader.NAME.toLowerCase());\n if (contentTypeHeader != null) {\n String charset = contentTypeHeader.getCharset();\n if (charset != null) {\n messageContentBytes = messageContent.getBytes(charset);\n } else {\n messageContentBytes =\n messageContent.getBytes(DEFAULT_ENCODING);\n }\n } else messageContentBytes =\n messageContent.getBytes(DEFAULT_ENCODING);\n return messageContentBytes;\n } else if ( this.messageContent != null ) {\n byte[] messageContentBytes;\n ContentType contentTypeHeader =\n (ContentType)this.nameTable.get\n (ContentTypeHeader.NAME.toLowerCase());\n if (contentTypeHeader != null) {\n String charset = contentTypeHeader.getCharset();\n if (charset != null) {\n messageContentBytes =\n this.messageContent.getBytes(charset);\n } else {\n messageContentBytes =\n this.messageContent.getBytes(DEFAULT_ENCODING);\n }\n } else messageContentBytes =\n this.messageContent.getBytes(DEFAULT_ENCODING);\n return messageContentBytes;\n } else {\n return messageContentBytes;\n }\n } catch (UnsupportedEncodingException ex) {\n InternalErrorHandler.handleException(ex);\n return null;\n }\n }", "ByteBuf getMessageBody();", "public byte[] pull() {\n \n return router.getNextMessage();\n }", "default Message brokerMessageToRouterMessage(MessageBroker.ReceivedMessage message) {\n return new Message() {\n\n @Override\n public Map<String, Object> metadata() {\n return message.metadata();\n }\n\n @Override\n public Object body() {\n return message.body();\n }\n\n @Override\n public byte[] rawBody() {\n return message.rawBody();\n }\n\n @Override\n public MessageBroker.ReceivedMessage underlyingMessage() {\n return message;\n }\n };\n }", "public Object getContent() {\n if (this.messageContentObject != null) return messageContentObject;\n else if (this.messageContentBytes != null)\n return this.messageContentBytes;\n else if (this.messageContent != null) return this.messageContent;\n else return null;\n }", "protected Object extractMessage(Message message) {\n\t\tMessageConverter converter = getMessageConverter();\n\t\tif (converter != null) {\n\t\t\treturn converter.fromMessage(message);\n\t\t}\n\t\treturn message;\n\t}", "public RequestMessage getMessage() {\r\n return message;\r\n }", "private PeerProtocolMessage readNormalMessage() throws IOException{\r\n\t\tbyte[]length=new byte[4];\r\n\t\tthis.inputStream.read(length);\r\n\t\tint lengthInt=ToolKit.bigEndianBytesToInt(length, 0);\r\n\t\tbyte[]message= new byte[lengthInt];\r\n\t\tthis.inputStream.read(message);\r\n\t\tbyte[]result=new byte[length.length+message.length];\r\n\t\tSystem.arraycopy(length, 0, result, 0, length.length);\r\n\t\tSystem.arraycopy(message, 0, result, length.length, message.length);\r\n\t\treturn PeerProtocolMessage.parseMessage(result);\r\n\t}", "public Object extractBodyFromJms(JmsExchange exchange, Message message) {\n try {\n if (message instanceof ObjectMessage) {\n ObjectMessage objectMessage = (ObjectMessage)message;\n return objectMessage.getObject();\n } else if (message instanceof TextMessage) {\n TextMessage textMessage = (TextMessage)message;\n return textMessage.getText();\n } else if (message instanceof MapMessage) {\n return createMapFromMapMessage((MapMessage)message);\n } else if (message instanceof BytesMessage || message instanceof StreamMessage) {\n return message;\n } else {\n return null;\n }\n } catch (JMSException e) {\n throw new RuntimeJmsException(\"Failed to extract body due to: \" + e + \". Message: \" + message, e);\n }\n }", "public ProcessorMessage getMessage() {\n\t\tProcessorMessage obj = reader.getMessage();\n\t\treturn obj;\n\t}", "Document getPayload();", "public byte[] getBytes(){\n\t\treturn message;\n\t}", "private MqttPayload getPayload(String message) {\n MqttPayload payload = null;\n\n if (message.contains(\";\")) {\n try {\n String[] separatedMessage = message.split(\";\");\n\n if (separatedMessage.length >= 2) {\n payload = new MqttPayload(formatter.parse(separatedMessage[0]), separatedMessage[1]);\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n } else {\n payload = new MqttPayload(Calendar.getInstance().getTime(), message);\n }\n\n return payload;\n }", "public Message getMessage(){\n return message;\n }", "private byte[] processPayload(byte[] message) {\n\t\treturn ComMethods.processPayload(currentUser.getBytes(), message, counter-1, currentSessionKey, simMode);\n\t}", "public Object getMessageId()\n {\n return getUnderlyingId(true);\n }", "public Object getBody() throws MessagingException {\n if (body == null) {\n body = getMarshaler().unmarshal(exchange, this);\n }\n return body;\n }", "public V getMessage() {\n return this.message;\n }", "PayloadCommunicator getPayloadCommunicator();", "public String getPayloadId() {\r\n return this.payloadId;\r\n }", "Message getCurrentMessage();", "public ITCMessage readMessage() throws IOException;", "com.google.protobuf.ByteString getMsg();", "public byte[] getSecureMessageSerialized() {\r\n\t\treturn this.isSecureMessageSerialized ? this.secureMessageSerialized : null;\r\n\t}", "public int getPayloadType() {\n return _payload;\n }", "Object getMessage();", "public String getData() {\n return message;\n }", "public String getMessageContent() {\n return messageContent;\n }", "public String getClientMessage() {\n return message;\n }", "@Override\n protected Message receiveMessage() throws IOException {\n String encoded = this.din.readUTF();\n this.lastMessage = new Date();\n String decodedXml = new String(\n DatatypeConverter.parseBase64Binary(encoded));\n\n return Message.msgFromXML(decodedXml);\n }", "public String getMessage() {\n\t\tString toReturn = message;\n\t\tmessage=\"\";//delete the message\n\t\treturn toReturn;\n\t}", "public byte[] getData() throws ProtocolException {\n if (payload == null) {\n decodePacket();\n }\n return payload;\n }", "public String receive() {\n logger.info(\"Recieve and convert JMS MSG\");\n return jmsTemplate.receiveAndConvert(destinationQueue).toString();\n }", "public String getMessage() {\n Object ref = message_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n message_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public String getMessage() {\n Object ref = message_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n message_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public String getMessage() {\n Object ref = message_;\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 message_ = s;\n return s;\n }\n }", "public String getMessage() {\n Object ref = message_;\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 message_ = s;\n return s;\n }\n }", "public com.google.protobuf.Value getDataItemPayload() {\n if (dataItemPayloadBuilder_ == null) {\n return dataItemPayload_ == null\n ? com.google.protobuf.Value.getDefaultInstance()\n : dataItemPayload_;\n } else {\n return dataItemPayloadBuilder_.getMessage();\n }\n }", "public <T> T readInbound() {\n/* 291 */ T message = (T)poll(this.inboundMessages);\n/* 292 */ if (message != null) {\n/* 293 */ ReferenceCountUtil.touch(message, \"Caller of readInbound() will handle the message from this point\");\n/* */ }\n/* 295 */ return message;\n/* */ }", "java.lang.String getTheMessage();", "public byte get() {\n\t\treturn payload.get();\n\t}", "public java.lang.String getMessage() {\n java.lang.Object ref = message_;\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 message_ = s;\n }\n return s;\n }\n }", "public java.lang.String getMessage() {\n java.lang.Object ref = message_;\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 message_ = s;\n }\n return s;\n }\n }", "public java.lang.String getMessage() {\n java.lang.Object ref = message_;\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 message_ = s;\n }\n return s;\n }\n }", "public java.lang.String getMessage() {\n java.lang.Object ref = message_;\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 message_ = s;\n }\n return s;\n }\n }", "public java.lang.String getMessage() {\n java.lang.Object ref = message_;\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 message_ = s;\n }\n return s;\n }\n }", "public java.lang.String getMessage() {\n java.lang.Object ref = message_;\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 message_ = s;\n }\n return s;\n }\n }", "public java.math.BigDecimal getOriginalSendAmount() {\r\n return originalSendAmount;\r\n }", "public com.google.protobuf.ByteString getMessage() {\n return message_;\n }", "public byte [] readMessageAsByte() {\r\n byte [] data = new byte[256];\r\n int length;\r\n\r\n try {\r\n length = in.readInt();\r\n if (length > 0) {\r\n data = new byte[length];\r\n in.readFully(data, 0, data.length);\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n\r\n return data;\r\n }", "public com.google.protobuf.ByteString getMessage() {\n return message_;\n }", "@Override\n public void payload(byte[] data) {\n \tmLastMessage.append(new String(data));\n Log.d(TAG, \"Payload received: \" + data);\n }", "public java.lang.String getMessage() {\n java.lang.Object ref = message_;\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 message_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getMessage() {\n java.lang.Object ref = message_;\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 message_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getMessage() {\n java.lang.Object ref = message_;\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 message_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getMessage() {\n java.lang.Object ref = message_;\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 message_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getMessage() {\n java.lang.Object ref = message_;\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 message_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getMessage() {\n java.lang.Object ref = message_;\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 message_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getMessage() {\n return localMessage;\n }", "public Pokemon.Payload getPayload(int index) {\n if (payloadBuilder_ == null) {\n return payload_.get(index);\n } else {\n return payloadBuilder_.getMessage(index);\n }\n }", "com.google.protobuf.ByteString\n getMessageBytes();", "com.google.protobuf.ByteString\n getMessageBytes();", "com.google.protobuf.ByteString\n getMessageBytes();" ]
[ "0.7184482", "0.71613914", "0.7154784", "0.7145324", "0.7145324", "0.71291363", "0.7005046", "0.7005046", "0.6987429", "0.69704634", "0.69232345", "0.6859082", "0.6837943", "0.6834764", "0.68296206", "0.67941236", "0.67941236", "0.6729724", "0.6728434", "0.6728434", "0.6721453", "0.6684647", "0.6657231", "0.664103", "0.66215706", "0.6607318", "0.65840596", "0.65820223", "0.654885", "0.6536974", "0.6504702", "0.64823234", "0.6316853", "0.6246417", "0.6231072", "0.6191379", "0.6149079", "0.6115681", "0.60983956", "0.60864687", "0.6064184", "0.6062183", "0.60583144", "0.60502255", "0.60466623", "0.6039171", "0.60361713", "0.60203683", "0.6020278", "0.60158116", "0.6014066", "0.60126895", "0.5993035", "0.5989579", "0.5932943", "0.58982086", "0.5897323", "0.588866", "0.58858883", "0.58831704", "0.58783567", "0.5869217", "0.58556026", "0.584741", "0.584661", "0.5846598", "0.5844931", "0.58209187", "0.579621", "0.5781534", "0.5765741", "0.5765741", "0.5751416", "0.5751416", "0.5740985", "0.57397646", "0.5727541", "0.57244927", "0.57203907", "0.57203907", "0.5719509", "0.5719509", "0.5719509", "0.5719509", "0.571804", "0.5713223", "0.5702057", "0.56873035", "0.5686343", "0.56737924", "0.56737924", "0.5673605", "0.5673605", "0.5673605", "0.5673605", "0.56713563", "0.56565595", "0.5655787", "0.5655787", "0.5655787" ]
0.77492887
0
Created by suneetsrivastava on 09/01/18.
@Dao @TypeConverters({DateConverter.class}) public interface DAO { @Insert(onConflict = OnConflictStrategy.REPLACE) void insert(DatabaseModel databaseModels); @Query("Select *from todoitem") LiveData<List<DatabaseModel>> getAllTask(); @Query("Select * from todoitem where id = :id") LiveData<DatabaseModel> getTaskById(int id); @Query("Select * from todoitem where tag = :tag") LiveData<List<DatabaseModel>> getTaskByTag(String tag); @Query("Select * from todoitem where priority = :priority") LiveData<List<DatabaseModel>> getTaskByPriority(String priority); @Query("Select * from todoitem where isTaskDone = :isDone") LiveData<List<DatabaseModel>> getTaskByStatus(Boolean isDone); @Query("Delete from todoitem where id = :id") void deleteById(int id); @Delete void delete(DatabaseModel databaseModel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\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 gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@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}", "public void gored() {\n\t\t\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}", "private void poetries() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void debite() {\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 init() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\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 public void init() {\n }", "public void mo4359a() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n public int describeContents() { return 0; }", "private static void cajas() {\n\t\t\n\t}", "@Override\n void init() {\n }", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n public void init() {}", "@Override\n\tpublic void emprestimo() {\n\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 getExras() {\n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n protected void init() {\n }", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "private void m50366E() {\n }", "@Override\r\n\tpublic void init() {}", "public Pitonyak_09_02() {\r\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "Petunia() {\r\n\t\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "private void init() {\n\n\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n public void initialize() { \n }", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "protected void mo6255a() {\n }", "public void mo21877s() {\n }" ]
[ "0.61713934", "0.60158616", "0.5942988", "0.5927011", "0.5872769", "0.5868775", "0.58585805", "0.58486724", "0.58486724", "0.58133775", "0.5811819", "0.5789437", "0.576773", "0.5756081", "0.5740342", "0.5713469", "0.5687989", "0.5671289", "0.56546265", "0.56546265", "0.56406826", "0.5635838", "0.56327146", "0.56318593", "0.5631155", "0.5629528", "0.56000036", "0.55995053", "0.55995053", "0.55995053", "0.55995053", "0.55995053", "0.55959475", "0.5594335", "0.55905026", "0.5587498", "0.5579132", "0.5579132", "0.5578351", "0.5573487", "0.55544674", "0.55482376", "0.55378467", "0.55378467", "0.55378467", "0.55378467", "0.55378467", "0.55378467", "0.55265164", "0.5523908", "0.55118644", "0.5502115", "0.5500407", "0.54960525", "0.5487368", "0.54858124", "0.5474484", "0.5464702", "0.5462164", "0.5462164", "0.5462164", "0.5461234", "0.54596484", "0.545803", "0.545803", "0.545803", "0.54546696", "0.54535025", "0.54535025", "0.54516417", "0.5448376", "0.54459596", "0.5435189", "0.5435189", "0.5435189", "0.5431065", "0.5420398", "0.5413138", "0.54104346", "0.5410303", "0.5410303", "0.5410303", "0.5410303", "0.5410303", "0.5410303", "0.5410303", "0.54005945", "0.5395484", "0.53952605", "0.5389852", "0.5388386", "0.53879", "0.53875846", "0.53875846", "0.5384156", "0.5371945", "0.53600013", "0.53577375", "0.53507084", "0.534816", "0.53457916" ]
0.0
-1
Providing path of the Chrome driver
public static void main(String[] args) { System.setProperty("webdriver.chrome.driver", "C:\\chromedriver.exe"); //creating an object to hold the chrome driver so we don't have to constantly call the chrome driver every time WebDriver driver = new ChromeDriver(); //Getting the URL - driver.get("https://www.timeanddate.com/worldclock/?continent=namerica/"); WebElement table=driver.findElement(By.xpath("/html/body/div[1]/div[6]/section[1]/div/section/div[1]/div")); //count number of rows List<WebElement>rows=table.findElements(By.tagName("tr")); //count number of columns List<WebElement>columns=table.findElements(By.tagName("td")); System.out.println("number of rows are"+" "+rows); System.out.println("number of column are"+" "+columns); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Selenium(String chromePath) {\n this.browserDriverPath = chromePath; \n }", "public void setChromeDriver(){\n System.setProperty(\"webdriver.chrome.driver\", browserDriverPath);\n seleniumDriver = new ChromeDriver();\n }", "public static void setChromeDriverProperty() {\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\automation_new_code\\\\onfs.alip.accounting\\\\BrowserDriver/chromedriver.exe\");\n\t\t}", "public static void ChromeExePathSetUp() {\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \r\n\t\t\t\t\"D:\\\\VisionITWorkspace\\\\dependencies\\\\chromedriver_win32\\\\chromedriver.exe\");\r\n\t\tReporter.log(\"Chrome Exe path Set up\", true);\r\n\t}", "public static WebDriver chrome()\r\n\t{\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",System.getProperty(\"user.dir\")+\"\\\\Chrome\\\\chromedriver.exe\");\r\n\t\tgk = new ChromeDriver();\r\n\t\treturn gk;\r\n\t}", "public File getChromeDriverFile(){\r\n\t\t\r\n\t\tFile file=null;\r\n\t\tif(testBed.getBrowser().getDriverLocation()!=null){\r\n\t\t\t\r\n\t\t\tfile =new File(testBed.getBrowser().getDriverLocation());\r\n\t\t\r\n\t\t}else{\r\n\t\t\tif(ConfigUtil.isWindows(testBed))\r\n\t\t\t{\r\n\t\t\t\t//TODO have to remove the hard coded values\r\n\t\t\t\t//file = new File(\"..\\\\test-automation-library\\\\resources\\\\chromedriver.exe\");\r\n\t\t\t\tfile = new File(DriverConstantUtil.CHROME_WINDOWS_DRIVER_FILE);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tfile = new File(DriverConstantUtil.CHROME_MAC_DRIVER_FILE);\r\n\t\t\t\t//file = new File(\"/Users/sonamdeo/git/test-automation/test-automation-library/resources/chromedriver\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn file;\r\n\t}", "public static void setChromeDriverDownloadPath(String path)\n\t{\n\t\tApplicationProperties appProperties = p6web.getInstance();\n\t\t\n\ttry{\n\t\t\n\t\tm_driver = ApplicationProperties.getInstance().getDriver();\n\t\tm_driver.get(\"chrome://settings/advanced\");\n JavascriptExecutor js = (JavascriptExecutor) m_driver;\n String prefId = \"download.default_directory\";\n File tempDir=new File(System.getProperty(\"user.dir\")+path);\n if (m_driver.findElements(By.xpath(String.format(\".//input[@pref='%s']\", prefId))).size() == 0) {\n \tm_driver.get(\"chrome://settings-frame\");\n \tm_driver.findElement(By.xpath(\".//button[@id='advanced-settings-expander']\")).click(); }\n String tmpDirEscapedPath = tempDir.getCanonicalPath().replace(\"\\\\\", \"\\\\\\\\\");\n js.executeScript(String.format(\"Preferences.setStringPref('%s', '%s', true)\", prefId,\n tmpDirEscapedPath));\n\t\t}\n\t\n\t\tcatch(IOException e){\n\t\t\t\n\t\t}\n\t\n\t\tm_driver.get(appProperties.getUrl());\n\t\n\t}", "private WebDriver getDriver() {\n return new ChromeDriver();\n }", "private static WebDriver launchChrome()\n\t{\n\t\tif (REMOTE_URL != null && !REMOTE_URL.equals(\"\")) {\n\t\t\tDesiredCapabilities capabilities = DesiredCapabilities.chrome();\n\t\t\ttry {\n\n\t\t\t\treturn new RemoteWebDriver(new URL(System.getProperty(\"RemoteUrl\")), capabilities);\n\t\t\t}\n\n\n\t\t\tcatch (MalformedURLException e) {\n\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\n\t\telse\n\t\t{\n\t\tURL chromeDriverURL = BrowserDriver.class.getResource(\"/drivers/chromedriver.exe\");\n\t\tFile file = new File(chromeDriverURL.getFile()); \n\t\tSystem.setProperty(ChromeDriverService.CHROME_DRIVER_EXE_PROPERTY, file.getAbsolutePath());\n\t\t\n\t\tChromeOptions options = new ChromeOptions();\n\t\toptions.addArguments(\"--start-maximized\");\n\t\toptions.addArguments(\"--ignore-certificate-errors\");\n\t\t\n\t\treturn new ChromeDriver(options);\n\t\t}\n\t}", "private void setChromeDriver() throws Exception {\n\t\t// boolean headless = false;\n\t\tHashMap<String, Object> chromePrefs = new HashMap<String, Object>();\n\t\tchromePrefs.put(\"profile.default_content_settings.popups\", 0);\n\t\tchromePrefs.put(\"download.default_directory\", BasePage.myTempDownloadsFolder);\n\t\tchromeOptions.setExperimentalOption(\"prefs\", chromePrefs);\n\t\t// TODO: Using \"C:\" will not work for Linux or OS X\n\t\tFile dir = new File(BasePage.myTempDownloadsFolder);\n\t\tif (!dir.exists()) {\n\t\t\tdir.mkdir();\n\t\t}\n\n\t\tchromeOptions.addArguments(\"disable-popup-blocking\");\n\t\tchromeOptions.addArguments(\"--disable-extensions\");\n\t\tchromeOptions.addArguments(\"start-maximized\");\n\n\t\t/*\n\t\t * To set headless mode for chrome. Would need to make it conditional\n\t\t * from browser parameter Does not currently work for all tests.\n\t\t */\n\t\t// chromeOptions.setHeadless(true);\n\n\t\tif (runLocation.toLowerCase().equals(\"smartbear\")) {\n\t\t\tReporter.log(\"-- SMARTBEAR: standard capabilities. Not ChromeOptions\", true);\n\t\t\tcapabilities = new DesiredCapabilities();\n\t\t} else {\n\t\t\tcapabilities = DesiredCapabilities.chrome();\n\t\t\tcapabilities.setCapability(ChromeOptions.CAPABILITY, chromeOptions);\n\t\t}\n\n\t\tWebDriver myDriver = null;\n\t\tRemoteWebDriver rcDriver;\n\n\t\tswitch (runLocation.toLowerCase()) {\n\t\tcase \"local\":\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", chromeDriverLocation);\n\t\t\tmyDriver = new ChromeDriver(chromeOptions);\n\t\t\tbreak;\n\t\tcase \"grid\":\n\t\t\trcDriver = new RemoteWebDriver(new URL(serverURL), capabilities);\n\t\t\trcDriver.setFileDetector(new LocalFileDetector());\n\t\t\tmyDriver = new Augmenter().augment(rcDriver);\n\t\t\tbreak;\n\t\tcase \"testingbot\":\n\t\t\tif (browserVersion.isEmpty()) {\n\t\t\t\tbrowserVersion = defaultChromeVersion;\n\t\t\t}\n\t\t\tif (platformOS.isEmpty()) {\n\t\t\t\tplatformOS = defaultPlatformOS;\n\t\t\t}\n\t\t\tcapabilities.setCapability(\"browserName\", browser);\n\t\t\tcapabilities.setCapability(\"version\", browserVersion);\n\t\t\tcapabilities.setCapability(\"platform\", platformOS);\n\t\t\t// capabilities.setCapability(\"name\", testName); // TODO: set a test\n\t\t\t// name (suite name maybe) or combined with env\n\t\t\trcDriver = new RemoteWebDriver(new URL(serverURL), capabilities);\n\t\t\tmyDriver = new Augmenter().augment(rcDriver);\n\t\t\tbreak;\n\t\tcase \"smartbear\":\n\t\t\tif (browserVersion.isEmpty()) {\n\t\t\t\tbrowserVersion = defaultChromeVersion;\n\t\t\t}\n\t\t\tif (platformOS.isEmpty()) {\n\t\t\t\tplatformOS = defaultPlatformOS;\n\t\t\t}\n\t\t\t \n\t\t\t//capabilities.setCapability(\"name\", testMethod.get());\n\t\t\tcapabilities.setCapability(\"build\", testProperties.getString(TEST_ENV)+\" Chrome-\"+platformOS);\n\t\t\tcapabilities.setCapability(\"max_duration\", smartBearDefaultTimeout);\n\t\t\tcapabilities.setCapability(\"browserName\", browser);\n\t\t\tcapabilities.setCapability(\"version\", browserVersion);\n\t\t\tcapabilities.setCapability(\"platform\", platformOS);\n\t\t\tcapabilities.setCapability(\"screenResolution\", smartBearScreenRes);\n\t\t\tcapabilities.setCapability(\"record_video\", \"true\"); Reporter.log(\n\t\t\t\t\t \"BROWSER: \" + browser, true); Reporter.log(\"BROWSER Version: \" +\n\t\t\t\t\t\t\t browserVersion, true); Reporter.log(\"PLATFORM: \" + platformOS, true);\n\t\t\tReporter.log(\"URL '\" + serverURL + \"'\", true); rcDriver = new\n\t\t\tRemoteWebDriver(new URL(serverURL), capabilities); myDriver = new\n\t\t\tAugmenter().augment(rcDriver);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", chromeDriverLocation);\n\t\t\tmyDriver = new ChromeDriver(chromeOptions);\n\t\t\tbreak;\n\t\t}\n\t\tdriver.set(myDriver);\n\t}", "public void getDriver() {\n\t\tWebDriverManager.chromedriver().setup();\n\t\tdriver = new ChromeDriver();\n\t}", "public static void startChromeDriver() {\r\n\t\tswitch (operatingSystem.toLowerCase().split(\" \")[0]) {\r\n\t\tcase \"windows\":\r\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"src//main//resources//drivers//chromedriver.exe\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"linux\":\r\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"src//main//resources//drivers//chromedriverLinux\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"mac\":\r\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"src//main//resources//drivers//chromedriverMac\");\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"Operating system not supported.\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "public static WebDriver getLocalChromeDriver() {\n WebDriverManager.chromedriver().setup();\n return new ChromeDriver();\n }", "public static void main(String[] args) {\n\t\tClass cls = AbsolutePath.class; // These api are coming from java framework\n\t\tClassLoader loader = cls.getClassLoader();\n\t\tURL url = loader.getResource(\"./chromedriver.exe\"); // \". \" represents current working directory \n System.out.println(url.toString()); //chromeedriver gets automatically copied from source to target\n\t}", "public WebDriver LaunchChromeBrowserReturnIt() {\n\t\ttry {\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\",\n\t\t\t\t\t\"/TestSuit/lib/chromedriver.exe\");\n\t\t\tdriver = new ChromeDriver(); // Launch chrome\n\n\t\t} catch (Exception e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn driver;\n\n\t}", "public static void main(String[] args) {\n String str = getDriver(\"chrome\");\n System.out.println(str);\n\n }", "@Override\n public RemoteWebDriver getDriver() {\n\n File chromeFile = new File(Config.getProperty(Config.CHROME_PATH));\n System.setProperty(\"webdriver.chrome.driver\", chromeFile.getAbsolutePath());\n\n ChromeDriverService service = new ChromeDriverService.Builder()\n .usingDriverExecutable(chromeFile)\n .usingAnyFreePort().build();\n Driver.chromeService.set(service);\n try {\n service.start();\n } catch (IOException e) {\n e.printStackTrace();\n }\n ChromeOptions options = new ChromeOptions();\n options.addArguments(\"--no-sandbox\");\n DesiredCapabilities capabilities = DesiredCapabilities.chrome();\n capabilities.setCapability(ChromeOptions.CAPABILITY, options);\n return new ChromeDriver(capabilities);\n }", "public static WebDriver startChrome() {\n\t\treturn new ChromeDriver();\n\t}", "public static void main(String[] args) {\n\t\tString current = System.getProperty(\"user.dir\");\n\t\tSystem.out.println(current);\n\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", current + \"\\\\Lib\\\\chromedriver.exe\");\n\n\t\tWebDriver driver = new ChromeDriver(); //open browser\n\t\tdriver.get(\"https://www.google.com\"); //open URL\n\t\ttry {\n\t\t\tThread.sleep(5000); //wait for 5 second\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tdriver.close(); //close browser \n\t}", "public static void setSystemPropertyChromeWebDriverOriginal() {\n\t\tString fullPath = getFullPathToSrcTestResourceFolder();\n\t\t\n\t\tString os = getOperationalSystemName();\n\t\t\n\t\tString chromeDriver = CHROME_DRIVER_WINDOWS;\n\t\tif ( os.equals(OS_MAC_OS_X) ) {\n\t\t\tchromeDriver = CHROME_DRIVER_MAC;\n\t\t}\n\t\t\n\t\tSystem.setProperty(\n\t\t\tWEBDRIVER_CHROME_DRIVER, \n\t\t\tfullPath + chromeDriver);\n\t}", "@ BeforeTest \n\tpublic void Amazon() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",System.getProperty(\"user.dir\")+\"\\\\resources\\\\chromedriver.exe\"); // to make the path portable create folder reources and put the element to it \n\t\tdriver = new ChromeDriver();\n\t\tdriver.get(\"https://www.amazon.com/\");\n\t\tSystem.out.println(driver.getCurrentUrl());\t\n\t\tdriver.manage().window().maximize();\n\n}", "private WebDriver createChromeDriver() {\n\t\tsetDriverPropertyIfRequired(\"webdriver.chrome.driver\", \"chromedriver.exe\");\n\n\t\tChromeOptions options = new ChromeOptions();\n\t\toptions.addArguments(\"disable-plugins\");\n\t\toptions.addArguments(\"disable-extensions\");\n\t\toptions.addArguments(\"test-type\");\n\n\t\t\n\t\t_driver = new ChromeDriver(options);\n\t\treturn _driver;\n\t}", "@BeforeTest\r\n\tpublic void launch()\r\n\t{\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Yogini\\\\chromedriver\\\\chromedriver.exe\"); //location of browser in local drive\r\n\t\tWebDriver driver = new ChromeDriver(); \r\n\t\tdriver.get(tobj.url);\r\n\t\tSystem.out.println(\"Before test, browser is launched\");\r\n\t}", "@Before\n public void Setup() { //this is done before every test, chrome driver is saved in a specific location\n\n System.setProperty(\"webdriver.chrome.driver\",\n Constant.CROMEDRIVER);\n\n driver = new ChromeDriver();\n }", "public ChromeDriver build()\n\t{\n\t\ttry\n\t\t{\n\t\t\tDesiredCapabilities capabilities = DesiredCapabilities.chrome();\n\t\t\tURL url = ClassLoader.getSystemResource( metadata.getBinary() );\n\t\t\tSystem.setProperty( \"webdriver.chrome.driver\", new File( url.toURI() ).getAbsolutePath() );\n\t\t\tChromeOptions co = new ChromeOptions();\n\t\t\t//Map<String, Object> preferences = Maps.newHashMap();\n\t\t\t//preferences.put( \"browser.startup.homepage\", configuration.baseUrl().toString() );\n\t\t\t//preferences.put( \"browser.startup.page\", START_WITH_HOME_PAGE );\n\t\t\t//capabilities.setCapability( ChromeOptions.CAPABILITY, preferences );\n\t\t\tChromeDriver driver = new ChromeDriver( capabilities );\n\t\t\tdriver.get( configuration.baseUrl().toString() );\n\t\t\treturn driver;\n\t\t}\n\t\tcatch ( Exception e )\n\t\t{\n\t\t\tlogger.error( e.getMessage() );\n\t\t\tthrow new WebDriverException( e );\n\t\t}\n\t}", "@Test\r\n\tpublic void f()\r\n\t{\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"C://Data_Program//Selenium_Dependencies//chromedriver.exe\");\r\n\t\tWebDriver driver=new ChromeDriver();\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.get(\"http://www.google.com\");\r\n\t}", "public void chromeLaunch() {\n\t\tSystem.setProperty(key, value);\n\t\ts=new ChromeDriver();\n\t\ts.manage().window().maximize();\n\t\ts.navigate().to(url);\n\t}", "public GAfterSearch(WebDriver chromeDriver) {\n super.chromeDriver = chromeDriver;\n }", "public static WebDriver init_driver_crome(String browser) {\n\t\t\tif(browser.equals(\"chrome\")) {\n\t\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"G:\\\\software\\\\chromedriver_win32\\\\chromedriver.exe\");\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Browser is initialised\" +browser);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Browser is not initialised\" +browser);\n\t\t\t}\n\t\t\treturn getDriverChrome();\n\t\t}", "@BeforeMethod\n\tpublic void registerChromeDriver() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\n\t\t\t\t\"/Users/shwetasharma/Documents/softwares/chromedriver\");\n\t\tdriver = new ChromeDriver();\n\t\tutil = new Utils(driver);\n\t\t// Put a Implicit wait, this means that any search for elements on the\n\t\t// page\n\t\t// could take the time the implicit wait is set for before throwing\n\t\t// exception\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\n\t\t// Launch the Applitools hackathon Website\n\t\tdriver.get(\"https://demo.applitools.com/hackathon.html\");\n\t\tdriver.manage().window().maximize();\n\n\t}", "private void setDriverPathForBrowser(String browserName) {\n \t\n \tif ( !binariesPath.exists() ) throw new IllegalStateException(\"No path at \" + binariesPath.getAbsolutePath() );\n \t\n switch (browserName.toLowerCase()) {\n case \"firefox\":\n {\n if (isMac())\n {\n System.setProperty(\"webdriver.gecko.driver\", new File(binariesPath,\"/MAC/geckodriver-v0.19.0-macos.tar.gz/geckodriver-v0.19.0-macos.tar\").getAbsolutePath());\n }\n else if (isLinux())\n {\n System.setProperty(\"webdriver.gecko.driver\", new File(binariesPath, \"/Ubuntu/geckodriver\").getAbsolutePath());\n }\n else\n {\n System.setProperty(\"webdriver.gecko.driver\", new File(binariesPath, \"/Windows/geckodriver.exe\").getAbsolutePath());\n }\n break;\n }\n case \"chrome\": {\n if (isMac()) {\n System.setProperty(\"webdriver.chrome.driver\", new File(binariesPath, \"/MAC/chromedriver\").getAbsolutePath());\n } else if (isLinux()) {\n System.setProperty(\"webdriver.chrome.driver\",new File(binariesPath, \"/Ubuntu/chromedriver\").getAbsolutePath());\n } else {\n System.setProperty(\"webdriver.chrome.driver\",new File(binariesPath,\"/Windows/chromedriver.exe\").getAbsolutePath());\n }\n break;\n }\n case \"ie\":\n System.setProperty(\"webdriver.ie.driver\", new File(binariesPath,\"/Windows/IEDriverServer.exe\").getAbsolutePath());\n }\n }", "private String getBinaryPath() {\n return System.getProperty(SeLionConstants.WEBDRIVER_GECKO_DRIVER_PROPERTY,\n Config.getConfigProperty(ConfigProperty.SELENIUM_GECKODRIVER_PATH));\n }", "public GoogleAutomation() {\n\t\t\n\t\t//The setProperty() method of Java system class sets the property of the system which is indicated by a key.\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"driver//chromedriver.exe\");\n\t\t\n\t\t//initilize webDriver \n\t\twebDriver = new ChromeDriver();\n\t}", "public static WebDriver getChromeWebDriver(String webDriverHomePath, String baseUrl) {\n\t\tSystem.setProperty(CHROME_WEB_DRIVER_NAME, webDriverHomePath);\n\t\tWebDriver driver = new ChromeDriver();\n\t\tdriver.get(baseUrl);\n\t\tdriver.manage().window().maximize();\n\t\treturn driver;\n\t}", "@BeforeTest\n public void setup() {\n System.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Users\\\\User\\\\IdeaProjects\\\\LoginToJira\\\\chromedriver.exe\");\n // Create a new instance of the Chrome driver\n this.driver = new ChromeDriver();\n }", "@BeforeMethod(alwaysRun = true)\n public void browserSetup(){\n driver = new ChromeDriver();\n }", "public static void main(String[] args) {\n\t\tWebDriver driver=new ChromeDriver();\r\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.get(\"file:///E:/Qspiders/Notes/Selenium%20notes/Upload.html\");\r\n\t\tString rpath = \"./TestData/URL.txt\";\r\n\t\tSystem.out.println(\"relative path: \"+rpath);\r\n\t\tFile f=new File(rpath);\r\n\t\tString apath = f.getAbsolutePath();\r\n\t\tSystem.out.println(\"absolute path: \"+apath);\r\n\t\tdriver.findElement(By.id(\"1\")).sendKeys(apath);\r\n\r\n\t}", "public static WebDriver startBrowser() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"./driver/chromedriver.exe\");\n\t\t\n\t\t// Create ChromeDriver object, launch Chrome browser\n\t\t WebDriver driver = new ChromeDriver();\n\t\t \n\t\t// Create ChromeDriver object, launch Chrome browser\n\t\tdriver.get(\"http://techfios.com/test/107/\");\n\t\treturn driver;\n\t}", "@Given(\"I set up my Chrome Driver\")\n\tpublic void i_am_on_Magalu_HomePage() {\n\t\tChromeOptions options = new ChromeOptions();\n\t\toptions.addArguments(\"--start-maximized\");\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:/Users/gocruz/eclipse-workspace/portal.compras/chromedriver.exe\");\n\t\tdriver = new ChromeDriver(options);\n\n\t}", "public WebDriver getWebDriver() {\n\t\tString driverName = getProperty(\"driver\");\n\t\tif (driverName.equals(\"firefox\")) {\n\t\t\tdriver = new FirefoxDriver();\n\t\t} else if (driverName.equals(\"chrome\")) {\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"src\\\\main\\\\resources\\\\binaries\\\\chromedriver.exe\");\n\t\t\tdriver = new ChromeDriver();\n\t\t} \n\t\treturn driver;\n\t}", "@BeforeTest\r\n public void launchBrowser() {\n System.setProperty(\"webdriver.chrome.driver\", ChromePath);\r\n driver= new ChromeDriver();\r\n driver.manage().window().maximize();\r\n driver.get(titulo);\r\n }", "@Before\n public void setWebDriver() throws IOException {\n System.setProperty(\"webdriver.chrome.driver\", DRIVER_PATH);\n ChromeOptions chromeOptions = new ChromeOptions();\n chromeOptions.addArguments(\"start-maximized\");\n driver = new ChromeDriver(chromeOptions);\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tWebDriverManager.chromedriver().setup();\r\n\t\t\r\n\t\tWebDriver driver =new ChromeDriver();\r\n\t\t\r\n\t\t\r\n\r\n\t}", "public WebDriver initializeDriver() {\n System.setProperty(\"webdriver.chrome.driver\", projectPath + \"//src//main//resources//chromedriver\");\n driver = new ChromeDriver();\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n driver.manage().window().maximize();\n return driver;\n }", "public void setup(){\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"//Users//bpat12//Downloads//chromedriver\");\n\t\tdriver = new ChromeDriver();\n\t\tSystem.out.println(\"launch browser\");\n\t\tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\n\t\tdriver.get(url);\n\t}", "@Given(\"^launch an chrome browser$\")\r\n\tpublic void launch_an_chrome_browser() throws Throwable {\n\t sign.url();\r\n\t\t\r\n\t}", "private void setLocalWebdriver() {\n\n DesiredCapabilities capabilities = new DesiredCapabilities();\n capabilities.setJavascriptEnabled(true);\n capabilities.setCapability(\"handlesAlerts\", true);\n switch (getBrowserId(browser)) {\n case 0:\n capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,\n Boolean.valueOf(System.getProperty(\"IGNORE_SECURITY_DOMAINS\", \"false\")));\n driver.set(new InternetExplorerDriver(capabilities));\n break;\n case 1:\n driver.set(new FirefoxDriver(capabilities));\n break;\n case 2:\n driver.set(new SafariDriver(capabilities));\n break;\n case 3:\n driver.set(new ChromeDriver(capabilities));\n break;\n default:\n throw new WebDriverException(\"Browser not found: \" + browser);\n }\n }", "@BeforeTest // which will be executed first before all the test methods\n@Parameters(\"browser\") //@Parameter is used to pass the values(during run time) to the test methods as arguments using .xml file\npublic void setup(String browser) throws Exception{\n \n//Check if parameter passed as 'chrome'\nif (browser.equalsIgnoreCase(\"chrome\")){\n//set path to chromedriver.exe\nSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\\\\\\\\\\\\\Users\\\\\\\\\\\\\\\\mouleeswaranb\\\\\\\\\\\\\\\\eclipse-workspace_Selenium learning_6127\\\\\\\\\\\\\\\\SeleniumProject\\\\\\\\\\\\\\\\drivers\\\\\\\\\\\\\\\\chromedriver.exe\");\ndriver = new ChromeDriver(); \n}\n\nelse{\n//If no browser passed throw exception\nthrow new Exception(\"Browser is not correct\");\n}\ndriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n}", "public static void main(String[] args) throws MalformedURLException {\n\t\t\n\t\tDesiredCapabilities objRc=new DesiredCapabilities();\n\t\tobjRc.setBrowserName(\"chrome\");\n\t\tobjRc.setPlatform(Platform.WINDOWS);\n\t\tWebDriver driver=new RemoteWebDriver(new URL(\"http://localhost:4546/wd/hub\"),objRc);\n\t}", "public static ChromeDriver intiChrome() throws Exception {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"D:/ChromeServer/chromedriver.exe\");\n\t\t// WebDriver driver = new ChromeDriver();\n\t\tChromeOptions chromeOptions = new ChromeOptions();\n\t\t// 设置为 headless 模式 (必须)\n\t\t// chromeOptions.addArguments(\"--headless\");\n\t\t// 设置浏览器窗口打开大小 (非必须)\n\t\t// chromeOptions.addArguments(\"--window-size=1980,1068\");\n\t\tChromeDriver driver = new ChromeDriver(chromeOptions);\n\t\treturn driver;\n\t}", "public static void main(String[] args) {\n\t\t System.setProperty(\"webdriver.chrome.driver\", \"D:/workspace/chromedriver\");\r\n\t\t //System.setProperty(\"webdriver.chrome.driver\", ...);\r\n\t\t \r\n\t\t System.setProperty(\"selenide.browser\", \"Chrome\");\r\n\t\t Configuration.browser=\"chrome\";\r\n\t\t open(\"http://google.com\");\r\n\t\t //$(By.id(\"registerLink\")).pressEnter();\r\n\t\t }", "@Before\n public synchronized static WebDriver openBrowser() {\n String browser = System.getProperty(\"BROWSER\");\n\n\n if (driver == null) {\n try {\n //Kiem tra BROWSER = null -> gan = chrome\n if (browser == null) {\n browser = System.getenv(\"BROWSER\");\n if (browser == null) {\n browser = \"chrome\";\n }\n }\n switch (browser) {\n case \"chrome\":\n WebDriverManager.chromedriver().setup();\n driver = new ChromeDriver();\n break;\n case \"firefox\":\n WebDriverManager.firefoxdriver().setup();\n driver = new FirefoxDriver();\n break;\n case \"chrome_headless\":\n WebDriverManager.chromedriver().setup();\n ChromeOptions options = new ChromeOptions();\n options.addArguments(\"headless\");\n options.addArguments(\"window-size=1366x768\");\n driver = new ChromeDriver(options);\n break;\n default:\n WebDriverManager.chromedriver().setup();\n driver = new ChromeDriver();\n break;\n }\n } catch (UnreachableBrowserException e) {\n driver = new ChromeDriver();\n } catch (WebDriverException e) {\n driver = new ChromeDriver();\n } finally {\n Runtime.getRuntime().addShutdownHook(new Thread(new BrowserCleanup()));\n }\n driver.get(\"http://demo.guru99.com/v4/\");\n driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n driver.manage().window().maximize();\n log.info(\"----------- START BRWOSER -----------\");\n\n }\n return driver;\n }", "@Before\r\n\tpublic void OpenChrome() {\n\t\tconfig = new ConfigReader();\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",config.getChromePath());\r\n\t\tdriver = new ChromeDriver();\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.manage().deleteAllCookies();\r\n\t\texPages = new ExpediaPages(driver);\r\n\t}", "private void setWebdriver() throws Exception {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\n\t\t\t\tcurrentDir + fileSeparator + \"lib\" + fileSeparator + \"chromedriver.exe\");\n\t\tcapability = DesiredCapabilities.chrome();\n\t\tChromeOptions options = new ChromeOptions();\n\t\toptions.addArguments(\"--disable-extensions\");\n\t\toptions.addArguments(\"disable-infobars\");\n\t\tcapability.setCapability(ChromeOptions.CAPABILITY, options);\n\t\tdriver = new ChromeDriver(capability);\n\t\tdriver.manage().deleteAllCookies();\n\t\t_eventFiringDriver = new EventFiringWebDriver(driver);\n\t\t_eventFiringDriver.get(getUrl());\n\t\t_eventFiringDriver.manage().window().maximize();\n\n\t}", "static String getBrowserPath()\n \t{\n \t\tint os = PropertiesAndDirectories.os();\n \t\tString result = browserPath;\n \t\tif (result == null)\n \t\t{\n \t\t\tswitch (os)\n \t\t\t{\n \t\t\tcase PropertiesAndDirectories.XP:\n \t\t\tcase PropertiesAndDirectories.VISTA_AND_7:\n \t\t\t\tif (!Pref.lookupBoolean(\"navigate_with_ie\"))\n \t\t\t\t\tresult = FIREFOX_PATH_WINDOWS;\n \t\t\t\tif (result != null)\n \t\t\t\t{\n \t\t\t\t\tFile existentialTester = new File(result);\n \t\t\t\t\tif (!existentialTester.exists())\n \t\t\t\t\t{\n \t\t\t\t\t\tresult = FIREFOX_PATH_WINDOWS_64;\n \t\t\t\t\t\texistentialTester = new File(result);\n \t\t\t\t\t\tif (!existentialTester.exists())\n \t\t\t\t\t\t{\n \t\t\t\t\t\t\tresult = IE_PATH_WINDOWS;\n \t\t\t\t\t\t\texistentialTester = new File(result);\n \t\t\t\t\t\t\tif (!existentialTester.exists())\n \t\t\t\t\t\t\t\tresult = null;\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tbreak;\n \t\t\tcase PropertiesAndDirectories.MAC:\n \t\t\t\tresult = \"/usr/bin/open\";\n \t\t\t\tbreak;\n \t\t\tdefault:\n \t\t\t\terror(PropertiesAndDirectories.getOsName(), \"go(ParsedURL) not supported\");\n \t\t\t\tbreak;\n \t\t\t}\n \t\t\tif (result != null)\n \t\t\t{\n \t\t\t\tbrowserPath = result;\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t}", "@Override\r\n\tpublic void buildDriver() throws DriverException\r\n\t{\r\n\t\tif(ConfigUtil.isLocalEnv())\r\n\t\t{\r\n\t\t\t// if it is a Selenium tool, then create selenium ChromeDriver\r\n\t\t\tif(ConfigUtil.isSelenium()){\r\n\t\t\t\t\r\n\t\t\t\tFile chromeDriverFile=getChromeDriverFile();\r\n\t\t\t\tSystem.out.println(\" Found Driver file\");\r\n\t\t\t\tdriver =SeleniumDriver.buildChromeDriver(chromeDriverFile);\r\n\t\t\t\t //new org.openqa.selenium.chrome.ChromeDriver();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\telse if(ConfigUtil.isRemoteEnv())\r\n\t\t{\r\n\t\t\tif(ConfigUtil.isSelenium()){\r\n\t\t\t\tcapabilities = DesiredCapabilities.chrome();\t\r\n\t\t\t\tdriver = SeleniumDriver.buildRemoteDriver(capabilities);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\telse if(ConfigUtil.isBrowserStackEnv())\r\n\t\t{\r\n\t\t\tcapabilities = DesiredCapabilities.chrome();\r\n\t\t\tbuildBrowserstackCapabilities();\r\n\r\n\t\t}\r\n\r\n\t}", "private void initDriver(){\r\n String browserToBeUsed = (String) jsonConfig.get(\"browserToBeUsed\");\r\n switch (browserToBeUsed) {\r\n case \"FF\":\r\n System.setProperty(\"webdriver.gecko.driver\", (String) jsonConfig.get(\"fireFoxDriverPath\"));\r\n FirefoxProfile ffProfile = new FirefoxProfile();\r\n // ffProfile.setPreference(\"javascript.enabled\", false);\r\n ffProfile.setPreference(\"intl.accept_languages\", \"en-GB\");\r\n\r\n FirefoxOptions ffOptions = new FirefoxOptions();\r\n ffOptions.setProfile(ffProfile);\r\n driver = new FirefoxDriver(ffOptions);\r\n break;\r\n case \"CH\":\r\n String driverPath = (String) jsonConfig.get(\"chromeDriverPath\");\r\n System.setProperty(\"webdriver.chrome.driver\", driverPath);\r\n\r\n Map<String, Object> prefs = new HashMap<String, Object>();\r\n prefs.put(\"profile.default_content_setting_values.notifications\", 2);\r\n\r\n ChromeOptions options = new ChromeOptions();\r\n options.setExperimentalOption(\"prefs\", prefs);\r\n options.addArguments(\"--lang=en-GB\");\r\n driver = new ChromeDriver(options);\r\n break;\r\n case \"IE\":\r\n System.setProperty(\"webdriver.ie.driver\", (String) jsonConfig.get(\"ieDriverPath\"));\r\n\r\n InternetExplorerOptions ieOptions = new InternetExplorerOptions();\r\n ieOptions.disableNativeEvents();\r\n ieOptions.requireWindowFocus();\r\n ieOptions.introduceFlakinessByIgnoringSecurityDomains();\r\n driver = new InternetExplorerDriver(ieOptions);\r\n }\r\n\r\n driver.manage().window().maximize();\r\n }", "public void openBrowser() {\n ResourceBundle config = ResourceBundle.getBundle(\"config\");\n\n config.getString(\"browser\").equalsIgnoreCase(\"Chrome\");\n System.setProperty(\"webdriver.chrome.driver\", \"src/Drivers/chromedriver_76.0.exe\");\n driver = new ChromeDriver();\n\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n// driver.get(config.getString(\"URL\"));\n driver.manage().window().maximize();\n }", "@BeforeSuite\r\n\tpublic void before_suite() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"G:\\\\chromedriver.exe\");\r\n\t}", "@Given(\"^Open URL in chrome browser$\")\r\n\tpublic void open_URL_in_chrome_browser() {\n\t nop.Launch(\"chrome\", \"http://automationpractice.com/index.php\");\r\n\t}", "public static WebDriver getDriver(){\n if(driver==null){\n //get the driver type from properties file\n\n String browser=ConfigurationReader.getPropery(\"browser\");\n switch(browser) {\n case \"chrome\":\n WebDriverManager.chromedriver().setup();\n driver=new ChromeDriver();\n break;\n case \"firefox\":\n WebDriverManager.firefoxdriver().setup();\n driver=new FirefoxDriver();\n }\n }\n\n return driver;\n }", "public static void main(String[] args) {\n\t\r\n\t PropertyFetcher prop = new PropertyFetcher();\r\n\t \r\n\t \r\n\t \r\n\t \r\nWebDriver driver=new ChromeDriver(); \r\nSystem.setProperty(\"webdriver.chrome.driver\", \"C:/Users/Kumarshobhitsoni/workspace/SeleniumPractice/chromedriver.exe\");\r\n//System.out.println(prop.getProperty(\"URL\"));\r\ndriver.get(prop.fetchProp(\"URL\"));\r\n\r\n//System.out.println(\"Hiii\");\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"./driver/chromedriver.exe\");\n\t\tWebDriver d=new ChromeDriver();\n\t\td.get(\"file:///C:/Users/SYED%20HASSAN/Desktop/selinium%202%20se/p1.html\");\n\t\tString title = d.getTitle();\n\t\tSystem.out.println(\"title = \"+title);\n\t\tString window = d.getWindowHandle();\n System.out.println(\"windowhandle\"+window);\n String c = d.getCurrentUrl();\n System.out.println(\"currenturl\"+c);\n d.close();\n System.out.println();\n\t}", "@Test\n public void f() {\n\t \n\t System.setProperty(\"webdriver.chrome.driver\", getClass().getResource(\"/chromedriver.exe\").getPath());\n\t System.out.println(\"ssss:\"+getClass().getResource(\"/chromedriver.exe\"));\n\t WebDriver dr = new ChromeDriver();\n\t dr.get(\"http://www.baidu.com\");\n\t \n\t App.printhello();\n\t System.out.println(\"aaaaaaaaaa\");\n\t try {\n\t\tThread.sleep(3000);\n\t} catch (InterruptedException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t dr.close();\n }", "private void initChromeDriver(String appUrl) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"Drivers\\\\chromedriver.exe\");\n\t\tdriver = new ChromeDriver();\n\t\tdriver.get(appUrl);\n\t\tdriver.manage().window().maximize();\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t}", "@BeforeClass\n\t public void beforeClass() {\n\t System.setProperty(\"webdriver.chrome.driver\", \"F:\\\\Git\\\\GIT_Repositories\\\\Selenium_Project\\\\Drivers\\\\chromedriver.exe\");\n\t driver = new ChromeDriver();\n\t \n\t \n\t }", "@Test\n public void test() throws MalformedURLException {\n System.setProperty(\"webdriver.chrome.driver\",System.getProperty(\"user.dir\")+\"\\\\drivers\\\\chromedriver.exe\"); \n WebDriver driver=new ChromeDriver();\n // WebDriver driver=new RemoteWebDriver(url,cap);\n driver.manage().window().maximize(); \n driver.get(\"https://curiedoctorapp.firebaseapp.com\");\n System.out.println(\"The title is\"+ driver.getTitle());\n driver.quit();\n \n }", "protected WebDriver getDriver() {\n return Web.getDriver(Browser.CHROME, server.getURL() + \"TEST\", By.className(\"AuO\"));\n }", "public static WebDriver initializeChromeDriver() throws Exception {\n\n\t\tFile file = null;\n\t\tChromeDriverService chromeService = null;\n\t\tString os = System.getProperty(\"os.name\").toLowerCase();\n\n\t\tif (os.contains(\"win\")){\n\t\t\t//Operating system is based on Windows\n\t\t\tfile = new File(Constants.CHROMEDRIVER_EXE);\n\n\t\t\tif (!file.exists()) {\n\t\t\t\tthrow new Exception(\"Erro ao localizar o driver\");\n\t\t\t}\n\t\t\tchromeService = new ChromeDriverService.Builder()\n\t\t\t\t\t.usingDriverExecutable(new File(Constants.CHROMEDRIVER_EXE))\n\t\t\t\t\t.usingAnyFreePort().build();\n\n\t\t} else if (os.contains(\"x\") || os.contains(\"mac\") || os.contains(\"osx\")){\n\t\t\t//Operating system is Apple OSX based\n\t\t\tfile = new File(Constants.CHROMEDRIVER_MAC);\n\n\t\t\tif (!file.exists()) {\n\t\t\t\tthrow new Exception(\"Erro ao localizar o driver\");\n\t\t\t}\n\t\t\tchromeService = new ChromeDriverService.Builder()\n\t\t\t\t\t.usingDriverExecutable(new File(Constants.CHROMEDRIVER_MAC))\n\t\t\t\t\t.usingAnyFreePort().build();\n\n\t\t} else if (os.contains(\"nix\") || os.contains(\"aix\") || os.contains(\"nux\")){\n\t\t\t//Operating system is based on Linux/Unix/*AIX\n\t\t\tfile = new File(Constants.CHROMEDRIVER_LINUX);\n\n\t\t\tif (!file.exists()) {\n\t\t\t\tthrow new Exception(\"Erro ao localizar o driver\");\n\t\t\t}\n\t\t\tchromeService = new ChromeDriverService.Builder()\n\t\t\t\t\t.usingDriverExecutable(new File(Constants.CHROMEDRIVER_LINUX))\n\t\t\t\t\t.usingAnyFreePort().build();\n\t\t}\n\n\t\tchromeService.start();\n\n\t\tDesiredCapabilities capabilities = DesiredCapabilities.chrome();\n\t\tcapabilities.setCapability(InternetExplorerDriver.INITIAL_BROWSER_URL, \"about:blank\");\n\n\t\tRemoteWebDriver driver = new RemoteWebDriver(chromeService.getUrl(), capabilities);\n\n\t\tdriver.manage().window().maximize();\n\t\tdriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n\n\t\treturn driver;\n\t}", "@BeforeTest\r\n\tpublic void beforeTest() throws MalformedURLException {\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Users\\\\PDC2B-Training.pdc2b\\\\Downloads\\\\Selenium Drivers\\\\BrowserDriver\\\\chromedriver_win32\\\\chromedriver.exe\");\r\n\t\tdriver = new ChromeDriver();\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.manage().timeouts().implicitlyWait(5000, TimeUnit.SECONDS);\r\n\t}", "public static WebDriver setUp() {\n\t\n \t\n \tSystem.setProperty(\"webdriver.chrome.driver\", \"drivers\\\\chromedriver.exe\"); //if it doesn't work we can check with user.dir...\n \tdriver = new ChromeDriver(); //launch the Browser it opens empty page\n \tdriver.manage().window().maximize();\n \tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS); //to wait globally\n \tdriver.get(\"http://166.62.36.207/humanresources/symfony/web/index.php/auth/login\");\n \t \n \treturn driver; //return object of the driver \t\n}", "public static void main(String[] args) \r\n\t{\n\t\tString path=\"browser_drivers\\\\chromedriver.exe\";\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", path);\r\n\t\tWebDriver driver=new ChromeDriver(); //Launch browser\r\n\t\tdriver.get(\"http://seleniumhq.org\"); //Load webpage\r\n\t\tdriver.manage().window().maximize(); //maximize browser window\r\n\t\t\r\n\t\t\r\n\t\tString Exp_url=\"https://www.seleniumhq.org/\";\r\n\t\t\r\n\t\t//Capture runtime url\r\n\t\tString Runtime_url=driver.getCurrentUrl();\r\n\t\t\t\t\r\n\t\tif(Runtime_url.equals(Exp_url))\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Expected url presented for selenium homepage\");\r\n\t\t\t\r\n\t\t\tWebElement Download_tab=driver.findElement(By.xpath(\"//a[@title='Get Selenium']\"));\r\n\t\t\tDownload_tab.click();\r\n\t\t\t\r\n\t\t\tif(driver.getCurrentUrl().contains(\"download/\"))\r\n\t\t\t\tSystem.out.println(\"expected url presented, Downlaod page verified\");\r\n\t\t\telse\r\n\t\t\t\tSystem.out.println(\"expected url not presented, download page not verified\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Wrong url presnted for selenium hompage\");\r\n\t\t}\r\n\t\r\n\t}", "public static void browseSetUp(String browserDriver, String driverPath, String url) {\n\n // connect and open browser\n System.setProperty(browserDriver, driverPath);\n System.setProperty(browserDriver, driverPath);\n driver.manage().window().maximize();\n driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\n driver.get(url);\n driver.navigate().to(url);\n }", "public static WebDriver getDriver(String browsername)\n\t{\n\t\t\n\t\tWebDriver dri;\n\t\t\n\t\t\n\t\tif(browsername.equalsIgnoreCase(\"chrome\")) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\Chrome_Driver\\\\chromedriver.exe\"); \n\t\tdri = new ChromeDriver();\n\t\t}\n\t\t\n\t\telse{\n\t\t\t\n\t\t\tSystem.setProperty(\"webdriver.edge.driver\",\"C:\\\\Edge_Driver\\\\msedgedriver.exe\"); \n\t\t\tdri = new ChromeDriver(); //replace else if loop with switch\n\t\t\t\n\t\t}\n\t\t\n//\t\telse{\n//\t\t\t\n//\t\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\Chrome_Driver\\\\chromedriver.exe\"); \n//\t\t\tdri = new ChromeDriver();\n//\t\t\t\n//\t\t}\n\t\t\n\t\treturn dri;\n\t\t\n\t}", "public void initiateBrowser(String browser) {\n\t\tString os = System.getProperty(\"os.name\").toLowerCase();\n\t\tString current_dir = System.getProperty(\"user.dir\");\n\t\tSystem.out.println(os);\n\t\tSystem.out.println(current_dir);\n\t\tswitch (browser) {\n\t\tcase \"ie\":\n\t\t\tSystem.setProperty(\"webdriver.ie.driver\", current_dir + \"/drivers/IEDriverServer.exe\");\n\t\t\tdriver = new InternetExplorerDriver();\n\t\t\tbreak;\n\t\tcase \"chrome\":\n\t\t\tChromeOptions options = new ChromeOptions();\n\t\t\tif (os.contains(\"linux\")) {\n\t\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", current_dir + \"/drivers/linuxdrivers/chromedriver\");\n\t\t\t\tDesiredCapabilities caps = DesiredCapabilities.chrome();\n\t\t\t\tLoggingPreferences logPrefs = new LoggingPreferences();\n\t\t\t\tlogPrefs.enable(LogType.BROWSER, Level.ALL);\n\t\t\t\tcaps.setCapability(CapabilityType.LOGGING_PREFS, logPrefs);\n\n\t\t\t\toptions.setBinary(\"/usr/bin/google-chrome\");\n\t\t\t\toptions.addArguments(\"--headless\");\n\t\t\t} else if (os.contains(\"windows\")) {\n\t\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", current_dir + \"/drivers/chromedriver.exe\");\n\t\t\t\tDesiredCapabilities caps = DesiredCapabilities.chrome();\n\t\t\t\tLoggingPreferences logPrefs = new LoggingPreferences();\n\t\t\t\tlogPrefs.enable(LogType.BROWSER, Level.ALL);\n\t\t\t\tcaps.setCapability(CapabilityType.LOGGING_PREFS, logPrefs);\n\t\t\t}\n\t\t\toptions.addArguments(\"test-type\");\n\t\t\toptions.addArguments(\"disable-popup-blocking\");\n\t\t\tdriver = new ChromeDriver(options);\n\n\t\t\tdriver.manage().window().maximize();\n\t\t\tbreak;\n\t\tcase \"firefox\":\n\t\t\tdriver = new FirefoxDriver();\n\t\t\tbreak;\n\t\t}\n\t\tdriver.manage().window().maximize();\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\n\t}", "@BeforeClass\r\n public void beforeClass() {\n \tSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\Users\\\\Tuan\\\\Downloads\\\\chromedriver.exe\");\r\n \tdriver = new ChromeDriver();\r\n \tdriver.get(\"http://daominhdam.890m.com/\");\r\n\t}", "@BeforeClass\n @Parameters({ \"browser\", \"url\" })\n public void startDriver(@Optional(\"chrome\") String WindowBrowser, @Optional(\"http://computer-database.herokuapp.com/computers\") String URL) {\n\n final String os = System.getProperty(\"os.name\");\n userDirectory = System.getProperty(\"user.dir\");\n Log.info(\"Starting to intialise driver\");\n Log.info(\"OS environment: \" + os);\n Log.info(\"Browser: \" + WindowBrowser);\n if (WindowBrowser.equalsIgnoreCase(BROWSERS.FIREFOX.getBrowserName())) {\n final StringBuilder geckoDriverPath = new StringBuilder();\n geckoDriverPath.append(userDirectory + File.separator + \"src\" + File.separator + \"test\" + File.separator + \"resources\");\n if (os.contains(OS.MAC.getOsName())) {\n geckoDriverPath.append(File.separator + \"mac\" + File.separator + \"geckodriver\");\n } else if (os.contains(OS.WIN.getOsName())) {\n geckoDriverPath.append(File.separator + \"win\" + File.separator + \"geckodriver.exe\");\n }\n System.setProperty(\"webdriver.gecko.driver\", geckoDriverPath.toString());\n driver = new FirefoxDriver();\n } else if (WindowBrowser.equalsIgnoreCase(BROWSERS.CHROME.getBrowserName())) {\n final StringBuilder chromeDriverPath = new StringBuilder();\n System.out.println(userDirectory);\n chromeDriverPath.append(userDirectory + File.separator + \"src\" + File.separator + \"test\" + File.separator + \"resources\");\n if (os.contains(OS.MAC.getOsName())) {\n chromeDriverPath.append(File.separator + \"mac\" + File.separator + \"chromedriver\");\n } else if (os.contains(OS.WIN.getOsName())) {\n chromeDriverPath.append(File.separator + \"win\" + File.separator + \"chromedriver.exe\");\n }\n System.setProperty(\"webdriver.chrome.driver\", chromeDriverPath.toString());\n driver = new ChromeDriver();\n } else if (WindowBrowser.equalsIgnoreCase(BROWSERS.SAFARI.getBrowserName())) {\n driver = new SafariDriver();\n }\n driver.manage().window().setSize(new Dimension(1440, 844));\n driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n BaseURl = URL;\n Log.info(\"Driver initialised successfully\");\n driver.get(BaseURl);\n Log.info(\"Opening URl: \" + URL);\n }", "@Test \n public void executSessionThree(){\n System.out.println(\"open the browser: chrome III\");\n final String CHROME_DRIVER_DIRECTORY = System.getProperty(\"user.dir\") + \"/src/test/java/BrowserDrivers/chromedriver.exe\";\n System.setProperty(\"webdriver.chrome.driver\", CHROME_DRIVER_DIRECTORY);\n final WebDriver driver = new ChromeDriver();\n //Goto guru99 site\n driver.get(\"http://demo.guru99.com/V4/\");\n //find user name text box and fill it\n driver.quit();\n }", "@Given(\"^Initialize the browser with Chrome$\")\r\n\tpublic void initialize_the_browser_with_Chrome() throws Throwable {\n\t\tdriver = DriverManager.getDriverInstance(\"chrome\", 20);\r\n\t\tSystem.out.println(\"Launched Chrome\");\r\n\t}", "public static void main(String[] args) {\n WebDriverManager.chromedriver().setup();\n\n // create object for using selenium driver;\n WebDriver driver=new ChromeDriver();\n\n //open browser\n driver.get(\"http://amazon.com\");// bumu exlaydu\n //driver.get(\"http://google.com\");\n // open website\n System.out.println(driver.getTitle());\n\n\n\n\n }", "public void Open_Browser() \r\n\t{\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"drivers\\\\chromedriver.exe\");\r\n\t\t//Brower initiation\r\n\t\tdriver=new ChromeDriver();\r\n\t\t//maximize browser window\r\n\t\tdriver.manage().window().maximize();\r\n\t\t\r\n\t\r\n\t}", "@Given(\"^the user launch the chrome application$\")\r\n\tpublic void the_user_launch_the_chrome_application() throws Throwable {\n\t\tlaunchBrowser(\"chrome\");\r\n\t\t register= new Para_Registartion_page(driver);\r\n\t}", "@Test(groups={\"ut\"})\r\n\tpublic void testCreateCapabilitiesWithRelativeApplicationPath() {\r\n\t\tSeleniumTestsContext context = new SeleniumTestsContext(SeleniumTestsContextManager.getThreadContext());\r\n\t\tcontext.setMobilePlatformVersion(\"8.0\");\r\n\t\tcontext.setPlatform(\"android\");\r\n\t\tcontext.setDeviceName(\"Samsung Galasy S8\");\r\n\t\tcontext.setAppPackage(\"appPackage\");\r\n\t\tcontext.setAppActivity(\"appActivity\");\r\n\t\tcontext.setApp(\"data/core/app.apk\");\r\n\t\tDriverConfig config = new DriverConfig(context);\r\n\t\t\r\n\t\tAndroidCapabilitiesFactory capaFactory = new AndroidCapabilitiesFactory(config);\r\n\t\tMutableCapabilities capa = capaFactory.createCapabilities();\r\n\t\t\r\n\t\tAssert.assertEquals(capa.getCapability(CapabilityType.BROWSER_NAME), \"\");\r\n\t\tlogger.info(\"app path: \" + capa.getCapability(\"app\"));\r\n\t\tAssert.assertTrue(capa.getCapability(\"app\").toString().contains(\"/data/core/app.apk\"));\r\n\t}", "private DesiredCapabilities getChromeCapabilities(DesiredCapabilities chromeCapabilities) {\n\t\t\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"G:\\\\workspace\\\\Jarvis\\\\src\\\\test\\\\resources\\\\lib\\\\chromedriver.exe\");\n\t\t\n\t\tchromeCapabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);\n\t\tchromeCapabilities.setCapability(CapabilityType.SUPPORTS_ALERTS, true);\n\t\tchromeCapabilities.setCapability(CapabilityType.UNEXPECTED_ALERT_BEHAVIOUR, UnexpectedAlertBehaviour.ACCEPT);\n\t\treturn chromeCapabilities;\n\t}", "public static void main(String[] args) {\n\t\tString proppath = System.getProperty(\"user.dir\");\n\t\tSystem.setProperty(\"webdriver.crome.driver\", proppath + \"\\\\chromedriver.exe\");\n\t\t\n\t\t//Desiredcapabilities (General ChromeOptions)\n\t\tDesiredCapabilities dc = new DesiredCapabilities();\n\t\tdc.acceptInsecureCerts(); // to handle ssl certificates\n\t\t//or\n\t\tdc.setCapability(CapabilityType.ACCEPT_INSECURE_CERTS, true);\n\t\tdc.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);\n\t\t\n\t\t//ChromeOptions (Local browser options)\n\t\tChromeOptions options = new ChromeOptions();\n\t\toptions.merge(dc);\n\t\toptions.setPageLoadStrategy(PageLoadStrategy.EAGER);\n\t\toptions.addArguments(\"--disable-notifications\");\n\t\t\n\t\t//Webdriver with ChromeOptions & DesiredCapabilities\n\t\tWebDriver driver = new ChromeDriver(options);\n\t\tdriver.manage().deleteAllCookies();\n\t\tdriver.manage().window().maximize();\n\n\t\tdriver.get(\"https://www.google.com/\");\n\t\tSystem.out.println(\"Before Processing >>>>\" + driver.getTitle());\n\t}", "public static void main(String[] args) {\n\t\t\n\tSystem.setProperty(\"webdriver.Chrome.driver\",\"./drivers/chromedriver.exe\");\n\tChromeDriver driver = new ChromeDriver();\n\tdriver.get(\"https://acme-test.uipath.com/account/login\");\n\n\t}", "public static WebDriver getDriver() {\n\t\t\n\t\tString driver = System.getProperty(\"selenium.driver\");\n\t\tif(driver.equals(\"ie\")) {\n\t\t\treturn getIEDriver();\n\t\t\t\n\t\t}\n\t\telse if(driver.equals(\"chrome\")) {\n\t\t\treturn getChromeDriver();\n\t\t}\n\t\t\telse if(driver.equals(\"firefox\")) {\n\t\t\t\treturn getFirefoxriver();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new RuntimeException(\"System property selenium driver is not set\");\n\t\t}\n\t}", "public static void initializer() \n\t{\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\Users\\\\HP-PC\\\\Downloads\\\\Kahoot\\\\chromedriver.exe\" );\n\t\tdriver=new ChromeDriver();\n\t\tdriver.manage().window().maximize();\n\t\tdriver.get(\"https://www.sathya.in/\");\n\t}", "@Test \n public void executSessionOne(){\n\t System.out.println(\"open the browser: chrome\");\n final String CHROME_DRIVER_DIRECTORY = System.getProperty(\"user.dir\") + \"/src/test/java/BrowserDrivers/chromedriver.exe\";\n System.setProperty(\"webdriver.chrome.driver\", CHROME_DRIVER_DIRECTORY);\n final WebDriver driver = new ChromeDriver();\n //Goto guru99 site\n driver.get(\"http://demo.guru99.com/V4/\");\n //find user name text box and fill it\n driver.quit();\n }", "@BeforeClass\n public static void instanceDriver() {\n ChromeOptions options = ConfigUtil.chromeOptions();\n driver = new ChromeDriver(options);\n wait = new WebDriverWait(driver, WEB_DRIVER_TIMEOUT);\n }", "public static void main(String[] args) {\n\n\tSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\Users\\\\COMPAQ\\\\Downloads\\\\chromedriver_win32\\\\chromedriver.exe\");\n\nWebDriver driver =new ChromeDriver();\n\n//WebDriverWait wait = new WebDriverWait(driver, 40);\n\n driver.get(\"http://qatestingtips.com/\");\n\t\n\n}", "public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"./browser/chromedriver.exe\");\r\n\t\t//DesiredCapabilities cap=new DesiredCapabilities();\r\n\t\t\r\n\t\tChromeOptions co=new ChromeOptions();\r\n\t\tco.addArguments(\"--disable-infobars\");\r\n\t\t//co.addArguments(\"--headless\");\r\n\t\tWebDriver driver=new ChromeDriver(co);\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.close();\r\n\r\n\t}", "private static WebDriver launchDriver(WebDriver driver)\n\t{\n\t\tswitch (getBrowserType())\n\t\t{\n\t\t\tcase InternetExplorer:\n\t\t\t{\n\t\t\t\tdriver = launchInternetExplorer();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase Chrome:\n\t\t\t{\n\t\t\t\tdriver = launchChrome();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tdefault:\n\t\t\t{\n\t\t\t\tdriver = launchFirefox();\n\t\t\t\tbreak;\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tdriver.manage().timeouts().implicitlyWait(getImplicitWaitTime(), TimeUnit.SECONDS);\n\t\twaitPageLoad = new WebDriverWait(driver, getPageLoadWaitTime());\n\t\twaitAjaxLoad = new WebDriverWait(driver, getAjaxLoadWaitTime());\n\t\tjavaScriptExecutor = (JavascriptExecutor) driver;\n\t\t\n\t\treturn driver;\n\t}", "public static void main(String[] args) throws IOException {\n\r\n\r\n\t WebDriver driver;\r\n\t ChromeOptions options=new ChromeOptions();\r\n\t options.addArguments(\"C:\\\\chromedriver.exe\"); \r\n\t\tDesiredCapabilities capabilities=DesiredCapabilities.chrome();\r\n\t\tcapabilities.setCapability(ChromeOptions.CAPABILITY,options);\r\n\t\tdriver=new RemoteWebDriver(new URL(\"http://192.168.71.1:5555/wd/hub\"),capabilities);\r\n driver.get(\"http://www.baidu.com\");\r\n \r\n \r\n \r\n//\t\tWebDriver driver;\r\n//\t\tProfilesIni allProfiles =new ProfilesIni();\r\n// FirefoxProfile profile=allProfiles.getProfile(\"default\");\r\n// DesiredCapabilities capabilities=DesiredCapabilities.firefox();\r\n//\t\tdriver=new RemoteWebDriver(new URL(\"http://192.168.71.1:5555/wd/hub\"),capabilities);\r\n//\t\tdriver.get(\"http://www.baidu.com\");\r\n\t}", "public WebDriver browserSetup() throws IOException\r\n\t{ \r\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\r\n\t\tSystem.out.println(\"1.Chrome\\n2.Firefox \\nEnter your choice:\");\r\n\t\tString choice=br.readLine();\r\n\t\t\r\n\t\tswitch(choice)\r\n\t\t{\r\n\t\t//To start Chrome Driver\r\n\t\tcase \"1\":\r\n\t\t System.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Test Automation\\\\Software\\\\chrome\\\\New Version\\\\chromedriver.exe\");\r\n\t\t ChromeOptions options=new ChromeOptions();\r\n\t\t options.addArguments(\"--disable-notifications\");\r\n\t\t driver=new ChromeDriver(options);\r\n\t\t break;\r\n\t\t\r\n\t\t//To start Firefox Driver\r\n\t\tcase \"2\":\r\n\t\t\tSystem.setProperty(\"webdriver.gecko.driver\", \"C:\\\\***\\\\drivers\\\\geckodriver.exe\");\r\n\t\t\tdriver=new FirefoxDriver();\r\n\t\t\tbreak;\r\n\t\t} \r\n\t\t\r\n\t\tdriver.get(url);\r\n\t\t\r\n\t\t//To maximize the window\r\n\t\tdriver.manage().window().maximize();\r\n\t\t\r\n\t\tdriver.manage().timeouts().pageLoadTimeout(8, TimeUnit.SECONDS);\r\n\t\t\r\n\t\treturn driver;\r\n\t}", "public static ChromeDriver LaunchPage(String url) {\n\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"./driver/chromedriver.exe\");\n\t\tChromeDriver driver = new ChromeDriver();\n\t\ttry {\n\t\t\tdriver.get(url);\n\t\t} catch (WebDriverException e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\treturn driver;\n\t}", "@Before\r\n\tpublic void setup() {\r\n\t\tSystem.out.println(\"Before\");\r\n\t\t//System.setProperty(\"webdriver.chrome.driver\", \"C:/Users/Admin/Desktop/Chromedriver.exe\");\r\n\t\t//driver = new ChromeDriver();\r\n\t}", "@Test\r\n\tpublic void tc1(){\r\n\t\tWebDriverManager.chromedriver().setup();\r\n\t\tdriver=new ChromeDriver();\r\n\t\tdriver.get(\"https://www.seleniumhq.org/download/\");\r\n\t\tString title = driver.getTitle();\r\n\t\tSystem.out.println(title);\r\n\t\tdriver.close();\r\n\t}", "public static void main(String[] args) {\nString browser=\"ff\";\nif (browser.equals(\"chrome\")) {\n\tWebDriverManager.chromedriver().setup();\n\t// System.setProperty(\"webdriver.chrome.driver\", \"/Users/user/Downloads/chromedriver\");\n\tdriver=new ChromeDriver();\n}\nelse if (browser.equals(\"ff\")) {\n\tWebDriverManager.firefoxdriver().setup();\n\tdriver=new FirefoxDriver();\n}\nelse\n\tif (browser.equals(\"IE\")) {\n\t\tWebDriverManager.iedriver().setup();\n\t\tdriver=new InternetExplorerDriver();\n\t}\n\telse\n\t\tif (browser.equals(\"opera\")) {\n\t\t\tWebDriverManager.operadriver().setup();\n\t\t\tdriver=new OperaDriver();\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"no defined driver\");\n\t\t}\n\n\ndriver.get(\"https://google.com\");\n\n\n\n\t\n\n\n\n\n\n\n\n\n\n\n\n\t}", "@BeforeClass\n public static void setup() {\n String driverPath = \"\";\n System.setProperty(\"webdriver.chrome.driver\", driverPath);\n driver = new ChromeDriver();\n driver.manage().window().maximize();\n }", "public static WebDriver getDriver(String testName) {\n WebDriver driver = getLocalChromeDriver();\n /* * * * * * * * * * * * * * * * * * * * * * * * */\n\n driver.manage().window().maximize();\n return driver;\n }" ]
[ "0.79314923", "0.758713", "0.737577", "0.7310422", "0.72644556", "0.7149517", "0.6822619", "0.6809245", "0.6738947", "0.6712025", "0.6651061", "0.6617965", "0.6609622", "0.6595428", "0.6537957", "0.6483031", "0.6448509", "0.6440631", "0.6428321", "0.640671", "0.63801265", "0.63329613", "0.63115096", "0.62721354", "0.624934", "0.6246112", "0.62236035", "0.62167263", "0.62035936", "0.6200525", "0.6185655", "0.6127222", "0.61262393", "0.6104996", "0.6102289", "0.6084671", "0.6078781", "0.60609144", "0.602644", "0.59972155", "0.59956807", "0.5990364", "0.5980807", "0.5935413", "0.59310764", "0.5915934", "0.5913865", "0.59074324", "0.5905421", "0.5896706", "0.5896013", "0.5891503", "0.58879703", "0.58758587", "0.58263844", "0.5822215", "0.5814219", "0.5814004", "0.58076566", "0.58075005", "0.579708", "0.57836926", "0.5778801", "0.57739556", "0.57685286", "0.5754519", "0.57505834", "0.57427", "0.5720252", "0.571851", "0.5717122", "0.5708518", "0.57079715", "0.56899655", "0.56784374", "0.5667313", "0.5667059", "0.56609446", "0.56488776", "0.56443095", "0.5632374", "0.5627777", "0.5627376", "0.561906", "0.5615864", "0.561553", "0.5606468", "0.56010646", "0.5598618", "0.5597503", "0.55915385", "0.5589801", "0.5589002", "0.55882436", "0.55875444", "0.55827045", "0.5570086", "0.553281", "0.55250067", "0.5508489", "0.5495788" ]
0.0
-1
For now we can return the first result from the list
public WeatherDataResponse getWeather() { return weather.get(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Item getFirst();", "protected T getFirstValue(List<T> list) {\n\t\treturn list != null && !list.isEmpty() ? list.get(0) : null;\n\t}", "public T getFirst();", "public T getFirst();", "public E queryFirst() {\n ValueHolder<E> result = ValueHolder.of(null);\n limit(1);\n doIterate(r -> {\n result.set(r);\n return false;\n });\n\n return result.get();\n }", "private YadaBrowserId normaliseSingleResult(List<YadaBrowserId> resultList) {\r\n\t\t// Need to keep the contract of the Spring Data Repository, so we return null when no value found.\r\n\t\tif (resultList.isEmpty()) {\r\n\t\t\treturn null;\r\n\t\t} else {\r\n\t\t\treturn resultList.get(0);\r\n\t\t}\r\n }", "public int getFirst();", "public static IDescribable getFirst( Collection<? extends IDescribable> results )\r\n\t{\r\n\t if(( results == null ) || ( results.size() == 0 ))\r\n\t return null;\r\n\t return results.iterator().next();\r\n\t}", "public java.lang.Integer getFirstResult()\r\n {\r\n return this.firstResult;\r\n }", "@Override\r\n\tpublic Object first(){\r\n\t\tcheck();\r\n\t\treturn head.value;\r\n\t}", "T first();", "public Optional<T> getFirstItem() {\n return getData().stream().findFirst();\n }", "public E getFirst();", "public static <C> C FIRST(LIST<C> L) {\n if ( isNull( L ) ) {\n return null;\n }\n if ( L.iter != null ) {\n if ( L.iter.hasNext() ) {\n return L.iter.next();\n } else {\n L.iter = null;\n return null;\n }\n }\n return L.list.getFirst();\n }", "public Object getFirst()\n {\n if(first == null){\n throw new NoSuchElementException();}\n \n \n \n return first.data;\n }", "@Override\r\n\t\tpublic T getFirst() {\n\t\t\tsynchronized (mutex) {\r\n\t\t\t\treturn pair.getFirst();\r\n\t\t\t}\r\n\t\t}", "public T pollFirst() {\n if (!isEmpty()) {\n T polled = (T) list[startIndex];\n startIndex++;\n if (isEmpty()) {\n startIndex = 0;\n nextindex = 0;\n }\n return polled;\n }\n return null;\n }", "public Object getFirst() throws ListException {\r\n\t\tif (size() >= 1) {\r\n\t\t\treturn get(1);\r\n\t\t} else {\r\n\t\t\tthrow new ListException(\"getFirst on an empty list\");\r\n\t\t}\r\n\t}", "public abstract PaginatedResult<T> first() throws AblyException;", "public E getFirst() {\r\n\t\t// element checks to see if the list is empty\r\n\t\treturn element();\r\n\t}", "public A getFirst() { return first; }", "@Override\r\n\t\tpublic T getFirst() {\n\t\t\treturn pair.getFirst();\r\n\t\t}", "public Object firstElement();", "public Object getFirst()\n {\n if (first == null)\n {\n throw new NoSuchElementException();\n }\n else\n return first.getValue();\n }", "public E first() {\n\r\n if (head == null) {\r\n return null;\r\n } else {\r\n return head.getItem();\r\n }\r\n\r\n }", "public Object getFirst() {\n\t\tcurrent = start;\n\t\treturn start == null ? null : start.item;\n\t}", "int getFirst(int list) {\n\t\treturn m_lists.getField(list, 0);\n\t}", "public static <T> T getFirst(List<T> list) {\n\t\treturn list != null && !list.isEmpty() ? list.get(0) : null;\n\t}", "@Override\n\tpublic Object peek() {\n\t\treturn list.getFirst();\n\t}", "public E first() {\n if (isEmpty()) return null;\n return first.item;\n }", "@Override\r\n\t\tpublic E getFirst() {\n\t\t\treturn pair.getFirst();\r\n\t\t}", "@Override\r\n\t\tpublic E getFirst() {\n\t\t\treturn pair.getFirst();\r\n\t\t}", "public E pollFirst();", "public Unit first()\n\t{\n\t\tif (size() == 0)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\treturn iterator().next();\n\t}", "@Test\r\n\tvoid testFirst() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\ttest.add(3);\r\n\t\ttest.add(7);\r\n\t\ttest.add(10);\r\n\t\tint output = test.first();\r\n\t\tassertEquals(10, output);\r\n\t}", "public T getFirst() {\n return this.getHelper(this.indexCorrespondingToTheFirstElement).data;\n }", "@Override\n public Function<List<Integer>, Integer> finisher() {\n return resultList -> resultList.get(0);\n }", "String first(String collection);", "@Override\n public int element() {\n isEmptyList();\n return first.value;\n }", "public VectorItem<O> firstVectorItem()\r\n {\r\n if (isEmpty()) return null; \r\n return first;\r\n }", "public E first() \n throws NoSuchElementException {\n if (entries != null && \n size > 0 ) {\n position = 0;\n E element = entries[position]; \n position++;\n return element;\n } else {\n throw new NoSuchElementException();\n }\n }", "public O first()\r\n {\r\n if (isEmpty()) return null; \r\n return first.getObject();\r\n }", "ArrayList<String> firstElements(ArrayList<String> myList);", "public T first() throws EmptyCollectionException{\n if (front == null){\n throw new EmptyCollectionException(\"list\");\n }\n return front.getElement();\n }", "R getFirstRowOrThrow();", "int getFirstItemOnPage();", "public Optional<E> first() {\n return Optional.ofNullable(queryFirst());\n }", "public process get_first() {\n\t\treturn queue.getFirst();\n\t}", "public T first() throws EmptyCollectionException;", "public T first() throws EmptyCollectionException;", "public U getFirst(){\r\n\t \tif (getArraySize()==0)\r\n\t \t\tthrow new IndexOutOfBoundsException();\r\n\t \t//calls get\r\n\t \treturn get(0);\r\n\t }", "public T first(int x)throws EmptyCollectionException, \n InvalidArgumentException;", "protected Optional<T> getFirstValueOptional(List<T> list) {\n\t\treturn Optional.ofNullable(getFirstValue(list));\n\t}", "SearchResult findNext(SearchResult result);", "public abstract Collection<T> getMatches(T first);", "public E first() {\n if (this.isEmpty()) return null;\r\n return this.head.getElement();\r\n }", "public A first() {\n return first;\n }", "T peek(){\n\tif(m.size() == 0){\n\t throw new NoSuchElementException();\n\t}\n\tT answer = m.get(0);\n\treturn answer;\n }", "public T getFirst( ){\r\n\t\tif (isEmpty())\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t//first node\r\n\t\tArrayNode<T> first = beginMarker.next;\r\n\t\ttry{\r\n\t\t\t//first elem\r\n\t\t\treturn first.getFirst();\r\n\t\t}catch( IndexOutOfBoundsException e){\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t}\r\n\t\t\r\n\t}", "private IntentionCriminelle getSingle(List<IntentionCriminelle> intentionCriminelle) {\n if (intentionCriminelle.isEmpty()) {\n return null;\n }\n if (intentionCriminelle.size() > 1) {\n throw new IllegalStateException(\"Error : several ic with same name\");\n }\n return intentionCriminelle.get(0);\n }", "public E getFirst() {\n return peek();\n }", "public T getFirst() {\n\t\t//if the head is not empty\n\t\tif (head!= null) {\n\t\t\t//return the data in the head node of the list\n\t\t\treturn head.getData();\n\t\t}\n\t\t//otherwise return null\n\t\telse { return null; }\n\t}", "public T peek() throws NoSuchElementException\n\t{\n\t\tcheckEmpty();\n\t\treturn list.get(0);\n\t}", "@Override\r\n\tpublic T first() {\n\t\treturn head.content;\r\n\t}", "public E getFirst(){\n return head.getNext().getElement();\n }", "public T getFirst()\n\t{\n\t\treturn head.getData();\n\t}", "public Object getFirstObject()\n {\n \tcurrentObject = firstObject;\n\n if (firstObject == null)\n \treturn null;\n else\n \treturn AL.get(0);\n }", "public K getFirst() {\r\n\t\treturn first;\r\n\t}", "public E first() {\n if(isEmpty()){\n return null;\n }else{\n return header.getNext().getElement();\n }\n }", "Position<T> first();", "@Override\n\tpublic E first() {\n\t\treturn queue[pos];\n\t}", "public E first(){\n if (isEmpty()) return null;\n return arrayQueue[front];\n }", "public int getFirst() {\n return first;\n }", "public T1 getFirst() {\n\t\treturn first;\n\t}", "public boolean first() {\n initialize();\n return next();\n }", "public E getFirst() {\n\t\t// Bitte fertig ausprogrammieren:\n\t\treturn null;\n\t}", "public F first() {\n return this.first;\n }", "public String getFirst () {\n lengthMutex.lock ();\n try\n {\n while (length == 0)\n empty.await ();\n }\n catch (Exception e)\n {}\n finally\n {\n lengthMutex.unlock ();\n }\n\n String result = null;\n for (int i=9; i>-1; i--)\n {\n qLock[i].lock ();\n result = q[i].pollFirst ();\n qLock[i].unlock ();\n if (result != null)\n {\n length--;\n break;\n }\n }\n if (result == null)\n {\n // System.out.println (\"pooop\");\n System.exit (1);\n }\n\n lengthMutex.lock ();\n full.signal ();\n lengthMutex.unlock ();\n\n return result;\n }", "StackType getFirstItem();", "@Override\r\n\t\tpublic final E getFirst() {\n\t\t\treturn null;\r\n\t\t}", "@Override\n public E getFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"No elements in dequeue\");\n }\n return dequeue[head];\n }", "public static Object first(Object o) {\n log.finer(\"getting first of list expression: \" + o);\n validateType(o, SPair.class);\n return ((SPair)o).getCar();\n }", "protected Tuple fetchNext() throws NoSuchElementException, TransactionAbortedException, DbException {\n\t\t// some code goes here\n\t\tTuple ret;\n\t\twhile (childOperator.hasNext()) {\n\t\t\tret = childOperator.next();\n\t\t\tif (pred.filter(ret))\n\t\t\t\treturn ret;\n\t\t}\n\t\treturn null;\n\t}", "public T peek()\n\t{\n\t\tT ret = list.removeFirst();\n\t\tlist.addFirst(ret);\n\t\treturn ret;\n\t}", "public E getFirst() {\n\t\tif (mSize == 0)\n\t\t\tthrow new NoSuchElementException();\n\t\treturn mHead.next.data;\n\t}", "int head(){\n if(isEmpty()!=1){\n return values[0];\n }\n return -1;\n }", "public Integer peek() {\n List<Integer> temp = new ArrayList<>();\n \n while(iterator.hasNext()){\n \ttemp.add(iterator.next());\n }\n \n Integer result = null;\n if(temp.size() > 0){\n result = temp.get(0);\n }\n \n iterator = temp.iterator();\n return result;\n\t}", "@Override\n public Tile getFirst() {\n return tiles.iterator().next();\n }", "@Override\n\tpublic T queryFirstObj(QueryBuilder mQueryBuilder) {\n\t\tmQueryBuilder.limitIndex = 1;\n\t\tmQueryBuilder.offsetIndex = 0;\n\t\tList<T> list = queryObjs(mQueryBuilder);\n\t\tif (list.size() > 0) {\n\t\t\treturn list.get(0);\n\t\t}\n\t\treturn null;\n\t}", "@Test\r\n\tvoid testFirst2() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\tint output = test.first();\r\n\t\tassertEquals(-1, output);\r\n\t}", "public int getFirst() {\n\t\treturn first;\n\t}", "public Object getFirst() {\r\n if (size == 0)\r\n throw new NoSuchElementException();\r\n\r\n return header.next.element;\r\n }", "public Result getResultOfFirstPlayer() {\r\n\t\treturn this.resultOfFirstPlayer;\r\n\t}", "public E queryOne() {\n limit(2);\n List<E> result = queryList();\n if (result.size() != 1) {\n return null;\n } else {\n return result.get(0);\n }\n }", "public int getFirstElement() {\n\t\tif( head == null) {\n\t\t\tSystem.out.println(\"List is empty\");\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\t}\n\t\telse {\n\t\t\treturn head.data;\n\t\t}\n\t}", "public SeleniumQueryObject first() {\n\t\treturn FirstFunction.first(this, this.elements);\n\t}", "K first();", "private String getFirstEntryOfResultSet(Cursor cursor) {\n\n\t\t//\n\t\t// are there any data\n\t\t//\n\t\tif (!cursor.moveToFirst())\n\t\t\treturn null;\n\n\t\t//\n\t\t// get first string\n\t\t//\n\t\tString result = cursor.getString(0);\n\n\t\t//\n\t\t// are there more entries\n\t\t//\n\t\tif (cursor.moveToNext()) {\n\t\t\t//\n\t\t\t// BUG: duplicate entries\n\t\t\t//\n\t\t\tLogger.e(\"Duplicate entries found: \");\n\t\t\tStackTraceElement[] elements = Thread.currentThread()\n\t\t\t\t\t.getStackTrace();\n\t\t\tfor (StackTraceElement element : elements)\n\t\t\t\tLogger.e(\" at \" + element.getClassName() + \".\"\n\t\t\t\t\t\t+ element.getMethodName() + \"(\" + element.getFileName()\n\t\t\t\t\t\t+ \":\" + element.getLineNumber() + \")\");\n\t\t}\n\n\t\t//\n\t\t// done\n\t\t//\n\t\treturn result;\n\t}", "public E peekFirst();", "@Override\r\n\tpublic E getFirst() {\n\t\treturn null;\r\n\t}", "public int first() throws Exception{\n if(isEmpty())\n throw new Exception();\n return front.getData();\n }" ]
[ "0.6996018", "0.6837179", "0.68192255", "0.68192255", "0.68027353", "0.6791435", "0.6781356", "0.6735721", "0.6714117", "0.66746986", "0.66702664", "0.66399765", "0.66250354", "0.6612888", "0.6600594", "0.65874106", "0.6580198", "0.65734524", "0.6558028", "0.6540613", "0.6522744", "0.65143096", "0.6437428", "0.6436205", "0.6435996", "0.64266354", "0.6419411", "0.6389238", "0.6362423", "0.6321818", "0.628765", "0.628765", "0.6278473", "0.6273059", "0.6252812", "0.62482417", "0.6247847", "0.62397623", "0.6231438", "0.62194604", "0.62012917", "0.6187257", "0.6176766", "0.6167424", "0.6165604", "0.613843", "0.6135677", "0.6133724", "0.6122012", "0.6122012", "0.6113097", "0.6105738", "0.61051685", "0.61041766", "0.61035234", "0.6088359", "0.6085458", "0.60617596", "0.6060527", "0.6056082", "0.6048187", "0.604554", "0.60445994", "0.60319525", "0.60210437", "0.60080683", "0.59904534", "0.5979506", "0.5978167", "0.5975909", "0.59706706", "0.5961703", "0.59582067", "0.5957653", "0.59566575", "0.5951277", "0.5939599", "0.5933218", "0.59326106", "0.59289074", "0.5928647", "0.5908831", "0.5908156", "0.5905424", "0.58990455", "0.5876713", "0.58742785", "0.58711267", "0.58707", "0.58625895", "0.5861628", "0.586143", "0.58516586", "0.5847499", "0.58463943", "0.5845346", "0.58398837", "0.5826541", "0.5823246", "0.5813684", "0.5809104" ]
0.0
-1
getter ve setter fonksiyonlari.
public int getDepNo() { return depNo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String setter() {\n\t\treturn prefix(\"set\");\n\t}", "String setValue();", "public void setValor(String valor)\n/* 22: */ {\n/* 23:34 */ this.valor = valor;\n/* 24: */ }", "public abstract void setCod_tecnico(java.lang.String newCod_tecnico);", "public void setdat()\n {\n }", "public void setEmpresa(Empresa empresa)\r\n/* 89: */ {\r\n/* 90:141 */ this.empresa = empresa;\r\n/* 91: */ }", "public void setNombre(String nombre){\n this.nombre =nombre;\n }", "public void setObservacion(java.lang.String param){\n \n this.localObservacion=param;\n \n\n }", "public void setTelefono(String telefono) {\r\n\tthis.telefono = telefono;\r\n}", "public void setLongitud(Integer longitud)\n/* 42: */ {\n/* 43:62 */ this.longitud = longitud;\n/* 44: */ }", "protected abstract Set method_1559();", "public void setNombre(String nombre) {this.nombre = nombre;}", "public String getSetter() {\n return \"set\" + getCapName();\n }", "public Value makeSetter() {\n Value r = new Value(this);\n r.setters = object_labels;\n r.object_labels = null;\n return canonicalize(r);\n }", "public String getValor()\n/* 17: */ {\n/* 18:27 */ return this.valor;\n/* 19: */ }", "public void setCodigo(java.lang.String param){\n \n this.localCodigo=param;\n \n\n }", "@Test\n public void testSetGetEinheit() {\n \n String einheit = \"einheit\";\n messtyp.setEinheit(einheit);\n assertEquals(messtyp.getEinheit(), \"einheit\");\n }", "@Test\r\n public void testSetMicentro() {\r\n System.out.println(\"setMicentro\");\r\n CentroEcu_Observado micentro = new CentroEcu_Observado();\r\n micentro.setCiudad(\"Loja\");\r\n Servicio_CentroEcu instance = new Servicio_CentroEcu();\r\n instance.setMicentro(micentro);\r\n assertEquals(instance.getMicentro().ciudad, \"Loja\");\r\n }", "@Test\r\n public void testSetOrigen() {\r\n String expResult = \"pruebaorigen\";\r\n articuloPrueba.setOrigen(expResult);\r\n assertEquals(expResult, articuloPrueba.getOrigen());\r\n }", "public void setNumero(int numero)\r\n/* 195: */ {\r\n/* 196:206 */ this.numero = numero;\r\n/* 197: */ }", "public void setU(String f){\n u = f;\n}", "public void setNombre(String nombre)\r\n/* 65: */ {\r\n/* 66: 76 */ this.nombre = nombre;\r\n/* 67: */ }", "@Test\r\n public void testSetValor() {\r\n \r\n }", "public abstract void set(M newValue);", "public int getSet() {\n return set;\n }", "@Deprecated\n final Method setter() {\n return this.setter;\n }", "public abstract void setFecha_inicio(java.lang.String newFecha_inicio);", "public int getArmadura(){return armadura;}", "public void setOrigen(java.lang.String param){\n \n this.localOrigen=param;\n \n\n }", "public biz.belcorp.www.canonico.ffvv.vender.TEstadoPedido getEstado(){\n return localEstado;\n }", "public void setNombre(String nombre) {\r\n\tthis.nombre = nombre;\r\n}", "void setNama(String nama){\n this.nama = nama;\n }", "public void setAnio(int p) { this.anio = p; }", "public int getTipoAtaque(){return tipoAtaque;}", "public void setBunga(int tipeBunga){\n }", "@Test\r\n public void testSetMiservicio() {\r\n System.out.println(\"setMiservicio\");\r\n Servicio miservicio = new Servicio();\r\n miservicio.descripcion=\"gestion de vigilancia\";\r\n Servicio_CentroEcu instance = new Servicio_CentroEcu();\r\n instance.setMiservicio(miservicio);\r\n assertEquals(instance.getMiservicio().descripcion, \"gestion de vigilancia\");\r\n }", "public int getAtencionAlCliente(){\n return atencion_al_cliente; \n }", "public void setCodigo(Integer codigo) { this.codigo = codigo; }", "public Empleado getEmpleado()\r\n/* 183: */ {\r\n/* 184:337 */ return this.empleado;\r\n/* 185: */ }", "public MotivoLlamadoAtencion getMotivoLlamadoAtencion()\r\n/* 114: */ {\r\n/* 115:123 */ return this.motivoLlamadoAtencion;\r\n/* 116: */ }", "public abstract void setCod_dpto(java.lang.String newCod_dpto);", "public abstract void setNombre(java.lang.String newNombre);", "public java.lang.String getObservacion(){\n return localObservacion;\n }", "public String getTelefono(){\n return telefono;\n }", "public int getFuerza(){\n\n return this.fuerza;\n\n }", "public void setM_Locator_ID (int M_Locator_ID)\n{\nset_Value (\"M_Locator_ID\", new Integer(M_Locator_ID));\n}", "public void setEnqueteur(Enqueteur enqueteur)\r\n/* */ {\r\n/* 65 */ this.enqueteur = enqueteur;\r\n/* */ }", "public int getModopelea(){return modopelea;}", "void setTitolo(String titolo);", "@Test\n public void testSetNombre() {\n System.out.println(\"setNombre\");\n Receta instance = new Receta();\n instance.setNombre(\"nom1\");\n String expResult = \"nom1\";\n String result = instance.getNombre();\n assertEquals(expResult, result);\n }", "public Empresa getEmpresa()\r\n/* 84: */ {\r\n/* 85:131 */ return this.empresa;\r\n/* 86: */ }", "V setValue(final V value) {\n\t setMethod.accept(value);\n\n\t return value;\n\t}", "public void setLongitud(String longitud);", "public abstract void setAcma_valor(java.lang.String newAcma_valor);", "public void setAnio(int anio){\r\n \r\n \r\n this.anio = anio;\r\n \r\n }", "public void setMotivoLlamadoAtencion(MotivoLlamadoAtencion motivoLlamadoAtencion)\r\n/* 119: */ {\r\n/* 120:127 */ this.motivoLlamadoAtencion = motivoLlamadoAtencion;\r\n/* 121: */ }", "public abstract void setFecha_termino(java.lang.String newFecha_termino);", "public void setAutorizacion(String autorizacion)\r\n/* 139: */ {\r\n/* 140:236 */ this.autorizacion = autorizacion;\r\n/* 141: */ }", "public void setNumero(int numero) { this.numero = numero; }", "public int getTamanio(){\r\n return tamanio;\r\n }", "public void setNombre(String nombre)\r\n/* 118: */ {\r\n/* 119:214 */ this.nombre = nombre;\r\n/* 120: */ }", "public abstract void setAcma_cierre(java.lang.String newAcma_cierre);", "public void setEmpleado(Empleado empleado)\r\n/* 188: */ {\r\n/* 189:347 */ this.empleado = empleado;\r\n/* 190: */ }", "@Test\n public void testSetTipoSangre() {\n System.out.println(\"setTipoSangre\");\n String tipoSangre = \"\";\n Paciente instance = new Paciente();\n instance.setTipoSangre(tipoSangre);\n \n }", "public void setEstablecimiento(String establecimiento)\r\n/* 119: */ {\r\n/* 120:198 */ this.establecimiento = establecimiento;\r\n/* 121: */ }", "@Test\n public void testSetNombre() {\n System.out.println(\"setNombre\");\n String nombre = \"T-3\";\n DboEdificio instance = new DboEdificio(1, \"T-3\");\n instance.setNombre(nombre);\n \n }", "public void setValorCalculo(ValoresCalculo valorCalculo)\r\n/* 93: */ {\r\n/* 94:111 */ this.valorCalculo = valorCalculo;\r\n/* 95: */ }", "public void setTelefono(String telefono);", "public int getValore() {\n return valore;\n }", "@Test\n public void testSetLugarNac() {\n System.out.println(\"setLugarNac\");\n String lugarNac = \"\";\n Paciente instance = new Paciente();\n instance.setLugarNac(lugarNac);\n \n }", "public void setX(int x) { this.x=x; }", "public void comecar() { setEstado(estado.comecar()); }", "@Test\n public void testSetId_edificio() {\n System.out.println(\"setId_edificio\");\n int id_edificio = 1;\n DboEdificio instance = new DboEdificio(1, \"T-3\");\n instance.setId_edificio(id_edificio);\n \n }", "public Integer getLongitud()\n/* 37: */ {\n/* 38:55 */ return this.longitud;\n/* 39: */ }", "public void setNama() {\n nama.postValue(\"Hello, Riyanto!\");\n }", "public double getMontoSolicitado(){\n return localMontoSolicitado;\n }", "public void setLocacion(String locacion);", "public void setC_UOM_ID (int C_UOM_ID)\n{\nset_Value (\"C_UOM_ID\", new Integer(C_UOM_ID));\n}", "public String getTelefono() {\r\n\treturn telefono;\r\n}", "public void set(boolean bol);", "public ValoresCalculo getValorCalculo()\r\n/* 88: */ {\r\n/* 89:107 */ return this.valorCalculo;\r\n/* 90: */ }", "public void setMontoSolicitado(double param){\n \n this.localMontoSolicitado=param;\n \n\n }", "@Override\n\t\tpublic void set(E arg0) {\n\t\t\t\n\t\t}", "protected String isSetter(final Method<?> method)\r\n {\r\n String methodName = method.getName();\r\n \r\n if (!methodName.startsWith(ClassUtils.JAVABEAN_SET_PREFIX))\r\n {\r\n return null;\r\n }\r\n \r\n String propertyName = methodName.substring(ClassUtils.JAVABEAN_SET_PREFIX.length());\r\n \r\n if (!StringUtils.isCapitalized(propertyName))\r\n {\r\n return null;\r\n }\r\n \r\n return StringUtils.decapitalize(propertyName);\r\n }", "public int getAnio(){\r\n \r\n \r\n return this.anio;\r\n \r\n }", "public int getValeur() {\r\n return valeur;\r\n }", "public int\t\tget() { return value; }", "public java.lang.String getCodigo(){\n return localCodigo;\n }", "public void setCodigo(int pCodigo){\n this.codigo = pCodigo;\n }", "public void setEjercicio(Ejercicio ejercicio)\r\n/* 150: */ {\r\n/* 151:193 */ this.ejercicio = ejercicio;\r\n/* 152: */ }", "public int getcontador2(){\nreturn contador2;}", "public void set(String value){\n switch (field){\n case 0:\n nomComplet = value;\n break;\n case 1:\n rv1 = value;\n break;\n case 2:\n dateDispo = LocalDate.parse(value,formatter);\n break;\n case 3:\n competencePrincipale = value;\n break;\n case 4:\n exp = Double.parseDouble(value);\n break;\n case 5:\n trancheExp = value;\n break;\n case 6:\n ecole = value;\n break;\n case 7:\n classeEcole = value;\n break;\n case 8:\n fonctions = value;\n break;\n case 9:\n dateRV1 = LocalDate.parse(value,formatter);\n case 10:\n rv2 = value;\n break;\n case 11:\n metiers = value;\n break;\n case 12:\n originePiste = value;\n break;\n }\n field++;\n }", "public int getValor() {\r\n return valor;\r\n }", "public synchronized int get() { \n return this.soma_pares; \n }", "public void setMontoPedidoRechazado(double param){\n \n this.localMontoPedidoRechazado=param;\n \n\n }", "@Test\n public void testSetEtnia() {\n System.out.println(\"setEtnia\");\n String etnia = \"\";\n Paciente instance = new Paciente();\n instance.setEtnia(etnia);\n\n }", "public String getFechaInicio(){\n return fechaInicio;\n }", "public void setM_Warehouse_ID (int M_Warehouse_ID)\n{\nset_Value (\"M_Warehouse_ID\", new Integer(M_Warehouse_ID));\n}", "@Test\r\n public void testSetNombre() {\r\n String nombre = \"Prueba\";\r\n articuloPrueba.setNombre(nombre);\r\n assertEquals(nombre, articuloPrueba.getNombre());\r\n }", "public Value restrictToSetter() {\n checkNotPolymorphicOrUnknown();\n if (setters == null)\n return theNone;\n Value r = new Value();\n r.setters = setters;\n return canonicalize(r);\n }", "public abstract void setCod_localidad(java.lang.String newCod_localidad);" ]
[ "0.6637426", "0.6600297", "0.64978033", "0.624952", "0.6221116", "0.61840385", "0.61642486", "0.6145126", "0.6141269", "0.6130721", "0.61184764", "0.61079097", "0.60643923", "0.60613596", "0.60357636", "0.6022706", "0.60078883", "0.6007764", "0.59907264", "0.59858686", "0.59734243", "0.5969062", "0.5957562", "0.59489965", "0.59476954", "0.5942618", "0.59416854", "0.5915433", "0.59137124", "0.5911119", "0.5896456", "0.58929086", "0.5889124", "0.58874846", "0.58854836", "0.5881919", "0.587825", "0.58750105", "0.587318", "0.58703494", "0.5863093", "0.58551395", "0.5846823", "0.58459663", "0.5844744", "0.58338475", "0.5826355", "0.58238167", "0.580868", "0.580377", "0.57982683", "0.57979804", "0.57904553", "0.57884777", "0.5787459", "0.57799923", "0.57797736", "0.57720625", "0.5769357", "0.5765656", "0.57620746", "0.57587296", "0.57547927", "0.5750693", "0.57465804", "0.574641", "0.57461065", "0.5742061", "0.5740908", "0.57299775", "0.5726025", "0.5723032", "0.5722759", "0.57205313", "0.5718701", "0.5713113", "0.5701873", "0.5699024", "0.5693815", "0.56897926", "0.56849694", "0.5684284", "0.56702787", "0.56694406", "0.5667058", "0.56598157", "0.5656895", "0.5655304", "0.5653157", "0.5650628", "0.5650164", "0.5647227", "0.5645946", "0.5645309", "0.56446433", "0.56440157", "0.56410724", "0.5637755", "0.5636156", "0.5634078", "0.56336164" ]
0.0
-1
Still accepting a String
void setMyField(String val) { try { myField = Integer.parseInt(val); } catch (NumberFormatException e) { myField = 0; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract boolean accepts(String string);", "public boolean canProvideString();", "@Override\n public void handleString(String s) {\n\n }", "@Override\r\n\tpublic void acceptInput(String input) {\n\t\t\r\n\t}", "public static String acceptString() {\n\t\tString stringData = null;\r\n\t\tBufferedReader input = null;\r\n\t\ttry {\r\n\t\t\t// chaining the streams\r\n\t\t\tinput = new BufferedReader(new InputStreamReader(System.in));\r\n\r\n\t\t\t// reading data from the reader\r\n\t\t\tstringData = input.readLine();\r\n\t\t} catch (IOException ioException) {\r\n\t\t\tSystem.out.println(\"Error in accepting data.\");\r\n\t\t} finally {\r\n\t\t\tinput = null;\r\n\t\t}\r\n\t\treturn stringData;\r\n\t}", "void mo37759a(String str);", "void method(String string);", "protected void handleInput(String input) {}", "void mo5871a(String str);", "protected abstract SimpleType doParseString(String s);", "@Override\n\t\tprotected boolean handleIrregulars(String s) {\n\t\t\treturn false;\n\t\t}", "public abstract void fromString(String s, String context);", "default T handleString(String val) {\n throw new UnsupportedOperationException();\n }", "void mo88522a(String str);", "void mo85415a(String str);", "void mo3768a(String str);", "void mo12635a(String str);", "private static String validateInputStr() {\n String str = \"\";\n Scanner genericString = new Scanner(System.in);\n if (!genericString.hasNextInt()) {\n str = genericString.nextLine();\n return str;\n }\n else {\n validateInputStr();\n }\n return str;\n }", "void mo1932a(String str);", "void mo1791a(String str);", "@Override\n\tprotected void isValid(String input) throws DataInputException\n\t{\n\t}", "public boolean isString();", "public void testCheckString() {\n Util.checkString(\"test\", \"test\");\n }", "public void testCheckString() {\n Util.checkString(\"test\", \"test\");\n }", "private static boolean isValidTypeString(String string)\r\n {\r\n return VALID_TYPE_STRINGS.contains(string);\r\n }", "void mo41089d(String str);", "public abstract boolean isValid(String s);", "String validate(String toValidate);", "@Override\n protected boolean isValueIsValid(String value) {\n return false;\n }", "void mo9697a(String str);", "public abstract String read_string();", "String getInput();", "protected testString(String text)\r\n\t{\r\n\t\tthis.text = text;\r\n\t}", "public abstract T parse(String str);", "public RamString(String string) throws IllegalArgumentException{\r\n if (string == null) {\r\n throw new IllegalArgumentException(\"Input cannot be null.\");\r\n }\r\n this.string = string; }", "void mo1935c(String str);", "public abstract boolean mo70724g(String str);", "abstract String mo1747a(String str);", "public abstract void mo70704a(String str);", "public boolean isString() {\n return false;\n }", "public boolean canConvert(String s);", "@Override\n public boolean validate(final String param) {\n return false;\n }", "boolean isSetString();", "public static boolean isTaken(String string) {\n return false;\n }", "public Boolean test(String input);", "public abstract boolean isValidValue(String input);", "@Test\n\tpublic void caseNameWithCorrectInput() {\n\t\tString caseName = \"led case\";\n\t\tboolean isNameValid;\n\t\ttry {\n\t\t\tisNameValid = StringNumberUtil.stringUtil(caseName);\n\t\t\tassertTrue(isNameValid);\n\t\t} catch (StringException e) {\n\t\t\tfail();\n\t\t}\n\t\t\n\t}", "private boolean STRING(String s) {\r\n int n = input.match(s, in);\r\n in += n;\r\n return (n > 0);\r\n }", "void mo87a(String str);", "public abstract T parse(String s);", "public String doIt(String s);", "public static String stringValidation() {\n\t\tString input = \"\";\n\t\tinput = in.nextLine().trim();\n\t\treturn input;\n\t}", "void mo1934b(String str);", "private NameBuilderString(String text) {\r\n\t\t\tthis.text = Objects.requireNonNull(text);\r\n\t\t}", "public void parse(String string) {\n\t\t\n\t}", "abstract protected boolean checkType(String myType);", "public abstract void fazerCoisa( String string );", "public void setWackyString(String string) {\r\n if (string == null) {\r\n throw new IllegalArgumentException(\"Input cannot be null.\");\r\n }\r\n this.string = string;\r\n }", "void mo21068a(String str) throws IOException;", "<S> S fromStr(String s, Class<S> clazz);", "@Override\r\n\tpublic String testString(String string) {\n\t\treturn \"test -- hhh\";\r\n\t}", "private void error(String string) {\n\t\r\n}", "public abstract void mo4373a(String str);", "public abstract boolean mo70720c(String str);", "public abstract boolean mo70717b(String str);", "public abstract void validate(String value) throws DatatypeException;", "String readString();", "public static void isValid(String str) throws IllegalArgumentException {\n\t//remove leading and trailing whitespace\n\tstr = str.trim();\n\t\n\t//null & empty validation\n\tif(\"\".equals(str)) throw new IllegalArgumentException(\"Invalid String\");\n }", "public abstract void mo20160a(String str);", "private void strin() {\n\n\t}", "public boolean isString()\n {\n return true;\n }", "public boolean isCorrect(String str);", "boolean hasStringValue();", "State mo5880e(String str);", "public abstract void loge(String str);", "public abstract String mo24851a(String str);", "boolean isSetValueString();", "@Override\n\tpublic boolean match(String str) {\n\t\treturn false;\n\t}", "public abstract boolean mo70721d(String str);", "public void setInput(String input);", "@Override\n\tpublic void parseInput() throws InvalidArgumentValueException {\n\t\t\n\t\t\n\t\ttry {\n\t\t\tstringArgBytes = stringToArrayOfByte(stringText.getText());\n\t\t} catch (NumberFormatException e) {\n\n\t\t\tthrow new InvalidArgumentValueException(\n\t\t\t\t\t\"This string cannot be converted to ASCII for some reason. Maybe there are non asci characters used in it\");\n\t\t}\n\t}", "boolean hasString();", "Data mo12944a(String str) throws IllegalArgumentException;", "public void m23077a(String str) {\n }", "private void valida(String str)throws Exception{\n\t\t\t\n\t\t\tif(str == null || str.trim().isEmpty()){\n\t\t\t\tthrow new Exception(\"Nao eh possivel trabalhar com valores vazios ou null.\");\n\t\t\t}\n\t\t\n\t\t}", "public boolean insuranceCheck(String String) {\n\t\treturn false;\n\t}", "@Override\n\t\tprotected String[] handleIrregulars(String s) {\n\t\t\treturn null;\n\t\t}", "public StringInputSource(String s) {\n _index = 0;\n _input = s;\n }", "String processing();", "public static boolean fromStringForRequired(String string)\n throws IllegalArgumentException, TypeValueException {\n if (\"true\".equals(string)) {\n return true;\n } else if (\"false\".equals(string)) {\n return false;\n } else if (string == null) {\n throw new IllegalArgumentException(\"string == null\");\n } else {\n throw new TypeValueException(SINGLETON, string);\n }\n }", "public void processInput(String text);", "public SipsaExcepcion(String string) {\n super(string);\n }", "@Override\n\tpublic String process(String input) {\n\t\treturn filter.process((String)input);\n\t}", "void mo5872a(String str, Data data);", "public void setInput(String input) { this.input = input; }", "private static String type(String arg) {\n if ( arg.contains(\".\") )\n return \"ip\";\n try {\n Integer.parseInt(arg);\n return \"port\";\n } catch (NumberFormatException ignored) {\n return arg;\n }\n }", "private String getString(String paramString) {\n }", "public boolean accept(String word) {\n\t\t// Ceci n'est pas une implémentation !\n\t\treturn false;\n\t}", "public void setInputString(String inputString) {\r\n if (input != null) {\r\n throw new BuildException(\"The \\\"input\\\" and \\\"inputstring\\\" \" + \"attributes cannot both be specified\");\r\n }\r\n this.inputString = inputString;\r\n incompatibleWithSpawn = true;\r\n }", "@Override\n\tpublic boolean supports(Object value) {\n\t\treturn value != null && (value instanceof String);\n\t}", "public abstract void ataca(String inamic);" ]
[ "0.7348218", "0.70880884", "0.6742154", "0.67003393", "0.6569854", "0.65221435", "0.6390344", "0.63814366", "0.6373621", "0.6342101", "0.63335097", "0.63281924", "0.6306693", "0.6273002", "0.6243563", "0.6239266", "0.622927", "0.6215401", "0.6205175", "0.62039214", "0.62029433", "0.6166257", "0.6159657", "0.6159657", "0.61317027", "0.6118587", "0.61052454", "0.60802317", "0.60675585", "0.6056834", "0.60296804", "0.6012271", "0.6000375", "0.5987532", "0.5985115", "0.59655327", "0.594825", "0.59377265", "0.59367555", "0.59356296", "0.5909732", "0.59047484", "0.5903228", "0.5902756", "0.59009993", "0.5892781", "0.58892447", "0.5886284", "0.58833313", "0.58806187", "0.5877932", "0.5868521", "0.58676237", "0.58648574", "0.58554304", "0.58339095", "0.58230865", "0.58048123", "0.5800508", "0.5796662", "0.5784902", "0.57844234", "0.57809055", "0.5775469", "0.57613856", "0.57591283", "0.57572573", "0.57417214", "0.57392377", "0.57388943", "0.5726149", "0.5722116", "0.5720378", "0.5714607", "0.5711888", "0.57112396", "0.5709423", "0.57064265", "0.57046384", "0.5700597", "0.5693678", "0.5689674", "0.5687637", "0.5673691", "0.56678516", "0.56622636", "0.56522894", "0.56395775", "0.56216073", "0.5619226", "0.56184953", "0.5613551", "0.5611768", "0.560938", "0.56083274", "0.5585142", "0.5582609", "0.55765975", "0.55617326", "0.555734", "0.5557064" ]
0.0
-1
Creates new form SearchEmployee
public SearchEmp() { initComponents(); jPanelWrongAge.setVisible(false); jPanelWrongEmail.setVisible(false); jPanelWrongID.setVisible(false); jPanelWrongName.setVisible(false); jPanelWrongPass.setVisible(false); jPanelWrongPhoneNo.setVisible(false); jPanelWrongQualification.setVisible(false); jPanelWrongSalary.setVisible(false); jPanelWrongUserName.setVisible(false); jPanelNotAllowed.setVisible(false); jPanelWrongIDEmployee.setVisible(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GetMapping(\"/showNewEmpForm\")\n\tpublic String showNewEmpForm(Model model) {\n\t\tEmployees employee = new Employees();\n\t\tmodel.addAttribute(\"employee\", employee);\n\t\treturn \"new_employee\";\n\t}", "@RequestMapping(method=RequestMethod.POST ,value=\"/searchadminemployee\")\n\tpublic ModelAndView gettEmployee(@RequestParam int employee_id )\n\t{\n\t\tSystem.out.println(\"INSIDE search by eid\");\n\t\t\n\t\tEmployeeRegmodel erobj= ergserv.getEmployeeRecordFromDB(employee_id);\n\t\t\n\t\tModelAndView mv= new ModelAndView();\n\t\t\t\tif(erobj.getEmployee_fullname()!= null)\n\t\t\t\t{\n\t\t\t\t\tmv.addObject(\"stinfo\", erobj);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tmv.addObject(\"msg\", \"INVALID Employee ID\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tmv.setViewName(\"adminemployeedelete.jsp\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\treturn mv;\n\t}", "@GetMapping(\"/showNewEmployeeForm\")\n public String showNewEmployeeForm(Model model){\n Employee employee=new Employee();\n model.addAttribute(\"employee\",employee);\n return \"Add_Employee\";\n }", "public addEmployee() {\n initComponents();\n \n conn = db.java_db();\n Toolkit toolkit = getToolkit();\n Dimension size = toolkit.getScreenSize();\n setLocation(size.width / 2 - getWidth() / 2, size.height / 2 - getHeight() / 2);\n }", "@RequestMapping(method=RequestMethod.POST ,value=\"/searchemployee\")\n\tpublic ModelAndView getEmployee(@RequestParam int employee_id )\n\t{\n\t\tSystem.out.println(\"INSIDE search by eid\");\n\t\t\n\t\tEmployeeRegmodel erobj= ergserv.getEmployeeRecordFromDB(employee_id);\n\t\t\n\t\tModelAndView mv= new ModelAndView();\n\t\t\t\tif(erobj.getEmployee_fullname()!= null)\n\t\t\t\t{\n\t\t\t\t\tmv.addObject(\"stinfo\", erobj);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tmv.addObject(\"msg\", \"INVALID Employee ID\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tmv.setViewName(\"ShowEmployeeDetails.jsp\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\treturn mv;\n\t}", "private void btnGetEmployeeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGetEmployeeActionPerformed\n String stringID = textEmployeeID.getText();\n if(textEmployeeID.getText().isEmpty()){\n JOptionPane.showMessageDialog(rootPane, \"Please Enter a valid ID\");\n return;\n }\n int ID = Integer.parseInt(stringID);\n newHandler.getEmployee(ID);\n \n if(newHandler.getErrorMsg() != null){\n JOptionPane.showMessageDialog(rootPane, newHandler.getErrorMsg());\n }\n textEmployeeID.setText(Integer.toString(newHandler.getEmployeeID()));\n textFirstName.setText(newHandler.getEmployeeFirstName());\n textLastName.setText(newHandler.getEmployeeLastName());\n textJobTitle.setText(newHandler.getJobTitle());\n textSalary.setText(Double.toString(newHandler.getSalary()));\n textOtherDetails.setText(newHandler.getOtherDetails());\n searched = true;\n }", "@Test\n\tpublic void testingAddNewEmployee() {\n\t\t\n\t\tdriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n\t\t\n\t\tthis.gettingUserAndPass();\n\t\t\n\t\tthis.sendingKeys();\n\t\t\n\t\tdriver.findElement(By.id(\"sn_staff\")).click();\n\t\tdriver.findElement(By.id(\"act_primary\")).click();\n\t\t\n\t\tdriver.findElement(By.id(\"_asf1\")).sendKeys(\"FirstName\");\n\t\tdriver.findElement(By.id(\"_asl1\")).sendKeys(\"LastName\");\n\t\tdriver.findElement(By.id(\"_ase1\")).sendKeys(\"emailAddress\");\n\t\t\n\t\tdriver.findElement(By.id(\"_as_save_multiple\")).click();\n\t\t\n\t\tWebElement newEmployee = driver.findElement(By.linkText(\"FirstName LastName\"));\n\t\tassertNotNull(newEmployee);\n\t\t\n\t}", "private void newJMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newJMenuItemActionPerformed\n // TODO add your handling code here:\n //Event handler for Adding a new employee \n try\n {\n //Create and display a new AddDialog\n boolean empExists = false;\n AddEmployee addEmployee = new AddEmployee(this, true);\n addEmployee.setVisible(true);\n Employee newEmployee = addEmployee.getEmployee();\n String employeeName = newEmployee.getName();\n empExists = findEmployee(employeeName) != null;\n if(newEmployee != null && empExists == false)\n { \n employees.add(newEmployee);\n displayEmployee();\n saveEmployee();\n }\n else\n {\n String first = employeeName + \" already exists.\";\n String second = \"No update was made.\";\n displayResults(first, second);\n employeeJList.setVisible(true);\n employeeJList.setSelectedIndex(0);\n }\n }\n catch(NullPointerException nullex)\n {\n JOptionPane.showMessageDialog(null, \"Employee not added\", \"Input error\",\n JOptionPane.WARNING_MESSAGE);\n employeeJList.setVisible(true);\n employeeJList.setSelectedIndex(0); \n }\n }", "@SuppressWarnings(\"unchecked\")\n\t@RequestMapping(params = \"search\", method = RequestMethod.POST)\n\tpublic ModelAndView fetchEmployee(@ModelAttribute(\"employee\") Employee emp,BindingResult result, Model m) {\n\t\tEmployee employee = empServiceimpl.searchEmployeeById(emp.getId());\n\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tList employeeList = new ArrayList();\n\t\temployeeList.add(employee);\n\n\t\treturn new ModelAndView(\"index\", \"employee1\", employeeList);\n\n\t}", "@RequestMapping(value = \"/add\", method = RequestMethod.GET)\r\n\tpublic ModelAndView addEmployee(@ModelAttribute Employee employee) {\r\n\t\tSystem.out.println(\"------------- redirecting to emp registration page --------------\" + employee);\r\n\t\tMap<String, Object> model = new HashMap<String, Object>();\r\n\t\treturn new ModelAndView(\"add\", model);\r\n\t}", "private Search buildEmployeeList(ResultSet resultSet, Search search) {\n try {\n\n while (resultSet.next()) {\n search.setFoundEmployees(true);\n Employee employee = new Employee();\n\n String employee_id = resultSet.getString(\"emp_id\");\n System.out.println(employee_id);\n employee.setEmployeeId(employee_id);\n employee.setFirstName(resultSet.getString(\"first_name\"));\n employee.setLastName(resultSet.getString(\"last_name\"));\n employee.setSocialSecurityNumber(resultSet.getString(\"ssn\"));\n employee.setDepartment(resultSet.getString(\"dept\"));\n employee.setRoomNumber(resultSet.getString(\"room\"));\n employee.setPhoneNumber(resultSet.getString(\"phone\"));\n\n search.addEmployee(employee);\n }\n } catch (SQLException sqlException) {\n sqlException.printStackTrace();\n } catch (Exception exception) {\n exception.printStackTrace();\n }\n\n return search;\n }", "@Override\n\tpublic void createEmployee(Employee e) {\n\t\t\n\t}", "public void createEmployee(Employee newEmployee) {\n\t\tif(false == this.employee.contains(newEmployee)) {\n\t\t\tthis.employee.add(newEmployee);\n\t\t}\n\t}", "@GetMapping(\"/showNewTeamForm\")\n public String showNewTeamForm(Model model) {\n\n Page<Employee> page = employeeService.findPaginated(1, 5,\"firstName\", \"asc\");\n List<Employee> listEmployees = page.getContent();\n\n Team team= new Team();\n model.addAttribute(\"team\", team);\n model.addAttribute(\"listEmployees\", listEmployees);\n model.addAttribute(\"listEmployeesFromTeam\", team.getEmployeeList());\n return \"new_team\";\n }", "@RequestMapping(method = RequestMethod.GET)\n\tpublic String setupForm(Model model) \n\t{\n\t\tEmployeeEntity employeeVO = new EmployeeEntity();\n\t\tmodel.addAttribute(\"employee\", employeeVO);\n\t\treturn \"listEmployeeView\";\n\t}", "private void addEmployee(HttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\tString firstName = request.getParameter(\"firstName\");\r\n\t\tString lastName = request.getParameter(\"lastName\");\r\n\t\tString gender = request.getParameter(\"gender\");\r\n\t\tint age = Integer.parseInt(request.getParameter(\"age\"));\r\n\t\tString email = request.getParameter(\"email\");\t\t\r\n\t\t\r\n\t\t// create a new employee object\r\n\t\tEmployee theEmployee = new Employee (firstName, lastName,gender,age, email);\r\n\t\t\r\n\t\t// add the employee to the database\r\n\t\temployeeDAO.addEmployee(theEmployee);\r\n\t\t\t\t\r\n\t\t// send back to main page (the student list)\r\n\t\tlistEmployees(request, response);\r\n\t}", "public SearchEmployeesServlet() {\r\n\t\tsuper();\r\n\t}", "public void actionPerformed(ActionEvent event) {\n try {\n anEmplist.add(new Manager(nameField.getText(),\n Double.parseDouble(salaryField.getText()),\n Double.parseDouble(bonusField.getText())));\n System.out.println(\"New manager successfully added.\");\n frame.dispose();\n }\n catch (Exception e) {\n System.out.println(\"Unable to add Employee. Please make\"\n + \" sure that all fields are filled out with valid\"\n + \" input.\");\n frame.dispose();\n }\n }", "@RequestMapping(method=RequestMethod.GET)\n\tpublic String intializeForm(Model model) {\t\t\n\t\tlog.info(\"GET method is called to initialize the registration form\");\n\t\tEmployeeManagerRemote employeeManager = null;\n\t\tEmployeeRegistrationForm employeeRegistrationForm = new EmployeeRegistrationForm();\n\t\tList<Supervisor> supervisors = null;\n\t\ttry{\n\t\t\temployeeManager = (EmployeeManagerRemote) ApplicationUtil.getEjbReference(emplManagerRef);\n\t\t\tsupervisors = employeeManager.getAllSupervisors();\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tmodel.addAttribute(\"supervisors\", supervisors);\n\t\tmodel.addAttribute(\"employeeRegistrationForm\", employeeRegistrationForm);\n\t\t\n\t\treturn FORMVIEW;\n\t}", "@PostMapping(value = \"/addEmployee\")\n\tpublic void addEmployee() {\n\t\tEmployee e = new Employee(\"Iftekhar Khan\");\n\t\tdataServiceImpl.add(e);\n\t}", "public Employee createNewEmployee(String name) {\n Employee newEmployee = new Employee(DumbDB.employeeCounter++, name, NO_DEPARTMENT_ID);\n getAllEmployees().add(newEmployee);\n return newEmployee;\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n txtsearch = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n txtid = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n txtfn = new javax.swing.JTextField();\n txtln = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n txtdob = new javax.swing.JTextField();\n txtdep = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n txtdes = new javax.swing.JTextField();\n jLabel8 = new javax.swing.JLabel();\n txtsta = new javax.swing.JTextField();\n jLabel9 = new javax.swing.JLabel();\n txthire = new javax.swing.JTextField();\n jLabel10 = new javax.swing.JLabel();\n txtjob = new javax.swing.JTextField();\n jLabel11 = new javax.swing.JLabel();\n txtsal = new javax.swing.JTextField();\n btnGenSleap = new javax.swing.JButton();\n btnBack = new javax.swing.JButton();\n jLabel12 = new javax.swing.JLabel();\n lbl_emp = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Search_Employee_Salary\");\n\n jPanel1.setBackground(new java.awt.Color(255, 204, 204));\n\n jLabel1.setText(\"Search Employee\");\n\n txtsearch.setText(\"Enter Employee ID\");\n txtsearch.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n txtsearchKeyReleased(evt);\n }\n });\n\n jLabel2.setText(\"Employee ID\");\n\n txtid.setEditable(false);\n\n jLabel3.setText(\"First Name\");\n\n txtfn.setEditable(false);\n\n txtln.setEditable(false);\n\n jLabel4.setText(\"Last Name\");\n\n jLabel5.setText(\"Date of Birth\");\n\n txtdob.setEditable(false);\n\n txtdep.setEditable(false);\n\n jLabel6.setText(\"Department\");\n\n jLabel7.setText(\"Designation\");\n\n txtdes.setEditable(false);\n\n jLabel8.setText(\"Status\");\n\n txtsta.setEditable(false);\n\n jLabel9.setText(\"Date Hired\");\n\n txthire.setEditable(false);\n\n jLabel10.setText(\"Job Title\");\n\n txtjob.setEditable(false);\n\n jLabel11.setText(\"Basic Salary\");\n\n txtsal.setEditable(false);\n\n btnGenSleap.setText(\"Generate Sleap\");\n btnGenSleap.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnGenSleapActionPerformed(evt);\n }\n });\n\n btnBack.setText(\"Back\");\n btnBack.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnBackActionPerformed(evt);\n }\n });\n\n jLabel12.setText(\"Logged is as: \");\n\n lbl_emp.setText(\"emp\");\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jLabel2)\n .addComponent(jLabel3)\n .addComponent(jLabel4)\n .addComponent(jLabel5)\n .addComponent(jLabel6))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(txtsearch)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtid, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtfn, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtln, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtdob, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtdep, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(56, 56, 56)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel7)\n .addComponent(jLabel8)\n .addComponent(jLabel9)\n .addComponent(jLabel10)\n .addComponent(jLabel11))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtdes, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtsta, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txthire, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtjob, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtsal, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(22, 22, 22)\n .addComponent(btnGenSleap, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(36, 36, 36)\n .addComponent(btnBack, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel12)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(lbl_emp, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(33, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7)\n .addComponent(txtdes, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel8)\n .addComponent(txtsta, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel9)\n .addComponent(txthire, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel10)\n .addComponent(txtjob, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel11)\n .addComponent(txtsal, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(txtsearch, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(txtid, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(txtfn, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(txtln, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(txtdob, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(txtdep, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 28, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnGenSleap, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnBack, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel12)\n .addComponent(lbl_emp))\n .addGap(4, 4, 4))\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.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n\n pack();\n }", "private static void newEmployee(UserType employeeType) {\n\n\t\tString username = null, password;\n\n\t\tboolean valid = false;\n\n\t\t// make sure that the username is not already taken\n\t\twhile (!valid) {\n\t\t\tSystem.out.print(\"What username would you like for your account? \");\n\t\t\tusername = input.nextLine();\n\t\t\tif (nameIsTaken(username, customerList)) {\n\t\t\t\tSystem.out.println(\"Sorry but that username has already been taken.\");\n\t\t\t} else\n\t\t\t\tvalid = true;\n\t\t}\n\t\t// set valid to false after each entry\n\t\tvalid = false;\n\n\t\tSystem.out.print(\"What password would you like for your account? \");\n\t\tpassword = input.nextLine();\n\n\t\tEmployee e = new Employee(username, password);\n\n\t\te.setType(employeeType);\n\t\temployeeList.add(e);\n\t\tcurrentUser = e;\n\t\twriteObject(employeeFile, employeeList);\n\t\temployeeDao.create(e);\n\t}", "public FrmNuevoEmpleado() {\n initComponents();\n }", "@FXML\r\n\tprivate void saveEmployee(ActionEvent event) {\r\n\t\tif (validateFields()) {\r\n\t\t\tEmployee e;\r\n\t\t\tif (newEmployee) {\r\n\t\t\t\te = new Employee();\r\n\t\t\t\tlistaStaff.getItems().add(e);\r\n\t\t\t} else {\r\n\t\t\t\te = listaStaff.getSelectionModel().getSelectedItem();\r\n\t\t\t}\r\n\t\t\te.setUsername(txUsuario.getText());\r\n\t\t\te.setPassword(txPassword.getText());\r\n\t\t\tif (checkAdmin.isSelected())\r\n\t\t\t\te.setIsAdmin(1);\r\n\t\t\telse\r\n\t\t\t\te.setIsAdmin(0);\r\n\t\t\tif (checkTPV.isSelected())\r\n\t\t\t\te.setTpvPrivilege(1);\r\n\t\t\telse\r\n\t\t\t\te.setTpvPrivilege(0);\r\n\t\t\tif (newEmployee) {\r\n\t\t\t\tservice.saveEmployee(e);\r\n\t\t\t\tnewEmployee = false;\r\n\t\t\t} else\r\n\t\t\t\tservice.updateEmployee(e);\r\n\t\t\tbtGuardar.setDisable(true);\r\n\t\t\tbtEditar.setDisable(false);\r\n\t\t\tconmuteFields();\r\n\t\t\tupdateList();\r\n\t\t}\r\n\t}", "@GetMapping(value = \"/search\")\n\tpublic String searchName(@RequestParam(name = \"fname\") String fname, Model model) {\n\t\tmodel.addAttribute(\"employees\", employeerepository.findByFnameIgnoreCaseContaining(fname));\n\t\treturn \"employeelist\";\n\t}", "private void searchJMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchJMenuItemActionPerformed\n try\n {\n // Get data on new employee--a separate form is better \n String name = JOptionPane.showInputDialog(\"Name of Employee:\"); \n boolean empExists = true;\n Employee emp = null;\n // Search for employee in employeesArrayList and if not found\n // write employee to external file and store in the ArrayList\n emp = searchEmployee(name);\n if(emp != myEmployee)\n empExists = false;\n else if(emp.equals(\"\"))\n empExists = false;\n \n if(empExists)\n {\n employeeJComboBox.setSelectedItem(emp.getName());\n listModel.clear(); // Clean JList\n String nameAndGrossPay; // Contains name and gross pay \n // Calculate gross pay\n double grossPay = emp.getHours() * emp.getRate();\n //Display name and gross pay in JList\n nameAndGrossPay = emp.getName() + \" = \" + \n dollars.format(grossPay);\n listModel.addElement(\"Gross Pay for Employee\");\n listModel.addElement(nameAndGrossPay);\n // Add the list model to the JList\n employeeJList.setModel(listModel); \n enablePrint(true);\n }\n else\n {\n JOptionPane.showMessageDialog(null, \"Employee Not Found\", \"Error!\",\n JOptionPane.WARNING_MESSAGE); \n clearAll();\n }\n }\n catch (NullPointerException ex) \n {\n JOptionPane.showMessageDialog(null, \"Employee Not Found\", \"Error!\",\n JOptionPane.WARNING_MESSAGE); \n }\n }", "@PostMapping(\"addEmployee\")\r\n\tpublic String addEmployee(@ModelAttribute(\"employee\") Employee employee) {\r\n\r\n\t\temployeeDao.addEmployee(employee);\r\n\t\t\r\n\t\treturn \"EmployeeDetails\";\r\n\t}", "@RequestMapping(\"Home1\")\r\n\tpublic String createUser1(Model m) \r\n\t{\n\t\tm.addAttribute(\"employee\",new Employee());\r\n\t\treturn \"register\";//register.jsp==form action=register\r\n\t}", "public EmployeePage() {\n initComponents();\n try {\n //Connects to database with an absolute path\n Path con = Paths.get(\"ScrumProject.FDB\").toRealPath(LinkOption.NOFOLLOW_LINKS);\n idb = new InfDB(con.toString());\n } catch (InfException | IOException e) {\n JOptionPane.showMessageDialog(null, e);\n }\n Validation val = new Validation();\n txtNameE.setText(val.getUserName(Validation.getIdInlogged()));\n txtPhoneE.setText(val.getUserTelefon(Validation.getIdInlogged()));\n txtEmailE.setText(val.getUserEmail(Validation.getIdInlogged()));\n }", "public EmployeeHome() {\n initComponents();\n }", "Employee() {\n\t}", "public void addEmployee(){\n\t\tSystem.out.println(\"Of what company is the employee?\");\n\t\tSystem.out.println(theHolding.companies());\n\t\tint selected = reader.nextInt();\n\t\treader.nextLine();\n\t\tif(selected > theHolding.getSubordinates().size()-1){\n\t\t\tSystem.out.println(\"Please select a correct option\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Name:\");\n\t\t\tString name = reader.nextLine();\n\t\t\tSystem.out.println(\"Position:\");\n\t\t\tString position = reader.nextLine();\n\t\t\tSystem.out.println(\"Mail:\");\n\t\t\tString mail = reader.nextLine();\n\t\t\tEmployee toAdd = new Employee(name, position, mail);\n\t\t\tSystem.out.println(theHolding.addEmployee(selected, toAdd));\n\t\t}\n\t}", "private void createBtnActionPerformed(java.awt.event.ActionEvent evt) {\n\n staff.setName(regName.getText());\n staff.setID(regID.getText());\n staff.setPassword(regPwd.getText());\n staff.setPosition(regPos.getSelectedItem().toString());\n staff.setGender(regGender.getSelectedItem().toString());\n staff.setEmail(regEmail.getText());\n staff.setPhoneNo(regPhone.getText());\n staff.addStaff();\n if (staff.getPosition().equals(\"Vet\")) {\n Vet vet = new Vet();\n vet.setExpertise(regExp.getSelectedItem().toString());\n vet.setExpertise_2(regExp2.getSelectedItem().toString());\n vet.addExpertise(staff.getID());\n }\n JOptionPane.showMessageDialog(null, \"User added to database\");\n updateJTable();\n }", "@Override\n public ResponseEntity createEmployee(@Valid Employee employeeRequest) {\n Employee savedemployee = employeeService.create(employeeRequest);\n URI location= ServletUriComponentsBuilder.fromCurrentRequest().path(\"/{id}\").buildAndExpand(savedemployee.getId()).toUri();\n return ResponseEntity.created(location).build();\n\n }", "public SearchEmpSalary() {\n initComponents();\n con = DatabaseHelper.getConnection();\n Toolkit toolkit = getToolkit();\n Dimension size = toolkit.getScreenSize();\n setLocation(size.width/2 - getWidth()/2, size.height/2 - getHeight()/2);\n lbl_emp.setText(String.valueOf(Emp.empName).toString());\n }", "public void createemployee(Employeee em) {\n\t\temployeerepo.save(em);\n\t}", "@RequestMapping(\"/new\")\n\tpublic String displayProjectForm(Model model) {\n\t\tProject aproject = new Project();\n\t//Iterable<Employee> employees = \tpro.getall();\n\t\n\t\tmodel.addAttribute(\"project\", aproject);\n\n\t\t//model.addAttribute(\"allEmployees\", employees);\n\t\t\n\t\t\n\t\treturn \"newproject\";\n\t\t\n\t}", "public EmployeeInfo() {\n initComponents();\n }", "@POST\n @Consumes( { \"application/xml\", \"text/xml\", \"application/json\" })\n public Response createEmployee(Employee employee) {\n final int staffNo = this.employeeMgr.createEmployee(employee);\n final URI location = createdLocation(staffNo);\n return Response.created(location).build();\n }", "public void setCreateEmp(String createEmp) {\n this.createEmp = createEmp;\n }", "@GetMapping(\"/students/new\")\n\tpublic String createStudentForm(Model model) throws ParseException\n\t{\n\t\t\n\t\tStudent student=new Student(); //To hold form Data.\n\t\t\n\t\tmodel.addAttribute(\"student\",student);\n\t\t\n\t\t// go to create_student.html page\n\t\treturn \"create_student\";\n\t}", "@GetMapping(\"/students/new\")\r\n\tpublic String createStudentForm(Model model) {\n\t\tStudent student =new Student();\r\n\t\tmodel.addAttribute(\"student\",student);\r\n\t\treturn \"create_student\";\r\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n btnBack = new javax.swing.JButton();\n jLabel4 = new javax.swing.JLabel();\n jComboBoxOrganzationType = new javax.swing.JComboBox();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jComboBoxOrganizationName = new javax.swing.JComboBox();\n jLabel3 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n tblEmployee = new javax.swing.JTable();\n btnViewProfile = new javax.swing.JButton();\n btnCreateEmployee = new javax.swing.JButton();\n jPanel1 = new javax.swing.JPanel();\n lblFirstName = new javax.swing.JLabel();\n lblLastName = new javax.swing.JLabel();\n txtFirstName = new javax.swing.JTextField();\n txtLastName = new javax.swing.JTextField();\n lblSecondaryPhoneNo = new javax.swing.JLabel();\n txtPrimaryPhoneNo = new javax.swing.JTextField();\n lblPrimaryPhoneNo = new javax.swing.JLabel();\n txtSecondaryPhoneNo = new javax.swing.JTextField();\n jSeparator1 = new javax.swing.JSeparator();\n jSeparator2 = new javax.swing.JSeparator();\n lblEmailId = new javax.swing.JLabel();\n txtEmailId = new javax.swing.JTextField();\n btnUpdateOrCreate = new javax.swing.JButton();\n lblFirstNameValidator = new javax.swing.JLabel();\n lblLastNameValidator = new javax.swing.JLabel();\n lblPrimaryPhoneNoValidator = new javax.swing.JLabel();\n lblEmailIdValidator = new javax.swing.JLabel();\n lblSecondaryPhoneValidator = new javax.swing.JLabel();\n\n setBackground(new java.awt.Color(153, 153, 153));\n\n btnBack.setBackground(new java.awt.Color(102, 102, 255));\n btnBack.setText(\"Back\");\n btnBack.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnBackActionPerformed(evt);\n }\n });\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel4.setText(\"Manage Employees !\");\n\n jComboBoxOrganzationType.setBackground(new java.awt.Color(102, 102, 255));\n jComboBoxOrganzationType.setPreferredSize(new java.awt.Dimension(200, 25));\n jComboBoxOrganzationType.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jComboBoxOrganzationTypeActionPerformed(evt);\n }\n });\n\n jLabel1.setText(\"Organization Type:\");\n\n jLabel2.setText(\"Organziation Name:\");\n\n jComboBoxOrganizationName.setBackground(new java.awt.Color(102, 102, 255));\n jComboBoxOrganizationName.setPreferredSize(new java.awt.Dimension(200, 25));\n jComboBoxOrganizationName.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jComboBoxOrganizationNameActionPerformed(evt);\n }\n });\n\n jLabel3.setText(\"Employee List of Organization-Organization Name\");\n\n tblEmployee.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Employee Id\", \"First Name\", \"Last Name\"\n }\n ) {\n boolean[] canEdit = new boolean [] {\n false, false, false\n };\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n jScrollPane1.setViewportView(tblEmployee);\n\n btnViewProfile.setBackground(new java.awt.Color(102, 102, 255));\n btnViewProfile.setText(\"View Profile\");\n btnViewProfile.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnViewProfileActionPerformed(evt);\n }\n });\n\n btnCreateEmployee.setBackground(new java.awt.Color(102, 102, 255));\n btnCreateEmployee.setText(\"Create New Employee\");\n btnCreateEmployee.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCreateEmployeeActionPerformed(evt);\n }\n });\n\n jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n jPanel1.setEnabled(false);\n jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n lblFirstName.setText(\"*First Name:\");\n lblFirstName.setEnabled(false);\n jPanel1.add(lblFirstName, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 10, -1, -1));\n\n lblLastName.setText(\"*Last Name:\");\n lblLastName.setEnabled(false);\n jPanel1.add(lblLastName, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 50, -1, -1));\n\n txtFirstName.setEnabled(false);\n jPanel1.add(txtFirstName, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 10, 150, -1));\n\n txtLastName.setEnabled(false);\n jPanel1.add(txtLastName, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 50, 150, -1));\n\n lblSecondaryPhoneNo.setText(\"Secondary Phone No:\");\n lblSecondaryPhoneNo.setEnabled(false);\n jPanel1.add(lblSecondaryPhoneNo, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 140, -1, -1));\n\n txtPrimaryPhoneNo.setEnabled(false);\n jPanel1.add(txtPrimaryPhoneNo, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 100, 150, -1));\n\n lblPrimaryPhoneNo.setText(\"*Primary Phone No:\");\n lblPrimaryPhoneNo.setEnabled(false);\n jPanel1.add(lblPrimaryPhoneNo, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 100, -1, -1));\n\n txtSecondaryPhoneNo.setEnabled(false);\n jPanel1.add(txtSecondaryPhoneNo, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 140, 150, -1));\n jPanel1.add(jSeparator1, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 170, 330, -1));\n jPanel1.add(jSeparator2, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 80, 330, -1));\n\n lblEmailId.setText(\"*Email Id:\");\n lblEmailId.setEnabled(false);\n jPanel1.add(lblEmailId, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 190, -1, -1));\n\n txtEmailId.setEnabled(false);\n jPanel1.add(txtEmailId, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 190, 150, -1));\n\n btnUpdateOrCreate.setBackground(new java.awt.Color(102, 102, 255));\n btnUpdateOrCreate.setText(\"Update or Create\");\n btnUpdateOrCreate.setEnabled(false);\n btnUpdateOrCreate.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnUpdateOrCreateActionPerformed(evt);\n }\n });\n jPanel1.add(btnUpdateOrCreate, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 230, 140, 30));\n\n lblFirstNameValidator.setForeground(new java.awt.Color(255, 0, 0));\n lblFirstNameValidator.setPreferredSize(new java.awt.Dimension(200, 20));\n jPanel1.add(lblFirstNameValidator, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 270, 340, -1));\n\n lblLastNameValidator.setForeground(new java.awt.Color(255, 0, 0));\n lblLastNameValidator.setPreferredSize(new java.awt.Dimension(200, 20));\n jPanel1.add(lblLastNameValidator, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 290, 340, -1));\n\n lblPrimaryPhoneNoValidator.setForeground(new java.awt.Color(255, 0, 0));\n lblPrimaryPhoneNoValidator.setPreferredSize(new java.awt.Dimension(200, 20));\n jPanel1.add(lblPrimaryPhoneNoValidator, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 310, 340, -1));\n\n lblEmailIdValidator.setForeground(new java.awt.Color(255, 0, 0));\n lblEmailIdValidator.setPreferredSize(new java.awt.Dimension(200, 20));\n jPanel1.add(lblEmailIdValidator, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 370, 340, -1));\n\n lblSecondaryPhoneValidator.setForeground(new java.awt.Color(255, 0, 0));\n lblSecondaryPhoneValidator.setPreferredSize(new java.awt.Dimension(200, 20));\n jPanel1.add(lblSecondaryPhoneValidator, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 340, 340, -1));\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, 705, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(btnBack)\n .addGap(235, 235, 235)\n .addComponent(jLabel4))\n .addGroup(layout.createSequentialGroup()\n .addGap(13, 13, 13)\n .addComponent(jLabel1)\n .addGap(30, 30, 30)\n .addComponent(jComboBoxOrganzationType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(13, 13, 13)\n .addComponent(jLabel2)\n .addGap(27, 27, 27)\n .addComponent(jComboBoxOrganizationName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(13, 13, 13)\n .addComponent(jLabel3))\n .addGroup(layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 652, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addComponent(btnViewProfile, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(btnCreateEmployee))\n .addGroup(layout.createSequentialGroup()\n .addGap(160, 160, 160)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 370, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(0, 0, Short.MAX_VALUE)))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 690, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btnBack)\n .addComponent(jLabel4))\n .addGap(10, 10, 10)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(3, 3, 3)\n .addComponent(jLabel1))\n .addComponent(jComboBoxOrganzationType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(23, 23, 23)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(3, 3, 3)\n .addComponent(jLabel2))\n .addComponent(jComboBoxOrganizationName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(34, 34, 34)\n .addComponent(jLabel3)\n .addGap(6, 6, 6)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(6, 6, 6)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btnViewProfile)\n .addComponent(btnCreateEmployee))\n .addGap(7, 7, 7)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 400, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE)))\n );\n }", "@RequestMapping(value=\"/addEmployeeSubmit\", method=RequestMethod.POST)\n /* Add submitted new employee details to database, and then redirect to listEmployees */\n public String addEmployeeSubmit(Employee employee) {\n employeeservice.saveEmployee(employee);\n\n return \"redirect:/employee/listEmployees\";\n }", "@RequestMapping(params = \"saveEmployee\", method = RequestMethod.POST)\n\tpublic ModelAndView addEmployee(\n\t\t\t@ModelAttribute(\"employee\") Employee employee,\n\t\t\tBindingResult result, Model m) {\n\n\t\temployee.setCreateddate(new Timestamp(new Date().getTime()));\n\t\temployee.setModifieddate(new Timestamp(new Date().getTime()));\n\t\tint empId = empServiceimpl.addUsers(employee);\n\t\tSystem.out.println(\"Employee id after save is \" + empId);\n\t\tString message = \"Employee: \" + empId + \" has been added successfully\";\n\t\t/*\n\t\t * @SuppressWarnings(\"unchecked\") List<Employee> lists =\n\t\t * service.fetchAllDetails(); m.addAttribute(\"lists\", lists);\n\t\t */\n\t\treturn new ModelAndView(\"index\", \"message\", message);\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n addNewEmployee = new javax.swing.JButton();\n update = new javax.swing.JButton();\n delete = new javax.swing.JButton();\n max = new javax.swing.JButton();\n countdesignation = new javax.swing.JButton();\n exit = new javax.swing.JButton();\n search = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n addNewEmployee.setFont(new java.awt.Font(\"Bookman Old Style\", 0, 12)); // NOI18N\n addNewEmployee.setText(\"Add new Employee\");\n addNewEmployee.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n addNewEmployeeActionPerformed(evt);\n }\n });\n\n update.setFont(new java.awt.Font(\"Bookman Old Style\", 0, 12)); // NOI18N\n update.setText(\"Update Information\");\n update.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n updateActionPerformed(evt);\n }\n });\n\n delete.setFont(new java.awt.Font(\"Bookman Old Style\", 0, 12)); // NOI18N\n delete.setText(\"Delete Information\");\n delete.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n deleteActionPerformed(evt);\n }\n });\n\n max.setFont(new java.awt.Font(\"Bookman Old Style\", 0, 12)); // NOI18N\n max.setText(\"Maximum Salary\");\n max.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n maxActionPerformed(evt);\n }\n });\n\n countdesignation.setFont(new java.awt.Font(\"Bookman Old Style\", 0, 12)); // NOI18N\n countdesignation.setText(\"Search Total number of Employee By designation\");\n countdesignation.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n countdesignationActionPerformed(evt);\n }\n });\n\n exit.setFont(new java.awt.Font(\"Bookman Old Style\", 0, 12)); // NOI18N\n exit.setText(\"Exit\");\n exit.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n exitActionPerformed(evt);\n }\n });\n\n search.setFont(new java.awt.Font(\"Bookman Old Style\", 0, 12)); // NOI18N\n search.setText(\"Search Employee\");\n search.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n searchActionPerformed(evt);\n }\n });\n\n jLabel1.setBackground(new java.awt.Color(51, 51, 51));\n jLabel1.setFont(new java.awt.Font(\"Bookman Old Style\", 1, 18)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(0, 153, 153));\n jLabel1.setText(\" Employee Management System\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(129, Short.MAX_VALUE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 335, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(123, 123, 123))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(207, 207, 207)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(search, javax.swing.GroupLayout.PREFERRED_SIZE, 149, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(addNewEmployee, javax.swing.GroupLayout.PREFERRED_SIZE, 149, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(update)\n .addComponent(delete, javax.swing.GroupLayout.PREFERRED_SIZE, 149, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(max, javax.swing.GroupLayout.PREFERRED_SIZE, 149, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addGap(254, 254, 254)\n .addComponent(exit))\n .addGroup(layout.createSequentialGroup()\n .addGap(119, 119, 119)\n .addComponent(countdesignation)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(23, 23, 23)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(addNewEmployee)\n .addGap(18, 18, 18)\n .addComponent(search)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 17, Short.MAX_VALUE)\n .addComponent(update)\n .addGap(18, 18, 18)\n .addComponent(delete)\n .addGap(30, 30, 30)\n .addComponent(max)\n .addGap(26, 26, 26)\n .addComponent(countdesignation)\n .addGap(42, 42, 42)\n .addComponent(exit)\n .addGap(37, 37, 37))\n );\n\n pack();\n }", "public FrmEmployee(Employee employee, Modes mode) {\n initComponents();\n this.employee = employee;\n this.mode = mode;\n actions = new ActionsEmployee(this);\n actions.initComponents();\n }", "Employee(String name, String password, String username, String email) {\n this.name = name;\n this.username = username;\n this.email = email;\n this.password = password;\n\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew EmployeeView().init();\r\n\t\t\t}", "public andrewNamespace.xsdconfig.EmployeeDocument.Employee addNewEmployee()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n andrewNamespace.xsdconfig.EmployeeDocument.Employee target = null;\r\n target = (andrewNamespace.xsdconfig.EmployeeDocument.Employee)get_store().add_element_user(EMPLOYEE$0);\r\n return target;\r\n }\r\n }", "public EmployeeLookup() {\r\n\t\tfill();\r\n\t\tinitialize();\r\n\t\t//AutoCompleteDecorator.decorate(el);\r\n\t}", "public void create(Employee employee, Company company, IncomingReport incoming_report) throws IllegalArgumentException, DAOException;", "@RequestMapping(value = \"/showProductGrn\", method = RequestMethod.GET)\n\t public ModelAndView showEmployee(ModelAndView model) \n\t {\n\t model.addObject(\"grnProduct\", new GrnProduct());\n\t \n\t model.setViewName(\"productgrn/createProductGrn\");\n\t \n\t\t\treturn model;\n\t }", "public void doPost(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\r\n\t\tString employeename = request.getParameter(\"employeename\");\r\n\t\tString username = request.getParameter(\"username\");\r\n\t\tString status = request.getParameter(\"status\");\r\n\t\tEmployeeService service = new EmployeeService();\r\n//\t\t当前页码\r\n\t\tString PageNumStr = request.getParameter(\"pageNum\");\r\n\t\tint pageNum=0;\r\n\t\tif (PageNumStr==null||PageNumStr.equals(\"\")) {\r\n\t\t\tpageNum=1;\r\n\t\t}else {\r\n\t\t\tpageNum=Integer.parseInt(PageNumStr);\r\n\t\t}\r\n//\t\t每页的记录数量\r\n\t\tint pageSize = service.getPageSize();\r\n//\t\t起始记录索引\r\n\t\tint start = (pageNum-1)*pageSize;\r\n//\t\t查询的数量\r\n\t\tint count = pageSize;\r\n//\t\t获得所有记录数量,先调用DAO中的Search方法\r\n\t\tservice.searchEmployees(employeename, username, status);\r\n\t\tint countOfEmployees = service.getCountOfEmployees();\r\n//\t\t页数\r\n\t\tint countOfPages = service.getCountOfPage();\r\n\t\t\r\n\t\t\r\n\t\tList<Employee> list = service.searchEmployeeOfOnePage(employeename, username, status, start, count);\r\n\t\trequest.setAttribute(\"employeeslist\", list);\r\n//\t\t使用search标记调用了SearchEmployeesServlet,即显示结果表格\r\n\t\trequest.setAttribute(\"search\", \"1\");\r\n//\t\t存储页数,所有记录的数量,当前页码\r\n\t\trequest.setAttribute(\"countOfPages\", countOfPages);\r\n\t\trequest.setAttribute(\"countOfEmployees\", countOfEmployees);\r\n\t\trequest.setAttribute(\"pageNum\", pageNum);\r\n\t\trequest.getRequestDispatcher(\"searchemployees.jsp\").forward(request, response);\r\n\t\t\r\n\t}", "public Employee() {\t}", "@FXML\r\n\tprivate void newEmployee(ActionEvent event) {\r\n\t\tnewEmployee = true;\r\n\t\tputEditables(true);\r\n\t\teraseFieldsContent();\r\n\t\tbtEditar.setDisable(true);\r\n\t\tbtGuardar.setDisable(false);\r\n\t\tbtDelete.setDisable(true);\r\n\t}", "public FrmCrearEmpleado() {\n initComponents();\n tFecha.setDate(new Date());\n }", "public Employee(String employeeId, String name) {\n this.employeeId = employeeId;\n this.name = name; // TODO fill in code here\n }", "public Employee(String nama, int usia) {\r\n // Constructor digunakan untuk inisialisasi value, yang di inisiate saat melakukan instantiation\r\n this.nama = nama;\r\n this.usia = usia;\r\n }", "@PostMapping(\"/addNewEmployee/save\")\n public String saveEmployee(@ModelAttribute(\"employee\") Employee employee){\n employeeService.saveEmployee(employee);\n return \"redirect:/\";\n }", "public Employee() {\n }", "public Employee() {\n }", "public Employee() {\n }", "private void visitToSearch() {\n if (search_Attendance==null) {\n search_Attendance=new Search_Attendance();\n search_Attendance.setVisible(true);\n } else {\n search_Attendance.setVisible(true);\n }\n }", "public Employee() {}", "public EmployeeDTO createEmployee(final EmployeeDTO createEmployeeDTO) throws ApplicationCustomException;", "private Employee addEmployee(int id, String name, String address) {\r\n\t\treturn new Employee(id, name, address);\r\n\t}", "public Employee() {\n \n }", "public Employee(){\r\n }", "@Override\n\tpublic void create(Empleado e) {\n\t\tSystem.out.println(\"Graba el empleado \" + e + \" en la BBDD.\");\n\t}", "@RequestMapping(value=\"/clear\", method = RequestMethod.GET)\r\n\tpublic String clearEmployeeForm(Model model, HttpServletRequest request) {\r\n\t\t\r\n\t\tcom.ps.model.Model.MODE = \"Add\";\r\n\t\tmodel.addAttribute(\"employeeData\", new EmployeeModel());\r\n\t\treturn \"search-employee\";\r\n\t}", "public AddEmployeeGUI() {\r\n\t\tsetBackground(Color.RED);\r\n\t\tsetTitle(\"Add Employee\");\r\n\t\tsetDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n\t\tsetBounds(100, 100, 450, 500);\r\n\t\tcontentPane = new JPanel();\r\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\r\n\t\tsetContentPane(contentPane);\r\n\t\tcontentPane.setLayout(null);\r\n\r\n\t\tJLabel lblSelectEmployeeType = new JLabel(\"Select Employee Type\");\r\n\t\tlblSelectEmployeeType.setBounds(5, 0, 207, 25);\r\n\t\tcontentPane.add(lblSelectEmployeeType);\r\n\r\n\t\tlabel = new JLabel(\"\");\r\n\t\tlabel.setBounds(180, 36, 212, 24);\r\n\t\tcontentPane.add(label);\r\n\r\n\t\tJLabel lblFirstName = new JLabel(\"First Name\");\r\n\t\tlblFirstName.setBounds(5, 55, 207, 45);\r\n\t\tcontentPane.add(lblFirstName);\r\n\r\n\t\ttxtFirstName = new JTextField();\r\n\t\ttxtFirstName.setBounds(180, 71, 212, 24);\r\n\t\tcontentPane.add(txtFirstName);\r\n\t\ttxtFirstName.setColumns(10);\r\n\r\n\t\tJLabel lblLastName = new JLabel(\"Last Name\");\r\n\t\tlblLastName.setBounds(5, 105, 207, 45);\r\n\t\tcontentPane.add(lblLastName);\r\n\r\n\t\ttxtLastName = new JTextField();\r\n\t\ttxtLastName.setBounds(180, 119, 212, 24);\r\n\t\tcontentPane.add(txtLastName);\r\n\t\ttxtLastName.setColumns(10);\r\n\r\n\t\tJLabel lblDateOfBirth = new JLabel(\"Date of Birth (yyyy-mm-dd)\");\r\n\t\tlblDateOfBirth.setBounds(5, 155, 207, 45);\r\n\t\tcontentPane.add(lblDateOfBirth);\r\n\r\n\t\ttxtDOB = new JTextField();\r\n\t\ttxtDOB.setBounds(180, 167, 212, 24);\r\n\t\tcontentPane.add(txtDOB);\r\n\t\ttxtDOB.setColumns(10);\r\n\r\n\t\tJLabel lblTelephoneNo = new JLabel(\"Telephone no.\");\r\n\t\tlblTelephoneNo.setBounds(5, 205, 207, 45);\r\n\t\tcontentPane.add(lblTelephoneNo);\r\n\r\n\t\ttxtTel = new JTextField();\r\n\t\ttxtTel.setBounds(180, 215, 212, 24);\r\n\t\tcontentPane.add(txtTel);\r\n\t\ttxtTel.setColumns(10);\r\n\r\n\t\tJLabel lblEmail = new JLabel(\"Email\");\r\n\t\tlblEmail.setBounds(5, 255, 207, 45);\r\n\t\tcontentPane.add(lblEmail);\r\n\r\n\t\ttxtEmail = new JTextField();\r\n\t\ttxtEmail.setBounds(180, 263, 212, 24);\r\n\t\tcontentPane.add(txtEmail);\r\n\t\ttxtEmail.setColumns(10);\r\n\r\n\t\tJLabel lblGener = new JLabel(\"Gender\");\r\n\t\tlblGener.setBounds(5, 305, 207, 45);\r\n\t\tcontentPane.add(lblGener);\r\n\r\n\t\ttxtGender = new JTextField();\r\n\t\ttxtGender.setBounds(180, 311, 212, 24);\r\n\t\tcontentPane.add(txtGender);\r\n\t\ttxtGender.setColumns(10);\r\n\r\n\t\tJLabel lblStartDate = new JLabel(\"Start Date (yyyy-mm-dd)\");\r\n\t\tlblStartDate.setBounds(5, 355, 207, 45);\r\n\t\tcontentPane.add(lblStartDate);\r\n\r\n\t\ttxtStartDate = new JTextField();\r\n\t\ttxtStartDate.setBounds(180, 359, 212, 24);\r\n\t\tcontentPane.add(txtStartDate);\r\n\t\ttxtStartDate.setColumns(10);\r\n\r\n\t\tlabel_1 = new JLabel(\" \");\r\n\t\tlabel_1.setBounds(5, 405, 207, 50);\r\n\t\tcontentPane.add(label_1);\r\n\r\n\t\tbtnAdd = new JButton(\"Add\");\r\n\t\tbtnAdd.setBounds(325, 405, 67, 24);\r\n\t\tcontentPane.add(btnAdd);\r\n\t}", "private void doCreateEmployee() {\n Scanner sc = new Scanner(System.in);\n Employee newEmployee = new Employee();\n int response;\n\n System.out.println(\"*** Hors Management System::System Administration::Create New Employee ***\");\n System.out.print(\"Enter First name>\");\n newEmployee.setFirstName(sc.nextLine().trim());\n System.out.print(\"Enter Last name>\");\n newEmployee.setLastName(sc.nextLine().trim());\n\n while (true) {\n System.out.println(\"Select Job Role:\");\n System.out.println(\"1. System Administrator\");\n System.out.println(\"2. Operation Manager\");\n System.out.println(\"3. Sales Manager\");\n System.out.println(\"4. Guest Officer\\n\");\n\n response = sc.nextInt();\n\n //set job role\n if (response >= 1 && response <= 4) {\n newEmployee.setJobRole(JobRoleEnum.values()[response - 1]);\n break;\n } else {\n System.out.println(\"Invalid option, please try again \\n\");\n }\n }\n sc.nextLine();\n System.out.print(\"Enter Username\");\n newEmployee.setUserName(sc.nextLine().trim());\n System.out.println(\"Enter Password\");\n newEmployee.setPassword(sc.nextLine().trim());\n\n Set<ConstraintViolation<Employee>> constraintViolations = validator.validate(newEmployee);\n\n if (constraintViolations.isEmpty()) {\n newEmployee = employeeControllerRemote.createNewEmployee(newEmployee);\n System.out.println(\"New Staff created successfully, employee ID is: \"+newEmployee.getEmployeeId());\n }else{\n showInputDataValidationErrorsForEmployee(constraintViolations);\n }\n\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tstr1 = name.getText().trim();\n\t\t\t\tif(str1.length()==0)\n\t\t\t\t\tsqlStr1 = \"\";\n\t\t\t\telse\n\t\t\t\t\tsqlStr1 = \" and name like '%\"+str1+\"%'\";\n\t\t\t\tstr2 = (String)gender.getSelectedItem();\n\t\t\t\tif(str2.equals(\"不限\"))\n\t\t\t\t\tsqlStr2 = \"\";\n\t\t\t\telse\n\t\t\t\t\tsqlStr2 = \" and gender = '\"+str2+\"'\";\n\t\t\t\tstr3 = address.getText();\n\t\t\t\tif(str3.length()==0)\n\t\t\t\t\tsqlStr3 = \"\";\n\t\t\t\telse\n\t\t\t\t\tsqlStr3 = \" and address = '%\"+str3+\"%'\";\n\t\t\t\tstr4 = (String)study.getSelectedItem();\n\t\t\t\tif(str4.equals(\"不限\"))\n\t\t\t\t\tsqlStr4 = \"\";\n\t\t\t\telse\n\t\t\t\t\tsqlStr4 = \" and study = '\"+str4+\"'\";\n\t\t\t\tselect = \"select number,name,gender,age,study,mobilephone,joindate,address from employee where description like '%' \"+sqlStr1+sqlStr2+sqlStr3+sqlStr4;\n\t\t\t\ttable = new EmployeeTable(select).getTable();\n\t\t\t\troot.removeAll();\n\t\t\t\troot.add(new JScrollPane(table));\n\t\t\t\troot.revalidate();\n//\t\t\t\tfor(;root.getParent()!=null;root = root.getParent());\n//\t\t\t\troot.setVisible(true);\n\t\t\t\tdispose();\n\t\t\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jTextFieldSearchIDEmployee = new javax.swing.JTextField();\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 jLabel9 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n jTextFieldName = new javax.swing.JTextField();\n jTextFieldUserName = new javax.swing.JTextField();\n jTextFieldID = new javax.swing.JTextField();\n jTextFieldSalary = new javax.swing.JTextField();\n jTextFieldEmail = new javax.swing.JTextField();\n jTextFieldQualification = new javax.swing.JTextField();\n jLabelSuccessOrFail = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jTextFieldPass = new javax.swing.JTextField();\n jLabel11 = new javax.swing.JLabel();\n jTextFieldPhoneNo = new javax.swing.JTextField();\n jTextFieldAge = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n jLabel12 = new javax.swing.JLabel();\n jComboBoxGender = new javax.swing.JComboBox<>();\n jSeparator10 = new javax.swing.JSeparator();\n jPanelWrongID = new javax.swing.JPanel();\n jLabelID = new javax.swing.JLabel();\n jPanelNotAllowed = new javax.swing.JPanel();\n jLabelNotAllawed = new javax.swing.JLabel();\n jPanelWrongName = new javax.swing.JPanel();\n jLabelWrongName = new javax.swing.JLabel();\n jPanelWrongUserName = new javax.swing.JPanel();\n jLabelWrongUserName = new javax.swing.JLabel();\n jPanelWrongPass = new javax.swing.JPanel();\n jLabelWrongPass = new javax.swing.JLabel();\n jPanelWrongEmail = new javax.swing.JPanel();\n jLabelWrongEmail = new javax.swing.JLabel();\n jPanelWrongSalary = new javax.swing.JPanel();\n jLabelWrongSalary = new javax.swing.JLabel();\n jPanelWrongQualification = new javax.swing.JPanel();\n jLabelWrongQualification = new javax.swing.JLabel();\n jPanelWrongAge = new javax.swing.JPanel();\n jLabelWrongAge = new javax.swing.JLabel();\n jPanelWrongPhoneNo = new javax.swing.JPanel();\n jLabelWrongPhoneNo = new javax.swing.JLabel();\n jPanelWrongIDEmployee = new javax.swing.JPanel();\n jLabelID1 = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n jLabelReset = new javax.swing.JLabel();\n jLabel20 = new javax.swing.JLabel();\n jLabel19 = new javax.swing.JLabel();\n jPanel1 = new javax.swing.JPanel();\n jLabelSearch = new javax.swing.JLabel();\n jLabel21 = new javax.swing.JLabel();\n jLabel22 = new javax.swing.JLabel();\n jPanelDelete = new javax.swing.JPanel();\n jLabel13 = new javax.swing.JLabel();\n jPanel3 = new javax.swing.JPanel();\n jLabel18 = new javax.swing.JLabel();\n\n setBackground(java.awt.SystemColor.controlDkShadow);\n\n jTextFieldSearchIDEmployee.setFont(new java.awt.Font(\"Monotype Corsiva\", 0, 20)); // NOI18N\n jTextFieldSearchIDEmployee.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n jTextFieldSearchIDEmployee.setBorder(null);\n jTextFieldSearchIDEmployee.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextFieldSearchIDEmployeeActionPerformed(evt);\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Monotype Corsiva\", 0, 20)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(255, 255, 255));\n jLabel1.setText(\"ID\");\n\n jLabel2.setFont(new java.awt.Font(\"Monotype Corsiva\", 0, 20)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(255, 255, 255));\n jLabel2.setText(\"Name\");\n\n jLabel3.setFont(new java.awt.Font(\"Monotype Corsiva\", 0, 20)); // NOI18N\n jLabel3.setForeground(new java.awt.Color(255, 255, 255));\n jLabel3.setText(\"User Name\");\n\n jLabel4.setFont(new java.awt.Font(\"Monotype Corsiva\", 0, 20)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(255, 255, 255));\n jLabel4.setText(\"Password\");\n\n jLabel5.setFont(new java.awt.Font(\"Monotype Corsiva\", 0, 20)); // NOI18N\n jLabel5.setForeground(new java.awt.Color(255, 255, 255));\n jLabel5.setText(\"E-Mail\");\n\n jLabel9.setFont(new java.awt.Font(\"Monotype Corsiva\", 0, 20)); // NOI18N\n jLabel9.setForeground(new java.awt.Color(255, 255, 255));\n jLabel9.setText(\"Salary\");\n\n jLabel10.setFont(new java.awt.Font(\"Monotype Corsiva\", 0, 20)); // NOI18N\n jLabel10.setForeground(new java.awt.Color(255, 255, 255));\n jLabel10.setText(\"Qualification\");\n\n jTextFieldName.setFont(new java.awt.Font(\"Monotype Corsiva\", 0, 18)); // NOI18N\n jTextFieldName.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n jTextFieldName.setBorder(null);\n\n jTextFieldUserName.setFont(new java.awt.Font(\"Monotype Corsiva\", 0, 18)); // NOI18N\n jTextFieldUserName.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n jTextFieldUserName.setBorder(null);\n\n jTextFieldID.setFont(new java.awt.Font(\"Monotype Corsiva\", 0, 18)); // NOI18N\n jTextFieldID.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n jTextFieldID.setBorder(null);\n jTextFieldID.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextFieldIDActionPerformed(evt);\n }\n });\n\n jTextFieldSalary.setFont(new java.awt.Font(\"Monotype Corsiva\", 0, 18)); // NOI18N\n jTextFieldSalary.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n jTextFieldSalary.setBorder(null);\n\n jTextFieldEmail.setFont(new java.awt.Font(\"Monotype Corsiva\", 0, 18)); // NOI18N\n jTextFieldEmail.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n jTextFieldEmail.setBorder(null);\n\n jTextFieldQualification.setFont(new java.awt.Font(\"Monotype Corsiva\", 0, 18)); // NOI18N\n jTextFieldQualification.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n jTextFieldQualification.setBorder(null);\n jTextFieldQualification.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextFieldQualificationActionPerformed(evt);\n }\n });\n\n jLabelSuccessOrFail.setFont(new java.awt.Font(\"Monotype Corsiva\", 0, 20)); // NOI18N\n jLabelSuccessOrFail.setForeground(new java.awt.Color(255, 255, 255));\n jLabelSuccessOrFail.setText(\"Search For Employee ... !\");\n\n jLabel7.setFont(new java.awt.Font(\"Monotype Corsiva\", 0, 20)); // NOI18N\n jLabel7.setForeground(new java.awt.Color(255, 255, 255));\n jLabel7.setText(\"ID Employee\");\n\n jTextFieldPass.setFont(new java.awt.Font(\"Monotype Corsiva\", 0, 18)); // NOI18N\n jTextFieldPass.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n jTextFieldPass.setBorder(null);\n\n jLabel11.setFont(new java.awt.Font(\"Monotype Corsiva\", 0, 20)); // NOI18N\n jLabel11.setForeground(new java.awt.Color(255, 255, 255));\n jLabel11.setText(\"Gender\");\n\n jTextFieldPhoneNo.setFont(new java.awt.Font(\"Monotype Corsiva\", 0, 18)); // NOI18N\n jTextFieldPhoneNo.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n jTextFieldPhoneNo.setBorder(null);\n\n jTextFieldAge.setFont(new java.awt.Font(\"Monotype Corsiva\", 0, 18)); // NOI18N\n jTextFieldAge.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n jTextFieldAge.setBorder(null);\n\n jLabel6.setFont(new java.awt.Font(\"Monotype Corsiva\", 0, 20)); // NOI18N\n jLabel6.setForeground(new java.awt.Color(255, 255, 255));\n jLabel6.setText(\"Age\");\n\n jLabel12.setFont(new java.awt.Font(\"Monotype Corsiva\", 0, 20)); // NOI18N\n jLabel12.setForeground(new java.awt.Color(255, 255, 255));\n jLabel12.setText(\"Phone No.\");\n\n jComboBoxGender.setFont(new java.awt.Font(\"Monotype Corsiva\", 0, 18)); // NOI18N\n jComboBoxGender.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Male\" , \"Famele\"}));\n jComboBoxGender.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jComboBoxGenderActionPerformed(evt);\n }\n });\n\n jPanelWrongID.setBackground(java.awt.SystemColor.controlDkShadow);\n\n jLabelID.setFont(new java.awt.Font(\"Monotype Corsiva\", 0, 18)); // NOI18N\n jLabelID.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Image/icons8_Cancel_20px.png\"))); // NOI18N\n jLabelID.setText(\"Wrong ID\");\n\n javax.swing.GroupLayout jPanelWrongIDLayout = new javax.swing.GroupLayout(jPanelWrongID);\n jPanelWrongID.setLayout(jPanelWrongIDLayout);\n jPanelWrongIDLayout.setHorizontalGroup(\n jPanelWrongIDLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelWrongIDLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabelID, javax.swing.GroupLayout.DEFAULT_SIZE, 101, Short.MAX_VALUE))\n );\n jPanelWrongIDLayout.setVerticalGroup(\n jPanelWrongIDLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelWrongIDLayout.createSequentialGroup()\n .addComponent(jLabelID)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n\n jPanelNotAllowed.setBackground(java.awt.SystemColor.controlDkShadow);\n\n jLabelNotAllawed.setFont(new java.awt.Font(\"Monotype Corsiva\", 0, 18)); // NOI18N\n jLabelNotAllawed.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Image/icons8_Cancel_20px.png\"))); // NOI18N\n jLabelNotAllawed.setText(\"Not Allowed\");\n\n javax.swing.GroupLayout jPanelNotAllowedLayout = new javax.swing.GroupLayout(jPanelNotAllowed);\n jPanelNotAllowed.setLayout(jPanelNotAllowedLayout);\n jPanelNotAllowedLayout.setHorizontalGroup(\n jPanelNotAllowedLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelNotAllowedLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabelNotAllawed, javax.swing.GroupLayout.DEFAULT_SIZE, 117, Short.MAX_VALUE))\n );\n jPanelNotAllowedLayout.setVerticalGroup(\n jPanelNotAllowedLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelNotAllowedLayout.createSequentialGroup()\n .addComponent(jLabelNotAllawed)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n\n jPanelWrongName.setBackground(java.awt.SystemColor.controlDkShadow);\n\n jLabelWrongName.setFont(new java.awt.Font(\"Monotype Corsiva\", 0, 18)); // NOI18N\n jLabelWrongName.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Image/icons8_Cancel_20px.png\"))); // NOI18N\n jLabelWrongName.setText(\"Wrong Name\");\n\n javax.swing.GroupLayout jPanelWrongNameLayout = new javax.swing.GroupLayout(jPanelWrongName);\n jPanelWrongName.setLayout(jPanelWrongNameLayout);\n jPanelWrongNameLayout.setHorizontalGroup(\n jPanelWrongNameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelWrongNameLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabelWrongName, javax.swing.GroupLayout.PREFERRED_SIZE, 227, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanelWrongNameLayout.setVerticalGroup(\n jPanelWrongNameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelWrongNameLayout.createSequentialGroup()\n .addComponent(jLabelWrongName)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n\n jPanelWrongUserName.setBackground(java.awt.SystemColor.controlDkShadow);\n\n jLabelWrongUserName.setFont(new java.awt.Font(\"Monotype Corsiva\", 0, 18)); // NOI18N\n jLabelWrongUserName.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Image/icons8_Cancel_20px.png\"))); // NOI18N\n jLabelWrongUserName.setText(\"Wrong User Name\");\n\n javax.swing.GroupLayout jPanelWrongUserNameLayout = new javax.swing.GroupLayout(jPanelWrongUserName);\n jPanelWrongUserName.setLayout(jPanelWrongUserNameLayout);\n jPanelWrongUserNameLayout.setHorizontalGroup(\n jPanelWrongUserNameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelWrongUserNameLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabelWrongUserName, javax.swing.GroupLayout.DEFAULT_SIZE, 155, Short.MAX_VALUE))\n );\n jPanelWrongUserNameLayout.setVerticalGroup(\n jPanelWrongUserNameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelWrongUserNameLayout.createSequentialGroup()\n .addComponent(jLabelWrongUserName)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n\n jPanelWrongPass.setBackground(java.awt.SystemColor.controlDkShadow);\n\n jLabelWrongPass.setFont(new java.awt.Font(\"Monotype Corsiva\", 0, 18)); // NOI18N\n jLabelWrongPass.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Image/icons8_Cancel_20px.png\"))); // NOI18N\n jLabelWrongPass.setText(\"Wrong Pass\");\n\n javax.swing.GroupLayout jPanelWrongPassLayout = new javax.swing.GroupLayout(jPanelWrongPass);\n jPanelWrongPass.setLayout(jPanelWrongPassLayout);\n jPanelWrongPassLayout.setHorizontalGroup(\n jPanelWrongPassLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelWrongPassLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabelWrongPass, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanelWrongPassLayout.setVerticalGroup(\n jPanelWrongPassLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelWrongPassLayout.createSequentialGroup()\n .addComponent(jLabelWrongPass)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n\n jPanelWrongEmail.setBackground(java.awt.SystemColor.controlDkShadow);\n\n jLabelWrongEmail.setFont(new java.awt.Font(\"Monotype Corsiva\", 0, 18)); // NOI18N\n jLabelWrongEmail.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Image/icons8_Cancel_20px.png\"))); // NOI18N\n jLabelWrongEmail.setText(\"Wrong E-Mail\");\n\n javax.swing.GroupLayout jPanelWrongEmailLayout = new javax.swing.GroupLayout(jPanelWrongEmail);\n jPanelWrongEmail.setLayout(jPanelWrongEmailLayout);\n jPanelWrongEmailLayout.setHorizontalGroup(\n jPanelWrongEmailLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelWrongEmailLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabelWrongEmail, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanelWrongEmailLayout.setVerticalGroup(\n jPanelWrongEmailLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelWrongEmailLayout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jLabelWrongEmail))\n );\n\n jPanelWrongSalary.setBackground(java.awt.SystemColor.controlDkShadow);\n\n jLabelWrongSalary.setFont(new java.awt.Font(\"Monotype Corsiva\", 0, 18)); // NOI18N\n jLabelWrongSalary.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Image/icons8_Cancel_20px.png\"))); // NOI18N\n jLabelWrongSalary.setText(\"Wrong Salary\");\n\n javax.swing.GroupLayout jPanelWrongSalaryLayout = new javax.swing.GroupLayout(jPanelWrongSalary);\n jPanelWrongSalary.setLayout(jPanelWrongSalaryLayout);\n jPanelWrongSalaryLayout.setHorizontalGroup(\n jPanelWrongSalaryLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelWrongSalaryLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabelWrongSalary)\n .addContainerGap(34, Short.MAX_VALUE))\n );\n jPanelWrongSalaryLayout.setVerticalGroup(\n jPanelWrongSalaryLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelWrongSalaryLayout.createSequentialGroup()\n .addComponent(jLabelWrongSalary)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n\n jPanelWrongQualification.setBackground(java.awt.SystemColor.controlDkShadow);\n\n jLabelWrongQualification.setFont(new java.awt.Font(\"Monotype Corsiva\", 0, 18)); // NOI18N\n jLabelWrongQualification.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Image/icons8_Cancel_20px.png\"))); // NOI18N\n jLabelWrongQualification.setText(\"Wrong Qualification\");\n\n javax.swing.GroupLayout jPanelWrongQualificationLayout = new javax.swing.GroupLayout(jPanelWrongQualification);\n jPanelWrongQualification.setLayout(jPanelWrongQualificationLayout);\n jPanelWrongQualificationLayout.setHorizontalGroup(\n jPanelWrongQualificationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelWrongQualificationLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabelWrongQualification)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanelWrongQualificationLayout.setVerticalGroup(\n jPanelWrongQualificationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelWrongQualificationLayout.createSequentialGroup()\n .addComponent(jLabelWrongQualification)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n\n jPanelWrongAge.setBackground(java.awt.SystemColor.controlDkShadow);\n\n jLabelWrongAge.setFont(new java.awt.Font(\"Monotype Corsiva\", 0, 18)); // NOI18N\n jLabelWrongAge.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Image/icons8_Cancel_20px.png\"))); // NOI18N\n jLabelWrongAge.setText(\"Wrong Age\");\n\n javax.swing.GroupLayout jPanelWrongAgeLayout = new javax.swing.GroupLayout(jPanelWrongAge);\n jPanelWrongAge.setLayout(jPanelWrongAgeLayout);\n jPanelWrongAgeLayout.setHorizontalGroup(\n jPanelWrongAgeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelWrongAgeLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabelWrongAge, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(20, Short.MAX_VALUE))\n );\n jPanelWrongAgeLayout.setVerticalGroup(\n jPanelWrongAgeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelWrongAgeLayout.createSequentialGroup()\n .addComponent(jLabelWrongAge)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n\n jPanelWrongPhoneNo.setBackground(java.awt.SystemColor.controlDkShadow);\n\n jLabelWrongPhoneNo.setFont(new java.awt.Font(\"Monotype Corsiva\", 0, 18)); // NOI18N\n jLabelWrongPhoneNo.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Image/icons8_Cancel_20px.png\"))); // NOI18N\n jLabelWrongPhoneNo.setText(\"Wrong Phone No\");\n\n javax.swing.GroupLayout jPanelWrongPhoneNoLayout = new javax.swing.GroupLayout(jPanelWrongPhoneNo);\n jPanelWrongPhoneNo.setLayout(jPanelWrongPhoneNoLayout);\n jPanelWrongPhoneNoLayout.setHorizontalGroup(\n jPanelWrongPhoneNoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelWrongPhoneNoLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabelWrongPhoneNo)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanelWrongPhoneNoLayout.setVerticalGroup(\n jPanelWrongPhoneNoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelWrongPhoneNoLayout.createSequentialGroup()\n .addComponent(jLabelWrongPhoneNo)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n\n jPanelWrongIDEmployee.setBackground(java.awt.SystemColor.controlDkShadow);\n\n jLabelID1.setFont(new java.awt.Font(\"Monotype Corsiva\", 0, 18)); // NOI18N\n jLabelID1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Image/icons8_Cancel_20px.png\"))); // NOI18N\n jLabelID1.setText(\"Wrong Search Key\");\n\n javax.swing.GroupLayout jPanelWrongIDEmployeeLayout = new javax.swing.GroupLayout(jPanelWrongIDEmployee);\n jPanelWrongIDEmployee.setLayout(jPanelWrongIDEmployeeLayout);\n jPanelWrongIDEmployeeLayout.setHorizontalGroup(\n jPanelWrongIDEmployeeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelWrongIDEmployeeLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabelID1, javax.swing.GroupLayout.DEFAULT_SIZE, 153, Short.MAX_VALUE))\n );\n jPanelWrongIDEmployeeLayout.setVerticalGroup(\n jPanelWrongIDEmployeeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelWrongIDEmployeeLayout.createSequentialGroup()\n .addComponent(jLabelID1)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n\n jPanel2.setBackground(java.awt.SystemColor.controlDkShadow);\n\n jLabelReset.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Image/icons8_Reset_96px.png\"))); // NOI18N\n jLabelReset.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabelResetMouseClicked(evt);\n }\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n jLabelResetMouseEntered(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n jLabelResetMouseExited(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabelReset, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabelReset, javax.swing.GroupLayout.DEFAULT_SIZE, 107, Short.MAX_VALUE)\n );\n\n jLabel20.setFont(new java.awt.Font(\"Monotype Corsiva\", 0, 20)); // NOI18N\n jLabel20.setForeground(new java.awt.Color(255, 255, 255));\n jLabel20.setText(\"Reset\");\n\n jLabel19.setFont(new java.awt.Font(\"Monotype Corsiva\", 0, 20)); // NOI18N\n jLabel19.setForeground(new java.awt.Color(255, 255, 255));\n jLabel19.setText(\"Search\");\n\n jPanel1.setBackground(java.awt.SystemColor.controlDkShadow);\n\n jLabelSearch.setBackground(java.awt.SystemColor.controlDkShadow);\n jLabelSearch.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Image/icons8_Find_and_Replace_96px.png\"))); // NOI18N\n jLabelSearch.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabelSearchMouseClicked(evt);\n }\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n jLabelSearchMouseEntered(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n jLabelSearchMouseExited(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabelSearch, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabelSearch, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 107, Short.MAX_VALUE)\n );\n\n jLabel21.setFont(new java.awt.Font(\"Monotype Corsiva\", 0, 20)); // NOI18N\n jLabel21.setForeground(new java.awt.Color(255, 255, 255));\n jLabel21.setText(\"Update Employee\");\n\n jLabel22.setFont(new java.awt.Font(\"Monotype Corsiva\", 0, 20)); // NOI18N\n jLabel22.setForeground(new java.awt.Color(255, 255, 255));\n jLabel22.setText(\"Remove Employee\");\n\n jPanelDelete.setBackground(java.awt.SystemColor.controlDkShadow);\n\n jLabel13.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Image/icons8_Delete_Shield_96px_1.png\"))); // NOI18N\n jLabel13.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel13MouseClicked(evt);\n }\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n jLabel13MouseEntered(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n jLabel13MouseExited(evt);\n }\n });\n\n javax.swing.GroupLayout jPanelDeleteLayout = new javax.swing.GroupLayout(jPanelDelete);\n jPanelDelete.setLayout(jPanelDeleteLayout);\n jPanelDeleteLayout.setHorizontalGroup(\n jPanelDeleteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelDeleteLayout.createSequentialGroup()\n .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n jPanelDeleteLayout.setVerticalGroup(\n jPanelDeleteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelDeleteLayout.createSequentialGroup()\n .addGap(0, 0, 0)\n .addComponent(jLabel13, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGap(0, 0, 0))\n );\n\n jPanel3.setBackground(java.awt.SystemColor.controlDkShadow);\n\n jLabel18.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Image/icons8_Available_Updates_96px.png\"))); // NOI18N\n jLabel18.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel18MouseClicked(evt);\n }\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n jLabel18MouseEntered(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n jLabel18MouseExited(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\n jPanel3.setLayout(jPanel3Layout);\n jPanel3Layout.setHorizontalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jLabel18)\n .addGap(0, 0, 0))\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jLabel18))\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 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\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.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(10, 10, 10)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jTextFieldID)\n .addComponent(jTextFieldUserName)\n .addComponent(jTextFieldName, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 361, Short.MAX_VALUE)\n .addComponent(jTextFieldPass, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 361, Short.MAX_VALUE)))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(10, 10, 10)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jTextFieldEmail, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 361, Short.MAX_VALUE)\n .addComponent(jTextFieldQualification, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 361, Short.MAX_VALUE)\n .addComponent(jTextFieldSalary, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 361, Short.MAX_VALUE)\n .addComponent(jTextFieldPhoneNo, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 361, Short.MAX_VALUE)\n .addComponent(jTextFieldAge, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 361, Short.MAX_VALUE)\n .addComponent(jComboBoxGender, javax.swing.GroupLayout.PREFERRED_SIZE, 169, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanelWrongID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanelNotAllowed, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(69, 69, 69))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jPanelWrongEmail, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jPanelWrongPass, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanelWrongName, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanelWrongUserName, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addComponent(jPanelWrongSalary, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanelWrongQualification, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanelWrongAge, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanelWrongPhoneNo, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(50, 50, 50))))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 157, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jSeparator10)\n .addComponent(jTextFieldSearchIDEmployee, javax.swing.GroupLayout.PREFERRED_SIZE, 302, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanelWrongIDEmployee, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(25, 25, 25)))\n .addGap(40, 40, 40)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel19, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(20, 20, 20)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel20, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addComponent(jLabelSuccessOrFail, javax.swing.GroupLayout.PREFERRED_SIZE, 510, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addGap(175, 175, 175)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(20, 20, 20)\n .addComponent(jPanelDelete, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(100, 100, 100)\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel22, javax.swing.GroupLayout.PREFERRED_SIZE, 163, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(28, 28, 28)\n .addComponent(jLabel21, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE)))))\n .addGap(0, 114, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(2, 2, 2)\n .addComponent(jLabelSuccessOrFail, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(20, 20, 20)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jTextFieldSearchIDEmployee, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(1, 1, 1)\n .addComponent(jSeparator10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(5, 5, 5)\n .addComponent(jPanelWrongIDEmployee, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(3, 3, 3)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel20)\n .addComponent(jLabel19))\n .addGap(20, 20, 20)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextFieldID, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jPanelWrongID, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanelNotAllowed, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(10, 10, 10)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextFieldName, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jPanelWrongName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(10, 10, 10)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jPanelWrongUserName, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextFieldUserName, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(10, 10, 10)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextFieldPass, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jPanelWrongPass, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGap(10, 10, 10)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanelWrongEmail, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextFieldEmail, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(10, 10, 10)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextFieldSalary, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jPanelWrongSalary, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(10, 10, 10)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jPanelWrongQualification, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextFieldQualification, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(10, 10, 10)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jPanelWrongAge, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextFieldAge, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(10, 10, 10)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jPanelWrongPhoneNo, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextFieldPhoneNo, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(10, 10, 10)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jComboBoxGender, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(10, 10, 10)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanelDelete, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(5, 5, 5)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel22)\n .addComponent(jLabel21))\n .addGap(20, 20, 20))\n );\n }", "public Employee(){\n\t\t\n\t}", "public Employee(){\n\t\t\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n try (PrintWriter out = response.getWriter()) {\n out.println(\"<html>\");\n out.println(\"<head>\");\n out.println(\"<title>Create a new Employee Record</title>\");\n out.println(\"</head>\");\n out.println(\"<body>\");\n out.println(\"<h1>Enter New Employee information</h1>\");\n out.println(\"<form action=\\\"\" + request.getContextPath() + \"/CreateEmployee\\\" method=\\\"post\\\">\");\n out.println(\"First name: <input type=\\\"text\\\" name=\\\"firstname\\\" /><br />\");\n out.println(\"Last name: <input type=\\\"text\\\" name=\\\"lastname\\\" /><br />\");\n out.println(\"Birth date: <input type=\\\"text\\\" name=\\\"birthdate\\\" />ex: Jun 15, 1970<br />\");\n out.println(\"Salary: $<input type=\\\"number\\\" name=\\\"salary\\\" />ex: 101345.56<br />\");\n out.println(\"<input type=\\\"submit\\\" value=\\\"Submit\\\" />\");\n out.println(\"</form>\");\n out.println(\"<p><a href=\" + request.getContextPath() + \">Back</a>\");\n out.println(\"</body>\");\n out.println(\"</html>\");\n }\n }", "@RequestMapping(value=\"/employee/getEmployeeById\", method = RequestMethod.POST)\r\n\t@ResponseBody\r\n\tpublic EmployeeModel getEmployeeById1(@RequestParam(\"employeeId\") Integer employeeId, Model model) {\r\n\t\tEmployeeModel employeeModel = employeeService.getEmployeeById(employeeId);\r\n\t\treturn employeeModel;\r\n\t\t/*com.ps.model.Model.MODE = \"Update\";\r\n\t\tmodel.addAttribute(\"employeeData\", employeeModel);\r\n\t\treturn \"search-employee\";*/\r\n\t}", "@RequestMapping(value = \"/edit/{employeeID}\", method = RequestMethod.GET)\n public ModelAndView initUpdateOwnerForm(@PathVariable(\"employeeID\") String employeeID, Model model) {\n \tEmployee e = empService.findById(employeeID);\n\t\tModelAndView mav= new ModelAndView(\"CreateOrUpdateEmployee\",\"employee\",e);\n\t\tString s=\"edit\";\n\t\tmav.addObject(\"actiont\", s);\n\t\t mav.addObject(\"roleList\", roleRepo.findAll());\n\t\t mav.addObject(\"SupervisorList\",empService.ListOfSuperVisor());\n return mav;\n }", "public void addEmployee(int noOfEmployee) {\r\n\t\tint id = 0;\r\n\t\tString name = null;\r\n\t\tString address = null;\r\n\t\t\r\n\t\tfor (int index = 0; index < noOfEmployee; index++) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Enter employee id :\");\r\n\t\t\tid = input.nextInt();\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Enter employee name : \");\r\n\t\t\tinput.nextLine();\r\n\t\t\tname = input.nextLine();\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Enter employee address :\");\r\n\t\t\taddress = input.nextLine();\r\n\t\t\t\r\n\t\t\tif (empId.contains(id)) {\r\n\t\t\t\tSystem.out.println(\"Emp ID : \"+ id +\" employee ID already exists !!!!!\");\r\n\t\t\t} else {\r\n\t\t\t\tempId.add(id);\r\n\t\t\t\temp.add(addEmployee(id, name, address));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public Employee() {\n\t\t\n\t}", "@RequestMapping(value = \"/createUser\", method = RequestMethod.GET)\n\tpublic ModelAndView createUser(ModelMap model) throws CustomException {\n\n\t\tmodel.put(\"endUserForm\", endUserForm);\n\t\tCollection<EndUser> endUsers = endUserDAOImpl.getList();\n\t\tList<Role> roles = endUserDAOImpl.findAll();\n\t\tmodel.put(\"roles\", roles);\n\n\t\tmodel.put(\"endUsers\", endUsers);\n\t\treturn new ModelAndView(\"createUser\", \"model\", model);\n\t}", "public Large_Employee(\n String txtMobile,\n String txtEmail,\n String emailPassword,\n String corpPhoneType,\n String corpPhoneNumber,\n int employeeID){\n this.txtMobile = txtMobile;\n this.txtEmail = txtEmail;\n this.emailPassword = emailPassword;\n this.corpPhoneType = corpPhoneType;\n this.corpPhoneNumber = corpPhoneNumber;\n this.employeeID = employeeID;\n }", "public void searchPerson() {\r\n\r\n\t/*get values from text filed*/\r\n\tname = tfName.getText();\r\n\r\n\t/*clear contents of arraylist if there are any from previous search*/\r\n\tpersonsList.clear();\r\n\r\n // intialize recordNumber to zero\r\n\trecordNumber = 0;\r\n\r\n\tif(name.equals(\"\"))\r\n\t{\r\n\t\tJOptionPane.showMessageDialog(null,\"Please enter person name to search.\");\r\n\t}\r\n\telse\r\n\t{\r\n\t\t/*get an array list of searched persons using PersonDAO*/\r\n\t\tpersonsList = pDAO.searchPerson(name);\r\n\r\n\t\tif(personsList.size() == 0)\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(null, \"No record found.\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t/*downcast the object from array list to PersonInfo*/\r\n\t\t\tPersonInfo person = (PersonInfo) personsList.get(recordNumber);\r\n\r\n // displaying search record in text fields \r\n\t\t\ttfName.setText(person.getName());\r\n\t\t\ttfAddress.setText(person.getAddress());\r\n\t\t\ttfPhone.setText(\"\"+person.getPhone());\r\n\t\t\ttfEmail.setText(person.getEmail());\r\n\t\t}\r\n\t}\r\n\r\n }", "public void attemptToCreateEmployee(String firstName, String lastName, String employeeId, String documentNo) {\n driver.findElement(By.cssSelector(\"ms-add-button[tooltip=\\\"EMPLOYEE.TITLE.ADD\\\"]\")).click();\n\n // Fill in the form\n driver.findElement(By.cssSelector(\"ms-text-field[formcontrolname='firstName']>input\")).sendKeys(firstName);\n driver.findElement(By.cssSelector(\"ms-text-field[formcontrolname=\\\"lastName\\\"]>input\")).sendKeys(lastName);\n driver.findElement(By.cssSelector(\"input[formcontrolname=\\\"employeeId\\\"]\")).sendKeys(employeeId);\n\n driver.findElement(By.cssSelector(\"mat-card >div:nth-child(2)>:nth-child(1)\")).click();\n wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(\"mat-option:nth-child(1)\"))).click();\n\n driver.findElement(By.cssSelector(\"input[formcontrolname=\\\"documentNumber\\\"]\")).sendKeys(documentNo);\n\n //Click on Save button\n driver.findElement(By.cssSelector(\"ms-save-button > button\")).click();\n }", "public CreateAccount() {\n initComponents();\n selectionall();\n }", "public Employee() {\n\n\t}", "@Override\n public Employee addNewEmployee(Employee employee) {\n return null;\n }", "public String addEmployee(EmployeeDetails employeeDetails) throws NullPointerException;", "public AddEmployee() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "public String addEmployee() {\n\t\t\t//logger.info(\"addEmployee method called\");\n\t\t\t//userGroupBO.save(userGroup);;\n\t\t\treturn SUCCESS;\n\t\t}", "public void addEmployee(Employee emp) {\n\t\t\r\n\t}", "public static void addEmployee(Scanner input, ArrayList<Employee> newEmployee){\n Employee newEmp = new Employee();\n String empNumber, empHireDate;\n System.out.print(\"Please enter the employee's first and last name: \");\n newEmp.setName(input.nextLine());\n System.out.print(\"Please enter the new employee's Employee Number.\\nThe Employee Number must match XXX-L including the dash where X is a digit and L is a letter A-M: \");\n empNumber = input.nextLine();\n newEmp.setNumber(verifyEmpNum(input, empNumber));\n System.out.print(\"Please enter the new employee's hire date.\\nMake sure the date you enter matches IX/JX/KXXX including the slashes\"\n + \"\\nwhere I is a 0 or 1,J is 0-3, K is a 1 or 2, and X is a digit 0-9: \");\n empHireDate = input.nextLine();\n newEmp.setDate(verifyHireDate(input, empHireDate));\n \n newEmployee.add(newEmp);\n \n }", "public AJAXEmployeeEditHandler() {\n super();\n // TODO Auto-generated constructor stub\n }", "private DynamicForm createSearchBox() {\r\n\t\tfinal DynamicForm filterForm = new DynamicForm();\r\n\t\tfilterForm.setNumCols(4);\r\n\t\tfilterForm.setAlign(Alignment.LEFT);\r\n\t\tfilterForm.setAutoFocus(false);\r\n\t\tfilterForm.setWidth(\"59%\"); //make it line up with sort box\r\n\t\t\r\n\t\tfilterForm.setDataSource(SmartGWTRPCDataSource.getInstance());\r\n\t\tfilterForm.setOperator(OperatorId.OR);\r\n\t\t\r\n\t\t//Visible search box\r\n\t\tTextItem nameItem = new TextItem(\"name\", \"Search\");\r\n\t\tnameItem.setAlign(Alignment.LEFT);\r\n\t\tnameItem.setOperator(OperatorId.ICONTAINS); // case insensitive\r\n\t\t\r\n\t\t//The rest are hidden and populated with the contents of nameItem\r\n\t\tfinal HiddenItem companyItem = new HiddenItem(\"company\");\r\n\t\tcompanyItem.setOperator(OperatorId.ICONTAINS);\r\n\t\tfinal HiddenItem ownerItem = new HiddenItem(\"ownerNickName\");\r\n\t\townerItem.setOperator(OperatorId.ICONTAINS);\r\n\r\n\t\tfilterForm.setFields(nameItem,companyItem,ownerItem);\r\n\t\t\r\n\t\tfilterForm.addItemChangedHandler(new ItemChangedHandler() {\r\n\t\t\tpublic void onItemChanged(ItemChangedEvent event) {\r\n\t\t\t\tString searchTerm = filterForm.getValueAsString(\"name\");\r\n\t\t\t\tcompanyItem.setValue(searchTerm);\r\n\t\t\t\townerItem.setValue(searchTerm);\r\n\t\t\t\tif (searchTerm==null) {\r\n\t\t\t\t\titemsTileGrid.fetchData();\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tCriteria criteria = filterForm.getValuesAsCriteria();\r\n\t\t\t\t\titemsTileGrid.fetchData(criteria);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn filterForm;\r\n\t}", "@RequestMapping(value = \"/createentry\", method = RequestMethod.GET)\n\tpublic String navigateCreateEntry(Model model){\n\t\tmodel.addAttribute(\"entry\", new Entry());\t\n\t\treturn \"entry/createEntry\";\n\t}", "@PostMapping(\"/saveEmployee\")\n\tpublic String saveEmployee(@ModelAttribute(\"employee\") Employees employee) {\n\t\tservice.saveEmployee(employee);\n\t\treturn \"redirect:/employees\";\n\t}", "int addEmployee() {\n \n if(isEmptyData()){\n return 0;\n }\n\n String Username = txtUsername.getText().trim();\n PreparedStatement ps = null;\n ResultSet rs = null;\n boolean exist = false;\n try {\n String sql = \"select * from employeedetails where username=?\";\n ps = conn.prepareStatement(sql);\n ps.setString(1, Username);\n rs = ps.executeQuery();\n if(rs.next()){\n exist = true;\n }\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(this, ex);\n } finally {\n Postgre p = new Postgre();\n p.closeConn(null, ps, rs);\n }\n System.out.println(exist);\n\n if(exist){\n JOptionPane.showMessageDialog(this, \"User with Username : \"+Username + \" exists. Try another Username.\"); \n return 0;\n }\n \n Date DOB = txtdob.getDate();\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n String strDate = dateFormat.format(DOB);\n Timestamp dobt = changeDateFormat(strDate);\n Date date = txthiredate.getDate();\n dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n strDate = dateFormat.format(date);\n Timestamp hireDate = changeDateFormat(strDate);\n\n String gender = null;\n if (rbmale.isSelected()) {\n gender = \"Male\";\n } else if (rbfemale.isSelected()) {\n gender = \"Female\";\n }\n\n boolean valid = cbvalid.isSelected();\n String fname = txtfname.getText().trim();\n String lname = txtlname.getText().trim();\n String contact = txtcontact.getText().trim();\n String email = txtemail.getText().trim();\n String address = txtaddress.getText().trim();\n String city = txtcity.getText().trim();\n String state = txtstate.getText().trim();\n String country = txtcountry.getText().trim();\n String pincode = txtpincode.getText().trim();\n\n String sql = \"insert into employeedetails(username, fname, lname, gender, email, contactno, address, city, state_name, country, pincode, birth_date, validity, hire_date) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?)\";\n\n try {\n ps = conn.prepareStatement(sql);\n ps.setString(1, Username);\n ps.setString(2, fname);\n ps.setString(3, lname);\n ps.setString(4, gender);\n ps.setString(5, email);\n ps.setString(6, contact);\n ps.setString(7, address);\n ps.setString(8, city);\n ps.setString(9, state);\n ps.setString(10, country);\n ps.setString(11, pincode);\n ps.setTimestamp(12, dobt);\n ps.setBoolean(13, valid);\n ps.setTimestamp(14, hireDate);\n\n int i = ps.executeUpdate();\n if (i > 0) {\n JOptionPane.showMessageDialog(this, i + \" Employee data inserted !!!\");\n } else {\n JOptionPane.showMessageDialog(this, \"Some error occured. Try again!\");\n }\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, e);\n e.printStackTrace();\n } finally {\n Postgre p = new Postgre();\n p.closeConn(null, ps, null);\n }\n\n return 1;\n }" ]
[ "0.70475763", "0.62980884", "0.62710154", "0.61946505", "0.61633825", "0.6119846", "0.60433716", "0.6025577", "0.60091436", "0.600434", "0.59755933", "0.58910424", "0.58773893", "0.5873585", "0.5860666", "0.58182436", "0.5809245", "0.5765512", "0.57361674", "0.57301426", "0.57265586", "0.56939626", "0.56703717", "0.5667256", "0.5652037", "0.56429434", "0.5642287", "0.56231624", "0.56155854", "0.5615255", "0.5613135", "0.5608847", "0.56004053", "0.55982286", "0.55767184", "0.5570842", "0.55634815", "0.5555003", "0.5553396", "0.5537032", "0.55238813", "0.54867655", "0.5480377", "0.5477435", "0.5464196", "0.545516", "0.54377127", "0.5425585", "0.5420198", "0.541497", "0.5412075", "0.54026705", "0.54009384", "0.53997546", "0.5393308", "0.5388435", "0.5380444", "0.5375597", "0.5372598", "0.53708184", "0.5365421", "0.53638715", "0.53638715", "0.53638715", "0.53559947", "0.53545403", "0.53520966", "0.5346866", "0.5346298", "0.5339928", "0.53392684", "0.5338028", "0.53339535", "0.5323728", "0.5315071", "0.5304095", "0.53011405", "0.53011405", "0.5300719", "0.5291156", "0.5291107", "0.5287077", "0.5283524", "0.52816224", "0.5281032", "0.52784526", "0.5273721", "0.5271831", "0.5262458", "0.52620536", "0.5259548", "0.525149", "0.52507305", "0.52488554", "0.5245414", "0.5239609", "0.5237275", "0.52279335", "0.52193934", "0.5206775" ]
0.533805
71
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() { jTextFieldSearchIDEmployee = new javax.swing.JTextField(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); jLabel9 = new javax.swing.JLabel(); jLabel10 = new javax.swing.JLabel(); jTextFieldName = new javax.swing.JTextField(); jTextFieldUserName = new javax.swing.JTextField(); jTextFieldID = new javax.swing.JTextField(); jTextFieldSalary = new javax.swing.JTextField(); jTextFieldEmail = new javax.swing.JTextField(); jTextFieldQualification = new javax.swing.JTextField(); jLabelSuccessOrFail = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); jTextFieldPass = new javax.swing.JTextField(); jLabel11 = new javax.swing.JLabel(); jTextFieldPhoneNo = new javax.swing.JTextField(); jTextFieldAge = new javax.swing.JTextField(); jLabel6 = new javax.swing.JLabel(); jLabel12 = new javax.swing.JLabel(); jComboBoxGender = new javax.swing.JComboBox<>(); jSeparator10 = new javax.swing.JSeparator(); jPanelWrongID = new javax.swing.JPanel(); jLabelID = new javax.swing.JLabel(); jPanelNotAllowed = new javax.swing.JPanel(); jLabelNotAllawed = new javax.swing.JLabel(); jPanelWrongName = new javax.swing.JPanel(); jLabelWrongName = new javax.swing.JLabel(); jPanelWrongUserName = new javax.swing.JPanel(); jLabelWrongUserName = new javax.swing.JLabel(); jPanelWrongPass = new javax.swing.JPanel(); jLabelWrongPass = new javax.swing.JLabel(); jPanelWrongEmail = new javax.swing.JPanel(); jLabelWrongEmail = new javax.swing.JLabel(); jPanelWrongSalary = new javax.swing.JPanel(); jLabelWrongSalary = new javax.swing.JLabel(); jPanelWrongQualification = new javax.swing.JPanel(); jLabelWrongQualification = new javax.swing.JLabel(); jPanelWrongAge = new javax.swing.JPanel(); jLabelWrongAge = new javax.swing.JLabel(); jPanelWrongPhoneNo = new javax.swing.JPanel(); jLabelWrongPhoneNo = new javax.swing.JLabel(); jPanelWrongIDEmployee = new javax.swing.JPanel(); jLabelID1 = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); jLabelReset = new javax.swing.JLabel(); jLabel20 = new javax.swing.JLabel(); jLabel19 = new javax.swing.JLabel(); jPanel1 = new javax.swing.JPanel(); jLabelSearch = new javax.swing.JLabel(); jLabel21 = new javax.swing.JLabel(); jLabel22 = new javax.swing.JLabel(); jPanelDelete = new javax.swing.JPanel(); jLabel13 = new javax.swing.JLabel(); jPanel3 = new javax.swing.JPanel(); jLabel18 = new javax.swing.JLabel(); setBackground(java.awt.SystemColor.controlDkShadow); jTextFieldSearchIDEmployee.setFont(new java.awt.Font("Monotype Corsiva", 0, 20)); // NOI18N jTextFieldSearchIDEmployee.setHorizontalAlignment(javax.swing.JTextField.CENTER); jTextFieldSearchIDEmployee.setBorder(null); jTextFieldSearchIDEmployee.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextFieldSearchIDEmployeeActionPerformed(evt); } }); jLabel1.setFont(new java.awt.Font("Monotype Corsiva", 0, 20)); // NOI18N jLabel1.setForeground(new java.awt.Color(255, 255, 255)); jLabel1.setText("ID"); jLabel2.setFont(new java.awt.Font("Monotype Corsiva", 0, 20)); // NOI18N jLabel2.setForeground(new java.awt.Color(255, 255, 255)); jLabel2.setText("Name"); jLabel3.setFont(new java.awt.Font("Monotype Corsiva", 0, 20)); // NOI18N jLabel3.setForeground(new java.awt.Color(255, 255, 255)); jLabel3.setText("User Name"); jLabel4.setFont(new java.awt.Font("Monotype Corsiva", 0, 20)); // NOI18N jLabel4.setForeground(new java.awt.Color(255, 255, 255)); jLabel4.setText("Password"); jLabel5.setFont(new java.awt.Font("Monotype Corsiva", 0, 20)); // NOI18N jLabel5.setForeground(new java.awt.Color(255, 255, 255)); jLabel5.setText("E-Mail"); jLabel9.setFont(new java.awt.Font("Monotype Corsiva", 0, 20)); // NOI18N jLabel9.setForeground(new java.awt.Color(255, 255, 255)); jLabel9.setText("Salary"); jLabel10.setFont(new java.awt.Font("Monotype Corsiva", 0, 20)); // NOI18N jLabel10.setForeground(new java.awt.Color(255, 255, 255)); jLabel10.setText("Qualification"); jTextFieldName.setFont(new java.awt.Font("Monotype Corsiva", 0, 18)); // NOI18N jTextFieldName.setHorizontalAlignment(javax.swing.JTextField.CENTER); jTextFieldName.setBorder(null); jTextFieldUserName.setFont(new java.awt.Font("Monotype Corsiva", 0, 18)); // NOI18N jTextFieldUserName.setHorizontalAlignment(javax.swing.JTextField.CENTER); jTextFieldUserName.setBorder(null); jTextFieldID.setFont(new java.awt.Font("Monotype Corsiva", 0, 18)); // NOI18N jTextFieldID.setHorizontalAlignment(javax.swing.JTextField.CENTER); jTextFieldID.setBorder(null); jTextFieldID.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextFieldIDActionPerformed(evt); } }); jTextFieldSalary.setFont(new java.awt.Font("Monotype Corsiva", 0, 18)); // NOI18N jTextFieldSalary.setHorizontalAlignment(javax.swing.JTextField.CENTER); jTextFieldSalary.setBorder(null); jTextFieldEmail.setFont(new java.awt.Font("Monotype Corsiva", 0, 18)); // NOI18N jTextFieldEmail.setHorizontalAlignment(javax.swing.JTextField.CENTER); jTextFieldEmail.setBorder(null); jTextFieldQualification.setFont(new java.awt.Font("Monotype Corsiva", 0, 18)); // NOI18N jTextFieldQualification.setHorizontalAlignment(javax.swing.JTextField.CENTER); jTextFieldQualification.setBorder(null); jTextFieldQualification.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextFieldQualificationActionPerformed(evt); } }); jLabelSuccessOrFail.setFont(new java.awt.Font("Monotype Corsiva", 0, 20)); // NOI18N jLabelSuccessOrFail.setForeground(new java.awt.Color(255, 255, 255)); jLabelSuccessOrFail.setText("Search For Employee ... !"); jLabel7.setFont(new java.awt.Font("Monotype Corsiva", 0, 20)); // NOI18N jLabel7.setForeground(new java.awt.Color(255, 255, 255)); jLabel7.setText("ID Employee"); jTextFieldPass.setFont(new java.awt.Font("Monotype Corsiva", 0, 18)); // NOI18N jTextFieldPass.setHorizontalAlignment(javax.swing.JTextField.CENTER); jTextFieldPass.setBorder(null); jLabel11.setFont(new java.awt.Font("Monotype Corsiva", 0, 20)); // NOI18N jLabel11.setForeground(new java.awt.Color(255, 255, 255)); jLabel11.setText("Gender"); jTextFieldPhoneNo.setFont(new java.awt.Font("Monotype Corsiva", 0, 18)); // NOI18N jTextFieldPhoneNo.setHorizontalAlignment(javax.swing.JTextField.CENTER); jTextFieldPhoneNo.setBorder(null); jTextFieldAge.setFont(new java.awt.Font("Monotype Corsiva", 0, 18)); // NOI18N jTextFieldAge.setHorizontalAlignment(javax.swing.JTextField.CENTER); jTextFieldAge.setBorder(null); jLabel6.setFont(new java.awt.Font("Monotype Corsiva", 0, 20)); // NOI18N jLabel6.setForeground(new java.awt.Color(255, 255, 255)); jLabel6.setText("Age"); jLabel12.setFont(new java.awt.Font("Monotype Corsiva", 0, 20)); // NOI18N jLabel12.setForeground(new java.awt.Color(255, 255, 255)); jLabel12.setText("Phone No."); jComboBoxGender.setFont(new java.awt.Font("Monotype Corsiva", 0, 18)); // NOI18N jComboBoxGender.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Male" , "Famele"})); jComboBoxGender.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jComboBoxGenderActionPerformed(evt); } }); jPanelWrongID.setBackground(java.awt.SystemColor.controlDkShadow); jLabelID.setFont(new java.awt.Font("Monotype Corsiva", 0, 18)); // NOI18N jLabelID.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/icons8_Cancel_20px.png"))); // NOI18N jLabelID.setText("Wrong ID"); javax.swing.GroupLayout jPanelWrongIDLayout = new javax.swing.GroupLayout(jPanelWrongID); jPanelWrongID.setLayout(jPanelWrongIDLayout); jPanelWrongIDLayout.setHorizontalGroup( jPanelWrongIDLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelWrongIDLayout.createSequentialGroup() .addContainerGap() .addComponent(jLabelID, javax.swing.GroupLayout.DEFAULT_SIZE, 101, Short.MAX_VALUE)) ); jPanelWrongIDLayout.setVerticalGroup( jPanelWrongIDLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelWrongIDLayout.createSequentialGroup() .addComponent(jLabelID) .addGap(0, 0, Short.MAX_VALUE)) ); jPanelNotAllowed.setBackground(java.awt.SystemColor.controlDkShadow); jLabelNotAllawed.setFont(new java.awt.Font("Monotype Corsiva", 0, 18)); // NOI18N jLabelNotAllawed.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/icons8_Cancel_20px.png"))); // NOI18N jLabelNotAllawed.setText("Not Allowed"); javax.swing.GroupLayout jPanelNotAllowedLayout = new javax.swing.GroupLayout(jPanelNotAllowed); jPanelNotAllowed.setLayout(jPanelNotAllowedLayout); jPanelNotAllowedLayout.setHorizontalGroup( jPanelNotAllowedLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelNotAllowedLayout.createSequentialGroup() .addContainerGap() .addComponent(jLabelNotAllawed, javax.swing.GroupLayout.DEFAULT_SIZE, 117, Short.MAX_VALUE)) ); jPanelNotAllowedLayout.setVerticalGroup( jPanelNotAllowedLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelNotAllowedLayout.createSequentialGroup() .addComponent(jLabelNotAllawed) .addGap(0, 0, Short.MAX_VALUE)) ); jPanelWrongName.setBackground(java.awt.SystemColor.controlDkShadow); jLabelWrongName.setFont(new java.awt.Font("Monotype Corsiva", 0, 18)); // NOI18N jLabelWrongName.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/icons8_Cancel_20px.png"))); // NOI18N jLabelWrongName.setText("Wrong Name"); javax.swing.GroupLayout jPanelWrongNameLayout = new javax.swing.GroupLayout(jPanelWrongName); jPanelWrongName.setLayout(jPanelWrongNameLayout); jPanelWrongNameLayout.setHorizontalGroup( jPanelWrongNameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelWrongNameLayout.createSequentialGroup() .addContainerGap() .addComponent(jLabelWrongName, javax.swing.GroupLayout.PREFERRED_SIZE, 227, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanelWrongNameLayout.setVerticalGroup( jPanelWrongNameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelWrongNameLayout.createSequentialGroup() .addComponent(jLabelWrongName) .addGap(0, 0, Short.MAX_VALUE)) ); jPanelWrongUserName.setBackground(java.awt.SystemColor.controlDkShadow); jLabelWrongUserName.setFont(new java.awt.Font("Monotype Corsiva", 0, 18)); // NOI18N jLabelWrongUserName.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/icons8_Cancel_20px.png"))); // NOI18N jLabelWrongUserName.setText("Wrong User Name"); javax.swing.GroupLayout jPanelWrongUserNameLayout = new javax.swing.GroupLayout(jPanelWrongUserName); jPanelWrongUserName.setLayout(jPanelWrongUserNameLayout); jPanelWrongUserNameLayout.setHorizontalGroup( jPanelWrongUserNameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelWrongUserNameLayout.createSequentialGroup() .addContainerGap() .addComponent(jLabelWrongUserName, javax.swing.GroupLayout.DEFAULT_SIZE, 155, Short.MAX_VALUE)) ); jPanelWrongUserNameLayout.setVerticalGroup( jPanelWrongUserNameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelWrongUserNameLayout.createSequentialGroup() .addComponent(jLabelWrongUserName) .addGap(0, 0, Short.MAX_VALUE)) ); jPanelWrongPass.setBackground(java.awt.SystemColor.controlDkShadow); jLabelWrongPass.setFont(new java.awt.Font("Monotype Corsiva", 0, 18)); // NOI18N jLabelWrongPass.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/icons8_Cancel_20px.png"))); // NOI18N jLabelWrongPass.setText("Wrong Pass"); javax.swing.GroupLayout jPanelWrongPassLayout = new javax.swing.GroupLayout(jPanelWrongPass); jPanelWrongPass.setLayout(jPanelWrongPassLayout); jPanelWrongPassLayout.setHorizontalGroup( jPanelWrongPassLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelWrongPassLayout.createSequentialGroup() .addContainerGap() .addComponent(jLabelWrongPass, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanelWrongPassLayout.setVerticalGroup( jPanelWrongPassLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelWrongPassLayout.createSequentialGroup() .addComponent(jLabelWrongPass) .addGap(0, 0, Short.MAX_VALUE)) ); jPanelWrongEmail.setBackground(java.awt.SystemColor.controlDkShadow); jLabelWrongEmail.setFont(new java.awt.Font("Monotype Corsiva", 0, 18)); // NOI18N jLabelWrongEmail.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/icons8_Cancel_20px.png"))); // NOI18N jLabelWrongEmail.setText("Wrong E-Mail"); javax.swing.GroupLayout jPanelWrongEmailLayout = new javax.swing.GroupLayout(jPanelWrongEmail); jPanelWrongEmail.setLayout(jPanelWrongEmailLayout); jPanelWrongEmailLayout.setHorizontalGroup( jPanelWrongEmailLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelWrongEmailLayout.createSequentialGroup() .addContainerGap() .addComponent(jLabelWrongEmail, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanelWrongEmailLayout.setVerticalGroup( jPanelWrongEmailLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelWrongEmailLayout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) .addComponent(jLabelWrongEmail)) ); jPanelWrongSalary.setBackground(java.awt.SystemColor.controlDkShadow); jLabelWrongSalary.setFont(new java.awt.Font("Monotype Corsiva", 0, 18)); // NOI18N jLabelWrongSalary.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/icons8_Cancel_20px.png"))); // NOI18N jLabelWrongSalary.setText("Wrong Salary"); javax.swing.GroupLayout jPanelWrongSalaryLayout = new javax.swing.GroupLayout(jPanelWrongSalary); jPanelWrongSalary.setLayout(jPanelWrongSalaryLayout); jPanelWrongSalaryLayout.setHorizontalGroup( jPanelWrongSalaryLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelWrongSalaryLayout.createSequentialGroup() .addContainerGap() .addComponent(jLabelWrongSalary) .addContainerGap(34, Short.MAX_VALUE)) ); jPanelWrongSalaryLayout.setVerticalGroup( jPanelWrongSalaryLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelWrongSalaryLayout.createSequentialGroup() .addComponent(jLabelWrongSalary) .addGap(0, 0, Short.MAX_VALUE)) ); jPanelWrongQualification.setBackground(java.awt.SystemColor.controlDkShadow); jLabelWrongQualification.setFont(new java.awt.Font("Monotype Corsiva", 0, 18)); // NOI18N jLabelWrongQualification.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/icons8_Cancel_20px.png"))); // NOI18N jLabelWrongQualification.setText("Wrong Qualification"); javax.swing.GroupLayout jPanelWrongQualificationLayout = new javax.swing.GroupLayout(jPanelWrongQualification); jPanelWrongQualification.setLayout(jPanelWrongQualificationLayout); jPanelWrongQualificationLayout.setHorizontalGroup( jPanelWrongQualificationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelWrongQualificationLayout.createSequentialGroup() .addContainerGap() .addComponent(jLabelWrongQualification) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanelWrongQualificationLayout.setVerticalGroup( jPanelWrongQualificationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelWrongQualificationLayout.createSequentialGroup() .addComponent(jLabelWrongQualification) .addGap(0, 0, Short.MAX_VALUE)) ); jPanelWrongAge.setBackground(java.awt.SystemColor.controlDkShadow); jLabelWrongAge.setFont(new java.awt.Font("Monotype Corsiva", 0, 18)); // NOI18N jLabelWrongAge.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/icons8_Cancel_20px.png"))); // NOI18N jLabelWrongAge.setText("Wrong Age"); javax.swing.GroupLayout jPanelWrongAgeLayout = new javax.swing.GroupLayout(jPanelWrongAge); jPanelWrongAge.setLayout(jPanelWrongAgeLayout); jPanelWrongAgeLayout.setHorizontalGroup( jPanelWrongAgeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelWrongAgeLayout.createSequentialGroup() .addContainerGap() .addComponent(jLabelWrongAge, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(20, Short.MAX_VALUE)) ); jPanelWrongAgeLayout.setVerticalGroup( jPanelWrongAgeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelWrongAgeLayout.createSequentialGroup() .addComponent(jLabelWrongAge) .addGap(0, 0, Short.MAX_VALUE)) ); jPanelWrongPhoneNo.setBackground(java.awt.SystemColor.controlDkShadow); jLabelWrongPhoneNo.setFont(new java.awt.Font("Monotype Corsiva", 0, 18)); // NOI18N jLabelWrongPhoneNo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/icons8_Cancel_20px.png"))); // NOI18N jLabelWrongPhoneNo.setText("Wrong Phone No"); javax.swing.GroupLayout jPanelWrongPhoneNoLayout = new javax.swing.GroupLayout(jPanelWrongPhoneNo); jPanelWrongPhoneNo.setLayout(jPanelWrongPhoneNoLayout); jPanelWrongPhoneNoLayout.setHorizontalGroup( jPanelWrongPhoneNoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelWrongPhoneNoLayout.createSequentialGroup() .addContainerGap() .addComponent(jLabelWrongPhoneNo) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanelWrongPhoneNoLayout.setVerticalGroup( jPanelWrongPhoneNoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelWrongPhoneNoLayout.createSequentialGroup() .addComponent(jLabelWrongPhoneNo) .addGap(0, 0, Short.MAX_VALUE)) ); jPanelWrongIDEmployee.setBackground(java.awt.SystemColor.controlDkShadow); jLabelID1.setFont(new java.awt.Font("Monotype Corsiva", 0, 18)); // NOI18N jLabelID1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/icons8_Cancel_20px.png"))); // NOI18N jLabelID1.setText("Wrong Search Key"); javax.swing.GroupLayout jPanelWrongIDEmployeeLayout = new javax.swing.GroupLayout(jPanelWrongIDEmployee); jPanelWrongIDEmployee.setLayout(jPanelWrongIDEmployeeLayout); jPanelWrongIDEmployeeLayout.setHorizontalGroup( jPanelWrongIDEmployeeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelWrongIDEmployeeLayout.createSequentialGroup() .addContainerGap() .addComponent(jLabelID1, javax.swing.GroupLayout.DEFAULT_SIZE, 153, Short.MAX_VALUE)) ); jPanelWrongIDEmployeeLayout.setVerticalGroup( jPanelWrongIDEmployeeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelWrongIDEmployeeLayout.createSequentialGroup() .addComponent(jLabelID1) .addGap(0, 0, Short.MAX_VALUE)) ); jPanel2.setBackground(java.awt.SystemColor.controlDkShadow); jLabelReset.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/icons8_Reset_96px.png"))); // NOI18N jLabelReset.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jLabelResetMouseClicked(evt); } public void mouseEntered(java.awt.event.MouseEvent evt) { jLabelResetMouseEntered(evt); } public void mouseExited(java.awt.event.MouseEvent evt) { jLabelResetMouseExited(evt); } }); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabelReset, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabelReset, javax.swing.GroupLayout.DEFAULT_SIZE, 107, Short.MAX_VALUE) ); jLabel20.setFont(new java.awt.Font("Monotype Corsiva", 0, 20)); // NOI18N jLabel20.setForeground(new java.awt.Color(255, 255, 255)); jLabel20.setText("Reset"); jLabel19.setFont(new java.awt.Font("Monotype Corsiva", 0, 20)); // NOI18N jLabel19.setForeground(new java.awt.Color(255, 255, 255)); jLabel19.setText("Search"); jPanel1.setBackground(java.awt.SystemColor.controlDkShadow); jLabelSearch.setBackground(java.awt.SystemColor.controlDkShadow); jLabelSearch.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/icons8_Find_and_Replace_96px.png"))); // NOI18N jLabelSearch.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jLabelSearchMouseClicked(evt); } public void mouseEntered(java.awt.event.MouseEvent evt) { jLabelSearchMouseEntered(evt); } public void mouseExited(java.awt.event.MouseEvent evt) { jLabelSearchMouseExited(evt); } }); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabelSearch, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabelSearch, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 107, Short.MAX_VALUE) ); jLabel21.setFont(new java.awt.Font("Monotype Corsiva", 0, 20)); // NOI18N jLabel21.setForeground(new java.awt.Color(255, 255, 255)); jLabel21.setText("Update Employee"); jLabel22.setFont(new java.awt.Font("Monotype Corsiva", 0, 20)); // NOI18N jLabel22.setForeground(new java.awt.Color(255, 255, 255)); jLabel22.setText("Remove Employee"); jPanelDelete.setBackground(java.awt.SystemColor.controlDkShadow); jLabel13.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/icons8_Delete_Shield_96px_1.png"))); // NOI18N jLabel13.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jLabel13MouseClicked(evt); } public void mouseEntered(java.awt.event.MouseEvent evt) { jLabel13MouseEntered(evt); } public void mouseExited(java.awt.event.MouseEvent evt) { jLabel13MouseExited(evt); } }); javax.swing.GroupLayout jPanelDeleteLayout = new javax.swing.GroupLayout(jPanelDelete); jPanelDelete.setLayout(jPanelDeleteLayout); jPanelDeleteLayout.setHorizontalGroup( jPanelDeleteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelDeleteLayout.createSequentialGroup() .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE)) ); jPanelDeleteLayout.setVerticalGroup( jPanelDeleteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelDeleteLayout.createSequentialGroup() .addGap(0, 0, 0) .addComponent(jLabel13, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(0, 0, 0)) ); jPanel3.setBackground(java.awt.SystemColor.controlDkShadow); jLabel18.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/icons8_Available_Updates_96px.png"))); // NOI18N jLabel18.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jLabel18MouseClicked(evt); } public void mouseEntered(java.awt.event.MouseEvent evt) { jLabel18MouseEntered(evt); } public void mouseExited(java.awt.event.MouseEvent evt) { jLabel18MouseExited(evt); } }); javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) .addComponent(jLabel18) .addGap(0, 0, 0)) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) .addComponent(jLabel18)) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(10, 10, 10) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jTextFieldID) .addComponent(jTextFieldUserName) .addComponent(jTextFieldName, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 361, Short.MAX_VALUE) .addComponent(jTextFieldPass, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 361, Short.MAX_VALUE))) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(10, 10, 10) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(10, 10, 10) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jTextFieldEmail, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 361, Short.MAX_VALUE) .addComponent(jTextFieldQualification, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 361, Short.MAX_VALUE) .addComponent(jTextFieldSalary, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 361, Short.MAX_VALUE) .addComponent(jTextFieldPhoneNo, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 361, Short.MAX_VALUE) .addComponent(jTextFieldAge, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 361, Short.MAX_VALUE) .addComponent(jComboBoxGender, javax.swing.GroupLayout.PREFERRED_SIZE, 169, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jPanelWrongID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jPanelNotAllowed, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(69, 69, 69)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jPanelWrongEmail, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(jPanelWrongPass, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanelWrongName, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jPanelWrongUserName, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addComponent(jPanelWrongSalary, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jPanelWrongQualification, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jPanelWrongAge, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jPanelWrongPhoneNo, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(50, 50, 50)))) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(layout.createSequentialGroup() .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 157, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jSeparator10) .addComponent(jTextFieldSearchIDEmployee, javax.swing.GroupLayout.PREFERRED_SIZE, 302, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(layout.createSequentialGroup() .addComponent(jPanelWrongIDEmployee, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(25, 25, 25))) .addGap(40, 40, 40) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel19, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(20, 20, 20) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel20, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE))) .addComponent(jLabelSuccessOrFail, javax.swing.GroupLayout.PREFERRED_SIZE, 510, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(layout.createSequentialGroup() .addGap(175, 175, 175) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(20, 20, 20) .addComponent(jPanelDelete, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(100, 100, 100) .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addComponent(jLabel22, javax.swing.GroupLayout.PREFERRED_SIZE, 163, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(28, 28, 28) .addComponent(jLabel21, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE))))) .addGap(0, 114, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(2, 2, 2) .addComponent(jLabelSuccessOrFail, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(20, 20, 20) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jTextFieldSearchIDEmployee, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(1, 1, 1) .addComponent(jSeparator10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(5, 5, 5) .addComponent(jPanelWrongIDEmployee, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(layout.createSequentialGroup() .addGap(10, 10, 10) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jPanel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(3, 3, 3) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel20) .addComponent(jLabel19)) .addGap(20, 20, 20) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jTextFieldID, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jPanelWrongID, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jPanelNotAllowed, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(10, 10, 10) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jTextFieldName, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jPanelWrongName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(10, 10, 10) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jPanelWrongUserName, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jTextFieldUserName, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(10, 10, 10) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jTextFieldPass, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jPanelWrongPass, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGap(10, 10, 10) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanelWrongEmail, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jTextFieldEmail, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(10, 10, 10) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jTextFieldSalary, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jPanelWrongSalary, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(10, 10, 10) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jPanelWrongQualification, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jTextFieldQualification, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(10, 10, 10) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jPanelWrongAge, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jTextFieldAge, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(10, 10, 10) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jPanelWrongPhoneNo, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jTextFieldPhoneNo, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(10, 10, 10) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jComboBoxGender, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(10, 10, 10) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jPanelDelete, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(5, 5, 5) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel22) .addComponent(jLabel21)) .addGap(20, 20, 20)) ); }
{ "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 Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "public PatientUI() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public Oddeven() {\n initComponents();\n }", "public intrebarea() {\n initComponents();\n }", "public Magasin() {\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 LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "public kunde() {\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 MusteriEkle() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public DESHBORDPANAL() {\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 frmVenda() {\n initComponents();\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 EnterDetailsGUI() {\n initComponents();\n }", "public vpemesanan1() {\n initComponents();\n }", "public Kost() {\n initComponents();\n }", "public FormHorarioSSE() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public frmacceso() {\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.73191476", "0.72906625", "0.72906625", "0.72906625", "0.72860986", "0.7248112", "0.7213479", "0.72078276", "0.7195841", "0.71899796", "0.71840525", "0.7158498", "0.71477973", "0.7092748", "0.70800966", "0.70558053", "0.69871384", "0.69773406", "0.69548076", "0.69533914", "0.6944929", "0.6942576", "0.69355655", "0.6931378", "0.6927896", "0.69248974", "0.6924723", "0.69116884", "0.6910487", "0.6892381", "0.68921053", "0.6890637", "0.68896896", "0.68881863", "0.68826133", "0.68815064", "0.6881078", "0.68771756", "0.6875212", "0.68744373", "0.68711984", "0.6858978", "0.68558776", "0.6855172", "0.6854685", "0.685434", "0.68525875", "0.6851834", "0.6851834", "0.684266", "0.6836586", "0.6836431", "0.6828333", "0.68276715", "0.68262815", "0.6823921", "0.682295", "0.68167603", "0.68164384", "0.6809564", "0.68086857", "0.6807804", "0.6807734", "0.68067646", "0.6802192", "0.67943805", "0.67934304", "0.6791657", "0.6789546", "0.6789006", "0.67878324", "0.67877173", "0.6781847", "0.6765398", "0.6765197", "0.6764246", "0.6756036", "0.6755023", "0.6751404", "0.67508715", "0.6743043", "0.67387456", "0.6736752", "0.67356426", "0.6732893", "0.6726715", "0.6726464", "0.67196447", "0.67157453", "0.6714399", "0.67140275", "0.6708251", "0.6707117", "0.670393", "0.6700697", "0.66995865", "0.66989213", "0.6697588", "0.66939527", "0.66908985", "0.668935" ]
0.0
-1
GENFIRST:event_jTextFieldIDActionPerformed TODO add your handling code here:
private void jTextFieldIDActionPerformed(java.awt.event.ActionEvent evt) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void jtxtIDActionPerformed(java.awt.event.ActionEvent evt) {\n \n }", "private void custIDTextFieldActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void txtCIdActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField4ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField12ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField12ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField11ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField11ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void flightIDTextActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {\n \n }", "private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField2ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField2ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField2ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField2ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField19ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void pidTextFieldActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField3ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField3ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField3ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField5ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField5ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField5ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {\n}", "private void textField1ActionPerformed(java.awt.event.ActionEvent evt) {\n\t}", "private void jTextField10ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField13ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField6ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField6ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void rowCountTextFldActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void txtserchActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void txtidDemActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField7ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void vencimentoBoletoJTextFieldActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void nombretxtActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jIdFilmeActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void txtNomenclaturaActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField1KeyPressed(java.awt.event.KeyEvent evt) {\n \n }", "private void jTextFieldNomeActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void txtRucActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void txtmobilenoActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void txtNomProdActionPerformed(java.awt.event.ActionEvent evt) {\n\n }", "private void jTextFieldProductNameActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void InterestJTextFieldActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void txt_nombreActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void txtKQActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField8ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void txtBonusActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void waffleQuantityTxtActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void txtcantidadActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtcantidadActionPerformed\n // TODO add your handling code here:\n }", "private void userNameFieldActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void numeroDaFarmaciaEntradaActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jfanoActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton16ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextFieldTelefoneActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void CounterJTextFieldActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void ValorActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void tfApellidoActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jCAreaActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n adaptee.btnIDSearch_actionPerformed(e);\r\n\t}", "private void txtbuscarHCActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void txtTolActionPerformed(java.awt.event.ActionEvent evt) {\n}", "private void funcionActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void txtNIPActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@Override\r\n\t\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\t\t\td5.dispose();\r\n\t\t\t\t\t\t\t\ttextField_productID_input.requestFocusInWindow();\r\n\t\t\t\t\t\t\t}", "private void add_grant_perches_textActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jNumHabitacionActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButtonOkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonOkActionPerformed\n \n }", "private void jTable1MouseClicked(java.awt.event.MouseEvent evt) {\n DefaultTableModel model = (DefaultTableModel)jTable1.getModel();\n // get the selected row index\n int selectedRowIndex = jTable1.getSelectedRow();\n // set the selected row data into jtextfields\n ID_USER =Integer.parseInt(model.getValueAt(selectedRowIndex, 0).toString()) ; \n CL_USER =model.getValueAt(selectedRowIndex, 1).toString(); \n\n }", "private void csrdateTxtActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void phantichActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t if(e.getActionCommand().equals(\"提交UID\")){\n\t\t\t\t\tif(!UserID.useruidtext.getText().equals(\"\")) {\n\t\t\t\t\t\tBILIBILIAPI.Userid=UserID.useruidtext.getText();\n\t\t\t\t\t\tsetVisible(false);\n\t\t\t\t\t}else {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"不能为空\");\n\t\t\t\t\t}\n\t\t\t\t\t//System.out.println(BILIBILIAPI.Userid);\n\t\t\t\t}\n\t\t\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n String text = tagIdInsertTextBox.getText();\n if (text != null && text.length() > 0) {\n jTextAreaId.setText(jTextAreaId.getText() + \"\\n\" + text);\n tagIdInsertTextBox.setText(\"\");\n jTextAreaId.setRows(jTextAreaId.getLineCount());\n //f1.validate();\n }\n }", "private void addressTxtActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void campo_linhaActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@Override\r\n\t\t\tpublic void handleEvent(Event arg0) {\n\t\t\t\tidLop = txt_idLop.getText();\r\n\t\t\t}", "private void senhaLFEActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@Override\r\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\tString get=textField.getText();\r\n\t\t\t\t\t\ttextField_1.setText(get);\r\n\t\t\t\t\t}", "private void txtMensajeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextFieldMensajeActionPerformed\n EnviarDatos(txtMensaje.getText());\n txtMensaje.setText(\"\");\n }", "private void tfLugarActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void cnpjFarmaciaEntradaActionPerformed(java.awt.event.ActionEvent evt) {\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 stu_idfield = new javax.swing.JTextField();\n submitbutton = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n jLabel1.setFont(new java.awt.Font(\"Times New Roman\", 0, 18)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(255, 255, 255));\n jLabel1.setText(\"ENTER THE STUDENT ID TO BE DELETED\");\n getContentPane().add(jLabel1);\n jLabel1.setBounds(130, 20, 560, 102);\n\n stu_idfield.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n stu_idfieldActionPerformed(evt);\n }\n });\n getContentPane().add(stu_idfield);\n stu_idfield.setBounds(230, 120, 137, 22);\n\n submitbutton.setText(\"SUBMIT\");\n submitbutton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n submitbuttonActionPerformed(evt);\n }\n });\n getContentPane().add(submitbutton);\n submitbutton.setBounds(260, 170, 77, 25);\n\n jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/placementmanagement/main.jpg\"))); // NOI18N\n jLabel2.setText(\"jLabel2\");\n getContentPane().add(jLabel2);\n jLabel2.setBounds(0, 0, 650, 300);\n\n setSize(new java.awt.Dimension(660, 347));\n setLocationRelativeTo(null);\n }", "private void jButton14ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void message_labelActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed\r\n sendMessage(jTextField1.getText());\r\n }", "private void searchTextFiledActionPerformed(ActionEvent evt) {\n }", "private void jButton21ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "public void mouseClicked(MouseEvent arg0){\n int r = table.getSelectedRow();\r\n if(r>=0){ \r\n// deletebtnButton.setEnabled(true);\r\n deletebtn.setEnabled(true); \r\n\r\n //Fetching records from Table on Fields\r\n idField.setText(\"\"+table.getModel().getValueAt(r,0));\r\n \t}\r\n }", "private void splPerActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void itemTextBlockNameActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void booksNumberActionPerformed(java.awt.event.ActionEvent evt) {\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 jTextField1 = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n jTextField2 = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setText(\"Name\");\n\n jTextField1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField1ActionPerformed(evt);\n }\n });\n\n jLabel2.setText(\"ID\");\n\n jTextField2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField2ActionPerformed(evt);\n }\n });\n\n jButton1.setText(\"jButton1\");\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(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(121, 121, 121)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 48, Short.MAX_VALUE))\n .addGap(55, 55, 55)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jTextField1, javax.swing.GroupLayout.DEFAULT_SIZE, 237, Short.MAX_VALUE)\n .addComponent(jTextField2))\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(122, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(69, 69, 69)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField1, 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(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(72, 72, 72)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(107, Short.MAX_VALUE))\n );\n\n pack();\n }", "private void ControlsActionPerformed(java.awt.event.ActionEvent evt) {\n }" ]
[ "0.8894681", "0.79855", "0.79741204", "0.7837954", "0.78222674", "0.78222674", "0.77156186", "0.77156186", "0.7700402", "0.76937973", "0.76609945", "0.76609945", "0.76609945", "0.7635679", "0.7635679", "0.7635679", "0.7635679", "0.76099896", "0.75917864", "0.75572324", "0.75572324", "0.75572324", "0.75431025", "0.75431025", "0.75431025", "0.7541673", "0.7524084", "0.7523424", "0.7479324", "0.7365758", "0.7365758", "0.7332487", "0.73092514", "0.7195386", "0.71492255", "0.71381533", "0.7131859", "0.7131123", "0.7118909", "0.71126115", "0.7106926", "0.7092349", "0.70692927", "0.7044031", "0.70168227", "0.701575", "0.70015645", "0.69953686", "0.6965252", "0.694091", "0.6864711", "0.68466187", "0.6794412", "0.67882055", "0.67793566", "0.6751723", "0.6733319", "0.6732665", "0.673242", "0.67286736", "0.67122316", "0.67090386", "0.66944885", "0.669372", "0.66782767", "0.6672578", "0.6665495", "0.6662718", "0.6644934", "0.66378605", "0.6624761", "0.6621836", "0.6590976", "0.6589378", "0.6588669", "0.6576832", "0.6571744", "0.65642744", "0.65615857", "0.65615857", "0.65615857", "0.65500873", "0.6527058", "0.6516841", "0.65070754", "0.6504449", "0.6497787", "0.6494684", "0.6490746", "0.64840126", "0.6481609", "0.6477549", "0.6473301", "0.64599466", "0.64463234", "0.6445196", "0.6444833", "0.6429006", "0.6420851", "0.64186245" ]
0.9029014
0
GENFIRST:event_jLabelSearchMouseEntered TODO add your handling code here:
private void jLabelSearchMouseEntered(java.awt.event.MouseEvent evt) { setColor(jPanel1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void mouseEntered(MouseEvent e) {\n SearchBox source = (SearchBox) e.getComponent();\n source.setFocusable(true);\n }", "private void searchBtnMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_searchBtnMouseEntered\n searchBtn.setBackground(Color.decode(\"#339966\"));\n }", "public void mouseEntered(MouseEvent e) {\n JLabel source = (JLabel)e.getSource();\n view.highlightLabel(source);\n }", "@Override\n public void mouseExited(MouseEvent e) {\n SearchBox source = (SearchBox) e.getComponent();\n if (source.getText().equals(\"\"))//if user didn't write anything, we set the default search box text.\n source.setText(defaultText);\n source.setFocusable(false);\n }", "private void jTextField13FocusGained(java.awt.event.FocusEvent evt) {\n search();\r\n }", "private void JPOpcao_13MouseEntered(java.awt.event.MouseEvent evt) {\n }", "@Override\n\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t}", "private void jLabel83MousePressed(java.awt.event.MouseEvent evt) {\n }", "@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}", "private void txtSearchFocusLost(java.awt.event.FocusEvent evt) {\n \n txtSearch.setText(\"Serch name in here\");\n }", "private void searchBtnMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_searchBtnMousePressed\n searchBtn.setBackground(Color.decode(\"#1e5837\"));\n }", "private void searchBtnMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_searchBtnMouseExited\n searchBtn.setBackground(Color.decode(\"#4fc482\"));\n }", "private void jTextFieldSearchWordMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTextFieldSearchWordMouseReleased\n //Enable/disable the search button\n this.searchButtonEnabler();\n }", "private void jLabel97MouseClicked(java.awt.event.MouseEvent evt) {\n }", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_1.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_3.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}", "@Override\n\tpublic void mouseEntered(MouseEvent arg0) {\n\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\tjlb.setForeground(Color.blue);\n\t}", "@Override\r\n public void mouseEntered(MouseEvent e) {\n\r\n }", "@Override\n public void mouseEntered(MouseEvent evt) {\n }", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed\n String turnToString2 = txt_search.getText();\n\n try {\n\n if(begSearch != -1){\n txt_area.setCaretPosition(begSearch);\n begSearch = txt_area.getText().indexOf(turnToString2,begSearch);\n lbl_search_res.setText(\"\");\n }\n if(begSearch != -1){\n txt_area.getHighlighter().addHighlight(begSearch,begSearch + turnToString2.length(),new DefaultHighlighter.DefaultHighlightPainter(Color.yellow));\n }\n else if (begSearch <= txt_area.getText().length() && begSearch >= 0){\n txt_area.getHighlighter().addHighlight(begSearch,begSearch + turnToString2.length(),new DefaultHighlighter.DefaultHighlightPainter(Color.yellow));\n }\n if(begSearch == -1){\n lbl_search_res.setText(\"Can not found.\");\n }\n begSearch = begSearch + 1;\n\n //System.out.print(\" \"+begSearch);\n\n }\n catch (BadLocationException ex) {\n begSearch = -1;\n }\n\n }", "@Override\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(new Color(150,190,200));//蓝色\n\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_2.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}", "@Override\r\n\t\t public void mouseEntered(MouseEvent arg0) {\n\t\t }", "public void mouseEntered(MouseEvent evt) {\r\n }", "@Override\n\tpublic void mouseEntered(java.awt.event.MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(Color.orange);\n\t\t\n\t}", "@Override\n public void mouseEntered(MouseEvent e) {\n }", "public void mouseEntered(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "public void mouseEntered(MouseEvent arg0) {\n // TODO Auto-generated method stub\n\n }", "protected void lbl_searchEvent() {\n\t\tif(text_code.getText().isEmpty()){\n\t\t\tlbl_notice.setText(\"*请输入股票代码\");\n\t\t\tlbl_notice.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\t\treturn;\n\t\t}\n\t\tif(text_code.getText().length()!=6||!Userinfochange.isNumeric(text_code.getText())){\n\t\t\tlbl_notice.setText(\"*股票代码为6位数字\");\n\t\t\tlbl_notice.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\t\treturn;\n\t\t}\n\t\tif(text_place.getText().isEmpty()){\n\t\t\tlbl_notice.setText(\"*请输入股票交易所\");\n\t\t\tlbl_notice.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(!text_place.getText().equals(\"sz\") && !text_place.getText().equals(\"sh\")){\n\t\t\tlbl_notice.setText(\"*交易所填写:sz或sh\");\n\t\t\tlbl_notice.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t\n\t\tString[] informationtemp = null ;\n\t\ttry {\n\n\t\t\tinformationtemp = Internet.share.Internet.getSharedata(text_place.getText(), text_code.getText());\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tJOptionPane.showMessageDialog(null, \"网络异常或者不存在该只股票\", \"异常\",\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\n\t\t}\n\t\tString name = informationtemp[0];\n\t\tif (name == null) {\n\t\t\tlbl_notice.setText(\"*不存在的股票\");\n\t\t\tlbl_notice.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\t\treturn;\n\t\t}\n\t\tString[] names = new String[2];\n\t\tSystem.out.println(\"搜索出的股票名:\" + name + \"(Dia_buy 297)\");\n\t\tnames = name.split(\"\\\"\");\n\t\tname = names[1];\n\t\tif (name.length() == 0) {\n\t\t\tlbl_notice.setText(\"*不存在的股票\");\n\t\t\tlbl_notice.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tinformation = informationtemp;\n\t\tplace = text_place.getText();\n\t\tcode=text_code.getText();\n\t\t\n\t\ttrade_shortsell();//显示文本框内容\n\t\t\n\t\tlbl_notice.setText(\"股票信息获取成功!\");\n\t\tlbl_notice.setForeground(SWTResourceManager.getColor(SWT.COLOR_GREEN));\n\t}", "@Override\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tJLabel j1 = (JLabel)e.getSource();\n\t\tj1.setForeground(Color.RED);\n\t}", "private void createMouseListener() {\n this.addMouseListener(new MouseAdapter() {\n @Override\n public void mouseEntered(MouseEvent e) {//if mouse Entered,user can write on it.\n SearchBox source = (SearchBox) e.getComponent();\n source.setFocusable(true);\n }\n\n @Override\n public void mouseExited(MouseEvent e) {//if mouse exited, user can not write anymore(should be changed!)\n SearchBox source = (SearchBox) e.getComponent();\n if (source.getText().equals(\"\"))//if user didn't write anything, we set the default search box text.\n source.setText(defaultText);\n source.setFocusable(false);\n }\n });\n }", "private void searchBtnMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_searchBtnMouseReleased\n searchBtn.setBackground(Color.decode(\"#4fc482\"));\n }", "private void searchFieldKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_searchFieldKeyReleased\n searchWord();\n }", "public void mouseEntered(MouseEvent event) {\n\t}", "@Override\n public void mouseEntered(MouseEvent e){\n }", "@Override\n public void mouseEntered(MouseEvent arg0) {\n\n }", "@Override\r\n public void mouseEntered(MouseEvent e) {\n }", "@Override\r\n public void mouseEntered(MouseEvent e) {\n }", "@Override\n public void mouseEntered(MouseEvent e) {\n\n }", "@Override\n public void mouseEntered(MouseEvent e) {\n\n }", "@Override\n public void mouseEntered(MouseEvent e) {\n\n }", "@Override\n public void mouseEntered(MouseEvent e) {\n\n }", "public void mouseEntered(MouseEvent e)\n { }", "@Override\r\n public void mouseEntered(MouseEvent arg0)\r\n {\n\r\n }", "@Override\n\t\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\t}", "public void mouseEntered(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}", "private void tdataMouseEntered(java.awt.event.MouseEvent evt) {\n }", "@Override\n public void mouseEntered(MouseEvent e) {\n JLabel x = (JLabel) e.getSource();\n x.setForeground(Color.BLUE);\n levelPanel.setCursor(new Cursor(Cursor.HAND_CURSOR));\n }", "@Override\r\n public void mouseEntered(MouseEvent e) {\n }", "@Override\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}", "@Override\r\n public void mouseEntered(MouseEvent e) {\r\n }", "@Override\n public void mouseEntered(MouseEvent arg0) {\n \n }", "@Override\n protected void paintComponent(Graphics g) {\n g.setColor(getBackground());//setting search box background which is white(JTextfield background)\n g.fillRoundRect(0, 0, getWidth() - 1, getHeight() - 1, 15, 50);//make a oval border.\n //g.drawImage(searchImage, 2,2,15,15,this);//draw search icon at the left.\n this.setMargin(new Insets(2, 15, 2, 2));//setting start pointer of writing text\n\n createMouseListener();\n createActionListener();\n createFocusListener();\n super.paintComponent(g);\n\n\n }", "@Override\n\t\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void mouseEntered (MouseEvent me) { }", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\tpublic void mouseEntered(MouseEvent arg0) {\n\r\n\t}", "@Override\r\n\tpublic void mouseEntered(MouseEvent arg0) {\n\r\n\t}", "@Override\r\n\tpublic void mouseEntered(MouseEvent arg0) {\n\r\n\t}", "@Override\r\n\tpublic void mouseEntered(MouseEvent arg0) {\n\r\n\t}", "@Override\r\n\tpublic void mouseEntered(MouseEvent arg0) {\n\r\n\t}", "@Override\n public void mouseEntered(MouseEvent e) {\n }", "@Override\n public void mouseEntered(MouseEvent e) {\n }", "@Override\n public void mouseEntered(MouseEvent e) {\n }", "@Override\n public void mouseEntered(MouseEvent e) {\n }", "@Override\n public void mouseEntered(MouseEvent e) {\n }", "@Override\n public void mouseEntered(MouseEvent e) {\n }", "@Override\r\n\tpublic void mouseEntered(MouseEvent e) {\n\r\n\t}", "@Override\r\n\tpublic void mouseEntered(MouseEvent e) {\n\r\n\t}", "@Override\r\n\tpublic void mouseEntered(MouseEvent e) {\n\r\n\t}", "@Override\r\n\tpublic void mouseEntered(MouseEvent e) {\n\r\n\t}", "@Override\r\n\tpublic void mouseEntered(MouseEvent e) {\n\r\n\t}", "@Override\r\n\tpublic void mouseEntered(MouseEvent e) {\n\r\n\t}", "@Override\r\n\tpublic void mouseEntered(MouseEvent e) {\n\r\n\t}", "@Override\r\n\tpublic void mouseEntered(MouseEvent e) {\n\r\n\t}", "@Override\r\n\tpublic void mouseEntered(MouseEvent e) {\n\r\n\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\npublic void mouseEntered(MouseEvent e)\n{\n\t\n}", "@Override\r\n\tpublic void searchObjectListener(ActionEvent e) {\n\t\t\r\n\t}", "@SuppressWarnings(\"unchecked\")\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\"> \r\n private void initComponents() {\r\n\r\n jLabel1 = new javax.swing.JLabel();\r\n jScrollPane1 = new javax.swing.JScrollPane();\r\n tblMemDt = new javax.swing.JTable(){\r\n @Override\r\n public Component prepareRenderer(TableCellRenderer renderer,int row,int column)\r\n {\r\n Component comp=super.prepareRenderer(renderer,row, column);\r\n int modelRow=convertRowIndexToModel(row);\r\n if(!isRowSelected(modelRow))\r\n comp.setBackground(Color.WHITE);\r\n else\r\n comp.setBackground(Color.LIGHT_GRAY);\r\n return comp;\r\n }\r\n };\r\n txtKey = new javax.swing.JTextField();\r\n\r\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\r\n\r\n jLabel1.setText(\"Search\");\r\n\r\n tblMemDt.setModel(new javax.swing.table.DefaultTableModel(\r\n new Object [][] {\r\n {},\r\n {},\r\n {},\r\n {}\r\n },\r\n new String [] {\r\n\r\n }\r\n ));\r\n tblMemDt.setCellSelectionEnabled(true);\r\n tblMemDt.addMouseListener(new java.awt.event.MouseAdapter() {\r\n public void mouseClicked(java.awt.event.MouseEvent evt) {\r\n tblMemDtMouseClicked(evt);\r\n }\r\n });\r\n tblMemDt.addKeyListener(new java.awt.event.KeyAdapter() {\r\n public void keyPressed(java.awt.event.KeyEvent evt) {\r\n tblMemDtKeyPressed(evt);\r\n }\r\n });\r\n jScrollPane1.setViewportView(tblMemDt);\r\n\r\n txtKey.addFocusListener(new java.awt.event.FocusAdapter() {\r\n public void focusLost(java.awt.event.FocusEvent evt) {\r\n txtKeyFocusLost(evt);\r\n }\r\n });\r\n txtKey.addKeyListener(new java.awt.event.KeyAdapter() {\r\n public void keyPressed(java.awt.event.KeyEvent evt) {\r\n txtKeyKeyPressed(evt);\r\n }\r\n public void keyReleased(java.awt.event.KeyEvent evt) {\r\n txtKeyKeyReleased(evt);\r\n }\r\n });\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 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 470, Short.MAX_VALUE))\r\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\r\n .addGap(20, 20, 20)\r\n .addComponent(jLabel1)\r\n .addGap(18, 18, 18)\r\n .addComponent(txtKey, javax.swing.GroupLayout.DEFAULT_SIZE, 409, Short.MAX_VALUE)))\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 .addGap(27, 27, 27)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel1)\r\n .addComponent(txtKey, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(18, 18, 18)\r\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addContainerGap(21, Short.MAX_VALUE))\r\n );\r\n\r\n pack();\r\n }", "private void jLAyuMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLAyuMouseEntered\n \n /*Cambia el cursor del ratón*/\n this.setCursor( new Cursor(Cursor.HAND_CURSOR));\n \n }", "@Override\r\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\r\n\t\t\t}" ]
[ "0.76712", "0.75409555", "0.7332581", "0.71502125", "0.709328", "0.686942", "0.68683225", "0.684454", "0.6830801", "0.6830801", "0.6830801", "0.6830801", "0.6771175", "0.6762995", "0.6733142", "0.67168105", "0.66772217", "0.66526926", "0.663908", "0.6631076", "0.6580323", "0.6577427", "0.6561632", "0.6557376", "0.6550816", "0.65490144", "0.65456796", "0.652962", "0.65261984", "0.6508126", "0.6499627", "0.64967424", "0.64940125", "0.64890635", "0.6481826", "0.64757895", "0.6471466", "0.64672166", "0.646705", "0.6466176", "0.6466176", "0.64653856", "0.64653856", "0.64653856", "0.64653856", "0.6465036", "0.6462379", "0.64477795", "0.64451563", "0.64449114", "0.64446944", "0.6441391", "0.64411026", "0.64393765", "0.64379394", "0.6437178", "0.64364094", "0.6428728", "0.6423664", "0.6423664", "0.6423664", "0.6422733", "0.6422733", "0.6422733", "0.6422733", "0.6422733", "0.6422529", "0.6422529", "0.6422529", "0.6422529", "0.6422529", "0.6422529", "0.64213276", "0.64213276", "0.64213276", "0.64213276", "0.64213276", "0.64213276", "0.64213276", "0.64213276", "0.64213276", "0.6419318", "0.6419318", "0.6419318", "0.6419318", "0.6419318", "0.6419318", "0.6419318", "0.6419318", "0.6419318", "0.6419318", "0.6419318", "0.6419318", "0.6419318", "0.6419318", "0.64181334", "0.6415156", "0.6414375", "0.6413564", "0.64103335" ]
0.79652464
0
The constructor for the presenter
public ResultPresenter(ResultsView view, ArrayList<Integer> amountCorrect, int deckIndex, String mode, String filePath) { this.view = view; this.amountCorrect = amountCorrect; MemorizationTrainingTool mtt = MemorizationTrainingTool.getInstance(); deckTitle = mtt.getActiveUser().getDeck(deckIndex).getTitle(); mtt.getActiveUser().addNewStatistics(deckIndex, mode, amountCorrect.get(0)); UserStorageFactory.createLocalUserStorage(filePath).storeState(mtt); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tprotected void initializePresenter() {\n\r\n\t}", "private void initPresenter() {\n\n RequestQueue requestQueue = App.getInstance().getRequestQueue();\n CatsHttp catsHttp = new VolleyCatsHttp(requestQueue);\n\n CatsRepository catsRepository = new CatsRepository(catsHttp);\n\n presenter = new MainPresenter(catsRepository);\n presenter.bindView(this);\n }", "private void init() {\n //set view to presenter\n presenter.setView(this, service);\n\n setupView();\n }", "MainPresenter(MainContract.View view) {\n this.view = view;\n model = new AmicableModel();\n }", "public BasePresenter() {\n if (sHashMaps == null) {\n sHashMaps = new LinkedList<>();\n }\n }", "private InCallPresenter() {\n }", "public ViewDogPresenter(BaseActivity activity) {\n super(activity);\n }", "void setupPresenter() {\n mPresenter = new leaguePresenter(this);\n ScheduleList.getInstance().setPresenter(mPresenter);\n }", "private UI()\n {\n this(null, null);\n }", "public LdBsPublisherBhv() {\r\n }", "public ControladorPanel() { }", "public PopulationfosaController() {\n }", "public View() {\n initComponents();\n }", "public PromedioView() {\n initComponents();\n }", "public AnaPencere() {\n initComponents();\n }", "public DataViewerImpl() {\n\t\tsuper();\n\t}", "public ManipularView() {\n initComponents();\n }", "public SlackPresenter() {\n if (this.slackService == null) {\n this.slackService = new SlackService();\n }\n }", "public DemoPanel() {\n }", "public PaneElementImpl() {\n }", "public HealthUI() {\n init();\n }", "public AnalysisPresenter(AnalysisEventListener viewAction){\n this.viewAction = viewAction;\n screens = new ArrayList<Screen>();\n sequence = -1;\n lastQuestionId = 0;\n mcqMap = new HashMap<Integer, MCQ>();\n }", "public Ui() {\n }", "public ChoosePagePresenter() {\n// mGetKnowledgeHierarchyDataFromNet = new GetKnowledgeHierarchyDataFromNet();\n dataManager = DataManager.getInstance();\n }", "public PrincipalPanel() {\n\t\tinitialize();\n\t}", "public LoginPresenter(MainView mainView)\n {\n this.mainView = mainView;\n }", "public ClientView() {\n initComponents();\n }", "public PartsViewImpl() {\n }", "public interviewerdataforeventpageImpl() {\n }", "public Presenter(Model model, View view)\r\n\t{\r\n\t\tthis.myModel=model;\r\n\t\tthis.myView=view;\r\n\t\tConcurrentHashMap<String, RemoteControlCommand> commandMap=new ConcurrentHashMap<String, RemoteControlCommand>(); \r\n\t\tcommandMap.put(\"connection status\", new CheckConnectionStatus());\r\n\t\tcommandMap.put(\"disconnect user\", new DisconnectUser());\r\n\t\tcommandMap.put(\"start server\",new StartServer());\r\n\t\tcommandMap.put(\"stop server\", new StopServer());\r\n\t\tcommandMap.put(\"exit\", new exit());\r\n\r\n\t\tmyView.setCommands(commandMap);\r\n\t}", "public Ui() { }", "public AStationPane() {\n }", "public MainView() {\r\n\t\tinitialize();\r\n\t}", "public PanelSgamacView1()\n {\n }", "public Panel() {\n }", "private void initMVP() {\n mainPresenter = new MainPresenter(this, getActivity());\n }", "public WeatherPresenter(WeatherPresenterListener listener){\n this.mListener = listener;\n }", "public PersonOverview() {\n initComponents();\n setLanguage();\n fillPersonDropList();\n }", "Constructor() {\r\n\t\t \r\n\t }", "public SalesMethodsUI() {\n \n }", "public MainView() {\n initComponents();\n \n }", "@Implementation\n protected void __constructor__(IDisplayManager dm) {\n }", "public VideoPage()\r\n\t{\r\n\t}", "public ViewClass() {\n\t\tcreateGUI();\n\t\taddComponentsToFrame();\n\t\taddActionListeners();\n\t}", "@Override\n protected MyInfoPresenter createPresenter() {\n return new MyInfoPresenter(MyInfoActivity.this);\n }", "public SpeakerSerivceImpl() {\n\t\tSystem.out.println(\"No args in constructor\");\n\t}", "public ContractView() {\n initComponents();\n }", "private Views() {\n }", "public MainPresenter(MainContract.View view) {\n mView = view;\n list = new ArrayList<>();\n adapter = new TemperatureAdapter(mView, list);\n mView.setRecyclerView(adapter);\n position = new Geolocal((Context) mView);\n updateWeatherList();\n }", "public JavaPanel() {\n\t\tsuper();\n\t}", "public IView() {\n initComponents();\n setLocationRelativeTo(null); //Center form on screen\n }", "public SequenceViewerPanel(Plasmid p) {\n plasmid = p;\n initComponents();\n initSequenceLabels();\n }", "public VPrincipal() {\n initComponents();\n }", "public MCalendarEventView()\r\n {\r\n }", "public PlaneUIController() {\n this.launcherFacade = new LauncherFacade();\n }", "public Punching() {\n initComponents();\n }", "public PatientPanelPrescription() {\n initComponents();\n set();\n }", "private View() {}", "@Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(getLayoutViewId());\n// presenter = getPresenter(typePresenter);\n init();\n }", "public VendaView() {\n initComponents();\n }", "public UI() {\n initComponents();\n }", "public MainView() {\n initComponents();\n }", "public MainView() {\n initComponents();\n }", "public Principal() {\n initComponents();\n }", "public Principal() {\n initComponents();\n }", "public Principal() {\n initComponents();\n }", "public Principal() {\n initComponents();\n }", "public Principal() {\n initComponents();\n }", "public Principal() {\n initComponents();\n }", "public Principal() {\n initComponents();\n }", "public Principal() {\n initComponents();\n }", "public Principal() {\n initComponents();\n }", "public SlideAdapter(){\r\n\r\n }", "public ViewProperty() {\n initComponents();\n }", "public PanoramaConfig() {\n }", "public OnlineVerificationView() {\n }", "public View() {\n // (this constructor is here just for the javadoc tag)\n }", "public View(UI ui) {\n this.ui = ui;\n }", "public PatientUI() {\n initComponents();\n }", "public AppoinmentPanel() {\n initComponents();\n }", "public AlunoView() {\n initComponents();\n bus = new AlunoBus();\n }", "public ViewDataIn() {\n initComponents();\n }", "public CtrlPresentation() throws IOException, ClassNotFoundException {\r\n ctrlDomain = new CtrlDomain();\r\n viewsFX = new ArrayList<>();\r\n initializePresentation();\r\n }", "public MetadataPanel()\n {\n fieldMap = new HashMap<String, Component>();\n initialiseUI();\n }", "public InventarioControlador() {\n }", "public Controller()\r\n\t{\r\n\t\tview = new View();\r\n\t}", "@Inject\r\n\tpublic ProviderManagementPresenter(EventBus eventBus, MyView view,\r\n\t\t\tMyProxy proxy, DispatchAsync dispatcher) {\r\n\t\tsuper(eventBus, view, proxy);\r\n\t\tgetView().setUiHandlers(this);\r\n\t\t\r\n\t\t((RafViewLayout) getView().asWidget()).setViewPageName(getProxy().getNameToken());\r\n\t\tgetView().loadLogisticsProviderData(ProviderData.getLogisticsProviderData());\r\n\t\tthis.dispatcher = dispatcher;\r\n\t}", "public CreditsScreen()\n {\n }", "public VM() {\n initComponents();\n }", "@Test\n public void createPresenter_setsThePresenterToView() {\n historyPresenter = new HistoryPresenter(historyView, remoteDataSource,\n sharedPreferenceService);\n\n // Then the presenter is set to the view.\n verify(historyView).setPresenter(historyPresenter);\n }", "public Versement() {\n initComponents();\n }", "public Overview() {\n\t\t// It will work whenever i create object with using no parameter const\n\t\tSystem.out.println(\"This is constructor\");\n\t}", "public Livro() {\n\n\t}", "public Captura() {\n initComponents();\n }", "public AulaView() {\n initComponents();\n }", "public FilmOverviewController() {\n }", "public PantallaPrincipal() {\n initComponents();\n }", "public LayerViewPanel()\r\n {\r\n \r\n }", "public BrowserPresenterFactory(Context context) {\n this.context = context;\n }", "public VentaPrincipal() {\n initComponents();\n }", "public bhi createPresenter() {\n return new bhi(this);\n }" ]
[ "0.7588895", "0.7573631", "0.75164104", "0.71108073", "0.7003973", "0.6922232", "0.68566597", "0.68318236", "0.6807164", "0.67897034", "0.6712112", "0.6691926", "0.6685189", "0.6673036", "0.6669458", "0.66547805", "0.6650918", "0.6634216", "0.6632001", "0.66115296", "0.6601731", "0.659153", "0.6590311", "0.6583227", "0.65829235", "0.65615267", "0.6556881", "0.6541835", "0.65345764", "0.6534134", "0.6529244", "0.6520394", "0.65140986", "0.6511372", "0.6507749", "0.64758503", "0.6468649", "0.6465662", "0.6460357", "0.6446885", "0.6437809", "0.6428859", "0.6424147", "0.64222974", "0.64041656", "0.64035773", "0.64018667", "0.6378054", "0.6375579", "0.63691705", "0.6360124", "0.6358985", "0.635803", "0.6357755", "0.6357188", "0.6356312", "0.6350523", "0.6341841", "0.6341373", "0.6337771", "0.6332658", "0.63319874", "0.63319874", "0.63258433", "0.63258433", "0.63258433", "0.63258433", "0.63258433", "0.63258433", "0.63258433", "0.63258433", "0.63258433", "0.63216996", "0.63179463", "0.6313435", "0.6304657", "0.6303369", "0.6303083", "0.6300233", "0.62880725", "0.6282223", "0.6277721", "0.6271951", "0.626838", "0.62527806", "0.6240873", "0.6239497", "0.62356454", "0.62346005", "0.62268674", "0.6223878", "0.6223771", "0.6218939", "0.621845", "0.62179357", "0.62159383", "0.62141544", "0.62126106", "0.620293", "0.62014383", "0.6200953" ]
0.0
-1
Tells the view the result Where the first element in amountCorrect is amount of correct answers And the second element is total amount of questions
public void onCreate() { view.initTexts(amountCorrect.get(0), amountCorrect.get(1)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showResults() {\n if (!sent) {\n if(checkAnswerOne()) {\n nbOfCorrectAnswers++;\n }\n if(checkAnswerTwo()) {\n nbOfCorrectAnswers++;\n }\n if(checkAnswerThree()) {\n nbOfCorrectAnswers++;\n }\n if(checkAnswerFour()) {\n nbOfCorrectAnswers++;\n }\n\n showResultAsToast(nbOfCorrectAnswers);\n\n } else {\n showResultAsToast(nbOfCorrectAnswers);\n }\n }", "private void getCorrectAnswers() {\n\t\tfor(int i = 0; i < numberAmt; i++) {\n\t\t\tif(randomNumbers.get(i).equals(answers.get(i)))\n\t\t\t\tcorrectAnswers++;\n\t\t}\n\t}", "public int getTotalCorrectAnswers() {\r\n\t\treturn totalCorrectAnswers;\r\n\t}", "private void countAnswers(){\n\t\tfor(Student student: students){\n\t\t\tif(isCorrectAnswer(student.getAnswers())){\n\t\t\t\tcorrectAnswers+=1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\twrongAnswers+=1;\n\t\t\t}\n\t\t}\n\t}", "public void checkAnswers(View view){\n int result = 0;\n\n if (checkRadioButtonAnswer(R.id.first_answer, R.id.first_answer3)){\n result = result + 1;\n }\n\n if (checkTextViewAnswer(R.id.second_answer, \"lions\")){\n result = result + 1;\n }\n\n if (checkRadioButtonAnswer(R.id.third_answer, R.id.third_answer1)){\n result = result + 1;\n }\n\n if (checkRadioButtonAnswer(R.id.fourth_answer, R.id.fourth_answer3)){\n result = result + 1;\n }\n\n if (checkRadioButtonAnswer(R.id.fifth_answer, R.id.fifth_answer3)){\n result = result + 1;\n }\n\n if (checkRadioButtonAnswer(R.id.sixth_answer, R.id.sixth_answer2)){\n result = result + 1;\n }\n\n if (checkCheckBoxAnswer(R.id.seventh_answer1, true) &&\n checkCheckBoxAnswer(R.id.seventh_answer2, true) &&\n checkCheckBoxAnswer(R.id.seventh_answer3, true) &&\n checkCheckBoxAnswer(R.id.seventh_answer4, false)){\n result = result + 1;\n }\n\n /**\n * A toast message is shown which represents the scored points out of the total 7.\n */\n Toast.makeText(this, \"Result: \" + Integer.toString(result) + \"/7\", Toast.LENGTH_SHORT).show();\n }", "public void showCorrectAnswers() {\n holders.forEach(QuizViewHolder::showCorrectAnswer);\n }", "private void printResults() {\n\t\tdouble percentCorrect = (double)(correctAnswers/numberAmt) * 100;\n\t\tSystem.out.println(\"Amount of number memorized: \" + numberAmt +\n\t\t\t\t \"\\n\" + \"Amount correctly answered: \" + correctAnswers +\n\t\t\t\t \"\\n\" + \"Percent correct: \" + (int)percentCorrect);\n\t}", "private void printAnswerResults(){\n\t\tSystem.out.print(\"\\nCorrect Answer Set: \" + q.getCorrectAnswers().toString());\n\t\tSystem.out.print(\"\\nCorrect Answers: \"+correctAnswers+\n\t\t\t\t\t\t \"\\nWrong Answers: \"+wrongAnswers);\n\t}", "@Override\n public void tabulateResult(QaQuiz quiz) {\n List<QaGradebook> gradebooks = gradebookDao.find(quiz); // todo chunking\n for (QaGradebook gradebook : gradebooks) {\n Integer result = 0;\n QaParticipant participant = gradebook.getParticipant();\n List<QaGradebookItem> items = gradebook.getItems();\n for (QaGradebookItem item : items) {\n QaQuestion question = item.getQuestion();\n switch (question.getQuestionType()) {\n case MULTIPLE_CHOICE:\n log.debug(\"answer:\" + question.getAnswerIndex());\n log.debug(\"response:\" + item.getAnswerIndex());\n\n if (null != item.getAnswerIndex() &&\n null != question.getAnswerIndex() && // just in case\n item.getAnswerIndex().equals(question.getAnswerIndex())) {\n result += 1;\n }\n break;\n case BOOLEAN:\n if (null != item.getAnswerIndex() &&\n null != question.getAnswerIndex() && // just in case\n item.getAnswerIndex().equals(question.getAnswerIndex())) {\n result += 1;\n }\n break;\n case SUBJECTIVE:\n participant.setAnswerResponse(item.getAnswerResponse());\n break;\n }\n }\n log.debug(\"result: \" + result);\n participant.setResult(result);\n participantDao.update(participant, Utils.getCurrentUser());\n sessionFactory.getCurrentSession().flush();\n }\n }", "private void showResultAsToast(int nbOfCorrectAnswers) {\n String msg = \"\";\n\n if(nbOfCorrectAnswers == 4) {\n msg = \"Genius ! LOL !! \" + nbOfCorrectAnswers + \"/4\";\n } else if (nbOfCorrectAnswers < 4) {\n msg = \"You can do better than this! \" + nbOfCorrectAnswers + \"/4\";\n }\n\n // The Toast method helps to show a message that shows the number of correct answers\n Toast.makeText(this, msg, Toast.LENGTH_LONG).show();\n }", "public void correctAnswer(View view) {\n\n // Update correct count\n deck.getCard(deckPos).setNumCorrect(deck.getCard(deckPos).getNumCorrect() + 1);\n\n // Update points\n float p = Float.valueOf(deck.getCard(deckPos).getRating()) * 10;\n quiz.setPoints((int) (quiz.getPoints() + p));\n points.setText(String.valueOf(quiz.getPoints()));\n\n // Set to question and update counter\n isQuestion = true;\n deckPos ++;\n\n // If not last card - Update card\n if(!(deckPos == deck.deckLength)) {\n displayCard(deck.getCard(deckPos), isQuestion);\n } else {\n finishQuiz();\n }\n\n // Set quiz counts\n quiz.setCorrectCount(quiz.getCorrectCount() + 1);\n }", "public void showQuestion() {\n\n // Variable to store the total questions in out question Array\n int totalQuestions = questions.length;\n\n // Variables to refer to textview in XML to show total number of questions\n TextView questionTotalTextView = findViewById(R.id.question_number_text_view);\n\n // Variables to refer to textview in XML to show question\n TextView questionTextView = findViewById(R.id.question_text_view);\n\n //Variable to refer to textview in XML to show score\n TextView scoreTextView = findViewById(R.id.score_text_view);\n\n // Initialize buttons to refer to answer button in XML\n answer1Button = (Button) findViewById(R.id.answer1_button);\n answer2Button = (Button) findViewById(R.id.answer2_button);\n answer3Button = (Button) findViewById(R.id.answer3_button);\n answer4Button = (Button) findViewById(R.id.answer4_button);\n\n // Condtion to check if the current question number on screen is less then total number of questions\n if (currentQuestionNumber < (totalQuestions)) {\n\n // Set the current question number and total number of questions on screen\n questionTotalTextView.setText(String.valueOf(currentQuestionNumber + 1) + \"/\" + String.valueOf(totalQuestions));\n\n // Set the current question on question textview in XML\n questionTextView.setText(questions[currentQuestionNumber]);\n\n // Set the score in score textview in XML\n\n scoreTextView.setText(String.valueOf(\"Score:\" + score));\n\n // Set the answers for the current question to answer buttons in XML\n answer1Button.setText(answers[currentQuestionNumber][0]);\n answer2Button.setText(answers[currentQuestionNumber][1]);\n answer3Button.setText(answers[currentQuestionNumber][2]);\n answer4Button.setText(answers[currentQuestionNumber][3]);\n\n\n } else {\n // If the last uestion has been answered i.e current question is equal to total questions then mark the quiz complete\n quizComplete = true;\n }\n\n // Check if the quiz is completed and show the summary to the user\n if (quizComplete) {\n\n totalIncorrectAnswers = totalQuestions - (totalCorrectAnswers + totalNotAttemptedAnswers);\n callAlertDialog(totalQuestions);\n\n }\n\n }", "private void validateQuiz() {\n int score = 0;\n String answer1 = answerOne.getText().toString();\n int answer2 = answerTwo.getCheckedRadioButtonId();\n boolean answer3 = answerThreeOptionA.isChecked() && answerThreeOptionD.isChecked() && !answerThreeOptionB.isChecked() && !answerThreeOptionC.isChecked();\n String answer4 = answerFour.getText().toString();\n int answer5 = answerFive.getCheckedRadioButtonId();\n boolean answer6 = answerSixOptionA.isChecked() && answerSixOptionB.isChecked() && answerSixOptionD.isChecked() && !answerSixOptionC.isChecked();\n if (answer1.equalsIgnoreCase(getString(R.string.answerOne))) {\n score++;\n }\n if (answer2 == answerTwoOptionA.getId()) {\n score++;\n }\n if (answer3) {\n score++;\n }\n if (answer4.equalsIgnoreCase(getString(R.string.answerFour))) {\n score++;\n }\n if (answer5 == answerFiveOptionD.getId()) {\n score++;\n }\n if (answer6) {\n score++;\n }\n String result = getString(R.string.result, score, questionList.size());\n Toast.makeText(this, result, Toast.LENGTH_SHORT).show();\n }", "public void checkAnswer(View view) {\n TextView tv=findViewById(R.id.question);\n String question=tv.getText().toString();\n\n //split the question into numbers\n String [] numbers=question.split(\"X\");\n\n\n //convert the numbers into integer\n Integer num1, num2;\n num1=Integer.valueOf(numbers[0]);\n num2=Integer.valueOf(numbers[1]);\n\n\n user=findViewById(R.id.printAns);\n ans=findViewById(R.id.answer);\n Integer uer=Integer.parseInt(ans.getText().toString());\n\n\n\n int total=uer;\n\n\n if (num1*num2==total){\n user.setText(\"Your answer is correct\");\n\n }else{\n user.setText(\"Try Again\");\n }\n\n\n\n }", "public void onClick(View view) {\n quesCounter++;\n if (quesCounter < 4) {\n //returning a feedback saying \"correct answer\" if the user has chosen the correct answer and\n //\"incorrect answer\" otherwise\n if (question[quesNumber].isAnsTrue()) {\n Toast.makeText(TopicQuiz.this, \"Incorrect Answer\", Toast.LENGTH_SHORT).show();\n\n\n } else {\n Toast.makeText(TopicQuiz.this, \"Correct Answer\", Toast.LENGTH_SHORT).show();\n rightQuesCounter++;\n }\n //incrementing quesNumber to move to the next question\n quesNumber++;\n questionTextView.setText(question[quesNumber].getQuesStatement());\n } else {\n if (question[quesNumber].isAnsTrue()) {\n Toast.makeText(TopicQuiz.this, \"Incorrect Answer\", Toast.LENGTH_SHORT).show();\n\n\n } else {\n Toast.makeText(TopicQuiz.this, \"Correct Answer\", Toast.LENGTH_SHORT).show();\n rightQuesCounter++;\n }\n\n //Checking to see if the rightQuesCounter worked or not\n Log.d(TAG, \"You have got \" + rightQuesCounter + \" questions right!\");\n\n //Having an intent to move to the Result screen while passing the rightQuesCounter to get the result\n Intent intent = new Intent(TopicQuiz.this, Result.class);\n intent.putExtra(\"rightQuesCounter\", rightQuesCounter);\n intent.putExtra(\"language\",topic);\n\n\n startActivity(intent);\n }\n }", "@Override\n public void onClick(View view) {\n quesCounter++;\n if (quesCounter < 4) {\n //returning a feedback saying \"correct answer\" if the user has chosen the correct answer and\n //\"incorrect answer\" otherwise\n if (question[quesNumber].isAnsTrue()) {\n Toast.makeText(TopicQuiz.this, \"Correct Answer\", Toast.LENGTH_SHORT).show();\n rightQuesCounter++;\n } else {\n Toast.makeText(TopicQuiz.this, \"Incorrect Answer\", Toast.LENGTH_SHORT).show();\n question[quesNumber].setWrong(true);\n }\n\n //incrementing quesNumber to move to the next question\n quesNumber++;\n questionTextView.setText(question[quesNumber].getQuesStatement());\n\n } else {\n if (question[quesNumber].isAnsTrue()) {\n Toast.makeText(TopicQuiz.this, \"Correct Answer\", Toast.LENGTH_SHORT).show();\n rightQuesCounter++;\n } else {\n Toast.makeText(TopicQuiz.this, \"Incorrect Answer\", Toast.LENGTH_SHORT).show();\n\n }\n //Checking to see if the rightQuesCounter worked or not\n Log.d(TAG, \"You have got \" + rightQuesCounter + \" out of 10\");\n\n //Having an intent to move to the Result screen while passing the rightQuesCounter to get the result\n Intent intent = new Intent(TopicQuiz.this, Result.class);\n intent.putExtra(\"rightQuesCounter\", rightQuesCounter);\n\n startActivity(intent);\n }\n\n }", "int getWrongAnswers();", "private int getNumberCorrect() {\n RadioButton rb1 = (RadioButton) findViewById(R.id.question_1_correct);\n RadioButton rb2 = (RadioButton) findViewById(R.id.question_2_correct);\n RadioButton rb3 = (RadioButton) findViewById(R.id.question_3_correct);\n RadioButton rb4 = (RadioButton) findViewById(R.id.question_4_correct);\n boolean q5Answer = checkQuestion5();\n boolean q6answer = checkQuestion6();\n ToggleButton tb7 = (ToggleButton) findViewById(R.id.question_7);\n ToggleButton tb8 = (ToggleButton) findViewById(R.id.question_8);\n boolean bool8 = !tb8.isChecked();\n ToggleButton tb9 = (ToggleButton) findViewById(R.id.question_9);\n ToggleButton tb10 = (ToggleButton) findViewById(R.id.question_10);\n\n boolean answers[] = new boolean[]{rb1.isChecked(), rb2.isChecked(), rb3.isChecked(), rb4.isChecked(),\n q5Answer, q6answer, tb7.isChecked(), bool8, tb9.isChecked(),\n tb10.isChecked()};\n return countCorrectAnswers(answers);\n }", "public int getAnswers() {\n return answers;\n }", "public void quiz() {\n\t\t\t\t\tcorrectans = 0;\n\t\t\t\t\tint k = 0;\n\t\t\t\t\tint j = 0;\n\t\t\t\t\tint M = 0;\n\t\t\t\t\tj = readDifficulty();\n\t\t\t\t\tM = readProblemType();\n\t\t\t\t\t//ask the student to solve 10 different problems, as determined by the problem type\n\t\t\t for(int i = 0; i < 10; i++ ) {\n\t\t\t \t//contain two numbers sampled from a uniform random distribution with bounds determined by the problem difficulty\n\t\t\t \tint x = rand.nextInt(j); \n\t\t\t\t int y = rand.nextInt(j);\n\t\t\t\t int O = askquestion(j, M,x,y);\n\t\t\t\t if(M == 4) {\n\t\t\t\t \t float floatans = readdivision();\n\t\t\t\t \tk = divisionsol(floatans, x, y);\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t int userin = readResponse();\n\t\t\t k = isnanswercorrect(O , userin);\n\t\t\t }\n\t\t\t if(k == 1) {\n\t\t\t \t correctans++;\n\t\t\t }\n\t\t\t }\n\t\t\t int L = 0;\n\t\t\t L = displayCompletionMessage(correctans);\n\t\t\t if ( L == 1) {\n\t\t\t \tquiz();\n\t\t\t }\n\t\t\t else {\n\t\t\t \treturn;\n\t\t\t }\n\t\t\t \n\t\t\t\t}", "public void submitAnswers(View view) {\n\n // Question one\n // Get String given in the first EditText field and turn it into lower case\n EditText firstAnswerField = (EditText) findViewById(R.id.answer_one);\n Editable firstAnswerEditable = firstAnswerField.getText();\n String firstAnswer = firstAnswerEditable.toString().toLowerCase();\n\n // Check if the answer given in the first EditText field is correct and if it is, add one\n // point\n if (firstAnswer.contains(\"baltic\")) {\n points++;\n }\n\n // Question two\n // Get String given in the second EditText field and turn it into lower case\n EditText secondAnswerField = (EditText) findViewById(R.id.answer_two);\n Editable secondAnswerEditable = secondAnswerField.getText();\n String secondAnswer = secondAnswerEditable.toString().toLowerCase();\n\n // Check if the answer given in the second EditText field is correct and if it is, add one\n // point\n if (secondAnswer.contains(\"basketball\")) {\n points++;\n }\n\n // Question three\n // Check if the correct answer is given\n RadioButton thirdQuestionCorrectAnswer = (RadioButton)\n findViewById(R.id.question_3_radio_button_3);\n boolean isThirdQuestionCorrectAnswer = thirdQuestionCorrectAnswer.isChecked();\n // If the correct answer is given, add one point\n if (isThirdQuestionCorrectAnswer) {\n points++;\n }\n\n // Question four\n // Check if the correct answer is given\n RadioButton fourthQuestionCorrectAnswer = (RadioButton)\n findViewById(R.id.question_4_radio_button_2);\n boolean isFourthQuestionCorrectAnswer = fourthQuestionCorrectAnswer.isChecked();\n\n // If the correct answer is given, add one point\n if (isFourthQuestionCorrectAnswer) {\n points++;\n }\n\n // Question five\n // Find check boxes\n CheckBox fifthQuestionCheckBoxOne = (CheckBox) findViewById(R.id.question_5_check_box_1);\n\n CheckBox fifthQuestionCheckBoxTwo = (CheckBox) findViewById(R.id.question_5_check_box_2);\n\n CheckBox fifthQuestionCheckBoxThree = (CheckBox) findViewById(R.id.question_5_check_box_3);\n\n CheckBox fifthQuestionCheckBoxFour = (CheckBox) findViewById(R.id.question_5_check_box_4);\n\n // If correct answers are given, add one point,\n // if incorrect answers are given, do not add points\n\n if (fifthQuestionCheckBoxThree.isChecked() && fifthQuestionCheckBoxFour.isChecked()\n && !fifthQuestionCheckBoxOne.isChecked() && !fifthQuestionCheckBoxTwo.isChecked()){\n points++;\n }\n\n // Question six\n // Find check boxes\n CheckBox sixthQuestionCheckBoxOne = (CheckBox) findViewById(R.id.question_6_check_box_1);\n\n CheckBox sixthQuestionCheckBoxTwo = (CheckBox) findViewById(R.id.question_6_check_box_2);\n\n CheckBox sixthQuestionCheckBoxThree = (CheckBox) findViewById(R.id.question_6_check_box_3);\n\n CheckBox sixthQuestionCheckBoxFour = (CheckBox) findViewById(R.id.question_6_check_box_4);\n\n // If correct answers are given, add one point,\n // if incorrect answers are given, do not add points\n if (sixthQuestionCheckBoxOne.isChecked() && sixthQuestionCheckBoxTwo.isChecked()\n && sixthQuestionCheckBoxFour.isChecked() && !sixthQuestionCheckBoxThree.isChecked()){\n points++;\n }\n\n // If the user answers all questions correctly, show toast message with congratulations\n if (points == 6){\n Toast.makeText(this, \"Congratulations! You have earned 6 points.\" +\n \"\\n\" + \"It is the maximum number of points in this quiz.\",\n Toast.LENGTH_SHORT).show();\n }\n\n // If the user does not answer all questions correctly, show users's points, total points\n // possible and advise to check answers\n else {\n Toast.makeText(this, \"Your points: \" + points + \"\\n\" + \"Total points possible: 6\" +\n \"\\n\" + \"Check your answers or spelling again.\", Toast.LENGTH_SHORT).show();\n }\n\n // Reset points to 0\n points = 0;\n }", "public void setTotalCorrectAnswers(int totalCorrectAnswers) {\r\n\t\tthis.totalCorrectAnswers = totalCorrectAnswers;\r\n\t}", "@Override\n\t\tpublic int getCount() {\n\t\t\treturn answers.size();\n\t\t}", "public void results(View view)\n {\n database = FirebaseDatabase.getInstance().getReference();\n database.addListenerForSingleValueEvent(new ValueEventListener()\n {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot)\n {\n int counter = 0;\n String countString;\n for (DataSnapshot child : dataSnapshot.child(\"Answers\").getChildren())\n {\n countPeople++;\n for (int i = 0; i < questArr.size(); i++)\n {\n question = questArr.get(i).getQuestion();\n answer = (String) child.child(question).getValue();\n if(!allAnswer.containsKey(answer))\n {\n counter = 0;\n counter++;\n allAnswer.put(answer, counter);\n }\n else\n {\n counter = allAnswer.get(answer);\n counter++;\n allAnswer.replace(answer, counter);\n }\n database.child(\"Statistic\").child(question).child(answer).setValue(String.valueOf(counter));\n }\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError)\n {\n }\n });\n showStat.setVisibility(View.VISIBLE);\n computeStat.setVisibility(View.GONE);\n\n }", "public void checkQuiz(View view) {\n int score = computeScore();\n ((TextView) findViewById(R.id.scoreTitle)).setText(R.string.score_title);\n ((TextView) findViewById(R.id.score)).setText(score + \"/\" + getQuizCountries().size());\n }", "private String createQuestionSummary(boolean answerCorrect, int questionNumber, String rightAnswer) {\n String answerStatementQuestion = answerStatement(answerCorrect);\n String questionSummary = getResources().getString(R.string.correct_answer_to_question) + questionNumber + getResources().getString(R.string.is) + rightAnswer + \"\\n\";\n questionSummary += getResources().getString(R.string.your_answer_is) + answerStatementQuestion + \"\\n\";\n return questionSummary;\n }", "public void checkAnswer(){\n int selectedRadioButtonId = radioTermGroup.getCheckedRadioButtonId();\n\n // find the radiobutton by returned id\n RadioButton radioSelected = findViewById(selectedRadioButtonId);\n\n String term = radioSelected.getText().toString();\n String definition = tvDefinition.getText().toString();\n\n if (Objects.equals(termsAndDefinitionsHashMap.get(term), definition)) {\n correctAnswers += 1;\n Toast.makeText(ActivityQuiz.this, \"Correct\", Toast.LENGTH_SHORT).show();\n }\n else {\n Toast.makeText(ActivityQuiz.this, \"Incorrect\", Toast.LENGTH_SHORT).show();\n }\n\n tvCorrectAnswer.setText(String.format(\"%s\", correctAnswers));\n }", "public static void displayScore(final Quiz quiz) {\n\t\tint qNumber = 0;\n\t\tint totScore = 0;\n\t\tfor (question q : quiz.getQList()) {\n\t\t\tSystem.out.println(q.qText);\n\t\t\tif (q.corrChoice.equals(quiz.getAnswers(qNumber))) {\n\t\t\t\tSystem.out.println(\" Correct Answer! - Marks Awarded: \" + q.maxMarks);\n\t\t\t\ttotScore += Integer.parseInt(q.maxMarks);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\" Wrong Answer! - Penalty: \" + q.penalty);\n\t\t\t\ttotScore += Integer.parseInt(q.penalty);\n\t\t\t}\n\t\t\tqNumber += 1;\n\t\t}\n\t\tSystem.out.println(\"Total Score: \" + totScore);\n\t}", "@Override\n public boolean tabulateResultPartial(QaQuiz quiz) {\n boolean status = true;\n\n QaUser root = userDao.findById(0L);\n QaQuiz quizId = quizDao.findById(14L);\n List<QaGradebook> gradebooks = gradebookDao.findAnswered(quizId); // todo chunking\n if (null == gradebooks || gradebooks.size() == 0) {\n return false;\n }\n\n\n for (QaGradebook gradebook : gradebooks) {\n Integer result = 0;\n QaParticipant participant = gradebook.getParticipant();\n List<QaGradebookItem> items = gradebook.getItems();\n for (QaGradebookItem item : items) {\n QaQuestion question = item.getQuestion();\n switch (question.getQuestionType()) {\n case MULTIPLE_CHOICE:\n log.debug(\"answer:\" + question.getAnswerIndex());\n log.debug(\"response:\" + item.getAnswerIndex());\n\n if (null != item.getAnswerIndex() &&\n null != question.getAnswerIndex() && // just in case\n item.getAnswerIndex().equals(question.getAnswerIndex())) {\n result += 1;\n }\n break;\n case BOOLEAN:\n if (null != item.getAnswerIndex() &&\n null != question.getAnswerIndex() && // just in case\n item.getAnswerIndex().equals(question.getAnswerIndex())) {\n result += 1;\n }\n break;\n case SUBJECTIVE:\n participant.setAnswerResponse(item.getAnswerResponse());\n break;\n }\n }\n log.debug(\"result: \" + result);\n participant.setStatus(QaManualStatus.TABULATED);\n participant.setResult(result);\n participantDao.update(participant, root);\n\n\n gradebook.setStatus(QaManualStatus.TABULATED);\n gradebookDao.update(gradebook, root);\n sessionFactory.getCurrentSession().flush();\n }\n return status;\n }", "@Test\n void studentMCQTotalAnsweredCorrectlyTest(){\n Student student = new Student(\"Lim\");\n\n int expectedResult = 8; // Input for testing\n student.setNumCorrectAns(expectedResult); // Set Total Number Question(s) Answered Correctly\n System.out.println(\"Test Case #3\");\n System.out.println(\"\\tExpected Result: \" + expectedResult); // print expected result\n int actualResult = student.getNumCorrectAns(); // Actual Result\n System.out.println(\"\\tActual Result: \" + actualResult); // Print actual result\n assertEquals(expectedResult, actualResult); // Compare the expected result (True) & Actual Result\n }", "java.lang.String getCorrectAnswer();", "public double get_numCorrectAns(){return this._numCorrectAns;}", "private int getScoreMultiple(MMObjectNode questionNode, MMObjectNode givenAnswer) {\n Vector givenAnswers = givenAnswer.getRelatedNodes(\"mcanswers\");\n Vector goodAnswers = questionNode.getRelatedNodes(\"mcanswers\");\n\n // First check if all the given answers are correct\n for (int i=0; i<givenAnswers.size(); i++) {\n if (((MMObjectNode)givenAnswers.get(i)).getIntValue(\"correct\") != 1) {\n return 0;\n }\n }\n\n // Secondly check if all the correct answers are given\n for (int i=0; i<goodAnswers.size(); i++) {\n if (((MMObjectNode)goodAnswers.get(i)).getIntValue(\"correct\") == 1) {\n if (!givenAnswers.contains(goodAnswers.get(i))) {\n return 0;\n }\n }\n }\n\n // ALl tests succeeded: answer is correct\n return 1;\n }", "public void chooseAnswer(View view)\n {\n\n if(view.getTag().toString().equals(Integer.toString(pos_of_correct)))\n {\n //Log.i(\"Result\",\"Correct Answer\");\n correct++;\n noOfQues++;\n correct();\n }\n else\n {\n //Log.i(\"Result\",\"Incorrect Answer\");\n //resluttextview.setText(\"Incorrect!\");\n incorrect();\n noOfQues++;\n }\n pointtextView.setText(Integer.toString(correct)+\"/\"+Integer.toString(noOfQues));\n if(tag==4)\n generateAdditionQuestion();\n if(tag==5)\n generateSubtractionQuestion();\n if(tag==6)\n generateMultiplicationQuestion();\n if(tag==7)\n generateDivisionQuestion();\n\n }", "public List<Integer> getCorrectAnswers() {\n return correctAnswers;\n }", "protected void checkScore () {\n if (mCurrentIndex == questions.length-1) {\n NumberFormat pct = NumberFormat.getPercentInstance();\n double result = (double) correct/questions.length;\n Toast res = new Toast(getApplicationContext());\n res.makeText(QuizActivity.this, \"Your score: \" + pct.format(result), Toast.LENGTH_LONG).show();\n correct = 0; // resets the score when you go back to first question.\n }\n }", "public int getNumberOfCorrectAnswers() {\n int correctAnswers = (responses.size() - 1) - incorrectAnswers.size();\r\n if (correctAnswers < 0) {\r\n // FIXME: replace with proper logging?\r\n System.err.println(\"Somehow the number of responses was less than the number of incorrect answers: \"\r\n + responses + \" -- \" + incorrectAnswers);\r\n return 0;\r\n }\r\n return correctAnswers;\r\n }", "public void feedback(boolean isCorrect, VocabularyQuiz question) {\n String correctMeaning = question.getSelections().get(question.getAnswer());\n String message;\n if (isCorrect) {\n message = \"Correct!\";\n totalCorrect++;\n } else {\n message = \"Incorrect! The answer is \" + correctMeaning;\n }\n JOptionPane.showMessageDialog(gui.getFrame(), message);\n }", "public int getTotalQuestions() {\r\n\t\treturn totalQuestions;\r\n\t}", "public void submitAnswers(View view) {\n\n int points = 0;\n\n //Question 1\n RadioButton radioButton_q1 = findViewById (R.id.optionB_q1);\n boolean firstQuestionCorrect = radioButton_q1.isChecked ();\n if (firstQuestionCorrect) {\n points += 1;\n }\n //Question 2\n RadioButton radioButton_q2 = findViewById (R.id.optionC_q2);\n boolean secondQuestionCorrect = radioButton_q2.isChecked ();\n if (secondQuestionCorrect) {\n points += 1;\n }\n\n //Question 3 - in order to get a point in Question 3, three particular boxes has to be checked\n CheckBox checkAns1_q3 = findViewById (R.id.checkbox1_q3);\n boolean thirdQuestionAnswer1 = checkAns1_q3.isChecked ();\n CheckBox checkAns2_q3 = findViewById (R.id.checkbox2_q3);\n boolean thirdQuestionAnswer2 = checkAns2_q3.isChecked ();\n CheckBox checkAns3_q3 = findViewById (R.id.checkbox3_q3);\n boolean thirdQuestionAnswer3 = checkAns3_q3.isChecked ();\n CheckBox checkAns4_q3 = findViewById (R.id.checkbox4_q3);\n boolean thirdQuestionAnswer4 = checkAns4_q3.isChecked ();\n CheckBox checkAns5_q3 = findViewById (R.id.checkbox5_q3);\n boolean thirdQuestionAnswer5 = checkAns5_q3.isChecked ();\n CheckBox checkAns6_q3 = findViewById (R.id.checkbox6_q3);\n boolean thirdQuestionAnswer6 = checkAns6_q3.isChecked ();\n CheckBox checkAns7_q3 = findViewById (R.id.checkbox7_q3);\n boolean thirdQuestionAnswer7 = checkAns7_q3.isChecked ();\n if (thirdQuestionAnswer2 && thirdQuestionAnswer3 && thirdQuestionAnswer6 && !thirdQuestionAnswer1 && !thirdQuestionAnswer4 && !thirdQuestionAnswer5 && !thirdQuestionAnswer7) {\n points = points + 1;\n }\n\n //Question 4\n RadioButton radioButton_q4 = findViewById (R.id.optionC_q4);\n boolean forthQuestionCorrect = radioButton_q4.isChecked ();\n if (forthQuestionCorrect) {\n points += 1;\n }\n\n //Question 5\n EditText fifthAnswer = findViewById (R.id.q5_answer);\n String fifthAnswerText = fifthAnswer.getText ().toString ();\n if (fifthAnswerText.equals (\"\")) {\n Toast.makeText (getApplicationContext (), getString (R.string.noFifthAnswer), Toast.LENGTH_LONG).show ();\n return;\n } else if ((fifthAnswerText.equalsIgnoreCase (getString (R.string.pacific))) || (fifthAnswerText.equalsIgnoreCase (getString (R.string.pacificOcean)))) {\n points += 1;\n }\n\n //Question 6\n RadioButton radioButton_q6 = findViewById (R.id.optionA_q6);\n boolean sixthQuestionCorrect = radioButton_q6.isChecked ();\n if (sixthQuestionCorrect) {\n points += 1;\n }\n\n //Showing the result to the user\n displayScore (points);\n }", "private int countCorrectAnswers(boolean[] answers) {\n int numberCorrect = 0;\n for (int i = 0; i < answers.length; i++) {\n if (answers[i]) {\n numberCorrect++;\n }\n }\n return numberCorrect;\n }", "public void checkAnswers(View v) {\n int correct = 0;\n\n //Question 1 answer\n RadioButton a1 = (RadioButton) findViewById(R.id.q1_a2);\n\n if (a1.isChecked()) {\n correct++;\n } else {\n TextView q1 = (TextView) findViewById(R.id.question_1);\n q1.setTextColor(Color.RED);\n }\n\n //Question 2 answer\n RadioButton a2 = (RadioButton) findViewById(R.id.q2_a2);\n\n if (a2.isChecked()) {\n correct++;\n } else {\n TextView q2 = (TextView) findViewById(R.id.question_2);\n q2.setTextColor(Color.RED);\n }\n\n //Question 3\n CheckBox a3_1 = (CheckBox) findViewById(R.id.q3_a1);\n CheckBox a3_2 = (CheckBox) findViewById(R.id.q3_a2);\n CheckBox a3_3 = (CheckBox) findViewById(R.id.q3_a3);\n\n if (a3_1.isChecked() && a3_2.isChecked() && a3_3.isChecked()) {\n correct++;\n } else {\n TextView q3 = (TextView) findViewById(R.id.question_3);\n q3.setTextColor(Color.RED);\n }\n\n //Question 4\n EditText a4 = (EditText) findViewById(R.id.q4_a);\n\n if (a4.getText().toString().equalsIgnoreCase(getResources().getString(R.string.q4_a))) {\n correct++;\n } else {\n TextView q4 = (TextView) findViewById(R.id.question_4);\n q4.setTextColor(Color.RED);\n }\n\n //Question 5\n RadioButton a5 = (RadioButton) findViewById(R.id.q5_a3);\n\n if (a5.isChecked()) {\n correct++;\n } else {\n TextView q5 = (TextView) findViewById(R.id.question_5);\n q5.setTextColor(Color.RED);\n }\n\n //Question 6\n RadioButton a6 = (RadioButton) findViewById(R.id.q6_a1);\n\n if (a6.isChecked()) {\n correct++;\n } else {\n TextView q6 = (TextView) findViewById(R.id.question_6);\n q6.setTextColor(Color.RED);\n }\n\n //Question 7\n EditText a7 = (EditText) findViewById(R.id.q7_a);\n\n if (a7.getText().toString().equalsIgnoreCase(getResources().getString(R.string.q7_a))) {\n correct++;\n } else {\n TextView q7 = (TextView) findViewById(R.id.question_7);\n q7.setTextColor(Color.RED);\n }\n\n //Question 8\n RadioButton a8 = (RadioButton) findViewById(R.id.q8_a1);\n\n if (a8.isChecked()) {\n correct++;\n } else {\n TextView q8 = (TextView) findViewById(R.id.question_8);\n q8.setTextColor(Color.RED);\n }\n\n //Toast\n Context context = getApplicationContext();\n CharSequence text = \"Score: \" + correct + \"/8\";\n int duration = Toast.LENGTH_SHORT;\n Toast.makeText(context, text, duration).show();\n }", "public static void takeTest(Question [] questions) {\n int score = 0;\n Scanner keyboardInput = new Scanner(System.in);\n for(int i = 0; i < questions.length; i++){\n System.out.println(questions[i].prompt);\n String answer = keyboardInput.nextLine();\n if(answer.equals(questions[i].answer)) {\n score++;\n }\n\n }\n System.out.println(\"Voce conseguiu \" + score + \"/\" + questions.length + \"pontos\");\n\n }", "public int displayCompletionMessage(int correctans) {\n\t\t\t\t\tcorrectans = ((correctans * 100) / 10);\n\t\t\t\t\tSystem.out.println(\"Your score is \"+ correctans);\n\t\t\t\t\t//display the message \"Congratulations, you are ready to go to the next level!\" if the student's score is greater than or equal to 75%\n\t\t\t\t\tif(correctans >= 75) {\n\t\t\t\t\t\tSystem.out.println(\"Congratulations, you are ready to go to the next level!\");\n\t\t\t\t\t}\n\t\t\t\t\t// display the message \"Please ask your teacher for extra help.\" if the student's score is less than 75%\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.println(\"Please ask your teacher for extra help.\");\n\t\t\t\t\t}\n\t\t\t\t\t//restart when the student agrees to solve a new problem set\n\t\t\t\t\t// shall terminate when the student declines to solve another problem set\n\t\t\t\t\tSystem.out.println(\"Want to solve a new problem set? 1 for yes/ 0 for no\");\n\t\t\t\t\t int counter = resp.nextInt();\n\t\t\t\t\t return counter;\n\t\t\t\t\t\n\t\t\t}", "private void checkAnswer()\r\n\t{\r\n\t\t//Submission to the model and getting 'true' if correct and 'false' otherwise\r\n\t\tboolean response = quizModel.isCorrect(group.getSelection().getActionCommand());\r\n\t\t\r\n\t\t//Updating score label based on result\r\n\t\tif (response == true)\r\n\t\t{\r\n\t\t\tscoreLabel.setText(\"<html><div style='text-align: center;'>\" + \"Score = \" + quizModel.getScore() + \"<br>Correct answer!\" + \"</div></html>\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tscoreLabel.setText(\"<html><div style='text-align: center;'>\" + \"Score = \" + quizModel.getScore() + \"<br>Incorrect answer!\" + \"</div></html>\");\r\n\t\t}\r\n\t}", "public int get_correctAnswer(){return this._correctAnswer;}", "public void updateTotalQuestions() {\n\t\ttotalQuestionsNum.setText(Integer.toString(noOfQuestions));\n\t}", "public void q1Submit(View view) {\n\n EditText editText = (EditText) findViewById(R.id.q1enterEditText);\n String q1answer = editText.getText().toString().trim();\n\n //Nested if statements to check if the answer is correct or not, then to assign 2 points if it's correct.\n if ((q1answer.toLowerCase().equals(getString(R.string.q1AnswerCheck1))) || (q1answer.toLowerCase().equals(getString(R.string.q1AnswerCheck2)))) {\n if (isNotAnsweredQ1) {\n display(pointCounter += 2);\n Toast.makeText(this, getString(R.string.correct1), Toast.LENGTH_SHORT).show();\n isNotAnsweredQ1 = false;\n }\n } else {\n Toast.makeText(this, getString(R.string.thinkAgain), Toast.LENGTH_SHORT).show();\n }\n }", "public void solver(View view) {\n int value = a + b;\n int val = arr[Integer.parseInt(view.getTag().toString())];\n if (val == value){\n response.setText(\"Correct :)\");\n correct++;\n }else{\n response.setText(\"Wrong :(\");\n }\n total++;\n updateScoreCard();\n setQuestion();\n }", "public List<QuizResultDTO> getQuizResults() {\n List<QuizResultDTO> quizResultDTOList = new ArrayList<>();\n List<Long> articleIdList = articleService.getArticleIdWhichHasQuizzes();\n for (long articleId : articleIdList) {\n QuizResultDTO quizResultDTO = new QuizResultDTO();\n quizResultDTO.setArticleId(articleId);\n quizResultDTO.setArticleTitle(articleRepository.findByArticleId(articleId).getArticleTitle());\n quizResultDTO.setQuestionNumber(articleService.getNumberOfQuizzesForArticle(articleId));\n\n Authentication authentication = SecurityContextHolder.getContext().getAuthentication();\n quizResultDTO.setCorrectAnswer(userQuizArticleRepository.countByUsernameAndArticleId(authentication.getName(), articleId));\n\n quizResultDTOList.add(quizResultDTO);\n }\n\n return quizResultDTOList;\n }", "@Override\n public void onClick(View view) {\n\n //Getting the answer to question 4 radio button 1\n boolean isRadioButton1Q4 = radioButton1Q4.isChecked();\n\n //Calculate Question 4 score\n int resultQ4 = calculateResultQ4(isRadioButton1Q4);\n\n //Calculate the quiz score\n int result = resultQ1 + resultQ2 + resultQ3 + resultQ4;\n\n //Display the quiz result in the Toast message\n Toast.makeText(Question4Activity.this, \"Congrats! Your score is \" + result + \". Thank you for taking the quiz!\", Toast.LENGTH_LONG).show();\n }", "public int getCorrectans()\n\t{\n\t\treturn correctAns;\n\t}", "public void q6Submit(View view) {\n\n RadioButton radioButton = (RadioButton) findViewById(R.id.q6option1);\n\n //Nested if statements to check if the answer is correct or not, then to assign 2 points if it's correct.\n if (radioButton.isChecked()) {\n if (isNotAnsweredQ6) {\n display(pointCounter += 2);\n Toast.makeText(this, getString(R.string.correct2), Toast.LENGTH_SHORT).show();\n isNotAnsweredQ6 = false;\n }\n } else {\n Toast.makeText(this, getString(R.string.thinkAgain), Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n\t\tpublic int getCount() {\n\t\t\t// TODO Auto-generated method stub\n\t\t\treturn questions.size();\n\t\t}", "public void submitAnswers(View view) {\n boolean oneAnswer = oneCorrectAnswer1985.isChecked();\n boolean twoAnswer = twoCorrectAnswerWalterPayton.isChecked();\n boolean threeAnswer = threeCorrectAnswerMike.isChecked();\n boolean fourAnswer = fourCorrectAnswerJay.isChecked();\n String fiveAnswer = fiveCorrectAnswerDecatur.getText().toString().trim();\n boolean sixAnswer = !sixWrongAnswerGeorge.isChecked() && !sixWrongAnswerLovie.isChecked() && sixCorrectAnswerJohn.isChecked() && sixCorrectAnswerMarc.isChecked();\n\n\n score = calculateTotal(oneAnswer, twoAnswer, threeAnswer, fourAnswer, fiveAnswer, sixAnswer);\n String totalMessage = submitAnswersScore(score);\n\n Context context = getApplicationContext();\n CharSequence text = totalMessage;\n int duration = Toast.LENGTH_LONG;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n }", "public void submitQuiz(View view) {\n\n if(parentKiller()) {\n question1 = 1;\n } else{\n question1 = 0;\n }\n\n if(jokerKills()) {\n question2 = 1;\n } else {\n question2 = 0;\n }\n\n if (batCity()) {\n question3 = 1;\n } else {\n question3 = 0;\n }\n\n if (checkboxQuestion()) {\n question4 = 1;\n } else {\n question4 = 0;\n }\n\n if (nameEntry()) {\n question5 = 1;\n } else {\n question5 = 0;\n }\n\n correctPoints = question1 + question2 + question3 + question4 + question5;\n\n Toast toastScore = Toast.makeText(getApplicationContext(), \"You scored \" + correctPoints + \" points!\", Toast.LENGTH_SHORT);\n toastScore.show();\n }", "int getNumberOfAllQuestions();", "int getNumberOfQuestions();", "public List<Integer> getCorrectAnswers() {\n\t\treturn correctAnswers;\n\t}", "public void submitAnswers(View view){\n\n //Find the correct answers for questions 1 & 2 and check if they have been selected\n CheckBox firstCheckBox = (CheckBox)findViewById(R.id.checkbox1);\n boolean firstCheckBoxIsChecked = firstCheckBox.isChecked();\n\n CheckBox secondCheckBox = (CheckBox)findViewById(R.id.checkbox2);\n boolean secondCheckBoxIsChecked = secondCheckBox.isChecked();\n\n CheckBox thirdCheckBox = (CheckBox)findViewById(R.id.checkbox3);\n boolean thirdCheckBoxIsChecked = thirdCheckBox.isChecked();\n\n CheckBox fourthCheckBox = (CheckBox)findViewById(R.id.checkbox4);\n boolean fourthCheckBoxIsChecked = fourthCheckBox.isChecked();\n\n //Find the EditText field, find out what has been typed in the field and convert it into a string\n EditText questionFourAnswer = (EditText)findViewById(R.id.question_four_field);\n String questionFourAnswered = questionFourAnswer.getText().toString().toLowerCase();\n\n //Find the RadioGroup for Question2 and find out which radioButton has been selected\n RadioGroup radioGroupQuestion2 = (RadioGroup) findViewById(R.id.radio_group_q2);\n int selectedIdQ2 = radioGroupQuestion2.getCheckedRadioButtonId();\n\n //Find the RadioGroup for Question3 and find out which radioButton has been selected\n RadioGroup radioGroupQuestion3= (RadioGroup) findViewById(R.id.radio_group_q3);\n int selectedIdQ3 = radioGroupQuestion3.getCheckedRadioButtonId();\n\n //Calculate points, create a message to display users' score and display it as a toast message\n int points = calculatePoints(firstCheckBoxIsChecked, secondCheckBoxIsChecked, questionFourAnswered, selectedIdQ2, selectedIdQ3, thirdCheckBoxIsChecked, fourthCheckBoxIsChecked);\n String pointsMessage = createQuizSummary(points);\n Toast.makeText(getApplicationContext(), pointsMessage, Toast.LENGTH_SHORT).show();\n }", "private void calculateScore() {\n EditText editText1 = (EditText) findViewById(R.id.edit_text1);\n String answer1 = editText1.getText().toString().toLowerCase().trim();\n if (answer1.equals( getResources().getText(R.string.answer1))) {\n score += 3;\n } else {\n //show false\n }\n\n RadioGroup radioGroup2 = (RadioGroup) findViewById(R.id.radio_group2);\n int checkedRadioButtonId2 = radioGroup2.getCheckedRadioButtonId();\n if (checkedRadioButtonId2 == R.id.rb21) {\n score += 1;\n } else {\n //show false\n }\n\n CheckBox checkBox3b = (CheckBox) findViewById(R.id.cb32);\n CheckBox checkBox3d = (CheckBox) findViewById(R.id.cb34);\n if (checkBox3b.isChecked() && checkBox3d.isChecked()) {\n score += 2;\n } else {\n //show false\n }\n\n RadioGroup radioGroup4 = (RadioGroup) findViewById(R.id.radio_group4);\n int checkedRadioButtonId4 = radioGroup4.getCheckedRadioButtonId();\n if (checkedRadioButtonId4 == R.id.rb41) {\n score += 1;\n } else {\n //show false\n }\n }", "double scoreAnswer(Question question, Answer answer);", "private void getAllQuestion(){\r\n\r\n if(ques.getText().toString().equals(\"\")||opt1.getText().toString().equals(\"\")||opt2.getText().toString().equals(\"\")||\r\n opt3.getText().toString().equals(\"\")||correct.getText().toString().equals(\"\")){\r\n Toast.makeText(getBaseContext(), \"Please fill all fields\", Toast.LENGTH_LONG).show();\r\n }\r\n else{\r\n\r\n int c = Integer.parseInt((correct.getText().toString()));\r\n if (c > 3) {\r\n Toast.makeText(getBaseContext(), \"Invalid Correct answer\", Toast.LENGTH_LONG).show();\r\n } else {\r\n\r\n setQuestions();\r\n }\r\n finishQuiz();\r\n }\r\n }", "public void q3Submit(View view) {\n\n RadioButton radioButton = (RadioButton) findViewById(R.id.q3option1);\n\n //Nested if statements to check if the answer is correct or not, then to assign 2 points if it's correct.\n if (radioButton.isChecked()) {\n if (isNotAnsweredQ3) {\n display(pointCounter += 2);\n Toast.makeText(this, getString(R.string.correct2), Toast.LENGTH_SHORT).show();\n isNotAnsweredQ3 = false;\n }\n } else {\n Toast.makeText(this, getString(R.string.thinkAgain), Toast.LENGTH_SHORT).show();\n }\n }", "public Map<String, Integer> getResultStatistics() {\n\t\t//Create a hash map to store the results\n\t\tMap<String, Integer> stats = new HashMap<String, Integer>();\n\t\t\n\t\tif (submissions != null) {\n\t\t\t//Get the iterator for the submission hash map\n\t\t\tIterator<Answer> it = submissions.values().iterator();\n\t\t\t\n\t\t\t//Get the list of answers stored in the question and initialize the stats hash map\n\t\t\tList<String> choices = currentQuestion.getAnswerOptions().getAvailableAnswers();\n\t\t\tfor (int i = 0; i < choices.size(); i++)\n\t\t\t\tstats.put(choices.get(i), 0);\n\t\t\t\n\t\t\t//Process each answer that was submitted\n\t\t\twhile (it.hasNext()) {\n\t\t\t\tAnswer temp = it.next();\n\t\t\t\tMap<String, Boolean> response = temp.getResponse();\n\t\t\t\t\n\t\t\t\t//For each answer key check if the stored value is true. If it is, then increase its\n\t\t\t\t//corresponding value in stats\n\t\t\t\tfor (int i = 0; i < choices.size(); i++) {\n\t\t\t\t\tif (response.get(choices.get(i))) {\n\t\t\t\t\t\tint value = stats.get(choices.get(i));\n\t\t\t\t\t\tvalue++;\n\t\t\t\t\t\tstats.put(choices.get(i), value);\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn stats;\n\t}", "public void calculateFinalPoints() {\n int finalPoints = 0;\n for (final Entry<Question, ExamResultAnswers> entry : submittedAnswers.entrySet()) {\n final Question question = entry.getKey();\n double partialPoint = 0;\n final double pointStep = (double) question.getPoints() / question.getAnswers().size();\n final Iterator<Answer> correctAnswers = question.getAnswers().iterator();\n final Iterator<Answer> studentAnswers = entry.getValue().getAnswers().iterator();\n while (correctAnswers.hasNext() && studentAnswers.hasNext()) {\n final Answer studentAnswer = studentAnswers.next();\n final Answer correctAnswer = correctAnswers.next();\n if (question.getType() == QuestionType.FILL_IN_THE_BLANK) {\n if (studentAnswer.getText().trim().equalsIgnoreCase(correctAnswer.getText().trim())) {\n partialPoint += pointStep;\n } else {\n if (exam.getEvaluationMethod() == WrongAnswerEvaluationMethod.SUBTRACTION) {\n partialPoint -= pointStep;\n }\n }\n } else if (question.getType() == QuestionType.SINGLE_CHOICE) {\n // A single choice brings only points if the ONE correct one is chosen, otherwise always zero points\n if (studentAnswer.isRightAnswer() == correctAnswer.isRightAnswer()\n && correctAnswer.isRightAnswer()) {\n partialPoint += question.getPoints();\n break;\n } else if (studentAnswer.isRightAnswer() && !correctAnswer.isRightAnswer()) {\n partialPoint = 0;\n break;\n }\n } else if (question.getType() == QuestionType.MULTIPLE_CHOICE) {\n if (studentAnswer.isRightAnswer() == correctAnswer.isRightAnswer()) {\n partialPoint += pointStep;\n } else {\n if (exam.getEvaluationMethod() == WrongAnswerEvaluationMethod.SUBTRACTION) {\n partialPoint -= pointStep;\n }\n }\n }\n }\n if (partialPoint < 0) {\n partialPoint = 0;\n }\n finalPoints += (int) Math.round(partialPoint);\n }\n points = finalPoints;\n final int maxPoints = exam.getMaxPoints();\n passed = (finalPoints / (double) maxPoints) * 100 >= exam.getMinPoints();\n }", "public void showResults(){\n customerCount = simulation.getCustomerCount();\n phoneCount = simulation.getPhoneCount();\n doorCount = simulation.getDoorCount();\n unhelpedCount = simulation.getUnhelped();\n totalCus.setText(\"Total number of Customers: \"+customerCount+\"\\t\\t\");\n doorCus.setText(\"Number of Door Customers: \"+doorCount+\"\\t\\t\");\n phoneCus.setText(\"Number of Phone Customers: \"+phoneCount+\"\\t\\t\");\n unhelped.setText(\"Number of Customers left unhelped at the end: \"+unhelpedCount);\n }", "public void checkAnswer(View v) {\r\n\r\n // to show the text view (textViewSubtraction2)\r\n TextView textViewSubtraction2 = (TextView) findViewById(R.id.textViewSubtraction2);\r\n textViewSubtraction2.setVisibility(View.VISIBLE);\r\n\r\n // get the answer from the edit text (subtractionAnswer)\r\n check_input = (EditText) findViewById(R.id.subtractionAnswer);\r\n int inputAnswer = Integer.parseInt(check_input.getText().toString());\r\n\r\n // clear the edit text\r\n check_input.setText(\"\");\r\n\r\n // print the result in the text view correct_answer_subtraction\r\n TextView tv = (TextView) findViewById(R.id.correct_answer_subtraction);\r\n\r\n // if for the correct answer and else to the wrong answer\r\n if (inputAnswer == answer) {\r\n counter++;\r\n tv.setText(\"Good job, you have \" + counter + \" points\" );\r\n\r\n // to hide the start text view (textViewSubtraction)\r\n TextView textViewSubtraction = (TextView) findViewById(R.id.textViewSubtraction);\r\n textViewSubtraction.setVisibility(View.INVISIBLE);\r\n\r\n // to get new data in to the (textViewSubtraction2) in order to keep count the points\r\n TextView tv3 = (TextView) findViewById(R.id.textViewSubtraction2);\r\n Random r = new Random();\r\n i = r.nextInt(100-1)+1;\r\n a = r.nextInt(100-1)+1;\r\n\r\n // to keep the greater number first\r\n if (i >= a){\r\n answer = i - a;\r\n // print the numbers\r\n tv3.setText(Integer.toString(i) + \" - \" + Integer.toString(a));\r\n }else {\r\n answer = a - i;\r\n // print the numbers\r\n tv3.setText(Integer.toString(a) + \" - \" + Integer.toString(i));\r\n }\r\n\r\n } else {\r\n\r\n // Get instance of Vibrator from current Context\r\n Vibrator vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);\r\n // Vibrate for 1000 milliseconds\r\n vibrator.vibrate(1000);\r\n\r\n // to hide the start text view (textViewSubtraction)\r\n TextView textViewSubtraction = (TextView) findViewById(R.id.textViewSubtraction);\r\n textViewSubtraction.setVisibility(View.INVISIBLE);\r\n\r\n // to get new data in to the (textViewSubtraction2) in order to keep count the points\r\n tv.setText(\"the answer is \" + Integer.toString(answer));\r\n TextView tv3 = (TextView) findViewById(R.id.textViewSubtraction2);\r\n Random r = new Random();\r\n i = r.nextInt(100-1)+1;\r\n a = r.nextInt(100-1)+1;\r\n\r\n // to keep the greater number first\r\n if (i >= a){\r\n answer = i - a;\r\n // print the numbers\r\n tv3.setText(Integer.toString(i) + \" - \" + Integer.toString(a));\r\n }else {\r\n answer = a - i;\r\n // print the numbers\r\n tv3.setText(Integer.toString(a) + \" - \" + Integer.toString(i));\r\n }\r\n } //end of if, else\r\n }", "public int getCorrect()\n\t{\n\t\treturn correct;\t\n\t}", "public void finishQuiz(View view){\n if(((RadioButton) findViewById(R.id.radio_new_york_city)).isChecked()) {\n score++;\n }\n\n //Anser for question 2\n if(((RadioButton) findViewById(R.id.radio_food_cart)).isChecked()) score++;\n\n //Anser for question 3\n if(((CheckBox) findViewById(R.id.check_chicken)).isChecked()\n && ((CheckBox) findViewById(R.id.check_gyro)).isChecked()\n && !((CheckBox) findViewById(R.id.check_pork)).isChecked()) score++;\n\n //Anser for question 4\n String answer4 = ((EditText) findViewById(R.id.edit_bread)).getText().toString().toLowerCase();\n if(answer4.equals(\"pita\")) score++;\n\n //Anser for question 5\n if(((CheckBox) findViewById(R.id.check_red)).isChecked()\n && ((CheckBox) findViewById(R.id.check_yellow)).isChecked()\n && !((CheckBox) findViewById(R.id.check_white)).isChecked()) score++;\n\n\n //Anser for question 6\n if(((RadioButton) findViewById(R.id.radio_large)).isChecked()) score++;\n\n //Display the Toast\n Context context = getApplicationContext();\n\n CharSequence text;\n if(score == 6) {\n text = \"Congrats! Your Score was \" + score + \" out of 6!\";\n } else {\n text = \"You only have \" + score + \" out of 6! Try again!\";\n }\n int duration = Toast.LENGTH_LONG;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n\n //Resest score to 0\n\n score = 0;\n }", "private String createQuizSummary (int points) {\n if (points >= 4){\n String pointsMessage = getString(R.string.total_points) + \" \" + points + getString(R.string.good_job);\n return pointsMessage;\n }\n else {\n String pointsMessage = getString(R.string.total_points) + \" \" + points;\n return pointsMessage;\n }\n }", "public void submitAnswers(View view) {\n\n //Initializing the correct answers in RadioGroups\n questionOneAnswerThree = findViewById(R.id.questionOneAnswerThreeButton);\n questionTwoAnswerFour = findViewById(R.id.questionTwoAnswerFourButton);\n questionThreeAnswerOne = findViewById(R.id.questionThreeAnswerOneButton);\n questionFourAnswerTwo = findViewById(R.id.questionFourAnswerTwoButton);\n questionFiveAnswerFour = findViewById(R.id.questionFiveAnswerFourButton);\n questionSixAnswerTwo = findViewById(R.id.questionSixAnswerTwoButton);\n questionSevenAnswerOne = findViewById(R.id.questionSevenAnswerOneButton);\n\n //Calculating score questions 1-7\n if (questionOneAnswerThree.isChecked()) {\n score++;\n }\n\n if (questionTwoAnswerFour.isChecked()) {\n score++;\n }\n\n if (questionThreeAnswerOne.isChecked()) {\n score++;\n }\n\n if (questionFourAnswerTwo.isChecked()) {\n score++;\n }\n\n if (questionFiveAnswerFour.isChecked()) {\n score++;\n }\n\n if (questionSixAnswerTwo.isChecked()) {\n score++;\n }\n\n if (questionSevenAnswerOne.isChecked()) {\n score++;\n }\n\n // +1 for correct answer\n if (questionEightAnswer.getText().toString().equals(\"1999\")) {\n score++;\n }\n\n //Calculating score if 3 correct answers are checked and 1 incorrect answer is unchecked\n if (questionNineAnswerOne.isChecked() && questionNineAnswerTwo.isChecked() && !questionNineAnswerThree.isChecked() && questionNineAnswerFour.isChecked()) {\n score++;\n }\n\n if (!questionTenAnswerOne.isChecked() && questionTenAnswerTwo.isChecked() && questionTenAnswerThree.isChecked() && questionTenAnswerFour.isChecked()) {\n score++;\n }\n\n //Toast message with score\n Toast.makeText(this, \"Your score: \" + score + \" out of 10 correct!\", Toast.LENGTH_LONG).show();\n\n score = 0;\n }", "public Results(String question, ArrayList<String> correctAnswers) {\n\t\t\tthis.questionForFT = question;\n\t\t\tthis.correctAnswersForFT = correctAnswers;\n\t\t}", "@Test\n void studentMCQTotalAnsweredTest(){\n Student student = new Student(\"Lim\");\n\n int expectedResult = 10; // Input for testing\n student.setNumQuestionAns(expectedResult); // Set Total Number Question(s) Answered\n System.out.println(\"Test Case #2\");\n System.out.println(\"\\tExpected Result: \" + expectedResult); // print expected result\n int actualResult = student.getNumQuestionAns(); // Actual Result\n System.out.println(\"\\tActual Result: \" + actualResult); // Print actual result\n assertEquals(expectedResult, actualResult); // Compare the expected result (True) & Actual Result\n }", "public void topButton(View view) {\n\n if (correct_answer[count] == 0){\n score += 1;\n Toast.makeText(animal_quiz.this, \"That's right!! Awesome.\",Toast.LENGTH_SHORT).show();\n if (count < 31) {\n count += 1;\n }\n else if (count == 31) {\n end();\n }\n rightAnswer(count);\n wrongAnswer(count);\n }\n else if (correct_answer[count] == 1){\n Toast.makeText(animal_quiz.this, \"Oops! Practice makes perfect!\",Toast.LENGTH_SHORT).show();\n }\n }", "Integer getNumQuestions();", "public void actionPerformed(ActionEvent e){\n\t\t\t\t\tif (q2.isAnswerCorrect(getattempt.getText())){ //if you get the 2nd question correct\n\t\t\t\t\t\tforq2 = 1;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tint score = forq1 + forq2; //score is the sum of the individual questions\n\t\t\t\t\tattempt2 = getattempt.getText(); //removes all the own components to make way for the new ones\n\t\t\t\t\tquestionarea.setVisible(false);\n\t\t\t\t\tenter.setVisible(false);\n\t\t\t\t\tgetattempt.setVisible(false);\n\t\t\t\t\tJLabel result = new JLabel(\"RESULT: \" + score + \"/2\"); //the result of your quizz\n\t\t\t\t\tresult.setFont(new Font(\"Serif\", Font.BOLD, 50));\n\t\t\t\t\tresult.setBounds(110,15, 400,50);\n\t\t\t\t\tJTextArea question1 = new JTextArea(q1.question);\n\t\t\t\t\tJTextArea question2 = new JTextArea(q2.question);\n\t\t\t\t\n\t\t\t\t\t//displays the correct answer your answer, and the question\n\t\t\t\t\tJLabel header = new JLabel(\"Question Your Answer Correct Ans.\");\n\t\t\t\t\theader.setFont(new Font(\"Serif\", Font.BOLD, 15));\n\t\t\t\t\theader.setBounds(10, 65,500,50);\n\t\t\t\t\t\n\t\t\t\t\tquestion1.setBounds(10,110, 280,50);\n\t\t\t\t\tquestion1.setLineWrap(true);\n\t\t\t\t\tJTextArea youranswer = new JTextArea (attempt);\n\t\t\t\t\tyouranswer.setBounds(300, 110, 50,30);\n\t\t\t\t\tJTextArea theanswer = new JTextArea(q1.answer);\n\t\t\t\t\ttheanswer.setBounds(410, 110,50,30);\n\t\t\t\t\t\n\t\t\t\t\tquestion2.setBounds(10,160, 280,50);\n\t\t\t\t\tquestion2.setLineWrap(true);\n\t\t\t\t\tJTextArea youranswer2 = new JTextArea (attempt2);\n\t\t\t\t\tyouranswer2.setBounds(300, 160 ,50,30);\n\t\t\t\t\tJTextArea theanswer2 = new JTextArea(q2.answer);\n\t\t\t\t\ttheanswer2.setBounds(410, 160,50,30);\n\t\t\t\t\t//adds everything to the JPanel\n\t\t\t\t\tadd(result);\n\t\t\t\t\tadd(question1);\n\t\t\t\t\tadd(question2);\n\t\t\t\t\tadd(header);\n\t\t\t\t\tadd(youranswer);\n\t\t\t\t\tadd(theanswer);\n\t\t\t\t\tadd(youranswer2);\n\t\t\t\t\tadd(theanswer2);\n\t\t\t\t\t\n\t\t\t\t\tJButton quit = new JButton(\"Exit\"); //the button that allows you to quit\n\t\t\t\t\tquit.setBounds(50,230,65,20);\n\t\t\t\t\tquit.addActionListener(new Quitter());\n\t\t\t\t\tadd(quit);\n\t\t\t\t\tif(type == 0){ //the type - if after u win a level, then you only need 1 right to pass, but if you lost, then u need 2 questins to pass, type == 0 is for loss\n\t\t\t\t\t\tif (score == 2){\n\t\t\t\t\t\t\tJButton retrylevel = new JButton(\"Retry\");\n\t\t\t\t\t\t\tretrylevel.setBounds(350,230,65,20);\n\t\t\t\t\t\t\tretrylevel.addActionListener(new Retry());\n\t\t\t\t\t\t\tadd(retrylevel);\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tJButton retrylevel = new JButton(\"New Game\");\n\t\t\t\t\t\t\tretrylevel.setBounds(350,210,100,20);\n\t\t\t\t\t\t\tretrylevel.addActionListener(new Retry());\n\t\t\t\t\t\t\tadd(retrylevel);\t\n\t\t\t\t\t\t\tnumplanes = 1;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\thealth = finalhealth;\n\t\t\t\t\t}\n\t\t\t\t\telse if (type == 1){ //if you just cleared a wave of planes, this pops up\n\t\t\t\t\t\tif (score == 2){\n\t\t\t\t\t\t\tJButton retrylevel = new JButton(\"Continue\");\n\t\t\t\t\t\t\tretrylevel.setBounds(330,230,100,20);\n\t\t\t\t\t\t\tretrylevel.addActionListener(new Retry());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfinalhealth++;\n\t\t\t\t\t\t\thealth = finalhealth;\n\t\t\t\t\t\t\tadd(retrylevel);\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (score==1){ //lets you pass on but no health bonus\n\t\t\t\t\t\t\tJButton retrylevel = new JButton(\"Continue\");\n\t\t\t\t\t\t\tretrylevel.setBounds(330,230,100,20);\n\t\t\t\t\t\t\tretrylevel.addActionListener(new Retry());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thealth = finalhealth;\n\t\t\t\t\t\t\tadd(retrylevel);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse { //forces you to restart\n\t\t\t\t\t\t\tJButton retrylevel = new JButton(\"Restart Level\");\n\t\t\t\t\t\t\tretrylevel.setBounds(350,210,120,20);\n\t\t\t\t\t\t\tretrylevel.addActionListener(new Retry());\n\t\t\t\t\t\t\tadd(retrylevel);\n\t\t\t\t\t\t\thealth=finalhealth;\n\t\t\t\t\t\t\tnumplanes--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}", "private int computeScore() {\n int score = 0;\n for (int i = 0; i < MainActivity.DEFAULT_SIZE; i++) {\n TextView answerView = (TextView) findViewById(MainActivity.NAME_VIEWS[i]);\n String answer = answerView.getText().toString();\n String solution = getQuizCountries().get(i).getName();\n if (answer.equals(solution)) {\n score++;\n }\n }\n return score;\n }", "@RequestMapping(\"reviewResponseForQuestion.do\")\n\tpublic String reviewResponseForQuestion(@RequestParam(\"surveyId\") String surveyIdStr, Model model) {\n\t\tint surveyId = Integer.parseInt(surveyIdStr);\n\t\tSurvey survey = surveyService.getSurvey(surveyId);\n\t\tList<Question> listOfQuestion = surveyService.getQuestions(surveyId);\n\t\tList<Question> mcqQuestion = new ArrayList<Question>();\n\t\tList<Long> cntForA = new ArrayList<Long>();\n\t\tList<Long> cntForB = new ArrayList<Long>();\n\t\tList<Long> cntForC = new ArrayList<Long>();\n\t\tList<Long> cntForD = new ArrayList<Long>();\n\t\t\n\t\tList<Question> descQuestion = new ArrayList<Question>();\n\t\t\n\t\tList<List<String>> descAnswer = new ArrayList<List<String>>();\n\t\t\n\t\t\n\t\tfor (Question q : listOfQuestion) {\n\t\t\tif (q.getQuestionType() == QuestionType.ONE_CORRECT || q.getQuestionType() == QuestionType.MORE_CORRECT) {\n\t\t\t\tmcqQuestion.add(q);\n\t\t\t\tcntForA.add(surveyService.countResponse(q.getQuestionId(), \"A\"));\n\t\t\t\tcntForB.add(surveyService.countResponse(q.getQuestionId(), \"B\"));\n\t\t\t\tcntForC.add(surveyService.countResponse(q.getQuestionId(), \"C\"));\n\t\t\t\tcntForD.add(surveyService.countResponse(q.getQuestionId(), \"D\"));\n\t\t\t} else {\n\t\t\t\tdescQuestion.add(q);\n\t\t\t\tdescAnswer.add(surveyService.getResponseForId(q.getQuestionId()));\n\t\t\t}\n\t\t}\n\t\tmodel.addAttribute(\"survey\", survey);\n\t\tmodel.addAttribute(\"mcqQuestion\", mcqQuestion);\n\t\tmodel.addAttribute(\"cntForA\", cntForA);\n\t\tmodel.addAttribute(\"cntForB\", cntForB);\n\t\tmodel.addAttribute(\"cntForC\", cntForC);\n\t\tmodel.addAttribute(\"cntForD\", cntForD);\n\t\tmodel.addAttribute(\"descQuestion\", descQuestion);\n\t\tmodel.addAttribute(\"descAnswer\", descAnswer);\n\t\t\n\t\treturn \"reviewResponseForQuestion\";\n\t}", "private int getCBAnswers() {\n CheckBox cbAns1 = findViewById(R.id.multiplication);\n CheckBox cbAns2 = findViewById(R.id.subtraction);\n CheckBox cbAns3 = findViewById(R.id.addition);\n CheckBox cbAns4 = findViewById(R.id.division);\n if (cbAns2.isChecked() && cbAns3.isChecked() && cbAns4.isChecked() && !cbAns1.isChecked()) {\n return 1;\n } else {\n return 0;\n }\n }", "public Results(ArrayList<String> list_Question_and_Answers, ArrayList<String> list_correct_answers){\n\t\t\tthis.list_Question_and_Answers = list_Question_and_Answers;\n\t\t\tthis.list_correct_answers = list_correct_answers;\n\t\t}", "public String answerQuestions(int qNumber, Tile[] tile1, \n\t\t\t\t\t\t\t\tTile[] tile2, Tile[] tile3) {\n\t\t\n\t\tint sum = 0;\n\t\tint sumRack1 = 0;\n\t\tint sumRack2 = 0;\n\t\tint sumRack3 = 0;\n\t\tint answerSum = 0;\n\t\tString more = \"\";\n\t\tArrayList<Tile> allCards = new ArrayList<Tile>();\n\t\tint ySevens = 0;\n\t\tint gSixes = 0;\n\t\tint rSixes = 0;\n\t\tint blues = 0;\n\t\tint oranges = 0;\n\t\tint browns = 0;\n\t\tint reds = 0;\n\t\tint blacks = 0;\n\t\tint greens = 0;\n\t\tint yellows = 0;\n\t\t\n\t\t// question number that's being asked\n\t\tswitch(qNumber) {\n\t\t\n\t\tcase 1:\n\t\t\t\n\t\t\tfor(int i = 0; i < tile1.length; i++) {\n\t\t\t\tsumRack1 = sumRack1 + tile1[i].getNumber();\n\t\t\t}\n\t\t\tif(sumRack1 >= 18) {\n\t\t\t\tanswerSum++;\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i = 0; i < tile2.length; i++) {\n\t\t\t\tsumRack2 = sumRack2 + tile2[i].getNumber();\n\t\t\t}\n\t\t\tif(sumRack2 >= 18) {\n\t\t\t\tanswerSum++;\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i = 0; i < tile3.length; i++) {\n\t\t\t\tsumRack3 = sumRack3 + tile3[i].getNumber();\n\t\t\t}\n\t\t\tif(sumRack3 >= 18) {\n\t\t\t\tanswerSum++;\n\t\t\t}\n\t\t\tanswer = \"On \" + answerSum + \" racks\";\n\t\t\tbreak;\n\t\t\n\t\tcase 2:\n\t\t\t\n\t\t\tfor (int i = 0; i < tile1.length; i++) {\n\t\t\t\tsum = sum + tile1[i].getNumber();\n\t\t\t}\n\t\t\tif (sum <= 12) {\n\t\t\t\tanswerSum++;\n\t\t\t}\n\t\t\t\n\t\t\tsum = 0;\n\t\t\tfor (int i = 0; i < tile2.length; i++) {\n\t\t\t\tsum = sum + tile2[i].getNumber();\n\t\t\t}\n\t\t\tif (sum <= 12) {\n\t\t\t\tanswerSum++;\n\t\t\t}\n\t\t\t\n\t\t\tsum = 0;\n\t\t\tfor (int i = 0; i < tile2.length; i++) {\n\t\t\t\tsum = sum + tile2[i].getNumber();\n\t\t\t}\n\t\t\tif (sum <= 12) {\n\t\t\t\tanswerSum++;\n\t\t\t}\n\t\t\tanswer = \"On \" + answerSum + \" racks\";\n\t\t\tbreak;\n\t\t\n\t\tcase 3:\n\t\t\tboolean sameNumDiffColors = false;\n\t\t\tint rackCount = 0;\n\t\t\t\n\t\t\tArrayList<Tile> list1 = new ArrayList<Tile>();\n\t\t\tArrayList<Tile> list2 = new ArrayList<Tile>();\n\t\t\tArrayList<Tile> list3 = new ArrayList<Tile>();\n\t\t\tfor(int i = 0; i < tile1.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tlist1.add(tile1[i]);\n\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 3, tile1. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\ttry{\n\t\t\t\tif(((Tile) list1.get(0)).getNumber() == ((Tile) list1.get(1)).getNumber()) {\n\t\t\t\t\tif(((Tile) list1.get(0)).getColor() != ((Tile) list1.get(1)).getColor()) {\n\t\t\t\t\t\tsameNumDiffColors = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(((Tile) list1.get(0)).getNumber() == ((Tile) list1.get(2)).getNumber()) {\n\t\t\t\t\tif(((Tile) list1.get(0)).getColor() != ((Tile) list1.get(2)).getColor()) {\n\t\t\t\t\t\tsameNumDiffColors = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(((Tile) list1.get(2)).getNumber() == ((Tile) list1.get(1)).getNumber()) {\n\t\t\t\t\tif(((Tile) list1.get(2)).getColor() != ((Tile) list1.get(1)).getColor()) {\n\t\t\t\t\t\tsameNumDiffColors = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(sameNumDiffColors) {\n\t\t\t\t\trackCount++;\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tLog.d(\"Code777\", \"Player.java Case 3, Tile1 sameNumDiffColors.\");\n\t\t\t}\n\t\t\t\n\t\t\tsameNumDiffColors = false;\n\t\t\tfor(int i = 0; i < tile2.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tlist2.add(tile2[i]);\n\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 3, tile2. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\ttry{\n\t\t\t\tif(((Tile) list2.get(0)).getNumber() == ((Tile) list2.get(1)).getNumber()) {\n\t\t\t\t\tif(((Tile) list2.get(0)).getColor() != ((Tile) list2.get(1)).getColor()) {\n\t\t\t\t\t\tsameNumDiffColors = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(((Tile) list2.get(0)).getNumber() == ((Tile) list2.get(2)).getNumber()) {\n\t\t\t\t\tif(((Tile) list2.get(0)).getColor() != ((Tile) list2.get(2)).getColor()) {\n\t\t\t\t\t\tsameNumDiffColors = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(((Tile) list2.get(2)).getNumber() == ((Tile) list2.get(1)).getNumber()) {\n\t\t\t\t\tif(((Tile) list2.get(2)).getColor() != ((Tile) list2.get(1)).getColor()) {\n\t\t\t\t\t\tsameNumDiffColors = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(sameNumDiffColors) {\n\t\t\t\t\trackCount++;\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tLog.d(\"Code777\", \"Player.java Case 3, Tile1 sameNumDiffColors.\");\n\t\t\t}\n\t\t\t\n\t\t\tsameNumDiffColors = false;\n\t\t\tfor(int i = 0; i < tile3.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tlist3.add(tile3[i]);\n\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 3, tile3. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\ttry{\n\t\t\t\tif(((Tile) list3.get(0)).getNumber() == ((Tile) list3.get(1)).getNumber()) {\n\t\t\t\t\tif(((Tile) list3.get(0)).getColor() != ((Tile) list3.get(1)).getColor()) {\n\t\t\t\t\t\tsameNumDiffColors = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(((Tile) list3.get(0)).getNumber() == ((Tile) list3.get(2)).getNumber()) {\n\t\t\t\t\tif(((Tile) list3.get(0)).getColor() != ((Tile) list3.get(2)).getColor()) {\n\t\t\t\t\t\tsameNumDiffColors = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(((Tile) list3.get(2)).getNumber() == ((Tile) list3.get(1)).getNumber()) {\n\t\t\t\t\tif(((Tile) list3.get(2)).getColor() != ((Tile) list3.get(1)).getColor()) {\n\t\t\t\t\t\tsameNumDiffColors = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(sameNumDiffColors) {\n\t\t\t\t\trackCount++;\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tLog.d(\"Code777\", \"Player.java Case 3, Tile1 sameNumDiffColors.\");\n\t\t\t}\n\t\t\tanswer = \"On \" + rackCount + \" racks\";\n\t\t\tbreak;\n\t\t\n\t\tcase 4:\n\t\t\trackCount = 0;\n\t\t\tString[] arrayTileColor = new String[3];\n\t\t\ttry {\n\t\t\t\tarrayTileColor[0] = tile1[0].getColor();\n\t\t\t\tarrayTileColor[1] = tile1[1].getColor();\n\t\t\t\tarrayTileColor[2] = tile1[2].getColor();\n\t\t\t} catch (Exception e) {\n\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 4 tile1\");\n\t\t\t}\n\t\t\tif(!(arrayTileColor[0].equals(arrayTileColor[1])))\n\t\t\t\tif(!(arrayTileColor[0].equals(arrayTileColor[2])))\n\t\t\t\t\tif(!(arrayTileColor[1].equals(arrayTileColor[2])))\n\t\t\t\t\t\trackCount++;\n\t\t\t\t\t\t\n\t\t\ttry {\n\t\t\t\tarrayTileColor[0] = tile2[0].getColor();\n\t\t\t\tarrayTileColor[1] = tile2[1].getColor();\n\t\t\t\tarrayTileColor[2] = tile2[2].getColor();\n\t\t\t} catch (Exception e) {\n\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 4 tile2\");\n\t\t\t}\n\t\t\tif(!(arrayTileColor[0].equals(arrayTileColor[1])))\n\t\t\t\tif(!(arrayTileColor[0].equals(arrayTileColor[2])))\n\t\t\t\t\tif(!(arrayTileColor[1].equals(arrayTileColor[2])))\n\t\t\t\t\t\trackCount++;\n\t\t\t\n\t\t\ttry {\n\t\t\t\tarrayTileColor[0] = tile3[0].getColor();\n\t\t\t\tarrayTileColor[1] = tile3[1].getColor();\n\t\t\t\tarrayTileColor[2] = tile3[2].getColor();\n\t\t\t} catch (Exception e) {\n\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 4 tile3\");\n\t\t\t}\n\t\t\tif(!(arrayTileColor[0].equals(arrayTileColor[1])))\n\t\t\t\tif(!(arrayTileColor[0].equals(arrayTileColor[2])))\n\t\t\t\t\tif(!(arrayTileColor[1].equals(arrayTileColor[2])))\n\t\t\t\t\t\trackCount++;\n\t\t\t\n\t\t\tanswer = \"On \" + rackCount + \" racks\";\n\t\t\tbreak;\n\n\t\t\n\t\tcase 5:\n\t\t\tLog.d(\"Code777\", \"---Answer Question 5: \"+ qNumber);\n\t\t\tint[] modArray = new int[3];\n\t\t\tint numRacks = 0;\n\t\t\tfor(int i = 0; i < tile1.length; i++) {\n\t\t\t\tmodArray[i] = tile1[i].getNumber() % 2;\n\t\t\t}\n\t\t\tif((modArray[0] == modArray[1]) && (modArray[0] == modArray[2])) {\n\t\t\t\tnumRacks++;\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0; i < tile2.length; i++) {\n\t\t\t\tmodArray[i] = tile2[i].getNumber() % 2;\n\t\t\t}\n\t\t\tif((modArray[0] == modArray[1]) && (modArray[0] == modArray[2])) {\n\t\t\t\tnumRacks++;\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0; i < tile3.length; i++) {\n\t\t\t\tmodArray[i] = tile3[i].getNumber() % 2;\n\t\t\t}\n\t\t\tif((modArray[0] == modArray[1]) && (modArray[0] == modArray[2])) {\n\t\t\t\tnumRacks++;\n\t\t\t}\n\t\t\tanswer = \"On \" + numRacks + \" racks\";\t\n\t\t\tbreak;\n\n\t\t\t\n\t\tcase 6:\n\t\t\tint dupTiles = 0;\n\t\t\ttry {\n\t\t\t\tif(((tile1[0].getNumber() == tile1[1].getNumber()) && \n\t\t\t\t\t\t(tile1[0].getColor().equals(tile1[1].getColor()))\n\t\t\t\t\t\t|| ((tile1[0].getNumber() == tile1[2].getNumber()) \n\t\t\t\t\t\t\t\t&& (tile1[0].getColor().equals(tile1[2].getColor())))\n\t\t\t\t\t\t\t\t\t|| ((tile1[1].getNumber() == tile1[2].getNumber()) \n\t\t\t\t\t\t\t\t\t\t\t&& (tile1[1].getColor().equals(tile1[2].getColor())))))\n\t\t\t\t\t\t\t\t\t\t\t\t\tdupTiles++;\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 6, tile1. \");\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tif(((tile2[0].getNumber() == tile2[1].getNumber()) && \n\t\t\t\t\t\t(tile2[0].getColor().equals(tile2[1].getColor()))\n\t\t\t\t\t\t|| ((tile2[0].getNumber() == tile2[2].getNumber()) \n\t\t\t\t\t\t\t\t&& (tile2[0].getColor().equals(tile2[2].getColor())))\n\t\t\t\t\t\t\t\t|| ((tile2[1].getNumber() == tile2[2].getNumber()) \n\t\t\t\t\t\t\t\t\t\t&& (tile2[1].getColor().equals(tile2[2].getColor()))))) \n\t\t\t\t\t\t\t\t\t\t\t\t\tdupTiles++;\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 6, tile2. \");\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tif(((tile3[0].getNumber() == tile3[1].getNumber()) && \n\t\t\t\t\t\t(tile3[0].getColor().equals(tile3[1].getColor()))\n\t\t\t\t\t\t|| ((tile3[0].getNumber() == tile3[2].getNumber()) \n\t\t\t\t\t\t\t\t&& (tile3[0].getColor().equals(tile3[2].getColor())))\n\t\t\t\t\t\t\t\t\t|| ((tile3[1].getNumber() == tile3[2].getNumber()) \n\t\t\t\t\t\t\t\t\t\t&& (tile3[1].getColor().equals(tile3[2].getColor())))))\n\t\t\t\t\t\t\t\t\t\t\t\t\tdupTiles++;\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 9, tile3. \");\n\t\t\t}\n\t\t\tanswer = \"On \" + dupTiles + \" racks\";\n\t\t\tbreak;\n\n\t\t\n\t\tcase 7:\n\t\t\tint consecutive = 0;\n\t\t\t\n\t\t\tint[] numArray = new int[3];\n\t\t\ttry {\n\t\t\t\tnumArray[0] = tile1[0].getNumber();\n\t\t\t\tnumArray[1] = tile1[1].getNumber();\n\t\t\t\tnumArray[2] = tile1[2].getNumber();\n\t\t\t} catch (Exception e) {\n\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 7, tile1. \");\n\t\t\t}\n\t\t\t\n\t\t\tArrays.sort(numArray);\n\t\t\tif((numArray[2] - numArray[1]) == 1 )\n\t\t\t\tif((numArray[1] - numArray[0]) == 1)\n\t\t\t\t\tconsecutive++;\n\t\t\t\n\t\t\ttry {\n\t\t\t\tnumArray[0] = tile2[0].getNumber();\n\t\t\t\tnumArray[1] = tile2[1].getNumber();\n\t\t\t\tnumArray[2] = tile2[2].getNumber();\n\t\t\t} catch (Exception e) {\n\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 7, tile1. \");\n\t\t\t}\n\t\t\tArrays.sort(numArray);\n\t\t\tif((numArray[2] - numArray[1]) == 1 )\n\t\t\t\tif( (numArray[1] - numArray[0]) == 1)\n\t\t\t\t\tconsecutive++;\n\t\t\t\n\t\t\ttry {\n\t\t\t\tnumArray[0] = tile3[0].getNumber();\n\t\t\t\tnumArray[1] = tile3[1].getNumber();\n\t\t\t\tnumArray[2] = tile3[2].getNumber();\n\t\t\t} catch (Exception e) {\n\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 7, tile1. \");\n\t\t\t}\n\t\t\tArrays.sort(numArray);\n\t\t\tif((numArray[2] - numArray[1]) == 1) \n\t\t\t\tif( (numArray[1] - numArray[0]) == 1)\n\t\t\t\t\tconsecutive++;\n\t\t\n\t\t\tanswer = \"On \" + consecutive + \" racks\";\n\t\t\tbreak;\n\n\t\t\n\t\tcase 8:\n\t\t\tSet<String> tileList = new HashSet<String>();\n\t\t\tint uniqueColors = 0;\n\t\t\tfor(int i = 0; i < tile1.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\ttileList.add(tile1[i].getColor());\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 8, tile1. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0; i < tile2.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\ttileList.add(tile2[i].getColor());\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 9, tile2. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0; i < tile3.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\ttileList.add(tile3[i].getColor());\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 9, tile3. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tuniqueColors = tileList.size();\n\t\t\tanswer = \"I see \" + uniqueColors + \" colors\";\n\t\t\tbreak;\n\n\t\t\t\n\t\tcase 9:\n\t\t\tArrayList<String> allColors = new ArrayList<String>();\n\t\t\tint greenCount = 0;\n\t\t\tint yellowCount = 0;\n\t\t\tint blackCount = 0;\n\t\t\tint brownCount = 0;\n\t\t\tint orangeCount = 0;\n\t\t\tint pinkCount = 0;\n\t\t\tint blueCount = 0;\n\t\t\tint count = 0;\n\t\t\t\n\t\t\tfor(int i = 0; i < tile1.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallColors.add(tile1[i].getColor());\n\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 9, tile1. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < tile2.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallColors.add(tile2[i].getColor());\n\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 9, tile2. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < tile3.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallColors.add(tile3[i].getColor());\n\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 9, tile3. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0; i < allColors.size(); i++) {\n\t\t\t\tif(allColors.get(i).equals(\"green\")) {\n\t\t\t\t\tgreenCount++;\n\t\t\t\t}\n\t\t\t\tif(allColors.get(i).equals(\"yellow\")) {\n\t\t\t\t\tyellowCount++;\n\t\t\t\t}\n\t\t\t\tif(allColors.get(i).equals(\"black\")) {\n\t\t\t\t\tblackCount++;\n\t\t\t\t}\n\t\t\t\tif(allColors.get(i).equals(\"brown\")) {\n\t\t\t\t\tbrownCount++;\n\t\t\t\t}\n\t\t\t\tif(allColors.get(i).equals(\"orange\")) {\n\t\t\t\t\torangeCount++;\n\t\t\t\t}\n\t\t\t\tif(allColors.get(i).equals(\"red\")) {\n\t\t\t\t\tpinkCount++;\n\t\t\t\t}\n\t\t\t\tif(allColors.get(i).equals(\"blue\")) {\n\t\t\t\t\tblueCount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (greenCount >= 3) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\tif (yellowCount >= 3) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\tif (blackCount >= 3) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\tif (brownCount >= 3) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\tif (orangeCount >= 3) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\tif (pinkCount >= 3) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\tif (blueCount >= 3) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\tanswer = \"\" + count + \" colors\";\n\t\t\tbreak;\n\n\t\t\n\t\tcase 10:\n\t\t\tint totalNums = 7;\n\t\t\tint uniqueNumsPresent = 0;\n\t\t\tint numsMissing = 0;\n\t\t\tSet<Integer> presentNums = new HashSet<Integer>();\n\t\t\tfor(int i = 0; i < tile1.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tpresentNums.add(tile1[i].getNumber());\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 10, tile1. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < tile2.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tpresentNums.add(tile2[i].getNumber());\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 10, tile2. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < tile3.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tpresentNums.add(tile3[i].getNumber());\n\t\t\t\t} catch (Exception e ) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 10, tile3. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tuniqueNumsPresent = presentNums.size();\n\t\t\tnumsMissing = totalNums - uniqueNumsPresent;\n\t\t\tanswer = \"\" + numsMissing + \" numbers are missing\";\n\t\t\tbreak;\n\n\t\t\n\t\tcase 11:\n\t\t\tArrayList<Tile> allTiles = new ArrayList<Tile>();\n\t\t\tint cardsISee = 0;\n\t\t\t\n\t\t\tfor(int i = 0; i < tile1.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallTiles.add(tile1[i]);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 11, tile1. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < tile2.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallTiles.add(tile2[i]);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 11, tile2. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < tile3.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallTiles.add(tile3[i]);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 11, tile3. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < allTiles.size(); i++) {\n\t\t\t\ttry {\n\t\t\t\t\tif((((Tile) allTiles.get(i)).getNumber() == 1) &&\n\t\t\t\t\t\t\t(((Tile)allTiles.get(i)).getColor().equals(\"green\"))){\n\t\t\t\t\t\tcardsISee++;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 11, tile1, getNumber(). \");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tif((((Tile) allTiles.get(i)).getNumber() == 5) &&\n\t\t\t\t\t\t\t(((Tile)allTiles.get(i)).getColor().equals(\"black\"))){\n\t\t\t\t\t\tcardsISee++;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 11, tile2, getNumber(). \");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tif((((Tile) allTiles.get(i)).getNumber() == 7) &&\n\t\t\t\t\t\t\t(((Tile)allTiles.get(i)).getColor().equals(\"red\"))){\n\t\t\t\t\t\tcardsISee++;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 11, tile3, getNumber() \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tanswer = \"\" + cardsISee;\n\t\t\tbreak;\n\n\t\t\t\n\t\tcase 12:\n\t\t\tint threes = 0;\n\t\t\tfor(int i = 0; i < tile1.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallCards.add(tile1[i]);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 12, tile1. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < tile2.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallCards.add(tile2[i]);\n\t\t\t\t} catch (Exception e ) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 12, tile2. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < tile3.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallCards.add(tile3[i]);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 12, tile3. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < allCards.size(); i++) {\n\t\t\t\ttry {\n\t\t\t\t\tif(((Tile) allCards.get(i)).getNumber() == 3){\n\t\t\t\t\t\tthrees++;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 12, getNumber()=3. \");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tif((((Tile) allCards.get(i)).getNumber() == 6) &&\n\t\t\t\t\t\t\t(((Tile)allCards.get(i)).getColor().equals(\"red\"))){\n\t\t\t\t\t\trSixes++;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 12, getNumber = 6. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(threes < rSixes) {\n\t\t\t\tmore = \"More Red 6s\";\n\t\t\t}\n\t\t\telse if(threes > rSixes) {\n\t\t\t\tmore = \"More 3s\";\n\t\t\t}\n\t\t\telse if(threes == rSixes) {\n\t\t\t\tmore = \"About the same\";\n\t\t\t}\n\t\t\tanswer = \"\" + more;\n\t\t\tbreak;\n\n\t\t\t\n\t\tcase 13:\n\n\t\t\tfor(int i = 0; i < tile1.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallCards.add(tile1[i]);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 13, tile1. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < tile2.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallCards.add(tile2[i]);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 13, tile2. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < tile3.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallCards.add(tile3[i]);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 13, tile3. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < allCards.size(); i++) {\n\t\t\t\ttry {\n\t\t\t\t\tif((((Tile) allCards.get(i)).getNumber() == 6) &&\n\t\t\t\t\t\t\t(((Tile)allCards.get(i)).getColor().equals(\"green\"))){\n\t\t\t\t\t\tgSixes++;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 13, getNumber = 6. \");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tif((((Tile) allCards.get(i)).getNumber() == 7) &&\n\t\t\t\t\t\t\t(((Tile)allCards.get(i)).getColor().equals(\"yellow\"))){\n\t\t\t\t\t\tySevens++;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 13, getNumber = 7 \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(gSixes < ySevens) {\n\t\t\t\tmore = \"More Yellow 7s\";\n\t\t\t}\n\t\t\telse if(gSixes > ySevens) {\n\t\t\t\tmore = \"More Green 6s\";\n\t\t\t}\n\t\t\telse if(gSixes == ySevens) {\n\t\t\t\tmore = \"About the same\";\n\t\t\t}\n\t\t\tanswer = \"\" + more;\n\t\t\tbreak;\n\n\t\t\t\n\t\tcase 14:\n\t\t\tint yTwos = 0;\n\t\t\tfor(int i = 0; i < tile1.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallCards.add(tile1[i]);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 14, tile1. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < tile2.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallCards.add(tile2[i]);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 14, tile2. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < tile3.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallCards.add(tile3[i]);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 14, tile3. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < allCards.size(); i++) {\n\t\t\t\ttry {\n\t\t\t\t\tif((((Tile) allCards.get(i)).getNumber() == 2) &&\n\t\t\t\t\t\t\t(((Tile)allCards.get(i)).getColor().equals(\"yellow\"))){\n\t\t\t\t\t\tyTwos++;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 14, getNumber = 2. \");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tif((((Tile) allCards.get(i)).getNumber() == 7) &&\n\t\t\t\t\t\t\t(((Tile)allCards.get(i)).getColor().equals(\"yellow\"))){\n\t\t\t\t\t\tySevens++;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 14, getNumber = 7. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(yTwos < ySevens) {\n\t\t\t\tmore = \"More Yellow 7s\";\n\t\t\t}\n\t\t\telse if(yTwos > ySevens) {\n\t\t\t\tmore = \"More Yellow 2s\";\n\t\t\t}\n\t\t\telse if(yTwos == ySevens) {\n\t\t\t\tmore = \"About the same\";\n\t\t\t}\n\t\t\tanswer = \"\" + more;\n\t\t\tbreak;\n\n\t\t\t\n\t\tcase 15:\n\n\t\t\tfor(int i = 0; i < tile1.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallCards.add(tile1[i]);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 15, tile1. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < tile2.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallCards.add(tile2[i]);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 15, tile2. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < tile3.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallCards.add(tile3[i]);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 15, tile3. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < allCards.size(); i++) {\n\t\t\t\ttry {\n\t\t\t\t\tif((((Tile) allCards.get(i)).getNumber() == 6) &&\n\t\t\t\t\t\t\t(((Tile)allCards.get(i)).getColor().equals(\"green\"))){\n\t\t\t\t\t\tgSixes++;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 15, getColor = green. \");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tif((((Tile) allCards.get(i)).getNumber() == 6) &&\n\t\t\t\t\t\t\t(((Tile)allCards.get(i)).getColor().equals(\"orange\"))){\n\t\t\t\t\t\trSixes++;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 15, getColor = orange\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(gSixes < rSixes) {\n\t\t\t\tmore = \"More Orange 6s\";\n\t\t\t}\n\t\t\telse if(gSixes > rSixes) {\n\t\t\t\tmore = \"More Green 6s\";\n\t\t\t}\n\t\t\telse if(gSixes == rSixes) {\n\t\t\t\tmore = \"About the same\";\n\t\t\t}\n\t\t\tanswer = \"\" + more;\n\t\t\tbreak;\n\n\t\t\t\n\t\tcase 16:\n\t\t\tint oSevens = 0;\n\t\t\tint bSevens = 0;\n\t\t\tfor(int i = 0; i < tile1.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallCards.add(tile1[i]);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 16, tile1. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < tile2.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallCards.add(tile2[i]);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 16, tile2. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < tile3.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallCards.add(tile3[i]);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 17, tile3. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < allCards.size(); i++) {\n\t\t\t\ttry {\n\t\t\t\t\tif((((Tile) allCards.get(i)).getNumber() == 7) &&\n\t\t\t\t\t\t\t(((Tile)allCards.get(i)).getColor().equals(\"blue\"))){\n\t\t\t\t\t\tbSevens++;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 16, getNumber = blue. \");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tif(!(((Tile) allCards.get(i)).getNumber() == 7) &&\n\t\t\t\t\t\t\t(((Tile)allCards.get(i)).getColor().equals(\"blue\"))){\n\t\t\t\t\t\toSevens++;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 16, getNumber = not blue. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(bSevens < oSevens) {\n\t\t\t\tmore = \"More 7s of Other Colors\";\n\t\t\t}\n\t\t\telse if(bSevens > oSevens) {\n\t\t\t\tmore = \"More Blue 7s\";\n\t\t\t}\n\t\t\telse if(bSevens == oSevens) {\n\t\t\t\tmore = \"About the same\";\n\t\t\t}\n\t\t\tanswer = \"\" + more;\n\t\t\tbreak;\n\n\t\t\t\n\t\tcase 17:\n\t\t\tfor(int i = 0; i < tile1.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallCards.add(tile1[i]);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 17, tile1. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < tile2.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallCards.add(tile2[i]);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 17, tile2. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < tile3.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallCards.add(tile3[i]);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 18, tile3. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < allCards.size(); i++) {\n\t\t\t\ttry {\n\t\t\t\t\tif((((Tile)allCards.get(i)).getColor().equals(\"brown\"))){\n\t\t\t\t\t\tbrowns++;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 18, getColor=brown. \");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tif((((Tile)allCards.get(i)).getColor().equals(\"blue\"))){\n\t\t\t\t\t\tblues++;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 18, getColor=blue. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(browns < blues) {\n\t\t\t\tmore = \"More Blue Numbers\";\n\t\t\t}\n\t\t\telse if(browns > blues) {\n\t\t\t\tmore = \"More Brown Numbers\";\n\t\t\t}\n\t\t\telse if(browns == blues) {\n\t\t\t\tmore = \"About the same\";\n\t\t\t}\n\t\t\tanswer = \"\" + more;\n\t\t\tbreak;\n\n\t\t\t\n\t\tcase 18:\n\t\t\tfor(int i = 0; i < tile1.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallCards.add(tile1[i]);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 18, tile1. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < tile2.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallCards.add(tile2[i]);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 18, tile2. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < tile3.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallCards.add(tile3[i]);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 18, tile3. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < allCards.size(); i++) {\n\t\t\t\ttry {\n\t\t\t\t\tif((((Tile)allCards.get(i)).getColor().equals(\"red\"))){\n\t\t\t\t\t\treds++;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 18, getColor=red. \");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tif((((Tile)allCards.get(i)).getColor().equals(\"orange\"))){\n\t\t\t\t\t\toranges++;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 18, getColor=orange. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(reds < oranges) {\n\t\t\t\tmore = \"More Orange Numbers\";\n\t\t\t}\n\t\t\telse if(reds > oranges) {\n\t\t\t\tmore = \"More Red Numbers\";\n\t\t\t}\n\t\t\telse if(reds == oranges) {\n\t\t\t\tmore = \"About the same\";\n\t\t\t}\n\t\t\tanswer = \"\" + more;\n\t\t\tbreak;\n\n\t\t\t\n\t\tcase 19:\n\t\t\tfor(int i = 0; i < tile1.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallCards.add(tile1[i]);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 19, tile1. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < tile2.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallCards.add(tile2[i]);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 19, tile2. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < tile3.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallCards.add(tile3[i]);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 19, tile3. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < allCards.size(); i++) {\n\t\t\t\ttry {\n\t\t\t\t\tif((((Tile)allCards.get(i)).getColor().equals(\"green\"))){\n\t\t\t\t\t\tgreens++;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 19, getColor=green. \");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tif((((Tile)allCards.get(i)).getColor().equals(\"blue\"))){\n\t\t\t\t\t\tblues++;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 19, getColor=blue. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(greens < blues) {\n\t\t\t\tmore = \"More Blue Numbers\";\n\t\t\t}\n\t\t\telse if(greens > blues) {\n\t\t\t\tmore = \"More Green Numbers\";\n\t\t\t}\n\t\t\telse if(greens == blues) {\n\t\t\t\tmore = \"About the same\";\n\t\t\t}\n\t\t\tanswer = \"\" + more;\n\t\t\tbreak;\n\n\t\t\t\n\t\tcase 20:\n\t\t\tfor(int i = 0; i < tile1.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallCards.add(tile1[i]);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 20, tile1. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < tile2.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallCards.add(tile2[i]);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 20, tile2. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < tile3.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallCards.add(tile3[i]);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 20, tile3. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < allCards.size(); i++) {\n\t\t\t\ttry {\n\t\t\t\t\tif((((Tile)allCards.get(i)).getColor().equals(\"yellow\"))){\n\t\t\t\t\t\tyellows++;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 20, getColor=yellow. \");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tif((((Tile)allCards.get(i)).getColor().equals(\"orange\"))){\n\t\t\t\t\t\toranges++;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 20, getColor=orange. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(yellows < oranges) {\n\t\t\t\tmore = \"More Orange Numbers\";\n\t\t\t}\n\t\t\telse if(yellows > oranges) {\n\t\t\t\tmore = \"More Yellow Numbers\";\n\t\t\t}\n\t\t\telse if(yellows == oranges) {\n\t\t\t\tmore = \"About the same\";\n\t\t\t}\n\t\t\tanswer = \"\" + more;\n\t\t\tbreak;\n\t\t\t\n\t\tcase 21:\n\t\t\tfor(int i = 0; i < tile1.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallCards.add(tile1[i]);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 21, tile1. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < tile2.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallCards.add(tile2[i]);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 21, tile2. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < tile3.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallCards.add(tile3[i]);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 21, tile3. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < allCards.size(); i++) {\n\t\t\t\ttry {\n\t\t\t\t\tif((((Tile)allCards.get(i)).getColor().equals(\"black\"))){\n\t\t\t\t\t\tblacks++;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 21, getColor=black. \");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tif((((Tile)allCards.get(i)).getColor().equals(\"brown\"))){\n\t\t\t\t\t\tbrowns++;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 21, getColor=brown. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(blacks < browns) {\n\t\t\t\tmore = \"More Brown Numbers\";\n\t\t\t}\n\t\t\telse if(blacks > browns) {\n\t\t\t\tmore = \"More Black Numbers\";\n\t\t\t}\n\t\t\telse if(blacks == browns) {\n\t\t\t\tmore = \"About the same\";\n\t\t\t}\n\t\t\tanswer = \"\" + more;\n\t\t\tbreak;\n\n\t\t\t\n\t\tcase 22:\n\t\t\tallCards = new ArrayList<Tile>();\n\t\t\treds = 0;\n\t\t\tblacks = 0;\n\t\t\tmore = \"\";\n\t\t\tfor(int i = 0; i < tile1.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallCards.add(tile1[i]);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 22, tile1. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < tile2.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallCards.add(tile2[i]);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 22, tile2. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < tile3.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallCards.add(tile3[i]);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 22, tile3. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < allCards.size(); i++) {\n\t\t\t\ttry {\n\t\t\t\t\tif((((Tile)allCards.get(i)).getColor().equals(\"red\"))){\n\t\t\t\t\t\treds++;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 22, getColor=red. \");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tif((((Tile)allCards.get(i)).getColor().equals(\"black\"))){\n\t\t\t\t\t\tblacks++;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 22, getColor=black. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(reds < blacks) {\n\t\t\t\tmore = \"More Black Numbers\";\n\t\t\t}\n\t\t\telse if(reds > blacks) {\n\t\t\t\tmore = \"More Red Numbers\";\n\t\t\t}\n\t\t\telse if(reds == blacks) {\n\t\t\t\tmore = \"About the same\";\n\t\t\t}\n\t\t\tanswer = \"\" + more;\n\t\t\tbreak;\n\t\t\t\n\t\tcase 23:\n\t\t\tfor(int i = 0; i < tile1.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallCards.add(tile1[i]);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 23, tile1. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < tile2.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallCards.add(tile2[i]);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 23, tile2. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < tile3.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tallCards.add(tile3[i]);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 23, tile3. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < allCards.size(); i++) {\n\t\t\t\ttry {\n\t\t\t\t\tif((((Tile)allCards.get(i)).getColor().equals(\"green\"))){\n\t\t\t\t\t\tgreens++;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 23, getColor=green. \");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tif((((Tile)allCards.get(i)).getColor().equals(\"yellow\"))){\n\t\t\t\t\t\tyellows++;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.d(\"Code777\", \"ERROR - Player.java Case 23, getColor=yellow. \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(greens < yellows) {\n\t\t\t\tmore = \"More Yellow Numbers\";\n\t\t\t}\n\t\t\telse if(greens > yellows) {\n\t\t\t\tmore = \"More Green Numbers\";\n\t\t\t}\n\t\t\telse if(greens == yellows) {\n\t\t\t\tmore = \"About the same\";\n\t\t\t}\n\t\t\tanswer = \"\" + more;\n\t\t\tbreak;\n\t\t\t\n\t\t}\n\t\treturn answer;\n\t}", "public void q2Submit(View view) {\n\n RadioButton radioButton = (RadioButton) findViewById(R.id.q2option3);\n\n //Nested if statements to check if the answer is correct or not, then to assign 2 points if it's correct.\n if (radioButton.isChecked()) {\n if (isNotAnsweredQ2) {\n display(pointCounter += 2);\n Toast.makeText(this, getString(R.string.correct2), Toast.LENGTH_SHORT).show();\n isNotAnsweredQ2 = false;\n }\n } else {\n Toast.makeText(this, getString(R.string.thinkAgain), Toast.LENGTH_SHORT).show();\n }\n }", "@Test\r\n public void testTotalNumberOfQuestion() {\r\n Application.loadQuestions();\r\n assertEquals(Application.allQuestions.size(), 2126);\r\n }", "private double gradeQuiz() {\n int numCorrect = getNumberCorrect();\n double percentage = (numCorrect / numQuestions) * 100;\n return percentage;\n }", "public String checkNewQuestions() {\n\t\tint numAnswers = testGenerator.getNumAnswers(questionNo);\n\t\tString question = \"\";\n\n\t\tquestion += testGenerator.getQuestionText(questionNo);\n\t\tquestion += testGenerator.getAnswerText(questionNo, 1);\n\t\tquestion += testGenerator.getAnswerText(questionNo, 2);\n\n\t\tif(numAnswers >= 3) {\n\t\t\tquestion += testGenerator.getAnswerText(questionNo, 3);\n\t\t} \n\t\tif(numAnswers == 4) {\n\t\t\tquestion += testGenerator.getAnswerText(questionNo, 4);\n\t\t}\n\t\treturn question;\n\t}", "public void show(View view)\n {\n DatabaseReference database1 = FirebaseDatabase.getInstance().getReference();\n database1.addListenerForSingleValueEvent(new ValueEventListener()\n {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot)\n {\n int i = 0;\n int countAnswer = 0;\n float statistic = 0;\n\n if (countPeople != 0)\n {\n for (DataSnapshot child : dataSnapshot.child(\"Statistic\").getChildren())\n {\n question = child.getKey();\n statistic stat = new statistic(question);\n\n answer = questArr.get(i).getAns1();\n countAnswer = Integer.parseInt((String) child.child(answer).getValue());\n statistic = (float) (countAnswer * 100) / (float) countPeople;\n stat.answers.put(answer, statistic);\n\n answer = questArr.get(i).getAns2();\n countAnswer = Integer.parseInt((String) child.child(answer).getValue());\n statistic = (float) (countAnswer * 100) / (float) countPeople;\n stat.answers.put(answer, statistic);\n\n answer = questArr.get(i).getAns3();\n countAnswer = Integer.parseInt((String) child.child(answer).getValue());\n statistic = (float) (countAnswer * 100) / (float) countPeople;\n stat.answers.put(answer, statistic);\n\n allStatistics.add(stat);\n i++;\n }\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError)\n {\n }\n });\n show = 1;\n nextStat.setVisibility(View.VISIBLE);\n showStat.setVisibility(View.GONE);\n }", "public void showQuestion()\n\t{\n\t\tSystem.out.println(ans);\n\t\tfor(int k = 0; k<numAns; k++)\n\t\t{\n\t\t\tSystem.out.println(k+\". \"+answers[k]);\n\t\t}\n\t}", "public void q7Submit(View view) {\n\n RadioButton radioButton = (RadioButton) findViewById(R.id.q7option4);\n\n //Nested if statements to check if the answer is correct or not, then to assign 2 points if it's correct.\n if (radioButton.isChecked()) {\n if (isNotAnsweredQ7) {\n display(pointCounter += 2);\n Toast.makeText(this, getString(R.string.correct1), Toast.LENGTH_SHORT).show();\n isNotAnsweredQ7 = false;\n }\n } else {\n Toast.makeText(this, getString(R.string.thinkAgain), Toast.LENGTH_SHORT).show();\n }\n }", "@Test\n void studentMCQTotalAnsweredWronglyTest(){\n Student student = new Student(\"Lim\");\n\n int expectedResult = 2; // Input for testing\n student.setNumWrongAns(expectedResult); // Set Total Number Question(s) Answered Wrongly\n System.out.println(\"Test Case #4\");\n System.out.println(\"\\tExpected Result: \" + expectedResult); // print expected result\n int actualResult = student.getNumWrongAns(); // Actual Result\n System.out.println(\"\\tActual Result: \" + actualResult); // Print actual result\n assertEquals(expectedResult, actualResult); // Compare the expected result (True) & Actual Result\n }", "public String quizResponse(Boolean isCorrect, String answer) {\n if (isCorrect) {\n return (\"Yes!! The correct answer is \\\"\" + answer + \"\\\".\\n\");\n } else {\n return (\"Sorry, The answer is \\\"\" + answer + \"\\\".\\n\");\n }\n }", "public void correctAnswer(){\n AlertDialog.Builder dialogBoxAns = new AlertDialog.Builder(this);\n //set title to dialog box\n dialogBoxAns.setTitle(\"Results\");\n //set correct message to dialog box\n dialogBoxAns.setMessage((Html.fromHtml(\"<font color='#39FF14'> CORRECT! </font> \")));\n //set button to dialog box\n dialogBoxAns.setPositiveButton(\"OK\", null);\n //create new dialog box\n AlertDialog dialog = dialogBoxAns.create();\n dialog.show();\n }", "public void verifyAnswer() {\n\t\tint i=0;\n\t\tSystem.out.println(\"in verify answer function\");\n\t\tSystem.out.println(\"Number of Answers: \"+ansCount);\n\t\tSystem.out.println(\"User ans: \"+userEquation);\n\t\tif (ansCount==0)\n\t\t\tlb2.setText(\"There is no solution for this set\");\n\t\telse{\n\t\t\tint c=0;\n\t\t\t\n\t\t\twhile(c<ansCount) {\n\t\t\t\tif (solutions[i].equals(userEquation)) {\n\t\t\t\t\tSystem.out.println(\"Ans was Correct\");\n\t\t\t\t\tfinal long duration = System.nanoTime() - startTime;\n\t\t\t\t\tseconds = TimeUnit.NANOSECONDS.toSeconds(duration);\n\t\t\t\t\tlb2.setText(\"Congradulations! You took \"+seconds+\" seconds to find an answer.\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t\tc++;\n\t\t\t\tSystem.out.println(\"C: \"+c);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"Ans was not Correct\");\n\t}\n\t}", "public void q5Submit(View view) {\n\n RadioButton radioButton = (RadioButton) findViewById(R.id.q5option3);\n\n //Nested if statements to check if the answer is correct or not, then to assign 2 points if it's correct.\n if (radioButton.isChecked()) {\n if (isNotAnsweredQ5) {\n display(pointCounter += 2);\n Toast.makeText(this, getString(R.string.correct2), Toast.LENGTH_SHORT).show();\n isNotAnsweredQ5 = false;\n }\n } else {\n Toast.makeText(this, getString(R.string.thinkAgain), Toast.LENGTH_SHORT).show();\n }\n }", "public void showResult(boolean isCorrect, String answer){\n if(isCorrect){\n mResultText.setText(\"CORRECT!\");\n mResultText.setTextColor(getResources().getColor(android.R.color.holo_green_light));\n } else {\n mResultText.setText(\"WRONG!\");\n mResultText.setTextColor(getResources().getColor(android.R.color.holo_red_light));\n mCorrectAnswerText.setText(\"Correct answer is \"+ answer);\n }\n }", "public void q4Submit(View view) {\n\n CheckBox checkBox1 = (CheckBox) findViewById(R.id.q4option1cb);\n CheckBox checkBox2 = (CheckBox) findViewById(R.id.q4option2cb);\n CheckBox checkBox3 = (CheckBox) findViewById(R.id.q4option3cb);\n CheckBox checkBox4 = (CheckBox) findViewById(R.id.q4option4cb);\n\n //Nested if statements to check if the answer is correct or not, then to assign 2 points if it's correct.\n if (checkBox1.isChecked() && checkBox2.isChecked() && checkBox3.isChecked() && !checkBox4.isChecked()) {\n if (isNotAnsweredQ4) {\n display(pointCounter += 2);\n Toast.makeText(this, getString(R.string.correct1), Toast.LENGTH_SHORT).show();\n isNotAnsweredQ4 = false;\n }\n } else {\n Toast.makeText(this, getString(R.string.thinkAgain), Toast.LENGTH_SHORT).show();\n }\n }", "public void displayCorrect(){\n textPane1.setText(\"\");\r\n generatePlayerName();\r\n textPane1.setText(\"GOOD JOB! That was the correct answer.\\n\"\r\n + atBatPlayer + \" got a hit!\\n\" +\r\n \"Press Next Question, or hit ENTER, to continue.\");\r\n SWINGButton.setText(\"Next Question\");\r\n formattedTextField1.setText(\"\");\r\n formattedTextField1.setText(\"Score: \" + score);\r\n }", "private void updateQuestion() {\r\n\r\n //The code below resets the option\r\n mOption1.setVisibility(View.VISIBLE);\r\n mOption2.setVisibility(View.VISIBLE);\r\n mOption3.setVisibility(View.VISIBLE);\r\n mNext.setVisibility(View.INVISIBLE);\r\n\r\n int questionSize = 12;\r\n\r\n if (mQuestionNumber < questionSize) {\r\n\r\n mQuestionView.setText((questionsDB.getQuestion(mQuestionNumber)));\r\n mOption1.setText(questionsDB.getChoice1(mQuestionNumber));\r\n mOption2.setText(questionsDB.getChoice2(mQuestionNumber));\r\n mOption3.setText(questionsDB.getChoice3(mQuestionNumber));\r\n\r\n mAnswer = questionsDB.getCorrectAnswer(mQuestionNumber);\r\n mQuestionNumber++;\r\n timeLeftInMillis = COUNTDOWN_IN_MILLIS;\r\n startCountDown();\r\n\r\n\r\n } else {\r\n displayScore();\r\n }\r\n\r\n }", "private void printSelectionCountResults(){\n\t\tSystem.out.print(\"\\n\");\n\t\tfor(Character answer: q.getPossibleAnswers()){\n\t\t\tSystem.out.print(answer+\": \"+selections.get(q.getPossibleAnswers().indexOf(answer))+\"\\n\");\n\t\t}\n\t}", "public void checkAllAnswers(View view) {\n finalScore = 0;\n\n boolean answerQuestion1 = false;\n boolean check1Quest1 = checkSingleCheckBox(R.id.jupiter_checkbox_view);\n boolean check2Quest1 = checkSingleCheckBox(R.id.mars_checkbox_view);\n boolean check3Quest1 = checkSingleCheckBox(R.id.earth_checkbox_view);\n boolean check4Quest1 = checkSingleCheckBox(R.id.venus_checkbox_view);\n\n if (!check1Quest1 && !check2Quest1 && !check3Quest1 && check4Quest1) {\n finalScore = scoreCounter(finalScore);\n answerQuestion1 = true;\n }\n\n boolean answerQuestion2 = false;\n boolean check1Quest2 = checkSingleCheckBox(R.id.nasa_checkbox_view);\n boolean check2Quest2 = checkSingleCheckBox(R.id.spacex_checkbox_view);\n boolean check3Quest2 = checkSingleCheckBox(R.id.nvidia_checkbox_view);\n boolean check4Quest2 = checkSingleCheckBox(R.id.astrotech_checkbox_view);\n\n if (check1Quest2 && check2Quest2 && !check3Quest2 && check4Quest2) {\n finalScore = scoreCounter(finalScore);\n answerQuestion2 = true;\n }\n\n boolean answerQuestion3 = false;\n boolean check1Quest3 = checkSingleCheckBox(R.id.moon_checkbox_view);\n boolean check2Quest3 = checkSingleCheckBox(R.id.sun_checkbox_view);\n boolean check3Quest3 = checkSingleCheckBox(R.id.comet_checkbox_view);\n boolean check4Quest3 = checkSingleCheckBox(R.id.asteroid_checkbox_view);\n\n if (check1Quest3 && !check2Quest3 && !check3Quest3 && !check4Quest3) {\n finalScore = scoreCounter(finalScore);\n answerQuestion3 = true;\n }\n\n boolean answerQuestion4 = false;\n boolean check1Quest4 = checkSingleCheckBox(R.id.yes_checkbox_view);\n boolean check2Quest4 = checkSingleCheckBox(R.id.no_checkbox_view);\n\n if (check1Quest4 && !check2Quest4) {\n finalScore = scoreCounter(finalScore);\n answerQuestion4 = true;\n }\n\n String question1Summary = createQuestionSummary(answerQuestion1, 1, getResources().getString(R.string.venus));\n String question2Summary = createQuestionSummary(answerQuestion2, 2, getResources().getString(R.string.nasa_spacex_astrotech));\n String question3Summary = createQuestionSummary(answerQuestion3, 3, getResources().getString(R.string.moon));\n String question4Summary = createQuestionSummary(answerQuestion4, 4, getResources().getString(R.string.yes));\n\n String quizSummary = createQuizSummary(finalScore);\n\n displayQuestionSummary(question1Summary, answerQuestion1, R.id.question1_summary);\n displayQuestionSummary(question2Summary, answerQuestion2, R.id.question2_summary);\n displayQuestionSummary(question3Summary, answerQuestion3, R.id.question3_summary);\n displayQuestionSummary(question4Summary, answerQuestion4, R.id.question4_summary);\n displayQuizSummary(quizSummary);\n\n }", "@Override\n\tpublic String getHTMLwithQuestionResult(int questionNum, ArrayList<String> userAnsList,\n\t\t\tint curScore) {\n\t\tString userAns = userAnsList.get(0);\n\t\tString html_question = getHTML(questionNum);\n\t\tString html_user_answer = \"<b>Your answer:</b> \" + userAns + \"</br><br>\";\n\t\tString html_correct_answer = \"<b>Correct answer:</b> \" + answer + \"</br><br>\";\n\t\tString html_correct = \"\";\n\t\tif (score == curScore) {\n\t\t\thtml_correct += \"<b>You are correct!</b>\" + \"</br><br>\";\n\t\t} else {\n\t\t\thtml_correct += \"<b>You are wrong!</b>\" + \"</br><br>\";\n\t\t}\n\t\t\n\t\treturn html_question + html_user_answer + html_correct_answer + html_correct;\n\t}" ]
[ "0.73974186", "0.7071401", "0.69197387", "0.6768463", "0.67553216", "0.67515224", "0.6736245", "0.6709094", "0.6700548", "0.66505134", "0.6515911", "0.64246404", "0.64171606", "0.6408727", "0.6389216", "0.63706595", "0.63636136", "0.63455874", "0.6330908", "0.6318715", "0.629892", "0.6293079", "0.62720364", "0.62636435", "0.62507665", "0.62456554", "0.62447125", "0.6238813", "0.6230398", "0.6224735", "0.6203902", "0.6203496", "0.61947644", "0.6192801", "0.619265", "0.6164119", "0.6151355", "0.614924", "0.6147429", "0.61463416", "0.61367667", "0.61339813", "0.61127955", "0.6097277", "0.6096613", "0.6085521", "0.6080643", "0.607202", "0.60597193", "0.6051341", "0.60412514", "0.60240334", "0.60189617", "0.60153764", "0.6006521", "0.6004431", "0.6001901", "0.5989904", "0.5989384", "0.59810567", "0.5972323", "0.59722465", "0.5966073", "0.59630704", "0.59523046", "0.59404415", "0.59397244", "0.5937468", "0.59301645", "0.59287745", "0.59261584", "0.5923122", "0.59191847", "0.5912348", "0.5911645", "0.5911213", "0.5910989", "0.59052014", "0.5901372", "0.5901202", "0.59010524", "0.5897082", "0.5895317", "0.589165", "0.5889848", "0.5889762", "0.5872864", "0.5870034", "0.5861568", "0.585407", "0.58490527", "0.5840512", "0.58372515", "0.58363885", "0.5834404", "0.58342314", "0.5820798", "0.5801161", "0.57979006", "0.579481", "0.5788309" ]
0.0
-1
Initializes the controller class.
@Override public void initialize(URL url, ResourceBundle rb) { // TODO carregarTela("FXML_AdminHome.fxml"); btnHome.setStyle("-fx-background-color: #1d2a45; -fx-text-fill: #ce9e6d;"); btnReservas.setStyle("-fx-background-color: transparent; -fx-text-fill: #576271;"); btnQuartos.setStyle("-fx-background-color: transparent; -fx-text-fill: #576271;"); btnFuncionarios.setStyle("-fx-background-color: transparent; -fx-text-fill: #576271;"); btnIndicacoes.setStyle("-fx-background-color: transparent; -fx-text-fill: #576271;"); btnCentroAjuda.setStyle("-fx-background-color: transparent; -fx-text-fill: #576271;"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initialize() {\n\t\tcontroller = Controller.getInstance();\n\t}", "public MainController() {\n\t\tcontroller = new Controller(this);\n\t}", "public abstract void initController();", "public Controller() {\n super();\n }", "public Controller() {\n super();\n }", "public Controller()\n\t{\n\n\t}", "private static CompanyController initializeController() {\n\n controller = new CompanyController();\n return controller;\n }", "public MainController() {\n initializeControllers();\n initializeGui();\n runGameLoop();\n }", "public Controller() {\n this.model = new ModelFacade();\n this.view = new ViewFacade();\n }", "public Controller()\r\n\t{\r\n\t\tview = new View();\r\n\t}", "public Controller() {\n\t\tthis(null);\n\t}", "public void init(){\n\t\t//Makes the view\n\t\tsetUpView();\n\n\t\t//Make the controller. Links the action listeners to the view\n\t\tnew Controller(this);\n\t\t\n\t\t//Initilize the array list\n\t\tgameInput = new ArrayList<Integer>();\n\t\tuserInput = new ArrayList<Integer>();\n\t\thighScore = new HighScoreArrayList();\n\t}", "private void initialize() {\n\t\tinitializeModel();\n\t\tinitializeBoundary();\n\t\tinitializeController();\n\t}", "public void init() {\n\t\tkontrolleri1 = new KolikkoController(this);\n\t}", "protected void initialize() {\n super.initialize(); // Enables \"drive straight\" controller\n }", "public Controller() {\n model = new Model();\n comboBox = new ChannelComboBox();\n initView();\n new ChannelWorker().execute();\n timer = new Timer();\n }", "protected CityController() {\r\n\t}", "public void initialize() {\n warpController = new WarpController(this);\n kitController = new KitController(this);\n crafting = new CraftingController(this);\n mobs = new MobController(this);\n items = new ItemController(this);\n enchanting = new EnchantingController(this);\n anvil = new AnvilController(this);\n blockController = new BlockController(this);\n hangingController = new HangingController(this);\n entityController = new EntityController(this);\n playerController = new PlayerController(this);\n inventoryController = new InventoryController(this);\n explosionController = new ExplosionController(this);\n requirementsController = new RequirementsController(this);\n worldController = new WorldController(this);\n arenaController = new ArenaController(this);\n arenaController.start();\n if (CompatibilityLib.hasStatistics() && !CompatibilityLib.hasJumpEvent()) {\n jumpController = new JumpController(this);\n }\n File examplesFolder = new File(getPlugin().getDataFolder(), \"examples\");\n examplesFolder.mkdirs();\n\n File urlMapFile = getDataFile(URL_MAPS_FILE);\n File imageCache = new File(dataFolder, \"imagemapcache\");\n imageCache.mkdirs();\n maps = new MapController(this, urlMapFile, imageCache);\n\n // Initialize EffectLib.\n if (com.elmakers.mine.bukkit.effect.EffectPlayer.initialize(plugin, getLogger())) {\n getLogger().info(\"EffectLib initialized\");\n } else {\n getLogger().warning(\"Failed to initialize EffectLib\");\n }\n\n // Pre-create schematic folder\n File magicSchematicFolder = new File(plugin.getDataFolder(), \"schematics\");\n magicSchematicFolder.mkdirs();\n\n // One-time migration of legacy configurations\n migrateConfig(\"enchanting\", \"paths\");\n migrateConfig(\"automata\", \"blocks\");\n migrateDataFile(\"automata\", \"blocks\");\n\n // Ready to load\n load();\n resourcePacks.startResourcePackChecks();\n }", "public ClientController() {\n }", "public Controller() {\n\t\tthis.nextID = 0;\n\t\tthis.data = new HashMap<Integer, T>();\n\t}", "public ListaSEController() {\n }", "boolean InitController();", "public MenuController() {\r\n\t \r\n\t }", "@Override\n\tprotected void initController() throws Exception {\n\t\tmgr = orderPickListManager;\n\t}", "public CustomerController() {\n\t\tsuper();\n\n\t}", "public End_User_0_Controller() {\r\n\t\t// primaryStage = Users_Page_Controller.primaryStage;\r\n\t\t// this.Storeinfo = primaryStage.getTitle();\r\n\t}", "public Controller(){\r\n\t\tthis.fabricaJogos = new JogoFactory();\r\n\t\tthis.loja = new Loja();\r\n\t\tthis.preco = 0;\r\n\t\tthis.desconto = 0;\r\n\t}", "private Controller() {\n\t\tthis.gui = GUI.getInstance();\n\t\tthis.gui.setController(this);\n\t}", "public GameController() {\r\n\t\tsuper();\r\n\t\tthis.model = Main.getModel();\r\n\t\tthis.player = this.model.getPlayer();\r\n\t\tthis.timeline = this.model.getIndefiniteTimeline();\r\n\t}", "public PlantillaController() {\n }", "public Controller() {\n\t\tplaylist = new ArrayList<>();\n\t\tshowingMore = false;\n\t\tstage = Main.getStage();\n\t}", "public IfController()\n\t{\n\n\t}", "public TournamentController()\n\t{\n\t\tinitMap();\n\t}", "public GeneralListVueController() {\n\n\t}", "private ClientController() {\n }", "public Controller()\n\t{\n\t\ttheParser = new Parser();\n\t\tstarList = theParser.getStars();\n\t\tmessierList = theParser.getMessierObjects();\n\t\tmoon = new Moon(\"moon\");\n\t\tsun = new Sun(\"sun\");\n\t\tconstellationList = theParser.getConstellations();\n\t\tplanetList = new ArrayList<Planet>();\n\t\ttheCalculator = new Calculator();\n\t\tepoch2000JD = 2451545.0;\n\t}", "private void initialiseController() \r\n {\r\n defaultVectors();\r\n if(grantsByPIForm == null) \r\n {\r\n grantsByPIForm = new GrantsByPIForm(); //(Component) parent,modal);\r\n }\r\n grantsByPIForm.descriptionLabel.setText(UnitName);\r\n grantsByPIForm.descriptionLabel.setFont(new Font(\"SansSerif\",Font.BOLD,14));\r\n queryEngine = QueryEngine.getInstance();\r\n coeusMessageResources = CoeusMessageResources.getInstance();\r\n registerComponents();\r\n try {\r\n setFormData(null);\r\n }\r\n catch(Exception e) {\r\n e.printStackTrace(System.out);\r\n }\r\n }", "public LogMessageController() {\n\t}", "public LoginPageController() {\n\t}", "public ControllerEnfermaria() {\n }", "public ProvisioningEngineerController() {\n super();\n }", "private StoreController(){}", "public GenericController() {\n }", "@Override\n\tpublic void initialize() {\n\t\tinitializeModel(getSeed());\n\t\tinitializeView();\n\t\tinitializeControllers();\n\t\t\n\t\tupdateScore(8);\n\t\tupdateNumberCardsLeft(86);\n\n\t}", "public Controller() {\n\t\tenabled = false;\n\t\tloop = new Notifier(new ControllerTask(this));\n\t\tloop.startPeriodic(DEFAULT_PERIOD);\n\t}", "public MapController() {\r\n\t}", "@Override\r\n\tpublic void initControllerBean() throws Exception {\n\t}", "private void setupController() {\n setupWriter();\n Controller controller1 = new Controller(writer);\n controller = controller1;\n }", "public WfController()\n {\n }", "public Controller() {\n\n lastSearches = new SearchHistory();\n\n }", "private ClientController(){\n\n }", "public LoginController() {\r\n }", "public PersonasController() {\r\n }", "private void initBefore() {\n // Crear Modelo\n model = new Model();\n\n // Crear Controlador\n control = new Controller(model, this);\n\n // Cargar Propiedades Vista\n prpView = UtilesApp.cargarPropiedades(FICHERO);\n\n // Restaurar Estado\n control.restaurarEstadoVista(this, prpView);\n\n // Otras inicializaciones\n }", "public StoreController() {\n }", "public ConsoleController() {\n\t\tcommandDispatch = new CommandDispatch();\n\t}", "public LoginController() {\r\n\r\n }", "public final void init(final MainController mainController) {\n this.mainController = mainController;\n }", "public SMPFXController() {\n\n }", "public Controller()\r\n {\r\n fillBombs();\r\n fillBoard();\r\n scoreBoard = new ScoreBoard();\r\n }", "public GUIController() {\n\n }", "public void init(){\n this.controller = new StudentController();\n SetSection.displayLevelList(grade_comp);\n new DesignSection().designForm(this, editStudentMainPanel, \"mini\");\n }", "public void init(final Controller controller){\n Gdx.app.debug(\"View\", \"Initializing\");\n \n this.controller = controller;\n \n //clear old stuff\n cameras.clear();\n \n //set up renderer\n hudCamera = new OrthographicCamera();\n hudCamera.setToOrtho(false, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());\n \n batch = new SpriteBatch();\n igShRenderer = new ShapeRenderer();\n shapeRenderer = new ShapeRenderer();\n \n //set up stage\n stage = new Stage();\n \n //laod cursor\n cursor = new Pixmap(Gdx.files.internal(\"com/BombingGames/WurfelEngine/Core/images/cursor.png\"));\n\n controller.getLoadMenu().viewInit(this);\n \n initalized = true;\n }", "@PostConstruct\n public void init() {\n WebsocketController.getInstance().setTemplate(this.template);\n try {\n\t\t\tthis.chatController = ChatController.getInstance();\n } catch (final Exception e){\n LOG.error(e.getMessage(), e);\n }\n }", "public ControllerTest()\r\n {\r\n }", "public SearchedRecipeController() {\n }", "public FilmOverviewController() {\n }", "public CreditPayuiController() {\n\t\tuserbl = new UserController();\n\t}", "private void initComponents() {\r\n\t\temulator = new Chip8();\r\n\t\tpanel = new DisplayPanel(emulator);\r\n\t\tregisterPanel = new EmulatorInfoPanel(emulator);\r\n\t\t\r\n\t\tcontroller = new Controller(this, emulator, panel, registerPanel);\r\n\t}", "public RootLayoutController() {\n }", "public MehController() {\n updateView(null);\n }", "public Controller(int host) {\r\n\t\tsuper(host);\r\n\t}", "public WorkerController(){\r\n\t}", "public TipoInformazioniController() {\n\n\t}", "private void initializeMealsControllers() {\n trNewPetMeal = MealsControllersFactory.createTrNewPetMeal();\n trObtainAllPetMeals = MealsControllersFactory.createTrObtainAllPetMeals();\n trDeleteMeal = MealsControllersFactory.createTrDeleteMeal();\n trUpdateMeal = MealsControllersFactory.createTrUpdateMeal();\n }", "public ProductOverviewController() {\n }", "public ProduktController() {\r\n }", "public Controller(ViewIF view) {\n\t\tthis.view = view;\n\t\tthis.dao = new DAO();\n\t\tthis.stats = new Statistics(this.dao);\n\t\tthis.gameStarted = false;\n\t}", "private void initializeMedicationControllers() {\n trNewPetMedication = MedicationControllersFactory.createTrNewPetMedication();\n trObtainAllPetMedications = MedicationControllersFactory.createTrObtainAllPetMedications();\n trDeleteMedication = MedicationControllersFactory.createTrDeleteMedication();\n trUpdateMedication = MedicationControllersFactory.createTrUpdateMedication();\n }", "public PersonLoginController() {\n }", "public PremiseController() {\n\t\tSystem.out.println(\"Class PremiseController()\");\n\t}", "public TaxiInformationController() {\n }", "public LoginController() {\n\t\treadFromFile();\n\t\t// TODO Auto-generated constructor stub\n\t}", "public Controller(){\n initControl();\n this.getStylesheets().addAll(\"/resource/style.css\");\n }", "public CreateDocumentController() {\n }", "public ControllerRol() {\n }", "Main ()\n\t{\n\t\tview = new View ();\t\t\n\t\tmodel = new Model(view);\n\t\tcontroller = new Controller(model, view);\n\t}", "public Controller () {\r\n puzzle = null;\r\n words = new ArrayList <String> ();\r\n fileManager = new FileIO ();\r\n }", "public void init() {\n \n }", "public Controller() {\n\t\tdoResidu = false;\n\t\tdoTime = false;\n\t\tdoReference = false;\n\t\tdoConstraint = false;\n\t\ttimeStarting = System.nanoTime();\n\t\t\n\t\tsetPath(Files.getWorkingDirectory());\n\t\tsetSystem(true);\n\t\tsetMultithreading(true);\n\t\tsetDisplayFinal(true);\n\t\tsetFFT(FFT.getFastestFFT().getDefaultFFT());\n\t\tsetNormalizationPSF(1);\n\t\tsetEpsilon(1e-6);\n\t\tsetPadding(new Padding());\n\t\tsetApodization(new Apodization());\n\n\t\tmonitors = new Monitors();\n\t\tmonitors.add(new ConsoleMonitor());\n\t\tmonitors.add(new TableMonitor(Constants.widthGUI, 240));\n\n\t\tsetVerbose(Verbose.Log);\n\t\tsetStats(new Stats(Stats.Mode.NO));\n\t\tsetConstraint(Constraint.Mode.NO);\n\t\tsetResiduMin(-1);\n\t\tsetTimeLimit(-1);\n\t\tsetReference(null);\n\t\tsetOuts(new ArrayList<Output>());\n\t}", "public OrderInfoViewuiController() {\n\t\tuserbl = new UserController();\n\t}", "public SessionController() {\n }", "@Override\n\tprotected void setController() {\n\t\t\n\t}", "public MainFrameController() {\n }", "public LicenciaController() {\n }", "public NearestParksController() {\n this.bn = new BicycleNetwork();\n this.pf = new LocationFacade();\n // this.bn.loadData();\n }", "public MotorController() {\n\t\tresetTachometers();\n\t}", "public AwTracingController() {\n mNativeAwTracingController = nativeInit();\n }", "public Controller(IView view) {\n\t\tengine = new Engine(this);\n\t\tclock = new Clock();\n\t\tsoundEmettor = new SoundEmettor();\n\t\tthis.view = view;\n\t}", "public HomeController() {\n }", "public HomeController() {\n }" ]
[ "0.8125658", "0.78537387", "0.78320265", "0.776199", "0.776199", "0.76010174", "0.74497247", "0.7437837", "0.7430714", "0.742303", "0.74057597", "0.7341963", "0.7327749", "0.72634363", "0.72230434", "0.7102504", "0.70575505", "0.69873077", "0.69721675", "0.6944077", "0.6912564", "0.688884", "0.6881247", "0.68776786", "0.68723065", "0.6868163", "0.68672407", "0.6851157", "0.6846883", "0.6840198", "0.68382674", "0.68338853", "0.6795918", "0.67823315", "0.6766882", "0.67650586", "0.6750353", "0.6749068", "0.6745654", "0.6743223", "0.67401046", "0.6727867", "0.6723379", "0.6695514", "0.6689967", "0.66892517", "0.66791916", "0.6677345", "0.66644365", "0.6664202", "0.66616154", "0.66532296", "0.66481894", "0.6644939", "0.6639398", "0.6633576", "0.66312426", "0.662608", "0.66258574", "0.66105217", "0.6606984", "0.66024727", "0.6597095", "0.6580141", "0.65786153", "0.65752715", "0.6574144", "0.6551536", "0.655142", "0.6547574", "0.6545647", "0.6541474", "0.6529243", "0.65284246", "0.6525593", "0.6523344", "0.6519832", "0.65134746", "0.65079254", "0.6497635", "0.64952356", "0.6493943", "0.6492926", "0.6483847", "0.6483173", "0.648183", "0.6479119", "0.64789915", "0.6476928", "0.64734083", "0.6465272", "0.64616114", "0.6444024", "0.64379543", "0.6431962", "0.64292705", "0.6425357", "0.6417148", "0.6416786", "0.64161026", "0.64161026" ]
0.0
-1
TODO Autogenerated method stub public Rwalk(int sX, int xY, int mSteps, int squares)
public static void main(String[] args) { Rwalk p1 = new Rwalk( -3, 0, 10000000, 2000000); Rwalk p2 = new Rwalk( 3, 0, 10000000, 2000000); int collisions = 0; for(int i = 0; i < 10000000; i++) { collide(p1, p2); if(didCollide(p1, p2) == true) { collisions++; } } // End of For // Outputs System.out.println(""); System.out.println("Test Completed. Collision Count: " + collisions); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void move(int steps);", "public void walk(Rectangle re, IWalkThrought<T> i);", "public void walk(int direction);", "private void move(String s) {\r\n String[] commands = s.split(\"\");\r\n for(int x=0; x<commands.length; x++){\r\n switch(commands[x]) {\r\n case \"L\":\r\n turnLeft(commands[x]);\r\n break;\r\n case \"R\":\r\n turnRight(commands[x]);\r\n break;\r\n case \"M\":\r\n forward();\r\n break;\r\n default:\r\n System.out.println(\"Problem!\");\r\n }\r\n }\r\n }", "public int move_diagonally(Square[][] squares, int [] move, Boolean turn) {\n\n /* going down and right = f4 h2 [4,5,6,7] */\n if (move[2] > move[0] && move[3] > move[1]) {\n ////System.out.println(\"Down right\");\n int x = move[0];\n int y = move[1];\n x++;\n y++;\n while (x < move[2] && y < move[3]) {\n if (squares[x][y] instanceof Piece) {\n ////System.out.println(\"Piece in between \"+x + \" \" + y);\n return -1;\n }\n x++;\n y++;\n }\n }\n /* going down and left */\n else if (move[2] > move[0] && move[3] < move[1]){\n ////System.out.println(\"Down Left\");\n int x = move[0];\n int y = move[1];\n x++;\n y--;\n while (x < move[2] && y > move[3]) {\n if (squares[x][y] instanceof Piece) {\n ////System.out.println(\"Piece in between \"+x + \" \" + y);\n return -1;\n }\n x++;\n y--;\n }\n }\n /* going up and left */\n else if (move[2] < move[0] && move[3] < move[1]){\n ////System.out.println(\"Up Left\");\n int x = move[0];\n int y = move[1];\n x--;\n y--;\n while (x > move[2] && y > move[3]) {\n if (squares[x][y] instanceof Piece) {\n ////System.out.println(\"Piece in between \"+x + \" \" + y);\n return -1;\n }\n x--;\n y--;\n }\n }\n /* going up and right c1 f4 [7,2,4,5] */\n else if (move[2] < move[0] && move[3] > move[1]){\n ////System.out.println(\"Up right\");\n int x = move[0];\n int y = move[1];\n x--;\n y++;\n while (x > move[2] && y < move[3]) {\n if (squares[x][y] instanceof Piece) {\n ////System.out.println(\"Piece in between \"+x + \" \" + y);\n return -1;\n }\n x--;\n y++;\n }\n }\n return 0;\n }", "public void findTour( int x, int y, int moves )\n {\n delay(50); //slow it down enough to be followable\n if (solved) System.exit(0);\n\n //primary base case: tour completed\n if (moves == (sideLength * sideLength)) {\n solved = true;\n }\n //other base case: stepped off board or onto visited cell\n if ( board[x][y] != 0 ) {\n return;\n }\n //otherwise, mark current location\n //and recursively generate tour possibilities from current pos\n else {\n board[x][y] = moves;\n System.out.println(this);\n delay(10); //uncomment to slow down enough to view\n\n /*======================================\n Recursively try to solve (find tour) from\n each of knight's available moves.\n . e . d .\n f . . . c\n . . @ . .\n g . . . b\n . h . a .\n ======================================*/\n // right and down\n findTour(x + 1, y + 2, moves + 1);\n // left and down\n findTour(x - 1, y + 2, moves + 1);\n // down and right\n findTour(x + 2, y + 1, moves + 1);\n // up and left\n findTour(x - 2, y - 1, moves + 1);\n // right and up\n findTour(x + 1, y - 2, moves + 1);\n // left and up\n findTour(x - 1, y - 2, moves + 1);\n // up and right\n findTour(x + 2, y - 1, moves + 1);\n // down and left\n findTour(x - 2, y + 1, moves + 1);\n\n //If made it this far, path did not lead to tour, so back up.\n board[x][y] = 0;\n System.out.println(this);\n }\n }", "private void spiral() {\n\t\t// If in top right, increase size and go down right.\n\t\tif(xtraversed == size && ytraversed == size){\n\t\t\tsize++;\n\t\t\tmemory.nextMove = GameConstants.SOUTHEAST;\n\t\t\tytraversed--;\n\t\t\txtraversed++;\n\t\t}\n\t\t\n\t\t// If in top, go right.\n\t\telse if(ytraversed == size){\n\t\t\tmemory.nextMove = GameConstants.EAST;\n\t\t\txtraversed++;\n\t\t}\n\t\t\n\t\t// If in left, go up.\n\t\telse if(xtraversed == -size){\n\t\t\tmemory.nextMove = GameConstants.NORTH;\n\t\t\tytraversed++;\n\t\t}\n\t\t\n\t\t// If in bottom, go left.\n\t\telse if(ytraversed == -size){\n\t\t\tmemory.nextMove = GameConstants.WEST;\n\t\t\txtraversed--;\n\t\t}\n\t\t\n\t\t// If in right, go down.\n\t\telse if(xtraversed == size){\n\t\t\tmemory.nextMove = GameConstants.SOUTH;\n\t\t\tytraversed--;\n\t\t}\n\t\t\n\t\t// Else go right.\n\t\telse {\n\t\t\tmemory.nextMove = GameConstants.EAST;\n\t\t\txtraversed++;\n\t\t}\n\t}", "public void walkDownWall() {\r\n\t\tthis.move();\r\n\t\tthis.turnRight();\r\n\t\tthis.move();\r\n\t\tthis.move();\r\n\t\tthis.move();\r\n\t\tthis.turnLeft();\r\n\t}", "protected void takeStep(Path.Step s, Main m) {\n if (map.hasObstacle(s.getX(), s.getY())) {\n // place bomb, move to safety\n player.placeBomb(map);\n }\n else { // move regularly\n if (!m.theMap.hasFire(s.getX(), s.getY())) {\n player.move(s.getX() - this.player.getX(), s.getY() - this.player.getY(), m);\n }\n }\n }", "public void moveRight() {\r\n\t\r\n\t\tint rightSteps=10;\r\n\t\t\ttopX+= rightSteps;\r\n\t}", "@Override\n\tprotected boolean moveRobot(boolean printEachStep) {\n\t\tboolean move=true;\n\t\tint incOrDecR = destRow > curRow ? 1 : -1, \n\t\t\tincOrDecC = destCol > curCol ? 1 : -1, \n\t\t\tcount = diagonalCount();\n\t\t\t// Move diagonally as close to the destination it can get to\n\t\t\tfor(int i=0; i<count; ++i) {\n\t\t\t\tif(move=grid.moveFromTo(this, curRow, curCol, \n\t\t\t\t\t\tblockedRow=curRow+incOrDecR, \n\t\t\t\t\t\tblockedCol=curCol+incOrDecC)) { \n\t\t\t\t\tcurRow+=incOrDecR; \n\t\t\t\t\tcurCol+=incOrDecC;\n\t\t\t\t\t--energyUnits;\n\t\t\t\t\tif(printEachStep)\n\t\t\t\t\t\tgrid.printGrid();\n\t\t\t\t} else {\n\t\t\t\t\treturn move; \n\t\t\t\t}\n\t\t\t}\n\t\tmove=super.moveRobot(printEachStep);\n\t\treturn move;\n\t}", "public void moveRight()\n\t{\n\t\tx = x + STEP_SIZE;\n\t}", "public void moveRight() {\n\t\tsetPosX(getPosX() + steps);\n\t}", "private void drunkenWalk(int x, int y) {\n\t\tRoom r = rooms[y][x];\n\t\tr.visited = true;\n\t\tUtil.shuffleArray(r.doors);\n\t\tfor(int i = 0; i < r.doors.length; i++) {\n\t\t\tDoor d = r.doors[i];\n\t\t\tboolean outOfBounds = false;\n\t\t\tRoom neighbor;\n\t\t\tDirection oppositeDir;\n\t\t\tint neighborX = x;\n\t\t\tint neighborY = y;\n\t\t\tswitch(d.dir) {\n\t\t\tcase LEFT:\n\t\t\t\toppositeDir = Direction.RIGHT;\n\t\t\t\tneighborX--;\n\t\t\t\tif (neighborX < 0) {\n\t\t\t\t\toutOfBounds = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase RIGHT:\n\t\t\t\toppositeDir = Direction.LEFT;\n\t\t\t\tneighborX++;\n\t\t\t\tif (neighborX >= cols) {\n\t\t\t\t\toutOfBounds = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase UP:\n\t\t\t\toppositeDir = Direction.DOWN;\n\t\t\t\tneighborY--;\n\t\t\t\tif (neighborY < 0) {\n\t\t\t\t\toutOfBounds = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase DOWN:\n\t\t\t\toppositeDir = Direction.UP;\n\t\t\t\tneighborY++;\n\t\t\t\tif (neighborY >= rows) {\n\t\t\t\t\toutOfBounds = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\toppositeDir = Direction.UP;\n\t\t\t\toutOfBounds = true;\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t\t\n\t\t\tif (outOfBounds) {\n\t\t\t\td.isWall = true;\n\t\t\t} else {\n\t\t\t\tneighbor = rooms[neighborY][neighborX];\n\t\t\t\tif (!neighbor.visited) {\n\t\t\t\t\td.isWall = false;\n\t\t\t\t\tdrunkenWalk(neighborX, neighborY);\n\t\t\t\t} else {\n\t\t\t\t\td.isWall = connectionType(oppositeDir, neighbor);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void move()\n {\n move(WALKING_SPEED);\n }", "public void move(Square s)\n {\n this.position.removePlayer(this);\n s.addPlayer(this);\n game.notifyMove(this);\n }", "public void move(int moveDirection) {\n //if same or opposite direction, check if movable\n if ((direction - moveDirection) % 6 == 0) {\n this.direction = moveDirection;\n if (moveable()) {\n if (direction == 12) {\n this.setLocation(new Point(this.getX(),\n this.getY() - speed));\n }\n //move right\n if (direction == 3) {\n this.setLocation(new Point(this.getX() + speed,\n this.getY()));\n\n }\n //move down\n if (direction == 6) {\n this.setLocation(new Point(this.getX(),\n this.getY() + speed));\n }\n //move left\n if (direction == 9) {\n this.setLocation(new Point(this.getX() - speed,\n this.getY()));\n }\n\n }\n } // if it is turning, check if can turn or not. If can turn then turn and move according to the direction before turn, otherwise, just leave the monster there\n else {\n Point snapToGridPoint = GameUtility.GameUtility.snapToGrid(\n this.getLocation());\n Point gridPoint = GameUtility.GameUtility.toGridCordinate(\n this.getLocation());\n Point nextPoint = new Point(gridPoint.x, gridPoint.y);\n //if the distance is acceptable\n if (GameUtility.GameUtility.distance(snapToGridPoint,\n this.getLocation()) < GameUtility.GameUtility.TILE_SIZE / 2.5) {\n\n if (moveDirection == 3) {\n int x = Math.max(0, gridPoint.x + 1);\n nextPoint = new Point(x, gridPoint.y);\n } else if (moveDirection == 6) {\n int y = Math.max(0, gridPoint.y + 1);\n nextPoint = new Point(gridPoint.x, y);\n } else if (moveDirection == 9) {\n int x = Math.min(19, gridPoint.x - 1);\n nextPoint = new Point(x, gridPoint.y);\n } else if (moveDirection == 12) {\n int y = Math.min(19, gridPoint.y - 1);\n nextPoint = new Point(gridPoint.x, y);\n }\n // if the turn is empty, then snap the monster to the grid location\n if (!(GameManager.getGameMap().getFromMap(nextPoint) instanceof Wall) && !(GameManager.getGameMap().getFromMap(\n nextPoint) instanceof Bomb)) {\n if (GameUtility.GameUtility.distance(snapToGridPoint,\n this.getLocation()) < GameUtility.GameUtility.TILE_SIZE / 10) {\n this.setLocation(snapToGridPoint);\n this.direction = moveDirection;\n } else {\n if (direction == 9 || direction == 3) {\n int directionOfMovement = (snapToGridPoint.x - getX());\n directionOfMovement = directionOfMovement / Math.abs(\n directionOfMovement);\n this.setLocation(new Point(\n this.getX() + directionOfMovement * speed,\n this.getY()));\n } else if (direction == 12 || direction == 6) {\n int directionOfMovement = (snapToGridPoint.y - getY());\n directionOfMovement = directionOfMovement / Math.abs(\n directionOfMovement);\n this.setLocation(new Point(\n this.getX(),\n this.getY() + directionOfMovement * speed));\n }\n }\n }\n }\n }\n }", "public void moveShiftRight();", "public void openRec(int x, int y) {\n\t\ttileArr[x][y].setOpened(true);\n\n\t\tif (tileArr[x][y].getNeighbors() == 0) {\n\t\t\tint left = x - 1;\n\t\t\tint right = x + 1;\n\t\t\tint up = y - 1;\n\t\t\tint down = y + 1;\n\t\t\t// same row\n\t\t\tif (left >= 0 && tileArr[left][y].canOpen())\n\t\t\t\topenRec(left, y);\n\t\t\tif (right < worldWidth && tileArr[right][y].canOpen())\n\t\t\t\topenRec(right, y);\n\n\t\t\t// row above\n\t\t\tif (left >= 0 && up >= 0 && tileArr[left][up].canOpen())\n\t\t\t\topenRec(left, up);\n\t\t\tif (up >= 0 && tileArr[x][up].canOpen())\n\t\t\t\topenRec(x, up);\n\t\t\tif (right < worldWidth && up >= 0 && tileArr[right][up].canOpen())\n\t\t\t\topenRec(right, up);\n\n\t\t\t// row below\n\t\t\tif (left >= 0 && down < worldHeight\n\t\t\t\t\t&& tileArr[left][down].canOpen())\n\t\t\t\topenRec(left, down);\n\t\t\tif (down < worldHeight && tileArr[x][down].canOpen())\n\t\t\t\topenRec(x, down);\n\t\t\tif (right < worldWidth && down < worldHeight\n\t\t\t\t\t&& tileArr[right][down].canOpen())\n\t\t\t\topenRec(right, down);\n\t\t}\n\t}", "public Steps(int steps){\n\t\tthis.steps = steps;\n\t\tmax = (int) Math.sqrt(steps);\n\t\tmem = new Integer[steps + 1][max + 1];\n\t}", "public void clickedR(int x, int y) {\n\n\t\tif (lost == false && isFinished == false) {\n\t\t\ttileArr[x / Tile.getWidth()][y / Tile.getHeight()].placeFlag();\n\t\t\tgameFinished();\n\t\t}\n\t}", "public void setRepel(int steps)\n\t{\n\t\tm_repel = steps;\n\t}", "public void sbrk(int R) throws MemoryFault {\n expands(freespace, R);\n if (Process_Table[currentProcess].acc == 0) {\n System.out.println(\"[Info] EXPANDED RIGHT AND BROKE OUT OF SBRK\");\n diag();\n return;\n }\n\n //sorting free spaces\n Collections.sort(freespace);\n\n //merging of freespaces that are next to eachother\n freemerge(freespace);\n //expanding in place going towards the right\n expands(freespace, R);\n if (Process_Table[currentProcess].acc == 0) {\n System.out.println(\"[Info] EXPANDED RIGHT AND BROKE OUT OF SBRK\");\n //diag();\n return;\n }\n //moving a program to a freespace w enough room and updating freespace and program\n //System.out.println(\"[Debug] OLD BASE IS:\" + Process_Table[currentProcess].base + \" OLD LIMIT WAS:\" + +Process_Table[currentProcess].limit);\n newfree(freespace, R);\n if (Process_Table[currentProcess].acc == 0) {\n System.out.println(\"[Debug] NEW BASE IS:\" + Process_Table[currentProcess].base + \" NEW LIMIT IS:\" + +Process_Table[currentProcess].limit);\n System.out.println(\"[Info] FOUND NEW FREE AND BROKE OUT OF SBRK\");\n diag();\n return;\n }\n\n //SORTING 0F PCB'S\n for (int i = 0; i < Process_Table.length; i++) {\n if (Process_Table[i] != null) {\n newsort.add(Process_Table[i]);\n }\n }\n Collections.sort(newsort);\n\n compaction(R);\n\n // diag();\n }", "private static void turnRight(Robot r) \n {\n for(int i=0; i<3;i++)\n {\n r.turnLeft();\n }\n }", "public void move(int mv){\n\t\t\tx+= mv;\n\t\t}", "public void setSteps(int steps) {\n\t\tthis.steps = steps;\n\t}", "public void move() {\n if (this.nextMove.equals(\"a\")) { // move down\n this.row = row + 1;\n progress += 1;\n if (progress == steps) {\n nextMove = \"b\";\n progress = 0;\n }\n } else if (this.nextMove.equals(\"b\")) { // move right\n this.col = col + 1;\n progress += 1;\n if (progress == steps) {\n nextMove = \"c\";\n progress = 0;\n }\n } else if (this.nextMove.equals(\"c\")) { // move up\n this.row = row - 1;\n progress += 1;\n if (progress == steps) {\n nextMove = \"a\";\n progress = 0;\n }\n }\n }", "@SuppressWarnings(\"boxing\")\n public void go(final int steps) {\n callFunction(\"go\", steps);\n }", "public Mushroom(String s, int xpos, int ypos) {\r\n\t\tsuper(xpos, ypos, 1, s);\r\n\t}", "public void moveRight() {\n locX = locX + 1;\n }", "private void traversePath()\n\t{\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t}", "void sideStep(float steps) {\n _rotVector.rotate(PI / 2);\n _x += _rotVector.x * steps;\n _y += _rotVector.y * steps;\n _rotVector.rotate(-PI / 2);\n }", "abstract void walk();", "public void setRootMove(String aMove);", "public static void compute_possible_moves(Board s){\n\t\tint b [][] = s.board;\n\t\tint x = -1;\n\t\tint y = -1;\n\t\tfor (int i = 0;i < b.length;i++) {\n\t\t\tfor (int j = 0;j < b[i].length;j++) {\n\t\t\t\tif(b[i][j] == 0){\n\t\t\t\t\tx = i;\n\t\t\t\t\ty = j;\n\t\t\t\t\tbreak;\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\n\t\tint left [][];\n\t\tint right [][];\n\t\tint up [][];\n\t\tint down [][];\n\t\tpossible_boards.clear();\n\t\tif(x - 1 != -1 && x >= 0 && x < 3){\n\t\t\t//up is a legal move\n\t\t\tint temporary_board [][] = new int[b.length][];\n\t\t\tfor(int q = 0; q < b.length; q++)\n\t\t\t temporary_board [q] = b[q].clone();\n\t\t\t\n\n\t\t\tint temp = temporary_board[x - 1][y];\n\t\t\ttemporary_board[x - 1][y] = temporary_board[x][y];\n\t\t\ttemporary_board[x][y] = temp;\n\t\t\tup = temporary_board;\n\n\t\t\tBoard up_board = new Board(up);\n\t\t\tpossible_boards.add(up_board);\n\n\t\t}\n\t\tif(x + 1 != 3 && x >= 0 && x < 3){\n\t\t\t//down is a legal move\n\t\t\tint temporary_board [][] = new int[b.length][];\n\t\t\tfor(int q = 0; q < b.length; q++)\n\t\t\t temporary_board [q] = b[q].clone();\n\t\t\t\n\t\t\tint temp = temporary_board[x + 1][y];\n\t\t\ttemporary_board[x + 1][y] = temporary_board[x][y];\n\t\t\ttemporary_board[x][y] = temp;\n\t\t\tdown = temporary_board;\n\t\t\tBoard down_board = new Board(down);\n\t\t\tpossible_boards.add(down_board);\n\t\t}\n\t\tif(y - 1 != -1 && y >= 0 && y < 3){\n\t\t\t//left move is legal\n\t\t\tint temporary_board [][] = new int[b.length][];\n\t\t\tfor(int q = 0; q < b.length; q++)\n\t\t\t temporary_board [q] = b[q].clone();\n\t\t\t\n\t\t\tint temp = temporary_board[x][y - 1];\n\t\t\ttemporary_board[x][y - 1] = temporary_board[x][y];\n\t\t\ttemporary_board[x][y] = temp;\n\t\t\tleft = temporary_board;\n\t\t\tBoard left_board = new Board(left);\n\t\t\tpossible_boards.add(left_board);\n\n\t\t}\n\t\tif(y + 1 != 3 && y >= 0 && y < 3){\n\t\t\t//right move is legal\n\t\t\tint temporary_board [][] = new int[b.length][];\n\t\t\tfor(int q = 0; q < b.length; q++)\n\t\t\t temporary_board [q] = b[q].clone();\n\t\t\t\n\t\t\tint temp = temporary_board[x][y + 1];\n\t\t\ttemporary_board[x][y + 1] = temporary_board[x][y];\n\t\t\ttemporary_board[x][y] = temp;\n\t\t\tright = temporary_board;\n\t\t\tBoard right_board = new Board(right);\n\t\t\tpossible_boards.add(right_board);\n\n\t\t}\n\n\t}", "public void move(long timePassed) {\r\n\t\t// if ship is moving left and reached the left side of the screen, don't move\r\n\t\tif ((dx < 0) && (x < 10)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// if ship is moving right and reached the right side of the screen, don't move\r\n\t\tif ((dx > 0) && (x > 530)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tsuper.move(timePassed);\r\n\t}", "public void runPuzzleMovement( Screw screw, float screwVal, Platform p );", "private void getJumps(ArrayList<Move> moves, int k) {\n if (!jumpPossible(k)) {\n return;\n }\n\n for (int i = -2; i <= 2; i += 2) {\n for (int j = -2; j <= 2; j += 2) {\n char nextCol = (char) (col(k) + i);\n char nextRow = (char) (row(k) + j);\n if (validSquare(nextCol, nextRow)) {\n Move rec = Move.move(col(k),\n row(k), nextCol, nextRow);\n if (checkJump(rec, true)) {\n PieceColor middle = get(nextCol, nextRow);\n set(nextCol, nextRow, get(k));\n ArrayList<Move> record = new ArrayList<>();\n getJumps(record, index(nextCol, nextRow));\n if (record.size() == 0) {\n record.add(null);\n }\n set(nextCol, nextRow, middle);\n for (Move mov : record) {\n Move jump = Move.move(rec, mov);\n moves.add(jump);\n }\n }\n }\n }\n }\n }", "private void moveRecursiveHelper (double pixels) {\n if (pixels <= 0 + PRECISION_LEVEL) return;\n \n Location currentLocation = getLocation();\n Location nextLocation = getLocation();\n Location nextCenter = nextLocation;\n nextLocation.translate(new Vector(getHeading(), pixels));\n Location[] replacements = { nextLocation, nextCenter };\n \n if (nextLocation.getY() < 0) {\n // top\n replacements = overrunsTop();\n }\n else if (nextLocation.getY() > myCanvasBounds.getHeight()) {\n // bottom\n replacements = overrunBottom();\n }\n else if (nextLocation.getX() > myCanvasBounds.getWidth()) {\n // right\n replacements = overrunRight();\n }\n else if (nextLocation.getX() < 0) {\n // left\n replacements = overrunLeft();\n }\n \n nextLocation = replacements[0];\n nextCenter = replacements[1];\n \n setCenter(nextCenter);\n double newPixels = pixels - (Vector.distanceBetween(currentLocation, nextLocation));\n if (myPenDown) {\n myLine.addLineSegment(currentLocation, nextLocation);\n }\n moveRecursiveHelper(newPixels);\n \n }", "@Override\n\tprotected Location nextMove(Game g) {\n\t\twhile (!clicked)\n\t\t\tdelay();\t\n\t\tclicked = false;\n\t\treturn clickedSquareLocation;\n\t}", "private void doStep() {\n // Add some variables to increase readability.\n int left = RotorPosition.LEFT.ordinal();\n int middle = RotorPosition.MIDDLE.ordinal();\n int right = RotorPosition.RIGHT.ordinal();\n\n //TODO see if this method can be optimized at all\n if (rotors[right].isAtTurnoverPosition()) {\n // Normal stepping.\n if (rotors[middle].isAtTurnoverPosition()) {\n if (rotors[left].isAtTurnoverPosition()) {\n reflector.doStep();\n }\n rotors[left].doStep();\n }\n rotors[middle].doStep();\n } else {\n // Handle the double stepping anomaly.\n if (rotors[middle].isAtTurnoverPosition() && rotors[middle].justStepped()) {\n rotors[left].doStep();\n rotors[middle].doStep();\n }\n }\n rotors[right].doStep();\n }", "static String recurse(int j,int p,int s,int steps)\r\n\t{\n\t\tif (steps==0)\r\n\t\t\treturn \"\";\r\n\t\tif (j==J)\r\n\t\t\treturn null;\r\n\t\tif ((J-j-1)*P*S+(P-p-1)*S+S-s<steps)\r\n\t\t\treturn null;\r\n\t\t\r\n\t\tint sn=s+1;\r\n\t\tint pn=p+(sn/S);\r\n\t\tint jn=j+(pn/P);\r\n\t\tpn%=P;\r\n\t\tsn%=S;\r\n\t\t\r\n\t\tString sol=recurse(jn,pn,sn,steps);\r\n\t\tif (sol!=null)\r\n\t\t\treturn sol;\r\n\t\t\r\n\t\tif (jp[j][p]<K && js[j][s]<K && ps[p][s]<K)\r\n\t\t{\r\n\t\t\tjp[j][p]++;\r\n\t\t\tjs[j][s]++;\r\n\t\t\tps[p][s]++;\r\n\t\t\tsol=recurse(jn,pn,sn,steps-1);\r\n\t\t\tif (sol!=null)\r\n\t\t\t\treturn \"\"+(j+1)+\" \"+(p+1)+\" \"+(s+1)+\"\\n\"+sol;\r\n\t\t\tjp[j][p]--;\r\n\t\t\tjs[j][s]--;\r\n\t\t\tps[p][s]--;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "void move(Tile t);", "public void moveRobber(HexLocation loc) {\n\n\t}", "public void getTopRight(List<Piece> moves){\n\t\tint pNum = PhiletoNum(this.phile);\n\t\tint rNum = this.rank;\n\t\t\n\t\twhile(pNum < 8 && rNum < 8){\n\t\t\tmoves.add(new Bishop(NumtoPhile(pNum + 1), rNum + 1));\n\t\t\tpNum += 1;\n\t\t\trNum += 1;\n\t\t}\n\t\t\n\t}", "public static double walkingStepsToSecond(int steps) {\n //Walking or pushing a wheelchair at a moderate pace: 1 mile in 20 minutes = 2,000 steps\n double oneStepTime = 0.6;//one step taking in 1.6 second\n double timeOfSteps;\n timeOfSteps = oneStepTime * steps;\n return timeOfSteps;\n }", "public interface ScramState {\r\n\t/** Return the Node corresponding to McDiver's location in the graph. */\r\n\tNode currentNode();\r\n\r\n\t/** Return the Node associated with the exit from the sewer system.<br>\r\n\t * McDiver has to move to this Node in order to get out. */\r\n\tNode exit();\r\n\r\n\t/** Return a collection containing all the nodes in the graph.<br>\r\n\t * They are in no particular order. */\r\n\tCollection<Node> allNodes();\r\n\r\n\t/** Change McDiver's location to n.<br>\r\n\t * Throw an IllegalArgumentException if n is not directly connected to<br>\r\n\t * McDiver's location. */\r\n\tvoid moveTo(Node n);\r\n\r\n\t/** Return the steps remaining to get out of the sewer system.<br>\r\n\t * This value will change with every call to moveTo(Node),<br>\r\n\t * and if it reaches 0 before you get out, you have failed to get out. */\r\n\tint stepsToGo();\r\n}", "public void move(){\n\t\t\n\t}", "public int move (int pixels) {\n int pixelsToMove = pixels;\n // ensure that moveRecursiveHelper doesn't take a negative argument\n if (Math.abs(pixels) != pixels) {\n pixelsToMove = -pixelsToMove;\n turn(HALF_TURN_DEGREES);\n }\n moveRecursiveHelper(pixelsToMove);\n if (Math.abs(pixels) != pixels) {\n turn(HALF_TURN_DEGREES);\n }\n return Math.abs(pixels);\n }", "void move(Board b, Square target, int[] position, String imagepath);", "public synchronized String Move(Coordinates step) {\n // check if player won't go over the grid\n if (step.getKey() + coord.getKey() < 0 || step.getKey() + coord.getKey() > sizeSide) {\n System.out.println(\"You can't go out of x bounds, retry\");\n return null;\n }\n else if (step.getValue() + coord.getValue() < 0 || step.getValue() + coord.getValue() > sizeSide) {\n System.out.println(\"You can't go out of y bounds, retry\");\n return null;\n }\n else {\n coord = new Coordinates(coord.getKey() + step.getKey(), coord.getValue() + step.getValue());\n return \"ok\";\n }\n }", "public void processMove(String s) {\n\t\tScanner sc = new Scanner(s);\r\n\t\t// Get the flag change\r\n\t\tString command = sc.next();\r\n\t\tboolean value = sc.nextBoolean();\r\n\t\tif (command.equals(\"turnL\"))\r\n\t\t\tturnL = value;\r\n\t\telse if (command.equals(\"turnR\"))\r\n\t\t\tturnR = value;\r\n\t\telse if (command.equals(\"forth\"))\r\n\t\t\tforth = value;\r\n\t\telse if (command.equals(\"fire\"))\r\n\t\t\tfire = value;\r\n\t\telse\r\n\t\t\tSystem.out.println(\"Unexpected move: \" + command);\r\n\t\t// then unpack position update\r\n\t\tlocX = sc.nextDouble();\r\n\t\tlocY = sc.nextDouble();\r\n\t\tangle = sc.nextDouble();\r\n\t}", "@Override\n\tpublic void walk() {\n\t\t\n\t}", "public void moveRight() {\n\t\t\n\t}", "public void replayByStep(){\n if(gamePaused == false){ return; }\n // animationThread.stop();\n replay.load();\n level = replay.getLevel();\n board = new Board(level);\n if(muteMusic == false){\n music.stopPlayingAudio(\"All\");\n music.playAudio(\"LevelMusic\");\n }\n musicName = \"LevelMusic\";\n setTitle(\"Chip's Challenge: Level \" + level);\n timeRuunableThread.setDrawNumber(true);\n timeRuunableThread.setSecond(replay.getTime());\n infoCanvas.drawLevelNumber(level);\n keysize = 0;\n originalChipNumber = board.getTreasureRemainingAmount();\n infoCanvas.drawChipsLeftNumber(board.getTreasureRemainingAmount());\n infoCanvas.drawSquares((Graphics2D) infoCanvas.getGraphics(), 14 * infoCanvas.getHeight() / 20, infoCanvas.getWidth(), infoCanvas.getHeight());\n try {\n infoCanvas.drawKeysChipsPics();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n renderer = new MazeRenderer(boardCanvas.getGraphics());\n renderer.redraw(board, boardCanvas.getWidth(), boardCanvas.getHeight());\n for(String s : replay.getMovement()) {\n // board.moveChip(s);\n board = replay.replayByStep(board);\n checkMovedRedraw();\n replay.selectReplaySpeed();\n }\n gameStarted = true;\n gamePaused = false;\n timeRuunableThread.setPause(gamePaused);\n timeRuunableThread.setGameStart(gameStarted);\n }", "public void move() {\n\t\tif(right) {\n\t\t\tgoRight();\n\t\t\tstate++;\n\t\t\tif(state > 5) {\n\t\t\t\tstate = 3;\n\t\t\t}\n\t\t}\n\t\telse if(left) {\n\t\t\tgoLeft();\n\t\t\tstate++;\n\t\t\tif(state > 2) {\n\t\t\t\tstate = 0;\n\t\t\t}\n\t\t}\n\t}", "public void make_a_move(MapTile[][] scanMapTiles, Coord currentLoc) throws IOException {\n\tint centerIndex = (scanMap.getEdgeSize() - 1) / 2;\n\tint x = centerIndex, y = centerIndex;\n\tscanScience(scanMapTiles, currentLoc);\n\ttry {\n\n\t\tif (isValidMove(scanMapTiles, direction)) {\n\t\t\tSystem.out.println(\"Random move \"+ direction);\n\t\t\tmove(direction);\n\n\t\t\tThread.sleep(sleepTime);\n\n\t\t} else {\n\n\t\t\twhile (!isValidMove(scanMapTiles, direction)) {\n\n\t\t\t\tdirection = switchDirection(scanMapTiles, direction);\n\t\t\t}\n\t\t\tSystem.out.println(\"Random move \"+ direction);\n\t\t\tmove(direction);\n\t\t\tThread.sleep(sleepTime);\n\t\t}\n\t} catch (InterruptedException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n}", "@Override\r\n\tpublic void walk() {\n\r\n\t}", "public void move() {\n\t\tsuper.move();\n\t\t\n\t\t// if the slime hit the ground\n\t\tif (y >= 64*2) {\n\t\t\t// begin sliding (only needed for the first time he falls)\n\t\t\tif (accel_x != .25 && accel_x != duck_accel_x) accel_x = .25;\n\t\t\t\n\t\t\t// allow player to jump, since vel_y = 0 stops the jump\n\t\t\tif (jumping)\n\t\t\t\tjumping = false;\n\t\t\telse\n\t\t\t\tvel_y = 0;\n\t\t\t\n\t\t\t// slime is slightly lower while ducking\n\t\t\tif (ducking)\n\t\t\t\ty = 64*2+20;\n\t\t\telse\n\t\t\t\ty = 64*2;\n\t\t}\n\t\t\n\t\t// bounce if the slime hit the top\n\t\tif (y < 0) vel_y *= -1;\n\t}", "private void findWay(MazeCell[] surrounds) {\r\n for (int i = 0; i < surrounds.length; i++) {\r\n if (surrounds[i].isMovable && surrounds[i].getFootprint()) {\r\n int d = faceDir.ordinal();\r\n faceDir = Direction.values()[(d + i) % 4];\r\n }\r\n }\r\n }", "protected void renderMoves(Graphics g) {\n\t\tfor (Point move : moves) {\n\t\t\tg.setColor(team == 1 ? Color.red : Color.blue);\n\t\t\tPoint p = board.locationOfSquare(move);\n\t\t\tp.x += board.getSquareSize() / 4;\n\t\t\tp.y += board.getSquareSize() / 4;\n\t\t\tg.fillOval(p.x, p.y, board.getSquareSize() / 2, board.getSquareSize() / 2);\n\t\t}\n\t}", "@Override\n\tpublic void movment() {\n\t\tif(ghost.shot && fired) {\n\t\t\tif(direction == RIGHT)\n\t\t\t\tmove(RIGHT);\n\t\t\telse if(direction == LEFT)\n\t\t\t\tmove(LEFT);\n\t\t\telse if(direction == UP)\n\t\t\t\tmove(UP);\n\t\t\telse if(direction == DOWN)\n\t\t\t\tmove(DOWN);\n\t\t}\n\t}", "public void moveRight() {\r\n speedX = 6;\r\n Texture r1 = changeImg (\"./graphics/characters/player/rightWalk1.png\");\r\n img = new Sprite (r1);\r\n if (centerX > startScrolling)\r\n bg.setBackX (bg.getBackX () + 6);\r\n bg.update ();\r\n }", "@Override\n\tprotected void loadWalkRight() {\n\t\tthis.walkRight = new Animation(RenderableHolder.getInstance().skullMonsterSprite, frameWidth, frameHeight,\n\t\t\t\twalkFrameCount, 2, 1);\n\t\tthis.walkRight.setOffset(offsetX, offsetY);\n\t\tthis.walkRight.setPosition(this.logicalX, this.logicalY);\n\n\t}", "public void move() {\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t}", "void turnToSprite(Sprite s) {\n turnToPoint(s._x, s._y);\n }", "public void Print(Board b, int turn, int[] moves);", "public void move() {\n\n if (_currentFloor == Floor.FIRST) {\n _directionOfTravel = DirectionOfTravel.UP;\n }\n if (_currentFloor == Floor.SEVENTH) {\n _directionOfTravel = DirectionOfTravel.DOWN;\n }\n\n\n if (_directionOfTravel == DirectionOfTravel.UP) {\n _currentFloor = _currentFloor.nextFloorUp();\n } else if (_directionOfTravel == DirectionOfTravel.DOWN) {\n _currentFloor = _currentFloor.nextFloorDown();\n }\n\n if(_currentFloor.hasDestinationRequests()){\n stop();\n } \n\n }", "public void computersTurn(int focusedSquare){//gives the index of the focused square.\n if (focusedSquare ==-1)\n focusedSquare = changeFocus();\n System.out.println(\"\\n\\n\\n\\n\"+focusedSquare);\n boolean squareAlreadyPicked = false;\n int square = -1;\n double sum=0;\n modifiedMark = createModifiedMarkovModel(focusedSquare);\n double rand;\n while(!squareAlreadyPicked){//checking if square has already been picked before.\n \n if(stepsCompleted<25){\n rand = getRand(0); //generates random number based on sum of existing probabilities in modifiedMarkov\n square = caseBased(rand, sum, 0, 0);\n }\n \n else if((stepsCompleted>=25)&&(stepsCompleted<=50)){\n rand = getRand(1);\n square = caseBased(rand,sum,1,0);\n }\n\n else if (stepsCompleted>50){\n rand = getRand(2);\n square = caseBased(rand,sum,2,0);\n }\n squareAlreadyPicked=true;\n\n }\n System.out.println(square);\n bSquares.get(focusedSquare).getSmallSquare(square).setOwnership(1);\n bSquares.get(focusedSquare).getSmallSquare(square).setCommitted(true);\n stepsCompleted++;\n updateDatabase(focusedSquare,square, false); //updates the database with the player's move B4 the focus is changed\n for (int t = 0; t<9; t++){//removes focus everywhere else.\n bSquares.get(t).sethasFocus(false);\n }\n \n bSquares.get(square).sethasFocus(true);//tells which square has focus\n \n }", "public interface Hwalk {\n void startForwardWalk();//前进;\n void startBackwardWalk();//后退\n void startTurnLeftWalk();//左转\n void startTurnRightWalk();//右转\n void startLeftWalk();//左走\n void startLeftForwardWalk();//左前走\n void startLeftBackwardWalk();//左后走\n void startRightWalk();//右走\n void startRightForwardWalk();//右前走\n void startRightBackwardWalk();//右后走\n void stopWalk();//停止\n void destoryWalk();//关闭步态算法\n void setWalkSpeed(int[] speed);//设置速度\n}", "public void takeStep() {\n \t//System.out.println(\"\"+Math.abs(rmd.nextInt()%4));\n \tswitch(rmd.nextInt(4)){\t\n \tcase 0:\n \t\tcurPoint = curPoint.translate(-stepSize, 0);//go right\n \t\tbreak;\n \tcase 1:\n \t\tcurPoint = curPoint.translate(0, stepSize);//go down\n \t\tbreak;\n \tcase 2:\n \t\tcurPoint = curPoint.translate(stepSize, 0);//go left\n \t\tbreak;\n \tcase 3:\n \t\tcurPoint = curPoint.translate(0, -stepSize);//go up\n \t\tbreak;\n \t}\n }", "@Test\n void RookMoveRight() {\n Board board = new Board(8, 8);\n Piece rook = new Rook(board, 2, 2, 1);\n\n board.getBoard()[2][2] = rook;\n\n board.movePiece(rook, 4, 2);\n\n Assertions.assertEquals(rook, board.getBoard()[4][2]);\n Assertions.assertNull(board.getBoard()[2][2]);\n }", "public int getSmartMove(Unit unit, int destX, int destY) {\r\n\r\n\t\t_unitX = unit.getCurrentX();\r\n\t\t_unitY = unit.getCurrentY();\r\n\t\t_graph.buildGraph();// clears all adjacencies and rebuilds graph in case\r\n\t\t\t\t\t\t\t// of destruction.\r\n\r\n\t\t// _graph.getGraph()[_unitX][_unitY].startVertex();\r\n\r\n\t\tfor (int i = 0; i < GameStats._height; i++)\r\n\t\t\tfor (int j = 0; j < GameStats._width; j++)\r\n\t\t\t\t_graph.getGraph()[i][j].clearVertex();\r\n\r\n\t\tDijekstra.computePaths(_graph.getGraph()[_unitX][_unitY]);// redirects\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// all of\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the paths\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// from the\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// given\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// vector\r\n\r\n\t\tans = Dijekstra.getShortestPathTo(_graph.getGraph()[destX][destY]);\r\n\r\n\t\t// System.out.println(ans);\r\n\t\t// if ans is empty we reached target. or no moves possible\r\n\t\tif (ans.size() > 1) {\r\n\t\t\tans.removeFirst();\r\n\t\t\tVertexInt ansVert = ans.getFirst();\r\n\t\t\tif (ansVert.getI() == _unitX) {\r\n\t\t\t\tif (ansVert.getJ() == _unitY + 1)\r\n\t\t\t\t\treturn 0;// down\r\n\t\t\t\treturn 2;// up\r\n\t\t\t}\r\n\t\t\tif (ansVert.getI() == _unitX + 1)\r\n\t\t\t\treturn 1;// left\r\n\t\t\treturn 3;// right\r\n\t\t}\r\n\t\treturn -1;\r\n\t}", "Move(int r, int c, int dr, int dc)\n\t{\n\t\tpieceRow = r;\n\t\tpieceCol = c;\n\t\tdestRow = dr;\n\t\tdestCol = dc;\n\t}", "public Move(int from, int to, int step) {\n this.to = to;\n this.from = from;\n this.step = step;\n }", "public void setMoves(String [] moves) {\n this.moves = moves;\n signalCheck();\n }", "void walk() {\n\t\t\n\t}", "@Override\n public void move()\n {\n System.out.println(\"tightrope walking\");\n }", "@Test\n public void westMoveTest() {\n int westInitialY = 3;\n Robot westRobot = new Robot(4, westInitialY, Direction.W);\n westRobot.move(testBounds);\n Assert.assertEquals(3, westRobot.getX());\n Assert.assertEquals(westInitialY, westRobot.getY());\n\n westRobot.move(testBounds);\n Assert.assertEquals(2, westRobot.getX());\n Assert.assertEquals(westInitialY, westRobot.getY());\n\n westRobot.move(testBounds);\n Assert.assertEquals(1, westRobot.getX());\n Assert.assertEquals(westInitialY, westRobot.getY());\n\n westRobot.move(testBounds);\n Assert.assertEquals(0, westRobot.getX());\n Assert.assertEquals(westInitialY, westRobot.getY());\n\n westRobot.move(testBounds);\n Assert.assertEquals(0, westRobot.getX());\n Assert.assertEquals(westInitialY, westRobot.getY());\n }", "public static void move(int square, char mark) {\n\t\tif (isSquareEmpty(square)) {\n\t\t\tspacesLeft = spacesLeft - 1;\n\t\t}\n\n\t\tif (square == 1) {\n\t\t\tboard[0][0] = mark;\n\t\t} else if (square == 2) {\n\t\t\tboard[0][1] = mark;\n\t\t} else if (square == 3) {\n\t\t\tboard[0][2] = mark;\n\t\t} else if (square == 4) {\n\t\t\tboard[1][0] = mark;\n\t\t} else if (square == 5) {\n\t\t\tboard[1][1] = mark;\n\t\t} else if (square == 6) {\n\t\t\tboard[1][2] = mark;\n\t\t} else if (square == 7) {\n\t\t\tboard[2][0] = mark;\n\t\t} else if (square == 8) {\n\t\t\tboard[2][1] = mark;\n\t\t} else if (square == 9) {\n\t\t\tboard[2][2] = mark;\n\t\t}\n\t}", "public void step() {\n\t\tint step = rand.nextInt(2);\n\t\t\n\t\tif (step==0) {\n\t\t\t\n\t\t\tPoint moveRight = new Point(++x,y);\n\t\t\t\n\t\t\tif(x<=size-1) {\n\t\t\t\tpath.add(moveRight);\n\t\t\t}\n\t\t\telse --x;\n\t\t}\n\t\telse { \n\t\t\tPoint topStep = new Point(x,--y);\n\t\t\t\n\t\t\tif(y>=0) {\n\t\t\t\tpath.add(topStep);\n\t\t\t}\n\t\t\telse ++y;\n\t\t}\n\t\tif (x==size-1 && y==0) {\n\t\t\tsetDone(true);\n\t\t}\n\t\t\n\t\t\n\t}", "private void moveTo(int xpos, int ypos) {\n repeat = true;\n int x1 = ypos / CELL_SIZE;\n int y1 = xpos / CELL_SIZE;\n int d;\n boolean valid = true;\n int st, bc = 0;\n if (x1 == x && y1 != y) {\n if (y1 > y) {\n for (int i = y; i <= y1; i++) {\n st = state[x][i];\n if (st == WALL_ST || st == NULL_ST) {\n valid = false;\n break;\n } else if (st == BOX_ST || st == FIT_ST) {\n bc++;\n if (bc > 1) {\n valid = false;\n break;\n }\n }\n }\n } else {\n for (int i = y1; i <= y; i++) {\n st = state[x][i];\n if (st == WALL_ST || st == NULL_ST) {\n valid = false;\n break;\n } else if (st == BOX_ST || st == FIT_ST) {\n bc++;\n if (bc > 1) {\n valid = false;\n break;\n }\n }\n }\n }\n } else if (x1 != x && y1 == y) {\n if (x1 > x) {\n for (int i = x; i <= x1; i++) {\n st = state[i][y];\n if (st == WALL_ST || st == NULL_ST) {\n valid = false;\n break;\n } else if (st == BOX_ST || st == FIT_ST) {\n bc++;\n if (bc > 1) {\n valid = false;\n break;\n }\n }\n }\n } else {\n for (int i = x1; i <= x; i++) {\n st = state[i][y];\n if (st == WALL_ST || st == NULL_ST) {\n valid = false;\n break;\n } else if (st == BOX_ST || st == FIT_ST) {\n bc++;\n if (bc > 1) {\n valid = false;\n break;\n }\n }\n }\n }\n } else {\n valid = false;\n }\n\n if (valid) {\n if (x1 == x && y1 != y) {\n if (y1 > y) {\n d = y1 - y;\n for (int i = 0; i < d && repeat; i++) {\n changeState(RIGHT_MOVE);\n try {\n Thread.sleep(SLEEP);\n } catch (InterruptedException e1) {\n //empty\n }\n }\n } else {\n d = y - y1;\n for (int i = 0; i < d && repeat; i++) {\n changeState(LEFT_MOVE);\n try {\n Thread.sleep(SLEEP);\n } catch (InterruptedException e1) {\n //empty\n }\n }\n }\n } else if (x1 != x && y1 == y) {\n if (x1 > x) {\n d = x1 - x;\n for (int i = 0; i < d && repeat; i++) {\n changeState(DOWN_MOVE);\n try {\n Thread.sleep(SLEEP);\n } catch (InterruptedException e1) {\n //empty\n }\n }\n } else {\n d = x - x1;\n for (int i = 0; i < d && repeat; i++) {\n changeState(UP_MOVE);\n try {\n Thread.sleep(SLEEP);\n } catch (InterruptedException e1) {\n //empty\n }\n }\n }\n }\n } else {\n List<Point> path = findPath(new Point(y, x), new Point(y1, x1));\n\n if (path.size() > 1) {\n Point cpnt, opnt;\n opnt = (Point) path.get(0);\n int psize = path.size();\n for (int i = 1; i < psize && repeat; i++) {\n cpnt = (Point) path.get(i);\n moveOne(cpnt.y, cpnt.x, opnt.y, opnt.x);\n opnt = cpnt;\n try {\n Thread.sleep(SLEEP);\n } catch (InterruptedException e1) {\n //empty\n }\n }\n }\n }\n }", "public void move(){\n\t\tswitch(state){\r\n\t\t\tcase ATField.SPRITE_STAND:\r\n\t\t\t\tspriteX = 0;\r\n\t\t\t\tcoords = standbySprite.get(spriteX);\r\n\t\t\t\tspriteImg = new Rect(coords.left,coords.top,coords.right,coords.bottom);\r\n\t\t\t\tactualImg = new Rect(x, y, x + width, y + height);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\r\n\t\t\tcase ATField.SPRITE_WALK:\r\n\t\t\t\tif(spriteX >walkSprite.size() - 1){\r\n\t\t\t\t\tspriteX = 0;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tcoords = walkSprite.get(spriteX);\r\n\t\t\t\tspriteImg = new Rect(coords.left,coords.top,coords.right,coords.bottom);\r\n\t\t\t\tactualImg = new Rect(x, y, x + width, y + height);\r\n\t\t\t\tspriteX++;\r\n\t\t\t\t\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase ATField.SPRITE_RUN:\r\n\t\t\t\t\r\n\t\t\t\tif(spriteX >runSprite.size() - 1){\r\n\t\t\t\t\tspriteX = 0;\r\n\t\t\t\t\tsetState(STAND);\r\n\t\t\t\t}\r\n\t\t\t\tcoords = runSprite.get(spriteX);\r\n\t\t\t\tspriteImg = new Rect(coords.left,coords.top,coords.right,coords.bottom);\r\n\t\t\t\tactualImg = new Rect(x, y, x + width, y + height);\r\n\t\t\t\tspriteX++;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase ATField.SPRITE_JUMP:\r\n\t\t\t\tif(spriteX >5){\r\n\t\t\t\t\tsetState(STAND);\r\n\t\t\t\t}\r\n\t\t\t\tcoords = jumpSprite.get(0);\r\n\t\t\t\tspriteImg = new Rect(coords.left,coords.top,coords.right,coords.bottom);\r\n\t\t\t\tactualImg = new Rect(x, y, x + width, y + height);\r\n\t\t\t\tspriteX++;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "void onMove(Sudoku.State state, Location loc, Numeral num);", "private void advance(Board board, List<Move> moves) {\n int x = location.x;\n int y = location.y;\n \n Piece pc;\n Point pt;\n int move;\n \n if (color == Color.White)\n move = -1;\n else\n move = 1;\n \n pt = new Point(x, y + move);\n if (board.validLocation(pt)) {\n pc = board.getPieceAt(pt); \n if(pc == null) {\n moves.add(new Move(this, pt, pc)); \n \n pt = new Point(x, y + move * 2);\n if (board.validLocation(pt)) {\n pc = board.getPieceAt(pt);\n if(pc == null && numMoves == 0)\n moves.add(new Move(this, pt, pc));\n }\n } \n }\n }", "private static void drunkardTest(int testStepTimes, int testStepSize){\n\t\tImPoint testLocation = new ImPoint(TEST_START_LOC_X, TEST_START_LOC_Y);\n\t\tDrunkard drunkard = new Drunkard(testLocation, testStepSize);\n\t\tSystem.out.println(\"Drunkard starts at (\" + testLocation.getX() + \",\" + testLocation.getY() + \"); \");\n\t\tSystem.out.println(\"step size is \" + testStepSize);\n\t\t\n\t\ttestGetCurrentLoc(drunkard);\n\t\ttestTakeStep(drunkard, testStepTimes, testStepSize);\n\t}", "public Square step() {\n // TODO\n \tSquare c = exploreList.getNext();\n \tSquare realSquare = sea.getSea()[c.getRow()][c.getCol()];\n // check for if we are visited, if so return to skip processing current square\n \tif(realSquare.isVisited()) {\n \t\treturn c;\n \t\t\n \t}\n \trealSquare.setVisited();\n \tfor(Square neighs : sea.getAdjacentArea(realSquare)) {\n \t\tif(neighs.getPrevious() ==null) {\n \n \t\tneighs.setPrevious(c);\n \t\texploreList.add(neighs);\n \t\t}\n\t\telse {\n\t\tif(!neighs.isVisited()) {\n \t\t\tSquare n = new Square(neighs.getRow(), neighs.getCol(), neighs.getType());\n \t\t\tn.setPrevious(c);\n \t\t\texploreList.add(n);\n}\n\t\t}\n \t}\n \treturn c;\n\n }", "public boolean test( int passes ) {\t\t\r\n\t\t// stop when we have run the requested number of tests\r\n\t\tif (testsRun >= passes) {\r\n\t\t\tfinished = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// figure out which actor we should be moving\r\n\t\tActor a = findActor(testsRun);\r\n\t\t\r\n\t\t// move us along current pass or advance us to next\r\n\t\tif (s.test(a) == false) {\r\n\t\t\ttestsRun++;\r\n\t\t\ta.lastPosition( null );\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public void turnSmaround()\n { \n Wall w= (Wall)getOneIntersectingObject(Wall.class);\n wX=w.getX();\n wY=w.getY();\n }", "public void move()\n\t{\n time++;\n\t\tif (time % 10 == 0)\n\t\t{\n\t\t\thistogramFrame.clearData();\n\t\t}\n\t\tfor (int i = 0; i < nwalkers; i++)\n\t\t{\n\t\t\tdouble r = random.nextDouble();\n\t\t\tif (r <= pRight)\n\t\t\t{\n\t\t\t\txpositions[i] = xpositions[i] + 1;\n\t\t\t}\n\t\t\telse if (r < pRight + pLeft)\n\t\t\t{\n\t\t\t\txpositions[i] = xpositions[i] - 1;\n\t\t\t}\n\t\t\telse if (r < pRight + pLeft + pDown)\n\t\t\t{\n\t\t\t\typositions[i] = ypositions[i] - 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\typositions[i] = ypositions[i] + 1;\n\t\t\t}\n\t\t\tif (time % 10 == 0)\n\t\t\t{\n\t\t\t\thistogramFrame.append(Math.sqrt(xpositions[i] * xpositions[i]\n\t\t\t\t\t\t+ ypositions[i] * ypositions[i]));\n\t\t\t}\n\t\t\txmax = Math.max(xpositions[i], xmax);\n\t\t\tymax = Math.max(ypositions[i], ymax);\n\t\t\txmin = Math.min(xpositions[i], xmin);\n\t\t\tymin = Math.min(ypositions[i], ymin);\n\t\t}\n\t}", "public void moveInDirection(Direction dir, Unit unit){\n\t\t if(dir!=null){\n\t\t\t if(debug){\n\t\t\t\t System.out.println(\"about to move unit \"+unitID+\" \"+dir.name());\n\t\t\t\t System.out.println(\"currentLocation \"+unit.location().mapLocation());\n\t\t\t }\n if(dir.equals(Direction.Southwest)){\n \tif (gc.canMove(unitID, Direction.Southwest)) {\n gc.moveRobot(unitID, Direction.Southwest);\n System.out.println(\"moving south west\");\n \t}\n }else if(dir.equals(Direction.Southeast)){\n \tif (gc.canMove(unitID, Direction.Southeast)) {\n gc.moveRobot(unitID, Direction.Southeast);\n System.out.println(\"moving south east\");\n \t}\n }else if(dir.equals(Direction.South)){\n \tif (gc.canMove(unitID, Direction.South)) {\n gc.moveRobot(unitID, Direction.South);\n System.out.println(\"moving south\");\n \t}\n }\n else if(dir.equals(Direction.East)){\n \tif (gc.canMove(unitID, Direction.East)) {\n gc.moveRobot(unitID, Direction.East);\n System.out.println(\"moving east\");\n \t}\n }\n else if(dir.equals(Direction.West)){\n \tif (gc.canMove(unitID, Direction.West)) {\n gc.moveRobot(unitID, Direction.West);\n System.out.println(\"moving west\");\n \t}\n }else if(dir.equals(Direction.Northeast)){\n \tif (gc.canMove(unitID, Direction.Northeast)) {\n gc.moveRobot(unitID, Direction.Northeast);\n System.out.println(\"moving north east\");\n \t}\n }else if(dir.equals(Direction.Northwest)){\n \tif (gc.canMove(unitID, Direction.Northwest)) {\n gc.moveRobot(unitID, Direction.Northwest);\n System.out.println(\"moving north west\");\n \t}\n }else if(dir.equals(Direction.North)){\n \tif (gc.canMove(unitID, Direction.North)) {\n gc.moveRobot(unitID, Direction.North);\n System.out.println(\"moving north\");\n \t}\n }\n }\n\t\t\n\t}", "@Test\n void RookMoveDown() {\n Board board = new Board(8, 8);\n Piece rook = new Rook(board, 4, 4, 1);\n\n board.getBoard()[4][4] = rook;\n\n board.movePiece(rook, 4, 7);\n\n Assertions.assertEquals(rook, board.getBoard()[4][7]);\n Assertions.assertNull(board.getBoard()[4][4]);\n }", "public void calRightMove() {\n }", "private void swim(int speed){\r\n moveMuscles();\r\n moveBackFin();\r\n super.move(speed);\r\n\r\n }", "@Test\n void RookCapture() {\n Board board = new Board(8, 8);\n Piece rook1 = new Rook(board, 3, 3, 1);\n Piece rook2 = new Rook(board, 6, 3, 2);\n\n board.getBoard()[3][3] = rook1;\n board.getBoard()[6][3] = rook2;\n\n board.movePiece(rook1, 6, 3);\n\n Assertions.assertEquals(rook1, board.getBoard()[6][3]);\n Assertions.assertNull(board.getBoard()[3][3]);\n }", "public void moveDown() {\n\t\tsetPosY(getPosY() + steps);\n\t}", "public void move(FightCell cell);", "@Override\n\tpublic Direction nextMove(State state)\n\t{\n\t\t\n\t\tthis.direction = Direction.STAY;\n\t\tthis.hero = state.hero();\n\t\tthis.position = new Point( this.hero.position.right, this.hero.position.left ); //x and y are reversed, really\n\t\t\n\t\tthis.pathMap = new PathMap( state, this.position.x, this.position.y );\n\n\t\t//find the richest hero\n\t\tHero richestHero = state.game.heroes.get(0);\n\t\tif( richestHero == this.hero ) { richestHero = state.game.heroes.get(1); } //just grab another hero if we are #0\n\t\t\n\t\tfor( Hero hero : state.game.heroes )\n\t\t{\n\t\t\tif( hero != this.hero && hero.gold > richestHero.gold )\n\t\t\t{\n\t\t\t\trichestHero = hero;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//get all interesting sites\n\t\tList<TileInfo> minesInRange = this.pathMap.getSitesInRange( TileType.FREE_MINE, 20 );\t//mines in vicinity\n\t\tList<TileInfo> takenMinesInRange = this.pathMap.getSitesInRange( TileType.TAKEN_MINE, (100-richestHero.life)/2 );\t//mines in vicinity\n\t\tList<TileInfo> pubsInRange = this.pathMap.getSitesInRange( TileType.TAVERN, (int)(Math.pow(100-this.hero.life,2)*state.game.board.size/5000) );\t\t//pubs in vicinity\n\t\t\n\t\t//first visit pubs (apparently we need it)\n\t\tif( pubsInRange.size() != 0 )\n\t\t{\n\t\t\tthis.direction = this.pathMap.getDirectionTo( pubsInRange.get(0) );\n\t\t}\n\t\t\n\t\t//then visit the mines\n\t\telse if( minesInRange.size() != 0 )\n\t\t{\n\t\t\tthis.direction = this.pathMap.getDirectionTo( minesInRange.get(0) );\n\t\t}\n\t\t\n\t\t//then visit taken mines\n\t\telse if( takenMinesInRange.size() != 0 )\n\t\t{\n\t\t\tthis.direction = this.pathMap.getDirectionTo( takenMinesInRange.get(0) );\n\t\t}\n\t\t\n\t\t//then hunt for players\n\t\telse\n\t\t{\n\t\t\t//kill the richest hero! (but first full health)\n\t\t\tif( this.hero.life > 85 )\n\t\t\t{\n\t\t\t\tthis.direction = this.pathMap.getDirectionTo( richestHero.position.right, richestHero.position.left );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//run away!!!\n\t\t\t\tthis.direction = intToDir( (int)(Math.random()*4) );\n\t\t\t}\n\t\t}\n\t\t\n\t\t//VisualPathMap.getInstance( pathMap );\n\t\t\n\t\treturn this.direction;\n\t}", "public static void move()\n\t{\n\t\tswitch(step)\n\t\t{\n\t\t\tcase 0:\n\t\t\t\ttimer.start();\n\t\t\t\tstep = 1;\n\t\t\tbreak;\n\t\t\t// 1. Right wheels forward\n\t\t\tcase 1:\n\t\t\t\tif(timer.get() < time)\n\t\t\t\t{\n\t\t\t\t\tsetSpeed(0, .5);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tstep = 2;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\ttimer.start();\n\t\t\t\tstep = 3;\n\t\t\tbreak;\n\t\t\t// 2. Right wheels back\n\t\t\tcase 3:\n\t\t\t\tif(timer.get() < time)\n\t\t\t\t{\n\t\t\t\t\tsetSpeed(0, -.5);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tstep = 4;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\ttimer.start();\n\t\t\t\tstep = 5;\n\t\t\tbreak;\n\t\t\t// 3. Left wheels forward\n\t\t\tcase 5:\n\t\t\t\tif(timer.get() < time)\n\t\t\t\t{\n\t\t\t\t\tsetSpeed(.5, 0);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tstep = 6;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\ttimer.start();\n\t\t\t\tstep = 7;\n\t\t\tbreak;\n\t\t\t// 4. Left wheels back\n\t\t\tcase 7:\n\t\t\t\tif(timer.get() < time)\n\t\t\t\t{\n\t\t\t\t\tsetSpeed(-.5, 0);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tstep = 8;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\ttimer.start();\n\t\t\t\tstep = 9;\n\t\t\tbreak;\n\t\t\t// 5. Intake pick up\n\t\t\tcase 9:\n\t\t\t\tif(timer.get() < time)\n\t\t\t\t{\n\t\t\t\t\tsetSpeed(0, 0);\n\t\t\t\t\tshoot(.5);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tstep = 10;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\ttimer.start();\n\t\t\t\tstep = 11;\n\t\t\tbreak;\n\t\t\t// 6. Intake shoot\n\t\t\tcase 11:\n\t\t\t\tif(timer.get() < time)\n\t\t\t\t{\n\t\t\t\t\tsetSpeed(0, 0);\n\t\t\t\t\tpickUp(.5);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tstep = 12;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\t// Stop and reset everything\n\t\t\tcase 12:\n\t\t\t\tsetSpeed(0, 0);\n\t\t\t\tpickUp(0);\n\t\t\t\tshoot(0);\n\t\t\t\ttimer.reset();\n\t\t\tbreak;\n\t\t}\n\t}", "public void specialMove() {\n\t\tChessSquare initial = getSquare();\n\t\tChessSquare next;\n\t\t\n\t\tif(initial.getNorth() != null){\n\t\t\tnext = initial.getNorth();\n\t\t\t\n\t\t\tif((next.getOccupant() == null) || (!next.getOccupant().getColor().equals(this.getColor())))\n\t\t\t\tnext.removeOccupant();\n\t\t\tif(next.getEast() != null)\n\t\t\t\tif((next.getEast().getOccupant() == null) || (!next.getEast().getOccupant().getColor().equals(this.getColor())))\n\t\t\t\t\tnext.removeOccupant();\n\t\t\tif(next.getWest() != null && next.getWest().getOccupant() == null)\n\t\t\t\tif((next.getWest().getOccupant() == null) || (!next.getWest().getOccupant().getColor().equals(this.getColor())))\n\t\t\t\t\tnext.removeOccupant();\n\t\t}\n\t\t\n\t\tif(initial.getSouth() != null){\n\t\t\tnext = initial.getSouth();\n\t\t\t\n\t\t\tif((next.getOccupant() == null) || (!next.getOccupant().getColor().equals(this.getColor())))\n\t\t\t\tnext.removeOccupant();\n\t\t\tif(next.getEast() != null)\n\t\t\t\tif((next.getEast().getOccupant() == null) || (!next.getEast().getOccupant().getColor().equals(this.getColor())))\n\t\t\t\t\tnext.removeOccupant();\n\t\t\tif(next.getWest() != null)\n\t\t\t\tif((next.getWest().getOccupant() == null) || (!next.getWest().getOccupant().getColor().equals(this.getColor())))\n\t\t\t\t\tnext.removeOccupant();\n\t\t\t\n\t\t}\n\t\t\n\t\tnext = initial.getEast();\n\t\tif(next != null)\n\t\t\tif((next.getOccupant() == null) || (!next.getOccupant().getColor().equals(this.getColor())))\n\t\t\t\tnext.removeOccupant();\n\t\tnext = initial.getWest();\n\t\tif(next != null)\n\t\t\tif((next.getOccupant() == null) || (!next.getOccupant().getColor().equals(this.getColor())))\n\t\t\t\tnext.removeOccupant();\n\t\tsetCountdown(9);\n\t}", "private Set<Line> getPossibleMoves(Square[][] board, Set<Line> moves, int sides) {\n if (moves.size() >= width || sides > 3) return moves;\n else {\n Set<Square> squares = squaresWithMarkedSides(board, order[sides]);\n for (Square square : squares) {\n for (Line line : square.openLines()) {\n if (moves.size() < width)\n moves.add(line);\n }\n }\n return getPossibleMoves(board, moves, sides+1);\n }\n }" ]
[ "0.55488604", "0.5114626", "0.50688535", "0.497701", "0.49073744", "0.49026707", "0.487901", "0.4866929", "0.48275062", "0.48087528", "0.47811335", "0.477186", "0.47557408", "0.4721409", "0.46613544", "0.46447417", "0.46098852", "0.46017897", "0.45925364", "0.45816255", "0.4577392", "0.457706", "0.45765102", "0.45721436", "0.454946", "0.45467642", "0.45428333", "0.45404357", "0.45153624", "0.45060748", "0.44992578", "0.44971567", "0.4496403", "0.44900584", "0.44852158", "0.4480415", "0.44737616", "0.44645858", "0.44547173", "0.4443217", "0.44424638", "0.44346976", "0.440916", "0.44082007", "0.43942043", "0.43854737", "0.43832052", "0.43817088", "0.4380006", "0.43799376", "0.4378299", "0.43746853", "0.43742552", "0.4371932", "0.43615094", "0.4360788", "0.43593973", "0.43580797", "0.4356155", "0.43539578", "0.4353106", "0.43492776", "0.43464068", "0.43453005", "0.43434024", "0.43408394", "0.43320468", "0.43314907", "0.4323043", "0.43211502", "0.43184468", "0.43181768", "0.4317152", "0.43139395", "0.4310849", "0.43001688", "0.42996052", "0.42991737", "0.42990837", "0.42918795", "0.42872792", "0.4284776", "0.42720088", "0.4271788", "0.42686883", "0.42683917", "0.42671713", "0.4266812", "0.42652336", "0.42639026", "0.42635736", "0.42628142", "0.4261006", "0.42604592", "0.42591658", "0.42553607", "0.42538396", "0.42526686", "0.42420313", "0.42397043", "0.42395294" ]
0.0
-1
Method to perform a right rotation.
protected Node<E> rotateRight( Node<E> root ) { if( root == null || root.left == null ) { return null; } Node<E> tempNode = root.left; root.left = tempNode.right; tempNode.right = root; return tempNode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void rotateRight();", "public void rotateRight() {\n\t\tthis.direction = this.direction.rotateRight();\n\t}", "private void rotateRight() {\n robot.leftBack.setPower(TURN_POWER);\n robot.leftFront.setPower(TURN_POWER);\n robot.rightBack.setPower(-TURN_POWER);\n robot.rightFront.setPower(-TURN_POWER);\n }", "@Override\r\n\tpublic void rotateRight() {\n\t\tsetDirection((this.getDirection() + 1) % 4);\r\n\t}", "private void rotateRight() {\r\n\t switch(direction){\r\n\t case Constants.DIRECTION_NORTH:\r\n\t direction = Constants.DIRECTION_EAST;\r\n\t break;\r\n\t case Constants.DIRECTION_EAST:\r\n\t direction = Constants.DIRECTION_SOUTH;\r\n\t break;\r\n\t case Constants.DIRECTION_SOUTH:\r\n\t direction = Constants.DIRECTION_WEST;\r\n\t break;\r\n\t case Constants.DIRECTION_WEST:\r\n\t direction = Constants.DIRECTION_NORTH;\r\n\t break;\r\n\t }\r\n\t }", "@Override\r\n\tpublic void rotateRight() {\n\t\tfinal int THETA = 10;\r\n\t\tint dir = this.getDirection();\r\n\t\tthis.setDirection(dir + THETA);\r\n\t\t\r\n\t}", "public void rotateRight() {\n\t\tif (rotRight == null) {\n\t\t\tQuaternion quat = new Quaternion();\n\t\t\tquat.fromAngles(0f, (float) Math.toRadians(-90), 0f);\n\t\t\trotRight = quat.toRotationMatrix();\n\t\t}\n\n\t\tgetNode().getLocalRotation().apply(rotRight);\n\t}", "@Override\n\tpublic void rotateRight(int degrees) {\n\t\t\n\t}", "public void rotRight()\n\t{\n\t\t//only rotate if a PlayerShip is currently spawned\n\t\tif(gameObj[1].size() > 0)\n\t\t{\n\t\t\t((PlayerShip)gameObj[1].get(0)).moveRight();\n\t\t\tSystem.out.println(\"Heading -10 degrees\");\n\t\t}else {\n\t\t\tSystem.out.println(\"there is not currently a player ship spawned\");\n\t\t}\n\t}", "public MutableImage rotateRight() {\n return rotate(90);\n }", "private void right() {\n lastMovementOp = Op.RIGHT;\n rotate(TURNING_ANGLE);\n }", "public void rotateRight(int time) {\n\t\tdouble step = 3;\r\n\t\t\r\n\t\tif( rotation + step > 360 )\r\n\t\t\trotation = rotation + step - 360;\r\n\t\telse\r\n\t\t\trotation += step;\r\n\t}", "public void rotateRight (View view){\n\n if (toyRobotIsActive) {\n\n robot.animate().rotationBy(90f).setDuration(50); //turn toy robot LEFT\n\n rotateRight++; //counter to determine orientation\n System.out.println(\"rotateRight \" + rotateRight);\n System.out.println(\"rotateLeft + rotateRight = \"\n + orientation(rotateLeft, rotateRight));\n\n } else errorMessage(\"Please place toy robot\");\n }", "public void rotRight()\n\t{\n\t\t//only rotate if a PlayerShip is currently spawned\n\t\tIIterator iter = gameObj.getIterator();\n\t\twhile(iter.hasNext())\n\t\t{\n\t\t\tGameObject current = (GameObject)iter.getNext();\n\t\t\tif(current instanceof PlayerShip)\n\t\t\t{\n\t\t\t\t((PlayerShip)current).moveRight();\n\t\t\t\tSystem.out.println(\"Heading +20\");\n\t\t\t\tnotifyObservers();\n\t\t\t\treturn;\n\t\t\t}\t\n\t\t}\n\t\tSystem.out.println(\"There is no playerShip spawned\");\n\t}", "public abstract void rotate();", "public void rotateRight() {\n// tileLogic = getRotateRight();\n tileLogic = getRotateLeft();\n// rotateRightTex();\n rotateLeftTex();\n }", "public Shape rotateRight()\n\t{\n\t\tif (detailShape == Tetromino.SQUARE)\n\t\t{\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\tvar result = new Shape();\n\t\tresult.detailShape = detailShape;\n\t\t\n\t\tfor (int i=0; i<4; i++)\n\t\t{\n\t\t\tresult.setX(i, -y(i));\n\t\t\tresult.setY(i, x(i));\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public abstract void rotateLeft();", "void rotate();", "private Node rotateRight() {\n Node left = this.leftChild;\n this.leftChild = left.rightChild;\n left.rightChild = this;\n\n this.updateHeight();\n left.updateHeight();\n\n return left;\n }", "public void rotateRight(int numberOfTurns);", "protected void right() {\n move(positionX + 1, positionY);\n orientation = 0;\n }", "private void RLRotation(IAVLNode node)\r\n\t{\r\n\t\tLLRotation(node.getRight());\r\n\t\tRRRotation(node);\r\n\t}", "private void rightRotate(AVLNode<T> parent, AVLNode<T> node) {\n AVLNode<T> oldRight = parent.getRight();\n AVLNode<T> parDat = new AVLNode<>(parent.getData());\n parent.setRight(parDat);\n if (oldRight != null) {\n parent.getRight().setRight(oldRight);\n calcDeterminants(parent.getRight().getRight());\n }\n if (node.getRight() != null) {\n parent.getRight().setLeft(node.getRight());\n calcDeterminants(parent.getRight().getLeft());\n }\n parent.setData(node.getData());\n if (node.getLeft() != null) {\n parent.setLeft(node.getLeft());\n calcDeterminants(parent.getLeft());\n } else {\n parent.setLeft(null);\n calcDeterminants(parent.getRight());\n }\n }", "public void rotatePieceRight(){\r\n if (hasFalling()){\r\n FallingPiece test =falling.rotateRight();\r\n if (!moveIfNoConflict(test, falling))\r\n Kick(test, falling);\r\n if(isGhostActivated())\r\n \t\t\tgenerateGhost();\r\n }\r\n }", "public void turnRight()\r\n\t{\r\n\t\theading += 2; //JW\r\n\t\t//Following the camera\r\n\t\t//heading += Math.sin(Math.toRadians(15)); \r\n\t\t//heading += Math.cos(Math.toRadians(15));\r\n\t}", "private void rotateRight(Node tree) {\n assert tree != null;\n assert tree.left != null;\n\n Node temp = tree.left;\n tree.left = temp.right;\n if(temp.right != null) { //no null pointers\n temp.right.parent = tree;\n }\n temp.parent = tree.parent;\n if(temp.parent != null) { //am i at the root?\n if(temp.parent.left == tree) {\n temp.parent.left = temp;\n } else if (temp.parent.right == tree) {\n temp.parent.right = temp;\n }\n }\n tree.parent = temp;\n temp.right = tree;\n if(tree == root) { root = temp; } //rewrite the root\n rotations += 1;\n }", "public static void turnrightBy(double angle) {\n leftMotor.rotate(convertAngle(angle), true);\n rightMotor.rotate(-convertAngle(angle), false);\n }", "public abstract void rotar();", "public Node<T> rightRotate(Node<T> node){\n\n Node<T> temp = node.left;//pointer set to the nodes left child\n node.left = temp.right;//node.left set to the right child\n temp.right = node;//temp.right equal to the node that is rotating\n return temp;\n }", "public AVLNode rotateRight(AVLNode y) {\n AVLNode x = y.getLeft();\n AVLNode T2 = x.getRight();\n \n //rotation\n x.setRight(y);\n y.setLeft(T2);\n \n //update heights\n x.setHeight(Math.max(getHeight(x.getLeft()), getHeight(x.getRight())) + 1);\n y.setHeight(Math.max(getHeight(y.getLeft()), getHeight(y.getRight())) + 1);\n \n return x;\n }", "public void onRightPressed(){\n player.setRotation(player.getRotation()+3);\n\n }", "public static void waltz() {\n //test code written by bokun: self rotation\n leftMotor.setSpeed(ROTATE_SPEED);\n rightMotor.setSpeed(ROTATE_SPEED);\n leftMotor.forward();\n rightMotor.backward();\n }", "@Override\n public void turnRight(Double angle) {\n turnLeft(angle * -1);\n }", "private void rotate(int direction){\n\t\t//Gdx.app.debug(TAG, \"rotating, this.x: \" + this.x + \", this.y: \" + this.y);\n\t\tif (direction == 1 || direction == -1){\n\t\t\tthis.orientation = (this.orientation + (direction*-1) + 4) % 4;\n\t\t\t//this.orientation = (this.orientation + direction) % 4;\n\t\t} else{\n\t\t\tthrow new RuntimeException(\"Tile invalid direction\");\n\t\t}\n\t}", "public void turnRight() {\r\n setDirection( modulo( myDirection+1, 4 ) );\r\n }", "@Override\r\n\tpublic void rotate() {\n\t\t\r\n\t}", "Node rightRotate(Node y) \n { \n Node x = y.left; \n Node T2 = x.right; \n \n // Perform rotation \n x.right = y; \n y.left = T2; \n \n // Update heights \n y.height = max(height(y.left), height(y.right)) + 1; \n x.height = max(height(x.left), height(x.right)) + 1; \n \n // Return new root \n return x; \n }", "private AVLNode<T> rotateRight(AVLNode<T> node) {\n AVLNode<T> substiute = node.left;\n node.left = substiute.right;\n substiute.right = node;\n\n // node = substitute;\n\n return substiute;\n }", "public NodeRB rotateRight(NodeRB y) {\n NodeRB x = y.left;\r\n //System.out.println(\"[...] Left of the pivot: \" + x.value);\r\n NodeRB c = x.right;\r\n NodeRB p = fetchParentOf(y.value);\r\n //System.out.println(y.value + \" is now the right of \" + x.value);\r\n if (y == this.root){\r\n this.root = x;\r\n }\r\n x.right = y;\r\n y.left = c;\r\n if (p != null){\r\n //System.out.print(\"[....] The pivot has a parent \" + p.value + \". Setting \" + x.value + \" to its \");\r\n if (p.getRight() == y){\r\n //System.out.println(\"right.\");\r\n p.right = (x);\r\n }\r\n else{\r\n //System.out.println(\"left.\");\r\n p.left = (x);\r\n }\r\n }\r\n return x;\r\n }", "private void rightRotate(WAVLNode x) {\n\t WAVLNode a=x.left;\r\n\t WAVLNode b=x.right;\r\n\t WAVLNode y=x.parent;\r\n\t WAVLNode c=y.right;\r\n\t x.right=y;\r\n\t y.left=b;\r\n\t if (y.parent!=null) {\r\n\t\t WAVLNode d=y.parent;\r\n\t\t String side=parentside(d,y);\r\n\r\n\t\t if (side.equals(\"right\")) {\r\n\t\t\t d.right=x;\r\n\t\t\t x.parent=d;\r\n\t\t }\r\n\t\t else {\r\n\t\t\t d.left=x;\r\n\t\t\t x.parent=d;\r\n\t\t }\r\n\t }\r\n\t else {\r\n\t\t x.parent=null;\r\n\t\t this.root=x;\r\n\t }\r\n\t y.parent=x;\r\n\t b.parent=y;\r\n\t y.rank=y.rank-1;\r\n\t \r\n\t y.sizen=b.sizen+c.sizen+1;\r\n\t x.sizen=a.sizen+y.sizen+1;\r\n\t \r\n }", "public void rotateLeft (View view){ //onClick for LEFT Button\n\n if (toyRobotIsActive) {\n\n robot.animate().rotationBy(-90f).setDuration(50); //turn toy robot LEFT\n\n rotateLeft--; //counter to determine orientation\n System.out.println(\"rotateLeft \" + rotateLeft);\n System.out.println(\"rotateLeft + rotateRight = \"\n + orientation(rotateLeft, rotateRight)); //chk params in Logs\n\n } else errorMessage(\"Please place toy robot\");\n }", "public void rightRotate(RBNode<T, E> node) {\r\n\t\t// Keep Track of the root and the pivot and roots parent\r\n\t\tRBNode<T, E> root = node;\r\n\t\tRBNode<T, E> pivot = node.leftChild;\r\n\t\tRBNode<T, E> rParent = root.parent;\r\n\t\t// if the pivot is not null, then proceed to rotate\r\n\t\tif (pivot != nillLeaf) {\r\n\t\t\tif (rParent != nillLeaf) {\r\n\t\t\t\tif (root.uniqueKey.compareTo(rParent.uniqueKey) < 0) {\r\n\t\t\t\t\t// root must be to the left of the root's parent\r\n\t\t\t\t\troot.leftChild = pivot.rightChild;\r\n\t\t\t\t\tpivot.rightChild.parent = root;\r\n\t\t\t\t\tpivot.rightChild = root;\r\n\t\t\t\t\trParent.leftChild = pivot;\r\n\t\t\t\t\troot.parent = pivot;\r\n\t\t\t\t\tpivot.parent = rParent;\r\n\t\t\t\t\tthis.root = searchRoot(rParent);\r\n\r\n\t\t\t\t} else if (root.uniqueKey.compareTo(rParent.uniqueKey) > 0) {\r\n\t\t\t\t\t// root must be to the right of the root's parent\r\n\t\t\t\t\troot.leftChild = pivot.rightChild;\r\n\t\t\t\t\tpivot.rightChild.parent = root;\r\n\t\t\t\t\tpivot.rightChild = root;\r\n\t\t\t\t\trParent.rightChild = pivot;\r\n\t\t\t\t\troot.parent = pivot;\r\n\t\t\t\t\tpivot.parent = rParent;\r\n\t\t\t\t\tthis.root = searchRoot(rParent);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// else if root has no parent, then rotate with no parent\r\n\t\t\telse {\r\n\t\t\t\troot.leftChild = pivot.rightChild;\r\n\t\t\t\tpivot.rightChild.parent = root;\r\n\t\t\t\tpivot.leftChild = root;\r\n\t\t\t\troot.parent = pivot;\r\n\t\t\t\tthis.root = pivot;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "Node rightRotate(Node y) {\n Node x = y.left;\n Node T2 = x.right;\n\n // Perform rotation\n x.right = y;\n y.left = T2;\n\n // Update heights\n y.height = max(height(y.left), height(y.right)) + 1;\n x.height = max(height(x.left), height(x.right)) + 1;\n\n // Return new root\n return x;\n }", "private Node rightRotate(Node a) {\n Node b = a.getLeftChild();\n Node n3 = b.getRightChild();\n b.setRightChild(a);\n a.setLeftChild(n3);\n setHeights(a, b);\n return b;\n }", "void rightRotate(Node<K, V> y) {\n\t\tassert IsNotNil(y.getLeft());\n\t\tNode<K, V> x = y.getLeft();\n\n\t\t// B in postion\n\t\ty.setLeft(x.getRight());\n\n\t\t// X to root\n\t\tif (y == root) {\n\t\t\troot = x;\n\t\t} else if (y.isRightChild()) {\n\t\t\ty.getParent().setRight(x);\n\t\t} else if (y.isLeftChild()) {\n\t\t\ty.getParent().setLeft(x);\n\t\t}\n\n\t\t// y in position\n\t\tx.setRight(y);\n\t}", "private void LRRotation(IAVLNode node)\r\n\t{\r\n\r\n\t\tRRRotation(node.getLeft());\r\n\t\tLLRotation(node);\r\n\t}", "private NodeRB<K, V> rotateRight(NodeRB<K, V> x) {\n\t\tNodeRB<K, V> xParent = x.parent;\n\n\t\tNodeRB<K, V> y = x.left;\n\t\tx.left = y.right;\n\t\ty.right = x;\n\n\t\t// Parents relations fix\n\t\tif (xParent != null) {\n\t\t\tif (x.isLeftChild()) {\n\t\t\t\txParent.left = y;\n\t\t\t} else {\n\t\t\t\txParent.right = y;\n\t\t\t}\n\t\t}\n\t\tx.parent = y;\n\t\ty.parent = xParent;\n\t\tif (x.left != null) {\n\t\t\tx.left.parent = x;\n\t\t}\n\n\t\tx.height = 1 + Math.max(height(x.left), height(x.right));\n\t\ty.height = 1 + Math.max(height(y.left), height(y.right));\n\t\treturn y;\n\t}", "Node rightRotate(Node y) \n { \n Node x = y.left; \n Node T2 = x.right; \n\n // rotation \n x.right = y; \n y.left = T2; \n\n // heights \n y.height = Math.max(height(y.left), height(y.right)) + 1; \n x.height = Math.max(height(x.left), height(x.right)) + 1; \n\n // Return new root \n return x; \n }", "@Override\r\n\tpublic void rotar() {\n\r\n\t}", "public void RotateRight(double speed, int distance) {\n // Reset Encoders\n robot2.DriveRightFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot2.DriveLeftFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot2.DriveRightRear.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot2.DriveLeftRear.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n sleep(500);\n\n robot2.DriveRightFront.setTargetPosition(0);\n robot2.DriveRightRear.setTargetPosition(0);\n robot2.DriveLeftFront.setTargetPosition(0);\n robot2.DriveLeftRear.setTargetPosition(0);\n\n // Set RUN_TO_POSITION\n\n robot2.DriveRightFront.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot2.DriveLeftFront.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot2.DriveRightRear.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot2.DriveLeftRear.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n // Set Motor Power to 0\n robot2.DriveRightFront.setPower(0);\n robot2.DriveRightRear.setPower(0);\n robot2.DriveLeftFront.setPower(0);\n robot2.DriveLeftRear.setPower(0);\n\n\n double InchesMoving = (distance * COUNTS_PER_INCH);\n\n // Set Target to RotateRight\n robot2.DriveRightFront.setTargetPosition((int) -InchesMoving);\n robot2.DriveRightRear.setTargetPosition((int) -InchesMoving);\n robot2.DriveLeftRear.setTargetPosition((int) InchesMoving);\n robot2.DriveLeftFront.setTargetPosition((int) InchesMoving);\n\n while (robot2.DriveRightFront.isBusy() && robot2.DriveRightRear.isBusy() && robot2.DriveLeftRear.isBusy() && robot2.DriveLeftFront.isBusy()) {\n\n // wait for robot to move to RUN_TO_POSITION setting\n\n double MoveSpeed = speed;\n\n // Set Motor Power\n robot2.DriveRightFront.setPower(MoveSpeed);\n robot2.DriveRightRear.setPower(MoveSpeed);\n robot2.DriveLeftFront.setPower(MoveSpeed);\n robot2.DriveLeftRear.setPower(MoveSpeed);\n\n } // THis brace close out the while Loop\n\n //Reset Encoders\n robot2.DriveRightFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot2.DriveLeftFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot2.DriveRightRear.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot2.DriveLeftRear.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n\n\n robot2.DriveRightFront.setPower(0);\n robot2.DriveRightRear.setPower(0);\n robot2.DriveLeftFront.setPower(0);\n robot2.DriveLeftRear.setPower(0);\n }", "public void rotate() {\n // amoeba rotate\n // Here i will use my rotation_x and rotation_y\n }", "public static void turnRight() {\n LEFT_MOTOR.forward();\n RIGHT_MOTOR.backward();\n }", "public FallingPiece rotateRight(){\r\n return new FallingPiece(coord, innerPiece.rotateRight());\r\n }", "static void rotate_right(int[] arr, int rotate){\n for (int j = 0; j < rotate; j++) {\n int temp = arr[j];\n for (int i = j; i < arr.length+rotate; i+=rotate) {\n if(i-rotate < 0)\n temp = arr[i];\n else if(i >= arr.length)\n arr[i-rotate] = temp;\n else\n arr[i-rotate] = arr[i]; \n }\n }\n }", "public void rotate180 (View view){\n\n if (toyRobotIsActive) {\n\n robot.animate().rotationBy(180f).setDuration(50); //turn toy robot AROUND (180')\n\n rotateRight += 2; //counter to determine orientation\n System.out.println(\"rotateRight \" + rotateRight);\n System.out.println(\"rotateLeft + rotateRight = \"\n + orientation(rotateLeft, rotateRight));\n\n } else errorMessage(\"Please place toy robot\");\n }", "private void RRRotation(IAVLNode node)\r\n\t{\r\n\t\tIAVLNode parent = node.getParent(); \r\n\t\tIAVLNode rightChild = node.getRight() ; \r\n\t\tIAVLNode leftGrandChild = node.getRight().getLeft(); \r\n\t\t\r\n\t\tif(node != root) \r\n\t\t{\r\n\t\t\tif(node == parent.getLeft())\r\n\t\t\t\tparent.setLeft(rightChild);\r\n\t\t\telse \r\n\t\t\t\tparent.setRight(rightChild);\r\n\t\t}\r\n\t\t\r\n\t\tnode.setRight(leftGrandChild); //leftGrandChild is now node's right child\r\n\t\tleftGrandChild.setParent(node); //node is now leftGrandChild's parent\r\n\t\trightChild.setLeft(node); // node is now rightChild's left child\r\n\t\tnode.setParent(rightChild); // node's parent is now leftChild\r\n\t\trightChild.setParent(parent); // leftChild's parent is now node's old parent\r\n\t\t\r\n\t\t//updating sizes and heights\r\n\t\tnode.setSize(sizeCalc(node)); // updating node's size\r\n\t\trightChild.setSize(sizeCalc(rightChild)); //updating rightChild's size\r\n\t\trightChild.setHeight(HeightCalc(rightChild)); // updating rightChild's height\r\n\t\tnode.setHeight(HeightCalc(node)); // updating node's height\r\n\t\t\r\n\t\tif (node == root) \r\n\t\t\tthis.root = rightChild;\r\n\t}", "public void rightRotate(SplayNode x) {\n\t\t\t SplayNode y = x.left;\n\t\t x.left = y.right;\n\t\t if(y.right != null) {\n\t\t y.right.parent = x;\n\t\t }\n\t\t y.parent = x.parent;\n\t\t if(x.parent == null) { //x is root\n\t\t this.root = y;\n\t\t }\n\t\t else if(x == x.parent.right) { //x is left child\n\t\t x.parent.right = y;\n\t\t }\n\t\t else { //x is right child\n\t\t x.parent.left = y;\n\t\t }\n\t\t y.right = x;\n\t\t x.parent = y;\n\t\t }", "@Override\n\tpublic void rotate() {\n\t}", "public void turnRight() {\n\t\tthis.setSteeringDirection(getSteeringDirection()+5);\n\t}", "private RedBlackNode rotationWithRightChild(RedBlackNode node1) \n { \n RedBlackNode node2 = node1.rightChild; \n node1.rightChild = node2.leftChild; \n node2.leftChild = node1.leftChild; \n return node2; \n }", "private long rightRotate(long n) throws IOException {\n Node current = new Node(n);\r\n long currentLeft = current.left;\r\n Node tempN = new Node(current.left);\r\n current.left = tempN.right;\r\n tempN.right = n;\r\n current.height = getHeight(current);\r\n current.writeNode(n);\r\n tempN.height = getHeight(tempN);\r\n tempN.writeNode(currentLeft);\r\n return currentLeft;\r\n }", "public double getRotation();", "public static TreapNode rightRotate(TreapNode y)\n {\n TreapNode x = y.left, T2 = x.right;\n\n // Perform rotation\n x.right = y;\n y.left = T2;\n\n // Return new root\n return x;\n }", "public void right90 () {\n saveHeading = 0; //modernRoboticsI2cGyro.getHeading();\n gyroTurn(TURN_SPEED, saveHeading - 90);\n gyroHold(HOLD_SPEED, saveHeading - 90, 0.5);\n }", "public void rightRotate(Node<E> y){\n \t\n /*\n If y is the root of the tree to rotate with right child subtree T3 and left child x, \n where T1 and T2 are the left and right children of x:\n y becomes right child of x and T1 as its left child of x\n T2 becomes left child of y and T3 becomes right child of y\n */\n \tNode<E> x = y.getLeftChild(); //set x \n\t\ty.setLeftChild(x.getRightChild()); //turn x's right subtree into y's left subtree\n\t\tx.getRightChild().setParent(y);\n\t\tx.setParent(y.getParent()); ////link y's parent to x\n\t\tif (y.getParent() == sentinel || y.getParent() == null) {\n\t\t\troot = x;\n\t\t} else if (y == y.getParent().getLeftChild()) { \n\t\t\ty.getParent().setLeftChild(x);\n\t\t} else {\n\t\t\ty.getParent().setRightChild(x);\n\t\t}\n\t\tx.setRightChild(y); //put x on y's left\n\t\ty.setParent(x);\n }", "public void rotateRight(Node node){\n\t\tNode ptrLeft = node.left;\n\t\tnode.left = ptrLeft.right;\n\t\t\n\t\tif(ptrLeft.right != nil){\n\t\t\tptrLeft.right.parent = node;\n\t\t}\n\t\t\n\t\tptrLeft.parent = node.parent;\n\t\t\n\t\tif(ptrLeft.parent==nil){\n\t\t\troot = ptrLeft;\n\t\t}else if(node == node.parent.left){\n\t\t\tnode.parent.left = ptrLeft;\n\t\t}else{\n\t\t\tnode.parent.right = ptrLeft;\n\t\t}\n\t\t\n\t\tptrLeft.right = node;\n\t\tnode.parent = ptrLeft;\n\t}", "Node rightRotate(Node x)\n\t{\n\t\tNode y=x.left;\n\t\tNode T2=y.right;\n\t\t\n\t\t//rotate\n\t\t\n\t\ty.right=x;\n\t\tx.left=T2;\n\t\t\n\t\t//update heights\n\t\ty.height=max(height(y.left),height(y.left) +1 ) ;\n\t\tx.height=max(height(x.left),height(x.left) +1 ) ;\n\t\t\n\t\t// new root\n\t\treturn y;\n\t}", "public static int rotateRight(int dir) {\n return (dir - 1) & 3;\n }", "private void applyRightTurn(WorldSpatial.Direction orientation, float delta) {\n\t\tswitch(orientation){\n\t\tcase EAST:\n\t\t\tif(!getOrientation().equals(WorldSpatial.Direction.SOUTH)){\n\t\t\t\tturnRight(delta);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase NORTH:\n\t\t\tif(!getOrientation().equals(WorldSpatial.Direction.EAST)){\n\t\t\t\tturnRight(delta);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SOUTH:\n\t\t\tif(!getOrientation().equals(WorldSpatial.Direction.WEST)){\n\t\t\t\tturnRight(delta);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase WEST:\n\t\t\tif(!getOrientation().equals(WorldSpatial.Direction.NORTH)){\n\t\t\t\tturnRight(delta);\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t\n\t\t}\n\t\t\n\t}", "protected Node<E> rotateRight(Node<E> root) {\r\n\t\tNode<E> temp = root.left;\r\n\t\troot.left = temp.right;\r\n\t\ttemp.right = root;\r\n\t\treturn temp;\r\n\t}", "private void rotate() {\n byte tmp = topEdge;\n topEdge = leftEdge;\n leftEdge = botEdge;\n botEdge = rightEdge;\n rightEdge = tmp;\n tmp = reversedTopEdge;\n reversedTopEdge = reversedLeftEdge;\n reversedLeftEdge = reversedBotEdge;\n reversedBotEdge = reversedRightEdge;\n reversedRightEdge = tmp;\n tmp = ltCorner;\n ltCorner = lbCorner;\n lbCorner = rbCorner;\n rbCorner = rtCorner;\n rtCorner = tmp;\n\n }", "@Override\r\n\tpublic void rotateLeft() {\n\t\tsetDirection((this.getDirection() + 3) % 4);\r\n\t}", "private Node rotateright(Node y) {\n Node x = y.left;\n Node z = x.right;\n\n // Perform rotation\n x.right = y;\n y.left = z;\n\n // updating the heights for y and x\n y.height = max(height(y.left), height(y.right)) + 1;\n x.height = max(height(x.left), height(x.right)) + 1;\n\n return x;\n }", "private void singleRotateRight(Node n) {\n Node l = n.mLeft, lr = l.mRight, p = n.mParent;\n n.mLeft = lr;\n lr.mParent = n;\n l.mRight = n;\n if (n == mRoot) {\n mRoot = l;\n l.mParent = null;\n }\n else if (p.mLeft == n) {\n p.mLeft = l;\n l.mParent = p;\n }\n else {\n p.mRight = l;\n l.mParent = p;\n }\n n.mParent = l;\n }", "private BTNode<T> rotateRight(BTNode<T> p){\n\t\tBTNode<T> q = p.getLeft();\n\t\tp.setLeft(q.getRight());\n\t\tq.setRight(p);\n\t\tfixHeight(p);\n\t\tfixHeight(q);\n\t\treturn q;\n\t}", "public void zRotate() {\n\t\t\n\t}", "@Override\n \t\t\t\tpublic void doRotateY() {\n \n \t\t\t\t}", "@Override\n\tpublic void rotateRight(int numberOfTurns) {\n\t\tint[] array = numbers();\n\t\t//converts the array into a new Squarelotron\n\t\tSquarelotron copySquarelotron = makeSquarelotron(array);\n\t\tint[][] arrayCopy = copySquarelotron.squarelotron;\n\t\tfor(int i = 0; i <=size-1; i++){\n\t\t\tfor(int j = 0; j<=size-1; j++){\n\t\t\t\t//checks for each rotation to account for repeats and negatives and rotates accordingly\n\t\t\t\tif((numberOfTurns-1)%4==0){\n\t\t\t\t\tarrayCopy[i][j]=this.squarelotron[size-j-1][i];\n\t\t\t\t}\n\t\t\t\telse if((numberOfTurns-2)%4==0){\n\t\t\t\t\tarrayCopy[i][j]=this.squarelotron[size-i-1][size-j-1];\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if((numberOfTurns-3)%4==0){\n\t\t\t\t\tarrayCopy[i][j]=this.squarelotron[j][size-i-1];\t\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\tthis.squarelotron = arrayCopy;\n\t}", "public void rotLauncherRight()\n\t{\n\t\tIIterator iter = gameObj.getIterator();\n\t\twhile(iter.hasNext())\n\t\t{\n\t\t\tGameObject current = (GameObject)iter.getNext();\n\t\t\tif(current instanceof PlayerShip)\n\t\t\t{\n\t\t\t\t((PlayerShip)current).moveLauncherRight();\n\t\t\t\tSystem.out.println(\"launcher heading -20\");\n\t\t\t\tnotifyObservers();\n\t\t\t\treturn;\n\t\t\t}\t\n\t\t}\n\t\tSystem.out.println(\"There is no playerShip spawned\");\n\t}", "public void rotateShip(){\n if (this.orientation == false){\n this.orientation = true;\n }else\n orientation = false;\n \n return;\n }", "public void rightRotate(Node n) {\r\n\t\tNode y = n.left;\r\n\t\tn.left = y.right;\r\n\t\tif(!y.right.isNil)\r\n\t\t\ty.right.parent = n;\r\n\t\ty.parent = n.parent;\r\n\t\tif(n.parent.isNil)\r\n\t\t\troot = y;\r\n\t\telse if(n == n.parent.right)\r\n\t\t\tn.parent.right = y;\r\n\t\telse\r\n\t\t\tn.parent.left = y;\r\n\t\ty.right = n;\r\n\t\tn.parent = y;\r\n\t}", "private void rightRotate(RedBlackNode<T> y){\n rightRotateFixup(y);\n\n RedBlackNode<T> x = y.left;\n y.left = x.right;\n\n // Czy istnieje x.right\n if (!isNil(x.right))\n x.right.parent = y;\n x.parent = y.parent;\n\n // y.parent jest nil\n if (isNil(y.parent))\n root = x;\n\n // y jest prawym dzieckiem swojego rodzica\n else if (y.parent.right == y)\n y.parent.right = x;\n\n // y jest lewym dzieckiem swojego rodzica\n else\n y.parent.left = x;\n x.right = y;\n\n y.parent = x;\n\n }", "void setRotation (DMatrix3C R);", "public Node<T> rightLeftRotate(Node<T> node){\n\n node.right = rightRotate(node.right);//rotate the parent to the right\n return leftRotate(node);// rotate the grandparent to the left\n }", "private AVLNode<T, U> rotateRight(AVLNode<T, U> oldRoot) {\n\t\tAVLNode<T, U> newRoot = oldRoot.getLeft();\n\t\t\n\t\tnewRoot.setParent(oldRoot.getParent());\n\t\toldRoot.setLeft(newRoot.getRight());\n\t\t\t \n\t\tif(oldRoot.getLeft() != null) {\n\t\t\toldRoot.getLeft().setParent(oldRoot);\n\t\t}\n\t\t\n\t\tnewRoot.setRight(oldRoot);\n\t\toldRoot.setParent(newRoot);\n\t\t\n\t\tif(newRoot.getParent() != null){\n\t\t\tif(newRoot.getParent().getRight() == oldRoot){\n\t\t\t\tnewRoot.getParent().setRight(newRoot);\n\t\t\t}else if(newRoot.getParent().getLeft() == oldRoot){\n\t\t\t\tnewRoot.getParent().setLeft(newRoot);\n\t\t\t}\n\t\t}\n\t\t\n\t\tcomputeHeightsToRoot(oldRoot);\n\t\treturn newRoot;\n\t}", "public void right(){\n\t\tmoveX=1;\n\t\tmoveY=0;\n\t}", "@Override\n \t\t\t\tpublic void doRotateX() {\n \n \t\t\t\t}", "public AVLNode rotateRight(AVLNode pt) {\n\t\tAVLNode node = pt.getLeft();\n\t\t\n\t\tpt.setLeft(node.getRight());\n\t\tnode.setRight(pt);\n\t\t\n\t\treturn node;\n\t}", "public void xRotate() {\n\t\t\n\t}", "private RedBlackNode rotateRight(RedBlackNode x){\n\t RedBlackNode xParent = x.parent;\n\t RedBlackNode BSubTree = x.left.right;\n\t RedBlackNode y = x.left;\n\t y.right = x;\n\t x.parent = y;\n\t x.left = BSubTree;\n\t //Need to anlayse whether Nil check need to have or Not\n\t BSubTree.parent = x;\n\t if( xParent == this.Nil){\n\t\t this.root = y;\n\t }else if(xParent.left == x){\n\t\t xParent.left = y;\n\t }else{\n\t\t xParent.right = y;\n\t }\n\t y.parent = xParent;\n\t return y;\n }", "private Node<T> rotateWithRight(Node<T> a) {\n Node<T> b = a.getRight();\n a.setRight(b.getLeft());\n b.setLeft(a);\n int aH = Math.max(findHeight(a.getLeft()),\n findHeight(a.getRight())) + 1;\n a.setHeight(aH);\n int bH = Math.max(findHeight(b.getRight()), aH) + 1;\n b.setHeight(bH);\n hAndBF(a);\n hAndBF(b);\n return b;\n }", "private AVLNode<T, U> doubleRotateRightLeft(AVLNode<T, U> node) {\n\t\t node.setRight(rotateRight(node.getRight()));\n\t\t return rotateLeft(node);\n\t}", "public Node rotateRight(Node n)\r\n\t{\r\n\t\tNode target = n.left;//rotate target to node\r\n\t\tNode subTree = target.right;//get its subtree\r\n\t\t\r\n\t\ttarget.right = n; //set targets old sub tree to nodes sub tree\r\n\t\tn.left =subTree;// set old sub tree to nodes subtree\r\n\t\t\r\n\t\t//increment the height of the tree\r\n\t\tn.height = maxHeight(height(n.left),height(n.right))+1;\r\n\t\ttarget.height = maxHeight(height(target.left),height(target.right))+1;\r\n\t\t\r\n\t\treturn target;\r\n\t}", "public abstract boolean facingRight();", "private void rightRotate(RBNode<T> y) {\r\n\r\n //node y must have leftChild\r\n RBNode<T> x = y.left;\r\n //1. deal with x's rightChild, move it to y's leftChild:\r\n // update y's leftChild as x's rightChild,\r\n y.left = x.right;\r\n\r\n //update x.right.parent as y (only x.right is not null)\r\n if(x.right != null)\r\n x.right.parent = y;\r\n\r\n //2. deal with parent of y, move x to y's position\r\n // update x's parent as y's parent\r\n x.parent = y.parent;\r\n // if y.parent = null, set root = x\r\n if(y.parent == null) {\r\n this.root = x;\r\n } else {\r\n //if y is rightChild of parent, update x as parent's rightChild\r\n if(y == y.parent.right)\r\n y.parent.right = x;\r\n else//if y is leftChild of parent, update x as parent's leftChild\r\n y.parent.left = x;\r\n }\r\n\r\n //3. update x.right as y, update y.parent as x\r\n x.right = y;\r\n y.parent = x;\r\n }", "public boolean[][] getRotateRight() {\n boolean[][] out = new boolean[size][size];\n for(int y = 0; y < size; y++)\n for(int x = 0; x < size; x++)\n out[x][y] = tileLogic[y][size - x - 1];\n return out;\n }", "@Override\n \t\t\t\tpublic void doRotateZ() {\n \n \t\t\t\t}", "LocalMaterialData rotate();", "@Override\r\n\tpublic void rotateLeft() {\n\t\tfinal int THETA = 10;\r\n\t\tint dir = this.getDirection();\r\n\t\tthis.setDirection(dir - THETA);\r\n\t\t\r\n\t}" ]
[ "0.85323465", "0.8022073", "0.8002977", "0.7919244", "0.78972703", "0.7891573", "0.7865101", "0.77358156", "0.76433384", "0.7575767", "0.74907935", "0.74845773", "0.74669814", "0.73579407", "0.7330528", "0.7262364", "0.7216286", "0.72060513", "0.7202097", "0.7130842", "0.7117322", "0.7087817", "0.7036081", "0.69792324", "0.6941399", "0.6869208", "0.68597287", "0.68375695", "0.682693", "0.6822169", "0.6794081", "0.678954", "0.6701562", "0.6683797", "0.66701347", "0.66699326", "0.6668954", "0.6667143", "0.66522014", "0.6638041", "0.65977967", "0.65867704", "0.6585951", "0.6582173", "0.6577141", "0.6576424", "0.65757024", "0.6560596", "0.65427667", "0.65419173", "0.65397304", "0.65388995", "0.6519044", "0.6499011", "0.6496435", "0.6492558", "0.6488614", "0.64727205", "0.6471889", "0.64662015", "0.6449151", "0.6447225", "0.6422448", "0.6413054", "0.6385285", "0.63797736", "0.63755035", "0.63711745", "0.6364435", "0.6355979", "0.63524085", "0.6351826", "0.6329157", "0.63246864", "0.6318315", "0.63103086", "0.63103", "0.6305812", "0.62795967", "0.6279068", "0.6266166", "0.6250364", "0.6242701", "0.62424755", "0.62317157", "0.622663", "0.6225131", "0.6224327", "0.62104285", "0.6204747", "0.61899704", "0.61810565", "0.6178132", "0.61696565", "0.6165791", "0.6147849", "0.61418235", "0.6141283", "0.613993", "0.61341286" ]
0.6138661
99
Method to perform a left rotation.
protected Node<E> rotateLeft( Node<E> root ) { if( root == null || root.right == null) { return null; } Node<E> tempNode = root.right; root.right = tempNode.left; tempNode.left = root; return tempNode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void rotateLeft();", "public void rotateLeft() {\n\t\tthis.direction = this.direction.rotateLeft();\n\t}", "public void rotateLeft() {\n\t\tif (rotLeft == null) {\n\t\t\tQuaternion quat = new Quaternion();\n\t\t\tquat.fromAngles(0f, (float) Math.toRadians(90), 0f);\n\t\t\trotLeft = quat.toRotationMatrix();\n\t\t}\n\n\t\tgetNode().getLocalRotation().apply(rotLeft);\n\t}", "@Override\r\n\tpublic void rotateLeft() {\n\t\tfinal int THETA = 10;\r\n\t\tint dir = this.getDirection();\r\n\t\tthis.setDirection(dir - THETA);\r\n\t\t\r\n\t}", "private void rotateLeft() {\n robot.leftBack.setPower(-TURN_POWER);\n robot.leftFront.setPower(-TURN_POWER);\n robot.rightBack.setPower(TURN_POWER);\n robot.rightFront.setPower(TURN_POWER);\n }", "@Override\r\n\tpublic void rotateLeft() {\n\t\tsetDirection((this.getDirection() + 3) % 4);\r\n\t}", "@Override\n\tpublic void rotateLeft(int degrees) {\n\t\t\n\t}", "public void rotateLeft() {\n // I fucked up? Rotations are reversed, just gonna switch em\n// tileLogic = getRotateLeft();\n tileLogic = getRotateRight();\n// rotateLeftTex();\n rotateRightTex();\n }", "public MutableImage rotateLeft() {\n return rotate(-90);\n }", "public void rotLeft()\n\t{\n\t\t//only rotate if a PlayerShip is currently spawned\n\t\tif(gameObj[1].size() > 0)\n\t\t{\n\t\t\t((PlayerShip)gameObj[1].get(0)).moveLeft();\n\t\t\tSystem.out.println(\"Heading +10 degrees\");\n\t\t}else {\n\t\t\tSystem.out.println(\"there is not currently a player ship spawned\");\n\t\t}\n\t}", "public void rotateLeft(int time) {\n\t\tdouble step = 3;\r\n\t\t\r\n\t\tif( rotation - step < 0 )\r\n\t\t\trotation = rotation - step + 360;\r\n\t\telse\r\n\t\t\trotation -= step;\r\n\t\t\t\r\n\t}", "public void rotateLeft (View view){ //onClick for LEFT Button\n\n if (toyRobotIsActive) {\n\n robot.animate().rotationBy(-90f).setDuration(50); //turn toy robot LEFT\n\n rotateLeft--; //counter to determine orientation\n System.out.println(\"rotateLeft \" + rotateLeft);\n System.out.println(\"rotateLeft + rotateRight = \"\n + orientation(rotateLeft, rotateRight)); //chk params in Logs\n\n } else errorMessage(\"Please place toy robot\");\n }", "public void rotLeft()\n\t{\n\t\t//only rotate if a PlayerShip is currently spawned\n\t\tIIterator iter = gameObj.getIterator();\n\t\twhile(iter.hasNext ())\n\t\t{\n\t\t\tGameObject current = (GameObject)iter.getNext();\n\t\t\tif(current instanceof PlayerShip)\n\t\t\t{\n\t\t\t\t((PlayerShip)current).moveLeft();\n\t\t\t\tSystem.out.println(\"Heading -20\");\n\t\t\t\tnotifyObservers();\n\t\t\t\treturn;\n\t\t\t}\t\n\t\t}\n\t\tSystem.out.println(\"There is no playerShip spawned\");\n\t}", "private Node rotateLeft() {\n Node right = this.rightChild;\n this.rightChild = right.leftChild;\n right.leftChild = this;\n\n this.updateHeight();\n right.updateHeight();\n\n return right;\n }", "public static void turnleftBy(double angle) {\n leftMotor.rotate(-convertAngle(angle), true);\n rightMotor.rotate(convertAngle(angle), false);\n }", "public Shape rotateLeft() \n\t{\n\t\tif (detailShape == Tetromino.SQUARE)\n\t\t{\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\tvar result = new Shape();\n\t\tresult.detailShape = detailShape;\n\t\t\n\t\tfor (int i=0; i<4; i++)\n\t\t{\n\t\t\tresult.setX(i, y(i));\n\t\t\tresult.setY(i, -x(i));\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "private void leftRotate(AVLNode<T> parent, AVLNode<T> node) {\n AVLNode<T> oldLeft = parent.getLeft();\n AVLNode<T> parDat = new AVLNode<>(parent.getData());\n parent.setLeft(parDat);\n if (oldLeft != null) {\n parent.getLeft().setLeft(oldLeft);\n calcDeterminants(parent.getLeft().getLeft());\n }\n if (node.getLeft() != null) {\n parent.getLeft().setRight(node.getLeft());\n calcDeterminants(parent.getLeft().getRight());\n }\n parent.setData(node.getData());\n if (node.getRight() != null) {\n parent.setRight(node.getRight());\n calcDeterminants(parent.getRight());\n } else {\n parent.setRight(null);\n calcDeterminants(parent.getLeft());\n }\n }", "public Node<T> leftRotate(Node<T> node){\n\n Node<T> temp = node.right;//a temporary pointer set to the node's right child\n node.right = temp.left;// the node right child set to the left child\n temp.left = node;//temporary pointer left child set to the node who is rotating\n return temp;\n }", "private void leftRotate(WAVLNode y) {\n\t WAVLNode x=y.parent;\r\n\t WAVLNode a=x.left;\r\n\t WAVLNode b=y.left;\r\n\t WAVLNode c = y.right;\r\n\t y.left=x;\r\n\t x.right=b;\r\n\t \r\n\t if (x.parent!=null) {\r\n\t\t WAVLNode d=x.parent;\r\n\t\t String side=parentside(d,x);\r\n\r\n\t\t if (side.equals(\"right\")) {\r\n\t\t\t d.right=y;\r\n\t\t\t y.parent=d;\r\n\t\t }\r\n\t\t else {\r\n\t\t\t d.left=y;\r\n\t\t\t y.parent=d;\r\n\t\t }\r\n\t }\r\n\t else {\r\n\t\t y.parent=null;\r\n\t\t this.root=y;\r\n\t }\r\n\t x.parent=y;\r\n\t b.parent=x;\r\n\t x.rank=x.rank-1;\r\n\t x.sizen=a.sizen+b.sizen+1;\r\n\t y.sizen=x.sizen+c.sizen+1;\r\n\t \r\n }", "private AVLNode<T> rotateLeft(AVLNode<T> node) {\n AVLNode<T> substitute = node.right;\n // donde ponemos los hijos a la izquierda del substituto\n node.right = substitute.left;\n substitute.left = node;\n\n return substitute;\n }", "public Node rotateleft(Node x) {\n Node y = x.right;\n Node z = y.left;\n\n // Perform rotation\n y.left = x;\n x.right = z;\n\n // Update heights\n x.height = max(height(x.left), height(x.right)) + 1;\n y.height = max(height(y.left), height(y.right)) + 1;\n\n return y;\n }", "public abstract void rotateRight();", "public AVLNode rotateLeft(AVLNode x) {\n AVLNode y = x.getRight();\n AVLNode T2 = y.getLeft();\n \n //rotation\n y.setLeft(x);\n x.setRight(T2);\n \n //update heights\n x.setHeight(Math.max(getHeight(x.getLeft()), getHeight(x.getRight())) + 1);\n y.setHeight(Math.max(getHeight(y.getLeft()), getHeight(y.getRight())) + 1);\n \n return y;\n }", "public void rotatePieceLeft(){\r\n if (hasFalling()){\r\n FallingPiece test = falling.rotateLeft();\r\n if (!moveIfNoConflict(test, falling))\r\n Kick(test, falling);\r\n if(isGhostActivated())\r\n \t\t\tgenerateGhost();\r\n }\r\n }", "void rotate();", "public void turnLeft() {\r\n setDirection( modulo( myDirection-1, 4 ) );\r\n }", "public void onLeftPressed(){\n player.setRotation(player.getRotation()-3);\n\n }", "public void leftRotate(SplayNode x) {\n\t\t\t SplayNode y = x.right;\n\t\t x.right = y.left;\n\t\t if(y.left != null) {\n\t\t y.left.parent = x;\n\t\t }\n\t\t y.parent = x.parent;\n\t\t if(x.parent == null) { //x is root\n\t\t this.root = y;\n\t\t }\n\t\t else if(x == x.parent.left) { //x is left child\n\t\t x.parent.left = y;\n\t\t }\n\t\t else { //x is right child\n\t\t x.parent.right = y;\n\t\t }\n\t\t y.left = x;\n\t\t x.parent = y;\n\t\t }", "public void rotateLeft(Node node){\n\t\tNode ptrRight = node.right;\n\t\tnode.right = ptrRight.left;\n\t\t\n\t\tif(ptrRight.left != nil){\n\t\t\tptrRight.left.parent = node;\n\t\t}\n\t\tptrRight.parent = node.parent;\n\t\t\n\t\tif(node.parent==nil){\n\t\t\troot = ptrRight;\n\t\t}else if( node == node.parent.left){\n\t\t\tnode.parent.left = ptrRight;\n\t\t}else{\n\t\t\tnode.parent.right = ptrRight;\n\t\t}\n\t\t\n\t\tptrRight.left = node;\n\t\tnode.parent = ptrRight;\n\t}", "public static void turnLeft() {\n LEFT_MOTOR.backward();\n RIGHT_MOTOR.forward();\n }", "Node leftRotate(Node x) \n { \n Node y = x.right; \n Node T2 = y.left; \n\n // Perform rotation \n y.left = x; \n x.right = T2; \n\n // Update heights \n x.height = Math.max(height(x.left), height(x.right)) + 1; \n y.height = Math.max(height(y.left), height(y.right)) + 1; \n\n // Return new root \n return y; \n }", "protected void left() {\n move(positionX - 1, positionY);\n orientation = BattleGrid.RIGHT_ANGLE * 2;\n }", "public Node<T> rightLeftRotate(Node<T> node){\n\n node.right = rightRotate(node.right);//rotate the parent to the right\n return leftRotate(node);// rotate the grandparent to the left\n }", "public Node<T> leftRightRotate(Node<T> node){\n\n node.left = leftRotate(node.left);//rotate the parent to the left\n return leftRotate(node);// rotate the grandparent to the right\n }", "void leftRotate(Node<K, V> x) {\n\t\tassert IsNotNil(x.getRight());\n\t\tNode<K, V> y = x.getRight();\n\n\t\t// B in position\n\t\tx.setRight(y.getLeft());\n\n\t\t// Y to root\n\t\tif (x == root) {\n\t\t\troot = y;\n\t\t} else if (x.isLeftChild()) {\n\t\t\tx.getParent().setLeft(y);\n\t\t} else if (x.isRightChild()) {\n\t\t\tx.getParent().setRight(y);\n\t\t}\n\n\t\t// x in position\n\t\ty.setLeft(x);\n\t}", "Node leftRotate(Node x) {\n Node y = x.right;\n Node T2 = y.left;\n\n // Perform rotation\n y.left = x;\n x.right = T2;\n\n // Update heights\n x.height = max(height(x.left), height(x.right)) + 1;\n y.height = max(height(y.left), height(y.right)) + 1;\n\n // Return new root\n return y;\n }", "public AVLNode rotateLeft(AVLNode pt) {\n\t\tAVLNode node = pt.getRight();\n\t\t\n\t\tpt.setRight(node.getLeft());\n\t\tnode.setLeft(pt);\n\t\t\n\t\treturn node;\n\t}", "public abstract void rotate();", "public void leftRotate(RBNode<T, E> node) {\r\n\t\t// Keep Track of the root and the pivot and roots parent\r\n\t\tRBNode<T, E> root = node;\r\n\t\tRBNode<T, E> pivot = node.rightChild;\r\n\t\tRBNode<T, E> rParent = root.parent;\r\n\t\t// If pivot is not null, then proceed to rotate\r\n\t\tif (pivot != nillLeaf) {\r\n\t\t\t// do this if root has a parent\r\n\t\t\tif (rParent != nillLeaf) {\r\n\t\t\t\t// if root is going left to the root's parent, then set pivot to\r\n\t\t\t\t// left of the root.\r\n\t\t\t\tif (root.uniqueKey.compareTo(rParent.uniqueKey) < 0) {\r\n\t\t\t\t\t// root must be on the left of parent\r\n\t\t\t\t\troot.rightChild = pivot.leftChild;\r\n\t\t\t\t\tpivot.leftChild.parent = root;\r\n\t\t\t\t\tpivot.leftChild = root;\r\n\t\t\t\t\trParent.leftChild = pivot;\r\n\t\t\t\t\troot.parent = pivot;\r\n\t\t\t\t\tpivot.parent = rParent;\r\n\t\t\t\t\tthis.root = searchRoot(rParent);\r\n\r\n\t\t\t\t}\r\n\t\t\t\t// if root is going right of root's parent, then set pivot to\r\n\t\t\t\t// right of the root.\r\n\t\t\t\telse if (root.uniqueKey.compareTo(rParent.uniqueKey) > 0) {\r\n\t\t\t\t\t// root must be on the right of the parent.\r\n\t\t\t\t\troot.rightChild = pivot.leftChild;\r\n\t\t\t\t\tpivot.leftChild.parent = root;\r\n\t\t\t\t\tpivot.leftChild = root;\r\n\t\t\t\t\trParent.rightChild = pivot;\r\n\t\t\t\t\troot.parent = pivot;\r\n\t\t\t\t\tpivot.parent = rParent;\r\n\t\t\t\t\tthis.root = searchRoot(rParent);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// else if root has no parent, then rotate with no parent.\r\n\t\t\telse {\r\n\t\t\t\troot.rightChild = pivot.leftChild;\r\n\t\t\t\tpivot.leftChild.parent = root;\r\n\t\t\t\tpivot.leftChild = root;\r\n\t\t\t\troot.parent = pivot;\r\n\t\t\t\tthis.root = pivot;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void leftRotate(Node<E> x){\n \n \t/*\n If x is the root of the tree to rotate with left child subtree T1 and right child y, \n where T2 and T3 are the left and right children of y:\n x becomes left child of y and T3 as its right child of y\n T1 becomes left child of x and T2 becomes right child of x\n */\n\t\tNode<E> y = x.getRightChild(); //set y\n\t\tx.setRightChild(y.getLeftChild()); //turn y's subtree into x's right subtree\n\t\ty.getLeftChild().setParent(x);\n\t\ty.setParent(x.getParent());\n\t\tif (x.getParent() == sentinel || x.getParent() == null) {\n\t\t\troot = y;\n\t\t} else if (x == x.getParent().getLeftChild()) { //link x's parent to y\n\t\t\tx.getParent().setLeftChild(y);\n\t\t} else {\n\t\t\tx.getParent().setRightChild(y);\n\t\t}\n\t\ty.setLeftChild(x); //put x on y's left\n\t\tx.setParent(y);\n\t\n }", "Node leftRotate(Node x) \n { \n Node y = x.right; \n Node T2 = y.left; \n \n // Perform rotation \n y.left = x; \n x.right = T2; \n \n // Update heights \n x.height = max(height(x.left), height(x.right)) + 1; \n y.height = max(height(y.left), height(y.right)) + 1; \n \n // Return new root \n return y; \n }", "protected RedBlackNode<T> rotateLeft(RedBlackNode<T> node) {\n RedBlackNode<T> rightNode = node.getRightChild();\n RedBlackNode<T> parent = node.getParent();\n rightNode._parent = node.getParent();\n node._rightChild = rightNode.getLeftChild();\n if (node._rightChild != null ) {\n node._rightChild._parent = node;\n } \n rightNode._leftChild = node; \n node._parent = rightNode;\n // node had parent.\n if(parent != null) {\n // node was left child\n if(parent._leftChild == node) {\n parent._leftChild = rightNode;\n } else {\n // node was right child\n parent._rightChild = rightNode;\n }\n } else {\n // node was head\n _head = rightNode;\n }\n return rightNode;\n }", "protected Node<E> rotateLeft(Node<E> root) {\r\n\t\tNode<E> temp = root.right;\r\n\t\troot.right = temp.left;\r\n\t\ttemp.left = root;\r\n\t\treturn temp;\t\r\n\t}", "public static int rotateLeft(int dir) {\n return (dir + 1) & 3;\n }", "public FallingPiece rotateLeft(){\r\n return new FallingPiece(coord, innerPiece.rotateLeft());\r\n }", "public void turnLeft() {\n\t\tthis.setSteeringDirection(getSteeringDirection()-5);\n\t\t}", "private Node leftRotate(Node a) {\n Node b = a.getRightChild();\n Node n2 = b.getLeftChild();\n b.setLeftChild(a);\n a.setRightChild(n2);\n setHeights(a, b);\n return b;\n }", "public void turnLeft()\r\n\t{\r\n\t\t\r\n\t\theading -= 2; //JW\r\n\t\t//Following the camera:\r\n\t\t\t//heading -= Math.sin(Math.toRadians(15))*distance; \r\n\t\t\t//heading -= Math.cos(Math.toRadians(15))*distance;\r\n\t}", "@Override\n \t\t\t\tpublic void doRotateX() {\n \n \t\t\t\t}", "private NodeRB<K, V> rotateLeft(NodeRB<K, V> x) {\n\t\tNodeRB<K, V> xParent = x.parent;\n\n\t\tNodeRB<K, V> y = x.right;\n\t\tx.right = y.left;\n\t\ty.left = x;\n\n\t\t// Parents relations fix\n\t\tif (xParent != null) {\n\t\t\tif (x.isLeftChild()) {\n\t\t\t\txParent.left = y;\n\t\t\t} else {\n\t\t\t\txParent.right = y;\n\t\t\t}\n\t\t}\n\n\t\tx.parent = y;\n\t\ty.parent = xParent;\n\t\tif (x.right != null) {\n\t\t\tx.right.parent = x;\n\t\t}\n\n\t\tx.height = 1 + Math.max(height(x.left), height(x.right));\n\t\ty.height = 1 + Math.max(height(y.left), height(y.right));\n\t\treturn y;\n\t}", "private void singleRotateLeft(Node n) {\n Node r = n.mRight, rl = r.mLeft, p = n.mParent;\n n.mRight = rl;\n rl.mParent = n;\n r.mLeft = n;\n if (n == mRoot) {\n mRoot = r;\n r.mParent = null;\n }\n else if (p.mRight == n) {\n p.mRight = r;\n r.mParent = p;\n }\n else {\n p.mLeft = r;\n r.mParent = p;\n }\n n.mParent = r;\n }", "private void LRRotation(IAVLNode node)\r\n\t{\r\n\r\n\t\tRRRotation(node.getLeft());\r\n\t\tLLRotation(node);\r\n\t}", "private void doubleRotateleft(WAVLNode x) {\n\t WAVLNode z=x.right;\r\n\t leftRotate(z);\r\n\t z.rank+=1;\r\n\t rightRotate(z);\r\n }", "Node leftRotate(Node x)\n\t\t{\n\t\t\tNode y=x.right;\n\t\t\tNode T2=y.left;\n\t\t\t\n\t\t\t//rotate\n\t\t\t\n\t\t\ty.left=x;\n\t\t\tx.right=T2;\n\t\t\t\n\t\t\t//update heights\n\t\t\ty.height=max(height(y.left),height(y.left) +1 ) ;\n\t\t\tx.height=max(height(x.left),height(x.left) +1 ) ;\n\t\t\t\n\t\t\t// new root\n\t\t\treturn y;\n\t\t}", "private AVLNode<T, U> rotateLeft(AVLNode<T, U> oldRoot) {\n\t\tAVLNode<T, U> newRoot = oldRoot.getRight();\n\t\t\n\t\tnewRoot.setParent(oldRoot.getParent());\n\t\toldRoot.setRight(newRoot.getLeft());\n\t\t\t \n\t\tif(oldRoot.getRight() != null) {\n\t\t\toldRoot.getRight().setParent(oldRoot);\n\t\t}\n\t\t\n\t\tnewRoot.setLeft(oldRoot);\n\t\toldRoot.setParent(newRoot);\n\t\t\n\t\tif(newRoot.getParent() != null){\n\t\t\tif(newRoot.getParent().getRight() == oldRoot){\n\t\t\t\tnewRoot.getParent().setRight(newRoot);\n\t\t\t}else if(newRoot.getParent().getLeft() == oldRoot){\n\t\t\t\tnewRoot.getParent().setLeft(newRoot);\n\t\t\t}\n\t\t}\n\t\t\n\t\tcomputeHeightsToRoot(oldRoot);\n\t\treturn newRoot;\n\t}", "public static int rotate_left (int d) {\n\t\treturn d == 0 ? 3 : d - 1;\n\t}", "public void moveLeft(int speed)\n {\n if(getRotation()==0)\n {\n turn(180);\n move(speed);\n }\n else if(getRotation()==90)\n {\n turn(90);\n move(speed);\n }\n else if(getRotation()==180)\n {\n move(speed);\n }\n else if(getRotation()==270)\n {\n turn(-90);\n move(speed);\n }\n }", "private long leftRotate(long n) throws IOException {\n Node current = new Node(n);\r\n long currentRight = current.right;\r\n Node tempN = new Node(current.right);\r\n current.right = tempN.left;\r\n tempN.left = n;\r\n current.height = getHeight(current);\r\n current.writeNode(n);\r\n tempN.height = getHeight(tempN);\r\n tempN.writeNode(currentRight);\r\n return currentRight;\r\n }", "private BTNode<T> rotateLeft(BTNode<T> p){\n BTNode<T> q = p.getRight();\n p.setRight(q.getLeft());\n q.setLeft(p);\n fixHeight(q);\n fixHeight(p);\n return q;\n }", "private void rotateRight() {\n robot.leftBack.setPower(TURN_POWER);\n robot.leftFront.setPower(TURN_POWER);\n robot.rightBack.setPower(-TURN_POWER);\n robot.rightFront.setPower(-TURN_POWER);\n }", "@Override\n public void turnLeft(Double angle) {\n angle = Math.toRadians(angle);\n double temp = vector.x;\n vector.x = vector.x * Math.cos(angle) - vector.y * Math.sin(angle);\n vector.y = temp * Math.sin(angle) + vector.y * Math.cos(angle);\n }", "@Override\r\n\tpublic void rotateRight() {\n\t\tsetDirection((this.getDirection() + 1) % 4);\r\n\t}", "private void LeftRightLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n \t}", "Node leftRotate(Node x) { \n Node y = x.right; \n Node T2 = y.left; \n \n // Perform rotation \n y.left = x; \n x.right = T2; \n \n // Update heights \n x.height = maxInt(heightBST(x.left), heightBST(x.right)) + 1; \n y.height = maxInt(heightBST(y.left), heightBST(y.right)) + 1; \n \n // Return new root \n return y; \n }", "private void leftRotate(RedBlackNode<T> x){\n leftRotateFixup(x);\n\n RedBlackNode<T> y;\n y = x.right;\n x.right = y.left;\n\n // czy istnieje y.left i zamiana referencji\n if (!isNil(y.left))\n y.left.parent = x;\n y.parent = x.parent;\n\n // x.parent jest nil\n if (isNil(x.parent))\n root = y;\n\n // x jest lewym dzieckiem swojego rodzica\n else if (x.parent.left == x)\n x.parent.left = y;\n\n //x jest prawym dzieckiem swojego rodzica\n else\n x.parent.right = y;\n\n y.left = x;\n x.parent = y;\n }", "public void turnLeft();", "private void rightLeftRotate(AVLNode<T> parent, AVLNode<T> node) {\n AVLNode<T> child = node.getLeft();\n AVLNode<T> oldNodeRight = node.getRight();\n AVLNode<T> oldChildLeft = child.getLeft();\n AVLNode<T> oldChildRight = child.getRight();\n AVLNode<T> nodeDat = new AVLNode<>(node.getData());\n node.setRight(nodeDat);\n if (oldNodeRight != null) {\n node.getRight().setRight(oldNodeRight);\n calcDeterminants(node.getRight().getRight());\n }\n node.setData(child.getData());\n if (oldChildRight != null) {\n node.getRight().setLeft(oldChildRight);\n calcDeterminants(node.getRight().getLeft());\n } else {\n node.getRight().setLeft(null);\n calcDeterminants(node.getRight());\n }\n if (oldChildLeft != null) {\n node.setLeft(oldChildLeft);\n calcDeterminants(node.getLeft());\n } else {\n node.setLeft(null);\n calcDeterminants(node.getRight());\n }\n\n AVLNode<T> oldLeft = parent.getLeft();\n AVLNode<T> parDat = new AVLNode<>(parent.getData());\n parent.setLeft(parDat);\n if (oldLeft != null) {\n parent.getLeft().setLeft(oldLeft);\n calcDeterminants(parent.getLeft().getLeft());\n }\n if (node.getLeft() != null) {\n parent.getLeft().setRight(node.getLeft());\n calcDeterminants(parent.getLeft().getRight());\n }\n parent.setData(node.getData());\n if (node.getRight() != null) {\n parent.setRight(node.getRight());\n calcDeterminants(parent.getRight());\n } else {\n parent.setRight(null);\n calcDeterminants(parent.getLeft());\n }\n }", "private void applyLeftTurn(WorldSpatial.Direction orientation, float delta) {\n\t\tswitch(orientation){\n\t\tcase EAST:\n\t\t\tif(!getOrientation().equals(WorldSpatial.Direction.NORTH)){\n\t\t\t\tturnLeft(delta);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase NORTH:\n\t\t\tif(!getOrientation().equals(WorldSpatial.Direction.WEST)){\n\t\t\t\tturnLeft(delta);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SOUTH:\n\t\t\tif(!getOrientation().equals(WorldSpatial.Direction.EAST)){\n\t\t\t\tturnLeft(delta);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase WEST:\n\t\t\tif(!getOrientation().equals(WorldSpatial.Direction.SOUTH)){\n\t\t\t\tturnLeft(delta);\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t\n\t\t}\n\t\t\n\t}", "void left() {\n startAnimation(leftSubCubes(), Axis.X, Direction.ANTICLOCKWISE);\n leftCubeSwap();\n }", "public static TreapNode leftRotate(TreapNode x)\n {\n TreapNode y = x.right, T2 = y.left;\n\n // Perform rotation\n y.left = x;\n x.right = T2;\n\n // Return new root\n return y;\n }", "public void leftRotate(Node n) {\r\n\t\tNode y = n.right;\r\n\t\tn.right = y.left;\r\n\t\tif(!y.left.isNil)\r\n\t\t\ty.left.parent = n;\r\n\t\ty.parent = n.parent;\r\n\t\tif(n.parent.isNil)\r\n\t\t\troot = y;\r\n\t\telse if(n == n.parent.left)\r\n\t\t\tn.parent.left = y;\r\n\t\telse\r\n\t\t\tn.parent.right = y;\r\n\t\ty.left = n;\r\n\t\tn.parent = y;\r\n\t}", "public void moveLeft(){\n\t\tif(GameSystem.TWO_PLAYER_MODE){\n\t\t\tif(Game.getPlayer2().dying){\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif(animation==ANIMATION.DAMAGED||Game.getPlayer().dying||channelling||charging) return;\n\t\tmoving=true;\n\t\tbuttonReleased=false;\n\t\torientation=ORIENTATION.LEFT;\n\t\tif(animation!=ANIMATION.MOVELEFT) {\n\t\t\tanimation=ANIMATION.MOVELEFT;\n\t\t\tif(run!=null) sequence.startSequence(run);\n\t\t}\n\t\tfacing=FACING.LEFT;\n\t\tdirection=\"left\";\n\t\tsetNextXY();\n\t\tsetDestination(nextX,nextY);\n\t\tvelX=-1*spd/2;\n\t\tvelY=0;\n\t}", "private void leftRightRotate(AVLNode<T> parent, AVLNode<T> node) {\n AVLNode<T> child = node.getRight();\n AVLNode<T> oldNodeLeft = node.getLeft();\n AVLNode<T> oldChildLeft = child.getLeft();\n AVLNode<T> oldChildRight = child.getRight();\n AVLNode<T> nodeDat = new AVLNode<>(node.getData());\n node.setLeft(nodeDat);\n if (oldNodeLeft != null) {\n node.getLeft().setLeft(oldNodeLeft);\n calcDeterminants(node.getLeft().getLeft());\n }\n node.setData(child.getData());\n if (oldChildLeft != null) {\n node.getLeft().setRight(oldChildLeft);\n calcDeterminants(node.getLeft().getRight());\n } else {\n node.getLeft().setRight(null);\n calcDeterminants(node.getLeft());\n }\n if (oldChildRight != null) {\n node.setRight(oldChildRight);\n calcDeterminants(node.getRight());\n } else {\n node.setRight(null);\n calcDeterminants(node.getLeft());\n }\n\n AVLNode<T> oldRight = parent.getRight();\n AVLNode<T> parDat = new AVLNode<>(parent.getData());\n parent.setRight(parDat);\n if (oldRight != null) {\n parent.getRight().setRight(oldRight);\n calcDeterminants(parent.getRight().getRight());\n }\n if (node.getRight() != null) {\n parent.getRight().setLeft(node.getRight());\n calcDeterminants(parent.getRight().getLeft());\n }\n parent.setData(node.getData());\n if (node.getLeft() != null) {\n parent.setLeft(node.getLeft());\n calcDeterminants(parent.getLeft());\n } else {\n parent.setLeft(null);\n calcDeterminants(parent.getRight());\n }\n }", "private SplayNode rotateWhenXisRightChildOfLeftChild(SplayNode X)\n\t{\n\t\tX = rotateWhenRightOfRoot(X);\n\t\t//G.setLeft(X);\n\t\tX = rotateWhenLeftOfRoot(X);\n\t\treturn X;\n\t}", "public static void setLeftMotorPosition(double rotations){\n leftFrontMotor.getPIDController().setReference(rotations, ControlType.kPosition);\n }", "private void rotateLeftDel (WAVLNode z) {\n\t WAVLNode y = z.right;\r\n\t WAVLNode a = y.left;\r\n\t y.parent=z.parent;\r\n\t if(z.parent!=null) {\r\n\t\t if(parentside(z.parent, z).equals(\"left\")) {\r\n\t\t\t z.parent.left=y;\r\n\r\n\t }\r\n\t else {\r\n\t\t\t z.parent.right=y;\r\n\r\n\t }\r\n\t }\r\n\r\n\t else {\r\n\t\t this.root=y;\r\n\t }\r\n\t \r\n\t y.left = z;\r\n\t y.rank++;\r\n\t z.parent=y;\r\n\t z.right = a;\r\n\t z.rank--;\r\n\t if(a.rank>=0) {\r\n\t\t a.parent=z; \r\n\t }\r\n\t if(z.left==EXT_NODE&&z.right==EXT_NODE&&z.rank!=0) {\r\n\t\t z.rank--;\r\n\t }\r\n\t z.sizen = z.left.sizen+a.sizen+1;\r\n\t y.sizen = z.sizen+y.right.sizen+1;\r\n }", "private void LeftLeftRight() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n \t}", "private boolean moveLeft() {\n\t\tint moduleSpeed = stats.getSPEED();\n\n\t\tgetTorax().setRotationg(getTorax().getRotationg() - rotationRate);\n\t\tgetLegs().setRotationg(getLegs().getRotationg() - rotationRate);\n\n\t\tgetSpeed().setX(Math.cos(Math.toRadians(getTorax().getRotationg() - 90)) * moduleSpeed);\n\t\tgetSpeed().setY(Math.sin(Math.toRadians(getTorax().getRotationg() - 90)) * moduleSpeed);\n\n\t\tincreaseInfection();\n\n\t\treturn true;\n\t}", "public void left(){\n\t\tmoveX=-1;\n\t\tmoveY=0;\n\t}", "private void RLRotation(IAVLNode node)\r\n\t{\r\n\t\tLLRotation(node.getRight());\r\n\t\tRRRotation(node);\r\n\t}", "static String leftrotate(String s) {\n\n System.out.print(\" left rotate \" + s + \" \");\n char arr[] = s.toCharArray();\n char newarr[]= new char[arr.length];\n for (int i = 0; i < arr.length - 1; i++) {\n newarr[i + 1] = arr[i];\n }\n newarr[0]=s.charAt(s.length()-1);\n\n s = \"\";\n for (int i = 0; i < arr.length; i++)\n s += newarr[i];\n System.out.println(\"Return \" + s);\n return s;\n\n }", "static public NewRotateLeft create(AnimatableModelInstance originObject, ModelInstance targetObject, int duration) {\n\t\t\n\t\t\n\t\t\n\t\tVector3 posT = new Vector3();\n\t\ttargetObject.transform.getTranslation(posT);\t\t\n\t\t\t\n\t\treturn create(originObject, posT.x, posT.y, duration);\n\t}", "private Node rotateLeft(Node h){\n\n\t\tNode x = h.right;\n\t\th.right = x.left;\n\t\tx.left = h;\n\t\tx.color = h.color;\n\t\th.color = RED;\n\t\treturn x;\n\t}", "private AvlNode<E> rotateWithLeftChild(AvlNode<E> k1){\n AvlNode<E> k2 = k1.left;\n k1.left = k2.right;\n k2.right = k1;\n k1.height = max(height(k1.left), height(k2.right)) + 1;\n k2.height = max(height(k2.left), k1.height) + 1;\n return k2;\n }", "public void slideLeft() {\n turnLeft();\n move();\n turnRight();\n }", "@Override\r\n\tpublic void rotate() {\n\t\t\r\n\t}", "public void rotLauncherLeft()\n\t{\n\t\t//only rotate if a PlayerShip, and therefore a MissileLauncher is spawned\n\t\tIIterator iter = gameObj.getIterator();\n\t\twhile(iter.hasNext())\n\t\t{\n\t\t\tGameObject current = (GameObject)iter.getNext();\n\t\t\tif(current instanceof PlayerShip)\n\t\t\t{\n\t\t\t\t((PlayerShip)current).moveLauncherLeft();\n\t\t\t\tSystem.out.println(\"launcher heading +20\");\n\t\t\t\tnotifyObservers();\n\t\t\t\treturn;\n\t\t\t}\t\n\t\t}\n\t\tSystem.out.println(\"There is no playerShip spawned\");\n\t}", "LocalMaterialData rotate();", "@Test\n\tpublic void rotateArray_rotateLeftOneItem() {\n\t\tint[] nums = prepareInputArray(5);\n\t\tint[] rotatedArray = ArrayLeftRotation.rotateArray(nums, 1);\n\t\tassertThat(rotatedArray[0], equalTo(2));\n\t\tassertThat(rotatedArray[1], equalTo(3));\n\t\tassertThat(rotatedArray[2], equalTo(4));\n\t\tassertThat(rotatedArray[3], equalTo(5));\n\t\tassertThat(rotatedArray[4], equalTo(1));\n\t}", "private void turnLeft() {\n\n if(currentPosition.getX() == -1 && currentPosition.getY() == -1) {\n System.out.println(\"Robot is not placed, yet.\");\n return;\n }\n\n Position.Direction direction = currentPosition.getDirection();\n switch (direction) {\n case EAST:\n direction = Position.Direction.NORTH;\n break;\n case WEST:\n direction = Position.Direction.SOUTH;\n break;\n case NORTH:\n direction = Position.Direction.WEST;\n break;\n case SOUTH:\n direction = Position.Direction.EAST;\n break;\n }\n\n currentPosition.setDirection(direction);\n }", "private void LLRotation(IAVLNode node)\r\n\t{\r\n\t\tIAVLNode parent = node.getParent(); \r\n\t\tIAVLNode leftChild = node.getLeft(); \r\n\t\tIAVLNode rightGrandChild = node.getLeft().getRight(); \r\n\t\t\t\t\t\t\t\t\t\t \r\n\t\tif(node != root) \r\n\t\t{\r\n\t\t\tif(node == parent.getLeft()) \r\n\t\t\t\tparent.setLeft(leftChild);\r\n\t\t\telse \r\n\t\t\t\tparent.setRight(leftChild);\r\n\t\t}\r\n\t\tnode.setLeft(rightGrandChild); // rightGrandChild is now node's left child\r\n\t\trightGrandChild.setParent(node); // node becomes rightGrandChild's parent\r\n\t\tleftChild.setRight(node); // node is now leftChild's right child\r\n\t\tnode.setParent(leftChild); // node's parent is now leftChild\r\n\t\tleftChild.setParent(parent); // leftChild's parent is now node's old parent\r\n\t\t\r\n\t\t//updating sizes and heights\r\n\t\tnode.setSize(sizeCalc(node)); // updating node's size \r\n\t\tleftChild.setSize(sizeCalc(leftChild)); //updating leftChild's size\r\n\t\tleftChild.setHeight(HeightCalc(leftChild)); // updating leftChild's height\r\n\t\tnode.setHeight(HeightCalc(node)); // updating node's height\r\n\r\n\t\tif (node == root)\r\n\t\t\tthis.root = leftChild;\r\n\t}", "public static NewRotateLeft create(AnimatableModelInstance originObject, float ex, float ey, int duration) {\n\n\t\tVector3 posO = originObject.transState.position.cpy();\t\n\t\t//Vector3 posO = new Vector3();\n\t\t//originObject.transform.getTranslation(posO);\n\t\t\n\t\tQuaternion rotation = originObject.transState.rotation.cpy();\t\n\t\t//Quaternion rotation = new Quaternion();\n\t\t//originObject.transform.getRotation(rotation,true); //existing rotation\n\t\t\n\t\t Vector3 axisVec = new Vector3();\n\t float existingangle = (float) (rotation.getAxisAngle(axisVec) * axisVec.nor().z);\n\t existingangle = existingangle < 0 ? existingangle + 360 : existingangle; //convert <0 values\n\t\t\n\t\tGdx.app.log(logstag,\"_____________________________________existing angle=\"+existingangle); //relative to x axis pointing left anticlockwise\n\t\n\t\t//float scalex = originObject.transform.getScaleX(); //get how much the object has been scaled\n\t\t//float scaley = originObject.transform.getScaleY();\n\t\t\n\t\tVector2 fromPoint = new Vector2(posO.x,posO.y); //we need to scale them down due to how the positions might have been scaled up if the matrix is scaled (I hate how matrixs work :-/ Just cant get it in my head)\n\t\tVector2 tooPoint = new Vector2(ex,ey);\n\n\t\tfromPoint.sub(tooPoint); \n\n\t\t//Log.info(\"length=\"+corner2.len());\n\n\t\tfloat angle = 180+fromPoint.angle(); //absolute angle between the two objects\n\t\tGdx.app.log(logstag,\"________target angle=\"+angle); //should point towards ex/ey \n\t\t\n\t//\tfloat distance = fromPoint.len();\n\n\t\t\n\t\t//difference between this angle and existing one\n\t\tangle = angle - existingangle;\n\t\t\n\t\tNewRotateLeft rot = new NewRotateLeft(angle,500);\n\t\t//NewForward forward = new NewForward(distance,duration-500);\n\t\t\t\t\n\t\treturn rot;\n\t}", "public void moveLeft()\n {\n if (xPos == 0)\n {\n movementY = 0;\n movementX = 0;\n }\n\n // Set the movement factor - negative X because we are moving LEFT! \n movementX = -0.5;\n movementY = 0;\n }", "private Node rotateLeft(Node h) {\n Node x = h.right;\n h.right = x.left;\n x.left = h;\n x.color = x.left.color;\n x.left.color = RED;\n x.size = h.size;\n h.size = size(h.left) + size(h.right) + 1;\n return x;\n }", "private static void leftRotateByOne(int[] array) {\n int tmp = array[0];\n for (int i = 0; i < array.length - 1; i++) {\n array[i] = array[i + 1];\n }\n array[array.length - 1] = tmp;\n }", "public void xRotate() {\n\t\t\n\t}", "private Node rotateRight() {\n Node left = this.leftChild;\n this.leftChild = left.rightChild;\n left.rightChild = this;\n\n this.updateHeight();\n left.updateHeight();\n\n return left;\n }", "public void moveLeft() {\n Coordinate leftCoord = new Coordinate(getX() - 1, getY());\n handleMove(leftCoord, InteractionHandler.LEFT);\n }", "public void spinLeft(double speed) {\r\n \tspeed = Math.abs(speed);\r\n \tleftTopMotor.set(-1 * speed);\r\n \tleftBottomMotor.set(-1 * speed);\r\n \trightTopMotor.set(-1 * speed);\r\n \trightBottomMotor.set(-1 * speed);\r\n }", "private NodeTreeBinary<T> rotateLeft(NodeTreeBinary<T> h) {\n\t\tNodeTreeBinary<T> x = h.getRight();\n\n\t\th.setRight(x.getLeft());\n\t\tx.setLeft(h);\n\t\tsetColor(x, getColor(x.getLeft()));\n\t\tsetColor(x.getLeft(), NodeTreeRB.RED);\n\n\t\tsetSize(x, getSize(h));\n\t\tsetSize(h, getSize(h.getLeft()) + getSize(h.getRight()) + 1);\n\n\t\treturn x;\n\t}" ]
[ "0.8542166", "0.82967585", "0.8241201", "0.81562203", "0.8127938", "0.8084228", "0.79085314", "0.7822214", "0.77895886", "0.7720236", "0.7675774", "0.7568301", "0.7340196", "0.7318705", "0.72043675", "0.7082608", "0.7079114", "0.70684963", "0.7023839", "0.7023823", "0.69676954", "0.6961031", "0.6956794", "0.6929399", "0.69077677", "0.6895612", "0.6841839", "0.6794637", "0.6792384", "0.67871433", "0.67837554", "0.6771546", "0.67697495", "0.675544", "0.67523795", "0.67470723", "0.6745731", "0.6741737", "0.6740657", "0.67242885", "0.6722245", "0.670184", "0.6678949", "0.6638987", "0.66371906", "0.66350204", "0.66101724", "0.66064537", "0.6601105", "0.65835077", "0.6576716", "0.6562072", "0.65616554", "0.65588117", "0.6552082", "0.65455395", "0.6526282", "0.6519067", "0.6515274", "0.65068877", "0.64946365", "0.64944416", "0.64876884", "0.6470337", "0.644173", "0.6434317", "0.64314055", "0.642941", "0.6427742", "0.64274716", "0.6425265", "0.64252263", "0.64250875", "0.64177907", "0.6403926", "0.6398213", "0.63973236", "0.6391789", "0.63881826", "0.63732076", "0.63521254", "0.63453007", "0.6333781", "0.6328335", "0.63270617", "0.6326677", "0.632651", "0.63235044", "0.63117146", "0.63059056", "0.63055545", "0.6302259", "0.6301098", "0.62959224", "0.6295183", "0.6291876", "0.62893605", "0.6286232", "0.6285414", "0.6281792" ]
0.64438665
64
/ / / / / / / / / / / / / / / / / / / / / / / / /
public interface IConnectionPointContainer /* */ extends IUnknown /* */ { /* 33 */ public static final Guid.IID IID_IConnectionPointContainer = new Guid.IID("B196B284-BAB4-101A-B69C-00AA00341D07"); /* */ /* */ WinNT.HRESULT FindConnectionPoint(Guid.REFIID paramREFIID, PointerByReference paramPointerByReference); /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static int getNumPatterns() { return 64; }", "double passer();", "private double[] getExtents(){\n return new double[] { -90, -180, 90, 180 };\n }", "private int parent(int i){return (i-1)/2;}", "void mo33732Px();", "public Integer getWidth(){return this.width;}", "private int leftChild(int i){return 2*i+1;}", "public void gored() {\n\t\t\n\t}", "int getWidth() {return width;}", "public int getBlockLength()\r\n/* 45: */ {\r\n/* 46:107 */ return -32;\r\n/* 47: */ }", "int width();", "public void method_4270() {}", "int getTribeSize();", "int getSize ();", "@Override\n\tpublic int sount() {\n\t\treturn 0;\n\t}", "double seBlesser();", "public int getInternalBlockLength()\r\n/* 40: */ {\r\n/* 41: 95 */ return 32;\r\n/* 42: */ }", "public abstract void bepaalGrootte();", "public void getTile_B8();", "static int size_of_inx(String passed){\n\t\treturn 1;\n\t}", "@Override\n\tprotected void interr() {\n\t}", "private void poetries() {\n\n\t}", "public int length() { return 1+maxidx; }", "@Override\n protected int mapSize() {\n return left.size()+right.size()-hidden.size();\n }", "public int getEdgeCount() \n {\n return 3;\n }", "public int generateRoshambo(){\n ;]\n\n }", "static int size_of_xra(String passed){\n\t\treturn 1;\n\t}", "public int getTakeSpace() {\n return 0;\n }", "public double getWidth() {\n return this.size * 2.0; \n }", "@Override\n public double getPerimiter() {\n return 4 * width;\n }", "public abstract int getSpotsNeeded();", "@Override\n public void perish() {\n \n }", "@Override\n public int getSize() {\n return 1;\n }", "public int getWidth() {\r\n\treturn this.width;\r\n}", "int fixedSize();", "public void skystonePos4() {\n }", "@Override\n\tpublic float getWidth() {\n\t\treturn 26;\n\t}", "@Override\n public void func_104112_b() {\n \n }", "int memSize() {\n return super.memSize() + 4 * 4; }", "laptop(){\r\n length= 0 ;\r\n weight = 0;\r\n height = 0;\r\n width = 0;\r\n }", "long getWidth();", "static int size_of_xthl(String passed){\n\t\treturn 1;\n\t}", "public static int size_parentId() {\n return (16 / 8);\n }", "public int getSize(){return _size;}", "static int size_of_rpo(String passed){\n\t\treturn 1;\n\t}", "protected int getWidth()\n\t{\n\t\treturn 0;\n\t}", "@Override\r\n\tpublic int size() {\n\t\treturn 27;\r\n\t}", "public byte[] initialValue() {\n return new byte[]{(byte) -1, (byte) -40, (byte) -1, (byte) -37, (byte) 0, (byte) 67, (byte) 0, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -64, (byte) 0, (byte) 17, (byte) 8, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 3, (byte) 1, (byte) 34, (byte) 0, (byte) 2, (byte) 17, (byte) 0, (byte) 3, (byte) 17, (byte) 0, (byte) -1, (byte) -60, (byte) 0, (byte) 31, (byte) 0, (byte) 0, (byte) 1, (byte) 5, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 2, (byte) 3, (byte) 4, (byte) 5, (byte) 6, (byte) 7, (byte) 8, (byte) 9, (byte) 10, (byte) 11, (byte) -1, (byte) -60, (byte) 0, (byte) -75, (byte) 16, (byte) 0, (byte) 2, (byte) 1, (byte) 3, (byte) 3, (byte) 2, (byte) 4, (byte) 3, (byte) 5, (byte) 5, (byte) 4, (byte) 4, (byte) 0, (byte) 0, (byte) 1, (byte) 125, (byte) 1, (byte) 2, (byte) 3, (byte) 0, (byte) 4, (byte) 17, (byte) 5, (byte) 18, (byte) 33, (byte) 49, (byte) 65, (byte) 6, (byte) 19, (byte) 81, (byte) 97, (byte) 7, (byte) 34, (byte) 113, (byte) 20, (byte) 50, (byte) -127, (byte) -111, (byte) -95, (byte) 8, (byte) 35, (byte) 66, (byte) -79, (byte) -63, (byte) 21, (byte) 82, (byte) -47, (byte) -16, (byte) 36, (byte) 51, (byte) 98, (byte) 114, (byte) -126, (byte) 9, (byte) 10, (byte) 22, (byte) 23, (byte) 24, (byte) 25, (byte) 26, (byte) 37, (byte) 38, (byte) 39, (byte) 40, (byte) 41, (byte) 42, (byte) 52, (byte) 53, (byte) 54, (byte) 55, (byte) 56, (byte) 57, (byte) 58, (byte) 67, (byte) 68, (byte) 69, (byte) 70, (byte) 71, (byte) 72, (byte) 73, (byte) 74, (byte) 83, (byte) 84, (byte) 85, (byte) 86, (byte) 87, (byte) 88, (byte) 89, (byte) 90, (byte) 99, (byte) 100, (byte) 101, (byte) 102, (byte) 103, (byte) 104, (byte) 105, (byte) 106, (byte) 115, (byte) 116, (byte) 117, (byte) 118, (byte) 119, (byte) 120, (byte) 121, (byte) 122, (byte) -125, (byte) -124, (byte) -123, (byte) -122, (byte) -121, (byte) -120, (byte) -119, (byte) -118, (byte) -110, (byte) -109, (byte) -108, (byte) -107, (byte) -106, (byte) -105, (byte) -104, (byte) -103, (byte) -102, (byte) -94, (byte) -93, (byte) -92, (byte) -91, (byte) -90, (byte) -89, (byte) -88, (byte) -87, (byte) -86, (byte) -78, (byte) -77, (byte) -76, (byte) -75, (byte) -74, (byte) -73, (byte) -72, (byte) -71, (byte) -70, (byte) -62, (byte) -61, (byte) -60, (byte) -59, (byte) -58, (byte) -57, (byte) -56, (byte) -55, (byte) -54, (byte) -46, (byte) -45, (byte) -44, (byte) -43, (byte) -42, (byte) -41, (byte) -40, (byte) -39, (byte) -38, (byte) -31, (byte) -30, (byte) -29, (byte) -28, (byte) -27, (byte) -26, (byte) -25, (byte) -24, (byte) -23, (byte) -22, (byte) -15, (byte) -14, (byte) -13, (byte) -12, (byte) -11, (byte) -10, (byte) -9, (byte) -8, (byte) -7, (byte) -6, (byte) -1, (byte) -60, (byte) 0, (byte) 31, (byte) 1, (byte) 0, (byte) 3, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 2, (byte) 3, (byte) 4, (byte) 5, (byte) 6, (byte) 7, (byte) 8, (byte) 9, (byte) 10, (byte) 11, (byte) -1, (byte) -60, (byte) 0, (byte) -75, (byte) 17, (byte) 0, (byte) 2, (byte) 1, (byte) 2, (byte) 4, (byte) 4, (byte) 3, (byte) 4, (byte) 7, (byte) 5, (byte) 4, (byte) 4, (byte) 0, (byte) 1, (byte) 2, (byte) 119, (byte) 0, (byte) 1, (byte) 2, (byte) 3, (byte) 17, (byte) 4, (byte) 5, (byte) 33, (byte) 49, (byte) 6, (byte) 18, (byte) 65, (byte) 81, (byte) 7, (byte) 97, (byte) 113, (byte) 19, (byte) 34, (byte) 50, (byte) -127, (byte) 8, (byte) 20, (byte) 66, (byte) -111, (byte) -95, (byte) -79, (byte) -63, (byte) 9, (byte) 35, (byte) 51, (byte) 82, (byte) -16, (byte) 21, (byte) 98, (byte) 114, (byte) -47, (byte) 10, (byte) 22, (byte) 36, (byte) 52, (byte) -31, (byte) 37, (byte) -15, (byte) 23, (byte) 24, (byte) 25, (byte) 26, (byte) 38, (byte) 39, (byte) 40, (byte) 41, (byte) 42, (byte) 53, (byte) 54, (byte) 55, (byte) 56, (byte) 57, (byte) 58, (byte) 67, (byte) 68, (byte) 69, (byte) 70, (byte) 71, (byte) 72, (byte) 73, (byte) 74, (byte) 83, (byte) 84, (byte) 85, (byte) 86, (byte) 87, (byte) 88, (byte) 89, (byte) 90, (byte) 99, (byte) 100, (byte) 101, (byte) 102, (byte) 103, (byte) 104, (byte) 105, (byte) 106, (byte) 115, (byte) 116, (byte) 117, (byte) 118, (byte) 119, (byte) 120, (byte) 121, (byte) 122, (byte) -126, (byte) -125, (byte) -124, (byte) -123, (byte) -122, (byte) -121, (byte) -120, (byte) -119, (byte) -118, (byte) -110, (byte) -109, (byte) -108, (byte) -107, (byte) -106, (byte) -105, (byte) -104, (byte) -103, (byte) -102, (byte) -94, (byte) -93, (byte) -92, (byte) -91, (byte) -90, (byte) -89, (byte) -88, (byte) -87, (byte) -86, (byte) -78, (byte) -77, (byte) -76, (byte) -75, (byte) -74, (byte) -73, (byte) -72, (byte) -71, (byte) -70, (byte) -62, (byte) -61, (byte) -60, (byte) -59, (byte) -58, (byte) -57, (byte) -56, (byte) -55, (byte) -54, (byte) -46, (byte) -45, (byte) -44, (byte) -43, (byte) -42, (byte) -41, (byte) -40, (byte) -39, (byte) -38, (byte) -30, (byte) -29, (byte) -28, (byte) -27, (byte) -26, (byte) -25, (byte) -24, (byte) -23, (byte) -22, (byte) -14, (byte) -13, (byte) -12, (byte) -11, (byte) -10, (byte) -9, (byte) -8, (byte) -7, (byte) -6, (byte) -1, (byte) -38, (byte) 0, (byte) 12, (byte) 3, (byte) 1, (byte) 0, (byte) 2, (byte) 17, (byte) 3, (byte) 17, (byte) 0, (byte) 63, (byte) 0, (byte) -114, (byte) -118, (byte) 40, (byte) -96, (byte) 15, (byte) -1, (byte) -39};\n }", "public static int size_parent() {\n return (8 / 8);\n }", "static int size_of_shld(String passed){\n\t\treturn 3;\n\t}", "int getSpriteArraySize();", "public abstract void mo56925d();", "public void divide() {\n\t\t\n\t}", "double getNewWidth();", "public void verliesLeven() {\r\n\t\t\r\n\t}", "int align();", "@Override\n public int getSize() {\n return 64;\n }", "public abstract int mo9754s();", "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 Probing {\r\n\t/**\r\n\t * Get an alternate hash position\r\n\t * @param key The original key\r\n\t * @param i How many spaces are occupied already\r\n\t * @param max How many spaces are available\r\n\t * @return A new position for the key\r\n\t */\r\n\tpublic int getHash(int key, int i, int max);\r\n}", "private void m50366E() {\n }", "long getMid();", "long getMid();", "@Override\n public int getSize() {\n\treturn 0;\n }", "public int getSize(){return this.size;}", "public int get_resource_distance() {\n return 1;\r\n }", "int size() {\n int basic = ((offset() + 4) & ~3) - offset() + 8;\n /* Add 8*number of offsets */\n return basic + targetsOp.length*8;\n }", "@Override\n public int width()\n {\n return widthCent; //Charlie Gao helped me debug the issue here\n }", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "public double getWidth() { return _width<0? -_width : _width; }", "static int size_of_rp(String passed){\n\t\treturn 1;\n\t}", "@Override\n public String toString()\n {\n\treturn getClass().getSimpleName() + \" (\" + getLength() + \"x\" + getWidth() + \")\";\n }", "@Override\n\tpublic int computeSize() {\n\t\treturn 36;\n\t}", "@Override\n public void bfs() {\n\n }", "public String ring();", "default int getCompositeBitLength() {\n return getHighBitLength() + getLowBitLength();\n }", "@Override\n protected long advanceH(final long k) {\n return 5 * k - 2;\n }", "static int size_of_xri(String passed){\n\t\treturn 2;\n\t}", "private void level7() {\n }", "@Override\r\n\tpublic int getWidth() {\n\t\treturn 0;\r\n\t}", "public int my_leaf_count();", "public interface ITechLinker extends ITechByteObject {\r\n \r\n /**\r\n * \r\n */\r\n public static final int LINKER_BASIC_SIZE = A_OBJECT_BASIC_SIZE + 5;\r\n\r\n /**\r\n * \r\n */\r\n public static final int LINKER_OFFSET_01_TYPE1 = A_OBJECT_BASIC_SIZE;\r\n\r\n /**\r\n * \r\n */\r\n public static final int LINKER_OFFSET_02_DATA4 = A_OBJECT_BASIC_SIZE + 1;\r\n\r\n}", "public void leerPlanesDietas();", "long getSize();", "@Override\r\n\tpublic int operar() {\n\t\treturn 0;\r\n\t}", "public void mo21877s() {\n }", "int expand();", "private static Object[] newPath(int length, Object[] leaf) {\n Object[] node = leaf;\n for (int i = 0; i < length; i += 5) {\n node = new Object[] { node };\n }\n return node;\n }", "@Override\n\tpublic int taille() {\n\t\treturn 1;\n\t}" ]
[ "0.5139372", "0.51313776", "0.51177174", "0.5097944", "0.50429046", "0.5020976", "0.50177497", "0.4975741", "0.49648663", "0.49636397", "0.49458918", "0.49297336", "0.49219915", "0.49200952", "0.4919168", "0.49147594", "0.4914657", "0.48872775", "0.4886721", "0.48602197", "0.4859234", "0.48583013", "0.48540822", "0.48493546", "0.48485973", "0.48421174", "0.48412275", "0.4841195", "0.48372927", "0.48354647", "0.48268238", "0.482484", "0.48222083", "0.48150975", "0.4807214", "0.48058972", "0.48039997", "0.4799992", "0.47905165", "0.47900847", "0.47883368", "0.47833633", "0.47808227", "0.47787893", "0.47767112", "0.47766718", "0.47747952", "0.47715417", "0.47713125", "0.47690415", "0.47673073", "0.47666714", "0.47662455", "0.47654206", "0.47588488", "0.47558022", "0.47524753", "0.4751099", "0.4748224", "0.47459358", "0.47446576", "0.47440463", "0.47440463", "0.47436252", "0.4740603", "0.4734692", "0.4734541", "0.47343954", "0.4733583", "0.4733583", "0.4733583", "0.4733583", "0.4733583", "0.4733583", "0.4733583", "0.4733583", "0.4733583", "0.4733583", "0.4733583", "0.4733583", "0.4733583", "0.4728864", "0.4727436", "0.47238195", "0.47233617", "0.4720158", "0.47152227", "0.47123268", "0.47121677", "0.47076413", "0.46994618", "0.4698955", "0.46980014", "0.4696716", "0.4695026", "0.46946606", "0.46910438", "0.46904945", "0.4690486", "0.46868825", "0.46854222" ]
0.0
-1
HACK better get rid of this method altogether!
@Override public BytesReceiver put(final ByteBuffer src) { return put(src.array()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "protected boolean func_70814_o() { return true; }", "@Override\n\tprotected void interr() {\n\t}", "public void method_4270() {}", "@Override\n public void func_104112_b() {\n \n }", "private void strin() {\n\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\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\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "private void poetries() {\n\n\t}", "protected boolean func_70041_e_() { return false; }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "private Unescaper() {\n\n\t}", "@Override\n public Object preProcess() {\n return null;\n }", "private void m50366E() {\n }", "public void smell() {\n\t\t\n\t}", "@Override\n\tprotected void prepare() {\n\t\t\n\t}", "protected abstract Set method_1559();", "@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 final void mo51373a() {\n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "private void kk12() {\n\n\t}", "@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\n\t}", "@Override\n\tpublic void jugar() {}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "@Override\n protected void init() {\n }", "StackManipulation cached();", "void unableToListContents();", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public abstract void mo70713b();", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "public abstract void mo56925d();", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "@Override\n public void preprocess() {\n }", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n public void onCancelled(CancelledException arg0) {\n }", "@Override\n public void onCancelled(CancelledException arg0) {\n }", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "public abstract void wrapup();", "@Override\n public void preprocess() {\n }", "protected MetadataUGWD() {/* intentionally empty block */}", "private Util() { }", "protected void h() {}", "@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 public void function()\n {\n }", "@Override\n public void function()\n {\n }", "private CanonizeSource() {}", "@Override\n\tpublic void apply() {\n\t\t\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "private void level7() {\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public abstract void mo27386d();", "@Override\r\n\tpublic String swim() {\n\t\treturn null;\r\n\t}", "public boolean method_218() {\r\n return false;\r\n }", "public void method_6349() {\r\n super.method_6349();\r\n }", "@Override\n public int describeContents() { return 0; }", "public abstract void mo27385c();", "@Override\n public S trySplit(){\n return null;\n }", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "private ArraySetHelper() {\n\t\t// nothing\n\t}", "zzafe mo29840Y() throws RemoteException;", "@Override\n\tpublic void nghe() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "public abstract void mo6549b();", "private FlyWithWings(){\n\t\t\n\t}" ]
[ "0.5850253", "0.5637089", "0.55861795", "0.5576416", "0.5451391", "0.5442709", "0.53848296", "0.5375943", "0.53618425", "0.5347583", "0.531278", "0.5255396", "0.52483904", "0.52435344", "0.52425987", "0.5234579", "0.5225885", "0.5224578", "0.5194762", "0.5194762", "0.5187079", "0.51798964", "0.51709026", "0.51685286", "0.515703", "0.5156367", "0.5147191", "0.5132345", "0.5128204", "0.5092448", "0.5091024", "0.5086145", "0.5077556", "0.5077556", "0.5074465", "0.5068781", "0.5060511", "0.50580853", "0.50542766", "0.5052484", "0.5048195", "0.50451785", "0.5028571", "0.50180185", "0.50180185", "0.4991662", "0.49897352", "0.49698243", "0.49654126", "0.49628827", "0.495037", "0.4950074", "0.49374086", "0.4926008", "0.49192107", "0.49041608", "0.48939425", "0.48865482", "0.48619255", "0.48619255", "0.48574093", "0.485625", "0.485541", "0.48466417", "0.4839341", "0.48362127", "0.48337924", "0.48336127", "0.48318714", "0.48318714", "0.48318714", "0.48318714", "0.48318714", "0.48318714", "0.48186755", "0.48186755", "0.48186266", "0.48183858", "0.4817923", "0.48167473", "0.48160762", "0.48127452", "0.48025024", "0.48005754", "0.47972032", "0.47914118", "0.47891134", "0.4783759", "0.47832832", "0.478263", "0.47783813", "0.47768041", "0.47756273", "0.47756273", "0.4774854", "0.47676462", "0.47659084", "0.47589585", "0.47546643", "0.47543165", "0.47474536" ]
0.0
-1
Return my NbaLogger implementation (e.g. NbaLogService).
protected NbaLogger getLogger() { if (logger == null) { try { logger = NbaLogFactory.getLogger(this.getClass()); } catch (Exception e) { NbaBootLogger.log(this.getClass().getName() + " could not get a logger from the factory."); e.printStackTrace(System.out); } } return logger; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static NbaLogger getLogger() {\n\t\tif (logger == null) {\n\t\t\ttry {\n\t\t\t\tlogger = NbaLogFactory.getLogger(NbaCyberPrintRequests.class.getName());\n\t\t\t} catch (Exception e) {\n\t\t\t\tNbaBootLogger.log(\"NbaCyberPrintRequests could not get a logger from the factory.\");\n\t\t\t\te.printStackTrace(System.out);\n\t\t\t}\n\t\t}\n\t\treturn logger;\n\t}", "protected abstract ILogger getLogger();", "public static Log getLoggerBase() {\r\n Log l = null;\r\n if (isRunning()) {\r\n l = getInstance().getLogBase();\r\n }\r\n return l;\r\n }", "protected abstract Logger getLogger();", "private final AbstractC33303b getLogger() {\n AbstractC32572g gVar = this.logger$delegate;\n AbstractC32607k kVar = $$delegatedProperties[2];\n return (AbstractC33303b) gVar.mo102348b();\n }", "public AstractLogger getDefaultLogger()\n {\n return new DefaultLogger();\n }", "abstract public LoggingService getLoggingService();", "public RevisorLogger getLogger();", "protected TechnicalLoggerService getLoggerService() {\n\n return new TechnicalLoggerService() {\n\n @Override\n public void log(Class<?> callerClass, TechnicalLogSeverity severity, String message, Throwable t) {\n // TODO Auto-generated method stub\n\n }\n\n @Override\n public void log(Class<?> callerClass, TechnicalLogSeverity severity, String message) {\n // TODO Auto-generated method stub\n\n }\n\n @Override\n public void log(Class<?> callerClass, TechnicalLogSeverity severity, Throwable t) {\n // TODO Auto-generated method stub\n\n }\n\n @Override\n public boolean isLoggable(Class<?> callerClass, TechnicalLogSeverity severity) {\n // TODO Auto-generated method stub\n return false;\n }\n };\n\n\n }", "private Logger getLogger() {\n return LoggingUtils.getLogger();\n }", "public Logger getLogger() {\n //depending on the subclass, we'll get a particular logger.\n Logger logger = createLogger();\n\n //could do other operations on the logger here\n return logger;\n }", "public Logger getLogger() {\t\t\n\t\treturn logger = LoggerFactory.getLogger(getClazz());\n\t}", "public Logger getLogger()\n/* */ {\n/* 77 */ if (this.logger == null) {\n/* 78 */ this.logger = Hierarchy.getDefaultHierarchy().getLoggerFor(this.name);\n/* */ }\n/* 80 */ return this.logger;\n/* */ }", "@Override\n public MagicLogger getLogger() {\n return logger;\n }", "private static Logger getLogger() {\n return LogDomains.getLogger(ClassLoaderUtil.class, LogDomains.UTIL_LOGGER);\n }", "Object createLogger(String name);", "public static Logger getLogger()\n {\n if (logger == null)\n {\n Log.logger = LogManager.getLogger(BAG_DESC);\n }\n return logger;\n }", "public Logger logger()\n\t{\n\t\tif (logger == null)\n\t\t{\n\t\t\tlogger = new Logger(PluginRegionBlacklist.this.getClass().getCanonicalName(), null)\n\t\t\t{\n\t\t\t\tpublic void log(LogRecord logRecord)\n\t\t\t\t{\n\n\t\t\t\t\tlogRecord.setMessage(loggerPrefix + logRecord.getMessage());\n\t\t\t\t\tsuper.log(logRecord);\n\t\t\t\t}\n\t\t\t};\n\t\t\tlogger.setParent(getLogger());\n\t\t}\n\t\treturn logger;\n\t}", "public static Log getLogger() {\r\n Log l = null;\r\n if (isRunning()) {\r\n l = getInstance().getLog();\r\n }\r\n return l;\r\n }", "protected Logger getLogger() {\n return LoggerFactory.getLogger(getClass());\n }", "public static Logger get() {\n\t\treturn LoggerFactory.getLogger(WALKER.getCallerClass());\n\t}", "public interface NSAutoLogger {\n\n void info(String msg);\n \n void info(String msg, Color color);\n\n void error(String msg);\n\n void debug(String msg);\n}", "protected abstract Logger newInstance(String name);", "protected Logger getLogger(final Class<?> klaz) {\n\t\treturn MavenLoggerFactory.getLogger(klaz, getLog());\n\t}", "public MCBLogger getLogger() {\n return logger;\n }", "@Override\n\tprotected Logger getLogger() {\n\t\treturn HMetis.logger;\n\t}", "private static Logger getLogger() {\n if (logger == null) {\n try {\n new transactionLogging();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return logger;\n }", "protected Log getLogger() {\n return LOGGER;\n }", "protected static Logger log() {\n return LogSingleton.INSTANCE.value;\n }", "@Override\n protected Logger getLogger() {\n return LOGGER;\n }", "private Logger getLogger() {\n return LoggerFactory.getLogger(ApplicationManager.class);\n }", "LogService getLogService( ) {\n\n return config.getLogService();\n }", "@Override\r\n\tpublic Logger getLogger() {\r\n\t\t\r\n\t\treturn LogFileGenerator.getLogger();\r\n\t\t\r\n\t}", "public static Logger getLogger() {\r\n\t\tif (log == null) {\r\n\t\t\tinitLogs();\r\n\t\t}\r\n\t\treturn log;\r\n\t}", "public BaseLogger getLogger() {\r\n\t\treturn logger;\r\n\t}", "protected Logger getLogger() {\n return (logger);\n }", "@Override\n\tprotected PublicationControlLogger getLogger() {\n\t\treturn logger;\n\t}", "public static MSULogger getLogger(final String strLogger) {\n\t\t\tif (instance == null) {\n\t\t\t\tinstance = new MSULogger(strLogger);\n\t\t\t}\n\t\t\treturn instance;\n\t\t}", "private ExtentLogger() {}", "public static Logger getInstance(){\n if (shareInstance == null) {\n shareInstance = new Logger();\n }\n return shareInstance;\n }", "public static BackupLogger getLogger() {\n\t\tif (BackupLogger.logger == null) BackupLogger.logger = new BackupLogger();\n\t\treturn BackupLogger.logger;\n\t}", "public BuildLogger getLogger ( ) {\n @SuppressWarnings ( \"unchecked\" ) final List<? extends BuildListener> listeners = getProject ( ).getBuildListeners ( ) ;\n assert listeners.size ( ) > 0 ;\n return (BuildLogger) listeners.get ( 0 ) ;\n }", "public Logger getLogger() {\n\treturn _logger;\n }", "@Nonnull\n ScriptLogger getLogger();", "public interface LogFactory {\n\n /**\n * Check if logger class is compatible with the log factory.\n *\n * @param loggerClass logger class\n * @return true if compatible and false - otherwise\n */\n boolean isCompatible(Class<?> loggerClass);\n\n /**\n * Create logger with the given name (as configuration parameter).\n *\n * @param name logger name\n * @return logger instance\n */\n Object createLogger(String name);\n\n /**\n * Create logger with the given class (as configuration parameter).\n *\n * @param clazz class\n * @return logger instance\n */\n Object createLogger(Class<?> clazz);\n\n}", "protected Logger getLogger() {\n if (logger == null) {\n logger = Logger.getLogger(getClass().getName());\n }\n return logger;\n }", "public Logger getLogger(){\n\t\treturn logger;\n\t}", "public static Logger getInstance(String name) {\n return getDefaultFactory().newInstance(name);\n }", "public interface Logger {\n\tpublic void log(String msg);\n}", "public LogHandler createDefaultLogHandler() {\r\n return new JavaLoggingHandler();\r\n }", "public static LoggerProxy getRootLogger() {\r\n\t\treturn new LoggerProxy(LogManager.getRootLogger());\r\n\t}", "public Logger getLogger()\n\t{\n\t\treturn logger;\n\t}", "public Logger getLogger() {\n return logger;\n }", "Object createLogger(Class<?> clazz);", "public Logger getLogger()\n {\n return this.logger;\n }", "@Override\n public Logger getLogger(String type) throws IllegalArgumentException {\n if (!type.equals(\"CONSOLE\")) {\n throw new IllegalArgumentException(type);\n } else {\n return new ConsoleLogger();\n }\n }", "private synchronized ILogger getLogger()\n {\n if( _logger == null )\n _logger = ClearLogFactory.getLogger( ClearLogFactory.PERSIST_LOG,\n this.getClass() );\n return _logger;\n }", "public final Logger getLogger() {\r\n return this.logger;\r\n }", "public static LogService getInstance() throws Exception\n {\n synchronized(LogService.class)\n {\n if (LogManager == null)\n {\n LogManager = new LogService();\n }\n }\n\n return LogManager;\n }", "public Logger getLogger() {\n return logger;\n }", "public static Log getLogger(Class cls) {\n return new Log4jLogger(cls);\n }", "public String getLogClassName() {\n if (this.logClassName == null) {\n discoverLogImplementation(getClass().getName());\n }\n return this.logClassName;\n }", "public ReportiumClient createLoggerClient() {\n return new LoggerReportiumClient();\n }", "public interface Logger {\n public void writeLog();\n}", "public interface Logger\n{\n /**\n * Returns the name of the object.\n *\n * @return name of the Logger class\n */\n public String getName();\n\n /**\n * Rerturns the time of the object.\n *\n * @return time of the Logger object\n */\n public double getTime();\n}", "private final Log getLogBase() {\r\n return this.logBase;\r\n }", "public Logger (){}", "public static LogProvider getLogProvider() {\n\t\treturn provider;\n\t}", "public static final Logger createLogger() {\n\t\tLogger logger = Logger.getLogger(ProcessDatabase.class.getName());\n\t\ttry {\n\t\t\tFileHandler fh = new FileHandler();\n\t\t\tfh.setFormatter(new SimpleFormatter());\n\t\t\tlogger.addHandler(fh);\n\t\t} catch (SecurityException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn logger;\n\t}", "public static Logger getLogger(Class<?> baseClass) {\n\t\ttry {\n\t\t\tLogger logger = Logger.getLogger(baseClass.getName());\n\t\t\tHandler fileHandler = new FileHandler(PATTERN, APPEND);\n\t\t\tlogger.addHandler(fileHandler);\n\t\t\treturn logger;\n\t\t} catch (IOException e) {\n\t\t\treturn Logger.getLogger(baseClass.getName());\n\t\t}\n\t}", "@Override\n public LoggerBackend create(String loggingClassName) {\n Logger logger = (Logger) LogManager.getLogger(loggingClassName.replace('$', '.'));\n return new Log4j2LoggerBackend(logger);\n }", "private SAMLDefaultLogger getSamlLogger() {\n\t\tif (samlLogger == null) {\n\t\t\tsamlLogger = new SAMLDefaultLogger();\n\t\t}\n\t\treturn samlLogger;\n\t}", "private Logger(){ }", "public interface LogConfig {\n\tLogCfg getLogCfg();\n}", "public interface LoggerUtil {\n\t/**\n\t * Set the logger for the controller\n\t * \n\t * @param logName\n\t * @param filePath\n\t * @param logLevel\n\t * @return\n\t */\n\tLogger loggerArrangement(String logName, String filePath, LogeLevel logLevel);\n}", "public MyLogger () {}", "public static Logger getInstance() {\n if (logger == null)\n logger = Logger.getLogger(Logger.GLOBAL_LOGGER_NAME);\n return logger;\n }", "public String getLoggerName() {\n return \"test\";\n }", "public static Logger getLogger(Class<?> clazz){\r\n if(clazz == null){\r\n // this condition will happen if the class has not been initialized\r\n return Logger.getRootLogger();\r\n }\r\n return Logger.getLogger(clazz.getPackage().getName());\r\n }", "public interface FsmLogger {\n\t/**\n\t * Get name of the logger.\n\t * \n\t * @return the name\n\t */\n\tpublic String getName();\n\n\t/**\n\t * Log a fatal message.\n\t * \n\t * @param message\n\t * the message\n\t */\n\tpublic void fatal(String message);\n\n\t/**\n\t * Log a fatal message.\n\t * \n\t * @param message\n\t * the message\n\t * @param throwable\n\t * a throwable object\n\t */\n\tpublic void fatal(String message, Throwable throwable);\n\n\t/**\n\t * Log an error message.\n\t * \n\t * @param message\n\t * the message\n\t */\n\tpublic void error(String message);\n\n\t/**\n\t * Log an error message.\n\t * \n\t * @param message\n\t * the message\n\t * @param throwable\n\t * a throwable object\n\t */\n\tpublic void error(String message, Throwable throwable);\n\n\t/**\n\t * Log a warning message.\n\t * \n\t * @param message\n\t * the message\n\t */\n\tpublic void warn(String message);\n\n\t/**\n\t * Log a warning message.\n\t * \n\t * @param message\n\t * the message\n\t * @param throwable\n\t * a throwable object\n\t */\n\tpublic void warn(String message, Throwable throwable);\n\n\t/**\n\t * Log an info message.\n\t * \n\t * @param message\n\t * the message\n\t */\n\tpublic void info(String message);\n\n\t/**\n\t * Log an info message.\n\t * \n\t * @param message\n\t * the message\n\t * @param throwable\n\t * a throwable object\n\t */\n\tpublic void info(String message, Throwable throwable);\n\n\t/**\n\t * Log a debug message.\n\t * \n\t * @param message\n\t * the message\n\t */\n\tpublic void debug(String message);\n\n\t/**\n\t * Log a debug message.\n\t * \n\t * @param message\n\t * the message\n\t * @param throwable\n\t * a throwable object\n\t */\n\tpublic void debug(String message, Throwable throwable);\n\n\t/**\n\t * Log a trace message.\n\t * \n\t * @param message\n\t * the message\n\t */\n\tpublic void trace(String message);\n\n\t/**\n\t * Log a trace message.\n\t * \n\t * @param message\n\t * the message\n\t * @param throwable\n\t * a throwable object\n\t */\n\tpublic void trace(String message, Throwable throwable);\n\n\t/**\n\t * Get status of info messages logging in this logger.\n\t * \n\t * @return true if logging of info messages is enabled otherwise false\n\t */\n\tpublic boolean isInfoEnabled();\n\n\t/**\n\t * Get status of debug messages logging in this logger.\n\t * \n\t * @return true if logging of debug messages is enabled otherwise false\n\t */\n\tpublic boolean isDebugEnabled();\n\n\t/**\n\t * Get status of trace messages logging in this logger.\n\t * \n\t * @return true if logging of trace messages is enabled otherwise false\n\t */\n\tpublic boolean isTraceEnabled();\n}", "@Override\n public Logger getLog(Class clazz) {\n return new Slf4jLogger(LoggerFactory.getLogger(clazz));\n }", "public Logger log() {\n return LOG;\n }", "private static Logger createLogger(String className) {\n\n /*\n * No need to set level values explicitly. This is managed in the\n * standard way by java.util.logging.LogManager.\n */\n Logger logger = Logger.getLogger(className);\n\n /*\n * We've debated permitting the logger to use parental handlers, which\n * would permit using the standard java.util.logging policy of setting\n * tbe property com.sleepycat.je.handlers as a way of customizing\n * handlers. This was not useful because of the need to specify\n * handlers per environment, and also caused a process monitor echo\n * issue within NoSQL DB.\n */\n logger.setUseParentHandlers(false);\n\n return logger;\n }", "public static TournamentLogger createDummyLogger(){\n\t\tTournamentLogger logger = new TournamentLogger();\n\t\tlogger.setEventLogPath(null);\n\t\tlogger.setPrintStdOut(false);\n\t\tlogger.setPrintStdErr(false);\n\t\treturn logger;\n\t}", "Logger getLogger(final String loggerName);", "public static LogUtil getLogUtil()\n {\n if(logUtilsObj == null)\n {\n logUtilsObj = new LogUtil();\n }\n\n return logUtilsObj;\n }", "public static LoggerService getLog() {\n\t\tif (log == null) {\n\t\t\t//standard error stream is redirect to the nginx error log file, so we just use System.err as output stream.\n\t\t\tlog = TinyLogService.createDefaultTinyLogService();\n\t\t}\n\t\treturn log;\n\t}", "public static Log getLogger(final Class<?> clazz) {\r\n Log l = null;\r\n if (isRunning()) {\r\n l = getInstance().getLog(clazz.getName());\r\n }\r\n return l;\r\n }", "protected Log getLog()\n/* */ {\n/* 59 */ return log;\n/* */ }", "RootMessageLogger getRootMessageLogger();", "static Trace getLogger(String name)\n {\n return new Trace(Logger.getLogger(name));\n }", "Logger getLog(Class clazz);", "@Override\n\tpublic CreditrepayplanLog getLogInstance() {\n\t\treturn new CreditrepayplanLog();\n\t}", "private static Log getLog() {\n if (log == null) {\n log = new SystemStreamLog();\n }\n\n return log;\n }", "protected AbstractLogger() {\n \n }", "public Loggable getLoggable() throws StandardException;", "public interface Logger {\n void enable(boolean enabled);\n\n void d(String s, Object... args);\n\n void i(String s, Object... args);\n\n void w(String s, Object... args);\n\n void e(Throwable e, String s, Object... args);\n}", "private Logger() {\n\n }", "private LoggerSingleton() {\n\n }", "public static Log getLogger(final String key) {\r\n Log l = null;\r\n if (isRunning()) {\r\n l = getInstance().getLog(key);\r\n }\r\n return l;\r\n }" ]
[ "0.75140125", "0.6898219", "0.6892901", "0.67883223", "0.67881256", "0.6745573", "0.67039585", "0.6591696", "0.6580939", "0.6569928", "0.6568218", "0.6540062", "0.65307087", "0.6509694", "0.649094", "0.6490446", "0.6421679", "0.6419893", "0.64093286", "0.63866895", "0.63796073", "0.63597727", "0.63393843", "0.63314754", "0.63265026", "0.6325946", "0.6324935", "0.62946427", "0.6283436", "0.6281407", "0.6254189", "0.6244853", "0.62111574", "0.61979717", "0.6185503", "0.61198187", "0.6119476", "0.61160094", "0.6084165", "0.60766476", "0.60723346", "0.6064445", "0.60541767", "0.6050334", "0.60413474", "0.6034197", "0.6025567", "0.6023799", "0.60068506", "0.60039043", "0.5984869", "0.5958418", "0.59381133", "0.59323853", "0.5919502", "0.5907538", "0.5904977", "0.589001", "0.5881675", "0.587898", "0.5870179", "0.58672756", "0.5865821", "0.5864898", "0.58520067", "0.58397883", "0.583224", "0.58290756", "0.58127403", "0.5811439", "0.58051455", "0.5804442", "0.57875127", "0.5760006", "0.5748147", "0.57473576", "0.57462597", "0.57412714", "0.57336503", "0.57248664", "0.57207566", "0.57145935", "0.57026273", "0.5696542", "0.56925154", "0.568496", "0.5679769", "0.56778777", "0.566869", "0.56674236", "0.56643325", "0.5655245", "0.56397223", "0.56294405", "0.5627719", "0.56230325", "0.5621673", "0.5615401", "0.5611335", "0.56022346" ]
0.7514215
0
Create a TX Request value object that will be used to retrieve the contract.
public NbaTXRequestVO createRequestObject(NbaDst nbaDst, int access, String businessProcess, NbaUserVO user) { NbaTXRequestVO nbaTXRequest = new NbaTXRequestVO(); nbaTXRequest.setTransType(NbaOliConstants.TC_TYPE_HOLDINGINQ); nbaTXRequest.setTransMode(NbaOliConstants.TC_MODE_ORIGINAL); nbaTXRequest.setInquiryLevel(NbaOliConstants.TC_INQLVL_OBJECTALL); nbaTXRequest.setNbaLob(nbaDst.getNbaLob()); nbaTXRequest.setNbaUser(user); nbaTXRequest.setWorkitemId(nbaDst.getID()); nbaTXRequest.setCaseInd(nbaDst.isCase()); if (access != -1) { nbaTXRequest.setAccessIntent(access); } if (businessProcess != null) { nbaTXRequest.setBusinessProcess(businessProcess); } return nbaTXRequest; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TxnRequestProto.TxnRequest getTxnrequest();", "private TransactionRequest initTransactionRequest() {\n TransactionRequest transactionRequestNew = new\n TransactionRequest(System.currentTimeMillis() + \"\", 20000);\n\n //set customer details\n transactionRequestNew.setCustomerDetails(initCustomerDetails());\n\n\n // set item details\n ItemDetails itemDetails = new ItemDetails(\"1\", 20000, 1, \"Trekking Shoes\");\n\n // Add item details into item detail list.\n ArrayList<ItemDetails> itemDetailsArrayList = new ArrayList<>();\n itemDetailsArrayList.add(itemDetails);\n transactionRequestNew.setItemDetails(itemDetailsArrayList);\n\n\n // Create creditcard options for payment\n CreditCard creditCard = new CreditCard();\n\n creditCard.setSaveCard(false); // when using one/two click set to true and if normal set to false\n\n// this methode deprecated use setAuthentication instead\n// creditCard.setSecure(true); // when using one click must be true, for normal and two click (optional)\n\n creditCard.setAuthentication(CreditCard.AUTHENTICATION_TYPE_3DS);\n\n // noted !! : channel migs is needed if bank type is BCA, BRI or MyBank\n// creditCard.setChannel(CreditCard.MIGS); //set channel migs\n creditCard.setBank(BankType.BCA); //set spesific acquiring bank\n\n transactionRequestNew.setCreditCard(creditCard);\n\n return transactionRequestNew;\n }", "public TxnRequestProto.TxnRequest.Builder getTxnrequestBuilder() {\n bitField0_ |= 0x00000001;\n onChanged();\n return getTxnrequestFieldBuilder().getBuilder();\n }", "TxnRequestProto.TxnRequestOrBuilder getTxnrequestOrBuilder();", "private static CreditRequest getRequestDataFromCustomer() {\n\t\treturn new CreditRequest(0, new Vector<Warrantor>(), null, null, null, null);\n\t}", "public static InitializationTransactionRequest from(UnmarshallingContext context) throws IOException {\n\t\tTransactionReference classpath = TransactionReference.from(context);\n\t\tStorageReference manifest = StorageReference.from(context);\n\n\t\treturn new InitializationTransactionRequest(classpath, manifest);\n\t}", "public Builder setTxnrequest(TxnRequestProto.TxnRequest value) {\n if (txnrequestBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n txnrequest_ = value;\n onChanged();\n } else {\n txnrequestBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000001;\n return this;\n }", "public com.vodafone.global.er.decoupling.binding.request.SelfcareTransactionsRequest createSelfcareTransactionsRequest()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.SelfcareTransactionsRequestImpl();\n }", "Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result);", "public com.vodafone.global.er.decoupling.binding.request.SelfcareLiteTransactionsRequest createSelfcareLiteTransactionsRequest()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.SelfcareLiteTransactionsRequestImpl();\n }", "public TxnRequestProto.TxnRequest getTxnrequest() {\n if (txnrequestBuilder_ == null) {\n return txnrequest_;\n } else {\n return txnrequestBuilder_.getMessage();\n }\n }", "public ContractRequest() {\n\t\tsuper(PREFERENCES_NAMES);\n\t}", "public TxnRequestProto.TxnRequestOrBuilder getTxnrequestOrBuilder() {\n if (txnrequestBuilder_ != null) {\n return txnrequestBuilder_.getMessageOrBuilder();\n } else {\n return txnrequest_;\n }\n }", "public Builder setTxnrequest(\n TxnRequestProto.TxnRequest.Builder builderForValue) {\n if (txnrequestBuilder_ == null) {\n txnrequest_ = builderForValue.build();\n onChanged();\n } else {\n txnrequestBuilder_.setMessage(builderForValue.build());\n }\n bitField0_ |= 0x00000001;\n return this;\n }", "public Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result) {\n throw new NO_IMPLEMENT(reason);\n }", "public void createValue() {\n value = new AES_GetBusa_Lib_1_0.AES_GetBusa_Request();\n }", "com.google.protobuf.ByteString\n getRequestBytes();", "private static byte[] createRequest(String name, String requestType) {\n\n // Creates the header for the request\n byte[] header = createHeader();\n\n // Creates the query for the request\n byte[] query = createQuery(name, requestType);\n\n // Final Packet.\n byte[] request = new byte[header.length + query.length];\n\n // Byte Buffers provide useful utilities.\n ByteBuffer rqBuf = ByteBuffer.wrap(request);\n\n // Combine header and query\n rqBuf.put(header);\n rqBuf.put(query);\n\n return request;\n }", "TypedRequest createTypedRequest();", "public com.vodafone.global.er.decoupling.binding.request.GetParentTransactionRequest createGetParentTransactionRequest()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.GetParentTransactionRequestImpl();\n }", "public String toXMLString() {\r\n\t\tswitch (this.transactionType) {\r\n\t\tcase GET_SETTLED_BATCH_LIST :\r\n\t\t\tgetSettledBatchListRequest();\r\n\t\t\tbreak;\r\n\t\tcase GET_TRANSACTION_DETAILS :\r\n\t\t\tgetTransactionDetailsRequest();\r\n\t\t\tbreak;\r\n\t\tcase GET_TRANSACTION_LIST :\r\n\t\t\tgetTransactionListRequest();\r\n\t\t\tbreak;\r\n\t\tcase GET_BATCH_STATISTICS :\r\n\t\t\tgetBatchStatisticsRequest();\r\n\t\t\tbreak;\r\n\t\tcase GET_UNSETTLED_TRANSACTION_LIST :\r\n\t\t\tgetUnsettledTransactionListRequest();\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn currentRequest.dump();\r\n\t}", "public TxnRequestProto.TxnRequest getTxnrequest() {\n return txnrequest_;\n }", "Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result,\n ExceptionList exclist,\n ContextList ctxlist);", "@Override\n\tpublic WebApiRequest getRequest() {\n\t\tString category = \"\";\n\t\tString destination = \"\";\n\t\tJSONObject para = new JSONObject();\n\t\tif (taskFlag == GET_BALANCE_DETAIL_FLAG) {\n\t\t\tcategory = CATEGORY_NAME;\n\t\t\tdestination = GET_BALANCE_Detail;\n\t\t\ttry {\n\t\t\t\tpara.put(\"ID\", getIntent().getIntExtra(\"BalanceID\", 0));\n\t\t\t\tpara.put(\"CardType\", getIntent().getIntExtra(\"CardType\", 1));\n\t\t\t\tpara.put(\"ChangeType\", getIntent().getIntExtra(\"ChangeType\", 0));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tWebApiHttpHead header = mApp.createNeededCheckingWebConnectHead(category, destination, para.toString());\n\t\tWebApiRequest request = new WebApiRequest(category, destination,para.toString(), header);\n\t\treturn request;\n\t}", "private com.google.protobuf.SingleFieldBuilder<\n TxnRequestProto.TxnRequest, TxnRequestProto.TxnRequest.Builder, TxnRequestProto.TxnRequestOrBuilder>\n getTxnrequestFieldBuilder() {\n if (txnrequestBuilder_ == null) {\n txnrequestBuilder_ = new com.google.protobuf.SingleFieldBuilder<\n TxnRequestProto.TxnRequest, TxnRequestProto.TxnRequest.Builder, TxnRequestProto.TxnRequestOrBuilder>(\n txnrequest_,\n getParentForChildren(),\n isClean());\n txnrequest_ = null;\n }\n return txnrequestBuilder_;\n }", "public TxnRequestProto.TxnRequestOrBuilder getTxnrequestOrBuilder() {\n return txnrequest_;\n }", "void createRequest(EnumOperationType opType, IParameter parameter);", "public Request() {\n this.setRequestId(newRequestId());\n this.setRequestValue(0.0);\n this.date = new Date();\n }", "public Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result,\n ExceptionList exceptions,\n ContextList contexts) {\n throw new NO_IMPLEMENT(reason);\n }", "public static TemplatePushRequest newRequest() {\n return new TemplatePushRequest();\n }", "public Contract create(){\n\t\treturn new Contract();\n\t}", "public com.vodafone.global.er.decoupling.binding.request.SelfcareTransactionsRequestType createSelfcareTransactionsRequestType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.SelfcareTransactionsRequestTypeImpl();\n }", "public com.vodafone.global.er.decoupling.binding.request.TransactionType createTransactionType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.TransactionTypeImpl();\n }", "public CreateOrderRequest() {\n\t\t_pcs = new PropertyChangeSupport(this);\n\t}", "public com.vodafone.global.er.decoupling.binding.request.GetDetailsForExternalTransactionRequest createGetDetailsForExternalTransactionRequest()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.GetDetailsForExternalTransactionRequestImpl();\n }", "public com.vodafone.global.er.decoupling.binding.request.GetTaxRequest createGetTaxRequest()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.GetTaxRequestImpl();\n }", "private Tx createTransaction(BitCoinResponseDTO btcDTO, SellerBitcoinInfo sbi) {\n\t\t\n\t\tTx tx = new Tx();\n\t\t\n\t\t\n\t\ttx.setDate(new Date());\n\t\ttx.setAmountOfMoney(btcDTO.getPrice_amount());\n\t\ttx.setStatus(TxStatus.PENDING);\n\t\ttx.setRecieverAddress(btcDTO.getPayment_url());\n\t\ttx.setorder_id(btcDTO.getId()); //ovaj id je na coin gate-u i moram ga cuvati u transakciji\n\t\ttx.setTxDescription(\"Porudzbina je kreirana od strane korisnika\");\n\t\ttx.setSbi(sbi);\n\t\t\n\t\t//trebace ovde jos da se setuje id korisnika koji je kreirao porudzbinu kako bi kasnije mogao da getuje sve\n\t\t//njegove transakcije\n\t\t\n\t\t\n\t\treturn tx;\n\t\t\n\t}", "private void getTransactionDetailsRequest() {\r\n\t\tBasicXmlDocument document = new BasicXmlDocument();\r\n\t\tdocument.parseString(\"<\" + TransactionType.GET_TRANSACTION_DETAILS.getValue()\r\n\t\t\t\t+ \" xmlns = \\\"\" + XML_NAMESPACE + \"\\\" />\");\r\n\r\n\t\taddAuthentication(document);\r\n\t\taddReportingTransactionId(document);\r\n\r\n\t\tcurrentRequest = document;\r\n\t}", "private MarketDataRequest generateRequestFromAtom(MarketDataRequestAtom inAtom,\n MarketDataRequest inCompleteRequest)\n {\n return MarketDataRequestBuilder.newRequest().withAssetClass(inCompleteRequest.getAssetClass()).withSymbols(inAtom.getSymbol()).withContent(inAtom.getContent()).withExchange(inAtom.getExchange()).create();\n }", "TransmissionProtocol.RequestOrBuilder getRequestOrBuilder(\n int index);", "public com.vodafone.global.er.decoupling.binding.request.GetServiceRequest createGetServiceRequest()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.GetServiceRequestImpl();\n }", "com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();", "public com.vodafone.global.er.decoupling.binding.request.SelfcareLiteTransactionsRequestType createSelfcareLiteTransactionsRequestType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.SelfcareLiteTransactionsRequestTypeImpl();\n }", "public Request(NodeIdentifier sender, int type, int key, int value, int clientSequenceID){\n\t\tsuper(sender);\n\t\tthis.type = type;\n\t\tthis.key = key;\n\t\tthis.value = value;\n\t\t\n\t\tthis.clientID = sender.getID();\n\t\tthis.clientSequenceID = clientSequenceID;\n\t}", "public com.vodafone.global.er.decoupling.binding.request.ErRequest createErRequest()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.ErRequestImpl();\n }", "public T getRequestData();", "TransactionType createTransactionType();", "public com.vodafone.global.er.decoupling.binding.request.GetParentTransactionRequestType createGetParentTransactionRequestType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.GetParentTransactionRequestTypeImpl();\n }", "public UBERequest() {\r\n }", "public SystemRequest(@NonNull RequestType requestType){\r\n\t\tthis();\r\n\t\tsetRequestType(requestType);\r\n\t}", "public interface IRequest {\n\t/**\n\t * This method creates request based on operationType and parameter object.\n\t * @param opType operation type of the request to be created.\n\t * @param params List of parameters to be sent along with the request.\n\t */\n\tvoid createRequest(EnumOperationType opType, IParameter parameter);\n\t\n\t/**\n\t * This method retrieves operation type of the the request.\n\t * \n\t * @return operation type\n\t */\n\tEnumOperationType getOperationType();\n\t\n\t/**\n\t * This method retrieves the parameters object configured for the request.\n\t */\n\tIParameter getParameter();\n\t\n\t/**\n\t * This method allows user to get configured request in XML.\n\t * \n\t * @return\n\t * @throws Exception \n\t */\n\tpublic String getRequestInXML() throws Exception;\n\t\n\t/**\n\t * This method parses XML and creates a request object out of it. \n\t */\n\tpublic void parseXML(String XML);\n\t\n\tpublic void setId(String id);\n\t\n\tpublic String getId();\n}", "protected final Transaction createTransaction(TransactionTypeKeys type) {\n\t\tTransaction trans = null;\n\t\tString payee = getForm().getPayFrom();\n\t\tdouble amount = parseAmount();\n\n\t\t// Put amount in proper form.\n\t\tif ((type == INCOME && amount < 0.0)\n\t\t\t\t|| (type == EXPENSE && amount >= 0.0)) {\n\t\t\tamount = -amount;\n\t\t}\n\n\t\t// Put payee in proper form.\n\t\tpayee = purgeIdentifier(payee);\n\n\t\ttrans = new Transaction(getForm().getField(CHECK_NUMBER).getText(),\n\t\t\t\tparseDate(), payee, Money.of(amount,\n\t\t\t\t\t\tUI_CURRENCY_SYMBOL.getCurrency()), getCategory(),\n\t\t\t\tgetForm().getField(NOTES).getText());\n\n\t\t// Set attributes not applicable in the constructor.\n\t\ttrans.setIsReconciled(getForm().getButton(PENDING).isSelected() == false);\n\n\t\tif (isInEditMode() == true) {\n\t\t\ttrans.setLabel(getEditModeTransaction().getLabel());\n\t\t}\n\n\t\treturn trans;\n\t}", "TransmissionProtocol.Request getRequest(int index);", "@Override\n public ByteBuffer buildRequestPacket() {\n\n ByteBuffer sendData = ByteBuffer.allocate(128);\n sendData.putLong(this.connectionId); // connection_id - can't change (64 bits)\n sendData.putInt(getActionNumber()); // action we want to perform - connecting with the server (32 bits)\n sendData.putInt(getTransactionId()); // transaction_id - random int we make (32 bits)\n\n return sendData;\n }", "public final process.proxies.RequestCreation getRequestCreation()\r\n\t{\r\n\t\treturn getRequestCreation(getContext());\r\n\t}", "public boolean requestTransaction(String name,String reason,double amount){\n Transaction t1 = new Transaction(name,reason,amount);\n boolean done=t1.registertransaction();\n \n return done; \n \n}", "public SveaRequest<SveaCloseOrder> prepareRequest() {\n String errors = validateRequest();\n \n if (!errors.equals(\"\")) {\n throw new SveaWebPayException(\"Validation failed\", new ValidationException(errors));\n }\n \n // build inspectable request object and insert into order builder\n SveaCloseOrder sveaCloseOrder = new SveaCloseOrder();\n sveaCloseOrder.Auth = getStoreAuthorization();\n SveaCloseOrderInformation orderInfo = new SveaCloseOrderInformation();\n orderInfo.SveaOrderId = order.getOrderId();\n sveaCloseOrder.CloseOrderInformation = orderInfo;\n \n SveaRequest<SveaCloseOrder> object = new SveaRequest<SveaCloseOrder>();\n object.request = sveaCloseOrder;\n \n return object;\n }", "private void getTransactionListRequest() {\r\n\t\tBasicXmlDocument document = new BasicXmlDocument();\r\n\t\tdocument.parseString(\"<\" + TransactionType.GET_TRANSACTION_LIST.getValue()\r\n\t\t\t\t+ \" xmlns = \\\"\" + XML_NAMESPACE + \"\\\" />\");\r\n\r\n\t\taddAuthentication(document);\r\n\t\taddReportingBatchId(document);\r\n\r\n\t\tcurrentRequest = document;\r\n\t}", "protected String getRequestMessage() {\n NbaTXRequestVO nbaTXRequest = new NbaTXRequestVO();\n nbaTXRequest.setTransType(NbaOliConstants.TC_TYPE_MIBFOLLOWUP);\n nbaTXRequest.setTransMode(NbaOliConstants.TC_MODE_ORIGINAL);\n nbaTXRequest.setBusinessProcess(NbaUtils.getBusinessProcessId(getUser()));\n //create txlife with default request fields\n NbaTXLife nbaTXLife = new NbaTXLife(nbaTXRequest);\n TXLife tXLife = nbaTXLife.getTXLife();\n UserAuthRequestAndTXLifeRequest userAuthRequestAndTXLifeRequest = tXLife.getUserAuthRequestAndTXLifeRequest();\n userAuthRequestAndTXLifeRequest.deleteUserAuthRequest();\n TXLifeRequest tXLifeRequest = userAuthRequestAndTXLifeRequest.getTXLifeRequestAt(0);\n \tnbaTXLife.getTXLife().setVersion(NbaOliConstants.OLIFE_VERSION_39_02); \n \tOLifE olife = nbaTXLife.getTXLife().getUserAuthRequestAndTXLifeRequest().getTXLifeRequestAt(0).getOLifE();\n \tolife.setVersion(NbaOliConstants.OLIFE_VERSION_39_02); \n\n tXLifeRequest.setPrimaryObjectID(CARRIER_PARTY_1);\n tXLifeRequest.setMaxRecords(getMibFollowUpMaxRecords());\n tXLifeRequest.setStartRecord(getStartRecord().intValue());\n tXLifeRequest.setStartDate(NbaUtils.addDaysToDate(getStartDate(),-1));\n tXLifeRequest.setEndDate(NbaUtils.addDaysToDate(getEndDate(),-1));\n tXLifeRequest.setTestIndicator(getTestIndicator());\n MIBRequest mIBRequest = new MIBRequest();\n tXLifeRequest.setMIBRequest(mIBRequest);\n MIBServiceDescriptor mIBServiceDescriptor = new MIBServiceDescriptor();\n MIBServiceDescriptorOrMIBServiceConfigurationID mIBServiceDescriptorOrMIBServiceConfigurationID = new MIBServiceDescriptorOrMIBServiceConfigurationID();\n mIBServiceDescriptorOrMIBServiceConfigurationID.addMIBServiceDescriptor(mIBServiceDescriptor);\n mIBRequest.setMIBServiceDescriptorOrMIBServiceConfigurationID(mIBServiceDescriptorOrMIBServiceConfigurationID);\n mIBServiceDescriptor.setMIBService(NbaOliConstants.TC_MIBSERVICE_CHECKING);\n OLifE oLifE = tXLifeRequest.getOLifE();\n Party party = new Party();\n oLifE.addParty(party);\n party.setId(CARRIER_PARTY_1);\n party.setPartyTypeCode(NbaOliConstants.OLIX_PARTYTYPE_CORPORATION);\n party.setPersonOrOrganization(new PersonOrOrganization());\n party.getPersonOrOrganization().setOrganization(new Organization());\n Carrier carrier = new Carrier();\n party.setCarrier(carrier);\n carrier.setCarrierCode(getCurrentCarrierCode());\n String responseMessage = nbaTXLife.toXmlString();\n if (getLogger().isDebugEnabled()) {\n getLogger().logDebug(\"TxLife 404 Request Message:\\n \" + responseMessage);\n }\n return responseMessage;\n }", "public project.software.uni.positionprediction.datatypes.Request requestDataSync(String attributes){\r\n\r\n RequestQueue queue = Volley.newRequestQueue(context);\r\n\r\n RequestFuture<String> requestFuture = RequestFuture.newFuture();\r\n\r\n String url = baseUrl+attributes;\r\n\r\n // Request a string response from the provided URL.\r\n Log.i(\"MovebankRequest\", \"sending string request to \" + url);\r\n\r\n project.software.uni.positionprediction.datatypes.Request request =\r\n new project.software.uni.positionprediction.datatypes.Request(getNextRequestCode());\r\n\r\n StringRequest stringRequest = createStringRequest(request, url, requestFuture, requestFuture);\r\n\r\n // Add the request to the RequestQueue.\r\n requestFuture.setRequest(queue.add(stringRequest));\r\n\r\n try{\r\n String response = requestFuture.get(10, TimeUnit.SECONDS);\r\n request.setResponseStatus(statusMap.remove(new Integer(request.getId())));\r\n request.setResponse(response);\r\n return request;\r\n\r\n } catch (InterruptedException | TimeoutException | ExecutionException e) {\r\n System.out.println(e.toString());\r\n\r\n if(e.getCause() instanceof VolleyError) {\r\n\r\n VolleyError err = (VolleyError) e.getCause();\r\n if(err.networkResponse != null) request.setResponseStatus(err.networkResponse.statusCode);\r\n else request.setResponseStatus(-1);\r\n\r\n } else {\r\n request.setResponseStatus(-1);\r\n }\r\n\r\n return request;\r\n }\r\n }", "private MaskedWalletRequest createStripeMaskedWalletRequest() {\n List<LineItem> lineItems = ((HomeActivity)getActivity()).buildLineItems();\n\n // Calculate the cart total by iterating over the line items.\n String cartTotal = ((HomeActivity)getActivity()).calculateCartTotal(lineItems);\n\n MaskedWalletRequest.Builder builder = MaskedWalletRequest.newBuilder()\n .setMerchantName(\"Merchant Name\")\n .setPhoneNumberRequired(true)\n .setShippingAddressRequired(true)\n .setCurrencyCode(\"USD\")\n .setEstimatedTotalPrice(cartTotal)\n .setCart(Cart.newBuilder()\n .setCurrencyCode(\"USD\")\n .setTotalPrice(cartTotal)\n .setLineItems(lineItems)\n .build());\n\n builder.setPaymentMethodTokenizationParameters(mPaymentMethodParameters);\n\n return builder.build();\n }", "public Builder mergeTxnrequest(TxnRequestProto.TxnRequest value) {\n if (txnrequestBuilder_ == null) {\n if (((bitField0_ & 0x00000001) == 0x00000001) &&\n txnrequest_ != TxnRequestProto.TxnRequest.getDefaultInstance()) {\n txnrequest_ =\n TxnRequestProto.TxnRequest.newBuilder(txnrequest_).mergeFrom(value).buildPartial();\n } else {\n txnrequest_ = value;\n }\n onChanged();\n } else {\n txnrequestBuilder_.mergeFrom(value);\n }\n bitField0_ |= 0x00000001;\n return this;\n }", "org.spin.grpc.util.ClientRequest getClientRequest();", "net.iGap.proto.ProtoRequest.Request getRequest();", "public Transaction getDummyTransaction(String action) {\n\n\t\t// Long payerAccountNum = 111l;\n\t\tLong payerRealmNum = 0l;\n\t\tLong payerShardNum = 0l;\n\t\t// Long nodeAccountNum=123l;\n\t\tLong nodeRealmNum = 0l;\n\t\tLong nodeShardNum = 0l;\n\t\tlong transactionFee = 0l;\n\t\tTimestamp startTime =\n\t\t\t\tRequestBuilder.getTimestamp(Instant.now(Clock.systemUTC()).minusSeconds(13));\n\t\tDuration transactionDuration = RequestBuilder.getDuration(100);\n\t\tboolean generateRecord = false;\n\t\tString memo = \"UnitTesting\";\n\t\tint thresholdValue = 10;\n\t\tList<Key> keyList = new ArrayList<>();\n\t\tKeyPair pair = new KeyPairGenerator().generateKeyPair();\n\t\tbyte[] pubKey = ((EdDSAPublicKey) pair.getPublic()).getAbyte();\n\t\tKey akey =\n\t\t\t\tKey.newBuilder().setEd25519(ByteString.copyFromUtf8((MiscUtils.commonsBytesToHex(pubKey)))).build();\n\t\tPrivateKey priv = pair.getPrivate();\n\t\tkeyList.add(akey);\n\t\tlong initBal = 100;\n\t\tlong sendRecordThreshold = 5;\n\t\tlong receiveRecordThreshold = 5;\n\t\tboolean receiverSign = false;\n\t\tDuration autoRenew = RequestBuilder.getDuration(100);\n\t\t;\n\t\tlong proxyAccountNum = 12345l;\n\t\tlong proxyRealmNum = 0l;\n\t\tlong proxyShardNum = 0l;\n\t\tint proxyFraction = 10;\n\t\tint maxReceiveProxyFraction = 10;\n\t\tlong shardID = 0l;\n\t\tlong realmID = 0l;\n\n\t\tTransaction trx = null;\n\t\tSignatureList sigList = SignatureList.getDefaultInstance();\n\t\tTimestamp timestamp = TestHelper.getDefaultCurrentTimestampUTC();\n\n\t\t/**\n\t\t * SignatureList sigList = SignatureList.getDefaultInstance(); Transaction transferTx =\n\t\t * RequestBuilder.getCryptoTransferRequest( payer.getAccountNum(), payer.getRealmNum(),\n\t\t * payer.getShardNum(), nodeAccount.getAccountNum(), nodeAccount.getRealmNum(),\n\t\t * nodeAccount.getShardNum(), 800, timestamp, transactionDuration, false, \"test\", sigList,\n\t\t * payer.getAccountNum(), -100l, nodeAccount.getAccountNum(), 100l); transferTx =\n\t\t * TransactionSigner.signTransaction(transferTx, accountKeys.get(payer));\n\t\t */\n\n\t\tif (\"SolidityIDQuery\".equalsIgnoreCase(action)) {\n\t\t\ttrx = RequestBuilder.getCryptoTransferRequest(payerAccountId.getAccountNum(),\n\t\t\t\t\tpayerAccountId.getRealmNum(), payerAccountId.getShardNum(), nodeAccountId.getAccountNum(),\n\t\t\t\t\tnodeAccountId.getRealmNum(), nodeAccountId.getShardNum(), 800, timestamp,\n\t\t\t\t\ttransactionDuration, false, \"test\", sigList, payerAccountId.getAccountNum(), -100l,\n\t\t\t\t\tnodeAccountId.getAccountNum(), 100l);\n\t\t\t// trx = TransactionSigner.signTransaction(trx, account2keyMap.get(payerAccountId));\n\t\t}\n\n\t\tif (\"createContract\".equalsIgnoreCase(action)) {\n\t\t\tFileID fileID = FileID.newBuilder().setFileNum(9999l).setRealmNum(1l).setShardNum(2l).build();\n\n\t\t\ttrx = RequestBuilder.getCreateContractRequest(payerAccountId.getAccountNum(),\n\t\t\t\t\tpayerAccountId.getRealmNum(), payerAccountId.getShardNum(), nodeAccountId.getAccountNum(),\n\t\t\t\t\tnodeAccountId.getRealmNum(), nodeAccountId.getShardNum(), 50000000000l, timestamp,\n\t\t\t\t\ttransactionDuration, true, \"createContract\", DEFAULT_CONTRACT_OP_GAS, fileID,\n\t\t\t\t\tByteString.EMPTY, 0, transactionDuration,\n\t\t\t\t\tSignatureList.newBuilder().addSigs(\n\t\t\t\t\t\t\tSignature.newBuilder().setEd25519(ByteString.copyFrom(\"testsignature\".getBytes())))\n\t\t\t\t\t\t\t.build(),\n\t\t\t\t\t\"\");\n\t\t}\n\n\t\t// if(\"SolidityIDQuery\".equalsIgnoreCase(action)) {\n\t\t// long durationInSeconds = DAY_SEC * 30;\n\t\t// * Duration contractAutoRenew = Duration.newBuilder().setSeconds(durationInSeconds).build();\n\t\t// * Timestamp timestamp = TestHelper.getDefaultCurrentTimestampUTC();\n\t\t// * Duration transactionDuration = RequestBuilder.getDuration(30, 0);\n\t\t// * Transaction createContractRequest =\n\t\t// RequestBuilder.getCreateContractRequest(payerAccountId.getAccountNum(),\n\t\t// * payerAccountId.getRealmNum(), payerAccountId.getShardNum(), nodeAccountId.getAccountNum(),\n\t\t// * nodeAccountId.getRealmNum(), nodeAccountId.getShardNum(), 100l, timestamp,\n\t\t// transactionDuration, true, \"createContract\",\n\t\t// * DEFAULT_CONTRACT_OP_GAS, contractFile, ByteString.EMPTY, 0, contractAutoRenew,\n\t\t// * SignatureList.newBuilder()\n\t\t// *\n\t\t// .addSigs(Signature.newBuilder().setEd25519(ByteString.copyFrom(\"testsignature\".getBytes())))\n\t\t// * .build());\n\t\t// }\n\n\t\treturn trx;\n\n\t}", "public CartCreateRequest(String email, String ltc, Integer siteID,\n\t\t\tInteger languageID, String ccy) {\n\t\tsuper();\n\t\tthis.email = email;\n\t\tthis.ltc = ltc;\n\t\tthis.siteID = siteID;\n\t\tthis.languageID = languageID;\n\t\tthis.ccy = ccy;\n\t}", "public com.vodafone.global.er.decoupling.binding.request.GetVersionRequest createGetVersionRequest()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.GetVersionRequestImpl();\n }", "public com.vodafone.global.er.decoupling.binding.request.GetTariffRequest createGetTariffRequest()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.GetTariffRequestImpl();\n }", "public Contract() {\n // initialise instance variables\n generateContractId();\n }", "@Override\n public EvRequest submitRequest(EvRequest request) {\n request.time = request.time.plusNanos(new Random().nextInt(250));\n String s = new ToStringCreator(request)\n .append(\"energy\", request.energy)\n .append(\"date\", request.date)\n .append(\"time\", request.time)\n .append(\"window\", request.window)\n .toString();\n logger.info(\"New request: \" + s);\n\n int hash = Objects.hash(request.energy, request.date, request.time, request.window);\n\n EvRequest copy = new EvRequest();\n copy.id = Objects.toString(Math.abs(hash));\n copy.energy = request.energy;\n copy.date = request.date;\n copy.time = request.time;\n copy.window = request.window;\n\n requests.add(copy);\n return copy;\n }", "public com.vodafone.global.er.decoupling.binding.request.GoodwillCreditRequest createGoodwillCreditRequest()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.GoodwillCreditRequestImpl();\n }", "private OrderRequest buildRequestBody(OriginalOrder originalOrder) {\n String currency = \"MXN\";\n\n OrderRequest orderRequest = new OrderRequest();\n orderRequest.intent(originalOrder.getIntent());\n\n ApplicationContext applicationContext = new ApplicationContext()\n .brandName(originalOrder.getBrandName())\n .landingPage(originalOrder.getLandingPage())\n .shippingPreference(originalOrder.getShippingPreference());\n orderRequest.applicationContext(applicationContext);\n System.out.println(\"item Category: \"+ originalOrder.getItems().get(0).getCategory());\n List<PurchaseUnitRequest> purchaseUnitRequests = new ArrayList<PurchaseUnitRequest>();\n PurchaseUnitRequest purchaseUnitRequest = new PurchaseUnitRequest()\n .referenceId(originalOrder.getReferenceId())\n .description(originalOrder.getDescription())\n .customId(originalOrder.getCustomId())\n .softDescriptor(originalOrder.getSoftDescriptor())\n .amount(new AmountWithBreakdown().currencyCode(currency).value(originalOrder.getTotal())\n .breakdown(\n new AmountBreakdown().itemTotal(new Money().currencyCode(currency).value(originalOrder.getTotal()))\n .shipping(new Money().currencyCode(currency).value(originalOrder.getShipping()))\n .handling(new Money().currencyCode(currency).value(originalOrder.getHandling()))\n .taxTotal(new Money().currencyCode(currency).value(originalOrder.getTaxTotal()))\n .shippingDiscount(new Money().currencyCode(currency).value(originalOrder.getShippingDiscount()))))\n .items(new ArrayList<Item>() {\n {\n add(new Item()\n .name(originalOrder.getItems().get(0).getName())\n .description(originalOrder.getItems().get(0).getDescription())\n .sku(originalOrder.getItems().get(0).getSku())\n .unitAmount(new Money().currencyCode(currency).value(originalOrder.getItems().get(0).getUnitAmount()))\n .tax(new Money().currencyCode(currency).value(originalOrder.getItems().get(0).getTax()))\n .quantity(originalOrder.getItems().get(0).getQuantity())\n .category(originalOrder.getItems().get(0).getCategory()));\n }\n })\n .shipping(new ShippingDetails().name(new Name().fullName(originalOrder.getAddress().getName()))\n .addressPortable(new AddressPortable()\n .addressLine1(originalOrder.getAddress().getAddressLine1())\n .addressLine2(originalOrder.getAddress().getAddressLine2())\n .adminArea2(originalOrder.getAddress().getAdminArea2())\n .adminArea1(originalOrder.getAddress().getAdminArea1())\n .postalCode(originalOrder.getAddress().getPostalCode())\n .countryCode(originalOrder.getAddress().getCountryCode())));\n System.out.println(\"purchaseUnitRequest: \\n\" +\n \"\\ndescription \"+ purchaseUnitRequest.description() +\n \"\\nreferenceId \"+ purchaseUnitRequest.referenceId() +\n \"\\nsoftDescriptor \"+ purchaseUnitRequest.softDescriptor() +\n \"\\namount currencyCode \"+ purchaseUnitRequest.amount().currencyCode() +\n \"\\namount value\"+ purchaseUnitRequest.amount().value() +\n \"\\namount taxTotal \"+ purchaseUnitRequest.amount().breakdown().taxTotal().value() +\n \"\\namount handling \"+ purchaseUnitRequest.amount().breakdown().handling().value() +\n \"\\namount shipping \"+ purchaseUnitRequest.amount().breakdown().shipping().value() +\n \"\\namount shippingDiscount \"+ purchaseUnitRequest.amount().breakdown().shippingDiscount().value() +\n \"\\namount itemTotal \"+ purchaseUnitRequest.amount().breakdown().itemTotal().value()\n );\n purchaseUnitRequests.add(purchaseUnitRequest);\n orderRequest.purchaseUnits(purchaseUnitRequests);\n System.out.println(\"Request: \" + orderRequest.toString());\n return orderRequest;\n }", "io.envoyproxy.envoy.type.metadata.v3.MetadataKind.Request getRequest();", "public TransmissionProtocol.RequestOrBuilder getRequestOrBuilder(\n int index) {\n return request_.get(index);\n }", "public com.vodafone.global.er.decoupling.binding.request.GetDetailsForExternalTransactionRequestType createGetDetailsForExternalTransactionRequestType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.GetDetailsForExternalTransactionRequestTypeImpl();\n }", "public RPCRequest()\n\t{\n\t\tsuper();\n\t}", "TransactionResponseType createTransactionResponseType();", "public com.google.protobuf.ByteString\n getRequestBytes() {\n Object ref = request_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n request_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public CartCreateRequest(String email, String ltc) {\n\t\tthis(email, ltc, null, null, null);\n\t}", "org.naru.park.ParkModel.UIParkRequest getRequest();", "@Test\n\tpublic void constructTradeRequest() {\n\t\t\n\t\tTradeRequest tradeRequest = new TradeRequest();\n\t\t\n\t\tAssert.assertTrue(\"tradeRequest should not be null\", \n\t\t\t\ttradeRequest != null);\n\t\t\n\t\tAssert.assertFalse(\"tradeRequest is not null\", tradeRequest == null);\n\t}", "public Builder setRequestBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n request_ = value;\n onChanged();\n return this;\n }", "private final static HttpRequest createRequest() {\r\n\r\n HttpRequest req = new BasicHttpRequest\r\n (\"GET\", \"/\", HttpVersion.HTTP_1_1);\r\n //(\"OPTIONS\", \"*\", HttpVersion.HTTP_1_1);\r\n\r\n return req;\r\n }", "public Request(){\n\t\tthis(null, null, null);\n\t}", "public T getRequestData() {\n return requestData;\n }", "private com.google.protobuf.SingleFieldBuilderV3<\n org.naru.park.ParkModel.UIParkRequest, org.naru.park.ParkModel.UIParkRequest.Builder, org.naru.park.ParkModel.UIParkRequestOrBuilder> \n getRequestFieldBuilder() {\n if (requestBuilder_ == null) {\n requestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n org.naru.park.ParkModel.UIParkRequest, org.naru.park.ParkModel.UIParkRequest.Builder, org.naru.park.ParkModel.UIParkRequestOrBuilder>(\n getRequest(),\n getParentForChildren(),\n isClean());\n request_ = null;\n }\n return requestBuilder_;\n }", "TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);", "String createXMLStructure(String szTimeStamp,\n\t\t\tString szUniqueTransactionCode, String szCurrencyCode,\n\t\t\tString szAmount, String szCreditCardNumber, String szValidityMonth,\n\t\t\tString szValidityYear, String szCVVCode, String szBankCountryCode,\n\t\t\tString szBankName, String szCardHolderName, String szCardHolderMail) {\n\n\t\tszTimeStamp = new SimpleDateFormat(\"ddMMyyHHmmss\").format(Calendar\n\t\t\t\t.getInstance().getTime());\n\t\tszUniqueTransactionCode = getMd5Hash(\n\t\t\t\tString.valueOf(System.currentTimeMillis())).substring(0, 20);\n\n\t\tString xmlData = \"<PaymentRequest>\\r\\n\"\n\t\t\t\t+ \" <version>8.0</version>\\r\\n\" + \" <timeStamp>\"\n\t\t\t\t+ szTimeStamp\n\t\t\t\t+ \"</timeStamp>\\r\\n\"\n\t\t\t\t+ \" <merchantID>215</merchantID>\\r\\n\"\n\t\t\t\t+ \" <uniqueTransactionCode>\"\n\t\t\t\t+ szUniqueTransactionCode\n\t\t\t\t+ \"</uniqueTransactionCode>\\r\\n\"\n\t\t\t\t+ \" <desc>Hotel Trip Booking</desc>\\r\\n\"\n\t\t\t\t+ \" <amt>\"\n\t\t\t\t+ szAmount\n\t\t\t\t+ \"</amt>\\r\\n\"\n\t\t\t\t+ \" <currencyCode>\"\n\t\t\t\t+ 764\n\t\t\t\t+ \"</currencyCode>\\r\\n\"\n\t\t\t\t+ \" <pan>\"\n\t\t\t\t+ szCreditCardNumber\n\t\t\t\t+ \"</pan>\\r\\n\"\n\t\t\t\t+ \" <expiry>\\r\\n\"\n\t\t\t\t+ \" <month>\"\n\t\t\t\t+ szValidityMonth\n\t\t\t\t+ \"</month>\\r\\n\"\n\t\t\t\t+ \" <year>\"\n\t\t\t\t+ szValidityYear\n\t\t\t\t+ \"</year>\\r\\n\"\n\t\t\t\t+ \" </expiry>\\r\\n\"\n\t\t\t\t// + \" <storeCardUniqueID></storeCardUniqueID>\\r\\n\"\n\t\t\t\t+ \" <securityCode>\"\n\t\t\t\t+ szCVVCode\n\t\t\t\t+ \"</securityCode>\\r\\n\"\n\t\t\t\t+ \" <clientIP>46.137.157.1</clientIP>\\r\\n\"\n\t\t\t\t+ \" <panCountry>\"\n\t\t\t\t+ szBankCountryCode\n\t\t\t\t+ \"</panCountry>\\r\\n\"\n\t\t\t\t+ \" <panBank>\"\n\t\t\t\t+ Utils.EncodeXML(szBankName)\n\t\t\t\t+ \"</panBank>\\r\\n\"\n\t\t\t\t+ \" <cardholderName>\"\n\t\t\t\t+ Utils.EncodeXML(szCardHolderName)\n\t\t\t\t+ \"</cardholderName>\\r\\n\"\n\t\t\t\t+ \" <cardholderEmail>\"\n\t\t\t\t+ Utils.EncodeXML(szCardHolderMail)\n\t\t\t\t+ \"</cardholderEmail>\\r\\n\"\n\t\t\t\t+ \" <payCategoryID></payCategoryID>\\r\\n\"\n\t\t\t\t+ \" <userDefined1></userDefined1>\\r\\n\"\n\t\t\t\t+ \" <userDefined2></userDefined2>\\r\\n\"\n\t\t\t\t+ \" <userDefined3></userDefined3>\\r\\n\"\n\t\t\t\t+ \" <userDefined4></userDefined4>\\r\\n\"\n\t\t\t\t+ \" <userDefined5></userDefined5>\\r\\n\"\n\t\t\t\t+ \" <storeCard>N</storeCard>\\r\\n\"\n\t\t\t\t+ \" <ippTransaction>N</ippTransaction>\\r\\n\"\n\t\t\t\t+ \" <installmentPeriod>3</installmentPeriod>\\r\\n\"\n\t\t\t\t+ \" <interestType>C</interestType>\\r\\n\"\n\t\t\t\t+ \" <recurring>N</recurring>\\r\\n\"\n\t\t\t\t+ \" <invoicePrefix></invoicePrefix>\\r\\n\"\n\t\t\t\t+ \" <recurringAmount></recurringAmount>\\r\\n\"\n\t\t\t\t+ \" <allowAccumulate></allowAccumulate>\\r\\n\"\n\t\t\t\t+ \" <maxAccumulateAmt>\\r\\n\"\n\t\t\t\t+ \" </maxAccumulateAmt>\\r\\n\"\n\t\t\t\t+ \" <recurringInterval></recurringInterval>\\r\\n\"\n\t\t\t\t+ \" <recurringCount></recurringCount>\\r\\n\"\n\t\t\t\t+ \" <chargeNextDate></chargeNextDate>\\r\\n\"\n\t\t\t\t+ \" <hashValue></hashValue>\\r\\n\" + \"</PaymentRequest>\";\n\n\t\tString szSignature = \"merchantID\" + \"uniqueTransactionCode\" + \"amt\";\n\t\tszSignature = \"215\" + szUniqueTransactionCode + szAmount;\n\n\t\tLog.e(\"TravellerDetailsTabActivity\", \"XML Data:: \" + xmlData);\n\n\t\treturn xmlData;\n\t}", "public BoletoPaymentRequest() {\n\n }", "private void createTx() throws Exception {\n PublicKey recipient = Seed.getRandomAddress();\n Transaction tx = new Transaction(wallet.pb, recipient, wallet.pr);\n//\t\tSystem.out.println(\"Created a tx\");\n txPool.add(tx);\n//\t\tcache.put(tx.txId, null);\n sendTx(tx);\n }", "pb4client.TransportRequest getReq(int index);", "public Builder setRequest(netty.framework.messages.TestMessage.TestRequest value) {\n if (value == null) {\n throw new NullPointerException();\n }\n request_ = value;\n\n bitField0_ |= 0x00000001;\n return this;\n }", "public TransmissionProtocol.Request getRequest(int index) {\n return request_.get(index);\n }", "@JsonCreator(mode = JsonCreator.Mode.DEFAULT)\n private UpdateTransaction() {\n this.sourceId = Optional.empty();\n this.type = Optional.empty();\n this.description = Optional.empty();\n this.balance = Optional.empty();\n this.inputDate = Optional.empty();\n }", "public com.google.protobuf.ByteString\n getRequestBytes() {\n Object ref = request_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n request_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "com.google.openrtb.OpenRtb.BidRequest getRequest();", "private com.google.protobuf.SingleFieldBuilder<\n com.google.openrtb.OpenRtb.BidRequest, com.google.openrtb.OpenRtb.BidRequest.Builder, com.google.openrtb.OpenRtb.BidRequestOrBuilder> \n getRequestFieldBuilder() {\n if (requestBuilder_ == null) {\n requestBuilder_ = new com.google.protobuf.SingleFieldBuilder<\n com.google.openrtb.OpenRtb.BidRequest, com.google.openrtb.OpenRtb.BidRequest.Builder, com.google.openrtb.OpenRtb.BidRequestOrBuilder>(\n getRequest(),\n getParentForChildren(),\n isClean());\n request_ = null;\n }\n return requestBuilder_;\n }", "public Builder clearTxnrequest() {\n if (txnrequestBuilder_ == null) {\n txnrequest_ = TxnRequestProto.TxnRequest.getDefaultInstance();\n onChanged();\n } else {\n txnrequestBuilder_.clear();\n }\n bitField0_ = (bitField0_ & ~0x00000001);\n return this;\n }", "public CreateOrderRequest(CreateOrderRequest source) {\n if (source.ChannelCode != null) {\n this.ChannelCode = new String(source.ChannelCode);\n }\n if (source.MerchantAppId != null) {\n this.MerchantAppId = new String(source.MerchantAppId);\n }\n if (source.Amount != null) {\n this.Amount = new String(source.Amount);\n }\n if (source.TraceNo != null) {\n this.TraceNo = new String(source.TraceNo);\n }\n if (source.NotifyUrl != null) {\n this.NotifyUrl = new String(source.NotifyUrl);\n }\n if (source.ReturnUrl != null) {\n this.ReturnUrl = new String(source.ReturnUrl);\n }\n }", "public void createContract() {\n\r\n\t}" ]
[ "0.66469944", "0.62420845", "0.6139038", "0.61042666", "0.6039133", "0.59389484", "0.59118706", "0.5903413", "0.58025616", "0.57864565", "0.5769424", "0.5746127", "0.57288206", "0.57204825", "0.5700187", "0.5684559", "0.5662748", "0.5657215", "0.5633502", "0.5633114", "0.56095797", "0.5608094", "0.56042004", "0.5601544", "0.55763215", "0.5546816", "0.55447954", "0.552339", "0.5511373", "0.5510931", "0.5493415", "0.5483582", "0.54449713", "0.54264003", "0.542496", "0.5422852", "0.54188395", "0.5413773", "0.53857434", "0.53557765", "0.5353246", "0.53367156", "0.5327955", "0.5325545", "0.53211796", "0.5315457", "0.5313591", "0.53124267", "0.529435", "0.5252607", "0.52472544", "0.5242985", "0.5227722", "0.520627", "0.5189333", "0.51781785", "0.5176477", "0.51716834", "0.5171274", "0.51692533", "0.51639014", "0.51561004", "0.5145092", "0.5134156", "0.51330227", "0.51245433", "0.5124191", "0.51231354", "0.5115743", "0.5115598", "0.51136434", "0.5096958", "0.50932926", "0.50927776", "0.5085577", "0.50843674", "0.5080905", "0.5057158", "0.5048592", "0.5043752", "0.50429225", "0.5041869", "0.50306827", "0.50294065", "0.5025524", "0.5021138", "0.50209004", "0.50183374", "0.5011644", "0.49916336", "0.49912965", "0.49910602", "0.49902034", "0.4989696", "0.4983677", "0.49756452", "0.49680528", "0.4960677", "0.495877", "0.49544054" ]
0.5609651
20
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() { jPanel1 = new javax.swing.JPanel(); jLabel6 = new javax.swing.JLabel(); jLabel1 = new javax.swing.JLabel(); jSeparator1 = new javax.swing.JSeparator(); jSeparator3 = new javax.swing.JSeparator(); jButton1 = new javax.swing.JButton(); jScrollPane1 = new javax.swing.JScrollPane(); jTextArea1 = new javax.swing.JTextArea(); jScrollPane2 = new javax.swing.JScrollPane(); jTextArea2 = new javax.swing.JTextArea(); jLabel4 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jScrollPane3 = new javax.swing.JScrollPane(); jTextArea3 = new javax.swing.JTextArea(); jButton2 = new javax.swing.JButton(); jLabel5 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); jLabel9 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jPanel1.setBackground(new java.awt.Color(255, 255, 255)); jLabel1.setFont(new java.awt.Font("Baskerville Old Face", 0, 28)); // NOI18N jSeparator1.setBackground(new java.awt.Color(0, 0, 0)); jSeparator1.setForeground(new java.awt.Color(0, 0, 0)); jSeparator3.setBackground(new java.awt.Color(0, 0, 0)); jSeparator3.setForeground(new java.awt.Color(51, 51, 51)); jSeparator3.setOrientation(javax.swing.SwingConstants.VERTICAL); jButton1.setBackground(new java.awt.Color(153, 0, 51)); jButton1.setFont(new java.awt.Font("Baskerville Old Face", 0, 18)); // NOI18N jButton1.setForeground(new java.awt.Color(255, 255, 255)); jButton1.setText("Generate Key"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jTextArea1.setEditable(false); jTextArea1.setColumns(10); jTextArea1.setFont(new java.awt.Font("Monospaced", 0, 17)); // NOI18N jTextArea1.setRows(4); jScrollPane1.setViewportView(jTextArea1); jTextArea2.setEditable(false); jTextArea2.setColumns(20); jTextArea2.setFont(new java.awt.Font("Monospaced", 0, 17)); // NOI18N jTextArea2.setRows(4); jScrollPane2.setViewportView(jTextArea2); jLabel4.setFont(new java.awt.Font("Baskerville Old Face", 0, 18)); // NOI18N jLabel4.setText("Public Key"); jLabel3.setFont(new java.awt.Font("Baskerville Old Face", 0, 18)); // NOI18N jLabel3.setText("Private Key"); jLabel2.setFont(new java.awt.Font("Baskerville Old Face", 0, 18)); // NOI18N jLabel2.setText("Message"); jTextArea3.setColumns(20); jTextArea3.setFont(new java.awt.Font("Monospaced", 0, 14)); // NOI18N jTextArea3.setRows(5); jScrollPane3.setViewportView(jTextArea3); jButton2.setBackground(new java.awt.Color(153, 0, 51)); jButton2.setFont(new java.awt.Font("Baskerville Old Face", 0, 18)); // NOI18N jButton2.setForeground(new java.awt.Color(255, 255, 255)); jButton2.setText("Encode"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jLabel7.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N jLabel7.setText("ExcutionTime"); jPanel2.setBackground(new java.awt.Color(153, 0, 51)); jLabel9.setFont(new java.awt.Font("Baskerville Old Face", 0, 28)); // NOI18N jLabel9.setForeground(new java.awt.Color(255, 255, 255)); jLabel9.setText(" Message Encoding - ECDSA"); 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(jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE, 894, Short.MAX_VALUE) .addContainerGap()) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGap(48, 48, 48) .addComponent(jLabel9) .addContainerGap(49, Short.MAX_VALUE)) ); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jSeparator1) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel1)) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(25, 25, 25) .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 223, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(68, 68, 68) .addComponent(jButton1))) .addGap(0, 0, Short.MAX_VALUE)) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addGap(51, 51, 51) .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING)) .addGap(32, 32, 32) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 394, Short.MAX_VALUE) .addComponent(jScrollPane1) .addComponent(jScrollPane3)) .addGap(10, 10, 10)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addComponent(jButton2) .addGap(150, 150, 150)))) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(58, 58, 58) .addComponent(jLabel1)) .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jSeparator3) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 12, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(56, 56, 56) .addComponent(jButton1) .addGap(31, 31, 31) .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 207, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(41, 41, 41) .addComponent(jLabel3)) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(65, 65, 65) .addComponent(jLabel4)) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(18, 18, 18) .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(18, 18, 18) .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 163, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(81, 81, 81) .addComponent(jLabel2))))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 44, Short.MAX_VALUE) .addComponent(jButton2) .addGap(35, 35, 35)))) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE)) ); 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 Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "public PatientUI() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public Oddeven() {\n initComponents();\n }", "public intrebarea() {\n initComponents();\n }", "public Magasin() {\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}", "@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 LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "public kunde() {\n initComponents();\n }", "public MusteriEkle() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public DESHBORDPANAL() {\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 frmVenda() {\n initComponents();\n }", "public FrmMenu() {\n initComponents();\n }", "public Botonera() {\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 EnterDetailsGUI() {\n initComponents();\n }", "public vpemesanan1() {\n initComponents();\n }", "public FormHorarioSSE() {\n initComponents();\n }", "public Kost() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public frmacceso() {\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 JFrmPrincipal() {\n initComponents();\n }", "public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }", "public bt526() {\n initComponents();\n }", "public Pemilihan_Dokter() {\n initComponents();\n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "public Ablak() {\n initComponents();\n }", "@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.73185146", "0.7290127", "0.7290127", "0.7290127", "0.7285798", "0.7247533", "0.7214021", "0.720785", "0.71952385", "0.71891224", "0.7184117", "0.7158779", "0.7147133", "0.70921415", "0.70792264", "0.7055538", "0.6986984", "0.6976409", "0.6955238", "0.69525516", "0.69452786", "0.6942174", "0.69350797", "0.6931285", "0.69274575", "0.69249237", "0.692484", "0.69119686", "0.69100493", "0.6892153", "0.68909484", "0.6889482", "0.6888941", "0.6888229", "0.6882907", "0.68803245", "0.6880302", "0.68765897", "0.68752575", "0.68742317", "0.6870695", "0.6858674", "0.6855753", "0.68551505", "0.6854714", "0.68536323", "0.685189", "0.6851622", "0.6851622", "0.6842649", "0.6836868", "0.6836041", "0.68273747", "0.6827191", "0.6825861", "0.68235105", "0.68233716", "0.6816636", "0.6815192", "0.6808554", "0.68082917", "0.6807161", "0.6807015", "0.6806047", "0.6802219", "0.6794859", "0.67942643", "0.6790891", "0.67889357", "0.6788571", "0.67881185", "0.6787122", "0.6781127", "0.67660034", "0.6764709", "0.67644566", "0.6756192", "0.6754256", "0.6751128", "0.6750562", "0.67440563", "0.6737466", "0.6736424", "0.6734462", "0.67319155", "0.6726047", "0.6725434", "0.6718776", "0.67163", "0.6713416", "0.6712949", "0.67079836", "0.6706704", "0.67045957", "0.66995174", "0.6698836", "0.66984534", "0.669626", "0.6693713", "0.66902465", "0.66899353" ]
0.0
-1
construct from FCNBase + double[] for parameters and errors with default strategy
public MnScan(FCNBase fcn, double[] par, double[] err) { this(fcn, par, err, DEFAULT_STRATEGY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void train() {\n actual = observations.toArray();\n min_val_error = Double.MAX_VALUE;\n if (findDecayConstant)\n for (float alpha = 0f; alpha <= 1f; alpha += 0.01f)\n initializeAndTrainModel(alpha);\n else\n initializeAndTrainModel(optAlpha);\n }", "public Map<String,Double> call()\n\t\t\tthrows Exception {\n\t\tList<String> labels = new ArrayList<String>();\n\t\t\t\t\n\t\tfor (Trace<T> t : traces) {\n//\t\t\tSet<T> toAdd = new HashSet<T>();\n//\t\t\tfor (T s : t.getConstraints())\n//\t\t\t\ttoAdd.add(s);\n//\t\t\tt.setConstraints(toAdd);\n//\t\t\tfor (T c : toAdd)\n//\t\t\t\tallConstraints.add(c);\n\t\t\tif (!labels.contains(Integer.toString(t.getLabel())))\n\t\t\t\tlabels.add(Integer.toString(t.getLabel()));\n\t\t}\n\t\t\n\t\tArrayList<Attribute> attributes = new ArrayList<Attribute>();\n\t\tArrayList<String> levels = new ArrayList<String>();\n\t\tlevels.add(\"1\");\n\t\tlevels.add(\"0\");\n\t\tfor (T con : features) {\n\t\t\tAttribute a = new Attribute(con.toString());\n\t\t\tattributes.add(a);\n\t\t}\n\t\tattributes.add(new Attribute(\"label\", labels));\n\n\t\t// Crossvalidate with Weka\n\t\tInstances trainingSet = new Instances(\"TrainingSet\", attributes, traces.size());\n\t\ttrainingSet.setClassIndex(attributes.size() - 1);\n\t\tInstances testSet = new Instances(\"TrainingSet\", attributes, traces.size());\n\t\ttestSet.setClassIndex(attributes.size() - 1);\n\t\t\n\t\tfor (int t = 0; t < traces.size(); t++) {\n\t\t\tif (t % nFold != 0) {\n\t\t\t\tInstance instance = new DenseInstance(attributes.size());\n\t\t\t\tCollection<String> strings = traces.get(t).getConstraintsAsStrings();\n\t\t\t\tfor (int a = 0; a < attributes.size() - 1; a++) {\n\t\t\t\t\tif (strings.contains(attributes.get(a).name())) {\n\t\t\t\t\t\tinstance.setValue(attributes.get(a), 0);\n\t\t\t\t\t} else{\n\t\t\t\t\t\tinstance.setValue(attributes.get(a), 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tinstance.setValue(attributes.get(attributes.size() - 1),\n\t\t\t\t\t\tInteger.toString(traces.get(t).getLabel()));\n\t\t\t\ttrainingSet.add(instance);\n\t\t\t} else {\n\t\t\t\tInstance instance = new DenseInstance(attributes.size());\n\t\t\t\tCollection<String> strings = traces.get(t).getConstraintsAsStrings();\n\t\t\t\tfor (int a = 0; a < attributes.size() - 1; a++) {\n\t\t\t\t\tif (strings.contains(attributes.get(a).name())){\n\t\t\t\t\t\tinstance.setValue(attributes.get(a), 0);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tinstance.setValue(attributes.get(a), 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tinstance.setValue(attributes.get(attributes.size() - 1),\n\t\t\t\t\t\tInteger.toString(traces.get(t).getLabel()));\n\t\t\t\ttestSet.add(instance);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//System.out.println(\"Reasoning\");\n\t\tWekaPackageManager.loadPackages(false, true, false);\n\t\tAbstractClassifier classifier = null;\n\t\tString options = \"\";\n\t\tswitch(c){\n\t\t\tcase NB:\n\t\t\t\tclassifier = new NaiveBayes();//new LibSVM();\n\t\t\t\toptions = \"\";\n\t\t\t\tbreak;\n\t\t\tcase RandomForest:\n\t\t\t\tclassifier = new RandomForest();\n\t\t\t\toptions = \"\";\n\t\t\t\tbreak;\n\t\t\tcase SVM:\n\t\t\t\tclassifier = new LibSVM();\n\t\t\t\t//K: 0=linear, 1=polynomial, 2=radial basis, 3=sigmoid\n\t\t\t\toptions = \"-K,1,-W,\";\n\t\t\t\tfor(int i =0;i<labels.size();i++)\n\t\t\t\t\toptions+= \"1 \";\n\t\t\t\tbreak;\n\t\t}\t\t\n\t\tString[] optionsArray = options.split(\",\");\n\t\tclassifier.setOptions(optionsArray);\n\t\tclassifier.buildClassifier(trainingSet);\n\t\t\n\t\tMap<String,Double> result = new HashMap<String,Double>();\n\t\t\n\t\t//attributeScoring(trainingSet);\n\t\t//System.out.println(classifier.toSummaryString());\n\t\t//System.out.println(classifier.toString());\n\t\t\n\t\tEvaluation eTest = new Evaluation(trainingSet);\n\t\teTest.evaluateModel(classifier, testSet);\n\t\t\n\t\t//double auc = eTest.areaUnderROC(classIndex);\n\t\t//System.out.println(\"AUC: \"+auc);\n\t\tdouble accuracy = (double) eTest.correct() / (double) trainingSet.size();\n\t\tresult.put(\"accuracy\", accuracy);\n\t\treturn result;\n\t}", "public FunctionJet2Adapter(int baseDimension) \n {\n super(baseDimension); \n hessian = new double[baseDimension];\n }", "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}", "@Override\r\n\t\tpublic double[] gradient(double x, double... parameters) {\n\t\t\tfinal double a = parameters[0];\r\n\t\t\tfinal double b = parameters[1];\r\n\t\t\tfinal double c = parameters[2];\r\n\t\t\tfinal double d = parameters[3];\r\n\t\t\tfinal double e = parameters[4];\r\n\t\t\t\r\n\t\t\tdouble[] gradients = new double[5];\r\n\t\t\t//double den = 1 + Math.pow((x+e)/c, b);\r\n\t\t\t//gradients[0] = 1 / den; // Yes a Derivation \r\n\t\t\t//gradients[1] = -((a - d) * Math.pow(x / c, b) * Math.log(x / c)) / (den * den); // Yes b Derivation \r\n\t\t\t//gradients[2] = (b * Math.pow(x / c, b - 1) * (x / (c * c)) * (a - d)) / (den * den); // Yes c Derivation \r\n\t\t\t//gradients[3] = 1 - (1 / den); // Yes d Derivation \r\n\t\t\t\r\n\t\t\t//Derivation\r\n\t\t\tfinal double c_b = Math.pow(c, b);\r\n\t\t\tfinal double c_b1 = Math.pow(c, b+1.);\r\n\t\t\tfinal double c_2b = Math.pow(c, 2.*b);\r\n\t\t\tfinal double c_2b1 = Math.pow(c, 2.*b+1.);\r\n\t\t\t\r\n\t\t\tfinal double xe_b = Math.pow(x+e, b);\r\n\t\t\tfinal double xe_2b = Math.pow(x+e, 2.*b);\r\n\t\t\tfinal double xe_2b1 = Math.pow(x+e, 2.*b+1.);\r\n\t\t\t\r\n\t\t\tgradients[0] = c_b/(xe_b+c_b);\r\n\t\t\tgradients[1] = ((c_b*d-a*c_b)*xe_b*Math.log(x+e)+(a*c_b*Math.log(c)-c_b*Math.log(c)*d)*xe_b)/(xe_2b+2*c_b*xe_b+c_2b);\r\n\t\t\tgradients[2] = -((b*c_b*d-a*b*c_b)*xe_b)/(c*xe_2b+2*c_b1*xe_b+c_2b1);\r\n\t\t\tgradients[3] = xe_b/(xe_b+c_b);\r\n\t\t\tgradients[4] = ((b*c_b*d-a*b*c_b)*xe_b)/(xe_2b1+xe_b*(2*c_b*x+2*c_b*e)+c_2b*x+c_2b*e);\r\n\t\t\treturn gradients;\r\n\t\t}", "float[] feedForward(float... inputs);", "public void backprop(double[] inputs, FeedForwardNeuralNetwork net, boolean verbose)\n {\n //create variables that will be used later\n int[] sizes = net.getSizes();\n int biggestSize = 0;\n for(int k = 0; k < sizes.length; k++)\n {\n if(sizes[k] > biggestSize)\n {\n biggestSize = sizes[k];\n }\n }\n int hiddenLayers = sizes.length - 2;\n //if input or output wrong size, return\n if(inputs.length != sizes[0])\n {\n System.out.println(\"Invalid number of inputs\");\n return;\n }\n\n double[][] allOutputs = new double[sizes.length][biggestSize];\n double[][] allErrors = new double[sizes.length][biggestSize];\n\n //fill out first layer to temp output\n int lastLayer = sizes[0];\n for(int k = 0; k < lastLayer; k++)\n {\n allOutputs[0][k] = inputs[k];\n }\n\n //for each layer after the input\n for(int k = 1; k < hiddenLayers + 2; k++)\n {\n //for each node in that layer\n for(int a = 0; a < sizes[k]; a++)\n {\n //get sum and get activation function result and its derivative\n double sum = 0;\n for(int t = 0; t < lastLayer; t++)\n {\n sum += allOutputs[k - 1][t] * net.getWeight(k - 1, t, k, a);\n }\n sum += net.getBiasNum() * net.getWeight(-1, 0, k, a);\n if(k != hiddenLayers + 1)\n {\n allOutputs[k][a] = net.applyActivationFunction(sum, net.getHiddenActivationFunction());\n allErrors[k][a] = net.applyActivationFunctionDerivative(sum, net.getHiddenActivationFunction());\n }\n else\n {\n allOutputs[k][a] = net.applyActivationFunction(sum, net.getOutputActivationFunction());\n allErrors[k][a] = net.applyActivationFunctionDerivative(sum, net.getOutputActivationFunction());\n }\n }\n lastLayer = sizes[k];\n }\n\n if(verbose)\n {\n System.out.println(\"Outputs\");\n for(int k = 0; k < maxClusters; k++)\n {\n System.out.print(allOutputs[hiddenLayers + 1][k] + \", \");\n }\n System.out.println();\n }\n double[] expectedOutputs = new double[maxClusters];\n int cluster = 0;\n double max = 0;\n for(int k = 0; k < maxClusters; k++)\n {\n expectedOutputs[k] = allOutputs[hiddenLayers + 1][k];\n if(allOutputs[hiddenLayers + 1][k] > max)\n {\n cluster = k;\n max = allOutputs[hiddenLayers + 1][k];\n }\n }\n if(verbose)\n {\n System.out.println(\"Output \" + cluster + \" will be set to max value\");\n System.out.println();\n }\n\n expectedOutputs[cluster] = 4;\n\n\n //go backward from output to first hidden layer\n for(int k = hiddenLayers + 1; k > 0; k--)\n {\n //for each node in that layer\n for(int a = 0; a < sizes[k]; a++)\n {\n //compute error for not output layer\n if(k != hiddenLayers + 1)\n {\n double temp = allErrors[k][a];\n allErrors[k][a] = 0;\n for(int t = 0; t < sizes[k + 1]; t++)\n {\n allErrors[k][a] += net.getWeight(k, t, k + 1, a) * allErrors[k + 1][t];\n }\n allErrors[k][a] *= temp;\n }\n //compute error for output layer\n else\n {\n allErrors[k][a] *= (expectedOutputs[a] - allOutputs[k][a]);\n }\n\n //for each weight node takes as input\n for(int t = 0; t < sizes[k - 1]; t++)\n {\n //find the delta for the weight and apply\n int index = net.getIndex(k - 1, t, k, a);\n double delta = learningRate * allOutputs[k - 1][t] * allErrors[k][a]\n + momentum * lastDeltas[index];\n\n net.setWeight(k - 1, t, k, a, net.getWeight(k - 1, t, k, a) + delta);\n lastDeltas[index] = delta;\n }\n }\n }\n }", "public FitRealFunction() {\t\t\r\n\t}", "public Driver(){\n\t\tthis.D = Parameters.numberOfDocuments;\n\t\tthis.K = Parameters.numberOfTopics;\n\t\tthis.V = Parameters.sizeOfVocabulary;\n\n\t\tthis.oldAlpha = new double[this.K];\n\t\tthis.newAlpha = new double[this.K];\n\t\tthis.hessian = new double[this.K][this.K];\n\t\tthis.gradient = new double[this.K];\n\t}", "public BestMeanConvergence() {\n }", "void backpropagate(float[] inputs, float... targets);", "private void train(float[] inputs, int desired) {\r\n int guess = feedforward(inputs);\r\n float error = desired - guess;\r\n for (int i = 0; i < weights.length; i++) {\r\n weights[i] += c * error * inputs[i];\r\n }\r\n }", "public abstract double initialize(double[][] rawData, int clusterCount);", "static Nda<Float> of( float... value ) { return Tensor.of( Float.class, Shape.of( value.length ), value ); }", "public double train(double[] X, double argValue);", "@Test\n public void testBuildGraph_FactorArr() {\n // And now factors\n CostFunction[] factors = new CostFunction[]{\n factory.buildCostFunction( new Variable[]{v[0],v[1]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[1]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[1]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[2]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[2]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[3]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[4]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[1],v[2]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[1],v[3]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[3],v[4]}, 0 ),\n };\n\n MCS mcs = new MCS(Arrays.asList(factors));\n UPFactory f = new GdlFactory();\n UPGraph result = JunctionTreeAlgo.buildGraph(f, mcs.getFactorDistribution(), mcs.getAdjacency());\n System.out.println(result);\n }", "private void initializeAndTrainModel(float alpha) {\n\n double forecast;\n double lastValue = actual[0];\n double[][] trainMatrix = new double[trainPoints][2];\n double[][] valMatrix = new double[validationPoints][2];\n\n for (int i = 1; i < trainPoints; i++) {\n forecast = lastValue;\n\n trainMatrix[i][0] = actual[i];\n trainMatrix[i][1] = forecast;\n lastValue = (alpha * actual[i]) + ((1 - alpha) * lastValue);\n }\n\n for (int t = 1; t <= validationPoints; t++) {\n valMatrix[t - 1][1] = lastValue;\n valMatrix[t - 1][0] = actual[trainPoints + t - 1];\n }\n\n\n double biasness = BiasnessHandler.handle(valMatrix);\n AccuracyIndicators AI = new AccuracyIndicators();\n ModelUtil.computeAccuracyIndicators(AI, trainMatrix, valMatrix, dof);\n AI.setBias(biasness);\n if (min_val_error >= AI.getMAPE()) {\n min_val_error = AI.getMAPE();\n optAlpha = alpha;\n accuracyIndicators = AI;\n }\n }", "public void train(double[] inputs, double[] outputsTarget) {\n assert(outputsTarget.length == weights.get(weights.size() - 1).length);\n \n ArrayList<double[]> layersOutputs = new ArrayList<double[]>(); \n classify(inputs, layersOutputs);\n\n // Calculate sensitivities for the output nodes\n int outputNeuronCount = this.weights.get(this.weights.size() - 1).length;\n double[] nextLayerSensitivities = new double[outputNeuronCount];\n assert(layersOutputs.get(layersOutputs.size() - 1).length == outputNeuronCount);\n for (int i = 0; i < outputNeuronCount; i++) {\n nextLayerSensitivities[i] = calculateErrorPartialDerivitive(\n layersOutputs.get(layersOutputs.size() - 1)[i],\n outputsTarget[i]\n ) * calculateActivationDerivitive(layersOutputs.get(layersOutputs.size() - 1)[i]);\n assert(!Double.isNaN(nextLayerSensitivities[i]));\n }\n\n for (int weightsIndex = this.weights.size() - 1; weightsIndex >= 0; weightsIndex--) {\n int previousLayerNeuronCount = this.weights.get(weightsIndex)[0].length;\n int nextLayerNeuronCount = this.weights.get(weightsIndex).length;\n assert(nextLayerSensitivities.length == nextLayerNeuronCount);\n\n double[] previousLayerOutputs = layersOutputs.get(weightsIndex);\n double[] previousLayerSensitivities = new double[previousLayerNeuronCount];\n\n // Iterate over neurons in the previous layer\n for (int j = 0; j < previousLayerNeuronCount; j++) {\n\n // Calculate the sensitivity of this node\n double sensitivity = 0;\n for (int i = 0; i < nextLayerNeuronCount; i++) {\n sensitivity += nextLayerSensitivities[i] * this.weights.get(weightsIndex)[i][j];\n }\n sensitivity *= calculateActivationDerivitive(previousLayerOutputs[j]);\n assert(!Double.isNaN(sensitivity));\n previousLayerSensitivities[j] = sensitivity;\n\n for (int i = 0; i < nextLayerNeuronCount; i++) {\n double weightDelta = learningRate * nextLayerSensitivities[i] * calculateActivation(previousLayerOutputs[j]);\n this.weights.get(weightsIndex)[i][j] += weightDelta;\n assert(!Double.isNaN(this.weights.get(weightsIndex)[i][j]) && !Double.isInfinite(this.weights.get(weightsIndex)[i][j]));\n }\n }\n\n nextLayerSensitivities = previousLayerSensitivities;\n }\n }", "public abstract void fit(BinaryData trainingData);", "@Override\n\tpublic Parameter[] getParameters() {\n\t\treturn new Parameter[] { weight, tolerance, svmType, kernelType, kernelDegree, kernelGamma, kernelCoefficient, parameterC,\n\t\t\t\tparameterNu };\n\t}", "private void initClassAttributes(){ \r\n\t\tanyMissingValue = new boolean[3];\r\n\t\tanyMissingValue[0] = false; \r\n\t\tanyMissingValue[1] = false;\r\n\t\tanyMissingValue[2] = false;\r\n\t\tnumInputAttributes = Attributes.getInputNumAttributes();\r\n\t\tnumOutputAttributes = Attributes.getOutputNumAttributes();\r\n\t\tnumUndefinedAttributes = Attributes.getNumAttributes() - (numInputAttributes+numOutputAttributes);\r\n\t\tintNominalValues = new int[3][];\r\n\t\tnominalValues = new String[3][];\r\n\t\trealValues = new double[3][];\r\n\t\tmissingValues = new boolean[3][];\r\n\t\tnominalValues[0] = new String[numInputAttributes];\r\n\t\tnominalValues[1] = new String[numOutputAttributes];\r\n\t\tnominalValues[2] = new String[numUndefinedAttributes];\r\n\t\tintNominalValues[0] = new int[numInputAttributes];\r\n\t\tintNominalValues[1] = new int[numOutputAttributes];\r\n\t\tintNominalValues[2] = new int[numUndefinedAttributes];\r\n\t\trealValues[0] = new double[numInputAttributes];\r\n\t\trealValues[1] = new double[numOutputAttributes];\r\n\t\trealValues[2] = new double[numUndefinedAttributes];\r\n\t\tmissingValues[0] = new boolean[numInputAttributes];\r\n\t\tmissingValues[1] = new boolean[numOutputAttributes];\r\n\t\tmissingValues[2] = new boolean[numUndefinedAttributes];\r\n\r\n\t\tfor(int i=0;i<numInputAttributes;i++) missingValues[0][i]=false; \r\n\t\tfor(int i=0;i<numOutputAttributes;i++) missingValues[1][i]=false; \r\n\t\tfor(int i=0;i<numUndefinedAttributes; i++) missingValues[2][i]=false;\r\n\r\n\t}", "@Override\r\n public void init(NegotiationSession negotiationSession, Map<String, Double> parameters) {\r\n super.init(negotiationSession, parameters);\r\n this.negotiationSession = negotiationSession;\r\n if (parameters != null && parameters.get(\"l\") != null) {\r\n learnCoef = parameters.get(\"l\");\r\n } else {\r\n learnCoef = 0.2;\r\n }\r\n learnValueAddition = 1;\r\n initializeModel();\r\n }", "public void train() {\n\n int w;\n double sum = 0, avg;\n double forecast;\n double[][] trainMatrix = new double[trainPoints][2];\n double[][] valMatrix = new double[validationPoints][2];\n actual = observations.toArray();\n\n for (int i = 0; i < step * slices; i++)\n sum += actual[i];\n\n avg = sum / slices;\n\n for (int pos = 0; pos < trainPoints; pos++) {\n sum = 0;\n w = 0;\n\n if (pos >= step * slices) {\n for (int k = pos - step * slices; k < pos; k += step)\n sum += actual[k] * weights[w++];\n forecast = sum / slices;\n } else forecast = avg;\n\n trainMatrix[pos][0] = actual[pos];\n trainMatrix[pos][1] = forecast;\n }\n\n for (int pos = actual.length - validationPoints, j = 0; pos < actual.length; pos++) {\n sum = 0;\n w = 0;\n for (int k = pos - step * slices; k < pos; k += step)\n sum += actual[k] * weights[w++];\n forecast = sum / slices;\n valMatrix[j][0] = actual[pos];\n valMatrix[j][1] = forecast;\n j++;\n }\n double biasness = BiasnessHandler.handleOffset(valMatrix);\n accuracyIndicators.setBias(biasness);\n ModelUtil.computeAccuracyIndicators(accuracyIndicators, trainMatrix, valMatrix, dof);\n errorBound = ErrorBoundsHandler.computeErrorBoundInterval(trainMatrix);\n }", "public abstract void build(ClassifierData<U> inputData);", "private DigitalNetBase2 initNetVar (boolean shiftFlag) {\n DigitalNetBase2 net = new DigitalNetBase2 ();\n if (shiftFlag)\n net.dim = dim + 1;\n else\n net.dim = dim;\n net.numPoints = numPoints;\n net.numCols = numCols;\n net.numRows = numRows;\n net.outDigits = outDigits;\n net.normFactor = normFactor;\n net.factor = new double[outDigits];\n net.genMat = new int[net.dim * numCols];\n net.shiftStream = shiftStream;\n net.capacityShift = capacityShift;\n net.dimShift = dimShift;\n net.digitalShift = copyDigitalShift (digitalShift);\n if (shiftFlag && shiftStream != null) {\n net.addRandomShift (dimShift, dimShift + 1, shiftStream);\n }\n return net;\n }", "static Nda<Float> of( Shape shape, float... values ) { return Tensor.ofAny( Float.class, shape, values ); }", "@Test\n public void addModelData() {\n new FactoryInitializer()\n .initialize(\n ((tr, ev, is, np, md) -> new ResNetConv2DFactory(tr,ev,is,np,md).addModelData(new ArrayList<>()))\n );\n }", "private void setProblem() throws IOException, InvalidInputException{\r\n String finalInputFileName;\r\n if(scale){\r\n finalInputFileName = inputFileName + \".scaled\";\r\n }\r\n else{\r\n finalInputFileName = inputFileName;\r\n }\r\n \r\n // Read data from the input file\r\n BufferedReader reader = new BufferedReader(new FileReader(finalInputFileName));\r\n if(reader.toString().length() == 0){\r\n throw new InvalidInputException(\"Invalid input file! File is empty!\");\r\n }\r\n\r\n // Prepare holders for dataset D=(X,y)\r\n Vector<svm_node[]> X = new Vector<svm_node[]>();\r\n Vector<Double> y = new Vector<Double>();\r\n int maxIndex = 0;\r\n\r\n // Load data from file to holders\r\n while(true){\r\n String line = reader.readLine();\r\n\r\n if(line == null){\r\n break;\r\n }\r\n\r\n StringTokenizer st = new StringTokenizer(line,\" \\t\\n\\r\\f:\");\r\n\r\n y.addElement(Utils.toDouble(st.nextToken()));\r\n int m = st.countTokens()/2;\r\n svm_node[] x = new svm_node[m];\r\n for(int i = 0; i < m; i++) {\r\n x[i] = new svm_node();\r\n x[i].index = Utils.toInt(st.nextToken());\r\n x[i].value = Utils.toDouble(st.nextToken());\r\n }\r\n if(m > 0){\r\n maxIndex = Math.max(maxIndex, x[m-1].index);\r\n }\r\n X.addElement(x);\r\n }\r\n\r\n this.problem = new svm_problem();\r\n this.problem.l = y.size();\r\n this.inputDime = maxIndex + 1;\r\n\r\n // Wrap up multi-dimensional input vector X\r\n this.problem.x = new svm_node[this.problem.l][];\r\n for(int i=0;i<this.problem.l;i++)\r\n this.problem.x[i] = X.elementAt(i);\r\n\r\n // Wrap up 1-dimensional input vector y\r\n this.problem.y = new double[this.problem.l];\r\n for(int i=0;i<this.problem.l;i++)\r\n this.problem.y[i] = y.elementAt(i);\r\n \r\n////////////////////???\r\n // Verify the gamma setting according to the maxIndex\r\n if(param.gamma == 0 && maxIndex > 0)\r\n param.gamma = 1.0/maxIndex;\r\n\r\n // Dealing with pre-computed kernel\r\n if(param.kernel_type == svm_parameter.PRECOMPUTED){\r\n for(int i = 0; i < this.problem.l; i++) {\r\n if (this.problem.x[i][0].index != 0) {\r\n String msg = \"Invalid kernel matrix! First column must be 0:sample_serial_number.\";\r\n throw new InvalidInputException(msg);\r\n }\r\n if ((int)this.problem.x[i][0].value <= 0 || (int)this.problem.x[i][0].value > maxIndex){\r\n String msg = \"Invalid kernel matrix! Sample_serial_number out of range.\";\r\n throw new InvalidInputException(msg);\r\n }\r\n }\r\n }\r\n\r\n reader.close();\r\n }", "@Test\n public void testBuildGraph_FactorArr_booleanArrArr() {\n\n char[][] adjacency = new char[][]{\n {0, 0, 0, 0, 0, 0, 0, 1, 0, 0},\n {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},\n {0, 1, 0, 0, 0, 0, 0, 0, 0, 0},\n {0, 0, 1, 0, 0, 0, 0, 0, 0, 0},\n {0, 0, 0, 1, 0, 0, 0, 0, 0, 0},\n {0, 0, 0, 0, 0, 0, 1, 0, 0, 0},\n {1, 0, 0, 0, 0, 0, 0, 0, 0, 0},\n {0, 0, 0, 0, 1, 0, 0, 0, 0, 0},\n {0, 0, 0, 0, 0, 1, 0, 0, 0, 0},\n {0, 0, 0, 0, 0, 0, 0, 0, 1, 0},\n };\n\n CostFunction[][] factors = new CostFunction[][]{\n {factory.buildCostFunction( new Variable[]{v[0],v[7]}, 0 )},\n {},\n {factory.buildCostFunction( new Variable[]{v[1],v[2]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[2],v[3]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[3],v[4]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[1],v[3],v[4]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[1],v[5]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[2],v[6]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[1],v[6],v[7]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[6]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[3],v[7]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[4],v[8]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[5],v[8]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[8]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[2],v[5],v[9]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[5],v[6],v[9]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[4],v[7],v[9]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[8],v[9]}, 0 )},\n };\n\n GdlFactory gf = new GdlFactory();\n UPGraph result = JunctionTreeAlgo.buildGraph(gf, factors, adjacency);\n //System.out.println(result);\n }", "@Override\n public double classifyInstance(Instance instance) throws Exception {\n\n\n\n int numAttributes = instance.numAttributes();\n int clsIndex = instance.classIndex();\n boolean hasClassAttribute = true;\n int numTestAtt = numAttributes -1;\n if (numAttributes == m_numOfInputNeutrons) {\n hasClassAttribute = false; // it means the test data doesn't has class attribute\n numTestAtt = numTestAtt+1;\n }\n\n for (int i = 0; i< numAttributes; i++){\n if (instance.attribute(i).isNumeric()){\n\n double max = m_normalization[0][i];\n double min = m_normalization[1][i];\n double normValue = 0 ;\n if (instance.value(i)<min) {\n normValue = 0;\n m_normalization[1][i] = instance.value(i); // reset the smallest value\n }else if(instance.value(i)> max){\n normValue = 1;\n m_normalization[0][i] = instance.value(i); // reset the biggest value\n }else {\n if (max == min ){\n if (max == 0){\n normValue = 0;\n }else {\n normValue = max/Math.abs(max);\n }\n }else {\n normValue = (instance.value(i) - min) / (max - min);\n }\n }\n instance.setValue(i, normValue);\n }\n }\n\n double[] testData = new double[numTestAtt];\n\n\n\n\n\n int index = 0 ;\n\n if (!hasClassAttribute){\n\n for (int i =0; i<numAttributes; i++) {\n testData[i] = instance.value(i);\n }\n }else {\n for (int i = 0; i < numAttributes; i++) {\n\n if (i != clsIndex) {\n\n testData[index] = instance.value(i);\n\n index++;\n }\n }\n }\n\n\n\n DenseMatrix prediction = new DenseMatrix(numTestAtt,1);\n for (int i = 0; i<numTestAtt; i++){\n prediction.set(i, 0, testData[i]);\n }\n\n DenseMatrix H_test = generateH(prediction,weightsOfInput,biases, 1);\n\n DenseMatrix H_test_T = new DenseMatrix(1, m_numHiddenNeurons);\n\n H_test.transpose(H_test_T);\n\n DenseMatrix output = new DenseMatrix(1, m_numOfOutputNeutrons);\n\n H_test_T.mult(weightsOfOutput, output);\n\n double result = 0;\n\n if (m_typeOfELM == 0) {\n double value = output.get(0,0);\n result = value*(m_normalization[0][classIndex]-m_normalization[1][classIndex])+m_normalization[1][classIndex];\n //result = value;\n if (m_debug == 1){\n System.out.print(result + \" \");\n }\n }else if (m_typeOfELM == 1){\n int indexMax = 0;\n double labelValue = output.get(0,0);\n\n if (m_debug == 1){\n System.out.println(\"Each instance output neuron result (after activation)\");\n }\n for (int i =0; i< m_numOfOutputNeutrons; i++){\n if (m_debug == 1){\n System.out.print(output.get(0,i) + \" \");\n }\n if (output.get(0,i) > labelValue){\n labelValue = output.get(0,i);\n indexMax = i;\n }\n }\n if (m_debug == 1){\n\n System.out.println(\"//\");\n System.out.println(indexMax);\n }\n result = indexMax;\n }\n\n\n\n return result;\n\n\n }", "public Instance(double values[],InstanceAttributes ats){\r\n\t\tAttribute curAt,allat[];\r\n\t\tint inOut,in,out,undef;\r\n\t\t\r\n\t\t//initialise structures\r\n\t\tanyMissingValue = new boolean[3];\r\n\t\tanyMissingValue[0] = false; \r\n\t\tanyMissingValue[1] = false;\r\n\t\tanyMissingValue[2] = false;\r\n\t\tif(ats==null){\r\n\t\t\tnumInputAttributes = Attributes.getInputNumAttributes();\r\n\t\t\tnumOutputAttributes = Attributes.getOutputNumAttributes();\r\n\t\t\tnumUndefinedAttributes = Attributes.getNumAttributes() - (numInputAttributes+numOutputAttributes);\r\n\t\t}else{\r\n\t\t\tnumInputAttributes = ats.getInputNumAttributes();\r\n\t\t\tnumOutputAttributes = ats.getOutputNumAttributes();\r\n\t\t\tnumUndefinedAttributes = ats.getNumAttributes() - (numInputAttributes+numOutputAttributes);\r\n\t\t}\r\n\t\tintNominalValues = new int[3][];\r\n\t\tnominalValues = new String[3][];\r\n\t\trealValues = new double[3][];\r\n\t\tmissingValues = new boolean[3][];\r\n\t\tnominalValues[0] = new String[numInputAttributes];\r\n\t\tnominalValues[1] = new String[numOutputAttributes];\r\n\t\tnominalValues[2] = new String[numUndefinedAttributes];\r\n\t\tintNominalValues[0] = new int[numInputAttributes];\r\n\t\tintNominalValues[1] = new int[numOutputAttributes];\r\n\t\tintNominalValues[2] = new int[numUndefinedAttributes];\r\n\t\trealValues[0] = new double[numInputAttributes];\r\n\t\trealValues[1] = new double[numOutputAttributes];\r\n\t\trealValues[2] = new double[numUndefinedAttributes];\r\n\t\tmissingValues[0] = new boolean[numInputAttributes];\r\n\t\tmissingValues[1] = new boolean[numOutputAttributes];\r\n\t\tmissingValues[2] = new boolean[numUndefinedAttributes];\r\n\r\n\t\tfor(int i=0;i<numInputAttributes;i++) missingValues[0][i]=false; \r\n\t\tfor(int i=0;i<numOutputAttributes;i++) missingValues[1][i]=false; \r\n\t\tfor(int i=0;i<numUndefinedAttributes; i++) missingValues[2][i]=false;\r\n\t\t\r\n\t\t//take the correct set of Attributes\r\n\t\tif(ats!=null){\r\n\t\t\tallat = ats.getAttributes();\r\n\t\t}else{\r\n\t\t\tallat = Attributes.getAttributes();\r\n\t\t}\r\n\r\n\t\t//fill the data structures\r\n\t\tin = out = undef = 0;\r\n\t\tfor(int i=0;i<values.length;i++){\r\n\t\t\tcurAt = allat[i];\r\n\t\t\tinOut = 2;\r\n\t\t\tif(curAt.getDirectionAttribute()==Attribute.INPUT)\r\n\t\t\t\tinOut = 0;\r\n\t\t\telse if(curAt.getDirectionAttribute()==Attribute.OUTPUT)\r\n\t\t\t\tinOut = 1;\r\n\t\t\t\r\n\t\t\t//is it missing?\r\n\t\t\tif(new Double(values[i]).isNaN()){\r\n\t\t\t\tif(inOut==0){\r\n\t\t\t\t\tmissingValues[inOut][in] = true;\r\n\t\t\t\t\tanyMissingValue[inOut] = true;\r\n\t\t\t\t\tin++;\r\n\t\t\t\t}else if(inOut==1){\r\n\t\t\t\t\tmissingValues[inOut][out] = true;\r\n\t\t\t\t\tanyMissingValue[inOut] = true;\r\n\t\t\t\t\tout++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tmissingValues[inOut][undef] = true;\r\n\t\t\t\t\tanyMissingValue[inOut] = true;\r\n\t\t\t\t\tundef++;\r\n\t\t\t\t}\r\n\t\t\t}else if(!(curAt.getType()==Attribute.NOMINAL)){ //is numerical?\r\n\t\t\t\tif(inOut==0){\r\n\t\t\t\t\trealValues[inOut][in] = values[i];\r\n\t\t\t\t\tin++;\r\n\t\t\t\t}else if(inOut==1){\r\n\t\t\t\t\trealValues[inOut][out] = values[i];\r\n\t\t\t\t\tout++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\trealValues[inOut][undef] = values[i];\r\n\t\t\t\t\tundef++;\r\n\t\t\t\t}\r\n\t\t\t}else{ //is nominal\r\n\t\t\t\tif(inOut==0){\r\n\t\t\t\t\tintNominalValues[inOut][in] = (int)values[i];\r\n\t\t\t\t\trealValues[inOut][in] = values[i];\r\n\t\t\t\t\tnominalValues[inOut][in] = curAt.getNominalValue((int)values[i]);\r\n\t\t\t\t\tin++;\r\n\t\t\t\t}else if(inOut==1){\r\n\t\t\t\t\tintNominalValues[inOut][out] = (int)values[i];\r\n\t\t\t\t\trealValues[inOut][out] = values[i];\r\n\t\t\t\t\tnominalValues[inOut][out] = curAt.getNominalValue((int)values[i]);\r\n\t\t\t\t\tout++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tintNominalValues[inOut][undef] = (int)values[i];\r\n\t\t\t\t\trealValues[inOut][undef] = values[i];\r\n\t\t\t\t\tnominalValues[inOut][undef] = curAt.getNominalValue((int)values[i]);\r\n\t\t\t\t\tundef++;\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t}", "private NonLinear(NonLinear existing) {\n\t this.rf = existing.rf;\n\t int n = existing.getNumberOfParameters();\n\t extendedParameters = new double[n+1];\n\t setParameters(new double[n]);\n\t}", "ParameterRefinement createParameterRefinement();", "@ParameterizedTest\n @MethodSource(\"org.nd4j.linalg.BaseNd4jTestWithBackends#configs\")\n public void testBatchNormBpNHWC(Nd4jBackend backend) {\n\n INDArray in = Nd4j.rand(DataType.FLOAT, 2, 4, 4, 3);\n INDArray eps = Nd4j.rand(DataType.FLOAT, in.shape());\n INDArray epsStrided = eps.permute(1,0,2,3).dup().permute(1,0,2,3);\n INDArray mean = Nd4j.rand(DataType.FLOAT, 3);\n INDArray var = Nd4j.rand(DataType.FLOAT, 3);\n INDArray gamma = Nd4j.rand(DataType.FLOAT, 3);\n INDArray beta = Nd4j.rand(DataType.FLOAT, 3);\n\n assertEquals(eps, epsStrided);\n\n INDArray out1eps = in.like().castTo(DataType.FLOAT);\n INDArray out1m = mean.like().castTo(DataType.FLOAT);\n INDArray out1v = var.like().castTo(DataType.FLOAT);\n\n INDArray out2eps = in.like().castTo(DataType.FLOAT);\n INDArray out2m = mean.like().castTo(DataType.FLOAT);\n INDArray out2v = var.like().castTo(DataType.FLOAT);\n\n DynamicCustomOp op1 = DynamicCustomOp.builder(\"batchnorm_bp\")\n .addInputs(in, mean, var, gamma, beta, eps)\n .addOutputs(out1eps, out1m, out1v)\n .addIntegerArguments(1, 1, 3)\n .addFloatingPointArguments(1e-5)\n .build();\n\n DynamicCustomOp op2 = DynamicCustomOp.builder(\"batchnorm_bp\")\n .addInputs(in, mean, var, gamma, beta, epsStrided)\n .addOutputs(out2eps, out2m, out2v)\n .addIntegerArguments(1, 1, 3)\n .addFloatingPointArguments(1e-5)\n .build();\n\n Nd4j.exec(op1);\n Nd4j.exec(op2);\n\n assertEquals(out1eps, out2eps); //Fails here\n assertEquals(out1m, out2m);\n assertEquals(out1v, out2v);\n }", "public interface FmTrainParams<T> extends\n HasLabelCol<T>,\n HasVectorColDefaultAsNull<T>,\n HasWeightColDefaultAsNull<T>,\n HasEpsilonDv0000001<T>,\n HasFeatureColsDefaultAsNull<T>,\n FmCommonTrainParams<T> {\n\n /**\n * @cn-name 迭代数据batch size\n * @cn 数据batch size\n */\n ParamInfo<Integer> MINIBATCH_SIZE = ParamInfoFactory\n .createParamInfo(\"batchSize\", Integer.class)\n .setDescription(\"mini-batch size\")\n\t\t\t.setAlias(new String[]{\"minibatchSize\"})\n .setHasDefaultValue(-1)\n .build();\n\n default Integer getBatchSize() {\n return get(MINIBATCH_SIZE);\n }\n\n default T setBatchSize(Integer value) {\n return set(MINIBATCH_SIZE, value);\n }\n}", "@Override\n\tpublic void train(DataSet data) {\n\t\tArrayList<Example> examples = data.getCopyWithBias().getData();\n\t\t// initialize both weight vectors with random values between -0.1 ad 0.1\n\t\tinitWeights(examples.size());\n\n\t\t// store outputs from forward calculation for each example\n\t\t// array will have size # examples.\n\t\tArrayList<Double> nodeOutputs = calculateForward(examples);\n\n\t\t// now take error and back-propagate from output to hidden nodes\n\n\t\tfor (int j = 0; j < examples.size(); j++) {\n\t\t\tExample ex = examples.get(j);\n\n\t\t\t// get hidden node outputs for single example\n\t\t\tfor (int num = 0; num < numHidden; num++) {\n\t\t\t\tArrayList<Double> h_outputs = hiddenOutputs.get(num);\n\t\t\t\tdouble vDotH = dotProduct(h_outputs, layerTwoWeights); // calculate\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// v dot\n\t\t\t\t// h for\n\t\t\t\t// this node\n\n\t\t\t\tfor (int i = 0; i < numHidden - 1; i++) {\n\t\t\t\t\tdouble oldV = layerTwoWeights.get(i);\n\t\t\t\t\tdouble hk = h_outputs.get(i);\n\t\t\t\t\t// Equation describing line below:\n\t\t\t\t\t// v_k = v_k + eta*h_k(y-f(v dot h)) f'(v dot h)\n\t\t\t\t\tlayerTwoWeights.set(i, oldV + eta * hk * (ex.getLabel() - Math.tanh(vDotH)) * derivative(vDotH));\n\t\t\t\t}\n\n\t\t\t\tSet<Integer> features = ex.getFeatureSet();\n\t\t\t\tIterator<Integer> iter = features.iterator();\n\t\t\t\tArrayList<Double> featureVals = new ArrayList<Double>();\n\t\t\t\tfor (int f : features) {\n\t\t\t\t\tfeatureVals.add((double) f);\n\t\t\t\t}\n\n\t\t\t\t// take that error and back-propagate one more time\n\t\t\t\tfor (int x = 0; x < numHidden; x++) {\n\t\t\t\t\tArrayList<Double> initWeights = hiddenWeights.get(x);\n\t\t\t\t\t// List<Object> features =\n\t\t\t\t\t// Arrays.asList(ex.getFeatureSet().toArray());\n\n\t\t\t\t\t// for (int i = 0; i < featureVals.size()-1; i++) {\n\t\t\t\t\tdouble oldWeight = initWeights.get(j);\n\t\t\t\t\tdouble thisInput = ex.getFeature(featureVals.get(x).intValue());\n\t\t\t\t\t// w_kj = w_kj + eta*xj(input)*f'(w_k dot x)*v_k*f'(v dot\n\t\t\t\t\t// h)(y-f(v dot h))\n\t\t\t\t\tdouble updateWeight = oldWeight + eta * thisInput * derivative(dotProduct(featureVals, initWeights))\n\t\t\t\t\t\t\t* layerTwoWeights.get(x) * derivative(vDotH) * (ex.getLabel() - Math.tanh(vDotH));\n\t\t\t\t\tinitWeights.set(j, updateWeight);\n\t\t\t\t\t// }\n\t\t\t\t\thiddenWeights.set(x, initWeights); // update weights for\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// current\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// example\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "public NNImpl(ArrayList<Instance> trainingSet, int hiddenNodeCount, Double learningRate, int maxEpoch, Double [][]hiddenWeights, Double[] outputWeights)\r\n\t{\r\n\t\tthis.trainingSet=trainingSet;\r\n\t\tthis.learningRate=learningRate;\r\n\t\tthis.maxEpoch=maxEpoch;\r\n\r\n\t\t//input layer nodes\r\n\t\tinputNodes=new ArrayList<Node>();\r\n\t\tint inputNodeCount=trainingSet.get(0).attributes.size();\r\n\t\tint outputNodeCount=1;\r\n\t\tfor(int i=0;i<inputNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(0);\r\n\t\t\tinputNodes.add(node);\r\n\t\t}\r\n\r\n\t\t//bias node from input layer to hidden\r\n\t\tNode biasToHidden=new Node(1);\r\n\t\tinputNodes.add(biasToHidden);\r\n\r\n\t\t//hidden layer nodes\r\n\t\thiddenNodes=new ArrayList<Node> ();\r\n\t\tfor(int i=0;i<hiddenNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(2);\r\n\t\t\t//Connecting hidden layer nodes with input layer nodes\r\n\t\t\tfor(int j=0;j<inputNodes.size();j++)\r\n\t\t\t{\r\n\t\t\t\tNodeWeightPair nwp=new NodeWeightPair(inputNodes.get(j),hiddenWeights[i][j]);\r\n\t\t\t\tnode.parents.add(nwp);\r\n\t\t\t}\r\n\t\t\thiddenNodes.add(node);\r\n\t\t}\r\n\r\n\t\t//bias node from hidden layer to output\r\n\t\tNode biasToOutput=new Node(3);\r\n\t\thiddenNodes.add(biasToOutput);\r\n\r\n\r\n\r\n\t\tNode node=new Node(4);\r\n\t\t//Connecting output node with hidden layer nodes\r\n\t\tfor(int j=0;j<hiddenNodes.size();j++)\r\n\t\t{\r\n\t\t\tNodeWeightPair nwp=new NodeWeightPair(hiddenNodes.get(j), outputWeights[j]);\r\n\t\t\tnode.parents.add(nwp);\r\n\t\t}\t\r\n\t\toutputNode = node;\r\n\r\n\t}", "public NNImpl(ArrayList<Instance> trainingSet, int hiddenNodeCount, Double learningRate, int maxEpoch, Double [][]hiddenWeights, Double[][] outputWeights)\r\n\t{\r\n\t\tthis.trainingSet=trainingSet;\r\n\t\tthis.learningRate=learningRate;\r\n\t\tthis.maxEpoch=maxEpoch;\r\n\r\n\t\t//input layer nodes\r\n\t\tinputNodes=new ArrayList<Node>();\r\n\t\tint inputNodeCount=trainingSet.get(0).attributes.size();\r\n\t\tint outputNodeCount=trainingSet.get(0).classValues.size();\r\n\t\tfor(int i=0;i<inputNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(0);\r\n\t\t\tinputNodes.add(node);\r\n\t\t}\r\n\r\n\t\t//bias node from input layer to hidden\r\n\t\tNode biasToHidden=new Node(1);\r\n\t\tinputNodes.add(biasToHidden);\r\n\r\n\t\t//hidden layer nodes\r\n\t\thiddenNodes=new ArrayList<Node> ();\r\n\t\tfor(int i=0;i<hiddenNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(2);\r\n\t\t\t//Connecting hidden layer nodes with input layer nodes\r\n\t\t\tfor(int j=0;j<inputNodes.size();j++)\r\n\t\t\t{\r\n\t\t\t\tNodeWeightPair nwp=new NodeWeightPair(inputNodes.get(j),hiddenWeights[i][j]);\r\n\t\t\t\tnode.parents.add(nwp);\r\n\t\t\t}\r\n\t\t\thiddenNodes.add(node);\r\n\t\t}\r\n\r\n\t\t//bias node from hidden layer to output\r\n\t\tNode biasToOutput=new Node(3);\r\n\t\thiddenNodes.add(biasToOutput);\r\n\r\n\t\t//Output node layer\r\n\t\toutputNodes=new ArrayList<Node> ();\r\n\t\tfor(int i=0;i<outputNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(4);\r\n\t\t\t//Connecting output layer nodes with hidden layer nodes\r\n\t\t\tfor(int j=0;j<hiddenNodes.size();j++)\r\n\t\t\t{\r\n\t\t\t\tNodeWeightPair nwp=new NodeWeightPair(hiddenNodes.get(j), outputWeights[i][j]);\r\n\t\t\t\tnode.parents.add(nwp);\r\n\t\t\t}\t\r\n\t\t\toutputNodes.add(node);\r\n\t\t}\t\r\n\t}", "private LinearAVF() {\n this.booleanValueFunctions = new EnumMap<>(Criterion.class);\n this.linearValueFunctions = new EnumMap<>(Criterion.class);\n this.reversedValueFunctions = new EnumMap<>(Criterion.class);\n Arrays.stream(Criterion.values())\n .filter(c -> c.hasBooleanDomain())\n .forEach(c -> this.setInternalValueFunction(c));\n Arrays.stream(Criterion.values())\n .filter(c -> c.hasDoubleDomain())\n .forEach(c -> this.setInternalValueFunction(c));\n this.weight = new EnumMap<>(Criterion.class);\n Arrays.stream(Criterion.values()).forEach(criterion -> weight.put(criterion, 0.0d));\n }", "@Override\n\tprotected void initClassifierParameters() {\n\t\tlinearKernel = new SelectedParameterItem(\"Linear kernel\", \"-K 0\");\n\t\tpolynomialKernel = new SelectedParameterItem(\"Polynomial kernel\", \"-K 1\");\n\t\tradialBasisKernel = new SelectedParameterItem(\"Radial basis kernel\", \"-K 2\");\n\t\tsigmoidKernel = new SelectedParameterItem(\"Sigmoid kernel\", \"-K 3\");\n\t\tcSVC = new SelectedParameterItem(\"C-SVC\", \"-S 0\");\n\t\tnuSVC = new SelectedParameterItem(\"&nu;-SVC\", \"-S 1\");\n\t\tsvmType = ParameterUtilities.createSelectedParameter(\"SVM type\", cSVC, nuSVC);\n\t\tkernelType = ParameterUtilities.createSelectedParameter(\"Kernel type\", linearKernel, polynomialKernel, radialBasisKernel,\n\t\t\t\tsigmoidKernel);\n\t\tkernelDegree = new Parameter(3, \"Degree in kernel function\", Parameter.TYPE.INTEGER, \"-D\", \"classifier.degree\");\n\t\tkernelGamma = new Parameter(0.5, \"&gamma; in kernel function\", Parameter.TYPE.DOUBLE, \"-G\", \"classifier.gamma\");\n\t\tkernelCoefficient = new Parameter(0.0, \"Coefficient in kernel function\", Parameter.TYPE.DOUBLE, \"-R\", \"classifier.coef0\");\n\t\tparameterC = new Parameter(1.0, \"Parameter C\", Parameter.TYPE.DOUBLE, \"-C\", \"classifier.cost\");\n\t\tparameterNu = new Parameter(0.5, \"Parameter &nu;\", Parameter.TYPE.DOUBLE, \"-N\", \"classifier.nu\");\n\t\ttolerance = new Parameter(0.001, \"Tolerance of termination criterion\", Parameter.TYPE.DOUBLE, \"-E\");\n\t\tweight = new Parameter(null, \"Weight, set C of class i to (weight &times; C)\", Parameter.TYPE.STRING, \"-W\");\n\t}", "@Override\n public void init(float[] data) {\n this.data = data;\n\n //\n shapeArr = new Rectangle2D.Float[data.length];\n colorArr = new Color[data.length];\n pointArr = new Point2D.Float[data.length];\n }", "public void initialize(Instance inst){\n\n\t\t\tDoubleVector weights = CreateDoubleVector(inst.numAttributes(),0) ;// extended length ;\n// \t\tVarianceRationREduction\n\t\t\tif (learningCriteriaOption.getChosenIndex()==1) {\n\t\t\t\tdefaultRule = new RuleVR(this);\n\t\t\t}else {\n\t\t\t\tdefaultRule = new RuleErrR(this);\n\t\t\t}\n\n\t\t\tVector<FuzzySet> terms = new Vector<FuzzySet>();\n\t\t\tfor (int i = 0; i < inst.numAttributes(); i++) {\n\t\t\t\tif (inst.classIndex()==i)\n\t\t\t\t\tcontinue ;\n\t\t\t\tterms.add(new FuzzySet.LOToRO()) ;\n\t\t\t}\n\t\t\n\t\t\tdefaultRule.setAll(terms, weights);\n\t\t\tdefaultRule.setPrefixAndVersion(\"\", currentSystemVersion);\n\t\t\trs.add(defaultRule);\n\t\t\tcurrentValidCandidates = new Vector<FuzzyRuleExtendedCandidate>() ;\n\t\t\tcurrentNonReadyCandidates = new Vector<FuzzyRuleExtendedCandidate>() ;\n\t\t\tinitialized = true ;\n\t\n\t\t\tif (statsAttributes.size()==0){\n\t\t\t\tfor (int j = 0; j < inst.numAttributes(); j++) {\n\t\t\t\t\tif (inst.classIndex()==j)\n\t\t\t\t\t\tcontinue ;\n\t\t\t\t\tstatsAttributes.add(new IncrementalVariance()) ;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public abstract double gradient(double betaForDimension, int dimension);", "public BaseParameters(){\r\n\t}", "NNImpl(ArrayList<Instance> trainingSet, int hiddenNodeCount, Double learningRate, int maxEpoch, Random random, Double[][] hiddenWeights, Double[][] outputWeights) {\r\n this.trainingSet = trainingSet;\r\n this.learningRate = learningRate;\r\n this.maxEpoch = maxEpoch;\r\n this.random = random;\r\n\r\n //input layer nodes\r\n inputNodes = new ArrayList<>();\r\n int inputNodeCount = trainingSet.get(0).attributes.size();\r\n int outputNodeCount = trainingSet.get(0).classValues.size();\r\n for (int i = 0; i < inputNodeCount; i++) {\r\n Node node = new Node(0);\r\n inputNodes.add(node);\r\n }\r\n\r\n //bias node from input layer to hidden\r\n Node biasToHidden = new Node(1);\r\n inputNodes.add(biasToHidden);\r\n\r\n //hidden layer nodes\r\n hiddenNodes = new ArrayList<>();\r\n for (int i = 0; i < hiddenNodeCount; i++) {\r\n Node node = new Node(2);\r\n //Connecting hidden layer nodes with input layer nodes\r\n for (int j = 0; j < inputNodes.size(); j++) {\r\n NodeWeightPair nwp = new NodeWeightPair(inputNodes.get(j), hiddenWeights[i][j]);\r\n node.parents.add(nwp);\r\n }\r\n hiddenNodes.add(node);\r\n }\r\n\r\n //bias node from hidden layer to output\r\n Node biasToOutput = new Node(3);\r\n hiddenNodes.add(biasToOutput);\r\n\r\n //Output node layer\r\n outputNodes = new ArrayList<>();\r\n for (int i = 0; i < outputNodeCount; i++) {\r\n Node node = new Node(4);\r\n //Connecting output layer nodes with hidden layer nodes\r\n for (int j = 0; j < hiddenNodes.size(); j++) {\r\n NodeWeightPair nwp = new NodeWeightPair(hiddenNodes.get(j), outputWeights[i][j]);\r\n node.parents.add(nwp);\r\n }\r\n outputNodes.add(node);\r\n }\r\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize();\n Locale.getISOLanguages();\n double[][] doubleArray0 = new double[9][8];\n double[] doubleArray1 = new double[3];\n double[] doubleArray2 = new double[9];\n doubleArray2[5] = (-163.0);\n doubleArray2[8] = 1421.4058829;\n doubleArray0[3] = doubleArray0[2];\n doubleArray0[4] = doubleArray0[1];\n discretize0.setOutputFormat();\n double[] doubleArray3 = new double[2];\n doubleArray3[0] = 1421.4058829;\n doubleArray3[1] = (-163.0);\n doubleArray0[6] = doubleArray2;\n double[] doubleArray4 = new double[0];\n doubleArray0[7] = doubleArray4;\n double[] doubleArray5 = new double[6];\n doubleArray5[2] = (-163.0);\n doubleArray0[8] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\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\n\tpublic void constructorTest() {\n\t\tCTRNN testCtrnn = new CTRNN(layout1, phenotype1, false);\n\t\tAssert.assertEquals(1.0, testCtrnn.inputWeights[0], 0.001);\n\t\tAssert.assertEquals(2.0, testCtrnn.hiddenWeights[0][0], 0.001);\n\t\tAssert.assertArrayEquals(new double[] {3.0, 4.0}, testCtrnn.biasWeights, 0.001);\n\t\tAssert.assertArrayEquals(new double[] {5.0, 6.0}, testCtrnn.gains, 0.001);\n\t\tAssert.assertArrayEquals(new double[] {7.0, 8.0}, testCtrnn.timeConstants, 0.001);\n\t\t\n\t}", "static Nda<Double> of( double... value ) { return Tensor.of( Double.class, Shape.of( value.length ), value ); }", "public DefaultInferenceParameters(CycAccess cycAccess) {\n this.cycAccess = cycAccess;\n }", "public interface CommonInterface {\n\n\t/* FEED FORWARD\n\t * The input vector. An array of doubles.\n * @return The value returned by the LUT or NN for this input vector\n\t * \tX the input vector. An array of doubles.\n\t * The value return by LUT OR NN for this input vector\n\t * returns output of the neurons forward propagation\n\t * */\n\tpublic double outputFor(double [] X);\n\n\t/* \n\t * Method will tell NN or LUT the output value that should be mapped \n\t * to given input vector i.e. the desired correct output value for an input\n\t * @param X the input vector\n\t * @param argValue The new value to learn\n\t * @return the error in output for input vector \n\t */\n\tpublic double train(double[] X, double argValue);\n\t/*\n\t * Method to write either a LUT or weights of neural net to a file\n\t * @param argFile of type File\n\t */\n\tpublic void save (File argFile) throws IOException;\n\t/*\n\t * Loads LUT or NN weights from file. Load must of course have \n\t * knowledge of how data was written out by save mehtod.\n\t * Should raise an error in case that attempt is being made\n\t * to load data into an LUT or NN whose struct does not match the data in\n\t * the file (.eg. wrong number of hidden neurons)\n\t */\n\tpublic void load (String argFileName) throws IOException;\n}", "static Nda<Double> of( Shape shape, double... values ) { return Tensor.ofAny( Double.class, shape, values ); }", "@Override\n public void calculate(double[] x) {\n\n double prob = 0.0; // the log prob of the sequence given the model, which is the negation of value at this point\n Triple<double[][], double[][], double[][]> allParams = separateWeights(x);\n double[][] linearWeights = allParams.first();\n double[][] W = allParams.second(); // inputLayerWeights \n double[][] U = allParams.third(); // outputLayerWeights \n\n double[][] Y = null;\n if (flags.softmaxOutputLayer) {\n Y = new double[U.length][];\n for (int i = 0; i < U.length; i++) {\n Y[i] = ArrayMath.softmax(U[i]);\n }\n }\n\n double[][] What = emptyW();\n double[][] Uhat = emptyU();\n\n // the expectations over counts\n // first index is feature index, second index is of possible labeling\n double[][] E = empty2D();\n double[][] eW = emptyW();\n double[][] eU = emptyU();\n\n // iterate over all the documents\n for (int m = 0; m < data.length; m++) {\n int[][][] docData = data[m];\n int[] docLabels = labels[m];\n\n // make a clique tree for this document\n CRFCliqueTree cliqueTree = CRFCliqueTree.getCalibratedCliqueTree(docData, labelIndices, numClasses, classIndex,\n backgroundSymbol, new NonLinearCliquePotentialFunction(linearWeights, W, U, flags));\n\n // compute the log probability of the document given the model with the parameters x\n int[] given = new int[window - 1];\n Arrays.fill(given, classIndex.indexOf(backgroundSymbol));\n int[] windowLabels = new int[window];\n Arrays.fill(windowLabels, classIndex.indexOf(backgroundSymbol));\n\n if (docLabels.length>docData.length) { // only true for self-training\n // fill the given array with the extra docLabels\n System.arraycopy(docLabels, 0, given, 0, given.length);\n System.arraycopy(docLabels, 0, windowLabels, 0, windowLabels.length);\n // shift the docLabels array left\n int[] newDocLabels = new int[docData.length];\n System.arraycopy(docLabels, docLabels.length-newDocLabels.length, newDocLabels, 0, newDocLabels.length);\n docLabels = newDocLabels;\n }\n // iterate over the positions in this document\n for (int i = 0; i < docData.length; i++) {\n int label = docLabels[i];\n double p = cliqueTree.condLogProbGivenPrevious(i, label, given);\n if (VERBOSE) {\n System.err.println(\"P(\" + label + \"|\" + ArrayMath.toString(given) + \")=\" + p);\n }\n prob += p;\n System.arraycopy(given, 1, given, 0, given.length - 1);\n given[given.length - 1] = label;\n }\n\n // compute the expected counts for this document, which we will need to compute the derivative\n // iterate over the positions in this document\n for (int i = 0; i < docData.length; i++) {\n // for each possible clique at this position\n System.arraycopy(windowLabels, 1, windowLabels, 0, window - 1);\n windowLabels[window - 1] = docLabels[i];\n for (int j = 0; j < docData[i].length; j++) {\n Index<CRFLabel> labelIndex = labelIndices[j];\n // for each possible labeling for that clique\n int[] cliqueFeatures = docData[i][j];\n double[] As = null;\n double[] fDeriv = null;\n double[][] yTimesA = null;\n double[] sumOfYTimesA = null;\n\n if (j == 0) {\n As = NonLinearCliquePotentialFunction.hiddenLayerOutput(W, cliqueFeatures, flags);\n fDeriv = new double[inputLayerSize];\n double fD = 0;\n for (int q = 0; q < inputLayerSize; q++) {\n if (useSigmoid) {\n fD = As[q] * (1 - As[q]); \n } else {\n fD = 1 - As[q] * As[q]; \n }\n fDeriv[q] = fD;\n }\n\n // calculating yTimesA for softmax\n if (flags.softmaxOutputLayer) {\n double val = 0;\n\n yTimesA = new double[outputLayerSize][numHiddenUnits];\n for (int ii = 0; ii < outputLayerSize; ii++) {\n yTimesA[ii] = new double[numHiddenUnits];\n }\n sumOfYTimesA = new double[outputLayerSize];\n\n for (int k = 0; k < outputLayerSize; k++) {\n double[] Yk = null;\n if (flags.tieOutputLayer) {\n Yk = Y[0];\n } else {\n Yk = Y[k];\n }\n double sum = 0;\n for (int q = 0; q < inputLayerSize; q++) {\n if (q % outputLayerSize == k) {\n int hiddenUnitNo = q / outputLayerSize;\n val = As[q] * Yk[hiddenUnitNo];\n yTimesA[k][hiddenUnitNo] = val;\n sum += val;\n }\n }\n sumOfYTimesA[k] = sum;\n }\n }\n\n // calculating Uhat What\n int[] cliqueLabel = new int[j + 1];\n System.arraycopy(windowLabels, window - 1 - j, cliqueLabel, 0, j + 1);\n\n CRFLabel crfLabel = new CRFLabel(cliqueLabel);\n int givenLabelIndex = labelIndex.indexOf(crfLabel);\n double[] Uk = null;\n double[] UhatK = null;\n double[] Yk = null;\n double[] yTimesAK = null;\n double sumOfYTimesAK = 0;\n if (flags.tieOutputLayer) {\n Uk = U[0];\n UhatK = Uhat[0];\n if (flags.softmaxOutputLayer) {\n Yk = Y[0];\n }\n } else {\n Uk = U[givenLabelIndex];\n UhatK = Uhat[givenLabelIndex];\n if (flags.softmaxOutputLayer) {\n Yk = Y[givenLabelIndex];\n }\n }\n\n if (flags.softmaxOutputLayer) {\n yTimesAK = yTimesA[givenLabelIndex];\n sumOfYTimesAK = sumOfYTimesA[givenLabelIndex];\n }\n\n for (int k = 0; k < inputLayerSize; k++) {\n double deltaK = 1;\n if (flags.sparseOutputLayer || flags.tieOutputLayer) {\n if (k % outputLayerSize == givenLabelIndex) {\n int hiddenUnitNo = k / outputLayerSize;\n if (flags.softmaxOutputLayer) {\n UhatK[hiddenUnitNo] += (yTimesAK[hiddenUnitNo] - Yk[hiddenUnitNo] * sumOfYTimesAK);\n deltaK *= Yk[hiddenUnitNo];\n } else {\n UhatK[hiddenUnitNo] += As[k];\n deltaK *= Uk[hiddenUnitNo];\n }\n }\n } else {\n UhatK[k] += As[k];\n if (useOutputLayer) {\n deltaK *= Uk[k];\n }\n }\n if (useHiddenLayer)\n deltaK *= fDeriv[k];\n if (useOutputLayer) {\n if (flags.sparseOutputLayer || flags.tieOutputLayer) {\n if (k % outputLayerSize == givenLabelIndex) {\n double[] WhatK = What[k];\n for (int n = 0; n < cliqueFeatures.length; n++) {\n WhatK[cliqueFeatures[n]] += deltaK;\n }\n }\n } else {\n double[] WhatK = What[k];\n for (int n = 0; n < cliqueFeatures.length; n++) {\n WhatK[cliqueFeatures[n]] += deltaK;\n }\n }\n } else {\n if (k == givenLabelIndex) {\n double[] WhatK = What[k];\n for (int n = 0; n < cliqueFeatures.length; n++) {\n WhatK[cliqueFeatures[n]] += deltaK;\n }\n }\n }\n }\n }\n\n for (int k = 0; k < labelIndex.size(); k++) { // labelIndex.size() == numClasses\n int[] label = labelIndex.get(k).getLabel();\n double p = cliqueTree.prob(i, label); // probability of these labels occurring in this clique with these features\n if (j == 0) { // for node features\n double[] Uk = null;\n double[] eUK = null;\n double[] Yk = null;\n if (flags.tieOutputLayer) {\n Uk = U[0];\n eUK = eU[0];\n if (flags.softmaxOutputLayer) {\n Yk = Y[0];\n }\n } else {\n Uk = U[k];\n eUK = eU[k];\n if (flags.softmaxOutputLayer) {\n Yk = Y[k];\n }\n }\n if (useOutputLayer) {\n for (int q = 0; q < inputLayerSize; q++) {\n double deltaQ = 1;\n if (flags.sparseOutputLayer || flags.tieOutputLayer) {\n if (q % outputLayerSize == k) {\n int hiddenUnitNo = q / outputLayerSize;\n if (flags.softmaxOutputLayer) {\n eUK[hiddenUnitNo] += (yTimesA[k][hiddenUnitNo] - Yk[hiddenUnitNo] * sumOfYTimesA[k]) * p;\n deltaQ = Yk[hiddenUnitNo];\n } else {\n eUK[hiddenUnitNo] += As[q] * p;\n deltaQ = Uk[hiddenUnitNo];\n }\n }\n } else {\n eUK[q] += As[q] * p;\n deltaQ = Uk[q];\n }\n if (useHiddenLayer)\n deltaQ *= fDeriv[q];\n if (flags.sparseOutputLayer || flags.tieOutputLayer) {\n if (q % outputLayerSize == k) {\n double[] eWq = eW[q];\n for (int n = 0; n < cliqueFeatures.length; n++) {\n eWq[cliqueFeatures[n]] += deltaQ * p;\n }\n }\n } else {\n double[] eWq = eW[q];\n for (int n = 0; n < cliqueFeatures.length; n++) {\n eWq[cliqueFeatures[n]] += deltaQ * p;\n }\n }\n }\n } else {\n double deltaK = 1;\n if (useHiddenLayer)\n deltaK *= fDeriv[k];\n double[] eWK = eW[k];\n for (int n = 0; n < cliqueFeatures.length; n++) {\n eWK[cliqueFeatures[n]] += deltaK * p;\n }\n }\n } else { // for edge features\n for (int n = 0; n < cliqueFeatures.length; n++) {\n E[cliqueFeatures[n]][k] += p;\n }\n }\n }\n }\n }\n }\n\n if (Double.isNaN(prob)) { // shouldn't be the case\n throw new RuntimeException(\"Got NaN for prob in CRFNonLinearLogConditionalObjectiveFunction.calculate()\");\n }\n\n value = -prob;\n if(VERBOSE){\n System.err.println(\"value is \" + value);\n }\n\n // compute the partial derivative for each feature by comparing expected counts to empirical counts\n int index = 0;\n for (int i = 0; i < E.length; i++) {\n int originalIndex = edgeFeatureIndicesMap.get(i);\n\n for (int j = 0; j < E[i].length; j++) {\n derivative[index++] = (E[i][j] - Ehat[i][j]);\n if (VERBOSE) {\n System.err.println(\"linearWeights deriv(\" + i + \",\" + j + \") = \" + E[i][j] + \" - \" + Ehat[i][j] + \" = \" + derivative[index - 1]);\n }\n }\n }\n if (index != edgeParamCount)\n throw new RuntimeException(\"after edge derivative, index(\"+index+\") != edgeParamCount(\"+edgeParamCount+\")\");\n\n for (int i = 0; i < eW.length; i++) {\n for (int j = 0; j < eW[i].length; j++) {\n derivative[index++] = (eW[i][j] - What[i][j]);\n if (VERBOSE) {\n System.err.println(\"inputLayerWeights deriv(\" + i + \",\" + j + \") = \" + eW[i][j] + \" - \" + What[i][j] + \" = \" + derivative[index - 1]);\n }\n }\n }\n\n\n if (index != beforeOutputWeights)\n throw new RuntimeException(\"after W derivative, index(\"+index+\") != beforeOutputWeights(\"+beforeOutputWeights+\")\");\n\n if (useOutputLayer) {\n for (int i = 0; i < eU.length; i++) {\n for (int j = 0; j < eU[i].length; j++) {\n derivative[index++] = (eU[i][j] - Uhat[i][j]);\n if (VERBOSE) {\n System.err.println(\"outputLayerWeights deriv(\" + i + \",\" + j + \") = \" + eU[i][j] + \" - \" + Uhat[i][j] + \" = \" + derivative[index - 1]);\n }\n }\n }\n }\n\n if (index != x.length)\n throw new RuntimeException(\"after W derivative, index(\"+index+\") != x.length(\"+x.length+\")\");\n\n int regSize = x.length;\n if (flags.skipOutputRegularization || flags.softmaxOutputLayer) {\n regSize = beforeOutputWeights;\n }\n\n // incorporate priors\n if (prior == QUADRATIC_PRIOR) {\n double sigmaSq = sigma * sigma;\n for (int i = 0; i < regSize; i++) {\n double k = 1.0;\n double w = x[i];\n value += k * w * w / 2.0 / sigmaSq;\n derivative[i] += k * w / sigmaSq;\n }\n } else if (prior == HUBER_PRIOR) {\n double sigmaSq = sigma * sigma;\n for (int i = 0; i < regSize; i++) {\n double w = x[i];\n double wabs = Math.abs(w);\n if (wabs < epsilon) {\n value += w * w / 2.0 / epsilon / sigmaSq;\n derivative[i] += w / epsilon / sigmaSq;\n } else {\n value += (wabs - epsilon / 2) / sigmaSq;\n derivative[i] += ((w < 0.0) ? -1.0 : 1.0) / sigmaSq;\n }\n }\n } else if (prior == QUARTIC_PRIOR) {\n double sigmaQu = sigma * sigma * sigma * sigma;\n for (int i = 0; i < regSize; i++) {\n double k = 1.0;\n double w = x[i];\n value += k * w * w * w * w / 2.0 / sigmaQu;\n derivative[i] += k * w / sigmaQu;\n }\n }\n }", "public CvBoostParams()\r\n {\r\n\r\n super( CvBoostParams_0() );\r\n\r\n return;\r\n }", "public Fitter() {\n this.alpha = -1.0; // reflection coefficient\n this.gamma = 2.0; // expansion coefficient\n this.beta = 0.5; // contraction coefficient\n this.maxError = 1.0E-10; // maximum error tolerance\n }", "private Exemplar (NNge nnge, Instances inst, int size, double classV){\n\n super(inst, size);\n m_NNge = nnge;\n m_ClassValue = classV;\n m_MinBorder = new double[numAttributes()];\n m_MaxBorder = new double[numAttributes()];\n m_Range = new boolean[numAttributes()][];\n for(int i = 0; i < numAttributes(); i++){\n\tif(attribute(i).isNumeric()){\n\t m_MinBorder[i] = Double.POSITIVE_INFINITY;\n\t m_MaxBorder[i] = Double.NEGATIVE_INFINITY;\n\t m_Range[i] = null;\n\t} else {\n\t m_MinBorder[i] = Double.NaN;\n\t m_MaxBorder[i] = Double.NaN;\n\t m_Range[i] = new boolean[attribute(i).numValues() + 1];\n\t for(int j = 0; j < attribute(i).numValues() + 1; j++){\n\t m_Range[i][j] = false;\n\t }\n\t}\n }\n }", "@Test(timeout = 4000)\n public void test31() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.setIgnoreClass(true);\n discretize0.m_NumBins = (-3104);\n discretize0.m_MakeBinary = true;\n try { \n discretize0.setInputFormat((Instances) null);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // Can't ignore class when changing the number of attributes!\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "public static Map<String, Object> l_LAYER_MODEL_Generic(double[][] X,\r\n\t\t\tdouble[][] Y, int[] layerDimenstions,\r\n\t\t\tParameterInitializationType paramInitType, double learningRate,\r\n\t\t\tint numOfIterations, DeepNNOptimizers optimiser,\r\n\t\t\tDeepNNRegularizor regulizer, double dropOutKeepThreshould,\r\n\t\t\tDeepNNActivations hiddenLayersActivation,\r\n\t\t\tDeepNNActivations finalLayerActivation,\r\n\t\t\tDeepNNCostFunctions costFunction, int totalNumberOfBatches,\r\n\t\t\tboolean isMultiClassClassification, boolean iprintCost)\r\n\t\t\tthrows Exception {\r\n\r\n\t\tMatrixUtil.setSeed(IPredictionModelConstants.RANDOM_SEED_FOR_REPRODUCIBILITY);\r\n\r\n\t\t//XYSeries //seriesData = new XYSeries(\"Cost\");\r\n\t\t// X = np.T(X);\r\n\t\t// Y = np.T(Y);\r\n\r\n\t\t\r\n\t\tint m = X[0].length;\r\n\r\n\t\tMap<String, Object> parameters = DNNUtils.initializeParameterDeep(\r\n\t\t\t\tlayerDimenstions, m, paramInitType);\r\n\t\tMap<Enum<DeepNNKeysForMaps>, Object> AdamParameters = null;\r\n\t\tMap<String, Object> grads = null;\r\n\t\tMap<String, Object> actCaches = null;\r\n\t\tMap<String, Object> feedForwardResult = null;\r\n\t\tdouble[][] AL = null;\r\n\t\tint L = parameters.size() / 2, costPlotCount = 1;\r\n\t\tdouble cost = 0.0;\r\n\t\tdouble finalPrecision = 0.0, beta1 = 0.9, beta2 = 0.99, adamt = 2;\r\n\t\tdouble[][] X_reamining = X;\r\n\t\tdouble[][] Y_remaining = Y;\r\n\t\tdouble[][] X_Single_Batch = null, Y_Batch = null, Y_Single_batch = null;\r\n\t\tMap<String, Object> dropOutMap = new HashMap<>();\r\n\t\tMap<DeepNNKeysForMaps, Object> oneHotMatrixresult = null;\r\n\t\tMap<Enum<DeepNNKeysForMaps>, Object> resultMap = null;\r\n\t\tif (optimiser == DeepNNOptimizers.ADAM) {\r\n\t\t\tAdamParameters = DNNUtils.initializeAdamParameters(parameters);\r\n\t\t\tbeta1 = 0.9;\r\n\t\t\tbeta2 = 0.999;\r\n\t\t\tadamt = 2;\r\n\r\n\t\t}\r\n\t\tint ithBatchSize = totalNumberOfBatches;\r\n\t\tfor (int batch = 1; batch <= totalNumberOfBatches; batch++) {\r\n\r\n\t\t\tdouble firstBatchSize = 1 - (double) 1 / ithBatchSize--;\r\n\t\t\tif (batch != totalNumberOfBatches) {\r\n\t\t\t\tif (isMultiClassClassification) {\r\n\t\t\t\t\tresultMap = MatrixUtil.splitIntoTrainAndTestForClassification(\r\n\t\t\t\t\t\t\tX_reamining, Y_remaining, firstBatchSize);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresultMap = MatrixUtil.splitIntoTrainAndTestForRegression(\r\n\t\t\t\t\t\t\tX_reamining, Y_remaining, firstBatchSize);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tX_reamining = (double[][]) resultMap\r\n\t\t\t\t\t\t.get(DeepNNKeysForMaps.KEY_FOR_FEATURE_MATRIX);\r\n\t\t\t\tY_remaining = (double[][]) resultMap\r\n\t\t\t\t\t\t.get(DeepNNKeysForMaps.KEY_FOR_OUTPUT_LABEL);\r\n\t\t\t\tX_Single_Batch = (double[][]) resultMap\r\n\t\t\t\t\t\t.get(DeepNNKeysForMaps.KEY_FOR_FEATURE_MATRIX_TEST);\r\n\t\t\t\tY_Batch = (double[][]) resultMap\r\n\t\t\t\t\t\t.get(DeepNNKeysForMaps.KEY_FOR_OUTPUT_LABEL_TEST);\r\n\r\n\t\t\t\tif (isMultiClassClassification) {\r\n\t\t\t\t\toneHotMatrixresult = MatrixUtil.createOneHotVectorMatrix(Y_Batch);\r\n\t\t\t\t\tint numberOfClasses = (int) oneHotMatrixresult\r\n\t\t\t\t\t\t\t.get(DeepNNKeysForMaps.KEY_FOR_NUMBER_OF_CLASSES);\r\n\t\t\t\t\tif (numberOfClasses != layerDimenstions[layerDimenstions.length - 1]) {\r\n\t\t\t\t\t\tSystem.err\r\n\t\t\t\t\t\t\t\t.println(\"not enough dimensions sampled, so eskipping the batch with size :\"\r\n\t\t\t\t\t\t\t\t\t\t+ X_Single_Batch.length);\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tY_Single_batch = (double[][]) oneHotMatrixresult\r\n\t\t\t\t\t\t\t.get(DeepNNKeysForMaps.KEY_FOR_ONE_HOT_MATRIX);\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\tY_Single_batch = Y_Batch;\r\n\t\t\t\t}\r\n\r\n\t\t\t} else {\r\n\t\t\t\tX_Single_Batch = X_reamining;\r\n\t\t\t\tif (isMultiClassClassification) {\r\n\t\t\t\t\toneHotMatrixresult = MatrixUtil\r\n\t\t\t\t\t\t\t.createOneHotVectorMatrix(Y_remaining);\r\n\t\t\t\t\tint numberOfClasses = (int) oneHotMatrixresult\r\n\t\t\t\t\t\t\t.get(DeepNNKeysForMaps.KEY_FOR_NUMBER_OF_CLASSES);\r\n\t\t\t\t\tY_Single_batch = (double[][]) oneHotMatrixresult\r\n\t\t\t\t\t\t\t.get(DeepNNKeysForMaps.KEY_FOR_ONE_HOT_MATRIX);\r\n\t\t\t\t\tif (numberOfClasses != layerDimenstions[layerDimenstions.length - 1]) {\r\n\t\t\t\t\t\tSystem.err\r\n\t\t\t\t\t\t\t\t.println(\"not enough dimension result sampled, so eskipping the batch with size :\"\r\n\t\t\t\t\t\t\t\t\t\t+ X_Single_Batch.length);\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tY_Single_batch = Y_remaining;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tm = X_Single_Batch.length;\r\n\t\t\tMatrixUtil.print(\"==============epoch :\" + batch + \"/ \"\r\n\t\t\t\t\t+ totalNumberOfBatches + \" with size: \"\r\n\t\t\t\t\t+ X_Single_Batch.length);\r\n\t\t\tX_Single_Batch = MatrixUtil.T(X_Single_Batch);\r\n\t\t\tY_Single_batch = MatrixUtil.T(Y_Single_batch);\r\n\r\n\t\t\tfor (int i = 0; i < numOfIterations; i++) {\r\n\t\t\t\tStopwatch stopWatch = new Stopwatch();\r\n\t\t\t\tfeedForwardResult = DNNUtils.L_model_forward_Generic(\r\n\t\t\t\t\t\tX_Single_Batch, parameters, hiddenLayersActivation,\r\n\t\t\t\t\t\tfinalLayerActivation, regulizer, dropOutKeepThreshould,\r\n\t\t\t\t\t\tdropOutMap);\r\n\t\t\t\tactCaches = (Map<String, Object>) feedForwardResult.get(String\r\n\t\t\t\t\t\t.valueOf(\"actCache_\" + (L)));\r\n\t\t\t\tAL = (double[][]) actCaches.get(String.valueOf(\"A\"));\r\n\t\t\t\t// System.out.println(\"time taking in forward propogation: \"+stopWatch.elapsedTime());\r\n\t\t\t\tcost = DNNUtils.getCost(m, Y_Single_batch, AL, costFunction);\r\n\r\n\t\t\t\t//seriesData.add((costPlotCount++), cost);\r\n\t\t\t\t//\r\n\t\t\t\t// stopWatch=new Stopwatch();\r\n\t\t\t\tgrads = DNNUtils.L_model_backward_Generic(AL, Y_Single_batch,\r\n\t\t\t\t\t\tfeedForwardResult, hiddenLayersActivation,\r\n\t\t\t\t\t\tfinalLayerActivation, costFunction, regulizer,\r\n\t\t\t\t\t\tdropOutKeepThreshould, dropOutMap); // here i\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// should\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// pass both\r\n\t\t\t\t// System.out.println(\"time taking in backward propogation: \"+stopWatch.elapsedTime());\r\n\t\t\t\t// // cashes;\r\n\t\t\t\tif (optimiser == DeepNNOptimizers.ADAM) {\r\n\t\t\t\t\tAdamParameters = DNNUtils.updateParametersWithAdams(\r\n\t\t\t\t\t\t\tparameters, grads, AdamParameters, adamt,\r\n\t\t\t\t\t\t\tlearningRate, beta1, beta2,\r\n\t\t\t\t\t\t\tIPredictionModelConstants.EPSILON);\r\n\t\t\t\t\tparameters = (Map<String, Object>) AdamParameters\r\n\t\t\t\t\t\t\t.get(DeepNNKeysForMaps.KEY_FOR_NN_PARAMETERS);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tparameters = DNNUtils.updateParametersWithGD(parameters,\r\n\t\t\t\t\t\t\tgrads, learningRate);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (i % 400 == 0 && iprintCost) {\r\n\t\t\t\t\tMatrixUtil.print(\"==============\");\r\n\t\t\t\t\tMatrixUtil.print(\"Cost = \" + cost);\r\n\t\t\t\t\t// np.print(\"Predictions = \" + Arrays.deepToString(AL));\r\n\t\t\t\t\t// np.print(\"Real = \" + Arrays.deepToString(Y));\r\n\t\t\t\t\tif (isMultiClassClassification) {\r\n\t\t\t\t\t\tfinalPrecision = DNNUtils\r\n\t\t\t\t\t\t\t\t.accuracyForMultiClassClassification(AL,\r\n\t\t\t\t\t\t\t\t\t\tY_Single_batch);\r\n\t\t\t\t\t\t// np.printshapes(AL, Y_OneHot);\r\n\t\t\t\t\t\tMatrixUtil.print(\"Predicted multiclass classification precision= \"\r\n\t\t\t\t\t\t\t\t+ finalPrecision);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tfinalPrecision = DNNUtils.accuracyForClassification(AL,\r\n\t\t\t\t\t\t\t\tY_Single_batch);\r\n\t\t\t\t\t\tMatrixUtil.print(\"Predicted classification precision= \"\r\n\t\t\t\t\t\t\t\t+ finalPrecision);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\r\n\t\t\t\t} else if (i % 40 == 0 && !iprintCost) {\r\n\t\t\t\t\tMatrixUtil.print(\"Cost = \" + cost);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn parameters;\r\n\t}", "private ArrayList<Tensor<?>> Funcionar_salida_Ant_umbral(float location, float email, float imei, float device, float serialnumber, float macaddress, float advertiser) {\n float n_epochs = 1;\n\n float output = 0; //y\n\n //First, create an input tensor:\n /*\n\n */\n\n\n //**** TEORIA *******\n //First, create an input tensor:\n //Tensor input = Tensor.create(features);\n // float[][] output = new float[1][1];\n //Then perform inference by:\n //Tensor op_tensor = sess.runner().feed(\"input\", input).fetch(\"output\").run().get(0).expect(Float.class);\n //Copy this output to a float array using:\n //op_tensor.copyTo(output);\n // values.copyTo(output);\n Tensor input_location = Tensor.create(location);\n Tensor input_email = Tensor.create(email);\n Tensor input_imei = Tensor.create(imei);\n Tensor input_device = Tensor.create(device);\n Tensor input_serialnumber = Tensor.create(serialnumber);\n Tensor input_macaddress = Tensor.create(macaddress);\n Tensor input_advertiser = Tensor.create(advertiser);\n\n Tensor input_umbral_verde = Tensor.create(umbral_verde);\n Tensor input_umbral_naranja = Tensor.create(umbral_naranja);\n Tensor input_umbral_rojo = Tensor.create(umbral_rojo);\n\n Tensor input_Plocation = Tensor.create(Plocation);\n Tensor input_Pemail = Tensor.create(Pemail);\n Tensor input_Pdevice = Tensor.create(Pdevice);\n Tensor input_Pimei = Tensor.create(Pimei);\n Tensor input_Pserialnumber = Tensor.create(Pserialnumber);\n Tensor input_Pmacaddress = Tensor.create(Pmacaddress);\n Tensor input_Padvertiser = Tensor.create(Padvertiser);\n\n\n\n ArrayList<Tensor<?>> list_op_tensor = new ArrayList<Tensor<?>>();\n\n String location_filtrado = \"NO\";\n String email_filtrado = \"NO\";\n String imei_filtrado = \"NO\";\n String device_filtrado = \"NO\";\n String serialnumber_filtrado = \"NO\";\n String macaddress_filtrado = \"NO\";\n String advertiser_filtrado = \"NO\";\n\n String filtraciones_aplicacion = \"\";\n\n if (location == 1){\n location_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -Location\" + \"\\n\";\n }\n if (email == 1){\n email_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -Email\" + \"\\n\";\n }\n if (device == 1){\n device_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -DeviceID\" + \"\\n\";\n }\n if (imei == 1){\n imei_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -Imei\" + \"\\n\";\n\n }\n if (serialnumber == 1){\n serialnumber_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -SerialNumber\" + \"\\n\";\n\n }\n if (macaddress == 1){\n macaddress_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -MacAddress\" + \"\\n\";\n\n }\n if (advertiser == 1){\n advertiser_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -AdvertiserID\" + \"\\n\";\n\n }\n\n //Tensor op_tensor = sess.runner().feed(\"input\",input).fetch(\"output\").run().get(0).expect(Float.class);\n //umbral_green\n Tensor op_tensor_verde = sess.runner().feed(\"location_input\",input_location).feed(\"email_input\",input_email).feed(\"imei_input\",input_imei).feed(\"device_input\",input_device).feed(\"umbral\",input_umbral_verde).feed(\"Plocation\",input_Plocation).feed(\"Pemail\",input_Pemail).feed(\"Pdevice\",input_Pdevice).feed(\"Pimei\",input_Pimei).feed(\"Pserialnumber\",input_Pserialnumber).feed(\"Pmacaddress\",input_Pmacaddress).feed(\"Padvertiser\",input_Padvertiser).fetch(\"output\").run().get(0).expect(Float.class);\n //umbral Naranja\n Tensor op_tensor_naranja = sess.runner().feed(\"location_input\",input_location).feed(\"email_input\",input_email).feed(\"imei_input\",input_imei).feed(\"device_input\",input_device).feed(\"umbral\",input_umbral_naranja).feed(\"Plocation\",input_Plocation).feed(\"Pemail\",input_Pemail).feed(\"Pdevice\",input_Pdevice).feed(\"Pimei\",input_Pimei).feed(\"Pserialnumber\",input_Pserialnumber).feed(\"Pmacaddress\",input_Pmacaddress).feed(\"Padvertiser\",input_Padvertiser).fetch(\"output\").run().get(0).expect(Float.class);\n //umbral rojo\n Tensor op_tensor_rojo =sess.runner().feed(\"location_input\",input_location).feed(\"email_input\",input_email).feed(\"imei_input\",input_imei).feed(\"device_input\",input_device).feed(\"umbral\",input_umbral_rojo).feed(\"Plocation\",input_Plocation).feed(\"Pemail\",input_Pemail).feed(\"Pdevice\",input_Pdevice).feed(\"Pimei\",input_Pimei).feed(\"Pserialnumber\",input_Pserialnumber).feed(\"Pmacaddress\",input_Pmacaddress).feed(\"Padvertiser\",input_Padvertiser).fetch(\"output\").run().get(0).expect(Float.class);\n\n list_op_tensor.add(op_tensor_verde);\n list_op_tensor.add(op_tensor_naranja);\n list_op_tensor.add(op_tensor_rojo);\n\n //para escribir en la app en W y B test\n // LO COMENTO 12/02/2021\n // ArrayList<Tensor<?>> values = (ArrayList<Tensor<?>>) sess.runner().fetch(\"W/read\").fetch(\"b/read\").run();\n // NO VA ESTA PRUEBA ArrayList<Tensor<?>> values = (ArrayList<Tensor<?>>) sess.runner().fetch(\"W/read\").fetch(\"b/read\").fetch(\"y/output\").run();\n\n //CREAR UN TEXTO PARA ESCRIBIR EL OUTPUT PREDECIDO: Out\n\n // Y.setText(\"Salida: Y= \"+ Float.toString(op_tensor.floatValue()) +\", si entrada X=1\");\n // Y.setText(\"Salida: Y= \"+ Float.toString(op_tensor.floatValue()) +\", si entrada email,...\");\n\n String recomendacion = \"No hacer nada\";\n String Nivel = \" Bajo\";\n int Nivel_color = 0; //0 es verde, 1 naranja, 2 rojo\n if (op_tensor_verde.floatValue() == 1) {\n if(op_tensor_naranja.floatValue() == 1 ){\n if(op_tensor_rojo.floatValue() == 1 ){\n Nivel = \" Alto\";\n Nivel_color = 2;\n }\n else {\n Nivel = \" Medio\";\n Nivel_color = 1;\n }\n }\n else {\n Nivel = \" Bajo\";\n Nivel_color = 0;\n }\n }\n\n /// test.setBackgroundResource(R.color.holo_green_light);\n\n\n // resumen_app.setText(\"Resumen App analizada: \"+ \"\\n\" + \"Nota: Si una app tiene una filtración, se marcará dicho valor con un 'SI'\"+ \"\\n\" + \"Location: \" + location_filtrado + \"\\n\" + \"Email: \" + email_filtrado + \"\\n\" + \"DeviceID: \" + device_filtrado + \"\\n\" + \"Imei: \" + imei_filtrado + \"\\n\" +\n // \"Recomendación: \" + recomendacion);\n subtitulo.setText(\"Nivel: \" );\n titulo.setText(Nivel );\n // titulo.setTextColor(android.R.color.background_dark);\n\n // resumen_app.setText(\"Filtraciones Spotify: \"+ \"\\n\" + \"\\n\" + \"Location: \" + location_filtrado + \"\\n\" + \"Email: \" + email_filtrado + \"\\n\" + \"DeviceID: \" + device_filtrado + \"\\n\" + \"Imei: \" + imei_filtrado );\n resumen_app.setText(\"Filtraciones Spotify: \"+ \"\\n\" + \"\\n\" + filtraciones_aplicacion );\n\n //mirar bien codigo:\n if ( Nivel_color == 0) {\n // resumen_app.setBackgroundResource(R.color.verde);\n nivel_color = 0;\n resumen_app.setBackgroundResource(R.drawable.stilo_borde_textview);\n }\n if ( Nivel_color == 1) {\n // resumen_app.setBackgroundResource(R.color.naranja);\n nivel_color = 1;\n resumen_app.setBackgroundResource(R.drawable.stilo_borde_naranja);\n }\n if ( Nivel_color == 2) {\n // resumen_app.setBackgroundResource(R.color.rojo);\n nivel_color = 2;\n resumen_app.setBackgroundResource(R.drawable.stilo_borde_rojo);\n }\n\n /* ArrayList<Tensor<?>> values = (ArrayList<Tensor<?>>) sess.runner().fetch(\"Plocation/read\").fetch(\"Pemail/read\").fetch(\"Pdevice/read\").fetch(\"Pimei/read\").run();\n\n // y_mejoras_location.add(((values.get(0).floatValue())));\n y_mejoras_location.add(Plocation);\n x_mejoras_location.add(\"\" + (0 + num_epoch*num));\n\n // y_mejoras_email.add(((values.get(1).floatValue())));\n y_mejoras_email.add(Pemail);\n x_mejoras_email.add(\"\" + (0 + num_epoch*num));\n\n // y_mejoras_device.add(((values.get(2).floatValue())));\n y_mejoras_device.add(Pdevice);\n x_mejoras_device.add(\"\" + (0 + num_epoch*num));\n\n //y_mejoras_imei.add(((values.get(3).floatValue())));\n y_mejoras_imei.add(Pimei);\n x_mejoras_imei.add(\"\" + (0 + num_epoch*num));\n\n\n */\n\n ///\n\n // Y.setText(Float.toString(values.get(1).floatValue()));\n\n return list_op_tensor;\n }", "@Override\r\n public void buildClassifier(Instances instances) throws Exception {\n getCapabilities().testWithFail(instances);\r\n\r\n // remove instances with missing class\r\n instances = new Instances(instances);\r\n instances.deleteWithMissingClass();\r\n\r\n // ensure we have a data set with discrete variables only and with no\r\n // missing values\r\n instances = normalizeDataSet(instances);\r\n\r\n // copy instances to local field\r\n// m_Instances = new Instances(instances);\r\n m_Instances = instances;\r\n\r\n // initialize arrays\r\n int numClasses = m_Instances.classAttribute().numValues();\r\n m_Structures = new BayesNet[numClasses];\r\n m_cInstances = new Instances[numClasses];\r\n // m_cEstimator = new DiscreteEstimatorBayes(numClasses, m_fAlpha);\r\n\r\n for (int iClass = 0; iClass < numClasses; iClass++) {\r\n splitInstances(iClass);\r\n }\r\n\r\n // update probabilty of class label, using Bayesian network associated\r\n // with the class attribute only\r\n Remove rFilter = new Remove();\r\n rFilter.setAttributeIndices(\"\" + (m_Instances.classIndex() + 1));\r\n rFilter.setInvertSelection(true);\r\n rFilter.setInputFormat(m_Instances);\r\n Instances classInstances = new Instances(m_Instances);\r\n classInstances = Filter.useFilter(classInstances, rFilter);\r\n\r\n m_cEstimator = new BayesNet();\r\n SimpleEstimator classEstimator = new SimpleEstimator();\r\n classEstimator.setAlpha(m_fAlpha);\r\n m_cEstimator.setEstimator(classEstimator);\r\n m_cEstimator.buildClassifier(classInstances);\r\n\r\n /*combiner = new LibSVM(); \r\n FastVector classFv = new FastVector(2);\r\n classFv.addElement(CNTL);\r\n classFv.addElement(CASE);\r\n Attribute classAt = new Attribute(m_Instances.classAttribute().name(), \r\n classFv);\r\n attributesFv = new FastVector(m_Structures.length);\r\n attributesFv.addElement(classAt);\r\n for (int i = 0; i < m_Instances.classAttribute().numValues(); i++){\r\n if (!m_Instances.classAttribute().value(i).equals(CNTL))\r\n attributesFv.addElement(new Attribute(m_Instances.classAttribute\r\n ().value(i)));\r\n }\r\n combinerTrain = new Instances(\"combinertrain\", attributesFv, \r\n m_Instances.numInstances());\r\n combinerTrain.setClassIndex(0);\r\n for (int i = 0; i < m_Instances.numInstances(); i++){\r\n double[] probs = super.distributionForInstance(m_Instances.instance(i));\r\n Instance result = new Instance(attributesFv.size()); \r\n if (!m_Instances.classAttribute().value(m_Instances.instance(i).\r\n classIndex()).equals(CNTL))\r\n result.setValue(classAt, CASE);\r\n else\r\n result.setValue(classAt, CNTL);\r\n for (int j = 0; j < attributesFv.size(); j++){\r\n if (!attributesFv.elementAt(j).equals(classAt)){\r\n Attribute current = (Attribute) attributesFv.elementAt(j);\r\n result.setValue(current, \r\n probs[m_Instances.classAttribute().indexOfValue\r\n (current.name())]);\r\n }\r\n }\r\n combinerTrain.add(result);\r\n }\r\n combinerTrain = discretize(combinerTrain);\r\n combiner.buildClassifier(combinerTrain);*/\r\n }", "MagLegendre( int nt ) \n {\n nTerms = nt;\n Pcup = new double[ nTerms + 1 ];\n dPcup = new double[ nTerms + 1 ];\n }", "public FFANNAdaptiveBackPropagationJSP()\n\t{\n\t\t//run(network, numberInputNeurons, numberHiddenNeurons, numberOutputNeurons, trainingSet);\n\t}", "public void testConvolution2() {\n ConvolutionLayer cl1 = new ConvolutionLayer(28, 28, 32, 5, 1, 1,ActivationFunction.LEAKYRELU);\r\n cl1.setName(\"Conv1\");\r\n PoolLayer pl1 = new PoolLayer(28, 28, 32, 2, 2,1);\r\n pl1.setName(\"Pool1\");\r\n\r\n FuzzyficationLayer fl = new FuzzyficationLayer(pl1.getNrOfOutputs(), 10, 1);\r\n\r\n Layer full = new Layer(fl.getNrOfOutputs(), 0, 10, ActivationFunction.CESIGMOID);\r\n full.setName(\"full\");\r\n full.setDropRate(.003f);\r\n\r\n DeepLayer dl = new DeepLayer(new LearningRateConst(LEARNING_RATE), cl1, pl1, fl, full);\r\n dl.setCostFunction(new CrossEntropyCostFunction());\r\n\r\n BinImageReader bir = new BinImageReader(\"/data/train-images.idx3-ubyte.bin\");\r\n fmatrix images = bir.getResult();\r\n System.out.println(images.getSizeAsString());\r\n\r\n BinLabelReader blr = new BinLabelReader(\"/data/train-labels.idx1-ubyte.bin\");\r\n fmatrix trainSetLabels = blr.getResult();\r\n System.out.println(trainSetLabels.getSizeAsString());\r\n\r\n Random r = new Random(System.currentTimeMillis());\r\n dl.randomizeWeights(r, -.1f, .1f);\r\n\r\n int maxImage = images.getNrOfColumns();\r\n fmatrix image = new fmatrix(1, images.getNrOfColumns());\r\n fmatrix target = new fmatrix(1, 10);\r\n\r\n System.out.println(image.getSizeAsString());\r\n String weightFolder = \"weights/\" + dl.getTrainingStartTimeAsFolder();\r\n for (int i = 0; i < TRAIN_ITERATIONS; ++i) {\r\n target.reset();\r\n for (int b = 0; b < 1; ++b) {\r\n int nextImage = r.nextInt(maxImage);\r\n images.getRow(nextImage, b, image);\r\n\r\n int digit = (int) trainSetLabels.get(0, nextImage);\r\n target.set(b, digit, 1);\r\n }\r\n dl.train(i, image, target, TrainingMode.BATCH);\r\n// if (i == 0) {\r\n// dl.writeOutputImages();\r\n// }\r\n if (i % BATCH_SIZE == 0) {\r\n dl.adaptWeights(i, BATCH_SIZE);\r\n }\r\n\r\n if (i % WEIGHT_DEBUG_CYCLE == 0) {\r\n dl.writeWeightImages(weightFolder, i);\r\n }\r\n }\r\n dl.writeWeightImages(weightFolder, TRAIN_ITERATIONS);\r\n\r\n DeepLayerWriter dlw = new DeepLayerWriter();\r\n Path export = Paths.get(System.getProperty(\"user.home\"), \".nn\", weightFolder, \"final.nn\");\r\n dlw.writeDeepLayer(export, dl);\r\n testDigitRecognition(dl, 1, r);\r\n }", "public abstract int predict(double[] testingData);", "public interface Regressor {\n\n String name();\n\n float recognize(final float[] pixels);\n}", "public DoubleMatrixDataset() {\r\n }", "@Override\n\tpublic Alg newInstance() {\n\t\treturn new BnetDistributedCF();\n\t}", "public FCMResult getSingleResult(double [] input)throws Exception{\n if (this.adjacencyMatrix.length != input.length) {\n throw new Exception(\"the length of the input array does not match with the length of the adjascent matrix\");\n }\n boolean check = true;\n double [] temp = input;//copy the value of the input in another data so that the variable scope will not be messed with.\n double [] init = new double[input.length];\n //include the whhile loop with the condition here\n int iterationCount=0;\n do { \n for (int i = 0; i < temp.length; i++) {//update each of the activation value inthe emp variable and test for the \n for (int j = 0; j < adjacencyMatrix[i].length; j++) {\n if (i==j) {\n continue;\n }\n init[j] +=temp[j] * adjacencyMatrix[i][j];//update the state of the input\n }\n }\n // add the value \n double [] previous = temp.clone();\n for (int i = 0; i < init.length; i++) {\n temp[i] = activationFunction(temp[i] + init[i]);\n }\n double check1 = getAbsoluteAverage(previous);\n double check2 = getAbsoluteAverage(temp) ;\n check = Math.abs(check1 - check2)> error;\n iterationCount++;\n } while (check);\n return evaluateResult(temp,iterationCount);\n //evaluate the result when you get here.\n }", "CrossValidation createCrossValidation();", "public\nNuc2D(NucNode nuc)\nthrows Exception\n{\n\tsuper (nuc);\n}", "public FcmLearner(double [][] matrix){\n this.adjacencyMatrix = matrix;\n }", "@Override\n\tpublic void initializeInternal(Matrix inputs, Matrix labels)\n\t{\t\t\n\t\tfeatureMins = new double[inputs.cols()];\n\t\tfeatureMaxes = new double[inputs.cols()];\n\t\tfor(int i = 0; i < inputs.cols(); i++)\n\t\t{\n\t\t\tif(inputs.getValueCount(i) == 0 && !ignoredInputAttributes.contains(i))\n\t\t\t{\n\t\t\t\t// Compute the min and max\n\t\t\t\tfeatureMins[i] = inputs.findMin(i);\n\t\t\t\tfeatureMaxes[i] = inputs.findMax(i);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Don't do nominal attributes and ignored columns.\n\t\t\t\tfeatureMins[i] = Vector.getUnknownValue();\n\t\t\t\tfeatureMaxes[i] = Vector.getUnknownValue();\n\t\t\t}\n\t\t}\n\t\t\n\t\tlabelMins = new double[labels.cols()];\n\t\tlabelMaxes = new double[labels.cols()];\n\t\tfor(int i = 0; i < labels.cols(); i++)\n\t\t{\n\t\t\tif(labels.getValueCount(i) == 0)\n\t\t\t{\n\t\t\t\t// Compute the min and max\n\t\t\t\tlabelMins[i] = labels.findMin(i);\n\t\t\t\tlabelMaxes[i] = labels.findMax(i);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Don't do nominal attributes\n\t\t\t\tlabelMins[i] = Vector.getUnknownValue();\n\t\t\t\tlabelMaxes[i] = Vector.getUnknownValue();\n\t\t\t}\n\t\t}\n\n\t}", "public double[] feedForward(BufferedImage img) {\n\n double[] out = new double[3];\n try {\n double[][][] input = MathTools.mapArray(ImageManager.convertRGB2D(ImageManager.getSquaredImage(img, imageSize)), 0, 255, 0, 1);\n\n Matrix[] in = new Matrix[3];\n\n for (int i = 0; i < in.length; i++) {\n in[i] = new Matrix(input[i]);\n }\n\n cnn.setInputs(in);\n\n out = cnn.feedForward();\n } catch (IOException e) {\n System.out.println(\"Erreur lors du chargement de l'image\");\n }\n\n repaint();\n\n return out;\n\n }", "public RandomNeighborhoodOperator(int nbRelaxedVars)\n{\n\tthis(nbRelaxedVars, 0);\n}", "private RegressionPrior() { \n /* empty constructor */\n }", "public NeuralNetworkForwardPropagation() {\n super(\"Neural-network forward-propagation\");\n }", "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 }", "public BackPropagationLearningProcess(NeuralNetwork network) {\r\n\t\tsuper(network);\r\n\t}", "public MultivariateGaussianDM() {\n\t}", "@Test(timeout = 4000)\n public void test32() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_NumBins = (-3104);\n discretize0.m_MakeBinary = true;\n try { \n discretize0.setInputFormat((Instances) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.Filter\", e);\n }\n }", "public void testConvolution() {\n ConvolutionLayer cl1 = new ConvolutionLayer(28, 28, 32, 5, 1, 1, ActivationFunction.RELU);\r\n cl1.setName(\"Conv1\");\r\n PoolLayer pl1 = new PoolLayer(28, 28, 32, 2, 2, 1);\r\n pl1.setName(\"Pool1\");\r\n ConvolutionLayer cl2 = new ConvolutionLayer(14, 14, 32, 64, 5, 1, 1, ActivationFunction.LEAKYRELU);\r\n cl2.setName(\"Conv2\");\r\n PoolLayer pl2 = new PoolLayer(14, 14, 64, 2, 2, 1);\r\n pl2.setName(\"Pool2\");\r\n Layer full = new Layer(pl2.getNrOfOutputs(), 1, 10, ActivationFunction.CESIGMOID);\r\n full.setName(\"full\");\r\n full.setDropRate(.3f);\r\n\r\n DeepLayer dl = new DeepLayer(new LearningRateConst(LEARNING_RATE), cl1, pl1, cl2, pl2, full);\r\n dl.setCostFunction(new CrossEntropyCostFunction());\r\n\r\n BinImageReader bir = new BinImageReader(\"/data/train-images.idx3-ubyte.bin\");\r\n fmatrix images = bir.getResult();\r\n System.out.println(images.getSizeAsString());\r\n\r\n BinLabelReader blr = new BinLabelReader(\"/data/train-labels.idx1-ubyte.bin\");\r\n fmatrix trainSetLabels = blr.getResult();\r\n System.out.println(trainSetLabels.getSizeAsString());\r\n\r\n Random r = new Random(System.currentTimeMillis());\r\n dl.randomizeWeights(r, -.1f, .1f);\r\n\r\n int maxImage = images.getNrOfColumns();\r\n fmatrix image = new fmatrix(1, images.getNrOfColumns());\r\n fmatrix target = new fmatrix(1, 10);\r\n\r\n System.out.println(image.getSizeAsString());\r\n String weightFolder = \"weights/\" + dl.getTrainingStartTimeAsFolder();\r\n for (int i = 0; i < TRAIN_ITERATIONS; ++i) {\r\n target.reset();\r\n for (int b = 0; b < 1; ++b) {\r\n int nextImage = r.nextInt(maxImage);\r\n images.getRow(nextImage, b, image);\r\n\r\n int digit = (int) trainSetLabels.get(0, nextImage);\r\n target.set(b, digit, 1);\r\n }\r\n dl.train(i, image, target, TrainingMode.BATCH);\r\n// if (i == 0) {\r\n// dl.writeOutputImages();\r\n// }\r\n if (i % BATCH_SIZE == 0) {\r\n dl.adaptWeights(i, BATCH_SIZE);\r\n }\r\n\r\n if (i % WEIGHT_DEBUG_CYCLE == 0) {\r\n dl.writeWeightImages(weightFolder, i);\r\n }\r\n }\r\n\r\n dl.writeWeightImages(weightFolder, TRAIN_ITERATIONS);\r\n testDigitRecognition(dl, 1, r);\r\n }", "@Test(timeout = 4000)\n public void test21() throws Throwable {\n BinarySparseInstance binarySparseInstance0 = new BinarySparseInstance(44);\n BinarySparseInstance binarySparseInstance1 = new BinarySparseInstance(6);\n binarySparseInstance1.dataset();\n Discretize discretize0 = new Discretize();\n discretize0.setMakeBinary(true);\n try { \n discretize0.setInputFormat((Instances) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.Filter\", e);\n }\n }", "@SafeVarargs\n static <T> Nda<T> of( T... values ) { return Tensor.of(values); }", "public InterpolationModel() {\n\tUnigram = new UnigramModel();\n\tBigram = new BigramModel();\n\tTrigram = new TrigramModel();\n }", "public CvRTParams()\n {\n \n super( CvRTParams_0() );\n \n return;\n }", "public BackPropagationNeural_3H(int size_in,int size_hidden1,int size_hidden2,int size_hidden3,int size_output){\n\t\tthis.size_in = size_in;\n\t\tthis.size_hidden1 = size_hidden1;\n\t\tthis.size_hidden2 = size_hidden2;\n\t\tthis.size_hidden3 = size_hidden3;\n\t\tthis.size_output = size_output;\n\t\t\n\t\tinputs = new float[size_in];\n\t\thidden1 = new float[size_hidden1];\n\t\thidden2 = new float[size_hidden2];\n\t\thidden3 = new float[size_hidden3];\n\t\toutput = new float[size_output];\n\t\t\n\t\tweight1 = new float[size_in][size_hidden1];\n\t\tweight2 = new float[size_hidden1][size_hidden2];\n\t\tweight3 = new float[size_hidden2][size_hidden3];\n\t\tweight4 = new float[size_hidden3][size_output];\n\t\t\n\t\tW1_last_delta = new float[size_in][size_hidden1];\n W2_last_delta = new float[size_hidden1][size_hidden2];\n W3_last_delta = new float[size_hidden2][size_hidden3];\n W4_last_delta = new float[size_hidden3][size_output];\n \n\t\trandomizeWeights();\n\t\toutput_error = new float[size_output];\n\t\thidden1_error = new float[size_hidden1];\n\t\thidden2_error = new float[size_hidden2];\n\t\thidden3_error = new float[size_hidden3];\n\t}", "@Override\n\tpublic Parameter[] getGridSearchParameters() {\n\t\treturn new Parameter[] { kernelCoefficient, kernelDegree, kernelGamma, parameterC, parameterNu };\n\t}", "public Factory() {\n\t\tnb_rounds = 0; \n\t\tnb_to_train = 0; \n\t\ttraining_queue = new LinkedList<Pair<Soldier, Integer>>(); \n\t\tcurrent = null;\n\t}", "private float get_steering_prediction(Mat frame){\n Imgproc.cvtColor(frame, frame, Imgproc.COLOR_RGBA2RGB);\n Imgproc.cvtColor(frame, frame, Imgproc.COLOR_RGB2YUV);\n Imgproc.GaussianBlur(frame, frame, new Size(3, 3), 0, 0);\n\n Mat f = new Mat();\n Imgproc.resize(frame,f,new Size(200, 66));\n // f = Dnn.blobFromImage(f, 0.00392, new Size(200, 66) , new Scalar(0,0 ,0), false,false);\n f.convertTo(f,CV_32F);\n StringBuilder sb = new StringBuilder();\n String s = new String();\n System.out.println(\"hei \"+ f.height()+\", wit\" + f.width() + \"ch \" + f.channels());\n System.out.println(\"col \"+ f.cols()+\", row\" + f.rows() + \"ch \" + f.channels());\n\n float[][][][] inputs = new float[1][200][66][3];\n float fs[] = new float[3];\n for( int r=0 ; r<f.rows() ; r++ ) {\n //sb.append(\"\"+r+\") \");\n for( int c=0 ; c<f.cols() ; c++ ) {\n f.get(r, c, fs);\n //sb.append( \"{\");\n inputs[0][c][r][0]=fs[0]/255;\n inputs[0][c][r][1]=fs[1]/255;\n inputs[0][c][r][2]=fs[2]/255;\n //sb.append( String.valueOf(fs[0]));\n //sb.append( ' ' );\n //sb.append( String.valueOf(fs[1]));\n //sb.append( ' ' );\n //sb.append( String.valueOf(fs[2]));\n //sb.append( \"}\");\n //sb.append( ' ' );\n }\n //sb.append( '\\n' );\n }\n //System.out.println(sb);\n\n\n\n\n float[][] outputs = new float[1][1];\n interperter.run(inputs ,outputs);\n System.out.println(\"output: \" + outputs[0][0]);\n return outputs[0][0];\n }", "public WeightedMovingAverageModel(float[] weights, int slices, int trainPoints, int validationPoints) {\n this(weights, slices, 1, trainPoints, validationPoints);\n }", "protected DenseMatrix()\n\t{\n\t}", "public static void testMultimensionalOutput() {\n\t\tint vectSize = 8;\n\t\tint outputsPerInput = 10;\n\t\tdouble repeatProb = 0.8;\n\t\tdouble inpRemovalPct = 0.8;\n\t\tCollection<DataPoint> data = createMultidimensionalCorrSamples(vectSize, outputsPerInput, inpRemovalPct);\n//\t\tCollection<DataPoint> data = createMultidimensionalSamples(vectSize, outputsPerInput, repeatProb);\n\n\t\tModelLearner modeler = createModelLearner(vectSize, data);\n\t\tint numRuns = 100;\n\t\tint jointAdjustments = 18;\n\t\tdouble skewFactor = 0;\n\t\tdouble cutoffProb = 0.1;\n\t\tDecisionProcess decisioner = new DecisionProcess(modeler, null, 1, numRuns,\n\t\t\t\t0, skewFactor, 0, cutoffProb);\n\t\tDecisionProcess decisionerJ = new DecisionProcess(modeler, null, 1, numRuns,\n\t\t\t\tjointAdjustments, skewFactor, 0, cutoffProb);\n\t\t\n\t\tSet<DiscreteState> inputs = getInputSetFromSamples(data);\n\t\tArrayList<Double> realV = new ArrayList<Double>();\n\t\tArrayList<Double> predV = new ArrayList<Double>();\n\t\tArrayList<Double> predJV = new ArrayList<Double>();\n\t\tfor (DiscreteState input : inputs) {\n\t\t\tSystem.out.println(\"S\" + input);\n\t\t\tMap<DiscreteState, Double> outProbs = getRealOutputProbsForInput(input, data);\n\t\t\tMap<DiscreteState,Double> preds = countToFreqMap(decisioner\n\t\t\t\t\t.getImmediateStateGraphForActionGibbs(input.getRawState(), new double[] {}));\n\t\t\tMap<DiscreteState,Double> predsJ = countToFreqMap(decisionerJ\n\t\t\t\t\t.getImmediateStateGraphForActionGibbs(input.getRawState(), new double[] {}));\n\t\t\tSet<DiscreteState> outputs = new HashSet<DiscreteState>();\n\t\t\toutputs.addAll(outProbs.keySet());\n\t\t\toutputs.addAll(preds.keySet());\n\t\t\toutputs.addAll(predsJ.keySet());\n\t\t\tfor (DiscreteState output : outputs) {\n\t\t\t\tDouble realD = outProbs.get(output);\n\t\t\t\tDouble predD = preds.get(output);\n\t\t\t\tDouble predJD = predsJ.get(output);\n\t\t\t\tdouble real = (realD != null ? realD : 0);\n\t\t\t\tdouble pred = (predD != null ? predD : 0);\n\t\t\t\tdouble predJ = (predJD != null ? predJD : 0);\n\t\t\t\trealV.add(real);\n\t\t\t\tpredV.add(pred);\n\t\t\t\tpredJV.add(predJ);\n\t\t\t\tSystem.out.println(\"\tS'\" + output + \"\t\" + real + \"\t\" + pred + \"\t\" + predJ);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"CORR:\t\" + Utils.correlation(realV, predV)\n\t\t\t\t+ \"\t\" + Utils.correlation(realV, predJV));\n\t}", "public NetworkDevicePatchParameters() {\n }", "protected ConfusionMatrix(){\n\n\t}", "public void Initialize()\n\t{ \n\t\t// avoid K=0 \n\t\tif(K == 0) \n\t\t\tK = 1;\n\t\t\n\t\tLogging.println(\"ITrain=\"+ITrain + \", ITest=\"+ITest + \", Q=\"+Q, LogLevel.DEBUGGING_LOG);\n\t\tLogging.println(\"K=\"+K + \", eta=\" + eta + \", maxIter=\"+ maxIter, LogLevel.DEBUGGING_LOG);\n\t\tLogging.println(\"lambdaW=\"+lambdaW + \", alpha=\"+ alpha, LogLevel.DEBUGGING_LOG);\n\t\t\n\t\t// set the labels to be binary 0 and 1, needed for the logistic loss\n\t\tCreateOneVsAllTargets();\n\t\t\n\t\tRandom rand = new Random();\n\t\t\n\t\tL = new int[K];\n\t\tfor(int k=0; k < K; k++)\n\t\t\tL[k] = rand.nextInt(Q);\n\t\t\n\t\t\n\t\tLogging.println(\"Classes=\"+C, LogLevel.DEBUGGING_LOG);\n\t\t\n\t\t// initialize shapelets\n\t\tInitializeShapeletsRandomly();\n\t\t\n\t\t// initialize weights\n\t\tW = new double[C][K];\n\t\tbiasW = new double[C];\n\t\t\n\t\t\n\t\t// initialize the terms for pre-computation\n\t\tD = new double[ITrain+ITest][K][];\n\t\tE = new double[ITrain+ITest][K][];\n\t\t\n\t\tfor(int i = 0; i < ITrain+ITest; i++)\n\t\t\t\tfor(int k = 0; k < K; k++)\n\t\t\t\t{\n\t\t\t\t\tD[i][k] = new double[Q-L[k]+1];\n\t\t\t\t\tE[i][k] = new double[Q-L[k]+1];\n\t\t\t\t}\n\t\t\n\t\tM = new double[ITrain+ITest][K];\n\t\tPsi = new double[ITrain+ITest][K];\t\t \n\t\tphi = new double[ITrain+ITest][C];\n\t\t\n\t\t\n\t\t// store all the index and class indexes\n\t\tidxPairs = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < ITrain; i++)\n\t\t{\n\t\t\t\tidxPairs.add(i);\n\t\t\t\t\n\t\t\t\tPreCompute(i); \n\t\t}\n\t\t\n\t\n\t\t// shuffle the order\n\t\tCollections.shuffle(idxPairs);\n\t\t\n\t\t\t\t\n\t\tLogging.println(\"Initializations Completed!\", LogLevel.DEBUGGING_LOG);\n\t}", "public NonLinear(double[] x, double[] y, RealValuedFunctionVA rf,\n\t\t\t Config config, double[] guess)\n\t{\n\t this.rf = rf;\n\n\t int n = rf.minArgLength() - 1;\n\t extendedParameters = new double[n+1];\n\t double[] ourGuess = new double[n];\n\t if (guess != null) {\n\t\tif (guess.length < ourGuess.length) {\n\t\t throw new IllegalArgumentException\n\t\t\t(errorMsg(\"gTooShort\", guess.length, ourGuess.length));\n\n\t\t}\n\t\tSystem.arraycopy(guess, 0, ourGuess, 0, ourGuess.length);\n\t }\n\t setParameters(ourGuess);\n\n\t if (config == null) config = defaultConfig;\n\n\t // y before x is the LMA convention.\n\t double sumsq = LMA.findMin(rf, LMA.Mode.LEAST_SQUARES,\n\t\t\t\t ourGuess, config.lambda, config.nu,\n\t\t\t\t config.limit,\n\t\t\t\t config.iterationLimit, y, x);\n\t System.arraycopy(ourGuess, 0, extendedParameters, 1, n);\n\n\t double[][] J = new double[x.length][];\n\t double[][] H = new double[n][n];\n\t for (int i = 0; i < x.length; i++) {\n\t\textendedParameters[0] = x[i];\n\t\tJ[i] = rf.jacobian(1,extendedParameters);\n\t }\n\t Adder.Kahan adder = new Adder.Kahan();\n\t Adder.Kahan.State state = adder.getState();\n\t for (int i = 0; i < n; i++) {\n\t\tfor (int j = 0; j < n; j++) {\n\t\t adder.reset();\n\t\t for (int k = 0; k < x.length; k++) {\n\t\t\tdouble term = J[k][i]*J[k][j];\n\t\t\tdouble yy = term - state.c;\n\t\t\tdouble t = state.total + yy;\n\t\t\tstate.c = (t - state.total) - yy;\n\t\t\tstate.total = t;\n\t\t }\n\t\t H[i][j] = state.total;\n\t\t}\n\t }\n\t decomp = new CholeskyDecomp(H, H);\n\t if (x.length == n) {\n\t\tsetChiSquare(0.0);\n\t\tsetDegreesOfFreedom(0);\n\t\tsetReducedChiSquare(Double.POSITIVE_INFINITY);\n\t\tsetVariance(0.0);\n\t\t/*\n\t\tdouble[][] cv = getCovarianceArray();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t for (int j = 0; j < n; j++) {\n\t\t\tcv[i][j] = 0.0;\n\t\t }\n\t\t}\n\t\t*/\n\t } else {\n\t\tsumsq = LeastSquaresFit.sumOfSquares(this, x, y);\n\t\tdouble variance = sumsq / (x.length - n);\n\t\t// Chi-square is sumsq divided by the variance because\n\t\t// the sigmas all have the same value, but that just\n\t\t// gives x.length - n. This happens because we don't have\n\t\t// an independent estimate of the variance, so we are\n\t\t// implicitly assuming we have the right fit.\n\t\tsetChiSquare(x.length - n);\n\t\tsetDegreesOfFreedom(x.length - n);\n\t\t// reducedChiSquare = ChiSquare divided by the degrees\n\t\t// of freedom.\n\t\tsetReducedChiSquare(1.0);\n\t\t// the H matrix used sigma=1, so we should have divided it by\n\t\t// the variance, which we didn't know. The covariance is the\n\t\t// inverse of H, so we should multiply it by the variance to\n\t\t// get the right value.\n\t\tsetVariance(variance);\n\t\t/*\n\t\tdouble[][] cv = getCovarianceArray();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t for (int j = 0; j < n; j++) {\n\t\t\tcv[i][j] *= variance;\n\t\t }\n\t\t}\n\t\t*/\n\t }\n\t}", "public void input(float[] values) throws Exception {\r\n if (values.length != neurons[0].length) {\r\n throw new Exception(\"Not enough or too many inputs\");\r\n }\r\n for (int i = 0; i < values.length; i++) {\r\n neurons[0][i].setOutput(values[i]);\r\n }\r\n }", "public static void main(String[] args) throws FileNotFoundException {\n\n Normalized norm = new Normalized();\n double c = 1;\n\n double[][] data = norm.Inputdata(\"input.txt\");\n double[][] w = new double[35][10];\n double[][] last = new double[35][10];\n\n for (int i = 0; i < 35; i++) {\n for (int j = 0; j < 10; j++) {\n w[i][j] = 1;\n last[i][j] = 1;\n\n }\n }\n\n /* for (int i = 0; i < 10; i++) {\n for (int j = 0; j < 35; j++) {\n System.out.print(data[i][j]);\n System.out.print(\" \");\n \n \n }\n System.out.print(\"\\n\");\n }\n */\n //System.out.print(w[5][5]);\n double[] ErrMap = norm.Inputdata2(\"TestMap.txt\");\n //System.out.print(ErrMap[0]);\n\n //System.out.print(\"\\n\");\n w = training(data, w, last, c);\n\n int out = 2;\n\n out = classify(w, ErrMap, c);\n System.out.print(\"product \" + out + \" is max\\n\");\n System.out.print(\"the number classify to \" + out + \"\\n\");\n }", "object_detection.protos.Calibration.SigmoidParameters getSigmoidParameters();", "public TwoClassConfusionMatrix() {\n\t}", "public BaseOptimizer() {\r\n Candidates = new ArrayList<>();\r\n }", "public abstract Instances _getTrainingFromParams(String params);" ]
[ "0.534033", "0.51219845", "0.5100574", "0.5096892", "0.50754774", "0.50525606", "0.5038021", "0.5018085", "0.49902523", "0.49372077", "0.4892803", "0.4888679", "0.48772693", "0.48692667", "0.48614356", "0.4854686", "0.4846703", "0.48443177", "0.4820656", "0.47998717", "0.47942588", "0.47784132", "0.47705722", "0.47652113", "0.47543097", "0.47536838", "0.47478023", "0.4740041", "0.470374", "0.47019267", "0.46979186", "0.46962625", "0.4691967", "0.46803004", "0.46778986", "0.46676192", "0.46621802", "0.46484095", "0.4640649", "0.4639928", "0.46353674", "0.46328363", "0.4613075", "0.46123636", "0.4611297", "0.46097523", "0.45938674", "0.45757857", "0.45751745", "0.45609412", "0.45585003", "0.45581415", "0.4555498", "0.45499137", "0.4546347", "0.45334166", "0.45214304", "0.44976214", "0.4488508", "0.44865313", "0.44817784", "0.4473784", "0.44729742", "0.44719553", "0.44719356", "0.4471184", "0.44619665", "0.44509014", "0.44488782", "0.4444878", "0.44376227", "0.44319767", "0.44162816", "0.44158602", "0.44106567", "0.44059893", "0.44054684", "0.44031733", "0.43976134", "0.4395073", "0.43892458", "0.4383197", "0.43827215", "0.43792006", "0.43774173", "0.4376729", "0.4376686", "0.43766546", "0.43743557", "0.43725657", "0.43724653", "0.437112", "0.43637666", "0.43563157", "0.43553847", "0.43511042", "0.43449846", "0.43419695", "0.43405488", "0.43392166", "0.43317792" ]
0.0
-1
construct from FCNBase + double[] for parameters and errors
public MnScan(FCNBase fcn, double[] par, double[] err, int stra) { this(fcn, new MnUserParameterState(par, err), new MnStrategy(stra)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "float[] feedForward(float... inputs);", "public FunctionJet2Adapter(int baseDimension) \n {\n super(baseDimension); \n hessian = new double[baseDimension];\n }", "static Nda<Float> of( float... value ) { return Tensor.of( Float.class, Shape.of( value.length ), value ); }", "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}", "@Override\r\n\t\tpublic double[] gradient(double x, double... parameters) {\n\t\t\tfinal double a = parameters[0];\r\n\t\t\tfinal double b = parameters[1];\r\n\t\t\tfinal double c = parameters[2];\r\n\t\t\tfinal double d = parameters[3];\r\n\t\t\tfinal double e = parameters[4];\r\n\t\t\t\r\n\t\t\tdouble[] gradients = new double[5];\r\n\t\t\t//double den = 1 + Math.pow((x+e)/c, b);\r\n\t\t\t//gradients[0] = 1 / den; // Yes a Derivation \r\n\t\t\t//gradients[1] = -((a - d) * Math.pow(x / c, b) * Math.log(x / c)) / (den * den); // Yes b Derivation \r\n\t\t\t//gradients[2] = (b * Math.pow(x / c, b - 1) * (x / (c * c)) * (a - d)) / (den * den); // Yes c Derivation \r\n\t\t\t//gradients[3] = 1 - (1 / den); // Yes d Derivation \r\n\t\t\t\r\n\t\t\t//Derivation\r\n\t\t\tfinal double c_b = Math.pow(c, b);\r\n\t\t\tfinal double c_b1 = Math.pow(c, b+1.);\r\n\t\t\tfinal double c_2b = Math.pow(c, 2.*b);\r\n\t\t\tfinal double c_2b1 = Math.pow(c, 2.*b+1.);\r\n\t\t\t\r\n\t\t\tfinal double xe_b = Math.pow(x+e, b);\r\n\t\t\tfinal double xe_2b = Math.pow(x+e, 2.*b);\r\n\t\t\tfinal double xe_2b1 = Math.pow(x+e, 2.*b+1.);\r\n\t\t\t\r\n\t\t\tgradients[0] = c_b/(xe_b+c_b);\r\n\t\t\tgradients[1] = ((c_b*d-a*c_b)*xe_b*Math.log(x+e)+(a*c_b*Math.log(c)-c_b*Math.log(c)*d)*xe_b)/(xe_2b+2*c_b*xe_b+c_2b);\r\n\t\t\tgradients[2] = -((b*c_b*d-a*b*c_b)*xe_b)/(c*xe_2b+2*c_b1*xe_b+c_2b1);\r\n\t\t\tgradients[3] = xe_b/(xe_b+c_b);\r\n\t\t\tgradients[4] = ((b*c_b*d-a*b*c_b)*xe_b)/(xe_2b1+xe_b*(2*c_b*x+2*c_b*e)+c_2b*x+c_2b*e);\r\n\t\t\treturn gradients;\r\n\t\t}", "public double train(double[] X, double argValue);", "public Driver(){\n\t\tthis.D = Parameters.numberOfDocuments;\n\t\tthis.K = Parameters.numberOfTopics;\n\t\tthis.V = Parameters.sizeOfVocabulary;\n\n\t\tthis.oldAlpha = new double[this.K];\n\t\tthis.newAlpha = new double[this.K];\n\t\tthis.hessian = new double[this.K][this.K];\n\t\tthis.gradient = new double[this.K];\n\t}", "public Map<String,Double> call()\n\t\t\tthrows Exception {\n\t\tList<String> labels = new ArrayList<String>();\n\t\t\t\t\n\t\tfor (Trace<T> t : traces) {\n//\t\t\tSet<T> toAdd = new HashSet<T>();\n//\t\t\tfor (T s : t.getConstraints())\n//\t\t\t\ttoAdd.add(s);\n//\t\t\tt.setConstraints(toAdd);\n//\t\t\tfor (T c : toAdd)\n//\t\t\t\tallConstraints.add(c);\n\t\t\tif (!labels.contains(Integer.toString(t.getLabel())))\n\t\t\t\tlabels.add(Integer.toString(t.getLabel()));\n\t\t}\n\t\t\n\t\tArrayList<Attribute> attributes = new ArrayList<Attribute>();\n\t\tArrayList<String> levels = new ArrayList<String>();\n\t\tlevels.add(\"1\");\n\t\tlevels.add(\"0\");\n\t\tfor (T con : features) {\n\t\t\tAttribute a = new Attribute(con.toString());\n\t\t\tattributes.add(a);\n\t\t}\n\t\tattributes.add(new Attribute(\"label\", labels));\n\n\t\t// Crossvalidate with Weka\n\t\tInstances trainingSet = new Instances(\"TrainingSet\", attributes, traces.size());\n\t\ttrainingSet.setClassIndex(attributes.size() - 1);\n\t\tInstances testSet = new Instances(\"TrainingSet\", attributes, traces.size());\n\t\ttestSet.setClassIndex(attributes.size() - 1);\n\t\t\n\t\tfor (int t = 0; t < traces.size(); t++) {\n\t\t\tif (t % nFold != 0) {\n\t\t\t\tInstance instance = new DenseInstance(attributes.size());\n\t\t\t\tCollection<String> strings = traces.get(t).getConstraintsAsStrings();\n\t\t\t\tfor (int a = 0; a < attributes.size() - 1; a++) {\n\t\t\t\t\tif (strings.contains(attributes.get(a).name())) {\n\t\t\t\t\t\tinstance.setValue(attributes.get(a), 0);\n\t\t\t\t\t} else{\n\t\t\t\t\t\tinstance.setValue(attributes.get(a), 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tinstance.setValue(attributes.get(attributes.size() - 1),\n\t\t\t\t\t\tInteger.toString(traces.get(t).getLabel()));\n\t\t\t\ttrainingSet.add(instance);\n\t\t\t} else {\n\t\t\t\tInstance instance = new DenseInstance(attributes.size());\n\t\t\t\tCollection<String> strings = traces.get(t).getConstraintsAsStrings();\n\t\t\t\tfor (int a = 0; a < attributes.size() - 1; a++) {\n\t\t\t\t\tif (strings.contains(attributes.get(a).name())){\n\t\t\t\t\t\tinstance.setValue(attributes.get(a), 0);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tinstance.setValue(attributes.get(a), 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tinstance.setValue(attributes.get(attributes.size() - 1),\n\t\t\t\t\t\tInteger.toString(traces.get(t).getLabel()));\n\t\t\t\ttestSet.add(instance);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//System.out.println(\"Reasoning\");\n\t\tWekaPackageManager.loadPackages(false, true, false);\n\t\tAbstractClassifier classifier = null;\n\t\tString options = \"\";\n\t\tswitch(c){\n\t\t\tcase NB:\n\t\t\t\tclassifier = new NaiveBayes();//new LibSVM();\n\t\t\t\toptions = \"\";\n\t\t\t\tbreak;\n\t\t\tcase RandomForest:\n\t\t\t\tclassifier = new RandomForest();\n\t\t\t\toptions = \"\";\n\t\t\t\tbreak;\n\t\t\tcase SVM:\n\t\t\t\tclassifier = new LibSVM();\n\t\t\t\t//K: 0=linear, 1=polynomial, 2=radial basis, 3=sigmoid\n\t\t\t\toptions = \"-K,1,-W,\";\n\t\t\t\tfor(int i =0;i<labels.size();i++)\n\t\t\t\t\toptions+= \"1 \";\n\t\t\t\tbreak;\n\t\t}\t\t\n\t\tString[] optionsArray = options.split(\",\");\n\t\tclassifier.setOptions(optionsArray);\n\t\tclassifier.buildClassifier(trainingSet);\n\t\t\n\t\tMap<String,Double> result = new HashMap<String,Double>();\n\t\t\n\t\t//attributeScoring(trainingSet);\n\t\t//System.out.println(classifier.toSummaryString());\n\t\t//System.out.println(classifier.toString());\n\t\t\n\t\tEvaluation eTest = new Evaluation(trainingSet);\n\t\teTest.evaluateModel(classifier, testSet);\n\t\t\n\t\t//double auc = eTest.areaUnderROC(classIndex);\n\t\t//System.out.println(\"AUC: \"+auc);\n\t\tdouble accuracy = (double) eTest.correct() / (double) trainingSet.size();\n\t\tresult.put(\"accuracy\", accuracy);\n\t\treturn result;\n\t}", "MagLegendre( int nt ) \n {\n nTerms = nt;\n Pcup = new double[ nTerms + 1 ];\n dPcup = new double[ nTerms + 1 ];\n }", "@Override\n public void init(float[] data) {\n this.data = data;\n\n //\n shapeArr = new Rectangle2D.Float[data.length];\n colorArr = new Color[data.length];\n pointArr = new Point2D.Float[data.length];\n }", "public Instance(double values[],InstanceAttributes ats){\r\n\t\tAttribute curAt,allat[];\r\n\t\tint inOut,in,out,undef;\r\n\t\t\r\n\t\t//initialise structures\r\n\t\tanyMissingValue = new boolean[3];\r\n\t\tanyMissingValue[0] = false; \r\n\t\tanyMissingValue[1] = false;\r\n\t\tanyMissingValue[2] = false;\r\n\t\tif(ats==null){\r\n\t\t\tnumInputAttributes = Attributes.getInputNumAttributes();\r\n\t\t\tnumOutputAttributes = Attributes.getOutputNumAttributes();\r\n\t\t\tnumUndefinedAttributes = Attributes.getNumAttributes() - (numInputAttributes+numOutputAttributes);\r\n\t\t}else{\r\n\t\t\tnumInputAttributes = ats.getInputNumAttributes();\r\n\t\t\tnumOutputAttributes = ats.getOutputNumAttributes();\r\n\t\t\tnumUndefinedAttributes = ats.getNumAttributes() - (numInputAttributes+numOutputAttributes);\r\n\t\t}\r\n\t\tintNominalValues = new int[3][];\r\n\t\tnominalValues = new String[3][];\r\n\t\trealValues = new double[3][];\r\n\t\tmissingValues = new boolean[3][];\r\n\t\tnominalValues[0] = new String[numInputAttributes];\r\n\t\tnominalValues[1] = new String[numOutputAttributes];\r\n\t\tnominalValues[2] = new String[numUndefinedAttributes];\r\n\t\tintNominalValues[0] = new int[numInputAttributes];\r\n\t\tintNominalValues[1] = new int[numOutputAttributes];\r\n\t\tintNominalValues[2] = new int[numUndefinedAttributes];\r\n\t\trealValues[0] = new double[numInputAttributes];\r\n\t\trealValues[1] = new double[numOutputAttributes];\r\n\t\trealValues[2] = new double[numUndefinedAttributes];\r\n\t\tmissingValues[0] = new boolean[numInputAttributes];\r\n\t\tmissingValues[1] = new boolean[numOutputAttributes];\r\n\t\tmissingValues[2] = new boolean[numUndefinedAttributes];\r\n\r\n\t\tfor(int i=0;i<numInputAttributes;i++) missingValues[0][i]=false; \r\n\t\tfor(int i=0;i<numOutputAttributes;i++) missingValues[1][i]=false; \r\n\t\tfor(int i=0;i<numUndefinedAttributes; i++) missingValues[2][i]=false;\r\n\t\t\r\n\t\t//take the correct set of Attributes\r\n\t\tif(ats!=null){\r\n\t\t\tallat = ats.getAttributes();\r\n\t\t}else{\r\n\t\t\tallat = Attributes.getAttributes();\r\n\t\t}\r\n\r\n\t\t//fill the data structures\r\n\t\tin = out = undef = 0;\r\n\t\tfor(int i=0;i<values.length;i++){\r\n\t\t\tcurAt = allat[i];\r\n\t\t\tinOut = 2;\r\n\t\t\tif(curAt.getDirectionAttribute()==Attribute.INPUT)\r\n\t\t\t\tinOut = 0;\r\n\t\t\telse if(curAt.getDirectionAttribute()==Attribute.OUTPUT)\r\n\t\t\t\tinOut = 1;\r\n\t\t\t\r\n\t\t\t//is it missing?\r\n\t\t\tif(new Double(values[i]).isNaN()){\r\n\t\t\t\tif(inOut==0){\r\n\t\t\t\t\tmissingValues[inOut][in] = true;\r\n\t\t\t\t\tanyMissingValue[inOut] = true;\r\n\t\t\t\t\tin++;\r\n\t\t\t\t}else if(inOut==1){\r\n\t\t\t\t\tmissingValues[inOut][out] = true;\r\n\t\t\t\t\tanyMissingValue[inOut] = true;\r\n\t\t\t\t\tout++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tmissingValues[inOut][undef] = true;\r\n\t\t\t\t\tanyMissingValue[inOut] = true;\r\n\t\t\t\t\tundef++;\r\n\t\t\t\t}\r\n\t\t\t}else if(!(curAt.getType()==Attribute.NOMINAL)){ //is numerical?\r\n\t\t\t\tif(inOut==0){\r\n\t\t\t\t\trealValues[inOut][in] = values[i];\r\n\t\t\t\t\tin++;\r\n\t\t\t\t}else if(inOut==1){\r\n\t\t\t\t\trealValues[inOut][out] = values[i];\r\n\t\t\t\t\tout++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\trealValues[inOut][undef] = values[i];\r\n\t\t\t\t\tundef++;\r\n\t\t\t\t}\r\n\t\t\t}else{ //is nominal\r\n\t\t\t\tif(inOut==0){\r\n\t\t\t\t\tintNominalValues[inOut][in] = (int)values[i];\r\n\t\t\t\t\trealValues[inOut][in] = values[i];\r\n\t\t\t\t\tnominalValues[inOut][in] = curAt.getNominalValue((int)values[i]);\r\n\t\t\t\t\tin++;\r\n\t\t\t\t}else if(inOut==1){\r\n\t\t\t\t\tintNominalValues[inOut][out] = (int)values[i];\r\n\t\t\t\t\trealValues[inOut][out] = values[i];\r\n\t\t\t\t\tnominalValues[inOut][out] = curAt.getNominalValue((int)values[i]);\r\n\t\t\t\t\tout++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tintNominalValues[inOut][undef] = (int)values[i];\r\n\t\t\t\t\trealValues[inOut][undef] = values[i];\r\n\t\t\t\t\tnominalValues[inOut][undef] = curAt.getNominalValue((int)values[i]);\r\n\t\t\t\t\tundef++;\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t}", "@Override\n public void train() {\n actual = observations.toArray();\n min_val_error = Double.MAX_VALUE;\n if (findDecayConstant)\n for (float alpha = 0f; alpha <= 1f; alpha += 0.01f)\n initializeAndTrainModel(alpha);\n else\n initializeAndTrainModel(optAlpha);\n }", "@Override\n\tpublic Parameter[] getParameters() {\n\t\treturn new Parameter[] { weight, tolerance, svmType, kernelType, kernelDegree, kernelGamma, kernelCoefficient, parameterC,\n\t\t\t\tparameterNu };\n\t}", "public void train() {\n\n int w;\n double sum = 0, avg;\n double forecast;\n double[][] trainMatrix = new double[trainPoints][2];\n double[][] valMatrix = new double[validationPoints][2];\n actual = observations.toArray();\n\n for (int i = 0; i < step * slices; i++)\n sum += actual[i];\n\n avg = sum / slices;\n\n for (int pos = 0; pos < trainPoints; pos++) {\n sum = 0;\n w = 0;\n\n if (pos >= step * slices) {\n for (int k = pos - step * slices; k < pos; k += step)\n sum += actual[k] * weights[w++];\n forecast = sum / slices;\n } else forecast = avg;\n\n trainMatrix[pos][0] = actual[pos];\n trainMatrix[pos][1] = forecast;\n }\n\n for (int pos = actual.length - validationPoints, j = 0; pos < actual.length; pos++) {\n sum = 0;\n w = 0;\n for (int k = pos - step * slices; k < pos; k += step)\n sum += actual[k] * weights[w++];\n forecast = sum / slices;\n valMatrix[j][0] = actual[pos];\n valMatrix[j][1] = forecast;\n j++;\n }\n double biasness = BiasnessHandler.handleOffset(valMatrix);\n accuracyIndicators.setBias(biasness);\n ModelUtil.computeAccuracyIndicators(accuracyIndicators, trainMatrix, valMatrix, dof);\n errorBound = ErrorBoundsHandler.computeErrorBoundInterval(trainMatrix);\n }", "private void initClassAttributes(){ \r\n\t\tanyMissingValue = new boolean[3];\r\n\t\tanyMissingValue[0] = false; \r\n\t\tanyMissingValue[1] = false;\r\n\t\tanyMissingValue[2] = false;\r\n\t\tnumInputAttributes = Attributes.getInputNumAttributes();\r\n\t\tnumOutputAttributes = Attributes.getOutputNumAttributes();\r\n\t\tnumUndefinedAttributes = Attributes.getNumAttributes() - (numInputAttributes+numOutputAttributes);\r\n\t\tintNominalValues = new int[3][];\r\n\t\tnominalValues = new String[3][];\r\n\t\trealValues = new double[3][];\r\n\t\tmissingValues = new boolean[3][];\r\n\t\tnominalValues[0] = new String[numInputAttributes];\r\n\t\tnominalValues[1] = new String[numOutputAttributes];\r\n\t\tnominalValues[2] = new String[numUndefinedAttributes];\r\n\t\tintNominalValues[0] = new int[numInputAttributes];\r\n\t\tintNominalValues[1] = new int[numOutputAttributes];\r\n\t\tintNominalValues[2] = new int[numUndefinedAttributes];\r\n\t\trealValues[0] = new double[numInputAttributes];\r\n\t\trealValues[1] = new double[numOutputAttributes];\r\n\t\trealValues[2] = new double[numUndefinedAttributes];\r\n\t\tmissingValues[0] = new boolean[numInputAttributes];\r\n\t\tmissingValues[1] = new boolean[numOutputAttributes];\r\n\t\tmissingValues[2] = new boolean[numUndefinedAttributes];\r\n\r\n\t\tfor(int i=0;i<numInputAttributes;i++) missingValues[0][i]=false; \r\n\t\tfor(int i=0;i<numOutputAttributes;i++) missingValues[1][i]=false; \r\n\t\tfor(int i=0;i<numUndefinedAttributes; i++) missingValues[2][i]=false;\r\n\r\n\t}", "public abstract double initialize(double[][] rawData, int clusterCount);", "public void backprop(double[] inputs, FeedForwardNeuralNetwork net, boolean verbose)\n {\n //create variables that will be used later\n int[] sizes = net.getSizes();\n int biggestSize = 0;\n for(int k = 0; k < sizes.length; k++)\n {\n if(sizes[k] > biggestSize)\n {\n biggestSize = sizes[k];\n }\n }\n int hiddenLayers = sizes.length - 2;\n //if input or output wrong size, return\n if(inputs.length != sizes[0])\n {\n System.out.println(\"Invalid number of inputs\");\n return;\n }\n\n double[][] allOutputs = new double[sizes.length][biggestSize];\n double[][] allErrors = new double[sizes.length][biggestSize];\n\n //fill out first layer to temp output\n int lastLayer = sizes[0];\n for(int k = 0; k < lastLayer; k++)\n {\n allOutputs[0][k] = inputs[k];\n }\n\n //for each layer after the input\n for(int k = 1; k < hiddenLayers + 2; k++)\n {\n //for each node in that layer\n for(int a = 0; a < sizes[k]; a++)\n {\n //get sum and get activation function result and its derivative\n double sum = 0;\n for(int t = 0; t < lastLayer; t++)\n {\n sum += allOutputs[k - 1][t] * net.getWeight(k - 1, t, k, a);\n }\n sum += net.getBiasNum() * net.getWeight(-1, 0, k, a);\n if(k != hiddenLayers + 1)\n {\n allOutputs[k][a] = net.applyActivationFunction(sum, net.getHiddenActivationFunction());\n allErrors[k][a] = net.applyActivationFunctionDerivative(sum, net.getHiddenActivationFunction());\n }\n else\n {\n allOutputs[k][a] = net.applyActivationFunction(sum, net.getOutputActivationFunction());\n allErrors[k][a] = net.applyActivationFunctionDerivative(sum, net.getOutputActivationFunction());\n }\n }\n lastLayer = sizes[k];\n }\n\n if(verbose)\n {\n System.out.println(\"Outputs\");\n for(int k = 0; k < maxClusters; k++)\n {\n System.out.print(allOutputs[hiddenLayers + 1][k] + \", \");\n }\n System.out.println();\n }\n double[] expectedOutputs = new double[maxClusters];\n int cluster = 0;\n double max = 0;\n for(int k = 0; k < maxClusters; k++)\n {\n expectedOutputs[k] = allOutputs[hiddenLayers + 1][k];\n if(allOutputs[hiddenLayers + 1][k] > max)\n {\n cluster = k;\n max = allOutputs[hiddenLayers + 1][k];\n }\n }\n if(verbose)\n {\n System.out.println(\"Output \" + cluster + \" will be set to max value\");\n System.out.println();\n }\n\n expectedOutputs[cluster] = 4;\n\n\n //go backward from output to first hidden layer\n for(int k = hiddenLayers + 1; k > 0; k--)\n {\n //for each node in that layer\n for(int a = 0; a < sizes[k]; a++)\n {\n //compute error for not output layer\n if(k != hiddenLayers + 1)\n {\n double temp = allErrors[k][a];\n allErrors[k][a] = 0;\n for(int t = 0; t < sizes[k + 1]; t++)\n {\n allErrors[k][a] += net.getWeight(k, t, k + 1, a) * allErrors[k + 1][t];\n }\n allErrors[k][a] *= temp;\n }\n //compute error for output layer\n else\n {\n allErrors[k][a] *= (expectedOutputs[a] - allOutputs[k][a]);\n }\n\n //for each weight node takes as input\n for(int t = 0; t < sizes[k - 1]; t++)\n {\n //find the delta for the weight and apply\n int index = net.getIndex(k - 1, t, k, a);\n double delta = learningRate * allOutputs[k - 1][t] * allErrors[k][a]\n + momentum * lastDeltas[index];\n\n net.setWeight(k - 1, t, k, a, net.getWeight(k - 1, t, k, a) + delta);\n lastDeltas[index] = delta;\n }\n }\n }\n }", "public double[] feedForward(BufferedImage img) {\n\n double[] out = new double[3];\n try {\n double[][][] input = MathTools.mapArray(ImageManager.convertRGB2D(ImageManager.getSquaredImage(img, imageSize)), 0, 255, 0, 1);\n\n Matrix[] in = new Matrix[3];\n\n for (int i = 0; i < in.length; i++) {\n in[i] = new Matrix(input[i]);\n }\n\n cnn.setInputs(in);\n\n out = cnn.feedForward();\n } catch (IOException e) {\n System.out.println(\"Erreur lors du chargement de l'image\");\n }\n\n repaint();\n\n return out;\n\n }", "static Nda<Float> of( Shape shape, float... values ) { return Tensor.ofAny( Float.class, shape, values ); }", "void backpropagate(float[] inputs, float... targets);", "@Test\n public void addModelData() {\n new FactoryInitializer()\n .initialize(\n ((tr, ev, is, np, md) -> new ResNetConv2DFactory(tr,ev,is,np,md).addModelData(new ArrayList<>()))\n );\n }", "static Nda<Double> of( double... value ) { return Tensor.of( Double.class, Shape.of( value.length ), value ); }", "@Test\n public void testBuildGraph_FactorArr() {\n // And now factors\n CostFunction[] factors = new CostFunction[]{\n factory.buildCostFunction( new Variable[]{v[0],v[1]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[1]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[1]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[2]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[2]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[3]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[4]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[1],v[2]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[1],v[3]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[3],v[4]}, 0 ),\n };\n\n MCS mcs = new MCS(Arrays.asList(factors));\n UPFactory f = new GdlFactory();\n UPGraph result = JunctionTreeAlgo.buildGraph(f, mcs.getFactorDistribution(), mcs.getAdjacency());\n System.out.println(result);\n }", "public RealBuffer(float[] samples)\n {\n super(samples);\n }", "public Transformation(double values[][]) {\n\t\tsuper(4, 4, values);\n\t}", "public FitRealFunction() {\t\t\r\n\t}", "public Vector(float[] axis){ this.axis = axis;}", "private void train(float[] inputs, int desired) {\r\n int guess = feedforward(inputs);\r\n float error = desired - guess;\r\n for (int i = 0; i < weights.length; i++) {\r\n weights[i] += c * error * inputs[i];\r\n }\r\n }", "public DoubleMatrixDataset() {\r\n }", "protected abstract void fromSpace( float[] abc );", "protected final double[] getParametersArray() {\n\treturn parameters;\n }", "public abstract void fit(BinaryData trainingData);", "public abstract double gradient(double betaForDimension, int dimension);", "public MultivariateGaussianDM() {\n\t}", "private NonLinear(NonLinear existing) {\n\t this.rf = existing.rf;\n\t int n = existing.getNumberOfParameters();\n\t extendedParameters = new double[n+1];\n\t setParameters(new double[n]);\n\t}", "public MutableArray(float[] paramArrayOfFloat, int paramInt, CustomDatumFactory paramCustomDatumFactory)\n/* */ {\n/* 213 */ this.sqlType = paramInt;\n/* 214 */ this.old_factory = paramCustomDatumFactory;\n/* 215 */ this.isNChar = false;\n/* */ \n/* 217 */ setArray(paramArrayOfFloat);\n/* */ }", "private void setProblem() throws IOException, InvalidInputException{\r\n String finalInputFileName;\r\n if(scale){\r\n finalInputFileName = inputFileName + \".scaled\";\r\n }\r\n else{\r\n finalInputFileName = inputFileName;\r\n }\r\n \r\n // Read data from the input file\r\n BufferedReader reader = new BufferedReader(new FileReader(finalInputFileName));\r\n if(reader.toString().length() == 0){\r\n throw new InvalidInputException(\"Invalid input file! File is empty!\");\r\n }\r\n\r\n // Prepare holders for dataset D=(X,y)\r\n Vector<svm_node[]> X = new Vector<svm_node[]>();\r\n Vector<Double> y = new Vector<Double>();\r\n int maxIndex = 0;\r\n\r\n // Load data from file to holders\r\n while(true){\r\n String line = reader.readLine();\r\n\r\n if(line == null){\r\n break;\r\n }\r\n\r\n StringTokenizer st = new StringTokenizer(line,\" \\t\\n\\r\\f:\");\r\n\r\n y.addElement(Utils.toDouble(st.nextToken()));\r\n int m = st.countTokens()/2;\r\n svm_node[] x = new svm_node[m];\r\n for(int i = 0; i < m; i++) {\r\n x[i] = new svm_node();\r\n x[i].index = Utils.toInt(st.nextToken());\r\n x[i].value = Utils.toDouble(st.nextToken());\r\n }\r\n if(m > 0){\r\n maxIndex = Math.max(maxIndex, x[m-1].index);\r\n }\r\n X.addElement(x);\r\n }\r\n\r\n this.problem = new svm_problem();\r\n this.problem.l = y.size();\r\n this.inputDime = maxIndex + 1;\r\n\r\n // Wrap up multi-dimensional input vector X\r\n this.problem.x = new svm_node[this.problem.l][];\r\n for(int i=0;i<this.problem.l;i++)\r\n this.problem.x[i] = X.elementAt(i);\r\n\r\n // Wrap up 1-dimensional input vector y\r\n this.problem.y = new double[this.problem.l];\r\n for(int i=0;i<this.problem.l;i++)\r\n this.problem.y[i] = y.elementAt(i);\r\n \r\n////////////////////???\r\n // Verify the gamma setting according to the maxIndex\r\n if(param.gamma == 0 && maxIndex > 0)\r\n param.gamma = 1.0/maxIndex;\r\n\r\n // Dealing with pre-computed kernel\r\n if(param.kernel_type == svm_parameter.PRECOMPUTED){\r\n for(int i = 0; i < this.problem.l; i++) {\r\n if (this.problem.x[i][0].index != 0) {\r\n String msg = \"Invalid kernel matrix! First column must be 0:sample_serial_number.\";\r\n throw new InvalidInputException(msg);\r\n }\r\n if ((int)this.problem.x[i][0].value <= 0 || (int)this.problem.x[i][0].value > maxIndex){\r\n String msg = \"Invalid kernel matrix! Sample_serial_number out of range.\";\r\n throw new InvalidInputException(msg);\r\n }\r\n }\r\n }\r\n\r\n reader.close();\r\n }", "public void train(double[] inputs, double[] outputsTarget) {\n assert(outputsTarget.length == weights.get(weights.size() - 1).length);\n \n ArrayList<double[]> layersOutputs = new ArrayList<double[]>(); \n classify(inputs, layersOutputs);\n\n // Calculate sensitivities for the output nodes\n int outputNeuronCount = this.weights.get(this.weights.size() - 1).length;\n double[] nextLayerSensitivities = new double[outputNeuronCount];\n assert(layersOutputs.get(layersOutputs.size() - 1).length == outputNeuronCount);\n for (int i = 0; i < outputNeuronCount; i++) {\n nextLayerSensitivities[i] = calculateErrorPartialDerivitive(\n layersOutputs.get(layersOutputs.size() - 1)[i],\n outputsTarget[i]\n ) * calculateActivationDerivitive(layersOutputs.get(layersOutputs.size() - 1)[i]);\n assert(!Double.isNaN(nextLayerSensitivities[i]));\n }\n\n for (int weightsIndex = this.weights.size() - 1; weightsIndex >= 0; weightsIndex--) {\n int previousLayerNeuronCount = this.weights.get(weightsIndex)[0].length;\n int nextLayerNeuronCount = this.weights.get(weightsIndex).length;\n assert(nextLayerSensitivities.length == nextLayerNeuronCount);\n\n double[] previousLayerOutputs = layersOutputs.get(weightsIndex);\n double[] previousLayerSensitivities = new double[previousLayerNeuronCount];\n\n // Iterate over neurons in the previous layer\n for (int j = 0; j < previousLayerNeuronCount; j++) {\n\n // Calculate the sensitivity of this node\n double sensitivity = 0;\n for (int i = 0; i < nextLayerNeuronCount; i++) {\n sensitivity += nextLayerSensitivities[i] * this.weights.get(weightsIndex)[i][j];\n }\n sensitivity *= calculateActivationDerivitive(previousLayerOutputs[j]);\n assert(!Double.isNaN(sensitivity));\n previousLayerSensitivities[j] = sensitivity;\n\n for (int i = 0; i < nextLayerNeuronCount; i++) {\n double weightDelta = learningRate * nextLayerSensitivities[i] * calculateActivation(previousLayerOutputs[j]);\n this.weights.get(weightsIndex)[i][j] += weightDelta;\n assert(!Double.isNaN(this.weights.get(weightsIndex)[i][j]) && !Double.isInfinite(this.weights.get(weightsIndex)[i][j]));\n }\n }\n\n nextLayerSensitivities = previousLayerSensitivities;\n }\n }", "public void input(float[] values) throws Exception {\r\n if (values.length != neurons[0].length) {\r\n throw new Exception(\"Not enough or too many inputs\");\r\n }\r\n for (int i = 0; i < values.length; i++) {\r\n neurons[0][i].setOutput(values[i]);\r\n }\r\n }", "public abstract void build(ClassifierData<U> inputData);", "public Double[] getBase() {\n\t\tDouble[] base = new Double[2];\n\t\tbase[0] = config[0];\n\t\tbase[1] = config[1];\n\t\treturn base;\n\t}", "public r3inputlayer(double[] inputarray, int depth){\r\n double[][][] newarray = new double[inputarray.length][1][depth + 2];\r\n for(int i = 0; i < inputarray.length; i++){\r\n newarray[i][0][0] = inputarray[i];\r\n }\r\n this.state = newarray;\r\n this.width = inputarray.length;\r\n }", "private double calculateErrors(Instance instance, Hashtable<NeuralNode, Double> nodeValues) throws Exception {\r\n\t\tdouble ret = 0;\r\n\t\t\r\n\t\t// calculate errors for the network\r\n\t\tfor (InputNode input : inputs) {\r\n\t\t\tinput.getError(instance, nodeValues);\r\n\t\t}\r\n\t\t\r\n\t\tfor (OutputNode output : outputs) {\r\n\t\t\tdouble error = output.getError(instance, nodeValues);\r\n\t\t\tret += error * error;\r\n\t\t}\r\n\t\treturn ret;\r\n\r\n\t}", "public void train(int n_epochs) {\n TrainModel train_model = null;\n\n int lenW = vocabulary.length;\n int W = 3 * lenW + 3;\n\n // randomly initialize U_Ot, values are randomly selected between -0.1 to 0.1;\n double[][] U_Ot = new double[D][W];\n\n // randomly initialize U_R, values are randomly selected between -0.1 and 0.1\n double[][] U_R = new double[D][W];\n\n double prev_err = 0D;\n for (int epoch = 0; epoch < n_epochs; epoch++) {\n double total_error = 0D;\n int n_wrong = 0;\n\n for (int i = 0; i < train_lines.size(); i++) {\n Instance line = train_lines.get(i);\n if (\"q\".equals(line.type)) { // indicates question\n List<Integer> refs = line.refs; // Indexing from 1\n List<Integer> f = refs.stream()\n .map(ref -> ref-1)\n .collect(Collectors.toList()); // Indexing from 0\n int id = line.ID - 1; // Indexing from 0\n\n // all indices from\n List<Integer> indices = range(i-id, i+1);\n List<double[]> memory_list = indices.stream()\n .map(idx -> L_train[idx])\n .collect(Collectors.toList());\n\n\n if (train_model == null) {\n train_model = new TrainModel(lenW, f.size());\n }\n\n List<Integer> m = f;\n // TODO\n List<Integer> mm = new ArrayList<>(); //TODO\n for (int j = 0; j < f.size(); j++) {\n mm.add(O_t(\n newM,\n memory_list\n ));\n }\n\n double err = train_model(H.get(\"answer\"),\n gamma, memory_list, V, id, ???)[0];\n total_error += err;\n System.out.println(\"epoch: \" + epoch + \"\\terr: \" + (total_error / train_lines.size()));\n }\n }\n }\n }", "public Matrix3f(float v[]) {\n\t\n \tthis.set(v);\n }", "private ArrayList<Tensor<?>> Funcionar_salida_Ant_umbral(float location, float email, float imei, float device, float serialnumber, float macaddress, float advertiser) {\n float n_epochs = 1;\n\n float output = 0; //y\n\n //First, create an input tensor:\n /*\n\n */\n\n\n //**** TEORIA *******\n //First, create an input tensor:\n //Tensor input = Tensor.create(features);\n // float[][] output = new float[1][1];\n //Then perform inference by:\n //Tensor op_tensor = sess.runner().feed(\"input\", input).fetch(\"output\").run().get(0).expect(Float.class);\n //Copy this output to a float array using:\n //op_tensor.copyTo(output);\n // values.copyTo(output);\n Tensor input_location = Tensor.create(location);\n Tensor input_email = Tensor.create(email);\n Tensor input_imei = Tensor.create(imei);\n Tensor input_device = Tensor.create(device);\n Tensor input_serialnumber = Tensor.create(serialnumber);\n Tensor input_macaddress = Tensor.create(macaddress);\n Tensor input_advertiser = Tensor.create(advertiser);\n\n Tensor input_umbral_verde = Tensor.create(umbral_verde);\n Tensor input_umbral_naranja = Tensor.create(umbral_naranja);\n Tensor input_umbral_rojo = Tensor.create(umbral_rojo);\n\n Tensor input_Plocation = Tensor.create(Plocation);\n Tensor input_Pemail = Tensor.create(Pemail);\n Tensor input_Pdevice = Tensor.create(Pdevice);\n Tensor input_Pimei = Tensor.create(Pimei);\n Tensor input_Pserialnumber = Tensor.create(Pserialnumber);\n Tensor input_Pmacaddress = Tensor.create(Pmacaddress);\n Tensor input_Padvertiser = Tensor.create(Padvertiser);\n\n\n\n ArrayList<Tensor<?>> list_op_tensor = new ArrayList<Tensor<?>>();\n\n String location_filtrado = \"NO\";\n String email_filtrado = \"NO\";\n String imei_filtrado = \"NO\";\n String device_filtrado = \"NO\";\n String serialnumber_filtrado = \"NO\";\n String macaddress_filtrado = \"NO\";\n String advertiser_filtrado = \"NO\";\n\n String filtraciones_aplicacion = \"\";\n\n if (location == 1){\n location_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -Location\" + \"\\n\";\n }\n if (email == 1){\n email_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -Email\" + \"\\n\";\n }\n if (device == 1){\n device_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -DeviceID\" + \"\\n\";\n }\n if (imei == 1){\n imei_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -Imei\" + \"\\n\";\n\n }\n if (serialnumber == 1){\n serialnumber_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -SerialNumber\" + \"\\n\";\n\n }\n if (macaddress == 1){\n macaddress_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -MacAddress\" + \"\\n\";\n\n }\n if (advertiser == 1){\n advertiser_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -AdvertiserID\" + \"\\n\";\n\n }\n\n //Tensor op_tensor = sess.runner().feed(\"input\",input).fetch(\"output\").run().get(0).expect(Float.class);\n //umbral_green\n Tensor op_tensor_verde = sess.runner().feed(\"location_input\",input_location).feed(\"email_input\",input_email).feed(\"imei_input\",input_imei).feed(\"device_input\",input_device).feed(\"umbral\",input_umbral_verde).feed(\"Plocation\",input_Plocation).feed(\"Pemail\",input_Pemail).feed(\"Pdevice\",input_Pdevice).feed(\"Pimei\",input_Pimei).feed(\"Pserialnumber\",input_Pserialnumber).feed(\"Pmacaddress\",input_Pmacaddress).feed(\"Padvertiser\",input_Padvertiser).fetch(\"output\").run().get(0).expect(Float.class);\n //umbral Naranja\n Tensor op_tensor_naranja = sess.runner().feed(\"location_input\",input_location).feed(\"email_input\",input_email).feed(\"imei_input\",input_imei).feed(\"device_input\",input_device).feed(\"umbral\",input_umbral_naranja).feed(\"Plocation\",input_Plocation).feed(\"Pemail\",input_Pemail).feed(\"Pdevice\",input_Pdevice).feed(\"Pimei\",input_Pimei).feed(\"Pserialnumber\",input_Pserialnumber).feed(\"Pmacaddress\",input_Pmacaddress).feed(\"Padvertiser\",input_Padvertiser).fetch(\"output\").run().get(0).expect(Float.class);\n //umbral rojo\n Tensor op_tensor_rojo =sess.runner().feed(\"location_input\",input_location).feed(\"email_input\",input_email).feed(\"imei_input\",input_imei).feed(\"device_input\",input_device).feed(\"umbral\",input_umbral_rojo).feed(\"Plocation\",input_Plocation).feed(\"Pemail\",input_Pemail).feed(\"Pdevice\",input_Pdevice).feed(\"Pimei\",input_Pimei).feed(\"Pserialnumber\",input_Pserialnumber).feed(\"Pmacaddress\",input_Pmacaddress).feed(\"Padvertiser\",input_Padvertiser).fetch(\"output\").run().get(0).expect(Float.class);\n\n list_op_tensor.add(op_tensor_verde);\n list_op_tensor.add(op_tensor_naranja);\n list_op_tensor.add(op_tensor_rojo);\n\n //para escribir en la app en W y B test\n // LO COMENTO 12/02/2021\n // ArrayList<Tensor<?>> values = (ArrayList<Tensor<?>>) sess.runner().fetch(\"W/read\").fetch(\"b/read\").run();\n // NO VA ESTA PRUEBA ArrayList<Tensor<?>> values = (ArrayList<Tensor<?>>) sess.runner().fetch(\"W/read\").fetch(\"b/read\").fetch(\"y/output\").run();\n\n //CREAR UN TEXTO PARA ESCRIBIR EL OUTPUT PREDECIDO: Out\n\n // Y.setText(\"Salida: Y= \"+ Float.toString(op_tensor.floatValue()) +\", si entrada X=1\");\n // Y.setText(\"Salida: Y= \"+ Float.toString(op_tensor.floatValue()) +\", si entrada email,...\");\n\n String recomendacion = \"No hacer nada\";\n String Nivel = \" Bajo\";\n int Nivel_color = 0; //0 es verde, 1 naranja, 2 rojo\n if (op_tensor_verde.floatValue() == 1) {\n if(op_tensor_naranja.floatValue() == 1 ){\n if(op_tensor_rojo.floatValue() == 1 ){\n Nivel = \" Alto\";\n Nivel_color = 2;\n }\n else {\n Nivel = \" Medio\";\n Nivel_color = 1;\n }\n }\n else {\n Nivel = \" Bajo\";\n Nivel_color = 0;\n }\n }\n\n /// test.setBackgroundResource(R.color.holo_green_light);\n\n\n // resumen_app.setText(\"Resumen App analizada: \"+ \"\\n\" + \"Nota: Si una app tiene una filtración, se marcará dicho valor con un 'SI'\"+ \"\\n\" + \"Location: \" + location_filtrado + \"\\n\" + \"Email: \" + email_filtrado + \"\\n\" + \"DeviceID: \" + device_filtrado + \"\\n\" + \"Imei: \" + imei_filtrado + \"\\n\" +\n // \"Recomendación: \" + recomendacion);\n subtitulo.setText(\"Nivel: \" );\n titulo.setText(Nivel );\n // titulo.setTextColor(android.R.color.background_dark);\n\n // resumen_app.setText(\"Filtraciones Spotify: \"+ \"\\n\" + \"\\n\" + \"Location: \" + location_filtrado + \"\\n\" + \"Email: \" + email_filtrado + \"\\n\" + \"DeviceID: \" + device_filtrado + \"\\n\" + \"Imei: \" + imei_filtrado );\n resumen_app.setText(\"Filtraciones Spotify: \"+ \"\\n\" + \"\\n\" + filtraciones_aplicacion );\n\n //mirar bien codigo:\n if ( Nivel_color == 0) {\n // resumen_app.setBackgroundResource(R.color.verde);\n nivel_color = 0;\n resumen_app.setBackgroundResource(R.drawable.stilo_borde_textview);\n }\n if ( Nivel_color == 1) {\n // resumen_app.setBackgroundResource(R.color.naranja);\n nivel_color = 1;\n resumen_app.setBackgroundResource(R.drawable.stilo_borde_naranja);\n }\n if ( Nivel_color == 2) {\n // resumen_app.setBackgroundResource(R.color.rojo);\n nivel_color = 2;\n resumen_app.setBackgroundResource(R.drawable.stilo_borde_rojo);\n }\n\n /* ArrayList<Tensor<?>> values = (ArrayList<Tensor<?>>) sess.runner().fetch(\"Plocation/read\").fetch(\"Pemail/read\").fetch(\"Pdevice/read\").fetch(\"Pimei/read\").run();\n\n // y_mejoras_location.add(((values.get(0).floatValue())));\n y_mejoras_location.add(Plocation);\n x_mejoras_location.add(\"\" + (0 + num_epoch*num));\n\n // y_mejoras_email.add(((values.get(1).floatValue())));\n y_mejoras_email.add(Pemail);\n x_mejoras_email.add(\"\" + (0 + num_epoch*num));\n\n // y_mejoras_device.add(((values.get(2).floatValue())));\n y_mejoras_device.add(Pdevice);\n x_mejoras_device.add(\"\" + (0 + num_epoch*num));\n\n //y_mejoras_imei.add(((values.get(3).floatValue())));\n y_mejoras_imei.add(Pimei);\n x_mejoras_imei.add(\"\" + (0 + num_epoch*num));\n\n\n */\n\n ///\n\n // Y.setText(Float.toString(values.get(1).floatValue()));\n\n return list_op_tensor;\n }", "public FcmLearner(double [][] matrix){\n this.adjacencyMatrix = matrix;\n }", "public\nNuc2D(NucNode nuc)\nthrows Exception\n{\n\tsuper (nuc);\n}", "private void initializeAndTrainModel(float alpha) {\n\n double forecast;\n double lastValue = actual[0];\n double[][] trainMatrix = new double[trainPoints][2];\n double[][] valMatrix = new double[validationPoints][2];\n\n for (int i = 1; i < trainPoints; i++) {\n forecast = lastValue;\n\n trainMatrix[i][0] = actual[i];\n trainMatrix[i][1] = forecast;\n lastValue = (alpha * actual[i]) + ((1 - alpha) * lastValue);\n }\n\n for (int t = 1; t <= validationPoints; t++) {\n valMatrix[t - 1][1] = lastValue;\n valMatrix[t - 1][0] = actual[trainPoints + t - 1];\n }\n\n\n double biasness = BiasnessHandler.handle(valMatrix);\n AccuracyIndicators AI = new AccuracyIndicators();\n ModelUtil.computeAccuracyIndicators(AI, trainMatrix, valMatrix, dof);\n AI.setBias(biasness);\n if (min_val_error >= AI.getMAPE()) {\n min_val_error = AI.getMAPE();\n optAlpha = alpha;\n accuracyIndicators = AI;\n }\n }", "@Override\n\tpublic void train(DataSet data) {\n\t\tArrayList<Example> examples = data.getCopyWithBias().getData();\n\t\t// initialize both weight vectors with random values between -0.1 ad 0.1\n\t\tinitWeights(examples.size());\n\n\t\t// store outputs from forward calculation for each example\n\t\t// array will have size # examples.\n\t\tArrayList<Double> nodeOutputs = calculateForward(examples);\n\n\t\t// now take error and back-propagate from output to hidden nodes\n\n\t\tfor (int j = 0; j < examples.size(); j++) {\n\t\t\tExample ex = examples.get(j);\n\n\t\t\t// get hidden node outputs for single example\n\t\t\tfor (int num = 0; num < numHidden; num++) {\n\t\t\t\tArrayList<Double> h_outputs = hiddenOutputs.get(num);\n\t\t\t\tdouble vDotH = dotProduct(h_outputs, layerTwoWeights); // calculate\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// v dot\n\t\t\t\t// h for\n\t\t\t\t// this node\n\n\t\t\t\tfor (int i = 0; i < numHidden - 1; i++) {\n\t\t\t\t\tdouble oldV = layerTwoWeights.get(i);\n\t\t\t\t\tdouble hk = h_outputs.get(i);\n\t\t\t\t\t// Equation describing line below:\n\t\t\t\t\t// v_k = v_k + eta*h_k(y-f(v dot h)) f'(v dot h)\n\t\t\t\t\tlayerTwoWeights.set(i, oldV + eta * hk * (ex.getLabel() - Math.tanh(vDotH)) * derivative(vDotH));\n\t\t\t\t}\n\n\t\t\t\tSet<Integer> features = ex.getFeatureSet();\n\t\t\t\tIterator<Integer> iter = features.iterator();\n\t\t\t\tArrayList<Double> featureVals = new ArrayList<Double>();\n\t\t\t\tfor (int f : features) {\n\t\t\t\t\tfeatureVals.add((double) f);\n\t\t\t\t}\n\n\t\t\t\t// take that error and back-propagate one more time\n\t\t\t\tfor (int x = 0; x < numHidden; x++) {\n\t\t\t\t\tArrayList<Double> initWeights = hiddenWeights.get(x);\n\t\t\t\t\t// List<Object> features =\n\t\t\t\t\t// Arrays.asList(ex.getFeatureSet().toArray());\n\n\t\t\t\t\t// for (int i = 0; i < featureVals.size()-1; i++) {\n\t\t\t\t\tdouble oldWeight = initWeights.get(j);\n\t\t\t\t\tdouble thisInput = ex.getFeature(featureVals.get(x).intValue());\n\t\t\t\t\t// w_kj = w_kj + eta*xj(input)*f'(w_k dot x)*v_k*f'(v dot\n\t\t\t\t\t// h)(y-f(v dot h))\n\t\t\t\t\tdouble updateWeight = oldWeight + eta * thisInput * derivative(dotProduct(featureVals, initWeights))\n\t\t\t\t\t\t\t* layerTwoWeights.get(x) * derivative(vDotH) * (ex.getLabel() - Math.tanh(vDotH));\n\t\t\t\t\tinitWeights.set(j, updateWeight);\n\t\t\t\t\t// }\n\t\t\t\t\thiddenWeights.set(x, initWeights); // update weights for\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// current\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// example\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "static Nda<Double> of( Shape shape, double... values ) { return Tensor.ofAny( Double.class, shape, values ); }", "private Exemplar (NNge nnge, Instances inst, int size, double classV){\n\n super(inst, size);\n m_NNge = nnge;\n m_ClassValue = classV;\n m_MinBorder = new double[numAttributes()];\n m_MaxBorder = new double[numAttributes()];\n m_Range = new boolean[numAttributes()][];\n for(int i = 0; i < numAttributes(); i++){\n\tif(attribute(i).isNumeric()){\n\t m_MinBorder[i] = Double.POSITIVE_INFINITY;\n\t m_MaxBorder[i] = Double.NEGATIVE_INFINITY;\n\t m_Range[i] = null;\n\t} else {\n\t m_MinBorder[i] = Double.NaN;\n\t m_MaxBorder[i] = Double.NaN;\n\t m_Range[i] = new boolean[attribute(i).numValues() + 1];\n\t for(int j = 0; j < attribute(i).numValues() + 1; j++){\n\t m_Range[i][j] = false;\n\t }\n\t}\n }\n }", "static <T> Nda<T> of( Iterable<T> values ) { return Tensor.of(values); }", "CrossValidation createCrossValidation();", "public MutableArray(double[] paramArrayOfDouble, int paramInt, CustomDatumFactory paramCustomDatumFactory)\n/* */ {\n/* 191 */ this.sqlType = paramInt;\n/* 192 */ this.old_factory = paramCustomDatumFactory;\n/* 193 */ this.isNChar = false;\n/* */ \n/* 195 */ setArray(paramArrayOfDouble);\n/* */ }", "private Data[] getFloats(double value, int npoints, int nattributes)\n\t{\n\t\tData[] data = new Data[npoints];\n\t\tfor (int i = 0; i < npoints; i++)\n\t\t\tdata[i] = nattributes == 1 ? new DataFloat((float) value)\n\t\t: new DataArrayOfFloats(new float[] { (float) value,\n\t\t\t\t(float) value });\n\t\t\treturn data;\n\t}", "public FCMResult getSingleResult(double [] input)throws Exception{\n if (this.adjacencyMatrix.length != input.length) {\n throw new Exception(\"the length of the input array does not match with the length of the adjascent matrix\");\n }\n boolean check = true;\n double [] temp = input;//copy the value of the input in another data so that the variable scope will not be messed with.\n double [] init = new double[input.length];\n //include the whhile loop with the condition here\n int iterationCount=0;\n do { \n for (int i = 0; i < temp.length; i++) {//update each of the activation value inthe emp variable and test for the \n for (int j = 0; j < adjacencyMatrix[i].length; j++) {\n if (i==j) {\n continue;\n }\n init[j] +=temp[j] * adjacencyMatrix[i][j];//update the state of the input\n }\n }\n // add the value \n double [] previous = temp.clone();\n for (int i = 0; i < init.length; i++) {\n temp[i] = activationFunction(temp[i] + init[i]);\n }\n double check1 = getAbsoluteAverage(previous);\n double check2 = getAbsoluteAverage(temp) ;\n check = Math.abs(check1 - check2)> error;\n iterationCount++;\n } while (check);\n return evaluateResult(temp,iterationCount);\n //evaluate the result when you get here.\n }", "@SafeVarargs\n static <T> Nda<T> of( T... values ) { return Tensor.of(values); }", "private float get_steering_prediction(Mat frame){\n Imgproc.cvtColor(frame, frame, Imgproc.COLOR_RGBA2RGB);\n Imgproc.cvtColor(frame, frame, Imgproc.COLOR_RGB2YUV);\n Imgproc.GaussianBlur(frame, frame, new Size(3, 3), 0, 0);\n\n Mat f = new Mat();\n Imgproc.resize(frame,f,new Size(200, 66));\n // f = Dnn.blobFromImage(f, 0.00392, new Size(200, 66) , new Scalar(0,0 ,0), false,false);\n f.convertTo(f,CV_32F);\n StringBuilder sb = new StringBuilder();\n String s = new String();\n System.out.println(\"hei \"+ f.height()+\", wit\" + f.width() + \"ch \" + f.channels());\n System.out.println(\"col \"+ f.cols()+\", row\" + f.rows() + \"ch \" + f.channels());\n\n float[][][][] inputs = new float[1][200][66][3];\n float fs[] = new float[3];\n for( int r=0 ; r<f.rows() ; r++ ) {\n //sb.append(\"\"+r+\") \");\n for( int c=0 ; c<f.cols() ; c++ ) {\n f.get(r, c, fs);\n //sb.append( \"{\");\n inputs[0][c][r][0]=fs[0]/255;\n inputs[0][c][r][1]=fs[1]/255;\n inputs[0][c][r][2]=fs[2]/255;\n //sb.append( String.valueOf(fs[0]));\n //sb.append( ' ' );\n //sb.append( String.valueOf(fs[1]));\n //sb.append( ' ' );\n //sb.append( String.valueOf(fs[2]));\n //sb.append( \"}\");\n //sb.append( ' ' );\n }\n //sb.append( '\\n' );\n }\n //System.out.println(sb);\n\n\n\n\n float[][] outputs = new float[1][1];\n interperter.run(inputs ,outputs);\n System.out.println(\"output: \" + outputs[0][0]);\n return outputs[0][0];\n }", "private DigitalNetBase2 initNetVar (boolean shiftFlag) {\n DigitalNetBase2 net = new DigitalNetBase2 ();\n if (shiftFlag)\n net.dim = dim + 1;\n else\n net.dim = dim;\n net.numPoints = numPoints;\n net.numCols = numCols;\n net.numRows = numRows;\n net.outDigits = outDigits;\n net.normFactor = normFactor;\n net.factor = new double[outDigits];\n net.genMat = new int[net.dim * numCols];\n net.shiftStream = shiftStream;\n net.capacityShift = capacityShift;\n net.dimShift = dimShift;\n net.digitalShift = copyDigitalShift (digitalShift);\n if (shiftFlag && shiftStream != null) {\n net.addRandomShift (dimShift, dimShift + 1, shiftStream);\n }\n return net;\n }", "@Test\n public void testBuildGraph_FactorArr_booleanArrArr() {\n\n char[][] adjacency = new char[][]{\n {0, 0, 0, 0, 0, 0, 0, 1, 0, 0},\n {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},\n {0, 1, 0, 0, 0, 0, 0, 0, 0, 0},\n {0, 0, 1, 0, 0, 0, 0, 0, 0, 0},\n {0, 0, 0, 1, 0, 0, 0, 0, 0, 0},\n {0, 0, 0, 0, 0, 0, 1, 0, 0, 0},\n {1, 0, 0, 0, 0, 0, 0, 0, 0, 0},\n {0, 0, 0, 0, 1, 0, 0, 0, 0, 0},\n {0, 0, 0, 0, 0, 1, 0, 0, 0, 0},\n {0, 0, 0, 0, 0, 0, 0, 0, 1, 0},\n };\n\n CostFunction[][] factors = new CostFunction[][]{\n {factory.buildCostFunction( new Variable[]{v[0],v[7]}, 0 )},\n {},\n {factory.buildCostFunction( new Variable[]{v[1],v[2]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[2],v[3]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[3],v[4]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[1],v[3],v[4]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[1],v[5]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[2],v[6]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[1],v[6],v[7]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[6]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[3],v[7]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[4],v[8]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[5],v[8]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[8]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[2],v[5],v[9]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[5],v[6],v[9]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[4],v[7],v[9]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[8],v[9]}, 0 )},\n };\n\n GdlFactory gf = new GdlFactory();\n UPGraph result = JunctionTreeAlgo.buildGraph(gf, factors, adjacency);\n //System.out.println(result);\n }", "public BackPropagationNeural_3H(int size_in,int size_hidden1,int size_hidden2,int size_hidden3,int size_output){\n\t\tthis.size_in = size_in;\n\t\tthis.size_hidden1 = size_hidden1;\n\t\tthis.size_hidden2 = size_hidden2;\n\t\tthis.size_hidden3 = size_hidden3;\n\t\tthis.size_output = size_output;\n\t\t\n\t\tinputs = new float[size_in];\n\t\thidden1 = new float[size_hidden1];\n\t\thidden2 = new float[size_hidden2];\n\t\thidden3 = new float[size_hidden3];\n\t\toutput = new float[size_output];\n\t\t\n\t\tweight1 = new float[size_in][size_hidden1];\n\t\tweight2 = new float[size_hidden1][size_hidden2];\n\t\tweight3 = new float[size_hidden2][size_hidden3];\n\t\tweight4 = new float[size_hidden3][size_output];\n\t\t\n\t\tW1_last_delta = new float[size_in][size_hidden1];\n W2_last_delta = new float[size_hidden1][size_hidden2];\n W3_last_delta = new float[size_hidden2][size_hidden3];\n W4_last_delta = new float[size_hidden3][size_output];\n \n\t\trandomizeWeights();\n\t\toutput_error = new float[size_output];\n\t\thidden1_error = new float[size_hidden1];\n\t\thidden2_error = new float[size_hidden2];\n\t\thidden3_error = new float[size_hidden3];\n\t}", "@Override\n public double classifyInstance(Instance instance) throws Exception {\n\n\n\n int numAttributes = instance.numAttributes();\n int clsIndex = instance.classIndex();\n boolean hasClassAttribute = true;\n int numTestAtt = numAttributes -1;\n if (numAttributes == m_numOfInputNeutrons) {\n hasClassAttribute = false; // it means the test data doesn't has class attribute\n numTestAtt = numTestAtt+1;\n }\n\n for (int i = 0; i< numAttributes; i++){\n if (instance.attribute(i).isNumeric()){\n\n double max = m_normalization[0][i];\n double min = m_normalization[1][i];\n double normValue = 0 ;\n if (instance.value(i)<min) {\n normValue = 0;\n m_normalization[1][i] = instance.value(i); // reset the smallest value\n }else if(instance.value(i)> max){\n normValue = 1;\n m_normalization[0][i] = instance.value(i); // reset the biggest value\n }else {\n if (max == min ){\n if (max == 0){\n normValue = 0;\n }else {\n normValue = max/Math.abs(max);\n }\n }else {\n normValue = (instance.value(i) - min) / (max - min);\n }\n }\n instance.setValue(i, normValue);\n }\n }\n\n double[] testData = new double[numTestAtt];\n\n\n\n\n\n int index = 0 ;\n\n if (!hasClassAttribute){\n\n for (int i =0; i<numAttributes; i++) {\n testData[i] = instance.value(i);\n }\n }else {\n for (int i = 0; i < numAttributes; i++) {\n\n if (i != clsIndex) {\n\n testData[index] = instance.value(i);\n\n index++;\n }\n }\n }\n\n\n\n DenseMatrix prediction = new DenseMatrix(numTestAtt,1);\n for (int i = 0; i<numTestAtt; i++){\n prediction.set(i, 0, testData[i]);\n }\n\n DenseMatrix H_test = generateH(prediction,weightsOfInput,biases, 1);\n\n DenseMatrix H_test_T = new DenseMatrix(1, m_numHiddenNeurons);\n\n H_test.transpose(H_test_T);\n\n DenseMatrix output = new DenseMatrix(1, m_numOfOutputNeutrons);\n\n H_test_T.mult(weightsOfOutput, output);\n\n double result = 0;\n\n if (m_typeOfELM == 0) {\n double value = output.get(0,0);\n result = value*(m_normalization[0][classIndex]-m_normalization[1][classIndex])+m_normalization[1][classIndex];\n //result = value;\n if (m_debug == 1){\n System.out.print(result + \" \");\n }\n }else if (m_typeOfELM == 1){\n int indexMax = 0;\n double labelValue = output.get(0,0);\n\n if (m_debug == 1){\n System.out.println(\"Each instance output neuron result (after activation)\");\n }\n for (int i =0; i< m_numOfOutputNeutrons; i++){\n if (m_debug == 1){\n System.out.print(output.get(0,i) + \" \");\n }\n if (output.get(0,i) > labelValue){\n labelValue = output.get(0,i);\n indexMax = i;\n }\n }\n if (m_debug == 1){\n\n System.out.println(\"//\");\n System.out.println(indexMax);\n }\n result = indexMax;\n }\n\n\n\n return result;\n\n\n }", "static <T> Nda<T> of( List<T> values ) { return TensorImpl._of(values); }", "@Override\n public void calculate(double[] x) {\n\n double prob = 0.0; // the log prob of the sequence given the model, which is the negation of value at this point\n Triple<double[][], double[][], double[][]> allParams = separateWeights(x);\n double[][] linearWeights = allParams.first();\n double[][] W = allParams.second(); // inputLayerWeights \n double[][] U = allParams.third(); // outputLayerWeights \n\n double[][] Y = null;\n if (flags.softmaxOutputLayer) {\n Y = new double[U.length][];\n for (int i = 0; i < U.length; i++) {\n Y[i] = ArrayMath.softmax(U[i]);\n }\n }\n\n double[][] What = emptyW();\n double[][] Uhat = emptyU();\n\n // the expectations over counts\n // first index is feature index, second index is of possible labeling\n double[][] E = empty2D();\n double[][] eW = emptyW();\n double[][] eU = emptyU();\n\n // iterate over all the documents\n for (int m = 0; m < data.length; m++) {\n int[][][] docData = data[m];\n int[] docLabels = labels[m];\n\n // make a clique tree for this document\n CRFCliqueTree cliqueTree = CRFCliqueTree.getCalibratedCliqueTree(docData, labelIndices, numClasses, classIndex,\n backgroundSymbol, new NonLinearCliquePotentialFunction(linearWeights, W, U, flags));\n\n // compute the log probability of the document given the model with the parameters x\n int[] given = new int[window - 1];\n Arrays.fill(given, classIndex.indexOf(backgroundSymbol));\n int[] windowLabels = new int[window];\n Arrays.fill(windowLabels, classIndex.indexOf(backgroundSymbol));\n\n if (docLabels.length>docData.length) { // only true for self-training\n // fill the given array with the extra docLabels\n System.arraycopy(docLabels, 0, given, 0, given.length);\n System.arraycopy(docLabels, 0, windowLabels, 0, windowLabels.length);\n // shift the docLabels array left\n int[] newDocLabels = new int[docData.length];\n System.arraycopy(docLabels, docLabels.length-newDocLabels.length, newDocLabels, 0, newDocLabels.length);\n docLabels = newDocLabels;\n }\n // iterate over the positions in this document\n for (int i = 0; i < docData.length; i++) {\n int label = docLabels[i];\n double p = cliqueTree.condLogProbGivenPrevious(i, label, given);\n if (VERBOSE) {\n System.err.println(\"P(\" + label + \"|\" + ArrayMath.toString(given) + \")=\" + p);\n }\n prob += p;\n System.arraycopy(given, 1, given, 0, given.length - 1);\n given[given.length - 1] = label;\n }\n\n // compute the expected counts for this document, which we will need to compute the derivative\n // iterate over the positions in this document\n for (int i = 0; i < docData.length; i++) {\n // for each possible clique at this position\n System.arraycopy(windowLabels, 1, windowLabels, 0, window - 1);\n windowLabels[window - 1] = docLabels[i];\n for (int j = 0; j < docData[i].length; j++) {\n Index<CRFLabel> labelIndex = labelIndices[j];\n // for each possible labeling for that clique\n int[] cliqueFeatures = docData[i][j];\n double[] As = null;\n double[] fDeriv = null;\n double[][] yTimesA = null;\n double[] sumOfYTimesA = null;\n\n if (j == 0) {\n As = NonLinearCliquePotentialFunction.hiddenLayerOutput(W, cliqueFeatures, flags);\n fDeriv = new double[inputLayerSize];\n double fD = 0;\n for (int q = 0; q < inputLayerSize; q++) {\n if (useSigmoid) {\n fD = As[q] * (1 - As[q]); \n } else {\n fD = 1 - As[q] * As[q]; \n }\n fDeriv[q] = fD;\n }\n\n // calculating yTimesA for softmax\n if (flags.softmaxOutputLayer) {\n double val = 0;\n\n yTimesA = new double[outputLayerSize][numHiddenUnits];\n for (int ii = 0; ii < outputLayerSize; ii++) {\n yTimesA[ii] = new double[numHiddenUnits];\n }\n sumOfYTimesA = new double[outputLayerSize];\n\n for (int k = 0; k < outputLayerSize; k++) {\n double[] Yk = null;\n if (flags.tieOutputLayer) {\n Yk = Y[0];\n } else {\n Yk = Y[k];\n }\n double sum = 0;\n for (int q = 0; q < inputLayerSize; q++) {\n if (q % outputLayerSize == k) {\n int hiddenUnitNo = q / outputLayerSize;\n val = As[q] * Yk[hiddenUnitNo];\n yTimesA[k][hiddenUnitNo] = val;\n sum += val;\n }\n }\n sumOfYTimesA[k] = sum;\n }\n }\n\n // calculating Uhat What\n int[] cliqueLabel = new int[j + 1];\n System.arraycopy(windowLabels, window - 1 - j, cliqueLabel, 0, j + 1);\n\n CRFLabel crfLabel = new CRFLabel(cliqueLabel);\n int givenLabelIndex = labelIndex.indexOf(crfLabel);\n double[] Uk = null;\n double[] UhatK = null;\n double[] Yk = null;\n double[] yTimesAK = null;\n double sumOfYTimesAK = 0;\n if (flags.tieOutputLayer) {\n Uk = U[0];\n UhatK = Uhat[0];\n if (flags.softmaxOutputLayer) {\n Yk = Y[0];\n }\n } else {\n Uk = U[givenLabelIndex];\n UhatK = Uhat[givenLabelIndex];\n if (flags.softmaxOutputLayer) {\n Yk = Y[givenLabelIndex];\n }\n }\n\n if (flags.softmaxOutputLayer) {\n yTimesAK = yTimesA[givenLabelIndex];\n sumOfYTimesAK = sumOfYTimesA[givenLabelIndex];\n }\n\n for (int k = 0; k < inputLayerSize; k++) {\n double deltaK = 1;\n if (flags.sparseOutputLayer || flags.tieOutputLayer) {\n if (k % outputLayerSize == givenLabelIndex) {\n int hiddenUnitNo = k / outputLayerSize;\n if (flags.softmaxOutputLayer) {\n UhatK[hiddenUnitNo] += (yTimesAK[hiddenUnitNo] - Yk[hiddenUnitNo] * sumOfYTimesAK);\n deltaK *= Yk[hiddenUnitNo];\n } else {\n UhatK[hiddenUnitNo] += As[k];\n deltaK *= Uk[hiddenUnitNo];\n }\n }\n } else {\n UhatK[k] += As[k];\n if (useOutputLayer) {\n deltaK *= Uk[k];\n }\n }\n if (useHiddenLayer)\n deltaK *= fDeriv[k];\n if (useOutputLayer) {\n if (flags.sparseOutputLayer || flags.tieOutputLayer) {\n if (k % outputLayerSize == givenLabelIndex) {\n double[] WhatK = What[k];\n for (int n = 0; n < cliqueFeatures.length; n++) {\n WhatK[cliqueFeatures[n]] += deltaK;\n }\n }\n } else {\n double[] WhatK = What[k];\n for (int n = 0; n < cliqueFeatures.length; n++) {\n WhatK[cliqueFeatures[n]] += deltaK;\n }\n }\n } else {\n if (k == givenLabelIndex) {\n double[] WhatK = What[k];\n for (int n = 0; n < cliqueFeatures.length; n++) {\n WhatK[cliqueFeatures[n]] += deltaK;\n }\n }\n }\n }\n }\n\n for (int k = 0; k < labelIndex.size(); k++) { // labelIndex.size() == numClasses\n int[] label = labelIndex.get(k).getLabel();\n double p = cliqueTree.prob(i, label); // probability of these labels occurring in this clique with these features\n if (j == 0) { // for node features\n double[] Uk = null;\n double[] eUK = null;\n double[] Yk = null;\n if (flags.tieOutputLayer) {\n Uk = U[0];\n eUK = eU[0];\n if (flags.softmaxOutputLayer) {\n Yk = Y[0];\n }\n } else {\n Uk = U[k];\n eUK = eU[k];\n if (flags.softmaxOutputLayer) {\n Yk = Y[k];\n }\n }\n if (useOutputLayer) {\n for (int q = 0; q < inputLayerSize; q++) {\n double deltaQ = 1;\n if (flags.sparseOutputLayer || flags.tieOutputLayer) {\n if (q % outputLayerSize == k) {\n int hiddenUnitNo = q / outputLayerSize;\n if (flags.softmaxOutputLayer) {\n eUK[hiddenUnitNo] += (yTimesA[k][hiddenUnitNo] - Yk[hiddenUnitNo] * sumOfYTimesA[k]) * p;\n deltaQ = Yk[hiddenUnitNo];\n } else {\n eUK[hiddenUnitNo] += As[q] * p;\n deltaQ = Uk[hiddenUnitNo];\n }\n }\n } else {\n eUK[q] += As[q] * p;\n deltaQ = Uk[q];\n }\n if (useHiddenLayer)\n deltaQ *= fDeriv[q];\n if (flags.sparseOutputLayer || flags.tieOutputLayer) {\n if (q % outputLayerSize == k) {\n double[] eWq = eW[q];\n for (int n = 0; n < cliqueFeatures.length; n++) {\n eWq[cliqueFeatures[n]] += deltaQ * p;\n }\n }\n } else {\n double[] eWq = eW[q];\n for (int n = 0; n < cliqueFeatures.length; n++) {\n eWq[cliqueFeatures[n]] += deltaQ * p;\n }\n }\n }\n } else {\n double deltaK = 1;\n if (useHiddenLayer)\n deltaK *= fDeriv[k];\n double[] eWK = eW[k];\n for (int n = 0; n < cliqueFeatures.length; n++) {\n eWK[cliqueFeatures[n]] += deltaK * p;\n }\n }\n } else { // for edge features\n for (int n = 0; n < cliqueFeatures.length; n++) {\n E[cliqueFeatures[n]][k] += p;\n }\n }\n }\n }\n }\n }\n\n if (Double.isNaN(prob)) { // shouldn't be the case\n throw new RuntimeException(\"Got NaN for prob in CRFNonLinearLogConditionalObjectiveFunction.calculate()\");\n }\n\n value = -prob;\n if(VERBOSE){\n System.err.println(\"value is \" + value);\n }\n\n // compute the partial derivative for each feature by comparing expected counts to empirical counts\n int index = 0;\n for (int i = 0; i < E.length; i++) {\n int originalIndex = edgeFeatureIndicesMap.get(i);\n\n for (int j = 0; j < E[i].length; j++) {\n derivative[index++] = (E[i][j] - Ehat[i][j]);\n if (VERBOSE) {\n System.err.println(\"linearWeights deriv(\" + i + \",\" + j + \") = \" + E[i][j] + \" - \" + Ehat[i][j] + \" = \" + derivative[index - 1]);\n }\n }\n }\n if (index != edgeParamCount)\n throw new RuntimeException(\"after edge derivative, index(\"+index+\") != edgeParamCount(\"+edgeParamCount+\")\");\n\n for (int i = 0; i < eW.length; i++) {\n for (int j = 0; j < eW[i].length; j++) {\n derivative[index++] = (eW[i][j] - What[i][j]);\n if (VERBOSE) {\n System.err.println(\"inputLayerWeights deriv(\" + i + \",\" + j + \") = \" + eW[i][j] + \" - \" + What[i][j] + \" = \" + derivative[index - 1]);\n }\n }\n }\n\n\n if (index != beforeOutputWeights)\n throw new RuntimeException(\"after W derivative, index(\"+index+\") != beforeOutputWeights(\"+beforeOutputWeights+\")\");\n\n if (useOutputLayer) {\n for (int i = 0; i < eU.length; i++) {\n for (int j = 0; j < eU[i].length; j++) {\n derivative[index++] = (eU[i][j] - Uhat[i][j]);\n if (VERBOSE) {\n System.err.println(\"outputLayerWeights deriv(\" + i + \",\" + j + \") = \" + eU[i][j] + \" - \" + Uhat[i][j] + \" = \" + derivative[index - 1]);\n }\n }\n }\n }\n\n if (index != x.length)\n throw new RuntimeException(\"after W derivative, index(\"+index+\") != x.length(\"+x.length+\")\");\n\n int regSize = x.length;\n if (flags.skipOutputRegularization || flags.softmaxOutputLayer) {\n regSize = beforeOutputWeights;\n }\n\n // incorporate priors\n if (prior == QUADRATIC_PRIOR) {\n double sigmaSq = sigma * sigma;\n for (int i = 0; i < regSize; i++) {\n double k = 1.0;\n double w = x[i];\n value += k * w * w / 2.0 / sigmaSq;\n derivative[i] += k * w / sigmaSq;\n }\n } else if (prior == HUBER_PRIOR) {\n double sigmaSq = sigma * sigma;\n for (int i = 0; i < regSize; i++) {\n double w = x[i];\n double wabs = Math.abs(w);\n if (wabs < epsilon) {\n value += w * w / 2.0 / epsilon / sigmaSq;\n derivative[i] += w / epsilon / sigmaSq;\n } else {\n value += (wabs - epsilon / 2) / sigmaSq;\n derivative[i] += ((w < 0.0) ? -1.0 : 1.0) / sigmaSq;\n }\n }\n } else if (prior == QUARTIC_PRIOR) {\n double sigmaQu = sigma * sigma * sigma * sigma;\n for (int i = 0; i < regSize; i++) {\n double k = 1.0;\n double w = x[i];\n value += k * w * w * w * w / 2.0 / sigmaQu;\n derivative[i] += k * w / sigmaQu;\n }\n }\n }", "public LinearGaussian(double[] values) {\n\t\tsuper();\n\t\tthis.values = values;\n\t\t\n\t\t/*calculate mean*/\n\t\tmean = Utilities.averageValueOfArray(values);\n\t\tvariance = Utilities.averageValueOfArray(varianceArray());\n\t}", "private void trainPerceptrons(){\n double activationValues[] = new double[4];\n for(Image image:asciiReader.getTrainingImages()){\n for (int j = 0 ; j < activationValues.length; j++){\n activationValues[j] = activationFunction\n .apply(sumWeights(j,image));\n }\n adjustWeights(activationValues,image);\n }\n }", "@Test\n\tpublic void constructorTest() {\n\t\tCTRNN testCtrnn = new CTRNN(layout1, phenotype1, false);\n\t\tAssert.assertEquals(1.0, testCtrnn.inputWeights[0], 0.001);\n\t\tAssert.assertEquals(2.0, testCtrnn.hiddenWeights[0][0], 0.001);\n\t\tAssert.assertArrayEquals(new double[] {3.0, 4.0}, testCtrnn.biasWeights, 0.001);\n\t\tAssert.assertArrayEquals(new double[] {5.0, 6.0}, testCtrnn.gains, 0.001);\n\t\tAssert.assertArrayEquals(new double[] {7.0, 8.0}, testCtrnn.timeConstants, 0.001);\n\t\t\n\t}", "public Transform(float[][] v){\n if(v.length != 4 || v[0].length != 4)\n throw new IllegalArgumentException(\n \"Transform: Wrong size array for argument: \" + v);\n else\n values = v;\n }", "public UnivariateStatsData() {\n super();\n }", "public Vector2f (float[] values)\n {\n set(values);\n }", "public TemperatureDifferenceCalculator(double[] list)\n {\n data = list;\n }", "public double[] propagate( double t0, double[] xin, double tf);", "public abstract int predict(double[] testingData);", "@Override\n\tpublic Object backward(Object grad_output) {\n\t\t\n\t\tdouble[] grads=(double[])grad_output;\n\t\t\n\t\t//for weights\n\t\tweights_gradients=new double[weights.length][];\n\t\tfor(int i=0;i<weights.length;i++)\n\t\t{\n\t\t\tweights_gradients[i]=grads;\n\t\t}\n\t\t\n\t\t//for grad_inputs\n\t\tdouble[] grad_inputs=MatrixTool.MatrixRightDotVector(weights, grads);\n\t\treturn grad_inputs;\n\t}", "public abstract double[] generate(double[] inputs, Matrix metaData);", "public DoubleArraySpliterator(double[] param1ArrayOfdouble, int param1Int1, int param1Int2, int param1Int3) {\n/* 1177 */ this.array = param1ArrayOfdouble;\n/* 1178 */ this.index = param1Int1;\n/* 1179 */ this.fence = param1Int2;\n/* 1180 */ this.characteristics = param1Int3 | 0x40 | 0x4000;\n/* */ }", "public PeakAlysis(float f[], float x[])\r\n {\r\n }", "public BaseParameters(){\r\n\t}", "float[] getModelMatrix();", "public BestMeanConvergence() {\n }", "@Override\n\tpublic Object forward(Object input) {\n\t\t\n\t\tdouble[] inputs=(double[])input;\n\t\tdouble[] output=MatrixTool.VectorRightDotMatrix(inputs, weights);\n\t\t\n\t\treturn output;\n\t}", "@Test\n public void testAccumulateGradients() {\n // TODO: MXNet support for accumulating gradients does not currently work\n TestUtils.requiresNotEngine(\"MXNet\");\n try (NDManager manager = NDManager.newBaseManager(TestUtils.getEngine())) {\n NDArray a = manager.create(0.0f);\n a.setRequiresGradient(true);\n\n Engine engine = Engine.getEngine(TestUtils.getEngine());\n try (GradientCollector gc = engine.newGradientCollector()) {\n for (int i = 1; i <= 3; i++) {\n NDArray b = a.mul(2);\n gc.backward(b);\n Assert.assertEquals(a.getGradient().getFloat(), 2.0f * i);\n }\n }\n }\n }", "public LineData(float[] afXValues, float[] afYValues)\n\t{\n\t\tsuper(afYValues);\n\t\tif (afXValues == null)\n\t\t{\n\t\t\tthrow new IllegalArgumentException(\"afXValues may not be null\");\n\t\t}\n\t\tif (afYValues.length!=afXValues.length) {\n\t\t\tthrow new IllegalArgumentException(\"afYValues length must be same as afXValues length, \" + afYValues.length + \"!=\" + afXValues.length);\n\t\t}\n\t\tthis.afXValues = afXValues;\n\t}", "public WeightedMovingAverageModel(float[] weights, int slices, int trainPoints, int validationPoints) {\n this(weights, slices, 1, trainPoints, validationPoints);\n }", "public ScalarParameterInformation(boolean isParameterToCalibrate) {\r\n\t\tsuper();\r\n\t\tthis.isParameterToCalibrate = isParameterToCalibrate;\r\n\t\tthis.constraint = new Unconstrained();\r\n\t}", "public NNImpl(ArrayList<Instance> trainingSet, int hiddenNodeCount, Double learningRate, int maxEpoch, Double [][]hiddenWeights, Double[] outputWeights)\r\n\t{\r\n\t\tthis.trainingSet=trainingSet;\r\n\t\tthis.learningRate=learningRate;\r\n\t\tthis.maxEpoch=maxEpoch;\r\n\r\n\t\t//input layer nodes\r\n\t\tinputNodes=new ArrayList<Node>();\r\n\t\tint inputNodeCount=trainingSet.get(0).attributes.size();\r\n\t\tint outputNodeCount=1;\r\n\t\tfor(int i=0;i<inputNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(0);\r\n\t\t\tinputNodes.add(node);\r\n\t\t}\r\n\r\n\t\t//bias node from input layer to hidden\r\n\t\tNode biasToHidden=new Node(1);\r\n\t\tinputNodes.add(biasToHidden);\r\n\r\n\t\t//hidden layer nodes\r\n\t\thiddenNodes=new ArrayList<Node> ();\r\n\t\tfor(int i=0;i<hiddenNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(2);\r\n\t\t\t//Connecting hidden layer nodes with input layer nodes\r\n\t\t\tfor(int j=0;j<inputNodes.size();j++)\r\n\t\t\t{\r\n\t\t\t\tNodeWeightPair nwp=new NodeWeightPair(inputNodes.get(j),hiddenWeights[i][j]);\r\n\t\t\t\tnode.parents.add(nwp);\r\n\t\t\t}\r\n\t\t\thiddenNodes.add(node);\r\n\t\t}\r\n\r\n\t\t//bias node from hidden layer to output\r\n\t\tNode biasToOutput=new Node(3);\r\n\t\thiddenNodes.add(biasToOutput);\r\n\r\n\r\n\r\n\t\tNode node=new Node(4);\r\n\t\t//Connecting output node with hidden layer nodes\r\n\t\tfor(int j=0;j<hiddenNodes.size();j++)\r\n\t\t{\r\n\t\t\tNodeWeightPair nwp=new NodeWeightPair(hiddenNodes.get(j), outputWeights[j]);\r\n\t\t\tnode.parents.add(nwp);\r\n\t\t}\t\r\n\t\toutputNode = node;\r\n\r\n\t}", "public Stat (double[] d){\r\n\t\t//create real copy (not shallow copy) of d\r\n\t\tdata = new double[d.length];\r\n\t\t\r\n\t\t//fill with d values\r\n\t\tfor (int i = 0; i < d.length; i++){\r\n\t\t\tdata[i] = d[i];\r\n\t\t}\r\n\t}", "public FCMResult [] getResults(double[][] inputs) throws Exception{\n FCMResult [] result = new FCMResult[inputs.length];\n for (int i = 0; i < result.length; i++) {\n result[i] = getSingleResult(inputs[i]);\n }\n return result;\n }", "private XYDataset createDataset() {\n\t\tfinal XYSeriesCollection dataset = new XYSeriesCollection( ); \n\t\tdataset.addSeries(trainErrors); \n\t\tdataset.addSeries(testErrors);\n\t\treturn dataset;\n\t}", "public F64Vector(double[] data) {\n this.data = data;\n }", "public double[] execute(double[] inputs) {\n _layers[0] = inputs.clone();\n for (int i = 1; i < _layers.length; i++) {\n // Each iteration fills out the ith layer with the values needed.\n// System.out.println(\"i = \" + i);\n// System.out.println(\"layers[0].length: \" + _layers[0].length);\n _layers[i] = getNextLayer(_layers[i-1], _weights[i-1], _biases[i-1]);\n }\n return _layers[_layers.length-1];\n }", "public NNImpl(ArrayList<Instance> trainingSet, int hiddenNodeCount, Double learningRate, int maxEpoch, Double [][]hiddenWeights, Double[][] outputWeights)\r\n\t{\r\n\t\tthis.trainingSet=trainingSet;\r\n\t\tthis.learningRate=learningRate;\r\n\t\tthis.maxEpoch=maxEpoch;\r\n\r\n\t\t//input layer nodes\r\n\t\tinputNodes=new ArrayList<Node>();\r\n\t\tint inputNodeCount=trainingSet.get(0).attributes.size();\r\n\t\tint outputNodeCount=trainingSet.get(0).classValues.size();\r\n\t\tfor(int i=0;i<inputNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(0);\r\n\t\t\tinputNodes.add(node);\r\n\t\t}\r\n\r\n\t\t//bias node from input layer to hidden\r\n\t\tNode biasToHidden=new Node(1);\r\n\t\tinputNodes.add(biasToHidden);\r\n\r\n\t\t//hidden layer nodes\r\n\t\thiddenNodes=new ArrayList<Node> ();\r\n\t\tfor(int i=0;i<hiddenNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(2);\r\n\t\t\t//Connecting hidden layer nodes with input layer nodes\r\n\t\t\tfor(int j=0;j<inputNodes.size();j++)\r\n\t\t\t{\r\n\t\t\t\tNodeWeightPair nwp=new NodeWeightPair(inputNodes.get(j),hiddenWeights[i][j]);\r\n\t\t\t\tnode.parents.add(nwp);\r\n\t\t\t}\r\n\t\t\thiddenNodes.add(node);\r\n\t\t}\r\n\r\n\t\t//bias node from hidden layer to output\r\n\t\tNode biasToOutput=new Node(3);\r\n\t\thiddenNodes.add(biasToOutput);\r\n\r\n\t\t//Output node layer\r\n\t\toutputNodes=new ArrayList<Node> ();\r\n\t\tfor(int i=0;i<outputNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(4);\r\n\t\t\t//Connecting output layer nodes with hidden layer nodes\r\n\t\t\tfor(int j=0;j<hiddenNodes.size();j++)\r\n\t\t\t{\r\n\t\t\t\tNodeWeightPair nwp=new NodeWeightPair(hiddenNodes.get(j), outputWeights[i][j]);\r\n\t\t\t\tnode.parents.add(nwp);\r\n\t\t\t}\t\r\n\t\t\toutputNodes.add(node);\r\n\t\t}\t\r\n\t}", "@Override\n /**\n * @param X The input vector. An array of doubles.\n * @return The value returned by th LUT or NN for this input vector\n */\n\n public double outputFor(double[] X) {\n int i = 0, j = 0;\n for(i=0;i<argNumInputs;i++){\n S[0][i] = X[i];\n NeuronCell[0][i] = X[i];\n }\n //then add the bias term\n S[0][argNumInputs] = 1;\n NeuronCell[0][argNumInputs] = customSigmoid(S[0][argNumInputs]);\n S[1][argNumHidden] = 1;\n NeuronCell[1][argNumHidden] = customSigmoid(S[1][argNumInputs]);\n\n for(i=0;i<argNumHidden;i++){\n for(j=0;j<=argNumInputs;j++){\n //Wji : weigth from j to i\n WeightSum+=NeuronCell[0][j]*Weight[0][j][i];\n }\n //Sj = sigma(Wji * Xi)\n S[1][i]=WeightSum;\n NeuronCell[1][i]=(customSigmoid(WeightSum));\n //reset weigthsum\n WeightSum=0;\n }\n\n for(i = 0; i < argNumOutputs; i++){\n for(j = 0;j <= argNumHidden;j++){\n WeightSum += NeuronCell[1][j] * Weight[1][j][i];\n }\n NeuronCell[2][i]=customSigmoid(WeightSum);\n S[2][i]=WeightSum;\n WeightSum=0;\n }\n //if we only return 1 double, it means we only have one output, so actually we can write return NeuronCell[2][0]\n return NeuronCell[2][0];\n }", "public Fitter() {\n this.alpha = -1.0; // reflection coefficient\n this.gamma = 2.0; // expansion coefficient\n this.beta = 0.5; // contraction coefficient\n this.maxError = 1.0E-10; // maximum error tolerance\n }", "public void estimateParameter(){\r\n int endTime=o.length;\r\n int N=hmm.stateCount;\r\n double p[][][]=new double[endTime][N][N];\r\n for (int t=0;t<endTime;++t){\r\n double count=EPS;\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n p[t][i][j]=fbManipulator.alpha[t][i]*hmm.a[i][j]*hmm.b[i][j][o[t]]*fbManipulator.beta[t+1][j];\r\n count +=p[t][j][j];\r\n }\r\n }\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n p[t][i][j]/=count;\r\n }\r\n }\r\n }\r\n double pSumThroughTime[][]=new double[N][N];\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n pSumThroughTime[i][j]=EPS;\r\n }\r\n }\r\n for (int t=0;t<endTime;++t){\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n pSumThroughTime[i][j]+=p[t][i][j];\r\n }\r\n }\r\n }\r\n\r\n //rebuild gamma\r\n for (int t=0;t<endTime;++t){\r\n for (int i=0;i<N;++i) fbManipulator.gamma[t][i]=0;\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n fbManipulator.gamma[t][i]+=p[t][i][j];\r\n }\r\n }\r\n }\r\n\r\n double gammaCount=EPS;\r\n //maximum parameter\r\n for (int i=0;i<N;++i){\r\n gammaCount+=fbManipulator.gamma[0][i];\r\n hmm.pi[i]=fbManipulator.gamma[0][i];\r\n }\r\n for (int i=0;i<N;++i){\r\n hmm.pi[i]/=gammaCount;\r\n }\r\n\r\n for (int i=0;i<N;++i) {\r\n gammaCount = EPS;\r\n for (int t = 0; t < endTime; ++t) gammaCount += fbManipulator.gamma[t][i];\r\n for (int j = 0; j < N; ++j) {\r\n hmm.a[i][j] = pSumThroughTime[i][j] / gammaCount;\r\n }\r\n }\r\n for (int i=0;i<N;i++){\r\n for (int j=0;j<N;++j){\r\n double tmp[]=new double[hmm.observationCount];\r\n for (int t=0;t<endTime;++t){\r\n tmp[o[t]]+=p[t][i][j];\r\n }\r\n for (int k=0;k<hmm.observationCount;++k){\r\n hmm.b[i][j][k]=(tmp[k]+1e-8)/pSumThroughTime[i][j];\r\n }\r\n }\r\n }\r\n //rebuild fbManipulator\r\n fbManipulator=new HMMForwardBackwardManipulator(hmm,o);\r\n }", "public BaselineList(ArrayList<float[]> list) {\n\t\tthis.listNum = list.size();\n\t\tthis.capacity = listNum * 2;\n\t\tthis.list = new ArrayList<float[]>(list);\n\t}", "private static double evaluate_dev(int count, int t) {\n double[][] tmp_featweights = new double[Features.num_feat][600000];\n double[][] tmp_best_avg_featVal = new double[Features.num_feat][600000];\n double[][] tmp_sum_featVal = new double[Features.num_feat][600000];\n double[][] tmp_changes_featVal = new double[Features.num_feat][600000];\n for (int ii = 0; ii < Features.num_feat; ii++) {\n tmp_featweights[ii] = Arrays.copyOf(Features.featweights[ii], Features.featweights[ii].length);\n tmp_best_avg_featVal[ii] = Arrays.copyOf(Features.best_avg_featVal[ii], Features.best_avg_featVal[ii].length);\n tmp_sum_featVal[ii] = Arrays.copyOf(Features.sum_featVal[ii], Features.sum_featVal[ii].length);\n tmp_changes_featVal[ii] = Arrays.copyOf(Features.changes_featVal[ii], Features.changes_featVal[ii].length);\n }\n double[][] tmp_a = new double[Features.m][Features.m];\n double[][] tmp_best_avg_a = new double[Features.m][Features.m];\n double[][] tmp_sum_a = new double[Features.m][Features.m];\n double[][] tmp_changes_a = new double[Features.m][Features.m];\n for (int ii = 0; ii < Features.m; ii++) {\n tmp_a[ii] = Arrays.copyOf(Features.a[ii], Features.a[ii].length);\n tmp_best_avg_a[ii] = Arrays.copyOf(Features.best_avg_a[ii], Features.best_avg_a[ii].length);\n tmp_sum_a[ii] = Arrays.copyOf(Features.sum_a[ii], Features.sum_a[ii].length);\n tmp_changes_a[ii] = Arrays.copyOf(Features.changes_a[ii], Features.changes_a[ii].length);\n }\n // final average\n Features.final_average(count);\n try {\n BufferedReader test_file = new BufferedReader(new FileReader(dev_file));\n String sentence = \"\";\n String line = null;\n while ((line=test_file.readLine()) != null) {\n if (line.isEmpty()) {\n Features.viterbi(\"<s> \"+sentence.substring(0,sentence.length()-1)+\" </s>\", true, mdl_path+\"/dev_output_\"+ (t+1), avg_flag);\n sentence = \"\";\n } else {\n sentence += line.substring(0,line.indexOf(\"\\t\")) + \" \";\n }\n }\n test_file.close();\n }\n catch(Exception ex){\n ex.printStackTrace();\n }\n double dev_acc = tagging_accuracy(dev_file, mdl_path+\"/dev_output_\"+ (t+1));\n if (dev_acc > best_acc_so_far) {\n Features.bestiter_a = Features.a;\n Features.bestiter_featweights = Features.featweights;\n Features.bestiter_avg_a = Features.best_avg_a;\n Features.bestiter_avg_featVal = Features.best_avg_featVal;\n }\n // restore before evaluation values\n Features.featweights = tmp_featweights;\n Features.best_avg_featVal = tmp_best_avg_featVal;\n Features.sum_featVal = tmp_sum_featVal;\n Features.changes_featVal = tmp_changes_featVal;\n Features.a = tmp_a;\n Features.best_avg_a = tmp_best_avg_a;\n Features.sum_a = tmp_sum_a;\n Features.changes_a = tmp_changes_a;\n return dev_acc;\n }", "private float predictPrueba(float features) {\n float n_epochs = num_epoch;\n float num1 = (float) Math.random();\n float output = 0; //y\n\n //First, create an input tensor:\n /*\n\n */\n\n\n //**** TEORIA *******\n //First, create an input tensor:\n //Tensor input = Tensor.create(features);\n // float[][] output = new float[1][1];\n //Then perform inference by:\n //Tensor op_tensor = sess.runner().feed(\"input\", input).fetch(\"output\").run().get(0).expect(Float.class);\n //Copy this output to a float array using:\n //op_tensor.copyTo(output);\n // values.copyTo(output);\n Tensor input = Tensor.create(features);\n Tensor op_tensor = sess.runner().feed(\"input\",input).fetch(\"output\").run().get(0).expect(Float.class);\n //para escribir en la app en W y B test\n ArrayList<Tensor<?>> values = (ArrayList<Tensor<?>>) sess.runner().fetch(\"W/read\").fetch(\"b/read\").run();\n // NO VA ESTA PRUEBA ArrayList<Tensor<?>> values = (ArrayList<Tensor<?>>) sess.runner().fetch(\"W/read\").fetch(\"b/read\").fetch(\"y/output\").run();\n\n Wtest.setText(\"W_inicial: \"+(Float.toString(values.get(0).floatValue())));\n Btest.setText(\"b_inicial: \"+Float.toString(values.get(1).floatValue()));\n y_mejoras_w.add(((values.get(0).floatValue())));\n x_mejoras_w.add( \"\"+(0+ num_epoch*num));\n\n y_mejoras_b.add(((values.get(1).floatValue())));\n x_mejoras_b.add( \"\"+(0+ num_epoch*num));\n\n ///\n\n // Y.setText(Float.toString(values.get(1).floatValue()));\n\n return output; ///mal\n }", "public Trainer(double[][] data, double[] attribute, int hiddenLayerNodeCount, int outputLayerNodeCount){\r\n this.data = data;\r\n this.attribute = attribute;\r\n hiddenLayer = new Node[hiddenLayerNodeCount];\r\n outputLayer = new Node[outputLayerNodeCount];\r\n activation = new double[hiddenLayerNodeCount];\r\n desireHiddenLayerActivation = new double[hiddenLayerNodeCount];\r\n for (int i = 0; i < hiddenLayerNodeCount; i++) {\r\n hiddenLayer[i] = new Node(0.5, data[0].length - 1);\r\n }\r\n for (int i = 0; i < outputLayerNodeCount; i++) {\r\n outputLayer[i] = new Node(0.5, activation.length);\r\n }\r\n }", "public static double[] convertToDouble(JPEGCategory input) {\n\n\t\tdouble[] values = new double[input.getRunlength() + 1];\n\t\tfor (int i = 0; i < input.getRunlength(); i++) {\n\t\t\tvalues[i] = 0;\n\t\t}\n\t\tif (values.length > 1)\n\t\t\tvalues[values.length - 1] = input.getCoeff();\n\t\telse\n\t\t\tvalues[0] = input.getCoeff();\n\t\treturn values;\n\t}" ]
[ "0.5395414", "0.53691596", "0.5281515", "0.5275208", "0.5170026", "0.516202", "0.5097144", "0.5074413", "0.50641173", "0.49519697", "0.4950434", "0.49423265", "0.49206528", "0.49158964", "0.4908247", "0.49034214", "0.48854083", "0.48595974", "0.48534662", "0.48406473", "0.4825903", "0.48187566", "0.48110574", "0.48019835", "0.47886047", "0.4786684", "0.4781669", "0.47361493", "0.47247526", "0.46993935", "0.46940893", "0.46894857", "0.46852607", "0.468456", "0.4670877", "0.4667461", "0.46597725", "0.4659341", "0.46415806", "0.46376613", "0.46297225", "0.46140572", "0.45665175", "0.4565729", "0.45639837", "0.4560232", "0.45585647", "0.45432425", "0.45406264", "0.45362198", "0.45336783", "0.4522739", "0.45216888", "0.45181435", "0.45103472", "0.45017695", "0.4493524", "0.44876838", "0.44859672", "0.44824398", "0.4477595", "0.44770592", "0.44646972", "0.4463901", "0.44489992", "0.44386008", "0.44378185", "0.4435127", "0.4432184", "0.44228756", "0.4414894", "0.44148552", "0.4414515", "0.44139928", "0.44077736", "0.44045138", "0.440385", "0.44033867", "0.44022194", "0.43999067", "0.43843", "0.43833417", "0.4380812", "0.4380352", "0.43749893", "0.43727535", "0.43630442", "0.43621832", "0.43511596", "0.43511367", "0.43505314", "0.43477473", "0.43472466", "0.43459338", "0.43451658", "0.43364713", "0.4336386", "0.43336973", "0.4329383", "0.43261018", "0.43252182" ]
0.0
-1
construct from FCNBase + double[] for parameters and MnUserCovariance with default strategy
public MnScan(FCNBase fcn, double[] par, MnUserCovariance cov) { this(fcn, par, cov, DEFAULT_STRATEGY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void useCovarianceMatrix(){\n this.covRhoOption = true;\n }", "public abstract double covariance(double x1, double x2);", "public MultivariateGaussianDM() {\n\t}", "private static native void covarianceEstimation_0(long src_nativeObj, long dst_nativeObj, int windowRows, int windowCols);", "@Override\n\tpublic Alg newInstance() {\n\t\treturn new BnetDistributedCF();\n\t}", "private DigitalNetBase2 initNetVar (boolean shiftFlag) {\n DigitalNetBase2 net = new DigitalNetBase2 ();\n if (shiftFlag)\n net.dim = dim + 1;\n else\n net.dim = dim;\n net.numPoints = numPoints;\n net.numCols = numCols;\n net.numRows = numRows;\n net.outDigits = outDigits;\n net.normFactor = normFactor;\n net.factor = new double[outDigits];\n net.genMat = new int[net.dim * numCols];\n net.shiftStream = shiftStream;\n net.capacityShift = capacityShift;\n net.dimShift = dimShift;\n net.digitalShift = copyDigitalShift (digitalShift);\n if (shiftFlag && shiftStream != null) {\n net.addRandomShift (dimShift, dimShift + 1, shiftStream);\n }\n return net;\n }", "public FunctionJet2Adapter(int baseDimension) \n {\n super(baseDimension); \n hessian = new double[baseDimension];\n }", "ParameterRefinement createParameterRefinement();", "@Override\n protected void calculateCategoryRates(Node node) {\n\n double propVariable = 1.0;\n int cat = 0;\n\n //if (/*invarParameter != null && */invarParameter.getValue() > 0 ) {\n //System.out.println(\"----------------\");\n double pr;\n if(invPrLogit){\n pr = 1.0/(1.0 + Math.exp(-invarParameter.getValue()));\n //System.out.println(pr);\n }else{\n pr = invarParameter.getValue();\n }\n\n if (hasPropInvariantCategory) {\n categoryRates[0] = 0.0;\n //System.out.println(getCurrModel()+\" \"+INVAR_INDEX);\n categoryProportions[0] = pr*INDICATORS[getCurrModel()][INVAR_INDEX];\n //System.out.println(invarParameter.getValue()+\" \"+INDICATORS[getCurrModel()][INVAR_INDEX]);\n //System.out.println(\"categoryProportions[0]: \"+categoryProportions[0]);\n }\n\n //System.out.println(invarParameter.getID()+\" \" +invarParameter.getValue()+\" \"+pr);\n propVariable = 1.0 - pr*INDICATORS[getCurrModel()][INVAR_INDEX];\n if (hasPropInvariantCategory) {\n cat = 1;\n }\n //}\n\n //System.out.println(\"categoryProportions[0]: \"+categoryProportions[0]);\n\n if (INDICATORS[getCurrModel()][SHAPE_INDEX] == PRESENT) {\n\n final double a = shapeParameter.getValue();\n double mean = 0.0;\n final int gammaCatCount = categoryCount - cat;\n //System.out.println(\"a: \"+a);\n final GammaDistribution g = new GammaDistributionImpl(a, 1.0 / a);\n //System.out.println(\"gammaCatCount:\"+gammaCatCount);\n //if(gammaCatCount == 3){\n //throw new RuntimeException(\"\");\n //}\n for (int i = 0; i < gammaCatCount; i++) {\n try {\n // RRB: alternative implementation that seems equally good in\n // the first 5 significant digits, but uses a standard distribution object\n if(a < 1e-3){\n\n categoryRates[i + cat] = Double.NEGATIVE_INFINITY;\n }else if(a > 1e10){\n categoryRates[i + cat] = 1.0;\n }else if (useBeast1StyleGamma) {\n categoryRates[i + cat] = GammaDistributionQuantile((2.0 * i + 1.0) / (2.0 * gammaCatCount), a, 1.0 / a);\n \t} else {\n \t\tcategoryRates[i + cat] = g.inverseCumulativeProbability((2.0 * i + 1.0) / (2.0 * gammaCatCount));\n \t}\n\n } catch (Exception e) {\n e.printStackTrace();\n System.err.println(\"Something went wrong with the gamma distribution calculation\");\n System.exit(-1);\n }\n mean += categoryRates[i + cat];\n\n categoryProportions[i + cat] = propVariable / gammaCatCount;\n }\n\n if(a >= 1e-3 ){\n\n mean = (propVariable * mean) / gammaCatCount;\n\n for (int i = 0; i < gammaCatCount; i++) {\n\n categoryRates[i + cat] /= mean;\n\n }\n }\n } else {\n\n int gammaCatCount = categoryCount - cat;\n //System.out.println(\"Hi!\");\n for(int i = cat; i < categoryRates.length;i++){\n categoryRates[i] = 1.0 / propVariable/gammaCatCount;\n\n categoryProportions[i] = propVariable/gammaCatCount;\n }\n }\n /*System.out.println(\"-------------------------------\");\n System.out.println(\"ID: \"+getID());\n System.out.println(modelChoice);\n System.out.print (invarParameter.getValue()*INDICATORS[getCurrModel()][INVAR_INDEX]+\" \");\n System.out.println(getID());\n System.out.println(\"alpha: \"+shapeParameter.getValue());\n System.out.println(\"invPr: \"+invarParameter.getValue());\n System.out.println(\"siteModel: \"+modelChoice.getValue());\n System.out.println(\"rate: \"+muParameter.getValue());\n for(int i = 0; i < categoryRates.length;i++){\n System.out.print(categoryRates[i]+\" \");\n }\n System.out.println();\n\n System.out.println(invarParameter.getValue());\n for(int i = 0; i < categoryProportions.length;i++){\n\n System.out.print(categoryProportions[i]+\" \");\n }\n System.out.println();\n System.out.println(\"----------------\"); */\n\n\n ratesKnown = true;\n }", "@Test\n public void testBuildGraph_FactorArr() {\n // And now factors\n CostFunction[] factors = new CostFunction[]{\n factory.buildCostFunction( new Variable[]{v[0],v[1]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[1]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[1]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[2]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[2]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[3]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[4]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[1],v[2]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[1],v[3]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[3],v[4]}, 0 ),\n };\n\n MCS mcs = new MCS(Arrays.asList(factors));\n UPFactory f = new GdlFactory();\n UPGraph result = JunctionTreeAlgo.buildGraph(f, mcs.getFactorDistribution(), mcs.getAdjacency());\n System.out.println(result);\n }", "public static void testMultimensionalOutput() {\n\t\tint vectSize = 8;\n\t\tint outputsPerInput = 10;\n\t\tdouble repeatProb = 0.8;\n\t\tdouble inpRemovalPct = 0.8;\n\t\tCollection<DataPoint> data = createMultidimensionalCorrSamples(vectSize, outputsPerInput, inpRemovalPct);\n//\t\tCollection<DataPoint> data = createMultidimensionalSamples(vectSize, outputsPerInput, repeatProb);\n\n\t\tModelLearner modeler = createModelLearner(vectSize, data);\n\t\tint numRuns = 100;\n\t\tint jointAdjustments = 18;\n\t\tdouble skewFactor = 0;\n\t\tdouble cutoffProb = 0.1;\n\t\tDecisionProcess decisioner = new DecisionProcess(modeler, null, 1, numRuns,\n\t\t\t\t0, skewFactor, 0, cutoffProb);\n\t\tDecisionProcess decisionerJ = new DecisionProcess(modeler, null, 1, numRuns,\n\t\t\t\tjointAdjustments, skewFactor, 0, cutoffProb);\n\t\t\n\t\tSet<DiscreteState> inputs = getInputSetFromSamples(data);\n\t\tArrayList<Double> realV = new ArrayList<Double>();\n\t\tArrayList<Double> predV = new ArrayList<Double>();\n\t\tArrayList<Double> predJV = new ArrayList<Double>();\n\t\tfor (DiscreteState input : inputs) {\n\t\t\tSystem.out.println(\"S\" + input);\n\t\t\tMap<DiscreteState, Double> outProbs = getRealOutputProbsForInput(input, data);\n\t\t\tMap<DiscreteState,Double> preds = countToFreqMap(decisioner\n\t\t\t\t\t.getImmediateStateGraphForActionGibbs(input.getRawState(), new double[] {}));\n\t\t\tMap<DiscreteState,Double> predsJ = countToFreqMap(decisionerJ\n\t\t\t\t\t.getImmediateStateGraphForActionGibbs(input.getRawState(), new double[] {}));\n\t\t\tSet<DiscreteState> outputs = new HashSet<DiscreteState>();\n\t\t\toutputs.addAll(outProbs.keySet());\n\t\t\toutputs.addAll(preds.keySet());\n\t\t\toutputs.addAll(predsJ.keySet());\n\t\t\tfor (DiscreteState output : outputs) {\n\t\t\t\tDouble realD = outProbs.get(output);\n\t\t\t\tDouble predD = preds.get(output);\n\t\t\t\tDouble predJD = predsJ.get(output);\n\t\t\t\tdouble real = (realD != null ? realD : 0);\n\t\t\t\tdouble pred = (predD != null ? predD : 0);\n\t\t\t\tdouble predJ = (predJD != null ? predJD : 0);\n\t\t\t\trealV.add(real);\n\t\t\t\tpredV.add(pred);\n\t\t\t\tpredJV.add(predJ);\n\t\t\t\tSystem.out.println(\"\tS'\" + output + \"\t\" + real + \"\t\" + pred + \"\t\" + predJ);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"CORR:\t\" + Utils.correlation(realV, predV)\n\t\t\t\t+ \"\t\" + Utils.correlation(realV, predJV));\n\t}", "public abstract void build(ClassifierData<U> inputData);", "NNImpl(ArrayList<Instance> trainingSet, int hiddenNodeCount, Double learningRate, int maxEpoch, Random random, Double[][] hiddenWeights, Double[][] outputWeights) {\r\n this.trainingSet = trainingSet;\r\n this.learningRate = learningRate;\r\n this.maxEpoch = maxEpoch;\r\n this.random = random;\r\n\r\n //input layer nodes\r\n inputNodes = new ArrayList<>();\r\n int inputNodeCount = trainingSet.get(0).attributes.size();\r\n int outputNodeCount = trainingSet.get(0).classValues.size();\r\n for (int i = 0; i < inputNodeCount; i++) {\r\n Node node = new Node(0);\r\n inputNodes.add(node);\r\n }\r\n\r\n //bias node from input layer to hidden\r\n Node biasToHidden = new Node(1);\r\n inputNodes.add(biasToHidden);\r\n\r\n //hidden layer nodes\r\n hiddenNodes = new ArrayList<>();\r\n for (int i = 0; i < hiddenNodeCount; i++) {\r\n Node node = new Node(2);\r\n //Connecting hidden layer nodes with input layer nodes\r\n for (int j = 0; j < inputNodes.size(); j++) {\r\n NodeWeightPair nwp = new NodeWeightPair(inputNodes.get(j), hiddenWeights[i][j]);\r\n node.parents.add(nwp);\r\n }\r\n hiddenNodes.add(node);\r\n }\r\n\r\n //bias node from hidden layer to output\r\n Node biasToOutput = new Node(3);\r\n hiddenNodes.add(biasToOutput);\r\n\r\n //Output node layer\r\n outputNodes = new ArrayList<>();\r\n for (int i = 0; i < outputNodeCount; i++) {\r\n Node node = new Node(4);\r\n //Connecting output layer nodes with hidden layer nodes\r\n for (int j = 0; j < hiddenNodes.size(); j++) {\r\n NodeWeightPair nwp = new NodeWeightPair(hiddenNodes.get(j), outputWeights[i][j]);\r\n node.parents.add(nwp);\r\n }\r\n outputNodes.add(node);\r\n }\r\n }", "void backpropagate(float[] inputs, float... targets);", "public NNImpl(ArrayList<Instance> trainingSet, int hiddenNodeCount, Double learningRate, int maxEpoch, Double [][]hiddenWeights, Double[] outputWeights)\r\n\t{\r\n\t\tthis.trainingSet=trainingSet;\r\n\t\tthis.learningRate=learningRate;\r\n\t\tthis.maxEpoch=maxEpoch;\r\n\r\n\t\t//input layer nodes\r\n\t\tinputNodes=new ArrayList<Node>();\r\n\t\tint inputNodeCount=trainingSet.get(0).attributes.size();\r\n\t\tint outputNodeCount=1;\r\n\t\tfor(int i=0;i<inputNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(0);\r\n\t\t\tinputNodes.add(node);\r\n\t\t}\r\n\r\n\t\t//bias node from input layer to hidden\r\n\t\tNode biasToHidden=new Node(1);\r\n\t\tinputNodes.add(biasToHidden);\r\n\r\n\t\t//hidden layer nodes\r\n\t\thiddenNodes=new ArrayList<Node> ();\r\n\t\tfor(int i=0;i<hiddenNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(2);\r\n\t\t\t//Connecting hidden layer nodes with input layer nodes\r\n\t\t\tfor(int j=0;j<inputNodes.size();j++)\r\n\t\t\t{\r\n\t\t\t\tNodeWeightPair nwp=new NodeWeightPair(inputNodes.get(j),hiddenWeights[i][j]);\r\n\t\t\t\tnode.parents.add(nwp);\r\n\t\t\t}\r\n\t\t\thiddenNodes.add(node);\r\n\t\t}\r\n\r\n\t\t//bias node from hidden layer to output\r\n\t\tNode biasToOutput=new Node(3);\r\n\t\thiddenNodes.add(biasToOutput);\r\n\r\n\r\n\r\n\t\tNode node=new Node(4);\r\n\t\t//Connecting output node with hidden layer nodes\r\n\t\tfor(int j=0;j<hiddenNodes.size();j++)\r\n\t\t{\r\n\t\t\tNodeWeightPair nwp=new NodeWeightPair(hiddenNodes.get(j), outputWeights[j]);\r\n\t\t\tnode.parents.add(nwp);\r\n\t\t}\t\r\n\t\toutputNode = node;\r\n\r\n\t}", "public BestMeanConvergence() {\n }", "public void backprop(double[] inputs, FeedForwardNeuralNetwork net, boolean verbose)\n {\n //create variables that will be used later\n int[] sizes = net.getSizes();\n int biggestSize = 0;\n for(int k = 0; k < sizes.length; k++)\n {\n if(sizes[k] > biggestSize)\n {\n biggestSize = sizes[k];\n }\n }\n int hiddenLayers = sizes.length - 2;\n //if input or output wrong size, return\n if(inputs.length != sizes[0])\n {\n System.out.println(\"Invalid number of inputs\");\n return;\n }\n\n double[][] allOutputs = new double[sizes.length][biggestSize];\n double[][] allErrors = new double[sizes.length][biggestSize];\n\n //fill out first layer to temp output\n int lastLayer = sizes[0];\n for(int k = 0; k < lastLayer; k++)\n {\n allOutputs[0][k] = inputs[k];\n }\n\n //for each layer after the input\n for(int k = 1; k < hiddenLayers + 2; k++)\n {\n //for each node in that layer\n for(int a = 0; a < sizes[k]; a++)\n {\n //get sum and get activation function result and its derivative\n double sum = 0;\n for(int t = 0; t < lastLayer; t++)\n {\n sum += allOutputs[k - 1][t] * net.getWeight(k - 1, t, k, a);\n }\n sum += net.getBiasNum() * net.getWeight(-1, 0, k, a);\n if(k != hiddenLayers + 1)\n {\n allOutputs[k][a] = net.applyActivationFunction(sum, net.getHiddenActivationFunction());\n allErrors[k][a] = net.applyActivationFunctionDerivative(sum, net.getHiddenActivationFunction());\n }\n else\n {\n allOutputs[k][a] = net.applyActivationFunction(sum, net.getOutputActivationFunction());\n allErrors[k][a] = net.applyActivationFunctionDerivative(sum, net.getOutputActivationFunction());\n }\n }\n lastLayer = sizes[k];\n }\n\n if(verbose)\n {\n System.out.println(\"Outputs\");\n for(int k = 0; k < maxClusters; k++)\n {\n System.out.print(allOutputs[hiddenLayers + 1][k] + \", \");\n }\n System.out.println();\n }\n double[] expectedOutputs = new double[maxClusters];\n int cluster = 0;\n double max = 0;\n for(int k = 0; k < maxClusters; k++)\n {\n expectedOutputs[k] = allOutputs[hiddenLayers + 1][k];\n if(allOutputs[hiddenLayers + 1][k] > max)\n {\n cluster = k;\n max = allOutputs[hiddenLayers + 1][k];\n }\n }\n if(verbose)\n {\n System.out.println(\"Output \" + cluster + \" will be set to max value\");\n System.out.println();\n }\n\n expectedOutputs[cluster] = 4;\n\n\n //go backward from output to first hidden layer\n for(int k = hiddenLayers + 1; k > 0; k--)\n {\n //for each node in that layer\n for(int a = 0; a < sizes[k]; a++)\n {\n //compute error for not output layer\n if(k != hiddenLayers + 1)\n {\n double temp = allErrors[k][a];\n allErrors[k][a] = 0;\n for(int t = 0; t < sizes[k + 1]; t++)\n {\n allErrors[k][a] += net.getWeight(k, t, k + 1, a) * allErrors[k + 1][t];\n }\n allErrors[k][a] *= temp;\n }\n //compute error for output layer\n else\n {\n allErrors[k][a] *= (expectedOutputs[a] - allOutputs[k][a]);\n }\n\n //for each weight node takes as input\n for(int t = 0; t < sizes[k - 1]; t++)\n {\n //find the delta for the weight and apply\n int index = net.getIndex(k - 1, t, k, a);\n double delta = learningRate * allOutputs[k - 1][t] * allErrors[k][a]\n + momentum * lastDeltas[index];\n\n net.setWeight(k - 1, t, k, a, net.getWeight(k - 1, t, k, a) + delta);\n lastDeltas[index] = delta;\n }\n }\n }\n }", "public Driver(){\n\t\tthis.D = Parameters.numberOfDocuments;\n\t\tthis.K = Parameters.numberOfTopics;\n\t\tthis.V = Parameters.sizeOfVocabulary;\n\n\t\tthis.oldAlpha = new double[this.K];\n\t\tthis.newAlpha = new double[this.K];\n\t\tthis.hessian = new double[this.K][this.K];\n\t\tthis.gradient = new double[this.K];\n\t}", "public NNImpl(ArrayList<Instance> trainingSet, int hiddenNodeCount, Double learningRate, int maxEpoch, Double [][]hiddenWeights, Double[][] outputWeights)\r\n\t{\r\n\t\tthis.trainingSet=trainingSet;\r\n\t\tthis.learningRate=learningRate;\r\n\t\tthis.maxEpoch=maxEpoch;\r\n\r\n\t\t//input layer nodes\r\n\t\tinputNodes=new ArrayList<Node>();\r\n\t\tint inputNodeCount=trainingSet.get(0).attributes.size();\r\n\t\tint outputNodeCount=trainingSet.get(0).classValues.size();\r\n\t\tfor(int i=0;i<inputNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(0);\r\n\t\t\tinputNodes.add(node);\r\n\t\t}\r\n\r\n\t\t//bias node from input layer to hidden\r\n\t\tNode biasToHidden=new Node(1);\r\n\t\tinputNodes.add(biasToHidden);\r\n\r\n\t\t//hidden layer nodes\r\n\t\thiddenNodes=new ArrayList<Node> ();\r\n\t\tfor(int i=0;i<hiddenNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(2);\r\n\t\t\t//Connecting hidden layer nodes with input layer nodes\r\n\t\t\tfor(int j=0;j<inputNodes.size();j++)\r\n\t\t\t{\r\n\t\t\t\tNodeWeightPair nwp=new NodeWeightPair(inputNodes.get(j),hiddenWeights[i][j]);\r\n\t\t\t\tnode.parents.add(nwp);\r\n\t\t\t}\r\n\t\t\thiddenNodes.add(node);\r\n\t\t}\r\n\r\n\t\t//bias node from hidden layer to output\r\n\t\tNode biasToOutput=new Node(3);\r\n\t\thiddenNodes.add(biasToOutput);\r\n\r\n\t\t//Output node layer\r\n\t\toutputNodes=new ArrayList<Node> ();\r\n\t\tfor(int i=0;i<outputNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(4);\r\n\t\t\t//Connecting output layer nodes with hidden layer nodes\r\n\t\t\tfor(int j=0;j<hiddenNodes.size();j++)\r\n\t\t\t{\r\n\t\t\t\tNodeWeightPair nwp=new NodeWeightPair(hiddenNodes.get(j), outputWeights[i][j]);\r\n\t\t\t\tnode.parents.add(nwp);\r\n\t\t\t}\t\r\n\t\t\toutputNodes.add(node);\r\n\t\t}\t\r\n\t}", "@Override\n\tpublic Parameter[] getParameters() {\n\t\treturn new Parameter[] { weight, tolerance, svmType, kernelType, kernelDegree, kernelGamma, kernelCoefficient, parameterC,\n\t\t\t\tparameterNu };\n\t}", "@Override\n\tprotected void initClassifierParameters() {\n\t\tlinearKernel = new SelectedParameterItem(\"Linear kernel\", \"-K 0\");\n\t\tpolynomialKernel = new SelectedParameterItem(\"Polynomial kernel\", \"-K 1\");\n\t\tradialBasisKernel = new SelectedParameterItem(\"Radial basis kernel\", \"-K 2\");\n\t\tsigmoidKernel = new SelectedParameterItem(\"Sigmoid kernel\", \"-K 3\");\n\t\tcSVC = new SelectedParameterItem(\"C-SVC\", \"-S 0\");\n\t\tnuSVC = new SelectedParameterItem(\"&nu;-SVC\", \"-S 1\");\n\t\tsvmType = ParameterUtilities.createSelectedParameter(\"SVM type\", cSVC, nuSVC);\n\t\tkernelType = ParameterUtilities.createSelectedParameter(\"Kernel type\", linearKernel, polynomialKernel, radialBasisKernel,\n\t\t\t\tsigmoidKernel);\n\t\tkernelDegree = new Parameter(3, \"Degree in kernel function\", Parameter.TYPE.INTEGER, \"-D\", \"classifier.degree\");\n\t\tkernelGamma = new Parameter(0.5, \"&gamma; in kernel function\", Parameter.TYPE.DOUBLE, \"-G\", \"classifier.gamma\");\n\t\tkernelCoefficient = new Parameter(0.0, \"Coefficient in kernel function\", Parameter.TYPE.DOUBLE, \"-R\", \"classifier.coef0\");\n\t\tparameterC = new Parameter(1.0, \"Parameter C\", Parameter.TYPE.DOUBLE, \"-C\", \"classifier.cost\");\n\t\tparameterNu = new Parameter(0.5, \"Parameter &nu;\", Parameter.TYPE.DOUBLE, \"-N\", \"classifier.nu\");\n\t\ttolerance = new Parameter(0.001, \"Tolerance of termination criterion\", Parameter.TYPE.DOUBLE, \"-E\");\n\t\tweight = new Parameter(null, \"Weight, set C of class i to (weight &times; C)\", Parameter.TYPE.STRING, \"-W\");\n\t}", "float[] feedForward(float... inputs);", "@Test\n public void addModelData() {\n new FactoryInitializer()\n .initialize(\n ((tr, ev, is, np, md) -> new ResNetConv2DFactory(tr,ev,is,np,md).addModelData(new ArrayList<>()))\n );\n }", "@Override\r\n public void init(NegotiationSession negotiationSession, Map<String, Double> parameters) {\r\n super.init(negotiationSession, parameters);\r\n this.negotiationSession = negotiationSession;\r\n if (parameters != null && parameters.get(\"l\") != null) {\r\n learnCoef = parameters.get(\"l\");\r\n } else {\r\n learnCoef = 0.2;\r\n }\r\n learnValueAddition = 1;\r\n initializeModel();\r\n }", "public FFANNAdaptiveBackPropagationJSP()\n\t{\n\t\t//run(network, numberInputNeurons, numberHiddenNeurons, numberOutputNeurons, trainingSet);\n\t}", "public TwoClassConfusionMatrix() {\n\t}", "static Nda<Float> of( float... value ) { return Tensor.of( Float.class, Shape.of( value.length ), value ); }", "MixtureOfExperts(int nExperts){\r\n\t\twritePosteriorThreshold = 0.0;\r\n\t\testimationPosteriorThreshold = 0.0;\r\n\t\tnumberOfExperts = nExperts;\r\n\t\tlogProbOfCluster = new float[numberOfExperts];\r\n numberOfUsers = 0;\r\n \r\n\t}", "@Override\n public void train() {\n actual = observations.toArray();\n min_val_error = Double.MAX_VALUE;\n if (findDecayConstant)\n for (float alpha = 0f; alpha <= 1f; alpha += 0.01f)\n initializeAndTrainModel(alpha);\n else\n initializeAndTrainModel(optAlpha);\n }", "public CvSVM(Mat trainData, Mat responses, Mat varIdx, Mat sampleIdx, CvSVMParams params)\r\n {\r\n\r\n super( CvSVM_1(trainData.nativeObj, responses.nativeObj, varIdx.nativeObj, sampleIdx.nativeObj, params.nativeObj) );\r\n\r\n return;\r\n }", "@Override\n\tpublic Parameter[] getGridSearchParameters() {\n\t\treturn new Parameter[] { kernelCoefficient, kernelDegree, kernelGamma, parameterC, parameterNu };\n\t}", "Conector createConector();", "public interface MultivariateDistribution extends Cloneable, Serializable {\n /**\n * Computes the log of the probability density function. If the probability of\n * the input is zero, the log of zero would be {@link Double#NEGATIVE_INFINITY}.\n * Instead, -{@link Double#MAX_VALUE} is returned.\n *\n * @param x the array for the vector the get the log probability of\n * @return the log of the probability.\n * @throws ArithmeticException if the vector is not the correct length, or the\n * distribution has not yet been set\n */\n default public double logPdf(double... x) {\n return logPdf(DenseVector.toDenseVec(x));\n }\n\n /**\n * Computes the log of the probability density function. If the probability of\n * the input is zero, the log of zero would be {@link Double#NEGATIVE_INFINITY}.\n * Instead, -{@link Double#MAX_VALUE} is returned.\n *\n * @param x the vector the get the log probability of\n * @return the log of the probability.\n * @throws ArithmeticException if the vector is not the correct length, or the\n * distribution has not yet been set\n */\n public double logPdf(Vec x);\n\n /**\n * Returns the probability of a given vector from this distribution. By\n * definition, the probability will always be in the range [0, 1].\n *\n * @param x the array of the vector the get the log probability of\n * @return the probability\n * @throws ArithmeticException if the vector is not the correct length, or the\n * distribution has not yet been set\n */\n default public double pdf(double... x) {\n return pdf(DenseVector.toDenseVec(x));\n }\n\n /**\n * Returns the probability of a given vector from this distribution. By\n * definition, the probability will always be in the range [0, 1].\n *\n * @param x the vector the get the log probability of\n * @return the probability\n * @throws ArithmeticException if the vector is not the correct length, or the\n * distribution has not yet been set\n */\n default public double pdf(Vec x) {\n return Math.exp(logPdf(x));\n }\n\n /**\n * Sets the parameters of the distribution to attempt to fit the given list of\n * vectors. All vectors are assumed to have the same weight.\n *\n * @param <V> the vector type\n * @param dataSet the list of data points\n * @return <tt>true</tt> if the distribution was fit to the data, or\n * <tt>false</tt> if the distribution could not be fit to the data set.\n */\n default public <V extends Vec> boolean setUsingData(List<V> dataSet) {\n return setUsingData(dataSet, false);\n }\n\n /**\n * Sets the parameters of the distribution to attempt to fit the given list of\n * vectors. All vectors are assumed to have the same weight.\n *\n * @param <V> the vector type\n * @param dataSet the list of data points\n * @param parallel {@code true} if the training should be done using\n * multiple-cores, {@code false} for single threaded.\n * @return <tt>true</tt> if the distribution was fit to the data, or\n * <tt>false</tt> if the distribution could not be fit to the data set.\n */\n public <V extends Vec> boolean setUsingData(List<V> dataSet, boolean parallel);\n\n /**\n * Sets the parameters of the distribution to attempt to fit the given list of\n * data points. The {@link DataPoint#getWeight() weights} of the data points\n * will be used.\n *\n * @param dataPoints the list of data points to use\n * @return <tt>true</tt> if the distribution was fit to the data, or\n * <tt>false</tt> if the distribution could not be fit to the data set.\n */\n default public boolean setUsingDataList(List<DataPoint> dataPoints) {\n return setUsingData(dataPoints.stream().map(d -> d.getNumericalValues()).collect(Collectors.toList()));\n }\n\n /**\n * Sets the parameters of the distribution to attempt to fit the given list of\n * data points. The {@link DataPoint#getWeight() weights} of the data points\n * will be used.\n *\n * @param dataSet the data set to use\n * @return <tt>true</tt> if the distribution was fit to the data, or\n * <tt>false</tt> if the distribution could not be fit to the data set.\n */\n default public boolean setUsingData(DataSet dataSet) {\n return setUsingData(dataSet, false);\n }\n\n /**\n * Sets the parameters of the distribution to attempt to fit the given list of\n * data points. The {@link DataPoint#getWeight() weights} of the data points\n * will be used.\n *\n * @param dataSet the data set to use\n * @param parallel the source of threads for computation\n * @return <tt>true</tt> if the distribution was fit to the data, or\n * <tt>false</tt> if the distribution could not be fit to the data set.\n */\n default public boolean setUsingData(DataSet dataSet, boolean parallel) {\n return setUsingData(dataSet.getDataVectors(), parallel);\n }\n\n public MultivariateDistribution clone();\n\n /**\n * Performs sampling on the current distribution.\n *\n * @param count the number of iid samples to draw\n * @param rand the source of randomness\n * @return a list of sample vectors from this distribution\n */\n public List<Vec> sample(int count, Random rand);\n}", "@ParameterizedTest\n @MethodSource(\"org.nd4j.linalg.BaseNd4jTestWithBackends#configs\")\n public void testBatchNormBpNHWC(Nd4jBackend backend) {\n\n INDArray in = Nd4j.rand(DataType.FLOAT, 2, 4, 4, 3);\n INDArray eps = Nd4j.rand(DataType.FLOAT, in.shape());\n INDArray epsStrided = eps.permute(1,0,2,3).dup().permute(1,0,2,3);\n INDArray mean = Nd4j.rand(DataType.FLOAT, 3);\n INDArray var = Nd4j.rand(DataType.FLOAT, 3);\n INDArray gamma = Nd4j.rand(DataType.FLOAT, 3);\n INDArray beta = Nd4j.rand(DataType.FLOAT, 3);\n\n assertEquals(eps, epsStrided);\n\n INDArray out1eps = in.like().castTo(DataType.FLOAT);\n INDArray out1m = mean.like().castTo(DataType.FLOAT);\n INDArray out1v = var.like().castTo(DataType.FLOAT);\n\n INDArray out2eps = in.like().castTo(DataType.FLOAT);\n INDArray out2m = mean.like().castTo(DataType.FLOAT);\n INDArray out2v = var.like().castTo(DataType.FLOAT);\n\n DynamicCustomOp op1 = DynamicCustomOp.builder(\"batchnorm_bp\")\n .addInputs(in, mean, var, gamma, beta, eps)\n .addOutputs(out1eps, out1m, out1v)\n .addIntegerArguments(1, 1, 3)\n .addFloatingPointArguments(1e-5)\n .build();\n\n DynamicCustomOp op2 = DynamicCustomOp.builder(\"batchnorm_bp\")\n .addInputs(in, mean, var, gamma, beta, epsStrided)\n .addOutputs(out2eps, out2m, out2v)\n .addIntegerArguments(1, 1, 3)\n .addFloatingPointArguments(1e-5)\n .build();\n\n Nd4j.exec(op1);\n Nd4j.exec(op2);\n\n assertEquals(out1eps, out2eps); //Fails here\n assertEquals(out1m, out2m);\n assertEquals(out1v, out2v);\n }", "@Override\n\tpublic SparseVector getPosteriorPrecisions() {\n\t\treturn covariance.copyNew();\n\t}", "public DefaultInferenceParameters(CycAccess cycAccess) {\n this.cycAccess = cycAccess;\n }", "public BackPropagationLearningProcess(NeuralNetwork network) {\r\n\t\tsuper(network);\r\n\t}", "@Override\n /**\n * @param X The input vector. An array of doubles.\n * @return The value returned by th LUT or NN for this input vector\n */\n\n public double outputFor(double[] X) {\n int i = 0, j = 0;\n for(i=0;i<argNumInputs;i++){\n S[0][i] = X[i];\n NeuronCell[0][i] = X[i];\n }\n //then add the bias term\n S[0][argNumInputs] = 1;\n NeuronCell[0][argNumInputs] = customSigmoid(S[0][argNumInputs]);\n S[1][argNumHidden] = 1;\n NeuronCell[1][argNumHidden] = customSigmoid(S[1][argNumInputs]);\n\n for(i=0;i<argNumHidden;i++){\n for(j=0;j<=argNumInputs;j++){\n //Wji : weigth from j to i\n WeightSum+=NeuronCell[0][j]*Weight[0][j][i];\n }\n //Sj = sigma(Wji * Xi)\n S[1][i]=WeightSum;\n NeuronCell[1][i]=(customSigmoid(WeightSum));\n //reset weigthsum\n WeightSum=0;\n }\n\n for(i = 0; i < argNumOutputs; i++){\n for(j = 0;j <= argNumHidden;j++){\n WeightSum += NeuronCell[1][j] * Weight[1][j][i];\n }\n NeuronCell[2][i]=customSigmoid(WeightSum);\n S[2][i]=WeightSum;\n WeightSum=0;\n }\n //if we only return 1 double, it means we only have one output, so actually we can write return NeuronCell[2][0]\n return NeuronCell[2][0];\n }", "public abstract double initialize(double[][] rawData, int clusterCount);", "public void covariance_SET(float[] src, int pos)\n {\n for(int BYTE = 44, src_max = pos + 45; pos < src_max; pos++, BYTE += 4)\n set_bytes(Float.floatToIntBits(src[pos]) & -1L, 4, data, BYTE);\n }", "public AbstractConjugatePriorBayesianEstimator(\n BayesianParameter<ParameterType,ConditionalType,BeliefType> parameter )\n {\n super();\n this.setParameter(parameter);\n }", "@Override\n public double classifyInstance(Instance instance) throws Exception {\n\n\n\n int numAttributes = instance.numAttributes();\n int clsIndex = instance.classIndex();\n boolean hasClassAttribute = true;\n int numTestAtt = numAttributes -1;\n if (numAttributes == m_numOfInputNeutrons) {\n hasClassAttribute = false; // it means the test data doesn't has class attribute\n numTestAtt = numTestAtt+1;\n }\n\n for (int i = 0; i< numAttributes; i++){\n if (instance.attribute(i).isNumeric()){\n\n double max = m_normalization[0][i];\n double min = m_normalization[1][i];\n double normValue = 0 ;\n if (instance.value(i)<min) {\n normValue = 0;\n m_normalization[1][i] = instance.value(i); // reset the smallest value\n }else if(instance.value(i)> max){\n normValue = 1;\n m_normalization[0][i] = instance.value(i); // reset the biggest value\n }else {\n if (max == min ){\n if (max == 0){\n normValue = 0;\n }else {\n normValue = max/Math.abs(max);\n }\n }else {\n normValue = (instance.value(i) - min) / (max - min);\n }\n }\n instance.setValue(i, normValue);\n }\n }\n\n double[] testData = new double[numTestAtt];\n\n\n\n\n\n int index = 0 ;\n\n if (!hasClassAttribute){\n\n for (int i =0; i<numAttributes; i++) {\n testData[i] = instance.value(i);\n }\n }else {\n for (int i = 0; i < numAttributes; i++) {\n\n if (i != clsIndex) {\n\n testData[index] = instance.value(i);\n\n index++;\n }\n }\n }\n\n\n\n DenseMatrix prediction = new DenseMatrix(numTestAtt,1);\n for (int i = 0; i<numTestAtt; i++){\n prediction.set(i, 0, testData[i]);\n }\n\n DenseMatrix H_test = generateH(prediction,weightsOfInput,biases, 1);\n\n DenseMatrix H_test_T = new DenseMatrix(1, m_numHiddenNeurons);\n\n H_test.transpose(H_test_T);\n\n DenseMatrix output = new DenseMatrix(1, m_numOfOutputNeutrons);\n\n H_test_T.mult(weightsOfOutput, output);\n\n double result = 0;\n\n if (m_typeOfELM == 0) {\n double value = output.get(0,0);\n result = value*(m_normalization[0][classIndex]-m_normalization[1][classIndex])+m_normalization[1][classIndex];\n //result = value;\n if (m_debug == 1){\n System.out.print(result + \" \");\n }\n }else if (m_typeOfELM == 1){\n int indexMax = 0;\n double labelValue = output.get(0,0);\n\n if (m_debug == 1){\n System.out.println(\"Each instance output neuron result (after activation)\");\n }\n for (int i =0; i< m_numOfOutputNeutrons; i++){\n if (m_debug == 1){\n System.out.print(output.get(0,i) + \" \");\n }\n if (output.get(0,i) > labelValue){\n labelValue = output.get(0,i);\n indexMax = i;\n }\n }\n if (m_debug == 1){\n\n System.out.println(\"//\");\n System.out.println(indexMax);\n }\n result = indexMax;\n }\n\n\n\n return result;\n\n\n }", "MatrixParameter createMatrixParameter();", "private double[][] getCov (double[][] in) {\n\t\treturn StatisticSample.covariance(in);\n\t}", "public RandomSubVectorThresholdLearnerTest(\n String testName)\n {\n super(testName);\n\n this.random = new Random();\n }", "public double[][] getCovarianceMatrix() {\r\n\t\treturn covar;\r\n\t}", "public void update(\n final DiagonalConfidenceWeightedBinaryCategorizer target,\n final Vector input,\n final boolean label)\n {\n // Get the mean and variance of the thing we will learn, which are\n // the parameters we will update.\n final Vector mean;\n final Vector variance;\n if (!target.isInitialized())\n {\n // Initialize the mean to zero and the variance to the default value\n // that we were given.\n final int dimensionality = input.getDimensionality();\n mean = VectorFactory.getDenseDefault().createVector(dimensionality);\n variance = VectorFactory.getDenseDefault().createVector(\n dimensionality, this.getDefaultVariance());\n\n target.setMean(mean);\n target.setVariance(variance);\n }\n else\n {\n mean = target.getMean();\n variance = target.getVariance();\n }\n\n // Figure out the predicted and actual (yi) values.\n final double predicted = input.dotProduct(mean);\n final double actual = label ? +1.0 : -1.0;\n\n // Now compute the margin (Mi).\n final double margin = actual * predicted;\n\n // Now compute the margin variance by multiplying the variance by\n // the input. In the paper this is Sigma * x. We keep track of this\n // vector since it will be useful when computing the update.\n final Vector varianceTimesInput = input.dotTimes(variance);\n\n // Now get the margin variance (Vi).\n final double marginVariance = input.dotProduct(varianceTimesInput);\n\n// TODO: Cache repeated multiplications.\n// --jbasilico (2011-12-03)\n final double m = margin;\n final double v = marginVariance;\n\n if (v == 0.0 || m > phi * Math.sqrt(v))\n {\n return;\n }\n\n double alpha = (-m * psi\n + Math.sqrt(m * m * Math.pow(phi, 4) / 4.0\n + v * phi * phi * epsilon))\n / (v * epsilon);\n alpha = Math.max(alpha, 0.0);\n if (alpha <= 0.0)\n {\n return;\n }\n double u = 0.25 *\n Math.pow(-alpha * v * phi\n + Math.sqrt(alpha * alpha * v * v * phi * phi + 4.0 * v), 2);\n double beta = alpha * phi / (Math.sqrt(u) + v * alpha * phi);\n\n // Compute the new mean.\n final Vector meanUpdate = varianceTimesInput.scale(actual * alpha);\n mean.plusEquals(meanUpdate);\n\n final Matrix varianceInverseUpdate =\n MatrixFactory.getDiagonalDefault().createDiagonal(\n input.dotTimes(input));\n varianceInverseUpdate.scaleEquals(\n beta);\n //alpha * phi * Math.pow(u, -0.5));\n final Matrix varianceInverse = target.getCovariance().inverse();\n varianceInverse.plusEquals(varianceInverseUpdate);\n final Matrix covariance = varianceInverse.inverse();\n for (int i = 0; i < variance.getDimensionality(); i++)\n {\n variance.setElement(i, covariance.getElement(i, i));\n }\n\n // Set the mean and variance.\n target.setMean(mean);\n target.setVariance(variance);\n }", "public ColumnColorVarietyStrategyBuilder(){\n super();\n ObjectiveCardStrategy ccvs = new ColumnColorVarietyStrategy();\n this.setStrategy(ccvs);\n this.setToBeCompared(\"ColumnColorVarietyStrategy\");\n }", "public void initLayers() {\n\t\t/* Initialise the weights */\n\t Random rng = new Random(1);\n double distributeRandom = 1.0 / SIZE_INPUT_LAYER;\n\t\tweightsOfHiddenLayer = new double[SIZE_HIDDEN_LAYER][SIZE_INPUT_LAYER]; \n\t\tweightsOfOutputLayer = new double[SIZE_OUTPUT_LAYER][SIZE_HIDDEN_LAYER]; \n\t\t/* Initialise the biases */\n\t\tbiasOfHiddenLayer = new double[SIZE_HIDDEN_LAYER];\n\t\tbiasOfOutputLayer = new double[SIZE_OUTPUT_LAYER];\t\t\n\t\tfor(int i = 0; i < SIZE_HIDDEN_LAYER; i++) {\n\t\t\tfor(int j = 0; j < SIZE_INPUT_LAYER; j++) {\n\t\t\t\tweightsOfHiddenLayer[i][j] = rng.nextDouble() * (distributeRandom - (-distributeRandom)) + (-distributeRandom);\n\t\t\t}\n\t\t}\n\t\tfor(int i = 0; i < SIZE_OUTPUT_LAYER; i++) {\n\t\t\tfor(int j = 0; j < SIZE_HIDDEN_LAYER; j++) {\n\t\t\t\tweightsOfOutputLayer[i][j] = rng.nextDouble() * (distributeRandom - (-distributeRandom)) + (-distributeRandom);\n\t\t\t}\n\t\t}\n\t}", "public BackPropagationNeural_3H(int size_in,int size_hidden1,int size_hidden2,int size_hidden3,int size_output){\n\t\tthis.size_in = size_in;\n\t\tthis.size_hidden1 = size_hidden1;\n\t\tthis.size_hidden2 = size_hidden2;\n\t\tthis.size_hidden3 = size_hidden3;\n\t\tthis.size_output = size_output;\n\t\t\n\t\tinputs = new float[size_in];\n\t\thidden1 = new float[size_hidden1];\n\t\thidden2 = new float[size_hidden2];\n\t\thidden3 = new float[size_hidden3];\n\t\toutput = new float[size_output];\n\t\t\n\t\tweight1 = new float[size_in][size_hidden1];\n\t\tweight2 = new float[size_hidden1][size_hidden2];\n\t\tweight3 = new float[size_hidden2][size_hidden3];\n\t\tweight4 = new float[size_hidden3][size_output];\n\t\t\n\t\tW1_last_delta = new float[size_in][size_hidden1];\n W2_last_delta = new float[size_hidden1][size_hidden2];\n W3_last_delta = new float[size_hidden2][size_hidden3];\n W4_last_delta = new float[size_hidden3][size_output];\n \n\t\trandomizeWeights();\n\t\toutput_error = new float[size_output];\n\t\thidden1_error = new float[size_hidden1];\n\t\thidden2_error = new float[size_hidden2];\n\t\thidden3_error = new float[size_hidden3];\n\t}", "@Test\n public void testBuildGraph_FactorArr_booleanArrArr() {\n\n char[][] adjacency = new char[][]{\n {0, 0, 0, 0, 0, 0, 0, 1, 0, 0},\n {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},\n {0, 1, 0, 0, 0, 0, 0, 0, 0, 0},\n {0, 0, 1, 0, 0, 0, 0, 0, 0, 0},\n {0, 0, 0, 1, 0, 0, 0, 0, 0, 0},\n {0, 0, 0, 0, 0, 0, 1, 0, 0, 0},\n {1, 0, 0, 0, 0, 0, 0, 0, 0, 0},\n {0, 0, 0, 0, 1, 0, 0, 0, 0, 0},\n {0, 0, 0, 0, 0, 1, 0, 0, 0, 0},\n {0, 0, 0, 0, 0, 0, 0, 0, 1, 0},\n };\n\n CostFunction[][] factors = new CostFunction[][]{\n {factory.buildCostFunction( new Variable[]{v[0],v[7]}, 0 )},\n {},\n {factory.buildCostFunction( new Variable[]{v[1],v[2]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[2],v[3]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[3],v[4]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[1],v[3],v[4]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[1],v[5]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[2],v[6]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[1],v[6],v[7]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[6]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[3],v[7]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[4],v[8]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[5],v[8]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[8]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[2],v[5],v[9]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[5],v[6],v[9]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[4],v[7],v[9]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[8],v[9]}, 0 )},\n };\n\n GdlFactory gf = new GdlFactory();\n UPGraph result = JunctionTreeAlgo.buildGraph(gf, factors, adjacency);\n //System.out.println(result);\n }", "public void train(double[] inputs, double[] outputsTarget) {\n assert(outputsTarget.length == weights.get(weights.size() - 1).length);\n \n ArrayList<double[]> layersOutputs = new ArrayList<double[]>(); \n classify(inputs, layersOutputs);\n\n // Calculate sensitivities for the output nodes\n int outputNeuronCount = this.weights.get(this.weights.size() - 1).length;\n double[] nextLayerSensitivities = new double[outputNeuronCount];\n assert(layersOutputs.get(layersOutputs.size() - 1).length == outputNeuronCount);\n for (int i = 0; i < outputNeuronCount; i++) {\n nextLayerSensitivities[i] = calculateErrorPartialDerivitive(\n layersOutputs.get(layersOutputs.size() - 1)[i],\n outputsTarget[i]\n ) * calculateActivationDerivitive(layersOutputs.get(layersOutputs.size() - 1)[i]);\n assert(!Double.isNaN(nextLayerSensitivities[i]));\n }\n\n for (int weightsIndex = this.weights.size() - 1; weightsIndex >= 0; weightsIndex--) {\n int previousLayerNeuronCount = this.weights.get(weightsIndex)[0].length;\n int nextLayerNeuronCount = this.weights.get(weightsIndex).length;\n assert(nextLayerSensitivities.length == nextLayerNeuronCount);\n\n double[] previousLayerOutputs = layersOutputs.get(weightsIndex);\n double[] previousLayerSensitivities = new double[previousLayerNeuronCount];\n\n // Iterate over neurons in the previous layer\n for (int j = 0; j < previousLayerNeuronCount; j++) {\n\n // Calculate the sensitivity of this node\n double sensitivity = 0;\n for (int i = 0; i < nextLayerNeuronCount; i++) {\n sensitivity += nextLayerSensitivities[i] * this.weights.get(weightsIndex)[i][j];\n }\n sensitivity *= calculateActivationDerivitive(previousLayerOutputs[j]);\n assert(!Double.isNaN(sensitivity));\n previousLayerSensitivities[j] = sensitivity;\n\n for (int i = 0; i < nextLayerNeuronCount; i++) {\n double weightDelta = learningRate * nextLayerSensitivities[i] * calculateActivation(previousLayerOutputs[j]);\n this.weights.get(weightsIndex)[i][j] += weightDelta;\n assert(!Double.isNaN(this.weights.get(weightsIndex)[i][j]) && !Double.isInfinite(this.weights.get(weightsIndex)[i][j]));\n }\n }\n\n nextLayerSensitivities = previousLayerSensitivities;\n }\n }", "public void init(float[] bias_inp, float[] bias_out,\n float[] bias_memin, float[] weight_memout,\n float outputbias) {\n cloneWeightMatrix();\n }", "private SigmoidCalibration(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "static Nda<Float> of( Shape shape, float... values ) { return Tensor.ofAny( Float.class, shape, values ); }", "public interface CommonInterface {\n\n\t/* FEED FORWARD\n\t * The input vector. An array of doubles.\n * @return The value returned by the LUT or NN for this input vector\n\t * \tX the input vector. An array of doubles.\n\t * The value return by LUT OR NN for this input vector\n\t * returns output of the neurons forward propagation\n\t * */\n\tpublic double outputFor(double [] X);\n\n\t/* \n\t * Method will tell NN or LUT the output value that should be mapped \n\t * to given input vector i.e. the desired correct output value for an input\n\t * @param X the input vector\n\t * @param argValue The new value to learn\n\t * @return the error in output for input vector \n\t */\n\tpublic double train(double[] X, double argValue);\n\t/*\n\t * Method to write either a LUT or weights of neural net to a file\n\t * @param argFile of type File\n\t */\n\tpublic void save (File argFile) throws IOException;\n\t/*\n\t * Loads LUT or NN weights from file. Load must of course have \n\t * knowledge of how data was written out by save mehtod.\n\t * Should raise an error in case that attempt is being made\n\t * to load data into an LUT or NN whose struct does not match the data in\n\t * the file (.eg. wrong number of hidden neurons)\n\t */\n\tpublic void load (String argFileName) throws IOException;\n}", "public abstract void fit(BinaryData trainingData);", "@Override\n\tpublic void train(DataSet data) {\n\t\tArrayList<Example> examples = data.getCopyWithBias().getData();\n\t\t// initialize both weight vectors with random values between -0.1 ad 0.1\n\t\tinitWeights(examples.size());\n\n\t\t// store outputs from forward calculation for each example\n\t\t// array will have size # examples.\n\t\tArrayList<Double> nodeOutputs = calculateForward(examples);\n\n\t\t// now take error and back-propagate from output to hidden nodes\n\n\t\tfor (int j = 0; j < examples.size(); j++) {\n\t\t\tExample ex = examples.get(j);\n\n\t\t\t// get hidden node outputs for single example\n\t\t\tfor (int num = 0; num < numHidden; num++) {\n\t\t\t\tArrayList<Double> h_outputs = hiddenOutputs.get(num);\n\t\t\t\tdouble vDotH = dotProduct(h_outputs, layerTwoWeights); // calculate\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// v dot\n\t\t\t\t// h for\n\t\t\t\t// this node\n\n\t\t\t\tfor (int i = 0; i < numHidden - 1; i++) {\n\t\t\t\t\tdouble oldV = layerTwoWeights.get(i);\n\t\t\t\t\tdouble hk = h_outputs.get(i);\n\t\t\t\t\t// Equation describing line below:\n\t\t\t\t\t// v_k = v_k + eta*h_k(y-f(v dot h)) f'(v dot h)\n\t\t\t\t\tlayerTwoWeights.set(i, oldV + eta * hk * (ex.getLabel() - Math.tanh(vDotH)) * derivative(vDotH));\n\t\t\t\t}\n\n\t\t\t\tSet<Integer> features = ex.getFeatureSet();\n\t\t\t\tIterator<Integer> iter = features.iterator();\n\t\t\t\tArrayList<Double> featureVals = new ArrayList<Double>();\n\t\t\t\tfor (int f : features) {\n\t\t\t\t\tfeatureVals.add((double) f);\n\t\t\t\t}\n\n\t\t\t\t// take that error and back-propagate one more time\n\t\t\t\tfor (int x = 0; x < numHidden; x++) {\n\t\t\t\t\tArrayList<Double> initWeights = hiddenWeights.get(x);\n\t\t\t\t\t// List<Object> features =\n\t\t\t\t\t// Arrays.asList(ex.getFeatureSet().toArray());\n\n\t\t\t\t\t// for (int i = 0; i < featureVals.size()-1; i++) {\n\t\t\t\t\tdouble oldWeight = initWeights.get(j);\n\t\t\t\t\tdouble thisInput = ex.getFeature(featureVals.get(x).intValue());\n\t\t\t\t\t// w_kj = w_kj + eta*xj(input)*f'(w_k dot x)*v_k*f'(v dot\n\t\t\t\t\t// h)(y-f(v dot h))\n\t\t\t\t\tdouble updateWeight = oldWeight + eta * thisInput * derivative(dotProduct(featureVals, initWeights))\n\t\t\t\t\t\t\t* layerTwoWeights.get(x) * derivative(vDotH) * (ex.getLabel() - Math.tanh(vDotH));\n\t\t\t\t\tinitWeights.set(j, updateWeight);\n\t\t\t\t\t// }\n\t\t\t\t\thiddenWeights.set(x, initWeights); // update weights for\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// current\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// example\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "public ScalarParameterInformation(boolean isParameterToCalibrate) {\r\n\t\tsuper();\r\n\t\tthis.isParameterToCalibrate = isParameterToCalibrate;\r\n\t\tthis.constraint = new Unconstrained();\r\n\t}", "public Matrix getCovariance() {\n return mCovariance;\n }", "public Matrix getCovariance() {\n return mCovariance;\n }", "private cudaComputeMode()\r\n {\r\n }", "public interface LinopTransform extends Transform {\r\n public double[][] getMat();\r\n}", "void kernel_load_parameters(double max_point_distance) {\n\t Matrix3 covariance_xyz = node.m_covariance;\n\t Matrix3 jacobian_normal = new Matrix3();\n Vector4d n = node.normal1.Normalized();\n // Jacobian Matrix calculation\n //double t=1.0;\n double EPS2 = 0.00001; //epsilon?\n Vector4d p = n.multiply(rho);\n double w = (p.x * p.x) + (p.y * p.y);\n double p2 = w + (p.z * p.z);\n double sqrtW = Math.sqrt(w);\n jacobian_normal.set(0,0, n.x);\n\t jacobian_normal.set(0,1, n.y);\n\t jacobian_normal.set(0,2, n.z);\n jacobian_normal.set(1,0, sqrtW<EPS2?(p.x * p.z)/EPS2:(p.x * p.z) / (sqrtW * p2)); \n\t jacobian_normal.set(1,1, sqrtW<EPS2?(p.y * p.z)/EPS2:(p.y * p.z) / (sqrtW * p2)); \n\t jacobian_normal.set(1,2, p2<EPS2?-sqrtW/EPS2:(-sqrtW / p2));\n jacobian_normal.set(2,0, (w<EPS2)?-p.y/EPS2:-p.y / w);\n\t jacobian_normal.set(2,1, (w<EPS2)?p.x/EPS2:p.x / w);\n\t jacobian_normal.set(2,2, 0.0);\n \n\t // Area importance (w_a) \n double w_a = 0.75;\n // Number-of-points importance (w_d)\n double w_d = 1- w_a;\n // w_a times node size over octree size plus w_d times samples in cluster over total samples in cloud\n node.representativeness = ( ((double)node.m_size/(double)node.m_root.m_size) * w_a ) + \n\t\t\t\t\t\t\t\t( ((double)node.m_indexes.size()/(double)node.m_root.m_points.size()) * w_d );\n\n // Uncertainty propagation\n\t Matrix3 jacobian_transposed_normal = Matrix3.transpose(jacobian_normal);\n\t // calculate covariance matrix\n\t // First order uncertainty propagation analysis generates variances and covariances in theta,phi,rho space \n\t // from euclidian space.\n covariance_rpt_normal = jacobian_normal.multiply(covariance_xyz).multiply(jacobian_transposed_normal);\n \n // Cluster representativeness\n covariance_rpt_normal.set(0,0, covariance_rpt_normal.get(0,0)+NONZERO);\n constant_normal = Math.sqrt(Math.abs(covariance_rpt_normal.determinant())*root22pi32);\n // if matrix is singular determinant is zero and constant_normal is 0\n // Supposedly adding epsilon averts this according to paper and in normal circumstances\n // a singular matrix would mean coplanar samples and voting should be done with bivariate kernel over theta,phi\n if( constant_normal == 0 ) {\n \t if( DEBUG ) {\n \t\t System.out.println(\"kernel_t kernel_load_parameters determinant is 0 for \"+this);\n \t }\n \t voting_limit = 0;\n \t return;\n }\n // if invert comes back null then the matrix is singular, which means the samples are coplanar\n covariance_rpt_inv_normal = covariance_rpt_normal.invert();\n if( covariance_rpt_inv_normal == null ) {\n \t if( DEBUG ) {\n \t\t System.out.println(\"kernel_t kernel_load_parameters covariance matrix is singular for \"+this);\n \t }\n \t voting_limit = 0;\n \t return;\n }\n\t EigenvalueDecomposition eigenvalue_decomp = new EigenvalueDecomposition(covariance_rpt_normal);\n\t double[] eigenvalues_vector = eigenvalue_decomp.getRealEigenvalues();\n\t Matrix3 eigenvectors_matrix = eigenvalue_decomp.getV();\n // Sort eigenvalues\n int min_index = 0;\n if (eigenvalues_vector[min_index] > eigenvalues_vector[1])\n min_index = 1;\n if (eigenvalues_vector[min_index] > eigenvalues_vector[2])\n min_index = 2;\n if( DEBUG )\n \t System.out.println(\"kernel_t kernel_load_parameters eigenvalues_vector=[\"+eigenvalues_vector[0]+\" \"+eigenvalues_vector[1]+\" \"+eigenvalues_vector[2]+\"] min_index=\"+min_index);\n // Voting limit calculation (g_min)\n double radius = Math.sqrt( eigenvalues_vector[min_index] ) * 2;\n voting_limit = trivariated_gaussian_dist_normal( eigenvectors_matrix.get(0, min_index) * radius, \n\t\t\t\t\t\t\t\t\t\t\t\t\t eigenvectors_matrix.get(1, min_index) * radius, \n\t\t\t\t\t\t\t\t\t\t\t\t\t eigenvectors_matrix.get(2, min_index) * radius);\n if(DEBUG)\n \t System.out.println(\"kernel_t kernel_load_parameters voting limit=\"+voting_limit);\n }", "public CvBoostParams()\r\n {\r\n\r\n super( CvBoostParams_0() );\r\n\r\n return;\r\n }", "public interface LDABetaInitStrategy{\n\t/**\n\t * Given a model and the corpus initialise the model's sufficient statistics\n\t * @param model\n\t * @param corpus\n\t */\n\tpublic void initModel(LDAModel model, Corpus corpus);\n\t\n\t/**\n\t * initialises beta randomly s.t. each each topicWord >= 1 and < 2\n\t * @author Sina Samangooei (ss@ecs.soton.ac.uk)\n\t *\n\t */\n\tpublic static class RandomBetaInit implements LDABetaInitStrategy{\n\t\tprivate MersenneTwister random;\n\t\t\n\t\t/**\n\t\t * unseeded random\n\t\t */\n\t\tpublic RandomBetaInit() {\n\t\t\trandom = new MersenneTwister();\n\t\t}\n\t\t\n\t\t/**\n\t\t * seeded random\n\t\t * @param seed\n\t\t */\n\t\tpublic RandomBetaInit(int seed) {\n\t\t\trandom = new MersenneTwister(seed);\n\t\t}\n\t\t@Override\n\t\tpublic void initModel(LDAModel model, Corpus corpus) {\n\t\t\tfor (int topicIndex = 0; topicIndex < model.ntopics; topicIndex++) {\n\t\t\t\tfor (int wordIndex = 0; wordIndex < corpus.vocabularySize(); wordIndex++) {\n\t\t\t\t\tdouble topicWord = 1 + random.nextDouble();\n\t\t\t\t\tmodel.incTopicWord(topicIndex,wordIndex,topicWord);\n\t\t\t\t\tmodel.incTopicTotal(topicIndex, topicWord);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "public DigitalNetBase2 toNet() {\n DigitalNetBase2 net = initNetVar (false);\n for (int i = 0; i < dim * numCols; i++)\n net.genMat[i] = genMat[i];\n return net;\n }", "public interface JacobiFunction {\n\n double[][] f(double[] x, double[] params);\n}", "public void update(ChiVertex<Integer, RatingEdge> vertex, GraphChiContext context) {\n\t\tboolean isUser = vertex.numOutEdges() > 0;\n\t\tdouble[] nbrPVec = new double[params.numFactors];\n\t\t\n\t\tdouble[] vData = new double[params.numFactors];\n\t\tint sourceId = context.getVertexIdTranslate().backward(vertex.getId());\n\t\tparams.latentFactors.getRow(sourceId, vData);\n\t\t\n\t\t//Will be updated to store SUM(V_j*R_ij)\n\t\tRealVector Xty = new ArrayRealVector(params.numFactors);\n\t\t//Will be updated to store SUM(V_j*V_j')\n\t\tRealMatrix XtX = new BlockRealMatrix(params.numFactors, params.numFactors);\n\t\t\n\t\t//Gather data to update the mean and the covariance for the hidden features.\t\n\t\tfor(int i = 0; i < vertex.numEdges(); i++) {\n\t\t\tRatingEdge edge = vertex.edge(i).getValue(); \n\t\t\tdouble observation = edge.observation;\n\t\t\t\n\t\t\tint nbrId = context.getVertexIdTranslate().backward(vertex.edge(i).getVertexId());\n\t\t\tparams.latentFactors.getRow(nbrId, nbrPVec);\n\t\t\t////VertexDataType nbrVertex = params.latentFactors.get(nbrId);\n\t\t\t\n\t\t\t//Add V_j*R_ij for this observation.\n\t\t\t////Xty = Xty.add(nbrVertex.pVec.mapMultiply(observation));\n\t\t\tfor(int f = 0; f < params.numFactors; f++) {\n\t\t\t\tdouble value = Xty.getEntry(f) + nbrPVec[f]*observation;\n\t\t\t\tXty.setEntry(f, value);\n\t\t\t\t\n\t\t\t\t//Add V_j*V_j' for this\n\t\t\t\tfor(int f2 = 0; f2 < params.numFactors; f2++) {\n\t\t\t\t\tvalue = XtX.getEntry(f, f2) + nbrPVec[f]*nbrPVec[f2];\n\t\t\t\t\tXtX.setEntry(f, f2, value);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Add V_j*V_j' for this \n\t\t\t////XtX = XtX.add(nbrVertex.pVec.outerProduct(nbrVertex.pVec));\n\t\t\t\n\t\t}\n\t\t\n\t\tRealMatrix lambda_prior = isUser ? params.lambda_U : params.lambda_V;\n\t\tRealVector mu_prior = isUser ? params.mu_U : params.mu_V;\n\t\t\n\t\tRealMatrix precision = lambda_prior.add(XtX.scalarMultiply(params.alpha)); \n\t\tRealMatrix covariance = (new LUDecompositionImpl(precision).getSolver().getInverse());\n\t\t\n\t\tRealVector tmp = lambda_prior.operate(mu_prior);\n\t\tRealVector mean = covariance.operate(Xty.mapMultiply(params.alpha).add(tmp));\n\t\t\n\t\t//We have the covariance and mean. We can grab a sample from this multivariate\n\t\t//normal distribution according to: \n\t\t// http://en.wikipedia.org/wiki/Multivariate_normal_distribution#Drawing_values_from_the_distribution\n\t\t//Javadoc:\n\t\tMultivariateNormalDistribution dist = new MultivariateNormalDistribution(mean.toArray(), covariance.getData());\n\t\t////vData.pVec = new ArrayRealVector(dist.sample());\n\t\tvData = dist.sample();\n\t\tparams.latentFactors.setRow(sourceId, vData);\n\t\t\n\t\t//Compute contribution of all ratings for this vertex to RMSE.\n\t\tif(isUser) {\n\t\t\tfor(int i = 0; i < vertex.numEdges(); i++) {\n\t\t\t\tChiEdge<RatingEdge> edge = vertex.edge(i);\n\t\t\t\tRatingEdge pmfRatingEdge = edge.getValue();\n\t\t\t\tfloat observation = pmfRatingEdge.observation;\n\t\t\t\tint nbrId = context.getVertexIdTranslate().backward(vertex.edge(i).getVertexId());\n\t\t\t\tparams.latentFactors.getRow(nbrId, nbrPVec);\n\t\t\t\t\n\t\t\t\t//Aggregate the sample and compute rmse if greater than burn_in period\n\t\t\t\tdouble prediction = this.params.predict(vData, nbrPVec, datasetDesc);\n\t\t\t\tdouble squaredError = (observation - prediction)*(observation - prediction);\n\t\t\t\tsynchronized (this) {\n\t\t\t\t this.train_rmse += squaredError;\n\t }\n\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Update Sum of U_i / V_j\n\t\t//Should be synchronized? Or Atomic add of vectors?\n\t\tRealVector vDataVec = new ArrayRealVector(vData);\n\t\tRealMatrix vDataOuterProd = vDataVec.outerProduct(vDataVec);\n\t\tsynchronized (params) {\n\t\t\tif(isUser) {\n\t\t\t\t\tparams.sumU = params.sumU.add(vDataVec);\n\t\t\t\t\tparams.sumUUT = params.sumUUT.add(vDataOuterProd);\n\t\t\t} else {\n\t\t\t\tparams.sumV = params.sumV.add(vDataVec);\n\t\t\t\tparams.sumVVT = params.sumVVT.add(vDataOuterProd);\n\t\t\t}\n\t\t}\n\t}", "NeuralNetwork mutate(float rate);", "public UnivariateStatsData() {\n super();\n }", "private void updateMuVariance() {\n\t\tmu = train.getLocalMean(); \n\t\tsigma = train.getLocalVariance(); \n\t\t\n\t\t/*\n\t\t * If the ratio of data variance between dimensions is too small, it \n\t\t * will cause numerical errors. To address this, we artificially boost\n\t\t * the variance by epsilon, a small fraction of the standard deviation\n\t\t * of the largest dimension. \n\t\t * */\n\t\tupdateEpsilon(); \n\t\tsigma = MathUtils.add(sigma, epsilon); \n\t\t\n\t}", "@Override\r\n\tpublic DataContainer forwardProp(DataContainer forwardPropData, boolean training) {\n\t\tMat input = forwardPropData.getVec(); \r\n\t\t\r\n\t\tif (!set) {\r\n\t\t\tinputWeight = Mat.randomMatrix(input.size[1] + 1, fout, - 0.3, 0.3); \r\n\t\t\tset = true; \r\n\t\t}\r\n\t\t\r\n\t\tMat inputBiased = (input).appendRight(new Mat(1,1,1)); \r\n\t\tMat output = inputBiased.mul(inputWeight); \r\n\t\tif (training) {\r\n\t\t\tlastInputBiased = inputBiased; \r\n\t\t}\r\n\t\telse {\r\n\t\t\tlastInputBiased = null; \r\n\t\t}\r\n\t\t\r\n\t\treturn new DataContainer(output); \r\n\t}", "public interface FmTrainParams<T> extends\n HasLabelCol<T>,\n HasVectorColDefaultAsNull<T>,\n HasWeightColDefaultAsNull<T>,\n HasEpsilonDv0000001<T>,\n HasFeatureColsDefaultAsNull<T>,\n FmCommonTrainParams<T> {\n\n /**\n * @cn-name 迭代数据batch size\n * @cn 数据batch size\n */\n ParamInfo<Integer> MINIBATCH_SIZE = ParamInfoFactory\n .createParamInfo(\"batchSize\", Integer.class)\n .setDescription(\"mini-batch size\")\n\t\t\t.setAlias(new String[]{\"minibatchSize\"})\n .setHasDefaultValue(-1)\n .build();\n\n default Integer getBatchSize() {\n return get(MINIBATCH_SIZE);\n }\n\n default T setBatchSize(Integer value) {\n return set(MINIBATCH_SIZE, value);\n }\n}", "protected ConfusionMatrix(){\n\n\t}", "public RandomNeighborhoodOperator(int nbRelaxedVars)\n{\n\tthis(nbRelaxedVars, 0);\n}", "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}", "@Test\n\tpublic void constructorTest() {\n\t\tCTRNN testCtrnn = new CTRNN(layout1, phenotype1, false);\n\t\tAssert.assertEquals(1.0, testCtrnn.inputWeights[0], 0.001);\n\t\tAssert.assertEquals(2.0, testCtrnn.hiddenWeights[0][0], 0.001);\n\t\tAssert.assertArrayEquals(new double[] {3.0, 4.0}, testCtrnn.biasWeights, 0.001);\n\t\tAssert.assertArrayEquals(new double[] {5.0, 6.0}, testCtrnn.gains, 0.001);\n\t\tAssert.assertArrayEquals(new double[] {7.0, 8.0}, testCtrnn.timeConstants, 0.001);\n\t\t\n\t}", "extendedPetriNetsFactory getextendedPetriNetsFactory();", "public double train(double[] X, double argValue);", "public interface Aggregator {\n /**\n * Determines the final class recognized\n * @param confidence Confidence values produced by a recognizer\n * (one confidence value per class)\n * @return The final prediction given by a classifier\n */\n public Prediction apply( double[] confidence );\n\n}", "@Test\n public void test_0040() {\n AutoCovariance instance = new AutoCovariance(\n new ARIMAModel(new double[]{0.3, -0.2, 0.05, 0.04}, 0, new double[]{0.2, 0.5}),\n 1, 10);\n\n assertEquals(1.461338, instance.evaluate(0), 1e-5);\n assertEquals(0.764270, instance.evaluate(1), 1e-5);\n assertEquals(0.495028, instance.evaluate(2), 1e-5);\n assertEquals(0.099292, instance.evaluate(3), 1e-5);\n assertEquals(0.027449, instance.evaluate(4), 1e-5);\n assertEquals(0.043699, instance.evaluate(5), 1e-5);\n assertEquals(0.032385, instance.evaluate(6), 1e-5);\n assertEquals(0.006320, instance.evaluate(7), 1e-5);\n assertEquals(-0.001298186, instance.evaluate(8), 1e-5);\n assertEquals(0.001713744, instance.evaluate(9), 1e-5);\n assertEquals(0.002385183, instance.evaluate(10), 1e-5);\n }", "public FcmLearner(double [][] matrix){\n this.adjacencyMatrix = matrix;\n }", "public BaseOptimizer() {\r\n Candidates = new ArrayList<>();\r\n }", "public\nNuc2D(NucNode nuc)\nthrows Exception\n{\n\tsuper (nuc);\n}", "public abstract double test(ClassifierData<U> testData);", "public interface InitializeGmm_F64 {\n\n\t/**\n\t * Initializes internal data structures. Must be called first.\n\t * @param pointDimension Number of degrees of freedom in each point.\n\t * @param randomSeed Seed for any random number generators used internally.\n\t */\n\tpublic void init( int pointDimension, long randomSeed );\n\n\t/**\n\t *\n\t * @param points (input) Set of points which is to be clustered.\n\t * @param seeds (output) List containing storage for the initial Gaussians.\n\t */\n\tpublic void selectSeeds( List<double[]> points, List<GaussianGmm_F64> seeds );\n\n\t/**\n\t * Turn on verbose output to standard out\n\t */\n\tvoid setVerbose( boolean verbose );\n}", "public interface FeatureFunction {\n double value(Vector vector, MultiLabel multiLabel);\n}", "private SigmoidParameters(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "protected void Initialize (double[] pars) {\n for (int j = 0; j < scalarn; j++) {\n vectorXBeta[j] = 0;\n for (int i = 0; i <= scalarK; i++)\n vectorXBeta[j] += matrixX[j][i] * pars[i];\n }\n\n double y;\n for (int j = 0; j < scalarn; j++) {\n // Yjk, Phijk, Njk\n if (vectorY[j] == scalarM) {\n vectorPhiDiff[j] = 1.0;\n vectorNk[j] = 0.0;\n vectorNYk[j] = 0.0;\n } else {\n if (vectorY[j] == 1)\n y = 0.0 - vectorXBeta[j];\n else\n // pars[scalarK+1] is for mu_2 and\n y = pars[scalarK + vectorY[j] - 1] - vectorXBeta[j];\n vectorPhiDiff[j] = NormalDistribution.CDF (y);\n vectorNk[j] = NormalDistribution.PDF (y);\n vectorNYk[j] = vectorNk[j] * y;\n }\n\n // Yj(k-1), Phij(k-1), Nj(k-1)\n if (vectorY[j] == 1) {\n vectorNk1[j] = 0.0;\n vectorNYk1[j] = 0.0;\n } else {\n if (vectorY[j] == 2)\n y = 0.0 - vectorXBeta[j];\n else\n y = pars[scalarK + vectorY[j] - 2] - vectorXBeta[j];\n vectorPhiDiff[j] = vectorPhiDiff[j] - NormalDistribution.CDF (y);\n vectorNk1[j] = NormalDistribution.PDF (y);\n vectorNYk1[j] = vectorNk1[j] * y;\n }\n }\n }", "private void initClassAttributes(){ \r\n\t\tanyMissingValue = new boolean[3];\r\n\t\tanyMissingValue[0] = false; \r\n\t\tanyMissingValue[1] = false;\r\n\t\tanyMissingValue[2] = false;\r\n\t\tnumInputAttributes = Attributes.getInputNumAttributes();\r\n\t\tnumOutputAttributes = Attributes.getOutputNumAttributes();\r\n\t\tnumUndefinedAttributes = Attributes.getNumAttributes() - (numInputAttributes+numOutputAttributes);\r\n\t\tintNominalValues = new int[3][];\r\n\t\tnominalValues = new String[3][];\r\n\t\trealValues = new double[3][];\r\n\t\tmissingValues = new boolean[3][];\r\n\t\tnominalValues[0] = new String[numInputAttributes];\r\n\t\tnominalValues[1] = new String[numOutputAttributes];\r\n\t\tnominalValues[2] = new String[numUndefinedAttributes];\r\n\t\tintNominalValues[0] = new int[numInputAttributes];\r\n\t\tintNominalValues[1] = new int[numOutputAttributes];\r\n\t\tintNominalValues[2] = new int[numUndefinedAttributes];\r\n\t\trealValues[0] = new double[numInputAttributes];\r\n\t\trealValues[1] = new double[numOutputAttributes];\r\n\t\trealValues[2] = new double[numUndefinedAttributes];\r\n\t\tmissingValues[0] = new boolean[numInputAttributes];\r\n\t\tmissingValues[1] = new boolean[numOutputAttributes];\r\n\t\tmissingValues[2] = new boolean[numUndefinedAttributes];\r\n\r\n\t\tfor(int i=0;i<numInputAttributes;i++) missingValues[0][i]=false; \r\n\t\tfor(int i=0;i<numOutputAttributes;i++) missingValues[1][i]=false; \r\n\t\tfor(int i=0;i<numUndefinedAttributes; i++) missingValues[2][i]=false;\r\n\r\n\t}", "public CvSVM()\r\n {\r\n\r\n super( CvSVM_0() );\r\n\r\n return;\r\n }", "protected void initIndependentParamLists() {\n\n\t\t// params that the mean depends upon\n\t\tmeanIndependentParams.clear();\n\t\tmeanIndependentParams.addParameter(distanceJBParam);\n\t\tmeanIndependentParams.addParameter(willsSiteParam);\n\t\tmeanIndependentParams.addParameter(magParam);\n\t\tmeanIndependentParams.addParameter(fltTypeParam);\n\t\tmeanIndependentParams.addParameter(componentParam);\n\n\t\t// params that the stdDev depends upon\n\t\tstdDevIndependentParams.clear();\n\t\tstdDevIndependentParams.addParameter(stdDevTypeParam);\n\t\tstdDevIndependentParams.addParameter(componentParam);\n\t\tstdDevIndependentParams.addParameter(magParam);\n\n\t\t// params that the exceed. prob. depends upon\n\t\texceedProbIndependentParams.clear();\n\t\texceedProbIndependentParams.addParameter(distanceJBParam);\n\t\texceedProbIndependentParams.addParameter(willsSiteParam);\n\t\texceedProbIndependentParams.addParameter(magParam);\n\t\texceedProbIndependentParams.addParameter(fltTypeParam);\n\t\texceedProbIndependentParams.addParameter(componentParam);\n\t\texceedProbIndependentParams.addParameter(stdDevTypeParam);\n\t\texceedProbIndependentParams.addParameter(this.sigmaTruncTypeParam);\n\t\texceedProbIndependentParams.addParameter(this.sigmaTruncLevelParam);\n\n\t\t// params that the IML at exceed. prob. depends upon\n\t\timlAtExceedProbIndependentParams.addParameterList(\n\t\t\t\texceedProbIndependentParams);\n\t\timlAtExceedProbIndependentParams.addParameter(exceedProbParam);\n\n\t}", "@Override\n public void calculate(double[] x) {\n\n double prob = 0.0; // the log prob of the sequence given the model, which is the negation of value at this point\n Triple<double[][], double[][], double[][]> allParams = separateWeights(x);\n double[][] linearWeights = allParams.first();\n double[][] W = allParams.second(); // inputLayerWeights \n double[][] U = allParams.third(); // outputLayerWeights \n\n double[][] Y = null;\n if (flags.softmaxOutputLayer) {\n Y = new double[U.length][];\n for (int i = 0; i < U.length; i++) {\n Y[i] = ArrayMath.softmax(U[i]);\n }\n }\n\n double[][] What = emptyW();\n double[][] Uhat = emptyU();\n\n // the expectations over counts\n // first index is feature index, second index is of possible labeling\n double[][] E = empty2D();\n double[][] eW = emptyW();\n double[][] eU = emptyU();\n\n // iterate over all the documents\n for (int m = 0; m < data.length; m++) {\n int[][][] docData = data[m];\n int[] docLabels = labels[m];\n\n // make a clique tree for this document\n CRFCliqueTree cliqueTree = CRFCliqueTree.getCalibratedCliqueTree(docData, labelIndices, numClasses, classIndex,\n backgroundSymbol, new NonLinearCliquePotentialFunction(linearWeights, W, U, flags));\n\n // compute the log probability of the document given the model with the parameters x\n int[] given = new int[window - 1];\n Arrays.fill(given, classIndex.indexOf(backgroundSymbol));\n int[] windowLabels = new int[window];\n Arrays.fill(windowLabels, classIndex.indexOf(backgroundSymbol));\n\n if (docLabels.length>docData.length) { // only true for self-training\n // fill the given array with the extra docLabels\n System.arraycopy(docLabels, 0, given, 0, given.length);\n System.arraycopy(docLabels, 0, windowLabels, 0, windowLabels.length);\n // shift the docLabels array left\n int[] newDocLabels = new int[docData.length];\n System.arraycopy(docLabels, docLabels.length-newDocLabels.length, newDocLabels, 0, newDocLabels.length);\n docLabels = newDocLabels;\n }\n // iterate over the positions in this document\n for (int i = 0; i < docData.length; i++) {\n int label = docLabels[i];\n double p = cliqueTree.condLogProbGivenPrevious(i, label, given);\n if (VERBOSE) {\n System.err.println(\"P(\" + label + \"|\" + ArrayMath.toString(given) + \")=\" + p);\n }\n prob += p;\n System.arraycopy(given, 1, given, 0, given.length - 1);\n given[given.length - 1] = label;\n }\n\n // compute the expected counts for this document, which we will need to compute the derivative\n // iterate over the positions in this document\n for (int i = 0; i < docData.length; i++) {\n // for each possible clique at this position\n System.arraycopy(windowLabels, 1, windowLabels, 0, window - 1);\n windowLabels[window - 1] = docLabels[i];\n for (int j = 0; j < docData[i].length; j++) {\n Index<CRFLabel> labelIndex = labelIndices[j];\n // for each possible labeling for that clique\n int[] cliqueFeatures = docData[i][j];\n double[] As = null;\n double[] fDeriv = null;\n double[][] yTimesA = null;\n double[] sumOfYTimesA = null;\n\n if (j == 0) {\n As = NonLinearCliquePotentialFunction.hiddenLayerOutput(W, cliqueFeatures, flags);\n fDeriv = new double[inputLayerSize];\n double fD = 0;\n for (int q = 0; q < inputLayerSize; q++) {\n if (useSigmoid) {\n fD = As[q] * (1 - As[q]); \n } else {\n fD = 1 - As[q] * As[q]; \n }\n fDeriv[q] = fD;\n }\n\n // calculating yTimesA for softmax\n if (flags.softmaxOutputLayer) {\n double val = 0;\n\n yTimesA = new double[outputLayerSize][numHiddenUnits];\n for (int ii = 0; ii < outputLayerSize; ii++) {\n yTimesA[ii] = new double[numHiddenUnits];\n }\n sumOfYTimesA = new double[outputLayerSize];\n\n for (int k = 0; k < outputLayerSize; k++) {\n double[] Yk = null;\n if (flags.tieOutputLayer) {\n Yk = Y[0];\n } else {\n Yk = Y[k];\n }\n double sum = 0;\n for (int q = 0; q < inputLayerSize; q++) {\n if (q % outputLayerSize == k) {\n int hiddenUnitNo = q / outputLayerSize;\n val = As[q] * Yk[hiddenUnitNo];\n yTimesA[k][hiddenUnitNo] = val;\n sum += val;\n }\n }\n sumOfYTimesA[k] = sum;\n }\n }\n\n // calculating Uhat What\n int[] cliqueLabel = new int[j + 1];\n System.arraycopy(windowLabels, window - 1 - j, cliqueLabel, 0, j + 1);\n\n CRFLabel crfLabel = new CRFLabel(cliqueLabel);\n int givenLabelIndex = labelIndex.indexOf(crfLabel);\n double[] Uk = null;\n double[] UhatK = null;\n double[] Yk = null;\n double[] yTimesAK = null;\n double sumOfYTimesAK = 0;\n if (flags.tieOutputLayer) {\n Uk = U[0];\n UhatK = Uhat[0];\n if (flags.softmaxOutputLayer) {\n Yk = Y[0];\n }\n } else {\n Uk = U[givenLabelIndex];\n UhatK = Uhat[givenLabelIndex];\n if (flags.softmaxOutputLayer) {\n Yk = Y[givenLabelIndex];\n }\n }\n\n if (flags.softmaxOutputLayer) {\n yTimesAK = yTimesA[givenLabelIndex];\n sumOfYTimesAK = sumOfYTimesA[givenLabelIndex];\n }\n\n for (int k = 0; k < inputLayerSize; k++) {\n double deltaK = 1;\n if (flags.sparseOutputLayer || flags.tieOutputLayer) {\n if (k % outputLayerSize == givenLabelIndex) {\n int hiddenUnitNo = k / outputLayerSize;\n if (flags.softmaxOutputLayer) {\n UhatK[hiddenUnitNo] += (yTimesAK[hiddenUnitNo] - Yk[hiddenUnitNo] * sumOfYTimesAK);\n deltaK *= Yk[hiddenUnitNo];\n } else {\n UhatK[hiddenUnitNo] += As[k];\n deltaK *= Uk[hiddenUnitNo];\n }\n }\n } else {\n UhatK[k] += As[k];\n if (useOutputLayer) {\n deltaK *= Uk[k];\n }\n }\n if (useHiddenLayer)\n deltaK *= fDeriv[k];\n if (useOutputLayer) {\n if (flags.sparseOutputLayer || flags.tieOutputLayer) {\n if (k % outputLayerSize == givenLabelIndex) {\n double[] WhatK = What[k];\n for (int n = 0; n < cliqueFeatures.length; n++) {\n WhatK[cliqueFeatures[n]] += deltaK;\n }\n }\n } else {\n double[] WhatK = What[k];\n for (int n = 0; n < cliqueFeatures.length; n++) {\n WhatK[cliqueFeatures[n]] += deltaK;\n }\n }\n } else {\n if (k == givenLabelIndex) {\n double[] WhatK = What[k];\n for (int n = 0; n < cliqueFeatures.length; n++) {\n WhatK[cliqueFeatures[n]] += deltaK;\n }\n }\n }\n }\n }\n\n for (int k = 0; k < labelIndex.size(); k++) { // labelIndex.size() == numClasses\n int[] label = labelIndex.get(k).getLabel();\n double p = cliqueTree.prob(i, label); // probability of these labels occurring in this clique with these features\n if (j == 0) { // for node features\n double[] Uk = null;\n double[] eUK = null;\n double[] Yk = null;\n if (flags.tieOutputLayer) {\n Uk = U[0];\n eUK = eU[0];\n if (flags.softmaxOutputLayer) {\n Yk = Y[0];\n }\n } else {\n Uk = U[k];\n eUK = eU[k];\n if (flags.softmaxOutputLayer) {\n Yk = Y[k];\n }\n }\n if (useOutputLayer) {\n for (int q = 0; q < inputLayerSize; q++) {\n double deltaQ = 1;\n if (flags.sparseOutputLayer || flags.tieOutputLayer) {\n if (q % outputLayerSize == k) {\n int hiddenUnitNo = q / outputLayerSize;\n if (flags.softmaxOutputLayer) {\n eUK[hiddenUnitNo] += (yTimesA[k][hiddenUnitNo] - Yk[hiddenUnitNo] * sumOfYTimesA[k]) * p;\n deltaQ = Yk[hiddenUnitNo];\n } else {\n eUK[hiddenUnitNo] += As[q] * p;\n deltaQ = Uk[hiddenUnitNo];\n }\n }\n } else {\n eUK[q] += As[q] * p;\n deltaQ = Uk[q];\n }\n if (useHiddenLayer)\n deltaQ *= fDeriv[q];\n if (flags.sparseOutputLayer || flags.tieOutputLayer) {\n if (q % outputLayerSize == k) {\n double[] eWq = eW[q];\n for (int n = 0; n < cliqueFeatures.length; n++) {\n eWq[cliqueFeatures[n]] += deltaQ * p;\n }\n }\n } else {\n double[] eWq = eW[q];\n for (int n = 0; n < cliqueFeatures.length; n++) {\n eWq[cliqueFeatures[n]] += deltaQ * p;\n }\n }\n }\n } else {\n double deltaK = 1;\n if (useHiddenLayer)\n deltaK *= fDeriv[k];\n double[] eWK = eW[k];\n for (int n = 0; n < cliqueFeatures.length; n++) {\n eWK[cliqueFeatures[n]] += deltaK * p;\n }\n }\n } else { // for edge features\n for (int n = 0; n < cliqueFeatures.length; n++) {\n E[cliqueFeatures[n]][k] += p;\n }\n }\n }\n }\n }\n }\n\n if (Double.isNaN(prob)) { // shouldn't be the case\n throw new RuntimeException(\"Got NaN for prob in CRFNonLinearLogConditionalObjectiveFunction.calculate()\");\n }\n\n value = -prob;\n if(VERBOSE){\n System.err.println(\"value is \" + value);\n }\n\n // compute the partial derivative for each feature by comparing expected counts to empirical counts\n int index = 0;\n for (int i = 0; i < E.length; i++) {\n int originalIndex = edgeFeatureIndicesMap.get(i);\n\n for (int j = 0; j < E[i].length; j++) {\n derivative[index++] = (E[i][j] - Ehat[i][j]);\n if (VERBOSE) {\n System.err.println(\"linearWeights deriv(\" + i + \",\" + j + \") = \" + E[i][j] + \" - \" + Ehat[i][j] + \" = \" + derivative[index - 1]);\n }\n }\n }\n if (index != edgeParamCount)\n throw new RuntimeException(\"after edge derivative, index(\"+index+\") != edgeParamCount(\"+edgeParamCount+\")\");\n\n for (int i = 0; i < eW.length; i++) {\n for (int j = 0; j < eW[i].length; j++) {\n derivative[index++] = (eW[i][j] - What[i][j]);\n if (VERBOSE) {\n System.err.println(\"inputLayerWeights deriv(\" + i + \",\" + j + \") = \" + eW[i][j] + \" - \" + What[i][j] + \" = \" + derivative[index - 1]);\n }\n }\n }\n\n\n if (index != beforeOutputWeights)\n throw new RuntimeException(\"after W derivative, index(\"+index+\") != beforeOutputWeights(\"+beforeOutputWeights+\")\");\n\n if (useOutputLayer) {\n for (int i = 0; i < eU.length; i++) {\n for (int j = 0; j < eU[i].length; j++) {\n derivative[index++] = (eU[i][j] - Uhat[i][j]);\n if (VERBOSE) {\n System.err.println(\"outputLayerWeights deriv(\" + i + \",\" + j + \") = \" + eU[i][j] + \" - \" + Uhat[i][j] + \" = \" + derivative[index - 1]);\n }\n }\n }\n }\n\n if (index != x.length)\n throw new RuntimeException(\"after W derivative, index(\"+index+\") != x.length(\"+x.length+\")\");\n\n int regSize = x.length;\n if (flags.skipOutputRegularization || flags.softmaxOutputLayer) {\n regSize = beforeOutputWeights;\n }\n\n // incorporate priors\n if (prior == QUADRATIC_PRIOR) {\n double sigmaSq = sigma * sigma;\n for (int i = 0; i < regSize; i++) {\n double k = 1.0;\n double w = x[i];\n value += k * w * w / 2.0 / sigmaSq;\n derivative[i] += k * w / sigmaSq;\n }\n } else if (prior == HUBER_PRIOR) {\n double sigmaSq = sigma * sigma;\n for (int i = 0; i < regSize; i++) {\n double w = x[i];\n double wabs = Math.abs(w);\n if (wabs < epsilon) {\n value += w * w / 2.0 / epsilon / sigmaSq;\n derivative[i] += w / epsilon / sigmaSq;\n } else {\n value += (wabs - epsilon / 2) / sigmaSq;\n derivative[i] += ((w < 0.0) ? -1.0 : 1.0) / sigmaSq;\n }\n }\n } else if (prior == QUARTIC_PRIOR) {\n double sigmaQu = sigma * sigma * sigma * sigma;\n for (int i = 0; i < regSize; i++) {\n double k = 1.0;\n double w = x[i];\n value += k * w * w * w * w / 2.0 / sigmaQu;\n derivative[i] += k * w / sigmaQu;\n }\n }\n }", "public DMatrixRMaj getCovariance() {\n\t\treturn P;\n\t}", "protected void initVar2Factor(int[] nodes)\n {\n for(int x=0, N=nodes.length; x < N; x++)\n {\n int n = nodes[x];\n VariableNode vn = _fg.getVarNode(n);\n ProbTable pt = vn.getProbs();\n \n List messages = _fg.getAdjacentMessages(n);\n for(int m=0, M=messages.size(); m < M; m++)\n {\n EdgeMessage em = (EdgeMessage) messages.get(m);\n em.v2f(pt);\n }\n }\n }", "public interface IDistribution extends IUncertainty {\n\tstatic interface IParameter extends IUncertainty {};\n\n}", "public WekaLogitLearner() { super(new Logistic2()); }", "public interface Regressor {\n\n String name();\n\n float recognize(final float[] pixels);\n}", "public abstract double gradient(double betaForDimension, int dimension);" ]
[ "0.5172618", "0.5048253", "0.50228643", "0.47925228", "0.47330895", "0.47144538", "0.46749952", "0.46452865", "0.46333367", "0.46299955", "0.46096176", "0.45246643", "0.4519696", "0.4485311", "0.44784868", "0.44566593", "0.44560394", "0.44224", "0.44157368", "0.44142887", "0.4407227", "0.44006005", "0.4393476", "0.4391511", "0.43800852", "0.43764448", "0.43614277", "0.4354478", "0.434948", "0.43458632", "0.43376222", "0.43323803", "0.43118966", "0.43075022", "0.43020177", "0.42973283", "0.4286177", "0.42708722", "0.42662492", "0.42355072", "0.42310962", "0.4228341", "0.4225779", "0.42170882", "0.4215792", "0.42091385", "0.42083937", "0.4206064", "0.42017633", "0.41985875", "0.41980943", "0.41931984", "0.418933", "0.41749647", "0.41693524", "0.41684994", "0.41680658", "0.41675985", "0.41663048", "0.41518363", "0.41518363", "0.4149434", "0.4139148", "0.41363096", "0.41359904", "0.4129966", "0.41257945", "0.41246557", "0.4114581", "0.41105565", "0.41077593", "0.41063067", "0.41051236", "0.40989062", "0.40964004", "0.4090923", "0.4087785", "0.4085691", "0.40852943", "0.40791515", "0.40783444", "0.40782553", "0.40768468", "0.40764976", "0.40760717", "0.40752465", "0.40633", "0.40526983", "0.4036045", "0.40360123", "0.40316406", "0.40304437", "0.4017454", "0.4015852", "0.40149948", "0.40141585", "0.40060917", "0.4005674", "0.40043828", "0.4003754" ]
0.42344964
40
construct from FCNBase + double[] for parameters and MnUserCovariance
public MnScan(FCNBase fcn, double[] par, MnUserCovariance cov, int stra) { this(fcn, new MnUserParameterState(par, cov), new MnStrategy(stra)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract double covariance(double x1, double x2);", "public MultivariateGaussianDM() {\n\t}", "public FunctionJet2Adapter(int baseDimension) \n {\n super(baseDimension); \n hessian = new double[baseDimension];\n }", "private static native void covarianceEstimation_0(long src_nativeObj, long dst_nativeObj, int windowRows, int windowCols);", "private double[][] getCov (double[][] in) {\n\t\treturn StatisticSample.covariance(in);\n\t}", "public void useCovarianceMatrix(){\n this.covRhoOption = true;\n }", "float[] feedForward(float... inputs);", "public double[][] getCovarianceMatrix() {\r\n\t\treturn covar;\r\n\t}", "static Nda<Float> of( float... value ) { return Tensor.of( Float.class, Shape.of( value.length ), value ); }", "public Vector(float[] axis){ this.axis = axis;}", "@Test\n public void testBuildGraph_FactorArr() {\n // And now factors\n CostFunction[] factors = new CostFunction[]{\n factory.buildCostFunction( new Variable[]{v[0],v[1]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[1]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[1]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[2]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[2]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[3]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[4]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[1],v[2]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[1],v[3]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[3],v[4]}, 0 ),\n };\n\n MCS mcs = new MCS(Arrays.asList(factors));\n UPFactory f = new GdlFactory();\n UPGraph result = JunctionTreeAlgo.buildGraph(f, mcs.getFactorDistribution(), mcs.getAdjacency());\n System.out.println(result);\n }", "public double[][] getCovarianceMatrix() {\n\tif (covariance == null) {\n\t createCovariance();\n\t}\n\tdouble[][]result = new double[covariance.length][covariance.length];\n\tint n = covariance.length;\n\tfor (int i = 0; i < n; i++) {\n\t System.arraycopy(covariance[i],0, result[i],0, n);\n\t}\n\treturn result;\n }", "void backpropagate(float[] inputs, float... targets);", "private DigitalNetBase2 initNetVar (boolean shiftFlag) {\n DigitalNetBase2 net = new DigitalNetBase2 ();\n if (shiftFlag)\n net.dim = dim + 1;\n else\n net.dim = dim;\n net.numPoints = numPoints;\n net.numCols = numCols;\n net.numRows = numRows;\n net.outDigits = outDigits;\n net.normFactor = normFactor;\n net.factor = new double[outDigits];\n net.genMat = new int[net.dim * numCols];\n net.shiftStream = shiftStream;\n net.capacityShift = capacityShift;\n net.dimShift = dimShift;\n net.digitalShift = copyDigitalShift (digitalShift);\n if (shiftFlag && shiftStream != null) {\n net.addRandomShift (dimShift, dimShift + 1, shiftStream);\n }\n return net;\n }", "public Matrix getCovariance() {\n return mCovariance;\n }", "public Matrix getCovariance() {\n return mCovariance;\n }", "@Override\n\tpublic Parameter[] getParameters() {\n\t\treturn new Parameter[] { weight, tolerance, svmType, kernelType, kernelDegree, kernelGamma, kernelCoefficient, parameterC,\n\t\t\t\tparameterNu };\n\t}", "public UnivariateStatsData() {\n super();\n }", "public static void testMultimensionalOutput() {\n\t\tint vectSize = 8;\n\t\tint outputsPerInput = 10;\n\t\tdouble repeatProb = 0.8;\n\t\tdouble inpRemovalPct = 0.8;\n\t\tCollection<DataPoint> data = createMultidimensionalCorrSamples(vectSize, outputsPerInput, inpRemovalPct);\n//\t\tCollection<DataPoint> data = createMultidimensionalSamples(vectSize, outputsPerInput, repeatProb);\n\n\t\tModelLearner modeler = createModelLearner(vectSize, data);\n\t\tint numRuns = 100;\n\t\tint jointAdjustments = 18;\n\t\tdouble skewFactor = 0;\n\t\tdouble cutoffProb = 0.1;\n\t\tDecisionProcess decisioner = new DecisionProcess(modeler, null, 1, numRuns,\n\t\t\t\t0, skewFactor, 0, cutoffProb);\n\t\tDecisionProcess decisionerJ = new DecisionProcess(modeler, null, 1, numRuns,\n\t\t\t\tjointAdjustments, skewFactor, 0, cutoffProb);\n\t\t\n\t\tSet<DiscreteState> inputs = getInputSetFromSamples(data);\n\t\tArrayList<Double> realV = new ArrayList<Double>();\n\t\tArrayList<Double> predV = new ArrayList<Double>();\n\t\tArrayList<Double> predJV = new ArrayList<Double>();\n\t\tfor (DiscreteState input : inputs) {\n\t\t\tSystem.out.println(\"S\" + input);\n\t\t\tMap<DiscreteState, Double> outProbs = getRealOutputProbsForInput(input, data);\n\t\t\tMap<DiscreteState,Double> preds = countToFreqMap(decisioner\n\t\t\t\t\t.getImmediateStateGraphForActionGibbs(input.getRawState(), new double[] {}));\n\t\t\tMap<DiscreteState,Double> predsJ = countToFreqMap(decisionerJ\n\t\t\t\t\t.getImmediateStateGraphForActionGibbs(input.getRawState(), new double[] {}));\n\t\t\tSet<DiscreteState> outputs = new HashSet<DiscreteState>();\n\t\t\toutputs.addAll(outProbs.keySet());\n\t\t\toutputs.addAll(preds.keySet());\n\t\t\toutputs.addAll(predsJ.keySet());\n\t\t\tfor (DiscreteState output : outputs) {\n\t\t\t\tDouble realD = outProbs.get(output);\n\t\t\t\tDouble predD = preds.get(output);\n\t\t\t\tDouble predJD = predsJ.get(output);\n\t\t\t\tdouble real = (realD != null ? realD : 0);\n\t\t\t\tdouble pred = (predD != null ? predD : 0);\n\t\t\t\tdouble predJ = (predJD != null ? predJD : 0);\n\t\t\t\trealV.add(real);\n\t\t\t\tpredV.add(pred);\n\t\t\t\tpredJV.add(predJ);\n\t\t\t\tSystem.out.println(\"\tS'\" + output + \"\t\" + real + \"\t\" + pred + \"\t\" + predJ);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"CORR:\t\" + Utils.correlation(realV, predV)\n\t\t\t\t+ \"\t\" + Utils.correlation(realV, predJV));\n\t}", "public abstract void build(ClassifierData<U> inputData);", "public Matrix3f(float v[]) {\n\t\n \tthis.set(v);\n }", "@Override\n\tpublic SparseVector getPosteriorPrecisions() {\n\t\treturn covariance.copyNew();\n\t}", "public void covariance_SET(float[] src, int pos)\n {\n for(int BYTE = 44, src_max = pos + 45; pos < src_max; pos++, BYTE += 4)\n set_bytes(Float.floatToIntBits(src[pos]) & -1L, 4, data, BYTE);\n }", "public interface LinopTransform extends Transform {\r\n public double[][] getMat();\r\n}", "public Driver(){\n\t\tthis.D = Parameters.numberOfDocuments;\n\t\tthis.K = Parameters.numberOfTopics;\n\t\tthis.V = Parameters.sizeOfVocabulary;\n\n\t\tthis.oldAlpha = new double[this.K];\n\t\tthis.newAlpha = new double[this.K];\n\t\tthis.hessian = new double[this.K][this.K];\n\t\tthis.gradient = new double[this.K];\n\t}", "@Test\n public void addModelData() {\n new FactoryInitializer()\n .initialize(\n ((tr, ev, is, np, md) -> new ResNetConv2DFactory(tr,ev,is,np,md).addModelData(new ArrayList<>()))\n );\n }", "public DMatrixRMaj getCovariance() {\n\t\treturn P;\n\t}", "public double train(double[] X, double argValue);", "float[] getModelMatrix();", "@Override\n /**\n * @param X The input vector. An array of doubles.\n * @return The value returned by th LUT or NN for this input vector\n */\n\n public double outputFor(double[] X) {\n int i = 0, j = 0;\n for(i=0;i<argNumInputs;i++){\n S[0][i] = X[i];\n NeuronCell[0][i] = X[i];\n }\n //then add the bias term\n S[0][argNumInputs] = 1;\n NeuronCell[0][argNumInputs] = customSigmoid(S[0][argNumInputs]);\n S[1][argNumHidden] = 1;\n NeuronCell[1][argNumHidden] = customSigmoid(S[1][argNumInputs]);\n\n for(i=0;i<argNumHidden;i++){\n for(j=0;j<=argNumInputs;j++){\n //Wji : weigth from j to i\n WeightSum+=NeuronCell[0][j]*Weight[0][j][i];\n }\n //Sj = sigma(Wji * Xi)\n S[1][i]=WeightSum;\n NeuronCell[1][i]=(customSigmoid(WeightSum));\n //reset weigthsum\n WeightSum=0;\n }\n\n for(i = 0; i < argNumOutputs; i++){\n for(j = 0;j <= argNumHidden;j++){\n WeightSum += NeuronCell[1][j] * Weight[1][j][i];\n }\n NeuronCell[2][i]=customSigmoid(WeightSum);\n S[2][i]=WeightSum;\n WeightSum=0;\n }\n //if we only return 1 double, it means we only have one output, so actually we can write return NeuronCell[2][0]\n return NeuronCell[2][0];\n }", "static Nda<Float> of( Shape shape, float... values ) { return Tensor.ofAny( Float.class, shape, values ); }", "public interface JacobiFunction {\n\n double[][] f(double[] x, double[] params);\n}", "public BackPropagationNeural_3H(int size_in,int size_hidden1,int size_hidden2,int size_hidden3,int size_output){\n\t\tthis.size_in = size_in;\n\t\tthis.size_hidden1 = size_hidden1;\n\t\tthis.size_hidden2 = size_hidden2;\n\t\tthis.size_hidden3 = size_hidden3;\n\t\tthis.size_output = size_output;\n\t\t\n\t\tinputs = new float[size_in];\n\t\thidden1 = new float[size_hidden1];\n\t\thidden2 = new float[size_hidden2];\n\t\thidden3 = new float[size_hidden3];\n\t\toutput = new float[size_output];\n\t\t\n\t\tweight1 = new float[size_in][size_hidden1];\n\t\tweight2 = new float[size_hidden1][size_hidden2];\n\t\tweight3 = new float[size_hidden2][size_hidden3];\n\t\tweight4 = new float[size_hidden3][size_output];\n\t\t\n\t\tW1_last_delta = new float[size_in][size_hidden1];\n W2_last_delta = new float[size_hidden1][size_hidden2];\n W3_last_delta = new float[size_hidden2][size_hidden3];\n W4_last_delta = new float[size_hidden3][size_output];\n \n\t\trandomizeWeights();\n\t\toutput_error = new float[size_output];\n\t\thidden1_error = new float[size_hidden1];\n\t\thidden2_error = new float[size_hidden2];\n\t\thidden3_error = new float[size_hidden3];\n\t}", "public void backprop(double[] inputs, FeedForwardNeuralNetwork net, boolean verbose)\n {\n //create variables that will be used later\n int[] sizes = net.getSizes();\n int biggestSize = 0;\n for(int k = 0; k < sizes.length; k++)\n {\n if(sizes[k] > biggestSize)\n {\n biggestSize = sizes[k];\n }\n }\n int hiddenLayers = sizes.length - 2;\n //if input or output wrong size, return\n if(inputs.length != sizes[0])\n {\n System.out.println(\"Invalid number of inputs\");\n return;\n }\n\n double[][] allOutputs = new double[sizes.length][biggestSize];\n double[][] allErrors = new double[sizes.length][biggestSize];\n\n //fill out first layer to temp output\n int lastLayer = sizes[0];\n for(int k = 0; k < lastLayer; k++)\n {\n allOutputs[0][k] = inputs[k];\n }\n\n //for each layer after the input\n for(int k = 1; k < hiddenLayers + 2; k++)\n {\n //for each node in that layer\n for(int a = 0; a < sizes[k]; a++)\n {\n //get sum and get activation function result and its derivative\n double sum = 0;\n for(int t = 0; t < lastLayer; t++)\n {\n sum += allOutputs[k - 1][t] * net.getWeight(k - 1, t, k, a);\n }\n sum += net.getBiasNum() * net.getWeight(-1, 0, k, a);\n if(k != hiddenLayers + 1)\n {\n allOutputs[k][a] = net.applyActivationFunction(sum, net.getHiddenActivationFunction());\n allErrors[k][a] = net.applyActivationFunctionDerivative(sum, net.getHiddenActivationFunction());\n }\n else\n {\n allOutputs[k][a] = net.applyActivationFunction(sum, net.getOutputActivationFunction());\n allErrors[k][a] = net.applyActivationFunctionDerivative(sum, net.getOutputActivationFunction());\n }\n }\n lastLayer = sizes[k];\n }\n\n if(verbose)\n {\n System.out.println(\"Outputs\");\n for(int k = 0; k < maxClusters; k++)\n {\n System.out.print(allOutputs[hiddenLayers + 1][k] + \", \");\n }\n System.out.println();\n }\n double[] expectedOutputs = new double[maxClusters];\n int cluster = 0;\n double max = 0;\n for(int k = 0; k < maxClusters; k++)\n {\n expectedOutputs[k] = allOutputs[hiddenLayers + 1][k];\n if(allOutputs[hiddenLayers + 1][k] > max)\n {\n cluster = k;\n max = allOutputs[hiddenLayers + 1][k];\n }\n }\n if(verbose)\n {\n System.out.println(\"Output \" + cluster + \" will be set to max value\");\n System.out.println();\n }\n\n expectedOutputs[cluster] = 4;\n\n\n //go backward from output to first hidden layer\n for(int k = hiddenLayers + 1; k > 0; k--)\n {\n //for each node in that layer\n for(int a = 0; a < sizes[k]; a++)\n {\n //compute error for not output layer\n if(k != hiddenLayers + 1)\n {\n double temp = allErrors[k][a];\n allErrors[k][a] = 0;\n for(int t = 0; t < sizes[k + 1]; t++)\n {\n allErrors[k][a] += net.getWeight(k, t, k + 1, a) * allErrors[k + 1][t];\n }\n allErrors[k][a] *= temp;\n }\n //compute error for output layer\n else\n {\n allErrors[k][a] *= (expectedOutputs[a] - allOutputs[k][a]);\n }\n\n //for each weight node takes as input\n for(int t = 0; t < sizes[k - 1]; t++)\n {\n //find the delta for the weight and apply\n int index = net.getIndex(k - 1, t, k, a);\n double delta = learningRate * allOutputs[k - 1][t] * allErrors[k][a]\n + momentum * lastDeltas[index];\n\n net.setWeight(k - 1, t, k, a, net.getWeight(k - 1, t, k, a) + delta);\n lastDeltas[index] = delta;\n }\n }\n }\n }", "public MutableArray(float[] paramArrayOfFloat, int paramInt, CustomDatumFactory paramCustomDatumFactory)\n/* */ {\n/* 213 */ this.sqlType = paramInt;\n/* 214 */ this.old_factory = paramCustomDatumFactory;\n/* 215 */ this.isNChar = false;\n/* */ \n/* 217 */ setArray(paramArrayOfFloat);\n/* */ }", "public abstract double initialize(double[][] rawData, int clusterCount);", "public CvSVM(Mat trainData, Mat responses, Mat varIdx, Mat sampleIdx, CvSVMParams params)\r\n {\r\n\r\n super( CvSVM_1(trainData.nativeObj, responses.nativeObj, varIdx.nativeObj, sampleIdx.nativeObj, params.nativeObj) );\r\n\r\n return;\r\n }", "public\nNuc2D(NucNode nuc)\nthrows Exception\n{\n\tsuper (nuc);\n}", "MatrixParameter createMatrixParameter();", "private void initClassAttributes(){ \r\n\t\tanyMissingValue = new boolean[3];\r\n\t\tanyMissingValue[0] = false; \r\n\t\tanyMissingValue[1] = false;\r\n\t\tanyMissingValue[2] = false;\r\n\t\tnumInputAttributes = Attributes.getInputNumAttributes();\r\n\t\tnumOutputAttributes = Attributes.getOutputNumAttributes();\r\n\t\tnumUndefinedAttributes = Attributes.getNumAttributes() - (numInputAttributes+numOutputAttributes);\r\n\t\tintNominalValues = new int[3][];\r\n\t\tnominalValues = new String[3][];\r\n\t\trealValues = new double[3][];\r\n\t\tmissingValues = new boolean[3][];\r\n\t\tnominalValues[0] = new String[numInputAttributes];\r\n\t\tnominalValues[1] = new String[numOutputAttributes];\r\n\t\tnominalValues[2] = new String[numUndefinedAttributes];\r\n\t\tintNominalValues[0] = new int[numInputAttributes];\r\n\t\tintNominalValues[1] = new int[numOutputAttributes];\r\n\t\tintNominalValues[2] = new int[numUndefinedAttributes];\r\n\t\trealValues[0] = new double[numInputAttributes];\r\n\t\trealValues[1] = new double[numOutputAttributes];\r\n\t\trealValues[2] = new double[numUndefinedAttributes];\r\n\t\tmissingValues[0] = new boolean[numInputAttributes];\r\n\t\tmissingValues[1] = new boolean[numOutputAttributes];\r\n\t\tmissingValues[2] = new boolean[numUndefinedAttributes];\r\n\r\n\t\tfor(int i=0;i<numInputAttributes;i++) missingValues[0][i]=false; \r\n\t\tfor(int i=0;i<numOutputAttributes;i++) missingValues[1][i]=false; \r\n\t\tfor(int i=0;i<numUndefinedAttributes; i++) missingValues[2][i]=false;\r\n\r\n\t}", "public double[][] getCovarianceMatrix(double[][] array)\n\tthrows IllegalArgumentException\n {\n\tif (covariance == null) {\n\t createCovariance();\n\t}\n\tif (array.length < covariance.length) {\n\t throw new IllegalArgumentException(errorMsg(\"argArrayTooShort\"));\n\t}\n\n\tint n = covariance.length;\n\tfor (int i = 0; i < n; i++) {\n\t if (array[i].length < covariance[i].length) {\n\t\tthrow new\n\t\t IllegalArgumentException(errorMsg(\"argArrayTooShort\"));\n\t }\n\t System.arraycopy(covariance[i],0, array[i],0, n);\n\t}\n\treturn array;\n }", "public ScalarParameterInformation(boolean isParameterToCalibrate) {\r\n\t\tsuper();\r\n\t\tthis.isParameterToCalibrate = isParameterToCalibrate;\r\n\t\tthis.constraint = new Unconstrained();\r\n\t}", "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 DigitalNetBase2 toNet() {\n DigitalNetBase2 net = initNetVar (false);\n for (int i = 0; i < dim * numCols; i++)\n net.genMat[i] = genMat[i];\n return net;\n }", "private void updateMuVariance() {\n\t\tmu = train.getLocalMean(); \n\t\tsigma = train.getLocalVariance(); \n\t\t\n\t\t/*\n\t\t * If the ratio of data variance between dimensions is too small, it \n\t\t * will cause numerical errors. To address this, we artificially boost\n\t\t * the variance by epsilon, a small fraction of the standard deviation\n\t\t * of the largest dimension. \n\t\t * */\n\t\tupdateEpsilon(); \n\t\tsigma = MathUtils.add(sigma, epsilon); \n\t\t\n\t}", "public DiagonalMultivariateGaussian(int ndims) {\n\t\tthis.mean = new Matrix(1, ndims);\n\t\tthis.variance = new double[ndims];\n\t\tArrays.fill(variance, 1);\n\t}", "public MultivariateGaussianDM(int dimen) {\n\t\tx = new DMatrixRMaj(dimen, 1);\n\t\tP = new DMatrixRMaj(dimen, dimen);\n\t}", "@Override\n public void init(float[] data) {\n this.data = data;\n\n //\n shapeArr = new Rectangle2D.Float[data.length];\n colorArr = new Color[data.length];\n pointArr = new Point2D.Float[data.length];\n }", "public interface MultivariateDistribution extends Cloneable, Serializable {\n /**\n * Computes the log of the probability density function. If the probability of\n * the input is zero, the log of zero would be {@link Double#NEGATIVE_INFINITY}.\n * Instead, -{@link Double#MAX_VALUE} is returned.\n *\n * @param x the array for the vector the get the log probability of\n * @return the log of the probability.\n * @throws ArithmeticException if the vector is not the correct length, or the\n * distribution has not yet been set\n */\n default public double logPdf(double... x) {\n return logPdf(DenseVector.toDenseVec(x));\n }\n\n /**\n * Computes the log of the probability density function. If the probability of\n * the input is zero, the log of zero would be {@link Double#NEGATIVE_INFINITY}.\n * Instead, -{@link Double#MAX_VALUE} is returned.\n *\n * @param x the vector the get the log probability of\n * @return the log of the probability.\n * @throws ArithmeticException if the vector is not the correct length, or the\n * distribution has not yet been set\n */\n public double logPdf(Vec x);\n\n /**\n * Returns the probability of a given vector from this distribution. By\n * definition, the probability will always be in the range [0, 1].\n *\n * @param x the array of the vector the get the log probability of\n * @return the probability\n * @throws ArithmeticException if the vector is not the correct length, or the\n * distribution has not yet been set\n */\n default public double pdf(double... x) {\n return pdf(DenseVector.toDenseVec(x));\n }\n\n /**\n * Returns the probability of a given vector from this distribution. By\n * definition, the probability will always be in the range [0, 1].\n *\n * @param x the vector the get the log probability of\n * @return the probability\n * @throws ArithmeticException if the vector is not the correct length, or the\n * distribution has not yet been set\n */\n default public double pdf(Vec x) {\n return Math.exp(logPdf(x));\n }\n\n /**\n * Sets the parameters of the distribution to attempt to fit the given list of\n * vectors. All vectors are assumed to have the same weight.\n *\n * @param <V> the vector type\n * @param dataSet the list of data points\n * @return <tt>true</tt> if the distribution was fit to the data, or\n * <tt>false</tt> if the distribution could not be fit to the data set.\n */\n default public <V extends Vec> boolean setUsingData(List<V> dataSet) {\n return setUsingData(dataSet, false);\n }\n\n /**\n * Sets the parameters of the distribution to attempt to fit the given list of\n * vectors. All vectors are assumed to have the same weight.\n *\n * @param <V> the vector type\n * @param dataSet the list of data points\n * @param parallel {@code true} if the training should be done using\n * multiple-cores, {@code false} for single threaded.\n * @return <tt>true</tt> if the distribution was fit to the data, or\n * <tt>false</tt> if the distribution could not be fit to the data set.\n */\n public <V extends Vec> boolean setUsingData(List<V> dataSet, boolean parallel);\n\n /**\n * Sets the parameters of the distribution to attempt to fit the given list of\n * data points. The {@link DataPoint#getWeight() weights} of the data points\n * will be used.\n *\n * @param dataPoints the list of data points to use\n * @return <tt>true</tt> if the distribution was fit to the data, or\n * <tt>false</tt> if the distribution could not be fit to the data set.\n */\n default public boolean setUsingDataList(List<DataPoint> dataPoints) {\n return setUsingData(dataPoints.stream().map(d -> d.getNumericalValues()).collect(Collectors.toList()));\n }\n\n /**\n * Sets the parameters of the distribution to attempt to fit the given list of\n * data points. The {@link DataPoint#getWeight() weights} of the data points\n * will be used.\n *\n * @param dataSet the data set to use\n * @return <tt>true</tt> if the distribution was fit to the data, or\n * <tt>false</tt> if the distribution could not be fit to the data set.\n */\n default public boolean setUsingData(DataSet dataSet) {\n return setUsingData(dataSet, false);\n }\n\n /**\n * Sets the parameters of the distribution to attempt to fit the given list of\n * data points. The {@link DataPoint#getWeight() weights} of the data points\n * will be used.\n *\n * @param dataSet the data set to use\n * @param parallel the source of threads for computation\n * @return <tt>true</tt> if the distribution was fit to the data, or\n * <tt>false</tt> if the distribution could not be fit to the data set.\n */\n default public boolean setUsingData(DataSet dataSet, boolean parallel) {\n return setUsingData(dataSet.getDataVectors(), parallel);\n }\n\n public MultivariateDistribution clone();\n\n /**\n * Performs sampling on the current distribution.\n *\n * @param count the number of iid samples to draw\n * @param rand the source of randomness\n * @return a list of sample vectors from this distribution\n */\n public List<Vec> sample(int count, Random rand);\n}", "public TwoClassConfusionMatrix() {\n\t}", "public NNImpl(ArrayList<Instance> trainingSet, int hiddenNodeCount, Double learningRate, int maxEpoch, Double [][]hiddenWeights, Double[] outputWeights)\r\n\t{\r\n\t\tthis.trainingSet=trainingSet;\r\n\t\tthis.learningRate=learningRate;\r\n\t\tthis.maxEpoch=maxEpoch;\r\n\r\n\t\t//input layer nodes\r\n\t\tinputNodes=new ArrayList<Node>();\r\n\t\tint inputNodeCount=trainingSet.get(0).attributes.size();\r\n\t\tint outputNodeCount=1;\r\n\t\tfor(int i=0;i<inputNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(0);\r\n\t\t\tinputNodes.add(node);\r\n\t\t}\r\n\r\n\t\t//bias node from input layer to hidden\r\n\t\tNode biasToHidden=new Node(1);\r\n\t\tinputNodes.add(biasToHidden);\r\n\r\n\t\t//hidden layer nodes\r\n\t\thiddenNodes=new ArrayList<Node> ();\r\n\t\tfor(int i=0;i<hiddenNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(2);\r\n\t\t\t//Connecting hidden layer nodes with input layer nodes\r\n\t\t\tfor(int j=0;j<inputNodes.size();j++)\r\n\t\t\t{\r\n\t\t\t\tNodeWeightPair nwp=new NodeWeightPair(inputNodes.get(j),hiddenWeights[i][j]);\r\n\t\t\t\tnode.parents.add(nwp);\r\n\t\t\t}\r\n\t\t\thiddenNodes.add(node);\r\n\t\t}\r\n\r\n\t\t//bias node from hidden layer to output\r\n\t\tNode biasToOutput=new Node(3);\r\n\t\thiddenNodes.add(biasToOutput);\r\n\r\n\r\n\r\n\t\tNode node=new Node(4);\r\n\t\t//Connecting output node with hidden layer nodes\r\n\t\tfor(int j=0;j<hiddenNodes.size();j++)\r\n\t\t{\r\n\t\t\tNodeWeightPair nwp=new NodeWeightPair(hiddenNodes.get(j), outputWeights[j]);\r\n\t\t\tnode.parents.add(nwp);\r\n\t\t}\t\r\n\t\toutputNode = node;\r\n\r\n\t}", "@Override\n protected void calculateCategoryRates(Node node) {\n\n double propVariable = 1.0;\n int cat = 0;\n\n //if (/*invarParameter != null && */invarParameter.getValue() > 0 ) {\n //System.out.println(\"----------------\");\n double pr;\n if(invPrLogit){\n pr = 1.0/(1.0 + Math.exp(-invarParameter.getValue()));\n //System.out.println(pr);\n }else{\n pr = invarParameter.getValue();\n }\n\n if (hasPropInvariantCategory) {\n categoryRates[0] = 0.0;\n //System.out.println(getCurrModel()+\" \"+INVAR_INDEX);\n categoryProportions[0] = pr*INDICATORS[getCurrModel()][INVAR_INDEX];\n //System.out.println(invarParameter.getValue()+\" \"+INDICATORS[getCurrModel()][INVAR_INDEX]);\n //System.out.println(\"categoryProportions[0]: \"+categoryProportions[0]);\n }\n\n //System.out.println(invarParameter.getID()+\" \" +invarParameter.getValue()+\" \"+pr);\n propVariable = 1.0 - pr*INDICATORS[getCurrModel()][INVAR_INDEX];\n if (hasPropInvariantCategory) {\n cat = 1;\n }\n //}\n\n //System.out.println(\"categoryProportions[0]: \"+categoryProportions[0]);\n\n if (INDICATORS[getCurrModel()][SHAPE_INDEX] == PRESENT) {\n\n final double a = shapeParameter.getValue();\n double mean = 0.0;\n final int gammaCatCount = categoryCount - cat;\n //System.out.println(\"a: \"+a);\n final GammaDistribution g = new GammaDistributionImpl(a, 1.0 / a);\n //System.out.println(\"gammaCatCount:\"+gammaCatCount);\n //if(gammaCatCount == 3){\n //throw new RuntimeException(\"\");\n //}\n for (int i = 0; i < gammaCatCount; i++) {\n try {\n // RRB: alternative implementation that seems equally good in\n // the first 5 significant digits, but uses a standard distribution object\n if(a < 1e-3){\n\n categoryRates[i + cat] = Double.NEGATIVE_INFINITY;\n }else if(a > 1e10){\n categoryRates[i + cat] = 1.0;\n }else if (useBeast1StyleGamma) {\n categoryRates[i + cat] = GammaDistributionQuantile((2.0 * i + 1.0) / (2.0 * gammaCatCount), a, 1.0 / a);\n \t} else {\n \t\tcategoryRates[i + cat] = g.inverseCumulativeProbability((2.0 * i + 1.0) / (2.0 * gammaCatCount));\n \t}\n\n } catch (Exception e) {\n e.printStackTrace();\n System.err.println(\"Something went wrong with the gamma distribution calculation\");\n System.exit(-1);\n }\n mean += categoryRates[i + cat];\n\n categoryProportions[i + cat] = propVariable / gammaCatCount;\n }\n\n if(a >= 1e-3 ){\n\n mean = (propVariable * mean) / gammaCatCount;\n\n for (int i = 0; i < gammaCatCount; i++) {\n\n categoryRates[i + cat] /= mean;\n\n }\n }\n } else {\n\n int gammaCatCount = categoryCount - cat;\n //System.out.println(\"Hi!\");\n for(int i = cat; i < categoryRates.length;i++){\n categoryRates[i] = 1.0 / propVariable/gammaCatCount;\n\n categoryProportions[i] = propVariable/gammaCatCount;\n }\n }\n /*System.out.println(\"-------------------------------\");\n System.out.println(\"ID: \"+getID());\n System.out.println(modelChoice);\n System.out.print (invarParameter.getValue()*INDICATORS[getCurrModel()][INVAR_INDEX]+\" \");\n System.out.println(getID());\n System.out.println(\"alpha: \"+shapeParameter.getValue());\n System.out.println(\"invPr: \"+invarParameter.getValue());\n System.out.println(\"siteModel: \"+modelChoice.getValue());\n System.out.println(\"rate: \"+muParameter.getValue());\n for(int i = 0; i < categoryRates.length;i++){\n System.out.print(categoryRates[i]+\" \");\n }\n System.out.println();\n\n System.out.println(invarParameter.getValue());\n for(int i = 0; i < categoryProportions.length;i++){\n\n System.out.print(categoryProportions[i]+\" \");\n }\n System.out.println();\n System.out.println(\"----------------\"); */\n\n\n ratesKnown = true;\n }", "public Vector2f (float[] values)\n {\n set(values);\n }", "public MultivariateGaussianDM(MultivariateGaussianDM d) {\n\t\tthis.x = new DMatrixRMaj(d.getMean());\n\t\tthis.P = new DMatrixRMaj(d.getCovariance());\n\t}", "public void init(float[] bias_inp, float[] bias_out,\n float[] bias_memin, float[] weight_memout,\n float outputbias) {\n cloneWeightMatrix();\n }", "MagLegendre( int nt ) \n {\n nTerms = nt;\n Pcup = new double[ nTerms + 1 ];\n dPcup = new double[ nTerms + 1 ];\n }", "protected abstract void fromSpace( float[] abc );", "@Override\n\tpublic Parameter[] getGridSearchParameters() {\n\t\treturn new Parameter[] { kernelCoefficient, kernelDegree, kernelGamma, parameterC, parameterNu };\n\t}", "ParameterRefinement createParameterRefinement();", "IVec3 mult(IVec3 v);", "public NNImpl(ArrayList<Instance> trainingSet, int hiddenNodeCount, Double learningRate, int maxEpoch, Double [][]hiddenWeights, Double[][] outputWeights)\r\n\t{\r\n\t\tthis.trainingSet=trainingSet;\r\n\t\tthis.learningRate=learningRate;\r\n\t\tthis.maxEpoch=maxEpoch;\r\n\r\n\t\t//input layer nodes\r\n\t\tinputNodes=new ArrayList<Node>();\r\n\t\tint inputNodeCount=trainingSet.get(0).attributes.size();\r\n\t\tint outputNodeCount=trainingSet.get(0).classValues.size();\r\n\t\tfor(int i=0;i<inputNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(0);\r\n\t\t\tinputNodes.add(node);\r\n\t\t}\r\n\r\n\t\t//bias node from input layer to hidden\r\n\t\tNode biasToHidden=new Node(1);\r\n\t\tinputNodes.add(biasToHidden);\r\n\r\n\t\t//hidden layer nodes\r\n\t\thiddenNodes=new ArrayList<Node> ();\r\n\t\tfor(int i=0;i<hiddenNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(2);\r\n\t\t\t//Connecting hidden layer nodes with input layer nodes\r\n\t\t\tfor(int j=0;j<inputNodes.size();j++)\r\n\t\t\t{\r\n\t\t\t\tNodeWeightPair nwp=new NodeWeightPair(inputNodes.get(j),hiddenWeights[i][j]);\r\n\t\t\t\tnode.parents.add(nwp);\r\n\t\t\t}\r\n\t\t\thiddenNodes.add(node);\r\n\t\t}\r\n\r\n\t\t//bias node from hidden layer to output\r\n\t\tNode biasToOutput=new Node(3);\r\n\t\thiddenNodes.add(biasToOutput);\r\n\r\n\t\t//Output node layer\r\n\t\toutputNodes=new ArrayList<Node> ();\r\n\t\tfor(int i=0;i<outputNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(4);\r\n\t\t\t//Connecting output layer nodes with hidden layer nodes\r\n\t\t\tfor(int j=0;j<hiddenNodes.size();j++)\r\n\t\t\t{\r\n\t\t\t\tNodeWeightPair nwp=new NodeWeightPair(hiddenNodes.get(j), outputWeights[i][j]);\r\n\t\t\t\tnode.parents.add(nwp);\r\n\t\t\t}\t\r\n\t\t\toutputNodes.add(node);\r\n\t\t}\t\r\n\t}", "public Object[] pca2originalgenerated(int nargout, Object... rhs) throws RemoteException;", "public void update(ChiVertex<Integer, RatingEdge> vertex, GraphChiContext context) {\n\t\tboolean isUser = vertex.numOutEdges() > 0;\n\t\tdouble[] nbrPVec = new double[params.numFactors];\n\t\t\n\t\tdouble[] vData = new double[params.numFactors];\n\t\tint sourceId = context.getVertexIdTranslate().backward(vertex.getId());\n\t\tparams.latentFactors.getRow(sourceId, vData);\n\t\t\n\t\t//Will be updated to store SUM(V_j*R_ij)\n\t\tRealVector Xty = new ArrayRealVector(params.numFactors);\n\t\t//Will be updated to store SUM(V_j*V_j')\n\t\tRealMatrix XtX = new BlockRealMatrix(params.numFactors, params.numFactors);\n\t\t\n\t\t//Gather data to update the mean and the covariance for the hidden features.\t\n\t\tfor(int i = 0; i < vertex.numEdges(); i++) {\n\t\t\tRatingEdge edge = vertex.edge(i).getValue(); \n\t\t\tdouble observation = edge.observation;\n\t\t\t\n\t\t\tint nbrId = context.getVertexIdTranslate().backward(vertex.edge(i).getVertexId());\n\t\t\tparams.latentFactors.getRow(nbrId, nbrPVec);\n\t\t\t////VertexDataType nbrVertex = params.latentFactors.get(nbrId);\n\t\t\t\n\t\t\t//Add V_j*R_ij for this observation.\n\t\t\t////Xty = Xty.add(nbrVertex.pVec.mapMultiply(observation));\n\t\t\tfor(int f = 0; f < params.numFactors; f++) {\n\t\t\t\tdouble value = Xty.getEntry(f) + nbrPVec[f]*observation;\n\t\t\t\tXty.setEntry(f, value);\n\t\t\t\t\n\t\t\t\t//Add V_j*V_j' for this\n\t\t\t\tfor(int f2 = 0; f2 < params.numFactors; f2++) {\n\t\t\t\t\tvalue = XtX.getEntry(f, f2) + nbrPVec[f]*nbrPVec[f2];\n\t\t\t\t\tXtX.setEntry(f, f2, value);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Add V_j*V_j' for this \n\t\t\t////XtX = XtX.add(nbrVertex.pVec.outerProduct(nbrVertex.pVec));\n\t\t\t\n\t\t}\n\t\t\n\t\tRealMatrix lambda_prior = isUser ? params.lambda_U : params.lambda_V;\n\t\tRealVector mu_prior = isUser ? params.mu_U : params.mu_V;\n\t\t\n\t\tRealMatrix precision = lambda_prior.add(XtX.scalarMultiply(params.alpha)); \n\t\tRealMatrix covariance = (new LUDecompositionImpl(precision).getSolver().getInverse());\n\t\t\n\t\tRealVector tmp = lambda_prior.operate(mu_prior);\n\t\tRealVector mean = covariance.operate(Xty.mapMultiply(params.alpha).add(tmp));\n\t\t\n\t\t//We have the covariance and mean. We can grab a sample from this multivariate\n\t\t//normal distribution according to: \n\t\t// http://en.wikipedia.org/wiki/Multivariate_normal_distribution#Drawing_values_from_the_distribution\n\t\t//Javadoc:\n\t\tMultivariateNormalDistribution dist = new MultivariateNormalDistribution(mean.toArray(), covariance.getData());\n\t\t////vData.pVec = new ArrayRealVector(dist.sample());\n\t\tvData = dist.sample();\n\t\tparams.latentFactors.setRow(sourceId, vData);\n\t\t\n\t\t//Compute contribution of all ratings for this vertex to RMSE.\n\t\tif(isUser) {\n\t\t\tfor(int i = 0; i < vertex.numEdges(); i++) {\n\t\t\t\tChiEdge<RatingEdge> edge = vertex.edge(i);\n\t\t\t\tRatingEdge pmfRatingEdge = edge.getValue();\n\t\t\t\tfloat observation = pmfRatingEdge.observation;\n\t\t\t\tint nbrId = context.getVertexIdTranslate().backward(vertex.edge(i).getVertexId());\n\t\t\t\tparams.latentFactors.getRow(nbrId, nbrPVec);\n\t\t\t\t\n\t\t\t\t//Aggregate the sample and compute rmse if greater than burn_in period\n\t\t\t\tdouble prediction = this.params.predict(vData, nbrPVec, datasetDesc);\n\t\t\t\tdouble squaredError = (observation - prediction)*(observation - prediction);\n\t\t\t\tsynchronized (this) {\n\t\t\t\t this.train_rmse += squaredError;\n\t }\n\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Update Sum of U_i / V_j\n\t\t//Should be synchronized? Or Atomic add of vectors?\n\t\tRealVector vDataVec = new ArrayRealVector(vData);\n\t\tRealMatrix vDataOuterProd = vDataVec.outerProduct(vDataVec);\n\t\tsynchronized (params) {\n\t\t\tif(isUser) {\n\t\t\t\t\tparams.sumU = params.sumU.add(vDataVec);\n\t\t\t\t\tparams.sumUUT = params.sumUUT.add(vDataOuterProd);\n\t\t\t} else {\n\t\t\t\tparams.sumV = params.sumV.add(vDataVec);\n\t\t\t\tparams.sumVVT = params.sumVVT.add(vDataOuterProd);\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic Object backward(Object grad_output) {\n\t\t\n\t\tdouble[] grads=(double[])grad_output;\n\t\t\n\t\t//for weights\n\t\tweights_gradients=new double[weights.length][];\n\t\tfor(int i=0;i<weights.length;i++)\n\t\t{\n\t\t\tweights_gradients[i]=grads;\n\t\t}\n\t\t\n\t\t//for grad_inputs\n\t\tdouble[] grad_inputs=MatrixTool.MatrixRightDotVector(weights, grads);\n\t\treturn grad_inputs;\n\t}", "@Override\n\tpublic Object forward(Object input) {\n\t\t\n\t\tdouble[] inputs=(double[])input;\n\t\tdouble[] output=MatrixTool.VectorRightDotMatrix(inputs, weights);\n\t\t\n\t\treturn output;\n\t}", "private double[] varianceArray(){\n\t\tdouble[] varianceVals = new double[values.length];\n\t\tfor(int i = 0; i < values.length; i++){\n\t\t\tvarianceVals[i] = Math.pow(values[i] - mean , 2.0);\n\t\t}\n\t\treturn varianceVals;\n\t}", "public MnScan(FCNBase fcn, double[] par, MnUserCovariance cov) {\n this(fcn, par, cov, DEFAULT_STRATEGY);\n }", "public FcmLearner(double [][] matrix){\n this.adjacencyMatrix = matrix;\n }", "public DoubleMatrixDataset() {\r\n }", "NNImpl(ArrayList<Instance> trainingSet, int hiddenNodeCount, Double learningRate, int maxEpoch, Random random, Double[][] hiddenWeights, Double[][] outputWeights) {\r\n this.trainingSet = trainingSet;\r\n this.learningRate = learningRate;\r\n this.maxEpoch = maxEpoch;\r\n this.random = random;\r\n\r\n //input layer nodes\r\n inputNodes = new ArrayList<>();\r\n int inputNodeCount = trainingSet.get(0).attributes.size();\r\n int outputNodeCount = trainingSet.get(0).classValues.size();\r\n for (int i = 0; i < inputNodeCount; i++) {\r\n Node node = new Node(0);\r\n inputNodes.add(node);\r\n }\r\n\r\n //bias node from input layer to hidden\r\n Node biasToHidden = new Node(1);\r\n inputNodes.add(biasToHidden);\r\n\r\n //hidden layer nodes\r\n hiddenNodes = new ArrayList<>();\r\n for (int i = 0; i < hiddenNodeCount; i++) {\r\n Node node = new Node(2);\r\n //Connecting hidden layer nodes with input layer nodes\r\n for (int j = 0; j < inputNodes.size(); j++) {\r\n NodeWeightPair nwp = new NodeWeightPair(inputNodes.get(j), hiddenWeights[i][j]);\r\n node.parents.add(nwp);\r\n }\r\n hiddenNodes.add(node);\r\n }\r\n\r\n //bias node from hidden layer to output\r\n Node biasToOutput = new Node(3);\r\n hiddenNodes.add(biasToOutput);\r\n\r\n //Output node layer\r\n outputNodes = new ArrayList<>();\r\n for (int i = 0; i < outputNodeCount; i++) {\r\n Node node = new Node(4);\r\n //Connecting output layer nodes with hidden layer nodes\r\n for (int j = 0; j < hiddenNodes.size(); j++) {\r\n NodeWeightPair nwp = new NodeWeightPair(hiddenNodes.get(j), outputWeights[i][j]);\r\n node.parents.add(nwp);\r\n }\r\n outputNodes.add(node);\r\n }\r\n }", "public TwoBody(double mu, double[] x)\n\t{\n\t\tif (x.length < 6)\n\t\t{\n\t\t\tSystem.out.println(\"can't create a TwoBody with array < 6 elements\");\n\t\t}\n\t\tthis.mu = mu;\n\t\tVectorN r = new VectorN(x[0], x[1], x[2]);\n\t\tVectorN v = new VectorN(x[3], x[4], x[5]);\n\t\trv2Elements(r, v);\n\t}", "@Override\n\tpublic double[][] calc() {\n\t\tfor (int i=0; i<this.singleMatrix.length; i++) {\n\t\t\t\n\t\t\tfor (int j=0; j<this.singleMatrix[i].length; j++) {\n\t\t\t\t\n\t\t\t\tthis.inverse = new double[this.singleMatrix.length][this.singleMatrix[i].length];\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tif (this.det != 0) {\t//if determinant is not 0.\n\t\t\t\n\t\t\tfor (int i=0; i<this.singleMatrix.length; i++) {\t\n\t\t\t\t\n\t\t\t\tfor (int j=0; j<this.singleMatrix[i].length; j++) {\n\t\t\t\t\t\n\t\t\t\t\tthis.cT = new double[this.singleMatrix.length][this.singleMatrix[i].length];\t//declare the size of co-factor matrix transposed\n\n\t\t\t\t\tthis.cT[i][j] = this.coFactor[j][i];\t//the rows of cT = the cols of coFactor matrix. the cols of cT = the rows of coFactor matrix\n\t\t\t\t\t\n\t\t\t\t\t/* # you might want to initialize this.inverse and calculate right after the above cT calculation done as follow,\n\t\t\t\t\t \n\t\t\t\t\t \t--------------------------------------------------------------------------------------\n\t\t\t\t\t \t- this.inverse = new double[this.singleMatrix.length][this.singleMatrix[i].length]; -\n\t\t\t\t\t \t- this.inverse[i][j] = 1 / this.det * this.cT[i][j]; -\n\t\t\t\t\t \t--------------------------------------------------------------------------------------\n\t\t\t\t\t \n\t\t\t\t\t technically, it's not really a problem when it comes to initializing one more variable in the same loop.\n\t\t\t\t\t however, this specific situation, that three variables (coFacotr, cT and inverse) and their values are involved in, occurs an unexpected result which is still not an error.\n\t\t\t\t\t \n\t\t\t\t\t this.coFactor is done in a loop in initializing and calculating \n\t\t\t\t\t this.cT and this.inverse are done in a loop in initializing and calculating\n\t\t\t\t\t \n\t\t\t\t\t # thus, calculation goes as it goes and this.inverse will be kept initializing until the loop ends.\n\t\t\t\t\t this.inverse will then always & only store its running value at a current location depending on increment of i and j.\n\t\t\t\t\t you will see only one result at the last index and won't see all the values stored correctly.\n\t\t\t\t\t (all of the values will be zero except the last value at the last index)\n\t\t\t\t\t \n\t\t\t\t\t # one simple solution is to initialize and calculate a variable -inverse in this case- in a separate for-loop\n\t\t\t\t\t \n\t\t\t\t\t */\n\n\t\t\t\t\t//calculate inverse here but initialize it in another for-loop\n\t\t\t\t\tthis.inverse[i][j] = 1 / this.det * this.cT[i][j]; //formula: A-1 = 1 / det * cT\n\t\t\t\t}\t\n\t\t\t}\n\t\t\t\n\t\t}else {\t//det is 0\n\t\t\t\n\t\t\tSystem.out.println(\"\\nThe matrix is a singular. singular matrices can not have inverses.\");\n\t\t}\n\t\t\n\t\t//print\n\t\tSystem.out.println(\"\\nInverse of the current matrix is: \");\n\t\tfor (int i=0; i<this.singleMatrix.length; i++) {\n\t\t\t\t\t\n\t\t\tfor (int j=0; j<this.singleMatrix[i].length; j++) {\n\t\t \t\t\n\t\t\t\tSystem.out.print(String.format(\"%.2f\", this.inverse[i][j]) + \" \");\t//display the result with a space between value representing as two decimal point\n//\t\t\t\tSystem.out.print(this.inverse[i][j] + \" \");\t//display the result with a space between value representing as two decimal point\n\t\t\t}\n\t\tSystem.out.println();\t//a new line for the next row and cols\n\t\t}\n\t\t\n\t\treturn inverse;\t//return the value of inverse\n\t}", "static Nda<Double> of( double... value ) { return Tensor.of( Double.class, Shape.of( value.length ), value ); }", "@Override\n public Object getNDArray() {\n NDArray<?>[] arr = new NDArray[2];\n arr[0] = new NDArray<>(getMagGrid().getFloats(), getMagGrid().getYdim(),\n getMagGrid().getXdim());\n arr[1] = new NDArray<>(getDirGrid().getFloats(), getDirGrid().getYdim(),\n getDirGrid().getXdim());\n return arr;\n }", "public abstract double gradient(double betaForDimension, int dimension);", "public abstract double[] generate(double[] inputs, Matrix metaData);", "MixtureOfExperts(int nExperts){\r\n\t\twritePosteriorThreshold = 0.0;\r\n\t\testimationPosteriorThreshold = 0.0;\r\n\t\tnumberOfExperts = nExperts;\r\n\t\tlogProbOfCluster = new float[numberOfExperts];\r\n numberOfUsers = 0;\r\n \r\n\t}", "public VFunction2D() {\n \n \n }", "@Override\r\n\t\tpublic double[] gradient(double x, double... parameters) {\n\t\t\tfinal double a = parameters[0];\r\n\t\t\tfinal double b = parameters[1];\r\n\t\t\tfinal double c = parameters[2];\r\n\t\t\tfinal double d = parameters[3];\r\n\t\t\tfinal double e = parameters[4];\r\n\t\t\t\r\n\t\t\tdouble[] gradients = new double[5];\r\n\t\t\t//double den = 1 + Math.pow((x+e)/c, b);\r\n\t\t\t//gradients[0] = 1 / den; // Yes a Derivation \r\n\t\t\t//gradients[1] = -((a - d) * Math.pow(x / c, b) * Math.log(x / c)) / (den * den); // Yes b Derivation \r\n\t\t\t//gradients[2] = (b * Math.pow(x / c, b - 1) * (x / (c * c)) * (a - d)) / (den * den); // Yes c Derivation \r\n\t\t\t//gradients[3] = 1 - (1 / den); // Yes d Derivation \r\n\t\t\t\r\n\t\t\t//Derivation\r\n\t\t\tfinal double c_b = Math.pow(c, b);\r\n\t\t\tfinal double c_b1 = Math.pow(c, b+1.);\r\n\t\t\tfinal double c_2b = Math.pow(c, 2.*b);\r\n\t\t\tfinal double c_2b1 = Math.pow(c, 2.*b+1.);\r\n\t\t\t\r\n\t\t\tfinal double xe_b = Math.pow(x+e, b);\r\n\t\t\tfinal double xe_2b = Math.pow(x+e, 2.*b);\r\n\t\t\tfinal double xe_2b1 = Math.pow(x+e, 2.*b+1.);\r\n\t\t\t\r\n\t\t\tgradients[0] = c_b/(xe_b+c_b);\r\n\t\t\tgradients[1] = ((c_b*d-a*c_b)*xe_b*Math.log(x+e)+(a*c_b*Math.log(c)-c_b*Math.log(c)*d)*xe_b)/(xe_2b+2*c_b*xe_b+c_2b);\r\n\t\t\tgradients[2] = -((b*c_b*d-a*b*c_b)*xe_b)/(c*xe_2b+2*c_b1*xe_b+c_2b1);\r\n\t\t\tgradients[3] = xe_b/(xe_b+c_b);\r\n\t\t\tgradients[4] = ((b*c_b*d-a*b*c_b)*xe_b)/(xe_2b1+xe_b*(2*c_b*x+2*c_b*e)+c_2b*x+c_2b*e);\r\n\t\t\treturn gradients;\r\n\t\t}", "private static void CreateClassifierVec(Dataset set, int dim_num,\n\t\t\tArrayList<KDNode> class_buff, int vec_offset) {\n\t\t\t\n\t\tAttribute atts[] = new Attribute[set.size()];\n\t\t// Declare the class attribute along with its values\n\t\t FastVector fvClassVal = new FastVector(4);\n\t\t fvClassVal.addElement(\"n2\");\n\t\t fvClassVal.addElement(\"n1\");\n\t\t fvClassVal.addElement(\"p1\");\n\t\t fvClassVal.addElement(\"p2\");\n\t\t Attribute ClassAttribute = new Attribute(\"theClass\", fvClassVal);\n\t \n\t\tFastVector fvWekaAttributes = new FastVector(set.size() + 1);\n\t for(int i=0; i<set.size(); i++) {\n\t \tatts[i] = new Attribute(\"att\"+i);\n\t \tfvWekaAttributes.addElement(atts[i]);\n\t }\n\t \n\t fvWekaAttributes.addElement(ClassAttribute);\n\t \n\t Instances isTrainingSet = new Instances(\"Rel\", fvWekaAttributes, class_buff.size()); \n\t isTrainingSet.setClassIndex(set.size());\n\t\t\n\t for(int k=0; k<class_buff.size(); k++) {\n\t \t\n\t \tArrayList<Integer> data_set = new ArrayList<Integer>();\n\t\t\tfor(int j=0; j<set.size(); j++) {\n\t\t\t\t\n\t\t\t\t\tint offset = 0;\n\t\t\t\t\tSet<Entry<Integer, Double>> s = set.instance(j).entrySet();\n\t\t\t\t\tdouble sample[] = new double[dim_num];\n\t\t\t\t\tfor(Entry<Integer, Double> val : s) {\n\t\t\t\t\t\tsample[offset++] = val.getValue();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tint output = class_buff.get(k).classifier.Output(sample);\n\t\t\t\t\tdata_set.add(output);\n\t\t\t}\n\t\t\t\n\t\t\tif(data_set.size() != set.size()) {\n\t\t\t\tSystem.out.println(\"dim mis\");System.exit(0);\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tInstance iExample = new Instance(set.size() + 1);\n\t\t\tfor(int j=0; j<set.size(); j++) {\n\t\t\t\tiExample.setValue(j, data_set.get(j));\n\t\t\t}\n\t\t\t\n\t\t\tif(Math.random() < 0.5) {\n\t\t\t\tiExample.setValue((Attribute)fvWekaAttributes.elementAt(set.size()), \"n1\"); \n\t\t\t} else {\n\t\t\t\tiExample.setValue((Attribute)fvWekaAttributes.elementAt(set.size()), \"p1\"); \n\t\t\t}\n\t\t\t \n\t\t\t// add the instance\n\t\t\tisTrainingSet.add(iExample);\n\t }\n\t\t\n\t System.out.println(dim_num+\" *************\");\n\t int select_num = 16;\n\t\tPrincipalComponents pca = new PrincipalComponents();\n\t\t//pca.setVarianceCovered(0.1);\n Ranker ranker = new Ranker();\n ranker.setNumToSelect(select_num);\n AttributeSelection selection = new AttributeSelection();\n selection.setEvaluator(pca);\n \n Normalize normalizer = new Normalize();\n try {\n normalizer.setInputFormat(isTrainingSet);\n isTrainingSet = Filter.useFilter(isTrainingSet, normalizer);\n \n selection.setSearch(ranker);\n selection.SelectAttributes(isTrainingSet);\n isTrainingSet = selection.reduceDimensionality(isTrainingSet);\n\n } catch (Exception e) {\n e.printStackTrace();\n System.exit(0);\n }\n \n for(int i=0; i<class_buff.size(); i++) {\n \tInstance inst = isTrainingSet.instance(i);\n \tdouble val[] = inst.toDoubleArray();\n \tint offset = vec_offset;\n \t\n \tfloat length = 0;\n \tfor(int j=0; j<select_num; j++) {\n \t\tlength += val[j] * val[j];\n \t}\n \t\n \tlength = (float) Math.sqrt(length);\n \tfor(int j=0; j<select_num; j++) {\n \t\tclass_buff.get(i).class_vect[offset++] = val[j] / length;\n \t}\n }\n\t}", "public MultivariateGaussianDM(DMatrixRMaj x, DMatrixRMaj P) {\n\t\tthis.x = new DMatrixRMaj(x);\n\t\tthis.P = new DMatrixRMaj(P);\n\t}", "public interface FeatureFunction {\n double value(Vector vector, MultiLabel multiLabel);\n}", "@Test\n public void testBuildGraph_FactorArr_booleanArrArr() {\n\n char[][] adjacency = new char[][]{\n {0, 0, 0, 0, 0, 0, 0, 1, 0, 0},\n {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},\n {0, 1, 0, 0, 0, 0, 0, 0, 0, 0},\n {0, 0, 1, 0, 0, 0, 0, 0, 0, 0},\n {0, 0, 0, 1, 0, 0, 0, 0, 0, 0},\n {0, 0, 0, 0, 0, 0, 1, 0, 0, 0},\n {1, 0, 0, 0, 0, 0, 0, 0, 0, 0},\n {0, 0, 0, 0, 1, 0, 0, 0, 0, 0},\n {0, 0, 0, 0, 0, 1, 0, 0, 0, 0},\n {0, 0, 0, 0, 0, 0, 0, 0, 1, 0},\n };\n\n CostFunction[][] factors = new CostFunction[][]{\n {factory.buildCostFunction( new Variable[]{v[0],v[7]}, 0 )},\n {},\n {factory.buildCostFunction( new Variable[]{v[1],v[2]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[2],v[3]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[3],v[4]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[1],v[3],v[4]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[1],v[5]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[2],v[6]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[1],v[6],v[7]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[6]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[3],v[7]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[4],v[8]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[5],v[8]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[8]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[2],v[5],v[9]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[5],v[6],v[9]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[4],v[7],v[9]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[8],v[9]}, 0 )},\n };\n\n GdlFactory gf = new GdlFactory();\n UPGraph result = JunctionTreeAlgo.buildGraph(gf, factors, adjacency);\n //System.out.println(result);\n }", "@Override\n\tpublic void train(DataSet data) {\n\t\tArrayList<Example> examples = data.getCopyWithBias().getData();\n\t\t// initialize both weight vectors with random values between -0.1 ad 0.1\n\t\tinitWeights(examples.size());\n\n\t\t// store outputs from forward calculation for each example\n\t\t// array will have size # examples.\n\t\tArrayList<Double> nodeOutputs = calculateForward(examples);\n\n\t\t// now take error and back-propagate from output to hidden nodes\n\n\t\tfor (int j = 0; j < examples.size(); j++) {\n\t\t\tExample ex = examples.get(j);\n\n\t\t\t// get hidden node outputs for single example\n\t\t\tfor (int num = 0; num < numHidden; num++) {\n\t\t\t\tArrayList<Double> h_outputs = hiddenOutputs.get(num);\n\t\t\t\tdouble vDotH = dotProduct(h_outputs, layerTwoWeights); // calculate\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// v dot\n\t\t\t\t// h for\n\t\t\t\t// this node\n\n\t\t\t\tfor (int i = 0; i < numHidden - 1; i++) {\n\t\t\t\t\tdouble oldV = layerTwoWeights.get(i);\n\t\t\t\t\tdouble hk = h_outputs.get(i);\n\t\t\t\t\t// Equation describing line below:\n\t\t\t\t\t// v_k = v_k + eta*h_k(y-f(v dot h)) f'(v dot h)\n\t\t\t\t\tlayerTwoWeights.set(i, oldV + eta * hk * (ex.getLabel() - Math.tanh(vDotH)) * derivative(vDotH));\n\t\t\t\t}\n\n\t\t\t\tSet<Integer> features = ex.getFeatureSet();\n\t\t\t\tIterator<Integer> iter = features.iterator();\n\t\t\t\tArrayList<Double> featureVals = new ArrayList<Double>();\n\t\t\t\tfor (int f : features) {\n\t\t\t\t\tfeatureVals.add((double) f);\n\t\t\t\t}\n\n\t\t\t\t// take that error and back-propagate one more time\n\t\t\t\tfor (int x = 0; x < numHidden; x++) {\n\t\t\t\t\tArrayList<Double> initWeights = hiddenWeights.get(x);\n\t\t\t\t\t// List<Object> features =\n\t\t\t\t\t// Arrays.asList(ex.getFeatureSet().toArray());\n\n\t\t\t\t\t// for (int i = 0; i < featureVals.size()-1; i++) {\n\t\t\t\t\tdouble oldWeight = initWeights.get(j);\n\t\t\t\t\tdouble thisInput = ex.getFeature(featureVals.get(x).intValue());\n\t\t\t\t\t// w_kj = w_kj + eta*xj(input)*f'(w_k dot x)*v_k*f'(v dot\n\t\t\t\t\t// h)(y-f(v dot h))\n\t\t\t\t\tdouble updateWeight = oldWeight + eta * thisInput * derivative(dotProduct(featureVals, initWeights))\n\t\t\t\t\t\t\t* layerTwoWeights.get(x) * derivative(vDotH) * (ex.getLabel() - Math.tanh(vDotH));\n\t\t\t\t\tinitWeights.set(j, updateWeight);\n\t\t\t\t\t// }\n\t\t\t\t\thiddenWeights.set(x, initWeights); // update weights for\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// current\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// example\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "public final NDArray[] decompose(NDArray input) {\n if (input.shape().order() < 3) {\n return onMatrix(input);\n }\n NDArray[][] results = new NDArray[components][input.shape().sliceLength];\n for (int i = 0; i < input.shape().sliceLength; i++) {\n NDArray[] slice = onMatrix(input.slice(i));\n for (int j = 0; j < components; j++) {\n results[j][i] = slice[j];\n }\n }\n NDArray[] out = new NDArray[components];\n for (int j = 0; j < components; j++) {\n out[j] = new Tensor(input.kernels(), input.channels(), results[j]);\n }\n return out;\n }", "public Object[] pca2(int nargout, Object... rhs) throws RemoteException;", "protected void Initialize (double[] pars) {\n for (int j = 0; j < scalarn; j++) {\n vectorXBeta[j] = 0;\n for (int i = 0; i <= scalarK; i++)\n vectorXBeta[j] += matrixX[j][i] * pars[i];\n }\n\n double y;\n for (int j = 0; j < scalarn; j++) {\n // Yjk, Phijk, Njk\n if (vectorY[j] == scalarM) {\n vectorPhiDiff[j] = 1.0;\n vectorNk[j] = 0.0;\n vectorNYk[j] = 0.0;\n } else {\n if (vectorY[j] == 1)\n y = 0.0 - vectorXBeta[j];\n else\n // pars[scalarK+1] is for mu_2 and\n y = pars[scalarK + vectorY[j] - 1] - vectorXBeta[j];\n vectorPhiDiff[j] = NormalDistribution.CDF (y);\n vectorNk[j] = NormalDistribution.PDF (y);\n vectorNYk[j] = vectorNk[j] * y;\n }\n\n // Yj(k-1), Phij(k-1), Nj(k-1)\n if (vectorY[j] == 1) {\n vectorNk1[j] = 0.0;\n vectorNYk1[j] = 0.0;\n } else {\n if (vectorY[j] == 2)\n y = 0.0 - vectorXBeta[j];\n else\n y = pars[scalarK + vectorY[j] - 2] - vectorXBeta[j];\n vectorPhiDiff[j] = vectorPhiDiff[j] - NormalDistribution.CDF (y);\n vectorNk1[j] = NormalDistribution.PDF (y);\n vectorNYk1[j] = vectorNk1[j] * y;\n }\n }\n }", "public void train(double[] inputs, double[] outputsTarget) {\n assert(outputsTarget.length == weights.get(weights.size() - 1).length);\n \n ArrayList<double[]> layersOutputs = new ArrayList<double[]>(); \n classify(inputs, layersOutputs);\n\n // Calculate sensitivities for the output nodes\n int outputNeuronCount = this.weights.get(this.weights.size() - 1).length;\n double[] nextLayerSensitivities = new double[outputNeuronCount];\n assert(layersOutputs.get(layersOutputs.size() - 1).length == outputNeuronCount);\n for (int i = 0; i < outputNeuronCount; i++) {\n nextLayerSensitivities[i] = calculateErrorPartialDerivitive(\n layersOutputs.get(layersOutputs.size() - 1)[i],\n outputsTarget[i]\n ) * calculateActivationDerivitive(layersOutputs.get(layersOutputs.size() - 1)[i]);\n assert(!Double.isNaN(nextLayerSensitivities[i]));\n }\n\n for (int weightsIndex = this.weights.size() - 1; weightsIndex >= 0; weightsIndex--) {\n int previousLayerNeuronCount = this.weights.get(weightsIndex)[0].length;\n int nextLayerNeuronCount = this.weights.get(weightsIndex).length;\n assert(nextLayerSensitivities.length == nextLayerNeuronCount);\n\n double[] previousLayerOutputs = layersOutputs.get(weightsIndex);\n double[] previousLayerSensitivities = new double[previousLayerNeuronCount];\n\n // Iterate over neurons in the previous layer\n for (int j = 0; j < previousLayerNeuronCount; j++) {\n\n // Calculate the sensitivity of this node\n double sensitivity = 0;\n for (int i = 0; i < nextLayerNeuronCount; i++) {\n sensitivity += nextLayerSensitivities[i] * this.weights.get(weightsIndex)[i][j];\n }\n sensitivity *= calculateActivationDerivitive(previousLayerOutputs[j]);\n assert(!Double.isNaN(sensitivity));\n previousLayerSensitivities[j] = sensitivity;\n\n for (int i = 0; i < nextLayerNeuronCount; i++) {\n double weightDelta = learningRate * nextLayerSensitivities[i] * calculateActivation(previousLayerOutputs[j]);\n this.weights.get(weightsIndex)[i][j] += weightDelta;\n assert(!Double.isNaN(this.weights.get(weightsIndex)[i][j]) && !Double.isInfinite(this.weights.get(weightsIndex)[i][j]));\n }\n }\n\n nextLayerSensitivities = previousLayerSensitivities;\n }\n }", "public DigitalNetBase2 toNetShiftCj() {\n DigitalNetBase2 net = initNetVar (true);\n int c;\n for (c = (dim + 1) * numCols - 1; c >= numCols; --c)\n net.genMat[c] = genMat[c - numCols];\n\n // the first dimension, j = 0.\n for (c = 0; c < numCols; c++)\n net.genMat[c] = (1 << (outDigits-numCols+c));\n return net;\n }", "public double transfer(double[] inputs, double[] weights) throws Exception;", "protected void initVar2Factor(int[] nodes)\n {\n for(int x=0, N=nodes.length; x < N; x++)\n {\n int n = nodes[x];\n VariableNode vn = _fg.getVarNode(n);\n ProbTable pt = vn.getProbs();\n \n List messages = _fg.getAdjacentMessages(n);\n for(int m=0, M=messages.size(); m < M; m++)\n {\n EdgeMessage em = (EdgeMessage) messages.get(m);\n em.v2f(pt);\n }\n }\n }", "public double[] propagate( double t0, double[] xin, double tf);", "@ParameterizedTest\n @MethodSource(\"org.nd4j.linalg.BaseNd4jTestWithBackends#configs\")\n public void testBatchNormBpNHWC(Nd4jBackend backend) {\n\n INDArray in = Nd4j.rand(DataType.FLOAT, 2, 4, 4, 3);\n INDArray eps = Nd4j.rand(DataType.FLOAT, in.shape());\n INDArray epsStrided = eps.permute(1,0,2,3).dup().permute(1,0,2,3);\n INDArray mean = Nd4j.rand(DataType.FLOAT, 3);\n INDArray var = Nd4j.rand(DataType.FLOAT, 3);\n INDArray gamma = Nd4j.rand(DataType.FLOAT, 3);\n INDArray beta = Nd4j.rand(DataType.FLOAT, 3);\n\n assertEquals(eps, epsStrided);\n\n INDArray out1eps = in.like().castTo(DataType.FLOAT);\n INDArray out1m = mean.like().castTo(DataType.FLOAT);\n INDArray out1v = var.like().castTo(DataType.FLOAT);\n\n INDArray out2eps = in.like().castTo(DataType.FLOAT);\n INDArray out2m = mean.like().castTo(DataType.FLOAT);\n INDArray out2v = var.like().castTo(DataType.FLOAT);\n\n DynamicCustomOp op1 = DynamicCustomOp.builder(\"batchnorm_bp\")\n .addInputs(in, mean, var, gamma, beta, eps)\n .addOutputs(out1eps, out1m, out1v)\n .addIntegerArguments(1, 1, 3)\n .addFloatingPointArguments(1e-5)\n .build();\n\n DynamicCustomOp op2 = DynamicCustomOp.builder(\"batchnorm_bp\")\n .addInputs(in, mean, var, gamma, beta, epsStrided)\n .addOutputs(out2eps, out2m, out2v)\n .addIntegerArguments(1, 1, 3)\n .addFloatingPointArguments(1e-5)\n .build();\n\n Nd4j.exec(op1);\n Nd4j.exec(op2);\n\n assertEquals(out1eps, out2eps); //Fails here\n assertEquals(out1m, out2m);\n assertEquals(out1v, out2v);\n }", "@Override\n public double classifyInstance(Instance instance) throws Exception {\n\n\n\n int numAttributes = instance.numAttributes();\n int clsIndex = instance.classIndex();\n boolean hasClassAttribute = true;\n int numTestAtt = numAttributes -1;\n if (numAttributes == m_numOfInputNeutrons) {\n hasClassAttribute = false; // it means the test data doesn't has class attribute\n numTestAtt = numTestAtt+1;\n }\n\n for (int i = 0; i< numAttributes; i++){\n if (instance.attribute(i).isNumeric()){\n\n double max = m_normalization[0][i];\n double min = m_normalization[1][i];\n double normValue = 0 ;\n if (instance.value(i)<min) {\n normValue = 0;\n m_normalization[1][i] = instance.value(i); // reset the smallest value\n }else if(instance.value(i)> max){\n normValue = 1;\n m_normalization[0][i] = instance.value(i); // reset the biggest value\n }else {\n if (max == min ){\n if (max == 0){\n normValue = 0;\n }else {\n normValue = max/Math.abs(max);\n }\n }else {\n normValue = (instance.value(i) - min) / (max - min);\n }\n }\n instance.setValue(i, normValue);\n }\n }\n\n double[] testData = new double[numTestAtt];\n\n\n\n\n\n int index = 0 ;\n\n if (!hasClassAttribute){\n\n for (int i =0; i<numAttributes; i++) {\n testData[i] = instance.value(i);\n }\n }else {\n for (int i = 0; i < numAttributes; i++) {\n\n if (i != clsIndex) {\n\n testData[index] = instance.value(i);\n\n index++;\n }\n }\n }\n\n\n\n DenseMatrix prediction = new DenseMatrix(numTestAtt,1);\n for (int i = 0; i<numTestAtt; i++){\n prediction.set(i, 0, testData[i]);\n }\n\n DenseMatrix H_test = generateH(prediction,weightsOfInput,biases, 1);\n\n DenseMatrix H_test_T = new DenseMatrix(1, m_numHiddenNeurons);\n\n H_test.transpose(H_test_T);\n\n DenseMatrix output = new DenseMatrix(1, m_numOfOutputNeutrons);\n\n H_test_T.mult(weightsOfOutput, output);\n\n double result = 0;\n\n if (m_typeOfELM == 0) {\n double value = output.get(0,0);\n result = value*(m_normalization[0][classIndex]-m_normalization[1][classIndex])+m_normalization[1][classIndex];\n //result = value;\n if (m_debug == 1){\n System.out.print(result + \" \");\n }\n }else if (m_typeOfELM == 1){\n int indexMax = 0;\n double labelValue = output.get(0,0);\n\n if (m_debug == 1){\n System.out.println(\"Each instance output neuron result (after activation)\");\n }\n for (int i =0; i< m_numOfOutputNeutrons; i++){\n if (m_debug == 1){\n System.out.print(output.get(0,i) + \" \");\n }\n if (output.get(0,i) > labelValue){\n labelValue = output.get(0,i);\n indexMax = i;\n }\n }\n if (m_debug == 1){\n\n System.out.println(\"//\");\n System.out.println(indexMax);\n }\n result = indexMax;\n }\n\n\n\n return result;\n\n\n }", "public MutableArray(double[] paramArrayOfDouble, int paramInt, CustomDatumFactory paramCustomDatumFactory)\n/* */ {\n/* 191 */ this.sqlType = paramInt;\n/* 192 */ this.old_factory = paramCustomDatumFactory;\n/* 193 */ this.isNChar = false;\n/* */ \n/* 195 */ setArray(paramArrayOfDouble);\n/* */ }", "public void c(double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat1, float paramFloat2)\r\n/* 77: */ {\r\n/* 78: 89 */ float f1 = uv.a(paramDouble1 * paramDouble1 + paramDouble2 * paramDouble2 + paramDouble3 * paramDouble3);\r\n/* 79: */ \r\n/* 80: 91 */ paramDouble1 /= f1;\r\n/* 81: 92 */ paramDouble2 /= f1;\r\n/* 82: 93 */ paramDouble3 /= f1;\r\n/* 83: */ \r\n/* 84: 95 */ paramDouble1 += this.V.nextGaussian() * 0.007499999832361937D * paramFloat2;\r\n/* 85: 96 */ paramDouble2 += this.V.nextGaussian() * 0.007499999832361937D * paramFloat2;\r\n/* 86: 97 */ paramDouble3 += this.V.nextGaussian() * 0.007499999832361937D * paramFloat2;\r\n/* 87: */ \r\n/* 88: 99 */ paramDouble1 *= paramFloat1;\r\n/* 89:100 */ paramDouble2 *= paramFloat1;\r\n/* 90:101 */ paramDouble3 *= paramFloat1;\r\n/* 91: */ \r\n/* 92:103 */ this.v = paramDouble1;\r\n/* 93:104 */ this.w = paramDouble2;\r\n/* 94:105 */ this.x = paramDouble3;\r\n/* 95: */ \r\n/* 96:107 */ float f2 = uv.a(paramDouble1 * paramDouble1 + paramDouble3 * paramDouble3);\r\n/* 97: */ \r\n/* 98:109 */ this.A = (this.y = (float)(Math.atan2(paramDouble1, paramDouble3) * 180.0D / 3.141592741012573D));\r\n/* 99:110 */ this.B = (this.z = (float)(Math.atan2(paramDouble2, f2) * 180.0D / 3.141592741012573D));\r\n/* 100:111 */ this.i = 0;\r\n/* 101: */ }", "public void visit(ArrayDimsAndInits n) {\n n.f0.accept(this);\n }", "public double[] coeff();", "private float predictPrueba(float features) {\n float n_epochs = num_epoch;\n float num1 = (float) Math.random();\n float output = 0; //y\n\n //First, create an input tensor:\n /*\n\n */\n\n\n //**** TEORIA *******\n //First, create an input tensor:\n //Tensor input = Tensor.create(features);\n // float[][] output = new float[1][1];\n //Then perform inference by:\n //Tensor op_tensor = sess.runner().feed(\"input\", input).fetch(\"output\").run().get(0).expect(Float.class);\n //Copy this output to a float array using:\n //op_tensor.copyTo(output);\n // values.copyTo(output);\n Tensor input = Tensor.create(features);\n Tensor op_tensor = sess.runner().feed(\"input\",input).fetch(\"output\").run().get(0).expect(Float.class);\n //para escribir en la app en W y B test\n ArrayList<Tensor<?>> values = (ArrayList<Tensor<?>>) sess.runner().fetch(\"W/read\").fetch(\"b/read\").run();\n // NO VA ESTA PRUEBA ArrayList<Tensor<?>> values = (ArrayList<Tensor<?>>) sess.runner().fetch(\"W/read\").fetch(\"b/read\").fetch(\"y/output\").run();\n\n Wtest.setText(\"W_inicial: \"+(Float.toString(values.get(0).floatValue())));\n Btest.setText(\"b_inicial: \"+Float.toString(values.get(1).floatValue()));\n y_mejoras_w.add(((values.get(0).floatValue())));\n x_mejoras_w.add( \"\"+(0+ num_epoch*num));\n\n y_mejoras_b.add(((values.get(1).floatValue())));\n x_mejoras_b.add( \"\"+(0+ num_epoch*num));\n\n ///\n\n // Y.setText(Float.toString(values.get(1).floatValue()));\n\n return output; ///mal\n }", "@SuppressWarnings(\"unchecked\")\r\n private void makeIntensityProfiles() {\r\n\r\n // find the center of mass of the single label object in the sliceBuffer (abdomenImage)\r\n findAbdomenCM();\r\n int xcm = centerOfMass[0];\r\n int ycm = centerOfMass[1];\r\n \r\n // There should be only one VOI\r\n VOIVector vois = abdomenImage.getVOIs();\r\n VOI theVOI = vois.get(0);\r\n\r\n // there should be only one curve corresponding to the external abdomen boundary\r\n VOIContour curve = ((VOIContour)theVOI.getCurves().get(0));\r\n int[] xVals;\r\n int[] yVals;\r\n int[] zVals;\r\n try {\r\n xVals = new int [curve.size()];\r\n yVals = new int [curve.size()];\r\n zVals = new int [curve.size()];\r\n } catch (OutOfMemoryError error) {\r\n System.gc();\r\n MipavUtil.displayError(\"makeIntensityProfiles(): Can NOT allocate the abdomen VOI arrays\");\r\n return;\r\n }\r\n curve.exportArrays(xVals, yVals, zVals);\r\n \r\n // one intensity profile for each radial line. Each radial line is 3 degrees and\r\n // there are 360 degrees in a circle\r\n try {\r\n intensityProfiles = new ArrayList[360 /angularResolution];\r\n xProfileLocs = new ArrayList[360 / angularResolution];\r\n yProfileLocs = new ArrayList[360 / angularResolution];\r\n } catch (OutOfMemoryError error) {\r\n System.gc();\r\n MipavUtil.displayError(\"makeIntensityProfiles(): Can NOT allocate profile arrays\");\r\n return;\r\n }\r\n \r\n // load the srcImage into the slice buffer (it has the segmented abdomen image in it now)\r\n try {\r\n srcImage.exportData(0, sliceSize, sliceBuffer);\r\n } catch (IOException ex) {\r\n System.err.println(\"JCATsegmentAbdomen2D(): Error exporting data\");\r\n return;\r\n }\r\n\r\n double angleRad;\r\n int count;\r\n int contourPointIdx = 0;\r\n for (int angle = 0; angle < 360; angle += angularResolution) {\r\n count = 0;\r\n int x = xcm;\r\n int y = ycm;\r\n int yOffset = y * xDim;\r\n double scaleFactor; // reduces the number of trig operations that must be performed\r\n \r\n // allocate the ArrayLists for each radial line\r\n try {\r\n intensityProfiles[contourPointIdx] = new ArrayList<Short>();\r\n xProfileLocs[contourPointIdx] = new ArrayList<Integer>();\r\n yProfileLocs[contourPointIdx] = new ArrayList<Integer>();\r\n } catch (OutOfMemoryError error) {\r\n System.gc();\r\n MipavUtil.displayError(\"makeIntensityProfiles(): Can NOT allocate profile list: \" +contourPointIdx);\r\n return;\r\n }\r\n \r\n angleRad = Math.PI * angle / 180.0;\r\n if (angle > 315 || angle <= 45) {\r\n // increment x each step\r\n scaleFactor = Math.tan(angleRad);\r\n while (x < xVals[contourPointIdx]) {\r\n // store the intensity and location of each point along the radial line\r\n intensityProfiles[contourPointIdx].add((short)sliceBuffer[yOffset + x]);\r\n xProfileLocs[contourPointIdx].add(x);\r\n yProfileLocs[contourPointIdx].add(y);\r\n count++;\r\n \r\n // walk out in x and compute the value of y for the given radial line\r\n x++;\r\n y = ycm - (int)((x - xcm) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n \r\n } else if (angle > 45 && angle <= 135) {\r\n // decrement y each step\r\n scaleFactor = (Math.tan((Math.PI / 2.0) - angleRad));\r\n while (y > yVals[contourPointIdx]) {\r\n // store the intensity and location of each point along the radial line\r\n intensityProfiles[contourPointIdx].add((short)sliceBuffer[yOffset + x]);\r\n xProfileLocs[contourPointIdx].add(x);\r\n yProfileLocs[contourPointIdx].add(y);\r\n count++;\r\n \r\n // walk to the top of the image and compute values of x for the given radial line\r\n y--;\r\n x = xcm + (int)((ycm - y) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n \r\n } else if (angle > 135 && angle <= 225) {\r\n // decrement x each step\r\n scaleFactor = Math.tan(Math.PI - angleRad);\r\n while (x > xVals[contourPointIdx]) {\r\n // store the intensity and location of each point along the radial line\r\n intensityProfiles[contourPointIdx].add((short)sliceBuffer[yOffset + x]);\r\n xProfileLocs[contourPointIdx].add(x);\r\n yProfileLocs[contourPointIdx].add(y);\r\n count++;\r\n \r\n x--;\r\n y = ycm - (int)((xcm - x) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n\r\n } else if (angle > 225 && angle <= 315) {\r\n // increment y each step\r\n scaleFactor = Math.tan((3.0 * Math.PI / 2.0) - angleRad);\r\n while (y < yVals[contourPointIdx]) {\r\n // store the intensity and location of each point along the radial line\r\n intensityProfiles[contourPointIdx].add((short)sliceBuffer[yOffset + x]);\r\n xProfileLocs[contourPointIdx].add(x);\r\n yProfileLocs[contourPointIdx].add(y);\r\n count++;\r\n \r\n y++;\r\n x = xcm - (int)((y - ycm) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n }\r\n \r\n contourPointIdx++;\r\n } // end for (angle = 0; ...\r\n\r\n // intensityProfiles, xProfileLocs, and yProfileLocs are set, we can find the \r\n // internal boundary of the subcutaneous fat now\r\n }", "public Trainer(double[][] data, double[] attribute, int hiddenLayerNodeCount, int outputLayerNodeCount){\r\n this.data = data;\r\n this.attribute = attribute;\r\n hiddenLayer = new Node[hiddenLayerNodeCount];\r\n outputLayer = new Node[outputLayerNodeCount];\r\n activation = new double[hiddenLayerNodeCount];\r\n desireHiddenLayerActivation = new double[hiddenLayerNodeCount];\r\n for (int i = 0; i < hiddenLayerNodeCount; i++) {\r\n hiddenLayer[i] = new Node(0.5, data[0].length - 1);\r\n }\r\n for (int i = 0; i < outputLayerNodeCount; i++) {\r\n outputLayer[i] = new Node(0.5, activation.length);\r\n }\r\n }" ]
[ "0.5535273", "0.5353012", "0.5047706", "0.50202745", "0.49313715", "0.4888688", "0.48655072", "0.4825943", "0.48124492", "0.47668883", "0.4677177", "0.46583068", "0.4615", "0.45558736", "0.45531377", "0.45531377", "0.45526516", "0.4545982", "0.45438495", "0.4537978", "0.45376506", "0.4533469", "0.45321822", "0.45080185", "0.45010105", "0.44781062", "0.44701567", "0.44641918", "0.4462337", "0.44564423", "0.44168705", "0.4396626", "0.43884122", "0.43875235", "0.43614078", "0.4352278", "0.43476915", "0.43461278", "0.43427733", "0.4341132", "0.43151852", "0.43133658", "0.43042657", "0.42995217", "0.42987213", "0.4292851", "0.42911735", "0.42847282", "0.42800772", "0.42794713", "0.42757037", "0.42750928", "0.42724687", "0.42598903", "0.42525044", "0.42335075", "0.4225197", "0.42185023", "0.42131284", "0.42119914", "0.42061755", "0.41973543", "0.4193504", "0.41889536", "0.418071", "0.41793522", "0.41745996", "0.4172222", "0.41650626", "0.41551888", "0.41547865", "0.41516373", "0.41503924", "0.4148813", "0.4137879", "0.41319427", "0.41203365", "0.41196522", "0.41190872", "0.4116607", "0.4104018", "0.41039997", "0.41019657", "0.4099659", "0.4098599", "0.40979588", "0.4094607", "0.40927342", "0.40793476", "0.40764523", "0.40746763", "0.40672845", "0.4061309", "0.40585628", "0.40579146", "0.40568677", "0.405614", "0.40504634", "0.40468273", "0.4044744", "0.40441442" ]
0.0
-1
construct from FCNBase + MnUserParameters with default strategy
public MnScan(FCNBase fcn, MnUserParameters par) { this(fcn, par, DEFAULT_STRATEGY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public NetworkFunctionUserConfiguration() {\n }", "public BaseParameters(){\r\n\t}", "public DefaultCniNetworkInner() {\n }", "public interface FmTrainParams<T> extends\n HasLabelCol<T>,\n HasVectorColDefaultAsNull<T>,\n HasWeightColDefaultAsNull<T>,\n HasEpsilonDv0000001<T>,\n HasFeatureColsDefaultAsNull<T>,\n FmCommonTrainParams<T> {\n\n /**\n * @cn-name 迭代数据batch size\n * @cn 数据batch size\n */\n ParamInfo<Integer> MINIBATCH_SIZE = ParamInfoFactory\n .createParamInfo(\"batchSize\", Integer.class)\n .setDescription(\"mini-batch size\")\n\t\t\t.setAlias(new String[]{\"minibatchSize\"})\n .setHasDefaultValue(-1)\n .build();\n\n default Integer getBatchSize() {\n return get(MINIBATCH_SIZE);\n }\n\n default T setBatchSize(Integer value) {\n return set(MINIBATCH_SIZE, value);\n }\n}", "@Override\n\tpublic Alg newInstance() {\n\t\treturn new BnetDistributedCF();\n\t}", "public UserParameter() {\n }", "public ConnectedComponentFromSeed()\r\n/* 25: */ {\r\n/* 26: 32 */ this.inputFields = \"input, seed\";\r\n/* 27: 33 */ this.outputFields = \"output\";\r\n/* 28: */ }", "private void initCommonParameter()\r\n {\r\n cp = new CommonParameterHolder();\r\n cp.setLoginId(userProfile.getLoginId());\r\n cp.setCurrentUserOid(userProfile.getUserOid());\r\n cp.setClientIp(this.getRequest().getRemoteAddr());\r\n cp.setMkMode(false);\r\n }", "public NetworkDevicePatchParameters() {\n }", "public ConfigProfile buildProfileDefault() {\n this.topics = \"mytopic\";\n this.token = \"mytoken\";\n this.uri = \"https://dummy:8088\";\n this.raw = false;\n this.ack = true;\n this.indexes = \"\";\n this.sourcetypes = \"\";\n this.sources = \"\";\n this.httpKeepAlive = true;\n this.validateCertificates = true;\n this.hasTrustStorePath = true;\n this.trustStorePath = \"./src/test/resources/keystoretest.jks\";\n this.trustStoreType = \"JKS\";\n this.trustStorePassword = \"Notchangeme\";\n this.eventBatchTimeout = 1;\n this.ackPollInterval = 1;\n this.ackPollThreads = 1;\n this.maxHttpConnPerChannel = 1;\n this.totalHecChannels = 1;\n this.socketTimeout = 1;\n this.enrichements = \"ni=hao,hello=world\";\n this.enrichementMap = new HashMap<>();\n this.trackData = true;\n this.maxBatchSize = 1;\n this.numOfThreads = 1;\n this.lineBreaker = \"\\n\";\n return this;\n }", "public CustomEntitiesTaskParameters() {}", "private void setIMUParameters(){\n BNO055IMU.Parameters parameters = getIMUParameters();\n imu.initialize(parameters);\n }", "public CMN() {\n\t}", "NNImpl(ArrayList<Instance> trainingSet, int hiddenNodeCount, Double learningRate, int maxEpoch, Random random, Double[][] hiddenWeights, Double[][] outputWeights) {\r\n this.trainingSet = trainingSet;\r\n this.learningRate = learningRate;\r\n this.maxEpoch = maxEpoch;\r\n this.random = random;\r\n\r\n //input layer nodes\r\n inputNodes = new ArrayList<>();\r\n int inputNodeCount = trainingSet.get(0).attributes.size();\r\n int outputNodeCount = trainingSet.get(0).classValues.size();\r\n for (int i = 0; i < inputNodeCount; i++) {\r\n Node node = new Node(0);\r\n inputNodes.add(node);\r\n }\r\n\r\n //bias node from input layer to hidden\r\n Node biasToHidden = new Node(1);\r\n inputNodes.add(biasToHidden);\r\n\r\n //hidden layer nodes\r\n hiddenNodes = new ArrayList<>();\r\n for (int i = 0; i < hiddenNodeCount; i++) {\r\n Node node = new Node(2);\r\n //Connecting hidden layer nodes with input layer nodes\r\n for (int j = 0; j < inputNodes.size(); j++) {\r\n NodeWeightPair nwp = new NodeWeightPair(inputNodes.get(j), hiddenWeights[i][j]);\r\n node.parents.add(nwp);\r\n }\r\n hiddenNodes.add(node);\r\n }\r\n\r\n //bias node from hidden layer to output\r\n Node biasToOutput = new Node(3);\r\n hiddenNodes.add(biasToOutput);\r\n\r\n //Output node layer\r\n outputNodes = new ArrayList<>();\r\n for (int i = 0; i < outputNodeCount; i++) {\r\n Node node = new Node(4);\r\n //Connecting output layer nodes with hidden layer nodes\r\n for (int j = 0; j < hiddenNodes.size(); j++) {\r\n NodeWeightPair nwp = new NodeWeightPair(hiddenNodes.get(j), outputWeights[i][j]);\r\n node.parents.add(nwp);\r\n }\r\n outputNodes.add(node);\r\n }\r\n }", "public UsermodelFactoryImpl() {\r\n\t\tsuper();\r\n\t}", "CbpmniFactory getCbpmniFactory();", "public MdnFeatures()\n {\n }", "public NFA(){}", "public ParametersBuilder() {\n this(Parameters.DEFAULT);\n }", "public DefaultInferenceParameters(CycAccess cycAccess) {\n this.cycAccess = cycAccess;\n }", "RemoteUserManager() { }", "@Override\n\tprotected void initClassifierParameters() {\n\t\tlinearKernel = new SelectedParameterItem(\"Linear kernel\", \"-K 0\");\n\t\tpolynomialKernel = new SelectedParameterItem(\"Polynomial kernel\", \"-K 1\");\n\t\tradialBasisKernel = new SelectedParameterItem(\"Radial basis kernel\", \"-K 2\");\n\t\tsigmoidKernel = new SelectedParameterItem(\"Sigmoid kernel\", \"-K 3\");\n\t\tcSVC = new SelectedParameterItem(\"C-SVC\", \"-S 0\");\n\t\tnuSVC = new SelectedParameterItem(\"&nu;-SVC\", \"-S 1\");\n\t\tsvmType = ParameterUtilities.createSelectedParameter(\"SVM type\", cSVC, nuSVC);\n\t\tkernelType = ParameterUtilities.createSelectedParameter(\"Kernel type\", linearKernel, polynomialKernel, radialBasisKernel,\n\t\t\t\tsigmoidKernel);\n\t\tkernelDegree = new Parameter(3, \"Degree in kernel function\", Parameter.TYPE.INTEGER, \"-D\", \"classifier.degree\");\n\t\tkernelGamma = new Parameter(0.5, \"&gamma; in kernel function\", Parameter.TYPE.DOUBLE, \"-G\", \"classifier.gamma\");\n\t\tkernelCoefficient = new Parameter(0.0, \"Coefficient in kernel function\", Parameter.TYPE.DOUBLE, \"-R\", \"classifier.coef0\");\n\t\tparameterC = new Parameter(1.0, \"Parameter C\", Parameter.TYPE.DOUBLE, \"-C\", \"classifier.cost\");\n\t\tparameterNu = new Parameter(0.5, \"Parameter &nu;\", Parameter.TYPE.DOUBLE, \"-N\", \"classifier.nu\");\n\t\ttolerance = new Parameter(0.001, \"Tolerance of termination criterion\", Parameter.TYPE.DOUBLE, \"-E\");\n\t\tweight = new Parameter(null, \"Weight, set C of class i to (weight &times; C)\", Parameter.TYPE.STRING, \"-W\");\n\t}", "private DigitalNetBase2 initNetVar (boolean shiftFlag) {\n DigitalNetBase2 net = new DigitalNetBase2 ();\n if (shiftFlag)\n net.dim = dim + 1;\n else\n net.dim = dim;\n net.numPoints = numPoints;\n net.numCols = numCols;\n net.numRows = numRows;\n net.outDigits = outDigits;\n net.normFactor = normFactor;\n net.factor = new double[outDigits];\n net.genMat = new int[net.dim * numCols];\n net.shiftStream = shiftStream;\n net.capacityShift = capacityShift;\n net.dimShift = dimShift;\n net.digitalShift = copyDigitalShift (digitalShift);\n if (shiftFlag && shiftStream != null) {\n net.addRandomShift (dimShift, dimShift + 1, shiftStream);\n }\n return net;\n }", "public ConfigProfile buildProfileTwo() {\n this.topics = \"kafka-data\";\n this.token = \"mytoken\";\n this.uri = \"https://dummy:8088\";\n this.raw = true;\n this.ack = false;\n this.indexes = \"index-1\";\n this.sourcetypes = \"kafka-data\";\n this.sources = \"kafka-connect\";\n this.httpKeepAlive = true;\n this.validateCertificates = false;\n this.eventBatchTimeout = 1;\n this.ackPollInterval = 1;\n this.ackPollThreads = 1;\n this.maxHttpConnPerChannel = 1;\n this.totalHecChannels = 1;\n this.socketTimeout = 1;\n this.enrichements = \"hello=world\";\n this.enrichementMap = new HashMap<>();\n this.trackData = false;\n this.maxBatchSize = 1;\n this.numOfThreads = 1;\n return this;\n }", "public ConfigProfile buildProfileFour() {\n this.topicsRegex = \"^kafka-data[0-9]$\";\n this.token = \"mytoken\";\n this.uri = \"https://dummy:8088\";\n this.raw = true;\n this.ack = false;\n this.indexes = \"index-1\";\n this.sourcetypes = \"kafka-data\";\n this.sources = \"kafka-connect\";\n this.httpKeepAlive = true;\n this.validateCertificates = false;\n this.eventBatchTimeout = 1;\n this.ackPollInterval = 1;\n this.ackPollThreads = 1;\n this.maxHttpConnPerChannel = 1;\n this.totalHecChannels = 1;\n this.socketTimeout = 1;\n this.enrichements = \"hello=world\";\n this.enrichementMap = new HashMap<>();\n this.trackData = false;\n this.maxBatchSize = 1;\n this.numOfThreads = 1;\n this.headerSupport = true;\n this.headerIndex = \"splunk.header.index\";\n this.headerSource = \"splunk.header.source\";\n this.headerSourcetype = \"splunk.header.sourcetype\";\n this.headerHost = \"splunk.header.host\";\n\n return this;\n }", "private User createWithParameters(Map<String, String> userParameters) {\n User user = new User();\n String passHashed = BCrypt.hashpw(userParameters.get(PASSWORD_PARAMETER_NAME), BCrypt.gensalt());\n user.setUsername(userParameters.get(USERNAME_PARAMETER_NAME));\n user.setPassword(passHashed);\n user.setFirstName(userParameters.get(FIRST_NAME_PARAMETER_NAME));\n user.setLastName(userParameters.get(LAST_NAME_PARAMETER_NAME));\n user.setEmail(userParameters.get(EMAIL_PARAMETER_NAME));\n user.setPhone(userParameters.get(PHONE_PARAMETER_NAME));\n user.setAddress(userParameters.get(ADDRESS_PARAMETER_NAME));\n user.setAccount(BigDecimal.ZERO);\n user.setInitDate(LocalDate.now());\n user.setBlockedUntil(LocalDate.now());\n user.setRole(User.Role.USER);\n return user;\n }", "public PajekNetReader()\n {\n this(false, false);\n }", "public KmFacebookUser()\n {\n _devices = new KmList<KmFacebookDevice>();\n _languages = new KmList<KmFacebookIdName>();\n _interestedIn = new KmList<String>();\n }", "public PetrinetmodelFactoryImpl() {\r\n\t\tsuper();\r\n\t}", "public CambioUserN() {\n initComponents();\n }", "public UserFacebookConverter() {\n entity = new UserFacebook();\n }", "public MnjMfgFabinsProdLEOImpl() {\n }", "public DMXUserInput() {\n }", "private MsUserInit(Builder builder) {\n super(builder);\n }", "public NNImpl(ArrayList<Instance> trainingSet, int hiddenNodeCount, Double learningRate, int maxEpoch, Double [][]hiddenWeights, Double[] outputWeights)\r\n\t{\r\n\t\tthis.trainingSet=trainingSet;\r\n\t\tthis.learningRate=learningRate;\r\n\t\tthis.maxEpoch=maxEpoch;\r\n\r\n\t\t//input layer nodes\r\n\t\tinputNodes=new ArrayList<Node>();\r\n\t\tint inputNodeCount=trainingSet.get(0).attributes.size();\r\n\t\tint outputNodeCount=1;\r\n\t\tfor(int i=0;i<inputNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(0);\r\n\t\t\tinputNodes.add(node);\r\n\t\t}\r\n\r\n\t\t//bias node from input layer to hidden\r\n\t\tNode biasToHidden=new Node(1);\r\n\t\tinputNodes.add(biasToHidden);\r\n\r\n\t\t//hidden layer nodes\r\n\t\thiddenNodes=new ArrayList<Node> ();\r\n\t\tfor(int i=0;i<hiddenNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(2);\r\n\t\t\t//Connecting hidden layer nodes with input layer nodes\r\n\t\t\tfor(int j=0;j<inputNodes.size();j++)\r\n\t\t\t{\r\n\t\t\t\tNodeWeightPair nwp=new NodeWeightPair(inputNodes.get(j),hiddenWeights[i][j]);\r\n\t\t\t\tnode.parents.add(nwp);\r\n\t\t\t}\r\n\t\t\thiddenNodes.add(node);\r\n\t\t}\r\n\r\n\t\t//bias node from hidden layer to output\r\n\t\tNode biasToOutput=new Node(3);\r\n\t\thiddenNodes.add(biasToOutput);\r\n\r\n\r\n\r\n\t\tNode node=new Node(4);\r\n\t\t//Connecting output node with hidden layer nodes\r\n\t\tfor(int j=0;j<hiddenNodes.size();j++)\r\n\t\t{\r\n\t\t\tNodeWeightPair nwp=new NodeWeightPair(hiddenNodes.get(j), outputWeights[j]);\r\n\t\t\tnode.parents.add(nwp);\r\n\t\t}\t\r\n\t\toutputNode = node;\r\n\r\n\t}", "public ProfileTokenCredential() {\n super();\n new Random().nextBytes(addr_);\n new Random().nextBytes(mask_);\n }", "@Override\n\tpublic void setup(NluInput nluInput) {\n\t\tthis.user = nluInput.user;\n\t\tthis.language = nluInput.language;\n\t\tthis.nlu_input = nluInput;\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic UserSerializer() {\n\t\tsuper();\n\t\tmapSerializer.putAll(BeanRetriever.getBean(\"mapSerializerStrategy\", Map.class));\n\t}", "public interface NetworkBuilder {\n\n /**\n * Set neural net layers\n * @param layers an array with the width and depth of each layer\n * @return NetworkBuilder instance\n */\n public abstract NetworkBuilder withLayers(int[] layers);\n\n /**\n * Set the DataSet\n * @param train - training set\n * @param test - test set\n * @return NetworkBuilder instance\n */\n public abstract NetworkBuilder withDataSet(DataSet train, DataSet test);\n\n /**\n * Set the ActivationFunction\n * @param activationFunction\n * @return NetworkBuilder instance\n */\n public abstract NetworkBuilder withActivationFunction(ActivationFunction activationFunction);\n\n /**\n * Set the ErrorMeasure\n * @param errorMeasure\n * @return NetworkBuilder instance\n */\n public abstract NetworkBuilder withErrorMeasure(ErrorMeasure errorMeasure);\n\n /**\n * Train the network\n * @return the trained network for testing\n */\n public abstract FeedForwardNetwork train();\n}", "public NNImpl(ArrayList<Instance> trainingSet, int hiddenNodeCount, Double learningRate, int maxEpoch, Double [][]hiddenWeights, Double[][] outputWeights)\r\n\t{\r\n\t\tthis.trainingSet=trainingSet;\r\n\t\tthis.learningRate=learningRate;\r\n\t\tthis.maxEpoch=maxEpoch;\r\n\r\n\t\t//input layer nodes\r\n\t\tinputNodes=new ArrayList<Node>();\r\n\t\tint inputNodeCount=trainingSet.get(0).attributes.size();\r\n\t\tint outputNodeCount=trainingSet.get(0).classValues.size();\r\n\t\tfor(int i=0;i<inputNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(0);\r\n\t\t\tinputNodes.add(node);\r\n\t\t}\r\n\r\n\t\t//bias node from input layer to hidden\r\n\t\tNode biasToHidden=new Node(1);\r\n\t\tinputNodes.add(biasToHidden);\r\n\r\n\t\t//hidden layer nodes\r\n\t\thiddenNodes=new ArrayList<Node> ();\r\n\t\tfor(int i=0;i<hiddenNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(2);\r\n\t\t\t//Connecting hidden layer nodes with input layer nodes\r\n\t\t\tfor(int j=0;j<inputNodes.size();j++)\r\n\t\t\t{\r\n\t\t\t\tNodeWeightPair nwp=new NodeWeightPair(inputNodes.get(j),hiddenWeights[i][j]);\r\n\t\t\t\tnode.parents.add(nwp);\r\n\t\t\t}\r\n\t\t\thiddenNodes.add(node);\r\n\t\t}\r\n\r\n\t\t//bias node from hidden layer to output\r\n\t\tNode biasToOutput=new Node(3);\r\n\t\thiddenNodes.add(biasToOutput);\r\n\r\n\t\t//Output node layer\r\n\t\toutputNodes=new ArrayList<Node> ();\r\n\t\tfor(int i=0;i<outputNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(4);\r\n\t\t\t//Connecting output layer nodes with hidden layer nodes\r\n\t\t\tfor(int j=0;j<hiddenNodes.size();j++)\r\n\t\t\t{\r\n\t\t\t\tNodeWeightPair nwp=new NodeWeightPair(hiddenNodes.get(j), outputWeights[i][j]);\r\n\t\t\t\tnode.parents.add(nwp);\r\n\t\t\t}\t\r\n\t\t\toutputNodes.add(node);\r\n\t\t}\t\r\n\t}", "public MgtFactoryImpl()\n {\n super();\n }", "public UsuarioMB() {\n }", "public BistableParams(){\n\t\tMinDiffGrpPhyloDist = 0.5;\n\t\tMaxSameGrpPhyloDist= 0.3;\n\t\tMaxContentDiss = 0;\n\t\tMinGrpMemSize = 3;\n\t\tMinOpSize = 3;\n\t}", "public NewUserMBean() {\r\n }", "IntStrategyFactory() {\n }", "Conector createConector();", "public UpdateUserProcessor() {\n\t\n\t}", "public DbUser() {\r\n\t}", "public void initTsnParams(){\n }", "public PajekNetReader(boolean unique_labels)\n {\n this(unique_labels, false);\n }", "private BNO055IMU.Parameters getIMUParameters(){\n BNO055IMU.Parameters parameters = new BNO055IMU.Parameters();\n parameters.angleUnit = BNO055IMU.AngleUnit.DEGREES;\n parameters.accelUnit = BNO055IMU.AccelUnit.METERS_PERSEC_PERSEC;\n parameters.calibrationDataFile = \"BNO055IMUCalibration.json\"; // see the calibration sample opmode\n parameters.loggingEnabled = true;\n parameters.loggingTag = \"IMU\";\n parameters.accelerationIntegrationAlgorithm = new JustLoggingAccelerationIntegrator();\n parameters.mode = BNO055IMU.SensorMode.IMU;\n\n return parameters;\n }", "public WekaLogitLearner() { super(new Logistic2()); }", "public NeuralNetwork createDefaultNet(InputProvider inputProvider) {\r\n\t\tNeuralNetwork net = new NeuralNetwork();\r\n\t\tInputLayer inputLayer = layerFactory.createDefaultInputLayer(inputProvider);\r\n\t\tcreateAndConnectLayers(inputLayer, 2, inputProvider);\r\n\t\tnet.setInputLayer(inputLayer);\r\n\t\treturn net;\r\n\t}", "public MRUCache(CacheDataFactory<K, V> fact) {\r\n this(DEFAULTSIZE, fact, null);\r\n }", "public TwoClassConfusionMatrix() {\n\t}", "public void newConfig ()\n {\n Class<?> clazz = group.getRawConfigClasses().get(0);\n try {\n ManagedConfig cfg = (ManagedConfig)PreparedEditable.PREPARER.apply(\n clazz.newInstance());\n if (cfg instanceof DerivedConfig) {\n ((DerivedConfig)cfg).cclass = group.getConfigClass();\n }\n newNode(cfg);\n } catch (Exception e) {\n log.warning(\"Failed to instantiate config [class=\" + clazz + \"].\", e);\n }\n }", "@Override\r\n public void init(NegotiationSession negotiationSession, Map<String, Double> parameters) {\r\n super.init(negotiationSession, parameters);\r\n this.negotiationSession = negotiationSession;\r\n if (parameters != null && parameters.get(\"l\") != null) {\r\n learnCoef = parameters.get(\"l\");\r\n } else {\r\n learnCoef = 0.2;\r\n }\r\n learnValueAddition = 1;\r\n initializeModel();\r\n }", "public UserModel(){\n ID = 0; // The user's ID, largely used in conjuction with a database\n firstName = \"fname\"; //User's first name\n lastName = \"lname\"; // User's last name\n password= \"pass\"; ///User password\n username = \"testuser\"; //Valid email for user\n role = 0; //Whether the user is a typical user or administrator\n status = 0; //Whether the user is active or disabled\n }", "public UserModel()\r\n\t{\r\n\t}", "private cudaComputeMode()\r\n {\r\n }", "public UserManager(Server server) {\r\n this.server = server;\r\n this.dbManager = (DbManager)this.server.getContext().getAttributes().get(\"DbManager\");\r\n try {\r\n this.jaxbContext = \r\n JAXBContext.newInstance(\r\n org.hackystat.sensorbase.resource.users.jaxb.ObjectFactory.class);\r\n loadDefaultUsers(); //NOPMD it's throwing a false warning. \r\n initializeCache(); //NOPMD \r\n initializeAdminUser(); //NOPMD\r\n }\r\n catch (Exception e) {\r\n String msg = \"Exception during UserManager initialization processing\";\r\n server.getLogger().warning(msg + \"\\n\" + StackTrace.toString(e));\r\n throw new RuntimeException(msg, e);\r\n }\r\n }", "public AddMembershipConfig() {\n\t\tsuper();\n\n\t}", "PNMMetadata(ImageTypeSpecifier imageType, ImageWriteParam param) {\n/* 145 */ this();\n/* 146 */ initialize(imageType, param);\n/* */ }", "public static Configuration createConfFromUserPayload(byte[] bb)\n throws IOException {\n Preconditions.checkNotNull(bb, \"Bytes must be specified\");\n DataInputBuffer dib = new DataInputBuffer();\n dib.reset(bb, 0, bb.length);\n Configuration conf = new Configuration(false);\n conf.readFields(dib);\n return conf;\n }", "public User() {\n username = null;\n password = null;\n email = null;\n firstName = null;\n lastName = null;\n gender = null;\n personID = null;\n }", "public BullyMessageListenerFactoryImpl(BullyAlgorithmParticipant self) {\n //We use port as processId since it's coming from the coordinator and guaranteed\n //to be sequential and unique.\n this.self = self;\n }", "public GameUser() {\n\t}", "@Override\n public void init(NegotiationInfo info)\n {\n super.init(info);\n\n // initializes User Model and Opponent Model\n userModelInterface = new UserModelInterfaceImpl(this);\n utilitySpace = userModelInterface.estimateUtilitySpace();\n\n // search all outcomes and sort\n sortedOutcomeSpace = new SortedOutcomeSpace(utilitySpace);\n feasibleBids = sortedOutcomeSpace.getAllOutcomes();\n\n // initializes acceptance and offering strategy\n acceptanceStrategy = new DefaultAcceptanceStrategyImpl(this);\n offeringStrategy = new DefaultOfferingStrategyBasedOpponentImpl(this);\n }", "public SplitPolicyGeneralizedHyperplane() {\n }", "public User(){\n this(null, null);\n }", "public ModelService(ModelService source) {\n if (source.Id != null) {\n this.Id = new String(source.Id);\n }\n if (source.Cluster != null) {\n this.Cluster = new String(source.Cluster);\n }\n if (source.Name != null) {\n this.Name = new String(source.Name);\n }\n if (source.Runtime != null) {\n this.Runtime = new String(source.Runtime);\n }\n if (source.ModelUri != null) {\n this.ModelUri = new String(source.ModelUri);\n }\n if (source.Cpu != null) {\n this.Cpu = new Long(source.Cpu);\n }\n if (source.Memory != null) {\n this.Memory = new Long(source.Memory);\n }\n if (source.Gpu != null) {\n this.Gpu = new Long(source.Gpu);\n }\n if (source.GpuMemory != null) {\n this.GpuMemory = new Long(source.GpuMemory);\n }\n if (source.CreateTime != null) {\n this.CreateTime = new String(source.CreateTime);\n }\n if (source.UpdateTime != null) {\n this.UpdateTime = new String(source.UpdateTime);\n }\n if (source.ScaleMode != null) {\n this.ScaleMode = new String(source.ScaleMode);\n }\n if (source.Scaler != null) {\n this.Scaler = new Scaler(source.Scaler);\n }\n if (source.Status != null) {\n this.Status = new ServiceStatus(source.Status);\n }\n if (source.AccessToken != null) {\n this.AccessToken = new String(source.AccessToken);\n }\n if (source.ConfigId != null) {\n this.ConfigId = new String(source.ConfigId);\n }\n if (source.ConfigName != null) {\n this.ConfigName = new String(source.ConfigName);\n }\n if (source.ServeSeconds != null) {\n this.ServeSeconds = new Long(source.ServeSeconds);\n }\n if (source.ConfigVersion != null) {\n this.ConfigVersion = new String(source.ConfigVersion);\n }\n if (source.ResourceGroupId != null) {\n this.ResourceGroupId = new String(source.ResourceGroupId);\n }\n if (source.Exposes != null) {\n this.Exposes = new ExposeInfo[source.Exposes.length];\n for (int i = 0; i < source.Exposes.length; i++) {\n this.Exposes[i] = new ExposeInfo(source.Exposes[i]);\n }\n }\n if (source.Region != null) {\n this.Region = new String(source.Region);\n }\n if (source.ResourceGroupName != null) {\n this.ResourceGroupName = new String(source.ResourceGroupName);\n }\n if (source.Description != null) {\n this.Description = new String(source.Description);\n }\n if (source.GpuType != null) {\n this.GpuType = new String(source.GpuType);\n }\n if (source.LogTopicId != null) {\n this.LogTopicId = new String(source.LogTopicId);\n }\n }", "public ConfigProfile buildProfileOne() {\n this.topics = \"kafka-data\";\n this.token = \"mytoken\";\n this.uri = \"https://dummy:8088\";\n this.raw = true;\n this.ack = false;\n this.indexes = \"index-1\";\n this.sourcetypes = \"kafka-data\";\n this.sources = \"kafka-connect\";\n this.httpKeepAlive = true;\n this.validateCertificates = true;\n this.hasTrustStorePath = true;\n this.trustStorePath = \"./src/test/resources/keystoretest.p12\";\n this.trustStoreType = \"PKCS12\";\n this.trustStorePassword = \"Notchangeme\";\n this.eventBatchTimeout = 1;\n this.ackPollInterval = 1;\n this.ackPollThreads = 1;\n this.maxHttpConnPerChannel = 1;\n this.totalHecChannels = 1;\n this.socketTimeout = 1;\n this.enrichements = \"hello=world\";\n this.enrichementMap = new HashMap<>();\n this.trackData = false;\n this.maxBatchSize = 1;\n this.numOfThreads = 1;\n return this;\n }", "public FUManager(int nGeneric, int nAdd, int nMult) {\n if (nGeneric != 0) {\n generic = nGeneric;\n genericFU = new ArrayList<>(nGeneric);\n //el ID de la UF es i\n for (int i = 0; i < nGeneric; i++) {\n FuGeneric gen = new FuGeneric(i, ConfigFile.getLatencyGeneric());\n gen.setIsActive(true);\n genericFU.add(gen);\n }\n FU.put(typeFU.GENERIC, genericFU);\n }\n\n if (nAdd != 0) {\n add = nAdd;\n addFU = new ArrayList<>(nAdd);\n for (int i = nGeneric; i < nAdd + nGeneric; i++) {\n FuAdd ad = new FuAdd(i, ConfigFile.getLatencyAdd());\n ad.setIsActive(true);\n addFU.add(ad);\n }\n FU.put(typeFU.ADD, addFU);\n }\n\n if (nMult != 0) {\n mult = nMult;\n multFU = new ArrayList<>(nMult);\n for (int i = nAdd; i < nMult + nAdd; i++) {\n FuMult m = new FuMult(i, ConfigFile.getLatencyMult());\n m.setIsActive(true);\n multFU.add(m);\n }\n FU.put(typeFU.MULT, multFU);\n }\n\n }", "public Mannschaft() {\n }", "public ExternalServiceLayerCIMFactoryImpl() {\n\t\tsuper();\n\t}", "public NAFReader() {\n super(\"Hamamatsu Aquacosmos\", \"naf\");\n domains = new String[] {FormatTools.LM_DOMAIN};\n }", "public FeatureGroupMappingFactoryImpl()\r\n {\r\n super();\r\n }", "public DeviceFamilyImpl(DeviceFactory df){\n\t\tsuper((Class<T>) c);\n\t\tthis.df = df;\n\t}", "extendedPetriNetsFactory getextendedPetriNetsFactory();", "private UserFactory() {\r\n }", "public void initClassificationModule(KinectInterface kinectModule, MovementFoundInterface engineModule);", "public RankingParams() {\n this(\n null,\n null,\n null,\n null,\n null,\n null\n );\n }", "public DigitGuessNeuralNetwork(){\r\n neuralNetwork=NeuralNetwork.load(MainActivity.neuralNetInputStream);\r\n }", "public FFANNAdaptiveBackPropagationJSP()\n\t{\n\t\t//run(network, numberInputNeurons, numberHiddenNeurons, numberOutputNeurons, trainingSet);\n\t}", "NetworkFactory getNetworkFactory();", "public NodeMDL(int[][] training, int[] max_values, int node_id) {\n\t\tsuper(training, max_values, node_id);\n\t}", "public DefaultFingerprintFactory(final FingerprintSettings settings) {\n settingsStructure = settingsQuery = settings;\n }", "public MyComputer(String gpu, int numberOfFans, int gbOfRam) {\n this.gpu = gpu;\n this.numberOfFans = numberOfFans;\n this.gbOfRam = gbOfRam;\n }", "public ObjectInspector init(Mode m, ObjectInspector[] parameters)\n throws HiveException {\n super.init(m, parameters);\n partialOI = PrimitiveObjectInspectorFactory.writableBinaryObjectInspector;\n finalOI = getFinalObjectInspector();\n switch (m) {\n case PARTIAL1: \n inputOI = parameters[0];\n case PARTIAL2:\n return partialOI;\n case FINAL:\n case COMPLETE:\n return finalOI;\n default:\n throw new IllegalArgumentException(\"Unknown UDAF mode \" + m);\n }\n }", "protected void initSupportedIntensityMeasureParams() {\n\n\t\t// Create saParam:\n\t\tDoubleDiscreteConstraint periodConstraint = new DoubleDiscreteConstraint();\n\t\tTreeSet set = new TreeSet();\n\t\tEnumeration keys = coefficientsBJF.keys();\n\t\twhile (keys.hasMoreElements()) {\n\t\t\tBJF_1997_AttenRelCoefficients coeff = (BJF_1997_AttenRelCoefficients)\n\t\t\tcoefficientsBJF.get(keys.nextElement());\n\t\t\tif (coeff.period >= 0) {\n\t\t\t\tset.add(new Double(coeff.period));\n\t\t\t}\n\t\t}\n\t\tIterator it = set.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tperiodConstraint.addDouble( (Double) it.next());\n\t\t}\n\t\tperiodConstraint.setNonEditable();\n\t\tsaPeriodParam = new PeriodParam(periodConstraint);\n\t\tsaDampingParam = new DampingParam();\n\t\tsaParam = new SA_Param(saPeriodParam, saDampingParam);\n\t\tsaParam.setNonEditable();\n\n\t\t// Create PGA Parameter (pgaParam):\n\t\tpgaParam = new PGA_Param();\n\t\tpgaParam.setNonEditable();\n\n\t\t// Create PGV Parameter (pgvParam):\n\t\tpgvParam = new PGV_Param();\n\t\tpgvParam.setNonEditable();\n\n\t\t// The MMI parameter\n\t\tmmiParam = new MMI_Param();\n\n\t\t// Add the warning listeners:\n\t\tsaParam.addParameterChangeWarningListener(listener);\n\t\tpgaParam.addParameterChangeWarningListener(listener);\n\t\tpgvParam.addParameterChangeWarningListener(listener);\n\n\t\t// create supported list\n\t\tsupportedIMParams.clear();\n\t\tsupportedIMParams.addParameter(saParam);\n\t\tsupportedIMParams.addParameter(pgaParam);\n\t\tsupportedIMParams.addParameter(pgvParam);\n\t\tsupportedIMParams.addParameter(mmiParam);\n\n\t}", "public MixedInitiativeManager(IndividualDesignManager idm, int[] chosenFF, int[] chosenBMPs, int UserId, int[] regionSubbasinId, int[] tenure_regionSubbasinId) { \n this.idm = idm;\n this.dbm = idm.dbm;\n this.UserId = UserId;\n this.chosenFF = chosenFF;\n this.chosenBMPs = chosenBMPs;\n this.tenure_regionSubbasinId = tenure_regionSubbasinId;\n this.regionSubbasinId = regionSubbasinId;\n im = new IntrospectionManager(idm);\n om = new OptimizationManager(idm);\n setLocalPreferences();//set the local BMP ids\n sdmm = new SDMManager(idm, statm, chosenFF, localSubbasinLoc, useLocalPreference, chosenBMPs, useANFIS);\n this.statm = new StatisticsManager(dbm);\n //sdmm.createNewSDM(type_optimize);\n kendall = new MannKendall();\n }", "private void initUser() {\n\t}", "public PantallaPersonal(GeoWallStart game) {\n\t\t\tsuper(game);\n\t\t\tuser= new Usuario();\n\t\t\n\t}", "public Ms2Cluster() { super(); }", "public EncodingAlgorithmAttributesImpl() {\n this(null, null);\n }", "public NetworkFunctionUserConfiguration withUserDataParameters(Object userDataParameters) {\n this.userDataParameters = userDataParameters;\n return this;\n }", "public InterpolationModel() {\n\tUnigram = new UnigramModel();\n\tBigram = new BigramModel();\n\tTrigram = new TrigramModel();\n }", "public DefaultNashRequestImpl() {\n\t\t\n\t}", "public UserModel()\n\t{}", "private MultibinderFactory() { }" ]
[ "0.5524966", "0.5341282", "0.5046131", "0.49963558", "0.49638945", "0.48632753", "0.48556793", "0.48224518", "0.4792745", "0.47655407", "0.47511733", "0.47185585", "0.4709954", "0.47030106", "0.46936804", "0.469001", "0.4663896", "0.46358803", "0.46100798", "0.4579174", "0.45758718", "0.45721325", "0.45558673", "0.4548846", "0.45410377", "0.45370895", "0.45076874", "0.4506351", "0.44846463", "0.4481165", "0.4476463", "0.44735938", "0.4464742", "0.44557148", "0.44519645", "0.4451052", "0.44501474", "0.4445328", "0.44348183", "0.4434178", "0.44303873", "0.44253853", "0.4418688", "0.44097567", "0.4405373", "0.44047287", "0.43830574", "0.43783075", "0.43781504", "0.4377788", "0.4367851", "0.43678075", "0.43616563", "0.43501893", "0.43474808", "0.4338362", "0.4336216", "0.4334073", "0.43306705", "0.43287024", "0.43283904", "0.43279764", "0.43266085", "0.43249458", "0.4322455", "0.43203482", "0.43146208", "0.43132558", "0.43026707", "0.43011445", "0.4298703", "0.42984766", "0.42944798", "0.4292874", "0.42906386", "0.42884892", "0.42880625", "0.42759484", "0.42741978", "0.42727", "0.42707688", "0.42695832", "0.42677018", "0.42666936", "0.4263379", "0.42498347", "0.4239189", "0.42362946", "0.42348066", "0.42332324", "0.42323396", "0.4231488", "0.42290887", "0.42271602", "0.42215553", "0.42204982", "0.4220249", "0.42191172", "0.42153797", "0.42125908" ]
0.44168258
43
construct from FCNBase + MnUserParameters
public MnScan(FCNBase fcn, MnUserParameters par, int stra) { this(fcn, new MnUserParameterState(par), new MnStrategy(stra)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BaseParameters(){\r\n\t}", "public NetworkFunctionUserConfiguration() {\n }", "public UserParameter() {\n }", "private void setIMUParameters(){\n BNO055IMU.Parameters parameters = getIMUParameters();\n imu.initialize(parameters);\n }", "public NetworkDevicePatchParameters() {\n }", "public CMN() {\n\t}", "public UsuarioMB() {\n }", "public CambioUserN() {\n initComponents();\n }", "private void initCommonParameter()\r\n {\r\n cp = new CommonParameterHolder();\r\n cp.setLoginId(userProfile.getLoginId());\r\n cp.setCurrentUserOid(userProfile.getUserOid());\r\n cp.setClientIp(this.getRequest().getRemoteAddr());\r\n cp.setMkMode(false);\r\n }", "public NewUserMBean() {\r\n }", "public KmFacebookUser()\n {\n _devices = new KmList<KmFacebookDevice>();\n _languages = new KmList<KmFacebookIdName>();\n _interestedIn = new KmList<String>();\n }", "public CustomEntitiesTaskParameters() {}", "private User createWithParameters(Map<String, String> userParameters) {\n User user = new User();\n String passHashed = BCrypt.hashpw(userParameters.get(PASSWORD_PARAMETER_NAME), BCrypt.gensalt());\n user.setUsername(userParameters.get(USERNAME_PARAMETER_NAME));\n user.setPassword(passHashed);\n user.setFirstName(userParameters.get(FIRST_NAME_PARAMETER_NAME));\n user.setLastName(userParameters.get(LAST_NAME_PARAMETER_NAME));\n user.setEmail(userParameters.get(EMAIL_PARAMETER_NAME));\n user.setPhone(userParameters.get(PHONE_PARAMETER_NAME));\n user.setAddress(userParameters.get(ADDRESS_PARAMETER_NAME));\n user.setAccount(BigDecimal.ZERO);\n user.setInitDate(LocalDate.now());\n user.setBlockedUntil(LocalDate.now());\n user.setRole(User.Role.USER);\n return user;\n }", "private BNO055IMU.Parameters getIMUParameters(){\n BNO055IMU.Parameters parameters = new BNO055IMU.Parameters();\n parameters.angleUnit = BNO055IMU.AngleUnit.DEGREES;\n parameters.accelUnit = BNO055IMU.AccelUnit.METERS_PERSEC_PERSEC;\n parameters.calibrationDataFile = \"BNO055IMUCalibration.json\"; // see the calibration sample opmode\n parameters.loggingEnabled = true;\n parameters.loggingTag = \"IMU\";\n parameters.accelerationIntegrationAlgorithm = new JustLoggingAccelerationIntegrator();\n parameters.mode = BNO055IMU.SensorMode.IMU;\n\n return parameters;\n }", "public DMXUserInput() {\n }", "PNMMetadata(ImageTypeSpecifier imageType, ImageWriteParam param) {\n/* 145 */ this();\n/* 146 */ initialize(imageType, param);\n/* */ }", "public NetworkFunctionUserConfiguration withUserDataParameters(Object userDataParameters) {\n this.userDataParameters = userDataParameters;\n return this;\n }", "public MdnFeatures()\n {\n }", "public FUManager(int nGeneric, int nAdd, int nMult) {\n if (nGeneric != 0) {\n generic = nGeneric;\n genericFU = new ArrayList<>(nGeneric);\n //el ID de la UF es i\n for (int i = 0; i < nGeneric; i++) {\n FuGeneric gen = new FuGeneric(i, ConfigFile.getLatencyGeneric());\n gen.setIsActive(true);\n genericFU.add(gen);\n }\n FU.put(typeFU.GENERIC, genericFU);\n }\n\n if (nAdd != 0) {\n add = nAdd;\n addFU = new ArrayList<>(nAdd);\n for (int i = nGeneric; i < nAdd + nGeneric; i++) {\n FuAdd ad = new FuAdd(i, ConfigFile.getLatencyAdd());\n ad.setIsActive(true);\n addFU.add(ad);\n }\n FU.put(typeFU.ADD, addFU);\n }\n\n if (nMult != 0) {\n mult = nMult;\n multFU = new ArrayList<>(nMult);\n for (int i = nAdd; i < nMult + nAdd; i++) {\n FuMult m = new FuMult(i, ConfigFile.getLatencyMult());\n m.setIsActive(true);\n multFU.add(m);\n }\n FU.put(typeFU.MULT, multFU);\n }\n\n }", "CbpmniFactory getCbpmniFactory();", "public ConnectedComponentFromSeed()\r\n/* 25: */ {\r\n/* 26: 32 */ this.inputFields = \"input, seed\";\r\n/* 27: 33 */ this.outputFields = \"output\";\r\n/* 28: */ }", "public DefaultCniNetworkInner() {\n }", "public interface FmTrainParams<T> extends\n HasLabelCol<T>,\n HasVectorColDefaultAsNull<T>,\n HasWeightColDefaultAsNull<T>,\n HasEpsilonDv0000001<T>,\n HasFeatureColsDefaultAsNull<T>,\n FmCommonTrainParams<T> {\n\n /**\n * @cn-name 迭代数据batch size\n * @cn 数据batch size\n */\n ParamInfo<Integer> MINIBATCH_SIZE = ParamInfoFactory\n .createParamInfo(\"batchSize\", Integer.class)\n .setDescription(\"mini-batch size\")\n\t\t\t.setAlias(new String[]{\"minibatchSize\"})\n .setHasDefaultValue(-1)\n .build();\n\n default Integer getBatchSize() {\n return get(MINIBATCH_SIZE);\n }\n\n default T setBatchSize(Integer value) {\n return set(MINIBATCH_SIZE, value);\n }\n}", "private MsUserInit(Builder builder) {\n super(builder);\n }", "public ifrmParametros(EntityManagerFactory factory,frmMain frm,BglTbUsuario user) {\n initComponents();\n PropertyConfigurator.configure(\"log4j.properties\");\n this.factory=factory;\n this.main=frm;\n this.usuario=user;\n \n llenarDatos();\n \n }", "public UserFacebookConverter() {\n entity = new UserFacebook();\n }", "public UserInfo() {\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "@Override\n\tpublic void setup(NluInput nluInput) {\n\t\tthis.user = nluInput.user;\n\t\tthis.language = nluInput.language;\n\t\tthis.nlu_input = nluInput;\n\t}", "public interface UserServiceInformationBase extends ISUPParameter {\n \t\n \t//for parameters list see ITU-T Q.763 (12/1999) 3.57\n \t//Recommendation Q.931 (05/98) Table 4-6/Q.931 Bearer capability information element\n \t//Dialogic User Service Information structure : http://www.dialogic.com/webhelp/NASignaling/Release%205.1/NA_ISUP_Layer_Dev_Ref_Manual/user_service_information.htm\n\n \t//LAYER IDENTIFIERS\n \tpublic static final int _LAYER1_IDENTIFIER=0x1;\n\n \tpublic static final int _LAYER2_IDENTIFIER=0x2;\n\n\tpublic static final int _LAYER3_IDENTIFIER=0x3;\n\n \t//CODING STANDART OPTIONS\n \tpublic static final int _CS_CCITT=0;\n \t\n \tpublic static final int _CS_INTERNATIONAL=1;\n \t\n \tpublic static final int _CS_NATIONAL=2;\n \t\n \tpublic static final int _CS_NETWORK=3;\n \t\n \t//INFORMATION TRANSFER CAPABILITIES OPTIONS\n \tpublic static final int _ITS_SPEECH=0;\n \t\n \tpublic static final int _ITS_UNRESTRICTED_DIGITAL=8;\n \t\n \tpublic static final int _ITS_RESTRICTED_DIGITAL=9;\n \t\n \tpublic static final int _ITS_3_1_KHZ=16;\n \t\n \tpublic static final int _ITS_UNRESTRICTED_DIGITAL_WITH_TONES=17;\n \t\n \tpublic static final int _ITS_VIDEO=24;\n \t\n \t//TRANSFER MODE OPTIONS\n \tpublic static final int _TM_CIRCUIT=0;\n \t\n \tpublic static final int _TM_PACKET=2;\n \t\n \t//INFORMATION TRANSFER RATE OPTIONS\n \tpublic static final int _ITR_PACKET_MODE=0;\n \t\n \tpublic static final int _ITR_64=16;\n \t\n \tpublic static final int _ITR_64x2=17;\n \t\n \tpublic static final int _ITR_384=19;\n \t\n \tpublic static final int _ITR_1536=21;\n \t\n \tpublic static final int _ITR_1920=23;\n \t\n \tpublic static final int _ITR_MULTIRATE=24;\n \t\n \t//SYNC/ASYNC OPTIONS\n \tpublic static final int _SA_SYNC=0;\n \t\n \tpublic static final int _SA_ASYNC=1;\n \t\n \t//NEGOTIATION OPTIONS\t\t\n \tpublic static final int _NG_INBAND_NOT_POSSIBLE=0;\n \t\n \tpublic static final int _NG_INBAND_POSSIBLE=1;\n \t\n \t//USER RATE OPTIONS\n \tpublic static final int _UR_EBITS=0;\n \t\n \tpublic static final int _UR_0_6=1;\n \t\n \tpublic static final int _UR_1_2=2;\n \t\n \tpublic static final int _UR_2_4=3;\n \t\n \tpublic static final int _UR_3_6=4;\n \t\n \tpublic static final int _UR_4_8=5;\n \t\n \tpublic static final int _UR_7_2=6;\n \t\n \tpublic static final int _UR_8_0=7;\n \t\n \tpublic static final int _UR_9_6=8;\n \t\n \tpublic static final int _UR_14_4=9;\n \t\n \tpublic static final int _UR_16_0=10;\n \t\n \tpublic static final int _UR_19_2=11;\n \t\n \tpublic static final int _UR_32_0=12;\n \t\n \tpublic static final int _UR_38_4=13;\n \t\n \tpublic static final int _UR_48_0=14;\n \t\n \tpublic static final int _UR_56_0=15;\n \t\n \tpublic static final int _UR_57_6=18;\n \t\n \tpublic static final int _UR_28_8=19;\n \t\n \tpublic static final int _UR_24_0=20;\n \t\n \tpublic static final int _UR_0_1345=21;\n \t\n \tpublic static final int _UR_0_1=22;\n \t\n \tpublic static final int _UR_0_075_ON_1_2=23;\n \t\n \tpublic static final int _UR_1_2_ON_0_075=24;\n \t\n \tpublic static final int _UR_0_050=25;\n \t\n \tpublic static final int _UR_0_075=26;\n \t\n \tpublic static final int _UR_0_110=27;\n \t\n \tpublic static final int _UR_0_150=28;\n \t\n \tpublic static final int _UR_0_200=29;\n \t\n \tpublic static final int _UR_0_300=30;\n \t\n \tpublic static final int _UR_12_0=31;\n \t\n \t//INTERMEDIATE RATE OPTIONS\n \tpublic static final int _IR_NOT_USED=0;\n \t\n \tpublic static final int _IR_8_0=1;\n \t\n \tpublic static final int _IR_16_0=2;\n \t\n \tpublic static final int _IR_32_0=3;\n \t\n \t//NETWORK INDEPENDENT CLOCK ON TX\n \tpublic static final int _NICTX_NOT_REQUIRED=0;\n \t\n \tpublic static final int _NICTX_REQUIRED=1;\n \t\n \t//NETWORK INDEPENDENT CLOCK ON RX\n \tpublic static final int _NICRX_CANNOT_ACCEPT=0;\n \t\n \tpublic static final int _NICRX_CAN_ACCEPT=1;\n \t\n \t//FLOW CONTROL ON TX\n \tpublic static final int _FCTX_NOT_REQUIRED=0;\n \t\n \tpublic static final int _FCTX_REQUIRED=1;\n \t\n \t//FLOW CONTROL ON RX\n \tpublic static final int _FCRX_CANNOT_ACCEPT=0;\n \t\n \tpublic static final int _FCRX_CAN_ACCEPT=1;\n \t\n \t//RATE ADAPTATION HEADER OPTIONS\n \tpublic static final int _HDR_INCLUDED=0;\n \t\n \tpublic static final int _HDR_NOT_INCLUDED=1;\n \t\n \t//MULTIFRAME OPTIONS\n \tpublic static final int _MF_NOT_SUPPORTED=0;\n \t\n \tpublic static final int _MF_SUPPORTED=1;\n \t\n \t//MODE OPTIONS\n \tpublic static final int _MODE_BIT_TRANSPARENT=0;\n \t\n \tpublic static final int _MODE_PROTOCOL_SENSITIVE=1;\n \t\n \t//LOGICAL LINK IDENTIFIER OPTIONS\n \tpublic static final int _LLI_256=0;\n \t\n \tpublic static final int _LLI_FULL_NEGOTIATION=1;\n \t\n \t//ASSIGNOR / ASSIGNEE OPTIONS\n \tpublic static final int _ASS_DEFAULT_ASSIGNEE=0;\n \t\n \tpublic static final int _ASS_ASSIGNOR_ONLY=1;\n \t\n \t//INBAND/OUT OF BAND NEGOTIATION OPTIONS\n \tpublic static final int _NEG_USER_INFORMATION=0;\n \t\t\n \tpublic static final int _NEG_INBAND=1;\n \t\t\n \t//STOP BITS OPTIONS\n \tpublic static final int _SB_NOT_USED=0;\n \t\n \tpublic static final int _SB_1BIT=1;\n \t\n \tpublic static final int _SB_1_5BITS=2;\n \t\n \tpublic static final int _SB_2BITS=3;\n \t\n \t//DATA BITS OPTIONS\n \tpublic static final int _DB_NOT_USED=0;\n \t\t\n \tpublic static final int _DB_5BITS=1;\n \t\t\n \tpublic static final int _DB_7BITS=2;\n \t\t\n \tpublic static final int _DB_8BITS=3;\n \t\t\n \t//PARITY INFORMATION\n \tpublic static final int _PAR_ODD=0;\n \t\t\t\n \tpublic static final int _PAR_EVEN=2;\n \t\t\t\n \tpublic static final int _PAR_NONE=3;\n \t\t\n \tpublic static final int _PAR_FORCED_0=4;\n \t\t\n \tpublic static final int _PAR_FORCED_1=5;\n \t\n \t//DUPLEX INFORMATION\n \tpublic static final int _DUP_HALF=0;\n \t\n \tpublic static final int _DUP_FULL=1;\n \t\t\t\n \t//MODEM TYPE INFORMATION\n \tpublic static final int _MODEM_V21=17;\n \t\n \tpublic static final int _MODEM_V22=18;\n \t\n \tpublic static final int _MODEM_V22_BIS=19;\n \t\n \tpublic static final int _MODEM_V23=20;\n \t\n \tpublic static final int _MODEM_V26=21;\n \t\n \tpublic static final int _MODEM_V26_BIS=22;\n \t\n \tpublic static final int _MODEM_V26_TER=23;\n \t\n \tpublic static final int _MODEM_V27=24;\n \t\n \tpublic static final int _MODEM_V27_BIS=25;\n \t\n \tpublic static final int _MODEM_V27_TER=26;\n \t\n \tpublic static final int _MODEM_V29=27;\n \t\n \tpublic static final int _MODEM_V32=29;\n \t\n \tpublic static final int _MODEM_V34=30;\n \t\n \t//LAYER 1 USER INFORMATION OPTIONS\n \tpublic static final int _L1_ITUT_110=1;\n \t\n \tpublic static final int _L1_G11_MU=2;\n \t\n \tpublic static final int _L1_G711_A=3;\n \t\n \tpublic static final int _L1_G721_ADPCM=4;\n \t\t\n \tpublic static final int _L1_G722_G725=5;\n \t\n \tpublic static final int _L1_H261=6;\n \t\n \tpublic static final int _L1_NON_ITUT=7;\n \t\n \tpublic static final int _L1_ITUT_120=8;\n \t\n \tpublic static final int _L1_ITUT_X31=9;\n \t\n \t//LAYER 2 USER INFORMATION OPTIONS\n \tpublic static final int _L2_BASIC=1;\n \t\n \tpublic static final int _L2_Q921=2;\n \t\n \tpublic static final int _L2_X25_SLP=6;\n \t\n \tpublic static final int _L2_X25_MLP=7;\n \t\n \tpublic static final int _L2_T71=8;\n \t\n \tpublic static final int _L2_HDLC_ARM=9;\n \t\n \tpublic static final int _L2_HDLC_NRM=10;\n \t\n \tpublic static final int _L2_HDLC_ABM=11;\n \t\n \tpublic static final int _L2_LAN_LLC=12;\n \t\n \tpublic static final int _L2_X75_SLP=13;\n \t\n \tpublic static final int _L2_Q922=14;\n \t\n \tpublic static final int _L2_USR_SPEC=16;\n \t\n \tpublic static final int _L2_T90=17;\n \t\n \t\n \t//LAYER 3 USER INFORMATION OPTIONS\n \tpublic static final int _L3_Q931=2;\n \t\n \tpublic static final int _L3_T90=5;\n \t\n \tpublic static final int _L3_X25_PLP=6;\n \t\n \tpublic static final int _L3_ISO_8208=7;\n \t\n \tpublic static final int _L3_ISO_8348=8;\n \t\n \tpublic static final int _L3_ISO_8473=9;\n \t\n \tpublic static final int _L3_T70=10;\n \t\n \tpublic static final int _L3_ISO_9577=11;\n \t\n \tpublic static final int _L3_USR_SPEC=16;\n \t\n \t\n \t//LAYER 3 PROTOCOL OPTIONS;\n \tpublic static final int _L3_PROT_IP=204;\n \t\n \tpublic static final int _L3_PROT_P2P=207;\n \t\n \tpublic int getCodingStandart();\n \n \tpublic void setCodingStandart(int codingStandart);\n \t\n \tpublic int getInformationTransferCapability();\n \n \tpublic void setInformationTransferCapability(int informationTransferCapability);\n \n \tpublic int getTransferMode();\n \n \tpublic void setTransferMode(int transferMode);\n \t\n \tpublic int getInformationTransferRate();\n \n \tpublic void setInformationTransferRate(int informationTransferRate);\n \t\n \t//custom rate in 64Kbps units\n \tpublic int getCustomInformationTransferRate();\n \t\n \tpublic void setCustomInformationTransferRate(int informationTransferRate);\n \t\n \t//TO CLEAR USER INFORMATION ON EACH LAYER SET IT TO 0\n \tpublic int getL1UserInformation();\n \n \tpublic void setL1UserInformation(int l1UserInformation);\n \t\n \tpublic int getL2UserInformation();\n \n \tpublic void setL2UserInformation(int l2UserInformation);\n \t\n \tpublic int getL3UserInformation();\n \n \tpublic void setL3UserInformation(int l3UserInformation);\n \t\n \tpublic int getSyncMode();\n \n \tpublic void setSyncMode(int syncMode);\n \t\n \tpublic int getNegotiation();\n \n \tpublic void setNegotiation(int negotiation);\n \t\n \tpublic int getUserRate();\n \n \tpublic void setUserRate(int userRate);\n \t\n \tpublic int getIntermediateRate();\n \n \tpublic void setIntermediateRate(int intermediateRate);\n \t\n \tpublic int getNicOnTx();\n \n \tpublic void setNicOnTx(int nicOnTx);\n \t\n \tpublic int getNicOnRx();\n \n \tpublic void setNicOnRx(int nicOnRx);\n \t\n \tpublic int getFlowControlOnTx();\n \n \tpublic void setFlowControlOnTx(int fcOnTx);\n \t\n \tpublic int getFlowControlOnRx();\n \n \tpublic void setFlowControlOnRx(int fcOnRx);\n \t\n \tpublic int getHDR();\n \n \tpublic void setHDR(int hdr);\n \t\n \tpublic int getMultiframe();\n \n \tpublic void setMultiframe(int multiframe);\n \t\n \tpublic int getMode();\n \n \tpublic void setMode(int mode);\n \t\n \tpublic int getLLINegotiation();\n \n \tpublic void setLLINegotiation(int lli);\n \t\n \tpublic int getAssignor();\n \n \tpublic void setAssignor(int assignor);\n \t\n \tpublic int getInBandNegotiation();\n \n \tpublic void setInBandNegotiation(int inBandNegotiation);\n \t\n \tpublic int getStopBits();\n \n \tpublic void setStopBits(int stopBits);\n \t\n \tpublic int getDataBits();\n \n \tpublic void setDataBits(int dataBits);\n \t\n \tpublic int getParity();\n \n \tpublic void setParity(int parity);\n \t\n \tpublic int getDuplexMode();\n \n \tpublic void setDuplexMode(int duplexMode);\n \t\n \tpublic int getModemType();\n \n \tpublic void setModemType(int modemType);\n \t\n \tpublic int getL3Protocol();\n \n \tpublic void setL3Protocol(int l3Protocol);\n \n }", "public ProfileTokenCredential() {\n super();\n new Random().nextBytes(addr_);\n new Random().nextBytes(mask_);\n }", "@Override\n public ModelComponent provideParameters(HashMap<String, Object> params) {\n if (params.get(\"mail\") != null) {\n this.mail = (String) params.get(\"mail\");\n }\n\n if (params.get(\"password\") != null) {\n this.password = (byte[]) params.get(\"password\");\n }\n\n return this;\n }", "public NAFReader() {\n super(\"Hamamatsu Aquacosmos\", \"naf\");\n domains = new String[] {FormatTools.LM_DOMAIN};\n }", "public NFA(){}", "private SCUserInfo(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "public UserModel(){\n ID = 0; // The user's ID, largely used in conjuction with a database\n firstName = \"fname\"; //User's first name\n lastName = \"lname\"; // User's last name\n password= \"pass\"; ///User password\n username = \"testuser\"; //Valid email for user\n role = 0; //Whether the user is a typical user or administrator\n status = 0; //Whether the user is active or disabled\n }", "public UserModel(String _ServProvCode, String _UserName, String _PassWord, String _DispName, String _Status,\r\n\t\t\tString _FName, String _MName, String _LName, String _GAUserID, Date _RecDate, String _RecFulNam,\r\n\t\t\tString _RecStatus)\r\n\t{\r\n\t\tm_ServProvCode = _ServProvCode;\r\n\t\tm_UserName = _UserName;\r\n\t\tm_PassWord = _PassWord;\r\n\t\tm_DispName = _DispName;\r\n\t\tm_Status = _Status;\r\n\t\tm_FName = _FName;\r\n\t\tm_MName = _MName;\r\n\t\tm_LName = _LName;\r\n\t\tm_GAUserID = _GAUserID;\r\n\t\tm_RecDate = _RecDate;\r\n\t\tm_RecFulNam = _RecFulNam;\r\n\t\tm_RecStatus = _RecStatus;\r\n\t\t\r\n\t}", "public void initTsnParams(){\n }", "public Parameters() {\n\t}", "public CommonSenseAuthUserData() {\n \n }", "public User(int userID, String firstName, String lastName, String fullName, String sex, String city, String country,\n String activityLevel, int age, int heightInches, int weightLBS, double BMR, double BMI,\n double weightChangeGoal, double recommendedDailyCalorieIntake, byte[] profileImageData) {\n }", "public UsermodelFactoryImpl() {\r\n\t\tsuper();\r\n\t}", "public UserData(int userDataId, String firstName, String lastName, String patronymic, String email, String phone, Tariff tariff, BigDecimal balance, int traffic, String photo, int userId) {\n this.userDataId = userDataId;\n this.firstName = firstName;\n this.lastName = lastName;\n this.patronymic = patronymic;\n this.email = email;\n this.phone = phone;\n this.tariff = tariff;\n this.balance = balance;\n this.traffic = traffic;\n this.photo = photo;\n this.userId = userId;\n }", "private PUserInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public UpdateUserProcessor() {\n\t\n\t}", "public DeleteUserParameters() {}", "public RequestValues() {\n //mUserId = userId;\n }", "RemoteUserManager() { }", "public User(String firstName, String lastName, String username, String email, String password, String city, String country, String gender,Date birthdate, int age, int imgUser, Date last_access, Date registration_date) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.username = username;\n this.email = email;\n this.password = password;\n this.city = city;\n this.country = country;\n this.gender = gender;\n this.birthdate = birthdate;\n this.age = age;\n this.imgUser = imgUser;\n this.last_access = last_access;\n this.registration_date = registration_date;\n }", "public ModuleParams()\n\t{\n\t}", "public PajekNetReader(boolean unique_labels)\n {\n this(unique_labels, false);\n }", "public ExternalServiceLayerCIMFactoryImpl() {\n\t\tsuper();\n\t}", "public ModuleParams() {\n }", "public UserModel()\r\n\t{\r\n\t}", "public DeviceFamilyImpl(DeviceFactory df){\n\t\tsuper((Class<T>) c);\n\t\tthis.df = df;\n\t}", "private CSUserInfo(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "protected abstract Nfa buildInternal();", "public UserInfo() {\n }", "public MnScan(FCNBase fcn, MnUserParameters par) {\n this(fcn, par, DEFAULT_STRATEGY);\n }", "@Override\n\t\tpublic ProfileImpl build() {\n\t\t\treturn new ProfileImpl(\n\t\t\t\tsecurity,\n\t\t\t\t(ProfileInfo)map.get(PROFILE_INFO),\n\t\t\t\t(Address)map.get(ADDRESS),\n\t\t\t\t(Address)map.get(SHIPPING_ADDRESS),\n\t\t\t\t(Social)map.get(SOCIAL),\n\t\t\t\t(Attributes)map.get(ATTRIBUTES)\n\t\t\t);\n\t\t}", "public UserMember() {\r\n //this.email = \"user@user.com\";\r\n this.email = \"\";\r\n this.firstName = \"\";\r\n this.lastName = \"\";\r\n this.username = \"\";\r\n this.password = \"\";\r\n this.memberId = 0;\r\n }", "private SigmoidParameters(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private DigitalNetBase2 initNetVar (boolean shiftFlag) {\n DigitalNetBase2 net = new DigitalNetBase2 ();\n if (shiftFlag)\n net.dim = dim + 1;\n else\n net.dim = dim;\n net.numPoints = numPoints;\n net.numCols = numCols;\n net.numRows = numRows;\n net.outDigits = outDigits;\n net.normFactor = normFactor;\n net.factor = new double[outDigits];\n net.genMat = new int[net.dim * numCols];\n net.shiftStream = shiftStream;\n net.capacityShift = capacityShift;\n net.dimShift = dimShift;\n net.digitalShift = copyDigitalShift (digitalShift);\n if (shiftFlag && shiftStream != null) {\n net.addRandomShift (dimShift, dimShift + 1, shiftStream);\n }\n return net;\n }", "public Identity()\n {\n super( Fields.ARGS );\n }", "private void buildUserParams(ThirdPartUserInfo user) {\n\t\tif (user != null) {\r\n\t\t\ttry {\r\n\t\t\t\tJSONObject jsonObject = new JSONObject();\r\n\t\t\t\tjsonObject.put(\"account\", user.getId());\r\n\t\t\t\tjsonObject.put(\"headUrl\", \"123\");\r\n\t\t\t\tjsonObject.put(\"nick\", user.getUserName());\r\n\t\t\t\tmClient.putRequestParam(\"thirdInfo\", jsonObject.toString());\r\n\t\t\t} catch (JSONException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public DbUser() {\r\n\t}", "protected void initSupportedIntensityMeasureParams() {\n\n\t\t// Create saParam:\n\t\tDoubleDiscreteConstraint periodConstraint = new DoubleDiscreteConstraint();\n\t\tTreeSet set = new TreeSet();\n\t\tEnumeration keys = coefficientsBJF.keys();\n\t\twhile (keys.hasMoreElements()) {\n\t\t\tBJF_1997_AttenRelCoefficients coeff = (BJF_1997_AttenRelCoefficients)\n\t\t\tcoefficientsBJF.get(keys.nextElement());\n\t\t\tif (coeff.period >= 0) {\n\t\t\t\tset.add(new Double(coeff.period));\n\t\t\t}\n\t\t}\n\t\tIterator it = set.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tperiodConstraint.addDouble( (Double) it.next());\n\t\t}\n\t\tperiodConstraint.setNonEditable();\n\t\tsaPeriodParam = new PeriodParam(periodConstraint);\n\t\tsaDampingParam = new DampingParam();\n\t\tsaParam = new SA_Param(saPeriodParam, saDampingParam);\n\t\tsaParam.setNonEditable();\n\n\t\t// Create PGA Parameter (pgaParam):\n\t\tpgaParam = new PGA_Param();\n\t\tpgaParam.setNonEditable();\n\n\t\t// Create PGV Parameter (pgvParam):\n\t\tpgvParam = new PGV_Param();\n\t\tpgvParam.setNonEditable();\n\n\t\t// The MMI parameter\n\t\tmmiParam = new MMI_Param();\n\n\t\t// Add the warning listeners:\n\t\tsaParam.addParameterChangeWarningListener(listener);\n\t\tpgaParam.addParameterChangeWarningListener(listener);\n\t\tpgvParam.addParameterChangeWarningListener(listener);\n\n\t\t// create supported list\n\t\tsupportedIMParams.clear();\n\t\tsupportedIMParams.addParameter(saParam);\n\t\tsupportedIMParams.addParameter(pgaParam);\n\t\tsupportedIMParams.addParameter(pgvParam);\n\t\tsupportedIMParams.addParameter(mmiParam);\n\n\t}", "public Person(String userId, String firstName, String lastName, Gender gender, String spouseId, String fatherId, String motherId) {\n Id = UUID.randomUUID().toString();\n AssociatedUserName = userId;\n FirstName = firstName;\n LastName = lastName;\n Gender = gender;\n SpouseId = spouseId;\n FatherId = fatherId;\n MotherId = motherId;\n }", "public SqlContainerCreateUpdateParameters() {\n }", "private void buildUserParams(GraphUser user) {\n\t\tif (user != null) {\r\n\t\t\ttry {\r\n\t\t\t\tJSONObject jsonObject = new JSONObject();\r\n\t\t\t\tjsonObject.put(\"account\", user.getId());\r\n\t\t\t\tjsonObject.put(\"headUrl\", \"123\");\r\n\t\t\t\tjsonObject.put(\"nick\", user.getName());\r\n\t\t\t\tmClient.putRequestParam(\"thirdInfo\", jsonObject.toString());\r\n\t\t\t} catch (JSONException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private LocalParameters() {\n\n\t}", "public UcMember(Integer id, Date createdAt, String creator, String modifier, Date updatedAt, Integer memberInfoId, Integer expertId, Integer enterpriseId, String nickname, String title, Byte sex, Integer age, Date birthday, String mobile, String email, String qq, String photo, Integer provinceId, Integer cityId, Integer countryId, String introduce, String remark, Integer visitCount, Integer dayVisitCount, Date dayVisitTime, Byte deleteFlag, Byte disableFlag, Byte mobileVerifyFlag, Byte emailVerifyFlag, Byte auditFlag, Byte openConcatFlag, Byte showFlag, Byte emailRemindFlag, Byte blogFlag, Byte realnameAuditStatus, String auditReason, Byte expertAuditStatus, Byte expertInfoAuditStatus, Byte enterpriseAuditStatus, Byte enterpriseInfoAuditStatus, Byte modFlag, Date resModUpdate, Integer safeScore, Integer safeNextId, Byte vipLevel, Date vipStartdate, Date vipEnddate) {\n this.id = id;\n this.createdAt = createdAt;\n this.creator = creator;\n this.modifier = modifier;\n this.updatedAt = updatedAt;\n this.memberInfoId = memberInfoId;\n this.expertId = expertId;\n this.enterpriseId = enterpriseId;\n this.nickname = nickname;\n this.title = title;\n this.sex = sex;\n this.age = age;\n this.birthday = birthday;\n this.mobile = mobile;\n this.email = email;\n this.qq = qq;\n this.photo = photo;\n this.provinceId = provinceId;\n this.cityId = cityId;\n this.countryId = countryId;\n this.introduce = introduce;\n this.remark = remark;\n this.visitCount = visitCount;\n this.dayVisitCount = dayVisitCount;\n this.dayVisitTime = dayVisitTime;\n this.deleteFlag = deleteFlag;\n this.disableFlag = disableFlag;\n this.mobileVerifyFlag = mobileVerifyFlag;\n this.emailVerifyFlag = emailVerifyFlag;\n this.auditFlag = auditFlag;\n this.openConcatFlag = openConcatFlag;\n this.showFlag = showFlag;\n this.emailRemindFlag = emailRemindFlag;\n this.blogFlag = blogFlag;\n this.realnameAuditStatus = realnameAuditStatus;\n this.auditReason = auditReason;\n this.expertAuditStatus = expertAuditStatus;\n this.expertInfoAuditStatus = expertInfoAuditStatus;\n this.enterpriseAuditStatus = enterpriseAuditStatus;\n this.enterpriseInfoAuditStatus = enterpriseInfoAuditStatus;\n this.modFlag = modFlag;\n this.resModUpdate = resModUpdate;\n this.safeScore = safeScore;\n this.safeNextId = safeNextId;\n this.vipLevel = vipLevel;\n this.vipStartdate = vipStartdate;\n this.vipEnddate = vipEnddate;\n }", "public UserData(String firstName, String lastName, String patronymic, String email, String phone, int userId) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.patronymic = patronymic;\n this.email = email;\n this.phone = phone;\n this.userId = userId;\n }", "public UserManager(Server server) {\r\n this.server = server;\r\n this.dbManager = (DbManager)this.server.getContext().getAttributes().get(\"DbManager\");\r\n try {\r\n this.jaxbContext = \r\n JAXBContext.newInstance(\r\n org.hackystat.sensorbase.resource.users.jaxb.ObjectFactory.class);\r\n loadDefaultUsers(); //NOPMD it's throwing a false warning. \r\n initializeCache(); //NOPMD \r\n initializeAdminUser(); //NOPMD\r\n }\r\n catch (Exception e) {\r\n String msg = \"Exception during UserManager initialization processing\";\r\n server.getLogger().warning(msg + \"\\n\" + StackTrace.toString(e));\r\n throw new RuntimeException(msg, e);\r\n }\r\n }", "public Map<String, AccessPoint> createParameters() {\r\n\t\tMap<String, AccessPoint> pm = new TreeMap<String, AccessPoint>();\r\n\t\tpm.put(\"vcNumber\", new MutableFieldAccessPoint(\"vcNumber\", this));\r\n\t\treturn pm;\r\n\t}", "public CameraSubsystem() {\n\t\t// TODO Auto-generated constructor stub\t\t\n\t\tnetworkTableValues.put(\"area\", (double) 0);\n\t\tnetworkTableValues.put(\"centerX\", (double) 0);\n\t\tnetworkTableValues.put(\"centerY\", (double) 0);\n\t\tnetworkTableValues.put(\"width\", (double) 0);\n\t\tnetworkTableValues.put(\"height\", (double) 0);\n\t\t\n\t\tcoordinates.put(\"p1x\", (double) 0);\n\t\tcoordinates.put(\"p1y\", (double) 0);\n\t\tcoordinates.put(\"p2x\", (double) 0);\n\t\tcoordinates.put(\"p2y\", (double) 0);\n\t\tcoordinates.put(\"p3x\", (double) 0);\n\t\tcoordinates.put(\"p3y\", (double) 0);\n\t\tcoordinates.put(\"p4x\", (double) 0);\n\t\tcoordinates.put(\"p4y\", (double) 0);\n\n\t\t\n\t}", "private void initClassAttributes(){ \r\n\t\tanyMissingValue = new boolean[3];\r\n\t\tanyMissingValue[0] = false; \r\n\t\tanyMissingValue[1] = false;\r\n\t\tanyMissingValue[2] = false;\r\n\t\tnumInputAttributes = Attributes.getInputNumAttributes();\r\n\t\tnumOutputAttributes = Attributes.getOutputNumAttributes();\r\n\t\tnumUndefinedAttributes = Attributes.getNumAttributes() - (numInputAttributes+numOutputAttributes);\r\n\t\tintNominalValues = new int[3][];\r\n\t\tnominalValues = new String[3][];\r\n\t\trealValues = new double[3][];\r\n\t\tmissingValues = new boolean[3][];\r\n\t\tnominalValues[0] = new String[numInputAttributes];\r\n\t\tnominalValues[1] = new String[numOutputAttributes];\r\n\t\tnominalValues[2] = new String[numUndefinedAttributes];\r\n\t\tintNominalValues[0] = new int[numInputAttributes];\r\n\t\tintNominalValues[1] = new int[numOutputAttributes];\r\n\t\tintNominalValues[2] = new int[numUndefinedAttributes];\r\n\t\trealValues[0] = new double[numInputAttributes];\r\n\t\trealValues[1] = new double[numOutputAttributes];\r\n\t\trealValues[2] = new double[numUndefinedAttributes];\r\n\t\tmissingValues[0] = new boolean[numInputAttributes];\r\n\t\tmissingValues[1] = new boolean[numOutputAttributes];\r\n\t\tmissingValues[2] = new boolean[numUndefinedAttributes];\r\n\r\n\t\tfor(int i=0;i<numInputAttributes;i++) missingValues[0][i]=false; \r\n\t\tfor(int i=0;i<numOutputAttributes;i++) missingValues[1][i]=false; \r\n\t\tfor(int i=0;i<numUndefinedAttributes; i++) missingValues[2][i]=false;\r\n\r\n\t}", "BucsUserFile(File f,String unm,UserFileType ft)\n{\n this();\n set(f,unm,ft);\n}", "public Usuario(){\n nombre = null;\n apellidos = null;\n dni = null;\n email = null;\n tlf = null;\n nombreUsuario = null;\n tarjetaCredito = null;\n hashPasswd = null; \n fotoPerfil = null;\n direccion = null;\n valoracionMedia = -1;\n }", "private MessageNewUser(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "public static Configuration createConfFromUserPayload(byte[] bb)\n throws IOException {\n Preconditions.checkNotNull(bb, \"Bytes must be specified\");\n DataInputBuffer dib = new DataInputBuffer();\n dib.reset(bb, 0, bb.length);\n Configuration conf = new Configuration(false);\n conf.readFields(dib);\n return conf;\n }", "public User() {\n this.firstName = \"Lorenzo\";\n this.lastName = \"Malferrari\";\n this.username = \"malfe.lore@gmail.com\";\n this.email = \"malfe.lore@gmail.com\";\n this.password = \"123456\";\n this.city = \"Bologna\";\n this.country = \"Italia\";\n this.gender = \"Maschio\";\n this.birthdate = new Date();\n this.age = 21;\n this.imgUser = 1;\n this.last_access = new Date();\n this.registration_date = new Date();\n }", "private UserBean buildUserBean(HttpServletRequest request) {\n\t\tAccount account = UserManager.getCurrentUser(request.getSession());\n \t\n \tUserBean userBean = new UserBean();\n \tuserBean.setFirstName(account.getGivenName());\n \tuserBean.setLastName(account.getSurname());\n \tString phoneNumber = \"\";\n \tif (account.getCustomData().get(\"phoneNumber\") != null) {\n \t\tphoneNumber = account.getCustomData().get(\"phoneNumber\").toString();\n \t}\n \tuserBean.setPhoneNumber(phoneNumber);\n \tString phoneCarrier = \"\";\n \tif (account.getCustomData().get(\"phoneCarrier\") != null) {\n \t\tphoneCarrier = account.getCustomData().get(\"phoneCarrier\").toString();\n \t}\n \tuserBean.setPhoneCarrier(phoneCarrier);\n \tString uniqueId = \"\";\n \tif (account.getCustomData().get(\"uniqueId\") != null) {\n \t\tuniqueId = account.getCustomData().get(\"uniqueId\").toString();\n \t}\n \tuserBean.setUniqueId(uniqueId);\n \t\n \treturn userBean;\n\t}", "public GameUser() {\n\t}", "public NuanceMixDlgSettings inputParameters(Map<String, Object> inputParameters) {\n this.inputParameters = inputParameters;\n return this;\n }", "public CalccustoRequest(UserContext userContext)\r\n\t{\r\n\t\tsuper(userContext);\r\n\t}", "public\nNuc2D(NucNode nuc)\nthrows Exception\n{\n\tsuper (nuc);\n}", "Utilizator createUser(String username, String password, String nume,\n\t\t\tString prenume, String tip, String aux);", "public User(){\n this(null, null);\n }", "public Usuario(String nickUsuario, String nombreUsuario, String correoUsuario, String passUsuario) {\r\n this.nickUsuario = nickUsuario;\r\n this.nombreUsuario = nombreUsuario;\r\n this.correoUsuario = correoUsuario;\r\n this.passUsuario = passUsuario;\r\n }", "public void setParameters(Map<String, String> param) {\n\n // check the occurrence of required parameters\n if(!(param.containsKey(\"Indri:mu\") && param.containsKey(\"Indri:lambda\"))){\n throw new IllegalArgumentException\n (\"Required parameters for IndriExpansion model were missing from the parameter file.\");\n }\n\n this.mu = Double.parseDouble(param.get(\"Indri:mu\"));\n if(this.mu < 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"Indri:mu\") + \", mu is a real number >= 0\");\n\n this.lambda = Double.parseDouble(param.get(\"Indri:lambda\"));\n if(this.lambda < 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"Indri:lambda\") + \", lambda is a real number between 0.0 and 1.0\");\n\n if((param.containsKey(\"fb\") && param.get(\"fb\").equals(\"true\"))) {\n this.fb = \"true\";\n\n this.fbDocs = Integer.parseInt(param.get(\"fbDocs\"));\n if (this.fbDocs <= 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"fbDocs\") + \", fbDocs is an integer > 0\");\n\n this.fbTerms = Integer.parseInt(param.get(\"fbTerms\"));\n if (this.fbTerms <= 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"fbTerms\") + \", fbTerms is an integer > 0\");\n\n this.fbMu = Integer.parseInt(param.get(\"fbMu\"));\n if (this.fbMu < 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"fbMu\") + \", fbMu is an integer >= 0\");\n\n this.fbOrigWeight = Double.parseDouble(param.get(\"fbOrigWeight\"));\n if (this.fbOrigWeight < 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"fbOrigWeight\") + \", fbOrigWeight is a real number between 0.0 and 1.0\");\n\n if (param.containsKey(\"fbInitialRankingFile\") && param.get(\"fbInitialRankingFile\") != \"\") {\n this.fbInitialRankingFile = param.get(\"fbInitialRankingFile\");\n try{\n this.initialRanking = readRanking();\n }\n catch (Exception e){\n e.printStackTrace();\n }\n }\n\n if (param.containsKey(\"fbExpansionQueryFile\") && param.get(\"fbExpansionQueryFile\") != \"\")\n this.fbExpansionQueryFile = param.get(\"fbExpansionQueryFile\");\n }\n }", "private AcquisitionParameters(ControlVocabularyManager cvManager) {\n\t\tsuper(cvManager);\n\t\tString[] parentAccessionsTMP = { \"MS:1000441\", \"MS:1000480\", \"MS:1000487\", \"MS:1000481\",\n\t\t\t\t\"MS:1000027\", \"MS:1000482\", ACQUISITION_PARAMETER_ACCESSION };\n\t\tthis.parentAccessions = parentAccessionsTMP;\n\t\tString[] explicitAccessionsTMP = { \"MS:1000032\" };\n\t\tthis.explicitAccessions = explicitAccessionsTMP;\n\n\t}", "public User() {\n username = null;\n password = null;\n email = null;\n firstName = null;\n lastName = null;\n gender = null;\n personID = null;\n }", "public TwoClassConfusionMatrix() {\n\t}", "public User() {\n\t\tsuper(AppEntityCodes.USER);\n\t}", "public RTPSessionMgr() {\r\n String user = System.getProperty(USERNAME_PROPERTY);\r\n String host = \"localhost\";\r\n try {\r\n host = InetAddress.getLocalHost().getHostName();\r\n } catch (UnknownHostException e) {\r\n // Do Nothing\r\n }\r\n this.localParticipant = new RTPLocalParticipant(user\r\n + USER_HOST_SEPARATOR + host);\r\n addFormat(PCMU_8K_MONO, PCMU_8K_MONO_RTP);\r\n addFormat(GSM_8K_MONO, GSM_8K_MONO_RTP);\r\n addFormat(G723_8K_MONO, G723_8K_MONO_RTP);\r\n addFormat(DVI_8K_MONO, DVI_8K_MONO_RTP);\r\n addFormat(MPA, MPA_RTP);\r\n addFormat(DVI_11K_MONO, DVI_11K_MONO_RTP);\r\n addFormat(DVI_22K_MONO, DVI_22K_MONO_RTP);\r\n addFormat(new VideoFormat(VideoFormat.JPEG_RTP), JPEG_RTP);\r\n addFormat(new VideoFormat(VideoFormat.H261_RTP), H261_RTP);\r\n addFormat(new VideoFormat(VideoFormat.MPEG_RTP), MPEG_RTP);\r\n addFormat(new VideoFormat(VideoFormat.H263_RTP), H263_RTP);\r\n }", "public UsersManager(String fn) throws IOException {\n\t\tsuper(fn);\n\t}", "public UserModel()\n\t{}", "public BistableParams(){\n\t\tMinDiffGrpPhyloDist = 0.5;\n\t\tMaxSameGrpPhyloDist= 0.3;\n\t\tMaxContentDiss = 0;\n\t\tMinGrpMemSize = 3;\n\t\tMinOpSize = 3;\n\t}", "public LibrarianUser() {\n\t\tsuper();\n\t}", "public User(String n) { // constructor\r\n name = n;\r\n }", "public UserEntity() {\n\t\tsuper();\n\t}" ]
[ "0.5697088", "0.52865535", "0.51499236", "0.5112737", "0.5008592", "0.5002996", "0.49449816", "0.4932317", "0.49281055", "0.4900136", "0.4871351", "0.48700693", "0.48559487", "0.48399055", "0.47945672", "0.47719988", "0.4765163", "0.47556543", "0.47084448", "0.4687824", "0.46704993", "0.4668663", "0.4662121", "0.46054357", "0.45717642", "0.4569629", "0.4568237", "0.45473936", "0.45404595", "0.45389828", "0.45373616", "0.45220214", "0.45198524", "0.45120072", "0.45113978", "0.45084697", "0.45059586", "0.45038715", "0.45038646", "0.4501875", "0.450095", "0.44959256", "0.4491166", "0.44814718", "0.44780797", "0.44763952", "0.44519943", "0.44485128", "0.4448103", "0.4446889", "0.44456643", "0.4443744", "0.44393796", "0.4438375", "0.4438054", "0.44344032", "0.44335443", "0.4432091", "0.4431924", "0.44280693", "0.44210863", "0.44103685", "0.4404322", "0.4396621", "0.43899775", "0.43883005", "0.43840054", "0.43802866", "0.43795598", "0.43771666", "0.4370914", "0.4368946", "0.43632188", "0.4362773", "0.43624786", "0.43602353", "0.4356954", "0.43467557", "0.43418384", "0.43400276", "0.4338285", "0.4336121", "0.43351954", "0.43349856", "0.4330891", "0.43295994", "0.43246567", "0.43219873", "0.4319029", "0.43147293", "0.43134668", "0.43090925", "0.43080404", "0.43074796", "0.43073887", "0.43027523", "0.43026423", "0.4300233", "0.42998546", "0.42995754", "0.42995387" ]
0.0
-1
construct from FCNBase + MnUserParameters + MnUserCovariance with default strategy
public MnScan(FCNBase fcn, MnUserParameters par, MnUserCovariance cov) { this(fcn, par, cov, DEFAULT_STRATEGY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Alg newInstance() {\n\t\treturn new BnetDistributedCF();\n\t}", "public NetworkFunctionUserConfiguration() {\n }", "Conector createConector();", "public DefaultCniNetworkInner() {\n }", "public BaseParameters(){\r\n\t}", "private DigitalNetBase2 initNetVar (boolean shiftFlag) {\n DigitalNetBase2 net = new DigitalNetBase2 ();\n if (shiftFlag)\n net.dim = dim + 1;\n else\n net.dim = dim;\n net.numPoints = numPoints;\n net.numCols = numCols;\n net.numRows = numRows;\n net.outDigits = outDigits;\n net.normFactor = normFactor;\n net.factor = new double[outDigits];\n net.genMat = new int[net.dim * numCols];\n net.shiftStream = shiftStream;\n net.capacityShift = capacityShift;\n net.dimShift = dimShift;\n net.digitalShift = copyDigitalShift (digitalShift);\n if (shiftFlag && shiftStream != null) {\n net.addRandomShift (dimShift, dimShift + 1, shiftStream);\n }\n return net;\n }", "public TwoClassConfusionMatrix() {\n\t}", "NNImpl(ArrayList<Instance> trainingSet, int hiddenNodeCount, Double learningRate, int maxEpoch, Random random, Double[][] hiddenWeights, Double[][] outputWeights) {\r\n this.trainingSet = trainingSet;\r\n this.learningRate = learningRate;\r\n this.maxEpoch = maxEpoch;\r\n this.random = random;\r\n\r\n //input layer nodes\r\n inputNodes = new ArrayList<>();\r\n int inputNodeCount = trainingSet.get(0).attributes.size();\r\n int outputNodeCount = trainingSet.get(0).classValues.size();\r\n for (int i = 0; i < inputNodeCount; i++) {\r\n Node node = new Node(0);\r\n inputNodes.add(node);\r\n }\r\n\r\n //bias node from input layer to hidden\r\n Node biasToHidden = new Node(1);\r\n inputNodes.add(biasToHidden);\r\n\r\n //hidden layer nodes\r\n hiddenNodes = new ArrayList<>();\r\n for (int i = 0; i < hiddenNodeCount; i++) {\r\n Node node = new Node(2);\r\n //Connecting hidden layer nodes with input layer nodes\r\n for (int j = 0; j < inputNodes.size(); j++) {\r\n NodeWeightPair nwp = new NodeWeightPair(inputNodes.get(j), hiddenWeights[i][j]);\r\n node.parents.add(nwp);\r\n }\r\n hiddenNodes.add(node);\r\n }\r\n\r\n //bias node from hidden layer to output\r\n Node biasToOutput = new Node(3);\r\n hiddenNodes.add(biasToOutput);\r\n\r\n //Output node layer\r\n outputNodes = new ArrayList<>();\r\n for (int i = 0; i < outputNodeCount; i++) {\r\n Node node = new Node(4);\r\n //Connecting output layer nodes with hidden layer nodes\r\n for (int j = 0; j < hiddenNodes.size(); j++) {\r\n NodeWeightPair nwp = new NodeWeightPair(hiddenNodes.get(j), outputWeights[i][j]);\r\n node.parents.add(nwp);\r\n }\r\n outputNodes.add(node);\r\n }\r\n }", "public WekaLogitLearner() { super(new Logistic2()); }", "public abstract void build(ClassifierData<U> inputData);", "public UserParameter() {\n }", "public DefaultInferenceParameters(CycAccess cycAccess) {\n this.cycAccess = cycAccess;\n }", "public interface FmTrainParams<T> extends\n HasLabelCol<T>,\n HasVectorColDefaultAsNull<T>,\n HasWeightColDefaultAsNull<T>,\n HasEpsilonDv0000001<T>,\n HasFeatureColsDefaultAsNull<T>,\n FmCommonTrainParams<T> {\n\n /**\n * @cn-name 迭代数据batch size\n * @cn 数据batch size\n */\n ParamInfo<Integer> MINIBATCH_SIZE = ParamInfoFactory\n .createParamInfo(\"batchSize\", Integer.class)\n .setDescription(\"mini-batch size\")\n\t\t\t.setAlias(new String[]{\"minibatchSize\"})\n .setHasDefaultValue(-1)\n .build();\n\n default Integer getBatchSize() {\n return get(MINIBATCH_SIZE);\n }\n\n default T setBatchSize(Integer value) {\n return set(MINIBATCH_SIZE, value);\n }\n}", "public FFANNAdaptiveBackPropagationJSP()\n\t{\n\t\t//run(network, numberInputNeurons, numberHiddenNeurons, numberOutputNeurons, trainingSet);\n\t}", "public interface CorrFeature2Feature extends TGGNode {\n}", "CbpmniFactory getCbpmniFactory();", "public interface NetworkBuilder {\n\n /**\n * Set neural net layers\n * @param layers an array with the width and depth of each layer\n * @return NetworkBuilder instance\n */\n public abstract NetworkBuilder withLayers(int[] layers);\n\n /**\n * Set the DataSet\n * @param train - training set\n * @param test - test set\n * @return NetworkBuilder instance\n */\n public abstract NetworkBuilder withDataSet(DataSet train, DataSet test);\n\n /**\n * Set the ActivationFunction\n * @param activationFunction\n * @return NetworkBuilder instance\n */\n public abstract NetworkBuilder withActivationFunction(ActivationFunction activationFunction);\n\n /**\n * Set the ErrorMeasure\n * @param errorMeasure\n * @return NetworkBuilder instance\n */\n public abstract NetworkBuilder withErrorMeasure(ErrorMeasure errorMeasure);\n\n /**\n * Train the network\n * @return the trained network for testing\n */\n public abstract FeedForwardNetwork train();\n}", "public NFA(){}", "extendedPetriNetsFactory getextendedPetriNetsFactory();", "public ConnectedComponentFromSeed()\r\n/* 25: */ {\r\n/* 26: 32 */ this.inputFields = \"input, seed\";\r\n/* 27: 33 */ this.outputFields = \"output\";\r\n/* 28: */ }", "public NNImpl(ArrayList<Instance> trainingSet, int hiddenNodeCount, Double learningRate, int maxEpoch, Double [][]hiddenWeights, Double[] outputWeights)\r\n\t{\r\n\t\tthis.trainingSet=trainingSet;\r\n\t\tthis.learningRate=learningRate;\r\n\t\tthis.maxEpoch=maxEpoch;\r\n\r\n\t\t//input layer nodes\r\n\t\tinputNodes=new ArrayList<Node>();\r\n\t\tint inputNodeCount=trainingSet.get(0).attributes.size();\r\n\t\tint outputNodeCount=1;\r\n\t\tfor(int i=0;i<inputNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(0);\r\n\t\t\tinputNodes.add(node);\r\n\t\t}\r\n\r\n\t\t//bias node from input layer to hidden\r\n\t\tNode biasToHidden=new Node(1);\r\n\t\tinputNodes.add(biasToHidden);\r\n\r\n\t\t//hidden layer nodes\r\n\t\thiddenNodes=new ArrayList<Node> ();\r\n\t\tfor(int i=0;i<hiddenNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(2);\r\n\t\t\t//Connecting hidden layer nodes with input layer nodes\r\n\t\t\tfor(int j=0;j<inputNodes.size();j++)\r\n\t\t\t{\r\n\t\t\t\tNodeWeightPair nwp=new NodeWeightPair(inputNodes.get(j),hiddenWeights[i][j]);\r\n\t\t\t\tnode.parents.add(nwp);\r\n\t\t\t}\r\n\t\t\thiddenNodes.add(node);\r\n\t\t}\r\n\r\n\t\t//bias node from hidden layer to output\r\n\t\tNode biasToOutput=new Node(3);\r\n\t\thiddenNodes.add(biasToOutput);\r\n\r\n\r\n\r\n\t\tNode node=new Node(4);\r\n\t\t//Connecting output node with hidden layer nodes\r\n\t\tfor(int j=0;j<hiddenNodes.size();j++)\r\n\t\t{\r\n\t\t\tNodeWeightPair nwp=new NodeWeightPair(hiddenNodes.get(j), outputWeights[j]);\r\n\t\t\tnode.parents.add(nwp);\r\n\t\t}\t\r\n\t\toutputNode = node;\r\n\r\n\t}", "@Override\n public Instance createInstance(IdOSAPIFactory factory, Instances dataset, IUser user) {\n\n Instance checkInst = this.checkExtractor.createInstance(factory, checkHeader, user);\n Instance facebookInst = this.facebookExtractor.createInstance(factory, facebookHeader, user);\n Instance googleInst = this.googleExtractor.createInstance(factory, googleHeader, user);\n Instance linkedinInst = this.linkedinExtractor.createInstance(factory, linkedinHeader, user);\n Instance twitterInst = this.twitterExtractor.createInstance(factory, twitterHeader, user);\n\n if (DEBUG) {\n System.out.println(\"----------------------------\");\n System.out.println(\"individual instances generated for overall:\");\n System.out.println(checkInst);\n System.out.println(facebookInst);\n System.out.println(googleInst);\n System.out.println(linkedinInst);\n System.out.println(twitterInst);\n }\n\n Instance mergedInstance = this.utils\n .mergeInstances(dataset, checkInst, facebookInst, googleInst, linkedinInst, twitterInst);\n\n mergedInstance.setDataset(dataset);\n\n // figure out what is the supervision if we're creating instances for training\n if (user instanceof IFakeUsUser) {\n\n IFakeUsUser fuser = (IFakeUsUser) user;\n\n ArrayList<ICandidate> candidates = fuser.getAttributesMap().get(new Attribute(\"overall\"));\n\n if (candidates == null)\n mergedInstance.setClassValue(\"fake\");\n else {\n boolean isReal = candidates.get(0).isReal();\n String sup = isReal ? \"real\" : \"fake\";\n mergedInstance.setClassValue(sup);\n }\n } else\n mergedInstance.setClassMissing();\n\n if (DEBUG) {\n System.out.println(\"--------------------------\");\n System.out.println(String.format(\"Resulting instance for user %s\", user.getId()));\n System.out.println(mergedInstance);\n System.out.println(\"--------------------------\");\n }\n\n return mergedInstance;\n }", "public DeviceFamilyImpl(DeviceFactory df){\n\t\tsuper((Class<T>) c);\n\t\tthis.df = df;\n\t}", "public ConfigProfile buildProfileTwo() {\n this.topics = \"kafka-data\";\n this.token = \"mytoken\";\n this.uri = \"https://dummy:8088\";\n this.raw = true;\n this.ack = false;\n this.indexes = \"index-1\";\n this.sourcetypes = \"kafka-data\";\n this.sources = \"kafka-connect\";\n this.httpKeepAlive = true;\n this.validateCertificates = false;\n this.eventBatchTimeout = 1;\n this.ackPollInterval = 1;\n this.ackPollThreads = 1;\n this.maxHttpConnPerChannel = 1;\n this.totalHecChannels = 1;\n this.socketTimeout = 1;\n this.enrichements = \"hello=world\";\n this.enrichementMap = new HashMap<>();\n this.trackData = false;\n this.maxBatchSize = 1;\n this.numOfThreads = 1;\n return this;\n }", "public MdnFeatures()\n {\n }", "public BackPropagationLearningProcess(NeuralNetwork network) {\r\n\t\tsuper(network);\r\n\t}", "public NNImpl(ArrayList<Instance> trainingSet, int hiddenNodeCount, Double learningRate, int maxEpoch, Double [][]hiddenWeights, Double[][] outputWeights)\r\n\t{\r\n\t\tthis.trainingSet=trainingSet;\r\n\t\tthis.learningRate=learningRate;\r\n\t\tthis.maxEpoch=maxEpoch;\r\n\r\n\t\t//input layer nodes\r\n\t\tinputNodes=new ArrayList<Node>();\r\n\t\tint inputNodeCount=trainingSet.get(0).attributes.size();\r\n\t\tint outputNodeCount=trainingSet.get(0).classValues.size();\r\n\t\tfor(int i=0;i<inputNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(0);\r\n\t\t\tinputNodes.add(node);\r\n\t\t}\r\n\r\n\t\t//bias node from input layer to hidden\r\n\t\tNode biasToHidden=new Node(1);\r\n\t\tinputNodes.add(biasToHidden);\r\n\r\n\t\t//hidden layer nodes\r\n\t\thiddenNodes=new ArrayList<Node> ();\r\n\t\tfor(int i=0;i<hiddenNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(2);\r\n\t\t\t//Connecting hidden layer nodes with input layer nodes\r\n\t\t\tfor(int j=0;j<inputNodes.size();j++)\r\n\t\t\t{\r\n\t\t\t\tNodeWeightPair nwp=new NodeWeightPair(inputNodes.get(j),hiddenWeights[i][j]);\r\n\t\t\t\tnode.parents.add(nwp);\r\n\t\t\t}\r\n\t\t\thiddenNodes.add(node);\r\n\t\t}\r\n\r\n\t\t//bias node from hidden layer to output\r\n\t\tNode biasToOutput=new Node(3);\r\n\t\thiddenNodes.add(biasToOutput);\r\n\r\n\t\t//Output node layer\r\n\t\toutputNodes=new ArrayList<Node> ();\r\n\t\tfor(int i=0;i<outputNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(4);\r\n\t\t\t//Connecting output layer nodes with hidden layer nodes\r\n\t\t\tfor(int j=0;j<hiddenNodes.size();j++)\r\n\t\t\t{\r\n\t\t\t\tNodeWeightPair nwp=new NodeWeightPair(hiddenNodes.get(j), outputWeights[i][j]);\r\n\t\t\t\tnode.parents.add(nwp);\r\n\t\t\t}\t\r\n\t\t\toutputNodes.add(node);\r\n\t\t}\t\r\n\t}", "ParameterRefinement createParameterRefinement();", "@Override\r\n public void init(NegotiationSession negotiationSession, Map<String, Double> parameters) {\r\n super.init(negotiationSession, parameters);\r\n this.negotiationSession = negotiationSession;\r\n if (parameters != null && parameters.get(\"l\") != null) {\r\n learnCoef = parameters.get(\"l\");\r\n } else {\r\n learnCoef = 0.2;\r\n }\r\n learnValueAddition = 1;\r\n initializeModel();\r\n }", "protected ConfusionMatrix(){\n\n\t}", "public UsermodelFactoryImpl() {\r\n\t\tsuper();\r\n\t}", "@Override\n protected void mergeModel_Profiles( Model target, Model source, boolean sourceDominant, Map<Object, Object> context )\n {\n }", "public interface Neuron {\n /**\n * Checks if current neuron is of type NeuronType.INPUT.\n *\n * @return true if it's input neuron, false otherwise\n */\n boolean isInputNeuron();\n\n /**\n * Checks if current neuron is of type NeuronType.HIDDEN.\n *\n * @return true if it's hidden neuron, false otherwise\n */\n boolean isHiddenNeuron();\n\n /**\n * Checks if current neuron is of type NeuronType.OUTPUT.\n *\n * @return true if it's output neuron, false otherwise\n */\n boolean isOutputNeuron();\n\n /**\n * Checks if current neuron is of type NeuronType.BIAS.\n *\n * @return true if it's bias neuron, false otherwise\n */\n boolean isBiasNeuron();\n\n /**\n * Getter for neuron's name.\n *\n * @return String of this neuron's name\n */\n String getName();\n\n /**\n * Setter for neuron's name.\n *\n * @param name String value as new name for this neuron\n * @return this Neuron instance\n */\n Neuron setName(String name);\n\n /**\n * Gets the List of all incoming neurons (dendrites) for this one.\n * Could be called for all neurons except neurons from input layer and bias neurons,\n * as they can't have incoming connections.\n *\n * @return the List of Neuron instance that leads to this neuron\n */\n List<Neuron> getDendrites();\n\n /**\n * Sets the List of all incoming neurons (dendrites) for this one.\n * Could be called for all neurons except neurons from input layer and bias neurons,\n * as they can't have incoming connections.\n *\n * @return this Neuron instance\n */\n Neuron setDendrites(List<Neuron> dendrites);\n\n /**\n * Gets the current value of this neuron.\n *\n * @return double value of this neuron\n */\n double getAxon();\n\n /**\n * Sets the value for this neuron.\n * Could be called only for input neurons.\n * Hidden neurons and output neurons calculating their values using information from their incoming connections\n * and using activation function, and bias neuron always have axon = 1.\n *\n * @param newValue new axon value for input neuron\n * @return this Neuron instance\n */\n Neuron setAxon(double newValue);\n\n /**\n * Gets the List of all outgoing neurons (synapses) from this one.\n * Could be called for all neurons except of output type as they can't have outgoing connections.\n *\n * @return the List of Neuron instance that this neuron leads to\n */\n List<Neuron> getSynapses();\n\n /**\n * Sets the List of all outgoing neurons (synapses) from this one.\n * Could be called for all neurons except of output type, as they can't have incoming connections.\n *\n * @return this Neuron instance\n */\n Neuron setSynapses(List<Neuron> synapses);\n\n /**\n * Gets the type of this neuron.\n *\n * @return NeuronType value that represents this neuron's type\n */\n NeuronType getType();\n\n /**\n * Computes the value for this neuron from all incoming neurons, using the list of weights passed in this method.\n * The size of weights list should be same as the number of incoming connections for this neuron.\n * Otherwise RuntimeException would be thrown.\n *\n * @param weights the List of double values the represents weights for each incoming connection for this neuron\n * @return new computed soma value\n */\n double calculateSoma(List<Double> weights);\n\n /**\n * Calculates the new value (axon) for this neuron from it's soma, normalized by activation function.\n *\n * @param activationFunction activation function to be used for normalizing soma value\n * @return new axon value for this neuron\n */\n double calculateAxon(ActivationFunction activationFunction);\n\n /**\n * Computes the value for this neuron from all incoming neurons, using the list of weights passed in this method.\n * The size of weights list should be same as the number of incoming connections for this neuron.\n * Otherwise RuntimeException would be thrown.\n * Then calculates the new value (axon) for this neuron from it's soma, normalized by activation function.\n *\n * @param weights the List of double values the represents weights for each incoming connection for this neuron\n * @param activationFunction activation function to be used for normalizing soma value\n * @return new axon value for this neuron\n */\n double calculateSomaAndAxon(List<Double> weights, ActivationFunction activationFunction);\n\n double getDelta();\n\n void setDelta(double delta);\n}", "public\nNuc2D(NucNode nuc)\nthrows Exception\n{\n\tsuper (nuc);\n}", "public SplitPolicyGeneralizedHyperplane() {\n }", "@Override\n public void init(NegotiationInfo info)\n {\n super.init(info);\n\n // initializes User Model and Opponent Model\n userModelInterface = new UserModelInterfaceImpl(this);\n utilitySpace = userModelInterface.estimateUtilitySpace();\n\n // search all outcomes and sort\n sortedOutcomeSpace = new SortedOutcomeSpace(utilitySpace);\n feasibleBids = sortedOutcomeSpace.getAllOutcomes();\n\n // initializes acceptance and offering strategy\n acceptanceStrategy = new DefaultAcceptanceStrategyImpl(this);\n offeringStrategy = new DefaultOfferingStrategyBasedOpponentImpl(this);\n }", "public NERClassifierCombiner(ObjectInputStream ois, Properties props) throws IOException, ClassCastException, ClassNotFoundException {\n super(ois,props);\n // read the useSUTime from disk\n Boolean diskUseSUTime = ois.readBoolean();\n if (props.getProperty(\"ner.useSUTime\") != null) {\n this.useSUTime = Boolean.parseBoolean(props.getProperty(\"ner.useSUTime\"));\n } else {\n this.useSUTime = diskUseSUTime;\n }\n // read the applyNumericClassifiers from disk\n Boolean diskApplyNumericClassifiers = ois.readBoolean();\n if (props.getProperty(\"ner.applyNumericClassifiers\") != null) {\n this.applyNumericClassifiers = Boolean.parseBoolean(props.getProperty(\"ner.applyNumericClassifiers\"));\n } else {\n this.applyNumericClassifiers = diskApplyNumericClassifiers;\n }\n // build the nsc, note that initProps should be set by ClassifierCombiner\n this.nsc = new NumberSequenceClassifier(new Properties(), useSUTime, props);\n }", "public MultivariateGaussianDM() {\n\t}", "Classifier getBase_Classifier();", "public UserFacebookConverter() {\n entity = new UserFacebook();\n }", "public MgtFactoryImpl()\n {\n super();\n }", "public DelegatedSubnetUsage() {\n }", "private cudaComputeMode()\r\n {\r\n }", "public static interface PredictorSelectionStrategy {\n /**\n * Injects kernel to kernel-MA according to predictor internal data.\n */\n public void injectKernel(final Predictor predictor);\n\n /**\n * Maximum size of kernels\n */\n public int kernelSize();\n\n /**\n * Creates a brand new predictor.\n */\n public PredictorListener buildPredictor();\n }", "public MnScan(FCNBase fcn, double[] par, MnUserCovariance cov) {\n this(fcn, par, cov, DEFAULT_STRATEGY);\n }", "public RealConjunctiveFeature() { }", "@Override\n\tprotected void initClassifierParameters() {\n\t\tlinearKernel = new SelectedParameterItem(\"Linear kernel\", \"-K 0\");\n\t\tpolynomialKernel = new SelectedParameterItem(\"Polynomial kernel\", \"-K 1\");\n\t\tradialBasisKernel = new SelectedParameterItem(\"Radial basis kernel\", \"-K 2\");\n\t\tsigmoidKernel = new SelectedParameterItem(\"Sigmoid kernel\", \"-K 3\");\n\t\tcSVC = new SelectedParameterItem(\"C-SVC\", \"-S 0\");\n\t\tnuSVC = new SelectedParameterItem(\"&nu;-SVC\", \"-S 1\");\n\t\tsvmType = ParameterUtilities.createSelectedParameter(\"SVM type\", cSVC, nuSVC);\n\t\tkernelType = ParameterUtilities.createSelectedParameter(\"Kernel type\", linearKernel, polynomialKernel, radialBasisKernel,\n\t\t\t\tsigmoidKernel);\n\t\tkernelDegree = new Parameter(3, \"Degree in kernel function\", Parameter.TYPE.INTEGER, \"-D\", \"classifier.degree\");\n\t\tkernelGamma = new Parameter(0.5, \"&gamma; in kernel function\", Parameter.TYPE.DOUBLE, \"-G\", \"classifier.gamma\");\n\t\tkernelCoefficient = new Parameter(0.0, \"Coefficient in kernel function\", Parameter.TYPE.DOUBLE, \"-R\", \"classifier.coef0\");\n\t\tparameterC = new Parameter(1.0, \"Parameter C\", Parameter.TYPE.DOUBLE, \"-C\", \"classifier.cost\");\n\t\tparameterNu = new Parameter(0.5, \"Parameter &nu;\", Parameter.TYPE.DOUBLE, \"-N\", \"classifier.nu\");\n\t\ttolerance = new Parameter(0.001, \"Tolerance of termination criterion\", Parameter.TYPE.DOUBLE, \"-E\");\n\t\tweight = new Parameter(null, \"Weight, set C of class i to (weight &times; C)\", Parameter.TYPE.STRING, \"-W\");\n\t}", "public interface LDABetaInitStrategy{\n\t/**\n\t * Given a model and the corpus initialise the model's sufficient statistics\n\t * @param model\n\t * @param corpus\n\t */\n\tpublic void initModel(LDAModel model, Corpus corpus);\n\t\n\t/**\n\t * initialises beta randomly s.t. each each topicWord >= 1 and < 2\n\t * @author Sina Samangooei (ss@ecs.soton.ac.uk)\n\t *\n\t */\n\tpublic static class RandomBetaInit implements LDABetaInitStrategy{\n\t\tprivate MersenneTwister random;\n\t\t\n\t\t/**\n\t\t * unseeded random\n\t\t */\n\t\tpublic RandomBetaInit() {\n\t\t\trandom = new MersenneTwister();\n\t\t}\n\t\t\n\t\t/**\n\t\t * seeded random\n\t\t * @param seed\n\t\t */\n\t\tpublic RandomBetaInit(int seed) {\n\t\t\trandom = new MersenneTwister(seed);\n\t\t}\n\t\t@Override\n\t\tpublic void initModel(LDAModel model, Corpus corpus) {\n\t\t\tfor (int topicIndex = 0; topicIndex < model.ntopics; topicIndex++) {\n\t\t\t\tfor (int wordIndex = 0; wordIndex < corpus.vocabularySize(); wordIndex++) {\n\t\t\t\t\tdouble topicWord = 1 + random.nextDouble();\n\t\t\t\t\tmodel.incTopicWord(topicIndex,wordIndex,topicWord);\n\t\t\t\t\tmodel.incTopicTotal(topicIndex, topicWord);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "@Override\r\n\tpublic void init() {\n\r\n\t PetriNet _net = new PetriNet(this, \"PhilosopherNet\", true, true);\r\n\t ContDistExponential dist1 = new ContDistExponential(this, \"waitdist1\", 2, true, true);\r\n\t ContDistExponential dist2 = new ContDistExponential(this, \"waitdist1\", 3, true, true);\r\n\t ContDistExponential dist3 = new ContDistExponential(this, \"durdist1\", 3, true, true);\r\n\r\n\t\t// Declaration of the used types of Tokens. These have to be objects\r\n\t\t// implementing the TokenType interface. Note that there is only one\r\n\t\t// object for each type, no matter how many Tokens of that type may\r\n\t\t// exist. A different object (even of the same class) always declares a\r\n\t\t// new, different type of token.\r\n\t\t\r\n\t\tTokenType type1 = new Fork();\r\n\t\tTokenType type2 = new Fork();\r\n\t\tTokenType type3 = new Fork();\r\n\t\tTokenType type4 = new Fork();\r\n\t\tTokenType type5 = new Fork();\r\n\t\tMap<TokenType, Integer> tokens = TokenMultiSetTools.arrayToMap(\r\n\t\t\t\tnew TokenType[] { type1, type2, type3, type4, type5 },\r\n\t\t\t\tnew int[] { 1, 1, 1, 1, 1 });\r\n\r\n\t\tPlace p1 = new Place(this, _net, \"p1\", tokens, true, true, true);\r\n\r\n\t\tTransitionMode t1 = new TransitionMode(this, _net, \"t1\", dist1, dist3, true, true);\r\n\t\tTransitionMode t2 = new TransitionMode(this, _net, \"t2\", dist2, dist3, true, true);\r\n\t\tTransitionMode t3 = new TransitionMode(this, _net, \"t3\", dist1, dist3, true, true);\r\n\t\tTransitionMode t4 = new TransitionMode(this, _net, \"t4\", dist2, dist3, true, true);\r\n\t\tTransitionMode t5 = new TransitionMode(this, _net, \"t5\", dist1, dist3, true, true);\r\n\r\n\t\tTransition trans = new Transition(this, _net, \"Mahlzeit\", true, true);\r\n\t\ttrans.addTransitionMode(t1);\r\n\t\ttrans.addTransitionMode(t2);\r\n\t\ttrans.addTransitionMode(t3);\r\n\t\ttrans.addTransitionMode(t4);\r\n\t\ttrans.addTransitionMode(t5);\r\n\r\n\t\tt1.addInputPlace(p1, TokenMultiSetTools.arrayToMap(new TokenType[] { type1,\r\n\t\t\t\ttype2 }, new int[] { 1, 1 }));\r\n\t\tt1.addOutputPlace(p1, TokenMultiSetTools.arrayToMap(new TokenType[] { type1,\r\n\t\t\t\ttype2 }, new int[] { 1, 1 }));\r\n\r\n\t\tt2.addInputPlace(p1, TokenMultiSetTools.arrayToMap(new TokenType[] { type2,\r\n\t\t\t\ttype3 }, new int[] { 1, 1 }));\r\n\t\tt2.addOutputPlace(p1, TokenMultiSetTools.arrayToMap(new TokenType[] { type2,\r\n\t\t\t\ttype3 }, new int[] { 1, 1 }));\r\n\r\n\t\tt3.addInputPlace(p1, TokenMultiSetTools.arrayToMap(new TokenType[] { type3,\r\n\t\t\t\ttype4 }, new int[] { 1, 1 }));\r\n\t\tt3.addOutputPlace(p1, TokenMultiSetTools.arrayToMap(new TokenType[] { type3,\r\n\t\t\t\ttype4 }, new int[] { 1, 1 }));\r\n\r\n\t\tt4.addInputPlace(p1, TokenMultiSetTools.arrayToMap(new TokenType[] { type4,\r\n\t\t\t\ttype5 }, new int[] { 1, 1 }));\r\n\t\tt4.addOutputPlace(p1, TokenMultiSetTools.arrayToMap(new TokenType[] { type4,\r\n\t\t\t\ttype5 }, new int[] { 1, 1 }));\r\n\r\n\t\tt5.addInputPlace(p1, TokenMultiSetTools.arrayToMap(new TokenType[] { type5,\r\n\t\t\t\ttype1 }, new int[] { 1, 1 }));\r\n\t\tt5.addOutputPlace(p1, TokenMultiSetTools.arrayToMap(new TokenType[] { type5,\r\n\t\t\t\ttype1 }, new int[] { 1, 1 }));\r\n\r\n\t}", "public ConfigProfile buildProfileDefault() {\n this.topics = \"mytopic\";\n this.token = \"mytoken\";\n this.uri = \"https://dummy:8088\";\n this.raw = false;\n this.ack = true;\n this.indexes = \"\";\n this.sourcetypes = \"\";\n this.sources = \"\";\n this.httpKeepAlive = true;\n this.validateCertificates = true;\n this.hasTrustStorePath = true;\n this.trustStorePath = \"./src/test/resources/keystoretest.jks\";\n this.trustStoreType = \"JKS\";\n this.trustStorePassword = \"Notchangeme\";\n this.eventBatchTimeout = 1;\n this.ackPollInterval = 1;\n this.ackPollThreads = 1;\n this.maxHttpConnPerChannel = 1;\n this.totalHecChannels = 1;\n this.socketTimeout = 1;\n this.enrichements = \"ni=hao,hello=world\";\n this.enrichementMap = new HashMap<>();\n this.trackData = true;\n this.maxBatchSize = 1;\n this.numOfThreads = 1;\n this.lineBreaker = \"\\n\";\n return this;\n }", "protected LearningAbstractAgent(){}", "@Override\n\tpublic void initStateNodes() {\n \tSystem.err.println(Randomizer.getSeed());\n\t\tPartitionedTreeLikelihood likelihood = null;\n\t\tfor (BEASTInterface plugin : getOutputs()) {\n\t\t\tif (plugin instanceof PartitionedTreeLikelihood) {\n\t\t\t\tlikelihood = (PartitionedTreeLikelihood) plugin;\n\t\t\t}\n\t\t}\n\t\tif (likelihood == null) {\n\t\t\tthrow new IllegalArgumentException(\"PartitionProvider must have PartitionedTreeLikelihood as output\");\n\t\t}\n\t\tSiteModel.Base siteModel = (SiteModel.Base) likelihood.siteModelInput.get();\n\t\t\n\t\tif (siteModel instanceof SiteModel) {\n\t\t\tRealParameter mu = ((SiteModel) siteModel).muParameterInput.get();\n\t\t\tif (!mu.isEstimatedInput.get()) {\n\t\t\t\tSystem.err.println(\"Warning: sitemodel mutation rates are NOT estimated. This is probably not what you want\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tString sPartition = BeautiDoc.parsePartition(getID());\n\t\tSet<BEASTInterface> ancestors = new HashSet<BEASTInterface>();\n\t\tBeautiDoc.collectAncestors(this, ancestors, new HashSet<BEASTInterface>());\n\t\tMCMC mcmc = null;\n\t\tfor (BEASTInterface plugin : ancestors) {\n\t\t\tif (plugin instanceof MCMC) {\n\t\t\t\tmcmc = (MCMC) plugin;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tm_pSiteModel.get().add(siteModel);\n\t\tList<BEASTInterface> tabuList = new ArrayList<BEASTInterface>();\n\t\ttabuList.add(this);\n\t\tfor (int i = 1; i < numPartitions.get(); i++) {\n\t\t\tBeautiDoc doc = new BeautiDoc();\n\t\t\tPartitionContext oldContext = new PartitionContext(sPartition);\n\t\t\tPartitionContext newContext = new PartitionContext(sPartition+i);\n\t\t\tBEASTInterface plugin = BeautiDoc.deepCopyPlugin(siteModel, this, mcmc, oldContext, newContext, doc, tabuList);\n\t\t\tm_pSiteModel.get().add((SiteModel.Base) plugin);\n\t\t}\n\t\tif (siteModel instanceof SiteModel) {\n\t\t\tRealParameter mu = ((SiteModel) siteModel).muParameterInput.get();\n\t\t\tmu.isEstimatedInput.setValue(false, mu);\n\t\t\tmu.initByName(\"lower\", \"\"+mu.getValue(), \"upper\" , \"\" + mu.getValue());\n\t\t}\n\t\tState state = mcmc.startStateInput.get();\n\t\tstate.initialise();\n state.setPosterior(mcmc.posteriorInput.get());\n\t\tneedsInitilising = false;\n\t\tinitAndValidate();\n\n\t\tSet<BEASTInterface> plugins = new HashSet<BEASTInterface>();\n\t\tfor (BEASTInterface plugin : mcmc.listActiveBEASTObjects()) {\n\t\t\treinitialise(plugin, plugins);\n\t\t}\n//\t\t\n//\t\tfor (Plugin plugin : ancestors) {\n//\t\t\tif (plugin instanceof PartitionedTreeLikelihood) {\n//\t\t\t\t((PartitionedTreeLikelihood) plugin).initAndValidate();\n//\t\t\t\tbreak;\n//\t\t\t}\n//\t\t}\n\t}", "public VariabilityFactoryImpl() {\n\t\tsuper();\n\t}", "private SigmoidParameters(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public InterpolationModel() {\n\tUnigram = new UnigramModel();\n\tBigram = new BigramModel();\n\tTrigram = new TrigramModel();\n }", "public void useCovarianceMatrix(){\n this.covRhoOption = true;\n }", "MixtureOfExperts(int nExperts){\r\n\t\twritePosteriorThreshold = 0.0;\r\n\t\testimationPosteriorThreshold = 0.0;\r\n\t\tnumberOfExperts = nExperts;\r\n\t\tlogProbOfCluster = new float[numberOfExperts];\r\n numberOfUsers = 0;\r\n \r\n\t}", "public TypeData(ClassData baseClass) {\n this.baseClass = baseClass;\n //this.restriction = \n }", "public void testConstructors()\n {\n VectorThresholdInformationGainLearner<String> subLearner = null;\n double percentToSample = RandomSubVectorThresholdLearner.DEFAULT_PERCENT_TO_SAMPLE;\n VectorFactory<?> vectorFactory = VectorFactory.getDefault();\n int[] dimensionsToConsider = null;\n RandomSubVectorThresholdLearner<String> instance = new RandomSubVectorThresholdLearner<String>();\n assertSame(subLearner, instance.getSubLearner());\n assertEquals(percentToSample, instance.getPercentToSample());\n assertSame(dimensionsToConsider, instance.getDimensionsToConsider());\n assertNotNull(instance.getRandom());\n assertSame(vectorFactory, instance.getVectorFactory());\n\n subLearner = new VectorThresholdInformationGainLearner<String>();\n percentToSample = percentToSample / 2.0;\n instance = new RandomSubVectorThresholdLearner<String>(subLearner,\n percentToSample, random);\n assertSame(subLearner, instance.getSubLearner());\n assertEquals(percentToSample, instance.getPercentToSample());\n assertSame(dimensionsToConsider, instance.getDimensionsToConsider());\n assertSame(random, instance.getRandom());\n assertSame(vectorFactory, instance.getVectorFactory());\n\n vectorFactory = VectorFactory.getSparseDefault();\n instance = new RandomSubVectorThresholdLearner<String>(subLearner,\n percentToSample, random, vectorFactory);\n assertSame(subLearner, instance.getSubLearner());\n assertEquals(percentToSample, instance.getPercentToSample());\n assertSame(dimensionsToConsider, instance.getDimensionsToConsider());\n assertSame(random, instance.getRandom());\n assertSame(vectorFactory, instance.getVectorFactory());\n \n dimensionsToConsider = new int[] {5, 12};\n vectorFactory = VectorFactory.getSparseDefault();\n instance = new RandomSubVectorThresholdLearner<String>(subLearner,\n percentToSample, dimensionsToConsider, random, vectorFactory);\n assertSame(subLearner, instance.getSubLearner());\n assertEquals(percentToSample, instance.getPercentToSample());\n assertSame(dimensionsToConsider, instance.getDimensionsToConsider());\n assertSame(random, instance.getRandom());\n assertSame(vectorFactory, instance.getVectorFactory());\n }", "public interface RelationalClassifier extends Classifier {\r\n}", "public ColumnColorVarietyStrategyBuilder(){\n super();\n ObjectiveCardStrategy ccvs = new ColumnColorVarietyStrategy();\n this.setStrategy(ccvs);\n this.setToBeCompared(\"ColumnColorVarietyStrategy\");\n }", "public interface MultiLabelClassifier extends Serializable{\n int getNumClasses();\n MultiLabel predict(Vector vector);\n default MultiLabel[] predict(MultiLabelClfDataSet dataSet){\n\n List<MultiLabel> results = IntStream.range(0,dataSet.getNumDataPoints()).parallel()\n .mapToObj(i -> predict(dataSet.getRow(i)))\n .collect(Collectors.toList());\n return results.toArray(new MultiLabel[results.size()]);\n }\n\n default void serialize(File file) throws Exception{\n File parent = file.getParentFile();\n if (!parent.exists()){\n parent.mkdirs();\n }\n try (\n FileOutputStream fileOutputStream = new FileOutputStream(file);\n BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(fileOutputStream);\n ObjectOutputStream objectOutputStream = new ObjectOutputStream(bufferedOutputStream);\n ){\n objectOutputStream.writeObject(this);\n }\n }\n\n default void serialize(String file) throws Exception{\n serialize(new File(file));\n }\n\n\n FeatureList getFeatureList();\n\n LabelTranslator getLabelTranslator();\n\n interface ClassScoreEstimator extends MultiLabelClassifier{\n double predictClassScore(Vector vector, int k);\n default double[] predictClassScores(Vector vector){\n return IntStream.range(0,getNumClasses()).mapToDouble(k -> predictClassScore(vector,k))\n .toArray();\n\n }\n }\n\n\n\n interface ClassProbEstimator extends MultiLabelClassifier{\n double[] predictClassProbs(Vector vector);\n\n /**\n * in some cases, this can be implemented more efficiently\n * @param vector\n * @param classIndex\n * @return\n */\n default double predictClassProb(Vector vector, int classIndex){\n return predictClassProbs(vector)[classIndex];\n }\n }\n\n interface AssignmentProbEstimator extends MultiLabelClassifier{\n double predictLogAssignmentProb(Vector vector, MultiLabel assignment);\n default double predictAssignmentProb(Vector vector, MultiLabel assignment){\n return Math.exp(predictLogAssignmentProb(vector, assignment));\n }\n\n /**\n * batch version\n * can be implemented more efficiently in individual classifiers\n * @param vector\n * @param assignments\n * @return\n */\n default double[] predictAssignmentProbs(Vector vector, List<MultiLabel> assignments){\n return Arrays.stream(predictLogAssignmentProbs(vector, assignments)).map(Math::exp).toArray();\n }\n\n\n default double[] predictLogAssignmentProbs(Vector vector, List<MultiLabel> assignments){\n double[] logProbs = new double[assignments.size()];\n for (int c=0;c<assignments.size();c++){\n logProbs[c] = predictLogAssignmentProb(vector, assignments.get(c));\n }\n return logProbs;\n }\n }\n\n}", "Generalization createGeneralization();", "private void instantiateAux(InstanceSet instanceSet,\r\n\t\t\tPreprocessorParameters parameters)\r\n\tthrows Exception {\r\n\t\tclusterBasedUtils = new ClusterBasedUtils(instanceSet);\r\n\t\tint preprocessorID = parameters.getPreprocessorID();\r\n\t\t\r\n\t\tswitch (preprocessorID) {\r\n\t\t\t/* Original */\r\n\t\t\tcase PreprocessorIDs.ORIGINAL:\r\n\t\t\t\toriginal = new Original(instanceSet, parameters);\r\n\t\t\t\tnumBatchIterations.add(original.getNumBatchIterations());\r\n\t\t\t\tpreprocessorList.add(original);\r\n\t\t\t\tbreak;\r\n\t\r\n\t\t\t/* Oversampling */\r\n\t\t\tcase PreprocessorIDs.OVERSAMPLING:\r\n\t\t\t\toversampling = new RandomOversampling(instanceSet, parameters);\r\n\t\t\t\tnumBatchIterations.add(oversampling.getNumBatchIterations());\r\n\t\t\t\tpreprocessorList.add(oversampling);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\t/* Simplesampling */\r\n\t\t\tcase PreprocessorIDs.SIMPLESAMPLING:\r\n\t\t\t\tsimplesampling = new Simplesampling(instanceSet, parameters);\r\n\t\t\t\tnumBatchIterations.add(simplesampling.getNumBatchIterations());\r\n\t\t\t\tpreprocessorList.add(simplesampling);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\t/* Smote */\r\n\t\t\tcase PreprocessorIDs.SMOTE:\r\n\t\t\t\tsmote = new Smote(instanceSet, parameters);\r\n\t\t\t\tnumBatchIterations.add(smote.getNumBatchIterations());\r\n\t\t\t\tpreprocessorList.add(smote);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\t/* Cluster Based Oversampling */\r\n\t\t\tcase PreprocessorIDs.CLUSTER_BASED_OVERSAMPLING:\r\n\t\t\t\tcbo = new ClusterBasedOversampling(clusterBasedUtils,\r\n\t\t\t\t\t\tinstanceSet, parameters);\r\n\t\t\t\tnumBatchIterations.add(cbo.getNumBatchIterations());\r\n\t\t\t\tpreprocessorList.add(cbo);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\t/* Cluster Based Smote */\r\n\t\t\tcase PreprocessorIDs.CLUSTER_BASED_SMOTE:\r\n\t\t\t\tcbs = new ClusterBasedSmote(clusterBasedUtils, instanceSet,\r\n\t\t\t\t\t\tparameters);\r\n\t\t\t\tnumBatchIterations.add(cbs.getNumBatchIterations());\r\n\t\t\t\tpreprocessorList.add(cbs);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\t/* Cclear */\r\n\t\t\tcase PreprocessorIDs.CCLEAR:\r\n\t\t\t\tcClear = new Cclear(clusterBasedUtils, instanceSet, parameters);\r\n\t\t\t\tnumBatchIterations.add(cClear.getNumBatchIterations());\r\n\t\t\t\tpreprocessorList.add(cClear);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\t/* Baseline */\r\n\t\t\tcase PreprocessorIDs.BASELINE:\r\n\t\t\t\tbaseline = new Baseline(instanceSet, parameters);\r\n\t\t\t\tnumBatchIterations.add(baseline.getNumBatchIterations());\r\n\t\t\t\tpreprocessorList.add(baseline);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "public BaseOptimizer() {\r\n Candidates = new ArrayList<>();\r\n }", "public PetrinetmodelFactoryImpl() {\r\n\t\tsuper();\r\n\t}", "public void initialize(Instance inst){\n\n\t\t\tDoubleVector weights = CreateDoubleVector(inst.numAttributes(),0) ;// extended length ;\n// \t\tVarianceRationREduction\n\t\t\tif (learningCriteriaOption.getChosenIndex()==1) {\n\t\t\t\tdefaultRule = new RuleVR(this);\n\t\t\t}else {\n\t\t\t\tdefaultRule = new RuleErrR(this);\n\t\t\t}\n\n\t\t\tVector<FuzzySet> terms = new Vector<FuzzySet>();\n\t\t\tfor (int i = 0; i < inst.numAttributes(); i++) {\n\t\t\t\tif (inst.classIndex()==i)\n\t\t\t\t\tcontinue ;\n\t\t\t\tterms.add(new FuzzySet.LOToRO()) ;\n\t\t\t}\n\t\t\n\t\t\tdefaultRule.setAll(terms, weights);\n\t\t\tdefaultRule.setPrefixAndVersion(\"\", currentSystemVersion);\n\t\t\trs.add(defaultRule);\n\t\t\tcurrentValidCandidates = new Vector<FuzzyRuleExtendedCandidate>() ;\n\t\t\tcurrentNonReadyCandidates = new Vector<FuzzyRuleExtendedCandidate>() ;\n\t\t\tinitialized = true ;\n\t\n\t\t\tif (statsAttributes.size()==0){\n\t\t\t\tfor (int j = 0; j < inst.numAttributes(); j++) {\n\t\t\t\t\tif (inst.classIndex()==j)\n\t\t\t\t\t\tcontinue ;\n\t\t\t\t\tstatsAttributes.add(new IncrementalVariance()) ;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "protected abstract void construct();", "public BoofCVMeta() {\n\n addDependency(\"org.boofcv\", \"boofcv-all\", \"0.40.1\");\n addDescription(\"BoofCV computer vision service\");\n addCategory(\"vision\");\n }", "public BullyMessageListenerFactoryImpl(BullyAlgorithmParticipant self) {\n //We use port as processId since it's coming from the coordinator and guaranteed\n //to be sequential and unique.\n this.self = self;\n }", "public NioDatagramChannel(InternetProtocolFamily ipFamily) {\n/* 132 */ this(newSocket(DEFAULT_SELECTOR_PROVIDER, ipFamily));\n/* */ }", "private void initCommonParameter()\r\n {\r\n cp = new CommonParameterHolder();\r\n cp.setLoginId(userProfile.getLoginId());\r\n cp.setCurrentUserOid(userProfile.getUserOid());\r\n cp.setClientIp(this.getRequest().getRemoteAddr());\r\n cp.setMkMode(false);\r\n }", "@Override\n\tpublic void setup(NluInput nluInput) {\n\t\tthis.user = nluInput.user;\n\t\tthis.language = nluInput.language;\n\t\tthis.nlu_input = nluInput;\n\t}", "private DerivedFeatureSource(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public interface IDistribution extends IUncertainty {\n\tstatic interface IParameter extends IUncertainty {};\n\n}", "private UserFactory() {\r\n }", "private SigmoidCalibration(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public NioDatagramChannel(SelectorProvider provider, InternetProtocolFamily ipFamily) {\n/* 141 */ this(newSocket(provider, ipFamily));\n/* */ }", "public interface CommonInterface {\n\n\t/* FEED FORWARD\n\t * The input vector. An array of doubles.\n * @return The value returned by the LUT or NN for this input vector\n\t * \tX the input vector. An array of doubles.\n\t * The value return by LUT OR NN for this input vector\n\t * returns output of the neurons forward propagation\n\t * */\n\tpublic double outputFor(double [] X);\n\n\t/* \n\t * Method will tell NN or LUT the output value that should be mapped \n\t * to given input vector i.e. the desired correct output value for an input\n\t * @param X the input vector\n\t * @param argValue The new value to learn\n\t * @return the error in output for input vector \n\t */\n\tpublic double train(double[] X, double argValue);\n\t/*\n\t * Method to write either a LUT or weights of neural net to a file\n\t * @param argFile of type File\n\t */\n\tpublic void save (File argFile) throws IOException;\n\t/*\n\t * Loads LUT or NN weights from file. Load must of course have \n\t * knowledge of how data was written out by save mehtod.\n\t * Should raise an error in case that attempt is being made\n\t * to load data into an LUT or NN whose struct does not match the data in\n\t * the file (.eg. wrong number of hidden neurons)\n\t */\n\tpublic void load (String argFileName) throws IOException;\n}", "abstract Truerandomness newInstance();", "public FvFactoryImpl() {\n\t\tsuper();\n\t}", "Strategy createStrategy();", "UOp createUOp();", "public NioDatagramChannel(DatagramChannel socket) {\n/* 148 */ super(null, socket, 1);\n/* 149 */ this.config = (DatagramChannelConfig)new NioDatagramChannelConfig(this, socket);\n/* */ }", "public void fromProto(Message inProto)\n {\n if(!(inProto instanceof BaseFeatProto))\n {\n Log.warning(\"cannot parse proto \" + inProto.getClass());\n return;\n }\n\n BaseFeatProto proto = (BaseFeatProto)inProto;\n\n super.fromProto(proto.getBase());\n\n if(proto.hasType())\n m_featType = FeatType.fromProto(proto.getType());\n\n if(proto.hasBenefit())\n m_benefit = Optional.of(proto.getBenefit());\n\n if(proto.hasSpecial())\n m_special = Optional.of(proto.getSpecial());\n\n if(proto.hasNormal())\n m_normal = Optional.of(proto.getNormal());\n\n if(proto.hasPrerequisites())\n m_prerequisites = Optional.of(proto.getPrerequisites());\n\n for(BaseFeatProto.Effect effect : proto.getEffectList())\n m_effects.add(new Effect(Affects.fromProto(effect.getAffects()),\n effect.hasReference()\n ? Optional.of(effect.getReference())\n : Optional.<String>absent(),\n effect.hasModifier()\n ? Optional.of(Modifier.fromProto\n (effect.getModifier()))\n : Optional.<Modifier>absent(),\n Optional.<String>absent()));\n }", "@Override\n public void construct() {\n Metric metric =\n new CPU_Utilization(1) {\n @Override\n public MetricFlowUnit gather(Queryable queryable) {\n return MetricFlowUnit.generic();\n }\n };\n Symptom earthSymptom =\n new Symptom(1) {\n @Override\n public SymptomFlowUnit operate() {\n return SymptomFlowUnit.generic();\n }\n\n @Override\n public String name() {\n return EARTH_KEY;\n }\n };\n Symptom moonSymptom =\n new Symptom(1) {\n @Override\n public SymptomFlowUnit operate() {\n return SymptomFlowUnit.generic();\n }\n\n public String name() {\n return MOON_KEY;\n }\n };\n\n Metric skyLabCpu =\n new CPU_Utilization(1) {\n @Override\n public MetricFlowUnit gather(Queryable queryable) {\n return MetricFlowUnit.generic();\n }\n };\n Symptom skyLabsSymptom =\n new Symptom(1) {\n @Override\n public SymptomFlowUnit operate() {\n return SymptomFlowUnit.generic();\n }\n\n public String name() {\n return SKY_LABS_KEY;\n }\n };\n\n addLeaf(metric);\n addLeaf(skyLabCpu);\n earthSymptom.addAllUpstreams(Collections.singletonList(metric));\n moonSymptom.addAllUpstreams(Collections.singletonList(earthSymptom));\n skyLabsSymptom.addAllUpstreams(\n new ArrayList<Node<?>>() {\n {\n add(earthSymptom);\n add(moonSymptom);\n add(skyLabCpu);\n }\n });\n\n metric.addTag(LOCUS_KEY, EARTH_KEY);\n earthSymptom.addTag(LOCUS_KEY, EARTH_KEY);\n moonSymptom.addTag(LOCUS_KEY, MOON_KEY);\n skyLabCpu.addTag(LOCUS_KEY, SKY_LABS_KEY);\n skyLabsSymptom.addTag(LOCUS_KEY, SKY_LABS_KEY);\n }", "public CvBoostParams()\r\n {\r\n\r\n super( CvBoostParams_0() );\r\n\r\n return;\r\n }", "public AppcActorServiceProvider() {\n super(NAME, BidirectionalTopicActorParams.class);\n\n addOperator(new BidirectionalTopicOperator(NAME, ModifyConfigOperation.NAME, this, AppcOperation.SELECTOR_KEYS,\n ModifyConfigOperation::new));\n }", "public interface Aggregator {\n /**\n * Determines the final class recognized\n * @param confidence Confidence values produced by a recognizer\n * (one confidence value per class)\n * @return The final prediction given by a classifier\n */\n public Prediction apply( double[] confidence );\n\n}", "public ParameterizedInstantiateFactory() {\r\n super();\r\n }", "@Test\n public void addModelData() {\n new FactoryInitializer()\n .initialize(\n ((tr, ev, is, np, md) -> new ResNetConv2DFactory(tr,ev,is,np,md).addModelData(new ArrayList<>()))\n );\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic UserSerializer() {\n\t\tsuper();\n\t\tmapSerializer.putAll(BeanRetriever.getBean(\"mapSerializerStrategy\", Map.class));\n\t}", "@Override\n public MetaprogramTargetNode deepCopy(BsjNodeFactory factory);", "defaultConstructor(){}", "public RandomSubVectorThresholdLearnerTest(\n String testName)\n {\n super(testName);\n\n this.random = new Random();\n }", "public MnjMfgFabinsProdLEOImpl() {\n }", "public ObjectInspector init(Mode m, ObjectInspector[] parameters)\n throws HiveException {\n super.init(m, parameters);\n partialOI = PrimitiveObjectInspectorFactory.writableBinaryObjectInspector;\n finalOI = getFinalObjectInspector();\n switch (m) {\n case PARTIAL1: \n inputOI = parameters[0];\n case PARTIAL2:\n return partialOI;\n case FINAL:\n case COMPLETE:\n return finalOI;\n default:\n throw new IllegalArgumentException(\"Unknown UDAF mode \" + m);\n }\n }", "IntStrategyFactory() {\n }", "public BestMeanConvergence() {\n }", "public MixedInitiativeManager(IndividualDesignManager idm, int[] chosenFF, int[] chosenBMPs, int UserId, int[] regionSubbasinId, int[] tenure_regionSubbasinId) { \n this.idm = idm;\n this.dbm = idm.dbm;\n this.UserId = UserId;\n this.chosenFF = chosenFF;\n this.chosenBMPs = chosenBMPs;\n this.tenure_regionSubbasinId = tenure_regionSubbasinId;\n this.regionSubbasinId = regionSubbasinId;\n im = new IntrospectionManager(idm);\n om = new OptimizationManager(idm);\n setLocalPreferences();//set the local BMP ids\n sdmm = new SDMManager(idm, statm, chosenFF, localSubbasinLoc, useLocalPreference, chosenBMPs, useANFIS);\n this.statm = new StatisticsManager(dbm);\n //sdmm.createNewSDM(type_optimize);\n kendall = new MannKendall();\n }" ]
[ "0.5121079", "0.48080912", "0.48020017", "0.46152225", "0.45606634", "0.4484537", "0.44761685", "0.44715425", "0.4453742", "0.44274324", "0.4415917", "0.4403979", "0.43966052", "0.43270147", "0.42936513", "0.42921862", "0.4287442", "0.4270025", "0.4257388", "0.4251269", "0.42385978", "0.42283264", "0.42211598", "0.42053163", "0.41998985", "0.41970038", "0.4190152", "0.4189536", "0.41667652", "0.41626522", "0.41523203", "0.41348183", "0.4133581", "0.41262373", "0.41234922", "0.41218463", "0.41183165", "0.40957022", "0.40892348", "0.40883008", "0.40839294", "0.40779933", "0.40664065", "0.40517274", "0.40410832", "0.4033999", "0.40337715", "0.40282726", "0.40244454", "0.4021012", "0.40204775", "0.40092823", "0.39983603", "0.39968988", "0.39951816", "0.39873385", "0.39862987", "0.39824027", "0.39808834", "0.39785472", "0.3975227", "0.39748996", "0.39701602", "0.39699614", "0.39669335", "0.3965364", "0.39594242", "0.39582244", "0.39448178", "0.39436007", "0.39409012", "0.39371097", "0.39367265", "0.39337432", "0.39313975", "0.39312425", "0.39308137", "0.39261433", "0.39255697", "0.39250082", "0.39231604", "0.39230874", "0.39226326", "0.39213094", "0.39207286", "0.39206746", "0.39170033", "0.39161456", "0.39127573", "0.39121744", "0.39071766", "0.39032495", "0.38954926", "0.38938302", "0.38919994", "0.38912165", "0.38908824", "0.38880196", "0.38866788", "0.38856924" ]
0.41815683
28
construct from FCNBase + MnUserParameters + MnUserCovariance
public MnScan(FCNBase fcn, MnUserParameters par, MnUserCovariance cov, int stra) { this(fcn, new MnUserParameterState(par, cov), new MnStrategy(stra)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BaseParameters(){\r\n\t}", "public abstract void build(ClassifierData<U> inputData);", "public TwoClassConfusionMatrix() {\n\t}", "public interface CorrFeature2Feature extends TGGNode {\n}", "public UserParameter() {\n }", "public\nNuc2D(NucNode nuc)\nthrows Exception\n{\n\tsuper (nuc);\n}", "public NetworkFunctionUserConfiguration() {\n }", "@Override\n\tpublic Alg newInstance() {\n\t\treturn new BnetDistributedCF();\n\t}", "public MultivariateGaussianDM() {\n\t}", "private DigitalNetBase2 initNetVar (boolean shiftFlag) {\n DigitalNetBase2 net = new DigitalNetBase2 ();\n if (shiftFlag)\n net.dim = dim + 1;\n else\n net.dim = dim;\n net.numPoints = numPoints;\n net.numCols = numCols;\n net.numRows = numRows;\n net.outDigits = outDigits;\n net.normFactor = normFactor;\n net.factor = new double[outDigits];\n net.genMat = new int[net.dim * numCols];\n net.shiftStream = shiftStream;\n net.capacityShift = capacityShift;\n net.dimShift = dimShift;\n net.digitalShift = copyDigitalShift (digitalShift);\n if (shiftFlag && shiftStream != null) {\n net.addRandomShift (dimShift, dimShift + 1, shiftStream);\n }\n return net;\n }", "NNImpl(ArrayList<Instance> trainingSet, int hiddenNodeCount, Double learningRate, int maxEpoch, Random random, Double[][] hiddenWeights, Double[][] outputWeights) {\r\n this.trainingSet = trainingSet;\r\n this.learningRate = learningRate;\r\n this.maxEpoch = maxEpoch;\r\n this.random = random;\r\n\r\n //input layer nodes\r\n inputNodes = new ArrayList<>();\r\n int inputNodeCount = trainingSet.get(0).attributes.size();\r\n int outputNodeCount = trainingSet.get(0).classValues.size();\r\n for (int i = 0; i < inputNodeCount; i++) {\r\n Node node = new Node(0);\r\n inputNodes.add(node);\r\n }\r\n\r\n //bias node from input layer to hidden\r\n Node biasToHidden = new Node(1);\r\n inputNodes.add(biasToHidden);\r\n\r\n //hidden layer nodes\r\n hiddenNodes = new ArrayList<>();\r\n for (int i = 0; i < hiddenNodeCount; i++) {\r\n Node node = new Node(2);\r\n //Connecting hidden layer nodes with input layer nodes\r\n for (int j = 0; j < inputNodes.size(); j++) {\r\n NodeWeightPair nwp = new NodeWeightPair(inputNodes.get(j), hiddenWeights[i][j]);\r\n node.parents.add(nwp);\r\n }\r\n hiddenNodes.add(node);\r\n }\r\n\r\n //bias node from hidden layer to output\r\n Node biasToOutput = new Node(3);\r\n hiddenNodes.add(biasToOutput);\r\n\r\n //Output node layer\r\n outputNodes = new ArrayList<>();\r\n for (int i = 0; i < outputNodeCount; i++) {\r\n Node node = new Node(4);\r\n //Connecting output layer nodes with hidden layer nodes\r\n for (int j = 0; j < hiddenNodes.size(); j++) {\r\n NodeWeightPair nwp = new NodeWeightPair(hiddenNodes.get(j), outputWeights[i][j]);\r\n node.parents.add(nwp);\r\n }\r\n outputNodes.add(node);\r\n }\r\n }", "Conector createConector();", "public DeviceFamilyImpl(DeviceFactory df){\n\t\tsuper((Class<T>) c);\n\t\tthis.df = df;\n\t}", "public MdnFeatures()\n {\n }", "protected ConfusionMatrix(){\n\n\t}", "public MnScan(FCNBase fcn, MnUserParameters par, MnUserCovariance cov) {\n this(fcn, par, cov, DEFAULT_STRATEGY);\n }", "UOp createUOp();", "private SigmoidParameters(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public DefaultCniNetworkInner() {\n }", "public NNImpl(ArrayList<Instance> trainingSet, int hiddenNodeCount, Double learningRate, int maxEpoch, Double [][]hiddenWeights, Double[] outputWeights)\r\n\t{\r\n\t\tthis.trainingSet=trainingSet;\r\n\t\tthis.learningRate=learningRate;\r\n\t\tthis.maxEpoch=maxEpoch;\r\n\r\n\t\t//input layer nodes\r\n\t\tinputNodes=new ArrayList<Node>();\r\n\t\tint inputNodeCount=trainingSet.get(0).attributes.size();\r\n\t\tint outputNodeCount=1;\r\n\t\tfor(int i=0;i<inputNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(0);\r\n\t\t\tinputNodes.add(node);\r\n\t\t}\r\n\r\n\t\t//bias node from input layer to hidden\r\n\t\tNode biasToHidden=new Node(1);\r\n\t\tinputNodes.add(biasToHidden);\r\n\r\n\t\t//hidden layer nodes\r\n\t\thiddenNodes=new ArrayList<Node> ();\r\n\t\tfor(int i=0;i<hiddenNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(2);\r\n\t\t\t//Connecting hidden layer nodes with input layer nodes\r\n\t\t\tfor(int j=0;j<inputNodes.size();j++)\r\n\t\t\t{\r\n\t\t\t\tNodeWeightPair nwp=new NodeWeightPair(inputNodes.get(j),hiddenWeights[i][j]);\r\n\t\t\t\tnode.parents.add(nwp);\r\n\t\t\t}\r\n\t\t\thiddenNodes.add(node);\r\n\t\t}\r\n\r\n\t\t//bias node from hidden layer to output\r\n\t\tNode biasToOutput=new Node(3);\r\n\t\thiddenNodes.add(biasToOutput);\r\n\r\n\r\n\r\n\t\tNode node=new Node(4);\r\n\t\t//Connecting output node with hidden layer nodes\r\n\t\tfor(int j=0;j<hiddenNodes.size();j++)\r\n\t\t{\r\n\t\t\tNodeWeightPair nwp=new NodeWeightPair(hiddenNodes.get(j), outputWeights[j]);\r\n\t\t\tnode.parents.add(nwp);\r\n\t\t}\t\r\n\t\toutputNode = node;\r\n\r\n\t}", "public NFA(){}", "public WekaLogitLearner() { super(new Logistic2()); }", "CbpmniFactory getCbpmniFactory();", "public TypeData(ClassData baseClass) {\n this.baseClass = baseClass;\n //this.restriction = \n }", "public NetworkFunctionUserConfiguration withUserDataParameters(Object userDataParameters) {\n this.userDataParameters = userDataParameters;\n return this;\n }", "public interface FmTrainParams<T> extends\n HasLabelCol<T>,\n HasVectorColDefaultAsNull<T>,\n HasWeightColDefaultAsNull<T>,\n HasEpsilonDv0000001<T>,\n HasFeatureColsDefaultAsNull<T>,\n FmCommonTrainParams<T> {\n\n /**\n * @cn-name 迭代数据batch size\n * @cn 数据batch size\n */\n ParamInfo<Integer> MINIBATCH_SIZE = ParamInfoFactory\n .createParamInfo(\"batchSize\", Integer.class)\n .setDescription(\"mini-batch size\")\n\t\t\t.setAlias(new String[]{\"minibatchSize\"})\n .setHasDefaultValue(-1)\n .build();\n\n default Integer getBatchSize() {\n return get(MINIBATCH_SIZE);\n }\n\n default T setBatchSize(Integer value) {\n return set(MINIBATCH_SIZE, value);\n }\n}", "public UserFacebookConverter() {\n entity = new UserFacebook();\n }", "public NNImpl(ArrayList<Instance> trainingSet, int hiddenNodeCount, Double learningRate, int maxEpoch, Double [][]hiddenWeights, Double[][] outputWeights)\r\n\t{\r\n\t\tthis.trainingSet=trainingSet;\r\n\t\tthis.learningRate=learningRate;\r\n\t\tthis.maxEpoch=maxEpoch;\r\n\r\n\t\t//input layer nodes\r\n\t\tinputNodes=new ArrayList<Node>();\r\n\t\tint inputNodeCount=trainingSet.get(0).attributes.size();\r\n\t\tint outputNodeCount=trainingSet.get(0).classValues.size();\r\n\t\tfor(int i=0;i<inputNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(0);\r\n\t\t\tinputNodes.add(node);\r\n\t\t}\r\n\r\n\t\t//bias node from input layer to hidden\r\n\t\tNode biasToHidden=new Node(1);\r\n\t\tinputNodes.add(biasToHidden);\r\n\r\n\t\t//hidden layer nodes\r\n\t\thiddenNodes=new ArrayList<Node> ();\r\n\t\tfor(int i=0;i<hiddenNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(2);\r\n\t\t\t//Connecting hidden layer nodes with input layer nodes\r\n\t\t\tfor(int j=0;j<inputNodes.size();j++)\r\n\t\t\t{\r\n\t\t\t\tNodeWeightPair nwp=new NodeWeightPair(inputNodes.get(j),hiddenWeights[i][j]);\r\n\t\t\t\tnode.parents.add(nwp);\r\n\t\t\t}\r\n\t\t\thiddenNodes.add(node);\r\n\t\t}\r\n\r\n\t\t//bias node from hidden layer to output\r\n\t\tNode biasToOutput=new Node(3);\r\n\t\thiddenNodes.add(biasToOutput);\r\n\r\n\t\t//Output node layer\r\n\t\toutputNodes=new ArrayList<Node> ();\r\n\t\tfor(int i=0;i<outputNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(4);\r\n\t\t\t//Connecting output layer nodes with hidden layer nodes\r\n\t\t\tfor(int j=0;j<hiddenNodes.size();j++)\r\n\t\t\t{\r\n\t\t\t\tNodeWeightPair nwp=new NodeWeightPair(hiddenNodes.get(j), outputWeights[i][j]);\r\n\t\t\t\tnode.parents.add(nwp);\r\n\t\t\t}\t\r\n\t\t\toutputNodes.add(node);\r\n\t\t}\t\r\n\t}", "public DigitalNetBase2 toNet() {\n DigitalNetBase2 net = initNetVar (false);\n for (int i = 0; i < dim * numCols; i++)\n net.genMat[i] = genMat[i];\n return net;\n }", "@Test\n public void addModelData() {\n new FactoryInitializer()\n .initialize(\n ((tr, ev, is, np, md) -> new ResNetConv2DFactory(tr,ev,is,np,md).addModelData(new ArrayList<>()))\n );\n }", "public MnScan(FCNBase fcn, double[] par, MnUserCovariance cov) {\n this(fcn, par, cov, DEFAULT_STRATEGY);\n }", "public UnivariateStatsData() {\n super();\n }", "public NewUserMBean() {\r\n }", "extendedPetriNetsFactory getextendedPetriNetsFactory();", "public ConnectedComponentFromSeed()\r\n/* 25: */ {\r\n/* 26: 32 */ this.inputFields = \"input, seed\";\r\n/* 27: 33 */ this.outputFields = \"output\";\r\n/* 28: */ }", "public RealConjunctiveFeature() { }", "public BackPropagationLearningProcess(NeuralNetwork network) {\r\n\t\tsuper(network);\r\n\t}", "protected abstract void construct();", "@Override // from StateSpaceModel\n public Tensor f(Tensor x, Tensor u) {\n return u;\n }", "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}", "protected Factorization copy(){\n Factorization newFactor = new Factorization(this.mdc);\n //shallow copy\n newFactor.setRecipes(recipes);\n newFactor.setIngredients(ingredients);\n newFactor.setUserMap(userMap);\n newFactor.setUserMapReversed(userMap_r);\n newFactor.setRecipeMap(recipeMap);\n newFactor.setRecipeMapReversed(recipeMap_r);\n newFactor.setIngredientMap(ingredientMap);\n newFactor.setIngredientMapReversed(ingredientMap_r);\n \n //deep copy\n List<User> userCopy = new ArrayList<User>();\n for(User curr: this.users){\n userCopy.add(new User(curr.getId()));\n }\n newFactor.setUsers(userCopy);\n newFactor.setDataset(dataset.copy());\n newFactor.updateInitialSpace();\n return newFactor;\n }", "public UsermodelFactoryImpl() {\r\n\t\tsuper();\r\n\t}", "public FUManager(int nGeneric, int nAdd, int nMult) {\n if (nGeneric != 0) {\n generic = nGeneric;\n genericFU = new ArrayList<>(nGeneric);\n //el ID de la UF es i\n for (int i = 0; i < nGeneric; i++) {\n FuGeneric gen = new FuGeneric(i, ConfigFile.getLatencyGeneric());\n gen.setIsActive(true);\n genericFU.add(gen);\n }\n FU.put(typeFU.GENERIC, genericFU);\n }\n\n if (nAdd != 0) {\n add = nAdd;\n addFU = new ArrayList<>(nAdd);\n for (int i = nGeneric; i < nAdd + nGeneric; i++) {\n FuAdd ad = new FuAdd(i, ConfigFile.getLatencyAdd());\n ad.setIsActive(true);\n addFU.add(ad);\n }\n FU.put(typeFU.ADD, addFU);\n }\n\n if (nMult != 0) {\n mult = nMult;\n multFU = new ArrayList<>(nMult);\n for (int i = nAdd; i < nMult + nAdd; i++) {\n FuMult m = new FuMult(i, ConfigFile.getLatencyMult());\n m.setIsActive(true);\n multFU.add(m);\n }\n FU.put(typeFU.MULT, multFU);\n }\n\n }", "public User(Behavior model, double cleanup, double honest, \n\t\t\tboolean pre_trusted, Globals GLOBALS){\n\t\tthis.model = model;\n\t\tthis.pre_trusted = pre_trusted;\n\t\tthis.num_files = 0;\n\t\tthis.num_upload =0;\n\t\tthis.pct_cleanup = cleanup;\n\t\tthis.pct_honest = honest;\n\t\t\n\t\tthis.vector = new Relation[GLOBALS.NUM_USERS];\n\t\tfor(int i=0; i < GLOBALS.NUM_USERS; i++)\n\t\t\tvector[i] = new Relation();\n\t\t\n\t\tul_bwidth = new BWidthUnit(GLOBALS);\n\t\tdl_bwidth = new BWidthUnit(GLOBALS);\t\n\t}", "public BackPropagationNeural_3H(int size_in,int size_hidden1,int size_hidden2,int size_hidden3,int size_output){\n\t\tthis.size_in = size_in;\n\t\tthis.size_hidden1 = size_hidden1;\n\t\tthis.size_hidden2 = size_hidden2;\n\t\tthis.size_hidden3 = size_hidden3;\n\t\tthis.size_output = size_output;\n\t\t\n\t\tinputs = new float[size_in];\n\t\thidden1 = new float[size_hidden1];\n\t\thidden2 = new float[size_hidden2];\n\t\thidden3 = new float[size_hidden3];\n\t\toutput = new float[size_output];\n\t\t\n\t\tweight1 = new float[size_in][size_hidden1];\n\t\tweight2 = new float[size_hidden1][size_hidden2];\n\t\tweight3 = new float[size_hidden2][size_hidden3];\n\t\tweight4 = new float[size_hidden3][size_output];\n\t\t\n\t\tW1_last_delta = new float[size_in][size_hidden1];\n W2_last_delta = new float[size_hidden1][size_hidden2];\n W3_last_delta = new float[size_hidden2][size_hidden3];\n W4_last_delta = new float[size_hidden3][size_output];\n \n\t\trandomizeWeights();\n\t\toutput_error = new float[size_output];\n\t\thidden1_error = new float[size_hidden1];\n\t\thidden2_error = new float[size_hidden2];\n\t\thidden3_error = new float[size_hidden3];\n\t}", "@Override\n public Instance createInstance(IdOSAPIFactory factory, Instances dataset, IUser user) {\n\n Instance checkInst = this.checkExtractor.createInstance(factory, checkHeader, user);\n Instance facebookInst = this.facebookExtractor.createInstance(factory, facebookHeader, user);\n Instance googleInst = this.googleExtractor.createInstance(factory, googleHeader, user);\n Instance linkedinInst = this.linkedinExtractor.createInstance(factory, linkedinHeader, user);\n Instance twitterInst = this.twitterExtractor.createInstance(factory, twitterHeader, user);\n\n if (DEBUG) {\n System.out.println(\"----------------------------\");\n System.out.println(\"individual instances generated for overall:\");\n System.out.println(checkInst);\n System.out.println(facebookInst);\n System.out.println(googleInst);\n System.out.println(linkedinInst);\n System.out.println(twitterInst);\n }\n\n Instance mergedInstance = this.utils\n .mergeInstances(dataset, checkInst, facebookInst, googleInst, linkedinInst, twitterInst);\n\n mergedInstance.setDataset(dataset);\n\n // figure out what is the supervision if we're creating instances for training\n if (user instanceof IFakeUsUser) {\n\n IFakeUsUser fuser = (IFakeUsUser) user;\n\n ArrayList<ICandidate> candidates = fuser.getAttributesMap().get(new Attribute(\"overall\"));\n\n if (candidates == null)\n mergedInstance.setClassValue(\"fake\");\n else {\n boolean isReal = candidates.get(0).isReal();\n String sup = isReal ? \"real\" : \"fake\";\n mergedInstance.setClassValue(sup);\n }\n } else\n mergedInstance.setClassMissing();\n\n if (DEBUG) {\n System.out.println(\"--------------------------\");\n System.out.println(String.format(\"Resulting instance for user %s\", user.getId()));\n System.out.println(mergedInstance);\n System.out.println(\"--------------------------\");\n }\n\n return mergedInstance;\n }", "public void fromProto(Message inProto)\n {\n if(!(inProto instanceof BaseFeatProto))\n {\n Log.warning(\"cannot parse proto \" + inProto.getClass());\n return;\n }\n\n BaseFeatProto proto = (BaseFeatProto)inProto;\n\n super.fromProto(proto.getBase());\n\n if(proto.hasType())\n m_featType = FeatType.fromProto(proto.getType());\n\n if(proto.hasBenefit())\n m_benefit = Optional.of(proto.getBenefit());\n\n if(proto.hasSpecial())\n m_special = Optional.of(proto.getSpecial());\n\n if(proto.hasNormal())\n m_normal = Optional.of(proto.getNormal());\n\n if(proto.hasPrerequisites())\n m_prerequisites = Optional.of(proto.getPrerequisites());\n\n for(BaseFeatProto.Effect effect : proto.getEffectList())\n m_effects.add(new Effect(Affects.fromProto(effect.getAffects()),\n effect.hasReference()\n ? Optional.of(effect.getReference())\n : Optional.<String>absent(),\n effect.hasModifier()\n ? Optional.of(Modifier.fromProto\n (effect.getModifier()))\n : Optional.<Modifier>absent(),\n Optional.<String>absent()));\n }", "public interface LinopTransform extends Transform {\r\n public double[][] getMat();\r\n}", "public CambioUserN() {\n initComponents();\n }", "static Nda<Float> of( float... value ) { return Tensor.of( Float.class, Shape.of( value.length ), value ); }", "public interface IDistribution extends IUncertainty {\n\tstatic interface IParameter extends IUncertainty {};\n\n}", "public NERClassifierCombiner(ObjectInputStream ois, Properties props) throws IOException, ClassCastException, ClassNotFoundException {\n super(ois,props);\n // read the useSUTime from disk\n Boolean diskUseSUTime = ois.readBoolean();\n if (props.getProperty(\"ner.useSUTime\") != null) {\n this.useSUTime = Boolean.parseBoolean(props.getProperty(\"ner.useSUTime\"));\n } else {\n this.useSUTime = diskUseSUTime;\n }\n // read the applyNumericClassifiers from disk\n Boolean diskApplyNumericClassifiers = ois.readBoolean();\n if (props.getProperty(\"ner.applyNumericClassifiers\") != null) {\n this.applyNumericClassifiers = Boolean.parseBoolean(props.getProperty(\"ner.applyNumericClassifiers\"));\n } else {\n this.applyNumericClassifiers = diskApplyNumericClassifiers;\n }\n // build the nsc, note that initProps should be set by ClassifierCombiner\n this.nsc = new NumberSequenceClassifier(new Properties(), useSUTime, props);\n }", "public interface Neuron {\n /**\n * Checks if current neuron is of type NeuronType.INPUT.\n *\n * @return true if it's input neuron, false otherwise\n */\n boolean isInputNeuron();\n\n /**\n * Checks if current neuron is of type NeuronType.HIDDEN.\n *\n * @return true if it's hidden neuron, false otherwise\n */\n boolean isHiddenNeuron();\n\n /**\n * Checks if current neuron is of type NeuronType.OUTPUT.\n *\n * @return true if it's output neuron, false otherwise\n */\n boolean isOutputNeuron();\n\n /**\n * Checks if current neuron is of type NeuronType.BIAS.\n *\n * @return true if it's bias neuron, false otherwise\n */\n boolean isBiasNeuron();\n\n /**\n * Getter for neuron's name.\n *\n * @return String of this neuron's name\n */\n String getName();\n\n /**\n * Setter for neuron's name.\n *\n * @param name String value as new name for this neuron\n * @return this Neuron instance\n */\n Neuron setName(String name);\n\n /**\n * Gets the List of all incoming neurons (dendrites) for this one.\n * Could be called for all neurons except neurons from input layer and bias neurons,\n * as they can't have incoming connections.\n *\n * @return the List of Neuron instance that leads to this neuron\n */\n List<Neuron> getDendrites();\n\n /**\n * Sets the List of all incoming neurons (dendrites) for this one.\n * Could be called for all neurons except neurons from input layer and bias neurons,\n * as they can't have incoming connections.\n *\n * @return this Neuron instance\n */\n Neuron setDendrites(List<Neuron> dendrites);\n\n /**\n * Gets the current value of this neuron.\n *\n * @return double value of this neuron\n */\n double getAxon();\n\n /**\n * Sets the value for this neuron.\n * Could be called only for input neurons.\n * Hidden neurons and output neurons calculating their values using information from their incoming connections\n * and using activation function, and bias neuron always have axon = 1.\n *\n * @param newValue new axon value for input neuron\n * @return this Neuron instance\n */\n Neuron setAxon(double newValue);\n\n /**\n * Gets the List of all outgoing neurons (synapses) from this one.\n * Could be called for all neurons except of output type as they can't have outgoing connections.\n *\n * @return the List of Neuron instance that this neuron leads to\n */\n List<Neuron> getSynapses();\n\n /**\n * Sets the List of all outgoing neurons (synapses) from this one.\n * Could be called for all neurons except of output type, as they can't have incoming connections.\n *\n * @return this Neuron instance\n */\n Neuron setSynapses(List<Neuron> synapses);\n\n /**\n * Gets the type of this neuron.\n *\n * @return NeuronType value that represents this neuron's type\n */\n NeuronType getType();\n\n /**\n * Computes the value for this neuron from all incoming neurons, using the list of weights passed in this method.\n * The size of weights list should be same as the number of incoming connections for this neuron.\n * Otherwise RuntimeException would be thrown.\n *\n * @param weights the List of double values the represents weights for each incoming connection for this neuron\n * @return new computed soma value\n */\n double calculateSoma(List<Double> weights);\n\n /**\n * Calculates the new value (axon) for this neuron from it's soma, normalized by activation function.\n *\n * @param activationFunction activation function to be used for normalizing soma value\n * @return new axon value for this neuron\n */\n double calculateAxon(ActivationFunction activationFunction);\n\n /**\n * Computes the value for this neuron from all incoming neurons, using the list of weights passed in this method.\n * The size of weights list should be same as the number of incoming connections for this neuron.\n * Otherwise RuntimeException would be thrown.\n * Then calculates the new value (axon) for this neuron from it's soma, normalized by activation function.\n *\n * @param weights the List of double values the represents weights for each incoming connection for this neuron\n * @param activationFunction activation function to be used for normalizing soma value\n * @return new axon value for this neuron\n */\n double calculateSomaAndAxon(List<Double> weights, ActivationFunction activationFunction);\n\n double getDelta();\n\n void setDelta(double delta);\n}", "public UserModel()\r\n\t{\r\n\t}", "public CMN() {\n\t}", "public void setSubNet(PetriNetModel m) {\n //subModel = m;\n }", "ParameterRefinement createParameterRefinement();", "@Override\n\tpublic void setup(NluInput nluInput) {\n\t\tthis.user = nluInput.user;\n\t\tthis.language = nluInput.language;\n\t\tthis.nlu_input = nluInput;\n\t}", "public DMXUserInput() {\n }", "private void initClassAttributes(){ \r\n\t\tanyMissingValue = new boolean[3];\r\n\t\tanyMissingValue[0] = false; \r\n\t\tanyMissingValue[1] = false;\r\n\t\tanyMissingValue[2] = false;\r\n\t\tnumInputAttributes = Attributes.getInputNumAttributes();\r\n\t\tnumOutputAttributes = Attributes.getOutputNumAttributes();\r\n\t\tnumUndefinedAttributes = Attributes.getNumAttributes() - (numInputAttributes+numOutputAttributes);\r\n\t\tintNominalValues = new int[3][];\r\n\t\tnominalValues = new String[3][];\r\n\t\trealValues = new double[3][];\r\n\t\tmissingValues = new boolean[3][];\r\n\t\tnominalValues[0] = new String[numInputAttributes];\r\n\t\tnominalValues[1] = new String[numOutputAttributes];\r\n\t\tnominalValues[2] = new String[numUndefinedAttributes];\r\n\t\tintNominalValues[0] = new int[numInputAttributes];\r\n\t\tintNominalValues[1] = new int[numOutputAttributes];\r\n\t\tintNominalValues[2] = new int[numUndefinedAttributes];\r\n\t\trealValues[0] = new double[numInputAttributes];\r\n\t\trealValues[1] = new double[numOutputAttributes];\r\n\t\trealValues[2] = new double[numUndefinedAttributes];\r\n\t\tmissingValues[0] = new boolean[numInputAttributes];\r\n\t\tmissingValues[1] = new boolean[numOutputAttributes];\r\n\t\tmissingValues[2] = new boolean[numUndefinedAttributes];\r\n\r\n\t\tfor(int i=0;i<numInputAttributes;i++) missingValues[0][i]=false; \r\n\t\tfor(int i=0;i<numOutputAttributes;i++) missingValues[1][i]=false; \r\n\t\tfor(int i=0;i<numUndefinedAttributes; i++) missingValues[2][i]=false;\r\n\r\n\t}", "public interface CommonInterface {\n\n\t/* FEED FORWARD\n\t * The input vector. An array of doubles.\n * @return The value returned by the LUT or NN for this input vector\n\t * \tX the input vector. An array of doubles.\n\t * The value return by LUT OR NN for this input vector\n\t * returns output of the neurons forward propagation\n\t * */\n\tpublic double outputFor(double [] X);\n\n\t/* \n\t * Method will tell NN or LUT the output value that should be mapped \n\t * to given input vector i.e. the desired correct output value for an input\n\t * @param X the input vector\n\t * @param argValue The new value to learn\n\t * @return the error in output for input vector \n\t */\n\tpublic double train(double[] X, double argValue);\n\t/*\n\t * Method to write either a LUT or weights of neural net to a file\n\t * @param argFile of type File\n\t */\n\tpublic void save (File argFile) throws IOException;\n\t/*\n\t * Loads LUT or NN weights from file. Load must of course have \n\t * knowledge of how data was written out by save mehtod.\n\t * Should raise an error in case that attempt is being made\n\t * to load data into an LUT or NN whose struct does not match the data in\n\t * the file (.eg. wrong number of hidden neurons)\n\t */\n\tpublic void load (String argFileName) throws IOException;\n}", "public Neuron(Neuron n, double b){\r\n\t\t//Set this Neuron to the Neuron on which to base it\r\n\t\tinputs=n.inputs;\r\n\t\tweights=n.weights;\r\n\t\tlayer=n.layer;\r\n\t\tbias=b;\r\n\t\t//Make a MUTATIONRATE % chance to change the state of each input\r\n\t\t/*for(int i=0; i<inputs.size(); i++)\r\n\t\t\tif(Math.random()<=MUTATIONTRATE)\r\n\t\t\t\tif(inputs.get(i)==1)inputs.set(i, 0);\r\n\t\t\t\telse inputs.set(i, 1);*/\r\n\t\t\r\n\t\t//Change each weight by +/- MUTATIONDEGREE %\r\n\t\tfor(int i=0; i<weights.length; i++)\r\n\t\t\tweights[i]*=1+(Math.random()*MUTATIONDEGREE-(MUTATIONDEGREE/2));\r\n\t}", "public abstract double covariance(double x1, double x2);", "public ObjectInspector init(Mode m, ObjectInspector[] parameters)\n throws HiveException {\n super.init(m, parameters);\n partialOI = PrimitiveObjectInspectorFactory.writableBinaryObjectInspector;\n finalOI = getFinalObjectInspector();\n switch (m) {\n case PARTIAL1: \n inputOI = parameters[0];\n case PARTIAL2:\n return partialOI;\n case FINAL:\n case COMPLETE:\n return finalOI;\n default:\n throw new IllegalArgumentException(\"Unknown UDAF mode \" + m);\n }\n }", "private void setIMUParameters(){\n BNO055IMU.Parameters parameters = getIMUParameters();\n imu.initialize(parameters);\n }", "private SigmoidCalibration(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public UsuarioMB() {\n }", "public CvSVM(Mat trainData, Mat responses, Mat varIdx, Mat sampleIdx, CvSVMParams params)\r\n {\r\n\r\n super( CvSVM_1(trainData.nativeObj, responses.nativeObj, varIdx.nativeObj, sampleIdx.nativeObj, params.nativeObj) );\r\n\r\n return;\r\n }", "private DerivedFeatureSource(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public User(int userID, String firstName, String lastName, String fullName, String sex, String city, String country,\n String activityLevel, int age, int heightInches, int weightLBS, double BMR, double BMI,\n double weightChangeGoal, double recommendedDailyCalorieIntake, byte[] profileImageData) {\n }", "public InterpolationModel() {\n\tUnigram = new UnigramModel();\n\tBigram = new BigramModel();\n\tTrigram = new TrigramModel();\n }", "public KmFacebookUser()\n {\n _devices = new KmList<KmFacebookDevice>();\n _languages = new KmList<KmFacebookIdName>();\n _interestedIn = new KmList<String>();\n }", "public DefaultInferenceParameters(CycAccess cycAccess) {\n this.cycAccess = cycAccess;\n }", "@Override\n public void construct() {\n Metric metric =\n new CPU_Utilization(1) {\n @Override\n public MetricFlowUnit gather(Queryable queryable) {\n return MetricFlowUnit.generic();\n }\n };\n Symptom earthSymptom =\n new Symptom(1) {\n @Override\n public SymptomFlowUnit operate() {\n return SymptomFlowUnit.generic();\n }\n\n @Override\n public String name() {\n return EARTH_KEY;\n }\n };\n Symptom moonSymptom =\n new Symptom(1) {\n @Override\n public SymptomFlowUnit operate() {\n return SymptomFlowUnit.generic();\n }\n\n public String name() {\n return MOON_KEY;\n }\n };\n\n Metric skyLabCpu =\n new CPU_Utilization(1) {\n @Override\n public MetricFlowUnit gather(Queryable queryable) {\n return MetricFlowUnit.generic();\n }\n };\n Symptom skyLabsSymptom =\n new Symptom(1) {\n @Override\n public SymptomFlowUnit operate() {\n return SymptomFlowUnit.generic();\n }\n\n public String name() {\n return SKY_LABS_KEY;\n }\n };\n\n addLeaf(metric);\n addLeaf(skyLabCpu);\n earthSymptom.addAllUpstreams(Collections.singletonList(metric));\n moonSymptom.addAllUpstreams(Collections.singletonList(earthSymptom));\n skyLabsSymptom.addAllUpstreams(\n new ArrayList<Node<?>>() {\n {\n add(earthSymptom);\n add(moonSymptom);\n add(skyLabCpu);\n }\n });\n\n metric.addTag(LOCUS_KEY, EARTH_KEY);\n earthSymptom.addTag(LOCUS_KEY, EARTH_KEY);\n moonSymptom.addTag(LOCUS_KEY, MOON_KEY);\n skyLabCpu.addTag(LOCUS_KEY, SKY_LABS_KEY);\n skyLabsSymptom.addTag(LOCUS_KEY, SKY_LABS_KEY);\n }", "@Override\n public TypeParameterNode deepCopy(BsjNodeFactory factory);", "public UserData(int userDataId, String firstName, String lastName, String patronymic, String email, String phone, Tariff tariff, BigDecimal balance, int traffic, String photo, int userId) {\n this.userDataId = userDataId;\n this.firstName = firstName;\n this.lastName = lastName;\n this.patronymic = patronymic;\n this.email = email;\n this.phone = phone;\n this.tariff = tariff;\n this.balance = balance;\n this.traffic = traffic;\n this.photo = photo;\n this.userId = userId;\n }", "public FunctionJet2Adapter(int baseDimension) \n {\n super(baseDimension); \n hessian = new double[baseDimension];\n }", "MixtureOfExperts(int nExperts){\r\n\t\twritePosteriorThreshold = 0.0;\r\n\t\testimationPosteriorThreshold = 0.0;\r\n\t\tnumberOfExperts = nExperts;\r\n\t\tlogProbOfCluster = new float[numberOfExperts];\r\n numberOfUsers = 0;\r\n \r\n\t}", "public WorldGenFeatureBasaltColumns(Codec<WorldGenFeatureBasaltColumnsConfiguration> var0) {\n/* 33 */ super(var0);\n/* */ }", "public interface NetworkBuilder {\n\n /**\n * Set neural net layers\n * @param layers an array with the width and depth of each layer\n * @return NetworkBuilder instance\n */\n public abstract NetworkBuilder withLayers(int[] layers);\n\n /**\n * Set the DataSet\n * @param train - training set\n * @param test - test set\n * @return NetworkBuilder instance\n */\n public abstract NetworkBuilder withDataSet(DataSet train, DataSet test);\n\n /**\n * Set the ActivationFunction\n * @param activationFunction\n * @return NetworkBuilder instance\n */\n public abstract NetworkBuilder withActivationFunction(ActivationFunction activationFunction);\n\n /**\n * Set the ErrorMeasure\n * @param errorMeasure\n * @return NetworkBuilder instance\n */\n public abstract NetworkBuilder withErrorMeasure(ErrorMeasure errorMeasure);\n\n /**\n * Train the network\n * @return the trained network for testing\n */\n public abstract FeedForwardNetwork train();\n}", "public FFANNAdaptiveBackPropagationJSP()\n\t{\n\t\t//run(network, numberInputNeurons, numberHiddenNeurons, numberOutputNeurons, trainingSet);\n\t}", "private static void CreateClassifierVec(Dataset set, int dim_num,\n\t\t\tArrayList<KDNode> class_buff, int vec_offset) {\n\t\t\t\n\t\tAttribute atts[] = new Attribute[set.size()];\n\t\t// Declare the class attribute along with its values\n\t\t FastVector fvClassVal = new FastVector(4);\n\t\t fvClassVal.addElement(\"n2\");\n\t\t fvClassVal.addElement(\"n1\");\n\t\t fvClassVal.addElement(\"p1\");\n\t\t fvClassVal.addElement(\"p2\");\n\t\t Attribute ClassAttribute = new Attribute(\"theClass\", fvClassVal);\n\t \n\t\tFastVector fvWekaAttributes = new FastVector(set.size() + 1);\n\t for(int i=0; i<set.size(); i++) {\n\t \tatts[i] = new Attribute(\"att\"+i);\n\t \tfvWekaAttributes.addElement(atts[i]);\n\t }\n\t \n\t fvWekaAttributes.addElement(ClassAttribute);\n\t \n\t Instances isTrainingSet = new Instances(\"Rel\", fvWekaAttributes, class_buff.size()); \n\t isTrainingSet.setClassIndex(set.size());\n\t\t\n\t for(int k=0; k<class_buff.size(); k++) {\n\t \t\n\t \tArrayList<Integer> data_set = new ArrayList<Integer>();\n\t\t\tfor(int j=0; j<set.size(); j++) {\n\t\t\t\t\n\t\t\t\t\tint offset = 0;\n\t\t\t\t\tSet<Entry<Integer, Double>> s = set.instance(j).entrySet();\n\t\t\t\t\tdouble sample[] = new double[dim_num];\n\t\t\t\t\tfor(Entry<Integer, Double> val : s) {\n\t\t\t\t\t\tsample[offset++] = val.getValue();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tint output = class_buff.get(k).classifier.Output(sample);\n\t\t\t\t\tdata_set.add(output);\n\t\t\t}\n\t\t\t\n\t\t\tif(data_set.size() != set.size()) {\n\t\t\t\tSystem.out.println(\"dim mis\");System.exit(0);\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tInstance iExample = new Instance(set.size() + 1);\n\t\t\tfor(int j=0; j<set.size(); j++) {\n\t\t\t\tiExample.setValue(j, data_set.get(j));\n\t\t\t}\n\t\t\t\n\t\t\tif(Math.random() < 0.5) {\n\t\t\t\tiExample.setValue((Attribute)fvWekaAttributes.elementAt(set.size()), \"n1\"); \n\t\t\t} else {\n\t\t\t\tiExample.setValue((Attribute)fvWekaAttributes.elementAt(set.size()), \"p1\"); \n\t\t\t}\n\t\t\t \n\t\t\t// add the instance\n\t\t\tisTrainingSet.add(iExample);\n\t }\n\t\t\n\t System.out.println(dim_num+\" *************\");\n\t int select_num = 16;\n\t\tPrincipalComponents pca = new PrincipalComponents();\n\t\t//pca.setVarianceCovered(0.1);\n Ranker ranker = new Ranker();\n ranker.setNumToSelect(select_num);\n AttributeSelection selection = new AttributeSelection();\n selection.setEvaluator(pca);\n \n Normalize normalizer = new Normalize();\n try {\n normalizer.setInputFormat(isTrainingSet);\n isTrainingSet = Filter.useFilter(isTrainingSet, normalizer);\n \n selection.setSearch(ranker);\n selection.SelectAttributes(isTrainingSet);\n isTrainingSet = selection.reduceDimensionality(isTrainingSet);\n\n } catch (Exception e) {\n e.printStackTrace();\n System.exit(0);\n }\n \n for(int i=0; i<class_buff.size(); i++) {\n \tInstance inst = isTrainingSet.instance(i);\n \tdouble val[] = inst.toDoubleArray();\n \tint offset = vec_offset;\n \t\n \tfloat length = 0;\n \tfor(int j=0; j<select_num; j++) {\n \t\tlength += val[j] * val[j];\n \t}\n \t\n \tlength = (float) Math.sqrt(length);\n \tfor(int j=0; j<select_num; j++) {\n \t\tclass_buff.get(i).class_vect[offset++] = val[j] / length;\n \t}\n }\n\t}", "@Test\n\tpublic void constructorTest() {\n\t\tCTRNN testCtrnn = new CTRNN(layout1, phenotype1, false);\n\t\tAssert.assertEquals(1.0, testCtrnn.inputWeights[0], 0.001);\n\t\tAssert.assertEquals(2.0, testCtrnn.hiddenWeights[0][0], 0.001);\n\t\tAssert.assertArrayEquals(new double[] {3.0, 4.0}, testCtrnn.biasWeights, 0.001);\n\t\tAssert.assertArrayEquals(new double[] {5.0, 6.0}, testCtrnn.gains, 0.001);\n\t\tAssert.assertArrayEquals(new double[] {7.0, 8.0}, testCtrnn.timeConstants, 0.001);\n\t\t\n\t}", "private static native void covarianceEstimation_0(long src_nativeObj, long dst_nativeObj, int windowRows, int windowCols);", "PNMMetadata(ImageTypeSpecifier imageType, ImageWriteParam param) {\n/* 145 */ this();\n/* 146 */ initialize(imageType, param);\n/* */ }", "public UserProfile() {}", "CubeModel(CubeModel cube) {\n initialize(cube);\n\n }", "public BinaryPulseNeuralFunction() {\n super();\n }", "private UserFactory() {\r\n }", "Classifier getBase_Classifier();", "private ProfileMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public\nNuc2D(Nuc2D nuc)\nthrows Exception\n{\n\tthis ((NucNode)nuc);\n\tthis.setUseSymbol(nuc.getUseSymbol());\n\tthis.setIsSchematic(nuc.getIsSchematic());\n\tthis.setSchematicColor(nuc.getSchematicColor());\n\tthis.setSchematicLineWidth(nuc.getSchematicLineWidth());\n\tthis.setSchematicBPLineWidth(nuc.getSchematicBPLineWidth());\n\tthis.setFont(nuc.getFont());\n\tthis.setNucCharSymbol(nuc.getFont());\n\tthis.setNucChar(nuc.getNucChar());\n\tthis.setXY(nuc.getX(), nuc.getY());\n\tthis.setColor(nuc.getColor());\n\t// Not sure I need these yet:\n\t// this.setParentCollection(nuc.getParentSSData2D());\n\t// this.setBoundingBox(nuc.getBoundingBox());\n\t//\n}", "MatrixParameter createMatrixParameter();", "private FactoryTransformer(Factory factory) {\n super();\n iFactory = factory;\n }", "public UserProperty newInstance(User user) {\n return new InstantMessageProperty(null, null);\n }", "@SuppressWarnings(\"unchecked\")\r\n private void makeIntensityProfiles() {\r\n\r\n // find the center of mass of the single label object in the sliceBuffer (abdomenImage)\r\n findAbdomenCM();\r\n int xcm = centerOfMass[0];\r\n int ycm = centerOfMass[1];\r\n \r\n // There should be only one VOI\r\n VOIVector vois = abdomenImage.getVOIs();\r\n VOI theVOI = vois.get(0);\r\n\r\n // there should be only one curve corresponding to the external abdomen boundary\r\n VOIContour curve = ((VOIContour)theVOI.getCurves().get(0));\r\n int[] xVals;\r\n int[] yVals;\r\n int[] zVals;\r\n try {\r\n xVals = new int [curve.size()];\r\n yVals = new int [curve.size()];\r\n zVals = new int [curve.size()];\r\n } catch (OutOfMemoryError error) {\r\n System.gc();\r\n MipavUtil.displayError(\"makeIntensityProfiles(): Can NOT allocate the abdomen VOI arrays\");\r\n return;\r\n }\r\n curve.exportArrays(xVals, yVals, zVals);\r\n \r\n // one intensity profile for each radial line. Each radial line is 3 degrees and\r\n // there are 360 degrees in a circle\r\n try {\r\n intensityProfiles = new ArrayList[360 /angularResolution];\r\n xProfileLocs = new ArrayList[360 / angularResolution];\r\n yProfileLocs = new ArrayList[360 / angularResolution];\r\n } catch (OutOfMemoryError error) {\r\n System.gc();\r\n MipavUtil.displayError(\"makeIntensityProfiles(): Can NOT allocate profile arrays\");\r\n return;\r\n }\r\n \r\n // load the srcImage into the slice buffer (it has the segmented abdomen image in it now)\r\n try {\r\n srcImage.exportData(0, sliceSize, sliceBuffer);\r\n } catch (IOException ex) {\r\n System.err.println(\"JCATsegmentAbdomen2D(): Error exporting data\");\r\n return;\r\n }\r\n\r\n double angleRad;\r\n int count;\r\n int contourPointIdx = 0;\r\n for (int angle = 0; angle < 360; angle += angularResolution) {\r\n count = 0;\r\n int x = xcm;\r\n int y = ycm;\r\n int yOffset = y * xDim;\r\n double scaleFactor; // reduces the number of trig operations that must be performed\r\n \r\n // allocate the ArrayLists for each radial line\r\n try {\r\n intensityProfiles[contourPointIdx] = new ArrayList<Short>();\r\n xProfileLocs[contourPointIdx] = new ArrayList<Integer>();\r\n yProfileLocs[contourPointIdx] = new ArrayList<Integer>();\r\n } catch (OutOfMemoryError error) {\r\n System.gc();\r\n MipavUtil.displayError(\"makeIntensityProfiles(): Can NOT allocate profile list: \" +contourPointIdx);\r\n return;\r\n }\r\n \r\n angleRad = Math.PI * angle / 180.0;\r\n if (angle > 315 || angle <= 45) {\r\n // increment x each step\r\n scaleFactor = Math.tan(angleRad);\r\n while (x < xVals[contourPointIdx]) {\r\n // store the intensity and location of each point along the radial line\r\n intensityProfiles[contourPointIdx].add((short)sliceBuffer[yOffset + x]);\r\n xProfileLocs[contourPointIdx].add(x);\r\n yProfileLocs[contourPointIdx].add(y);\r\n count++;\r\n \r\n // walk out in x and compute the value of y for the given radial line\r\n x++;\r\n y = ycm - (int)((x - xcm) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n \r\n } else if (angle > 45 && angle <= 135) {\r\n // decrement y each step\r\n scaleFactor = (Math.tan((Math.PI / 2.0) - angleRad));\r\n while (y > yVals[contourPointIdx]) {\r\n // store the intensity and location of each point along the radial line\r\n intensityProfiles[contourPointIdx].add((short)sliceBuffer[yOffset + x]);\r\n xProfileLocs[contourPointIdx].add(x);\r\n yProfileLocs[contourPointIdx].add(y);\r\n count++;\r\n \r\n // walk to the top of the image and compute values of x for the given radial line\r\n y--;\r\n x = xcm + (int)((ycm - y) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n \r\n } else if (angle > 135 && angle <= 225) {\r\n // decrement x each step\r\n scaleFactor = Math.tan(Math.PI - angleRad);\r\n while (x > xVals[contourPointIdx]) {\r\n // store the intensity and location of each point along the radial line\r\n intensityProfiles[contourPointIdx].add((short)sliceBuffer[yOffset + x]);\r\n xProfileLocs[contourPointIdx].add(x);\r\n yProfileLocs[contourPointIdx].add(y);\r\n count++;\r\n \r\n x--;\r\n y = ycm - (int)((xcm - x) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n\r\n } else if (angle > 225 && angle <= 315) {\r\n // increment y each step\r\n scaleFactor = Math.tan((3.0 * Math.PI / 2.0) - angleRad);\r\n while (y < yVals[contourPointIdx]) {\r\n // store the intensity and location of each point along the radial line\r\n intensityProfiles[contourPointIdx].add((short)sliceBuffer[yOffset + x]);\r\n xProfileLocs[contourPointIdx].add(x);\r\n yProfileLocs[contourPointIdx].add(y);\r\n count++;\r\n \r\n y++;\r\n x = xcm - (int)((y - ycm) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n }\r\n \r\n contourPointIdx++;\r\n } // end for (angle = 0; ...\r\n\r\n // intensityProfiles, xProfileLocs, and yProfileLocs are set, we can find the \r\n // internal boundary of the subcutaneous fat now\r\n }", "public BullyMessageListenerFactoryImpl(BullyAlgorithmParticipant self) {\n //We use port as processId since it's coming from the coordinator and guaranteed\n //to be sequential and unique.\n this.self = self;\n }", "public ConfigProfile buildProfileTwo() {\n this.topics = \"kafka-data\";\n this.token = \"mytoken\";\n this.uri = \"https://dummy:8088\";\n this.raw = true;\n this.ack = false;\n this.indexes = \"index-1\";\n this.sourcetypes = \"kafka-data\";\n this.sources = \"kafka-connect\";\n this.httpKeepAlive = true;\n this.validateCertificates = false;\n this.eventBatchTimeout = 1;\n this.ackPollInterval = 1;\n this.ackPollThreads = 1;\n this.maxHttpConnPerChannel = 1;\n this.totalHecChannels = 1;\n this.socketTimeout = 1;\n this.enrichements = \"hello=world\";\n this.enrichementMap = new HashMap<>();\n this.trackData = false;\n this.maxBatchSize = 1;\n this.numOfThreads = 1;\n return this;\n }", "private Transform2D(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public ImsTransformer() {\n\n }", "private UserFunction(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }" ]
[ "0.46722075", "0.46067598", "0.45472988", "0.4539448", "0.4528096", "0.45199642", "0.4498121", "0.44095647", "0.4378131", "0.43679145", "0.43011203", "0.42932114", "0.42741644", "0.4227623", "0.42271903", "0.4225818", "0.4224299", "0.42088088", "0.41966453", "0.41906318", "0.41856202", "0.4174411", "0.4168093", "0.4158213", "0.41559407", "0.4155552", "0.41551423", "0.4138459", "0.41329437", "0.41208372", "0.41176075", "0.4114683", "0.41131938", "0.41126373", "0.41120133", "0.41019648", "0.41005015", "0.40922746", "0.40909517", "0.40774396", "0.40552536", "0.4045303", "0.40442333", "0.40314394", "0.40146035", "0.4011575", "0.40021712", "0.39852065", "0.3983951", "0.3983932", "0.3982474", "0.39723057", "0.3970433", "0.39700568", "0.3967884", "0.3963542", "0.39620197", "0.3952775", "0.39470512", "0.39430618", "0.39380813", "0.3935227", "0.39304918", "0.3925557", "0.39246458", "0.3920391", "0.3916791", "0.3909817", "0.39094952", "0.3900641", "0.39001548", "0.3898603", "0.38984698", "0.3897688", "0.38967142", "0.3893644", "0.38918805", "0.38837785", "0.3881966", "0.38814285", "0.3879217", "0.38772678", "0.38767847", "0.38759744", "0.38733378", "0.3869081", "0.38689917", "0.3865388", "0.38605085", "0.38573134", "0.38554314", "0.38510007", "0.38495478", "0.38487044", "0.38463557", "0.3841134", "0.38369057", "0.38356894", "0.38343045", "0.38338456", "0.3828199" ]
0.0
-1
construct from FCNBase + MnUserParameterState + MnStrategy
public MnScan(FCNBase fcn, MnUserParameterState par, MnStrategy str) { super(fcn, par, str); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BaseParameters(){\r\n\t}", "public ConnectedComponentFromSeed()\r\n/* 25: */ {\r\n/* 26: 32 */ this.inputFields = \"input, seed\";\r\n/* 27: 33 */ this.outputFields = \"output\";\r\n/* 28: */ }", "CbpmniFactory getCbpmniFactory();", "protected abstract void construct();", "IfaceState createState(int nlocal,IfaceSafetyStatus sts);", "public CMN() {\n\t}", "public interface NNStateConverter<StateT extends State> {\n\n void getStateInput(StateT state, FloatPointer input);\n\n void saveMemoryState(String filePrefix);\n void loadMemoryState(String filePrefix);\n}", "@Override\n\tpublic Alg newInstance() {\n\t\treturn new BnetDistributedCF();\n\t}", "public NetworkFunctionUserConfiguration() {\n }", "IntStrategyFactory() {\n }", "public MdnFeatures()\n {\n }", "public BullyMessageListenerFactoryImpl(BullyAlgorithmParticipant self) {\n //We use port as processId since it's coming from the coordinator and guaranteed\n //to be sequential and unique.\n this.self = self;\n }", "public IFsm initFsm(Class<? extends IState> p_newState) throws Exception;", "private MetricalLpcfgMetricalModelState(MetricalLpcfgMetricalModelState state) {\n\t\tthis(state, state.grammar, state.measure, state.subBeatLength, state.anacrusisLength);\n\t}", "public interface ActionStateClass extends javax.jmi.reflect.RefClass {\n /**\n * The default factory operation used to create an instance object.\n * @return The created instance object.\n */\n public ActionState createActionState();\n /**\n * Creates an instance object having attributes initialized by the passed \n * values.\n * @param name \n * @param visibility \n * @param isSpecification \n * @param isDynamic \n * @param dynamicArguments \n * @param dynamicMultiplicity \n * @return The created instance object.\n */\n public ActionState createActionState(java.lang.String name, org.omg.uml.foundation.datatypes.VisibilityKind visibility, boolean isSpecification, boolean isDynamic, org.omg.uml.foundation.datatypes.ArgListsExpression dynamicArguments, org.omg.uml.foundation.datatypes.Multiplicity dynamicMultiplicity);\n}", "public UserParameter() {\n }", "public interface FmTrainParams<T> extends\n HasLabelCol<T>,\n HasVectorColDefaultAsNull<T>,\n HasWeightColDefaultAsNull<T>,\n HasEpsilonDv0000001<T>,\n HasFeatureColsDefaultAsNull<T>,\n FmCommonTrainParams<T> {\n\n /**\n * @cn-name 迭代数据batch size\n * @cn 数据batch size\n */\n ParamInfo<Integer> MINIBATCH_SIZE = ParamInfoFactory\n .createParamInfo(\"batchSize\", Integer.class)\n .setDescription(\"mini-batch size\")\n\t\t\t.setAlias(new String[]{\"minibatchSize\"})\n .setHasDefaultValue(-1)\n .build();\n\n default Integer getBatchSize() {\n return get(MINIBATCH_SIZE);\n }\n\n default T setBatchSize(Integer value) {\n return set(MINIBATCH_SIZE, value);\n }\n}", "public CustomEntitiesTaskParameters() {}", "public MLPAgent(StateObservation stateObs, ElapsedCpuTimer elapsedTimer) {\n\n }", "public GasPump2(AbstractFactory abstractFactory)\n {\n this.abstractFactory=abstractFactory;\n this.datastore=abstractFactory.getDatastore();\n this.mda_efsm=new MDA_EFSM(new OutputProcessor(abstractFactory));\n }", "private StateManagerFactory() {}", "BehaviorStateMachinesFactory getBehaviorStateMachinesFactory();", "protected abstract Nfa buildInternal();", "public MgtFactoryImpl()\n {\n super();\n }", "public ParameterizedInstantiateFactory() {\r\n super();\r\n }", "public NFA(){}", "public Task(Task source) {\n if (source.Application != null) {\n this.Application = new Application(source.Application);\n }\n if (source.TaskName != null) {\n this.TaskName = new String(source.TaskName);\n }\n if (source.TaskInstanceNum != null) {\n this.TaskInstanceNum = new Long(source.TaskInstanceNum);\n }\n if (source.ComputeEnv != null) {\n this.ComputeEnv = new AnonymousComputeEnv(source.ComputeEnv);\n }\n if (source.EnvId != null) {\n this.EnvId = new String(source.EnvId);\n }\n if (source.RedirectInfo != null) {\n this.RedirectInfo = new RedirectInfo(source.RedirectInfo);\n }\n if (source.RedirectLocalInfo != null) {\n this.RedirectLocalInfo = new RedirectLocalInfo(source.RedirectLocalInfo);\n }\n if (source.InputMappings != null) {\n this.InputMappings = new InputMapping[source.InputMappings.length];\n for (int i = 0; i < source.InputMappings.length; i++) {\n this.InputMappings[i] = new InputMapping(source.InputMappings[i]);\n }\n }\n if (source.OutputMappings != null) {\n this.OutputMappings = new OutputMapping[source.OutputMappings.length];\n for (int i = 0; i < source.OutputMappings.length; i++) {\n this.OutputMappings[i] = new OutputMapping(source.OutputMappings[i]);\n }\n }\n if (source.OutputMappingConfigs != null) {\n this.OutputMappingConfigs = new OutputMappingConfig[source.OutputMappingConfigs.length];\n for (int i = 0; i < source.OutputMappingConfigs.length; i++) {\n this.OutputMappingConfigs[i] = new OutputMappingConfig(source.OutputMappingConfigs[i]);\n }\n }\n if (source.EnvVars != null) {\n this.EnvVars = new EnvVar[source.EnvVars.length];\n for (int i = 0; i < source.EnvVars.length; i++) {\n this.EnvVars[i] = new EnvVar(source.EnvVars[i]);\n }\n }\n if (source.Authentications != null) {\n this.Authentications = new Authentication[source.Authentications.length];\n for (int i = 0; i < source.Authentications.length; i++) {\n this.Authentications[i] = new Authentication(source.Authentications[i]);\n }\n }\n if (source.FailedAction != null) {\n this.FailedAction = new String(source.FailedAction);\n }\n if (source.MaxRetryCount != null) {\n this.MaxRetryCount = new Long(source.MaxRetryCount);\n }\n if (source.Timeout != null) {\n this.Timeout = new Long(source.Timeout);\n }\n if (source.MaxConcurrentNum != null) {\n this.MaxConcurrentNum = new Long(source.MaxConcurrentNum);\n }\n if (source.RestartComputeNode != null) {\n this.RestartComputeNode = new Boolean(source.RestartComputeNode);\n }\n if (source.ResourceMaxRetryCount != null) {\n this.ResourceMaxRetryCount = new Long(source.ResourceMaxRetryCount);\n }\n }", "public ModelService(ModelService source) {\n if (source.Id != null) {\n this.Id = new String(source.Id);\n }\n if (source.Cluster != null) {\n this.Cluster = new String(source.Cluster);\n }\n if (source.Name != null) {\n this.Name = new String(source.Name);\n }\n if (source.Runtime != null) {\n this.Runtime = new String(source.Runtime);\n }\n if (source.ModelUri != null) {\n this.ModelUri = new String(source.ModelUri);\n }\n if (source.Cpu != null) {\n this.Cpu = new Long(source.Cpu);\n }\n if (source.Memory != null) {\n this.Memory = new Long(source.Memory);\n }\n if (source.Gpu != null) {\n this.Gpu = new Long(source.Gpu);\n }\n if (source.GpuMemory != null) {\n this.GpuMemory = new Long(source.GpuMemory);\n }\n if (source.CreateTime != null) {\n this.CreateTime = new String(source.CreateTime);\n }\n if (source.UpdateTime != null) {\n this.UpdateTime = new String(source.UpdateTime);\n }\n if (source.ScaleMode != null) {\n this.ScaleMode = new String(source.ScaleMode);\n }\n if (source.Scaler != null) {\n this.Scaler = new Scaler(source.Scaler);\n }\n if (source.Status != null) {\n this.Status = new ServiceStatus(source.Status);\n }\n if (source.AccessToken != null) {\n this.AccessToken = new String(source.AccessToken);\n }\n if (source.ConfigId != null) {\n this.ConfigId = new String(source.ConfigId);\n }\n if (source.ConfigName != null) {\n this.ConfigName = new String(source.ConfigName);\n }\n if (source.ServeSeconds != null) {\n this.ServeSeconds = new Long(source.ServeSeconds);\n }\n if (source.ConfigVersion != null) {\n this.ConfigVersion = new String(source.ConfigVersion);\n }\n if (source.ResourceGroupId != null) {\n this.ResourceGroupId = new String(source.ResourceGroupId);\n }\n if (source.Exposes != null) {\n this.Exposes = new ExposeInfo[source.Exposes.length];\n for (int i = 0; i < source.Exposes.length; i++) {\n this.Exposes[i] = new ExposeInfo(source.Exposes[i]);\n }\n }\n if (source.Region != null) {\n this.Region = new String(source.Region);\n }\n if (source.ResourceGroupName != null) {\n this.ResourceGroupName = new String(source.ResourceGroupName);\n }\n if (source.Description != null) {\n this.Description = new String(source.Description);\n }\n if (source.GpuType != null) {\n this.GpuType = new String(source.GpuType);\n }\n if (source.LogTopicId != null) {\n this.LogTopicId = new String(source.LogTopicId);\n }\n }", "public MixedInitiativeManager(IndividualDesignManager idm, int[] chosenFF, int[] chosenBMPs, int UserId, int[] regionSubbasinId, int[] tenure_regionSubbasinId) { \n this.idm = idm;\n this.dbm = idm.dbm;\n this.UserId = UserId;\n this.chosenFF = chosenFF;\n this.chosenBMPs = chosenBMPs;\n this.tenure_regionSubbasinId = tenure_regionSubbasinId;\n this.regionSubbasinId = regionSubbasinId;\n im = new IntrospectionManager(idm);\n om = new OptimizationManager(idm);\n setLocalPreferences();//set the local BMP ids\n sdmm = new SDMManager(idm, statm, chosenFF, localSubbasinLoc, useLocalPreference, chosenBMPs, useANFIS);\n this.statm = new StatisticsManager(dbm);\n //sdmm.createNewSDM(type_optimize);\n kendall = new MannKendall();\n }", "public Tp2FactoryImpl() {\n\t\tsuper();\n\t}", "Strategy createStrategy();", "public AFMV() {\r\n }", "public interface AMDPModelLearner extends AMDPPolicyGenerator{\n\n\n public void updateModel(State s, Action a, List<Double> rewards, State sPrime, GroundedTask gt);\n\n\n}", "public StateManagementStrategyImpl(FaceletViewHandlingStrategy pdl) {\n this.pdl = pdl;\n }", "public ObjectInspector init(Mode m, ObjectInspector[] parameters)\n throws HiveException {\n super.init(m, parameters);\n partialOI = PrimitiveObjectInspectorFactory.writableBinaryObjectInspector;\n finalOI = getFinalObjectInspector();\n switch (m) {\n case PARTIAL1: \n inputOI = parameters[0];\n case PARTIAL2:\n return partialOI;\n case FINAL:\n case COMPLETE:\n return finalOI;\n default:\n throw new IllegalArgumentException(\"Unknown UDAF mode \" + m);\n }\n }", "public AugmentedfsmFactoryImpl() {\n\t\tsuper();\n\t}", "public MnjMfgFabinsInvlEOImpl() {\n }", "private Mgr(){\r\n\t}", "public FloodlightModuleContext() {\n\t\tserviceMap = \n\t\t new HashMap<Class<? extends IFloodlightService>,\n\t\t IFloodlightService>();\n\t\tconfigParams =\n\t\t new HashMap<Class<? extends IFloodlightModule>,\n\t\t Map<String, String>>();\n\t}", "private MultibinderFactory() { }", "public Factory() {\n\t\tnb_rounds = 0; \n\t\tnb_to_train = 0; \n\t\ttraining_queue = new LinkedList<Pair<Soldier, Integer>>(); \n\t\tcurrent = null;\n\t}", "protected LearningAbstractAgent(){}", "public UpdateUserProcessor() {\n\t\n\t}", "public PetrinetmodelFactoryImpl() {\r\n\t\tsuper();\r\n\t}", "public CubeState(){\n ep = new PermutationGroup(12);\n cp = new PermutationGroup(8);\n eo = new EdgeOrientation();\n co = new CubieOrientation();\n }", "public VCRStateAdapter() {}", "public MnjMfgFabinsProdLEOImpl() {\n }", "public State(GameStateManager gameStateManager){ //constructor\n this.gameStateManager = gameStateManager;\n camera = new OrthographicCamera();\n mouse = new Vector3();\n }", "public ModuleParams() {\n }", "DynamicCompositeState createDynamicCompositeState();", "public DMXUserInput() {\n }", "public OperationFactory() {\n initMap();\n }", "public bsm(PlayerStat paramtq)\r\n/* 7: */ {\r\n/* 8: 9 */ super(paramtq.e);\r\n/* 9:10 */ this.j = paramtq;\r\n/* 10: */ }", "public FvFactoryImpl() {\n\t\tsuper();\n\t}", "public BMMState(boolean matched, boolean white, boolean \n oddRound, int roundNumber, int matchedWithPort, int minimumProposalPort, \n int amountOfMatchedNeighbors, String name, boolean outputState) {\n super(name, outputState);\n this.matched = matched;\n this.white = white;\n this.oddRound = oddRound;\n this.roundNumber = roundNumber;\n this.matchedWithPort = matchedWithPort;\n this.minimumProposalPort = minimumProposalPort;\n this.amountOfMatchedNeighbors = amountOfMatchedNeighbors;\n }", "private ENFAutomaton build() {\n final Set<State> states = new HashSet<State>(this.states.values());\n final Set<State> acceptStates = new HashSet<State>(this.acceptStates.values());\n\n final Set<Input> alphabet = alphabetBuilder.build();\n\n final ENFAutomatonTransferFunction transferFunction = transferFunctionBuilder.build(this.states);\n\n return new ENFAutomaton(states, acceptStates, alphabet, transferFunction, initial);\n }", "public ModuleParams()\n\t{\n\t}", "RemoteUserManager() { }", "public ExperimentController(int n, int m, int is, int fs, int iss, int rps) { \n\t\tthis.n = n;\n\t\tthis.m = m;\n\t\tinitialSize = is; \n\t\trepetitionsPerSize = rps; \n\t\tincrementalSizeStep = iss; \n\t\tfinalSize = fs; \n\t\tresultsPerStrategy = new ArrayList<>();\n\n\t}", "public IPDStrategy()\n {\n name = \"IPD Strategy\";\n }", "@Override\r\n\tpublic void init() {\n\r\n\t PetriNet _net = new PetriNet(this, \"PhilosopherNet\", true, true);\r\n\t ContDistExponential dist1 = new ContDistExponential(this, \"waitdist1\", 2, true, true);\r\n\t ContDistExponential dist2 = new ContDistExponential(this, \"waitdist1\", 3, true, true);\r\n\t ContDistExponential dist3 = new ContDistExponential(this, \"durdist1\", 3, true, true);\r\n\r\n\t\t// Declaration of the used types of Tokens. These have to be objects\r\n\t\t// implementing the TokenType interface. Note that there is only one\r\n\t\t// object for each type, no matter how many Tokens of that type may\r\n\t\t// exist. A different object (even of the same class) always declares a\r\n\t\t// new, different type of token.\r\n\t\t\r\n\t\tTokenType type1 = new Fork();\r\n\t\tTokenType type2 = new Fork();\r\n\t\tTokenType type3 = new Fork();\r\n\t\tTokenType type4 = new Fork();\r\n\t\tTokenType type5 = new Fork();\r\n\t\tMap<TokenType, Integer> tokens = TokenMultiSetTools.arrayToMap(\r\n\t\t\t\tnew TokenType[] { type1, type2, type3, type4, type5 },\r\n\t\t\t\tnew int[] { 1, 1, 1, 1, 1 });\r\n\r\n\t\tPlace p1 = new Place(this, _net, \"p1\", tokens, true, true, true);\r\n\r\n\t\tTransitionMode t1 = new TransitionMode(this, _net, \"t1\", dist1, dist3, true, true);\r\n\t\tTransitionMode t2 = new TransitionMode(this, _net, \"t2\", dist2, dist3, true, true);\r\n\t\tTransitionMode t3 = new TransitionMode(this, _net, \"t3\", dist1, dist3, true, true);\r\n\t\tTransitionMode t4 = new TransitionMode(this, _net, \"t4\", dist2, dist3, true, true);\r\n\t\tTransitionMode t5 = new TransitionMode(this, _net, \"t5\", dist1, dist3, true, true);\r\n\r\n\t\tTransition trans = new Transition(this, _net, \"Mahlzeit\", true, true);\r\n\t\ttrans.addTransitionMode(t1);\r\n\t\ttrans.addTransitionMode(t2);\r\n\t\ttrans.addTransitionMode(t3);\r\n\t\ttrans.addTransitionMode(t4);\r\n\t\ttrans.addTransitionMode(t5);\r\n\r\n\t\tt1.addInputPlace(p1, TokenMultiSetTools.arrayToMap(new TokenType[] { type1,\r\n\t\t\t\ttype2 }, new int[] { 1, 1 }));\r\n\t\tt1.addOutputPlace(p1, TokenMultiSetTools.arrayToMap(new TokenType[] { type1,\r\n\t\t\t\ttype2 }, new int[] { 1, 1 }));\r\n\r\n\t\tt2.addInputPlace(p1, TokenMultiSetTools.arrayToMap(new TokenType[] { type2,\r\n\t\t\t\ttype3 }, new int[] { 1, 1 }));\r\n\t\tt2.addOutputPlace(p1, TokenMultiSetTools.arrayToMap(new TokenType[] { type2,\r\n\t\t\t\ttype3 }, new int[] { 1, 1 }));\r\n\r\n\t\tt3.addInputPlace(p1, TokenMultiSetTools.arrayToMap(new TokenType[] { type3,\r\n\t\t\t\ttype4 }, new int[] { 1, 1 }));\r\n\t\tt3.addOutputPlace(p1, TokenMultiSetTools.arrayToMap(new TokenType[] { type3,\r\n\t\t\t\ttype4 }, new int[] { 1, 1 }));\r\n\r\n\t\tt4.addInputPlace(p1, TokenMultiSetTools.arrayToMap(new TokenType[] { type4,\r\n\t\t\t\ttype5 }, new int[] { 1, 1 }));\r\n\t\tt4.addOutputPlace(p1, TokenMultiSetTools.arrayToMap(new TokenType[] { type4,\r\n\t\t\t\ttype5 }, new int[] { 1, 1 }));\r\n\r\n\t\tt5.addInputPlace(p1, TokenMultiSetTools.arrayToMap(new TokenType[] { type5,\r\n\t\t\t\ttype1 }, new int[] { 1, 1 }));\r\n\t\tt5.addOutputPlace(p1, TokenMultiSetTools.arrayToMap(new TokenType[] { type5,\r\n\t\t\t\ttype1 }, new int[] { 1, 1 }));\r\n\r\n\t}", "public MmapFactoryImpl() {\n\t\tsuper();\n\t}", "private MonsterState(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "public interface UserServiceInformationBase extends ISUPParameter {\n \t\n \t//for parameters list see ITU-T Q.763 (12/1999) 3.57\n \t//Recommendation Q.931 (05/98) Table 4-6/Q.931 Bearer capability information element\n \t//Dialogic User Service Information structure : http://www.dialogic.com/webhelp/NASignaling/Release%205.1/NA_ISUP_Layer_Dev_Ref_Manual/user_service_information.htm\n\n \t//LAYER IDENTIFIERS\n \tpublic static final int _LAYER1_IDENTIFIER=0x1;\n\n \tpublic static final int _LAYER2_IDENTIFIER=0x2;\n\n\tpublic static final int _LAYER3_IDENTIFIER=0x3;\n\n \t//CODING STANDART OPTIONS\n \tpublic static final int _CS_CCITT=0;\n \t\n \tpublic static final int _CS_INTERNATIONAL=1;\n \t\n \tpublic static final int _CS_NATIONAL=2;\n \t\n \tpublic static final int _CS_NETWORK=3;\n \t\n \t//INFORMATION TRANSFER CAPABILITIES OPTIONS\n \tpublic static final int _ITS_SPEECH=0;\n \t\n \tpublic static final int _ITS_UNRESTRICTED_DIGITAL=8;\n \t\n \tpublic static final int _ITS_RESTRICTED_DIGITAL=9;\n \t\n \tpublic static final int _ITS_3_1_KHZ=16;\n \t\n \tpublic static final int _ITS_UNRESTRICTED_DIGITAL_WITH_TONES=17;\n \t\n \tpublic static final int _ITS_VIDEO=24;\n \t\n \t//TRANSFER MODE OPTIONS\n \tpublic static final int _TM_CIRCUIT=0;\n \t\n \tpublic static final int _TM_PACKET=2;\n \t\n \t//INFORMATION TRANSFER RATE OPTIONS\n \tpublic static final int _ITR_PACKET_MODE=0;\n \t\n \tpublic static final int _ITR_64=16;\n \t\n \tpublic static final int _ITR_64x2=17;\n \t\n \tpublic static final int _ITR_384=19;\n \t\n \tpublic static final int _ITR_1536=21;\n \t\n \tpublic static final int _ITR_1920=23;\n \t\n \tpublic static final int _ITR_MULTIRATE=24;\n \t\n \t//SYNC/ASYNC OPTIONS\n \tpublic static final int _SA_SYNC=0;\n \t\n \tpublic static final int _SA_ASYNC=1;\n \t\n \t//NEGOTIATION OPTIONS\t\t\n \tpublic static final int _NG_INBAND_NOT_POSSIBLE=0;\n \t\n \tpublic static final int _NG_INBAND_POSSIBLE=1;\n \t\n \t//USER RATE OPTIONS\n \tpublic static final int _UR_EBITS=0;\n \t\n \tpublic static final int _UR_0_6=1;\n \t\n \tpublic static final int _UR_1_2=2;\n \t\n \tpublic static final int _UR_2_4=3;\n \t\n \tpublic static final int _UR_3_6=4;\n \t\n \tpublic static final int _UR_4_8=5;\n \t\n \tpublic static final int _UR_7_2=6;\n \t\n \tpublic static final int _UR_8_0=7;\n \t\n \tpublic static final int _UR_9_6=8;\n \t\n \tpublic static final int _UR_14_4=9;\n \t\n \tpublic static final int _UR_16_0=10;\n \t\n \tpublic static final int _UR_19_2=11;\n \t\n \tpublic static final int _UR_32_0=12;\n \t\n \tpublic static final int _UR_38_4=13;\n \t\n \tpublic static final int _UR_48_0=14;\n \t\n \tpublic static final int _UR_56_0=15;\n \t\n \tpublic static final int _UR_57_6=18;\n \t\n \tpublic static final int _UR_28_8=19;\n \t\n \tpublic static final int _UR_24_0=20;\n \t\n \tpublic static final int _UR_0_1345=21;\n \t\n \tpublic static final int _UR_0_1=22;\n \t\n \tpublic static final int _UR_0_075_ON_1_2=23;\n \t\n \tpublic static final int _UR_1_2_ON_0_075=24;\n \t\n \tpublic static final int _UR_0_050=25;\n \t\n \tpublic static final int _UR_0_075=26;\n \t\n \tpublic static final int _UR_0_110=27;\n \t\n \tpublic static final int _UR_0_150=28;\n \t\n \tpublic static final int _UR_0_200=29;\n \t\n \tpublic static final int _UR_0_300=30;\n \t\n \tpublic static final int _UR_12_0=31;\n \t\n \t//INTERMEDIATE RATE OPTIONS\n \tpublic static final int _IR_NOT_USED=0;\n \t\n \tpublic static final int _IR_8_0=1;\n \t\n \tpublic static final int _IR_16_0=2;\n \t\n \tpublic static final int _IR_32_0=3;\n \t\n \t//NETWORK INDEPENDENT CLOCK ON TX\n \tpublic static final int _NICTX_NOT_REQUIRED=0;\n \t\n \tpublic static final int _NICTX_REQUIRED=1;\n \t\n \t//NETWORK INDEPENDENT CLOCK ON RX\n \tpublic static final int _NICRX_CANNOT_ACCEPT=0;\n \t\n \tpublic static final int _NICRX_CAN_ACCEPT=1;\n \t\n \t//FLOW CONTROL ON TX\n \tpublic static final int _FCTX_NOT_REQUIRED=0;\n \t\n \tpublic static final int _FCTX_REQUIRED=1;\n \t\n \t//FLOW CONTROL ON RX\n \tpublic static final int _FCRX_CANNOT_ACCEPT=0;\n \t\n \tpublic static final int _FCRX_CAN_ACCEPT=1;\n \t\n \t//RATE ADAPTATION HEADER OPTIONS\n \tpublic static final int _HDR_INCLUDED=0;\n \t\n \tpublic static final int _HDR_NOT_INCLUDED=1;\n \t\n \t//MULTIFRAME OPTIONS\n \tpublic static final int _MF_NOT_SUPPORTED=0;\n \t\n \tpublic static final int _MF_SUPPORTED=1;\n \t\n \t//MODE OPTIONS\n \tpublic static final int _MODE_BIT_TRANSPARENT=0;\n \t\n \tpublic static final int _MODE_PROTOCOL_SENSITIVE=1;\n \t\n \t//LOGICAL LINK IDENTIFIER OPTIONS\n \tpublic static final int _LLI_256=0;\n \t\n \tpublic static final int _LLI_FULL_NEGOTIATION=1;\n \t\n \t//ASSIGNOR / ASSIGNEE OPTIONS\n \tpublic static final int _ASS_DEFAULT_ASSIGNEE=0;\n \t\n \tpublic static final int _ASS_ASSIGNOR_ONLY=1;\n \t\n \t//INBAND/OUT OF BAND NEGOTIATION OPTIONS\n \tpublic static final int _NEG_USER_INFORMATION=0;\n \t\t\n \tpublic static final int _NEG_INBAND=1;\n \t\t\n \t//STOP BITS OPTIONS\n \tpublic static final int _SB_NOT_USED=0;\n \t\n \tpublic static final int _SB_1BIT=1;\n \t\n \tpublic static final int _SB_1_5BITS=2;\n \t\n \tpublic static final int _SB_2BITS=3;\n \t\n \t//DATA BITS OPTIONS\n \tpublic static final int _DB_NOT_USED=0;\n \t\t\n \tpublic static final int _DB_5BITS=1;\n \t\t\n \tpublic static final int _DB_7BITS=2;\n \t\t\n \tpublic static final int _DB_8BITS=3;\n \t\t\n \t//PARITY INFORMATION\n \tpublic static final int _PAR_ODD=0;\n \t\t\t\n \tpublic static final int _PAR_EVEN=2;\n \t\t\t\n \tpublic static final int _PAR_NONE=3;\n \t\t\n \tpublic static final int _PAR_FORCED_0=4;\n \t\t\n \tpublic static final int _PAR_FORCED_1=5;\n \t\n \t//DUPLEX INFORMATION\n \tpublic static final int _DUP_HALF=0;\n \t\n \tpublic static final int _DUP_FULL=1;\n \t\t\t\n \t//MODEM TYPE INFORMATION\n \tpublic static final int _MODEM_V21=17;\n \t\n \tpublic static final int _MODEM_V22=18;\n \t\n \tpublic static final int _MODEM_V22_BIS=19;\n \t\n \tpublic static final int _MODEM_V23=20;\n \t\n \tpublic static final int _MODEM_V26=21;\n \t\n \tpublic static final int _MODEM_V26_BIS=22;\n \t\n \tpublic static final int _MODEM_V26_TER=23;\n \t\n \tpublic static final int _MODEM_V27=24;\n \t\n \tpublic static final int _MODEM_V27_BIS=25;\n \t\n \tpublic static final int _MODEM_V27_TER=26;\n \t\n \tpublic static final int _MODEM_V29=27;\n \t\n \tpublic static final int _MODEM_V32=29;\n \t\n \tpublic static final int _MODEM_V34=30;\n \t\n \t//LAYER 1 USER INFORMATION OPTIONS\n \tpublic static final int _L1_ITUT_110=1;\n \t\n \tpublic static final int _L1_G11_MU=2;\n \t\n \tpublic static final int _L1_G711_A=3;\n \t\n \tpublic static final int _L1_G721_ADPCM=4;\n \t\t\n \tpublic static final int _L1_G722_G725=5;\n \t\n \tpublic static final int _L1_H261=6;\n \t\n \tpublic static final int _L1_NON_ITUT=7;\n \t\n \tpublic static final int _L1_ITUT_120=8;\n \t\n \tpublic static final int _L1_ITUT_X31=9;\n \t\n \t//LAYER 2 USER INFORMATION OPTIONS\n \tpublic static final int _L2_BASIC=1;\n \t\n \tpublic static final int _L2_Q921=2;\n \t\n \tpublic static final int _L2_X25_SLP=6;\n \t\n \tpublic static final int _L2_X25_MLP=7;\n \t\n \tpublic static final int _L2_T71=8;\n \t\n \tpublic static final int _L2_HDLC_ARM=9;\n \t\n \tpublic static final int _L2_HDLC_NRM=10;\n \t\n \tpublic static final int _L2_HDLC_ABM=11;\n \t\n \tpublic static final int _L2_LAN_LLC=12;\n \t\n \tpublic static final int _L2_X75_SLP=13;\n \t\n \tpublic static final int _L2_Q922=14;\n \t\n \tpublic static final int _L2_USR_SPEC=16;\n \t\n \tpublic static final int _L2_T90=17;\n \t\n \t\n \t//LAYER 3 USER INFORMATION OPTIONS\n \tpublic static final int _L3_Q931=2;\n \t\n \tpublic static final int _L3_T90=5;\n \t\n \tpublic static final int _L3_X25_PLP=6;\n \t\n \tpublic static final int _L3_ISO_8208=7;\n \t\n \tpublic static final int _L3_ISO_8348=8;\n \t\n \tpublic static final int _L3_ISO_8473=9;\n \t\n \tpublic static final int _L3_T70=10;\n \t\n \tpublic static final int _L3_ISO_9577=11;\n \t\n \tpublic static final int _L3_USR_SPEC=16;\n \t\n \t\n \t//LAYER 3 PROTOCOL OPTIONS;\n \tpublic static final int _L3_PROT_IP=204;\n \t\n \tpublic static final int _L3_PROT_P2P=207;\n \t\n \tpublic int getCodingStandart();\n \n \tpublic void setCodingStandart(int codingStandart);\n \t\n \tpublic int getInformationTransferCapability();\n \n \tpublic void setInformationTransferCapability(int informationTransferCapability);\n \n \tpublic int getTransferMode();\n \n \tpublic void setTransferMode(int transferMode);\n \t\n \tpublic int getInformationTransferRate();\n \n \tpublic void setInformationTransferRate(int informationTransferRate);\n \t\n \t//custom rate in 64Kbps units\n \tpublic int getCustomInformationTransferRate();\n \t\n \tpublic void setCustomInformationTransferRate(int informationTransferRate);\n \t\n \t//TO CLEAR USER INFORMATION ON EACH LAYER SET IT TO 0\n \tpublic int getL1UserInformation();\n \n \tpublic void setL1UserInformation(int l1UserInformation);\n \t\n \tpublic int getL2UserInformation();\n \n \tpublic void setL2UserInformation(int l2UserInformation);\n \t\n \tpublic int getL3UserInformation();\n \n \tpublic void setL3UserInformation(int l3UserInformation);\n \t\n \tpublic int getSyncMode();\n \n \tpublic void setSyncMode(int syncMode);\n \t\n \tpublic int getNegotiation();\n \n \tpublic void setNegotiation(int negotiation);\n \t\n \tpublic int getUserRate();\n \n \tpublic void setUserRate(int userRate);\n \t\n \tpublic int getIntermediateRate();\n \n \tpublic void setIntermediateRate(int intermediateRate);\n \t\n \tpublic int getNicOnTx();\n \n \tpublic void setNicOnTx(int nicOnTx);\n \t\n \tpublic int getNicOnRx();\n \n \tpublic void setNicOnRx(int nicOnRx);\n \t\n \tpublic int getFlowControlOnTx();\n \n \tpublic void setFlowControlOnTx(int fcOnTx);\n \t\n \tpublic int getFlowControlOnRx();\n \n \tpublic void setFlowControlOnRx(int fcOnRx);\n \t\n \tpublic int getHDR();\n \n \tpublic void setHDR(int hdr);\n \t\n \tpublic int getMultiframe();\n \n \tpublic void setMultiframe(int multiframe);\n \t\n \tpublic int getMode();\n \n \tpublic void setMode(int mode);\n \t\n \tpublic int getLLINegotiation();\n \n \tpublic void setLLINegotiation(int lli);\n \t\n \tpublic int getAssignor();\n \n \tpublic void setAssignor(int assignor);\n \t\n \tpublic int getInBandNegotiation();\n \n \tpublic void setInBandNegotiation(int inBandNegotiation);\n \t\n \tpublic int getStopBits();\n \n \tpublic void setStopBits(int stopBits);\n \t\n \tpublic int getDataBits();\n \n \tpublic void setDataBits(int dataBits);\n \t\n \tpublic int getParity();\n \n \tpublic void setParity(int parity);\n \t\n \tpublic int getDuplexMode();\n \n \tpublic void setDuplexMode(int duplexMode);\n \t\n \tpublic int getModemType();\n \n \tpublic void setModemType(int modemType);\n \t\n \tpublic int getL3Protocol();\n \n \tpublic void setL3Protocol(int l3Protocol);\n \n }", "public AbstractStateModel() {\n }", "public ChannelContext(SimpleStateFactoryI stateFactoryIn, List<StateName> stateNames, Results inResult) {\n\n availableStates = new HashMap<StateName, StateI>();\n videoData = new HashMap<String, Properties>();\n\n result = inResult;\n for (final StateName state : stateNames) {\n availableStates.put(state, stateFactoryIn.create(state));\n }\n\n curState = availableStates.get(StateName.UNPOPULAR);\n }", "public DependencyManager()\n\t{\n\t\tmap.put(VARIABLES, new ArrayList<>());\n\t\tmap.put(VARSTRATEGY, BASE_STRATEGY);\n\t}", "public Parameter(Parameter p) {\n\t\tnumPts = p.numPts;\n\t\tvelocityScale = p.velocityScale;\n\t\tinitVel = p.initVel;\n\t\tinitMass = p.initMass;\n\t\tinitDensity = p.initDensity;\n\t\tinitPressure = p.initPressure;\n\t\tinitPtSpacing = p.initPtSpacing;\n\t\th = p.h;\n\t\tc = p.c;\n\t\tmachNum = p.machNum;\n\t\tbetaMax = p.betaMax;\n\t\tnu = p.nu;\n\t\tbodyFX = p.bodyFX;\n\t\tbodyFY = p.bodyFY;\n\t\tdensityVariation = p.densityVariation;\n\t\tlengthScale = p.lengthScale;\n\t\tfirstOutput = p.firstOutput;\n\t\toutputEvery = p.outputEvery;\n\t\tnumSteps = p.numSteps;\n\t\tdeltaT = p.deltaT;\n\t}", "public DefaultCniNetworkInner() {\n }", "public LightParameter()\r\n\t{\r\n\t}", "public GameState(State.StateView state) {\n }", "public Mannschaft() {\n }", "public IndirectionsmeasuringpointFactoryImpl() {\n super();\n }", "public AbstractCentralDecisionProcess() { }", "@Override\n public void init(NegotiationInfo info)\n {\n super.init(info);\n\n // initializes User Model and Opponent Model\n userModelInterface = new UserModelInterfaceImpl(this);\n utilitySpace = userModelInterface.estimateUtilitySpace();\n\n // search all outcomes and sort\n sortedOutcomeSpace = new SortedOutcomeSpace(utilitySpace);\n feasibleBids = sortedOutcomeSpace.getAllOutcomes();\n\n // initializes acceptance and offering strategy\n acceptanceStrategy = new DefaultAcceptanceStrategyImpl(this);\n offeringStrategy = new DefaultOfferingStrategyBasedOpponentImpl(this);\n }", "public UsermodelFactoryImpl() {\r\n\t\tsuper();\r\n\t}", "public void setup(final EvolutionState state, final Parameter base) \r\n {\n }", "StateMachineFactory getStateMachineFactory();", "public CreateUserCommand() {\n userReceiver = new UserReceiver();\n roleReceiver = new RoleReceiver();\n next = new GetRolesCommand();\n result = new CommandResult();\n }", "public ExternalServiceLayerCIMFactoryImpl() {\n\t\tsuper();\n\t}", "public MnScan(FCNBase fcn, MnUserParameters par) {\n this(fcn, par, DEFAULT_STRATEGY);\n }", "public MystFactoryImpl()\r\n {\r\n super();\r\n }", "public NMQModuleClient() {\r\n }", "void create( State state );", "public AndroidModelParameterManager(IInstantiationBehavior behaviour) {\n this.behaviour = behaviour;\n this.description = \" based on behaviours of \" + behaviour;\n// this.forMethod = null; // XXX\n }", "public FUManager(int nGeneric, int nAdd, int nMult) {\n if (nGeneric != 0) {\n generic = nGeneric;\n genericFU = new ArrayList<>(nGeneric);\n //el ID de la UF es i\n for (int i = 0; i < nGeneric; i++) {\n FuGeneric gen = new FuGeneric(i, ConfigFile.getLatencyGeneric());\n gen.setIsActive(true);\n genericFU.add(gen);\n }\n FU.put(typeFU.GENERIC, genericFU);\n }\n\n if (nAdd != 0) {\n add = nAdd;\n addFU = new ArrayList<>(nAdd);\n for (int i = nGeneric; i < nAdd + nGeneric; i++) {\n FuAdd ad = new FuAdd(i, ConfigFile.getLatencyAdd());\n ad.setIsActive(true);\n addFU.add(ad);\n }\n FU.put(typeFU.ADD, addFU);\n }\n\n if (nMult != 0) {\n mult = nMult;\n multFU = new ArrayList<>(nMult);\n for (int i = nAdd; i < nMult + nAdd; i++) {\n FuMult m = new FuMult(i, ConfigFile.getLatencyMult());\n m.setIsActive(true);\n multFU.add(m);\n }\n FU.put(typeFU.MULT, multFU);\n }\n\n }", "public void initialize(InfoflowManager manager);", "public NetworkDevicePatchParameters() {\n }", "private GDMThreadFactory(){}", "public FFANNAdaptiveBackPropagationJSP()\n\t{\n\t\t//run(network, numberInputNeurons, numberHiddenNeurons, numberOutputNeurons, trainingSet);\n\t}", "public State(String fromString)\n {\n// Metrics.increment(\"State count\");\n //...\n }", "public AbstractRecombinator() \r\n\t{\r\n\t\tsuper();\r\n\t\tsetPpl();\r\n\t\tsetSpl();\t\t\r\n\t}", "private void initCommonParameter()\r\n {\r\n cp = new CommonParameterHolder();\r\n cp.setLoginId(userProfile.getLoginId());\r\n cp.setCurrentUserOid(userProfile.getUserOid());\r\n cp.setClientIp(this.getRequest().getRemoteAddr());\r\n cp.setMkMode(false);\r\n }", "public p7p2() {\n }", "public StateofPancakes(StateofPancakes state) {\r\n N = state.N;\r\n\tcurr_state = new int[N];\r\n for(int i=0; i<N; i++) \r\n curr_state[i] = state.curr_state[i];\r\n}", "public interface NetworkBuilder {\n\n /**\n * Set neural net layers\n * @param layers an array with the width and depth of each layer\n * @return NetworkBuilder instance\n */\n public abstract NetworkBuilder withLayers(int[] layers);\n\n /**\n * Set the DataSet\n * @param train - training set\n * @param test - test set\n * @return NetworkBuilder instance\n */\n public abstract NetworkBuilder withDataSet(DataSet train, DataSet test);\n\n /**\n * Set the ActivationFunction\n * @param activationFunction\n * @return NetworkBuilder instance\n */\n public abstract NetworkBuilder withActivationFunction(ActivationFunction activationFunction);\n\n /**\n * Set the ErrorMeasure\n * @param errorMeasure\n * @return NetworkBuilder instance\n */\n public abstract NetworkBuilder withErrorMeasure(ErrorMeasure errorMeasure);\n\n /**\n * Train the network\n * @return the trained network for testing\n */\n public abstract FeedForwardNetwork train();\n}", "private static abstract class <init> extends com.google.android.gms.games.hodImpl\n{\n\n public com.google.android.gms.games.quest.Result zzau(Status status)\n {\n return new com.google.android.gms.games.quest.Quests.ClaimMilestoneResult(status) {\n\n final Status zzQs;\n final QuestsImpl.ClaimImpl zzavH;\n\n public Milestone getMilestone()\n {\n return null;\n }\n\n public Quest getQuest()\n {\n return null;\n }\n\n public Status getStatus()\n {\n return zzQs;\n }\n\n \n {\n zzavH = QuestsImpl.ClaimImpl.this;\n zzQs = status;\n super();\n }\n };\n }", "public Transducer ()\n\t{\n\t\tsumLatticeFactory = new SumLatticeDefault.Factory();\n\t\tmaxLatticeFactory = new MaxLatticeDefault.Factory();\n\t}", "public AppcActorServiceProvider() {\n super(NAME, BidirectionalTopicActorParams.class);\n\n addOperator(new BidirectionalTopicOperator(NAME, ModifyConfigOperation.NAME, this, AppcOperation.SELECTOR_KEYS,\n ModifyConfigOperation::new));\n }", "@Override\n public void construct() {\n Metric metric =\n new CPU_Utilization(1) {\n @Override\n public MetricFlowUnit gather(Queryable queryable) {\n return MetricFlowUnit.generic();\n }\n };\n Symptom earthSymptom =\n new Symptom(1) {\n @Override\n public SymptomFlowUnit operate() {\n return SymptomFlowUnit.generic();\n }\n\n @Override\n public String name() {\n return EARTH_KEY;\n }\n };\n Symptom moonSymptom =\n new Symptom(1) {\n @Override\n public SymptomFlowUnit operate() {\n return SymptomFlowUnit.generic();\n }\n\n public String name() {\n return MOON_KEY;\n }\n };\n\n Metric skyLabCpu =\n new CPU_Utilization(1) {\n @Override\n public MetricFlowUnit gather(Queryable queryable) {\n return MetricFlowUnit.generic();\n }\n };\n Symptom skyLabsSymptom =\n new Symptom(1) {\n @Override\n public SymptomFlowUnit operate() {\n return SymptomFlowUnit.generic();\n }\n\n public String name() {\n return SKY_LABS_KEY;\n }\n };\n\n addLeaf(metric);\n addLeaf(skyLabCpu);\n earthSymptom.addAllUpstreams(Collections.singletonList(metric));\n moonSymptom.addAllUpstreams(Collections.singletonList(earthSymptom));\n skyLabsSymptom.addAllUpstreams(\n new ArrayList<Node<?>>() {\n {\n add(earthSymptom);\n add(moonSymptom);\n add(skyLabCpu);\n }\n });\n\n metric.addTag(LOCUS_KEY, EARTH_KEY);\n earthSymptom.addTag(LOCUS_KEY, EARTH_KEY);\n moonSymptom.addTag(LOCUS_KEY, MOON_KEY);\n skyLabCpu.addTag(LOCUS_KEY, SKY_LABS_KEY);\n skyLabsSymptom.addTag(LOCUS_KEY, SKY_LABS_KEY);\n }" ]
[ "0.52459896", "0.51713204", "0.5138162", "0.51374555", "0.5133587", "0.5001862", "0.49958897", "0.49772438", "0.49425915", "0.4920951", "0.49173704", "0.4912015", "0.48940578", "0.48751462", "0.4872513", "0.48461396", "0.483647", "0.48309696", "0.4822784", "0.47866118", "0.47861105", "0.47833622", "0.47707915", "0.47682184", "0.47518075", "0.475115", "0.474639", "0.47417215", "0.47382358", "0.47229308", "0.47200343", "0.47136307", "0.47126466", "0.47077408", "0.47058147", "0.4701941", "0.46925658", "0.4691965", "0.46814775", "0.46786126", "0.46741444", "0.46726573", "0.4657098", "0.4652758", "0.46517122", "0.46479878", "0.4639483", "0.4632187", "0.46294633", "0.46257204", "0.4616129", "0.4613683", "0.4611695", "0.46077958", "0.45934713", "0.4581806", "0.4570288", "0.45660806", "0.45558724", "0.45450053", "0.45425105", "0.45417845", "0.45318002", "0.4526238", "0.45247707", "0.45234692", "0.4519568", "0.45167437", "0.451522", "0.45118344", "0.4510537", "0.45082024", "0.45047694", "0.44951075", "0.44948167", "0.44891548", "0.44884202", "0.4487338", "0.44809073", "0.44802484", "0.44784832", "0.4473932", "0.44739273", "0.44733107", "0.4472358", "0.44713217", "0.44698274", "0.4468084", "0.4464167", "0.44625583", "0.44558728", "0.44527084", "0.44509366", "0.44500467", "0.4437044", "0.4435887", "0.44341013", "0.44312435", "0.4430498", "0.44304568" ]
0.45681226
57
Scans the value of the user function by varying parameter number par, leaving all other parameters fixed at the current value. If par is not specified, all variable parameters are scanned in sequence. The number of points npoints in the scan is 40 by default, and cannot exceed 100. The range of the scan is by default 2 standard deviations on each side of the current best value, but can be specified as from low to high. After each scan, if a new minimum is found, the best parameter values are retained as start values for future scans or minimizations. The curve resulting from each scan can be plotted on the output terminal using MnPlot in order to show the approximate behaviour of the function.
public List<Point> scan(int par, int maxsteps, double low, double high) { MnParameterScan scan = new MnParameterScan(theFCN, theState.parameters()); double amin = scan.fval(); List<Point> result = scan.scan(par, maxsteps, low, high); if (scan.fval() < amin) { theState.setValue(par, scan.parameters().value(par)); amin = scan.fval(); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MnScan(FCNBase fcn, MnUserParameters par) {\n this(fcn, par, DEFAULT_STRATEGY);\n }", "public MnScan(FCNBase fcn, double[] par, MnUserCovariance cov) {\n this(fcn, par, cov, DEFAULT_STRATEGY);\n }", "public MnScan(FCNBase fcn, MnUserParameters par, MnUserCovariance cov) {\n this(fcn, par, cov, DEFAULT_STRATEGY);\n }", "public MnScan(FCNBase fcn, double[] par, double[] err) {\n this(fcn, par, err, DEFAULT_STRATEGY);\n }", "public MnScan(FCNBase fcn, double[] par, MnUserCovariance cov, int stra) {\n this(fcn, new MnUserParameterState(par, cov), new MnStrategy(stra));\n }", "public MnScan(FCNBase fcn, MnUserParameters par, int stra) {\n this(fcn, new MnUserParameterState(par), new MnStrategy(stra));\n }", "public MnScan(FCNBase fcn, double[] par, double[] err, int stra) {\n this(fcn, new MnUserParameterState(par, err), new MnStrategy(stra));\n }", "public MnScan(FCNBase fcn, MnUserParameterState par, MnStrategy str) {\n super(fcn, par, str);\n }", "public MnScan(FCNBase fcn, MnUserParameters par, MnUserCovariance cov, int stra) {\n this(fcn, new MnUserParameterState(par, cov), new MnStrategy(stra));\n }", "public ExPar(double min, double max, ExParValue value, String hint) {\r\n\t\tthis(DOUBLE, min, max, value, hint);\r\n\t}", "public ExPar(int type, int min, int max, ExParValue value, String hint) {\r\n\t\tthis(type, (double) min, (double) max, value, hint);\r\n\t}", "protected void read_params_from_user( ParamFileReader pars ) {\n\t\t// Read general parameters:\n\t\tsuper.read_params_from_user(pars);\n\t\t\n\t\t// Read model parameters (optional):\n\t\tif( !NPT_SIM ) {\n\t\t\ttry {\n\t\t\t\tif( pars.isDefined(\"pot.cut-off\") ) pot_cut_off = pars.getDouble(\"pot.cut-off\");\n\t\t\t} catch( ParamFileReader.UndefinedParameterException e ) {\n\t\t\t\t// If any of them is not defined, cry and grumble.\n\t\t\t\tthrow( new LSSimException(LSSimException.PARAM,\n\t\t\t\t\t\"Some required parameters were missing: pot.cut-off\"));\n\t\t\t}\n\t\t\tpot_cut_off2 = pot_cut_off*pot_cut_off;\n\t\t}\t\t\n\t}", "public void specifyParams (double[] _params){\n\t\t\n\t\tif (_params.length != this.getNumParameters2Calib()) {\n\t\t\tSystem.err.println(\n\t\t\t\t\t\"Error when getting parameters from a double array. \"\n\t\t\t\t\t+ \"We don't have + \" + this.getNumParameters2Calib() \n\t\t\t\t\t+ \" parameters\\n\");\n\t\t}\n\t\t\n\t\tint i = 0;\n\t\t\n\t\t// first decode the SN to set\n\t\tint numberSN = (int)Math.round(_params[i++]);\n\t\t\n\t\tif (numberSN >= this.graphsFromFiles.size() || numberSN < 0) {\n\t\t\tSystem.err.println(\n\t\t\t\t\t\"Error when getting the SN integer parameter. Mismatch between SNs \"\n\t\t\t\t\t+ \"and the gene: params = \" + numberSN + \" and we have \" +\n\t\t\t\t\tthis.graphsFromFiles.size() + \" SNs loaded from files\\n\");\n\t\t}\n\t\t\n\t\t// set the specific graph to the parameters\n\t\tsetSelectedSN(numberSN);\n\t\t\t\t\t\t\n\t\t// then, the parameters for the segments\n\n\t\tfor (int k = 0; k < this.getNumSegments(); k++) {\n\n\t\t\t// THIS PARAMETERS HAS NO EFFECT: -1 \n\t\t\tsetSegmentConnectivity(k, -1);\n\t\t\t\n\t\t\t// loading probability for new friends \n\t\t\tsetSegmentDailyProbNewFriend(k, _params[i++]);\n\t\t\t\n\t\t\t// loading probability for losing friends \n\t\t\tsetSegmentDailyProbLoseFriend(k, _params[i++]);\n\n\t\t\t// loading probability for obtain subscription\n\t\t\tsetSegmentDailyProbObtainSubscription(k, _params[i++]);\n\n\t\t\t// loading probability for playing during the weekend \n\t\t\tsetSegmentDailyProbPlayWeekend(k, _params[i++]);\n\t\t\t\n\t\t\t// loading probability for playing during weekdays\n\t\t\tsetSegmentDailyProbPlayNoWeekend(k, _params[i++]);\n\n\t\t\t// loading social parameter for adoption \n\t\t\tsetSegmentSocialAdoptionParam(k, _params[i++]);\n\t\t\t\n\t\t}\n\t\t\t\t\t\n\t\tif (controller.CalibrationController.DEBUG_CALIB) {\n\t\t\t\n\t\t\tPrintWriter writer = new PrintWriter(System.out);\n\t\t\tthis.printParamters2Calib(writer);\n\t\t\twriter.close();\n\t\t\t\t\t\n\t\t}\n\t}", "void printParamMinimalValue(Station station, Sensor minSensor, MeasurementValue minValue, LocalDateTime date);", "@Override\n\tpublic ParameterSet requiredParameters()\n\t{\n\t\t// Parameter p0 = new\n\t\t// Parameter(\"Dummy Parameter\",\"Lets user know that the function has been selected.\",FormLine.DROPDOWN,new\n\t\t// String[] {\"true\"},0);\n\t\tParameter p0 = getNumThreadsParameter(10, 4);\n\t\tParameter p1 = new Parameter(\"Old Min\", \"Image Intensity Value\", \"0.0\");\n\t\tParameter p2 = new Parameter(\"Old Max\", \"Image Intensity Value\", \"4095.0\");\n\t\tParameter p3 = new Parameter(\"New Min\", \"Image Intensity Value\", \"0.0\");\n\t\tParameter p4 = new Parameter(\"New Max\", \"Image Intensity Value\", \"65535.0\");\n\t\tParameter p5 = new Parameter(\"Gamma\", \"0.1-5.0, value of 1 results in no change\", \"1.0\");\n\t\tParameter p6 = new Parameter(\"Output Bit Depth\", \"Depth of the outputted image\", Parameter.DROPDOWN, new String[] { \"8\", \"16\", \"32\" }, 1);\n\t\t\n\t\t// Make an array of the parameters and return it\n\t\tParameterSet parameterArray = new ParameterSet();\n\t\tparameterArray.addParameter(p0);\n\t\tparameterArray.addParameter(p1);\n\t\tparameterArray.addParameter(p2);\n\t\tparameterArray.addParameter(p3);\n\t\tparameterArray.addParameter(p4);\n\t\tparameterArray.addParameter(p5);\n\t\tparameterArray.addParameter(p6);\n\t\treturn parameterArray;\n\t}", "public void setParValue(Double parValue) {\n\t\tthis.parValue = parValue;\n\t}", "public void estimateParameter(){\r\n int endTime=o.length;\r\n int N=hmm.stateCount;\r\n double p[][][]=new double[endTime][N][N];\r\n for (int t=0;t<endTime;++t){\r\n double count=EPS;\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n p[t][i][j]=fbManipulator.alpha[t][i]*hmm.a[i][j]*hmm.b[i][j][o[t]]*fbManipulator.beta[t+1][j];\r\n count +=p[t][j][j];\r\n }\r\n }\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n p[t][i][j]/=count;\r\n }\r\n }\r\n }\r\n double pSumThroughTime[][]=new double[N][N];\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n pSumThroughTime[i][j]=EPS;\r\n }\r\n }\r\n for (int t=0;t<endTime;++t){\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n pSumThroughTime[i][j]+=p[t][i][j];\r\n }\r\n }\r\n }\r\n\r\n //rebuild gamma\r\n for (int t=0;t<endTime;++t){\r\n for (int i=0;i<N;++i) fbManipulator.gamma[t][i]=0;\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n fbManipulator.gamma[t][i]+=p[t][i][j];\r\n }\r\n }\r\n }\r\n\r\n double gammaCount=EPS;\r\n //maximum parameter\r\n for (int i=0;i<N;++i){\r\n gammaCount+=fbManipulator.gamma[0][i];\r\n hmm.pi[i]=fbManipulator.gamma[0][i];\r\n }\r\n for (int i=0;i<N;++i){\r\n hmm.pi[i]/=gammaCount;\r\n }\r\n\r\n for (int i=0;i<N;++i) {\r\n gammaCount = EPS;\r\n for (int t = 0; t < endTime; ++t) gammaCount += fbManipulator.gamma[t][i];\r\n for (int j = 0; j < N; ++j) {\r\n hmm.a[i][j] = pSumThroughTime[i][j] / gammaCount;\r\n }\r\n }\r\n for (int i=0;i<N;i++){\r\n for (int j=0;j<N;++j){\r\n double tmp[]=new double[hmm.observationCount];\r\n for (int t=0;t<endTime;++t){\r\n tmp[o[t]]+=p[t][i][j];\r\n }\r\n for (int k=0;k<hmm.observationCount;++k){\r\n hmm.b[i][j][k]=(tmp[k]+1e-8)/pSumThroughTime[i][j];\r\n }\r\n }\r\n }\r\n //rebuild fbManipulator\r\n fbManipulator=new HMMForwardBackwardManipulator(hmm,o);\r\n }", "public void setParameters(Map<String, String> param) {\n\n // check the occurrence of required parameters\n if(!(param.containsKey(\"Indri:mu\") && param.containsKey(\"Indri:lambda\"))){\n throw new IllegalArgumentException\n (\"Required parameters for IndriExpansion model were missing from the parameter file.\");\n }\n\n this.mu = Double.parseDouble(param.get(\"Indri:mu\"));\n if(this.mu < 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"Indri:mu\") + \", mu is a real number >= 0\");\n\n this.lambda = Double.parseDouble(param.get(\"Indri:lambda\"));\n if(this.lambda < 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"Indri:lambda\") + \", lambda is a real number between 0.0 and 1.0\");\n\n if((param.containsKey(\"fb\") && param.get(\"fb\").equals(\"true\"))) {\n this.fb = \"true\";\n\n this.fbDocs = Integer.parseInt(param.get(\"fbDocs\"));\n if (this.fbDocs <= 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"fbDocs\") + \", fbDocs is an integer > 0\");\n\n this.fbTerms = Integer.parseInt(param.get(\"fbTerms\"));\n if (this.fbTerms <= 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"fbTerms\") + \", fbTerms is an integer > 0\");\n\n this.fbMu = Integer.parseInt(param.get(\"fbMu\"));\n if (this.fbMu < 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"fbMu\") + \", fbMu is an integer >= 0\");\n\n this.fbOrigWeight = Double.parseDouble(param.get(\"fbOrigWeight\"));\n if (this.fbOrigWeight < 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"fbOrigWeight\") + \", fbOrigWeight is a real number between 0.0 and 1.0\");\n\n if (param.containsKey(\"fbInitialRankingFile\") && param.get(\"fbInitialRankingFile\") != \"\") {\n this.fbInitialRankingFile = param.get(\"fbInitialRankingFile\");\n try{\n this.initialRanking = readRanking();\n }\n catch (Exception e){\n e.printStackTrace();\n }\n }\n\n if (param.containsKey(\"fbExpansionQueryFile\") && param.get(\"fbExpansionQueryFile\") != \"\")\n this.fbExpansionQueryFile = param.get(\"fbExpansionQueryFile\");\n }\n }", "public ExPar(int min, int max, ExParValue value, String hint) {\r\n\t\tthis(INTEGER, (double) min, (double) max, value, hint);\r\n\t}", "public ExPar(int type, double min, double max, ExParValue value, String hint) {\r\n\t\tthis.type = type;\r\n\t\tthis.minValue = min;\r\n\t\tthis.maxValue = max;\r\n\t\tthis.value = value;\r\n\t\tthis.defaultValue = (ExParValue) (value.clone());\r\n\t\tthis.hint = hint;\r\n\t}", "protected final void parset() {\n current = read();\n skipSpaces();\n\n for (;;) {\n switch (current) {\n default:\n return;\n case '+': case '-': case '.':\n case '0': case '1': case '2': case '3': case '4':\n case '5': case '6': case '7': case '8': case '9':\n }\n\n float x = parseNumber();\n skipCommaSpaces();\n float y = parseNumber();\n \n smoothQCenterX = currentX * 2 - smoothQCenterX;\n smoothQCenterY = currentY * 2 - smoothQCenterY;\n currentX += x;\n currentY += y;\n p.quadTo(smoothQCenterX, smoothQCenterY, currentX, currentY);\n smoothCCenterX = currentX;\n smoothCCenterY = currentY;\n skipCommaSpaces();\n } \n }", "@Override\r\n\tpublic int[] calPageParameter(int curPage) {\n\t\tint start = curPage*BATCH_NUM+1;\r\n\t\tint end = (curPage+1)*BATCH_NUM;\r\n return new int[]{start,end};\r\n\t}", "@Override\n public void setParameter(String parameter, Object value) throws IllegalStateException, NoSuchElementException, NullPointerException {\n super.setParameter(parameter, value);\n if (leftPivot != null && rightPivot != null)\n halfPivotDistance = leftPivot.getDistance(rightPivot)/2.0f;\n }", "public void setParamValueRange(String label, double minValue, double maxValue);", "private ExpectedApproximation(int param) {\r\n this(Double.MIN_VALUE, param, Double.MAX_VALUE);\r\n }", "public static void main(String[] args) {\n FindMedian sol1 = new FindMedian();\n Scanner scan = new Scanner(System.in);\n sol1.n = scan.nextInt();\n for (int i = 0 ; i < sol1.n; i++) {\n sol1.numbers.add(scan.nextInt());\n }\n sol1.process();\n }", "private ExpectedApproximation(double minExpected, int param, double maxExpected) {\r\n this.minExpected = Math.min(minExpected, maxExpected);\r\n this.param = param;\r\n this.maxExpected = Math.max(minExpected, maxExpected);\r\n }", "public void setPercepcion(double param){\n \n this.localPercepcion=param;\n \n\n }", "void printExtremeParamValuesWhereAndWhen(String paramName, Station minStation, Sensor minSensor, MeasurementValue minValue, Station maxStation, Sensor maxSensor, MeasurementValue maxValue);", "public void scan()\n\t{\n\t\t// TODO \n\t\tAbstractSorter aSorter = null; \n\t\tscanTime = 0;\n\t\tswitch (sortingAlgorithm) {\n\t\tcase SelectionSort:\n\t\t\taSorter = new SelectionSorter(points);\n\t\t\tbreak;\n\t\tcase InsertionSort:\n\t\t\taSorter = new InsertionSorter(points);\n\t\t\tbreak;\n\t\tcase MergeSort:\n\t\t\taSorter = new MergeSorter(points);\n\t\t\tbreak;\n\t\tcase QuickSort:\n\t\t\taSorter = new QuickSorter(points);\n\t\t\tbreak;\n\t\t}\n\t\t// set up x\n\t\taSorter.setComparator(0);\n\t\tlong st = System.nanoTime();\n\t\taSorter.sort();\n\t\tint mx = aSorter.getMedian().getX();//median x\n\t\tscanTime = System.nanoTime() - st;\n\t\t//set up y\n\t\taSorter.setComparator(1);\n\t\tst = System.nanoTime();\n\t\taSorter.sort();\n\t\tscanTime = scanTime + (System.nanoTime() - st);\n\t\tint my = aSorter.getMedian().getY();//median y\n\t\tmedianCoordinatePoint = new Point(mx, my);\n\t\tst = System.nanoTime();\n\t\taSorter.sort();\n\t\tscanTime = scanTime + (System.nanoTime() - st);\n\t\taSorter.getPoints(points);\n\t\t// create an object to be referenced by aSorter according to sortingAlgorithm. for each of the two \n\t\t// rounds of sorting, have aSorter do the following: \n\t\t// \n\t\t// a) call setComparator() with an argument 0 or 1. \n\t\t//\n\t\t// b) call sort(). \t\t\n\t\t// \n\t\t// c) use a new Point object to store the coordinates of the Median Coordinate Point\n\t\t//\n\t\t// d) set the medianCoordinatePoint reference to the object with the correct coordinates.\n\t\t//\n\t\t// e) sum up the times spent on the two sorting rounds and set the instance variable scanTime. \n\t\t\n\t}", "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 }", "private void setSearchParameters() {\n List obSys = dbm.getHQLManager().executeHQLQuery(\"from NewuserParamters where USERID=0\"); //user 0 is the system user\n NewuserParamters paramsSys = null;\n if (obSys != null) {\n paramsSys = (NewuserParamters) obSys.get(0);\n } else {\n System.out.println(\"User System Properties missing\");\n }\n //modify the settings of the search parameter based on user specification\n List ob = null;\n\n try {\n ob = dbm.getHQLManager().executeHQLQuery(\"from NewuserParamters where USERID=\" + UserId);\n if (ob.size() > 0) {\n NewuserParamters params = (NewuserParamters) ob.get(0);\n Integer val = 0;\n if ((val = params.getGlobalSessionSize()) != null) {\n NoOfglobalSessions = val;\n } else {\n this.NoOfglobalSessions = paramsSys.getGlobalSessionSize();\n }\n\n if ((val = params.getHdmGeneration()) != null) {\n this.noHDMGenerations = val;\n } else {\n this.noHDMGenerations = paramsSys.getHdmGeneration();\n }\n\n if ((val = params.getHdmPopulationSize()) != null) {\n this.HDMPopulation = val;\n } else {\n this.HDMPopulation = paramsSys.getHdmPopulationSize();\n }\n\n if ((val = params.getLearningType()) != null) {\n this.learningType = val;\n } else {\n this.learningType = paramsSys.getLearningType();\n }\n\n if ((val = params.getOptimizationType()) != null) {\n this.optimizationType = val;\n } else {\n this.optimizationType = paramsSys.getOptimizationType();\n }\n\n if ((val = params.getSdmGeneration()) != null) {\n this.noSDMGenerations = val;\n } else {\n this.noSDMGenerations = paramsSys.getSdmGeneration();\n }\n\n if ((val = params.getSdmPopulationSize()) != null) {\n this.SDMPopulation = val;\n } else {\n this.SDMPopulation = paramsSys.getSdmPopulationSize();\n }\n Double valdou = 0.0;\n if ((valdou = params.getGaMutationProbability()) != null) {\n this.MUTATION_PROBABILITY = valdou;\n } else {\n this.MUTATION_PROBABILITY = paramsSys.getGaMutationProbability();\n }\n\n if ((valdou = params.getGaCrossoverProbability()) != null) {\n this.CROSSOVER_PROBABILITY = valdou;\n } else {\n this.CROSSOVER_PROBABILITY = paramsSys.getGaCrossoverProbability();\n }\n }\n else {\n //use system default parameters\n this.NoOfglobalSessions = paramsSys.getGlobalSessionSize();\n this.noHDMGenerations = paramsSys.getHdmGeneration();\n this.HDMPopulation = paramsSys.getHdmPopulationSize();\n this.learningType = paramsSys.getLearningType();\n this.optimizationType = paramsSys.getOptimizationType();\n this.noSDMGenerations = paramsSys.getSdmGeneration();\n this.SDMPopulation = paramsSys.getSdmPopulationSize();\n this.MUTATION_PROBABILITY = paramsSys.getGaMutationProbability();\n this.CROSSOVER_PROBABILITY = paramsSys.getGaCrossoverProbability();\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void run(){\r\n\t\tArrayList<Integer> parcours = new ArrayList<Integer>();\r\n\t\tArrayList<Integer> sommets = new ArrayList<Integer>();\r\n\t\t\r\n\t\t//initialisation de la liste des sommets\r\n\t\tfor (int i=1; i<super.g.getDim();i++) {\r\n\t\t\tsommets.add(i);\r\n\t\t}\r\n\r\n\t\t//g�n�ration d'un parcours initial\r\n\t\tAlgo2opt algo = new Algo2opt(super.g);\r\n\t\tsuper.parcoursMin = algo.parcoursMin;\r\n\t\tsuper.dist = algo.dist;\r\n\r\n\t\tcheminMin(parcours,sommets,super.g.getDim(), 0);\r\n\t}", "public void setSpreadParidad(double value) {\r\n this.spreadParidad = value;\r\n }", "abstract int estimationParameter1();", "public Parameters getParameters() {\n\t\tElement params = getModelXMLElement(\"parameters\");\n\t\tif (params != null) {\n\t\t\tParameters p = new Parameters();\n\t\t\tNodeList nl = params.getElementsByTagName(\"param\");\n\t\t\tdouble[] cur = new double[nl.getLength()];\n\t\t\tfor (int i = 0; i < nl.getLength(); i++) {\n\t\t\t\tNode n = nl.item(i);\n\t\t\t\tString name = getNodeAttributeValue(n, \"name\");\n\t\t\t\t// Set \\mu_i if no name is given.\n\t\t\t\tif (name == null) {\n\t\t\t\t\tname = \"\\u00B5_\" + i;\n\t\t\t\t}\n\t\t\t\t// Add\n\t\t\t\tp.addParam(name, Double.parseDouble(getNodeAttributeValue(n, \"min\")),\n\t\t\t\t\t\tDouble.parseDouble(getNodeAttributeValue(n, \"max\")));\n\t\t\t\t// Extract default values and set as current, take min value if\n\t\t\t\t// no default is set\n\t\t\t\tString def = getNodeAttributeValue(n, \"default\");\n\t\t\t\tcur[i] = def != null ? Double.parseDouble(def) : p.getMinValue(i);\n\t\t\t}\n\t\t\tp.setCurrent(cur);\n\t\t\treturn p;\n\t\t}\n\t\treturn null;\n\t}", "public org.apache.spark.ml.param.ParamPair<double[]> w (java.util.List<java.lang.Double> value) { throw new RuntimeException(); }", "public double Generate(double[] par);", "public static void main(String[] args) {\n\t\tint start;\r\n\t\tint end;\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tSystem.out.println(\"enter the start number & end numner\");\r\n\t\tstart = scan.nextInt();\r\n\t\tend = scan.nextInt();\r\n\tpri(start,end);\t\r\n\r\n\t}", "private double checkBounds(double param, int i) {\n if (param < low[i]) {\n return low[i];\n } else if (param > high[i]) {\n return high[i];\n } else {\n return param;\n }\n }", "public boolean setParameter(String parameterName, String value) {\n\t\t\n\t\t if (parameterName.equals(\"mu\")) {\n\t\t\t mu = Double.parseDouble(value);\n\t\t } else if (parameterName.equals(\"lambda\")) {\n\t\t\t lambda = Double.parseDouble(value);\n\t\t } else {\n\t\t\treturn false;\n\t\t }\n\t\t \n\t\treturn true;\n\t}", "public void pifunctionExample() {\n set = new PiFunction(5, 10, 15, 1);\n\n double res1 = Maximum.meanOfMax().apply(var, set);\n\n double res2 = Maximum.minOfMax().apply(var, set);\n\n double res3 = Maximum.maxOfMax().apply(var, set);\n\n assertEquals(10, res1, 0.05);\n assertEquals(res1, res2);\n assertEquals(res1, res3);\n\n }", "public void setParamValueRange(String label, Object minValue, Object maxValue);", "public void setParamValue(String label, double value);", "public EstimateParameter(String name, double min, double max) {\n\t\tthis(name, min, max, null);\n\t}", "public abstract ParamNumber getParamX();", "public float calculateValue(String parameter) {\n\n float defaultValue = 0.5f;\n float defaultFactor = 0.1f;\n float currentValue = defaultValue;\n\n float nextValue = 0f;\n try {\n records = load();\n } catch (IOException ex) {\n Logger.getLogger(IntelligentSystem.class.getName()).log(Level.SEVERE, null, ex);\n }\n for (CSVRecord record : records) {\n\n // skip all rows that is not marked with X\n if (!\"X\".equals(record.get(parameter))) {\n continue;\n }\n\n nextValue = currentValue + (1 - currentValue) * defaultFactor;\n currentValue = nextValue;\n\n }\n return nextValue;\n }", "private void checkParams() throws InvalidParamException{\r\n String error = svm.svm_check_parameter(this.problem, this.param);\r\n if(error != null){\r\n throw new InvalidParamException(\"Invalid parameter setting!\" + error);\r\n }\r\n }", "public static void\tset(IntPar par, int val)\n\t{ if (par != NULL) par.value = val; }", "void primMST(int graph[][]){\r\n List<Ride> sTRides = new ArrayList<>();\r\n List<Integer> visitedRides = new ArrayList<>();\r\n int weights[] = new int[rideCount];\r\n int previousNodes[] = new int[rideCount];\r\n Boolean mstSet[] = new Boolean[rideCount];\r\n\r\n for(int i =0; i<rideCount;i++){\r\n weights[i] = Integer.MAX_VALUE;\r\n mstSet[i] = false;\r\n }\r\n\r\n //weights - indexed by row in the graph\r\n weights[0] = 0;\r\n //previously visited nodes\r\n previousNodes[0] = -1;\r\n\r\n for(int count=0; count<rideCount; count++){\r\n int u = minWeightST(weights, mstSet);\r\n mstSet[u] = true;\r\n visitedRides.add(u);\r\n sTRides.add(rides.get(u));\r\n\r\n for(int v = 0; v<rideCount;v++){\r\n if(graph[u][v] != 0 && !mstSet[v] && calculateWeight(graph[u][v], rides.get(v).getWaitingTime()) < weights[v]){\r\n previousNodes[v] = u;\r\n weights[v] = calculateWeight(graph[u][v], rides.get(v).getWaitingTime());\r\n }\r\n }\r\n }\r\n printMST(sTRides, visitedRides, graph, previousNodes);\r\n }", "public static void main(String[] args) {\n BrutePointST<Integer> st = new BrutePointST<Integer>();\n double qx = Double.parseDouble(args[0]);\n double qy = Double.parseDouble(args[1]);\n double rx1 = Double.parseDouble(args[2]);\n double rx2 = Double.parseDouble(args[3]);\n double ry1 = Double.parseDouble(args[4]);\n double ry2 = Double.parseDouble(args[5]);\n int k = Integer.parseInt(args[6]);\n Point2D query = new Point2D(qx, qy);\n RectHV rect = new RectHV(rx1, ry1, rx2, ry2);\n int i = 0;\n while (!StdIn.isEmpty()) {\n double x = StdIn.readDouble();\n double y = StdIn.readDouble();\n Point2D p = new Point2D(x, y);\n st.put(p, i++);\n }\n StdOut.println(\"st.empty()? \" + st.isEmpty());\n StdOut.println(\"st.size() = \" + st.size());\n StdOut.println(\"First \" + k + \" values:\");\n i = 0;\n for (Point2D p : st.points()) {\n StdOut.println(\" \" + st.get(p));\n if (i++ == k) {\n break;\n }\n }\n StdOut.println(\"st.contains(\" + query + \")? \" + st.contains(query));\n StdOut.println(\"st.range(\" + rect + \"):\");\n for (Point2D p : st.range(rect)) {\n StdOut.println(\" \" + p);\n }\n StdOut.println(\"st.nearest(\" + query + \") = \" + st.nearest(query));\n StdOut.println(\"st.nearest(\" + query + \", \" + k + \"):\");\n for (Point2D p : st.nearest(query, k)) {\n StdOut.println(\" \" + p);\n }\n }", "static int paintersPartition(int a[], int n, int k)\r\n\t {\r\n\t int start = a[0], end = a[0], minOfMax = -1;\r\n\t \r\n\t //this is to initialise start as max of all array elements and end as sum of all array elements\r\n\t for(int i = 1; i < n; i++)\r\n\t {\r\n\t end += a[i];\r\n\t \r\n\t if(a[i] > start)\r\n\t start = a[i];\r\n\t }\r\n\t \r\n\t while(start <= end)\r\n\t {\r\n\t int mid = start + ((end - start) / 2);\r\n\t \r\n\t if(isValid(a, n, k, mid))\r\n\t {\r\n\t minOfMax = mid; //this will hold one of the valid solution but then to get the most optimal one, we need check further on left side of search space\r\n\t end = mid - 1;\r\n\t }\r\n\t else\r\n\t start = mid + 1;\r\n\t }\r\n\t \r\n\t return minOfMax;\r\n\t }", "public void param(int direccionValorParam, int numeroParam){\n String valorParam = \"\";\n //traduce casos de direccionamiento indirecto\n direccionValorParam = traduceDirIndirecto(direccionValorParam);\n // obtener la direccion de la variable parametrizada en el procedimiento llamado\n int dirParamRegistro = this.directorioProcedimientos.\n obtenerProcedimientoPorId(this.pilaEras.peek().\n getIdentificadorProcedimiento()).getDireccionParametros().get(numeroParam);\n\n if (ManejadorMemoria.isGlobal(direccionValorParam)){\n // obtener el valor del parametro enviado\n valorParam = this.registroGlobal.getValor(direccionValorParam);\n\n } else if (ManejadorMemoria.isConstante(direccionValorParam)){\n // REVISAR QUE NO SEA UN PARAMETRO POR REFERENCIA\n if (this.directorioProcedimientos.\n obtenerProcedimientoPorId(this.pilaEras.peek().\n getIdentificadorProcedimiento()).getIndicadorPorReferencia().get(numeroParam)){\n // ERROR\n throw new IllegalArgumentException();\n }\n // obtener el valor del parametro enviado\n valorParam = this.directorioProcedimientos.getConstantes().get(direccionValorParam).getValorConstante();\n\n } else { // VARIABLE LOCAL\n // obtener el valor del parametro enviado\n valorParam = this.pilaRegistros.peek().getValor(direccionValorParam);\n }\n // asignar el valor del parametro a su variable correspondiente\n this.pilaEras.peek().guardaValor(dirParamRegistro, valorParam);\n }", "public boolean setParameter(String parameterName, double value) {\n\t\t System.err.println (\"Error: Unknown parameter name for retrieval model \" +\n\t\t\t\t\t\"Indri: \" + parameterName);\n\t\treturn false;\n\t}", "public static void main(String[] args) {\n // variables iniciales\n int semilla ; \n int tpoblacion ;\n double pcruza ;\n double pmutaccion ;\n int iteraciones ;\n int ttablero ;\n ArrayList<Integer> fitvalores = new ArrayList<>();\n ArrayList<int []> poblacion = new ArrayList<>();//ponemos tableros a la poblacion inicial\n ArrayList<int []> nuevagen = new ArrayList<>();\n /*Scanner sc=new Scanner(System.in);\n System.out.println(\"Ingrese semilla: \");\n semilla=sc.nextInt();\n System.out.println(\"Ingrese numero de reinas \");\n ttablero=(sc.nextInt()-1);\n System.out.println(\"Ingrese tamaño de la poblacion: \");\n tpoblacion=sc.nextInt();\n System.out.println(\"Ingrese numero de generaciones: \");\n iteraciones=sc.nextInt();\n System.out.println(\"Ingrese probabilidad de cruza (con coma en un rango de 0,0 a 1,0): \");\n pcruza=sc.nextDouble();\n System.out.println(\"Ingrese probabilidad de mutacion (con coma en un rango de 0,0 a 1,0): \");\n pmutaccion=sc.nextDouble();\n System.out.println();*/\n \n if (args.length <6) { //si hay más de 1 parámetro\n\t\t\tSystem.out.println(\"Debe ingresar 6 variables (semilla reinas poblacion generaciones probcruza probmutacion)\");\n\t\t\t\n\t\t} \n \n \n else {\n //recibe las variables como strings\n\tString ssemilla =args[0]; \n String sttablero =args[1];\n String stpoblacion =args[2];\n String siteraciones =args[3];\n String spcruza =args[4];\n String spmutaccion =args[5];\n //cambiar de string a enteros y decimales\n \n int isemilla = Integer.parseInt(ssemilla);\n int itpoblacion = Integer.parseInt(stpoblacion);\n double ipcruza = Double.parseDouble(spcruza);\n double ipmutaccion = Double.parseDouble(spmutaccion);\n int iiteraciones = Integer.parseInt(siteraciones);\n int itablero = Integer.parseInt(sttablero);\n // le pasamos el valor a las variables\n \n semilla =isemilla; \n tpoblacion =itpoblacion;\n pcruza =ipcruza;\n pmutaccion =ipmutaccion;\n iteraciones =iiteraciones;\n ttablero =itablero;\n/**/\n int gen=1;\n boolean find=false;\n //inicializamos la poblacion de tableros randomicamente 1ra generacion\n for(int i=0;i<tpoblacion;i++){\n int[] tablero= RandomizeArray(0, ttablero);\n poblacion.add(tablero);\n int fit=fittnes(tablero);\n if (fit==0) {\n //dibujo(tablero);\n System.out.println(Arrays.toString(tablero));\n System.out.println(\"En generacion 0\");\n dibujo(tablero);\n find=true;\n \n break;\n }\n fitvalores.add(fit);\n }//fin llenado de la poblacion inicial\n \n \n \n //acá construiriamos 1 generacion\n int m = 0;\n if (find==false){\n for (int i = 0; i < iteraciones; i++) {\n m++;\n for (int kk = 0; kk < tpoblacion; kk++) {\n //selecionamos dos padres por medio de la ruleta . solo obtenemos el iindice del tablero\n int padre1=ruolette(fitvalores,poblacion, semilla); \n int padre2=ruolette(fitvalores,poblacion, semilla);\n // System.out.println(\"padre 1 \"+padre1);\n //volvemos a elegir el padre 2 si es igual al padre 1\n\n if (padre2==padre1) {\n if (padre1==poblacion.size()) {\n padre2=padre1-1;\n // System.out.println(\"padres iguales pero se cambió\");\n }\n else{\n padre2=padre1+1;\n }\n }\n \n // System.out.println(\"padre 2 \"+padre2);\n //random decimal para ver si se cruzan los padres\n double randomdeccc=randomadec(0,1,semilla);\n \n //obtenemos la mitad para hacer a los hijos\n int mitad=randomanint(0,ttablero, semilla);\n //recuperar padre y madre seleccionados\n int [] padrek=obtenerpadre(poblacion, ttablero, padre1);\n int [] padres=obtenerpadre(poblacion, ttablero, padre2);\n int [] hijo1= new int[ttablero];\n int [] hijo2= new int[ttablero];\n //realizamos la cruza\n boolean cruza;\n //obtenemos la probabilidad de cruza\n cruza=probabilidadcruza(pcruza, randomdeccc);\n if(cruza==true){\n hijo1 =cruza( padrek, padres, ttablero, mitad, 1);\n hijo2 =cruza( padrek, padres, ttablero, mitad, 2);\n }\n // for (int i = 0; i <ttablero+1; i++) {\n // System.out.print( hijo1[i]);\n // }\n // System.out.println(\" \");\n // for (int i = 0; i <ttablero+1; i++) {\n // System.out.print( hijo2[i]);\n // }\n // System.out.println(\" \");\n //reparamosa a los hijos si se repiten los numeros\n int[] hijoreparauno=reparacion2(hijo1,ttablero);\n int[] hijoreparados=reparacion2(hijo2,ttablero);\n //seleccionamos numeros enteros para hacer la mutacion. si esta dentro de la probabilidad\n int num1=randomanint(0, ttablero, semilla);\n int num2=randomanint(0, ttablero, semilla);\n //nos aseguramon que no salga el mismo numero\n if (num1==num2) {\n if (num1==ttablero) {\n num2=num1-1;\n \n }\n else{\n num2=num1+1;\n }\n }\n \n // System.out.println(\"numero 1 \"+num1);\n // System.out.println(\"numero 2 \"+num2);\n //seleccionamos la probabilidad para la mutacion\n double probmut=randomadec(0,1,semilla);\n //hacemos la mutacion de los hijos\n int[] hijolistouno=mutacion(hijo1,ttablero,num1,num2,probmut,pmutaccion);\n int[] hijolistodos=mutacion(hijo2,ttablero,num1,num2,probmut,pmutaccion);\n //agregamos lo hijos a la nueva generacion\n //nuevagen.add(hijolistouno);\n // nuevagen.add(hijolistodos);\n poblacion.add(padre1, hijolistouno);\n poblacion.add(padre2, hijolistodos);\n int fit=fittnes(hijolistouno);\n if (fit==0) {\n //dibujo(hijolistouno);\n System.out.println(Arrays.toString(hijolistouno));\n System.out.println(\"En generacion \"+(m));\n dibujo(hijolistouno);\n // System.out.println(0);\n find=true;\n break;\n }\n int fiti=fittnes(hijolistodos);\n if (fiti==0) {\n //dibujo(hijolistouno);\n System.out.println(Arrays.toString(hijolistodos));\n System.out.println(\"En generacion \"+(m));\n // System.out.println(0);\n find=true;\n break;\n }\n \n \n fitvalores.add(padre1,fit);\n fitvalores.add(padre2,fiti);\n //se crea una nueva generacion\n }//fin llenado de una nueva poblacion\n }//fin de la creacion de generaciones (while) \n int mejor=100;\n \n for(int i = 0; i < fitvalores.size(); i++){\n\t if(fitvalores.get(i)<mejor){\n mejor=fitvalores.get(i);\n \t}\n\t\t\t\n\t}\n int [] mejorcito=obtenerpadre(poblacion, ttablero, mejor);\n if (find==false) {\n \n \n System.out.println(\"la mejor solucion es \");\n dibujo(mejorcito);\n System.out.println(Arrays.toString(mejorcito));\n System.out.print(\"generaciones escaneadas \"+m);\n }\n }\n }\n }", "public final double evaluate(double x,double[] pars){ return value(x,pars); }", "void execute(TrackingSystem syst, Scanner scan) throws ProblemException {\r\n\t\ttry {\r\n\t\t\tint i;\r\n\t\t\tdouble x, y, d, llx, lly, urx, ury;\r\n\t\t\tx = y = Double.NEGATIVE_INFINITY;\r\n\t\t\tif (scan.hasNext(\"\\\\*\")) {\r\n\t\t\t\tscan.next();\r\n\t\t\t\ty = scan.nextDouble();\r\n\t\t\t\td = parse(scan);\r\n\t\t\t\tllx = Double.NEGATIVE_INFINITY;\r\n\t\t\t\tlly = y-d;\r\n\t\t\t\turx = Double.POSITIVE_INFINITY;\r\n\t\t\t\tury = y+d;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tx = scan.nextDouble();\r\n\t\t\t\tif (scan.hasNext(\"\\\\*\")) {\r\n\t\t\t\t\tscan.next();\r\n\t\t\t\t\td = parse(scan);\r\n\t\t\t\t\tllx = x-d;\r\n\t\t\t\t\tlly = Double.NEGATIVE_INFINITY;\r\n\t\t\t\t\turx = x+d;\r\n\t\t\t\t\tury = Double.POSITIVE_INFINITY;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\ty = scan.nextDouble();\r\n\t\t\t\t\td = parse(scan);\r\n\t\t\t\t\tllx = x-d;\r\n\t\t\t\t\tlly = y-d;\r\n\t\t\t\t\turx = x+d;\r\n\t\t\t\t\tury = y+d;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tIterator<QuadPoint> iter = syst.iterator(llx, lly, urx, ury);\r\n\t\t\ti = 0;\r\n\t\t\tArrayList<Integer> ids = new ArrayList<Integer>();\r\n\t\t\twhile (iter.hasNext()) {\r\n\t\t\t\tQuadPoint curr = iter.next();\r\n\t\t\t\tdouble[] val = syst.map.get(new Coordinate(curr.x(),curr.y()));\r\n\t\t\t\tif (withinD(d, x, y, curr.x(), curr.y())) {\r\n\t\t\t\t\tids.add((int)val[0]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tCollections.sort(ids);\r\n\t\t\tfor (int id : ids) {\r\n\t\t\t\tdouble[] value = syst.locs.get(id);\r\n\t\t\t\tif (i != 0 && i % 2 == 0)\r\n\t\t\t\t\tSystem.out.println ();\r\n\t\t\t\telse if(i % 2 == 1)\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\tSystem.out.printf (\"%d:(%.4g,%.4g,%.4g,%.4g)\", \r\n\t\t\t\t\t\t id, value[1], value[2],\r\n\t\t\t\t\t\t value[3], value[4]);\r\n\t\t\t\ti += 1;\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t\t\r\n\t\t} catch (InputMismatchException e) {\r\n\t\t\tthrow ERR (\"Arguments of near must be of type double\");\r\n\t\t} catch (NoSuchElementException e) {\r\n\t\t\tthrow ERR (\"Too few Args to near\");\r\n\t\t} catch (IllegalStateException e) {\r\n\t\t\tthrow ERR(\"near Failed, Scanner is closed\");\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\tthrow ERR(\"Arguments of near must be of type double\");\r\n\t\t}\r\n\t\t\r\n\t}", "public static boolean isValidParamValue(int index, int value)\n {\n return (value >= akParams_[index].lowerBound && value <= akParams_[index].upperBound);\n }", "public Tipo visitParameter(DECAFParser.ParameterContext ctx){\r\n\t\tVarDec var =new VarDec(ctx.ID().getText(),tablaSimbolos.searchTipo(ctx.parameterType().getText()),0,position);\r\n\t\tfirmaA.addParam(var);\r\n\t\taddComment(\"paramname: \"+var.getNombre()+\"-position: \"+position);\r\n\t\tposition+=var.getByteSize();\r\n\t\treturn tablaSimbolos.correct();\r\n\t}", "public static List<Point> ParetoOptimal(List<Point> listofPts)\n {\n \n if(listofPts.size() == 1 || listofPts.size() == 0)\n return listofPts;\n \n \n \n \n int pos = listofPts.size() /2 ;\n \n /*\n * quickSelect time complexity (n)\n */\n \n Point median = quickSelect(listofPts, pos, 0, listofPts.size() - 1); \n \n \n \n List<Point> points1 = new ArrayList<Point>();\n List<Point> points2 = new ArrayList<Point>();\n List<Point> points3 = new ArrayList<Point>();\n List<Point> points4 = new ArrayList<Point>();\n \n //O(n)\n if(oldMedian == median)\n {\n \t\n for(int x= 0; x < listofPts.size(); x++)\n {\n if(listofPts.get(x).getX() <= median.getX())\n {\n points1.add(listofPts.get(x));\n \n }\n else\n {\n points2.add(listofPts.get(x));\n \n }\n }\n \n \n }\n else\n {\n for(int x= 0; x < listofPts.size(); x++)\n {\n if(listofPts.get(x).getX() < median.getX())\n {\n points1.add(listofPts.get(x));\n \n }\n else\n {\n points2.add(listofPts.get(x));\n \n }\n }\n \n \n }\n //O(n)\n int yRightMax = -100000;\n for(int x= 0; x < points2.size(); x++)\n {\n if(points2.get(x).getY() > yRightMax)\n yRightMax = (int) points2.get(x).getY();\n \n }\n \n \n for(int x= 0; x < points1.size() ; x++)\n {\n if(points1.get(x).getY()> yRightMax)\n { \n points3.add(points1.get(x));\n \n } \n }\n \n for(int x= 0; x < points2.size() ; x++)\n {\n if(points2.get(x).getY() < yRightMax)\n {\n points4.add(points2.get(x));\n \n }\n \n }\n //System.out.println(\"points2: \" + points2);\n /*\n * Below bounded by T(n/c) + T(n/2) where c is ratio by which left side is shortened \n */\n oldMedian = median;\n return addTo \n ( ParetoOptimal(points3), \n ParetoOptimal(points2)) ;\n }", "public double getParam(String s) {\n switch(s) {\n case \"mu\":\n return this.mu;\n case \"lambda\":\n return this.lambda;\n case \"fbDocs\":\n return this.fbDocs;\n case \"fbTerms\":\n return this.fbTerms;\n case \"fbMu\":\n return this.fbMu;\n case \"fbOrigWeight\":\n return this.fbOrigWeight;\n default:\n throw new IllegalArgumentException\n (\"Illegal argument: IndriExpansion doesn't have argument \" + s);\n }\n }", "protected final void parsec() {\n current = read();\n skipSpaces();\n \n for (;;) {\n switch (current) {\n default:\n return;\n case '+': case '-': case '.':\n case '0': case '1': case '2': case '3': case '4':\n case '5': case '6': case '7': case '8': case '9':\n }\n\n float x1 = parseNumber();\n skipCommaSpaces();\n float y1 = parseNumber();\n skipCommaSpaces();\n float x2 = parseNumber();\n skipCommaSpaces();\n float y2 = parseNumber();\n skipCommaSpaces();\n float x = parseNumber();\n skipCommaSpaces();\n float y = parseNumber();\n\n smoothCCenterX = currentX + x2;\n smoothCCenterY = currentY + y2;\n smoothQCenterX = currentX + x;\n smoothQCenterY = currentY + y;\n p.curveTo(currentX + x1, currentY + y1,\n smoothCCenterX, smoothCCenterY,\n smoothQCenterX, smoothQCenterY);\n currentX = smoothQCenterX;\n currentY = smoothQCenterY;\n skipCommaSpaces();\n }\n }", "public void setParam(String paramName, double value);", "protected void calibrateMetaModel(final int currentParamNo) {\r\n\t\tCalcfc optimization=new Calcfc() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic double compute(int m, int n, double[] x, double[] constrains) {\r\n\t\t\t\tdouble objective=0;\r\n\t\t\t\tMetaModelParams=x;\r\n\t\t\t\tfor(int i:params.keySet()) {\r\n\t\t\t\t\tobjective+=Math.pow(calcMetaModel(0, params.get(i))-simData.get(i),2)*calcEuclDistanceBasedWeight(params, i,currentParamNo);\r\n\t\t\t\t}\r\n\t\t\t\treturn objective;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t};\r\n\t\tdouble[] x=new double[this.noOfMetaModelParams]; \r\n\t\tfor(int i=0;i<this.noOfMetaModelParams;i++) {\r\n\t\t\tx[i]=0;\r\n\t\t}\r\n\t CobylaExitStatus result = Cobyla.findMinimum(optimization, this.noOfMetaModelParams, 0, x,0.5,Math.pow(10, -6) ,3, 1500);\r\n\t this.MetaModelParams=x;\r\n\t}", "public ArrayList execute() {//(MultivariateFunction func, double[] xvec, double tolfx, double tolx) \n num_Function_Evaluation = 0;\n double[] stat = {0.0, 0.0};\n double[] storeBest = null;\n double[] storeMean = null;\n double[] storeStd = null;\n if (isOptimization) {\n storeBest = new double[101];\n storeMean = new double[101];\n storeStd = new double[101];\n //System.out.println(\"Initialization Done\");\n }\n int storeIndex = 0;\n\n //f = func;\n //bestSolution = xvec;\n // Create first generation\n firstGeneration();\n //System.out.println(iRet+\" \"+returnResult[iRet]);\n //stopCondition(fx, bestSolution, tolfx, tolx, true);\n\n //main iteration loop\n while (true) {\n boolean xHasChanged;\n do {\n //printing steps\n if (isPrintSteps) {\n if (currGen % printStep == 0) {\n if (isOptimization) {\n if (storeIndex < 101) {\n storeBest[storeIndex] = fx;\n stat = computFitnessStat();\n storeMean[storeIndex] = stat[0];\n storeStd[storeIndex] = stat[1];\n storeIndex++;\n }\n }\n System.out.printf(\" MH algo It: %5d Best: %.9f Mean: %.9f Std: %.9f \\n\", currGen, fx, stat[0], stat[1]);\n }//printsteps\n }//isPrintSteps\n\n xHasChanged = nextGeneration();\n if (currGen >= maxIter) {//if (maxFun > 0 && numFun > maxFun)\n break;\n }\n //if (prin > 1 && currGen % 20 == 0)\n //printStatistics();\n } while (!xHasChanged);\n //if (stopCondition(fx, bestSolution, tolfx, tolx, false) || (maxFun > 0 && numFun > maxFun))\n if (currGen >= maxIter) {\n break;\n }\n if (fx < 0.0000001) {\n //System.out.println(\"treshold\" + fx);\n //break;\n }\n }//while\n //printing final step\n if (isPrintFinal) {\n if (isOptimization) {\n if (storeIndex < 101) {\n storeBest[storeIndex] = fx;\n stat = computFitnessStat();\n storeMean[storeIndex] = stat[0];\n storeStd[storeIndex] = stat[1];\n storeIndex++;\n }\n }\n System.out.printf(\" MH algo It: %5d Best: %.9f Mean: %.9f Std: %.9f \\nTotal Fun Evaluations: %d\\n\", currGen, fx, stat[0], stat[1], num_Function_Evaluation);\n }\n ArrayList array = new ArrayList();\n array.add(storeBest);\n array.add(storeMean);\n array.add(storeStd);\n return array;\n }", "private void setTEMparsFromRunner(){\n\t\t\n\t\tString fdummy=\" \";\n\t\t\n\t\tsoipar_cal sbcalpar = new soipar_cal();\n\t\tvegpar_cal vbcalpar = new vegpar_cal();\t\n\t\t\n\t\tfdummy = (String)calparTB.getValueAt(GUIconfigurer.I_CMAX, 1);\n\t\tif (fdummy!=\" \") vbcalpar.setCmax(Float.valueOf(fdummy));\n\t\tfdummy = (String)calparTB.getValueAt(GUIconfigurer.I_NMAX, 1);\n\t\tif (fdummy!=\" \") vbcalpar.setNmax(Float.valueOf(fdummy));\n\t\tfdummy = (String)calparTB.getValueAt(GUIconfigurer.I_CFALL, 1);\n\t\tif (fdummy!=\" \") vbcalpar.setCfall(Float.valueOf(fdummy));\n\t\tfdummy = (String)calparTB.getValueAt(GUIconfigurer.I_NFALL, 1);\n\t\tif (fdummy!=\" \") vbcalpar.setNfall(Float.valueOf(fdummy));\n\t\tfdummy = (String)calparTB.getValueAt(GUIconfigurer.I_KRB, 1);\n\t\tif (fdummy!=\" \") vbcalpar.setKrb(Float.valueOf(fdummy));\n\t\t\t\t\n\t\tfdummy = (String)calparTB.getValueAt(GUIconfigurer.I_KDCFIB, 1);\n\t\tif (fdummy!=\" \") sbcalpar.setKdcfib(Float.valueOf(fdummy));\n\t\tfdummy = (String)calparTB.getValueAt(GUIconfigurer.I_KDCHUM, 1);\n\t\tif (fdummy!=\" \") sbcalpar.setKdchum(Float.valueOf(fdummy));\n\t\tfdummy = (String)calparTB.getValueAt(GUIconfigurer.I_KDCMIN, 1);\n\t\tif (fdummy!=\" \") sbcalpar.setKdcmin(Float.valueOf(fdummy));\n\t\tfdummy = (String)calparTB.getValueAt(GUIconfigurer.I_KDCSLOW, 1);\n\t\tif (fdummy!=\" \") sbcalpar.setKdcslow(Float.valueOf(fdummy));\n\t\tfdummy = (String)calparTB.getValueAt(GUIconfigurer.I_NUP, 1);\n\t\tif (fdummy!=\" \") sbcalpar.setNup(Float.valueOf(fdummy));\n\t\t\n\t\tif (fdummy!=\" \") TEM.runcht.cht.resetCalPar(vbcalpar, sbcalpar);\n\n\t\t//\n\t\tsoipar_bgc sbbgcpar = new soipar_bgc();\n\t\tvegpar_bgc vbbgcpar = new vegpar_bgc();\n\n\t\tfdummy =(String) fixparTB.getValueAt(GUIconfigurer.I_m1, 1);\n\t\tif (fdummy!=\" \") vbbgcpar.setM1(Float.valueOf(fdummy));\n\t\tfdummy =(String) fixparTB.getValueAt(GUIconfigurer.I_m2, 1);\n\t\tif (fdummy!=\" \") vbbgcpar.setM2(Float.valueOf(fdummy));\n\t\tfdummy =(String) fixparTB.getValueAt(GUIconfigurer.I_m3, 1);\n\t\tif (fdummy!=\" \") vbbgcpar.setM3(Float.valueOf(fdummy));\n\t\tfdummy =(String) fixparTB.getValueAt(GUIconfigurer.I_m4, 1);\n\t\tif (fdummy!=\" \") vbbgcpar.setM4(Float.valueOf(fdummy));\n\t\tfdummy =(String) fixparTB.getValueAt(GUIconfigurer.I_fsoma, 1);\n\t\tif (fdummy!=\" \") sbbgcpar.setFsoma(Float.valueOf(fdummy));\n\t\tfdummy =(String) fixparTB.getValueAt(GUIconfigurer.I_fsompr, 1);\n\t\tif (fdummy!=\" \") sbbgcpar.setFsompr(Float.valueOf(fdummy));\n\t\tfdummy =(String) fixparTB.getValueAt(GUIconfigurer.I_fsomcr, 1);\n\t\tif (fdummy!=\" \") sbbgcpar.setFsomcr(Float.valueOf(fdummy));\n\t\tfdummy =(String) fixparTB.getValueAt(GUIconfigurer.I_som2co2, 1);\n\t\tif (fdummy!=\" \") sbbgcpar.setSom2co2(Float.valueOf(fdummy));\n\t\t\n\t\tif (fdummy!=\" \") TEM.runcht.cht.resetBgcPar(vbbgcpar, sbbgcpar);\n\t\t\t\t\n\t}", "public static void Main()\n\t{\n\t\tint n;\n\t\tint[] a = new int[300];\n\t\tint i;\n\t\tint sum = 0;\n\t\tint max;\n\t\tint min;\n\t\tfloat m;\n\t\tString tempVar = ConsoleInput.scanfRead();\n\t\tif (tempVar != null)\n\t\t{\n\t\t\tn = Integer.parseInt(tempVar);\n\t\t}\n\t\tfor (i = 0;i < n;i++)\n\t\t{\n\t\t\tString tempVar2 = ConsoleInput.scanfRead();\n\t\t\tif (tempVar2 != null)\n\t\t\t{\n\t\t\t\ta[i] = Integer.parseInt(tempVar2);\n\t\t\t}\n\t\t\tsum = sum + a[i];\n\t\t}\n\t\tm = (float)sum / n;\n\t\tmax = a[0];\n\t\tmin = a[0];\n\t\tfor (i = 0;i < n;i++)\n\t\t{\n\t\t\tif (max < a[i])\n\t\t\t{\n\t\t\t\tmax = a[i];\n\t\t\t}\n\t\t\tif (min > a[i])\n\t\t\t{\n\t\t\t\tmin = a[i];\n\t\t\t}\n\t\t}\n\t\tif (((float)max - m) > (m - (float)min))\n\t\t{\n\t\t\tSystem.out.printf(\"%d\",max);\n\t\t}\n\t\telse if (((float)max - m) < (m - (float)min))\n\t\t{\n\t\t\tSystem.out.printf(\"%d\",min);\n\t\t}\n\t\telse if (((float)max - m) == (m - (float)min))\n\t\t{\n\t\t\tSystem.out.printf(\"%d,%d\",min,max);\n\t\t}\n\t}", "public void scanFrame() {\n\n //Scanner inaktiv, så scanTimeren kan blive angivet i millisekunder.\n if (scannerInactive) {\n scanTimer = millis();\n }\n\n //Scanner bliver sat til aktiv, når timeren har nået den værdi angivet i timeBetweenScan.\n if (!scannerInactive) {\n /*\n if (scanTimer % timeBetweenScan > timeBetweenScan-100 && millis() > 10000) {\n scanTimer = timeBetweenScan-99;\n scannerInactive = false;*/\n \n //Minx og maxX biver sat alt efter hvilken zone der skal scannes, baseret på et timeslot.\n minX = scanAreaW/4*time.getCurrentTimeSlotInt()+scanAreaX+1;\n maxX = scanAreaW/4*(time.getCurrentTimeSlotInt()+1)+scanAreaX-2;\n\n //Checker først om scanneren har ikke overskredet både X og Y-grænsen.\n //En pille blev\n if (y >= maxY && x >= maxX) {\n //Ingen piller blev i scanningsloopet.\n //Her resettes scannerens X og Y til standard, og vi sender en OSC-besked til enheden, at der ingen piller er.\n x = minX;\n y = minY;\n \n timeslotBools[time.getCurrentTimeSlotInt()] = true;\n\n //oscBesked\n msg = new OscMessage(\"/pill\");\n msg.add(false);\n oscP5.send(msg, unitAddress);\n\n } else { //Ingen af koordinaterne har ramt deres max.\n\n if (y >= maxY) {\n //Hvis Y-koordinaten har ramt kanten af boksen, resetter vi dens værdi, og begynde på næste række, X.\n x += 5;\n y = minY;\n } else {\n //Ingen af checks'ne var succesfulde, så det antages at ingen maks-grænse er noget, og den næste Y-koordinat kan læses.\n y += 5;\n }\n\n }\n \n //Pixels'ne indenfor scannings-regionen bliver tjekket imod pillerne i XML-filen.\n loadPixels();\n println(\"currentscan @frame: \" + x + \" \" + y + \" : currentcolor: \" + pixels[y*width+x]);\n for (int i = 0; i < xmlHandler.children.length-1; ++i) {\n xmlHandler.load(i+1);\n if(pixels[y*width+x] > xmlHandler.outputMinRange && pixels[y*width+x] < xmlHandler.outputMaxRange) {\n //Pille er blevet genkendet.\n //uielement.informationDialog(\"pille ramt: \" + pillTimeSlot(x));\n timeslotBools[time.getCurrentTimeSlotInt()] = false;\n x = minX;\n y = minY;\n //oscBesked\n msg = new OscMessage(\"/pill\");\n msg.add(true);\n oscP5.send(msg, unitAddress);\n }\n }\n\n //Tegner en boks om den pixel der bliver scannet.\n rectMode(RADIUS);\n noFill();\n stroke(scannerColor);\n rect(x, y, 10, 10);\n \n }\n\n }", "public void exec() {\n\t\n\t// prompt user for limit, and read what is typed\n\tprintStr(\"Find primes through: \");\n\tint num = readInt();\n\t\n\t// ensure that number is not negative\n\tint n = num;\n\tif (n < 0) {\n\t n = 0;\n\t}\n\t\n\t////////////////////////////////\n\t// compute the primes\n\t////////////////////////////////\n\t\n\t// array that tells whether number is composite\n\tboolean[] seive = new boolean[n+1];\n\t\n\t// run through all candidates \"seive-ing\" when we find a prime\n\tfor (int i = 2; i <= n; i++) {\n\t if (!seive[i]) { // prime, so need to \"seive\"\n\t\tfor (int j = 2*i; j < n; j = j + i) {\n\t\t seive[j] = true; // mark composite\n\t\t}\n\t }\n\t}\n\t\n\t////////////////////////////////\n\t// print the primes\n\t////////////////////////////////\n\t\n\t// print initial line\n\tprintStr(\"primes up through \");\n\tprintInt(n);\n\tprintStr(\":\\n\");\n\t\n\t// print primes, 20 per line\n\tint elementsOnLine = 0; // number of elements on current line\n\tfor (int i = 2; i < n; i++) {\n\t if (!seive[i]) {\n\t\t// found prime, so print it\n\t\tprintInt(i);\n\t\telementsOnLine++; // bump elements on line\n\t\tif (elementsOnLine >= 20) {\n\t\t // reached line limit; print newline and reset\n\t\t printStr(\"\\n\");\n\t\t elementsOnLine = 0;\n\t\t}\n\t\telse {\n\t\t // did not reach line limit; print space-separator\n\t\t printStr(\" \");\n\t\t}\n\t }\n\t}\n\t\n\t// print final newline\n\tprintStr(\"\\n\");\n }", "@Test\n\tpublic void testInterpolationSearch() {\n\t\tint[] numbers = {0, 1, 2, 3, 4, 5, 6};\n\t\tint r1 = _02_InterpolationSearch.interpolationSearch(numbers, 2);\n\t\tassertEquals(2, r1);\n\t\t\n\t\tint[] numbers2 = {2, 4, 6, 8, 10};\n\t\tint r2 = _02_InterpolationSearch.interpolationSearch(numbers2, 2);\n\t\tassertEquals(0, r2);\n\t\t\n\t\tint[] numbers3 = {100, 200, 300};\n\t\tint r3 = _02_InterpolationSearch.interpolationSearch(numbers3, 160);\n\t\tassertEquals(-1, r3);\n\n\t}", "public void setNscan(Integer nscan) {\r\n this.nscan = nscan;\r\n }", "@Override\n\tpublic void updateParameter(String parameterLabel, double newValue) {\n\t\tif (parameterLabel.equals(PROBCATCH_PARAMETER_LABEL_GUI)) {\n\t\t\tprobCatch = newValue;\n\t\t}\n\n\t}", "public void start(){\n tuningParams = new HashMap<>();\n running = true;\n int valsListIndex = 0;\n Gamepad gamepad1 = FTCUtilities.getOpMode().gamepad1;\n Switch upSwitch = new Switch();\n Switch downSwitch = new Switch();\n\n\n for(String name: params.keySet()){\n tuningParams.put(name,0.0);\n }\n\n while (running){\n for(String name : paramNames){\n String output = \"\";\n\n output += name;\n output += \": \";\n output += Double.toString(tuningParams.get(name));\n if(paramNames.get(valsListIndex).equals(name)){\n output += \"<---\"; // Indicator so that we know which value we're editing\n }\n\n FTCUtilities.addLine(output);\n }\n\n if(gamepad1.dpad_up) {\n if (upSwitch.flip()) {\n if (valsListIndex >= 1) {\n valsListIndex -= 1;\n } else {\n valsListIndex = paramNames.size() - 1; //wrap to top\n }\n }\n } else if(gamepad1.dpad_down){\n if (downSwitch.flip()) {\n if (valsListIndex < paramNames.size() - 1) {\n valsListIndex += 1;\n } else {\n valsListIndex = 0; // wrap around to 0\n }\n }\n } else {\n String currentValKey = paramNames.get(valsListIndex);\n double currentValDouble = tuningParams.get(currentValKey);\n currentValDouble += gamepad1.right_trigger * params.get(currentValKey);\n currentValDouble -= gamepad1.left_trigger * params.get(currentValKey);\n tuningParams.put(currentValKey, currentValDouble);\n }\n FTCUtilities.updateOpLogger();\n\n if (gamepad1.x) {\n stop();\n }\n }\n }", "@Override\n\tpublic void muestraInfo() {\n\t\tSystem.out.println(\"Adivina un número par: Es un juego en el que el jugador\" +\n\t\t\t\t\" deberá acertar un número PAR comprendido entre el 0 y el 10 mediante un número limitado de intentos(vidas)\");\n\t}", "public static void main(String[] args) \n {\n int[] numOfPoints = { 1000, 10000, 7000, 10000, 13000 };\n for(int count = 0; count < numOfPoints.length; count++)\n {\n List<Point> pointsTobeUsed = new ArrayList<Point>();\n int current = numOfPoints[count];\n int inc = 0;\n \n //creating list of points to be used\n for(int x = 0; x <= current; x++)\n {\n \n if(x <= current/2)\n {\n pointsTobeUsed.add(new Point(x,x));\n \n }\n else\n {\n pointsTobeUsed.add(new Point(x, x - (1 + 2*(inc)) ) );\n inc++;\n }\n }\n \n //n logn implementation of Pareto optimal\n long timeStart = System.currentTimeMillis();\n \n // n logn quicksort\n pointsTobeUsed = quickSort(pointsTobeUsed, 0, pointsTobeUsed.size() -1 );\n \n \n \n ParetoOptimal(pointsTobeUsed);\n \n \n long timeEnd = System.currentTimeMillis();\n System.out.println(\"final:\" + \" exper: \" + (timeEnd - timeStart) + \" N: \" + current ); \n }\n }", "public static native void OpenMM_AmoebaPiTorsionForce_getPiTorsionParameters(PointerByReference target, int index, IntByReference particle1, IntByReference particle2, IntByReference particle3, IntByReference particle4, IntByReference particle5, IntByReference particle6, DoubleByReference k);", "public static void pscan(Object... args) throws Exception {\n\t\tlogger.debug(\"Called 'pscan' with args: {}\", Arrays.asList(args));\n\t\tPointsScan theScan = new PointsScan(args);\n\t\ttheScan.runScan();\n\t}", "public static void main(String[] args) {\n double [][]x;\r\n int N,M,A,B,Imin;\r\n Scanner inp = new Scanner(System.in);\r\n System.out.print(\"N=\"); N=inp.nextInt();\r\n System.out.print(\"M=\"); M=inp.nextInt();\r\n System.out.print(\"A=\"); A=inp.nextInt();\r\n System.out.print(\"B=\"); B=inp.nextInt();\r\n x=new double[N][M];\r\n for (int i=0; i<N; i++)\r\n for (int j=0; j<M; j++)\r\n {\r\n System.out.print(\"x(\"+i+\",\"+j+\")=\");\r\n x[i][j]=inp.nextDouble();\r\n }\r\n inp.close();\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n for (int j=0; j<M; j++)\r\n {Imin=0;\r\n for (int i=1; i<N; i++)\r\n {if (x[i][j]<x[Imin][j])\r\n\r\n Imin=i;\r\n System.out.println(\"Минимальный элемент в \" + j + \" столбце \" + \"x(\"+Imin+\",\"+j+\")=\" + x[Imin][j]);\r\n }\r\n if ((x[Imin][j]>=A)&&(x[Imin][j]<=B))\r\n System.out.println(j);\r\n }\r\n\r\n\r\n\r\n\r\n\r\n\r\n System.out.println(\"Номера столбцов, в которых минимальный элемент попадает в интервал от \" + A + \" до \" + B);\r\n\r\n\r\n\r\n }", "int askForTempMin();", "public void ruleOutPos(){\n for(int i=0;i<scores.length;i++) {\n for(int j=0;j<scores[i].length;j++) {\n scores[i][j][13] = 0;//0=pass, >0 is fail, set to pass initially\n\n //check Ns - bit crude - what to discount regions with high N\n double ns = (double) scores[i][j][14] / (double) pLens[j];\n if (ns >= minPb | ns >= minPm)//\n scores[i][j][13] += 4;\n\n //probe\n if (hasProbe){\n if (j == 1 | j == 4) {\n double perc = (double) scores[i][j][0] / (double) primers[j].length();\n if (perc >= minPb) {\n scores[i][j][12] = 1;//flag for failed % test\n scores[i][j][13] += 2;\n }\n }\n }\n //primer\n else {\n //if more than 2 mismatches in 1-4nt at 3'\n if(scores[i][j][11]>max14nt) {\n scores[i][j][13]+=1;\n }\n //use mLen (combined F and R length) initially to find initial candidates - filter later\n double perc=(double)scores[i][j][0]/(double)mLen;\n double percI=(double)scores[i][j][0]/(double)pLens[j];\n\n if(perc>=minPm | percI>=minPmI) {\n scores[i][j][12]=1;//flag for failed % test\n scores[i][j][13]+=2;\n }\n }\n }\n }//end of finding positions that prime loop\n }", "public void next(Parameters params) {\r\n pui.commitParameters();\r\n }", "public static void display() { System.err.println(\"Train parameters: smooth=\" + smoothing + \" PA=\" + PA + \" GPA=\" + gPA + \" selSplit=\" + selectiveSplit + \" (\" + selectiveSplitCutOff + (deleteSplitters != null ? \"; deleting \" + deleteSplitters : \"\") + \")\" + \" mUnary=\" + markUnary + \" mUnaryTags=\" + markUnaryTags + \" sPPT=\" + splitPrePreT + \" tagPA=\" + tagPA + \" tagSelSplit=\" + tagSelectiveSplit + \" (\" + tagSelectiveSplitCutOff + \")\" + \" rightRec=\" + rightRec + \" leftRec=\" + leftRec + \" xOverX=\" + xOverX + \" collinsPunc=\" + collinsPunc + \" markov=\" + markovFactor + \" mOrd=\" + markovOrder + \" hSelSplit=\" + hSelSplit + \" (\" + HSEL_CUT + \")\" + \" compactGrammar=\" + compactGrammar() + \" leaveItAll=\" + leaveItAll + \" postPA=\" + postPA + \" postGPA=\" + postGPA + \" selPSplit=\" + selectivePostSplit + \" (\" + selectivePostSplitCutOff + \")\" + \" tagSelPSplit=\" + tagSelectivePostSplit + \" (\" + tagSelectivePostSplitCutOff + \")\" + \" postSplitWithBase=\" + postSplitWithBaseCategory + \" fractionBeforeUnseenCounting=\" + fractionBeforeUnseenCounting + \" openClassTypesThreshold=\" + openClassTypesThreshold); }", "public static int findMedianInt (Scanner scn)\n {\n ArrayList<Integer> lines = new ArrayList<Integer>();\n while (scn.hasNext())\n {\n lines.add(scn.nextInt());\n }\n if (lines.size() > 0)\n {\n Collections.sort(lines);\n return lines.get(lines.size() / 2);\n }\n else\n {\n throw new NoSuchElementException();\n }\n }", "private void init_seekbar_parameters()\n\t{\n\t\tfinal SeekBar seekbar_pMovF = (SeekBar) findViewById(R.id.set_param_movF_seekBar);\n\t\tseekbar_pMovF.setProgress(parameter_float_to_int_mov(Callbacksplit.getMainActivity().param_MOV_F));\n\t\ttext_value_pMovF.setText(String.valueOf(Callbacksplit.getMainActivity().param_MOV_F)+\" m\");\n\t\tseekbar_pMovF.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onStopTrackingTouch(SeekBar seekBar) {\n\t\t\t\ttext_value_pMovF.setText(String.valueOf(parameter_int_to_float_mov(seekBar.getProgress()))+\" m\");\n\t\t\t\tCallbacksplit.getMainActivity().param_MOV_F = parameter_int_to_float_mov(seekBar.getProgress());\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void onStartTrackingTouch(SeekBar seekBar) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {\n\t\t\t\ttext_value_pMovF.setText(String.valueOf(parameter_int_to_float_mov(progress))+\" m\");\n\t\t\t}\n\t\t});\n\t\t\n\t\tfinal SeekBar seekbar_pMovB = (SeekBar) findViewById(R.id.set_param_movB_seekBar);\n\t\tseekbar_pMovB.setProgress(parameter_float_to_int_mov(Callbacksplit.getMainActivity().param_MOV_B));\n\t\ttext_value_pMovB.setText(String.valueOf(Callbacksplit.getMainActivity().param_MOV_B)+\" m\");\n\t\tseekbar_pMovB.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onStopTrackingTouch(SeekBar seekBar) {\n\t\t\t\ttext_value_pMovB.setText(String.valueOf(parameter_int_to_float_mov(seekBar.getProgress()))+\" m\");\n\t\t\t\tCallbacksplit.getMainActivity().param_MOV_B = parameter_int_to_float_mov(seekBar.getProgress());\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void onStartTrackingTouch(SeekBar seekBar) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {\n\t\t\t\ttext_value_pMovB.setText(String.valueOf(parameter_int_to_float_mov(progress))+\" m\");\n\t\t\t}\n\t\t});\n\t\t\n\t\tfinal SeekBar seekbar_pMovD = (SeekBar) findViewById(R.id.set_param_movD_seekBar);\n\t\tseekbar_pMovD.setProgress(Callbacksplit.getMainActivity().param_MOV_D);\n\t\ttext_value_pMovD.setText(String.valueOf(Callbacksplit.getMainActivity().param_MOV_D)+\"°\");\n\t\tseekbar_pMovD.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onStopTrackingTouch(SeekBar seekBar) {\n\t\t\t\ttext_value_pMovD.setText(String.valueOf(seekBar.getProgress())+\"°\");\n\t\t\t\tCallbacksplit.getMainActivity().param_MOV_D = seekBar.getProgress();\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void onStartTrackingTouch(SeekBar seekBar) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {\n\t\t\t\ttext_value_pMovD.setText(String.valueOf(progress)+\"°\");\n\t\t\t}\n\t\t});\n\t\t\n\t\tfinal SeekBar seekbar_pHadF = (SeekBar) findViewById(R.id.set_param_hadF_seekBar);\n\t\tseekbar_pHadF.setProgress(Callbacksplit.getMainActivity().param_HAD_F);\n\t\ttext_value_pHadF.setText(String.valueOf(Callbacksplit.getMainActivity().param_HAD_F)+\"°\");\n\t\tseekbar_pHadF.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onStopTrackingTouch(SeekBar seekBar) {\n\t\t\t\ttext_value_pHadF.setText(String.valueOf(seekBar.getProgress())+\"°\");\n\t\t\t\tCallbacksplit.getMainActivity().param_HAD_F = seekBar.getProgress();\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void onStartTrackingTouch(SeekBar seekBar) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {\n\t\t\t\ttext_value_pHadF.setText(String.valueOf(progress)+\"°\");\n\t\t\t}\n\t\t});\n\t\t\n\t\tfinal SeekBar seekbar_pHadB = (SeekBar) findViewById(R.id.set_param_hadB_seekBar);\n\t\tseekbar_pHadB.setProgress(Callbacksplit.getMainActivity().param_HAD_B);\n\t\ttext_value_pHadB.setText(String.valueOf(Callbacksplit.getMainActivity().param_HAD_B)+\"°\");\n\t\tseekbar_pHadB.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onStopTrackingTouch(SeekBar seekBar) {\n\t\t\t\ttext_value_pHadB.setText(String.valueOf(seekBar.getProgress())+\"°\");\n\t\t\t\tCallbacksplit.getMainActivity().param_HAD_B = seekBar.getProgress();\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void onStartTrackingTouch(SeekBar seekBar) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {\n\t\t\t\ttext_value_pHadB.setText(String.valueOf(progress)+\"°\");\n\t\t\t}\n\t\t});\n\t\t\n\t\tfinal SeekBar seekbar_pHadD = (SeekBar) findViewById(R.id.set_param_hadD_seekBar);\n\t\tseekbar_pHadD.setProgress(Callbacksplit.getMainActivity().param_HAD_D);\n\t\ttext_value_pHadD.setText(String.valueOf(Callbacksplit.getMainActivity().param_HAD_D)+\"°\");\n\t\tseekbar_pHadD.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onStopTrackingTouch(SeekBar seekBar) {\n\t\t\t\ttext_value_pHadD.setText(String.valueOf(seekBar.getProgress())+\"°\");\n\t\t\t\tCallbacksplit.getMainActivity().param_HAD_D = seekBar.getProgress();\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void onStartTrackingTouch(SeekBar seekBar) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {\n\t\t\t\ttext_value_pHadD.setText(String.valueOf(progress)+\"°\");\n\t\t\t}\n\t\t});\n\t\t\n\t\tfinal SeekBar seekbar_pArmHR = (SeekBar) findViewById(R.id.set_param_armHR_seekBar);\n\t\tseekbar_pArmHR.setProgress(Callbacksplit.getMainActivity().param_ARM_HR);\n\t\ttext_value_pArmHR.setText(String.valueOf(Callbacksplit.getMainActivity().param_ARM_HR)+\"°\");\n\t\tseekbar_pArmHR.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onStopTrackingTouch(SeekBar seekBar) {\n\t\t\t\ttext_value_pArmHR.setText(String.valueOf(seekBar.getProgress())+\"°\");\n\t\t\t\tCallbacksplit.getMainActivity().param_ARM_HR = seekBar.getProgress();\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void onStartTrackingTouch(SeekBar seekBar) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {\n\t\t\t\ttext_value_pArmHR.setText(String.valueOf(progress)+\"°\");\n\t\t\t}\n\t\t});\n\t\t\n\t\tfinal SeekBar seekbar_pArmLR = (SeekBar) findViewById(R.id.set_param_armLR_seekBar);\n\t\tseekbar_pArmLR.setProgress(Callbacksplit.getMainActivity().param_ARM_LR);\n\t\ttext_value_pArmLR.setText(String.valueOf(Callbacksplit.getMainActivity().param_ARM_LR)+\"°\");\n\t\tseekbar_pArmLR.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onStopTrackingTouch(SeekBar seekBar) {\n\t\t\t\ttext_value_pArmLR.setText(String.valueOf(seekBar.getProgress())+\"°\");\n\t\t\t\tCallbacksplit.getMainActivity().param_ARM_LR = seekBar.getProgress();\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void onStartTrackingTouch(SeekBar seekBar) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {\n\t\t\t\ttext_value_pArmLR.setText(String.valueOf(progress)+\"°\");\n\t\t\t}\n\t\t});\n\t\t\n\t}", "void setBestScore(double bestScore);", "@Override\n public boolean setParameter(String parameterName, double value) {\n return false;\n }", "private static void input(Scanner userScn)\n {\n // Prompt\n //System.out.print(\"Degree value of polynomial? (1-4): \");\n Prompt();\n\n // Sanitation logic... .next() should catch all\n if(!userScn.hasNextInt())\n {\n userScn.next();\n Prompt();\n }\n else if((d = userScn.nextInt()) > MaxDegree || d < MinDegree) // super efficient\n {\n Prompt();\n }\n else // exits with valid input\n {\n System.out.println(\"Your polynomial degree is: \" + d);\n }\n }", "public void guessMethod(int num, Scanner sc) {\n int min = 0;\n int max = 0;\n while (true) {\n int str = checkInput(sc);\n int input = checkValue(sc, str);\n if (input != num) {\n if(input>num) {\n model.setMaxNumber(input);\n max = model.getMaxNumber();\n model.addMaxNumber();\n }else if(input<num){\n model.setMinNumber(input);\n min = model.getMinNumber();\n model.addMinNumber();\n }\n view.printMessage(View.RANGE+' '+min+'-'+max);\n } else {\n view.printMessage(View.CONGRAT);\n view.printMessage(View.STATISTIC);\n model.getStatistic();\n System.out.println(model.toString());\n break;\n }\n }\n }", "ResolvedParameterDeclaration getParam(int i);", "private void correctParameter(){\n \tint ifObtuse;\r\n \tif(initialState.v0_direction>90)ifObtuse=1;\r\n \telse ifObtuse=0;\r\n \tdouble v0=initialState.v0_val;\r\n \tdouble r0=initialState.r0_val;\r\n \tdouble sintheta2=Math.sin(Math.toRadians(initialState.v0_direction))*Math.sin(Math.toRadians(initialState.v0_direction));\r\n \tdouble eccentricityMG=Math.sqrt(center.massG*center.massG-2*center.massG*v0*v0*r0*sintheta2+v0*v0*v0*v0*r0*r0*sintheta2);\r\n \tdouble cosmiu0=-(v0*v0*r0*sintheta2-center.massG)/eccentricityMG;\r\n \tpe=(v0*v0*r0*r0*sintheta2)/(center.massG+eccentricityMG);\r\n \tap=(v0*v0*r0*r0*sintheta2)/(center.massG-eccentricityMG);\r\n \tsemimajorAxis=(ap+pe)/2;\r\n \tsemiminorAxis=Math.sqrt(ap*pe);\r\n \tsemifocallength=(ap-pe)/2;\r\n \tSystem.out.println(semimajorAxis+\",\"+semiminorAxis+\",\"+semifocallength);\r\n \teccentricity=eccentricityMG/center.massG;\r\n \tperiod=2*Math.PI*Math.sqrt(semimajorAxis*semimajorAxis*semimajorAxis/(center.massG));\r\n \trotate=(360-Math.toDegrees(Math.acos(cosmiu0)));\r\n \torbitCalculator.angleDelta=(Math.toDegrees(Math.acos(cosmiu0))+360);\r\n \trotate=rotate+initialState.r0_direction;\r\n \t\r\n \tif(ifObtuse==1) {\r\n \t\tdouble rbuf=rotate;\r\n \t\trotate=initialState.r0_direction-rotate;\r\n \t\torbitCalculator.angleDelta+=(2*rbuf-initialState.r0_direction);\r\n \t}\r\n \tfor(;;) {\r\n \t\tif(rotate>360)rotate=rotate-360;\r\n \t\telse break;\r\n \t}\r\n \tfor(;;) {\r\n \t\tif(rotate<0)rotate=rotate+360;\r\n \t\telse break;\r\n \t}\r\n \t/*\r\n \tpe=initialState.r0_val;\r\n rotate=initialState.r0_direction;\r\n ap=(initialState.v0_val*initialState.v0_val*pe*pe)/(2*center.massG-initialState.v0_val*initialState.v0_val*pe);\r\n peSpeed=initialState.v0_val;\r\n apSpeed=(2*center.massG-initialState.v0_val*initialState.v0_val*pe)/(initialState.v0_val*pe);\r\n if(ap<pe){\r\n double lf=ap;ap=pe;pe=lf;\r\n lf=apSpeed;apSpeed=peSpeed;peSpeed=lf;\r\n }\r\n semimajorAxis=(ap+pe)/2;\r\n semifocallength=(ap-pe)/2;\r\n semiminorAxis=Math.sqrt(ap*pe);\r\n eccentricity=semifocallength/semimajorAxis;\r\n period=2*Math.PI*Math.sqrt(semimajorAxis*semimajorAxis*semimajorAxis/(center.massG));*/\r\n }", "public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int primesTill = scan.nextInt();\n\n int[] arr = new int[30];\n arr[0] = 2;\n arr[1] = 3;\n arr[2] = 5;\n arr[3] = 7;\n arr[4] = 11;\n int tracker = 5;\n for(int i = 11; i <= primesTill; i = i+ 2) {\n if (i % 3 == 0)\n continue;\n if (i % 5 == 0)\n continue;\n if (i % 7 == 0)\n continue;\n if (i % 11 == 0)\n continue;\n arr[tracker] = i;\n tracker++;\n }\n\n for(int i : arr) {\n if(i == 0)\n break;\n else\n System.out.println(i);\n }\n }", "public void setParameter(String parName, Object parVal) throws HibException ;", "public static MLEPoint exhaustiveSearch(double T[]) {\n MLEPoint bestPoint = new MLEPoint(0, 0, 0, Double.NEGATIVE_INFINITY);\n\n double range = 100;\n\n // loop over the valid PIuniform values\n for (int p = 0; p < range; p++) {\n // loop over the valid mu values\n for (int m = 0; m < range; m++) {\n // loop over the valid sigma values\n for (int s = 0; s < range; s++) {\n // compute the likelihood given these model parameters\n double l = computeMleLikelihood(T, p, m, s);\n // if this model is better than the current best, save it\n if (l > bestPoint.getLikelihood()) {\n bestPoint.setMu(m);\n bestPoint.setSigma(s);\n bestPoint.setPIuni(p);\n bestPoint.setLikelihood(l);\n }\n }\n }\n }\n\n return bestPoint;\n }", "void readPepXmlSearchScan(T scan) {\n for (int i = 0; i < reader.getAttributeCount(); i++) {\n String attrib = reader.getAttributeLocalName(i);\n String val = reader.getAttributeValue(i);\n if (attrib.equalsIgnoreCase(\"start_scan\"))\n scan.setScanNumber(Integer.parseInt(val));\n else if (attrib.equalsIgnoreCase(\"precursor_neutral_mass\"))\n // NOTE: We store M+H in the database\n scan.setObservedMass(new BigDecimal(val).add(BigDecimal.valueOf(BaseAminoAcidUtils.PROTON)));\n else if (attrib.equalsIgnoreCase(\"assumed_charge\"))\n scan.setCharge(Integer.parseInt(val));\n else if (attrib.equalsIgnoreCase(\"retention_time_sec\"))\n scan.setRetentionTime(new BigDecimal(val));\n }\n }", "public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in); \r\n\t\twhile(sc.hasNext()){\r\n\t\t\tint x=sc.nextInt();\r\n\t\t\tint y=sc.nextInt();\r\n\t\t\tint result=getResult(x,y);\r\n\t\t\tSystem.out.println(result);\r\n\t\t\t\r\n\t\t}\r\n\t}", "protected void validatePreamp(int[] param) {\n }", "private void detectParkingSlot()\r\n\t{\t\t\r\n\t\tPoint PosS = new Point(0,0);\r\n\t\tPoint PosE = new Point(0,0);\r\n\t\t\r\n\t\tdouble sum_F = 0;\r\n\t\tdouble sum_B = 0;\r\n\t\t\r\n\t\tdouble distance_F = 0;\r\n\t\tdouble distance_B = 0;\r\n\t\t\r\n\t\tint SlotID = Pk_counter;\r\n\t\tINavigation.ParkingSlot.ParkingSlotStatus SlotStatus = ParkingSlotStatus.NOT_SUITABLE_FOR_PARKING;\r\n\t\t\r\n\t\tshort axe = getHeadingAxe();\r\n\t\t\r\n\t\tfor (int i = 1; i <= 4; i++)\r\n\t\t{\r\n\t\t\tPk_DIST_FS[i] = Pk_DIST_FS[i-1];\r\n\t\t\tsum_F = Pk_DIST_FS[i] + sum_F;\r\n\t\t\t\r\n\t\t\tPk_DIST_BS[i] = Pk_DIST_BS[i-1];\r\n\t\t\tsum_B = Pk_DIST_BS[i] + sum_B;\r\n\t\t}\r\n\t\t\r\n\t\tPk_DIST_FS[0] = frontSensorDistance;\r\n\t\t//distance_F = (sum_F + Pk_DIST_FS[0])/5;\r\n\t\tdistance_F = frontSensorDistance;\r\n\t\t\r\n\t\tPk_DIST_BS[0] = backSideSensorDistance;\r\n\t\t//distance_B = (sum_B + Pk_DIST_BS[0])/5;\r\n\t\tdistance_B = backSideSensorDistance;\r\n\t\t\r\n\t\t//LCD.drawString(\"Dist_F: \" + (distance_F), 0, 6);\r\n\t\t//LCD.drawString(\"Dist_B: \" + (distance_B), 0, 7);\r\n\t\t\r\n\t\t// Saving the begin point of the PS\r\n\t\tif ((distance_F <= TRSH_SG) && (Pk_burstFS == 0))\r\n\t\t{\r\n\t\t\tPk_PosF1.setLocation(this.pose.getX(), this.pose.getY());\r\n\t\t\tPk_burstFS = 1;\r\n\t\t\tPk_burstFE = 0;\r\n\t\t\t//Sound.beep();\r\n\t\t}\r\n\t\t\r\n\t\tif ((distance_B <= TRSH_SG) && (Pk_burstRS == 0))\r\n\t\t{\r\n\t\t\tPk_PosR1.setLocation(this.pose.getX(), this.pose.getY());\r\n\t\t\tPk_burstRS = 1;\r\n\t\t\tPk_burstRE = 0;\r\n\t\t\t//Sound.twoBeeps();\r\n\t\t}\r\n\t\t\t\t\r\n\t\t// Saving the end point of the PS\r\n\t\tif ((distance_F >= TRSH_SG) && (Pk_burstFE == 0))\r\n\t\t{\r\n\t\t\tPk_PosF2.setLocation(this.pose.getX(), this.pose.getY());\r\n\t\t\tPk_burstFS = 0;\r\n\t\t\tPk_burstFE = 1;\r\n\t\t\t//Sound.beep();\r\n\t\t}\r\n\t\t\r\n\t\tif ((distance_B >= TRSH_SG) && (Pk_burstRE == 0))\r\n\t\t{\r\n\t\t\tPk_PosR2.setLocation(this.pose.getX(), this.pose.getY());\r\n\t\t\tPk_burstRS = 0;\r\n\t\t\t//burstRE = 1;\r\n\t\t\t//Sound.twoBeeps();\r\n\t\t}\r\n\t\t\r\n\t\tif (Po_RoundF == 0)\t\t\t// Saving new parking slots\r\n\t\t{\t\r\n\t\t\tif ((Pk_burstRS == 0) && (Pk_burstRE == 0) && (Pk_counter < 10))\r\n\t\t\t{\r\n\t\t\t\tPosS.setLocation(((Pk_PosF1.getX() + Pk_PosR1.getX())/2), ((Pk_PosF1.getY() + Pk_PosR1.getY())/2));\r\n\t\t\t\tPosE.setLocation(((Pk_PosF2.getX() + Pk_PosR2.getX())/2), ((Pk_PosF2.getY() + Pk_PosR2.getY())/2));\r\n\t\t\t\t\r\n\t\t\t\t// Evaluation of the slot\r\n\t\t\t\tif (axe == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tif ((PosE.getX() - PosS.getX()) > LGNT_ROBOT)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSlotStatus = ParkingSlotStatus.SUITABLE_FOR_PARKING;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSlotStatus = ParkingSlotStatus.NOT_SUITABLE_FOR_PARKING;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tif ((PosE.getY() - PosS.getY()) > LGNT_ROBOT)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSlotStatus = ParkingSlotStatus.SUITABLE_FOR_PARKING;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSlotStatus = ParkingSlotStatus.NOT_SUITABLE_FOR_PARKING;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tPk_slotList[Pk_counter] = new INavigation.ParkingSlot(SlotID, PosE, PosS, SlotStatus, 0);\r\n\t\t\t\tPk_counter ++;\r\n\t\t\t\t\r\n\t\t\t\tPk_burstRE = 1;\r\n\t\t\t\t\r\n\t\t\t\tSound.beepSequence();\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\t\t\t\t\t// Updating the old slots\r\n\t\t{\r\n\t\t\tif ((Pk_burstRS == 0) && (Pk_burstRE == 0) && (Pk_update <= Pk_counter))\r\n\t\t\t{\r\n\t\t\t\tPosS.setLocation(((Pk_PosF1.getX() + Pk_PosR1.getX())/2), ((Pk_PosF1.getY() + Pk_PosR1.getY())/2));\r\n\t\t\t\tPosE.setLocation(((Pk_PosF2.getX() + Pk_PosR2.getX())/2), ((Pk_PosF2.getY() + Pk_PosR2.getY())/2));\r\n\t\t\t\t\r\n\t\t\t\t// Evaluation of the slot\r\n\t\t\t\tif (axe == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tif ((PosE.getX() - PosS.getX()) > LGNT_ROBOT)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSlotStatus = ParkingSlotStatus.SUITABLE_FOR_PARKING;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSlotStatus = ParkingSlotStatus.NOT_SUITABLE_FOR_PARKING;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tif ((PosE.getY() - PosS.getY()) > LGNT_ROBOT)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSlotStatus = ParkingSlotStatus.SUITABLE_FOR_PARKING;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSlotStatus = ParkingSlotStatus.NOT_SUITABLE_FOR_PARKING;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tPk_slotList[Pk_update] = new INavigation.ParkingSlot(SlotID, PosE, PosS, SlotStatus, 0);\r\n\t\t\t\t\r\n\t\t\t\tif (Pk_update < Pk_counter)\r\n\t\t\t\t{\r\n\t\t\t\t\tPk_update ++;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tPk_update = 0;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tPk_burstRE = 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn; // data are saved in the shared variable\r\n\t}", "public MinMaxSearch(SearchLimitingPredicate<T> slp)\t{\n\t\tthis.slp = slp;\n\t}", "public double getParam(String paramName);", "public Param getSampleParams() throws InvalidFormatException;" ]
[ "0.6065177", "0.60216695", "0.5754342", "0.57474613", "0.55530065", "0.55249196", "0.5345598", "0.5300973", "0.51308835", "0.488448", "0.48695537", "0.48440602", "0.4838881", "0.48380265", "0.48127556", "0.48038787", "0.47708684", "0.4770779", "0.4756736", "0.472619", "0.47142902", "0.47090882", "0.46610627", "0.46211284", "0.46063557", "0.45906377", "0.4586072", "0.45844015", "0.45496696", "0.45444041", "0.45412096", "0.45049864", "0.44934747", "0.44733775", "0.44689506", "0.44530955", "0.44403833", "0.4426305", "0.44216096", "0.4410869", "0.43771783", "0.4368526", "0.43569285", "0.4352484", "0.43423972", "0.43324384", "0.43296513", "0.43146315", "0.43113065", "0.43086877", "0.43059695", "0.43011186", "0.42916337", "0.4273604", "0.4273164", "0.4270036", "0.42661637", "0.42540935", "0.42496982", "0.42341894", "0.42317513", "0.42309883", "0.4226557", "0.42083234", "0.4195531", "0.4191197", "0.4188554", "0.4182411", "0.41788122", "0.41734785", "0.4168475", "0.4163988", "0.41538125", "0.41518512", "0.4151701", "0.41516206", "0.41505492", "0.41450062", "0.4140478", "0.413963", "0.4139334", "0.413052", "0.41304505", "0.41239703", "0.41161793", "0.41150475", "0.41146404", "0.41046783", "0.4103687", "0.41012478", "0.41011038", "0.41007388", "0.40922895", "0.4087289", "0.4078079", "0.4064964", "0.406453", "0.40557623", "0.405566", "0.40546882" ]
0.6813885
0
Disallow construction of this utility class.
private UserParser() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Utility() {\n throw new IllegalAccessError();\n }", "private PluginUtils() {\n\t\t//\t\tthrow new IllegalAccessError(\"Don't instantiate me. I'm a utility class!\");\n\t}", "private ClassifierUtils() {\n throw new AssertionError();\n }", "private Utility() {\n\t}", "private Utils() {\n\t}", "private Utils() {\n\t}", "private Topography()\n\t{\n\t\tthrow new IllegalStateException(\"This is an utility class, it can not be instantiated\");\n\t}", "private Utils()\n {\n // Private constructor to prevent instantiation\n }", "private Consts(){\n //this prevents even the native class from \n //calling this ctor as well :\n throw new AssertionError();\n }", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private MigrationInstantiationUtil() {\n\t\tthrow new IllegalAccessError();\n\t}", "private SystemInfo() {\r\n // forbid object construction \r\n }", "private Helper() {\r\n // do nothing\r\n }", "private SerializationUtils() {\n\t\tthrow new AssertionError();\n\t}", "private Util() { }", "private Util() {\n }", "private Util() {\n }", "private Util() {\n }", "private Utils() {\n }", "private Utils() {\n }", "private Utils() {\n }", "private Utils() {\n }", "private Utils() {\n }", "private Quantify()\n {\n throw new UnsupportedOperationException(\"Instantiation of utility classes is not supported.\");\n }", "private Util()\n {\n // Empty default ctor, defined to override access scope.\n }", "private AppUtils() {\n throw new UnsupportedOperationException(\"cannot be instantiated\");\n }", "private InterpreterDependencyChecks() {\r\n\t\t// Hides default constructor\r\n\t}", "private OSUtil()\n {\n throw new UnsupportedOperationException(\"Instantiation of utility classes is not permitted.\");\n }", "private SparkseeUtils()\n {\n /*\n * Intentionally left empty.\n */\n }", "private ContentUtil() {\n // do nothing\n }", "private CheckingTools() {\r\n super();\r\n }", "private PermissionUtil() {\n throw new IllegalStateException(\"you can't instantiate PermissionUtil!\");\n }", "private EclipsePrefUtils() {\n // Exists only to defeat instantiation.\n }", "private BuilderUtils() {}", "private InstanceUtil() {\n }", "private ATCres() {\r\n // prevent to instantiate this class\r\n }", "private NettyHttpUtil() {\n\t\t// do nothing.\n\t}", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "private MetallicityUtils() {\n\t\t\n\t}", "private ClassUtil() {}", "private SupplierLoaderUtil() {\n\t}", "private AcceleoLibrariesEclipseUtil() {\n \t\t// hides constructor\n \t}", "private S3Utils() {\n throw new UnsupportedOperationException(\"This class cannot be instantiated\");\n }", "private XMLUtil() {\n\t}", "private SnapshotUtils() {\r\n\t}", "public Utils() {}", "private UtilityKlasse() {\n\n }", "private LogUtil() {\r\n /* no-op */\r\n }", "private WolUtil() {\n }", "private Helper() {\r\n // empty\r\n }", "private RunUtils() {\n }", "private RendererUtils() {\n throw new AssertionError(R.string.assertion_utility_class_never_instantiated);\n }", "@Test( expected = IllegalStateException.class )\n\tpublic void constructorShouldNotBeInstantiable() {\n\t\tnew ReflectionUtil() {\n\t\t\t// constructor is protected\n\t\t};\n\t}", "private FunctionUtils() {\n }", "private ConfigHelper() {\n //does nothing\n }", "private XMLUtils() {\n }", "private XMLUtils()\r\n\t{\r\n\t}", "private ExampleVersion() {\n throw new UnsupportedOperationException(\"Illegal constructor call.\");\n }", "private CollectionUtils() {\n\n\t}", "private UIUtils() {\n }", "private WebXmlIo()\n {\n // Voluntarily empty constructor as utility classes should not have a public or default\n // constructor\n }", "private Instantiation(){}", "private GwtUtils() {\n }", "private NumberUtil()\n {\n\tLog.getInstance().error(\"This Class is utility class cannot be instantiated\");\n }", "private NetUtils() {\r\n\t}", "private DataProviderUtils() {\n }", "private Rekenhulp()\n\t{\n\t}", "private HabitTrackerUtils() {\n // Required empty private constructor (to prevent instantiation).\n }", "private PrefUtils() {\n }", "private UtilsCache() {\n\t\tsuper();\n\t}", "private ClipboardUtils() {\n //EMPTY\n }", "public ObjectUtils() {\n super();\n }", "private SerializerFactory() {\n // do nothing\n }", "private JacobUtils() {}", "private FeedbackUtils() {\n }", "private JsonUtils() {\n\t\tsuper();\n\t}", "private CollectionUtils() {\n\t\tthrow new UnsupportedOperationException();\n\t}", "private ExplorerFileSystemUtils() {\n // no op\n }", "private XmlFactory() {\r\n /* no-op */\r\n }", "protected VboUtil() {\n }", "public Utils() {\n }", "private Example() {\n\t\tthrow new Error(\"no instantiation is permitted\");\n\t}", "private NullSafe()\n {\n super();\n }", "Reproducible newInstance();", "private ReportGenerationUtil() {\n\t\t\n\t}", "private FlowExecutorUtils()\r\n {\r\n // Private constructor to prevent instantiation\r\n }", "private GuiUtils()\r\n {\r\n // Private constructor to prevent instantiation\r\n }", "private WinRateHelper() {\n throw new AssertionError();\n }", "private DocumentBuilderHelper() {\n }", "private ClassificationSettings() {\n throw new AssertionError();\n }", "private XmlUtil() {\n }", "private BeanUtils() {\n\t\t\n\t}", "private ThreadUtil() {\n throw new UnsupportedOperationException(\"This class is non-instantiable\"); //$NON-NLS-1$\n }", "private PropertiesUtilis() {\n throw new UnsupportedOperationException(\"PropertiesUtilis instantiation\" + \n \"not allowed !\");\n }", "private PuzzleConstants() {\n // not called\n }", "private Validations() {\n\t\tthrow new IllegalAccessError(\"Shouldn't be instantiated.\");\n\t}", "private ReflectionUtil()\n {\n }", "private QcTestRunner()\n\t{\n\t\t// To prevent external instantiation of this class\n\t}" ]
[ "0.7776357", "0.7601009", "0.7553566", "0.75509214", "0.7500789", "0.7500789", "0.74677193", "0.7409863", "0.7406701", "0.73761624", "0.73761624", "0.73761624", "0.73761624", "0.73646915", "0.73575175", "0.7357186", "0.7330943", "0.73291206", "0.7326762", "0.7324111", "0.7324111", "0.73093903", "0.73093903", "0.73093903", "0.73093903", "0.73093903", "0.7284752", "0.72690266", "0.72638226", "0.7190358", "0.71790475", "0.71706206", "0.7164377", "0.71528924", "0.71499056", "0.7143215", "0.7122625", "0.7100586", "0.70986813", "0.70842355", "0.7066981", "0.7062941", "0.7040919", "0.70154816", "0.69880635", "0.69770986", "0.6969662", "0.6932341", "0.6901683", "0.6891923", "0.6886341", "0.6884676", "0.6883715", "0.6867903", "0.68609905", "0.68563837", "0.6852507", "0.68433994", "0.68413657", "0.6835289", "0.6827848", "0.68141276", "0.67946506", "0.6794294", "0.6792914", "0.67906284", "0.67817366", "0.6780735", "0.67796606", "0.67701155", "0.6759335", "0.6751385", "0.6746898", "0.6743732", "0.6742187", "0.6739979", "0.6736644", "0.67226696", "0.67205805", "0.6719", "0.6704453", "0.6700919", "0.669396", "0.6689382", "0.6687664", "0.6679806", "0.6678153", "0.6675428", "0.66716176", "0.66698635", "0.6664995", "0.6663093", "0.66623896", "0.6657882", "0.6652253", "0.66515934", "0.6643476", "0.6640634", "0.6625249", "0.66220075", "0.6612057" ]
0.0
-1
TODO Autogenerated method stub
@Override protected Object clone() throws CloneNotSupportedException { Employee eClone = (Employee) super.clone(); eClone.setDeparment((Deparment) eClone.getDeparment().clone()); return eClone; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table address_min_balance
int insert(AddressMinBalanceBean record);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object getMinimumBalance() {\n\treturn null;\n}", "int insertSelective(AddressMinBalanceBean record);", "public void setMinAmount(int min) {\n _min = min;\n }", "public M csmiMemberIdMin(Object min){this.put(\"csmiMemberIdMin\", min);return this;}", "public void setminimumBalance(double parseDouble) {\n\t\n}", "public int getMinAmount() {\n return _min;\n }", "public int getMinAmount() {\n return minAmount;\n }", "@Override\r\n\tpublic double checkBalance(String mobileNo) {\n\t\tCustomer custCheckBalance = custMap.get(mobileNo);\r\n\t\tdouble amount = custCheckBalance.getInitialBalance();\r\n\t\treturn amount;\r\n\t}", "public void setMin(BigDecimal min, boolean inclusive) {\n this.min = min;\n this.inclusive = inclusive;\n }", "@Override\n\tpublic double queryBalance(int accNo) {\n\t\treturn 0;\n\t}", "public abstract double costPerMin (CallZone zone);", "public void setMinWithdrawal(double minWithdrawal) {\n\t\tthis.minWithdrawal = minWithdrawal;\n\t}", "public DecimalMinValidator(BigDecimal min) {\n this.min = min;\n }", "public M csmiIdMin(Object min){this.put(\"csmiIdMin\", min);return this;}", "BigDecimal getOpeningDebitBalance();", "BigDecimal getOpeningDebitBalance();", "public LookupAccountTransactions minRound(Long minRound) {\n addQuery(\"min-round\", String.valueOf(minRound));\n return this;\n }", "org.apache.xmlbeans.XmlDecimal xgetSingleBetMinimum();", "public void setMinQuantity(BigDecimal minQuantity) {\n this._minQuantity = minQuantity;\n }", "BigDecimal getOpeningCreditBalance();", "BigDecimal getOpeningCreditBalance();", "public M csmiPlaceMin(Object min){this.put(\"csmiPlaceMin\", min);return this;}", "public void minimum()\n\t{\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tif(rowTick[i]==8888)\n\t\t\t{\n\t\t\t\tfor(int j=0;j<n;j++)\n\t\t\t\t{\n\t\t\t\t\tif(columnTick[j]==0)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(cost[i][j]<min)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmin=cost[i][j];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "java.math.BigDecimal getSingleBetMinimum();", "public Money getTotalBalance();", "public M csmiStatusMin(Object min){this.put(\"csmiStatusMin\", min);return this;}", "public BigDecimal getMinQuantity() {\n return _minQuantity;\n }", "public FeeAccount (double minimumBalance, double transactionFee)\n {\n this.minimumBalance = minimumBalance;\n this.transactionFee = transactionFee;\n }", "public void lowCredit(){\n if (getBalance() < minAmount){\n System.out.println(\"Your current account is running low on credit\");\n }\n }", "public Balance() {\r\n value = BigDecimal.ZERO;\r\n }", "public int balup(double newbalance, Long accountno, Long broaccno, Double bramt) throws Exception{\n\tint j=DbConnect.getStatement().executeUpdate(\"update account set balance=\"+newbalance+\" where accno=\"+accountno+\"\");\r\n\tint i=DbConnect.getStatement().executeUpdate(\"update account set balance=balance+\"+bramt+\" where accno=\"+broaccno+\"\");\r\n\treturn i;\r\n}", "void setSingleBetMinimum(java.math.BigDecimal singleBetMinimum);", "public double getBalance()\n {\n return startingBalance;\n }", "public BSTMapNode findMin() \n\t{\n\t\t\n\t\t\n\t\treturn null;\n\t}", "List<Account> findByAddressStartingWith(String startAddress);", "public DecimalMinValidator(BigDecimal min, String message) {\n this.min = min;\n this.message = message;\n }", "public void validateMinBid(String value){\n boolean isValid = validateBidPrice(value);\n setMinBidValid(isValid);\n }", "double getBalance();", "double getBalance();", "@Select({\n \"select\",\n \"code, statistic_code, periods, line_code, material_type, element_type, material_requisitions, \",\n \"current_goods_in_process, last_goods_in_process, product_storage, intermediate_products_variation, \",\n \"unit_consumption\",\n \"from cost_accounting_statistic_by_line_detail\",\n \"where code = #{code,jdbcType=BIGINT}\"\n })\n @ResultMap(\"BaseResultMap\")\n CostAccountingStatisticByLineDetail selectByPrimaryKey(Long code);", "public double getInitialBalance() {\n return initialBalance;\n }", "public int getPropertyBalance();", "public GiftCardProductQuery openAmountMin() {\n startField(\"open_amount_min\");\n\n return this;\n }", "org.apache.xmlbeans.XmlDecimal xgetWagerMinimum();", "@Override\r\n\tpublic double showbalanceDao() {\n\t\t\r\n\t\treturn temp.getCustBal();\r\n\t}", "@ApiModelProperty(example = \"1\", value = \"The minimum billing period in month authorized for this offer.\")\n public Integer getMinBillingPeriodInMonths() {\n return minBillingPeriodInMonths;\n }", "java.math.BigDecimal getMultipleBetMinimum();", "private void listBalances() {\n\t\t\r\n\t}", "public PrimEdge calculateMinimum() {\n int minWage = Integer.MAX_VALUE;\n PrimEdge result = null;\n for (Map.Entry<Integer, PrimEdge> entry : dtable.entrySet()) {\n if (entry.getValue().getWage() < minWage) {\n result = entry.getValue();\n minWage = entry.getValue().getWage();\n }\n }\n return result;\n }", "public void setBalanceBonus(BigDecimal balanceBonus) {\n this.balanceBonus = balanceBonus;\n }", "public BankAccount(String accountName, int balance) {\n this.accountName = accountName;\n this.balance = balance;\n this.valueDeposits = balance;\n this.valueWithdrawals = 0;\n this.maximumBalance = balance;\n this.minimumBalance = balance;\n }", "public void wire(String accountNumber,int bankNumber, String toAccountNumber, int amount) {\n\t\t\n\t\tConnection conn;\n\t\tPreparedStatement ps, pp, ll, lp, ls, mm, nn;\n\t\tString url = \"jdbc:mysql://localhost:3306/mars\";\n\t\tString username = \"root\";\n\t\tString password = \"1113\";\n\t\tint lastBalance;\n\t\tint tolastBalance;\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\ttry{\n\t\tconn=DriverManager.getConnection(url, username, password);\n\t\tString sql = \"select balance,userId from \"+this.name+\" where accountNumber=?\";\n\t\tps= (PreparedStatement) conn.prepareStatement(sql);\n\t\tps.setString(1, accountNumber.toString());\n\t\tResultSet rs = ps.executeQuery();\n\t\tint nowBalance = 0;\n\t\tString id = \"\";\n\t\twhile(rs.next()) { \n\t\t\tnowBalance=rs.getInt(\"balance\");\n\t\t\tid = rs.getString(\"userId\");\n\t\t}\n\t\tif (nowBalance<amount) {\n\t\t\tSystem.out.println(\"No Balance\");\n\t\t\treturn;\n\t\t}\n\t\tlastBalance = nowBalance - amount;\n\t\t//System.out.println(lastBalance);\n\t\tString sql1 = \"UPDATE \"+this.name+\" SET balance=? where accountNumber=?\";\n\t\tls = (PreparedStatement) conn.prepareStatement(sql1);\n\t\tls.setInt(1, lastBalance);\n\t\tls.setString(2, accountNumber.toString());\n\t\tls.executeUpdate();\n\t\t\n\t\t\n\t\t\n\t\t//to account\n\t\tconn=DriverManager.getConnection(url, username, password);\n\t\tString sql3 = \"select bankName from bank where bankNumber=?\";\n\t\tll= (PreparedStatement) conn.prepareStatement(sql3);\n\t\tll.setString(1, String.valueOf(bankNumber).toString());\n\t\tResultSet rs3 = ll.executeQuery();\n\t\tString toname = \"\";\n\t\twhile(rs3.next()) { \n\t\t\ttoname=rs3.getString(\"bankName\");\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tString sql4 = \"select balance,userId from \"+toname+\" where accountNumber=?\";\n\t\tpp= (PreparedStatement) conn.prepareStatement(sql4);\n\t\tpp.setString(1, accountNumber.toString());\n\t\tResultSet rs4 = pp.executeQuery();\n\t\tint tonowBalance = 0;\n\t\tString toid = \"\";\n\t\twhile(rs4.next()) { \n\t\t\ttonowBalance=rs4.getInt(\"balance\");\n\t\t\ttoid = rs4.getString(\"userId\");\n\t\t}\n\t\t\n\t\ttolastBalance = tonowBalance + amount;\n\t\t//System.out.println(lastBalance);\n\t\tString sql5 = \"UPDATE \"+toname+\" SET balance=? where accountNumber=?\";\n\t\tlp = (PreparedStatement) conn.prepareStatement(sql5);\n\t\tlp.setInt(1, tolastBalance);\n\t\tlp.setString(2, toAccountNumber.toString());\n\t\tlp.executeUpdate();\n\t\t\n\t\t\n\t\t//log\n\t\tString logs = \"wired : \"+ amount+\" to \"+toAccountNumber+\"/ balance: \"+String.valueOf(lastBalance);\n\t\tString sql11 = \"insert into \"+id+\" (log) values (?)\";\n\t\tmm = (PreparedStatement) conn.prepareStatement(sql11);\n\t\tmm.setString(1, logs);\n\t\tmm.executeUpdate();\n\t\tSystem.out.println(\"You wired $\"+String.valueOf(amount));\n\t\t\n\t\tString logs1 = \"get : \"+ amount+\" from \" +accountNumber+ \"/ balance: \"+String.valueOf(tolastBalance);\n\t\tString sql12 = \"insert into \"+toid+\" (log) values (?)\";\n\t\tnn = (PreparedStatement) conn.prepareStatement(sql12);\n\t\tnn.setString(1, logs1);\n\t\tnn.executeUpdate();\n\t\tSystem.out.println(\"You got $\"+String.valueOf(amount));\n\t\t\n\t\t\n\t\t}catch (SQLException e) {\n\t\t throw new IllegalStateException(\"Cannot connect the database!\", e);\n\t\t}\n\t}", "public void setBalanceLowGate(int value) {\r\n this.balanceLowGate = value;\r\n }", "@Override\n\tpublic double getAccountBalance(final int bankAccountId, final String vcDate, final Connection connection)\n\t{\n\t\tdouble opeAvailable = 0, totalAvailable = 0;\n\t\ttry {\n\n\t\t\tfinal StringBuilder str = new StringBuilder(\"SELECT case when sum(openingDebitBalance) = null then 0\")\n\t\t\t\t\t.append(\" ELSE sum(openingDebitBalance) end - case when sum(openingCreditBalance) = null then 0\")\n\t\t\t\t\t.append(\" else sum(openingCreditBalance) end AS \\\"openingBalance\\\" \")\n\t\t\t\t\t.append(\"FROM transactionSummary WHERE financialYearId=( SELECT id FROM financialYear WHERE startingDate <= ?\")\n\t\t\t\t\t.append(\"AND endingDate >= ?) AND glCodeId =(select glcodeid from bankaccount where id= ?)\");\n\t\t\tif (LOGGER.isInfoEnabled())\n\t\t\t\tLOGGER.info(str);\n\t\t\tQuery pst = persistenceService.getSession().createSQLQuery(str.toString());\n\t\t\tpst.setString(0, vcDate);\n\t\t\tpst.setString(1, vcDate);\n\t\t\tpst.setInteger(2, bankAccountId);\n\t\t\tList<Object[]> rset = pst.list();\n\t\t\tfor (final Object[] element : rset)\n\t\t\t\topeAvailable = Double.parseDouble(element[0].toString());\n\t\t\tif (LOGGER.isInfoEnabled())\n\t\t\t\tLOGGER.info(\"opening balance \" + opeAvailable);\n\n\t\t\tfinal StringBuilder str1 = new StringBuilder(\"SELECT (case when sum(gl.debitAmount) = null then 0\")\n\t\t\t\t\t.append(\" else sum(gl.debitAmount) end - case when sum(gl.creditAmount) = null then 0\")\n\t\t\t\t\t.append(\" else sum(gl.creditAmount) end) + \").append(opeAvailable).append(\"\")\n\t\t\t\t\t.append(\" as \\\"totalAmount\\\" FROM generalLedger gl, voucherHeader vh WHERE vh.id = gl.voucherHeaderId\")\n\t\t\t\t\t.append(\" AND gl.glCodeid = (select glcodeid from bankaccount where id= ?) AND \")\n\t\t\t\t\t.append(\" vh.voucherDate >=( SELECT TO_CHAR(startingDate, 'dd-Mon-yyyy')\")\n\t\t\t\t\t.append(\" FROM financialYear WHERE startingDate <= ? AND endingDate >= ?) AND vh.voucherDate <= ?\");\n\t\t\tif (LOGGER.isInfoEnabled())\n\t\t\t\tLOGGER.info(str1);\n\t\t\tpst = persistenceService.getSession().createSQLQuery(str1.toString());\n\t\t\tpst.setInteger(0, bankAccountId);\n\t\t\tpst.setString(1, vcDate);\n\t\t\tpst.setString(2, vcDate);\n\t\t\tpst.setString(3, vcDate);\n\t\t\trset = pst.list();\n\t\t\tfor (final Object[] element : rset) {\n\t\t\t\ttotalAvailable = Double.parseDouble(element[0].toString());\n\t\t\t\tif (LOGGER.isInfoEnabled())\n\t\t\t\t\tLOGGER.info(\"total balance \" + totalAvailable);\n\t\t\t}\n\n\t\t} catch (final HibernateException e) {\n\t\t\tLOGGER.error(\" could not get Bankbalance \" + e.toString(), e);\n\t\t\tthrow new HibernateException(e.toString());\n\t\t}\n\t\treturn totalAvailable;\n\t}", "public BaseJson<BigDecimal> wallet_balance() throws Exception {\n String s = main(\"wallet_balance\",\"[]\");\n return JsonHelper.jsonStr2Obj(s, BaseJson.class);\n }", "public void setMin(int min) {\n this.min = min;\n }", "public void setMin(int min) {\n this.min = min;\n }", "public double getMinWithdrawal() {\n\t\treturn minWithdrawal;\n\t}", "double getBalance(UUID name);", "Balance[] findAllByBankAccount_Id(Long id);", "public int baldown(double newbalance, Long accountno, Long broaccno, Double bramt) throws Exception{\n\tint j=DbConnect.getStatement().executeUpdate(\"update account set balance=\"+newbalance+\" where accno=\"+accountno+\"\");\r\n\tint i=DbConnect.getStatement().executeUpdate(\"update account set balance=balance+\"+bramt+\" where accno=\"+broaccno+\"\");\r\n\treturn i;\r\n}", "public void setInitialBalance(double value) {\n this.initialBalance = value;\n }", "@Override\r\n public Integer minLowerBound() {\r\n return this.getImpl().minLowerBound();\r\n }", "public Saving(Money balance, AccountHolder primaryOwner, String secretKey, Money minimumBalance, BigDecimal interestRate, Status status) {\n super(balance, primaryOwner);\n setUpdateDate(LocalDate.now());\n setSecretKey(secretKey);\n setMinimumBalance(minimumBalance);\n setInterestRate(interestRate);\n setStatus(status);\n }", "java.math.BigDecimal getWagerMinimum();", "public int[][] minCost(int[][] inputMatrix) {\n\t\tint[][] toReturn = new int[inputMatrix.length][inputMatrix.length];\n\t\tfor (int j = 0; j < inputMatrix.length; j++) {\n\t\t\ttoReturn[0][j] = inputMatrix[0][j];\n\t\t\ttoReturn[j][0] = inputMatrix[0][0];\n\t\t}\n\t\tint i;\n\t\tfor (int j = 1; j < inputMatrix.length; j++) {\n\t\t\tfor (i = 1; i < inputMatrix.length; i++) {\n\t\t\t\tif (inputMatrix[i][j] == 0) {\n\t\t\t\t\ttoReturn[i][j] = toReturn[i - 1][j];\n\t\t\t\t} else {\n\t\t\t\t\ttoReturn[i][j] = Math.min(toReturn[i - 1][j], (toReturn[i][j - 1] + inputMatrix[i][j]));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn toReturn;\n\t}", "int min() {\n return min;\r\n }", "List<AccountDetail> findAllByAddressStartingWith(String address);", "public int getMinColumn();", "public BigDecimal getBalanceBonus() {\n return balanceBonus;\n }", "@Select({\r\n \"select\",\r\n \"contract_address_id, contract_address, contract_type, contract_state, contract_num, \",\r\n \"chain_status, chain_trans_hash, create_time\",\r\n \"from cwv_game_contract_address\",\r\n \"where contract_address_id = #{contractAddressId,jdbcType=INTEGER}\"\r\n })\r\n @Results({\r\n @Result(column=\"contract_address_id\", property=\"contractAddressId\", jdbcType=JdbcType.INTEGER, id=true),\r\n @Result(column=\"contract_address\", property=\"contractAddress\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"contract_type\", property=\"contractType\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"contract_state\", property=\"contractState\", jdbcType=JdbcType.CHAR),\r\n @Result(column=\"contract_num\", property=\"contractNum\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"chain_status\", property=\"chainStatus\", jdbcType=JdbcType.TINYINT),\r\n @Result(column=\"chain_trans_hash\", property=\"chainTransHash\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"create_time\", property=\"createTime\", jdbcType=JdbcType.TIMESTAMP)\r\n })\r\n CWVGameContractAddress selectByPrimaryKey(CWVGameContractAddressKey key);", "@Test\n public void testMin()\n {\n example.insert(6);\n example.insert(12);\n example.insert(3);\n example.insert(0);\n example.insert(10);\n assertEquals(\"0\", example.findMin().toString());\n }", "public Account(int id, double initialBalance){\n\t\tthis.id = id;\n\t\tbalance = initialBalance;\n\t\tdateCreated = new Date();\n\t}", "private static int minCoins_bottom_up_dynamic_approach(int[] coins, int amount) {\n if (coins == null || coins.length == 0) return 0;\n if (amount < 0) return 0;\n\n int memo[][] = new int[coins.length + 1][amount + 1];\n\n // populate first row\n for (int col = 0; col <= amount; col++) {\n memo[0][col] = 0;// Important. always initialize 1st row with 1s\n }\n\n // populate first col\n for (int row = 0; row < coins.length; row++) {\n memo[row][0] = 0;// Important. initialize 1st col with 1s or 0s as per your need as explained in method comment\n }\n\n /*\n populate second row\n\n if amount(col) <= coin value, then one coin is required with that value to make that amount\n if amount(col) > coin value, then\n total coins required = amount/coin_value, if remainder=0, otherwise amount/coin_value+1\n */\n for (int col = 1; col <= amount; col++) {\n if (col <= coins[0]) {\n memo[1][col] = 1;\n } else {\n int quotient = col / coins[0];\n\n memo[1][col] = quotient;\n\n int remainder = col % coins[0];\n if (remainder > 0) {\n memo[1][col] += 1;\n }\n }\n }\n\n // start iterating from second row\n for (int row = 2; row < memo.length; row++) {\n // start iterating from second col\n for (int col = 1; col < memo[row].length; col++) {\n\n int coin = coins[row - 1];\n\n // formula to find min required coins for an amount at memo[row][col]\n if (coin > col) { // if coin_value > amount\n memo[row][col] = memo[row - 1][col]; // reserve prev row's value (value determined for prev coins)\n } else {\n memo[row][col] = Math.min(memo[row - 1][col], memo[row][col - coin]) + 1; // min(value determined by prev coins - prev row, value at amount=current_amount-coin_value) + 1\n }\n }\n }\n\n printMemo(coins, memo);\n\n return memo[memo.length - 1][memo[0].length - 1]; // final value is stored in last cell\n }", "private double getMinNumber(ArrayList<Double> provinceValues)\n {\n Double min = 999999999.0;\n\n for (Double type : provinceValues)\n {\n if (type < min)\n {\n min = type;\n }\n }\n return min;\n }", "public BankAccount() {\r\n\t\tbalance=0;\r\n\t\t\r\n\t}", "@Override\n public Long getMin() {\n return min;\n }", "public abstract int getMinimumValue();", "public void setBalance(BigDecimal balance) {\n this.balance = balance;\n }", "public void setBalance(BigDecimal balance) {\n this.balance = balance;\n }", "@Override\n\tpublic int getBalanceToCustomer(String customerId) {\n\t\treturn 0;\n\t}", "public void setMinEdad(int min);", "private void updateDatabaseAccountBalance() {\n\t\tString sql = \"UPDATE account SET balance = \" + this.balance + \" \";\n\t\tsql += \"WHERE accountID = '\" + this.accountID + \"';\";\n\n\t\tDbUtilities db = new MySqlUtilities();\n\t\tdb.executeQuery(sql);\n\t}", "public Saving(Money balance, AccountHolder primaryOwner, AccountHolder secondaryOwner, String secretKey, Money minimumBalance, BigDecimal interestRate, Status status) {\n super(balance, primaryOwner, secondaryOwner);\n setUpdateDate(LocalDate.now());\n setSecretKey(secretKey);\n setMinimumBalance(minimumBalance);\n setInterestRate(interestRate);\n setStatus(status);\n }", "private double getCustomerMinAvailability(final DatacenterBroker broker) {\n return contractsMap.get(broker).getAvailabilityMetric().getMinDimension().getValue();\n\n }", "BigInteger getSmallestBlockNumber(@Param(\"tableName\") String tableName);", "public int getBalance() {\n return this.balance;\n\n }", "public BigDecimal getBALLOON_AMOUNT() {\r\n return BALLOON_AMOUNT;\r\n }", "public BigDecimal getBALLOON_AMOUNT() {\r\n return BALLOON_AMOUNT;\r\n }", "@Override\n public List<Employee> getEmployeePositiveBalance() {\n return employeeRepository\n .readEmployee()\n .stream()\n .filter(employee -> employee.getBalance() > 0)\n .collect(Collectors.toList())\n ;\n }", "BigDecimal getLowPrice();", "public ResultSet retBalance(Long userid) throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"Select balance from account where accno=\"+userid+\"\");\r\n\treturn rs;\r\n}", "@Override public int conocerMonto(){\n\treturn 120;\n }", "public BankAccount(double initialBalance) {\r\n\t\tbalance=initialBalance;\r\n\t}", "@Override\n public String onMinChange(long min) {\n return null;\n }", "public StoneBalanceExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public void setBalance(double balance)\n {\n startingBalance = balance;\n }", "default Gwei get_total_active_balance(BeaconState state) {\n return get_total_balance(state,\n get_active_validator_indices(state, get_current_epoch(state)));\n }", "void setWagerMinimum(java.math.BigDecimal wagerMinimum);", "public void enablePropertyBalance()\n {\n iPropertyBalance = new PropertyInt(new ParameterInt(\"Balance\"));\n addProperty(iPropertyBalance);\n }" ]
[ "0.60982156", "0.5928122", "0.5513083", "0.53418916", "0.5278522", "0.5255081", "0.51708925", "0.51707053", "0.5148263", "0.50680494", "0.5056196", "0.50482297", "0.5041446", "0.50261897", "0.50162363", "0.50162363", "0.50061417", "0.5001575", "0.49988028", "0.49870795", "0.49870795", "0.49747786", "0.49634096", "0.49287158", "0.48978427", "0.4896968", "0.48936924", "0.4860607", "0.48459637", "0.4841777", "0.4818163", "0.4813114", "0.47875464", "0.4781725", "0.47665113", "0.47515953", "0.47509003", "0.47378448", "0.47378448", "0.47291327", "0.47273737", "0.4726398", "0.47214794", "0.47152257", "0.4714301", "0.4707948", "0.46949643", "0.4694413", "0.46821132", "0.46709567", "0.46564776", "0.46542886", "0.4647347", "0.46453607", "0.4638734", "0.4625379", "0.4625379", "0.4621993", "0.4616885", "0.46055895", "0.45980027", "0.4595982", "0.45934024", "0.4591101", "0.45877102", "0.45841262", "0.45693272", "0.45526245", "0.45467615", "0.45438313", "0.45423117", "0.45392174", "0.45329067", "0.45325574", "0.4529992", "0.45288086", "0.45286077", "0.45217735", "0.45176172", "0.45176172", "0.4514378", "0.45131665", "0.45083207", "0.4504655", "0.45035487", "0.4498132", "0.449711", "0.4495478", "0.4495478", "0.44948724", "0.44913542", "0.4491323", "0.4489825", "0.44859236", "0.4485533", "0.44839466", "0.44757348", "0.44736332", "0.4472029", "0.4469128" ]
0.5707455
2
This method was generated by MyBatis Generator. This method corresponds to the database table address_min_balance
int insertSelective(AddressMinBalanceBean record);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object getMinimumBalance() {\n\treturn null;\n}", "int insert(AddressMinBalanceBean record);", "public void setMinAmount(int min) {\n _min = min;\n }", "public M csmiMemberIdMin(Object min){this.put(\"csmiMemberIdMin\", min);return this;}", "public void setminimumBalance(double parseDouble) {\n\t\n}", "public int getMinAmount() {\n return _min;\n }", "public int getMinAmount() {\n return minAmount;\n }", "@Override\r\n\tpublic double checkBalance(String mobileNo) {\n\t\tCustomer custCheckBalance = custMap.get(mobileNo);\r\n\t\tdouble amount = custCheckBalance.getInitialBalance();\r\n\t\treturn amount;\r\n\t}", "public void setMin(BigDecimal min, boolean inclusive) {\n this.min = min;\n this.inclusive = inclusive;\n }", "@Override\n\tpublic double queryBalance(int accNo) {\n\t\treturn 0;\n\t}", "public abstract double costPerMin (CallZone zone);", "public void setMinWithdrawal(double minWithdrawal) {\n\t\tthis.minWithdrawal = minWithdrawal;\n\t}", "public DecimalMinValidator(BigDecimal min) {\n this.min = min;\n }", "public M csmiIdMin(Object min){this.put(\"csmiIdMin\", min);return this;}", "BigDecimal getOpeningDebitBalance();", "BigDecimal getOpeningDebitBalance();", "public LookupAccountTransactions minRound(Long minRound) {\n addQuery(\"min-round\", String.valueOf(minRound));\n return this;\n }", "org.apache.xmlbeans.XmlDecimal xgetSingleBetMinimum();", "public void setMinQuantity(BigDecimal minQuantity) {\n this._minQuantity = minQuantity;\n }", "BigDecimal getOpeningCreditBalance();", "BigDecimal getOpeningCreditBalance();", "public M csmiPlaceMin(Object min){this.put(\"csmiPlaceMin\", min);return this;}", "public void minimum()\n\t{\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tif(rowTick[i]==8888)\n\t\t\t{\n\t\t\t\tfor(int j=0;j<n;j++)\n\t\t\t\t{\n\t\t\t\t\tif(columnTick[j]==0)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(cost[i][j]<min)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmin=cost[i][j];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "java.math.BigDecimal getSingleBetMinimum();", "public M csmiStatusMin(Object min){this.put(\"csmiStatusMin\", min);return this;}", "public Money getTotalBalance();", "public BigDecimal getMinQuantity() {\n return _minQuantity;\n }", "public FeeAccount (double minimumBalance, double transactionFee)\n {\n this.minimumBalance = minimumBalance;\n this.transactionFee = transactionFee;\n }", "public void lowCredit(){\n if (getBalance() < minAmount){\n System.out.println(\"Your current account is running low on credit\");\n }\n }", "public Balance() {\r\n value = BigDecimal.ZERO;\r\n }", "public int balup(double newbalance, Long accountno, Long broaccno, Double bramt) throws Exception{\n\tint j=DbConnect.getStatement().executeUpdate(\"update account set balance=\"+newbalance+\" where accno=\"+accountno+\"\");\r\n\tint i=DbConnect.getStatement().executeUpdate(\"update account set balance=balance+\"+bramt+\" where accno=\"+broaccno+\"\");\r\n\treturn i;\r\n}", "void setSingleBetMinimum(java.math.BigDecimal singleBetMinimum);", "public double getBalance()\n {\n return startingBalance;\n }", "public BSTMapNode findMin() \n\t{\n\t\t\n\t\t\n\t\treturn null;\n\t}", "List<Account> findByAddressStartingWith(String startAddress);", "public DecimalMinValidator(BigDecimal min, String message) {\n this.min = min;\n this.message = message;\n }", "public void validateMinBid(String value){\n boolean isValid = validateBidPrice(value);\n setMinBidValid(isValid);\n }", "double getBalance();", "double getBalance();", "@Select({\n \"select\",\n \"code, statistic_code, periods, line_code, material_type, element_type, material_requisitions, \",\n \"current_goods_in_process, last_goods_in_process, product_storage, intermediate_products_variation, \",\n \"unit_consumption\",\n \"from cost_accounting_statistic_by_line_detail\",\n \"where code = #{code,jdbcType=BIGINT}\"\n })\n @ResultMap(\"BaseResultMap\")\n CostAccountingStatisticByLineDetail selectByPrimaryKey(Long code);", "public double getInitialBalance() {\n return initialBalance;\n }", "public int getPropertyBalance();", "public GiftCardProductQuery openAmountMin() {\n startField(\"open_amount_min\");\n\n return this;\n }", "org.apache.xmlbeans.XmlDecimal xgetWagerMinimum();", "@Override\r\n\tpublic double showbalanceDao() {\n\t\t\r\n\t\treturn temp.getCustBal();\r\n\t}", "@ApiModelProperty(example = \"1\", value = \"The minimum billing period in month authorized for this offer.\")\n public Integer getMinBillingPeriodInMonths() {\n return minBillingPeriodInMonths;\n }", "java.math.BigDecimal getMultipleBetMinimum();", "private void listBalances() {\n\t\t\r\n\t}", "public PrimEdge calculateMinimum() {\n int minWage = Integer.MAX_VALUE;\n PrimEdge result = null;\n for (Map.Entry<Integer, PrimEdge> entry : dtable.entrySet()) {\n if (entry.getValue().getWage() < minWage) {\n result = entry.getValue();\n minWage = entry.getValue().getWage();\n }\n }\n return result;\n }", "public void setBalanceBonus(BigDecimal balanceBonus) {\n this.balanceBonus = balanceBonus;\n }", "public BankAccount(String accountName, int balance) {\n this.accountName = accountName;\n this.balance = balance;\n this.valueDeposits = balance;\n this.valueWithdrawals = 0;\n this.maximumBalance = balance;\n this.minimumBalance = balance;\n }", "public void wire(String accountNumber,int bankNumber, String toAccountNumber, int amount) {\n\t\t\n\t\tConnection conn;\n\t\tPreparedStatement ps, pp, ll, lp, ls, mm, nn;\n\t\tString url = \"jdbc:mysql://localhost:3306/mars\";\n\t\tString username = \"root\";\n\t\tString password = \"1113\";\n\t\tint lastBalance;\n\t\tint tolastBalance;\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\ttry{\n\t\tconn=DriverManager.getConnection(url, username, password);\n\t\tString sql = \"select balance,userId from \"+this.name+\" where accountNumber=?\";\n\t\tps= (PreparedStatement) conn.prepareStatement(sql);\n\t\tps.setString(1, accountNumber.toString());\n\t\tResultSet rs = ps.executeQuery();\n\t\tint nowBalance = 0;\n\t\tString id = \"\";\n\t\twhile(rs.next()) { \n\t\t\tnowBalance=rs.getInt(\"balance\");\n\t\t\tid = rs.getString(\"userId\");\n\t\t}\n\t\tif (nowBalance<amount) {\n\t\t\tSystem.out.println(\"No Balance\");\n\t\t\treturn;\n\t\t}\n\t\tlastBalance = nowBalance - amount;\n\t\t//System.out.println(lastBalance);\n\t\tString sql1 = \"UPDATE \"+this.name+\" SET balance=? where accountNumber=?\";\n\t\tls = (PreparedStatement) conn.prepareStatement(sql1);\n\t\tls.setInt(1, lastBalance);\n\t\tls.setString(2, accountNumber.toString());\n\t\tls.executeUpdate();\n\t\t\n\t\t\n\t\t\n\t\t//to account\n\t\tconn=DriverManager.getConnection(url, username, password);\n\t\tString sql3 = \"select bankName from bank where bankNumber=?\";\n\t\tll= (PreparedStatement) conn.prepareStatement(sql3);\n\t\tll.setString(1, String.valueOf(bankNumber).toString());\n\t\tResultSet rs3 = ll.executeQuery();\n\t\tString toname = \"\";\n\t\twhile(rs3.next()) { \n\t\t\ttoname=rs3.getString(\"bankName\");\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tString sql4 = \"select balance,userId from \"+toname+\" where accountNumber=?\";\n\t\tpp= (PreparedStatement) conn.prepareStatement(sql4);\n\t\tpp.setString(1, accountNumber.toString());\n\t\tResultSet rs4 = pp.executeQuery();\n\t\tint tonowBalance = 0;\n\t\tString toid = \"\";\n\t\twhile(rs4.next()) { \n\t\t\ttonowBalance=rs4.getInt(\"balance\");\n\t\t\ttoid = rs4.getString(\"userId\");\n\t\t}\n\t\t\n\t\ttolastBalance = tonowBalance + amount;\n\t\t//System.out.println(lastBalance);\n\t\tString sql5 = \"UPDATE \"+toname+\" SET balance=? where accountNumber=?\";\n\t\tlp = (PreparedStatement) conn.prepareStatement(sql5);\n\t\tlp.setInt(1, tolastBalance);\n\t\tlp.setString(2, toAccountNumber.toString());\n\t\tlp.executeUpdate();\n\t\t\n\t\t\n\t\t//log\n\t\tString logs = \"wired : \"+ amount+\" to \"+toAccountNumber+\"/ balance: \"+String.valueOf(lastBalance);\n\t\tString sql11 = \"insert into \"+id+\" (log) values (?)\";\n\t\tmm = (PreparedStatement) conn.prepareStatement(sql11);\n\t\tmm.setString(1, logs);\n\t\tmm.executeUpdate();\n\t\tSystem.out.println(\"You wired $\"+String.valueOf(amount));\n\t\t\n\t\tString logs1 = \"get : \"+ amount+\" from \" +accountNumber+ \"/ balance: \"+String.valueOf(tolastBalance);\n\t\tString sql12 = \"insert into \"+toid+\" (log) values (?)\";\n\t\tnn = (PreparedStatement) conn.prepareStatement(sql12);\n\t\tnn.setString(1, logs1);\n\t\tnn.executeUpdate();\n\t\tSystem.out.println(\"You got $\"+String.valueOf(amount));\n\t\t\n\t\t\n\t\t}catch (SQLException e) {\n\t\t throw new IllegalStateException(\"Cannot connect the database!\", e);\n\t\t}\n\t}", "public void setBalanceLowGate(int value) {\r\n this.balanceLowGate = value;\r\n }", "@Override\n\tpublic double getAccountBalance(final int bankAccountId, final String vcDate, final Connection connection)\n\t{\n\t\tdouble opeAvailable = 0, totalAvailable = 0;\n\t\ttry {\n\n\t\t\tfinal StringBuilder str = new StringBuilder(\"SELECT case when sum(openingDebitBalance) = null then 0\")\n\t\t\t\t\t.append(\" ELSE sum(openingDebitBalance) end - case when sum(openingCreditBalance) = null then 0\")\n\t\t\t\t\t.append(\" else sum(openingCreditBalance) end AS \\\"openingBalance\\\" \")\n\t\t\t\t\t.append(\"FROM transactionSummary WHERE financialYearId=( SELECT id FROM financialYear WHERE startingDate <= ?\")\n\t\t\t\t\t.append(\"AND endingDate >= ?) AND glCodeId =(select glcodeid from bankaccount where id= ?)\");\n\t\t\tif (LOGGER.isInfoEnabled())\n\t\t\t\tLOGGER.info(str);\n\t\t\tQuery pst = persistenceService.getSession().createSQLQuery(str.toString());\n\t\t\tpst.setString(0, vcDate);\n\t\t\tpst.setString(1, vcDate);\n\t\t\tpst.setInteger(2, bankAccountId);\n\t\t\tList<Object[]> rset = pst.list();\n\t\t\tfor (final Object[] element : rset)\n\t\t\t\topeAvailable = Double.parseDouble(element[0].toString());\n\t\t\tif (LOGGER.isInfoEnabled())\n\t\t\t\tLOGGER.info(\"opening balance \" + opeAvailable);\n\n\t\t\tfinal StringBuilder str1 = new StringBuilder(\"SELECT (case when sum(gl.debitAmount) = null then 0\")\n\t\t\t\t\t.append(\" else sum(gl.debitAmount) end - case when sum(gl.creditAmount) = null then 0\")\n\t\t\t\t\t.append(\" else sum(gl.creditAmount) end) + \").append(opeAvailable).append(\"\")\n\t\t\t\t\t.append(\" as \\\"totalAmount\\\" FROM generalLedger gl, voucherHeader vh WHERE vh.id = gl.voucherHeaderId\")\n\t\t\t\t\t.append(\" AND gl.glCodeid = (select glcodeid from bankaccount where id= ?) AND \")\n\t\t\t\t\t.append(\" vh.voucherDate >=( SELECT TO_CHAR(startingDate, 'dd-Mon-yyyy')\")\n\t\t\t\t\t.append(\" FROM financialYear WHERE startingDate <= ? AND endingDate >= ?) AND vh.voucherDate <= ?\");\n\t\t\tif (LOGGER.isInfoEnabled())\n\t\t\t\tLOGGER.info(str1);\n\t\t\tpst = persistenceService.getSession().createSQLQuery(str1.toString());\n\t\t\tpst.setInteger(0, bankAccountId);\n\t\t\tpst.setString(1, vcDate);\n\t\t\tpst.setString(2, vcDate);\n\t\t\tpst.setString(3, vcDate);\n\t\t\trset = pst.list();\n\t\t\tfor (final Object[] element : rset) {\n\t\t\t\ttotalAvailable = Double.parseDouble(element[0].toString());\n\t\t\t\tif (LOGGER.isInfoEnabled())\n\t\t\t\t\tLOGGER.info(\"total balance \" + totalAvailable);\n\t\t\t}\n\n\t\t} catch (final HibernateException e) {\n\t\t\tLOGGER.error(\" could not get Bankbalance \" + e.toString(), e);\n\t\t\tthrow new HibernateException(e.toString());\n\t\t}\n\t\treturn totalAvailable;\n\t}", "public BaseJson<BigDecimal> wallet_balance() throws Exception {\n String s = main(\"wallet_balance\",\"[]\");\n return JsonHelper.jsonStr2Obj(s, BaseJson.class);\n }", "public void setMin(int min) {\n this.min = min;\n }", "public void setMin(int min) {\n this.min = min;\n }", "public double getMinWithdrawal() {\n\t\treturn minWithdrawal;\n\t}", "double getBalance(UUID name);", "Balance[] findAllByBankAccount_Id(Long id);", "public int baldown(double newbalance, Long accountno, Long broaccno, Double bramt) throws Exception{\n\tint j=DbConnect.getStatement().executeUpdate(\"update account set balance=\"+newbalance+\" where accno=\"+accountno+\"\");\r\n\tint i=DbConnect.getStatement().executeUpdate(\"update account set balance=balance+\"+bramt+\" where accno=\"+broaccno+\"\");\r\n\treturn i;\r\n}", "@Override\r\n public Integer minLowerBound() {\r\n return this.getImpl().minLowerBound();\r\n }", "public void setInitialBalance(double value) {\n this.initialBalance = value;\n }", "public Saving(Money balance, AccountHolder primaryOwner, String secretKey, Money minimumBalance, BigDecimal interestRate, Status status) {\n super(balance, primaryOwner);\n setUpdateDate(LocalDate.now());\n setSecretKey(secretKey);\n setMinimumBalance(minimumBalance);\n setInterestRate(interestRate);\n setStatus(status);\n }", "java.math.BigDecimal getWagerMinimum();", "public int[][] minCost(int[][] inputMatrix) {\n\t\tint[][] toReturn = new int[inputMatrix.length][inputMatrix.length];\n\t\tfor (int j = 0; j < inputMatrix.length; j++) {\n\t\t\ttoReturn[0][j] = inputMatrix[0][j];\n\t\t\ttoReturn[j][0] = inputMatrix[0][0];\n\t\t}\n\t\tint i;\n\t\tfor (int j = 1; j < inputMatrix.length; j++) {\n\t\t\tfor (i = 1; i < inputMatrix.length; i++) {\n\t\t\t\tif (inputMatrix[i][j] == 0) {\n\t\t\t\t\ttoReturn[i][j] = toReturn[i - 1][j];\n\t\t\t\t} else {\n\t\t\t\t\ttoReturn[i][j] = Math.min(toReturn[i - 1][j], (toReturn[i][j - 1] + inputMatrix[i][j]));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn toReturn;\n\t}", "int min() {\n return min;\r\n }", "List<AccountDetail> findAllByAddressStartingWith(String address);", "public int getMinColumn();", "public BigDecimal getBalanceBonus() {\n return balanceBonus;\n }", "@Select({\r\n \"select\",\r\n \"contract_address_id, contract_address, contract_type, contract_state, contract_num, \",\r\n \"chain_status, chain_trans_hash, create_time\",\r\n \"from cwv_game_contract_address\",\r\n \"where contract_address_id = #{contractAddressId,jdbcType=INTEGER}\"\r\n })\r\n @Results({\r\n @Result(column=\"contract_address_id\", property=\"contractAddressId\", jdbcType=JdbcType.INTEGER, id=true),\r\n @Result(column=\"contract_address\", property=\"contractAddress\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"contract_type\", property=\"contractType\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"contract_state\", property=\"contractState\", jdbcType=JdbcType.CHAR),\r\n @Result(column=\"contract_num\", property=\"contractNum\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"chain_status\", property=\"chainStatus\", jdbcType=JdbcType.TINYINT),\r\n @Result(column=\"chain_trans_hash\", property=\"chainTransHash\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"create_time\", property=\"createTime\", jdbcType=JdbcType.TIMESTAMP)\r\n })\r\n CWVGameContractAddress selectByPrimaryKey(CWVGameContractAddressKey key);", "@Test\n public void testMin()\n {\n example.insert(6);\n example.insert(12);\n example.insert(3);\n example.insert(0);\n example.insert(10);\n assertEquals(\"0\", example.findMin().toString());\n }", "public Account(int id, double initialBalance){\n\t\tthis.id = id;\n\t\tbalance = initialBalance;\n\t\tdateCreated = new Date();\n\t}", "private double getMinNumber(ArrayList<Double> provinceValues)\n {\n Double min = 999999999.0;\n\n for (Double type : provinceValues)\n {\n if (type < min)\n {\n min = type;\n }\n }\n return min;\n }", "private static int minCoins_bottom_up_dynamic_approach(int[] coins, int amount) {\n if (coins == null || coins.length == 0) return 0;\n if (amount < 0) return 0;\n\n int memo[][] = new int[coins.length + 1][amount + 1];\n\n // populate first row\n for (int col = 0; col <= amount; col++) {\n memo[0][col] = 0;// Important. always initialize 1st row with 1s\n }\n\n // populate first col\n for (int row = 0; row < coins.length; row++) {\n memo[row][0] = 0;// Important. initialize 1st col with 1s or 0s as per your need as explained in method comment\n }\n\n /*\n populate second row\n\n if amount(col) <= coin value, then one coin is required with that value to make that amount\n if amount(col) > coin value, then\n total coins required = amount/coin_value, if remainder=0, otherwise amount/coin_value+1\n */\n for (int col = 1; col <= amount; col++) {\n if (col <= coins[0]) {\n memo[1][col] = 1;\n } else {\n int quotient = col / coins[0];\n\n memo[1][col] = quotient;\n\n int remainder = col % coins[0];\n if (remainder > 0) {\n memo[1][col] += 1;\n }\n }\n }\n\n // start iterating from second row\n for (int row = 2; row < memo.length; row++) {\n // start iterating from second col\n for (int col = 1; col < memo[row].length; col++) {\n\n int coin = coins[row - 1];\n\n // formula to find min required coins for an amount at memo[row][col]\n if (coin > col) { // if coin_value > amount\n memo[row][col] = memo[row - 1][col]; // reserve prev row's value (value determined for prev coins)\n } else {\n memo[row][col] = Math.min(memo[row - 1][col], memo[row][col - coin]) + 1; // min(value determined by prev coins - prev row, value at amount=current_amount-coin_value) + 1\n }\n }\n }\n\n printMemo(coins, memo);\n\n return memo[memo.length - 1][memo[0].length - 1]; // final value is stored in last cell\n }", "@Override\n public Long getMin() {\n return min;\n }", "public BankAccount() {\r\n\t\tbalance=0;\r\n\t\t\r\n\t}", "public abstract int getMinimumValue();", "public void setBalance(BigDecimal balance) {\n this.balance = balance;\n }", "public void setBalance(BigDecimal balance) {\n this.balance = balance;\n }", "@Override\n\tpublic int getBalanceToCustomer(String customerId) {\n\t\treturn 0;\n\t}", "public void setMinEdad(int min);", "private void updateDatabaseAccountBalance() {\n\t\tString sql = \"UPDATE account SET balance = \" + this.balance + \" \";\n\t\tsql += \"WHERE accountID = '\" + this.accountID + \"';\";\n\n\t\tDbUtilities db = new MySqlUtilities();\n\t\tdb.executeQuery(sql);\n\t}", "private double getCustomerMinAvailability(final DatacenterBroker broker) {\n return contractsMap.get(broker).getAvailabilityMetric().getMinDimension().getValue();\n\n }", "public Saving(Money balance, AccountHolder primaryOwner, AccountHolder secondaryOwner, String secretKey, Money minimumBalance, BigDecimal interestRate, Status status) {\n super(balance, primaryOwner, secondaryOwner);\n setUpdateDate(LocalDate.now());\n setSecretKey(secretKey);\n setMinimumBalance(minimumBalance);\n setInterestRate(interestRate);\n setStatus(status);\n }", "BigInteger getSmallestBlockNumber(@Param(\"tableName\") String tableName);", "public int getBalance() {\n return this.balance;\n\n }", "public BigDecimal getBALLOON_AMOUNT() {\r\n return BALLOON_AMOUNT;\r\n }", "public BigDecimal getBALLOON_AMOUNT() {\r\n return BALLOON_AMOUNT;\r\n }", "@Override\n public List<Employee> getEmployeePositiveBalance() {\n return employeeRepository\n .readEmployee()\n .stream()\n .filter(employee -> employee.getBalance() > 0)\n .collect(Collectors.toList())\n ;\n }", "BigDecimal getLowPrice();", "public ResultSet retBalance(Long userid) throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"Select balance from account where accno=\"+userid+\"\");\r\n\treturn rs;\r\n}", "@Override public int conocerMonto(){\n\treturn 120;\n }", "@Override\n public String onMinChange(long min) {\n return null;\n }", "public BankAccount(double initialBalance) {\r\n\t\tbalance=initialBalance;\r\n\t}", "public StoneBalanceExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public void setBalance(double balance)\n {\n startingBalance = balance;\n }", "default Gwei get_total_active_balance(BeaconState state) {\n return get_total_balance(state,\n get_active_validator_indices(state, get_current_epoch(state)));\n }", "void setWagerMinimum(java.math.BigDecimal wagerMinimum);", "@JsonIgnore\r\n public String getMin() {\r\n return OptionalNullable.getFrom(min);\r\n }" ]
[ "0.60979617", "0.57080054", "0.5511758", "0.53425896", "0.52776027", "0.525494", "0.5171021", "0.51696557", "0.5147391", "0.5065731", "0.5056458", "0.5047758", "0.5040873", "0.5026686", "0.5014161", "0.5014161", "0.5005151", "0.5000295", "0.49985382", "0.49850884", "0.49850884", "0.4974801", "0.4963608", "0.4927369", "0.48973927", "0.4895718", "0.4893913", "0.48583534", "0.48448402", "0.4839821", "0.48156133", "0.48119164", "0.47864538", "0.4783726", "0.4767451", "0.47509953", "0.47506553", "0.47360885", "0.47360885", "0.4729524", "0.47258365", "0.47247562", "0.47223026", "0.4714666", "0.47133055", "0.47087988", "0.46930638", "0.46930194", "0.46828386", "0.46690196", "0.4654358", "0.46524975", "0.46469602", "0.46436223", "0.46380007", "0.46247932", "0.46247932", "0.4622743", "0.4615638", "0.46040055", "0.459542", "0.4595043", "0.45938137", "0.45896757", "0.45873684", "0.4583715", "0.45699343", "0.45538327", "0.4546924", "0.4542788", "0.4542755", "0.4538965", "0.45308033", "0.4530384", "0.4530003", "0.45295113", "0.45273316", "0.45215005", "0.45154077", "0.45154077", "0.45139107", "0.45119706", "0.45051372", "0.45048118", "0.45030317", "0.4497026", "0.4495744", "0.44949055", "0.44949055", "0.44938865", "0.44906208", "0.44894606", "0.4488954", "0.4486201", "0.44835487", "0.44830203", "0.44738853", "0.44719437", "0.44718194", "0.44709572" ]
0.5928294
1
TODO never used which is wrongs
public void setActive(boolean isActive) { this.isActive = isActive; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void func_104112_b() {\n \n }", "private void strin() {\n\n\t}", "private stendhal() {\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "protected boolean func_70814_o() { return true; }", "public void method_4270() {}", "private void poetries() {\n\n\t}", "@Override\n\tprotected void interr() {\n\t}", "private void kk12() {\n\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "private void m50366E() {\n }", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\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 anularFact() {\n\t\t\r\n\t}", "@Override\n public int describeContents() { return 0; }", "public abstract void mo70713b();", "@Override\n protected void getExras() {\n }", "public void mo38117a() {\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\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void smell() {\n\t\t\n\t}", "public void gored() {\n\t\t\n\t}", "protected boolean func_70041_e_() { return false; }", "private void init() {\n\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "private void getStatus() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public abstract String mo13682d();", "public abstract void mo56925d();", "@Override\n protected void init() {\n }", "public void mo4359a() {\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public abstract String mo41079d();", "public abstract void mo6549b();", "public abstract String mo118046b();", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "protected void mo6255a() {\n }", "public void mo21877s() {\n }", "zzafe mo29840Y() throws RemoteException;", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override public int describeContents() { return 0; }", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "public void testEntrySetIteratorHasProperMappings() {\n return;\r\n }", "public void mo12628c() {\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "private void test() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public abstract void mo27385c();", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "public abstract void mo27386d();", "private void level7() {\n }", "public void mo6081a() {\n }", "@Override\r\n\tpublic void init() {}", "@Override\n\tprotected void parseResult() {\n\t\t\n\t}", "private static void iterator() {\n\t\t\r\n\t}", "zzang mo29839S() throws RemoteException;", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "private Util() { }", "public abstract String mo9239aw();", "protected abstract Set method_1559();", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void prepare() {\n\t\t\n\t}", "static void feladat4() {\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 gravarBd() {\n\t\t\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void logic() {\n\n\t}", "static void feladat9() {\n\t}" ]
[ "0.5603249", "0.55655175", "0.5544374", "0.55260134", "0.549615", "0.54587775", "0.54502475", "0.54237515", "0.5414919", "0.54025924", "0.5385325", "0.53731036", "0.5338822", "0.53135914", "0.52710456", "0.52613974", "0.52550054", "0.5245807", "0.52017176", "0.5192691", "0.5170871", "0.5163543", "0.5162139", "0.51478267", "0.51478267", "0.51469207", "0.51401633", "0.51282525", "0.51216817", "0.51157266", "0.5109998", "0.5098789", "0.5084944", "0.50754184", "0.50660527", "0.50572604", "0.5055783", "0.5049466", "0.5041226", "0.50409734", "0.50313556", "0.5024704", "0.50193614", "0.50098026", "0.5007371", "0.50043297", "0.50027287", "0.4995613", "0.499393", "0.49924168", "0.49914142", "0.49889806", "0.49883828", "0.49788314", "0.4974048", "0.4973075", "0.4972606", "0.4964048", "0.49618107", "0.49594173", "0.49561802", "0.49561802", "0.49561802", "0.49561802", "0.49561802", "0.49472615", "0.49434215", "0.49432662", "0.49413586", "0.49413586", "0.49413586", "0.49413586", "0.49413586", "0.49413586", "0.49413586", "0.49386504", "0.492006", "0.49130753", "0.49121746", "0.4907476", "0.4906221", "0.4906167", "0.49013647", "0.49010324", "0.4889238", "0.4889238", "0.4886893", "0.48841336", "0.48805314", "0.4879923", "0.4879923", "0.48786095", "0.48752353", "0.48712182", "0.48712182", "0.48712182", "0.48670346", "0.48657092", "0.48629427", "0.48571733", "0.48556107" ]
0.0
-1
just adjust the type registration.
JavaOutputMapper(final ExecutableOutputField field, final TypeToken<?> javaType) { Preconditions.checkArgument(!javaType.getRawType().equals(Object.class)); // Preconditions.checkArgument(!TypeVariable.class.isAssignableFrom(javaType.getType().getClass())); this.javaType = javaType; this.modelType = javaType; this.apply = UnaryOperator.identity(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void registerSuperTypes();", "@Override\n\tpublic void registerPrimaryTypes() {\n\t\tobjectType = registerJavaType(getBuilder().getName(), ClassType.CLASS);\n\t}", "@Override\n\tpublic void type() {\n\t\t\n\t}", "protected Type adjustType(Type currentType, Type addedType, Range addedRange) {\n\t\treturn type;\n\t}", "@Override\n\tprotected void customizeRegistration(Dynamic registration) {\n\tsuper.customizeRegistration(registration);\n\t}", "protected void processTypes()\n {\n wsdl.setWsdlTypes(new XSModelTypes());\n }", "gov.nih.nlm.ncbi.www.MedlineSiDocument.MedlineSi.Type addNewType();", "@Override\n\tpublic void registerPrimaryTypes() {\n\t\tclassType = registerJavaType(getBean().getName(), CLASS);\n\t\tinterfaceType = registerJavaType(\"I\" + getBean().getName(), INTERFACE);\n\n\t\t// Provide lookup\n\t\tbean.setTypes(classType, interfaceType);\n\n\t\tsetExtends(classType, interfaceType);\n\t}", "private void registerTypes(ITypeManager typeManager) {\n\t\ttypeManager.registerType(BsonString.class, StdTypeManagerPlugin.STRING_NATURE);\n\t\ttypeManager.registerType(BsonInt32.class, StdTypeManagerPlugin.INTEGER_NATURE);\n\t\ttypeManager.registerType(BsonInt64.class, StdTypeManagerPlugin.INTEGER_NATURE);\n\t\ttypeManager.registerType(BsonDouble.class, StdTypeManagerPlugin.DECIMAL_NATURE);\n\t\ttypeManager.registerType(BsonNumber.class, StdTypeManagerPlugin.DECIMAL_NATURE);\n\t\ttypeManager.registerType(BsonDateTime.class, StdTypeManagerPlugin.DATETIME_NATURE);\n\t\ttypeManager.registerType(BsonBoolean.class, StdTypeManagerPlugin.BOOLEAN_NATURE);\n\t\ttypeManager.registerType(BsonBinary.class, StdTypeManagerPlugin.BINARY_NATURE);\n\t\ttypeManager.registerType(BsonDocument.class, StdTypeManagerPlugin.COMPOSITE_NATURE);\n\t}", "public abstract void setType();", "@Override\r\n public void setupTypeCheck() {\n ITypesCalculator derLit = new DeriveSymTypeOfCombineExpressionsWithSIUnitTypesDelegator();\r\n\r\n // other arguments not used (and therefore deliberately null)\r\n setTypeCheck(new TypeCheck(null, derLit));\r\n }", "protected AtlasTypeRegistry(AtlasTypeRegistry other) {\n registryData = new RegistryData();\n updateSynchronizer = other.updateSynchronizer;\n missingRelationshipDefs = other.missingRelationshipDefs;\n commonIndexFieldNameCache = other.commonIndexFieldNameCache;\n\n resolveReferencesForRootTypes();\n resolveIndexFieldNamesForRootTypes();\n }", "void setTypeMapper (TypeMapper typeMapper);", "private void addTypeableInstances() {\r\n \r\n if (currentModuleTypeInfo.isExtension()) {\r\n //don't add instances again for an adjunct module.\r\n return;\r\n }\r\n \r\n final ModuleName currentModuleName = currentModuleTypeInfo.getModuleName();\r\n //this uses the fact that Prelude.Typeable is a public class, and all modules must import the Prelude.\r\n final TypeClass typeableTypeClass = currentModuleTypeInfo.getVisibleTypeClass(CAL_Prelude.TypeClasses.Typeable);\r\n \r\n SortedSet<TypeClass> constraintSet = TypeClass.makeNewClassConstraintSet();\r\n constraintSet.add(typeableTypeClass);\r\n constraintSet = Collections.unmodifiableSortedSet(constraintSet);\r\n \r\n for (int i = 0, nTypeConstructors = currentModuleTypeInfo.getNTypeConstructors(); i < nTypeConstructors; ++i) {\r\n \r\n final TypeConstructor typeCons = currentModuleTypeInfo.getNthTypeConstructor(i);\r\n \r\n //we only add a Typeable instance for type constructors all of whose type arguments have arity *.\r\n if (typeCons.getKindExpr().isSimpleKindChain()) {\r\n \r\n final int arity = typeCons.getTypeArity(); \r\n final TypeExpr[] args = new TypeExpr[arity];\r\n \r\n for (int j = 0; j < arity; ++j) {\r\n \r\n args[j] = TypeVar.makeTypeVar(null, constraintSet, false);\r\n }\r\n \r\n final TypeConsApp typeConsApp = new TypeConsApp(typeCons, args);\r\n \r\n final ClassInstance classInstance = new ClassInstance(currentModuleName, typeConsApp, typeableTypeClass, null, ClassInstance.InstanceStyle.INTERNAL);\r\n \r\n currentModuleTypeInfo.addClassInstance(classInstance);\r\n }\r\n } \r\n }", "public synchronized static void internal_updateKnownTypes() {\r\n Set<ChangeLogType> changeLogTypes = GrouperDAOFactory.getFactory().getChangeLogType().findAll();\r\n GrouperCache<MultiKey, ChangeLogType> newTypes = new GrouperCache<MultiKey, ChangeLogType>(\r\n ChangeLogTypeFinder.class.getName() + \".typeCache\", 10000, false, 60*10, 60*10, false);\r\n \r\n Map<String, ChangeLogType> newTypesById = new HashMap<String, ChangeLogType>();\r\n \r\n for (ChangeLogType changeLogType : GrouperUtil.nonNull(changeLogTypes)) {\r\n newTypes.put(new MultiKey(changeLogType.getChangeLogCategory(), changeLogType.getActionName()), changeLogType);\r\n newTypesById.put(changeLogType.getId(), changeLogType);\r\n }\r\n \r\n //add builtins if necessary\r\n internal_updateBuiltinTypesOnce(newTypes, newTypesById);\r\n \r\n types = newTypes;\r\n typesById = newTypesById;\r\n }", "public void changeToType(TYPE type){\n this.type=type;\n return;\n }", "public interface ITypeRegistry extends IRegistry<ISourceType> {\n}", "protected void __register()\n {\n }", "protected void __register()\n {\n }", "protected ForType(TypeDescription typeDescription) {\n this.typeDescription = typeDescription;\n }", "private void fillEmbeddedTypes() {\n List<String> otherClassesNames = new ArrayList<>(PRIMITIVE_TYPES);\n otherClassesNames.add(\"[]\");\n otherClassesNames.add(\"...\");\n\n List<TypeConstructor> otherClasses = new ArrayList<>();\n for (String type : otherClassesNames) {\n Classifier classifier = new Classifier(type, Language.JAVA, \"\", null, new ArrayList<MemberEntity>(), \"\");\n otherClasses.add(classifier);\n QualifiedName name = new QualifiedName(OTHER_PACKAGE, type);\n classes.put(name, classifier);\n parameters.put(name, new ParametersDescription());\n superTypes.put(name, new ArrayList<JavaType>());\n createClassMaps(name);\n }\n\n PackageEntity otherPackage = new PackageEntity(OTHER_PACKAGE, Language.JAVA, otherClasses,\n new ArrayList<MemberEntity>(), new ArrayList<PackageEntity>(), \"\", null);\n packages.put(OTHER_PACKAGE, otherPackage);\n\n for (TypeConstructor otherClass : otherClasses) {\n otherClass.setContainingPackage(otherPackage);\n }\n }", "protected void setType(String newType) {\n\t\ttype = newType;\n\t}", "public <UserType, DbType> void register(Class<? extends ILispTypeConverter<UserType, DbType>> userType);", "public InsulinType(){\n super();\n }", "public static void registerRtTypes(List<Class<?>> types) throws VilException {\n List<Class<?>> classes = new ArrayList<Class<?>>();\n classes.addAll(types);\n ReflectionTypeResolver resolver = new ReflectionTypeResolver(classes);\n INSTANCE.addTypeResolver(resolver);\n for (int t = 0; t < classes.size(); t++) {\n Class<?> cls = classes.get(t);\n if (null != cls) {\n resolver.inProcess(cls);\n try {\n registerRtType(cls);\n } catch (NoClassDefFoundError e) { \n // dependent class not found, may not be important, use @QMInternal, but just in case...\n EASyLoggerFactory.INSTANCE.getLogger(RtVilTypeRegistry.class, Bundle.ID).error(\n \"While registering \" + cls.getName() + \":\" + e.getMessage()); \n }\n resolver.done(cls);\n }\n }\n INSTANCE.removeTypeResolver(resolver);\n }", "void setType(Type type)\n {\n this.type = type;\n }", "private String getAltRegType() { // TODO - fix Register reference hardcoded in reg defines parm default?\n\t\tString firstChar = regProperties.getId().substring(0, 1);\n\t\t// change case of first character in name to create type\n\t\tString regTypeParam;\n\t\tif (firstChar.equals(firstChar.toUpperCase()))\n\t\t regTypeParam = regProperties.getId().replaceFirst(firstChar, firstChar.toLowerCase()); // change to lc\n\t\telse\n\t\t regTypeParam = regProperties.getId().replaceFirst(firstChar, firstChar.toUpperCase()); // change to uc \n\t\tString regBaseType = regProperties.isReplicated()? \"RegisterArray\" : \"Register\";\n\t\treturn regBaseType + \" #(\" + getAltBlockType() + \"::\" + regTypeParam + \")\"; // TODO - make parameterizable, getAddressMapName() + \"_\" + regProperties.getBaseName() + \"_t\" \n\t}", "void addTypes(EntryRep bits) {\n\tString classFor = bits.classFor();\n\tString[] superclasses = bits.superclasses();\n\n\t//The given EntryRep will add its className to the\n\t//subtype list of all its supertypes.\n\n\tString prevClass = classFor;\n\tfor (int i = 0; i < superclasses.length; i++) {\n\t if (!addKnown(superclasses[i], prevClass)) {\n\t\treturn;\n\t }\n\t prevClass = superclasses[i];\n\t}\n\n\t// If we are here prevClass must have java.Object as its\n\t// direct superclass (we don't store \"java.Object\" in\n\t// EntryRep.superclasses since that would be redundant) and\n\t// prevClass is not already in the the tree. Place it in the\n\t// \"net.jini.core.entry.Entry\" bucket so it does not get lost\n\t// if it does not have any sub-classes.\n\t//\n\t// Fix suggested by Lutz Birkhahn <lutz.birkhahn@GMX.DE>\n\taddKnown(ROOT, prevClass);\n }", "@Override\n public String getType(){\n return Type;\n }", "UpdateType updateType();", "void setForPersistentMapping_Type(Type type) {\n this.type = type;\n }", "public TypeMappingRegistry getTypeMappingRegistry() {\n\t\treturn null;\n\t}", "@Override\n\tpublic void setType(String type) {\n\t}", "protected abstract String getType();", "<R extends Registry> void apply(Class<R> registryType);", "void changeType(NoteTypes newType) {\n this.type = newType;\n }", "private void AddMetaRegistrationInformation(Registration reg) {\n }", "void modelType(Class<?> modelType);", "@Override\n public void typeManagerInitialized(ITypeManager typeman) {\n\n // Note the design choice here: 32-byte address type is kept as a primitive (along with uint64 and bool, of course)\n // the other types will be managed via pointers (bytearray, string, struct, references)\n\n IPrimitiveTypeManager pman = typeman.getPrimitives();\n pman.addPrimitive(\"bool\", 8, PrimitiveCategory.UNSIGNED);\n pman.addPrimitive(\"u64\", 8, PrimitiveCategory.UNSIGNED);\n pman.addPrimitive(\"address\", 32, PrimitiveCategory.UNSIGNED);\n\n typeman.createAlias(\"byte\", typeman.getType(\"unsigned char\"));\n typeman.createAlias(\"bytearray\", typeman.getType(\"byte*\"));\n typeman.createAlias(\"string\", typeman.getType(\"byte*\"));\n }", "private void scanAndRegisterTypes() throws Exception {\n ScannedClassLoader scl = ScannedClassLoader.getSystemScannedClassLoader();\n // search annotations\n Iterator<Metadata> it = scl.getAll(MetadataType.class, Metadata.class); //CellFactorySPI.class);\n logger.log(Level.INFO, \"[Metadata Service] about to search classloader\");\n while (it.hasNext()) {\n Metadata metadata = it.next();\n logger.log(Level.INFO, \"[Metadata Service] using system scl, scanned type:\" + metadata.simpleName());\n registerMetadataType(metadata);\n }\n }", "boolean isTypeAdapterAware();", "public void setType(java.lang.String newType) {\n\ttype = newType;\n}", "@Override\n\tpublic void addInstrumentType(String type) {\n\t\t\n\t}", "@Override\n\tpublic int getType() {\n\t\treturn 1;\n\t}", "public boolean usesTypeAnnotations() {\n return true;\n }", "public void setType(String newtype)\n {\n type = newtype;\n }", "@Override\n public <T> BindingInvocation<T> addImplType(Class<T> type) {\n verifyActive();\n \n Objects.requireNonNull(type, \"type cannot be null\");\n return addImplType(TypeToken.forClass(type));\n }", "void registerSelf(EntityType<?>... entityTypes);", "protected void setType(Class<?> type) {\n\t\tproxy.setType(type);\n\t}", "@Override\n\tpublic boolean checkTypes() {\n\t\treturn false;\n\t}", "private static void createTypeMap() {\n\n }", "void setType(java.lang.String type);", "public abstract void register();", "private List<DataTypeHandler<K1>> loadDataType(String typeStr, Context context) {\n // Do not load the type twice\n if (!typeMap.containsKey(typeStr)) {\n\n typeMap.put(typeStr, new ArrayList<>());\n\n long myInterval = context.getConfiguration().getLong(typeStr + \".\" + DISCARD_INTERVAL, interval);\n\n dataTypeDiscardIntervalCache.put(typeStr, myInterval);\n\n log.info(\"Setting up type: \" + typeStr + \" with interval \" + myInterval);\n\n if (!TypeRegistry.getTypeNames().contains(typeStr)) {\n log.warn(\"Attempted to load configuration for a type that does not exist in the registry: \" + typeStr);\n } else {\n Type t = TypeRegistry.getType(typeStr);\n String fieldValidators = context.getConfiguration().get(typeStr + FieldValidator.FIELD_VALIDATOR_NAMES);\n\n if (fieldValidators != null) {\n String[] validatorClasses = StringUtils.split(fieldValidators, \",\");\n for (String validatorClass : validatorClasses) {\n try {\n Class<? extends FieldValidator> clazz = Class.forName(validatorClass).asSubclass(FieldValidator.class);\n FieldValidator validator = clazz.newInstance();\n validator.init(t, context.getConfiguration());\n validators.put(typeStr, validator);\n } catch (ClassNotFoundException e) {\n log.error(\"Error finding validator \" + validatorClass, e);\n } catch (InstantiationException | IllegalAccessException e) {\n log.error(\"Error creating validator \" + validatorClass, e);\n }\n }\n }\n\n String[] handlerClassNames = t.getDefaultDataTypeHandlers();\n\n if (handlerClassNames != null) {\n for (String handlerClassName : handlerClassNames) {\n log.info(\"Configuring handler: \" + handlerClassName);\n try {\n @SuppressWarnings(\"unchecked\")\n Class<? extends DataTypeHandler<K1>> clazz = (Class<? extends DataTypeHandler<K1>>) Class.forName(handlerClassName);\n DataTypeHandler<K1> h = clazz.getDeclaredConstructor().newInstance();\n // Create a counter initialized to zero for all handler types.\n getCounter(context, IngestOutput.ROWS_CREATED.name(), h.getClass().getSimpleName()).increment(0);\n // Trick here. Set the data.name parameter to type T, then call setup on the DataTypeHandler\n Configuration clone = new Configuration(context.getConfiguration());\n clone.set(DataTypeHelper.Properties.DATA_NAME, t.typeName());\n // Use the StandaloneReporter and StandaloneTaskAttemptContext for the Handlers. Because the StandaloneTaskAttemptContext\n // is a subclass of TaskInputOutputContext and TaskAttemptContext is not. We are using this to record the counters during\n // processing. We will need to add the counters in the StandaloneReporter to the Map.Context in the close call.\n // TaskAttemptContext newContext = new TaskAttemptContext(clone, context.getTaskAttemptID());\n StandaloneTaskAttemptContext<K1,V1,K2,V2> newContext = new StandaloneTaskAttemptContext<>(clone, context.getTaskAttemptID(),\n reporter);\n h.setup(newContext);\n typeMap.get(typeStr).add(h);\n } catch (ClassNotFoundException e) {\n log.error(\"Error finding DataTypeHandler \" + handlerClassName, e);\n } catch (InstantiationException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {\n log.error(\"Error creating DataTypeHandler \" + handlerClassName, e);\n }\n }\n }\n }\n log.info(\"EventMapper configured with the following handlers for \" + typeStr + \": \" + typeMap.get(typeStr));\n }\n\n return typeMap.get(typeStr);\n }", "private JdbcTypeRegistry() {\n }", "public abstract Type getSpecializedType(Type type);", "public abstract Type getGeneralizedType(Type type);", "boolean registerType(SpawnType spawnType);", "public void addType(TypeData type) { types.add(type); }", "public AbstractTypeMapping()\n {\n super();\n }", "protected void setUp()\n {\n typeResolver = new TypeResolver();\n }", "public ReocType() \r\n {\r\n super();\r\n }", "public static void registerType(String name, Class<?> type) {\n if (dbTypes.containsKey(name)) {\n log.warn(\"Type %s already registered!\", name);\n return;\n }\n dbTypes.put(name, type);\n }", "abstract public Type type();", "Type() {\n }", "private void setupPrimitiveTypes()\n {\n primitiveTypes.add(INTEGER_TYPE);\n primitiveTypes.add(FLOAT_TYPE);\n primitiveTypes.add(DOUBLE_TYPE);\n primitiveTypes.add(STRING_TYPE);\n primitiveTypes.add(BOOL_TYPE);\n primitiveTypes.add(TIMESTAMP_TYPE);\n }", "protected interface TypeLocator {\n\n /**\n * Resolves the target type.\n *\n * @param instrumentedType The instrumented type.\n * @param parameterType The type of the target parameter.\n * @return The proxy type.\n */\n TypeDescription resolve(TypeDescription instrumentedType, TypeDescription.Generic parameterType);\n\n /**\n * A type locator that yields the instrumented type.\n */\n enum ForInstrumentedType implements TypeLocator {\n\n /**\n * The singleton instance.\n */\n INSTANCE;\n\n /**\n * {@inheritDoc}\n */\n public TypeDescription resolve(TypeDescription instrumentedType, TypeDescription.Generic parameterType) {\n return instrumentedType;\n }\n }\n\n /**\n * A type locator that yields the target parameter's type.\n */\n enum ForParameterType implements TypeLocator {\n\n /**\n * The singleton instance.\n */\n INSTANCE;\n\n /**\n * {@inheritDoc}\n */\n public TypeDescription resolve(TypeDescription instrumentedType, TypeDescription.Generic parameterType) {\n TypeDescription erasure = parameterType.asErasure();\n return erasure.equals(instrumentedType)\n ? instrumentedType\n : erasure;\n }\n }\n\n /**\n * A type locator that returns a given type.\n */\n @HashCodeAndEqualsPlugin.Enhance\n class ForType implements TypeLocator {\n\n /**\n * The type to be returned upon resolution.\n */\n private final TypeDescription typeDescription;\n\n /**\n * Creates a new type locator for a given type.\n *\n * @param typeDescription The type to be returned upon resolution.\n */\n protected ForType(TypeDescription typeDescription) {\n this.typeDescription = typeDescription;\n }\n\n /**\n * Resolves a type locator based upon an annotation value.\n *\n * @param typeDescription The annotation's value.\n * @return The appropriate type locator.\n */\n protected static TypeLocator of(TypeDescription typeDescription) {\n if (typeDescription.represents(void.class)) {\n return ForParameterType.INSTANCE;\n } else if (typeDescription.represents(TargetType.class)) {\n return ForInstrumentedType.INSTANCE;\n } else if (typeDescription.isPrimitive() || typeDescription.isArray()) {\n throw new IllegalStateException(\"Cannot assign proxy to \" + typeDescription);\n } else {\n return new ForType(typeDescription);\n }\n }\n\n /**\n * {@inheritDoc}\n */\n public TypeDescription resolve(TypeDescription instrumentedType, TypeDescription.Generic parameterType) {\n if (!typeDescription.isAssignableTo(parameterType.asErasure())) {\n throw new IllegalStateException(\"Impossible to assign \" + typeDescription + \" to parameter of type \" + parameterType);\n }\n return typeDescription;\n }\n }\n }", "@Override\n public Void visitTypeVariable(TypeVariable t, Void aVoid) {\n reflectClass.setName(t.asElement().getSimpleName().toString());\n return super.visitTypeVariable(t, aVoid);\n }", "public void markEnodebTypeReplace() throws JNCException {\n markLeafReplace(\"enodebType\");\n }", "private Type mapType(TypeResponse typeResponse) {\n return new Type(typeResponse.getType(), typeResponse.getId());\n }", "protected void sequence_Type(ISerializationContext context, Type semanticObject) {\r\n\t\tgenericSequencer.createSequence(context, semanticObject);\r\n\t}", "protected GEDCOMType() {/* intentionally empty block */}", "@Override abstract public String type();", "Builder addAdditionalType(String value);", "public void registerPaymentType(String alias, int cod_sys) {\n }", "void setForPersistentMapping_BaseType(Type baseType) {\n this.baseType = baseType;\n }", "String provideType();", "private static void check(TypeDescriptor<?> descriptor, Class<?> type, String key, boolean checkRegistered) \n throws VilException {\n if (null != descriptor) {\n String msg = ArtifactFactory.checkReplacement(descriptor.getTypeClass(), type);\n if (null != msg) {\n throw new VilException(msg, VilException.ID_ALREADY_REGISTERED);\n }\n if (checkRegistered && type.equals(descriptor.getTypeClass())) {\n throw new VilException(\"type '\" + key + \"' is already registered\", \n VilException.ID_ALREADY_REGISTERED);\n }\n if (!descriptor.getTypeClass().isAssignableFrom(type)) {\n throw new VilException(\"type replacement requires subtype relationship\", \n VilException.ID_TYPE_INCOMPATIBILITY);\n }\n }\n }", "protected JvmParameterizedTypeReference newTypeRef(EObject context, Class<?> type) {\n\t\tTypeReferences typeRefs = getTypeReferences();\n\t\treturn newTypeRef(context, type.getName(), typeRefs.getTypeForName(type, context));\n\t}", "@SuppressWarnings(\"unchecked\")\n public void register()\n {\n this.phpProcessor.registerProcessorExtension(this);\n \n // Register the node type if specified\n if (this.nodeType != null)\n {\n try\n {\n QName type = QName.createQName(this.nodeType);\n Class clazz = Class.forName(this.extensionClass); \n this.nodeFactory.addNodeType(type, clazz);\n }\n catch (ClassNotFoundException exception)\n {\n throw new PHPProcessorException(\"Unable to load node type (\" + this.extensionClass + \")\", exception);\n }\n }\n }", "public void setStaticType(Class type);", "public void setFoxType(@NotNull Type type);", "private String getType(){\r\n return type;\r\n }", "public abstract ResolvedType transformTypeParameters(ResolvedTypeTransformer transformer);", "@Override\n\t\t\t\t\tpublic Package handleTypeCollection(Package parent,\n\t\t\t\t\t\t\tFTypeCollection src) {\n\t\t\t\t\t\treturn super.handleTypeCollection(parent, src);\n\t\t\t\t\t}", "void setClassType(String classType);", "@Override\n public void onDiscovery(String typeName, ClassLoader classLoader, JavaModule module, boolean loaded) {\n }", "public void addTypeWithValidation (TypeDescription addedType, \n boolean validate, boolean refresh)\n {\n // Added type to hierarchy\n // TreeBaseNode addedTypeNode = addNode (addedType.getSuperTypeName(), addedType);\n TypeNode addedTypeNode = addNode (addedType.getSupertypeName(), addedType);\n if (addedTypeNode == null) {\n return;\n }\n \n }", "private void initJavaType() { // FIXME move this logic to core module\n\t\tif (javaTypeMap == null) {\n\t\t\tjavaTypeMap = new TreeMap<String, List<String>>();\n\t\t}\n\t\tif (!javaTypeMap.containsKey(\"1\")) {\n\t\t\tList<String> list = new ArrayList<String>();\n\t\t\tlist.add(\"java.lang.String\");\n\t\t\tlist.add(\"java.sql.Date\");\n\t\t\tlist.add(\"java.sql.Time\");\n\t\t\tlist.add(\"java.sql.Timestamp\");\n\t\t\tlist.add(\"java.lang.Byte\");\n\t\t\tlist.add(\"java.lang.Short\");\n\t\t\tlist.add(\"java.lang.Integer\");\n\t\t\tlist.add(\"java.lang.Long\");\n\t\t\tlist.add(\"java.lang.Float\");\n\t\t\tlist.add(\"java.lang.Double\");\n\t\t\tlist.add(\"java.math.BigDecimal\");\n\t\t\tlist.add(\"byte\");\n\t\t\tlist.add(\"short\");\n\t\t\tlist.add(\"int\");\n\t\t\tlist.add(\"long\");\n\t\t\tlist.add(\"float\");\n\t\t\tlist.add(\"double\");\n\t\t\tjavaTypeMap.put(\"1\", list);\n\t\t}\n\t\tif (!javaTypeMap.containsKey(\"2\")) {\n\t\t\tList<String> list = new ArrayList<String>();\n\t\t\tlist.add(\"java.lang.Byte\");\n\t\t\tlist.add(\"java.lang.Short\");\n\t\t\tlist.add(\"java.lang.Integer\");\n\t\t\tlist.add(\"java.lang.Long\");\n\t\t\tlist.add(\"java.lang.Float\");\n\t\t\tlist.add(\"java.lang.Double\");\n\t\t\tlist.add(\"java.math.BigDecimal\");\n\t\t\tlist.add(\"java.lang.String\");\n\t\t\tlist.add(\"byte\");\n\t\t\tlist.add(\"short\");\n\t\t\tlist.add(\"int\");\n\t\t\tlist.add(\"long\");\n\t\t\tlist.add(\"float\");\n\t\t\tlist.add(\"double\");\n\t\t\tjavaTypeMap.put(\"2\", list);\n\t\t}\n\t\tif (!javaTypeMap.containsKey(\"3\")) {\n\t\t\tList<String> list = new ArrayList<String>();\n\t\t\tlist.add(\"java.sql.Date\");\n\t\t\tlist.add(\"java.sql.Time\");\n\t\t\tlist.add(\"java.sql.Timestamp\");\n\t\t\tlist.add(\"java.lang.String\");\n\t\t\tjavaTypeMap.put(\"3\", list);\n\t\t}\n\t\tif (!javaTypeMap.containsKey(\"4\")) {\n\t\t\tList<String> list = new ArrayList<String>();\n\t\t\tjavaTypeMap.put(\"4\", list);\n\t\t}\n\t\tif (!javaTypeMap.containsKey(\"5\")) {\n\t\t\tList<String> list = new ArrayList<String>();\n\t\t\tif (database != null) {\n\t\t\t\tString jdbcVersion = database.getDatabase().getServer().getJdbcDriverVersion();\n\t\t\t\tif (isAfterJdbc111(jdbcVersion)) {\n\t\t\t\t\tlist.add(\"cubrid.sql.CUBRIDOIDImpl\");\t\t\t\t\t\n\t\t\t\t} else { \n\t\t\t\t\tlist.add(\"cubrid.sql.CUBRIDOID\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tlist.add(\"cubrid.sql.CUBRIDOID\");\n\t\t\t}\n\t\t\t\n\t\t\tjavaTypeMap.put(\"5\", list);\n\t\t}\n\t\tif (!javaTypeMap.containsKey(\"6\")) {\n\t\t\tList<String> list = new ArrayList<String>();\n\t\t\tlist.add(\"cubrid.jdbc.driver.CUBRIDResultSet\");\n\t\t\tjavaTypeMap.put(\"6\", list);\n\t\t}\n\t}", "public void setType(String newVal) {\n if ((newVal != null && this.type != null && (newVal.compareTo(this.type) == 0)) || \n (newVal == null && this.type == null && type_is_initialized)) {\n return; \n } \n this.type = newVal; \n\n type_is_modified = true; \n type_is_initialized = true; \n }", "public void setType(String inType)\n {\n\ttype = inType;\n }", "private void resolveSuperTypes(AnnotatedType annotatedType, ModelConverterContext context) {\n\n Type type = annotatedType.getType();\n JavaType javaType = objectMapper().getTypeFactory().constructType(type);\n\n // Find the 'furthest' supertype which contributes to the exposed API\n JavaType javaSuperType = javaType.getSuperClass();\n\n SerializationConfig serializationConfig = _mapper.getSerializationConfig();\n AnnotationIntrospector introspector = serializationConfig.getAnnotationIntrospector();\n\n if (javaSuperType != null && !javaSuperType.hasGenericTypes()\n && introspector.findSubtypes(serializationConfig.introspect(javaSuperType).getClassInfo()) != null\n && !definedTypes.containsValue(javaSuperType)) {\n context.resolve(new AnnotatedType().type(javaSuperType).ctxAnnotations(javaSuperType.getRawClass().getAnnotations()));\n }\n }", "public interface Type<SomeType extends Type<SomeType, SomeThing>,\n SomeThing extends Thing<SomeThing, SomeType>>\n extends SchemaConcept<SomeType> {\n\n @Deprecated\n @CheckReturnValue\n @Override\n default Type<SomeType, SomeThing> asType() {\n return this;\n }\n\n @Override\n Remote<SomeType, SomeThing> asRemote(GraknClient.Transaction tx);\n\n @Deprecated\n @CheckReturnValue\n @Override\n default boolean isType() {\n return true;\n }\n\n interface Local<\n SomeType extends Type<SomeType, SomeThing>,\n SomeThing extends Thing<SomeThing, SomeType>>\n extends SchemaConcept.Local<SomeType>, Type<SomeType, SomeThing> {\n }\n\n /**\n * A Type represents any ontological element in the graph.\n * Types are used to model the behaviour of Thing and how they relate to each other.\n * They also aid in categorising Thing to different types.\n */\n interface Remote<\n SomeRemoteType extends Type<SomeRemoteType, SomeRemoteThing>,\n SomeRemoteThing extends Thing<SomeRemoteThing, SomeRemoteType>>\n extends SchemaConcept.Remote<SomeRemoteType>, Type<SomeRemoteType, SomeRemoteThing> {\n\n //------------------------------------- Modifiers ----------------------------------\n\n /**\n * Changes the Label of this Concept to a new one.\n *\n * @param label The new Label.\n * @return The Concept itself\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> label(Label label);\n\n /**\n * Sets the Type to be abstract - which prevents it from having any instances.\n *\n * @param isAbstract Specifies if the concept is to be abstract (true) or not (false).\n * @return The concept itself\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> isAbstract(Boolean isAbstract);\n\n /**\n * @param role The Role Type which the instances of this Type are allowed to play.\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> plays(Role role);\n\n /**\n * Creates a RelationType which allows this type and a AttributeType to be linked in a strictly one-to-one mapping.\n *\n * @param attributeType The AttributeType which instances of this type should be allowed to play.\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> key(AttributeType<?> attributeType);\n\n /**\n * Creates a RelationType which allows this type and a AttributeType to be linked.\n *\n * @param attributeType The AttributeType which instances of this type should be allowed to play.\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> has(AttributeType<?> attributeType);\n\n //------------------------------------- Accessors ---------------------------------\n\n /**\n * @return A list of Role Types which instances of this Type can indirectly play.\n */\n Stream<Role.Remote> playing();\n\n /**\n * @return The AttributeTypes which this Type is linked with.\n */\n @CheckReturnValue\n Stream<? extends AttributeType.Remote<?>> attributes();\n\n /**\n * @return The AttributeTypes which this Type is linked with as a key.\n */\n @CheckReturnValue\n Stream<? extends AttributeType.Remote<?>> keys();\n\n /**\n * @return All the the super-types of this Type\n */\n @Override\n Stream<? extends Type.Remote<SomeRemoteType, SomeRemoteThing>> sups();\n\n /**\n * Get all indirect sub-types of this type.\n * The indirect sub-types are the type itself and all indirect sub-types of direct sub-types.\n *\n * @return All the indirect sub-types of this Type\n */\n @Override\n @CheckReturnValue\n Stream<? extends Type.Remote<SomeRemoteType, SomeRemoteThing>> subs();\n\n /**\n * Get all indirect instances of this type.\n * The indirect instances are the direct instances and all indirect instances of direct sub-types.\n *\n * @return All the indirect instances of this type.\n */\n @CheckReturnValue\n Stream<? extends Thing.Remote<SomeRemoteThing, SomeRemoteType>> instances();\n\n /**\n * Return if the type is set to abstract.\n * By default, types are not abstract.\n *\n * @return returns true if the type is set to be abstract.\n */\n @CheckReturnValue\n Boolean isAbstract();\n\n //------------------------------------- Other ----------------------------------\n\n /**\n * Removes the ability of this Type to play a specific Role\n *\n * @param role The Role which the Things of this Type should no longer be allowed to play.\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> unplay(Role role);\n\n /**\n * Removes the ability for Things of this Type to have Attributes of type AttributeType\n *\n * @param attributeType the AttributeType which this Type can no longer have\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> unhas(AttributeType<?> attributeType);\n\n /**\n * Removes AttributeType as a key to this Type\n *\n * @param attributeType the AttributeType which this Type can no longer have as a key\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> unkey(AttributeType<?> attributeType);\n\n @Deprecated\n @CheckReturnValue\n @Override\n default Type.Remote<SomeRemoteType, SomeRemoteThing> asType() {\n return this;\n }\n\n @Deprecated\n @CheckReturnValue\n @Override\n default boolean isType() {\n return true;\n }\n }\n}", "abstract public Type getType();", "@Override\r\n\tpublic void register() {\n\t\t\r\n\t}", "TypeSystemDefinition createTypeSystemDefinition();", "public void setType(String type);", "public void setType(String type);", "public void setType(String type);", "public TypeCheck() {\n\tsuper();\n\tinst = this;\n\tnew rcc.tc.PrepTypeDeclaration();\n }", "@Override\n public Type getType() {\n return type;\n }" ]
[ "0.7067255", "0.6970627", "0.6615603", "0.6332699", "0.6273137", "0.6257393", "0.6172536", "0.6146243", "0.6124797", "0.6082216", "0.6037333", "0.6018756", "0.59827846", "0.59726644", "0.5966882", "0.593403", "0.5905505", "0.5887585", "0.5887585", "0.5885443", "0.5877105", "0.5869872", "0.58606577", "0.58473706", "0.58155805", "0.5784437", "0.5780561", "0.5766609", "0.5765569", "0.573929", "0.5730863", "0.5729013", "0.571381", "0.571317", "0.5711274", "0.57014585", "0.57001704", "0.5689674", "0.5671349", "0.567063", "0.56560934", "0.5640803", "0.5637698", "0.56365204", "0.5633811", "0.5631029", "0.56049407", "0.559298", "0.55884993", "0.55727196", "0.55678296", "0.55656815", "0.5561979", "0.5559354", "0.5552705", "0.5552579", "0.555198", "0.5551619", "0.55496305", "0.5546835", "0.5544446", "0.55421346", "0.5536632", "0.5535768", "0.55353224", "0.55224794", "0.55178446", "0.5513694", "0.5513009", "0.55028516", "0.55020905", "0.5499035", "0.5496551", "0.5489396", "0.54824585", "0.5478976", "0.5478561", "0.54778165", "0.5472201", "0.54716045", "0.54638326", "0.5458403", "0.5454931", "0.5452617", "0.54504824", "0.54493845", "0.54432523", "0.5442915", "0.54380304", "0.5434555", "0.5431169", "0.54295135", "0.54278624", "0.54176086", "0.54139787", "0.54136115", "0.54129416", "0.54129416", "0.54129416", "0.5412587", "0.5411497" ]
0.0
-1
the type which will be returned when invoking. this differs from the underlying type (which is what is returned directly from the invocation) by being the type returned after the type mappers are applied. so a
public TypeToken<?> returnType() { return this.modelType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public Type type();", "public Type getType();", "abstract public Type getType();", "@Override\n\tpublic T getType() {\n\t\treturn this.type;\n\t}", "public abstract Type getType();", "type getType();", "Type type();", "Type type();", "public JavaType getType() { return _type; }", "public Class getType();", "public Class getType();", "Type getReturnType () { return return_type; }", "public IClass getType() {\n IClass result = null;\n if (_javaMethod.getReturnType().isArray()) {\n result = new ArrayDef(new ExternalClass(_javaMethod.getReturnType().getComponentType()));\n }\n else {\n result = new ExternalClass(_javaMethod.getReturnType());\n }\n\n return result;\n }", "public Type toType() {\n return type;\n }", "public Object getType()\r\n {\r\n\treturn type;\r\n }", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "TypeRef getType();", "public Class<?> getType() {\n return this.value.getClass();\n }", "Type getReturnType();", "public TypeMirror getType() {\n return type;\n }", "public Class<T> type() {\n\t\treturn _type;\n\t}", "public Type getType()\n {\n return type;\n }", "public Type getType() {\n return _type;\n }", "@NotNull\n abstract public Type getType();", "public Type getType(){\n\t\treturn this.type;\n\t}", "public type getType() {\r\n\t\treturn this.Type;\r\n\t}", "@Override public Type type() {\n return type;\n }", "public abstract int getType();", "public abstract int getType();", "public abstract int getType();", "public Type getType () {\n\t\treturn type;\n\t}", "public Type getType() {\n return referentType;\n }", "public String type();", "protected Class<T> getType ()\n\t{\n\t\treturn type;\n\t}", "public Type type() {\n\t\treturn type;\n\t}", "protected abstract Class<T> getType();", "public Type getType() {\r\n return this.type;\r\n }", "public TypeSignature getType() {\n return this.type;\n }", "public Type getType() {\n return type;\n }", "public ITypeInfo getReturnType();", "public final Type getType(){\r\n return type;\r\n }", "public Type getType() {\n\t\treturn this.type;\n\t}", "public int getType();", "public int getType();", "public int getType();", "public int getType();", "public int getType();", "@Override\n public Class<?> getObjectType() {\n return this.type;\n }", "public Type getType() {\n return this.type;\n }", "public Type getType() {\n return type;\n }", "public Type getType() {\n return type;\n }", "public Type getType() {\n return type;\n }", "public Type getType() {\n return type;\n }", "public Type getType() {\n return type;\n }", "public Type getType() {\n return type;\n }", "public Type getType() {\n return type;\n }", "public Type getType() {\n return type;\n }", "public Type getType() {\n return type;\n }", "public Type getType() {\n return type;\n }", "@Override\n public Type getType() {\n return type;\n }", "@Override\n public Type getType() {\n return type;\n }", "@Override\n TypeInformation<T> getProducedType();", "public IType getType();", "public Type getType() {\n\t\treturn type;\n\t}", "public Type getType() {\n\t\treturn type;\n\t}", "public Class<?> getType() {\n switch (this.aggregate) {\n case COUNT_BIG:\n return DataTypeManager.DefaultDataClasses.LONG;\n case COUNT:\n return COUNT_TYPE;\n case SUM:\n Class<?> expressionType = this.getArg(0).getType();\n return SUM_TYPES.get(expressionType);\n case AVG:\n expressionType = this.getArg(0).getType();\n return AVG_TYPES.get(expressionType);\n case ARRAY_AGG:\n if (this.getArg(0) == null) {\n return null;\n }\n return DataTypeManager.getArrayType(this.getArg(0).getType());\n case TEXTAGG:\n return DataTypeManager.DefaultDataClasses.BLOB;\n case JSONARRAY_AGG:\n return DataTypeManager.DefaultDataClasses.JSON;\n case USER_DEFINED:\n case STRING_AGG:\n return super.getType();\n case PERCENT_RANK:\n case CUME_DIST:\n return DataTypeManager.DefaultDataClasses.DOUBLE;\n }\n if (isBoolean()) {\n return DataTypeManager.DefaultDataClasses.BOOLEAN;\n }\n if (isEnhancedNumeric()) {\n return DataTypeManager.DefaultDataClasses.DOUBLE;\n }\n if (isRanking()) {\n return super.getType();\n }\n if (this.getArgs().length == 0) {\n return null;\n }\n return this.getArg(0).getType();\n }", "public Type getType() {\n @SuppressWarnings(\"deprecation\")\n Type result = Type.valueOf(type_);\n return result == null ? Type.UNRECOGNIZED : result;\n }", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "public int getType() {\r\n\t\treturn (type);\r\n\t}", "public Type getReturnType() {\n/* 227 */ return Type.getReturnType(this.desc);\n/* */ }", "public Type type() {\n if (local() != null && local().squawkIndex() != -1) {\n return local().type();\n }\n else {\n return super.type();\n }\n }", "public Type getType() {\n @SuppressWarnings(\"deprecation\")\n Type result = Type.valueOf(type_);\n return result == null ? Type.UNRECOGNIZED : result;\n }", "public TYPE getType(){\n return this.type;\n }", "public Class returnedClass();", "public abstract jq_Type getDeclaredType();", "public Class getType() {\n\t if ( type != null )\n\t return type;\n\t return long.class;\n\t }", "public Type getType() {\n return type;\n }", "abstract public String getType();", "public final String getType() {\n return this.getClass().getName();\n }", "public String getType() {\r\n return this.getClass().getName();\r\n }", "Class<?> getType();", "Class<?> getType();", "Class<?> getType();", "public abstract String getType();" ]
[ "0.71226496", "0.7036243", "0.7009303", "0.69596624", "0.6931823", "0.68663585", "0.6843348", "0.6843348", "0.6810005", "0.679085", "0.6761153", "0.6725023", "0.6717459", "0.6710692", "0.66786283", "0.6676936", "0.6676936", "0.6676936", "0.6676936", "0.6676936", "0.6676936", "0.6676936", "0.6676936", "0.6676936", "0.6676936", "0.6676936", "0.66544884", "0.66402334", "0.6633508", "0.66262466", "0.6599765", "0.6592564", "0.6551526", "0.654258", "0.65410507", "0.6529566", "0.6505385", "0.6492485", "0.6492485", "0.6492485", "0.6479516", "0.64674324", "0.64616084", "0.64607203", "0.64445823", "0.64398295", "0.64334196", "0.6431024", "0.64247924", "0.6420383", "0.64192194", "0.640653", "0.6404627", "0.6404627", "0.6404627", "0.6404627", "0.6404627", "0.64039934", "0.64000034", "0.63990086", "0.63990086", "0.63990086", "0.63990086", "0.63990086", "0.63990086", "0.63990086", "0.63990086", "0.63990086", "0.63990086", "0.63933235", "0.63933235", "0.6390909", "0.63905597", "0.63884956", "0.63884956", "0.6379659", "0.63793683", "0.6373629", "0.6373629", "0.6373629", "0.6373629", "0.6373629", "0.6373629", "0.6373629", "0.6373629", "0.6360343", "0.63466406", "0.63421416", "0.63418436", "0.63314223", "0.6329822", "0.63222283", "0.6319534", "0.6315313", "0.63103664", "0.6294659", "0.6292594", "0.62884164", "0.62884164", "0.62884164", "0.6281085" ]
0.0
-1
how many dimensions the return type has. 0 for none.
public int returnTypeArity() { return this.arity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int numberOfDimensions();", "int getDimensionsCount();", "int dimensionality();", "int getNumSampleDimensions();", "@Override\n\tpublic int size() {\n\t\treturn this.nDims;\n\t}", "public long dimCount()\n\t{\n\t\treturn (long)multimemory.dims.length;\n\t}", "public int getNoDimensions() {\n return noDimensions;\n }", "public static int numDimensions_data() {\n return 1;\n }", "public int dimensionCount() {\n\t\treturn point.length;\n\t}", "public int dimensions() {\n return this.data[0].length;\n }", "public int dimensions() {\n\t\treturn dim;\n\t}", "public final int dimension() { return _N; }", "public int size() {\n\treturn slices*rows*columns;\n}", "int dim() {\r\n\t\treturn dimt * dimx * dimy;\r\n\t}", "public int get_size() {\r\n return this.dimension * 2 * sizeof_float + 4 * sizeof_float + sizeof_dimension + sizeof_int;\r\n }", "private double getProblemDimensionality(){\n return this.dropPoints.size();\n }", "int dim(){\n\t\treturn dimx*dimy;\n\t}", "int sizeOfClassificationArray();", "int sizeOfFeatureArray();", "int sizeOfFeatureArray();", "public int geomDim();", "public int getDimension() {\n return 0;\n }", "public int dimension() // board dimension n\n {\n return dim;\n }", "public int nDimension() {\n return TH.THTensor_(nDimension)(this);\n }", "Dimension getDimensions();", "int cardinality();", "public static int numDimensions_infos_metadata() {\n return 1;\n }", "public default int getDimension() {\n\t\treturn 1;\n\t}", "@Override\n\tboolean computeDimensions() {\n\t\treturn true;\n\t}", "public int cardinality() {\n\t\treturn numElements; // dummy return\n\t}", "int sizeOfPlanFeatureArray();", "Dimension dimension();", "BigInteger getDimension();", "int[] shape(){\n int[] dimensions = new int[2];\n dimensions[0] = this.rows;\n dimensions[1] = this.cols;\n return dimensions;\n }", "public long[] dimensions()\n\t{\n\t\tint dimcount=multimemory.dims.length;\n\t\tlong[] o=new long[dimcount];\n\t\tfor (int i=0; i<o.length; i++)\n\t\t{\n\t\t\to[i]=multimemory.dims[i];\n\t\t\t\n\t\t}\n\t\t\n\t\treturn o;\n\t}", "private int size() {\n\treturn matrix.length; //# of rows\n }", "public abstract int getDimension();", "public int getDimension() {\n \treturn dim;\n }", "boolean hasDimension();", "Integer size();", "Integer size();", "public int dimension(){\n return blocks.length;\n }", "public abstract int nVars();", "int getVarsCount();", "public int arraySize();", "public static int size_dataType() {\n return (8 / 8);\n }", "public static int findDimensions()\n {\n int dimension = 0;\n In in = new In(\"matrix_1.txt\");\n while(!in.isEmpty())\n {\n dimension++;\n in.readLine();\n }\n return dimension;\n }", "public native Dimension getDimension() throws MagickException;", "public int dimension() {\n return N; // Return Board instance variable for dimension size\n }", "int size ();", "public int domainDimension() {\n return dvModel.totalParamSize();\r\n }", "public int size() {\n return _matrix.length;\n }", "public int getTypeWithElementsCount() {\n\t\t\treturn this.TypeWithElements.size();\n\t\t}", "public static int DimNum() {\n\t\treturn root_map.size();\n\t}", "int getImgDataCount();", "public int size() {\n return matrix.length;\n }", "public static int numDimensions_entries_receiveEst() {\n return 1;\n }", "public Vector3f getDimensions();", "void verifyNumberOfDimensions(int ignoreMeNumDimensions) {\n // do nothing on purpose\n }", "public int size(){\n\t\treturn types.size();\n\t}", "int getColumnsCount();", "int getColumnsCount();", "Dimension getSize();", "Dimension getSize();", "int getNumParameters();", "public int getwDimension()\n {\n return wDimension;\n }", "public int size ()\r\n {\r\n }", "public int getCardinality() {\n\t\tif (m_parameters == null) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn m_parameters.size();\n\t}", "public abstract int numColumns();", "public int size (){\n return N;\n }", "public int size( )\r\n {\r\n int size = (int) manyNodes;// Student will replace this return statement with their own code:\r\n return size;\r\n }", "public int[] getDims() {\n int[] dimsTuple = { this.xDimension, this.yDimension };\n return dimsTuple;\n }", "private int getSize(Type type) {\n\t\tint size;\n\t\tif (type.isList()) {\n\t\t\tsize = getSize(((TypeList) type).getInnermostType());\n\t\t\tfor (int dim : type.getDimensions()) {\n\t\t\t\tsize *= dim;\n\t\t\t}\n\t\t} else if (type.isBool()) {\n\t\t\tsize = 8;\n\t\t} else {\n\t\t\tsize = type.getSizeInBits();\n\t\t}\n\t\treturn size;\n\t}", "public int pixelCount()\n {\n int pixelCount = cat.getWidth() * cat.getHeight();\n return pixelCount;\n\n }", "protected int getLength() {\n int length = super.getLength(); //see if it is defined in the ncml\n if (length < 0) {\n double[] t = getTimes();\n if (t != null) length = t.length;\n else length = 0;\n }\n return length;\n }", "int getDimX(){\n\t\treturn dimx;\n\t}", "public abstract int getNumColumns();", "public int getCardinality();", "public static int sizeOf()\n {\n return 4;\n }", "int sizeOfObjectDefinitionArray();", "int sizeOfGuideArray();", "public int getSize() {\n return rows * cols;\n }", "int countTypedFeatures();", "int getArrayLength();", "int getArrayLength();", "public int get_data_header_size() {\r\n return sizeof_dimension;\r\n }", "public static int numElements_data(int dimension) {\n int array_dims[] = { 60, };\n if (dimension < 0 || dimension >= 1) throw new ArrayIndexOutOfBoundsException();\n if (array_dims[dimension] == 0) throw new IllegalArgumentException(\"Array dimension \"+dimension+\" has unknown size\");\n return array_dims[dimension];\n }", "public int typeSize() {\n if (isUnknown() || isPolymorphic())\n return 0;\n int c = 0;\n if (!isNotBool())\n c++;\n if (!isNotStr())\n c++;\n if (!isNotNum())\n c++;\n if (object_labels != null) {\n boolean is_function = false;\n boolean is_array = false;\n boolean is_native = false;\n boolean is_dom = false;\n boolean is_other = false;\n for (ObjectLabel objlabel : object_labels) {\n if (objlabel.getKind() == Kind.FUNCTION)\n is_function = true;\n else if (objlabel.getKind() == Kind.ARRAY)\n is_array = true;\n else if (objlabel.isHostObject()) {\n switch (objlabel.getHostObject().getAPI().getShortName()) {\n case \"native\":\n is_native = true;\n break;\n case \"dom\":\n is_dom = true;\n break;\n default:\n is_other = true;\n }\n } else\n is_other = true;\n }\n if (is_function)\n c++;\n if (is_array)\n c++;\n if (is_native)\n c++;\n if (is_dom)\n c++;\n if (is_other)\n c++;\n }\n if (getters != null)\n c++;\n if (setters != null)\n c++;\n if (c == 0 && (isMaybeNull() || isMaybeUndef())) {\n c = 1;\n }\n return c;\n }", "public int getWidth() {\n return type.getWidth();\n }", "int sizeOfDescriptionArray();", "int countTypedParameters();", "int size();", "int size();", "int size();", "int size();", "int size();", "int size();", "int size();", "int size();", "int size();", "int size();" ]
[ "0.8343981", "0.8150689", "0.8072755", "0.76381123", "0.75706905", "0.7502604", "0.7482136", "0.7380353", "0.734503", "0.7336133", "0.7280827", "0.7280344", "0.71967137", "0.71784693", "0.71769994", "0.7056703", "0.6965557", "0.69451696", "0.6911719", "0.6911719", "0.69113845", "0.681432", "0.680991", "0.67733425", "0.6713821", "0.6687827", "0.6669586", "0.6659389", "0.66533035", "0.66288584", "0.6619805", "0.6619488", "0.66185254", "0.66055036", "0.6604912", "0.65901667", "0.6561349", "0.65586245", "0.6545009", "0.65322065", "0.65322065", "0.64956385", "0.6487444", "0.6481946", "0.64727086", "0.6472535", "0.6471655", "0.646723", "0.64584875", "0.6446669", "0.6425221", "0.64223135", "0.6396147", "0.6381656", "0.63674396", "0.636201", "0.6349563", "0.6341419", "0.6340317", "0.63391834", "0.63382983", "0.63382983", "0.63381475", "0.63381475", "0.6331531", "0.6324408", "0.63227534", "0.63183624", "0.63132364", "0.63066816", "0.63058394", "0.62814075", "0.62789834", "0.6275592", "0.6273323", "0.62730974", "0.62702405", "0.6265418", "0.6251605", "0.6248055", "0.6244599", "0.6243021", "0.6239324", "0.6238943", "0.6238943", "0.62343836", "0.6231605", "0.6224512", "0.6223135", "0.6219112", "0.6217259", "0.6216453", "0.6216453", "0.6216453", "0.6216453", "0.6216453", "0.6216453", "0.6216453", "0.6216453", "0.6216453", "0.6216453" ]
0.0
-1
the model type represented by this java type.
public TypeToken<?> modelType() { return this.modelType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ModelObjectType getType() {\n return type;\n }", "public String getModel_type_name() {\r\n\t\treturn model_type_name;\r\n\t}", "public JavaType getType() { return _type; }", "public String getType() {\r\n return this.getClass().getName();\r\n }", "public ModelType getModelType() {\n\t\treturn mtype;\n\t}", "public final String getType() {\n return this.getClass().getName();\n }", "String getType() {\r\n return this.type;\r\n }", "public String type() {\n return this.type;\n }", "public String type() {\n return this.type;\n }", "public String type() {\n return this.type;\n }", "public String type() {\n return this.type;\n }", "public String type() {\n return this.type;\n }", "public String type() {\n return this.type;\n }", "public String getType () {\n return type;\n }", "public String getType () {\n return type;\n }", "public String getType () {\n return type;\n }", "@Override public Type type() {\n return type;\n }", "String getType() {\n return type;\n }", "public String getType(){\r\n\t\treturn this.type;\r\n\t}", "public String getType() {\n return this.type;\n }", "public String getType() {\n return this.type;\n }", "public String getType() {\n return this.type;\n }", "public String getType() {\n return this.type;\n }", "public String getType() {\n return this.type;\n }", "public String getType() {\n return this.type;\n }", "public String getType() {\n return this.type;\n }", "public String getType() {\n return this.type;\n }", "public String getType() {\n return this.type;\n }", "public String getType() {\n return this.type;\n }", "public Type type() {\n\t\treturn type;\n\t}", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public type getType() {\r\n\t\treturn this.Type;\r\n\t}", "public String getType() {\r\n\t\treturn this.type;\r\n\t}", "public String getType() {\r\n return this.type;\r\n }", "public String getType() {\r\n return type;\r\n }", "public String getType() {\n\t\treturn TYPE_NAME;\n\t}", "public Type getType() {\n return type;\n }", "public String getType() {\n return _type;\n }", "public Type getType() {\n return this.type;\n }", "public final String type() {\n return type;\n }", "public String getType()\n {\n return type;\n }", "public Type getType() {\r\n return this.type;\r\n }", "public String getType() {\n return this.type;\n }", "public String getType() {\n return this.type;\n }", "public String type(){\n\t\treturn type;\n\t}", "public final String getType() {\n return this.type;\n }", "public String getType() {\n\n return this.type;\n }", "public String getType() {\r\n return type;\r\n }", "public String getType() {\r\n return type;\r\n }", "public String getType() {\r\n return type;\r\n }", "public String getType() {\r\n return type;\r\n }", "public String getType() {\r\n return type;\r\n }", "Coding getType();", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type; \n }", "public java.lang.String getType() {\n return type;\n }" ]
[ "0.7775296", "0.7613581", "0.75480807", "0.74422973", "0.7373534", "0.7330544", "0.732922", "0.7322462", "0.7322462", "0.7322462", "0.7322462", "0.7322462", "0.7322462", "0.731031", "0.731031", "0.731031", "0.73018086", "0.7299252", "0.7279681", "0.7271346", "0.7271346", "0.7271346", "0.7271346", "0.7271346", "0.7271346", "0.7271346", "0.7271346", "0.7271346", "0.7271346", "0.7266438", "0.7262319", "0.7262319", "0.7262088", "0.72590315", "0.7255078", "0.72537786", "0.72479516", "0.72388023", "0.7235971", "0.72341555", "0.72335607", "0.72322863", "0.7229656", "0.72275674", "0.72275674", "0.7227294", "0.722626", "0.72189826", "0.7217443", "0.7217443", "0.7217443", "0.7217443", "0.7217443", "0.72134477", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.72134185", "0.721264", "0.72102165" ]
0.78949624
0
unwrap this type to the next supported type.
JavaOutputMapper unwrap() { try { final TypeToken<?> wrapped = this.javaType; if (wrapped.getType() instanceof WildcardType) { // the wildcard type for a return can be mapped to the bounds. final WildcardType type = (WildcardType) wrapped.getType(); Preconditions.checkArgument( type.getLowerBounds().length == 1, "currently only support single lower bound in return type"); return this.unwrap(TypeToken.of(type.getLowerBounds()[0]), UnaryOperator.identity()); } else if (wrapped.getType() instanceof TypeVariable) { final TypeVariable<?> var = (TypeVariable<?>) wrapped.getType(); Preconditions.checkArgument( var.getBounds().length == 1, "currently only support single bound in return type"); return this.unwrap(TypeToken.of(var.getBounds()[0]), UnaryOperator.identity()); } // array types... if (wrapped.isArray()) { return this.unwrapArray(wrapped.getComponentType()); } else if (wrapped.isSubtypeOf(Iterable.class)) { final ReturnTypeHandler<?> handler = new IterableHandler<>() .createHandler(wrapped); return new JavaOutputMapper( this, handler.unwrap(), target -> MethodHandles.filterReturnValue(target, handler.adapt()), handler.arity() // ) .unwrap(); } else if (wrapped.isSubtypeOf(Stream.class)) { final ReturnTypeHandler<?> handler = new StreamHandler<>().createHandler(wrapped); return new JavaOutputMapper( this, handler.unwrap(), target -> MethodHandles.filterReturnValue(target, handler.adapt()), handler.arity()).unwrap(); } else if (wrapped.isSubtypeOf(Flowable.class)) { final ReturnTypeHandler<?> handler = new FlowableHandler<>().createHandler(wrapped); return new JavaOutputMapper( this, handler.unwrap(), target -> MethodHandles.filterReturnValue(target, handler.adapt()), handler.arity()).unwrap(); } // other stuffs ... else if (wrapped.isSubtypeOf(Optional.class)) { // return unwrapWith(Optional.class.getMethod("get")); final TypeToken<?> actualType = wrapped.resolveType(Optional.class.getMethod("get").getGenericReturnType()); final Method method = Optional.class.getMethod("orElse", Object.class); MethodHandle filter = ZuluUtils.unreflect(MethodHandles.publicLookup(), method); filter = MethodHandles.insertArguments(filter, 1, new Object[] { null }); // normalize return type final MethodHandle actualFilter = filter .asType(filter.type().changeReturnType(actualType.getRawType())); return new JavaOutputMapper( this, actualType, target -> MethodHandles.filterReturnValue(this.applyTarget(target, method), actualFilter), this.arity + this.arity).unwrap(); } else if (wrapped.isSubtypeOf(CompletableFuture.class)) { return this.unwrapWith(CompletableFuture.class.getMethod("get")); } else if (wrapped.isSubtypeOf(StringBuilder.class)) { return this.unwrap(TypeToken.of(String.class)); } return this; } catch (final Exception ex) { throw new RuntimeException(ex); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Type unwrap() {\n return this;\n }", "@Override\n\tpublic <T> T unwrap(Class<T> type) {\n\t\tif ( type.isAssignableFrom( HibernateCrossParameterConstraintValidatorContext.class ) ) {\n\t\t\treturn type.cast( this );\n\t\t}\n\t\treturn super.unwrap( type );\n\t}", "@Override\n\tpublic <T> T unwrap(Class<T> cls) {\n\t\treturn null;\n\t}", "@Override\n\tpublic Object convert(Class<?> desiredType, Object in) throws Exception {\n\t\treturn null;\n\t}", "@Override\n public Object unwrap() {\n return node;\n }", "public abstract JType unboxify();", "public default T unwrap( Tagged<T> obj ){ return obj.unwrap(); }", "@Override\r\n\tpublic <T> T unwrap(Class<T> arg0) throws SQLException {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic <T> T unwrap(Class<T> arg0) throws SQLException {\n\t\treturn null;\r\n\t}", "@Override\n public TypeWrapper GetWrappedType() {\n return TypeWrapper_Other.NULL;\n }", "protected Type adjustType(Type currentType, Type addedType, Range addedRange) {\n\t\treturn type;\n\t}", "@Override\n\tpublic <T> T unwrap(Class<T> arg0) throws SQLException {\n\t\treturn null;\n\t}", "@Override\n\tpublic <T> T unwrap(Class<T> arg0) throws SQLException {\n\t\treturn null;\n\t}", "public static <T> T unboxAllAs(Object src, Class<T> type) {\n return (T) unboxAll(type, src, 0, -1);\n }", "@Override\r\n\t\t\tpublic <T> T unwrap(Class<T> iface) throws SQLException {\n\t\t\t\treturn null;\r\n\t\t\t}", "@Override\r\n\t\t\tpublic <T> T unwrap(Class<T> iface) throws SQLException {\n\t\t\t\treturn null;\r\n\t\t\t}", "@Override\n\tpublic Type inverse() {\n\t\treturn Nothing.INSTANCE;\n\t}", "@Override\r\n\tpublic <T> T unwrap(Class<T> iface) throws SQLException {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic <T> T unwrap(Class<T> iface) throws SQLException {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic <T> T unwrap(Class<T> iface) throws SQLException {\n\t\treturn null;\r\n\t}", "public void unwrap() throws Exception {\n throw getCause();\n }", "@Override\n\tpublic <T> T unwrap(Class<T> iface) throws SQLException {\n\t\treturn null;\n\t}", "public <T> T unwrap(Class<T> iface) throws SQLException {\n\n debugCode(\"unwrap\");\n throw Message.getUnsupportedException();\n }", "@Override\n\tpublic <T> T unwrap(java.lang.Class<T> iface) \n throws java.sql.SQLException {\n return null;\n }", "public static Object unboxAll(Class<?> type, Object src, int srcPos, int len) {\n switch (tId(type)) {\n case I_BOOLEAN: return unboxBooleans(src, srcPos, len);\n case I_BYTE: return unboxBytes(src, srcPos, len);\n case I_CHARACTER: return unboxCharacters(src, srcPos, len);\n case I_DOUBLE: return unboxDoubles(src, srcPos, len);\n case I_FLOAT: return unboxFloats(src, srcPos, len);\n case I_INTEGER: return unboxIntegers(src, srcPos, len);\n case I_LONG: return unboxLongs(src, srcPos, len);\n case I_SHORT: return unboxShorts(src, srcPos, len);\n }\n throw new IllegalArgumentException(\"No primitive/box: \" + type);\n }", "public static <T> T unboxAllAs(Object src, int srcPos, int len, Class<T> type) {\n return (T) unboxAll(type, src, srcPos, len);\n }", "public static interface UnboxingResponsible {\n\n /**\n * Attempts to unbox the represented type in order to assign the unboxed value to the given target type\n * while using the assigner that is provided by the method call.\n *\n * @param targetType The type that is the desired outcome of the assignment.\n * @param assigner The assigner used to assign the unboxed type to the target type.\n * @param considerRuntimeType If {@code true}, unsafe castings are allowed for this assignment.\n * @return A stack manipulation representing this assignment if such an assignment is possible. An illegal\n * assignment otherwise.\n */\n StackManipulation assignUnboxedTo(TypeDescription targetType, Assigner assigner, boolean considerRuntimeType);\n }", "@Override\n IRcvResponse promote();", "@Override\n\tpublic Type union(Type t) {\n\t\treturn this;\n\t}", "private Type adaptBoundRecursively(Type bound, Adaptation previous) {\n\t\tif (bound.isLinkedToFormalType()) {\n\t\t\tint pos = bound.getFormalType().getPosition();\n\t\t\treturn previous.get(pos);\n\t\t}\n\n\t\tif (bound.isGeneric()) {\n\t\t\t// build a new type definition\n\t\t\tType adaptedBound = new Type(bound.getName(), bound.getIntro());\n\n\t\t\tfor (Type gt : bound.getGenericTypes()) {\n\t\t\t\t// Adapt generic type and replace formal types by previous\n\t\t\t\t// adaptation\n\t\t\t\tType adaptedGt = adaptBoundRecursively(gt, previous);\n\t\t\t\tadaptedBound.addGenericType(adaptedGt);\n\t\t\t}\n\t\t\treturn adaptedBound;\n\t\t}\n\t\treturn bound;\n\t}", "@Named(\"unwrap\")\n default <T> T unwrap(Optional<T> optional) {\n return optional.orElse(null);\n }", "public void fromNative() {\n fromNative(nativeType);\n }", "@Override\n public <Type> Type adaptTo(Class<Type> type) {\n\n if (secondaryResource != null && (type == ValueMap.class || type == Map.class)) {\n if (properties != null) {\n return (Type) properties;\n }\n\n ValueMap contentMap = primaryResource.adaptTo(ValueMap.class);\n ValueMap assetMap = secondaryResource.adaptTo(ValueMap.class);\n\n if (type == ValueMap.class) {\n properties = new MergingValueMap(contentMap, assetMap);\n } else if (type == Map.class) {\n properties = new MergingValueMap(contentMap != null ? new ValueMapDecorator(contentMap) : ValueMap.EMPTY,\n assetMap != null ? new ValueMapDecorator(assetMap) : ValueMap.EMPTY);\n }\n\n return (Type) properties;\n }\n\n return super.adaptTo(type);\n }", "protected IValue narrow(Object result){\n\t\tif(result instanceof Integer) {\n\t\t\treturn vf.integer((Integer)result);\n\t\t}\n\t\tif(result instanceof IValue) {\n\t\t\treturn (IValue) result;\n\t\t}\n\t\tif(result instanceof Thrown) {\n\t\t\t((Thrown) result).printStackTrace(stdout);\n\t\t\treturn vf.string(((Thrown) result).toString());\n\t\t}\n\t\tif(result instanceof Object[]) {\n\t\t\tIListWriter w = vf.listWriter();\n\t\t\tObject[] lst = (Object[]) result;\n\t\t\tfor(int i = 0; i < lst.length; i++){\n\t\t\t\tw.append(narrow(lst[i]));\n\t\t\t}\n\t\t\treturn w.done();\n\t\t}\n\t\tif(result == null){\n\t\t\treturn null;\n\t\t}\n\t\tthrow new InternalCompilerError(\"Cannot convert object back to IValue: \" + result);\n\t}", "public static <T> T deepUnboxAs(Object src, Class<T> result) {\n return (T) deepUnbox(result, src);\n }", "public <T> T unwrap(Class<T> iface) throws SQLException {\n T result;\n try {\n Object cds = mcf.getDataSource();\n\n if (iface.isInstance(cds)) {\n result = iface.cast(cds);\n } else if (cds instanceof java.sql.Wrapper) {\n result = ((java.sql.Wrapper) cds).unwrap(iface);\n } else {\n String msg = localStrings.getString(\"jdbc.feature_not_supported\");\n throw new SQLException(msg);\n }\n } catch (ResourceException e) {\n _logger.log(Level.WARNING, \"jdbc.exc_unwrap\", e);\n throw new SQLException(e);\n }\n return result;\n }", "@Deprecated\n/* */ protected JavaType _narrow(Class<?> subclass)\n/* */ {\n/* 116 */ return _reportUnsupported();\n/* */ }", "@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}", "public static Object unboxAll(Class<?> type, Object src) {\n return unboxAll(type, src, 0, -1);\n }", "@Override\n\tpublic BasicType resolveBasicType(Class javaType) {\n\t\tBasicType basicType = basicTypeMap.get( javaType );\n\t\tif ( basicType == null ) {\n\t\t\tbasicType = new BasicTypeNonOrmImpl( javaType );\n\t\t\tbasicTypeMap.put( javaType, basicType );\n\t\t}\n\t\treturn basicType;\n\t}", "JAVATYPE convert(JAVATYPE oldValue, final METATYPE meta);", "@Override\n default <T> T as(Class<T> type) {\n try { return type.cast(asObject()); }\n catch (ClassCastException ex) {\n LinkedList<Object> ascendingKeyChain = using(this).getAscendingKeyChainWithRoot();\n Object thisKey = ascendingKeyChain.pollLast();\n ascendingKeyChain.add(format(\"*%s*\", thisKey));\n throw new ClassCastException(format(\"'%s' miscast in path %s: %s. Avoid by checking \" +\n \"`if (aDynamic.is(%s.class)) ...` or using `aDynamic.maybe().as(%<s.class)`\",\n thisKey, LiteJoiner.on(ARROW).join(ascendingKeyChain), ex.getMessage(), type.getSimpleName()));\n }\n }", "private Expr boxingUpcastIfNeeded(Expr a, Type fType) {\n if (a instanceof NullLit_c) {\n return makeCast(a.position(), a, fType);\n }\n \n if (Types.baseType(fType) instanceof FunctionType) {\n return upcastToFunctionType(a, (FunctionType)Types.baseType(fType), true);\n }\n \n if (ts.isObjectType(a.type(), context) && ts.isObjectType(fType, context)) {\n // implicit C++ level upcast is good enough (C++ and X10 have same class hierarchy structure)\n return a;\n }\n \n if (!ts.typeDeepBaseEquals(fType, a.type(), context)) {\n Position pos = a.position();\n return makeCast(a.position(), a, fType);\n } else {\n return a;\n }\n }", "@Override\n public TypeDescriptor<?> inferType() throws VilException {\n return TypeRegistry.voidType();\n }", "public StructType unboxed() {\n return new StructType(IntStream.range(0, length()).mapToObj(i -> {\n StructField field = fields[i];\n if (field.type.isObject()) {\n field = new StructField(field.name, field.type.unboxed(), field.measure);\n }\n return field;\n }).toArray(StructField[]::new));\n }", "public Object elConvertType(Object value);", "public abstract Object adjust(Object value, T type);", "private Object getTypeObjectPair() throws MathLinkException, NumberRangeException {\n Object result = null;\n int type = this.getInteger();\n if (type % -17 == -15) {\n type = -7 + -17 * (type / -17);\n } else if (type % -17 == -16) {\n type = -8 + -17 * (type / -17);\n }\n switch (type) {\n case -5: {\n result = new Integer(this.getInteger());\n break;\n }\n case -6: {\n result = new Long(this.getLongInteger());\n break;\n }\n case -4: {\n int i = this.getInteger();\n if (i < -32768 || i > 32767) {\n throw new NumberRangeException(i, \"short\");\n }\n result = new Short((short)i);\n break;\n }\n case -2: {\n int i = this.getInteger();\n if (i < -128 || i > 127) {\n throw new NumberRangeException(i, \"byte\");\n }\n result = new Byte((byte)i);\n break;\n }\n case -3: {\n int i = this.getInteger();\n if (i < 0 || i > 65535) {\n throw new NumberRangeException(i, \"char\");\n }\n result = new Character((char)i);\n break;\n }\n case -15: \n case -7: {\n double d = this.getDouble();\n if (d < -3.4028234663852886E38 || d > 3.4028234663852886E38) {\n throw new NumberRangeException(d, \"float\");\n }\n result = new Float((float)d);\n break;\n }\n case -16: \n case -8: {\n result = new Double(this.getDouble());\n break;\n }\n case -9: {\n int tok = this.getType();\n if (tok == 100000) {\n result = this.getObject();\n break;\n }\n result = this.getString();\n if (tok != 35 || !result.equals(\"Null\")) break;\n result = null;\n break;\n }\n case -1: {\n String s = this.getSymbol();\n if (s.equals(\"True\")) {\n result = Boolean.TRUE;\n break;\n }\n result = Boolean.FALSE;\n break;\n }\n case -13: {\n long mark = this.createMark();\n try {\n int tok = this.getNext();\n if (tok == 100000) {\n result = this.getObject();\n break;\n }\n if (tok == 35) {\n result = this.getSymbol();\n if (result.equals(\"Null\")) {\n result = null;\n break;\n }\n this.seekMark(mark);\n result = this.getComplex();\n break;\n }\n this.seekMark(mark);\n result = this.getComplex();\n }\n finally {\n this.destroyMark(mark);\n }\n }\n case -10: {\n long mark = this.createMark();\n try {\n int tok = this.getType();\n if (tok == 100000) {\n result = this.getObject();\n break;\n }\n if (tok == 35) {\n result = this.getSymbol();\n if (result.equals(\"Null\")) {\n result = null;\n break;\n }\n result = new BigInteger((String)result);\n break;\n }\n result = new BigInteger(this.getString());\n }\n finally {\n this.destroyMark(mark);\n }\n }\n case -11: {\n long mark = this.createMark();\n try {\n int tok = this.getType();\n if (tok == 100000) {\n result = this.getObject();\n break;\n }\n if (tok == 35) {\n result = this.getSymbol();\n if (result.equals(\"Null\")) {\n result = null;\n break;\n }\n result = Utils.bigDecimalFromString((String)result);\n break;\n }\n result = Utils.bigDecimalFromString(this.getString());\n }\n finally {\n this.destroyMark(mark);\n }\n }\n case -12: {\n long mark = this.createMark();\n try {\n int tok = this.getNext();\n if (tok == 100000 && (result = this.getObject()) != null) break;\n this.seekMark(mark);\n result = this.getExpr();\n }\n finally {\n this.destroyMark(mark);\n }\n }\n case -14: {\n result = this.getObject();\n break;\n }\n case -10000: {\n break;\n }\n default: {\n int tok = this.getNext();\n result = tok == 100000 || tok == 35 ? this.getObject() : (type > -34 ? this.getArray(type - -17, 1) : (type > -51 ? this.getArray(type - -34, 2) : (type > -68 ? this.getArray(type - -51, 3) : (type > -85 ? this.getArray(type - -68, 4) : this.getArray(type - -85, 5)))));\n }\n }\n return result;\n }", "@Override\n\t\t\tprotected Type convert(String text) {\n\t\t\t\tType t = null;\n\t\t\t\ttry {\n\t\t\t\t\t// return null if the types do not match the\n\t\t\t\t\t// original\n\t\t\t\t\tt = Type.getType(text);\n\t\t\t\t\tif (t == null || !match(t, original)) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {}\n\t\t\t\treturn t;\n\t\t\t}", "public DeclaredType toTypeDec()\r\n {\r\n return this;\r\n }", "public KnownMediaType normalize() {\n KnownMediaType kmt = this;\n while (kmt.getAliasOf() != null) {\n kmt = kmt.getAliasOf();\n }\n return kmt;\n }", "protected Object readResolve() {\n return valueOf(v);\n }", "@SuppressWarnings(\"unchecked\")\n @Override\n public MultiCatch withType(@Nullable JavaType type) {\n return this;\n }", "public Object convertToType(ELContext context, Object obj, Class<?> targetType) {\n/* 522 */ context.setPropertyResolved(false);\n/* */ \n/* 524 */ Object value = null;\n/* 525 */ for (int i = 0; i < this.size; i++) {\n/* 526 */ value = this.elResolvers[i].convertToType(context, obj, targetType);\n/* 527 */ if (context.isPropertyResolved()) {\n/* 528 */ return value;\n/* */ }\n/* */ } \n/* 531 */ return null;\n/* */ }", "public static Expression unwrap( Expression expr ) {\n\tType etype = ExpressionInternal.class.cast(expr).type() ;\n\n\tif (etype.equals( _t(\"java.lang.Boolean\")))\n\t return _call( expr, \"booleanValue\", _s(_boolean()) ) ;\n\telse if (etype.equals( _t(\"java.lang.Byte\") ))\n\t return _call( expr, \"byteValue\", _s(_byte()) ) ;\n\telse if (etype.equals( _t(\"java.lang.Character\") ))\n\t return _call( expr, \"charValue\", _s(_char()) ) ;\n\telse if (etype.equals( _t(\"java.lang.Short\") ))\n\t return _call( expr, \"shortValue\", _s(_short()) ) ;\n\telse if (etype.equals( _t(\"java.lang.Integer\") ))\n\t return _call( expr, \"intValue\", _s(_int()) ) ;\n\telse if (etype.equals( _t(\"java.lang.Long\") ))\n\t return _call( expr, \"longValue\", _s(_long()) ) ;\n\telse if (etype.equals( _t(\"java.lang.Float\") ))\n\t return _call( expr, \"floatValue\", _s(_float()) ) ;\n\telse if (etype.equals( _t(\"java.lang.Double\") ))\n\t return _call( expr, \"doubleValue\", _s(_double()) ) ;\n\telse return expr ;\n }", "public TypeBinding resolveType(ClassScope scope) {\n\tthis.constant = Constant.NotAConstant;\n\tif (this.resolvedType != null) // is a shared type reference which was already resolved\n\t\treturn this.resolvedType.isValidBinding() ? this.resolvedType : null; // already reported error\n\n\tTypeBinding type = this.resolvedType = getTypeBinding(scope);\n\tif (this.resolvedType == null)\n\t\treturn null; // detected cycle while resolving hierarchy\t\n\tif (!this.resolvedType.isValidBinding()) {\n\t\treportInvalidType(scope);\n\t\treturn null;\n\t}\n\tif (isTypeUseDeprecated(this.resolvedType, scope))\n\t\treportDeprecatedType(scope);\n\ttype = scope.environment().convertToRawType(type);\n\tif (type.isRawType() \n\t\t\t&& (this.bits & IgnoreRawTypeCheck) == 0 \n\t\t\t&& scope.compilerOptions().getSeverity(CompilerOptions.RawTypeReference) != ProblemSeverities.Ignore) {\n\t\tscope.problemReporter().rawTypeReference((/*@OwnPar*/ /*@NoRep*/ TypeReference)this, type);\n\t}\t\t\t\n\treturn this.resolvedType = type;\t\n}", "public <A> A adapt(Class<A> type) {\n throw new UnsupportedOperationException();\n }", "@Override\n\tpublic Object visitType(Type type) {\n\t\treturn null;\n\t}", "@Override\n public <T extends J> T withType(@Nullable JavaType type) {\n return (T) this;\n }", "public void changeToType(TYPE type){\n this.type=type;\n return;\n }", "public abstract JavaType resolveType(java.lang.reflect.Type jdkType);", "public void unKingMe() {\r\n this.type = Type.SINGLE;\r\n }", "static <R, T extends R> R upcast(T fv) {\n return fv;\n }", "public <T> T cast();", "@Override\r\n\tpublic void cast() {\n\r\n\t}", "public Quantity coerceTo(Stella_Object y) {\n { Ratio x = this;\n\n { Surrogate testValue000 = Stella_Object.safePrimaryType(y);\n\n if (Surrogate.subtypeOfP(testValue000, Utilities.SGT_UTILITIES_RATIO)) {\n { Ratio y000 = ((Ratio)(y));\n\n return (y000);\n }\n }\n else if (Surrogate.subtypeOfIntegerP(testValue000)) {\n { IntegerWrapper y000 = ((IntegerWrapper)(y));\n\n return (Ratio.makeRatio(y000.wrapperValue, 1));\n }\n }\n else {\n { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();\n\n stream000.nativeStream.print(\"Can't convert `\" + y + \"' to a RATIO\");\n throw ((IncompatibleQuantityException)(IncompatibleQuantityException.newIncompatibleQuantityException(stream000.theStringReader()).fillInStackTrace()));\n }\n }\n }\n }\n }", "TypeDec getTarget();", "protected TypeMapper<?> normalizeSemantics() {\n\t\tEvent event = SpeedTracerLogger\n\t\t\t\t.start(CompilerEventType.JAVA_NORMALIZERS);\n\t\ttry {\n\t\t\tDevirtualizer.exec(jprogram);\n\t\t\tCatchBlockNormalizer.exec(jprogram);\n\t\t\tPostOptimizationCompoundAssignmentNormalizer.exec(jprogram);\n\t\t\tLongCastNormalizer.exec(jprogram);\n\t\t\tLongEmulationNormalizer.exec(jprogram);\n\t\t\tTypeCoercionNormalizer.exec(jprogram);\n\t\t\tif (options.isIncrementalCompileEnabled()) {\n\t\t\t\t// Per file compilation reuses type JS even as references (like\n\t\t\t\t// casts) in other files\n\t\t\t\t// change, which means all legal casts need to be allowed now\n\t\t\t\t// before they are actually\n\t\t\t\t// used later.\n\t\t\t\tComputeExhaustiveCastabilityInformation.exec(jprogram);\n\t\t\t} else {\n\t\t\t\t// If trivial casts are pruned then one can use smaller runtime\n\t\t\t\t// castmaps.\n\t\t\t\tComputeCastabilityInformation.exec(jprogram,\n\t\t\t\t\t\t!shouldOptimize() /* recordTrivialCasts */);\n\t\t\t}\n\t\t\tImplementCastsAndTypeChecks.exec(jprogram,\n\t\t\t\t\tshouldOptimize() /* pruneTrivialCasts */);\n\t\t\tImplementJsVarargs.exec(jprogram);\n\t\t\tArrayNormalizer.exec(jprogram);\n\t\t\tEqualityNormalizer.exec(jprogram);\n\t\t\tTypeMapper<?> typeMapper = getTypeMapper();\n\t\t\tResolveRuntimeTypeReferences.exec(jprogram, typeMapper,\n\t\t\t\t\tgetTypeOrder());\n\t\t\treturn typeMapper;\n\t\t} finally {\n\t\t\tevent.end();\n\t\t}\n\t}", "@Override\r\n\t\tpublic final INamedElement resolveTypeForValueContext() {\n\t\t\treturn null;\r\n\t\t}", "@Override public Type make_nil(byte nil) { return make(nil,_any); }", "@Override\r\n\tpublic Package adaptedPackage() {\n\t\treturn null;\r\n\t}", "@Override\n int convertBackward(int unused) {\n throw new UnsupportedOperationException();\n }", "@Override\n\tpublic BasicType resolveCastTargetType(String name) {\n\t\torg.hibernate.type.BasicType ormBasicType = (org.hibernate.type.BasicType) sessionFactory.getTypeHelper().heuristicType( name );\n\t\tif ( ormBasicType == null ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn resolveBasicType( ormBasicType.getReturnedClass() );\n\t}", "public abstract Barrier inverseKnockType();", "private static void unifyToTerminal(Solution solution, Type.Terminal t, Type from) {\n\t\tsolution.bottom(t, from); // add conformance coercions before else\n\t}", "protected Object readResolve() throws ObjectStreamException {\n\t\tfinalizeData();\n\t\treturn this;\n\t}", "public static void unbox(Class type, MethodVisitor mv) {\n if (type.isPrimitive() && type != Void.TYPE) {\n String returnString = \"(Ljava/lang/Object;)\" + getTypeDescription(type);\n mv.visitMethodInsn(\n Opcodes.INVOKESTATIC,\n getClassInternalName(DefaultTypeTransformation.class.getName()),\n type.getName() + \"Unbox\",\n returnString);\n }\n }", "@Override\n public Optional<TypeContext<Reference>> typeContext() {\n return wrappedSerializationContext.typeContext();\n }", "public static Number toNumber(Object obj, Class<?> type) {\n if (obj == null) {\n return null;\n }\n // Integer, Long and BigDecimal are prior\n if (type == Integer.class) {\n return toInteger(obj);\n } else if (type == Long.class) {\n return toLong(obj);\n } else if (type == BigDecimal.class) {\n return toBigDecimal(obj);\n } else if (type == Double.class) {\n return toDouble(obj);\n } else if (type == Float.class) {\n return toFloat(obj);\n } else if (type == Short.class) {\n return toShort(obj);\n } else if (type == Byte.class) {\n return toByte(obj);\n } else if (type == BigInteger.class) {\n return toBigInteger(obj);\n }\n return null; // could not convert\n }", "protected <T> T convert(Object value, Class<T> type) {\r\n return typeConversionManager.convert(value, type);\r\n }", "void unsetType();", "public T caseFieldType(FieldType object)\n {\n return null;\n }", "public abstract Type getSpecializedType(Type type);", "@Override\n public Object convert(Object dest, Object source, Class<?> aClass, Class<?> aClass1) {\n return null;\n\n }", "public static UnaryExpression unbox(Expression expression, Class type) {\n return makeUnary(ExpressionType.Unbox, expression, type);\n }", "public T caseFieldType(FieldType object) {\n\t\treturn null;\n\t}", "public T caseDatatype(Datatype object)\n {\n return null;\n }", "public interface Type<SomeType extends Type<SomeType, SomeThing>,\n SomeThing extends Thing<SomeThing, SomeType>>\n extends SchemaConcept<SomeType> {\n\n @Deprecated\n @CheckReturnValue\n @Override\n default Type<SomeType, SomeThing> asType() {\n return this;\n }\n\n @Override\n Remote<SomeType, SomeThing> asRemote(GraknClient.Transaction tx);\n\n @Deprecated\n @CheckReturnValue\n @Override\n default boolean isType() {\n return true;\n }\n\n interface Local<\n SomeType extends Type<SomeType, SomeThing>,\n SomeThing extends Thing<SomeThing, SomeType>>\n extends SchemaConcept.Local<SomeType>, Type<SomeType, SomeThing> {\n }\n\n /**\n * A Type represents any ontological element in the graph.\n * Types are used to model the behaviour of Thing and how they relate to each other.\n * They also aid in categorising Thing to different types.\n */\n interface Remote<\n SomeRemoteType extends Type<SomeRemoteType, SomeRemoteThing>,\n SomeRemoteThing extends Thing<SomeRemoteThing, SomeRemoteType>>\n extends SchemaConcept.Remote<SomeRemoteType>, Type<SomeRemoteType, SomeRemoteThing> {\n\n //------------------------------------- Modifiers ----------------------------------\n\n /**\n * Changes the Label of this Concept to a new one.\n *\n * @param label The new Label.\n * @return The Concept itself\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> label(Label label);\n\n /**\n * Sets the Type to be abstract - which prevents it from having any instances.\n *\n * @param isAbstract Specifies if the concept is to be abstract (true) or not (false).\n * @return The concept itself\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> isAbstract(Boolean isAbstract);\n\n /**\n * @param role The Role Type which the instances of this Type are allowed to play.\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> plays(Role role);\n\n /**\n * Creates a RelationType which allows this type and a AttributeType to be linked in a strictly one-to-one mapping.\n *\n * @param attributeType The AttributeType which instances of this type should be allowed to play.\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> key(AttributeType<?> attributeType);\n\n /**\n * Creates a RelationType which allows this type and a AttributeType to be linked.\n *\n * @param attributeType The AttributeType which instances of this type should be allowed to play.\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> has(AttributeType<?> attributeType);\n\n //------------------------------------- Accessors ---------------------------------\n\n /**\n * @return A list of Role Types which instances of this Type can indirectly play.\n */\n Stream<Role.Remote> playing();\n\n /**\n * @return The AttributeTypes which this Type is linked with.\n */\n @CheckReturnValue\n Stream<? extends AttributeType.Remote<?>> attributes();\n\n /**\n * @return The AttributeTypes which this Type is linked with as a key.\n */\n @CheckReturnValue\n Stream<? extends AttributeType.Remote<?>> keys();\n\n /**\n * @return All the the super-types of this Type\n */\n @Override\n Stream<? extends Type.Remote<SomeRemoteType, SomeRemoteThing>> sups();\n\n /**\n * Get all indirect sub-types of this type.\n * The indirect sub-types are the type itself and all indirect sub-types of direct sub-types.\n *\n * @return All the indirect sub-types of this Type\n */\n @Override\n @CheckReturnValue\n Stream<? extends Type.Remote<SomeRemoteType, SomeRemoteThing>> subs();\n\n /**\n * Get all indirect instances of this type.\n * The indirect instances are the direct instances and all indirect instances of direct sub-types.\n *\n * @return All the indirect instances of this type.\n */\n @CheckReturnValue\n Stream<? extends Thing.Remote<SomeRemoteThing, SomeRemoteType>> instances();\n\n /**\n * Return if the type is set to abstract.\n * By default, types are not abstract.\n *\n * @return returns true if the type is set to be abstract.\n */\n @CheckReturnValue\n Boolean isAbstract();\n\n //------------------------------------- Other ----------------------------------\n\n /**\n * Removes the ability of this Type to play a specific Role\n *\n * @param role The Role which the Things of this Type should no longer be allowed to play.\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> unplay(Role role);\n\n /**\n * Removes the ability for Things of this Type to have Attributes of type AttributeType\n *\n * @param attributeType the AttributeType which this Type can no longer have\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> unhas(AttributeType<?> attributeType);\n\n /**\n * Removes AttributeType as a key to this Type\n *\n * @param attributeType the AttributeType which this Type can no longer have as a key\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> unkey(AttributeType<?> attributeType);\n\n @Deprecated\n @CheckReturnValue\n @Override\n default Type.Remote<SomeRemoteType, SomeRemoteThing> asType() {\n return this;\n }\n\n @Deprecated\n @CheckReturnValue\n @Override\n default boolean isType() {\n return true;\n }\n }\n}", "private Object readResolve() {\r\n return this;\r\n }", "@Override\r\n\tpublic TypeWrapper getSuperClass() {\n\t\treturn null;\r\n\t}", "public T caseType(Type object) {\r\n\t\treturn null;\r\n\t}", "private void resolveSuperTypes(AnnotatedType annotatedType, ModelConverterContext context) {\n\n Type type = annotatedType.getType();\n JavaType javaType = objectMapper().getTypeFactory().constructType(type);\n\n // Find the 'furthest' supertype which contributes to the exposed API\n JavaType javaSuperType = javaType.getSuperClass();\n\n SerializationConfig serializationConfig = _mapper.getSerializationConfig();\n AnnotationIntrospector introspector = serializationConfig.getAnnotationIntrospector();\n\n if (javaSuperType != null && !javaSuperType.hasGenericTypes()\n && introspector.findSubtypes(serializationConfig.introspect(javaSuperType).getClassInfo()) != null\n && !definedTypes.containsValue(javaSuperType)) {\n context.resolve(new AnnotatedType().type(javaSuperType).ctxAnnotations(javaSuperType.getRawClass().getAnnotations()));\n }\n }", "final void setUncheckedTypeNum(int newSize) {\n fCTCount = newSize;\n fComplexTypeDecls = resize(fComplexTypeDecls, fCTCount);\n }", "@Override\n\t\t\t\t\tpublic Package handleTypeCollection(Package parent,\n\t\t\t\t\t\t\tFTypeCollection src) {\n\t\t\t\t\t\treturn super.handleTypeCollection(parent, src);\n\t\t\t\t\t}", "public TypeBinding resolveType(BlockScope scope, boolean checkBounds) {\n\tthis.constant = Constant.NotAConstant;\n\tif (this.resolvedType != null) // is a shared type reference which was already resolved\n\t\treturn this.resolvedType.isValidBinding() ? this.resolvedType : null; // already reported error\n\n\tTypeBinding type = this.resolvedType = getTypeBinding(scope);\n\tif (this.resolvedType == null)\n\t\treturn null; // detected cycle while resolving hierarchy\t\n\tif (!this.resolvedType.isValidBinding()) {\n\t\treportInvalidType(scope);\n\t\treturn null;\n\t}\n\tif (isTypeUseDeprecated(this.resolvedType, scope))\n\t\treportDeprecatedType(scope);\n\ttype = scope.environment().convertToRawType(type);\n\tif (type.isRawType() \n\t\t\t&& (this.bits & IgnoreRawTypeCheck) == 0 \n\t\t\t&& scope.compilerOptions().getSeverity(CompilerOptions.RawTypeReference) != ProblemSeverities.Ignore) {\t\n\t\tscope.problemReporter().rawTypeReference((/*@OwnPar*/ /*@NoRep*/ TypeReference)this, type);\n\t}\t\t\t\n\treturn this.resolvedType = type;\n}", "protected CastorSupport getInstanceOfCastorSupport(ClassLoader clsLdr) {\n CastorSupport retCastorSupport = null;\n boolean oldAPIJar = true;\n try {\n // getComplexType() was added in 5.0.4\n Method getComplexType = CastorSupport.class.getDeclaredMethod(\"getComplexType\", new Class[0]);\n oldAPIJar = (getComplexType == null);\n } catch (Exception e) {\n oldAPIJar = true;\n }\n \n if (oldAPIJar) {\n retCastorSupport = new CastorSupportImpl();\n } else {\n retCastorSupport = CastorSupport.getInstance(clsLdr);\n }\n \n return retCastorSupport;\n }", "@Override\n\tprotected ElderMood transformOne(ElderFrequency in) {\n\t\treturn null;\n\t}", "@Override\n public Adapter adapt(Notifier notifier, Object type)\n {\n return super.adapt(notifier, this);\n }" ]
[ "0.7003844", "0.5990618", "0.5760292", "0.55089474", "0.52970827", "0.5258516", "0.5252028", "0.5241874", "0.5241874", "0.52217245", "0.51937515", "0.5153381", "0.5153381", "0.5132005", "0.5131919", "0.5131919", "0.51236653", "0.50494504", "0.50494504", "0.50494504", "0.49894735", "0.4983637", "0.49793625", "0.49502546", "0.49461007", "0.49373853", "0.4897362", "0.48917183", "0.48913914", "0.48894268", "0.488191", "0.48772585", "0.487551", "0.48709494", "0.48304424", "0.48249096", "0.4814898", "0.47966507", "0.47966507", "0.47966507", "0.47873974", "0.4757353", "0.47485346", "0.4711336", "0.47067812", "0.47062993", "0.46764305", "0.46565485", "0.46313164", "0.4609394", "0.45953563", "0.45841306", "0.4577654", "0.4577091", "0.45535433", "0.45487592", "0.45410508", "0.4534822", "0.45260888", "0.4518323", "0.4511489", "0.4499571", "0.4491952", "0.4488744", "0.44803232", "0.4476411", "0.44610208", "0.44596547", "0.44341743", "0.4423207", "0.442218", "0.44218847", "0.4420089", "0.44188252", "0.44181168", "0.4414579", "0.4407912", "0.44062015", "0.44054282", "0.4405365", "0.43998516", "0.4397237", "0.43935907", "0.43890575", "0.43808722", "0.43793926", "0.43790662", "0.43645296", "0.4357165", "0.4356967", "0.4331962", "0.43214867", "0.43172497", "0.4313179", "0.43125328", "0.43105945", "0.4307765", "0.43072674", "0.4306793", "0.42985925" ]
0.5720181
3
if the return value can be null.
public boolean isNullable() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean canProcessNull() {\n return false;\n }", "boolean isNilValue();", "boolean checkNull();", "@Override\n public boolean isMaybeNull() {\n checkNotPolymorphicOrUnknown();\n return (flags & NULL) != 0;\n }", "default boolean hasValue() {\n\t\t\treturn getValue() != null;\n\t\t}", "public boolean isNonNull() {\n return true;\n }", "public boolean is_pure_nil() {return true;}", "public boolean anyNull () ;", "boolean getNullable();", "boolean supportsNotNullable();", "public final synchronized boolean wasNull() \n throws SQLException\n {\n return getCallableStatement().wasNull();\n }", "private V isertNullKey(K key, V value) {\n return value;\n }", "boolean getActiveNull();", "public boolean isNull(){\n return false;\n }", "public boolean canBeNullObject() { // for future, nobody calls when first\n return _canBeNullObject;\n }", "boolean isIsNotNull();", "public boolean hasValue() {\n return value_ != null;\n }", "boolean isNull();", "@java.lang.Override\n public boolean hasVal() {\n return val_ != null;\n }", "boolean isNullable();", "boolean isNullable();", "boolean isNullable();", "public boolean trySuccess()\r\n/* 52: */ {\r\n/* 53: 84 */ return trySuccess(null);\r\n/* 54: */ }", "default boolean isPresent() {\n return get() != null;\n }", "default boolean isPresent() {\n return get() != null;\n }", "public boolean hasValue() { return false; }", "@Override\n public boolean isNull(){\n return (this.nativeHandle == 0L); \n }", "public static <T> T checkIfNull(T value) {\n if(value == null) {\n throw new NullPointerException(value +\"== null\");\n }\n return value;\n }", "boolean getValueCharacteristicIdNull();", "public boolean isPresent() {\r\n\t\treturn value != null;\r\n\t}", "boolean containsValue(Object value) throws NullPointerException;", "boolean getSearchValueNull();", "public boolean allowsNull() {\n return this.allowsNullValue;\n }", "boolean hasOptionalValue();", "public Object getResult()\n/* */ {\n/* 129 */ Object resultToCheck = this.result;\n/* 130 */ return resultToCheck != RESULT_NONE ? resultToCheck : null;\n/* */ }", "boolean getRecursiveNull();", "default V getOrThrow() {\n return getOrThrow(\"null\");\n }", "public boolean isNullable() {\r\n return isNullable;\r\n }", "public final boolean isNull()\n\t{\n\t\treturn (dataValue == null) && (stream == null) && (_blobValue == null);\n\t}", "public boolean isNotNullMcc() {\n return genClient.cacheValueIsNotNull(CacheKey.mcc);\n }", "public boolean mo5366c() {\n throw null;\n }", "public boolean isNullInstance()\n {\n return code == null;\n }", "boolean getValueLanguageIdNull();", "T getNullValue();", "public boolean hasResult()\n/* */ {\n/* 119 */ return this.result != RESULT_NONE;\n/* */ }", "public TestCase isNull( Object obj );", "public Object getElseValue();", "public boolean isNull() {\n return this.data == null;\n }", "public class_1562 method_207() {\r\n return null;\r\n }", "int checkNull(int value) {\n return (value != Tables.INTNULL ? value : 0);\n }", "@Nullable\n public\n Object\n foo () {\n return null;\n }", "public boolean isNotNullSupportsNakedCredit() {\n return genClient.cacheValueIsNotNull(CacheKey.supportsNakedCredit);\n }", "boolean getCalledOnNullInput();", "@SuppressWarnings(\"UnusedDeclaration\")\n public IsNull() {\n super();\n }", "public boolean isNull() {\n return originalValue == null;\n }", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "public boolean checkValue(Object obj) {\n\treturn (obj instanceof Long) || (obj == null) ;\n }", "public boolean hasValue() {\n return valueBuilder_ != null || value_ != null;\n }", "public boolean isNullable() {\n return _isNullable;\n }", "public boolean isNullable() {\n return _isNullable;\n }", "public boolean isNull() {\n return false;\n }", "public boolean isNotNullTid() {\n return genClient.cacheValueIsNotNull(CacheKey.tid);\n }", "public boolean isNullOrUndef() {\n checkNotPolymorphicOrUnknown();\n return (flags & (NULL | UNDEF)) != 0\n && (flags & (NUM | STR | BOOL)) == 0 && num == null && str == null && object_labels == null && getters == null && setters == null;\n }", "private boolean hasValue (String s) { return s != null && s.length() != 0; }", "boolean isNullOmittable();", "public static final Function<Object,Boolean> isNull() {\r\n return FnObject.isNull();\r\n }", "static public boolean isNull(Object value) {\r\n\t\treturn value == null || value instanceof JSNull;\r\n\t}", "public boolean isNull() {\n\t\treturn false;\n\t}", "public boolean isNull()\n\t{\n\t\treturn cp.isNull();\n\t}", "@Override\n\tpublic void flagNull() {\n\t\t\n\t}", "boolean hasVal();", "boolean hasVal();", "boolean isValue();", "public static boolean isNull()\r\n {\r\n return (page == null);\r\n }", "private boolean isNull(Object anObject) {\n\t\tif(anObject == null) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean hasValue() {\n return result.hasValue();\n }", "public boolean hasValue() {\n return result.hasValue();\n }", "@Override\n\tpublic boolean getIncludesNull() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean containsValue(Object arg0) {\n\t\treturn false;\n\t}", "boolean getCampaignIdNull();", "public static Value makeNull() {\n return theNull;\n }", "public boolean isNull() {\n return channel instanceof NullChannel;\n }", "private boolean checkForNull(IfStmt ifStmt) {\n boolean isNull = false;\n BinaryExpr ifAsBinary = ifStmt.getCondition().asBinaryExpr();\n isNull |= ifAsBinary.getLeft().isNullLiteralExpr();\n isNull |= ifAsBinary.getRight().isNullLiteralExpr();\n return isNull;\n }", "private boolean m2255q() {\n return this.f2952a == ValueType.nullValue;\n }", "private static void checkNull(Object value, String name) throws LateDeliverablesProcessingException {\r\n if (value == null) {\r\n throw new LateDeliverablesProcessingException(\"The \" + name + \" should not be null.\");\r\n }\r\n }", "public boolean isNullable() {\r\n\t\treturn nullable;\r\n\t}", "@Override\npublic Boolean isEmpty() {\n\treturn null;\n}" ]
[ "0.7214331", "0.7116604", "0.71157485", "0.7019456", "0.70142055", "0.6770774", "0.67620575", "0.67236114", "0.66012156", "0.6563285", "0.6534668", "0.6523556", "0.6474088", "0.6473226", "0.6472699", "0.6466505", "0.64425224", "0.64400107", "0.6425961", "0.64250135", "0.64250135", "0.64250135", "0.64005166", "0.6363575", "0.6363575", "0.63607085", "0.6324371", "0.63089716", "0.62897974", "0.6288808", "0.6257707", "0.6224154", "0.62213874", "0.62000865", "0.61961514", "0.61927223", "0.6186256", "0.61797106", "0.6146838", "0.6138753", "0.61379796", "0.61320245", "0.61294687", "0.611772", "0.61126333", "0.61124796", "0.6101184", "0.6088561", "0.60803735", "0.6079649", "0.60677755", "0.6048385", "0.6035559", "0.60157555", "0.60065216", "0.60054356", "0.60054356", "0.60054356", "0.60054356", "0.60054356", "0.60054356", "0.60054356", "0.60054356", "0.60054356", "0.60054356", "0.60054356", "0.60054356", "0.60054356", "0.60054356", "0.5990891", "0.5975706", "0.59655416", "0.59655416", "0.59641224", "0.5955272", "0.59538347", "0.5944764", "0.59414715", "0.5939536", "0.59367144", "0.59322226", "0.5925095", "0.5916107", "0.59139484", "0.59139484", "0.5907827", "0.5904102", "0.5872392", "0.5868469", "0.5868469", "0.5854452", "0.5850136", "0.58473", "0.5846139", "0.5841626", "0.58235246", "0.5822545", "0.58215773", "0.5821245", "0.5816229" ]
0.6437613
18
Creates a processing entry.
ProcessingEntry(int tasks, int executors, int workers) { this.tasks = Math.max(0, tasks); this.executors = Math.max(0, executors); this.workers = Math.max(0, workers); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ua.org.gostroy.guestbook.model.Entry3 create(long entryId);", "public Entry create(int compoID,\n\t\t\tint entryID,\n\t\t\tString entryName,\n\t\t\tString entryDesc,\n\t\t\tString entryAuthor) throws CreateException, RemoteException;", "public DataEntry create(long dataEntryId);", "TarEntry CreateEntry(String name);", "@Override\n\tpublic com.idetronic.eis.model.KpiEntry createKpiEntry(long kpiEntryId) {\n\t\treturn _kpiEntryLocalService.createKpiEntry(kpiEntryId);\n\t}", "public static Process createEntity() {\n Process process = new Process()\n .name(DEFAULT_NAME)\n .isRunning(DEFAULT_IS_RUNNING)\n .createdAt(DEFAULT_CREATED_AT)\n .updatedAt(DEFAULT_UPDATED_AT);\n return process;\n }", "@Override\n public AlgorithmProcess createProcess() {\n return new FileLoaderProcess(file);\n }", "public static CreationEntry createSimpleEntry(int aPrimarySkill, int aObjectSource, int aObjectTarget, int aObjectCreated, boolean depleteSource, boolean depleteTarget, float aPercentageLost, boolean depleteEqually, boolean aCreateOnGround, CreationCategories aCategory) {\n/* 3586 */ CreationEntry entry = new SimpleCreationEntry(aPrimarySkill, aObjectSource, aObjectTarget, aObjectCreated, depleteSource, depleteTarget, aPercentageLost, depleteEqually, aCreateOnGround, aCategory);\n/* */ \n/* 3588 */ CreationMatrix.getInstance().addCreationEntry(entry);\n/* 3589 */ return entry;\n/* */ }", "public interface IEntryFactory\n\t{\n\t\t/** \n\t\t Create an entry based on name alone\n\t\t \n\t\t @param name\n\t\t Name of the new EntryPointNotFoundException to create\n\t\t \n\t\t @return created TarEntry or descendant class\n\t\t*/\n\t\tTarEntry CreateEntry(String name);\n\n\t\t/** \n\t\t Create an instance based on an actual file\n\t\t \n\t\t @param fileName\n\t\t Name of file to represent in the entry\n\t\t \n\t\t @return \n\t\t Created TarEntry or descendant class\n\t\t \n\t\t*/\n\t\tTarEntry CreateEntryFromFile(String fileName);\n\n\t\t/** \n\t\t Create a tar entry based on the header information passed\n\t\t \n\t\t @param headerBuffer\n\t\t Buffer containing header information to create an an entry from.\n\t\t \n\t\t @return \n\t\t Created TarEntry or descendant class\n\t\t \n\t\t*/\n\t\tTarEntry CreateEntry(byte[] headerBuffer);\n\t}", "public static CreationEntry createSimpleEntry(int aPrimarySkill, int aObjectSource, int aObjectTarget, int aObjectCreated, boolean depleteSource, boolean depleteTarget, float aPercentageLost, boolean depleteEqually, boolean aCreateOnGround, int aCustomCreationCutOff, double aMinimumSkill, CreationCategories aCategory) {\n/* 3645 */ CreationEntry entry = new SimpleCreationEntry(aPrimarySkill, aObjectSource, aObjectTarget, aObjectCreated, depleteSource, depleteTarget, aPercentageLost, depleteEqually, aCreateOnGround, aCustomCreationCutOff, aMinimumSkill, aCategory);\n/* */ \n/* */ \n/* 3648 */ CreationMatrix.getInstance().addCreationEntry(entry);\n/* 3649 */ return entry;\n/* */ }", "public void addEntry() {\n\t\tSystem.out.print(\"Name: \");\n\t\tString entryName = getInputForName();\n\t\tSystem.out.print(\"Number: \");\n\t\tint entryNumber = getInputForNumber();\n\t\t\n\t\tp = new PhoneEntry(entryName, entryNumber);\n\t\t\n\t\ttry {\n\t\t\tphoneList.add(p);\n\t\t\twriteFile();\n\t\t\t\n\t\t\tSystem.out.println(\"Entry \" + p.getName() + \" has been added.\");\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.err.println(\"Could not write item into array.\");\n\t\t}\n\t}", "private static DataBaseEntry createEntry(String line) {\n int eq = line.indexOf(\"=\");\n if (eq < 0) {\n System.err.println(\"not found '=' in line \" + line);\n }\n int hash = line.indexOf(\"#\");\n if (hash < 0) {\n System.err.println(\"not found '#' in line \" + line);\n }\n String file = line.substring(0, eq);\n String cwd = line.substring(eq+1, hash);\n String compileString = line.substring(hash+1);\n \n CompileLineEntryBuilder builder = new CompileLineEntryBuilder(file);\n for (String option : splitCommandLine(compileString)) {\n builder.handle(option);\n }\n return builder.createDataBaseEntry();\n }", "private HashGroupifyEntry createEntry(final int row, final int index, final int hash, final int line) {\n final HashGroupifyEntry entry = new HashGroupifyEntry(this.dataOutput, row, hash);\n entry.next = hashTableBuckets[index];\n entry.representative = line;\n hashTableBuckets[index] = entry;\n if (hashTableFirstEntry == null) {\n hashTableFirstEntry = entry;\n hashTableLastEntry = entry;\n } else {\n hashTableLastEntry.nextOrdered = entry;\n hashTableLastEntry = entry;\n }\n return entry;\n }", "EntryPoint createEntryPoint();", "public String createProcessInstance(DataRecord data)\r\n throws ProcessManagerException {\r\n try {\r\n Action creation = processModel.getCreateAction();\r\n TaskDoneEvent event = getCreationTask().buildTaskDoneEvent(\r\n creation.getName(), data);\r\n Workflow.getWorkflowEngine().process(event);\r\n return event.getProcessInstance().getInstanceId();\r\n } catch (WorkflowException e) {\r\n throw new ProcessManagerException(\"SessionController\",\r\n \"processManager.CREATION_PROCESSING_FAILED\", e);\r\n }\r\n }", "public final TarEntry CreateEntry(String name)\n\t\t{\n\t\t\treturn TarEntry.CreateTarEntry(name);\n\t\t}", "protected SafeHashMap.Entry<K, V> instantiateEntry()\n {\n return new Entry<>();\n }", "public ScriptureEntry(String bk, int chap, String vrs, String sermon, int para){\n this(new ScriptCit(bk, chap, vrs), null);\n this.add(sermon, para);\n }", "public final TarEntry CreateEntry(byte[] headerBuffer)\n\t\t{\n\t\t\treturn new TarEntry(headerBuffer);\n\t\t}", "private static Process createProcessFromInput(String inputLine){\n int resA, resB, resC, neededA, neededB, neededC;\n\n inputLine = inputLine.replaceAll(\"\\\\[|\\\\]\", \"\"); //remove brackets\n String[] resourceInfo = inputLine.split(\" \");\n\n resA = Integer.parseInt(resourceInfo[0]);\n resB = Integer.parseInt(resourceInfo[1]);\n resC = Integer.parseInt(resourceInfo[2]);\n neededA = Integer.parseInt(resourceInfo[3]);\n neededB = Integer.parseInt(resourceInfo[4]);\n neededC = Integer.parseInt(resourceInfo[5]);\n\n int[] processInfo = {resA, resB,resC, neededA,neededB,neededC};\n return new Process(processInfo);\n }", "public Entry() {\n }", "public MemoryEntryInfo createMemoryEntryInfo() {\n\t\tMemoryEntryInfo info = new MemoryEntryInfo(new HashMap<String, Object>(this.info.getProperties()));\n\t\tinfo.getProperties().put(MemoryEntryInfo.FILE_MD5, md5);\n\t\tinfo.getProperties().put(MemoryEntryInfo.FILENAME, fileName);\n\t\tinfo.getProperties().put(MemoryEntryInfo.OFFSET, fileoffs);\n\t\treturn info;\n\t}", "public PQEntry() {}", "protected Entry(){}", "public AssetCreationToolEntry(String label, String shortDesc, Object template, CreationFactory factory, ImageDescriptor iconSmall, ImageDescriptor iconLarge)\n {\n super(label, shortDesc, template, factory, iconSmall, iconLarge);\n }", "Process createProcess();", "public DataEntry createEntry(String tableName, DataEntry entry) {\n\t\tDataEntry oldEntry = null;\n\t\tif (tables.containsKey(tableName)) {\n\t\t\tTable table = tables.get(tableName);\n\t\t\toldEntry = table.create(entry.getProductId(), entry);\n\t\t\tdataToHistory(oldEntry);\n\t\t}\n\t\treturn oldEntry;\n\t}", "void startEntry(String type);", "public void addEntry(Entry entry) {\n entries.add(entry);\n }", "protected SafeHashMap.Entry instantiateEntry()\n {\n return new Entry();\n }", "private Entry createEntry(String pattern) {\n\t\tEntry entry = null;\n\n\t\tif (pattern != null) {\n\t\t\tString item = pattern.trim();\n\t\t\tif (item.length() > 0) {\n\t\t\t\tentry = new Entry();\n\t\t\t\tentry.result = !item.startsWith(\"-\");\n\t\t\t\tentry.partial = item.endsWith(\".\");\n\t\t\t\tentry.classpath = entry.result ? item : item.substring(1).trim();\n\t\t\t}\n\t\t}\n\t\treturn entry;\n\t}", "PRE createPRE();", "protected abstract T createNewEntry(PersistentEntity persistentEntity);", "public Entry()\n {\n this(null, null, true);\n }", "EnvEntry createEnvEntry();", "SAProcessInstanceBuilder createNewInstance(SProcessInstance processInstance);", "public ArchiveEntry addEntry (File toInsert, String targetName, URI format,\n\t\tboolean mainEntry) throws IOException\n\t{\n\t\ttargetName = prepareLocation (targetName);\n\t\t\n\t\tif (targetName.equals (MANIFEST_LOCATION))\n\t\t\tthrow new IllegalArgumentException (\n\t\t\t\t\"it's not allowed to name a file \" + MANIFEST_LOCATION);\n\t\t\n\t\tif (targetName.equals (METADATA_LOCATION))\n\t\t\tthrow new IllegalArgumentException (\n\t\t\t\t\"it's not allowed to name a file \" + METADATA_LOCATION);\n\t\t\n\t\t// we also do not allow files with names like metadata-[0-9]*.rdf\n\t\tif (targetName.matches (\"^/metadata-[0-9]*\\\\.rdf$\"))\n\t\t\tthrow new IllegalArgumentException (\n\t\t\t\t\"it's not allowed to name a file like metadata-[0-9]*.rdf\");\n\t\t\n\t\t// insert to zip\n\t\tPath insertPath = zipfs.getPath (targetName).normalize ();\n\t\tFiles.createDirectories (insertPath.getParent ());\n\t\tFiles.copy (toInsert.toPath (), insertPath, Utils.COPY_OPTION);\n\t\t\n\t\tArchiveEntry entry = new ArchiveEntry (this, insertPath, format);\n\t\tentries.put (entry.getFilePath (), entry);\n\t\t\n\t\tif (mainEntry)\n\t\t{\n\t\t\tLOGGER.debug (\"setting main entry:\");\n\t\t\taddMainEntry (entry);\n\t\t}\n\t\t\n\t\treturn entry;\n\t}", "@Override\n\tpublic void entry() {\n\n\t}", "@PostMapping\n public ResponseEntity<TelephoneEntry> createEntry(@Valid @RequestBody TelephoneEntry telephoneEntry) {\n TelephoneEntry returnedTelephoneEntry = telephoneEntryService.save(telephoneEntry);\n try {\n return ResponseEntity\n .created(new URI(\"/phoneNumber/\" + returnedTelephoneEntry.getId()))\n .body(returnedTelephoneEntry);\n } catch (URISyntaxException e) {\n return ResponseEntity.status(HttpStatus.BAD_REQUEST).build();\n }\n }", "public Process() {\t// constructor with empty parameter\r\n\t\tthis.priority = -1;\t// int value will be -1\r\n \tthis.type = null;\t// String object initialized to null\r\n\t}", "public ProcessingInstruction createProcessingInstruction(\n String target, String data, Element parent);", "public Entry(String n)\n {\n name = n;\n }", "public static AdvancedCreationEntry createAdvancedEntry(int primarySkill, int objectSource, int objectTarget, int objectCreated, boolean depleteSource, boolean depleteTarget, float percentageLost, boolean destroyBoth, boolean createOnGround, CreationCategories category) {\n/* 3712 */ AdvancedCreationEntry entry = new AdvancedCreationEntry(primarySkill, objectSource, objectTarget, objectCreated, depleteSource, depleteTarget, percentageLost, destroyBoth, createOnGround, category);\n/* */ \n/* 3714 */ CreationMatrix.getInstance().addCreationEntry(entry);\n/* 3715 */ return entry;\n/* */ }", "public void markProcessPidCreate() throws JNCException {\n markLeafCreate(\"processPid\");\n }", "public void addEntry(EventDataEntry entry) {\r\n eventFields.add(entry);\r\n }", "public void create() {\n\t\t\n\t}", "public EntryPointInstance createEntryPointInstance(EntryPointDefinition entryPointDefinition) throws JahiaException {\r\n final EntryPointInstance instance = new EntryPointInstance(null, entryPointDefinition.getContext(), entryPointDefinition.getName());\r\n if (entryPointDefinition instanceof PortletEntryPointDefinition) {\r\n PortletEntryPointDefinition portletEntryPointDefinition = (PortletEntryPointDefinition) entryPointDefinition;\r\n instance.setExpirationTime(portletEntryPointDefinition.getExpirationCache());\r\n instance.setCacheScope(portletEntryPointDefinition.getCacheScope());\r\n }\r\n return instance;\r\n }", "public void addEntry(Entry e) {\n entries.put(e.getName(), e);\n }", "@RequestMapping(method=RequestMethod.POST)\n\tpublic User create(@AuthenticationPrincipal @RequestBody UserEntry entry) {\n\t\tUser user = new User(entry);\n\t\tuser.setUserId(counter.getNextUserIdSequence());\n\t\tuser.setRoleId(role.findByIsDefault(true).getRoleId());\n\t\tPasswordEncoder passwordEncoder = new BCryptPasswordEncoder();\n\t\tString hashedPassword = passwordEncoder.encode(user.getPassword());\n\t\tuser.setPassword(hashedPassword);\n\t\treturn repo.save(user);\n\t}", "protected abstract Object createProcessBean(Name name);", "TarEntry CreateEntryFromFile(String fileName);", "Information createInformation();", "@DOMSupport(DomLevel.ONE)\r\n @BrowserSupport({BrowserType.FIREFOX_2P, BrowserType.OPERA_9P})\r\n\t@Function ProcessingInstruction createProcessingInstruction(String target, String data);", "public void add(FileSystemEntry entry);", "public void creatTask(int uid,String title,String detail,int money,String type,int total_num,Timestamp end_time,String state);", "public void setProcessor(EntryProcessor processor)\n {\n m_processor = processor;\n }", "public ArchiveEntry addEntry (File toInsert, String targetName, URI format)\n\t\tthrows IOException\n\t{\n\t\treturn addEntry (toInsert, targetName, format, false);\n\t}", "public void createPPF(){\n\t\tSystem.out.println(\"HDFC:: createed ppf\");\n\t}", "public void addEntry(Entry entry) {\n getEntryList().addEntry(entry);\n }", "public static AdvancedCreationEntry createAdvancedEntry(int primarySkill, int objectSource, int objectTarget, int objectCreated, boolean destroyTarget, boolean useCapacity, float percentageLost, boolean destroyBoth, boolean createOnGround, int customCutOffChance, double aMinimumSkill, CreationCategories category) {\n/* 3746 */ AdvancedCreationEntry entry = new AdvancedCreationEntry(primarySkill, objectSource, objectTarget, objectCreated, destroyTarget, useCapacity, percentageLost, destroyBoth, createOnGround, customCutOffChance, aMinimumSkill, category);\n/* */ \n/* */ \n/* 3749 */ CreationMatrix.getInstance().addCreationEntry(entry);\n/* 3750 */ return entry;\n/* */ }", "private void pushEntry(int a, int b){\n\t\twindow.add(new WindowEntry(a, b, currentSeqN()));\n\t}", "@Listen(\"onClick=#createEntryButton\")\n public void createEntryButtonOnClick(){\n Window window = (Window) Executions.createComponents(\"entry.zul\", phonePageWindow, new HashMap());\n window.doModal();\n }", "public long createEntry(String id,String name,String status) {\n\t\tContentValues cv = new ContentValues();\r\n\t\tcv.put(KEY_APP_ID,id);\r\n\t\tcv.put(KEY_APP_NAME,name);\r\n\t\tcv.put(KEY_STATUS,status);\r\n\t\treturn ourDatabase.insert(DATABASE_TABLE, null, cv);\r\n\t}", "public long addEntry(long terbseId, Entry p_entry,\n SessionInfo p_session) throws TermbaseException\n {\n IEntryCreation ic = new EntryCreation(WebAppConstants.TERMBASE_XML);\n return ic.addEntry(terbseId, p_entry, p_session);\n }", "TarEntry CreateEntry(byte[] headerBuffer);", "private void put(PrimitiveEntry entry) {\n int hashIndex = findHashIndex(entry.getKey());\n entries[hashIndex] = entry;\n }", "CreationData creationData();", "public void addProcess(String name, int time, HashMap<Integer, Integer> listOfInOut, HashMap<Integer, Integer> listOfResource) {\n listOfProcess.add(new Processus(name, time, listOfInOut, listOfResource));\n }", "public EvEntry() {\n\t}", "public void buildExecutable(T processIntObject) {\n this.executableMap.put(counter++, new FutureVo(processIntObject));\n }", "void addEntry(ReadOnlyEntry entry) throws DuplicateEntryException, OverlappingEventException,\n OverlappingAndOverdueEventException, EntryOverdueException;", "@Around(\"within(org.apache.nifi.web.dao.ProcessorDAO+) && \"\n + \"execution(org.apache.nifi.controller.ProcessorNode createProcessor(java.lang.String, org.apache.nifi.web.api.dto.ProcessorDTO))\")\n public ProcessorNode createProcessorAdvice(ProceedingJoinPoint proceedingJoinPoint) throws Throwable {\n // update the processor state\n ProcessorNode processor = (ProcessorNode) proceedingJoinPoint.proceed();\n\n // if no exceptions were thrown, add the processor action...\n final Action action = generateAuditRecord(processor, Operation.Add);\n\n // save the actions\n if (action != null) {\n saveAction(action, logger);\n }\n\n return processor;\n }", "public void createMarkers() throws CoreException {\r\n if (resource != null && document != null) {\r\n for (LPEXTask tTask : parseDocument()) {\r\n Map<String, Object> tAttrs = new HashMap<String, Object>();\r\n tAttrs.put(\"userEditable\", false);\r\n tAttrs.put(\"priority\", new Integer(tTask.getPriority()));\r\n MarkerUtilities.setLineNumber(tAttrs, tTask.getLine());\r\n MarkerUtilities.setMessage(tAttrs, tTask.getMessage());\r\n MarkerUtilities.setCharStart(tAttrs, tTask.getCharStart());\r\n MarkerUtilities.setCharEnd(tAttrs, tTask.getCharEnd());\r\n MarkerUtilities.createMarker(resource, tAttrs, LPEXTask.ID);\r\n }\r\n }\r\n }", "public ScriptureEntry(String bk, int chap, String vrs){\n this(new ScriptCit(bk, chap, vrs), null);\n }", "void addEntry(byte command, int row_index) {\r\n addCommand(command);\r\n addParameter(row_index);\r\n }", "@Override\r\n\tpublic void create() {\n\t\t\r\n\t}", "public void create(){}", "@Override\n\tpublic void startProcessing() {\n\n\t}", "private FileEntry() {\n // intentionally empty\n }", "public Entry() {\n\t\tthis.typeCode = XActRelationshipEntry.COMP;\n\t\tthis.contextConductionInd = true;\n\t}", "public void constructWith(LzzFileInfo pro) {\n\t\tthis.id = pro.getId ();\n\n\t\tthis.fname = pro.getFname ();\n\n\t\tthis.ftype = pro.getFtype ();\n\n\t\tthis.fsavepath = pro.getFsavepath ();\n\n\t\tthis.furlpath = pro.getFurlpath ();\n\n\t\tthis.createTime = pro.getCreateTime ();\n\n\t\tthis.modifyTime = pro.getModifyTime ();\n\n\t\tthis.def1 = pro.getDef1 ();\n\n\t\tthis.def2 = pro.getDef2 ();\n\n\t\tthis.def3 = pro.getDef3 ();\n\n\t\tthis.def4 = pro.getDef4 ();\n\n\t\tthis.def5 = pro.getDef5 ();\n\n\t\tthis.def6 = pro.getDef6 ();\n\n\t\tthis.def7 = pro.getDef7 ();\n\n\t\tthis.def8 = pro.getDef8 ();\n\n\t\tthis.def9 = pro.getDef9 ();\n\n\t\tthis.def10 = pro.getDef10 ();\n\n\t\tthis.dr = pro.getDr ();\n\n\t}", "@Override\n\tpublic void create() {\n\t\t\n\t}", "private void entryAction() {\n\t}", "@Override\n\tpublic void create() {\n\n\t}", "@Override\n\tpublic void insertProcess() {\n\t\t\n\t}", "public static void addTaskMarker(IResource resource,int priority, int line, String message){\r\n\t\ttry {\r\n\t\t\tIMarker marker = resource.createMarker(IMarker.TASK);\r\n\t\t\tMap<String, Object> map = new HashMap<String, Object>();\r\n\t\t\tmap.put(IMarker.PRIORITY, Integer.valueOf(priority));\r\n\t\t\tmap.put(IMarker.MESSAGE, message);\r\n\t\t\tmap.put(IMarker.LINE_NUMBER,Integer.valueOf(line));\r\n\t\t\tmarker.setAttributes(map);\r\n\t\t} catch(CoreException ex){\r\n\t\t\tHTMLPlugin.logException(ex);\r\n\t\t}\r\n\t}", "@Override\n public BlueRun create(StaplerRequest request) {\n job.checkPermission(Item.BUILD);\n if (job instanceof Queue.Task) {\n ScheduleResult scheduleResult;\n\n List<ParameterValue> parameterValues = getParameterValue(request);\n int expectedBuildNumber = job.getNextBuildNumber();\n if(parameterValues.size() > 0) {\n scheduleResult = Jenkins.get()\n .getQueue()\n .schedule2((Queue.Task) job, 0, new ParametersAction(parameterValues),\n new CauseAction(new Cause.UserIdCause()));\n }else {\n scheduleResult = Jenkins.get()\n .getQueue()\n .schedule2((Queue.Task) job, 0, new CauseAction(new Cause.UserIdCause()));\n }\n // Keep FB happy.\n // scheduleResult.getItem() will always return non-null if scheduleResult.isAccepted() is true\n final Queue.Item item = scheduleResult.getItem();\n if(scheduleResult.isAccepted() && item != null) {\n return new QueueItemImpl(\n pipeline.getOrganization(),\n item,\n pipeline,\n expectedBuildNumber, pipeline.getLink().rel(\"queue\").rel(Long.toString(item.getId())),\n pipeline.getLink()\n ).toRun();\n } else {\n throw new ServiceException.UnexpectedErrorException(\"Queue item request was not accepted\");\n }\n } else {\n throw new ServiceException.NotImplementedException(\"This pipeline type does not support being queued.\");\n }\n }", "public CreateProcResponse createProc(CreateProcRequest request) throws GPUdbException {\n CreateProcResponse actualResponse_ = new CreateProcResponse();\n submitRequest(\"/create/proc\", request, actualResponse_, false);\n return actualResponse_;\n }", "protected abstract IContentAssistProcessor createProcessor();", "private StreamItemEntryBuilder createStreamItemEntryBuilder() {\n return new StreamItemEntryBuilder().setText(\n \"text #\" + mCreateStreamItemEntryBuilderCounter++);\n }", "protected void addProcessingMessage(final HRegionInfo hri) {\n getOutboundMsgs().add(new HMsg(HMsg.Type.MSG_REPORT_PROCESS_OPEN, hri));\n }", "@Override\n protected void insertIntoEntryTable(BibEntry bibEntry) {\n StringBuilder insertIntoEntryQuery = new StringBuilder()\n .append(\"INSERT INTO \")\n .append(escape(\"ENTRY\"))\n .append(\"(\")\n .append(escape(\"TYPE\"))\n .append(\") VALUES(?)\");\n\n // This is the only method to get generated keys which is accepted by MySQL, PostgreSQL and Oracle.\n try (PreparedStatement preparedEntryStatement = connection.prepareStatement(insertIntoEntryQuery.toString(),\n Statement.RETURN_GENERATED_KEYS)) {\n\n preparedEntryStatement.setString(1, bibEntry.getType());\n preparedEntryStatement.executeUpdate();\n\n try (ResultSet generatedKeys = preparedEntryStatement.getGeneratedKeys()) {\n if (generatedKeys.next()) {\n bibEntry.getSharedBibEntryData().setSharedID(generatedKeys.getInt(1)); // set generated ID locally\n }\n }\n } catch (SQLException e) {\n LOGGER.error(\"SQL Error: \", e);\n }\n }", "public Task createTask(long userId, String description, String groupId, String dueTimeStr, int priority, String labels, \n\t\t\tString parentId, long owner);", "public void postEntry(Entry entry) {\n\t\tentries.addFirstElement(entry);\n\t}", "public T processData(CreatedCharacter p);", "private HashMap<String, Object> setParamProcessToInsert(ProcessRequest processRequest,\r\n\t\t\tInternalResultsResponse<Process> response)\r\n\t{\r\n\t\tProcess process = processRequest.getProcess();\r\n\t\tLCAction lcAction = process.getLcAction();\r\n\r\n\t\tHashMap<String, Object> paramMapProcess = new HashMap<String, Object>(PARAMSIZE14);\r\n\t\tparamMapProcess.put(DESCRIPTION, process.getDescription());\r\n\t\tparamMapProcess.put(LC_ACTION_DESCRIPTION, lcAction.getDescription());\r\n\t\tparamMapProcess.put(START_DATETIME, process.getStartTime());\r\n\t\tparamMapProcess.put(RNI_CORRELATION_ID, process.getRniCorrelationId());\r\n\t\tparamMapProcess.put(END_DATETIME, process.getEndTime());\r\n\t\tparamMapProcess.put(TENANT_ID, processRequest.getTenant().getId());\r\n\t\tparamMapProcess.put(IS_FIRST_LEVEL, true);\r\n\t\tparamMapProcess.put(LC_ACTION_ID, lcAction.getActionType().getValue());\r\n\t\tparamMapProcess.put(ESTIMATED_SECONDS_TO_COMPLETE, process.getEstimatedSecondsToComplete());\r\n\t\tparamMapProcess.put(CREATE_USER, processRequest.getUserContext().getUserId());\r\n\t\tparamMapProcess.put(IS_MONITORED_INSTANCE, process.getIsMonitoredInstance());\r\n\t\tparamMapProcess.put(IS_PROCESS_COMPLETE, process.getIsProcessComplete());\r\n\t\tparamMapProcess.put(IS_SUBMITTED, process.getIsSubmitted());\r\n\r\n\t\t// Only if there is a parent\r\n\t\tif (!ValidationUtil.isNull(process.getParentProcess()))\r\n\t\t{\r\n\t\t\tparamMapProcess.put(PARENT_PROCESS_ID, process.getParentProcess().getId());\r\n\r\n\t\t\t// Update the parent so it is not marked as first level anymore\r\n\t\t\tHashMap<String, Object> paramMapAddChild = new HashMap<String, Object>(PARAMSIZE2);\r\n\t\t\tparamMapAddChild.put(PROCESS_ID, process.getParentProcess().getId());\r\n\t\t\tparamMapAddChild.put(IS_FIRST_LEVEL, false);\r\n\r\n\t\t\tdoUpdate(getSqlSession(), UPDATE_PROCESS_IS_FIRST_LEVEL, paramMapAddChild, response);\r\n\t\t}\r\n\r\n\t\t// if it is group intensity, than the light intesinty is the second Action Parameter,\r\n\t\t// if it is just light intensity, than the light intensity is the first one.\r\n\t\tif (lcAction.getActionType() == LCActionTypeEnum.SET_INTENSITY_BY_GRP)\r\n\t\t{\r\n\t\t\tparamMapProcess.put(LIGHT_INTENSITY, lcAction.getActionParameters().get(1).getActionValue());\r\n\t\t\treturn paramMapProcess;\r\n\t\t}\r\n\r\n\t\tif ((lcAction.getActionType() == LCActionTypeEnum.TURN_OFF)\r\n\t\t\t\t|| (lcAction.getActionType() == LCActionTypeEnum.TURN_ON)\r\n\t\t\t\t|| (lcAction.getActionType() == LCActionTypeEnum.DIM))\r\n\t\t{\r\n\t\t\tparamMapProcess.put(LIGHT_INTENSITY, lcAction.getActionParameters().get(0).getActionValue());\r\n\t\t}\r\n\r\n\t\treturn paramMapProcess;\r\n\t}", "@Override\n\tpublic void create () {\n\n\t}", "public void add(String entry, int priority) {\n\t\tmy_DB = helper.getWritableDatabase();\n\t\tContentValues cv = new ContentValues();\n\t\tcv.put(\"entry\", entry);\n\t\tcv.put(\"priority\", priority);\n\t\tcv.put(\"finished\", 0);\n\t\tmy_DB.insert(\"todo\", null, cv);\n\t}", "private static Entry<String, Item> entry(String fileName) {\n Entry<String, Item> entry = new Entry<String, Item>();\n entry.setKey(fileName);\n entry.setData(item(fileName));\n return entry;\n }", "public void setEntryId(String entryId) {\n this.entryId = entryId;\n }" ]
[ "0.59846646", "0.5817961", "0.5695307", "0.5666062", "0.5503197", "0.54861104", "0.53885937", "0.5381199", "0.53501964", "0.5343474", "0.529517", "0.52907795", "0.5260688", "0.5244944", "0.52336806", "0.5207112", "0.5193691", "0.51928306", "0.51655126", "0.5151739", "0.5149851", "0.5144706", "0.5135603", "0.5116839", "0.5114133", "0.50908613", "0.50615275", "0.5045121", "0.5011261", "0.5002419", "0.5000249", "0.49663073", "0.49341285", "0.49291375", "0.49285874", "0.4901053", "0.4886968", "0.48772642", "0.48752284", "0.48752123", "0.48544014", "0.48489293", "0.48461863", "0.4832895", "0.48282245", "0.48259807", "0.48225403", "0.48214522", "0.48192766", "0.4818726", "0.48161677", "0.48010644", "0.47902644", "0.47883627", "0.4786822", "0.47728345", "0.475699", "0.47517076", "0.47443098", "0.4744182", "0.47371885", "0.47302762", "0.47291085", "0.47277242", "0.47270265", "0.47260648", "0.4719445", "0.4714958", "0.47000197", "0.46969357", "0.46930718", "0.46928543", "0.4686368", "0.46855077", "0.46689862", "0.466734", "0.46671808", "0.46641815", "0.46575686", "0.4657543", "0.46553114", "0.4652252", "0.4648382", "0.4624288", "0.46088484", "0.46047965", "0.4594122", "0.4589351", "0.45856482", "0.45837387", "0.45798293", "0.45781022", "0.45611078", "0.45585912", "0.45584458", "0.45570254", "0.45519435", "0.45486197", "0.45473757", "0.45467392" ]
0.5284475
12
Returns the number of tasks.
public int getTasks() { return tasks; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getNumTasks() {\n return tasks.size();\n }", "public int getNumberOfTasks() {\n\t\treturn tasks.size();\n\t}", "public int countList() {\n return tasks.size();\n }", "int getTaskIdCount();", "public java.lang.Integer getTaskCount() {\n return taskCount;\n }", "long getExecutorTaskCount();", "public int getTasksSize() {\n return tasks.size();\n }", "public long getTaskCount() {\r\n\t\treturn taskCount;\r\n\t}", "public int size()\n {\n return tasks.size();\n }", "public String numTasks() {\n return \"Now you have \" + USER_TASKS.size() + \" tasks in the list.\";\n }", "int getTaskDetailsCount();", "public int getSize() {\n return tasks.size();\n }", "public int asyncTaskCount();", "public int sizeOfList(){\n return tasks.size();\n }", "public int getCount() {\n return this.tasks.size();\n }", "public int getTaskIdCount() {\n return taskId_.size();\n }", "public int numberOfPendingTasks() {\n return allBatchesStream().mapToInt(Batch::getPendingCount).sum();\n }", "public int getTaskIdCount() {\n return taskId_.size();\n }", "long getExcutorTasksInWorkQueueCount();", "public int getCount() {\n\t return taskList.size();\n\t }", "public int getSize() {\n return this.tasks.size();\n }", "int getNumberOfTasksOnCriticalPath();", "int getJobsCount();", "int getJobsCount();", "int getJobsCount();", "int getNumberOfTasksDeterminingBuildDuration();", "public int getTotalNumberOfSubtasks() {\n\t\treturn totalNumberOfSubtasks;\n\t}", "public int getCachedTasksSize() {\n return cachedTasks.size();\n }", "long getExecutorCompletedTaskCount();", "public int getNumOfThreads() {\n return numOfThreads;\n }", "public int pageCount()\n {\n return (int)Math.ceil((double)getTaskVector().size() /\n (double)getRecordsPerPage());\n }", "public int getRunnableCount() {\n return queue.size();\n }", "protected abstract int getTaskLength();", "int activeTasks();", "public int getThreadCount() throws ResourceConfigurationException {\n return cpeFactory.getProcessingUnitThreadCount();\n }", "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}", "int getRequestsCount();", "int getRequestsCount();", "public long getCompletedTasks()\n {\n return getCompletedTaskCount();\n }", "public int getNumThreads() {\n return numThreads;\n }", "public int getNumberOfThreads(){\n return numberOfThreads;\n }", "int sizeOfTaskAbstractArray();", "int getNumberOfTileDownloadThreads();", "int numberOfWorkers();", "int getProgressCount();", "int getProgressCount();", "int getProgressCount();", "int getExecutorActiveCount();", "int numberOfWorkingWorkers();", "long getRequestsCount();", "long countJobs();", "public long getPendingTasks()\n {\n return getTaskCount() - getCompletedTaskCount();\n }", "public int getNumberOfThreads() { return numberOfThreads; }", "private int[] getTaskCountByStatus() {\n int[] counts = new int[2];\n int doneCount = 0;\n int toDoCount = 0;\n for (Task t : taskStore) {\n if (t.getIsDone()) {\n doneCount++;\n } else {\n toDoCount++;\n }\n }\n counts[0] = toDoCount;\n counts[1] = doneCount;\n return counts;\n }", "public static int getNumberCreated() {\n return numberOfPools;\n }", "public int getTotalWorkerCount() {\n return this.workerCount;\n }", "Long getRunningCount();", "int getUserQuestJobsCount();", "long countWorkflows();", "int getProcessorCount();", "int countByExample(TaskExample example);", "public int getMaxTasksPerNode() {\n return maxTasksPerNode;\n }", "int getResumesCount();", "public int getNumCompleted()\n\t{\n\t\treturn numCompleted;\n\t}", "int getReqCount();", "public Object getNumExecutors() {\n return this.numExecutors;\n }", "public int getRunCount() {\n return runCount;\n }", "public static int getThreadCount() {\r\n\t\treturn THREAD_MX_BEAN.getThreadCount();\r\n\t}", "public Integer getNumberOfActiveRunners(){\n return numberOfActiveRunners;\n }", "public int getPausedTaskCount() {\n synchronized (this.lifecycleMonitor) {\n return this.pausedTasks.size();\n }\n }", "int getEntryCount();", "int getNumEvents() {\n int cnt = eventCount;\n for (Entry entry : queue) {\n cnt += entry.eventCount;\n }\n return cnt;\n }", "public int getAvailableCount();", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getNumberOfThreads() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(NUMBEROFTHREADS_PROP.get());\n }", "public int numberOfTires() {\n int tires = 4;\n return tires;\n }", "public int getThreadCount() {\n\t\treturn this.threadCalls.size();\n\t}", "int getNodesCount();", "int getNodesCount();", "public int getNumTimes();", "public int get_count();", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getNumberOfThreads() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(NUMBEROFTHREADS_PROP.get());\n }", "public void setTaskCount(java.lang.Integer taskCount) {\n this.taskCount = taskCount;\n }", "public final int getNbThread() {\n return nbThread;\n }", "public static long getStageTaskCount(String stage)\n {\n return stageQueues_.get(stage).getTaskCount();\n }", "@Override\n public int getJobCount () {\n return pool.getJobCount();\n }", "Integer getTotalStepCount();", "public int runCount() {\n return testCount;\n }", "public static int count() {\n return segmentList.size();\n }", "public Long getExec_count() {\n return exec_count;\n }", "public int getRequestsCount() {\n return instance.getRequestsCount();\n }", "public int totalNumNodes () { throw new RuntimeException(); }", "public static int countNodes() {\n\t\treturn count_nodes;\n\t}", "int getQuestCount();", "public long getNumInstructions();", "public int UnassignedCount() {\n \t\treturn jobqueue.size();\n \t}", "int getConnectionsCount();", "@Override\n public int getItemCount() {\n Log.i(\"TestingAdapter\", String.valueOf(taskList.getSize()));\n return taskList.getSize();\n }", "int getProcessorpathCount();", "long getRecipesCount();", "int getFilesCount();" ]
[ "0.877286", "0.86861426", "0.8311506", "0.82434934", "0.82118577", "0.8195764", "0.81496596", "0.81310487", "0.81020856", "0.8060297", "0.80372125", "0.7880325", "0.7873777", "0.78493536", "0.78044206", "0.7760032", "0.7758073", "0.768922", "0.7660319", "0.76435083", "0.76253533", "0.75249726", "0.7453692", "0.7453692", "0.7453692", "0.74513274", "0.7372277", "0.73484457", "0.7177399", "0.70891976", "0.7073188", "0.6999049", "0.69691133", "0.6908741", "0.6907571", "0.68740916", "0.6864509", "0.6864509", "0.68552583", "0.6850186", "0.68253726", "0.6822006", "0.6808366", "0.68072724", "0.6804537", "0.6804537", "0.6804537", "0.67955685", "0.6790176", "0.6786891", "0.67316234", "0.672647", "0.67189556", "0.6717883", "0.6703656", "0.6698083", "0.66374624", "0.6618813", "0.6617963", "0.6598215", "0.6557533", "0.6556348", "0.65493304", "0.65116537", "0.6498266", "0.6461184", "0.6460566", "0.6457625", "0.64563507", "0.6445935", "0.6442327", "0.6436827", "0.6419047", "0.64127135", "0.64126444", "0.64053315", "0.6399763", "0.6399763", "0.638348", "0.6381949", "0.63796437", "0.63613385", "0.6353277", "0.63450736", "0.6340465", "0.63363296", "0.6332046", "0.63087785", "0.6304794", "0.63028705", "0.6295162", "0.6281112", "0.6279676", "0.6278619", "0.6276112", "0.62758374", "0.62665737", "0.62633705", "0.6251298", "0.62508255" ]
0.72533035
28
Returns the number of executors.
public int getExecutors() { return executors; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getExecutorActiveCount();", "long getExecutorTaskCount();", "public Object getNumExecutors() {\n return this.numExecutors;\n }", "int getExecutorPoolSize();", "long getExecutorCompletedTaskCount();", "int getExecutorLargestPoolSize();", "public int getNumOfThreads() {\n return numOfThreads;\n }", "public Long getExec_count() {\n return exec_count;\n }", "public Object getExecutorSize() {\n return this.executorSize;\n }", "public int getRunnableCount() {\n return queue.size();\n }", "long getExecutedStatementsCount();", "int numberOfWorkers();", "int getExecutorMaximumPoolSize();", "public int getThreadCount() throws ResourceConfigurationException {\n return cpeFactory.getProcessingUnitThreadCount();\n }", "Integer getConnectorCount();", "public int getNumTasks() {\n return tasks.size();\n }", "long getExcutorTasksInWorkQueueCount();", "int getExecutorCorePoolSize();", "public int getNumThreads() {\n return numThreads;\n }", "int numberOfWorkingWorkers();", "public int size() {\r\n\t\treturn stmts.size();\r\n\t}", "public Integer getNumberOfActiveRunners(){\n return numberOfActiveRunners;\n }", "int getConnectionCount();", "public int getNumberConcurrentEmulators() {\n\t\treturn (numberConcurrentEmulators);\n\t}", "public int getNumberOfThreads(){\n return numberOfThreads;\n }", "public int getNumberOfTasks() {\n\t\treturn tasks.size();\n\t}", "int getJobsCount();", "int getJobsCount();", "int getJobsCount();", "int getConnectionsCount();", "public int getNumberOfThreads() { return numberOfThreads; }", "@Override\n public int getJobCount () {\n return pool.getJobCount();\n }", "int getDatabasesCount();", "public int countList() {\n return tasks.size();\n }", "private int getPoolSize() {\n\t\tint numberOfTasks = SpectralDescriptionType.values().length;\n\t\tint procs = Runtime.getRuntime().availableProcessors();\n\t\treturn numberOfTasks < procs ? numberOfTasks : procs > 1 ? procs - 1\n\t\t\t\t: 1;\n\t}", "public int numConnections(){\n return connections.size();\n }", "@Override\n public int getNumIdle() {\n return _pool.size();\n }", "public int getNumberOfCores();", "int getProcessorCount();", "public static int availableProcessors() {\n/* 98 */ return holder.availableProcessors();\n/* */ }", "int getNumberOfTileDownloadThreads();", "public int queueSize() {\n return executor.getQueue().size();\n }", "public int size()\n {\n return tasks.size();\n }", "@Exported\n public int getNumberOfOnlineSlaves() {\n int count = 0;\n for (Slave s : slaves) {\n if (s.getComputer().isOnline()) {\n count++;\n }\n }\n return count;\n }", "@Exported\n public int getNumberOfOfflineSlaves() {\n int count = 0;\n for (Slave s : slaves) {\n if (s.getComputer().isOffline()) {\n count++;\n }\n }\n return count;\n }", "@Exported\n public int getNumberOfSlaves() {\n if (this.slaves == null) {\n return 0;\n }\n return this.slaves.size();\n }", "int getPoolSize();", "public int numberOfPendingTasks() {\n return allBatchesStream().mapToInt(Batch::getPendingCount).sum();\n }", "public int getPoolSize() {\n return poolSize;\n }", "public int getTotalWorkerCount() {\n return this.workerCount;\n }", "public void testGetNumThreads_ThreadPoolExecutor()\n {\n System.out.println( \"getNumThreads\" );\n int numThreads = 10;\n PA pa = new PA();\n assertEquals( 0, ParallelUtil.getNumThreads( pa.getThreadPool() ) );\n \n pa.threadPool = ParallelUtil.createThreadPool( 10 ); \n \n int result = ParallelUtil.getNumThreads( pa.getThreadPool() );\n assertEquals( numThreads, result );\n }", "public static int getConnectionCount()\r\n {\r\n return count_; \r\n }", "public static int getThreadCount() {\r\n\t\treturn THREAD_MX_BEAN.getThreadCount();\r\n\t}", "public int asyncTaskCount();", "public int getTasksSize() {\n return tasks.size();\n }", "public int getWorkersPerServer() {\n return Integer.parseInt(getOptional(\"kylin.server.sequence-sql.workers-per-server\", \"1\"));\n }", "public int getNumOfServers() {\n return numOfServers;\n }", "public int workers() {\n return workers_;\n }", "int getMaximumPoolSize();", "public int getNumOfConnections() {\r\n\t\treturn numOfConnections;\r\n\t}", "public int getThreadCount() {\n\t\treturn this.threadCalls.size();\n\t}", "int getQueriesCount();", "public static long getNumberOfOpenConnections() {\n return openConnections.size();\n }", "public int getJobsCount() {\n return jobs_.size();\n }", "public static int getNumberCreated() {\n return numberOfPools;\n }", "public long getAllStatementCount();", "public static int getNumberOfCpuThreads() {\n\t\treturn Runtime.getRuntime().availableProcessors();\n\t}", "public int getSize() {\n return tasks.size();\n }", "public static int getAvailableProcessors() {\r\n\t\treturn availableProcessors;\r\n\t}", "int getCommandCount();", "int getTaskIdCount();", "public int getWorkerThreads() {\n return workerThreads;\n }", "public int getNumPartitions() {\n\t\treturn (new HashSet<PartitionType>(partitionMap.values())).size(); \n\t}", "public int getTaskIdCount() {\n return taskId_.size();\n }", "public final int getNbThread() {\n return nbThread;\n }", "int getMaxPoolSize();", "public int numofConnections() {\n\t\tint numberofconnection = 0;\n\t\tString node;\n\t\tfor (String key : Nodeswithconnect.keySet()) {\n\t\t\tfor (int i = 0; i < Nodeswithconnect.get(key).length; i++) {\n\t\t\t\tnode = Nodeswithconnect.get(key)[i];\n\t\t\t\tif (!node.equals(\"null\")) {\n\t\t\t\t\tnumberofconnection++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn numberofconnection;\n\t}", "public static int getNumberOfRowsTBLSERVERS() throws SQLException {\n\t\tstmt = conn.createStatement();\r\n\t\tStatement stmt4 = conn.createStatement();\r\n\t\tResultSet rownumber = stmt4.executeQuery(\"SELECT COUNT (*) AS count1 FROM TBLSERVERS\"); // SQL Count query\r\n\t\trownumber.next();\r\n\r\n\t\tint rnum = rownumber.getInt(1);\r\n\t\tSystem.out.println(rnum); // for debugging purposes\r\n\t\treturn rnum; //return value\r\n\r\n\t}", "public int getNumberOfInstances() {\n\t\treturn numberOfInstances;\n\t}", "public int getWorkers() {\r\n return workers;\r\n }", "public int getNumOfClasses();", "public static int getNumberOfRowsServer() throws SQLException {\n\t\tstmt = conn.createStatement();\r\n\t\tStatement stmt3 = conn.createStatement();\r\n\t\tResultSet rownumber = stmt3.executeQuery(\"SELECT COUNT (*) AS count1 FROM TBLSERVERS\"); // sql count statement\r\n\t\trownumber.next(); // move cursor to first position\r\n\r\n\t\tint rnum = rownumber.getInt(1); //store result in an integer variable\r\n\t\tSystem.out.println(rnum); // for debugging purposes\r\n\t\treturn rnum; //return integer\r\n\r\n\t}", "@VisibleForTesting\n static int getInstanceThreadPoolSize() {\n return instanceThreadPoolSize;\n }", "public int totalNumNodes () { throw new RuntimeException(); }", "public static int size() {\n\t\treturn (anonymousSize() + registeredSize());\n\t}", "public int getNumberOfConnectors() { return numberOfConnectors; }", "int getServerSocketCount();", "public int getJobsCount() {\n if (jobsBuilder_ == null) {\n return jobs_.size();\n } else {\n return jobsBuilder_.getCount();\n }\n }", "public int getTaskIdCount() {\n return taskId_.size();\n }", "public static int countNodes() {\n\t\treturn count_nodes;\n\t}", "public long getProcessCount() {\n return getProcesses().count();\n }", "int getNumberOfTasksOnCriticalPath();", "public int size() {\n\t\treturn threadAreas.size();\n\t}", "public int sizeOfList(){\n return tasks.size();\n }", "public long getConnectionCount() {\n return connectionCount.getCount();\n }", "public int getNumConnects() {\n\t\treturn numConnects;\n\t}", "public int getSlaveCount() {\n int allSlaveCount = ZookeeperClient.getInstance().getChildren(SystemConfig.slaveRoot).size();\n if (this.slaveCount < 1 || this.slaveCount > allSlaveCount) {\n this.slaveCount = allSlaveCount / 2 + 1;\n }\n return this.slaveCount;\n }", "public int getNumQueues() {\n return queues.size();\n }", "Map<StateT, Map<ConditionT, Long>> getNumExecutions();", "public static @Range(from = 2, to = Integer.MAX_VALUE) int threadAmount(@NonNull DriverEnvironment environment) {\n return environment.equals(DriverEnvironment.NODE) ? Math.max(8, Runtime.getRuntime().availableProcessors() * 2) : 4;\n }" ]
[ "0.7945359", "0.7850442", "0.77776504", "0.6991345", "0.68004817", "0.67850757", "0.67407745", "0.6653247", "0.66233283", "0.656619", "0.6553102", "0.6527788", "0.6524098", "0.65215987", "0.6502272", "0.6483257", "0.64731985", "0.6456513", "0.64461416", "0.6412932", "0.63623035", "0.6356301", "0.6272943", "0.6230653", "0.6217137", "0.6211207", "0.61926335", "0.61926335", "0.61926335", "0.6185901", "0.6173978", "0.6163037", "0.61593616", "0.6155212", "0.61537296", "0.6129387", "0.6123545", "0.6122464", "0.6120186", "0.6101476", "0.6072375", "0.6069949", "0.6068803", "0.606829", "0.6066264", "0.6059456", "0.60506797", "0.60388184", "0.6035438", "0.6016475", "0.60145783", "0.5997558", "0.5996986", "0.5991211", "0.59648067", "0.5955187", "0.5953565", "0.5942472", "0.5934429", "0.5930864", "0.59194195", "0.5909832", "0.5906017", "0.5904989", "0.5886244", "0.5879357", "0.58622384", "0.58621967", "0.58567214", "0.5853182", "0.5846591", "0.5841516", "0.5835029", "0.58292115", "0.58101475", "0.580496", "0.58044976", "0.5794386", "0.57899565", "0.5774266", "0.57741094", "0.57719666", "0.57652575", "0.5764496", "0.575856", "0.5756624", "0.5752015", "0.5743159", "0.57340425", "0.57255805", "0.5717506", "0.5710908", "0.5706586", "0.57020885", "0.56947386", "0.56849146", "0.5668875", "0.56632483", "0.5658744", "0.56516606" ]
0.773495
3
Returns the number of workers.
public int getWorkers() { return workers; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int workers() {\n return workers_;\n }", "int numberOfWorkingWorkers();", "int numberOfWorkers();", "public int getTotalWorkerCount() {\n return this.workerCount;\n }", "public int getWorkerThreads() {\n return workerThreads;\n }", "public int getNumOfThreads() {\n return numOfThreads;\n }", "public int getWorkersPerServer() {\n return Integer.parseInt(getOptional(\"kylin.server.sequence-sql.workers-per-server\", \"1\"));\n }", "public int getNumThreads() {\n return numThreads;\n }", "int getJobsCount();", "int getJobsCount();", "int getJobsCount();", "public int getNumberOfCores();", "int getProcessorCount();", "public Object getNumExecutors() {\n return this.numExecutors;\n }", "public int getNumberOfThreads() { return numberOfThreads; }", "public int getThreadCount() throws ResourceConfigurationException {\n return cpeFactory.getProcessingUnitThreadCount();\n }", "public int getNumberOfThreads(){\n return numberOfThreads;\n }", "public Integer getWorkSize(){\r\n\t\treturn work.size();\t\t\r\n\t}", "public int getNumberOfInstances() {\n\t\treturn numberOfInstances;\n\t}", "public int getNumOfServers() {\n return numOfServers;\n }", "public int getNumTasks() {\n return tasks.size();\n }", "@Exported\n public int getNumberOfOnlineSlaves() {\n int count = 0;\n for (Slave s : slaves) {\n if (s.getComputer().isOnline()) {\n count++;\n }\n }\n return count;\n }", "public static int getAvailableProcessors() {\r\n\t\treturn availableProcessors;\r\n\t}", "public final int getNbThread() {\n return nbThread;\n }", "public static int availableProcessors() {\n/* 98 */ return holder.availableProcessors();\n/* */ }", "public int getJobsCount() {\n return jobs_.size();\n }", "long getExcutorTasksInWorkQueueCount();", "public static int getNumberCreated() {\n return numberOfPools;\n }", "public static int getNumberOfCpuThreads() {\n\t\treturn Runtime.getRuntime().availableProcessors();\n\t}", "@Exported\n public int getNumberOfSlaves() {\n if (this.slaves == null) {\n return 0;\n }\n return this.slaves.size();\n }", "@Override\n public int getJobCount () {\n return pool.getJobCount();\n }", "public Integer getNumberOfActiveRunners(){\n return numberOfActiveRunners;\n }", "public static int getThreadCount() {\r\n\t\treturn THREAD_MX_BEAN.getThreadCount();\r\n\t}", "public String getNumberOfInstances() {\n return numberOfInstances;\n }", "long getExecutorTaskCount();", "public int getNumberOfTasks() {\n\t\treturn tasks.size();\n\t}", "int getNumberOfTasksOnCriticalPath();", "public long getProcessCount() {\n return getProcesses().count();\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getNumberOfThreads() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(NUMBEROFTHREADS_PROP.get());\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getNumberOfThreads() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(NUMBEROFTHREADS_PROP.get());\n }", "public int getNumberConcurrentEmulators() {\n\t\treturn (numberConcurrentEmulators);\n\t}", "public int getNumOfNodes() {\n\t\treturn getNumOfNodes(this);\n\t}", "public static int getNumberOfNodes() {\n return(numberOfNodes);\n\t }", "public int getNumClusters() {\n return clusters.size();\n }", "int getNumberOfTileDownloadThreads();", "public int getCapacity() {\n\t\tfinal String key = ConfigNames.CHILD_THREADS.toString();\n\n\t\tif (getJson().isNull(key)) {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn getJson().getInt(key);\n\t}", "public int getNumberOfNodesEvaluated();", "private int getPoolSize() {\n\t\tint numberOfTasks = SpectralDescriptionType.values().length;\n\t\tint procs = Runtime.getRuntime().availableProcessors();\n\t\treturn numberOfTasks < procs ? numberOfTasks : procs > 1 ? procs - 1\n\t\t\t\t: 1;\n\t}", "public final int size() {\r\n\t\tint SIZE = workoutList.size();\r\n\r\n\t\treturn SIZE;\r\n\t}", "public int numConnections(){\n return connections.size();\n }", "@Exported\n public int getNumberOfOfflineSlaves() {\n int count = 0;\n for (Slave s : slaves) {\n if (s.getComputer().isOffline()) {\n count++;\n }\n }\n return count;\n }", "public int numofConnections() {\n\t\tint numberofconnection = 0;\n\t\tString node;\n\t\tfor (String key : Nodeswithconnect.keySet()) {\n\t\t\tfor (int i = 0; i < Nodeswithconnect.get(key).length; i++) {\n\t\t\t\tnode = Nodeswithconnect.get(key)[i];\n\t\t\t\tif (!node.equals(\"null\")) {\n\t\t\t\t\tnumberofconnection++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn numberofconnection;\n\t}", "public int getNumOfConnections() {\r\n\t\treturn numOfConnections;\r\n\t}", "int getConnectionsCount();", "int getExecutorActiveCount();", "protected int numPeers() {\n\t\treturn peers.size();\n\t}", "int getServerSocketCount();", "public int getExecutors() {\r\n return executors;\r\n }", "public int getJobsCount() {\n if (jobsBuilder_ == null) {\n return jobs_.size();\n } else {\n return jobsBuilder_.getCount();\n }\n }", "public int getNumCores() {\n\t\tclass CpuFilter implements FileFilter {\n\n\t\t\t@Override\n\t\t\tpublic boolean accept(File pathname) {\n\t\t\t\t// Check if filename is \"cpu\", followed by a single digit number\n\t\t\t\tif (Pattern.matches(\"cpu[0-9]+\", pathname.getName())) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t}\n\n\t\ttry {\n\t\t\t// Get directory containing CPU info\n\t\t\tFile dir = new File(\"/sys/devices/system/cpu/\");\n\t\t\t// Filter to only list the devices we care about\n\t\t\tFile[] files = dir.listFiles(new CpuFilter());\n\t\t\t// Return the number of cores (virtual CPU devices)\n\t\t\treturn files.length;\n\t\t} catch (Exception e) {\n\t\t\t// Default to return 1 core\n\t\t\treturn 1;\n\t\t}\n\t}", "private int getRunningNum() {\n\t\treturn am.getRunningAppProcesses().size();\r\n\t}", "@Override\n\tpublic long numNodes() {\n\t\treturn numNodes;\n\t}", "public int numNodes() {\n\t\treturn numNodes;\n\t}", "public int getRunnableCount() {\n return queue.size();\n }", "public static int countNodes() {\n\t\treturn count_nodes;\n\t}", "int getProcessorpathCount();", "public int numPartitions() {\n return (11);\n }", "public int totalNumNodes () { throw new RuntimeException(); }", "long countJobs();", "Long countByWorker(String worker);", "public int getNumPartitions() {\n\t\treturn (new HashSet<PartitionType>(partitionMap.values())).size(); \n\t}", "public int getAvailableCount();", "int getRequestsCount();", "int getRequestsCount();", "public int getThreadCount() {\n\t\treturn this.threadCalls.size();\n\t}", "public long getThreads() { return threads; }", "public int numVehiclesInQueue() {\r\n\t\treturn vehiclesInQueue.size();\r\n\t}", "int getMaxConcurrentStartup(ClusterSpec clusterSpec);", "public int getRequestsCount() {\n return instance.getRequestsCount();\n }", "public final int getMaxNumClusters() {\n return maxNumClusters;\n }", "int getReplicationCount();", "public int getNbIterations() {\n\t\treturn this.nbIterations;\n\t}", "public int getMaxPartitionsRunInParallel() {\n return maxThreads;\n }", "int getNodesCount();", "int getNodesCount();", "public int getNbClients() {\n\t\t\treturn nbClients;\r\n\t\t}", "@Override\n\tpublic int getProcessorsPerNode() {\n\t\treturn model.getProcessorsPerNode();\n\t}", "private int getNumCores() {\n\t\t// Private Class to display only CPU devices in the directory listing\n\t\tclass CpuFilter implements FileFilter {\n\t\t\t@Override\n\t\t\tpublic boolean accept(File pathname) {\n\t\t\t\t// Check if filename is \"cpu\", followed by a single digit number\n\t\t\t\tif (Pattern.matches(\"cpu[0-9]+\", pathname.getName())) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\t// Get directory containing CPU info\n\t\t\tFile dir = new File(\"/sys/devices/system/cpu/\");\n\t\t\t// Filter to only list the devices we care about\n\t\t\tFile[] files = dir.listFiles(new CpuFilter());\n\t\t\t// Return the number of cores (virtual CPU devices)\n\t\t\treturn files.length;\n\t\t} catch (Exception e) {\n\t\t\t// Default to return 1 core\n\t\t\treturn 1;\n\t\t}\n\t}", "public int UnassignedCount() {\n \t\treturn jobqueue.size();\n \t}", "int NoOfNodes() {\r\n return noOfNodes;\r\n }", "long getTotalServerSocketsCount();", "Integer getConnectorCount();", "public int countList() {\n return tasks.size();\n }", "public int getWorkGroupSize() {\r\n\t\treturn workGroupTable.size();\r\n\t}", "int getPeersCount();", "public int getNumProbes()\r\n\t{\r\n\t\treturn numProbes;\r\n\t}", "int numNodes() {\n\t\treturn num_nodes;\n\t}", "public static int getNos() {\n\t\treturn numberOfStudents;\n\t}", "int getReplicaCount(Type type);", "public int getNumQueues() {\n return queues.size();\n }" ]
[ "0.8457463", "0.8325552", "0.83117753", "0.8286849", "0.76088834", "0.7541331", "0.7483268", "0.73205733", "0.7259486", "0.7259486", "0.7259486", "0.72434855", "0.7236861", "0.71453625", "0.70951575", "0.7070406", "0.70430034", "0.6996974", "0.6981995", "0.69290805", "0.6873511", "0.6865101", "0.6850413", "0.67786014", "0.67626995", "0.6754566", "0.6748594", "0.6738997", "0.6737314", "0.6728081", "0.67221004", "0.67138845", "0.67043364", "0.6704233", "0.66775155", "0.6657932", "0.6656084", "0.6640835", "0.6628584", "0.6613196", "0.657299", "0.6551139", "0.65506923", "0.65450853", "0.6542639", "0.6541188", "0.65364474", "0.65024316", "0.6498927", "0.6489785", "0.6484885", "0.64746046", "0.647256", "0.64685756", "0.64546096", "0.6451124", "0.64332354", "0.64306456", "0.6425292", "0.64245695", "0.6422957", "0.6419572", "0.64030546", "0.63924456", "0.636447", "0.6364284", "0.63563025", "0.63560575", "0.6354983", "0.6353735", "0.6346356", "0.6346179", "0.634525", "0.634525", "0.6336108", "0.631", "0.6302532", "0.63005865", "0.6299513", "0.6289522", "0.6279821", "0.6266922", "0.62665176", "0.6265877", "0.6265877", "0.6256253", "0.6254648", "0.6249055", "0.62469244", "0.6243084", "0.6241982", "0.6235368", "0.62268806", "0.62264585", "0.6200705", "0.61985636", "0.61961067", "0.61787754", "0.617244", "0.61655784" ]
0.81744397
4
Projects processing entries according to type.
public static List<Integer> project(ProjectionType type, Collection<ProcessingEntry> processing) { List<Integer> result = new ArrayList<Integer>(); for (ProcessingEntry ent : processing) { switch (type) { case EXECUTOR: result.add(ent.getExecutors()); break; case TASK: result.add(ent.getTasks()); break; case WORKER: result.add(ent.getWorkers()); break; default: break; } } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void preprocess() {\n \tLOG.info(\"Begin preprocessing of data.\");\n \t\n \tLOG.debug(\"Create a IterativeDirectoryReader.\");\n \t// Create a reader for directories\n \tIterativeDirectoryReader iterativeDirectoryReader = (IterativeDirectoryReader) ReaderFactory.instance().getIterativeDirectoryReader();\n \titerativeDirectoryReader.setDirectoryName(clArgs.preprocessInDir);\n \titerativeDirectoryReader.setPathInChildDirectory(clArgs.preprocessPathInChildDir);\n \t\n \tLOG.debug(\"Create a IterativeFileReader.\");\n \t// Create a reader for text files and set an appropriate file filter\n \tIterativeFileReader iterativeFileReader = (IterativeFileReader) ReaderFactory.instance().getIterativeFileReader();\n \titerativeFileReader.setFileFilter(FileUtil.acceptVisibleFilesFilter(false, true));\n \t\n \tLOG.debug(\"Create a TextFileLineReader.\");\n \t// Create a reader for text files, the first six lines are not relevant in this data set\n \tTextFileLineReader textFileLineReader = (TextFileLineReader) ReaderFactory.instance().getTextFileLineReader();\n \ttextFileLineReader.setOffset(clArgs.preprocessLineOffset);\n \t\n \tLOG.debug(\"Create a GpsLogLineProcessor.\");\n \t// Create a processor for user points\n \tGpsLogLineProcessor processor = new GpsLogLineProcessor(clArgs.preprocessOutFile);\n \t\n \t// Build reader chain\n \titerativeDirectoryReader.setReader(iterativeFileReader);\n \titerativeFileReader.setReader(textFileLineReader);\n \ttextFileLineReader.setProcessor(processor);\n \t\n \titerativeDirectoryReader.attach(processor, \n \t\t\t\tnew Interests[] {\n \t\t\t\t\tInterests.NewChildDirectory,\n \t\t\t\t\tInterests.HasFinished\n \t\t\t\t});\n \t\n \tLOG.debug(\"Read GPS logs. Save the data in a new file {}.\", clArgs.preprocessOutFile);\n \t// Read and save the data\n \titerativeDirectoryReader.read();\n\n \tLOG.info(\"Finished preprocessing of data.\");\n }", "private void processTypes(Node root) {\n\t\tfinal boolean newContext =\n\t\t\t(root instanceof Block || root instanceof ForLoop);\n\n\t\tif (newContext) {\n\t\t\tthis.variableMaps\n\t\t\t\t.push(new VariableTypeMap(this.variableMaps.peek()));\n\t\t}\n\n\t\tif (!root.getChildren().isEmpty()) {\n\t\t\tfor (int i = 0; i < root.getChildren().size(); ++i) {\n\t\t\t\tNode child = root.getChildren().get(i);\n\t\t\t\tif (root instanceof Call call && (!call.isPrimary() && i == 0\n\t\t\t\t\t|| call.isPrimary() && i == 1)) {\n\t\t\t\t\t// Skip the method name lookup\n\t\t\t\t\tchild.setType(Type.unknownType());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tthis.processTypes(child);\n\t\t\t}\n\t\t}\n\t\troot.process(this);\n\n\t\tif (newContext) {\n\t\t\tthis.variableMaps.pop();\n\t\t}\n\t}", "public void extractDataForRequestType(int a) {\n ReportRun header = processMonitorList.remove(0);\n\n //adding the header to all the Hire types\n runReportsTypesMap.get(RequestType.IMPORT_HIRE_EMPLOYEE).add(header);\n runReportsTypesMap.get(RequestType.IMPORT_HIRE_EMPLOYEE_DAILY).add(header);\n runReportsTypesMap.get(RequestType.IMPORT_CONTRACT_CONTINGENT_WORKER).add(header);\n runReportsTypesMap.get(RequestType.IMPORT_CONTRACT_CONTINGENT_WORKER_DAILY).add(header);\n //reference for all the hire types\n RequestType requestType = RequestType.IMPORT_HIRE_EMPLOYEE;\n for (ReportRun run : processMonitorList) {\n //first check if its either Import hire or contingent worker\n //then filter with or with out daily\n\n if (run.getRequestType().equals(RequestType.IMPORT_HIRE_EMPLOYEE.getRequestType())) {\n if (isDaily(run)) {\n requestType = RequestType.IMPORT_HIRE_EMPLOYEE_DAILY;\n List<IExcelRow> listOfReports = runReportsTypesMap.get(requestType);\n listOfReports.add(run);\n } else {\n requestType = RequestType.IMPORT_HIRE_EMPLOYEE;\n List<IExcelRow> listOfReports = runReportsTypesMap.get(requestType);\n listOfReports.add(run);\n }\n } else if (run.getRequestType().equals(RequestType.IMPORT_CONTRACT_CONTINGENT_WORKER.getRequestType())) {\n if (isDaily(run)) {\n requestType = RequestType.IMPORT_CONTRACT_CONTINGENT_WORKER_DAILY;\n List<IExcelRow> listOfReports = runReportsTypesMap.get(requestType);\n listOfReports.add(run);\n } else {\n requestType = RequestType.IMPORT_CONTRACT_CONTINGENT_WORKER;\n List<IExcelRow> listOfReports = runReportsTypesMap.get(requestType);\n listOfReports.add(run);\n }\n }\n run.setRequestTypeEnum(requestType);\n }\n\n }", "public abstract void transformReportEntry(ReportRow entry);", "public void processCode() throws InstantiationException, IllegalAccessException, ClassNotFoundException {\n\t\tsuper.processCode();\t\n\t\t\n\t\tfor (String processor : getProcessors()) {\n\t\t\tString[] refactorName = processor.split(\"\\\\.\");\n\t\t\tString refactor = refactorName[refactorName.length - 1];\n\t\t\t\n\t\t\tswitch (refactor) {\n\t\t\t\tcase \"CollapseHierarchy\" : refactoringsApplied.put(refactor, CollapseHierarchy.getTimesApplied());\n\t\t\t\t\t\t\t\t\t\t\t CollapseHierarchy.resetTimesApplied();\n\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t\tcase \"EncapsulateCollection\" : refactoringsApplied.put(refactor, EncapsulateCollection.getTimesApplied());\n\t\t\t\t\t\t\t\t\t\t\t EncapsulateCollection.resetTimesApplied();\n\t\t\t\t \t\t\t\t\t\t\t break;\n\t\t\t\tcase \"EncapsulateField\" \t : refactoringsApplied.put(refactor, EncapsulateField.getTimesApplied());\n\t\t\t\t\t\t\t\t\t\t\t EncapsulateField.resetTimesApplied();\n\t\t\t\t\t\t\t\t\t\t \t break;\n\t\t\t\tcase \"ExtractSuperClass\" : refactoringsApplied.put(refactor, ExtractSuperClass.getTimesApplied());\n\t\t\t\t\t\t\t\t\t\t ExtractSuperClass.resetTimesApplied();\n\t\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t\tcase \"HideMethod\" : refactoringsApplied.put(refactor, HideMethod.getTimesApplied());\n\t\t\t\t\t\t\t\t\t\t\t HideMethod.resetTimesApplied();\n\t\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t\tcase \"PullUpField\"\t\t\t : refactoringsApplied.put(refactor, PullUpField.getTimesApplied());\n\t\t\t\t\t\t\t\t\t\t\t PullUpField.resetTimesApplied();\n\t\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t\tcase \"PullUpMethod\" : refactoringsApplied.put(refactor, PullUpMethod.getTimesApplied());\n\t\t\t\t\t\t\t\t\t\t\t PullUpMethod.resetTimesApplied();\n\t\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t\tcase \"PushDownField\"\t\t : refactoringsApplied.put(refactor, PushDownField.getTimesApplied());\n\t\t\t\t\t\t\t\t\t\t\t PushDownField.resetTimesApplied();\n\t\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t\tcase \"PushDownMethod\"\t : refactoringsApplied.put(refactor, PushDownMethod.getTimesApplied());\n\t\t\t\t\t\t\t\t\t\t\t PushDownMethod.resetTimesApplied();\n\t\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t}\t\n\t\t}\n\t\t\n\t\toutputProcessedCode();\n\t}", "@Override\n protected void process() {\n final List<File> srtFiles = new FileFinder().collect(new File(Constants.FILEFIXER_ROOT_DIR), Constants.SRT_EXTENSION);\n\n // process each file, making a backup first if it is enabled\n for (final File srtFile : srtFiles) {\n System.out.println(\"Processing subtitle file :: \" + srtFile.getName());\n\n if (Constants.MAKE_BACKUPS) {\n backupFile(srtFile);\n }\n\n fix(srtFile);\n }\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 }", "@Override\n public void run() {\n List<File> files = getContents(TOP_LEVEL + \" and \" + NOT_TRASHED + \" and \" + FOLDER + \" and \" + NOT_SPREADSHEET);\n \n prune(targetDir, files);\n processLanguages(files);\n }", "private static void doTransform(Tree t) {\n\n if (t.value().startsWith(\"QP\")) {\n //look at the children\n List<Tree> children = t.getChildrenAsList();\n if (children.size() >= 3 && children.get(0).isPreTerminal()) {\n //go through the children and check if they match the structure we want\n String child1 = children.get(0).value();\n String child2 = children.get(1).value();\n String child3 = children.get(2).value();\n if((child3.startsWith(\"CD\") || child3.startsWith(\"DT\")) &&\n (child1.startsWith(\"RB\") || child1.startsWith(\"JJ\") || child1.startsWith(\"IN\")) &&\n (child2.startsWith(\"IN\") || child2.startsWith(\"JJ\"))) {\n transformQP(t);\n }\n }\n /* --- to be written or deleted\n } else if (t.value().startsWith(\"NP\")) {\n //look at the children\n List<Tree> children = t.getChildrenAsList();\n if (children.size() >= 3) {\n\n }\n ---- */\n } else if (t.isPhrasal()) {\n for (Tree child : t.getChildrenAsList()) {\n doTransform(child);\n }\n }\n }", "public void computeTypeIds() {\n classes.add(null);\n jsonObjects.add(new JsonObject(program));\n \n // Do java.lang.String first to reserve typeId 1 for the mashup case.\n computeSourceClass(program.getTypeJavaLangString());\n assert (classes.size() == 2);\n \n /*\n * Compute the list of classes than can successfully satisfy cast\n * requests, along with the set of types they can be successfully cast to.\n * Do it in super type order.\n */\n for (Iterator it = program.getDeclaredTypes().iterator(); it.hasNext();) {\n JReferenceType type = (JReferenceType) it.next();\n if (type instanceof JClassType) {\n computeSourceClass((JClassType) type);\n }\n }\n \n for (Iterator it = program.getAllArrayTypes().iterator(); it.hasNext();) {\n JArrayType type = (JArrayType) it.next();\n computeSourceClass(type);\n }\n \n // pass our info to JProgram\n program.initTypeInfo(classes, jsonObjects);\n program.recordQueryIds(queryIds);\n }", "public synchronized static void internal_updateKnownTypes() {\r\n Set<ChangeLogType> changeLogTypes = GrouperDAOFactory.getFactory().getChangeLogType().findAll();\r\n GrouperCache<MultiKey, ChangeLogType> newTypes = new GrouperCache<MultiKey, ChangeLogType>(\r\n ChangeLogTypeFinder.class.getName() + \".typeCache\", 10000, false, 60*10, 60*10, false);\r\n \r\n Map<String, ChangeLogType> newTypesById = new HashMap<String, ChangeLogType>();\r\n \r\n for (ChangeLogType changeLogType : GrouperUtil.nonNull(changeLogTypes)) {\r\n newTypes.put(new MultiKey(changeLogType.getChangeLogCategory(), changeLogType.getActionName()), changeLogType);\r\n newTypesById.put(changeLogType.getId(), changeLogType);\r\n }\r\n \r\n //add builtins if necessary\r\n internal_updateBuiltinTypesOnce(newTypes, newTypesById);\r\n \r\n types = newTypes;\r\n typesById = newTypesById;\r\n }", "public void preprocess() {\n }", "public void preprocess() {\n }", "public void preprocess() {\n }", "public void preprocess() {\n }", "protected void additionalProcessing() {\n\t}", "public String process() {\r\n if (typeNames == null) return filterString;\r\n\r\n String filterStringProcessed = filterString;\r\n\r\n for (QName typeName : typeNames) {\r\n String typeNameValue = typeName.getValue();\r\n\r\n String[] tokens = typeNameValue.split(\"_\");\r\n\r\n if (tokens.length > 1) {\r\n String type = tokens[0];\r\n String[] names = new String[tokens.length-1];\r\n System.arraycopy(tokens,1, names, 0, tokens.length-1);\r\n \r\n for (int i = 0; i < names.length; i++) {\r\n filterStringProcessed = replaceNamesWithType(filterStringProcessed, names[i], type);\r\n }\r\n }\r\n }\r\n\r\n return filterStringProcessed;\r\n }", "@Override\n public void run() {\n List<File> mFolderList = getContents(\"'\" + f.getId() + \"' in parents and \" + NOT_TRASHED + \" and \" + FOLDER + \" and \" + NOT_SPREADSHEET);\n // check if there is a folder\n if (!mFolderList.isEmpty()) {\n prune(targetFolder, mFolderList, false);\n processFolders(mFolderList, targetFolder);\n }\n \n // list of contents in f that are files\n List<File> mFileList = getContents(\"'\" + f.getId() + \"' in parents and \" + NOT_TRASHED + \" and \" + NOT_FOLDER + \" and \" + SUPPORTED_FILES);\n \n prune(targetFolder, mFileList, true);\n processFiles(mFileList, targetFolder);\n }", "protected MySearchHits callback(MySearchHits hits, String type) {\n List<String> skips;\n\n if (skipHardCodedFields && type.equals(\"user\")) {\n skips = userSkipList;\n\n } else if (skipHardCodedFields && type.equals(\"emailSend\")) {\n skips = emailSendSkipList;\n\n } else {\n skips = skipFieldList;\n }\n\n\n if (skips.size() > 0) {\n SimpleList res = new SimpleList(hitsPerPage, hits.totalHits());\n for (MySearchHit h : hits.getHits()) {\n try {\n String str = new String(h.source(), charset);\n RewriteSearchHit newHit = new RewriteSearchHit(h.id(), h.parent(), h.version(), str);\n\n for (String ignoreField: skips) {\n newHit.remove(ignoreField);\n }\n res.add(newHit);\n } catch (UnsupportedEncodingException ex) {\n throw new RuntimeException(ex);\n }\n }\n\n return res;\n } else {\n return hits;\n }\n }", "@Override\n\tpublic void processing() {\n\n\t}", "public void groupObjects(String type) {\n\t\tif(type.equals(\"IPv4\")) {\n\t\t\tgroupWebPageObjects(14,17);\n\t\t\tgroupHostObjects(14);\n\t\t}\n\t\telse if(type.equals(\"IPv6\")) {\n\t\t\tgroupWebPageObjects(7,10);\n\t\t\tgroupHostObjects(7);\n\t\t}\n\t\telse if(type.equals(\"Netflow\")) {\n\t\t\tgroupWebPageObjects(4,7);\n\t\t\tgroupHostObjects(4);\n\t\t}\n\t\telse if(type.equals(\"Webserver\")) {\n\t\t\tgroupHostObjects(0);\n\t\t}\n\t\telse if(type.equals(\"Syslog\")) {\n\t\t\tgroupHostObjects(2);\n\t\t}\n\t}", "private void applyMetadataTemplateProjectES_BU_TF() {\n\t\tArrayList<ArtifactType> artifactTypes = new ArrayList<ArtifactType>();\n\t\tArrayList<DependencyType> dependencyTypes = new ArrayList<DependencyType>();\n\t\tArrayList<TaskType> taskTypes = new ArrayList<TaskType>();\n\t\tArrayList<RuleType> ruleTypes = new ArrayList<RuleType>();\n\t\tArrayList<Rule> rules = new ArrayList<Rule>();\n\t\t\n\t\tArrayList<ArtifactType> u = new ArrayList<ArtifactType>();\n\t\tArrayList<ArtifactType> p = new ArrayList<ArtifactType>();\n\t\tArrayList<DependencyType> d = new ArrayList<DependencyType>();\n\t\tString description = \"\";\n\t\t\n\t\tArtifactType ATstart = new ArtifactType(\"Start\",\".start\");\n\t\tArtifactType ATstory = new ArtifactType(\"Story\",\".txt\");\n\t\tArtifactType ATstoryTest = new ArtifactType(\"StoryTest\",\".java\");\n\t\tArtifactType ATinterface = new ArtifactType(\"Interface\",\".java\");\n\t\tArtifactType ATdomainClass = new ArtifactType(\"DomainClass\",\".java\");\n\t\tArtifactType ATdomainTest = new ArtifactType(\"DomainTest\",\".java\");\n\t\tartifactTypes.add(ATstart);\n\t\tartifactTypes.add(ATstory);\n\t\tartifactTypes.add(ATstoryTest);\n\t\tartifactTypes.add(ATinterface);\t\t\n\t\tartifactTypes.add(ATdomainClass);\n\t\tartifactTypes.add(ATdomainTest);\n\n\t\tu.add(ATstart);\n\t\tp.add(ATstory);\n\t\tDependencyType DTstory = new DependencyType(ATstart,ATstory,\"DTstory\");\n\t\td.add(DTstory);\n\t\tdependencyTypes.add(DTstory);\n\t\tdescription = \"Create a story for the project\";\n\t\ttaskTypes.add(new TaskType(new ArrayList<ArtifactType>(u),new ArrayList<ArtifactType>(p),new ArrayList<DependencyType>(d),description));\n\t\tu.clear(); p.clear(); d.clear();\n\t\t\n\t\tu.add(ATstory);\n\t\tp.add(ATdomainTest);\n\t\tDependencyType DTdomainTest = new DependencyType(ATstory,ATdomainTest,\"DTdomainTest\");\n\t\td.add(DTdomainTest);\n\t\tDTdomainTest.setMultiplicity(0);\n\t\tdependencyTypes.add(DTdomainTest);\n\t\tdescription = \"Create a domain test for the story\";\n\t\ttaskTypes.add(new TaskType(new ArrayList<ArtifactType>(u),new ArrayList<ArtifactType>(p),new ArrayList<DependencyType>(d),description));\n\t\tu.clear(); p.clear(); d.clear();\n\t\t\n\t\tu.add(ATdomainTest);\n\t\tp.add(ATdomainClass);\n\t\tDependencyType DTdomainClass = new DependencyType(ATdomainTest,ATdomainClass,\"DTdomainClass\");\n\t\td.add(DTdomainClass);\n\t\tdependencyTypes.add(DTdomainClass);\n\t\tdescription = \"Create a domain class for the domain test\";\n\t\ttaskTypes.add(new TaskType(new ArrayList<ArtifactType>(u),new ArrayList<ArtifactType>(p),new ArrayList<DependencyType>(d),description));\n\t\tu.clear(); p.clear(); d.clear();\n\t\t\n\t\tu.add(ATdomainTest);\n\t\tp.add(ATinterface);\n\t \tDependencyType DTinterface = new DependencyType(ATdomainTest,ATinterface,\"DTinterface\");\n\t\td.add(DTinterface);\n\t\tdependencyTypes.add(DTinterface);\n\t\tdescription = \"Create a interface for the domain test\";\n\t\ttaskTypes.add(new TaskType(new ArrayList<ArtifactType>(u),new ArrayList<ArtifactType>(p),new ArrayList<DependencyType>(d),description));\n\t\tu.clear(); p.clear(); d.clear();\n\t\t\n\t\tu.add(ATinterface);\n\t p.add(ATstoryTest);\n\t\tDependencyType DTstoryTest = new DependencyType(ATinterface,ATstoryTest,\"DTstoryTest\");\n\t\td.add(DTstoryTest);\n\t\tdependencyTypes.add(DTstoryTest);\n\t\tdescription = \"Create a story test for the interface\";\n\t\ttaskTypes.add(new TaskType(new ArrayList<ArtifactType>(u),new ArrayList<ArtifactType>(p),new ArrayList<DependencyType>(d),description));\n\t\tu.clear(); p.clear(); d.clear();\n\t\t\n\t\tstatus.setArtifactTypes(artifactTypes);\n\t\tstatus.setDependencyTypes(dependencyTypes);\n\t\tstatus.setTaskTypes(taskTypes);\t\n\t\tstatus.setRuleTypes(ruleTypes);\n\t\tstatus.setRules(rules);\n\t}", "void startEntry(String type);", "private void computeSourceClass(JClassType type) {\n if (type == null || alreadyRan.contains(type)) {\n return;\n }\n \n alreadyRan.add(type);\n \n /*\n * IMPORTANT: Visit my supertype first. The implementation of\n * com.google.gwt.lang.Cast.wrapJSO() depends on all superclasses having\n * typeIds that are less than all their subclasses. This allows the same\n * JSO to be wrapped stronger but not weaker.\n */\n computeSourceClass(type.extnds);\n \n if (!program.typeOracle.isInstantiatedType(type)) {\n return;\n }\n \n // Find all possible query types which I can satisfy\n Set/* <JReferenceType> */yesSet = null;\n for (Iterator iter = queriedTypes.keySet().iterator(); iter.hasNext();) {\n JReferenceType qType = (JReferenceType) iter.next();\n Set/* <JReferenceType> */querySet = (Set) queriedTypes.get(qType);\n if (program.typeOracle.canTriviallyCast(type, qType)) {\n for (Iterator it = querySet.iterator(); it.hasNext();) {\n JReferenceType argType = (JReferenceType) it.next();\n if (program.typeOracle.canTriviallyCast(type, argType)) {\n if (yesSet == null) {\n yesSet = new HashSet/* <JReferenceType> */();\n }\n yesSet.add(qType);\n break;\n }\n }\n }\n }\n \n /*\n * Weird: JavaScriptObjects MUST have a typeId, the implementation of\n * Cast.wrapJSO depends on it.\n */\n if (yesSet == null && !program.isJavaScriptObject(type)) {\n return; // won't satisfy anything\n }\n \n // use an array to sort my yes set\n JReferenceType[] yesArray = new JReferenceType[nextQueryId];\n if (yesSet != null) {\n for (Iterator it = yesSet.iterator(); it.hasNext();) {\n JReferenceType yesType = (JReferenceType) it.next();\n Integer boxedInt = (Integer) queryIds.get(yesType);\n yesArray[boxedInt.intValue()] = yesType;\n }\n }\n \n // create a sparse lookup object\n JsonObject jsonObject = new JsonObject(program);\n for (int i = 0; i < nextQueryId; ++i) {\n if (yesArray[i] != null) {\n JIntLiteral labelExpr = program.getLiteralInt(i);\n JIntLiteral valueExpr = program.getLiteralInt(1);\n jsonObject.propInits.add(new JsonPropInit(program, labelExpr,\n valueExpr));\n }\n }\n \n // add an entry for me\n classes.add(type);\n jsonObjects.add(jsonObject);\n }", "public void findByType(String type)\n {\n boolean found = false;\n for(KantoDex entry : entries)\n {\n if(entry.getTypes1().contains(type) && !type.equals(\"\"))\n {\n found = true;\n } \n }\n if(!found)\n {\n System.out.println(\"You have input a nonexistent type, or the type was not applicable to this entry.\"); \n }\n else\n {\n System.out.println(\"All Pokedex entries of type \" + type + \":\");\n for(KantoDex entry : entries)\n {\n if(entry.getType1().equals(type) || entry.getType2().equals(type))\n {\n entry.display();\n }\n }\n }\n }", "public void getJobMixAndMakeProcesses(){\n if(jobType == 1){\n //type 1: there is only one process, with A=1 and B=C=0\n //since there is only one process, no the currentWord is 111%processSize\n processes.add(new process(1, 1, 0, 0, 111 % processSize));\n\n }else if(jobType ==2){\n //type 2: there are four processes, each with A=1, B=C=0\n for(int i=1; i<5; i++){\n processes.add(new process(i, 1, 0, 0, (111*i) % processSize));\n }\n\n\n }else if(jobType ==3){\n //type 3: there are four processes, each with A=B=C=0\n for(int i=1; i<5; i++){\n processes.add(new process(i,0, 0, 0, (111*i) % processSize));\n }\n\n }else{\n System.out.println(\"job type 4!!\");\n //process 1 with A=0.75, B=0.25, C=0\n processes.add(new process(1, 0.75, 0.25, 0, (111) % processSize));\n //process 2 with A=0.75, B= 0, C=0.25\n processes.add(new process(2, 0.75, 0, 0.25, (111*2) % processSize));\n //process 3 with A=0.75, B=0.125, C=0.125\n processes.add(new process(3, 0.75, 0.125, 0.125, (111*3) % processSize));\n //process 4 with A=0.5, B=0.125, C=0.125\n processes.add(new process(4, 0.5, 0.125, 0.125, (111*4) % processSize));\n\n }\n\n }", "private void dispatch(List<Request> requests) {\n List<Request> inbox = new ArrayList<>(requests);\n\n // run everything in a single transaction\n dao.tx(tx -> {\n int offset = 0;\n Set<UUID> projectsToSkip = new HashSet<>();\n\n while (true) {\n // fetch the next few ENQUEUED processes from the DB\n List<ProcessQueueEntry> candidates = new ArrayList<>(dao.next(tx, offset, BATCH_SIZE));\n if (candidates.isEmpty() || inbox.isEmpty()) {\n // no potential candidates or no requests left to process\n break;\n }\n\n uniqueProjectsHistogram.update(countUniqueProjects(candidates));\n\n // filter out the candidates that shouldn't be dispatched at the moment\n for (Iterator<ProcessQueueEntry> it = candidates.iterator(); it.hasNext(); ) {\n ProcessQueueEntry e = it.next();\n\n // currently there are no filters applicable to standalone (i.e. without a project) processes\n if (e.projectId() == null) {\n continue;\n }\n\n // see below\n if (projectsToSkip.contains(e.projectId())) {\n it.remove();\n continue;\n }\n\n // TODO sharded locks?\n boolean locked = dao.tryLock(tx);\n if (!locked || !pass(tx, e)) {\n // the candidate didn't pass the filter or can't lock the queue\n // skip to the next candidate (of a different project)\n it.remove();\n }\n\n // only one process per project can be dispatched at the time, currently the filters are not\n // designed to run multiple times per dispatch \"tick\"\n\n // TODO\n // this can be improved if filters accepted a list of candidates and returned a list of\n // those who passed. However, statistically each batch of candidates contains unique project IDs\n // so \"multi-entry\" filters are less effective and just complicate things\n // in the future we might need to consider batching up candidates by project IDs and using sharded\n // locks\n projectsToSkip.add(e.projectId());\n }\n\n List<Match> matches = match(inbox, candidates);\n if (matches.isEmpty()) {\n // no matches, try fetching the next N records\n offset += BATCH_SIZE;\n continue;\n }\n\n for (Match m : matches) {\n ProcessQueueEntry candidate = m.response;\n\n // mark the process as STARTING and send it to the agent\n // TODO ProcessQueueDao#updateStatus should be moved to ProcessManager because it does two things (updates the record and inserts a status history entry)\n queueDao.updateStatus(tx, candidate.key(), ProcessStatus.STARTING);\n\n sendResponse(m);\n\n inbox.remove(m.request);\n }\n }\n });\n }", "@Override\r\n\tpublic void process(ResultItems resultItems, Task task) {\n\t\tfinal String url = resultItems.getRequest().getUrl();\r\n\t\tSystem.out.println(\"****************--Entry Pipeline Process--*****************\");\r\n\t\tSystem.out.println(\"Get page: \" + url);\r\n\r\n\t\t/*\r\n\t\t * if(url.matches(\r\n\t\t * \"http://blog\\\\.sina\\\\.com\\\\.cn/s/articlelist_.*\\\\.html\")){//文章列表\r\n\t\t * System.out.println(\"No Op in Article List\"); // }else\r\n\t\t * if(url.matches(\"http://www\\\\.asianews\\\\.it/news-en/.*\")){\r\n\t\t */\r\n\t\t// 具体文章内容\r\n\t\tString time = null, title = null, content = null, abstracts = null, convertUrl = null,query=\"\";\r\n\r\n\t\tfor (Map.Entry<String, Object> entry : resultItems.getAll().entrySet()) {\r\n\t\t\t// System.out.println(entry.getKey()+\":\\n\"+entry.getValue());\r\n\r\n\t\t\tif (AsianViewDetailItem.TIME.equals(entry.getKey())) {\r\n\t\t\t\ttime = (String) entry.getValue();\r\n\t\t\t} else if (AsianViewDetailItem.TITLE.equals(entry.getKey())) {\r\n\t\t\t\ttitle = (String) entry.getValue();\r\n\t\t\t} else if (AsianViewDetailItem.ABSTRACT.equals(entry.getKey())) {\r\n\t\t\t\tabstracts = (String) entry.getValue();\r\n\t\t\t} else if (AsianViewDetailItem.CONTENT.equals(entry.getKey())) {\r\n\t\t\t\tcontent = (String) entry.getValue();\r\n\t\t\t} else if (AsianViewDetailItem.URL.equals(entry.getKey())) {\r\n\t\t\t\tassert url.equals(entry.getValue());\r\n\t\t\t} else if (AsianViewDetailItem.CONVERT_URL.equals(entry.getKey())) {\r\n\t\t\t\tconvertUrl = (String) entry.getValue();\r\n\t\t\t}else if(AsianViewDetailItem.QUERY.equals(entry.getKey())){\r\n//\t\t\t\tquery=\"//query_\"+(String) entry.getValue();\r\n\t\t\t\tquery=(entry.getValue()!=null)?\"//query_\"+entry.getValue():\"\";\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// System.out.println(\"Time:\\n\"+CorpusFormatter.timeFormat(time));\r\n\t\t//\r\n\t\t// System.out.println(\"Title:\\n\"+title);\r\n\t\t//\r\n\t\t// System.out.println(\"Abstract:\\n\"+abstracts);\r\n\t\t//\r\n\t\t// System.out.println(\"Content:\\n\"+content);\r\n\t\t//\r\n\t\t// System.out.println(\"Url:\\n\"+url);\r\n\r\n\t\tString id = String.format(\"%s-%s\", time, ++counter);\r\n\r\n\t\tfinal String fileName = String.format(\".//\" + FileUtils.docName + \"%s//%s.txt\",query, id);\r\n\t\tSystem.out.println(\"File name :\" + fileName);\r\n\t\t// FileUtils.writeContent(fileName, time, title, content);\r\n\t\tFileUtils.writeCorpus(fileName,\r\n\t\t\t\tconvertUrl != null\r\n\t\t\t\t\t\t? CorpusFormatter.format(id, time, url, \"T\", \"P\", title, abstracts,\r\n\t\t\t\t\t\t\t\tcontent, \"\", \"\", convertUrl)\r\n\t\t\t\t\t\t: CorpusFormatter.format(id, time, url, \"T\", \"P\", title, abstracts,\r\n\t\t\t\t\t\t\t\tcontent, \"\", \"\"));\r\n\r\n\t\t// }else{\r\n\t\t// System.out.println(\"Can't match Url\");\r\n\t\t// }\r\n\t\tSystem.out.println(\"****************--Exit Pipeline Process--*****************\");\r\n\r\n\t}", "@Override\n public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnvironment) {\n\n // Scanner class to scan through various component elements\n CodeAnalyzerTreeVisitor visitor = new CodeAnalyzerTreeVisitor();\n\n //long startTime = System.currentTimeMillis();\n\n for (Element e : roundEnvironment.getRootElements()) {\n TreePath tp = trees.getPath(e);\n // invoke the scanner\n try {\n visitor.scan(tp, trees);\n } catch (Exception e1) {\n e1.printStackTrace();\n LOG.error(String.valueOf(e1));\n }\n\n AccessHelper accessHelper = AccessHelper.getInstance();\n accessHelper.addToMap(e.getSimpleName().toString());\n accessHelper.printTree();\n }\n return true;\n }", "private synchronized void buildConcreteProcessor(Environment env) throws Exception {\n if (this.concreteProcessor != null && this.source.getLastModified() == this.lastModified) {\n // Nothing changed\n return;\n }\n\n long startTime = System.currentTimeMillis();\n\n // Dispose the old processor, if any\n if (this.concreteProcessor != null) {\n this.concreteProcessor.markForDisposal();\n }\n\n // Get a builder\n TreeBuilder builder = (TreeBuilder)this.builderSelector.select(\"sitemap\");\n ConcreteTreeProcessor newProcessor = new ConcreteTreeProcessor(this);\n long newLastModified;\n this.setupLogger(newProcessor);\n //FIXME (SW): why do we need to enterProcessor here?\n CocoonComponentManager.enterEnvironment(env, this.manager, this);\n try {\n if (builder instanceof Recomposable) {\n ((Recomposable)builder).recompose(this.manager);\n }\n builder.setProcessor(newProcessor);\n\n newLastModified = this.source.getLastModified();\n\n ProcessingNode root = builder.build(this.source);\n\n newProcessor.setProcessorData(builder.getSitemapComponentManager(), root, builder.getDisposableNodes());\n } finally {\n CocoonComponentManager.leaveEnvironment();\n this.builderSelector.release(builder);\n }\n\n if (this.getLogger().isDebugEnabled()) {\n double time = (this.lastModified - startTime) / 1000.0;\n this.getLogger().debug(\"TreeProcessor built in \" + time + \" secs from \" + this.source.getURI());\n }\n\n // Switch to the new processor (ensure it's never temporarily null)\n this.concreteProcessor = newProcessor;\n this.lastModified = newLastModified;\n }", "private void process(ImmutableSetMultimap<TypeElement, Element> validElements) {\n for (Step step : steps) {\n ImmutableSet<TypeElement> annotationTypes = getSupportedAnnotationTypeElements(step);\n ImmutableSetMultimap<TypeElement, Element> stepElements =\n new ImmutableSetMultimap.Builder<TypeElement, Element>()\n .putAll(indexByAnnotation(elementsDeferredBySteps.get(step), annotationTypes))\n .putAll(filterKeys(validElements, Predicates.in(annotationTypes)))\n .build();\n if (stepElements.isEmpty()) {\n elementsDeferredBySteps.removeAll(step);\n } else {\n Set<? extends Element> rejectedElements =\n step.process(toClassNameKeyedMultimap(stepElements));\n elementsDeferredBySteps.replaceValues(\n step, transform(rejectedElements, ElementName::forAnnotatedElement));\n }\n }\n }", "@Override\n protected void internalTransform(String arg0, Map arg1) {\n for (SootClass c : Scene.v().getApplicationClasses()) {\n //if (c.getName().startsWith(\"com\"))//TODO\n // if(c.getName().start)\n try {\n transform(c);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n\n }\n }", "private void buildMap(int count, char type, String typeName) {\r\n\t\tfor (int i = 1; i <= count; i++) {\r\n\t\t\toriginalMaps.add(new MapType(\"map_\" + type + i, typeName, \"colony/map_\" + type + i));\r\n\t\t}\r\n\t}", "@Override\n\tpublic void process(Page page) {\n\t\t\n\t}", "private static <T> T process(AnnotatedElement element, String annotationType,\n\t\t\tProcessor<T> processor) {\n\t\treturn recursivelyProcess(element, annotationType, processor,\n\t\t\t\tnew HashSet<AnnotatedElement>(), 0);\n\t}", "private void processMappings(DeviceId deviceId,\n List<LispMapRecord> records,\n MappingStore.Type type) {\n records.forEach(r -> {\n MappingEntry me =\n new MappingEntryBuilder(deviceId, r, deviceService).build();\n providerService.mappingAdded(me, type);\n });\n }", "private void runTypeChefAnalyzes(IFolder folder) {\r\n\t\tProjectExplorerController prjController = new ProjectExplorerController();\r\n\t\tprjController.addResource(folder);\r\n\t\ttypeChef.run(prjController.getList());\r\n\t\tfinal Display display = Display.getDefault();\r\n\t\tif (display == null) {\r\n\t\t\tthrow new NullPointerException(\"Display is null\");\r\n\t\t}\r\n\r\n\t\tdisplay.syncExec(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tPluginViewController viewController = PluginViewController\r\n\t\t\t\t\t\t.getInstance();\r\n\t\t\t\tviewController.showPluginView();\r\n\t\t\t\tif (typeChef.getLogs().length > 0) {\r\n\t\t\t\t\tviewController.adaptTo(typeChef.getLogs());\r\n\t\t\t\t\tcontinueCompilationFlag = MessageDialog.openQuestion(\r\n\t\t\t\t\t\t\tdisplay.getActiveShell(),\r\n\t\t\t\t\t\t\t\"Error!\",\r\n\t\t\t\t\t\t\t\"This project contains errors in some feature combinations.\\nDo you want to continue the compilation?\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tviewController.clear();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}", "@Override\n public void preprocess() {\n }", "@Override\n public void run() {\n String whichFiles = \"'\" + languageFolder.getId() + \"' in parents and \" + NOT_TRASHED + \" and \" + FOLDER + \" and \" + NOT_SPREADSHEET;\n List<File> files = getContents(whichFiles);\n \n prune(localLanguageFolder, files);\n processFolders(files, localLanguageFolder);\n }", "private void processUnprocessed()\n {\n List<Geometry> unprocAdds;\n myUnprocessedGeometryLock.lock();\n try\n {\n // Processing the unprocessed geometries may result in them being\n // added back to one of the unprocessed maps, so create a clean set\n // of maps for them to be added to.\n if (myUnprocessedAdds.isEmpty())\n {\n unprocAdds = null;\n }\n else\n {\n unprocAdds = myUnprocessedAdds;\n myUnprocessedAdds = New.list();\n }\n }\n finally\n {\n myUnprocessedGeometryLock.unlock();\n }\n\n if (unprocAdds != null)\n {\n distributeGeometries(unprocAdds, Collections.<Geometry>emptyList());\n }\n }", "<T> ScanRequest<T> preprocess(ScanRequest<T> req) throws ProcessingException;", "protected void preprocess() {\n log.info(\"Processing files. Max size is {} bytes\", max);\n\n int idx = 0;\n boolean closed = false;\n\n Bag current = new Bag();\n PayloadManifest currentManifest = new PayloadManifest();\n\n for (PayloadFile file : b.getFiles().values()) {\n closed = false;\n current.addFile(file);\n currentManifest.addPayloadFile(file);\n\n if (current.getSize() >= max) {\n finishProcessing(current, currentManifest, idx++);\n\n closed = true;\n current = new Bag();\n currentManifest = new PayloadManifest();\n }\n }\n\n // Close out the final bag\n if (!closed) {\n finishProcessing(current, currentManifest, idx);\n }\n }", "private void project(WLayer wLayer, LLayer aLayer) {\n for (WDoc wdoc : wLayer.col()) {\n for (WPara wpara : wdoc.col()) {\n for (WForm wform : wpara.col()) {\n wform2tags.addEmpty(wform);\n }\n }\n }\n\n // todo project all the way to w layer\n // fill tags\n for (LDoc ldoc : aLayer.col()) {\n for (LPara lpara : ldoc.col ()) {\n for (Edge edge : lpara.getEdges()) {\n List<WForm> wforms = new ArrayList<>(DataUtil.getWForms(edge));\n\n if (false) { // todo !!\n for (FForm form : wforms) { // todo horrible, but usually these is just one iteration in each cycle\n for (Errorr err : edge.getErrors()) {\n wform2tags.add((WForm)form, err.getTag());\n }\n wform2emend.addAll( (WForm)form, edge.getHigher() );\n }\n }\n else {\n counter.totalEForms += edge.getHigher().size(); \n if (wforms.isEmpty()) {\n // inserted form(s), i.e. form(s) without a w-layer counterpart\n counter.inserted += edge.getHigher().size(); \n }\n else {\n for (Errorr err : edge.getErrors()) {\n wform2tags.add((WForm)wforms.get(0), err.getTag());\n }\n wform2emend.addAll( (WForm)wforms.get(0), edge.getHigher() );\n \n if (wforms.size() > 1) {\n for (FForm form : wforms.subList(1, wforms.size()) ) { // todo horrible, but usually these is just one iteration in each cycle\n wform2tags.add((WForm)form, \"_\");\n wform2emend.addAll((WForm)form, Arrays.asList(new LForm(aLayer, \"\", FForm.Type.normal, \"_\")));\n }\n }\n }\n \n }\n }\n }\n }\n\n }", "public final FieldResults run(EnvWithSubmitInfo envWithSubmitInfo, GroupFieldType group) {\n // call the apply Method\n FieldResults fieldResults = processFields(envWithSubmitInfo, group.getChilds());\n\n // run postprocessors\n fieldResults = this.runPostProcessors(fieldResults);\n\n // run the form validators\n if (envWithSubmitInfo.isSubmitted()) {\n FieldValdationResults overridenValidationResults =\n this.runFormValidations(fieldResults, group.getValidators(group.of()));\n\n // if form-validators changed validaiton results, correct them on the elemtns\n return this.correctFieldResults(fieldResults, overridenValidationResults);\n } else {\n return fieldResults;\n }\n }", "private LazyPreprocessedPage preprocess(\n\t PageTitle title,\n\t String validatedWikitext,\n\t boolean forInclusion,\n\t EntityMap entityMap,\n\t ContentNode parentLog)\n\t throws CompilerException\n\t{\n\t\tPreprocessorLog log = new PreprocessorLog();\n\t\tparentLog.getContent().add(log);\n\t\t\n\t\tlog.setForInclusion(forInclusion);\n\t\t\n\t\tStopWatch stopWatch = new StopWatch();\n\t\tstopWatch.start();\n\t\t\n\t\ttry\n\t\t{\n\t\t\tLazyPreprocessor preprocessor = new LazyPreprocessor(wikiConfig);\n\t\t\t\n\t\t\tLazyPreprocessedPage preprocessedAst =\n\t\t\t (LazyPreprocessedPage) preprocessor.parseArticle(\n\t\t\t validatedWikitext,\n\t\t\t title.getFullTitle(),\n\t\t\t forInclusion);\n\t\t\t\n\t\t\treturn preprocessedAst;\n\t\t}\n\t\tcatch (xtc.parser.ParseException e)\n\t\t{\n\t\t\tlog.getContent().add(new ParseException(e.getMessage()));\n\t\t\t\n\t\t\tthrow new CompilerException(\"Preprocessing failed!\", e);\n\t\t}\n\t\tcatch (Throwable e)\n\t\t{\n\t\t\tlogger.error(\"Preprocessing failed!\", e);\n\t\t\t\n\t\t\tStringWriter w = new StringWriter();\n\t\t\te.printStackTrace(new PrintWriter(w));\n\t\t\tlog.getContent().add(new UnhandledException(e, w.toString()));\n\t\t\t\n\t\t\tthrow new CompilerException(\"Preprocessing failed!\", e);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tstopWatch.stop();\n\t\t\tlog.setTimeNeeded(stopWatch.getElapsedTime());\n\t\t}\n\t}", "private void processFromLastRun() {\n for (String configId : dirsFromLastRunToProcess.keySet()) {\r\n File dirToProcess = dirsFromLastRunToProcess.get(configId);\r\n processContentFiles(dirToProcess, configId);\r\n }\r\n \r\n dirsFromLastRunToProcess = new HashMap<String, File>();\r\n }", "@Override\n\tpublic Result doProcessing() {\n\t\treturn doProcessing1();\n\t}", "public final void process() {\n parseReport();\n checkThreshold();\n updateQualityXML();\n }", "void addTypes(EntryRep bits) {\n\tString classFor = bits.classFor();\n\tString[] superclasses = bits.superclasses();\n\n\t//The given EntryRep will add its className to the\n\t//subtype list of all its supertypes.\n\n\tString prevClass = classFor;\n\tfor (int i = 0; i < superclasses.length; i++) {\n\t if (!addKnown(superclasses[i], prevClass)) {\n\t\treturn;\n\t }\n\t prevClass = superclasses[i];\n\t}\n\n\t// If we are here prevClass must have java.Object as its\n\t// direct superclass (we don't store \"java.Object\" in\n\t// EntryRep.superclasses since that would be redundant) and\n\t// prevClass is not already in the the tree. Place it in the\n\t// \"net.jini.core.entry.Entry\" bucket so it does not get lost\n\t// if it does not have any sub-classes.\n\t//\n\t// Fix suggested by Lutz Birkhahn <lutz.birkhahn@GMX.DE>\n\taddKnown(ROOT, prevClass);\n }", "@Override\n protected void processPages(PDPageTree pages) throws IOException {\n\n List<ObjectRef> pageRefs = new ArrayList<>();\n //STEP 1: get the page refs\n findPages(pdDocument.getPages().getCOSObject().getItem(COSName.KIDS), pageRefs);\n //confirm the right number of pages was found\n if (pageRefs.size() != pdDocument.getNumberOfPages()) {\n throw new IOException(new TikaException(\n \"Couldn't find the right number of page refs (\" + pageRefs.size() +\n \") for pages (\" + pdDocument.getNumberOfPages() + \")\"));\n }\n\n PDStructureTreeRoot structureTreeRoot =\n pdDocument.getDocumentCatalog().getStructureTreeRoot();\n\n //STEP 2: load the roleMap\n Map<String, HtmlTag> roleMap = loadRoleMap(structureTreeRoot.getRoleMap());\n\n //STEP 3: load all of the text, mapped to MCIDs\n Map<MCID, String> paragraphs = loadTextByMCID(pageRefs);\n\n //STEP 4: now recurse the the structure tree root and output the structure\n //and the text bits from paragraphs\n\n try {\n recurse(structureTreeRoot.getK(), null, 0, paragraphs, roleMap);\n } catch (SAXException e) {\n throw new IOException(e);\n }\n\n //STEP 5: handle all the potentially unprocessed bits\n try {\n if (state.hrefAnchorBuilder.length() > 0) {\n xhtml.startElement(\"p\");\n writeString(state.hrefAnchorBuilder.toString());\n xhtml.endElement(\"p\");\n }\n for (MCID mcid : paragraphs.keySet()) {\n if (!state.processedMCIDs.contains(mcid)) {\n if (mcid.mcid > -1) {\n //TODO: LOG! piece of text that wasn't referenced in the marked content\n // tree\n // but should have been. If mcid == -1, this was a known item not part of\n // content tree.\n }\n\n xhtml.startElement(\"p\");\n writeString(paragraphs.get(mcid));\n xhtml.endElement(\"p\");\n }\n }\n } catch (SAXException e) {\n throw new IOException(e);\n }\n //Step 6: for now, iterate through the pages again and do all the other handling\n //TODO: figure out when we're crossing page boundaries during the recursion\n // step above and do the page by page processing then...rather than dumping this\n // all here.\n for (PDPage page : pdDocument.getPages()) {\n startPage(page);\n endPage(page);\n }\n\n }", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "private List<Entity> processEntities(List<Mapping> mappings, Map record) throws Exception{\n\n\t\tList<Entity> builtEnts = new ArrayList<Entity>();\n\t\t\n\t\tList<Entity> entities = buildEntities();\n\t\t\n\t\tboolean isOmitted = isOmitted(record);\n\t\t\n\t\t/*\n\t\tfor(String omkeyfull: OMISSIONS_MAP.keySet()) {\n\t\t\t\n\t\t\tString[] omkeys = omkeyfull.split(\":\");\n\t\t\t\n\t\t\tisOmitted = iterateOmkeys(Arrays.asList(omkeys), record);\n\t\t\t\n\t\t}\n*/\t\t\n\t\t\n\t\tif(!isOmitted){\n\t\t\t\n\t\t\tfor(Mapping mapping: mappings){\n\t\t\t\tList<Object> relationalValue = new ArrayList<Object>();\n\n\t\t\t\tif(!IS_DIR) {\n\t\t\t\t\t\n\t\t\t\t\tString[] array = new String[mapping.getKey().split(\":\").length - 1];\n\t\t\t\t\tarray[0] = mapping.getKey().split(\":\")[0] + \":\" + RELATIONAL_KEY;\n\t\t\t\t\trelationalValue = findValueByKey(record,array);\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\tString[] array = new String[mapping.getKey().split(\":\").length - 1];\n\t\t\t\t\tarray[0] = mapping.getKey().split(\":\")[0] + \":\" + RELATIONAL_KEY;\n\t\t\t\t\trelationalValue = findValueByKey(record,array);\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tDataType dt = DataType.initDataType(StringUtils.capitalize(mapping.getDataType()));\n\t\t\t\t\n\t\t\t\tif(!mapping.getDataType().equalsIgnoreCase(\"OMIT\")){\n\t\t\t\t\tList<Object> values = new ArrayList<Object>();\n\t\t\t\t\t\n\t\t\t\t\tif(!IS_DIR) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tString[] array = new String[mapping.getKey().split(\":\").length - 1];\n\t\t\t\t\t\tarray[0] = mapping.getKey();\n\t\t\t\t\t\tvalues = findValueByKey2(record,new ArrayList(Arrays.asList(array)));\n\t\t\t\t\t\t//values = findValueByKey2(record, new ArrayList(Arrays.asList(mapping.getKey().split(\":\"))));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tString[] array = new String[mapping.getKey().split(\":\").length - 1];\n\t\t\t\t\t\tarray[0] = mapping.getKey();\n\t\t\t\t\t\tvalues = findValueByKey2(record,new ArrayList(Arrays.asList(array)));\n\t\t\t\t\t}\n\t\t\t\t\t\n\n\t\t\t\t\tMap<String,String> options = mapping.buildOptions(mapping);\n\t\t\t\t\t\n\t\t\t\t\tif(!options.isEmpty()) {\n\t\t\t\t\t\tif(options.containsKey(\"TYPE\")) {\n\t\t\t\t\t\t\tString type = options.get(\"TYPE\");\n\t\t\t\t\t\t\tif(type.equalsIgnoreCase(\"datediffin\")) {\n\n\t\t\t\t\t\t\t\tString dateDiffFrom = options.containsKey(\"DIFFFROM\") ? options.get(\"DIFFFROM\").replaceAll(\"-\",\":\"): null;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tString mask = options.containsKey(\"MASK\") ? options.get(\"MASK\"): null;\n\n\t\t\t\t\t\t\t\tString diffIn = options.containsKey(\"DIFFIN\") ? options.get(\"DIFFIN\"): null;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tLocalDate startDateInclusive = null;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tLocalDate endDateExclusive = null;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(dateDiffFrom.equalsIgnoreCase(\"sysdate\")) {\n\t\t\t\t\t\t\t\t\tstartDateInclusive = LocalDate.now();\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tObject fromO = \n\t\t\t\t\t\t\t\t\t\t\tfindValueByKey(new LinkedHashMap(record), dateDiffFrom.split(\":\")).get(0);\n\n\t\t\t\t\t\t\t\t\tif(mask != null) {\n\t\t\t\t\t\t\t\t\t\tif(fromO != null) {\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tString from = fromO.toString();\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tstartDateInclusive = LocalDate.parse(from, DateTimeFormatter.ofPattern(mask) );\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t} else throw new Exception(\"No mask given\");\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor(int x = 0; x < values.size(); x++) {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tString value = values.get(0).toString();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tendDateExclusive = value.isEmpty() ? null: LocalDate.parse(value, DateTimeFormatter.ofPattern(mask) );\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(endDateExclusive != null) {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tPeriod period = Period.between(endDateExclusive, startDateInclusive );\n\n\t\t\t\t\t\t\t\t\t\tvalues.remove(x);\n\t\t\t\t\t\t\t\t\t\tif(diffIn.equalsIgnoreCase(\"years\")) {\n\t\t\t\t\t\t\t\t\t\t\tvalues.add(x, period.getYears());\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if(type.equalsIgnoreCase(\"datedifffrom\")) {\n\t\t\t\t\t\t\t\tString dateDiffFrom = options.containsKey(\"DIFFFROM\") ? options.get(\"DIFFFROM\").replaceAll(\"-\",\":\"): null;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tString mask = options.containsKey(\"MASK\") ? options.get(\"MASK\"): null;\n\n\t\t\t\t\t\t\t\tString diffIn = options.containsKey(\"DIFFIN\") ? options.get(\"DIFFIN\"): null;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tLocalDate startDateInclusive = null;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tLocalDate endDateExclusive = null;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(dateDiffFrom.equalsIgnoreCase(\"sysdate\")) {\n\t\t\t\t\t\t\t\t\tstartDateInclusive = LocalDate.now();\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tObject fromO = \n\t\t\t\t\t\t\t\t\t\t\tfindValueByKey(new LinkedHashMap(record), dateDiffFrom.split(\":\")).get(0);\n\n\t\t\t\t\t\t\t\t\tif(mask != null) {\n\t\t\t\t\t\t\t\t\t\tif(fromO != null) {\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tString from = fromO.toString();\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tstartDateInclusive = LocalDate.parse(from, DateTimeFormatter.ofPattern(mask) );\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t} else throw new Exception(\"No mask given\");\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor(int x = 0; x < values.size(); x++) {\n\t\t\t\t\t\t\t\t\tif(values.get(0) != null) {\n\t\t\t\t\t\t\t\t\t\tString value = values.get(0).toString();\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tendDateExclusive = value.isEmpty() ? null: LocalDate.parse(value, DateTimeFormatter.ofPattern(mask) );\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif(endDateExclusive != null) {\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tPeriod period = Period.between(startDateInclusive, endDateExclusive);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tvalues.remove(x);\n\t\t\t\t\t\t\t\t\t\t\tif(diffIn.equalsIgnoreCase(\"years\")) {\n\t\t\t\t\t\t\t\t\t\t\t\tvalues.add(x, period.getYears());\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\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\tString mappingK = mapping.getKey().split(\":\")[0];\n\t\t\t\t\tString recordK = record.keySet().iterator().next().toString().split(\":\")[0];\n\t\t\t\t\tif(mappingK.equals(recordK)) {\n\t\t\t\t\t\tif(values == null) throw new Exception(\"Following Mapping does not exist in the datafile: \\n\"\n\t\t\t\t\t\t\t\t+ mapping.toCSV() + \"\\n\" +\n\t\t\t\t\t\t\t\t\" be sure that the column and file exist.\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(relationalValue == null) throw new Exception(\"Following Mapping does not exist in the datafile: \\n\"\n\t\t\t\t\t\t\t\t+ mapping.toCSV() + \"\\n\" +\n\t\t\t\t\t\t\t\t\" be sure that the column and file exist.\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tSet<Entity> newEnts = new HashSet<Entity>();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(values.isEmpty()) {\n\t\t\t\t\t\t\tif(INCLUDE_EMPTY_VALUES == true) {\n\t\t\t\t\t\t\t\tnewEnts = dt.generateTables(mapping, entities, values, relationalValue);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tnewEnts = dt.generateTables(mapping, entities, values, relationalValue);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(newEnts != null && newEnts.size() > 0){\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tbuiltEnts.addAll(newEnts);\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t}\n\n\t\t}\n\t\treturn builtEnts;\t\t\n\t}", "public static void main(String[] args) {\n\t\tItemType type2 = ItemType.valueOf(\"PROJECT_SPECIFIC\");\n\t\tItemType type4 = ItemType.values()[0];\n\t\tItemType type1 = ItemType.DEPARTMENTAL;\n\t\t\n//\t\tList<Tree> trees = new ArrayList<Tree>();\n//\t\tList<Plant> plants = trees;\n\t\t\n\t\t\n\t\tList<Plant> plants = new ArrayList<Plant>();\n\t\tplants.add(new Plant());\n\t\tList<? extends Plant> trees = plants;\n\t\tPlant plant = trees.get(0);\n\t}", "public void process() {\n cycleID.incrementAndGet();\r\n List<ChunkBB> chunkbbs;\r\n synchronized (loadedChunks) {\r\n chunkbbs = new LinkedList<>(loadedChunks);\r\n }\r\n\r\n Condition cond = chunkbbs.stream().map(\r\n b -> GAIA_STATES.WORLD_UUID.eq(b.getWorld())\r\n .and(GAIA_STATES.X.gt(b.getX() * 16))\r\n .and(GAIA_STATES.Z.gt(b.getZ() * 16))\r\n .and(GAIA_STATES.X.le(b.getX() * 16 + 16))\r\n .and(GAIA_STATES.Z.le(b.getZ() * 16 + 16))\r\n ).reduce(DSL.falseCondition(), (a, b) -> a.or(b));\r\n\r\n Gaia.DBI().submit((conf) -> {\r\n DSLContext ctx = DSL.using(conf);\r\n ctxref.set(ctx);\r\n ReturnContainer rec;\r\n\r\n while ((rec = input.poll()) != null) {\r\n switch (rec.getState()) {\r\n case DELETE:\r\n LOG.fine(\"[\" + cycleID + \"]Deleting:\\n\" + rec);\r\n ctx.executeDelete(rec.getRec());\r\n break;\r\n case UPDATE:\r\n try {\r\n LOG.fine(\"[\" + cycleID + \"]Updating:\\n\" + rec);\r\n ctx.executeUpdate(rec.getRec());\r\n } catch (Exception e) {\r\n LOG.log(Level.SEVERE, \"[\" + cycleID + \"]Failed to update record.\\n\" + rec.getRec(), e);\r\n }\r\n break;\r\n default:\r\n LOG.severe(\"[\" + cycleID + \"]Failed to process record.\\n\" + rec.getRec() + \"\\nUnknown state: \" + rec.getState());\r\n }\r\n }\r\n if (output.isEmpty()) {\r\n List<GaiaStatesRecord> recs = ctx\r\n .selectFrom(GAIA_STATES)\r\n .where(GAIA_STATES.TRANSITION_TIME.lt(new Timestamp(System.currentTimeMillis())))\r\n .and(cond)\r\n .fetch();\r\n if (!recs.isEmpty()) {\r\n LOG.fine(\"Adding \" + recs.size() + \" records to output queue.\");\r\n output.addAll(recs);\r\n }\r\n }\r\n ctxref.set(null);\r\n });\r\n }", "private void processTypes(Object value, ProcessorContext<T> processorContext)\r\n {\r\n CustomFieldProcessor cfp = getTypeProcessor(processorContext.getField().getType());\r\n LOG.debug(\"processTypes() - CustomFieldProcessor: \" + cfp);\r\n if (cfp == null) {\r\n cfp = getTypeProcessor(Object.class);\r\n }\r\n cfp.processCustomField(value, processorContext);\r\n }", "@SuppressWarnings(\"unchecked\")\n private void processRecord(Object convertedRecord, ForkOperator forkOperator, RowLevelPolicyChecker rowChecker,\n RowLevelPolicyCheckResults rowResults, int branches)\n throws Exception {\n // Skip the record if quality checking fails\n if (!rowChecker.executePolicies(convertedRecord, rowResults)) {\n return;\n }\n\n List<Boolean> forkedRecords = forkOperator.forkDataRecord(this.taskState, convertedRecord);\n if (forkedRecords.size() != branches) {\n throw new ForkBranchMismatchException(String\n .format(\"Number of forked data records [%d] is not equal to number of branches [%d]\", forkedRecords.size(),\n branches));\n }\n\n boolean makesCopy = inMultipleBranches(forkedRecords);\n if (makesCopy && !(convertedRecord instanceof Copyable)) {\n throw new CopyNotSupportedException(convertedRecord + \" is not copyable\");\n }\n\n for (int i = 0; i < branches; i++) {\n if (this.forks.get(i).isPresent() && forkedRecords.get(i)) {\n this.forks.get(i).get().processRecord(makesCopy ? ((Copyable) convertedRecord).copy() : convertedRecord);\n }\n }\n }", "public void processing();", "@Override\n public void preprocess() {\n }", "protected void postProcessEntryConfiguration(ModularConfigurationEntry<T> entry) {\n }", "private static void applyOperation(ImageProcessor input, ImageProcessor output, StructureElement structureElement,\r\n\t\t\t\t\t\t\t\t\t Type type) {\r\n\t\tint thresholdInclusive = -1;\r\n\t\tif (type == Type.ERODE) {\r\n\t\t\tint sum = 0;\r\n\t\t\tfor (int x = 0; x < structureElement.getWidth(); x++) {\r\n\t\t\t\tfor (int y = 0; y < structureElement.getHeight(); y++) {\r\n\t\t\t\t\tif (structureElement.get(x, y)) {\r\n\t\t\t\t\t\tsum++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tthresholdInclusive = sum;\r\n\t\t\t}\r\n\t\t} else if (type == Type.DILATE) {\r\n\t\t\tthresholdInclusive = 1;\r\n\t\t} else {\r\n\t\t\tthrow new RuntimeException(\"Unknown type: \" + type);\r\n\t\t}\r\n\r\n\t\tint maxX = input.getWidth() - structureElement.getWidth();// off by 1?\r\n\t\tint maxY = input.getHeight() - structureElement.getHeight();// off by 1?\r\n\r\n\t\tfor (int x = 0; x < input.getWidth(); x++) {\r\n\t\t\tfor (int y = 0; y < input.getHeight(); y++) {\r\n\t\t\t\toutput.set(x, y, BLACK);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (int x = 0; x < maxX; x++) {\r\n\t\t\tfor (int y = 0; y < maxY; y++) {\r\n\t\t\t\tint sum = 0;\r\n\t\t\t\tfor (int i = 0; i < structureElement.getWidth(); i++) {\r\n\t\t\t\t\tfor (int j = 0; j < structureElement.getHeight(); j++) {\r\n\t\t\t\t\t\tboolean set = (input.getPixel(x + i, y + j) > 127) && structureElement.get(i, j);\r\n\t\t\t\t\t\tif (set) {\r\n\t\t\t\t\t\t\tsum++;\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\tint newValue = (sum >= thresholdInclusive) ? WHITE : BLACK;\r\n\t\t\t\toutput.putPixel(x + structureElement.anchorX, y + structureElement.anchorY, newValue);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private synchronized void syncTypeChefAnalyzes() {\r\n\t\tif (threadInExecId.isEmpty()) {\r\n\t\t\tProjectConfigurationErrorLogger.getInstance().clearLogList();\r\n\t\t\trunTypeChefAnalyzes(featureProject.getSourceFolder());\r\n\t\t}\r\n\t\tthreadInExecId.add(Thread.currentThread().getId());\r\n\t}", "public void setEntryType(final Class<?> entryType) {\r\n\t\tthis.entryType = entryType;\r\n\t}", "@Override\r\n public void process(CtClass<?> clazz) {\r\n this.processClass(clazz);\r\n }", "public void filter(boolean onRepository, int type) {\r\n\t\t\r\n\t\tList changes = null;\r\n\t\tif (!onRepository) {\r\n\t\t\t// filter from ontChangeTT\r\n\t\t\tchanges = this.ontChanges;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// filter from repChangeTT\r\n\t\t\tchanges = this.repChanges;\t\t\t\r\n\t\t}\r\n\t\t// iterate through changes and remove any that match type\r\n\t\tfor (Iterator iter = new ArrayList(changes).iterator(); iter.hasNext();) {\r\n\t\t\tSwoopChange swc = (SwoopChange) iter.next();\r\n\t\t\tif (swc.isRedundant && type==this.REDUNDANT_CHANGE) changes.remove(swc);\r\n\t\t\telse if (swc.isOnRepository && type==this.REPOSITORY_CHANGE) changes.remove(swc);\r\n\t\t\telse if (!swc.isOnRepository && type==this.LOCAL_CHANGE) changes.remove(swc);\r\n\t\t}\r\n\t\t\r\n\t\t// sort changes??\r\n\t\t\r\n\t\t// refresh UI of target after adding changes\r\n\t\tif (!onRepository) this.refreshOntTreeTable();\r\n\t\telse {\r\n\t\t\t// add (new) repChanges to newCommit node directly\r\n\t\t\tnewCommitNode.children = new Vector();\r\n\t\t\tfor (Iterator iter = changes.iterator(); iter.hasNext();) {\r\n\t\t\t\tSwoopChange swc = (SwoopChange) iter.next();\r\n\t\t\t\tTreeTableNode swcNode = new TreeTableNode(swc);\r\n\t\t\t\tnewCommitNode.addChild(swcNode);\t\r\n\t\t\t}\r\n\t\t\tthis.refreshRepTreeTable(true);\r\n\t\t}\t\t\r\n\t}", "private Project compileProject() {\n\t\t\tProject p = null;\n\t\t\t\n\t\t\tif(pType.equals(\"o\")) {\n\t\t\t\ttry {\n\t\t\t\t\tp = new OngoingProject(pCode.getText(), pName.getText(), dateFormat.parse(pSDate.getText()),pClient.getText(), dateFormat.parse(pDeadline.getText()), Double.parseDouble(pBudget.getText()), Integer.parseInt(pCompletion.getText()));\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t} else if(pType.equals(\"f\")) {\n\t\t\t\ttry {\n\t\t\t\t\tp = new FinishedProject(pCode.getText(), pName.getText(), dateFormat.parse(pSDate.getText()),pClient.getText(), dateFormat.parse(pEndDate.getText()), Double.parseDouble(pTotalCost.getText()));\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\t\n\t\t\treturn p;\n\t\t}", "public static void process(String rootFileName, \n String inputDirectory, String outputDirectory, \n Set<Integer> yearSet, Set<String> fieldnameSet,\n Set<Integer> weightTypeSet,\n Set<Integer> useWhatSet, \n ElsevierPapersFilter ipf,\n boolean extractGCC,\n int minDegreeIn, int minDegreeOut, double minWeight,\n int infoLevel){\n System.out.println(\"--- Processing papers from \"+rootFileName);\n final String ext=\".dat\";\n \n String fullFileName=inputDirectory+rootFileName+ext;\n TreeSet<ebrpPublication> fullPubSet;\n ProcessPublicationList ppl = new ProcessPublicationList();\n fullPubSet = ppl.readEBRPPublicationData(fullFileName, infoLevel);\n System.out.println(\"--- Have \"+fullPubSet.size()+\" papers from \"+fullFileName);\n \n // optional paper classification\n //ClassifyPublications.classify(fullPubSet, infoLevel);\n \n int sampleFrequency=1; // <=1 means take all\n if (sampleFrequency<1) sampleFrequency=1;\n System.out.println(\"--- Taking every \"+sampleFrequency+\"th paper\");\n //if (sampleFrequency<=1) pubSet=fullPubSet;\n for (Integer year: yearSet){\n int pubNumber=0;\n TreeSet<ebrpPublication> pubSet = new TreeSet();\n for (String fieldname: fieldnameSet){\n if (fieldname.startsWith(\"P\")){ \n ipf.makeStopStemSet(ElsevierStopStems.PHYSICS);\n }\n if (fieldname.startsWith(\"B\")){ \n ipf.makeStopStemSet(ElsevierStopStems.BUSINESS);\n }\n for (ebrpPublication p: fullPubSet){\n if ((p.getYear()!=year) || (!p.fieldName.startsWith(fieldname))) continue;\n if (((pubNumber++)%sampleFrequency==0) ) pubSet.add(p);\n }\n System.out.println(\"--- Have \"+pubSet.size()+\" papers from year \"+year+\" and fieldname \"+fieldname);\n if ((infoLevel>-2) && (pubSet.size()<20)){\n int pn=0;\n for (ebrpPublication p: pubSet){\n System.out.println((pn++)+p.eid+\", \"+p.getTitle());\n }\n }\n for (Integer useWhat:useWhatSet){\n boolean useTitle=((useWhat&1)>0);\n boolean useKeywords=((useWhat&2)>0);\n System.out.println(\"--- \"+(useTitle?\"U\":\"Not u\")+\"sing titles\");\n System.out.println(\"--- \"+(useKeywords?\"U\":\"Not u\")+\"sing keywords\");\n for (Integer weightType:weightTypeSet){\n processOneYear(pubSet, rootFileName, outputDirectory, inputDirectory,\n year, fieldname, weightType, ipf,\n useTitle, useKeywords, extractGCC,\n minDegreeIn, minDegreeOut, minWeight,\n infoLevel);\n }\n }\n }// eo for fieldname\n }// eo for year\n\n }", "public void processAll() throws IOException {\n\t\tfor (Iterator i = imageList.iterator(); i.hasNext();) {\n\t\t\tEntry entry = (Entry) i.next();\n\n\t\t\tif (!entry.written) {\n\t\t\t\tentry.written = true;\n\n\t\t\t\tString[] encode;\n\t\t\t\tif (entry.writeAs.equals(ImageConstants.ZLIB)\n\t\t\t\t\t\t|| (entry.maskName != null)) {\n\t\t\t\t\tencode = new String[] { \"Flate\", \"ASCII85\" };\n\t\t\t\t} else if (entry.writeAs.equals(ImageConstants.JPG)) {\n\t\t\t\t\tencode = new String[] { \"DCT\", \"ASCII85\" };\n\t\t\t\t} else {\n\t\t\t\t\tencode = new String[] { null, \"ASCII85\" };\n\t\t\t\t}\n\n\t\t\t\tPDFStream img = pdf.openStream(entry.name);\n\t\t\t\timg.entry(\"Subtype\", pdf.name(\"Image\"));\n\t\t\t\tif (entry.maskName != null) {\n\t\t\t\t\timg.entry(\"SMask\", pdf.ref(entry.maskName));\n\t\t\t\t}\n\t\t\t\timg.image(entry.image, entry.bkg, encode);\n\t\t\t\tpdf.close(img);\n\n\t\t\t\tif (entry.maskName != null) {\n\t\t\t\t\tPDFStream mask = pdf.openStream(entry.maskName);\n\t\t\t\t\tmask.entry(\"Subtype\", pdf.name(\"Image\"));\n\t\t\t\t\tmask.imageMask(entry.image, encode);\n\t\t\t\t\tpdf.close(mask);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public Task processContent (String txtLine) throws MonicaException {\n String[] content = txtLine.split(\" \\\\| \");\n String taskType = content[0];\n int taskStatus = Integer.parseInt(content[1]);\n String taskDescription = content[2];\n DateTimeFormatter dateTimeFormat = DateTimeFormatter.ofPattern(\"HHmm, dd MMM yyyy\");\n\n switch(taskType) {\n case \"D\":\n String deadlineTime = content[3];\n return new Deadline(taskDescription, taskStatus,\n LocalDateTime.parse(deadlineTime, dateTimeFormat));\n case \"E\":\n String eventTime = content[3];\n return new Event(taskDescription, taskStatus,\n LocalDateTime.parse(eventTime, dateTimeFormat));\n case \"T\":\n return new Todo(taskDescription, taskStatus);\n default:\n throw new MonicaException(taskType + \" is an invalid text type.\");\n }\n }", "protected abstract GenericOutputBean convertSpecificOutputStructureToGenericOutputBean(T fileParsed);", "private void processCss() throws MalformedURLException, IOException {\r\n\r\n\t\tcssList = fullList.extractAllNodesThatMatch(new NodeClassFilter(\r\n\t\t\t\tTagNode.class), true);\r\n\t\tthePageCss = new HashMap<String, String>();\r\n\r\n\t\tfor (SimpleNodeIterator nodeIter = cssList.elements(); nodeIter\r\n\t\t\t\t.hasMoreNodes();) {\r\n\t\t\tTagNode tempNode = (TagNode) nodeIter.nextNode();\r\n\t\t\tString tagText = tempNode.getAttribute(\"type\");\r\n\r\n\t\t\tif ((tagText != null) && (tagText.contains(\"text/css\"))) {\r\n\r\n\t\t\t\tif (tempNode instanceof StyleTag) {\r\n\t\t\t\t\tprocessImportTypeCss(tempNode);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprocessLinkTypeCss(tempNode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected void generateEntries() {\n Iterator<Label> entryLabelsIterator = entryLabels.iterator();\n for (KtWhenEntry entry : expression.getEntries()) {\n v.visitLabel(entryLabelsIterator.next());\n\n FrameMap.Mark mark = codegen.myFrameMap.mark();\n codegen.gen(entry.getExpression(), resultType);\n mark.dropTo();\n\n if (!entry.isElse()) {\n v.goTo(endLabel);\n }\n }\n }", "ProcessOperation<Map<String, Object>> map();", "@Override\n\tpublic void process(Task task, Page page) {\n\t\t\n\t}", "public void processTreeTypes(@NonNull CompilationUnit ast) {\n\t\tVariableTypeMap variables = new VariableTypeMap();\n\t\tthis.variableMaps.clear();\n\n\t\tthis.variableMaps.push(variables);\n\t\tLabelPass labels = new LabelPass(variables);\n\t\tlabels.processLabels(ast);\n\n\t\tthis.processTypes(ast);\n\t}", "public synchronized void processAll()\r\n {\r\n if (!myItems.isEmpty())\r\n {\r\n myProcessor.accept(New.list(myItems));\r\n myItems.clear();\r\n }\r\n }", "void processInheritanceAssociations() {\n\t\tFamixAssociation foundInheritance;\n\t\tHashSet<String> foundInheritanceList;\n\t\tHashSet<String> alreadyIncludedInheritanceList;\n\t\tinheritanceAssociationsPerClass = new HashMap<String, HashSet<String>>();\n\t\ttry{\n\t\t\tIterator<FamixAssociation> iterator = theModel.waitingAssociations.iterator();\n\t for (Iterator<FamixAssociation> i=iterator ; i.hasNext();) {\n\t \tboolean inheritanceAssociation = false;\n\t \tboolean fromExists = false;\n \tboolean toExists = false;\n \tboolean toHasValue = false;\n\t \tFamixAssociation association = (FamixAssociation) i.next();\n\t\t String uniqueNameFrom = association.from;\n\n \t/* Test helper\n \tif (association.from.startsWith(\"Limaki.Actions.Command\")){\n \t\tboolean breakpoint = true;\n \t} */\n\n\t\t if (association instanceof FamixInheritanceDefinition){\n\t\t \tinheritanceAssociation = true;\n\t\t }\n \tif (inheritanceAssociation) {\n\t\t\t if (theModel.classes.containsKey(uniqueNameFrom)) {\n\t\t\t \tfromExists = true;\n\t\t\t }\n \t}\n \tif (inheritanceAssociation && fromExists) {\n\t\t\t if ((association.to != null) && (!association.to.equals(\"\"))) {\n\t\t\t \ttoHasValue = true;\n\t\t\t\t if (theModel.classes.containsKey(association.to) || theModel.classes.containsKey(\"xLibraries.\" + association.to)) {\n\t\t\t\t \ttoExists = true;\n\t\t\t\t }\n\t\t\t }\n \t}\n\t\t // If association.to is not a unique name of an existing type, try to replace it by the complete unique name.\n\t \t// Determine the type of association.to, first based on imports, and second based on package contents.\n\t \tif (inheritanceAssociation && fromExists && !toExists && toHasValue) {\n String to = findClassInImports(association.from, association.to);\n if (!to.equals(\"\")) {\n association.to = to;\n }\n else {\n\t \tString belongsToPackage = theModel.classes.get(association.from).belongsToPackage;\n\t to = findClassInPackage(association.to, belongsToPackage);\n\t if (!to.equals(\"\")) { // So, in case association.to shares the same package as association.from \n\t association.to = to;\n\t }\n }\n \t\t if (theModel.classes.containsKey(association.to) || theModel.classes.containsKey(\"xLibraries.\" + association.to)) {\n \t\t \ttoExists = true;\n \t\t }\n \t}\n\t \tif (inheritanceAssociation && fromExists && toExists && !theModel.associations.contains(association)) {\n\t\t \t// Add the inheritance association to the FamixModel, but only if to and from are equal. \n\t \tif (!association.from.equals(association.to)) { \n\t \t\taddToModel(association);\n\t \t}\n\n\t \t// Fill the HashMap inheritanceAccociationsPerClass with inheritance dependencies to super classes or interfaces \n\t \talreadyIncludedInheritanceList = null;\n\t \tfoundInheritance = null;\n\t \tfoundInheritanceList = null;\n\t \talreadyIncludedInheritanceList = null;\n\t \tfoundInheritance = association;\n\t \tif(inheritanceAssociationsPerClass.containsKey(uniqueNameFrom)){\n\t \t\talreadyIncludedInheritanceList = inheritanceAssociationsPerClass.get(uniqueNameFrom);\n\t \t\tif (!alreadyIncludedInheritanceList.contains(association.to)) {\n\t \t\t\talreadyIncludedInheritanceList.add(foundInheritance.to);\n\t \t\t}\n\t \t\tinheritanceAssociationsPerClass.put(uniqueNameFrom, alreadyIncludedInheritanceList);\n\t \t}\n\t \telse{\n\t\t \tfoundInheritanceList = new HashSet<String>();\n\t\t \tfoundInheritanceList.add(foundInheritance.to);\n\t\t \tinheritanceAssociationsPerClass.put(uniqueNameFrom, foundInheritanceList);\n\t \t}\n\t \t\n\t \t// Remove from waitingAssociations afterwards, to enhance the performance. \t\n\t\t\t i.remove();\n\t \t}\n\t }\n\t\t} catch(Exception e) {\n\t this.logger.debug(new Date().toString() + \"Exception may result in incomplete dependency list. Exception: \" + e);\n\t //e.printStackTrace();\n\t\t}\n\t\tindirectAssociations_DeriveIndirectInheritance();\n this.logger.info(new Date().toString() + \" Finished: processInheritanceAssociations()\");\n }", "@Test\r\n\tvoid mapLMethod() {\r\n\t\tMap<String, List<TransactionBean>> postsPerType = transactions.stream()\r\n .collect(Collectors.groupingBy(TransactionBean::getValue));\r\n\t\tSystem.out.println(ToStringBuilder.reflectionToString(postsPerType, new MultilineRecursiveToStringStyle()));\r\n\r\n\t}", "Results processFilter(FilterSpecifier filter) throws SearchServiceException;", "@Override\r\n public <T> void batchDetailCodeProcess(T TO, Map<String, Object> codeColumn) {\n try {\r\n CodeDetailTo codeDetailTO = new CodeDetailTo();\r\n Method method = TO.getClass().getMethod(\"getStatus\");\r\n codeDetailTO.setStatus((String) method.invoke(TO));\r\n for (String key : codeColumn.keySet()) {\r\n String colValue = (String) codeColumn.get(key);\r\n if (colValue != null) {\r\n switch (key) {\r\n case \"divisionCodeNo\":\r\n codeDetailTO.setDivisionCodeNo(colValue);\r\n break;\r\n case \"detailCode\":\r\n codeDetailTO.setDetailCode(colValue);\r\n break;\r\n case \"detailCodeName\":\r\n codeDetailTO.setDetailCodeName(colValue);\r\n break;\r\n }\r\n }\r\n }\r\n switch (codeDetailTO.getStatus()) {\r\n case \"inserted\":\r\n codeDetailDao.insertDetailCode(codeDetailTO);\r\n break;\r\n case \"deleted\":\r\n codeDetailDao.deleteDetailCode(codeDetailTO);\r\n break;\r\n case \"updated\":\r\n codeDetailDao.updateDetailCode(codeDetailTO);\r\n break;\r\n }\r\n } catch (Exception e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n\r\n }", "void visit(Entry entry);", "public void process() {\n\t}", "protected TypeMapper<?> normalizeSemantics() {\n\t\tEvent event = SpeedTracerLogger\n\t\t\t\t.start(CompilerEventType.JAVA_NORMALIZERS);\n\t\ttry {\n\t\t\tDevirtualizer.exec(jprogram);\n\t\t\tCatchBlockNormalizer.exec(jprogram);\n\t\t\tPostOptimizationCompoundAssignmentNormalizer.exec(jprogram);\n\t\t\tLongCastNormalizer.exec(jprogram);\n\t\t\tLongEmulationNormalizer.exec(jprogram);\n\t\t\tTypeCoercionNormalizer.exec(jprogram);\n\t\t\tif (options.isIncrementalCompileEnabled()) {\n\t\t\t\t// Per file compilation reuses type JS even as references (like\n\t\t\t\t// casts) in other files\n\t\t\t\t// change, which means all legal casts need to be allowed now\n\t\t\t\t// before they are actually\n\t\t\t\t// used later.\n\t\t\t\tComputeExhaustiveCastabilityInformation.exec(jprogram);\n\t\t\t} else {\n\t\t\t\t// If trivial casts are pruned then one can use smaller runtime\n\t\t\t\t// castmaps.\n\t\t\t\tComputeCastabilityInformation.exec(jprogram,\n\t\t\t\t\t\t!shouldOptimize() /* recordTrivialCasts */);\n\t\t\t}\n\t\t\tImplementCastsAndTypeChecks.exec(jprogram,\n\t\t\t\t\tshouldOptimize() /* pruneTrivialCasts */);\n\t\t\tImplementJsVarargs.exec(jprogram);\n\t\t\tArrayNormalizer.exec(jprogram);\n\t\t\tEqualityNormalizer.exec(jprogram);\n\t\t\tTypeMapper<?> typeMapper = getTypeMapper();\n\t\t\tResolveRuntimeTypeReferences.exec(jprogram, typeMapper,\n\t\t\t\t\tgetTypeOrder());\n\t\t\treturn typeMapper;\n\t\t} finally {\n\t\t\tevent.end();\n\t\t}\n\t}", "public Context runMap() throws InstantiationException, IllegalAccessException, IOException {\n\t\tContext tempoContext = new Context();\n\t\tthis.setup(tempoContext);\n\t\t//Read the input file\n\t\tString[] inputLines = this.inputSplit.getLines();\n\t\t//Map process\n\t\tfor (int i=0; i<inputLines.length; i++) {\n\t\t\tthis.map(Integer.toString(i), inputLines[i], tempoContext);\n\t\t}\n\t\treturn tempoContext;\n\t}", "public void process()\n\t{\n\t\tthis.layers = new ArrayList<Layer>();\n\t\t\n\t\t/**\n\t\t * list of layers to remove\n\t\t */\n\t\tthis.layersToRemove = new ArrayList<Layer>();\n\t\t\n\t\t/**\n\t\t * find all layers we need to process in the document\n\t\t */\n\t\tthis.allLayers();\n\t\t\n\t\t/**\n\t\t * we'll remove all layers which are unused in psd\n\t\t */\n\t\tthis.removeUnusedLayers();\n\t\t\n//\t\tthis.discoverMaximumLayerDepth();\n\t\t\n\t\t/*this.showLayersInformation(this.layers);\n\t\tSystem.exit(0)*/;\n\t}", "@Override\n\tpublic BaseOpenmrsData process(ClinicalStatement entry) throws DocumentImportException {\n\t\t\n\t\t// Validate\n\t\tif(this.m_configuration.getValidationEnabled())\n\t\t{\n\t\t\tValidationIssueCollection issues = this.validate(entry);\n\t\t\tif(issues.hasErrors())\n\t\t\t\tthrow new DocumentValidationException(entry, issues);\n\t\t}\n\t\telse if(!entry.isPOCD_MT000040UVProcedure())\n\t\t\tthrow new DocumentImportException(\"Expected entry to be Procedure\");\n\t\t\n\t\t// What is the mood code?\n\t\tProcedure procedure = (Procedure)entry;\n\t\t\n\t\t// Only store EVN or \" I DID PERFORM \" procedures, the other mood codes \n\t\t// if encountered should create more appropriate data like an ORDER for INT (i.e. I intend to perform a procedure)\n\t\tif(procedure.getMoodCode().getCode().equals(x_DocumentProcedureMood.Eventoccurrence))\n\t\t\treturn this.processEventOccurance(procedure);\n\t\telse if(procedure.getMoodCode().getCode().equals(x_DocumentProcedureMood.Intent))\n\t\t\treturn this.processIntent(procedure);\n\t\telse\n\t\t\tthrow new NotImplementedException(\"Only support procedures with moodCode = INT or EVN\");\n\t\t\n\t}", "public void filter()\n {\n Map<String,Headline> currHeadlineMap;\n try\n {\n // Run while the thread has not been interrupted \n while( !Thread.currentThread().isInterrupted() )\n {\n synchronized(this.monitor)\n {\n this.monitor.wait(); // Wait for a plugin to finish\n Headline retrievedHeadline;\n \n while(this.queue.size() > 0) // While there are things to take\n {\n retrievedHeadline = this.queue.take(); //Take from the blocking queue\n currHeadlineMap = this.retrieved.get(retrievedHeadline.getSource()); // Retrieve map associated with headline source\n // Instantiate a new map if one does not exist yet\n if ( currHeadlineMap == null)\n {\n currHeadlineMap = new HashMap<>();\n }\n // Add headline the map for that news plugin\n currHeadlineMap.put(retrievedHeadline.getHeadline(), retrievedHeadline); \n\n // Insert the map for a plugin into the larger map of all headlines\n this.retrieved.put(retrievedHeadline.getSource(), currHeadlineMap); \n }\n \n // Retrieve map associated with the plugin that has just finished\n // Leaving all other headlines from other sources in the retrieved map\n currHeadlineMap = this.retrieved.get(finished);\n \n // Retrieve updated list\n List<Headline> update = updatedList(currHeadlineMap);\n\n // Clear the headline map for a plugin\n currHeadlineMap = new HashMap<>();\n \n // If the user has not signalled cancel prior to the filter finishing its task\n synchronized( this.cancelledMonitor )\n {\n if( !cancelled )\n { \n // Send the updated headline list to the UI\n this.ui.finishedTasks(finished + \" is running\");\n this.ui.update(update);\n theLogger.info(\"Update sent. Plugin:\" + finished);\n }\n else \n {\n clear();\n theLogger.info(\"Update cancelled\");\n }\n }\n \n }\n theLogger.info(\"Filter complete. Plugin:\" + finished);\n }\n }\n catch(InterruptedException e)\n {\n System.out.println(\"Interrupted filtering\");\n \n this.queue.clear(); // Empty queue\n this.retrieved = new HashMap<>(); // Reset all running plugins\n }\n }", "public interface WrapperProcessor {\n\n\tabstract void processSingle(ElementWrapper wrapper);\n\n\tdefault void process(ElementWrapper wrapper) {\n\n\t\tprocessSingle(wrapper);\n\n\t\tif (wrapper instanceof ComplexElementWrapper) {\n\n\t\t\tif (!((ComplexElementWrapper) wrapper).getChildren().isEmpty()) {\n\n\t\t\t\tComplexElementWrapper elem = (ComplexElementWrapper) wrapper;\n\n\t\t\t\tfor (ElementWrapper child : elem.getChildren()) {\n\n\t\t\t\t\tprocess(child);\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t}\n\n}", "public void processClasses(CompilationUnit cu) {\n\t\t\n\t\tif(cu.getStorage().get().getFileName().equals(\"package-info.java\")) {\n\t\t\tthis.packageInfo = cu;\n\t\t}else {\n\t\t\tthis.cus.add(cu);\n\t\t}\n\t\tfor(TypeDeclaration<?> node : cu.findAll(TypeDeclaration.class)) {\n\t\t\tthis.classes.put(node.getNameAsString(), new ClassAST(node, this));\n\t\t}\n\t}", "private void processClass(String classType ) {\n\t\tif ( classType.equals(\"CommandLineTool\") ) {\n\t\t\t\tCOMMAND_LINE_TOOL = new CommandLineTool();\n\t\t}\n\t}", "private void apply() {\n\t\tArrayList<NPC> templates = new ArrayList<NPC>();\n\t\tfor (int i = 0; i < npcList.size(); i++) {\n\t\t\tDocument doc = ParserHelper.LoadXML(\"assets/data/npcs/\" + npcList.get(i) + \".xml\");\n\t\t\tElement root = doc.getDocumentElement();\n\t\t\tElement n = (Element) doc.getFirstChild();\n\t\t\tNPC template = new NPC(n, new Vec2f(0, 0), npcList.get(i));\n\t\t\ttemplates.add(template);\n\t\t}\n\n\t\tfor (int i = 0; i < blockGrid.length; i++) {\n\t\t\tfor (int j = 0; j < blockGrid[i].length; j++) {\n\t\t\t\tif (blockGrid[i][j] < 0 && blockGrid[i][j] > -100) {\n\t\t\t\t\tkeyBlocks.get((blockGrid[i][j] * -1) - 1).apply(i, j, zoneGrid, zone, widgetLoader, templates);\n\t\t\t\t}\n\t\t\t\tif (blockGrid[i][j] > 0 && blockGrid[i][j] < 100) {\n\t\t\t\t\tblockList.get(blockGrid[i][j] - 1).apply(i, j, zoneGrid, zone, widgetLoader, templates);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public synchronized final void process() throws FilterException {\n if (this.result == null)\n throw new FilterException(i18n.getString(\"outputNotSet\"));\n if (this.source == null)\n throw new FilterException(i18n.getString(\"inputNotSet\"));\n\n try {\n // Starts the input interpretation (transformation)\n this.transformer.transform(this.source, this.result);\n } catch (TransformerException e) {\n throw new FilterException(e);\n } finally {\n this.source = null;\n this.result = null;\n }\n }", "void processImports() {\n FamixImport foundImport;\n\t\tArrayList<FamixImport> foundImportsList;\n\t\tArrayList<FamixImport> alreadyIncludedImportsList;\n\t\timportsPerEntity = new HashMap<String, ArrayList<FamixImport>>();\n\t \n\t\ttry{\n\t for (FamixAssociation association : theModel.associations) {\n \tString uniqueNameFrom = association.from;\n\t \tfoundImport = null;\n\t if (association instanceof FamixImport) {\n\t \tfoundImport = (FamixImport) association;\n\t // Fill HashMap importsPerEntity \n\t \talreadyIncludedImportsList = null;\n\t \tif (importsPerEntity.containsKey(uniqueNameFrom)){\n\t \t\talreadyIncludedImportsList = importsPerEntity.get(uniqueNameFrom);\n\t \t\talreadyIncludedImportsList.add(foundImport);\n\t \t\timportsPerEntity.put(uniqueNameFrom, alreadyIncludedImportsList);\n\t \t}\n\t \telse{\n\t\t\t \tfoundImportsList = new ArrayList<FamixImport>();\n\t\t \tfoundImportsList.add(foundImport);\n\t\t \timportsPerEntity.put(uniqueNameFrom, foundImportsList);\n\t \t}\n\t }\n\t }\n\t\t} catch(Exception e) {\n\t this.logger.warn(new Date().toString() + \"Exception may result in incomplete dependency list. Exception: \" + e);\n\t //e.printStackTrace();\n\t\t}\n }", "private void processTilesetMap() {\r\n for (int t = 0; t < this.getTileSetCount(); t++) {\r\n TileSet tileSet = this.getTileSet(t);\r\n this.tilesetNameToIDMap.put(tileSet.name, t);\r\n }\r\n }", "public interface DomainHandler {\n\n public void processBioProject(BioProject project);\n\n public void processAdminBioProject(AdminBioProject project);\n\n public void processSubmissionBioProject(SubmissionBioProject project);\n\n /**\n * Called when last project has been parsed and passed on.\n */\n public void endParsing();\n\n}", "private static interface Processor<T> {\n\n\t\t/**\n\t\t * Called to process the annotation.\n\t\t * @param annotation the annotation to process\n\t\t * @param depth the depth of the annotation relative to the initial match. For\n\t\t * example a matched annotation will have a depth of 0, a meta-annotation 1\n\t\t * and a meta-meta-annotation 2\n\t\t * @return the result of the processing or {@code null} to continue\n\t\t */\n\t\tT process(Annotation annotation, int depth);\n\t}", "public void process(Context ctxt) {\n\tthis.ctxt = ctxt;\n\tIterator it = ctxt.getDefinedConsts().iterator();\n\twhile(it.hasNext()) {\n\t Const c = (Const)it.next();\n\n\t Expr T = ctxt.getClassifier(c);\n\n\t Expr e = ctxt.getDefBody(c);\n\n\t if (ctxt.isOpaque(c)) \n\t\tcontinue;\n\n\t process(e); // including types and terms\n\n\t resetRenaming();\n\t}\n\n\t// we will also uniquify variables in types\n\tit = ctxt.getTypeCtors().iterator();\n\twhile(it.hasNext()) {\n\t Const d = (Const)it.next();\n\n\t Iterator it2 = ctxt.getTermCtors(d).iterator();\n\t while (it2.hasNext()) {\n\t\tConst c = (Const)it2.next();\n\n\t\tExpr T = ctxt.getClassifier(c);\n\n\t\tprocess(T);\n\t\t\n\t\tresetRenaming();\n\t }\n\t}\n }", "public final void process(Void input)\n/* */ {\n/* 53 */ if (!this.processingThread.compareAndSet(null, Thread.currentThread())) {\n/* 54 */ String msg = \"Pipeline stage is already being processed by another thread\";\n/* 55 */ Thread otherThread = (Thread)this.processingThread.get();\n/* 56 */ if (otherThread != null) {\n/* 57 */ msg = msg + \" [\" + otherThread.getName() + \"]\";\n/* */ }\n/* 59 */ throw new ConcurrentModificationException(msg);\n/* */ }\n/* */ try\n/* */ {\n/* 63 */ while (!this.stop) {\n/* 64 */ I i = this.queue.take();\n/* */ try {\n/* 66 */ invokeNext(i);\n/* */ } catch (Exception e) {\n/* 68 */ onError(i, e);\n/* */ } catch (Throwable t) {\n/* 70 */ onUnrecoverableError(i, t);\n/* 71 */ throw t;\n/* */ }\n/* */ }\n/* */ } catch (InterruptedException e) {\n/* 75 */ Exceptions.rethrowAsRuntimeException(e);\n/* */ } catch (Exception e) {\n/* 77 */ Throwables.propagate(e);\n/* */ } finally {\n/* */ try {\n/* 80 */ this.stopWaitLatch.countDown();\n/* */ } finally {\n/* 82 */ this.processingThread.set(null);\n/* */ }\n/* */ }\n/* */ }", "private void processFolder(File folder) {\n \t\tFile[] subFolders = folder.listFiles(new FileFilter() {\n \t\t\t@Override\n \t\t\tpublic boolean accept(File pathname) {\n \t\t\t\treturn pathname.isDirectory();\n \t\t\t}\n \t\t});\n \t\tfor (File subFolder : subFolders){\n \t\t\tprocessFolder(subFolder); \n \t\t}\n \t\tPattern nameRegex = Pattern.compile(\"([\\\\d-]+)\\\\.(pdf|epub)\", Pattern.CANON_EQ | Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE);\n \t\tFile[] files = folder.listFiles();\n \t\tfor (File file : files) {\n \t\t\tlogger.info(\"Processing file \" + file.getName());\n \t\t\tprocessLog.addNote(\"Processing file \" + file.getName());\n \t\t\tif (file.isDirectory()) {\n \t\t\t\t//TODO: Determine how to deal with nested folders?\n \t\t\t\t//processFolder(file);\n \t\t\t} else {\n \t\t\t\t// File check to see if it is of a known type\n \t\t\t\tMatcher nameMatcher = nameRegex.matcher(file.getName());\n \t\t\t\tif (nameMatcher.matches()) {\n \t\t\t\t\tImportResult importResult = new ImportResult();\n \t\t\t\t\tString isbn = nameMatcher.group(1);\n \t\t\t\t\tString fileType = nameMatcher.group(2).toLowerCase();\n \t\t\t\t\timportResult.setBaseFilename(isbn);\n \t\t\t\t\tisbn = isbn.replaceAll(\"-\", \"\");\n \t\t\t\t\timportResult.setISBN(isbn);\n \t\t\t\t\timportResult.setCoverImported(\"\");\n \t\t\t\t\t\n \t\t\t\t\ttry {\n \t\t\t\t\t\t// Get the record for the isbn\n \t\t\t\t\t\tgetRelatedRecords.setString(1, \"%\" + isbn + \"%\");\n \t\t\t\t\t\tResultSet existingRecords = getRelatedRecords.executeQuery();\n \t\t\t\t\t\tif (!existingRecords.next()){\n \t\t\t\t\t\t\t//No record found \n \t\t\t\t\t\t\tlogger.info(\"Could not find record for ISBN \" + isbn);\n \t\t\t\t\t\t\timportResult.setStatus(fileType, \"failed\", \"Could not find record for ISBN \" + isbn);\n \t\t\t\t\t\t\tprocessLog.incErrors();\n \t\t\t\t\t\t\tprocessLog.addNote(\"Could not find record for ISBN \" + isbn);\n \t\t\t\t\t\t}else{\n \t\t\t\t\t\t\tlogger.info(\"Found at least one record for \" + isbn);\n \t\t\t\t\t\t\tif (existingRecords.last()){\n \t\t\t\t\t\t\t\tif (existingRecords.getRow() >= 2){\n \t\t\t\t\t\t\t\t\tlogger.info(\"Multiple records were found for ISBN \" + isbn);\n \t\t\t\t\t\t\t\t\timportResult.setStatus(fileType, \"failed\", \"Multiple records were found for ISBN \" + isbn);\n \t\t\t\t\t\t\t\t\tprocessLog.incErrors();\n \t\t\t\t\t\t\t\t\tprocessLog.addNote(\"Multiple records were found for ISBN \" + isbn);\n \t\t\t\t\t\t\t\t}else{\n \t\t\t\t\t\t\t\t\t//We have an existing record\n \t\t\t\t\t\t\t\t\texistingRecords.first();\n \t\t\t\t\t\t\t\t\tString recordId = existingRecords.getString(\"id\");\n \t\t\t\t\t\t\t\t\tString accessType = existingRecords.getString(\"accessType\");\n \t\t\t\t\t\t\t\t\tString source = existingRecords.getString(\"source\");\n \t\t\t\t\t\t\t\t\tlogger.info(\" Attaching file to \" + recordId + \" accessType = \" + accessType + \" source=\" + source);\n \t\t\t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\t\t// Copy the file to the library if it does not exist already\n \t\t\t\t\t\t\t\t\tFile resultsFile = new File(libraryDirectory + source + \"_\" + file.getName());\n \t\t\t\t\t\t\t\t\tif (resultsFile.exists()) {\n \t\t\t\t\t\t\t\t\t\tlogger.info(\"Skipping file because it already exists in the library\");\n \t\t\t\t\t\t\t\t\t\timportResult.setStatus(fileType, \"skipped\" ,\"File has already been copied to library\");\n \t\t\t\t\t\t\t\t\t\tprocessLog.addNote(\"Skipping file \" + file.getName() + \" because it already exists in the library\");\n \t\t\t\t\t\t\t\t\t} else {\n \t\t\t\t\t\t\t\t\t\tlogger.info(\"Importing file \" + file.getName());\n \t\t\t\t\t\t\t\t\t\t//Check to see if the file has already been added to the library.\n \t\t\t\t\t\t\t\t\t\tdoesItemExist.setString(1, file.getName());\n \t\t\t\t\t\t\t\t\t\tdoesItemExist.setString(2, recordId);\n \t\t\t\t\t\t\t\t\t\tResultSet existingItems = doesItemExist.executeQuery();\n \t\t\t\t\t\t\t\t\t\tif (existingItems.next()){\n \t\t\t\t\t\t\t\t\t\t\t//The item already exists\n \t\t\t\t\t\t\t\t\t\t\tlogger.info(\" the file has already been attached to this record\");\n \t\t\t\t\t\t\t\t\t\t\timportResult.setStatus(fileType, \"skipped\" ,\"The file has already been aded as an eContent Item\");\n \t\t\t\t\t\t\t\t\t\t\tprocessLog.addNote(\"Skipping file \" + file.getName() + \" because has already been attached to this record\");\n \t\t\t\t\t\t\t\t\t\t}else{\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\tlogger.info(\" copying the file to library source=\" + file + \" dest=\" + resultsFile);\n \t\t\t\t\t\t\t\t\t\t\t\t//Copy the pdf file to the library\n \t\t\t\t\t\t\t\t\t\t\t\tUtil.copyFile(file, resultsFile);\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\t//Add file to acs server\n \t\t\t\t\t\t\t\t\t\t\t\tboolean addedToAcs = true;\n \t\t\t\t\t\t\t\t\t\t\t\tif (accessType.equals(\"acs\")){\n \t\t\t\t\t\t\t\t\t\t\t\t\tlogger.info(\"Adding file to the ACS server\");\n \t\t\t\t\t\t\t\t\t\t\t\t\taddedToAcs = addFileToAcsServer(fileType, resultsFile, importResult);\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\t\n \t\t\t\t\t\t\t\t\t\t\t\tif (addedToAcs){\n \t\t\t\t\t\t\t\t\t\t\t\t\t//filename, acsId, recordId, item_type, addedBy, date_added, date_updated\n \t\t\t\t\t\t\t\t\t\t\t\t\tlong curTimeSec = new Date().getTime() / 1000;\n \t\t\t\t\t\t\t\t\t\t\t\t\taddEContentItem.setString(1, resultsFile.getName());\n \t\t\t\t\t\t\t\t\t\t\t\t\taddEContentItem.setString(2, importResult.getAcsId());\n \t\t\t\t\t\t\t\t\t\t\t\t\taddEContentItem.setString(3, recordId);\n \t\t\t\t\t\t\t\t\t\t\t\t\taddEContentItem.setString(4, fileType);\n \t\t\t\t\t\t\t\t\t\t\t\t\taddEContentItem.setLong(5, -1);\n \t\t\t\t\t\t\t\t\t\t\t\t\taddEContentItem.setLong(6, curTimeSec);\n \t\t\t\t\t\t\t\t\t\t\t\t\taddEContentItem.setLong(7, curTimeSec);\n \t\t\t\t\t\t\t\t\t\t\t\t\tint rowsInserted = addEContentItem.executeUpdate();\n \t\t\t\t\t\t\t\t\t\t\t\t\tif (rowsInserted == 1){\n \t\t\t\t\t\t\t\t\t\t\t\t\t\timportResult.setStatus(fileType, \"success\", \"\");\n \t\t\t\t\t\t\t\t\t\t\t\t\t\tlogger.info(\" added to the database\");\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\t\t\t\t\t\t}else{\n \t\t\t\t\t\t\t\t\t\t\t\t\t\tlogger.info(\" file could not be added to the database\");\n \t\t\t\t\t\t\t\t\t\t\t\t\t\tprocessLog.addNote(file.getName() + \" could not be added to the database\");\n \t\t\t\t\t\t\t\t\t\t\t\t\t\tprocessLog.incErrors();\n \t\t\t\t\t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t\t\t\t\t}else{\n \t\t\t\t\t\t\t\t\t\t\t\t\tlogger.info(\" the file could not be added to the acs server\");\n \t\t\t\t\t\t\t\t\t\t\t\t\tprocessLog.addNote(file.getName() + \" could not be added to the acs server\");\n \t\t\t\t\t\t\t\t\t\t\t\t\tprocessLog.incErrors();\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\t\n \t\t\t\t\t\t\t\t\t\t\t\tif (importResult.getSatus(fileType).equals(\"failed\")){\n \t\t\t\t\t\t\t\t\t\t\t\t\t//If we weren't able to add the file correctly, remove it so it will be processed next time. \n \t\t\t\t\t\t\t\t\t\t\t\t\tresultsFile.delete();\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\t\n \t\t\t\t\t\t\t\t\t\t\t} catch (IOException e) {\n \t\t\t\t\t\t\t\t\t\t\t\tlogger.error(\"Error copying file to record\", e);\n \t\t\t\t\t\t\t\t\t\t\t\timportResult.setStatus(fileType, \"failed\", \"Error copying file \" + e.toString());\n \t\t\t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t\t}\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} catch (SQLException e) {\n \t\t\t\t\t\tlogger.error(\"Error finding related records\", e);\n \t\t\t\t\t\timportResult.setStatus(\"pdf\", \"failed\", \"SQL error processing file \" + e.toString());\n \t\t\t\t\t}\n \t\t\t\t\timportResults.add(importResult);\n \t\t\t\t\t//Update that another file has been processed.\n \t\t\t\t\tprocessLog.incUpdated();\n \t\t\t\t\ttry {\n \t\t\t\t\t\tupdateRecordsProcessed.setLong(1, processLog.getNumUpdates());\n \t\t\t\t\t\tupdateRecordsProcessed.setLong(2, processLog.getNumErrors());\n \t\t\t\t\t\tupdateRecordsProcessed.setLong(3, logEntryId);\n \t\t\t\t\t\tupdateRecordsProcessed.executeUpdate();\n \t\t\t\t\t} catch (SQLException e) {\n \t\t\t\t\t\tlogger.error(\"Error updating number of records processed.\", e);\n \t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tprocessLog.addNote(\" Skipping because the name is not an ISBN\");\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\t\n \t}", "public void process(byte[] inputClass) throws IOException {\n\t\tClassNode classNode = BytecodeUtils.getClassNode(inputClass);\n\t\t// TODO: address innerclasses, classNode.innerClasses, could these even be found from class files? they would be different files...\n\t\tif(classNode.invisibleAnnotations != null){\n\t\t\tfor(Object annotationObject : classNode.invisibleAnnotations){\n\t\t\t\tAnnotationNode annotationNode = (AnnotationNode) annotationObject;\n\t\t\t\tJREFAnnotationIdentifier checker = new JREFAnnotationIdentifier();\n\t\t\t\tchecker.visitAnnotation(annotationNode.desc, false);\n\t\t\t\tif(checker.isJREFAnnotation()){\n\t\t\t\t\tString qualifiedClassName = classNode.name + \".class\";\n\t\t\t\t\tif(checker.isDefineTypeAnnotation()){\n\t\t\t\t\t\tif(runtimeModifications.getJarEntrySet().contains(qualifiedClassName)){\n\t\t\t\t\t\t\truntimeModifications.add(qualifiedClassName, inputClass, true);\n//\t\t\t\t\t\t\tLog.info(\"Replaced: \" + qualifiedClassName + \" in \" + runtimeModifications.getJarFile().getName());\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\truntimeModifications.add(qualifiedClassName, inputClass, false);\n//\t\t\t\t\t\t\tLog.info(\"Inserted: \" + qualifiedClassName + \" into \" + runtimeModifications.getJarFile().getName());\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if(checker.isMergeTypeAnnotation()){\n\t\t\t\t\t\tString qualifiedParentClassName = classNode.superName + \".class\";\n\t\t\t\t\t\tbyte[] baseClass = runtimeModifications.extractEntry(qualifiedParentClassName);\n\t\t\t\t\t\tbyte[] mergedClass = mergeClasses(baseClass, inputClass);\n\t\t\t\t\t\truntimeModifications.add(qualifiedParentClassName, mergedClass, true);\n\t\t\t\t\t\t// TODO: clean up outputClass somehow, probably need to make a local temp\n\t\t\t\t\t\t// directory which gets deleted at the end of the build\n//\t\t\t\t\t\tLog.info(\"Merged: \" + qualifiedClassName + \" into \" + qualifiedParentClassName + \" in \" + runtimeModifications.getJarFile().getName());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void handleStepChange()\n {\n boolean processorsChanged = false;\n myProcessorsLock.writeLock().lock();\n try\n {\n final Iterator<Entry<ProcessorDistributionKey, GeometryProcessor<? extends Geometry>>> procIter = myGeometryProcessorsMap\n .entrySet().iterator();\n final ActiveTimeSpans activeTimeSpans = myActiveTimeSpans;\n while (procIter.hasNext())\n {\n final Entry<ProcessorDistributionKey, GeometryProcessor<? extends Geometry>> entry = procIter.next();\n if (!inProcessRange(entry.getKey(), activeTimeSpans))\n {\n processorsChanged = true;\n procIter.remove();\n myInactiveGeometries.put(entry.getKey(), New.set(entry.getValue().getGeometries()));\n entry.getValue().close();\n }\n }\n\n final Iterator<Entry<ProcessorDistributionKey, Set<Geometry>>> inactiveIter = myInactiveGeometries.entrySet()\n .iterator();\n while (inactiveIter.hasNext())\n {\n final Entry<ProcessorDistributionKey, Set<Geometry>> entry = inactiveIter.next();\n if (inProcessRange(entry.getKey(), activeTimeSpans) && !entry.getValue().isEmpty())\n {\n processorsChanged = true;\n inactiveIter.remove();\n setProcessorConstraints(entry.getKey());\n final GeometryProcessor<? extends Geometry> processor = myProcessorBuilder\n .createProcessorForClass(entry.getKey().getGeometryType());\n processor.receiveObjects(this, entry.getValue(), Collections.<Geometry>emptyList());\n myGeometryProcessorsMap.put(entry.getKey(), processor);\n }\n }\n }\n finally\n {\n myProcessorsLock.writeLock().unlock();\n }\n\n if (processorsChanged)\n {\n populateRenderableProcessors();\n }\n }" ]
[ "0.52894914", "0.5238042", "0.5172724", "0.5169294", "0.5161562", "0.50625086", "0.50555396", "0.5043337", "0.50272804", "0.49711397", "0.49605176", "0.490895", "0.490895", "0.490895", "0.490895", "0.4891323", "0.4834943", "0.4821104", "0.48173186", "0.48063478", "0.48045024", "0.4770025", "0.47616044", "0.47062877", "0.47058913", "0.4704005", "0.47033378", "0.46913362", "0.46841553", "0.46582913", "0.46542743", "0.46523222", "0.4645306", "0.4628408", "0.46185058", "0.46137893", "0.46116576", "0.4607204", "0.45964196", "0.45744804", "0.45613292", "0.45608088", "0.4541536", "0.45177796", "0.45150355", "0.44969824", "0.44966412", "0.44899678", "0.44852927", "0.44780695", "0.44761682", "0.4465427", "0.44642544", "0.44616914", "0.4460144", "0.44555774", "0.44536665", "0.44285494", "0.442703", "0.4426263", "0.44202664", "0.44033402", "0.44026116", "0.4396065", "0.43907776", "0.43883073", "0.43822062", "0.43785474", "0.4377739", "0.43775135", "0.437446", "0.43695456", "0.43665057", "0.43537268", "0.4353598", "0.43532768", "0.43475348", "0.43408048", "0.43401355", "0.43400237", "0.43371993", "0.43356597", "0.43343136", "0.4332277", "0.43309784", "0.4330012", "0.43288684", "0.43268582", "0.43201956", "0.42989296", "0.4297903", "0.4291906", "0.42903143", "0.4287273", "0.4287048", "0.42844805", "0.42832538", "0.42828548", "0.4277212", "0.42706817" ]
0.5811673
0
Constructs an instance of CpFldMemo
public CpFldMemo() { super(10010, 5); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static synchronized CpFldMemo getInst() { \n\t\tif( me == null ) me = new CpFldMemo();\n\t\treturn me;\n\t}", "public DiaryMemo() {\n\t\tmId = -1;\n\t}", "@ModelAttribute(\"dto\")\n\tpublic MemoDTO newMemoDTO() {\n\t\treturn new MemoDTO();\n\t}", "@ModelAttribute(\"memoDTO\")\n\tpublic MemoDTO newMDTO() {\n\t\treturn new MemoDTO();\n\t}", "java.lang.String getMemo();", "java.lang.String getMemo();", "java.lang.String getMemo();", "public FieldInfo() {\r\n \t// No implementation required\r\n }", "private FieldInfo() {\r\n\t}", "protected void createSmartField() {\n\t\tthis.smartField = new SmartField();\n\t}", "public Field() {\r\n\t}", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "public static PasswordField createPasswordField() {\t\t\n\t\tPasswordField password = new PasswordField();\n\t\tpassword.setPrefWidth(200);\n\t\tpassword.setPrefHeight(30);\n\t\treturn password;\n\t}", "private static void loadMemo() {\n\t\t\n\t}", "public Builder setMemoBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setMemoBytes(value);\n return this;\n }", "public Builder setMemoBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setMemoBytes(value);\n return this;\n }", "public Builder setMemoBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setMemoBytes(value);\n return this;\n }", "private static void showMemoList() {\n\t\t\n\t}", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n\t\treturn memo;\n\t}", "public String getMemo() {\n\t\treturn memo;\n\t}", "public String getMemo() {\n\t\treturn memo;\n\t}", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "public Field(String watermark,\n String showfieldname,\n String saveRequired,\n String jfunction,\n String onChange,\n String onKeyDown,\n String defaultValue,\n String type,\n String sqlValue,\n String field_name,\n String relation,\n String states,\n String relationField,\n String onClickVList,\n String jIdList,\n String name,\n String searchRequired,\n String id,\n String placeholder,\n String value,\n String fieldType,\n String onclicksummary,\n String newRecord,\n List<Field> dListArray,\n List<OptionModel> mOptionsArrayList,\n String onclickrightbutton,\n String webSaveRequired,\n String field_type) {\n\n this.watermark = watermark;\n this.showfieldname = showfieldname;\n this.saveRequired = saveRequired;\n this.jfunction = jfunction;\n this.onChange = onChange;\n this.onKeyDown = onKeyDown;\n this.defaultValue = defaultValue;\n this.type = type;\n this.sqlValue = sqlValue;\n this.field_name = field_name;\n this.relation = relation;\n this.states = states;\n this.relationField = relationField;\n this.onClickVList = onClickVList;\n this.jIdList = jIdList;\n this.name = name;\n this.searchRequired = searchRequired;\n this.id = id;\n this.placeholder = placeholder;\n this.value = value;\n this.fieldType = fieldType;\n this.onclicksummary = onclicksummary;\n this.newRecord = newRecord;\n this.dListArray = dListArray;\n this.optionsArrayList = mOptionsArrayList;\n this.onclickrightbutton = onclickrightbutton;\n this.webSaveRequired = webSaveRequired;\n this.field_type = field_type;\n\n// this( watermark, showfieldname, saveRequired, jfunction,\n// onChange, onKeyDown, defaultValue, type, sqlValue,\n// field_name, relation, states, relationField,\n// onClickVList, jIdList, name, \"\",\n// searchRequired, id, placeholder, value,\n// fieldType, onclicksummary, newRecord, \"\",\n// dListArray,mOptionsArrayList,onclickrightbutton);\n }", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public FieldMetaData(MetaData parent, AbstractMemberMetaData fmd)\r\n {\r\n super(parent, fmd);\r\n }", "public static DiaryMemo fromCursor(Cursor cursor) {\n\t\tfinal DiaryMemo note = new DiaryMemo();\n\n\t\tif (cursor.getCount() > 0) {\n\t\t\tif (cursor.moveToFirst()) {\n\t\t\t\tnote.mId = cursor.getLong(cursor.getColumnIndexOrThrow(_ID));\n\t\t\t\tnote.mTitle = cursor.getString(cursor.getColumnIndexOrThrow(TITLE));\n\t\t\t\tnote.mBody = cursor.getString(cursor.getColumnIndexOrThrow(BODY));\n\t\t\t\tnote.mWidgetId = cursor.getString(cursor.getColumnIndexOrThrow(WIDGET_ID));\n\t\t\t\tnote.mCreated = cursor.getString(cursor.getColumnIndexOrThrow(CREATED));\n\n\t\t\t}\n\t\t}\n\n\t\treturn note;\n\t}", "private final Field makeField(String data) {\n Field result = null;\n\n if (termVector == null) {\n result = new Field(label, data, store, index);\n }\n else {\n result = new Field(label, data, store, index, termVector);\n }\n\n return result;\n }", "public static TextField createTextField() {\t\t\n\t\tTextField text = new TextField();\n\t\ttext.setPrefWidth(200);\n\t\ttext.setPrefHeight(30);\n\t\treturn text;\n\t}", "private JTextField initializeMessageField() {\r\n\t\t// create the message field.\r\n\t\tmessageField = new JTextField();\r\n\t\treturn messageField;\r\n\t}", "public java.lang.String getMemo () {\r\n\t\treturn memo;\r\n\t}", "public FormFieldsReport() {}", "public JMCF() {\n initComponents();\n }", "private void clearMemo() {\n bitField0_ = (bitField0_ & ~0x00000002);\n memo_ = getDefaultInstance().getMemo();\n }", "private void clearMemo() {\n bitField0_ = (bitField0_ & ~0x00000002);\n memo_ = getDefaultInstance().getMemo();\n }", "private JTextField getCenterDescTextField() {\r\n if (this.centerDescTextArea == null) {\r\n this.centerDescTextArea = new JTextField();\r\n this.centerDescTextArea.setColumns(10);\r\n }\r\n return this.centerDescTextArea;\r\n }", "private void clearMemo() {\n bitField0_ = (bitField0_ & ~0x00000008);\n memo_ = getDefaultInstance().getMemo();\n }", "public java.lang.String getMemo() {\r\n return memo;\r\n }", "protected FormulaRecord(int c, int r, FormulaRecord fr)\r\n/* 46: */ {\r\n/* 47:110 */ super(Type.FORMULA, c, r, fr);\r\n/* 48:111 */ this.copiedFrom = fr;\r\n/* 49:112 */ this.formulaBytes = new byte[fr.formulaBytes.length];\r\n/* 50:113 */ System.arraycopy(fr.formulaBytes, 0, this.formulaBytes, 0, this.formulaBytes.length);\r\n/* 51: */ }", "public RTextField() {\r\n }", "public static JTextField createTextField() {\n return createTextField(20);\n }", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000002;\n memo_ = value;\n }", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000002;\n memo_ = value;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return instance.getMemoBytes();\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return instance.getMemoBytes();\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return instance.getMemoBytes();\n }", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000008;\n memo_ = value;\n }", "private javax.swing.JTextField getMontoAbonadosTF() {\n\t\tif(montoAbonadosTF == null) {\n\t\t\tmontoAbonadosTF = new javax.swing.JTextField();\n\t\t\tmontoAbonadosTF.setPreferredSize(new java.awt.Dimension(130,20));\n\t\t\tmontoAbonadosTF.setEditable(false);\n\t\t\tmontoAbonadosTF.setBackground(new java.awt.Color(242,242,238));\n\t\t\tmontoAbonadosTF.setBorder(javax.swing.BorderFactory.createEmptyBorder(0,0,0,0));\n\t\t\tmontoAbonadosTF.setFont(new java.awt.Font(\"Dialog\", java.awt.Font.BOLD, 12));\n\t\t\tmontoAbonadosTF.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\n\t\t\tmontoAbonadosTF.setFocusable(false);\n\t\t}\n\t\treturn montoAbonadosTF;\n\t}", "private void createMineField() {\r\n mineField = new MineField( this );\r\n mineField.setFieldLength( FIELD_SIZE_MD );\r\n mineField.setSquareLength( SQUARE_SIZE_MD );\r\n\r\n // set up JLayeredPane\r\n pane = new JLayeredPane();\r\n pane.add( mineField, JLayeredPane.DEFAULT_LAYER );\r\n getContentPane().add( pane, \"Center\" );\r\n }", "@SuppressWarnings(\"unused\")\n\tprivate javax.swing.JTextField montoAbonadosTF() {\n\t\tif(montoAbonadosTF == null) {\n\t\t\tmontoAbonadosTF = new javax.swing.JTextField();\n\t\t\tmontoAbonadosTF.setPreferredSize(new java.awt.Dimension(105,20));\n\t\t\tmontoAbonadosTF.setEditable(false);\n\t\t\tmontoAbonadosTF.setBackground(new java.awt.Color(242,242,238));\n\t\t\tmontoAbonadosTF.setBorder(javax.swing.BorderFactory.createEmptyBorder(0,0,0,0));\n\t\t\tmontoAbonadosTF.setFont(new java.awt.Font(\"Dialog\", java.awt.Font.BOLD, 12));\n\t\t\tmontoAbonadosTF.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\n\t\t\tmontoAbonadosTF.setFocusable(false);\n\n\t\t}\n\t\treturn montoAbonadosTF;\n\t}", "public FieldScrapper() \r\n {\r\n }", "private JTextField getJTextField212() {\r\n\t\tif (jTextField212 == null) {\r\n\t\t\tjTextField212 = new JTextField();\r\n\t\t\tjTextField212.setBounds(new Rectangle(35, 347, 181, 20));\r\n\t\t\tjTextField212.setText(\"\");\r\n\t\t}\r\n\t\treturn jTextField212;\r\n\t}", "public static Field getInstance() {\n if (_instance == null) {\n _instance = new Field();\n }\n\n return _instance;\n }", "private void buildFields() {\r\n buildField(txtPizzaName, GUIResource.getLabel(DIALOG, NAME_PIZZA), 0);\r\n buildField(txtCustomerName, GUIResource.getLabel(DIALOG, NAME_CUSTOMER), 1);\r\n buildField(txtPhone, GUIResource.getLabel(DIALOG, PHONE), 2);\r\n buildField(txtEmail, GUIResource.getLabel(DIALOG, EMAIL), 3);\r\n }", "public FieldList()\n\t{\n\t\tfields = new ArrayList<AbstractField>();\n\t}", "public Component buildDetailForm(BEAN bean) \n\t\t\tthrows InstantiationException, IllegalAccessException {\n\t\treturn new DetailForm<BEAN, KEY>(this, bean);\n\t}", "public BaseField setupField(int iFieldSeq)\n {\n BaseField field = null;\n //if (iFieldSeq == 0)\n // field = new TicketScreenRecord_ReportDate(this, REPORT_DATE, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 1)\n // field = new TicketScreenRecord_ReportTime(this, REPORT_TIME, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 2)\n // field = new TicketScreenRecord_ReportUserID(this, REPORT_USER_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 3)\n // field = new ShortField(this, REPORT_PAGE, Constants.DEFAULT_FIELD_LENGTH, null, new Short((short)1));\n //if (iFieldSeq == 4)\n // field = new IntegerField(this, REPORT_COUNT, Constants.DEFAULT_FIELD_LENGTH, null, new Integer(0));\n //if (iFieldSeq == 5)\n // field = new CurrencyField(this, REPORT_TOTAL, Constants.DEFAULT_FIELD_LENGTH, null, new Double(0));\n //if (iFieldSeq == 6)\n // field = new IntegerField(this, REPORT_KEY_AREA, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 7)\n field = new ShortField(this, COUNT, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 8)\n field = new CurrencyField(this, TOTAL, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 9)\n field = new TicketReportOrderField(this, REPORT_ORDER, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 10)\n field = new DateField(this, START_DEPARTURE, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 11)\n field = new DateField(this, END_DEPARTURE, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 12)\n field = new DateField(this, START_ISSUE, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 13)\n field = new DateField(this, END_ISSUE, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 14)\n field = new BooleanField(this, INCLUDE_VOID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 15)\n field = new AirlineField(this, AIRLINE_1ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 16)\n field = new AirlineField(this, AIRLINE_2ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 17)\n field = new AirlineField(this, AIRLINE_3ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 18)\n field = new AirlineField(this, AIRLINE_4ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 19)\n field = new StringField(this, START_TICKET, 20, null, null);\n if (iFieldSeq == 20)\n field = new StringField(this, END_TICKET, 20, null, null);\n if (field == null)\n field = super.setupField(iFieldSeq);\n return field;\n }", "private JTextField getJTextField221() {\r\n\t\tif (jTextField221 == null) {\r\n\t\t\tjTextField221 = new JTextField();\r\n\t\t\tjTextField221.setBounds(new Rectangle(186, 8, 33, 20));\r\n\t\t\tjTextField221.setText(\"10\");\r\n\t\t}\r\n\t\treturn jTextField221;\r\n\t}", "public Field() {\n\t\t\n\t\t//--- View:\n\t\t// > first line: a horizontal box containing open and closed content.\n\t\t\n\t\t// style\n\t\tgetStyleClass().add(\"field\");\n\t\tnameText.getStyleClass().add(\"field-name\");\n\t\tcontentClosed.getStyleClass().add(\"field-contentClosed-box\");\n\t\tcontentOpen.getStyleClass().add(\"field-contentOpen-box\");\n\t\tsubfieldHolder.getStyleClass().add(\"field-subfieldHolder\");\n\t\t\n\t\t// link the first line & the rest\n\t contentClosed.getChildren().add(valueLabel);\n\t\tfirstLine.getChildren().addAll(nameText, contentClosed, contentOpen);\n\t\tupdateGrid();\n\n\t\t// open true by default\n\t\tcontentClosed.setVisible(false);\n\t contentClosed.setManaged(false);\n\t \n\t\t//--- Control:\n\t\t// close on click if openable (without triangle buttons is always open)\n\t setOnMouseClicked(e -> { \n\t \tif (closable)\n\t\t \tthis.setOpen(!open()); \n\t \te.consume();\n\t });\n\t}", "public Field(){\n\n // this(\"\",\"\",\"\",\"\",\"\");\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "public CommAreaRecord() {\n\t}", "public FieldObject() {\n super(\"fields/\");\n setEnterable(true);\n }", "FieldRefType createFieldRefType();", "public FrmInCadLocal() {\n initComponents();\n }", "public static TreeNode makeField(Field field) {\n return new FieldNode(field);\n }", "public MemoryEntryInfo createMemoryEntryInfo() {\n\t\tMemoryEntryInfo info = new MemoryEntryInfo(new HashMap<String, Object>(this.info.getProperties()));\n\t\tinfo.getProperties().put(MemoryEntryInfo.FILE_MD5, md5);\n\t\tinfo.getProperties().put(MemoryEntryInfo.FILENAME, fileName);\n\t\tinfo.getProperties().put(MemoryEntryInfo.OFFSET, fileoffs);\n\t\treturn info;\n\t}", "private JTextField getTxtIdC() {\n\t\tif (txtIdC == null) {\n\t\t\ttxtIdC = new JTextField();\n\t\t\ttxtIdC.setBounds(new Rectangle(140, 10, 125, 16));\n\t\t}\n\t\treturn txtIdC;\n\t}", "@Override\n public Field<?> createField(Container container, Object itemId,\n Object propertyId, Component uiContext) {\n Field<?> field = super.createField(container, itemId,\n propertyId, uiContext);\n\n // ...and just set them as immediate\n ((AbstractField<?>) field).setImmediate(true);\n\n // Also modify the width of TextFields\n if (field instanceof TextField)\n field.setWidth(\"100%\");\n field.setRequired(true);\n ((TextField) field).setInputPrompt(\"Введите назначение\");\n field.addStyleName(ValoTheme.LAYOUT_HORIZONTAL_WRAPPING);\n field.focus();\n\n return field;\n }", "public FormulaRecord(int c, int r, String f)\r\n/* 32: */ {\r\n/* 33: 84 */ super(Type.FORMULA2, c, r);\r\n/* 34: 85 */ this.formulaToParse = f;\r\n/* 35: 86 */ this.copiedFrom = null;\r\n/* 36: */ }", "private com.google.protobuf.SingleFieldBuilder<\n io.lightcone.data.types.Amount, io.lightcone.data.types.Amount.Builder, io.lightcone.data.types.AmountOrBuilder> \n getAmountFFieldBuilder() {\n if (amountFBuilder_ == null) {\n amountFBuilder_ = new com.google.protobuf.SingleFieldBuilder<\n io.lightcone.data.types.Amount, io.lightcone.data.types.Amount.Builder, io.lightcone.data.types.AmountOrBuilder>(\n getAmountF(),\n getParentForChildren(),\n isClean());\n amountF_ = null;\n }\n return amountFBuilder_;\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000008;\n }", "public MetadataPanel()\n {\n fieldMap = new HashMap<String, Component>();\n initialiseUI();\n }", "com.google.protobuf.ByteString\n getMemoBytes();", "com.google.protobuf.ByteString\n getMemoBytes();", "com.google.protobuf.ByteString\n getMemoBytes();", "public static DBMaker openMemory(){\n return new DBMaker();\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000002;\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000002;\n }", "public FrmBillDisplay() {\n initComponents();\n }", "public Builder clearMemo() {\n copyOnWrite();\n instance.clearMemo();\n return this;\n }", "public Builder clearMemo() {\n copyOnWrite();\n instance.clearMemo();\n return this;\n }", "public Builder clearMemo() {\n copyOnWrite();\n instance.clearMemo();\n return this;\n }", "public Field newField(Catalog catalog)\r\n {\r\n Field newObj = (Field)SAP_Field.newObj((com.informatica.adapter.sdkadapter.patternblocks.catalog.semantic.auto.SAP_Catalog)catalog);\r\n SEMTableFieldExtensions newExtnObj = newSEMTableFieldExtensions(catalog);\r\n newObj.setExtensions(newExtnObj);\r\n return newObj;\r\n }", "protected FormulaRecord(int c, int r, ReadFormulaRecord rfr)\r\n/* 54: */ {\r\n/* 55:125 */ super(Type.FORMULA, c, r, rfr);\r\n/* 56: */ try\r\n/* 57: */ {\r\n/* 58:128 */ this.copiedFrom = rfr;\r\n/* 59:129 */ this.formulaBytes = rfr.getFormulaBytes();\r\n/* 60: */ }\r\n/* 61: */ catch (FormulaException e)\r\n/* 62: */ {\r\n/* 63:134 */ logger.error(\"\", e);\r\n/* 64: */ }\r\n/* 65: */ }", "public Builder setField1072(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n field1072_ = value;\n onChanged();\n return this;\n }", "private JTextField getJTextField2211111() {\r\n\t\tif (jTextField2211111 == null) {\r\n\t\t\tjTextField2211111 = new JTextField();\r\n\t\t\tjTextField2211111.setBounds(new Rectangle(186, 230, 33, 20));\r\n\t\t\tjTextField2211111.setText(\"100\");\r\n\t\t\tjTextField2211111.setEnabled(false);\r\n\t\t}\r\n\t\treturn jTextField2211111;\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 }" ]
[ "0.7340294", "0.6037162", "0.5971503", "0.58496183", "0.55890805", "0.55890805", "0.55890805", "0.5481616", "0.5480679", "0.5414813", "0.53848207", "0.5381992", "0.5381992", "0.5381992", "0.53376853", "0.53376853", "0.53376853", "0.5296526", "0.52774674", "0.5176812", "0.5176812", "0.5176812", "0.5170525", "0.5170152", "0.51685786", "0.51685786", "0.51685786", "0.5149281", "0.5149281", "0.5149281", "0.5148732", "0.51162535", "0.51162535", "0.51162535", "0.51162535", "0.5065304", "0.50437504", "0.503858", "0.5035735", "0.503456", "0.50261253", "0.49879244", "0.4968436", "0.4967083", "0.4967083", "0.496562", "0.49517012", "0.49391577", "0.49354434", "0.49341524", "0.4917585", "0.49163654", "0.49163654", "0.4912607", "0.4912607", "0.4912607", "0.49011362", "0.48947573", "0.48921674", "0.4891468", "0.4891035", "0.48897177", "0.48854384", "0.48843122", "0.4884076", "0.48823458", "0.48714298", "0.48554632", "0.48435527", "0.48429105", "0.48404774", "0.48404774", "0.48404774", "0.48369935", "0.48131466", "0.48102668", "0.4807454", "0.4806496", "0.48042083", "0.4802972", "0.47904685", "0.47902888", "0.4788698", "0.47881734", "0.47819084", "0.4780851", "0.4780851", "0.4780851", "0.47791225", "0.47765157", "0.47765157", "0.4772933", "0.47706074", "0.47706074", "0.47706074", "0.4767014", "0.47284603", "0.47257882", "0.47213367", "0.47078788" ]
0.8441744
0
Returns an instance of CpFldMemo
public static synchronized CpFldMemo getInst() { if( me == null ) me = new CpFldMemo(); return me; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CpFldMemo() { super(10010, 5); }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "@ModelAttribute(\"dto\")\n\tpublic MemoDTO newMemoDTO() {\n\t\treturn new MemoDTO();\n\t}", "@ModelAttribute(\"memoDTO\")\n\tpublic MemoDTO newMDTO() {\n\t\treturn new MemoDTO();\n\t}", "java.lang.String getMemo();", "java.lang.String getMemo();", "java.lang.String getMemo();", "public String getMemo() {\n\t\treturn memo;\n\t}", "public String getMemo() {\n\t\treturn memo;\n\t}", "public String getMemo() {\n\t\treturn memo;\n\t}", "public String getMemo() {\n return memo;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public java.lang.String getMemo () {\r\n\t\treturn memo;\r\n\t}", "public java.lang.String getMemo() {\r\n return memo;\r\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return instance.getMemoBytes();\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return instance.getMemoBytes();\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return instance.getMemoBytes();\n }", "public DiaryMemo() {\n\t\tmId = -1;\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "public static Field getInstance() {\n if (_instance == null) {\n _instance = new Field();\n }\n\n return _instance;\n }", "public ModuleMemoire getMemoire() {\n return memoire;\n }", "public BCField getField() {\n return (BCField) getOwner();\n }", "com.google.protobuf.ByteString\n getMemoBytes();", "com.google.protobuf.ByteString\n getMemoBytes();", "com.google.protobuf.ByteString\n getMemoBytes();", "public Memoization getMemoization() {\n Memoization m = this.m;\n if (m != null) return m;\n return this.m = new Memoization();\n }", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "private JTextField getCenterDescTextField() {\r\n if (this.centerDescTextArea == null) {\r\n this.centerDescTextArea = new JTextField();\r\n this.centerDescTextArea.setColumns(10);\r\n }\r\n return this.centerDescTextArea;\r\n }", "private javax.swing.JTextField getMontoAbonadosTF() {\n\t\tif(montoAbonadosTF == null) {\n\t\t\tmontoAbonadosTF = new javax.swing.JTextField();\n\t\t\tmontoAbonadosTF.setPreferredSize(new java.awt.Dimension(130,20));\n\t\t\tmontoAbonadosTF.setEditable(false);\n\t\t\tmontoAbonadosTF.setBackground(new java.awt.Color(242,242,238));\n\t\t\tmontoAbonadosTF.setBorder(javax.swing.BorderFactory.createEmptyBorder(0,0,0,0));\n\t\t\tmontoAbonadosTF.setFont(new java.awt.Font(\"Dialog\", java.awt.Font.BOLD, 12));\n\t\t\tmontoAbonadosTF.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\n\t\t\tmontoAbonadosTF.setFocusable(false);\n\t\t}\n\t\treturn montoAbonadosTF;\n\t}", "private static void showMemoList() {\n\t\t\n\t}", "private void clearMemo() {\n bitField0_ = (bitField0_ & ~0x00000002);\n memo_ = getDefaultInstance().getMemo();\n }", "private void clearMemo() {\n bitField0_ = (bitField0_ & ~0x00000002);\n memo_ = getDefaultInstance().getMemo();\n }", "public String getSMemo() {\n return sMemo;\n }", "private JTextField getJTextField212() {\r\n\t\tif (jTextField212 == null) {\r\n\t\t\tjTextField212 = new JTextField();\r\n\t\t\tjTextField212.setBounds(new Rectangle(35, 347, 181, 20));\r\n\t\t\tjTextField212.setText(\"\");\r\n\t\t}\r\n\t\treturn jTextField212;\r\n\t}", "private void clearMemo() {\n bitField0_ = (bitField0_ & ~0x00000008);\n memo_ = getDefaultInstance().getMemo();\n }", "public static CEPFieldRef getFieldRef(CEPOperation opr) {\n if (opr.getClass() == CEPFieldRef.class) {\n CEPFieldRef field = (CEPFieldRef) opr;\n return field;\n } else if (opr.getClass() == CEPCall.class) {\n CEPCall call = (CEPCall) opr;\n CEPFieldRef field;\n\n for (CEPOperation i : call.getOperands()) {\n field = getFieldRef(i);\n if (field != null) {\n return field;\n }\n }\n return null;\n } else {\n return null;\n }\n }", "private javax.swing.JTextField getMontoPedidosTF() {\n\t\tif(montoPedidosTF == null) {\n\t\t\tmontoPedidosTF = new javax.swing.JTextField();\n\t\t\tmontoPedidosTF.setPreferredSize(new java.awt.Dimension(105,20));\n\t\t\tmontoPedidosTF.setEditable(false);\n\t\t\tmontoPedidosTF.setBackground(new java.awt.Color(242,242,238));\n\t\t\tmontoPedidosTF.setBorder(javax.swing.BorderFactory.createEmptyBorder(0,0,0,0));\n\t\t\tmontoPedidosTF.setFont(new java.awt.Font(\"Dialog\", java.awt.Font.BOLD, 12));\n\t\t\tmontoPedidosTF.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\n\t\t\tmontoPedidosTF.setFocusable(false);\n\t\t}\n\t\treturn montoPedidosTF;\n\t}", "private com.google.protobuf.SingleFieldBuilder<\n io.lightcone.data.types.Amount, io.lightcone.data.types.Amount.Builder, io.lightcone.data.types.AmountOrBuilder> \n getAmountFFieldBuilder() {\n if (amountFBuilder_ == null) {\n amountFBuilder_ = new com.google.protobuf.SingleFieldBuilder<\n io.lightcone.data.types.Amount, io.lightcone.data.types.Amount.Builder, io.lightcone.data.types.AmountOrBuilder>(\n getAmountF(),\n getParentForChildren(),\n isClean());\n amountF_ = null;\n }\n return amountFBuilder_;\n }", "public static PasswordField createPasswordField() {\t\t\n\t\tPasswordField password = new PasswordField();\n\t\tpassword.setPrefWidth(200);\n\t\tpassword.setPrefHeight(30);\n\t\treturn password;\n\t}", "@java.lang.Override\n public boolean hasMemo() {\n return instance.hasMemo();\n }", "@java.lang.Override\n public boolean hasMemo() {\n return instance.hasMemo();\n }", "@java.lang.Override\n public boolean hasMemo() {\n return instance.hasMemo();\n }", "public CustomTxtField getJtfDoc() {\r\n\t\treturn jPanelFormClient.jtfDoc;\r\n\t}", "@SuppressWarnings(\"unused\")\n\tprivate javax.swing.JTextField montoAbonadosTF() {\n\t\tif(montoAbonadosTF == null) {\n\t\t\tmontoAbonadosTF = new javax.swing.JTextField();\n\t\t\tmontoAbonadosTF.setPreferredSize(new java.awt.Dimension(105,20));\n\t\t\tmontoAbonadosTF.setEditable(false);\n\t\t\tmontoAbonadosTF.setBackground(new java.awt.Color(242,242,238));\n\t\t\tmontoAbonadosTF.setBorder(javax.swing.BorderFactory.createEmptyBorder(0,0,0,0));\n\t\t\tmontoAbonadosTF.setFont(new java.awt.Font(\"Dialog\", java.awt.Font.BOLD, 12));\n\t\t\tmontoAbonadosTF.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\n\t\t\tmontoAbonadosTF.setFocusable(false);\n\n\t\t}\n\t\treturn montoAbonadosTF;\n\t}", "@Array({161}) \n\t@Field(6) \n\tpublic Pointer<Byte > Memo() {\n\t\treturn this.io.getPointerField(this, 6);\n\t}", "public Builder setMemoBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setMemoBytes(value);\n return this;\n }", "public Builder setMemoBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setMemoBytes(value);\n return this;\n }", "public Builder setMemoBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setMemoBytes(value);\n return this;\n }", "public static synchronized CpFldValidDate getInst() { \n\t\tif( me == null ) me = new CpFldValidDate();\n\t\treturn me;\n\t}", "private javax.swing.JTextField getMontoAdquiridosTF() {\n\t\tif(montoAdquiridosTF == null) {\n\t\t\tmontoAdquiridosTF = new javax.swing.JTextField();\n\t\t\tmontoAdquiridosTF.setPreferredSize(new java.awt.Dimension(105,20));\n\t\t\tmontoAdquiridosTF.setEditable(false);\n\t\t\tmontoAdquiridosTF.setBackground(new java.awt.Color(242,242,238));\n\t\t\tmontoAdquiridosTF.setBorder(javax.swing.BorderFactory.createEmptyBorder(0,0,0,0));\n\t\t\tmontoAdquiridosTF.setFont(new java.awt.Font(\"Dialog\", java.awt.Font.BOLD, 12));\n\t\t\tmontoAdquiridosTF.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\n\t\t\tmontoAdquiridosTF.setFocusable(false);\n\t\t}\n\t\treturn montoAdquiridosTF;\n\t}", "@Override\n\tpublic FieldDetail getFieldDetail() {\n\t\treturn field;\n\t}", "public static DiaryMemo fromCursor(Cursor cursor) {\n\t\tfinal DiaryMemo note = new DiaryMemo();\n\n\t\tif (cursor.getCount() > 0) {\n\t\t\tif (cursor.moveToFirst()) {\n\t\t\t\tnote.mId = cursor.getLong(cursor.getColumnIndexOrThrow(_ID));\n\t\t\t\tnote.mTitle = cursor.getString(cursor.getColumnIndexOrThrow(TITLE));\n\t\t\t\tnote.mBody = cursor.getString(cursor.getColumnIndexOrThrow(BODY));\n\t\t\t\tnote.mWidgetId = cursor.getString(cursor.getColumnIndexOrThrow(WIDGET_ID));\n\t\t\t\tnote.mCreated = cursor.getString(cursor.getColumnIndexOrThrow(CREATED));\n\n\t\t\t}\n\t\t}\n\n\t\treturn note;\n\t}", "private static void loadMemo() {\n\t\t\n\t}", "private JTextField getTxtIdC() {\n\t\tif (txtIdC == null) {\n\t\t\ttxtIdC = new JTextField();\n\t\t\ttxtIdC.setBounds(new Rectangle(140, 10, 125, 16));\n\t\t}\n\t\treturn txtIdC;\n\t}", "FieldRenderer get(Model m) {\n/* 62 */ if (this.fr == null)\n/* 63 */ this.fr = calcFr(m); \n/* 64 */ return this.fr;\n/* */ }", "private JTextField getJTextField221() {\r\n\t\tif (jTextField221 == null) {\r\n\t\t\tjTextField221 = new JTextField();\r\n\t\t\tjTextField221.setBounds(new Rectangle(186, 8, 33, 20));\r\n\t\t\tjTextField221.setText(\"10\");\r\n\t\t}\r\n\t\treturn jTextField221;\r\n\t}", "private JTextField getBufferDistanceTextField() {\n\t\tif (bufferDistanceTextField == null) {\n\t\t\tbufferDistanceTextField = new JTextField();\n\t\t\tbufferDistanceTextField.setBounds(new java.awt.Rectangle(308, 11,\n\t\t\t\t\t134, 21));\n\t\t}\n\t\treturn bufferDistanceTextField;\n\t}", "private JPasswordField getPasswordField() {\n\t\tif (PasswordField == null) {\n\t\t\tPasswordField = new JPasswordField();\n\t\t\tPasswordField.setBounds(new Rectangle(225, 170, 180, 30));\n\t\t}\n\t\treturn PasswordField;\n\t}", "private RTextField getDbProductTextField() {\n if (dbProductTextField == null) {\n dbProductTextField = new RTextField();\n dbProductTextField.setText(\"\");\n dbProductTextField.setEditable(false);\n dbProductTextField.setDisabledTextColor(Color.lightGray);\n dbProductTextField.setName(\"dbProductTextField\");\n }\n return dbProductTextField;\n }", "private JTextField getTxtC() {\r\n\t\tif (txtC == null) {\r\n\t\t\ttxtC = new JTextField();\r\n\t\t\ttxtC.setLocation(new Point(81, 43));\r\n\t\t\ttxtC.setSize(new Dimension(32, 20));\r\n\t\t}\r\n\t\treturn txtC;\r\n\t}", "private com.google.protobuf.SingleFieldBuilderV3<\n com.yangtian.matrix.Matrix, com.yangtian.matrix.Matrix.Builder, com.yangtian.matrix.MatrixOrBuilder> \n getCFieldBuilder() {\n if (cBuilder_ == null) {\n cBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n com.yangtian.matrix.Matrix, com.yangtian.matrix.Matrix.Builder, com.yangtian.matrix.MatrixOrBuilder>(\n getC(),\n getParentForChildren(),\n isClean());\n c_ = null;\n }\n return cBuilder_;\n }", "public Boolean getNeedMemoInfo() {\n return needMemoInfo;\n }", "private JTextField getJTextField222() {\r\n\t\tif (jTextField222 == null) {\r\n\t\t\tjTextField222 = new JTextField();\r\n\t\t\tjTextField222.setBounds(new Rectangle(186, 68, 33, 20));\r\n\t\t\tjTextField222.setText(\"10\");\r\n\t\t}\r\n\t\treturn jTextField222;\r\n\t}", "private JTextField getMaxTextField() {\r\n\t\tif (maxTextField == null) {\r\n\t\t\tmaxTextField = new JTextField();\r\n\t\t\tif (mode == RULES_BASIS_SUPPORT_MODE) {\r\n\t\t\t\tmaxTextField.setText(\"\"+rulesBasis.getMaxSupport());\r\n\t\t\t} else if (mode == RULES_BASIS_CONFIDENCE_MODE) {\r\n\t\t\t\tmaxTextField.setText(\"\"+rulesBasis.getMaxConfidence());\r\n\t\t\t} else if (mode == INTENTS_BASIS_SUPPORT_MODE) {\r\n\t\t\t\tmaxTextField.setText(\"\"+intentsBasis.getMaxSupport());\r\n\t\t\t}\r\n\t\t\tmaxTextField.setPreferredSize(new java.awt.Dimension(30,20));\r\n\t\t}\r\n\t\treturn maxTextField;\r\n\t}", "protected void createSmartField() {\n\t\tthis.smartField = new SmartField();\n\t}", "private JTextField getJTextField2211111() {\r\n\t\tif (jTextField2211111 == null) {\r\n\t\t\tjTextField2211111 = new JTextField();\r\n\t\t\tjTextField2211111.setBounds(new Rectangle(186, 230, 33, 20));\r\n\t\t\tjTextField2211111.setText(\"100\");\r\n\t\t\tjTextField2211111.setEnabled(false);\r\n\t\t}\r\n\t\treturn jTextField2211111;\r\n\t}", "FieldRefType createFieldRefType();", "public final GF2nField getField()\n {\n return mField;\n }", "private JTextField getJTextField22111111() {\r\n\t\tif (jTextField22111111 == null) {\r\n\t\t\tjTextField22111111 = new JTextField();\r\n\t\t\tjTextField22111111.setBounds(new Rectangle(186, 250, 33, 20));\r\n\t\t\tjTextField22111111.setText(\"50\");\r\n\t\t\tjTextField22111111.setEnabled(false);\r\n\t\t}\r\n\t\treturn jTextField22111111;\r\n\t}", "default String fieldManager() {\n return getName();\n }", "Field_decl getField();", "private JTextField getTextFieldDescription() {\r\n JTextField textFieldDescription = makeJTextField(1, 100, 130, 200, 25);\r\n textFieldDescription.setName(\"Desc\");\r\n return textFieldDescription;\r\n }", "public Memento createMemento() \n\t{\n\t\treturn new Memento(state); \n\t}", "private JTextField getJTextField()\n\t{\n\t\tif ( jTextField == null )\n\t\t{\n\t\t\tjTextField = new JTextField();\n\t\t\tjTextField.setBounds(new Rectangle(21, 23, 107, 19));\n\t\t}\n\t\treturn jTextField;\n\t}", "private JTextField getJTFQtdRegistroBD()\n\t{\n\t\tif ( jTFQTdRegistroBD == null )\n\t\t{\n\t\t\tjTFQTdRegistroBD = new JTextField();\n\t\t\tjTFQTdRegistroBD.setBounds(new Rectangle(15, 50, 150, 19));\n\t\t}\n\t\treturn jTFQTdRegistroBD;\n\t}", "public FieldInfo() {\r\n \t// No implementation required\r\n }", "public static ComplexTypeMBean getComplexTypeMBeanforMaxFileSize()\n { \n return new ComplexTypeForMaxFileSize();\n }", "private MembreDAO getMembreDAO() {\r\n return this.membreDAO;\r\n }", "public static TextField createTextField() {\t\t\n\t\tTextField text = new TextField();\n\t\ttext.setPrefWidth(200);\n\t\ttext.setPrefHeight(30);\n\t\treturn text;\n\t}", "java.lang.String getField1200();", "private JTextField getTxtD() {\r\n\t\tif (txtD == null) {\r\n\t\t\ttxtD = new JTextField();\r\n\t\t\ttxtD.setLocation(new Point(117, 43));\r\n\t\t\ttxtD.setSize(new Dimension(32, 20));\r\n\t\t}\r\n\t\treturn txtD;\r\n\t}", "protected Field getField()\n {\n return field;\n }", "protected Field getField()\n {\n return field;\n }", "@Override\n public String getPayMemo() {\n return String.format(\"Employee ID: %d, Pay Date: %s\", this.getEmpID(),\n HRUtility.dateToStr(new Date()));\n }", "public final MWC.GUI.Editable.EditorType getInfo()\r\n\t{\r\n\t\tif (_myEditor == null)\r\n\t\t\t_myEditor = new FieldInfo(this, this.getName());\r\n\r\n\t\treturn _myEditor;\r\n\t}", "public TextField getTextField() {\n if (textField == null) {//GEN-END:|27-getter|0|27-preInit\n // write pre-init user code here\n textField = new TextField(\"Num\\u00E9ro de carte\", null, 32, TextField.ANY);//GEN-LINE:|27-getter|1|27-postInit\n // write post-init user code here\n }//GEN-BEGIN:|27-getter|2|\n return textField;\n }", "java.lang.String getField1024();", "public Builder clearMemo() {\n copyOnWrite();\n instance.clearMemo();\n return this;\n }" ]
[ "0.7697678", "0.6395675", "0.6395675", "0.6395675", "0.63289386", "0.62238854", "0.618011", "0.618011", "0.618011", "0.6116487", "0.6116487", "0.6116487", "0.60387325", "0.6029337", "0.6029337", "0.6029337", "0.6016988", "0.6016988", "0.6016988", "0.6016988", "0.59801424", "0.59105754", "0.58976406", "0.58976406", "0.58976406", "0.5773409", "0.56670904", "0.56670904", "0.56670904", "0.5608581", "0.5552623", "0.55066067", "0.5498908", "0.5498908", "0.5498908", "0.5417787", "0.53111863", "0.53111863", "0.53111863", "0.53092086", "0.52847505", "0.5244822", "0.5210646", "0.5210646", "0.52033156", "0.52005947", "0.51875854", "0.51804775", "0.51793474", "0.5158691", "0.5132481", "0.51105225", "0.51105225", "0.51105225", "0.5110347", "0.510692", "0.5096912", "0.5092855", "0.5092855", "0.5092855", "0.50834787", "0.50825155", "0.5078937", "0.50767565", "0.5060379", "0.5053507", "0.5047192", "0.50361574", "0.502861", "0.50248593", "0.50144523", "0.4994823", "0.4989288", "0.4982149", "0.49331924", "0.49306408", "0.49164447", "0.4905032", "0.4893206", "0.48694", "0.4863887", "0.486376", "0.48606074", "0.4854809", "0.48483214", "0.48469475", "0.48459148", "0.48440605", "0.48398277", "0.4833317", "0.48295763", "0.48127362", "0.48086518", "0.4806235", "0.4806235", "0.48042524", "0.48033383", "0.48016566", "0.47991586", "0.4798263" ]
0.8072922
0
ToastUtil.getInstance().toastShow(context, "Click " + ((TextView) v).getText());
@Override public void onClick(View v) { dismiss(); switch (v.getId()) { case R.id.menu_item_remove: if (LauncherAppState.getInstance().isSystemApp(packageName)) { ToastUtil.getInstance().toastShow(context, "No delete permission ..."); } else { deleteApp(packageName); } break; case R.id.menu_item_detail: gotoAppDetailIntent(packageName); break; case R.id.menu_item1: menuItemAction(menu1); break; case R.id.menu_item2: menuItemAction(menu2); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View v) {\n\n String s = v.getTag().toString();\n int duration = Toast.LENGTH_SHORT;\n Toast toast = Toast.makeText(context, s, duration);\n toast.show();\n }", "@Override\n public void toastText(String s){\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(View v) {\n String toastText = \"Hello World\";\n\n // This is how long we want to show the toast\n int duration = Toast.LENGTH_SHORT;\n\n // Get the context\n Context context = getApplicationContext();\n\n // Create the toast\n Toast toast = Toast.makeText(context, toastText, duration);\n\n // Show the toast\n toast.show();\n }", "@Override\n public void onClick(View v) {\n Toast.makeText(getContext(),\"hey uuuu clicked me \",Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(View v) {\n Toast.makeText(mContext, \"You Clicked \" + position, Toast.LENGTH_LONG).show();\n }", "@Override\n public void onClick(View v) {\n ((TextView) findViewById(R.id.text)).setText(\"Android is AWESOME!!\");\n }", "@Override\n public void onClick(View v) {\n\n Toast toast = Toast.makeText(getApplicationContext(), \"Coming soon.\", Toast.LENGTH_SHORT);\n toast.show();\n\n }", "public void toastMsg(View v){\n String msg = \"Message Sent!\";\n Toast toast = Toast.makeText(this,msg,Toast.LENGTH_SHORT);\n toast.show();\n }", "public void onClick(View view){\n\n String name = mNameField.getText().toString();\n Toast.makeText(this,\"Hello There\"+name, Toast.LENGTH_LONG).show();\n\n }", "@Override\n public void onClick(View v) {\n \tSystem.out.println(\"ss1ss\");\n //Toast.makeText(ListViewActivity.this, title[mPosition], Toast.LENGTH_SHORT).show();\n }", "public void onClick(View v) {\n lbl.setText(\"Hola jose\");\n }", "@Override\n public void onClick(View v) {\n Toast.makeText(context, \"You Clicked \" + titles.get(position), Toast.LENGTH_SHORT).show();\n }", "public void onClick(View v) \n {\n Button b = (Button) v;\n Toast.makeText(this.mAnchorView.getContext(), b.getText(), Toast.LENGTH_SHORT).show();\n this.dismiss();\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\r\n\t\t\r\n\t\t\t\tToast.makeText(getApplicationContext(), \"등록완료\", Toast.LENGTH_SHORT).show();\r\n\t\t\t\r\n\t\t\t\t\t \r\n\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tToast.makeText(getApplication(), \"right\", 1).show();\r\n\t\t\t}", "@Override\n public void onClick(View v) {\n Toast.makeText(context, \"You Clicked \" + result[position], Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(View v) {\n CustomToast.show(getContext(),\"Service will be available Soon\");\n }", "public void showToast(String text){\n Toast.makeText(this,text,Toast.LENGTH_SHORT).show();\n }", "public void onClick(View v) {\n Toast.makeText( getActivity(),\"Voice Recognition\", Toast.LENGTH_SHORT).show();\n }", "public void onToast (View view)\r\n\t{\r\n\t\t// Respond to the button click\r\n\t\tdoToast ();\r\n\t}", "@Override\n public void onClick(View v) {\n Toast.makeText(MainActivity.this, \"Hello World\", Toast.LENGTH_LONG).show();\n }", "public void displayMessage(View view) {\n // I got the following line of code from StackOverflow: http://stackoverflow.com/questions/5620772/get-text-from-pressed-button\n String s = (String) ((Button)view).getText();\n CharSequence msg = new StringBuilder().append(\"This button will launch my \").append(s.toString()).append(\" app\").toString();\n Toast.makeText(view.getContext(),msg, Toast.LENGTH_SHORT).show();\n }", "private void displayToast(CharSequence text){\n Context context = getApplicationContext();\n int duration = Toast.LENGTH_SHORT;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tToast.makeText(context.getBaseContext(), \"a:\"+v.getId(), Toast.LENGTH_SHORT).show();\n\t\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tToast.makeText(context.getBaseContext(), \"a:\"+v.getId(), Toast.LENGTH_SHORT).show();\n\t\t\t}", "public void onClick(View v) {\n\n }", "public void onClick(View v) {\n\n }", "@Override\n public void onClick(View v) {\n if (tvHello.getText().equals(getText(R.string.helloWorld)))\n {\n tvHello.setText(R.string.agur);\n }\n\n else\n {\n tvHello.setText(R.string.helloWorld);\n }\n }", "protected void showToast(CharSequence text) {\r\n\t Context context = getApplicationContext();\r\n\t int duration = Toast.LENGTH_SHORT;\r\n\t \r\n\t Toast toast = Toast.makeText(context, text, duration);\r\n\t toast.show();\r\n\t}", "void showToast(String value);", "@Override\n public void onClick(View v) {\n\n\n Toast.makeText(MainSOSActivity.this, \"Stay Safe and Confirm the Message! Your emergnecy conctacts will be notified!\", Toast.LENGTH_SHORT).show();\n\n }", "public void onClick(View v) {\n\t}", "@Override\n public void onClick(View v) {\n onClickTwitt();\n }", "public void onClick(View v) {\n }", "public void onClick(View v) {\n }", "public void onClick(View v) {\n \tsetTxtViews();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tmService.sendMessageToUI(\"Hey! You changed my TextView!\");\n\t\t\t}", "public void onClick(View v)\r\n {\n sendSMS(textView.getText().toString());\r\n }", "private void toast(String aToast) {\n Toast.makeText(getApplicationContext(), aToast, Toast.LENGTH_LONG).show();\n }", "@Override\n public void onClick(View v) {\n Toast.makeText(MainActivity.this, \"Goodbye!\", Toast.LENGTH_SHORT).show();\n }", "@OnClick(R.id.tv_guankan)\n public void guankan() {\n\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tmsg();\n\t\t\t}", "void showToast(String message);", "void showToast(String message);", "@Override\n\t\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\t\tint position, long id) {\n\t\t\t\t\tToast.makeText(MainActivity.this, \"我被点击了\", 0).show();\n\t\t\t\t}", "@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\t\tString text = listview.getItemAtPosition(position)+\"\";\n\t\t\n\t\tToast.makeText(context, \"position=\"+position+\" text=\"+text, Toast.LENGTH_SHORT).show();\n\t}", "@Override\n public void onClick(View v) {\n Toast.makeText(getContext(), \"Not Ready Yet :(\", Toast.LENGTH_SHORT).show();\n }", "public void onClick(View v)\n {\n }", "public void onClick(View v) {\n }", "void toast(CharSequence sequence);", "public void onClick(View v) {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tString str = \"FeedBack : \" + feedbackText + \"\\n Rating : \" + String.valueOf(ratebar.getRating());\n\t\t\t\tToast.makeText(getApplicationContext(), str, Toast.LENGTH_LONG).show();\n\t\t\t}", "@Override\n public void onClick(View v) {\n Toast.makeText(getApplicationContext(),\n \"like to watch: \"+((Movie)v.getTag()).title,\n Toast.LENGTH_SHORT).show();\n }", "private void msg(String s)\n {\n Toast.makeText(getApplicationContext(),s,Toast.LENGTH_LONG).show();\n }", "private void msg(String s)\n {\n Toast.makeText(getApplicationContext(),s,Toast.LENGTH_LONG).show();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tstartThread();\n\t\t\t Toast.makeText(getContext(), \"Êղسɹ¦\", 1).show();\n\t\t\t}", "void onMessageToast(String string);", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tToast.makeText(CanvasActivity.this, \"HIHIHI\", Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tToast.makeText(context, \"You Clicked \"+imageId[position], Toast.LENGTH_LONG).show();\n\t\t\t}", "@Override\n public void onClick(View v) {\n Toast.makeText(RecycleTestActivity.this, pos + \"\", Toast.LENGTH_SHORT)\n .show();\n }", "private void doToast() {\n\t\tEditText editText = (EditText) findViewById(R.id.edit_message);\r\n\t\tString message = editText.getText().toString();\r\n\t\t\r\n\t\t// Create and send toast\r\n\t\tContext context = getApplicationContext();\r\n\t\tint duration = Toast.LENGTH_SHORT;\r\n\t\tToast toast = Toast.makeText(context, message, duration);\r\n\t\ttoast.show();\r\n\t}", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\t\n\t\t}", "@Override\n public void onClick(View v) {\n Context context = getApplicationContext();\n // When the Hello button on the app is pressed this line of code will show *Hello, how are you?!\"\n Toast toast = Toast.makeText(context,\n \"Contact details for the college are - \" +\n \"\\n\\t CSN College, Tramore Road, Co.Cork\" +\n \"\\n\\t Phone number: 021-4961020\" +\n \"\\n\\t Email: INFO@CSN.IE\", Toast.LENGTH_LONG);\n // This is for the toast message to show.\n toast.show();\n\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n TextView channelTitle = (TextView) view.findViewById(R.id.channel_name);\n Toast.makeText(getActivity(), getString(R.string.click_on_channel_message)\n + \" \" + channelTitle.getText() + \"! :-)\", Toast.LENGTH_LONG).show();\n }", "void toast(int resId);", "@Override\n public void onClick(View v) {\n\n }", "@Override\n public void onClick(View v) {\n\n }", "@Override\n public void onClick(View v) {\n\n }", "@Override\n public void onClick(View v) {\n\n }", "@Override\n public void onClick(View v) {\n\n }", "@Override\n public void onClick(View v) {\n\n }", "public void onClick(View v) {\n\t\t\t\t}", "@Override\n\tpublic void onClick(View v) {\n\t\t\n\t\t\n\t\t\n\t}", "@Override\n public void onClick(View view, int pos) {\n String tag = (String) view.getTag();\n Toast.makeText(XCArcMenuViewDemo.this, tag, Toast.LENGTH_SHORT).show();\n }", "@Override\n\tpublic void onClick(View v) {\n\t\t\n\t}", "@Override\n\tpublic void onClick(View v) {\n\t\t\n\t}", "@Override\n\tpublic void onClick(View v) {\n\t\t\n\t}", "@Override\n\tpublic void onClick(View v) {\n\t\t\n\t}", "@Override\n\tpublic void onClick(View v) {\n\t\t\n\t}", "@Override\n\tpublic void onClick(View v) {\n\t\t\n\t}", "@Override\n\tpublic void onClick(View v) {\n\t\t\n\t}", "@Override\n\tpublic void onClick(View v) {\n\t\t\n\t}", "@Override\n\tpublic void onClick(View v) {\n\t\t\n\t}", "@Override\n\tpublic void onClick(View v) {\n\t\t\n\t}", "@Override\n\tpublic void onClick(View v) {\n\t\t\n\t}", "@Override\n\tpublic void onClick(View v) {\n\t\t\n\t}", "@Override\n\tpublic void onClick(View v) {\n\t\t\n\t}", "@Override\n public void onClick(final View v) {\n listener.onClickScheduleMsg(\"Tidak tersedia kursi\");\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "private void messageToUser(CharSequence text)\n {\n Context context = getApplicationContext();\n int duration = Toast.LENGTH_SHORT;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v)\n {\n }", "@Override\n\tpublic void onClick(View v) {\n\n\t}", "@Override\n\tpublic void onClick(View v) {\n\n\t}", "@Override\n\tpublic void onClick(View v) {\n\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}" ]
[ "0.82479024", "0.77908844", "0.7741513", "0.7686567", "0.76315343", "0.75880665", "0.7505882", "0.74928063", "0.7403164", "0.7399027", "0.7389379", "0.73361313", "0.7321903", "0.73206764", "0.7309766", "0.7295058", "0.72865987", "0.7263999", "0.72258973", "0.72160363", "0.72133017", "0.7166637", "0.71554583", "0.71317655", "0.7091026", "0.706512", "0.706512", "0.70586795", "0.7024979", "0.70168465", "0.7004736", "0.6997647", "0.6996491", "0.6985383", "0.6985383", "0.69808286", "0.697002", "0.69657016", "0.69648594", "0.6955475", "0.69539315", "0.69497716", "0.6937723", "0.6937723", "0.69330025", "0.69255596", "0.6916641", "0.6896422", "0.6890365", "0.68882674", "0.68854773", "0.6881639", "0.68811536", "0.6878704", "0.6878704", "0.6864936", "0.68549323", "0.6849868", "0.6842643", "0.68414193", "0.6833745", "0.6827086", "0.6826467", "0.6825537", "0.6822236", "0.68167406", "0.68167406", "0.68167406", "0.68167406", "0.68167406", "0.68167406", "0.68156636", "0.6811761", "0.68025744", "0.6800192", "0.6800192", "0.6800192", "0.6800192", "0.6800192", "0.6800192", "0.6800192", "0.6800192", "0.6800192", "0.6800192", "0.6800192", "0.6800192", "0.6800192", "0.6798183", "0.6796358", "0.6796358", "0.6796358", "0.67921096", "0.678521", "0.678521", "0.67809844", "0.6779295", "0.6779295", "0.6779295", "0.67659837", "0.67659837", "0.67659837" ]
0.0
-1
Helper function for making null strings safe for comparisons, etc.
public static String makeSafe(String s) { return (s == null) ? "" : s; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String notNull(String value) {\n return value != null ? value : \"\";\n }", "public static String nullToEmpty ( final String n )\n {\n return null == n ? \"\" : n;\n }", "public static String convertNullToBlank(String s) {\n \tif(s==null) return \"\";\n \treturn s;\n }", "public static String nullConv(String value){\r\n\t\tif(value==null){\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\treturn value;\r\n\t}", "public static String fromNullToEmtpyString(String a) {\r\n\t\tif (a == null) {\r\n\t\t\treturn \"\";\r\n\t\t} else {\r\n\t\t\treturn a;\r\n\t\t}\r\n\t}", "private String getStringOrNull (String value) {\n if (value == null || value.isEmpty()) value = null;\n return value;\n }", "public static String nullToEmpty(String string)\r\n {\r\n return (string == null)?\"\":string;\r\n }", "public static String checkNull(String string1) {\n if (string1 != null)\n return string1;\n else\n return \"\";\n }", "private String checkNullString(String text) {\n if ( text.contains( \" \" )) {\n return null;\n }\n\n // otherwise, we're totally good\n return text;\n }", "public static String removeNullString(String value) {\r\n if(value == null) {\r\n value = NULL_STRING_INDICATOR;\r\n }\r\n\r\n /*else\r\n if(value.trim().equals(\"\")) {\r\n value = EMPTY_STRING_INDICATOR;\r\n }*/\r\n return value;\r\n }", "public String notNull(String text)\n {\n return text == null ? \"\" : text;\n }", "static String emptyToNull(String value) {\n if (value == null || value.trim().isEmpty())\n return null;\n return value.trim();\n }", "private static String null2unknown(String in) {\r\n\t\tif (in == null || in.length() == 0) {\r\n\t\t\treturn null;\r\n\t\t} else {\r\n\t\t\treturn in;\r\n\t\t}\r\n\t}", "public String checkNull(String result) {\r\n\t\tif (result == null || result.equals(\"null\")) {\r\n\t\t\treturn \"\";\r\n\t\t} else {\r\n\t\t\treturn result;\r\n\t\t}\r\n\t}", "public void testCheckNull() {\n Util.checkNull(\" \", \"test\");\n }", "private String setNullIfEmpty(String in) {\n if (in != null && in.trim().length() == 0) {\n return null;\n }\n return in;\n }", "public static String requireNullOrNonEmpty(String str) {\n if (str != null && str.isEmpty()) {\n throw new IllegalArgumentException();\n }\n return str;\n }", "public static String nullifyNullOrEmptyString(final String targetString) {\n\t\tString outputString = null;\n\n\t\tif (targetString != null) {\n\t\t\tString targetStringTrim = targetString.trim();\n\t\t\tif ((!\"null\".equalsIgnoreCase(targetStringTrim)) && (targetStringTrim.length() > 0)) {\n\t\t\t\toutputString = targetStringTrim;\n\t\t\t}\n\t\t}\n\n\t\treturn outputString;\n\t}", "public static String checkNull(String string1, String string2) {\n if (string1 != null)\n return string1;\n else if (string2 != null)\n return string2;\n else\n return \"\";\n }", "static String checkEmptyString(String str, String strName) {\n String errorMsg = \"empty \" + strName;\n str = Optional.ofNullable(str).map(s -> {\n if(s.isEmpty()) {\n throw new NullPointerException(errorMsg);\n }\n return s;\n }).orElseThrow(() -> new NullPointerException(errorMsg));\n return str;\n }", "@Test\n\tpublic void testNullString() {\n\t\tString s = null;\n\t\tassertTrue(\"Null string\", StringUtil.isEmpty(s));\n\t}", "@Test\n public void testSafeTrimToNull() {\n assertNull(Strings.safeTrimToNull(\" \\n\\t \\n\"));\n assertNull(Strings.safeTrimToNull(null));\n assertEquals(\"hello there!\", Strings.safeTrimToNull(\" hello there! \\n\"));\n }", "public String replaceMissingWithNull(String value);", "public static String dispNull (String input) {\n //because of short circuiting, if it's null, it never checks the length.\n if (input == null || input.length() == 0)\n return \"N/A\";\n else\n return input;\n }", "public static String mapEmptyToNull(String strIn)\r\n {\r\n if (strIn == null || strIn.trim().equals(\"\"))\r\n {\r\n return null;\r\n }\r\n return strIn;\r\n }", "String getDefaultNull();", "public static String checkNull(String string1, String string2, String string3) {\n if (string1 != null)\n return string1;\n else if (string2 != null)\n return string2;\n else if (string3 != null)\n return string3;\n else\n return \"\";\n }", "public static String checkNullObject(Object val) {\n\n if (val != null) {\n if (\"\".equals(val.toString().trim())) {\n return \"\";\n }\n return val.toString();\n } else {\n return \"\";\n }\n }", "public static String nullToBlank(Object texto) {\n try {\n if (texto == null) {\n return \"\";\n }\n if (texto.toString().trim().equals(\"null\")) {\n return \"\";\n }\n return texto.toString().trim();\n } catch (Exception e) {\n return \"\";\n }\n\n }", "public static String dispNull (String input) {\n //because of short circuiting, if it's null, it never checks the length.\n if (input == null || input.length() == 0)\n return \"N/A\";\n else\n return input;\n }", "public static String dispNull (String input) {\n //because of short circuiting, if it's null, it never checks the length.\n if (input == null || input.length() == 0)\n return \"N/A\";\n else\n return input;\n }", "public static String formatNull() {\n\t\treturn \"null\";\n\t}", "public static String notNull(String p_in) {\n\t\tString ret = p_in;\n\t\tif (ret==null) ret=\"\";\n\t\treturn ret;\n\n\t}", "@Test\n\tvoid testCheckString4() {\n\t\tassertFalse(DataChecker.checkString((String)null));\n\t}", "public static String fromNullToSpace(String a) {\r\n\t\tif (a == null || \"\".equals(a)) {\r\n\t\t\treturn \" \";\r\n\t\t} else {\r\n\t\t\treturn a;\r\n\t\t}\r\n\t}", "@Test\n\tpublic void caseNameWithNull() {\n\t\tString caseName = \"null\";\n\t\ttry {\n\t\t\tStringNumberUtil.stringUtil(caseName);\n\t\t\tfail();\n\t\t} catch (StringException e) {\n\n\t\t}\n\t}", "@Test\n void trim_null() {\n assertNull(stringUtil.trim(null));\n }", "public static String displayNull (String input)\r\n {\r\n //because of short circuiting, if it's null, it never checks the length.\r\n if (input == null || input.length() == 0)\r\n return \"N/A\";\r\n else\r\n return input;\r\n }", "public static String trimAndConvertEmptyToNull(String str) {\n\n\t\tif (str == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tString newStr = str.trim();\n\n\t\tif (newStr.length() < 1) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn newStr;\n\t}", "public static String checkNull(String sInString) {\n\n\t\tString sOutString = \"\";\n\n\t\tif (sInString == null || sInString.trim().equals(\"\")) {\n\t\t\tsOutString = \"\";\n\t\t} else {\n\t\t\tsOutString = sInString.trim();\n\t\t}\n\n\t\treturn sOutString;\n\n\t}", "@Test(expected=IllegalArgumentException.class)\n\tpublic void testcontainsUniqueCharsNaiveNullString() {\n\t\tQuestion11.containsUniqueCharsNaive(null);\n\t}", "public static String nullToZero(String s)\n {\n if(s == null || s.equals(\"null\") || s.trim().length() == 0)\n {\n return \"0\";\n }\n else\n {\n return s;\n }\n }", "String toString(String value) {\n value = value.trim();\n if (\".\".equals(value)) value = \"\";\n if (\"n/a\".equals(value)) value = \"\";\n return (!\"\".equals(value) ? value : Tables.CHARNULL);\n }", "public static boolean isNullOrEmptyString(Object obj) {\r\n\t\treturn (obj instanceof String) ? ((String)obj).trim().equals(\"\") : obj==null;\r\n\t}", "public static String requireNullOrNonEmpty(String str, String message) {\n if (str != null && str.isEmpty()) {\n throw new IllegalArgumentException(message);\n }\n return str;\n }", "public static String checkString(String s) {\n if(s==null || s.length()==0) return null;\n return s;\n }", "public void testCheckNull() {\n Util.checkNull(\"\", \"test\");\n }", "private static final String quote(String s) {\n return s == null ? \"(null)\" : \"\\\"\" + s + '\"';\n }", "private boolean m16125a(Object obj) {\n return obj == null || obj.toString().equals(\"\") || obj.toString().trim().equals(\"null\");\n }", "public static String emptyToNull(String string)\r\n {\r\n return TextUtil.isEmpty(string)?null:string;\r\n }", "@Test(expected=IllegalArgumentException.class)\n\tpublic void testContainsUniqueChars2NullString() {\n\t\tQuestion11.containsUniqueChars2(null);\n\t}", "private boolean checkForEmptyString(Object value)\n\t{\n\t\tif (value == null || value.toString().isEmpty()) \n\t\t\treturn true;\n\t\treturn false;\n\t}", "static boolean isNullOrEmpty(String str){\n if(str == null){\n return true;\n }\n if(str.isEmpty()){\n return true;\n }\n if(str.length() == 0){\n return true;\n }\n if(str.equalsIgnoreCase(\" \")){\n return true;\n }\n return false;\n }", "public static String checkNull(String string1, String string2, String string3, String string4) {\n if (string1 != null)\n return string1;\n else if (string2 != null)\n return string2;\n else if (string3 != null)\n return string3;\n else if (string4 != null)\n return string4;\n else\n return \"\";\n }", "public static String convertNULLtoString(Object object) {\n return object == null ? EMPTY : object.toString();\n }", "public static String null2String(Object obj) {\n\t\treturn obj == null ? \"\" : obj.toString();\n\t}", "@Test\n public void testSafeTrim() {\n assertEquals(\"\", Strings.safeTrim(null));\n assertEquals(\"\", Strings.safeTrim(\" \\t\\n\"));\n assertEquals(\"hello there!\", Strings.safeTrim(\" hello there! \\n\"));\n }", "@Test\n void nullTest() {\n assertNull(sFloat1.toScrabbleInt());\n assertNull(sFloat1.and(sFloat2));\n assertNull(sFloat1.or(sFloat2));\n assertNull(sFloat1.toScrabbleBool());\n assertNull(sFloat1.toScrabbleBinary());\n assertNull(sFloat1.addToString(new ScrabbleString(\"Hello World\")));\n }", "private String sanitizeString(String string) {\n if (string == null) {\n return \"\";\n }\n return string.toLowerCase().trim();\n }", "private String parseNull () {\r\n \r\n assert iMessage!=null;\r\n assert iIndex>=0;\r\n assert iIndex<=iMessage.length();\r\n\r\n char chr=next();//get next character\r\n assert chr=='n';//assert correct first character\r\n skip(3);//skip to end of null token\r\n \r\n return \"null\";//return string representation of null\r\n \r\n }", "protected String compString() {\n\t\treturn null;\n\t}", "public static String removeNull(Object value) {\r\n String valueToReturn = EMPTY_STRING_INDICATOR;\r\n\r\n if(value instanceof String) {\r\n valueToReturn = removeNullString((String) value);\r\n } else if(value instanceof Integer) {\r\n valueToReturn = removeNullInteger((Integer) value);\r\n } else if(value instanceof Date) {\r\n valueToReturn = removeNullDate((Date) value);\r\n } else if(value instanceof Boolean) {\r\n valueToReturn = removeNullBoolean((Boolean) value);\r\n } else if(value instanceof BigDecimal) {\r\n valueToReturn = removeNullBigDecimal((BigDecimal) value);\r\n } else if(value instanceof Long) {\r\n valueToReturn = removeNullLong((Long) value);\r\n }\r\n\r\n return valueToReturn;\r\n }", "public static String trimToNull(String str) {\n\t\tString temp = trim(str);\n\t\treturn isEmpty(temp) ? null : temp;\n\t}", "static boolean isNullOrEmpty(String string) {\n return string == null || string.isEmpty();\n }", "@Test\n\tvoid testCheckString3() {\n\t\tassertFalse(DataChecker.checkString(null));\n\t}", "public static String nullSafeToString(Object obj) {\r\n if (obj == null) {\r\n return NULL_STRING;\r\n }\r\n if (obj instanceof String) {\r\n return (String) obj;\r\n }\r\n if (obj instanceof Object[]) {\r\n return nullSafeToString((Object[]) obj);\r\n }\r\n if (obj instanceof boolean[]) {\r\n return nullSafeToString((boolean[]) obj);\r\n }\r\n if (obj instanceof byte[]) {\r\n return nullSafeToString((byte[]) obj);\r\n }\r\n if (obj instanceof char[]) {\r\n return nullSafeToString((char[]) obj);\r\n }\r\n if (obj instanceof double[]) {\r\n return nullSafeToString((double[]) obj);\r\n }\r\n if (obj instanceof float[]) {\r\n return nullSafeToString((float[]) obj);\r\n }\r\n if (obj instanceof int[]) {\r\n return nullSafeToString((int[]) obj);\r\n }\r\n if (obj instanceof long[]) {\r\n return nullSafeToString((long[]) obj);\r\n }\r\n if (obj instanceof short[]) {\r\n return nullSafeToString((short[]) obj);\r\n }\r\n String str = obj.toString();\r\n return (str != null ? str : EMPTY_STRING);\r\n }", "public static String toString(Object obj, String nullStr) {\n return obj == null ? nullStr : obj.toString();\n }", "public static String[] stripNullStrings(String[] str) {\n\t\tif (str==null) return null;\n\n\t\t// propagate null strings to the end\n\t\tfor (int i=str.length-1; i>0; i--) {\n\t\t\tif (str[i]!=null&&str[i-1]==null) {\n\t\t\t\tstr[i-1]=str[i];\n\t\t\t\tstr[i]=null;\n\t\t\t}\n\t\t}\n\n\t\tint numvalid=0;\n\t\tfor (int i=0; i<str.length; i++)\n\t\t\tif (str[i]!=null) numvalid=i+1;\n\n\t\tif (numvalid==0) return null;\n\n\t\tString tmp[]=new String[numvalid];\n\t\tSystem.arraycopy(str, 0, tmp, 0, numvalid);\n\t\treturn tmp;\n\t}", "@Test\n public void testCheckNull() {\n Helper.checkNull(\"non-null\", \"non-null name\");\n }", "public static String checkEmpty(String string1, String string2, String string3) {\n if (string1 != null && string1.length() > 0)\n return string1;\n else if (string2 != null && string2.length() > 0)\n return string2;\n else if (string3 != null && string3.length() > 0)\n return string3;\n else\n return \"\";\n }", "public static String checkEmpty(String string1, String string2) {\n if (string1 != null && string1.length() > 0)\n return string1;\n else if (string2 != null && string2.length() > 0)\n return string2;\n else\n return \"\";\n }", "protected static boolean isDBNull( String s )\r\n\t{\r\n\t\treturn ( s == null ) || s.equals( \"\\\\N\" ) || s.equals( \"NULL\" );\r\n\t}", "String nullStrToSpc(Object obj) {\n String spcStr = \"\";\n\n if (obj == null) {\n return spcStr;\n } else {\n return obj.toString();\n }\n }", "boolean canMatchEmptyString() {\n return false;\n }", "private String replaceNull(Time s) {\n\t\treturn s == null ? \"--\" : s.toString();\n\t}", "public boolean isNullOrEmpty(String str){\n \treturn str!=null && !str.isEmpty() ? false : true;\n }", "private static void checkForNullValue(String value) {\n if ( value == null ) {\n throw new NullPointerException();\n }\n }", "private String bindNull() {\n String op;\n \n if (operator == null) {\n op = null;\n } else if (operator.equals(\"=\")) {\n op = \"IS\";\n } else if (operator.equals(\"!=\")) {\n op = \"IS NOT\";\n } else {\n op = operator;\n }\n if (column != null && skipNulls) {\n return \"1 = 1\";\n } else {\n return cond(column, op, \"NULL\");\n }\n }", "private static String repairString(String s) {\n return s != null ? s.replaceAll(\"\\'\", \"\\'\\'\") : null;\n }", "private void serializeNull(final StringBuffer buffer)\n {\n buffer.append(\"N;\");\n }", "public static String getNonEmptyString() {\n String result;\n\n do {\n result = getString();\n } while (result.isEmpty());\n return result;\n }", "private String clean(String in) {\n return (in == null ? \"\" : in.replaceAll(\"'\", \"\\\\'\"));\n }", "public static String requireNonEmpty(String str) {\n if (str.isEmpty()) {\n throw new IllegalArgumentException();\n }\n return str;\n }", "private static boolean isBlank(String str)\r\n/* 254: */ {\r\n/* 255: */ int length;\r\n/* 256:300 */ if ((str == null) || ((length = str.length()) == 0)) {\r\n/* 257:301 */ return true;\r\n/* 258: */ }\r\n/* 259: */ int length;\r\n/* 260:302 */ for (int i = length - 1; i >= 0; i--) {\r\n/* 261:303 */ if (!Character.isWhitespace(str.charAt(i))) {\r\n/* 262:304 */ return false;\r\n/* 263: */ }\r\n/* 264: */ }\r\n/* 265:306 */ return true;\r\n/* 266: */ }", "public static boolean nullity(String param) {\n return (param == null || param.trim().equals(\"\"));\n }", "public String NullSave()\n {\n return \"null\";\n }", "private String getNullValueText() {\n return getNull();\n }", "@Test(expected = NullPointerException.class)\n public void givenNullValueShouldReturnNullPointerException() {\n transpose.setString(null);\n }", "static <T> boolean isNullOrEmpty(T t){\n if(t == null){\n return true;\n }\n String str = t.toString();\n if(str.isEmpty()){\n return true;\n }\n if(str.length() == 0){\n return true;\n }\n return false;\n }", "private static String valueOf(Object str3Sg) {\n\t\treturn null;\r\n\t}", "private boolean bothNull(String one, String two) {\n return (one == null && two == null);\n }", "public static String defaultString(String val) {\n\t\tif (val == null || val.isBlank()) return \"\";\n\t\telse return val.trim();\n\t}", "@Test(expected = NullPointerException.class)\n\tpublic void testNull() {\n\n\t\tString str = null;\n\t\tstr.toUpperCase();\n\t}", "public void testCheckString_NullArg() {\n try {\n Util.checkString(null, \"Test\");\n\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }", "public void testCheckString_NullArg() {\n try {\n Util.checkString(null, \"Test\");\n\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }", "public void testGetNullValue() {\n ValueString vs = new ValueString();\n\n assertNull(vs.getString());\n assertEquals(0.0D, vs.getNumber(), 0.0D);\n assertNull(vs.getDate());\n assertEquals(false, vs.getBoolean());\n assertEquals(0, vs.getInteger());\n assertEquals(null, vs.getBigNumber());\n assertNull(vs.getSerializable());\n }", "@Test\n public void nonNullStringPass() {\n }", "public static boolean stringNullOrEmpty ( String string ) {\r\n if ( string == null ) return true;\r\n if ( string.isEmpty() ) return true;\r\n return false;\r\n }", "private boolean hasValue (String s) { return s != null && s.length() != 0; }", "public static final String checkedDeco(final String deco) {\r\n\t\tif (deco == null) return null;\r\n\t\telse if (deco.isEmpty()) return null;\r\n\t\telse if (deco.equals(\"null\")) return null;\r\n\t\treturn deco;\r\n\t}" ]
[ "0.7436522", "0.7405672", "0.73600847", "0.71371675", "0.7115061", "0.70766854", "0.7027515", "0.6975326", "0.69713825", "0.6966592", "0.6898738", "0.68633556", "0.6843282", "0.6828565", "0.6810152", "0.6809478", "0.6785304", "0.6734312", "0.6724235", "0.67240715", "0.66566694", "0.66512966", "0.664901", "0.6623492", "0.6615641", "0.66115785", "0.65894544", "0.6587569", "0.655814", "0.6553638", "0.6553638", "0.65471447", "0.65282005", "0.6506097", "0.64695716", "0.6468286", "0.6465372", "0.6462032", "0.64325666", "0.6420035", "0.63712144", "0.6356035", "0.6355231", "0.6339474", "0.63293517", "0.6324801", "0.6312974", "0.6312742", "0.63062054", "0.6298358", "0.6296714", "0.6288707", "0.6261592", "0.62554395", "0.6193146", "0.61142516", "0.6102781", "0.60999674", "0.6093121", "0.6068734", "0.6065073", "0.6061793", "0.60614777", "0.6026026", "0.60246265", "0.60165614", "0.60135907", "0.6011466", "0.60054517", "0.59927887", "0.5990347", "0.59891176", "0.5981224", "0.5954073", "0.5937324", "0.59302485", "0.5920973", "0.59169495", "0.5912397", "0.59036684", "0.589851", "0.58835536", "0.58588666", "0.5850513", "0.58238083", "0.5811208", "0.5805171", "0.57907623", "0.5790592", "0.5781253", "0.5779277", "0.5759266", "0.5745768", "0.5721874", "0.5721874", "0.5719155", "0.56956756", "0.5692269", "0.5681165", "0.567051" ]
0.6991514
7
multiply by 12 (we run in voltage mode and use a 12v battery) and invert right side
public void tankDrive(double left, double right) { leftMaster.set(left * 12.0); rightMaster.set(right * -12.0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getOutputVoltage();", "int getInverterCurrent();", "public static float pu2mvar(float pwr) {return pwr*100F;}", "int getOutputVoltageRaw();", "public void power() {\r\n\t\tpowerOn = !powerOn;\r\n\t}", "private synchronized void updateBattery(){\n \tdouble battery = MathUtils.round(Battery.getVoltage(),1);\n \tstore(new DisplayableData(\"battery\", battery+\"V\", battery));\n }", "private void eToPower()\n\t{\n\t\tif(Fun == null)\n\t\t{\n\t\t\tsetLeftValue();\n\t\t\tresult = calc.eToPower ();\n\t\t\tupdateText();\n\t\t\tsetLeftValue();\n\t\t}\n\t}", "public void ApplyMovement() {\n long currTime = SystemClock.uptimeMillis();\n if(currTime - lastUpdateTime < 16){\n return;\n }\n lastUpdateTime = currTime;\n\n\n double tl_power_raw = movement_y-movement_turn+movement_x*1.5;\n double bl_power_raw = movement_y-movement_turn- movement_x*1.5;\n double br_power_raw = -movement_y-movement_turn-movement_x*1.5;\n double tr_power_raw = -movement_y-movement_turn+movement_x*1.5;\n\n\n\n\n //find the maximum of the powers\n double maxRawPower = Math.abs(tl_power_raw);\n if(Math.abs(bl_power_raw) > maxRawPower){ maxRawPower = Math.abs(bl_power_raw);}\n if(Math.abs(br_power_raw) > maxRawPower){ maxRawPower = Math.abs(br_power_raw);}\n if(Math.abs(tr_power_raw) > maxRawPower){ maxRawPower = Math.abs(tr_power_raw);}\n\n //if the maximum is greater than 1, scale all the powers down to preserve the shape\n double scaleDownAmount = 1.0;\n if(maxRawPower > 1.0){\n //when max power is multiplied by this ratio, it will be 1.0, and others less\n scaleDownAmount = 1.0/maxRawPower;\n }\n tl_power_raw *= scaleDownAmount;\n bl_power_raw *= scaleDownAmount;\n br_power_raw *= scaleDownAmount;\n tr_power_raw *= scaleDownAmount;\n\n\n //now we can set the powers ONLY IF THEY HAVE CHANGED TO AVOID SPAMMING USB COMMUNICATIONS\n topLeft.setPower(tl_power_raw);\n bottomLeft.setPower(bl_power_raw);\n bottomRight.setPower(br_power_raw);\n topRight.setPower(tr_power_raw);\n }", "double scale_motor_power(double p_power) //Scales joystick value to output appropriate motor power\n {Scales joystick value to output appropriate motor power\n { //Use like \"scale_motor_power(gamepad1.left_stick_x)\"\n //\n // Assume no scaling.\n //\n double l_scale = 0.0;\n\n //\n // Ensure the values are legal.\n //\n double l_power = Range.clip(p_power, -1, 1);\n\n double[] l_array =\n {0.00, 0.05, 0.09, 0.10, 0.12\n , 0.15, 0.18, 0.24, 0.30, 0.36\n , 0.43, 0.50, 0.60, 0.72, 0.85\n , 1.00, 1.00\n };\n\n //\n // Get the corresponding index for the specified argument/parameter.\n //\n int l_index = (int) (l_power * 16.0);\n if (l_index < 0) {\n l_index = -l_index;\n } else if (l_index > 16) {\n l_index = 16;\n }\n\n if (l_power < 0) {\n l_scale = -l_array[l_index];\n } else {\n l_scale = l_array[l_index];\n }\n\n return l_scale;\n\n }", "double a_right_back_drive_power ()\n {\n double l_return = 0.0;\n\n if (right_back_drv_Motor != null)\n {\n l_return = right_back_drv_Motor.getPower ();\n }\n\n return l_return;\n\n }", "private void adjustPower (TurnType dir,\n float p) {\n float adjust = Math.signum(p) * gyroSensor.adjustDirection();\n // with RUN_TO_POSITION sign of power is ignored\n // we have to clip so that (1 + adjust) and (1 - adjust) have the same sign\n adjust = Range.clip(adjust, -1, 1);\n // BNO055 positive for left turn\n float pwrl = p * (1 - adjust);\n float pwrr = p * (1 + adjust);\n\n float max = Math.max(Math.abs(pwrl), Math.abs(pwrr));\n if (max > 1f) {\n // scale to 1\n pwrl = pwrl / max;\n pwrr = pwrr / max;\n }\n setPower(pwrl,\n pwrr,\n dir);\n /*if (dir == TurnType.STRAFE) {\n long timeStamp = System.currentTimeMillis();\n if (timeStamp - logTimeStamp > 25) {\n RobotLog.i(\"Power left:\" + pwrl + \" right:\" + pwrr);\n logTimeStamp = timeStamp;\n }\n }*/\n }", "public void Down4()\r\n {\r\n if(By2>0 && By2<900){\r\n \r\n By2+=2.5;\r\n }\r\n }", "private String fixBattery(double voltage) {\n String volt = \"\" + voltage;\n String[] volts = volt.split(\"\\\\.\");\n String first = volts[0];\n String last = volts[1];\n if (volts[0].length() < 2) {\n first = \"0\" + volts[0];\n }\n if (volts[1].length() < 2) {\n last = volts[1] + \"0\";\n }\n return first + \".\" + last;\n }", "public void TeleopCode() {\n\t\tMLeft.set(-Controls.joy2.getRawAxis(5)+ 0.06); //(Controls.joy2.getRawAxis5 + 0.06);\n\t}", "private void displayMotorsPower() {\n int powers = Motor.A.getPower() * 100\n + Motor.B.getPower() * 10\n + Motor.C.getPower(); \n LCD.showNumber(powers);\n }", "private void twoPower()\n\t{\n\t\tif(Fun == null)\n\t\t{\n\t\t\tsetLeftValue();\n\t\t\tresult = calc.twoPower ( );\n\t\t\tupdateText();\n\t\t}\n\t}", "void powerOn();", "public final void invert() {\n\tdouble s = determinant();\n\tif (s == 0.0)\n\t return;\n\ts = 1/s;\n\t// alias-safe way.\n\tset(\n\t m11*m22 - m12*m21, m02*m21 - m01*m22, m01*m12 - m02*m11,\n\t m12*m20 - m10*m22, m00*m22 - m02*m20, m02*m10 - m00*m12,\n\t m10*m21 - m11*m20, m01*m20 - m00*m21, m00*m11 - m01*m10\n\t );\n\tmul((float)s);\n }", "public void turnClockwise(double power){\n motorFrontLeft.setPower(-power);\n motorBackLeft.setPower(-power);\n motorFrontRight.setPower(power);\n motorBackRight.setPower(power);\n }", "private void coins_a2W(){\n\t\tthis.cube[4] = this.cube[17]; \n\t\tthis.cube[17] = this.cube[20];\n\t\tthis.cube[20] = this.cube[36];\n\t\tthis.cube[36] = this.cube[33];\n\t\tthis.cube[33] = this.cube[4];\n\t}", "@Override\n\tpublic double selectPower(int vid) {\n\t\treturn vb.selectPower(vid);\n\t}", "private void changeUnitWithDirection() {\n MainActivity app = MainActivity.app;\n if (app == null) return;\n int unit = SharedPreferencesManager.getCurrencyUnit(app);\n switch (unit) {\n case BRConstants.CURRENT_UNIT_BITS:\n SharedPreferencesManager.putCurrencyUnit(app, BRConstants.CURRENT_UNIT_MBITS);\n break;\n case BRConstants.CURRENT_UNIT_MBITS:\n SharedPreferencesManager.putCurrencyUnit(app, BRConstants.CURRENT_UNIT_BITCOINS);\n break;\n case BRConstants.CURRENT_UNIT_BITCOINS:\n SharedPreferencesManager.putCurrencyUnit(app, BRConstants.CURRENT_UNIT_BITS);\n break;\n }\n\n }", "private void coins_a2R(){\n\t\tthis.cube[13] = this.cube[53]; \n\t\tthis.cube[53] = this.cube[18];\n\t\tthis.cube[18] = this.cube[0];\n\t\tthis.cube[0] = this.cube[27];\n\t\tthis.cube[27] = this.cube[13];\n\t}", "int getInputVoltage();", "int getInverterCurrentRaw();", "public void switchPowerLevel()\n {\n // If power level is 1, set this.powerLevel to 3 - 1 = 2.\n // If power level is 2, set this.powerLevel to 3 - 2 = 1.\n this.powerLevel = (3 - this.powerLevel);\n }", "@Override\n public void onClick(View v) {\n if(flag){\n temp *= 10;\n temp += 8;\n }else {\n step /= 10;\n temp += step * 8;\n }\n tv.setText(numUtil._tv(temp));\n }", "public void turnCounterClockwise(double power){\n motorFrontLeft.setPower(power);\n motorBackLeft.setPower(power);\n motorFrontRight.setPower(-power);\n motorBackRight.setPower(-power);\n }", "int getInputVoltageRaw();", "public static void halfVolume() {\n volume = 50;\n System.out.println(\"Volume: \" + volume);\n//end of modifiable zone(JavaCode)........E/30cff6a1-f5dd-43b9-94cb-285201f52ee7\n }", "public void Power() {\n if (Estado == false){\r\n Estado = true;\r\n } else if (Estado == true){\r\n Estado = false;\r\n }\r\n }", "private void calculateOutputPower() { \n if (this.online == true) {\n this.rms = Math.sqrt(this.rmsSum / 40);\n if (this.inputPower - this.rms >= 0) {\n setOutputPower(this.inputPower - this.rms);\n } else {\n setOutputPower(0);\n }\n }\n channel.updateOutput();\n }", "public static float pu2mw(float pwr) {return pwr*100F;}", "double getPWMRate();", "public synchronized float getVoltage(){\n\t\t getData(REG_MMXCOMMAND, buf, 1);\n\t\t // 37 is the constant given by Mindsensors support 5/2011 to return millivolts. KPT\n return (37f*(buf[0]&0xff))*.001f;\n\t}", "public void invert() {\n\t\tthis.vector.setXYZ(-this.vector.x(), -this.vector.y(), -this.vector.z());\n\t\tthis.energy = -this.energy;\n\t}", "public void power()\r\n {\r\n powerOn = true;\r\n }", "double a_right_front_drive_power ()\n {\n double l_return = 0.0;\n\n if (right_front_drv_Motor != null)\n {\n l_return = right_front_drv_Motor.getPower ();\n }\n\n return l_return;\n\n }", "void setPWMRate(double rate);", "@Override\n\tpublic void upgrade() {\n\t\tthis.power += 5;\n\t}", "private void coins_a1W(){\n\t\tthis.cube[4] = this.cube[15]; \n\t\tthis.cube[15] = this.cube[26];\n\t\tthis.cube[26] = this.cube[38];\n\t\tthis.cube[38] = this.cube[27];\n\t\tthis.cube[27] = this.cube[4];\n\t}", "public void toggle() {\n if (volume == 1f) {\n volume = 0f;\n }\n else if (volume == 0f) {\n volume = 1f;\n }\n\n }", "int getChargerCurrentRaw();", "private String tempConversion() {\n int reading = ((record[17] & 255) + ((record[21] & 0x30) << 4));\n\n double voltage = (reading * 3.3) / 1024;\n return formatter.format((voltage - .6) / .01);\n\n }", "public void liftArm(){armLifty.set(-drivePad.getThrottle());}", "private void controlLift()\n {\n if (gamepad1.dpad_up) {\n liftMotor.setPower(-0.5);\n } else if (gamepad1.dpad_down) {\n liftMotor.setPower(0.5);\n } else {++backInc;\n liftMotor.setPower(0);\n }\n }", "public void mo25062g() {\n if (this.f16607aa) {\n this.f16607aa = false;\n this.f16605Y = 0;\n reset();\n }\n }", "private void coins_a2Y(){\n\t\tthis.cube[49] = this.cube[44]; \n\t\tthis.cube[44] = this.cube[24];\n\t\tthis.cube[24] = this.cube[9];\n\t\tthis.cube[9] = this.cube[29];\n\t\tthis.cube[29] = this.cube[49];\n\t}", "public void recarga(){\n \tthis.fuerza *= 1.1;\n \tthis.vitalidad *= 1.1; \n }", "public void mo5965b(int i) {\n SharedPreferences.Editor edit = getSharedPreferences(\"setNightModeChangeVolumeValue\", 0).edit();\n edit.putInt(\"vol\", i);\n edit.apply();\n }", "private void devolver100() {\n cambio = cambio - 100;\n de100--;\n cambio100++;\n }", "public void Down2(){\r\n if(Hy>0 && Hy<900){\r\n \r\n Hy+=3;\r\n }\r\n }", "public void depolarize(){\n\t\t\tif(sodiumChannel.getGateStatus().equalsIgnoreCase(\"open\")) {\n\t\t\t\tfor(int i = 1; i <= threshold; i++) {\n\t\t\t\t\tcurrentVoltage = currentVoltage + sodiumIon;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public void updateCelcius(){\n tempInC = ( (tempInF - 32)/9 ) * 5;\n }", "@Override\n public void onClick(View v) {\n if(temp < 0.00000001 && temp > 0.0)\n tv.setText(\"0\");\n else{\n if(flag){\n temp *= 10;\n }else {\n step /= 10;\n }\n tv.setText(numUtil._tv(temp));\n }\n }", "public static void updateBatteryPerBlock(Drone drone) {\n\n //synchronized (lock){\n\n if (drone.isShutDown()) {\n return;\n }\n\n if (drone.isEconomyMode()) {\n\n Double oldCurrentBattery = drone.getCurrentBattery();\n Double batteryPerBlock = drone.getBatteryPerBlock();\n\n Double economyModeBatteryPerBlock = batteryPerBlock / 2;\n\n Double newCurrentBattery = oldCurrentBattery - economyModeBatteryPerBlock;\n\n drone.setCurrentBattery(newCurrentBattery);\n\n } else if (drone.isNormalMode()) {\n Double oldCurrentBattery = drone.getCurrentBattery();\n Double batteryPerBlock = drone.getBatteryPerBlock();\n Double newCurrentBattery = oldCurrentBattery - batteryPerBlock;\n\n drone.setCurrentBattery(newCurrentBattery);\n\n }\n\n // }\n\n\n }", "private void updateBatteryParameterValues(final int updateIndex) {\n\t\tUltraDuoPlusDialog.log.log(java.util.logging.Level.FINEST, GDE.STRING_ENTRY);\n\t\t//0=cellType,1=numCells,2=capacity,3=year,4=month,5=day,\n\t\t//6=chargeCurrent,7=deltaPeak,8=preDeltaPeakDelay,9=trickleCurrent,10=chargeOffTemperature,11=chargeMaxCapacity,12=chargeSafetyTimer,13=rePeakCycle,14=chargeVoltage,15=repaekDelay,16=flatLimitCheck,26=storeVoltage\n\t\t//17=dischargeCurrent,18=dischargOffVolage,19=dischargeOffTemp,20=dischargemaxCapacity,21=NiMhMatchVoltage\n\t\t//22=cycleDirection,23=cycleCount,24=chargeEndDelay,25=dischargeEndDelay\n\t\tif (updateIndex == 2) { //capacity change\n\t\t\tthis.memoryValues[6] = this.memoryValues[2]; //charge current 1.0 C\n\t\t\tthis.memoryValues[17] = this.memoryValues[2]; //discharge current 1.0 C\n\t\t}\n\t\tif (updateIndex != 6) {\n\t\t\t//this.memoryValues[12] = this.memoryValues[2] / 30; //chargeSafetyTimer\n\t\t\t//this.memoryValues[12] = this.memoryValues[12] - (this.memoryValues[12] % 10); //chargeSafetyTimer\n\t\t\tthis.memoryValues[20] = 105;//dischargemaxCapacity\n\t\t\t//this.memoryValues[22] = 1; //cycleDirection D->C\n\t\t\tthis.memoryValues[23] = 1; //cycleCount\n\t\t\tthis.memoryValues[24] = 30; //chargeEndDelay\n\t\t\tthis.memoryValues[25] = 10; //dischargeEndDelay\n\t\t\tswitch (this.memoryValues[0]) {\n\t\t\tcase 0: //NiCd\n\t\t\t\tthis.memoryValues[11] = 120;//chargeMaxCapacity\n\t\t\t\tthis.memoryValues[10] = (this.device.getDeviceTypeIdentifier() != GraupnerDeviceType.UltraDuoPlus45 ? this.channelValues1[4] == 0 : this.channelValues1[0] == 0) ? 50 : (9 / 5) * 50 + 32; //chargeOffTemperature\n\t\t\t\tthis.memoryValues[12] = Double.valueOf(90 * (1.0 * this.memoryValues[2] / this.memoryValues[6])).intValue(); //chargeSafetyTimer\n\t\t\t\tthis.memoryValues[9] = updateIndex == 0 ? 550 : this.memoryValues[9]; //this.memoryValues[2] / 10; //trickleCurrent\n\t\t\t\tthis.memoryValues[7] = 7; //deltaPeak mV\n\t\t\t\tthis.memoryValues[8] = 3; //preDeltaPeakDelay min\n\t\t\t\tthis.memoryValues[13] = 1; //rePeakCycle\n\t\t\t\tthis.memoryValues[15] = 3; //rePaekDelay min\n\t\t\t\tthis.memoryValues[16] = 1; //flatLimitCheck\n\t\t\t\tthis.memoryValues[18] = 900;//dischargeVoltage/cell\n\t\t\t\tthis.memoryValues[19] = (this.device.getDeviceTypeIdentifier() != GraupnerDeviceType.UltraDuoPlus45 ? this.channelValues1[4] == 0 : this.channelValues1[0] == 0) ? 65 : (9 / 5) * 65 + 32; //dischargeOffTemperature\n\t\t\t\tthis.memoryValues[21] = 1200;//NiMhMatchVoltage\n\t\t\t\tbreak;\n\t\t\tcase 1: //NiMh\n\t\t\t\tif (updateIndex == 2 && (this.stepChargeTabItem != null || !this.stepChargeTabItem.isDisposed())) { //capacity change\n\t\t\t\t\tthis.memoryStepValues[3] = this.memoryStepValues[7] = 0;\n\t\t\t\t\tthis.stepChargeComposite.setStepChargeValues(this.memoryValues[2], this.memoryValues[6], this.memoryStepValues);\n\n\t\t\t\t\tthis.stepChargeComposite.getStepChargeValues(UltraDuoPlusDialog.this.memoryStepValues);\n\t\t\t\t\tthis.chargeGroup.notifyListeners(SWT.Selection, new Event());\n\t\t\t\t}\n\t\t\t\tthis.memoryValues[11] = 120; //chargeMaxCapacity\n\t\t\t\tthis.memoryValues[10] = (this.device.getDeviceTypeIdentifier() != GraupnerDeviceType.UltraDuoPlus45 ? this.channelValues1[4] == 0 : this.channelValues1[0] == 0) ? 50 : (9 / 5) * 50 + 32; //chargeOffTemperature\n\t\t\t\tthis.memoryValues[12] = Double.valueOf(90 * (1.0 * this.memoryValues[2] / this.memoryValues[6])).intValue(); //chargeSafetyTimer\n\t\t\t\tthis.memoryValues[9] = updateIndex == 0 ? 0 : this.memoryValues[9]; //this.memoryValues[2] / 10; //trickleCurrent\n\t\t\t\tthis.memoryValues[7] = 5; //deltaPeak mV\n\t\t\t\tthis.memoryValues[8] = 3; //preDeltaPeakDelay min\n\t\t\t\tthis.memoryValues[13] = 1; //rePeakCycle\n\t\t\t\tthis.memoryValues[15] = 3; //rePaekDelay min\n\t\t\t\tthis.memoryValues[16] = 1; //flatLimitCheck\n\t\t\t\tthis.memoryValues[18] = 1000; //dischargeVoltage/cell\n\t\t\t\tthis.memoryValues[19] = (this.device.getDeviceTypeIdentifier() != GraupnerDeviceType.UltraDuoPlus45 ? this.channelValues1[4] == 0 : this.channelValues1[0] == 0) ? 65 : (9 / 5) * 65 + 32; //dischargeOffTemperature\n\t\t\t\tthis.memoryValues[21] = 1200; //NiMhMatchVoltage\n\t\t\t\tbreak;\n\t\t\tcase 2: //LiIo\n\t\t\t\tthis.memoryValues[11] = 105; //chargeMaxCapacity\n\t\t\t\tthis.memoryValues[10] = (this.device.getDeviceTypeIdentifier() != GraupnerDeviceType.UltraDuoPlus45 ? this.channelValues1[4] == 0 : this.channelValues1[0] == 0) ? 45 : (9 / 5) * 45 + 32; //chargeOffTemperature\n\t\t\t\tthis.memoryValues[12] = Double.valueOf(120 * (1.0 * this.memoryValues[2] / this.memoryValues[6])).intValue(); //chargeSafetyTimer\n\t\t\t\tthis.memoryValues[9] = 0; //trickleCurrent\n\t\t\t\tthis.memoryValues[14] = 4100; //chargeVoltage/cell\n\t\t\t\tthis.memoryValues[26] = 3800; //storeVoltage/cell\n\t\t\t\tthis.memoryValues[18] = 3000; //dischargeVoltage/cell\n\t\t\t\tthis.memoryValues[19] = (this.device.getDeviceTypeIdentifier() != GraupnerDeviceType.UltraDuoPlus45 ? this.channelValues1[4] == 0 : this.channelValues1[0] == 0) ? 55 : (9 / 5) * 55 + 32; //dischargeOffTemperature\n\t\t\t\tbreak;\n\t\t\tcase 3: //LiPo\n\t\t\t\tthis.memoryValues[11] = 105; //chargeMaxCapacity\n\t\t\t\tthis.memoryValues[10] = (this.device.getDeviceTypeIdentifier() != GraupnerDeviceType.UltraDuoPlus45 ? this.channelValues1[4] == 0 : this.channelValues1[0] == 0) ? 45 : (9 / 5) * 45 + 32; //chargeOffTemperature\n\t\t\t\tthis.memoryValues[12] = Double.valueOf(120 * (1.0 * this.memoryValues[2] / this.memoryValues[6])).intValue(); //chargeSafetyTimer\n\t\t\t\tthis.memoryValues[9] = 0; //trickleCurrent\n\t\t\t\tthis.memoryValues[14] = 4200; //chargeVoltage/cell\n\t\t\t\tthis.memoryValues[26] = 3900; //storeVoltage/cell\n\t\t\t\tthis.memoryValues[18] = 3100; //dischargeVoltage/cell\n\t\t\t\tthis.memoryValues[19] = (this.device.getDeviceTypeIdentifier() != GraupnerDeviceType.UltraDuoPlus45 ? this.channelValues1[4] == 0 : this.channelValues1[0] == 0) ? 55 : (9 / 5) * 55 + 32; //dischargeOffTemperature\n\t\t\t\tbreak;\n\t\t\tcase 4: //LiFe\n\t\t\t\tthis.memoryValues[11] = 105; //chargeMaxCapacity\n\t\t\t\tthis.memoryValues[10] = (this.device.getDeviceTypeIdentifier() != GraupnerDeviceType.UltraDuoPlus45 ? this.channelValues1[4] == 0 : this.channelValues1[0] == 0) ? 45 : (9 / 5) * 45 + 32; //chargeOffTemperature\n\t\t\t\tthis.memoryValues[12] = Double.valueOf(120 * (1.0 * this.memoryValues[2] / this.memoryValues[6])).intValue(); //chargeSafetyTimer\n\t\t\t\tthis.memoryValues[9] = 0; //trickleCurrent\n\t\t\t\tthis.memoryValues[14] = 3600; //chargeVoltage/cell\n\t\t\t\tthis.memoryValues[26] = 3500; //storeVoltage/cell\n\t\t\t\tthis.memoryValues[18] = 2500; //dischargeVoltage/cell\n\t\t\t\tthis.memoryValues[19] = (this.device.getDeviceTypeIdentifier() != GraupnerDeviceType.UltraDuoPlus45 ? this.channelValues1[4] == 0 : this.channelValues1[0] == 0) ? 55 : (9 / 5) * 55 + 32; //dischargeOffTemperature\n\t\t\t\tbreak;\n\t\t\tcase 5: //PB\n\t\t\t\tthis.memoryValues[6] = this.memoryValues[2] / 10; //charge current 0.1 C\n\t\t\t\tthis.memoryValues[11] = 105; //chargeMaxCapacity\n\t\t\t\tthis.memoryValues[10] = (this.device.getDeviceTypeIdentifier() != GraupnerDeviceType.UltraDuoPlus45 ? this.channelValues1[4] == 0 : this.channelValues1[0] == 0) ? 50 : (9 / 5) * 50 + 32; //chargeOffTemperature\n\t\t\t\tthis.memoryValues[12] = 905; //chargeSafetyTimer\n\t\t\t\tthis.memoryValues[9] = this.memoryValues[2] / 10; //trickleCurrent\n\t\t\t\tthis.memoryValues[14] = 2300; //chargeVoltage/cell\n\t\t\t\tthis.memoryValues[18] = 1800; //dischargeVoltage/cell\n\t\t\t\tthis.memoryValues[19] = (this.device.getDeviceTypeIdentifier() != GraupnerDeviceType.UltraDuoPlus45 ? this.channelValues1[4] == 0 : this.channelValues1[0] == 0) ? 55 : (9 / 5) * 55 + 32; //dischargeOffTemperature\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\telse { //updateIndex == 6\n\t\t\tswitch (this.memoryValues[0]) {\n\t\t\tcase 0: //NiCd\n\t\t\t\tthis.memoryValues[12] = Double.valueOf(90 * (1.0 * this.memoryValues[2] / this.memoryValues[6])).intValue(); //chargeSafetyTimer\n\t\t\t\tbreak;\n\t\t\tcase 1: //NiMh\n\t\t\t\tthis.memoryValues[12] = Double.valueOf(90 * (1.0 * this.memoryValues[2] / this.memoryValues[6])).intValue(); //chargeSafetyTimer\n\t\t\t\tbreak;\n\t\t\tcase 2: //LiIo\n\t\t\t\tthis.memoryValues[12] = Double.valueOf(120 * (1.0 * this.memoryValues[2] / this.memoryValues[6])).intValue(); //chargeSafetyTimer\n\t\t\t\tbreak;\n\t\t\tcase 3: //LiPo\n\t\t\t\tthis.memoryValues[12] = Double.valueOf(120 * (1.0 * this.memoryValues[2] / this.memoryValues[6])).intValue(); //chargeSafetyTimer\n\t\t\t\tbreak;\n\t\t\tcase 4: //LiFe\n\t\t\t\tthis.memoryValues[12] = Double.valueOf(120 * (1.0 * this.memoryValues[2] / this.memoryValues[6])).intValue(); //chargeSafetyTimer\n\t\t\t\tbreak;\n\t\t\tcase 5: //PB\n\t\t\t\tthis.memoryValues[12] = 905; //chargeSafetyTimer\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\t\n\t\tthis.memoryValues[12] = this.memoryValues[12] > 905 ? 905 : this.memoryValues[12];\n\n\t\t//update parameter controls\n\t\tfor (int i = 0; i < UltramatSerialPort.SIZE_MEMORY_SETUP; i++) {\n\t\t\tif (this.memoryParameters[i] != null) {\n\t\t\t\tthis.memoryParameters[i].setSliderSelection(this.memoryValues[i]);\n\t\t\t}\n\t\t}\n\t\tif (UltraDuoPlusDialog.log.isLoggable(java.util.logging.Level.FINER)) {\n\t\t\tStringBuffer sb = new StringBuffer();\n\t\t\tfor (int i = 0; i < UltramatSerialPort.SIZE_MEMORY_SETUP; i++) {\n\t\t\t\tsb.append(String.format(\"%04d\", this.memoryValues[i])).append(GDE.STRING_LEFT_BRACKET).append(i).append(GDE.STRING_RIGHT_BRACKET_COMMA); //$NON-NLS-1$\n\t\t\t}\n\t\t\tUltraDuoPlusDialog.log.log(java.util.logging.Level.FINER, sb.toString());\n\t\t}\n\t}", "public void mo1280a() {\n this.f9468a.m3526a(this);\n }", "public void armDrive(double pivValue, double fwdValue){\n if (pivValue!=0) {\n pivValue = pivValue / 6;\n left_drive.setPower(pivValue);\n right_drive.setPower(-pivValue);\n }else {\n fwdValue = fwdValue / 6;\n left_drive.setPower(fwdValue);\n right_drive.setPower(fwdValue);\n }\n\n }", "public void steady(){\n if(steady){\n if(!bellySwitch.get()) {\n leftMotor.set(-.3);\n rightMotor.set(-.3);\n }else {\n leftMotor.set(0);\n rightMotor.set(0);\n } \n }\n }", "private void coins_a1R(){\n\t\tthis.cube[13] = this.cube[51]; \n\t\tthis.cube[51] = this.cube[20];\n\t\tthis.cube[20] = this.cube[2];\n\t\tthis.cube[2] = this.cube[29];\n\t\tthis.cube[29] = this.cube[13];\n\t}", "@Override\n public void onClick(View v) {\n if(flag){\n temp *= 10;\n temp += 9;\n }else {\n step /= 10;\n temp += step * 9;\n }\n tv.setText(numUtil._tv(temp));\n }", "private void power(){\n this.powerX = realX * radius;\n this.powerY = realY * radius;\n }", "public void multiply(Monom m){\r\n\t\tint temp_power = this.get_power();\r\n\t\tdouble temp_coaf = this.get_coefficient();\r\n\t\ttemp_power += m.get_power();\r\n\t\ttemp_coaf *= m.get_coefficient();\r\n\t\tthis.set_power(temp_power);\r\n\t\tthis.set_coefficient(temp_coaf);\r\n\t}", "EDataType getActivePower();", "@Override\n public void onClick(View v) {\n if(flag){\n temp *= 10;\n temp += 2;\n }else {\n step /= 10;\n temp += step * 2;\n }\n tv.setText(numUtil._tv(temp));\n }", "public final void negate() {\n \n \tthis.m00 = -this.m00;\n \tthis.m01 = -this.m01;\n \tthis.m02 = -this.m02;\n this.m10 = -this.m10;\n this.m11 = -this.m11;\n this.m12 = -this.m12;\n this.m20 = -this.m20;\n this.m21 = -this.m21;\n this.m22 = -this.m22;\n }", "private void aretes_aW(){\n\t\tthis.cube[4] = this.cube[16]; \n\t\tthis.cube[16] = this.cube[23];\n\t\tthis.cube[23] = this.cube[37];\n\t\tthis.cube[37] = this.cube[30];\n\t\tthis.cube[30] = this.cube[4];\n\t}", "public void teleopPeriodic() {\n\n \t//NetworkCommAssembly.updateValues();\n \t\n\t\t// both buttons pressed simultaneously, time to cal to ground\n\t\tif (gamepad.getRawButton(FRONT_ARM_GROUND_CAL_BUTTON1) && gamepad.getRawButton(FRONT_ARM_GROUND_CAL_BUTTON2)) {\n\t\t\tprocessGroundCal();\n\t\t}\n\n\t\t// PID CONTROL ONLY\n\t\tdouble armDeltaPos = gamepad.getRawAxis(1);\n\t\tif (Math.abs(armDeltaPos) < ARM_DEADZONE) {\n\t\t\tarmDeltaPos = 0.0f;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tarmDeltaPos *= ARM_POS_MULTIPLIER;\n\t\t\tdouble currPos = testMotor.getPosition();\n\t\t\t\n\t\t\tif (((currPos > SOFT_ENCODER_LIMIT_MAX) && armDeltaPos > 0.0) || ((currPos < SOFT_ENCODER_LIMIT_FLOOR) && armDeltaPos < 0.0)) {\n\t\t\t\tSystem.out.println(\"SOFT ARM LIMIT HIT! Setting armDeltaPos to zero\");\n\t\t\t\tarmDeltaPos = 0.0;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tdouble newPos = currPos + armDeltaPos;\n\t\t\ttestMotor.set(newPos);\n\t\t\tSystem.out.println(\"Setting new front arm pos = \" + newPos);\t\n\t\t}\t\t\n\n \t/*\n\t\tdouble newArmPos = gamepad.getRawAxis(1);\n\t\tif(Math.abs(newArmPos) <= ARM_DEADZONE) {\n\t\t\tnewArmPos = 0.0;\n\t\t}\n\t\tdouble newMotorPos = (newArmPos * ARM_SPEED_MULTIPLIER) + testMotor.getPosition();\n\t\tpositionMoveByCount(newMotorPos);\n\t\tSystem.out.println(\"input = \" + newArmPos + \" target pos = \" + newMotorPos + \" enc pos = \" + testMotor.getPosition());\n \t*/\n \t\n\t\t// PercentVbus test ONLY!!\n \t/*\n\t\tdouble armSpeed = gamepad.getRawAxis(1);\n\t\tif (Math.abs(armSpeed) < ARM_DEADZONE) {\n\t\t\tarmSpeed = 0.0f;\n\t\t}\t\n\t\tarmSpeed *= ARM_MULTIPLIER;\n\t\t\n\t\tdouble pos= testMotor.getPosition();\n\t\tif (((pos > SOFT_ENCODER_LIMIT_1) && armSpeed < 0.0) || ((pos < SOFT_ENCODER_LIMIT_2) && armSpeed > 0.0))\n\t\t\tarmSpeed = 0.0;\n\t\ttestMotor.set(armSpeed);\n\t\t\n\t\tSystem.out.println(\"armSpeed = \" + armSpeed + \" enc pos = \" + testMotor.getPosition());\n\t\t */ \n }", "void driveStop() {\n flMotor.setPower(0);\n frMotor.setPower(0);\n blMotor.setPower(0);\n brMotor.setPower(0);\n }", "@Override\n\tpublic void volume() {\n\t\tsolido.volume = (solido.areaBase * altura) / 3;\n\t}", "public float getVolumeMultiplier();", "@Override\r\n public void ingresarCapacidad(){\r\n double capacidad = Math.pow(alto, 3);\r\n int capacidadInt = Double.valueOf(capacidad).intValue();\r\n super.capacidad = capacidadInt;\r\n super.cantidadRestante = capacidadInt;\r\n System.out.println(capacidadInt);\r\n }", "public int getVoltage ()\n {\n return _voltage;\n }", "public void raise(){\r\n elevatorTalon1.set(basePWM);\r\n elevatorTalon2.set(basePWM * pwmModifier);\r\n }", "float getPower();", "public void reverseXVelocity() {\n xVelocity *= -1;\n }", "@Override\n public void onClick(View v) {\n if(flag){\n temp *= 10;\n temp += 7;\n }else {\n step /= 10;\n temp += step * 7;\n }\n tv.setText(numUtil._tv(temp));\n }", "int getBattery();", "@Override\n public void onClick(View v) {\n tv.setText(\"×\");\n if(op == -1){\n sum = temp;\n temp = 0.0;\n }else{\n if(op == 1){\n sum += temp;\n }else if(op == 2){\n sum -= temp;\n }else if(op == 3){\n sum *= temp;\n }else if(op == 4){\n sum /= temp;\n }\n }\n op = 3;\n temp = 0.0;\n positive = true;\n flag = true;\n }", "public void vibrate(RumbleType type,float value){\n if (value < 0)\n value = 0;\n else if (value > 1)\n value = 1;\n if (type == RumbleType.left || type == RumbleType.combined)\n \tlRumble = (short)(value*65535);\n if(type == RumbleType.right || type == RumbleType.combined)\n \trRumble = (short)(value*65535);\n FRCNetworkCommunicationsLibrary.HALSetJoystickOutputs((byte)port, 0, lRumble, rRumble);\n }", "@Override\r\n public void onReceive(Context context, Intent intent) {\n int level = intent.getIntExtra(BatteryManager.EXTRA_LEVEL, -1);\r\n boolean full = level == 100;\r\n\r\n Log.d(TAG, \"Power changed - level \" + level);\r\n\r\n // wenn voll\r\n if (full) {\r\n makeNotification(false);\r\n }\r\n // wenn leerer geworden (nur bei Umstieg von grün auf orange notwendig)\r\n else {\r\n makeNotification(true);\r\n }\r\n }", "public void mo25051a(float volume) {\n if (this.f16595O != volume) {\n this.f16595O = volume;\n m18356s();\n }\n }", "@Override\n public void onClick(View v) {\n if(flag){\n temp *= 10;\n temp += 4;\n }else {\n step /= 10;\n temp += step * 4;\n }\n tv.setText(numUtil._tv(temp));\n }", "@Override\n public void onClick(View v) {\n if(flag){\n temp *= 10;\n temp += 5;\n }else {\n step /= 10;\n temp += step * 5;\n }\n tv.setText(numUtil._tv(temp));\n }", "@Override\r\n\tpublic void acelerar() {\n\t\tSystem.out.println(\"Acelerar motor electrico adaptador\");\r\n\t\tthis.motorElectrico.moverMasRapido();\r\n\t}", "void turnUsingEncoder(double degrees, double power);", "@Override\n public void onClick(View v) {\n if(flag){\n temp *= 10;\n temp += 1;\n }else {\n step /= 10;\n temp += step * 1.0;\n }\n tv.setText(numUtil._tv(temp));\n }", "private void ADC16 ( int Work16 )\n\t{\n\t\t// If Decimal FLAG is on\n\t\tif ( CheckDecimal () )\n\t\t{\n\t\t\tint A1 = A & 0x000F;\n\t\t\tint A2 = A & 0x00F0;\n\t\t\tint A3 = A & 0x0F00;\n\t\t\tint A4 = A & 0xF000;\n\t\t\tint W1 = Work16 & 0x000F;\n\t\t\tint W2 = Work16 & 0x00F0;\n\t\t\tint W3 = Work16 & 0x0F00;\n\t\t\tint W4 = Work16 & 0xF000;\n\n\t\t\tA1 += W1 + _Carry;\n\t\t\tif ( A1 > 0x0009 )\n\t\t\t{\n\t\t\t\tA1 -= 0x000A;\n\t\t\t\tA1 &= 0x000F;\n\t\t\t\tA2 += 0x0010;\n\t\t\t}\n\n\t\t\tA2 += W2;\n\t\t\tif ( A2 > 0x0090 )\n\t\t\t{\n\t\t\t\tA2 -= 0x00A0;\n\t\t\t\tA2 &= 0x00F0;\n\t\t\t\tA3 += 0x0100;\n\t\t\t}\n\n\t\t\tA3 += W3;\n\t\t\tif ( A3 > 0x0900 )\n\t\t\t{\n\t\t\t\tA3 -= 0x0A00;\n\t\t\t\tA3 &= 0x0F00;\n\t\t\t\tA4 += 0x1000;\n\t\t\t}\n\n\t\t\tA4 += W4;\n\t\t\tif ( A4 > 0x9000 )\n\t\t\t{\n\t\t\t\tA4 -= 0xA000;\n\t\t\t\tA4 &= 0xF000;\n\t\t\t\tSetCarry();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tClearCarry();\n\t\t\t}\n\n\t\t\tint Ans16 = A4 | A3 | A2 | A1;\n\n\t\t\t// if the result leave the 16th bit on?\n\t\t\tif ( ( ( ~( A ^ Work16 ) & ( Work16 ^ Ans16 ) ) & 0x8000 ) != 0 )\n\t\t\t{\n\t\t\t\tSetOverflow();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tClearOverflow();\n\t\t\t}\n\t\t\tA_W( Ans16 );\n\t\t\tSetZN16( A );\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint Ans32 = A + Work16 + _Carry;\n\n\t\t\t// If our result gives us a value greater than the 17th bit on Set the Carry flag\n\t\t\t_Carry = Ans32 >= 0x10000 ? 1 : 0;\n\n\t\t\tif ( ( ~( A ^ Work16 ) & ( Work16 ^ ( Ans32 & 0xFFFF ) ) & 0x8000 ) != 0 )\n\t\t\t{\n\t\t\t\tSetOverflow();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tClearOverflow();\n\t\t\t}\n\n\t\t\tA_W( Ans32 );\n\t\t\tSetZN16( A );\n\t\t}\n\t}", "@Override\n public void onClick(View v) {\n tv.setText(\"÷\");\n if(op == -1){\n sum = temp;\n temp = 0.0;\n }else{\n if(op == 1){\n sum += temp;\n }else if(op == 2){\n sum -= temp;\n }else if(op == 3){\n sum *= temp;\n }else if(op == 4){\n sum /= temp;\n }\n }\n op = 4;\n temp = 0.0;\n positive = true;\n flag = true;\n }", "public void Down3(){\r\n if(Hy2>0 && Hy2<900){\r\n \r\n Hy2+=3;\r\n }\r\n }", "public void manualControl(double power){\n leftMotor.set(power);\n rightMotor.set(power);\n }", "public final void mo5393bz(boolean z) {\n AppMethodBeat.m2504i(18993);\n C9638aw.m17190ZK();\n C7580z Ry = C18628c.m29072Ry();\n SQLiteDatabase dvx = C18628c.m29069Ru().dvx();\n this.kIv = Ry.mo16813Mm(237569);\n this.kIw = Ry.getInt(237570, 10);\n this.kIx = Ry.getInt(237571, 0) != 0;\n Context context = C4996ah.getContext();\n Intent registerReceiver = context.registerReceiver(null, new IntentFilter(\"android.intent.action.BATTERY_CHANGED\"));\n if (registerReceiver != null) {\n boolean z2;\n int intExtra = registerReceiver.getIntExtra(\"status\", -1);\n if (intExtra == 2 || intExtra == 5) {\n z2 = true;\n } else {\n z2 = false;\n }\n this.jZS = z2;\n } else {\n this.jZS = false;\n }\n this.jZT = ((PowerManager) context.getSystemService(\"power\")).isScreenOn();\n this.kIz = new C114927();\n C18624c.abi().mo10116c(this.kIz);\n C11486d.bhQ();\n this.kIA = new C114978();\n C4879a.xxA.mo10052c(this.kIA);\n this.jZU = new C114939();\n IntentFilter intentFilter = new IntentFilter();\n intentFilter.addAction(\"android.intent.action.SCREEN_ON\");\n intentFilter.addAction(\"android.intent.action.SCREEN_OFF\");\n intentFilter.addAction(\"android.intent.action.ACTION_POWER_CONNECTED\");\n intentFilter.addAction(\"android.intent.action.ACTION_POWER_DISCONNECTED\");\n context.registerReceiver(this.jZU, intentFilter);\n C44042b.m79163a(new C11477c(this), \"//recover-old\", \"//recover\", \"//post-recover\", \"//backupdb\", \"//recoverdb\", \"//repairdb\", \"//corruptdb\", \"//iotracedb\", \"//recover-status\", \"//dbbusy\");\n String str = \"MicroMsg.SubCoreDBBackup\";\n String str2 = \"Auto database backup %s. Device status:%s interactive,%s charging.\";\n Object[] objArr = new Object[3];\n objArr[0] = this.kIs ? \"enabled\" : \"disabled\";\n objArr[1] = this.jZT ? \"\" : \" not\";\n objArr[2] = this.jZS ? \"\" : \" not\";\n C4990ab.m7417i(str, str2, objArr);\n C11486d.m19265b(dvx);\n C27700b.m44016Ii(C1427q.m3026LK());\n C5730e.deleteFile(C1720g.m3536RP().eJM + \"dbback/EnMicroMsg.db.bak\");\n C5730e.deleteFile(C1720g.m3536RP().eJM + \"dbback/corrupted/EnMicroMsg.db.bak\");\n C5730e.deleteFile(C1720g.m3536RP().cachePath + \"EnMicroMsg.db.bak\");\n C5730e.deleteFile(C1720g.m3536RP().cachePath + \"corrupted/EnMicroMsg.db.bak\");\n final String Rt = C18628c.m29068Rt();\n C9638aw.m17180RS().mo10310m(new Runnable() {\n public final void run() {\n AppMethodBeat.m2504i(18975);\n if (C5730e.m8628ct((Rt + \"corrupted/EnMicroMsg.db\") + \".corrupt\")) {\n AppMethodBeat.m2505o(18975);\n return;\n }\n long currentTimeMillis = System.currentTimeMillis();\n C5728b c5728b = new C5728b(Rt + \"corrupted\");\n if (c5728b.isDirectory()) {\n for (C5728b lastModified : c5728b.dMF()) {\n if (currentTimeMillis - lastModified.lastModified() < 7776000000L) {\n AppMethodBeat.m2505o(18975);\n return;\n }\n }\n if (C5730e.m8618N(C5736j.m8649w(c5728b.mUri), true)) {\n C4990ab.m7416i(\"MicroMsg.SubCoreDBBackup\", \"Corrupted databases removed.\");\n }\n AppMethodBeat.m2505o(18975);\n return;\n }\n AppMethodBeat.m2505o(18975);\n }\n }, 60000);\n AppMethodBeat.m2505o(18993);\n }", "public void turnLightsOff()\n {\n set(Relay.Value.kOff);\n }", "public void computer()\n\t{\n\t\tif( this.days <= 5 )\n\t\t\tthis.charge = 500 * this.days ; \n\t\telse if( this.days <= 10)\n\t\t\tthis.charge = 400 * (this.days-5) + 2500 ; \n\t\telse\n\t\t\tthis.charge = 200 * (this.days-10) + 2500 + 2000 ;\n\t}", "private void vibrateContinually(){\n vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);\n long[] pattern = new long[]{0,400,1000,600,1000,800,1000};\n\n if (Build.VERSION.SDK_INT >= 26) {\n vibrator.vibrate(VibrationEffect.createWaveform(pattern, 0));\n } else {\n vibrator.vibrate(pattern, 0);\n }\n }", "double a_left_back_drive_power()\n {\n double l_return = 0.0;\n if (left_back_drv_Motor != null)\n {\n l_return = left_back_drv_Motor.getPower ();\n }\n\n return l_return;\n\n }", "@Override\n public void onClick(View v) {\n if(flag){\n temp *= 10;\n temp += 6;\n }else {\n step /= 10;\n temp += step * 6;\n }\n tv.setText(numUtil._tv(temp));\n }", "public int getPower();", "private void aretes_aR(){\n\t\tthis.cube[13] = this.cube[52]; \n\t\tthis.cube[52] = this.cube[19];\n\t\tthis.cube[19] = this.cube[1];\n\t\tthis.cube[1] = this.cube[28];\n\t\tthis.cube[28] = this.cube[13];\n\t}", "public void setVibrationOff() {\n\n }" ]
[ "0.56054157", "0.5499233", "0.5472652", "0.54666555", "0.54630953", "0.546138", "0.54531467", "0.5444196", "0.5434912", "0.5413515", "0.5361063", "0.5355292", "0.53536844", "0.5340196", "0.5339049", "0.531121", "0.5306907", "0.53013724", "0.52868485", "0.52734786", "0.5267645", "0.5264509", "0.5235887", "0.52345765", "0.52198595", "0.5216907", "0.5215879", "0.52116346", "0.5209898", "0.5197892", "0.5195644", "0.5189009", "0.51799744", "0.51744395", "0.5165235", "0.51629525", "0.5161404", "0.515816", "0.51575196", "0.515051", "0.5141913", "0.5141187", "0.5140303", "0.51382464", "0.5129209", "0.51281774", "0.51192516", "0.51098084", "0.5105241", "0.5102213", "0.50907576", "0.50896794", "0.50842696", "0.5075432", "0.5065767", "0.50595534", "0.50557256", "0.5053107", "0.5049431", "0.5042755", "0.50412875", "0.5038875", "0.5036352", "0.5034797", "0.5033532", "0.50322986", "0.5028777", "0.5027916", "0.5026833", "0.5026119", "0.5022162", "0.50093544", "0.50030005", "0.5001215", "0.49987072", "0.49959308", "0.49902874", "0.49838823", "0.49747822", "0.49730235", "0.49664557", "0.49642718", "0.49631366", "0.4961301", "0.4958861", "0.49582267", "0.49531135", "0.49526528", "0.49469727", "0.49464953", "0.49447435", "0.49431157", "0.49403366", "0.4939567", "0.49362183", "0.49327835", "0.49294585", "0.49272957", "0.49263757", "0.49262437", "0.49215832" ]
0.0
-1
Constructor for the QuinzicalModel class loads all necessary data from data so that the game is ready to go
public QuinzicalModel() throws Exception { initialiseCategories(); readCategories(); setFiveRandomCategories(); loadCurrentPlayer(); setAnsweredQuestions(); File winnings = new File("data/winnings"); if (!winnings.exists()) { BashCmdUtil.bashCmdNoOutput("touch data/winnings"); BashCmdUtil.bashCmdNoOutput("echo 0 >> data/winnings"); } BashCmdUtil.bashCmdNoOutput("touch data/tts_speed"); loadInternationalUnlocked(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Model(JSONObject selfAsJson) {\n try {\n int width = selfAsJson.getInt(\"width\") / PlayGameActivity.PIXELS_PER_PHYSICS_GRID;\n int height = selfAsJson.getInt(\"height\") / PlayGameActivity.PIXELS_PER_PHYSICS_GRID;\n this.physModel = new Physics2D(selfAsJson.getJSONObject(\"physics\"), width, height);\n this.graphModel = new Graphics2D(selfAsJson.getJSONObject(\"graphics\"));\n this.gameStateModel = new GameState(selfAsJson.getJSONObject(\"gamestate\"));\n }catch(JSONException e) {\n e.printStackTrace();\n }\n\n }", "public Model() {\n\t\t\n\t\t\n\t\t\n\t\t\n\tquestionMap = new HashMap<String, Question>();\n\t\n\tQuestion q1 = new Question(\"Climate\");\n\tq1.setContent(\"Do you prefer hot Climate to Cold Climate?\");\n\tquestionMap.put(q1.getAbbrev(), q1);\n\t\n\tQuestion q2 = new Question(\"Cost of Living\");\n\tq2.setContent(\"Do you prefer high cost of living areas?\");\n\tquestionMap.put(q2.getAbbrev(), q2);\n\t\n\tQuestion q3 = new Question(\"Population Density\");\n\tq3.setContent(\"Do you prefer high population to low population density areas?\");\n\tquestionMap.put(q3.getAbbrev(), q3);\n\t\n\tQuestion q4 = new Question(\"Job Opportunity\");\n\tq4.setContent(\"Do you prefer higher Job Opportunity areas?\");\n\tquestionMap.put(q4.getAbbrev(), q4);\n\t\n\tQuestion q5 = new Question(\"Crime Rates\");\n\tq5.setContent(\"Do you prefer high crime rate areas?\");\n\tquestionMap.put(q5.getAbbrev(), q5);\n\n\t\n\t}", "private void init()\n\t{\n\t\tsetModel(new Model(Id.model, this, null));\n\t\tsetEnviroment(new Enviroment(Id.enviroment, this, model()));\n\t\tsetVaccinationCenter(new VaccinationCenter(Id.vaccinationCenter, this, model()));\n\t\tsetCanteen(new Canteen(Id.canteen, this, vaccinationCenter()));\n\t\tsetRegistration(new Registration(Id.registration, this, vaccinationCenter()));\n\t\tsetExamination(new Examination(Id.examination, this, vaccinationCenter()));\n\t\tsetVaccination(new Vaccination(Id.vaccination, this, vaccinationCenter()));\n\t\tsetWaitingRoom(new WaitingRoom(Id.waitingRoom, this, vaccinationCenter()));\n\t\tsetSyringes(new Syringes(Id.syringes, this, vaccination()));\n\t}", "public WorldModel(){\t\n\t}", "CubeModel() {\n r = 0;\n c = 0;\n s = 4;\n grid = new boolean [4][4];\n the_cube = new boolean[6];\n moves = 0;\n\n }", "public Model() {\n\t\tboolean debug = Constants.getDebugFlag();\n\t\tgameMode = Constants.getGameMode();\n\t\twhitePieces = new PieceArray();\n\t\tblackPieces = new PieceArray();\n\t\tcapturedPieces = new ArrayList<Piece>();\n\t\tmoveList = new ArrayList<Move>();\n\t\tgameTree = new GameTree();\n\n\t\tboard = new Piece[8][8];\n\n\t\t\n\t\t// Easy way to set up nonstandard positions for testing.\n\t\tif(debug)\n\t\t\tinitializeDebugBoard();\n\t\telse\n\t\t\tinitializeBoard();\n\t\t\n\t\tpopulateLists();\n\t}", "MusicModelImpl() {\n if (lowestPitchValue < 0) {\n throw new IllegalArgumentException(\"Invalid music: lowestPitchValue cannot be negative\");\n }\n if (currentBeatNumber < 0) {\n throw new IllegalArgumentException(\"Invalid music: currentBeatNumber \" +\n \"cannot be negative\");\n }\n if (tempo < 0) {\n throw new IllegalArgumentException(\"Invalid music: tempo cannot be negative\");\n }\n this.music = new TreeMap<>();\n this.currentBeatNumber = 0;\n this.highestPitchValue = 0;\n this.lowestPitchValue = 1000;\n // initializes the tempo to\n // 1 million microseconds per beat, 1 beat per second\n this.tempo = 1000000;\n }", "public DataModel()\r\n {\r\n System.out.println(\"New DataModel created\");\r\n \r\n languageList = new LanguageList();\r\n }", "public OpenGLModel() {\n\n\n\t}", "void initData() {\r\n\t\tthis.daVinci = new Artist(\"da Vinci\");\r\n\t\tthis.mona = new Painting(daVinci, \"Mona Lisa\");\r\n\t\t//this.lastSupper = new Painting(this.daVinci, \"Last Supper\");\r\n\t}", "public static QuinzicalModel createInstance() throws Exception {\n\t\tif (instance == null) {\n\t\t\tinstance = new QuinzicalModel();\n\t\t}\n\t\treturn instance;\n\t}", "public Model() {\n\t\tbucket = new bucket[14];\n\t\tlisteners = new ArrayList<ChangeListener>();\n\n\t\ta = new player(true, 1);\n\t\tb = new player(false, 2);\n\n\t\tfor (int x = 0; x < 14; x++) {\n\t\t\tif (x == 0 || x == 7) {\n\t\t\t\tbucket[x] = new bucket(x, 0);\n\t\t\t} else {\n\t\t\t\tbucket[x] = new bucket(x, 0);\n\t\t\t}\n\t\t}\n\t}", "private void initializeModel() {\n\t\t\n\t}", "public MusicModel() {\n this(90000);\n }", "@Override\r\n protected void initModel() {\n model = new Sphere(\"projectil Model\", 5, 5, 0.2f);\r\n model.setModelBound(new BoundingBox());\r\n model.updateModelBound();\r\n }", "public void prepareModel() {\n //Since many models have different scale amplitudes, we calculate a uniform scale factor for the model\n setScaleFactor();\n //Since the 3ds file does not provide normal values, we must calculate them ourselves\n calculateNormals();\n //Finally we need to setup the buffers for drawing\n setupBuffers();\n }", "private void prepare()\n {\n addObject(new TempoLimite(), 432, 207);\n addObject(new NumeroVidas(), 395, 278);\n\n Cliqueparajogar clique = new Cliqueparajogar();\n addObject(clique, getWidth()/2, getHeight()/2);\n\n Som som = new Som();\n addObject(som, getWidth() - 37, getHeight()-57);\n \n umMin ummin = new umMin();\n addObject(ummin,630,206);\n\n doisMin doismin = new doisMin();\n addObject(doismin,670,206);\n \n tresMin tresmin = new tresMin();\n addObject(tresmin,710,206);\n \n quatroMin quatromin = new quatroMin();\n addObject(quatromin,750,206);\n \n cincoMin cincomin = new cincoMin();\n addObject(cincomin,790,206);\n \n umaVida umavida = new umaVida();\n addObject(umavida,630,280);\n \n duasVidas duasvidas = new duasVidas();\n addObject(duasvidas,670,280);\n \n tresVidas tresvidas = new tresVidas();\n addObject(tresvidas,710,280);\n \n quatroVidas quatrovidas = new quatroVidas();\n addObject(quatrovidas,750,280);\n \n cincoVidas cincovidas = new cincoVidas();\n addObject(cincovidas,790,280);\n \n voltaratras voltar = new voltaratras();\n addObject(voltar, getWidth() -37, 428);\n }", "private void initializeModel() {\n\t\tmodel = new Model();\n\n\t\t// load up playersave\n\t\ttry {\n\t\t\tFileInputStream save = new FileInputStream(\"playersave.ser\");\n\t\t\tObjectInputStream in = new ObjectInputStream(save);\n\t\t\tmodel = ((Model) in.readObject());\n\t\t\tin.close();\n\t\t\tsave.close();\n\t\t\tSystem.out.println(\"playersave found. Loading file...\");\n\t\t}catch(IOException i) {\n\t\t\t//i.printStackTrace();\n\t\t\tSystem.out.println(\"playersave file not found, starting new game\");\n\t\t}catch(ClassNotFoundException c) {\n\t\t\tSystem.out.println(\"playersave not found\");\n\t\t\tc.printStackTrace();\n\t\t}\n\t\t\n\t\t// load up customlevels\n\t\ttry {\n\t\t\tFileInputStream fileIn = new FileInputStream(\"buildersave.ser\");\n\t\t\tObjectInputStream in = new ObjectInputStream(fileIn);\n\t\t\tmodel.importCustomLevels(((ArrayList<LevelModel>) in.readObject()));\n\t\t\tin.close();\n\t\t\tfileIn.close();\n\t\t\tSystem.out.println(\"Builder ArrayList<LevelModel> found. Loading file...\");\n\t\t}catch(IOException i) {\n\t\t\t//i.printStackTrace();\n\t\t\tSystem.out.println(\"Builder ArrayList<LevelModel> file not found, starting new game\");\n\t\t\treturn;\n\t\t}catch(ClassNotFoundException c) {\n\t\t\tSystem.out.println(\"Builder ArrayList<LevelModel> not found\");\n\t\t\tc.printStackTrace();\n\t\t\treturn;\n\t\t}\n\t}", "public Quiz() {\n\t\tcreateAndLayoutComponents();\n\n\t\t// stretch spelling on words to let 2nd language learners have more time to process an unfamiliar language\n\t\ttheVoiceStretch = 1.2;\n\t\ttheVoicePitch = 95;\n\t\ttheVoiceRange = 15;\n\n\t\t// initialise voice generator for VoxSpell\n\t\tvoiceGen = new VoiceGenerator(theVoice,theVoiceStretch,theVoicePitch,theVoiceRange);\n\n\t\t// initialise voice generator for the respell button\n\t\trespellGen = new VoiceGenerator(theVoice,theVoiceStretch,theVoicePitch,theVoiceRange);\n\t\t// immediately cancel it to allow the respell button to work on the first try to only work when \n\t\t// none of the voice generators are in action\n\t\trespellGen.cancel(true); \n\n\n\t\t// enable input accepting when enter button is pressed\n\t\tuserInput.addKeyListener(this);\n\t\tthis.setFocusable(true);\n\t\tthis.addKeyListener(this);\n\n\t\tapplyTheme();\n\t\t\n\t\t// Initialise spellList model which all questions will be asked from and answers will be checked against\n\t\tspellList = new SpellList();\n\t}", "public Model(DataHandler data){\n //assign the data parameter to the instance\n //level variable data. The scope of the parameter\n //is within the method and that is where the JVM \n //looks first for a variable or parameter so we \n //need to specify that the instance level variable \n //is to be used by using the keyword 'this' followed \n //by the '.' operator.\n this.data = data;\n }", "public void initModel() {\r\n this.stateEngine = new RocketStateEngine();\r\n }", "public Data() {\n initComponents();\n koneksi_db();\n tampil_data();\n }", "public Model() {\r\n// waiting_games = new ArrayList<>();\r\n// full_games = new ArrayList<>();\r\n games = new ArrayList<>();\r\n }", "public void initModel() {\n gunControl.initSmoke();\n }", "public Quarter() { // note: null fields exist for this option\n courses = new ArrayList<Course>();\n }", "public GameModel(){\n try {\n //System.out.println(\"Assuming dictionary file is with .jar or in bin/\");\n this.phraseBook = GameDictionaryReader.readDictionary(getRootDictionary());\n } catch (FileNotFoundException e){\n System.out.println(\"ERROR: Dictionary could not be found!\");\n System.exit(1);\n }\n }", "public MusicSheet() {\n Log.w(TAG,\"empty constructor\");\n // vertexArray = new VertexArray(VERTEX_DATA);\n }", "private ModelImpl(int tempo) {\n if (tempo < 50000 || tempo > 250000) {\n throw new IllegalArgumentException(\"Invalid tempo.\");\n }\n this.tempo = tempo;\n this.currentMeasure = DEFAULT_START;\n this.status = Status.Playing;\n this.low = new Note(1, 8, 0, Note.Pitches.C, true, 0, 1);\n this.high = new Note(1, 0, 0, Note.Pitches.A, true, 0, 1);\n this.sheet = new ArrayList<Set<Note>>();\n }", "public WERecordDataModel()\n\t{\n\t\tsuper();\n\t\tsetEqFileName(RECORD_NAME);\n\t\tinitMessages();\n\t}", "Model() {\r\n this.observers = new ArrayList<Observer>();\r\n\r\n init();\r\n }", "public Model(){\r\n try{\r\n File file = new File(\"./config.ini\");\r\n boolean firstRun = file.createNewFile();\r\n\r\n //If this is the first run for the application\r\n if (firstRun){\r\n //Ask user the amount of hours he wants to work per day\r\n dailyWorkload = Integer.parseInt(JOptionPane.showInputDialog(\"Enter number of hours you want to work per day\"));\r\n numDayWorkWeek = Integer.parseInt(JOptionPane.showInputDialog(\"Enter number of days you want to work per week\"));\r\n\r\n //Allocate memory for data structures\r\n unfinished = new TreeSet<>();\r\n finished = new ArrayList<>();\r\n activities = new ArrayList<>();\r\n\r\n FileWriter fw = new FileWriter(file);\r\n PrintWriter pw = new PrintWriter(fw);\r\n\r\n pw.println(dailyWorkload);\r\n pw.println(numDayWorkWeek);\r\n pw.close();\r\n fw.close();\r\n\r\n weeklySchedule = new ArrayList<>(numDayWorkWeek);\r\n for (int i = 0; i < numDayWorkWeek; i++)\r\n weeklySchedule.add(new TreeSet<Task>());\r\n }\r\n //Else if this is not the first run of the application\r\n else{\r\n FileReader fr = new FileReader(file);\r\n BufferedReader br = new BufferedReader(fr);\r\n dailyWorkload = Integer.parseInt(br.readLine());\r\n numDayWorkWeek = Integer.parseInt(br.readLine());\r\n br.close();\r\n fr.close();\r\n\r\n weeklySchedule = new ArrayList<>(numDayWorkWeek);\r\n for (int i = 0; i < numDayWorkWeek; i++)\r\n weeklySchedule.add(new TreeSet<Task>());\r\n loadFromDatabase();\r\n }\r\n\r\n }\r\n catch (Exception e){\r\n System.out.println(\"Stress is constructor: \" + e.getMessage());\r\n }\r\n }", "public RJGUIModel () {\n\t}", "private MainModel() {\n jsonManager = new JsonManager(this);\n }", "public MainModel(String levelname) {\r\n LevelData level = LevelData.parseLevelFromName(levelname);\r\n\r\n this.history = new ModelHistory(levelname);\r\n\r\n this.jumper = new Jumper(level.getPlayerPosition());\r\n\r\n this.blocks = new ArrayList<>();\r\n for (Quad quad : level.getQuadData()) {\r\n blocks.add(Block.fromQuad(quad, BlockType.STICKY));\r\n }\r\n blocks.add(Block.fromQuad(level.getFinishQuad(), BlockType.FINISH));\r\n\r\n }", "private void initializeGameModel() {\n mGameModel = new GameModel();\n mGameModel.setId(mGameWaitModel.getId());\n mGameModel.setGameMaster(getPlayerModel(true));\n mGameModel.setGameSlave(getPlayerModel(false));\n mGameModel.setGenerateNewQuestion(true);\n mGameModel.setDidGameEnd(false);\n LOGD(TAG, \"Game Model initialized\");\n }", "protected void initModel() throws CommandLineFormatException, NullCoordinateException\n\t{\n\t\t\n\t\tfinal Var vdt = command.get(CNFTCommandLine.DT); //default dt\n\t\t\n\t\tcortical = new NeighborhoodMap(CORTICAL, \n\t\t\t\tnew SomUM(inputSpace, vdt, extendedFramedSpace)){\n\t\t\tpublic void compute() throws NullCoordinateException{\n\t\t\t\tsuper.compute();\n\t\t\t\tpotential.resetState();\n\t\t\t}\n\t\t};\n\t\t\n\t\t\n\t\tpotential = getPotential(vdt);\n\t\t\n\t\t\n\t\tcortical.addParameters(input,potential,command.get(CNFTCommandLine.LEARNING_RATE));\n\t\tNeighborhood neigh = new V4Neighborhood2D( extendedFramedSpace, new UnitLeaf((UnitParameter) cortical));\n\t\tneigh.setNullUnit(new ConstantUnit(new Var(0)));\n\t\t((NeighborhoodMap)cortical).addNeighboors(neigh);\n\t\t\n\t\t\n\t\tthis.root = cortical;\n\t\t\n\t\tcorticalPot = new Map(CORTICAL_POT, new Sum(vdt, extendedFramedSpace, new Leaf(cortical)));\n\t\tthis.addParameters(corticalPot);\n\t\t\n\t\t\n\n\t}", "public pr3s1()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1280, 720, 1); \n prepare();\n }", "public Model() {\r\n\t\t\tsuper();\r\n\t\t\tdao=new SerieADAO();\r\n\t\t\tthis.mapSeason=new HashMap<>();\r\n\t\t\tthis.mapTeam=new HashMap<>();\r\n\t\t\tthis.mapTeamBySeason=new HashMap<>();\r\n\t\t\tthis.mapMatch=new HashMap<>();\r\n\t\t\tthis.mapMatchBySeason=new HashMap<>();\r\n\r\n\t\r\n\t\t}", "public Model() {\n\t}", "public Model() {\n\t}", "public final void initialize()\n {\n x3dModel = new X3DObject().setProfile(\"Immersive\").setVersion(\"3.3\")\n .setHead(new headObject()\n .addComponent(new componentObject().setName(\"Navigation\").setLevel(3))\n .addUnit(new unitObject().setName(\"AngleUnitConversion\").setConversionFactor(1.0).setCategory(\"angle\"))\n .addUnit(new unitObject().setName(\"LengthUnitConversion\").setConversionFactor(1.0).setCategory(\"length\"))\n .addMeta(new metaObject().setName(\"title\").setContent(\"HelloWorldProgramOutput.x3d\"))\n .addMeta(new metaObject().setName(\"description\").setContent(\"Example HelloWorldProgram creates an X3D model using the X3D Java Scene Access Interface (SAI) Library\"))\n .addMeta(new metaObject().setName(\"reference\").setContent(\"http://www.web3d.org/specifications/java/X3DJSAIL.html\"))\n .addMeta(new metaObject().setName(\"generator\").setContent(\"HelloWorldProgramOutput.java\"))\n .addMeta(new metaObject().setName(\"created\").setContent(\"6 September 2016\"))\n .addMeta(new metaObject().setName(\"modified\").setContent(\"29 May 2017\"))\n .addMeta(new metaObject().setName(\"generator\").setContent(\"X3D Java Scene Access Interface Library (X3DJSAIL)\"))\n .addMeta(new metaObject().setName(\"generator\").setContent(\"http://www.web3d.org/specifications/java/examples/HelloWorldProgram.java\"))\n .addMeta(new metaObject().setName(\"generator\").setContent(\"Netbeans http://www.netbeans.org\"))\n .addMeta(new metaObject().setName(\"creator\").setContent(\"Don Brutzman\"))\n .addMeta(new metaObject().setName(\"reference\").setContent(\"https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/java/examples/HelloWorldProgramOutput.x3d\"))\n .addMeta(new metaObject().setName(\"reference\").setContent(\"Console output, ClassicVRML encoding, VRML97 encoding and pretty-print documentation:\"))\n .addMeta(new metaObject().setName(\"reference\").setContent(\"HelloWorldProgramOutput.txt\"))\n .addMeta(new metaObject().setName(\"reference\").setContent(\"HelloWorldProgramOutput.x3dv\"))\n .addMeta(new metaObject().setName(\"reference\").setContent(\"HelloWorldProgramOutput.wrl\"))\n .addMeta(new metaObject().setName(\"reference\").setContent(\"HelloWorldProgramOutput.html\"))\n .addMeta(new metaObject().setName(\"X3dValidator\").setContent(\"https://savage.nps.edu/X3dValidator?url=http://www.web3d.org/specifications/java/examples/HelloWorldProgramOutput.x3d\"))\n .addMeta(new metaObject().setName(\"identifier\").setContent(\"http://www.web3d.org/specifications/java/examples/HelloWorldProgramOutput.x3d\"))\n .addMeta(new metaObject().setName(\"license\").setContent(\"../license.html\"))\n .addMeta(new metaObject().setName(\"SpecialTest\").setContent(\"tested sat: name value cannot contain embedded space character\"))\n .addComments(\" comment #1 \")\n .addComments(\" comment #2 \")\n .addComments(\" comment #3 \")\n .addComments(\" comment #4 \"))\n .setScene(new SceneObject()\n .addChild(new ViewpointGroupObject().setDescription(\"Available viewpoints\")\n .addChild(new ViewpointObject(\"DefaultView\").setDescription(\"Hello X3DJSAIL\"))\n .addChild(new ViewpointObject(\"TopDownView\").setDescription(\"top-down view from above\").setPosition(0.0f,100.0f,0.0f).setOrientation(1.0f,0.0f,0.0f,-1.570796f)))\n .addChild(new WorldInfoObject(\"WorldInfoDEF\").setTitle(\"HelloWorldProgram produced by X3D Java SAI Library (X3DJSAIL)\"))\n .addChild(new WorldInfoObject().setUSE(\"WorldInfoDEF\"))\n .addChild(new WorldInfoObject().setUSE(\"WorldInfoDEF\"))\n .addMetadata(new MetadataStringObject(\"scene.addChildMetadataObject\").setName(\"test\"))\n .addChild(new LayerSetObject(\"scene.addChildLayerSetObjectTest\"))\n .addChild(new TransformObject(\"LogoGeometryTransform\").setTranslation(0.0f,1.5f,0.0f)\n .addChild(new AnchorObject().setDescription(\"select for X3D Java SAI Library (X3DJSAIL) description\").setUrl(new MFStringObject(\"\\\"../X3DJSAIL.html\\\" \\\"http://www.web3d.org/specifications/java/X3DJSAIL.html\\\"\"))\n .addChild(new ShapeObject(\"BoxShape\")\n .setAppearance(new AppearanceObject()\n .setMaterial(new MaterialObject(\"GreenMaterial\").setDiffuseColor(0.0f,1.0f,1.0f).setTransparency(0.1f).setEmissiveColor(0.8f,0.0f,0.0f))\n .setTexture(new ImageTextureObject().setUrl(new MFStringObject(\"\\\"images/X3dJavaSceneAccessInterfaceSaiLibrary.png\\\" \\\"http://www.web3d.org/specifications/java/examples/images/X3dJavaSceneAccessInterfaceSaiLibrary.png\\\"\"))))\n .setGeometry(new BoxObject(\"test-NMTOKEN_regex.0123456789\").setCssClass(\"textured\")))))\n .addChild(new ShapeObject(\"LineShape\")\n .setAppearance(new AppearanceObject()\n .setMaterial(new MaterialObject().setEmissiveColor(0.6f,0.19607843f,0.8f)))\n .setGeometry(new IndexedLineSetObject().setCoordIndex(new int[] {0,1,2,3,4,0})\n .setCoord(new CoordinateObject().setPoint(new MFVec3fObject(new float[] {0.0f,1.5f,0.0f,2.0f,1.5f,0.0f,2.0f,1.5f,-2.0f,-2.0f,1.5f,-2.0f,-2.0f,1.5f,0.0f,0.0f,1.5f,0.0f})))))\n .addChild(new PositionInterpolatorObject(\"BoxPathAnimator\").setKey(new float[] {0.0f,0.125f,0.375f,0.625f,0.875f,1.0f}).setKeyValue(new MFVec3fObject(new float[] {0.0f,1.5f,0.0f,2.0f,1.5f,0.0f,2.0f,1.5f,-2.0f,-2.0f,1.5f,-2.0f,-2.0f,1.5f,0.0f,0.0f,1.5f,0.0f})))\n .addChild(new TimeSensorObject(\"OrbitClock\").setCycleInterval(8.0).setLoop(true))\n .addChild(new ROUTEObject().setFromNode(\"OrbitClock\").setFromField(\"fraction_changed\").setToNode(\"BoxPathAnimator\").setToField(\"set_fraction\"))\n .addChild(new ROUTEObject().setFromNode(\"BoxPathAnimator\").setFromField(\"value_changed\").setToNode(\"LogoGeometryTransform\").setToField(\"set_translation\"))\n .addChild(new TransformObject(\"TextTransform\").setTranslation(0.0f,-1.5f,0.0f)\n .addChild(new ShapeObject()\n .setAppearance(new AppearanceObject()\n .setMaterial(new MaterialObject().setUSE(\"GreenMaterial\")))\n .setGeometry(new TextObject().setString(new MFStringObject(\"\\\"X3D Java\\\" \\\"SAI Library\\\" \\\"X3DJSAIL\\\"\"))\n .setMetadata(new MetadataSetObject().setName(\"EscapedQuotationMarksMetadataSet\")\n .addValue(new MetadataStringObject().setName(\"escapedQuotesTest1\").setValue(new MFStringObject(\"\\\"escaped quotation marks example 1: He said, \\\\\\\"Immel did it!\\\\\\\"\\\"\")))\n .addValue(new MetadataStringObject().setName(\"escapedQuotesTest2\").setValue(new MFStringObject(\"\\\"escaped quotation marks example 2: He said, &quot;Immel did it!&quot;\\\"\"))))\n .setFontStyle(new FontStyleObject().setJustify(new MFStringObject(\"\\\"MIDDLE\\\" \\\"MIDDLE\\\"\")))\n .addComments(\" escaped quotation marks example 3: He said, \\\"Immel did it!\\\" \")\n .addComments(\" escaped quotation marks example 4: He said, &quot;Immel did it!&quot; \")))\n .addChild(new CollisionObject()\n .addComments(\" test containerField='proxy' \")\n .setProxy(new ShapeObject(\"ProxyShape\")\n .setGeometry(new TextObject().setString(new MFStringObject(\"\\\"One, Two, Three\\\" \\\"\\\" \\\"He said, \\\\\\\"Immel did it!\\\\\\\"\\\"\")))\n .addComments(\" alternative XML encoding: Text string='\\\"One, Two, Three\\\" \\\"\\\" \\\"He said, \\\\&quot;Immel did it!\\\\&quot;\\\"' \")\n .addComments(\" alternative Java source: .setString(new String [] {\\\"One, Two, Three\\\", \\\"\\\", \\\"He said, \\\\\\\"Immel did it!\\\\\\\"\\\"}) \")\n .addComments(\" reference: http://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/StringArrayEncodingExamplesIndex.html \")))\n .addComments(\" It's a beautiful world \")\n .addComments(\" ... for you! \")\n .addComments(\" https://en.wikipedia.org/wiki/Beautiful_World_(Devo_song) \"))\n .addComments(\" repeatedly spin 180 degrees as a readable special effect \")\n .addChild(new OrientationInterpolatorObject(\"SpinInterpolator\").setKey(new float[] {0.0f,0.5f,1.0f}).setKeyValue(new MFRotationObject(new float[] {0.0f,1.0f,0.0f,4.712389f,0.0f,1.0f,0.0f,0.0f,0.0f,1.0f,0.0f,1.5707964f})))\n .addChild(new TimeSensorObject(\"SpinClock\").setCycleInterval(5.0).setLoop(true))\n .addChild(new ROUTEObject().setFromNode(\"SpinClock\").setFromField(\"fraction_changed\").setToNode(\"SpinInterpolator\").setToField(\"set_fraction\"))\n .addChild(new ROUTEObject().setFromNode(\"SpinInterpolator\").setFromField(\"value_changed\").setToNode(\"TextTransform\").setToField(\"rotation\"))\n .addChild(new GroupObject(\"BackgroundGroup\")\n .addChild(new BackgroundObject(\"GradualBackground\"))\n .addChild(new ScriptObject(\"colorTypeConversionScript\").setSourceCode(\n\"<![CDATA[\" + \"\\n\" +\n\"\\n\" + \n\"\\n\" + \n\"ecmascript:\" + \"\\n\" + \n\"\\n\" + \n\"function colorInput (eventValue) // Example source code\" + \"\\n\" + \n\"{\" + \"\\n\" + \n\" colorsOutput = new MFColor(eventValue); // assigning value sends output event\" + \"\\n\" + \n\"// Browser.print('colorInput=' + eventValue + ', colorsOutput=' + colorsOutput + '\\\\n');\" + \"\\n\" + \n\"}\" + \"\\n\" + \"]]>\"\n)\n .addField(new fieldObject().setAccessType(\"inputOnly\").setName(\"colorInput\").setType(\"SFColor\"))\n .addField(new fieldObject().setAccessType(\"outputOnly\").setName(\"colorsOutput\").setType(\"MFColor\")))\n .addChild(new ColorInterpolatorObject(\"ColorAnimator\").setKey(new float[] {0.0f,0.5f,1.0f}).setKeyValue(new MFColorObject(new float[] {0.9411765f,1.0f,1.0f,0.29411766f,0.0f,0.50980395f,0.9411765f,1.0f,1.0f}))\n .addComments(\" AZURE to INDIGO and back again \"))\n .addChild(new TimeSensorObject(\"ColorClock\").setCycleInterval(60.0).setLoop(true))\n .addChild(new ROUTEObject().setFromNode(\"colorTypeConversionScript\").setFromField(\"colorsOutput\").setToNode(\"GradualBackground\").setToField(\"skyColor\"))\n .addChild(new ROUTEObject().setFromNode(\"ColorAnimator\").setFromField(\"value_changed\").setToNode(\"colorTypeConversionScript\").setToField(\"colorInput\"))\n .addChild(new ROUTEObject().setFromNode(\"ColorClock\").setFromField(\"fraction_changed\").setToNode(\"ColorAnimator\").setToField(\"set_fraction\")))\n .addChild(new ProtoDeclareObject().setName(\"ArtDeco01Material\").setAppinfo(\"tooltip: ArtDeco01 prototype is a Material node\")\n .setProtoInterface(new ProtoInterfaceObject()\n .addField(new fieldObject().setAccessType(\"inputOutput\").setName(\"description\").setType(\"SFString\").setValue(\"ArtDeco01 prototype is a Material node\").setAppinfo(\"tooltip for descriptionField\"))\n .addField(new fieldObject().setAccessType(\"inputOutput\").setName(\"enabled\").setType(\"SFBool\").setValue(\"true\")))\n .setProtoBody(new ProtoBodyObject()\n .addComments(\" Initial node of ProtoBody determines prototype node type \")\n .addChild(new MaterialObject().setShininess(0.127273f).setAmbientIntensity(0.25f).setSpecularColor(0.276305f,0.11431f,0.139857f).setDiffuseColor(0.282435f,0.085159f,0.134462f))\n .addComments(\" [HelloWorldProgram diagnostic] should be connected to scene graph: ArtDeco01ProtoDeclare.getNodeType()=\\\"Material\\\" \")\n .addComments(\" presence of follow-on TouchSensor shows that additional nodes are allowed in ProtoBody after initial node, regardless of node types \")\n .addChild(new TouchSensorObject().setDescription(\"within ProtoBody\")\n .setIS(new ISObject()\n .addConnect(new connectObject().setNodeField(\"description\").setProtoField(\"description\"))\n .addConnect(new connectObject().setNodeField(\"enabled\").setProtoField(\"enabled\"))))))\n .addChild(new ExternProtoDeclareObject().setName(\"ArtDeco02Material\").setAppinfo(\"this is a different Material node\").setUrl(new MFStringObject(\"\\\"http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter14Prototypes/ArtDecoPrototypesExcerpt.x3d#ArtDeco02\\\" \\\"http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter14Prototypes/ArtDecoPrototypesExcerpt.x3dv#ArtDeco02\\\"\"))\n .addField(new fieldObject().setAccessType(\"inputOutput\").setName(\"description\").setType(\"SFString\").setAppinfo(\"tooltip for descriptionField\"))\n .addComments(\" [HelloWorldProgram diagnostic] ArtDeco02ExternProtoDeclare.getNodeType()=\\\"ERROR_UNKNOWN_EXTERNPROTODECLARE_NODE_TYPE: ExternProtoDeclare name='ArtDeco02Material' type cannot be remotely accessed at run time, TODO X3DJSAIL needs to add further capability.\\\" \"))\n .addComments(\" Tested ArtDeco01ProtoInstance, ArtDeco02ProtoInstance for improper node type when ProtoInstance is added in wrong place \")\n .addChild(new ShapeObject(\"TestShape1\")\n .setAppearance(new AppearanceObject(\"TestAppearance1\")\n .setMaterial(new ProtoInstanceObject().setName(\"ArtDeco01\")\n .addFieldValue(new fieldValueObject().setName(\"description\").setValue(\"ArtDeco01 can substitute for a Material node\"))\n .addComments(\" [HelloWorldProgram diagnostic] ArtDeco01ProtoInstance.getNodeType()=\\\"ERROR_UNKNOWN_PROTOINSTANCE_NODE_TYPE: ProtoInstance name='ArtDeco01' has no corresponding ProtoDeclareObject or ExternProtoDeclareObject to provide type.\\\" \"))\n .addComments(\" ArtDeco01 Material prototype goes here... \"))\n .setGeometry(new SphereObject().setRadius(0.001f)))\n .addChild(new ShapeObject(\"TestShape2\")\n .setAppearance(new AppearanceObject(\"TestAppearance2\")\n .setMaterial(new ProtoInstanceObject().setName(\"ArtDeco02\")\n .addFieldValue(new fieldValueObject().setName(\"description\").setValue(\"ArtDeco02 can substitute for another Material node\"))\n .addComments(\" [HelloWorldProgram diagnostic] ArtDeco02ProtoInstance.getNodeType()=\\\"ERROR_UNKNOWN_PROTOINSTANCE_NODE_TYPE: ProtoInstance name='ArtDeco02' has no corresponding ProtoDeclareObject or ExternProtoDeclareObject to provide type.\\\" \"))\n .addComments(\" ArtDeco02 Material prototype goes here... \"))\n .setGeometry(new ConeObject().setBottomRadius(0.001f).setHeight(0.001f)))\n .addChild(new InlineObject(\"inlineSceneDef\").setUrl(new MFStringObject(\"\\\"someOtherScene.x3d\\\"\")))\n .addChild(new IMPORTObject().setImportedDEF(\"WorldInfoDEF\").setInlineDEF(\"inlineSceneDef\").setAS(\"WorldInfoDEF2\"))\n .addChild(new EXPORTObject().setLocalDEF(\"WorldInfoDEF\").setAS(\"WorldInfoDEF3\"))\n .addChild(new ProtoDeclareObject().setName(\"MaterialModulator\").setAppinfo(\"mimic a Material node and modulate fields as an animation effect\").setDocumentation(\"http://x3dgraphics.com/examples/X3dForWebAuthors/Chapter14Prototypes/MaterialModulatorIndex.html\")\n .setProtoInterface(new ProtoInterfaceObject()\n .addField(new fieldObject().setAccessType(\"inputOutput\").setName(\"enabled\").setType(\"SFBool\").setValue(\"true\"))\n .addField(new fieldObject().setAccessType(\"inputOutput\").setName(\"diffuseColor\").setType(\"SFColor\").setValue(\"0 0 0\"))\n .addField(new fieldObject().setAccessType(\"inputOutput\").setName(\"emissiveColor\").setType(\"SFColor\").setValue(\"0.05 0.05 0.5\"))\n .addField(new fieldObject().setAccessType(\"inputOutput\").setName(\"specularColor\").setType(\"SFColor\").setValue(\"0 0 0\"))\n .addField(new fieldObject().setAccessType(\"inputOutput\").setName(\"transparency\").setType(\"SFFloat\").setValue(\"0.0\"))\n .addField(new fieldObject().setAccessType(\"inputOutput\").setName(\"shininess\").setType(\"SFFloat\").setValue(\"0.0\"))\n .addField(new fieldObject().setAccessType(\"inputOutput\").setName(\"ambientIntensity\").setType(\"SFFloat\").setValue(\"0.0\")))\n .setProtoBody(new ProtoBodyObject()\n .addChild(new MaterialObject(\"MaterialNode\")\n .setIS(new ISObject()\n .addConnect(new connectObject().setNodeField(\"diffuseColor\").setProtoField(\"diffuseColor\"))\n .addConnect(new connectObject().setNodeField(\"emissiveColor\").setProtoField(\"emissiveColor\"))\n .addConnect(new connectObject().setNodeField(\"specularColor\").setProtoField(\"specularColor\"))\n .addConnect(new connectObject().setNodeField(\"transparency\").setProtoField(\"transparency\"))\n .addConnect(new connectObject().setNodeField(\"shininess\").setProtoField(\"shininess\"))\n .addConnect(new connectObject().setNodeField(\"ambientIntensity\").setProtoField(\"ambientIntensity\"))))\n .addComments(\" Only first node (the node type) is renderable, others are along for the ride \")\n .addChild(new ScriptObject(\"MaterialModulatorScript\").setSourceCode(\n\"<![CDATA[\" + \"\\n\" +\n\"\\n\" + \n\"\\n\" + \n\"ecmascript:\" + \"\\n\" + \n\"function initialize ()\" + \"\\n\" + \n\"{\" + \"\\n\" + \n\" newColor = diffuseColor; // start with correct color\" + \"\\n\" + \n\"}\" + \"\\n\" + \n\"function set_enabled (newValue)\" + \"\\n\" + \n\"{\" + \"\\n\" + \n\"\tenabled = newValue;\" + \"\\n\" + \n\"}\" + \"\\n\" + \n\"function clockTrigger (timeValue)\" + \"\\n\" + \n\"{\" + \"\\n\" + \n\" if (!enabled) return;\" + \"\\n\" + \n\" red = newColor.r;\" + \"\\n\" + \n\" green = newColor.g;\" + \"\\n\" + \n\" blue = newColor.b;\" + \"\\n\" + \n\" \" + \"\\n\" + \n\" // note different modulation rates for each color component, % is modulus operator\" + \"\\n\" + \n\" newColor = new SFColor ((red + 0.02) % 1, (green + 0.03) % 1, (blue + 0.04) % 1);\" + \"\\n\" + \n\"\tif (enabled)\" + \"\\n\" + \n\"\t{\" + \"\\n\" + \n\"\t\tBrowser.print ('diffuseColor=(' + red + ',' + green + ',' + blue + ') newColor=' + newColor.toString() + '\\\\n');\" + \"\\n\" + \n\"\t}\" + \"\\n\" + \n\"}\" + \"\\n\" + \"]]>\"\n)\n .addField(new fieldObject().setAccessType(\"inputOutput\").setName(\"enabled\").setType(\"SFBool\"))\n .addField(new fieldObject().setAccessType(\"inputOutput\").setName(\"diffuseColor\").setType(\"SFColor\"))\n .addField(new fieldObject().setAccessType(\"outputOnly\").setName(\"newColor\").setType(\"SFColor\"))\n .addField(new fieldObject().setAccessType(\"inputOnly\").setName(\"clockTrigger\").setType(\"SFTime\"))\n .setIS(new ISObject()\n .addConnect(new connectObject().setNodeField(\"enabled\").setProtoField(\"enabled\"))\n .addConnect(new connectObject().setNodeField(\"diffuseColor\").setProtoField(\"diffuseColor\"))))))\n .addComments(\" Test success: declarative statement createDeclarativeShapeTests() \")\n .addChild(new GroupObject(\"DeclarativeGroupExample\")\n .addChild(new ShapeObject()\n .setMetadata(new MetadataStringObject(\"FindableMetadataStringTest\").setName(\"findThisNameValue\").setValue(new MFStringObject(\"\\\"test case\\\"\")))\n .setAppearance(new AppearanceObject(\"DeclarativeAppearanceExample\")\n .setMaterial(new ProtoInstanceObject(\"MyMaterialModulator\", \"MaterialModulator\").setDEF(\"MyMaterialModulator\").setName(\"MaterialModulator\"))\n .addComments(\" DeclarativeMaterialExample gets overridden by subsequently added MaterialModulator ProtoInstance \"))\n .setGeometry(new ConeObject().setBottomRadius(0.05f).setHeight(0.1f).setBottom(false)))\n .addComments(\" Test success: declarativeGroup.addChild() singleton pipeline method \"))\n .addComments(\" Test success: declarative statement addChild() \")\n .addComments(new String[] {\" Test success: x3dModel.findNodeByDEF(DeclarativeAppearanceExample) = <Appearance DEF='DeclarativeAppearanceExample'/> i.e.\",\n\"<Appearance DEF='DeclarativeAppearanceExample'>\",\n\" <ProtoInstance DEF='MyMaterialModulator' name='MaterialModulator' containerField='material'/>\",\n\" <!- - DeclarativeMaterialExample gets overridden by subsequently added MaterialModulator ProtoInstance - ->\",\n\"</Appearance> \"})\n .addComments(\" Test success: x3dModel.findElementByNameValue(findThisNameValue) = <MetadataString DEF='FindableMetadataStringTest' name='findThisNameValue' value='\\\"test case\\\"'/> \")\n .addComments(\" Test success: x3dModel.findElementByNameValue(\\\"ArtDeco01Material\\\", \\\"ProtoDeclare\\\") found \")\n .addComments(\" Test success: x3dModel.findElementByNameValue(\\\"MaterialModulator\\\", \\\"ProtoDeclare\\\") found \")\n .addComments(\" Test success: x3dModel.findElementByNameValue(\\\"MaterialModulator\\\", \\\"ProtoInstance\\\") found \")\n .addChild(new GroupObject(\"TestFieldObjectsGroup\")\n .addComments(\" testFieldObjects() results \")\n .addComments(\" SFBool default=true, true=true, false=false, negate()=true \")\n .addComments(\" MFBool default=, initial=true false true, negate()=false true false \")\n .addComments(\" SFFloat default=0.0, initial=1.0, setValue(2)=2.0, setValue(3.0f)=3.0, setValue(4.0)=4.0 \")\n .addComments(\" MFFloat default=, initial=1 2 3, append(5)=1 2 3 5, inserts(3,4)(0,0)=0 1 2 3 4 5, append(6)=0 1 2 3 4 5 6, size()=7 \")\n .addComments(\" ... get1Value[3]=3.0, remove[1]=0 2 3 4 5 6, set1Value(0,10)=10 2 3 4 5 6, multiply(2)=20 4 6 8 10 12, clear= \")\n .addComments(\" SFVec3f default=0 0 0, initial=1 2 3, setValue=4 5 6, multiply(2)=8 10 12, normalize()=0.45584232 0.5698029 0.68376344 \"))\n .addChild(new SoundObject()\n .setSource(new AudioClipObject().setUrl(new MFStringObject(\"\\\"chimes.wav\\\" \\\"http://www.web3d.org/x3d/content/examples/ConformanceNist/Sounds/AudioClip/chimes.wav\\\"\")))\n .addComments(\" Scene example fragment from http://www.web3d.org/x3d/content/examples/ConformanceNist/Sounds/AudioClip/default.x3d \"))\n .addChild(new SoundObject()\n .setSource(new MovieTextureObject().setUrl(new MFStringObject(\"\\\"mpgsys.mpg\\\" \\\"http://www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/MovieTexture/mpgsys.mpg\\\"\")))\n .addComments(\" Scene example fragment from http://www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/MovieTexture/mpeg1-systems.x3d \")\n .addComments(\" Expected containerField='source', allowed containerField values=\\\"texture\\\" \\\"source\\\" \\\"back\\\" \\\"bottom\\\" \\\"front\\\" \\\"left\\\" \\\"right\\\" \\\"top\\\" \\\"backTexture\\\" \\\"bottomTexture\\\" \\\"frontTexture\\\" \\\"leftTexture\\\" \\\"rightTexture\\\" \\\"topTexture\\\" \")));\n }", "public ModelData(CallBackInterface _myContainer, String filename) {\n\t\tthis(_myContainer);\n\t\tload(filename);\n\t}", "private void construct(){\n TriangleMesh mesh;\n\n mesh = ObjImporter.loadMesh(\"data/aufgabe3/bunny.obj\");\n mesh.setMaterial(new MaterialNode(0.1f, 0.1f, .5f, 1));\n mesh.getRenderer().setShadingType(ShadingType.GOURAUD);\n scene.addNode(mesh);\n\n mesh = ObjImporter.loadMesh(\"data/aufgabe3/cube.obj\");\n mesh.addTransformation(new TransformationNode(TransformationType.TRANSLATE, 1, 0, 0));\n scene.addNode(mesh);\n\n mesh = ObjImporter.loadMesh(\"data/aufgabe3/teddy.obj\");\n mesh.addTransformation(new TransformationNode(TransformationType.TRANSLATE, 0, 1, 0));\n mesh.setMaterial(new MaterialNode(0.1f, .5f, 0.1f, 1));\n mesh.getRenderer().setShadingType(ShadingType.GOURAUD);\n scene.addNode(mesh);\n\n mesh = ObjImporter.loadMesh(\"data/aufgabe3/sphere.obj\");\n mesh.addTransformation(new TransformationNode(TransformationType.TRANSLATE, 1, 1, 0));\n mesh.setMaterial(new MaterialNode(1, 0, 0, 1));\n mesh.getRenderer().setShadingType(ShadingType.GOURAUD);\n scene.addNode(mesh);\n\n scene.calculateNormals();\n scene.setupRendering();\n }", "@SideOnly(Side.CLIENT)\n\tpublic void initModel() {\n\t\tModelLoader.setCustomModelResourceLocation(this, 0,\n\t\t\t\tnew ModelResourceLocation(getRegistryName(), \"inventory\"));\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "public DataModel(){\n this.listeners = new ArrayList<>();\n this.data = new ArrayList<>();\n }", "public mainData() {\n }", "public Model() {\n\t \tentranceCarQueue = new CarQueue();\n\t entrancePassQueue = new CarQueue();\n\t paymentCarQueue = new CarQueue();\n\t exitCarQueue = new CarQueue();\n\t abonnementsPlaatsen = abonnementsPlaatsen < 0 ? 0 : abonnementsPlaatsen;\n\t numberOfOpenSpots =numberOfFloors*numberOfRows*numberOfPlaces;\n\t hoeveelheid = abonnementsPlaatsen;\n\t cars = new Car[numberOfFloors][numberOfRows][numberOfPlaces];\n\t \n\t /*\n\t\tguiframe=new JFrame(\"Parkeergarage Simulator\");\n\t\tscreen.setSize(800, 500);\n\t\tscreen.setLayout(null);\n\t \n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t Container Controlpanelview = getContentPane();\n\t Controlpanelview.add(cpview, BorderLayout.CENTER);\n\t Controlpanelview.add(simcontroller, BorderLayout.EAST);\n\t pack();\n\t screen.setVisible(true);\n\t\t\n\t updateViews(); */\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "public IKQuadrupedModel() {\n\t\t/*\n\t\ttextureWidth = 16;\n\t\ttextureHeight = 16;\n\n\t\tbase = new ModelRenderer(this);\n\t\tbase.setRotationPoint(0.0F, 4.6F, 0.0F);\n\t\tbase.setTextureOffset(0, 0).addBox(-4.5F, -4.6F, -4.5F, 9.0F, 24.0F, 9.0F, 0.0F, false);\n\n\t\tnorth = new IKModelRenderer(this);\n\t\tnorth.setRotationPoint(0.0F, 0.4F, -4.5F);\n\t\tbase.addChild(north);\n\t\tnorth.setTextureOffset(0, 0).addBox(-1.5F, -2.0F, -13.0F, 3.0F, 4.0F, 13.0F, 0.0F, false);\n\n\t\tnorth2 = new IKModelRenderer(this);\n\t\tnorth2.setRotationPoint(0.0F, 0.0F, -13.0F);\n\t\tnorth.addChild(north2);\n\t\tnorth2.setTextureOffset(0, 0).addBox(-1.5F, -2.0F, -13.0F, 3.0F, 4.0F, 13.0F, 0.0F, false);\n\n\t\tnorth3 = new IKModelRenderer(this,0,0,-13);\n\t\tnorth3.setRotationPoint(0.0F, 0.0F, -13.0F);\n\t\tnorth2.addChild(north3);\n\t\tnorth3.setTextureOffset(0, 0).addBox(-1.5F, -2.0F, -13.0F, 3.0F, 4.0F, 13.0F, 0.0F, false);\n\n\t\tsouth = new IKModelRenderer(this);\n\t\tsouth.setRotationPoint(0.0F, 0.4F, 4.5F);\n\t\tbase.addChild(south);\n\t\tsouth.setTextureOffset(0, 0).addBox(-1.5F, -2.0F, 0.0F, 3.0F, 4.0F, 13.0F, 0.0F, false);\n\n\t\tsouth2 = new IKModelRenderer(this);\n\t\tsouth2.setRotationPoint(0.0F, 0.0F, 12.5F);\n\t\tsouth.addChild(south2);\n\t\tsouth2.setTextureOffset(0, 0).addBox(-1.5F, -2.0F, 0.5F, 3.0F, 4.0F, 13.0F, 0.0F, false);\n\n\t\tsouth3 = new IKModelRenderer(this,0,0,13);\n\t\tsouth3.setRotationPoint(0.0F, 0.0F, 13.5F);\n\t\tsouth2.addChild(south3);\n\t\tsouth3.setTextureOffset(0, 0).addBox(-1.5F, -2.0F, 0.0F, 3.0F, 4.0F, 13.0F, 0.0F, false);\n\n\t\twest = new IKModelRenderer(this);\n\t\twest.setRotationPoint(4.5F, 0.4F, 0.0F);\n\t\tbase.addChild(west);\n\t\t//setRotationAngle(west, 0.0F, -1.5708F, 0.0F);\n\t\twest.setTextureOffset(0, 0).addBox(-1.5F, -2.0F, -13.0F, 3.0F, 4.0F, 13.0F, 0.0F, false);\n\n\t\twest2 = new IKModelRenderer(this);\n\t\twest2.setRotationPoint(0.0F, 0.0F, -13.0F);\n\t\twest.addChild(west2);\n\t\twest2.setTextureOffset(0, 0).addBox(-1.5F, -2.0F, -13.0F, 3.0F, 4.0F, 13.0F, 0.0F, false);\n\n\t\twest3 = new IKModelRenderer(this,0,0,-13);\n\t\twest3.setRotationPoint(0.0F, 0.0F, -13.0F);\n\t\twest2.addChild(west3);\n\t\twest3.setTextureOffset(0, 0).addBox(-1.5F, -2.0F, -13.0F, 3.0F, 4.0F, 13.0F, 0.0F, false);\n\n\t\teast = new IKModelRenderer(this);\n\t\teast.setRotationPoint(-4.5F, 0.4F, 0.0F);\n\t\tbase.addChild(east);\n\t\t//setRotationAngle(east, 0.0F, -1.5708F, 0.0F);\n\t\teast.setTextureOffset(0, 0).addBox(-1.5F, -2.0F, 0.0F, 3.0F, 4.0F, 13.0F, 0.0F, false);\n\n\t\teast2 = new IKModelRenderer(this);\n\t\teast2.setRotationPoint(0.0F, 0.0F, 13.0F);\n\t\teast.addChild(east2);\n\t\teast2.setTextureOffset(0, 0).addBox(-1.5F, -2.0F, 0.0F, 3.0F, 4.0F, 13.0F, 0.0F, false);\n\n\t\teast3 = new IKModelRenderer(this,0,0,13);\n\t\teast3.setRotationPoint(0.0F, 0.0F, 13.0F);\n\t\teast2.addChild(east3);\n\t\teast3.setTextureOffset(0, 0).addBox(-1.5F, -2.0F, 0.0F, 3.0F, 4.0F, 13.0F, 0.0F, false);\n\t\t*/\n\n\t\ttextureWidth = 128;\n\t\ttextureHeight = 128;\n\n\t\tTorso = new ModelRenderer(this);\n\t\tTorso.setRotationPoint(0.0F, 24.0F, 0.0F);\n\t\tTorso.setTextureOffset(0, 0).addBox(-6.0F, -28.0F, -10.0F, 12.0F, 9.0F, 23.0F, 0.0F, false);\n\n\t\tHead = new ModelRenderer(this);\n\t\tHead.setRotationPoint(0.0F, -23.0F, -10.0F);\n\t\tTorso.addChild(Head);\n\t\tHead.setTextureOffset(25, 32).addBox(-4.0F, -3.0F, -7.0F, 2.0F, 2.0F, 2.0F, 0.0F, false);\n\t\tHead.setTextureOffset(12, 18).addBox(-1.0F, -3.0F, -7.0F, 2.0F, 2.0F, 2.0F, 0.0F, false);\n\t\tHead.setTextureOffset(10, 14).addBox(2.0F, -3.0F, -7.0F, 2.0F, 2.0F, 2.0F, 0.0F, false);\n\t\tHead.setTextureOffset(0, 32).addBox(-5.0F, -4.0F, -5.0F, 10.0F, 5.0F, 5.0F, 0.0F, false);\n\n\t\tJaw = new ModelRenderer(this);\n\t\tJaw.setRotationPoint(0.0F, 2.4F, 0.0F);\n\t\tHead.addChild(Jaw);\n\t\tJaw.setTextureOffset(30, 32).addBox(-5.0F, -0.4F, -5.0F, 10.0F, 1.0F, 5.0F, 0.0F, false);\n\n\t\tFRLeg = new IKModelRenderer(this);\n\t\tFRLeg.setRotationPoint(-6.0F, -20.0F, -7.5F);\n\t\tTorso.addChild(FRLeg);\n\t\tsetRotationAngle(FRLeg, 0.0F, 0.0F, 0.7418F);\n\t\tFRLeg.setTextureOffset(18, 55).addBox(-1.75F, -2.0F, -1.0F, 3.0F, 11.0F, 2.0F, 0.1F, false);\n\n\t\tFRShin = new IKModelRenderer(this);\n\t\tFRShin.setRotationPoint(-0.3604F, 9.0265F, 0.0F);\n\t\tFRLeg.addChild(FRShin);\n\t\tsetRotationAngle(FRShin, 0.0F, 0.0F, -0.4363F);\n\t\tFRShin.setTextureOffset(10, 42).addBox(-1.3816F, -0.5961F, -1.0F, 3.0F, 12.0F, 2.0F, 0.0F, false);\n\n\t\tFRFoot = new IKModelRenderer(this,0,2,0);\n\t\tFRFoot.setRotationPoint(0.2F, 12.4F, -0.5F);\n\t\tFRShin.addChild(FRFoot);\n\t\tFRFoot.setTextureOffset(57, 0).addBox(-1.6F, -1.0F, -1.5F, 3.0F, 2.0F, 4.0F, 0.0F, false);\n\n\t\tFRLeg3 = new IKModelRenderer(this);\n\t\tFRLeg3.setRotationPoint(-6.0F, -20.0F, 1.5F);\n\t\tTorso.addChild(FRLeg3);\n\t\tsetRotationAngle(FRLeg3, 0.0F, 0.0F, 0.7418F);\n\t\tFRLeg3.setTextureOffset(30, 52).addBox(-1.75F, -2.0F, -1.0F, 3.0F, 11.0F, 2.0F, 0.1F, false);\n\n\t\tFRShin3 = new IKModelRenderer(this);\n\t\tFRShin3.setRotationPoint(-0.3604F, 9.0265F, 0.0F);\n\t\tFRLeg3.addChild(FRShin3);\n\t\tsetRotationAngle(FRShin3, 0.0F, 0.0F, -0.4363F);\n\t\tFRShin3.setTextureOffset(40, 40).addBox(-1.3816F, -0.5961F, -1.0F, 3.0F, 12.0F, 2.0F, 0.0F, false);\n\n\t\tFRFoot3 = new IKModelRenderer(this,0,2,0);\n\t\tFRFoot3.setRotationPoint(0.2F, 12.4F, -0.5F);\n\t\tFRShin3.addChild(FRFoot3);\n\t\tFRFoot3.setTextureOffset(50, 44).addBox(-1.6F, -1.0F, -1.5F, 3.0F, 2.0F, 4.0F, 0.0F, false);\n\n\t\tFRLeg6 = new IKModelRenderer(this);\n\t\tFRLeg6.setRotationPoint(6.0F, -20.0F, 1.5F);\n\t\tTorso.addChild(FRLeg6);\n\t\tsetRotationAngle(FRLeg6, 0.0F, 0.0F, -0.7418F);\n\t\tFRLeg6.setTextureOffset(20, 42).addBox(-1.25F, -2.0F, -1.0F, 3.0F, 11.0F, 2.0F, 0.1F, false);\n\n\t\tFRShin6 = new IKModelRenderer(this);\n\t\tFRShin6.setRotationPoint(0.3604F, 9.0265F, 0.0F);\n\t\tFRLeg6.addChild(FRShin6);\n\t\tsetRotationAngle(FRShin6, 0.0F, 0.0F, 0.4363F);\n\t\tFRShin6.setTextureOffset(0, 0).addBox(-1.6184F, -0.5961F, -1.0F, 3.0F, 12.0F, 2.0F, 0.0F, false);\n\n\t\tFRFoot6 = new IKModelRenderer(this,0,2,0);\n\t\tFRFoot6.setRotationPoint(-0.2F, 12.4F, -0.5F);\n\t\tFRShin6.addChild(FRFoot6);\n\t\tFRFoot6.setTextureOffset(0, 14).addBox(-1.4F, -1.0F, -1.5F, 3.0F, 2.0F, 4.0F, 0.0F, false);\n\n\t\tFRLeg4 = new IKModelRenderer(this);\n\t\tFRLeg4.setRotationPoint(-6.0F, -20.0F, 10.5F);\n\t\tTorso.addChild(FRLeg4);\n\t\tsetRotationAngle(FRLeg4, 0.0F, 0.0F, 0.7418F);\n\t\tFRLeg4.setTextureOffset(50, 50).addBox(-1.75F, -2.0F, -1.0F, 3.0F, 11.0F, 2.0F, 0.1F, false);\n\n\t\tFRShin4 = new IKModelRenderer(this);\n\t\tFRShin4.setRotationPoint(-0.3604F, 9.0265F, 0.0F);\n\t\tFRLeg4.addChild(FRShin4);\n\t\tsetRotationAngle(FRShin4, 0.0F, 0.0F, -0.4363F);\n\t\tFRShin4.setTextureOffset(30, 38).addBox(-1.3816F, -0.5961F, -1.0F, 3.0F, 12.0F, 2.0F, 0.0F, false);\n\n\t\tFRFoot4 = new IKModelRenderer(this,0,2,0);\n\t\tFRFoot4.setRotationPoint(0.2F, 12.4F, -0.5F);\n\t\tFRShin4.addChild(FRFoot4);\n\t\tFRFoot4.setTextureOffset(50, 38).addBox(-1.6F, -1.0F, -1.5F, 3.0F, 2.0F, 4.0F, 0.0F, false);\n\n\t\tFRLeg5 = new IKModelRenderer(this);\n\t\tFRLeg5.setRotationPoint(6.0F, -20.0F, 10.5F);\n\t\tTorso.addChild(FRLeg5);\n\t\tsetRotationAngle(FRLeg5, 0.0F, 0.0F, -0.7418F);\n\t\tFRLeg5.setTextureOffset(47, 0).addBox(-1.25F, -2.0F, -1.0F, 3.0F, 11.0F, 2.0F, 0.1F, false);\n\n\t\tFRShin5 = new IKModelRenderer(this);\n\t\tFRShin5.setRotationPoint(0.3604F, 9.0265F, 0.0F);\n\t\tFRLeg5.addChild(FRShin5);\n\t\tsetRotationAngle(FRShin5, 0.0F, 0.0F, 0.4363F);\n\t\tFRShin5.setTextureOffset(10, 0).addBox(-1.6184F, -0.5961F, -1.0F, 3.0F, 12.0F, 2.0F, 0.0F, false);\n\n\t\tFRFoot5 = new IKModelRenderer(this,0,2,0);\n\t\tFRFoot5.setRotationPoint(-0.2F, 12.4F, -0.5F);\n\t\tFRShin5.addChild(FRFoot5);\n\t\tFRFoot5.setTextureOffset(47, 13).addBox(-1.4F, -1.0F, -1.5F, 3.0F, 2.0F, 4.0F, 0.0F, false);\n\n\t\tFRLeg2 = new IKModelRenderer(this);\n\t\tFRLeg2.setRotationPoint(6.0F, -20.0F, -7.5F);\n\t\tTorso.addChild(FRLeg2);\n\t\tsetRotationAngle(FRLeg2, 0.0F, 0.0F, -0.7418F);\n\t\tFRLeg2.setTextureOffset(40, 54).addBox(-1.25F, -2.0F, -1.0F, 3.0F, 11.0F, 2.0F, 0.1F, false);\n\n\t\tFRShin2 = new IKModelRenderer(this);\n\t\tFRShin2.setRotationPoint(0.3604F, 9.0265F, 0.0F);\n\t\tFRLeg2.addChild(FRShin2);\n\t\tsetRotationAngle(FRShin2, 0.0F, 0.0F, 0.4363F);\n\t\tFRShin2.setTextureOffset(0, 42).addBox(-1.6184F, -0.5961F, -1.0F, 3.0F, 12.0F, 2.0F, 0.0F, false);\n\n\t\tFRFoot2 = new IKModelRenderer(this,0,2,0);\n\t\tFRFoot2.setRotationPoint(-0.2F, 12.4F, -0.5F);\n\t\tFRShin2.addChild(FRFoot2);\n\t\tFRFoot2.setTextureOffset(0, 56).addBox(-1.4F, -1.0F, -1.5F, 3.0F, 2.0F, 4.0F, 0.0F, false);\n\n\t\t/*\n textureWidth = 16;\n\t\ttextureHeight = 16;\n\t\tbase = new IKModelRenderer(this);\n\t\tbase.setRotationPoint(0.0F, 24.0F, 0.0F);\n\t\tbase.setTextureOffset(0, 0).addBox(-8.0F, -2.0F, -8.0F, 16.0F, 2.0F, 16.0F, 0.0F, false);\n\t\t\n\t\tarm = new IKModelRenderer(this);\n\t\tarm.setRotationPoint(0.0F, -2.0F, 0.0F);\n\t\tbase.addChild(arm);\n\t\tarm.setTextureOffset(0, 0).addBox(-1.5F, -16.0F, -1.5F, 3.0F, 16.0F, 3.0F, 0.0F, false);\n\t\t\n\t\telbow = new IKModelRenderer(this);\n\t\telbow.setRotationPoint(0.0F, -16.0F, 0.0F);\n\t\tarm.addChild(elbow);\n\t\telbow.setTextureOffset(0, 0).addBox(-1.5F, -16.0F, -1.5F, 3.0F, 16.0F, 3.0F, 0.0F, false);\n\n\t\tforearm = new IKModelRenderer(this,0,27,0);\n\t\tforearm.setRotationPoint(0.0F, -16.0F, 0.0F);\n\t\telbow.addChild(forearm);\n\t\tforearm.setTextureOffset(0, 0).addBox(-1.5F, -23.0F, -1.5F, 3.0F, 23.0F, 3.0F, 0.0F, false);\n\t\tforearm.setTextureOffset(0, 0).addBox(-2.5F, -27.0F, -2.5F, 5.0F, 4.0F, 5.0F, 0.0F, false);\n\t\t*/\n\t}", "@Override\n\tpublic void init(String[] args) {\n\t\tsuper.init(args);\n\t\tmodel = new ArenaModel();\n\t\tview = new ArenaView(model);\n\t\tmodel.setView(view);\n\t\tupdatePercepts();\n\t}", "@Override\n public void setup() {\n this.savePath(\".\");\n Minim minim = new Minim(this);\n\n //Charger la chanson\n song = minim.loadFile(\"song.mp3\");\n //Créer l'objet FFT pour analyser la chanson\n fft = new FFT(song.bufferSize(), song.sampleRate());\n\n //Un cube par bande de fréquence\n nbCubes = (int) (fft.specSize() * specHi);\n cubes = new Cube[nbCubes];\n\n //Autant de murs qu'on veux\n murs = new Mur[nbMurs];\n\n //Créer tous les objets\n //Créer les objets cubes\n for (int i = 0; i < nbCubes; i++) {\n cubes[i] = new Cube(this);\n }\n\n //Créer les objets murs\n //Murs gauches\n for (int i = 0; i < nbMurs; i += 4) {\n murs[i] = new Mur(0, height / 2f, 10, height, this);\n }\n\n //Murs droits\n for (int i = 1; i < nbMurs; i += 4) {\n murs[i] = new Mur(width, height / 2f, 10, height, this);\n }\n\n //Murs bas\n for (int i = 2; i < nbMurs; i += 4) {\n murs[i] = new Mur(width / 2f, height, width, 10, this);\n }\n\n //Murs haut\n for (int i = 3; i < nbMurs; i += 4) {\n murs[i] = new Mur(width / 2f, 0, width, 10, this);\n }\n\n //Fond noir\n\n //Commencer la chanson\n// song.play(0);\n }", "public ModelStructure(){\n dcModelPurposeIndexMap = new HashMap<String,Integer>();\n dcModelIndexPurposeMap = new HashMap<Integer,String>();\n dcSoaUecIndexMap = new HashMap<String,Integer>();\n dcUecIndexMap = new HashMap<String,Integer>();\n tourModeChoiceUecIndexMap = new HashMap<String,Integer>();\n stopFreqUecIndexMap = new HashMap<String,Integer>();\n stopLocUecIndexMap = new HashMap<String,Integer>();\n tripModeChoiceUecIndexMap = new HashMap<String,Integer>();\n \n segmentedPurposeIndexMap = new HashMap<String,Integer>();\n segmentedIndexPurposeMap = new HashMap<Integer,String>();\n\n primaryPurposeIndexMap = new HashMap<String,Integer>();\n primaryIndexPurposeMap = new HashMap<Integer,String>();\n primaryPurposeIndexMap.put( \"Home\", -1 );\n primaryPurposeIndexMap.put( \"Work\", -2 );\n primaryPurposeIndexMap.put( WORK_PURPOSE_NAME, WORK_PURPOSE_INDEX );\n primaryPurposeIndexMap.put( UNIVERSITY_PURPOSE_NAME, UNIVERSITY_PURPOSE_INDEX );\n primaryPurposeIndexMap.put( SCHOOL_PURPOSE_NAME, SCHOOL_PURPOSE_INDEX );\n primaryPurposeIndexMap.put( ESCORT_PURPOSE_NAME, ESCORT_PURPOSE_INDEX );\n primaryPurposeIndexMap.put( SHOPPING_PURPOSE_NAME, SHOPPING_PURPOSE_INDEX );\n primaryPurposeIndexMap.put( OTH_MAINT_PURPOSE_NAME, OTH_MAINT_PURPOSE_INDEX );\n primaryPurposeIndexMap.put( EAT_OUT_PURPOSE_NAME, EAT_OUT_PURPOSE_INDEX );\n primaryPurposeIndexMap.put( SOCIAL_PURPOSE_NAME, SOCIAL_PURPOSE_INDEX );\n primaryPurposeIndexMap.put( OTH_DISCR_PURPOSE_NAME, OTH_DISCR_PURPOSE_INDEX );\n primaryPurposeIndexMap.put( AT_WORK_PURPOSE_NAME, AT_WORK_PURPOSE_INDEX );\n primaryIndexPurposeMap.put( -1, \"Home\" );\n primaryIndexPurposeMap.put( -2, \"Work\" );\n primaryIndexPurposeMap.put( WORK_PURPOSE_INDEX, WORK_PURPOSE_NAME );\n primaryIndexPurposeMap.put( UNIVERSITY_PURPOSE_INDEX, UNIVERSITY_PURPOSE_NAME );\n primaryIndexPurposeMap.put( SCHOOL_PURPOSE_INDEX, SCHOOL_PURPOSE_NAME );\n primaryIndexPurposeMap.put( ESCORT_PURPOSE_INDEX, ESCORT_PURPOSE_NAME );\n primaryIndexPurposeMap.put( SHOPPING_PURPOSE_INDEX, SHOPPING_PURPOSE_NAME );\n primaryIndexPurposeMap.put( OTH_MAINT_PURPOSE_INDEX, OTH_MAINT_PURPOSE_NAME );\n primaryIndexPurposeMap.put( EAT_OUT_PURPOSE_INDEX, EAT_OUT_PURPOSE_NAME );\n primaryIndexPurposeMap.put( SOCIAL_PURPOSE_INDEX, SOCIAL_PURPOSE_NAME );\n primaryIndexPurposeMap.put( OTH_DISCR_PURPOSE_INDEX, OTH_DISCR_PURPOSE_NAME );\n primaryIndexPurposeMap.put( AT_WORK_PURPOSE_INDEX, AT_WORK_PURPOSE_NAME );\n }", "public ModelClass(String Main, String Translated, Integer ImageResource, Integer Music) {\n this.Main = Main;\n this.Translated = Translated;\n this.ImageResource = ImageResource;\n this.Music = Music;\n }", "public QuestEntity() {\r\n\r\n }", "public Ylqs() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\t}", "@Override\n protected void initData() {\n }", "@Override\n protected void initData() {\n }", "@Override\n\tpublic void initData() {\n\n\n\n\t}", "public GeneralModel() {\n initThemes();\n initProperties();\n }", "public FareModel() {\n }", "CubeModel(CubeModel cube) {\n initialize(cube);\n\n }", "public Data() {\n \n }", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "public void init (final HashMap data) throws CGException {\n\n {\n\n String fname = new String(\"model\");\n Boolean cond_4 = null;\n cond_4 = new Boolean(data.containsKey(fname));\n if (cond_4.booleanValue()) \n setModel((Boolean) data.get(fname));\n }\n {\n\n String fname = new String(\"import\");\n Boolean cond_13 = null;\n cond_13 = new Boolean(data.containsKey(fname));\n if (cond_13.booleanValue()) \n setImport(UTIL.ConvertToString(data.get(fname)));\n }\n }", "public Data() {\n }", "public Data() {\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "public InitialData(){}", "public void initialize() {\n\n fechaDeLaVisita.set(LocalDate.now());\n\n if (medico.get() != null) {\n medico.get().clear();\n } else {\n medico.set(new Medico());\n }\n\n turnoVisita.set(\"\");\n visitaAcompanadaSN.set(false);\n lugarVisita.set(\"\");\n if (causa.get() != null) {\n causa.get().clear();\n } else {\n causa.set(new Causa());\n }\n\n if (promocion.get() != null) {\n promocion.get().clear();\n } else {\n promocion.set(new Promocion());\n }\n\n observacion.set(\"\");\n persistida.set(false);\n persistidoGraf.set(MaterialDesignIcon.SYNC_PROBLEM.graphic());\n\n fechaCreacion.set(LocalDateTime.now());\n\n }", "public DataTableModel() {\n super();\n LanguageObservable.getInstance().attach(this);\n setLocalizedResourceBundle(\"ch.ethz.origo.jerpa.jerpalang.perspective.ededb.EDEDB\");\n initColumns();\n data = new LinkedList<DataRowModel>();\n }", "public jPQuanLy() {\n initComponents();\n this.loadContent(\"\");\n this.loadClass();\n this.hienThiSiSo(\"\");\n }", "public Tra() {\n super();\n initComponents();\n loadData();\n }", "Cube()\r\n\t{\r\n\t\t//System.out.println(\"We are in constructor\");\r\n\t\tlength=10;\r\n\t\tbredth=20;\r\n\t\theight=30;\r\n\t}", "public Classroom()\n { \n // Create a new world with 10x6 cells with a cell size of 130x130 pixels.\n super(10, 6, 130); \n prepare();\n }", "abstract void initializeNeededData();", "public HasQuarterStateTest()\n {\n }", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "public Object3D() {\n objectVectors = new ArrayList<>();\n linesToDraw = new ArrayList<>();\n }", "public Model() {\n\t\tthis.map = new Map(37, 23);\n\t}", "public MyWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1078, 672, 1); \n preparePlayer1();\n preparePlayer2();\n prepareTitle();\n //playmusic();\n }", "public QuadCurve () {\n }", "public void init() {\n\t\twindow.init();\n\t\t\n\t\t//OBJModel test = new OBJModel(\"monkey.obj\");\n\t\t//IndexedModel model = test.toIndexedModel();\n\t\t//Model test2 = new Model(OBJLoader.loadMesh(\"monkey.obj\"));\n\t\t\n\t}", "public CrabWorld()\n {\n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n musica=new GreenfootSound(\"Ufo-t-balt.mp3\");\n super(560,560, 1);\n }", "@Override\r\n\tpublic void initData() {\n\t}", "@Override\n\tpublic void initData() {\n\n\t}", "@Override\n\tpublic void initData() {\n\n\t}", "@Override\n\tpublic void initData() {\n\n\t}", "@Override\n\tpublic void initData() {\n\t\t\n\t}", "public void initialize() {\n setThisFacility(null);\n loadData();\n initCols();\n\n }", "protected @Override\r\n abstract void initData();", "public MVCModelo()\n\t{\n\t\tqueueMonthly = new Queue();\n\t\tqueueHourly = new Queue();\n\t\tstackWeekly = new Stack();\n\t}", "private void initData() {\n }" ]
[ "0.6429586", "0.6421678", "0.6287004", "0.6156771", "0.61469764", "0.6101314", "0.60544485", "0.5989303", "0.59491897", "0.59358823", "0.59187233", "0.5886733", "0.5875868", "0.5834122", "0.58285606", "0.58278227", "0.5811324", "0.5808558", "0.58062166", "0.580135", "0.5767449", "0.576736", "0.5671356", "0.56682974", "0.5650945", "0.5648228", "0.56047916", "0.5598836", "0.55909914", "0.55882156", "0.5576024", "0.55708355", "0.5563921", "0.5562804", "0.5549557", "0.55406696", "0.5534429", "0.5518051", "0.5506675", "0.5506675", "0.5493811", "0.54935634", "0.54920566", "0.5479687", "0.54748034", "0.54748034", "0.54748034", "0.54748034", "0.54748034", "0.54748034", "0.5474525", "0.54643685", "0.5457518", "0.5448988", "0.5448988", "0.5426968", "0.54219973", "0.5421646", "0.54155666", "0.5412685", "0.5397131", "0.53939664", "0.5390029", "0.5390029", "0.53744316", "0.5373731", "0.53678095", "0.5360524", "0.53573996", "0.5356769", "0.5356769", "0.5353236", "0.5325421", "0.5325421", "0.53228116", "0.5321832", "0.5321068", "0.5320671", "0.53109854", "0.5303461", "0.53030115", "0.5301755", "0.53005195", "0.5299352", "0.52981776", "0.5293766", "0.529204", "0.5290903", "0.5289273", "0.52873576", "0.52838564", "0.52825755", "0.52740747", "0.52740747", "0.52740747", "0.5271848", "0.52680695", "0.5267359", "0.5261836", "0.52600074" ]
0.75920236
0
using bash command to find the names of the categories in the category folder each category is added to the list
private void initialiseCategories() { _nzCategories = BashCmdUtil.bashCmdHasOutput("ls categories/nz"); _intCategories = BashCmdUtil.bashCmdHasOutput("ls categories/international"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<String> getCategories();", "public static ArrayList<String> catToCateg(String categ) throws Exception {\n\n\t\tArrayList<String> list = new ArrayList<String>();\n\n\t\tif (categOffsetIndex == null) {\n\t\t\tSystem.out.println(\"categ loading index...\");\n\t\t\tloadCategIndex();\n\t\t\tSystem.out.println(\"categ index loaded !!!\");\n\t\t}\n\n\t\tif (categOffsetIndex.get(categ) != null) {\n\t\t\tFile file = new File(basedir + \"categHierarchy\");\n\t\t\tRandomAccessFile rFile = new RandomAccessFile(file, \"r\");\n\t\t\t// System.out.println(categOffsetIndex.get(categ));\n\t\t\trFile.seek(categOffsetIndex.get(categ));\n\t\t\tString temp = rFile.readLine();\n\t\t\trFile.close();\n\t\t\tString arr[] = temp.split(\"\\t\");\n\n\t\t\tString temp1 = arr[1].substring(1, arr[1].length() - 1);\n\t\t\tString arr1[] = temp1.split(\",\");\n\n\t\t\tfor (String key : arr1) {\n\t\t\t\tlist.add(key.trim());\n\t\t\t}\n\t\t\trFile.close();\n\t\t\treturn list;\n\n\t\t}\n\n\t\telse {\n\n\t\t\treturn null;\n\t\t}\n\n\t}", "public List<String> getCategoryList(String cat) {\n ArrayList<String> ls = new ArrayList<String>();\n String[] keys = sortedStringKeys();\n\n for (String s : keys) {\n if (s.startsWith(cat)) { ls.add(getProperty(s)); }\n }\n return ls;\n }", "void updateUsedCategoriesContent() {\n try{\n InputStream inputStream = DMOZCrawler.class.getResourceAsStream(\"Used_categories.txt\");\n InputStreamReader inputStreamReader = new InputStreamReader(inputStream);\n BufferedReader bufferedReader = new BufferedReader(inputStreamReader);\n HashSet<String> usedCategories = new HashSet<>();\n\n String currentLine;\n while ((currentLine = bufferedReader.readLine()) != null){\n usedCategories.add(currentLine.toLowerCase());\n System.out.println(\"Used category added :: \" + currentLine);\n }\n\n System.out.println(usedCategories);\n\n for(String id : usedCategories){\n categoryContent(Integer.parseInt(id));\n }\n } catch (Exception exception){\n exception.printStackTrace();\n }\n }", "public List<Categorie> getAllCategories();", "private List<Category> extractTargets() {\n List<String> names = getNames(\"category\");\n CategorySelectAsyncTask task = new CategorySelectAsyncTask();\n CategoryMapper mapper = new CategoryMapper();\n task.setNames(names);\n List<Category> list = new ArrayList<>();\n try {\n list.addAll(mapper.to(task.execute().get()));\n } catch (ExecutionException | InterruptedException e) {\n Log.e(TAG, \"extractTargets: \" + e.getMessage(), e);\n }\n return list;\n }", "List<Category> getAllCategories();", "public String categoryList(CategoryDetails c);", "default List<String> getCategory(String category) {\n return new ArrayList<>(getCategories().get(category.toLowerCase()).values());\n }", "private static void catList() {\n\t\tSystem.out.println(\"List of preset Categories\");\n\t\tSystem.out.println(\"=========================\");\n\t\tSystem.out.println(\n\t\t\t\t\"Family\\nTeen\\nThriller\\nAnimated\\nSupernatural\\nComedy\\nDrama\\nQuirky\\nAction\\nComing of age\\nHorror\\nRomantic Comedy\\n\\n\");\n\t}", "public static List<String> getAllCategoryName() {\n List<String> list = new ArrayList<>();\n List<Category> catList=getAllCategory();\n if(catList!=null && catList.size()>0) {\n for (Category category : catList)\n {\n list.add(category.getCategoryName());\n }\n }\n\n return list;\n\n }", "public void getCategorory(){\n\t\tDynamicQuery dynamicQuery = DynamicQueryFactoryUtil.forClass(AssetCategory.class, \"category\", PortalClassLoaderUtil.getClassLoader());\n\t\ttry {\n\t\t\tList<AssetCategory> assetCategories = AssetCategoryLocalServiceUtil.dynamicQuery(dynamicQuery);\n\t\t\tfor(AssetCategory category : assetCategories){\n\t\t\t\tlog.info(category.getName());\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t}", "public List<String> findAllCategories() {\r\n\t\tList<String> result = new ArrayList<>();\r\n\r\n\t\t// 1) get a Connection from the DataSource\r\n\t\tConnection con = DB.gInstance().getConnection();\r\n\r\n\t\ttry {\r\n\r\n\t\t\t// 2) create a PreparedStatement from a SQL string\r\n\t\t\tPreparedStatement ps = con.prepareStatement(GET_CATEGORIES_SQL);\r\n\r\n\t\t\t// 3) execute the SQL\r\n\t\t\tResultSet resultSet = ps.executeQuery();\r\n\t\t\twhile (resultSet.next()) {\r\n\r\n\t\t\t\tString cat = resultSet.getString(1);\r\n\t\t\t\tresult.add(cat);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException se) {\r\n\t\t\tse.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tDB.gInstance().returnConnection(con);\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}", "List getCategoriesOfType(String typeConstant);", "private static void addPathToCategories() throws JSONException {\n StringBuilder path = new StringBuilder();\n String leafNodeDisplayName = null;\n for (HashMap<String, String> elements : elementStack) {\n if (path.length() > 0) {\n path.append(\"/\");\n }\n for (Map.Entry<String, String> entry : elements.entrySet()) {\n path.append(entry.getKey());\n if (entry.getValue() != null) {\n leafNodeDisplayName = entry.getValue();\n } else {\n leafNodeDisplayName = path.toString();\n }\n }\n\n }\n\n jsonPaths.put(path.toString(), leafNodeDisplayName);\n }", "public static ArrayList<String> getCategories() {\n String query;\n ArrayList<String> categories = new ArrayList<String>();\n\n try {\n Connection con = Database.createDBconnection();\n Statement stmt = con.createStatement();\n query = \"SELECT category FROM category;\";\n ResultSet rs = stmt.executeQuery(query);\n\n while(rs.next()) {\n categories.add(rs.getString(\"category\"));\n }\n\n Database.closeDBconnection(con);\n }\n catch(Exception e) {\n e.printStackTrace();\n }\n return categories;\n }", "public List<Cvcategory> findAllCvcategories();", "@Override\n\tpublic List<Category> findcategory() {\n\t\t\n\t\tConnection conn=null;\n\t\tPreparedStatement pst=null;\n\t\tResultSet rs=null;\n\t\t\n\t\tList<Category> list=new ArrayList<Category>();\n\t\ttry {\n\t\t\tconn=DBUtils.getConnection();\n\t\t\tpst=conn.prepareStatement(\"select id,parent_id,name,status,sort_order,create_time,update_time from category\");\n\t\t\t\n\t\t\trs=pst.executeQuery();\n\t\t\t\n\t\t\twhile (rs.next()) {\n\t\t\t\tCategory category=new Category(rs.getInt(\"id\"),rs.getInt(\"parent_id\"),rs.getString(\"name\"),rs.getInt(\"status\"),rs.getInt(\"sort_order\"),rs.getDate(\"create_time\"),rs.getDate(\"update_time\"));\n\t\t\t\tlist.add(category);\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally {\n\t\t\ttry {\n\t\t\t\tDBUtils.Close(conn, pst, rs);\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t\t\n\t\t\n\n\t}", "String category();", "protected abstract String[] getFolderList() throws IOException;", "public static void loopCategories() throws IOException {\n //If all of the categories haven't been checked yet check the response at the current index (count).\n if (count < CATEGORY_ARRAY_SIZE) {\n //If that response if equal to TRUE (1).\n if (currentUser.getSingleCategory(count) == TRUE) {\n //Adjust the start index.\n startIndex = count * LOCATIONS_PER_CATEGORY;\n //Call the locaitons view.\n Main.FxmlLoader(LOCATIONS_PATH);\n }\n //Otherwise increment count and check the next index recursively.\n else {\n count++;\n loopCategories();\n }\n }\n }", "public void readInCategories() {\n // read CSV file for Categories\n allCategories = new ArrayList<Category>();\n InputStream inputStream = getResources().openRawResource(R.raw.categories);\n CSVFile csvFile = new CSVFile(inputStream);\n List scoreList = csvFile.read();\n // ignore first row because it is the title row\n for (int i = 1; i < scoreList.size(); i++) {\n String[] categoryInfo = (String[]) scoreList.get(i);\n\n // inputs to Category constructor:\n // String name, int smallPhotoID, int bannerPhotoID\n\n // get all image IDs according to the names\n int smallPhotoID = context.getResources().getIdentifier(categoryInfo[1], \"drawable\", context.getPackageName());\n int bannerPhotoID = context.getResources().getIdentifier(categoryInfo[2], \"drawable\", context.getPackageName());\n allCategories.add(new Category(categoryInfo[0],smallPhotoID, bannerPhotoID));\n\n //System.out.println(\"categoryInfo: \" + categoryInfo[0] + \" \" + categoryInfo[1] + \" \" + categoryInfo[2]);\n }\n }", "public static List<Category> findAll() {\n List<Category> categories = categoryFinder.findList();\n if(categories.isEmpty()){\n categories = new ArrayList<>();\n }\n return categories;\n }", "public List<DVDCategorie> listDVDCategorie();", "@Override\n\tpublic List<AnimalCategory> findCategory() {\n\t\tList<AnimalCategory> list = animaldao.findCategory();\n\t\treturn list;\n\t}", "@GetMapping(\"category\")\n\t\tpublic List<String> getCategory(){\n\t\t\tList<String> list = repo.findByCat();\n\t\t\treturn list;\n\t\t\t\n\t\t\t\n\t\t}", "public static ArrayList<AdminCategory> fetchCategoryList() {\r\n\r\n\t\tArrayList<AdminCategory> categoryList = new ArrayList<AdminCategory>();\r\n\r\n\t\tsqlQuery = \"SELECT categoryName, status, B.level,\" +\r\n\t\t\t\t\"(SELECT categoryName FROM flipkart_category A WHERE A.categoryID=C.parentID) AS parentCategory, \" +\r\n\t\t\t\t\"B.categoryID \" +\r\n\t\t\t\t\"FROM flipkart_category B, flipkart_path C \" +\r\n\t\t\t\t\"WHERE B.categoryID=C.categoryID ORDER BY B.level;\";\r\n\r\n\t\ttry{\r\n\t\t\tconn=DbConnection.getConnection();\r\n\t\t\tps=conn.prepareStatement(sqlQuery);\r\n\t\t\trs=ps.executeQuery();\r\n\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\tAdminCategory category = new AdminCategory();\r\n\t\t\t\tcategory.setCategoryName(rs.getString(1));\r\n\t\t\t\tcategory.setStatus(rs.getInt(2));\r\n\t\t\t\tcategory.setLevel(rs.getInt(3));\r\n\t\t\t\tcategory.setParentCategory(rs.getString(4));\r\n\t\t\t\tcategory.setCategoryID(rs.getInt(5));\r\n\t\t\t\tcategoryList.add(category);\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\r\n\t\treturn categoryList;\r\n\t}", "private static Stream<String> parseCategory(ClassificationCategory category) {\n return Stream.of(category.getName().substring(1).split(\"/| & \"));\n }", "public ArrayList<Categoria> listarCategorias();", "private void readCategories() throws Exception {\n\t\t//reads files in nz category\n\t\tif (_nzCategories.size() > 0) {\n\t\t\tfor (String category: _nzCategories) {\n\t\t\t\t// read each individual line from the category files and store it\n\t\t\t\ttry {\n\t\t\t\t\tFile file = new File(\"categories/nz/\", category);\n\t\t\t\t\tScanner myReader = new Scanner(file);\n\t\t\t\t\tList<String> allLines = new ArrayList<String>();\n\t\t\t\t\twhile(myReader.hasNextLine()) {\n\t\t\t\t\t\tString fileLine = myReader.nextLine();\n\t\t\t\t\t\tallLines.add(fileLine);\n\t\t\t\t\t}\n\t\t\t\t\tList<String> copy = new ArrayList<String>(allLines);\n\t\t\t\t\t_nzData.put(category, copy);\n\t\t\t\t\tallLines.clear();\n\t\t\t\t\tmyReader.close();\n\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//reads file in international categories\n\t\tif (_intCategories.size() > 0) {\n\t\t\tfor (String category: _intCategories) {\n\t\t\t\t// read each individual line from the category files and store it\n\t\t\t\ttry {\n\t\t\t\t\tFile file = new File(\"categories/international/\", category);\n\t\t\t\t\tScanner myReader = new Scanner(file);\n\t\t\t\t\tList<String> allLines = new ArrayList<String>();\n\t\t\t\t\twhile(myReader.hasNextLine()) {\n\t\t\t\t\t\tString fileLine = myReader.nextLine();\n\t\t\t\t\t\tallLines.add(fileLine);\n\t\t\t\t\t}\n\t\t\t\t\tList<String> copy = new ArrayList<String>(allLines);\n\t\t\t\t\t_intData.put(category, copy);\n\t\t\t\t\tallLines.clear();\n\t\t\t\t\tmyReader.close();\n\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static List<Category> getAllCategory() {\n\n List<Category> categoryList = new ArrayList<>();\n try {\n categoryList = Category.listAll(Category.class);\n } catch (Exception e) {\n\n }\n return categoryList;\n\n }", "ListCategoryResponse listCategories(ListCategoryRequest request);", "@Override\n\tpublic List<Category> findAllCategory() {\n\t\treturn categoryRepository.findAllCategory();\n\t}", "List<ConfigCategory> getCategoryOfTypeAndDisplayName(String typeConstant, String catDisplayName);", "public @NotNull Set<Category> findAllCategories() throws BazaarException;", "public java.lang.String HR_GetSubServiceCategories(java.lang.String accessToken, java.lang.String serviceCategory) throws java.rmi.RemoteException;", "@Override\n\tpublic List<Category> getAllCategory() {\n\t\treturn category.selectAllCategory();\n\t}", "public List<ProductCatagory> getAllCategory() throws BusinessException;", "List<? extends HasListBox> getCodeListsForCategory(String category);", "private Collection<IInstallableUnit>queryCategories(final IProgressMonitor monitor, IProvisioningAgent agent)\r\n\t{\t\t\r\n\t\tCollection<IInstallableUnit>iuSet = new LinkedList<IInstallableUnit>();\r\n\t\tIQueryable<IInstallableUnit> queryable = ((IProfileRegistry) agent\r\n\t\t\t\t.getService(IProfileRegistry.SERVICE_NAME))\r\n\t\t\t\t.getProfile(PROFILE_ID);\r\n\r\n\t\tif (queryable != null)\r\n\t\t{\r\n\t\t\t// Kategorien abfragen\r\n\t\t\tIQueryResult<IInstallableUnit> resultCategory = queryable.query(\r\n\t\t\t\t\tQueryUtil.createIUCategoryQuery(), monitor);\r\n\t\t\t\r\n\t\t\tIterator<IInstallableUnit> itMembers = resultCategory.iterator();\r\n\t\t\twhile (itMembers.hasNext())\r\n\t\t\t{\r\n\t\t\t\tIInstallableUnit uiMember = itMembers.next();\r\n\t\t\t\tiuSet.add(uiMember);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn iuSet;\r\n\t}", "private static void seachCats(String maybeCat) {\n\t\tSystem.out.println(\"List of \" + maybeCat + \" movies\");\n\t\tSystem.out.println(\"===============================\");\n\t\tint i;\n\t\tint x = 0;\n\t\tfor (i = 0; i < movList.size(); i++) {\n\t\t\tif (movList.get(i).isCat(maybeCat)) {\n\t\t\t\tSystem.out.println(movList.get(i));\n\t\t\t\tx++;\n\t\t\t}\n\t\t}\n\t\tif (x == 0) {\n\t\t\tSystem.out.println(\"Sorry, there are no movies in that category.\");\n\t\t}\n\t}", "public List<Category> findAll();", "public List<ZCategory> SelectAll() {\r\n\t\tList<ZCategory> Categories = new ArrayList<>();\r\n\t\tString lines[];\r\n\t\tlines = fm.getArray();\r\n\t\tfor (String string : lines) {\r\n\t\t\tCategories.add(stringToCategory(string));\r\n\t\t}\r\n\t\treturn Categories;\r\n\t}", "public abstract List<String> getDirs( );", "public List<CategoryDTO> getCategories(String bbbChannel, String siteId, List<String> relatedCategories) ;", "private void listCategory() {\r\n \r\n cmbCategoryFilter.removeAllItems();\r\n cmbCategory.removeAllItems();\r\n \r\n cmbCategoryFilter.addItem(\"All\");\r\n for (Category cat : Category.listCategory()) {\r\n cmbCategoryFilter.addItem(cat.getName());\r\n cmbCategory.addItem(cat.getName());\r\n }\r\n \r\n }", "@Override\n\tpublic Iterable<Category> findAllCategory() {\n\t\treturn categoryRepository.findAll();\n\t}", "public List<Category> queryExistingCategory(){\n\t\tArrayList<Category> cs = new ArrayList<Category>(); \n\t\tCursor c = queryTheCursorCategory(); \n\t\twhile(c.moveToNext()){\n\t\t\tCategory category = new Category();\n\t\t\tcategory._id = c.getInt(c.getColumnIndex(\"_id\"));\n\t\t\tcategory.title = c.getString(c.getColumnIndex(DBEntryContract.CategoryEntry.COLUMN_NAME_TITLE));\n\t\t\tcategory.numberOfEntries = this.queryLocationEntryNumberByCategory(category._id);\n\t\t\tcs.add(category);\n\t\t}\n\t\t// close the cursor\n\t\tc.close();\n\t\treturn cs;\n\t\t\n\t}", "public List<Category> getAllCategories() {\n\t dbUtil = new DBUtil();\n\t StringBuffer sbQuery = dbUtil.getQueryBuffer();\n\t ArrayList<String> args = dbUtil.getArgs();\n\t ResultSet rs = null;\n\t List<Category> listCategory = null;\n\t \n\t /*** Get the details of a particular Category ***/\n\t /*** QUERY ***/\n\t sbQuery.setLength(0);\n\t sbQuery.append(\" SELECT \");\n\t sbQuery.append(\" id, \");\n\t sbQuery.append(\" name, \");\n\t sbQuery.append(\" userid \");\n\t sbQuery.append(\" FROM lookup.category \");\n\t \n\t /*** Prepare parameters for query ***/\n\t args.clear();\n\t \n\t \n\t /*** Pass the appropriate arguments to DBUtil class ***/\n\t rs = dbUtil.executeSelect(sbQuery.toString(), args);\n\t \n\t /*** Convert the result set into a User object ***/\n\t if(rs!=null)\n\t listCategory = TransformUtil.convertToListCategory(rs);\n\t \n\t dbUtil.closeConnection();\n\t dbUtil = null;\n\t \n\t return listCategory;\n\t}", "public List<Concept> populateConceptSection(String category){\n\t\tConceptService cs = Context.getConceptService();\n\t\tDeIdentifiedExportService d = Context.getService(DeIdentifiedExportService.class);\n\t\tList<String> list = d.getConceptByCategory(category);\n\t\tInteger temp;\n\t\tList<Concept> conceptList = new Vector<Concept>();\n\t\tfor(int i=0; i<list.size();i++){\n\t\t\tfor (String retval: list.get(i).split(\",\")){\n\t\t\t\ttemp = Integer.parseInt(retval);\n\t\t\t\tconceptList.add(cs.getConcept(temp));\n\t\t\t}\n\t\t}\n\t\tSet set = new HashSet(conceptList);\n\t\tList list1 = new ArrayList(set);\n\t\treturn list1;\n\t}", "private List<String> createCategoryNames(List<CategoryDb> instances) {\n List<String> list = new ArrayList<>(0);\n for (CategoryDb categoryDb : instances) {\n list.add(categoryDb.getCategoryNameEn());\n }\n return list;\n }", "List<Category> selectCategoryList();", "public List<Category> getListCategory() {\n List<Category> list = new ArrayList<>();\n SQLiteDatabase sqLiteDatabase = dbHelper.getWritableDatabase();\n\n Cursor cursor = sqLiteDatabase.rawQuery(\"SELECT * FROM Category\", null);\n while (cursor.moveToNext()) {\n int id =cursor.getInt(0);\n\n Category category = new Category(id, cursor.getString(cursor.getColumnIndex(\"Name\")), cursor.getString(cursor.getColumnIndex(\"Image\")));\n Log.d(\"TAG\", \"getListCategory: \" + category.getId());\n list.add(category);\n }\n cursor.close();\n dbHelper.close();\n return list;\n }", "String getCategory();", "String getCategory();", "public ArrayList<String[]> getCategoriesByParentID(int categoryId) {\n ArrayList<String[]> categories = new ArrayList<String[]>();\n try {\n if (connection != null) {\n String query = \"SELECT a.[CatID], a.[Category], COUNT(b.[CatID])\\n\"\n + \"FROM [capstone].[dbo].[tblCategoryID] a, [capstone].[dbo].[tblCategoryID] b\\n\"\n + \"WHERE a.[ParentID] \" + ((categoryId > 0) ? \"= \" + categoryId : \"IS NULL\") + \"\\n\"\n + \"AND b.[ParentID] = a.[CatID]\\n\"\n + \"GROUP BY a.[CatID], a.[Category], b.[ParentID]\\n\"\n + \"UNION\\n\"\n + \"SELECT [CatID], [Category], 0\\n\"\n + \"FROM [capstone].[dbo].[tblCategoryID]\\n\"\n + \"WHERE [ParentID] \" + ((categoryId > 0) ? \"= \" + categoryId : \"IS NULL\") + \"\\n\"\n + \"AND [CatID] NOT IN (\\n\"\n + \"\tSELECT DISTINCT [ParentID]\\n\"\n + \"\tFROM [capstone].[dbo].[tblCategoryID]\\n\"\n + \"\tWHERE [ParentID] IS NOT NULL)\\n\"\n + \"AND [CatID] <> 687\\n\" //TODO ugly override, cat 687 and art 13623 cause problems\n + \"ORDER BY a.[Category];\";\n Statement statement = connection.createStatement();\n ResultSet rs = statement.executeQuery(query);\n while (rs.next()) {\n String[] category = {rs.getString(1), rs.getString(2), rs.getString(3)};\n categories.add(category);\n }\n rs.close();\n } else {\n System.out.print(\"No database connection\");\n }\n } catch (SQLException e) {\n System.out.print(e.getMessage());\n } catch (NullPointerException e) {\n System.out.print(e.getMessage());\n }\n return categories;\n }", "private void buildCategories() {\n List<Category> categories = categoryService.getCategories();\n if (categories == null || categories.size() == 0) {\n throw new UnrecoverableApplicationException(\n \"no item types found in database\");\n }\n\n Map<Category, List<Category>> categoriesMap = new HashMap<Category, List<Category>>();\n for (Category subCategory : categories) {\n Category parent = subCategory.getParentCategory();\n if (categoriesMap.get(parent) == null) {\n categoriesMap.put(parent, new ArrayList<Category>());\n categoriesMap.get(parent).add(subCategory);\n } else {\n categoriesMap.get(parent).add(subCategory);\n }\n }\n\n this.allCategories = categories;\n this.sortedCategories = categoriesMap;\n }", "public List<CategoryPath> classify(AodnTerm term) {\n CategoryPath termPath = new CategoryPath(getCategoryLabel(term)); // Category path for this term\n List<CategoryPath> categoryPaths = getPathsForVocabularyTerm(term, termPath);\n\n if (categoryPaths.size() == 0) {\n logger.warn(String.format(\"No category paths found for uri='%s', prefLabel='%s', vocabulary='%s'\",\n term.getUri(), term.getPrefLabel(), vocabularyThesaurus.getThesaurusTitle()));\n }\n\n return categoryPaths;\n }", "@GetMapping(\"/category\")\n\t public ResponseEntity<List<Category>> getcategorys() {\n\n\t List<Category> list = categoryService.getAllcategorys();\n\t if (list.size() <= 0) {\n\t return ResponseEntity.status(HttpStatus.NOT_FOUND).build();\n\t }\n\t return ResponseEntity.status(HttpStatus.CREATED).body(list);\n\t }", "public interface Categories {\n List<String> all();\n List<String> getAdCategories(Ad ad);\n void linkCategories(long id, String[] categories);\n}", "public List<Categoria> listarCategorias(){\n //este metodo devuelve una lista.\n return categoriaRepo.findAll(); \n\n }", "@SuppressWarnings(\"unused\")\n public @NotNull List<String> getRelativeCat(@NotNull List<String> otherCat) {\n List<String> same = new ArrayList<>(category());\n int sameCount = 0;\n for (int i = 0; i < same.size() && i < otherCat.size(); i++) {\n if (!otherCat.get(i).equals(same.get(i))) break;\n sameCount++;\n }\n\n // If there are no elements that are the same, the path must be\n // absolute\n if (sameCount == 0) {\n same.add(0, \"<<\");\n return same;\n }\n\n // Cut off the parts of the label that were the same\n same = same.subList(sameCount, same.size());\n\n // Add the up level symbols\n for (int i = 0; i < (category().size() - sameCount); i++) {\n same.add(0, \"<\");\n }\n\n return same;\n }", "public void displayCategories() {\n System.out.println(\"Categories:\");\n for(int i = 0; i < categories.size(); i++)\n System.out.println((i + 1) + \". \" + categories.get(i).getName());\n }", "@Override\r\n\tpublic List<Category> list() {\n\t\treturn categories;\r\n\t}", "SortedSet<Recipe> findRecipesByCategory(MealCategory category) throws ServiceFailureException;", "List<Category> findAll();", "List<ProductCategory> getAll();", "public List<Category> autocompleteCategory(String name) {\n List<Category> categories = null;\n try {\n DataBaseBroker dbb = new DataBaseBroker();\n dbb.loadDriver();\n dbb.establishConnection();\n categories = dbb.autocompleteCategory(name);\n dbb.commit();\n dbb.closeConnection();\n } catch (Exception ex) {\n Logger.getLogger(GameDBLogic.class.getName()).log(Level.SEVERE, null, ex);\n }\n return categories;\n }", "public List<Question> getCategory(String category) {\n List<Question> questions = loadQuestions(\"quiz/\" + category + \".txt\");\n return questions;\n }", "List<Category> getAllCategories() throws DataBaseException;", "public String getCategories() {\n return getProperty(Property.CATEGORIES);\n }", "List<Category> lisCat() {\n return dao.getAll(Category.class);\n }", "private List<String> getTemplateList(String portletName, String category) throws Exception {\n List<String> templateOptionList = new ArrayList<String>();\n List<Node> templateNodeList = templateManagerService.getTemplatesByCategory(portletName, category, SessionProvider.createSystemProvider());\n for (Node templateNode : templateNodeList) {\n templateOptionList.add(templateNode.getPath());\n }\n return templateOptionList;\n }", "List<SubCategory> getSubCategory(Category category) throws DataBaseException;", "public List<Category> getCategoriesLinkedTo(String link) { \n\t\tlogger.trace(\"getCategoriesLinkedTo\");\n\t\t//\t\tString sql = \"from Link where name Like '%:link%'\";\n\t\tString sql = \"SELECT * FROM Category \"\n\t\t\t\t+ \"WHERE id in (SELECT category FROM Link WHERE name LIKE ?)\";\n\t\tSession session = getCurrentSession(); \n\t\tsession.beginTransaction();\n\n\t\tSQLQuery query = session.createSQLQuery(sql)\n\t\t\t\t.addEntity(Category.class);\n\n\t\tString part = String.format(\"%%%s%%\", link); \n\t\tquery.setParameter(0, part);\n\n\t\tList<Category> categories = query.list();\n\n\t\t/* commit */ \n\t\tsession.getTransaction().commit();\n\n\t\treturn categories; \n\t}", "WebBookNewsCateListResult listAllBookNewsCategories();", "public ArrayList<TagCategory> loadTaglist() {\n\t\tFile src = new File(directory, FILENAME_TAGS);\n\t\treturn storageReader.loadTaglist(src);\n\t}", "public String getCategoryListing(){\n\t\tCategoryDAO daoObject = new CategoryDAO();\n\t\tString result = \"\";\n\t\t/*if(requestCall.equalsIgnoreCase(\"table\")){\n\t\t\t//System.out.println(\"in getCategoryListing service call table\");\n\t\t\tresult = daoObject.getCategoriesAndSubCategories();\n\t\t}else{\n\t\t\tresult = daoObject.getCategories(); \n\t\t}*/\n\t\t//result = daoObject.getCategoriesAndSubCategories();\n\t\tresult = daoObject.getCategories();\n\t\treturn result;\n\t}", "@Test\n public void getAllRecipeCategories_ReturnsList(){\n int returned = testDatabase.addRecipe(testRecipe);\n ArrayList<RecipeCategory> allCategories = testDatabase.getAllRecipeCategories(returned);\n assertNotEquals(\"getAllRecipeCategories - Non-empty List Returned\", 0, allCategories.size());\n }", "public String[] getCategoryList(){\n return new String[]{\n \"Macros\",\n \"Instrument Type\",\n \"TOF_NSCD\",\n \"NEW_SNS\"\n };\n }", "public static void classifyWithAllWords(String[] args) \r\n\t\t\tthrows IOException\r\n\t\t\t{\n\t\tFile dir_location = new File( args[0] ); \r\n\r\n\t\t// Listing of the directory (should contain 2 subdirectories: ham/ and spam/)\r\n\t\tFile[] dir_listing = new File[0];\r\n\r\n\t\t// Check if the cmd line arg is a directory and list it\r\n\t\tif ( dir_location.isDirectory() )\r\n\t\t{\r\n\t\t\tdir_listing = dir_location.listFiles();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println( \"- Error: cmd line arg not a directory.\\n\" );\r\n\t\t\tRuntime.getRuntime().exit(0);\r\n\t\t}\r\n\r\n\t\t// Listings of the two sub-directories (ham/ and spam/)\r\n\t\tFile[] listing_ham = new File[0];\r\n\t\tFile[] listing_spam = new File[0];\r\n\r\n\t\t// Check that there are 2 sub-directories\r\n\t\tboolean hamFound = false; boolean spamFound = false;\r\n\t\tfor (int i=0; i<dir_listing.length; i++) {\r\n\t\t\tif (dir_listing[i].getName().equals(\"ham\")) { listing_ham = dir_listing[i].listFiles(); hamFound = true;}\r\n\t\t\telse if (dir_listing[i].getName().equals(\"spam\")) { listing_spam = dir_listing[i].listFiles(); spamFound = true;}\r\n\t\t}\r\n\t\tif (!hamFound || !spamFound) {\r\n\t\t\tSystem.out.println( \"- Error: specified directory does not contain ham and spam subdirectories.\\n\" );\r\n\t\t\tRuntime.getRuntime().exit(0);\r\n\t\t}\r\n\r\n\t\t// Print out the number of messages in ham and in spam\r\n\t\t//System.out.println( \"\\t number of ham messages is: \" + listing_ham.length );\r\n\t\t//System.out.println( \"\\t number of spam messages is: \" + listing_spam.length );\r\n\r\n\t\t//******************************\r\n\t\t// Create a hash table for the vocabulary (word searching is very fast in a hash table)\r\n\t\tHashtable<String,Multiple_Counter> vocab = new Hashtable<String,Multiple_Counter>();\r\n\t\tMultiple_Counter old_cnt = new Multiple_Counter();\r\n\r\n\t\t//\t\tgw\r\n\t\tHashtable<String,WordStat> vocab_stat = new Hashtable<String,WordStat>();\r\n\r\n\t\tint nWordsHam = 0;\r\n\t\tint nWordsSpam = 0;\r\n\r\n\t\t// Read the e-mail messages\r\n\t\t// The ham mail\r\n\t\tfor ( int i = 0; i < listing_ham.length; i ++ )\r\n\t\t{\r\n\t\t\tFileInputStream i_s = new FileInputStream( listing_ham[i] );\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(i_s));\r\n\t\t\tString line;\r\n\t\t\tString word;\r\n\r\n\t\t\twhile ((line = in.readLine()) != null)\t\t\t\t\t// read a line\r\n\t\t\t{\r\n\t\t\t\tStringTokenizer st = new StringTokenizer(line);\t\t\t// parse it into words\r\n\r\n\t\t\t\twhile (st.hasMoreTokens())\r\n\t\t\t\t{\r\n\t\t\t\t\tword = st.nextToken().replaceAll(\"[^a-zA-Z]\",\"\");\r\n\r\n\t\t\t\t\tif ( !word.equals(\"\") ) { // if string isn't empty\r\n\t\t\t\t\t\tnWordsHam++;\r\n\t\t\t\t\t\tif ( vocab.containsKey(word) )\t\t\t\t// check if word exists already in the vocabulary\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\told_cnt = vocab.get(word);\t// get the counter from the hashtable\r\n\t\t\t\t\t\t\told_cnt.counterHam ++;\t\t\t// and increment it\r\n\r\n\t\t\t\t\t\t\tvocab.put(word, old_cnt);\r\n\r\n\t\t\t\t\t\t\t//gw\r\n\t\t\t\t\t\t\tWordStat ws = vocab_stat.get(word);\r\n\t\t\t\t\t\t\tws.counterHam++;\r\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\tis this necessary?\r\n\t\t\t\t\t\t\tvocab_stat.put(word, ws);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tMultiple_Counter fresh_cnt = new Multiple_Counter();\r\n\t\t\t\t\t\t\tfresh_cnt.counterHam = 1;\r\n\t\t\t\t\t\t\tfresh_cnt.counterSpam = 0;\r\n\r\n\t\t\t\t\t\t\tvocab.put(word, fresh_cnt);\t\t\t// put the new word with its new counter into the hashtable\r\n\t\t\t\t\t\t\t//gw\r\n\t\t\t\t\t\t\tWordStat ws = new WordStat();\r\n\t\t\t\t\t\t\tws.counterHam = 1;\r\n\t\t\t\t\t\t\tws.counterSpam = 0;\r\n\t\t\t\t\t\t\tws.p_w_given_ham_log = 0.0 ; //init\r\n\t\t\t\t\t\t\tws.p_w_given_spam_log = 0.0; //init\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tvocab_stat.put(word, ws);\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tin.close();\r\n\t\t}\r\n\t\t// The spam mail\r\n\t\tfor ( int i = 0; i < listing_spam.length; i ++ )\r\n\t\t{\r\n\t\t\tFileInputStream i_s = new FileInputStream( listing_spam[i] );\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(i_s));\r\n\t\t\tString line;\r\n\t\t\tString word;\r\n\r\n\t\t\twhile ((line = in.readLine()) != null)\t\t\t\t\t// read a line\r\n\t\t\t{\r\n\t\t\t\tStringTokenizer st = new StringTokenizer(line);\t\t\t// parse it into words\r\n\r\n\t\t\t\twhile (st.hasMoreTokens())\r\n\t\t\t\t{\r\n\t\t\t\t\tword = st.nextToken().replaceAll(\"[^a-zA-Z]\",\"\");\r\n\r\n\t\t\t\t\tif ( ! word.equals(\"\") ) {\t\r\n\t\t\t\t\t\tnWordsSpam ++;\r\n\t\t\t\t\t\tif ( vocab.containsKey(word) )\t\t\t\t// check if word exists already in the vocabulary\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\told_cnt = vocab.get(word);\t// get the counter from the hashtable\r\n\t\t\t\t\t\t\told_cnt.counterSpam ++;\t\t\t// and increment it\r\n\r\n\t\t\t\t\t\t\tvocab.put(word, old_cnt);\r\n\r\n\t\t\t\t\t\t\t//gw\r\n\t\t\t\t\t\t\tWordStat ws = vocab_stat.get(word);\r\n\t\t\t\t\t\t\tws.counterSpam++;\r\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\tis this necessary?\r\n\t\t\t\t\t\t\tvocab_stat.put(word, ws);\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tMultiple_Counter fresh_cnt = new Multiple_Counter();\r\n\t\t\t\t\t\t\tfresh_cnt.counterHam = 0;\r\n\t\t\t\t\t\t\tfresh_cnt.counterSpam = 1;\r\n\r\n\t\t\t\t\t\t\tvocab.put(word, fresh_cnt);\t\t\t// put the new word with its new counter into the hashtable\r\n\t\t\t\t\t\t\t//gw\r\n\t\t\t\t\t\t\tWordStat ws = new WordStat();\r\n\t\t\t\t\t\t\tws.counterHam = 0;\r\n\t\t\t\t\t\t\tws.counterSpam = 1;\r\n\t\t\t\t\t\t\tws.p_w_given_ham_log = 0.0 ; //init\r\n\t\t\t\t\t\t\tws.p_w_given_spam_log = 0.0; //init\r\n\t\t\t\t\t\t\tvocab_stat.put(word, ws);\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tin.close();\r\n\t\t}\r\n\r\n\t\t// Print out the hash table\r\n\t\t//\t\tfor (Enumeration<String> e = vocab.keys() ; e.hasMoreElements() ;)\r\n\t\t//\t\t{\t\r\n\t\t//\t\t\tString word;\r\n\t\t//\r\n\t\t//\t\t\tword = e.nextElement();\r\n\t\t//\t\t\told_cnt = vocab.get(word);\r\n\t\t//\r\n\t\t//\t\t\tSystem.out.println( word + \" | in ham: \" + old_cnt.counterHam + \r\n\t\t//\t\t\t\t\t\" in spam: \" + old_cnt.counterSpam);\r\n\t\t//\t\t}\r\n\r\n\t\t// Now all students must continue from here\r\n\t\t// Prior probabilities must be computed from the number of ham and spam messages\r\n\t\t// Conditional probabilities must be computed for every unique word\r\n\t\t// add-1 smoothing must be implemented\r\n\t\t// Probabilities must be stored as log probabilities (log likelihoods).\r\n\t\t// Bayes rule must be applied on new messages, followed by argmax classification (using log probabilities)\r\n\t\t// Errors must be computed on the test set and a confusion matrix must be generated\r\n\r\n\t\t// prior prob\r\n\t\tint nMessagesHam = listing_ham.length;\r\n\r\n\t\tint nMessagesSpam = listing_spam.length;\r\n\r\n\t\tint nMessagesTotal = nMessagesHam + nMessagesSpam;\r\n\r\n\t\tif(nMessagesHam == 0 || nMessagesSpam ==0)\r\n\t\t\tSystem.out.println(\"Zero ham or spam messages\");\r\n\r\n\t\tdouble p_ham_log = Math.log((nMessagesHam* 1.0)/(nMessagesTotal));\r\n\t\tdouble p_spam_log = Math.log((nMessagesSpam* 1.0)/(nMessagesTotal));\r\n\r\n\t\tIterator it = vocab_stat.entrySet().iterator();\r\n\t\tWordStat ws = null;\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tMap.Entry pairs = (Map.Entry) it.next();\r\n\t\t\tString is = (String) pairs.getKey();\r\n\t\t\tws = (WordStat) pairs.getValue();\r\n\r\n\t\t\tws.counterHam ++;\r\n\t\t\tws.counterSpam ++;\r\n\t\t\tnWordsHam ++;\r\n\t\t\tnWordsSpam ++;\r\n\t\t}\r\n\r\n\t\t//System.out.println(\"nWordsHam = \" +nWordsHam);\r\n\t\t//System.out.println(\"nWordsSpam = \" + nWordsSpam);\r\n\r\n\t\t//\t\tgw:\r\n\t\tit = vocab_stat.entrySet().iterator();\r\n\t\tws = null; \r\n\t\twhile (it.hasNext()) {\r\n\t\t\tMap.Entry pairs = (Map.Entry) it.next();\r\n\t\t\tString is = (String) pairs.getKey();\r\n\t\t\tws = (WordStat) pairs.getValue();\r\n\r\n\t\t\tws.p_w_given_ham_log = Math.log(ws.counterHam *1.0 / nWordsHam);\r\n\t\t\tws.p_w_given_spam_log = Math.log(ws.counterSpam *1.0 / nWordsSpam);\r\n\t\t\t//vocab_stat.put(is,ws);\r\n\t\t}\r\n\t\t//\t\tTODO: further confirm arg index\r\n\t\t//test sets\r\n\t\tFile test_dir_location = new File( args[1] ); \r\n\r\n\t\t//\t\tTODO: verify below works\r\n\t\t// Listing of the directory (should contain 2 subdirectories: ham/ and spam/)\r\n\t\tFile[] test_dir_listing = new File[0];\r\n\r\n\r\n\t\t// Check if the cmd line arg is a directory and list it\r\n\t\tif ( test_dir_location.isDirectory() )\r\n\t\t{\r\n\t\t\ttest_dir_listing = test_dir_location.listFiles();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println( \"- Error: cmd line arg not a directory.\\n\" );\r\n\t\t\tRuntime.getRuntime().exit(0);\r\n\t\t}\r\n\r\n\t\t//\t\tTODO: verify File[0]\r\n\t\t// Listings of the two sub-directories (ham/ and spam/)\r\n\t\tFile[] test_listing_ham = new File[0];\r\n\t\tFile[] test_listing_spam = new File[0];\r\n\r\n\t\t// Check that there are 2 sub-directories\r\n\t\tboolean test_hamFound = false; boolean test_spamFound = false;\r\n\t\tfor (int i=0; i<test_dir_listing.length; i++) {\r\n\t\t\tif (test_dir_listing[i].getName().equals(\"ham\")) { test_listing_ham = test_dir_listing[i].listFiles(); test_hamFound = true;}\r\n\t\t\telse if (test_dir_listing[i].getName().equals(\"spam\")) { test_listing_spam = test_dir_listing[i].listFiles(); test_spamFound = true;}\r\n\t\t}\r\n\t\tif (!test_hamFound || !test_spamFound) {\r\n\t\t\tSystem.out.println( \"- Error: specified test directory does not contain ham and spam subdirectories.\\n\" );\r\n\t\t\tRuntime.getRuntime().exit(0);\r\n\t\t}\r\n\r\n\t\t//\t\t// Print out the number of messages in ham and in spam\r\n\t\t//\t\tSystem.out.println( \"\\t number of test ham messages is: \" + test_listing_ham.length );\r\n\t\t//\t\tSystem.out.println( \"\\t number of test spam messages is: \" + test_listing_spam.length );\r\n\r\n\r\n\t\t//\t\tmetrics\r\n\t\tint true_positives = 0; //spam classified as spam\r\n\t\tint true_negatives = 0; //ham classified as ham\r\n\t\tint false_positives = 0; //ham ... as spam\r\n\t\tint false_negatives = 0; //spam... as ham\r\n\r\n\t\t// Test starts\r\n\t\t// The ham mail\r\n\t\tfor ( int i = 0; i < test_listing_ham.length; i ++ )\r\n\t\t{\r\n\t\t\tFileInputStream i_s = new FileInputStream( test_listing_ham[i] );\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(i_s));\r\n\t\t\tString line;\r\n\t\t\tString word;\r\n\r\n\t\t\t//\t\t\tgw:\r\n\t\t\tdouble p_msg_ham_log = 0.0;\r\n\t\t\tdouble p_msg_spam_log = 0.0;\r\n\r\n\t\t\tp_msg_ham_log += p_ham_log;\r\n\t\t\tp_msg_spam_log += p_spam_log;\r\n\t\t\t//\t\t\tgw:\r\n\r\n\t\t\twhile ((line = in.readLine()) != null)\t\t\t\t\t// read a line\r\n\t\t\t{\r\n\t\t\t\tStringTokenizer st = new StringTokenizer(line);\t\t\t// parse it into words\r\n\r\n\t\t\t\twhile (st.hasMoreTokens())\r\n\t\t\t\t{\r\n\t\t\t\t\tword = st.nextToken().replaceAll(\"[^a-zA-Z]\",\"\");\r\n\r\n\t\t\t\t\tif ( !word.equals(\"\") ) { // if string isn't empty\r\n\t\t\t\t\t\t//\t\t\t\t\t\t\tgw:\r\n\t\t\t\t\t\tif(vocab_stat.containsKey(word)){\r\n\t\t\t\t\t\t\tWordStat iws = vocab_stat.get(word); \r\n\t\t\t\t\t\t\tdouble ip_w_given_ham_log = iws.p_w_given_ham_log;\r\n\t\t\t\t\t\t\tdouble ip_w_given_spam_log = iws.p_w_given_spam_log;\r\n\r\n\t\t\t\t\t\t\tp_msg_ham_log += ip_w_given_ham_log ;\r\n\t\t\t\t\t\t\tp_msg_spam_log += ip_w_given_spam_log ;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//\t\t\t\t\t\t\tgw:\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tin.close();\r\n\r\n\t\t\tif (p_msg_spam_log > p_msg_ham_log) false_positives ++;\r\n\t\t\telse true_negatives ++;\r\n\t\t}\r\n\r\n\r\n\t\t// The spam mail\r\n\t\tfor ( int i = 0; i < test_listing_spam.length; i ++ )\r\n\t\t{\r\n\t\t\tFileInputStream i_s = new FileInputStream( test_listing_spam[i] );\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(i_s));\r\n\t\t\tString line;\r\n\t\t\tString word;\r\n\r\n\t\t\t//\t\t\tgw:\r\n\t\t\tdouble p_msg_ham_log = 0.0;\r\n\t\t\tdouble p_msg_spam_log = 0.0;\r\n\r\n\t\t\tp_msg_ham_log += p_ham_log;\r\n\t\t\tp_msg_spam_log += p_spam_log;\r\n\t\t\t//\t\t\tgw:\t\t\t\r\n\r\n\t\t\twhile ((line = in.readLine()) != null)\t\t\t\t\t// read a line\r\n\t\t\t{\r\n\t\t\t\tStringTokenizer st = new StringTokenizer(line);\t\t\t// parse it into words\r\n\r\n\t\t\t\twhile (st.hasMoreTokens())\r\n\t\t\t\t{\r\n\t\t\t\t\tword = st.nextToken().replaceAll(\"[^a-zA-Z]\",\"\");\r\n\r\n\t\t\t\t\tif ( ! word.equals(\"\") ) {\t\r\n\r\n\t\t\t\t\t\t//\t\t\t\t\t\t\tgw:\r\n\t\t\t\t\t\tif(vocab_stat.containsKey(word)){\r\n\t\t\t\t\t\t\tWordStat iws = vocab_stat.get(word); \r\n\t\t\t\t\t\t\tdouble ip_w_given_ham_log = iws.p_w_given_ham_log;\r\n\t\t\t\t\t\t\tdouble ip_w_given_spam_log = iws.p_w_given_spam_log;\r\n\r\n\t\t\t\t\t\t\tp_msg_ham_log += ip_w_given_ham_log ;\r\n\t\t\t\t\t\t\tp_msg_spam_log += ip_w_given_spam_log ;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//\t\t\t\t\t\t\tgw:\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tin.close();\r\n\t\t\tif (p_msg_spam_log > p_msg_ham_log) true_positives ++;\r\n\t\t\telse false_negatives ++;\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Result 1:\");\r\n\t\tSystem.out.println(\"All_Words\\t\\ttrue spam\\ttrue ham\");\r\n\t\tSystem.out.println(\"Classified spam:\\t\"+true_positives+\"\\t\\t\"+false_positives);\r\n\t\tSystem.out.println(\"Classified ham: \\t\"+false_negatives+\"\\t\\t\"+ true_negatives);\r\n\t\tSystem.out.println(\"\");\r\n\r\n\r\n\t\t\t}", "private static void extractNamesAndLinks(\n final List<CategoryName> path,\n final Map<String, String> categoryNames,\n final Map<String, Set<String>> links\n ) {\n Set<String> children;\n String parent = null;\n\n for (final CategoryName category : path) {\n if (parent != null) {\n children = links.get(parent);\n if (children == null) {\n children = new LinkedHashSet<>();\n }\n children.add(category.getId());\n links.put(parent, children);\n }\n parent = category.getId();\n categoryNames.put(category.getId(), category.getName());\n }\n }", "@Override\n\tpublic List<Literature> searchCategory(String category) {\n\t\treturn null;\n\t}", "public Vector<Vector<String>> getCategoryList()\r\n\t{\r\n\t\ttry \r\n\t\t{\r\n\t\t\tString sql = \"SELECT * FROM categories\";\r\n\t\t\t\r\n\t\t\t//ResultSet rs= this.statement.executeQuery(sql);\t\t\r\n\t\t\tDataAccess data = new DataAccess();\r\n\t\t\tResultSet rs=data.getResultSet(sql);\t\t\r\n\t\t\tVector<Vector<String>> list= new Vector<Vector<String>>();\r\n\t\t\twhile (rs.next())\r\n\t\t\t{\r\n\t\t\t\tVector <String> result = new Vector <String>();\r\n\t\t\t\tresult.add(rs.getString(1));\r\n\t\t\t\tresult.add(rs.getString(2));\r\n\t\t\t\tresult.add(rs.getString(3));\t\t\t\t\t\t\r\n\t\t\t\tlist.add(result);\r\n\t\t\t}\r\n\t\t\trs.close();\r\n\t\t\treturn list;\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch (Exception ex)\r\n\t\t{\r\n\t\t\tex.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public static List<String> buscarCategoriaDoLivro(){\n List<String> categoriasLivros=new ArrayList<>();\n Connection connector=ConexaoDB.getConnection();\n String sql=\"Select category from bookCategory\";\n Statement statement=null;\n ResultSet rs=null;\n String nome;\n try {\n statement=connector.createStatement();\n rs=statement.executeQuery(sql);\n while (rs.next()) {\n nome=rs.getString(\"category\");\n categoriasLivros.add(nome);\n }\n \n } catch (Exception e) {\n \n }finally{\n ConexaoDB.closeConnection(connector, statement, rs);\n }\n return categoriasLivros;\n}", "public static List<Category> getCategories(Context context) {\r\n DbManager dbManager = new DbManager(context);\r\n SQLiteDatabase db = dbManager.getReadableDatabase();\r\n\r\n Cursor cursor = db.query(\r\n CategoryTable.TABLE_NAME,\r\n new String[]{CategoryTable._ID, CategoryTable.COLUMN_NAME_CATEGORY_NAME},\r\n CategoryTable.COLUMN_NAME_IS_DELETED + \" = 0\",\r\n null,\r\n null,\r\n null,\r\n CategoryTable.COLUMN_NAME_CATEGORY_NAME + \" ASC\"\r\n );\r\n\r\n List<Category> categories = new ArrayList<>();\r\n while(cursor.moveToNext()) {\r\n Category category = new Category();\r\n category._id = cursor.getInt(cursor.getColumnIndexOrThrow(CategoryTable._ID));\r\n category.category = cursor.getString(cursor.getColumnIndexOrThrow(CategoryTable.COLUMN_NAME_CATEGORY_NAME));\r\n categories.add(category);\r\n }\r\n cursor.close();\r\n db.close();\r\n\r\n return categories;\r\n }", "@Override\n\tpublic void verifyCategories() {\n\t\t\n\t\tBy loc_catNames=MobileBy.xpath(\"//android.widget.TextView[@resource-id='com.ionicframework.SaleshuddleApp:id/category_name_tv']\");\n\t\tPojo.getObjSeleniumFunctions().waitForElementDisplayed(loc_catNames, 15);\n\t\tList<AndroidElement> catNames=Pojo.getObjSeleniumFunctions().getWebElementListAndroidApp(loc_catNames);\n\t\tList<String> catNamesStr=new ArrayList<String>();\n\t\t\n\t\t\n\t\tfor(AndroidElement catName:catNames)\n\t\t{\n\t\t\tcatNamesStr.add(catName.getText().trim());\n\t\t}\n\t\t\n\t\tif(catNamesStr.size()==0)\n\t\t{\n\t\tPojo.getObjUtilitiesFunctions().logTestCaseStatus(\"Verify that catgory names are correct\", false);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tPojo.getObjUtilitiesFunctions().logTestCaseStatus(\"Verify that catgory names are correct\", BuildSpGamePage.expectedData.get(\"Categories\").containsAll(catNamesStr));\n\n\t\t}\n\t\t}", "public Set<String> getAllBooksCategories() {\n List<Book> books = bookRepository.findAll();\n Set<String> categories = new HashSet<>();\n for (Book book : books) {\n if (book.getCategories() != null) {\n categories.addAll(Arrays.asList(book.getCategories()));\n }\n }\n return categories;\n }", "List<Channel> getJXCategory();", "public List<String> getSubCategoryLst()\n {\n List<String> subCategories = new ArrayList<String>();\n\n for (int i = 0; i < locationLst.size(); i++) {\n String subCategory = locationLst.get(i).getSubCategory();\n\n if(subCategory != \"\" && !subCategories.contains(subCategory))\n subCategories.add(subCategory);\n }\n\n return subCategories;\n }", "List<Categorie> findAll();", "public List<ItemCategory> getByCat(int id) {\n return repository.findByCategoryId(id);\n }", "@Override\n\tpublic List<Categories> getListCat() {\n\t\treturn categoriesDAO.getListCat();\n\t}", "public void chooseCategory(String category) {\n for (Category c : categories) {\n if (c.getName().equals(category)) {\n if (c.isActive()) {\n c.setInActive();\n } else {\n c.setActive();\n }\n }\n }\n for (int i = 0; i < categories.size(); i++) {\n System.out.println(categories.get(i).getName());\n System.out.println(categories.get(i).isActive());\n }\n }", "private static String getCategories(JSONObject volumeInfo) throws JSONException {\n JSONArray categories = volumeInfo.optJSONArray(\"categories\");\n if (categories == null) {\n Log.e(LOG_TAG, \"No categories for this book\");\n return null;\n }\n StringBuilder categoriesString = new StringBuilder();\n for (int i = 0; i < categories.length(); i++) {\n categoriesString.append(categories.getString(i));\n if (i + 1 < categories.length()) {\n categoriesString.append(\", \");\n }\n }\n return categoriesString.toString();\n }", "@Override\r\n\tpublic List<Category> getAllCategory() {\n\t\treturn categoryDao.getAll();\r\n\t}", "Map<Long, List<String>> retrieveCategoriesForTargetTable(TargetTable ttable);", "public List<String> categories() {\n return this.categories;\n }", "private void lanzarListadoCategorias() {\n\t\tIntent i = new Intent(this, ListCategorias.class);\n\t\tstartActivity(i);\n\t\t\n\t}", "public List<PkgCategory<AndroidVersion>> getFilteredApiCategories(List<PkgCategory<AndroidVersion>> cats) {\r\n\t\tif (!isFilterOn())\r\n\t\t\treturn cats;\r\n\t\tList<PkgCategory<AndroidVersion>> selectCategories = new ArrayList<>();\r\n\t\tfor (PkgCategory<AndroidVersion> cat: cats) {\r\n\t\t\tCategoryKeyType catKeyType = cat.getKeyType();\r\n\t\t\tswitch(catKeyType) {\r\n\t\t\tcase TOOLS:\r\n\t\t\tcase TOOLS_PREVIEW: \r\n\t\t\t\tif (selectTools)\r\n\t\t\t\t\tselectCategories.add(cat);\r\n\t\t\t\tbreak;\r\n\t\t\tcase API: \r\n\t\t\tcase EARLY_API: \r\n\t\t\t\tif (selectApi)\r\n\t\t\t\t\tselectCategories.add(cat);\r\n\t\t\t\tbreak;\r\n\t\t\tcase EXTRA: \r\n\t\t\t\tif (selectExtra)\r\n\t\t\t\t\tselectCategories.add(cat);\r\n\t\t\t\tbreak;\r\n\t\t\tcase GENERIC: \r\n\t\t\t\tif (selectGeneric)\r\n\t\t\t\t selectCategories.add(cat);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn selectCategories;\r\n\t}" ]
[ "0.62352705", "0.6049592", "0.59780836", "0.5945379", "0.5943151", "0.5940328", "0.5935036", "0.5875071", "0.58485407", "0.5833109", "0.57778764", "0.57481414", "0.573418", "0.5731366", "0.5724943", "0.5720205", "0.5705516", "0.5690719", "0.5686872", "0.5640051", "0.5595951", "0.55943394", "0.55446714", "0.5534265", "0.55154747", "0.55116975", "0.5459705", "0.54554796", "0.5428923", "0.5417313", "0.541351", "0.5389535", "0.53694534", "0.53688323", "0.53564996", "0.53559905", "0.5347606", "0.5346816", "0.5336582", "0.5333865", "0.53281933", "0.5326922", "0.5324805", "0.5323733", "0.5318609", "0.5315913", "0.53108674", "0.5309816", "0.5306189", "0.5302733", "0.52990896", "0.52988386", "0.52817225", "0.5278155", "0.5278155", "0.5266636", "0.5261794", "0.52592534", "0.5244164", "0.5243614", "0.52347803", "0.523374", "0.523236", "0.5231681", "0.5227441", "0.5215437", "0.52146256", "0.52130115", "0.520615", "0.5200829", "0.51960766", "0.5190973", "0.51903933", "0.51852113", "0.51732516", "0.5172168", "0.5163163", "0.5146182", "0.5145508", "0.51418567", "0.5138815", "0.51349604", "0.5132244", "0.51313514", "0.5128296", "0.51189935", "0.5118639", "0.5117091", "0.51123405", "0.51074636", "0.510731", "0.51006705", "0.5099975", "0.509984", "0.5097522", "0.50884163", "0.5087489", "0.50861794", "0.5085073", "0.5081908" ]
0.6283056
0
read the data from the category files and store into 2d array data in the form of i.e. [animals line line line line line countries line line line line line]
private void readCategories() throws Exception { //reads files in nz category if (_nzCategories.size() > 0) { for (String category: _nzCategories) { // read each individual line from the category files and store it try { File file = new File("categories/nz/", category); Scanner myReader = new Scanner(file); List<String> allLines = new ArrayList<String>(); while(myReader.hasNextLine()) { String fileLine = myReader.nextLine(); allLines.add(fileLine); } List<String> copy = new ArrayList<String>(allLines); _nzData.put(category, copy); allLines.clear(); myReader.close(); } catch (FileNotFoundException e) { e.printStackTrace(); } } } //reads file in international categories if (_intCategories.size() > 0) { for (String category: _intCategories) { // read each individual line from the category files and store it try { File file = new File("categories/international/", category); Scanner myReader = new Scanner(file); List<String> allLines = new ArrayList<String>(); while(myReader.hasNextLine()) { String fileLine = myReader.nextLine(); allLines.add(fileLine); } List<String> copy = new ArrayList<String>(allLines); _intData.put(category, copy); allLines.clear(); myReader.close(); } catch (FileNotFoundException e) { e.printStackTrace(); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void readInCategories() {\n // read CSV file for Categories\n allCategories = new ArrayList<Category>();\n InputStream inputStream = getResources().openRawResource(R.raw.categories);\n CSVFile csvFile = new CSVFile(inputStream);\n List scoreList = csvFile.read();\n // ignore first row because it is the title row\n for (int i = 1; i < scoreList.size(); i++) {\n String[] categoryInfo = (String[]) scoreList.get(i);\n\n // inputs to Category constructor:\n // String name, int smallPhotoID, int bannerPhotoID\n\n // get all image IDs according to the names\n int smallPhotoID = context.getResources().getIdentifier(categoryInfo[1], \"drawable\", context.getPackageName());\n int bannerPhotoID = context.getResources().getIdentifier(categoryInfo[2], \"drawable\", context.getPackageName());\n allCategories.add(new Category(categoryInfo[0],smallPhotoID, bannerPhotoID));\n\n //System.out.println(\"categoryInfo: \" + categoryInfo[0] + \" \" + categoryInfo[1] + \" \" + categoryInfo[2]);\n }\n }", "public void readFile(String filename){\n\t\ttry{\n\t\t\tBufferedReader bf = new BufferedReader(new FileReader(filename));\n\t\t\tString line;\n\t\t\tString[] categories = new String[5];\n\t\t\tline = bf.readLine();\n\t\t\tint[] pointValues = new int[5];\n\t\t\tboolean FJ = false;\n\t\t\t\n\t\t\t// Read the first line\n\t\t\tint index = 0;\n\t\t\tint catnum = 0;\n\t\t\twhile(catnum < 5){\n\t\t\t\tcategories[catnum] = readWord(line, index);\n\t\t\t\tindex += categories[catnum].length();\n\t\t\t\tif(index == line.length()-1){\n\t\t\t\t\tSystem.out.println(\"Error: Too few categories.\");\n\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t}\n\t\t\t\tfor(int i = 0; i < catnum; i++){\n\t\t\t\t\tif(categories[i].equals(categories[catnum])){\n\t\t\t\t\t\tSystem.out.println(\"Error: Duplicate categories.\");\n\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(catnum < 4)\n\t\t\t\t\tindex += 2;\n\t\t\t\tcatnum++;\n\t\t\t}\n\t\t\tif(index < line.length()-1){\n\t\t\t\tSystem.out.println(\"Error: Too many categories.\");\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t\t\n\t\t\tCategory cat1, cat2, cat3, cat4, cat5, cat6;\n\t\t\tcat1 = new Category(categories[0]);\n\t\t\tcat2 = new Category(categories[1]);\n\t\t\tcat3 = new Category(categories[2]);\n\t\t\tcat4 = new Category(categories[3]);\n\t\t\tcat5 = new Category(categories[4]);\n\t\t\tcat6 = new Category(\"FJ\");\n\n\t\t\t// Read the second line\n\t\t\tline = bf.readLine();\n\t\t\t//System.out.println(line);\n\t\t\tindex = 0;\n\t\t\tint pointnum = 0;\n\t\t\twhile(pointnum < 5){\n\t\t\t\tint point = 0;\n\t\t\t\ttry{\n\t\t\t\t\tpoint = Integer.parseInt(readWord(line, index));\n\t\t\t\t\tindex += (readWord(line, index)).length();\n\t\t\t\t}\n\t\t\t\tcatch(Exception e){\n\t\t\t\t\tSystem.out.println(e);\n\t\t\t\t\tSystem.out.println(\"Error: point value not integer.\");\n\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tpointValues[pointnum] = point;\n\t\t\t\tfor(int i = 0; i < pointnum; i++){\n\t\t\t\t\tif(pointValues[pointnum] == pointValues[i]){\n\t\t\t\t\t\tSystem.out.println(\"Error: Duplicate point values\");\n\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(pointnum <4)\n\t\t\t\t\tindex += 2;\n\t\t\t\tpointnum++;\n\t\t\t}\n\t\t\tif(index < line.length()-1){\n\t\t\t\tSystem.out.println(\"Error: Too many point values.\");\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t\t\n\t\t\t// Read in the questions\n\t\t\tString q=\"\";\n\t\t\tString a=\"\";\n\t\t\tString category=\"\";\n\t\t\tint point=0;\n\t\t\tint colonNumber = 0;\n\t\t\tQuestion question = new Question(0, \"\", \"\");\n\t\t\t\n\t\t\twhile((line = bf.readLine())!= null && line.length() != 0){\n\t\t\t\tindex = 0;\n\t\t\t\t// New question, initialize all vars\n\t\t\t\tif(line.substring(0,2).equals(\"::\")){\n\t\t\t\t\t// Add the previous question\n\t\t\t\t\tif(question.getPoint() != 0){\n\t\t\t\t\t\tif(category.equals(cat1.getName())){\n\t\t\t\t\t\t\tcat1.addQuestion(question);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(category.equals(cat2.getName())){\n\t\t\t\t\t\t\tcat2.addQuestion(question);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(category.equals(cat3.getName())){\n\t\t\t\t\t\t\tcat3.addQuestion(question);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(category.equals(cat4.getName())){\n\t\t\t\t\t\t\tcat4.addQuestion(question);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(category.equals(cat5.getName())){\n\t\t\t\t\t\t\tcat5.addQuestion(question);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(category.equals(\"FJ\")){\n\t\t\t\t\t\t\tcat6.addQuestion(question);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tSystem.out.println(\"Error: Wrong category name.\");\n\t\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\ta=\"\";\n\t\t\t\t\tq=\"\";\n\t\t\t\t\tcategory=\"\";\n\t\t\t\t\tpoint = 0;\n\t\t\t\t\tindex += 2;\n\t\t\t\t\tcolonNumber = 1;\n\t\t\t\t\tquestion = new Question(0, \"\", \"\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// If FJ cont'd\n\t\t\t\telse{\n\t\t\t\t\tif(category.equals(\"FJ\")){\n\t\t\t\t\t\twhile(index < line.length()){\n\t\t\t\t\t\t\tswitch(colonNumber){\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\tq += readWord(line, index);\n\t\t\t\t\t\t\t\tindex += readWord(line, index).length();\n\t\t\t\t\t\t\t\tquestion.setQuestion(q);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\ta += readWord(line, index);\n\t\t\t\t\t\t\t\tindex += readWord(line, index).length();\n\t\t\t\t\t\t\t\tquestion.setAnswer(a);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tSystem.out.println(\"Error: Format error.\");\n\t\t\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(colonNumber < 3 && index < line.length()-1 && line.substring(index, index+2).equals(\"::\")){\n\t\t\t\t\t\t\t\tindex+=2;\n\t\t\t\t\t\t\t\tcolonNumber++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// FJ starts\n\t\t\t\tif(readWord(line, index).equals(\"FJ\")){\n\t\t\t\t\tif(FJ){\n\t\t\t\t\t\tSystem.out.println(\"Error: Multiple final jeopardy questions.\");\n\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t}\n\t\t\t\t\tFJ = true;\n\t\t\t\t\tpoint = -100;\n\t\t\t\t\tcategory = \"FJ\";\n\t\t\t\t\tindex += 4;\n\t\t\t\t\tcolonNumber++;\n\t\t\t\t\tif(index < line.length()-1)\n\t\t\t\t\t\tq += readWord(line, index);\n\t\t\t\t\tindex += q.length();\n\t\t\t\t\tindex += 2;\n\t\t\t\t\tif(index < line.length()-1)\n\t\t\t\t\t\ta += readWord(line, index);\n\t\t\t\t\tquestion.setPoint(point);\n\t\t\t\t\tquestion.setAnswer(a);\n\t\t\t\t\tquestion.setQuestion(q);\n\t\t\t\t}\n\t\t\t\t// Other questions\n\t\t\t\telse{\n\t\t\t\t\twhile(index < line.length()){\n\t\t\t\t\t\t//System.out.println(colonNumber);\n\t\t\t\t\t\tswitch(colonNumber){\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\tcategory = category + readWord(line, index);\n\t\t\t\t\t\t\tboolean right = false;\n\t\t\t\t\t\t\tfor(int i = 0; i < 5; i++){\n\t\t\t\t\t\t\t\tif(categories[i].equals(category))\n\t\t\t\t\t\t\t\t\tright = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(!right){\n\t\t\t\t\t\t\t\tSystem.out.println(\"Error: Wrong category.\");\n\t\t\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tindex += category.length();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\tpoint = Integer.parseInt(readWord(line, index));\n\t\t\t\t\t\t\tright = false;\n\t\t\t\t\t\t\tfor(int i = 0; i < 5; i++){\n\t\t\t\t\t\t\t\tif(pointValues[i] == point)\n\t\t\t\t\t\t\t\t\tright = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(!right){\n\t\t\t\t\t\t\t\tSystem.out.println(\"Error: Wrong point value.\");\n\t\t\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tindex += readWord(line, index).length();\n\t\t\t\t\t\t\tquestion.setPoint(point);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\tq = q + readWord(line, index);\n\t\t\t\t\t\t\tindex += readWord(line, index).length();\n\t\t\t\t\t\t\tquestion.setQuestion(q);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\ta = a+ readWord(line, index);\n\t\t\t\t\t\t\tindex += readWord(line, index).length();\n\t\t\t\t\t\t\tquestion.setAnswer(a);\n\t\t\t\t\t\t\tif(index < line.length()){\n\t\t\t\t\t\t\t\tSystem.out.println(\"Error: Format error.\");\n\t\t\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tSystem.out.println(\"Error: Format error.\");\n\t\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(colonNumber < 4 && index < line.length()-1 && line.substring(index, index+2).equals(\"::\")){\n\t\t\t\t\t\t\tindex += 2;\n\t\t\t\t\t\t\tcolonNumber++;\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\t// Add the last question\n\t\t\tif(category.equals(cat1.getName())){\n\t\t\t\tcat1.addQuestion(question);\n\t\t\t}\n\t\t\telse if(category.equals(cat2.getName())){\n\t\t\t\tcat2.addQuestion(question);\n\t\t\t}\n\t\t\telse if(category.equals(cat3.getName())){\n\t\t\t\tcat3.addQuestion(question);\n\t\t\t}\n\t\t\telse if(category.equals(cat4.getName())){\n\t\t\t\tcat4.addQuestion(question);\n\t\t\t}\n\t\t\telse if(category.equals(cat5.getName())){\n\t\t\t\tcat5.addQuestion(question);\n\t\t\t}\n\t\t\telse if(category.equals(\"FJ\")){\n\t\t\t\tcat6.addQuestion(question);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(\"Error: Wrong category name.\");\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t\t\n\t\t\tmCategories.add(cat1);\n\t\t\tmCategories.add(cat2);\n\t\t\tmCategories.add(cat3);\n\t\t\tmCategories.add(cat4);\n\t\t\tmCategories.add(cat5);\n\t\t\tmCategories.add(cat6);\n\t\t\t\n\t\t\tbf.close();\n\t\t}\n\t\t\n\t\tcatch(IOException ioe){\n\t\t\tSystem.out.println(ioe);\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\t\n\t}", "public void readCategoryFile(File file) {\n\ttry (BufferedReader br = new BufferedReader(new FileReader(file)))\n\t{\n\t\tString sCurrentLine;\n\t\tString [] lineElements;\n\t\t\n\t\tint row = 0;\n\t\twhile ((sCurrentLine = br.readLine()) != null) {\n\t\t\t//System.out.println(sCurrentLine);\n\t\t\t\n\t\t\tlineElements = sCurrentLine.split(\"\\\\s+\");\n\t\t\t//System.out.println(lineElements.length);\n\t\t\tfor (int column = 0; column < lineElements.length; column++) {\t\t\n\t\t\t\t//System.out.println(column);\n\t\t\t\tint category = Integer.parseInt(lineElements[column]);\n\t\t\t\t//System.out.println(vertices.size());\n\t\t\t\tPOI v1 = vertices.get(row);\n\t\t\t\tPOI v2 = vertices.get(column);\n\t\t\t\t\n\t\t\t\tArc arc = getArc(v1, v2);\n\t\t\t\tif (!distMtx) {\n\t\t\t\t\tdouble distance = v1.distanceTo(v2);\n\t\t\t\t\tif (data == Dataset.VERBEECK) {\n\t\t\t\t\t\tdistance = distance / 5.0;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tdistance = distance / 10.0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tarc.setLength(distance);\n\t\t\t\t}\n\t\t\t\tarc.setCategory(category);\n\t\t\t\tif (distConstraint) {\n\t\t\t\t\tarc.setSpeedTable(allOneSpeedTable);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tarc.setSpeedTable(speedTables.get(category));\n\t\t\t\t}\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\trow ++;\n\t\t}\n\t} catch (IOException e) {\n\t\te.printStackTrace();\n\t}\n}", "String [][] importData (String path);", "static void readRecipes() {\n\t\tBufferedReader br = null;\n\t\tString line = \"\";\n\t\tString cvsSplitBy = \",\";\n\t\ttry {\n\n\t\t\tbr = new BufferedReader(new FileReader(inputFileLocation));\n\t\t\twhile ((line = br.readLine()) != null) {\n\n\t\t\t\tString[] currentLine = line.split(cvsSplitBy);\n\t\t\t\tRecipe currentRecipe = new Recipe(currentLine[0]);\n\t\t\t\t/*\n\t\t\t\t * String[] recipe=new String[currentLine.length-1];\n\t\t\t\t * System.arraycopy(currentLine,1,recipe,0,recipe.length-2);\n\t\t\t\t */\n\t\t\t\tString[] recipe = java.util.Arrays.copyOfRange(currentLine, 1,\n\t\t\t\t\t\tcurrentLine.length);\n\t\t\t\tArrayList<String> ingredients = new ArrayList<String>();\n\t\t\t\tfor (String a : recipe) {\n\t\t\t\t\tingredients.add(a);\n\t\t\t\t}\n\t\t\t\tcurrentRecipe.setIngredients(ingredients);\n\t\t\t\tRecipes.add(currentRecipe);\n\t\t\t}\n\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} finally {\n\t\t\tif (br != null) {\n\t\t\t\ttry {\n\t\t\t\t\tbr.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "void readData(String fileName){ \r\n\t\ttry{ \r\n\t\t\tScanner sc = new Scanner(new File(fileName), \"UTF-8\");\r\n\t\t\t\r\n\t\t\t// input grid dimensions and simulation duration in timesteps\r\n\t\t\tdimt = sc.nextInt();\r\n\t\t\tdimx = sc.nextInt(); \r\n\t\t\tdimy = sc.nextInt();\r\n\t\t\t//System.out.println(dimt+\" \"+dimx + \" \"+dimy);\r\n\t\t\t// initialize and load advection (wind direction and strength) and convection\r\n\t\t\tadvection = new Vector[dimt][dimx][dimy];\r\n\t\t\tconvection = new float[dimt][dimx][dimy];\r\n\t\t\tfor(int t = 0; t < dimt; t++)\r\n\t\t\t\tfor(int x = 0; x < dimx; x++)\r\n\t\t\t\t\tfor(int y = 0; y < dimy; y++){\r\n\t\t\t\t\t\tadvection[t][x][y] = new Vector();\r\n\t\t\t\t\t\tadvection[t][x][y].x = Float.parseFloat(sc.next());\r\n\t\t\t\t\t\tadvection[t][x][y].y = Float.parseFloat(sc.next());\r\n\t\t\t\t\t\tconvection[t][x][y] = Float.parseFloat(sc.next());\r\n\t\t\t\t\t\t//System.out.println(advection[t][x][y].x+\" \"+advection[t][x][y].y + \" \"+convection[t][x][y]);\r\n\t\t\t\t\t}\r\n\t\t\t\r\n\t\t\tclassification = new int[dimt][dimx][dimy];\r\n\t\t\tsc.close(); \r\n\t\t} \r\n\t\tcatch (IOException e){ \r\n\t\t\tSystem.out.println(\"Unable to open input file \"+fileName);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tcatch (InputMismatchException e){ \r\n\t\t\tSystem.out.println(\"Malformed input file \"+fileName);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "static void ReadAndWriteDataSet(String folderName) throws IOException\n\t{\n\t\t\n\t\t String path = \"data\"+FS+\"data_stage_one\"+FS+folderName; // Folder path \n\t\t \n\t\t String filename, line;\n\t\t File folder = new File(path);\n\t\t File[] listOfFiles = folder.listFiles();\n\t\t BufferedReader br = null;\n\t\t for(int i=0; i < listOfFiles.length; i++)\n\t\t { \n\t\t\t System.out.println(listOfFiles[i].getName());\n\t\t\t filename = path+FS+listOfFiles[i].getName();\n\t\t\t try\n\t\t\t {\n\t\t\t\t br= new BufferedReader(new FileReader(new File(filename)));\n\t\t\t\t while((line = br.readLine())!= null)\n\t\t\t\t {\n\t\t\t\t\tfor(int j=0; j<prep.length; j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tStringTokenizer st = new StringTokenizer(line);\n\t\t\t\t\t\twhile(st.hasMoreTokens())\n\t\t\t\t\t\t\tif(st.nextToken().equalsIgnoreCase(prep[j]))\n\t\t\t\t\t\t\t{\t//System.out.println(line);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(arr[j] == null)\n\t\t\t\t\t\t\t\t\tarr[j] = new ArrayList<String>();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tarr[j].add(line.toLowerCase().replaceAll(\"\\\\p{Punct}\",\"\").trim().replaceAll(\"\\\\s+\", \" \"));\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t }\n\t\t\t\t \n\t\t\t }\n\t\t\t catch(Exception e)\n\t\t\t {\n\t\t\t\t System.err.println(\"exception: \"+e.getMessage() );\n\t\t\t\t e.printStackTrace();\n\t\t\t\t System.exit(0);\n\t\t\t }\n\t\t\t finally\n\t\t\t {\n\t\t\t\t br.close();\n\t\t\t }\n\t\t }\n\t\t \n\t\t // Writes the entire arraylist(preposition wise seperated files)\n\t\t \n\t\t WriteSeperated(folderName);\n\t\t \n\t\t for(int i=0; i<prep.length; i++)\n\t\t {\n\t\t\t arr[i].clear();\n\t\t }\n\t\t \n\t}", "public static ArrayList<Data> getDataSet(String fileName) {\n ArrayList<Data> dataset = new ArrayList<>();\n Scanner input = new Scanner(Main.class.getResourceAsStream(fileName));\n input.nextLine();\n String line = null;\n int size = 0;\n\n while (input.hasNextLine()) {\n String str = null;\n\n line = input.nextLine();\n line = line.replace(\" \", \"\");\n\n size = line.length() - 1;\n Data data = new Data(size);\n\n for (int i = 0; i < line.length() - 1; i++) {\n data.variables[i] = Character.getNumericValue(line.charAt(i));\n }\n data.setOutput(Character.getNumericValue(line.charAt(size)));\n\n dataset.add(data);\n }\n\n dataset.forEach((data) -> {\n System.out.println(data.printVariables() + \" \" + data.getOutput());\n });\n System.out.println(\"Data loaded\");\n COND_LEN = size;\n GENE_SIZE = (COND_LEN + 1) * NUM_RULES;\n return dataset;\n }", "static public List<Category> categoryReader() throws IOException {\n\n BufferedReader csvReader = new BufferedReader(new FileReader(CATEGORIES_REFERENCE_FILE));\n String row;\n List<Category> dataList = new ArrayList<>();\n\n row = csvReader.readLine();\n while ((row = csvReader.readLine()) != null){\n Category data = new Category();\n String[] datas = row.split(SEPARATOR_COMA);\n\n data.setCategory_id(Integer.parseInt(datas[0]));\n data.setName(datas[1]);\n dataList.add(data);\n\n }\n return dataList;\n }", "public void getDataFromFile(){\n\n try\n {\n File file = new File( fileName );\n FileInputStream fis = new FileInputStream( file );\n DataInputStream in = new DataInputStream(fis);\n BufferedReader br = new BufferedReader(new InputStreamReader(in));\n String message = \"\", eachLine = \"\";\n\n while ((eachLine = br.readLine()) != null) {\n message += eachLine;\n }\n\n //System.out.println(message);\n StringTokenizer tokens = new StringTokenizer(message);\n\n //to set the coordination and demand of each customer\n size = Integer.parseInt(tokens.nextToken());\n processingTime = new double[size][size];\n\n for(int i = 0 ; i < size ; i ++ ){\n for(int j = 0 ; j < size ; j ++ ){\n processingTime[i][j] = Double.parseDouble(tokens.nextToken());\n }\n }\n } //end try\n catch( Exception e )\n {\n e.printStackTrace();\n System.out.println(e.toString());\n } // end catch\n //System.out.println( \"done\" );\n }", "public String[][] loadData(String fileName)\n{\n String[] rows = loadStrings(fileName);\n String[][] dataa = new String [24][7];\n int i = 0;\n for (String row : rows) \n {\n String[] columns = row.split(\",\");\n if (columns.length >= 7) \n {\n for (int j = 0; j < 7; j=j+1)\n {\n dataa [i][j]=columns[j];\n }\n i = i +1;\n }\n }\n return dataa;\n}", "public static void Load(String filename) throws IOException {\n\t\tLineNumberReader lnr = new LineNumberReader(new FileReader(filename));\r\n\t\t linenumber = 0;\r\n\t\t while (lnr.readLine() != null){\r\n\t\t\t linenumber++;\r\n\t\t }\r\n lnr.close();\r\n \tarrr=new String[linenumber][5];\r\n\t\tarr=arrr;\r\n\t\tBufferedReader br=new BufferedReader(new FileReader(filename));\r\n\t\t Scanner sc1=new Scanner(br);\r\n\t\t String ss=sc1.nextLine();\r\n\t\t String[] str1 = ss.split(\",\") ;\r\n\t\t String r=str1[0];\r\n\t\t String t=str1[1];\r\n\t\t String[] str2 = r.split(\":\") ;\r\n\t\t round= Integer.parseInt(str2[1]);\r\n\t\t String[] str3 = t.split(\":\") ;\r\n\t\t who=Integer.parseInt(str3[1]);\r\n\t\t arr=new String[linenumber][5];\r\n\t\t int num=0;\r\n\t\t while(sc1.hasNextLine()) {\t\r\n\t\t\t int i=0;\r\n\t\t\t num++;\r\n\t\t\t String x=sc1.nextLine();\r\n\t\t\tString[] str = x.split(\",\") ;\r\n\t\t\twhile(i<5) {\r\n\t\t\t\tarr[num][i]=str[i];\r\n\t\t\t\ti++;\r\n\t\t\t }\r\n\t\t }\r\n\t\t int c=1;\r\n\t ch=new Character[linenumber];\r\n\r\n\t\t\twhile(c<(linenumber)) {\r\n\t\t\t\t\r\n\t\t\t\tch[c]=new Character(Integer.parseInt(arr[c][0]),Integer.parseInt(arr[c][1]),Integer.parseInt(arr[c][2]),Integer.parseInt(arr[c][3]),arr[c][4]);\t\t\t\t\t\t\t\r\n\t\t\t\tc++;\r\n\t\t\t}\t\r\n\t\t\r\n\t\t sc1.close();\r\n\t\t String file=\"Land.txt\";\r\n\t\t\tBufferedReader br2=new BufferedReader(new FileReader(file));\r\n\t\t\tland=new String[20][2];\r\n\t\t\tland2=new String[20][2];\r\n\t\t\tland=land2;\r\n\t\t\tScanner sc2=new Scanner(br2);\r\n\t\t\tString strr=sc2.nextLine();\r\n\t\t\tnum=0;\r\n\t\t\t while(sc2.hasNextLine()) {\t\r\n\t\t\t\t int i=0;\r\n\t\t\t\t num++;\r\n\t\t\t\t String x=sc2.nextLine();\t\t\t\r\n\t\t\t\tString[] str = x.split(\",\") ;\r\n\t\t\t\twhile(i<2) {\r\n\t\t\t\t\tland[num][i]=str[i];\r\n\t\t\t\t\ti++;\r\n\t\t\t\t }\t\t\t\r\n\t\t\t }\r\n\t\t\t\r\n\t\t\t String url = \"//localhost:3306/checkpoint?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT\";\r\n\t\t // String url=\"//140.127.220.220/\";\r\n\t\t // String dbname=\"CHECKPOINT\";\r\n\t\t\t Connection conn = null;\r\n\t\t try{\r\n\t\t conn = DriverManager.getConnection(protocol + url,username,passwd);\r\n\t\t Statement s = conn.createStatement();\r\n\t\t String sql = \"SELECT PLACE_NUMBER,LAND_PRICE,TOLLS FROM LAND\";\r\n\t\t rs=s.executeQuery(sql);\r\n\t\t p_number=new int[20];\r\n\t\t l_price=new int[20];\r\n\t\t tolls=new int[20];\r\n\t\t grid=0;\r\n\t\t while(rs.next()){\r\n\t\t \tgrid++;\r\n\t\t \tp_number[grid]=rs.getInt(\"PLACE_NUMBER\");\r\n\t\t \tl_price[grid]=rs.getInt(\"LAND_PRICE\");\r\n\t\t \ttolls[grid]=rs.getInt(\"TOLLS\");\t \t\t \t\r\n\t\t }\t\t \t\t \r\n\t\t rs.close();\r\n\t\t conn.close();\r\n\t\t } catch(SQLException err){\r\n\t\t System.err.println(\"SQL error.\");\r\n\t\t err.printStackTrace(System.err);\r\n\t\t System.exit(0);\r\n\t\t }\r\n\t\t\t Land=new Land[20];\r\n\t\t\t Land2=new Land[20];\r\n\t\t\t Land=Land2;\t\t\t \r\n\t\t \tfor(int i=1;i<=grid;i++) {\r\n\t\t \t\tLand[i]=new Land(p_number[i],Integer.parseInt(land[i][1]),l_price[i],tolls[i]);\t \t\t\r\n\t\t \t}\r\n\t\t\t sc2.close();\r\n\t}", "@Override\n public void loadFoodItems(String filePath) {\n file = new File(filePath);\n \n // Check the file existence\n try {\n scnr = new Scanner(file);\n } catch (FileNotFoundException e1) {\n e1.printStackTrace();\n System.out.println(\"no such file\");\n }\n \n // Read the file and save the food info to food class\n try {\n while (scnr.hasNextLine()) {\n \t\n // read line by line\n String text = scnr.nextLine().trim();\n \n // if line is not empty\n \n // load the file to memory\n if (!text.isEmpty()) {\n \t\n String[] objects = text.split(\",\");\n \n //skip the data with wrong format\n if(objects.length != 12) continue;\n String id = objects[0];\n String name = objects[1];\n FoodItem food = new FoodItem(id, name);\n for(int i = 0; i < 5; i++) {\n \tfood.addNutrient(nutrition[i], Double.parseDouble(objects[2*(i+1)+1]));\n }\n foodItemList.add(food);\n \n }\n }\n \n // add the food item to nutrition BPTree\n \n Iterator<FoodItem> foodItr = foodItemList.iterator();\n while(foodItr.hasNext()) {\n \tIterator<BPTree<Double, FoodItem>> treeItr = nutriTree.iterator();\n \tFoodItem tempFood = foodItr.next();\n \tint i = 0;\n while(treeItr.hasNext()) {\n \ttreeItr.next().insert(tempFood.getNutrientValue(nutrition[i]), tempFood);\n \ti ++;\n }\n }\n \n \n scnr.close();\n } catch (Exception e) {\n System.out.println(e.getMessage());\n System.out.println(\"Error in food data processing\");\n }\n }", "private static Wine[] read() {\r\n\t\t// We can add files we would like to parse in the following array. We use an array list\r\n\t\t// because it allows us to add dynamically.\r\n\t\tString[] file_adr = { \"data/winemag-data_first150k.txt\", \"data/winemag-data-130k-v2.csv\" };\r\n\t\tArrayList<Wine> arr_list = new ArrayList<Wine>();\r\n\t\t\r\n\t\tint k = 0;\r\n\t\twhile (k < file_adr.length) {\r\n\t\t\tboolean flag = false;\r\n\t\t\tif (file_adr[k].endsWith(\".csv\")) {\r\n\t\t\t\tflag = true;\r\n\t\t\t}\r\n\t\t\tFile f = new File(file_adr[k]);\r\n\t\t\tScanner sc = null;\r\n\t\t\ttry {\r\n\t\t\t\tsc = new Scanner(f, \"UTF-8\");\r\n\t\t\t} catch (FileNotFoundException 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\tsc.nextLine();\r\n\t\t\tInteger id_count = 0;\r\n\t\t\tif(!flag) {\r\n\t\t\t\twhile (sc.hasNextLine()) {\r\n\t\t\t\t\tString scanned = sc.nextLine();\r\n\t\t\t\t\t// if there is a blank line, skip it before a fail.\r\n\t\t\t\t\tif (scanned.isEmpty()) {\r\n\t\t\t\t\t\tscanned = sc.nextLine();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// use this instead of StringTokenizer because it won't skip empty fields.\r\n\t\t\t\t\tString[] st = scanned.split(\",\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* was put here to make sure all fields show up.\r\n\t\t\t\t\tString toString = \"\";\r\n\t\t\t\t\tfor (int i = 0; i < st.length; i++) {\r\n\t\t\t\t\t\ttoString += st[i] + \", \";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t*/\r\n\t\r\n\t\t\t\t\tString country = st[1];\r\n\t\t\t\t\tString description = \"\";\r\n\t\t\t\t\t// This piece grabs our entire description! this paragraph has our delimiters so it gets split.\r\n\t\t\t\t\tint count = 0;\r\n\t\t\t\t\tfor (int i = 2; i < (st.length - 10) + 2; i++) {\r\n\t\t\t\t\t\tif (st[i].endsWith(\"\\\"\")) {\r\n\t\t\t\t\t\t\tdescription += st[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tdescription += st[i] + \", \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcount++;\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\tString designation = st[count+2];\r\n\t\t\t\t\t\r\n\t\t\t\t\t// next two fields will fail if the field is empty, so make sure we assign it something.\r\n\t\t\t\t\tInteger points = !(st[count+3].isEmpty()) ? Integer.parseInt(st[count+3]) : -1;\r\n\t\t\t\t\t\r\n\t\t\t\t\tDouble price = !(st[count+4].isEmpty()) ? Double.parseDouble(st[count+4]) : -1.0;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString province = st[count+5];\r\n\t\t\t\t\tString[] region = {\r\n\t\t\t\t\t\t\tst[count+6],\r\n\t\t\t\t\t\t\tst[count+7]\r\n\t\t\t\t\t};\r\n\t\t\t\t\tString variety = st[count+8];\r\n\t\t\t\t\tString winery = st[count+9];\r\n\t\t\t\t\t//System.out.println(id_count);\r\n\t\t\t\t\t// unique ID system because some wine bottles have empty names.\r\n\t\t\t\t\tInteger unique_id = id_count++;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] items = {\r\n\t\t\t\t\t\t\tcountry,\r\n\t\t\t\t\t\t\tdescription,\r\n\t\t\t\t\t\t\tdesignation,\r\n\t\t\t\t\t\t\tprovince,\r\n\t\t\t\t\t\t\twinery,\r\n\t\t\t\t\t\t\tvariety\r\n\t\t\t\t\t};\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] reviewer = {\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\tString[] taste = {};\r\n\t\t\t\t\t// Object constructor.\r\n\t\t\t\t\tWine curr_obj = new Wine(items, taste, region, points, unique_id, price, reviewer);\r\n\t\t\t\t\t\r\n\t\t\t\t\tarr_list.add(curr_obj);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tk++;\r\n\t\t\t\tsc.close();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\twhile (sc.hasNextLine()) {\r\n\t\t\t\t\tString scanned = sc.nextLine();\r\n\t\t\t\t\t// if there is a blank line, skip it before a fail.\r\n\t\t\t\t\tif (scanned.isEmpty()) {\r\n\t\t\t\t\t\tscanned = sc.nextLine();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// use this instead of StringTokenizer because it won't skip empty fields.\r\n\t\t\t\t\tString[] st = scanned.split(\",\");\r\n\t\t\t\t\t//System.out.println(arr_list.size());\r\n\t\t\t\t\tid_count = arr_list.size();\r\n\t\t\t\t\t/* was put here to make sure all fields show up.\r\n\t\t\t\t\tString toString = \"\";\r\n\t\t\t\t\tfor (int i = 0; i < st.length; i++) {\r\n\t\t\t\t\t\ttoString += st[i] + \", \";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t*/\r\n\t\t\t\t\t//System.out.println(st[0]);\r\n\t\t\t\t\t/*if(Integer.parseInt(st[0]) == 30350) {\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\tString country = st[1];\r\n\t\t\t\t\tString description = \"\";\r\n\t\t\t\t\t// This piece grabs our entire description! this paragraph has our delimiters so it gets split.\r\n\t\t\t\t\tint count = 0;\r\n\t\t\t\t\tfor (int i = 2; i < (st.length - 12) + 2; i++) {\r\n\t\t\t\t\t\tif (st[i].endsWith(\"\\\"\")) {\r\n\t\t\t\t\t\t\tdescription += st[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tdescription += st[i] + \", \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcount++;\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\tString designation = st[count+2];\r\n\t\t\t\t\t\r\n\t\t\t\t\t// next two fields will fail if the field is empty, so make sure we assign it something.\r\n\t\t\t\t\tInteger points = !(st[count+3].isEmpty()) ? Integer.parseInt(st[count+3]) : -1;\r\n\t\t\t\t\t\r\n\t\t\t\t\tDouble price = !(st[count+4].isEmpty()) ? Double.parseDouble(st[count+4]) : -1.0;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString province = st[count+5];\r\n\t\t\t\t\tString[] region = {\r\n\t\t\t\t\t\t\tst[count+6],\r\n\t\t\t\t\t\t\tst[count+7]\r\n\t\t\t\t\t};\r\n\t\t\t\t\tString taster_name = st[count+8];\r\n\t\t\t\t\tString taster_handle = st[count+9];\r\n\t\t\t\t\tString variety = st[count+10];\r\n\t\t\t\t\tString winery = st[count+11];\r\n\t\t\t\t\t//System.out.println(id_count);\r\n\t\t\t\t\t// unique ID system because some wine bottles have empty names.\r\n\t\t\t\t\tInteger unique_id = id_count++;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] items = {\r\n\t\t\t\t\t\t\tcountry,\r\n\t\t\t\t\t\t\tdescription,\r\n\t\t\t\t\t\t\tdesignation,\r\n\t\t\t\t\t\t\tprovince,\r\n\t\t\t\t\t\t\twinery,\r\n\t\t\t\t\t\t\tvariety\r\n\t\t\t\t\t};\r\n\t\t\t\t\tString[] reviewer = {\r\n\t\t\t\t\t\t\ttaster_name,\r\n\t\t\t\t\t\t\ttaster_handle\r\n\t\t\t\t\t};\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] taste = {};\r\n\t\t\t\t\t// Object constructor.\r\n\t\t\t\t\tWine curr_obj = new Wine(items, taste, region, points, unique_id, price, reviewer);\r\n\t\t\t\t\t\r\n\t\t\t\t\tarr_list.add(curr_obj);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tk++;\r\n\t\t\t\tsc.close();\r\n\t\t\t}\r\n\t\t}\r\n\t\t// We no longer need an array list. we have our size required. Put into an array.\r\n\t\tWine[] array_wines = new Wine[arr_list.size()];\r\n\t\tarray_wines = arr_list.toArray(array_wines);\r\n\t\t\r\n\t\treturn array_wines;\r\n\t\r\n\t}", "private static void readFile(String filePath) {\n\t\ttry {\n\t\t\tString [] data; // Array of strings that contains the different cells.\n\t\t\t\n\t\t\t// Open the file and read it.\n\t\t\tBufferedReader bufferedReader = new BufferedReader(new FileReader(filePath));\n\t\t\t\n\t\t\t// Read the next line;\n\t\t\tdata = bufferedReader.readLine().split(ONE_SPACE);\n\t\t\t\n\t\t\t// Number of photos.\n\t\t\tSystem.out.println(\">> Reading number of photos...\");\n\t\t\tnumberPhotos = Integer.parseInt(data[0]);\n\t\t\t\n\t\t\tSystem.out.println(\">> Reading photos info...\");\n\t\t\tSystem.out.println(\"\");\n\t\t\tfor (int i = 0; i < numberPhotos; i++) {\n\t\t\t\tdata = bufferedReader.readLine().split(ONE_SPACE);\n\t\t\t\t\n\t\t\t\tList<String> tagList = new ArrayList<String>();\n\t\t\t\t\n\t\t\t\tfor (int j = 2; j < data.length; j++) {\n\t\t\t\t\ttagList.add(data[j]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (data[0].toUpperCase().equals(\"V\")) {\n\t\t\t\t\tphotoList.add(new Photo(true, i, tagList));\n\t\t\t\t} else {\n\t\t\t\t\tslideList.add(new Slide(i, i, tagList));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Close the file.\n\t\t\tbufferedReader.close();\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Error while reading the input file: \" + e);\n\t\t}\n\t}", "public void readFiles() {\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\t// Open BufferedReader to open connection to tipslocation URL and read file\n\t\t\tBufferedReader reader1 = new BufferedReader(new InputStreamReader(tipsLocation.openStream()));\n\t\t\t\n\t\t\t// Create local variable to parse through the file\n\t String tip;\n\t \n\t // While there are lines in the file to read, add lines to tips ArrayList\n\t while ((tip = reader1.readLine()) != null) {\n\t tips.add(tip);\n\t }\n\t \n\t // Close the BufferedReader\n\t reader1.close();\n\t \n\t \n\t // Open BufferedReader to open connection to factsLocation URL and read file\n\t BufferedReader reader2 = new BufferedReader(new InputStreamReader(factsLocation.openStream()));\n\t \n\t // Create local variable to parse through the file\n\t String fact;\n\t \n\t // While there are lines in the file to read: parses the int that represents\n\t // the t-cell count that is associated with the line, and add line and int to \n\t // tCellFacts hashmap\n\t while ((fact = reader2.readLine()) != null) {\n\t \t\n\t \tint tCellCount = Integer.parseInt(fact);\n\t \tfact = reader2.readLine();\n\t \t\n\t tCellFacts.put(tCellCount, fact);\n\t }\n\t \n\t // Close the second BufferedReader\n\t reader2.close();\n\t \n\t\t} catch (FileNotFoundException e) {\n\t\t\t\n\t\t\tSystem.out.println(\"Error loading files\"); e.printStackTrace();\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void initMapData() {\n\n\t\ttry {\n\n\t\t\t@SuppressWarnings(\"resource\")\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(mapFile));\n\t\t\t\n\t\t\tfor (int row = 0; row < height; row++) {\n\t\t\t\t\n\t\t\t\t// read a line\n\t\t\t\tString line = br.readLine();\n\t\t\t\t\n\t\t\t\t// if length of this line is different from width, then throw\n\t\t\t\tif (line.length() != width)\n\t\t\t\t\tthrow new InvalidLevelFormatException();\n\t\t\t\t\n\t\t\t\t// split all single characters of this string into array\n\t\t\t\tchar[] elements = line.toCharArray();\n\t\t\t\t\n\t\t\t\t// save these single characters into mapData array\n\t\t\t\tfor (int col = 0; col < width; col++) {\n\t\t\t\t\tmapElementStringArray[row][col] = String.valueOf(elements[col]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "private void readDataFile(int filetype, String filename) {\r\n\t\tint nfields=7; //number of data fields\r\n\t\tint i = 0; //temp elements counter\r\n\t\tint num_elements; //number of items (lines)\r\n\t\tString dataline;\r\n\t\tString[] elementdata;\r\n\t\ttry {\r\n\t\t\tFile filesource = new File(filename);\r\n\t\t\t//open data file\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(filesource.toURI().toURL().openStream()));\r\n\t\t\t//count elements\r\n\t\t\twhile(null != (dataline = in.readLine())) {\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\tin.close();\r\n\t\t\tnum_elements = i;\r\n\t\t\t//num_elements = i+1;\r\n\t\t\t//set arrays size by case\r\n\t\t\tif (filetype == 0) {\r\n\t\t\t\tsetMultipliersArraySize(num_elements);\r\n\t\t\t\tnfields = 3;\r\n\t\t\t}\r\n\t\t\telse if (filetype == 1) {\r\n\t\t\t\tsetCategoriesArraySize(num_elements);\r\n\t\t\t\tnfields = 1;\r\n\t\t\t}\r\n\t\t\telse if (filetype == 2) {\r\n\t\t\t\tsetUnitsArraySize(num_elements);\r\n\t\t\t\tnfields = 7;\r\n\t\t\t}\r\n\t\t\telse if (filetype == 3) {\r\n\t\t\t\tp_label = new String[i];\r\n\t\t\t\tnfields = 1;\r\n\t\t\t}\r\n\r\n\t\t\ti = 0;\r\n\t\t\tin = new BufferedReader(new InputStreamReader(filesource.toURI().toURL().openStream()));\r\n\t\t\t//read lines (each line is one menu element)\r\n\t\t\twhile(null != (dataline = in.readLine())) {\r\n\t\t\t\t//get element data array\r\n\t\t\t\telementdata = StringUtil.splitData(dataline, '\\t', nfields);\r\n\t\t\t\t//assign data\r\n\t\t\t\tif (filetype == 0) { //multipliers file\r\n\t\t\t\t\tp_multiplier_name[i] = getEncodedString(getDefaultValue(elementdata[0], \"\"), p_page_encoding, p_encoding);\r\n\t\t\t\t\tp_multiplier_description[i] = getEncodedString(getDefaultValue(elementdata[1], \"\"), p_page_encoding, p_encoding);\r\n\t\t\t\t\tp_multiplier_value[i] = parseNumber(getDefaultValue(elementdata[2], \"1\"));\r\n\t\t\t\t}\r\n\t\t\t\telse if (filetype == 1) { //category file\r\n\t\t\t\t\tp_category_name[i] = getEncodedString(getDefaultValue(elementdata[0], \"\"), p_page_encoding, p_encoding);\r\n\t\t\t\t}\r\n\t\t\t\telse if (filetype == 2) { //units file\r\n\t\t\t\t\tp_unit_category_id[i] = new Integer(elementdata[0]);\r\n\t\t\t\t\tp_unit_symbol[i] = getEncodedString(getDefaultValue(elementdata[1], \"\"), p_page_encoding, p_encoding);\r\n\t\t\t\t\tp_unit_name[i] = getEncodedString(getDefaultValue(elementdata[2], \"\"), p_page_encoding, p_encoding);\r\n\t\t\t\t\tp_unit_scale[i] = parseNumber(getDefaultValue(elementdata[3], \"1\"));\r\n\t\t\t\t\tp_unit_offset[i] = parseNumber(getDefaultValue(elementdata[4], \"0\"));\r\n\t\t\t\t\tp_unit_power[i] = parseNumber(getDefaultValue(elementdata[5], \"1\"));\r\n\t\t\t\t\tp_unit_description[i] = getEncodedString(getDefaultValue(elementdata[6], \"\"), p_page_encoding, p_encoding);\r\n\t\t\t\t}\r\n\t\t\t\telse if (filetype == 3) { //labels file\r\n\t\t\t\t\tp_label[i] = getEncodedString(getDefaultValue(elementdata[0], \"\"), p_page_encoding, p_encoding);\r\n\t\t\t\t}\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\tin.close();\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 initCases(){\n\t\ttry {\n // This creates an object from which you can read input lines.\n BufferedReader reader = new BufferedReader(new FileReader(filename));\n \n for(int i = 0; i < cases.length; i++){\n \tcases[i] = reader.readLine();\n }\n \n reader.close();\n }\n\t\t//deals with any IO exceptions that may occur\n catch (IOException e) {\n System.out.println(\"Caught IO exception\");\n }\n\t}", "private int[][][] readData(int startElement, int startLine, int endElement, int endLine) throws AreaFileException {\r\n// int[][][]myData = new int[numBands][dir[AD_NUMLINES]][dir[AD_NUMELEMS]];\r\n int numLines = endLine - startLine;\r\n int numEles = endElement - startElement;\r\n// System.out.println(\"linePrefixLength: \" + linePrefixLength);\r\n int[][][] myData = new int[numBands][numLines][numEles];\r\n \r\n if (! fileok) {\r\n throw new AreaFileException(\"Error reading AreaFile data\");\r\n }\r\n\r\n short shdata;\r\n int intdata;\r\n boolean isBrit = \r\n areaDirectory.getCalibrationType().equalsIgnoreCase(\"BRIT\"); \r\n long newPos = 0;\r\n\r\n for (int i = 0; i<numLines; i++) {\r\n newPos = datLoc + linePrefixLength + lineLength * (i + startLine) + startElement * dir[AD_DATAWIDTH];\r\n position = newPos;\r\n// System.out.println(position);\r\n try {\r\n af.seek(newPos);\r\n } catch (IOException e1) {\r\n e1.printStackTrace();\r\n }\r\n \r\n for (int k=0; k<numEles; k++) {\r\n for (int j = 0; j<numBands; j++) {\r\n try {\r\n if (dir[AD_DATAWIDTH] == 1) {\r\n myData[j][i][k] = (int)af.readByte();\r\n if (myData[j][i][k] < 0 && isBrit) {\r\n myData[j][i][k] += 256;\r\n } \r\n// position = position + 1;\r\n } else \r\n\r\n if (dir[AD_DATAWIDTH] == 2) {\r\n shdata = af.readShort();\r\n if (flipwords) {\r\n myData[j][i][k] = (int) ( ((shdata >> 8) & 0xff) | \r\n ((shdata << 8) & 0xff00) );\r\n } else {\r\n myData[j][i][k] = (int) (shdata);\r\n }\r\n// position = position + 2;\r\n } else \r\n\r\n if (dir[AD_DATAWIDTH] == 4) {\r\n intdata = af.readInt();\r\n if (flipwords) {\r\n myData[j][i][k] = ( (intdata >>> 24) & 0xff) | \r\n ( (intdata >>> 8) & 0xff00) | \r\n ( (intdata & 0xff) << 24 ) | \r\n ( (intdata & 0xff00) << 8);\r\n } else {\r\n myData[j][i][k] = intdata;\r\n }\r\n// position = position + 4;\r\n } \r\n } \r\n catch (IOException e) {\r\n myData[j][i][k] = 0;\r\n }\r\n }\r\n }\r\n }\r\n return myData;\r\n }", "private void handleInit() {\n\t\ttry {\n String filePath = \"/app/FOOD_DATA.txt\";\n String line = null;\n FileReader fileReader = new FileReader(filePath);\n BufferedReader bufferedReader = new BufferedReader(fileReader);\n while ((line = bufferedReader.readLine()) != null) {\n System.out.println(line);\n\n String[] foodData = line.split(\"\\\\^\");\n \t\tfor (int i = 2; i < foodData.length; i++) {\n \t\t\tif (foodData[i].equals(\"\")) {\n \t\t\t\tfoodData[i] = \"-1\";\n \t\t\t}\n \t\t}\n String foodName = foodData[0];\n String category = foodData[1];\n double calories = Double.parseDouble(foodData[2]);\n double sodium = Double.parseDouble(foodData[3]);\n double fat = Double.parseDouble(foodData[4]);\n double protein = Double.parseDouble(foodData[5]);\n double carbohydrate = Double.parseDouble(foodData[6]);\n Food food = new Food();\n food.setName(foodName);\n food.setCategory(category);\n food.setCalories(calories);\n food.setSodium(sodium);\n food.setSaturatedFat(fat);\n food.setProtein(protein);\n food.setCarbohydrate(carbohydrate);\n foodRepository.save(food);\n }\n bufferedReader.close();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n \tcategories = Categories.MAIN_MENU;\n }\n\t}", "public void createAnimalsCollection() {\n ArrayList<DataSetAnimal> animalsFetched = getDFO().getAnimalData(getFILE_NAME()).getAnimals();\n setAnimals(new ArrayList<>());\n for (DataSetAnimal animal: animalsFetched) {\n String tmpBreed = animal.getBreedOrType().substring(animal.getBreedOrType().lastIndexOf(\" \") + 1);\n switch (tmpBreed) {\n case \"dolphin\":\n getAnimals().add(new AnimalDolphin(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"duck\":\n getAnimals().add(new AnimalDuck(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"cat\":\n getAnimals().add(new AnimalCat(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"chicken\":\n getAnimals().add(new AnimalChicken(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"horse\":\n getAnimals().add(new AnimalHorse(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"shark\":\n getAnimals().add(new AnimalShark(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"parakeet\":\n getAnimals().add(new AnimalParakeet(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n default:\n getAnimals().add(new AnimalDog(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n }\n }\n }", "void readProducts(String filename) throws FileNotFoundException {\n\t\t//reads the file, computes the number of rows in the file\n\t\tScanner input=new Scanner(new File(filename));\n\t\tint numOfRow=0;\n\t\twhile(input.hasNextLine()) {\n\t\t\tnumOfRow++;\n\t\t\tinput.nextLine();\n\t\t}\n\t\t//load the products array one by one, using constructor\n\t\tproducts=new Product[numOfRow-1];\n\t\tScanner input2=new Scanner(new File(filename));\n\t\tinput2.nextLine();\n\t\tint i=0;\n\t\twhile(input2.hasNextLine()) {\n\t\t\tString row=input2.nextLine();\n\t\t\tString[] split1=row.split(((char)34+\",\"+(char)34));\n\t\t\tproducts[i++]=new Product(split1[0].substring(1, split1[0].length())\n\t\t\t\t\t, split1[1], split1[4], split1[7].substring(0, split1[7].length()-1));\n\t\t}\n\t\t//close the input\n\t\tinput.close();\n\t\tinput2.close();\n\t}", "public void read()\r\n\t{\r\n\t\tScanner input = null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tint i = 0;\r\n\r\n\t\t\tinput = new Scanner(new File(\"netflix.csv\")).useDelimiter(\"[,\\r\\n]\");\r\n\r\n\t\t\twhile (input.hasNext())\r\n\t\t\t{\r\n\t\t\t\tinput.nextLine();\r\n\t\t\t\tString title = input.next();\r\n\r\n\t\t\t\tString rating = input.next();\r\n\r\n\t\t\t\tint year = Integer.parseInt(input.next());\r\n\r\n\t\t\t\tint score = Integer.parseInt(input.next());\r\n\t\t\t\tMovie a = new Movie(title, rating, year, score);\r\n\t\t\t\tdata[i] = a;\r\n\t\t\t\ti++;\r\n\t\t\t\tactualSize++;\r\n\r\n\t\t\t}\r\n\t\t\tinput.close();\r\n\r\n\t\t}\r\n\t\tcatch (FileNotFoundException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"File not found\");\r\n\r\n\t\t}\r\n\r\n\t}", "private void read(String filename) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new FileReader(filename));\n\t\t\n\t\t//a variable that will increase by one each time another element is added to the array\n\t\t//to ensure array size is correct\n\t\tint numStation = 0;\n\t\t\n\t\t//ignores first 6 lines\n\t\tfor(int i = 0; i < 3; ++i){\n\t\t\tbr.readLine();\n\t\t}\n\t\t\n\t\t//sets String equal readline\n\t\tString lineOfData = br.readLine();\n\n\t\twhile(lineOfData != null)\n\t\t{\n\t\t\tString station = new String();\n\t\t\tstation = lineOfData.substring(10,14);\n\t\t\tMesoAsciiCal asciiAverage = new MesoAsciiCal(new MesoStation(station));\n\t\t\tint asciiAvg = asciiAverage.calAverage();\t\t\n\n\t\t\tHashMap<String, Integer> asciiVal = new HashMap<String, Integer>();\n\t\t\t//put the keys and values into the hashmap\n\t\t\tasciiVal.put(station, asciiAvg);\n\t\t\t//get ascii interger avg value\n\t\t\tInteger avg = asciiVal.get(station);\n\t\t\t\n\t\t\thashmap.put(station,avg);\n\t\t\t\n\t\t\tlineOfData = br.readLine();\n\t\t\t\n\t\t}\n\t\t\n\t\tbr.close();\n\t}", "private CategoryDataset createDataset() {\n\t \n\t \tvar dataset = new DefaultCategoryDataset();\n\t \n\t\t\tSystem.out.println(bic);\n\t\t\t\n\t\t\tfor(Map.Entry<String, Integer> entry : bic.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t Integer value = entry.getValue();\n\t\t\t dataset.setValue(value, \"# Bicicletas\", key);\n\t \n\t\t\t}\n\t return dataset;\n\t \n\t }", "private void prepareListData() {\n mCategoryList = new ArrayList<>();\n mFullList = new ArrayList<>();\n for (Category cat : fileSystem.getLocalInformationList())\n {\n List<Object> phraseList = cat.phraseList;\n mCategoryList.add(new Category(phraseList, cat.name));\n }\n mFullList.addAll(mCategoryList);\n\n }", "public static void buildShapesFromFile(String fileName, Shape [] cArray, Shape [] sArray , Shape [] rArray , Shape [] pArray, Shape [] tArray) {\n\r\n\t String path = System.getProperty(\"user.dir\");\r\n\t Shape sp = null; //buffer shape used to append into arrays from file\r\n\t String s; //holds line in file\r\n\r\n\t //try (BufferedReader br = new BufferedReader(new FileReader(\"./Root/\" + fileName))) { // code board\r\n\t // if you run locally on your environment use: new FileReader(path + \"/src/\" + fileName)\r\n\t \r\n\t try (BufferedReader br = new BufferedReader(new FileReader(path + \"/src/package1/\" + fileName))) {\r\n\t \t \r\n int circleIndex = 0;//Stores current available array index & used to count successful shapes created\r\n int squareIndex = 0;\r\n int rectangleIndex = 0;\r\n int parallelogramIndex = 0;\r\n int triangleIndex = 0;\r\n int badLine = 0;\r\n int badShape = 0;\r\n \r\n\t while ((s = br.readLine()) != null) {\r\n\t \t //System.out.println(s); //prints file contents for testing\r\n\t String[] tok = s.split(\",\"); //Split string \"s\" into tok string array using \",\" as delimiter\r\n\t \r\n\t // Second tryblock used to prevent entire method from terminating upon a single invalid line\r\n\t // Could replace second tryblock by catching exceptions within shape constructor instead, but wanted specify practice\r\n\t try{ \r\n\t\t switch(tok[0]){\r\n\t\t \r\n\t\t case \"Circle\": \r\n\t\t sp = new Circle( Double.parseDouble(tok[1]) ); //create shape\r\n\t\t cArray[circleIndex]= sp; //append shape to respective array\r\n\t\t System.out.println(cArray[circleIndex]); //print recently appended shape\r\n\t\t circleIndex++; //increment index \r\n\t\t break;\r\n\t\t \r\n\t\t case \"Square\": \r\n\t\t sp = new Square( Double.parseDouble(tok[1]) ); //create shape\r\n\t\t sArray[squareIndex]= sp; //append shape to respective array\r\n\t\t System.out.println(sArray[squareIndex]); //print recently appended shape\r\n\t\t squareIndex++; //increment index \r\n\t\t break;\r\n\t\t \r\n\t\t case \"Rectangle\": \r\n\t\t sp = new Rectangle( Double.parseDouble(tok[1]) , Double.parseDouble(tok[2]) ); //create shape\r\n\t\t rArray[rectangleIndex]= sp; //append shape to respective array\r\n\t\t System.out.println(rArray[rectangleIndex]); //print recently appended shape\r\n\t\t rectangleIndex++; //increment index \r\n\t\t break;\r\n\t\t \r\n\t\t case \"Parallelogram\":\r\n\t\t sp = new Parallelogram( Double.parseDouble(tok[1]) , Double.parseDouble(tok[2]) ); //create shape\r\n\t\t pArray[parallelogramIndex]= sp; //append shape to respective array\r\n\t\t System.out.println(pArray[parallelogramIndex]); //print recently appended shape\r\n\t\t parallelogramIndex++; //increment index \r\n\t\t break;\r\n\t\t \r\n\t\t case \"Triangle\":\r\n\t\t sp = new Triangle( Double.parseDouble(tok[1]) , Double.parseDouble(tok[2]), Double.parseDouble(tok[3]) ); //create shape\r\n\t\t tArray[triangleIndex]= sp; //append shape to respective array\r\n\t\t System.out.println(tArray[triangleIndex]); //print recently appended shape\r\n\t\t triangleIndex++; //increment index \r\n\t\t break;\r\n\t\t \r\n\t\t default: System.out.println(tok[0] + \" is not a valid shape\");\r\n\t\t \t \t\tbadShape++;\r\n\t\t break; \r\n\t\t }//End of Switch(tok[0])\r\n\t\t \r\n\t\t //prevent entire method from terminating by just reporting a bad line \r\n\t }catch(IllegalArgumentException e){\r\n\t \t badLine++;\r\n\t \t System.out.println(e.getMessage()); \r\n\t }\r\n\t \r\n\t }//While there are lines still being read \r\n\t \r\n\t System.out.println(\"Number of Circle's Created: \" + circleIndex);\r\n\t System.out.println(\"Number of Square's Created: \" + squareIndex);\r\n\t System.out.println(\"Number of Retangle's Created: \" + rectangleIndex);\r\n\t System.out.println(\"Number of Parallelogram's Created: \" + parallelogramIndex);\r\n\t System.out.println(\"Number of Triangle's Created: \" + triangleIndex);\r\n\t System.out.println(\"Number of Incorrect Arguments : \" + badLine);\r\n\t System.out.println(\"Number of Incorrect Shapes : \" + badShape);\r\n\t \r\n\t //catch exceptions related to BufferedReader and FileReader\r\n\t } catch (IOException e) {\r\n\t System.out.println(e.getMessage());\r\n\t }\r\n\r\n\t //void return\r\n\t}", "public static void processData() {\n\t\tString dirName = \"C:\\\\research_data\\\\mouse_human\\\\homo_b47_data\\\\\";\r\n\t//\tString GNF1H_fName = \"GNF1H_genes_chopped\";\r\n\t//\tString GNF1M_fName = \"GNF1M_genes_chopped\";\r\n\t\tString GNF1H_fName = \"GNF1H\";\r\n\t\tString GNF1M_fName = \"GNF1M\";\r\n\t\tString mergedValues_fName = \"GNF1_merged_expression.txt\";\r\n\t\tString mergedPMA_fName = \"GNF1_merged_PMA.txt\";\r\n\t\tString discretizedMI_fName = \"GNF1_discretized_MI.txt\";\r\n\t\tString discretizedLevels_fName = \"GNF1_discretized_levels.txt\";\r\n\t\tString discretizedData_fName = \"GNF1_discretized_data.txt\";\r\n\t\t\r\n\t\tboolean useMotifs = false;\r\n\t\tMicroArrayData humanMotifs = null;\r\n\t\tMicroArrayData mouseMotifs = null;\r\n\t\t\r\n\t\tMicroArrayData GNF1H_value = new MicroArrayData();\r\n\t\tMicroArrayData GNF1H_PMA = new MicroArrayData();\r\n\t\tGNF1H_PMA.setDiscrete();\r\n\t\tMicroArrayData GNF1M_value = new MicroArrayData();\r\n\t\tMicroArrayData GNF1M_PMA = new MicroArrayData();\r\n\t\tGNF1M_PMA.setDiscrete();\r\n\t\t\r\n\t\ttry {\r\n\t\t/*\tGNF1H_value.readFile(dirName+GNF1H_fName+\".gcrma.txt\");\r\n\t\t\tGNF1H_PMA.readFile(dirName+GNF1H_fName+\".pma\");\r\n\t\t\tGNF1M_value.readFile(dirName+GNF1M_fName+\".gcrma.txt\");\r\n\t\t\tGNF1M_PMA.readFile(dirName+GNF1M_fName+\".pma\"); */\r\n\t\t/*\tGNF1H_value.readFile(dirName+GNF1H_fName+\".gcrma.txt.homob44\");\r\n\t\t\tGNF1H_PMA.readFile(dirName+GNF1H_fName+\".pma.txt.homob44\");\r\n\t\t\tGNF1M_value.readFile(dirName+GNF1M_fName+\".gcrma.txt.homob44\");\r\n\t\t\tGNF1M_PMA.readFile(dirName+GNF1M_fName+\".pma.txt.homob44\"); */\r\n\t\t\tGNF1H_value.readFile(dirName+GNF1H_fName+\".gcrma.snco.txt\");\r\n\t\t\tGNF1H_PMA.readFile(dirName+GNF1H_fName+\".pma.sn.txt\");\r\n\t\t\tGNF1M_value.readFile(dirName+GNF1M_fName+\".gcrma.snco.txt\");\r\n\t\t\tGNF1M_PMA.readFile(dirName+GNF1M_fName+\".pma.sn.txt\");\r\n\t\t} catch(IOException e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t\t\r\n\t\tif (useMotifs) {\r\n\t\t\thumanMotifs = new MicroArrayData();\r\n\t\t\tmouseMotifs = new MicroArrayData();\r\n\t\t\tloadMotifs(humanMotifs,GNF1H_value.geneNames,mouseMotifs,GNF1M_value.geneNames);\r\n\t\t}\r\n\t\t\r\n\t\t// combine replicates in PMA values\r\n\t\tint[][] H_PMA = new int[GNF1H_PMA.numRows][GNF1H_PMA.numCols/2];\r\n\t\tint[][] M_PMA = new int[GNF1M_PMA.numRows][GNF1M_PMA.numCols/2];\r\n\t\t\r\n\t\tint i = 0;\r\n\t\tint j = 0;\r\n\t\tint k = 0;\r\n\t\tint v = 0;\r\n\t\tk = 0;\r\n\t\tj = 0;\r\n\t\twhile (j<GNF1H_PMA.numCols-1) {\r\n\t\t\tfor (i=0;i<H_PMA.length;i++) {\r\n\t\t\t\tv = 0;\r\n\t\t\t//\tif (GNF1H_PMA.dvalues[i][j] > 0 & GNF1H_PMA.dvalues[i][j+1] > 0) {\r\n\t\t\t\tif (GNF1H_PMA.dvalues[i][j] > 0 | GNF1H_PMA.dvalues[i][j+1] > 0) {\r\n\t\t\t\t\tv = 1;\r\n\t\t\t\t}\r\n\t\t\t\tH_PMA[i][k] = v;\r\n\t\t\t}\r\n\t\t\tk++;\r\n\t\t\tj = j + 2;\r\n\t\t}\r\n\t\t\r\n\t\tj = 0;\r\n\t\tk = 0;\r\n\t\twhile (j<GNF1M_PMA.numCols-1) {\r\n\t\t\tfor (i=0;i<M_PMA.length;i++) {\r\n\t\t\t\tv = 0;\r\n\t\t\t//\tif (GNF1M_PMA.dvalues[i][j] > 0 & GNF1M_PMA.dvalues[i][j+1] > 0) {\r\n\t\t\t\tif (GNF1M_PMA.dvalues[i][j] > 0 | GNF1M_PMA.dvalues[i][j+1] > 0) {\r\n\t\t\t\t\tv = 1;\r\n\t\t\t\t}\r\n\t\t\t\tM_PMA[i][k] = v;\r\n\t\t\t}\r\n\t\t\tk++;\r\n\t\t\tj = j + 2;\r\n\t\t}\r\n\t\t\r\n\t\tint numMatched = 31;\r\n\t\t\r\n\t/*\tGNF1H_value.numCols = numMatched;\r\n\t\tGNF1M_value.numCols = numMatched; */\r\n\t\t\r\n\t\tint[][] matchPairs = new int[numMatched][2];\r\n\t\tfor(i=0;i<numMatched;i++) {\r\n\t\t\tmatchPairs[i][0] = i;\r\n\t\t\tmatchPairs[i][1] = i + GNF1H_value.numCols;\r\n\t\t}\r\n\t\t\r\n\t//\tDiscretizeAffyData H_discretizer = new DiscretizeAffyData(GNF1H_value.values,H_PMA,0);\r\n\t//\tH_discretizer.adjustIntensities();\r\n\t\ttransformRelativeAbundance(GNF1H_value.values,H_PMA,GNF1H_value.numCols);\r\n\t\t\r\n\t//\tDiscretizeAffyData M_discretizer = new DiscretizeAffyData(GNF1M_value.values,M_PMA,0);\r\n\t//\tM_discretizer.adjustIntensities();\r\n\t\ttransformRelativeAbundance(GNF1M_value.values,M_PMA,GNF1M_value.numCols);\r\n\t\t\r\n\t\tdouble[][] mergedExpression = new double[GNF1H_value.numRows][GNF1H_value.numCols+GNF1M_value.numCols];\r\n\t\tint[][] mergedPMA = new int[GNF1H_value.numRows][GNF1H_value.numCols+GNF1M_value.numCols];\r\n\t\tint[] species = null;\r\n\t\tif (!useMotifs) {\r\n\t\t\tspecies = new int[GNF1H_value.numCols+GNF1M_value.numCols];\r\n\t\t} else {\r\n\t\t\tspecies = new int[GNF1H_value.numCols+GNF1M_value.numCols + humanMotifs.numCols + mouseMotifs.numCols];\r\n\t\t}\r\n\t\t\r\n\t\tfor (i=0;i<GNF1H_value.numRows;i++) {\r\n\t\t\tSystem.arraycopy(GNF1H_value.values[i],0,mergedExpression[i],0,GNF1H_value.numCols);\r\n\t\t\tSystem.arraycopy(H_PMA[i],0,mergedPMA[i],0,GNF1H_value.numCols);\t\r\n\t\t}\r\n\t\tfor (i=0;i<GNF1M_value.numRows;i++) {\r\n\t\t\tSystem.arraycopy(GNF1M_value.values[i],0,mergedExpression[i],GNF1H_value.numCols,GNF1M_value.numCols);\r\n\t\t\tSystem.arraycopy(M_PMA[i],0,mergedPMA[i],GNF1H_value.numCols,GNF1M_value.numCols);\r\n\t\t}\r\n\t\t\r\n\t\t// concatenate experiment and gene names\r\n\t\tfor (i=0;i<GNF1H_value.numCols;i++) {\r\n\t\t\tGNF1H_value.experimentNames[i] = \"h_\" + GNF1H_value.experimentNames[i];\r\n\t\t\tspecies[i] = 1;\r\n\t\t}\r\n\t\tfor (i=0;i<GNF1M_value.numCols;i++) {\r\n\t\t\tGNF1M_value.experimentNames[i] = \"m_\" + GNF1M_value.experimentNames[i];\r\n\t\t\tspecies[i+GNF1H_value.numCols] = 2;\r\n\t\t}\r\n\t\t\r\n\t\tString[] mergedExperimentNames = null;\r\n\t\tif (!useMotifs) {\r\n\t\t\tmergedExperimentNames = new String[GNF1H_value.numCols+GNF1M_value.numCols];\r\n\t\t} else {\r\n\t\t\tmergedExperimentNames = new String[GNF1H_value.numCols+GNF1M_value.numCols + humanMotifs.numCols + mouseMotifs.numCols];\r\n\t\t}\r\n\t\tSystem.arraycopy(GNF1H_value.experimentNames,0,mergedExperimentNames,0,GNF1H_value.numCols);\r\n\t\tSystem.arraycopy(GNF1M_value.experimentNames,0,mergedExperimentNames,GNF1H_value.numCols,GNF1M_value.numCols);\r\n\t\tif (useMotifs) {\r\n\t\t\tSystem.arraycopy(humanMotifs.experimentNames,0,mergedExperimentNames,GNF1H_value.numCols+GNF1M_value.numCols,humanMotifs.numCols);\r\n\t\t\tSystem.arraycopy(mouseMotifs.experimentNames,0,mergedExperimentNames,GNF1H_value.numCols+GNF1M_value.numCols+humanMotifs.numCols,mouseMotifs.numCols);\r\n\t\t\tfor (i=0;i<humanMotifs.numCols;i++) {\r\n\t\t\t\tspecies[i + GNF1H_value.numCols+GNF1M_value.numCols] = 3;\r\n\t\t\t}\r\n\t\t\tfor (i=0;i<mouseMotifs.numCols;i++) {\r\n\t\t\t\tspecies[i + GNF1H_value.numCols+GNF1M_value.numCols + humanMotifs.numCols] = 4;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tString[] mergedGeneNames = new String[GNF1H_value.numRows];\r\n\t\tfor (i=0;i<GNF1M_value.numRows;i++) {\r\n\t\t\tmergedGeneNames[i] = GNF1H_value.geneNames[i] + \"|\" + GNF1M_value.geneNames[i];\r\n\t\t}\r\n\t\t\r\n\t\tint[] filterList = new int[GNF1M_value.numRows];\r\n\t\tint numFiltered = 0;\r\n\t\tdouble maxExpressedPercent = 1.25;\r\n\t\tint maxExpressed_H = (int) Math.floor(maxExpressedPercent*((double) GNF1H_value.numCols));\r\n\t\tint maxExpressed_M = (int) Math.floor(maxExpressedPercent*((double) GNF1M_value.numCols));\r\n\t\tint numExpressed_H = 0;\r\n\t\tint numExpressed_M = 0;\r\n\t\t\r\n\t\tfor (i=0;i<GNF1H_value.numRows;i++) {\r\n\t\t\tnumExpressed_H = 0;\r\n\t\t\tfor (j=0;j<GNF1H_value.numCols;j++) {\r\n\t\t\t\tif (GNF1H_PMA.dvalues[i][j] > 0) {\r\n\t\t\t//\tif (!Double.isNaN(GNF1H_value.values[i][j])) {\r\n\t\t\t//\tif (GNF1H_value.values[i][j] > 1.5) {\r\n\t\t\t\t\tnumExpressed_H++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tnumExpressed_M = 0;\r\n\t\t\tfor (j=0;j<GNF1M_value.numCols;j++) {\r\n\t\t\t\tif (GNF1M_PMA.dvalues[i][j] > 0) {\r\n\t\t\t//\tif (GNF1H_value.values[i][j] > 1.5) {\r\n\t\t\t//\tif (!Double.isNaN(GNF1M_value.values[i][j])) {\r\n\t\t\t\t\tnumExpressed_M++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (numExpressed_M >= maxExpressed_M | numExpressed_H >= maxExpressed_H) {\r\n\t\t\t\tfilterList[i] = 1;\r\n\t\t\t\tnumFiltered++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tGNF1H_value = null;\r\n\t\tGNF1H_PMA = null;\r\n\t\tGNF1M_value = null;\r\n\t\tGNF1M_PMA = null;\r\n\t\t\r\n\t\tdouble[][] mergedExpression2 = null;\r\n\t\tif (numFiltered > 0) {\r\n\t\t\tk = 0;\r\n\t\t\tint[][] mergedPMA2 = new int[mergedPMA.length-numFiltered][mergedPMA[0].length];\r\n\t\t\tif (!useMotifs) {\r\n\t\t\t\tmergedExpression2 = new double[mergedExpression.length-numFiltered][mergedExpression[0].length];\r\n\t\t\t} else {\r\n\t\t\t\tmergedExpression2 = new double[mergedExpression.length-numFiltered][mergedExpression[0].length + humanMotifs.numCols + mouseMotifs.numCols];\r\n\t\t\t}\r\n\t\t\tString[] mergedGeneNames2 = new String[mergedGeneNames.length-numFiltered];\r\n\t\t\tfor (i=0;i<filterList.length;i++) {\r\n\t\t\t\tif (filterList[i] == 0) {\r\n\t\t\t\t\tmergedPMA2[k] = mergedPMA[i];\r\n\t\t\t\t\tif (!useMotifs) {\r\n\t\t\t\t\t\tmergedExpression2[k] = mergedExpression[i];\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tSystem.arraycopy(mergedExpression[i],0,mergedExpression2[k],0,mergedExpression[i].length);\r\n\t\t\t\t\t\tSystem.arraycopy(humanMotifs.values[i],0,mergedExpression2[k],mergedExpression[i].length,humanMotifs.numCols);\r\n\t\t\t\t\t\tSystem.arraycopy(mouseMotifs.values[i],0,mergedExpression2[k],humanMotifs.numCols+mergedExpression[i].length,mouseMotifs.numCols);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmergedGeneNames2[k] = mergedGeneNames[i];\r\n\t\t\t\t\tk++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tmergedPMA = mergedPMA2;\r\n\t\t\tmergedExpression = mergedExpression2;\r\n\t\t\tmergedGeneNames = mergedGeneNames2;\r\n\t\t} else {\r\n\t\t\tif (useMotifs) {\r\n\t\t\t\tmergedExpression2 = new double[mergedExpression.length][mergedExpression[0].length + humanMotifs.numCols + mouseMotifs.numCols];\r\n\t\t\t\tfor (i=0;i<mergedExpression.length;i++) {\r\n\t\t\t\t\tSystem.arraycopy(mergedExpression[i],0,mergedExpression2[i],0,mergedExpression[i].length);\r\n\t\t\t\t\tSystem.arraycopy(humanMotifs.values[i],0,mergedExpression2[i],mergedExpression[i].length,humanMotifs.numCols);\r\n\t\t\t\t\tSystem.arraycopy(mouseMotifs.values[i],0,mergedExpression2[i],humanMotifs.numCols+mergedExpression[i].length,mouseMotifs.numCols);\r\n\t\t\t\t}\r\n\t\t\t\tmergedExpression = mergedExpression2;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tDiscretizeAffyPairedData discretizer = new DiscretizeAffyPairedData(mergedExpression,mergedPMA,matchPairs,20);\r\n\t\tMicroArrayData mergedData = new MicroArrayData();\r\n\t\tmergedData.values = discretizer.expression;\r\n\t\tmergedData.geneNames = mergedGeneNames;\r\n\t\tmergedData.experimentNames = mergedExperimentNames;\r\n\t\tmergedData.experimentCode = species;\r\n\t\tmergedData.numCols = discretizer.numExperiments;\r\n\t\tmergedData.numRows = discretizer.numGenes;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tmergedData.writeFile(dirName+mergedValues_fName);\r\n\t\t\tdiscretizer.discretizeDownTree(dirName+discretizedMI_fName);\r\n\t\t\tdiscretizer.mergeDownLevels(3,dirName+discretizedLevels_fName);\r\n\t\t\tdiscretizer.transposeDExpression();\r\n\t\t\tmergedData.setDiscrete();\r\n\t\t\tmergedData.values = null;\r\n\t\t\tmergedData.dvalues = discretizer.dExpression;\r\n\t\t\tmergedData.writeFile(dirName+discretizedData_fName);\r\n\t\r\n\t\t\tmergedData.dvalues = mergedPMA;\r\n\t\t\tmergedData.numCols = mergedPMA[0].length;\r\n\t\t\tmergedData.writeFile(dirName+mergedPMA_fName);\r\n\t\t} catch(IOException e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t\t\r\n\t/*\tMicroArrayData mergedData = new MicroArrayData();\r\n\t\tmergedData.values = mergedExpression;\r\n\t\tmergedData.geneNames = mergedGeneNames;\r\n\t\tmergedData.experimentNames = mergedExperimentNames;\r\n\t\tmergedData.experimentCode = species;\r\n\t\tmergedData.numCols = mergedExpression[0].length;\r\n\t\tmergedData.numRows = mergedExpression.length;\r\n\t\ttry {\r\n\t\t\tmergedData.writeFile(dirName+mergedValues_fName);\r\n\t\t\tmergedData.setDiscrete();\r\n\t\t\tmergedData.values = null;\r\n\t\t//\tmergedData.dvalues = simpleDiscretization(mergedExpression,mergedPMA);\r\n\t\t\tmergedData.dvalues = simpleDiscretization2(mergedExpression,species);\r\n\t\t\tmergedData.writeFile(dirName+discretizedData_fName);\r\n\t\r\n\t\t\tmergedData.dvalues = mergedPMA;\r\n\t\t\tmergedData.numCols = mergedPMA[0].length;\r\n\t\t\tmergedData.writeFile(dirName+mergedPMA_fName);\r\n\t\t} catch(IOException e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t} */\r\n\t\t\r\n\t}", "public void readAll() throws FileNotFoundException{ \n b = new BinaryIn(this.filename);\n this.x = b.readShort();\n this.y = b.readShort();\n \n int count = (x * y) / (8 * 8);\n this.blocks = new double[count][8][8][3];\n \n Node juuri = readTree();\n readDataToBlocks(juuri);\n }", "private void loadData() {\r\n\t\talert(\"Loading data ...\\n\");\r\n \r\n // ---- categories------\r\n my.addCategory(new Category(\"1\", \"VIP\"));\r\n my.addCategory(new Category(\"2\", \"Regular\"));\r\n my.addCategory(new Category(\"3\", \"Premium\"));\r\n my.addCategory(new Category(\"4\", \"Mierder\"));\r\n \r\n my.loadData();\r\n \r\n\t }", "public void readFile(String filename) throws IOException {\n BufferedReader buffer = new BufferedReader(new FileReader(filename));\n\n String line;\n int row = 0;\n isFirstLine = true;\n\n while ((line = buffer.readLine()) != null) {\n String[] vals = line.trim().split(\"\\\\s+\");\n int length = vals.length;\n \n if(isFirstLine) {\n \tfor(int col = 0; col < 2; col++) {\n \t\tif(col == 0)\n \t\t\trowSize = Integer.parseInt(vals[col]);\n \t\telse\n \t\t\tcolSize = Integer.parseInt(vals[col]);\n \t}\n \tskiMap = new int[rowSize][colSize];\n \tisFirstLine = false;\n }\n else {\n \tfor (int col = 0; col < length; col++) {\n \tskiMap[row][col] = Integer.parseInt(vals[col]);\n }\n \t row++;\n }\n }\n \n if(buffer != null)\n \tbuffer.close();\n }", "public static double[][] loadData() {\n double[][] data = null;;\n \n try {\n // create a path to the file\n File file = new File(\"data.csv\");\n \n // create a scanner to read the file\n Scanner inputFile = new Scanner(file);\n \n // count the number of entries in the file so we know how big\n // data needs to be.\n int index = 0;\n \n // count the rows in the file\n while(inputFile.hasNext()) {\n inputFile.nextLine();\n index++;\n }\n \n // declare the array.\n // first row is X, second row is Y\n data = new double[2][index];\n \n // create a new scanner so we can go back to the beginning of the file\n inputFile = new Scanner(file);\n \n // reset index to zero so we can assign array values properly\n index = 0;\n \n // a String to hold the lines as they are read from the file.\n String input = \"\";\n \n // the file should consist of a list of ordered pairs x,y\n // one ordered pair per line. assign these to the appropriate\n // places in the array\n while (inputFile.hasNext()) {\n // read the line\n input = inputFile.nextLine();\n \n // store the x value in the first array\n data[0][index] = Double.parseDouble(input.split(\",\")[0]);\n \n // store the y value in the second array\n data[1][index] = Double.parseDouble(input.split(\",\")[1]);\n \n // increment\n index++;\n }\n \n // done working with the file\n inputFile.close();\n } catch (FileNotFoundException ex) {\n System.out.println(\"File not found: \" + ex);\n } \n \n return data; \n }", "public void read()\r\n {\r\n String line = \"\";\r\n int numberOfLine = 0;\r\n BufferedReader input;\r\n \r\n try\r\n {\r\n input = new BufferedReader (new FileReader (\"Countries-Population.txt\"));\r\n \r\n //loop for as long as there is data in the file\r\n while (line != null)\r\n {\r\n line = input.readLine (); //reads each line in the file\r\n numberOfLine++;\r\n }\r\n input.close (); //closes the stream\r\n }\r\n catch (IOException e)\r\n {\r\n JOptionPane.showMessageDialog (null, \"Sorry, this file cannot be found. Please enter a different file name.\"); //error message\r\n }\r\n \r\n //create array with size to match number of lines in file\r\n String[] linesFile = new String [numberOfLine - 1], countryStr = new String[numberOfLine-1], capitalStr = new String[numberOfLine-1]; \r\n int[] intArray = new int[numberOfLine - 1];\r\n double[] doubleArray = new double[numberOfLine - 1];\r\n \r\n try\r\n {\r\n //open the same file again\r\n BufferedReader r = new BufferedReader (new FileReader (\"Countries-Population.txt\")); // reset the buffer\r\n int x = 0;\r\n \r\n while (x < numberOfLine - 1) //loop until end of file is reached\r\n {\r\n linesFile [x] = r.readLine (); //feed each data line into an array\r\n x++;\r\n }\r\n \r\n String []ppltnStr = new String[numberOfLine-1];\r\n String [] areaStr = new String[numberOfLine-1];\r\n \r\n //works backwards and extracts the data part by part\r\n for(int i = 0; i<linesFile.length; i++)\r\n {\r\n if(linesFile[i].charAt(linesFile[i].length()- 1) != ' ') //no space exceptions - some lines don't have spaces at the end\r\n {\r\n //finds the the last space to the last character, which is the population\r\n ppltnStr[i] = linesFile[i].substring(linesFile[i].lastIndexOf(' '), linesFile[i].length());\r\n ppltnStr[i] = ppltnStr[i].replaceAll(\"[, ]\", \"\"); //remove the commas and spaces\r\n \r\n linesFile[i] = linesFile[i].substring(0, linesFile[i].lastIndexOf(' ')); //removes the population from the line\r\n \r\n //finds the the last space to the last character, which is the area\r\n areaStr[i] = linesFile[i].substring(linesFile[i].lastIndexOf(' '), linesFile[i].length());\r\n areaStr[i] = areaStr[i].replaceAll(\"[, ]\", \"\");\r\n \r\n linesFile[i] = linesFile[i].substring(0, linesFile[i].lastIndexOf(' ')); //removes the area\r\n }\r\n else //has space\r\n {\r\n //finds the the second last space to the last space, which is the population\r\n ppltnStr[i] = linesFile[i].substring(linesFile[i].lastIndexOf(' ', linesFile[i].lastIndexOf(' ') - 1), linesFile[i].length()); \r\n ppltnStr[i] = ppltnStr[i].replaceAll(\"[, ]\", \"\"); //remove the commas and spaces\r\n \r\n linesFile[i] = linesFile[i].substring(0, linesFile[i].lastIndexOf(' ', linesFile[i].lastIndexOf(' ') - 1) + 1); //removes the population from the line\r\n \r\n //finds the the second last space to the last space for the new line, which is the area\r\n areaStr[i] = linesFile[i].substring(linesFile[i].lastIndexOf(' ', linesFile[i].lastIndexOf(' ') - 1), linesFile[i].length());\r\n areaStr[i] = areaStr[i].replaceAll(\"[, ]\", \"\");\r\n \r\n linesFile[i] = linesFile[i].substring(0, linesFile[i].lastIndexOf(' ', linesFile[i].lastIndexOf(' ') - 1) + 1); //removes the area\r\n }\r\n }\r\n \r\n //parses the string array into an integer array\r\n for (int i = 0 ; i < numberOfLine - 1 ; i++)\r\n {\r\n intArray [i] = Integer.parseInt (ppltnStr [i]);\r\n doubleArray [i] = Double.parseDouble (areaStr [i]);\r\n }\r\n \r\n //hardcodes the exceptions of multi-word capitals/countries\r\n for(int i = 0; i<linesFile.length;i++)\r\n {\r\n String[] lol= linesFile[i].split(\" \"); //stores the parts of the line in lol\r\n if(lol.length == 2) //has to be one or the other\r\n {\r\n if(lol[0].substring(0, 3).equals(\"Vat\")|| lol[0].substring(0, 3).equals(\"Wes\")) //exceptions\r\n {\r\n countryStr[i] = lol[0] + \" \" + lol[1];\r\n capitalStr[i] = null;\r\n }\r\n else\r\n {\r\n countryStr[i] = lol[0];\r\n capitalStr[i] = lol[1];\r\n }\r\n }\r\n else if(lol.length == 3) //3 words\r\n {\r\n if(lol[0].substring(0, 2).equals(\"Uk\") || lol[0].substring(0, 2).equals(\"Be\")|| lol[0].substring(0, 2).equals(\"In\") || lol[0].substring(0, 2).equals(\"Et\")\r\n || lol[0].substring(0, 2).equals(\"Ar\")|| lol[0].substring(0, 3).equals(\"Cam\")|| lol[0].substring(0, 2).equals(\"Bo\")\r\n || lol[0].charAt(0)=='G'|| lol[0].substring(0, 2).equals(\"Ku\")|| lol[0].substring(0, 2).equals(\"Mo\")|| lol[0].substring(0, 2).equals(\"Pa\")\r\n || lol[0].substring(0, lol[0].length()).equals(\"Malaysia\")|| lol[0].substring(0, lol[0].length()).equals(\"Malaysia\")\r\n || lol[0].substring(0, lol[0].length()).equals(\"Mexico\")|| lol[0].substring(0, lol[0].length()).equals(\"Mauritius\")) //1 word country\r\n {\r\n countryStr[i] = lol[0];\r\n capitalStr[i] = lol[1] + \" \" + lol[2];\r\n }\r\n else //2 word country\r\n {\r\n countryStr[i] = lol[0] + \" \" + lol[1];\r\n capitalStr[i] = lol[2];\r\n }\r\n }\r\n else if(lol.length == 4) //4 words\r\n {\r\n if(lol[0].substring(0, 2).equals(\"An\") || lol[0].substring(0, 2).equals(\"Br\")) //1 word country\r\n {\r\n countryStr[i] = lol[0];\r\n capitalStr[i] = lol[1] + \" \" + lol[2] + \" \" + lol[3];\r\n }\r\n else if(lol[0].substring(0, 2).equals(\"Ce\") || lol[0].substring(0, lol[0].length()).equals(\"Congo,\") || lol[0].substring(0, 2).equals(\"Tr\")\r\n || lol[0].substring(0, 2).equals(\"Bo\")) //3 word country\r\n {\r\n countryStr[i] = lol[0] + \" \" + lol[1] + \" \" + lol[2];\r\n capitalStr[i] = lol[3];\r\n }\r\n else //2 word country\r\n {\r\n countryStr[i] = lol[0] + \" \" + lol[1];\r\n capitalStr[i] = lol[2] + \" \" + lol[3];\r\n }\r\n }\r\n else if(lol.length == 5) //5 words\r\n {\r\n if(lol[0].substring(0, 2).equals(\"St\")) //4 word country\r\n {\r\n countryStr[i] = lol[0] + \" \" + lol[1] + \" \" + lol[2]+ \" \" + lol[3];\r\n capitalStr[i] = lol[4];\r\n }\r\n else //3 word country\r\n {\r\n countryStr[i] = lol[0] + \" \" + lol[1] + \" \" + lol[2];\r\n capitalStr[i] = lol[3]+ \" \" + lol[4];\r\n }\r\n }\r\n else //6 word country\r\n {\r\n if(lol[0].substring(0, 2).equals(\"Sã\")) //4 word country\r\n {\r\n countryStr[i] = lol[0] + \" \" + lol[1] + \" \" + lol[2]+ \" \" + lol[3];\r\n capitalStr[i] = lol[4]+ \" \" +lol[5];\r\n }\r\n else //5 word country\r\n {\r\n countryStr[i] = lol[0] + \" \" + lol[1] + \" \" + lol[2]+ \" \" + lol[3]+ \" \" +lol[4];\r\n capitalStr[i] = lol[5];\r\n }\r\n }\r\n }\r\n r.close (); //close data file\r\n }\r\n catch (IOException e) //handle file related errors\r\n {\r\n System.out.println (e); //error msg\r\n }\r\n catch (NumberFormatException e) //error trap\r\n {\r\n JOptionPane.showMessageDialog (null, \"The file is corrupt because it contains non-integer data. Please try again!\"); //error message\r\n }\r\n population = intArray; //sets the local array equal to the global array so that other methods can process it\r\n area = doubleArray;\r\n countries = countryStr;\r\n capital = capitalStr;\r\n }", "private void plotData(){\n List<Entry> entriesMedidas = new ArrayList<Entry>();\n try{\n // #1\n FileInputStream fis = getApplicationContext().openFileInput(fileName);\n InputStreamReader isr = new InputStreamReader(fis);\n BufferedReader reader = new BufferedReader(isr);\n\n // #2. Skips the name, birthdate and gender of the baby\n reader.readLine();\n reader.readLine();\n reader.readLine();\n\n // #3\n String line = reader.readLine();//First line with data\n\n while (line != null) {\n double[] datum = obtainSubstring(line, mag);\n entriesMedidas.add(new Entry((float) datum[0], (float) datum[1]));\n\n line = reader.readLine();\n }\n\n reader.close();\n isr.close();\n fis.close();\n\n }catch(IOException e){\n e.printStackTrace();\n }\n\n // #4\n LineDataSet lineaMedidas = new LineDataSet(entriesMedidas, this.name);\n lineaMedidas.setAxisDependency(YAxis.AxisDependency.LEFT);\n lineaMedidas.setColor(ColorTemplate.rgb(\"0A0A0A\"));\n lineaMedidas.setCircleColor(ColorTemplate.rgb(\"0A0A0A\"));\n todasMedidas.add(lineaMedidas);\n\n }", "private static City[] fileInterpreter(Scanner file,int numberOfLines){\n City[] cities = new City [numberOfLines];\n for(int i = 0 ; file.hasNextLine(); i++){\n String line = file.nextLine();\n Scanner string = new Scanner(line); //String Scanner to consume the line into city and country and rainfall...\n String cityName = string.next();\n String countryName = string.next();\n double[] data = extractRainfallInformation(line.split(\"[ \\t]+[ \\t]*\")); //to create the array of monthly rainfall\n cities[i] = new City(cityName , countryName , data);\n string.close();\n }\n file.close();\n return cities;\n }", "public void readReviewsFoodVertical() throws IOException {\n File fileAnnotation = new File(filePathExternalFile);\n FileReader fr = new FileReader(fileAnnotation);\n BufferedReader br = new BufferedReader(fr);\n String line;\n\n while ((line = br.readLine()) != null) {\n annotate(\"aspect\",\"item\");\n }\n br.close();\n fr.close();\n }", "private void createDeck() {\n FileReader reader = null;\n try {\n try {\n reader = new FileReader(deckInputFile);\n Scanner in = new Scanner(reader);\n \n // read the top line column names of the file\n // e.g. description, size, speed etc.\n String categories = in.nextLine();\n\n // loop through the file line by line, creating a card and adding to the deck\n while (in.hasNextLine()) {\n String values = in.nextLine();\n Card newCard = new Card(categories, values);\n deck.add(newCard);\n }\n } finally {\n if (reader != null) {\n reader.close();\n }\n }\n } catch (IOException e) {\n System.out.print(\"error\");\n }\n }", "ArrayList<WordListItem> addDataFromFile(){\n BufferedReader br;\n InputStream inputStream = context.getResources().openRawResource(R.raw.animal_list);\n br = new BufferedReader(\n new InputStreamReader(inputStream, Charset.forName(\"UTF-8\"))\n );\n String currentLine;\n ArrayList<WordListItem> wordListItems = new ArrayList<WordListItem>();\n try {\n while ((currentLine = br.readLine()) != null) {\n String[] tokens = currentLine.split(\";\");\n\n String word = tokens[0];\n String pronunciation = tokens[1];\n String description = tokens[2];\n\n WordListItem wordItem = new WordListItem(word, pronunciation, description);\n wordItem.setImgResNbr(setImgResFromWord(wordItem.getWord().toLowerCase()));\n wordListItems.add(wordItem);\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n if (br != null) br.close();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n\n return wordListItems;\n }", "public static ArrayList<MonitoredData> readFileData(){\n ArrayList<MonitoredData> data = new ArrayList<>();\n List<String> lines = new ArrayList<>();\n try (Stream<String> stream = Files.lines(Paths.get(\"Activities.txt\"))) {\n lines = stream\n .flatMap((line->Stream.of(line.split(\"\\t\\t\"))))\n .collect(Collectors.toList());\n for(int i=0; i<lines.size()-2; i+=3){\n MonitoredData md = new MonitoredData(lines.get(i), lines.get(i+1), lines.get(i+2));\n data.add(md);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n //data.forEach(System.out::println);\n return data;\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic void readData(String fileName) {\n\t\ttry {\n\t\t\tFile file = new File(fileName);;\n\t\t\tif( !file.isFile() ) {\n\t\t\t\tSystem.out.println(\"ERRO\");\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t\tBufferedReader buffer = new BufferedReader( new FileReader(file) );\n\t\t\t/* Reconhece o valor do numero de vertices */\n\t\t\tString line = buffer.readLine();\n\t\t\tStringTokenizer token = new StringTokenizer(line, \" \");\n\t\t\tthis.num_nodes = Integer.parseInt( token.nextToken() );\n\t\t\tthis.nodesWeigths = new int[this.num_nodes];\n\t\t\t\n\t\t\t/* Le valores dos pesos dos vertices */\n\t\t\tfor(int i=0; i<this.num_nodes; i++) { // Percorre todas a linhas onde seta valorado os pesos dos vertices\n\t\t\t\tif( (line = buffer.readLine()) == null ) // Verifica se existe a linha a ser lida\n\t\t\t\t\tbreak;\n\t\t\t\ttoken = new StringTokenizer(line, \" \");\n\t\t\t\tthis.nodesWeigths[i] = Integer.parseInt( token.nextToken() ); // Adiciona o peso de vertice a posicao do arranjo correspondente ao vertice\n\t\t\t}\n\t\t\t\n\t\t\t/* Mapeia em um array de lista todas as arestas */\n\t\t\tthis.edges = new LinkedList[this.num_nodes];\n\t\t\tint cont = 0; // Contador com o total de arestas identificadas\n\t\t\t\n\t\t\t/* Percorre todas as linhas */\n\t\t\tfor(int row=0, col; row<this.num_nodes; row++) {\n\t\t\t\tif( (line = buffer.readLine()) == null ) // Verifica se ha a nova linha no arquivo\n\t\t\t\t\tbreak;\n\t\t\t\tthis.edges[row] = new LinkedList<Integer>(); // Aloca nova lista no arranjo, representado a linha o novo vertice mapeado\n\t\t\t\tcol = 0;\n\t\t\t\ttoken = new StringTokenizer(line, \" \"); // Divide a linha pelos espacos em branco\n\t\t\t\t\n\t\t\t\t/* Percorre todas as colunas */\n\t\t\t\twhile( token.hasMoreTokens() ) { // Enquanto ouver mais colunas na linha\n\t\t\t\t\tif( token.nextToken().equals(\"1\") ) { // Na matriz binaria, onde possui 1, e onde ha arestas\n//\t\t\t\t\t\tif( row != col ) { // Ignora-se os lacos\n\t\t\t\t\t\t\t//System.out.println(cont + \" = \" + (row+1) + \" - \" + (col+1) );\n\t\t\t\t\t\t\tthis.edges[row].add(col); // Adiciona no arranjo de listas a aresta\n\t\t\t\t\t\t\tcont++; // Incrementa-se o total de arestas encontradas\n//\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcol++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tthis.num_edges = cont; // Atribui o total de arestas encontradas\n\n\t\t\tif(true) {\n//\t\t\t\tfor(int i=0; i<this.num_nodes; i++) {\n//\t\t\t\t\tSystem.out.print(this.nodesWeigths[i] + \"\\n\");\n//\t\t\t\t}\n\t\t\t\tSystem.out.print(\"num edges = \" + cont + \"\\n\");\n\t\t\t}\n\t\t\t\n\t\t\tbuffer.close(); // Fecha o buffer\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private static int[][] processInput (String info) throws FileNotFoundException, IOException\n {\n BufferedReader input = new BufferedReader(new FileReader(info));\n ArrayList<Integer> pointList = new ArrayList<Integer>();\n String point;\n while ((point = input.readLine()) != null)\n {\n StringTokenizer st = new StringTokenizer(point);\n pointList.add(Integer.parseInt(st.nextToken()));\n pointList.add(Integer.parseInt(st.nextToken()));\n }\n int[][] pointSet = new int[2][pointList.size()/2];\n int j = 0;\n for (int i = 0; i<=pointList.size()-1; i=i+2)\n {\n pointSet[0][j] = pointList.get(i);\n pointSet[1][j] = pointList.get(i+1);\n j++;\n }\n return pointSet;\n }", "static void parseData(String filename) {\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(filename))) {\n\t\t \n\t\t\tString line;\n\t\t String[] tokens;\n\t\t ArrayList<Double> temp;\n\t\t \n\t\t while ((line = br.readLine()) != null) {\n\t\t \ttemp = new ArrayList<Double>();\n\t\t \ttokens = line.split(\",\");\n\t\t \tfor(String s : tokens) {\n\t\t \t\ttemp.add(Double.parseDouble(s));\n\t\t \t}\n\t\t \tData.add(new Vector(temp));\n\t\t }\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "void updateUsedCategoriesContent() {\n try{\n InputStream inputStream = DMOZCrawler.class.getResourceAsStream(\"Used_categories.txt\");\n InputStreamReader inputStreamReader = new InputStreamReader(inputStream);\n BufferedReader bufferedReader = new BufferedReader(inputStreamReader);\n HashSet<String> usedCategories = new HashSet<>();\n\n String currentLine;\n while ((currentLine = bufferedReader.readLine()) != null){\n usedCategories.add(currentLine.toLowerCase());\n System.out.println(\"Used category added :: \" + currentLine);\n }\n\n System.out.println(usedCategories);\n\n for(String id : usedCategories){\n categoryContent(Integer.parseInt(id));\n }\n } catch (Exception exception){\n exception.printStackTrace();\n }\n }", "public static String[] DataCollection(String a) throws FileNotFoundException {\n\tFile file = new File(a); \n \tScanner sc = new Scanner(file); \n \n // Counter variable to count the number of entries in text file\n\tint counter = 0;\n\n\t\n \n\tString[] data = new String[2976];\n // While loop to take in data from text file \n\twhile(sc.hasNextLine())\n\t{\n\t\n\tsc.useDelimiter(\"\\\\Z\"); \n\t\n\t// Inserting data in each line to array\n\tdata[counter] = sc.nextLine();\n\tcounter = counter + 1;\n\t\n\t}\n\treturn data;\n \t}", "public static ArrayList readData(){\n ArrayList alr = new ArrayList();\n try{\n ArrayList stringArray = (ArrayList)read(filename);\n for (int i = 0; i < stringArray.size(); i++){\n String st = (String)stringArray.get(i);\n StringTokenizer star = new StringTokenizer(st, SEPARATOR);\n int movieID = Integer.parseInt(star.nextToken().trim());\n String email = star.nextToken().trim();\n String comment = star.nextToken().trim();\n Review review = new Review(movieID, email, comment);\n alr.add(review);\n }\n }\n catch (IOException e){\n System.out.println(\"Exception > \" + e.getMessage());\n }\n return alr;\n }", "public static List<Map<String, String>> loadData(String filename) throws IOException {\n\t\tList<Map<String, String>> data = new ArrayList<>();\n\t\tPath dataFile = Paths.get(filename);\n\t\t\n\t\t// Files.readAllLines only accepts Path and returns a List\n\t\t// it reads the whole file in one shot\n\t\tList<String> linesList = Files.readAllLines(dataFile);\n\t\t// header row to attributes array\n\t\tString[] attributes = linesList.get(0).split(\",\");\n\t\t\n\t\t// process data rows\n\t\tfor (int i = 1; i < linesList.size(); i++) {\n\t\t\tString[] values = linesList.get(i).split(\",\");\n\t\t\tif (values.length == 0 && values[0].length() == 0) break;\n\t\t\t// create a map for each row\n\t\t\tMap<String, String> row = new HashMap<>();\n\t\t\t//fill the row\n\t\t\tfor (int j = 0; j < attributes.length; j++)\n\t\t\t\trow.put(attributes[j], values[j]);\n\t\t\tdata.add(row);\t\t// add data to row\n\t\t}\t\n\n\t\t// do the same with a Stream, but use the iterator of the stream\n\t\t// instead of dealing with it directly\n\t\tStream<String> linesStream = Files.lines(dataFile);\n\t\tIterator<String> it = linesStream.iterator();\n\t\tattributes = it.next().split(\",\");\n\t\twhile (it.hasNext()) {\n\t\t\tString[] values = it.next().split(\",\");\n\t\t\tif (values.length > 0 && values[0].length() > 0) {\n\t\t\t\tMap<String, String> row = new HashMap<>();\n\t\t\t\tfor (int i = 0; i < attributes.length; i++)\n\t\t\t\t\trow.put(attributes[i], values[i]);\n\t\t\t\t// data.add(row);\n\t\t\t}\n\t\t}\n\t\tlinesStream.close();\n\n\t\treturn data;\n\t}", "private static void readFridgeData() throws FileNotFoundException, InvalidDateException,\n InvalidQuantityException, EmptyDescriptionException,\n RepetitiveFoodIdentifierException, InvalidFoodCategoryException, InvalidFoodLocationException {\n File file = new File(DATA_FILE_PATH);\n Scanner scanner = new Scanner(file); // create a Scanner using the File as the source\n while (scanner.hasNext()) {\n String line = scanner.nextLine();\n populateFridge(line);\n }\n scanner.close();\n }", "public ArrayList<ItemCategory> createItemCategoryList() {\n return categoryLines\n .stream()\n .map(this::writeLineNumber)\n .map(this::createItemList)\n .peek(this::addCategoryForFasterTesting)\n .collect(Collectors.toCollection(ArrayList::new));\n }", "void readData(File file) {\n // Common Place?--\n // Bool--\n List<DirectoryEntry>directoryEntries = new ArrayList<DirectoryEntry>();\n List<String>directoryTypes = new ArrayList<String>();\n try {\n FileInputStream excelFile = new FileInputStream(file);\n Workbook workbook = new XSSFWorkbook(excelFile);\n Sheet datatypeSheet = workbook.getSheetAt(0);\n Iterator<Row> iterator = datatypeSheet.iterator();\n\n int rowCnt=0;\n while (iterator.hasNext()) {\n Row currentRow = iterator.next();\n\n // skip the first 3 rows\n rowCnt++;\n if(rowCnt<=3) {\n continue ;\n }\n\n\n // iterate over cells on the row\n int columnCnt=0;\n String name = null;\n String phoneNumber = null;\n String starCodePattern = null;\n String categoryTab = null;\n\n Iterator<Cell> columnIterator = currentRow.iterator();\n while (columnIterator.hasNext()) {\n Cell currentCell = columnIterator.next();\n\n //getCellTypeEnum shown as deprecated for version 3.15\n //getCellTypeEnum ill be renamed to getCellType starting from version 4.0\n String value = \"\";\n if (currentCell.getCellTypeEnum() == CellType.STRING) {\n value = currentCell.getStringCellValue();\n } else if (currentCell.getCellTypeEnum() == CellType.NUMERIC) {\n value = \"\" + currentCell.getNumericCellValue();\n }\n\n columnCnt++;\n switch(columnCnt) {\n case 1:\n name = value;\n break;\n case 2:\n phoneNumber = value;\n break;\n case 3:\n starCodePattern = value;\n break;\n case 4:\n categoryTab = value;\n if( !directoryTypes.contains(categoryTab) ) {\n directoryTypes.add(categoryTab);\n }\n break;\n }\n }\n\n if(StringUtils.isNotBlank(name)) {\n directoryEntries.add(new DirectoryEntry(name, phoneNumber, starCodePattern, categoryTab));\n data.add(new DirectoryEntry(name, phoneNumber, starCodePattern, categoryTab));\n }\n }\n\n workbook.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private static void readFileIntoArray (String inputFileName) {\n Path path = Paths.get(inputFileName);\n array = new int[countLines(inputFileName)];\n try {\n Scanner sc = new Scanner(path);\n int i = 0;\n while (sc.hasNextLine()) {\n array[i] = Integer.parseInt(sc.nextLine());\n i++;\n }\n sc.close();\n //sort the array\n MergeSort.mergeSort(array);\n }\n catch(FileNotFoundException e) {\n System.out.println(\"File Error\");\n e.printStackTrace();\n }\n catch(IOException e) {\n System.out.println(\"File Error\");\n e.printStackTrace();\n }\n }", "void populateArray () {\r\n\r\n\t\ttry {\r\n\t\t\tfis = new FileInputStream (\"Bank.dat\");\r\n\t\t\tdis = new DataInputStream (fis);\r\n\t\t\t//Loop to Populate the Array.\r\n\t\t\twhile (true) {\r\n\t\t\t\tfor (int i = 0; i < 6; i++) {\r\n\t\t\t\t\trecords[rows][i] = dis.readUTF ();\r\n\t\t\t\t}\r\n\t\t\t\trows++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception ex) {\r\n\t\t\ttotal = rows;\r\n\t\t\tif (total == 0) { }\r\n\t\t\telse {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tdis.close();\r\n\t\t\t\t\tfis.close();\r\n\t\t\t\t}\r\n\t\t\t\tcatch (Exception exp) { }\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public void organize() throws FileNotFoundException {\n\t\tScanner fileReader = new Scanner(new File(\"src/input.txt\"));\n\t\tint numLines = 0;\n\t\twhile (fileReader.hasNextLine()) {\n\t\t\tfileReader.nextLine();\n\t\t\tnumLines++;\n\n\t\t}\n\t\tfileReader.close();\n\t\t\n\t\t/* Creates array of object Car */\n\t\tCar[] cars = new Car[numLines];\n\n\t\t/* Creates variable counter to track number of cars in analysis */\n\t\tint counter = 0;\n\n\t\tint i = 0;\n\t\t\n\t\t/* Creates variables for specs of each car */\n\t\tint year;\n\t\tString make;\n\t\tint mileage;\n\n\t\tfileReader = new Scanner(new File(\"src/input.txt\"));\n\t\t\n\t\t/* Loops through file, line by line */\n\t\twhile (fileReader.hasNextLine()) {\n\t\t\t\n\t\t\t/* Lets program know first Int represents year, following String is make, following Int is mileage */\n\t\t\tyear = fileReader.nextInt();\n\t\t\tmake = fileReader.next();\n\t\t\tmileage = fileReader.nextInt();\n\n\t\t\tcars[i] = new Car(year, make, mileage);\n\t\t\ti++;\n\n\t\t}\n\t\tfileReader.close();\n\t\t\n\t\t\n\t\t/* Performs analysis on file\n\t\t * Count how many cars in lot as new as 2005 with over 75,000 miles on it\n\t\t */\n\t\tfor (int j = 0; j < numLines; j++) {\n\t\t\tif (cars[j].year >= 2005) {\n\t\t\t\tif (cars[j].mileage >= 75000) {\n\t\t\t\t\tcounter++;\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t/* Prints analysis into console */\n\t\tSystem.out.println(\"Cars as new as 2005 with over 75,000 miles: \"\n\t\t\t\t+ counter + \" cars\");\n\t}", "public static int[][] read(String fileName) throws FileNotFoundException {\r\n int i = -1;\r\n int j;\r\n\r\n int row = 1;\r\n int col = 0;\r\n\r\n Scanner read = new Scanner(new File(\".\\\\data\\\\mountain.paths\\\\\" + fileName));\r\n StringTokenizer st = new StringTokenizer(read.nextLine());\r\n\r\n while (st.hasMoreTokens()) {\r\n st.nextToken();\r\n col++;\r\n }\r\n\r\n while (read.hasNextLine()) {\r\n read.nextLine();\r\n row++;\r\n }\r\n\r\n read = new Scanner(new File(\".\\\\data\\\\mountain.paths\\\\\" + fileName));\r\n int[][] data = new int[row][col];\r\n\r\n while (read.hasNextLine()) {\r\n j = -1;\r\n i++;\r\n st = new StringTokenizer(read.nextLine());\r\n while (st.hasMoreTokens()) {\r\n j++;\r\n data[i][j] = Integer.parseInt(st.nextToken());\r\n }\r\n }\r\n return data;\r\n }", "void readData(String fileName, boolean [] data, String wName){\n\t\tworld = new File(wName);\n\t\tDataProcessing dp = new DataProcessing(fileName, data);\n\t\tdp.findHotspots();\n\n\t\ttempVals = dp.hotspots;\n\t\t\t\n\t\t\t// create randomly permuted list of indices for traversal \n\t\t\tgenPermute(); \n\t\t\t\n\t\t\t// generate greyscale tempVals field image\n\t\t\tderiveImage();\n\n\t}", "public ArrayList<HashMap<String, String>> readCategories(XmlPullParser parser) throws IOException, XmlPullParserException {\r\n\r\n\t\t\tcategories = new ArrayList<HashMap<String, String>>();\r\n\r\n\r\n\t\t\tint eventType = parser.getEventType();\r\n\r\n\t\t\twhile(eventType != XmlPullParser.END_DOCUMENT) {\r\n\t\t\t\tswitch (eventType) {\r\n\t\t\t\t\tcase XmlPullParser.START_DOCUMENT:\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase XmlPullParser.START_TAG:\r\n\t\t\t\t\t\tString tagName = parser.getName();\r\n\t\t\t\t\t\tif(tagName.equals(\"category\")) {\r\n\t\t\t\t\t\t\tcategories.add(new HashMap<String, String>());\r\n\t\t\t\t\t\t} else if(tagName.equals(\"category_id\")) {\r\n\t\t\t\t\t\t\tcategories.get(categories.size()-1).put(\"ID\", parser.nextText());\r\n\t\t\t\t\t\t} else if(tagName.equals(\"category_name\")) {\r\n\t\t\t\t\t\t\tcategories.get(categories.size()-1).put(\"Name\", parser.nextText());\r\n\t\t\t\t\t\t} else if(tagName.equals(\"category_link\")) {\r\n\t\t\t\t\t\t\tcategories.get(categories.size()-1).put(\"Link\", parser.nextText());\r\n\t\t\t\t\t\t} else if(tagName.equals(\"color\")) {\r\n\t\t\t\t\t\t\tcategories.get(categories.size()-1).put(\"Color\", parser.nextText());\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\teventType = parser.next();\r\n\r\n\t\t\t}\r\n\r\n\t\tin.close();\r\n\t\treturn categories;\r\n\t}", "public void readDrugs() {\n\t\tBufferedReader br;\n\t\tString s;\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(\"drugs.txt\"));\n\n\t\t\twhile ((s = br.readLine()) != null) {\n\t\t\t\tString[] fields = s.split(\", \");\n\n\t\t\t\tString name = fields[0];\n\t\t\t\tString chemName = fields[1];\n\t\t\t\tString ingredients = fields[2];\n\t\t\t\tString manufComp = fields[3]; // manufacturing company\n\t\t\t\tString type = fields[4];\n\t\t\t\tString conditions = fields[5];\n\t\t\t\tString contra = fields[6]; // contraindications\n\t\t\t\tDrugs drug = new Drugs(name, chemName, ingredients, manufComp, type, conditions, contra);\n\t\t\t\tdrugs.add(drug);\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t}", "public void readToCsv() {\r\n\r\n String seperator = \";\";\r\n\r\n try (BufferedReader reader = new BufferedReader(\r\n new FileReader(\"Products.csv\"))){\r\n\r\n String line = null;\r\n for(int i=1; (line = reader.readLine()) != null; i++) {\r\n String[] fields = line.split(seperator, -1);\r\n\r\n // For nutrients objects to read\r\n if(fields.length ==5){\r\n Nutrient object= new Nutrient();\r\n object.name = fields[0];\r\n object.price = Double.parseDouble(fields[1]);\r\n object.tag=fields[2];\r\n object.content = fields[3];\r\n object.numOfProduct = Integer.parseInt(fields[4]);\r\n //object.addFeatures(object.name,object.price,object.size,object.gender,object.tag,object.content,object.numOfProduct);\r\n NutrientList.add(object);\r\n allProducts.add(object);\r\n }\r\n // For Cosmetics objects to read\r\n if (fields.length==6){\r\n Cosmetics object2=new Cosmetics();\r\n object2.name = fields[0];\r\n object2.price = Double.parseDouble(fields[1]);\r\n object2.gender = fields[2];\r\n object2.tag=fields[3];\r\n object2.content = fields[4];\r\n object2.numOfProduct = Integer.parseInt(fields[5]);\r\n //object2.addFeatures(object2.name,object2.price,object2.size,object2.gender,object2.tag,object2.content,object2.numOfProduct);\r\n CosmeticsList.add(object2);\r\n allProducts.add(object2);\r\n }\r\n // For clothes objects to read\r\n if(fields.length ==7){\r\n\r\n Clothes object3=new Clothes();\r\n object3.name = fields[0];\r\n object3.price = Double.parseDouble(fields[1]);\r\n object3.size= fields[2];\r\n object3.tag=fields[4];\r\n object3.content = fields[5];\r\n object3.numOfProduct = Integer.parseInt(fields[6]);\r\n object3.addFeatures(object3.name,object3.price,object3.size,\"E\",object3.tag,object3.content,object3.numOfProduct);\r\n ClothesList.add(object3);\r\n allProducts.add(object3);\r\n }\r\n\r\n }}\r\n catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void readAlbumCollectionFromFile(Object fileName)\r\n {\r\n\t// Initialise variables to hold album title, artist and tracks\r\n\tList<Track> albumTracks = new ArrayList<>();\r\n\tString albumTitle = \"\";\r\n\tString albumArtist = \"\";\r\n\tString file = (String) fileName;\r\n\ttry\r\n\t{\r\n\t // Read in the album data file line by line\r\n\t BufferedReader buffer;\r\n\t buffer = new BufferedReader(new FileReader(file));\r\n\t String currentLine;\r\n\t Album album = null;\r\n\r\n\t while ((currentLine = buffer.readLine()) != null)\r\n\t {\r\n\t\t// Lines in the album data file begin with a letter when the line \r\n\t\t// contains an album title and artist, or an integer when it \r\n\t\t// contains track info\r\n\t\t\r\n\r\n\t\t// For each line, check whether first character is a letter. If so,\r\n\t\t// assume we are at a new Album title/artist\r\n\t\tif (Character.isLetter(currentLine.charAt(0)))\r\n\t\t{\r\n\t\t // Album title found\r\n\t\t \r\n\t\t // Get Album title and artist from the current line\r\n\t\t String[] split = currentLine.split(\":\");\r\n\t\t albumArtist = split[0].trim();\r\n\t\t albumTitle = split[1].trim();\r\n\r\n\r\n\t\t // check that current album does not exist in collection\r\n\t\t // try to get album by title\r\n\t\t Album albumByTitle = this.getAlbumByTitle(albumTitle);\r\n\t\t //only add album if albumByTitle returned null\r\n\t\t //TODO checking by artist will not work here as only first album by title found is returned. Need method to check for more albums of same name.\r\n\t\t if (albumByTitle == null || !albumByTitle.getAlbumArtist().equals(albumArtist))\r\n\t\t {\r\n\t\t\t// We are at the end of the current album. Therefore, create\r\n\t\t\t// the album and add it to the album collection\r\n\t\t\talbum = new Album(albumArtist, albumTitle);\r\n\t\t\tthis.addAlbum(album);\r\n\t\t }\r\n\t\t}\r\n\t\t// If first char is not a letter assume the line is a new track\r\n\t\telse if (album != null)\r\n\t\t{\r\n\t\t // Track found - get its title and duration\r\n\t\t String[] split = currentLine.split(\"-\", 2); // ', 2' prevents \r\n\t\t //splitting where '-' character occurs in title of the track\r\n\t\t String strTrackDuration = split[0].trim();\r\n\t\t String trackTitle = split[1].trim();\r\n\r\n\t\t // create duration object from string\r\n\t\t Duration trackDuration = new Duration(strTrackDuration);\r\n\t\t // create track object and add to album track list\r\n\t\t Track track = new Track(trackTitle, trackDuration);\r\n\t\t album.addTrack(track);\r\n\t\t}\r\n\t }\r\n\r\n\t} catch (IOException e)\r\n\t{\r\n\t // if error occurs, print the IOException\r\n\t System.out.println(e);\r\n\t}\r\n }", "public static ArrayList<ArrayList<String>> readGrid(String fileName) {\n\t\t\n\n\t\tFile input = new File(fileName);\n\t\tArrayList<ArrayList<String>> information = new ArrayList<ArrayList<String>>();\n\t\t\n\t\t\n\t\t//uses a simple try catch to read the file\n\t\ttry {\n\t\t\t\n\t\t\tScanner fileReader = new Scanner(input);\n\t\t\tArrayList<String> row = new ArrayList<String>();\n\t\t\tString rowInfo;\n\t\t\twhile(fileReader.hasNextLine()) {\n\t\t\t\trowInfo = fileReader.nextLine();\n\t\t\t\trow = new ArrayList<String>(Arrays.asList(rowInfo.split(\",\")));\n\t\t\t\tinformation.add(row);\n\t\t\t}\n\t\t\t\n\t\t\tfileReader.close();\n\t\t} catch(FileNotFoundException e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\t\n\t\treturn information;\n\t}", "@SuppressWarnings(\"unchecked\")\n public ArrBag( String infileName ) throws Exception\n {\n count = 0; // i.e. logical size, actual number of elems in the array\n BufferedReader infile = new BufferedReader( new FileReader( infileName ) );\n while ( infile.ready() )\n this.add( (T) infile.readLine() );\n infile.close();\n }", "public int[][][] getData() throws AreaFileException {\r\n int[][][] mydata = readData(0,0,dir[AD_NUMELEMS],numberLines);\r\n return mydata;\r\n }", "public void readData() throws FileNotFoundException {\n this.plane = readPlaneDimensions();\n this.groupBookingsList = readBookingsList();\n }", "private void testDataReader() {\n File csv = new File(pathTest);\n try (FileReader fr = new FileReader(csv); BufferedReader bfr = new BufferedReader(fr)) {\n Logger.printInfo(\"Reading test data\");\n for (String line; (line = bfr.readLine()) != null; ) {\n String[] split = line.split(\",\");\n String data = textCleaner(split[indexData].toLowerCase());\n int label = Integer.parseInt(split[indexLabel].toLowerCase());\n\n linesTest.add(data);\n labelsTest.add(label);\n Logger.print(\"Reading size: \" + linesTest.size());\n }\n for (String l : linesTest) {\n matrixTest.add(wordVectorizer(l));\n }\n } catch (IOException ex) {\n Logger.printError(\"!! Test Data Not Reading !!\");\n System.exit(0);\n }\n }", "public void load() {\n\t\n\t\tdataTable = new HashMap();\n\t\t\n\t\tArrayList musicArrayList = null;\n\t\tStringTokenizer st = null;\n\n\t\tMusicRecording myRecording;\n\t\tString line = \"\";\n\n\t\tString artist, title;\n\t\tString category, imageName;\n\t\tint numberOfTracks;\n\t\tint basePrice;\n\t\tdouble price;\n\n\t\tTrack[] trackList;\n\t\t\n\t\ttry\n\t\t{\n\t\t\tlog(\"Loading File: \" + FILE_NAME + \"...\");\n\t\t\tBufferedReader inputFromFile = new BufferedReader(new FileReader(FILE_NAME));\n\t\t\t\n\t\t\t// read until end-of-file\n\t\t\twhile ( (line = inputFromFile.readLine()) != null ) {\t\t\t\n\t\t\t\n\t\t\t\t// create a tokenizer for a comma delimited line\n\t\t\t\tst = new StringTokenizer(line, \",\");\n\t\t\n\t\t\t\t// Parse the info line to read following items formatted as\n\t\t\t\t// - the artist, title, category, imageName, number of tracks\n\t\t\t\t//\n\t\t\t\tartist = st.nextToken().trim();\n\t\t\t\ttitle = st.nextToken().trim();\n\t\t\t\tcategory = st.nextToken().trim();\n\t\t\t\timageName = st.nextToken().trim();\n\t\t\t\tnumberOfTracks = Integer.parseInt(st.nextToken().trim());\n\t\t\t\t\t\t\n\t\t\t\t// read all of the tracks in\n\t\t\t\ttrackList = readTracks(inputFromFile, numberOfTracks);\n\n\t\t\t\t// select a random price between 9.99 and 15.99\n\t\t\t\tbasePrice = 9 + (int) (Math.random() * 7);\n\t\t\t\tprice = basePrice + .99;\n\n\t\t\t\t// create the music recording\n\t\t\t\tmyRecording = new MusicRecording(artist, trackList, title, \n\t\t\t\t\t\t\t\t\t\t\t\t price, category, imageName);\n\n\t\t\t\t// check to see if we have information on this category\n\t\t\t\tif (dataTable.containsKey(category)) {\n\t\t\t\t\n\t\t\t\t\t// get the list of recordings for this category\n\t\t\t\t\tmusicArrayList = (ArrayList) dataTable.get(category); \t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\n\t\t\t\t\t// this is a new category. simply add the category\n\t\t\t\t\t// to our dataTable\n\t\t\t\t\tmusicArrayList = new ArrayList();\n\t\t\t\t\tdataTable.put(category, musicArrayList);\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// add the recording\n\t\t\t\tmusicArrayList.add(myRecording);\n\t\t\t\t\n\t\t\t\t// move ahead and consume the line separator\n\t\t\t\tline = inputFromFile.readLine();\n\t\t\t}\n\n\t\t\tinputFromFile.close();\n\t\t\tlog(\"File loaded successfully!\");\n\t\t\tlog(\"READY!\\n\");\n\n\t\t}\n\t\tcatch (FileNotFoundException exc) {\n\t\t\tlog(\"Could not find the file \\\"\" + FILE_NAME + \"\\\".\");\n\t\t\tlog(\"Make sure it is in the current directory.\");\n\t\t\tlog(\"========>>> PLEASE CONTACT THE INSTRUCTOR.\\n\\n\\n\");\n\t\t\tlog(exc);\n\t\t\t\n\t\t}\n\t\tcatch (IOException exc) {\n\t\t\tlog(\"IO error occurred while reading file: \" + FILE_NAME);\n\t\t\tlog(\"========>>> PLEASE CONTACT THE INSTRUCTOR.\\n\\n\\n\");\n\t\t\tlog(exc);\n\n\t\t}\n\t\n\t}", "private static int[][] readInput() throws Exception {\r\n\t\t\r\n\t\t// Read the input into a array of strings.\r\n\t\tList<String> inputLines = new ArrayList<String>();\r\n\t\tString currLine = \"\";\r\n\t\ttry {\r\n\t\t\t// Read the content of the file into an array of strings.\r\n\t\t\tScanner myScanner = new Scanner(new File(myFileName));\r\n\t\t\twhile((currLine = myScanner.nextLine()) != null) {\r\n\t\t\t\t\r\n\t\t\t\tinputLines.add(currLine);\r\n\r\n\t\t\t\tif (!myScanner.hasNextLine()) {\r\n\t\t\t\t\tmyScanner.close();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Based out of the number of lines in the input file\r\n\t\t\t// create a nXn matrix.\r\n\t\t\tint max = inputLines.size();\r\n\t\t\tint[][] data = new int[max][max];\r\n\t\t\tint count = 0;\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < max; i++) {\r\n\t\t\t\tfor (int j = 0; j < max; j++) {\r\n\t\t\t\t\tdata[i][j] = INFINITY;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Populate the nXn matrix.\r\n\t\t\tfor(int i = 0; i < inputLines.size(); i++) {\r\n\t\t\t\tcurrLine = inputLines.get(i);\r\n\t\t\t\tString[] splitLine = currLine.split(\"\\t\");\r\n\t\t\t\tfor(int j = 0; j < splitLine.length; j++) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tdata[count][j] = Integer.parseInt(splitLine[j]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (NumberFormatException ex) { \r\n\t\t\t\t\t\t//do nothing\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tcount++;\r\n\t\t\t}\t\t\t\r\n\t\t\treturn data;\r\n\t\t\t\r\n\t\t} catch(Exception ex) {\r\n\t\t\tSystem.out.println(ex.toString());\r\n\t\t\tthrow ex;\r\n\t\t}\r\n\t}", "public static ArrayList<String> catToCateg(String categ) throws Exception {\n\n\t\tArrayList<String> list = new ArrayList<String>();\n\n\t\tif (categOffsetIndex == null) {\n\t\t\tSystem.out.println(\"categ loading index...\");\n\t\t\tloadCategIndex();\n\t\t\tSystem.out.println(\"categ index loaded !!!\");\n\t\t}\n\n\t\tif (categOffsetIndex.get(categ) != null) {\n\t\t\tFile file = new File(basedir + \"categHierarchy\");\n\t\t\tRandomAccessFile rFile = new RandomAccessFile(file, \"r\");\n\t\t\t// System.out.println(categOffsetIndex.get(categ));\n\t\t\trFile.seek(categOffsetIndex.get(categ));\n\t\t\tString temp = rFile.readLine();\n\t\t\trFile.close();\n\t\t\tString arr[] = temp.split(\"\\t\");\n\n\t\t\tString temp1 = arr[1].substring(1, arr[1].length() - 1);\n\t\t\tString arr1[] = temp1.split(\",\");\n\n\t\t\tfor (String key : arr1) {\n\t\t\t\tlist.add(key.trim());\n\t\t\t}\n\t\t\trFile.close();\n\t\t\treturn list;\n\n\t\t}\n\n\t\telse {\n\n\t\t\treturn null;\n\t\t}\n\n\t}", "private static void fileRead(String file) {\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\t\t\tString line = \"\";\n\t\t\twhile((line=br.readLine())!=null) {\n\t\t\t\tString data[] = line.split(\"\\\\t\");\n\t\t\t\tint id = Integer.parseInt(data[0]);\n\t\t\t\tint groundTruth = Integer.parseInt(data[1]);\n\t\t\t\tactualClusters.put(id, groundTruth);\n\t\t\t\tArrayList<Double> temp = new ArrayList<>();\n\t\t\t\tfor(int i=2;i<data.length;i++) {\n\t\t\t\t\ttemp.add(Double.parseDouble(data[i]));\n\t\t\t\t}\n\t\t\t\tcols = data.length-2;\n\t\t\t\tgeneAttributes.put(id, temp);\n\t\t\t\tallClusters.add(id+\"\");\n\t\t\t\ttotalGenes++;\n\t\t\t}\n\t\t\ttotalCluster = totalGenes;\n\t\t\tbr.close();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void read(String fname){\r\n\t\t\t\r\n\t\t\tString line = \"\";\r\n\t\t\ttry {\r\n\t // FileReader reads text files in the default encoding.\r\n\t FileReader fileReader = new FileReader(fname);\r\n\t \r\n\t // Always wrap FileReader in BufferedReader.\r\n\t BufferedReader bufferedReader = new BufferedReader(fileReader);\r\n\t header=bufferedReader.readLine();\r\n\t \r\n\t data = new ArrayList<alldata>();\r\n\r\n\t while((line = bufferedReader.readLine()) != null) {\r\n\t \t\r\n\t //parse line and divide data by comma\r\n\t \r\n\t \t\r\n\t \tString[] lineStr = line.split(\",\");\r\n\t \t\r\n\t //create object row into which data from each line is stored and then added to array list\t\r\n\t \t\r\n\t if(lineStr.length >0) {\r\n\t \talldata row = new alldata();\r\n\t \trow.Name = lineStr[0]+ \",\" + lineStr[1];\r\n\t \trow.Num = lineStr[2];\r\n\t \trow.State = lineStr[3];\r\n\t \trow.Zip = lineStr[4];\r\n\t \trow.Age = Integer.parseInt(lineStr[6]);\r\n\t \trow.Sex = lineStr[7];\r\n\t \t\r\n\t \tdata.add(row);\r\n\t }\r\n\t \r\n\t \r\n\t } \r\n\t bufferedReader.close(); // Always close files. \r\n\t }catch(FileNotFoundException ex) {\r\n\t System.out.println(\"Unable to open file '\" + fname + \"'\"); \r\n\t }catch(IOException ex) {\r\n\t System.out.println(\"Error reading file '\" + fname + \"'\"); \r\n\t }\r\n\t\t\tSystem.out.println(\"Finish reading data from file \"+ fname);\r\n\t\t}", "private void getDataLists(String path)\n\t{\n\t\ttry\n\t\t{\n\t\t\tFile file = new File(path);\n\t\t\tfile.createNewFile();\n\t\t\tBufferedReader fileReader = new BufferedReader(new FileReader(file));\n\t\t\t\n\t\t\tString str = null;\n\t\t\twhile((str = fileReader.readLine()) != null)\n\t\t\t{\n\t\t\t\tthis.dataList.push(str);\n\t\t\t}\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\tSystem.out.println(\"Failed : data list read\");\n\t\t}\n\t}", "public List<List<String>> read () {\n List<List<String>> information = new ArrayList<>();\n try (BufferedReader br = new BufferedReader(new FileReader(path))) {\n int aux = 0;\n while ((line = br.readLine()) != null) {\n String[] data = line.split(split_on);\n List<String> helper = new ArrayList<>();\n helper.add(data[0]);\n helper.add(data[1]);\n information.add(helper);\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (br != null) {\n try {\n br.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n return information;\n }", "public static Lender[] fileTransformer(String fileName) throws IOException {\r\n Lender[] lenderList = new Lender[7];\r\n CSVReader reader = null;\r\n try {\r\n reader = new CSVReader(new FileReader(path + fileName), SEPARATOR);\r\n String[] nextLine = null;\r\n int count = 0;\r\n while ((nextLine = reader.readNext()) != null) {\r\n if (!nextLine[0].toString().equals(\"Lender\")) {\r\n lenderList[count] = new Lender(nextLine[0].toString(), BigDecimal.valueOf(Float.parseFloat(nextLine[1])).setScale(3, RoundingMode.CEILING),\r\n BigDecimal.valueOf(Float.parseFloat(nextLine[2])).setScale(3, RoundingMode.CEILING));\r\n count++;\r\n }\r\n }\r\n Arrays.sort(lenderList);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n } finally {\r\n if (null != reader) {\r\n reader.close();\r\n }\r\n }\r\n return lenderList;\r\n }", "public static void loopCategories() throws IOException {\n //If all of the categories haven't been checked yet check the response at the current index (count).\n if (count < CATEGORY_ARRAY_SIZE) {\n //If that response if equal to TRUE (1).\n if (currentUser.getSingleCategory(count) == TRUE) {\n //Adjust the start index.\n startIndex = count * LOCATIONS_PER_CATEGORY;\n //Call the locaitons view.\n Main.FxmlLoader(LOCATIONS_PATH);\n }\n //Otherwise increment count and check the next index recursively.\n else {\n count++;\n loopCategories();\n }\n }\n }", "private static char[][] convertFileIntoArray(File inputFile) {\n\t\tBufferedReader br = null;\n\t\tchar[][] rowIdxContentsArr = null;\n\t\t\n\t try{\n\t FileReader fileRdr = new FileReader(inputFile);\n\t br = new BufferedReader(fileRdr);\n\n\t String content;\n\t int row = 0;\n\t \n\t // Read every row contents line by line\n\t while ((content = br.readLine()) != null) {\n\t \tif(rowIdxContentsArr == null) {\n\t \t\t// Initialize the 2D Array based on the length of the row data.\n\t \t\trowIdxContentsArr = new char[NUMBER_OF_ROWS][content.length()];\n\t \t}\n\t \t//Convert every row string data into a char array and set it into every 2D array index. \n\t rowIdxContentsArr[row] = content.toCharArray();\n\t logDebug(\"convertFileIntoArray() | row = \"+row +\" , line = \"+content);\n\t row++;\n\t }\n\t logDebug(\"File written successfully into a char array\");\n\t } catch(IOException e) {\n\t \tSystem.err.println(\"Unable to parse file - map.txt. ERROR: \"+e.getMessage());\n\t } finally {\n\t \tif(br != null) {\n\t \t\ttry {\n\t\t\t\t\tbr.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t \t}\n\t }\t\n\t return rowIdxContentsArr;\n\t}", "private ArrayList loadfile(String file_path) throws Exception{\n\t\tFileInputStream fis = null;\n\t\tBufferedReader br = null;\n\t\tArrayList filedata = new ArrayList();\n\t\ttry {\n\t\t\tFile file = new File(file_path);\n\t\t\tfis = new FileInputStream(file);\n\t\t\tbr = new BufferedReader(new InputStreamReader(fis, charset));\n\t\t\tint i = 0;\n\t\t\twhile (br.ready()) {\n\t\t\t\tString line_data = br.readLine();\n\t\t\t\tif (line_data == null) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tnode_line_data nd = new node_line_data(line_data, i++);\n\t\t\t\tfiledata.add(nd);\n\t\t\t}\n\t\t\treturn filedata;\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow new Exception(e.getMessage());\n\t\t}\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif (br != null)\n\t\t\t\t\tbr.close();\n\t\t\t\tif (fis != null)\n\t\t\t\t\tfis.close();\n\t\t\t}\n\t\t\tcatch (IOException ex) {\n\t\t\t}\n\t\t}\n\t}", "public void readInput(String fileName){\n\n BufferedReader reader;\n try {\n reader = new BufferedReader(new FileReader(fileName));\n String line = reader.readLine(); //read first line\n int numLine =1; //keep track the number of line\n while (line != null) {\n String[] tokens = line.trim().split(\"\\\\s+\"); //split line into token\n if(numLine==1){ //for the first line\n intersection = Integer.parseInt(tokens[0]); //set the number of intersection\n roadways = Integer.parseInt(tokens[1]); // set the number of roadways\n coor = new Coordinates[intersection];\n g = new Graph(intersection);//create a graph\n line = reader.readLine();\n numLine++;\n }\n else if(numLine>1&&numLine<intersection+2){ //for all intersection\n while(numLine>1&&numLine<intersection+2){\n tokens = line.trim().split(\"\\\\s+\");\n coor[Integer.parseInt(tokens[0])] = new Coordinates(Integer.parseInt(tokens[1]),Integer.parseInt(tokens[2])); //add into coor array to keep track the coor of intersection\n line = reader.readLine();\n numLine++;\n }\n }\n else if(numLine ==intersection+2){ //skip the space line\n line = reader.readLine();\n numLine++;\n while(numLine<roadways+intersection+3){ // for all the roadways, only include the number of roadways mention in the first line\n tokens = line.trim().split(\"\\\\s+\");\n int fst = Integer.parseInt(tokens[0]);\n int snd = Integer.parseInt(tokens[1]);\n g.addEgde(fst,snd,coor[fst].distTo(coor[snd]));\n line = reader.readLine();\n numLine++;\n }\n }\n else if(numLine >= roadways+intersection+3)\n break;\n }\n reader.close();\n } catch (FileNotFoundException e){\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static int[][][] read(String filename) {\n\n\t\t// Calling the right file\n\t\tStdIn.setInput(filename); \n\t\t// This is for ״P3״\n\t\tStdIn.readString(); \n\t\t// The number of columns from file\n\t\tint columns = StdIn.readInt(); \n\t\t// The number of row from file\n\t\tint rows = StdIn.readInt(); \n\t\t // Creating the 3 dim matrix\n\t\tint[][][] readMatrix = new int[rows][columns][3];\n\t\tStdIn.readInt(); // This is the number of colors\n\n\t\tfor (int i = 0; i < rows; i++) {\n\t\t\tfor (int j = 0; j < columns; j++) {\n\t\t\t\tfor (int k = 0; k < 3; k++) {\n\t\t\t\t\t// Getting the value in a 3d matrix\n\t\t\t\t\treadMatrix[i][j][k] = StdIn.readInt(); \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn readMatrix;\n\t}", "private static void fillDataset(Dataset d){\n try{\n\n BufferedReader in = new BufferedReader(new FileReader(\"src/points.txt\"));\n String str;\n while ((str = in.readLine()) != null){\n String[] tmp=str.split(\",\");\n d.addPoint(new Point(Double.parseDouble(tmp[0]), Double.parseDouble(tmp[1])));\n }\n in.close();\n }\n catch (IOException e){\n System.out.println(\"File Read Error\");\n }\n }", "public void read_file() throws FileNotFoundException, IOException {\n FileReader fw;\r\n BufferedReader rw;\r\n fw = new FileReader(\"dat.txt\");\r\n rw = new BufferedReader(fw);\r\n\r\n String s;\r\n Boy b;\r\n int i, at, intl, bud;\r\n nb = Integer.parseInt(rw.readLine());\r\n for (i = 1; i <= nb; i++) {\r\n s = rw.readLine();\r\n StringTokenizer st = new StringTokenizer(s, \",\");\r\n String name = st.nextToken();\r\n at = Integer.parseInt(st.nextToken());\r\n intl = Integer.parseInt(st.nextToken());\r\n bud = Integer.parseInt(st.nextToken());\r\n String type = st.nextToken();\r\n b = new Boy(name, at, intl, bud, type);\r\n boy_arr.add(b);\r\n }\r\n ng = Integer.parseInt(rw.readLine());\r\n Girl g;\r\n for (i = 1; i <= ng; i++) {\r\n s = rw.readLine();\r\n StringTokenizer st = new StringTokenizer(s, \",\");\r\n String name = st.nextToken();\r\n at = Integer.parseInt(st.nextToken());\r\n intl = Integer.parseInt(st.nextToken());\r\n bud = Integer.parseInt(st.nextToken());\r\n String type = st.nextToken();\r\n g = new Girl(name, at, intl, bud, type);\r\n girl_arr.add(g);\r\n }\r\n fw = new FileReader(\"gift.txt\");\r\n rw = new BufferedReader(fw);\r\n String ty, gid;\r\n int cs, vl,ngg;\r\n ngg = Integer.parseInt(rw.readLine());\r\n for (i = 1; i <= ngg; i++) {\r\n s = rw.readLine();\r\n StringTokenizer st = new StringTokenizer(s, \",\");\r\n gid = st.nextToken();\r\n cs = Integer.parseInt(st.nextToken());\r\n vl = Integer.parseInt(st.nextToken());\r\n ty = st.nextToken();\r\n Gift gf = new Gift(ty, cs, vl, gid);\r\n gift_arr.add(gf);\r\n }\r\n Collections.sort(gift_arr, new Compare());\r\n}", "private void loadData () {\n try {\n File f = new File(\"arpabet.txt\");\n BufferedReader br = new BufferedReader(new FileReader(f));\n vowels = new HashMap<String, String>();\n consonants = new HashMap<String, String>();\n phonemes = new ArrayList<String>();\n String[] data = new String[3];\n for (String line; (line = br.readLine()) != null; ) {\n if (line.startsWith(\";\")) {\n continue;\n }\n data = line.split(\",\");\n phonemes.add(data[0]);\n if (data[1].compareTo(\"v\") == 0) {\n vowels.put(data[0], data[2]);\n } else {\n consonants.put(data[0], data[2]);\n }\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public String[][] getRecord() {\n String fileName = \"dt-data.txt\";\n // This will reference one line at a time\n String line = null;\n int j = 0;\n\n try {\n // FileReader reads text files in the default encoding.\n FileReader fileReader =\n new FileReader(fileName);\n\n // Always wrap FileReader in BufferedReader.\n BufferedReader bufferedReader =\n new BufferedReader(fileReader);\n\n while ((line = bufferedReader.readLine()) != null) {\n String[] array = line.split(\", \");\n for (int i = 0; i <= 8; i++) {\n record[j][i] = array[i];\n }\n j++;\n }\n\n // Always close files.\n bufferedReader.close();\n } catch (FileNotFoundException ex) {\n System.out.println(\"Unable to open file '\" + fileName + \"'\");\n } catch (IOException ex) {\n System.out.println(\"Error reading file '\" + fileName + \"'\");\n // Or we could just do this:\n // ex.printStackTrace();\n }\n return record;\n }", "public Plain(String inputFileName) throws FileNotFoundException {\n File fileReader = new File(inputFileName);\n Scanner fileScanner = new Scanner(fileReader);\n while (fileScanner.hasNextLine()) {\n width++;\n fileScanner.nextLine();\n }\n fileScanner.close();\n Scanner scanner = new Scanner(fileReader);\n Plain plain = new Plain(width + 2);\n grid = new Living[width + 2][width + 2];\n System.out.println(\"... reading ...\");\n while (scanner.hasNext()) {\n for (int j = 1; j < grid.length - 1; j++) {\n for (int k = 1; k < grid[j].length - 1; k++) {\n String nextFileObj = scanner.next();\n char firstLetter = nextFileObj.charAt(0);\n int animalAge = 0;\n if (nextFileObj.length() == 2) {\n animalAge = Character.getNumericValue(nextFileObj.charAt(1));\n }\n switch (firstLetter) {\n case 'B':\n grid[j][k] = new Badger(plain, j, k, animalAge);\n break;\n case 'E':\n grid[j][k] = new Empty(plain, j, k);\n break;\n case 'F':\n grid[j][k] = new Fox(plain, j, k, animalAge);\n break;\n case 'G':\n grid[j][k] = new Grass(plain, j, k);\n break;\n case 'R':\n grid[j][k] = new Rabbit(plain, j, k, animalAge);\n break;\n default:\n grid[j][k] = null;\n break;\n }\n }\n }\n }\n scanner.close();\n System.out.println(\" reading complete \");\n }", "private void loadConversationMap() throws IOException {\n\t\tBufferedReader br = new BufferedReader(new FileReader(DATA_DIR + \"/assistant.txt\"));\r\n\t\tString line, currentCategory;\r\n\t\tint iline = 0;\r\n\t\tcurrentCategory = \"\";\r\n\t\twhile ((line = br.readLine()) != null) {\r\n\t\t\tline = line.trim();\t\t\t\r\n\t\t\tif ( !line.isEmpty() ) {\r\n\t\t\t\tif (iline % 2 == 0) {\r\n\t\t\t\t\tcurrentCategory = line;\r\n\t\t\t\t\tconversationMap.put(currentCategory, new ArrayList<String>(10));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tint pos = 0;\r\n\t\t\t\t\tint nextSemicolonPos = line.indexOf(\";\");\r\n\t\t\t\t\tif (nextSemicolonPos == -1)\r\n\t\t\t\t\t\tconversationMap.get(currentCategory).add(line);\r\n\t\t\t\t\twhile ( pos < line.length() ) {\r\n\t\t\t\t\t\tif (nextSemicolonPos != -1) {\r\n\t\t\t\t\t\t\tconversationMap.get(currentCategory).add(line.substring(pos, nextSemicolonPos));\r\n\t\t\t\t\t\t\tpos = nextSemicolonPos + 1;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tconversationMap.get(currentCategory).add(line.substring(pos));\r\n\t\t\t\t\t\t\tpos = line.length();\r\n\t\t\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t\t\tnextSemicolonPos = line.indexOf(\";\", nextSemicolonPos + 1);\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\tiline++; \r\n\t\t\t} \r\n\t\t}\r\n\t\tbr.close();\t\t\t\r\n\t}", "private static void readArff(String fileName) {\r\n\t\ttry {\r\n\t\t\tFileInputStream stream = new FileInputStream(fileName);\r\n\t\t\tInputStreamReader reader = new InputStreamReader(stream);\r\n\t\t\tBufferedReader buffer = new BufferedReader(reader);\r\n\t\t\t\r\n\t\t\tArrayList<String> tmpColumnName = new ArrayList<String>();\r\n\t\t\t\r\n\t\t\tString line;\r\n\t\t\tint userNo = 0; // sequence number of each user\r\n\t\t\tint attributeCount = 0;\r\n\t\t\t\r\n\t\t\tmaxValue = -1;\r\n\t\t\tminValue = 99999;\r\n\t\t\t\r\n\t\t\t// Read attributes:\r\n\t\t\twhile((line = buffer.readLine()) != null && !line.equals(\"TT_EOF\")) {\r\n\t\t\t\tif (line.contains(\"@ATTRIBUTE\")) {\r\n\t\t\t\t\tString name;\r\n\t\t\t\t\t\r\n\t\t\t\t\tline = line.substring(10).trim();\r\n\t\t\t\t\tif (line.charAt(0) == '\\'') {\r\n\t\t\t\t\t\tint idx = line.substring(1).indexOf('\\'');\r\n\t\t\t\t\t\tname = line.substring(1, idx+1);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tint idx = line.substring(1).indexOf(' ');\r\n\t\t\t\t\t\tname = line.substring(0, idx+1).trim();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\ttmpColumnName.add(name);\r\n\t\t\t\t\tattributeCount++;\r\n\t\t\t\t}\r\n\t\t\t\telse if (line.contains(\"@RELATION\")) {\r\n\t\t\t\t\t// do nothing\r\n\t\t\t\t}\r\n\t\t\t\telse if (line.contains(\"@DATA\")) {\r\n\t\t\t\t\t// This is the end of attribute section!\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\telse if (line.length() <= 0) {\r\n\t\t\t\t\t// do nothing\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Set item count to data structures:\r\n\t\t\titemCount = (attributeCount - 1)/2;\r\n\t\t\tcolumnName = new String[attributeCount];\r\n\t\t\ttmpColumnName.toArray(columnName);\r\n\t\t\t\r\n\t\t\tint[] itemRateCount = new int[itemCount+1];\r\n\t\t\trateMatrix = new SparseMatrix(500000, itemCount+1); // Netflix: [480189, 17770]\r\n\t\t\t\r\n\t\t\t// Read data:\r\n\t\t\twhile((line = buffer.readLine()) != null && !line.equals(\"TT_EOF\")) {\r\n\t\t\t\tif (line.length() > 0) {\r\n\t\t\t\t\tline = line.substring(1, line.length() - 1);\r\n\t\t\t\t\t\r\n\t\t\t\t\tStringTokenizer st = new StringTokenizer (line, \",\");\r\n\t\t\t\t\t\r\n\t\t\t\t\twhile (st.hasMoreTokens()) {\r\n\t\t\t\t\t\tString token = st.nextToken().trim();\r\n\t\t\t\t\t\tint i = token.indexOf(\" \");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tint movieID, rate;\r\n\t\t\t\t\t\tint index = Integer.parseInt(token.substring(0, i));\r\n\t\t\t\t\t\tString data = token.substring(i+1);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (index == 0) { // User ID\r\n\t\t\t\t\t\t\t//int userID = Integer.parseInt(data);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tuserNo++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if (data.length() == 1) { // Rate\r\n\t\t\t\t\t\t\tmovieID = index;\r\n\t\t\t\t\t\t\trate = Integer.parseInt(data);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif (rate > maxValue) {\r\n\t\t\t\t\t\t\t\tmaxValue = rate;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse if (rate < minValue) {\r\n\t\t\t\t\t\t\t\tminValue = rate;\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\t\t(itemRateCount[movieID])++;\r\n\t\t\t\t\t\t\trateMatrix.setValue(userNo, movieID, rate);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse { // Date\r\n\t\t\t\t\t\t\t// Do not use\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tuserCount = userNo;\r\n\t\t\t\r\n\t\t\t// Reset user vector length:\r\n\t\t\trateMatrix.setSize(userCount+1, itemCount+1);\r\n\t\t\tfor (int i = 1; i <= itemCount; i++) {\r\n\t\t\t\trateMatrix.getColRef(i).setLength(userCount+1);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println (\"Data File\\t\" + dataFileName);\r\n\t\t\tSystem.out.println (\"User Count\\t\" + userCount);\r\n\t\t\tSystem.out.println (\"Item Count\\t\" + itemCount);\r\n\t\t\tSystem.out.println (\"Rating Count\\t\" + rateMatrix.itemCount());\r\n\t\t\tSystem.out.println (\"Rating Density\\t\" + String.format(\"%.2f\", ((double) rateMatrix.itemCount() / (double) userCount / (double) itemCount * 100.0)) + \"%\");\r\n\t\t\t\r\n\t\t\tstream.close();\r\n\t\t}\r\n\t\tcatch (IOException ioe) {\r\n\t\t\tSystem.out.println (\"No such file: \" + ioe);\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t}", "public static ArrayList<LurikData> loadData(Context context) throws IOException {\n\t\tLog.d(TAG, \"loading lurik\");\n\t\tResources resources = context.getResources();\n\t\tInputStream inputStream = resources.openRawResource(R.raw.data1);\n\t\tArrayList<LurikData> arListLurik = new ArrayList<LurikData>();\n\t\t\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));\n\t\ttry {\n\t\t\tString word;\n\t\t\t\n\t\t\twhile ((word = reader.readLine()) != null) {\n\t\t\t\tString[] strings = TextUtils.split(word, \":\");\n\n\t\t\t\tString[] data = new String[2];\n\t\t\t\tfor (int i = 0; i < strings.length; i = i + 2) {\n\t\t\t\t\tdata[0] = strings[i];\n\t\t\t\t\tdata[1] = strings[i + 1];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tLurikData lurikData = new LurikData(data[1], SAMPLE_WIDTH, SAMPLE_HEIGHT);\n\t\t\t\t\n\t\t\t\t\tarListLurik.add(lurikData);\n\t\t\t\t\tint index = 0;\n\t\t\t\t\tfor (int y = 0; y < lurikData.getHeight(); y++) {\n\t\t\t\t\t\tfor (int x = 0; x < lurikData.getWidth(); x++) {\n\t\t\t\t\t\t\tlurikData.setData(x, y, data[0].charAt(index++) == '1');\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//word = reader.readLine();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treader.close();\n\t\t\tinputStream.close();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\n\t\tLog.d(TAG, \"DONE loading lurik\");\n\t\treturn arListLurik;\n\t}", "public void populateListFromFile() \n\t{\n\t\tBufferedReader bufferedReader = null;\n\t\tallQuestions = new ArrayList<ArrayList<String>>();\n\t\tquestionAndAnswers = new ArrayList<String>();\n\n\t\ttry {\n\t\t bufferedReader = new BufferedReader(new FileReader(\"questions.txt\"));\n\t\t String line = \"\";\n\t\t \n\t\t while ((line = bufferedReader.readLine()) != null) \n\t\t {\t\t\t \t\n\t\t \tif(line.length() > 0)\n\t\t \t\tquestionAndAnswers.add(line);\n\t\t \telse if (line.length() == 0)\n\t\t \t{\n\t\t \t\tallQuestions.add(questionAndAnswers);\n\t\t \t\tquestionAndAnswers = new ArrayList<String>();\n\t\t \t}\n\t\t } \n\t\t} catch (IOException e) {\n\t\t e.printStackTrace();\n\t\t}\n\t}", "private static DataCube generateDataCubeFromMonochromeImages(String filenameSpecifier) throws IOException {\n\t\t// Check the format of the string\n\t\tif (!filenameSpecifier.contains(\"%\") || \n\t\t\t\tfilenameSpecifier.indexOf(\"%\") != filenameSpecifier.lastIndexOf(\"%\")) {\n\t\t\tthrow new IllegalArgumentException(\"Filename specifier must contain exactly one '%'.\");\n\t\t}\n\t\t\n\t\t// Find the dimension (number of monochrome images) of the hyperspectral image\n\t\tint noImages = 0;\n\t\tFile file = new File(filenameSpecifier.replace(\"%\", Integer.toString(noImages+1)));\n\t\twhile (file.exists() && !file.isDirectory()) {\n\t\t\tnoImages++;\n\t\t\tfile = new File(filenameSpecifier.replace(\"%\", Integer.toString(noImages+1)));\n\t\t}\n\t\t\n\t\t// Check that we loaded at least one image\n\t\tif (noImages == 0) {\n\t\t\tthrow new FileNotFoundException(\"No images were found using the specifier provided.\");\n\t\t}\n\t\t\n\t\t// Get the width and height of the first image, to check that they have consistent dimensions\n\t\tfile = new File(filenameSpecifier.replace(\"%\", Integer.toString(1)));\n\t\tBufferedImage bi = ImageIO.read(file);\n\t\tint height = bi.getHeight();\n\t\tint width = bi.getWidth();\n\t\t\n\t\t// Create a data cube and load the images into the structure\n\t\tDataCube dc = new DataCube();\n\t\tdc.width = width;\n\t\tdc.height = height;\n\t\tdc.depth = noImages;\n\t\tdc.dataCube = new short[width][height][noImages];\n\t\t\n\t\t// Loop through each image, and add its contents to the data cube\n\t\t// We loop through images as our outer loop because we want to optimise memory management\n\t\t// (Avoid loading all images into memory at once)\n\t\tfor (int k = 0; k < noImages; k++) {\n\t\t\tFile imageFile = new File(filenameSpecifier.replace(\"%\", Integer.toString(k+1))); // images indexed from 1\n\t\t\tBufferedImage image = ImageIO.read(imageFile);\n\t\t\n\t\t\t// Check for consistent image dimension\n\t\t\tif (image.getHeight() != height || image.getWidth() != width) {\n\t\t\t\tthrow new IOException(\"Images have inconsistent dimensions.\");\n\t\t\t}\n\t\t\t\n\t\t\t// Iterate through image adding its data to the datacube\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\tfor (int j = 0; j < height; j++) {\n\t\t\t\t\tint colour = image.getRGB(i, j);\n\t\t\t\t\tdc.dataCube[i][j][k] = (short) (colour & 0xFF);\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t\t\n\t\t// Return the data cube\n\t\treturn dc;\n\t}", "public void getDataForRegion(String dataType, String[] countrys, String year){\r\n String line = \"\"; \r\n int i=0;\r\n double[] rez= new double[countrys.length];\r\n int count=0;\r\n ArrayList<String> coun= new ArrayList<>();\r\n ArrayList<Double> dat= new ArrayList<>();\r\n try{ \r\n BufferedReader br = new BufferedReader(new FileReader(\"dataSets//\"+dataType+\".csv\")); \r\n while ((line = br.readLine()) != null){\r\n String lineArr[]=line.split(\",\");\r\n if(i==0){\r\n for(int j=1; j!=lineArr.length; j++){\r\n if(lineArr[j].equals(year)){\r\n i=j;\r\n }\r\n }\r\n }\r\n else{\r\n for(int j=0; j!=countrys.length; j++){\r\n if(lineArr[0].equals(countrys[j]) || lineArr[0].contains(countrys[j]) || countrys[j].contains(lineArr[0])){\r\n coun.add(lineArr[0]);\r\n dat.add(Double.parseDouble(lineArr[i]));\r\n }\r\n }\r\n }\r\n } \r\n }catch(Exception e){}\r\n c= new String[coun.size()];\r\n data= new double[coun.size()];\r\n for(int j=0; j!=c.length; j++){\r\n c[j]=coun.get(j);\r\n data[j]=dat.get(j);\r\n }\r\n }", "public static void readDataPatterns(int sizeX, int sizeY, boolean trainORtest){\n StreamTokenizer tok=null;\n String filenameX, filenameY;\n if(trainORtest){\n filenameX=trainDataFileX;\n filenameY=trainDataFileY;\n }\n else{\n filenameX=testDataFileX;\n filenameY=testDataFileY;\n }\n try{\n tok = new StreamTokenizer(new BufferedReader(new FileReader(filenameX)));\n tok.ordinaryChar('\\n');\n //tok.ordinaryChar()\n }\n catch(java.io.FileNotFoundException e){\n System.out.println(e+\" in Context.java\");\n }\n int i=0;\n int j=0;\n float [][] curDat=new float[sizeX][sizeY];\n \n String str;\n try{\n j=0;\n while(tok.nextToken()!=StreamTokenizer.TT_EOF){\n if(j>=44){j=0;i++;}\n switch (tok.ttype){\n case StreamTokenizer.TT_EOL:\n i++;\n j=0;\n break;\n case '\\r': \n i++;\n j=0;\n break;\n case 'n':\n i++;\n j=0;\n break;\n case StreamTokenizer.TT_NUMBER:\n curDat[i][j]=(float)tok.nval;\n // System.out.println(tok.nval);\n // j=j+1;\n // if(j==3){\n // j=0;\n // i++;\n // }\n j++;\n break;\n default:\n // if(tok.ttype!=StreamTokenizer.TT_NUMBER && (tok.sval.compareTo(\"\\t\")!=0||tok.sval.compareTo(\" \")!=0)){//means a newline\n // j=0;\n // i++;\n // }\n break;\n }\n }\n }\n catch(java.io.EOFException e){\n //do nothing\n }\n catch(java.io.IOException e){\n //do nothing\n }\n catch(java.lang.ArrayIndexOutOfBoundsException e){\n //do nothing agin :(\n System.out.println(e+\"Here lies the bug\"+trainORtest+j+i);\n // System.exit(0);\n }\n System.out.println(\"Here is what I read\\n\"+i+j);\n for(i=0;i<2;i++){\n for(j=0;j<3;j++)\n System.out.print(curDat[i][j]+\"\\t\");\n System.out.println();\n }\n try{\n tok = new StreamTokenizer(new BufferedReader(new FileReader(filenameY)));\n tok.ordinaryChar('\\n');\n //tok.ordinaryChar()\n }\n catch(java.io.FileNotFoundException e){\n System.out.println(e+\" in Context.java\");\n }\n i=0;\n double [] DatY=new double[sizeX]; \n try{\n j=0;\n while(tok.nextToken()!=StreamTokenizer.TT_EOF){\n switch (tok.ttype){\n case StreamTokenizer.TT_EOL:\n // i++;\n break;\n // case '\\n':\n // i++;\n // j=0;\n // break;\n case StreamTokenizer.TT_NUMBER:\n DatY[i]=tok.nval;\n i++;\n // System.out.println(tok.nval);\n break;\n default:\n // j++;\n break;\n }\n }\n }\n catch(java.io.EOFException e){\n //do nothing\n }\n catch(java.io.IOException e){\n //do nothing\n }\n catch(java.lang.ArrayIndexOutOfBoundsException e){\n //do nothing agin :(\n System.out.println(e+\"Here lies the bug\");\n System.exit(0);\n }\n if(trainORtest){\n XData=curDat;\n Target=DatY;\n }\n else{\n TestXData=curDat;\n TestTarget=DatY;\n }\n// for(int jj=0;jj<XData.length;jj++){\n // XData[jj][1]*=100;\n // }\n }", "public void cargaDatasetEnMatrices() {\n int i, caux, row, column;\n String linea0 = null;\n String numero;\n char c;\n boolean notnumber; \n try {\n try (BufferedReader entrada = new BufferedReader(new FileReader(fich))) {\n //Recoge el numero de elementos del dataset\n linea0 = entrada.readLine();\n linea0 = entrada.readLine();\n linea0 = entrada.readLine();\n linea0 = entrada.readLine();\n i = 0;\n while (linea0.charAt(i) != ':') {\n i++;\n }\n notnumber = false;\n numero = \"\";\n i++;\n while (!notnumber) {\n if (i == linea0.length()) {\n notnumber = true;\n } else {\n c = linea0.charAt(i);\n if ((c != ' ') && (c != '\\n') && (c != '\\t')) {\n numero += c;\n }\n i++;\n }\n }\n if (i == linea0.length()) {\n n = Integer.parseInt(numero);\n } else {\n n = 0;\n }\n vx = new double[n];\n vy = new double[n];\n //Relleno los vectores vx y vy\n linea0 = entrada.readLine();\n linea0 = entrada.readLine();\n for (row = 0; row < n; row++) {\n for (column = 0; column <= 2; column++) {\n notnumber = false;\n numero = \"\";\n while (!notnumber) {\n caux = entrada.read();\n c = (char) caux;\n if ((c == ' ') || (c == '\\n') || (c == '\\t')) {\n if (numero.length() != 0) {\n if (column == 1) {\n vx[row] = Double.parseDouble(numero);\n } else if (column == 2) {\n vy[row] = Double.parseDouble(numero);\n }\n notnumber = true;\n }\n } else {\n numero += c;\n }\n }\n }\n }\n }\n } catch (IOException ex) {\n }\n }", "private void createArctic(BufferedReader in) {\n try {\n String tempRegionName = in.readLine();\n int maxStaff = Integer.parseInt(in.readLine());\n int numStaff = Integer.parseInt(in.readLine());\n \n Staff[] readStaffList = new Staff[maxStaff]; //creating a local array of Staff; later to be fed as a field to the constructor \n for (int i = 0; i < numStaff; i++) {\n int id = Integer.parseInt(in.readLine());\n //readStaffList[i] = this.searchStaffTemp(id);\n readStaffList[i] = findStaff(id, 0, this.numStaff); //id is the same thing as staffNum in the staff class \n //creates an array of initialized staff objects by searching \n //using the staffNum read from the file\n }\n \n int maxAnimals = Integer.parseInt(in.readLine());\n int numAnimals = Integer.parseInt(in.readLine());\n \n Animal[] animals = new Animal[numAnimals]; //creating a local array of Animals;\n for (int i = 0; i < numAnimals; i++) {\n animals[i] = new Animal(in.readLine(), Integer.parseInt(in.readLine()));\n }\n \n regionList[this.numRegions] = new Arctic(readStaffList, animals, tempRegionName, new RegionSpec(numStaff, maxStaff, numAnimals, maxAnimals, Integer.parseInt(in.readLine()), Double.parseDouble(in.readLine())), \n Integer.parseInt(in.readLine()), Double.parseDouble(in.readLine()), Double.parseDouble(in.readLine()), Boolean.parseBoolean(in.readLine()));\n //constructor call \n } catch (IOException iox) {\n System.out.println(\"Error reading file\");\n }\n this.numRegions++; //updates the global field numRegions\n }", "private static Queue<ClosedShape> readDataFile(Scanner in) {\r\n Queue<ClosedShape> shapeQueue = new Queue<ClosedShape>();\r\n\r\n ArrayList<String[]> dataList = new ArrayList<>();\r\n while (in.hasNextLine()) {\r\n dataList.add(lineSplit(in.nextLine()));\r\n }\r\n\r\n for (int i = 0; i < dataList.size(); i++) {\r\n shapeQueue.enqueue(createShape(dataList.get(i)));\r\n }\r\n\r\n in.close();\r\n return shapeQueue;\r\n }", "static public ArrayList<ChineseCharacter> readFromFile()\r\n\t {\n \t \r\n\t\t InputStream stream = LoadCharactersFromFile.class.getClassLoader().getResourceAsStream(\"files/charactersSet1.txt\");\r\n\t\t\t\t \r\n\t\t\t\r\n\t System.out.println(\"==========> \"+stream != null);\r\n\t // stream = LoadCharactersFromFile.class.getClassLoader().getResourceAsStream(\"SomeTextFile.txt\");\r\n\t // System.out.println(stream != null);\r\n\t \t// getResourceAsStream(\"file.txt\")\r\n\t \t \r\n\t // Resource resource = new ClassPathResource(\"com/example/Foo.class\");\r\n\t \r\n\t String filePath = stream.toString();\r\n\t\t \r\n\t System.out.println(\"filePath: \"+filePath);\r\n\t BufferedReader br = new BufferedReader(new InputStreamReader(stream));\r\n\t String line = \"\";\r\n\t String cvsSplitBy = \",\";\r\n\r\n\t \r\n\t \r\n\t ArrayList<ChineseCharacter> chineseCharacterArraylist = new ArrayList<ChineseCharacter>() ;\r\n\t int charactercount =0;\r\n\t try {\r\n\r\n\t // br = new BufferedReader(new FileReader(filePath));\r\n\t int count = 1;\r\n\t int listLength = 0;\r\n\t \r\n\t // ChineseCharacter character;\r\n\t String listtitle = \"\";\r\n\t ArrayList<String> pinyinlistArray = new ArrayList<String>();\r\n\t \r\n\t ArrayList<Character> hanzilistArray = new ArrayList<Character>() ;\r\n\t int linecount = 0;\r\n\t \r\n\t while ((line = br.readLine()) != null) \r\n\t {\r\n\t \t linecount++;\r\n\t\t\t \r\n\t \t \r\n\t\t\t //listtitle: characters: pinyin: \r\n\t\t\t // use comma as separator\r\n\t\t\t \r\n\t\t\t if(count ==1)\r\n\t\t\t {\r\n\t\t\t \t \r\n\t\t\t \t String[] listtitleLine = line.split(cvsSplitBy);\r\n\t\t\t\t if(listtitleLine[0].equals(\"listtitle:\"))\r\n\t\t\t\t {\t\r\n\t\t\t\t \t \r\n\t\t\t\t \t listtitle = listtitleLine[1];\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\t \r\n\t\t\t\t if(linecount==1)\r\n\t\t\t\t {\r\n\t\t\t\t \t listtitle = listtitleLine[1];\r\n\t\t\t\t \t \r\n\t\t\t\t\t System.out.println(\"linecount==1, Linetype: \" + listtitleLine[0] + \" value: \" + listtitle);\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 }//if(count ==1)\r\n\t\t\t \r\n\t\t\t if(count ==2)\r\n\t\t\t {\r\n\t\t\t \t String[] charactersLine = line.split(cvsSplitBy);\r\n\t\t\t\t if(charactersLine[0].equals(\"characters:\"))\r\n\t\t\t\t {\t\r\n\t\t\t\t \t listLength = charactersLine.length;\r\n\t\t\t\t \r\n\t\t\t\t \t for(int i =0; i<listLength-1; i++)\r\n\t\t\t \t\t\t {\r\n\t\t\t\t \t\t charactersLine[i+1] = charactersLine[i+1].replace(\" \", \"\");\r\n\t\t\t\t \t\t// charactersLine[i+1] = charactersLine[i+1].replace(\",\", \"\");//remove all comma\r\n\t\t\t\t \t\t \r\n\t\t\t\t \t\t hanzilistArray.add(charactersLine[i+1].charAt(0));\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\t }\r\n\t\t\t\t \t System.out.print(\"\\n\"); \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 }//if(count ==2)\r\n\t\t\t \r\n\t\t\t if(count ==3)\r\n\t\t\t {\r\n\t\t\t \t String[] pinyinLine = line.split(cvsSplitBy);\r\n\t\t\t\t if(pinyinLine[0].equals(\"pinyin:\"))\r\n\t\t\t\t {\t\r\n\t\t\t\t \t //check pinyin and characters have same no. of elements\r\n\t\t\t\t \t if (listLength == pinyinLine.length)\r\n\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\t for(int i =0; i<listLength-1; i++)\r\n\t\t\t\t\t \t\t\t {\r\n\t\t\t\t\t\t\t \t \r\n\t\t\t\t\t\t\t \t pinyinlistArray.add(pinyinLine[i+1]);\r\n\t\t\t\t\t \t\t\t\t\r\n\t\t\t\t\t \t\t\t\t \r\n\t\t\t\t\t \t\t\t\t ChineseCharacter character = new ChineseCharacter(listtitle,hanzilistArray.get(i),pinyinlistArray.get(i)); \r\n\t\t\t\t\t \t\t\t\t \r\n\t\t\t\t\t \t\t\t\t chineseCharacterArraylist.add(charactercount, character);;\r\n\t\t\t\t\t \t\t\t\t// chineseCharacters[charactercount] = character;\r\n\t\t\t\t\t \t\t\t\t \r\n\t\t\t\t\t \t\t\t\t charactercount++; \r\n\t\t\t\t\t \t\t\t }\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t \r\n\t\t\t\t \t } \r\n\t\t\t\t \t else \r\n\t\t\t\t \t {\r\n\t\t\t\t \t\t System.out.println(\"listLength != pinyinLine.length!!..unable to add list: \"+ listtitle);\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 hanzilistArray.clear();\r\n\t \t\t\t\t pinyinlistArray.clear(); \r\n\t\t\t }//if(count ==3)\r\n\t\t\t \r\n\t\t\t \r\n\t\t\t if(count == 3) { count = 1;}\r\n\t\t\t else{ count++;}\r\n\t\t\t \r\n\t\t\t \r\n\t }//while\r\n\r\n\t \r\n\t \r\n\t \r\n\t \r\n\t }\r\n\t catch (FileNotFoundException e) \r\n\t {\r\n\t e.printStackTrace();\r\n\t } \r\n\t catch (IOException e) \r\n\t {\r\n\t e.printStackTrace();\r\n\t } finally \r\n\t {\r\n\t if (br != null) \r\n\t {\r\n\t try \r\n\t {\r\n\t br.close();\r\n\t } catch (IOException e) \r\n\t {\r\n\t e.printStackTrace();\r\n\t }\r\n\t }\r\n\t }\r\n\t\t \r\n\t \r\n\t return chineseCharacterArraylist;\r\n\t }", "private void readFromFile(String filename) {\n\t\ttry {\n\t\t Scanner read = new Scanner(new File(filename));\n\t\t String line;\n\t\t int counter = 0;\n\t\t String temp;\n\t\t line = read.nextLine();\n\t\t temp = line.substring(0);\n\t\t height = convertToInt(temp);\n\n\t\t line = read.nextLine();\n\t\t temp = line.substring(0);\n\n\t\t length = convertToInt(temp);\n\t\t size = height*length;\n\t\t \n\t\t squares = new Square[size][size];\n\n\t\t while(read.hasNextLine()) {\n\t\t\t\tline = read.nextLine();\n\t\t \tfor (int i = 0; i < line.length(); i++) {\n\t\t \t temp = line.substring(i, i+1);\n\n\t\t \t if (temp.equals(\".\")) {\n\t\t \t\t\tsquares[counter][i] = new FindValue(0);\n\t\t \t } \n\t\t \t else {\n\t\t\t\t\t\tsquares[counter][i] = new PreFilled(convertToInt(temp));\n\t\t\t \t\t}\n\t\t \t}\n\t\t \tcounter++;\n\t\t }\n\t\t} catch(IOException e) {\n\t\t e.printStackTrace();\n\t\t}\n }", "public void readInOrganizations() {\n // read CSV file for Organizations\n allOrganizations = new ArrayList<Organization>();\n InputStream inputStream = getResources().openRawResource(R.raw.organizations);\n CSVFile csvFile = new CSVFile(inputStream);\n List scoreList = csvFile.read();\n // ignore first row because it is the title row\n for (int i = 1; i < scoreList.size(); i++) {\n String[] organizationInfo = (String[]) scoreList.get(i);\n\n // inputs to Organization constructor:\n // String name, int logoPhotoID, int photo1ID, int photo2ID, int photo3ID\n\n // group together description\n String description = getDescription(5, organizationInfo);\n\n // get all image IDs according to the names\n int logoPhotoID = context.getResources().getIdentifier(organizationInfo[1], \"drawable\", context.getPackageName());\n int photo1ID = context.getResources().getIdentifier(organizationInfo[2], \"drawable\", context.getPackageName());\n int photo2ID = context.getResources().getIdentifier(organizationInfo[3], \"drawable\", context.getPackageName());\n int photo3ID = context.getResources().getIdentifier(organizationInfo[4], \"drawable\", context.getPackageName());\n allOrganizations.add(new Organization(organizationInfo[0], logoPhotoID, photo1ID, photo2ID, photo3ID, description));\n\n //System.out.println(\"organizationInfo: \" + organizationInfo[0] + \" \" + organizationInfo[1] + \" \" + organizationInfo[2] + \" \" + organizationInfo[3] + \" \" + organizationInfo[4]);\n }\n }", "private DefaultCategoryDataset createDataset() {\n\t\t\n\t\tdataset.clear();\n\t\t\n\t\t// Query HIM to submit data for bar chart display \n\t\tHistoricalInfoMgr.getChartDataset(expNum);\n\n\n\t\treturn dataset; // add the data point (y-value, variable, x-value)\n\t}", "public List<String[]> readArticlesFromDirectory(String path) throws FileNotFoundException, IOException {\n List<String[]> res = new ArrayList();\n final File directory = new File(path);\n for(final File article : directory.listFiles()) {\n BufferedReader br = new BufferedReader(new FileReader(article));\n String line;\n String[] str = new String[2];\n int label = 0;\n while((line = br.readLine()) != null) {\n if(label == 0) {\n str[0] = line;\n str[1] = \"\";\n label ++; \n }\n str[1] += line;\n }\n \n res.add(str);\n }\n return res;\n }", "public void readFile()\n {\n try {\n fileName = JOptionPane.showInputDialog(null,\n \"Please enter the file you'd like to access.\"\n + \"\\nHint: You want to access 'catalog.txt'!\");\n \n File aFile = new File(fileName);\n Scanner myFile = new Scanner(aFile);\n \n String artist, albumName; \n while(myFile.hasNext())\n { //first we scan the document\n String line = myFile.nextLine(); //for the next line. then we\n Scanner myLine = new Scanner(line); //scan that line for our info.\n \n artist = myLine.next();\n albumName = myLine.next();\n ArrayList<Track> tracks = new ArrayList<>();\n \n while(myLine.hasNext()) //to make sure we get all the tracks\n { //that are on the line.\n Track song = new Track(myLine.next());\n tracks.add(song);\n }\n myLine.close();\n Collections.sort(tracks); //sort the list of tracks as soon as we\n //get all of them included in the album.\n Album anAlbum = new Album(artist, albumName, tracks);\n catalog.add(anAlbum);\n }\n myFile.close();\n }\n catch (NullPointerException e) {\n System.err.println(\"You failed to enter a file name!\");\n System.exit(1);\n }\n catch (FileNotFoundException e) {\n System.err.println(\"Sorry, no file under the name '\" + fileName + \"' exists!\");\n System.exit(2);\n }\n }", "public void plzreadDataFiles(){\n\n //This line opens the file and returns an Input Stream data type\n InputStream itemIs = getResources().openRawResource(R.raw.card_data);\n\n //Read the file line by line\n BufferedReader reader = new BufferedReader(new InputStreamReader(itemIs, Charset.forName(\"UTF-8\")));\n\n //Initialize a var to track the line of the file being read in\n String line =\"\";\n\n // error proofing if the file is weird\n try {\n int i = 0;\n int k = 0;\n while ((line = reader.readLine()) != null){\n //split data by commas into an array of strings\n String[] token = line.split(\",\");\n\n itemArray[i] = new itemInfo();\n\n //Read the data\n itemArray[i].setCardType(token[0]);\n itemArray[i].setCardName(token[1]);\n itemArray[i].setItemType(token[2]);\n itemArray[i].setFrontText(token[3]);\n itemArray[i].setRearText(token[4]);\n itemArray[i].setDuration(token[5]);\n\n\n // Create a list of ITEM names for the autocomplete\n if ((itemArray[i].getCardType().intern()) == (\"Common Item\")){\n //itemSearchArray[i] = token[1];\n itemsOnlyList[k] = token[1];\n k = k + 1;\n }\n\n else if ((itemArray[i].getCardType().intern()) == (\"Unique Item\")){\n //itemSearchArray[i] = token[1];\n itemsOnlyList[k] = token[1];\n k = k + 1;\n }\n\n else if ((itemArray[i].getCardType().intern()) == (\"Spell\")){\n //itemSearchArray[i] = token[1];\n itemsOnlyList[k] = token[1];\n k = k + 1;\n }\n\n //Check that the damage column has a number in it, and write it in\n if (token[5].intern() != \"-\"){\n itemArray[i].setDamage(Integer.parseInt(token[5]));\n }\n else{\n //Set it to zero if the dash is detected\n itemArray[i].setDamage(0);\n }\n itemArray[i].setDuration(token[6]);\n\n i = i + 1;\n\n Log.d(\"My Activity\", \"Just added: \"+itemArray[i]);\n }\n\n } catch (IOException e) {\n Log.wtf(\"MyActivity\",\"Error reading data file on line\"+line,e);\n e.printStackTrace();\n }\n }", "public static String[][][] schematic(File file) {\n try {\n blocks = new String[8][11][11];\n \n BufferedReader bufRdr = new BufferedReader(new FileReader(file));\n String line;\n //read each line of text file\n for (int level = 0; level < 8; level++) {\n for (int row = 0; row < 11; row++) {\n line = bufRdr.readLine();\n String[] strArr = line.split(\",\");\n System.arraycopy(strArr, 0, blocks[level][row], 0, 11);\n }\n }\n } catch (IOException io) {\n System.err.println(Constants.MY_PLUGIN_NAME + \" Could not read csv file\");\n }\n return blocks;\n }" ]
[ "0.7115148", "0.6852571", "0.66861326", "0.61404264", "0.60455245", "0.595911", "0.5858636", "0.58397454", "0.58297753", "0.5793288", "0.57436657", "0.563792", "0.5627143", "0.5622805", "0.5619649", "0.56072176", "0.5595179", "0.5587617", "0.55509007", "0.55490977", "0.5547054", "0.5545676", "0.554266", "0.5538492", "0.552702", "0.55073243", "0.55041635", "0.5481705", "0.5467669", "0.5459834", "0.54570913", "0.5452681", "0.5434041", "0.54227483", "0.5421935", "0.54193264", "0.5418465", "0.54101473", "0.5403837", "0.5394065", "0.53940547", "0.53919667", "0.53867245", "0.538387", "0.5373427", "0.53716034", "0.5344697", "0.53439903", "0.5343737", "0.5337494", "0.5328138", "0.5297609", "0.52770954", "0.52670515", "0.5259873", "0.52592736", "0.5251947", "0.52376497", "0.5232992", "0.5229884", "0.52254087", "0.522528", "0.52247727", "0.5218753", "0.5207592", "0.5203911", "0.5200112", "0.5191523", "0.51768184", "0.5173567", "0.51646996", "0.51604164", "0.51532364", "0.51516306", "0.51428896", "0.5140339", "0.5133823", "0.5132201", "0.51266557", "0.5122677", "0.51214737", "0.51129967", "0.51117957", "0.51089895", "0.5106928", "0.50971", "0.5080445", "0.50747734", "0.5074168", "0.50654554", "0.50541866", "0.50505054", "0.5049746", "0.5045979", "0.5040825", "0.5036355", "0.5033694", "0.502872", "0.50149506", "0.5008205" ]
0.68898535
1
Prepares 5 random categories to be played by the user in the game selected from all the category files within the categories folder
public void setFiveRandomCategories () { //create a file to store the selected five categories BashCmdUtil.bashCmdNoOutput("mkdir -p data"); File five_random_categories = new File ("data/five_random_categories"); if (!five_random_categories.exists()) { BashCmdUtil.bashCmdNoOutput("touch data/five_random_categories"); } // if five random categories dont exist, i.e. new game being started if (five_random_categories.length() == 0) { List<String> shuffledCategories = new ArrayList<String>(_nzCategories); Collections.shuffle(shuffledCategories); String str = ""; for (int i = 0; i < 5; i++) { try { //create files that are used to store the clues of //the selected five categories File dir = new File ("data/games_module"); if (!dir.exists()) { dir.mkdir(); } File file = new File(dir,shuffledCategories.get(i)); if (!file.exists()) { file.createNewFile(); } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } _fiveRandomCategories.add(shuffledCategories.get(i)); setFiveRandomClues(shuffledCategories.get(i)); str = str + shuffledCategories.get(i) + ","; _gamesData.put(shuffledCategories.get(i), _fiveRandomClues); } BashCmdUtil.bashCmdNoOutput(String.format("echo \"%s\" >> data/five_random_categories",str)); } else { // if files already exist, i.e. the game has already started BufferedReader reader; String str = ""; try { reader = new BufferedReader(new FileReader("data/five_random_categories")); String line = reader.readLine(); str = line; reader.close(); } catch (IOException e) { e.printStackTrace(); } String[] splitStr = str.split(","); for (int i = 0; i<5;i++) { _fiveRandomCategories.add(splitStr[i]); setFiveRandomClues(splitStr[i]); _gamesData.put(splitStr[i], _fiveRandomClues); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setFiveRandomClues (String category){\n\t\tFile file = new File(\"data/games_module\", category);\n\t\t// writing 5 random clues to the category file chosen if file is empty\n\t\tif (file.length() == 0) {\n\t\t\tList<String> clues = new ArrayList<String>();\n\t\t\tclues = _nzData.get(category);\n\t\t\tCollections.shuffle(clues);\n\t\t\tList<String> temp = new ArrayList<String>();\n\t\t\tfor (int i = 0; i<5;i++) {\n\t\t\t\ttemp.add(clues.get(i));\n\t\t\t\tBashCmdUtil.bashCmdNoOutput(String.format(\"echo \\\"%s\\\" >> data/games_module/\\\"%s\\\"\",clues.get(i), category));\n\t\t\t}\n\t\t\t_fiveRandomClues = temp;\n\t\t}\n\t\telse {\n\t\t\ttry {\n\t\t\t\tScanner myReader = new Scanner(file);\n\t\t\t\tList<String> temp= new ArrayList<String>();\n\t\t\t\twhile(myReader.hasNextLine()) {\n\t\t\t\t\tString fileLine = myReader.nextLine();\n\t\t\t\t\ttemp.add(fileLine);\n\t\t\t\t}\n\t\t\t\t_fiveRandomClues = new ArrayList<String>(temp);\n\t\t\t\tmyReader.close();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t}", "public void randomizeCategory() {\n this.group = (int) (3*Math.random()+1);\n }", "public void gamemodeSetUp(ArrayList<Player> players, int numberOfQuestions, Categories categories){\n for (int i = 0; i < numberOfQuestions; i++) {\n String categoriesToAsk = categories.getRandomCategory();\n Question questionToBeAsked;\n System.out.format(\"The category is %s\\n\", categoriesToAsk);\n switch (categoriesToAsk) {\n case \"Math\":\n if (categories.getMathArray().isEmpty()){\n categories.initializeTheArrayWithMathQuestions();\n }\n questionToBeAsked = this.setUpQuestion(categories.getMathArray());\n gamemodePlay(players, questionToBeAsked);\n break;\n case \"General Knowledge\":\n if (categories.getGeneralKnowledgeArray().isEmpty()){\n categories.initializeTheArrayWithGeneralKnowledgeQuestions();\n }\n questionToBeAsked = this.setUpQuestion(categories.getGeneralKnowledgeArray());\n gamemodePlay(players, questionToBeAsked);\n break;\n case \"Science\":\n if (categories.getScienceArray().isEmpty()){\n categories.initializeTheArrayWithScienceQuestions();\n }\n questionToBeAsked = this.setUpQuestion(categories.getScienceArray());\n gamemodePlay(players, questionToBeAsked);\n break;\n case \"Movies\":\n if (categories.getMoviesArray().isEmpty()){\n categories.initializeTheArrayWithMoviesQuestions();\n }\n questionToBeAsked = this.setUpQuestion(categories.getMoviesArray());\n gamemodePlay(players, questionToBeAsked);\n break;\n }\n }\n scoreSumUp(players);\n }", "public void initiateGame() {\n Collections.shuffle(players);\n Collections.shuffle(categories);\n for (Category c : categories) {\n c.shuffleChallenges();\n }\n }", "public void readInCategories() {\n // read CSV file for Categories\n allCategories = new ArrayList<Category>();\n InputStream inputStream = getResources().openRawResource(R.raw.categories);\n CSVFile csvFile = new CSVFile(inputStream);\n List scoreList = csvFile.read();\n // ignore first row because it is the title row\n for (int i = 1; i < scoreList.size(); i++) {\n String[] categoryInfo = (String[]) scoreList.get(i);\n\n // inputs to Category constructor:\n // String name, int smallPhotoID, int bannerPhotoID\n\n // get all image IDs according to the names\n int smallPhotoID = context.getResources().getIdentifier(categoryInfo[1], \"drawable\", context.getPackageName());\n int bannerPhotoID = context.getResources().getIdentifier(categoryInfo[2], \"drawable\", context.getPackageName());\n allCategories.add(new Category(categoryInfo[0],smallPhotoID, bannerPhotoID));\n\n //System.out.println(\"categoryInfo: \" + categoryInfo[0] + \" \" + categoryInfo[1] + \" \" + categoryInfo[2]);\n }\n }", "public List<String> getFiveRandomCategories () {\n\t\treturn _fiveRandomCategories;\n\t}", "private void pickUtts() {\n for (int i = 0; i < CATEGORIES.length; i++)\n pickedUtts[i] = new Utterance[BUTTONS_PER_PAGE];\n // check all categories to be sure there's enough\n for (int i = 0; i < CATEGORIES.length; i++) {\n if(includedUtts.get(i).size() < BUTTONS_PER_PAGE)\n new Exception().printStackTrace();\n }\n // pick new utts\n Random ran = new Random();\n for (int i = 0; i < CATEGORIES.length; i++) {\n Utterance pick;\n for ( int j = 0; j < BUTTONS_PER_PAGE; j++ ) {\n do {\n pick = includedUtts.get(i).get(ran.nextInt(includedUtts.get(i).size()));\n } while (Arrays.asList(pickedUtts[i]).contains(pick));\n pickedUtts[i][j] = pick;\n }\n }\n }", "public void shuffleItems() {\n LoadProducts(idCategory);\n }", "private void initialiseCategories() {\n\t\t_nzCategories = BashCmdUtil.bashCmdHasOutput(\"ls categories/nz\");\n\t\t_intCategories = BashCmdUtil.bashCmdHasOutput(\"ls categories/international\");\n\t}", "public static void loopCategories() throws IOException {\n //If all of the categories haven't been checked yet check the response at the current index (count).\n if (count < CATEGORY_ARRAY_SIZE) {\n //If that response if equal to TRUE (1).\n if (currentUser.getSingleCategory(count) == TRUE) {\n //Adjust the start index.\n startIndex = count * LOCATIONS_PER_CATEGORY;\n //Call the locaitons view.\n Main.FxmlLoader(LOCATIONS_PATH);\n }\n //Otherwise increment count and check the next index recursively.\n else {\n count++;\n loopCategories();\n }\n }\n }", "int select_musics(Musica mus, int n, String target_Folder, int ids_file[]) {\n File temp;\n File target;\n File mpos;\n int pos, i;\n boolean copy_files = false;\n boolean aleatory = true;\n\n target = new File(target_Folder);\n String target_Original=target_Folder;\n if (target.exists()) copy_files = true;\n\n\n\n if (n == -1) /* n=-1 when selection is not random. */ {\n n = ids_quantity;\n aleatory = false;\n }\n\n for (i = 0; i < n; i++) { /* For each music from list or to be selected randomly */\n System.out.println(\"\\n\" + (i + 1) + \"/\" + n);\n if (music_count == 1) /* if only one music remaining, play this one and select all again */\n {\n pos = 0;\n temp = AllFiles[pos];\n System.out.println(temp.getName());\n System.out.println(temp.getAbsolutePath());\n music_count = music_total;\n }\n else\n {\n if (aleatory) {\n Random rand = new Random(); /* Select one music randomly */\n pos = rand.nextInt(music_count);\n System.out.println(\"id#:[\" + pos+ \"]\");\n temp = AllFiles[pos];\n music_count--; /* Exchange selected music with last one and reduce list size to not repeat */\n AllFiles[pos] = AllFiles[music_count];\n AllFiles[music_count] = temp;\n System.out.println(temp.getName());\n System.out.println(temp.getAbsolutePath());\n\n } else {\n pos = ids_file[i]; /* not random, just take file from array */\n System.out.println(\"id#:[\" + pos+\"]\");\n temp = AllFiles[pos];\n System.out.println(temp.getName());\n System.out.println(temp.getAbsolutePath());\n }\n }\n Path FROM = Paths.get(temp.getAbsolutePath());\n\n String ext = temp.getName().substring(temp.getName().length() - 3); /* Set extension according */\n\n if ((Objects.equals(ext.toLowerCase(), \"mp3\")))\n ext = \"mp3\";\n else\n ext = \"wma\";\n\n\n\n if (copy_files) /* If subfolder should be created, create them,if not use one folder only */\n {\n if (Main.subgroup)\n {\n target_Folder = target_Original + \"\\\\LetTheMusicPlay\" + (i/Main.maxsubgroup+1);\n }\n else\n {\n target_Folder = target_Original + \"\\\\LetTheMusicPlay\";\n }\n }\n target = new File(target_Folder);\n if (!target.exists()) target.mkdir();\n\n if (copy_files) { /* when copying if same filename exist, copy to a different folder */\n\n\n String path_text = target_Folder + \"\\\\\" + temp.getName();\n if (Main.number_files) path_text = target_Folder + \"\\\\(\" + zerofill(i+1,n) + \")\"+ temp.getName();\n target = new File(path_text);\n int j = 0;\n while (target.exists()) {\n j++;\n target = new File(target_Folder + \"\\\\\" + j);\n if (!target.exists()) target.mkdir();\n path_text = target_Folder + \"\\\\\" + j + \"\\\\\" + temp.getName();\n target = new File(path_text);\n }\n Path TO = Paths.get(path_text);\n CopyOption[] options = new CopyOption[]{\n StandardCopyOption.REPLACE_EXISTING,\n StandardCopyOption.COPY_ATTRIBUTES};\n try {\n Files.copy(FROM, TO, options);\n } catch (IOException e) {\n e.printStackTrace();\n }\n } else {\n Path TO = Paths.get(\"music1.\" + ext); /* to play, copy file to a temporary file to avoid issues due name*/\n if (flag_music_copy == 0) TO = Paths.get(\"music2.\" + ext);\n //overwrite existing file, if exists\n CopyOption[] options = new CopyOption[]{\n StandardCopyOption.REPLACE_EXISTING,\n StandardCopyOption.COPY_ATTRIBUTES};\n try {\n Files.copy(FROM, TO, options);\n } catch (IOException e) {\n e.printStackTrace();\n }\n try {\n PrintWriter writer = new PrintWriter(\"playmusic.bat\", \"ISO-8859-1\");\n if (flag_music_copy == 1) {\n writer.println(\"music1.\" + ext);\n File f = new File(\"music1.\" + ext);\n f.setWritable(true);\n }\n if (flag_music_copy == 0) {\n writer.println(\"music2.\" + ext);\n File f = new File(\"music2.\" + ext);\n f.setWritable(true);\n }\n\n flag_music_copy = (flag_music_copy + 1) % 2; /* Exchange between 1 and 2 */\n\n writer.close();\n Runtime.getRuntime().exec(\"playmusic.bat\"); /* Play Music */\n Thread.sleep(250);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n Scanner in = new Scanner(System.in);\n int s;\n s = -1;\n\n while ((i < n - 1) && (s == -1)) {\n System.out.print(\"Type any number greater than 0 to next music or 0 to exit: \"); /* Wait user select next one */\n s = in.nextInt();\n\n }\n ;\n if (s == 0) break;\n }\n }\n return (0);\n }", "void updateUsedCategoriesContent() {\n try{\n InputStream inputStream = DMOZCrawler.class.getResourceAsStream(\"Used_categories.txt\");\n InputStreamReader inputStreamReader = new InputStreamReader(inputStream);\n BufferedReader bufferedReader = new BufferedReader(inputStreamReader);\n HashSet<String> usedCategories = new HashSet<>();\n\n String currentLine;\n while ((currentLine = bufferedReader.readLine()) != null){\n usedCategories.add(currentLine.toLowerCase());\n System.out.println(\"Used category added :: \" + currentLine);\n }\n\n System.out.println(usedCategories);\n\n for(String id : usedCategories){\n categoryContent(Integer.parseInt(id));\n }\n } catch (Exception exception){\n exception.printStackTrace();\n }\n }", "public void setupRandomCards(ArrayList<String> cardSets)\n\t{\n\t\tArrayList<Card> unrandomized = new ArrayList<Card>();\n\t\tfor (String expansionName : cardSets)\n\t\t{\n\t\t\tswitch(expansionName)\n\t\t\t{\n\t\t\t\tcase(\"base\") :\n\t\t\t\t\tfor (Card card : cards.getBase())\n\t\t\t\t\t\tunrandomized.add(card);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault :\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (unrandomized.size() == 0)\n\t\t{\n\t\t\tLog.important(\"No sets were selected - adding base set\");\n\t\t\tfor (Card card : cards.getBase())\n\t\t\t\tunrandomized.add(card);\n\t\t}\n\t\tLog.important(\"Selecting 10 random cards from card set.\");\n\t\tint index;\n\t\tCard card;\n\t\tfor (int i = 0; i < 10; i++)\n\t\t{\n\t\t\tindex = random.nextInt(unrandomized.size());\n\t card = unrandomized.get(index);\n\t unrandomized.remove(index);\n\t gameCards.add(card);\n\t Log.log(\"Card selected: \" + card.getName());\n\t\t}\n\t\tLog.important(\"Done selecting cards.\");\n\t}", "private void readCategories() throws Exception {\n\t\t//reads files in nz category\n\t\tif (_nzCategories.size() > 0) {\n\t\t\tfor (String category: _nzCategories) {\n\t\t\t\t// read each individual line from the category files and store it\n\t\t\t\ttry {\n\t\t\t\t\tFile file = new File(\"categories/nz/\", category);\n\t\t\t\t\tScanner myReader = new Scanner(file);\n\t\t\t\t\tList<String> allLines = new ArrayList<String>();\n\t\t\t\t\twhile(myReader.hasNextLine()) {\n\t\t\t\t\t\tString fileLine = myReader.nextLine();\n\t\t\t\t\t\tallLines.add(fileLine);\n\t\t\t\t\t}\n\t\t\t\t\tList<String> copy = new ArrayList<String>(allLines);\n\t\t\t\t\t_nzData.put(category, copy);\n\t\t\t\t\tallLines.clear();\n\t\t\t\t\tmyReader.close();\n\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//reads file in international categories\n\t\tif (_intCategories.size() > 0) {\n\t\t\tfor (String category: _intCategories) {\n\t\t\t\t// read each individual line from the category files and store it\n\t\t\t\ttry {\n\t\t\t\t\tFile file = new File(\"categories/international/\", category);\n\t\t\t\t\tScanner myReader = new Scanner(file);\n\t\t\t\t\tList<String> allLines = new ArrayList<String>();\n\t\t\t\t\twhile(myReader.hasNextLine()) {\n\t\t\t\t\t\tString fileLine = myReader.nextLine();\n\t\t\t\t\t\tallLines.add(fileLine);\n\t\t\t\t\t}\n\t\t\t\t\tList<String> copy = new ArrayList<String>(allLines);\n\t\t\t\t\t_intData.put(category, copy);\n\t\t\t\t\tallLines.clear();\n\t\t\t\t\tmyReader.close();\n\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void prepareAlbums() {\n int[] covers = new int[]{\n R.drawable.laser,\n R.drawable.shutterstock_sky,\n R.drawable.setalite,\n R.drawable.doctor,\n R.drawable.tower,\n R.drawable.machine,\n R.drawable.finger,\n R.drawable.polymers,\n R.drawable.liver,\n R.drawable.balls,\n R.drawable.phone};\n\n Invention a = new Invention(\"MOBILE LASER SCANNING AND INFRASTRUCTURE MONITORING SYSTEM\", \"Middle East and UAE in particular have experienced a tremendous boom in property and infrastructure development over the last decade. In other cities, the underlying infrastructure available to property developers is typically mapped and documented well before the developer begins his work.\",\n covers[0], \"Apps\", getRandomNumber(1, 30), getRandomNumber(1, 100), getRandomNumber(1, 3000));\n inventionList.add(a);\n\n a = new Invention(\"HUB CONTEST DISTRIBUTED ALGORITHM\", \" We typically take for granted the amount of work needed for a simple phone call to occur between two mobile phones. Behind the scenes, hundreds, if not thousands of messages are communicated between a mobile handset, radio tower, and countless servers to enable your phone call to go smoothly. \",\n covers[1], \"Product Design\", getRandomNumber(1, 30), getRandomNumber(1, 100), getRandomNumber(1, 3000));\n inventionList.add(a);\n\n a = new Invention(\"CLOCK SYNCHRONIZATION OVER COMMUNICATION \", \" In real life, the communication paths from master to slave and reverse are not perfectly symmetric mainly due to dissimilar forward and reverse physical link delays and queuing delays. asymmetry, creates an error in the estimate of the slave clock’s offset from the master\",\n covers[2], \"Table Top Games\", getRandomNumber(1, 30), getRandomNumber(1, 100), getRandomNumber(1, 3000));\n inventionList.add(a);\n\n a = new Invention(\"PATIENT-SPECIFIC SEIZURE CLASSIFICATION\",\"The timely detection of an epileptic seizure to alert the patient is currently not available. The invention is a device that can classify specific seizures of patients. It is realized within a microchip (IC) and can be attached to the patient.\",\n covers[3], \"Software\", getRandomNumber(1, 30), getRandomNumber(1, 100), getRandomNumber(1, 3000));\n inventionList.add(a);\n\n a = new Invention(\"ALTERNATIVE RENEWABLE ENERGY HARVESTING\", \"There has been increased demand to harvest energy from nontraditional alternative energy sources for self-powered sensors chipsets which are located in remote locations and that can operate at extremely low power levels.\",\n covers[4], \"Gadgets\", getRandomNumber(1, 30), getRandomNumber(1, 100), getRandomNumber(1, 3000));\n inventionList.add(a);\n\n a = new Invention(\"TECHNIQUE FOR MOTOR CONTROL OVER PACKET NETWORKS\", \"Many industries rely on motor control systems to physically control automated machines in manufacturing, energy conservation, process control and other important functions. \",\n covers[5], \"Software\",getRandomNumber(1, 30), getRandomNumber(1, 100), getRandomNumber(1, 3000));\n inventionList.add(a);\n\n a = new Invention(\"INDOOR WIRELESS FINGERPRINTING TECHNIQUE\",\" Location information has gained significant attention for a variety of outdoor applications thanks to the reliable and popular GPS system. \",\n covers[6], \"Apps\", getRandomNumber(1, 30), getRandomNumber(1, 100), getRandomNumber(1, 3000));\n inventionList.add(a);\n\n a = new Invention(\"POLYMERS AND PLASTICS FROM SULFUR COMPOUND\", \"Plastics are some of the most heavily used materials in our world. From plastic bags, to computer components - they are the back-bone material of our daily lives.\",\n covers[7], \"Video Games\", getRandomNumber(1, 30), getRandomNumber(1, 100), getRandomNumber(1, 3000));\n inventionList.add(a);\n\n a = new Invention(\"FIBER-IN-FIBER BIOARTIFICIAL LIVER DEVICE\", \"Liver is a site for proteins and amino acids production. Once the liver fails, its function is very difficult to replicate. Up to date, there is no approved therapy but human liver transplant - bio artificial liver devices and incubating liver cells are only a short term solution to bridge the time for the patients to the ultimate liver transplant.\",\n covers[8], \"Gadgets\", getRandomNumber(1, 30), getRandomNumber(1, 100), getRandomNumber(1, 3000));\n inventionList.add(a);\n\n a = new Invention(\"COMPACT SUFFIX TREE FOR BINARY PATTERN MATCHING\", \" While the “suffix tree” is an efficient structure to solve many string problems, especially in cloud storages, it requires a large memory space for building and storing the tree structure. \",\n covers[9], \"Apps\", getRandomNumber(1, 30), getRandomNumber(1, 100), getRandomNumber(1, 3000));\n inventionList.add(a);\n\n adapter.notifyDataSetChanged();\n }", "public void RandomizeTheDeck() {\r\n ArrayList<ArrayList<Card>> alalCopy = new ArrayList<>();\r\n int i, iRand;\r\n Random rand = new Random();\r\n \r\n // remove deck to the copy\r\n for( i=0; i<104; i++) {\r\n alalCopy.add( alalSets.get(i) );\r\n }\r\n alalSets.clear();\r\n \r\n // randomly copy them back as copy size gets smaller\r\n for( i=104; i>0; i-- ) {\r\n iRand = (int)rand.nextInt(i);\r\n alalSets.add( alalCopy.remove(iRand) );\r\n }\r\n }", "private List<ExploreSitesCategory> createDefaultCategoryTiles() {\n List<ExploreSitesCategory> categoryList = new ArrayList<>();\n\n // Sport category.\n ExploreSitesCategory category = new ExploreSitesCategory(\n SPORT, getContext().getString(R.string.explore_sites_default_category_sports));\n category.setDrawable(getVectorDrawable(R.drawable.ic_directions_run_blue_24dp));\n categoryList.add(category);\n\n // Shopping category.\n category = new ExploreSitesCategory(\n SHOPPING, getContext().getString(R.string.explore_sites_default_category_shopping));\n category.setDrawable(getVectorDrawable(R.drawable.ic_shopping_basket_blue_24dp));\n categoryList.add(category);\n\n // Food category.\n category = new ExploreSitesCategory(\n FOOD, getContext().getString(R.string.explore_sites_default_category_cooking));\n category.setDrawable(getVectorDrawable(R.drawable.ic_restaurant_menu_blue_24dp));\n categoryList.add(category);\n return categoryList;\n }", "public static String[] pickListOfNImagesRandom(int n, File dir ){\n String[] imageFileNameList = new String[n+5];\n String[] inputFileList = dir.list();\n for(int i =0; i < imageFileNameList.length; i++){\n int random = (int) getRandomIntegerBetweenRange(0,inputFileList.length-1);\n imageFileNameList[i] = inputFileList[random];\n }\n /*\n for(String imageFileNameListItem : imageFileNameList){\n System.out.println(imageFileNameListItem);\n }\n */\n return imageFileNameList;\n }", "public void startTest (View v)\n {\n ArrayList<String> selectedCategories = new ArrayList<>();\n\n // call custom Adapter method to get the list of selected categories..\n ArrayList<Category> categories = customAdapterCategoryTest.getList();\n\n\n for (int i = 0; i < categories.size(); i++) {\n Category category = categories.get(i);\n if (category.isSelected()) {\n selectedCategories.add(category.getName().toString().trim());\n Log.d(TAG,\"Selected Categories is \"+category.getName());\n }\n }\n\n\n if(selectedCategories.isEmpty() || selectedCategories == null )\n {\n Toast.makeText(getApplicationContext(),\"Please select any Category \",Toast.LENGTH_SHORT).show();\n return;\n }\n\n\n // convert arraylist to String array to pass as argument\n // create a new array of arrayList size and convert arrayList to Array\n // to pass as argument..\n readDataFromDB(selectedCategories.toArray(new String[selectedCategories.size()]));\n Intent i = new Intent(CategoryTest.this,RandomTestCategory.class);\n i.putExtra(\"selectedCategories\", categories);\n startActivity(i);\n\n }", "public Categories1(Controller controller, LeapListener listener, String dos) {\n initComponents();\n this.listener = listener;\n this.controller = controller;\n doss = dos;\n File repertoire = new File(\"Images\\\\\"+doss);\n File[] files=repertoire.listFiles();\n for(int i=0; i<files.length;i++){\n \n if(files[i].getName().split(\"\\\\.\")[1].equals(\"jpg\")||files[i].getName().split(\"\\\\.\")[1].equals(\"png\")){\n System.out.println(files[i].getName());\n names.add(\"Images/\"+doss+\"/\"+files[i].getName());\n }\n }\n \n \n /* names.add(\"src/guibuilder/newpackage/PIG\");\n names.add(\"src/guibuilder/newpackage/PIG - Copie\");\n names.add(\"src/guibuilder/newpackage/PIG - Copie (2)\");*/\n // n = -1; \n n = 0;\n }", "private void prepareMachineCategoryCards() {\n int totalMachineTypes = machine_types_models_array.size();\n MachineCategories a;\n for (int i=0;i<totalMachineTypes;i++){\n String ss=machine_types_models_array.get(i).getImage();\n Log.e(\"IMAGE URL: \",ss );\n a = new MachineCategories(machine_types_models_array.get(i).getMachine_name(),machine_types_models_array.get(i).getImage());\n machineCategoriesList.add(a);\n }\n adapter.notifyDataSetChanged();\n }", "private void prepareAlbums() {\n// int[] covers = new int[]{\n// R.drawable.album1,\n// R.drawable.album2,\n// R.drawable.album3,\n// R.drawable.album4,\n// R.drawable.album5,\n// R.drawable.album6,\n// R.drawable.album7,\n// R.drawable.album8,\n// R.drawable.album9,\n// R.drawable.album10,\n// R.drawable.album11,\n// R.drawable.album12,\n// R.drawable.album13};\n int [] covers = new int [ALBUM_SIZE];\n for (int i = 0; i < ALBUM_SIZE; i++){\n int temp = i + 1;\n covers[i] = getResources().getIdentifier(\"album\" + temp, \"drawable\", getPackageName() );\n }\n\n Album a = new Album(\"True Romance\", 13, covers[0]);\n albumList.add(a);\n\n a = new Album(\"Xscpae\", 8, covers[1]);\n albumList.add(a);\n\n a = new Album(\"Maroon 5\", 11, covers[2]);\n albumList.add(a);\n\n a = new Album(\"Born to Die\", 12, covers[3]);\n albumList.add(a);\n\n a = new Album(\"Honeymoon\", 14, covers[4]);\n albumList.add(a);\n\n a = new Album(\"I Need a Doctor\", 1, covers[5]);\n albumList.add(a);\n\n // Special image (album19, album20 )has w x h smaller than normal image\n a = new Album(\"Honeymoon\", 14, covers[18]);\n albumList.add(a);\n\n a = new Album(\"Honeymoon\", 14, covers[19]);\n albumList.add(a);\n\n a = new Album(\"Loud\", 11, covers[6]);\n albumList.add(a);\n\n a = new Album(\"Legend\", 14, covers[7]);\n albumList.add(a);\n\n a = new Album(\"Hello\", 11, covers[8]);\n albumList.add(a);\n\n a = new Album(\"Greatest Hits\", 17, covers[9]);\n albumList.add(a);\n\n a = new Album(\"Top Hits\", 17, covers[10]);\n albumList.add(a);\n\n a = new Album(\"King Hits\", 17, covers[11]);\n albumList.add(a);\n\n a = new Album(\"VIP Hits\", 17, covers[12]);\n albumList.add(a);\n\n a = new Album(\"True Romance\", 13, covers[13]);\n albumList.add(a);\n\n a = new Album(\"Xscpae\", 8, covers[14]);\n albumList.add(a);\n\n a = new Album(\"Maroon 5\", 11, covers[15]);\n albumList.add(a);\n\n a = new Album(\"Born to Die\", 12, covers[16]);\n albumList.add(a);\n\n a = new Album(\"Honeymoon\", 14, covers[17]);\n albumList.add(a);\n\n // Special image (album19, album20 )has w x h smaller than normal image\n a = new Album(\"Honeymoon\", 14, covers[18]);\n albumList.add(a);\n\n a = new Album(\"Honeymoon\", 14, covers[19]);\n albumList.add(a);\n\n adapter.notifyDataSetChanged();\n }", "private void createShuffleAndAddCards() {\n //Creating all 108 cards and saving them into an arraylist\n ArrayList<Card> cards = new ArrayList<>();\n String[] colors = {\"red\", \"blue\", \"yellow\", \"green\"};\n for (String color : colors) {\n for (int i = 1; i < 10; i++) {\n for (int j = 0; j < 2; j++) {\n cards.add(new Card(\"Numeric\", color, i));\n }\n }\n cards.add(new Card(\"Numeric\", color, 0));\n for (int i = 0; i < 2; i++) {\n cards.add(new Card(\"Skip\", color, 20));\n cards.add(new Card(\"Draw2\", color, 20));\n cards.add(new Card(\"Reverse\", color, 20));\n }\n }\n for (int i = 0; i < 4; i++) {\n cards.add(new Card(\"WildDraw4\", \"none\", 50));\n cards.add(new Card(\"WildColorChanger\", \"none\", 50));\n }\n //shuffling cards and adding them into the storageCards main list\n Collections.shuffle(cards);\n for (Card card : cards) {\n storageCards.add(card);\n }\n cards.clear();\n }", "public void start(){\n int randomImg1, randomImg2, randomImg3, randomImg4;\n randomImg1 = (int)(Math.random() * images.length);\n\n\n while (true) {\n randomImg2 = (int)(Math.random() * images.length);\n\n if (randomImg1 != randomImg2)\n break;\n }\n\n while (true) {\n randomImg3 = (int)(Math.random() * images.length);\n\n if ((randomImg3 != randomImg1) && (randomImg3 != randomImg2) )\n break;\n }\n\n while (true) {\n randomImg4 = (int)(Math.random() * images.length);\n\n if ((randomImg4 != randomImg1) && (randomImg4 != randomImg2) && (randomImg4 != randomImg3))\n break;\n }\n\n imgName = getResourceNameFromClassByID(images[randomImg1]);\n questionText = \"Find the \" + capitalize(imgName);\n\n //Set the question\n question.setText(questionText);\n\n int random = (int)(Math.random() * 4);\n\n if(random == 0){\n // Set the images\n im_1.setBackgroundResource(images[randomImg1]);\n im_2.setBackgroundResource(images[randomImg2]);\n im_3.setBackgroundResource(images[randomImg3]);\n im_4.setBackgroundResource(images[randomImg4]);\n\n im_1.setTag(images[randomImg1]);\n im_2.setTag(images[randomImg2]);\n im_3.setTag(images[randomImg3]);\n im_4.setTag(images[randomImg4]);\n }\n else if (random == 1) {\n // Set the images\n im_1.setBackgroundResource(images[randomImg2]);\n im_2.setBackgroundResource(images[randomImg1]);\n im_3.setBackgroundResource(images[randomImg3]);\n im_4.setBackgroundResource(images[randomImg4]);\n\n im_1.setTag(images[randomImg2]);\n im_2.setTag(images[randomImg1]);\n im_3.setTag(images[randomImg3]);\n im_4.setTag(images[randomImg4]);\n }\n else if (random == 2) {\n // Set the images\n im_1.setBackgroundResource(images[randomImg2]);\n im_2.setBackgroundResource(images[randomImg3]);\n im_3.setBackgroundResource(images[randomImg1]);\n im_4.setBackgroundResource(images[randomImg4]);\n\n im_1.setTag(images[randomImg2]);\n im_2.setTag(images[randomImg3]);\n im_3.setTag(images[randomImg1]);\n im_4.setTag(images[randomImg4]);\n }\n else {\n // Set the images\n im_1.setBackgroundResource(images[randomImg4]);\n im_2.setBackgroundResource(images[randomImg2]);\n im_3.setBackgroundResource(images[randomImg3]);\n im_4.setBackgroundResource(images[randomImg1]);\n\n im_1.setTag(images[randomImg4]);\n im_2.setTag(images[randomImg2]);\n im_3.setTag(images[randomImg3]);\n im_4.setTag(images[randomImg1]);\n }\n\n // print Total point of the gamer\n tv_points.setText(String.valueOf(points));\n\n\n // speak the question\n speakQuestionText(questionText, 2000);\n\n playSound(sounds[randomImg1]);\n\n speakButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n displayToast(questionText);\n\n speakQuestionText(questionText, 500);\n playSound(sounds[randomImg1]);\n\n }\n });\n\n }", "private void addRandomFoilCard(List<CardCollection.Item> result, int count) {\n List<String> possibleCards = new ArrayList<String>();\n\n // Very Rare foils\n for (int i=0; i<3; ++i) {\n possibleCards.add(\"9_94\"); // Fighters Coming In\n possibleCards.add(\"7_168\"); // Boelo\n possibleCards.add(\"106_11\"); // Chall Bekan\n possibleCards.add(\"8_94\"); // Commander Igar\n possibleCards.add(\"9_110\"); // Janus Greejatus\n possibleCards.add(\"9_118\"); // Myn Kyneugh\n possibleCards.add(\"9_120\"); // Sim Aloo\n possibleCards.add(\"4_116\"); // Bad Feeling Have I\n possibleCards.add(\"1_222\"); // Lateral Damage\n possibleCards.add(\"6_149\"); // Scum And Villainy\n possibleCards.add(\"7_241\"); // Sienar Fleet Systems\n possibleCards.add(\"101_6\"); // Vader's Obsession\n possibleCards.add(\"9_147\"); // Death Star II: Throne Room\n possibleCards.add(\"4_161\"); // Executor: Holotheatre\n possibleCards.add(\"4_163\"); // Executor: Meditation Chamber\n possibleCards.add(\"3_150\"); // Hoth: Wampa Cave\n possibleCards.add(\"2_147\"); // Kiffex (Dark)\n possibleCards.add(\"106_10\"); // Black Squadron TIE\n possibleCards.add(\"110_8\"); // IG-88 In IG-2000\n possibleCards.add(\"106_1\"); // Arleil Schous\n possibleCards.add(\"7_44\"); // Tawss Khaa\n possibleCards.add(\"5_23\"); // Frozen Assets\n possibleCards.add(\"7_62\"); // Goo Nee Tay\n possibleCards.add(\"1_55\"); // Mantellian Savrip\n possibleCards.add(\"4_30\"); // Order To Engage\n possibleCards.add(\"101_3\"); // Run Luke, Run!\n possibleCards.add(\"104_2\"); // Lone Rogue\n possibleCards.add(\"6_83\"); // Kiffex (Light)\n possibleCards.add(\"9_64\"); // Blue Squadron B-wing\n possibleCards.add(\"103_1\"); // Gold Leader In Gold 1\n possibleCards.add(\"9_73\"); // Green Squadron A-wing\n possibleCards.add(\"9_76\"); // Liberty\n possibleCards.add(\"103_2\"); // Red Leader In Red 1\n possibleCards.add(\"106_9\"); // Z-95 Headhunter\n }\n\n // Super Rare foils\n for (int i=0; i<2; ++i) {\n possibleCards.add(\"109_6\"); // 4-LOM With Concussion Rifle\n possibleCards.add(\"9_98\"); // Admiral Piett\n possibleCards.add(\"9_99\"); // Baron Soontir Fel\n possibleCards.add(\"110_5\"); // Bossk With Mortar Gun\n possibleCards.add(\"108_6\"); // Darth Vader With Lightsaber\n possibleCards.add(\"110_7\"); // Dengar With Blaster Carbine\n possibleCards.add(\"1_171\"); // Djas Puhr\n possibleCards.add(\"109_11\"); // IG-88 With Riot Gun\n possibleCards.add(\"110_9\"); // Jodo Kast\n possibleCards.add(\"9_117\"); // Moff Jerjerrod\n possibleCards.add(\"7_195\"); // Outer Rim Scout\n possibleCards.add(\"9_136\"); // Force Lightning\n possibleCards.add(\"3_138\"); // Trample\n possibleCards.add(\"104_7\"); // Walker Garrison\n possibleCards.add(\"2_143\"); // Death Star\n possibleCards.add(\"9_142\"); // Death Star II\n possibleCards.add(\"109_8\"); // Boba Fett In Slave I\n possibleCards.add(\"9_154\"); // Chimaera\n possibleCards.add(\"109_10\"); // Dengar In Punishing One\n possibleCards.add(\"106_13\"); // Dreadnaught-Class Heavy Cruiser\n possibleCards.add(\"9_157\"); // Flagship Executor\n possibleCards.add(\"9_172\"); // The Emperor's Shield\n possibleCards.add(\"9_173\"); // The Emperor's Sword\n possibleCards.add(\"110_12\"); // Zuckuss In Mist Hunter\n possibleCards.add(\"104_5\"); // Imperial Walker\n possibleCards.add(\"8_172\"); // Tempest Scout 1\n possibleCards.add(\"9_178\"); // Darth Vader's Lightsaber\n possibleCards.add(\"110_11\"); // Mara Jade's Lightsaber\n possibleCards.add(\"9_1\"); // Capital Support\n possibleCards.add(\"9_6\"); // Admiral Ackbar\n possibleCards.add(\"2_2\"); // Brainiac\n possibleCards.add(\"109_1\"); // Chewie With Blaster Rifle\n possibleCards.add(\"8_3\"); // Chief Chirpa\n possibleCards.add(\"9_13\"); // General Calrissian\n possibleCards.add(\"8_14\"); // General Crix Madine\n possibleCards.add(\"1_15\"); // Kal'Falnl C'ndros\n possibleCards.add(\"102_3\"); // Leia\n possibleCards.add(\"108_3\"); // Luke With Lightsaber\n possibleCards.add(\"7_32\"); // Melas\n possibleCards.add(\"8_23\"); // Orrimaarko\n possibleCards.add(\"110_3\"); // See-Threepio\n possibleCards.add(\"9_31\"); // Wedge Antilles, Red Squadron Leader\n possibleCards.add(\"8_32\"); // Wicket\n possibleCards.add(\"3_32\"); // Bacta Tank\n possibleCards.add(\"3_34\"); // Echo Base Operations\n possibleCards.add(\"1_52\"); // Kessel Run\n possibleCards.add(\"1_76\"); // Don't Get Cocky\n possibleCards.add(\"1_82\"); // Gift Of The Mentor\n possibleCards.add(\"5_69\"); // Smoke Screen\n possibleCards.add(\"1_138\"); // Yavin 4: Massassi Throne Room\n possibleCards.add(\"111_2\"); // Artoo-Detoo In Red 5\n possibleCards.add(\"9_65\"); // B-wing Attack Squadron\n possibleCards.add(\"9_68\"); // Gold Squadron 1\n possibleCards.add(\"106_4\"); // Gold Squadron Y-wing\n possibleCards.add(\"9_74\"); // Home One\n possibleCards.add(\"9_75\"); // Independence\n possibleCards.add(\"109_2\"); // Lando In Millennium Falcon\n possibleCards.add(\"9_81\"); // Red Squadron 1\n possibleCards.add(\"106_7\"); // Red Squadron X-wing\n possibleCards.add(\"7_150\"); // X-wing Assault Squadron\n possibleCards.add(\"104_3\"); // Rebel Snowspeeder\n possibleCards.add(\"9_90\"); // Luke's Lightsaber\n }\n\n // Ultra Rare foils\n for (int i=0; i<1; ++i) {\n possibleCards.add(\"9_109\"); // Emperor Palpatine\n possibleCards.add(\"9_113\"); // Lord Vader\n possibleCards.add(\"110_10\"); // Mara Jade, The Emperor's Hand\n possibleCards.add(\"9_24\"); // Luke Skywalker, Jedi Knight\n }\n\n filterNonExistingCards(possibleCards);\n Collections.shuffle(possibleCards, _random);\n addCards(result, possibleCards.subList(0, Math.min(possibleCards.size(), count)), true);\n }", "public void populateDeck(){\n\n //Add everything to r\n for(int i=0;i<LUMBER;i++){\n deck.add(new ResourceCard(container, Resource.WOOD, cardStartPoint));\n }\n\n for(int i=0;i<WOOL;i++){\n deck.add(new ResourceCard(container, Resource.WOOL, cardStartPoint));\n }\n\n for(int i=0;i<GRAIN;i++){\n deck.add(new ResourceCard(container, Resource.WHEAT, cardStartPoint));\n }\n\n for(int i=0;i<BRICK;i++){\n deck.add(new ResourceCard(container, Resource.BRICKS, cardStartPoint));\n }\n\n for(int i=0;i<ORE;i++){\n deck.add(new ResourceCard(container, Resource.ORE, cardStartPoint));\n }\n //Collections.shuffle(deck);\n\n }", "private boolean checkCaTegoryLegitness(int[] dice, int category) {\n\t\t// our boolean that is false at the beginning.\n\t\tboolean legitnessStatus = false;\n\t\t// we don't need to check anything for one to six or for check so\n\t\t// boolean\n\t\t// will be true. we don't need to check for one to six because if player\n\t\t// chose one to six we score++ every time we get that number\n\t\t// in the dice. and if there is no that number than the score\n\t\t// automatically will be 0.\n\t\tif (category >= 1 && category <= 6 || category == CHANCE) {\n\t\t\tlegitnessStatus = true;\n\t\t} else {\n\t\t\t// but if player chose something other than one to six or chance we\n\t\t\t// make 6 array lists.\n\t\t\tArrayList<Integer> ones = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> twos = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> threes = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> fours = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> fives = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> sixes = new ArrayList<Integer>();\n\t\t\t// after that we get ones, twos and etc. until six from the dice\n\t\t\t// numbers we randomly got and add that numbers in the array it\n\t\t\t// belongs. for example if the integer on first dice is 5 we add 1\n\t\t\t// in array list called fives. finally, arrays size will give us how\n\t\t\t// many that number we have in our dices.\n\t\t\tfor (int i = 0; i < N_DICE; i++) {\n\t\t\t\tif (dice[i] == 1) {\n\t\t\t\t\tones.add(1);\n\t\t\t\t} else if (dice[i] == 2) {\n\t\t\t\t\ttwos.add(1);\n\t\t\t\t} else if (dice[i] == 3) {\n\t\t\t\t\tthrees.add(1);\n\t\t\t\t} else if (dice[i] == 4) {\n\t\t\t\t\tfours.add(1);\n\t\t\t\t} else if (dice[i] == 5) {\n\t\t\t\t\tfives.add(1);\n\t\t\t\t} else if (dice[i] == 6) {\n\t\t\t\t\tsixes.add(1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// after we know how many ones, twos etc. we have its easy to check.\n\t\t\t// for THREE_OF_A_KIND if there is any of the arrays that size is\n\t\t\t// equal or more than 3 legitnessStatus should get true.\n\t\t\tif (category == THREE_OF_A_KIND) {\n\t\t\t\tif (ones.size() >= 3 || twos.size() >= 3 || threes.size() >= 3\n\t\t\t\t\t\t|| fours.size() >= 3 || fives.size() >= 3\n\t\t\t\t\t\t|| sixes.size() >= 3) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t}\n\t\t\t\t// for FOUR_OF_A_KIND if there is any of the arrays that size is\n\t\t\t\t// equal or more than 4 legitnessStatus should get true.\n\t\t\t} else if (category == FOUR_OF_A_KIND) {\n\t\t\t\tif (ones.size() >= 4 || twos.size() >= 4 || threes.size() >= 4\n\t\t\t\t\t\t|| fours.size() >= 4 || fives.size() >= 4\n\t\t\t\t\t\t|| sixes.size() >= 4) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t}\n\t\t\t\t// for FULL_HOUSE we want any of our array list size to be equal\n\t\t\t\t// to three and after that we have that we want one more array\n\t\t\t\t// to be\n\t\t\t\t// equal to two. that means that we will have three similar dice\n\t\t\t\t// and two more similar dice.\n\t\t\t} else if (category == FULL_HOUSE) {\n\t\t\t\tif (ones.size() == 3 || twos.size() == 3 || threes.size() == 3\n\t\t\t\t\t\t|| fours.size() == 3 || fives.size() == 3\n\t\t\t\t\t\t|| sixes.size() == 3) {\n\t\t\t\t\tif (ones.size() == 2 || twos.size() == 2\n\t\t\t\t\t\t\t|| threes.size() == 2 || fours.size() == 2\n\t\t\t\t\t\t\t|| fives.size() == 2 || sixes.size() == 2) {\n\t\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// there is only 3 way we can get SMALL_STRAIGHT. these are if\n\t\t\t\t// dices show: 1,2,3,4 or 2,3,4,5, or 3,4,5,6. for first one it\n\t\t\t\t// means we need our first array size to be one AND our second\n\t\t\t\t// array size to be one AND our third array size to be one AND\n\t\t\t\t// out fourth array list size to be one. and so on for other two\n\t\t\t\t// ways.\n\t\t\t} else if (category == SMALL_STRAIGHT) {\n\t\t\t\tif (ones.size() == 1 && twos.size() == 1 && threes.size() == 1\n\t\t\t\t\t\t&& fours.size() == 1) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t} else if (twos.size() == 1 && threes.size() == 1\n\t\t\t\t\t\t&& fours.size() == 1 && fives.size() == 1) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t} else if (threes.size() == 1 && fours.size() == 1\n\t\t\t\t\t\t&& fives.size() == 1 && sixes.size() == 1) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t}\n\t\t\t\t// for LARGE_STRAIGHT there is only 2 ways. these are:1,2,3,4,5\n\t\t\t\t// or 2,3,4,5,6. for first one it\n\t\t\t\t// means we need our first array size to be one AND our second\n\t\t\t\t// array size to be one AND our third array size to be one AND\n\t\t\t\t// out fourth array list size to be one AND our fifth array list\n\t\t\t\t// size to be one. similar for second way starting from second\n\t\t\t\t// array list and going through to last sixth array list.\n\t\t\t} else if (category == LARGE_STRAIGHT) {\n\t\t\t\tif (ones.size() == 1 && twos.size() == 1 && threes.size() == 1\n\t\t\t\t\t\t&& fours.size() == 1 && fives.size() == 1) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t} else if (twos.size() == 1 && threes.size() == 1\n\t\t\t\t\t\t&& fours.size() == 1 && fives.size() == 1\n\t\t\t\t\t\t&& sixes.size() == 1) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t}\n\t\t\t\t// and for YAHTZEE we want any of our array list size to be\n\t\t\t\t// five. it will mean that all dices show same thing. because if\n\t\t\t\t// for example array list ones size is five it means that we\n\t\t\t\t// added 1 in that array 5 times and it means that we see 5 same\n\t\t\t\t// number on all dices.\n\t\t\t} else if (category == YAHTZEE) {\n\t\t\t\tif (ones.size() == 5 || twos.size() == 5 || threes.size() == 5\n\t\t\t\t\t\t|| fours.size() == 5 || fives.size() == 5\n\t\t\t\t\t\t|| sixes.size() == 5) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// finally it will return boolean of true or false.\n\t\treturn legitnessStatus;\n\t}", "public void randomize(){\r\n\t\tfor(int i = 0;i<this.myQuestions.size();i++){\r\n\t\t\tthis.myQuestions.get(i).randomize();\r\n\t\t}\r\n\t\tCollections.shuffle(this.myQuestions);\r\n\t}", "public static void kategorien_aus_inhaltsverzeichnis_abfangen (String htmlfile)\n\t{\n\t\tmain mainobject = new main ();\n\t\t// System.out.println (\"Ermittle alle Kategorien (Gruppen, Oberkategorien)... 209\\n\");\n BufferedReader in = null;\n try {\n in = new BufferedReader(new FileReader(htmlfile));\n String zeile = null;\n int counter = 0;\n while ((zeile = in.readLine()) != null) {\n \t\n \t// hole kateogrienamen: aus inhaltsverziechnis:\n \tString kategoriename = \"\";\n \t\n \t// Oberkategorie Kategorie steht zwischen:\n \t// <p style=\"margin-top: 0.21cm; margin-bottom: 0.21cm; text-transform: uppercase\">\n \t// und\n \t// </a></font></font></p>\n \t\n \t\n \t\n \t// adde kategorienamen in combo:\n \n\t\t\n\n \t\tcount_kategorien = count_kategorien+1;\n \t\t//kategorienamen[count_kategorien] = kategoriename;\n \t\t//System.out.println (\"Kat Nr.\" + count_kategorien + \" ist \" + kategoriename+\"\\n\" );\n\n \t\t// Schreibe die Kategorien in Textfile:\n \t\tFile kategorienfile = new File (\"kategorien.txt\");\n \t\tif (kategorienfile.exists ())\n \t\t\t{\n \t\t\t\t// lösche die alte vorher damit es keine probleme gibt:\n \t\t\tkategorienfile.delete();\n \t\t\t}\n \t\tFile unterkategorienfile = new File (\"unterkategorien.txt\");\n \t\tif (unterkategorienfile.exists ())\n \t\t\t{\n \t\t\t\t// lösche die alte vorher damit es keine probleme gibt:\n \t\t\tunterkategorienfile.delete();\n \t\t\t}\n \t\t\n \t\tFileWriter fwk1 = new FileWriter (kategorienfile,true);\n \t\tfwk1.write(kategoriename+\"\\n\");\n \t\tfwk1.flush();\n \t\tfwk1.close();\n \t\t\n } // while\n } // try\n catch (Exception yx)\n {\n \tSystem.out.println (\"konnte kategorien aus inhaltverszeichnis nicht auslesen.\");\n }\n\t\t\n\t\t\n\t}", "public void createAnimalsCollection() {\n ArrayList<DataSetAnimal> animalsFetched = getDFO().getAnimalData(getFILE_NAME()).getAnimals();\n setAnimals(new ArrayList<>());\n for (DataSetAnimal animal: animalsFetched) {\n String tmpBreed = animal.getBreedOrType().substring(animal.getBreedOrType().lastIndexOf(\" \") + 1);\n switch (tmpBreed) {\n case \"dolphin\":\n getAnimals().add(new AnimalDolphin(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"duck\":\n getAnimals().add(new AnimalDuck(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"cat\":\n getAnimals().add(new AnimalCat(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"chicken\":\n getAnimals().add(new AnimalChicken(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"horse\":\n getAnimals().add(new AnimalHorse(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"shark\":\n getAnimals().add(new AnimalShark(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"parakeet\":\n getAnimals().add(new AnimalParakeet(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n default:\n getAnimals().add(new AnimalDog(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n }\n }\n }", "private static void catList() {\n\t\tSystem.out.println(\"List of preset Categories\");\n\t\tSystem.out.println(\"=========================\");\n\t\tSystem.out.println(\n\t\t\t\t\"Family\\nTeen\\nThriller\\nAnimated\\nSupernatural\\nComedy\\nDrama\\nQuirky\\nAction\\nComing of age\\nHorror\\nRomantic Comedy\\n\\n\");\n\t}", "public void fillDeck() {\n folder = new File(imagesPath);\n listOfImages = folder.listFiles();\n// System.out.println(\"Path: \"+new File(listOfImages[0].getName()).toURI().toString());\n for (int i = 0; i < listOfImages.length; i++) {\n if (listOfImages[i].isFile() && listOfImages[i].getName().startsWith(\"Playing\")) {\n cards.add(new Card());\n cards.get(i).setName(listOfImages[i].getName());\n Image img = new Image(ImgPath + listOfImages[i].getName());\n ImageView view = new ImageView(img);\n view.setFitHeight(100);\n view.setFitWidth(80);\n cards.get(i).setImage(view);\n }\n }\n\n }", "private void loadCategories() {\n\t\tcategoryService.getAllCategories(new CustomResponseListener<Category[]>() {\n\t\t\t@Override\n\t\t\tpublic void onHeadersResponse(Map<String, String> headers) {\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onErrorResponse(VolleyError error) {\n\t\t\t\tLog.e(\"EditTeamProfileActivity\", \"Error while loading categories\", error);\n\t\t\t\tToast.makeText(EditTeamProfileActivity.this, \"Error while loading categories \" + error.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onResponse(Category[] response) {\n\t\t\t\tCollections.addAll(categories, response);\n\n\t\t\t\tif (null != categoryRecyclerAdapter) {\n\t\t\t\t\tcategoryRecyclerAdapter.setSelected(0);\n\t\t\t\t\tcategoryRecyclerAdapter.notifyDataSetChanged();\n\t\t\t\t}\n\n\t\t\t\tupdateSelectedCategory();\n\t\t\t}\n\t\t});\n\t}", "public void UpdateCategoriesCheckRepeats(){\n dbHandler.OpenDatabase();\n ArrayList<Category> CategoryObjectList = dbHandler.getAllCategory();\n // Create Category String List\n ArrayList<String> CategoryStringList = new ArrayList<>();\n for (int i = 0; i < CategoryObjectList.size(); i++) {\n CategoryStringList.add( CategoryObjectList.get(i).getName() );\n }\n\n Category category;\n // cycle through object list\n for (int i = 0; i < CategoryObjectList.size(); i++) {\n category = CategoryObjectList.get(i);\n CategoryObjectList.remove(i);\n CategoryStringList.remove(i); // remove so it doesn't find itself\n\n // find name in Category List\n int index = CategoryStringList.indexOf( category.getName() );\n\n if (index == -1){\n CategoryObjectList.add(category);\n CategoryStringList.add(category.getName());\n }else{\n CategoryObjectList.get(index).increaseCounter( category.getCounter() );\n CategoryObjectList.get(index).increaseAmount( category.getAmount() );\n i--;\n }\n }\n\n // Add back to database\n dbHandler.deleteAllCategory();\n for (int i = 0; i < CategoryObjectList.size(); i++) {\n dbHandler.addCategory(CategoryObjectList.get(i));\n }\n\n dbHandler.CloseDatabase();\n }", "public void loadRandomClue(String module, String category) {\n\t\tList<String> clues = new ArrayList<String>();\n\t\tif (module == \"nz\") {\n\t\t\tclues = _nzData.get(category);\n\t\t} else if (module == \"int\"){\n\t\t\tclues = _intData.get(category);\n\t\t}\n\t\tint size = clues.size();\n\t\tRandom rand = new Random();\n\t\tint randomIndex = rand.nextInt(size);\n\t\ttry {\n\t\t\t_currentClue = new Clue(clues.get(randomIndex));\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public 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}", "private void loadDefaultCategory() {\n CategoryTable category = new CategoryTable();\n String categoryId = category.generateCategoryID(db.getLastCategoryID());\n String categoryName = \"Food\";\n String type = \"Expense\";\n db.insertCategory(new CategoryTable(categoryId,categoryName,type));\n categoryId = category.generateCategoryID(db.getLastCategoryID());\n categoryName = \"Study\";\n type = \"Expense\";\n db.insertCategory(new CategoryTable(categoryId,categoryName,type));\n db.close();\n }", "public void initCup() {\n \tremainingPieces.clear();\n originalPieces.clear();\n\n BufferedReader inFile = null;\n try {\n //File used to read in the different creatures.\n inFile = new BufferedReader(new FileReader(System.getProperty(\"user.dir\") + File.separator + \"initCupCreatures.txt\"));\n String line = null;\n while ((line = inFile.readLine()) != null) {\n Creature c = new Creature(line);\n remainingPieces.add(c);\n originalPieces.add(c);\n }\n inFile.close();\n //File used to read in the different special incomes.\n inFile = new BufferedReader(new FileReader(System.getProperty(\"user.dir\") + File.separator + \"initCupIncome.txt\"));\n while ((line = inFile.readLine()) != null) {\n SpecialIncome s = new SpecialIncome(line);\n remainingPieces.add(s);\n originalPieces.add(s);\n }\n inFile.close();\n } catch (FileNotFoundException e) {\n System.out.println(\"file not found \" + inFile);\n } catch (EOFException e) {\n System.out.println(\"EOF encountered\");\n } catch (IOException e) {\n System.out.println(\"can't read from file\");\n }\n //Adding the Random Events to the cup.\n BigJuju bj = new BigJuju();\n DarkPlague dp = new DarkPlague();\n Defection df = new Defection();\n GoodHarvest gh = new GoodHarvest();\n MotherLode ml = new MotherLode();\n Teeniepox tp = new Teeniepox();\n TerrainDisaster td = new TerrainDisaster();\n Vandals v = new Vandals();\n WeatherControl wc = new WeatherControl();\n WillingWorkers ww = new WillingWorkers();\n remainingPieces.add(bj);\n originalPieces.add(bj);\n remainingPieces.add(dp);\n originalPieces.add(dp);\n remainingPieces.add(df);\n originalPieces.add(df);\n remainingPieces.add(gh);\n originalPieces.add(gh);\n remainingPieces.add(ml);\n originalPieces.add(ml);\n remainingPieces.add(tp);\n originalPieces.add(tp);\n remainingPieces.add(td);\n originalPieces.add(td);\n remainingPieces.add(v);\n originalPieces.add(v);\n remainingPieces.add(wc);\n originalPieces.add(wc);\n remainingPieces.add(ww);\n originalPieces.add(ww);\n\n //Adding the Magic Events to the cup.\n Balloon b = new Balloon();\n Bow bo = new Bow();\n DispelMagicScroll dms = new DispelMagicScroll();\n DustOfDefense dod = new DustOfDefense();\n Elixir el = new Elixir();\n Fan f = new Fan();\n Firewall fw = new Firewall();\n Golem g = new Golem();\n LuckyCharm lc = new LuckyCharm();\n Sword s = new Sword();\n Talisman t = new Talisman();\n remainingPieces.add(b);\n originalPieces.add(b);\n remainingPieces.add(bo);\n originalPieces.add(bo);\n remainingPieces.add(dms);\n originalPieces.add(dms);\n remainingPieces.add(dod);\n originalPieces.add(dod);\n remainingPieces.add(el);\n originalPieces.add(el);\n remainingPieces.add(f);\n originalPieces.add(f);\n remainingPieces.add(fw);\n originalPieces.add(fw);\n remainingPieces.add(g);\n originalPieces.add(g);\n remainingPieces.add(lc);\n originalPieces.add(lc);\n remainingPieces.add(s);\n originalPieces.add(s);\n remainingPieces.add(t);\n originalPieces.add(t);\n }", "private void setCategoryData(){\n ArrayList<Category> categories = new ArrayList<>();\n //add categories\n categories.add(new Category(\"Any Category\",0));\n categories.add(new Category(\"General Knowledge\", 9));\n categories.add(new Category(\"Entertainment: Books\", 10));\n categories.add(new Category(\"Entertainment: Film\", 11));\n categories.add(new Category(\"Entertainment: Music\", 12));\n categories.add(new Category(\"Entertainment: Musicals & Theaters\", 13));\n categories.add(new Category(\"Entertainment: Television\", 14));\n categories.add(new Category(\"Entertainment: Video Games\", 15));\n categories.add(new Category(\"Entertainment: Board Games\", 16));\n categories.add(new Category(\"Science & Nature\", 17));\n categories.add(new Category(\"Science: Computers\", 18));\n categories.add(new Category(\"Science: Mathematics\", 19));\n categories.add(new Category(\"Mythology\", 20));\n categories.add(new Category(\"Sport\", 21));\n categories.add(new Category(\"Geography\", 22));\n categories.add(new Category(\"History\", 23));\n categories.add(new Category(\"Politics\", 24));\n categories.add(new Category(\"Art\", 25));\n categories.add(new Category(\"Celebrities\", 26));\n categories.add(new Category(\"Animals\", 27));\n categories.add(new Category(\"Vehicles\", 28));\n categories.add(new Category(\"Entertainment: Comics\", 29));\n categories.add(new Category(\"Science: Gadgets\", 30));\n categories.add(new Category(\"Entertainment: Japanese Anime & Manga\", 31));\n categories.add(new Category(\"Entertainment: Cartoon & Animations\", 32));\n\n //fill data in selectCategory Spinner\n ArrayAdapter<Category> adapter = new ArrayAdapter<>(this,\n android.R.layout.simple_spinner_dropdown_item, categories);\n selectCategory.setAdapter(adapter);\n\n }", "public void shuffle() {\n\t\t\n\t\tRandom random = new Random();\n\t\tint position;\n\t\t\n\t\tfor(int i = 0; i < 200 * dimension; i++) {\n\t\t\tposition = random.nextInt(numTiles - 1);\n\t\t\tif(isValidMove(position)) {\n\t\t\t\tmakeMove(position);\n\t\t\t}\n\t\t}\n\t\t\n\t\tnumMoves = 0;\n\t}", "public void setCategories(List<Category> categories) {\n LayoutInflater inflater = LayoutInflater.from(context);\n\n for (Category category : categories) {\n View categoryView = inflater.inflate(R.layout.bottom_sheet_dialog_category, null);\n\n TextView categoryText = (TextView) categoryView.findViewById(R.id.item_header);\n\n categoryText.setText(category.getName());\n\n rootView.addView(categoryView);\n\n for (Option option : category.getOptions()) {\n View optionView = inflater.inflate(R.layout.bottom_sheet_dialog_item, null);\n ImageView icon = (ImageView) optionView.findViewById(R.id.item_icon);\n\n icon.setImageDrawable(option.getIcon());\n\n TextView text = (TextView) optionView.findViewById(R.id.item_text);\n\n text.setText(option.getName());\n\n optionView.setOnClickListener(option.getListener());\n\n rootView.addView(optionView);\n }\n }\n }", "@Override\n public void loadCategories() {\n loadCategories(mFirstLoad, true);\n mFirstLoad = false;\n }", "private void renderCategories(){\n int[] arr = {1, 3, 6, 8, 10};\r\n for (int i : arr) requestQueue.add(getDataFromServer(webURL, String.valueOf(i)));\r\n }", "void init(){\n for(int i = 0; i<6; i++){\n counter[i] = 0;\n }\n\n // Initialising all isRecorded and loopExists booleans to false\n for(int j = 0; j<6; j++){\n isRecorded[j] = false;\n loopExists[j] = false;\n }\n\n // Creating a folder where temp loops can be stored\n File file = new File(Environment.getExternalStorageDirectory() + \"/Loop Box/Loops\");\n if(!file.exists()){\n boolean mkdir = file.mkdirs();\n if(!mkdir) {\n Toast.makeText(mContext, \"Directory creattion failed\", Toast.LENGTH_SHORT).show();\n }\n }\n }", "private void defaultvalues(){\n cat1 = new com.example.myapp.category();\n cat1.setCategory(\"Groceries\");\n cat1.setImage(\"https://i.imgur.com/XhTjOMu.png\");\n databaseReference.child(\"Groceries\").setValue(cat1);\n cat1 = new com.example.myapp.category();\n cat1.setCategory(\"Books\");\n cat1.setImage(\"https://i.imgur.com/U9tdGo6_d.webp?maxwidth=760&fidelity=grand\");\n databaseReference.child(\"Books\").setValue(cat1);\n cat1 = new com.example.myapp.category();\n cat1.setCategory(\"Furniture\");\n cat1.setImage(\"https://i.imgur.com/X0qnvfp.png\");\n databaseReference.child(\"Furniture\").setValue(cat1);\n cat1 = new com.example.myapp.category();\n cat1.setCategory(\"Appliances\");\n cat1.setImage(\"https://i.imgur.com/UpUzKwA.png\");\n databaseReference.child(\"Appliances\").setValue(cat1);\n cat1 = new com.example.myapp.category();\n\n }", "private Category getCategory()\n\t{\n\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\tSystem.out.println(\"Choose category:\");\n\t\tint i = 1;\n\t\tfor(Category category : Category.values())\n\t\t{\n\t\t\tSystem.out.println(i + \": \"+category.getCategoryDescription());\n\t\t\ti++;\n\t\t}\n\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\tString userChoiceStr = scanner.nextLine();\n\t\tint userChoice;\n\t\ttry\n\t\t{\n\t\t\tuserChoice = Integer.parseInt(userChoiceStr);\n\t\t}\n\t\tcatch(NumberFormatException e)\n\t\t{\n\t\t\tSystem.out.println(\"Invalid input\");\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tif(userChoice<1 || userChoice>25)\n\t\t{\n//\t\t\tSystem.out.println(\"Invalid category code\");\n\t\t\treturn null;\n\t\t}\n\t\tCategory category;\n\t\tswitch (userChoice) \n\t\t{\n\t\t\tcase 1: category = Category.ARTS; break;\n\t\t\tcase 2: category = Category.AUTOMOTIVE; break;\n\t\t\tcase 3: category = Category.BABY; break;\n\t\t\tcase 4: category = Category.BEAUTY; break;\n\t\t\tcase 5: category = Category.BOOKS; break;\n\t\t\tcase 6: category = Category.COMPUTERS; break;\n\t\t\tcase 7: category = Category.CLOTHING;break;\n\t\t\tcase 8: category = Category.ELECTRONICS; break;\n\t\t\tcase 9: category = Category.FASHION; break;\n\t\t\tcase 10: category = Category.FINANCE; break;\n\t\t\tcase 11: category = Category.FOOD; break;\n\t\t\tcase 12: category = Category.HEALTH; break;\n\t\t\tcase 13: category = Category.HOME; break;\n\t\t\tcase 14: category = Category.LIFESTYLE; break;\n\t\t\tcase 15: category = Category.MOVIES; break;\n\t\t\tcase 16: category = Category.MUSIC; break;\n\t\t\tcase 17: category = Category.OUTDOORS; break;\n\t\t\tcase 18: category = Category.PETS; break;\n\t\t\tcase 19: category = Category.RESTAURANTS; break;\n\t\t\tcase 20: category = Category.SHOES; break;\n\t\t\tcase 21: category = Category.SOFTWARE; break;\n\t\t\tcase 22: category = Category.SPORTS; break;\n\t\t\tcase 23: category = Category.TOOLS; break;\n\t\t\tcase 24: category = Category.TRAVEL; break;\n\t\t\tcase 25: category = Category.VIDEOGAMES; break;\n\t\t\tdefault: category = null;System.out.println(\"No such category\"); break;\n\t\t}\n\t\treturn category;\n\t}", "public void addRandoms() {\n //Add random boulders on tiles that aren't Lava\n int tileNumber;\n int selector;\n Tile t;\n String tileTexture;\n Random random = new Random();\n SquareVector playerPos = getPlayerEntity().getPosition();\n int tileCount = GameManager.get().getWorld().getTiles().size();\n AbstractWorld world = GameManager.get().getWorld();\n int randIndex;\n\n for (int i = 0; i < 20; i++) {\n //Get respective volcano tile (5 <= Lava tiles Index <= 8\n do {\n randIndex = random.nextInt(tileCount);\n t = world.getTile(randIndex);\n } while (t.getCoordinates().isCloseEnoughToBeTheSame(playerPos));\n\n tileTexture = t.getTextureName();\n tileNumber = Integer.parseInt(tileTexture.split(\"_\")[1]);\n\n selector = random.nextInt(2);\n if (tileNumber < 5 && tileNumber > 1 && selector == 1 && !t.hasParent()) {\n entities.add(new Rock(t, true));\n } else if (t != null && (tileNumber == 3 || tileNumber == 4) &&\n selector == 0 && !t.hasParent()) {\n entities.add(new VolcanoBurningTree(t, true));\n } else {\n i--;\n }\n }\n }", "public void readDataFromDB(String[] selectedCategories)\n {\n\n Cursor questionRows = Splash.dbHelperClass.getRandomCategoryQuestions(selectedCategories);\n Cursor answerRows = null;\n if(questionRows.getCount()== 0)\n {\n Log.d(TAG,\"No data to show\");\n return;\n }\n\n while (questionRows.moveToNext())\n {\n Question q = new Question();\n q.setQuestionId(questionRows.getString(0));\n q.setTopic(questionRows.getString(1));\n q.setQuestionText(questionRows.getString(2));\n\n // now get the list of answers for specific id of the question...\n answerRows = Splash.dbHelperClass.getAnswersForQuestionId(q.getQuestionId());\n if(answerRows.getCount()== 0)\n {\n Log.d(TAG,\"No Answers to show\");\n }\n while(answerRows.moveToNext())\n {\n Answer a = new Answer();\n a.setAnswerId(answerRows.getInt(0));\n\n // trim the string because it contains empty stirng from the database because it can contain image\n\n String noAnswer = answerRows.getString(1).toString().trim();\n if(noAnswer.isEmpty())\n {\n\n a.setImageName(answerRows.getString(4).toString().trim());\n\n\n Log.d(TAG, \"Image Name is \" + answerRows.getString(4).toString().trim());\n }\n\n // to check if the answerText is Empty\n a.setAnswerText(noAnswer);\n\n\n\n // get the correct image\n String correctImage = answerRows.getString(5);\n\n // check for null or empty in database...\n if(correctImage != null && !\"\".equals(correctImage))\n {\n this.correctImage = correctImage.toString().trim();\n Log.d(TAG,\"Correct Image is \"+correctImage);\n }\n\n\n // set the correct answer\n if(answerRows.getString(2) != null) {\n correctAnswer = answerRows.getString(2).toString().trim();\n }\n\n // add it to the answer list\n q.getAnswerList().add(a);\n // answerList.add(a);\n }\n\n Log.d(TAG, \"Answer List Size is \" + q.getAnswerList().size());\n // set the answer List for Specific Question\n\n\n // get the question Image\n String questionImage = questionRows.getString(4);\n\n // check for null or empty in database...for question images..\n if(questionImage != null && !\"\".equals(questionImage))\n {\n this.questionImage = questionImage.toString().trim();\n Log.d(TAG,\"Question Image is \"+this.questionImage);\n }\n\n\n\n\n // q.setAnswerList(answerList);\n q.setCorrectAnswer(correctAnswer);\n q.setCorrectImage(correctImage);\n q.setQuestionImage(this.questionImage);\n\n\n Log.d(TAG, \"Answer List Size in Question class is \" + q.getAnswerList().size());\n\n\n\n\n randomCategoryQuestions.add(q);\n }\n\n try {\n // close the cursor after use\n answerRows.close();\n questionRows.close();\n }\n catch (Exception e)\n {\n Log.d(TAG,\"Exception Occured\"+e.toString());\n }\n\n\n\n\n\n\n\n }", "@Transactional\n\tprivate void generateCatOverSet() {\n\t\tMinionCard turkey = createMinionCard(\"Chat Turkey\", 3, 6, 1, 1, \"Eat Me\",\n\t\t\t\t\"img/cardImg/CatOverSet/TurkeyCat.jpg\");\n\t\tMinionCard sushi = createMinionCard(\"Chat sushi\", 1, 8, 1, 1, \"Eat Me\", \"img/cardImg/CatOverSet/SushiCat.jpeg\");\n\t\tMinionCard mop = createMinionCard(\"Chat Mop\", 1, 5, 4, 1, \"No. Not the bucket\",\n\t\t\t\t\"img/cardImg/CatOverSet/Mop.jpg\");\n\t\tMinionCard clean = createMinionCard(\"Chat Clean\", 3, 7, 5, 2, \"Spot less\",\n\t\t\t\t\"img/cardImg/CatOverSet/CleanningCat.jpg\");\n\t\tMinionCard swim = createMinionCard(\"Chat Swim\", 4, 5, 6, 2, \"Dive in\", \"img/cardImg/CatOverSet/swimming.jpg\");\n\t\tMinionCard skatterA = createMinionCard(\"Chat Skater Trick\", 5, 10, 5, 3, \"Grab\",\n\t\t\t\t\"img/cardImg/CatOverSet/SkateBoardTrickCat.jpg\");\n\t\tMinionCard ariel = createMinionCard(\"Chariel\", 12, 9, 4, 4,\n\t\t\t\t\"Under the sea, Nobody beat us, Fry us and eat us, In fricassee\",\n\t\t\t\t\"img/cardImg/CatOverSet/MermaidCat.jpg\");\n\t\tMinionCard Chatraigner = createMinionCard(\"Chatraigner\", 10, 15, 5, 5, \"Food Food Food! Kill Food\",\n\t\t\t\t\"img/cardImg/CatOverSet/SpiderMonsterCat.jpeg\");\n\t\tcardRepository.save(turkey);\n\t\tcardRepository.save(sushi);\n\t\tcardRepository.save(swim);\n\t\tcardRepository.save(mop);\n\t\tcardRepository.save(clean);\n\t\tcardRepository.save(skatterA);\n\t\tcardRepository.save(ariel);\n\t\tcardRepository.save(Chatraigner);\n\n\t}", "private List<File> assembleMusicSet(final ECivilisation civilisation, final boolean playAll) {\n\t\tif(lookupPath == null || !lookupPath.exists()) return List.of();\n\n\n\t\tList<File> list = new ArrayList<>();\n\t\t// just take all mp3 and ogg files\n\t\tif(playAll) {\n\t\t\tlist.addAll(Arrays.asList(lookupPath.listFiles((file, name) -> name.endsWith(\".mp3\") || name.endsWith(\".ogg\") || name.endsWith(\".wav\"))));\n\t\t} else if(lookupPath.getName().equals(\"Theme\")) { // history edition\n\t\t\tfor(String fileName : HISTORY_EDITION_MUSIC_SET[civilisation.ordinal]) {\n\t\t\t\tFile file = new File(lookupPath, \"Track\" + fileName + \".mp3\");\n\t\t\t\tif(file.exists()) list.add(file);\n\t\t\t}\n\t\t} else {\n\t\t\t// ultimate edition\n\t\t\tfor(String fileName : ULTIMATE_EDITION_MUSIC_SET[civilisation.ordinal]) {\n\t\t\t\tFile file = new File(lookupPath, \"Track\" + fileName + \".ogg\");\n\t\t\t\tif(file.exists()) list.add(file);\n\t\t\t}\n\t\t}\n\n\t\t// this music folder is custom made\n\t\tif(list.isEmpty()) {\n\t\t\tlist.addAll(Arrays.asList(lookupPath.listFiles((file, name) -> name.matches(civilisation.name() + \".\\\\d*.(mp3|ogg|wav)\"))));\n\t\t}\n\n\t\t// shuffle list so we don't get bored :)\n\t\tCollections.shuffle(list);\n\n\t\treturn list;\n\t}", "public static void populate() {\n for (int i = 1; i <= 15; i++) {\n B.add(i);\n Collections.shuffle(B);\n\n }\n for (int i = 16; i <= 30; i++) {\n I.add(i);\n Collections.shuffle(I);\n }\n for (int n = 31; n <= 45; n++) {\n N.add(n);\n Collections.shuffle(N);\n }\n for (int g = 46; g <= 60; g++) {\n G.add(g);\n Collections.shuffle(G);\n }\n for (int o = 61; o <= 75; o++) {\n O.add(o);\n Collections.shuffle(O);\n }\n\n for (int i = 1; i <= 75; i++) {\n roll.add(i); // adds the numbers in the check list\n }\n }", "private void prepareAlbums() {\n int[] images = new int[]{\n R.drawable.book4,\n R.drawable.banner1,\n R.drawable.book2,\n R.drawable.book1,\n R.drawable.banner2,\n R.drawable.book3,\n R.drawable.banner3,\n R.drawable.book4,\n R.drawable.banner4,\n R.drawable.book2,\n R.drawable.book1,\n };\n\n News a = new News(\"Kejriwal calls Delhi 'gas chamber' as air pollution hits severe levels, visibility down to 200m.\", images[0]);\n newsList.add(a);\n\n a = new News(\"Recovery of US-made rifle shows Pak complicity in Kashmir militancy: Army\", images[1]);\n newsList.add(a);\n\n a = new News(\"The recovery of US-made rifle, meant for Pakistani army\", images[2]);\n newsList.add(a);\n\n a = new News(\"This weapon (the M4 carbine) is with the special forces of Pakistan army. \", images[3]);\n newsList.add(a);\n\n a = new News(\"A police spokesperson said that it was the same group\", images[4]);\n newsList.add(a);\n\n a = new News(\"This weapon (the M4 carbine) is with the special forces of Pakistan army. \", images[5]);\n newsList.add(a);\n\n a = new News(\"A police spokesperson said that it was the same group\", images[6]);\n newsList.add(a);\n\n a = new News(\"he three slain militants killed on Monday night were identified as Waseem Ganaie\", images[7]);\n newsList.add(a);\n\n a = new News(\"he three slain militants killed on Monday night were identified as Waseem Ganaie\", images[8]);\n newsList.add(a);\n\n a = new News(\"A police spokesperson said that it was the same group\", images[9]);\n newsList.add(a);\n\n adapter.notifyDataSetChanged();\n }", "private static void createPlayfulSet() {\n\n\t\trandomKeys = new ArrayList<>();\n\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT1);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT2);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT3);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT4);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT5);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT6);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT7);\n\t\trandomKeys.add(GuessRevealerConstants.END);\n\n\t\trandomCount = randomKeys.size();\n\n\t}", "private void initCultistCardDeck(){\n unusedCultist = new ArrayList<Cultist>();\n \n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 1));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 2));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 1));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 2));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 1));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 1));\n \n Collections.shuffle(unusedCultist);\n }", "private void randomizePuzzle() {\n\t\t// Choose random puzzles, shuffle the options.\n\t\tthis.puzzle = BarrowsPuzzleData.PUZZLES[(int) (Math.random() * BarrowsPuzzleData.PUZZLES.length)];\n\t\tthis.shuffledOptions = shuffleIntArray(puzzle.getOptions());\n\t}", "static void generateQuestions(int numQuestions, int selection, String fileName, String points) {\n String finalAnswers = \"\";\n switch (selection) {\n case 1:\n for (int i = 0; i < numQuestions; i++) {\n finalAnswers += one(points);\n }\n break;\n case 2:\n for (int i = 0; i < numQuestions; i++) {\n finalAnswers += two(points);\n }\n break;\n case 3:\n for (int i = 0; i < numQuestions; i++) {\n finalAnswers += three(points);\n }\n break;\n case 4:\n for (int i = 0; i < numQuestions; i++) {\n finalAnswers += four(points);\n }\n break;\n default:\n System.out.println(\"Wrong selection. Please try again\");\n break;\n }\n writeAnswers(fileName, finalAnswers);\n }", "public void readFile(String filename){\n\t\ttry{\n\t\t\tBufferedReader bf = new BufferedReader(new FileReader(filename));\n\t\t\tString line;\n\t\t\tString[] categories = new String[5];\n\t\t\tline = bf.readLine();\n\t\t\tint[] pointValues = new int[5];\n\t\t\tboolean FJ = false;\n\t\t\t\n\t\t\t// Read the first line\n\t\t\tint index = 0;\n\t\t\tint catnum = 0;\n\t\t\twhile(catnum < 5){\n\t\t\t\tcategories[catnum] = readWord(line, index);\n\t\t\t\tindex += categories[catnum].length();\n\t\t\t\tif(index == line.length()-1){\n\t\t\t\t\tSystem.out.println(\"Error: Too few categories.\");\n\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t}\n\t\t\t\tfor(int i = 0; i < catnum; i++){\n\t\t\t\t\tif(categories[i].equals(categories[catnum])){\n\t\t\t\t\t\tSystem.out.println(\"Error: Duplicate categories.\");\n\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(catnum < 4)\n\t\t\t\t\tindex += 2;\n\t\t\t\tcatnum++;\n\t\t\t}\n\t\t\tif(index < line.length()-1){\n\t\t\t\tSystem.out.println(\"Error: Too many categories.\");\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t\t\n\t\t\tCategory cat1, cat2, cat3, cat4, cat5, cat6;\n\t\t\tcat1 = new Category(categories[0]);\n\t\t\tcat2 = new Category(categories[1]);\n\t\t\tcat3 = new Category(categories[2]);\n\t\t\tcat4 = new Category(categories[3]);\n\t\t\tcat5 = new Category(categories[4]);\n\t\t\tcat6 = new Category(\"FJ\");\n\n\t\t\t// Read the second line\n\t\t\tline = bf.readLine();\n\t\t\t//System.out.println(line);\n\t\t\tindex = 0;\n\t\t\tint pointnum = 0;\n\t\t\twhile(pointnum < 5){\n\t\t\t\tint point = 0;\n\t\t\t\ttry{\n\t\t\t\t\tpoint = Integer.parseInt(readWord(line, index));\n\t\t\t\t\tindex += (readWord(line, index)).length();\n\t\t\t\t}\n\t\t\t\tcatch(Exception e){\n\t\t\t\t\tSystem.out.println(e);\n\t\t\t\t\tSystem.out.println(\"Error: point value not integer.\");\n\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tpointValues[pointnum] = point;\n\t\t\t\tfor(int i = 0; i < pointnum; i++){\n\t\t\t\t\tif(pointValues[pointnum] == pointValues[i]){\n\t\t\t\t\t\tSystem.out.println(\"Error: Duplicate point values\");\n\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(pointnum <4)\n\t\t\t\t\tindex += 2;\n\t\t\t\tpointnum++;\n\t\t\t}\n\t\t\tif(index < line.length()-1){\n\t\t\t\tSystem.out.println(\"Error: Too many point values.\");\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t\t\n\t\t\t// Read in the questions\n\t\t\tString q=\"\";\n\t\t\tString a=\"\";\n\t\t\tString category=\"\";\n\t\t\tint point=0;\n\t\t\tint colonNumber = 0;\n\t\t\tQuestion question = new Question(0, \"\", \"\");\n\t\t\t\n\t\t\twhile((line = bf.readLine())!= null && line.length() != 0){\n\t\t\t\tindex = 0;\n\t\t\t\t// New question, initialize all vars\n\t\t\t\tif(line.substring(0,2).equals(\"::\")){\n\t\t\t\t\t// Add the previous question\n\t\t\t\t\tif(question.getPoint() != 0){\n\t\t\t\t\t\tif(category.equals(cat1.getName())){\n\t\t\t\t\t\t\tcat1.addQuestion(question);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(category.equals(cat2.getName())){\n\t\t\t\t\t\t\tcat2.addQuestion(question);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(category.equals(cat3.getName())){\n\t\t\t\t\t\t\tcat3.addQuestion(question);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(category.equals(cat4.getName())){\n\t\t\t\t\t\t\tcat4.addQuestion(question);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(category.equals(cat5.getName())){\n\t\t\t\t\t\t\tcat5.addQuestion(question);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(category.equals(\"FJ\")){\n\t\t\t\t\t\t\tcat6.addQuestion(question);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tSystem.out.println(\"Error: Wrong category name.\");\n\t\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\ta=\"\";\n\t\t\t\t\tq=\"\";\n\t\t\t\t\tcategory=\"\";\n\t\t\t\t\tpoint = 0;\n\t\t\t\t\tindex += 2;\n\t\t\t\t\tcolonNumber = 1;\n\t\t\t\t\tquestion = new Question(0, \"\", \"\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// If FJ cont'd\n\t\t\t\telse{\n\t\t\t\t\tif(category.equals(\"FJ\")){\n\t\t\t\t\t\twhile(index < line.length()){\n\t\t\t\t\t\t\tswitch(colonNumber){\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\tq += readWord(line, index);\n\t\t\t\t\t\t\t\tindex += readWord(line, index).length();\n\t\t\t\t\t\t\t\tquestion.setQuestion(q);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\ta += readWord(line, index);\n\t\t\t\t\t\t\t\tindex += readWord(line, index).length();\n\t\t\t\t\t\t\t\tquestion.setAnswer(a);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tSystem.out.println(\"Error: Format error.\");\n\t\t\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(colonNumber < 3 && index < line.length()-1 && line.substring(index, index+2).equals(\"::\")){\n\t\t\t\t\t\t\t\tindex+=2;\n\t\t\t\t\t\t\t\tcolonNumber++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// FJ starts\n\t\t\t\tif(readWord(line, index).equals(\"FJ\")){\n\t\t\t\t\tif(FJ){\n\t\t\t\t\t\tSystem.out.println(\"Error: Multiple final jeopardy questions.\");\n\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t}\n\t\t\t\t\tFJ = true;\n\t\t\t\t\tpoint = -100;\n\t\t\t\t\tcategory = \"FJ\";\n\t\t\t\t\tindex += 4;\n\t\t\t\t\tcolonNumber++;\n\t\t\t\t\tif(index < line.length()-1)\n\t\t\t\t\t\tq += readWord(line, index);\n\t\t\t\t\tindex += q.length();\n\t\t\t\t\tindex += 2;\n\t\t\t\t\tif(index < line.length()-1)\n\t\t\t\t\t\ta += readWord(line, index);\n\t\t\t\t\tquestion.setPoint(point);\n\t\t\t\t\tquestion.setAnswer(a);\n\t\t\t\t\tquestion.setQuestion(q);\n\t\t\t\t}\n\t\t\t\t// Other questions\n\t\t\t\telse{\n\t\t\t\t\twhile(index < line.length()){\n\t\t\t\t\t\t//System.out.println(colonNumber);\n\t\t\t\t\t\tswitch(colonNumber){\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\tcategory = category + readWord(line, index);\n\t\t\t\t\t\t\tboolean right = false;\n\t\t\t\t\t\t\tfor(int i = 0; i < 5; i++){\n\t\t\t\t\t\t\t\tif(categories[i].equals(category))\n\t\t\t\t\t\t\t\t\tright = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(!right){\n\t\t\t\t\t\t\t\tSystem.out.println(\"Error: Wrong category.\");\n\t\t\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tindex += category.length();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\tpoint = Integer.parseInt(readWord(line, index));\n\t\t\t\t\t\t\tright = false;\n\t\t\t\t\t\t\tfor(int i = 0; i < 5; i++){\n\t\t\t\t\t\t\t\tif(pointValues[i] == point)\n\t\t\t\t\t\t\t\t\tright = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(!right){\n\t\t\t\t\t\t\t\tSystem.out.println(\"Error: Wrong point value.\");\n\t\t\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tindex += readWord(line, index).length();\n\t\t\t\t\t\t\tquestion.setPoint(point);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\tq = q + readWord(line, index);\n\t\t\t\t\t\t\tindex += readWord(line, index).length();\n\t\t\t\t\t\t\tquestion.setQuestion(q);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\ta = a+ readWord(line, index);\n\t\t\t\t\t\t\tindex += readWord(line, index).length();\n\t\t\t\t\t\t\tquestion.setAnswer(a);\n\t\t\t\t\t\t\tif(index < line.length()){\n\t\t\t\t\t\t\t\tSystem.out.println(\"Error: Format error.\");\n\t\t\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tSystem.out.println(\"Error: Format error.\");\n\t\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(colonNumber < 4 && index < line.length()-1 && line.substring(index, index+2).equals(\"::\")){\n\t\t\t\t\t\t\tindex += 2;\n\t\t\t\t\t\t\tcolonNumber++;\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\t// Add the last question\n\t\t\tif(category.equals(cat1.getName())){\n\t\t\t\tcat1.addQuestion(question);\n\t\t\t}\n\t\t\telse if(category.equals(cat2.getName())){\n\t\t\t\tcat2.addQuestion(question);\n\t\t\t}\n\t\t\telse if(category.equals(cat3.getName())){\n\t\t\t\tcat3.addQuestion(question);\n\t\t\t}\n\t\t\telse if(category.equals(cat4.getName())){\n\t\t\t\tcat4.addQuestion(question);\n\t\t\t}\n\t\t\telse if(category.equals(cat5.getName())){\n\t\t\t\tcat5.addQuestion(question);\n\t\t\t}\n\t\t\telse if(category.equals(\"FJ\")){\n\t\t\t\tcat6.addQuestion(question);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(\"Error: Wrong category name.\");\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t\t\n\t\t\tmCategories.add(cat1);\n\t\t\tmCategories.add(cat2);\n\t\t\tmCategories.add(cat3);\n\t\t\tmCategories.add(cat4);\n\t\t\tmCategories.add(cat5);\n\t\t\tmCategories.add(cat6);\n\t\t\t\n\t\t\tbf.close();\n\t\t}\n\t\t\n\t\tcatch(IOException ioe){\n\t\t\tSystem.out.println(ioe);\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\t\n\t}", "public List<Question> getCategory(String category) {\n List<Question> questions = loadQuestions(\"quiz/\" + category + \".txt\");\n return questions;\n }", "@Before\n\tpublic void buildCategories()\n\t{\n\t\t// make a root node for the tree (i.e. like a franchise in the CR data set\n\t\tCategoryNode rootParent = null;\n\t\taRootCategory = new CategoryNode(\"rootCategoryId\", \"rootCategoryName\", rootParent);\n\t\t\n\t\t// Add a subtree containing a singleton. The singleton should get removed\n\t\tCategoryNode singleton = new CategoryNode(\"singletonId\", \"singletonName\", aRootCategory);\n\t\taRootCategory.addSubcategory(singleton);\n\t\tCategoryNode childOfSingleton = new CategoryNode(\"childOfSingletonId\", \"childOfSingletonName\", singleton);\n\t\tsingleton.addSubcategory(childOfSingleton);\n\t\tCategoryNode leaf0 = new CategoryNode(\"leaf0Id\", \"leaf0Name\", childOfSingleton);\n\t\tchildOfSingleton.addSubcategory(leaf0);\n\t\tCategoryNode leaf1 = new CategoryNode(\"leaf1Id\", \"leaf1Name\", childOfSingleton);\n\t\tchildOfSingleton.addSubcategory(leaf1);\n\t\t\n\t\t// Add a subtree will have similar leaves, so the subtree should be turned into an equivalence class\n\t\tCategoryNode equivalenceClass = new CategoryNode(\"equivalenceClassId\", \"equivalenceClassName\", aRootCategory);\n\t\taRootCategory.addSubcategory(equivalenceClass);\n\t\tCategoryNode similarNode0 = new CategoryNode(\"similarNode0Id\", \"similarNode0Name\", equivalenceClass);\n\t\tequivalenceClass.addSubcategory(similarNode0);\n\t\tCategoryNode similarNode1 = new CategoryNode(\"similarNode1Id\", \"similarNode1Name\", equivalenceClass);\n\t\tequivalenceClass.addSubcategory(similarNode1);\n\t\t\n\t\t// This subtree has dissimilar leaves, so the subtree shouldn't be turned into an equivalence class\n\t\tCategoryNode nonEquivalenceClass = new CategoryNode(\"nonEquivalenceClassId\", \"nonEquivalenceClassName\", aRootCategory);\n\t\taRootCategory.addSubcategory(nonEquivalenceClass);\n\t\tCategoryNode dissimilarNode0 = new CategoryNode(\"dissimilarNode0Id\", \"dissimilarNode0Name\", nonEquivalenceClass);\n\t\tnonEquivalenceClass.addSubcategory(dissimilarNode0);\n\t\tCategoryNode dissimilarNode1 = new CategoryNode(\"dissimilarNode1Id\", \"dissimilarNode1Name\", nonEquivalenceClass);\n\t\tnonEquivalenceClass.addSubcategory(dissimilarNode1);\n\t}", "public Category(String name)\r\n\t{\r\n\t\tcategoryName = name;\r\n\t\t\r\n\t\t// reads each question from file\r\n\t\ttry\r\n\t\t{\r\n\t\t\tScanner read=new Scanner(new File(categoryName +\".txt\"));\r\n\t\t\t\r\n\t\t\tdo\r\n\t\t\t{\r\n\t\t\t\tString line = read.nextLine();\r\n\t\t\t\tString [] tokens = line.split(\",\"); //use commas to split up the data in the line\r\n\t\t\t\t\r\n\t\t\t\tQuestion q = new Question(tokens[0], tokens[1], tokens[2], tokens[3], tokens[4], tokens[5] ); // input data in constructor\r\n\t\t\t\t\r\n\t\t\t\tquestions.add(q); // add question arraylist\r\n\t\t\t\t\r\n\t\t\t}while(read.hasNextLine());\r\n\t\t\t\t\r\n\t\t\tread.close();\r\n\t\t} \r\n\t\tcatch(FileNotFoundException fnf){\r\n\t\t\r\n\t\t\tSystem.out.println(\"File was not found\");\r\n\t\t}\r\n\t}", "@Override\n\tpublic void verifyCategories() {\n\t\t\n\t\tBy loc_catNames=MobileBy.xpath(\"//android.widget.TextView[@resource-id='com.ionicframework.SaleshuddleApp:id/category_name_tv']\");\n\t\tPojo.getObjSeleniumFunctions().waitForElementDisplayed(loc_catNames, 15);\n\t\tList<AndroidElement> catNames=Pojo.getObjSeleniumFunctions().getWebElementListAndroidApp(loc_catNames);\n\t\tList<String> catNamesStr=new ArrayList<String>();\n\t\t\n\t\t\n\t\tfor(AndroidElement catName:catNames)\n\t\t{\n\t\t\tcatNamesStr.add(catName.getText().trim());\n\t\t}\n\t\t\n\t\tif(catNamesStr.size()==0)\n\t\t{\n\t\tPojo.getObjUtilitiesFunctions().logTestCaseStatus(\"Verify that catgory names are correct\", false);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tPojo.getObjUtilitiesFunctions().logTestCaseStatus(\"Verify that catgory names are correct\", BuildSpGamePage.expectedData.get(\"Categories\").containsAll(catNamesStr));\n\n\t\t}\n\t\t}", "boolean restrictCategory(){\n\n\n if((!top.isEmpty()||!bottom.isEmpty())&&!suit.isEmpty()){\n Toast.makeText(this, \"상의/하의와 한벌옷은 동시에 설정할 수 없습니다.\", Toast.LENGTH_SHORT).show();\n return false;\n }\n\n\n detail_categories = new ArrayList<>(Arrays.asList(top_detail,bottom_detail,suit_detail,\n outer_detail,shoes_detail,bag_detail,accessory_detail));\n\n for (int kindNum=0; kindNum<7; kindNum++){\n String category = categories.get(kindNum); //해당 종류(ex.상의)에 설정된 카테고리명 받아옴\n String kind = Utils.getKey(Utils.Kind.kindNumMap,kindNum); //종류명 받아옴\n\n if(!category.isEmpty()){ //카테고리가 설정 되어있다면\n String detail_category = detail_categories.get(kindNum); //디테일 카테고리 받아옴\n Iterator<ClothesVO> cloListIter = clothesList.iterator();\n int remain_items=0;\n\n if(detail_category.isEmpty()){ //카테고리만 설정되어 있다면\n while (cloListIter.hasNext()) {\n ClothesVO clothes = cloListIter.next();\n String cloKind = clothes.getKind();\n if(cloKind.equals(kind)){\n if(!clothes.getCategory().equals(category))\n cloListIter.remove(); //해당 종류에 해당 카테고리가 아닌 옷들을 제거\n else\n remain_items+=1; //제거되지 않은 옷\n }\n\n if(kindNum == Utils.Kind.TOP || kindNum == Utils.Kind.BOTTOM){\n if(\"한벌옷\".equals(cloKind))\n cloListIter.remove();\n }else if(kindNum == Utils.Kind.SUIT){\n if(\"상의\".equals(cloKind) || \"하의\".equals(cloKind))\n cloListIter.remove(); //제거\n }\n }\n }else{ //디테일 카테고리도 설정되어 있다면\n while (cloListIter.hasNext()) {\n ClothesVO clothes = cloListIter.next();\n String cloKind = clothes.getKind();\n if(cloKind.equals(kind)){\n if(!clothes.getDetailCategory().equals(detail_category))\n cloListIter.remove();//해당 종류에 해당 세부 카테고리가 아닌 옷들을 제거\n else\n remain_items+=1; //제거되지 않은 옷\n }\n\n if(kindNum == Utils.Kind.TOP || kindNum == Utils.Kind.BOTTOM){\n if(\"한벌옷\".equals(cloKind))\n cloListIter.remove();\n }else if(kindNum == Utils.Kind.SUIT){\n if(\"상의\".equals(cloKind) || \"하의\".equals(cloKind))\n cloListIter.remove(); //제거\n }\n }\n }\n\n if(remain_items==0){\n if(!detail_category.isEmpty()){\n category = detail_category;\n }\n\n// if(recommendedDCate!=null ){\n// List<String>recommendedDCateArray = Arrays.asList(recommendedDCate);\n// if(!recommendedDCateArray.contains(category)){\n// Toast.makeText(this, \"해당 날씨에 맞지 않는 <\"+category+\"> 카테고리가 설정에 포함되어 있습니다.\", Toast.LENGTH_LONG).show();\n// return false;\n// }\n// }\n\n Toast.makeText(this, \"설정한 <\"+category+\"> 카테고리의 옷이 없거나 해당 날씨에 맞지 않습니다. \\n더 많은 옷을 추가해보세요.\", Toast.LENGTH_LONG).show();\n return false;\n }\n }\n }\n\n return true;\n }", "@Test\n public void testCreateCategorizationLearner()\n {\n int ensembleSize = 3 + random.nextInt(1000);\n double baggingFraction = random.nextDouble();\n double dimensionsFraction = random.nextDouble();\n int maxTreeDepth = 3 + random.nextInt(10);\n int minLeafSize = 4 + random.nextInt(10);\n Random random = new Random();\n BaggingCategorizerLearner<Vector, String> result\n = RandomForestFactory.createCategorizationLearner(ensembleSize,\n baggingFraction, dimensionsFraction, maxTreeDepth, minLeafSize,\n random);\n assertEquals(ensembleSize, result.getMaxIterations());\n assertEquals(baggingFraction, result.getPercentToSample(), 0.0);\n assertSame(random, result.getRandom());\n @SuppressWarnings(\"rawtypes\")\n CategorizationTreeLearner treeLearner = \n (CategorizationTreeLearner) result.getLearner();\n assertEquals(maxTreeDepth, treeLearner.getMaxDepth());\n assertTrue(treeLearner.getLeafCountThreshold() >= 2 * minLeafSize);\n RandomSubVectorThresholdLearner<?> randomSubspace = (RandomSubVectorThresholdLearner<?>)\n treeLearner.getDeciderLearner();\n assertEquals(dimensionsFraction, randomSubspace.getPercentToSample(), 0.0);\n assertSame(random, randomSubspace.getRandom());\n VectorThresholdInformationGainLearner<?> splitLearner = (VectorThresholdInformationGainLearner<?>)\n randomSubspace.getSubLearner();\n assertEquals(minLeafSize, splitLearner.getMinSplitSize());\n }", "private void buildCategories() {\n List<Category> categories = categoryService.getCategories();\n if (categories == null || categories.size() == 0) {\n throw new UnrecoverableApplicationException(\n \"no item types found in database\");\n }\n\n Map<Category, List<Category>> categoriesMap = new HashMap<Category, List<Category>>();\n for (Category subCategory : categories) {\n Category parent = subCategory.getParentCategory();\n if (categoriesMap.get(parent) == null) {\n categoriesMap.put(parent, new ArrayList<Category>());\n categoriesMap.get(parent).add(subCategory);\n } else {\n categoriesMap.get(parent).add(subCategory);\n }\n }\n\n this.allCategories = categories;\n this.sortedCategories = categoriesMap;\n }", "private static void InitRandBag()\n {\n int k=(int)Math.floor(Math.random()*50);\n R[0]=k;\n\n //Generate the rest of the numbers\n for(int i=1;i<950;i++)\n {\n k=k+(int)Math.floor(Math.random()*50);\n R[i]=k;\n }\n\n //Shuffle the list\n for(int i=0;i<950;i++)\n {\n int temp = R[i];\n k = (int)Math.floor(Math.random()*950);\n R[i]=R[k];\n R[k]=temp;\n }\n }", "@Override\n\t@Transactional\n\n\tpublic void initFilms() {\n\t\tdouble[] durees=new double[] {1,1.5,2,2.5,3};\n List<Categorie> cat=categorieRepository.findAll(); \n\t\tStream.of(\"Lady Bird\",\"The Perks of Being a Wallflower\",\"Inception\",\"Pulp Fiction\",\"Fight Club\",\n\t\t\t\t\t\"Dunkirk\",\"blade runner 2049\").forEach(titre->{\n\t\t\t\t\t\tFilm film=new Film();\n\t\t\t\t\t\tfilm.setTitre(titre);\n\t\t\t\t\t\tfilm.setDuree(durees[new Random().nextInt(durees.length)]);\n\t\t\t\t\t\tfilm.setPhoto(titre.replaceAll(\" \", \"\")+\".jpg\");\n\t\t\t\t\t\tfilm.setCategorie(cat.get(new Random().nextInt(cat.size())));\n\t\t\t\t\t\tfilmRepository.save(film);\n\t\t\t\t\t});\n\t\t\n\t}", "private void playGame() {\n\t\tcategoryChosenChecker = new boolean[nPlayers + 1][N_CATEGORIES];\n\t\t// next one is for upper score.\n\t\tupperScore = new int[nPlayers + 1];\n\t\t// for lower score.\n\t\tlowerScore = new int[nPlayers + 1];\n\t\t// and finally, for total score.\n\t\ttotalScore = new int[nPlayers + 1];\n\t\t// here we have for loop, because we want our game to go for\n\t\t// N_SCORING_CATEGORIES times.\n\t\tfor (int i = 0; i < N_SCORING_CATEGORIES; i++) {\n\t\t\t// and here is another for loop, because each player should roll the\n\t\t\t// dice.\n\t\t\tfor (int j = 1; j <= nPlayers; j++) {\n\t\t\t\t// first roll.\n\t\t\t\tfirstRoll(j);\n\t\t\t\t// and the last for loop, because second and third rolls are\n\t\t\t\t// similar and can be written in one method and we want this\n\t\t\t\t// method to happen 2 times.\n\t\t\t\tfor (int k = 1; k <= 2; k++) {\n\t\t\t\t\t// second and third rolls.\n\t\t\t\t\totherRolls();\n\t\t\t\t}\n\t\t\t\t// after rolls, player will choose category.\n\t\t\t\tcategory(j);\n\t\t\t}\n\t\t}\n\t\t// when the game ends program will tell who is the winner.\n\t\twhoIsTheWinner();\n\t}", "public void resetQuiz() \r\n { \r\n // use AssetManager to get image file names for enabled regions\r\n // loop through each region\r\n // get a list of all flag image files in this region\r\n // reset the number of correct answers made\r\n // reset the total number of guesses the user made\r\n // clear prior list of quiz countries\r\n \r\n\r\n // add FLAGS_IN_QUIZ random file names to the quizCountriesList\r\n\r\n // get the random file name\r\n // if the region is enabled and it hasn't already been chosen\r\n\r\n // start the quiz by loading the first flag\r\n }", "@GetMapping(\"cat-random/{category}\")\n\tpublic Movie getRandomMovieCat(@PathVariable(\"category\") String category) {\n\t\tList<Movie> list = repo.findByCategory(category);\n\t\tRandom rand = new Random();\n\t\tint num = rand.nextInt(list.size()) + 1;\n\t\t\n\t\treturn repo.findById(num);\n\t}", "private void loadToChoice() {\n\t\tfor(Genre genre : genreList) {\n\t\t\tuploadPanel.getGenreChoice().add(genre.getName());\n\t\t}\n\t}", "public static void populateAndLoadLootList(File capsuleConfigDir, String[] lootTemplatesPaths, Map<String, LootPathData> outLootTemplatesData) {\n for (String path : lootTemplatesPaths) {\r\n LootPathData data = outLootTemplatesData.get(path);\r\n\r\n File templateFolder = new File(capsuleConfigDir.getParentFile().getParentFile(), path);\r\n\r\n if (!templateFolder.exists()) {\r\n templateFolder.mkdirs();\r\n // initial with example capsule the first time\r\n LOGGER.info(\"First load: initializing the loots in \" + path + \". You can change the content of folder with any nbt structure block, schematic, or capsule file. You can remove the folders from capsule.config to remove loots.\");\r\n String assetPath = \"assets/capsule/loot/common\";\r\n if (templateFolder.getPath().contains(\"uncommon\")) assetPath = \"assets/capsule/loot/uncommon\";\r\n if (templateFolder.getPath().contains(\"rare\")) assetPath = \"assets/capsule/loot/rare\";\r\n populateFolder(templateFolder, assetPath);\r\n }\r\n\r\n data.files = new ArrayList<>();\r\n iterateTemplates(templateFolder, templateName -> {\r\n data.files.add(templateName);\r\n });\r\n }\r\n }", "private void populateCategories() {\n\n AsyncHttpClient client = new AsyncHttpClient();\n client.addHeader(\"Authorization\", \"Token token=\" + user.getToken().getAccess_token());\n client.get(LoginActivity.API_ROOT + \"events/\" + currEvent.getId() + \"/categories\",\n new BaseJsonHttpResponseHandler<Category[]>() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, String rawJsonResponse,\n Category[] response) {\n categories_lv = (ListView) findViewById(R.id.categories_lv);\n// categoriesArr = response;\n\n // Make the first Category as \"All\" so that all teams can be shown\n // All retrieved categories will be put after \"All\"\n categoriesArr = new Category[response.length + 1];\n categoriesArr[0] = new Category(0, currEvent.getId(), \"All\", null, 0, null,\n teamsArr);\n System.arraycopy(response, 0, categoriesArr, 1, response.length);\n\n categories_lv.setAdapter(new CategoryAdapter(SelectionActivity.this,\n categoriesArr));\n categories_lv.setOnItemClickListener(new CategoryClickListener());\n\n Log.d(\"GET CATEGORIES\", \"success\");\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable error,\n String rawJsonData, Category[] errorResponse) {\n Log.d(\"GET CATEGORIES\", \"failure\");\n }\n\n @Override\n protected Category[] parseResponse(String rawJsonData, boolean isFailure)\n throws Throwable {\n\n if (!isFailure) {\n // Need to extract array from the first/outer JSON object\n JSONArray teamsJSONArr = new JSONObject(rawJsonData)\n .getJSONArray(\"event_categories\");\n return new Gson().fromJson(teamsJSONArr.toString(), Category[].class);\n } else return null;\n }\n });\n }", "public static List<File> splitData(String treeFileName, int foldSize) {\n ArrayList<File> tempFilePaths = new ArrayList<File>();\n Random random = new Random(100);\n for (int i = 0; i < foldSize+1; i++) {\n tempFilePaths.add(new File(String.valueOf(random.nextInt())));\n }\n URL treeResource = CommonUtils.class.getClassLoader().getResource(treeFileName);\n if (treeResource == null) {\n logger.error(\"Make sure the file is in the classpath of the project: \" + treeFileName);\n return null;\n }\n\n URL trainResource = null;\n\n File treeFile = new File(treeResource.getPath());\n ArrayList<String> tempAttributeList = new ArrayList<String>();\n try {\n FileReader treeFileInputStream = new FileReader(treeFile);\n BufferedReader bufferedReader = new BufferedReader(treeFileInputStream);\n String line = null;\n String line1 = null;\n int count = 0;\n try {\n while ((line = bufferedReader.readLine()) != null) {\n if (count == 0) {\n trainResource = CommonUtils.class.getClassLoader().getResource(line);\n if (trainResource == null) {\n logger.error(\"Make sure the file is in the classpath of the project: \" + line);\n return null;\n }\n FileReader fileReader = new FileReader(new File(trainResource.getPath()));\n BufferedReader bufferedReader1 = new BufferedReader(fileReader);\n int count1 = 0;\n while ((line1 = bufferedReader1.readLine()) != null) {\n if (count1 == 0) {\n BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(tempFilePaths.get(0)));\n bufferedWriter.write(line1);\n bufferedWriter.write(\"\\n\");\n bufferedWriter.flush();\n bufferedWriter.close();\n }else {\n tempAttributeList.add(line1);\n }\n count1++;\n }\n }\n count++;\n logger.info(line);\n }\n } catch (IOException e) {\n logger.error(e.getMessage(), e);\n }\n\n\n } catch (IOException e) {\n logger.error(e.getMessage(), e);\n }\n\n // now we randomly write data\n int fileIndex = 1;\n while(tempAttributeList.size()!=0) {\n int index0 = new Random(100).nextInt();\n if(index0<0){\n index0 = index0 * -1;\n }\n String s = tempAttributeList.get(index0 % tempAttributeList.size());\n\n try {\n BufferedWriter bufferedWriter1 = new BufferedWriter(new FileWriter(tempFilePaths.get(fileIndex),true));\n bufferedWriter1.write(s);\n bufferedWriter1.write(\"\\n\");\n bufferedWriter1.flush();\n bufferedWriter1.close();\n } catch (IOException e) {\n logger.error(e.getMessage(), e);\n }\n tempAttributeList.remove(s);\n if(fileIndex==foldSize){\n fileIndex=1;\n }else{\n fileIndex++;\n }\n }\n return tempFilePaths;\n }", "public static Collection<Item> generateItems(int numberOfItems) {\n Random r = new Random(97);\n if (numberOfItems > 0) {\n Collection<Item> gameItems = new Stack<>();\n int power;\n for (int i = 0; i < numberOfItems; i++) {\n\n switch (ItemType.random()) {\n case HEALTH_POTION:\n power = (r.nextInt(3) + 1) * 100;\n gameItems.add(new HealthPotion(\"HealthPotion (\" + power + \")\", power));\n break;\n case POISON:\n power = (r.nextInt(8) + 1) * 20;\n gameItems.add(new Poison(\"Poison (\" + power + \")\", power));\n break;\n case ARMOR:\n power = (r.nextInt(6) + 1) * 10;\n gameItems.add(new Armor(\"Armor (\" + power + \")\", power));\n break;\n case WEAPON:\n power = (r.nextInt(7) + 1) * 10;\n gameItems.add(new Weapon(\"Weapon (\" + power + \")\", power));\n break;\n default:\n break;\n }\n }\n return gameItems;\n }\n return null;\n }", "public void reset(){\n\t\tBashCmdUtil.bashCmdNoOutput(\"rm -r data/games_module\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"sed -i \\\"1s/.*/ \"+\"0\"+\" /\\\" data/winnings\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"sed -i \\\"1s/.*/ \"+\"175\"+\" /\\\" data/tts_speed\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"rm data/answered_questions\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"rm data/five_random_categories\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"rm data/current_player\");\n\t\t_currentPlayer = null;\n\t\t_internationalUnlocked = false;\n\t\t_gamesData.clear();\n\t\t_fiveRandomCategories.clear();\n\t\tfor (int i= 0; i<5;i++) {\n\t\t\t_answeredQuestions[i]=0;\n\t\t}\n\t\tBashCmdUtil.bashCmdNoOutput(\"touch data/answered_questions\");\n\t\tinitialiseCategories();\n\t\ttry {\n\t\t\treadCategories();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tsetFiveRandomCategories();\n\t}", "static ArrayList<Integer> generateQuestion(ArrayList<Integer> remainingSongsIds)\n {\n //shuffle the ids\n Collections.shuffle(remainingSongsIds);\n\n ArrayList<Integer> options = new ArrayList<>();\n\n //pick the random first fours sample ids\n for(int i=0;i<NUM_OPTIONS;i++)\n {\n if(i<remainingSongsIds.size())\n {\n options.add(remainingSongsIds.get(i));\n }\n }\n return options;\n }", "public synchronized ActionCategories loadMedicalActionCategories()\n\t{\n\t\t// if action categories is null\n\t\tif (medicalActionCategories == null)\n\t\t{\n\t\t\t// create an xml serializator\n\t\t\tSimpleXMLSerializator serializator = new SimpleXMLSerializator();\n\t\t\t// Open categories file\n\t\t\tFile categoriesFile = new File(StorageModule.getInstance().getBasePath() + \"/\" + CATEGORIES_RELATIVE_PATH);\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// load medicalactions categories\n\t\t\t\tmedicalActionCategories = (ActionCategories) serializator.deserialize(categoriesFile, ActionCategories.class);\n\t\t\t} catch (Exception e)\n\t\t\t{\n\t\t\t\tlog.error(\"An error ocurred while reading categories file.\", e);\n\t\t\t\tmedicalActionCategories = new ActionCategories();\n\t\t\t}\n\t\t}\n\t\treturn medicalActionCategories;\n\t}", "public void randomize() {\r\n\t\tRandom random = new Random();// random generator used to get random int\r\n\t\tint r;// will hold the random int\r\n\t\tint num;// will hold the filtered random int that determines with entity to use for a tile\r\n\t\tfor (int i = 0; i < WIDTH_TILES; i++) {// loops x-coords\r\n\t\t\tfor (int j = 0; j < HEIGHT_TILES; j++) {// loops y-coords\r\n\t\t\t\tr = random.nextInt(32);// gets random int from 0 to 32\r\n\t\t\t\tif (r < 4) num = 0; else if (r < 8) num = 1; else if (r < 31) num = 2; else num = 3;// distributes different objects\r\n\t\t\t\tif (nodes[i * WIDTH_TILES + j].isOccupied() == false) {// if tile empty or random chosen\r\n\t\t\t\t\tnodes[i * WIDTH_TILES + j] = new Node(new Point(i * BOARD_WIDTH / WIDTH_TILES, j * BOARD_WIDTH / HEIGHT_TILES), new ImageIcon(icons[num]).getImage(), true, occupants[num]);// creates random tile\r\n\t\t\t\t}// if (random)\r\n\t\t\t}// for (j)\r\n\t\t}// for (i)\r\n\t}", "private void prepareAlbums() {\n int[] covers = new int[]{\n R.mipmap.mess_thali,\n R.mipmap.mess_thali,\n R.mipmap.mess_thali,\n R.mipmap.mess_thali,\n R.mipmap.mess_thali,\n R.mipmap.mess_thali,\n R.mipmap.mess_thali,\n R.mipmap.mess_thali,\n R.mipmap.mess_thali,\n R.mipmap.mess_thali,\n R.mipmap.mess_thali};\n\n MessMenu a = new MessMenu(\"Mix Veg\", 13, covers[0]);\n messMenu.add(a);\n\n a = new MessMenu(\"Tur Dal Khichdi\", 8, covers[1]);\n messMenu.add(a);\n\n a = new MessMenu(\"Corn Palak\", 11, covers[2]);\n messMenu.add(a);\n\n a = new MessMenu(\"Rajastani Dal\", 12, covers[3]);\n messMenu.add(a);\n\n a = new MessMenu(\"Chamcham\", 14, covers[4]);\n messMenu.add(a);\n\n a = new MessMenu(\"Bhendi Fry\", 1, covers[5]);\n messMenu.add(a);\n\n a = new MessMenu(\"Veg Handi\", 11, covers[6]);\n messMenu.add(a);\n\n a = new MessMenu(\"Shahi Paneer\", 14, covers[7]);\n messMenu.add(a);\n\n a = new MessMenu(\"Paneer Chatpata\", 11, covers[8]);\n messMenu.add(a);\n\n a = new MessMenu(\"AMI Special\", 17, covers[9]);\n messMenu.add(a);\n\n adapter.notifyDataSetChanged();\n }", "private void createArmy(int size)\n {\n for(int i = 0; i < size; i++)\n {\n int rando = Randomizer.nextInt(10) + 1;\n if(rando < 6 )\n {\n army1.add(new Human());\n } \n else if(rando < 8)\n {\n army1.add(new Dwarf());\n \n }\n else if (rando < 10)\n {\n army1.add(new Elf());\n }\n else\n {\n rando = Randomizer.nextInt(3) + 1;\n if (rando ==1)\n {\n army1.add(new Demon()); \n }\n else if(rando == 2)\n {\n army1.add(new CyberDemon());\n }\n else\n {\n army1.add(new Balrog());\n }\n }\n \n rando = Randomizer.nextInt(10) + 1;\n if(rando < 6)\n {\n army2.add(new Human());\n }\n else if (rando < 8)\n {\n army2.add(new Dwarf());\n }\n else if (rando < 10)\n {\n army2.add(new Elf());\n }\n else\n {\n rando = Randomizer.nextInt(3) + 1;\n if (rando ==1)\n {\n army2.add(new Demon()); \n }\n else if(rando == 2)\n {\n army2.add(new CyberDemon());\n }\n else\n {\n army2.add(new Balrog());\n }\n } \n }\n \n \n \n \n \n }", "public void deleteSelectedCategories() {\n\t\tfor (IFlashcardSeriesComponent x : selectionListener.selectedComponents) {\n\t\t\tFlashCategory cat = (FlashCategory) x;\n\t\t\t/*\n\t\t\tif (cat.getParent() == null) {\n\t\t\t\troot = new FlashCategory(root.getName());\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t*/\n\t\t\tList<Flashcard> copy = new ArrayList<Flashcard>(flashcards);\n\t\t\tfor (Flashcard f : copy) {\n\t\t\t\tif (cat.containsFlashcard(f)) {\n\t\t\t\t\tflashcards.remove(f);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcat.getParent().removeI(cat);\n\t\t\t\n\t\t\tif (selectRootAction != null) selectRootAction.selectRoot();\n\t\t\t\n\t\t}\n\t\tfireIntervalChanged(this,-1,-1);\n\t}", "private void initializeAndShuffle() {\r\n\t\t\tsuffixes = new byte[256];\r\n\t\t\tfor (int i = 0; i < ALL_BYTE_VALUES.length; i++) {\r\n\t\t\t\tint j = RAND.nextInt(i + 1);\r\n\t\t\t\tif (j != i) {\r\n\t\t\t\t\tsuffixes[i] = suffixes[j];\r\n\t\t\t\t}\r\n\t\t\t\tsuffixes[j] = ALL_BYTE_VALUES[i];\r\n\t\t\t}\r\n\t\t}", "@Override\n public void seedBooks() throws IOException {\n if (this.bookRepository.count() > 0) {\n return;\n }\n\n String[] lines = this.readFileUtil.read(BOOKS_FILE_RELATIVE_PATH);\n for (int i = 0; i < lines.length; i++) {\n /* Get args */\n String[] args = lines[i].split(\"\\\\s+\");\n\n /* Get edition type */\n EditionType editionType = EditionType.values()[Integer.parseInt(args[0])];\n\n /* Get release date */\n LocalDate releaseDate = localDateUtil.parseByPattern(\"d/M/yyyy\", args[1]);\n\n /* Get copies */\n long copies = Long.parseLong(args[2]);\n\n /* Get price */\n BigDecimal price = new BigDecimal(args[3]);\n\n /* Get age restriction */\n AgeRestriction ageRestriction = AgeRestriction.values()[Integer.parseInt(args[4])];\n\n /* Get title */\n String title = Arrays.stream(args).skip(5).collect(Collectors.joining(\" \"));\n\n /* Get author */\n Author randomAuthor = this.randomAuthorUtil.getRandom();\n\n /* Get categories */\n Set<Category> randomCategories = this.randomCategoriesUtil.getRandom();\n\n /* Create book */\n Book book = new Book(ageRestriction, copies, editionType, price, releaseDate, title, randomAuthor);\n book.setCategories(randomCategories);\n\n /* Save the book */\n this.bookRepository.saveAndFlush(book);\n }\n }", "private void loadImages(){\n try{\n System.out.println(System.getProperty(\"user.dir\"));\n\n t1img = read(new File(\"resources/tank1.png\"));\n t2img = read(new File(\"resources/tank1.png\"));\n backgroundImg = read(new File(\"resources/background.jpg\"));\n wall1 = read(new File(\"resources/Wall1.gif\"));\n wall2 = read(new File(\"resources/Wall2.gif\"));\n heart = resize(read(new File(\"resources/Hearts/basic/heart.png\")), 35,35);\n heart2 = resize(read( new File(\"resources/Hearts/basic/heart.png\")), 25,25);\n bullet1 = read(new File(\"resources/bullet1.png\"));\n bullet2 = read(new File(\"resources/bullet2.png\"));\n\n }\n catch(IOException e){\n System.out.println(e.getMessage());\n }\n }", "Collection</* IInstallableUnit */?> publishCategories( File categoryDefinition )\n throws FacadeException, IllegalStateException;", "void permutateObjects()\n {\n for (int i = 0; i < sampleObjects.length; i++)\n {\n for (int i1 = 0; i1 < (r.nextInt() % 7); i1++)\n {\n addToObject(sampleObjects[i], sampleStrings[r.nextInt(5)],\n sampleStrings[r.nextInt(5)]);\n addToObject(sampleObjects[i], sampleStrings[r.nextInt(5)],\n sampleNumbers[r.nextInt(5)]);\n addToObject(sampleObjects[i], sampleStrings[r.nextInt(5)],\n specialValues[r.nextInt(2)]);\n addToObject(sampleObjects[i], sampleStrings[r.nextInt(5)],\n sampleArrays[r.nextInt(5)]);\n }\n }\n }", "public static void showCategories() throws IOException {\n Main.FxmlLoader(CATEGORY_PATH);\n }", "private void initLearnedMoves() {\n Vector<Move> allMoves = new Vector<>();\n for (LevelMove move : levelMoves) {\n if (level >= move.level) {\n allMoves.add(move.data);\n }\n }\n if (level == 1) {\n allMoves.addAll(eggMoves);\n }\n\n //Remove duplicate entries\n for (int i = 0; i < allMoves.size(); i++) {\n String name = allMoves.get(i).name;\n for (int j = 0; j < allMoves.size(); j++) {\n if (j != i) {\n String dupName = allMoves.get(j).name;\n if (dupName.equals(name)) {\n allMoves.remove(j);\n }\n }\n }\n }\n\n //Select random moves\n while (allMoves.size() > MAX_MOVES) {\n int randId = Global.randomInt(0, allMoves.size() - 1);\n allMoves.remove(randId);\n }\n\n //Add moves\n moves = new Vector<>();\n for (Move move : allMoves) {\n moves.add(new LearnedMove(move));\n }\n }", "public void randomizeColor() {\r\n\t\tArrayList<Integer> possibleColors = new ArrayList<Integer>();\r\n\t\tfor(int i = 1; i<=4; i++) {\r\n\t\t\tif(i!=colorType) { \r\n\t\t\t\tpossibleColors.add(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcolorType = possibleColors.get((int) (Math.random()*3));\r\n\t\t\r\n\t}", "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 }", "public void generateRandomQuestions(){\r\n numberHolder = new ArrayList<>(NUMBER_OF_QUESTIONS);\r\n for (int i = 0; i < NUMBER_OF_QUESTIONS; i++)\r\n numberHolder.add(i);\r\n\r\n Collections.shuffle(numberHolder);\r\n System.out.println(numberHolder);\r\n\r\n }", "public void colorearSecuencial() {\n\t\t// Collections.shuffle(nodos);\n\t\tcolorearSecuencialAlternativo();\n\t}", "private static void addToOrganizedMenu(File newOrganized)\n {\n\t// True if the 'Cancel.' option has been selected or the category/image has been added.\n\tboolean exit = false;\n\t// A browser for Organized objects beginning at the 'Main' category.\n\tImageBrowser browser = new ImageBrowser(allOrganized);\n\t// A temporary variable for holding the option the user chooses.\n\tint userOption;\n\t\n\twhile(!exit)\n\t {\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"Where would you like to add this category/image?\");\n\n\t\tbrowser.view();\n\t\t\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\">>Main>Look for new images>Open image>Add image:\");\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"1: Add here.\");\n\t\tSystem.out.println(\"2: Open sub category.\");\n\t\tSystem.out.println(\"3: Open parent category.\");\n\t\tSystem.out.println(\"4: Cancel.\");\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.print(\"\\t>> \");\n\t\t\n\t\tswitch(getUserOption())\n\t\t {\n\t\t case(1):\n\t\t\tOrganizedCategory.add(browser.getCurrent(), newOrganized);\n\t\t\tSystem.out.println(\"\");\n\t\t\tSystem.out.println(\"Added!!\");\n\t\t\texit = true;\n\t\t\tbreak;\n\t\t case(2):\n\t\t\tSystem.out.println(\"\");\n\t\t\tSystem.out.print(\"Please enter the number of the sub category you wish to open: \");\n\t\t\tuserOption = getUserOption();\n\t\t\tif(browser.get(userOption) != null)\n\t\t\t {\n\t\t\t\tbrowser.goToSubFolder(userOption);\n\t\t\t }\n\t\t\telse\n\t\t\t {\n\t\t\t\tSystem.out.println(\"That was not a valid option, please try again:\");\n\t\t\t }\n\t\t\tbreak;\n\t\t case(3):\n\t\t\tbrowser.goToParentFolder();\n\t\t\tbreak;\n\t\t case(4):\n\t\t\texit = true;\n\t\t\tbreak;\n\t\t default:\n\t\t\tSystem.out.println(\"That was not a valid option, please try again:\");\n\t\t }\n\t }\n }", "public final List<String> getCategories() {\n return new ArrayList<>(questionGeneratorStrategyFactory.createPracticeQuestionStrategy().generateQuestions().keySet());\n }", "@Override\n public List<Category> getCategoriesFromUrl(long companyId, long groupId, CategoryType categoryType, String otherFeedTypeUrl, String languageId, String userName) {\n\n String categoriesUrl = categoryType.equals(CategoryType.OTHER) ? otherFeedTypeUrl : getCommonConfigurationService().getCasinoCategoriesUrl(companyId, groupId, categoryType);\n String categoriesBackupUrl = getCommonConfigurationService().getCasinoCategoriesBackupUrl(companyId, groupId, categoryType);\n String casinoFeedsAPIBaseURL = getCommonConfigurationService().getCasinoFeedsAPIBaseUrl(companyId, groupId);\n String gamesURL = getCommonConfigurationService().getCasinoGamesUrl(companyId, groupId);\n\n boolean noCategoriesUrl = StringUtils.isEmpty(categoriesUrl) && StringUtils.isEmpty(casinoFeedsAPIBaseURL) && StringUtils.isEmpty(categoriesBackupUrl);\n if (noCategoriesUrl || StringUtils.isEmpty(gamesURL)) {\n return Collections.emptyList();\n }\n\n List<Category> categories = Collections.emptyList();\n\n try {\n\n if (StringUtils.isNotEmpty(categoriesUrl)) {\n categories = getCategoriesByURL(categoriesUrl, groupId);\n }\n\n if (StringUtils.isNotEmpty(casinoFeedsAPIBaseURL) && CollectionUtils.isEmpty(categories)) {\n\n Validate.notEmpty(languageId, \"Language can't be null or empty!\");\n Validate.notEmpty(casinoFeedsAPIBaseURL, \"Base url can't be null or empty!\");\n String casinoId = getCommonConfigurationService().getCasinoId(companyId, groupId);\n Validate.notEmpty(casinoId, \"Casino name can't be null or empty!\");\n String serviceURL = casinoAPIHelper.getCategoriesUrl(companyId, groupId, casinoFeedsAPIBaseURL, casinoId,\n categoryType);\n Validate.notEmpty(serviceURL, \"Categories service url can't be null or empty!\");\n log.debug(\"baseURL = {}\", casinoFeedsAPIBaseURL);\n log.debug(\"serviceURL = {}\", serviceURL);\n\n categories = getCategories(HttpClientUtil.doGet(serviceURL, PlayerMode.REAL.getName(), userName, \"\", languageId));\n\n }\n } catch (Exception e) {\n log.error(e.getMessage(), e);\n String backupURL = getCommonConfigurationService().getCasinoCategoriesBackupUrl(companyId, groupId, categoryType);\n if (StringUtils.isNotEmpty(backupURL)) {\n try {\n categories = getCategoriesByURL(backupURL, groupId);\n } catch (Exception e1) {\n throw new PlatformException(e1);\n }\n }\n }\n\n return categories;\n }", "public void LoadTexts(String idCategory, String nameCategory, String imageCategory) {\n textViewCategory.setText(nameCategory);\n Picasso.with(getActivity())\n .load(imageCategory)\n .error( R.drawable.logo_circular )\n .placeholder( R.drawable.logo_circular )\n .into( imageViewCategory );\n LoadSubcategory(idCategory);\n LoadProducts(idCategory);\n }", "public void initializeCards(){\n\n File dir = new File(\"Cards\");\n if(!dir.exists()){\n boolean success = dir.mkdir();\n System.out.println(\"Cards directory created!\");\n }\n if(dir.list() != null){\n for(String strng : dir.list()){\n cards.add(new BsbCard(strng));\n }\n }\n }", "void permutateArrays()\n {\n for (int i = 0; i < sampleArrays.length; i++)\n {\n for (int i1 = 0; i1 < (r.nextInt() % 7); i1++)\n {\n addToArray(sampleArrays[i], sampleStrings[r.nextInt(5)]);\n addToArray(sampleArrays[i], sampleNumbers[r.nextInt(5)]);\n addToArray(sampleArrays[i], sampleObjects[r.nextInt(5)]);\n addToArray(sampleArrays[i], specialValues[r.nextInt(2)]);\n }\n }\n }", "@Override\n public void onCategoryClicked(View itemView) {\n int position = mRecyclerView.getChildLayoutPosition(itemView);\n\n String mCategory = CategoryData.CATEGORY_LIST[position].toLowerCase();\n\n String mDifficulty = \"medium\";\n\n // select a random difficulty level\n Random random = new Random();\n switch(random.nextInt(3)) {\n case 0:\n mDifficulty = \"easy\";\n break;\n case 1:\n mDifficulty = \"medium\";\n break;\n case 2:\n mDifficulty = \"hard\";\n break;\n }\n\n // Select a random word from the assigned category and difficulty\n int resId = FileHelper.getStringIdentifier(getActivity(), mCategory + \"_\" + mDifficulty, \"raw\");\n mWord = FileHelper.selectRandomWord(getActivity(), resId);\n\n // set the edit text\n mEditText.setText(mWord);\n }", "public void onCategoryClicked(String category){\n\t\tfor(int i = 0 ; i < mData.getStatistics().size(); i++){\r\n\t\t\tif(mData.getStatistics().get(i).getCategory().equals(category)){\r\n\t\t\t\tif(mData.getStatistics().get(i).getDueChallenges() == 0){\r\n\t\t\t\t\tmGui.showToastNoDueChallenges(mData.getActivity());\r\n\t\t\t\t} else {\r\n\t\t\t\t\t//Start activity challenge (learn session) with category and user \t\r\n\t\t\t\t\tNavigation.startActivityChallenge(mData.getActivity(), mData.getUser(), category);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\t\t\r\n\t}" ]
[ "0.7680871", "0.6671018", "0.6561593", "0.6168766", "0.6162255", "0.6043886", "0.58741957", "0.5761744", "0.5754439", "0.5723936", "0.5685908", "0.55816895", "0.5504362", "0.5478809", "0.5470728", "0.5445287", "0.538586", "0.53835756", "0.5298615", "0.5295615", "0.526217", "0.5224523", "0.5216434", "0.51980233", "0.51925844", "0.5184784", "0.5175029", "0.5172839", "0.51659644", "0.51652056", "0.5158163", "0.51578337", "0.5129294", "0.5104377", "0.5101718", "0.5094182", "0.50901437", "0.50855654", "0.5067301", "0.50400555", "0.5025362", "0.50161964", "0.5014674", "0.49961907", "0.49892348", "0.49882022", "0.49805653", "0.49739286", "0.49649686", "0.4962491", "0.49608442", "0.49544013", "0.49499834", "0.49329275", "0.49325612", "0.4931621", "0.4917053", "0.49094045", "0.48914272", "0.48791233", "0.48576015", "0.48530242", "0.48492345", "0.4846771", "0.48137793", "0.48096898", "0.48013598", "0.48007134", "0.47939748", "0.47934878", "0.47926903", "0.4787962", "0.47833002", "0.47799918", "0.4762351", "0.47576156", "0.47552332", "0.47550866", "0.47497925", "0.47415495", "0.47371015", "0.47345066", "0.47329253", "0.4730192", "0.47132245", "0.4709552", "0.4707956", "0.4689193", "0.46876544", "0.46866444", "0.46843353", "0.46832812", "0.46829343", "0.46804455", "0.46756613", "0.4674288", "0.46716422", "0.46679765", "0.46655384", "0.46639413" ]
0.8453537
0
Get five random categories for the games module.
public List<String> getFiveRandomCategories () { return _fiveRandomCategories; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setFiveRandomCategories () {\n\t\t//create a file to store the selected five categories\n\t\tBashCmdUtil.bashCmdNoOutput(\"mkdir -p data\");\n\t\tFile five_random_categories = new File (\"data/five_random_categories\");\n\t\tif (!five_random_categories.exists()) {\n\t\t\tBashCmdUtil.bashCmdNoOutput(\"touch data/five_random_categories\");\n\t\t}\n\t\t// if five random categories dont exist, i.e. new game being started\n\t\tif (five_random_categories.length() == 0) {\n\t\t\tList<String> shuffledCategories = new ArrayList<String>(_nzCategories);\n\t\t\tCollections.shuffle(shuffledCategories);\n\t\t\tString str = \"\";\n\t\t\tfor (int i = 0; i < 5; i++) {\n\t\t\t\ttry {\n\t\t\t\t\t//create files that are used to store the clues of \n\t\t\t\t\t//the selected five categories\n\t\t\t\t\tFile dir = new File (\"data/games_module\");\n\t\t\t\t\tif (!dir.exists()) {\n\t\t\t\t\t\tdir.mkdir();\n\t\t\t\t\t}\n\t\t\t\t\tFile file = new File(dir,shuffledCategories.get(i));\n\t\t\t\t\tif (!file.exists()) {\n\t\t\t\t\t\tfile.createNewFile();\n\t\t\t\t\t}\t\t\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t_fiveRandomCategories.add(shuffledCategories.get(i));\n\t\t\t\tsetFiveRandomClues(shuffledCategories.get(i));\n\t\t\t\tstr = str + shuffledCategories.get(i) + \",\";\n\t\t\t\t_gamesData.put(shuffledCategories.get(i), _fiveRandomClues);\n\t\t\t}\n\t\t\tBashCmdUtil.bashCmdNoOutput(String.format(\"echo \\\"%s\\\" >> data/five_random_categories\",str));\n\t\t}\n\t\telse { // if files already exist, i.e. the game has already started\n\t\t\tBufferedReader reader;\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\treader = new BufferedReader(new FileReader(\"data/five_random_categories\"));\n\t\t\t\tString line = reader.readLine();\n\t\t\t\tstr = line;\n\t\t\t\treader.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tString[] splitStr = str.split(\",\");\n\t\t\tfor (int i = 0; i<5;i++) {\n\t\t\t\t_fiveRandomCategories.add(splitStr[i]);\n\t\t\t\tsetFiveRandomClues(splitStr[i]);\n\t\t\t\t_gamesData.put(splitStr[i], _fiveRandomClues);\n\t\t\t}\n\t\t}\n\t}", "public void randomizeCategory() {\n this.group = (int) (3*Math.random()+1);\n }", "public void setFiveRandomClues (String category){\n\t\tFile file = new File(\"data/games_module\", category);\n\t\t// writing 5 random clues to the category file chosen if file is empty\n\t\tif (file.length() == 0) {\n\t\t\tList<String> clues = new ArrayList<String>();\n\t\t\tclues = _nzData.get(category);\n\t\t\tCollections.shuffle(clues);\n\t\t\tList<String> temp = new ArrayList<String>();\n\t\t\tfor (int i = 0; i<5;i++) {\n\t\t\t\ttemp.add(clues.get(i));\n\t\t\t\tBashCmdUtil.bashCmdNoOutput(String.format(\"echo \\\"%s\\\" >> data/games_module/\\\"%s\\\"\",clues.get(i), category));\n\t\t\t}\n\t\t\t_fiveRandomClues = temp;\n\t\t}\n\t\telse {\n\t\t\ttry {\n\t\t\t\tScanner myReader = new Scanner(file);\n\t\t\t\tList<String> temp= new ArrayList<String>();\n\t\t\t\twhile(myReader.hasNextLine()) {\n\t\t\t\t\tString fileLine = myReader.nextLine();\n\t\t\t\t\ttemp.add(fileLine);\n\t\t\t\t}\n\t\t\t\t_fiveRandomClues = new ArrayList<String>(temp);\n\t\t\t\tmyReader.close();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t}", "private List<ExploreSitesCategory> createDefaultCategoryTiles() {\n List<ExploreSitesCategory> categoryList = new ArrayList<>();\n\n // Sport category.\n ExploreSitesCategory category = new ExploreSitesCategory(\n SPORT, getContext().getString(R.string.explore_sites_default_category_sports));\n category.setDrawable(getVectorDrawable(R.drawable.ic_directions_run_blue_24dp));\n categoryList.add(category);\n\n // Shopping category.\n category = new ExploreSitesCategory(\n SHOPPING, getContext().getString(R.string.explore_sites_default_category_shopping));\n category.setDrawable(getVectorDrawable(R.drawable.ic_shopping_basket_blue_24dp));\n categoryList.add(category);\n\n // Food category.\n category = new ExploreSitesCategory(\n FOOD, getContext().getString(R.string.explore_sites_default_category_cooking));\n category.setDrawable(getVectorDrawable(R.drawable.ic_restaurant_menu_blue_24dp));\n categoryList.add(category);\n return categoryList;\n }", "public final List<String> getCategories() {\n return new ArrayList<>(questionGeneratorStrategyFactory.createPracticeQuestionStrategy().generateQuestions().keySet());\n }", "@NonNull\n public static List<Category> getCategories() {\n if (CATEGORY == null) {\n CATEGORY = new ArrayList<>();\n CATEGORY.add(new Category(\"Bollywood\", R.drawable.bollywood, 1));\n CATEGORY.add(new Category(\"Hollywood\", R.drawable.hollywood3, 2));\n CATEGORY.add(new Category(\"Cricket\", R.drawable.cricket4, 3));\n CATEGORY.add(new Category(\"Science\", R.drawable.science1, 4));\n CATEGORY.add(new Category(\"Geography\", R.drawable.geography, 5));\n CATEGORY.add(new Category(\"History\", R.drawable.history, 6));\n }\n return CATEGORY;\n }", "private void pickUtts() {\n for (int i = 0; i < CATEGORIES.length; i++)\n pickedUtts[i] = new Utterance[BUTTONS_PER_PAGE];\n // check all categories to be sure there's enough\n for (int i = 0; i < CATEGORIES.length; i++) {\n if(includedUtts.get(i).size() < BUTTONS_PER_PAGE)\n new Exception().printStackTrace();\n }\n // pick new utts\n Random ran = new Random();\n for (int i = 0; i < CATEGORIES.length; i++) {\n Utterance pick;\n for ( int j = 0; j < BUTTONS_PER_PAGE; j++ ) {\n do {\n pick = includedUtts.get(i).get(ran.nextInt(includedUtts.get(i).size()));\n } while (Arrays.asList(pickedUtts[i]).contains(pick));\n pickedUtts[i][j] = pick;\n }\n }\n }", "public int getRandomBreed() {\n Random r = new Random();\n// displayToast(Integer.toString(getRandomBreed())); // not needed. generates another random number\n return r.nextInt(6);\n }", "@GetMapping(\"cat-random/{category}\")\n\tpublic Movie getRandomMovieCat(@PathVariable(\"category\") String category) {\n\t\tList<Movie> list = repo.findByCategory(category);\n\t\tRandom rand = new Random();\n\t\tint num = rand.nextInt(list.size()) + 1;\n\t\t\n\t\treturn repo.findById(num);\n\t}", "public List<Categorie> getAllCategories();", "public static List<Categorias> obtenerCategorias(){\n List<Categorias> categorias = new ArrayList<>();\n \n Categorias c = new Categorias();\n \n c.conectar();\n \n c.crearQuery(\"select * from categoria_libro\");\n \n ResultSet informacion = c.getResultSet();\n \n try {\n while (informacion.next())\n categorias.add(new Categorias(informacion));\n } catch (Exception error) {}\n \n c.desconectar();\n \n return categorias;\n }", "public void gamemodeSetUp(ArrayList<Player> players, int numberOfQuestions, Categories categories){\n for (int i = 0; i < numberOfQuestions; i++) {\n String categoriesToAsk = categories.getRandomCategory();\n Question questionToBeAsked;\n System.out.format(\"The category is %s\\n\", categoriesToAsk);\n switch (categoriesToAsk) {\n case \"Math\":\n if (categories.getMathArray().isEmpty()){\n categories.initializeTheArrayWithMathQuestions();\n }\n questionToBeAsked = this.setUpQuestion(categories.getMathArray());\n gamemodePlay(players, questionToBeAsked);\n break;\n case \"General Knowledge\":\n if (categories.getGeneralKnowledgeArray().isEmpty()){\n categories.initializeTheArrayWithGeneralKnowledgeQuestions();\n }\n questionToBeAsked = this.setUpQuestion(categories.getGeneralKnowledgeArray());\n gamemodePlay(players, questionToBeAsked);\n break;\n case \"Science\":\n if (categories.getScienceArray().isEmpty()){\n categories.initializeTheArrayWithScienceQuestions();\n }\n questionToBeAsked = this.setUpQuestion(categories.getScienceArray());\n gamemodePlay(players, questionToBeAsked);\n break;\n case \"Movies\":\n if (categories.getMoviesArray().isEmpty()){\n categories.initializeTheArrayWithMoviesQuestions();\n }\n questionToBeAsked = this.setUpQuestion(categories.getMoviesArray());\n gamemodePlay(players, questionToBeAsked);\n break;\n }\n }\n scoreSumUp(players);\n }", "private Category getCategory()\n\t{\n\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\tSystem.out.println(\"Choose category:\");\n\t\tint i = 1;\n\t\tfor(Category category : Category.values())\n\t\t{\n\t\t\tSystem.out.println(i + \": \"+category.getCategoryDescription());\n\t\t\ti++;\n\t\t}\n\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\tString userChoiceStr = scanner.nextLine();\n\t\tint userChoice;\n\t\ttry\n\t\t{\n\t\t\tuserChoice = Integer.parseInt(userChoiceStr);\n\t\t}\n\t\tcatch(NumberFormatException e)\n\t\t{\n\t\t\tSystem.out.println(\"Invalid input\");\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tif(userChoice<1 || userChoice>25)\n\t\t{\n//\t\t\tSystem.out.println(\"Invalid category code\");\n\t\t\treturn null;\n\t\t}\n\t\tCategory category;\n\t\tswitch (userChoice) \n\t\t{\n\t\t\tcase 1: category = Category.ARTS; break;\n\t\t\tcase 2: category = Category.AUTOMOTIVE; break;\n\t\t\tcase 3: category = Category.BABY; break;\n\t\t\tcase 4: category = Category.BEAUTY; break;\n\t\t\tcase 5: category = Category.BOOKS; break;\n\t\t\tcase 6: category = Category.COMPUTERS; break;\n\t\t\tcase 7: category = Category.CLOTHING;break;\n\t\t\tcase 8: category = Category.ELECTRONICS; break;\n\t\t\tcase 9: category = Category.FASHION; break;\n\t\t\tcase 10: category = Category.FINANCE; break;\n\t\t\tcase 11: category = Category.FOOD; break;\n\t\t\tcase 12: category = Category.HEALTH; break;\n\t\t\tcase 13: category = Category.HOME; break;\n\t\t\tcase 14: category = Category.LIFESTYLE; break;\n\t\t\tcase 15: category = Category.MOVIES; break;\n\t\t\tcase 16: category = Category.MUSIC; break;\n\t\t\tcase 17: category = Category.OUTDOORS; break;\n\t\t\tcase 18: category = Category.PETS; break;\n\t\t\tcase 19: category = Category.RESTAURANTS; break;\n\t\t\tcase 20: category = Category.SHOES; break;\n\t\t\tcase 21: category = Category.SOFTWARE; break;\n\t\t\tcase 22: category = Category.SPORTS; break;\n\t\t\tcase 23: category = Category.TOOLS; break;\n\t\t\tcase 24: category = Category.TRAVEL; break;\n\t\t\tcase 25: category = Category.VIDEOGAMES; break;\n\t\t\tdefault: category = null;System.out.println(\"No such category\"); break;\n\t\t}\n\t\treturn category;\n\t}", "public void loadRandomClue(String module, String category) {\n\t\tList<String> clues = new ArrayList<String>();\n\t\tif (module == \"nz\") {\n\t\t\tclues = _nzData.get(category);\n\t\t} else if (module == \"int\"){\n\t\t\tclues = _intData.get(category);\n\t\t}\n\t\tint size = clues.size();\n\t\tRandom rand = new Random();\n\t\tint randomIndex = rand.nextInt(size);\n\t\ttry {\n\t\t\t_currentClue = new Clue(clues.get(randomIndex));\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static Collection<Item> generateItems(int numberOfItems) {\n Random r = new Random(97);\n if (numberOfItems > 0) {\n Collection<Item> gameItems = new Stack<>();\n int power;\n for (int i = 0; i < numberOfItems; i++) {\n\n switch (ItemType.random()) {\n case HEALTH_POTION:\n power = (r.nextInt(3) + 1) * 100;\n gameItems.add(new HealthPotion(\"HealthPotion (\" + power + \")\", power));\n break;\n case POISON:\n power = (r.nextInt(8) + 1) * 20;\n gameItems.add(new Poison(\"Poison (\" + power + \")\", power));\n break;\n case ARMOR:\n power = (r.nextInt(6) + 1) * 10;\n gameItems.add(new Armor(\"Armor (\" + power + \")\", power));\n break;\n case WEAPON:\n power = (r.nextInt(7) + 1) * 10;\n gameItems.add(new Weapon(\"Weapon (\" + power + \")\", power));\n break;\n default:\n break;\n }\n }\n return gameItems;\n }\n return null;\n }", "String getCategoria();", "public ArrayList<RandomItem> getRandomItems();", "public static TradeGood getRandom() {\n TradeGood[] options = new TradeGood[] {WATER, FURS, ORE, FOOD, GAMES, FIREARMS,\n MEDICINE, NARCOTICS, ROBOTS, MACHINES};\n int index = GameState.getState().rng.nextInt(10);\n return options[index];\n }", "List<Category> getAllCategories();", "public static ArrayList<String> getCategories() {\n String query;\n ArrayList<String> categories = new ArrayList<String>();\n\n try {\n Connection con = Database.createDBconnection();\n Statement stmt = con.createStatement();\n query = \"SELECT category FROM category;\";\n ResultSet rs = stmt.executeQuery(query);\n\n while(rs.next()) {\n categories.add(rs.getString(\"category\"));\n }\n\n Database.closeDBconnection(con);\n }\n catch(Exception e) {\n e.printStackTrace();\n }\n return categories;\n }", "public void initiateGame() {\n Collections.shuffle(players);\n Collections.shuffle(categories);\n for (Category c : categories) {\n c.shuffleChallenges();\n }\n }", "private void addRandomFoilCard(List<CardCollection.Item> result, int count) {\n List<String> possibleCards = new ArrayList<String>();\n\n // Very Rare foils\n for (int i=0; i<3; ++i) {\n possibleCards.add(\"9_94\"); // Fighters Coming In\n possibleCards.add(\"7_168\"); // Boelo\n possibleCards.add(\"106_11\"); // Chall Bekan\n possibleCards.add(\"8_94\"); // Commander Igar\n possibleCards.add(\"9_110\"); // Janus Greejatus\n possibleCards.add(\"9_118\"); // Myn Kyneugh\n possibleCards.add(\"9_120\"); // Sim Aloo\n possibleCards.add(\"4_116\"); // Bad Feeling Have I\n possibleCards.add(\"1_222\"); // Lateral Damage\n possibleCards.add(\"6_149\"); // Scum And Villainy\n possibleCards.add(\"7_241\"); // Sienar Fleet Systems\n possibleCards.add(\"101_6\"); // Vader's Obsession\n possibleCards.add(\"9_147\"); // Death Star II: Throne Room\n possibleCards.add(\"4_161\"); // Executor: Holotheatre\n possibleCards.add(\"4_163\"); // Executor: Meditation Chamber\n possibleCards.add(\"3_150\"); // Hoth: Wampa Cave\n possibleCards.add(\"2_147\"); // Kiffex (Dark)\n possibleCards.add(\"106_10\"); // Black Squadron TIE\n possibleCards.add(\"110_8\"); // IG-88 In IG-2000\n possibleCards.add(\"106_1\"); // Arleil Schous\n possibleCards.add(\"7_44\"); // Tawss Khaa\n possibleCards.add(\"5_23\"); // Frozen Assets\n possibleCards.add(\"7_62\"); // Goo Nee Tay\n possibleCards.add(\"1_55\"); // Mantellian Savrip\n possibleCards.add(\"4_30\"); // Order To Engage\n possibleCards.add(\"101_3\"); // Run Luke, Run!\n possibleCards.add(\"104_2\"); // Lone Rogue\n possibleCards.add(\"6_83\"); // Kiffex (Light)\n possibleCards.add(\"9_64\"); // Blue Squadron B-wing\n possibleCards.add(\"103_1\"); // Gold Leader In Gold 1\n possibleCards.add(\"9_73\"); // Green Squadron A-wing\n possibleCards.add(\"9_76\"); // Liberty\n possibleCards.add(\"103_2\"); // Red Leader In Red 1\n possibleCards.add(\"106_9\"); // Z-95 Headhunter\n }\n\n // Super Rare foils\n for (int i=0; i<2; ++i) {\n possibleCards.add(\"109_6\"); // 4-LOM With Concussion Rifle\n possibleCards.add(\"9_98\"); // Admiral Piett\n possibleCards.add(\"9_99\"); // Baron Soontir Fel\n possibleCards.add(\"110_5\"); // Bossk With Mortar Gun\n possibleCards.add(\"108_6\"); // Darth Vader With Lightsaber\n possibleCards.add(\"110_7\"); // Dengar With Blaster Carbine\n possibleCards.add(\"1_171\"); // Djas Puhr\n possibleCards.add(\"109_11\"); // IG-88 With Riot Gun\n possibleCards.add(\"110_9\"); // Jodo Kast\n possibleCards.add(\"9_117\"); // Moff Jerjerrod\n possibleCards.add(\"7_195\"); // Outer Rim Scout\n possibleCards.add(\"9_136\"); // Force Lightning\n possibleCards.add(\"3_138\"); // Trample\n possibleCards.add(\"104_7\"); // Walker Garrison\n possibleCards.add(\"2_143\"); // Death Star\n possibleCards.add(\"9_142\"); // Death Star II\n possibleCards.add(\"109_8\"); // Boba Fett In Slave I\n possibleCards.add(\"9_154\"); // Chimaera\n possibleCards.add(\"109_10\"); // Dengar In Punishing One\n possibleCards.add(\"106_13\"); // Dreadnaught-Class Heavy Cruiser\n possibleCards.add(\"9_157\"); // Flagship Executor\n possibleCards.add(\"9_172\"); // The Emperor's Shield\n possibleCards.add(\"9_173\"); // The Emperor's Sword\n possibleCards.add(\"110_12\"); // Zuckuss In Mist Hunter\n possibleCards.add(\"104_5\"); // Imperial Walker\n possibleCards.add(\"8_172\"); // Tempest Scout 1\n possibleCards.add(\"9_178\"); // Darth Vader's Lightsaber\n possibleCards.add(\"110_11\"); // Mara Jade's Lightsaber\n possibleCards.add(\"9_1\"); // Capital Support\n possibleCards.add(\"9_6\"); // Admiral Ackbar\n possibleCards.add(\"2_2\"); // Brainiac\n possibleCards.add(\"109_1\"); // Chewie With Blaster Rifle\n possibleCards.add(\"8_3\"); // Chief Chirpa\n possibleCards.add(\"9_13\"); // General Calrissian\n possibleCards.add(\"8_14\"); // General Crix Madine\n possibleCards.add(\"1_15\"); // Kal'Falnl C'ndros\n possibleCards.add(\"102_3\"); // Leia\n possibleCards.add(\"108_3\"); // Luke With Lightsaber\n possibleCards.add(\"7_32\"); // Melas\n possibleCards.add(\"8_23\"); // Orrimaarko\n possibleCards.add(\"110_3\"); // See-Threepio\n possibleCards.add(\"9_31\"); // Wedge Antilles, Red Squadron Leader\n possibleCards.add(\"8_32\"); // Wicket\n possibleCards.add(\"3_32\"); // Bacta Tank\n possibleCards.add(\"3_34\"); // Echo Base Operations\n possibleCards.add(\"1_52\"); // Kessel Run\n possibleCards.add(\"1_76\"); // Don't Get Cocky\n possibleCards.add(\"1_82\"); // Gift Of The Mentor\n possibleCards.add(\"5_69\"); // Smoke Screen\n possibleCards.add(\"1_138\"); // Yavin 4: Massassi Throne Room\n possibleCards.add(\"111_2\"); // Artoo-Detoo In Red 5\n possibleCards.add(\"9_65\"); // B-wing Attack Squadron\n possibleCards.add(\"9_68\"); // Gold Squadron 1\n possibleCards.add(\"106_4\"); // Gold Squadron Y-wing\n possibleCards.add(\"9_74\"); // Home One\n possibleCards.add(\"9_75\"); // Independence\n possibleCards.add(\"109_2\"); // Lando In Millennium Falcon\n possibleCards.add(\"9_81\"); // Red Squadron 1\n possibleCards.add(\"106_7\"); // Red Squadron X-wing\n possibleCards.add(\"7_150\"); // X-wing Assault Squadron\n possibleCards.add(\"104_3\"); // Rebel Snowspeeder\n possibleCards.add(\"9_90\"); // Luke's Lightsaber\n }\n\n // Ultra Rare foils\n for (int i=0; i<1; ++i) {\n possibleCards.add(\"9_109\"); // Emperor Palpatine\n possibleCards.add(\"9_113\"); // Lord Vader\n possibleCards.add(\"110_10\"); // Mara Jade, The Emperor's Hand\n possibleCards.add(\"9_24\"); // Luke Skywalker, Jedi Knight\n }\n\n filterNonExistingCards(possibleCards);\n Collections.shuffle(possibleCards, _random);\n addCards(result, possibleCards.subList(0, Math.min(possibleCards.size(), count)), true);\n }", "private static void catList() {\n\t\tSystem.out.println(\"List of preset Categories\");\n\t\tSystem.out.println(\"=========================\");\n\t\tSystem.out.println(\n\t\t\t\t\"Family\\nTeen\\nThriller\\nAnimated\\nSupernatural\\nComedy\\nDrama\\nQuirky\\nAction\\nComing of age\\nHorror\\nRomantic Comedy\\n\\n\");\n\t}", "List getCategoriesOfType(String typeConstant);", "private static TETile getRandomTile() {\n Random r = new Random();\n int tileNum = r.nextInt(5);\n switch (tileNum) {\n case 0: return Tileset.FLOWER;\n case 1: return Tileset.MOUNTAIN;\n case 2: return Tileset.TREE;\n case 3: return Tileset.GRASS;\n case 4: return Tileset.SAND;\n default: return Tileset.SAND;\n }\n }", "@Test\n public void testCreateCategorizationLearner()\n {\n int ensembleSize = 3 + random.nextInt(1000);\n double baggingFraction = random.nextDouble();\n double dimensionsFraction = random.nextDouble();\n int maxTreeDepth = 3 + random.nextInt(10);\n int minLeafSize = 4 + random.nextInt(10);\n Random random = new Random();\n BaggingCategorizerLearner<Vector, String> result\n = RandomForestFactory.createCategorizationLearner(ensembleSize,\n baggingFraction, dimensionsFraction, maxTreeDepth, minLeafSize,\n random);\n assertEquals(ensembleSize, result.getMaxIterations());\n assertEquals(baggingFraction, result.getPercentToSample(), 0.0);\n assertSame(random, result.getRandom());\n @SuppressWarnings(\"rawtypes\")\n CategorizationTreeLearner treeLearner = \n (CategorizationTreeLearner) result.getLearner();\n assertEquals(maxTreeDepth, treeLearner.getMaxDepth());\n assertTrue(treeLearner.getLeafCountThreshold() >= 2 * minLeafSize);\n RandomSubVectorThresholdLearner<?> randomSubspace = (RandomSubVectorThresholdLearner<?>)\n treeLearner.getDeciderLearner();\n assertEquals(dimensionsFraction, randomSubspace.getPercentToSample(), 0.0);\n assertSame(random, randomSubspace.getRandom());\n VectorThresholdInformationGainLearner<?> splitLearner = (VectorThresholdInformationGainLearner<?>)\n randomSubspace.getSubLearner();\n assertEquals(minLeafSize, splitLearner.getMinSplitSize());\n }", "private static TETile randomTile() {\n int tileNum = RANDOM.nextInt(5);\n switch (tileNum) {\n case 0: return Tileset.TREE;\n case 1: return Tileset.FLOWER;\n case 2: return Tileset.GRASS;\n case 3: return Tileset.SAND;\n case 4: return Tileset.MOUNTAIN;\n default: return Tileset.NOTHING;\n }\n }", "String category();", "public static CubeState getRandom(){\n CubeState cs = new CubeState();\n Random rand = new Random();\n for (int i = 0; i < 20; i++) {\n cs = cs.times(Solver.generators.get(rand.nextInt(18)));\n }\n return cs;\n }", "private String[] obtenerColores(List<Categoria> listaCategorias) {\n\t\tString[] colores = new String[listaCategorias.size()];\n\t\tRandom obj = new Random();\n\t\tfor (int i = 0; i < listaCategorias.size(); i++) {\n\t\t\tint rand_num = obj.nextInt(0xffffff + 1);\n\t\t\tcolores[i] = String.format(\"#%06x\", rand_num);\n\t\t}\n\t\treturn colores;\n\t}", "private Color randomColor()\r\n {\r\n \tint randomNum = random.nextInt(5);\r\n \t\r\n \tif (randomNum == RED)\r\n \t\treturn Color.RED;\r\n \telse if (randomNum == GREEN)\r\n \t\treturn Color.GREEN;\r\n \telse if (randomNum == BLUE)\r\n \t\treturn Color.BLUE;\r\n \telse if (randomNum == BLACK)\r\n \t\treturn Color.BLACK;\r\n \telse \r\n \t\treturn Color.CYAN;\r\n \t\r\n\t\t\r\n }", "@Override\n public List<Category> getCategoriesFromUrl(long companyId, long groupId, CategoryType categoryType, String otherFeedTypeUrl, String languageId, String userName) {\n\n String categoriesUrl = categoryType.equals(CategoryType.OTHER) ? otherFeedTypeUrl : getCommonConfigurationService().getCasinoCategoriesUrl(companyId, groupId, categoryType);\n String categoriesBackupUrl = getCommonConfigurationService().getCasinoCategoriesBackupUrl(companyId, groupId, categoryType);\n String casinoFeedsAPIBaseURL = getCommonConfigurationService().getCasinoFeedsAPIBaseUrl(companyId, groupId);\n String gamesURL = getCommonConfigurationService().getCasinoGamesUrl(companyId, groupId);\n\n boolean noCategoriesUrl = StringUtils.isEmpty(categoriesUrl) && StringUtils.isEmpty(casinoFeedsAPIBaseURL) && StringUtils.isEmpty(categoriesBackupUrl);\n if (noCategoriesUrl || StringUtils.isEmpty(gamesURL)) {\n return Collections.emptyList();\n }\n\n List<Category> categories = Collections.emptyList();\n\n try {\n\n if (StringUtils.isNotEmpty(categoriesUrl)) {\n categories = getCategoriesByURL(categoriesUrl, groupId);\n }\n\n if (StringUtils.isNotEmpty(casinoFeedsAPIBaseURL) && CollectionUtils.isEmpty(categories)) {\n\n Validate.notEmpty(languageId, \"Language can't be null or empty!\");\n Validate.notEmpty(casinoFeedsAPIBaseURL, \"Base url can't be null or empty!\");\n String casinoId = getCommonConfigurationService().getCasinoId(companyId, groupId);\n Validate.notEmpty(casinoId, \"Casino name can't be null or empty!\");\n String serviceURL = casinoAPIHelper.getCategoriesUrl(companyId, groupId, casinoFeedsAPIBaseURL, casinoId,\n categoryType);\n Validate.notEmpty(serviceURL, \"Categories service url can't be null or empty!\");\n log.debug(\"baseURL = {}\", casinoFeedsAPIBaseURL);\n log.debug(\"serviceURL = {}\", serviceURL);\n\n categories = getCategories(HttpClientUtil.doGet(serviceURL, PlayerMode.REAL.getName(), userName, \"\", languageId));\n\n }\n } catch (Exception e) {\n log.error(e.getMessage(), e);\n String backupURL = getCommonConfigurationService().getCasinoCategoriesBackupUrl(companyId, groupId, categoryType);\n if (StringUtils.isNotEmpty(backupURL)) {\n try {\n categories = getCategoriesByURL(backupURL, groupId);\n } catch (Exception e1) {\n throw new PlatformException(e1);\n }\n }\n }\n\n return categories;\n }", "private ArrayList<AdventurerEnum> getRandomisedRoles() {\n\t\tArrayList<AdventurerEnum> allRoles = new ArrayList<AdventurerEnum>();\n\t\tArrayList<AdventurerEnum> randomRoles = new ArrayList<AdventurerEnum>();\n\t\t\n\t\tallRoles.add(AdventurerEnum.DIVER);\n\t\tallRoles.add(AdventurerEnum.ENGINEER);\n\t\tallRoles.add(AdventurerEnum.EXPLORER);\n\t\tallRoles.add(AdventurerEnum.MESSENGER);\n\t\tallRoles.add(AdventurerEnum.NAVIGATOR);\n\t\tCollections.shuffle(allRoles);\t\t // Shuffle roles so not always picking same roles to be added\n\t\t\n\t\trandomRoles.add(AdventurerEnum.PILOT); // Always need a pilot\n\t\tfor(int i=1; i<numPlayers; i++)\n\t\t\trandomRoles.add( allRoles.remove(0) );\n\t\tCollections.shuffle(randomRoles);\t // Shuffle again so that Pilot isn't always the first player \n\t\t\n\t\treturn randomRoles;\n\t}", "private static int getRandomNumberOfRooms(){\r\n return r.nextInt(50)+1;\r\n }", "public void RandomizeTheDeck() {\r\n ArrayList<ArrayList<Card>> alalCopy = new ArrayList<>();\r\n int i, iRand;\r\n Random rand = new Random();\r\n \r\n // remove deck to the copy\r\n for( i=0; i<104; i++) {\r\n alalCopy.add( alalSets.get(i) );\r\n }\r\n alalSets.clear();\r\n \r\n // randomly copy them back as copy size gets smaller\r\n for( i=104; i>0; i-- ) {\r\n iRand = (int)rand.nextInt(i);\r\n alalSets.add( alalCopy.remove(iRand) );\r\n }\r\n }", "public static ArrayList<Category> getCategories(int shopID) {\n categories = new ArrayList<>();\n categories.add(new Category(1, 10, \"Category 1\", \"1st Floor a Wing\"));\n categories.add(new Category(1, 11, \"Category 2\", \"1st Floor b Wing\"));\n categories.add(new Category(1, 12, \"Category 3\", \"\"));\n categories.add(new Category(1, 13, \"Category 4\", \"1st Floor c Wing\"));\n\n/*\n categories.add(new Category(1, 10, \"Category 1\", \"\"));\n categories.add(new Category(1, 11, \"Category 2\", \"\"));\n categories.add(new Category(1, 12, \"Category 3\", \"\"));\n categories.add(new Category(1, 13, \"Category 4\", \"\"));\n*/\n return categories;\n }", "public List<TilePojo> getCategoryCharacterList() {\n\t\tLOGGER.info(\"GetCategoryCharacterList -> Start\");\n\t\tcategoryCharacterList = new LinkedList<>();\n\n\t\tTagManager tagManager = resource.getResourceResolver().adaptTo(TagManager.class);\n\t\tif (galleryCategory != null && tagManager != null) {\n\t\t\tTag galleryTag = tagManager.resolve(galleryCategory[0]);\n\t\t\tString galleryTagId = galleryTag.getTagID();\n\t\t\tList<TilePojo> charList = tileGalleryAndLandingService.getTilesByDate(homePagePath, galleryFor,\n\t\t\t\t\tgalleryTagId, resource.getResourceResolver(), true);\n\t\t\tcategoryCharacterList = getFixedNumberChar(charList, 12);\n\t\t}\n\t\tLOGGER.info(\"GetCategoryCharacterList -> End\");\n\t\treturn categoryCharacterList;\n\t}", "public void readInCategories() {\n // read CSV file for Categories\n allCategories = new ArrayList<Category>();\n InputStream inputStream = getResources().openRawResource(R.raw.categories);\n CSVFile csvFile = new CSVFile(inputStream);\n List scoreList = csvFile.read();\n // ignore first row because it is the title row\n for (int i = 1; i < scoreList.size(); i++) {\n String[] categoryInfo = (String[]) scoreList.get(i);\n\n // inputs to Category constructor:\n // String name, int smallPhotoID, int bannerPhotoID\n\n // get all image IDs according to the names\n int smallPhotoID = context.getResources().getIdentifier(categoryInfo[1], \"drawable\", context.getPackageName());\n int bannerPhotoID = context.getResources().getIdentifier(categoryInfo[2], \"drawable\", context.getPackageName());\n allCategories.add(new Category(categoryInfo[0],smallPhotoID, bannerPhotoID));\n\n //System.out.println(\"categoryInfo: \" + categoryInfo[0] + \" \" + categoryInfo[1] + \" \" + categoryInfo[2]);\n }\n }", "public String getTop5() {\n\t\tboolean boo = false;\n\t\tArrayList<String> keys = new ArrayList<String>();\n\t\tkeys.addAll(getConfig().getConfigurationSection(\"player.\").getKeys(false));\n\t\tArrayList<Integer> serious = new ArrayList<Integer>();\n\t\tHashMap<Integer, String> seriousp = new HashMap<Integer, String>();\n\t\tfor (int i = 0; i < keys.size(); i++) {\n\t\t\tserious.add(getConfig().getInt(\"player.\" + keys.get(i) + \".gp\"));\n\t\t\tseriousp.put(getConfig().getInt(\"player.\" + keys.get(i) + \".gp\"), keys.get(i));\n\t\t}\n\t\tComparator<Integer> comparator = Collections.<Integer> reverseOrder();\n\t\tCollections.sort(serious, comparator);\n\t\tString retstr = \"\";\n\t\tfor (int i = 0; i < serious.size(); i++) {\n\t\t\tretstr += serious.get(i).toString() + \" - \" + seriousp.get(serious.get(i)) + \"\\n\";\n\t\t\tif (i == 6) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn retstr;\n\t}", "public ArrayList<PuzzleState> getRandomNeighbors() {\n\t\tArrayList<PuzzleState> ns = getNeighbors();\n\t\tCollections.shuffle(ns);\n\t\treturn ns;\t\n\t}", "public void shuffleItems() {\n LoadProducts(idCategory);\n }", "public Integer getRandomIndexByType(int type){\n\t\tRandom randomGenerator = new Random();\n\t\tnewCategories.clear();\n\t\tfor(int i = 0; i<this.type.size(); i++)\n\t\t{\t\n\t\t\tif(this.type.get(i) == type) {\n\t\t\t\tnewCategories.add(this.categories.get(i));\n\t\t\t}\n\t\t}\n\t\tInteger index = randomGenerator.nextInt(newCategories.size());\n\t\treturn index;\n\t}", "public List<String> getCategories();", "public static List<Category> getRecentlyUsedCategories(Context context, int maxCategories) {\r\n DbManager dbManager = new DbManager(context);\r\n SQLiteDatabase db = dbManager.getWritableDatabase();\r\n\r\n String query = String.format(\"SELECT %s, %s FROM %s JOIN %s ON %s.%s = %s.%s WHERE %s = 0 GROUP BY %s ORDER BY %s DESC LIMIT %d\",\r\n CategoryTable.COLUMN_NAME_CATEGORY_NAME, BudgetEntryTable.COLUMN_NAME_CATEGORY_ID, BudgetEntryTable.TABLE_NAME,\r\n CategoryTable.TABLE_NAME, BudgetEntryTable.TABLE_NAME, BudgetEntryTable.COLUMN_NAME_CATEGORY_ID, CategoryTable.TABLE_NAME,\r\n CategoryTable._ID, CategoryTable.COLUMN_NAME_IS_DELETED, CategoryTable.COLUMN_NAME_CATEGORY_NAME,\r\n BudgetEntryTable.COLUMN_NAME_DATE, maxCategories);\r\n\r\n Cursor cursor = db.rawQuery(query, new String[]{});\r\n\r\n List<Category> categories = new ArrayList<>();\r\n\r\n while(cursor.moveToNext()) {\r\n Category category = new Category();\r\n category.category = cursor.getString(cursor.getColumnIndexOrThrow(CategoryTable.COLUMN_NAME_CATEGORY_NAME));\r\n category._id = cursor.getInt(cursor.getColumnIndexOrThrow(BudgetEntryTable.COLUMN_NAME_CATEGORY_ID));\r\n categories.add(category);\r\n }\r\n cursor.close();\r\n db.close();\r\n\r\n return categories;\r\n }", "public void randomizeColor() {\r\n\t\tArrayList<Integer> possibleColors = new ArrayList<Integer>();\r\n\t\tfor(int i = 1; i<=4; i++) {\r\n\t\t\tif(i!=colorType) { \r\n\t\t\t\tpossibleColors.add(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcolorType = possibleColors.get((int) (Math.random()*3));\r\n\t\t\r\n\t}", "public void addRandoms() {\n //Add random boulders on tiles that aren't Lava\n int tileNumber;\n int selector;\n Tile t;\n String tileTexture;\n Random random = new Random();\n SquareVector playerPos = getPlayerEntity().getPosition();\n int tileCount = GameManager.get().getWorld().getTiles().size();\n AbstractWorld world = GameManager.get().getWorld();\n int randIndex;\n\n for (int i = 0; i < 20; i++) {\n //Get respective volcano tile (5 <= Lava tiles Index <= 8\n do {\n randIndex = random.nextInt(tileCount);\n t = world.getTile(randIndex);\n } while (t.getCoordinates().isCloseEnoughToBeTheSame(playerPos));\n\n tileTexture = t.getTextureName();\n tileNumber = Integer.parseInt(tileTexture.split(\"_\")[1]);\n\n selector = random.nextInt(2);\n if (tileNumber < 5 && tileNumber > 1 && selector == 1 && !t.hasParent()) {\n entities.add(new Rock(t, true));\n } else if (t != null && (tileNumber == 3 || tileNumber == 4) &&\n selector == 0 && !t.hasParent()) {\n entities.add(new VolcanoBurningTree(t, true));\n } else {\n i--;\n }\n }\n }", "@Test\n public void getAllRecipeCategories_ReturnsList(){\n int returned = testDatabase.addRecipe(testRecipe);\n ArrayList<RecipeCategory> allCategories = testDatabase.getAllRecipeCategories(returned);\n assertNotEquals(\"getAllRecipeCategories - Non-empty List Returned\", 0, allCategories.size());\n }", "public static List<Category> getAllCategory() {\n\n List<Category> categoryList = new ArrayList<>();\n try {\n categoryList = Category.listAll(Category.class);\n } catch (Exception e) {\n\n }\n return categoryList;\n\n }", "private void populateCategories() {\n\n AsyncHttpClient client = new AsyncHttpClient();\n client.addHeader(\"Authorization\", \"Token token=\" + user.getToken().getAccess_token());\n client.get(LoginActivity.API_ROOT + \"events/\" + currEvent.getId() + \"/categories\",\n new BaseJsonHttpResponseHandler<Category[]>() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, String rawJsonResponse,\n Category[] response) {\n categories_lv = (ListView) findViewById(R.id.categories_lv);\n// categoriesArr = response;\n\n // Make the first Category as \"All\" so that all teams can be shown\n // All retrieved categories will be put after \"All\"\n categoriesArr = new Category[response.length + 1];\n categoriesArr[0] = new Category(0, currEvent.getId(), \"All\", null, 0, null,\n teamsArr);\n System.arraycopy(response, 0, categoriesArr, 1, response.length);\n\n categories_lv.setAdapter(new CategoryAdapter(SelectionActivity.this,\n categoriesArr));\n categories_lv.setOnItemClickListener(new CategoryClickListener());\n\n Log.d(\"GET CATEGORIES\", \"success\");\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable error,\n String rawJsonData, Category[] errorResponse) {\n Log.d(\"GET CATEGORIES\", \"failure\");\n }\n\n @Override\n protected Category[] parseResponse(String rawJsonData, boolean isFailure)\n throws Throwable {\n\n if (!isFailure) {\n // Need to extract array from the first/outer JSON object\n JSONArray teamsJSONArr = new JSONObject(rawJsonData)\n .getJSONArray(\"event_categories\");\n return new Gson().fromJson(teamsJSONArr.toString(), Category[].class);\n } else return null;\n }\n });\n }", "public List<Category> getMostUserCate() {\n\t\tString sql = \"SELECT c.id,c.name FROM MINHDUC.posts p, MINHDUC.categories c where p.categories_id = c.id\";\n\t\tList<Category> listCate = jdbcTemplateObject.query(sql,new CategoriesMostUsedMapper());\n\t\treturn listCate;\n\t}", "public static List<Category> findAll() {\n List<Category> categories = categoryFinder.findList();\n if(categories.isEmpty()){\n categories = new ArrayList<>();\n }\n return categories;\n }", "private void getAnimalCategory() {\n mProgressBar.setVisibility(View.VISIBLE);\n VolleyInvokeWebService volleyClient = new VolleyInvokeWebService(this, VolleyInvokeWebService.JSON_TYPE_REQUEST, this, Request.Method.GET);\n volleyClient.hitWithOutTokenService(Constants.GET_ANIMAL_CATEGORY, null, GET_ANIMAL_CATEGORY_TAG);\n }", "private boolean checkCaTegoryLegitness(int[] dice, int category) {\n\t\t// our boolean that is false at the beginning.\n\t\tboolean legitnessStatus = false;\n\t\t// we don't need to check anything for one to six or for check so\n\t\t// boolean\n\t\t// will be true. we don't need to check for one to six because if player\n\t\t// chose one to six we score++ every time we get that number\n\t\t// in the dice. and if there is no that number than the score\n\t\t// automatically will be 0.\n\t\tif (category >= 1 && category <= 6 || category == CHANCE) {\n\t\t\tlegitnessStatus = true;\n\t\t} else {\n\t\t\t// but if player chose something other than one to six or chance we\n\t\t\t// make 6 array lists.\n\t\t\tArrayList<Integer> ones = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> twos = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> threes = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> fours = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> fives = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> sixes = new ArrayList<Integer>();\n\t\t\t// after that we get ones, twos and etc. until six from the dice\n\t\t\t// numbers we randomly got and add that numbers in the array it\n\t\t\t// belongs. for example if the integer on first dice is 5 we add 1\n\t\t\t// in array list called fives. finally, arrays size will give us how\n\t\t\t// many that number we have in our dices.\n\t\t\tfor (int i = 0; i < N_DICE; i++) {\n\t\t\t\tif (dice[i] == 1) {\n\t\t\t\t\tones.add(1);\n\t\t\t\t} else if (dice[i] == 2) {\n\t\t\t\t\ttwos.add(1);\n\t\t\t\t} else if (dice[i] == 3) {\n\t\t\t\t\tthrees.add(1);\n\t\t\t\t} else if (dice[i] == 4) {\n\t\t\t\t\tfours.add(1);\n\t\t\t\t} else if (dice[i] == 5) {\n\t\t\t\t\tfives.add(1);\n\t\t\t\t} else if (dice[i] == 6) {\n\t\t\t\t\tsixes.add(1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// after we know how many ones, twos etc. we have its easy to check.\n\t\t\t// for THREE_OF_A_KIND if there is any of the arrays that size is\n\t\t\t// equal or more than 3 legitnessStatus should get true.\n\t\t\tif (category == THREE_OF_A_KIND) {\n\t\t\t\tif (ones.size() >= 3 || twos.size() >= 3 || threes.size() >= 3\n\t\t\t\t\t\t|| fours.size() >= 3 || fives.size() >= 3\n\t\t\t\t\t\t|| sixes.size() >= 3) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t}\n\t\t\t\t// for FOUR_OF_A_KIND if there is any of the arrays that size is\n\t\t\t\t// equal or more than 4 legitnessStatus should get true.\n\t\t\t} else if (category == FOUR_OF_A_KIND) {\n\t\t\t\tif (ones.size() >= 4 || twos.size() >= 4 || threes.size() >= 4\n\t\t\t\t\t\t|| fours.size() >= 4 || fives.size() >= 4\n\t\t\t\t\t\t|| sixes.size() >= 4) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t}\n\t\t\t\t// for FULL_HOUSE we want any of our array list size to be equal\n\t\t\t\t// to three and after that we have that we want one more array\n\t\t\t\t// to be\n\t\t\t\t// equal to two. that means that we will have three similar dice\n\t\t\t\t// and two more similar dice.\n\t\t\t} else if (category == FULL_HOUSE) {\n\t\t\t\tif (ones.size() == 3 || twos.size() == 3 || threes.size() == 3\n\t\t\t\t\t\t|| fours.size() == 3 || fives.size() == 3\n\t\t\t\t\t\t|| sixes.size() == 3) {\n\t\t\t\t\tif (ones.size() == 2 || twos.size() == 2\n\t\t\t\t\t\t\t|| threes.size() == 2 || fours.size() == 2\n\t\t\t\t\t\t\t|| fives.size() == 2 || sixes.size() == 2) {\n\t\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// there is only 3 way we can get SMALL_STRAIGHT. these are if\n\t\t\t\t// dices show: 1,2,3,4 or 2,3,4,5, or 3,4,5,6. for first one it\n\t\t\t\t// means we need our first array size to be one AND our second\n\t\t\t\t// array size to be one AND our third array size to be one AND\n\t\t\t\t// out fourth array list size to be one. and so on for other two\n\t\t\t\t// ways.\n\t\t\t} else if (category == SMALL_STRAIGHT) {\n\t\t\t\tif (ones.size() == 1 && twos.size() == 1 && threes.size() == 1\n\t\t\t\t\t\t&& fours.size() == 1) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t} else if (twos.size() == 1 && threes.size() == 1\n\t\t\t\t\t\t&& fours.size() == 1 && fives.size() == 1) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t} else if (threes.size() == 1 && fours.size() == 1\n\t\t\t\t\t\t&& fives.size() == 1 && sixes.size() == 1) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t}\n\t\t\t\t// for LARGE_STRAIGHT there is only 2 ways. these are:1,2,3,4,5\n\t\t\t\t// or 2,3,4,5,6. for first one it\n\t\t\t\t// means we need our first array size to be one AND our second\n\t\t\t\t// array size to be one AND our third array size to be one AND\n\t\t\t\t// out fourth array list size to be one AND our fifth array list\n\t\t\t\t// size to be one. similar for second way starting from second\n\t\t\t\t// array list and going through to last sixth array list.\n\t\t\t} else if (category == LARGE_STRAIGHT) {\n\t\t\t\tif (ones.size() == 1 && twos.size() == 1 && threes.size() == 1\n\t\t\t\t\t\t&& fours.size() == 1 && fives.size() == 1) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t} else if (twos.size() == 1 && threes.size() == 1\n\t\t\t\t\t\t&& fours.size() == 1 && fives.size() == 1\n\t\t\t\t\t\t&& sixes.size() == 1) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t}\n\t\t\t\t// and for YAHTZEE we want any of our array list size to be\n\t\t\t\t// five. it will mean that all dices show same thing. because if\n\t\t\t\t// for example array list ones size is five it means that we\n\t\t\t\t// added 1 in that array 5 times and it means that we see 5 same\n\t\t\t\t// number on all dices.\n\t\t\t} else if (category == YAHTZEE) {\n\t\t\t\tif (ones.size() == 5 || twos.size() == 5 || threes.size() == 5\n\t\t\t\t\t\t|| fours.size() == 5 || fives.size() == 5\n\t\t\t\t\t\t|| sixes.size() == 5) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// finally it will return boolean of true or false.\n\t\treturn legitnessStatus;\n\t}", "public static String[] randomizeHand(String[] arrayShuffle){\n String[] combine=new String[5];\n int k=-1;\n for(int i=0;i<5;i++){\n int j=(int)(Math.random()*52);\n if(j==k){continue;} // use if statements to avoid from picking up the same item twice\n else{combine[i]=arrayShuffle[j];k=j;\n }}\n return combine;}", "private ArrayList<ServerInfo> getRandomPeers(Set<ServerInfo> serverInfoSet) {\n if (serverInfoSet.size() < 5) {\n return new ArrayList<>(serverInfoSet);\n }\n\n // Shuffle the serverInfo list and add the first one to the targets list; Repeat for 5 times\n ArrayList<ServerInfo> targets = new ArrayList<>();\n ArrayList<ServerInfo> allPeers = new ArrayList<>(serverInfoSet);\n\n for (int i = 0; i < 5; i++) {\n Collections.shuffle(allPeers);\n targets.add(allPeers.remove(0));\n }\n\n return targets;\n }", "@Test\r\n\tpublic void catTest() {\r\n\t\tItem item = new Item();\r\n\t\ttry {\r\n\t\t\tString tempSet[] = item.getCats();\r\n\t\t\tassertNotSame(tempSet.length, 0);\r\n\t\t\tfor (int i = 0; i < tempSet.length; i++) { // check if categories are empty\r\n\t\t\t\tassertNotNull(tempSet[i]);\r\n\t\t\t\tassertNotSame(tempSet[i], \"\");\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tfail(\"Failed to execute the retrieval of the list of categories: SQLException\");\r\n\t\t}\r\n\t\t\r\n\t}", "public List<Categoria> listarCategorias(){\n //este metodo devuelve una lista.\n return categoriaRepo.findAll(); \n\n }", "public Collection<Suit> getGood5LengthSuits() {\r\n\t\tCollection<Suit> result = new ArrayList<Suit>();\r\n\t\tList<Suit> suitsOfLength5 = getSuitsWithCardCount(5);\r\n\t\tfor (Suit suit : suitsOfLength5) {\r\n\t\t\tList<Card> cardsInSuit = getSuitHi2Low(suit);\r\n\t\t\tif (isAtLeastAQJXX(cardsInSuit) || isAtLeastKQTXX(cardsInSuit)) {\r\n\t\t\t\tresult.add(suit);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "List<ConfigCategory> getCategoryOfTypeAndDisplayName(String typeConstant, String catDisplayName);", "@GetMapping(\"/categoriesfu\")\n public synchronized List<Category> getAllCategories() {\n log.debug(\"REST request to get a page of Categories\");\n //fu\n final String user =SecurityUtils.getCurrentUserLogin().get();\n final UserToRestaurant userToRestaurant=userToRestaurantRepository.findOneByUserLogin(user);\n final Restaurant restaurant=userToRestaurant.getRestaurant();\n return categoryRepository.findAllByRestaurant(restaurant);\n }", "public void generateRandomQuestions(){\r\n numberHolder = new ArrayList<>(NUMBER_OF_QUESTIONS);\r\n for (int i = 0; i < NUMBER_OF_QUESTIONS; i++)\r\n numberHolder.add(i);\r\n\r\n Collections.shuffle(numberHolder);\r\n System.out.println(numberHolder);\r\n\r\n }", "String getCategory();", "String getCategory();", "public static ArrayList selectCatalogCategory() {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n PreparedStatement ps2 = null;\n ResultSet rs = null;\n ResultSet rs2 = null;\n ArrayList<String> p = new ArrayList();\n int count = 0;\n\n String query = \"SELECT DISTINCT catalogCategory FROM Product \"\n + \" ORDER BY catalogCategory\";\n \n String query2 = \"SELECT DISTINCT catalogCategory FROM Product \"\n + \" ORDER BY catalogCategory\";\n \n try {\n ps = connection.prepareStatement(query);\n ps2 = connection.prepareStatement(query2);\n rs = ps.executeQuery();\n rs2 = ps2.executeQuery();\n \n while( rs2.next() ) {\n ++count;\n } \n ////////////For test purposes only //System.out.println(\"DBSetup @ line 363 \" + count); \n for ( int i = 0; i < count; i++ ) {\n if ( rs.next() ) {\n \n p.add(rs.getString(\"catalogCategory\"));\n System.out.println(\"DBSetup @ line 370 \" + p.get(i));\n }\n }\n System.out.println(p.size());\n return p;\n } catch (SQLException e) {\n System.out.println(e);\n return null;\n } finally {\n DBUtil.closeResultSet(rs);\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }", "public void getCategorory(){\n\t\tDynamicQuery dynamicQuery = DynamicQueryFactoryUtil.forClass(AssetCategory.class, \"category\", PortalClassLoaderUtil.getClassLoader());\n\t\ttry {\n\t\t\tList<AssetCategory> assetCategories = AssetCategoryLocalServiceUtil.dynamicQuery(dynamicQuery);\n\t\t\tfor(AssetCategory category : assetCategories){\n\t\t\t\tlog.info(category.getName());\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t}", "public List<ClassId> getThirdClasses() {\n\t\tList<ClassId> classes = new ArrayList<>();\r\n\r\n\t\t/*\r\n\t\t * classes.add(ClassId.EVAS_SAINT); classes.add(ClassId.SHILLIEN_TEMPLAR);\r\n\t\t * classes.add(ClassId.SPECTRAL_DANCER); classes.add(ClassId.GHOST_HUNTER);\r\n\t\t * \r\n\t\t * classes.add(ClassId.DREADNOUGHT); classes.add(ClassId.PHOENIX_KNIGHT);\r\n\t\t * classes.add(ClassId.HELL_KNIGHT);\r\n\t\t * \r\n\t\t * classes.add(ClassId.HIEROPHANT); classes.add(ClassId.EVAS_TEMPLAR);\r\n\t\t * classes.add(ClassId.SWORD_MUSE);\r\n\t\t * \r\n\t\t * classes.add(ClassId.DOOMCRYER); classes.add(ClassId.FORTUNE_SEEKER);\r\n\t\t * classes.add(ClassId.MAESTRO);\r\n\t\t */\r\n\r\n\t\t// classes.add(ClassId.ARCANA_LORD);\r\n\t\t// classes.add(ClassId.ELEMENTAL_MASTER);\r\n\t\t// classes.add(ClassId.SPECTRAL_MASTER);\r\n\t\t// classes.add(ClassId.SHILLIEN_SAINT);\r\n\r\n\t\tclasses.add(ClassId.SAGGITARIUS);\r\n\t\tclasses.add(ClassId.ARCHMAGE);\r\n\t\tclasses.add(ClassId.SOULTAKER);\r\n\t\tclasses.add(ClassId.MYSTIC_MUSE);\r\n\t\tclasses.add(ClassId.STORM_SCREAMER);\r\n\t\tclasses.add(ClassId.MOONLIGHT_SENTINEL);\r\n\t\tclasses.add(ClassId.GHOST_SENTINEL);\r\n\t\tclasses.add(ClassId.ADVENTURER);\r\n\t\tclasses.add(ClassId.WIND_RIDER);\r\n\t\tclasses.add(ClassId.DOMINATOR);\r\n\t\tclasses.add(ClassId.TITAN);\r\n\t\tclasses.add(ClassId.CARDINAL);\r\n\t\tclasses.add(ClassId.DUELIST);\r\n\r\n\t\tclasses.add(ClassId.GRAND_KHAVATARI);\r\n\r\n\t\treturn classes;\r\n\t}", "public void Shuffle() {\n int i = 0;\n while (i < 52) {\n int rando = (int) (5.0 * (Math.random()));\n Cards temp = deck[rando];\n deck[rando] = deck[i];\n deck[i] = temp;\n i++;\n }\n\n Arrays.stream(deck).forEach(c -> System.out.format(\"%s,\",c));\n }", "public static int getFoodValueRandomLimit() {\r\n\t\treturn 50;\r\n\t}", "public String[] getCategoryList(){\n return new String[]{\n \"Macros\",\n \"Instrument Type\",\n \"TOF_NSCD\",\n \"NEW_SNS\"\n };\n }", "private void genRandomMonsters() {\n int numMonsters;\n Random rand = new Random();\n numMonstersByType = new HashMap<>();\n\n //Randomly select the amount of monsters based on the type of room this is.\n if (contents.contains(roomContents.MONSTERS)) {\n numMonsters = rand.nextInt(5) + 4;\n } else {\n numMonsters = rand.nextInt(4);\n }\n\n //For each monster, randomly select a type\n for (int i = 0; i < numMonsters; i++) {\n int type = rand.nextInt(3) + 1;\n if (numMonstersByType.containsKey(type)) {\n numMonstersByType.put(type, numMonstersByType.get(type) + 1);\n } else {\n numMonstersByType.put(type, 1);\n }\n }\n }", "public static void loopCategories() throws IOException {\n //If all of the categories haven't been checked yet check the response at the current index (count).\n if (count < CATEGORY_ARRAY_SIZE) {\n //If that response if equal to TRUE (1).\n if (currentUser.getSingleCategory(count) == TRUE) {\n //Adjust the start index.\n startIndex = count * LOCATIONS_PER_CATEGORY;\n //Call the locaitons view.\n Main.FxmlLoader(LOCATIONS_PATH);\n }\n //Otherwise increment count and check the next index recursively.\n else {\n count++;\n loopCategories();\n }\n }\n }", "@GetMapping(\"/api/gamesessions\")\n public List<Presentation> getGameSessions() {\n GameSessionSettings settings = gameSessionSettingsDao.findDefaultSettings();\n List<Game> games = gameDao.findAll();\n Collections.shuffle(games);\n \n List<Presentation> presentationList = new ArrayList<>();\n Random random = new Random();\n // If no sessions are defined, generate session by selecting 10 random presentations from 10 random games\n// if(settings == null){\n// do{\n// // Get default_session_size worth of presentation from different games, unless less than that games are found in system\n// for(int i = 0; presentationList.size() < DEFAULT_SESSION_SIZE && i < games.size(); i++){\n// List<Presentation> p = games.get(i).getPresentations();\n// presentationList.add(p.get(random.nextInt(p.size())));\n// }\n// }\n// // Loop here just in case the system has less games than needed for these settings\n// while(!(presentationList.size() == DEFAULT_SESSION_SIZE));\n// return presentationList;\n// }\n \n // If settings are found, generate session based on those\n \n do {\n // Loop categories in session settings\n for(Category c : settings.getCategories()){\n boolean found = false;\n int i = 0;\n // Loop games until one is found which contains category\n do {\n if(games.get(i).getCategories().contains(c)){\n found = true;\n List<Presentation> p = games.get(i).getPresentations();\n presentationList.add(p.get(random.nextInt(p.size())));\n }\n i++;\n } while (!found && i < games.size());\n }\n // Loop here just in case the system has less games than needed for these settings\n } while (!(presentationList.size() == settings.getCategories().size()));\n return presentationList;\n }", "private ArrayList<Card> getDeckCards(){\n\t\t\t\tArrayList<Card> getdeck = new ArrayList<>();\r\n\t\t\t\t// deck = new ArrayList(52);\r\n\r\n\t\t\t\t// create cards in the deck (0-51)\r\n\t\t\t\tfor (int i = 0; i <= 10; i++) {\r\n\t\t\t\t\tgetdeck.add(new Card(i));\r\n\t\t\t\t}\r\n\t\t\t\t//Collections.shuffle(getdeck);\r\n\t\t\t\t// shuffle the cards\r\n\t\t\t\tfor (int i = 0; i <= getdeck.size()-1; i++) {\r\n\t\t\t\t\tint newindex = (int) (Math.random() * 51);\r\n\t\t\t\t\tCard temp = getdeck.get(i);\r\n\t\t\t\t\tgetdeck.set(i, getdeck.get(newindex));\r\n\t\t\t\t\tgetdeck.set(newindex, temp);\r\n\t\t\t\t}\r\n\t\t\t\t//TODO delete println\r\n\t\t\t\t// print shuffled deck\r\n\t\t\t\tfor (int i = 0; i <= getdeck.size()-1; i++) {\r\n\t\t\t\t\tSystem.out.println(getdeck.get(i).getCardNbr());\r\n\t\t\t\t}\r\n\t\t\t\treturn getdeck;\r\n\t}", "public static CourseCategory[] createCategoryResponse() {\n CourseCategory[] categories = new CourseCategory[1];\n categories[0] = new CourseCategory();\n categories[0].setCategory(\"Math\");\n CourseSubject[] subjects = new CourseSubject[2];\n subjects[0] = new CourseSubject(\"Addition\", \"Math/Addition\", 1);\n subjects[1] = new CourseSubject(\"Subtration\", \"Math/Subtration\", 2);\n categories[0].setCourseSubject(subjects);\n return categories;\n }", "private void loadCategories() {\n\t\tcategoryService.getAllCategories(new CustomResponseListener<Category[]>() {\n\t\t\t@Override\n\t\t\tpublic void onHeadersResponse(Map<String, String> headers) {\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onErrorResponse(VolleyError error) {\n\t\t\t\tLog.e(\"EditTeamProfileActivity\", \"Error while loading categories\", error);\n\t\t\t\tToast.makeText(EditTeamProfileActivity.this, \"Error while loading categories \" + error.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onResponse(Category[] response) {\n\t\t\t\tCollections.addAll(categories, response);\n\n\t\t\t\tif (null != categoryRecyclerAdapter) {\n\t\t\t\t\tcategoryRecyclerAdapter.setSelected(0);\n\t\t\t\t\tcategoryRecyclerAdapter.notifyDataSetChanged();\n\t\t\t\t}\n\n\t\t\t\tupdateSelectedCategory();\n\t\t\t}\n\t\t});\n\t}", "public static List<String> getAllCategoryName() {\n List<String> list = new ArrayList<>();\n List<Category> catList=getAllCategory();\n if(catList!=null && catList.size()>0) {\n for (Category category : catList)\n {\n list.add(category.getCategoryName());\n }\n }\n\n return list;\n\n }", "List<Categorie> findAll();", "private static void InitRandBag()\n {\n int k=(int)Math.floor(Math.random()*50);\n R[0]=k;\n\n //Generate the rest of the numbers\n for(int i=1;i<950;i++)\n {\n k=k+(int)Math.floor(Math.random()*50);\n R[i]=k;\n }\n\n //Shuffle the list\n for(int i=0;i<950;i++)\n {\n int temp = R[i];\n k = (int)Math.floor(Math.random()*950);\n R[i]=R[k];\n R[k]=temp;\n }\n }", "public int getItemCount()\n {\n return Math.min(cats.size(), 5);\n }", "public void setupRandomCards(ArrayList<String> cardSets)\n\t{\n\t\tArrayList<Card> unrandomized = new ArrayList<Card>();\n\t\tfor (String expansionName : cardSets)\n\t\t{\n\t\t\tswitch(expansionName)\n\t\t\t{\n\t\t\t\tcase(\"base\") :\n\t\t\t\t\tfor (Card card : cards.getBase())\n\t\t\t\t\t\tunrandomized.add(card);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault :\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (unrandomized.size() == 0)\n\t\t{\n\t\t\tLog.important(\"No sets were selected - adding base set\");\n\t\t\tfor (Card card : cards.getBase())\n\t\t\t\tunrandomized.add(card);\n\t\t}\n\t\tLog.important(\"Selecting 10 random cards from card set.\");\n\t\tint index;\n\t\tCard card;\n\t\tfor (int i = 0; i < 10; i++)\n\t\t{\n\t\t\tindex = random.nextInt(unrandomized.size());\n\t card = unrandomized.get(index);\n\t unrandomized.remove(index);\n\t gameCards.add(card);\n\t Log.log(\"Card selected: \" + card.getName());\n\t\t}\n\t\tLog.important(\"Done selecting cards.\");\n\t}", "public List<Cvcategory> findAllCvcategories();", "private void renderCategories(){\n int[] arr = {1, 3, 6, 8, 10};\r\n for (int i : arr) requestQueue.add(getDataFromServer(webURL, String.valueOf(i)));\r\n }", "public List<Category> getListCategory() {\n List<Category> list = new ArrayList<>();\n SQLiteDatabase sqLiteDatabase = dbHelper.getWritableDatabase();\n\n Cursor cursor = sqLiteDatabase.rawQuery(\"SELECT * FROM Category\", null);\n while (cursor.moveToNext()) {\n int id =cursor.getInt(0);\n\n Category category = new Category(id, cursor.getString(cursor.getColumnIndex(\"Name\")), cursor.getString(cursor.getColumnIndex(\"Image\")));\n Log.d(\"TAG\", \"getListCategory: \" + category.getId());\n list.add(category);\n }\n cursor.close();\n dbHelper.close();\n return list;\n }", "private void createShuffleAndAddCards() {\n //Creating all 108 cards and saving them into an arraylist\n ArrayList<Card> cards = new ArrayList<>();\n String[] colors = {\"red\", \"blue\", \"yellow\", \"green\"};\n for (String color : colors) {\n for (int i = 1; i < 10; i++) {\n for (int j = 0; j < 2; j++) {\n cards.add(new Card(\"Numeric\", color, i));\n }\n }\n cards.add(new Card(\"Numeric\", color, 0));\n for (int i = 0; i < 2; i++) {\n cards.add(new Card(\"Skip\", color, 20));\n cards.add(new Card(\"Draw2\", color, 20));\n cards.add(new Card(\"Reverse\", color, 20));\n }\n }\n for (int i = 0; i < 4; i++) {\n cards.add(new Card(\"WildDraw4\", \"none\", 50));\n cards.add(new Card(\"WildColorChanger\", \"none\", 50));\n }\n //shuffling cards and adding them into the storageCards main list\n Collections.shuffle(cards);\n for (Card card : cards) {\n storageCards.add(card);\n }\n cards.clear();\n }", "private int getRandomPiece() {\r\n return new Random().nextInt(Constants.NUM_PIECES);\r\n }", "public void randomGenre(View view) {\r\n String[] randomGenre = {\"Rock\", \"Funk\", \"Hip hop\", \"Country\", \"Pop\", \"Blues\", \"K-pop\", \"Punk\", \"House\", \"Soul\"};\r\n int index = (int) (Math.random() * 10);\r\n displayMessage(\"Your random genre is: \" + randomGenre[index]);\r\n }", "private void initialiseCategories() {\n\t\t_nzCategories = BashCmdUtil.bashCmdHasOutput(\"ls categories/nz\");\n\t\t_intCategories = BashCmdUtil.bashCmdHasOutput(\"ls categories/international\");\n\t}", "public static void populate() {\n for (int i = 1; i <= 15; i++) {\n B.add(i);\n Collections.shuffle(B);\n\n }\n for (int i = 16; i <= 30; i++) {\n I.add(i);\n Collections.shuffle(I);\n }\n for (int n = 31; n <= 45; n++) {\n N.add(n);\n Collections.shuffle(N);\n }\n for (int g = 46; g <= 60; g++) {\n G.add(g);\n Collections.shuffle(G);\n }\n for (int o = 61; o <= 75; o++) {\n O.add(o);\n Collections.shuffle(O);\n }\n\n for (int i = 1; i <= 75; i++) {\n roll.add(i); // adds the numbers in the check list\n }\n }", "@Test\n public void findDishesByCategoryName5() {\n\n String categoryName = \"Curry\";\n DishSearchCriteriaTo criteria = new DishSearchCriteriaTo();\n List<CategoryEto> categories = new ArrayList<>();\n\n criteria.setCategories(categories);\n criteria.setSearchBy(\"\");\n PageRequest pageable = PageRequest.of(0, 8, Sort.by(Direction.DESC, \"price\"));\n criteria.setPageable(pageable);\n\n Page<DishCto> result = this.dishmanagement.findDishesByCategory(criteria, categoryName);\n assertThat(result).isNotNull();\n assertThat(result.getContent().size()).isGreaterThan(0);\n\n }", "public Image getCardCroupier3() {\n Random rand9 = new Random();\r\n randomNum9 = rand9.nextInt((52 - 1) + 1) + 1;\r\n Image c3 = new Image(\"/Images/cards/Card\" + randomNum9 + \".png\");\r\n return c3;\r\n }", "public List<String> findAllCategories() {\r\n\t\tList<String> result = new ArrayList<>();\r\n\r\n\t\t// 1) get a Connection from the DataSource\r\n\t\tConnection con = DB.gInstance().getConnection();\r\n\r\n\t\ttry {\r\n\r\n\t\t\t// 2) create a PreparedStatement from a SQL string\r\n\t\t\tPreparedStatement ps = con.prepareStatement(GET_CATEGORIES_SQL);\r\n\r\n\t\t\t// 3) execute the SQL\r\n\t\t\tResultSet resultSet = ps.executeQuery();\r\n\t\t\twhile (resultSet.next()) {\r\n\r\n\t\t\t\tString cat = resultSet.getString(1);\r\n\t\t\t\tresult.add(cat);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException se) {\r\n\t\t\tse.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tDB.gInstance().returnConnection(con);\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}", "public Vector<String> getRandom(){\n\t\t\n\t\tAssert.pre(size()>0, \"data must be initialized\");\n\t\t\n\t\tint n = r.nextInt(size());\n\t\t\n\t\treturn get(n);\n\t}", "public List<CategoriaVO> mostrarCategorias() {\n\t\tJDBCTemplate mysql = MysqlConnection.getConnection();\n\t\ttry {\n\t\t\tmysql.connect();\n\t\t\tCategoriaDAO OwlDAO = new CategoriaDAO();\n\t\t\tList<CategoriaVO> resultado = new ArrayList();\n\t\t\tresultado = OwlDAO.obtenerCategorias(mysql);\n\t\t\treturn resultado;\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace(System.err);\n\t\t\treturn null;\n\n\t\t} finally {\n\t\t\tmysql.disconnect();\n\t\t}\n\t}", "public List<Category> getCategoriesForDate(final Day day) {\n List<Category> categories = new ArrayList<>();\n\n Category dayCategory = new Category();\n dayCategory.setName(DateUtil.formatDate(context, day.getDate(), DateUtil.DateFormat.DAY));\n List<Option> options = new ArrayList<>();\n Option deadline = new Option();\n\n deadline.setName(context.getString(R.string.deadline_bottom_sheet_title));\n deadline.setIcon(UtilCompat.getDrawable(context, R.drawable.ic_whatshot_black_24px));\n deadline.setListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n createNewNote(day.getDate(), Note.NoteType.DEADLINE);\n BottomSheetMenu.this.dismiss();\n }\n });\n\n options.add(deadline);\n\n Option exam = new Option();\n\n exam.setName(context.getString(R.string.exam_bottom_sheet_title));\n exam.setIcon(UtilCompat.getDrawable(context, R.drawable.ic_school_black_24px));\n exam.setListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n createNewNote(day.getDate(), Note.NoteType.EXAM);\n BottomSheetMenu.this.dismiss();\n }\n });\n\n options.add(exam);\n\n Option event = new Option();\n\n event.setName(context.getString(R.string.event_bottom_sheet_title));\n event.setIcon(UtilCompat.getDrawable(context, R.drawable.ic_event_available_black_24px));\n event.setListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n createNewNote(day.getDate(), Note.NoteType.EVENT);\n BottomSheetMenu.this.dismiss();\n }\n });\n\n options.add(event);\n\n Option note = new Option();\n\n note.setName(context.getString(R.string.note_bottom_sheet_title));\n note.setIcon(UtilCompat.getDrawable(context, R.drawable.ic_toc_black_24px));\n note.setListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n createNewNote(day.getDate(), Note.NoteType.NOTE);\n BottomSheetMenu.this.dismiss();\n }\n });\n\n options.add(note);\n\n dayCategory.setOptions(options);\n\n categories.add(dayCategory);\n\n return categories;\n }", "public Clue getRandomClue()\n {\n HashMap<String, Clue> usableClues = getUseableClues();\n ArrayList<Clue> list = new ArrayList<>(usableClues.values());\n int i = rand.nextInt(usableClues.size());\n return list.get(i);\n }", "public void populateDeck(){\n\n //Add everything to r\n for(int i=0;i<LUMBER;i++){\n deck.add(new ResourceCard(container, Resource.WOOD, cardStartPoint));\n }\n\n for(int i=0;i<WOOL;i++){\n deck.add(new ResourceCard(container, Resource.WOOL, cardStartPoint));\n }\n\n for(int i=0;i<GRAIN;i++){\n deck.add(new ResourceCard(container, Resource.WHEAT, cardStartPoint));\n }\n\n for(int i=0;i<BRICK;i++){\n deck.add(new ResourceCard(container, Resource.BRICKS, cardStartPoint));\n }\n\n for(int i=0;i<ORE;i++){\n deck.add(new ResourceCard(container, Resource.ORE, cardStartPoint));\n }\n //Collections.shuffle(deck);\n\n }", "public List<ProductCatagory> getAllCategory() throws BusinessException;", "private static void createPlayfulSet() {\n\n\t\trandomKeys = new ArrayList<>();\n\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT1);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT2);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT3);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT4);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT5);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT6);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT7);\n\t\trandomKeys.add(GuessRevealerConstants.END);\n\n\t\trandomCount = randomKeys.size();\n\n\t}", "private ArrayList<String> getRandQuestion() \n\t{\t\n\t\tquestionUsed = true;\n\t\t\n\t\tRandom randomizer = new Random();\n\t\tint randIdx = 0;\n\t\t\n\t\tif(questionsUsed.isEmpty())\n\t\t\trandIdx = randomizer.nextInt(allQuestions.size());\n\t\telse\n\t\t{\n\t\t\twhile(questionUsed)\n\t\t\t{\n\t\t\t\trandIdx = randomizer.nextInt(allQuestions.size());\n\t\t\t\tcheckIfQuestionUsed(randIdx);\n\t\t\t}\n\t\t}\n\t\t\n\t\tquestionsUsed.add(randIdx);\n\t\t\n\t\treturn allQuestions.get(randIdx);\n\t}", "public ArrayList<Player> genRecruits( int number ) {\n ArrayList<Player> PlayerList = new ArrayList<>();\n int basePrestige = 25;\n int randPrestige = 75;\n for (int i = 0; i < number/5; ++i) {\n Player genPG = genPlayer(1, basePrestige + (int)(Math.random()*randPrestige), 1);\n Player genSG = genPlayer(2, basePrestige + (int)(Math.random()*randPrestige), 1);\n Player genSF = genPlayer(3, basePrestige + (int)(Math.random()*randPrestige), 1);\n Player genPF = genPlayer(4, basePrestige + (int)(Math.random()*randPrestige), 1);\n Player genC = genPlayer(5, basePrestige + (int)(Math.random()*randPrestige), 1);\n PlayerList.add(genPG);\n PlayerList.add(genSG);\n PlayerList.add(genSF);\n PlayerList.add(genPF);\n PlayerList.add(genC);\n }\n \n return PlayerList;\n }" ]
[ "0.7409411", "0.69983673", "0.6918515", "0.60916406", "0.5612115", "0.555038", "0.54402226", "0.54267275", "0.5377354", "0.53699195", "0.53684336", "0.5339833", "0.5339027", "0.53254783", "0.53218246", "0.5301941", "0.5281753", "0.52616143", "0.5259891", "0.52438813", "0.52434427", "0.52329814", "0.51993334", "0.5195365", "0.5170506", "0.5163796", "0.51630855", "0.5162782", "0.5159723", "0.5156004", "0.5153444", "0.5140762", "0.51247907", "0.51200044", "0.5113859", "0.51025456", "0.51007456", "0.5082612", "0.5080242", "0.50735456", "0.50640446", "0.505481", "0.5048916", "0.5041803", "0.5023386", "0.5012546", "0.50105774", "0.5005228", "0.5003185", "0.5001078", "0.49996853", "0.49928084", "0.49859685", "0.498584", "0.49781007", "0.49731314", "0.4962799", "0.49615538", "0.49425447", "0.49407563", "0.49302968", "0.4917241", "0.4917241", "0.49109286", "0.49019063", "0.48871276", "0.48844984", "0.4883656", "0.4877802", "0.48723194", "0.48698768", "0.4868364", "0.48668525", "0.48651066", "0.4864327", "0.4852961", "0.48512903", "0.48512864", "0.48509052", "0.4842277", "0.4835877", "0.48344478", "0.48254398", "0.48226303", "0.48219228", "0.48212734", "0.4816576", "0.48061234", "0.48042142", "0.48042023", "0.48014048", "0.4800576", "0.47952357", "0.47868812", "0.47858512", "0.47813305", "0.47798815", "0.47795767", "0.47768494", "0.4770407" ]
0.77636725
0
Set five random clues for a given category
public void setFiveRandomClues (String category){ File file = new File("data/games_module", category); // writing 5 random clues to the category file chosen if file is empty if (file.length() == 0) { List<String> clues = new ArrayList<String>(); clues = _nzData.get(category); Collections.shuffle(clues); List<String> temp = new ArrayList<String>(); for (int i = 0; i<5;i++) { temp.add(clues.get(i)); BashCmdUtil.bashCmdNoOutput(String.format("echo \"%s\" >> data/games_module/\"%s\"",clues.get(i), category)); } _fiveRandomClues = temp; } else { try { Scanner myReader = new Scanner(file); List<String> temp= new ArrayList<String>(); while(myReader.hasNextLine()) { String fileLine = myReader.nextLine(); temp.add(fileLine); } _fiveRandomClues = new ArrayList<String>(temp); myReader.close(); } catch (FileNotFoundException e) { e.printStackTrace(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setFiveRandomCategories () {\n\t\t//create a file to store the selected five categories\n\t\tBashCmdUtil.bashCmdNoOutput(\"mkdir -p data\");\n\t\tFile five_random_categories = new File (\"data/five_random_categories\");\n\t\tif (!five_random_categories.exists()) {\n\t\t\tBashCmdUtil.bashCmdNoOutput(\"touch data/five_random_categories\");\n\t\t}\n\t\t// if five random categories dont exist, i.e. new game being started\n\t\tif (five_random_categories.length() == 0) {\n\t\t\tList<String> shuffledCategories = new ArrayList<String>(_nzCategories);\n\t\t\tCollections.shuffle(shuffledCategories);\n\t\t\tString str = \"\";\n\t\t\tfor (int i = 0; i < 5; i++) {\n\t\t\t\ttry {\n\t\t\t\t\t//create files that are used to store the clues of \n\t\t\t\t\t//the selected five categories\n\t\t\t\t\tFile dir = new File (\"data/games_module\");\n\t\t\t\t\tif (!dir.exists()) {\n\t\t\t\t\t\tdir.mkdir();\n\t\t\t\t\t}\n\t\t\t\t\tFile file = new File(dir,shuffledCategories.get(i));\n\t\t\t\t\tif (!file.exists()) {\n\t\t\t\t\t\tfile.createNewFile();\n\t\t\t\t\t}\t\t\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t_fiveRandomCategories.add(shuffledCategories.get(i));\n\t\t\t\tsetFiveRandomClues(shuffledCategories.get(i));\n\t\t\t\tstr = str + shuffledCategories.get(i) + \",\";\n\t\t\t\t_gamesData.put(shuffledCategories.get(i), _fiveRandomClues);\n\t\t\t}\n\t\t\tBashCmdUtil.bashCmdNoOutput(String.format(\"echo \\\"%s\\\" >> data/five_random_categories\",str));\n\t\t}\n\t\telse { // if files already exist, i.e. the game has already started\n\t\t\tBufferedReader reader;\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\treader = new BufferedReader(new FileReader(\"data/five_random_categories\"));\n\t\t\t\tString line = reader.readLine();\n\t\t\t\tstr = line;\n\t\t\t\treader.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tString[] splitStr = str.split(\",\");\n\t\t\tfor (int i = 0; i<5;i++) {\n\t\t\t\t_fiveRandomCategories.add(splitStr[i]);\n\t\t\t\tsetFiveRandomClues(splitStr[i]);\n\t\t\t\t_gamesData.put(splitStr[i], _fiveRandomClues);\n\t\t\t}\n\t\t}\n\t}", "public void randomizeCategory() {\n this.group = (int) (3*Math.random()+1);\n }", "private boolean checkCaTegoryLegitness(int[] dice, int category) {\n\t\t// our boolean that is false at the beginning.\n\t\tboolean legitnessStatus = false;\n\t\t// we don't need to check anything for one to six or for check so\n\t\t// boolean\n\t\t// will be true. we don't need to check for one to six because if player\n\t\t// chose one to six we score++ every time we get that number\n\t\t// in the dice. and if there is no that number than the score\n\t\t// automatically will be 0.\n\t\tif (category >= 1 && category <= 6 || category == CHANCE) {\n\t\t\tlegitnessStatus = true;\n\t\t} else {\n\t\t\t// but if player chose something other than one to six or chance we\n\t\t\t// make 6 array lists.\n\t\t\tArrayList<Integer> ones = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> twos = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> threes = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> fours = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> fives = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> sixes = new ArrayList<Integer>();\n\t\t\t// after that we get ones, twos and etc. until six from the dice\n\t\t\t// numbers we randomly got and add that numbers in the array it\n\t\t\t// belongs. for example if the integer on first dice is 5 we add 1\n\t\t\t// in array list called fives. finally, arrays size will give us how\n\t\t\t// many that number we have in our dices.\n\t\t\tfor (int i = 0; i < N_DICE; i++) {\n\t\t\t\tif (dice[i] == 1) {\n\t\t\t\t\tones.add(1);\n\t\t\t\t} else if (dice[i] == 2) {\n\t\t\t\t\ttwos.add(1);\n\t\t\t\t} else if (dice[i] == 3) {\n\t\t\t\t\tthrees.add(1);\n\t\t\t\t} else if (dice[i] == 4) {\n\t\t\t\t\tfours.add(1);\n\t\t\t\t} else if (dice[i] == 5) {\n\t\t\t\t\tfives.add(1);\n\t\t\t\t} else if (dice[i] == 6) {\n\t\t\t\t\tsixes.add(1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// after we know how many ones, twos etc. we have its easy to check.\n\t\t\t// for THREE_OF_A_KIND if there is any of the arrays that size is\n\t\t\t// equal or more than 3 legitnessStatus should get true.\n\t\t\tif (category == THREE_OF_A_KIND) {\n\t\t\t\tif (ones.size() >= 3 || twos.size() >= 3 || threes.size() >= 3\n\t\t\t\t\t\t|| fours.size() >= 3 || fives.size() >= 3\n\t\t\t\t\t\t|| sixes.size() >= 3) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t}\n\t\t\t\t// for FOUR_OF_A_KIND if there is any of the arrays that size is\n\t\t\t\t// equal or more than 4 legitnessStatus should get true.\n\t\t\t} else if (category == FOUR_OF_A_KIND) {\n\t\t\t\tif (ones.size() >= 4 || twos.size() >= 4 || threes.size() >= 4\n\t\t\t\t\t\t|| fours.size() >= 4 || fives.size() >= 4\n\t\t\t\t\t\t|| sixes.size() >= 4) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t}\n\t\t\t\t// for FULL_HOUSE we want any of our array list size to be equal\n\t\t\t\t// to three and after that we have that we want one more array\n\t\t\t\t// to be\n\t\t\t\t// equal to two. that means that we will have three similar dice\n\t\t\t\t// and two more similar dice.\n\t\t\t} else if (category == FULL_HOUSE) {\n\t\t\t\tif (ones.size() == 3 || twos.size() == 3 || threes.size() == 3\n\t\t\t\t\t\t|| fours.size() == 3 || fives.size() == 3\n\t\t\t\t\t\t|| sixes.size() == 3) {\n\t\t\t\t\tif (ones.size() == 2 || twos.size() == 2\n\t\t\t\t\t\t\t|| threes.size() == 2 || fours.size() == 2\n\t\t\t\t\t\t\t|| fives.size() == 2 || sixes.size() == 2) {\n\t\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// there is only 3 way we can get SMALL_STRAIGHT. these are if\n\t\t\t\t// dices show: 1,2,3,4 or 2,3,4,5, or 3,4,5,6. for first one it\n\t\t\t\t// means we need our first array size to be one AND our second\n\t\t\t\t// array size to be one AND our third array size to be one AND\n\t\t\t\t// out fourth array list size to be one. and so on for other two\n\t\t\t\t// ways.\n\t\t\t} else if (category == SMALL_STRAIGHT) {\n\t\t\t\tif (ones.size() == 1 && twos.size() == 1 && threes.size() == 1\n\t\t\t\t\t\t&& fours.size() == 1) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t} else if (twos.size() == 1 && threes.size() == 1\n\t\t\t\t\t\t&& fours.size() == 1 && fives.size() == 1) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t} else if (threes.size() == 1 && fours.size() == 1\n\t\t\t\t\t\t&& fives.size() == 1 && sixes.size() == 1) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t}\n\t\t\t\t// for LARGE_STRAIGHT there is only 2 ways. these are:1,2,3,4,5\n\t\t\t\t// or 2,3,4,5,6. for first one it\n\t\t\t\t// means we need our first array size to be one AND our second\n\t\t\t\t// array size to be one AND our third array size to be one AND\n\t\t\t\t// out fourth array list size to be one AND our fifth array list\n\t\t\t\t// size to be one. similar for second way starting from second\n\t\t\t\t// array list and going through to last sixth array list.\n\t\t\t} else if (category == LARGE_STRAIGHT) {\n\t\t\t\tif (ones.size() == 1 && twos.size() == 1 && threes.size() == 1\n\t\t\t\t\t\t&& fours.size() == 1 && fives.size() == 1) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t} else if (twos.size() == 1 && threes.size() == 1\n\t\t\t\t\t\t&& fours.size() == 1 && fives.size() == 1\n\t\t\t\t\t\t&& sixes.size() == 1) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t}\n\t\t\t\t// and for YAHTZEE we want any of our array list size to be\n\t\t\t\t// five. it will mean that all dices show same thing. because if\n\t\t\t\t// for example array list ones size is five it means that we\n\t\t\t\t// added 1 in that array 5 times and it means that we see 5 same\n\t\t\t\t// number on all dices.\n\t\t\t} else if (category == YAHTZEE) {\n\t\t\t\tif (ones.size() == 5 || twos.size() == 5 || threes.size() == 5\n\t\t\t\t\t\t|| fours.size() == 5 || fives.size() == 5\n\t\t\t\t\t\t|| sixes.size() == 5) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// finally it will return boolean of true or false.\n\t\treturn legitnessStatus;\n\t}", "public void setMultChoices() {\r\n Random randomGenerator = new Random();\r\n int howManyAnswer = randomGenerator.nextInt(6) + 1;\r\n for (int i = 0; i < howManyAnswer; i++) {\r\n int multipleAnswer = randomGenerator.nextInt(6);\r\n checkDuplicate(studentAnswer, multipleAnswer);\r\n\r\n }\r\n }", "public void randomizeColor() {\r\n\t\tArrayList<Integer> possibleColors = new ArrayList<Integer>();\r\n\t\tfor(int i = 1; i<=4; i++) {\r\n\t\t\tif(i!=colorType) { \r\n\t\t\t\tpossibleColors.add(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcolorType = possibleColors.get((int) (Math.random()*3));\r\n\t\t\r\n\t}", "public void initiateGame() {\n Collections.shuffle(players);\n Collections.shuffle(categories);\n for (Category c : categories) {\n c.shuffleChallenges();\n }\n }", "public void gamemodeSetUp(ArrayList<Player> players, int numberOfQuestions, Categories categories){\n for (int i = 0; i < numberOfQuestions; i++) {\n String categoriesToAsk = categories.getRandomCategory();\n Question questionToBeAsked;\n System.out.format(\"The category is %s\\n\", categoriesToAsk);\n switch (categoriesToAsk) {\n case \"Math\":\n if (categories.getMathArray().isEmpty()){\n categories.initializeTheArrayWithMathQuestions();\n }\n questionToBeAsked = this.setUpQuestion(categories.getMathArray());\n gamemodePlay(players, questionToBeAsked);\n break;\n case \"General Knowledge\":\n if (categories.getGeneralKnowledgeArray().isEmpty()){\n categories.initializeTheArrayWithGeneralKnowledgeQuestions();\n }\n questionToBeAsked = this.setUpQuestion(categories.getGeneralKnowledgeArray());\n gamemodePlay(players, questionToBeAsked);\n break;\n case \"Science\":\n if (categories.getScienceArray().isEmpty()){\n categories.initializeTheArrayWithScienceQuestions();\n }\n questionToBeAsked = this.setUpQuestion(categories.getScienceArray());\n gamemodePlay(players, questionToBeAsked);\n break;\n case \"Movies\":\n if (categories.getMoviesArray().isEmpty()){\n categories.initializeTheArrayWithMoviesQuestions();\n }\n questionToBeAsked = this.setUpQuestion(categories.getMoviesArray());\n gamemodePlay(players, questionToBeAsked);\n break;\n }\n }\n scoreSumUp(players);\n }", "private void chooseBreedToBeIdentified() {\n Random r = new Random();\n int questionBreedIndex = r.nextInt(3);\n\n questionCarMake = displayingCarMakes.get(questionBreedIndex);\n carMakeNameTitle.setText(questionCarMake);\n }", "public void loadRandomClue(String module, String category) {\n\t\tList<String> clues = new ArrayList<String>();\n\t\tif (module == \"nz\") {\n\t\t\tclues = _nzData.get(category);\n\t\t} else if (module == \"int\"){\n\t\t\tclues = _intData.get(category);\n\t\t}\n\t\tint size = clues.size();\n\t\tRandom rand = new Random();\n\t\tint randomIndex = rand.nextInt(size);\n\t\ttry {\n\t\t\t_currentClue = new Clue(clues.get(randomIndex));\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public List<String> getFiveRandomCategories () {\n\t\treturn _fiveRandomCategories;\n\t}", "public void randomize(){\r\n\t\tfor(int i = 0;i<this.myQuestions.size();i++){\r\n\t\t\tthis.myQuestions.get(i).randomize();\r\n\t\t}\r\n\t\tCollections.shuffle(this.myQuestions);\r\n\t}", "private void addRandomANewHopeOrHothCard(List<CardCollection.Item> result, int count) {\n List<String> possibleCards = new ArrayList<String>();\n possibleCards.addAll(_aNewHopeSetRarity.getAllCards());\n possibleCards.addAll(_hothSetRarity.getAllCards());\n filterNonExistingCards(possibleCards);\n Collections.shuffle(possibleCards, _random);\n addCards(result, possibleCards.subList(0, Math.min(possibleCards.size(), count)), false);\n }", "void mosaic(int seeds);", "private void setRandomColors() {\n for(int i = 0; i< noOfColumns; i++) {\n for (int j = 0; j< noOfRows; j++) {\n if(cards[i][j].getCardState() != CardState.MATCHED){\n int randomNumber = (int) (Math.random()*4);\n cards[i][j].setColor(colors[randomNumber]);\n }\n }\n }\n }", "void mosaic(int seed);", "private static void createPlayfulSet() {\n\n\t\trandomKeys = new ArrayList<>();\n\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT1);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT2);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT3);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT4);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT5);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT6);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT7);\n\t\trandomKeys.add(GuessRevealerConstants.END);\n\n\t\trandomCount = randomKeys.size();\n\n\t}", "public void colorearSecuencial() {\n\t\t// Collections.shuffle(nodos);\n\t\tcolorearSecuencialAlternativo();\n\t}", "public Clue getRandomClue()\n {\n HashMap<String, Clue> usableClues = getUseableClues();\n ArrayList<Clue> list = new ArrayList<>(usableClues.values());\n int i = rand.nextInt(usableClues.size());\n return list.get(i);\n }", "public static void Random() {\n\t\tRandom ran =new Random();\r\n\t\trandom=ran.nextInt(6)+1;\r\n\t\t//random=1;\r\n\t\twho=A1063307_GUI.who2;\r\n\t\tif((ch[who].status)>0) {\r\n\t\t\tch[who].location=(ch[who].location)+random;\r\n\t\t\tch[who].status=(ch[who].status)-1;\r\n\t\t\t\r\n\t\t}else {\r\n\t\t\t\treturn;\r\n\t\t\t}\t\t\r\n\t}", "public void shuffle () {\n this.lives = 6;\n this.attempts.clear();\n this.victory = false;\n this.lose = false;\n Random r = new Random ();\n this._word = _dictionary[r.nextInt(_dictionary.length)];\n // this._word = _dictionary[2]; // Testing purposes\n this.hint.setLength(0);\n for (int i = 0; i < _word.length(); i++) {\n this.hint.append(\"_ \");\n } \n }", "private void pickUtts() {\n for (int i = 0; i < CATEGORIES.length; i++)\n pickedUtts[i] = new Utterance[BUTTONS_PER_PAGE];\n // check all categories to be sure there's enough\n for (int i = 0; i < CATEGORIES.length; i++) {\n if(includedUtts.get(i).size() < BUTTONS_PER_PAGE)\n new Exception().printStackTrace();\n }\n // pick new utts\n Random ran = new Random();\n for (int i = 0; i < CATEGORIES.length; i++) {\n Utterance pick;\n for ( int j = 0; j < BUTTONS_PER_PAGE; j++ ) {\n do {\n pick = includedUtts.get(i).get(ran.nextInt(includedUtts.get(i).size()));\n } while (Arrays.asList(pickedUtts[i]).contains(pick));\n pickedUtts[i][j] = pick;\n }\n }\n }", "private void addRandomFoilCard(List<CardCollection.Item> result, int count) {\n List<String> possibleCards = new ArrayList<String>();\n\n // Very Rare foils\n for (int i=0; i<3; ++i) {\n possibleCards.add(\"9_94\"); // Fighters Coming In\n possibleCards.add(\"7_168\"); // Boelo\n possibleCards.add(\"106_11\"); // Chall Bekan\n possibleCards.add(\"8_94\"); // Commander Igar\n possibleCards.add(\"9_110\"); // Janus Greejatus\n possibleCards.add(\"9_118\"); // Myn Kyneugh\n possibleCards.add(\"9_120\"); // Sim Aloo\n possibleCards.add(\"4_116\"); // Bad Feeling Have I\n possibleCards.add(\"1_222\"); // Lateral Damage\n possibleCards.add(\"6_149\"); // Scum And Villainy\n possibleCards.add(\"7_241\"); // Sienar Fleet Systems\n possibleCards.add(\"101_6\"); // Vader's Obsession\n possibleCards.add(\"9_147\"); // Death Star II: Throne Room\n possibleCards.add(\"4_161\"); // Executor: Holotheatre\n possibleCards.add(\"4_163\"); // Executor: Meditation Chamber\n possibleCards.add(\"3_150\"); // Hoth: Wampa Cave\n possibleCards.add(\"2_147\"); // Kiffex (Dark)\n possibleCards.add(\"106_10\"); // Black Squadron TIE\n possibleCards.add(\"110_8\"); // IG-88 In IG-2000\n possibleCards.add(\"106_1\"); // Arleil Schous\n possibleCards.add(\"7_44\"); // Tawss Khaa\n possibleCards.add(\"5_23\"); // Frozen Assets\n possibleCards.add(\"7_62\"); // Goo Nee Tay\n possibleCards.add(\"1_55\"); // Mantellian Savrip\n possibleCards.add(\"4_30\"); // Order To Engage\n possibleCards.add(\"101_3\"); // Run Luke, Run!\n possibleCards.add(\"104_2\"); // Lone Rogue\n possibleCards.add(\"6_83\"); // Kiffex (Light)\n possibleCards.add(\"9_64\"); // Blue Squadron B-wing\n possibleCards.add(\"103_1\"); // Gold Leader In Gold 1\n possibleCards.add(\"9_73\"); // Green Squadron A-wing\n possibleCards.add(\"9_76\"); // Liberty\n possibleCards.add(\"103_2\"); // Red Leader In Red 1\n possibleCards.add(\"106_9\"); // Z-95 Headhunter\n }\n\n // Super Rare foils\n for (int i=0; i<2; ++i) {\n possibleCards.add(\"109_6\"); // 4-LOM With Concussion Rifle\n possibleCards.add(\"9_98\"); // Admiral Piett\n possibleCards.add(\"9_99\"); // Baron Soontir Fel\n possibleCards.add(\"110_5\"); // Bossk With Mortar Gun\n possibleCards.add(\"108_6\"); // Darth Vader With Lightsaber\n possibleCards.add(\"110_7\"); // Dengar With Blaster Carbine\n possibleCards.add(\"1_171\"); // Djas Puhr\n possibleCards.add(\"109_11\"); // IG-88 With Riot Gun\n possibleCards.add(\"110_9\"); // Jodo Kast\n possibleCards.add(\"9_117\"); // Moff Jerjerrod\n possibleCards.add(\"7_195\"); // Outer Rim Scout\n possibleCards.add(\"9_136\"); // Force Lightning\n possibleCards.add(\"3_138\"); // Trample\n possibleCards.add(\"104_7\"); // Walker Garrison\n possibleCards.add(\"2_143\"); // Death Star\n possibleCards.add(\"9_142\"); // Death Star II\n possibleCards.add(\"109_8\"); // Boba Fett In Slave I\n possibleCards.add(\"9_154\"); // Chimaera\n possibleCards.add(\"109_10\"); // Dengar In Punishing One\n possibleCards.add(\"106_13\"); // Dreadnaught-Class Heavy Cruiser\n possibleCards.add(\"9_157\"); // Flagship Executor\n possibleCards.add(\"9_172\"); // The Emperor's Shield\n possibleCards.add(\"9_173\"); // The Emperor's Sword\n possibleCards.add(\"110_12\"); // Zuckuss In Mist Hunter\n possibleCards.add(\"104_5\"); // Imperial Walker\n possibleCards.add(\"8_172\"); // Tempest Scout 1\n possibleCards.add(\"9_178\"); // Darth Vader's Lightsaber\n possibleCards.add(\"110_11\"); // Mara Jade's Lightsaber\n possibleCards.add(\"9_1\"); // Capital Support\n possibleCards.add(\"9_6\"); // Admiral Ackbar\n possibleCards.add(\"2_2\"); // Brainiac\n possibleCards.add(\"109_1\"); // Chewie With Blaster Rifle\n possibleCards.add(\"8_3\"); // Chief Chirpa\n possibleCards.add(\"9_13\"); // General Calrissian\n possibleCards.add(\"8_14\"); // General Crix Madine\n possibleCards.add(\"1_15\"); // Kal'Falnl C'ndros\n possibleCards.add(\"102_3\"); // Leia\n possibleCards.add(\"108_3\"); // Luke With Lightsaber\n possibleCards.add(\"7_32\"); // Melas\n possibleCards.add(\"8_23\"); // Orrimaarko\n possibleCards.add(\"110_3\"); // See-Threepio\n possibleCards.add(\"9_31\"); // Wedge Antilles, Red Squadron Leader\n possibleCards.add(\"8_32\"); // Wicket\n possibleCards.add(\"3_32\"); // Bacta Tank\n possibleCards.add(\"3_34\"); // Echo Base Operations\n possibleCards.add(\"1_52\"); // Kessel Run\n possibleCards.add(\"1_76\"); // Don't Get Cocky\n possibleCards.add(\"1_82\"); // Gift Of The Mentor\n possibleCards.add(\"5_69\"); // Smoke Screen\n possibleCards.add(\"1_138\"); // Yavin 4: Massassi Throne Room\n possibleCards.add(\"111_2\"); // Artoo-Detoo In Red 5\n possibleCards.add(\"9_65\"); // B-wing Attack Squadron\n possibleCards.add(\"9_68\"); // Gold Squadron 1\n possibleCards.add(\"106_4\"); // Gold Squadron Y-wing\n possibleCards.add(\"9_74\"); // Home One\n possibleCards.add(\"9_75\"); // Independence\n possibleCards.add(\"109_2\"); // Lando In Millennium Falcon\n possibleCards.add(\"9_81\"); // Red Squadron 1\n possibleCards.add(\"106_7\"); // Red Squadron X-wing\n possibleCards.add(\"7_150\"); // X-wing Assault Squadron\n possibleCards.add(\"104_3\"); // Rebel Snowspeeder\n possibleCards.add(\"9_90\"); // Luke's Lightsaber\n }\n\n // Ultra Rare foils\n for (int i=0; i<1; ++i) {\n possibleCards.add(\"9_109\"); // Emperor Palpatine\n possibleCards.add(\"9_113\"); // Lord Vader\n possibleCards.add(\"110_10\"); // Mara Jade, The Emperor's Hand\n possibleCards.add(\"9_24\"); // Luke Skywalker, Jedi Knight\n }\n\n filterNonExistingCards(possibleCards);\n Collections.shuffle(possibleCards, _random);\n addCards(result, possibleCards.subList(0, Math.min(possibleCards.size(), count)), true);\n }", "private void settingQuestion() {\n\n int[] setWord = {0, 0, 0, 0, 0};\n int[] setPos = {0, 0, 0, 0};\n int[] setBtn = {0, 0, 0, 0};\n\n Random ans = new Random();\n int wordNum = ans.nextInt(vocabularyLesson.size());\n //answer = vocabularyLesson.get(wordNum).getMean();\n word = vocabularyLesson.get(wordNum).getWord();\n vocabularyID = vocabularyLesson.get(wordNum).getId();\n answer = word;\n\n Practice practice = pc.getPracticeById(vocabularyID);\n if (practice != null) {\n Log.d(\"idVocabulary\", practice.getSentence());\n question.setText(practice.getSentence());\n }\n\n\n // Random position contain answer\n setWord[wordNum] = 1;\n Random p = new Random();\n int pos = p.nextInt(4);\n if (pos == 0) {\n word1.setText(word);\n setBtn[0] = 1;\n }\n if (pos == 1) {\n word2.setText(word);\n setBtn[1] = 1;\n }\n if (pos == 2) {\n word3.setText(word);\n setBtn[2] = 1;\n }\n if (pos == 3) {\n word4.setText(word);\n setBtn[3] = 1;\n }\n setPos[pos] = 1;\n\n // Random 3 position contain 3 answer\n for (int i = 0; i < 3; i++) {\n Random ques = new Random();\n int num = ques.nextInt(5);\n int p1 = ques.nextInt(4);\n while (setWord[num] == 1 || setPos[p1] == 1) {\n num = ques.nextInt(5);\n p1 = ques.nextInt(4);\n }\n String wordIncorrect = vocabularyLesson.get(num).getWord();\n setWord[num] = 1;\n setPos[p1] = 1;\n if (setBtn[p1] == 0 && p1 == 0) {\n word1.setText(wordIncorrect);\n setBtn[0] = 1;\n }\n if (setBtn[p1] == 0 && p1 == 1) {\n word2.setText(wordIncorrect);\n setBtn[1] = 1;\n }\n if (setBtn[p1] == 0 && p1 == 2) {\n word3.setText(wordIncorrect);\n setBtn[2] = 1;\n }\n if (setBtn[p1] == 0 && p1 == 3) {\n word4.setText(wordIncorrect);\n setBtn[3] = 1;\n }\n }\n\n }", "public int getRandomBreed() {\n Random r = new Random();\n// displayToast(Integer.toString(getRandomBreed())); // not needed. generates another random number\n return r.nextInt(6);\n }", "public void set_random_choice()\r\n\t{\r\n\t\tfor (int i=0 ; i<size ; i++)\r\n\t\t{\r\n\t\t\tnumbers.add(get_not_selected_random_digit());\r\n\t\t}\r\n\t}", "private void generateCandies(){\n\t\tfor (int i = 0; i < 16; i++){\n\t\t\tint coordX = ThreadLocalRandom.current().nextInt(0, 16);\n\t\t\tint coordY = ThreadLocalRandom.current().nextInt(0, 16);\n\t\t\tCandy candy = new Candy(coordX, coordY, i);\n\t\t\tcandies.put(i, candy);\n\t\t}\n\t}", "private void newQuestion(int number) {\n bakeImageView.setImageResource(list.get(number - 1).getImage());\n\n //decide which button to place the correct answer\n int correct_answer = r.nextInt(4) + 1;\n\n int firstButton = number - 1;\n int secondButton;\n int thirdButton;\n int fourthButton;\n\n switch (correct_answer) {\n case 1:\n answer1Button.setText(list.get(firstButton).getName());\n\n do {\n secondButton = r.nextInt(list.size());\n } while (secondButton == firstButton);\n do {\n thirdButton = r.nextInt(list.size());\n } while (thirdButton == firstButton || thirdButton == secondButton);\n do {\n fourthButton = r.nextInt(list.size());\n } while (fourthButton == firstButton || fourthButton == secondButton || fourthButton == thirdButton);\n\n answer2Button.setText(list.get(secondButton).getName());\n answer3Button.setText(list.get(thirdButton).getName());\n answer4Button.setText(list.get(fourthButton).getName());\n\n break;\n\n case 2:\n answer2Button.setText(list.get(firstButton).getName());\n\n do {\n secondButton = r.nextInt(list.size());\n } while (secondButton == firstButton);\n do {\n thirdButton = r.nextInt(list.size());\n } while (thirdButton == firstButton || thirdButton == secondButton);\n do {\n fourthButton = r.nextInt(list.size());\n } while (fourthButton == firstButton || fourthButton == secondButton || fourthButton == thirdButton);\n\n answer1Button.setText(list.get(secondButton).getName());\n answer3Button.setText(list.get(thirdButton).getName());\n answer4Button.setText(list.get(fourthButton).getName());\n\n break;\n\n case 3:\n answer3Button.setText(list.get(firstButton).getName());\n\n do {\n secondButton = r.nextInt(list.size());\n } while (secondButton == firstButton);\n do {\n thirdButton = r.nextInt(list.size());\n } while (thirdButton == firstButton || thirdButton == secondButton);\n do {\n fourthButton = r.nextInt(list.size());\n } while (fourthButton == firstButton || fourthButton == secondButton || fourthButton == thirdButton);\n\n answer2Button.setText(list.get(secondButton).getName());\n answer1Button.setText(list.get(thirdButton).getName());\n answer4Button.setText(list.get(fourthButton).getName());\n\n\n break;\n\n case 4:\n answer4Button.setText(list.get(firstButton).getName());\n\n do {\n secondButton = r.nextInt(list.size());\n } while (secondButton == firstButton);\n do {\n thirdButton = r.nextInt(list.size());\n } while (thirdButton == firstButton || thirdButton == secondButton);\n do {\n fourthButton = r.nextInt(list.size());\n } while (fourthButton == firstButton || fourthButton == secondButton || fourthButton == thirdButton);\n\n answer2Button.setText(list.get(secondButton).getName());\n answer3Button.setText(list.get(thirdButton).getName());\n answer1Button.setText(list.get(fourthButton).getName());\n\n break;\n }\n }", "public void setRandomItems(ArrayList<RandomItem> items);", "public void randomGenre(View view) {\r\n String[] randomGenre = {\"Rock\", \"Funk\", \"Hip hop\", \"Country\", \"Pop\", \"Blues\", \"K-pop\", \"Punk\", \"House\", \"Soul\"};\r\n int index = (int) (Math.random() * 10);\r\n displayMessage(\"Your random genre is: \" + randomGenre[index]);\r\n }", "public void setSingleChoices() {\r\n Random randomGenerator = new Random();\r\n int singleAnswer = randomGenerator.nextInt(4);\r\n studentAnswer.add(singleAnswer); }", "private void addRandomSpecialEditionCard(List<CardCollection.Item> result, int count) {\n List<String> possibleCards = new ArrayList<String>();\n possibleCards.addAll(_specialEditionSetRarity.getAllCards());\n filterNonExistingCards(possibleCards);\n Collections.shuffle(possibleCards, _random);\n addCards(result, possibleCards.subList(0, Math.min(possibleCards.size(), count)), false);\n }", "@Override\n public void onCategoryClicked(View itemView) {\n int position = mRecyclerView.getChildLayoutPosition(itemView);\n\n String mCategory = CategoryData.CATEGORY_LIST[position].toLowerCase();\n\n String mDifficulty = \"medium\";\n\n // select a random difficulty level\n Random random = new Random();\n switch(random.nextInt(3)) {\n case 0:\n mDifficulty = \"easy\";\n break;\n case 1:\n mDifficulty = \"medium\";\n break;\n case 2:\n mDifficulty = \"hard\";\n break;\n }\n\n // Select a random word from the assigned category and difficulty\n int resId = FileHelper.getStringIdentifier(getActivity(), mCategory + \"_\" + mDifficulty, \"raw\");\n mWord = FileHelper.selectRandomWord(getActivity(), resId);\n\n // set the edit text\n mEditText.setText(mWord);\n }", "private void addRandomPremiereCard(List<CardCollection.Item> result, int count) {\n List<String> possibleCards = new ArrayList<String>();\n possibleCards.addAll(_premiereSetRarity.getAllCards());\n filterNonExistingCards(possibleCards);\n Collections.shuffle(possibleCards, _random);\n addCards(result, possibleCards.subList(0, Math.min(possibleCards.size(), count)), false);\n }", "private void randomizePuzzle() {\n\t\t// Choose random puzzles, shuffle the options.\n\t\tthis.puzzle = BarrowsPuzzleData.PUZZLES[(int) (Math.random() * BarrowsPuzzleData.PUZZLES.length)];\n\t\tthis.shuffledOptions = shuffleIntArray(puzzle.getOptions());\n\t}", "static void fillWithRandomColors() {\n\n for ( int row = 0; row < ROWS; row++ ) {\n for ( int column = 0; column < COLUMNS; column++ ) {\n changeToRandomColor( row, column );\n }\n }\n }", "public void setRandomCombi(){\r\n Random rand = new Random();\r\n\r\n for (int i = 0; i < COMBI_LENGTH; i++){\r\n //Take a random Color, put length - 1 to avoid picking EMPTY color\r\n this.combi[i] = Colors.values()[rand.nextInt(Colors.values().length - 1)];\r\n }\r\n }", "private void setRandomSeedsToBricks() {\r\n RandomGenerator randomGenerator = new RandomGenerator();\r\n for (int i = 0; i < BRICKS_PER_ROW; i++) {\r\n// for (int j = randomGenerator.nextInt(0, BRICKS_PER_ROW - 1); j > 0; j--) {\r\n int randomCord = randomGenerator.nextInt(0, BRICKS_PER_ROW - 1);\r\n bricks[i][randomCord].setBrickColor(Color.BLACK);\r\n bricks[i][randomCord].setColor(Color.BLACK);\r\n// }\r\n }\r\n }", "private void setChanceCards()\n {\n m_chance.add(new Card(\"Advance to Go (Collect $200)\", 0, 1, 0));\n m_chance.add(new Card(\"Advance to Illinois Ave. If you pass Go, collect $200\", 0, 1, 24));\n m_chance.add(new Card(\"Income tax refund, Collect $20\", 20, 0));\n m_chance.add(new Card(\"Go directly to Jail. Do not pass Go, do not collect $200\", 0, 1, 30));\n m_chance.add(new Card(\"Advance token to Boardwalk\", 0, 1, 39));\n m_chance.add(new Card(\"Pay hospital fees of $100\", -100, 0));\n m_chance.add(new Card(\"Your building {and} loan matures, Collect $150\", 150, 0));\n m_chance.add(new Card(\"Pay poor tax of $15\", -15, 0));\n m_chance.add(new Card(\"Get out of Jail free card\", 0, 2));\n }", "public static void chaotic (int numbers){\n for (int n = 0 ; n < numbers ; n++){\r\n // to return a value from 0 up to, but not including 1 use the equation below\r\n int randNum = (int)(Math.random()*(5 - 1 + 1)) + 1;\r\n //use an if loop to find if the answer from the equation equals to 5 \r\n if (randNum == 5){\r\n // the computer will print out five asterisks\r\n System.out.println(\"*****\");\r\n }\r\n // if the random number equals to 4\r\n if (randNum == 4){\r\n // the computer will print out four asterisks\r\n System.out.println(\"****\");\r\n }\r\n // if the random number is equal to 3\r\n if (randNum == 3){\r\n // the computer will print out three asterisks\r\n System.out.println(\"***\");\r\n }\r\n // if the random number is equal to 2\r\n if (randNum == 2){\r\n // the computer will print out two asterisks\r\n System.out.println(\"**\");\r\n }\r\n // if the random number is equal to 1\r\n if (randNum == 1)\r\n // the computer will print out one asterisks\r\n System.out.println(\"*\");\r\n }\r\n }", "private void addRandomCloudCityCard(List<CardCollection.Item> result, int count) {\n List<String> possibleCards = new ArrayList<String>();\n possibleCards.addAll(_cloudCitySetRarity.getAllCards());\n filterNonExistingCards(possibleCards);\n Collections.shuffle(possibleCards, _random);\n addCards(result, possibleCards.subList(0, Math.min(possibleCards.size(), count)), false);\n }", "private int getRandomPiece() {\r\n return new Random().nextInt(Constants.NUM_PIECES);\r\n }", "public void addRandomKids(OperatorFactory o, TerminalFactory t,\r\n int maxDepth, Random rand) {}", "static void changeToRandomColor( int rowNum, int colNum ) {\n int red = ( int )( Math.random() * 256 );\n int green = ( int )( Math.random() * 256 );\n int blue = ( int )( Math.random() * 256 );\n Mosaic.setColor( rowNum, colNum, red, green, blue );\n\n }", "void permutateObjects()\n {\n for (int i = 0; i < sampleObjects.length; i++)\n {\n for (int i1 = 0; i1 < (r.nextInt() % 7); i1++)\n {\n addToObject(sampleObjects[i], sampleStrings[r.nextInt(5)],\n sampleStrings[r.nextInt(5)]);\n addToObject(sampleObjects[i], sampleStrings[r.nextInt(5)],\n sampleNumbers[r.nextInt(5)]);\n addToObject(sampleObjects[i], sampleStrings[r.nextInt(5)],\n specialValues[r.nextInt(2)]);\n addToObject(sampleObjects[i], sampleStrings[r.nextInt(5)],\n sampleArrays[r.nextInt(5)]);\n }\n }\n }", "private static void InitRandBag()\n {\n int k=(int)Math.floor(Math.random()*50);\n R[0]=k;\n\n //Generate the rest of the numbers\n for(int i=1;i<950;i++)\n {\n k=k+(int)Math.floor(Math.random()*50);\n R[i]=k;\n }\n\n //Shuffle the list\n for(int i=0;i<950;i++)\n {\n int temp = R[i];\n k = (int)Math.floor(Math.random()*950);\n R[i]=R[k];\n R[k]=temp;\n }\n }", "private Color randomColor()\r\n {\r\n \tint randomNum = random.nextInt(5);\r\n \t\r\n \tif (randomNum == RED)\r\n \t\treturn Color.RED;\r\n \telse if (randomNum == GREEN)\r\n \t\treturn Color.GREEN;\r\n \telse if (randomNum == BLUE)\r\n \t\treturn Color.BLUE;\r\n \telse if (randomNum == BLACK)\r\n \t\treturn Color.BLACK;\r\n \telse \r\n \t\treturn Color.CYAN;\r\n \t\r\n\t\t\r\n }", "static void addNewPieces() {\n ArrayList<Block> news = new ArrayList<>();\n news.add(new Block(new int[]{2, 3}, Tetrominos.I));\n news.add(new Block(new int[]{2, 3}, Tetrominos.J));\n news.add(new Block(new int[]{2, 3}, Tetrominos.L));\n news.add(new Block(new int[]{2, 3}, Tetrominos.O));\n news.add(new Block(new int[]{2, 3}, Tetrominos.S));\n news.add(new Block(new int[]{2, 3}, Tetrominos.T));\n news.add(new Block(new int[]{2, 3}, Tetrominos.Z));\n\n\n Collections.shuffle(news);\n newPiece.addAll(news);\n }", "public void generateRandomQuestions(){\r\n numberHolder = new ArrayList<>(NUMBER_OF_QUESTIONS);\r\n for (int i = 0; i < NUMBER_OF_QUESTIONS; i++)\r\n numberHolder.add(i);\r\n\r\n Collections.shuffle(numberHolder);\r\n System.out.println(numberHolder);\r\n\r\n }", "public void randomize() {\r\n\t\tRandom random = new Random();// random generator used to get random int\r\n\t\tint r;// will hold the random int\r\n\t\tint num;// will hold the filtered random int that determines with entity to use for a tile\r\n\t\tfor (int i = 0; i < WIDTH_TILES; i++) {// loops x-coords\r\n\t\t\tfor (int j = 0; j < HEIGHT_TILES; j++) {// loops y-coords\r\n\t\t\t\tr = random.nextInt(32);// gets random int from 0 to 32\r\n\t\t\t\tif (r < 4) num = 0; else if (r < 8) num = 1; else if (r < 31) num = 2; else num = 3;// distributes different objects\r\n\t\t\t\tif (nodes[i * WIDTH_TILES + j].isOccupied() == false) {// if tile empty or random chosen\r\n\t\t\t\t\tnodes[i * WIDTH_TILES + j] = new Node(new Point(i * BOARD_WIDTH / WIDTH_TILES, j * BOARD_WIDTH / HEIGHT_TILES), new ImageIcon(icons[num]).getImage(), true, occupants[num]);// creates random tile\r\n\t\t\t\t}// if (random)\r\n\t\t\t}// for (j)\r\n\t\t}// for (i)\r\n\t}", "@Override\n protected void dropFewItems(boolean hit, int looting) {\n super.dropFewItems(hit, looting);\n if (hit && (this.rand.nextInt(3) == 0 || this.rand.nextInt(1 + looting) > 0)) {\n Item drop = null;\n switch (this.rand.nextInt(5)) {\n case 0:\n drop = Items.gunpowder;\n break;\n case 1:\n drop = Items.sugar;\n break;\n case 2:\n drop = Items.spider_eye;\n break;\n case 3:\n drop = Items.fermented_spider_eye;\n break;\n case 4:\n drop = Items.speckled_melon;\n break;\n }\n if (drop != null) {\n this.dropItem(drop, 1);\n }\n }\n }", "void setQuestion(){\n int numberRange = currentLevel * 3;\n Random randInt = new Random();\n\n int partA = randInt.nextInt(numberRange);\n partA++;//not zero\n\n int partB = randInt.nextInt(numberRange);\n partB++;//not zero\n\n correctAnswer = partA * partB;\n int wrongAnswer1 = correctAnswer-2;\n int wrongAnswer2 = correctAnswer+2;\n\n textObjectPartA.setText(\"\"+partA);\n textObjectPartB.setText(\"\"+partB);\n\n //set the multi choice buttons\n //A number between 0 and 2\n int buttonLayout = randInt.nextInt(3);\n switch (buttonLayout){\n case 0:\n buttonObjectChoice1.setText(\"\"+correctAnswer);\n buttonObjectChoice2.setText(\"\"+wrongAnswer1);\n buttonObjectChoice3.setText(\"\"+wrongAnswer2);\n break;\n\n case 1:\n buttonObjectChoice2.setText(\"\"+correctAnswer);\n buttonObjectChoice3.setText(\"\"+wrongAnswer1);\n buttonObjectChoice1.setText(\"\"+wrongAnswer2);\n break;\n\n case 2:\n buttonObjectChoice3.setText(\"\"+correctAnswer);\n buttonObjectChoice1.setText(\"\"+wrongAnswer1);\n buttonObjectChoice2.setText(\"\"+wrongAnswer2);\n break;\n }\n }", "private void fillRandomList()\n\t{\n\t\trandomList.add(\"I like cheese.\");\n\t\trandomList.add(\"Tortoise can move faster than slow rodent.\");\n\t\trandomList.add(\"I enjoy sitting on the ground.\");\n\t\trandomList.add(\"I like cereal.\");\n\t\trandomList.add(\"This is random.\");\n\t\trandomList.add(\"I like typing\");\n\t\trandomList.add(\"FLdlsjejf is my favorite word.\");\n\t\trandomList.add(\"I have two left toes.\");\n\t\trandomList.add(\"Sqrt(2) = 1.414213562 ...\");\n\t\trandomList.add(\"Hi mom.\");\n\t}", "public void randomize()\n {\n for (int i=0; i<list.length; i++)\n list[i] = (int)(Math.random() * 100) + 1;\n }", "public void setupRandomCards(ArrayList<String> cardSets)\n\t{\n\t\tArrayList<Card> unrandomized = new ArrayList<Card>();\n\t\tfor (String expansionName : cardSets)\n\t\t{\n\t\t\tswitch(expansionName)\n\t\t\t{\n\t\t\t\tcase(\"base\") :\n\t\t\t\t\tfor (Card card : cards.getBase())\n\t\t\t\t\t\tunrandomized.add(card);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault :\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (unrandomized.size() == 0)\n\t\t{\n\t\t\tLog.important(\"No sets were selected - adding base set\");\n\t\t\tfor (Card card : cards.getBase())\n\t\t\t\tunrandomized.add(card);\n\t\t}\n\t\tLog.important(\"Selecting 10 random cards from card set.\");\n\t\tint index;\n\t\tCard card;\n\t\tfor (int i = 0; i < 10; i++)\n\t\t{\n\t\t\tindex = random.nextInt(unrandomized.size());\n\t card = unrandomized.get(index);\n\t unrandomized.remove(index);\n\t gameCards.add(card);\n\t Log.log(\"Card selected: \" + card.getName());\n\t\t}\n\t\tLog.important(\"Done selecting cards.\");\n\t}", "public static void chaotic(int parameter) {\n for (int i = 0; i < parameter; i++) {\r\n // the randomizers output is limited from 1 to 5\r\n int randNumb = (int) (Math.random() * (5)) + 1;\r\n\r\n // this loop prints the astrix's out while limiting the amount to output from the randomizer\r\n for (int x = 0; x < randNumb; x++) {\r\n System.out.print(\"*\");\r\n }\r\n // creates a new line for the next line of astrix's\r\n System.out.println();\r\n }\r\n }", "void setRandomNumbersUp() {\n\t\tInteger[] numbers = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};\n\t\tInteger[] numbers2 = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};\n\t\tList<Integer> numsList = Arrays.asList(numbers);\n\t\tCollections.shuffle(numsList);\n\t\tList<Integer> numsList2 = Arrays.asList(numbers2);\n\t\tCollections.shuffle(numsList2);\n\t\tList<Integer> combinedList = Stream.of(numsList, numsList2).flatMap(Collection::stream).collect(Collectors.toList());\n\t\t\n\t\t\n\t\tint counter = 0;\n\t\tfor (Node node : SquaresBoard.getChildren()) {\n\t\t\n\t\t\tif (node instanceof Label) {\n\t\t\t\t((Label) node).setText(combinedList.get(counter).toString());\n\t\t\t}\n\t\t\tcounter++;\n\t\t}\n\t\t\n\t}", "public Test makeTest(DataSource ds, List<Question> givenQns){\n\t\tArrayList<Question> startQns = new ArrayList<Question>();\n\t\tfor (int i = 0; i < givenQns.size(); i++){\n\t\t\tstartQns.add((Question)givenQns.get(i));\n\t\t}\n\t\tString category = startQns.get(0).getCategory();\n\t\tString difficulty = \"any\";\n\t\t\n\t\twhile(startQns.size()>5){\n\t\t\tint index = (int)(Math.random()*startQns.size());\n\t\t\tstartQns.remove(index);\n\t\t}\n\t\tTest test = this.makeTest(ds, difficulty, category, 5, startQns);\n//\t\tSystem.out.println(\"TestMakerA->test: \" + test.toString());\n\t\tint[] correct = new int[5];\n\t\tArrayList<Question[]> questions = (ArrayList<Question[]>)test.getTest();\n\n\t\tfor(int i = 0; i < 5; i++){\n\t\t\tcorrect[i] = (int)(Math.random()*4);\n\t\t\tif(questions.get(i)[correct[i]] != startQns.get(i)){\n\t\t\t\tquestions.get(i)[correct[i]] = startQns.get(i);\n\t\t\t}\n\t\t}\n\n\t\ttest.setCorrect(correct);\n\t\treturn test;\n\t}", "public void randSelectCenters(int k) {\r\n\t\tif (pointList == null || pointList.isEmpty())\r\n\t\t\treturn;\r\n\r\n\t\tList<Integer> range = IntStream.range(0, pointList.size()).boxed().collect(Collectors.toList());\r\n\t\tCollections.shuffle(range);\r\n\t\tfor (int cid : range.stream().limit(k).collect(Collectors.toList()))\r\n\t\t\tcenterList.add(pointList.get(cid));\r\n\t}", "private void initCultistCardDeck(){\n unusedCultist = new ArrayList<Cultist>();\n \n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 1));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 2));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 1));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 2));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 1));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 1));\n \n Collections.shuffle(unusedCultist);\n }", "public void addRandoms() {\n //Add random boulders on tiles that aren't Lava\n int tileNumber;\n int selector;\n Tile t;\n String tileTexture;\n Random random = new Random();\n SquareVector playerPos = getPlayerEntity().getPosition();\n int tileCount = GameManager.get().getWorld().getTiles().size();\n AbstractWorld world = GameManager.get().getWorld();\n int randIndex;\n\n for (int i = 0; i < 20; i++) {\n //Get respective volcano tile (5 <= Lava tiles Index <= 8\n do {\n randIndex = random.nextInt(tileCount);\n t = world.getTile(randIndex);\n } while (t.getCoordinates().isCloseEnoughToBeTheSame(playerPos));\n\n tileTexture = t.getTextureName();\n tileNumber = Integer.parseInt(tileTexture.split(\"_\")[1]);\n\n selector = random.nextInt(2);\n if (tileNumber < 5 && tileNumber > 1 && selector == 1 && !t.hasParent()) {\n entities.add(new Rock(t, true));\n } else if (t != null && (tileNumber == 3 || tileNumber == 4) &&\n selector == 0 && !t.hasParent()) {\n entities.add(new VolcanoBurningTree(t, true));\n } else {\n i--;\n }\n }\n }", "@Override\n protected void dropFewItems(boolean hit, int looting) {\n super.dropFewItems(hit, looting);\n for (int i = this.rand.nextInt(2 + looting); i-- > 0;) {\n this.dropItem(Items.ender_pearl, 1);\n }\n }", "public void changeCategory(int index){\n if(user[index].getAmountCategory()>=3 && user[index].getAmountCategory()<=10){\n user[index].setCategoryUser(user[index].newCategory(\"littleContributor\"));\n }\n else if(user[index].getAmountCategory()>10 && user[index].getAmountCategory()<30){\n user[index].setCategoryUser(user[index].newCategory(\"mildContributor\"));\n }\n else if(user[index].getAmountCategory() == 30){\n user[index].setCategoryUser(user[index].newCategory(\"starContributor\"));\n }\n }", "public ChipSet(int numChips) {\n\t\tthis.numChips = numChips;\n\t\tchips = new ArrayList<CtColor>();\n\t\tgenerateRandomChips();\n\t}", "public void populateDeck(){\n\n //Add everything to r\n for(int i=0;i<LUMBER;i++){\n deck.add(new ResourceCard(container, Resource.WOOD, cardStartPoint));\n }\n\n for(int i=0;i<WOOL;i++){\n deck.add(new ResourceCard(container, Resource.WOOL, cardStartPoint));\n }\n\n for(int i=0;i<GRAIN;i++){\n deck.add(new ResourceCard(container, Resource.WHEAT, cardStartPoint));\n }\n\n for(int i=0;i<BRICK;i++){\n deck.add(new ResourceCard(container, Resource.BRICKS, cardStartPoint));\n }\n\n for(int i=0;i<ORE;i++){\n deck.add(new ResourceCard(container, Resource.ORE, cardStartPoint));\n }\n //Collections.shuffle(deck);\n\n }", "public void random(){\r\n\t\tRandom rand = new Random();\r\n\t\trandArray = new int[6];\r\n\t\tfor (int i = 0; i < 6; i++){\r\n\t\t\t//Randomly generated number from zero to nine\r\n\t\t\trandom = rand.nextInt(10);\r\n\t\t\t//Random values stored into the array\r\n\t\t\trandArray[i] = random;\r\n\t\t\tif(i == 0){\r\n\t\t\t\ta = random;\r\n\t\t\t}\r\n\t\t\tif(i == 1){\r\n\t\t\t\tb = random;\r\n\t\t\t}\r\n\t\t\tif(i == 2){\r\n\t\t\t\tc = random;\r\n\t\t\t}\r\n\t\t\tif(i == 3){\r\n\t\t\t\td = random;\r\n\t\t\t}\r\n\t\t\tif(i == 4){\r\n\t\t\t\tf = random;\r\n\t\t\t}\r\n\t\t\tif(i == 5){\r\n\t\t\t\tg = random;\r\n\t\t\t}\r\n\t\t\t//Random values outputted\r\n\t\t\t//Prints out if the hint was not used.\r\n\t\t\tif (executed == false || guessed == true ){\r\n\t\t\t\tprint(randArray[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Prints out if the hint was not used.\r\n\t\tif (executed == false || guessed == true){\r\n\t\t\tprintln(\" Randomly Generated Value\");\r\n\t\t}\r\n\t}", "public void setIdQuestion(int idT) {\r\n idQuestion=rand(idT);\r\n }", "public void populateGrid() {\n for (int i=0; i<5; i++) {\n int chance = (int) random(10);\n if (chance <= 3) {\n int hh = ((int) random(50) + 1) * pixelSize;\n int ww = ((int) random(30) + 1) * pixelSize;\n\n int x = ((int) random(((width/2)/pixelSize))) * pixelSize + width/4;\n int y = ((int) random((height-topHeight)/pixelSize)) * pixelSize + topHeight;\n\n new Wall(w/2, 190, hh, ww).render();\n }\n }\n\n int fewestNumberOfPowerUps = 3;\n int greatesNumberOfPowerUps = 6;\n int wSize = 2;\n int hSize = 2;\n\n powerUps = new ArrayList <PowerUp> ();\n createPowerUps (fewestNumberOfPowerUps, greatesNumberOfPowerUps, wSize, hSize);\n}", "public void shuffleClick(View view) {\n int tileCount = this.imageLayout.getChildCount();\n if (tileCount < 2) {\n return;\n }\n // for several loops\n for (int cnt=0; cnt < 20; cnt++)\n {\n // select a tile randomly\n int idx = random.nextInt(tileCount);\n View tile = this.imageLayout.getChildAt(idx);\n this.imageLayout.removeViewAt(idx);\n this.imageLayout.addView(tile);\n }\n }", "public void randomlySetAllQR() {\n\t\tfor (int q = -3; q <=3; q++) {\r\n\t\t\tfor (int r = -3; r <=3; r++) {\r\n\t\t\t\tsetHexFromQR(q,r, new HexModel(HexModel.TileType.DesertTile));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tint range = 6;\r\n\t\tint min = 1;\r\n for (int i = 0; i < 6; i++) { \r\n int rand = (int)(Math.random() * range) + min; \r\n \r\n //Output is different everytime this code is executed \r\n System.out.println(rand); \r\n int randomNu = 8;\r\n String color;\r\n switch (color) {\r\n case 1: color = \"o\";\r\n break;\r\n case 2: monthString = \"February\";\r\n break;\r\n case 3: monthString = \"March\";\r\n break;\r\n\r\n\t}\r\n\r\n\t}\r\n}", "private void random() {\n\n\t}", "public void setTFChoices() {\r\n Random randomGenerator = new Random();\r\n int trueFalseAnswer = randomGenerator.nextInt(2);\r\n studentAnswer.add(trueFalseAnswer);\r\n }", "private void chooseRandomTweet() {\n if (random.nextBoolean()) {\n realTweet = true;\n displayRandomTrumpTweet();\n } else {\n realTweet = false;\n displayRandomFakeTweet();\n }\n }", "public static void generateQuizz(int size)\n {\n nb1 = new int[size];\n nb2 = new int[size];\n answer = new int[size];\n for(int i = 0; i<size; i++)\n {\n nb1[i] = (int)(Math.random()*50+1);\n nb2[i] = (int)(Math.random()*50+1);\n answer[i] = 0;\n }\n \n }", "private void generarColor() {\r\n\t\tthis.color = COLORES[(int) (Math.random() * COLORES.length)];\r\n\t}", "public void offerRandomCoupon(Customer c)\r\n {\r\n Random random = new Random();\r\n int couponPercent = random.nextInt(15) + 10;\r\n c.setCoupon(couponPercent);\r\n c.setPersonalHistory(\"Offered Coupon worth \" + couponPercent + \"%\");\r\n }", "public static void populate() {\n for (int i = 1; i <= 15; i++) {\n B.add(i);\n Collections.shuffle(B);\n\n }\n for (int i = 16; i <= 30; i++) {\n I.add(i);\n Collections.shuffle(I);\n }\n for (int n = 31; n <= 45; n++) {\n N.add(n);\n Collections.shuffle(N);\n }\n for (int g = 46; g <= 60; g++) {\n G.add(g);\n Collections.shuffle(G);\n }\n for (int o = 61; o <= 75; o++) {\n O.add(o);\n Collections.shuffle(O);\n }\n\n for (int i = 1; i <= 75; i++) {\n roll.add(i); // adds the numbers in the check list\n }\n }", "private ArrayList<ServerInfo> getRandomPeers(Set<ServerInfo> serverInfoSet) {\n if (serverInfoSet.size() < 5) {\n return new ArrayList<>(serverInfoSet);\n }\n\n // Shuffle the serverInfo list and add the first one to the targets list; Repeat for 5 times\n ArrayList<ServerInfo> targets = new ArrayList<>();\n ArrayList<ServerInfo> allPeers = new ArrayList<>(serverInfoSet);\n\n for (int i = 0; i < 5; i++) {\n Collections.shuffle(allPeers);\n targets.add(allPeers.remove(0));\n }\n\n return targets;\n }", "public void makeRandColor(){}", "public void randomize() {\r\n\t\tif(randomizzatoreVariazione > 0.5)\r\n\t\t\tandamentoCurva.setVariazione(\r\n\t\t\t\t\tandamentoCurva.getVariazione() * randomizzatoreVariazione\r\n\t\t\t\t\t+ andamentoCurva.getMIN_VARIAZIONE()\r\n\t\t\t\t\t+ Math.random() * (andamentoCurva.getMAX_VARIAZIONE() - andamentoCurva.getMIN_VARIAZIONE())\r\n\t\t\t);\r\n\t\telse if(randomizzatoreVariazione < 0.5)\r\n\t\t\tandamentoCurva.setVariazione(\r\n\t\t\t\t\tandamentoCurva.getVariazione()\r\n\t\t\t\t\t- andamentoCurva.getMIN_VARIAZIONE()\r\n\t\t\t\t\t+ Math.random() * (andamentoCurva.getMAX_VARIAZIONE() - andamentoCurva.getMIN_VARIAZIONE() * randomizzatoreVariazione)\r\n\t\t\t);\r\n\t}", "@Override\n public int attack() {\n return new Random().nextInt(5);\n }", "public void rollRandom() {\n\t\tthis.strength = randomWithRange();\r\n\t\tthis.wisdom = randomWithRange();\r\n\t\tthis.dexterity = randomWithRange();\r\n\t\tthis.constitution = randomWithRange();\r\n\t\tthis.intelligence = randomWithRange();\r\n\t\tthis.charisma = randomWithRange();\r\n\t}", "private static TETile randomTile() {\n int tileNum = RANDOM.nextInt(5);\n switch (tileNum) {\n case 0: return Tileset.TREE;\n case 1: return Tileset.FLOWER;\n case 2: return Tileset.GRASS;\n case 3: return Tileset.SAND;\n case 4: return Tileset.MOUNTAIN;\n default: return Tileset.NOTHING;\n }\n }", "public void shuffleItems() {\n LoadProducts(idCategory);\n }", "private void randomiseColors() {\n \t// Give the star a random color for normal circumstances...\n \tcolor.set((float) Random.nextDouble(),\n \t\t\t(float) Random.nextDouble(), (float) Random.nextDouble());\n \n // When the star is twinkling, we draw it twice, once in the color below \n // (not spinning) and then once in the main color defined above.\n twinkleColor.set((float) Random.nextDouble(),\n \t\t(float) Random.nextDouble(), (float) Random.nextDouble());\n }", "public void initChanceDeck() {\n\t\tchanceDeck = new Deck();\n\t\tfor (int i = 0; i < 16; i++) {\n\t\t\tchanceDeck.addCard(new Card(i));\n\t\t}\n\t\t//shuffled to make the order random\n\t\tchanceDeck.shuffle();\n\t}", "public void randomMove(){\n ArrayList<Hole> availableHoles = availableMoves(nextToPlay);\n int holeIndex = (int)(Math.random() * (((availableHoles.size()-1) - 0) + 1)) + 0;\n ArrayList<Korgool> korgools = availableHoles.get(holeIndex).getKoorgools();\n while(korgools.size() == 0){\n holeIndex = (int)(Math.random() * (((availableHoles.size()-1) - 0) + 1)) + 0;\n korgools = availableHoles.get(holeIndex).getKoorgools();\n }\n redistribute(availableHoles.get(holeIndex).getHoleIndex());\n }", "public void hinduShuffle()\r\n {\r\n List<Card> cut = new ArrayList<Card>();\r\n List<Card> cut2 = new ArrayList<Card>();\r\n List<Card> shuffledDeck = new ArrayList<Card>();\r\n int cutPoint = 0;\r\n int cutPoint2 = 0;\r\n for (int x = 0; x < SHUFFLE_COUNT; x++) {\r\n cutPoint = rand.nextInt( cards.size()-1 );\r\n cutPoint2 = rand.nextInt( cards.size() - cutPoint ) + cutPoint;\r\n for (int i = 0; i < cutPoint; i++) {\r\n cut.add(draw());\r\n }\r\n for (int i = cutPoint2; i < cards.size(); i++) {\r\n cut2.add(draw());\r\n }\r\n for (int i = 0; i < cut.size(); i++) {\r\n shuffledDeck.add(cut.remove(0));\r\n }\r\n for (int i = 0; i < cards.size(); i++) {\r\n shuffledDeck.add(cards.remove(0));\r\n }\r\n for (int i = 0; i < cut2.size(); i++) {\r\n shuffledDeck.add(cut2.remove(0));\r\n }\r\n cut = cards;\r\n cut.clear();\r\n cut2.clear();\r\n cards = shuffledDeck;\r\n }\r\n }", "public void getNewCards(int n) {\t\n\t\tif (n==0)\n\t\t\treturn;\n\t\tString cards = \"\";\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tint val = (int)(Math.random() * 100 + 1);\n\t\t\tint nc = 0;\n\t\t\tString type = \"Common\";\n\t\t\tif (val <= 5) {\n\t\t\t\tnc++;\n\t\t\t\ttype = \"Legendary\";\n\t\t\t}\n\t\t\telse if(val<=20) {\n\t\t\t\tnc++;\n\t\t\t\ttype = \"Epic\";\n\t\t\t}\n\t\t\telse if(val<=50) {\n\t\t\t\tnc++;\n\t\t\t\ttype = \"Rare\";\n\t\t\t}\n\t\t\tif(i==n-1 && nc<1) {type = \"Rare\";}\n\t\t\tcards += ClientNetwork.getCardIDByRarityAddToUser(TitleScreen.UserID, type)+\"\\n\";\n\t\t}\n\t\tJOptionPane.showMessageDialog(null, \"You recieved the following cards from your pack:\\n\"+cards);\n\t}", "public void genPopulation(int howMany)\r\n/* 30: */ {\r\n/* 31:54 */ this.pop.removeAllElements();\r\n/* 32:55 */ for (int i = 0; i < howMany; i++)\r\n/* 33: */ {\r\n/* 34:61 */ int[] clusterV = g.genRandomClusterSize();\r\n/* 35:62 */ Cluster c = new Cluster(g, clusterV);\r\n/* 36:63 */ this.pop.addElement(c);\r\n/* 37: */ }\r\n/* 38: */ }", "public void addCase()\n {\n\tint pos_y = customRandom(4);\n\tint pos_x = customRandom(4);\n\t\t\n\twhile (cases[pos_y][pos_x].getValue() != 0)\n\t{\n pos_y = customRandom(4);\n pos_x = customRandom(4);\n\t}\n\t\t\n\tcases[pos_y][pos_x] = new Case(2);\n }", "public void shuffle() {\n\t\tRandom randIndex = new Random();\n\t\tint size = cards.size();\n\t\t\n\t\tfor(int shuffles = 1; shuffles <= 20; ++shuffles)\n\t\t\tfor (int i = 0; i < size; i++) \n\t\t\t\tCollections.swap(cards, i, randIndex.nextInt(size));\n\t\t\n\t}", "public void mutation(){\n \n \tfor (int[] temp : wallpapers) {\n \t\tint e = random.nextInt(20);\n \t\tfor (int y = 0; y < e; y++){\n \t\t\tint h = random.nextInt(temp.length);\n \t\t\t//Log.d(\"MUT\", \"selected index \" + h);\n \t\t\tif (h == temp.length - 1 || h == temp.length - 2 || h == temp.length - 3){\n \t\t\t\tint newrgb = random.nextInt(NODELENGTH) + 2;\n \t\t\t\t//Log.d(\"MUT\", \"Picking new node \" + newrgb);\n \t\t\t\ttemp[h] = newrgb;\n \t\t\t} else if (((h + 1) % 3) == 0){\n \t\t\t\tint newfunction = random.nextInt(NUM_FUNCTIONS);\n \t\t\t\t//Log.d(\"MUT\", \"Picking new function \" + newfunction);\n \t\t\t\ttemp[h] = newfunction;\n \t\t\t} else {\n \t\t\t\tint newinput = random.nextInt(h / 3 +1);\n \t\t\t\ttemp[h] = newinput;\n \t\t\t\t//Log.d(\"MUT\", \"Picking new input \" + newinput);\n \t\t\t}\n \t\t}\n \t}\n }", "public abstract void randomize();", "public void randomize(){\r\n Num1.setText(\"\"+((int) (Math.random() * 10 + 1)));\r\n Num2.setText(\"\"+((int) (Math.random() * 10 + 1)));\r\n Num3.setText(\"\"+((int) (Math.random() * 10 + 1)));\r\n }", "public SuggestionGraph(HashMap<String, Clue> clues, HashMap<String, Card> cards, Random rand)\n {\n this.clues = clues;\n this.cards = cards;\n this.rand = rand;\n }", "public void start(){\n int randomImg1, randomImg2, randomImg3, randomImg4;\n randomImg1 = (int)(Math.random() * images.length);\n\n\n while (true) {\n randomImg2 = (int)(Math.random() * images.length);\n\n if (randomImg1 != randomImg2)\n break;\n }\n\n while (true) {\n randomImg3 = (int)(Math.random() * images.length);\n\n if ((randomImg3 != randomImg1) && (randomImg3 != randomImg2) )\n break;\n }\n\n while (true) {\n randomImg4 = (int)(Math.random() * images.length);\n\n if ((randomImg4 != randomImg1) && (randomImg4 != randomImg2) && (randomImg4 != randomImg3))\n break;\n }\n\n imgName = getResourceNameFromClassByID(images[randomImg1]);\n questionText = \"Find the \" + capitalize(imgName);\n\n //Set the question\n question.setText(questionText);\n\n int random = (int)(Math.random() * 4);\n\n if(random == 0){\n // Set the images\n im_1.setBackgroundResource(images[randomImg1]);\n im_2.setBackgroundResource(images[randomImg2]);\n im_3.setBackgroundResource(images[randomImg3]);\n im_4.setBackgroundResource(images[randomImg4]);\n\n im_1.setTag(images[randomImg1]);\n im_2.setTag(images[randomImg2]);\n im_3.setTag(images[randomImg3]);\n im_4.setTag(images[randomImg4]);\n }\n else if (random == 1) {\n // Set the images\n im_1.setBackgroundResource(images[randomImg2]);\n im_2.setBackgroundResource(images[randomImg1]);\n im_3.setBackgroundResource(images[randomImg3]);\n im_4.setBackgroundResource(images[randomImg4]);\n\n im_1.setTag(images[randomImg2]);\n im_2.setTag(images[randomImg1]);\n im_3.setTag(images[randomImg3]);\n im_4.setTag(images[randomImg4]);\n }\n else if (random == 2) {\n // Set the images\n im_1.setBackgroundResource(images[randomImg2]);\n im_2.setBackgroundResource(images[randomImg3]);\n im_3.setBackgroundResource(images[randomImg1]);\n im_4.setBackgroundResource(images[randomImg4]);\n\n im_1.setTag(images[randomImg2]);\n im_2.setTag(images[randomImg3]);\n im_3.setTag(images[randomImg1]);\n im_4.setTag(images[randomImg4]);\n }\n else {\n // Set the images\n im_1.setBackgroundResource(images[randomImg4]);\n im_2.setBackgroundResource(images[randomImg2]);\n im_3.setBackgroundResource(images[randomImg3]);\n im_4.setBackgroundResource(images[randomImg1]);\n\n im_1.setTag(images[randomImg4]);\n im_2.setTag(images[randomImg2]);\n im_3.setTag(images[randomImg3]);\n im_4.setTag(images[randomImg1]);\n }\n\n // print Total point of the gamer\n tv_points.setText(String.valueOf(points));\n\n\n // speak the question\n speakQuestionText(questionText, 2000);\n\n playSound(sounds[randomImg1]);\n\n speakButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n displayToast(questionText);\n\n speakQuestionText(questionText, 500);\n playSound(sounds[randomImg1]);\n\n }\n });\n\n }", "private TetrisPiece randomPiece() {\n\t\tint rand = Math.abs(random.nextInt());\n\t\treturn new TetrisPiece(rand % (PIECE_COLORS.length));\n\t}", "public void randomize() {\n\t\tx = ThreadLocalRandom.current().nextInt(0, 499 + 1);\n\t\ty = ThreadLocalRandom.current().nextInt(0, 499 + 1);\n\t}", "private void randomBehavior() {\n\t\trandom = rand.nextInt(50);\n\t\tif (random == 0) {\n\t\t\trandom = rand.nextInt(4);\n\t\t\tswitch (random) {\n\t\t\t\tcase 0:\n\t\t\t\t\tchangeFacing(ACTION.DOWN);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tchangeFacing(ACTION.RIGHT);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tchangeFacing(ACTION.UP);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tchangeFacing(ACTION.LEFT);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.7304584", "0.7154592", "0.58709395", "0.58246845", "0.5822787", "0.5800308", "0.57983273", "0.56918126", "0.5680455", "0.5672815", "0.5641073", "0.56366456", "0.5624309", "0.5617872", "0.5599708", "0.55750406", "0.5552396", "0.54954535", "0.54823303", "0.54600775", "0.5416598", "0.541015", "0.538207", "0.53770405", "0.53559", "0.5312493", "0.53118503", "0.5301771", "0.5300119", "0.5290684", "0.528825", "0.52752095", "0.5268973", "0.52606267", "0.5259847", "0.52498984", "0.5244743", "0.52371633", "0.52280873", "0.52262443", "0.5208684", "0.5188556", "0.51840967", "0.5183479", "0.5172364", "0.51695675", "0.51666594", "0.51616323", "0.51609063", "0.51483977", "0.51380146", "0.5137263", "0.5134914", "0.5128979", "0.512622", "0.51252544", "0.51243585", "0.5121743", "0.51207954", "0.51107526", "0.5109758", "0.5108707", "0.5108303", "0.5100854", "0.50881517", "0.5071962", "0.50694317", "0.50692666", "0.5066147", "0.5062051", "0.50610995", "0.5058248", "0.5057804", "0.5052523", "0.5044752", "0.50357795", "0.50315285", "0.50179327", "0.5015463", "0.50118715", "0.50094664", "0.500177", "0.50012136", "0.49977428", "0.49951294", "0.4990177", "0.49863112", "0.49839526", "0.49807906", "0.49789956", "0.49776098", "0.49775207", "0.49769482", "0.4975217", "0.49671483", "0.49627823", "0.4960686", "0.49579647", "0.4950392", "0.49502793" ]
0.8038731
0
loading a random clue necessary for the practice module and the international module
public void loadRandomClue(String module, String category) { List<String> clues = new ArrayList<String>(); if (module == "nz") { clues = _nzData.get(category); } else if (module == "int"){ clues = _intData.get(category); } int size = clues.size(); Random rand = new Random(); int randomIndex = rand.nextInt(size); try { _currentClue = new Clue(clues.get(randomIndex)); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Clue getRandomClue()\n {\n HashMap<String, Clue> usableClues = getUseableClues();\n ArrayList<Clue> list = new ArrayList<>(usableClues.values());\n int i = rand.nextInt(usableClues.size());\n return list.get(i);\n }", "public void loadReel() {\n\t\treturnSymbol = reel[(int) (Math.random() * (reel.length))];\n\t}", "private void LoadContent() {\n\t\ttry { // Récupération de la police d'écriture\n\t\t\tfont1 = Font.createFont(Font.TRUETYPE_FONT, new File(\"res/polices/Coalition.ttf\"));\n\t\t\tfont2 = Font.createFont(Font.TRUETYPE_FONT, new File(\"res/polices/13_Misa.ttf\"));\n\t\t} catch (final Exception err) {\n\t\t\tSystem.err.println(\"Police(s) d'écriture introuvable(s) !\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "public void shuffle () {\n this.lives = 6;\n this.attempts.clear();\n this.victory = false;\n this.lose = false;\n Random r = new Random ();\n this._word = _dictionary[r.nextInt(_dictionary.length)];\n // this._word = _dictionary[2]; // Testing purposes\n this.hint.setLength(0);\n for (int i = 0; i < _word.length(); i++) {\n this.hint.append(\"_ \");\n } \n }", "private int getRandomPiece() {\r\n return new Random().nextInt(Constants.NUM_PIECES);\r\n }", "public void colorearSecuencial() {\n\t\t// Collections.shuffle(nodos);\n\t\tcolorearSecuencialAlternativo();\n\t}", "public void loadClue(String category,int index) {\n\t\tString clue = _gamesData.get(category).get(index);\n\t\ttry {\n\t\t\t_currentClue = new Clue (clue,(index+1)*100);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public StrategyRandom() {\n name = \"Random\";\n }", "private void random() {\n\n\t}", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\n correctButtonName = buttonList[(int)(Math.random() * buttonList.length)];\r\n \r\n/* If you want to test out the program but hate guessing, this will give you the correct button name.\r\n This is a cheat code for \"X Marks The Spot!\".\r\n System.out.print(correctButtonName);\r\n*/\r\n }", "public void inicializarPalabra () { \r\n palabra = \"\"; \r\n palabraErrada = \"\"; \r\n mensaje = \"\"; \r\n intentosErrados = 0; \r\n \r\n try { \r\n //Variable para almacenar la cantidad de palabras que hay en el archivo adjunto \r\n int contadorPalabras = 0; \r\n \r\n //Obtener la palabra del txt \r\n File archivo = new File(\"palabritas.txt\"); \r\n BufferedReader entrada; \r\n \r\n //En el primer recorrido determinamos cuantas palabras tengo en palabritas \r\n entrada = new BufferedReader(new FileReader(archivo)); \r\n String palabraTemp = \"\"; \r\n while(entrada.ready()){ \r\n palabraTemp = entrada.readLine(); \r\n if (palabraTemp.length()>cantMaximaCaracteres) continue; //Validamos el tama帽o de caracteres \r\n contadorPalabras ++; \r\n } \r\n System.out.println(\"Cantidad:\"+contadorPalabras); \r\n \r\n //Con la cantidad de palabras realizamos el random \r\n //Lo multiplicamos x 100 y agarramos el residuo de dividirlo entre la cantidad de palabras \r\n //Le sumamos 1 xq el cero no juega \r\n int numeroLineaEscogida = ((int) (Math.random() * 100) % contadorPalabras) + 1; \r\n \r\n //Nos posicionamos en el numero del random y obtenemos la palabra \r\n entrada = new BufferedReader(new FileReader(archivo)); \r\n int numeroLineaActual = 1; \r\n while(entrada.ready()){ \r\n palabraTemp = entrada.readLine(); \r\n if (palabraTemp.length()>cantMaximaCaracteres) continue; //Validamos el tama帽o de caracteres \r\n if ( numeroLineaActual == numeroLineaEscogida ){ \r\n palabra = palabraTemp; \r\n break; \r\n }else{ \r\n numeroLineaActual++; \r\n } \r\n } \r\n \r\n System.out.println(\"palabra:\"+palabra); \r\n // En el arreglo de caracteres que contendra el resultado lo llenamos de espacio \r\n letras = new char[palabra.length()]; \r\n for (int i = 0; i <= palabra.length() - 1; i++) { \r\n if ( palabra.substring(i, i+1).equals(\" \") ){ \r\n letras[i] = ' '; \r\n }else{ \r\n letras[i] = '_'; \r\n } \r\n } \r\n \r\n //inicializamos el arreglo de intentos errados \r\n letrasErradas = new char[intentosPermitidos]; \r\n \r\n } catch (Exception e) { \r\n e.printStackTrace(); \r\n mensaje = \"No se encuentra el archivo 'palabritas.txt'\"; \r\n } \r\n }", "public void loadQuestion() {\r\n\r\n //getting the number of the question stored in variable r\r\n //making sure that a question is not loaded up if the count exceeds the number of total questions\r\n if(count <NUMBER_OF_QUESTIONS) {\r\n int r = numberHolder.get(count);\r\n //creating object that will access the QuestionStore class and retrieve values and passing the value of the random question number to the class\r\n QuestionStore qs = new QuestionStore(r);\r\n //calling methods in order to fill up question text and mutliple choices and load the answer\r\n qs.storeQuestions();\r\n qs.storeChoices();\r\n qs.storeAnswers();\r\n //setting the question and multiple choices\r\n\r\n q.setText(qs.getQuestion());\r\n c1.setText(qs.getChoice1());\r\n c2.setText(qs.getChoice2());\r\n c3.setText(qs.getChoice3());\r\n answer = qs.getAnswer();\r\n }\r\n else{\r\n endGame();\r\n }\r\n\r\n\r\n\r\n\r\n }", "public void randomCivic() {\n\n\t\tpol = new String[polArr.size()];\n\t\tfor (int i = 0; i < polArr.size(); i++) {\n\t\t\tint size = (int) (Math.random() * (polArr.get(i).size() - 1) + 1);\n\t\t\tpol[i] = polArr.get(i).get(size);\n\t\t}\n\t}", "public void decideNature()\n {\n String nature = new String(\"\");\n Random rand = new Random();\n int i = rand.nextInt(100);\n if(i <= 25)\n {\n nature = \"Very mischievous. Enjoys hiding objects in plain sight\";\n }//ends the if\n else if(i > 25 && i <= 50)\n {\n nature = \"Loves to spend time sleeping on the clouds\";\n }//ends the else if\n else if(i > 50 && i <= 75)\n {\n nature = \"Is very playful\";\n }//ends the else if\n else\n {\n nature = \"Loves to perform dances in the air\";\n }\n \n setNature(nature);\n }", "@Override\r\n\tpublic String getFortune() {\n\t\tString[] s= {\"have a nice day :)\",\r\n\t\t\t\t\"attaboy!\",\r\n\t\t\t\t\"good fortune to you <3\"\r\n\t\t};\r\n\t\tint x;\r\n\t\tx=((int)(Math.random()*9))%3;\r\n\t\t\r\n\t\treturn s[x] ;\r\n\t}", "public static void load(SampleGame sampleGame) {\n\t\t// TODO Auto-generated method stub\n\t\t// theme = sampleGame.getAudio().createMusic(\"menutheme.mp3\");\n\t\t// theme.setLooping(true);\n\t\t// theme.setVolume(0.85f);\n\t\t// theme.play();\n\t}", "public Lemur(){\r\n //Call to super class\r\n super();\r\n //Set variables\r\n location = \"Madagascar\";\r\n classification = \"Prosimians\";\r\n coat = \"Fur\";\r\n dominantRole = \"Female\";\r\n grooming = \"Use their teeth as a comb\";\r\n age = rand.nextInt((20-1)+1)+1;\r\n weight = Math.random()*((7-1)+1)+1;\r\n }", "Randomizer getRandomizer();", "private void pirateRecipe(String text) {\n if (\"excitedze\".equals(text)) {\n LanguageManager languagemanager = this.mc.getLanguageManager();\n Language language = languagemanager.getLanguage(\"en_pt\");\n if (languagemanager.getCurrentLanguage().compareTo(language) == 0) {\n return;\n }\n\n languagemanager.setCurrentLanguage(language);\n this.mc.gameSettings.language = language.getCode();\n net.minecraftforge.client.ForgeHooksClient.refreshResources(this.mc, net.minecraftforge.resource.VanillaResourceType.LANGUAGES);\n this.mc.gameSettings.saveOptions();\n }\n\n }", "private String getRandomName(){\n return rndString.nextString();\n }", "public static void main(String[] args){\n\t\trandomizeText(\"newenergy_part.dat\");\n\t}", "private void useInventoryByAI() {\n\t\tChampion AI = currentTask.getCurrentChamp();\n\t\tArrayList<Collectible> inventory = ((Wizard)AI).getInventory();\n\t\tif(inventory.size()>0){\n\t\t\tint randomPotion = (int)(Math.random()*inventory.size());\n\t\t\tcurrentTask.usePotion((Potion)inventory.get(randomPotion));\n\t\t}\n\n\t\t\n\t}", "public String getRandomCharecter(){\n\n\tif (!dataprepared){\n\t prepareData();\n\t}\n\t\n\tAssert.pre(table!=null,\"data must be prepared\");\n\n\treturn (String)table.get(r.nextInt(total));\n\n\t\n }", "public void initiateGame() {\n Collections.shuffle(players);\n Collections.shuffle(categories);\n for (Category c : categories) {\n c.shuffleChallenges();\n }\n }", "public void initGame() {\r\n\t\tConsolaText consola = new ConsolaText();\r\n\t\tconsola.displayRules();\r\n\t\t// System.out.println(\"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\r\n\r\n\t}", "private String randWord() {\r\n List<String> wordList = new ArrayList<>();\r\n\r\n try {\r\n InputStream input = getClass().getResourceAsStream(\"res/hangmanWords.txt\");\r\n DataInputStream data_input = new DataInputStream(input);\r\n BufferedReader buffer = new BufferedReader(new InputStreamReader(data_input));\r\n String str_line;\r\n\r\n while ((str_line = buffer.readLine()) != null) {\r\n str_line = str_line.trim();\r\n if ((str_line.length() != 0)) {\r\n wordList.add(str_line);\r\n }\r\n }\r\n } catch (Exception e) {\r\n System.err.println(\"Error: \" + e.getMessage());\r\n }\r\n int rand = new Random().nextInt(wordList.size());\r\n return wordList.get(rand);\r\n }", "public void generateTutorialWeapons() {\n this.loot.add(new Weapon(\"Weathered Longsword\", \"A weathered longsword - it'll do.\", 3, 1));\n this.loot.add(new Weapon(\"Weathered Battle Axe\", \"A weathered battle axe - it'll do.\", 2, 2));\n this.loot.add(new Weapon(\"Weathered Bow\", \"A weathered bow - it'll do.\", 3, 2));\n }", "public static void main(String[] args) {\n\n// Random randomizer = new Random();\n// //grab a random noun and adj\n// int randInt = randomizer.nextInt(11);\n// System.out.println(\" random adjective is : \" + adj[randInt]);\n// System.out.println( \" random noun is : \" + noun[randInt]);\n// String randAdj = adj[randInt];\n// String randNoun = noun[randInt];\n// System.out.println();\n// System.out.println(\"Here is your server name: \" + randAdj + \"-\" + randNoun);\n\n //another method\n String nouns = getRandomWord(noun);\n String adjs = getRandomWord(adj);\n System.out.println(adjs + \"-\" + nouns);\n }", "private void renewWordLevel3()\n {\n givenWord = availableWords.randomWordLevel3();\n shuffedWord = availableWords.shuffleWord(givenWord);\n textViewShuffle.setText(shuffedWord);\n }", "private static String getRandomType(){\r\n int index = r.nextInt(typeOfRooms.length);\r\n return typeOfRooms[index];\r\n }", "public static Ally getRandomRep () {\n return republican[(int) (Math.random() * republican.length)];\n }", "private void loadRandomState() {\n patternName = \"Random\";\n\n for (int i = 0; i < NUMCELLS; i++)\n currentState[i] = (rand.nextInt() > 0x40000000) ? (byte)1 : (byte)0;\n\n generations = 0;\n }", "private void settingQuestion() {\n\n int[] setWord = {0, 0, 0, 0, 0};\n int[] setPos = {0, 0, 0, 0};\n int[] setBtn = {0, 0, 0, 0};\n\n Random ans = new Random();\n int wordNum = ans.nextInt(vocabularyLesson.size());\n //answer = vocabularyLesson.get(wordNum).getMean();\n word = vocabularyLesson.get(wordNum).getWord();\n vocabularyID = vocabularyLesson.get(wordNum).getId();\n answer = word;\n\n Practice practice = pc.getPracticeById(vocabularyID);\n if (practice != null) {\n Log.d(\"idVocabulary\", practice.getSentence());\n question.setText(practice.getSentence());\n }\n\n\n // Random position contain answer\n setWord[wordNum] = 1;\n Random p = new Random();\n int pos = p.nextInt(4);\n if (pos == 0) {\n word1.setText(word);\n setBtn[0] = 1;\n }\n if (pos == 1) {\n word2.setText(word);\n setBtn[1] = 1;\n }\n if (pos == 2) {\n word3.setText(word);\n setBtn[2] = 1;\n }\n if (pos == 3) {\n word4.setText(word);\n setBtn[3] = 1;\n }\n setPos[pos] = 1;\n\n // Random 3 position contain 3 answer\n for (int i = 0; i < 3; i++) {\n Random ques = new Random();\n int num = ques.nextInt(5);\n int p1 = ques.nextInt(4);\n while (setWord[num] == 1 || setPos[p1] == 1) {\n num = ques.nextInt(5);\n p1 = ques.nextInt(4);\n }\n String wordIncorrect = vocabularyLesson.get(num).getWord();\n setWord[num] = 1;\n setPos[p1] = 1;\n if (setBtn[p1] == 0 && p1 == 0) {\n word1.setText(wordIncorrect);\n setBtn[0] = 1;\n }\n if (setBtn[p1] == 0 && p1 == 1) {\n word2.setText(wordIncorrect);\n setBtn[1] = 1;\n }\n if (setBtn[p1] == 0 && p1 == 2) {\n word3.setText(wordIncorrect);\n setBtn[2] = 1;\n }\n if (setBtn[p1] == 0 && p1 == 3) {\n word4.setText(wordIncorrect);\n setBtn[3] = 1;\n }\n }\n\n }", "public abstract void randomize();", "public String readARandomWord() {\r\n\r\n\t\tString inputFileName = \"dictionary.txt\";\r\n\t\tString[] wordsArray = null;\r\n\r\n\t\tScanner textFileScanner = new Scanner(BackToTheFutureClient.class.getResourceAsStream(inputFileName));\r\n\t\tArrayList<String> wordsList = new ArrayList<String>();\r\n\r\n\t\t// Reading all the lines from the file into array list\r\n\t\twhile (textFileScanner.hasNextLine()) {\r\n\t\t\tString w = textFileScanner.next();\r\n\t\t\twordsList.add(w);\r\n\t\t}\r\n\t\ttextFileScanner.close();\r\n\r\n\t\t// Convert words list to words array\r\n\t\twordsArray = wordsList.toArray(new String[wordsList.size()]);\r\n\r\n\r\n\t\tString randomWord = \"\";\r\n\r\n\t\t// Choose a random word from the array list of words\r\n\t\tif (wordsArray != null) {\r\n\t\t\tint index = new Random().nextInt(wordsArray.length);\r\n\t\t\trandomWord = (wordsArray[index]);\r\n\t\t}\r\n\t\treturn randomWord;\r\n\t}", "public static void init () {\n\t\tGameRegistry.addRecipe(new ItemStack(ModBlocks.sea_lantern), \"XYX\", \"YYY\", \"XYX\", 'X', ModItems.prismarine_shard, 'Y', ModItems.prismarine_crystals);\r\n\t\t//Prismarine\r\n\t\tGameRegistry.addRecipe(new ItemStack(ModBlocks.prismarine, 1, 0), \" \", \"XX \", \"XX \", 'X', ModItems.prismarine_shard);\r\n\t\t//Prismarine Bricks\r\n\t\tGameRegistry.addRecipe(new ItemStack(ModBlocks.prismarine, 1, 1), \"XXX\", \"XXX\", \"XXX\", 'X', ModItems.prismarine_shard);\r\n\t\t//Dark Prismarine\r\n\t\tGameRegistry.addRecipe(new ItemStack(ModBlocks.prismarine, 1, 2), \"XXX\", \"XYX\", \"XXX\", 'X', ModItems.prismarine_shard, 'Y', Item.getItemById(351));\r\n\t\t//Cooked mutton\r\n\t\tGameRegistry.addSmelting(new ItemStack(ModItems.mutton_raw), new ItemStack(ModItems.mutton_cooked), 0.35f);\r\n\t\t//Iron trapdoor\r\n\t\tGameRegistry.addRecipe(new ItemStack(ModBlocks.iron_trapdoor), \"XX \", \"XX \", \" \", 'X', Blocks.iron_bars);\r\n\t\tGameRegistry.addRecipe(new ItemStack(ModBlocks.iron_trapdoor), \" XX\", \" XX\", \" \", 'X', Blocks.iron_bars);\r\n\t\tGameRegistry.addRecipe(new ItemStack(ModBlocks.iron_trapdoor), \" \", \"XX \", \"XX \", 'X', Blocks.iron_bars);\r\n\t\tGameRegistry.addRecipe(new ItemStack(ModBlocks.iron_trapdoor), \" \", \" XX\", \" XX\", 'X', Blocks.iron_bars);\r\n\t}", "public static void initLoot()\n\t{\n\t\tChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(Disc1),0,1,5));\n\t\tChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_CORRIDOR).addItem(new WeightedRandomChestContent(new ItemStack(Disc1),0,1,15));\n\t\tChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_LIBRARY).addItem(new WeightedRandomChestContent(new ItemStack(Disc1),0,1,15));\n\t\tChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_CROSSING).addItem(new WeightedRandomChestContent(new ItemStack(Disc1),0,1,15));\n\t\tChestGenHooks.getInfo(ChestGenHooks.MINESHAFT_CORRIDOR).addItem(new WeightedRandomChestContent(new ItemStack(Disc1),0,1,5));\n\t\tChestGenHooks.getInfo(ChestGenHooks.PYRAMID_DESERT_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(Disc1),0,1,5));\n\t\tChestGenHooks.getInfo(ChestGenHooks.PYRAMID_JUNGLE_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(Disc1),0,1,15));\n\t}", "private void load() { \n\t\tmannschaft_name.setText(helper.getTeamName(mannschaftId));\n\t\tmannschaft_kuerzel.setText(helper.getTeamKuerzel(mannschaftId));\t\t \n\t}", "private void loadRecipes() {\n\t\tGameRegistry.addRecipe(new ItemStack(RamsesMod.ramsesHelmet),\n\t\t\t\t\"XXX\",\n\t\t\t\t\"X X\",\n\t\t\t\t\" \", 'X', Blocks.lapis_ore);\n\n\t\tGameRegistry.addRecipe(new ItemStack(RamsesMod.ramsesChestplate),\n\t\t\t\t\"X X\",\n\t\t\t\t\"XXX\",\n\t\t\t\t\"XXX\", 'X', Blocks.lapis_ore);\n\n\t\tGameRegistry.addRecipe(new ItemStack(RamsesMod.ramsesLeggings),\n\t\t\t\t\"XXX\",\n\t\t\t\t\"X X\",\n\t\t\t\t\"X X\", 'X', Blocks.lapis_ore);\n\n\t\tGameRegistry.addRecipe(new ItemStack(RamsesMod.ramsesBoots),\n\t\t\t\t\" \",\n\t\t\t\t\"X X\",\n\t\t\t\t\"X X\", 'X', Blocks.lapis_ore);\n\t}", "public Civilisation(int id, String nameNullForRandom, Case firstCase, Color couleur, Ideologie ideologie, Regime regime, PolTerritoriale polT) {\r\n\t\t\r\n\t\tthis.id = id;\r\n\t\tthis.culture = new Basique();\r\n\t\tthis.ideologie = ideologie;\r\n\t\tthis.regimePolitique = regime;\r\n\t\tthis.couleur = new Color(couleur.getRed(), couleur.getGreen(), couleur.getBlue(), 150);\r\n\t\t//this.couleur = new Color(couleur.getRed(), couleur.getGreen(), couleur.getBlue());\r\n\t\tnom = (nameNullForRandom != null) ? nameNullForRandom : noms[(int)(Math.random()*noms.length)];\r\n\t\tpopulation = 10;\r\n\t\tpopulationColoniale = 0;\r\n\t\tproduction = 0;\r\n\t\teconomie = 0;\r\n\t\tinfluence = 0;\r\n\t\tarmee = 0;\r\n\t\tscienceLvl = 1;\r\n\t\tscience = 10; //decrementation de la science pour passer au lvl supp\r\n\t\tnourriture = 50;\r\n\t\tcaseOwned = new ArrayList<>();\r\n\t\tressourcesStrat = new ArrayList<>();\r\n\t\tressourcesAnimal = new ArrayList<>();\r\n\t\taggresiveWar = new ArrayList<>();\r\n\t\tdefensiveWar = new ArrayList<>();\r\n\t\tvoisins = checkVoisins();\r\n\t\tenFamine = false;\r\n\t\ttauxEducation = 0;\r\n\t\ttauxCroissance = 0.02; // =1x taux mondiale IRL\r\n\t\ttauxAccroissementScience = 1.2;\r\n\t\tbaseScience = 10;\r\n\t\tbaseBonheur = 10;\r\n\t\tbaseEfficaciteArmee = 1;\r\n\t\tnoteMinimale = firstCase.note();\r\n\t\taddCase(firstCase);\r\n\t\tfor(Case c : firstCase.getVoisinesLibres()) addCase(c);\r\n\t\timpactRegime();\r\n\t\tthis.politiqueTerritoriale = polT;\r\n\t\tcalculerBonheur();\r\n\t\tcalculerEffiArmee();\r\n\t\t\r\n\t}", "public void randomizeCategory() {\n this.group = (int) (3*Math.random()+1);\n }", "public void initialise_new_game() {\n\n data.read_from_file(\"maxus2.txt\");\n\n mySound.initialise();\n\n pacman.init();\n ghost.init();\n\n score.initialise();\n }", "private void loadOldGame() {\n String[] moveList = readFile().split(\"\");\n Long seed = getSeedFromLoad(moveList);\n String[] moves = getMoves(moveList).split(\"\");\n\n ter.initialize(WIDTH, HEIGHT, 0, -3);\n GameWorld world = new GameWorld(seed);\n for (int x = 0; x < WIDTH; x += 1) {\n for (int y = 0; y < HEIGHT; y += 1) {\n world.world[x][y] = Tileset.NOTHING;\n }\n }\n world.buildManyRandomSq();\n GameWorld.Position pos = randomAvatarPosition(world);\n world.world[pos.x][pos.y] = Tileset.AVATAR;\n for (String s: moves) {\n if (validMove(world, s.charAt(0))) {\n move(s.charAt(0), world);\n }\n }\n String senit = \"\";\n for (int i = 0; i < moveList.length; i++) {\n senit += moveList[i];\n }\n ter.renderFrame(world.world);\n playGame(world, senit);\n }", "public static void Random() {\n\t\tRandom ran =new Random();\r\n\t\trandom=ran.nextInt(6)+1;\r\n\t\t//random=1;\r\n\t\twho=A1063307_GUI.who2;\r\n\t\tif((ch[who].status)>0) {\r\n\t\t\tch[who].location=(ch[who].location)+random;\r\n\t\t\tch[who].status=(ch[who].status)-1;\r\n\t\t\t\r\n\t\t}else {\r\n\t\t\t\treturn;\r\n\t\t\t}\t\t\r\n\t}", "static public int getHobgoblinStr(){\n str = rand.nextInt(3) + 3;\n return str;\n }", "@Override\n public void askInitResource() {\n\n clear(container);\n\n if (gui.getViewController().getGame().getPosition()!=1)\n {\n ResourceManager resourceManager = new ResourceManager(container,gui);\n resourceManager.setHeading(\"if you are the second or the third player, you have to choose only one, instead two resources like and the fourth player:\");\n resourceManager.showWhatToChoose(true);\n }\n else\n {\n\n container.setLayout(new FlowLayout());\n errorLabel = new JLabel(\"sorry, you are the first player, take a nap\");\n errorLabel.setBackground(Color.WHITE);\n errorLabel.setOpaque(true);\n container.add(errorLabel);\n errorLabel.setLocation(475,108);\n errorLabel.setSize(100,100);\n (new Thread(() -> {\n try {\n gui.notifyObserver(new EndOfTurnMessage());\n } catch (IOException | InterruptedException e) {\n e.printStackTrace();\n }\n })).start();\n gui.switchToGameMode();\n }\n\n applyChangesTo(container);\n }", "public static Ally getRandomDem () {\n return democrat[(int) (Math.random() * democrat.length)];\n }", "protected void introduction() {\r\n\r\n // Titel\r\n\r\n Text title = lang.newText(new Coordinates(20, 25), \"Negascout Algorithmus\",\r\n \"header\", null, headerProperties);\r\n pMap.put(\"title\", title);\r\n // Umrandung\r\n pMap.put(\"hRect\", lang.newRect(new Coordinates(10, 15), new Coordinates(\r\n 400, 50), \"hRect\", null, headerRectProperties));\r\n\r\n // Zeigt die Einleitung an\r\n SourceCode intro;\r\n intro = lang.newSourceCode(new Coordinates(30, 60), \"intro\", null,\r\n sourceCodeProperties);\r\n intro\r\n .addCodeLine(\r\n \"Der Negascout-Algorithmus wird angewendet, um in einem Spiel zwischen zwei Parteien\",\r\n \"intro\", 0, null);\r\n intro\r\n .addCodeLine(\r\n \"eine optimale Spielstrategie f\\u00FCr eine der Parteien zu bestimmen.\",\r\n \"intro\", 0, null);\r\n intro\r\n .addCodeLine(\r\n \"Die m\\u00F6glichen Z\\u00FCge werden dazu in einer Baumstruktur dargestellt.\",\r\n \"intro\", 0, null);\r\n intro.addCodeLine(\"\", \"intro\", 0, null);\r\n intro.addCodeLine(\"Dabei werden folgende Annahmen getroffen:\", \"intro\", 0,\r\n null);\r\n intro\r\n .addCodeLine(\r\n \"- es handelt sich um ein Nullsummenspiel, das hei\\u00DFt positive Punkte des einen Spielers\",\r\n \"intro\", 0, null);\r\n intro\r\n .addCodeLine(\r\n \" sind negative Punkte f\\u00FCr den anderen, sodass alle Punkte in der Summe 0 ergeben\",\r\n \"intro\", 0, null);\r\n intro.addCodeLine(\r\n \"- beide Parteien spielen optimal und machen keine Fehler\", \"intro\", 0,\r\n null);\r\n intro\r\n .addCodeLine(\r\n \"- das Spiel ist deterministisch, also nicht von W\\u00FCrfelgl\\u00FCck o.\\u00E4. abh\\u00E4ngig\",\r\n \"intro\", 0, null);\r\n intro\r\n .addCodeLine(\r\n \"- es gibt keine verborgenen Informationen wie beispielsweise beim Kartenspiel\",\r\n \"intro\", 0, null);\r\n intro.addCodeLine(\"\", \"intro\", 0, null);\r\n intro\r\n .addCodeLine(\r\n \"Negascout funktioniert so \\u00E4hnlich wie der Alpha-Beta-Algorithmus:\",\r\n \"intro\", 0, null);\r\n intro\r\n .addCodeLine(\r\n \"Jeder Knoten wird mit einer unteren und einer oberen Grenze untersucht, die den zu diesem\",\r\n \"intro\", 0, null);\r\n intro.addCodeLine(\r\n \"Zeitpunkt m\\u00F6glichen maximalen und minimalen Gewinn angibt.\",\r\n \"intro\", 0, null);\r\n intro\r\n .addCodeLine(\r\n \"Durch diese Begrenzung k\\u00F6nnen bestimmte Teilb\\u00E4ume abgeschnitten (gepruned) werden, da sie f\\u00FCr \",\r\n \"intro\", 0, null);\r\n intro\r\n .addCodeLine(\r\n \"das Endergebnis irrelevant sind (z.B. Z\\u00FCge, die dem Gegner zu viele Punkte bringen w\\u00FCrden).\",\r\n \"intro\", 0, null);\r\n intro\r\n .addCodeLine(\r\n \"Die Vorsilbe 'Nega-' im Namen des Algorithmus weist darauf hin, dass das Punktefenster f\\u00FCr den\",\r\n \"intro\", 0, null);\r\n intro\r\n .addCodeLine(\r\n \"n\\u00E4chsten (vom jeweils anderen Spieler ausgef\\u00FChrten) Spielzug negiert wird.\",\r\n \"intro\", 0, null);\r\n intro\r\n .addCodeLine(\r\n \"Eine Besonderheit von Negascout ist, dass der Algorithmus davon ausgeht, dass der erste\",\r\n \"intro\", 0, null);\r\n intro\r\n .addCodeLine(\r\n \"betrachtete Zug der beste ist. Weitere m\\u00F6gliche Z\\u00FCge werden anschlie\\u00DFend mit einem \",\r\n \"intro\", 0, null);\r\n intro\r\n .addCodeLine(\r\n \"Nullwindow (obere und untere Grenze liegen nur um 1 auseinander) untersucht, um zu beweisen,\",\r\n \"intro\", 0, null);\r\n intro\r\n .addCodeLine(\r\n \"dass sie tats\\u00E4chlich schlechter sind. Ist das nicht der Fall, tritt ein sogenanntes Fail High auf,\",\r\n \"intro\", 0, null);\r\n intro\r\n .addCodeLine(\r\n \"das hei\\u00DFt der betrachtete Zug ist besser als erwartet. Dann muss dieser Knoten erneut mit dem \",\r\n \"intro\", 0, null);\r\n intro.addCodeLine(\"vollst\\u00E4ndigen Wertefenster untersucht werden.\",\r\n \"intro\", 0, null);\r\n lang.nextStep(\"Intro\");\r\n intro.hide();\r\n\r\n // Zeigt den Code an\r\n code = lang.newSourceCode(new Coordinates(30, 60), \"code\", null,\r\n sourceCodeProperties);\r\n code.addCodeLine(\"int negascout (node n, int alpha, int beta){\", \"code\", 0,\r\n null); // 0\r\n code.addCodeLine(\" if (node is a leaf)\", \"code\", 0, null); // 1\r\n code.addCodeLine(\" return valueOf(node);\", \"code\", 0, null); // 2\r\n code.addCodeLine(\" int a=alpha;\", \"code\", 0, null); // 3\r\n code.addCodeLine(\" int b=beta;\", \"code\", 0, null); // 4\r\n code.addCodeLine(\" for each child of node{\", \"code\", 0, null); // 5\r\n code.addCodeLine(\" int score = -negascout (child, -b, -a);\",\r\n \"code\", 0, null); // 6\r\n code.addCodeLine(\r\n \" if (a < score < beta and child is not first child)\",\r\n \"code\", 0, null); // 7\r\n code.addCodeLine(\r\n \" score = -negascout (child, -beta, -score);\", \"code\",\r\n 0, null); // 8\r\n code.addCodeLine(\" a=max(a, score);\", \"code\", 0, null); // 9\r\n code.addCodeLine(\" if(a >= beta)\", \"code\", 0, null); // 10\r\n code.addCodeLine(\" return a;\", \"code\", 0, null); // 11\r\n code.addCodeLine(\" b = a+1;\", \"code\", 0, null); // 12\r\n code.addCodeLine(\" }\", \"code\", 0, null); // 13\r\n code.addCodeLine(\" return a;\", \"code\", 0, null); // 14\r\n code.addCodeLine(\"}\", \"code\", 0, null); // 15\r\n // Erklaert die aktuelle Codezeile\r\n\r\n explain = lang.newText(new Offset(0, 30, \"code\", \"SW\"), \"\", \"explain\",\r\n null, descriptionProperties);\r\n tSeen = lang.newText(new Offset(0, 90, \"code\", \"SW\"), \"\", \"tSeen\", null,\r\n counterTextProperties);\r\n tSeen.setText(\"betrachtete Knoten: 0\", null, null);\r\n tPruned = lang.newText(new Offset(0, 130, \"code\", \"SW\"), \"\", \"tPruned\",\r\n null, counterTextProperties);\r\n tPruned.setText(\"geprunte Knoten: 0\", null, null);\r\n tFailed = lang.newText(new Offset(0, 110, \"code\", \"SW\"), \"\", \"tFailed\",\r\n null, counterTextProperties);\r\n tFailed.setText(\"erneut untersuchte Knoten: 0\", null, null);\r\n pMap.put(\"explain\", explain);\r\n pMap.put(\"tSeen\", tSeen);\r\n pMap.put(\"tPruned\", tPruned);\r\n pMap.put(\"tFailed\", tFailed);\r\n\r\n rSeen = lang.newRect(new Offset(barLeft, -5, \"tSeen\", \"NE\"), new Offset(\r\n barLeft, 10, \"tSeen\", \"NE\"), \"rSeen0\", null, counterBarProperties);\r\n pMap.put(\"rSeen0\", rSeen);\r\n rPruned = lang.newRect(new Offset(barLeft, -5, \"tPruned\", \"NE\"),\r\n new Offset(barLeft, 10, \"tPruned\", \"NE\"), \"rPruned0\", null,\r\n counterBarProperties);\r\n pMap.put(\"rPruned0\", rPruned);\r\n rFailed = lang.newRect(new Offset(barLeft, -5, \"tFailed\", \"NE\"),\r\n new Offset(barLeft, 10, \"tFailed\", \"NE\"), \"rFailed0\", null,\r\n counterBarProperties);\r\n pMap.put(\"rFailed0\", rFailed);\r\n\r\n // Parst den Eingabebaum und zeichnet ihn\r\n Parser p = new Parser();\r\n root = p.parseText(treeText);\r\n showTree(root);\r\n nodesTotal = countNodes(root);\r\n }", "static void SampleItinerary() {\n\t\tSystem.out.println(\"\\n ***Everyone piles on the boat and goes to Molokai***\");\n\t\tbg.AdultRowToMolokai();\n\t\tbg.ChildRideToMolokai();\n\t\tbg.AdultRideToMolokai();\n\t\tbg.ChildRideToMolokai();\n\t}", "public void generateLabyrinth() {\n\n /**\n * Generate some randoms Monsters for rooms\n */\n Monsters[] monster = new Monsters[countRooms];\n for (int i = 0; i < countRooms; i++) {\n monster[i] = new Monsters(\n rnd.nextDouble() * 10 + 1,\n rnd.nextDouble() * 10 + 1,\n rnd.nextDouble() * 10 + 1\n );\n }\n\n /**\n * Genetare random rooms with monsters\n */\n Rooms[] room = new Rooms[countRooms];\n for (int i = 0; i < countRooms; i++) {\n room[i] = new Rooms(\"unknownRoom\" + i);\n room[i].setMonster(monster[i]);\n if (rnd.nextInt(100) < 50) {\n room[i].setItem(shop.getRandomItem());\n }\n }\n\n /**\n * Connecting rooms with each other\n * North to South\n * East to West\n */\n\n //init and connect first room with labyrinth\n currentRoom = new Rooms(\"startRoom\");\n currentRoom.setNorth(room[0]);\n room[0].setSouth(currentRoom);\n\n for (int i = 0; i < countRooms - 1; i++) {\n int rint;\n //North to South\n rint = rnd.nextInt(countRooms);\n if (room[i].getNorth() == null) {\n while (room[rint].getSouth() != null) {\n rint = rnd.nextInt(countRooms);\n }\n room[i].setNorth(room[rint]);\n room[rint].setSouth(room[i]);\n }\n //East to West\n rint = rnd.nextInt(countRooms);\n if (room[i].getEast() == null) {\n while (room[rint].getWest() != null) {\n rint = rnd.nextInt(countRooms);\n }\n room[i].setEast(room[rint]);\n room[rint].setWest(room[i]);\n }\n\n }\n\n\n }", "private int randomPiece() {\n return (int)(Math.random()*N_PIECES);\n }", "protected void constructNewQuestion(){\n arabicWordScoreItem = wordScoreTable.whatWordToLearn();\n arabicWord = arabicWordScoreItem.word;\n correctAnswer = dictionary.get(arabicWord);\n\n for (int i=0;i<wrongAnswers.length;i++){\n int wrongAnswerId;\n String randomArabicWord;\n String wrongAnswer;\n do {\n wrongAnswerId = constructQuestionRandom.nextInt(next_word_index);\n randomArabicWord = dictionary_key_list.get(wrongAnswerId);\n wrongAnswer = dictionary.get(randomArabicWord);\n } while (wrongAnswer.equals(correctAnswer));\n wrongAnswers[i] = wrongAnswer;\n }\n }", "public void setFiveRandomClues (String category){\n\t\tFile file = new File(\"data/games_module\", category);\n\t\t// writing 5 random clues to the category file chosen if file is empty\n\t\tif (file.length() == 0) {\n\t\t\tList<String> clues = new ArrayList<String>();\n\t\t\tclues = _nzData.get(category);\n\t\t\tCollections.shuffle(clues);\n\t\t\tList<String> temp = new ArrayList<String>();\n\t\t\tfor (int i = 0; i<5;i++) {\n\t\t\t\ttemp.add(clues.get(i));\n\t\t\t\tBashCmdUtil.bashCmdNoOutput(String.format(\"echo \\\"%s\\\" >> data/games_module/\\\"%s\\\"\",clues.get(i), category));\n\t\t\t}\n\t\t\t_fiveRandomClues = temp;\n\t\t}\n\t\telse {\n\t\t\ttry {\n\t\t\t\tScanner myReader = new Scanner(file);\n\t\t\t\tList<String> temp= new ArrayList<String>();\n\t\t\t\twhile(myReader.hasNextLine()) {\n\t\t\t\t\tString fileLine = myReader.nextLine();\n\t\t\t\t\ttemp.add(fileLine);\n\t\t\t\t}\n\t\t\t\t_fiveRandomClues = new ArrayList<String>(temp);\n\t\t\t\tmyReader.close();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t}", "@Override\n public void initialize(URL url, ResourceBundle rb) { \n loadNouveaux();\n loadTerrains(); \n \n }", "public void ReiniciarPalabra() {\n\t\t\n\t\t/*limpiarCasillero();*/\n\t\t\t\t\n\t\tString palabra = palabras[(int)(Math.random()*5)];\n\t\t\n\t\tSystem.out.println(\" \"+palabra+\" \"+palabra.length());\n\t\t\n\t\tMostrarCasillero(palabra);\n\t\t\n\t\t\n\t}", "public String generateQuestion(){\r\n qType = rand.nextInt(2);\r\n if (qType ==0)\r\n return \"Multiple choice question.\";\r\n else\r\n return \"Single choice question.\";\r\n }", "private void initNature() {\n int N = 100;\n int MOD = 10;\n switch (nature) {\n case \"Hardy\": { natureStats = new Stats(0, N, N, N, N, N); break; }\n case \"Lonely\": { natureStats = new Stats(0, N + MOD, N - MOD, N, N, N); break; }\n case \"Adamant\": { natureStats = new Stats(0, N + MOD, N, N - MOD, N, N); break; }\n case \"Naughty\": { natureStats = new Stats(0, N + MOD, N, N, N - MOD, N); break; }\n case \"Brave\": { natureStats = new Stats(0, N + MOD, N, N, N, N - MOD); break; }\n\n case \"Bold\": { natureStats = new Stats(0, N - MOD, N + MOD, N, N, N); break; }\n case \"Docile\": { natureStats = new Stats(0, N, N, N, N, N); break; }\n case \"Impish\": { natureStats = new Stats(0, N, N + MOD, N - MOD, N, N); break; }\n case \"Lax\": { natureStats = new Stats(0, N, N + MOD, N, N - MOD, N); break; }\n case \"Relaxed\": { natureStats = new Stats(0, N, N + MOD, N, N, N - MOD); break; }\n\n case \"Modest\": { natureStats = new Stats(0, N - MOD, N, N + MOD, N, N); break; }\n case \"Mild\": { natureStats = new Stats(0, N, N - MOD, N + MOD, N, N); break; }\n case \"Bashful\": { natureStats = new Stats(0, N, N, N, N, N); break; }\n case \"Rash\": { natureStats = new Stats(0, N, N, N + MOD, N - MOD, N); break; }\n case \"Quiet\": { natureStats = new Stats(0, N, N, N + MOD, N, N - MOD); break; }\n\n case \"Calm\": { natureStats = new Stats(0, N - MOD, N, N, N + MOD, N); break; }\n case \"Gentle\": { natureStats = new Stats(0, N, N - MOD, N, N + MOD, N); break; }\n case \"Careful\": { natureStats = new Stats(0, N, N, N - MOD, N + MOD, N); break; }\n case \"Quirky\": { natureStats = new Stats(0, N, N, N, N, N); break; }\n case \"Sassy\": { natureStats = new Stats(0, N, N, N, N + MOD, N - MOD); break; }\n\n case \"Timid\": { natureStats = new Stats(0, N - MOD, N, N, N, N + MOD); break; }\n case \"Hasty\": { natureStats = new Stats(0, N, N - MOD, N, N, N + MOD); break; }\n case \"Jolly\": { natureStats = new Stats(0, N, N, N - MOD, N, N + MOD); break; }\n case \"Naive\": { natureStats = new Stats(0, N, N, N, N - MOD, N + MOD); break; }\n case \"Serious\": { natureStats = new Stats(0, N, N, N, N, N); break; }\n }\n }", "public void randomGenre(View view) {\r\n String[] randomGenre = {\"Rock\", \"Funk\", \"Hip hop\", \"Country\", \"Pop\", \"Blues\", \"K-pop\", \"Punk\", \"House\", \"Soul\"};\r\n int index = (int) (Math.random() * 10);\r\n displayMessage(\"Your random genre is: \" + randomGenre[index]);\r\n }", "private void findResourcesFake() {\r\n\t\t\r\n\t\tRandom random = new Random();\t\r\n\t\t\r\n\t\t\t\t\t\t\r\n\t\tif (random.nextInt() % 10 == 0) {PoCOnline.setSelected(true); loadContainerOnline.setSelected(true);}\t\r\n\t\tif (random.nextInt() % 10 == 0) {fillRedOnline.setSelected(true);}\r\n\t\tif (random.nextInt() % 10 == 0) {fillYellowOnline.setSelected(true);}\r\n\t\tif (random.nextInt() % 10 == 0) {fillBlueOnline.setSelected(true);}\r\n\t\tif (random.nextInt() % 10 == 0) {testOnline.setSelected(true);}\r\n\t\tif (random.nextInt() % 10 == 0) {lidOnline.setSelected(true);}\r\n\t\tif (random.nextInt() % 10 == 0) {dispatchOnline.setSelected(true);}\t\t\r\n\t\t\r\n\t\t\r\n\t}", "private void generarNombre() {\r\n\t\tthis.nombre = NOMBRES[(int) (Math.random() * NOMBRES.length)];\r\n\t}", "private void showRandomBathingSite() {\n getLoaderManager().restartLoader(1, null, this);\n }", "@GET\n @Path(\"/randomquestion\")\n public String getRandomQuestion() {\n return \"test\";\n //return map.keySet().toArray()[ThreadLocalRandom.current().nextInt(1, map.size())].toString();\n }", "public static void init()\n\t{\n\t\t\n\t\tu.creerGalaxie(\"VoieLactee\", \"spirale\", 0);\n\t\tu.creerEtoile(\"Soleil\", 0, 'F', u.getGalaxie(\"VoieLactee\")); //1\n\t\tu.creerObjetFroid(\"Terre\", 150000 , 13000 , 365 , u.getObjet(1)); //2\n\n\t\tu.creerObjetFroid(\"Lune\", 200 , 5000 , 30 , u.getObjet(2)); //3\n\n\t\tu.creerObjetFroid(\"Mars\", 200000 , 11000 , 750 , u.getObjet(1)); //4\n\n\t\tu.creerObjetFroid(\"Phobos\", 150 , 500 , 40 , u.getObjet(4)); //5\n\n\t\tu.creerObjetFroid(\"Pluton\", 1200000 , 4000 , 900 , u.getObjet(1)); //6\n\n\t\tu.creerEtoile(\"Sirius\", 2, 'B', u.getGalaxie(\"VoieLactee\")); //7\n\n\t\tu.creerObjetFroid(\"BIG-1\", 1000 , 50000 , 333 , u.getObjet(7)); //8\n\n\t\tu.creerGalaxie(\"M31\", \"lenticulaire\", 900000);\n\t\tu.creerEtoile(\"XS67\", 8, 'F', u.getGalaxie(\"M31\")); //9\n\t\tu.creerObjetFroid(\"XP88\", 160000 , 40000 , 400 , u.getObjet(9)); //10\n\t}", "public void rollRandom() {\n\t\tthis.strength = randomWithRange();\r\n\t\tthis.wisdom = randomWithRange();\r\n\t\tthis.dexterity = randomWithRange();\r\n\t\tthis.constitution = randomWithRange();\r\n\t\tthis.intelligence = randomWithRange();\r\n\t\tthis.charisma = randomWithRange();\r\n\t}", "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}", "final void moureExercit(final Main campB) {\n\n Random r = new Random();\n\n int indexRandom = r.nextInt(soldats.size());\n\n if (!soldats.get(indexRandom).isHaArribat()) {\n soldats.get(indexRandom).mouSoldat(ubicacio, campB);\n\n }\n\n }", "@Test\n public void testRandom() {\n Scanner l;\n ByteArrayInputStream bais = new ByteArrayInputStream(\"sana\\nvastine\\n\".getBytes());\n l = new Scanner(bais);\n KyselyLogiikka k = new KyselyLogiikka(l);\n ArrayList<KysSana> a = new ArrayList<KysSana>();\n a.add(new KysSana(\"sana\", \"vastine\"));\n\n String kysymys = k.random(true);\n\n\n assertEquals(\"Random ei kysy sanaa\", \"sana\", kysymys);\n }", "private static void load(){\n }", "private void renewWordLevel4()\n {\n givenWord = availableWords.randomWordLevel4();\n shuffedWord = availableWords.shuffleWord(givenWord);\n textViewShuffle.setText(shuffedWord);\n }", "private void generarColor() {\r\n\t\tthis.color = COLORES[(int) (Math.random() * COLORES.length)];\r\n\t}", "public static void load() {\n\t\t// manager.load(camp_fire);\r\n\t\t// manager.load(camp_fire_burntout);\r\n\t\t//\r\n\t\t// manager.load(fire_stick);\r\n\t\t// manager.load(fire_stick_burntout);\r\n\t\t//\r\n\t\t// manager.load(stockpile);\r\n\t\t// manager.load(worker);\r\n\t\t//\r\n\t\t// manager.load(icon_wood);\r\n\t\t//\r\n\t\tmanager.load(worker_ant);\r\n\t\tmanager.setLoader(FreeTypeFontGenerator.class,\r\n\t\t\t\tnew FreeTypeFontGeneratorLoader(new InternalFileHandleResolver()));\r\n\t\tmanager.load(dialog);\r\n\t}", "private String randomResponse()\r\n\t{\r\n\t\t\tpatience--;\r\n\t\t\tif (patience==0)\r\n\t\t\t{\r\n\t\t\t\tString[] randomArray = {\"Huh?\",\"Can you rephrase that in reptilian for me?\",\"Sorry I don't understand.\"\r\n\t\t\t\t\t\t,\"Hmmm\",\"Hmph\"};\r\n\t\t\t\tRandom rand = new Random();\r\n\t\t\t\tint i = rand.nextInt(4)+0;\r\n\t\t\t\treturn randomArray[i];\r\n\t\t\t}\t\r\n\t\t\telse if (patience <= 0)\r\n\t\t\t{\r\n\t\t\t\tString[] randomImpatientArray = {\"Hiss\",\"Can you please use your words correctly to speak\",\">:(((\",\"Your pushing my limit\",\"You were here... Now your here!!\",\"ok.....\"};\r\n\t\t\t\tRandom rand = new Random();\r\n\t\t\t\tint i = rand.nextInt(5)+0;\r\n\t\t\t\treturn randomImpatientArray[i];\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\tString[] randomPatientArray = {\"Hey can you please say that again.\",\"Excuse me but I don't understand\",\"Oh okay!Interesting\",\"Yeah yeah totally\"};\r\n\t\t\t\tRandom rand = new Random();\r\n\t\t\t\tint i = rand.nextInt(3)+0;\r\n\t\t\t\treturn randomPatientArray[i];\r\n\t\t\t}\r\n\t}", "private TetrisPiece randomPiece() {\n\t\tint rand = Math.abs(random.nextInt());\n\t\treturn new TetrisPiece(rand % (PIECE_COLORS.length));\n\t}", "void gatherInfoBeforePopulating (){\n\t\t\n\t\tcategoryId = Trivia_Game.getCategoryIdInMainMenu();\n\n\t \t //Loop until a valid questionId that hasn't been used is obtained\n\t \t\twhile (validQuestionNumber == false){\n\t \t\t\trandomValue0to29 = RandomGenerator0To29();\n\t \t\t\tSystem.out.println(\"random30 in onClick = \" + randomValue0to29);\n\n\t \t\t alreadyDisplayQuestion = questionsAlreadyDisplayed (randomValue0to29);\n\t \t\t if (alreadyDisplayQuestion == true){\n\t \t\t\t System.out.println(\"question number already displayed looking for a non displayed question\");\n\t \t\t }\n\t \t\t if (alreadyDisplayQuestion == false){\n\t \t\t\t System.out.println(\"question not displayed yet\");\n\t \t\t\t validQuestionNumber = true;\n\t \t\t }\n\t \t }\n\t \t \n\t \t validQuestionNumber = false;\n\t \t alreadyDisplayQuestion = false;\n\t \t questionId = randomValue0to29;\t//sets the valid random generated number to the questionID\n\t \t \n\t \t //connect to database to gather the question and answers\n\t \t getInfoFromDatabase(categoryId, questionId);\n \t\n\t \t //Calls random number from 0 to 3 to determine which button will display the correct answer\n\t \t randomValueZeroToThree = RandomGeneratorZeroToThree();\n\t \t System.out.println(\"random4 in onClick = \" + randomValueZeroToThree);\n\t \t \n\t \t //Sets the order according to the button that is to display the correct answer\n\t \t switch (randomValueZeroToThree){\n\t \t \tcase 0:\n\t \t \t\tdisplayedAnswer1FromDatabase = answer1FromDatabase;\t//correct answer\n\t \t \t\tdisplayedAnswer2FromDatabase = answer2FromDatabase;\n\t \t \t\tdisplayedAnswer3FromDatabase = answer3FromDatabase;\n\t \t \t\tdisplayedAnswer4FromDatabase = answer4FromDatabase;\n\t \t \t\trightButton1 = true;\n\t \t \t\trightButton2 = false;\n\t \t \t\trightButton3 = false;\n\t \t \t\trightButton4 = false;\n\t \t \t\tbreak;\n\t \t \t\t\n\t \t \tcase 1:\n\t \t \t\tdisplayedAnswer2FromDatabase = answer1FromDatabase;\t//correct answer\n\t \t \t\tdisplayedAnswer1FromDatabase = answer2FromDatabase;\n\t \t \t\tdisplayedAnswer3FromDatabase = answer3FromDatabase;\n\t \t \t\tdisplayedAnswer4FromDatabase = answer4FromDatabase;\n\t \t \t\trightButton1 = false;\n\t \t \t\trightButton2 = true;\n\t \t \t\trightButton3 = false;\n\t \t \t\trightButton4 = false;\n\t \t \t\tbreak;\n\t \t \t\n\t \t \tcase 2:\n\t \t \t\tdisplayedAnswer3FromDatabase = answer1FromDatabase;\t//correct answer\n\t \t \t\tdisplayedAnswer1FromDatabase = answer2FromDatabase;\n\t \t \t\tdisplayedAnswer2FromDatabase = answer3FromDatabase;\n\t \t \t\tdisplayedAnswer4FromDatabase = answer4FromDatabase;\n\t \t \t\trightButton1 = false;\n\t \t \t\trightButton2 = false;\n\t \t \t\trightButton3 = true;\n\t \t \t\trightButton4 = false;\n\t \t \t\tbreak;\n\t \t \t\t\n\t \t \tcase 3:\n\t \t \t\tdisplayedAnswer4FromDatabase = answer1FromDatabase;\t//correct answer\n\t \t \t\tdisplayedAnswer1FromDatabase = answer2FromDatabase;\n\t \t \t\tdisplayedAnswer3FromDatabase = answer3FromDatabase;\n\t \t \t\tdisplayedAnswer2FromDatabase = answer4FromDatabase;\n\t \t \t\trightButton1 = false;\n\t \t \t\trightButton2 = false;\n\t \t \t\trightButton3 = false;\n\t \t \t\trightButton4 = true;\n\t \t \t\tbreak;\n\t \t \t\n\t \t \tdefault: \n\t \t \t\tdisplayedAnswer1FromDatabase = answer4FromDatabase;\t//no correct answer\n\t \t \t\tdisplayedAnswer2FromDatabase = answer2FromDatabase;\n\t \t \t\tdisplayedAnswer3FromDatabase = answer3FromDatabase;\n\t \t \t\tdisplayedAnswer4FromDatabase = answer1FromDatabase;\t\n\t \t \t\trightButton1 = false;\n\t \t \t\trightButton2 = false;\n\t \t \t\trightButton3 = false;\n\t \t \t\trightButton4 = false;\n\t \t \t\t\n \t }\n\t \n\t // After the 9th question is displayed, the nextOfFinishValue should be set to 1 so the button displayes Finish instead of Next\n \t if (numberOfQuestionsDisplayedCounter < 9){\n\t \t\t\tnextOrFinishValue = 0;\n\t \t\t}\n\t \t\telse{\n\t \t\t\tnextOrFinishValue = 1;\n\t \t\t}\n\t\t\n\t}", "private void setLoaded1() {\r\n\t\tdiceRoll1 = (int) (Math.random() * 6) + 1;\r\n\t}", "public Lecture() {\n\t\tthis.name = \"default lecture name\";\n\t\tthis.credits = 1.0;\n\t\tSystem.out.println(\"lecture created\");\n\t}", "private RandomData() {\n initFields();\n }", "public static void intro() {\n printHighlighted(\"SECRET SANTA\");\n printHighlighted(\"This program allows you to add the participants of the\");\n printHighlighted(\"game and assign them matches to send and receive gifts.\");\n }", "private void renewWord() {\n givenWord = availableWords.randomWordLevel1();\n shuffedWord = availableWords.shuffleWord(givenWord);\n textViewShuffle.setText(shuffedWord);\n }", "private static String RandomCash() {\n\t\tint max = 0;\n\t\tint min = 100000;\n\t\tint range = max - min + 1;\n\t\t\n\t\tString text=null;\n\t\ttry {\n\t\t\t\n\t\t\tint random = (int) (Math.random() * (range) + min);\n\t\t\ttext = formatted(\"###,###\", random)+\" VNĐ\";\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn text;\n\t}", "public void testRand()\n throws IOException, FileNotFoundException\n {\n compareValues(PATH + \"randtable.txt\", PATH + \"RandPair.txt\", FACTORY);\n }", "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 }", "private void initCultistCardDeck(){\n unusedCultist = new ArrayList<Cultist>();\n \n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 1));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 2));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 1));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 2));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 1));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 1));\n \n Collections.shuffle(unusedCultist);\n }", "private String creatNewText() {\n\t\tRandom rnd = new Random();\n\t\treturn \"Some NEW teXt U9\" + Integer.toString(rnd.nextInt(999999));\n\t}", "private void chooseBreedToBeIdentified() {\n Random r = new Random();\n int questionBreedIndex = r.nextInt(3);\n\n questionCarMake = displayingCarMakes.get(questionBreedIndex);\n carMakeNameTitle.setText(questionCarMake);\n }", "@Override\n public String next() {\n Random random = new Random();\n return fruits[random.nextInt(3)];\n }", "private void randomizePuzzle() {\n\t\t// Choose random puzzles, shuffle the options.\n\t\tthis.puzzle = BarrowsPuzzleData.PUZZLES[(int) (Math.random() * BarrowsPuzzleData.PUZZLES.length)];\n\t\tthis.shuffledOptions = shuffleIntArray(puzzle.getOptions());\n\t}", "public static String enemigos(){\n int numeroEnemigo; //variables locales a utilizar\n String enemigoSeleccionado;\n Random numeroAleatorio = new Random(); //declarando variables tipo random para aleatoriedad\n \n numeroEnemigo= (numeroAleatorio.nextInt(3)+1);\n //comparando los enemigos disponibles\n switch(numeroEnemigo){\n case 1:{\n enemigoSeleccionado= \"Dark_Wolf\";\n\t\t puntosDeVidaEnemigo=150;\n return enemigoSeleccionado;//retornando a enemigo Dark\n }\n case 2:{\n enemigoSeleccionado= \"Dragon\";\n\t\t puntosDeVidaEnemigo=155;\n return enemigoSeleccionado;//retornando a enemigo Dragon\n }\n default:{\n enemigoSeleccionado= \"Migthy_Golem\";\n\t\t puntosDeVidaEnemigo=160;\n return enemigoSeleccionado;//retornando a enemigo Golem \n }\n } \n }", "@Override\n public String getString(String key) {\n return getStringFromBundle(key, BASE_STRING) + \" \" + random.nextInt(RANDOM_INT_BOUND);\n }", "public String chooseWord(){\n\t\tRandom a = new Random();\t\t\r\n\t\t\r\n\t\tint randomNumber = a.nextInt(words.length);\r\n\t\t\r\n\t\tString gameWord = words[randomNumber];\r\n\t\t\r\n\t\treturn gameWord;\r\n\t\t\t\t\r\n\t}", "private void initializeVariables() {\n rnd = new Random();\n\n pieceKind = rnd.nextInt() % 7;\n if(pieceKind < 0) pieceKind *= -1;\n pieceKind2 = rnd.nextInt() % 7;\n if(pieceKind2 < 0) pieceKind2 *= -1;\n\n piece = new Piece(pieceKind,this);\n newPiece();\n startedGame = true;\n\n for(i=0; i<276; i++) {\n modulo = i%12;\n if(modulo == 0 || modulo == 11 || i>251) {\n matrix[i] = 0; colMatrix[i] = true;\n } else {\n matrix[i] = -1; colMatrix[i] = false;\n }\n }\n\n for(i=0; i<5; i++) completeLines[i] = -1;\n for(i=0; i<4; i++) keybl.setMovTable(i, false);\n }", "public LamBaiThi(Integer testId) {\n initComponents();\n setBounds(50,50,850,610);\n setResizable(false);\n \n tfStuId.setText(String.valueOf(IDS));\n tfDate.setText(java.time.LocalDate.now().toString());\n System.out.println(testId);\n testID = testId;\n deThi=SingletonBusUtil.getDeThiBUSInstance().findById(testId);\n tfSub.setText(deThi.getMonHocDTO().getTenMonHoc()); \n listQuestion = SingletonBusUtil.getDeThiBUSInstance().getCauHoiByMaDe(testId);\n amountQue = listQuestion.size();\n Collections.shuffle(listQuestion);\n addTime();\n showQuestion(1);\n setCbQuestion();\n \n }", "public static void load() {\n\t\tspritesheet = new Spritesheet(\"src/de/kaffeeliebhaber/assets/pyxel/voland_spritesheet_new.png\", 32, 32);\n\t\tspritesheet.load();\n\t\t\n\t\t// load player\n\t\tAssetsLoader.loadPlayerAssets();\n\t\t\n\t\t// load crate\n\t\tAssetsLoader.loadCrates();\n\t\t\n\t\t// load item spritesheet \n\t\tspritesheetInventory = new Spritesheet(Config.ITEM_SPRITESHEET, Config.ITEM_SIZE, Config.ITEM_SIZE);\n\t\tspritesheetInventory.load();\n\t\t\n\t\t// load font \n\t\tloadFonts();\n\t\t\n\t\t// ui\n\t\timageUI = ImageLoader.loadImage(\"src/de/kaffeeliebhaber/assets/ui/ui.png\");\n\t\t\n\t\tAssetsLoader.loadInfoPaneAssets();\n\t\t\n\t\t// npc\n\t\tspritesheetNPC = new Spritesheet(\"src/de/kaffeeliebhaber/assets/AH_SpriteSheet_People1.png\", 16, 16);\n\t\tspritesheetNPC.load();\n\t\t\n\t\t// fox\n\t\tspritesheetNPCFox = new Spritesheet(\"src/de/kaffeeliebhaber/assets/imgs/72c68863962b7a6b5a9f5f5bcc5afb16.png\", 32, 32);\n\t\tspritesheetNPCFox.load();\n\n\t\t// *** LOAD NPCs\n\t\tAssetsLoader.loadFoxAssets();\n\t\t\n\t\tAssetsLoader.loadNPCs();\n\t\t\n\t\tspritesheetFemale = new Spritesheet(\"src/de/kaffeeliebhaber/assets/imgs/Female 01-1.png\", 32, 32);\n\t\tspritesheetFemale.load();\n\t}", "Lingua getLingua();", "public String getWhat() {\n\n\t\tString[] whatArray = new String[]{\n\t\t\t\t\"My lawyer says I don't need to answer this question\",\n\t\t\t\t\"Are you really asking me this right now?\",\n\t\t\t\t\"That was underwhelming. Try harder.\",\n\t\t\t\t\"What? What indeed.\",\n\t\t\t\t\"I think you should ask Siri that one. I really don't know what that is.\",\n\t\t\t\t\"Simon says: Everything is an object.\",\n\t\t\t\t\"You should ask STP, he's a really smart guy. Without his teaching, my creators would not have created me.\",\n\t\t\t\t\"That's a tough question to answer. Let's talk about cats instead. Meow?\"\n\t\t};\n\t\tRandom random = new Random();\n\t\tint index = random.nextInt(whatArray.length);\n\t\treturn whatArray[index];\t\n\t}", "public void loadConstNames() {\r\n \tloadHerculesNames();\r\n \tloadUrsaMinorNames();\r\n \tloadUrsaMajorNames();\r\n \tloadLibraNames();\r\n \tloadAndromedaNames();\r\n \tloadAquariusNames();\r\n \tloadAquilaNames();\r\n \tloadAriesNames();\r\n \tloadAurigaNames();\r\n \tloadBootesNames();\r\n \tloadCancerNames();\r\n \tloadCanisMajorNames();\r\n \tloadCanisMinorNames();\r\n \tloadCapricornusNames();\r\n \tloadCassiopeiaNames();\r\n \tloadCentaurusNames();\r\n \tloadCepheusNames();\r\n \tloadCruxNames();\r\n \tloadCygnusNames();\r\n \tloadDracoNames();\r\n \tloadGeminiNames();\r\n \tloadHydraNames();\r\n \tloadLeoNames();\r\n \tloadLyraNames();\r\n \tloadOrionNames();\r\n \tloadPegasusNames();\r\n \tloadPerseusNames();\r\n \tloadPiscesNames();\r\n \tloadSagittariusNames();\r\n \tloadScorpioNames();\r\n \tloadTaurusNames();\r\n }", "@Override\n\tpublic String getFortune() {\n\t\tint index = random.nextInt(data.length);\n\t\t\n\t\tString fortune = data[index];\n\t\t\n\t\treturn fortune;\n\t}", "static void SampleItinerary()\n {\n System.out.println(\"\\n ***Everyone piles on the boat and goes to Molokai***\");\n\n bg.AdultRowToMolokai();\n bg.ChildRideToMolokai();\n bg.AdultRideToMolokai();\n bg.ChildRideToMolokai();\n }", "@Nullable public abstract String loadVerseText(int ari);", "private IUnit getRandomListUnit(){\n\t\treturn unitList.get(rnd.nextInt(unitListSize()));\n\t}" ]
[ "0.60932875", "0.59138876", "0.5735523", "0.5717701", "0.56244975", "0.5611132", "0.5599201", "0.55754465", "0.55713695", "0.5569406", "0.55656147", "0.5557957", "0.5507272", "0.54931587", "0.54413605", "0.5414515", "0.54086655", "0.53604496", "0.5349609", "0.534924", "0.53412527", "0.53249824", "0.53248185", "0.5323759", "0.5309258", "0.52947366", "0.5282717", "0.527975", "0.5274657", "0.52502173", "0.5246138", "0.524509", "0.52363276", "0.5234572", "0.522657", "0.52222526", "0.5213966", "0.5212095", "0.52067715", "0.52022105", "0.519754", "0.5196705", "0.5188681", "0.5185588", "0.51774967", "0.5175446", "0.5166887", "0.51655006", "0.5161209", "0.515705", "0.5156258", "0.5148574", "0.51451796", "0.5137818", "0.5137763", "0.5133382", "0.51214224", "0.51213163", "0.5113094", "0.510859", "0.51059866", "0.51001555", "0.5095894", "0.50749373", "0.507355", "0.50712985", "0.50708", "0.50707847", "0.50691813", "0.5069153", "0.50652933", "0.5057679", "0.50516844", "0.50488555", "0.50475043", "0.5045079", "0.5031634", "0.50311196", "0.5028238", "0.50187093", "0.501854", "0.5016526", "0.50148004", "0.5012296", "0.50059795", "0.50045645", "0.50018924", "0.5001793", "0.49979913", "0.49967587", "0.49965423", "0.49903134", "0.49894348", "0.4983807", "0.4971602", "0.4969595", "0.49684232", "0.4967186", "0.49644506", "0.49642977" ]
0.69007355
0
Load the clue from five randomly chosen clues.
public void loadClue(String category,int index) { String clue = _gamesData.get(category).get(index); try { _currentClue = new Clue (clue,(index+1)*100); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setFiveRandomClues (String category){\n\t\tFile file = new File(\"data/games_module\", category);\n\t\t// writing 5 random clues to the category file chosen if file is empty\n\t\tif (file.length() == 0) {\n\t\t\tList<String> clues = new ArrayList<String>();\n\t\t\tclues = _nzData.get(category);\n\t\t\tCollections.shuffle(clues);\n\t\t\tList<String> temp = new ArrayList<String>();\n\t\t\tfor (int i = 0; i<5;i++) {\n\t\t\t\ttemp.add(clues.get(i));\n\t\t\t\tBashCmdUtil.bashCmdNoOutput(String.format(\"echo \\\"%s\\\" >> data/games_module/\\\"%s\\\"\",clues.get(i), category));\n\t\t\t}\n\t\t\t_fiveRandomClues = temp;\n\t\t}\n\t\telse {\n\t\t\ttry {\n\t\t\t\tScanner myReader = new Scanner(file);\n\t\t\t\tList<String> temp= new ArrayList<String>();\n\t\t\t\twhile(myReader.hasNextLine()) {\n\t\t\t\t\tString fileLine = myReader.nextLine();\n\t\t\t\t\ttemp.add(fileLine);\n\t\t\t\t}\n\t\t\t\t_fiveRandomClues = new ArrayList<String>(temp);\n\t\t\t\tmyReader.close();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t}", "public Clue getRandomClue()\n {\n HashMap<String, Clue> usableClues = getUseableClues();\n ArrayList<Clue> list = new ArrayList<>(usableClues.values());\n int i = rand.nextInt(usableClues.size());\n return list.get(i);\n }", "public void setFiveRandomCategories () {\n\t\t//create a file to store the selected five categories\n\t\tBashCmdUtil.bashCmdNoOutput(\"mkdir -p data\");\n\t\tFile five_random_categories = new File (\"data/five_random_categories\");\n\t\tif (!five_random_categories.exists()) {\n\t\t\tBashCmdUtil.bashCmdNoOutput(\"touch data/five_random_categories\");\n\t\t}\n\t\t// if five random categories dont exist, i.e. new game being started\n\t\tif (five_random_categories.length() == 0) {\n\t\t\tList<String> shuffledCategories = new ArrayList<String>(_nzCategories);\n\t\t\tCollections.shuffle(shuffledCategories);\n\t\t\tString str = \"\";\n\t\t\tfor (int i = 0; i < 5; i++) {\n\t\t\t\ttry {\n\t\t\t\t\t//create files that are used to store the clues of \n\t\t\t\t\t//the selected five categories\n\t\t\t\t\tFile dir = new File (\"data/games_module\");\n\t\t\t\t\tif (!dir.exists()) {\n\t\t\t\t\t\tdir.mkdir();\n\t\t\t\t\t}\n\t\t\t\t\tFile file = new File(dir,shuffledCategories.get(i));\n\t\t\t\t\tif (!file.exists()) {\n\t\t\t\t\t\tfile.createNewFile();\n\t\t\t\t\t}\t\t\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t_fiveRandomCategories.add(shuffledCategories.get(i));\n\t\t\t\tsetFiveRandomClues(shuffledCategories.get(i));\n\t\t\t\tstr = str + shuffledCategories.get(i) + \",\";\n\t\t\t\t_gamesData.put(shuffledCategories.get(i), _fiveRandomClues);\n\t\t\t}\n\t\t\tBashCmdUtil.bashCmdNoOutput(String.format(\"echo \\\"%s\\\" >> data/five_random_categories\",str));\n\t\t}\n\t\telse { // if files already exist, i.e. the game has already started\n\t\t\tBufferedReader reader;\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\treader = new BufferedReader(new FileReader(\"data/five_random_categories\"));\n\t\t\t\tString line = reader.readLine();\n\t\t\t\tstr = line;\n\t\t\t\treader.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tString[] splitStr = str.split(\",\");\n\t\t\tfor (int i = 0; i<5;i++) {\n\t\t\t\t_fiveRandomCategories.add(splitStr[i]);\n\t\t\t\tsetFiveRandomClues(splitStr[i]);\n\t\t\t\t_gamesData.put(splitStr[i], _fiveRandomClues);\n\t\t\t}\n\t\t}\n\t}", "public void shuffle () {\n this.lives = 6;\n this.attempts.clear();\n this.victory = false;\n this.lose = false;\n Random r = new Random ();\n this._word = _dictionary[r.nextInt(_dictionary.length)];\n // this._word = _dictionary[2]; // Testing purposes\n this.hint.setLength(0);\n for (int i = 0; i < _word.length(); i++) {\n this.hint.append(\"_ \");\n } \n }", "private int getRandomPiece() {\r\n return new Random().nextInt(Constants.NUM_PIECES);\r\n }", "@Test public void testPlayBoardCluesRep() throws IOException {\n CrosswordBoard okBoard = new CrosswordBoard(\"puzzles/test.puzzle\");\n // check name and description of puzzle\n assertEquals(\"ANIMALS\", okBoard.getName());\n assertEquals(\"One particular animal\", okBoard.getDescription());\n // check that clues gets the right clues\n Map<String, String> getClues = Map.of(\"1DOWN\", \"winged mammal\", \"2ACROSS\", \"feline companion\");\n for (String key : getClues.keySet()) {\n assertEquals(getClues.get(key), okBoard.getClues().get(key));\n }\n // makes sure that a change in the copy doesn't change rep in clues\n getClues = okBoard.getClues();\n getClues.replace(\"1DOWN\", \"animal of the night\");\n assertEquals(getClues.keySet().size(), okBoard.getClues().size());\n assertEquals(\"winged mammal\", okBoard.getClues().get(\"1DOWN\"));\n\n // test play board initially\n List<List<CrosswordCharacter>> expectedPlayBoard = new ArrayList<>();\n expectedPlayBoard.add(List.of(new CrosswordCharacter(), new CrosswordCharacter('_', 1, Direction.DOWN, true),\n new CrosswordCharacter()));\n expectedPlayBoard.add(List.of(new CrosswordCharacter('_', 2, Direction.ACROSS, true),\n new CrosswordCharacter('_', 2, Direction.ACROSS, false),\n new CrosswordCharacter('_', 2, Direction.ACROSS, false)));\n expectedPlayBoard.add(List.of(new CrosswordCharacter(), new CrosswordCharacter('_', 1, Direction.DOWN, false),\n new CrosswordCharacter()));\n List<List<CrosswordCharacter>> getPlayBoard = okBoard.getPlayBoard();\n for (int i = 0; i < expectedPlayBoard.size(); i++) {\n for (int j = 0; j < expectedPlayBoard.get(0).size(); j++) {\n assertEquals(expectedPlayBoard.get(i).get(j).getChar(), getPlayBoard.get(i).get(j).getChar());\n }\n }\n // test play board after one turn\n assertEquals(Outcome.SUCCESS, okBoard.tryWord(\"1DOWN\", \"Cat\", \"p1\"));\n expectedPlayBoard.clear();\n expectedPlayBoard.add(List.of(new CrosswordCharacter(), new CrosswordCharacter('c', 1, Direction.DOWN, true),\n new CrosswordCharacter()));\n expectedPlayBoard.add(List.of(new CrosswordCharacter('_', 2, Direction.ACROSS, true),\n new CrosswordCharacter('a', 2, Direction.ACROSS, false),\n new CrosswordCharacter('_', 2, Direction.ACROSS, false)));\n expectedPlayBoard.add(List.of(new CrosswordCharacter(), new CrosswordCharacter('t', 1, Direction.DOWN, false),\n new CrosswordCharacter()));\n getPlayBoard = okBoard.getPlayBoard();\n for (int i = 0; i < expectedPlayBoard.size(); i++) {\n for (int j = 0; j < expectedPlayBoard.get(0).size(); j++) {\n assertEquals(expectedPlayBoard.get(i).get(j).getChar(), getPlayBoard.get(i).get(j).getChar());\n }\n }\n // test play board after two turns\n assertEquals(Outcome.SUCCESS, okBoard.tryChallenge(\"1DOWN\", \"bat\", \"p2\"));\n expectedPlayBoard.clear();\n expectedPlayBoard.add(List.of(new CrosswordCharacter(), new CrosswordCharacter('b', 1, Direction.DOWN, true),\n new CrosswordCharacter()));\n expectedPlayBoard.add(List.of(new CrosswordCharacter('_', 2, Direction.ACROSS, true),\n new CrosswordCharacter('a', 2, Direction.ACROSS, false),\n new CrosswordCharacter('_', 2, Direction.ACROSS, false)));\n expectedPlayBoard.add(List.of(new CrosswordCharacter(), new CrosswordCharacter('t', 1, Direction.DOWN, false),\n new CrosswordCharacter()));\n getPlayBoard = okBoard.getPlayBoard();\n for (int i = 0; i < expectedPlayBoard.size(); i++) {\n for (int j = 0; j < expectedPlayBoard.get(0).size(); j++) {\n assertEquals(expectedPlayBoard.get(i).get(j).getChar(), getPlayBoard.get(i).get(j).getChar());\n }\n }\n // makes sure that a change in the copy doesn't change rep in playBoard\n expectedPlayBoard = okBoard.getPlayBoard();\n expectedPlayBoard.get(0).set(1, new CrosswordCharacter('a', 1, Direction.DOWN, true));\n for (int i = 0; i < expectedPlayBoard.size(); i++) {\n for (int j = 0; j < expectedPlayBoard.get(0).size(); j++) {\n if (i == 0 && j == 1) {\n assertFalse(expectedPlayBoard.get(i).get(j).getChar() == getPlayBoard.get(i).get(j).getChar());\n continue;\n }\n assertEquals(expectedPlayBoard.get(i).get(j).getChar(), getPlayBoard.get(i).get(j).getChar());\n }\n }\n }", "private void randomizePuzzle() {\n\t\t// Choose random puzzles, shuffle the options.\n\t\tthis.puzzle = BarrowsPuzzleData.PUZZLES[(int) (Math.random() * BarrowsPuzzleData.PUZZLES.length)];\n\t\tthis.shuffledOptions = shuffleIntArray(puzzle.getOptions());\n\t}", "public void loadRandomClue(String module, String category) {\n\t\tList<String> clues = new ArrayList<String>();\n\t\tif (module == \"nz\") {\n\t\t\tclues = _nzData.get(category);\n\t\t} else if (module == \"int\"){\n\t\t\tclues = _intData.get(category);\n\t\t}\n\t\tint size = clues.size();\n\t\tRandom rand = new Random();\n\t\tint randomIndex = rand.nextInt(size);\n\t\ttry {\n\t\t\t_currentClue = new Clue(clues.get(randomIndex));\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void randomCivic() {\n\n\t\tpol = new String[polArr.size()];\n\t\tfor (int i = 0; i < polArr.size(); i++) {\n\t\t\tint size = (int) (Math.random() * (polArr.get(i).size() - 1) + 1);\n\t\t\tpol[i] = polArr.get(i).get(size);\n\t\t}\n\t}", "public void initiateGame() {\n Collections.shuffle(players);\n Collections.shuffle(categories);\n for (Category c : categories) {\n c.shuffleChallenges();\n }\n }", "public void loadQuestion() {\r\n\r\n //getting the number of the question stored in variable r\r\n //making sure that a question is not loaded up if the count exceeds the number of total questions\r\n if(count <NUMBER_OF_QUESTIONS) {\r\n int r = numberHolder.get(count);\r\n //creating object that will access the QuestionStore class and retrieve values and passing the value of the random question number to the class\r\n QuestionStore qs = new QuestionStore(r);\r\n //calling methods in order to fill up question text and mutliple choices and load the answer\r\n qs.storeQuestions();\r\n qs.storeChoices();\r\n qs.storeAnswers();\r\n //setting the question and multiple choices\r\n\r\n q.setText(qs.getQuestion());\r\n c1.setText(qs.getChoice1());\r\n c2.setText(qs.getChoice2());\r\n c3.setText(qs.getChoice3());\r\n answer = qs.getAnswer();\r\n }\r\n else{\r\n endGame();\r\n }\r\n\r\n\r\n\r\n\r\n }", "public void colorearSecuencial() {\n\t\t// Collections.shuffle(nodos);\n\t\tcolorearSecuencialAlternativo();\n\t}", "static void addNewPieces() {\n ArrayList<Block> news = new ArrayList<>();\n news.add(new Block(new int[]{2, 3}, Tetrominos.I));\n news.add(new Block(new int[]{2, 3}, Tetrominos.J));\n news.add(new Block(new int[]{2, 3}, Tetrominos.L));\n news.add(new Block(new int[]{2, 3}, Tetrominos.O));\n news.add(new Block(new int[]{2, 3}, Tetrominos.S));\n news.add(new Block(new int[]{2, 3}, Tetrominos.T));\n news.add(new Block(new int[]{2, 3}, Tetrominos.Z));\n\n\n Collections.shuffle(news);\n newPiece.addAll(news);\n }", "public void generateRandomQuestions(){\r\n numberHolder = new ArrayList<>(NUMBER_OF_QUESTIONS);\r\n for (int i = 0; i < NUMBER_OF_QUESTIONS; i++)\r\n numberHolder.add(i);\r\n\r\n Collections.shuffle(numberHolder);\r\n System.out.println(numberHolder);\r\n\r\n }", "private void loadOldGame() {\n String[] moveList = readFile().split(\"\");\n Long seed = getSeedFromLoad(moveList);\n String[] moves = getMoves(moveList).split(\"\");\n\n ter.initialize(WIDTH, HEIGHT, 0, -3);\n GameWorld world = new GameWorld(seed);\n for (int x = 0; x < WIDTH; x += 1) {\n for (int y = 0; y < HEIGHT; y += 1) {\n world.world[x][y] = Tileset.NOTHING;\n }\n }\n world.buildManyRandomSq();\n GameWorld.Position pos = randomAvatarPosition(world);\n world.world[pos.x][pos.y] = Tileset.AVATAR;\n for (String s: moves) {\n if (validMove(world, s.charAt(0))) {\n move(s.charAt(0), world);\n }\n }\n String senit = \"\";\n for (int i = 0; i < moveList.length; i++) {\n senit += moveList[i];\n }\n ter.renderFrame(world.world);\n playGame(world, senit);\n }", "public Board()\n {\n ArrayList<String[]> dies = new ArrayList<String[]>();\n dies.add(Die0);\n dies.add(Die1);\n dies.add(Die2);\n dies.add(Die3);\n dies.add(Die4);\n dies.add(Die5);\n dies.add(Die6);\n dies.add(Die7);\n dies.add(Die8);\n dies.add(Die9);\n dies.add(Die10);\n dies.add(Die11);\n dies.add(Die12);\n dies.add(Die13);\n dies.add(Die14);\n dies.add(Die15);\n \n \n \n Random rand = new Random();\n int a = rand.nextInt(16);\n int b = rand.nextInt(15);\n int c = rand.nextInt(14);\n int d = rand.nextInt(13);\n int e = rand.nextInt(12);\n int f = rand.nextInt(11);\n int g = rand.nextInt(10);\n int h = rand.nextInt(9);\n int i = rand.nextInt(8);\n int j = rand.nextInt(7);\n int k = rand.nextInt(6);\n int l = rand.nextInt(5);\n int m = rand.nextInt(4);\n int n = rand.nextInt(3);\n int o = rand.nextInt(2);\n int p = rand.nextInt(1);\n row0.add(new Tile(dies.get(a)[rand.nextInt(6)].charAt(0),0,0));\n dies.remove(a);\n row0.add(new Tile(dies.get(b)[rand.nextInt(6)].charAt(0),0,1));\n dies.remove(b);\n row0.add(new Tile(dies.get(c)[rand.nextInt(6)].charAt(0),0,2));\n dies.remove(c);\n row0.add(new Tile(dies.get(d)[rand.nextInt(6)].charAt(0),0,3));\n dies.remove(d);\n row1.add(new Tile(dies.get(e)[rand.nextInt(6)].charAt(0),1,0));\n dies.remove(e);\n row1.add(new Tile(dies.get(f)[rand.nextInt(6)].charAt(0),1,1));\n dies.remove(f);\n row1.add(new Tile(dies.get(g)[rand.nextInt(6)].charAt(0),1,2));\n dies.remove(g);\n row1.add(new Tile(dies.get(h)[rand.nextInt(6)].charAt(0),1,3));\n dies.remove(h);\n row2.add(new Tile(dies.get(i)[rand.nextInt(6)].charAt(0),2,0));\n dies.remove(i);\n row2.add(new Tile(dies.get(j)[rand.nextInt(6)].charAt(0),2,1));\n dies.remove(j);\n row2.add(new Tile(dies.get(k)[rand.nextInt(6)].charAt(0),2,2));\n dies.remove(k);\n row2.add(new Tile(dies.get(l)[rand.nextInt(6)].charAt(0),2,3));\n dies.remove(l);\n row3.add(new Tile(dies.get(m)[rand.nextInt(6)].charAt(0),3,0));\n dies.remove(m);\n row3.add(new Tile(dies.get(n)[rand.nextInt(6)].charAt(0),3,1));\n dies.remove(n);\n row3.add(new Tile(dies.get(o)[rand.nextInt(6)].charAt(0),3,2));\n dies.remove(o);\n row3.add(new Tile(dies.get(p)[rand.nextInt(6)].charAt(0),3,3));\n dies.remove(p);\n tiles.add(row0);\n tiles.add(row1);\n tiles.add(row2);\n tiles.add(row3);\n \n }", "public void populateDeck(){\n\n //Add everything to r\n for(int i=0;i<LUMBER;i++){\n deck.add(new ResourceCard(container, Resource.WOOD, cardStartPoint));\n }\n\n for(int i=0;i<WOOL;i++){\n deck.add(new ResourceCard(container, Resource.WOOL, cardStartPoint));\n }\n\n for(int i=0;i<GRAIN;i++){\n deck.add(new ResourceCard(container, Resource.WHEAT, cardStartPoint));\n }\n\n for(int i=0;i<BRICK;i++){\n deck.add(new ResourceCard(container, Resource.BRICKS, cardStartPoint));\n }\n\n for(int i=0;i<ORE;i++){\n deck.add(new ResourceCard(container, Resource.ORE, cardStartPoint));\n }\n //Collections.shuffle(deck);\n\n }", "private void newQuestion(int number) {\n bakeImageView.setImageResource(list.get(number - 1).getImage());\n\n //decide which button to place the correct answer\n int correct_answer = r.nextInt(4) + 1;\n\n int firstButton = number - 1;\n int secondButton;\n int thirdButton;\n int fourthButton;\n\n switch (correct_answer) {\n case 1:\n answer1Button.setText(list.get(firstButton).getName());\n\n do {\n secondButton = r.nextInt(list.size());\n } while (secondButton == firstButton);\n do {\n thirdButton = r.nextInt(list.size());\n } while (thirdButton == firstButton || thirdButton == secondButton);\n do {\n fourthButton = r.nextInt(list.size());\n } while (fourthButton == firstButton || fourthButton == secondButton || fourthButton == thirdButton);\n\n answer2Button.setText(list.get(secondButton).getName());\n answer3Button.setText(list.get(thirdButton).getName());\n answer4Button.setText(list.get(fourthButton).getName());\n\n break;\n\n case 2:\n answer2Button.setText(list.get(firstButton).getName());\n\n do {\n secondButton = r.nextInt(list.size());\n } while (secondButton == firstButton);\n do {\n thirdButton = r.nextInt(list.size());\n } while (thirdButton == firstButton || thirdButton == secondButton);\n do {\n fourthButton = r.nextInt(list.size());\n } while (fourthButton == firstButton || fourthButton == secondButton || fourthButton == thirdButton);\n\n answer1Button.setText(list.get(secondButton).getName());\n answer3Button.setText(list.get(thirdButton).getName());\n answer4Button.setText(list.get(fourthButton).getName());\n\n break;\n\n case 3:\n answer3Button.setText(list.get(firstButton).getName());\n\n do {\n secondButton = r.nextInt(list.size());\n } while (secondButton == firstButton);\n do {\n thirdButton = r.nextInt(list.size());\n } while (thirdButton == firstButton || thirdButton == secondButton);\n do {\n fourthButton = r.nextInt(list.size());\n } while (fourthButton == firstButton || fourthButton == secondButton || fourthButton == thirdButton);\n\n answer2Button.setText(list.get(secondButton).getName());\n answer1Button.setText(list.get(thirdButton).getName());\n answer4Button.setText(list.get(fourthButton).getName());\n\n\n break;\n\n case 4:\n answer4Button.setText(list.get(firstButton).getName());\n\n do {\n secondButton = r.nextInt(list.size());\n } while (secondButton == firstButton);\n do {\n thirdButton = r.nextInt(list.size());\n } while (thirdButton == firstButton || thirdButton == secondButton);\n do {\n fourthButton = r.nextInt(list.size());\n } while (fourthButton == firstButton || fourthButton == secondButton || fourthButton == thirdButton);\n\n answer2Button.setText(list.get(secondButton).getName());\n answer3Button.setText(list.get(thirdButton).getName());\n answer1Button.setText(list.get(fourthButton).getName());\n\n break;\n }\n }", "private TetrisPiece randomPiece() {\n\t\tint rand = Math.abs(random.nextInt());\n\t\treturn new TetrisPiece(rand % (PIECE_COLORS.length));\n\t}", "private void pickCards() throws IOExceptionFromController {\n Deck deck = game.getDeck();\n try {\n if (playerControllers.get(0).getClient().chooseYesNo(\"Do you want to randomize the playable God Powers pool?\")) {\n deck.pickRandom(game.getPlayerNum());\n playerControllers.get(0).getClient().displayMessage(\"Picking cards...\");\n } else {\n ArrayList<Card> choices = playerControllers.get(0).getClient().chooseCards(deck.getCards(), game.getPlayerNum(), null);\n for (Card card : choices) {\n deck.pickCard(card);\n }\n }\n } catch (IOException | InterruptedException e) {\n throw new IOExceptionFromController(e, playerControllers.get(0));\n }\n ArrayList<Card> cardPool = deck.getPickedCards();\n ArrayList<Card> chosenCards = new ArrayList<Card>();\n for (int i = 0; i < game.getPlayerNum(); i++) {\n int j = (i == game.getPlayerNum() - 1) ? 0 : i + 1;\n Card chosenCard;\n try {\n chosenCard = playerControllers.get(j).getClient().chooseCards(cardPool, 1, chosenCards).get(0);\n } catch (IOException | InterruptedException e) {\n throw new IOExceptionFromController(e, playerControllers.get(j));\n }\n cardPool.remove(chosenCard);\n chosenCards.add(chosenCard);\n players.get(j).setGodCard(chosenCard);\n playerControllers.get(j).setGodController(chosenCard.getController());\n broadcastMessage((players.get(j).getId() + \" is \" + chosenCard.getGod() + \" (\" + players.get(j).getColor() + \")\\n\"));\n broadcastMessage(\"Picking cards...\");\n }\n }", "public void randomize(){\r\n\t\tfor(int i = 0;i<this.myQuestions.size();i++){\r\n\t\t\tthis.myQuestions.get(i).randomize();\r\n\t\t}\r\n\t\tCollections.shuffle(this.myQuestions);\r\n\t}", "private void initNextPiece() {\n currentPiece = nextPieces.get(0);\n if (!currentPiece.initPosition(grid) && gameOver == false) {\n musicsReader.destroyAllPlayers();\n musicsReader.play(\"gameover.mp3\", 1);\n gameOver = true;\n }\n nextPieces.remove(0);\n int r = (int) (Math.random() * suppliers.size());\n nextPieces.add((Piece) suppliers.get(r).get());\n sincePieceDown = null;\n sinceLastMove = null;\n }", "private void parseClues(String content){\r\n \r\n \t//Found words\r\n newclues = new ArrayList<>() ;\r\n String CluePattern = \"td class=\\\"def\\\"\";\r\n String tempcontent = content ;\r\n while(true){\r\n int clueNoIndex = tempcontent.indexOf(CluePattern);\r\n if(clueNoIndex == -1) //defination of clue doesnot exist\r\n { break;\r\n } \r\n \r\n String clue = \"\";\r\n clueNoIndex = clueNoIndex + 15 ; // 38\r\n while( tempcontent.charAt(clueNoIndex) != '<'){\r\n clue = clue + tempcontent.charAt(clueNoIndex);\r\n clueNoIndex++;\r\n }\r\n //Found clues through HTMLScraping\r\n newclues.add(clue) ;\r\n System.out.println( \"New Clues are \" + newclues.toString());\r\n tempcontent = tempcontent.substring(clueNoIndex);\r\n }\r\n \r\n //Not found words\r\n complete = new ArrayList<>() ;\r\n String wordfoundpattern = \"td class=\\\"word\\\"\";\r\n String tempcontent2 = content ;\r\n while(true){\r\n int wordfoundpatternIndex = tempcontent2.indexOf(wordfoundpattern);\r\n if(wordfoundpatternIndex == -1) //No words found\r\n { break;\r\n } \r\n \r\n String wordfound = \"\";\r\n wordfoundpatternIndex = wordfoundpatternIndex + 16 ; // 38\r\n while( tempcontent2.charAt(wordfoundpatternIndex) != '<'){\r\n wordfound = wordfound + tempcontent2.charAt(wordfoundpatternIndex);\r\n wordfoundpatternIndex++;\r\n }\r\n \r\n complete.add(wordfound) ;\r\n \r\n tempcontent2 = tempcontent2.substring(wordfoundpatternIndex);\r\n }\r\n \r\n incomplete = new ArrayList<>() ;\r\n boolean completed = false ;\r\n ArrayList<String> tempp = new ArrayList<>() ;\r\n readPuzzle(\"26-12-2019\") ;\r\n tempp = answerlist() ;\r\n \r\n System.out.println(\"Original Answers\");\r\n System.out.println(tempp.toString());\r\n \r\n for(int i = 0 ; i < tempp.size(); i++){\r\n \t\r\n \ttempp.set(i ,tempp.get(i).toLowerCase()) ;\r\n } \r\n\r\n /* for (int i = 0 ; i < complete.size();i ++)\r\n {\r\n \t for(int j = 0 ; j < tempp.size() ; j ++)\r\n \t {\r\n \t\t \r\n \t\t if(complete.get(i).equals(tempp.get(j)))\r\n \t\t {\r\n \t\t\t \r\n \t\t\t complete.set(i, j + complete.get(i)+\"\") ;\r\n \t\t }\r\n \t\t \r\n \t }\r\n }\r\n */\r\n \r\n \r\n \r\n \r\n tempp.removeAll(complete);\r\n incomplete = tempp ; \r\n \r\n System.out.println(\"Not found Words\");\r\n System.out.println(incomplete.toString());\r\n \r\n \r\n\r\n \r\n \r\n \r\n }", "public void newGame(){\n if (won) {\n idx = 0;\n won = false; \n List<String> rows = new ArrayList<String>();\n\n try{\n // loads one random image from list\n Random rand = new Random(); \n col = 0;\n int randInt = rand.nextInt(files.size());\n File file = new File(\n Game.class.getResource(\"/\"+files.get(randInt)).getFile()\n );\n BufferedReader br = new BufferedReader(new FileReader(file));\n String line;\n while ((line = br.readLine()) != null) {\n if (col < line.length()) {\n col = line.length();\n }\n rows.add(line);\n }\n }\n catch (Exception e){\n System.out.println(\"File load error\"); // extremely simple error handling, you can do better if you like. \n }\n\n // this handles creating the orinal array and the hidden array in the correct size\n String[] rowsASCII = rows.toArray(new String[0]);\n\n row = rowsASCII.length;\n\n // Generate original array by splitting each row in the original array.\n original = new char[row][col];\n for(int i = 0; i < row; i++) {\n char[] splitRow = rowsASCII[i].toCharArray();\n for (int j = 0; j < splitRow.length; j++) {\n original[i][j] = splitRow[j];\n }\n }\n\n // Generate Hidden array with X's (this is the minimal size for columns)\n hidden = new char[row][col];\n for(int i = 0; i < row; i++){\n for(int j = 0; j < col; j++){\n hidden[i][j] = 'X';\n }\n }\n setIdxMax(col * row);\n }\n else {\n }\n }", "private void initCultistCardDeck(){\n unusedCultist = new ArrayList<Cultist>();\n \n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 1));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 2));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 1));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 2));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 1));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 1));\n \n Collections.shuffle(unusedCultist);\n }", "private void setLoaded1() {\r\n\t\tdiceRoll1 = (int) (Math.random() * 6) + 1;\r\n\t}", "public void initChanceDeck() {\n\t\tchanceDeck = new Deck();\n\t\tfor (int i = 0; i < 16; i++) {\n\t\t\tchanceDeck.addCard(new Card(i));\n\t\t}\n\t\t//shuffled to make the order random\n\t\tchanceDeck.shuffle();\n\t}", "public void run() {\n ImageQuestion temp = imageQuestionArrayList.get(counter);\n // Toast.makeText(GuessTheImage.this, temp.getClue(), Toast.LENGTH_LONG).show();\n displayClue.setText(temp.getClue());\n\n moveToNextQuestion();\n\n }", "private int randomPiece() {\n return (int)(Math.random()*N_PIECES);\n }", "public static void populate() {\n for (int i = 1; i <= 15; i++) {\n B.add(i);\n Collections.shuffle(B);\n\n }\n for (int i = 16; i <= 30; i++) {\n I.add(i);\n Collections.shuffle(I);\n }\n for (int n = 31; n <= 45; n++) {\n N.add(n);\n Collections.shuffle(N);\n }\n for (int g = 46; g <= 60; g++) {\n G.add(g);\n Collections.shuffle(G);\n }\n for (int o = 61; o <= 75; o++) {\n O.add(o);\n Collections.shuffle(O);\n }\n\n for (int i = 1; i <= 75; i++) {\n roll.add(i); // adds the numbers in the check list\n }\n }", "private void initializeVariables() {\n rnd = new Random();\n\n pieceKind = rnd.nextInt() % 7;\n if(pieceKind < 0) pieceKind *= -1;\n pieceKind2 = rnd.nextInt() % 7;\n if(pieceKind2 < 0) pieceKind2 *= -1;\n\n piece = new Piece(pieceKind,this);\n newPiece();\n startedGame = true;\n\n for(i=0; i<276; i++) {\n modulo = i%12;\n if(modulo == 0 || modulo == 11 || i>251) {\n matrix[i] = 0; colMatrix[i] = true;\n } else {\n matrix[i] = -1; colMatrix[i] = false;\n }\n }\n\n for(i=0; i<5; i++) completeLines[i] = -1;\n for(i=0; i<4; i++) keybl.setMovTable(i, false);\n }", "public void addNewPiece() {\n\t\t// creates a range from 1-7 to choose from each of the pieces\n\t\tint pieceChoice = (int) (Math.random()*7) + 1; \n\t\tif(pieceChoice == 1) {\n\t\t\tcurrentPiece = new TetrisI();\n\t\t}\n\t\telse if(pieceChoice == 2) {\n\t\t\tcurrentPiece = new TetrisJ();\n\t\t}\n\t\telse if(pieceChoice == 3) {\n\t\t\tcurrentPiece = new TetrisL();\n\t\t}\n\t\telse if(pieceChoice == 4) {\n\t\t\tcurrentPiece = new TetrisO();\n\t\t}\n\t\telse if(pieceChoice == 5) {\n\t\t\tcurrentPiece = new TetrisS();\n\t\t}\n\t\telse if(pieceChoice == 6) {\n\t\t\tcurrentPiece = new TetrisT();\n\t\t}\n\t\telse {\n\t\t\tcurrentPiece = new TetrisZ();\n\t\t}\n\t\tcurrentPiece.pieceRotation = 0;\n\t\tinitCurrentGP();\n\t}", "public void pullPlayerTiles() {\r\n\t\tRandom r = new Random();\r\n\t\tfor (int i=0; i < 7; i++) {\r\n\t\t\tint random = r.nextInt(Launch.getBoneyard().size());\r\n\t\t\t//System.out.println(\"[debug] random = \"+random);\r\n\t\t\t//System.out.println(\"[debug] index\"+random+\" in BONEYARD = \"+Arrays.toString(Launch.BONEYARD.get(random).getDots()));\r\n\t\t\tif (Utils.isSet(Launch.getBoneyard(), random)) {\r\n\t\t\t\tPLAYER_DOMINOS.add(Launch.getBoneyard().get(random));\r\n\t\t\t\tLaunch.getBoneyard().remove(random);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void fetchNewQuestion()\r\n\t{\r\n\t\t//Gets question and answers from model\r\n\t\tString[] question = quizModel.getNewQuestion();\r\n\t\t\r\n\t\t//Allocates answers to a new ArrayList then shuffles them randomly\r\n\t\tArrayList<String> answers = new ArrayList<String>();\r\n\t\tanswers.add(question[1]);\r\n\t\tanswers.add(question[2]);\r\n\t\tanswers.add(question[3]);\r\n\t\tanswers.add(question[4]);\r\n\t\tCollections.shuffle(answers);\r\n\t\t\r\n\t\t//Allocates north label to the question\r\n\t\tnorthLabel.setText(\"<html><div style='text-align: center;'>\" + question[0] + \"</div></html>\");\r\n\t\t\r\n\t\t//Allocates each radio button to a possible answer. Based on strings, so randomly generated questions...\r\n\t\t//...which by chance repeat a correct answer in two slots, either will award the user a point.\r\n\t\toption1.setText(answers.get(0));\r\n\t\toption2.setText(answers.get(1));\r\n\t\toption3.setText(answers.get(2));\r\n\t\toption4.setText(answers.get(3));\r\n\t\toption1.setActionCommand(answers.get(0));\r\n\t\toption2.setActionCommand(answers.get(1));\r\n\t\toption3.setActionCommand(answers.get(2));\r\n\t\toption4.setActionCommand(answers.get(3));\r\n\t\toption1.setSelected(true);\r\n\t\t\r\n\t\t//Update score\r\n\t\tscoreLabel.setText(\"<html><div style='text-align: center;'>\" + \"Score = \" + quizModel.getScore() + \"</div></html>\");\r\n\t}", "private void loadNextFlag() \r\n {\r\n // get file name of the next flag and remove it from the list\r\n // update the correct answer\r\n // clear answerTextView \r\n\r\n // display current question number\r\n\r\n // extract the region from the next image's name\r\n\r\n // use AssetManager to load next image from assets folder\r\n // get an InputStream to the asset representing the next flag\r\n // load the asset as a Drawable and display on the flagImageView\r\n\r\n // shuffle file names\r\n\r\n // put the correct answer at the end of fileNameList\r\n\r\n // add 3, 6, or 9 guess Buttons based on the value of guessRows\r\n // place Buttons in currentTableRow\r\n // get reference to Button to configure\r\n\r\n // get country name and set it as newGuessButton's text\r\n \r\n // randomly replace one Button with the correct answer\r\n // pick random row\r\n // pick random column\r\n // get the row\r\n }", "private void loadRandomState() {\n patternName = \"Random\";\n\n for (int i = 0; i < NUMCELLS; i++)\n currentState[i] = (rand.nextInt() > 0x40000000) ? (byte)1 : (byte)0;\n\n generations = 0;\n }", "public void hinduShuffle()\r\n {\r\n List<Card> cut = new ArrayList<Card>();\r\n List<Card> cut2 = new ArrayList<Card>();\r\n List<Card> shuffledDeck = new ArrayList<Card>();\r\n int cutPoint = 0;\r\n int cutPoint2 = 0;\r\n for (int x = 0; x < SHUFFLE_COUNT; x++) {\r\n cutPoint = rand.nextInt( cards.size()-1 );\r\n cutPoint2 = rand.nextInt( cards.size() - cutPoint ) + cutPoint;\r\n for (int i = 0; i < cutPoint; i++) {\r\n cut.add(draw());\r\n }\r\n for (int i = cutPoint2; i < cards.size(); i++) {\r\n cut2.add(draw());\r\n }\r\n for (int i = 0; i < cut.size(); i++) {\r\n shuffledDeck.add(cut.remove(0));\r\n }\r\n for (int i = 0; i < cards.size(); i++) {\r\n shuffledDeck.add(cards.remove(0));\r\n }\r\n for (int i = 0; i < cut2.size(); i++) {\r\n shuffledDeck.add(cut2.remove(0));\r\n }\r\n cut = cards;\r\n cut.clear();\r\n cut2.clear();\r\n cards = shuffledDeck;\r\n }\r\n }", "private static void createPlayfulSet() {\n\n\t\trandomKeys = new ArrayList<>();\n\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT1);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT2);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT3);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT4);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT5);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT6);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT7);\n\t\trandomKeys.add(GuessRevealerConstants.END);\n\n\t\trandomCount = randomKeys.size();\n\n\t}", "public static void loadTurnsInTournament(ComboBox<Integer> noOFTurns) {\n\t\tnoOFTurns.getItems().removeAll(noOFTurns.getItems());\n\t\tfor(int i=5; i<=50; i++) {\n\t\t\tnoOFTurns.getItems().add(i);\n\t\t}\n\t}", "private void createRandomGame() {\n ArrayList<int[]> usedCoordinates = new ArrayList<>();\n\n // make sure the board is empty\n emptyBoard();\n\n //find different coordinates\n while (usedCoordinates.size() < 25) {\n int[] temp = new int[]{randomNumberGenerator.generateInteger(size), randomNumberGenerator.generateInteger(size)};\n\n // default contains(arraylist) doesn't work because it compares hashcodes\n if (! contains(usedCoordinates, temp)) {\n usedCoordinates.add(temp);\n }\n }\n\n for (int[] usedCoordinate : usedCoordinates) {\n board.setSquare(usedCoordinate[0], usedCoordinate[1], randomNumberGenerator.generateInteger(size) + 1);\n }\n\n //save start locations\n startLocations = usedCoordinates;\n }", "public void randomizeState() {\n\t\t//System.out.print(\"Randomizing State: \");\n\t\tArrayList<Integer> lst = new ArrayList<Integer>();\n\t\tfor(int i = 0; i<9; i++)// adds 0-8 to list\n\t\t\tlst.add(i);\n\t\tCollections.shuffle(lst);//randomizes list\n\t\tString str=\"\";\n\t\tfor(Integer i : lst)\n\t\t\tstr += String.valueOf(i);\n\t\t//System.out.println(str);\n\t\tcurrent = new PuzzleState(str,current.getString(current.getGoalState()));\n\t\t//pathCost++;\n\t}", "private void initPieceColors(){\n\t\tfor(Piece p : this.pieces)\n\t\t\tpieceColors.put(p, Utils.randomColor());\n\t}", "public static void Random() {\n\t\tRandom ran =new Random();\r\n\t\trandom=ran.nextInt(6)+1;\r\n\t\t//random=1;\r\n\t\twho=A1063307_GUI.who2;\r\n\t\tif((ch[who].status)>0) {\r\n\t\t\tch[who].location=(ch[who].location)+random;\r\n\t\t\tch[who].status=(ch[who].status)-1;\r\n\t\t\t\r\n\t\t}else {\r\n\t\t\t\treturn;\r\n\t\t\t}\t\t\r\n\t}", "public void dicebreakers(View view) {\n TextView Questions = this.findViewById(R.id.displayCongrats);\n\n switch (number) {\n case 1:\n Questions.setText(Q1);\n break;\n case 2:\n Questions.setText(Q2);\n break;\n case 3:\n Questions.setText(Q3);\n break;\n case 4:\n Questions.setText(Q4);\n break;\n case 5:\n Questions.setText(Q5);\n break;\n case 6:\n Questions.setText(Q6);\n break;\n\n }\n\n }", "void generateNewPuzzle() {\n\t\t/* Clean up and initialize the layout for the new puzzle */\n\t\tinitLayout();\n\n\t\t/* Make appropriate changes to the UI */\n\t\tmsgText.setText(R.string.good_luck_string); //change text to 'Good Luck!'\n\t\tviewAgainButton.setText(R.string.see_again_string); //change text to \"View Original Image\"\n\t\t\n\t\t/* Generate the puzzle again */\n\t\tgeneratePuzzle(this.getResources(), R.drawable.pic);\n\t}", "public void setSingleChoices() {\r\n Random randomGenerator = new Random();\r\n int singleAnswer = randomGenerator.nextInt(4);\r\n studentAnswer.add(singleAnswer); }", "private void chooseBreedToBeIdentified() {\n Random r = new Random();\n int questionBreedIndex = r.nextInt(3);\n\n questionCarMake = displayingCarMakes.get(questionBreedIndex);\n carMakeNameTitle.setText(questionCarMake);\n }", "public void load(View v) {\n if (itemList.size() > 0 && currentMode.equals(Mode.GAME)) {\n Toast.makeText(this, \"Spielstand bereits geladen!\", Toast.LENGTH_LONG).show();\n return;\n }\n\n // Datei einlesen\n String[] rows = readFromSaveFile().split(\"\\n\");\n\n // Kein Spielstand vorhanden ueberpruefen\n if (!(rows.length > 1)) {\n Toast.makeText(this, \"Kein Spielstand vorhanden!\", Toast.LENGTH_LONG).show();\n return;\n }\n\n clearList();\n currentMode = Mode.GAME;\n\n // TODO Spielfeld laden\n randomCode = rows[1].replaceAll(\"<code>\", \"\").replaceAll(\"</code>\", \"\");\n\n // guesses einslesen\n for (int i = 2; i < rows.length - 1; i++) {\n // Für jeden guess\n String userInput = \"\";\n String result = \"\";\n\n if (rows[i].contains(\"<userInput>\")) {\n userInput = rows[i].replaceAll(\"<userInput>\", \"\").replaceAll(\"</userInput>\", \"\");\n result = rows[i + 1].replaceAll(\"<result>\", \"\").replaceAll(\"</result>\", \"\");\n addItemToList(userInput + \" | \" + result);\n }\n }\n }", "private void getRandomNumber() {\n\t\tRandom generator = new Random();\n\t\trandomNumber = generator.nextInt(POSSIBLE_CHOICE.length);\n\t}", "@Test public void testMultipleConfirmed() throws IOException {\n CrosswordBoard okBoard = new CrosswordBoard(\"puzzles/multipleConfirmed.puzzle\");\n assertEquals(\" _ _ _ \\n_ _ _ \\n _ _ _ \\n _ \\n _ \\n _ \\n\", okBoard.toString());\n assertEquals(Outcome.SUCCESS, okBoard.tryWord(\"1across\", \"car\", \"p1\"));\n assertEquals(Outcome.SUCCESS, okBoard.tryWord(\"3across\", \"tax\", \"p1\"));\n assertEquals(\" c a r \\n_ _ _ \\n t a x \\n _ \\n _ \\n _ \\n\", okBoard.toString());\n assertEquals(Outcome.SUCCESS, okBoard.tryWord(\"1down\", \"bob\", \"p1\"));\n assertEquals(\" b _ _ \\n_ o _ \\n b _ _ \\n _ \\n _ \\n _ \\n\", okBoard.toString());\n\n assertEquals(Outcome.SUCCESS, okBoard.tryWord(\"1across\", \"car\", \"p1\"));\n assertEquals(\" c a r \\n_ _ _ \\n _ _ _ \\n _ \\n _ \\n _ \\n\", okBoard.toString());\n assertEquals(Outcome.SUCCESS, okBoard.tryWord(\"2across\", \"mat\", \"p1\"));\n assertEquals(Outcome.SUCCESS, okBoard.tryWord(\"3across\", \"tax\", \"p1\"));\n // same as word already there\n assertEquals(Outcome.SAME_WORD, okBoard.tryChallenge(\"1across\", \"car\", \"p2\"));\n // originally correct\n assertEquals(Outcome.FAILED, okBoard.tryChallenge(\"1across\", \"cat\", \"p2\"));\n // confirmed since was originally correct\n assertEquals(Outcome.CONFIRMED, okBoard.tryChallenge(\"1across\", \"cat\", \"p2\"));\n assertEquals(Outcome.FAILED, okBoard.tryChallenge(\"2across\", \"sat\", \"p2\"));\n assertEquals(Outcome.FAILED, okBoard.tryChallenge(\"3across\", \"tap\", \"p2\"));\n // no one has claimed the id \"1down\" yet\n assertEquals(Outcome.SUCCESS, okBoard.tryWord(\"1down\", \"cat\", \"p2\"));\n // p2 already claimed \"1down\"\n assertEquals(Outcome.WORD_OWNED, okBoard.tryWord(\"1down\", \"cat\", \"p1\"));\n // p2 was originally correct\n assertEquals(Outcome.FAILED, okBoard.tryChallenge(\"1down\", \"car\", \"p1\"));\n assertEquals(Outcome.FINISHED, okBoard.tryWord(\"4down\", \"xray\", \"p2\"));\n // finished because of the previous move\n assertEquals(Outcome.FINISHED, okBoard.tryWord(\"4down\", \"xray\", \"p2\"));\n assertEquals(2, okBoard.showScore(\"p1\"));\n assertEquals(-1, okBoard.showScore(\"p2\"));\n }", "private void addRandomANewHopeOrHothCard(List<CardCollection.Item> result, int count) {\n List<String> possibleCards = new ArrayList<String>();\n possibleCards.addAll(_aNewHopeSetRarity.getAllCards());\n possibleCards.addAll(_hothSetRarity.getAllCards());\n filterNonExistingCards(possibleCards);\n Collections.shuffle(possibleCards, _random);\n addCards(result, possibleCards.subList(0, Math.min(possibleCards.size(), count)), false);\n }", "private void playagain() {\n Randomize r=new Randomize(t);\n r.number(5);\n wordchar=r.validWordScr();\n set=r.getMap();\n word.setText(null);\n grade.setText(null);\n \n DefaultTableModel model=(DefaultTableModel)correct.getModel();\n rowc=model.getRowCount()-1;\n while(rowc>=0)\n {model.removeRow(rowc); rowc--;}\n \n model=(DefaultTableModel)incorrect.getModel();\n rowi=model.getRowCount()-1;\n while(rowi>=0)\n {model.removeRow(rowi); rowi--;}\n \n initLetters();\n \n setc=new TreeMap<>();\n seti=new TreeMap<>();\n progress.setStringPainted(true);\n progress.setValue((int)((setc.size()/set.size())*100.0));\n progress.setString(\"0% [\"+setc.size()+\" Of \"+set.size()+\"]\");\n }", "private void renewWordLevel4()\n {\n givenWord = availableWords.randomWordLevel4();\n shuffedWord = availableWords.shuffleWord(givenWord);\n textViewShuffle.setText(shuffedWord);\n }", "private ArrayList<String> getRandQuestion() \n\t{\t\n\t\tquestionUsed = true;\n\t\t\n\t\tRandom randomizer = new Random();\n\t\tint randIdx = 0;\n\t\t\n\t\tif(questionsUsed.isEmpty())\n\t\t\trandIdx = randomizer.nextInt(allQuestions.size());\n\t\telse\n\t\t{\n\t\t\twhile(questionUsed)\n\t\t\t{\n\t\t\t\trandIdx = randomizer.nextInt(allQuestions.size());\n\t\t\t\tcheckIfQuestionUsed(randIdx);\n\t\t\t}\n\t\t}\n\t\t\n\t\tquestionsUsed.add(randIdx);\n\t\t\n\t\treturn allQuestions.get(randIdx);\n\t}", "private static void InitRandBag()\n {\n int k=(int)Math.floor(Math.random()*50);\n R[0]=k;\n\n //Generate the rest of the numbers\n for(int i=1;i<950;i++)\n {\n k=k+(int)Math.floor(Math.random()*50);\n R[i]=k;\n }\n\n //Shuffle the list\n for(int i=0;i<950;i++)\n {\n int temp = R[i];\n k = (int)Math.floor(Math.random()*950);\n R[i]=R[k];\n R[k]=temp;\n }\n }", "public void set_random_choice()\r\n\t{\r\n\t\tfor (int i=0 ; i<size ; i++)\r\n\t\t{\r\n\t\t\tnumbers.add(get_not_selected_random_digit());\r\n\t\t}\r\n\t}", "@Test\r\n public void getRandomExercise() {\n ArrayList<String> exerList = new ArrayList<>();\r\n exerList.add(\"Exer 1\");\r\n exerList.add(\"Exer 2\");\r\n exerList.add(\"Exer 3\");\r\n exerList.add(\"Exer 4\");\r\n exerList.add(\"Exer 5\");\r\n\r\n assertEquals(2, getRandomExer.getRandomExercise(exerList,2).size());\r\n }", "private void settingQuestion() {\n\n int[] setWord = {0, 0, 0, 0, 0};\n int[] setPos = {0, 0, 0, 0};\n int[] setBtn = {0, 0, 0, 0};\n\n Random ans = new Random();\n int wordNum = ans.nextInt(vocabularyLesson.size());\n //answer = vocabularyLesson.get(wordNum).getMean();\n word = vocabularyLesson.get(wordNum).getWord();\n vocabularyID = vocabularyLesson.get(wordNum).getId();\n answer = word;\n\n Practice practice = pc.getPracticeById(vocabularyID);\n if (practice != null) {\n Log.d(\"idVocabulary\", practice.getSentence());\n question.setText(practice.getSentence());\n }\n\n\n // Random position contain answer\n setWord[wordNum] = 1;\n Random p = new Random();\n int pos = p.nextInt(4);\n if (pos == 0) {\n word1.setText(word);\n setBtn[0] = 1;\n }\n if (pos == 1) {\n word2.setText(word);\n setBtn[1] = 1;\n }\n if (pos == 2) {\n word3.setText(word);\n setBtn[2] = 1;\n }\n if (pos == 3) {\n word4.setText(word);\n setBtn[3] = 1;\n }\n setPos[pos] = 1;\n\n // Random 3 position contain 3 answer\n for (int i = 0; i < 3; i++) {\n Random ques = new Random();\n int num = ques.nextInt(5);\n int p1 = ques.nextInt(4);\n while (setWord[num] == 1 || setPos[p1] == 1) {\n num = ques.nextInt(5);\n p1 = ques.nextInt(4);\n }\n String wordIncorrect = vocabularyLesson.get(num).getWord();\n setWord[num] = 1;\n setPos[p1] = 1;\n if (setBtn[p1] == 0 && p1 == 0) {\n word1.setText(wordIncorrect);\n setBtn[0] = 1;\n }\n if (setBtn[p1] == 0 && p1 == 1) {\n word2.setText(wordIncorrect);\n setBtn[1] = 1;\n }\n if (setBtn[p1] == 0 && p1 == 2) {\n word3.setText(wordIncorrect);\n setBtn[2] = 1;\n }\n if (setBtn[p1] == 0 && p1 == 3) {\n word4.setText(wordIncorrect);\n setBtn[3] = 1;\n }\n }\n\n }", "private int pickPurpleChampion(String cN) {\n\t\tif (bannedChamps.contains(cN) || bluePicks.contains(cN) || purplePicks.contains(cN)) {\n\t\t\treturn -1;\n\t\t}\n\t\tURL url = getClass().getResource(\".coredata/championicons/\" + cN + \"Square.png\");\n\t\tImageIcon champIcon = new ImageIcon(Toolkit.getDefaultToolkit().getImage(url));\n\t\tJLabel champLabel = new JLabel();\n\t\tchampLabel.setIcon(champIcon);\n\t\trightPanel.add(champLabel, new Integer(2));\n\t\tint i = numPurplePicks;\n\t\tchampLabel.setBounds(118, 22 + 99*i, 64, 64);\n\t\tpurplePicks.add(cN);\n\t\tnumPurplePicks += 1;\n\t\treturn 0;\n\t}", "public void load(ArrayList<String> pieces) {\n\tthis.pieces = pieces;\n\tupdate();\n }", "private void findResourcesFake() {\r\n\t\t\r\n\t\tRandom random = new Random();\t\r\n\t\t\r\n\t\t\t\t\t\t\r\n\t\tif (random.nextInt() % 10 == 0) {PoCOnline.setSelected(true); loadContainerOnline.setSelected(true);}\t\r\n\t\tif (random.nextInt() % 10 == 0) {fillRedOnline.setSelected(true);}\r\n\t\tif (random.nextInt() % 10 == 0) {fillYellowOnline.setSelected(true);}\r\n\t\tif (random.nextInt() % 10 == 0) {fillBlueOnline.setSelected(true);}\r\n\t\tif (random.nextInt() % 10 == 0) {testOnline.setSelected(true);}\r\n\t\tif (random.nextInt() % 10 == 0) {lidOnline.setSelected(true);}\r\n\t\tif (random.nextInt() % 10 == 0) {dispatchOnline.setSelected(true);}\t\t\r\n\t\t\r\n\t\t\r\n\t}", "protected void constructNewQuestion(){\n arabicWordScoreItem = wordScoreTable.whatWordToLearn();\n arabicWord = arabicWordScoreItem.word;\n correctAnswer = dictionary.get(arabicWord);\n\n for (int i=0;i<wrongAnswers.length;i++){\n int wrongAnswerId;\n String randomArabicWord;\n String wrongAnswer;\n do {\n wrongAnswerId = constructQuestionRandom.nextInt(next_word_index);\n randomArabicWord = dictionary_key_list.get(wrongAnswerId);\n wrongAnswer = dictionary.get(randomArabicWord);\n } while (wrongAnswer.equals(correctAnswer));\n wrongAnswers[i] = wrongAnswer;\n }\n }", "public void start(){\n int randomImg1, randomImg2, randomImg3, randomImg4;\n randomImg1 = (int)(Math.random() * images.length);\n\n\n while (true) {\n randomImg2 = (int)(Math.random() * images.length);\n\n if (randomImg1 != randomImg2)\n break;\n }\n\n while (true) {\n randomImg3 = (int)(Math.random() * images.length);\n\n if ((randomImg3 != randomImg1) && (randomImg3 != randomImg2) )\n break;\n }\n\n while (true) {\n randomImg4 = (int)(Math.random() * images.length);\n\n if ((randomImg4 != randomImg1) && (randomImg4 != randomImg2) && (randomImg4 != randomImg3))\n break;\n }\n\n imgName = getResourceNameFromClassByID(images[randomImg1]);\n questionText = \"Find the \" + capitalize(imgName);\n\n //Set the question\n question.setText(questionText);\n\n int random = (int)(Math.random() * 4);\n\n if(random == 0){\n // Set the images\n im_1.setBackgroundResource(images[randomImg1]);\n im_2.setBackgroundResource(images[randomImg2]);\n im_3.setBackgroundResource(images[randomImg3]);\n im_4.setBackgroundResource(images[randomImg4]);\n\n im_1.setTag(images[randomImg1]);\n im_2.setTag(images[randomImg2]);\n im_3.setTag(images[randomImg3]);\n im_4.setTag(images[randomImg4]);\n }\n else if (random == 1) {\n // Set the images\n im_1.setBackgroundResource(images[randomImg2]);\n im_2.setBackgroundResource(images[randomImg1]);\n im_3.setBackgroundResource(images[randomImg3]);\n im_4.setBackgroundResource(images[randomImg4]);\n\n im_1.setTag(images[randomImg2]);\n im_2.setTag(images[randomImg1]);\n im_3.setTag(images[randomImg3]);\n im_4.setTag(images[randomImg4]);\n }\n else if (random == 2) {\n // Set the images\n im_1.setBackgroundResource(images[randomImg2]);\n im_2.setBackgroundResource(images[randomImg3]);\n im_3.setBackgroundResource(images[randomImg1]);\n im_4.setBackgroundResource(images[randomImg4]);\n\n im_1.setTag(images[randomImg2]);\n im_2.setTag(images[randomImg3]);\n im_3.setTag(images[randomImg1]);\n im_4.setTag(images[randomImg4]);\n }\n else {\n // Set the images\n im_1.setBackgroundResource(images[randomImg4]);\n im_2.setBackgroundResource(images[randomImg2]);\n im_3.setBackgroundResource(images[randomImg3]);\n im_4.setBackgroundResource(images[randomImg1]);\n\n im_1.setTag(images[randomImg4]);\n im_2.setTag(images[randomImg2]);\n im_3.setTag(images[randomImg3]);\n im_4.setTag(images[randomImg1]);\n }\n\n // print Total point of the gamer\n tv_points.setText(String.valueOf(points));\n\n\n // speak the question\n speakQuestionText(questionText, 2000);\n\n playSound(sounds[randomImg1]);\n\n speakButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n displayToast(questionText);\n\n speakQuestionText(questionText, 500);\n playSound(sounds[randomImg1]);\n\n }\n });\n\n }", "public void maakNieuweDoolhof()\n {\n /*hzs: hoek zonder schat\n hms: hoek met schat\n r: recht stuk\n t: T-kruispunt met schat*/\n //vaste aantallen vakjes\n int hzs = 10, hms = 6, r = 11, t = 6;\n List<String> schatten = sch.getSchatten();\n List<String> tSchatten = schatten.subList(12, 18);\n Collections.shuffle(tSchatten);\n List<String> hSchatten = schatten.subList(18, 24);\n Collections.shuffle(hSchatten);\n\n int hKaartTeller = 0, tKaartTeller = 0;\n\n //losse vakken random invullen\n //oneven rijen\n for (int h = 0; h <= 6; h += 2)\n {\n for (int i = 1; i <= 5; i += 2)\n {\n int kaart = (int) (1 + (Math.random() * 4));\n switch (kaart)\n {\n case 1:\n if (hzs > 0)\n {\n this.gangkaarten[h][i] = new HoekKaart((int) Math.floor(Math.random() * 4) + 1, false);\n hzs--;\n } else\n {\n i--;\n }\n break;\n case 2:\n if (hms > 0)\n {\n this.gangkaarten[h][i] = new HoekKaart((int) Math.floor(Math.random() * 4) + 1, hSchatten.get(hKaartTeller), false);\n hms--;\n hKaartTeller++;\n } else\n {\n i--;\n }\n break;\n case 3:\n if (r > 0)\n {\n this.gangkaarten[h][i] = new RechtKaart((int) Math.floor(Math.random() * 4) + 1, false);\n r--;\n } else\n {\n i--;\n }\n break;\n case 4:\n if (t > 0)\n {\n this.gangkaarten[h][i] = new TKaart((int) Math.floor(Math.random() * 4) + 1, tSchatten.get(tKaartTeller), false);\n t--;\n tKaartTeller++;\n } else\n {\n i--;\n }\n break;\n\n }\n }\n }\n\n //even rijen\n for (int j = 1; j <= 5; j += 2)\n {\n for (int i = 0; i <= 6; i++)\n {\n int kaart = (int) (1 + (Math.random() * 4));\n switch (kaart)\n {\n case 1:\n if (hzs > 0)\n {\n this.gangkaarten[j][i] = new HoekKaart((int) Math.floor(Math.random() * 4) + 1, false);\n hzs--;\n } else\n {\n i--;\n }\n break;\n case 2:\n if (hms > 0)\n {\n this.gangkaarten[j][i] = new HoekKaart((int) Math.floor(Math.random() * 4) + 1, hSchatten.get(hKaartTeller), false);\n hms--;\n hKaartTeller++;\n } else\n {\n i--;\n }\n break;\n case 3:\n if (r > 0)\n {\n this.gangkaarten[j][i] = new RechtKaart((int) Math.floor(Math.random() * 4) + 1, false);\n r--;\n } else\n {\n i--;\n }\n break;\n case 4:\n if (t > 0)\n {\n this.gangkaarten[j][i] = new TKaart((int) Math.floor(Math.random() * 4) + 1, tSchatten.get(tKaartTeller), false);\n t--;\n tKaartTeller++;\n } else\n {\n i--;\n }\n break;\n\n }\n }\n }\n }", "public void mo2479c() {\n Collections.shuffle(mo2625k(), C0817u.f2167a);\n }", "public void randomGenre(View view) {\r\n String[] randomGenre = {\"Rock\", \"Funk\", \"Hip hop\", \"Country\", \"Pop\", \"Blues\", \"K-pop\", \"Punk\", \"House\", \"Soul\"};\r\n int index = (int) (Math.random() * 10);\r\n displayMessage(\"Your random genre is: \" + randomGenre[index]);\r\n }", "public void newGame() {\n\t\ttheNumber = (int)(Math.random()* 100 + 1);\r\n\t\t\r\n\t}", "public void run() {\n mOpponentEmoteBubble.setText(botEmotesArray[new Random().nextInt(botEmotesArray.length)]);\n showEmote(mOpponentEmoteBubble);\n\n }", "public void puzzle(){\n\t\tScanner scan;\n\t//\tint pLength = 0;\n\t// int puzzleNum = 0;\n\t\ttry {\n\t\t\tscan = new Scanner(new File(\"puzzles.txt\"));\n\t\t} catch (FileNotFoundException e) {\n\t\t\tJOptionPane.showMessageDialog(null, \"document not found\", \"error\", JOptionPane.ERROR_MESSAGE);\n\t\t\tSystem.exit(0);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\twhile(scan.hasNextLine()){\n\t\t\tString hint = scan.nextLine();\n\t\t\tString word = scan.nextLine();\n\t\t\tword = word.toUpperCase();\n\t\tsolvepuzzle store = new solvepuzzle(hint,word);\n\t\tpuzzle.add(store);\n\t\t}\n\t\t\n\t\t//Collections.shuffle(puzzle);\n\t\tpLength = puzzle.size();\n\t\tframe.sethint(puzzle.get(puzzleNum).gethint());\n\t\tframe.setSolved(puzzle.get(puzzleNum).getsolved());\n\t\t//puzzleNum++;\n\t\tSystem.out.println(puzzleNum);\n\t}", "public void initCup() {\n \tremainingPieces.clear();\n originalPieces.clear();\n\n BufferedReader inFile = null;\n try {\n //File used to read in the different creatures.\n inFile = new BufferedReader(new FileReader(System.getProperty(\"user.dir\") + File.separator + \"initCupCreatures.txt\"));\n String line = null;\n while ((line = inFile.readLine()) != null) {\n Creature c = new Creature(line);\n remainingPieces.add(c);\n originalPieces.add(c);\n }\n inFile.close();\n //File used to read in the different special incomes.\n inFile = new BufferedReader(new FileReader(System.getProperty(\"user.dir\") + File.separator + \"initCupIncome.txt\"));\n while ((line = inFile.readLine()) != null) {\n SpecialIncome s = new SpecialIncome(line);\n remainingPieces.add(s);\n originalPieces.add(s);\n }\n inFile.close();\n } catch (FileNotFoundException e) {\n System.out.println(\"file not found \" + inFile);\n } catch (EOFException e) {\n System.out.println(\"EOF encountered\");\n } catch (IOException e) {\n System.out.println(\"can't read from file\");\n }\n //Adding the Random Events to the cup.\n BigJuju bj = new BigJuju();\n DarkPlague dp = new DarkPlague();\n Defection df = new Defection();\n GoodHarvest gh = new GoodHarvest();\n MotherLode ml = new MotherLode();\n Teeniepox tp = new Teeniepox();\n TerrainDisaster td = new TerrainDisaster();\n Vandals v = new Vandals();\n WeatherControl wc = new WeatherControl();\n WillingWorkers ww = new WillingWorkers();\n remainingPieces.add(bj);\n originalPieces.add(bj);\n remainingPieces.add(dp);\n originalPieces.add(dp);\n remainingPieces.add(df);\n originalPieces.add(df);\n remainingPieces.add(gh);\n originalPieces.add(gh);\n remainingPieces.add(ml);\n originalPieces.add(ml);\n remainingPieces.add(tp);\n originalPieces.add(tp);\n remainingPieces.add(td);\n originalPieces.add(td);\n remainingPieces.add(v);\n originalPieces.add(v);\n remainingPieces.add(wc);\n originalPieces.add(wc);\n remainingPieces.add(ww);\n originalPieces.add(ww);\n\n //Adding the Magic Events to the cup.\n Balloon b = new Balloon();\n Bow bo = new Bow();\n DispelMagicScroll dms = new DispelMagicScroll();\n DustOfDefense dod = new DustOfDefense();\n Elixir el = new Elixir();\n Fan f = new Fan();\n Firewall fw = new Firewall();\n Golem g = new Golem();\n LuckyCharm lc = new LuckyCharm();\n Sword s = new Sword();\n Talisman t = new Talisman();\n remainingPieces.add(b);\n originalPieces.add(b);\n remainingPieces.add(bo);\n originalPieces.add(bo);\n remainingPieces.add(dms);\n originalPieces.add(dms);\n remainingPieces.add(dod);\n originalPieces.add(dod);\n remainingPieces.add(el);\n originalPieces.add(el);\n remainingPieces.add(f);\n originalPieces.add(f);\n remainingPieces.add(fw);\n originalPieces.add(fw);\n remainingPieces.add(g);\n originalPieces.add(g);\n remainingPieces.add(lc);\n originalPieces.add(lc);\n remainingPieces.add(s);\n originalPieces.add(s);\n remainingPieces.add(t);\n originalPieces.add(t);\n }", "private void fillRandomList()\n\t{\n\t\trandomList.add(\"I like cheese.\");\n\t\trandomList.add(\"Tortoise can move faster than slow rodent.\");\n\t\trandomList.add(\"I enjoy sitting on the ground.\");\n\t\trandomList.add(\"I like cereal.\");\n\t\trandomList.add(\"This is random.\");\n\t\trandomList.add(\"I like typing\");\n\t\trandomList.add(\"FLdlsjejf is my favorite word.\");\n\t\trandomList.add(\"I have two left toes.\");\n\t\trandomList.add(\"Sqrt(2) = 1.414213562 ...\");\n\t\trandomList.add(\"Hi mom.\");\n\t}", "public void premesaj() {\r\n Collections.shuffle(kup);\r\n }", "private void loadGame() {\r\n\t\tJFileChooser fileChooser = new JFileChooser();\r\n\t\tArrayList<String> data = new ArrayList<String>();\r\n\t\tFile file = null;\r\n\t\tif (fileChooser.showOpenDialog(gameView) == JFileChooser.APPROVE_OPTION) {\r\n\t\t\tfile = fileChooser.getSelectedFile();\r\n\t\t}\r\n\r\n\t\tif (file != null) {\r\n\t\t\tmyFileReader fileReader = new myFileReader(file);\r\n\t\t\ttry {\r\n\t\t\t\tdata = fileReader.getFileContents();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t\t// TODO: allow writing of whose turn it is!\r\n\t\t\tParser parse = new Parser();\r\n\t\t\tint tempBoard[][] = parse.parseGameBoard(data);\r\n\t\t\tgameBoard = new GameBoardModel(tempBoard, parse.isBlackTurn(), parse.getBlackScore(), parse.getRedScore());\r\n\t\t}\r\n\t}", "private void setChanceCards()\n {\n m_chance.add(new Card(\"Advance to Go (Collect $200)\", 0, 1, 0));\n m_chance.add(new Card(\"Advance to Illinois Ave. If you pass Go, collect $200\", 0, 1, 24));\n m_chance.add(new Card(\"Income tax refund, Collect $20\", 20, 0));\n m_chance.add(new Card(\"Go directly to Jail. Do not pass Go, do not collect $200\", 0, 1, 30));\n m_chance.add(new Card(\"Advance token to Boardwalk\", 0, 1, 39));\n m_chance.add(new Card(\"Pay hospital fees of $100\", -100, 0));\n m_chance.add(new Card(\"Your building {and} loan matures, Collect $150\", 150, 0));\n m_chance.add(new Card(\"Pay poor tax of $15\", -15, 0));\n m_chance.add(new Card(\"Get out of Jail free card\", 0, 2));\n }", "public void randomMove(){\n ArrayList<Hole> availableHoles = availableMoves(nextToPlay);\n int holeIndex = (int)(Math.random() * (((availableHoles.size()-1) - 0) + 1)) + 0;\n ArrayList<Korgool> korgools = availableHoles.get(holeIndex).getKoorgools();\n while(korgools.size() == 0){\n holeIndex = (int)(Math.random() * (((availableHoles.size()-1) - 0) + 1)) + 0;\n korgools = availableHoles.get(holeIndex).getKoorgools();\n }\n redistribute(availableHoles.get(holeIndex).getHoleIndex());\n }", "public void random(){\r\n\t\tRandom rand = new Random();\r\n\t\trandArray = new int[6];\r\n\t\tfor (int i = 0; i < 6; i++){\r\n\t\t\t//Randomly generated number from zero to nine\r\n\t\t\trandom = rand.nextInt(10);\r\n\t\t\t//Random values stored into the array\r\n\t\t\trandArray[i] = random;\r\n\t\t\tif(i == 0){\r\n\t\t\t\ta = random;\r\n\t\t\t}\r\n\t\t\tif(i == 1){\r\n\t\t\t\tb = random;\r\n\t\t\t}\r\n\t\t\tif(i == 2){\r\n\t\t\t\tc = random;\r\n\t\t\t}\r\n\t\t\tif(i == 3){\r\n\t\t\t\td = random;\r\n\t\t\t}\r\n\t\t\tif(i == 4){\r\n\t\t\t\tf = random;\r\n\t\t\t}\r\n\t\t\tif(i == 5){\r\n\t\t\t\tg = random;\r\n\t\t\t}\r\n\t\t\t//Random values outputted\r\n\t\t\t//Prints out if the hint was not used.\r\n\t\t\tif (executed == false || guessed == true ){\r\n\t\t\t\tprint(randArray[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Prints out if the hint was not used.\r\n\t\tif (executed == false || guessed == true){\r\n\t\t\tprintln(\" Randomly Generated Value\");\r\n\t\t}\r\n\t}", "public void shuffle(){\n\t\t\n\t\tArrayList<Boolean> used = new ArrayList<Boolean>();\n\t\tArrayList<Integer> copyStones = new ArrayList<Integer>();\n\t\tfor(int e = 0; e < gameStones.size(); e++){\n\t\t\tcopyStones.add(gameStones.get(e));\n\t\t\tused.add(false);\n\t\t}\n\t\tfor(int e : copyStones){\n\t\t\tchar l = stoneChars.get(e);\n\t\t\tboolean placed = false;\t\t\n\t\t\twhile(!placed){\n\t\t\t\tint randNumber = (int) (Math.random() * 7);\n\t\t\t\tif(!used.get(randNumber)){\n\t\t\t\t\tgameStones.set(randNumber, e);\n\t\t\t\t\tstoneLetters.set(randNumber, l);\n\t\t\t\t\tused.set(randNumber, true);\n\t\t\t\t\tplaced = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void generateNewCards()\n {\n // Set the card sets to be drafted from.\n setsForDraft = new ArrayList<>();\n setsForDraft.add(M19_CARD_TABLE);\n\n // Generates sealed pool and places in openedCardPool.\n drawPacksFromSets();\n\n // Initialize a selectedCardPool that is empty, for the user to move cards into when desired.\n selectedCardPool = new ArrayList<>();\n }", "private void initLearnedMoves() {\n Vector<Move> allMoves = new Vector<>();\n for (LevelMove move : levelMoves) {\n if (level >= move.level) {\n allMoves.add(move.data);\n }\n }\n if (level == 1) {\n allMoves.addAll(eggMoves);\n }\n\n //Remove duplicate entries\n for (int i = 0; i < allMoves.size(); i++) {\n String name = allMoves.get(i).name;\n for (int j = 0; j < allMoves.size(); j++) {\n if (j != i) {\n String dupName = allMoves.get(j).name;\n if (dupName.equals(name)) {\n allMoves.remove(j);\n }\n }\n }\n }\n\n //Select random moves\n while (allMoves.size() > MAX_MOVES) {\n int randId = Global.randomInt(0, allMoves.size() - 1);\n allMoves.remove(randId);\n }\n\n //Add moves\n moves = new Vector<>();\n for (Move move : allMoves) {\n moves.add(new LearnedMove(move));\n }\n }", "private void addRandomFoilCard(List<CardCollection.Item> result, int count) {\n List<String> possibleCards = new ArrayList<String>();\n\n // Very Rare foils\n for (int i=0; i<3; ++i) {\n possibleCards.add(\"9_94\"); // Fighters Coming In\n possibleCards.add(\"7_168\"); // Boelo\n possibleCards.add(\"106_11\"); // Chall Bekan\n possibleCards.add(\"8_94\"); // Commander Igar\n possibleCards.add(\"9_110\"); // Janus Greejatus\n possibleCards.add(\"9_118\"); // Myn Kyneugh\n possibleCards.add(\"9_120\"); // Sim Aloo\n possibleCards.add(\"4_116\"); // Bad Feeling Have I\n possibleCards.add(\"1_222\"); // Lateral Damage\n possibleCards.add(\"6_149\"); // Scum And Villainy\n possibleCards.add(\"7_241\"); // Sienar Fleet Systems\n possibleCards.add(\"101_6\"); // Vader's Obsession\n possibleCards.add(\"9_147\"); // Death Star II: Throne Room\n possibleCards.add(\"4_161\"); // Executor: Holotheatre\n possibleCards.add(\"4_163\"); // Executor: Meditation Chamber\n possibleCards.add(\"3_150\"); // Hoth: Wampa Cave\n possibleCards.add(\"2_147\"); // Kiffex (Dark)\n possibleCards.add(\"106_10\"); // Black Squadron TIE\n possibleCards.add(\"110_8\"); // IG-88 In IG-2000\n possibleCards.add(\"106_1\"); // Arleil Schous\n possibleCards.add(\"7_44\"); // Tawss Khaa\n possibleCards.add(\"5_23\"); // Frozen Assets\n possibleCards.add(\"7_62\"); // Goo Nee Tay\n possibleCards.add(\"1_55\"); // Mantellian Savrip\n possibleCards.add(\"4_30\"); // Order To Engage\n possibleCards.add(\"101_3\"); // Run Luke, Run!\n possibleCards.add(\"104_2\"); // Lone Rogue\n possibleCards.add(\"6_83\"); // Kiffex (Light)\n possibleCards.add(\"9_64\"); // Blue Squadron B-wing\n possibleCards.add(\"103_1\"); // Gold Leader In Gold 1\n possibleCards.add(\"9_73\"); // Green Squadron A-wing\n possibleCards.add(\"9_76\"); // Liberty\n possibleCards.add(\"103_2\"); // Red Leader In Red 1\n possibleCards.add(\"106_9\"); // Z-95 Headhunter\n }\n\n // Super Rare foils\n for (int i=0; i<2; ++i) {\n possibleCards.add(\"109_6\"); // 4-LOM With Concussion Rifle\n possibleCards.add(\"9_98\"); // Admiral Piett\n possibleCards.add(\"9_99\"); // Baron Soontir Fel\n possibleCards.add(\"110_5\"); // Bossk With Mortar Gun\n possibleCards.add(\"108_6\"); // Darth Vader With Lightsaber\n possibleCards.add(\"110_7\"); // Dengar With Blaster Carbine\n possibleCards.add(\"1_171\"); // Djas Puhr\n possibleCards.add(\"109_11\"); // IG-88 With Riot Gun\n possibleCards.add(\"110_9\"); // Jodo Kast\n possibleCards.add(\"9_117\"); // Moff Jerjerrod\n possibleCards.add(\"7_195\"); // Outer Rim Scout\n possibleCards.add(\"9_136\"); // Force Lightning\n possibleCards.add(\"3_138\"); // Trample\n possibleCards.add(\"104_7\"); // Walker Garrison\n possibleCards.add(\"2_143\"); // Death Star\n possibleCards.add(\"9_142\"); // Death Star II\n possibleCards.add(\"109_8\"); // Boba Fett In Slave I\n possibleCards.add(\"9_154\"); // Chimaera\n possibleCards.add(\"109_10\"); // Dengar In Punishing One\n possibleCards.add(\"106_13\"); // Dreadnaught-Class Heavy Cruiser\n possibleCards.add(\"9_157\"); // Flagship Executor\n possibleCards.add(\"9_172\"); // The Emperor's Shield\n possibleCards.add(\"9_173\"); // The Emperor's Sword\n possibleCards.add(\"110_12\"); // Zuckuss In Mist Hunter\n possibleCards.add(\"104_5\"); // Imperial Walker\n possibleCards.add(\"8_172\"); // Tempest Scout 1\n possibleCards.add(\"9_178\"); // Darth Vader's Lightsaber\n possibleCards.add(\"110_11\"); // Mara Jade's Lightsaber\n possibleCards.add(\"9_1\"); // Capital Support\n possibleCards.add(\"9_6\"); // Admiral Ackbar\n possibleCards.add(\"2_2\"); // Brainiac\n possibleCards.add(\"109_1\"); // Chewie With Blaster Rifle\n possibleCards.add(\"8_3\"); // Chief Chirpa\n possibleCards.add(\"9_13\"); // General Calrissian\n possibleCards.add(\"8_14\"); // General Crix Madine\n possibleCards.add(\"1_15\"); // Kal'Falnl C'ndros\n possibleCards.add(\"102_3\"); // Leia\n possibleCards.add(\"108_3\"); // Luke With Lightsaber\n possibleCards.add(\"7_32\"); // Melas\n possibleCards.add(\"8_23\"); // Orrimaarko\n possibleCards.add(\"110_3\"); // See-Threepio\n possibleCards.add(\"9_31\"); // Wedge Antilles, Red Squadron Leader\n possibleCards.add(\"8_32\"); // Wicket\n possibleCards.add(\"3_32\"); // Bacta Tank\n possibleCards.add(\"3_34\"); // Echo Base Operations\n possibleCards.add(\"1_52\"); // Kessel Run\n possibleCards.add(\"1_76\"); // Don't Get Cocky\n possibleCards.add(\"1_82\"); // Gift Of The Mentor\n possibleCards.add(\"5_69\"); // Smoke Screen\n possibleCards.add(\"1_138\"); // Yavin 4: Massassi Throne Room\n possibleCards.add(\"111_2\"); // Artoo-Detoo In Red 5\n possibleCards.add(\"9_65\"); // B-wing Attack Squadron\n possibleCards.add(\"9_68\"); // Gold Squadron 1\n possibleCards.add(\"106_4\"); // Gold Squadron Y-wing\n possibleCards.add(\"9_74\"); // Home One\n possibleCards.add(\"9_75\"); // Independence\n possibleCards.add(\"109_2\"); // Lando In Millennium Falcon\n possibleCards.add(\"9_81\"); // Red Squadron 1\n possibleCards.add(\"106_7\"); // Red Squadron X-wing\n possibleCards.add(\"7_150\"); // X-wing Assault Squadron\n possibleCards.add(\"104_3\"); // Rebel Snowspeeder\n possibleCards.add(\"9_90\"); // Luke's Lightsaber\n }\n\n // Ultra Rare foils\n for (int i=0; i<1; ++i) {\n possibleCards.add(\"9_109\"); // Emperor Palpatine\n possibleCards.add(\"9_113\"); // Lord Vader\n possibleCards.add(\"110_10\"); // Mara Jade, The Emperor's Hand\n possibleCards.add(\"9_24\"); // Luke Skywalker, Jedi Knight\n }\n\n filterNonExistingCards(possibleCards);\n Collections.shuffle(possibleCards, _random);\n addCards(result, possibleCards.subList(0, Math.min(possibleCards.size(), count)), true);\n }", "public void load (){\n try{\n FileInputStream fis = new FileInputStream(\"game.data\");\n ObjectInputStream o = new ObjectInputStream(fis);\n for (int i = 0; i < 8; i++){\n for (int j = 0; j < 8; j++){\n String loaded = o.readUTF();\n if (loaded.equals(\"null\")){\n Tiles[i][j].removePiece();\n }else if (loaded.equals(\"WhiteLeftKnight\")){\n Tiles[i][j].setPiece(WhiteLeftKnight);\n }else if (loaded.equals(\"WhiteRightKnight\")){\n Tiles[i][j].setPiece(WhiteRightKnight);\n }else if (loaded.equals(\"WhiteLeftBishop\")){\n Tiles[i][j].setPiece(WhiteLeftBishop);\n }else if (loaded.equals(\"WhiteRightBishop\")){\n Tiles[i][j].setPiece(WhiteRightBishop);\n }else if (loaded.equals(\"WhiteLeftRook\")){\n Tiles[i][j].setPiece(WhiteLeftRook);\n }else if (loaded.equals(\"WhiteRightRook\")){\n Tiles[i][j].setPiece(WhiteRightRook);\n }else if (loaded.equals(\"WhiteQueen\")){\n Tiles[i][j].setPiece(WhiteQueen);\n }else if (loaded.equals(\"WhiteKing\")){\n Tiles[i][j].setPiece(WhiteKing);\n }else if (loaded.equals(\"WhitePromotedRookPawn\")){\n Rook WhitePromotedRookPawn = new Rook(\"WhitePromotedRookPawn\");\n WhitePromotedRookPawn.setIcon(WhiteRookImg);\n Tiles[i][j].setPiece(WhitePromotedRookPawn);\n }else if (loaded.equals(\"WhitePromotedBishopPawn\")){\n Bishop WhitePromotedBishopPawn = new Bishop(\"WhitePromotedBishopPawn\");\n WhitePromotedBishopPawn.setIcon(WhiteBishopImg);\n Tiles[i][j].setPiece(WhitePromotedBishopPawn);\n }else if (loaded.equals(\"WhitePromotedKnightPawn\")){\n Knight WhitePromotedKnightPawn = new Knight(\"WhitePromotedKnightPawn\");\n WhitePromotedKnightPawn.setIcon(WhiteKnightImg);\n Tiles[i][j].setPiece(WhitePromotedKnightPawn);\n }else if (loaded.equals(\"WhitePromotedQueenPawn\")){\n Queen WhitePromotedQueenPawn = new Queen(\"WhitePromotedQueenPawn\");\n WhitePromotedQueenPawn.setIcon(WhiteQueenImg);\n Tiles[i][j].setPiece(WhitePromotedQueenPawn);\n }else if (loaded.equals(\"BlackLeftKnight\")){\n Tiles[i][j].setPiece(BlackLeftKnight);\n }else if (loaded.equals(\"BlackRightKnight\")){\n Tiles[i][j].setPiece(BlackRightKnight);\n }else if (loaded.equals(\"BlackLeftBishop\")){\n Tiles[i][j].setPiece(BlackLeftBishop);\n }else if (loaded.equals(\"BlackRightBishop\")){\n Tiles[i][j].setPiece(BlackRightBishop);\n }else if (loaded.equals(\"BlackLeftRook\")){\n Tiles[i][j].setPiece(BlackLeftRook);\n }else if (loaded.equals(\"BlackRightRook\")){\n Tiles[i][j].setPiece(BlackRightRook);\n }else if (loaded.equals(\"BlackQueen\")){\n Tiles[i][j].setPiece(BlackQueen);\n }else if (loaded.equals(\"BlackKing\")){\n Tiles[i][j].setPiece(BlackKing);\n }else if (loaded.equals(\"BlackPromotedQueenPawn\")){\n Queen BlackPromotedQueenPawn = new Queen(\"BlackPromotedQueenPawn\");\n BlackPromotedQueenPawn.setIcon(BlackQueenImg);\n Tiles[i][j].setPiece(BlackPromotedQueenPawn);\n }else if (loaded.equals(\"BlackPromotedRookPawn\")){\n Rook BlackPromotedRookPawn = new Rook(\"BlackPromotedRookPawn\");\n BlackPromotedRookPawn.setIcon(BlackRookImg);\n Tiles[i][j].setPiece(BlackPromotedRookPawn);\n }else if (loaded.equals(\"BlackPromotedBishopPawn\")){\n Bishop BlackPromotedBishopPawn = new Bishop(\"BlackPromotedBishopPawn\");\n BlackPromotedBishopPawn.setIcon(BlackBishopImg);\n Tiles[i][j].setPiece(BlackPromotedBishopPawn);\n }else if (loaded.equals(\"BlackPromotedKnightPawn\")){\n Knight BlackPromotedKnightPawn = new Knight(\"BlackPromotedKnightPawn\");\n BlackPromotedKnightPawn.setIcon(BlackKnightImg);\n Tiles[i][j].setPiece(BlackPromotedKnightPawn);\n }else if (loaded.equals(\"WhitePawn0\")){\n Tiles[i][j].setPiece(WhitePawns[0]);\n }else if (loaded.equals(\"WhitePawn1\")){\n Tiles[i][j].setPiece(WhitePawns[1]);\n }else if (loaded.equals(\"WhitePawn2\")){\n Tiles[i][j].setPiece(WhitePawns[2]);\n }else if (loaded.equals(\"WhitePawn3\")){\n Tiles[i][j].setPiece(WhitePawns[3]);\n }else if (loaded.equals(\"WhitePawn4\")){\n Tiles[i][j].setPiece(WhitePawns[4]);\n }else if (loaded.equals(\"WhitePawn5\")){\n Tiles[i][j].setPiece(WhitePawns[5]);\n }else if (loaded.equals(\"WhitePawn6\")){\n Tiles[i][j].setPiece(WhitePawns[6]);\n }else if (loaded.equals(\"WhitePawn7\")){\n Tiles[i][j].setPiece(WhitePawns[7]);\n }else if (loaded.equals(\"BlackPawn0\")){\n Tiles[i][j].setPiece(BlackPawns[0]);\n }else if (loaded.equals(\"BlackPawn1\")){\n Tiles[i][j].setPiece(BlackPawns[1]);\n }else if (loaded.equals(\"BlackPawn2\")){\n Tiles[i][j].setPiece(BlackPawns[2]);\n }else if (loaded.equals(\"BlackPawn3\")){\n Tiles[i][j].setPiece(BlackPawns[3]);\n }else if (loaded.equals(\"BlackPawn4\")){\n Tiles[i][j].setPiece(BlackPawns[4]);\n }else if (loaded.equals(\"BlackPawn5\")){\n Tiles[i][j].setPiece(BlackPawns[5]);\n }else if (loaded.equals(\"BlackPawn6\")){\n Tiles[i][j].setPiece(BlackPawns[6]);\n }else if (loaded.equals(\"BlackPawn7\")){\n Tiles[i][j].setPiece(BlackPawns[7]);\n }\n }\n }\n player = o.readInt();\n if (player == 1){\n area.setText(\"\\t\\t\\tPlayer \"+player+\" (White)\");\n }else{\n area.setText(\"\\t\\t\\tPlayer \"+player+\" (Black)\");\n }\n o.close();\n OriginalColor();\n }catch (Exception ex){\n\n }\n }", "private void createShuffleAndAddCards() {\n //Creating all 108 cards and saving them into an arraylist\n ArrayList<Card> cards = new ArrayList<>();\n String[] colors = {\"red\", \"blue\", \"yellow\", \"green\"};\n for (String color : colors) {\n for (int i = 1; i < 10; i++) {\n for (int j = 0; j < 2; j++) {\n cards.add(new Card(\"Numeric\", color, i));\n }\n }\n cards.add(new Card(\"Numeric\", color, 0));\n for (int i = 0; i < 2; i++) {\n cards.add(new Card(\"Skip\", color, 20));\n cards.add(new Card(\"Draw2\", color, 20));\n cards.add(new Card(\"Reverse\", color, 20));\n }\n }\n for (int i = 0; i < 4; i++) {\n cards.add(new Card(\"WildDraw4\", \"none\", 50));\n cards.add(new Card(\"WildColorChanger\", \"none\", 50));\n }\n //shuffling cards and adding them into the storageCards main list\n Collections.shuffle(cards);\n for (Card card : cards) {\n storageCards.add(card);\n }\n cards.clear();\n }", "private void setRandomColors() {\n for(int i = 0; i< noOfColumns; i++) {\n for (int j = 0; j< noOfRows; j++) {\n if(cards[i][j].getCardState() != CardState.MATCHED){\n int randomNumber = (int) (Math.random()*4);\n cards[i][j].setColor(colors[randomNumber]);\n }\n }\n }\n }", "private void random() {\n GameState gs = cc.getGameState();\n ArrayList<int[]> moves = cc.getPlayerMoves(player);\n ArrayList<GameState> states = nextStates(moves, gs);\n for (int[] m : moves) {\n GameState next = checkMove(m, cc);\n states.add(next);\n }\n Random rand = new Random(System.nanoTime());\n int i = rand.nextInt(states.size());\n cc.setAIMove(states.get(i));\n }", "public void addRandoms() {\n //Add random boulders on tiles that aren't Lava\n int tileNumber;\n int selector;\n Tile t;\n String tileTexture;\n Random random = new Random();\n SquareVector playerPos = getPlayerEntity().getPosition();\n int tileCount = GameManager.get().getWorld().getTiles().size();\n AbstractWorld world = GameManager.get().getWorld();\n int randIndex;\n\n for (int i = 0; i < 20; i++) {\n //Get respective volcano tile (5 <= Lava tiles Index <= 8\n do {\n randIndex = random.nextInt(tileCount);\n t = world.getTile(randIndex);\n } while (t.getCoordinates().isCloseEnoughToBeTheSame(playerPos));\n\n tileTexture = t.getTextureName();\n tileNumber = Integer.parseInt(tileTexture.split(\"_\")[1]);\n\n selector = random.nextInt(2);\n if (tileNumber < 5 && tileNumber > 1 && selector == 1 && !t.hasParent()) {\n entities.add(new Rock(t, true));\n } else if (t != null && (tileNumber == 3 || tileNumber == 4) &&\n selector == 0 && !t.hasParent()) {\n entities.add(new VolcanoBurningTree(t, true));\n } else {\n i--;\n }\n }\n }", "@Override\n protected void dropFewItems(boolean hit, int looting) {\n super.dropFewItems(hit, looting);\n if (hit && (this.rand.nextInt(3) == 0 || this.rand.nextInt(1 + looting) > 0)) {\n Item drop = null;\n switch (this.rand.nextInt(5)) {\n case 0:\n drop = Items.gunpowder;\n break;\n case 1:\n drop = Items.sugar;\n break;\n case 2:\n drop = Items.spider_eye;\n break;\n case 3:\n drop = Items.fermented_spider_eye;\n break;\n case 4:\n drop = Items.speckled_melon;\n break;\n }\n if (drop != null) {\n this.dropItem(drop, 1);\n }\n }\n }", "private int getRandomCard (ArrayList<Card> hand) {\n\t\treturn (int)(Math.random() * hand.size());\r\n\t}", "public static void main(String[] args) throws IOException\n\t{\n\t\tGame Set = new Game(); //Class That Handles the Game\n\t\tObject\t[][] bingoCard = Set.createCard(); //Original Unmarked Card\n\t\tObject\t[][] playingCard = bingoCard; //Marked Card for Each Game\n\t\tint [] bingoNumbers; //Numbers to be Called\n\t\t\n\t\t/*\n\t\t//int nog; //Number of Games\n\t\t\n\t\t//Get Number of Games\n\t\tSystem.out.println(\"How many games to play?\");\n\t\tnog = cin.nextInt();\n\t\tcin.close();\n\t\tbingoNumbers = new int [100*nog]; //Set Amount of Numbers to Call, Per Instructions in ReadMe\n\t\t//*/\n\t\t\n\t\t//Would Normally Not Do This. Would Make Only 50 Numbers at A Time Instead of 100,\n\t\t\t//but Description Asks for It\n\t\tbingoNumbers = new int [500]; //Set Amount of Numbers to Call, Per Instructions in ReadMe\n\t\tScanner numbers = new Scanner(new File(\"Numbers.txt\")); //File With Numbers\n\t\tint t = 0; //Traverse Array of Bingo Numbers\n\t\twhile(numbers.hasNext()) //Till No More Numbers\n\t\t{\n\t\t\tString tmp = numbers.next(); //Get Number\n\t\t\ttmp = tmp.substring(0, tmp.length()-1); //Remove Delimiter\n\t\t\tbingoNumbers[t++] = Integer.parseInt(tmp); //Convert to Integer\n\t\t}\n\t\tnumbers.close(); //Close Scanner, No Longer Needed\n\t\t\n\t\t/*\n\t\tHashSet<Integer> numbs = new HashSet<Integer>(); //HashSet to Keep Track of Already Used Numbers\n\t\t\n\t\t//Get Numbers, No DataSet Given With Numbers, So Picked At Random\n\t\tfor (int i=0; i<bingoNumbers.length;)\n\t\t{\t\n\t\t\tint random; //Number to Call\n\t\t\tdo\n\t\t\t\t{random = (int)(Math.random()*100+1);} //Pick Random Number From Allowed Range\n\t\t\twhile (numbs.contains(random)); //Make Sure for No Repeats\n\t\t\t\n\t\t\tbingoNumbers[i] = random; //Add Number to List of Numbers to Call\n\t\t\tnumbs.add(random); //Add to List of Already Chosen\n\t\t\t\n\t\t\tif (++i%100==0) //Reset List Every 100 Numbers\n\t\t\t\tnumbs = new HashSet<Integer>();\n\t\t}\n\t\t//*/\n\t\t\n\t\t//Play and Print Game(s)\n\t\t//for (int i=0; i<nog;)\n\t\tfor (int i=0; i<6;)\n\t\t{\n\t\t\tObject [] res; //Results of Game\n\t\t\tint start = i*100; //Start Location\n\t\t\tint end = (++i)*100-1; //End Location\n\t\t\tint [] bn = Arrays.copyOfRange(bingoNumbers, start, end); //Get 100 Numbers From the Set at A Time\n\t\t\tres = Set.play(bn, playingCard); //Play Game\n\t\t\tprintGame(playingCard, res, bn, i); //Print Result\n\t\t\tplayingCard = bingoCard; //Reset Card\n\t\t}\n\t}", "public void showpuzzle(){\n\t\tpuzzle();\n\t\tframe.setVisible(true);\n\t\twordHint = 0;\n\t\tif(wordHint == length){\n\t\t\tCollections.shuffle(puzzle);\n\t\t\twordHint++;\n\t\t}\n\t}", "public void cards() {\n\t\t\n\n\t\tboolean[] randomCards = new boolean[52];\n\n\t\t// choose 4 random distinct cards from the deck\n\t\tint count = 0;\n\t\tint card1 = 0;\n\t\tint card2 = 0;\n\t\tint card3 = 0;\n\t\tint card4 = 0;\n\n\t\twhile (count < 4) {// Display only four cards\n\n\t\t\tcard1 = ((int) (Math.random() * 12) + 1) + 1;// Ignore zero\n\t\t\tcard2 = ((int) (Math.random() * 12) + 1) + 1;// Ignore zero\n\t\t\tcard3 = ((int) (Math.random() * 12) + 1) + 1;// Ignore zero\n\t\t\tcard4 = ((int) (Math.random() * 12) + 1) + 1;// Ignore zero\n\n\t\t\tif ((randomCards[card1] = !randomCards[card2]) && (randomCards[card1] = !randomCards[card3])\n\t\t\t\t\t&& (randomCards[card1] = !randomCards[card4]) && (randomCards[card2] = !randomCards[card3])\n\t\t\t\t\t&& (randomCards[card2] = !randomCards[card4]) && (randomCards[card3] = !randomCards[card4])) {\n\n\t\t\t\tString[] cards = { \"clubs\", \"diamonds\", \"hearts\", \"spades\" };\n\n\t\t\t\tString name1 = cards[(int) (Math.random() * cards.length)];\n\t\t\t\tString name2 = cards[(int) (Math.random() * cards.length)];\n\t\t\t\tString name3 = cards[(int) (Math.random() * cards.length)];\n\t\t\t\tString name4 = cards[(int) (Math.random() * cards.length)];\n\n\t\t\t\tImage image1 = new Image(\"png/\" + (card1) + \"_of_\" + name1 + \".png\");\n\t\t\t\tImage image2 = new Image(\"png/\" + (card2) + \"_of_\" + name2 + \".png\");\n\t\t\t\tImage image3 = new Image(\"png/\" + (card3) + \"_of_\" + name3 + \".png\");\n\t\t\t\tImage image4 = new Image(\"png/\" + (card4) + \"_of_\" + name4 + \".png\");\n\n\t\t\t\timgCard1.setImage(image1);\n\t\t\t\timgCard2.setImage(image2);\n\t\t\t\timgCard3.setImage(image3);\n\t\t\t\timgCard4.setImage(image4);\n\n\t\t\t\tcount++;\n\n\t\t\t}\n\n\t\t}\n\n\t\tString cardOneValue = Integer.toString(card1);\n\t\tString cardTwoValue = Integer.toString(card2);\n\t\tString cardThreeValue = Integer.toString(card3);\n\t\tString cardFourValue = Integer.toString(card4);\n\t\tSystem.out.println(cardOneValue + \" - \" + cardTwoValue + \" - \" + cardThreeValue + \" - \" + cardFourValue);\n\t\tsetText.setText(cardOneValue +\" \"+ cardTwoValue +\" \"+ cardThreeValue +\" \"+ cardFourValue);\n\t\t\n\t\tint solution = 0; \n\t\tif(solution!=24) {\n\t\tfor(int limit = 0; limit < 25; limit++) {\n\t\t\n\t\t\t\tSystem.out.println(\"No\");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(solution);\n\t\t\n\t}", "private void generarColor() {\r\n\t\tthis.color = COLORES[(int) (Math.random() * COLORES.length)];\r\n\t}", "public void shuffleCards() {\n Collections.shuffle(suspectCards);\n Collections.shuffle(weaponCards);\n Collections.shuffle(roomCards);\n\n }", "public void RandomizeTheDeck() {\r\n ArrayList<ArrayList<Card>> alalCopy = new ArrayList<>();\r\n int i, iRand;\r\n Random rand = new Random();\r\n \r\n // remove deck to the copy\r\n for( i=0; i<104; i++) {\r\n alalCopy.add( alalSets.get(i) );\r\n }\r\n alalSets.clear();\r\n \r\n // randomly copy them back as copy size gets smaller\r\n for( i=104; i>0; i-- ) {\r\n iRand = (int)rand.nextInt(i);\r\n alalSets.add( alalCopy.remove(iRand) );\r\n }\r\n }", "public void shuffle() {\n\t\tRandom randIndex = new Random();\n\t\tint size = cards.size();\n\t\t\n\t\tfor(int shuffles = 1; shuffles <= 20; ++shuffles)\n\t\t\tfor (int i = 0; i < size; i++) \n\t\t\t\tCollections.swap(cards, i, randIndex.nextInt(size));\n\t\t\n\t}", "public void randomizeColor() {\r\n\t\tArrayList<Integer> possibleColors = new ArrayList<Integer>();\r\n\t\tfor(int i = 1; i<=4; i++) {\r\n\t\t\tif(i!=colorType) { \r\n\t\t\t\tpossibleColors.add(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcolorType = possibleColors.get((int) (Math.random()*3));\r\n\t\t\r\n\t}", "public void randomize()\n {\n for (int i=0; i<list.length; i++)\n list[i] = (int)(Math.random() * 100) + 1;\n }", "public void setRandomCombi(){\r\n Random rand = new Random();\r\n\r\n for (int i = 0; i < COMBI_LENGTH; i++){\r\n //Take a random Color, put length - 1 to avoid picking EMPTY color\r\n this.combi[i] = Colors.values()[rand.nextInt(Colors.values().length - 1)];\r\n }\r\n }", "private void initialiseBoard() {\n boardStringArr = new ArrayList<>(16);\n for (int i = 0; i < 16; i++) {\n boardStringArr.add(\"\");\n }\n int randFirstIndex = rand.nextInt(16);\n int randSecondIndex = (randFirstIndex + 5 )% 16;\n boardStringArr.set(randFirstIndex, \"2\");\n boardStringArr.set(randSecondIndex, \"2\");\n\n TextView te = (TextView) gvBoard.getChildAt(randFirstIndex);// !! not a correct way of initialising a view\n TextView te2 = (TextView) gvBoard.getChildAt(randSecondIndex);// !! not a correct way of initialising a view\n te.setText(\"2\");\n te2.setText(\"2\");\n }", "void random(){\r\n Random dice = new Random ();\r\n int number;\r\n \r\n for (int counter=1; counter<=10;counter++);\r\n number = 10000+dice.nextInt(100000);\r\n \r\n String hasil = TF3.getText();\r\n isi4.setText(number + \" \");\r\n }", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\n correctButtonName = buttonList[(int)(Math.random() * buttonList.length)];\r\n \r\n/* If you want to test out the program but hate guessing, this will give you the correct button name.\r\n This is a cheat code for \"X Marks The Spot!\".\r\n System.out.print(correctButtonName);\r\n*/\r\n }" ]
[ "0.7200198", "0.678723", "0.6518305", "0.6034998", "0.6021407", "0.59953165", "0.5987586", "0.59777707", "0.58884925", "0.58239275", "0.5809815", "0.574874", "0.5746596", "0.5727658", "0.56777954", "0.56409186", "0.56354195", "0.5578596", "0.5536089", "0.5532625", "0.5530689", "0.5529525", "0.5529341", "0.55190694", "0.5495772", "0.5487189", "0.5479322", "0.5455153", "0.54550314", "0.54260606", "0.54121053", "0.5393461", "0.53933966", "0.5389283", "0.5385152", "0.5370646", "0.53702515", "0.5346903", "0.53345984", "0.5291867", "0.5291636", "0.52702546", "0.52687114", "0.5266888", "0.5265054", "0.52581424", "0.52530724", "0.5252309", "0.52480453", "0.5239115", "0.5233455", "0.52316505", "0.52227986", "0.5219802", "0.52173334", "0.5209291", "0.52078223", "0.5192234", "0.51896834", "0.5184291", "0.5182784", "0.5180592", "0.5173907", "0.51724535", "0.5169692", "0.5163803", "0.51630235", "0.5158828", "0.515753", "0.5153659", "0.5153426", "0.51530224", "0.5152263", "0.51514107", "0.51502466", "0.5145694", "0.5142274", "0.5141605", "0.5130589", "0.5127296", "0.51256233", "0.5122887", "0.51180387", "0.5116713", "0.5111291", "0.51079625", "0.510526", "0.5103392", "0.51009315", "0.5095877", "0.50917757", "0.5089716", "0.5085554", "0.5083101", "0.50830823", "0.5082519", "0.5081379", "0.50746006", "0.50730795", "0.5067351" ]
0.5686658
14
getter for the current clue selected for the game
public Clue getCurrentClue() { return _currentClue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getSelected()\n\t{\n\t\treturn _current.ID;\n\t}", "public int getSelected() {\n \t\treturn selected;\n \t}", "public Piece firstSelected()\n {\n return firstSelected;\n }", "public Axiom getSelected() {\r\n\treturn view.getSelected();\r\n }", "public Color getSelectedColor() {\n return this.selectedColor;\n }", "public Color getSelectedColor() {\r\n return mColor;\r\n }", "public S getSelected()\n\t\t{\n\t\t\treturn newValue;\n\t\t}", "public static int getDrawingTool(){ return selectedDrawingTool; }", "public int getCurrentChoice() {\n return currentChoice;\n }", "public Ward getSelected() {\n\t\treturn table.getSelectionModel().getSelectedItem();\n\t}", "public TileEnum getSelectedTile() {\n return selectedTile;\n }", "public String getSelected ()\n {\n return ((GroupItem)gbox.getSelectedItem()).getSelected();\n }", "public TetrisPiece getCurrentPiece() {\n\t\treturn currentPiece;\n\t}", "public String getSelected()\r\n {\r\n if (selectedIndex == -1)\r\n return null;\r\n \r\n return towerTypes[selectedIndex];\r\n }", "public Object getSelection() {\n return selection;\n }", "public Integer getCurrentColor() {\n for (int i = 0; i < colorPickers.size(); i++) {\n if (colorPickers.get(i).isSelected()) {\n return colorPickers.get(i).getColor();\n }\n }\n return null;\n }", "public String getActiveGame() {\n return myActiveGame;\n }", "public Game getCurrentGame()\r\n {\r\n return currentGame;\r\n }", "public int getChoice()\n {\n super.setVisible(true);\n return this.choice;\n }", "public String getMySelection() {\n return mySelection;\n }", "Coord getSelected() {\n if (selected == null) {\n return null;\n }\n return new Coord(selected.col, selected.row);\n }", "public int getSelection() {\n \tcheckWidget();\n \treturn selection;\n }", "Object getSelection();", "public Controllable getSelected()\r\n\t{\r\n\t\t//update army\r\n\t\tif(this.rallyPoint.getSelectedLeaf() != this.selectedRally)\r\n\t\t{\r\n\t\t\tthis.selectedRally=(RallyPoint)this.rallyPoint.getSelectedLeaf();\r\n\t\t\tarmy.removeAllChildren();\r\n\t\t\t\r\n\t\t\tSelectorNode<Controllable> fullArmy=addNode(\"Army\",\"Entire Army\");\r\n\t\t\tSelectorNode<Controllable> combatArmy=addNode(\"Army\",\"Combat Army\");\r\n\t\t\tSelectorNode<Controllable> supportArmy=addNode(\"Army\",\"Support Army\");\r\n\t\t\tif(this.selectedRally!=null)\r\n\t\t\t{\r\n\t\t\t\tList<Unit> fullArmyUnits = this.selectedRally.getFullArmy();\r\n\t\t\t\tList<Unit> combatArmyUnits = this.selectedRally.getCombatArmy();\r\n\t\t\t\tList<Unit> supportArmyUnits = this.selectedRally.getSupportArmy();\r\n\t\t\t\t\r\n\t\t\t\tIterator<Unit> iter1 = fullArmyUnits.iterator();\r\n\t\t\t\twhile(iter1.hasNext())\r\n\t\t\t\t{\r\n\t\t\t\t\tfullArmy.addChild(new SelectorNode<Controllable>(iter1.next()));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tIterator<Unit> iter2 = combatArmyUnits.iterator();\r\n\t\t\t\twhile(iter2.hasNext())\r\n\t\t\t\t{\r\n\t\t\t\t\tcombatArmy.addChild(new SelectorNode<Controllable>(iter2.next()));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tIterator<Unit> iter3 = supportArmyUnits.iterator();\r\n\t\t\t\twhile(iter3.hasNext())\r\n\t\t\t\t{\r\n\t\t\t\t\tsupportArmy.addChild(new SelectorNode<Controllable>(iter3.next()));\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\r\n\t\t}\t\t\r\n\t\treturn super.getSelected();\r\n\t}", "public LiveData<Recipe> getSelected() {\n return repository.get(selectedId);\n }", "public Selection getSelection() {\n return mSelection;\n }", "Player getSelectedPlayer();", "public Gnome getSelectedItem() {\n return selectedItem;\n }", "private PR1Model.Shape getSelection() { return selection.get(); }", "private int getMenuSelection() {\n return view.printMenuAndGetSelection();\n }", "public Object getSelectedObject() {\n return (String) itsCombo.getSelectedItem();\n }", "public boolean getSelected()\n {\n return selected; \n }", "int getSelectedSpriteValue();", "public String selection() {\n return inputter.selection();\n }", "public E getSelected() {\n ButtonModel selection = selectedModelRef.get();\n //noinspection UseOfSystemOutOrSystemErr\n final String actionCommand = selection.getActionCommand();\n //noinspection HardCodedStringLiteral,UseOfSystemOutOrSystemErr\n return Objects.requireNonNull(textMap.get(actionCommand));\n }", "public int getSelectedId() {\n return selectedId;\n }", "protected ARXNode getSelectedNode() {\n return this.selectedNode;\n }", "public Piece.COLOR getActiveColor() {\n return activePlayer;\n }", "public String getSelectedAnswer() {\n\t\tList<Integer> selected = getSelectedIndexes();\n\t\treturn this.value.get(selected.get(0));\n\t}", "public Cell getSelectedCell() {\n return selectedCell;\n }", "public Arena getSelectedArena() {\n return selectedArena;\n }", "public ArrayList<Order> getCurrentSelection(){\n\t\t return this.currentSelection;\n\t }", "public String getSelectedItem() {\n return (String) itsCombo.getSelectedItem();\n }", "public CharSequence getSelectedLabel()\n\t{\n\t\treturn _current.label.getText();\n\t}", "public CalculationEnum getSelectedCalculation(){\n\t\treturn selectedEnum;\n\t}", "public int getSelectedLine() {\n\t\treturn selectedLine;\n\t}", "public ImageFlowItem getSelectedValue()\r\n {\r\n if (getAvatars() == null || getAvatars().isEmpty() || getSelectedIndex() >= getAvatars().size() || getSelectedIndex() < 0)\r\n {\r\n return null;\r\n }\r\n\r\n return getAvatars().get(getSelectedIndex());\r\n }", "public int getSelectedValue() {\n\t\treturn this.slider.getValue();\n\t}", "private String getSelectedString() {\n\t\treturn menuItem[selectedIndex];\r\n\t}", "public String getSelectedItem() {\n if (selectedPosition != -1) {\n Toast.makeText(activity, \"Selected Item : \" + list.get(selectedPosition), Toast.LENGTH_SHORT).show();\n return list.get(selectedPosition);\n }\n return \"\";\n }", "public String getClueId() {\n return clueId;\n }", "public final int getSelectedBonePickSpot() {\n return selectedBonePickSpot;\n }", "public String getSelected ()\n {\n ConfigTreeNode node = _tree.getSelectedNode();\n return (node == null)\n ? null\n : node.getName();\n }", "public int getSelectedLayer ()\n {\n return _table.getSelectedRow();\n }", "public int getSelectionColor()\n\t{\n\t\treturn getObject().getSelectionColor();\n\t}", "public Clue getClue(String clue)\n {\n return clues.get(clue);\n }", "public String getSelection() {\n\t\tif (selection == null) {\n\t\t\treturn Floor.NO_FLOOR_IMAGE_SELECTION;\n\t\t} else {\n\t\t\treturn selection;\n\t\t}\n\t}", "public Train getSelectedTrain(){\n\n return this.selectedTrain;\n }", "public Level getSelectedLevel() {\r\n\t\treturn lvlm.getLevels().get(levelList.getSelectedIndex());\r\n\t}", "public Piece getCurrPlayer() {\n return this.currPlayer;\n }", "private ColorMixerModel.ColorItem selectedColor(Point p){\n for(ColorMixerModel.ColorItem c: cmModel.colorSet){\n if(p.distance(c.getPos()) < c.getR()){\n return c;\n }\n }\n return null;\n }", "public Prompt getCurrent() {\n\t\t\treturn current;\n\t\t}", "public int getChoice() {\n\t\treturn choice;\n\t}", "public int getCurrentGameRound(){\n\t\treturn currentGameRound;\n\t}", "public Tile getCurrent(){\n\t\tif(generated)\n\t\t\treturn deck.get(curr);\n\t\tthrow new RuntimeException(\"Deck must be generated before using it\");\n\t}", "public online.food.ordering.Food getSelectedFood()\n {\n return selectedFood;\n }", "public Category getSelectedCategory() {\r\n Category selected = getSelectedItem();\r\n\r\n return selected == emptyCategory ? null : selected;\r\n }", "protected String getDifficulty() {\n\t\treturn (String) difficultyChooser.getSelectedItem();\n\t}", "public CTabItem getSelection() {\n checkWidget();\n CTabItem result = null;\n if( selectedIndex != -1 ) {\n result = ( CTabItem )itemHolder.getItem( selectedIndex );\n }\n return result;\n }", "public static GameClient getCurrentGame() {\n\t\treturn arcade.getCurrentGame();\n\t}", "public BooleanProperty getSelected() {\n return selected;\n }", "public YuiImage getSelectedImg() {\r\n\t\treturn selectedImg;\r\n\t}", "public int getSelectedItem() {\n return mSelectedItem;\n }", "public Game getGame() {\n\t\treturn gbuilder.getGameProduct();\n\t}", "public Player getSelector() {\n return selector;\n }", "public Item getSelectedItem() { return this.getSelectedSlot().getMappedItem(); }", "public int[] getSelected()\n\t{\n\t\tint num = 0;\n\t\tfor (int i = 0; i < 13; i++)\n\t\t{\n\t\t\tif (this.selected[i])\n\t\t\t{\n\t\t\t\tnum++;\n\t\t\t}\n\t\t}\n\t\tint[] selected_cards = new int[num];\n\n\t\tint c = 0;\n\n\t\tfor (int i = 0; i < 13; i++)\n\t\t{\n\t\t\tif (this.selected[i])\n\t\t\t{\n\t\t\t\tselected_cards[c] = i;\n\t\t\t\tc++;\n\t\t\t}\n\t\t}\n\n\t\tif (num > 0)\n\t\t{\n\t\t\treturn selected_cards;\n\t\t}\n\n\t\treturn null;\n\t}", "public String getCurrentLevel() \n { \n return currentLevel; \n }", "public List<F> getSelected() {\n return selected;\n }", "public int getCurrentTurn(){\n return m_currentTurn;\n }", "public int getCurrentCoolDown()\n\t{\n\t\treturn CurrentCoolDown;\n\t}", "@Nullable\n public T getSelectedItem() {\n return SerDes.unmirror(getElement().getSelectedItem(), getItemClass());\n }", "public int getCurrent(){\r\n\t\treturn dialogToDisplay;\r\n\t}", "@FXML\n Komponent[] getSelected() {\n Komponent prosessor = velgProsessor.getValue();\n Komponent skjermkort = velgSkjermkort.getValue();\n Komponent minne = velgMinne.getValue();\n Komponent lagring = velgLagring.getValue();\n Komponent tastatur = velgTastatur.getValue();\n Komponent datamus = velgDatamus.getValue();\n Komponent skjerm = velgSkjerm.getValue();\n\n // legg verdier i array\n Komponent[] k = {prosessor,skjermkort,minne,lagring,tastatur,datamus,skjerm};\n\n print(k); // print kvittering med valgte komponenter og totpris\n\n return k; // returner verdier fra nedtrekksliste som array\n }", "public Object getSelectedKey()\n\t{\n\t\tif ( m_results.size() == 0)\n\t\t\treturn null;\n\t\treturn m_results.get(0);\n\t}", "public T getSelectedCriticalValue() {\n return normalizedToValue(normalizedCriticalValue);\n }", "public Item getSelectedItem() {\n return this.itemList.getSelectedValue();\n }", "public String getCurrent()\n {\n return current.toString();\n }", "public String getSelectedId() {\n OptionEntry o=getSelectedOption();\n if (o!=null) {\n return o.getId();\n } else {\n return null;\n }\n\n }", "public SelectionKey getSelectionKey(){\n return key;\n }", "public boolean isSelected()\n {\n return selected;\n }", "private OOBibStyle getSelectedStyle() {\n if (selectionModel.getSelected().size() > 0) {\n return selectionModel.getSelected().get(0);\n } else {\n return null;\n }\n }", "@Override\n\tpublic Object getSelection() {\n\t\tObject value = null;\n\t\tif (selectionNode instanceof Selectable) {\n\t\t\tvalue = ((Selectable) selectionNode).getSelection();\n\t\t}\n\t\treturn value;\n\t}", "public int getSelectedIndex() {\n return dialPosition;\n }", "public int getCurrentTurn()\r\n {\r\n return currentTurn;\r\n }", "Piece winner() {\r\n return _winner;\r\n }", "public void getSelected() {\n for (int i = 0; i < list.size(); i++) {\n if (selectColumn.getCellObservableValue(i).getValue().isSelected()) {\n selectedIngredients.add(i + 1);\n }\n }\n }", "public boolean isSelected() \n {\n return selected;\n }", "@Override\r\n protected TreeItem getSelectedItem() {\r\n return getSelectionModel().getSelectedItem();\r\n }", "public List<GameObject> getSelected() {\n\t\treturn selectedObjects;\n\t}" ]
[ "0.708484", "0.6843089", "0.6770799", "0.67655677", "0.66899323", "0.6634083", "0.6552454", "0.6504057", "0.6494634", "0.64578336", "0.64318573", "0.6423032", "0.63979375", "0.6396874", "0.6388862", "0.6383036", "0.6369085", "0.63145244", "0.63137096", "0.63096386", "0.6304832", "0.6287316", "0.6279674", "0.62765646", "0.6262834", "0.625593", "0.62210876", "0.62198174", "0.62197804", "0.6215921", "0.6208412", "0.6183266", "0.6180321", "0.61741364", "0.6165393", "0.61357164", "0.607569", "0.6066398", "0.6009482", "0.60080916", "0.6001305", "0.59987897", "0.5981444", "0.59734297", "0.59717244", "0.5960349", "0.59572804", "0.59553504", "0.5951547", "0.5942252", "0.59290475", "0.5920254", "0.5918125", "0.5904697", "0.5901077", "0.5900153", "0.58773583", "0.5868158", "0.5842851", "0.5830422", "0.58289295", "0.5823576", "0.5812671", "0.5804662", "0.5800354", "0.57945234", "0.57910633", "0.5773601", "0.5770062", "0.57691944", "0.5767974", "0.5757847", "0.5748161", "0.57276964", "0.5724101", "0.5718558", "0.5713122", "0.571032", "0.5703657", "0.5700811", "0.5698438", "0.5697542", "0.56860846", "0.5684107", "0.5673548", "0.5669706", "0.56680226", "0.56678903", "0.56550485", "0.5650982", "0.56484556", "0.5645877", "0.56432384", "0.5641879", "0.56364685", "0.56345457", "0.56341124", "0.56281763", "0.5626118", "0.5625347" ]
0.72666186
0
get how many questions in a category have been answered
public int getAnsweredQuestions(int index){ return _answeredQuestions[index]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getNumberOfAllQuestions();", "int getNumberOfQuestions();", "Integer countAnswersByQuestionId(String questionId);", "Integer getNumQuestions();", "public int getQuestionCount() {\r\n\t\treturn this.question.size();\r\n\t}", "public int getTotalQuestions() {\r\n\t\treturn totalQuestions;\r\n\t}", "List<PlayedQuestion> getPlayedQuestionsCount();", "public int numberOfQuestions() {\n\t\treturn getQuestions().size();\n\t}", "public int getExampleCountByCategory(String cat) throws IllegalArgumentException {\r\n\t\tIterator<AbstractExample> iter = examples.iterator();\r\n\t\tAbstractExample example;\r\n\t\tint count = 0;\r\n\t\twhile (iter.hasNext()) {\r\n\t\t\texample = iter.next();\r\n\t\t\tif (example.getCategory().equals(cat))\r\n\t\t\t\tcount++;\r\n\t\t}\r\n\t\treturn count;\r\n\t}", "public int getNumQuestions() {\n\t\treturn noOfQuestions;\n\t}", "public int numberOfQuestions() { \n\t\ttry {\n\t\t\treturn myQuestions.getNumberOfQuestions();\n\t\t} catch (RemoteException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn 0; \n\t\t} \n\t}", "int getNumberOfServeyQuestions(Survey survey);", "public int getCount() {\n return questionList.size();\n }", "public long getTotalQuestionCount() {\n return Question.count(\"select count(q.id) from Question q, User u, Company c \" +\n \"where q.user = u and u.company = c and u.company = ? and active = ?\",\n this, true);\n }", "public int getTotalCorrectAnswers() {\r\n\t\treturn totalCorrectAnswers;\r\n\t}", "int countByExample(CategoryExample example);", "public Integer getAnswerCount() {\n return answerCount;\n }", "@Override\n\t\tpublic int getCount() {\n\t\t\t// TODO Auto-generated method stub\n\t\t\treturn questions.size();\n\t\t}", "int countByExample(QuestionExample example);", "int countByExample(QuestionExample example);", "@Override\n public int getNumberOfCategories() {\n Cursor query = this.writableDatabase.rawQuery(\"SELECT COUNT(*) FROM \" + TABLE_CATEGORIES, null);\n\n query.moveToFirst();\n int count = query.getInt(0);\n query.close();\n\n return count;\n }", "@Test\r\n public void testTotalNumberOfQuestion() {\r\n Application.loadQuestions();\r\n assertEquals(Application.allQuestions.size(), 2126);\r\n }", "private void countAnswers(){\n\t\tfor(Student student: students){\n\t\t\tif(isCorrectAnswer(student.getAnswers())){\n\t\t\t\tcorrectAnswers+=1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\twrongAnswers+=1;\n\t\t\t}\n\t\t}\n\t}", "long countByExample(QuestionExample example);", "long countByExample(QuestionExample example);", "public int getCountForum();", "int getCategoryCount() {\r\n\t\treturn aCount;\r\n\t}", "public int numbers(int[] dice, int category) {\n\t\tint countScore=0;\n\t\tfor (int i = 0;i < n_dice; i++) {\n\t\t\tif(dice[i]==category) {\n\t\t\t\tcountScore=countScore+dice[i];\n\t\t\t}\n\t\t}\n\t\treturn countScore;\n\t}", "int getQuestCount();", "int countByExample(CommonQuestionStrategyTypeExample example);", "public static int numberOfQuestions(int selection)\n\t{\n\t\t\tselection+=1;\n\t\t\tint i=0, size=0;\t\t\t\n\t\t\tquestionsExists = false;\n\n\t\t\twhile(i < questionDetails.get(0).size())\n\t\t\t{\n\t\t\t\t//uses the topic number which was passed down and looks for matches\n\t\t\t\tif(questionDetails.get(0).get(i).equals(selection+\"\"))\n {\n\t\t\t\t\tsize++; \n\t\t\t\t\tquestionsExists = true;\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t\treturn size;\n\t}", "public void cheakCategory(String category) {\n\n if (category.equals(\"1\")) {\n url_count += 1;\n } else if (category.equals(\"4\")) {\n sms_count += 1;\n } else if (category.equals(\"2\")) {\n text_count += 1;\n } else if (category.equals(\"3\")) {\n contact_count += 1;\n } else if (category.equals(\"5\")) {\n initiate_call_count += 1;\n }\n\n }", "@Transactional(propagation=Propagation.SUPPORTS,readOnly=true)\r\n\tpublic Integer categoryQueryCount(String category) {\n\t\tInteger count = musicdao.categorySelectCount(category);\r\n\t\treturn count;\r\n\t}", "public int getAnswers() {\n return answers;\n }", "protected static int countQuestionByText(Question entity, Connection connection)\n throws ApplicationException {\n\n int result = 0;\n\n StringBuilder query = new StringBuilder(\"\");\n query.append(\"SELECT COUNT (*)\");\n query.append(\" FROM \" + TABLE);\n query.append(\" WHERE (\" + COL_QUESTION_TEXT);\n query.append(\" = ?\");\n query.append(\" AND \" + COL_REPORTED);\n query.append(\" <= 3);\");\n\n PreparedStatement statement = null;\n try {\n try {\n // set parameters and execute query\n statement = connection.prepareStatement(query.toString());\n statement.setString(1, entity.getQuestionText());\n ResultSet resultSet = statement.executeQuery();\n\n if (resultSet.next()) {\n result = resultSet.getInt(1);\n }\n } finally {\n if (statement != null) {\n statement.close();\n }\n }\n } catch (SQLException e) {\n throw new ApplicationException(\"Failed to fetch\", e);\n }\n\n return result;\n }", "public int getSize()\r\n\t{\r\n\t\treturn questions.size();\r\n\t}", "public static int countQuestionByText(Question entity) throws ApplicationException {\n int result = 0;\n\n Connection connection = null;\n\n try {\n connection = ConnectionPool.getConnection();\n result = QuestionDatabaseAccess.countQuestionByText(entity, connection);\n } finally {\n ConnectionPool.releaseConnection(connection);\n }\n\n return result;\n }", "public static int countDifferentQuestionsAnsweredByAll (String group) {\n ArrayList<Character> answeredQuestions = new ArrayList<Character>();\n HashMap<Character, Integer> count = new HashMap<Character, Integer>();\n \n String[] people = group.split(\"\\n\");\n for (String person : people) {\n for (int i = 0; i < person.length(); i++) {\n char question = person.charAt(i);\n \n if (!answeredQuestions.contains(question)) {\n answeredQuestions.add(question);\n count.put(question, 1);\n } else {\n count.replace(question, answeredQuestions.get(question) + 1);\n }\n }\n }\n \n int sum = 0;\n for (int j = 0; j < answeredQuestions.size(); j++) {\n System.out.println(j + \"/\" + answeredQuestions.size());\n if (count.get(answeredQuestions.get(j)) == people.length) {\n sum++;\n }\n }\n \n return sum;\n }", "public int getNumCategories(){\n\n return numCategories;\n }", "long countByExample(Question11Example example);", "public long getPublicQuestionCount() {\n return Question.count(\"select count(q.id) from Question q, User u, Company c \" +\n \"where q.user = u and u.company = c and u.company = ? and q.status = ? and active = ?\",\n this, QuestionStatus.ACCEPTED, true);\n }", "long countByExample(Question14Example example);", "@Override\n\t\tpublic int getCount() {\n\t\t\treturn answers.size();\n\t\t}", "private int countCorrectAnswers(boolean[] answers) {\n int numberCorrect = 0;\n for (int i = 0; i < answers.length; i++) {\n if (answers[i]) {\n numberCorrect++;\n }\n }\n return numberCorrect;\n }", "public int getCount() {\n\t\treturn lstCategory.size();\r\n\t}", "public static List<Question> getAllCategoryQuestions(Category cat) {\n List<Question> questions = getQuestions(); //get all the questions\n List<Question> categoryQuestions = new ArrayList<Question>(); //make new list of questions\n for (Question q : questions) {\n if (q.getCategory().getId() == cat.getId()) {\n categoryQuestions.add(q);\n }\n }\n return categoryQuestions;\n }", "long countByExample(Question27Example example);", "public int getTotalAnswers() {\n if (Problem_Type.featOkTst && ((Problem_Type)jcasType).casFeat_totalAnswers == null)\n jcasType.jcas.throwFeatMissing(\"totalAnswers\", \"hw1.qa.Problem\");\n return jcasType.ll_cas.ll_getIntValue(addr, ((Problem_Type)jcasType).casFeatCode_totalAnswers);}", "public ResultSet countByCategory(Category category)\n {\n Connection connection = null;\n PreparedStatement preparedStatement = null;\n ResultSet resultSet = null;\n\n try {\n connection = daoFactory.getConnection();\n preparedStatement = initialisationRequetePreparee(connection, SQL_COUNT_ADVERT, false, category.getId(), category.getId());\n resultSet = preparedStatement.executeQuery();\n } catch (SQLException e) {\n throw new DAOException(e);\n } finally {\n silentClosures(resultSet, preparedStatement, connection);\n }\n\n return resultSet;\n }", "@Transactional(readOnly=true)\n\t@Override\n\tpublic Long getFaqCount(String search, String category) {\n\t\treturn dao.getFaqCount(search, category);\n\t}", "public JLabel getQuestionCounter()\n {\n return questionCounter;\n }", "Integer getNumberOfProducts(Basket basket, Category category);", "int getVotes(QuestionId questionId);", "public int countByExample(CategoryExample example) throws SQLException {\r\n Integer count = (Integer) sqlMapClient.queryForObject(\"CATEGORY.abatorgenerated_countByExample\", example);\r\n return count.intValue();\r\n }", "private int getAnswersCount(int experiment, Configuration config) {\n return getAnswersCountWithoutWorker(experiment, -1, config);\n }", "public int getNumOfCorrectAnswers() {\n if (Problem_Type.featOkTst && ((Problem_Type)jcasType).casFeat_numOfCorrectAnswers == null)\n jcasType.jcas.throwFeatMissing(\"numOfCorrectAnswers\", \"hw1.qa.Problem\");\n return jcasType.ll_cas.ll_getIntValue(addr, ((Problem_Type)jcasType).casFeatCode_numOfCorrectAnswers);}", "public int getNumberOfCorrectAnswers() {\n int correctAnswers = (responses.size() - 1) - incorrectAnswers.size();\r\n if (correctAnswers < 0) {\r\n // FIXME: replace with proper logging?\r\n System.err.println(\"Somehow the number of responses was less than the number of incorrect answers: \"\r\n + responses + \" -- \" + incorrectAnswers);\r\n return 0;\r\n }\r\n return correctAnswers;\r\n }", "@Override\n\tpublic int countByQuestion(long questionId) {\n\t\tFinderPath finderPath = _finderPathCountByQuestion;\n\n\t\tObject[] finderArgs = new Object[] {questionId};\n\n\t\tLong count = (Long)finderCache.getResult(finderPath, finderArgs, this);\n\n\t\tif (count == null) {\n\t\t\tStringBundler query = new StringBundler(2);\n\n\t\t\tquery.append(_SQL_COUNT_ANSWER_WHERE);\n\n\t\t\tquery.append(_FINDER_COLUMN_QUESTION_QUESTIONID_2);\n\n\t\t\tString sql = query.toString();\n\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(sql);\n\n\t\t\t\tQueryPos qPos = QueryPos.getInstance(q);\n\n\t\t\t\tqPos.add(questionId);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tfinderCache.putResult(finderPath, finderArgs, count);\n\t\t\t}\n\t\t\tcatch (Exception exception) {\n\t\t\t\tfinderCache.removeResult(finderPath, finderArgs);\n\n\t\t\t\tthrow processException(exception);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "public int getNbLikesQuestion() {\n return this.nbLikesQuestion;\n }", "long countByExample(DiscussExample example);", "public int getQuestCount() {\n return quest_.size();\n }", "List<Question> getQuestionsUsed();", "int getEducationsCount();", "int getConditionalResponsesCount();", "public int getQuestCount() {\n if (questBuilder_ == null) {\n return quest_.size();\n } else {\n return questBuilder_.getCount();\n }\n }", "public Integer getCollapsedAnswerCount() {\n return collapsedAnswerCount;\n }", "public static int csQuizAnswer(int csQuestions) {\r\n int answer = 0;\r\n\r\n switch (csQuestions) {\r\n case 1:\r\n answer = 3;\r\n break;\r\n case 2:\r\n answer = 4;\r\n break;\r\n case 3:\r\n answer = 3;\r\n break;\r\n case 4:\r\n answer = 3;\r\n break;\r\n case 5:\r\n answer = 4;\r\n break;\r\n case 6:\r\n answer = 4;\r\n break;\r\n case 7:\r\n answer = 1;\r\n break;\r\n case 8:\r\n answer = 3;\r\n break;\r\n case 9:\r\n answer = 1;\r\n break;\r\n case 10:\r\n answer = 1;\r\n break;\r\n case 11:\r\n answer = 2;\r\n break;\r\n case 12:\r\n answer = 3;\r\n break;\r\n case 13:\r\n answer = 4;\r\n break;\r\n case 14:\r\n answer = 1;\r\n break;\r\n case 15:\r\n answer = 3;\r\n break;\r\n case 16:\r\n answer = 2;\r\n break;\r\n case 17:\r\n answer = 1;\r\n break;\r\n case 18:\r\n answer = 4;\r\n break;\r\n case 19:\r\n answer = 3;\r\n break;\r\n case 20:\r\n answer = 4;\r\n break;\r\n }\r\n return answer;\r\n }", "int getResponsesCount();", "public List<Question> getQuestions(Category category) {\n List<Question> questions = null;\n try {\n DataBaseBroker dbb = new DataBaseBroker();\n dbb.loadDriver();\n dbb.establishConnection();\n questions = dbb.getQuestion(category);\n dbb.commit();\n dbb.closeConnection();\n } catch (Exception ex) {\n Logger.getLogger(GameDBLogic.class.getName()).log(Level.SEVERE, null, ex);\n }\n return questions;\n }", "private int getNumberCorrect() {\n RadioButton rb1 = (RadioButton) findViewById(R.id.question_1_correct);\n RadioButton rb2 = (RadioButton) findViewById(R.id.question_2_correct);\n RadioButton rb3 = (RadioButton) findViewById(R.id.question_3_correct);\n RadioButton rb4 = (RadioButton) findViewById(R.id.question_4_correct);\n boolean q5Answer = checkQuestion5();\n boolean q6answer = checkQuestion6();\n ToggleButton tb7 = (ToggleButton) findViewById(R.id.question_7);\n ToggleButton tb8 = (ToggleButton) findViewById(R.id.question_8);\n boolean bool8 = !tb8.isChecked();\n ToggleButton tb9 = (ToggleButton) findViewById(R.id.question_9);\n ToggleButton tb10 = (ToggleButton) findViewById(R.id.question_10);\n\n boolean answers[] = new boolean[]{rb1.isChecked(), rb2.isChecked(), rb3.isChecked(), rb4.isChecked(),\n q5Answer, q6answer, tb7.isChecked(), bool8, tb9.isChecked(),\n tb10.isChecked()};\n return countCorrectAnswers(answers);\n }", "@Query(value = \"{alias:?0}\", count = true)\n int countQuiz();", "public List<Question> getCategory(String category) {\n List<Question> questions = loadQuestions(\"quiz/\" + category + \".txt\");\n return questions;\n }", "public int countByAnswerid(long answerid)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "private int scoreForThisCategory(int category, int playerName) {\n\t\t// at start let the score be 0.\n\t\tint score = 0;\n\t\t// if player chose one to six we score++ every time we get that number\n\t\t// in the dice. that will give us how many that number player chose is\n\t\t// in the dice.\n\t\tif (category >= 1 && category <= 6) {\n\t\t\tfor (int i = 0; i < N_DICE; i++) {\n\t\t\t\tif (diceResults[i] == category) {\n\t\t\t\t\tscore++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// than we multiple it on what number(category) player chose to get\n\t\t\t// the final score for this category.\n\t\t\tscore *= category;\n\t\t\t// if player chose THREE_OF_A_KIND than score is the sum of the\n\t\t\t// numbers on dice.\n\t\t} else if (category == THREE_OF_A_KIND) {\n\t\t\tfor (int i = 0; i < N_DICE; i++) {\n\t\t\t\tscore += diceResults[i];\n\t\t\t}\n\t\t\t// if player chose FOUR_OF_A_KIND than score is the sum of the\n\t\t\t// numbers on dice.\n\t\t} else if (category == FOUR_OF_A_KIND) {\n\t\t\tfor (int i = 0; i < N_DICE; i++) {\n\t\t\t\tscore += diceResults[i];\n\t\t\t}\n\t\t\t// if player chose FULL_HOUSE than score is 25.\n\t\t} else if (category == FULL_HOUSE) {\n\t\t\tscore = 25;\n\t\t\t// if player chose SMALL_STRAIGHT than score is 30.\n\t\t} else if (category == SMALL_STRAIGHT) {\n\t\t\tscore = 30;\n\t\t\t// if player chose LARGE_STRAIGHT than score is 40.\n\t\t} else if (category == LARGE_STRAIGHT) {\n\t\t\tscore = 40;\n\t\t\t// if player chose YAHTZEE than score is 50.\n\t\t} else if (category == YAHTZEE) {\n\t\t\tscore = 50;\n\t\t\t// if player chose CHANCE score is the sum of numbers on the dice.\n\t\t} else if (category == CHANCE) {\n\t\t\tfor (int i = 0; i < N_DICE; i++) {\n\t\t\t\tscore += diceResults[i];\n\t\t\t}\n\t\t}\n\t\t// finally method will return the score.\n\t\treturn score;\n\t}", "int getConceptLanguagesCount();", "int countByExample(UTbInvCategoryExample example);", "public AppsCategoriesCounter getAppsCategoriesCounter(){\n AppsCategoriesCounter categoriesCounter = new AppsCategoriesCounter();\n\n categoriesCounter.setEducationalCount(getEducationalCount());\n categoriesCounter.setForFunCount(getForFunCount());\n categoriesCounter.setBlockedCount(getBlockedCount());\n\n return categoriesCounter;\n }", "public int getNumAnswer() {\n return numAnswer;\n }", "long getRecipesCount();", "public int getLength(){\n return textQuestions.length;\n }", "int getNewlyAvailableQuestsCount();", "int getConditionalCasesCount();", "int getMessageCount(@Nullable CompilerMessageCategory category);", "int getCountOfAllBooks();", "public int getSize()\n {\n return questionList.size();\n }", "int commentsCount();", "int getAcksCount();", "int getAcksCount();", "int getScoresCount();", "@Override\n\t@Transactional(readOnly = true)\n\tpublic int getNumberOfEvents(String keyWords, Long categoryId) throws InstanceNotFoundException {\n\t\tif(categoryId != null){ \n\t\t\tif (!categoryDao.exists(categoryId))\n\t\t\t\tthrow new InstanceNotFoundException(categoryId, Category.class.getName());\n\t\t}\n\t\t\n\t\treturn eventDao.getNumberOfEventsByKeyWordsCategoryUser(keyWords, categoryId);\n\t}", "public static void takeTest(Question [] questions) {\n int score = 0;\n Scanner keyboardInput = new Scanner(System.in);\n for(int i = 0; i < questions.length; i++){\n System.out.println(questions[i].prompt);\n String answer = keyboardInput.nextLine();\n if(answer.equals(questions[i].answer)) {\n score++;\n }\n\n }\n System.out.println(\"Voce conseguiu \" + score + \"/\" + questions.length + \"pontos\");\n\n }", "int postsCount();", "public int q2() {\n\t\tSet<String> clubes = jogadores.stream()\n\t\t\t\t.map(x-> x.getClub())\n\t\t\t\t.collect(Collectors.toSet());\n\t\treturn clubes.size();\n\t}", "private void getQuestions(){\n final int[] countQuestions = new int[1];\n mQuestionCountReference = FirebaseDatabase.getInstance().getReference().child(\"Questions\");\n mQuestionCountReference.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()){\n countQuestions[0] = (int) dataSnapshot.getChildrenCount();\n updateQuestion(countQuestions[0]);\n timer(30, quiz_timer);\n }else{\n quiz_question_label.setText(\"No Questions in database\");\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n\n });\n }", "public int getMaximumCategoryCount() { return this.maximumCategoryCount; }", "int getStudentResponseCount();", "int getAuthoritiesCount();", "private int getEducationalCount(){\n int count = 0;\n\n String whereClause = DbHelper.IS_EDUCATIONAL + \" = ?\";\n String[] whereArgs = new String[]{String.valueOf(true)};\n\n Cursor cursor = mDbHelper.getReadableDatabase().query(DbHelper.TABLE_NAME, null, whereClause, whereArgs, null, null, null);\n\n while(cursor.moveToNext()){\n count++;\n }\n\n return count;\n }", "public ArrayList<Integer> getCountExercisesById (){\r\n\t\t\r\n\t\treturn daoEjercicio.getCountExercisesById();\r\n\t}", "public void onCategoryClicked(String category){\n\t\tfor(int i = 0 ; i < mData.getStatistics().size(); i++){\r\n\t\t\tif(mData.getStatistics().get(i).getCategory().equals(category)){\r\n\t\t\t\tif(mData.getStatistics().get(i).getDueChallenges() == 0){\r\n\t\t\t\t\tmGui.showToastNoDueChallenges(mData.getActivity());\r\n\t\t\t\t} else {\r\n\t\t\t\t\t//Start activity challenge (learn session) with category and user \t\r\n\t\t\t\t\tNavigation.startActivityChallenge(mData.getActivity(), mData.getUser(), category);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\t\t\r\n\t}" ]
[ "0.7338798", "0.72069955", "0.71711886", "0.6990458", "0.69008523", "0.6873881", "0.6840393", "0.678547", "0.6570847", "0.6541276", "0.6450747", "0.6433519", "0.64276314", "0.6423232", "0.64228374", "0.63198054", "0.63005435", "0.62983716", "0.62827736", "0.62827736", "0.62738985", "0.62573117", "0.62380457", "0.6155071", "0.6155071", "0.6144294", "0.61345655", "0.6130558", "0.6123997", "0.6071762", "0.60554534", "0.6031706", "0.60192925", "0.6001243", "0.59658325", "0.5886342", "0.58843356", "0.5884295", "0.58707875", "0.5847456", "0.5846206", "0.5809779", "0.57827985", "0.5782279", "0.57815725", "0.5755298", "0.5748426", "0.57122093", "0.5707858", "0.56491387", "0.5641075", "0.56320405", "0.5627376", "0.56230694", "0.5581157", "0.5576968", "0.55714834", "0.5556492", "0.55558306", "0.55507755", "0.5547353", "0.5539367", "0.5538203", "0.55347884", "0.5532048", "0.5512635", "0.5510694", "0.55101407", "0.5503459", "0.5500441", "0.5498334", "0.54941386", "0.54824466", "0.5476105", "0.5469652", "0.54517305", "0.54391277", "0.5412482", "0.5395842", "0.5383965", "0.53810996", "0.5368826", "0.53431684", "0.5328443", "0.53270984", "0.5319042", "0.5318996", "0.5318996", "0.53117424", "0.53112596", "0.5309821", "0.5300583", "0.5289996", "0.5285242", "0.52832204", "0.52489406", "0.5245037", "0.5231468", "0.52245617", "0.5221925" ]
0.56546855
49
getter for the current Player playing the game
public String getCurrentPlayer() { return _currentPlayer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Player getCurrentPlayer() {\n return currentPlayer;\n }", "public Player getCurrentPlayer() {\n return currentPlayer;\n }", "public String getCurrentPlayer() {\n return currentPlayer;\n }", "public Player getCurrentPlayer(){\n return this.currentPlayer;\n }", "public int getCurrentPlayer() {\n return player;\n }", "public int getCurrentPlayer() {\n\t\treturn player;\n\t}", "public String getCurrentPlayer() {\r\n return this.playerIds[this.currentPlayer];\r\n }", "public String getPlayer() {\r\n return player;\r\n }", "public Player getPlayer() {\n\t\treturn this.player;\r\n\t}", "public final Player getPlayer() {\n return player;\n }", "protected Player getPlayer() {\n return getGame().getPlayers().get(0);\n }", "@Override\n public Player getWinningPlayer() {\n return wonGame ? currentPlayer : null;\n }", "public ServerPlayer getCurrentPlayer() {\r\n\t\treturn this.currentPlayer;\r\n\t}", "public Player currentPlayer() {\n\t\treturn (currentPlayer);\n\t}", "public int getPlayer() {\r\n\t\treturn myPlayer;\r\n\t}", "public User getCurrentPlayer() {\n\t\treturn currentPlayer;\n\t}", "Player getCurrentPlayer();", "Player getCurrentPlayer();", "public Player getActivePlayer() {\r\n return activePlayer;\r\n }", "public Player getPlayer() {\n\t\treturn this.player;\n\t}", "public Player getPlayer() {\r\n\t\treturn player;\r\n\t}", "public Player getCurrentPlayer()\n\t{\n\t\treturn current;\n\t}", "public int getActivePlayer() {\n return activePlayer;\n }", "public Player getPlayer() {\r\n return world.getPlayer();\r\n }", "public Player getActivePlayer() {\n return activePlayer;\n }", "public Player getPlayer() {\n\t\t\treturn player;\n\t\t}", "public int getPlayer() {\r\n\t\treturn player;\r\n\t}", "public Player getPlayer()\r\n\t{\r\n\t\treturn mPlayer;\r\n\t}", "public Player getPlayer() {\n\t\treturn player;\n\t}", "public Player getPlayer() {\n\t\treturn player;\n\t}", "public Player getPlayer() {\n\t\treturn player;\n\t}", "public Player getPlayer() {\n\t\treturn player;\n\t}", "public Player getPlayer() {\n\t\treturn player;\n\t}", "public Player getPlayer() {\n\t\treturn player;\n\t}", "public Player getPlayer() {\n\t\treturn player;\n\t}", "public int getCurrentPlayer(){\n return this.currentPlayer;\n }", "public AbstractGameObject getPlayer() {\n return this.player;\n }", "public Player getPlayer(){\n\t\treturn this.player;\n\t}", "public int activePlayer() {\n return this.activePlayer;\n }", "public Player getPlayer() {\n return player;\n }", "public Player getPlayer() {\r\n return player;\r\n }", "public int getPlayer()\n {\n return this.player;\n }", "@Override\n public String getCurrentPlayer() {\n return godPower.getCurrentPlayer();\n }", "public Player getPlayer() {\n return player;\n }", "public Player getPlayer() {\n return player;\n }", "public Player getPlayer() {\n return player;\n }", "public Player getPlayer() {\n return player;\n }", "public Player getPlayer() {\n return player;\n }", "public Player getPlayer() {\n\t\treturn p;\n\t}", "public PlayerID getPlayer(){\n\t\treturn this.player;\n\t}", "public Game getCurrentGame()\r\n {\r\n return currentGame;\r\n }", "public String getPlayer() {\n return p;\n }", "public Player getPlayer() {\n return player;\n }", "public char getCurrentPlayer() {\n\t\treturn currentPlayer;\n\t}", "Player currentPlayer();", "public Player getPlayer();", "public Player getPlayer();", "public Player getPlayer()\r\n {\r\n return player;\r\n }", "public Player getPlayer() {\n return humanPlayer;\n }", "public Player getPlayer() {\n return (roomPlayer);\n }", "public Player getActivePlayer() {\n if (getActiveColor() == Piece.COLOR.RED)\n return getRedPlayer();\n else\n return getWhitePlayer();\n }", "public Player getPlayer() {\n return me;\n }", "public Sprite getPlayer() {\n\t\treturn player;\n\t}", "public Player getPlayer() {\n return p;\n }", "public ArrayList<SongPanel> getCurrentPlaying() {\n return currentPlaying;\n }", "String getPlayer();", "Player getPlayer();", "public char getPlayer() {\n return player;\n }", "protected Player getPlayer() { return player; }", "public String getActiveGame() {\n return myActiveGame;\n }", "public PlayerEntity getPlayer() {\n return player;\n }", "public PlayerEntity getPlayer() {\n return player;\n }", "public String getPlayerName() {\n return this.playerName;\n }", "public Player getPlayer() { return player; }", "public Player getCurrentPlayer(){\n String playerId = getUser().get_playerId();\n\n Player player = null;\n\n try {\n player = getCurrentGame().getPlayer(playerId);\n } catch(InvalidGameException e) {\n e.printStackTrace();\n System.out.println(\"This is the real Error\");\n }\n\n return player;\n }", "public boolean isCurrentPlayer() {\n return playerStatus.isActive;\n }", "public static EntityPlayer getPlayer() {\n\t\treturn ModLoader.getMinecraftInstance().thePlayer;\n\t}", "public String getPlayerName() {\n return playerName;\n }", "public String getPlayerName() {\n return playerName;\n }", "public String getActivePlayer() {\n\t\t\n\t\tif(player01.getIsCurrentlyPlaying()){\n\t\t\t\n\t\t\t// Return what player is active as a string.\n\t\t\treturn \"Player 01: \";\n\t\t}else {\n\t\t\t\n\t\t\treturn \"Player 02: \";\n\t\t}\n\t}", "@Override\r\n\t\tpublic boolean isPlayer() {\n\t\t\treturn state.isPlayer();\r\n\t\t}", "public PlayableItem getCurrentPlayingItem() {\n\t\treturn currentPlayingItem;\n\t}", "public int getCurrentPlayerIndex(){\r\n return currentPlayerIndex;\r\n }", "public ViewerManager2 getPlayer() {\n return this.player;\n }", "public Strider getPlayer() {\n return player;\n }", "public String getPlayerName() {\n\n return m_playerName;\n }", "@Override\n public int getWinner()\n {\n return currentPlayer;\n }", "public PlayerState getPlayerState() {\r\n return playerState;\r\n }", "Boolean isPlaying() {\n return execute(\"player.playing\");\n }", "public PlayerData getPlayerData() {\n return player;\n }", "@java.lang.Override\n public POGOProtos.Rpc.CombatProto.CombatPlayerProto getPlayer() {\n return player_ == null ? POGOProtos.Rpc.CombatProto.CombatPlayerProto.getDefaultInstance() : player_;\n }", "public Player getCurrentTurn() {\r\n\t\treturn this.currentTurn;\r\n\t}", "public Piece getCurrPlayer() {\n return this.currPlayer;\n }", "public Player getPlayer() { return player;}", "PlayerState getPlayerState() {\n return playerState;\n }", "public Player getClientPlayer() {\n\t\treturn players.get(0);\n\t}", "public boolean getPlaying() {\n\t\treturn this.isPlaying;\n\t}", "public ArrayList<Player> getPlayersInGame() {\n return playersInGame;\n }", "public PlayerState getPlayerState() {\n return this.playerState;\n }", "public PlayerView getPlayerView() {\n return playerView;\n }" ]
[ "0.80728257", "0.80728257", "0.80512816", "0.8011754", "0.8009444", "0.7884759", "0.786805", "0.78664786", "0.784063", "0.7830842", "0.78221244", "0.7820034", "0.7805125", "0.7796484", "0.77901995", "0.7788937", "0.77877337", "0.77877337", "0.77845997", "0.77749544", "0.77662313", "0.7755733", "0.7745019", "0.77361065", "0.77358806", "0.7701909", "0.7697758", "0.7696403", "0.76907766", "0.76907766", "0.76907766", "0.76907766", "0.76907766", "0.76907766", "0.76907766", "0.7679225", "0.76715976", "0.7635813", "0.76331717", "0.7567479", "0.7540178", "0.75185686", "0.75017977", "0.74825436", "0.74825436", "0.74825436", "0.74825436", "0.74825436", "0.74778587", "0.7474028", "0.7464434", "0.7456375", "0.7446393", "0.7445967", "0.7443216", "0.7416971", "0.7416971", "0.73966455", "0.7330246", "0.72909546", "0.72828037", "0.72725964", "0.7253624", "0.72436965", "0.72322357", "0.72219753", "0.72156864", "0.7210585", "0.71999085", "0.7193212", "0.7181858", "0.7181858", "0.71736914", "0.71426", "0.7116026", "0.7078402", "0.7066545", "0.70642406", "0.70642406", "0.70620275", "0.70562196", "0.7051498", "0.70260936", "0.7014643", "0.701162", "0.7004266", "0.6997908", "0.6988712", "0.69877875", "0.69853604", "0.6985216", "0.6984914", "0.6968496", "0.6964771", "0.6962262", "0.69570786", "0.6955877", "0.69497865", "0.694589", "0.6914444" ]
0.79966646
5
sets the current player playing the game
public void setCurrentPlayer(String currentPlayer) { _currentPlayer = currentPlayer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setPlayer(Player player) {\n this.currentPlayer = player;\n }", "private void setPlayer() {\n player = Player.getInstance();\n }", "@Override\n\tpublic void startGame(){\n\t\tsuper.currentPlayer = 1;\n\t}", "public void setCurrentPlayer(Player P){\n this.currentPlayer = P;\n }", "public void setPlaying() {\n\t\tstate = State.INGAME;\n\t}", "public void setPlayer(int play)\n {\n this.player=play;\n }", "private void changeCurrentPlayer() {\n switch (currentPlayer) {\n case 0: currentPlayer = 1;\n return;\n default: currentPlayer = 0;\n return;\n }\n }", "public void setPlayer(Player player) {\r\n this.player = player;\r\n }", "private void setPlayer()\t{\n\t\tgrid.setGameObject(spy, Spy.INITIAL_X, Spy.INITIAL_Y);\n\t}", "public void setAsPlayer(){\n\t\tthis.isPlayer = true;\n\t}", "public void setPlayer(Player player) {\n\t\tthis.player = player;\r\n\t}", "public void setPlayer(Player player) {\n\t\tthis.player = player;\n\t\tplayer.resetAllPlayerGuesses();\n\t}", "public void setActivePlayer()\n {\n activePlayer = !activePlayer;\n }", "public void setPlayer(Player player) {\n this.player = player;\n }", "public void setPlayer(Player player) {\n this.player = player;\n }", "@Override\n\tpublic void playerStarted() {\n mPlaying = true;\n\t\tmStateManager.setState(PlayerState.PLAYING);\n\t}", "public void setPlayer(String player) {\r\n this.player = player;\r\n }", "public void setPlayer(Player player) {\n\t\tthis.player = player;\n\t}", "public void setPlayer(Player player) {\n\t\t\tthis.player = player;\n\t\t}", "public static void changePlayer() {\n\t\tvariableReset();\n\t\tif (curPlayer == 1)\n\t\t\tcurPlayer = player2;\n\t\telse\n\t\t\tcurPlayer = player1;\n\t}", "@Override\n\tpublic void setPlayer(Player player) {\n\n\t}", "public void setPlayer(Player player) {\n\n\t\tif (this.player != null) {\n\t\t\tthrow new IllegalStateException(\"The player for this PlayerGuiDisplay has already been set\");\n\t\t}\n\n\t\tthis.player = player;\n\t}", "public void switchPlayer(){\n // Menukar giliran player dalam bermain\n Player temp = this.currentPlayer;\n this.currentPlayer = this.oppositePlayer;\n this.oppositePlayer = temp;\n }", "public void setPlayer(Player p) {\n\t\tplayer = p;\n\t}", "public final void playGame() {\n\t\tSystem.out.println(\"Welcome to \"+nameOfGame+\"!\");\n\t\tsetup(numberOfPlayers);\n\t\tfor(int i = 0; !isGameOver(); i = (i+1) % numberOfPlayers) {\n\t\t\ttakeTurn(i+1);\n\t\t}\n\t\tfinishGame();\n\t}", "public static void setPlayer(Player p) {\n\t\tUniverse.player = p;\n\t}", "public void play() { player.resume();}", "public void setCurrentTurn(Player player) {\r\n\t\tthis.currentTurn = player;\r\n\t}", "public void runTheGame() {\n\t\txPlayer.setOpponent(oPlayer);\n\t\toPlayer.setOpponent(xPlayer);\n\t\tboard.display();\n\t\txPlayer.play();\n\t}", "private void switchPlayer() {\n Player player;\n playerManager.switchPlayer();\n\n if(playerManager.getCurrentPlayer() == 1)\n player = playerManager.getPlayer(1);\n else if(playerManager.getCurrentPlayer() == 2)\n player = playerManager.getPlayer(2);\n else\n player = new Player(\"No Player exists\");\n\n updateLiveComment(\"Turn : \" + player.getName());\n }", "public void setCurrentPlayerName(String name)\n {\n currentPlayerName = name;\n startGame();\n }", "public void play(Player p) {\n\t\tthis.player=p;\n\t\tplayer.setActualRoom(this.currentRoom);\n\t\twhile (!this.isFinished()) {\n\t\t\tthis.currentRoom=p.getActualRoom();\n\t\t\tif (this.GameOver()) {\n\t\t\t\tSystem.out.println(\"You LOOSE !\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (this.isFinished()) {\n\t\t\t\tSystem.out.println(\"You WIN !\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tp.act();\n\t\t}\n\t\tif (this.isFinished()) {\n\t\t\tSystem.out.println(\"You WIN !\");\n\t\t}\n\t\n\t\t\n\t}", "public void setPlayer(Player newPlayer) {\n roomPlayer = newPlayer;\n }", "public void play() {\n\t\tplay(true, true);\n\t}", "private void pause() { player.pause();}", "public void play() {\n field.draw();\n userTurn();\n if(! field.isFull()) {\n computerTurn();\n }\n }", "public void setSinglePlayer(){\n isSinglePlayer = true;\n }", "public void switchPlayer() {\r\n\t\tif (player == player1) {\r\n\t\t\tplayer = player2;\r\n\t\t} else {\r\n\t\t\tplayer = player1;\r\n\t\t}\r\n\t}", "public void setPlayer(Player myPlayer){\n battlePlayer=myPlayer;\n }", "public void setCurrent(ServerPlayer p) {\n\t\tthis.current = p;\n\t}", "public void setPlayer(Sprite player) {\n\t\tthis.player = player;\n\t}", "protected void playS()\n\t\t{\n\t\t\tplayer.start();\n\t\t}", "static void setCurrentPlayer()\n {\n System.out.println(\"Name yourself, primary player of this humble game (or type \\\"I suck in life\\\") to quit: \");\n\n String text = input.nextLine();\n\n if (text.equalsIgnoreCase(\"I suck in life\"))\n quit();\n else\n Player.current.name = text;\n }", "private void pause()\r\n {\r\n player.pause();\r\n }", "private void SetCurrentPlayer() throws IOException\n {\n if( mTeamsComboBox.getSelectedItem() != null )\n {\n String team = mTeamsComboBox.getSelectedItem().toString();\n String position = mPositionComboBox.getSelectedItem().toString();\n String playerData = GetPlayerString(team, position);\n if( playerData != null )\n SetPlayerData(playerData);\n }\n }", "public static void setupNewGamePlay() {\r\n\t\tSTATUS = Gamestatus.PREPARED;\r\n\t\tGameplay.getInstance().start();\r\n\t\tgui.setMenu(new GameplayMenu(), true);\r\n\t}", "public void setPlayer(Player _player) { // beallit egy ezredest az adott mapElementre, ha az rajta van\n player = _player;\n }", "public void startGame() {\n \t\tcontroller = new GameController(gameConfig, players);\n \t\tcontroller.LOG = controller.LOG + \"#MPClient\";\n \n controller.setCurrentPlayer(firstTurnPid);\n \n \t\tsendStartGame();\n \t}", "void pauseGame() {\n try {\n myGamePause = true;\n myPlayer.stop();\n // when the application pauses the game, resources\n // are supposed to be released, so we close the\n // player and throw it away.\n myPlayer.close();\n myPlayer = null;\n } catch (Exception e) {\n // the music isn't necessary, so we ignore exceptions.\n }\n }", "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 }", "synchronized void resumeGame() {\n try {\n myGamePause = false;\n if (!myShouldPause) {\n // if the player is null, we create a new one.\n if (myPlayer == null) {\n start();\n }\n // start the music.\n myPlayer.start();\n }\n } catch (Exception e) {\n // the music isn't necessary, so we ignore exceptions.\n }\n }", "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}", "public void setD_CurrentPlayer(Player p_CurrentPlayer) {\n d_CurrentPlayer = p_CurrentPlayer;\n }", "public void startPlaying() {\n\t\t\n\t\t// make the player travel to its home base\n\t\ttravelTo(Location.Home);\n\t\t\n\t\t// once it has travelled to its home base, start performing \n\t\t// the appropriate tasks -- whether that is attack or defend\n\t\tif (role == Role.Defender) defend();\n\t\telse if (role == Role.Attacker) attack();\n\t\t\n\t}", "public void setPlayer(final AbstractGameObject player) {\n this.player = player;\n this.cameraHelper.setTarget(this.player);\n }", "public void setCurrentPlayer(Match match, Integer currentPlayer) {\r\n LOGGER.debug(\"--> setCurrentPlayer\");\r\n\r\n if(currentPlayer < 1 || currentPlayer > 2) {\r\n throw new GeneralException(\"currentPlayer must be '1' or '2'!\");\r\n }\r\n match.setCurrentPlayer(currentPlayer);\r\n sendCurrentPlayerMessage(match);\r\n matchRepository.saveAndFlush(match);\r\n LOGGER.debug(\"--> setCurrentPlayer: \" + currentPlayer);\r\n }", "public void setNextActivePlayer() {\n this.activePlayer = getNextActivePlayer();\n // PLAYERLISTENER : Trigger playerEvent for player that is WAITING\n for (PlayerListener listener : playerListeners) {\n PlayerEvent event = new PlayerEvent(this, this.activePlayer, PlayerEvent.PLAYING);\n listener.playerStateChanged(event);\n }\n }", "public void changeActivePlayer() {\n\t\tif(this.getActivePlayer().equals(this.getPlayer1())) {\n\t\t\tthis.setActivePlayer(this.getPlayer2());\n\t\t} else {\n\t\t\tthis.setActivePlayer(this.getPlayer1());\n\t\t}\n\t}", "boolean setPlayer(String player);", "public void setFirstPlayer() {\n notifySetFirstPlayer(this.getCurrentTurn().getCurrentPlayer().getNickname(), onlinePlayers);\n }", "public final void play() {\n\t\tinitialize();\n\t\tstartPlay();\n\t\tendPlay();\n\t}", "public void play() {\r\n\r\n gamestate.startGame();\r\n\r\n while (!quit) {\r\n\r\n if (newGame) {\r\n gamestate.startGame();\r\n turn = 0;\r\n finished = true;\r\n newGame = false;\r\n }\r\n\r\n while (!gamestate.gameOver()) {\r\n\r\n if (newGame) {\r\n break;\r\n }\r\n\r\n turn++;\r\n display.displayBoard();\r\n\r\n if (turn % 2 == 1) {\r\n player1.makeMove(gamestate);\r\n } else {\r\n player2.makeMove(gamestate);\r\n }\r\n\r\n }\r\n\r\n if (finished) {\r\n\r\n display.displayBoard();\r\n\r\n switch (gamestate.getWinner()) {\r\n case Connect4GameState.RED:\r\n System.out.println(\"R wins\");\r\n break;\r\n case Connect4GameState.YELLOW:\r\n System.out.println(\"Y wins\");\r\n break;\r\n default:\r\n System.out.println(\"No one wins\");\r\n }\r\n\r\n finished = false;\r\n\r\n }\r\n\r\n if (display instanceof Connect4ConsoleDisplay) {\r\n quit = true;\r\n }\r\n\r\n }\r\n\r\n }", "public void setPlayState(PlayerState state) { isPaused = !state.playing; }", "public void playGame() {\n\t\t\r\n\t\t\r\n\t\twhile (!theModel.isGameOver()) {\r\n\t\t\tplayRoundOne();\r\n\t\t}\r\n\t\t\r\n\t}", "public void setPlaying(boolean playing) {\n this.playing=playing;\n }", "public static void game_sound() {\n\t\tm_player_game.start();\n\t\tm_player_game.setMediaTime(new Time(0));\n\t}", "public void switchPlayer() {\n \tisWhitesTurn = !isWhitesTurn;\n }", "void pauseGame() {\n myGamePause = true;\n }", "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 }", "public void play() {\n\n init();\n while (isGameNotFinished()) {\n log.info(\"*** Starting next turn\");\n for (Player player : getPlayers()) {\n executeTurn(player);\n }\n }\n log.info(\"*** Game Finished\");\n }", "public void GameStart()\n\t\t{\n\t\t\tplayers_in_game++;\n\t\t}", "private void setPlayerRoom(){\n player.setRoom(currentRoom);\n }", "private void setWhitePlayer(Player player) {\r\n\t\tthis.whitePlayer = player;\r\n\t}", "public void setAudioPlayer(AudioPlayer player) {\n\taudioPlayer = player;\n externalAudioPlayer = true;\n }", "public void setInGame() {\n this.inGame = true;\n }", "private void startPlay() {\n isPlaying = true;\n isPaused = false;\n playMusic();\n }", "public void setPlayer(Player player) {\n if(humanPlayer != null) {\n throw new IllegalArgumentException(\"The player has already been set to \"\n + humanPlayer.getName() + \" with the game piece \" + humanPlayer.getPiece());\n }\n if(player == null) {\n throw new IllegalArgumentException(\"Player cannot be null.\");\n }\n humanPlayer = player;\n }", "public static void pauseGame() {\r\n\t\tfor (MovingUnit mu : _players) {\r\n\t\t\t((WinningInterface) mu).pauseUnit();\r\n\t\t}\r\n\t}", "public void play() {\n\n showIntro();\n startGame();\n\n }", "private void resume() { player.resume();}", "public void playOne(VirtualPet player) {\n\t\tplayer.playPet();\n\t}", "public void setCurrentPlayerIs(int currentPlayerInt){\n\t\tcurrentPlayerIs = currentPlayerInt;\n\t\trepaint();\n\t}", "public void togglePlay() {\n\t\tif (playing)\n\t\t\tpause();\n\t\telse\n\t\t\tplay();\n\t}", "public void setPlayerAtStart(Player player) {\n\t\tplayer.moveTo(start.getX()*10, start.getY()*10, start.getZ()*10);\n\t}", "public void reset() {\n playing = true;\n won = false;\n startGame();\n\n // Make sure that this component has the keyboard focus\n requestFocusInWindow();\n }", "void makePlay(int player) {\n }", "private void playNextPlayer() {\n \n PlayerId nextPlayer = state.nextPlayer();\n players.get(nextPlayer).setHelp(state, handsOfCards.get(nextPlayer), nextPlayer);\n Card c = players.get(nextPlayer).cardToPlay(state, handsOfCards.get(nextPlayer));\n state = state.withNewCardPlayed(c);\n \n handsOfCards.put(nextPlayer, handsOfCards.get(nextPlayer).remove(c));\n players.get(nextPlayer).updateHand(handsOfCards.get(nextPlayer));\n \n for (Map.Entry<PlayerId, Player> pId: players.entrySet()) {\n pId.getValue().updateTrick(state.trick());\n }\n players.get(nextPlayer).resetHelp();\n }", "public void setUpGame() {\n\t\tGameID = sql.getTheCurrentGameID() + 1;\r\n\t\tSystem.err.println(GameID);\r\n\t\ttheModel.shuffleDeck();\r\n\t\ttheModel.createPlayers();\r\n\t\ttheModel.displayTopCard();\r\n\t\t// theModel.chooseFirstActivePlayer();\r\n\t}", "private void setPlayer(BoardSquaresState player){\n\t\tif(player == BoardSquaresState.CROSS){\n\t\t\tselectedPlayer = BoardSquaresState.CROSS;\n\t\t\tplayerSelectionButton.setText(R.id.button_title, \"Cross\");\n\t\t\tplayerSelectionButton.setText(R.id.button_subtitle, \"You go first!\");\n\t\t\tplayerSelectionButton.setImageResource(R.id.selector_button_image, R.drawable.cross_1);\n\t\t\tplayerSelectionButton.setImageResource(R.id.item_set_image, R.drawable.btn_check_on_focused_holo_light);\n\t\t}\n\t\telse{\n\t\t\tselectedPlayer = BoardSquaresState.NOUGHT;\n\t\t\tplayerSelectionButton.setText(R.id.button_title, \"Nought\");\n\t\t\tplayerSelectionButton.setText(R.id.button_subtitle, \"Computer goes first!\");\n\t\t\tplayerSelectionButton.setImageResource(R.id.selector_button_image, R.drawable.nought_1);\n\t\t\tplayerSelectionButton.setImageResource(R.id.item_set_image, R.drawable.btn_check_on_focused_holo_light);\n\t\t}\n\n\t}", "private void i_win() {\n\t\tif (MainMusic.isPlaying())\n\t\t\tMainMusic.stop();\n\t\tMainMusic = MediaPlayer.create(Game.this, R.raw.win);\n\t\tMainMusic.start();\n\t\tgame_panel.Pause_game=true;\n\t\tWinDialog.setVisibility(View.VISIBLE);\n\t}", "public void startPlaying() {\n \t\tif (!isPlaying) {\n \t\t\tisPlaying = true;\n \t\t\tnew PlayThread().start();\n \t\t}\n \t}", "public static void startGamePlay() {\r\n\t\tif(!STATUS.equals(Gamestatus.PREPARED)) {\r\n\t\t\tSystem.err.println(\"Invalid Gamestatus! Cannot start unprepared gameplay\");\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\tSTATUS = Gamestatus.RUNNING;\r\n\t\tclock = new GameClock();\r\n\t\tclock.start(GameTickExecutor.DEFAULT_GAMETICK);\r\n\t}", "public void startGameSession() {\n\t\tfor (GamePlayer player : listOfPlayers) {\n\t\t\tif (player != null) {\n\t\t\t\t// set to first lap\n\t\t\t\tplayer.currentLap = 1;\n\t\t\t}\n\t\t}\n\t}", "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 }", "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 setActivePlayer(Piece.COLOR activePlayer) {\n this.activePlayer = activePlayer;\n }", "private void resume()\r\n {\r\n player.resume();\r\n }", "public void gameSetupSinglePlayer(boolean botMode) {\r\n\t\tthis.screen = new Screen(this); //creazione schermo di gioco\r\n\t\tthis.botMode = botMode;\r\n\t\t\r\n\t\tint n;\r\n\t\t\r\n\t\tif(botMode) n = 2; \r\n\t\telse n = 1;\r\n\t\t\t\t\r\n\t\tscreen.setNumberOfPlayers(n);\r\n\t\tfor (int i=0; i<n; i++) {\r\n\t\t\tplayers.add(new Player());\r\n\t\t}\r\n\t\t\r\n\t\tscreen.addPlayers(players);\r\n\t\t//screen.start();\r\n\t\tscreen.setLevel(level);\r\n\t\tscreen.setMusic(music);\r\n\t\t\r\n\t\tgameFrame.add(screen);\r\n\t\tgameFrame.requestFocusInWindow();\r\n\r\n\t\t// aggiungo controllo da tastiera\r\n\t\tgameFrame.addKeyListener(players.get(0).getInputHandler());\r\n\t\tgameFrame.pack();\r\n\t\tgameFrame.setVisible(true);\r\n\t\t\t\t\r\n\t\t// avvio ciclo di gioco\r\n\t\tnew Thread(screen).start();\r\n\t\tscreen.setVisible(true);\r\n\t}", "public void setPlayer(ViewerManager2 player) {\n this.player = player;\n // the player is needed to be existent befor starting up the remote Server\n //startRemoteServer();\n\n }", "public void Play() {\n superPlaneGodMode = false;\r\n if (!musicPlaying)\r\n backgroundMusic.pause();\r\n if (musicPlaying)\r\n backgroundMusic.start();\r\n paused = false;\r\n }" ]
[ "0.7870436", "0.7720162", "0.7649816", "0.76178455", "0.7453305", "0.73653054", "0.7329459", "0.7252279", "0.7244096", "0.7218776", "0.7182946", "0.71773434", "0.7170426", "0.7168829", "0.7164819", "0.7096378", "0.70647097", "0.7030999", "0.70298827", "0.70253897", "0.7022844", "0.7017014", "0.7012269", "0.698847", "0.694248", "0.6935987", "0.6900102", "0.68929493", "0.68908226", "0.6863942", "0.6843789", "0.6831961", "0.68132555", "0.67971265", "0.6783238", "0.6782356", "0.67817396", "0.67339927", "0.67312413", "0.6729374", "0.67242354", "0.67198485", "0.66913813", "0.6687969", "0.6684819", "0.66620123", "0.6625581", "0.6620653", "0.66066587", "0.6605323", "0.6587779", "0.6575882", "0.6570306", "0.65462554", "0.6544439", "0.65415615", "0.6538165", "0.65327305", "0.6528634", "0.6520507", "0.65199697", "0.65178233", "0.650675", "0.64921385", "0.64904517", "0.648662", "0.64622283", "0.64592534", "0.64491385", "0.6443021", "0.64406556", "0.6417464", "0.6411399", "0.6409718", "0.6401523", "0.63989544", "0.6392457", "0.6391993", "0.63692796", "0.6365425", "0.63639045", "0.63612366", "0.6360132", "0.63501227", "0.6343928", "0.6342562", "0.63318366", "0.63187915", "0.6310682", "0.6301904", "0.62875897", "0.62855995", "0.6284966", "0.62841433", "0.6278686", "0.6278381", "0.62725604", "0.6272425", "0.6271925", "0.62661284" ]
0.7381591
5
save which questions have been answered already in the game in an external file in "data/answered_questions"
public void setAnsweredQuestions() { File file = new File("data/answered_questions"); if(!file.exists()) { BashCmdUtil.bashCmdNoOutput("touch data/answered_questions"); String answeredQuestions = ""; for (int i = 0;i<5;i++) { answeredQuestions = answeredQuestions + " " + String.valueOf(_answeredQuestions[i]); } BashCmdUtil.bashCmdNoOutput(String.format("echo \"%s\" >> data/answered_questions", answeredQuestions)); } Scanner myReader; try { BashCmdUtil.bashCmdNoOutput("touch data/answered_questions"); myReader = new Scanner(file); while(myReader.hasNextLine()) { String fileLine = myReader.nextLine(); String[] splitFileLine = fileLine.trim().split(" "); for (int i=0; i<5; i++) { _answeredQuestions[i] = Integer.parseInt(splitFileLine[i]); } } myReader.close(); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void saveQuestion(){\n\n\t\tint numAnswers = testGenerator.getNumAnswers(questionNo);\n\t\tString setAnswerBox = Integer.toString(numAnswers);\n\n\t\ttestGenerator.setQuestionText(questionNo, ques.getText());\n\t\ttestGenerator.setAnswerText(questionNo, 1, ans1.getText());\n\t\ttestGenerator.setAnswerText(questionNo, 2, ans2.getText());\n\n\t\ttestGenerator.setIsAnswerCorrect(questionNo, 1, answer1.isSelected());\n\t\ttestGenerator.setIsAnswerCorrect(questionNo, 2, answer2.isSelected());\n\n\t\tif((setAnswerBox.equals(\"3\")) || setAnswerBox.equals(\"4\")) {\n\t\t\ttestGenerator.setAnswerText(questionNo, 3, ans3.getText()); \t\n\t\t\ttestGenerator.setIsAnswerCorrect(questionNo, 3, answer3.isSelected());\n\t\t}\n\n\t\tif(setAnswerBox.equals(\"4\")) {\n\t\t\ttestGenerator.setAnswerText(questionNo, 4, ans4.getText()); \t\n\t\t\ttestGenerator.setIsAnswerCorrect(questionNo, 4, answer4.isSelected());\n\t\t}\n\t}", "public void addAnsweredQuestions (int index) {\n\n\t\t_answeredQuestions[index]=_answeredQuestions[index]+1;\n\t\tBashCmdUtil.bashCmdNoOutput(\"rm data/answered_questions\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"touch data/answered_questions\");\n\t\tString answeredQuestions = \"\";\n\t\tfor (int i = 0;i<5;i++) {\n\t\t\tansweredQuestions = answeredQuestions + \" \" + String.valueOf(_answeredQuestions[i]);\n\t\t}\n\t\tBashCmdUtil.bashCmdNoOutput(String.format(\"echo \\\"%s\\\" >> data/answered_questions\", answeredQuestions));\n\n\n\n\t}", "public void save(View v,String name) {\n String question = \"Question:\" + mQuestionView.getText().toString();\n String choice1 = \"Choice1:\" + mButtonChoice1.getText().toString();\n String choice2 = \"Choice2:\" + mButtonChoice2.getText().toString();\n String choice3 = \"Choice3:\" + mButtonChoice3.getText().toString();\n String choice4 = \"Choice4:\" + mButtonChoice4.getText().toString();\n String correctAnswer = \"correct answer:\" +mAnswer;\n File file = new File(getFilesDir() + \"/\" + name); //path where it is save\n String lineSeparator = System.getProperty(\"line.separator\"); //new line\n FileOutputStream fos = null;\n try {\n fos = new FileOutputStream(file, true);\n fos = openFileOutput(name, MODE_APPEND);\n fos.write(question.getBytes());//display the questions\n fos.write(lineSeparator.getBytes());//creates a new line\n fos.write(choice1.getBytes());//display the choices\n fos.write(lineSeparator.getBytes());\n fos.write(choice2.getBytes());\n fos.write(lineSeparator.getBytes());\n fos.write(choice3.getBytes());\n fos.write(lineSeparator.getBytes());\n fos.write(choice4.getBytes());\n fos.write(lineSeparator.getBytes());\n fos.write(correctAnswer.getBytes());\n fos.write(lineSeparator.getBytes());\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 }", "public void writeToFile(ArrayList<quizImpl> ql) {\n Path path = Paths.get(\"Quizzes.txt\");\n try (Scanner scanner = new Scanner(path, String.valueOf(ENCODING))) {\n try (BufferedWriter writer = Files.newBufferedWriter(path, ENCODING)) {\n String toBeWritten;\n for (quizImpl q : ql) {\n String questionsString = \"\";\n //gets a list of questions for that quiz\n List<QuestionAndAnswer> questions = q.getQuestions();\n //for each question in the quiz get the answers\n for (QuestionAndAnswer question : questions) {\n List<String> answers = question.getAllAnswers();\n String answerString = \"\";\n for (String s : answers)\n answerString = answerString + s + \",\";\n answerString = answerString + question.getCorrectAnswer();\n questionsString = questionsString + \",\" + question.getQuestion() + \",\" + answerString;\n }\n if (q.getHighScore() == -1) toBeWritten = \"quizName,\" + q.getQuizName() + questionsString;\n else\n toBeWritten = \"quizName,\" + q.getQuizName() + questionsString + \",highScore,\" + q.playerWithHighScore() + \",\" + q.getHighScore();\n writer.write(toBeWritten);\n writer.newLine();\n }\n writer.close();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public int saveToFile(String fileName) throws IOException {\r\n\t\tObject[] arrayOfQuestions = bTreeOfQuestions.toArray();\r\n\t\t\r\n\t\t//just for meeting assessment mark criteria\r\n\t\t//\t--'Apply a hashing algorithm to the output of each of these files.'\r\n\t\tMap<Integer, String> hm = new HashMap<Integer, String>();\r\n\t\tfor (Object o : arrayOfQuestions) {\r\n\t\t\tQuestion q = (Question) o;\r\n\t\t\thm.put(q.getQnNum(), q.getTopic());\r\n\t\t}\r\n\r\n\t\tint count = -1;\r\n\t\tFileWriter fileWriter = null;\r\n\t\ttry {\r\n\t\t\tfileWriter = new FileWriter(new File(fileName), false);\r\n\r\n\t\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\tfor (Entry<Integer, String> entry : hm.entrySet()) {\r\n\t\t\t\tsb.append(entry.getKey() + \"-\" + entry.getValue());\r\n\t\t\t\tsb.append(\", \");\r\n\t\t\t}\r\n\t\t\tfileWriter.write(sb.substring(0, sb.length() - 2).toString());\r\n\t\t} catch (IOException ex) {\r\n\t\t\tSystem.out.println(\"Error while writing file.\");\r\n\t\t\tex.printStackTrace();\r\n\t\t\tthrow ex;\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tfileWriter.flush();\r\n\t\t\t\tfileWriter.close();\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tSystem.out.println(\"Error while flushing/closing fileWriter.\");\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn count;\r\n\t}", "private void saveQuestions(ArrayList<Question> list) {\n\n\t\ttry {\n\t\t\tFileOutputStream fileOutputStream = context.openFileOutput(\n\t\t\t\t\tSAVE_FILE, Context.MODE_PRIVATE);\n\t\t\tOutputStreamWriter outputStreamWriter = new OutputStreamWriter(\n\t\t\t\t\tfileOutputStream);\n\t\t\tGsonBuilder builder = new GsonBuilder();\n\n\t\t\t// Gson does not serialize/deserialize dates with milisecond\n\t\t\t// precision unless specified\n\t\t\tGson gson = builder.setDateFormat(\"yyyy-MM-dd HH:mm:ss.SSS\")\n\t\t\t\t\t.create();\n\t\t\tbuilder.serializeNulls(); // Show fields with null values\n\t\t\tgson.toJson(list, outputStreamWriter); // Serialize to Json\n\t\t\toutputStreamWriter.flush();\n\t\t\toutputStreamWriter.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void loadQuestions() throws IOException, FileNotFoundException {\n \t\tquestions = new ArrayList<>();\n \n \t\tBufferedReader br = new BufferedReader(new FileReader(\"QuestionBank.txt\"));\n \n \t\tString question;\n \t\tString[] choices = new String[4];\n \t\tint correctIndex = 0;\n \n \t\tquestion = br.readLine();\n \t\twhile (question != null) {\n \t\t\tfor (byte i = 0; i < 4; ++i) {\n \t\t\t\tchoices[i] = br.readLine();\n \t\t\t\t// -- marks the right answer\n \t\t\t\tif (choices[i].indexOf(\"--\") != -1) {\n \t\t\t\t\tcorrectIndex = i;\n \t\t\t\t}\n \t\t\t}\n \n \t\t\tquestions.add(new Question(question, choices, correctIndex));\n \t\t\tquestion = br.readLine();\n \t\t}\n \t\tbr.close();\n \t}", "public static void main(String[] args) {\n HashMap<Integer,String> questions = new HashMap<Integer, String>();\n try\n// reading file\n {\n int count = 0;\n File quiz = new File(\"quizzer.txt\");\n Scanner reader = new Scanner(quiz);\n while (reader.hasNextLine())\n {\n questions.put(count,reader.nextLine());\n count++;\n }\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n//asking user for their name\n System.out.println(\"Enter Your name.\");\n String userName = scan.nextLine();\n// generating questions to ask\n int[] questionsToAsk = randomQuestionCollection(5,questions.size()-1);\n int score = 0;\n for(int i=0; i<questionsToAsk.length;i++) {\n String[] splitQuestion = questions.get(questionsToAsk[i]).split(\",\");\n if (askQuestion(splitQuestion) == 1) {\n System.out.println(\"Correct\");\n score++;\n }\n }\n// printing score\n System.out.println(userName+ \" you correctly answered \"+score + \"questions\");\n }", "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 }", "public List<String> loadCorrectAnswers() {\r\n\t\tScanner scanner = null;\r\n\t\ttry {\r\n\t\t\t// Creating scanner that reads the questions.txt file.\r\n\t\t\tscanner = new Scanner(new File(\"javaCorrectAnswers.txt\"));\r\n\t\t\t// Loop that goes over the file and adding each line as a string element to the\r\n\t\t\t// list. The result is full list with the questions.\r\n\t\t\twhile (scanner.hasNextLine()) {\r\n\r\n\t\t\t\tcorrectAnswers.add(scanner.nextLine());\r\n\t\t\t}\r\n\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t// Closing the scanner.\r\n\t\tfinally {\r\n\t\t\tscanner.close();\r\n\t\t}\r\n\t\treturn correctAnswers;\r\n\t}", "static void generateQuestions(int numQuestions, int selection, String fileName, String points) {\n String finalAnswers = \"\";\n switch (selection) {\n case 1:\n for (int i = 0; i < numQuestions; i++) {\n finalAnswers += one(points);\n }\n break;\n case 2:\n for (int i = 0; i < numQuestions; i++) {\n finalAnswers += two(points);\n }\n break;\n case 3:\n for (int i = 0; i < numQuestions; i++) {\n finalAnswers += three(points);\n }\n break;\n case 4:\n for (int i = 0; i < numQuestions; i++) {\n finalAnswers += four(points);\n }\n break;\n default:\n System.out.println(\"Wrong selection. Please try again\");\n break;\n }\n writeAnswers(fileName, finalAnswers);\n }", "private void setAnswerForLastQuestion() {\n\n DbHelper dbhelper = new DbHelper(context);\n questionNo = questionNo + 1;\n QuizAnswer answer = new QuizAnswer();\n answer.setQuizId(quizId);\n answer.setQuestionId(questionId);\n int optionId = shareprefs.getInt(\"optionId\", 0);\n answer.setOptionId(optionId);\n int correctAns = shareprefs.getInt(\"correctAns\", 0);\n answer.setAnswer(correctAns);\n answer.setContentId(contentId);\n boolean flage = dbhelper.upsertQuizAnswerEntity(answer);\n if (flage) {\n shareprefs.edit().clear().commit();//clear select OptionPreferences\n Intent mIntent = new Intent(this, QuizResultActivity.class);\n mIntent.putExtra(\"quizId\", quizId);\n mIntent.putExtra(\"contentId\", contentId);\n mIntent.putExtra(\"totalQuestion\", questionList.size());\n startActivityForResult(mIntent,1);\n }\n }", "public void saveQuestions(PrintStream output){\n if (output == null) {\n throw new IllegalArgumentException();\n }\n QuestionNode current = questionTree;\n writeTree(current,output); \n }", "private int generatorAnswersList() throws IOException {\n File answerFile = new File(this.getClass().getResource(\"/answers.txt\").getPath());\n if (!answerFile.exists()) {\n System.out.println(\"The file answers not found!\");\n }\n try (RandomAccessFile raf = new RandomAccessFile(answerFile, \"r\")) {\n int countLine = 0;\n String line;\n while ((line = raf.readLine()) != null) {\n if (!\"\".equals(line)) {\n this.answersList.add(line);\n countLine++;\n }\n }\n return countLine;\n }\n }", "private void loadFromFile(ArrayList<Question> questionsList) {\n String tempString = \"\"; // Holds the \"identifier\" of the line\n String question = \"\"; // text containing actual question\n ArrayList<Integer> scoreList = new ArrayList<>(); // contains scores of questions\n ArrayList<String> answers = new ArrayList<>(); // contains answers of questions\n ArrayList<String> nextQuestions = new ArrayList<>(); // contains next question of current question\n int specialCase = 0; // special case of question\n boolean backExists = false; // boolean indicating if back button does(n't) exist\n Question tempQuestion; // temporary question which is later added to the list\n\n // Attempt to open a the question_data file and read its contents\n try {\n InputStream in = getClass().getResourceAsStream(\"question_data\");\n Scanner sc = new Scanner(in);\n\n while (sc.hasNextLine()) {\n tempString = sc.nextLine();\n if (tempString.equals(\"\")) {\n continue;\n }\n\n switch (tempString.charAt(0)) {\n case '#':\n // Anything beginning with '#' is ignored.\n break;\n case 'Q':\n // 'Q' indicated the text of the question\n question = tempString.substring(3);\n break;\n case 'A':\n // 'A' indicates an answer\n answers.add(tempString.substring(3));\n break;\n case 'B':\n // 'B' indicates if a back button exists or not\n backExists = Boolean.parseBoolean(tempString.substring(3));\n break;\n case 'N':\n // 'N' indicates the next question of every answer\n nextQuestions.add(tempString.substring(3));\n break;\n case 'S':\n // 'S' indicates the score of every answer, can be set to -1 if no score is needed\n scoreList.add(Integer.parseInt(tempString.substring(3)));\n break;\n case 'C':\n // Special case. Every special case (number other than 0) has to be accounted for...\n specialCase = Integer.parseInt(tempString.substring(3));\n break;\n case 'T':\n // 'T' stands for terminate and create. A 'T' should be placed at the end of a\n // question and all of its answers. This indicated the creation of the question.\n\n // Create new question, set its answer, reset all lists, etc.\n tempQuestion = new Question(question, backExists);\n tempQuestion.setSpecialCase(specialCase);\n for (int i = 0; i < answers.size(); i++) {\n tempQuestion\n .addAnswer(answers.get(i), nextQuestions.get(i), scoreList.get(i));\n tempQuestion.setBackAvailable(backExists);\n }\n questionsList.add(tempQuestion);\n answers.clear();\n scoreList.clear();\n nextQuestions.clear();\n specialCase = 0;\n break;\n default:\n break;\n }\n\n }\n } catch (Exception e){\n System.out.println(System.getProperty(\"user.dir\"));\n System.out.println(\"An error occurred while parsing the file, make sure the file exists.\"\n + \"and/or has the correct filename (question_data)\");\n\n }\n }", "public static void savePracticeListToFile()\n throws IOException {\n JSONArray wordsToSave = new JSONArray();\n\n for (Word word : getPracticedWords()) {\n Word word2 = word;\n wordsToSave.add(word2.wordToJSONObject());\n }\n\n try (FileWriter fileWriter = new FileWriter(\"src/practiceList.json\")) {\n fileWriter.write(wordsToSave.toJSONString());\n fileWriter.flush();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void loadQuestion() {\r\n\r\n //getting the number of the question stored in variable r\r\n //making sure that a question is not loaded up if the count exceeds the number of total questions\r\n if(count <NUMBER_OF_QUESTIONS) {\r\n int r = numberHolder.get(count);\r\n //creating object that will access the QuestionStore class and retrieve values and passing the value of the random question number to the class\r\n QuestionStore qs = new QuestionStore(r);\r\n //calling methods in order to fill up question text and mutliple choices and load the answer\r\n qs.storeQuestions();\r\n qs.storeChoices();\r\n qs.storeAnswers();\r\n //setting the question and multiple choices\r\n\r\n q.setText(qs.getQuestion());\r\n c1.setText(qs.getChoice1());\r\n c2.setText(qs.getChoice2());\r\n c3.setText(qs.getChoice3());\r\n answer = qs.getAnswer();\r\n }\r\n else{\r\n endGame();\r\n }\r\n\r\n\r\n\r\n\r\n }", "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 List<Answer> loadAnswers() {\r\n\t\tScanner scanner = null;\r\n\t\ttry {\r\n\t\t\t// Creating scanner that reads the questions.txt file.\r\n\t\t\tscanner = new Scanner(new File(\"javaAnswers.txt\"));\r\n\t\t\t// Loop that goes over the file and adding each line as a string element to the\r\n\t\t\t// list. The result is full list with the questions.\r\n\t\t\twhile (scanner.hasNextLine()) {\r\n\t\t\t\tAnswer a = new Answer();\r\n\t\t\t\ta.setPossibleAnswer(scanner.nextLine());\r\n\t\t\t\tpossibleAnswers.add(a);\r\n\t\t\t}\r\n\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t// Closing the scanner.\r\n\t\tfinally {\r\n\t\t\tscanner.close();\r\n\t\t}\r\n\t\treturn possibleAnswers;\r\n\t}", "private void getCorrectAnswers() {\n\t\tfor(int i = 0; i < numberAmt; i++) {\n\t\t\tif(randomNumbers.get(i).equals(answers.get(i)))\n\t\t\t\tcorrectAnswers++;\n\t\t}\n\t}", "@Override\n public void addResponses() {\n for(answerChoice a: this.userAnswers) {\n this.addResponseHelper(a.getAnswerText());\n //this.savedResponses. //add(a.getAnswerText());\n //try {\n\n //} catch(Exception e) {\n // e.printStackTrace();\n\n //}\n\n }\n }", "private void setAnswer() {\n DbHelper dbhelper = new DbHelper(context);\n questionNo = questionNo + 1;\n QuizAnswer answer = new QuizAnswer();\n answer.setQuizId(quizId);\n answer.setQuestionId(questionId);\n int optionId = shareprefs.getInt(\"optionId\", 0);\n answer.setOptionId(optionId);\n int correctAns = shareprefs.getInt(\"correctAns\", 0);\n answer.setAnswer(correctAns);\n answer.setContentId(contentId);\n boolean flage = dbhelper.upsertQuizAnswerEntity(answer);\n if (flage) {\n shareprefs.edit().clear().commit();//clear select OptionPreferences\n setValue();\n }\n }", "@Override\n public boolean checkAnswer() throws OutputException, InputException{\n\t\tlog.debug (\"Entering method CheckAnswerServiceImpl::checkAnswer\");\n\n\t\tObjectInputStream input = null;\n\t\tQuestions newQuestion = new Questions();\n\t\t//boolean used for correct or incorrect answer\n\t\tboolean isCorrect;\n\t\tboolean validFile = true;\n\t\ttry {\n\t\t\tinput = new ObjectInputStream(new FileInputStream(\"savefiles/questions/newquestion.txt\"));\n\t\t\tnewQuestion = (Questions) input.readObject();\n\t\t} catch (FileNotFoundException fnfe) {\n\t\t\tvalidFile = false;\n\t\t\tlog.error(\"File containing new question not found!\", fnfe);\n\t\t\tthrow new InputException(\"File containing new question not found!\", fnfe);\n\t\t} catch (IOException ioe) {\n\t\t\tvalidFile = false;\n\t\t\tlog.error(\"IOException while accessing file containing new question!\", ioe);\n\t\t\tthrow new InputException(\"IOException while accessing file containing new question!\", ioe);\n\t\t} catch (ClassNotFoundException cnfe) {\n\t\t\tvalidFile = false;\n\t\t\tlog.error(\"ClassNotFoundException while reading file containing new question!\", cnfe);\n\t\t\tthrow new InputException(\"ClassNotFoundException while reading file containing new question!\", cnfe);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tif (validFile)\n\t\t\t{\n\t\t\t\tObjectOutputStream output = null;\n\t\t\t\t\t\n\t\t\t\tif(newQuestion.getCorrectAnswer().equals(newQuestion.getStudentAnswer()))\n\t\t\t\t{\n\t\t\t\t\tisCorrect = true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tisCorrect = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tnewQuestion.setCorrect(isCorrect);\n\t\t\t\t\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\toutput = new ObjectOutputStream (new FileOutputStream(\"savefiles/questions/newquestion.txt\"));\n\t\t\t\t\toutput.writeObject(newQuestion);\n\t\t\t\t} \n\t\t\t\tcatch(InvalidClassException ice) \n\t\t\t\t{\n\t\t\t\t\tlog.error(\"Invalid Class Exception when checking student's answer!\", ice);\n\t\t\t\t\tthrow new OutputException(\"Invalid Class Exception when checking student's answer\", ice);\n\t\t\t\t}\n\t\t\t\tcatch(NotSerializableException nse)\n\t\t\t\t{\n\t\t\t\t\tlog.error(\"Not Serializable Exception when checking student's answer!\", nse);\n\t\t\t\t\tthrow new OutputException(\"Not Serializable Exception when checking student's answer!\", nse);\n\t\t\t\t}\n\t\t\t\tcatch(IOException ioe)\n\t\t\t\t{\n\t\t\t\t\tlog.error(\"IOException when checking student's answer!\", ioe);\n\t\t\t\t\tthrow new OutputException(\"IOException when checking student's answer!\", ioe);\n\t\t\t\t}\n\t\t\t\tfinally \n\t\t\t\t{\n\t\t\t\t\tif (output != null)\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\toutput.flush();\n\t\t\t\t\t\t\toutput.close();\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// log error\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (input != null)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tinput.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// log error\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Will return a true if a valid question was saved. A false will be picked up by JUNIT testing.\n\t\treturn newQuestion.validate();\n\t}", "public String checkNewQuestions() {\n\t\tint numAnswers = testGenerator.getNumAnswers(questionNo);\n\t\tString question = \"\";\n\n\t\tquestion += testGenerator.getQuestionText(questionNo);\n\t\tquestion += testGenerator.getAnswerText(questionNo, 1);\n\t\tquestion += testGenerator.getAnswerText(questionNo, 2);\n\n\t\tif(numAnswers >= 3) {\n\t\t\tquestion += testGenerator.getAnswerText(questionNo, 3);\n\t\t} \n\t\tif(numAnswers == 4) {\n\t\t\tquestion += testGenerator.getAnswerText(questionNo, 4);\n\t\t}\n\t\treturn question;\n\t}", "public ArrayList<String> loadPostedQuestions() {\n\n\t\tSAVE_FILE = POSTED_QUESTIONS_FILE;\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tlist = loadIds();\n\t\treturn list;\n\t}", "public void writeList()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tPrintWriter writer = new PrintWriter(categoryName + \".txt\");\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < questions.size(); i++) // go through ArrayList\r\n\t\t\t{\r\n\t\t\t\twriter.println(questions.get(i).getQuestion() + \",\" + \r\n\t\t\t\t\t\t\t\t questions.get(i).getAnswer1() + \",\" +\r\n\t\t\t\t\t\t\t\t questions.get(i).getAnswer2() + \",\" +\r\n\t\t\t\t\t\t\t\t questions.get(i).getAnswer3() + \",\" +\r\n\t\t\t\t\t\t\t\t questions.get(i).getAnswer4() + \",\" +\r\n\t\t\t\t\t\t\t\t questions.get(i).getCorrectAnswer());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\twriter.close();\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(FileNotFoundException fnf)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"File was not found\");\r\n\t\t}\r\n\t}", "public void saveToQuestionBank(ArrayList<Question> list) {\n\n\t\tSAVE_FILE = QUESTION_BANK;\n\t\tsaveQuestions(list);\n\t}", "private void saveFile(File file){\n\t\ttry{\r\n\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(file));\r\n\t\t\t\r\n\t\t\tfor(QuizCard card:cardList){\r\n\t\t\t\twriter.write(card.getQuestion() + \"/\");\r\n\t\t\t\twriter.write(card.getAnswer() + \"\\n\");\r\n\t\t\t}\r\n\t\t\twriter.close();\r\n\t\t} catch (IOException ex){\r\n\t\t\tSystem.out.println(\"couldn't write the cardList out\");\r\n\t\t\tex.printStackTrace();}\r\n\t}", "private void generalKnowledgeQuestions(){\n QuestionUtils.generalKnowledgeQuestions(); //all the questions now are stored int the QuestionUtils class\n }", "private void setAnswers()\n {\n StringBuilder answers = new StringBuilder(256);\n String[] correctAnswers = getResources().getStringArray(R.array.correct_answers);\n TextView answer_view = (TextView) findViewById(R.id.answers);\n for(int i = 0 ; i < correctAnswers.length; i++)\n {\n answers.append(correctAnswers[i]);\n }\n answer_view.setText(answers.toString());\n }", "public void saveFile(File file) {\n\t\ttry {\n\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(file));\n\t\t\t\n\t\t\tfor (QuizCard card : cardList) {\n\t\t\t\twriter.write(card.getQuestion() + \"/\");\n\t\t\t\twriter.write(card.getAnswer() + \"\\n\");\n\t\t\t}\n\t\t\twriter.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "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 }", "private void nextQuestion() {\n\n // increment current question index\n currentQuestionIndex++;\n\n // if the current question index is smaller than the size of the quiz list\n if (currentQuestionIndex < quizList.size()) {\n\n // clear the possible answers\n possibleAnswers.clear();\n\n // grab the definition of current question, assign the correct answer variable\n // and add it to the list of possible answers.\n definition = quizList.get(currentQuestionIndex)[0];\n correctAnswer = quizMap.get(definition);\n possibleAnswers.add(correctAnswer);\n\n // while there's less than 4 possible answers, get a random answer\n // and if it hasn't already been added, add it to the list.\n while (possibleAnswers.size() < 4) {\n String answer = quizList.get(new Random().nextInt(quizList.size() - 1))[1];\n if (!possibleAnswers.contains(answer)) {\n possibleAnswers.add(answer);\n }\n }\n\n // shuffle possible answers so they display in a random order\n Collections.shuffle(possibleAnswers);\n } else {\n // if the question index is out of bounds, set quiz as finished\n quizFinished = true;\n }\n }", "public void readDataFromDB(String[] selectedCategories)\n {\n\n Cursor questionRows = Splash.dbHelperClass.getRandomCategoryQuestions(selectedCategories);\n Cursor answerRows = null;\n if(questionRows.getCount()== 0)\n {\n Log.d(TAG,\"No data to show\");\n return;\n }\n\n while (questionRows.moveToNext())\n {\n Question q = new Question();\n q.setQuestionId(questionRows.getString(0));\n q.setTopic(questionRows.getString(1));\n q.setQuestionText(questionRows.getString(2));\n\n // now get the list of answers for specific id of the question...\n answerRows = Splash.dbHelperClass.getAnswersForQuestionId(q.getQuestionId());\n if(answerRows.getCount()== 0)\n {\n Log.d(TAG,\"No Answers to show\");\n }\n while(answerRows.moveToNext())\n {\n Answer a = new Answer();\n a.setAnswerId(answerRows.getInt(0));\n\n // trim the string because it contains empty stirng from the database because it can contain image\n\n String noAnswer = answerRows.getString(1).toString().trim();\n if(noAnswer.isEmpty())\n {\n\n a.setImageName(answerRows.getString(4).toString().trim());\n\n\n Log.d(TAG, \"Image Name is \" + answerRows.getString(4).toString().trim());\n }\n\n // to check if the answerText is Empty\n a.setAnswerText(noAnswer);\n\n\n\n // get the correct image\n String correctImage = answerRows.getString(5);\n\n // check for null or empty in database...\n if(correctImage != null && !\"\".equals(correctImage))\n {\n this.correctImage = correctImage.toString().trim();\n Log.d(TAG,\"Correct Image is \"+correctImage);\n }\n\n\n // set the correct answer\n if(answerRows.getString(2) != null) {\n correctAnswer = answerRows.getString(2).toString().trim();\n }\n\n // add it to the answer list\n q.getAnswerList().add(a);\n // answerList.add(a);\n }\n\n Log.d(TAG, \"Answer List Size is \" + q.getAnswerList().size());\n // set the answer List for Specific Question\n\n\n // get the question Image\n String questionImage = questionRows.getString(4);\n\n // check for null or empty in database...for question images..\n if(questionImage != null && !\"\".equals(questionImage))\n {\n this.questionImage = questionImage.toString().trim();\n Log.d(TAG,\"Question Image is \"+this.questionImage);\n }\n\n\n\n\n // q.setAnswerList(answerList);\n q.setCorrectAnswer(correctAnswer);\n q.setCorrectImage(correctImage);\n q.setQuestionImage(this.questionImage);\n\n\n Log.d(TAG, \"Answer List Size in Question class is \" + q.getAnswerList().size());\n\n\n\n\n randomCategoryQuestions.add(q);\n }\n\n try {\n // close the cursor after use\n answerRows.close();\n questionRows.close();\n }\n catch (Exception e)\n {\n Log.d(TAG,\"Exception Occured\"+e.toString());\n }\n\n\n\n\n\n\n\n }", "public ArrayList<quizImpl> readFile() {\n\n // The name of the file to open.\n String fileName = \"Quizzes.txt\";\n\n // This will reference one line at a time\n String line;\n\n try {\n //reads file twice the first time adding contacts the second adding meetings\n // FileReader reads text files in the default encoding.\n FileReader fileReader = new FileReader(fileName);\n\n // Wrap FileReader in BufferedReader.\n BufferedReader bufferedReader = new BufferedReader(fileReader);\n\n while ((line = bufferedReader.readLine()) != null) {\n quizzes.add(line);\n }\n bufferedReader.close();\n for (String s : quizzes) {\n if (s.startsWith(\"quizName\")) {\n //splits the line into an array of strings\n String[] stringArray = s.split(\",\");\n //If game already has a highScore\n if (stringArray.length > 3) {\n if (stringArray[stringArray.length - 3].equals(\"highScore\")) {\n quizImpl q = new quizImpl(stringArray[1], stringArray[stringArray.length - 2], Integer.parseInt(stringArray[stringArray.length - 1]));\n for (int i = 2; i < stringArray.length - 3; i = i + 6) {\n q.addQuestion(stringArray[i], stringArray[i + 1], stringArray[i + 2], stringArray[i + 3], stringArray[i + 4], Integer.parseInt(stringArray[i + 5]));\n }\n quizArray.add(q);\n } else {\n quizImpl q = new quizImpl(stringArray[1]);\n for (int i = 2; i < stringArray.length; i = i + 6) {\n q.addQuestion(stringArray[i], stringArray[i + 1], stringArray[i + 2], stringArray[i + 3], stringArray[i + 4], Integer.parseInt(stringArray[i + 5]));\n }\n quizArray.add(q);\n }\n } else {\n quizImpl q = new quizImpl(stringArray[1]);\n for (int i = 2; i < stringArray.length; i = i + 6) {\n q.addQuestion(stringArray[i], stringArray[i + 1], stringArray[i + 2], stringArray[i + 3], stringArray[i + 4], Integer.parseInt(stringArray[i + 5]));\n }\n quizArray.add(q);\n }\n }\n }\n } catch (FileNotFoundException ex) {\n System.out.println(\"Unable to open file '\" + fileName + \"'\");\n } catch (IOException ex) {\n System.out.println(\"Error reading file '\" + fileName + \"'\");\n }\n return quizArray;\n }", "public void setQuestion(){\n\n\n triggerReport(); //Check if max questions are displayed, if yes then show report\n\n MyDatabase db = new MyDatabase(QuizCorner.this);\n Cursor words = db.getQuizQuestion();\n TextView question_text = (TextView) findViewById(R.id.question_text);\n RadioButton rb;\n resetOptions();\n disableCheck();\n enableRadioButtons();\n hideAnswer();\n words.moveToFirst();\n word = words.getString(words.getColumnIndex(\"word\"));\n correct_answer = words.getString(words.getColumnIndex(\"meaning\"));\n question_text.setText(word + \" means:\");\n for (int i = 0; i < 4; i++){\n answers[i] = words.getString(words.getColumnIndex(\"meaning\"));\n words.moveToNext();\n }\n answers = randomizeArray(answers);\n for (int i = 0; i < 4; i++){\n rb = (RadioButton) findViewById(options[i]);\n rb.setText(answers[i]);\n }\n question_displayed_count++;\n }", "private void createSaveData(){\n try {\n File f = new File(filePath, highScores);\n FileWriter output = new FileWriter(f);\n BufferedWriter writer = new BufferedWriter(output);\n\n writer.write(\"0-0-0-0-0\");\n writer.newLine();\n writer.write(\".....-.....-.....-.....-.....\");\n writer.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void addQuiz(Quiz quiz){\n \t\tString id = quiz.getQuizId();\n \t\tString date = quiz.getDateCreated();\n \t\tString creatorId = quiz.getCreatorId();\n \t\tint numQuestions = quiz.getNumQuestions();\n \t\tboolean isRandom = quiz.getIsRandom();\n \t\tboolean isOnePage = quiz.getIsOnePage();\n \t\tboolean isImmediate = quiz.getIsImmediate();\n \t\tint numTimesTaken = 0;\n \t\tString imageURL = quiz.getImageURL();\n \t\tString description = quiz.getDescription();\n \t\tString query = \"INSERT INTO quizzes VALUES('\" + id + \"', '\" + date + \"', '\" + creatorId + \"', \" \n \t\t\t\t+ numQuestions + \", \" + isRandom + \", \" + isOnePage + \", \" + isImmediate + \", \" \n \t\t\t\t+ numTimesTaken + \", '\" + imageURL + \"', '\" + description + \"');\";\n \t\tsqlUpdate(query);\n \t\t\n \t\t// TODO!!!! add each question as well\n \t\tArrayList<Question> questions = quiz.getQuestions();\n \t\tfor(Question q : questions){\n \t\t\tint questionNum = q.getNumber();\n \t\t\t/*ArrayList<String> answers = q.getAnswers();\n \t\t\tfor (String a : answers){\n \t\t\t\tquery = \"INSERT INTO answers VALUES('\" + id + \"', '\" + questionNum + \"', '\" + a + \"');\";\n \t\t\t}*/\n \t\t\tif(q instanceof MultipleChoice){\n \t\t\t\tArrayList<String> answers = q.getAnswers();\n \t\t\t\tquery = \"INSERT INTO multiple_choice VALUES('\" + id + \"', '\" + questionNum + \"', '\" + q.getQuestion() + \"', '\" + answers.get(0) + \"', '\" + answers.get(1) + \"', '\" + answers.get(2) + \"', '\" + answers.get(3) + \"')\";\n \t\t\t\tsqlUpdate(query);\n \t\t\t\tquery = \"INSERT INTO answers VALUES('\" + id + \"', \" + questionNum + \", '\" + ((MultipleChoice) q).getCorrectAnswer() + \"');\";\n \t\t\t\tsqlUpdate(query);\n \t\t\t} else if(q instanceof QuestionResponse){\n \t\t\t\tquery = \"INSERT INTO question_response VALUES('\" + id + \"', '\" + questionNum + \"', '\" + q.getQuestion() + \"')\";\n \t\t\t\tsqlUpdate(query);\n \t\t\t\tArrayList<String> answers = q.getAnswers();\n \t\t\t\tfor (String a : answers){\n \t\t\t\t\tquery = \"INSERT INTO answers VALUES('\" + id + \"', '\" + questionNum + \"', '\" + a + \"');\";\n \t\t\t\t\tsqlUpdate(query);\n \t\t\t\t}\n \t\t\t} else if(q instanceof Picture){\n \t\t\t\tquery = \"INSERT INTO picture VALUES('\" + id + \"', '\" + questionNum + \"', '\" + q.getQuestion() + \"', '\" + ((Picture) q).getUrl() + \"')\";\n \t\t\t\tsqlUpdate(query);\n \t\t\t\tArrayList<String> answers = q.getAnswers();\n \t\t\t\tfor (String a : answers){\n \t\t\t\t\tquery = \"INSERT INTO answers VALUES('\" + id + \"', '\" + questionNum + \"', '\" + a + \"');\";\n \t\t\t\t\tsqlUpdate(query);\n \t\t\t\t}\n \t\t\t} else if(q instanceof FillInBlank){\n \t\t\t\tArrayList<String> questionsArray = ((FillInBlank) q).getQuestions();\n \t\t\t\tquery = \"INSERT INTO fill_in_the_blank VALUES('\" + id + \"', '\" + questionNum + \"', '\" + questionsArray.get(0) + \"', '\" + questionsArray.get(1) + \"')\";\n \t\t\t\tsqlUpdate(query);\n \t\t\t\tArrayList<String> answers = q.getAnswers();\n \t\t\t\tfor (String a : answers){\n \t\t\t\t\tquery = \"INSERT INTO answers VALUES('\" + id + \"', '\" + questionNum + \"', '\" + a + \"');\";\n \t\t\t\t\tsqlUpdate(query);\n \t\t\t\t}\n \t\t\t} \n \t\t}\n \t}", "public void savePostedQuestionsID(ArrayList<String> idList) {\n\n\t\tSAVE_FILE = POSTED_QUESTIONS_FILE;\n\t\tsaveIds(idList);\n\t}", "public void saveStats() throws IOException {\n PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(\"learnedWords\")));\r\n out.println(wordIndex);\r\n for (Word s : masteredWords) {//write mastered words first\r\n out.println(s.toString());\r\n }\r\n for (int i = 0; i < learningWords.size(); i++) {//writes learning words next\r\n Word w = learningWords.get(i);\r\n out.println(w.toString());\r\n }\r\n out.close();\r\n }", "public List<Answer> getAnswers(Question question) throws Exception {\n DataBaseBroker dbb = new DataBaseBroker();\n dbb.loadDriver();\n dbb.establishConnection();\n List<Answer> answers = dbb.getAnswers(question);\n dbb.commit();\n dbb.closeConnection();\n return answers;\n }", "private void evaluateQuestions() {\n RadioGroup groupTwo = findViewById(R.id.radioGroupQ2);\n int groupTwoId = groupTwo.getCheckedRadioButtonId();\n\n // Get the ID of radio group 6 to ascertain if a radio button has been ticked\n RadioGroup groupSix = findViewById(R.id.radioGroupQ6);\n int groupSixId = groupSix.getCheckedRadioButtonId();\n\n // Get the ID of radio group 7 to ascertain if a radio button has been ticked\n RadioGroup groupSeven = findViewById(R.id.radioGroupQ7);\n int groupSevenId = groupSeven.getCheckedRadioButtonId();\n\n // Taking in the vale of any question that has been checked in question 3 and storing it\n CheckBox question3Option1 = findViewById(R.id.question_three_option1);\n boolean stateOfQuestion3_option1 = question3Option1.isChecked();\n CheckBox question3Option2 = findViewById(R.id.question_three_option2);\n boolean stateOfQuestion3Option2 = question3Option2.isChecked();\n CheckBox question3Option3 = findViewById(R.id.question_three_option3);\n boolean stateOfQuestion3Option3 = question3Option3.isChecked();\n CheckBox question3Option4 = findViewById(R.id.question_three_option4);\n boolean stateOfQuestion3Option4 = question3Option4.isChecked();\n\n // Taking in the value of any question that has been checked in question 4 and storing it\n CheckBox question4Option1 = findViewById(R.id.question_four_option1);\n boolean stateOfQuestion4Option1 = question4Option1.isChecked();\n CheckBox question4Option2 = findViewById(R.id.question_four_option2);\n boolean stateOfQuestion4Option2 = question4Option2.isChecked();\n CheckBox question4Option3 = findViewById(R.id.question_four_option3);\n boolean stateOfQuestion4Option3 = question4Option3.isChecked();\n CheckBox question4Option4 = findViewById(R.id.question_four_option4);\n boolean stateOfQuestion4Option4 = question4Option4.isChecked();\n\n // Taking in the vale of any question that has been checked in question 8 and storing it\n CheckBox question8Option1 = findViewById(R.id.question_eight_option1);\n boolean stateOfQuestion8Option1 = question8Option1.isChecked();\n CheckBox question8Option2 = findViewById(R.id.question_eight_option2);\n boolean stateOfQuestion8Option2 = question8Option2.isChecked();\n CheckBox question8Option3 = findViewById(R.id.question_eight_option3);\n boolean stateOfQuestion8Option3 = question8Option3.isChecked();\n CheckBox question8Option4 = findViewById(R.id.question_eight_option4);\n boolean stateOfQuestion8Option4 = question8Option4.isChecked();\n\n // Getting all EditText fields\n\n EditText questText1 = findViewById(R.id.question_one_field);\n String question1 = questText1.getText().toString();\n\n\n EditText questText5 = findViewById(R.id.question_five_field);\n String question5 = questText5.getText().toString();\n\n EditText questText9 = findViewById(R.id.question_nine_field);\n String question9 = questText9.getText().toString();\n\n // Variable parameters for calculateRadiobutton method\n\n RadioButton quest2_opt3 = findViewById(R.id.question_two_option3);\n boolean question2_option3 = quest2_opt3.isChecked();\n\n RadioButton quest6_opt1 = findViewById(R.id.question_six_option2);\n boolean question6_option2= quest6_opt1.isChecked();\n\n RadioButton quest7_opt1 = findViewById(R.id.question_seven_option1);\n boolean question7_option1 = quest7_opt1.isChecked();\n\n // Store all checked parameter to ascertain that at least one option was ticked in\n // question 3\n boolean question3 = stateOfQuestion3_option1 || stateOfQuestion3Option2 ||\n stateOfQuestion3Option3 || stateOfQuestion3Option4;\n\n\n // Store all checked parameter to ascertain that at least one option was ticked in\n // question 4\n boolean question4 = stateOfQuestion4Option1 || stateOfQuestion4Option2 || stateOfQuestion4Option3 ||\n stateOfQuestion4Option4;\n\n\n // Store all checked parameter to ascertain that at least one option was ticked in\n // question 8\n boolean question8 = stateOfQuestion8Option1 || stateOfQuestion8Option2 ||\n stateOfQuestion8Option3 || stateOfQuestion8Option4;\n\n // if no radio button has been checked in radio group 2 after submit button has been clicked\n if ( groupTwoId == -1) {\n Toast.makeText(this, \"Please pick an answer in question 2\",\n Toast.LENGTH_SHORT).show();\n }\n\n // if no radio button has been clicked in radio group 6 after submit button has been clicked\n else if (groupSixId == -1) {\n Toast.makeText(this, \"Please pick an answer to question 6\",\n Toast.LENGTH_SHORT).show();\n }\n\n // if no radio button has been clicked in radio group 7 after submit button has been clicked\n else if (groupSevenId == -1) {\n Toast.makeText(this, \"Please pick an answer to question 7\",\n Toast.LENGTH_SHORT).show();\n }\n\n // if no checkbox was clicked in question 3 after submit button has been clicked\n else if (!question3) {\n Toast.makeText(this, \"Please select an answer to question 3\",\n Toast.LENGTH_SHORT).show();\n }\n\n // if no checkbox was clicked in question 4 after submit button has been clicked\n else if (!question4) {\n Toast.makeText(this, \"Please select an answer to question 4\",\n Toast.LENGTH_SHORT).show();\n\n }\n\n // if no checkbox was clicked in question 8 after submit button has been clicked\n else if (!question8) {\n Toast.makeText(this, \"Please select an answer to question 8\",\n Toast.LENGTH_SHORT).show();\n }\n\n // check if the questions has been answered without hitting the reset button\n else if (checkSubmit > 0) {\n Toast.makeText(this, \"Press the reset button\",\n Toast.LENGTH_SHORT).show();\n } else {\n //Add one to checkSubmit variable to avoid the score from being recalculated and added to\n // the previous score if the submit button was pressed more than once.\n checkSubmit += 1;\n\n // calculate all checkboxes by calling calculateCheckboxes method\n calculateScoreForCheckBoxes( stateOfQuestion3_option1, stateOfQuestion3Option3,stateOfQuestion3Option4,\n stateOfQuestion4Option1, stateOfQuestion4Option2, stateOfQuestion4Option4,\n stateOfQuestion8Option1, stateOfQuestion8Option3);\n\n // calculate all radio buttons by calling calculateRadioButtons method\n calculateScoreForRadioButtons(question2_option3, question6_option2, question7_option1);\n\n // calculate all Text inputs by calling editTextAnswers method\n calculateScoreForEditTextAnswers(question1,question5, question9);\n\n displayScore(score);\n\n String grade;\n\n if (score < 10) {\n grade = \"Meh...\";\n } else if (score >=10 && score <=14) {\n grade = \"Average\";\n } else if ((score >= 15) && (19 >= score)) {\n grade = \"Impressive!\";\n } else {\n grade = \"Excellent!\";\n }\n\n // Display a toast message to show total score\n Toast.makeText(this, grade + \" your score is \" + score + \"\",\n Toast.LENGTH_SHORT).show();\n }\n }", "public void saveAnswers(List<Answer> answers) throws Exception {\n DataBaseBroker dbb = new DataBaseBroker();\n dbb.loadDriver();\n dbb.establishConnection();\n dbb.saveAnswers(answers);\n dbb.commit();\n dbb.closeConnection();\n }", "public void actionPerformed(ActionEvent e){\n\t\t\t\ttry{ //trys to print it into the the file, which NOT work, and has error handling to keep up with this\n\t\t\t\t\tpw = new BufferedWriter(new FileWriter(\"Questions.txt\" ,true));\n\t\t\t\t\tpw.newLine();//prints it in a specific format \n\t\t\t\t\tpw.write( question.getText());\n\t\t\t\t\tpw.newLine();\n\t\t\t\t\tpw.write( answer.getText());\n\t\t\t\t\tpw.close();\n\t\t\t\t}\n\t\t\t\tcatch(IOException est){\n\t\t\t\t\tSystem.err.println(\"sucks\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tJFrame goodframe = new JFrame (\"Frame\"); //creates a frame to show if you entered your question correctly\n\t\t\t\tgoodframe.setSize(300,200);\n\t\t\t\tgoodframe.getContentPane().add(new JLabel(\"Succesfully entered question\"), BorderLayout.CENTER);\n\t\t\t\tgoodframe.setLocationRelativeTo(null);\n\t\t\t\tgoodframe.setVisible(true);\n\t\t\t\tanswer.setText(\"Enter the answer to your question here\");\n\t\t\t\tquestion.setText(\"Enter your question here\");\n\t\t\t\tinitializeQuestionArray();\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t}", "public void submitAnswers(View view) {\n\n // Question one\n // Get String given in the first EditText field and turn it into lower case\n EditText firstAnswerField = (EditText) findViewById(R.id.answer_one);\n Editable firstAnswerEditable = firstAnswerField.getText();\n String firstAnswer = firstAnswerEditable.toString().toLowerCase();\n\n // Check if the answer given in the first EditText field is correct and if it is, add one\n // point\n if (firstAnswer.contains(\"baltic\")) {\n points++;\n }\n\n // Question two\n // Get String given in the second EditText field and turn it into lower case\n EditText secondAnswerField = (EditText) findViewById(R.id.answer_two);\n Editable secondAnswerEditable = secondAnswerField.getText();\n String secondAnswer = secondAnswerEditable.toString().toLowerCase();\n\n // Check if the answer given in the second EditText field is correct and if it is, add one\n // point\n if (secondAnswer.contains(\"basketball\")) {\n points++;\n }\n\n // Question three\n // Check if the correct answer is given\n RadioButton thirdQuestionCorrectAnswer = (RadioButton)\n findViewById(R.id.question_3_radio_button_3);\n boolean isThirdQuestionCorrectAnswer = thirdQuestionCorrectAnswer.isChecked();\n // If the correct answer is given, add one point\n if (isThirdQuestionCorrectAnswer) {\n points++;\n }\n\n // Question four\n // Check if the correct answer is given\n RadioButton fourthQuestionCorrectAnswer = (RadioButton)\n findViewById(R.id.question_4_radio_button_2);\n boolean isFourthQuestionCorrectAnswer = fourthQuestionCorrectAnswer.isChecked();\n\n // If the correct answer is given, add one point\n if (isFourthQuestionCorrectAnswer) {\n points++;\n }\n\n // Question five\n // Find check boxes\n CheckBox fifthQuestionCheckBoxOne = (CheckBox) findViewById(R.id.question_5_check_box_1);\n\n CheckBox fifthQuestionCheckBoxTwo = (CheckBox) findViewById(R.id.question_5_check_box_2);\n\n CheckBox fifthQuestionCheckBoxThree = (CheckBox) findViewById(R.id.question_5_check_box_3);\n\n CheckBox fifthQuestionCheckBoxFour = (CheckBox) findViewById(R.id.question_5_check_box_4);\n\n // If correct answers are given, add one point,\n // if incorrect answers are given, do not add points\n\n if (fifthQuestionCheckBoxThree.isChecked() && fifthQuestionCheckBoxFour.isChecked()\n && !fifthQuestionCheckBoxOne.isChecked() && !fifthQuestionCheckBoxTwo.isChecked()){\n points++;\n }\n\n // Question six\n // Find check boxes\n CheckBox sixthQuestionCheckBoxOne = (CheckBox) findViewById(R.id.question_6_check_box_1);\n\n CheckBox sixthQuestionCheckBoxTwo = (CheckBox) findViewById(R.id.question_6_check_box_2);\n\n CheckBox sixthQuestionCheckBoxThree = (CheckBox) findViewById(R.id.question_6_check_box_3);\n\n CheckBox sixthQuestionCheckBoxFour = (CheckBox) findViewById(R.id.question_6_check_box_4);\n\n // If correct answers are given, add one point,\n // if incorrect answers are given, do not add points\n if (sixthQuestionCheckBoxOne.isChecked() && sixthQuestionCheckBoxTwo.isChecked()\n && sixthQuestionCheckBoxFour.isChecked() && !sixthQuestionCheckBoxThree.isChecked()){\n points++;\n }\n\n // If the user answers all questions correctly, show toast message with congratulations\n if (points == 6){\n Toast.makeText(this, \"Congratulations! You have earned 6 points.\" +\n \"\\n\" + \"It is the maximum number of points in this quiz.\",\n Toast.LENGTH_SHORT).show();\n }\n\n // If the user does not answer all questions correctly, show users's points, total points\n // possible and advise to check answers\n else {\n Toast.makeText(this, \"Your points: \" + points + \"\\n\" + \"Total points possible: 6\" +\n \"\\n\" + \"Check your answers or spelling again.\", Toast.LENGTH_SHORT).show();\n }\n\n // Reset points to 0\n points = 0;\n }", "public void initializeQuestionArray(){\n\t\tFile file = new File (\"Questions.txt\");\n\t\tquestions.clear();\n\t\ttry {\n //\n // Create a new Scanner object which will read the data \n // from the file passed in. To check if there are more \n // line to read from it we check by calling the \n // scanner.hasNextLine() method. We then read line one \n // by one till all line is read.\n //\n Scanner scanner = new Scanner(file);\n while (scanner.hasNextLine()) {\n Question q = new Question(scanner.nextLine(), scanner.nextLine());\n\t\t\t\tquestions.add(q);\n\t\t\t\t\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\t}", "public static void save()\r\n\t{\r\n\r\n\t\ttry {\r\n\t\t\tObjectOutputStream fileOut = new ObjectOutputStream(new FileOutputStream(\"highscores.txt\"));\r\n\t\t\tfileOut.writeObject(hsd);\r\n\t\t\tfileOut.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tJOptionPane.showMessageDialog(null,\"Save File not found\",\"Error\",JOptionPane.ERROR_MESSAGE);\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\tJOptionPane.showMessageDialog(null,\"Unable to save data\",\"Error\",JOptionPane.ERROR_MESSAGE);\r\n\t\t\te.printStackTrace();\r\n\t\t\r\n\t\t}\r\n\r\n\t}", "@Override\n public void onQuestionFailed(Context context, @NonNull Level level, int questionIndex) {\n //Increment wrong answers.\n try {\n JSONObject jsonQuestionsObject = JsonUtils.jsonFileToJSONObject(context, StorageMode.EXTERNAL);\n JSONArray jsonQuestionsArray = jsonQuestionsObject.getJSONArray(level.getName().toLowerCase());\n\n int wrongAnswers = jsonQuestionsArray.getJSONObject(questionIndex).getInt(\"wrongAnswers\");\n wrongAnswers++;\n\n //Update question passed state.\n jsonQuestionsArray.getJSONObject(questionIndex).put(\"wrongAnswers\", wrongAnswers);\n\n //Write persistent data.\n JsonUtils.writePersistentJSONObject(context, jsonQuestionsObject);\n\n } catch (IOException | JSONException e) {\n e.printStackTrace();\n }\n }", "public void storeDataTwo(String id, List<String> answers){\n JSONObject questionAnswers = new JSONObject();\n try\n {\n questionAnswers.put(\"usertestid\", id);\n SharedPreferences pref = this.getSharedPreferences(\"session_token\", Context.MODE_PRIVATE);\n String email = pref.getString(\"email\", null);\n questionAnswers.put(\"answered_by\", email);\n questionAnswers.put(\"answers\", answersArray);\n } catch (JSONException e){\n e.printStackTrace();\n }\n new AsyncPost().execute(\"http://webapp.bimorstad.tech/feedback/create\", questionAnswers.toString());\n }", "public void checkAnswers(View v) {\n int correct = 0;\n\n //Question 1 answer\n RadioButton a1 = (RadioButton) findViewById(R.id.q1_a2);\n\n if (a1.isChecked()) {\n correct++;\n } else {\n TextView q1 = (TextView) findViewById(R.id.question_1);\n q1.setTextColor(Color.RED);\n }\n\n //Question 2 answer\n RadioButton a2 = (RadioButton) findViewById(R.id.q2_a2);\n\n if (a2.isChecked()) {\n correct++;\n } else {\n TextView q2 = (TextView) findViewById(R.id.question_2);\n q2.setTextColor(Color.RED);\n }\n\n //Question 3\n CheckBox a3_1 = (CheckBox) findViewById(R.id.q3_a1);\n CheckBox a3_2 = (CheckBox) findViewById(R.id.q3_a2);\n CheckBox a3_3 = (CheckBox) findViewById(R.id.q3_a3);\n\n if (a3_1.isChecked() && a3_2.isChecked() && a3_3.isChecked()) {\n correct++;\n } else {\n TextView q3 = (TextView) findViewById(R.id.question_3);\n q3.setTextColor(Color.RED);\n }\n\n //Question 4\n EditText a4 = (EditText) findViewById(R.id.q4_a);\n\n if (a4.getText().toString().equalsIgnoreCase(getResources().getString(R.string.q4_a))) {\n correct++;\n } else {\n TextView q4 = (TextView) findViewById(R.id.question_4);\n q4.setTextColor(Color.RED);\n }\n\n //Question 5\n RadioButton a5 = (RadioButton) findViewById(R.id.q5_a3);\n\n if (a5.isChecked()) {\n correct++;\n } else {\n TextView q5 = (TextView) findViewById(R.id.question_5);\n q5.setTextColor(Color.RED);\n }\n\n //Question 6\n RadioButton a6 = (RadioButton) findViewById(R.id.q6_a1);\n\n if (a6.isChecked()) {\n correct++;\n } else {\n TextView q6 = (TextView) findViewById(R.id.question_6);\n q6.setTextColor(Color.RED);\n }\n\n //Question 7\n EditText a7 = (EditText) findViewById(R.id.q7_a);\n\n if (a7.getText().toString().equalsIgnoreCase(getResources().getString(R.string.q7_a))) {\n correct++;\n } else {\n TextView q7 = (TextView) findViewById(R.id.question_7);\n q7.setTextColor(Color.RED);\n }\n\n //Question 8\n RadioButton a8 = (RadioButton) findViewById(R.id.q8_a1);\n\n if (a8.isChecked()) {\n correct++;\n } else {\n TextView q8 = (TextView) findViewById(R.id.question_8);\n q8.setTextColor(Color.RED);\n }\n\n //Toast\n Context context = getApplicationContext();\n CharSequence text = \"Score: \" + correct + \"/8\";\n int duration = Toast.LENGTH_SHORT;\n Toast.makeText(context, text, duration).show();\n }", "public void initializeAnswer(){\n\t\ttry{Element root = new XmlReader().parse(Gdx.files.internal(xmlFile));\n\t\tElement artist = root.getChildByName(formatName(game.getArtist()));\n\t\tElement quesNum = artist.getChildByName(Integer.toString(game.getQuestion()));\n\t\tArray<Element> answerCA = quesNum.getChildrenByName(\"Correct\");\n\t\tSystem.out.println(\"The size of the correct array is \" + answerCA.size);\n\t\tfor (int i = 0; i <answerCA.size; i++){\n\t\t\tcorrectA.add(answerCA.get(i).getText());\n\t\t}\n\t\t}\n\t\tcatch(IOException e){\n\t\t}\n\t}", "public static void saveGame(Puzzle puzzle, String name) throws IOException {\n FileWriter wr;\n File file = new File(System.getenv(\"APPDATA\")+\"\\\\SudokuGR04\\\\\" + name + \".txt\");\n wr = new FileWriter(file);\n puzzle.setName(name);\n try {\n //generate File in dir SudokuGR04\n wr.write(puzzle.export());\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n wr.close();\n }\n }", "public int getAnsweredQuestions(int index){\n\t\treturn _answeredQuestions[index];\n\n\t}", "private void validateQuiz() {\n int score = 0;\n String answer1 = answerOne.getText().toString();\n int answer2 = answerTwo.getCheckedRadioButtonId();\n boolean answer3 = answerThreeOptionA.isChecked() && answerThreeOptionD.isChecked() && !answerThreeOptionB.isChecked() && !answerThreeOptionC.isChecked();\n String answer4 = answerFour.getText().toString();\n int answer5 = answerFive.getCheckedRadioButtonId();\n boolean answer6 = answerSixOptionA.isChecked() && answerSixOptionB.isChecked() && answerSixOptionD.isChecked() && !answerSixOptionC.isChecked();\n if (answer1.equalsIgnoreCase(getString(R.string.answerOne))) {\n score++;\n }\n if (answer2 == answerTwoOptionA.getId()) {\n score++;\n }\n if (answer3) {\n score++;\n }\n if (answer4.equalsIgnoreCase(getString(R.string.answerFour))) {\n score++;\n }\n if (answer5 == answerFiveOptionD.getId()) {\n score++;\n }\n if (answer6) {\n score++;\n }\n String result = getString(R.string.result, score, questionList.size());\n Toast.makeText(this, result, Toast.LENGTH_SHORT).show();\n }", "public void submitAnswers(View view) {\n\n int points = 0;\n\n //Question 1\n RadioButton radioButton_q1 = findViewById (R.id.optionB_q1);\n boolean firstQuestionCorrect = radioButton_q1.isChecked ();\n if (firstQuestionCorrect) {\n points += 1;\n }\n //Question 2\n RadioButton radioButton_q2 = findViewById (R.id.optionC_q2);\n boolean secondQuestionCorrect = radioButton_q2.isChecked ();\n if (secondQuestionCorrect) {\n points += 1;\n }\n\n //Question 3 - in order to get a point in Question 3, three particular boxes has to be checked\n CheckBox checkAns1_q3 = findViewById (R.id.checkbox1_q3);\n boolean thirdQuestionAnswer1 = checkAns1_q3.isChecked ();\n CheckBox checkAns2_q3 = findViewById (R.id.checkbox2_q3);\n boolean thirdQuestionAnswer2 = checkAns2_q3.isChecked ();\n CheckBox checkAns3_q3 = findViewById (R.id.checkbox3_q3);\n boolean thirdQuestionAnswer3 = checkAns3_q3.isChecked ();\n CheckBox checkAns4_q3 = findViewById (R.id.checkbox4_q3);\n boolean thirdQuestionAnswer4 = checkAns4_q3.isChecked ();\n CheckBox checkAns5_q3 = findViewById (R.id.checkbox5_q3);\n boolean thirdQuestionAnswer5 = checkAns5_q3.isChecked ();\n CheckBox checkAns6_q3 = findViewById (R.id.checkbox6_q3);\n boolean thirdQuestionAnswer6 = checkAns6_q3.isChecked ();\n CheckBox checkAns7_q3 = findViewById (R.id.checkbox7_q3);\n boolean thirdQuestionAnswer7 = checkAns7_q3.isChecked ();\n if (thirdQuestionAnswer2 && thirdQuestionAnswer3 && thirdQuestionAnswer6 && !thirdQuestionAnswer1 && !thirdQuestionAnswer4 && !thirdQuestionAnswer5 && !thirdQuestionAnswer7) {\n points = points + 1;\n }\n\n //Question 4\n RadioButton radioButton_q4 = findViewById (R.id.optionC_q4);\n boolean forthQuestionCorrect = radioButton_q4.isChecked ();\n if (forthQuestionCorrect) {\n points += 1;\n }\n\n //Question 5\n EditText fifthAnswer = findViewById (R.id.q5_answer);\n String fifthAnswerText = fifthAnswer.getText ().toString ();\n if (fifthAnswerText.equals (\"\")) {\n Toast.makeText (getApplicationContext (), getString (R.string.noFifthAnswer), Toast.LENGTH_LONG).show ();\n return;\n } else if ((fifthAnswerText.equalsIgnoreCase (getString (R.string.pacific))) || (fifthAnswerText.equalsIgnoreCase (getString (R.string.pacificOcean)))) {\n points += 1;\n }\n\n //Question 6\n RadioButton radioButton_q6 = findViewById (R.id.optionA_q6);\n boolean sixthQuestionCorrect = radioButton_q6.isChecked ();\n if (sixthQuestionCorrect) {\n points += 1;\n }\n\n //Showing the result to the user\n displayScore (points);\n }", "public void saveFile(boolean answer) {\n if (answer) {\n userController.saveUserToFile();\n }\n }", "public void checkAllAnswers(View view) {\n finalScore = 0;\n\n boolean answerQuestion1 = false;\n boolean check1Quest1 = checkSingleCheckBox(R.id.jupiter_checkbox_view);\n boolean check2Quest1 = checkSingleCheckBox(R.id.mars_checkbox_view);\n boolean check3Quest1 = checkSingleCheckBox(R.id.earth_checkbox_view);\n boolean check4Quest1 = checkSingleCheckBox(R.id.venus_checkbox_view);\n\n if (!check1Quest1 && !check2Quest1 && !check3Quest1 && check4Quest1) {\n finalScore = scoreCounter(finalScore);\n answerQuestion1 = true;\n }\n\n boolean answerQuestion2 = false;\n boolean check1Quest2 = checkSingleCheckBox(R.id.nasa_checkbox_view);\n boolean check2Quest2 = checkSingleCheckBox(R.id.spacex_checkbox_view);\n boolean check3Quest2 = checkSingleCheckBox(R.id.nvidia_checkbox_view);\n boolean check4Quest2 = checkSingleCheckBox(R.id.astrotech_checkbox_view);\n\n if (check1Quest2 && check2Quest2 && !check3Quest2 && check4Quest2) {\n finalScore = scoreCounter(finalScore);\n answerQuestion2 = true;\n }\n\n boolean answerQuestion3 = false;\n boolean check1Quest3 = checkSingleCheckBox(R.id.moon_checkbox_view);\n boolean check2Quest3 = checkSingleCheckBox(R.id.sun_checkbox_view);\n boolean check3Quest3 = checkSingleCheckBox(R.id.comet_checkbox_view);\n boolean check4Quest3 = checkSingleCheckBox(R.id.asteroid_checkbox_view);\n\n if (check1Quest3 && !check2Quest3 && !check3Quest3 && !check4Quest3) {\n finalScore = scoreCounter(finalScore);\n answerQuestion3 = true;\n }\n\n boolean answerQuestion4 = false;\n boolean check1Quest4 = checkSingleCheckBox(R.id.yes_checkbox_view);\n boolean check2Quest4 = checkSingleCheckBox(R.id.no_checkbox_view);\n\n if (check1Quest4 && !check2Quest4) {\n finalScore = scoreCounter(finalScore);\n answerQuestion4 = true;\n }\n\n String question1Summary = createQuestionSummary(answerQuestion1, 1, getResources().getString(R.string.venus));\n String question2Summary = createQuestionSummary(answerQuestion2, 2, getResources().getString(R.string.nasa_spacex_astrotech));\n String question3Summary = createQuestionSummary(answerQuestion3, 3, getResources().getString(R.string.moon));\n String question4Summary = createQuestionSummary(answerQuestion4, 4, getResources().getString(R.string.yes));\n\n String quizSummary = createQuizSummary(finalScore);\n\n displayQuestionSummary(question1Summary, answerQuestion1, R.id.question1_summary);\n displayQuestionSummary(question2Summary, answerQuestion2, R.id.question2_summary);\n displayQuestionSummary(question3Summary, answerQuestion3, R.id.question3_summary);\n displayQuestionSummary(question4Summary, answerQuestion4, R.id.question4_summary);\n displayQuizSummary(quizSummary);\n\n }", "public DataIO(ArrayList<quizImpl> ql) {\n writeToFile(ql);\n }", "private void checkAnswers() {\n\n //fetch the SolutionInts\n String[] solutionTags = currentTask.getSolutionStringArray();\n\n //fetch the userInput\n String[] userSolution = new String[solutionTags.length];\n for (int i = 0; i < solutionTags.length; i++) {\n LinearLayout linearLayout = currentView.findViewWithTag(i);\n userSolution[i] = (String) linearLayout.getChildAt(0).getTag();\n }\n\n Log.i(\"M_ORDER\",\"solutiontags: \"+ Arrays.toString(solutionTags) +\" usertags:\"+ Arrays.toString(userSolution));\n Date ended;\n if (Arrays.equals(solutionTags, userSolution)) {\n ended = Calendar.getInstance().getTime();\n String duration = progressController.calculateDuration(entered, ended);\n progressController.makeaDurationLog(getContext(),Calendar.getInstance().getTime(), \"EXERCISE_ORDER_FRAGMENT_RIGHT\", \"number: \" + currentTask.getTaskNumber() + \" section: \"+currentTask.getSectionNumber()+\" viewtype: \"+currentTask.getExerciseViewType()+\" userInput: \" + Arrays.toString(userSolution),duration);\n mListener.sendAnswerFromExerciseView(true);\n Log.i(\"M_EXERCISE_VIEW_ORDER\", \" send answer: true\");\n } else {\n Log.i(\"ANSWER\", \" was wrong\");\n ended = Calendar.getInstance().getTime();\n String duration = progressController.calculateDuration(entered, ended);\n progressController.makeaDurationLog(getContext(),Calendar.getInstance().getTime(), \"EXERCISE_ORDER_FRAGMENT_WRONG\", \"number: \" + currentTask.getTaskNumber() + \" section: \"+currentTask.getSectionNumber()+\" viewtype: \"+currentTask.getExerciseViewType()+\" userInput: \" + Arrays.toString(userSolution),duration);\n mListener.sendAnswerFromExerciseView(false);\n Log.i(\"M_EXERCISE_VIEW_ORDER\", \" send answer: false\");\n }\n }", "private void takeQuiz(String filename) {\n String filepath = \"./src/multiplechoice/\" + filename + \".txt\";\n MCQuestionSet questionSet = new MCQuestionSet(filepath);\n int questionCount = questionSet.getSize();\n currentQuestion = questionSet.peekNext();\n correct = 0;\n //create question text\n BorderPane questionPane = new BorderPane();\n Button btnQuestion = createBigButton(\"TEMP TESTING\", 36, 25);\n questionPane.setCenter(btnQuestion);\n BorderPane.setMargin(btnQuestion, new Insets(20, 20, 20, 20));\n VBox choicePane = new VBox();\n //correct answer tracker\n VBox resultPane = new VBox();\n resultPane.setAlignment(Pos.CENTER);\n Label lblCorrect = new Label();\n lblCorrect.setFont(Font.font(TEXT_SIZE));\n resultPane.getChildren().add(lblCorrect);\n //next button trigger\n Button btnNext = createButton(\"Next\", TEXT_SIZE, 10);\n Button btnFinish = createButton(\"Finish\", TEXT_SIZE, 10);\n btnNext.setOnAction(e -> {\n currentQuestion = questionSet.getNext();\n if (currentQuestion == null) {\n btnFinish.fire();\n } else {\n choices = currentQuestion.getChoices();\n btnQuestion.setText(currentQuestion.getQuestion());\n choicePane.getChildren().clear();\n for (int i = 0; i < choices.length; i++) {\n Button btnChoice = createBigButton(choices[i], 24, 25);\n btnChoice.setOnAction(e2 -> {\n if (currentQuestion.isCorrect(btnChoice.getText())) {\n correct++;\n }\n lblCorrect.setText(correct + \" correct answers!\");\n btnNext.fire();\n });\n choicePane.getChildren().add(btnChoice);\n VBox.setMargin(btnChoice, new Insets(5, 50, 5, 50));\n }\n }\n });\n //submit final answer trigger and menu return button\n btnFinish.setOnAction(e -> {\n String message = \"Quiz Complete!\\n Score: \" + correct + \"/\";\n message = message + questionCount + \"\\n Click to continue.\";\n Button btnFinishMessage = createBigButton(message, 54, 100);\n btnFinishMessage.setOnAction(e2 -> {\n returnHome();\n });\n quizScores.add(filename, correct, questionCount);\n try (PrintWriter pw = new PrintWriter(new FileWriter(SCORES_OUTPUT))) {\n pw.print(quizScores);\n } catch (IOException ex) {\n System.out.println(\"FAILED TO SAVE SCORES\");\n }\n parentPane.getChildren().clear();\n parentPane.setCenter(btnFinishMessage);\n });\n //finalize\n parentPane.getChildren().clear();\n parentPane.setTop(questionPane);\n parentPane.setCenter(choicePane);\n parentPane.setBottom(resultPane);\n btnNext.fire();\n }", "public void submitAnswers(View view){\n\n //Find the correct answers for questions 1 & 2 and check if they have been selected\n CheckBox firstCheckBox = (CheckBox)findViewById(R.id.checkbox1);\n boolean firstCheckBoxIsChecked = firstCheckBox.isChecked();\n\n CheckBox secondCheckBox = (CheckBox)findViewById(R.id.checkbox2);\n boolean secondCheckBoxIsChecked = secondCheckBox.isChecked();\n\n CheckBox thirdCheckBox = (CheckBox)findViewById(R.id.checkbox3);\n boolean thirdCheckBoxIsChecked = thirdCheckBox.isChecked();\n\n CheckBox fourthCheckBox = (CheckBox)findViewById(R.id.checkbox4);\n boolean fourthCheckBoxIsChecked = fourthCheckBox.isChecked();\n\n //Find the EditText field, find out what has been typed in the field and convert it into a string\n EditText questionFourAnswer = (EditText)findViewById(R.id.question_four_field);\n String questionFourAnswered = questionFourAnswer.getText().toString().toLowerCase();\n\n //Find the RadioGroup for Question2 and find out which radioButton has been selected\n RadioGroup radioGroupQuestion2 = (RadioGroup) findViewById(R.id.radio_group_q2);\n int selectedIdQ2 = radioGroupQuestion2.getCheckedRadioButtonId();\n\n //Find the RadioGroup for Question3 and find out which radioButton has been selected\n RadioGroup radioGroupQuestion3= (RadioGroup) findViewById(R.id.radio_group_q3);\n int selectedIdQ3 = radioGroupQuestion3.getCheckedRadioButtonId();\n\n //Calculate points, create a message to display users' score and display it as a toast message\n int points = calculatePoints(firstCheckBoxIsChecked, secondCheckBoxIsChecked, questionFourAnswered, selectedIdQ2, selectedIdQ3, thirdCheckBoxIsChecked, fourthCheckBoxIsChecked);\n String pointsMessage = createQuizSummary(points);\n Toast.makeText(getApplicationContext(), pointsMessage, Toast.LENGTH_SHORT).show();\n }", "public List<Answer> answersOfQuestion(Question question){\n\t\treturn this.aRepo.findAllByQuestion(question);\n\t}", "public List<Question> getData() {\n for (int i = 0; i < data.size(); i++) {\n List<Answer> answers = data.get(i).getAnswers();\n Collections.shuffle(answers);\n data.get(i).setAnswers(answers);\n }\n return data;\n }", "void saveToFile() {\n\t\ttry {\n\t\t\tFile directory = GameApplication.getInstance().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS);\n\t\t\tFile target = new File(directory, FILE_NAME);\n\t\t\tif (!target.exists()) {\n\t\t\t\ttarget.createNewFile();\n\t\t\t}\n\t\t\tJsonWriter writer = new JsonWriter(new FileWriter(target));\n\t\t\twriter.setIndent(\" \");\n\t\t\twriter.beginArray();\n\t\t\tfor (Scoreboard scoreboard : scoreboards.values()) {\n\t\t\t\twriteScoreboard(writer, scoreboard);\n\t\t\t}\n\t\t\twriter.endArray();\n\t\t\twriter.flush();\n\t\t\twriter.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void quiz() {\n\t\t\t\t\tcorrectans = 0;\n\t\t\t\t\tint k = 0;\n\t\t\t\t\tint j = 0;\n\t\t\t\t\tint M = 0;\n\t\t\t\t\tj = readDifficulty();\n\t\t\t\t\tM = readProblemType();\n\t\t\t\t\t//ask the student to solve 10 different problems, as determined by the problem type\n\t\t\t for(int i = 0; i < 10; i++ ) {\n\t\t\t \t//contain two numbers sampled from a uniform random distribution with bounds determined by the problem difficulty\n\t\t\t \tint x = rand.nextInt(j); \n\t\t\t\t int y = rand.nextInt(j);\n\t\t\t\t int O = askquestion(j, M,x,y);\n\t\t\t\t if(M == 4) {\n\t\t\t\t \t float floatans = readdivision();\n\t\t\t\t \tk = divisionsol(floatans, x, y);\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t int userin = readResponse();\n\t\t\t k = isnanswercorrect(O , userin);\n\t\t\t }\n\t\t\t if(k == 1) {\n\t\t\t \t correctans++;\n\t\t\t }\n\t\t\t }\n\t\t\t int L = 0;\n\t\t\t L = displayCompletionMessage(correctans);\n\t\t\t if ( L == 1) {\n\t\t\t \tquiz();\n\t\t\t }\n\t\t\t else {\n\t\t\t \treturn;\n\t\t\t }\n\t\t\t \n\t\t\t\t}", "public QueryQuestions saveQuestion(String question) {\n String uniqueId = UUID.randomUUID().toString();\n QueryQuestions queryQuestions1 = new QueryQuestions(uniqueId,question);\n QueryQuestions savedQueryQuestions = questionRepository.save(queryQuestions1);\n return savedQueryQuestions;\n }", "public List<Question> loadQuestions() {\r\n\t\tScanner scanner = null;\r\n\t\ttry {\r\n\t\t\t// Creating scanner that reads the questions.txt file.\r\n\t\t\tscanner = new Scanner(new File(\"javaQuestions.txt\"));\r\n\t\t\t// Loop that goes over the file and adding each line as a string element to the\r\n\t\t\t// list. The result is full list with the questions.\r\n\t\t\twhile (scanner.hasNextLine()) {\r\n\t\t\t\tQuestion q = new Question();\r\n\t\t\t\tq.setQuestion(scanner.nextLine());\r\n\t\t\t\tquestions.add(q);\r\n\t\t\t}\r\n\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t// Closing the scanner.\r\n\t\tfinally {\r\n\t\t\tscanner.close();\r\n\t\t}\r\n\t\treturn questions;\r\n\t}", "@Override\n public void saveSolutions() {save solutions in unfolded format in a separate files for each solution (At this time, we have just one solution)\n // The result will print in 3 rows and each row have 4 columns:\n //\n // row1 --> col2\n // row2 --> col1 clo2 col3 col4\n // row2 --> clo2\n //\n //Example (of red cube):\n //\n // oo o\n // ooo\n // ooooo\n // ooo\n // oo\n // o o oo oo oo o\n //oooo ooooo ooo oooo\n // oooo ooo ooooo oooo\n //oooo ooooo ooo oooo\n // o o o oo o\n // o oo\n // oooo\n // oooo\n // oooo\n // oo oo\n //\n String directory = \"output\";\n File dir = new File(directory);\n if (!dir.exists()) dir.mkdirs();\n AtomicInteger counter = new AtomicInteger(1);\n solutions.forEach((number, solutionPuzzle) -> {\n StringBuilder rowStringValue1 = generateRowStringValue(null, solutionPuzzle.getTopPuzzlePiece(), null, null);\n StringBuilder rowStringValue2 = generateRowStringValue(solutionPuzzle.getLeftPuzzlePiece(), solutionPuzzle.getFrontPuzzlePiece(), solutionPuzzle.getRightPuzzlePiece(), solutionPuzzle.getBackPuzzlePiece());\n StringBuilder rowStringValue3 = generateRowStringValue(null, solutionPuzzle.getBottomPuzzlePiece(), null, null);\n Path path = Paths.get(directory + \"/solution\" + counter.getAndIncrement() + \".txt\");\n try (BufferedWriter writer = Files.newBufferedWriter(path)) {\n writer.write(rowStringValue1.append(rowStringValue2).append(rowStringValue3).toString());\n } catch (IOException e) {\n e.printStackTrace();\n }\n });\n\n }", "public String[] getAnswers()\n\t{\n\t\treturn answers;\t\n\t}", "private String generateAnswer() throws IOException {\n int j = lineNumber();\n int i = 0;\n String result = \"\";\n Random rnd = new Random();\n int rndNumber = rnd.nextInt(j);\n File answers = new File(this.settings.getValue(\"botAnswerFile\"));\n try (RandomAccessFile raf = new RandomAccessFile(answers, \"r\")) {\n while (raf.getFilePointer() != raf.length()) {\n result = raf.readLine();\n i++;\n if ((i - 1) == rndNumber) {\n break;\n }\n }\n }\n return result;\n }", "public void save () {\r\n String[] options = {\"Word List\", \"Puzzle\", \"Cancel\"};\r\n int result = JOptionPane.showOptionDialog (null, \"What Do You Want To Save?\", \"Save\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[0]);\r\n if (result == 0) {\r\n fileManager.saveWords (words);\r\n } else if (result == 1){\r\n fileManager.savePuzzle (puzzle);\r\n }\r\n }", "private void checkAnswer(int i) {\n\tswitch(i){\r\n\tcase 1:\r\n\t\t Button answer=(Button)findViewById(R.id.radio0);\r\n\t\t Log.d(\"yourans\", currentQ.getANSWER()+\" \"+answer.getText());\r\n\t\t if(currentQ.getANSWER().contentEquals(answer.getText()))\r\n\t\t \t {\r\n\t\t \t scoreSci++;\r\n\t\t \t String d=String.valueOf(scoreSci);\r\n\t\t\t \tEditor editor=mGameSettings.edit();\r\n\t\t\t \teditor.putString(GAME_PREFERENCES_SCORE_SCI,d);\r\n\t\t\t \teditor.commit();\r\n\t\t\t\t\tLog.d(DEBUG_TAG, \"Score is : \"\r\n\t\t\t + mGameSettings.getString(GAME_PREFERENCES_SCORE_SCI, \"Not set\"));\r\n\t\t \t Toast.makeText(getApplicationContext(),\"correct\",Toast.LENGTH_SHORT).show();\r\n\t\t\t }\r\n\t\t \t else{\r\n\t\t \t\tString d=\"The correct answer is\\n\"+currentQ.getANSWER();\r\n\t\t \t\tEditor editor2=mGameSettings.edit();\r\n\t\t\t \teditor2.putString(GAME_CURRENT_ANS_SCI,d);\r\n\t\t\t \teditor2.commit();\r\n\t\t\t \tQuizActivitySci.this.showDialog(GET_WRONG);\r\n\t\t \t }\r\n\t Log.d(\"score\", \"Your score\"+scoreSci);\r\n\t\tbreak;\r\n\tcase 2:\r\n\t\t Button answer1=(Button)findViewById(R.id.radio1);\r\n\t \t Log.d(\"yourans\", currentQ.getANSWER()+\" \"+answer1.getText()); \t\r\n\t if(currentQ.getANSWER().contentEquals(answer1.getText()))\r\n\t \t {\r\n\t \t scoreSci++;\r\n\t \t String d=String.valueOf(scoreSci);\r\n\t \tEditor editor=mGameSettings.edit();\r\n\t \teditor.putString(GAME_PREFERENCES_SCORE_SCI,d);\r\n\t \teditor.commit();\r\n\t\t\t Log.d(\"score\", \"Your score\"+scoreSci);\r\n\t\t\t Log.d(DEBUG_TAG, \"Score is : \"\r\n\t + mGameSettings.getString(GAME_PREFERENCES_SCORE_SCI, \"Not set\"));\r\n\t\t\t Toast.makeText(getApplicationContext(),\"correct\",Toast.LENGTH_SHORT).show();\r\n\t\t }else{\r\n\t\t\t String d=\"The correct answer is\\n\"+currentQ.getANSWER();\r\n\t\t \t\tEditor editor2=mGameSettings.edit();\r\n\t\t\t \teditor2.putString(GAME_CURRENT_ANS_SCI,d);\r\n\t\t\t \teditor2.commit();\r\n\t\t\t \tQuizActivitySci.this.showDialog(GET_WRONG);\r\n\t \t }\r\n\t Log.d(\"score\", \"Your score\"+scoreSci);\r\n\t\tbreak;\r\n\tcase 3:\r\n\t\tButton answer11=(Button)findViewById(R.id.radio2);\r\n\t \t Log.d(\"yourans\", currentQ.getANSWER()+\" \"+answer11.getText()); \r\n\t \t if(currentQ.getANSWER().contentEquals(answer11.getText()))\r\n\t \t {\r\n\t \t scoreSci++;\r\n\t \tString d=String.valueOf(scoreSci);\r\n\t \tEditor editor=mGameSettings.edit();\r\n\t \teditor.putString(GAME_PREFERENCES_SCORE_SCI,d);\r\n\t \teditor.commit();\r\n\t\t\t Log.d(\"score\", \"Your score\"+scoreSci);\r\n\t\t\t Log.d(DEBUG_TAG, \"Score is : \"\r\n\t + mGameSettings.getString(GAME_PREFERENCES_SCORE_SCI, \"Not set\"));\r\n\t\t\t Toast.makeText(getApplicationContext(),\"correct\",Toast.LENGTH_SHORT).show();\r\n\t\t }else{\r\n\t\t\t String d=\"The correct answer is\\n\"+currentQ.getANSWER();\r\n\t\t \t\tEditor editor2=mGameSettings.edit();\r\n\t\t\t \teditor2.putString(GAME_CURRENT_ANS_SCI,d);\r\n\t\t\t \teditor2.commit();\r\n\t\t\t \tQuizActivitySci.this.showDialog(GET_WRONG);\r\n\t \t\t}\r\n\t \tLog.d(\"score\", \"Your score\"+scoreSci);\r\n\t\tbreak;\r\n\tcase 4:\r\n\t\tButton answer111=(Button)findViewById(R.id.radio3);\r\n\t \t Log.d(\"yourans\", currentQ.getANSWER()+\" \"+answer111.getText()); \t\r\n\t \t if(currentQ.getANSWER().contentEquals(answer111.getText()))\r\n\t \t {\r\n\t \t scoreSci++;\r\n\t \tString d=String.valueOf(scoreSci);\r\n\t \tEditor editor=mGameSettings.edit();\r\n\t \teditor.putString(GAME_PREFERENCES_SCORE_SCI,d);\r\n\t \teditor.commit();\r\n\t\t\t Log.d(\"score\", \"Your score\"+scoreSci);\r\n\t\t\t Log.d(DEBUG_TAG, \"Score is : \"\r\n\t + mGameSettings.getString(GAME_PREFERENCES_SCORE_SCI, \"Not set\"));\r\n\t\t\t Toast.makeText(getApplicationContext(),\"correct\",Toast.LENGTH_SHORT).show();\r\n\t\t }else{\r\n\t\t\t String d=\"The correct answer is\\n\"+currentQ.getANSWER();\r\n\t\t \t\tEditor editor2=mGameSettings.edit();\r\n\t\t\t \teditor2.putString(GAME_CURRENT_ANS_SCI,d);\r\n\t\t\t \teditor2.commit();\r\n\t\t\t \tQuizActivitySci.this.showDialog(GET_WRONG);\r\n\t \t\t }\r\n\t \tLog.d(\"score\", \"Your score\"+scoreSci);\r\n\t\tbreak;\r\n\t\t\r\n}\r\n\t\r\n}", "private void saveScore() {\n try {\n PrintWriter writer = new PrintWriter(new FileOutputStream(new File(Const.SCORE_FILE), true));\n writer.println(this.player.getName() + \":\" + this.player.getGold() + \":\" + this.player.getStrength());\n writer.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "public File exportData() {\n File zephyrlogFolder = new File(Environment.getExternalStorageDirectory(), \"QuestionnaireActs\");\n\n boolean dirExists = zephyrlogFolder.exists();\n //if the directory doesn't exist, create it\n if (!dirExists) {\n dirExists = zephyrlogFolder.mkdirs();\n //if it still doesn't exist, give up and exit\n if (!dirExists) {\n Toast.makeText(this, \"Could not create ZephyrLogs directory!\", Toast.LENGTH_LONG).show();\n }\n }\n\n\n //create a data file and write into it\n File file = new File(zephyrlogFolder, \"Questionnaire_\"+promptName+\".txt\");\n try {\n FileWriter writer;\n if(!file.exists()){\n boolean created = file.createNewFile();\n if (!created) throw new IOException(\"Could not create data file\");\n writer = new FileWriter(file, true);\n //if this is a new file, write the CSV format at the top\n writer.write(\"Ονοματεπώνυμο: \"+promptName+\"\\n\"+\"Score: \"+myscore+\"\\n\\n\");\n } else {\n writer = new FileWriter(file, true);\n }\n writer.write(\"Ονοματεπώνυμο: \"+promptName+\"\\n\"+\"Score: \"+myscore+\"\\n\\n\");\n writer.close();\n } catch (FileNotFoundException e) {\n Toast.makeText(this, \"Could not create logging file!\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n } catch (UnsupportedEncodingException e) {\n Toast.makeText(this, \"Unsupported encoding exception thrown trying to write file!\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n } catch (IOException e) {\n Toast.makeText(this, \"IO Exception trying to write to data file!\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n }\n return file;\n }", "public void populateListFromFile() \n\t{\n\t\tBufferedReader bufferedReader = null;\n\t\tallQuestions = new ArrayList<ArrayList<String>>();\n\t\tquestionAndAnswers = new ArrayList<String>();\n\n\t\ttry {\n\t\t bufferedReader = new BufferedReader(new FileReader(\"questions.txt\"));\n\t\t String line = \"\";\n\t\t \n\t\t while ((line = bufferedReader.readLine()) != null) \n\t\t {\t\t\t \t\n\t\t \tif(line.length() > 0)\n\t\t \t\tquestionAndAnswers.add(line);\n\t\t \telse if (line.length() == 0)\n\t\t \t{\n\t\t \t\tallQuestions.add(questionAndAnswers);\n\t\t \t\tquestionAndAnswers = new ArrayList<String>();\n\t\t \t}\n\t\t } \n\t\t} catch (IOException e) {\n\t\t e.printStackTrace();\n\t\t}\n\t}", "private void settingQuestion() {\n\n int[] setWord = {0, 0, 0, 0, 0};\n int[] setPos = {0, 0, 0, 0};\n int[] setBtn = {0, 0, 0, 0};\n\n Random ans = new Random();\n int wordNum = ans.nextInt(vocabularyLesson.size());\n //answer = vocabularyLesson.get(wordNum).getMean();\n word = vocabularyLesson.get(wordNum).getWord();\n vocabularyID = vocabularyLesson.get(wordNum).getId();\n answer = word;\n\n Practice practice = pc.getPracticeById(vocabularyID);\n if (practice != null) {\n Log.d(\"idVocabulary\", practice.getSentence());\n question.setText(practice.getSentence());\n }\n\n\n // Random position contain answer\n setWord[wordNum] = 1;\n Random p = new Random();\n int pos = p.nextInt(4);\n if (pos == 0) {\n word1.setText(word);\n setBtn[0] = 1;\n }\n if (pos == 1) {\n word2.setText(word);\n setBtn[1] = 1;\n }\n if (pos == 2) {\n word3.setText(word);\n setBtn[2] = 1;\n }\n if (pos == 3) {\n word4.setText(word);\n setBtn[3] = 1;\n }\n setPos[pos] = 1;\n\n // Random 3 position contain 3 answer\n for (int i = 0; i < 3; i++) {\n Random ques = new Random();\n int num = ques.nextInt(5);\n int p1 = ques.nextInt(4);\n while (setWord[num] == 1 || setPos[p1] == 1) {\n num = ques.nextInt(5);\n p1 = ques.nextInt(4);\n }\n String wordIncorrect = vocabularyLesson.get(num).getWord();\n setWord[num] = 1;\n setPos[p1] = 1;\n if (setBtn[p1] == 0 && p1 == 0) {\n word1.setText(wordIncorrect);\n setBtn[0] = 1;\n }\n if (setBtn[p1] == 0 && p1 == 1) {\n word2.setText(wordIncorrect);\n setBtn[1] = 1;\n }\n if (setBtn[p1] == 0 && p1 == 2) {\n word3.setText(wordIncorrect);\n setBtn[2] = 1;\n }\n if (setBtn[p1] == 0 && p1 == 3) {\n word4.setText(wordIncorrect);\n setBtn[3] = 1;\n }\n }\n\n }", "public void saveIHave() throws SQLException, IOException {\n\t\t\n\t\t// dance\n\t\tquery = \"SELECT id, tag FROM dance WHERE ihave=1\";\n\t\tResultSet rs = stmt.executeQuery(query);\n\t\tString info;\n\t\tboolean append = false;\n\t\twhile(rs.next()) {\n\t\t\tinfo = \"dance \" + rs.getInt(\"id\") + \" \" + rs.getString(\"tag\");\n\t\t\tFileUtils.writeStringToFile(saveFile, info, append);\n\t\t\tappend = true;\n\t\t\tFileUtils.writeStringToFile(saveFile, \"\\n\", append);\n\t\t}\n\t\t\n\t\t// album\n\t\tquery = \"SELECT id, tag FROM album WHERE ihave=1\";\n\t\trs = stmt.executeQuery(query);\n\t\twhile(rs.next()) {\n\t\t\tinfo = \"album \" + rs.getInt(\"id\") + \" \" + rs.getString(\"tag\");\n\t\t\tFileUtils.writeStringToFile(saveFile, info, append);\n\t\t\tappend = true;\n\t\t\tFileUtils.writeStringToFile(saveFile, \"\\n\", append);\n\t\t}\n\t\t\n\t\t// publication\n\t\tquery = \"SELECT id, tag FROM publication WHERE ihave=1\";\n\t\trs = stmt.executeQuery(query);\n\t\twhile(rs.next()) {\n\t\t\tinfo = \"publication \" + rs.getInt(\"id\") + \" \" + rs.getString(\"tag\");\n\t\t\tFileUtils.writeStringToFile(saveFile, info, append);\n\t\t\tappend = true;\n\t\t\tFileUtils.writeStringToFile(saveFile, \"\\n\", append);\n\t\t}\n\t\t\n\t\t// recording\n\t\tquery = \"SELECT id, tag FROM recording WHERE ihave=1\";\n\t\trs = stmt.executeQuery(query);\n\t\twhile(rs.next()) {\n\t\t\tinfo = \"recording \" + rs.getInt(\"id\") + \" \" + rs.getString(\"tag\");\n\t\t\tFileUtils.writeStringToFile(saveFile, info, append);\n\t\t\tappend = true;\n\t\t\tFileUtils.writeStringToFile(saveFile, \"\\n\", append);\n\t\t}\n\t}", "public final void saveToFile() {\n\t\tWrite.midi(getScore(), getName()+\".mid\"); \n\t}", "public static void saveLotteryFiles() {\n\t\tFileUtility.deleteAllLines(TOTAL_TICKETS_FILE);\n\t\tFileUtility.deleteAllLines(LOTTERY_ENTRIES_FILE);\n\t\tFileUtility.addLineOnTxt(TOTAL_TICKETS_FILE, totalTicketsPurchased + \"\");\n\n\t\tArrayList<String> line = new ArrayList<String>();\n\t\tfor (int index = 0; index < LotteryDatabase.lotteryDatabase.size(); index++) {\n\t\t\tLotteryDatabase data = LotteryDatabase.lotteryDatabase.get(index);\n\t\t\tline.add(data.getPlayerName() + ServerConstants.TEXT_SEPERATOR + data.getTicketsPurchased());\n\t\t}\n\t\tFileUtility.saveArrayContentsSilent(LOTTERY_ENTRIES_FILE, line);\n\t}", "public void showQuestion() {\n\n // Variable to store the total questions in out question Array\n int totalQuestions = questions.length;\n\n // Variables to refer to textview in XML to show total number of questions\n TextView questionTotalTextView = findViewById(R.id.question_number_text_view);\n\n // Variables to refer to textview in XML to show question\n TextView questionTextView = findViewById(R.id.question_text_view);\n\n //Variable to refer to textview in XML to show score\n TextView scoreTextView = findViewById(R.id.score_text_view);\n\n // Initialize buttons to refer to answer button in XML\n answer1Button = (Button) findViewById(R.id.answer1_button);\n answer2Button = (Button) findViewById(R.id.answer2_button);\n answer3Button = (Button) findViewById(R.id.answer3_button);\n answer4Button = (Button) findViewById(R.id.answer4_button);\n\n // Condtion to check if the current question number on screen is less then total number of questions\n if (currentQuestionNumber < (totalQuestions)) {\n\n // Set the current question number and total number of questions on screen\n questionTotalTextView.setText(String.valueOf(currentQuestionNumber + 1) + \"/\" + String.valueOf(totalQuestions));\n\n // Set the current question on question textview in XML\n questionTextView.setText(questions[currentQuestionNumber]);\n\n // Set the score in score textview in XML\n\n scoreTextView.setText(String.valueOf(\"Score:\" + score));\n\n // Set the answers for the current question to answer buttons in XML\n answer1Button.setText(answers[currentQuestionNumber][0]);\n answer2Button.setText(answers[currentQuestionNumber][1]);\n answer3Button.setText(answers[currentQuestionNumber][2]);\n answer4Button.setText(answers[currentQuestionNumber][3]);\n\n\n } else {\n // If the last uestion has been answered i.e current question is equal to total questions then mark the quiz complete\n quizComplete = true;\n }\n\n // Check if the quiz is completed and show the summary to the user\n if (quizComplete) {\n\n totalIncorrectAnswers = totalQuestions - (totalCorrectAnswers + totalNotAttemptedAnswers);\n callAlertDialog(totalQuestions);\n\n }\n\n }", "private void persist() {\n \t\ttry {\n \t\t\tproblemFile = File.createTempFile(\"p2Encoding\", \".opb\"); //$NON-NLS-1$//$NON-NLS-2$\n \t\t\tBufferedWriter w = new BufferedWriter(new FileWriter(problemFile));\n \t\t\tint clauseCount = tautologies.size() + dependencies.size() + constraints.size();\n \n \t\t\tint variableCount = variables.size();\n \t\t\tw.write(\"* #variable= \" + variableCount + \" #constraint= \" + clauseCount + \" \"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\n \t\t\tw.newLine();\n \t\t\tw.write(\"*\"); //$NON-NLS-1$\n \t\t\tw.newLine();\n \n \t\t\tif (variableCount == 0 && clauseCount == 0) {\n \t\t\t\tw.close();\n \t\t\t\treturn;\n \t\t\t}\n \t\t\tw.write(objective);\n \t\t\tw.newLine();\n \t\t\tw.newLine();\n \n \t\t\tw.write(explanation + \" ;\"); //$NON-NLS-1$\n \t\t\tw.newLine();\n \t\t\tw.newLine();\n \n \t\t\tfor (Iterator iterator = dependencies.iterator(); iterator.hasNext();) {\n \t\t\t\tw.write((String) iterator.next());\n \t\t\t\tw.newLine();\n \t\t\t}\n \t\t\tfor (Iterator iterator = constraints.iterator(); iterator.hasNext();) {\n \t\t\t\tw.write((String) iterator.next());\n \t\t\t\tw.newLine();\n \t\t\t}\n \t\t\tfor (Iterator iterator = tautologies.iterator(); iterator.hasNext();) {\n \t\t\t\tw.write((String) iterator.next());\n \t\t\t\tw.newLine();\n \t\t\t}\n \t\t\tw.close();\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t}", "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 }", "private void saveHighScore() {\n\n\t\tFileOutputStream os;\n\t\n\t\ttry {\n\t\t boolean exists = (new File(this.getFilesDir() + filename).exists());\n\t\t // Create the file and directories if they do not exist\n\t\t if (!exists) {\n\t\t\tnew File(this.getFilesDir() + \"\").mkdirs();\n\t\t\tnew File(this.getFilesDir() + filename);\n\t\t }\n\t\t // Saving the file\n\t\t os = new FileOutputStream(this.getFilesDir() + filename, false);\n\t\t ObjectOutputStream oos = new ObjectOutputStream(os);\n\t\t oos.writeObject(localScores);\n\t\t oos.close();\n\t\t os.close();\n\t\t} catch (Exception e) {\n\t\t e.printStackTrace();\n\t\t}\n }", "private void checkFinish() {\n if (qid < numberOfQuestions) {\n if (bolRandom) {\n currentQ = quesList.get(qid);\n }else if (Chapter1) {\n currentQ = Chapter1List.get(qid);\n }else if (Chapter2) {\n currentQ = Chapter2List.get(qid);\n }else if (Chapter3) {\n currentQ = Chapter3List.get(qid);\n }else if (Chapter4){\n currentQ = Chapter4List.get(qid);\n }else if (Chapter5){\n currentQ = Chapter5List.get(qid);\n }else if (Chapter6){\n currentQ = Chapter6List.get(qid);\n }else if (Chapter7){\n currentQ = Chapter7List.get(qid);\n }else if (Chapter8){\n currentQ = Chapter8List.get(qid);\n }else if (Chapter9){\n currentQ = Chapter9List.get(qid);\n }else if (Chapter10){\n currentQ = Chapter10List.get(qid);\n }else if (Chapter11){\n currentQ = Chapter11List.get(qid);\n }\n setQuestionView();\n } else {\n Intent intent = new Intent(MainActivity.this, GradeActivity.class);\n Bundle b = new Bundle();\n b.putInt(\"score\", score); //Your score\n intent.putExtras(b); //Put your score to your next Intent\n startActivity(intent);\n finish();\n }\n\n }", "public boolean gameCompleted() {\n\t\tint[] expected = {5,5,5,5,5};\n\t\tif(Arrays.equals(_answeredQuestions, expected)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "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 }", "private void savePrefsData() {\n SharedPreferences pref = getApplicationContext().getSharedPreferences(\"myPrefs\", MODE_PRIVATE);\n SharedPreferences.Editor editor = pref.edit();\n editor.putBoolean(\"isIntroOpnend\", true);\n editor.commit();\n }", "public void actionPerformed (ActionEvent ev){\n\t\t\tQAinput += qtextarea.getText() + \"/\" + atextarea.getText() ;\n\t\t\t\n\t\t\t//creating a new filename and write the array of questions and answers there. This works for Japanese as well\n\t\t\tFile filepath = new File(filename);\n\t\t\ttry {\n\t\t\t\tOutputStream out = new FileOutputStream(filepath);\n \t\t\t\tWriter writer = new OutputStreamWriter(out, StandardCharsets.UTF_8);\n\t\t\t\twriter.write(QAinput);\n\t\t\t\twriter.close();\n\t\t\t} catch(IOException ex) { System.out.print(\"caught\"); ex.printStackTrace(); }\n\n\t\t\t/*\n\t\t\tadding the filename to \"ListofDecks.txt\". This is done first by reading all of the data (all of filename that has been recorded previously)\n\t\t\tand then convert it to string and then you added your new filename to the string, and the last, you record the string to the file.\n\t\t\t*/\n\t\t\ttry {\t\n\t\t\t\tFile targetfile = new File (\"\");\n\t\t\t\tif (targetfile.exists()){\n\t\t\t\t\tBufferedReader reader = new BufferedReader (new FileReader (\"ListofDecks\"));\n\t\t\t\t\tString message = null;\n\t\t\t\t\tString fullmessage = null;\n\t\t\t\t\tfullmessage = \"\";\n\t\t\t\t\twhile ((message = reader.readLine()) != null ){\n\t\t\t\t\t\tfullmessage += message;\n\t\t\t\t\t}\t\n\t\t\t\t\treader.close();\n\t\t\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter (new File(\"ListofDecks\")));\n\t\t\t\t\twriter.write(fullmessage + filename + \"/\");\n\t\t\t\t\twriter.close();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter (new File(\"ListofDecks\")));\n\t\t\t\t\twriter.write(filename + \"/\");\n\t\t\t\t\twriter.close();\n\t\t\t\t}\n\t\t\t} catch (IOException excc) { System.out.print(\"caught\"); excc.printStackTrace(); }\n\t\t\tframe.setVisible(false);\n\t\t\tmoriHomepage mori = new moriHomepage();\n\t\t}", "public void saveSurveyAnswer(HttpServletRequest request, Answers answers, long userId);", "public static ArrayList<Puzzle> getStoredPuzzles() {\n files = getFiles();\n ArrayList<Puzzle> storedPuzzles = new ArrayList<Puzzle>();\n System.out.println();\n for (int j = 0; j < files.length; j++) {\n try {\n storedPuzzles.add(loadPuzzle(j));\n } catch(Exception e) {\n System.out.println(\"Error in getting Puzzles\");}\n }\n return storedPuzzles;\n }", "public void save() {\n CSVWriter csvWriter = new CSVWriter();\n csvWriter.writeToTalks(\"phase1/src/Resources/Talks.csv\", this.getTalkManager()); //Not implemented yet\n }", "public ArrayList<ArrayList<String>> reportAnswers() { \n\n\t\ttry {\n\t\t\tAnswers myAnswers = new Answers(myQuestions.getData());\n\n\t\t\tSystem.out.println(\"Basic analysis:\" + myAnswers);\n\t\t\tSystem.out.println(myAnswers.getJSON());\n\n//\t\t\tShowImageFromURL.show(myAnswers.getBarChartURL());\n\t\t\t\n\t\t\treturn myAnswers.getJSON();\n\t\t} catch (RemoteException e) {\n\t\t\tSystem.out.println(\"Something went wrong: \"+e.toString());\n\t\t\te.printStackTrace();\n\t\t\treturn null; \n\t\t}\n\t\t\n\t}", "@Test\n public void testGetAnswersByQuestion(){\n Survey survey = createSurvey();\n Question question = createQuestion(survey);\n Answer answer = createAnswer(question);\n\n long testQuestionId = question.getId();\n List<Answer> testAnswers = answerDAO.getAnswersByQuestion(testQuestionId);\n // hiç cevap gelebiliyor mu kontrol, en az 1 cevap yukarda verdik çünkü.\n Assert.assertTrue(testAnswers != null && testAnswers.size() >= 1);\n }", "private String getUserAnswer() {\n CheckBox checkBox1 = (CheckBox) findViewById(R.id.checkbox_1);\n CheckBox checkBox2 = (CheckBox) findViewById(R.id.checkbox_2);\n CheckBox checkBox3 = (CheckBox) findViewById(R.id.checkbox_3);\n CheckBox checkBox4 = (CheckBox) findViewById(R.id.checkbox_4);\n EditText inputText = (EditText) findViewById(R.id.input_text);\n RadioButton radioButtonA = (RadioButton) findViewById(R.id.radio_button_A);\n RadioButton radioButtonB = (RadioButton) findViewById(R.id.radio_button_B);\n RadioButton radioButtonC = (RadioButton) findViewById(R.id.radio_Button_C);\n RadioButton radioButtonD = (RadioButton) findViewById(R.id.radio_Button_D);\n\n if (radioButtonA.isChecked())\n userAnswer[currentQueNum - 1] = radioButtonA.getText().toString();\n else if (radioButtonB.isChecked())\n userAnswer[currentQueNum - 1] = radioButtonB.getText().toString();\n else if (radioButtonC.isChecked())\n userAnswer[currentQueNum - 1] = radioButtonC.getText().toString();\n else if (radioButtonD.isChecked())\n userAnswer[currentQueNum - 1] = radioButtonD.getText().toString();\n\n //the below block of code can be modify if needed that, to record the state of checkbox\n //and compare with set down cases\n //but in this situation this is the only condition that a correct answer is chosen\n else if (checkBox1.isChecked() && checkBox2.isChecked() && checkBox3.isChecked() && !checkBox4.isChecked()) {\n userAnswer[currentQueNum - 1] = checkBox1.getText().toString() + \",\" + checkBox2.getText().toString() + \",\" + checkBox3.getText().toString();\n\n } else if (inputText.getText().toString().trim().length() != 0) {\n userAnswer[currentQueNum - 1] = inputText.getText().toString();\n inputText.setText(\"\");// this will set the text field back to empty for subsequent use\n } else\n userAnswer[currentQueNum - 1] = \"skipped\";//the string when user skipped question\n return userAnswer[currentQueNum - 1];\n }", "public static void takeTest(Question [] questions) {\n int score = 0;\n Scanner keyboardInput = new Scanner(System.in);\n for(int i = 0; i < questions.length; i++){\n System.out.println(questions[i].prompt);\n String answer = keyboardInput.nextLine();\n if(answer.equals(questions[i].answer)) {\n score++;\n }\n\n }\n System.out.println(\"Voce conseguiu \" + score + \"/\" + questions.length + \"pontos\");\n\n }", "private void updateQuestion(){\n mchoice1.setChecked(false);\n mchoice2.setChecked(false);\n mchoice3.setChecked(false);\n mchoice4.setChecked(false);\n\n if (mQuestonNumber < mQuizLibrary.getLength()){\n //menset setiap textview dan radiobutton untuk diubah jadi pertanyaan\n sQuestion.setText(mQuizLibrary.getQuestion(mQuestonNumber));\n //mengatur opsi sesuai pada optional A\n mchoice1.setText(mQuizLibrary.getChoice(mQuestonNumber, 1)); //Pilihan Ganda ke 1\n //mengatur opsi sesuai pada optional B\n mchoice2.setText(mQuizLibrary.getChoice(mQuestonNumber, 2)); //Pilihan Ganda ke 2\n //mengatur opsi sesuai pada optional C\n mchoice3.setText(mQuizLibrary.getChoice(mQuestonNumber, 3)); //Pilihan Ganda ke 3\n //mengatur opsi sesuai pada optional D\n mchoice4.setText(mQuizLibrary.getChoice(mQuestonNumber, 4)); //Pilihan Ganda ke 4\n\n manswer = mQuizLibrary.getCorrect(mQuestonNumber);\n //untuk mengkoreksi jawaban yang ada di class QuizBank sesuai nomor urut\n mQuestonNumber++; //update pertanyaan\n }else{\n Toast.makeText(Quiz.this, \"ini pertanyaan terakhir\", Toast.LENGTH_LONG).show();\n Intent i = new Intent (Quiz.this, HighestScore.class);\n i.putExtra(\"score\", mScore); //UNTUK MENGIRIM NILAI KE activity melalui intent\n startActivity(i);\n }\n }", "public void saveScore() {\r\n FileDialog fd = new FileDialog(this, \"Save as a MIDI file...\", FileDialog.SAVE);\r\n fd.setFile(\"FileName.mid\");\r\n fd.show();\r\n //write a MIDI file to disk\r\n if ( fd.getFile() != null) {\r\n Write.midi(score, fd.getDirectory() + fd.getFile());\r\n }\r\n }", "public void checkAnswer(){\n int selectedRadioButtonId = radioTermGroup.getCheckedRadioButtonId();\n\n // find the radiobutton by returned id\n RadioButton radioSelected = findViewById(selectedRadioButtonId);\n\n String term = radioSelected.getText().toString();\n String definition = tvDefinition.getText().toString();\n\n if (Objects.equals(termsAndDefinitionsHashMap.get(term), definition)) {\n correctAnswers += 1;\n Toast.makeText(ActivityQuiz.this, \"Correct\", Toast.LENGTH_SHORT).show();\n }\n else {\n Toast.makeText(ActivityQuiz.this, \"Incorrect\", Toast.LENGTH_SHORT).show();\n }\n\n tvCorrectAnswer.setText(String.format(\"%s\", correctAnswers));\n }", "List<Question> getQuestionsUsed();", "public void finishQuiz(View view){\n if(((RadioButton) findViewById(R.id.radio_new_york_city)).isChecked()) {\n score++;\n }\n\n //Anser for question 2\n if(((RadioButton) findViewById(R.id.radio_food_cart)).isChecked()) score++;\n\n //Anser for question 3\n if(((CheckBox) findViewById(R.id.check_chicken)).isChecked()\n && ((CheckBox) findViewById(R.id.check_gyro)).isChecked()\n && !((CheckBox) findViewById(R.id.check_pork)).isChecked()) score++;\n\n //Anser for question 4\n String answer4 = ((EditText) findViewById(R.id.edit_bread)).getText().toString().toLowerCase();\n if(answer4.equals(\"pita\")) score++;\n\n //Anser for question 5\n if(((CheckBox) findViewById(R.id.check_red)).isChecked()\n && ((CheckBox) findViewById(R.id.check_yellow)).isChecked()\n && !((CheckBox) findViewById(R.id.check_white)).isChecked()) score++;\n\n\n //Anser for question 6\n if(((RadioButton) findViewById(R.id.radio_large)).isChecked()) score++;\n\n //Display the Toast\n Context context = getApplicationContext();\n\n CharSequence text;\n if(score == 6) {\n text = \"Congrats! Your Score was \" + score + \" out of 6!\";\n } else {\n text = \"You only have \" + score + \" out of 6! Try again!\";\n }\n int duration = Toast.LENGTH_LONG;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n\n //Resest score to 0\n\n score = 0;\n }" ]
[ "0.6597172", "0.6463706", "0.6164701", "0.6118878", "0.60368294", "0.60261184", "0.59575677", "0.59253854", "0.5859511", "0.58507425", "0.573585", "0.5724934", "0.566834", "0.5659796", "0.5622738", "0.5611754", "0.5610031", "0.5607611", "0.5604672", "0.5595147", "0.55773896", "0.55557", "0.55533606", "0.5536621", "0.5506998", "0.54994774", "0.5494903", "0.5480007", "0.54772174", "0.547661", "0.547059", "0.5452138", "0.54492575", "0.54386127", "0.5426654", "0.54257935", "0.5419232", "0.54102457", "0.5403807", "0.5395194", "0.5378337", "0.53727734", "0.5364637", "0.5361806", "0.5361765", "0.5360758", "0.53504306", "0.53460956", "0.53331494", "0.532267", "0.5318013", "0.5309607", "0.53094214", "0.5302827", "0.52981955", "0.5293435", "0.5291727", "0.52901894", "0.52851135", "0.52829975", "0.5282634", "0.5279604", "0.5277838", "0.52628446", "0.52613", "0.526096", "0.5253839", "0.52403176", "0.5239692", "0.5228898", "0.5226448", "0.5221729", "0.5218253", "0.52142215", "0.52100414", "0.52006334", "0.51999307", "0.5198411", "0.5198043", "0.51935244", "0.5191518", "0.51846796", "0.5182076", "0.5174862", "0.5174769", "0.5174745", "0.5169413", "0.51691663", "0.51467794", "0.51410353", "0.51408917", "0.51317805", "0.5121398", "0.5116139", "0.5114552", "0.51030505", "0.5101616", "0.5095377", "0.5092237", "0.50915945" ]
0.73443437
0
how the questions being answered are being tracked, by adding 1 to the category index up to 5, where 5 means all questions have been asnwered
public void addAnsweredQuestions (int index) { _answeredQuestions[index]=_answeredQuestions[index]+1; BashCmdUtil.bashCmdNoOutput("rm data/answered_questions"); BashCmdUtil.bashCmdNoOutput("touch data/answered_questions"); String answeredQuestions = ""; for (int i = 0;i<5;i++) { answeredQuestions = answeredQuestions + " " + String.valueOf(_answeredQuestions[i]); } BashCmdUtil.bashCmdNoOutput(String.format("echo \"%s\" >> data/answered_questions", answeredQuestions)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void updateActiveChallenge() {\n categories.get(indexOfActiveCategory).increaseIndexOfActiveChallenge();\n }", "public void cheakCategory(String category) {\n\n if (category.equals(\"1\")) {\n url_count += 1;\n } else if (category.equals(\"4\")) {\n sms_count += 1;\n } else if (category.equals(\"2\")) {\n text_count += 1;\n } else if (category.equals(\"3\")) {\n contact_count += 1;\n } else if (category.equals(\"5\")) {\n initiate_call_count += 1;\n }\n\n }", "int getNumberOfAllQuestions();", "@Override\n\t\tpublic int getCount() {\n\t\t\t// TODO Auto-generated method stub\n\t\t\treturn questions.size();\n\t\t}", "int getNumberOfQuestions();", "public int getAnsweredQuestions(int index){\n\t\treturn _answeredQuestions[index];\n\n\t}", "public void gamemodeSetUp(ArrayList<Player> players, int numberOfQuestions, Categories categories){\n for (int i = 0; i < numberOfQuestions; i++) {\n String categoriesToAsk = categories.getRandomCategory();\n Question questionToBeAsked;\n System.out.format(\"The category is %s\\n\", categoriesToAsk);\n switch (categoriesToAsk) {\n case \"Math\":\n if (categories.getMathArray().isEmpty()){\n categories.initializeTheArrayWithMathQuestions();\n }\n questionToBeAsked = this.setUpQuestion(categories.getMathArray());\n gamemodePlay(players, questionToBeAsked);\n break;\n case \"General Knowledge\":\n if (categories.getGeneralKnowledgeArray().isEmpty()){\n categories.initializeTheArrayWithGeneralKnowledgeQuestions();\n }\n questionToBeAsked = this.setUpQuestion(categories.getGeneralKnowledgeArray());\n gamemodePlay(players, questionToBeAsked);\n break;\n case \"Science\":\n if (categories.getScienceArray().isEmpty()){\n categories.initializeTheArrayWithScienceQuestions();\n }\n questionToBeAsked = this.setUpQuestion(categories.getScienceArray());\n gamemodePlay(players, questionToBeAsked);\n break;\n case \"Movies\":\n if (categories.getMoviesArray().isEmpty()){\n categories.initializeTheArrayWithMoviesQuestions();\n }\n questionToBeAsked = this.setUpQuestion(categories.getMoviesArray());\n gamemodePlay(players, questionToBeAsked);\n break;\n }\n }\n scoreSumUp(players);\n }", "public void UpdateCategoriesCheckRepeats(){\n dbHandler.OpenDatabase();\n ArrayList<Category> CategoryObjectList = dbHandler.getAllCategory();\n // Create Category String List\n ArrayList<String> CategoryStringList = new ArrayList<>();\n for (int i = 0; i < CategoryObjectList.size(); i++) {\n CategoryStringList.add( CategoryObjectList.get(i).getName() );\n }\n\n Category category;\n // cycle through object list\n for (int i = 0; i < CategoryObjectList.size(); i++) {\n category = CategoryObjectList.get(i);\n CategoryObjectList.remove(i);\n CategoryStringList.remove(i); // remove so it doesn't find itself\n\n // find name in Category List\n int index = CategoryStringList.indexOf( category.getName() );\n\n if (index == -1){\n CategoryObjectList.add(category);\n CategoryStringList.add(category.getName());\n }else{\n CategoryObjectList.get(index).increaseCounter( category.getCounter() );\n CategoryObjectList.get(index).increaseAmount( category.getAmount() );\n i--;\n }\n }\n\n // Add back to database\n dbHandler.deleteAllCategory();\n for (int i = 0; i < CategoryObjectList.size(); i++) {\n dbHandler.addCategory(CategoryObjectList.get(i));\n }\n\n dbHandler.CloseDatabase();\n }", "List<PlayedQuestion> getPlayedQuestionsCount();", "Integer countAnswersByQuestionId(String questionId);", "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 }", "private void updateQuestion()\r\n {\r\n if(noOfQuestion == 10) //last question.\r\n {\r\n //Toast.makeText(getApplicationContext(), \"Questions Limit Reached!!\", Toast.LENGTH_SHORT).show();\r\n\r\n questionsTV.setVisibility(View.GONE);\r\n questionNoTV.setVisibility(View.GONE);\r\n answer1Btn.setVisibility(View.GONE);\r\n answer2Btn.setVisibility(View.GONE);\r\n answer3Btn.setVisibility(View.GONE);\r\n viewLBBtn.setVisibility(View.VISIBLE);\r\n congratsImgView.setVisibility(View.VISIBLE);\r\n starImgView.setVisibility(View.VISIBLE);\r\n\r\n if(backgroundMusicPlayer.isPlaying()) {\r\n backgroundMusicPlayer.stop();\r\n }\r\n congratsMPlayer.start();\r\n clapSoundPlayer.start();\r\n }\r\n else\r\n {\r\n noOfQuestion++; //increment the number of question.\r\n resetButtonsPosition(answer1Btn, answer2Btn, answer3Btn, 0);\r\n\r\n //update the view with next question and answers.\r\n questionsTV.setText(questionsAndAnswersLibrary.getQuestion(questionNo));\r\n answer1Btn.setText(questionsAndAnswersLibrary.getAnswerChoice1(questionNo));\r\n answer2Btn.setText(questionsAndAnswersLibrary.getAnswerChoice2(questionNo));\r\n answer3Btn.setText(questionsAndAnswersLibrary.getAnswerChoice3(questionNo));\r\n\r\n correctAnswer = questionsAndAnswersLibrary.getCorrectAnswer(questionNo);\r\n questionNo++;\r\n\r\n moveButtons(answer1Btn);\r\n moveButtons(answer2Btn);\r\n moveButtons(answer3Btn);\r\n }\r\n }", "Integer getNumQuestions();", "private void recordDisplayedSuggestions(int[] categories) {\n int[] suggestionsPerCategory = new int[categories.length];\n boolean[] isCategoryVisible = new boolean[categories.length];\n\n for (int i = 0; i < categories.length; ++i) {\n SuggestionsSection section = mSections.get(categories[i]);\n suggestionsPerCategory[i] = section != null ? section.getSuggestionsCount() : 0;\n isCategoryVisible[i] = section != null;\n }\n\n mUiDelegate.getEventReporter().onPageShown(\n categories, suggestionsPerCategory, isCategoryVisible);\n }", "private void updateQuestion() {\r\n\r\n //The code below resets the option\r\n mOption1.setVisibility(View.VISIBLE);\r\n mOption2.setVisibility(View.VISIBLE);\r\n mOption3.setVisibility(View.VISIBLE);\r\n mNext.setVisibility(View.INVISIBLE);\r\n\r\n int questionSize = 12;\r\n\r\n if (mQuestionNumber < questionSize) {\r\n\r\n mQuestionView.setText((questionsDB.getQuestion(mQuestionNumber)));\r\n mOption1.setText(questionsDB.getChoice1(mQuestionNumber));\r\n mOption2.setText(questionsDB.getChoice2(mQuestionNumber));\r\n mOption3.setText(questionsDB.getChoice3(mQuestionNumber));\r\n\r\n mAnswer = questionsDB.getCorrectAnswer(mQuestionNumber);\r\n mQuestionNumber++;\r\n timeLeftInMillis = COUNTDOWN_IN_MILLIS;\r\n startCountDown();\r\n\r\n\r\n } else {\r\n displayScore();\r\n }\r\n\r\n }", "private void generalKnowledgeQuestions(){\n QuestionUtils.generalKnowledgeQuestions(); //all the questions now are stored int the QuestionUtils class\n }", "public void changeCategory(int index){\n if(user[index].getAmountCategory()>=3 && user[index].getAmountCategory()<=10){\n user[index].setCategoryUser(user[index].newCategory(\"littleContributor\"));\n }\n else if(user[index].getAmountCategory()>10 && user[index].getAmountCategory()<30){\n user[index].setCategoryUser(user[index].newCategory(\"mildContributor\"));\n }\n else if(user[index].getAmountCategory() == 30){\n user[index].setCategoryUser(user[index].newCategory(\"starContributor\"));\n }\n }", "public int getCount() {\n return questionList.size();\n }", "public int getTotalQuestions() {\r\n\t\treturn totalQuestions;\r\n\t}", "public void categoryTotal()\n {\n attiretra=c+c2+c3;\n audibitytra=d+d2+d3;\n emphasistra=e+e2+e3;\n gesturetra=f+f2+f3;\n contenttra=g+g2+g3;\n dikomatra=at+at2+at3;\n diagelotra=bt+bt2+bt3;\n humantra=ct+ct2+ct3;\n womenabusetra=dt+dt2+dt3;\n killingtra=ht+ht2+ht3;\n rapetra=et+et2+et3;\n xenophobiatra=gt+gt2+gt3;\n albinismtra=ft+ft2+ft3;\n }", "public void onCategoryClicked(String category){\n\t\tfor(int i = 0 ; i < mData.getStatistics().size(); i++){\r\n\t\t\tif(mData.getStatistics().get(i).getCategory().equals(category)){\r\n\t\t\t\tif(mData.getStatistics().get(i).getDueChallenges() == 0){\r\n\t\t\t\t\tmGui.showToastNoDueChallenges(mData.getActivity());\r\n\t\t\t\t} else {\r\n\t\t\t\t\t//Start activity challenge (learn session) with category and user \t\r\n\t\t\t\t\tNavigation.startActivityChallenge(mData.getActivity(), mData.getUser(), category);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\t\t\r\n\t}", "@Override\n\t\tpublic int getCount() {\n\t\t\treturn answers.size();\n\t\t}", "private void setUpQuestions(){\n if (index == questions.size()){ //if no more questions, jumps to the endGame\n endGame();\n }else {\n currentQuestion = questions.get(index);\n\n lblQuestion.setText(currentQuestion.getQuestion());\n imgPicture.setImageResource(currentQuestion.getPicture());\n btnRight.setText(currentQuestion.getOption1());\n btnLeft.setText(currentQuestion.getOption2());\n index++;\n }\n }", "public int getCountForum();", "@Test\r\n public void testTotalNumberOfQuestion() {\r\n Application.loadQuestions();\r\n assertEquals(Application.allQuestions.size(), 2126);\r\n }", "private boolean checkCaTegoryLegitness(int[] dice, int category) {\n\t\t// our boolean that is false at the beginning.\n\t\tboolean legitnessStatus = false;\n\t\t// we don't need to check anything for one to six or for check so\n\t\t// boolean\n\t\t// will be true. we don't need to check for one to six because if player\n\t\t// chose one to six we score++ every time we get that number\n\t\t// in the dice. and if there is no that number than the score\n\t\t// automatically will be 0.\n\t\tif (category >= 1 && category <= 6 || category == CHANCE) {\n\t\t\tlegitnessStatus = true;\n\t\t} else {\n\t\t\t// but if player chose something other than one to six or chance we\n\t\t\t// make 6 array lists.\n\t\t\tArrayList<Integer> ones = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> twos = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> threes = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> fours = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> fives = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> sixes = new ArrayList<Integer>();\n\t\t\t// after that we get ones, twos and etc. until six from the dice\n\t\t\t// numbers we randomly got and add that numbers in the array it\n\t\t\t// belongs. for example if the integer on first dice is 5 we add 1\n\t\t\t// in array list called fives. finally, arrays size will give us how\n\t\t\t// many that number we have in our dices.\n\t\t\tfor (int i = 0; i < N_DICE; i++) {\n\t\t\t\tif (dice[i] == 1) {\n\t\t\t\t\tones.add(1);\n\t\t\t\t} else if (dice[i] == 2) {\n\t\t\t\t\ttwos.add(1);\n\t\t\t\t} else if (dice[i] == 3) {\n\t\t\t\t\tthrees.add(1);\n\t\t\t\t} else if (dice[i] == 4) {\n\t\t\t\t\tfours.add(1);\n\t\t\t\t} else if (dice[i] == 5) {\n\t\t\t\t\tfives.add(1);\n\t\t\t\t} else if (dice[i] == 6) {\n\t\t\t\t\tsixes.add(1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// after we know how many ones, twos etc. we have its easy to check.\n\t\t\t// for THREE_OF_A_KIND if there is any of the arrays that size is\n\t\t\t// equal or more than 3 legitnessStatus should get true.\n\t\t\tif (category == THREE_OF_A_KIND) {\n\t\t\t\tif (ones.size() >= 3 || twos.size() >= 3 || threes.size() >= 3\n\t\t\t\t\t\t|| fours.size() >= 3 || fives.size() >= 3\n\t\t\t\t\t\t|| sixes.size() >= 3) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t}\n\t\t\t\t// for FOUR_OF_A_KIND if there is any of the arrays that size is\n\t\t\t\t// equal or more than 4 legitnessStatus should get true.\n\t\t\t} else if (category == FOUR_OF_A_KIND) {\n\t\t\t\tif (ones.size() >= 4 || twos.size() >= 4 || threes.size() >= 4\n\t\t\t\t\t\t|| fours.size() >= 4 || fives.size() >= 4\n\t\t\t\t\t\t|| sixes.size() >= 4) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t}\n\t\t\t\t// for FULL_HOUSE we want any of our array list size to be equal\n\t\t\t\t// to three and after that we have that we want one more array\n\t\t\t\t// to be\n\t\t\t\t// equal to two. that means that we will have three similar dice\n\t\t\t\t// and two more similar dice.\n\t\t\t} else if (category == FULL_HOUSE) {\n\t\t\t\tif (ones.size() == 3 || twos.size() == 3 || threes.size() == 3\n\t\t\t\t\t\t|| fours.size() == 3 || fives.size() == 3\n\t\t\t\t\t\t|| sixes.size() == 3) {\n\t\t\t\t\tif (ones.size() == 2 || twos.size() == 2\n\t\t\t\t\t\t\t|| threes.size() == 2 || fours.size() == 2\n\t\t\t\t\t\t\t|| fives.size() == 2 || sixes.size() == 2) {\n\t\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// there is only 3 way we can get SMALL_STRAIGHT. these are if\n\t\t\t\t// dices show: 1,2,3,4 or 2,3,4,5, or 3,4,5,6. for first one it\n\t\t\t\t// means we need our first array size to be one AND our second\n\t\t\t\t// array size to be one AND our third array size to be one AND\n\t\t\t\t// out fourth array list size to be one. and so on for other two\n\t\t\t\t// ways.\n\t\t\t} else if (category == SMALL_STRAIGHT) {\n\t\t\t\tif (ones.size() == 1 && twos.size() == 1 && threes.size() == 1\n\t\t\t\t\t\t&& fours.size() == 1) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t} else if (twos.size() == 1 && threes.size() == 1\n\t\t\t\t\t\t&& fours.size() == 1 && fives.size() == 1) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t} else if (threes.size() == 1 && fours.size() == 1\n\t\t\t\t\t\t&& fives.size() == 1 && sixes.size() == 1) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t}\n\t\t\t\t// for LARGE_STRAIGHT there is only 2 ways. these are:1,2,3,4,5\n\t\t\t\t// or 2,3,4,5,6. for first one it\n\t\t\t\t// means we need our first array size to be one AND our second\n\t\t\t\t// array size to be one AND our third array size to be one AND\n\t\t\t\t// out fourth array list size to be one AND our fifth array list\n\t\t\t\t// size to be one. similar for second way starting from second\n\t\t\t\t// array list and going through to last sixth array list.\n\t\t\t} else if (category == LARGE_STRAIGHT) {\n\t\t\t\tif (ones.size() == 1 && twos.size() == 1 && threes.size() == 1\n\t\t\t\t\t\t&& fours.size() == 1 && fives.size() == 1) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t} else if (twos.size() == 1 && threes.size() == 1\n\t\t\t\t\t\t&& fours.size() == 1 && fives.size() == 1\n\t\t\t\t\t\t&& sixes.size() == 1) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t}\n\t\t\t\t// and for YAHTZEE we want any of our array list size to be\n\t\t\t\t// five. it will mean that all dices show same thing. because if\n\t\t\t\t// for example array list ones size is five it means that we\n\t\t\t\t// added 1 in that array 5 times and it means that we see 5 same\n\t\t\t\t// number on all dices.\n\t\t\t} else if (category == YAHTZEE) {\n\t\t\t\tif (ones.size() == 5 || twos.size() == 5 || threes.size() == 5\n\t\t\t\t\t\t|| fours.size() == 5 || fives.size() == 5\n\t\t\t\t\t\t|| sixes.size() == 5) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// finally it will return boolean of true or false.\n\t\treturn legitnessStatus;\n\t}", "@Override\n public void tabulateResult(QaQuiz quiz) {\n List<QaGradebook> gradebooks = gradebookDao.find(quiz); // todo chunking\n for (QaGradebook gradebook : gradebooks) {\n Integer result = 0;\n QaParticipant participant = gradebook.getParticipant();\n List<QaGradebookItem> items = gradebook.getItems();\n for (QaGradebookItem item : items) {\n QaQuestion question = item.getQuestion();\n switch (question.getQuestionType()) {\n case MULTIPLE_CHOICE:\n log.debug(\"answer:\" + question.getAnswerIndex());\n log.debug(\"response:\" + item.getAnswerIndex());\n\n if (null != item.getAnswerIndex() &&\n null != question.getAnswerIndex() && // just in case\n item.getAnswerIndex().equals(question.getAnswerIndex())) {\n result += 1;\n }\n break;\n case BOOLEAN:\n if (null != item.getAnswerIndex() &&\n null != question.getAnswerIndex() && // just in case\n item.getAnswerIndex().equals(question.getAnswerIndex())) {\n result += 1;\n }\n break;\n case SUBJECTIVE:\n participant.setAnswerResponse(item.getAnswerResponse());\n break;\n }\n }\n log.debug(\"result: \" + result);\n participant.setResult(result);\n participantDao.update(participant, Utils.getCurrentUser());\n sessionFactory.getCurrentSession().flush();\n }\n }", "int getQuestCount();", "private int scoreForThisCategory(int category, int playerName) {\n\t\t// at start let the score be 0.\n\t\tint score = 0;\n\t\t// if player chose one to six we score++ every time we get that number\n\t\t// in the dice. that will give us how many that number player chose is\n\t\t// in the dice.\n\t\tif (category >= 1 && category <= 6) {\n\t\t\tfor (int i = 0; i < N_DICE; i++) {\n\t\t\t\tif (diceResults[i] == category) {\n\t\t\t\t\tscore++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// than we multiple it on what number(category) player chose to get\n\t\t\t// the final score for this category.\n\t\t\tscore *= category;\n\t\t\t// if player chose THREE_OF_A_KIND than score is the sum of the\n\t\t\t// numbers on dice.\n\t\t} else if (category == THREE_OF_A_KIND) {\n\t\t\tfor (int i = 0; i < N_DICE; i++) {\n\t\t\t\tscore += diceResults[i];\n\t\t\t}\n\t\t\t// if player chose FOUR_OF_A_KIND than score is the sum of the\n\t\t\t// numbers on dice.\n\t\t} else if (category == FOUR_OF_A_KIND) {\n\t\t\tfor (int i = 0; i < N_DICE; i++) {\n\t\t\t\tscore += diceResults[i];\n\t\t\t}\n\t\t\t// if player chose FULL_HOUSE than score is 25.\n\t\t} else if (category == FULL_HOUSE) {\n\t\t\tscore = 25;\n\t\t\t// if player chose SMALL_STRAIGHT than score is 30.\n\t\t} else if (category == SMALL_STRAIGHT) {\n\t\t\tscore = 30;\n\t\t\t// if player chose LARGE_STRAIGHT than score is 40.\n\t\t} else if (category == LARGE_STRAIGHT) {\n\t\t\tscore = 40;\n\t\t\t// if player chose YAHTZEE than score is 50.\n\t\t} else if (category == YAHTZEE) {\n\t\t\tscore = 50;\n\t\t\t// if player chose CHANCE score is the sum of numbers on the dice.\n\t\t} else if (category == CHANCE) {\n\t\t\tfor (int i = 0; i < N_DICE; i++) {\n\t\t\t\tscore += diceResults[i];\n\t\t\t}\n\t\t}\n\t\t// finally method will return the score.\n\t\treturn score;\n\t}", "int getCategoryCount() {\r\n\t\treturn aCount;\r\n\t}", "private void getQuestions(){\n final int[] countQuestions = new int[1];\n mQuestionCountReference = FirebaseDatabase.getInstance().getReference().child(\"Questions\");\n mQuestionCountReference.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()){\n countQuestions[0] = (int) dataSnapshot.getChildrenCount();\n updateQuestion(countQuestions[0]);\n timer(30, quiz_timer);\n }else{\n quiz_question_label.setText(\"No Questions in database\");\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n\n });\n }", "public AppsCategoriesCounter getAppsCategoriesCounter(){\n AppsCategoriesCounter categoriesCounter = new AppsCategoriesCounter();\n\n categoriesCounter.setEducationalCount(getEducationalCount());\n categoriesCounter.setForFunCount(getForFunCount());\n categoriesCounter.setBlockedCount(getBlockedCount());\n\n return categoriesCounter;\n }", "public void setAnsweredQuestions() {\n\t\tFile file = new File(\"data/answered_questions\");\n\t\tif(!file.exists()) {\n\t\t\tBashCmdUtil.bashCmdNoOutput(\"touch data/answered_questions\");\n\n\t\t\tString answeredQuestions = \"\";\n\t\t\tfor (int i = 0;i<5;i++) {\n\t\t\t\tansweredQuestions = answeredQuestions + \" \" + String.valueOf(_answeredQuestions[i]);\n\t\t\t}\n\t\t\tBashCmdUtil.bashCmdNoOutput(String.format(\"echo \\\"%s\\\" >> data/answered_questions\", answeredQuestions));\n\n\t\t}\n\t\tScanner myReader;\n\t\ttry {\n\t\t\tBashCmdUtil.bashCmdNoOutput(\"touch data/answered_questions\");\n\t\t\tmyReader = new Scanner(file);\n\t\t\twhile(myReader.hasNextLine()) {\n\t\t\t\tString fileLine = myReader.nextLine();\n\t\t\t\tString[] splitFileLine = fileLine.trim().split(\" \");\n\t\t\t\tfor (int i=0; i<5; i++) {\n\t\t\t\t\t_answeredQuestions[i] = Integer.parseInt(splitFileLine[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tmyReader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "int getCategoryValue();", "int getNumberOfServeyQuestions(Survey survey);", "public void updateTotalQuestions() {\n\t\ttotalQuestionsNum.setText(Integer.toString(noOfQuestions));\n\t}", "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 void updateAnswerStatistics(int sid,int qid,int a,int b,int c,int d);", "public int getMaximumCategoryCount() { return this.maximumCategoryCount; }", "public JLabel getQuestionCounter()\n {\n return questionCounter;\n }", "public void setNbLikesQuestion(int value) {\n this.nbLikesQuestion = value;\n }", "List<Question> getQuestionsUsed();", "public int getQuestionCount() {\r\n\t\treturn this.question.size();\r\n\t}", "public String FindCategory(double index){\n \n if(index < 18.5) \n return \"undernourished.\";\n\n if(index < 25) \n return \"regular.\";\n\n if(index < 30) \n return \"overweight.\";\n \n return \"obese.\"; //Could over accumulated with overweight in Test\n\n }", "public int getAnswers() {\n return answers;\n }", "int getProblemCategory();", "public void randomizeCategory() {\n this.group = (int) (3*Math.random()+1);\n }", "public void checkAllAnswers(View view) {\n finalScore = 0;\n\n boolean answerQuestion1 = false;\n boolean check1Quest1 = checkSingleCheckBox(R.id.jupiter_checkbox_view);\n boolean check2Quest1 = checkSingleCheckBox(R.id.mars_checkbox_view);\n boolean check3Quest1 = checkSingleCheckBox(R.id.earth_checkbox_view);\n boolean check4Quest1 = checkSingleCheckBox(R.id.venus_checkbox_view);\n\n if (!check1Quest1 && !check2Quest1 && !check3Quest1 && check4Quest1) {\n finalScore = scoreCounter(finalScore);\n answerQuestion1 = true;\n }\n\n boolean answerQuestion2 = false;\n boolean check1Quest2 = checkSingleCheckBox(R.id.nasa_checkbox_view);\n boolean check2Quest2 = checkSingleCheckBox(R.id.spacex_checkbox_view);\n boolean check3Quest2 = checkSingleCheckBox(R.id.nvidia_checkbox_view);\n boolean check4Quest2 = checkSingleCheckBox(R.id.astrotech_checkbox_view);\n\n if (check1Quest2 && check2Quest2 && !check3Quest2 && check4Quest2) {\n finalScore = scoreCounter(finalScore);\n answerQuestion2 = true;\n }\n\n boolean answerQuestion3 = false;\n boolean check1Quest3 = checkSingleCheckBox(R.id.moon_checkbox_view);\n boolean check2Quest3 = checkSingleCheckBox(R.id.sun_checkbox_view);\n boolean check3Quest3 = checkSingleCheckBox(R.id.comet_checkbox_view);\n boolean check4Quest3 = checkSingleCheckBox(R.id.asteroid_checkbox_view);\n\n if (check1Quest3 && !check2Quest3 && !check3Quest3 && !check4Quest3) {\n finalScore = scoreCounter(finalScore);\n answerQuestion3 = true;\n }\n\n boolean answerQuestion4 = false;\n boolean check1Quest4 = checkSingleCheckBox(R.id.yes_checkbox_view);\n boolean check2Quest4 = checkSingleCheckBox(R.id.no_checkbox_view);\n\n if (check1Quest4 && !check2Quest4) {\n finalScore = scoreCounter(finalScore);\n answerQuestion4 = true;\n }\n\n String question1Summary = createQuestionSummary(answerQuestion1, 1, getResources().getString(R.string.venus));\n String question2Summary = createQuestionSummary(answerQuestion2, 2, getResources().getString(R.string.nasa_spacex_astrotech));\n String question3Summary = createQuestionSummary(answerQuestion3, 3, getResources().getString(R.string.moon));\n String question4Summary = createQuestionSummary(answerQuestion4, 4, getResources().getString(R.string.yes));\n\n String quizSummary = createQuizSummary(finalScore);\n\n displayQuestionSummary(question1Summary, answerQuestion1, R.id.question1_summary);\n displayQuestionSummary(question2Summary, answerQuestion2, R.id.question2_summary);\n displayQuestionSummary(question3Summary, answerQuestion3, R.id.question3_summary);\n displayQuestionSummary(question4Summary, answerQuestion4, R.id.question4_summary);\n displayQuizSummary(quizSummary);\n\n }", "int countByExample(CategoryExample example);", "private int lastCategoryIndex() {\n/* 158 */ if (this.maximumCategoryCount == 0) {\n/* 159 */ return -1;\n/* */ }\n/* 161 */ return Math.min(this.firstCategoryIndex + this.maximumCategoryCount, this.underlying\n/* 162 */ .getColumnCount()) - 1;\n/* */ }", "private void countAnswers(){\n\t\tfor(Student student: students){\n\t\t\tif(isCorrectAnswer(student.getAnswers())){\n\t\t\t\tcorrectAnswers+=1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\twrongAnswers+=1;\n\t\t\t}\n\t\t}\n\t}", "public void setAnswerCount(Integer answerCount) {\n this.answerCount = answerCount;\n }", "public void inflateQuestion(final String item){\n String query = \"SELECT * FROM '\"+item+\"' WHERE chosen_answer IS NULL \";\n Cursor cursor = db.rawQuery(query, null);\n\n //if the user answered every question in the category\n if(cursor.getCount()==0){\n\n questionTTL.setText(\"You have already answered all the questions in this category!\");\n //TODO - Music\n questionTTL.setAlpha(1);\n removeAnswers();\n\n makeConfetti();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n stopConfetti();\n }\n },2000);\n\n return;\n\n }\n\n //get a question from db - question constructor takes the first result from the cursor\n final Question question = new Question(cursor);\n\n questionTTL.setText(question.question);\n questionTTL.setScaleX(2);\n questionTTL.setScaleY(2);\n questionTTL.animate().scaleY(1).scaleX(1).alpha(1).setDuration(1000);\n\n //set color for question\n int colorIndex = topicList.indexOf(item);//get index by topic string\n question.color = colors[colorIndex];//get the color by index from colors array\n\n //display answers with adapter\n gridView.setAdapter(new AnswersAdapter(this,question));\n\n //saving the runnable in class scope to kill it if user spin the wheel again - delayed post.\n speakingRunnable = new Runnable() {\n @Override\n public void run() {\n textToSpeech.speak(question.question, TextToSpeech.QUEUE_FLUSH, null);\n }};\n\n handler.postDelayed(speakingRunnable,1600);\n\n\n //set on item click listener\n\n gridView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> adapterView, final View view, int i, long l) {\n\n //set the onclicklistener to be the view listener instead of onitemclicklisterer which comes from parent(grid) - workaround to disable clickable after answering the question\n for(int j=0;j<gridView.getChildCount();j++){\n gridView.getChildAt(j).setClickable(true);\n }\n\n //update the question with the user answer\n db.execSQL(\"UPDATE '\"+item+\"' SET chosen_answer=\"+(i+1)+\" WHERE _id=\"+question.questionID+\";\");\n\n view.getBackground().setColorFilter(question.color, PorterDuff.Mode.SRC);\n stopTTS();\n\n if(question.CheckAnswer(i)){\n\n //if answer is correct\n\n score++;\n successSound.start();\n //speak correct with flush queue in case the question is still being read\n textToSpeech.speak(\"Correct\",TextToSpeech.QUEUE_FLUSH,null);\n\n //star coming out btn effect\n new ParticleSystem(MainActivity.this, 100, R.drawable.star_icon, 1000)\n .setSpeedRange(0.2f, 0.5f)\n .oneShot(view, 50);\n\n //main star added\n final ImageView star = new ImageView(getApplicationContext());\n star.setImageResource(R.drawable.star_icon_big);\n star.setVisibility(View.GONE);\n relativeLayout.addView(star);\n\n //set star size to 1 for scaling purposes\n RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams)star.getLayoutParams();\n layoutParams.height = 1;\n layoutParams.width = 1;\n\n //set margins\n final float scale = getResources().getDisplayMetrics().density;//convert px to dp\n layoutParams.setMargins((int) (5 * scale + 0.5f),0,(int) (5 * scale + 0.5f),0);\n star.setLayoutParams(layoutParams);\n\n //position the star at the center of the wheel\n star.setY(wheelView.getY()+wheelView.getHeight()/2);\n star.setX(relativeLayout.getWidth()/2);\n star.bringToFront();\n\n //make it visible\n star.setVisibility(View.VISIBLE);\n\n //animate the star to fit wheel size\n star.animate().scaleY(wheelView.getHeight()).scaleX(wheelView.getWidth()).rotationYBy(720).setDuration(800);\n\n //animate the star to the same size and location as the star icon - where the score is written\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n\n //animate the star to fit score star icon size\n star.animate().scaleY(starIcon.getHeight()).scaleX(starIcon.getWidth()).rotationYBy(720).setDuration(300);\n\n //after 100 milliseconds move the star to the icon position\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n\n //animate transition to score star point\n star.animate().x(starIcon.getX()+starIcon.getWidth()/2)\n .y(starIcon.getY()+scoreLayout.getY()+starIcon.getHeight()/2)\n .setDuration(300);\n\n //after star merging with the star icon set the current score\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n scoreSum.setText(Integer.toString(score));\n //removing the view\n relativeLayout.removeView(star);\n }\n },300);\n }\n },100);\n\n }\n },850);\n\n\n }else{\n //if answer is incorrect\n\n //remove point from user if score greater then zero and display the current score\n if(score>0){score --;\n scoreSum.setText(Integer.toString(score));}\n\n failedSound.start();\n\n //get correct answer view\n final View correctAnswer = gridView.getChildAt(question.correctAnswer-1);\n\n //set flicker green color for the correct answer\n new CountDownTimer(14000,200){\n boolean originalColor = true;\n @Override\n public void onTick(long l) {\n if(originalColor){\n correctAnswer.getBackground().setColorFilter(Color.parseColor(\"#00cc00\"), PorterDuff.Mode.SRC);\n }else{\n correctAnswer.getBackground().setColorFilter(question.color, PorterDuff.Mode.SRC);\n }\n originalColor = !originalColor;\n }\n\n @Override\n public void onFinish() {\n\n }\n }.start();\n\n //star coming from score to wheel animation\n final ImageView star = new ImageView(getApplicationContext());\n star.setImageResource(R.drawable.star_icon_big);\n relativeLayout.addView(star);\n\n //set star size to 1 for scaling purposes\n RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams)star.getLayoutParams();\n layoutParams.height = 1;\n layoutParams.width = 1;\n\n //set margins\n final float scale = getResources().getDisplayMetrics().density;//convert px to dp\n layoutParams.setMargins((int) (5 * scale + 0.5f),0,(int) (5 * scale + 0.5f),0);\n star.setLayoutParams(layoutParams);\n\n //scale to star icon size\n star.animate().scaleY(starIcon.getHeight()).scaleX(starIcon.getWidth()).setDuration(0);\n\n //set position as star icon\n star.setX(starIcon.getX()-scoreLayout.getPaddingLeft()+starIcon.getWidth()/2);\n star.setY(starIcon.getY()+scoreLayout.getY()+starIcon.getHeight()/2);\n\n //animate star to the center of the wheel\n star.animate().x(relativeLayout.getWidth()/2)\n .y(wheelView.getY()+wheelView.getHeight()/2).setDuration(300);\n\n //at the same time animate scaling to wheel size as well\n star.animate().scaleX(wheelView.getWidth()).scaleY(wheelView.getHeight()).setDuration(300);\n\n //after animation complete - star is in the center of the wheel and with the same size\n //animate the star getting smaller into the wheel while rotating\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n star.animate().scaleX(1).scaleY(1).rotationYBy(720).setDuration(800);\n\n //after star is disappear remove from parent\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n relativeLayout.removeView(star);\n }\n },800);\n }\n }, 300);\n\n }\n\n //after each animation complete - inflate the next question\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n inflateQuestion(item);\n }\n }, 1400);\n }\n });\n\n //set touch listener in cases the user press answer and move-up with finger - to restore to view original color\n gridView.setOnTouchListener(new View.OnTouchListener() {\n @Override\n public boolean onTouch(View view, MotionEvent motionEvent) {\n\n if(motionEvent.getAction()==motionEvent.ACTION_UP){\n\n for (int i=0;i<gridView.getChildCount();i++){\n gridView.getChildAt(i).getBackground().setColorFilter(question.color, PorterDuff.Mode.SRC);\n }}\n\n return false;\n }\n });\n\n\n }", "public int getNumCategories(){\n\n return numCategories;\n }", "public void submitAnswers(View view) {\n\n // Question one\n // Get String given in the first EditText field and turn it into lower case\n EditText firstAnswerField = (EditText) findViewById(R.id.answer_one);\n Editable firstAnswerEditable = firstAnswerField.getText();\n String firstAnswer = firstAnswerEditable.toString().toLowerCase();\n\n // Check if the answer given in the first EditText field is correct and if it is, add one\n // point\n if (firstAnswer.contains(\"baltic\")) {\n points++;\n }\n\n // Question two\n // Get String given in the second EditText field and turn it into lower case\n EditText secondAnswerField = (EditText) findViewById(R.id.answer_two);\n Editable secondAnswerEditable = secondAnswerField.getText();\n String secondAnswer = secondAnswerEditable.toString().toLowerCase();\n\n // Check if the answer given in the second EditText field is correct and if it is, add one\n // point\n if (secondAnswer.contains(\"basketball\")) {\n points++;\n }\n\n // Question three\n // Check if the correct answer is given\n RadioButton thirdQuestionCorrectAnswer = (RadioButton)\n findViewById(R.id.question_3_radio_button_3);\n boolean isThirdQuestionCorrectAnswer = thirdQuestionCorrectAnswer.isChecked();\n // If the correct answer is given, add one point\n if (isThirdQuestionCorrectAnswer) {\n points++;\n }\n\n // Question four\n // Check if the correct answer is given\n RadioButton fourthQuestionCorrectAnswer = (RadioButton)\n findViewById(R.id.question_4_radio_button_2);\n boolean isFourthQuestionCorrectAnswer = fourthQuestionCorrectAnswer.isChecked();\n\n // If the correct answer is given, add one point\n if (isFourthQuestionCorrectAnswer) {\n points++;\n }\n\n // Question five\n // Find check boxes\n CheckBox fifthQuestionCheckBoxOne = (CheckBox) findViewById(R.id.question_5_check_box_1);\n\n CheckBox fifthQuestionCheckBoxTwo = (CheckBox) findViewById(R.id.question_5_check_box_2);\n\n CheckBox fifthQuestionCheckBoxThree = (CheckBox) findViewById(R.id.question_5_check_box_3);\n\n CheckBox fifthQuestionCheckBoxFour = (CheckBox) findViewById(R.id.question_5_check_box_4);\n\n // If correct answers are given, add one point,\n // if incorrect answers are given, do not add points\n\n if (fifthQuestionCheckBoxThree.isChecked() && fifthQuestionCheckBoxFour.isChecked()\n && !fifthQuestionCheckBoxOne.isChecked() && !fifthQuestionCheckBoxTwo.isChecked()){\n points++;\n }\n\n // Question six\n // Find check boxes\n CheckBox sixthQuestionCheckBoxOne = (CheckBox) findViewById(R.id.question_6_check_box_1);\n\n CheckBox sixthQuestionCheckBoxTwo = (CheckBox) findViewById(R.id.question_6_check_box_2);\n\n CheckBox sixthQuestionCheckBoxThree = (CheckBox) findViewById(R.id.question_6_check_box_3);\n\n CheckBox sixthQuestionCheckBoxFour = (CheckBox) findViewById(R.id.question_6_check_box_4);\n\n // If correct answers are given, add one point,\n // if incorrect answers are given, do not add points\n if (sixthQuestionCheckBoxOne.isChecked() && sixthQuestionCheckBoxTwo.isChecked()\n && sixthQuestionCheckBoxFour.isChecked() && !sixthQuestionCheckBoxThree.isChecked()){\n points++;\n }\n\n // If the user answers all questions correctly, show toast message with congratulations\n if (points == 6){\n Toast.makeText(this, \"Congratulations! You have earned 6 points.\" +\n \"\\n\" + \"It is the maximum number of points in this quiz.\",\n Toast.LENGTH_SHORT).show();\n }\n\n // If the user does not answer all questions correctly, show users's points, total points\n // possible and advise to check answers\n else {\n Toast.makeText(this, \"Your points: \" + points + \"\\n\" + \"Total points possible: 6\" +\n \"\\n\" + \"Check your answers or spelling again.\", Toast.LENGTH_SHORT).show();\n }\n\n // Reset points to 0\n points = 0;\n }", "private void settingQuestion() {\n\n int[] setWord = {0, 0, 0, 0, 0};\n int[] setPos = {0, 0, 0, 0};\n int[] setBtn = {0, 0, 0, 0};\n\n Random ans = new Random();\n int wordNum = ans.nextInt(vocabularyLesson.size());\n //answer = vocabularyLesson.get(wordNum).getMean();\n word = vocabularyLesson.get(wordNum).getWord();\n vocabularyID = vocabularyLesson.get(wordNum).getId();\n answer = word;\n\n Practice practice = pc.getPracticeById(vocabularyID);\n if (practice != null) {\n Log.d(\"idVocabulary\", practice.getSentence());\n question.setText(practice.getSentence());\n }\n\n\n // Random position contain answer\n setWord[wordNum] = 1;\n Random p = new Random();\n int pos = p.nextInt(4);\n if (pos == 0) {\n word1.setText(word);\n setBtn[0] = 1;\n }\n if (pos == 1) {\n word2.setText(word);\n setBtn[1] = 1;\n }\n if (pos == 2) {\n word3.setText(word);\n setBtn[2] = 1;\n }\n if (pos == 3) {\n word4.setText(word);\n setBtn[3] = 1;\n }\n setPos[pos] = 1;\n\n // Random 3 position contain 3 answer\n for (int i = 0; i < 3; i++) {\n Random ques = new Random();\n int num = ques.nextInt(5);\n int p1 = ques.nextInt(4);\n while (setWord[num] == 1 || setPos[p1] == 1) {\n num = ques.nextInt(5);\n p1 = ques.nextInt(4);\n }\n String wordIncorrect = vocabularyLesson.get(num).getWord();\n setWord[num] = 1;\n setPos[p1] = 1;\n if (setBtn[p1] == 0 && p1 == 0) {\n word1.setText(wordIncorrect);\n setBtn[0] = 1;\n }\n if (setBtn[p1] == 0 && p1 == 1) {\n word2.setText(wordIncorrect);\n setBtn[1] = 1;\n }\n if (setBtn[p1] == 0 && p1 == 2) {\n word3.setText(wordIncorrect);\n setBtn[2] = 1;\n }\n if (setBtn[p1] == 0 && p1 == 3) {\n word4.setText(wordIncorrect);\n setBtn[3] = 1;\n }\n }\n\n }", "public void finishQuiz(View view){\n if(((RadioButton) findViewById(R.id.radio_new_york_city)).isChecked()) {\n score++;\n }\n\n //Anser for question 2\n if(((RadioButton) findViewById(R.id.radio_food_cart)).isChecked()) score++;\n\n //Anser for question 3\n if(((CheckBox) findViewById(R.id.check_chicken)).isChecked()\n && ((CheckBox) findViewById(R.id.check_gyro)).isChecked()\n && !((CheckBox) findViewById(R.id.check_pork)).isChecked()) score++;\n\n //Anser for question 4\n String answer4 = ((EditText) findViewById(R.id.edit_bread)).getText().toString().toLowerCase();\n if(answer4.equals(\"pita\")) score++;\n\n //Anser for question 5\n if(((CheckBox) findViewById(R.id.check_red)).isChecked()\n && ((CheckBox) findViewById(R.id.check_yellow)).isChecked()\n && !((CheckBox) findViewById(R.id.check_white)).isChecked()) score++;\n\n\n //Anser for question 6\n if(((RadioButton) findViewById(R.id.radio_large)).isChecked()) score++;\n\n //Display the Toast\n Context context = getApplicationContext();\n\n CharSequence text;\n if(score == 6) {\n text = \"Congrats! Your Score was \" + score + \" out of 6!\";\n } else {\n text = \"You only have \" + score + \" out of 6! Try again!\";\n }\n int duration = Toast.LENGTH_LONG;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n\n //Resest score to 0\n\n score = 0;\n }", "long countByExample(QuestionExample example);", "long countByExample(QuestionExample example);", "public void chooseAnswer(View view)\n {\n\n if(view.getTag().toString().equals(Integer.toString(pos_of_correct)))\n {\n //Log.i(\"Result\",\"Correct Answer\");\n correct++;\n noOfQues++;\n correct();\n }\n else\n {\n //Log.i(\"Result\",\"Incorrect Answer\");\n //resluttextview.setText(\"Incorrect!\");\n incorrect();\n noOfQues++;\n }\n pointtextView.setText(Integer.toString(correct)+\"/\"+Integer.toString(noOfQues));\n if(tag==4)\n generateAdditionQuestion();\n if(tag==5)\n generateSubtractionQuestion();\n if(tag==6)\n generateMultiplicationQuestion();\n if(tag==7)\n generateDivisionQuestion();\n\n }", "public void countScore(TechnicalTest technicalTest)\n {\n long maxScore=0;\n long score=0;\n\n String scoreEachAnswer = \"\";\n List<Problem> problems = technicalTest.getProblems();\n\n String applicantAnswer = technicalTest.getApplicantAnswer();\n\n List<String> answerList = helper.parseAnswer(applicantAnswer);\n\n for(int i=0; i<problems.size();i++){\n long tmpScore;\n maxScore = maxScore + problems.get(i).getMaxScore();\n if(problems.get(i) instanceof MultipleChoices){\n tmpScore = getScoreMultipleChoices((MultipleChoices) problems.get(i), answerList.get(i));\n score = score + tmpScore;\n if(i!=problems.size()-1)\n scoreEachAnswer = scoreEachAnswer + String.valueOf(tmpScore) + \"|\";\n else scoreEachAnswer = scoreEachAnswer + String.valueOf(tmpScore);\n }\n else if(problems.get(i) instanceof ProblemGenerator){\n tmpScore = getScoreMultipleChoices((MultipleChoices) problems.get(i), answerList.get(i));\n score = score + tmpScore;\n if(i!=problems.size()-1)\n scoreEachAnswer = scoreEachAnswer + String.valueOf(tmpScore) + \"|\";\n else scoreEachAnswer = scoreEachAnswer + String.valueOf(tmpScore);\n }\n else{\n tmpScore = getScoreEssay((Essay) problems.get(i), answerList.get(i));\n score = score + tmpScore;\n if(i!=problems.size()-1)\n scoreEachAnswer = scoreEachAnswer + String.valueOf(tmpScore) + \"|\";\n else scoreEachAnswer = scoreEachAnswer + String.valueOf(tmpScore);\n }\n\n }\n\n long persen = score*100/maxScore;\n\n technicalTest.setScore(persen);\n technicalTest.setScoreEachAnswer(scoreEachAnswer);\n\n technicalTestRepository.save(technicalTest);\n\n }", "public int getNumQuestions() {\n\t\treturn noOfQuestions;\n\t}", "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 }", "private void setQuestionView()\n\t{\n txtQNumber.setText(qid + 1 + \"/\" + numberOfQuestions);\n\t\ttxtQuestion.setText(currentQ.getQUESTION());\n\t\ttxtReference.setText(currentQ.getREFERENCE());\n\t\trda.setText(currentQ.getOPTA());\n\t\trdb.setText(currentQ.getOPTB());\n\t\trdc.setText(currentQ.getOPTC());\n\t\trdd.setText(currentQ.getOPTD());\n\t\tqid++;\n\t}", "public void setAnswers(int answers) {\n this.answers = answers;\n }", "int getVotes(QuestionId questionId);", "public void setQuestion(){\n\n\n triggerReport(); //Check if max questions are displayed, if yes then show report\n\n MyDatabase db = new MyDatabase(QuizCorner.this);\n Cursor words = db.getQuizQuestion();\n TextView question_text = (TextView) findViewById(R.id.question_text);\n RadioButton rb;\n resetOptions();\n disableCheck();\n enableRadioButtons();\n hideAnswer();\n words.moveToFirst();\n word = words.getString(words.getColumnIndex(\"word\"));\n correct_answer = words.getString(words.getColumnIndex(\"meaning\"));\n question_text.setText(word + \" means:\");\n for (int i = 0; i < 4; i++){\n answers[i] = words.getString(words.getColumnIndex(\"meaning\"));\n words.moveToNext();\n }\n answers = randomizeArray(answers);\n for (int i = 0; i < 4; i++){\n rb = (RadioButton) findViewById(options[i]);\n rb.setText(answers[i]);\n }\n question_displayed_count++;\n }", "public void createAnswerStatistics(int sid,int qid);", "int countByExample(CommonQuestionStrategyTypeExample example);", "private void setquestion() {\n qinit();\n question_count++;\n\n if (modeflag == 3) {\n modetag = (int) (Math.random() * 3);\n } else {\n modetag = modeflag;\n }\n\n WordingIO trueword = new WordingIO(vocabulary);\n\n if (modetag == 0) {\n\n MCmode(trueword);\n }\n\n if (modetag == 1) {\n BFmode(trueword);\n }\n\n if (modetag == 2) {\n TLmode(trueword);\n }\n\n if (time_limit != 0) {\n timingtoanswer(time_limit, jLabel2, answer_temp, jLabel5, jLabel6, jButton1);\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 }", "public int numberOfQuestions() {\n\t\treturn getQuestions().size();\n\t}", "public void submitAnswers(View view) {\n\n int points = 0;\n\n //Question 1\n RadioButton radioButton_q1 = findViewById (R.id.optionB_q1);\n boolean firstQuestionCorrect = radioButton_q1.isChecked ();\n if (firstQuestionCorrect) {\n points += 1;\n }\n //Question 2\n RadioButton radioButton_q2 = findViewById (R.id.optionC_q2);\n boolean secondQuestionCorrect = radioButton_q2.isChecked ();\n if (secondQuestionCorrect) {\n points += 1;\n }\n\n //Question 3 - in order to get a point in Question 3, three particular boxes has to be checked\n CheckBox checkAns1_q3 = findViewById (R.id.checkbox1_q3);\n boolean thirdQuestionAnswer1 = checkAns1_q3.isChecked ();\n CheckBox checkAns2_q3 = findViewById (R.id.checkbox2_q3);\n boolean thirdQuestionAnswer2 = checkAns2_q3.isChecked ();\n CheckBox checkAns3_q3 = findViewById (R.id.checkbox3_q3);\n boolean thirdQuestionAnswer3 = checkAns3_q3.isChecked ();\n CheckBox checkAns4_q3 = findViewById (R.id.checkbox4_q3);\n boolean thirdQuestionAnswer4 = checkAns4_q3.isChecked ();\n CheckBox checkAns5_q3 = findViewById (R.id.checkbox5_q3);\n boolean thirdQuestionAnswer5 = checkAns5_q3.isChecked ();\n CheckBox checkAns6_q3 = findViewById (R.id.checkbox6_q3);\n boolean thirdQuestionAnswer6 = checkAns6_q3.isChecked ();\n CheckBox checkAns7_q3 = findViewById (R.id.checkbox7_q3);\n boolean thirdQuestionAnswer7 = checkAns7_q3.isChecked ();\n if (thirdQuestionAnswer2 && thirdQuestionAnswer3 && thirdQuestionAnswer6 && !thirdQuestionAnswer1 && !thirdQuestionAnswer4 && !thirdQuestionAnswer5 && !thirdQuestionAnswer7) {\n points = points + 1;\n }\n\n //Question 4\n RadioButton radioButton_q4 = findViewById (R.id.optionC_q4);\n boolean forthQuestionCorrect = radioButton_q4.isChecked ();\n if (forthQuestionCorrect) {\n points += 1;\n }\n\n //Question 5\n EditText fifthAnswer = findViewById (R.id.q5_answer);\n String fifthAnswerText = fifthAnswer.getText ().toString ();\n if (fifthAnswerText.equals (\"\")) {\n Toast.makeText (getApplicationContext (), getString (R.string.noFifthAnswer), Toast.LENGTH_LONG).show ();\n return;\n } else if ((fifthAnswerText.equalsIgnoreCase (getString (R.string.pacific))) || (fifthAnswerText.equalsIgnoreCase (getString (R.string.pacificOcean)))) {\n points += 1;\n }\n\n //Question 6\n RadioButton radioButton_q6 = findViewById (R.id.optionA_q6);\n boolean sixthQuestionCorrect = radioButton_q6.isChecked ();\n if (sixthQuestionCorrect) {\n points += 1;\n }\n\n //Showing the result to the user\n displayScore (points);\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == questionsCode) {\n // Make sure the request was successful\n if (resultCode == RESULT_OK) {\n int score = data.getIntExtra(getString(R.string.round_score), 0);\n int categoryId = data.getIntExtra(getString(R.string.category_id),0);\n // insert score into a table\n // int score, int level, int categoryId, Date updatedAt\n viewModel.insertRank(new RankEntry(score, \"medium\", categoryId, new Date()));\n // TODO дописать ranking функционал\n // insert +\n // select\n showMsg(this, \"Score: \" + score + \"\\nCategory ID: \" + categoryId);\n Intent intent = new Intent(this, AnswersResultActivity.class);\n intent.putExtra(getString(R.string.round_score), score);\n startActivity(intent);\n }\n else if (resultCode == RESULT_CANCELED && data != null){\n Bundle bundle = data.getExtras();\n // delete empty category\n if (bundle != null && bundle.containsKey(getString(R.string.position))){\n int position = data.getIntExtra(getString(R.string.position),-1);\n if (position != -1){\n //showMsg(this,position + \"\");\n listView.removeView(position);\n }\n }\n }\n }\n }", "long countByExample(Question11Example example);", "int countByExample(QuestionExample example);", "int countByExample(QuestionExample example);", "@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n for (DataSnapshot snapshot : dataSnapshot.getChildren()) {\n test_item item = new test_item();\n item.setQuestion(snapshot.child(\"question\").getValue(String.class));\n String ans1 = snapshot.child(\"ans1\").getValue(String.class);\n String ans2 = snapshot.child(\"ans2\").getValue(String.class);\n String ans3 = snapshot.child(\"ans3\").getValue(String.class);\n ans = new ArrayList<>();\n if (ans1 != null)\n ans.add(ans1);\n if (ans2 != null)\n ans.add(ans2);\n if (ans3 != null)\n ans.add(ans3);\n item.setAns_list(ans);\n\n String catg1 = snapshot.child(\"catg1\").getValue(String.class);\n String catg2 = snapshot.child(\"catg2\").getValue(String.class);\n String catg3 = snapshot.child(\"catg3\").getValue(String.class);\n category_option = new ArrayList<>();\n if(catg1!=null)\n category_option.add(catg1);\n if(catg2!=null)\n category_option.add(catg2);\n if(catg3!=null)\n category_option.add(catg3);\n // Toast.makeText(testActivity.this, \"datasnapshot : \" + snapshot, Toast.LENGTH_SHORT).show();\n item.setcategory_option(category_option);\n // Toast.makeText(testActivity.this, \"option : \" + category_option.size(), Toast.LENGTH_SHORT).show();\n items.add(item);\n }\n testResult= new HashMap<String, Integer>();\n testResult.clear();\n selectedAnswers = new ArrayList<>();\n selectedAnswers.clear();\n for (int i = 0; i < items.size(); i++) {\n //selectedAnswers.add(\"Not Attempted\");\n }\n updateQuestion();\n next.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n if (!answerd) {\n if (op1.isChecked() || op2.isChecked() || op3.isChecked()) {\n answerd = true;\n int radioButtonID = radioGroup.getCheckedRadioButtonId();\n View radioButton = radioGroup.findViewById(radioButtonID);\n String idx = String.valueOf(radioGroup.indexOfChild(radioButton));\n //RadioButton radioButton1 = findViewById(radioGroup.getCheckedRadioButtonId());\n // Toast.makeText(testActivity.this,idx + (String)radioButton1.getText(), Toast.LENGTH_SHORT).show();\n\n selectedAnswers.add(que_no-1, idx );\n updateQuestion();\n } else {\n Toast.makeText(testActivity.this, \"Please select an option \", Toast.LENGTH_SHORT).show();\n }\n\n } else {\n if(next.getText().equals(\"Submit\"))\n {\n Toast.makeText(testActivity.this, \"Submitting test ...\"+selectedAnswers.size(), Toast.LENGTH_SHORT).show();\n\n //get category for each response\n for(int i=0;i<selectedAnswers.size();i++)\n {\n int j=0;\n //category for selected option for ith item\n String catg = items.get(i).getCatg_atIndex(Integer.valueOf(selectedAnswers.get(i)));\n\n Integer prev_count = (Integer) testResult.get(catg);\n if(prev_count==null)\n {\n prev_count = 1;\n }\n else {\n prev_count ++;\n }\n\n testResult.put(catg,prev_count);\n // Toast.makeText(testActivity.this, selectedAnswers.get(i), Toast.LENGTH_SHORT).show();\n\n }\n //sort map\n //testResult = sortByValue(testResult);\n\n /* for (Map.Entry<String,Integer> entry : testResult.entrySet()) {\n String key = entry.getKey();\n int value = entry.getValue();\n Toast.makeText(testActivity.this, key + \" \"+ value, Toast.LENGTH_SHORT).show();\n // do stuff\n }*/\n\n Intent intent = new Intent(getApplicationContext(),test_result.class);\n intent.putExtra(\"map\", (Serializable) testResult);\n startActivity(intent);\n }\n else{\n updateQuestion();\n }\n\n }\n }\n });\n\n\n\n }", "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 int getCategoryValue() {\n return category_;\n }", "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 void setTotalQuestions(int totalQuestions) {\r\n\t\tthis.totalQuestions = totalQuestions;\r\n\t}", "public void onClick(View view) {\n quesCounter++;\n if (quesCounter < 4) {\n //returning a feedback saying \"correct answer\" if the user has chosen the correct answer and\n //\"incorrect answer\" otherwise\n if (question[quesNumber].isAnsTrue()) {\n Toast.makeText(TopicQuiz.this, \"Incorrect Answer\", Toast.LENGTH_SHORT).show();\n\n\n } else {\n Toast.makeText(TopicQuiz.this, \"Correct Answer\", Toast.LENGTH_SHORT).show();\n rightQuesCounter++;\n }\n //incrementing quesNumber to move to the next question\n quesNumber++;\n questionTextView.setText(question[quesNumber].getQuesStatement());\n } else {\n if (question[quesNumber].isAnsTrue()) {\n Toast.makeText(TopicQuiz.this, \"Incorrect Answer\", Toast.LENGTH_SHORT).show();\n\n\n } else {\n Toast.makeText(TopicQuiz.this, \"Correct Answer\", Toast.LENGTH_SHORT).show();\n rightQuesCounter++;\n }\n\n //Checking to see if the rightQuesCounter worked or not\n Log.d(TAG, \"You have got \" + rightQuesCounter + \" questions right!\");\n\n //Having an intent to move to the Result screen while passing the rightQuesCounter to get the result\n Intent intent = new Intent(TopicQuiz.this, Result.class);\n intent.putExtra(\"rightQuesCounter\", rightQuesCounter);\n intent.putExtra(\"language\",topic);\n\n\n startActivity(intent);\n }\n }", "public void results(View view)\n {\n database = FirebaseDatabase.getInstance().getReference();\n database.addListenerForSingleValueEvent(new ValueEventListener()\n {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot)\n {\n int counter = 0;\n String countString;\n for (DataSnapshot child : dataSnapshot.child(\"Answers\").getChildren())\n {\n countPeople++;\n for (int i = 0; i < questArr.size(); i++)\n {\n question = questArr.get(i).getQuestion();\n answer = (String) child.child(question).getValue();\n if(!allAnswer.containsKey(answer))\n {\n counter = 0;\n counter++;\n allAnswer.put(answer, counter);\n }\n else\n {\n counter = allAnswer.get(answer);\n counter++;\n allAnswer.replace(answer, counter);\n }\n database.child(\"Statistic\").child(question).child(answer).setValue(String.valueOf(counter));\n }\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError)\n {\n }\n });\n showStat.setVisibility(View.VISIBLE);\n computeStat.setVisibility(View.GONE);\n\n }", "public void readDataFromDB(String[] selectedCategories)\n {\n\n Cursor questionRows = Splash.dbHelperClass.getRandomCategoryQuestions(selectedCategories);\n Cursor answerRows = null;\n if(questionRows.getCount()== 0)\n {\n Log.d(TAG,\"No data to show\");\n return;\n }\n\n while (questionRows.moveToNext())\n {\n Question q = new Question();\n q.setQuestionId(questionRows.getString(0));\n q.setTopic(questionRows.getString(1));\n q.setQuestionText(questionRows.getString(2));\n\n // now get the list of answers for specific id of the question...\n answerRows = Splash.dbHelperClass.getAnswersForQuestionId(q.getQuestionId());\n if(answerRows.getCount()== 0)\n {\n Log.d(TAG,\"No Answers to show\");\n }\n while(answerRows.moveToNext())\n {\n Answer a = new Answer();\n a.setAnswerId(answerRows.getInt(0));\n\n // trim the string because it contains empty stirng from the database because it can contain image\n\n String noAnswer = answerRows.getString(1).toString().trim();\n if(noAnswer.isEmpty())\n {\n\n a.setImageName(answerRows.getString(4).toString().trim());\n\n\n Log.d(TAG, \"Image Name is \" + answerRows.getString(4).toString().trim());\n }\n\n // to check if the answerText is Empty\n a.setAnswerText(noAnswer);\n\n\n\n // get the correct image\n String correctImage = answerRows.getString(5);\n\n // check for null or empty in database...\n if(correctImage != null && !\"\".equals(correctImage))\n {\n this.correctImage = correctImage.toString().trim();\n Log.d(TAG,\"Correct Image is \"+correctImage);\n }\n\n\n // set the correct answer\n if(answerRows.getString(2) != null) {\n correctAnswer = answerRows.getString(2).toString().trim();\n }\n\n // add it to the answer list\n q.getAnswerList().add(a);\n // answerList.add(a);\n }\n\n Log.d(TAG, \"Answer List Size is \" + q.getAnswerList().size());\n // set the answer List for Specific Question\n\n\n // get the question Image\n String questionImage = questionRows.getString(4);\n\n // check for null or empty in database...for question images..\n if(questionImage != null && !\"\".equals(questionImage))\n {\n this.questionImage = questionImage.toString().trim();\n Log.d(TAG,\"Question Image is \"+this.questionImage);\n }\n\n\n\n\n // q.setAnswerList(answerList);\n q.setCorrectAnswer(correctAnswer);\n q.setCorrectImage(correctImage);\n q.setQuestionImage(this.questionImage);\n\n\n Log.d(TAG, \"Answer List Size in Question class is \" + q.getAnswerList().size());\n\n\n\n\n randomCategoryQuestions.add(q);\n }\n\n try {\n // close the cursor after use\n answerRows.close();\n questionRows.close();\n }\n catch (Exception e)\n {\n Log.d(TAG,\"Exception Occured\"+e.toString());\n }\n\n\n\n\n\n\n\n }", "public void printVotingQuestions(){\n int i=0;\n System.out.println(\"Question\");\n for (Voting v:votingList) {\n System.out.println(i+\":\"+v.getQuestion());\n i++ ;\n }\n }", "public static List<Question> getAllCategoryQuestions(Category cat) {\n List<Question> questions = getQuestions(); //get all the questions\n List<Question> categoryQuestions = new ArrayList<Question>(); //make new list of questions\n for (Question q : questions) {\n if (q.getCategory().getId() == cat.getId()) {\n categoryQuestions.add(q);\n }\n }\n return categoryQuestions;\n }", "int getNewlyAvailableQuestsCount();", "long countByExample(Question27Example example);", "private void updateQuestion(){\n int question = mQuestionBank[mCurrentIndex].getmQuestion();\n mQuestionTextView.setText(question);\n }", "private int computeScore() {\n int score = 0;\n for (int i = 0; i < MainActivity.DEFAULT_SIZE; i++) {\n TextView answerView = (TextView) findViewById(MainActivity.NAME_VIEWS[i]);\n String answer = answerView.getText().toString();\n String solution = getQuizCountries().get(i).getName();\n if (answer.equals(solution)) {\n score++;\n }\n }\n return score;\n }", "public Integer getAnswerCount() {\n return answerCount;\n }", "public int getCategoryValue() {\n return category_;\n }", "@FXML\n\tprivate void nextCoachingEventHandler(ActionEvent event) {\n\t\t//Log container\n\t\tList<String> log = new ArrayList<String>();\n\t\tif (coachingExercises.size() <= 0) {\n\t\t\t// At the end of coaching period\n\t\t\tdisplayAnswers();\n\t\t\treturn;\n\t\t}\n\t\t// New random index\n\t\tint nextIndex = (coachingExercises.size() % 3 - 1);\n\t\tnextIndex = (nextIndex < 0) ? 0 : nextIndex;\n\t\t\n\t\tExercise coachingExercise = coachingExercises.remove(nextIndex);\n\t\t\n\t\tenglishWordLabel.setText(coachingExercise.getEnglish());\n\t\thungarianWordLabel.setText(coachingExercise.getHungarian());\t\n\t\t\n\t\t// Write log to the GUI\n\t\tlogList(log);\n\t}", "private void setUpQuestion() {\n if (index == questions.size()) {\n endgame();\n } else {\n currentQuestion = questions.get(index);\n\n ParseQuery<ParseObject> query = ParseQuery.getQuery(\"TestObject\");\n query.getInBackground(currentQuestion.getQuestion(), new GetCallback<ParseObject>() {\n public void done(ParseObject object, ParseException e) {\n if (e == null) {\n\n String NewQuestion = object.getString(\"question\");\n lblQuestion.setText(NewQuestion);\n expectedAnswer = object.getBoolean(\"answer\");\n imgPicture.setImageResource(currentQuestion.getPicture());\n index++;\n } else {\n }\n }\n }); // this pulls values from parse\n }\n }", "private void nextQuestion() {\n\n // increment current question index\n currentQuestionIndex++;\n\n // if the current question index is smaller than the size of the quiz list\n if (currentQuestionIndex < quizList.size()) {\n\n // clear the possible answers\n possibleAnswers.clear();\n\n // grab the definition of current question, assign the correct answer variable\n // and add it to the list of possible answers.\n definition = quizList.get(currentQuestionIndex)[0];\n correctAnswer = quizMap.get(definition);\n possibleAnswers.add(correctAnswer);\n\n // while there's less than 4 possible answers, get a random answer\n // and if it hasn't already been added, add it to the list.\n while (possibleAnswers.size() < 4) {\n String answer = quizList.get(new Random().nextInt(quizList.size() - 1))[1];\n if (!possibleAnswers.contains(answer)) {\n possibleAnswers.add(answer);\n }\n }\n\n // shuffle possible answers so they display in a random order\n Collections.shuffle(possibleAnswers);\n } else {\n // if the question index is out of bounds, set quiz as finished\n quizFinished = true;\n }\n }", "public void addQuiz(Quiz quiz){\n \t\tString id = quiz.getQuizId();\n \t\tString date = quiz.getDateCreated();\n \t\tString creatorId = quiz.getCreatorId();\n \t\tint numQuestions = quiz.getNumQuestions();\n \t\tboolean isRandom = quiz.getIsRandom();\n \t\tboolean isOnePage = quiz.getIsOnePage();\n \t\tboolean isImmediate = quiz.getIsImmediate();\n \t\tint numTimesTaken = 0;\n \t\tString imageURL = quiz.getImageURL();\n \t\tString description = quiz.getDescription();\n \t\tString query = \"INSERT INTO quizzes VALUES('\" + id + \"', '\" + date + \"', '\" + creatorId + \"', \" \n \t\t\t\t+ numQuestions + \", \" + isRandom + \", \" + isOnePage + \", \" + isImmediate + \", \" \n \t\t\t\t+ numTimesTaken + \", '\" + imageURL + \"', '\" + description + \"');\";\n \t\tsqlUpdate(query);\n \t\t\n \t\t// TODO!!!! add each question as well\n \t\tArrayList<Question> questions = quiz.getQuestions();\n \t\tfor(Question q : questions){\n \t\t\tint questionNum = q.getNumber();\n \t\t\t/*ArrayList<String> answers = q.getAnswers();\n \t\t\tfor (String a : answers){\n \t\t\t\tquery = \"INSERT INTO answers VALUES('\" + id + \"', '\" + questionNum + \"', '\" + a + \"');\";\n \t\t\t}*/\n \t\t\tif(q instanceof MultipleChoice){\n \t\t\t\tArrayList<String> answers = q.getAnswers();\n \t\t\t\tquery = \"INSERT INTO multiple_choice VALUES('\" + id + \"', '\" + questionNum + \"', '\" + q.getQuestion() + \"', '\" + answers.get(0) + \"', '\" + answers.get(1) + \"', '\" + answers.get(2) + \"', '\" + answers.get(3) + \"')\";\n \t\t\t\tsqlUpdate(query);\n \t\t\t\tquery = \"INSERT INTO answers VALUES('\" + id + \"', \" + questionNum + \", '\" + ((MultipleChoice) q).getCorrectAnswer() + \"');\";\n \t\t\t\tsqlUpdate(query);\n \t\t\t} else if(q instanceof QuestionResponse){\n \t\t\t\tquery = \"INSERT INTO question_response VALUES('\" + id + \"', '\" + questionNum + \"', '\" + q.getQuestion() + \"')\";\n \t\t\t\tsqlUpdate(query);\n \t\t\t\tArrayList<String> answers = q.getAnswers();\n \t\t\t\tfor (String a : answers){\n \t\t\t\t\tquery = \"INSERT INTO answers VALUES('\" + id + \"', '\" + questionNum + \"', '\" + a + \"');\";\n \t\t\t\t\tsqlUpdate(query);\n \t\t\t\t}\n \t\t\t} else if(q instanceof Picture){\n \t\t\t\tquery = \"INSERT INTO picture VALUES('\" + id + \"', '\" + questionNum + \"', '\" + q.getQuestion() + \"', '\" + ((Picture) q).getUrl() + \"')\";\n \t\t\t\tsqlUpdate(query);\n \t\t\t\tArrayList<String> answers = q.getAnswers();\n \t\t\t\tfor (String a : answers){\n \t\t\t\t\tquery = \"INSERT INTO answers VALUES('\" + id + \"', '\" + questionNum + \"', '\" + a + \"');\";\n \t\t\t\t\tsqlUpdate(query);\n \t\t\t\t}\n \t\t\t} else if(q instanceof FillInBlank){\n \t\t\t\tArrayList<String> questionsArray = ((FillInBlank) q).getQuestions();\n \t\t\t\tquery = \"INSERT INTO fill_in_the_blank VALUES('\" + id + \"', '\" + questionNum + \"', '\" + questionsArray.get(0) + \"', '\" + questionsArray.get(1) + \"')\";\n \t\t\t\tsqlUpdate(query);\n \t\t\t\tArrayList<String> answers = q.getAnswers();\n \t\t\t\tfor (String a : answers){\n \t\t\t\t\tquery = \"INSERT INTO answers VALUES('\" + id + \"', '\" + questionNum + \"', '\" + a + \"');\";\n \t\t\t\t\tsqlUpdate(query);\n \t\t\t\t}\n \t\t\t} \n \t\t}\n \t}", "@Test\n\tpublic void testAddQuestionToCategory() {\n\t\t// Invalid user id\n\t\texternalLogicStub.currentUserId = USER_NO_UPDATE;\n\t\ttry {\n\t\t\tquestionLogic.addQuestionToCategory( tdp.question1_location1.getId() , tdp.category1_location1.getId(), LOCATION1_ID);\n\t\t\tAssert.fail(\"Should throw SecurityException\");\n\t\t} catch (SecurityException se) {\n\t\t\tAssert.assertNotNull(se);\n\t\t} \n\t\t\n\t\t// Valid user id\n\t\texternalLogicStub.currentUserId = USER_UPDATE;\n\t\ttry {\n\t\t\tquestionLogic.addQuestionToCategory(tdp.question1_location1.getId() , tdp.category1_location1.getId(), LOCATION1_ID);\n\t\t} catch (Exception se) {\n\t\t\tAssert.fail(\"Should not throw Exception\");\n\t\t}\n\t\tAssert.assertTrue(tdp.question1_location1.getCategory().getId().equals(tdp.category1_location1.getId()));\n\t}", "@Override\n\tpublic int countExam() {\n\t\treturn 0;\n\t}", "public Integer getCollapsedAnswerCount() {\n return collapsedAnswerCount;\n }" ]
[ "0.5699168", "0.562061", "0.55509984", "0.5446959", "0.5444114", "0.541975", "0.5407134", "0.53618896", "0.5252429", "0.5213753", "0.51976115", "0.51917934", "0.51613754", "0.51497227", "0.51394534", "0.5133283", "0.51133895", "0.511271", "0.5110544", "0.51053774", "0.50948966", "0.5083975", "0.5081969", "0.5074203", "0.50737935", "0.5045794", "0.50394315", "0.5026882", "0.50199634", "0.5011842", "0.4995423", "0.4982932", "0.49787915", "0.49621412", "0.4960846", "0.4958883", "0.49381566", "0.49136737", "0.49130303", "0.49128464", "0.4909623", "0.49071118", "0.49049014", "0.49009362", "0.48817676", "0.4880677", "0.48715562", "0.48690626", "0.4866838", "0.48619664", "0.48581478", "0.48563552", "0.48545817", "0.48147747", "0.48123276", "0.48060396", "0.4793495", "0.47924066", "0.47924066", "0.47917694", "0.47875956", "0.47869277", "0.47861695", "0.47804007", "0.47788116", "0.47782958", "0.47751918", "0.47697276", "0.4764539", "0.47627053", "0.4757097", "0.4754534", "0.47475055", "0.47467673", "0.47464767", "0.4745687", "0.4745687", "0.47345984", "0.47317463", "0.47123116", "0.46999872", "0.46975285", "0.46972176", "0.46968815", "0.46932137", "0.46929023", "0.46868846", "0.46747735", "0.46733302", "0.46715", "0.46671772", "0.4659421", "0.46502388", "0.46473005", "0.46387205", "0.46373856", "0.46357128", "0.46355543", "0.46325025", "0.46271324" ]
0.5951642
0
get previous scene, 1 for menu 2 for game question scene
public int getPreviousScene(){ return _previousScene; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void goBackToPreviousScene() {\n\n scenesSeen.pop();\n currentScene = scenesSeen.peek();\n\n this.window.setScene(currentScene.createAndReturnScene());\n }", "public void setPreviousScene(int scene){\n\t\t_previousScene = scene;\n\t}", "public void back()\r\n\t{\r\n\t\tparentPanel.setState(GameState.Menu);\r\n parentPanel.initScene(GameState.Menu);\r\n\t\t\t\r\n\t}", "private void previousQuestion()\r\n {\r\n Intent question = new Intent(AnswerActivity.this, QuestionActivity.class);\r\n Bundle bundle = new Bundle();\r\n bundle.putIntArray(QuestionActivity.FLASH_CARD_ARRAY, intArray);\r\n bundle.putInt(QuestionActivity.NUMBER_OF_FLASH_CARDS, numberOfFlashCards);\n bundle.putBoolean(PREVIOUS_QUESTION, true); \r\n bundle.putInt(QuestionActivity.CURRENT_INDEX, currentIndex);\r\n question.putExtras(bundle);\r\n startActivity(question);\r\n overridePendingTransition(R.anim.fade, R.anim.hold);\n finish();\r\n }", "private void backToMenu() {\n game.setScreen(new StartScreen(game));\n }", "public void onBack(ActionEvent event) {\n try {\n Parent root = FXMLLoader.load(getClass().getResource(\"/Screens/playerScreen.fxml\"));\n Stage sourceStage = (Stage) ((Node) event.getSource()).getScene().getWindow();\n Scene scene = new Scene(root);\n sourceStage.setScene(scene);\n } catch (IOException e) {\n System.out.println(\"Error loading Previous Screen\" + e.getMessage());\n }\n }", "@Override\n\tpublic Menu previousMenu() {\n\t\treturn prevMenu;\n\t}", "@Override\r\n\tpublic void onBackKeyPressed()\r\n\t{\n\t\tSceneManager.getInstance().loadMenuScene(activity.getEngine());\r\n\t}", "public void setPreviousScene(Scene scene) \n\t{\n\t\t// Note we do not create a new previous scene, because we want to save the state of the previous scene\n\t\tpreviousScene = scene;\n\t}", "private void backButtonAction() {\n CurrentUI.changeScene(SceneNames.LOGIN);\n }", "public void previous();", "public void goBack() throws IOException { DashboardController.dbc.loadHomeScene(); }", "@Override\n \tpublic void onBackKeyPressed() \n \t{\n \t\tSceneManager.getInstance().setScene(SceneManager.SceneType.SCENE_GAME);\n \t\t\n \t}", "public void returnToPrev(){\r\n Stage stage = (Stage) exitButton.getScene().getWindow();\r\n stage.close();\r\n }", "private void backToMenu()\n\t{\n\t\t//switch to menu screen\n\t\tgame.setScreen(new MenuScreen(game));\n\t}", "public void backButtonClicked(ActionEvent actionEvent) {\n Stage current = (Stage) locationName.getScene().getWindow();\n\n current.setScene(getPreviousScreen());\n }", "@FXML\n private void onBackBtn(ActionEvent event) {\n \tStage stage = (Stage) mainPane.getScene().getWindow();\n \tloadScreen(stage, \"mainmenu.fxml\");\n }", "private void backButton() {\n navigate.goPrev(this.getClass(), stage);\n }", "public void previousSlide() {\r\n\t\tpresentation.prevSlide();\r\n\t}", "@FXML\r\n public void backButton(ActionEvent event) throws IOException{//back to main menu\r\n Parent Root = FXMLLoader.load(getClass().getResource(\"MainGUIFXML.fxml\"));\r\n \r\n\r\n Scene scene = new Scene(Root);\r\n\r\n Stage AddPageStage = (Stage) ((Node) event.getSource()).getScene().getWindow();\r\n AddPageStage.setTitle(\"Main Menu\");\r\n AddPageStage.setScene(scene);\r\n AddPageStage.setResizable(false);\r\n AddPageStage.show();\r\n }", "int goBackSlide(){\n if (this.currentSlide>slides.size()){\n this.currentSlide--;\n }\n return this.currentSlide;\n }", "public void onBackPressed() {\r\n \t\r\n \tScreen screen = this.getCurrentScreen();\r\n \tString screenName = screen.getClass().getName();\r\n \t\r\n \t// if we are \"inGame\"\r\n \tif (screenName.endsWith(\"GameScreen\")) {\r\n \t\t\r\n \t\tGameScreen gameScreen = (GameScreen)screen;\r\n \t\t\r\n \t\tif (gameScreen.demoParser != null) {\r\n \t\t\t\r\n \t\t\tthis.finish();\r\n \t \tthis.overridePendingTransition(0, 0);\r\n \t\t}\r\n \t\t\r\n \t\t// restart the race\r\n \t\telse if (gameScreen.map.inRace() || gameScreen.map.raceFinished()) {\r\n \t\t\r\n \t\t\tif (!gameScreen.map.inFinishSequence) {\r\n \t\t\t\t\r\n \t\t\t\tgameScreen.state = GameState.Running;\r\n \t\t\t\tgameScreen.map.restartRace(gameScreen.player);\r\n \t\t\t}\r\n \t\t\t\r\n \t\t// return to maps menu\r\n \t\t} else {\r\n \t\t\t\r\n \t\t\tthis.glView.queueEvent(new Runnable() {\r\n \r\n public void run() {\r\n \r\n \tRacesow.this.setScreen(new MapsScreen(Racesow.this));\r\n }\r\n });\r\n \t\t}\r\n \t\r\n \t// return to main menu\r\n \t} else if (screenName.endsWith(\"MapsScreen\")) {\r\n \t\t\r\n \t\t\tthis.glView.queueEvent(new Runnable() {\r\n \r\n public void run() {\r\n \r\n \tRacesow.this.setScreen(Racesow.this.getStartScreen());\r\n }\r\n });\r\n \t\r\n \t\t// quit the application\r\n \t} else if (screenName.endsWith(\"LoadingScreen\")) {\r\n \t\t\r\n \t\t// if no demo is loading we come from the mapsScreen\r\n \t\tif (((LoadingScreen)screen).demoFile == null) {\r\n \t\t\t\r\n \t\t\t\tthis.glView.queueEvent(new Runnable() {\r\n \t\r\n \t public void run() {\r\n \t \r\n \t \tRacesow.this.setScreen(new MapsScreen(Racesow.this));\r\n \t }\r\n \t });\r\n \t\t\t\r\n \t\t\t// if a demoFile is loading, quit the activity\r\n \t\t\t// as it was started additionally to the main instance.\r\n \t\t\t// will return to the previous activity = DemoList\r\n \t\t} else {\r\n \t\t\t\t\t\r\n \t\t\tthis.finish();\r\n \tthis.overridePendingTransition(0, 0);\r\n \t\t}\r\n \t\r\n \t\t// quit the application\r\n \t} else {\r\n \t\t\r\n \t\tthis.finish();\r\n \tthis.overridePendingTransition(0, 0);\r\n \t\r\n \tAudio.getInstance().stopThread();\r\n \t\r\n \t// If I decide to not kill the process anymore, don't\r\n \t// forget to restart the SoundThread and set this flag\r\n \t// LOOPER_PREPARED = false;\r\n \tProcess.killProcess(Process.myPid());\r\n \t}\r\n }", "Object previous();", "public static void previous() {\n\t\tsendMessage(PREVIOUS_COMMAND);\n\t}", "@FXML\r\n\t\tpublic void back(ActionEvent event) {\r\n\t\t\tGuiBasedApp.launchHomeScreenScene();\r\n\t\t}", "private void previousQuestion() {\n if (mCurrentIndex > 0) {\n mCurrentIndex = (mCurrentIndex - 1) % questions.length;\n }\n else\n mCurrentIndex = questions.length - 1;\n int question = questions[mCurrentIndex].getTextResId();\n mText.setText(question);\n }", "private void previous() {\n Timeline currentTimeline = simpleExoPlayerView.getPlayer().getCurrentTimeline();\n if (currentTimeline.isEmpty()) {\n return;\n }\n int currentWindowIndex = simpleExoPlayerView.getPlayer().getCurrentWindowIndex();\n\n Timeline.Window currentWindow = currentTimeline.getWindow(currentWindowIndex, new Timeline.Window());\n if (currentWindowIndex > 0 && (player.getCurrentPosition() <= MAX_POSITION_FOR_SEEK_TO_PREVIOUS\n || (currentWindow.isDynamic && !currentWindow.isSeekable))) {\n player.seekTo(currentWindowIndex - 1, C.TIME_UNSET);\n } else {\n player.seekTo(0);\n }\n }", "public Scene getCurrentScene()\r\n\t{\r\n\t\treturn _CurrentScene;\r\n\t}", "public void goToMainScene() {\n\n scenesSeen.clear();\n this.window.setScene(firstScene.createAndReturnScene());\n scenesSeen.add(firstScene);\n }", "public void backToMainMenu() throws IOException {\n logLoadGame.log(Level.INFO, \"Switching Scene to Main Menu\");\n Parent mainMenu = FXMLLoader.load(getClass().getResource(\"/Gui_View/fxmlFiles/MainMenu.fxml\"));\n Main.primaryStage.setScene(new Scene(mainMenu));\n Main.primaryStage.show();\n }", "public Scene getSecondaryScene() {\n VBox myBox2 = new VBox(15);\r\n myBox2.setAlignment(Pos.CENTER);\r\n\r\n // Creating a button that redirects back to the first scene\r\n Button sceneButton = new Button(\"Aww, you left?! Why?? Click to go back!\");\r\n // Actually specifying what pressing the button will do\r\n sceneButton.setOnAction(e -> {\r\n Scene primaryScene = getPrimaryScene();\r\n primaryStage.setScene(primaryScene);\r\n primaryStage.show();\r\n });\r\n\r\n // Creating an Image object and an ImageViewer to hold the image\r\n Image image = new Image(\"sad.gif\", 400, 400, true, true);\r\n ImageView imView = new ImageView(image);\r\n\r\n // Adding our ImageViewer and Buttons onto the VBox\r\n myBox2.getChildren().addAll(imView, sceneButton);\r\n // Actually instantiating the scene with the VBox containing everything\r\n Scene secondaryScene = new Scene(myBox2, 450, 450);\r\n // Returning the scene\r\n return secondaryScene;\r\n }", "@Override\n\tpublic void onShow(Scene previousScene) {\n\t}", "private void backToMenu(ActionEvent actionEvent) {\n try {\n ((UserController) changeScene(\"/gui/guiuser/UserUI-ATM.fxml\")).initData(userManager);\n } catch (IOException e) {\n e.printStackTrace();\n }\n displayScene(actionEvent);\n }", "public void backToStartScene(ActionEvent event) throws IOException {\r\n Parent startView = FXMLLoader.load(Main.class.getResource(\"fxml/StartScene.fxml\"));\r\n Scene startViewScene = new Scene(startView);\r\n\r\n // This line gets the Stage information (no Stage is passed in)\r\n Stage window = (Stage) ((Node)event.getSource()).getScene().getWindow();\r\n\r\n window.setScene(startViewScene);\r\n window.show();\r\n }", "private void onBack(McPlayerInterface player, GuiSessionInterface session, ClickGuiInterface gui)\r\n {\r\n session.setNewPage(this.prevPage);\r\n }", "public void goToPreviousStagesActivity(View view)\n {\n Stage thisStage = stageHandler.getStage(1);\n if (thisStage != null)\n {\n Intent intent = new Intent(MainActivity.this, PreviousStagesActivity.class);\n startActivity(intent);\n }\n else\n {\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(MainActivity.this);\n alertDialog.setMessage(getString(R.string.noStages)).create().show();\n }\n }", "@FXML\r\n void returnToMainMenu(ActionEvent event) throws Exception {\r\n \tGeneralMethods.ChangeScene(\"MainMenu\", \"MainMenu\");\r\n }", "@FXML\n void goBack(ActionEvent event) throws IOException{\n loadMain(event, session);\n }", "public void onBackButton() {\n WindowLoader wl = new WindowLoader(backButton);\n wl.load(\"MenuScreen\", getInitData());\n RETURN_AUDIO.play(Double.parseDouble(getInitData().get(\"SFXVol\")));\n }", "@FXML\n public void goBackToMenu(ActionEvent event) throws IOException {\n// Parent createMemeParent = FXMLLoader.load(getClass().getResource(\"/ClientMenu.fxml\"));\n// Scene createMemeScene = new Scene(createMemeParent);\n//\n// Stage window = (Stage) ((javafx.scene.Node) event.getSource()).getScene().getWindow();\n// window.setScene(createMemeScene);\n// window.show();\n\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"/ClientMenu.fxml\"));\n\n Parent createMemeParent = loader.load();\n Scene createMemeScene = new Scene(createMemeParent);\n\n Stage window = (Stage) ((javafx.scene.Node) event.getSource()).getScene().getWindow();\n window.setScene(createMemeScene);\n\n ClientMenu controller = loader.<ClientMenu>getController();\n controller.initUser(user);\n window.show();\n }", "public void prev();", "public final Scene getScene(int number) {\n return scenes.get(number - 1);\n }", "private void preparePreviousScene(boolean accelerated) {\n stopAllAnimations();\n shiftActors(false);\n prepareNewActorsIfNeeded(false);\n startTransitionAnimation(R.string.next_exit_enter, mActorNext, mActorNow, accelerated);\n }", "private void restorePreviousState() {\n\n\t\tif (StoreAnalysisStateApplication.question1Answered) {\n\t\t\tfirstImageVievQuestion\n\t\t\t\t\t.setImageResource(R.drawable.swipegestureenabled);\n\t\t}\n\n\t\tif (StoreAnalysisStateApplication.question2Answered) {\n\t\t\tsecondImageVievQuestion\n\t\t\t\t\t.setImageResource(R.drawable.swipegestureenabled);\n\t\t}\n\n\t\tif (StoreAnalysisStateApplication.question3Answered) {\n\t\t\tthirdImageVievQuestion\n\t\t\t\t\t.setImageResource(R.drawable.swipegestureenabled);\n\t\t}\n\n\t\tif (StoreAnalysisStateApplication.stageCleared) {\n\t\t\tfirstImageVievDescription\n\t\t\t\t\t.setImageResource(R.drawable.swipegestureenabled);\n\t\t}\n\n\t\tif (StoreDesignStateApplication.stageCleared) {\n\t\t\tsecondImageVievDescription\n\t\t\t\t\t.setImageResource(R.drawable.voicereadingenabled);\n\t\t}\n\n\t\tif (StoreImplementationStateApplication.stageCleared) {\n\t\t\tthirdImageVievDescription\n\t\t\t\t\t.setImageResource(R.drawable.microphonenabled);\n\t\t}\n\n\t}", "@Override\n public Class<? extends Screen> getPreviousScreen(Class<? extends Screen> screen) {\n if (PreparePartyWizardGeneralOptionsScreen.class.equals(screen)\n && !Mode.ProvidedPlaylist.equals(data.get(Variable.MODE))) {\n return PreparePartyWizardActionSelectionScreen.class;\n } else if (PreparePartyWizardPathSelectionScreen.class.equals(screen)) {\n return PreparePartyWizardGeneralOptionsScreen.class;\n }\n return null;\n }", "public void popScene() {\n moduleCSM.popScene();\n }", "public static void showPreviousSelectedGameType() {\r\n\t\tGameSetup.threeHanded.setState(Main.isThreeHanded);\r\n\t\tGameSetup.fourHandedSingle.setState(Main.isFourHandedSingle);\r\n\t\tGameSetup.fourHandedTeams.setState(Main.isFourHandedTeams);\r\n\t}", "private void backRegionHandle(MouseEvent event) {\n try {\n // Change Scene\n Scene scene = stopRegion.getScene();\n FXMLLoader loader = new FXMLLoader( getClass().getResource(\"/Results.fxml\" ) );\n Pane pane = (Pane) loader.load();\n scene.setRoot(pane);\n\n // Add game to controller\n// PlayersController controller = loader.getController();\n// controller.setGame( game );\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void setNewScene() {\n switch (game.getCurrentRoomId()) {\n case 14:\n WizardOfTreldan.setFinishScene();\n break;\n\n }\n }", "public void setHomeScene(Scene scene) {\r\n scene1 = scene;\r\n }", "public void PrevGame(){\n partidaNum --;\n current = current.getAnterior();\n ListaDoble partida = (ListaDoble) current.getDato();\n currentTurn = partida.getInicio();\n String turno = (String) currentTurn.getDato();\n String info[] = turno.split(\"#\");\n\n int infoIn = 4;\n for (int i = 0; i < 10; i++, infoIn += 1) {\n label_list[i].setIcon(new ImageIcon(info[infoIn]));\n this.screen.add(label_list[i]);\n }\n HP.setText(\"HP: \"+info[2]);\n action.setText(\"Action: \"+info[1]);\n mana.setText(\"Mana: \"+info[3]);\n game.setText(\"Game \"+String.valueOf(partidaNum)+\", Turn \"+info[0]);\n\n VerifyButtons();\n\n }", "public static Result prev() {\r\n\t\tMap<String, String> requestData = Form.form().bindFromRequest().data();\r\n\t\tString idCurrentNode = requestData.get(RequestParams.CURRENT_NODE);\r\n\t\tString formName = ChangeOrderForm.NAME;\r\n\t\tString username = CMSSession.getEmployeeName();\r\n\r\n\t\tDecision previousDecision = CMSGuidedFormFill.getPreviousDecision(\r\n\t\t\t\tformName, username, idCurrentNode);\r\n\r\n\t\treturn ok(backdrop.render(previousDecision));\r\n\t}", "void actionBack();", "public void back(){\n\t\tswitch(state){\n\t\tcase LOGINID:\n\t\t\tbreak; //do nothing, already at top menu\n\t\tcase LOGINPIN:\n\t\t\tloginMenu();\n\t\t\tbreak;\n\t\tcase TRANSACTION:\n\t\t\tbreak; //do nothing, user must enter the choice to log out\n\t\tcase DEPOSIT:\n\t\t\ttransactionMenu();\n\t\t\tbreak;\n\t\tcase DEPOSITNOTIFICATION:\n\t\t\tbreak; //do nothing, user must press ok\n\t\tcase WITHDRAW:\n\t\t\ttransactionMenu();\n\t\t\tbreak;\n\t\tcase BALANCE:\n\t\t\tbreak; //do nothing, user must press ok\n\t\tcase WITHDRAWALNOTIFICATION:\n\t\t\tbreak; //do onthing, user must press ok\n\t\t}\n\t\t\n\t\tcurrentInput = \"\";\n\t}", "public static void showPreviousSounds() {\r\n\t\tIniSetup.locStart.select(Main.soundGameStart);\r\n\t\tIniSetup.locBags.select(Main.soundBags);\r\n\t\tIniSetup.locSet.select(Main.soundSet);\r\n\t\tIniSetup.locWin.select(Main.soundWin);\r\n\t\tIniSetup.locLose.select(Main.soundLose);\r\n\t}", "@Override\n\tpublic void goToBack() {\n\t\tif(uiHomePrestamo!=null){\n\t\tuiHomePrestamo.getHeader().getLblTitulo().setText(constants.prestamos());\n\t\tuiHomePrestamo.getHeader().setVisibleBtnMenu(true);\n\t\tuiHomePrestamo.getContainer().showWidget(1);\n\t\t}else if(uiHomeCobrador!=null){\t\t\t\t\t\t\t\t\t\t\t\n\t\t\tuiHomeCobrador.getContainer().showWidget(2);\n\t\t\tuiHomeCobrador.getUiClienteImpl().cargarClientesAsignados();\n\t\t\tuiHomeCobrador.getUiClienteImpl().reloadTitleCobrador();\n\t\t}\n\t}", "public void backToMenu() {\n\t\tcurrentGameGraphics.setVisible(false);\n\t\tcurrentGameGraphics = null;\n\t\tgameScreen.setVisible(true);\n\t}", "static void goback() \r\n\t {\n\t\t\t System.out.println(\"Do you want to conytinue Press - yes and for exit press - No\" );\r\n\t\t\t Scanner sc = new Scanner(System.in);\r\n\t\t\t n = sc.next();\r\n \t\t if(n.equalsIgnoreCase(\"yes\"))\r\n\t\t\t {\r\n\t\t\t\t MainMenu();\r\n\t\t\t }\r\n\t\t\t if(n.equalsIgnoreCase(\"No\"))\r\n\t\t\t {\r\n\t\t\t\t exit();\r\n\t\t\t }\r\n\t\t\t else \r\n\t\t\t {\r\n\t\t\t\t System.out.println(\"please enter a valid input 0 or 1 ! \");\r\n\t\t\t\t goback();\r\n\t\t\t }\r\n\t\t\r\n\t }", "public static void showPreviousSelectedSkin() {\r\n\t\tGameOptions.iowaState.setState(Main.skinIsIowaState);\r\n\t\tGameOptions.iowa.setState(Main.skinIsIowa);\r\n\t\tGameOptions.northernIowa.setState(Main.skinIsNorthernIowa);\r\n\t}", "private JMenuItem getMniBack() {\r\n\t\tif (mniBack == null) {\r\n\t\t\tmniBack = new JMenuItem();\r\n\t\t\tmniBack.setText(\"Back\");\r\n\t\t\tmniBack.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\tbtnBack.doClick();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn mniBack;\r\n\t}", "@Nullable\n WizardPage flipToPrevious();", "public void backButtonClicked()\r\n {\n manager = sond.getManager();\r\n AnimatorThread animThread = model.getThread();\r\n\r\n if (button.getPlay() && animThread != null && animThread.isAlive())\r\n {\r\n if (!animThread.getWait())\r\n {\r\n animThread.interrupt();\r\n }\r\n else\r\n {\r\n animThread.wake();\r\n }\r\n }\r\n else if (manager.canUndo())\r\n {\r\n manager.undo();\r\n }\r\n }", "public static Scene getCurrent() {\n//\t\tBugger.log(\"Get current scene...\");\n\t\tif (_current != null)\n\t\t\treturn _current;\n\t\telse\n\t\t\t_current = new Scene();\n\t\treturn _current;\n\t}", "@Override\n public Menu getPreviousMenu() {\n return new GrantDurationMenu(this.getPlayer(), this.target, rank);\n }", "public WorldScene lastScene(String msg) {\r\n WorldScene scene = this.getEmptyScene();\r\n //make the image to draw \\/ \\/\r\n\r\n WorldImage cell = new EmptyImage();\r\n\r\n if (msg.equals(\"win\")) {\r\n cell = this.drawWin();\r\n }\r\n else {\r\n cell = this.drawLose();\r\n }\r\n\r\n //place the image on the scene \\/ \\/\r\n scene.placeImageXY(cell, 100, 200);\r\n\r\n return scene;\r\n }", "public void previousBtnClicked(View v){\n\t\tresetSelection();\r\n\t\tnextQuestion(-1);\r\n\t\tshowQuesAndAnswers();\r\n\t}", "public Scene getMainMenuScene() {\n return scene;\n }", "public void switchScene(javafx.event.ActionEvent event) throws IOException {\n //clicking this button will go to main menu with all the command for the application.\n setscence(event,\"Main Menu.fxml\");\n\n\n }", "public void backToSection(){\n Intent intent = new Intent(getApplication(), QuizSectionActivity.class);\n startActivity(intent);\n }", "private void previous()\r\n {\r\n if(currentCard != 0) // if we are not at the first card\r\n {\r\n currentCard--; // make the previous card the current card\r\n \r\n // move through the cards: show the current card, hide the others\r\n for(int i = 0; i <= stack.getChildren().size()- 1; i++)\r\n {\r\n if(i == currentCard)\r\n {\r\n stack.getChildren().get(i).setVisible(true);\r\n }\r\n else\r\n {\r\n stack.getChildren().get(i).setVisible(false);\r\n }\r\n }\r\n }\r\n }", "public void goBack(ActionEvent event) {\n\t\ttry {\n\t\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"/application/walkin/BasicInfoPrompt.fxml\"));\n\t\t\tParent root = (Parent) loader.load();\n\t\t\t\n\t\t\tGenerateReportController reportVariables = loader.getController();\n\t\t\treportVariables.getReport(newReport2);\n\t\t\t\n\t\t\tStage stage = (Stage)((Node)event.getSource()).getScene().getWindow();\n\t\t\tstage.setScene(new Scene(root));\n\t\t\tstage.show();\n\t\t} \n\t\tcatch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void executeLeftGame() {\r\n //COME BACK TO THIS\r\n }", "private void navigateQuestion(boolean previous) {\n currentQuestionIndex = previous ? currentQuestionIndex - 1 : currentQuestionIndex + 1;\n if (currentQuestionIndex == 10 || currentQuestionIndex < 0) {\n currentQuestionIndex = 0;\n }\n question = questions[currentQuestionIndex];\n textView.setText(question.getStringResourceId());\n\n Log.d(TAG, \"Displaying question \" + String.valueOf(currentQuestionIndex));\n }", "public Boolean onBackPressed() {\n\t\n\tif(state==MAIN_MENU || state==RESUME){ ags.ad.pauseMusic(); return true;}\n\t\n\telse if(state==GAME_SCREEN){\n\t\tLog.d(\"GameboyActivity\",\"game screen to main menu\");\n\t\tif(ag.currenttime<1){\n\t\t\tstate=MAIN_MENU; \n\t\t\tif(ag.counter > ag.best){\n\t\t\t\tSharedPreferences.Editor editor =\n\t\t\t\t\t\tag.settings.edit(); \n\t\t\t\t editor.putInt(\"counter\", ag.counter);\n\t\t\t\t\tLog.d(\"GameboyActivity\",Integer.toString(ag.counter));\n\t\t\t\t\t\teditor.commit();\n\t\t\t\t\t\tag.best=ag.counter;\t\t\n\t\t\t\t}\n\t\t//\treinitializegame();\n\t\t}else{\n\tstate=RESUME;\n\tif(ag.counter > ag.best){\n\t\tSharedPreferences.Editor editor =\n\t\t\t\tag.settings.edit(); \n\t\t editor.putInt(\"counter\", ag.counter);\n\t\t\tLog.d(\"GameboyActivity\",Integer.toString(ag.counter));\n\t\t\t\teditor.commit();\n\t\t\t\tag.best=ag.counter;\t\t\n\t\t}\n\t \treturn false;}\n\t}else if(state==CREDITS){\n\t\t\n\tstate=ags.prev_state;\n\t \treturn false;\n\t}\n\treturn false;\n}", "@Override\npublic void onResumeScene() {\n\t\n}", "public void back() {\n //noinspection ResultOfMethodCallIgnored\n previous();\n }", "public void prevSlide() {\n\t\tif (currentSlideNumber > 0) {\n\t\t\tsetSlideNumber(currentSlideNumber - 1);\n\t }\n\t}", "public void back() {\n Views.goBack();\n }", "public IWizardPage getPreviousPage();", "public void PrevTurn(){\n currentTurn = currentTurn.getAnterior();\n String turno = (String) currentTurn.getDato();\n String info[] = turno.split(\"#\");\n\n int infoIn = 4;\n for (int i = 0; i < 10; i++, infoIn += 1) {\n label_list[i].setIcon(new ImageIcon(info[infoIn]));\n this.screen.add(label_list[i]);\n }\n HP.setText(\"HP: \"+info[2]);\n action.setText(\"Action: \"+info[1]);\n mana.setText(\"Mana: \"+info[3]);\n game.setText(\"Game \"+String.valueOf(partidaNum)+\", Turn \"+info[0]);\n\n VerifyButtons();\n\n }", "@FXML private void transitionView(ActionEvent event) {\n\t\t// id button caller\n\t\tString btn = ((Button) event.getSource()).getId();\n\t\tNavigationController.PREVIOUS = NavigationController.STARTMENU;\n\t\t// send load request\n\t\tif (btn.equals(\"newgame\"))\n\t\t\tNavigationController.loadView(NavigationController.GAMECREATION);\n\t\tif (btn.equals(\"loadgame\"))\n\t\t\tNavigationController.loadView(NavigationController.SAVELOAD);\n\n\t\t// if this spot is reached: do nothing\n\t}", "public Scene getScene(String name)\r\n\t{\r\n\t\t// Find the scene with the given name.\r\n\t\tfor (Scene scene : _Scenes)\r\n\t\t{\r\n\t\t\tif (scene.getName().equals(name)) { return scene; }\r\n\t\t}\r\n\r\n\t\t// No scene with that name was found, return null.\r\n\t\treturn null;\r\n\t}", "@FXML public void handleBackButton() {\n\t\tSystem.out.println(\"Back Button clicked\");\n\t\t\n\t\tif (sentimentRelatedFeatures.isSelected()) {\n\t\t\tFeatures.setUseSentimentFeatures(true);\n\t\t}\n\t\t\n\t\tif (punctuationFeatures.isSelected()) {\n\t\t\tFeatures.setUsePunctuationFeatures(true);\n\t\t}\n\t\t\n\t\tif (stylisticFeatures.isSelected()) {\n\t\t\tFeatures.setUseStylisticFeatures(true);\n\t\t}\n\t\t\n\t\tif (semanticFeatures.isSelected()) {\n\t\t\tFeatures.setUseSemanticFeatures(true);\n\t\t}\n\t\t\n\t\tif (unigramFeatures.isSelected()) {\n\t\t\tFeatures.setUseUnigramFeatures(true);\n\t\t}\n\t\t\n\t\tif (topWordsFeatures.isSelected()) {\n\t\t\tFeatures.setUseTopWords(true);\n\t\t}\n\t\t\n\t\tif (patternFeatures.isSelected()) {\n\t\t\tFeatures.setUsePatternFeatures(true);\n\t\t}\n\t\t\n\t\tif (previousWindow==null) {\n\t\t\ttry {\n\t\t\t\tMain.root = FXMLLoader.load(getClass().getResource(\"/windows/main/StartNewProjectWindow.fxml\"));\n\t\t\t\tMain.primaryStage.setScene(new Scene(Main.root, 800, 600));\n\t\t\t\tMain.primaryStage.show();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\t\t\tif (previousWindow.equals(Previous.startProjectWindow)) {\n\t\t\t\ttry {\n\t\t\t\t\tMain.root = FXMLLoader.load(getClass().getResource(\"/windows/main/StartNewProjectWindow.fxml\"));\n\t\t\t\t\tMain.primaryStage.setScene(new Scene(Main.root, 800, 600));\n\t\t\t\t\tMain.primaryStage.show();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t} else if (previousWindow.equals(Previous.importProjectWindow)) {\n\t\t\t\ttry {\n\t\t\t\t\tMain.root = FXMLLoader.load(getClass().getResource(\"/windows/main/OpenProjectWindow.fxml\"));\n\t\t\t\t\tMain.primaryStage.setScene(new Scene(Main.root, 800, 600));\n\t\t\t\t\tMain.primaryStage.show();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}", "public Scene retrieveScene()\n {\n return gameStage.getScene();\n }", "public void backToMain(ActionEvent event) throws IOException{\n try {\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"../view/main.fxml\"));\n root = loader.load();\n MainController controller = loader.getController();\n controller.selectTab(1);\n stage = (Stage)((Node)event.getSource()).getScene().getWindow();\n scene = new Scene(root);\n stage.setScene(scene);\n stage.show();\n } catch (IOException e) {\n showError(true, \"Can not load the protected page.\");\n }\n }", "public void Prev();", "private void navigateToPreviousSearchState() {\n Logger.logMessage(TAG, \"Current adapter in nav back is\" + currentAdapter);\n switch (currentAdapter) {\n case \"R\":\n navToPreviousRegions();\n break;\n case \"S\":\n mRecyclerView.setAdapter(regionsAdapter);\n if (currentDisplayingParentId == 0) {\n displayingNowTextView.setText(\"Regions\");\n searchBack.setVisibility(View.GONE);\n } else {\n navToPreviousRegions();\n }\n currentAdapter = \"R\";\n break;\n }\n }", "public String getParentMenu();", "boolean previousStep();", "public void returnToMenu(){\n client.moveToState(ClientState.WELCOME_SCREEN);\n }", "public void previousQuestion(View view) {\n if (sequence > 1) {\n saveProgress();\n sequence--;\n if (sequence <=1){\n Button button = (Button) findViewById(R.id.question_button_previous);\n button.setEnabled(false);\n }\n updateView();\n }\n }", "public static Scene getScene() {\n\t\treturn gameThree;\n\t}", "public void back()\n {\n if(!moveRooms.empty()){\n currentRoom = moveRooms.pop();\n look();\n } \n }", "@FXML\r\n void returnToNoteMenu(ActionEvent event) throws Exception {\r\n \tGeneralMethods.ChangeScene(\"NotesMenu\", \"NotesMenu\");\r\n }", "public String returnToPreviousPage() {\n if (datasetVersion.isDraft()) {\n return \"/dataset.xhtml?persistentId=\" +\n datasetVersion.getDataset().getGlobalId().asString() + \"&version=DRAFT&faces-redirect=true\";\n }\n return \"/dataset.xhtml?persistentId=\"\n + datasetVersion.getDataset().getGlobalId().asString()\n + \"&faces-redirect=true&version=\"\n + datasetVersion.getVersionNumber() + \".\" + datasetVersion.getMinorVersionNumber();\n }", "@Override\r\n\tpublic void onBackPressed() {\n\t\tgame.getController().undoLastMove();\r\n\t}", "private Scene takeResponse()\n {\n System.out.println(\"Enter the number which corresponds to the option you would like to choose\");\n System.out.print(\"> \");\n\n int choice = in.nextInt();\n\n if(isValidOption(choice, options.length)){\n return options[choice - 1].getNextScene();\n }else{\n return null;\n }\n }", "public static Previous getPreviousWindow() {\n\t\treturn previousWindow;\n\t}", "public void previousSolution() {\r\n\t\tif (solutionIndex > 0) {\r\n\t\t\tsolutionIndex--;\r\n\t\t\tcreateObjectDiagram(solutions.get(solutionIndex));\r\n\t\t} else {\r\n\t\t\tLOG.info(LogMessages.pagingFirst);\r\n\t\t}\r\n\t}", "public SwerveMode previousMode() {\n return values()[(this.ordinal() + values().length - 1) % values().length];\n }" ]
[ "0.73588", "0.7206476", "0.7073632", "0.6694251", "0.66812074", "0.66630125", "0.66342103", "0.66275877", "0.65852576", "0.65045434", "0.6481261", "0.6456303", "0.64368045", "0.6395778", "0.6363715", "0.6314192", "0.6263701", "0.6196882", "0.61953175", "0.61502695", "0.614372", "0.6141534", "0.6094969", "0.6079417", "0.6075384", "0.6071938", "0.6063311", "0.6055688", "0.6052292", "0.6021352", "0.60130274", "0.5992784", "0.59831715", "0.59759194", "0.5957072", "0.5956268", "0.59451914", "0.5940265", "0.59395427", "0.59241307", "0.5918857", "0.5910715", "0.5905519", "0.5900814", "0.5881572", "0.5879789", "0.5878122", "0.58659476", "0.58613133", "0.5855725", "0.58476543", "0.58316445", "0.5818932", "0.57962483", "0.57936615", "0.5789676", "0.5774592", "0.5772032", "0.57694924", "0.57542354", "0.5752424", "0.575187", "0.57459414", "0.5733729", "0.5733171", "0.5731001", "0.57275134", "0.5725518", "0.5720183", "0.57106805", "0.57102174", "0.57044363", "0.56911784", "0.56872964", "0.56850696", "0.56738955", "0.567318", "0.5662959", "0.5656355", "0.5655054", "0.56410587", "0.56387556", "0.56279373", "0.56249124", "0.5620109", "0.5611815", "0.56099796", "0.5607804", "0.55974096", "0.5578239", "0.55676275", "0.5561516", "0.55558956", "0.555426", "0.55536747", "0.55474794", "0.55329955", "0.5530124", "0.55233824", "0.5520369" ]
0.73884827
0
set previous scene, 1 for menu 2 for game question scene
public void setPreviousScene(int scene){ _previousScene = scene; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void back()\r\n\t{\r\n\t\tparentPanel.setState(GameState.Menu);\r\n parentPanel.initScene(GameState.Menu);\r\n\t\t\t\r\n\t}", "public void setPreviousScene(Scene scene) \n\t{\n\t\t// Note we do not create a new previous scene, because we want to save the state of the previous scene\n\t\tpreviousScene = scene;\n\t}", "private void backToMenu() {\n game.setScreen(new StartScreen(game));\n }", "public void goBackToPreviousScene() {\n\n scenesSeen.pop();\n currentScene = scenesSeen.peek();\n\n this.window.setScene(currentScene.createAndReturnScene());\n }", "public void setNewScene() {\n switch (game.getCurrentRoomId()) {\n case 14:\n WizardOfTreldan.setFinishScene();\n break;\n\n }\n }", "private void backButtonAction() {\n CurrentUI.changeScene(SceneNames.LOGIN);\n }", "private void backToMenu()\n\t{\n\t\t//switch to menu screen\n\t\tgame.setScreen(new MenuScreen(game));\n\t}", "public void setHomeScene(Scene scene) {\r\n scene1 = scene;\r\n }", "@Override\n \tpublic void onBackKeyPressed() \n \t{\n \t\tSceneManager.getInstance().setScene(SceneManager.SceneType.SCENE_GAME);\n \t\t\n \t}", "public void setCurrentScene(String name)\r\n\t{\r\n\t\t// Get the scene with the given name.\r\n\t\tScene scene = getScene(name);\r\n\r\n\t\t// Switch scenes, but only if the new scene is not null.\r\n\t\tsetCurrentScene(scene != null ? scene : _CurrentScene);\r\n\t}", "public void goToMainScene() {\n\n scenesSeen.clear();\n this.window.setScene(firstScene.createAndReturnScene());\n scenesSeen.add(firstScene);\n }", "public void backToMainMenu() throws IOException {\n logLoadGame.log(Level.INFO, \"Switching Scene to Main Menu\");\n Parent mainMenu = FXMLLoader.load(getClass().getResource(\"/Gui_View/fxmlFiles/MainMenu.fxml\"));\n Main.primaryStage.setScene(new Scene(mainMenu));\n Main.primaryStage.show();\n }", "@FXML\r\n void returnToMainMenu(ActionEvent event) throws Exception {\r\n \tGeneralMethods.ChangeScene(\"MainMenu\", \"MainMenu\");\r\n }", "public void switchScene(javafx.event.ActionEvent event) throws IOException {\n //clicking this button will go to main menu with all the command for the application.\n setscence(event,\"Main Menu.fxml\");\n\n\n }", "@Override\r\n\tpublic void onBackKeyPressed()\r\n\t{\n\t\tSceneManager.getInstance().loadMenuScene(activity.getEngine());\r\n\t}", "private void changeScene(String scene){\n switch (scene) {\n case \"Passwords\" -> {\n this.addNewScene.setVisible(false);\n this.generateScene.setVisible(false);\n this.passwordsScene.setVisible(true);\n }\n case \"Add New\" -> {\n this.generateScene.setVisible(false);\n this.passwordsScene.setVisible(false);\n this.addNewScene.setVisible(true);\n }\n case \"Generate\" -> {\n this.generateScene.setVisible(true);\n this.passwordsScene.setVisible(false);\n this.addNewScene.setVisible(true);\n }\n }\n }", "public void backToMenu() {\n\t\tcurrentGameGraphics.setVisible(false);\n\t\tcurrentGameGraphics = null;\n\t\tgameScreen.setVisible(true);\n\t}", "private void previousQuestion()\r\n {\r\n Intent question = new Intent(AnswerActivity.this, QuestionActivity.class);\r\n Bundle bundle = new Bundle();\r\n bundle.putIntArray(QuestionActivity.FLASH_CARD_ARRAY, intArray);\r\n bundle.putInt(QuestionActivity.NUMBER_OF_FLASH_CARDS, numberOfFlashCards);\n bundle.putBoolean(PREVIOUS_QUESTION, true); \r\n bundle.putInt(QuestionActivity.CURRENT_INDEX, currentIndex);\r\n question.putExtras(bundle);\r\n startActivity(question);\r\n overridePendingTransition(R.anim.fade, R.anim.hold);\n finish();\r\n }", "@Override\n\tpublic void onShow(Scene previousScene) {\n\t}", "public void onBack(ActionEvent event) {\n try {\n Parent root = FXMLLoader.load(getClass().getResource(\"/Screens/playerScreen.fxml\"));\n Stage sourceStage = (Stage) ((Node) event.getSource()).getScene().getWindow();\n Scene scene = new Scene(root);\n sourceStage.setScene(scene);\n } catch (IOException e) {\n System.out.println(\"Error loading Previous Screen\" + e.getMessage());\n }\n }", "public void setCurrentScene(int index)\r\n\t{\r\n\t\tsetCurrentScene(_Scenes.get(index));\r\n\t}", "private void backToMenu(ActionEvent actionEvent) {\n try {\n ((UserController) changeScene(\"/gui/guiuser/UserUI-ATM.fxml\")).initData(userManager);\n } catch (IOException e) {\n e.printStackTrace();\n }\n displayScene(actionEvent);\n }", "public void backButtonClicked(ActionEvent actionEvent) {\n Stage current = (Stage) locationName.getScene().getWindow();\n\n current.setScene(getPreviousScreen());\n }", "@FXML\r\n\t\tpublic void back(ActionEvent event) {\r\n\t\t\tGuiBasedApp.launchHomeScreenScene();\r\n\t\t}", "public void setCurrentScene(Scene scene)\r\n\t{\r\n\t\t// If the scene has not been added yet, do so.\r\n\t\tif (!_Scenes.contains(scene))\r\n\t\t{\r\n\t\t\taddScene(scene);\r\n\t\t}\r\n\r\n\t\t// Switch to the scene.\r\n\t\t_CurrentScene = scene;\r\n\t\tDebugManager.getInstance().setPhysicsSimulator(_CurrentScene.getPhysicsSimulator());\r\n\t}", "public void switchScene(IsScene newScene) {\n\n window.setScene(newScene.createAndReturnScene());\n scenesSeen.push(newScene);\n currentScene = newScene;\n }", "@FXML\r\n public void backButton(ActionEvent event) throws IOException{//back to main menu\r\n Parent Root = FXMLLoader.load(getClass().getResource(\"MainGUIFXML.fxml\"));\r\n \r\n\r\n Scene scene = new Scene(Root);\r\n\r\n Stage AddPageStage = (Stage) ((Node) event.getSource()).getScene().getWindow();\r\n AddPageStage.setTitle(\"Main Menu\");\r\n AddPageStage.setScene(scene);\r\n AddPageStage.setResizable(false);\r\n AddPageStage.show();\r\n }", "public void goBack() throws IOException { DashboardController.dbc.loadHomeScene(); }", "public void returnToPrev(){\r\n Stage stage = (Stage) exitButton.getScene().getWindow();\r\n stage.close();\r\n }", "private void goToMenu() {\n game.setScreen(new MainMenuScreen(game));\n\n }", "@FXML\r\n void returnToNoteMenu(ActionEvent event) throws Exception {\r\n \tGeneralMethods.ChangeScene(\"NotesMenu\", \"NotesMenu\");\r\n }", "@FXML\n private void onBackBtn(ActionEvent event) {\n \tStage stage = (Stage) mainPane.getScene().getWindow();\n \tloadScreen(stage, \"mainmenu.fxml\");\n }", "private void preparePreviousScene(boolean accelerated) {\n stopAllAnimations();\n shiftActors(false);\n prepareNewActorsIfNeeded(false);\n startTransitionAnimation(R.string.next_exit_enter, mActorNext, mActorNow, accelerated);\n }", "private void restorePreviousState() {\n\n\t\tif (StoreAnalysisStateApplication.question1Answered) {\n\t\t\tfirstImageVievQuestion\n\t\t\t\t\t.setImageResource(R.drawable.swipegestureenabled);\n\t\t}\n\n\t\tif (StoreAnalysisStateApplication.question2Answered) {\n\t\t\tsecondImageVievQuestion\n\t\t\t\t\t.setImageResource(R.drawable.swipegestureenabled);\n\t\t}\n\n\t\tif (StoreAnalysisStateApplication.question3Answered) {\n\t\t\tthirdImageVievQuestion\n\t\t\t\t\t.setImageResource(R.drawable.swipegestureenabled);\n\t\t}\n\n\t\tif (StoreAnalysisStateApplication.stageCleared) {\n\t\t\tfirstImageVievDescription\n\t\t\t\t\t.setImageResource(R.drawable.swipegestureenabled);\n\t\t}\n\n\t\tif (StoreDesignStateApplication.stageCleared) {\n\t\t\tsecondImageVievDescription\n\t\t\t\t\t.setImageResource(R.drawable.voicereadingenabled);\n\t\t}\n\n\t\tif (StoreImplementationStateApplication.stageCleared) {\n\t\t\tthirdImageVievDescription\n\t\t\t\t\t.setImageResource(R.drawable.microphonenabled);\n\t\t}\n\n\t}", "public int getPreviousScene(){\n\t\treturn _previousScene;\n\t}", "public static void showPreviousSelectedSkin() {\r\n\t\tGameOptions.iowaState.setState(Main.skinIsIowaState);\r\n\t\tGameOptions.iowa.setState(Main.skinIsIowa);\r\n\t\tGameOptions.northernIowa.setState(Main.skinIsNorthernIowa);\r\n\t}", "public void onBackPressed() {\r\n \t\r\n \tScreen screen = this.getCurrentScreen();\r\n \tString screenName = screen.getClass().getName();\r\n \t\r\n \t// if we are \"inGame\"\r\n \tif (screenName.endsWith(\"GameScreen\")) {\r\n \t\t\r\n \t\tGameScreen gameScreen = (GameScreen)screen;\r\n \t\t\r\n \t\tif (gameScreen.demoParser != null) {\r\n \t\t\t\r\n \t\t\tthis.finish();\r\n \t \tthis.overridePendingTransition(0, 0);\r\n \t\t}\r\n \t\t\r\n \t\t// restart the race\r\n \t\telse if (gameScreen.map.inRace() || gameScreen.map.raceFinished()) {\r\n \t\t\r\n \t\t\tif (!gameScreen.map.inFinishSequence) {\r\n \t\t\t\t\r\n \t\t\t\tgameScreen.state = GameState.Running;\r\n \t\t\t\tgameScreen.map.restartRace(gameScreen.player);\r\n \t\t\t}\r\n \t\t\t\r\n \t\t// return to maps menu\r\n \t\t} else {\r\n \t\t\t\r\n \t\t\tthis.glView.queueEvent(new Runnable() {\r\n \r\n public void run() {\r\n \r\n \tRacesow.this.setScreen(new MapsScreen(Racesow.this));\r\n }\r\n });\r\n \t\t}\r\n \t\r\n \t// return to main menu\r\n \t} else if (screenName.endsWith(\"MapsScreen\")) {\r\n \t\t\r\n \t\t\tthis.glView.queueEvent(new Runnable() {\r\n \r\n public void run() {\r\n \r\n \tRacesow.this.setScreen(Racesow.this.getStartScreen());\r\n }\r\n });\r\n \t\r\n \t\t// quit the application\r\n \t} else if (screenName.endsWith(\"LoadingScreen\")) {\r\n \t\t\r\n \t\t// if no demo is loading we come from the mapsScreen\r\n \t\tif (((LoadingScreen)screen).demoFile == null) {\r\n \t\t\t\r\n \t\t\t\tthis.glView.queueEvent(new Runnable() {\r\n \t\r\n \t public void run() {\r\n \t \r\n \t \tRacesow.this.setScreen(new MapsScreen(Racesow.this));\r\n \t }\r\n \t });\r\n \t\t\t\r\n \t\t\t// if a demoFile is loading, quit the activity\r\n \t\t\t// as it was started additionally to the main instance.\r\n \t\t\t// will return to the previous activity = DemoList\r\n \t\t} else {\r\n \t\t\t\t\t\r\n \t\t\tthis.finish();\r\n \tthis.overridePendingTransition(0, 0);\r\n \t\t}\r\n \t\r\n \t\t// quit the application\r\n \t} else {\r\n \t\t\r\n \t\tthis.finish();\r\n \tthis.overridePendingTransition(0, 0);\r\n \t\r\n \tAudio.getInstance().stopThread();\r\n \t\r\n \t// If I decide to not kill the process anymore, don't\r\n \t// forget to restart the SoundThread and set this flag\r\n \t// LOOPER_PREPARED = false;\r\n \tProcess.killProcess(Process.myPid());\r\n \t}\r\n }", "public void returnToMenu(){\n client.moveToState(ClientState.WELCOME_SCREEN);\n }", "private void backButton() {\n navigate.goPrev(this.getClass(), stage);\n }", "private void goToMenu() {\n\t\tgame.setScreen(new MainMenuScreen(game));\n\n\t}", "@FXML\n public void buttonOnClick(ActionEvent event) {\n \tcurrentStage.setScene(previousScene);\n \tcurrentStage.show();\n }", "public void backToStartScene(ActionEvent event) throws IOException {\r\n Parent startView = FXMLLoader.load(Main.class.getResource(\"fxml/StartScene.fxml\"));\r\n Scene startViewScene = new Scene(startView);\r\n\r\n // This line gets the Stage information (no Stage is passed in)\r\n Stage window = (Stage) ((Node)event.getSource()).getScene().getWindow();\r\n\r\n window.setScene(startViewScene);\r\n window.show();\r\n }", "void chang_scene_method(String FXML_Name) {\n try {\n AnchorPane pane = FXMLLoader.load(getClass().getResource(FXML_Name));\n anchorPane.getChildren().setAll(pane);\n } catch (IOException e) {\n JOptionPane.showMessageDialog(null, \"Error: \" + e);\n }\n }", "protected void displayInitialScene() {\n stageManager.switchScene(FxmlView.SPLASH, StageStyle.UNDECORATED);\n }", "@Override\npublic void onResumeScene() {\n\t\n}", "public static void showPreviousSelectedGameType() {\r\n\t\tGameSetup.threeHanded.setState(Main.isThreeHanded);\r\n\t\tGameSetup.fourHandedSingle.setState(Main.isFourHandedSingle);\r\n\t\tGameSetup.fourHandedTeams.setState(Main.isFourHandedTeams);\r\n\t}", "@FXML\n public void goBackToMenu(ActionEvent event) throws IOException {\n// Parent createMemeParent = FXMLLoader.load(getClass().getResource(\"/ClientMenu.fxml\"));\n// Scene createMemeScene = new Scene(createMemeParent);\n//\n// Stage window = (Stage) ((javafx.scene.Node) event.getSource()).getScene().getWindow();\n// window.setScene(createMemeScene);\n// window.show();\n\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"/ClientMenu.fxml\"));\n\n Parent createMemeParent = loader.load();\n Scene createMemeScene = new Scene(createMemeParent);\n\n Stage window = (Stage) ((javafx.scene.Node) event.getSource()).getScene().getWindow();\n window.setScene(createMemeScene);\n\n ClientMenu controller = loader.<ClientMenu>getController();\n controller.initUser(user);\n window.show();\n }", "public void previousSlide() {\r\n\t\tpresentation.prevSlide();\r\n\t}", "private void backRegionHandle(MouseEvent event) {\n try {\n // Change Scene\n Scene scene = stopRegion.getScene();\n FXMLLoader loader = new FXMLLoader( getClass().getResource(\"/Results.fxml\" ) );\n Pane pane = (Pane) loader.load();\n scene.setRoot(pane);\n\n // Add game to controller\n// PlayersController controller = loader.getController();\n// controller.setGame( game );\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void createMenuChildScene() {\n\t\tmenuChildScene = new MenuScene(camera);\n\t\tmenuChildScene.setPosition(0, 0);\n\n\t\tfinal IMenuItem profile02MenuItem = new ScaleMenuItemDecorator(\n\t\t\t\tnew SpriteMenuItem(MENU_PROFILE02,\n\t\t\t\t\t\tresourcesManager.btProfile02TR, vbom), 1f, .8f);\n\t\tfinal IMenuItem profile24MenuItem = new ScaleMenuItemDecorator(\n\t\t\t\tnew SpriteMenuItem(MENU_PROFILE24,\n\t\t\t\t\t\tresourcesManager.btProfile24TR, vbom), 1f, .8f);\n\t\tfinal IMenuItem profile4MenuItem = new ScaleMenuItemDecorator(\n\t\t\t\tnew SpriteMenuItem(MENU_PROFILE4,\n\t\t\t\t\t\tresourcesManager.btProfile4TR, vbom), 1f, .8f);\n\n\t\tmenuChildScene.addMenuItem(profile02MenuItem);\n\t\tmenuChildScene.addMenuItem(profile24MenuItem);\n\t\tmenuChildScene.addMenuItem(profile4MenuItem);\n\n\t\tmenuChildScene.buildAnimations();\n\t\tmenuChildScene.setBackgroundEnabled(false);\n\n\t\tprofile02MenuItem.setPosition(150, 280);\n\t\tprofile24MenuItem.setPosition(400, 280);\n\t\tprofile4MenuItem.setPosition(650, 280);\n\n\t\tmenuChildScene.setOnMenuItemClickListener(this);\n\t\t\n\t\t//-- change language button -----------------------------------------------------------------------------\n\t\t\n\t\tchangLang = new TiledSprite(400,60, resourcesManager.btLangTR, vbom){\n\t\t\t\t\n\t\t\t@Override\n\t\t\tpublic boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n\t\t\tswitch(pSceneTouchEvent.getAction()){\n\t\t\tcase TouchEvent.ACTION_DOWN:\n\t\t\t\tbreak;\n\t\t\tcase TouchEvent.ACTION_UP:\n\t\t\t\tplaySelectSound();\n\t\t\t\tif(localLanguage==0){\n\t\t\t\t\tchangeLanguage(\"UK\");\n\t\t\t\t\tthis.setCurrentTileIndex(1);\n\t\t\t\t\tlocalLanguage=1;\n\t\t\t\t}else if (localLanguage==1) {\n\t\t\t\t\tchangeLanguage(\"FR\");\n\t\t\t\t\tthis.setCurrentTileIndex(0);\n\t\t\t\t\tlocalLanguage=0;\n\t\t\t\t}\n\t\t\t\tupdateTexts();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\t\n\t\tif(localLanguage==0){\t\t\t\n\t\t\tchangLang.setCurrentTileIndex(0);\n\t\t}else{\t\t\n\t\t\tchangLang.setCurrentTileIndex(1);\n\t\t}\n\t\t\n\t\tthis.attachChild(changLang);\n\t\tthis.registerTouchArea(changLang);\n\t\t//-----------------------------------------------------------------------------------------------------\n\n\n\t\tsetChildScene(menuChildScene);\n\t}", "private void changeSceneTo(Parent node) {\n\t\tfinal Scene scene = new Scene(node);\n\t\tstage.setScene(scene);\n\t}", "@FXML\n public void backPage() {\n LibrarySystem.setScene(new ReaderLogIn(readerlist, booklist));\n }", "private void previousQuestion() {\n if (mCurrentIndex > 0) {\n mCurrentIndex = (mCurrentIndex - 1) % questions.length;\n }\n else\n mCurrentIndex = questions.length - 1;\n int question = questions[mCurrentIndex].getTextResId();\n mText.setText(question);\n }", "public void popScene() {\n moduleCSM.popScene();\n }", "public void setCurrentScene(Scene scene)\n\t{\n\t mCurrentScene = scene;\n\t getEngine().setScene(mCurrentScene);\n\t}", "public void returnToMenu()\n\t{\n\t\tchangePanels(menu);\n\t}", "@FXML private void transitionView(ActionEvent event) {\n\t\t// id button caller\n\t\tString btn = ((Button) event.getSource()).getId();\n\t\tNavigationController.PREVIOUS = NavigationController.STARTMENU;\n\t\t// send load request\n\t\tif (btn.equals(\"newgame\"))\n\t\t\tNavigationController.loadView(NavigationController.GAMECREATION);\n\t\tif (btn.equals(\"loadgame\"))\n\t\t\tNavigationController.loadView(NavigationController.SAVELOAD);\n\n\t\t// if this spot is reached: do nothing\n\t}", "public void backToMain(ActionEvent event) throws IOException{\n try {\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"../view/main.fxml\"));\n root = loader.load();\n MainController controller = loader.getController();\n controller.selectTab(1);\n stage = (Stage)((Node)event.getSource()).getScene().getWindow();\n scene = new Scene(root);\n stage.setScene(scene);\n stage.show();\n } catch (IOException e) {\n showError(true, \"Can not load the protected page.\");\n }\n }", "@Override\n\tpublic void goToBack() {\n\t\tif(uiHomePrestamo!=null){\n\t\tuiHomePrestamo.getHeader().getLblTitulo().setText(constants.prestamos());\n\t\tuiHomePrestamo.getHeader().setVisibleBtnMenu(true);\n\t\tuiHomePrestamo.getContainer().showWidget(1);\n\t\t}else if(uiHomeCobrador!=null){\t\t\t\t\t\t\t\t\t\t\t\n\t\t\tuiHomeCobrador.getContainer().showWidget(2);\n\t\t\tuiHomeCobrador.getUiClienteImpl().cargarClientesAsignados();\n\t\t\tuiHomeCobrador.getUiClienteImpl().reloadTitleCobrador();\n\t\t}\n\t}", "private void onBack(McPlayerInterface player, GuiSessionInterface session, ClickGuiInterface gui)\r\n {\r\n session.setNewPage(this.prevPage);\r\n }", "public void mainMenu() {\n Game.stage.setScene(mainMenuScene);\n Game.stage.show();\n }", "@Override\n public void show() {\n\n skin = new Skin(Gdx.files.internal(\"menu/menu.json\"),new TextureAtlas(\"menu/menu.pack\"));\n\n Image background = new Image(skin, \"menuscreen\");\n background.setPosition(0,0);\n stage.addActor(background);\n\n Image gameOver = new Image(skin,\"gameOver\");\n gameOver.setPosition( ( 800 - 484)/2 , (480 - 345)/2 ) ;\n stage.addActor(gameOver);\n\n Button gameOverSim = new Button(skin,\"gameOverSim\");\n gameOverSim.setPosition(265,100);\n stage.addActor(gameOverSim);\n\n Button gameOverNao = new Button(skin,\"gameOverNao\");\n gameOverNao.setPosition(425,100);\n stage.addActor(gameOverNao);\n\n gameOverSim.addListener(new ClickListener() {\n @Override\n public void clicked(InputEvent event, float x, float y) {\n // TO DO passar o level como parametro no construtor\n selecionado.play();\n ((Game) Gdx.app.getApplicationListener()).setScreen(new PlayScreen(game, level));\n dispose();\n }\n });\n\n gameOverNao.addListener(new ClickListener() {\n @Override\n public void clicked(InputEvent event, float x, float y) {\n selecionado.play();\n ((Game) Gdx.app.getApplicationListener()).setScreen(new MenuScreen(game));\n dispose();\n }\n });\n\n }", "public static void previous() {\n\t\tsendMessage(PREVIOUS_COMMAND);\n\t}", "public static void showPreviousSounds() {\r\n\t\tIniSetup.locStart.select(Main.soundGameStart);\r\n\t\tIniSetup.locBags.select(Main.soundBags);\r\n\t\tIniSetup.locSet.select(Main.soundSet);\r\n\t\tIniSetup.locWin.select(Main.soundWin);\r\n\t\tIniSetup.locLose.select(Main.soundLose);\r\n\t}", "public void setCurrentScene(Scene scene) {\n\t mCurrentScene = scene;\n\t getEngine().setScene(mCurrentScene);\n\t}", "public void playAgainEvent() {\n\n\t \tStage stage = (Stage) playAgain.getScene().getWindow();\n\t stage.close();\n\t//loads scene A again\n\ttry {\n\t\tStage stage2 = new Stage();\n\t\tFXMLLoader loader2 = new FXMLLoader(getClass().getResource(\"SceneA.fxml\"));\n\t\n\t\tParent root2 = loader2.load();\n\t\tScene sceneA = new Scene(root2);\n\t\tstage2.setTitle(\"Hangman Game\");\n\t\tstage2.setScene(sceneA);\n\t\tcontrolA control = loader2.getController();\n\t\t\n\t\t // close Scene B\n\t\tstage2.show();\n\n\t\t}catch (IOException io) {\n\t\t\tio.printStackTrace();\n\t\t}\n\t}", "public void returnToMainMenu() {\n AppStateManager stateManager = getStateManager();\n setEnabled(false);\n\n EnginePowerGraphState enginePowerGraphState\n = getState(EnginePowerGraphState.class);\n stateManager.detach(enginePowerGraphState);\n\n TireDataState tireDataState = getState(TireDataState.class);\n stateManager.detach(tireDataState);\n\n VehicleEditorState vehicleEditorState\n = getState(VehicleEditorState.class);\n stateManager.detach(vehicleEditorState);\n\n DebugTabState debugTabState = getState(DebugTabState.class);\n stateManager.detach(debugTabState);\n\n getState(DriverHud.class).setEnabled(false);\n\n Vehicle vehicle = MavDemo1.getVehicle();\n Vehicle newVehicle;\n try {\n Class<? extends Vehicle> clazz = vehicle.getClass();\n newVehicle = clazz.getDeclaredConstructor().newInstance();\n } catch (ReflectiveOperationException exception) {\n throw new RuntimeException(exception);\n }\n MavDemo1 main = MavDemo1.getApplication();\n AssetManager assetManager = main.getAssetManager();\n newVehicle.load(assetManager);\n MavDemo1.setVehicle(newVehicle);\n\n stateManager.attach(new MainMenu());\n getState(CameraInputMode.class).orbit();\n }", "@Override\n\tpublic Menu previousMenu() {\n\t\treturn prevMenu;\n\t}", "public Scene getSecondaryScene() {\n VBox myBox2 = new VBox(15);\r\n myBox2.setAlignment(Pos.CENTER);\r\n\r\n // Creating a button that redirects back to the first scene\r\n Button sceneButton = new Button(\"Aww, you left?! Why?? Click to go back!\");\r\n // Actually specifying what pressing the button will do\r\n sceneButton.setOnAction(e -> {\r\n Scene primaryScene = getPrimaryScene();\r\n primaryStage.setScene(primaryScene);\r\n primaryStage.show();\r\n });\r\n\r\n // Creating an Image object and an ImageViewer to hold the image\r\n Image image = new Image(\"sad.gif\", 400, 400, true, true);\r\n ImageView imView = new ImageView(image);\r\n\r\n // Adding our ImageViewer and Buttons onto the VBox\r\n myBox2.getChildren().addAll(imView, sceneButton);\r\n // Actually instantiating the scene with the VBox containing everything\r\n Scene secondaryScene = new Scene(myBox2, 450, 450);\r\n // Returning the scene\r\n return secondaryScene;\r\n }", "public void stateChange() {\n\t\tif (Qclicks > 3 && mini == GameState.questions) {\n\t\t\t/*\n\t\t\t * This makes all of the buttons disappear except for the continue\n\t\t\t * button\n\t\t\t */\n\t\t\tstage.clear();\n\t\t\tstage.addActor(next);\n\t\t}\n\t\tif (Gdx.input.justTouched()) {\n\t\t\tif (mini == GameState.start) {\n\t\t\t\tint x = Gdx.input.getX();\n\t\t\t\tint y = Gdx.input.getY();\n\t\t\t\tscore = 0;\n\t\t\t\tclicks = 0;\n\t\t\t\tQclicks = 0;\n\t\t\t\t// font.setScale(0.25f);\n\t\t\t\tif(x > 240 && x < 445 && y > 322 && y < 350){\n\t\t\t\t\tmini = GameState.questions;\n\t\t\t\t}\n\t\t\t} else if (mini == GameState.score) {\n\t\t\t\tint numc = (int) (percentCorrect * (numTries * 4)) + score;\n\t\t\t\tnumTries++;\n\t\t\t\tpercentCorrect = ((float) numc) / ((float) (numTries * 4));\n\t\t\t\tif (score >= 3) {\n\t\t\t\t\tnumSuccess++;\n\t\t\t\t}\n\t\t\t\tif (needToReview.size() == 0) {\n\t\t\t\t\tendGame();\n\t\t\t\t}\n\t\t\t\tmini = GameState.review;\n\t\t\t} else if (mini == GameState.review) {\n\t\t\t\treviewNum++;\n\t\t\t\tif (needToReview.size() == reviewNum) {\n\t\t\t\t\tendGame();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}", "public void setScene(final Scene newScene) {\n }", "@FXML\n void goBack(ActionEvent event) throws IOException{\n loadMain(event, session);\n }", "public void backToSection(){\n Intent intent = new Intent(getApplication(), QuizSectionActivity.class);\n startActivity(intent);\n }", "@Override\n\tpublic void start(Stage primaryStage) throws Exception {\n\t\tLabel label1 = new Label(\"Welcome to scene 1\");\n\t\tButton button1 = new Button(\"Go to scene 2\");\n\t\tbutton1.setOnAction(e -> primaryStage.setScene(scene2));\n\t\t\n\t\t// Layout for scene 1\n\t\tVBox layout1 = new VBox(20);\n\t\tlayout1.getChildren().addAll(label1, button1);\n\t\tscene1 = new Scene(layout1, 200, 200);\n\t\t\n\t\t// Content of scene 2\n\t\tButton button2 = new Button(\"Let's go back to scene 1\");\n\t\tbutton2.setOnAction(e -> primaryStage.setScene(scene1));\n\t\t\n\t\t// Layout for scene 2\n\t\tStackPane layout2 = new StackPane();\n\t\tlayout2.getChildren().add(button2);\n\t\tscene2 = new Scene(layout2, 600, 300);\n\t\t\n\t\t// Set first scene\n\t\tprimaryStage.setScene(scene1);\n\t\tprimaryStage.setTitle(\"Switching scenes\");\n\t\tprimaryStage.show();\n\t}", "@Override\n\tpublic void changePage() {\n\t\tprimaryStage.setScene(balancer);\n\t}", "public void back(){\n\t\tswitch(state){\n\t\tcase LOGINID:\n\t\t\tbreak; //do nothing, already at top menu\n\t\tcase LOGINPIN:\n\t\t\tloginMenu();\n\t\t\tbreak;\n\t\tcase TRANSACTION:\n\t\t\tbreak; //do nothing, user must enter the choice to log out\n\t\tcase DEPOSIT:\n\t\t\ttransactionMenu();\n\t\t\tbreak;\n\t\tcase DEPOSITNOTIFICATION:\n\t\t\tbreak; //do nothing, user must press ok\n\t\tcase WITHDRAW:\n\t\t\ttransactionMenu();\n\t\t\tbreak;\n\t\tcase BALANCE:\n\t\t\tbreak; //do nothing, user must press ok\n\t\tcase WITHDRAWALNOTIFICATION:\n\t\t\tbreak; //do onthing, user must press ok\n\t\t}\n\t\t\n\t\tcurrentInput = \"\";\n\t}", "private void deadSwitchToMainMenu(boolean win) {\n // TODO = reset LoopManiaWorld\n pause();\n Stage stage = new Stage();\n stage.setTitle(\"Game ended\");\n Label winLabel = new Label(\"You lose!\");\n if (win)\n winLabel = new Label(\"You win!\");\n Button restartGameButton = new Button(\"Back to Main Menu\");\n restartGameButton.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {\n public void handle(MouseEvent event) {\n stage.close();\n try {\n switchToMainMenu();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n });\n Pane canvas = new Pane();\n canvas.setPrefSize(300, 185);\n winLabel.relocate(123, 30);\n restartGameButton.relocate(80, 80);\n canvas.getChildren().addAll(winLabel, restartGameButton);\n stage.setScene(new Scene(canvas, 300, 185));\n stage.sizeToScene();\n stage.show();\n }", "public void levelThreeScreen() {\n timer.stop();\n gameModel.setState(\"Level 3\");\n currentScene = levelSetup.getLevelThree().getScene(levelThreeInitialEntrance);\n currentBoard = levelSetup.getLevelThree().getBoard();\n currentLevelScreen = levelSetup.getLevelThree();\n levelThreeInitialEntrance = (levelThreeInitialEntrance ? false : false);\n moveCharacter(mainWindow, currentScene, hero, currentBoard);\n }", "private void modeSelectionSwitchToMainMenu(){\n pause();\n Pane canvas = new Pane();\n Stage stage = new Stage();\n stage.setTitle(\"GameMode Selection\");\n Label label = new Label(\"GameMode Selection\");\n label.relocate(20, 50);\n label.setAlignment(Pos.CENTER);\n label.setPrefSize(180, 30);\n canvas.getChildren().add(label);\n Button buttonStandard = new Button(\"Standard Mode\");\n buttonStandard.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {\n public void handle(MouseEvent event) {\n world.setGameModeStandard();\n modeLabel.setText(\"Standard Mode\");\n stage.close();\n startTimer();\n }\n });\n buttonStandard.setOnMouseEntered(new EventHandler<MouseEvent>() {\n public void handle(MouseEvent event) {\n label.setText(\"Standard Experience\");\n }\n });\n buttonStandard.setOnMouseExited(new EventHandler<MouseEvent>() {\n public void handle(MouseEvent event) {\n label.setText(\"GameMode Selection\");\n }\n });\n buttonStandard.relocate(50, 100);\n buttonStandard.setPrefSize(120, 30);\n buttonStandard.alignmentProperty().set(Pos.CENTER);\n canvas.getChildren().add(buttonStandard);\n Button buttonBerserker = new Button(\"Berserker Mode\");\n buttonBerserker.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {\n public void handle(MouseEvent event) {\n world.setGameModeBerserker();\n modeLabel.setText(\"Berserker Mode\");\n stage.close();\n startTimer();\n }\n });\n buttonBerserker.setOnMouseEntered(new EventHandler<MouseEvent>() {\n public void handle(MouseEvent event) {\n label.setText(\"Not a fan of Defense\");\n }\n });\n buttonBerserker.setOnMouseExited(new EventHandler<MouseEvent>() {\n public void handle(MouseEvent event) {\n label.setText(\"GameMode Selection\");\n }\n });\n buttonBerserker.relocate(50, 150);\n buttonBerserker.setPrefSize(120, 30);\n buttonBerserker.alignmentProperty().set(Pos.CENTER);\n canvas.getChildren().add(buttonBerserker);\n Button buttonSurvival = new Button(\"Survival Mode\");\n buttonSurvival.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {\n public void handle(MouseEvent event) {\n world.setGameModeSurvival();\n modeLabel.setText(\"Survival Mode\");\n stage.close();\n startTimer();\n }\n });\n buttonSurvival.setOnMouseEntered(new EventHandler<MouseEvent>() {\n public void handle(MouseEvent event) {\n label.setText(\"Never enough potion\");\n }\n });\n buttonSurvival.setOnMouseExited(new EventHandler<MouseEvent>() {\n public void handle(MouseEvent event) {\n label.setText(\"GameMode Selection\");\n }\n });\n buttonSurvival.relocate(50, 200);\n buttonSurvival.setPrefSize(120, 30);\n buttonSurvival.alignmentProperty().set(Pos.CENTER);\n canvas.getChildren().add(buttonSurvival);\n canvas.setPrefSize(220, 300);\n stage.setScene(new Scene(canvas, 220, 300));\n stage.sizeToScene();\n stage.show();\n }", "public void backToMainMenu()\n {\n primaryStage.close();\n }", "protected void SetViewBookAfterAuthorAdd(Scene previous) {\n\t\tSystemController.stageArea.setScene(previous);\n\t}", "public void backToMain(View view) {\n startActivity(new Intent(getApplicationContext(), GameChoiceActivity.class));\n }", "protected void changeScene(ActionEvent event,Parent root) throws IOException {\n\t\tScene scene = new Scene(root);\n\t\tStage stage = (Stage)((Node)event.getSource()).getScene().getWindow();\n\t\tstage.setScene(scene);\n\t}", "@FXML\r\n public void moveToMainScene(ActionEvent event) throws IOException {\r\n isRunning = false;\r\n cv.changeScene(\"/start/start.fxml\", event);\r\n }", "private void returnHome() {\n parentPane.getChildren().clear();\n parentPane.setTop(mainMenu);\n parentPane.setCenter(imgHome);\n }", "private void newGame()\r\n {\r\n //close the current screen\r\n screen.dispose();\r\n //start back at the set up menu\r\n SetupView screen = new SetupView();\r\n SetupController controller = new SetupController(screen);\r\n screen.registerObserver(controller);\r\n }", "public void back() throws IOException {\n Main.temp = 0;\n Stage primaryStage = Main.primaryStage;\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(getClass().getResource(\"./GUI/endUserScreen.fxml\"));\n Parent root = loader.load();\n endUserScreenController eusc = loader.getController();\n eusc.setValues(eu);\n primaryStage.setTitle(\"EndUser\");\n primaryStage.resizableProperty().setValue(Boolean.FALSE);\n primaryStage.setScene(new Scene(root, 800, 600));\n primaryStage.show();\n }", "public static void showPreviousDefaults() {\r\n\t\tif (Main.skinIsIowa) IniSetup.skin.select(\"Iowa\");\r\n\t\tif (Main.skinIsIowaState) IniSetup.skin.select(\"ISU\");\r\n\t\tif (Main.skinIsNorthernIowa) IniSetup.skin.select(\"UNI\");\r\n\r\n\t\tIniSetup.winScore.setText(Main.winScore);\r\n\t\tIniSetup.loseScore.setText(Main.loseScore);\r\n\t\tIniSetup.enterSoundPath.setText(Main.soundDir);\r\n\t}", "public void GoBack(){\n if (prev_hostgui != null){\n this.setVisible(false);\n prev_hostgui.setVisible(true);\n } else{\n this.setVisible(false);\n prev_guestgui.setVisible(true);\n }\n }", "private void pauseScreenCreate() {\n pauseStage = new Stage();\n sfx.playSound(SoundFXManager.Type.SELECT);\n\n //Add buttons\n resume = new TextButton(\"Resume\", skin, \"default\");\n resume.getLabel().setFontScale(3);\n resume.setWidth(WIDTH / 2);\n resume.setHeight(WIDTH / 4);\n resume.setPosition(WIDTH / 2 - (resume.getWidth() / 2), (HEIGHT - (HEIGHT / 4)) - (resume.getHeight()));\n resume.addListener(new ClickListener() {\n public void clicked(InputEvent event, float x, float y) {\n Gdx.input.setInputProcessor(inputMultiplexer);\n sfx.playSound(SoundFXManager.Type.SELECT);\n gameState = GameState.PLAYING;\n }\n });\n resume.toFront();\n\n setting = new TextButton(\"Setting\", skin, \"default\");\n setting.getLabel().setFontScale(3);\n setting.setWidth(WIDTH / 2);\n setting.setHeight(WIDTH / 4);\n setting.setPosition(WIDTH / 2 - (setting.getWidth() / 2), resume.getY() - resume.getHeight() - (resume.getHeight() / 2));\n setting.addListener(new ClickListener() {\n public void clicked(InputEvent event, float x, float y) {\n Gdx.input.setInputProcessor(inputMultiplexer);\n sfx.playSound(SoundFXManager.Type.SELECT);\n settingsScreenCreate();\n }\n });\n setting.toFront();\n\n exit = new TextButton(\"Quit\", skin, \"default\");\n exit.getLabel().setFontScale(3);\n exit.setWidth(WIDTH / 2);\n exit.setHeight(WIDTH / 4);\n exit.setPosition(WIDTH / 2 - (exit.getWidth() / 2), setting.getY() - setting.getHeight() - (setting.getHeight() / 2));\n exit.addListener(new ClickListener() {\n public void clicked(InputEvent event, float x, float y) {\n Gdx.input.setInputProcessor(inputMultiplexer);\n sfx.playSound(SoundFXManager.Type.SELECT);\n gameState = GameState.PLAYING;\n game.setScreen(AntiVirus.levelSelectScreen);\n Lvl1.musicBackground.pause();\n }\n });\n exit.toFront();\n\n\n pauseStage.addActor(resume);\n pauseStage.addActor(setting);\n pauseStage.addActor(exit);\n Gdx.input.setInputProcessor(pauseStage);\n }", "private void setTheScene()\n {\n board.setLocalRotation(Quaternion.IDENTITY);\n board.rotate(-FastMath.HALF_PI, -FastMath.HALF_PI, 0);\n board.setLocalTranslation(0, 0, -3);\n\n cam.setLocation(new Vector3f(0, 0, 10));\n cam.lookAt(Vector3f.ZERO, Vector3f.UNIT_Y);\n }", "public void reset(){\n currentStage = 0;\n currentSide = sideA;\n }", "public void previous();", "private void returnToMainScreen(ActionEvent event) throws IOException {\r\n\r\n Parent parent = FXMLLoader.load(getClass().getResource(\"../view/MainScreen.fxml\"));\r\n Scene scene = new Scene(parent);\r\n Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow();\r\n stage.setScene(scene);\r\n stage.show();\r\n }", "public void setCurrentScreen(String name) {\n currentScreen = levels.get(name);\n }", "public void onBackButton() {\n WindowLoader wl = new WindowLoader(backButton);\n wl.load(\"MenuScreen\", getInitData());\n RETURN_AUDIO.play(Double.parseDouble(getInitData().get(\"SFXVol\")));\n }", "public void backMenu() {\n openWindowGeneral(\"/gui/administrator/fxml/FXMLMenuAdministrator.fxml\", btnCancel);\n }", "@Override\n\tpublic void onBackPressed() {\n\t\tIntent intent = new Intent(GameModeActivity.this, MenuActivity.class);\n\t\tstartActivity(intent);\n\t\tfinish();\n\t\tsuper.onBackPressed();\n\t}", "public void backButtonClicked()\r\n {\n manager = sond.getManager();\r\n AnimatorThread animThread = model.getThread();\r\n\r\n if (button.getPlay() && animThread != null && animThread.isAlive())\r\n {\r\n if (!animThread.getWait())\r\n {\r\n animThread.interrupt();\r\n }\r\n else\r\n {\r\n animThread.wake();\r\n }\r\n }\r\n else if (manager.canUndo())\r\n {\r\n manager.undo();\r\n }\r\n }", "public void setScene(Scene scene){\n this.scene = scene;\n }" ]
[ "0.75076854", "0.74099153", "0.7322218", "0.72661346", "0.70884347", "0.70144737", "0.69321537", "0.6879396", "0.68197805", "0.68032336", "0.6677762", "0.6601976", "0.65960485", "0.6559577", "0.6556431", "0.65150607", "0.6486355", "0.6462654", "0.6455447", "0.6452977", "0.6410751", "0.63882476", "0.63734436", "0.6365608", "0.63474345", "0.6339545", "0.63384247", "0.63294494", "0.6319174", "0.62825495", "0.62809414", "0.6270201", "0.62598056", "0.6248932", "0.6191363", "0.61605775", "0.6138863", "0.6132932", "0.6119885", "0.61196303", "0.61075604", "0.6090475", "0.6080142", "0.6074075", "0.6048809", "0.60465264", "0.60392654", "0.60255855", "0.6009696", "0.60089165", "0.5966373", "0.5948214", "0.5945788", "0.5937852", "0.5933851", "0.5929951", "0.59226316", "0.5915732", "0.5909289", "0.5902924", "0.59016716", "0.5899862", "0.58952403", "0.5893567", "0.58904713", "0.58889323", "0.5886843", "0.58744633", "0.58618164", "0.5860158", "0.5842432", "0.58422935", "0.583396", "0.58286846", "0.5818468", "0.58171767", "0.5812285", "0.5802925", "0.5795858", "0.5787459", "0.5784438", "0.5774634", "0.5774204", "0.57726157", "0.57702154", "0.5767217", "0.57569826", "0.5744769", "0.5744224", "0.573955", "0.5735845", "0.5735237", "0.57344925", "0.57256126", "0.57128537", "0.57118666", "0.57011634", "0.5699148", "0.569468", "0.56939334" ]
0.7702032
0
get all categories in the game as a list of strings
public List<String> getCategories(Boolean internationalSelected){ if (internationalSelected) { return _intCategories; } else { return _nzCategories; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<String> getCategories();", "public static List<String> getAllCategoryName() {\n List<String> list = new ArrayList<>();\n List<Category> catList=getAllCategory();\n if(catList!=null && catList.size()>0) {\n for (Category category : catList)\n {\n list.add(category.getCategoryName());\n }\n }\n\n return list;\n\n }", "public static ArrayList<String> getCategories() {\n String query;\n ArrayList<String> categories = new ArrayList<String>();\n\n try {\n Connection con = Database.createDBconnection();\n Statement stmt = con.createStatement();\n query = \"SELECT category FROM category;\";\n ResultSet rs = stmt.executeQuery(query);\n\n while(rs.next()) {\n categories.add(rs.getString(\"category\"));\n }\n\n Database.closeDBconnection(con);\n }\n catch(Exception e) {\n e.printStackTrace();\n }\n return categories;\n }", "public final List<String> getCategories() {\n return new ArrayList<>(questionGeneratorStrategyFactory.createPracticeQuestionStrategy().generateQuestions().keySet());\n }", "public List<String> findAllCategories() {\r\n\t\tList<String> result = new ArrayList<>();\r\n\r\n\t\t// 1) get a Connection from the DataSource\r\n\t\tConnection con = DB.gInstance().getConnection();\r\n\r\n\t\ttry {\r\n\r\n\t\t\t// 2) create a PreparedStatement from a SQL string\r\n\t\t\tPreparedStatement ps = con.prepareStatement(GET_CATEGORIES_SQL);\r\n\r\n\t\t\t// 3) execute the SQL\r\n\t\t\tResultSet resultSet = ps.executeQuery();\r\n\t\t\twhile (resultSet.next()) {\r\n\r\n\t\t\t\tString cat = resultSet.getString(1);\r\n\t\t\t\tresult.add(cat);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException se) {\r\n\t\t\tse.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tDB.gInstance().returnConnection(con);\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}", "private String getCategoriesForDebugging() {\n StringBuilder sb = new StringBuilder();\n String sep = \"\";\n for (SuggestionsSection section : mSections.values()) {\n sb.append(sep);\n sb.append(section.getCategory());\n sep = \", \";\n }\n\n return sb.toString();\n }", "public List<Categorie> getAllCategories();", "public List<ZCategory> SelectAll() {\r\n\t\tList<ZCategory> Categories = new ArrayList<>();\r\n\t\tString lines[];\r\n\t\tlines = fm.getArray();\r\n\t\tfor (String string : lines) {\r\n\t\t\tCategories.add(stringToCategory(string));\r\n\t\t}\r\n\t\treturn Categories;\r\n\t}", "public Set<String> getAllBooksCategories() {\n List<Book> books = bookRepository.findAll();\n Set<String> categories = new HashSet<>();\n for (Book book : books) {\n if (book.getCategories() != null) {\n categories.addAll(Arrays.asList(book.getCategories()));\n }\n }\n return categories;\n }", "@NonNull\n public static List<Category> getCategories() {\n if (CATEGORY == null) {\n CATEGORY = new ArrayList<>();\n CATEGORY.add(new Category(\"Bollywood\", R.drawable.bollywood, 1));\n CATEGORY.add(new Category(\"Hollywood\", R.drawable.hollywood3, 2));\n CATEGORY.add(new Category(\"Cricket\", R.drawable.cricket4, 3));\n CATEGORY.add(new Category(\"Science\", R.drawable.science1, 4));\n CATEGORY.add(new Category(\"Geography\", R.drawable.geography, 5));\n CATEGORY.add(new Category(\"History\", R.drawable.history, 6));\n }\n return CATEGORY;\n }", "public String getCategories() {\n return getProperty(Property.CATEGORIES);\n }", "public ObservableList<String> getCategories()\n {\n ArrayList<Category> categoryList = rentalModel.getCategoryList();\n ArrayList<String> categoryListString = new ArrayList<>();\n for (int i = 0; i < categoryList.size(); i++)\n {\n categoryListString.add(categoryList.get(i).toString());\n }\n categoriesList = FXCollections.observableArrayList(categoryListString);\n return categoriesList;\n }", "default List<String> getCategory(String category) {\n return new ArrayList<>(getCategories().get(category.toLowerCase()).values());\n }", "public List<String> categories() {\n return this.categories;\n }", "List getCategoriesOfType(String typeConstant);", "public String[] getCategoryList(){\n return new String[]{\n \"Macros\",\n \"Instrument Type\",\n \"TOF_NSCD\",\n \"NEW_SNS\"\n };\n }", "List<Category> getAllCategories();", "public List<String> getCategoryList(String cat) {\n ArrayList<String> ls = new ArrayList<String>();\n String[] keys = sortedStringKeys();\n\n for (String s : keys) {\n if (s.startsWith(cat)) { ls.add(getProperty(s)); }\n }\n return ls;\n }", "String category();", "public ArrayList<Categoria> listarCategorias();", "String getCategoria();", "public static List<Category> getAllCategory() {\n\n List<Category> categoryList = new ArrayList<>();\n try {\n categoryList = Category.listAll(Category.class);\n } catch (Exception e) {\n\n }\n return categoryList;\n\n }", "public Vector<Vector<String>> getCategoryList()\r\n\t{\r\n\t\ttry \r\n\t\t{\r\n\t\t\tString sql = \"SELECT * FROM categories\";\r\n\t\t\t\r\n\t\t\t//ResultSet rs= this.statement.executeQuery(sql);\t\t\r\n\t\t\tDataAccess data = new DataAccess();\r\n\t\t\tResultSet rs=data.getResultSet(sql);\t\t\r\n\t\t\tVector<Vector<String>> list= new Vector<Vector<String>>();\r\n\t\t\twhile (rs.next())\r\n\t\t\t{\r\n\t\t\t\tVector <String> result = new Vector <String>();\r\n\t\t\t\tresult.add(rs.getString(1));\r\n\t\t\t\tresult.add(rs.getString(2));\r\n\t\t\t\tresult.add(rs.getString(3));\t\t\t\t\t\t\r\n\t\t\t\tlist.add(result);\r\n\t\t\t}\r\n\t\t\trs.close();\r\n\t\t\treturn list;\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch (Exception ex)\r\n\t\t{\r\n\t\t\tex.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public String[] getAllCategories() throws NotesException {\n\t\tDatabase db = ExtLibUtil.getCurrentDatabase();\n\t\tView v = db.getView(\"AllSnippets\");\n\t\tViewNavigator nav = v.createViewNav();\n\t\ttry {\n\t\t\tnav.setMaxLevel(0);\n\t\t\t//nav.setCacheSize(128);\n\t\t\tList<String> categories = new ArrayList<String>();\n\t\t\tfor(ViewEntry ve=nav.getFirst(); ve!=null; ve=nav.getNext(ve)) {\n\t\t\t\tcategories.add((String)ve.getColumnValues().get(0));\n\t\t\t}\n\t\t\treturn categories.toArray(new String[categories.size()]);\n\t\t} finally {\n\t\t\tnav.recycle();\n\t\t}\n\t}", "public void getCategorory(){\n\t\tDynamicQuery dynamicQuery = DynamicQueryFactoryUtil.forClass(AssetCategory.class, \"category\", PortalClassLoaderUtil.getClassLoader());\n\t\ttry {\n\t\t\tList<AssetCategory> assetCategories = AssetCategoryLocalServiceUtil.dynamicQuery(dynamicQuery);\n\t\t\tfor(AssetCategory category : assetCategories){\n\t\t\t\tlog.info(category.getName());\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t}", "public List<TilePojo> getCategoryCharacterList() {\n\t\tLOGGER.info(\"GetCategoryCharacterList -> Start\");\n\t\tcategoryCharacterList = new LinkedList<>();\n\n\t\tTagManager tagManager = resource.getResourceResolver().adaptTo(TagManager.class);\n\t\tif (galleryCategory != null && tagManager != null) {\n\t\t\tTag galleryTag = tagManager.resolve(galleryCategory[0]);\n\t\t\tString galleryTagId = galleryTag.getTagID();\n\t\t\tList<TilePojo> charList = tileGalleryAndLandingService.getTilesByDate(homePagePath, galleryFor,\n\t\t\t\t\tgalleryTagId, resource.getResourceResolver(), true);\n\t\t\tcategoryCharacterList = getFixedNumberChar(charList, 12);\n\t\t}\n\t\tLOGGER.info(\"GetCategoryCharacterList -> End\");\n\t\treturn categoryCharacterList;\n\t}", "@Override\r\n\tpublic List<Category> list() {\n\t\treturn categories;\r\n\t}", "public static List<Categorias> obtenerCategorias(){\n List<Categorias> categorias = new ArrayList<>();\n \n Categorias c = new Categorias();\n \n c.conectar();\n \n c.crearQuery(\"select * from categoria_libro\");\n \n ResultSet informacion = c.getResultSet();\n \n try {\n while (informacion.next())\n categorias.add(new Categorias(informacion));\n } catch (Exception error) {}\n \n c.desconectar();\n \n return categorias;\n }", "private List<Category> extractTargets() {\n List<String> names = getNames(\"category\");\n CategorySelectAsyncTask task = new CategorySelectAsyncTask();\n CategoryMapper mapper = new CategoryMapper();\n task.setNames(names);\n List<Category> list = new ArrayList<>();\n try {\n list.addAll(mapper.to(task.execute().get()));\n } catch (ExecutionException | InterruptedException e) {\n Log.e(TAG, \"extractTargets: \" + e.getMessage(), e);\n }\n return list;\n }", "private static String getCategories(JSONObject volumeInfo) throws JSONException {\n JSONArray categories = volumeInfo.optJSONArray(\"categories\");\n if (categories == null) {\n Log.e(LOG_TAG, \"No categories for this book\");\n return null;\n }\n StringBuilder categoriesString = new StringBuilder();\n for (int i = 0; i < categories.length(); i++) {\n categoriesString.append(categories.getString(i));\n if (i + 1 < categories.length()) {\n categoriesString.append(\", \");\n }\n }\n return categoriesString.toString();\n }", "public List<Category> getCategories() {\n CategoryRecords cr = company.getCategoryRecords();\n List<Category> catList = cr.getCategories();\n return catList;\n }", "public String[][] getMetaCategories();", "public ArrayList<Categories> getAllCategories() {\n\t\t\n\t\tCategories cg;\n\t\tArrayList<Categories> list=new ArrayList<Categories>();\n\t\t\n\t\ttry {\n\t\t\t String query=\"select * from categories;\";\n\t\t\tPreparedStatement pstm=con.prepareStatement(query);\n\t\t\tResultSet set= pstm.executeQuery();\n\t\t\t\n\t\t\twhile(set.next()) {\n\t\t\t\tint cid=set.getInt(1);\n\t\t\t\tString cname=set.getString(2);\n\t\t\t\tString cdes=set.getString(3);\n\t\t\t\t\n\t\t\t\tcg=new Categories(cid, cname, cdes);\n\t\t\t\tlist.add(cg);\n\t\t\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\treturn list;\n\t}", "@Override\n\tpublic ArrayList<Categoria> getCategorie() {\n\t\tDB db = getDB();\n\t\tArrayList<Categoria> categorie = new ArrayList<Categoria>();\n\t\tMap<Long, Categoria> list = db.getTreeMap(\"categorie\");\n\t\tfor(Map.Entry<Long, Categoria> categoria : list.entrySet())\n\t\t\tif(categoria.getValue() instanceof Categoria)\n\t\t\t\tcategorie.add((Categoria)categoria.getValue());\n\t\treturn categorie;\n\t}", "public String[] getAllCategories() {\n // array of columns to fetch\n String[] columns = {\n COLUMN_CATEGORY_ID,\n COLUMN_CATEGORY_DESC\n };\n // sorting orders\n String sortOrder =\n COLUMN_CATEGORY_ID + \" ASC\";\n \n \n // query the user table\n /**\n * Here query function is used to fetch records from user table this function works like we use sql query.\n * SQL query equivalent to this query function is\n * SELECT user_id,user_name,user_email,user_password FROM user ORDER BY user_name;\n */\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.query(\n TABLE_CATEGORY, //Table to query\n columns, //columns to return\n null, //columns for the WHERE clause\n null, //The values for the WHERE clause\n null, //group the rows\n null, //filter by row groups\n sortOrder); //The sort order\n String[] cats = new String[cursor.getCount()];\n // Traversing through all rows and adding to list\n int i;\n if (cursor.moveToFirst()) {\n for( i = 0; i < cursor.getCount() ; i++){\n cats[i] = cursor.getString(cursor.getColumnIndex(COLUMN_CATEGORY_DESC));\n cursor.moveToNext();\n }\n }\n\n cursor.close();\n db.close();\n // return user list\n return cats;\n }", "private ArrayList<String> getCritterOptionsMenu() {\n\t\tArrayList<String> items = new ArrayList<String>();\n\t\tArrayList<Class<Critter>> critters = getCritterClasses(this.getClass().getPackage());\n\t\tfor (Class<Critter> c:critters){\n\t\t\titems.add(c.getSimpleName());\n\t\t}\n\t\treturn items;\n\t}", "public String[] getCategoryArray(String cat) {\n return getCategoryList(cat).toArray(new String[0]);\n }", "public String toString() {\n\t\treturn category;\n\t}", "@RequestMapping(value = \"/categories\", method = RequestMethod.GET, produces = \"application/json\")\n public Collection<String> getCategories() {\n return this.datasetService.getCategories();\n }", "@Override\r\n\tpublic List<Categorie> getAllCategorie() {\n\t\treturn cateDao.getAllCategorie();\r\n\t}", "public List<String> getRainCategory() {\n\t\treturn outRainDao.getRainCategory();\r\n\t}", "public List<Category> getAllAvailableCategory() {\n\t\treturn categoryManager.getAllAvailable();\n\t}", "public static List<Category> findAll() {\n List<Category> categories = categoryFinder.findList();\n if(categories.isEmpty()){\n categories = new ArrayList<>();\n }\n return categories;\n }", "public List<Category> getAllCategories() {\n\t\t\tSession session = sessionFactory.getCurrentSession();\n\t\t\tQuery q = session.createQuery(\"from Category\");\n\t\t\tList<Category> catlist = q.list();\n\t\t\t\n\t\t\treturn catlist;\n\t\t}", "String getCategory();", "String getCategory();", "public List<String> getCategory(SqlSession session, HashMap<String, Object> map) {\r\n\t\treturn session.selectList(\"getCategory\", map);\r\n\t}", "@Override\n\tpublic List<Category> getAllCategory() {\n\t\treturn category.selectAllCategory();\n\t}", "public List<Category> getAllCategories() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = (Query) session.createQuery(\"from Category\");\r\n\t\tList<Category> categories = query.list();\r\n\r\n\t\treturn categories;\r\n\t}", "public static ArrayList<String> catToCateg(String categ) throws Exception {\n\n\t\tArrayList<String> list = new ArrayList<String>();\n\n\t\tif (categOffsetIndex == null) {\n\t\t\tSystem.out.println(\"categ loading index...\");\n\t\t\tloadCategIndex();\n\t\t\tSystem.out.println(\"categ index loaded !!!\");\n\t\t}\n\n\t\tif (categOffsetIndex.get(categ) != null) {\n\t\t\tFile file = new File(basedir + \"categHierarchy\");\n\t\t\tRandomAccessFile rFile = new RandomAccessFile(file, \"r\");\n\t\t\t// System.out.println(categOffsetIndex.get(categ));\n\t\t\trFile.seek(categOffsetIndex.get(categ));\n\t\t\tString temp = rFile.readLine();\n\t\t\trFile.close();\n\t\t\tString arr[] = temp.split(\"\\t\");\n\n\t\t\tString temp1 = arr[1].substring(1, arr[1].length() - 1);\n\t\t\tString arr1[] = temp1.split(\",\");\n\n\t\t\tfor (String key : arr1) {\n\t\t\t\tlist.add(key.trim());\n\t\t\t}\n\t\t\trFile.close();\n\t\t\treturn list;\n\n\t\t}\n\n\t\telse {\n\n\t\t\treturn null;\n\t\t}\n\n\t}", "public List<String> classifiers()\n\t{\n\t\t//If the classifier list has not yet been constructed then go ahead and do it\n\t\tif (c.isEmpty())\n\t\t{\n\t\t\tfor(DataSetMember<t> member : _data)\n\t\t\t{\n\t\t\t\tif (!c.contains(member.getCategory()))\n\t\t\t\t\t\tc.add(member.getCategory().toString());\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn c;\n\t}", "public Flowable<List<Category>> getCategories() {\n return findAllData(Category.class);\n }", "public LinkedHashMap<String, String> getCategories() {\r\n\t\treturn this.categories;\r\n\t}", "public List<String> getFiveRandomCategories () {\n\t\treturn _fiveRandomCategories;\n\t}", "public List<CategoriaVO> mostrarCategorias() {\n\t\tJDBCTemplate mysql = MysqlConnection.getConnection();\n\t\ttry {\n\t\t\tmysql.connect();\n\t\t\tCategoriaDAO OwlDAO = new CategoriaDAO();\n\t\t\tList<CategoriaVO> resultado = new ArrayList();\n\t\t\tresultado = OwlDAO.obtenerCategorias(mysql);\n\t\t\treturn resultado;\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace(System.err);\n\t\t\treturn null;\n\n\t\t} finally {\n\t\t\tmysql.disconnect();\n\t\t}\n\t}", "Set<Category> getShopCategories(Shop shop);", "public ArrayList<Category> getCategories() {\n ArrayList<Category> categories = new ArrayList<>();\n Cursor cursor = database.rawQuery(\"SELECT * FROM tbl_categories\", null);\n cursor.moveToFirst();\n while (!cursor.isAfterLast()) {\n Category category = new Category();\n category.setCategory_id(cursor.getInt(cursor.getColumnIndex(\"category_id\")));\n category.setCategory_name(cursor.getString(cursor.getColumnIndex(\"category_name\")));\n\n\n categories.add(category);\n cursor.moveToNext();\n }\n cursor.close();\n return categories;\n }", "public Collection<Categoria> listar() {\n\t\tQuery q = manager.createQuery(\"SELECT p FROM Categoria p\");\n\t\treturn (Collection<Categoria>) q.getResultList();\n\t}", "@Override\n\tpublic List<Categoryb> GetCategpryb() {\n\t\treturn null;\n\t}", "public List<String> getAllCategories(String[] err) {\n GetCategoriesJSONResponse getCategoriesJSONResponse = null;\n try {\n getCategoriesJSONResponse = apiInterface.getAllCategories().execute().body();\n if (getCategoriesJSONResponse != null && getCategoriesJSONResponse.getStatus() == -1) {\n err[0] = getCategoriesJSONResponse.getMessage();\n }\n } catch (Exception e) {\n Log.e(TAG, \"Ex: \", e);\n }\n\n return getCategoriesJSONResponse != null ? getCategoriesJSONResponse.getCategories() : null;\n }", "public List<Category> findAll() {\n\t\treturn categoryMapper.selectAll();\n\t}", "public static List<Category> getCategories(Context context) {\r\n DbManager dbManager = new DbManager(context);\r\n SQLiteDatabase db = dbManager.getReadableDatabase();\r\n\r\n Cursor cursor = db.query(\r\n CategoryTable.TABLE_NAME,\r\n new String[]{CategoryTable._ID, CategoryTable.COLUMN_NAME_CATEGORY_NAME},\r\n CategoryTable.COLUMN_NAME_IS_DELETED + \" = 0\",\r\n null,\r\n null,\r\n null,\r\n CategoryTable.COLUMN_NAME_CATEGORY_NAME + \" ASC\"\r\n );\r\n\r\n List<Category> categories = new ArrayList<>();\r\n while(cursor.moveToNext()) {\r\n Category category = new Category();\r\n category._id = cursor.getInt(cursor.getColumnIndexOrThrow(CategoryTable._ID));\r\n category.category = cursor.getString(cursor.getColumnIndexOrThrow(CategoryTable.COLUMN_NAME_CATEGORY_NAME));\r\n categories.add(category);\r\n }\r\n cursor.close();\r\n db.close();\r\n\r\n return categories;\r\n }", "@GetMapping(\"category\")\n\t\tpublic List<String> getCategory(){\n\t\t\tList<String> list = repo.findByCat();\n\t\t\treturn list;\n\t\t\t\n\t\t\t\n\t\t}", "List<Channel> getJXCategory();", "@Override\n\tpublic List<Categories> getListCat() {\n\t\treturn categoriesDAO.getListCat();\n\t}", "public java.lang.String getCatas() {\n return catas;\n }", "@Override\n public Collection<String> getMenuCategories() {\n return emptyCollection;\n }", "public static ArrayList selectCatalogCategory() {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n PreparedStatement ps2 = null;\n ResultSet rs = null;\n ResultSet rs2 = null;\n ArrayList<String> p = new ArrayList();\n int count = 0;\n\n String query = \"SELECT DISTINCT catalogCategory FROM Product \"\n + \" ORDER BY catalogCategory\";\n \n String query2 = \"SELECT DISTINCT catalogCategory FROM Product \"\n + \" ORDER BY catalogCategory\";\n \n try {\n ps = connection.prepareStatement(query);\n ps2 = connection.prepareStatement(query2);\n rs = ps.executeQuery();\n rs2 = ps2.executeQuery();\n \n while( rs2.next() ) {\n ++count;\n } \n ////////////For test purposes only //System.out.println(\"DBSetup @ line 363 \" + count); \n for ( int i = 0; i < count; i++ ) {\n if ( rs.next() ) {\n \n p.add(rs.getString(\"catalogCategory\"));\n System.out.println(\"DBSetup @ line 370 \" + p.get(i));\n }\n }\n System.out.println(p.size());\n return p;\n } catch (SQLException e) {\n System.out.println(e);\n return null;\n } finally {\n DBUtil.closeResultSet(rs);\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }", "public static ResultSet getAllCategory() {\n try {\n Statement st = conn.createStatement();\n ResultSet rs = st.executeQuery(\"SELECT catName FROM category\");\n return rs;\n } catch (SQLException ex) {\n Logger.getLogger(itemDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n return null;\n }", "public List<ProductCatagory> getAllCategory() throws BusinessException;", "public List<Category> getAllCategories() {\n\t dbUtil = new DBUtil();\n\t StringBuffer sbQuery = dbUtil.getQueryBuffer();\n\t ArrayList<String> args = dbUtil.getArgs();\n\t ResultSet rs = null;\n\t List<Category> listCategory = null;\n\t \n\t /*** Get the details of a particular Category ***/\n\t /*** QUERY ***/\n\t sbQuery.setLength(0);\n\t sbQuery.append(\" SELECT \");\n\t sbQuery.append(\" id, \");\n\t sbQuery.append(\" name, \");\n\t sbQuery.append(\" userid \");\n\t sbQuery.append(\" FROM lookup.category \");\n\t \n\t /*** Prepare parameters for query ***/\n\t args.clear();\n\t \n\t \n\t /*** Pass the appropriate arguments to DBUtil class ***/\n\t rs = dbUtil.executeSelect(sbQuery.toString(), args);\n\t \n\t /*** Convert the result set into a User object ***/\n\t if(rs!=null)\n\t listCategory = TransformUtil.convertToListCategory(rs);\n\t \n\t dbUtil.closeConnection();\n\t dbUtil = null;\n\t \n\t return listCategory;\n\t}", "CodeOrNullListType getCategoryList();", "public List<String> getSubCategoryLst()\n {\n List<String> subCategories = new ArrayList<String>();\n\n for (int i = 0; i < locationLst.size(); i++) {\n String subCategory = locationLst.get(i).getSubCategory();\n\n if(subCategory != \"\" && !subCategories.contains(subCategory))\n subCategories.add(subCategory);\n }\n\n return subCategories;\n }", "public String[] getCategoryList(){\n return new String[]{\n \"HIDDENOPERATOR\"\n };\n }", "public List<Category> getlist() {\n\t\tSession session = getSession();\n\t\t\n\t\tQuery query = session.createQuery(\"from Category\");\n\t\tList<Category> categoryList = query.list();\n\t\treturn categoryList;\n\t}", "public java.util.List<es.davinciti.liferay.model.LineaGastoCategoria> findAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "@Override\r\n\tpublic List<Category> getAllCategory() {\n\t\tString hql = \"from Category\";\r\n\t\treturn (List<Category>) getHibernateTemplate().find(hql);\r\n\t}", "@NotNull\n @JsonProperty(\"generalCategoryNames\")\n public List<String> getGeneralCategoryNames();", "@Override\n\tpublic List<Category> getAllCategories() {\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(\"FROM \"+Category.class.getName());\n\t\treturn (List<Category>)query.list();\t\t\n\t}", "public String getCategory();", "@Override\n public List<Category> getAll()\n {\n \n ResultSet rs = DataService.getData(\"SELECT * FROM Categories\");\n \n List<Category> categories = new ArrayList<Category>();\n \n try\n {\n while (rs.next())\n {\n categories.add(convertResultSetToCategory(rs));\n }\n }\n catch (SQLException e)\n {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n \n return categories;\n }", "public static List<StockInfoCategory> getCombinedBICategoryList(){\r\n\t\treturn CBICategoryList;\r\n\t}", "@Override\n\tpublic List<Category> getAllCategory() {\n\t\treturn dao.getAllCategory();\n\t}", "private List<ExploreSitesCategory> createDefaultCategoryTiles() {\n List<ExploreSitesCategory> categoryList = new ArrayList<>();\n\n // Sport category.\n ExploreSitesCategory category = new ExploreSitesCategory(\n SPORT, getContext().getString(R.string.explore_sites_default_category_sports));\n category.setDrawable(getVectorDrawable(R.drawable.ic_directions_run_blue_24dp));\n categoryList.add(category);\n\n // Shopping category.\n category = new ExploreSitesCategory(\n SHOPPING, getContext().getString(R.string.explore_sites_default_category_shopping));\n category.setDrawable(getVectorDrawable(R.drawable.ic_shopping_basket_blue_24dp));\n categoryList.add(category);\n\n // Food category.\n category = new ExploreSitesCategory(\n FOOD, getContext().getString(R.string.explore_sites_default_category_cooking));\n category.setDrawable(getVectorDrawable(R.drawable.ic_restaurant_menu_blue_24dp));\n categoryList.add(category);\n return categoryList;\n }", "public List<CategoriaEntity> findAll() {\n LOGGER.log(Level.INFO, \"Consultando todas las categorias\");\n // Se crea un query para buscar todas las categorias en la base de datos.\n TypedQuery query = em.createQuery(\"select u from CategoriaEntity u\", CategoriaEntity.class);\n // Note que en el query se hace uso del método getResultList() que obtiene una lista de categorias.\n return query.getResultList();\n }", "public List<Category> getCategories() {\n this.catr = m_oCompany.getCategoryRecords();\n return catr.getCategories();\n }", "public String getCategory() {\t//TODO - change to array list of categories\n\t\treturn category;\n\t}", "List<Category> lisCat() {\n return dao.getAll(Category.class);\n }", "public String categoryList(CategoryDetails c);", "public List<Category> getListCategory() {\n List<Category> list = new ArrayList<>();\n SQLiteDatabase sqLiteDatabase = dbHelper.getWritableDatabase();\n\n Cursor cursor = sqLiteDatabase.rawQuery(\"SELECT * FROM Category\", null);\n while (cursor.moveToNext()) {\n int id =cursor.getInt(0);\n\n Category category = new Category(id, cursor.getString(cursor.getColumnIndex(\"Name\")), cursor.getString(cursor.getColumnIndex(\"Image\")));\n Log.d(\"TAG\", \"getListCategory: \" + category.getId());\n list.add(category);\n }\n cursor.close();\n dbHelper.close();\n return list;\n }", "private List<String> createCategoryNames(List<CategoryDb> instances) {\n List<String> list = new ArrayList<>(0);\n for (CategoryDb categoryDb : instances) {\n list.add(categoryDb.getCategoryNameEn());\n }\n return list;\n }", "public static List<String> buscarCategoriaDoLivro(){\n List<String> categoriasLivros=new ArrayList<>();\n Connection connector=ConexaoDB.getConnection();\n String sql=\"Select category from bookCategory\";\n Statement statement=null;\n ResultSet rs=null;\n String nome;\n try {\n statement=connector.createStatement();\n rs=statement.executeQuery(sql);\n while (rs.next()) {\n nome=rs.getString(\"category\");\n categoriasLivros.add(nome);\n }\n \n } catch (Exception e) {\n \n }finally{\n ConexaoDB.closeConnection(connector, statement, rs);\n }\n return categoriasLivros;\n}", "private static void catList() {\n\t\tSystem.out.println(\"List of preset Categories\");\n\t\tSystem.out.println(\"=========================\");\n\t\tSystem.out.println(\n\t\t\t\t\"Family\\nTeen\\nThriller\\nAnimated\\nSupernatural\\nComedy\\nDrama\\nQuirky\\nAction\\nComing of age\\nHorror\\nRomantic Comedy\\n\\n\");\n\t}", "@Override\r\n\tpublic List<Category> getAllCategory() {\n\t\treturn categoryDao.getAll();\r\n\t}", "@Override\n\tpublic List<Category> getCategories(){\n\t\treturn null;\n\t}", "@Override\n\tpublic List<Category> list() {\n\t\tList<Category> list=(List<Category>)\n\t\tsessionFactory.getCurrentSession().createCriteria(Category.class).setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY).list();\n\t\treturn list;\n\t}", "@Transactional\r\n\tpublic List<CmVocabularyCategory> getCmVocabularyCategorys() {\r\n\t\treturn dao.findAllWithOrder(CmVocabularyCategory.class, \"modifyTimestamp\", false);\r\n\t}", "@GetMapping\n\t public List<Categories> touslescategories() {\n\t\treturn catsociete.findAll();}", "public List<Category> list() {\n\t\tSession session = getSession();\n\n\t\tQuery query = session.createQuery(\"from Category\");\n\t\tList<Category> categoryList = query.list();\n session.close();\n\t\treturn categoryList;\n\t}", "public List<Categoria> listarCategorias(){\n //este metodo devuelve una lista.\n return categoriaRepo.findAll(); \n\n }" ]
[ "0.7681918", "0.75162894", "0.73900187", "0.73340833", "0.7209633", "0.6943407", "0.69045067", "0.67991525", "0.67940366", "0.67925006", "0.6776616", "0.6746312", "0.6719483", "0.67159337", "0.67120194", "0.6700144", "0.6667771", "0.6642247", "0.66186166", "0.659996", "0.65954775", "0.6591455", "0.6576434", "0.6562166", "0.6554724", "0.6553481", "0.6548072", "0.6543675", "0.65315497", "0.6519726", "0.6482438", "0.6478941", "0.6456073", "0.6434492", "0.6376953", "0.6369101", "0.63669425", "0.6366005", "0.63536036", "0.6348871", "0.63383883", "0.63360417", "0.6333648", "0.63312227", "0.63284075", "0.63284075", "0.6318351", "0.6317026", "0.63093144", "0.63020253", "0.6297907", "0.6283733", "0.6263165", "0.62518215", "0.62433666", "0.6236364", "0.6229602", "0.62229985", "0.62177587", "0.61982274", "0.6174625", "0.6165961", "0.6161699", "0.6149333", "0.6147445", "0.61459255", "0.6137889", "0.6135351", "0.60994625", "0.6098579", "0.60965776", "0.6093649", "0.6088951", "0.60806704", "0.60708946", "0.6057218", "0.6052832", "0.6050117", "0.6047756", "0.6042767", "0.60246164", "0.59975827", "0.5996388", "0.599235", "0.598351", "0.59819424", "0.59780383", "0.59764904", "0.5974333", "0.5968463", "0.5962929", "0.5955386", "0.5951495", "0.595132", "0.5937321", "0.5936452", "0.5934129", "0.59307873", "0.59297997", "0.5925203" ]
0.6257533
53
get the players winnings from "data/winnings"
public int getWinnings() { BufferedReader reader; try { reader = new BufferedReader(new FileReader("data/winnings")); String line = reader.readLine(); _winnings = Integer.parseInt(line.trim()); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return _winnings; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Set<SteamUserNode> bindGames(Set<SteamUserNode> players) {\n\t\tString dest = \"http://api.steampowered.com/IPlayerService/GetOwnedGames/v0001/?\" +\r\n\t\t\t\t\"key=%s&steamid=%d&include_appinfo=1&include_played_free_games=1&format=json\";\r\n\t\tString response = \"\";\r\n\t\tfor (SteamUserNode p : players) {\r\n\t\t\ttry {\r\n\t\t\t\tthis.apiCalls += 1;\r\n\t\t\t\tString query = String.format(dest, key, p.getId());\r\n\t\t\t\tURL url = new URL(query);\r\n\t\t\t\tHttpURLConnection con = (HttpURLConnection) url.openConnection();\r\n\t\t\t\tcon.setRequestMethod(\"GET\");\r\n\t\t\t\tcon.setConnectTimeout(3000);\r\n\t\t\t\tcon.connect();\r\n\t\t\t\tint respCode = con.getResponseCode();\r\n\t\t\t\tif (respCode != 200)\r\n\t\t\t\t\tSystem.out.println(\"Status code: \" + respCode + \"\\nFor request: \" + query);\r\n\t\t\t\telse {\r\n\t\t\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(con.getInputStream()));\r\n\t\t\t\t\tresponse = reader.lines().collect(Collectors.joining());\r\n\t\t\t\t\tint numGames = new JSONObject(response).getJSONObject(\"response\").getInt(\"game_count\");\r\n\t\t\t\t\tif (numGames > 0) {\r\n\t\t\t\t\t\tJSONArray ownedGames = new JSONObject(response).getJSONObject(\"response\").getJSONArray(\"games\");\r\n\t\t\t\t\t\tfor (int i=0;i<ownedGames.length();++i) {\r\n\t\t\t\t\t\t\tJSONObject g = ownedGames.getJSONObject(i);\r\n\t\t\t\t\t\t\tlong appId = g.getLong(\"appid\");\r\n\t\t\t\t\t\t\tString name = g.getString(\"name\");\r\n\t\t\t\t\t\t\tString logoHash = g.getString(\"img_logo_url\");\r\n\t\t\t\t\t\t\tint playForever = g.getInt(\"playtime_forever\");\r\n\t\t\t\t\t\t\tint play2Wks = g.has(\"playtime_2weeks\") ? g.getInt(\"playtime_2weeks\") : 0;\r\n\t\t\t\t\t\t\tPlayedGame game = new PlayedGame(appId, name, logoHash, play2Wks, playForever);\r\n\t\t\t\t\t\t\tp.addPlayedGame(game);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif (!knownGames.contains(game)) {\r\n\t\t\t\t\t\t\t\tknownGames.add((SteamGame) game);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (localWrite) {\r\n\t\t\t\t\t\t\tjsonWriter.writeOwnedGames(response, p);\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 (JSONException jse) {\r\n\t\t\t\tSystem.err.println(jse.getMessage());\r\n\t\t\t\tSystem.out.println(response);\r\n\t\t\t} catch (MalformedURLException mue) {\r\n\t\t\t\t//once again, this better not happen...\r\n\t\t\t\tSystem.err.println(mue.getMessage());\r\n\t\t\t} catch (IOException ioe) {\r\n\t\t\t\tSystem.err.println(ioe.getMessage());\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn players;\r\n\t}", "public static ArrayList<Player> getWinners(){return winners;}", "@SuppressWarnings(\"ResultOfObjectAllocationIgnored\")\n private String getWinnerList() {\n String list = \"\";\n\n ArrayList<IPlayer> arrlist = sortPlayerAfterPoints();\n\n for (IPlayer i : arrlist) {\n try {\n list += i.getName();\n list += \": \" + i.getPoints() + \"\\n\";\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n }\n\n try {\n if (dialog.getSoundBox().isSelected()) {\n if (iPlayerList.size() > 0) {\n if (playersAgentsMap.get(arrlist.get(0).getName()).get(0).getColor().equals(Color.decode(AgentUtils.ROT))) {\n new SoundClip(\"red_team_is_the_winner\");\n } else if (playersAgentsMap.get(arrlist.get(0).getName()).get(0).getColor().equals(Color.decode(AgentUtils.BLAU))) {\n new SoundClip(\"blue_team_is_the_winner\");\n } else {\n new SoundClip(\"Flawless_victory\");\n }\n } else {\n new SoundClip(\"players_left\");\n }\n }\n } catch (NumberFormatException | RemoteException e) {\n e.printStackTrace();\n }\n\n return list;\n }", "public void displayPlayerWinnings()\n {\n for(int card = 0; card < playerCardsWon; card++)\n {\n System.out.println(playerWinnings[card].toString());\n }\n }", "public int getWins() {\n return wins;\n }", "public int getWins() {\n return wins;\n }", "public ArrayList<Integer> getWinners() {\n return this.winners;\n }", "public List<PlayerWon> findByLeagueId(int leagueId);", "public Set<Colour> getWinningPlayers();", "public int getGoldCardsByWins(int wins) {\n return statistics.getGoldCardsByWins().get(wins);\n }", "public static double getChampionMatchResult(String matchDetails, String accountID, double wins) {\n try {\r\n JSONObject searchResultsObj = new JSONObject(matchDetails);\r\n JSONArray searchResultsItems = searchResultsObj.getJSONArray(\"participantIdentities\");\r\n\r\n for (int i = 0; i < searchResultsItems.length(); i++) {\r\n JSONObject resultItem = searchResultsItems.getJSONObject(i);\r\n\r\n if (resultItem.getJSONObject(\"player\").getString(\"accountId\").equals(accountID)) {\r\n int participantId = resultItem.getInt(\"participantId\"); //store the user's id\r\n\r\n JSONArray teams = searchResultsObj.getJSONArray(\"teams\"); //fetch array of game results\r\n\r\n if (teams.getJSONObject(0).getString(\"win\").equals(\"Win\") && participantId < 5) { //check for user as blue team winning\r\n wins++; //the user won, increment to keep track of how many wins total\r\n }\r\n else if (teams.getJSONObject(0).getString(\"win\").equals(\"Fail\") && participantId > 5) { //check for user as red team winning\r\n wins++; //the user won, increment to keep track of how many wins total\r\n }\r\n else {\r\n //do nothing, the user lost this game\r\n }\r\n break; //break, the user has been found\r\n }\r\n }\r\n return wins;\r\n } catch (JSONException e) {\r\n System.out.println(\"JSON CHAMPION MATCH RESULT EXCEPTION: \" + e);\r\n return -1;\r\n }\r\n }", "@RequestMapping(value = \"/score/wins\", method=RequestMethod.GET)\n\tpublic int getWins() {\n\t\treturn score.getWins();\n\t}", "public Player getWinner();", "public static int getWinnerTotalGoals(String competition, int year) {\r\n int numGoals = 0;\r\n try\r\n {\r\n String apiUrl = \"https://jsonmock.hackerrank.com/api/football_competitions?name=\" + competition + \"&year=\" + year;\r\n URL url = new URL(apiUrl);\r\n HttpURLConnection con = (HttpURLConnection) url.openConnection();\r\n con.setRequestMethod(\"GET\");\r\n con.addRequestProperty(\"Content-Type\", \"applicaton/json\");\r\n con.connect();\r\n int status = con.getResponseCode();\r\n InputStream is = url.openStream();\r\n JsonReader reader = Json.createReader(is);\r\n JsonObject object = reader.readObject();\r\n String winner = object.get(\"data\").asJsonArray().get(0).asJsonObject().getString(\"winner\");\r\n \r\n //get goals by the winner\r\n apiUrl = \"https://jsonmock.hackerrank.com/api/football_matches?competition=\" + competition + \"&year=\" + year;\r\n url = new URL(apiUrl);\r\n con = (HttpURLConnection) url.openConnection();\r\n con.setRequestMethod(\"GET\");\r\n con.addRequestProperty(\"Content-Type\", \"applicaton/json\");\r\n con.connect();\r\n status = con.getResponseCode();\r\n is = url.openStream();\r\n reader = Json.createReader(is);\r\n object = reader.readObject();\r\n int numPages = object.getInt(\"total_pages\");\r\n JsonArray data = object.getJsonArray(\"data\");\r\n con.disconnect();\r\n \r\n for( int i = 1; i <= numPages; i++ ){\r\n \r\n apiUrl = \"https://jsonmock.hackerrank.com/api/football_matches?competition=\" + competition + \"&year=\" + year+ \"&page=\" + i;\r\n url = new URL(apiUrl);\r\n con = (HttpURLConnection) url.openConnection();\r\n con.setRequestMethod(\"GET\");\r\n con.addRequestProperty(\"Content-Type\", \"applicaton/json\");\r\n con.connect();\r\n status = con.getResponseCode();\r\n is = url.openStream();\r\n reader = Json.createReader(is);\r\n object = reader.readObject();\r\n data = object.getJsonArray(\"data\");\r\n con.disconnect(); \r\n\r\n //loop through the data, sum up draw matches\r\n for ( int j = 0; j < data.size(); j++){\r\n if ( data.get(j).asJsonObject().getString(\"team1\").equals(winner) ) {\r\n numGoals += Integer.valueOf( data.get(j).asJsonObject().getString(\"team1goals\") );\r\n }\r\n if ( data.get(j).asJsonObject().getString(\"team2\").equals(winner) ) {\r\n numGoals += Integer.valueOf( data.get(j).asJsonObject().getString(\"team2goals\") );\r\n }\r\n }\r\n } \r\n }\r\n catch (Exception e){return -1;}\r\n \r\n return numGoals; \r\n }", "public void collectWinnings() {\n\t\tif (hand.checkBlackjack()) {\n\t\t\tdouble win = bet * 1.5;\n\t\t\ttotalMoney += (win + bet);\n\t\t} else {\n\t\t\ttotalMoney += (bet + bet);\n\t\t}\n\t}", "public int getRegularCardsByWins(int wins) {\n return statistics.getCardsByWins().get(wins);\n }", "public int wins(String team) {\n return getTeamByName(team).wins;\r\n }", "public ArrayList<Player> whoWins(ArrayList<Player> players) {\r\n\r\n // on créé un tableau pour stocker les gagnants\r\n ArrayList<Player> winners = new ArrayList<>();\r\n\r\n int bestScore = 0;\r\n\r\n for(Player player : players) {\r\n if( ! isBusted(player)) {\r\n if(total(player).max() > bestScore || (player.isDealer() && total(player).max() == bestScore)) {\r\n bestScore = total(player).max();\r\n winners.clear();\r\n winners.add(player);\r\n }\r\n else if(total(player).max() == bestScore) {\r\n winners.add(player);\r\n }\r\n } else {\r\n Logger.write(player.getName() + \" a perdu, il perd sa mise :\" + player.getStake());\r\n player.removeTokens(player.getStake());\r\n }\r\n }\r\n return winners;\r\n }", "public List<PlayerWon> findByTeamId(int teamId);", "@Override\n public Player getWinningPlayer() {\n return wonGame ? currentPlayer : null;\n }", "public static Integer getBotWins() {\n return humanVsBot.OWins + botVsHuman.XWins;\n }", "private TeamId findWinningTeam(){\n if (state.score().totalPoints(TeamId.TEAM_1)>=Jass.WINNING_POINTS) {\n return TeamId.TEAM_1;\n }\n else {\n return TeamId.TEAM_2;\n }\n }", "Map<String, String> getAvailableGames();", "public HashMap<String, Integer> play(){\n\t\t\n\t\tHashMap<String, Integer> result = new HashMap<String, Integer>();\n\t\tint gamesRandom = 0;\n\t\tint gamesDefault = 0;\n\t\tint draws = 0;\n\t\t\n\t\tfor(int i=1; i<= 100; i++){\n\t\t\tString shape = getRandomShape();\n\t\t\tint winner = getWinner(Shape.valueOf(shape));\n\t\t\tif(winner == RANDOM_PLAYER_INT){\n\t\t\t\tgamesRandom++;\n\t\t\t}\n\t\t\telse if(winner == DEFAULT_PLAYER_INT){\n\t\t\t\tgamesDefault++;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tdraws++;\n\t\t\t}\n\t\t\ttrackGame(shape, i);\n\t\t}\n\t\tresult.put(RANDOM_PLAYER_STR, gamesRandom);\n\t\tresult.put(DEFAULT_PLAYER_STR, gamesDefault);\n\t\tresult.put(DRAW_STR, draws);\n\t\tprintResult(result);\n\t\treturn result;\n\t}", "int getWins() {return _wins;}", "public int getWinRecord()\n {\n return gamesWon;\n }", "public String getStatsOfGames(){\n\n String res = \"\";\n\n if (games.size() <= 0){\n return \"No game registered in tournament\";\n }\n\n for(int num=0; num<games.size(); num++)\n {\n SoccerGames game = games.get(num);\n res += \"Game Id: \" + game.getGameId() + \" \"+ game.getHostTeam().getName() + \": \" + game.goalsScored +\n \" VS \" + game.getOpponentTeam().getName() + \": \" + game.concededGoal;\n\n }\n return res;\n }", "public static Player whoWonGame() {\r\n\t\tint highest = Main.winScoreNumb;\r\n\t\tPlayer winner = null;\r\n\t\t\r\n\t\t//Three handed play.\r\n\t\tif (Main.isThreeHanded){\r\n\t\t\tif (Utils.stringToInt(Main.player1Score) >= highest) {\r\n\t\t\t\thighest = Utils.stringToInt(Main.player1Score);\r\n\t\t\t\twinner = Main.playerOne;\r\n\t\t\t}\r\n\t\t\tif (Utils.stringToInt(Main.player2Score) >= highest) {\r\n\t\t\t\thighest = Utils.stringToInt(Main.player2Score);\r\n\t\t\t\twinner = Main.playerTwo;\r\n\t\t\t}\r\n\t\t\tif (Utils.stringToInt(Main.player3Score) >= highest) {\r\n\t\t\t\thighest = Utils.stringToInt(Main.player3Score);\r\n\t\t\t\twinner = Main.playerThree;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Four handed play with no teams.\r\n\t\tif (Main.isFourHandedSingle){\r\n\t\t\tif (Utils.stringToInt(Main.player1Score) >= highest) {\r\n\t\t\t\thighest = Utils.stringToInt(Main.player1Score);\r\n\t\t\t\twinner = Main.playerOne;\r\n\t\t\t}\r\n\t\t\tif (Utils.stringToInt(Main.player2Score) >= highest) {\r\n\t\t\t\thighest = Utils.stringToInt(Main.player2Score);\r\n\t\t\t\twinner = Main.playerTwo;\r\n\t\t\t}\r\n\t\t\tif (Utils.stringToInt(Main.player3Score) >= highest) {\r\n\t\t\t\thighest = Utils.stringToInt(Main.player3Score);\r\n\t\t\t\twinner = Main.playerThree;\r\n\t\t\t}\r\n\t\t\tif (Utils.stringToInt(Main.player4Score) >= highest) {\r\n\t\t\t\thighest = Utils.stringToInt(Main.player4Score);\r\n\t\t\t\twinner = Main.playerFour;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn winner;\r\n\t}", "List<Player> getPlayers();", "private int get2(String name) {\n int t = 0;\n PlayerRecord curr = playerlist.first();\n while (curr != null) {\n if (curr.getTeamname().equals(name))\n t = t + curr.getWinninggoals(); // sum of all GWGs\n curr = playerlist.next();\n }\n return t;\n }", "public List<String> getRankingPlayer() throws IOException, ClassNotFoundException {\r\n return ctrlDomain.getRankingPlayer();\r\n }", "public List<Integer> getWinTurns(Predicate<GameResult> filter) {\n return results.stream()\n .filter(filter)\n .map(GameResult::getEndTurn)\n .distinct()\n .sorted()\n .collect(Collectors.toList());\n }", "public abstract Player getWinner();", "public List<Player> winnerWhenBlocked(Player p) {\r\n System.out.println(\"The game is blocked\");\r\n Map<Integer, Integer> aux = new HashMap<>();\r\n for (Player player : players) {\r\n if (p.getTeam() == player.getTeam()) {\r\n aux.put(player.getTeam(), aux.get(player.getTeam()) + player.getDominoPoints());\r\n } else {\r\n aux.put(player.getTeam(), aux.get(player.getTeam()) + player.getDominoPoints());\r\n }\r\n }\r\n int winnerkey = 0;\r\n int winnervalue = aux.get(winnerkey);\r\n int loserKey = 1;\r\n int loserValue = aux.get(loserKey);\r\n\r\n System.out.println(\"Winner is\" + aux.get(winnerkey));\r\n if (aux.get(winnerkey) > aux.get(loserKey)) {\r\n winnerkey = 1;\r\n winnervalue = aux.get(winnerkey);\r\n loserKey = 0;\r\n loserValue = aux.get(loserKey);\r\n System.out.println(\"Loser is\" + aux.get(loserKey));\r\n\r\n } else if (aux.size() > 2) {\r\n if (aux.get(winnerkey) > aux.get(2)) {\r\n winnerkey = 1;\r\n winnervalue = 0;\r\n }\r\n if (aux.get(2) < aux.get(loserKey)) {\r\n loserKey = 2;\r\n loserValue = aux.get(loserKey);\r\n }\r\n }\r\n\r\n //We sum the points for the winner\r\n List<Player> winners = new ArrayList<>();\r\n for (Player player : players) {\r\n if (p.getTeam() == winnerkey) {\r\n p.sumPoints(aux.get(loserKey));\r\n winners.add(p);\r\n }\r\n }\r\n return winners;\r\n }", "public ResultSet getStandings() throws SQLException\n\t{\n\t\t// Create a connection to the database.\n\t\t conn = DriverManager.getConnection(DB_URL);\n\t\t// Create a Statement object for the query.\n\t\tStatement stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);\n\t\t// Execute the query.\n\t\tResultSet resultSet = stmt.executeQuery(\"SELECT teamName, wins, loses FROM Team ORDER BY wins DESC\");\n\t\t\n\t\treturn resultSet;\n\t}", "@RequestMapping(\"/playerSplits\")\n\tpublic @ResponseBody\n\tRound playerSplits() {\n\t\tblackJackService.playerSplits(round);\n\t\treturn round;\n\t}", "public int getExtraPacksByWins(int wins) {\n return statistics.getExtraPacksByWins().get(wins);\n }", "public int wins(String team) {\n return 0;\n }", "public int whoWin(){\r\n int winner = -1;\r\n \r\n int highest = 0;\r\n \r\n for(Player player : discWorld.getPlayer_HASH().values()){\r\n if(getPlayerPoints(player) > highest){\r\n highest = getPlayerPoints(player);\r\n winner = player.getID();\r\n }\r\n \r\n }\r\n \r\n return winner;\r\n }", "public List<Player> playMatch(List<Player> arrayListPlayers) {\n\n //instantiate Lists for winners / losers\n List<Player> winners = new ArrayList<>();\n List<Player> losers = new ArrayList<>();\n\n //Pairing up - each Player with the next Player, iterator runs for every 2\n for (int i = 0; i < arrayListPlayers.size(); i += 2) {\n\n System.out.println(arrayListPlayers.get(i).printName() + \" (\" + arrayListPlayers.get(i).score + \") vs \"\n + arrayListPlayers.get((i + 1) % arrayListPlayers.size()).printName() + \" (\" + arrayListPlayers.get(i + 1).score + \")\");\n\n //Extra layer of random scoring, so calculateScore is run with each round\n //Without this, players get an initial score that stay with them through the tournament\n arrayListPlayers.get(i).calculateScore();\n\n //Use score to decipher winner, if (i) score is greater than (i +1) score then add (i) to winners List\n if (arrayListPlayers.get(i).score > arrayListPlayers.get(i + 1).score) {\n winners.add(arrayListPlayers.get(i));\n }\n //And if (i) score is less than (i + 1) score add (i + 1) to winners List\n if (arrayListPlayers.get(i).score < arrayListPlayers.get(i + 1).score) {\n winners.add(arrayListPlayers.get(i + 1));\n\n\n //extra if statement to handle draws, if score is equal add player [0] to winners List, could randomise this?\n } else if\n (arrayListPlayers.get(i).score == arrayListPlayers.get(i + 1).score) {\n winners.add(arrayListPlayers.get(i));\n }\n\n /**\n * Additional if statements for adding Player objects to new List 'losers'\n */\n //Create List of losers (not output)\n if (arrayListPlayers.get(i).score < arrayListPlayers.get(i + 1).score) {\n winners.remove(arrayListPlayers.get(i));\n losers.add(arrayListPlayers.get(i));\n\n } else if (arrayListPlayers.get(i).score > arrayListPlayers.get(i + 1).score) {\n winners.remove(arrayListPlayers.get(i + 1));\n losers.add(arrayListPlayers.get(i + 1));\n }\n }\n\n /**\n * This section of the playRound method outputs the list of winners for each round\n * A sleep function was added in attempt to slow down the output\n */\n\n System.out.println(\"\\n-x-x-x-x-x-x-x W I N N E R S x-x-x-x-x-x-x-\\n\");\n //Loop through winners and attach names\n try {\n sleep(10);\n for (int i = 0; i < winners.size(); i++) {\n //SysOut to console the winners\n System.out.println(winners.get(i).printName() + \" won with \" + winners.get(i).score + \" points\");\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n //Execution completed return winners List<>\n return winners;\n\n }", "public List<Player> getAvailablePlayers(Round round) {\r\n\t\tList<Player> availablePlayers = playerLogic.createNew(round.getPlayers());\r\n\r\n\t\tfor (Match match : round.getMatches()) {\r\n\t\t\tavailablePlayers.removeAll(match.getHomeTeam());\r\n\t\t\tavailablePlayers.removeAll(match.getAwayTeam());\r\n\t\t}\r\n\t\treturn availablePlayers;\r\n\t}", "public void getWinnerRPS(int w) {\n switch(w) {\n case -1: // Error testing\n System.out.println(\"Error: Game not evaluated properly\");\n break;\n case 0: // Implement code for a draw\n //System.out.println(\"It's a draw!\");\n gameString = \"Both drew with \";\n gameString += addRPSPlayed(game.getPlayerPlays());\n break;\n case 1: // Implement code for player won\n //System.out.println(\"Player Won!\");\n gameString = \"Player Won with \";\n pScore++;\n gameString += addRPSPlayed(game.getPlayerPlays());\n break;\n case 2: // Implement code for computer won\n //System.out.println(\"Computer Won!\");\n gameString = \"Computer Won with \";\n cScore++;\n gameString += addRPSPlayed(game.getComputerPlays());\n break;\n }\n game.resetGame();\n }", "public int addWinningGame() {\n\t\tgamesWon++;\n\t\treturn gamesWon;\n\t}", "public Player getWinner() {\n return winner;\n }", "public static Score4MoveType findWinner(Player[] winners) {\n\t\tint countOpponent = 0;\n\t\tint countMe = 0;\n\t\tfor (int i = 0; i < winners.length; i++) {\n\t\t\tif (winners[i] == Player.OPPONENT) {\n\t\t\t\tcountOpponent++;\n\t\t\t} else if (winners[i] == Player.ME) {\n\t\t\t\tcountMe++;\n\t\t\t}\n\t\t}\n\t\treturn winnerDecission(countOpponent, countMe);\n\t}", "public void getScores(){\n String p1 = \"Player 1 has \" + Integer.toString(player1.getWins());\n String p2 = \"Player 2 has \" + Integer.toString(player2.getWins());\n String winner = \"tie\";\n if(player1.getWins()>player2.getWins()){\n winner = player1.getName() + \" wins!!!!\";\n }\n else if(player2.getWins()>player1.getWins()){\n winner = player2.getName() + \" Wins!!!\";\n }\n JOptionPane.showMessageDialog(null, (p1 + \"\\n\" + p2 + \"\\n\" + winner));\n }", "String getWinner();", "public ArrayList<Player> getWinner(){\n\t\tArrayList<Player> _winner = new ArrayList<Player>();\n\t\t\n\t\tshort _score = 0;\n\t\t//find high score first\n\t\tfor(Player p : this.player){\n\t\t\tif(p.score > _score){\n\t\t\t\t_score = p.score;\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(Player p : this.player){\n\t\t\tif(p.score >= _score){\n\t\t\t\t_winner.add(p);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn _winner;\n\t}", "public int getCurrentPlayerFunds(){return currentPlayerTurn.getFunds();}", "public List<LobbyPlayer> getPlayers(String code) throws NoDocumentException {\n return Firebase.requestDocument(\"lobbies/\" + code).toObject(LobbyDTO.class).toModel().getPlayers();\n }", "List<GameResult> getAllGameResults();", "public static Player whoLostGame() {\r\n\t\tint lowest = Main.loseScoreNumb;\r\n\t\tPlayer loser = null;\r\n\t\t\r\n\t\t\r\n\t\t//Three handed play.\r\n\t\tif (Main.isThreeHanded){\r\n\t\t\tif (Utils.stringToInt(Main.player1Score) <= lowest) {\r\n\t\t\t\tlowest = Utils.stringToInt(Main.player1Score);\r\n\t\t\t\tloser = Main.playerOne;\r\n\t\t\t}\r\n\t\t\tif (Utils.stringToInt(Main.player2Score) <= lowest) {\r\n\t\t\t\tlowest = Utils.stringToInt(Main.player2Score);\r\n\t\t\t\tloser = Main.playerTwo;\r\n\t\t\t}\r\n\t\t\tif (Utils.stringToInt(Main.player3Score) <= lowest) {\r\n\t\t\t\tlowest = Utils.stringToInt(Main.player3Score);\r\n\t\t\t\tloser = Main.playerThree;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Four handed play with no teams.\r\n\t\tif (Main.isFourHandedSingle){\r\n\t\t\tif (Utils.stringToInt(Main.player1Score) <= lowest) {\r\n\t\t\t\tlowest = Utils.stringToInt(Main.player1Score);\r\n\t\t\t\tloser = Main.playerOne;\r\n\t\t\t}\r\n\t\t\tif (Utils.stringToInt(Main.player2Score) <= lowest) {\r\n\t\t\t\tlowest = Utils.stringToInt(Main.player2Score);\r\n\t\t\t\tloser = Main.playerTwo;\r\n\t\t\t}\r\n\t\t\tif (Utils.stringToInt(Main.player3Score) <= lowest) {\r\n\t\t\t\tlowest = Utils.stringToInt(Main.player3Score);\r\n\t\t\t\tloser = Main.playerThree;\r\n\t\t\t}\r\n\t\t\tif (Utils.stringToInt(Main.player4Score) <= lowest) {\r\n\t\t\t\tlowest = Utils.stringToInt(Main.player4Score);\r\n\t\t\t\tloser = Main.playerFour;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn loser;\r\n\t}", "@Override\r\n\tpublic ArrayList<String[]> getSeasonHotPlayer(String sift) {\n\t\tStatement stat = null;\r\n\t\tResultSet rs = null;\r\n\t\tString currentSeason = \"20142015\";\r\n\t\tArrayList<String[]> result = new ArrayList<String[]>();\r\n\t\tString playerPath = \"\";\r\n\t\tString teamPath = \"\";\r\n\t\ttry{\r\n\t\t\tstat = connection.createStatement();\r\n\t\t\trs = stat.executeQuery(\"select AbsolutePath from Path where category ='Player'\");\r\n\t\t\tplayerPath = rs.getString(1);\r\n\t\t\trs = stat.executeQuery(\"select AbsolutePath from Path where category ='Team'\");\r\n\t\t\tteamPath = rs.getString(1);\r\n\t\t\trs = stat.executeQuery(\"select PlayerName,\"+sift+\",TeamAbb,PlayerName,TeamAbb from LiftRate T1,Player T2 where T1.PlayerName=T2.Name order by \"+sift+\" desc limit 5\");\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\tString[] tempList = new String[5];\r\n\t\t\t\tfor(int i =0;i<5;i++){\r\n\t\t\t\t\ttempList[i] = rs.getString(i+1);\r\n\t\t\t\t}\r\n\t\t\t\ttempList[3] = playerPath + tempList[3] + \".png\";\r\n\t\t\t\ttempList[4] = teamPath + tempList[4] + \".png\";\r\n\t\t\t\tresult.add(tempList);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfor(int i=0;i<result.size();i++){\r\n\t\t\tSystem.out.println(Arrays.asList(result.get(i)));\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "@Test\r\n\tpublic void findAllGames() {\r\n\t\t// DO: JUnit - Populate test inputs for operation: findAllGames \r\n\t\tInteger startResult = 0;\r\n\t\tInteger maxRows = 0;\r\n\t\t@SuppressWarnings(\"unused\")\r\n\t\tList<Game> response = null;\r\n\t\tTswacct tswacct = null;\r\n\t\tresponse = service.findAllGames4tsw(tswacct, startResult, maxRows);\r\n\t\t// DO: JUnit - Add assertions to test outputs of operation: findAllGames\r\n\t}", "public String win() {\r\n\t\tint blackCount = 0;\r\n\t\tint whiteCount = 0;\r\n\t\tfor (int i=0; i<piece.size(); i++) {\r\n\t\t\tif (piece.get(order[i]).chessPlayer.equals(\"black\")) {\r\n\t\t\t\tblackCount++;\r\n\t\t\t} else if (piece.get(order[i]).chessPlayer.equals(\"white\")) {\r\n\t\t\t\twhiteCount++;\r\n\t\t\t} else continue;\r\n\t\t}\r\n\t\tif (blackCount == 0) {\r\n\t\t\treturn \"white\";\r\n\t\t} else if (whiteCount == 0) {\r\n\t\t\treturn \"black\";\r\n\t\t} else return null;\r\n\t}", "public int getOWins() {\n return oWins;\n }", "public static Player.PlayerTeam getWinningTeam(List<Player> players) {\n int sumForPaper = players.stream()\n .filter(player -> player.getTeam() == Player.PlayerTeam.PAPER)\n .mapToInt(Player::getCurrentScore)\n .sum();\n\n int sumForRock = players.stream()\n .filter(player -> player.getTeam() == Player.PlayerTeam.ROCK)\n .mapToInt(Player::getCurrentScore)\n .sum();\n\n int sumForScissors = players.stream()\n .filter(player -> player.getTeam() == Player.PlayerTeam.SCISSORS)\n .mapToInt(Player::getCurrentScore)\n .sum();\n\n Map<Player.PlayerTeam, Integer> finalList = new HashMap<>();\n finalList.put(Player.PlayerTeam.PAPER, sumForPaper);\n finalList.put(Player.PlayerTeam.ROCK, sumForRock);\n finalList.put(Player.PlayerTeam.SCISSORS, sumForScissors);\n\n int max = Collections.max(finalList.values());\n\n List<Player.PlayerTeam> collect = finalList.entrySet().stream()\n .filter(entry -> entry.getValue() == max)\n .map(entry -> entry.getKey())\n .collect(Collectors.toList());\n\n Player.PlayerTeam winningTeam = collect.get(0);\n\n return winningTeam;\n\n }", "public static Integer getHumanWins() {\n return humanVsBot.XWins + botVsHuman.OWins;\n }", "public int[] getWinLoss()\n {\n int[] winst = new int[]\n {\n wins , losses\n };\n return winst;\n }", "public int getWinner() {return winner();}", "public int wins(String team) {\n return wins[findTeamIndex(team)];\n }", "public SmallGameBoard[] getAllGames(){return games;}", "private void showChampionshipWinner()\n {\n boolean singleWinner = true;\n String winnerDrivers = getDrivers().getDriver(0).getName();\n for(int j = 1; j < getDrivers().getSize(); j++)\n { \n if(getDrivers().getDriver(0).getAccumulatedScore() == getDrivers().getDriver(j).getAccumulatedScore()) // if multiple winners\n {\n singleWinner = false;\n winnerDrivers += \" and \" + getDrivers().getDriver(j).getName();\n break;\n }\n else\n {\n break;\n }\n\n }\n if(singleWinner)\n System.out.println(winnerDrivers + \" is the winner of the championship with \" + getDrivers().getDriver(0).getAccumulatedScore() + \" points\");\n else // if multiple winner\n System.out.println(\"ITS A CHAMPIONSHIP TIE!!!\" + winnerDrivers + \" are the winners of the championship with \" + getDrivers().getDriver(0).getAccumulatedScore() + \" points\");\n }", "public String displayWinnings(){\n int totalWinnings = 0;\n for(int i = 0; i < numPulls; i++){\n totalWinnings += pullWinnings[i];\n }\n return \"Your total Winnings: $\" + totalWinnings;\n }", "public void win() {\n if (turn == 1) {\n p1.incrementLegs();\n if (p1.getLegs() == 5) {\n p1.incrementSets();\n p1.setLegs(0);\n p2.setSets(0);\n\n }\n if (p1LastScore > p1.getHighout()) {\n p1.setHighout(p1LastScore);\n\n }\n\n if (p1.getHighout() > OVERALL_HIGH_OUT) {\n OVERALL_HIGH_OUT = p1.getHighout();\n }\n } else if (turn == 2) {\n p2.incrementLegs();\n if (p2.getLegs() == 5) {\n p2.incrementSets();\n p2.setLegs(0);\n p1.setSets(0);\n\n }\n if (p2LastScore > p2.getHighout()) {\n p2.setHighout(p2LastScore);\n }\n\n if (p2.getHighout() > OVERALL_HIGH_OUT) {\n OVERALL_HIGH_OUT = p2.getHighout();\n }\n\n\n\n }\n changeFirstTurn();\n win = true;\n\n\n\n }", "private List<String> receiveConnectedPlayers(@NotNull String data) {\n ConnectedPlayersDto result = GameGraphics.gson.fromJson(data, ConnectedPlayersDto.class);\n if (result.players != null) {\n players = result.players.stream()\n .filter(Objects::nonNull)\n .map(player -> player.name)\n .collect(Collectors.toList());\n return players;\n }\n return null;\n }", "public final boolean checkForWin() {\r\n boolean result = false;\r\n String player = \"\";\r\n \r\n for (Rail rail : rails) {\r\n if (rail.isWinner()) {\r\n result = true;\r\n for(Tile tile : rail.getTiles()) {\r\n tile.setBackground(Color.GREEN);\r\n player = tile.getText();\r\n }\r\n if (player.equals(\"X\")) {\r\n winningPlayer = \"X\";\r\n this.xWins++;\r\n } else if (player.equals(\"0\")) {\r\n winningPlayer = \"0\";\r\n this.oWins++;\r\n }\r\n break;\r\n }\r\n }\r\n \r\n return result;\r\n }", "public Player roundWinner() {\n\t\tfor(Player player : gamePlayers){\n\t\t\tEvaluator eval = new Evaluator(player, communityCards);\n\t\t\t\n\t\t\tplayer.setHandRank(eval.evaluate());\n\t\t\tplayersByHandRank.add(player);\n\t\t}\n\t\t\n\t\t//lambdas are magic. Sorts players from lowest to highest rank starting with the lowest at the first\n\t\t//index, and the highest at the last.\n\t\tCollections.sort(playersByHandRank, (p1, p2) -> p1.getHandRank().compareTo(p2.getHandRank()));\n\t\t\n\t\t//TODO: Needs to evaluate high card in case of two or more players have the same high hand rank.\n\t\t//the evaluate method in Evaluator sets high card == to the highest card in a pairSet, flush, or straight,\n\t\t//but needs to be able to add it in the event HIGH_CARD is the highest hand a player has.\n\n\t\treturn playersByHandRank.get(playersByHandRank.size() -1);\n\t}", "@RequestMapping(\"/playerweeksstats\")\n public PlayerWeeksStats playerWeeksStats(@RequestParam(value=\"weeks\", defaultValue=\"1-17\") String weeks,\n @RequestParam(value=\"playerId\", defaultValue=\"0\") String playerId) \n {\n String _weeks[] = weeks.split(\"-\");\n\n PlayerWeeksStats pws = new PlayerWeeksStats();\n Map<String, PlayerWeeksStats.WeekStats> ws_map = new HashMap <String, PlayerWeeksStats.WeekStats>();\n\n PlayerStatObject pso = null;\n for (int i = 0; i < _weeks.length; i++)\n {\n pso = PlayersStats.GetPlayerStatsForSeasonWeek(playerId, \"2017\", _weeks[i]);\n ws_map.put(_weeks[i], CreateWeekStatsFromPlayerStatObject(pso));\n }\n \n if (pso != null)\n {\n pws.setId(pso.getId());\n pws.setGsisPlayerId(pso.getGsIsPlayerId());\n pws.setEsbid(pso.getEsbid());\n pws.setName(pso.getName());\n pws.setWeekStats(ws_map);\n }\n \n return pws;\n }", "public void playRound(List<Player> players) {\n\n //winners ArrayList initializer\n List<Player> winners = new ArrayList<>();\n\n //When the tournament started\n start = System.currentTimeMillis();\n\n //Main loop for running rounds, loop x numberOfRounds\n for (int i = 0; i < numberOfRounds; i++) {\n //Loop for titles, if not the last iteration then roundTitle\n if (i != numberOfRounds - 1) {\n roundTitle();\n //else display finalTitle\n } else {\n finalTitle();\n }\n //winners List is passed as the players to run through the round\n winners = playMatch(players);\n players = winners;\n\n //for each loop that calls on Player object method calculateScore, this happens with each round iteration\n for (Player player : players) {\n player.calculateScore();\n }\n\n //Output for the champion\n if (i == numberOfRounds - 1) {\n lineDivider();\n //With numberOfRounds - 1, append remaining winner in the List output as Champion\n String champion = \"\\n\" + winners.get(0).printName() + \" is the champion !!\";\n //Convert string to uppercase for increased impact\n String championUpper = champion.toUpperCase();\n System.out.println(championUpper);\n lineDivider();\n System.out.println(\"******************************************************\");\n\n }\n\n\n }\n //Small method to calculate/sys out time taken to complete the tournament\n end = System.currentTimeMillis();\n timeTaken = start - end;\n System.out.println(\"\\n\\n This Tournament took\" + timeTaken + \" milliseconds to complete\");\n\n }", "public int getGoldByWins(int wins) {\n return statistics.getGoldByWins().get(wins);\n }", "private static int iteration(int considerWinning) {\r\n boolean won = false;\r\n int weeks = 0;\r\n while(won == false) {\r\n int winning[] = calculateLotto();\r\n int collision = Arrays.containsSameValues(USER_LOTTERY, winning);\r\n weeks++;\r\n if(collision == considerWinning) {\r\n\r\n if(weeks < 52) {\r\n System.out.println(\"Got \"+ collision+\" right. Took \"+ weeks + \" weeks.\");\r\n } else {\r\n System.out.println(\"Got \"+ collision+\" right. Took \"+ weeks/52 + \" years.\");\r\n }\r\n\r\n won = true;\r\n }\r\n }\r\n\r\n return (int) weeks / 52;\r\n\r\n }", "private ArrayList<WobblyScore> getWobblyLeaderboard() {\n ArrayList<WobblyScore> wobblyScores = new ArrayList<>();\n String json = DiscordUser.getWobbliesLeaderboard(codManager.getGameId());\n if(json == null) {\n return wobblyScores;\n }\n JSONArray scores = new JSONArray(json);\n for(int i = 0; i < scores.length(); i++) {\n wobblyScores.add(WobblyScore.fromJSON(scores.getJSONObject(i), codManager));\n }\n WobblyScore.sortLeaderboard(wobblyScores, true);\n return wobblyScores;\n }", "public int totalGames() {\n return wins + losses + draws;\n }", "public synchronized void announceWinner(Team team) {\n\n String[] gameStats = new String[players.length];\n for(int i = 0; i < players.length; i++){\n\n String s = players[i].getName() + \": \" + players[i].getCorrectAnswers();\n gameStats[i] = s;\n System.err.println(s);\n }\n\n for (PlayerHandler playerHandler : players) {\n\n if (playerHandler.getTeam() == team) {\n playerHandler.getOutputStream().println(\n GFXGenerator.drawYouWon(playerHandler.getTeam().getColor(), score, teams[0], teams[1]) +\n \"\\n\" + GFXGenerator.drawTable(gameStats, 4, \"GAME STATS (CORRECT ANSWERS)\"));\n\n continue;\n }\n\n playerHandler.getOutputStream().println(\n GFXGenerator.drawGameOver(playerHandler.getTeam().getColor(), score, teams[0], teams[1])+\n \"\\n\" + GFXGenerator.drawTable(gameStats, 4, \"GAME STATS (CORRECT ANSWERS)\"));\n }\n\n }", "@Override\n\tpublic int getOnlinePlayerSum() {\n\t\treturn PlayerManager.getInstance().getOnlinePlayers().size();\n\t}", "@Override\n // report number of players on a given team (or all players, if null)\n\tpublic int numPlayers(String teamName) {\n\n int numPlayers = 0;\n\n\n if (teamName == null) {\n\n for (int i = 0; i < (stats.keySet()).toArray().length; i++) {\n\n numPlayers++;\n\n }\n\n return numPlayers;\n\n }\n\n else {\n\n Collection<SoccerPlayer> soccerPlayers = stats.values();\n\n for (SoccerPlayer sp: soccerPlayers) {\n\n if (sp.getTeamName().equals(teamName)){\n\n numPlayers++;\n }\n }\n\n return numPlayers;\n\n }\n\n\n\t}", "public List<Result> getPlayerResults(Player player) {\t\n\t\treturn results.stream()\n\t\t\t\t.filter(result -> result.participated(player))\n\t\t\t\t.collect(Collectors.toList());\n\t}", "List<GameResult> getAllResults();", "public static int GetPlayersLeft () {\n int players_left = 0;\r\n\r\n // LOOK AT EACH PLAYER AND CHECK IF THEY HAVEN'T LOST\r\n for (int i = 0; i < player_count; i++) {\r\n if (!player[i].lost)\r\n players_left++;\r\n }\r\n\r\n // RETURN THE RESULTS\r\n return players_left;\r\n }", "private List<Player> calculatePoints()\n\t{\n\t\tthis.systemDataInput.printMessage(\"Calculating points...\");\n\t\t\n\t\tArrayList<Player> winningPlayers = new ArrayList<Player>();\n\t\tint maxPoints = 0;\n\t\tint maxBuilding = 0;\n\t\t\n\t\tfor(Player player : playerList)\n\t\t{\n\t\t\tint points = 0;\n\t\t\tint bestBuilding = 0;\n\t\t\t\n\t\t\tfor(Area area : board.getAreaList())\n\t\t\t{\n\t\t\t\tif (!area.hasDemon())\n\t\t\t\t{\n\t\t\t\t\tif (area.hasBuilding(player))\n\t\t\t\t\t{\n\t\t\t\t\t\tpoints += area.getCost();\n\t\t\t\t\t\tif (area.getCost() > bestBuilding)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tbestBuilding = area.getCost();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpoints += 5 * area.getMinionList(player).size();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tint playerMoney = player.getMoneyAmount();\n\t\t\tpoints += playerMoney;\n\t\t\t\n\t\t\tfor(Card card : player.getInFrontOfHimDeck())\n\t\t\t{\n\t\t\t\tfor(Action action : card.getActions(BorrowMoneyFromTheBank.class))\n\t\t\t\t{\n\t\t\t\t\tint moneyToPayBack = ((BorrowMoneyFromTheBank)action).getMoneyToPayBack();\n\t\t\t\t\tif (playerMoney >= moneyToPayBack)\n\t\t\t\t\t{\n\t\t\t\t\t\tpoints -= moneyToPayBack;\n\t\t\t\t\t\tplayerMoney -= moneyToPayBack;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tpoints -= ((BorrowMoneyFromTheBank)action).getPointsToLose();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tplayer.addPoints(points);\n\t\t\tplayer.getDataInput().printMessage(points + \" points\");\n\t\t\t\n\t\t\tif (points > maxPoints || (points == maxPoints && bestBuilding > maxBuilding))\n\t\t\t{\n\t\t\t\tmaxPoints = points;\n\t\t\t\tmaxBuilding = bestBuilding;\n\t\t\t\twinningPlayers.clear();\n\t\t\t\twinningPlayers.add(player);\n\t\t\t}\n\t\t\telse if (points == maxPoints && bestBuilding == maxBuilding)\n\t\t\t{\n\t\t\t\twinningPlayers.add(player);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn winningPlayers;\n\t}", "public int loadedPlayers(){\n return playerMap.size();\n }", "@Test\r\n\tpublic void loadGames() {\r\n\t\t@SuppressWarnings(\"unused\")\r\n\t\tSet<Game> response = null;\r\n\t\tTswacct tswacct = null;\r\n\t\tresponse = service.loadGames4tsw(tswacct);\r\n\t\t// DO: JUnit - Add assertions to test outputs of operation: loadGames\r\n\t}", "private LotteryResults drawOnce(Set<Integer> winningNumbers)\r\n\t{\r\n\t\tLotteryResults results = new LotteryResults();\r\n\t\tfor(LotteryTicket ticket : lotteryTickets)\r\n\t\t{\t\r\n\t\t\tint matchingNumberCount = getIntersection(ticket.getNumbers(), winningNumbers).size();\r\n\t\t\tresults.addResult(ticket.getOwnerName(), getPrize(matchingNumberCount));\r\n\t\t}\r\n\t\treturn results;\r\n\t}", "@Override\n public int getWinner()\n {\n return currentPlayer;\n }", "public void winGame() {\r\n if (data.gameState == 3) \r\n data.winner = 1;\r\n else if (data.gameState == 4) \r\n data.winner = 2;\r\n data.victoryFlag = true;\r\n data.gameState = 5;\r\n }", "public int getWinner() {\n return winner;\n }", "public int getF_Wins() {\n return f_wins;\n }", "public int getWinner();", "public Winner whoWins(){\r\n\r\n /* transfer the matrix to an array */\r\n Sign[] flatBoard = flattenBoard();\r\n\r\n /* check if someone has won */\r\n if (CompPlayer.compWon(flatBoard))\r\n return Winner.COMPUTER;\r\n else if (CompPlayer.playerWon(flatBoard))\r\n return Winner.PLAYER;\r\n else\r\n return Winner.NON;\r\n }", "public ListResponse<PlayerResponse> getPlayers() {\n\t\tcheckProvided();\n\t\treturn players;\n\t}", "Set<String> getPlayers();", "List<Player> listPlayers();", "public int whoWins(int winnersNum){\n if(winnersNum > 1){\n //decide who wins based on the score\n int first = -1;\n for(int i = 0; i < 4; i++){\n if(dinos[i].getHasWon()){\n if(first != -1){\n if(dinos[i].getScore() > dinos[first].getScore()){\n first = i;\n }\n }\n else{\n first = i;\n }\n }\n }\n return first;\n }\n else if (winnersNum == 1) {\n for(int i = 0; i < 4; i++){\n if(dinos[i].getHasWon()){\n return i;\n }\n }\n }\n return -1;\n }", "@Override\n public ArrayList<Player> getPlayers() {return steadyPlayers;}", "public int getWinner() {\n for (int i = 0; i < nrOfPlayers(); i++) {\n if (players.get(i).isFinished()) {\n\n // PLAYERLISTENER : Trigger playerEvent for player that WON\n for (PlayerListener listener : playerListeners) {\n PlayerEvent event = new PlayerEvent(this, players.get(i).getColour(), PlayerEvent.WON);\n listener.playerStateChanged(event);\n }\n return i;\n }\n }\n return -1;\n }", "public Player checkForWinner() {\n if (playersInGame.size() == 1) {\n Player winner = playersInGame.get(0);\n\n // --- DEBUG LOG ---\n // The winner of the game\n Logger.log(\"WINNING PLAYER:\", winner.toString());\n\n return winner;\n } else {\n return null;\n }\n }", "public static Integer getXWins() {\n return humanVsHuman.XWins;\n }", "public int getTotalOfwins() {\n return statistics.get(TypeOfGames.SIMGAME).getNumberOfWins()\n + statistics.get(TypeOfGames.EASYCOMPUTERGAME).getNumberOfWins()\n + statistics.get(TypeOfGames.HARDCOMPUTERGAME).getNumberOfWins();\n }", "public ArrayList<GameData> getGames() {\n\t\tCursor dbGames = getReadableDatabase().rawQuery(\n\t\t\t\t\"SELECT game_id, name, hosting from game\", null);\n\t\tdbGames.moveToFirst();\n\t\tArrayList<GameData> games = new ArrayList<GameData>();\n\t\twhile (!dbGames.isAfterLast()) {\n\t\t\tgames.add(new GameData(dbGames.getInt(0), dbGames.getString(1),\n\t\t\t\t\tdbGames.getInt(2)));\n\t\t\tdbGames.moveToNext();\n\t\t}\n\t\tdbGames.close();\n\t\treturn games;\n\t}" ]
[ "0.6504561", "0.6443578", "0.6421224", "0.63755304", "0.6345159", "0.627053", "0.6257239", "0.61697525", "0.6166861", "0.6153384", "0.6152894", "0.61404115", "0.61351657", "0.6112472", "0.60969365", "0.60565966", "0.60303605", "0.5995046", "0.5991011", "0.59337765", "0.59176004", "0.5906626", "0.5900564", "0.58703905", "0.5845602", "0.5838636", "0.5798559", "0.5796141", "0.57851976", "0.577998", "0.5776372", "0.574809", "0.5743601", "0.57382184", "0.5725743", "0.5724429", "0.5720303", "0.57001984", "0.5694458", "0.5674978", "0.566418", "0.5661553", "0.5661212", "0.5661106", "0.56602466", "0.56510067", "0.56474596", "0.56460434", "0.5645675", "0.5641996", "0.56357896", "0.5632253", "0.5629179", "0.562262", "0.5619051", "0.56159085", "0.5614355", "0.5610408", "0.56089365", "0.5581945", "0.5580281", "0.55782604", "0.5561832", "0.5559321", "0.55587894", "0.55540425", "0.55428237", "0.5530104", "0.5529725", "0.5522924", "0.5519764", "0.5510672", "0.55086195", "0.5504501", "0.55044055", "0.5501661", "0.54844785", "0.5476566", "0.54529005", "0.5446799", "0.5440659", "0.5434612", "0.54326165", "0.54319835", "0.5422901", "0.5418676", "0.5414158", "0.5413677", "0.5409798", "0.5407919", "0.5406865", "0.54033136", "0.5401253", "0.5394483", "0.5390889", "0.53835374", "0.53818285", "0.53812367", "0.537784", "0.5375702" ]
0.7199482
0
adds to the users current winnings by the input value
public void addWinnings(int value) { int winnings = getWinnings(); winnings = winnings + value; String strWinnings = Integer.toString(winnings); BashCmdUtil.bashCmdNoOutput("sed -i \"1s/.*/ "+strWinnings+" /\" data/winnings"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int addWinningGame() {\n\t\tgamesWon++;\n\t\treturn gamesWon;\n\t}", "public void winAccountant()\r\n {\r\n switch (Win)\r\n {case 1: //A tie with scissors\r\n ties++; uSci++; cSci++;\r\n break;\r\n case 2: //A tie with paper\r\n ties++; uPap++; cPap++;\r\n break;\r\n case 3: //A tie with rock\r\n ties++; uRock++; cRock++;\r\n break;\r\n case 4: //A win for user with Scissors\r\n uWins++; uSci++; uSciW++;\r\n cPap++;\r\n break;\r\n case 5: //A win for user with Paper\r\n uWins++; uPap++; uPapW++;\r\n cRock++;\r\n break;\r\n case 6: //A win for user with Rock\r\n uWins++; uRock++; uRockW++;\r\n cSci++;\r\n break;\r\n case 7: //A win for Comp with Scissors\r\n cWins++; cSci++; cSciW++;\r\n uPap++;\r\n break;\r\n case 8: //A win for Comp with Paper\r\n cWins++; cPap++; cPapW++;\r\n uRock++;\r\n break;\r\n case 9: //A win for Comp with Rock\r\n cWins++; cRock++; cRockW++;\r\n uSci++;\r\n break;\r\n default: JOptionPane.showMessageDialog(null,\r\n \"Error: Unknown Win Value - WinCalc.winAccountant 207\", \r\n \"digiRPS - Error\", \r\n JOptionPane.ERROR_MESSAGE);\r\n break;}\r\n \r\n // Update the last three wins\r\n winThree=winTwo;\r\n winTwo=winOne;\r\n winOne=Win;\r\n \r\n }", "private void addWin(LeagueTableEntry entry) {\r\n\t\tentry.setWins(entry.getWins() + 1);\r\n\t\tentry.setPoints(entry.getPoints() + 3);\r\n\t}", "public int addWin() {\n\t\treturn ++this.numWins;\n\t}", "void win() {\n String name = score.getName();\n if (Time.getSecondsPassed() < 1) {\n calculateMissionScore();\n setHighscoreName(name);\n int totalSum = score.getCurrentScore() + (10000 / 1);\n System.out.println(\"You have won the game!\" + \"\\n\" + \"You spend: \" + 1 + \" seconds playing the game!\");\n System.out.println(\"Your score is: \" + totalSum);\n System.out.println(\"your score has been added to highscore\");\n data.addHighscore(score.getName(), totalSum);\n System.out.println(\"\");\n System.out.println(\"Current highscore list is: \");\n System.out.println(data.printHighscore());\n } else {\n calculateMissionScore();\n setHighscoreName(name);\n int totalSum = score.getCurrentScore() + (10000 / Time.getSecondsPassed());\n System.out.println(\"You have won the game!\" + \"\\n\" + \"You spend: \" + Time.getSecondsPassed() + \" seconds playing the game!\");\n System.out.println(\"Your score is: \" + totalSum);\n System.out.println(\"your score has been added to highscore\");\n data.addHighscore(score.getName(), totalSum);\n System.out.println(\"\");\n System.out.println(\"Current highscore list is: \");\n System.out.println(data.printHighscore());\n }\n }", "public void collectWinnings() {\n\t\tif (hand.checkBlackjack()) {\n\t\t\tdouble win = bet * 1.5;\n\t\t\ttotalMoney += (win + bet);\n\t\t} else {\n\t\t\ttotalMoney += (bet + bet);\n\t\t}\n\t}", "public void updateGame() \n\t{\n\t\tif (bet <= credit && bet <=500) // Verify that the bet is valid. \n\t\t{\n\t\t\tcredit = credit - bet; // Decrement the credit by the amount bet\n\t\t\tgamesPlayed++;\n\t\t\tif (ourWin == \"Royal Flush\")\n\t\t\t{\n\t\t\t\tgamesWon++;\t\t\t\t//Increment the amount of games won\n\t\t\t\tcurrentWin = 250 *bet; // Determine the current win\n\t\t\t\tcredit+= currentWin;\t// Add the winnings to the player's credit\n\t\t\t\twinnings+= currentWin;\t// Keep a tally of all the winnings to this point\n\t\t\t\tcreditValue.setText(String.valueOf(credit)); // Update the credit value.\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\telse if (ourWin == \"Straight Flush\")\n\t\t\t{\n\t\t\t\tgamesWon++;\n\t\t\t\tcurrentWin+= 50 * bet;\n\t\t\t\tcredit+= currentWin;\n\t\t\t\twinnings+= currentWin;\n\t\t\t\tcreditValue.setText(String.valueOf(credit));\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\telse if (ourWin == \"Four of a Kind\")\n\t\t\t{\n\t\t\t\tgamesWon++;\n\t\t\t\tcurrentWin+= 25 *bet;\n\t\t\t\tcredit+= currentWin;\n\t\t\t\twinnings+= currentWin;\n\t\t\t\tcreditValue.setText(String.valueOf(credit));\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\telse if (ourWin == \"Full House\")\n\t\t\t{\n\t\t\t\tgamesWon++;\n\t\t\t\tcurrentWin+= 9* bet;\n\t\t\t\tcredit+= currentWin;\n\t\t\t\twinnings+= currentWin;\n\t\t\t\tcreditValue.setText(String.valueOf(credit));\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\telse if (ourWin == \"Flush\")\n\t\t\t{\n\t\t\t\tgamesWon++;\n\t\t\t\tcurrentWin= 6 * bet;\n\t\t\t\tcredit+= currentWin;\n\t\t\t\twinnings+= currentWin;\n\t\t\t\tcreditValue.setText(String.valueOf(credit));\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\telse if (ourWin == \"Straight\")\n\t\t\t{\n\t\t\t\tgamesWon++;\n\t\t\t\tcurrentWin= 4* bet;\n\t\t\t\tcredit+= currentWin;\n\t\t\t\twinnings+= currentWin;\n\t\t\t\tcreditValue.setText(String.valueOf(credit));\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\telse if (ourWin == \"Three of a Kind\")\n\t\t\t{\n\t\t\t\tgamesWon++;\n\t\t\t\tcurrentWin= 3* bet;\n\t\t\t\tcredit+= currentWin;\n\t\t\t\twinnings+= currentWin;\n\t\t\t\tcreditValue.setText(String.valueOf(credit));\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\telse if (ourWin == \"Two Pair\")\n\t\t\t{\n\t\t\t\tgamesWon++;\n\t\t\t\tcurrentWin= 2* bet;\n\t\t\t\tcredit+= currentWin;\n\t\t\t\twinnings+= currentWin;\n\t\t\t\tcreditValue.setText(String.valueOf(credit));\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\telse if (ourWin == \"Jacks or Better\")\n\t\t\t{\n\t\t\t\tgamesWon++;\n\t\t\t\tcurrentWin= bet;\n\t\t\t\tcredit+= currentWin;\n\t\t\t\twinnings+= currentWin;\n\t\t\t\tcreditValue.setText(String.valueOf(credit));\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcreditValue.setText(String.valueOf(credit));\n\t\t\t\tgamesLost++;\n\t\t\t\tlosses+= bet;\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\t//Update the remaining statistics\n\t\t\tplayedValue.setText(String.valueOf(gamesPlayed));\n\t\t\twonValue.setText(String.valueOf(gamesWon));\n\t\t\tlostValue.setText(String.valueOf(gamesLost));\n\t\t\twinningsValue.setText(String.valueOf(winnings));\n\t\t\tlossesValue.setText(String.valueOf(losses));\n\t\t}\t\n\t}", "public void setWins(int value) {\n this.wins = value;\n }", "public void setWins() {\r\n this.wins++;\r\n }", "public void win(int wager){\n bankroll += wager;\n }", "public void incrementWin(){wins += 1;}", "public static void win()\n\t{\n\t\tGame.setMoney(Game.getMoney()+bet);\n\t\tremainingMoneyN.setText(String.valueOf(Game.getMoney()));\n\t\tbet=0;\n\t\ttfBet.setText(\"0\");\n\t\tif(Game.getMoney()>Game.getHighScore())\n\t\t{\n\t\t\tGame.setHighScore(Game.getMoney());\n\t\t\tlblHighScore.setText(String.valueOf(Game.getHighScore()));\n\t\t}\n\t\tlblUpdate.setText(\"You win!\");\n\n\t}", "public void win(int player)\r\n\t{\r\n\t\taccountValue[player]+=pool;\r\n\t\tendRund();\r\n\t}", "private void wins(Player player){\n int win = 1;\n player.setWins(win);\n }", "public void win() {\n if (turn == 1) {\n p1.incrementLegs();\n if (p1.getLegs() == 5) {\n p1.incrementSets();\n p1.setLegs(0);\n p2.setSets(0);\n\n }\n if (p1LastScore > p1.getHighout()) {\n p1.setHighout(p1LastScore);\n\n }\n\n if (p1.getHighout() > OVERALL_HIGH_OUT) {\n OVERALL_HIGH_OUT = p1.getHighout();\n }\n } else if (turn == 2) {\n p2.incrementLegs();\n if (p2.getLegs() == 5) {\n p2.incrementSets();\n p2.setLegs(0);\n p1.setSets(0);\n\n }\n if (p2LastScore > p2.getHighout()) {\n p2.setHighout(p2LastScore);\n }\n\n if (p2.getHighout() > OVERALL_HIGH_OUT) {\n OVERALL_HIGH_OUT = p2.getHighout();\n }\n\n\n\n }\n changeFirstTurn();\n win = true;\n\n\n\n }", "public void increaseWins(){\n this.numberOfWins=this.numberOfWins+1;\n }", "private void calculeStatAdd() {\n resourceA = this.getContext().getGame().getPlayer(idPlayer).getInventory().getValueRessource(type);\n int win = resourceA - resourceB;\n int diff = (resourceB - resourceA) + value;\n this.getContext().getStats().incNbRessourceWinPlayers(idPlayer,type,win);\n this.getContext().getStats().incNbRessourceExtendMaxPlayers(idPlayer,type,diff);\n }", "public void winGame() {\r\n if (data.gameState == 3) \r\n data.winner = 1;\r\n else if (data.gameState == 4) \r\n data.winner = 2;\r\n data.victoryFlag = true;\r\n data.gameState = 5;\r\n }", "public void playGame(){\n do{\n int userGuess = getUserGuess();\n user.getUserGuesses().add(userGuess); // adds guess to user's arraylist\n isWinner(userGuess, chosenNumber);\n }while(!wonGame);\n }", "void addGameScoreToMainScore(){\n sharedPreferences= PreferenceManager.getDefaultSharedPreferences(this);\n editor=sharedPreferences.edit();\n int score=sharedPreferences.getInt(\"gameScore\",0);\n score=score+userCoins;\n editor.putInt(\"gameScore\",score);\n editor.commit();\n\n }", "public void incOWins() {\n oWins++;\n }", "public void addPoints(int turnTotal)\n {\n currentScore += turnTotal;\n \n if (currentScore >= PigGame.GOAL)\n {\n gamesWon++;\n }\n }", "public boolean saveWinnings(int winnings){\n pullWinnings[numPulls] = winnings;\n numPulls += 1;\n return true;\n }", "@Override\n public void updateScore(int winner)\n {\n if (winner == 0)\n {\n playerOneScore++;\n }\n else\n {\n playerTwoScore++;\n }\n }", "public static void addPlayer(League theLeague, Team theTeam, Scanner keyboard) {\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"---Add Player---\");\r\n\t\ttheTeam.teamToString();\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"--Top 20 Free Agents--\");\r\n\t\ttheLeague.getFreeAgents(20);\r\n\r\n\t\tint playerChoice;\r\n\t\tdo {\r\n\t\t\tdo {\r\n\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t\tSystem.out.println(\" 0 - Filter Free Agents by Position\");\r\n\t\t\t\tSystem.out.println(\" -1 - View All Free Agents\");\r\n\t\t\t\tSystem.out.println(\"1-\" + theLeague.playerList().size() + \" - Select a Player\");\r\n\t\t\t\tplayerChoice = Input.validInt(-1, theLeague.playerList().size(), keyboard);\r\n\t\t\t\t\r\n\t\t\t\tif (playerChoice == -1) {\r\n\t\t\t\t\ttheLeague.getFreeAgents();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (playerChoice == 0) {\r\n\t\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t\t\tSystem.out.println(\"Which position would you like to view?\");\r\n\t\t\t\t\tSystem.out.println(\"1 - QB\");\r\n\t\t\t\t\tSystem.out.println(\"2 - WR\");\r\n\t\t\t\t\tSystem.out.println(\"3 - RB\");\r\n\t\t\t\t\tSystem.out.println(\"4 - TE\");\r\n\t\t\t\t\tswitch (Input.validInt(1, 4, keyboard)) {\r\n\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\tSystem.out.println(\"\\n--Top 20 Free Agent QBs--\\n\");\r\n\t\t\t\t\t\ttheLeague.getFreeAgents(20, \"QB\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\tSystem.out.println(\"\\n--Top 20 Free Agent WRs--\\n\");\r\n\t\t\t\t\t\ttheLeague.getFreeAgents(20, \"WR\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 3:\r\n\t\t\t\t\t\tSystem.out.println(\"\\n--Top 20 Free Agent RBs--\\n\");\r\n\t\t\t\t\t\ttheLeague.getFreeAgents(20, \"RB\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 4:\r\n\t\t\t\t\t\tSystem.out.println(\"\\n--Top 20 Free Agent TEs--\\n\");\r\n\t\t\t\t\t\ttheLeague.getFreeAgents(20, \"TE\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} while (playerChoice < 1);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif (theLeague.playerList().get(playerChoice - 1).getIsOwned()) {\r\n\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t\tSystem.out.println(theLeague.playerList().get(playerChoice - 1).playerToString() + \" is not available\");\r\n\t\t\t}\r\n\t\t} while (theLeague.playerList().get(playerChoice - 1).getIsOwned());\r\n\r\n\t\tPlayer thePlayer = theLeague.playerList().get(playerChoice - 1);\r\n\t\tthePlayer.setIsOwned();\r\n\t\ttheTeam.getRoster().add(thePlayer);\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"***\" + theTeam.getManagerName() + \" has added \" + thePlayer.playerToString() + \"***\");\r\n\t}", "public void getScores(){\n String p1 = \"Player 1 has \" + Integer.toString(player1.getWins());\n String p2 = \"Player 2 has \" + Integer.toString(player2.getWins());\n String winner = \"tie\";\n if(player1.getWins()>player2.getWins()){\n winner = player1.getName() + \" wins!!!!\";\n }\n else if(player2.getWins()>player1.getWins()){\n winner = player2.getName() + \" Wins!!!\";\n }\n JOptionPane.showMessageDialog(null, (p1 + \"\\n\" + p2 + \"\\n\" + winner));\n }", "public void addMoneytoPurse(Player player, double winnings) {\n player.addMoneyToPurse(winnings);\n }", "public int incrementNumberWins()\n\t{\n\t\treturn myNumberWins++;\n\t}", "void win() {\n\t\t_money += _bet * 2;\n\t\t_wins++;\n\t\tclearHand();\n\t\t_bet = 0;\n\t}", "public void incrementNumberOfWins(TypeOfGames type) {\n statistics.get(type).incrementNumberOfWins();\n }", "public void win() {\n JOptionPane.showConfirmDialog(null, \"You won! You got out with \" + this.player.getGold() + \" gold!\", \"VICTORY!\", JOptionPane.OK_OPTION);\n this.saveScore();\n this.updateScores();\n this.showTitleScreen();\n }", "public static void addingNewPlayer(){\r\n\t\t//hard code each score includng a total.\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\t\tSystem.out.println(\"Enter the name of the Player?\");\r\n\t\t\t\t\tString name = scan.next();\r\n\t\t\t\t\t\r\n\t\t\t//establishing the connection\r\n\t\t\tstatement = connection.createStatement();\r\n\t\t\t\r\n\t\t\t//inserting the quries assign to the String variables\r\n\t\t\tString query=\"insert into \" + tableName + \" values ('\" + name +\"', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\";\t\t\r\n\t\t\t\r\n\t\t\t//inserting the hard coded data into the table of the datbase\r\n\t\t\tstatement.execute(query);\r\n\t\t\t\r\n\t\t\t//closing the statement\r\n\t\t\tstatement.close();\r\n\t\t\t\r\n\t\t\t\r\n\t\t} catch (SQLException e) {\r\n\t\t System.out.println(\"SQL Exception occurs\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "void addToBotCount( String className, int valueToAdd ) {\n Integer newBotCount;\n Integer oldBotCount;\n\n oldBotCount = m_botTypes.get( className );\n\n if( oldBotCount != null ) {\n if( oldBotCount.intValue() + valueToAdd >= 0 ) {\n newBotCount = new Integer( oldBotCount.intValue() + valueToAdd );\n m_botTypes.put( className, newBotCount );\n }\n }\n }", "public String displayWinnings(){\n int totalWinnings = 0;\n for(int i = 0; i < numPulls; i++){\n totalWinnings += pullWinnings[i];\n }\n return \"Your total Winnings: $\" + totalWinnings;\n }", "public void addWinners(int playerIndex) {\n this.winners.add(playerIndex);\n }", "public void winGame() {\n this.isWinner = true;\n }", "@Override\n\tpublic void updateWinAvGames(Player player) {\n\t\tint gamesWon = 0;\n\t\tList<Game> games = listGames(player);\n\t\tfor (int i=0;i<games.size();i++) { \n\t\t\tif(games.get(i).isWon())\n\t\t\t\tgamesWon++;\n\t\t}\n\t\tdouble winAverage=(double) gamesWon / (double) games.size();\n\t\tplayer.setWinAvg(winAverage);\n\t}", "public int trickWinner(){\n Card.NUMBER one = player1Play.getValue();\n Card.NUMBER two = player2Play.getValue();\n Card.NUMBER three = player3Play.getValue();\n Card.NUMBER four = player4Play.getValue();\n Card.SUIT oneSuit = player1Play.getSuit();\n Card.SUIT twoSuit = player2Play.getSuit();\n Card.SUIT threeSuit = player3Play.getSuit();\n Card.SUIT fourSuit = player4Play.getSuit();\n int[] value = new int[4];\n value[0] = Card.getValsVal(one, oneSuit, currentTrumpSuit);\n value[1] = Card.getValsVal(two, twoSuit, currentTrumpSuit);\n value[2] = Card.getValsVal(three, threeSuit, currentTrumpSuit);\n value[3] = Card.getValsVal(four, fourSuit, currentTrumpSuit);\n if(player1Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[0] += 10;\n }\n if(player2Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[1] += 10;\n }\n if(player3Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[2] += 10;\n }\n if(player4Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[3] += 10;\n }\n if(player1Play.getSuit() == currentTrumpSuit || value[0] == 7){\n value[0] += 20;\n }\n if(player2Play.getSuit() == currentTrumpSuit || value[1] == 7){\n value[1] += 20;\n }\n if(player3Play.getSuit() == currentTrumpSuit || value[2] == 7){\n value[2] += 20;\n }\n if(player4Play.getSuit() == currentTrumpSuit || value[3] == 7){\n value[3] += 20;\n }\n int winner = 0;\n int winVal = 0;\n for(int i = 0; i < 4; i++){\n if(value[i] > winVal){\n winVal = value[i];\n winner = i;\n }\n }\n return winner;\n }", "public void updateScore(){\r\n if (this.isArtist || winners.contains(this)) {\r\n this.score += pointsGainedLastRound;\r\n }\r\n pointsGainedLastRound = 0;\r\n placeLastRound = 0;\r\n }", "private void bankUserScore() {\n if (game.isPlayer_turn()) {\n game.addPlayerScore(round_score);\n player_tot_view.setText(String.valueOf(game.getPlayer_total()));\n }\n else {\n game.addBankScore(round_score);\n bank_tot_view.setText(String.valueOf(game.getBank_total()));\n }\n if (game.isGameWon()) {\n gameWonDialog();\n } else {\n game.changeTurn();\n round_score = 0;\n round_score_view.setText(String.valueOf(round_score));\n String label;\n if (game.isPlayer_turn()) {\n game.incrementRound();\n label = \"Round \" + game.getRound() + \" - Player's Turn\";\n }\n else {\n label = \"Round \" + game.getRound() + \" - Banker's Turn\";\n }\n round_label.setText(label);\n if (!game.isPlayer_turn())\n doBankTurn();\n }\n }", "public void NumberOfPlayers()\r\n {\r\n Input=JOptionPane.showInputDialog(\"Type the number of players\", JOptionPane.YES_NO_OPTION);\r\n \r\n SecondInput = JOptionPane.showInputDialog(\"How many of those \"+ Input +\" players will be AI ?\", JOptionPane.YES_NO_OPTION);\r\n \r\n while(Converter(SecondInput) >= Converter(Input))\r\n {\r\n if(Converter(SecondInput) >= Converter(Input))\r\n {\r\n JOptionPane.showMessageDialog(this,\"AI players can't be equal or more than the original number of players!\",\r\n \"ERROR\",\r\n JOptionPane.ERROR_MESSAGE);\r\n\r\n SecondInput = JOptionPane.showInputDialog(\"How many of those \"+ Input +\" players will be AI ?\", JOptionPane.YES_NO_OPTION);\r\n }\r\n \r\n }\r\n \r\n if(Input!=null)\r\n {\r\n int j = Converter(Input); \r\n \r\n Start();\r\n }\r\n \r\n }", "public void updateWinningsAndCreditsLabelAfterBonusRound(int winnings) {\n\t\tint totalWinnings = winnings + Integer.parseInt(gameView.getWinningsLabelText().substring(5));\n\t\tgameView.updateWinningsLabelText(\"Won: \" + totalWinnings);\n\t\t\n\t\tgameView.updateCreditsLabelText(\"Credits: \" + gameModel.getTotalCredits());\n\t}", "public static void addWin(String name) throws Exception{\n\t Integer newScore = 1;\n\t Map<String, Integer> standings = new TreeMap<String, Integer>();\n\t File xmlFile = getFile();\n\t Score root = new Score();\n\t // System.out.println(xmlFile.getAbsolutePath());\n root = readObjectAsXmlFrom(new FileReader(xmlFile.getAbsolutePath()), root.getClass());\n // writeAsXml(root, new PrintWriter(System.out));\n standings = root.standings;\n if(standings.containsKey(name)) {\n \tint current = standings.get(name);\n \tnewScore = current + 1;\n }\n root.addResult(name,newScore);\n writeAsXml(root, new FileWriter(xmlFile.getAbsolutePath()));\n }", "int getWins() {return _wins;}", "@Override\n public void setWinner(Player winner)\n {\n for(int i = 0; i < gc.getF().size(); i++)\n {\n if(gc.getF().get(i).readyStart() == 0 || gc.getF().get(i).readyStart() == 1)\n {\n gc.getF().get(gc.getF().size() -1).addPlayer(this.winner);\n sl.save(\"The winner of QuarterFinal ID: \" + this.getGameID() + \" is: \"\n + winner.getName(), \"qfwinners.txt\");\n gc.getGameHistory().add(this); \n System.out.println(winner.getName() + \" has won the round! Player added to the Final!\");\n return;\n }\n }\n //If there are no available spots, make a new game\n Final f = new Final();\n System.out.println(\"created a new Final!\");\n f.addPlayer(winner);\n //Save winner details\n sl.save(\"The winner of QuarterFinal ID: \" + this.getGameID() + \" is: \"\n + winner.getName(), \"qfwinners.txt\");\n \n gc.getF().add(f);\n //Move game to history \n gc.getGameHistory().add(this); \n System.out.println(winner.getName() + \" has won the round! Player added to the Final!\");\n \n }", "public void setWins(int wins) {\n if (wins > 0) {\n this.wins = wins;\n }\n }", "public void win(int points, int extra)\n {\n this.roundsWins++;\n this.points += points;\n this.extras += extra;\n int[] record = {this.getFingers(), points, extra};\n this.roundHistory.add(record);\n }", "public void add_to_score(int num){\n score+=num;\n }", "public static void addPlayer(){\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"Enter the player\");\n int player = scanner.nextInt();\n if(player >=2) {\n System.out.println(\"Enter the 2 more than player\");\n cardsPlayer(player);\n }\n\n }", "public void addingPlayedMatch() throws IOException {\n\n displayStatistics();\n Scanner scn = new Scanner(System.in);\n System.out.println(\"Enter date (dd.mm.yyyy): \");\n String scanned = scn.nextLine();\n Date date;\n try {\n date = new SimpleDateFormat(\"dd.mm.yyyy\").parse(scanned);\n } catch (ParseException ex) {\n System.out.println(\"date should in this format!!! >> mm-dd-yyyy\");\n return;\n }\n System.out.println(\"Enter Team 1: \");\n scanned = scn.nextLine();\n FootballClub team1 = null;\n for (FootballClub club : footballClubArrayList) {\n if (club.getClubName().equals(scanned))\n team1 = club;\n }\n if (team1 == null) {\n System.out.println(\"Wrong club name!!!\");\n return;\n }\n System.out.println(\"Enter Team 2: \");\n scanned = scn.nextLine();\n FootballClub team2 = null;\n for (FootballClub club : footballClubArrayList) {\n if (club.getClubName().equals(scanned))\n team2 = club;\n }\n if (team2 == null) {\n System.out.println(\"Wrong club name!!!\");\n return;\n }\n\n System.out.println(\"Team 1 goals: \");\n scanned = scn.nextLine();\n int team1Goal = -1;\n try {\n team1Goal = Integer.parseInt(scanned);\n } catch (Exception e) {\n }\n if (team1Goal == -1) {\n System.out.println(\"Enter the number of goals\");\n return;\n }\n\n System.out.println(\"Team 2 goals: \");\n scanned = scn.nextLine();\n int team2Goal = -1;\n try {\n team2Goal = Integer.parseInt(scanned);\n } catch (Exception e) {\n }\n if (team2Goal == -1) {\n System.out.println(\"Enter the number of goals\");\n return;\n }\n\n\n Match match = new Match(date,team1,team2,team1Goal,team2Goal); //setting variables when user enter number of goals\n match.setDate(date);\n match.setTeam1(team1);\n match.setTeam2(team2);\n match.setTeam1Goal(team2Goal);\n match.setTeam2Goal(team1Goal);\n matchArrayList.add(match);\n team1.setNumOfGoalsScored(team1.getNumOfGoalsScored() + team1Goal);\n team2.setNumOfGoalsScored(team2.getNumOfGoalsScored() + team2Goal);\n team1.setNumOfGoalsReceived(team1.getNumOfGoalsReceived() + team2Goal);\n team2.setNumOfGoalsReceived(team2.getNumOfGoalsReceived() + team1Goal);\n team1.setNumOfMatchesPlayed(team1.getNumOfMatchesPlayed() + 1);\n team2.setNumOfMatchesPlayed(team2.getNumOfMatchesPlayed() + 1);\n\n if (team1Goal > team2Goal) {\n team1.setNumOfPoints(team1.getNumOfPoints() + 3);\n team1.setNumOfWins(team1.getNumOfWins() + 1);\n team2.setNumOfDefeats(team2.getNumOfDefeats() + 1);\n } else if (team1Goal < team2Goal) {\n team2.setNumOfPoints(team2.getNumOfPoints() + 3);\n team2.setNumOfWins(team2.getNumOfWins() + 1);\n team1.setNumOfDefeats(team1.getNumOfDefeats() + 1);\n } else {\n team1.setNumOfPoints(team1.getNumOfPoints() + 1);\n team2.setNumOfPoints(team2.getNumOfPoints() + 1);\n team1.setNumOfDraws(team1.getNumOfDraws() + 1);\n team2.setNumOfDraws(team2.getNumOfDraws() + 1);\n }\n\n FileOutputStream fis = new FileOutputStream(\"clubData.txt\");\n ObjectOutputStream oos = new ObjectOutputStream(fis);\n oos.writeObject(footballClubArrayList);\n oos.close();\n fis.close();\n\n displayStatistics();\n matchArrayList.add(new Match(date, team1, team2, team1Goal, team2Goal));\n\n\n try {\n FileOutputStream fileOut = new FileOutputStream(\"matchData.txt\");\n ObjectOutputStream objectOut = new ObjectOutputStream(fileOut);\n objectOut.writeObject(matchArrayList);\n objectOut.close();\n fileOut.close();\n System.out.println(\"Match added Successfully\");\n\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n\n }", "@EventHandler\n public void onPlayerShootGoalEvent(GameWinEvent event) {\n this.plugin.getServer().getScheduler().runTaskAsynchronously(this.plugin, () -> {\n synchronized (this.statsController) {\n for (final Player player : event.getWinningTeam()) {\n final Stats stats = GameListener.this.statsController.getByPlayer(player);\n stats.setAmountOfWins(stats.getAmountOfWins() + 1);\n this.statsController.store(stats);\n this.plugin.getServer().getScheduler().runTaskLater(this.plugin, () -> this.updateStats(player, stats), 40L);\n }\n }\n });\n }", "private static void updateStatistic(String nameX, String nameO, HashMap<String, HashMap<String, Integer>> winStatistic) {\n if (winStatistic.containsKey(nameX)) {\n if (winStatistic.get(nameX).containsKey(nameO)) {\n winStatistic.get(nameX).put(nameO, winStatistic.get(nameX).get(nameO) + 1);\n } else {\n winStatistic.get(nameX).put(nameO, 1);\n }\n } else {\n HashMap<String, Integer> hashMap = new HashMap<>();\n hashMap.put(nameO, 1);\n winStatistic.put(nameX, hashMap);\n }\n }", "public static void main(String args[]){\n Random random = new Random(); //used to pick a random object from the list\n Board gameBoard = new Board();\n gameBoard.populateBoard(); // populates the board with a bunch of squares\n Player player = new Player(\"John\"); // used to keep track of the players status in the game\n \n Scanner keyboard = new Scanner(System.in);\n\n //loop will run forever unless the user presses the W key\n while(true){\n\n ArrayList<Square> squares = gameBoard.RandomizeList(gameBoard.getList()); //returns a random arraylist from the gameboard\n \n //prints all elements of the random list\n for (Square square : squares){\n System.out.println(square.getTitle());\n }\n //user prompt \n System.out.println(\"Press any key to spin and W to exit\");\n String input = keyboard.nextLine();\n\n //adds the award to the players list of awards\n Square newAward = squares.get(random.nextInt(squares.size()));\n player.addAward(newAward);\n \n System.out.println(\"\\nYour reward: \" +newAward.getTitle()+\"\\n\\n\\n\");\n\n \n \n \n if(input.equalsIgnoreCase(\"w\")){\n break;\n }\n\n \n }\n \n //prints the player's awards to the screen\n \n System.out.println(\"\\n\\n\\nYour awards: \");\n for (Square square : player.getAwards()){\n System.out.println(square.getTitle());\n } \n }", "private void addPointsToPlayer(Player player, int marbleNum) {\n Long score = player.getScore();\n score += marbleNum;\n\n // add the score for the marble 7 places before\n Long value = (Long) placement.get(getMarbel7());\n score += value;\n\n player.setScore(score);\n }", "public void add() {\r\n // Getting the player name.\r\n DialogManager dialog = this.gui.getDialogManager();\r\n String name = dialog.showQuestionDialog(\"Name\", \"Enter your name:\", \"\");\r\n if (name != null) {\r\n this.scoreTable.add(new ScoreInfo(name, this.score.getValue()));\r\n try {\r\n this.scoreTable.save(new File(\"highscores\"));\r\n } catch (IOException e) {\r\n System.out.println(\"Failed creating a file.\");\r\n return;\r\n }\r\n }\r\n }", "private void DeclareWinner(){\n\t\tTextView tvStatus = (TextView) findViewById(R.id.tvStatus);\n\t\tTextView tvP1Score = (TextView) findViewById(R.id.tvP1Score);\n\t\tTextView tvP2SCore = (TextView) findViewById(R.id.tvP2Score);\n\t\tTextView tvTieScore = (TextView) findViewById(R.id.tvTieScore);\n\t\tswitch(winner){\n\t\t\tcase CAT:\n\t\t\t\ttieScore = tieScore + 1;\n\t\t\t\ttvStatus.setText(\"Tie Cat Wins!\");\n\t\t\t\ttvTieScore.setText(String.valueOf(tieScore));\n\t\t\t\tbreak;\n\t\t\tcase P1_WINNER:\n\t\t\t\tp1Score = p1Score + 1;\n\t\t\t\ttvStatus.setText(\"Player 1 Wins!\");\n\t\t\t\ttvP1Score.setText(String.valueOf(p1Score));\n\t\t\t\tbreak;\n\t\t\tcase P2_WINNER:\n\t\t\t\tp2Score = p2Score + 1;\n\t\t\t\ttvStatus.setText(\"Player 2 Wins!\");\n\t\t\t\ttvP2SCore.setText(String.valueOf(p2Score));\n\t\t\t\tbreak;\n\t\t}\n\t}", "public int addPlayer(String name) {\n\t\tUser user = users.get(userTurn);\n\t\tFootballPlayer player = market.findPlayer(name);\n\t\tdouble marketValue = player.getMarketValue();\n\t\tSystem.out.println(\"budget before buy\" + user.getBudget());\n\t\t\n\t\tif(tmpTeam.containsPlayer(name)) {\n\t\t\treturn 1;\n\t\t} \n\t\telse if(user.hasEnoughBudget(marketValue)) {\n\t\t\ttmpTeam.addPlayer(name, player);\n\t\t\tuser.updateBudget(marketValue, \"-\");\n\t\t\tSystem.out.println(\"budget \" + user.getBudget());\n\t\t\tSystem.out.println(\"marketvalue \" +marketValue);\n\t\t\tSystem.out.println(\"budget after buy\" + user.getBudget());\n\t\t\treturn 0;\n\t\t}\n\t\treturn -1;\n\t}", "public void gameWon()\n {\n ScoreBoard endGame = new ScoreBoard(\"You Win!\", scoreCounter.getValue());\n addObject(endGame, getWidth()/2, getHeight()/2);\n }", "private void addPoint(){\n\n userList.addUserCorrect();\n userList.addUserAttempt();\n\n\n //This if levels up the user if they have reached the number of points needed\n if (userList.findCurrent().getNumPointsNeeded()\n <= userList.findCurrent().getNumQuestionsCorrect()) {\n\n userList.addUserPointsNeeded();//increment points needed to level up\n userList.levelUpUser();\n }\n }", "public int getWins() {\n return wins;\n }", "@Override\n\tpublic void win() {\n\t\t\n\t\tfround[fighter1]++;\n\t fplatz[fighter1]=Math.round((float)fplatz[fighter1]/2); \n\t \n\t\tnextRound();\n\t}", "private void Win(Player player){\n player.setBalance(player.getBalance() + player.getWager() * 1.5);\n System.out.println();\n System.out.println(player.getName() + \" wins!\");\n System.out.println(player.getName() + \"'s\" + \" balance is now \" + player.getBalance());\n }", "public void scoringTrick(){\n wizardRule();\n winner.tricksWon++;\n winner = new Player();\n }", "private void checkWin() {\n // Check if a dialog is already displayed\n if (!this.gameOverDisplayed) {\n // Check left paddle\n if (Objects.equals(this.scoreL.currentScore, this.winCount) && (this.scoreL.currentScore != 0)) {\n if (twoUser) {\n gameOver(GeneralFunctions.TWO_1_WIN);\n } else {\n gameOver(GeneralFunctions.ONE_LOSE);\n }\n // Right paddle\n } else if (Objects.equals(this.scoreR.currentScore, this.winCount) && (this.scoreR.currentScore != 0)) {\n if (twoUser) {\n gameOver(GeneralFunctions.TWO_2_WIN);\n } else {\n gameOver(GeneralFunctions.ONE_WIN);\n }\n }\n }\n }", "public void scoring(){\n for (int i=0; i< players.size(); i++){\n Player p = players.get(i);\n p.setScore(10*p.getTricksWon());\n if(p.getTricksWon() < p.getBid() || p.getTricksWon() > p.getBid()){\n int diff = Math.abs(p.getTricksWon() - p.getBid());\n p.setScore(p.getScore() - (10*diff));\n }\n if(p.getTricksWon() == p.getBid()){\n p.setScore(p.getScore() + 20);\n }\n }\n }", "public void addBet(int betAmount) {\n if (playerCash >= betAmount) {\n playerCash -= betAmount;\n playerBet += betAmount;\n }\n }", "public void incGamesPlayed() {\n gamesPlayed++;\n }", "public void updateWithPointWonBy(Player player) {\n if(managerTennisMatch.statusTennisMatch == \"ClassicalGame\") {\n if (player == player1) {\n managerTennisMatch.checkScoreAndUpdateGame(player, player2);\n } else {\n managerTennisMatch.checkScoreAndUpdateGame(player, player1);\n }\n } else if(managerTennisMatch.statusTennisMatch == \"TieBreakInProgress\") {\n player.setScore(player.getScore() + 1);\n if((player1.getScore() >= 7 && player1.getScore() - player2.getScore() >= 2) || (player2.getScore() >= 7 && player2.getScore() - player1.getScore() >= 2)) {\n tennisSetList.get(tennisSetList.size() - 1).getBaseGameList().add(new TieBreakGame(player));\n player1.setScore(0);\n player2.setScore(0);\n }\n } else {\n return;\n }\n }", "private void win(int winner)\n {\n switch (winner) {\n case PLAYER_1_FLAG:\n player1.gameOver(RESULT_WIN);\n player2.gameOver(RESULT_LOSS);\n winSend.close();\n break;\n case PLAYER_2_FLAG:\n player1.gameOver(RESULT_LOSS);\n player2.gameOver(RESULT_WIN);\n \n winSend.close();\n break;\n }\n }", "public static void addScore(int _value){\n scoreCount += _value;\n scoreHUD.setText(String.format(Locale.getDefault(),\"%06d\", scoreCount));\n }", "public void addToTable() {\n\n\n if (this.highScoresTable.getRank(this.scoreBoard.getScoreCounter().getValue()) <= this.highScoresTable.size()) {\n DialogManager dialog = this.animationRunner.getGui().getDialogManager();\n String name = dialog.showQuestionDialog(\"Name\", \"What is your name?\", \"\");\n\n this.highScoresTable.add(new ScoreInfo(name, this.scoreBoard.getScoreCounter().getValue()));\n File highScoresFile = new File(\"highscores.txt\");\n try {\n this.highScoresTable.save(highScoresFile);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }\n\n }", "public void SZTToEveryOtherPlayer(int value) {\n\t\tfor(Player p:players) {\n\t\t\tif(p!=current) {\n\t\t\t\tp.raiseScore(value);\n\t\t\t}\n\t\t}\n\t}", "public void autoAdd()\n {\n switch (this.getGameType())\n {\n case 1:\n for(int i = 0; i < this.participantNum; i++)\n {\n games.get(count - 1).addParticipant(swimmers.get(i).getId(),swimmers.get(i).compete(),swimmers.get(i).getPoints());\n }\n break;\n case 2:\n for(int i = 0; i < this.participantNum; i++)\n {\n games.get(count - 1).addParticipant(runners.get(i).getId(),runners.get(i).compete(),runners.get(i).getPoints());\n }\n break;\n case 3:\n for(int i = 0; i < this.participantNum; i++)\n {\n games.get(count - 1).addParticipant(cyclists.get(i).getId(),cyclists.get(i).compete(),cyclists.get(i).getPoints());\n }\n break;\n }\n\n }", "public void addQuiz(double score){\n quizzes.add(score);\n quizTotal += score;\n}", "public void addScore(){\n\n // ong nuoc 1\n if(birdS.getX() == waterPipeS.getX1() +50){\n bl = true;\n }\n if (bl == true && birdS.getX() > waterPipeS.getX1() + 50){\n score++;\n bl = false;\n }\n\n //ong nuoc 2\n if(birdS.getX() == waterPipeS.getX2() +50){\n bl = true;\n }\n if (bl == true && birdS.getX() > waterPipeS.getX2() + 50){\n score++;\n bl = false;\n }\n\n // ong nuoc 3\n if(birdS.getX() == waterPipeS.getX3() +50){\n bl = true;\n }\n if (bl == true && birdS.getX() > waterPipeS.getX3() + 50){\n score++;\n bl = false;\n }\n\n }", "public static void decidedWinner(){\n if(playerOneWon == true ){\n//\n// win.Fill(\"Player One Has Won !\");\n// new WinnerWindow().setVisible(true);\n }\n else if (playerTwoWon == true){\n// win.Fill(\"Player Two Has Won !\");\n// new WinnerWindow().setVisible(true);\n }\n else\n {\n// win.Fill(\"Match Has been Tied !\");\n// new WinnerWindow().setVisible(true);\n }\n }", "private void increaseScore() {\n this.game.getPlayers().values().forEach(ship -> {\n ship.increaseScore();\n if (ship.getScore() % 5 == 0) {\n this.asteroidsLimit++;\n }\n });\n }", "public void addPoints(int earnedPoints) {score = score + earnedPoints;}", "private void computeWinLose() {\n\n if (!id11.getText().isEmpty()) {\n if ((id11.getText().equals(id00.getText()) && id11.getText().equals(id22.getText())) ||\n (id11.getText().equals(id02.getText()) && id11.getText().equals(id20.getText())) ||\n (id11.getText().equals(id10.getText()) && id11.getText().equals(id12.getText())) ||\n (id11.getText().equals(id01.getText()) && id11.getText().equals(id21.getText()))) {\n winner = id11.getText();\n }\n }\n\n if (!id00.getText().isEmpty()) {\n if ((id00.getText().equals(id01.getText()) && id00.getText().equals(id02.getText())) ||\n id00.getText().equals(id10.getText()) && id00.getText().equals(id20.getText())) {\n winner = id00.getText();\n }\n }\n\n if (!id22.getText().isEmpty()) {\n if ((id22.getText().equals(id21.getText()) && id22.getText().equals(id20.getText())) ||\n id22.getText().equals(id12.getText()) && id22.getText().equals(id02.getText())) {\n winner = id22.getText();\n }\n }\n\n // If all the grid entries are filled, it is a draw\n if (!id00.getText().isEmpty() && !id01.getText().isEmpty() && !id02.getText().isEmpty() && !id10.getText().isEmpty() && !id11.getText().isEmpty() && !id12.getText().isEmpty() && !id20.getText().isEmpty() && !id21.getText().isEmpty() && !id22.getText().isEmpty()) {\n winner = \"Draw\";\n }\n\n if (winner != null) {\n if (\"X\".equals(winner)) {\n winner = playerX;\n } else if (\"O\".equals(winner)) {\n winner = playerO;\n } else {\n winner = \"Draw\";\n }\n showWindow(winner);\n }\n }", "void awardPoints(){\n if (currentPoints <= 100 - POINTSGIVEN) {\n currentPoints += POINTSGIVEN;\n feedback = \"Your current rating is: \" + currentPoints + \"%\";\n }\n }", "public int getWins() {\n return wins;\n }", "public void addScore()\n {\n score += 1;\n }", "public void setWinner(int num){\r\n \twinner = num;\r\n }", "public void addScore(Player player, int amount) {\n if (gameOver) return;\n\n // Set default value.\n if (!playerScore.containsKey(player)) {\n playerScore.put(player, 0);\n }\n\n // Get scores.\n int current = playerScore.get(player);\n int totalScore = amount + current;\n playerScore.replace(player, amount + current);\n\n // Update the scoreboard.\n setBoardData(playerScore);\n\n // Test to see if the score goal has been reached.\n if (totalScore >= maxScore) {\n gameOver = true;\n Bukkit.getPluginManager().callEvent(new IndividualTopScoreWinEvent(playerScore, unit));\n }\n }", "private void updateTokens(ArrayList<Player> winners) {\r\n // le joueur courant a-t-il été traité ? (gagné ou perdu)\r\n boolean done;\r\n for(Player player : players) {\r\n if( ! player.isDealer()) {\r\n done = false;\r\n for(Player winner : winners) {\r\n if(winner == player) {\r\n done = true;\r\n int gain = player.getStake();\r\n String txt = \"\";\r\n if(total(player).max() == 32) {\r\n gain = (int) (gain * 1.5);\r\n txt = \"avec un blackjack\";\r\n }\r\n player.addTokens(gain);\r\n Logger.write(player.getName() + \" a gagné \" + txt + \", il reçoit \" + gain + \" jetons [\" + player.getTokens() + \"]\");\r\n }\r\n }\r\n if(! done) {\r\n player.removeTokens(player.getStake());\r\n Logger.write(player.getName() + \" a perdu, il donne \" + player.getStake() + \" au croupier. [\" + player.getTokens() + \"]\");\r\n // si le joueur n'a plus de jetons, il quitte la partie.\r\n if(player.getTokens() <= 0) {\r\n players.remove(player);\r\n Logger.write(player.getName() + \" n'a plus de jetons, il quitte la partie.\");\r\n }\r\n }\r\n }\r\n }\r\n }", "public void addOneToScore() {\r\n score++;\r\n }", "public void updateGames(String what, int add, String name) {\n Cursor data = users.getItem(name);\n\n int itemID;\n int gamesPlayed;\n int gamesWon;\n while (data.moveToNext()) {\n int idColIndexx = data.getColumnIndex(users.UID);\n int gamesPlayedColIndexx = data.getColumnIndex(users.GAMESPLAYED);\n int gamesWonColIndexx = data.getColumnIndex(users.GAMESWON);\n\n itemID = data.getInt(idColIndexx);\n gamesPlayed = data.getInt(gamesPlayedColIndexx);\n gamesWon = data.getInt(gamesWonColIndexx);\n\n if (what.equals(\"won\")) {\n users.updateGamesWon(String.valueOf(add + gamesWon), itemID);\n }\n else users.updateGamesPlayed(String.valueOf(add + gamesPlayed), itemID);\n\n }\n }", "private void whoIsTheWinner() {\n\t\t// at first we say let the number for winner and the maximal score be 0.\n\t\tint winnerName = 0;\n\t\tint maxScore = 0;\n\t\t// then, for each player, we check if his score is more than maximal\n\t\t// score, and if it is we let that score to be our new maximal score and\n\t\t// we generate the player number by it and we let that player number to\n\t\t// be the winner, in other way maximal scores doen't change.\n\t\tfor (int i = 1; i <= nPlayers; i++) {\n\t\t\tif (totalScore[i] > maxScore) {\n\t\t\t\tmaxScore = totalScore[i];\n\t\t\t\twinnerName = i - 1;\n\t\t\t}\n\t\t}\n\t\t// finally, program displays on screen who is the winner,and what score\n\t\t// he/she/it got.\n\t\tdisplay.printMessage(\"Congratulations, \" + playerNames[winnerName]\n\t\t\t\t+ \", you're the winner with a total score of \" + maxScore + \"!\");\n\t}", "private void drawWinner() {\n boolean allowMultiWinnings = ApplicationDomain.getInstance().getActiveLottery().isTicketMultiWinEnabled();\n\n // Get all lottery numbers without a prize\n ArrayList<LotteryNumber> numbersEligibleForWin = new ArrayList<>();\n TreeMap<Object, Ticket> tickets = ApplicationDomain.getInstance().getActiveLottery().getTickets();\n for (Object ticketId : tickets.keySet()) {\n Ticket ticket = tickets.get(ticketId);\n\n ArrayList<LotteryNumber> availableFromTicket = new ArrayList<>();\n for (LotteryNumber number : ticket.getLotteryNumbers()) {\n if (number.getWinningPrize() == null) {\n availableFromTicket.add(number);\n } else {\n if (!allowMultiWinnings) {\n // Stop looking through the ticket since it already has a winner and\n // multiply winnings are disallowed. And prevent the already-looked-through\n // numbers of the ticket to be added.\n availableFromTicket.clear();\n break;\n }\n }\n }\n numbersEligibleForWin.addAll(availableFromTicket);\n }\n\n // Check for all numbers having won\n if (numbersEligibleForWin.isEmpty()) {\n Toast.makeText(getContext(), R.string.no_winless_numbers, Toast.LENGTH_LONG).show();\n return;\n }\n\n // Draw random number and save the ID in the prize\n int numberSelector = (int) (Math.random() * numbersEligibleForWin.size());\n Prize prizeToBeWon = ApplicationDomain.getInstance().getPrizeToBeWon();\n prizeToBeWon.setNumberId(numbersEligibleForWin.get(numberSelector).getId());\n\n ApplicationDomain.getInstance().prizeRepository.savePrize(prizeToBeWon);\n ApplicationDomain.getInstance().setPrizeToBeWon(null);\n }", "public void bonusForTeamA(View v) {\n\n if (questionNumber <= 19) {\n\n scoreTeamA = scoreTeamA + 5;\n displayForTeamA(scoreTeamA);\n }\n\n\n if (questionNumber == 20) {\n endOfRound = \"true\";\n }\n }", "public void displayPlayerWinnings()\n {\n for(int card = 0; card < playerCardsWon; card++)\n {\n System.out.println(playerWinnings[card].toString());\n }\n }", "public void addScore(int score);", "public void increaseRound() {\n\t\tif(this.activePlayer==this.player1) {\n\t\t\tthis.setScorePlayer1(this.getScorePlayer1()+1);\n\t\t}else {\n\t\t\tthis.setScorePlayer2(this.getScorePlayer2()+1);\n\t\t}\n\t\t//On check si c'est le dernier round\n\t\tif (round != ROUNDMAX) {\n\t\tthis.round++;\n\t\t//On change un round sur deux le premier joueur de la manche\n\t\t\n\t\tif (0==round%2) {\n\t\t\t\n\t\t\tthis.setActivePlayer(player2);\n\t\t}else {\n\t\t\n\t\t\tthis.setActivePlayer(player1);\n\t\t}\n\t\t}else {\n\t\t\t//Sinon la partie est gagne\n\t\t\tdraw.win = true;\n\t\t}\n\t\t}", "public static void AdditonGameMethod() {\n\t\t\t\t\n\t\t\t\tint hardness = 5;\n\t\t\t\tint hardnessStep = 2;\n\t\t\t\tint score = 0;\n\t\t\t\t\n\t\t\t\t// Set up my for loop to go through the number of rounds\n\t\t\t\tint numberOfRounds = 3;\n\t\t\t\tfor(int roundNumber = 1; \n\t\t\t\troundNumber <= numberOfRounds; \n\t\t\t\troundNumber = roundNumber + 1){\n\t\t\t\t\t//System.out.println(\"Inside the for loop. Round: \" + roundNumber);\n\t\t\t\t\tSystem.out.print(\"Round \" + roundNumber + \" of \" + numberOfRounds + \". \");\n\t\t\t\t\tboolean isAnswerCorrect = getAndCheckStudentAnswer(hardness);\n\t\t\t\t\tif(isAnswerCorrect){\n\t\t\t\t\t\tSystem.out.print(\"Your score was \" + score + \" and is now \");\n\t\t\t\t\t\tscore = score + hardness;\n\t\t\t\t\t\tSystem.out.print(score + \". \");\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(roundNumber<numberOfRounds){\n\t\t\t\t\t\t\tSystem.out.print(\"Your hardness was \" + hardness + \" and is now \");\n\t\t\t\t\t\t\thardness = hardness * hardnessStep;\n\t\t\t\t\t\t\tSystem.out.println(hardness + \".\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tSystem.out.print(\"Your score is \" + score + \". \");\n\t\t\t\t\t\tif(roundNumber<numberOfRounds){\n\t\t\t\t\t\t\tSystem.out.print(\"Your hardness was \" + hardness + \" and is now \");\n\t\t\t\t\t\t\tif(hardness>5){\n\t\t\t\t\t\t\t\thardness = hardness / hardnessStep;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tSystem.out.println(hardness + \".\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.print(\"\\nThe game is complete. \");\n\t\t\t\tSystem.out.println(\"Your final score was \" + score );\n\t\t\t}", "@Override\n public void actionPerformed(ActionEvent ae)\n {\n total++;\n String display = \"\";\n if(jt.getText().trim().equals(qs.getAnswer().trim()))\n {\n score++;\n display += \"Score : \"+score+ \" / \" +total;\n //myDialog.setTitle(\"ok \"+score+\" / \"+total);\n }else{\n display += \"Score : \"+score+ \" / \" +total;\n display += \" prev answer : \"+qs.getAnswer().trim();\n }\n scoreBoard.setText(display);\n addDataTolist();\n\n }", "private void playerTurns()\r\n\t{\r\n\t\t// Setting up user input\r\n\t\tScanner key = new Scanner(System.in);\r\n\t\tString choice = \"\";\r\n\t\t\r\n\t\t// continues turn until win/loss or player chooses to stand\r\n\t\twhile ( !player1.getStand() && !endGame )\r\n\t\t{\r\n\t\t\t// Promps user for input\r\n\t\t\tSystem.out.println(\"Do you wish to hit or stand? (1 = Hit, 2 = Stand)\");\r\n\t\t\t\r\n\t\t\t// Accepts user input as string\r\n\t\t\tchoice = key.nextLine();\r\n\t\t\t\r\n\t\t\t// Only accepts input of 1 or 2\r\n\t\t\tif (choice.equals(\"1\"))\r\n\t\t\t{\r\n\t\t\t\t// adds card to player1 hand from cardDeck object\r\n\t\t\t\tSystem.out.println(\"Hitting...\");\r\n\t\t\t\tplayer1.hit( cardDeck.draw() );\r\n\t\t\t}\r\n\t\t\telse if (choice.equals(\"2\"))\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Passing...\");\r\n\t\t\t\tplayer1.stand();\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"That input was not recognized.\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// displays current player hand\r\n\t\t\tdisplayPlayerCards(PLAYER1_ID);\r\n\t\t\t\r\n\t\t\t// evaluates win conditions\r\n\t\t\tevaluateWin(false);\r\n\t\t} // end while\r\n\t}", "private void updatePlayersWorth(){\n for (Player e : playerList) {\n e.setPlayerWorth(getTotalShareValue(e) + e.getFunds());\n }\n }", "private int get2(String name) {\n int t = 0;\n PlayerRecord curr = playerlist.first();\n while (curr != null) {\n if (curr.getTeamname().equals(name))\n t = t + curr.getWinninggoals(); // sum of all GWGs\n curr = playerlist.next();\n }\n return t;\n }", "protected void playGame(int spinValue,Entry<ArrayList<String>, ArrayList<int[]>> betAmountRange, ArrayList<Integer> relativeBetAmount){\n\t\tint rangeIndex = 0;\n\t\twonOrLost = false;\n\t\tfor(String type : betAmountRange.getKey()){\n\t\t\tchangeMoney(winLoseAmount(type, relativeBetAmount.get(rangeIndex), spinValue, betAmountRange.getValue().get(rangeIndex)));\n\t\t\trangeIndex++;\n\t\t}\n\t}", "public void wonPoint(String playerName) {\n if (playerName.equals(player1Name))\n this.player1Score += 1;\n else\n this.player2Score += 1;\n }" ]
[ "0.6685077", "0.66628456", "0.6582678", "0.6560307", "0.6452704", "0.6437567", "0.6432705", "0.6274724", "0.6257603", "0.62488025", "0.62188256", "0.6209772", "0.6203855", "0.6196321", "0.61587334", "0.6135728", "0.6127923", "0.6125179", "0.6084189", "0.601662", "0.59973687", "0.5995316", "0.59874135", "0.59696555", "0.5819129", "0.5817084", "0.58105284", "0.57913333", "0.5761824", "0.5722065", "0.57126296", "0.5711615", "0.57113445", "0.57027334", "0.5697416", "0.5688907", "0.56830525", "0.5682683", "0.56769246", "0.5673562", "0.56645525", "0.56581616", "0.5652287", "0.5649475", "0.5645773", "0.56389254", "0.5624915", "0.56235915", "0.561759", "0.5617518", "0.55988944", "0.5585998", "0.55803543", "0.55797356", "0.556949", "0.55531764", "0.55522895", "0.5551043", "0.55372965", "0.5533676", "0.5526555", "0.55222094", "0.5519429", "0.5515139", "0.5508479", "0.55074483", "0.55051255", "0.5481571", "0.5479973", "0.54786783", "0.54753524", "0.54640275", "0.54592013", "0.5449722", "0.54407674", "0.5438742", "0.54381216", "0.54307705", "0.5426559", "0.5426068", "0.54228824", "0.5419671", "0.54143965", "0.5414121", "0.5406337", "0.54028803", "0.53951937", "0.5392893", "0.53752434", "0.5370191", "0.5368499", "0.53672445", "0.53663236", "0.53611714", "0.536065", "0.5342906", "0.5338007", "0.5337208", "0.533656", "0.53321296" ]
0.75483626
0
decrease the users current winnings by the input value
public void decreaseWinnings(int value) { int winnings = getWinnings(); winnings = winnings - value; String strWinnings = Integer.toString(winnings); BashCmdUtil.bashCmdNoOutput("sed -i \"1s/.*/ "+strWinnings+" /\" data/winnings"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setWins(int value) {\n this.wins = value;\n }", "void decreaseScore(){\n\t\tcurrentScore = currentScore - 10;\n\t\tcom.triviagame.Trivia_Game.finalScore = currentScore;\n\t}", "public void SZTToEveryOtherPlayer(int value) {\n\t\tfor(Player p:players) {\n\t\t\tif(p!=current) {\n\t\t\t\tp.raiseScore(value);\n\t\t\t}\n\t\t}\n\t}", "public void decrementTotalScore(){\n totalScore -= 1;\n }", "public static void lose()\n\t{\n\t\tGame.setMoney(Game.getMoney()-bet);\n\t\tremainingMoneyN.setText(String.valueOf(Game.getMoney()));\n\t\tbet=0;\n\t\ttfBet.setText(\"0\");\n\t\tlblUpdate.setText(\"The dealer wins\");\n\t\tif(Game.getMoney()<=0)\n\t\t{\n\t\t\tGame.setComplete(true);\n\t\t\tendGameSequence();\n\n\t\t}\n\t}", "private void wins(Player player){\n int win = 1;\n player.setWins(win);\n }", "public void SZTFromEveryOtherPlayer(int value) {\n\t\tfor(Player p:players) {\n\t\t\tif(p!=current) {\n\t\t\t\tp.lowerScore(value);\n\t\t\t\tcurrent.raiseScore(value);\n\t\t\t}\n\t\t}\n\t}", "public void updateGame() \n\t{\n\t\tif (bet <= credit && bet <=500) // Verify that the bet is valid. \n\t\t{\n\t\t\tcredit = credit - bet; // Decrement the credit by the amount bet\n\t\t\tgamesPlayed++;\n\t\t\tif (ourWin == \"Royal Flush\")\n\t\t\t{\n\t\t\t\tgamesWon++;\t\t\t\t//Increment the amount of games won\n\t\t\t\tcurrentWin = 250 *bet; // Determine the current win\n\t\t\t\tcredit+= currentWin;\t// Add the winnings to the player's credit\n\t\t\t\twinnings+= currentWin;\t// Keep a tally of all the winnings to this point\n\t\t\t\tcreditValue.setText(String.valueOf(credit)); // Update the credit value.\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\telse if (ourWin == \"Straight Flush\")\n\t\t\t{\n\t\t\t\tgamesWon++;\n\t\t\t\tcurrentWin+= 50 * bet;\n\t\t\t\tcredit+= currentWin;\n\t\t\t\twinnings+= currentWin;\n\t\t\t\tcreditValue.setText(String.valueOf(credit));\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\telse if (ourWin == \"Four of a Kind\")\n\t\t\t{\n\t\t\t\tgamesWon++;\n\t\t\t\tcurrentWin+= 25 *bet;\n\t\t\t\tcredit+= currentWin;\n\t\t\t\twinnings+= currentWin;\n\t\t\t\tcreditValue.setText(String.valueOf(credit));\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\telse if (ourWin == \"Full House\")\n\t\t\t{\n\t\t\t\tgamesWon++;\n\t\t\t\tcurrentWin+= 9* bet;\n\t\t\t\tcredit+= currentWin;\n\t\t\t\twinnings+= currentWin;\n\t\t\t\tcreditValue.setText(String.valueOf(credit));\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\telse if (ourWin == \"Flush\")\n\t\t\t{\n\t\t\t\tgamesWon++;\n\t\t\t\tcurrentWin= 6 * bet;\n\t\t\t\tcredit+= currentWin;\n\t\t\t\twinnings+= currentWin;\n\t\t\t\tcreditValue.setText(String.valueOf(credit));\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\telse if (ourWin == \"Straight\")\n\t\t\t{\n\t\t\t\tgamesWon++;\n\t\t\t\tcurrentWin= 4* bet;\n\t\t\t\tcredit+= currentWin;\n\t\t\t\twinnings+= currentWin;\n\t\t\t\tcreditValue.setText(String.valueOf(credit));\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\telse if (ourWin == \"Three of a Kind\")\n\t\t\t{\n\t\t\t\tgamesWon++;\n\t\t\t\tcurrentWin= 3* bet;\n\t\t\t\tcredit+= currentWin;\n\t\t\t\twinnings+= currentWin;\n\t\t\t\tcreditValue.setText(String.valueOf(credit));\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\telse if (ourWin == \"Two Pair\")\n\t\t\t{\n\t\t\t\tgamesWon++;\n\t\t\t\tcurrentWin= 2* bet;\n\t\t\t\tcredit+= currentWin;\n\t\t\t\twinnings+= currentWin;\n\t\t\t\tcreditValue.setText(String.valueOf(credit));\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\telse if (ourWin == \"Jacks or Better\")\n\t\t\t{\n\t\t\t\tgamesWon++;\n\t\t\t\tcurrentWin= bet;\n\t\t\t\tcredit+= currentWin;\n\t\t\t\twinnings+= currentWin;\n\t\t\t\tcreditValue.setText(String.valueOf(credit));\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcreditValue.setText(String.valueOf(credit));\n\t\t\t\tgamesLost++;\n\t\t\t\tlosses+= bet;\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\t//Update the remaining statistics\n\t\t\tplayedValue.setText(String.valueOf(gamesPlayed));\n\t\t\twonValue.setText(String.valueOf(gamesWon));\n\t\t\tlostValue.setText(String.valueOf(gamesLost));\n\t\t\twinningsValue.setText(String.valueOf(winnings));\n\t\t\tlossesValue.setText(String.valueOf(losses));\n\t\t}\t\n\t}", "@Override\n public void updateScore(int winner)\n {\n if (winner == 0)\n {\n playerOneScore++;\n }\n else\n {\n playerTwoScore++;\n }\n }", "public void win(int wager){\n bankroll += wager;\n }", "private void endTurn() {\n\t\t\n\t\tif (roundChanger == 1) {\n\t\t\tString currentPlayer = textFieldCurrentPlayer.getText();\n\t\t\tif (currentPlayer.equals(\"Player1\")) {\n\t\t\t\ttextAreaInstructions.setText(\"The current roll to beat is \" + player1.getDie1()\n\t\t\t\t+ \" \" + player1.getDie2() + \" \" + player1.getDie3());\n\t\t\t\trollToBeat = \"The current roll to beat is \" + player1.getDie1()\n\t\t\t\t+ \" \" + player1.getDie2() + \" \" + player1.getDie3();\n\t\t\t} else {\n\t\t\t\ttextAreaInstructions.setText(\"The current roll to beat is \" + player2.getDie1()\n\t\t\t\t+ \" \" + player2.getDie2() + \" \" + player2.getDie3());\n\t\t\t\trollToBeat = \"The current roll to beat is \" + player2.getDie1()\n\t\t\t\t+ \" \" + player2.getDie2() + \" \" + player2.getDie3();\n\t\t\t} \n\t\t\tchangeCurrentPlayerText();\n\t\t\tturn = 0;\n\t\t\troundChanger = 2;\n\t\t} else {\n\t\t\tString winningPlayer = calculateScore(player1, player2);\n\t\t\ttextFieldCurrentPlayer.setText(winningPlayer);\n\t\t\troundChanger = 1;\n\t\t\trollsTaken = 0;\n\t\t\tround = round + 1;\n\t\t\ttextFieldPlayerOneScore.setText(Integer.toString(player1.getPoints()));\n\t\t\ttextFieldPlayerTwoScore.setText(Integer.toString(player2.getPoints()));\n\t\t\ttextAreaInstructions.setText(\"Try to get the highest roll possible!\");\n\t\t\tcheckForGameOver();\n\t\t}\n\t\ttogglebtnD1.setSelected(false);\n\t\ttogglebtnD2.setSelected(false);\n\t\ttogglebtnD3.setSelected(false);\n\t\tdisableDice();\n\t\tturn = 0;\n\t}", "void losePoints() {\n if (currentPoints >= POINTSGIVEN) {\n currentPoints -= POINTSGIVEN;\n feedback = \"Your current rating is: \" + currentPoints + \"%\";\n }\n }", "public void setWins() {\r\n this.wins++;\r\n }", "public void updatePlayerScore()\n\t{\n\t\tthis.score = (int)(getBalance() - 500) - (getNumberOfLoans()*500); \n\t}", "public void rise(int player,int value)\r\n\t{\r\n\t\tif(playerBet[player]<maxBet)call(player);\r\n\t\tif((playerBet[player]+value)>accountValue[player])System.out.print(\"wyjatek\");\r\n\t\tplayerBet[player]+=value;\r\n\t\taccountValue[player]=accountValue[player]-value;\r\n\t\tmaxBet+=value;\r\n\t\tpool+=value;\r\n\t\t\r\n\t}", "public void rollBackTotal( int turnQuit )\n {\n totalScore -= turnScores[turnQuit];\n }", "public static void win()\n\t{\n\t\tGame.setMoney(Game.getMoney()+bet);\n\t\tremainingMoneyN.setText(String.valueOf(Game.getMoney()));\n\t\tbet=0;\n\t\ttfBet.setText(\"0\");\n\t\tif(Game.getMoney()>Game.getHighScore())\n\t\t{\n\t\t\tGame.setHighScore(Game.getMoney());\n\t\t\tlblHighScore.setText(String.valueOf(Game.getHighScore()));\n\t\t}\n\t\tlblUpdate.setText(\"You win!\");\n\n\t}", "public void winGame() {\r\n if (data.gameState == 3) \r\n data.winner = 1;\r\n else if (data.gameState == 4) \r\n data.winner = 2;\r\n data.victoryFlag = true;\r\n data.gameState = 5;\r\n }", "public void win(int player)\r\n\t{\r\n\t\taccountValue[player]+=pool;\r\n\t\tendRund();\r\n\t}", "@Override\n\tpublic void lose() {\n\t\t\n\t\tfround[fighter2]++;\n\t fplatz[fighter2]=Math.round((float)fplatz[fighter2]/2); \n\t\tnextRound();\n\t}", "public void incrementWin(){wins += 1;}", "public void increaseWins(){\n this.numberOfWins=this.numberOfWins+1;\n }", "public void winAccountant()\r\n {\r\n switch (Win)\r\n {case 1: //A tie with scissors\r\n ties++; uSci++; cSci++;\r\n break;\r\n case 2: //A tie with paper\r\n ties++; uPap++; cPap++;\r\n break;\r\n case 3: //A tie with rock\r\n ties++; uRock++; cRock++;\r\n break;\r\n case 4: //A win for user with Scissors\r\n uWins++; uSci++; uSciW++;\r\n cPap++;\r\n break;\r\n case 5: //A win for user with Paper\r\n uWins++; uPap++; uPapW++;\r\n cRock++;\r\n break;\r\n case 6: //A win for user with Rock\r\n uWins++; uRock++; uRockW++;\r\n cSci++;\r\n break;\r\n case 7: //A win for Comp with Scissors\r\n cWins++; cSci++; cSciW++;\r\n uPap++;\r\n break;\r\n case 8: //A win for Comp with Paper\r\n cWins++; cPap++; cPapW++;\r\n uRock++;\r\n break;\r\n case 9: //A win for Comp with Rock\r\n cWins++; cRock++; cRockW++;\r\n uSci++;\r\n break;\r\n default: JOptionPane.showMessageDialog(null,\r\n \"Error: Unknown Win Value - WinCalc.winAccountant 207\", \r\n \"digiRPS - Error\", \r\n JOptionPane.ERROR_MESSAGE);\r\n break;}\r\n \r\n // Update the last three wins\r\n winThree=winTwo;\r\n winTwo=winOne;\r\n winOne=Win;\r\n \r\n }", "public void scoringTrick(){\n wizardRule();\n winner.tricksWon++;\n winner = new Player();\n }", "public void setWins(int wins) {\n if (wins > 0) {\n this.wins = wins;\n }\n }", "public void setWinner(int num){\r\n \twinner = num;\r\n }", "public void decrementPossiblePoints() {\n if (groupScore == 1) {groupScore = 0; return;}\n if (groupScore - (groupScore / 2) >= 0) {\n groupScore -= (groupScore / 2);\n }\n }", "public void setLosses(int value) {\n this.losses = value;\n }", "public void resetWinRecord()\n{\n gamesWon = 0;\n}", "public void addWinnings(int value) {\n\t\tint winnings = getWinnings();\n\t\twinnings = winnings + value;\n\t\tString strWinnings = Integer.toString(winnings);\n\t\tBashCmdUtil.bashCmdNoOutput(\"sed -i \\\"1s/.*/ \"+strWinnings+\" /\\\" data/winnings\");\n\t}", "public void win() {\n if (turn == 1) {\n p1.incrementLegs();\n if (p1.getLegs() == 5) {\n p1.incrementSets();\n p1.setLegs(0);\n p2.setSets(0);\n\n }\n if (p1LastScore > p1.getHighout()) {\n p1.setHighout(p1LastScore);\n\n }\n\n if (p1.getHighout() > OVERALL_HIGH_OUT) {\n OVERALL_HIGH_OUT = p1.getHighout();\n }\n } else if (turn == 2) {\n p2.incrementLegs();\n if (p2.getLegs() == 5) {\n p2.incrementSets();\n p2.setLegs(0);\n p1.setSets(0);\n\n }\n if (p2LastScore > p2.getHighout()) {\n p2.setHighout(p2LastScore);\n }\n\n if (p2.getHighout() > OVERALL_HIGH_OUT) {\n OVERALL_HIGH_OUT = p2.getHighout();\n }\n\n\n\n }\n changeFirstTurn();\n win = true;\n\n\n\n }", "public void endsGameAndSetsWinner(Player player) {\n this.winner = player.getId(); \n this.gameStarted = false; \n \n }", "public void raiseScoreSecondRightNeighbor(int value) {\n\t\tplayers.get((players.indexOf(current)+2)%players.size()).raiseScore(value);\n\t}", "void win() {\n\t\t_money += _bet * 2;\n\t\t_wins++;\n\t\tclearHand();\n\t\t_bet = 0;\n\t}", "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}", "private void weakenPlayer(int player, double value) {\n\t\tif (player == LOCAL) {\n\t\t\tif (locStatBonus - value > 0.05) {\n\t\t\t\tlocStatBonus -= value;\n\t\t\t}\n\t\t} else if (player == OPPONENT) {\n\t\t\tif (oppStatBonus - value > 0.05) {\n\t\t\t\toppStatBonus -= value;\n\t\t\t}\n\t\t}\n\t\tweakenPlayerAnimation(player);\n\t}", "void win() {\n String name = score.getName();\n if (Time.getSecondsPassed() < 1) {\n calculateMissionScore();\n setHighscoreName(name);\n int totalSum = score.getCurrentScore() + (10000 / 1);\n System.out.println(\"You have won the game!\" + \"\\n\" + \"You spend: \" + 1 + \" seconds playing the game!\");\n System.out.println(\"Your score is: \" + totalSum);\n System.out.println(\"your score has been added to highscore\");\n data.addHighscore(score.getName(), totalSum);\n System.out.println(\"\");\n System.out.println(\"Current highscore list is: \");\n System.out.println(data.printHighscore());\n } else {\n calculateMissionScore();\n setHighscoreName(name);\n int totalSum = score.getCurrentScore() + (10000 / Time.getSecondsPassed());\n System.out.println(\"You have won the game!\" + \"\\n\" + \"You spend: \" + Time.getSecondsPassed() + \" seconds playing the game!\");\n System.out.println(\"Your score is: \" + totalSum);\n System.out.println(\"your score has been added to highscore\");\n data.addHighscore(score.getName(), totalSum);\n System.out.println(\"\");\n System.out.println(\"Current highscore list is: \");\n System.out.println(data.printHighscore());\n }\n }", "private void scoreloss() {\n \tif (playerturn%2==0) {\n \tscoreplayer1 = scoreplayer1-1;}\n if(playerturn%2==1) {\n \tscoreplayer2 = scoreplayer2-1;\n }\n }", "public void setLoses() {\r\n this.losses++;\r\n }", "public void leftNeighborRaiseScore(int value) {\n\t\tif(players.indexOf(current)<2) {\n\t\t\tplayers.get(players.size()-players.indexOf(current)-1).raiseScore(value);\n\t\t}\n\t\telse {\n\t\t\tplayers.get(players.indexOf(current)-2).raiseScore(value);\n\t\t}\n\t}", "public void stopGame()\r\n\t{\r\n\t\tthis.inProgress = false;\r\n\t\tif(this.round == 0)\r\n\t\t{\r\n\t\t\t++this.round;\r\n\t\t}\r\n\t}", "private void updateRewardsPoints(int amount)\n\t{\n\t\tif(\tfileIO.rewardPoints - amount >= 0){\n\t\t\tfileIO.getPrefs();\n\t\t\tfileIO.rewardPoints = fileIO.rewardPoints - amount;\n\t\t\tfileIO.setPrefs();\n\t\t\trewardPointsTV.setText(Integer.toString(fileIO.rewardPoints));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tmakeToast(\"You don't have enough points for that reward. You can earn more points by completing tasks.\", true);\n\t\t}\n\t}", "public void raiseScoreOfEveryPlayer(int value) {\n\t\tfor(Player p:players) {\n\t\t\tp.raiseScore(value);\n\t\t}\n\t}", "public int trickWinner(){\n Card.NUMBER one = player1Play.getValue();\n Card.NUMBER two = player2Play.getValue();\n Card.NUMBER three = player3Play.getValue();\n Card.NUMBER four = player4Play.getValue();\n Card.SUIT oneSuit = player1Play.getSuit();\n Card.SUIT twoSuit = player2Play.getSuit();\n Card.SUIT threeSuit = player3Play.getSuit();\n Card.SUIT fourSuit = player4Play.getSuit();\n int[] value = new int[4];\n value[0] = Card.getValsVal(one, oneSuit, currentTrumpSuit);\n value[1] = Card.getValsVal(two, twoSuit, currentTrumpSuit);\n value[2] = Card.getValsVal(three, threeSuit, currentTrumpSuit);\n value[3] = Card.getValsVal(four, fourSuit, currentTrumpSuit);\n if(player1Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[0] += 10;\n }\n if(player2Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[1] += 10;\n }\n if(player3Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[2] += 10;\n }\n if(player4Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[3] += 10;\n }\n if(player1Play.getSuit() == currentTrumpSuit || value[0] == 7){\n value[0] += 20;\n }\n if(player2Play.getSuit() == currentTrumpSuit || value[1] == 7){\n value[1] += 20;\n }\n if(player3Play.getSuit() == currentTrumpSuit || value[2] == 7){\n value[2] += 20;\n }\n if(player4Play.getSuit() == currentTrumpSuit || value[3] == 7){\n value[3] += 20;\n }\n int winner = 0;\n int winVal = 0;\n for(int i = 0; i < 4; i++){\n if(value[i] > winVal){\n winVal = value[i];\n winner = i;\n }\n }\n return winner;\n }", "private void calculeStatRemove() {\n resourceA = this.getContext().getGame().getPlayer(idPlayer).getInventory().getValueRessource(type);\n int loose = resourceB - resourceA;\n int diff = (resourceA - resourceB) + value;\n this.getContext().getStats().incNbRessourceLoosePlayers(idPlayer,type,loose);\n this.getContext().getStats().incNbRessourceNotLoosePlayers(idPlayer,type,diff);\n }", "public void increaseRound() {\n\t\tif(this.activePlayer==this.player1) {\n\t\t\tthis.setScorePlayer1(this.getScorePlayer1()+1);\n\t\t}else {\n\t\t\tthis.setScorePlayer2(this.getScorePlayer2()+1);\n\t\t}\n\t\t//On check si c'est le dernier round\n\t\tif (round != ROUNDMAX) {\n\t\tthis.round++;\n\t\t//On change un round sur deux le premier joueur de la manche\n\t\t\n\t\tif (0==round%2) {\n\t\t\t\n\t\t\tthis.setActivePlayer(player2);\n\t\t}else {\n\t\t\n\t\t\tthis.setActivePlayer(player1);\n\t\t}\n\t\t}else {\n\t\t\t//Sinon la partie est gagne\n\t\t\tdraw.win = true;\n\t\t}\n\t\t}", "public void decrementVictoryPoints() {\n\t\tthis.totalVictoryPoints++;\n\t}", "public double withdrawFromSavings(double value)\r\n {\r\n if (value > savings)\r\n {\r\n value = savings;\r\n savings = 0;\r\n } else\r\n {\r\n savings -= value;\r\n }\r\n\r\n return value;\r\n }", "public static void doubling()\n\t{\n\t\tbet*=2;\n\t\tplayersCards.add(deck.deal());\n\t\tcurrentValue();\n\t\ttfBet.setText(String.valueOf(bet));\n\t\tuserCardImg[playersCards.size()-1].setIcon(new ImageIcon(Gameplay.class.getResource(getCard(playersCards.get(playersCards.size()-1)))));\n\t\troundEnd();\n\t}", "public void victory() {\n fieldInerface.setPleasedSmile();\n fieldInerface.timestop();\n int result = fieldInerface.timeGet();\n /*try {\n if (result < Integer.parseInt(best.getProperty(type))) {\n best.setProperty(type, Integer.toString(result));\n fieldInerface.makeChampionWindow(type);\n }\n } catch (NullPointerException e) {\n } catch (NumberFormatException e) {\n best.setProperty(type, Integer.toString(result));\n fieldInerface.makeChampionWindow(type);\n }*/\n\n gamestart = true; // new game isn't started yet!\n for (int j = 0; j < heightOfField; j++)\n for (int i = 0; i < widthOfField; i++)\n if (fieldManager.isCellMined(i, j))\n if (!fieldManager.isCellMarked(i, j)) {\n fieldInerface.putMarkToButton(i, j);\n fieldInerface.decrement();\n }\n gameover = true; // game is over!!\n }", "public void updatePatience(){\n Patience = Patience - 1;\n }", "int getWins() {return _wins;}", "public int getWinner() {return winner();}", "public void setAwayScore(int a);", "public void withdraw(double amount)\n {\n startingBalance -= amount;\n }", "public void tossUpForTeamB(View v) {\n\n if (questionNumber <= 19) {\n scoreTeamB = scoreTeamB + 10;\n questionNumber = questionNumber + 1;\n displayQuestionNumber(questionNumber);\n displayForTeamB(scoreTeamB);\n }\n\n if (questionNumber == 20) {\n Toast.makeText(getApplicationContext(), \"Game Over!\", Toast.LENGTH_SHORT).show();\n\n }\n\n }", "public void decrease() {\r\n --lives;\r\n }", "@Override\n\tpublic int updateScore(int score) {\n\t\t\n\t\t// decrease the score by this amount:\n\t\tscore -= 50;\n\t\t\n\t\treturn score;\n\t}", "@Override\n\tpublic void win() {\n\t\t\n\t\tfround[fighter1]++;\n\t fplatz[fighter1]=Math.round((float)fplatz[fighter1]/2); \n\t \n\t\tnextRound();\n\t}", "private void Lose(Player player){\n player.setBalance(player.getBalance() - player.getWager());\n System.out.println();\n System.out.println(player.getName() + \" lost :/\");\n System.out.println(player.getName() + \"'s\" + \" balance is now \" + player.getBalance());\n }", "@Override\n public void deactivatePowerUp() {\n powerController.updatePowerUpHappening();\n myGame.getStatusDisplay().getMyProgress().updateScoreMultiplier(NORMAL_SCORE_COUNTER);\n }", "public void updateUndo() {\n\n\t\t// player A clicked undo, special case (freeTurn)\n\t\tif (a.getFreeTurn() == true) {\n\t\t\tif (a.getUndoLimit() == 3)\n\t\t\t\treturn;\n\n\t\t\ta.setTurn(true);\n\t\t\tb.setTurn(false);\n\n\t\t\ta.setFreeTurn(false);\n\t\t\ta.incrementUndo();\n\t\t}\n\n\t\t// player B clicked undo, special case (freeTurn)\n\t\telse if (b.getFreeTurn() == true) {\n\t\t\tif (b.getUndoLimit() == 3)//\n\t\t\t\treturn;\n\n\t\t\tb.setTurn(true);\n\t\t\ta.setTurn(false);\n\n\t\t\tb.setFreeTurn(false);\n\t\t\tb.incrementUndo();\n\t\t}\n\n\t\t// player A clicked undo\n\t\telse if (a.getTurn() == false) {\n\t\t\tif (a.getUndoLimit() == 3)\n\t\t\t\treturn;\n\n\t\t\ta.setTurn(true);\n\t\t\tb.setTurn(false);\n\n\t\t\ta.incrementUndo();\n\t\t}\n\n\t\t// player B clicked undo\n\t\telse {\n\t\t\tif (b.getUndoLimit() == 3)//\n\t\t\t\treturn;\n\n\t\t\tb.setTurn(true);\n\t\t\ta.setTurn(false);\n\n\t\t\tb.incrementUndo();\n\t\t}\n\n\t\tfor (int x = 0; x < 14; x++) {\n\t\t\tint prevNumber = bucket[x].gePrevNumOfRocks();\n\t\t\tbucket[x].setnumOfRocks(prevNumber, false);\n\t\t}\n\t}", "public void shotShip() {\r\n score -= 20;\r\n System.out.println(\"Current Score = \"+score);\r\n }", "boolean withdraw (int value )\n {\n if (value>balance)\n {\n return false;\n }\n else {\n balance-=value;\n return true;\n }\n }", "void withdraw() {\n System.out.println(\"Enter the amount to withdraw : \");\n int withdraw = scan.nextInt();\n balance -= withdraw;\n }", "private void win(int winner)\n {\n switch (winner) {\n case PLAYER_1_FLAG:\n player1.gameOver(RESULT_WIN);\n player2.gameOver(RESULT_LOSS);\n winSend.close();\n break;\n case PLAYER_2_FLAG:\n player1.gameOver(RESULT_LOSS);\n player2.gameOver(RESULT_WIN);\n \n winSend.close();\n break;\n }\n }", "private void scoregain() {\n \tif (playerturn%2==0) {\n \tscoreplayer1 = scoreplayer1+2;}\n if(playerturn%2==1) {\n \tscoreplayer2 = scoreplayer2+2;\n }\n }", "public void decrementAmount() {\n this.amount--;\n amountSold++;\n }", "private static void updateGame()\n {\n GameView.gameStatus.setText(\"Score: \" + computerScore + \"-\" + playerScore);\n if (computerScore + playerScore == NUM_CARDS_PER_HAND) {\n if (computerScore > playerScore) {\n GameView.gameText.setText(\"Computer Wins!\");\n Timer.stop = true;\n }\n else if (playerScore > computerScore) {\n GameView.gameText.setText(\"You win!\");\n Timer.stop = true;\n }\n else {\n GameView.gameText.setText(\"Tie game!\"); \n Timer.stop = true;\n }\n }\n }", "public void endGame(Player[] players) { \n int[] ret = calculateScore(players);\n int playerWinnerIdx = 0;\n \n int maxScore = 0;\n for(int i = 0; i < ret.length; i++){\n if(ret[i] > maxScore){\n playerWinnerIdx = i;\n maxScore = ret[i];\n }\n }\n board.setWinningIdx(playerWinnerIdx);\n board.setIsGameEnd(true);\n }", "public void endGame(){\n updateHighscore();\n reset();\n }", "private void bankUserScore() {\n if (game.isPlayer_turn()) {\n game.addPlayerScore(round_score);\n player_tot_view.setText(String.valueOf(game.getPlayer_total()));\n }\n else {\n game.addBankScore(round_score);\n bank_tot_view.setText(String.valueOf(game.getBank_total()));\n }\n if (game.isGameWon()) {\n gameWonDialog();\n } else {\n game.changeTurn();\n round_score = 0;\n round_score_view.setText(String.valueOf(round_score));\n String label;\n if (game.isPlayer_turn()) {\n game.incrementRound();\n label = \"Round \" + game.getRound() + \" - Player's Turn\";\n }\n else {\n label = \"Round \" + game.getRound() + \" - Banker's Turn\";\n }\n round_label.setText(label);\n if (!game.isPlayer_turn())\n doBankTurn();\n }\n }", "public static void decrementActivityScore() {\n\t\tmActivityScore--;\n\t\tsaveScore();\n\t}", "public void decrease() {\n if(this.value>0){\n value--;\n }\n }", "public void scoring(){\n for (int i=0; i< players.size(); i++){\n Player p = players.get(i);\n p.setScore(10*p.getTricksWon());\n if(p.getTricksWon() < p.getBid() || p.getTricksWon() > p.getBid()){\n int diff = Math.abs(p.getTricksWon() - p.getBid());\n p.setScore(p.getScore() - (10*diff));\n }\n if(p.getTricksWon() == p.getBid()){\n p.setScore(p.getScore() + 20);\n }\n }\n }", "private void updateScoreRatios(IGame game, boolean addToTotal) {\n int player1Score = getScore(game, game.getPlayer1());\n int player2Score = getScore(game, game.getPlayer2());\n int difference = Math.abs(player1Score - player2Score);\n\n IPlayer player1 = game.getPlayer1();\n IPlayer player2 = game.getPlayer2();\n\n logger.info(player1 + \" has scored \" + player1Score + \" in total\");\n logger.info(player2 + \" has scored \" + player2Score + \" in total\");\n\n if (player1Score > player2Score) {\n\n if (addToTotal) {\n player1.setScoreRatio(player1.getScoreRatio() + difference);\n player2.setScoreRatio(player2.getScoreRatio() - difference);\n logger.info(player1 + \" +\" + difference + \" = \"\n + player1.getScoreRatio());\n logger.info(player2 + \" -\" + difference + \" = \"\n + player2.getScoreRatio());\n } else {\n logger.info(\"Resetting scores\");\n player2.setScoreRatio(player2.getScoreRatio() + difference);\n player1.setScoreRatio(player1.getScoreRatio() - difference);\n\n logger.info(player2 + \" +\" + difference + \" = \"\n + player2.getScoreRatio());\n logger.info(player1 + \" -\" + difference + \" = \"\n + player1.getScoreRatio());\n }\n\n } else if (player2Score > player1Score) {\n if (addToTotal) {\n player2.setScoreRatio(player2.getScoreRatio() + difference);\n player1.setScoreRatio(player1.getScoreRatio() - difference);\n\n logger.info(player2 + \" +\" + difference + \" = \"\n + player2.getScoreRatio());\n logger.info(player1 + \" -\" + difference + \" = \"\n + player1.getScoreRatio());\n } else {\n logger.info(\"Resetting scores\");\n player1.setScoreRatio(player1.getScoreRatio() + difference);\n player2.setScoreRatio(player2.getScoreRatio() - difference);\n\n logger.info(player1 + \" +\" + difference + \" = \"\n + player1.getScoreRatio());\n logger.info(player2 + \" -\" + difference + \" = \"\n + player2.getScoreRatio());\n }\n }\n }", "public void subtractUnitsToWin(int unitsToWin) {\n this.unitsToWin -= unitsToWin;\n }", "public void updateScore(){\n scoreChange++;\n if(scoreChange % 2 == 0){\n if(score_val < 999999999)\n score_val += 1;\n if(score_val > 999999999)\n score_val = 999999999;\n score.setText(\"Score:\" + String.format(\"%09d\", score_val));\n if(scoreChange == 10000)\n scoreChange = 0;\n }\n }", "private void decrementOpponentRechargeTimes()\n\t{\n\t\tfor (Map.Entry<Skills, Integer> pair : rechargingOpponentSkills.entrySet())\n\t\t{\n\t\t\tint val = pair.getValue();\n\t\t\tSkills s = pair.getKey();\n\t\t\t\n\t\t\tif (val > 0)\n\t\t\t{\n\t\t\t\trechargingOpponentSkills.put(s, --val);\n\t\t\t}\n\t\t}\n\t}", "public void updateScore(){\r\n if (this.isArtist || winners.contains(this)) {\r\n this.score += pointsGainedLastRound;\r\n }\r\n pointsGainedLastRound = 0;\r\n placeLastRound = 0;\r\n }", "public int incrementNumberWins()\n\t{\n\t\treturn myNumberWins++;\n\t}", "public void gameOver(int type) {\n \tthis.winner = state;\n \tif( type == -1 )\n \t\tthis.winner = 0;\n \tthis.state = 0;\n }", "void increaseScore(){\n\t\t currentScore = currentScore + 10;\n\t\t com.triviagame.Trivia_Game.finalScore = currentScore;\n\t }", "@Override\n public void onClick(View v) {\n TextView tries_tv;\n tries_tv = findViewById(R.id.notries_Textview);\n //check to see if tries is 1\n if (tries_tv.getText().equals(\"1\")){\n //do nothing\n } else{\n // converting value to integer and subtracting 1\n Integer amount_tries = (Integer.parseInt(tries_tv.getText().toString()) - 1);\n // putting it back as a String\n String new_tries = amount_tries.toString();\n // updating the tries textview to decremented value\n tries_tv.setText(new_tries);\n }\n }", "public void winGame() {\n this.isWinner = true;\n }", "public void endGame(int winner){\n this.gameOver = true;\n JLabel statusScreen;\n \n if(winner == 1){\n this.remove(gameGrid);\n statusScreen = new JLabel(new ImageIcon(getClass().getResource(\"/win.jpg\")));\n this.add(statusScreen, BorderLayout.CENTER);\n statusBar.setText(\"You Win !!!\");\n }\n \n else if (winner == 2){\n this.remove(gameGrid);\n statusScreen = new JLabel(new ImageIcon(getClass().getResource(\"/loose.gif\")));\n this.add(statusScreen, BorderLayout.CENTER);\n statusBar.setText(\"You Loose ...\");\n }\n \n else if (winner == 3){\n statusBar.setText(\"Tie\");\n }\n \n else{ \n statusBar.setText(\"Your partner has forfeit!\");\n gameGrid.setEnabled(false);\n }\n }", "public void decreaseScore(int p_96646_1_) {\n/* 51 */ if (this.theScoreObjective.getCriteria().isReadOnly())\n/* */ {\n/* 53 */ throw new IllegalStateException(\"Cannot modify read-only score\");\n/* */ }\n/* */ \n/* */ \n/* 57 */ setScorePoints(getScorePoints() - p_96646_1_);\n/* */ }", "public void deductScore(int s) {\n setScore(getScore() - s);\n }", "public void incOWins() {\n oWins++;\n }", "public void doubleDown(){\n\t\ttotalMoney -= bet;\n\t\tbet += bet;\n\t}", "public void resetTally() {\n won_stayed = 0;\n won_switched = 0;\n total_stayed = 0;\n total_switched = 0;\n }", "public void gameOver() {\n this.lives --;\n this.alive = false;\n }", "public void secondLeftNeighborGivesSZTToCurrent(int value) {\n\t\tif(players.indexOf(current)<2) {\n\t\t\tplayers.get(players.size()-players.indexOf(current)-1).lowerScore(value);\n\t\t\tcurrent.raiseScore(value);\n\t\t}\n\t\telse {\n\t\t\tplayers.get(players.indexOf(current)-2).lowerScore(value);\n\t\t\tcurrent.raiseScore(value);\n\t\t}\n\t}", "private void Win(Player player){\n player.setBalance(player.getBalance() + player.getWager() * 1.5);\n System.out.println();\n System.out.println(player.getName() + \" wins!\");\n System.out.println(player.getName() + \"'s\" + \" balance is now \" + player.getBalance());\n }", "public void updatescore() {\n scorelabel.setText(\"\" + score + \" points\");\n if (100 - score <= 10) win();\n }", "private void increaseScore() {\n this.game.getPlayers().values().forEach(ship -> {\n ship.increaseScore();\n if (ship.getScore() % 5 == 0) {\n this.asteroidsLimit++;\n }\n });\n }", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tgame.getData().get(team).setBet(slider.getValue());\n\t\t\t\t\tsetBet.setEnabled(false);\n\t\t\t\t\tnumBets++;\n\t\t\t\t\ttestForFinalBet();\n\t\t\t\t}", "void unsetSingleBetMinimum();", "public void decrease() {\r\n\r\n\t\tdecrease(1);\r\n\r\n\t}", "public void lose()\r\n {\r\n Alert inputConfirmation = new Alert(Alert.AlertType.INFORMATION);\r\n inputConfirmation.setTitle(\"Game Over!\");\r\n inputConfirmation.setHeaderText(\"You Lose!\");\r\n inputConfirmation.setGraphic(null);\r\n scoreBoard.gameTimer.gameTime.cancel();\r\n\r\n inputConfirmation.showAndWait();\r\n }" ]
[ "0.6620154", "0.6484836", "0.6476902", "0.6457206", "0.63235074", "0.6309729", "0.63059664", "0.63043034", "0.62729037", "0.6259022", "0.6247579", "0.6230733", "0.61691386", "0.6166201", "0.6131783", "0.61282635", "0.6112394", "0.61104876", "0.6078324", "0.60725754", "0.6070282", "0.60506374", "0.60035", "0.59834576", "0.59796786", "0.59758985", "0.59737694", "0.5959694", "0.59332", "0.5931497", "0.5928737", "0.59206694", "0.5905711", "0.589332", "0.58923954", "0.58882976", "0.5884752", "0.58717704", "0.5834951", "0.5825299", "0.5805256", "0.5795979", "0.5794822", "0.57889706", "0.57860005", "0.57794994", "0.5778585", "0.5772504", "0.57703245", "0.57647413", "0.576325", "0.57582545", "0.5751018", "0.575014", "0.57442594", "0.5741045", "0.57388246", "0.57289433", "0.57248515", "0.5716613", "0.5711027", "0.57070667", "0.56885207", "0.5680113", "0.56753147", "0.5675298", "0.5672065", "0.56695664", "0.5668401", "0.56661713", "0.56572795", "0.5653999", "0.5653987", "0.56443834", "0.5644356", "0.56423175", "0.5637468", "0.5632649", "0.5620448", "0.5620141", "0.5619942", "0.5618795", "0.56144094", "0.55981827", "0.559704", "0.55969363", "0.5590826", "0.5583783", "0.55832535", "0.55752665", "0.55732685", "0.5568433", "0.5563352", "0.5560013", "0.5555095", "0.55336684", "0.55309796", "0.5515745", "0.5508498", "0.55077153" ]
0.7633091
0
resets the entire game except for player rankings
public void reset(){ BashCmdUtil.bashCmdNoOutput("rm -r data/games_module"); BashCmdUtil.bashCmdNoOutput("sed -i \"1s/.*/ "+"0"+" /\" data/winnings"); BashCmdUtil.bashCmdNoOutput("sed -i \"1s/.*/ "+"175"+" /\" data/tts_speed"); BashCmdUtil.bashCmdNoOutput("rm data/answered_questions"); BashCmdUtil.bashCmdNoOutput("rm data/five_random_categories"); BashCmdUtil.bashCmdNoOutput("rm data/current_player"); _currentPlayer = null; _internationalUnlocked = false; _gamesData.clear(); _fiveRandomCategories.clear(); for (int i= 0; i<5;i++) { _answeredQuestions[i]=0; } BashCmdUtil.bashCmdNoOutput("touch data/answered_questions"); initialiseCategories(); try { readCategories(); } catch (Exception e) { e.printStackTrace(); } setFiveRandomCategories(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void resetGame() {\n rockList.clear();\n\n initializeGame();\n }", "public void resetGame() {\r\n\t\tfor(Player p : players) {\r\n\t\t\tp.reset();\r\n\t\t}\r\n\t\tstate.reset();\r\n\t}", "public void reset() {\n\t\tfor (int i = 0; i<DIVISIONS; i++){\n\t\t\tfor (int j = 0; j<DIVISIONS; j++){\n\t\t\t\tgameArray[i][j] = 0;\n\t\t\t}\n\t\t}\n\t\tgameWon = false;\n\t\twinningPlayer = NEITHER;\n\t\tgameTie = false;\n\t\tcurrentPlayer = USER;\n\t}", "public void resetGameRoom() {\n gameCounter++;\n score = MAX_SCORE / 2;\n activePlayers = 0;\n Arrays.fill(players, null);\n }", "public void resetGame(){\n\t\tPlayer tempPlayer = new Player();\n\t\tui.setPlayer(tempPlayer);\n\t\tui.resetCards();\n\t}", "public void resetGame()\r\n\t{\r\n\t\tthis.inProgress = false;\r\n\t\tthis.round = 0;\r\n\t\tthis.phase = 0;\r\n\t\tthis.prices = Share.generate();\r\n\t\tint i = 0;\r\n\t\twhile(i < this.prices.size())\r\n\t\t{\r\n\t\t\tthis.prices.get(i).addShares(Config.StartingStockPrice);\r\n\t\t\t++i;\r\n\t\t}\r\n\t\tint p = 0;\r\n\t\twhile(p < Config.PlayerLimit)\r\n\t\t{\r\n\t\t\tif(this.players[p] != null)\r\n\t\t\t{\r\n\t\t\t\tthis.players[p].reset();\r\n\t\t\t}\r\n\t\t\t++p;\r\n\t\t}\r\n\t\tthis.deck = Card.createDeck();\r\n\t\tthis.onTable = new LinkedList<>();\r\n\t\tCollections.shuffle(this.deck);\r\n\t\tthis.dealToTable();\r\n\t}", "private void resetAfterGame() {\n }", "public void resetGame() {\r\n\r\n\t\tplayerScore = 0;\r\n\t\tframe.setVisible(false);\r\n\t\tgame = new Game();\r\n\r\n\t}", "public void reset() {\n\n players = new Player[numAIPlayers + 1];\n createHumanPlayer();\n createAIPlayers(numAIPlayers);\n wholeDeck.shuffle();\n\n // --- DEBUG LOG ---\n // The contents of the complete deck after it has been shuffled\n Logger.log(\"COMPLETE GAME DECK AFTER SHUFFLE:\", wholeDeck.toString());\n\n assignCards(wholeDeck, players);\n activePlayer = randomlySelectFirstPlayer(players);\n playersInGame = new ArrayList<>(Arrays.asList(players));\n winningCard = null;\n roundWinner = null;\n\n roundNumber = 1;\n drawRound = 0;\n }", "private void resetGame() {\n game.resetScores();\n this.dialogFlag = false;\n rollButton.setDisable(false);\n undoButton.setDisable(true);\n resetButton.setDisable(true);\n setDefault(\"player\");\n setDefault(\"computer\");\n }", "public void reset() { \r\n myGameOver = false; \r\n myGamePaused = false; \r\n }", "public void reset() {\r\n\t\tplayAgain = false;\r\n\t\tmainMenu = false;\r\n\t\tachievement = 0;\r\n\t}", "@Override\r\n\tpublic void reset() {\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\tgame[i][j].Clear();\r\n\t\t}\r\n\t\tcomputerTurn();\r\n\t\tcomputerTurn();\r\n\t\tfreeCells = rows_size*columns_size - 2;\r\n\t\ttakenCells = 2;\r\n\t}", "private void reset() // reset the game so another game can be played.\n\t{\n\t\tenableControls(); // enable the controls again..\n\n\t\tfor (MutablePocket thisMutPocket: playerPockets) // Reset the pockets to their initial values.\n\t\t{\n\t\t\tthisMutPocket.setDiamondCount(3);\n\t\t}\n\n\t\tfor(ImmutablePocket thisImmPocket: goalPockets)\n\t\t{\n\t\t\tthisImmPocket.setDiamondCount(0);\n\t\t}\n\n\t\tfor(Player thisPlayer: players) // Same for the player..\n\t\t{\n\t\t\tthisPlayer.resetPlayer();\n\t\t}\n\n\t\tupdatePlayerList(); // Update the player list.\n\n\t}", "@Override\n public void reset(MiniGame game) {\n }", "public void reset() {\n gameStatus = null;\n userId = null;\n gameId = null;\n gameUpdated = false;\n selectedTile = null;\n moved = false;\n }", "private void reset() {\n PlayerPanel.reset();\n playersAgentsMap.clear();\n agentList.clear();\n playerCount = 0;\n playerList.removeAll();\n iPlayerList.clear();\n dominator = \"\";\n firstBlood = false;\n }", "private void ResetGame(){\n this.deck = new Deck();\n humanPlayer.getHand().clear();\n humanPlayer.setWager(0);\n dealer.getHand().clear();\n }", "public void reset(){\n newGame();\n removeAll();\n repaint();\n ended = false;\n }", "public void reset()\r\n {\r\n gameBoard.reset();\r\n fillBombs();\r\n fillBoard();\r\n scoreBoard.reset();\r\n }", "public void ResetGame(){\n handComputer.clear();\n handHuman.clear();\n deck.clear();\n\n InitializeDeck();\n InitializeComputerHand();\n InitializeHumanHand();\n\n topCard = deck.get(0);\n }", "public void reset() {\n\t\t//reset player to 0\n\t\tplayer = 0;\n\t\t\n\t\tfor(int row = size - 1; row >= 0; row --)\n\t\t\tfor(int col = 0; col < size; col ++)\n\t\t\t\tfor(int dep = 0; dep < size; dep ++)\n\t\t\t\t\t//goes through all board positions and sets to -1\n\t\t\t\t\tboard[row][col][dep] = -1;\n\t}", "@Override\n public void reset() {\n updateDice(1, 1);\n playerCurrentScore = 0;\n playerScore = 0;\n updateScore();\n notifyPlayer(\"\");\n game.init();\n }", "@Override\n public void resetGame() {\n\n }", "private void resetGame() {\r\n\t\t\r\n\t\tif(easy.isSelected()) {\r\n\t\t\tGRID_SIZE = 10;\r\n\t\t\tlbPits = 3;\r\n\t\t\tubPits = 5;\t\t\t\r\n\t\t} else if(medium.isSelected()) {\r\n\t\t\tGRID_SIZE = 15;\r\n\t\t\tlbPits = 8;\r\n\t\t\tubPits = 12;\r\n\t\t} else if(hard.isSelected()) {\r\n\t\t\tGRID_SIZE = 20;\r\n\t\t\tlbPits = 35;\r\n\t\t\tubPits = 45;\r\n\t\t} else {\r\n\t\t\tGRID_SIZE = 10;\r\n\t\t\tlbPits = 3;\r\n\t\t\tubPits = 5;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tvisited = new boolean[GRID_SIZE][GRID_SIZE];\r\n\t\tGameMapFactory mf = new GameMapFactory(new Obstacle[GRID_SIZE][GRID_SIZE], new Random(), GRID_SIZE, lbPits, ubPits);\r\n\t\tmf.setupMap();\r\n\t\tgame.resetGame(GRID_SIZE, mf.getGameMap(), visited, mf.getHunterPosition());\r\n\t\t\r\n\t}", "private void resetBoard() {\n\t\tGameScores.ResetScores();\n\t\tgameTime = SystemClock.elapsedRealtime();\n\t\t\n\t}", "private void resetGame(){\n\n }", "public void reset() {\n playing = true;\n won = false;\n startGame();\n\n // Make sure that this component has the keyboard focus\n requestFocusInWindow();\n }", "void reset() {\n myManager.reset();\n myScore = 0;\n myGameOver = false;\n myGameTicks = myInitialGameTicks;\n myOldGameTicks = myInitialGameTicks;\n repaint();\n }", "public void reset()\n {\n playersPiece = -1;\n king = false;\n empty = true;\n setTileColor(-1);\n }", "public void resetTheGame(){\n\t\tfjCount = 0;\n\t\tquestionAnsweredCount = 0;\n\t\tfor(int i = 0 ; i< 5; i++){\n\t\t\tfor(int j = 0 ; j < 5 ; j++){\n\t\t\t\tboard[i][j].reset();\n\t\t\t}\n\t\t}\n\t\tfor(int i = 0 ; i < teamNum; i ++){\n\t\t\tteams[i].reset();\n\t\t\tbets[i] = 0; \n\t\t}\n\t}", "public void resetGame(){\n\t\tlabyrinth.reset();\n\t\tlabyrinth = Labyrinth.getInstance();\n\t\tplayer.setX(0);\n\t\tplayer.setY(0);\n\n\t\tcandies = new HashMap();\n\t\tenemies = new HashMap();\n\t\tbuttons = new HashMap();\n\n\t\tint coordX = ThreadLocalRandom.current().nextInt(0, 16);\n\t\tint coordY = ThreadLocalRandom.current().nextInt(0, 16);\n\t\tdoor.setX(coordX);\n\t\tdoor.setY(coordY);\n\n\t\tgenerateCandies();\n\t\tgenerateEnemies();\n\n\t}", "public void restart() {\n this.getPlayerHand().getHandCards().clear();\n this.dealerHand.getHandCards().clear();\n this.getPlayerHand().setActualValue(0);\n this.getDealerHand().setActualValue(0);\n this.gameOver = false;\n this.playerBet = MIN_BET;\n this.roundCount = 0;\n this.isRunning = true;\n this.startGame();\n }", "public void resetGame(){\n initBoard(ROWS, COLS, rand);\n }", "public void resetGame() {\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tfor (int j = 0; j < 4; j++) {\n\t\t\t\tboard[i][j] = 0;\n\t\t\t\tgetChildren().remove(renders[i][j]);\n\t\t\t\trenders[i][j] = null;\n\t\t\t}\n\t\t}\n\t}", "private void resetGame() {\n game.resetGame();\n round_score = 0;\n\n // Reset values in views\n player_tot_view.setText(String.valueOf(game.getPlayer_total()));\n bank_tot_view.setText(String.valueOf(game.getBank_total()));\n round_score_view.setText(String.valueOf(round_score));\n String begin_label = \"Round \" + game.getRound() + \" - Player's Turn\";\n round_label.setText(begin_label);\n\n getTargetScore();\n }", "public void resetHandRanks() {\n\t\tPlayer player;\n\n\t\tfor (int i = 0; i < table.getTablePlayers().size(); i++) {\n\t\t\tplayer = table.getTablePlayers().get(i);\n\t\t\tplayer.setPair(false);\n\t\t\tplayer.setTwoPairs(false);\n\t\t\tplayer.setTrips(false);\n\t\t\tplayer.setStraight(false);\n\t\t\tplayer.setFlush(false);\n\t\t\tplayer.setFullHouse(false);\n\t\t\tplayer.setQuads(false);\n\t\t\tplayer.setStrFlush(false);\n\t\t}\n\t}", "public void resetPlayer() {\n\t\tthis.carrotCards = 65;\n\t\tthis.playerSpace = 0;\n\n\t}", "public void resetBoard() {\n\t\tplayerTurn = 1;\n\t\tgameStart = true;\n\t\tdispose();\n\t\tplayerMoves.clear();\n\t\tnew GameBoard();\n\t}", "public final void reset() {\n\t\tscore = 0;\n\t\tlives = 10;\n\t\tshields = 3;\n\t}", "public void resetAllScores(View v) {\n scorePlayerB = 0;\n scorePlayerA = 0;\n triesPlayerA = 0;\n triesPlayerB = 0;\n displayForPlayerA(scorePlayerA);\n displayForPlayerB(scorePlayerB);\n displayTriesForPlayerA(triesPlayerA);\n displayTriesForPlayerB(triesPlayerB);\n }", "public GameChart resetGame();", "public void reset()\n {\n currentScore = 0;\n }", "public void reset() {\n\t\tscore = 0;\n\t}", "private void reset(){\n getPrefs().setEasyHighScore(new HighScore(\"Player\", 99 * 60 + 59));\n getPrefs().setMediumHighScore(new HighScore(\"Player\", 99 * 60 + 59));\n getPrefs().setHardHighScore(new HighScore(\"Player\", 99 * 60 + 59));\n easyData.setText(formatHighScore(getPrefs().getEasyHighScore()));\n mediumData.setText(formatHighScore(getPrefs().getMediumHighScore()));\n hardData.setText(formatHighScore(getPrefs().getHardHighScore()));\n }", "public void gameReset() {\r\n\t\tfor (int n = 0; n < 6; n++) {\r\n\t\t\tfor (int m = 0; m < 7; m++) {\r\n\t\t\t\tsquares[n][m].setText(\"\");\r\n\t\t\t\tsquares[n][m].setBackground(Color.BLUE);\r\n\t\t\t\tsquares[n][m].setEnabled(true);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int a = 0; a < 7; a++) {\r\n\t\t\tbuttons[a].setEnabled(true);\r\n\t\t\tbuttons[a].setBackground(Color.BLACK);\r\n\r\n\t\t}\r\n\t\tif (gameType == 2) {\r\n\t\t\tboard();\r\n\t\t\tfor (int i = 0; i < 7; i++) {\r\n\t\t\t\tindex[i] = 6;\r\n\t\t\t}\r\n\r\n\t\t} else if (gameType == 1) {\r\n\t\t\tcompAI.setUpArray(ROW, COL);\r\n\t\t}\r\n\t}", "public void ResetPlayer() {\n\t\tfor (int i = 0; i < moveOrder.length; i++) {\n\t\t\tmoves.add(moveOrder[i]);\n\t\t}\n\t\tthis.X = 0;\n\t\tthis.Y = 0;\n\t\tthis.movesMade = 0;\n\t\tthis.face = 1;\n\t}", "public void resetGame() {\n\t\thandler.setDown(false);\n\t\thandler.setLeft(false);\n\t\thandler.setRight(false);\n\t\thandler.setUp(false);\n\n\t\tclearOnce = 0;\n\t\thp = 100;\n\t\tfromAnotherScreen = true;\n\t\tsetState(1);\n\t}", "private void resetGame()\n {\n createRooms();\n createItems();\n createCharacters();\n\n int itemsToAdd = getRandomNumber(10,items.size());\n addRoomItems(itemsToAdd);\n winItem = createWinItem();\n\n moves = 1;\n currentRoom = getRoom(STARTROOM); // Player's start location.\n }", "public void reset() {\n\tthis.pinguins = new ArrayList<>();\n\tthis.pinguinCourant = null;\n\tthis.pret = false;\n\tthis.scoreGlacons = 0;\n\tthis.scorePoissons = 0;\n }", "public void reset() {\n // corresponding function called in the Board object to reset piece\n // positions\n board.reset();\n // internal logic reset\n lastColor = true;\n gameOver = false;\n opponentSet = false;\n }", "public void resetGame(){\r\n\t\tSystem.out.println(\"Reset game min:\"+minimum+\" max:\"+maximum);\r\n\t\t//reset the target, set guesses to 1, and newGame flag to true\r\n\t\ttarget.setRandom(minimum, maximum, \"reset game\");\r\n\t\tthis.msg.setMessage(\"\");\r\n\t\tthis.guesses.setValue(1);\r\n\t\t\r\n\t}", "private void resetGame() {\r\n SCORE = 0;\r\n defaultState();\r\n System.arraycopy(WordCollection.WORD, 0, tempWord, 0, WordCollection.WORD.length);\r\n }", "private void resetValues() {\n teamAScoreInt = 0;\n teamBScoreInt = 0;\n teamAFoulScoreInt = 0;\n teamBFoulScoreInt = 0;\n }", "@Override\r\n\tpublic void resetBoard() {\r\n\t\tcontroller.resetGame(player);\r\n\t\tclearBoardView();\r\n\t\tif (ready)\r\n\t\t\tcontroller.playerIsNotReady();\r\n\t}", "public void resetGame() {\n frameRate(framerate);\n w = width;\n h = height;\n if (width % pixelSize != 0 || height % pixelSize != 0) {\n throw new IllegalArgumentException();\n }\n\n this.resetGrid();\n this.doRespawn = false;\n this.runGame = true;\n\n spawns = new HashMap();\n spawns.put(\"RIGHT\", new Location(50, (h - topHeight) / 2)); // LEFT SIDE\n spawns.put(\"LEFT\", new Location(w-50, (h - topHeight) / 2)); // RIGHT SIDE\n spawns.put(\"DOWN\", new Location(w/2, topHeight + 50)); // TOP SIDE\n spawns.put(\"UP\", new Location(w/2, h - 50)); // BOTTOM SIDE\n}", "public void resetPlayerForNewGame(Game game){\n\t\tthis.game = game;\n\t\tthis.coins = game.getStartCoins();\n\t\tthis.collectedCards = new int[game.getMaxCardValue() + 1];\n\t\tSystem.out.println(name + \" is ready for the new Game.\");\n\t}", "public void reset() {\n\t\tfor (int x = 0; x < worldWidth; x++) {\n\t\t\tfor (int y = 0; y < worldHeight; y++) {\n\t\t\t\ttileArr[x][y].restart();\n\t\t\t}\n\t\t}\n\t\tlost = false;\n\t\tisFinished = false;\n\t\tplaceBombs();\n\t\tsetNumbers();\n\t}", "public void reset() {\n\t board = new int[]{1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0,\n 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0,\n 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 2, 2, 2, 2};\n\t currentPlayer = 1;\n\t turnCount = 0;\n\t for (int i=0; i<81; i++) {\n\t \n\t\t hash ^= rand[3*i+board[i]]; //row-major order\n\t \n\t }\n }", "public void clearTheGame() {\n players.clear();\n categories.clear();\n playedRounds = 0;\n indexOfActiveCategory = -1;\n indexOfActivePlayer = 0;\n numberOfRounds = 0;\n }", "public void resetPlayer() {\n\t\thealth = 3;\n\t\tplayerSpeed = 5f;\n\t\tmultiBulletIsActive = false;\n\t\tspeedBulletIsActive = false;\n\t\tquickFireBulletIsActive = false;\n\t\tinvincipleTimer = 0;\n\t\txPosition = 230;\n\t}", "private void reset(){\r\n lives = 6;\r\n playerWins = false;\r\n word = randWord();\r\n wordArray = word.toCharArray();\r\n hidden = hideTheWord(word.length());\r\n guesses.clear();\r\n }", "public void newGame() {\n\t\tplayer1Score = 0;\r\n\t\tplayer2Score = 0;\r\n\t\tif (score != null) {\r\n\t\t\tdrawScore();\r\n\t\t}\r\n\t\treset();\r\n\t}", "public void reset() {\n\t\tAssets.playSound(\"tweet\");\n\t\tscore = respawnTimer = spawnCount= 0;\n\t\t\n\t\twalls = new ArrayList<Wall>();\n\t\tcheckPoints = new ArrayList<Wall>();\n\t\tground = new ArrayList<Ground>();\n\n\t\tGround g;\n\t\tPoint[] points = new Point[21];\n\t\tfor (int i = 0; i < 21; i++) {\n\t\t\tpoints[i] = new Point(i * 32, 448);\n\t\t}\n\t\tfor (int j = 0; j < points.length; j++) {\n\t\t\tg = new Ground();\n\t\t\tg.setBounds(new Rectangle(points[j].x, 448, 32, 32));\n\t\t\tground.add(g);\n\t\t}\n\n\t\tsky = new Background(-0.2);\n\t\tsky.setImage(Assets.sprite_sky);\n\t\t\n\t\tmountains = new Background(-0.4);\n\t\tmountains.setImage(Assets.sprite_mountains);\n\t\t\n\t\ttrees = new Background(-1.4);\n\t\ttrees.setImage(Assets.sprite_trees);\n\n\t\tstarted = false;\n\t\tplayer.reset();\n\n\t}", "public void restart(){\n for(Player p: players)\n if(p.getActive())\n p.reset();\n turn = 0;\n currentPlayer = 0;\n diceRoller=true;\n }", "public void reset() {\n\t\tplayerModelDiff1.clear();\n\t\tplayerModelDiff4.clear();\n\t\tplayerModelDiff7.clear();\n\t\tif(normalDiffMethods)\n\t\t{\t\n\t\tupdatePlayerModel();\n\t\tdisplayReceivedRewards();\n\t\t}\n\t\tint temp_diffsegment1;\n\t\tint temp_diffsegment2;\n\t\tif (currentLevelSegment == 0) {\n\t\t\t//System.out.println(\"-you died in the first segment, resetting to how you just started\");\n\t\t\ttemp_diffsegment1 = (int) plannedDifficultyLevels.get(0);\n\t\t\ttemp_diffsegment2 = (int) plannedDifficultyLevels.get(1);\n\t\t}\n\t\telse {\n\t\t\t//System.out.println(\"-nextSegmentAlreadyGenerated:\" + nextSegmentAlreadyGenerated);\n\t\t\tif (nextSegmentAlreadyGenerated) {\n\t\t\t\t//because the next segment is already generated (and so the previous does not exist anymore),\n\t\t\t\ttemp_diffsegment1 = (int) plannedDifficultyLevels.get(currentLevelSegment);\n\t\t\t\ttemp_diffsegment2 = (int) plannedDifficultyLevels.get(currentLevelSegment+1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//because the next segment is not yet generated\n\t\t\t\ttemp_diffsegment1 = (int) plannedDifficultyLevels.get(currentLevelSegment-1);\n\t\t\t\ttemp_diffsegment2 = (int) plannedDifficultyLevels.get(currentLevelSegment);\n\t\t\t}\n\t\t}\n\t\tplannedDifficultyLevels.clear();\n\n\t\t//System.out.println(\"-resetting to: \" + temp_diffsegment1 + \", \" + temp_diffsegment2);\n\t\tplannedDifficultyLevels.add(temp_diffsegment1);\n\t\tplannedDifficultyLevels.add(temp_diffsegment2);\n\t\tcurrentLevelSegment = 0;\n\n\t\tpaused = false;\n\t\tSprite.spriteContext = this;\n\t\tsprites.clear();\n\n\t\ttry {\n\t\t\tlevel2 = level2_reset.clone();\n\t\t} catch (CloneNotSupportedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\tlevel3 = level3_reset.clone();\n\t\t} catch (CloneNotSupportedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n fixborders();\n\t\tconjoin();\n\n\t\tlayer = new LevelRenderer(level, graphicsConfiguration, 320, 240);\n\t\tfor (int i = 0; i < 2; i++)\n\t\t{\n\t\t\tint scrollSpeed = 4 >> i;\n\t\tint w = ((level.getWidth() * 16) - 320) / scrollSpeed + 320;\n\t\tint h = ((level.getHeight() * 16) - 240) / scrollSpeed + 240;\n\t\tLevel bgLevel = BgLevelGenerator.createLevel(w / 32 + 1, h / 32 + 1, i == 0, levelType);\n\t\tbgLayer[i] = new BgRenderer(bgLevel, graphicsConfiguration, 320, 240, scrollSpeed);\n\t\t}\n\n\t\tdouble oldX = 0;\n\t\tif(mario!=null)\n\t\t\toldX = mario.x;\n\n\t\tmario = new Mario(this);\n\t\tsprites.add(mario);\n\t\tstartTime = 1;\n\n\t\ttimeLeft = 200*15;\n\n\t\ttick = 0;\n\n\t\t/*\n\t\t * SETS UP ALL OF THE CHECKPOINTS TO CHECK FOR SWITCHING\n\t\t */\n\t\t switchPoints = new ArrayList<Double>();\n\n\t\t//first pick a random starting waypoint from among ten positions\n\t\tint squareSize = 16; //size of one square in pixels\n\t\tint sections = 10;\n\n\t\tdouble startX = 32; //mario start position\n\t\tdouble endX = level.getxExit()*squareSize; //position of the end on the level\n\t\t//if(!isCustom && recorder==null)\n level2.playValues = this.valueList[0];\n\t\t\trecorder = new DataRecorder(this,level3,keys);\n\t\t\t////System.out.println(\"\\n enemies LEFT : \" + recorder.level.COINS); //Sander disable\n\t\t\t////System.out.println(\"\\n enemies LEFT : \" + recorder.level.BLOCKS_COINS);\n\t\t\t////System.out.println(\"\\n enemies LEFT : \" + recorder.level.BLOCKS_POWER);\n\t\t\tgameStarted = false;\n\t}", "private void resetGame() {\n \tcanvas.reset();\n \tguessesLeft = 8;\n \tcurrentWord = \"\";\n \t\n \tguesses = \"\";\n \tword = pickWord();\n \tlist = new boolean[word.length()];\n \t\n \tfor (int i = 0; i < word.length(); i++) {\n \t\tcurrentWord += \"-\";\n \t}\n }", "public void reset() {\n\t\t// SimpleTools.processTrackingOutput(\"Resetting TicTacToe.\");\n\t\tfor (int i = 0; i < checkerboard.length; i++) {\n\t\t\tfor (int j = 0; j < checkerboard[0].length; j++) {\n\t\t\t\tcheckerboard[i][j] = EMPTY;\n\t\t\t} // Of for j\n\t\t} // Of for i\n\t\tcurrentState = 0;\n\t\tcurrentRouteLength = 1;\n\n\t\t// White first\n\t\tcurrentPlayer = WHITE;\n\t}", "public void reset() {\n if (id.equals(new ResourceLocation(\"minecraft:planks\"))) {\n whitelist(Range.closed(0, 5));\n } else\n whitelist(Range.closed(0, 15));\n }", "public static void resetGame() {\r\n\t\t//Set all variables to their default values.\r\n\t\tMain.isGameStarted = false;\r\n\t\tMain.isSetupDone = false;\r\n\t\tMain.isGameWon = false;\r\n\t\tMain.isGameLost = false;\r\n\t\tMain.isThreeHanded = false;\r\n\t\tMain.isFourHandedSingle = false;\r\n\t\tMain.isFourHandedTeams = false;\r\n\t\tMain.doBidding = false;\r\n\t\tMain.doScoring = false;\r\n\t\tMain.dealerIsPlayer1 = false;\r\n\t\tMain.dealerIsPlayer2 = false;\r\n\t\tMain.dealerIsPlayer3 = false;\r\n\t\tMain.dealerIsPlayer4 = false;\r\n\t\tMain.isNilAllowed = true;\r\n\t\tMain.isDoubleNilAllowed = true;\r\n\t\tMain.nilBidTeam1 = false;\r\n\t\tMain.nilBidTeam2 = false;\r\n\t\tMain.doubleIsAllowedPlayer1 = false;\r\n\t\tMain.doubleIsAllowedPlayer2 = false;\r\n\t\tMain.doubleIsAllowedPlayer3 = false;\r\n\t\tMain.doubleIsAllowedPlayer4 = false;\r\n\t\tMain.doubleIsAllowedTeam1 = false;\r\n\t\tMain.doubleIsAllowedTeam2 = false;\r\n\r\n\t\t\r\n\t\tMain.player1 = \"\";\r\n\t\tMain.player2 = \"\";\r\n\t\tMain.player3 = \"\";\r\n\t\tMain.player4 = \"\";\r\n\t\tMain.team1 = \"\";\r\n\t\tMain.team2 = \"\";\r\n\t\tMain.player1Bid = \"\";\r\n\t\tMain.player2Bid = \"\";\r\n\t\tMain.player3Bid = \"\";\r\n\t\tMain.player4Bid = \"\";\r\n\t\tMain.player1TricksTaken = \"\";\r\n\t\tMain.player2TricksTaken = \"\";\r\n\t\tMain.player3TricksTaken = \"\";\r\n\t\tMain.player4TricksTaken = \"\";\r\n\t\tMain.curDealer = \"\";\r\n\t\tMain.startDealer = \"\";\r\n\t\tMain.bagValue = \"1\";\r\n\t\tMain.nilValue = \"50\";\r\n\t\tMain.doubleNilValue = \"200\";\r\n\t\t\r\n\t\tMain.round = 0;\r\n\t\tMain.player1TimesSet = 0;\r\n\t\tMain.player2TimesSet = 0;\r\n\t\tMain.player3TimesSet = 0;\r\n\t\tMain.player4TimesSet = 0;\r\n\t\tMain.player1Score = \"0\";\r\n\t\tMain.player2Score = \"0\";\r\n\t\tMain.player3Score = \"0\";\r\n\t\tMain.player4Score = \"0\";\r\n\t\tMain.team1Score = \"0\";\r\n\t\tMain.team2Score = \"0\";\r\n\t\t\r\n\t\tGameSetup.gameTypeHidden.setState(true);\r\n\t\tGameSetup.threeHanded.setEnabled(true);\r\n\t\tGameSetup.fourHandedSingle.setEnabled(true);\r\n\t\tGameSetup.fourHandedTeams.setEnabled(true);\r\n\t\tGameSetup.dealerHidden.setState(true);\r\n\t\tGameSetup.choiceBoxPlayer1.setEnabled(true);\r\n\t\tGameSetup.choiceBoxPlayer2.setEnabled(true);\r\n\t\tGameSetup.choiceBoxPlayer3.setEnabled(true);\r\n\t\tGameSetup.choiceBoxPlayer4.setEnabled(true);\r\n\t\tGameSetup.hasPlayerChanged = false;\r\n\t\t\r\n\t\tEditGame.playerChanged = false;\r\n\t\tEditGame.scoreChanged = false;\r\n\t\tEditGame.roundToEdit = 0;\r\n\t\tEditGame.editedRound = 0;\r\n\t}", "public void resetgamestate() {\n \tthis.gold = STARTING_GOLD;\n \tthis.crew = STARTING_FOOD;\n \tthis.points = 0;\n \tthis.masterVolume = 0.1f;\n this.soundVolume = 0.5f;\n this.musicVolume = 0.5f;\n \n this.ComputerScience = new Department(COMP_SCI_WEPS.getWeaponList(), COMP_SCI_UPGRADES.getRoomUpgradeList(), this);\n this.LawAndManagement = new Department(LMB_WEPS.getWeaponList(), LMB_UPGRADES.getRoomUpgradeList(), this);\n this.Physics = new Department(PHYS_WEPS.getWeaponList(), PHYS_UPGRADES.getRoomUpgradeList(), this);\n \n this.playerShip = STARTER_SHIP.getShip();\n this.playerShip.setBaseHullHP(700);\n this.playerShip.repairHull(700);\n this.combatPlayer = new CombatPlayer(playerShip);\n }", "void resetGame() {\r\n if (GameInfo.getInstance().isWin()) {\r\n GameInfo.getInstance().resetDots();\r\n MazeMap.getInstance().init();\r\n GameInfo.getInstance().resetFruitDisappearTime();\r\n MazeMap.getInstance().updateMaze(GameInfo.getInstance().getMode());\r\n }\r\n for (PropertyChangeListener pcl : pcs.getPropertyChangeListeners(Constants.PACMAN)) {\r\n pcs.removePropertyChangeListener(Constants.PACMAN, pcl);\r\n }\r\n for (PropertyChangeListener pcl : pcs.getPropertyChangeListeners(Constants.GHOSTS)) {\r\n pcs.removePropertyChangeListener(Constants.GHOSTS, pcl);\r\n }\r\n PacMan pacMan = initPacMan();\r\n initGhosts(pacMan);\r\n }", "public void resetPlayerInfo() {\r\n\t\tthis.damageDealt = 0;\r\n\t\tthis.damageTaken = 0;\r\n\t\tthis.robotsDestroyed = 0;\r\n\t\tthis.tilesMoved = 0;\r\n\t\tthis.turnsSinceLastMove = 0;\r\n\t\tthis.turnsSinceLastFire = 0;\r\n\t\t\r\n\t\tthis.robots = new ArrayList<Robot>(3);\r\n\t\t\r\n\t\t/* 0 = scout , 1 = sniper, 2 = tank */\r\n\t\tthis.robots.add(new Robot(playerID, 0));\r\n\t\tthis.robots.add(new Robot(playerID, 1));\r\n\t\tthis.robots.add(new Robot(playerID, 2));\r\n\t}", "public void reset(){\r\n \ttablero.clear();\r\n \tfalling = null;\r\n \tgameOver = false;\r\n \tlevel = 0;\r\n \ttotalRows = 0;\r\n \tLevelHelper.setLevelSpeed(level, this);\r\n }", "private void reset() {\n\t\tlevel.getLogic().resetBoard();\n\t\tlevelView.refresh();\n\t\tlevelView.clearSelectedWords();\n\t}", "public void reset() {\n/* 138 */ if (TimeUtil.getWeek() == 1) {\n/* 139 */ LogUtil.errorLog(new Object[] { \"MentalRankService::reset begin\", Long.valueOf(TimeUtil.currentTimeMillis()) });\n/* 140 */ sendRankReward();\n/* */ } \n/* */ }", "public void resetScore();", "public void reset() {\n\t\tmakeSolutionState();\n\t\twhile (isSolution(this.gameBoard)) {\n\t\t\trandomizeBoard();\n\t\t}\n\t\tlog.clear();\n\t\twon =false;\n\t\twasReset=true;\n\t\t\n\t\tsetChanged();\n\t\tnotifyObservers();\t\t\n\t}", "public final void reset(){\n\t\tthis.undoStack = new GameStateStack();\n\t\tthis.redoStack = new GameStateStack();\n\t\t\n\t\tthis.currentBoard = currentRules.createBoard(currentSize);\n\t\tthis.currentRules.initBoard(currentBoard, currentInitCells, currentRandom);\n\t}", "public void reset() {\n\t\tfor (int i = 0; i < stats.size(); i++) {\n\t\t\tstats.get(i).reset();\n\t\t}\n\t}", "public void resetAllScores(View view) {\n teamA_score = 0;\n teamB_score = 0;\n ADVANTAGE = 0;\n enableScoreView();\n unSetWinnerImage();\n displayTeamA_score(teamA_score);\n displayTeamB_score(teamB_score);\n\n }", "public void Reset()\r\n\t{\r\n\t\tif(!levelEditingMode)//CAN ONLY RESET IN LEVEL EDITING MODE\r\n\t\t{\r\n\t\t\tgrid.clearUserObjects();\r\n\t\t\tmenu = new SpriteMenu(listFileName, playButton);\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void reset() {\r\n\t\tairCrafts.clear();\r\n\t}", "private void resetGame() {\n for (int row = 0; row < this.boardSize; row++) {\n for (int col = 0; col < this.boardSize; col++) {\n this.board[row][col] = ' ';\n }\n }\n }", "public void reset() {\n hasWinner = false;\n firstTurn = true;\n for (int row = 0; row < mRowsCount; row++) {\n for (int col = 0; col < mColsCount; col++) {\n mCells[row][col] = new Cell();\n }\n }\n }", "public void ClearGame(){\n handComputer.clear();\n handHuman.clear();\n deck.clear();\n }", "public void reset(View v) {\n scoreTeamB = 0;\n displayForTeamB(scoreTeamB);\n scoreTeamA = 0;\n displayForTeamA(scoreTeamA);\n questionNumber = 0;\n displayQuestionNumber(questionNumber);\n }", "public void resetGame() {\n\t\tBrickPanel.resetBallLocation();\n\t\tBrickPanel.repaint();\n\t}", "public void reset() {\r\n\r\n for ( Card card : cards ) {\r\n if ( card.isFaceUp() ) {\r\n card.toggleFace( true );\r\n }\r\n }\r\n Collections.shuffle( cards );\r\n\r\n this.undoStack = new ArrayList<>();\r\n\r\n this.moveCount = 0;\r\n\r\n announce( null );\r\n }", "public void reset(){\n\t\tfrogReposition();\n\t\tlives = 5;\n\t\tend = 0;\n\t}", "private void softReset() {\n // variables\n lapMap.clear();\n // ui\n sessionTView.setText(\"\");\n positionTView.setText(\"-\");\n currentLapTView.setText(\"--:--:---\");\n lastLapTView.setText(\"--:--:---\");\n bestLapTView.setText(\"--:--:---\");\n currentLapNumberTView.setText(\"-\");\n gapTView.setText(\" -.---\");\n fastestDriver = Float.MAX_VALUE;\n fastestDriverName = null;\n fastestDriverTView.setText(\"--:--:---\");\n fastestDriverNameTView.setText(\"Fastest lap\");\n Log.d(TAG, \"SOFT Reset: between game states\");\n }", "public void resetPlayers() {\n Player curPlayer;\n for(int i = 0; i < players.size(); i++){\n curPlayer = players.peek();\n curPlayer.resetRole();\n curPlayer.setLocation(board.getSet(\"trailer\"));\n curPlayer.setAreaData(curPlayer.getLocation().getArea());\n view.setDie(curPlayer);\n players.add(players.remove());\n }\n\n }", "private void resetPlayer() {\r\n List<Artefact> inventory = currentPlayer.returnInventory();\r\n Artefact item;\r\n int i = inventory.size();\r\n\r\n while (i > 0) {\r\n item = currentPlayer.removeInventory(inventory.get(i - 1).getName());\r\n currentLocation.addArtefact(item);\r\n i--;\r\n }\r\n currentLocation.removePlayer(currentPlayer.getName());\r\n locationList.get(0).addPlayer(currentPlayer);\r\n currentPlayer.setHealth(3);\r\n }", "public void reset() {\r\n active.clear();\r\n missioncontrollpieces = GameConstants.PIECES_SET;\r\n rolled = 0;\r\n phase = 0;\r\n round = 0;\r\n action = 0;\r\n }", "public void reset() {\n\t\tFile file = new File(\"src/LevelData.txt\");\n\t\tpaddle = new Paddle(COURT_WIDTH, COURT_HEIGHT, Color.BLACK);\n\t\tbricks = new Bricks(COURT_WIDTH, COURT_HEIGHT, file);\n\t\tball = new Ball(COURT_WIDTH, COURT_HEIGHT, 5, Color.BLACK);\n\n\t\tplaying = true;\n\t\tcurrScoreVal = 0;\n\t\tlivesLeft = 3;\n\t\tstatus.setText(\"Running...\");\n\t\tyourScore.setText(\"Your Score: 0\");\n\t\tlives.setText(\" Lives: \" + livesLeft.toString() + \"| \");\n\n\t\t// Making sure that this component has the keyboard focus\n\t\trequestFocusInWindow();\n\t}", "public void reset() {\r\n\t\tfor (int i = 0; i < trees.length; i++)\r\n\t\t\ttrees[i] = new GameTree(i);\r\n\t\tprepare();\r\n\t}", "@Override\r\n\tpublic void reset() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t\r\n\t\tthis.guessHistory.clear();\r\n\t}", "private void reset() {\n\t\tsnake.setStart();\n\n\t\tfruits.clear();\n\t\tscore = fruitsEaten = 0;\n\n\t}", "public void reset() {\n monster.setHealth(10);\n player.setHealth(10);\n\n }", "public void reset(){\r\n barn.setVisited(Boolean.FALSE);\r\n turkeyTalk.setVisited(Boolean.FALSE);\r\n pigginOut.setVisited(Boolean.FALSE);\r\n seeTheLight.setVisited(Boolean.FALSE);\r\n theGobbling.setVisited(Boolean.FALSE);\r\n youDied1.setVisited(Boolean.FALSE);\r\n threeLittlePigs.setVisited(Boolean.FALSE);\r\n forTheGreaterGood.setVisited(Boolean.FALSE);\r\n farmHouseTurkey.setVisited(Boolean.FALSE);\r\n youWin.setVisited(Boolean.FALSE);\r\n }" ]
[ "0.8235677", "0.8167676", "0.8091219", "0.80045646", "0.7917795", "0.7904252", "0.78969747", "0.7871065", "0.78634185", "0.78105104", "0.7792619", "0.7734514", "0.76265633", "0.76128244", "0.75935835", "0.7576025", "0.75672317", "0.75483716", "0.75154436", "0.75111014", "0.7497175", "0.74831116", "0.7478922", "0.7468061", "0.746565", "0.7459768", "0.74574244", "0.74463326", "0.7388676", "0.7381188", "0.736984", "0.7364192", "0.7360857", "0.7359665", "0.73370683", "0.7327993", "0.73233116", "0.7290597", "0.7290194", "0.72830534", "0.7276251", "0.7266668", "0.7250058", "0.7238859", "0.7233531", "0.7222402", "0.72103506", "0.7205299", "0.71986204", "0.71855885", "0.7171817", "0.71614796", "0.71157104", "0.710863", "0.708701", "0.7084639", "0.7076207", "0.70737404", "0.7065547", "0.7046436", "0.7032768", "0.70202774", "0.70053", "0.6996913", "0.69906485", "0.69844437", "0.69806635", "0.6977342", "0.6972748", "0.69660103", "0.69587195", "0.69497365", "0.69453746", "0.694515", "0.69434184", "0.69367445", "0.6935269", "0.6920167", "0.69149584", "0.6905439", "0.6889463", "0.686838", "0.68405646", "0.68401515", "0.6839372", "0.6839007", "0.6830061", "0.6825922", "0.6815445", "0.6812719", "0.6809545", "0.67960984", "0.6786695", "0.6771615", "0.67685616", "0.67587066", "0.67572516", "0.67544144", "0.6753865", "0.6749389" ]
0.77699614
11
returns true of the game is completed otherwise returns false
public boolean gameCompleted() { int[] expected = {5,5,5,5,5}; if(Arrays.equals(_answeredQuestions, expected)) { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isGameComplete();", "protected abstract boolean isGameFinished();", "public boolean isGameFinished() {\n if (listaJogadores.size() - listaJogadoresFalidos.size() == 1) {\n return true;\n } else {\n return false;\n }\n\n }", "@Override\r\n\tboolean isFinished() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tif(checkForWin() != -1)\r\n\t\t\treturn true;\r\n\t\telse if(!(hasValidMove(0) || hasValidMove(1)))\r\n\t\t\treturn true; //game draw both are stuck\r\n\t\telse return false;\r\n\t}", "public boolean isGameFinished() {\r\n return gameFinished;\r\n }", "public boolean isFinished() {\n\t\tif (gameSituation == UNFINISHED) {\n\t\t\treturn false;\n\t\t} // Of if\n\n\t\treturn true;\n\t}", "public void finishGame() {\r\n gameFinished = true;\r\n }", "protected boolean isFinished() {\n \t\n \tif(current_time >= goal) {\n \t\t\n \t\treturn true;\n \t}else {\n \t\t\n \t\treturn false;\n \t}\n }", "public boolean isFinished() {\n\t\tif ((player1_moves | player2_moves) == COMPLETE) {\n\t\t\tfinished = true;\n\t\t\tcurrentPlayer = '\\0';\n\t\t}\n\t\tfor (int i : winning_cases) {\n\t\t\tif ((player1_moves & i) == i) {\n\t\t\t\twinner = 'X';\n\t\t\t\tfinished = true;\n\t\t\t} else if ((player2_moves & i) == i) {\n\t\t\t\twinner = 'O';\n\t\t\t\tfinished = true;\n\t\t\t}\n\t\t}\n\t\treturn finished;\n\t}", "boolean endOfGame() {\n return false;\n }", "private boolean winGame() {\n if (model.isCompleted()) {\n win.message(\"Winner\");\n return true;\n }\n return false;\n }", "public synchronized boolean completeMission() {\n //determine mission success / fail\n int numFails = 0;\n for (boolean choice : teamMemberChoices.values()) {\n if (!choice) {\n numFails++;\n }\n }\n if (numFails == 1) {\n sendPublicMessage(\"*The mission was a failure! There was 1 fail.*\");\n } else if (numFails > 1) {\n sendPublicMessage(\"*The mission was a failure! There were \" + numFails + \" fails.*\");\n } else {\n sendPublicMessage(\"*The mission was a success!*\");\n }\n\n CompleteMissionState completeMissionState = doMissionState.completeMission(numFails == 0);\n if (completeMissionState.isGameOver()) {\n //report the winner\n if (completeMissionState.didSpiesWin()) {\n sendPublicMessage(\"*3 missions have failed! Spies win!*\");\n announceSpies();\n sendPublicMessage(\"Thank you for playing!\");\n } else {\n sendPublicMessage(\"*3 missions have succeeded! The Resistance wins!*\");\n announceSpies();\n sendPublicMessage(\"Thank you for playing!\");\n }\n reset();\n return true;\n } else {\n pickTeamState = completeMissionState.getPickTeamState();\n state = State.PICK_TEAM;\n teamSelection = new HashSet<>();\n return false;\n }\n }", "private void gameFinished() {\n\n\t\tisFinished = true;\n\t\touter: for (int x = 0; x < worldWidth; x++) {\n\t\t\tfor (int y = 0; y < worldHeight; y++) {\n\t\t\t\tif (!(tileArr[x][y].isOpened() || (tileArr[x][y].hasBomb() && tileArr[x][y]\n\t\t\t\t\t\t.hasFlag()))) {\n\t\t\t\t\tisFinished = false;\n\t\t\t\t\tbreak outer;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public boolean isDone() {\r\n\t\tint count = 0;\r\n\t\t//Checks the movieGuess array for '_' characters. If there are none we can safely assume the player has finished.\r\n\t\tfor(int x = 0; x < movieGuess.length; x++) {\r\n\t\t\tif(movieGuess[x] == '_')\t{\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//used a counter to avoid premature (i.e., before finishing the array traversal) true or false.\r\n\t\tif(count > 0)\r\n\t\t\treturn false;\t\r\n\t\telse\r\n\t\t\treturn true;\r\n\t}", "public boolean gameEnd(){\r\n return !hasMovements(model.getCurrentPlayer().getColor());\r\n }", "public static boolean isGameFinished() {\n return mafiaIsWinner() || citizenIsWinner();\n }", "protected boolean isFinished() {\n //\tif(OI.joystickOne.getPOV() == 180){\n \t\t//return true;\n \t//\n \t\t\t\n return false;\n }", "public boolean gameContinue() {\n for (Player player : players) {\n if (player.getPoints() > END_GAME_POINTS) {\n return false;\n }\n }\n return true;\n }", "@Override\n public boolean isCompleted() {\n return time.secondsPassed==finishLevel;\n }", "protected boolean isFinished() {\r\n if (state == STATE_SUCCESS) {\r\n // Success\r\n return true;\r\n }\r\n if (state == STATE_FAILURE) {\r\n // Failure\r\n return true;\r\n }\r\n return false;\r\n }", "public boolean isFinished() { \n // Check how much time has passed\n int passedTime = millis()- savedTime;\n if (passedTime > totalTime) {\n return true;\n } else {\n return false;\n }\n }", "protected boolean isFinished() {\n return (timeRunning>timeStarted+5 || RobotMap.inPosition.get()!=OI.shooterArmed);\n }", "protected boolean isFinished() {\n if (waitForMovement) return (timeSinceInitialized() > Robot.intake.HOPPER_DELAY);\n return true;\n }", "protected boolean isFinished() {\n\t\tif (_timesRumbled == 40) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "protected boolean isFinished() {\n //return !RobotMap.TOTE_SWITCH.get();\n \treturn false;\n }", "protected boolean isFinished() {\n\n \tif(weAreDoneSenor == true) {\n\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n \t\n }", "public void finishGame(){\r\n\t\t\t\tgameStarted = false;\r\n\t\t\t}", "protected boolean isFinished() {\n \tif(Robot.oi.btnIdle.get()) {\n \t\treturn CommandUtils.stateChange(this, new Idle());\n \t}\n\n \tif( Robot.oi.btnShoot.get()) {\n \t\treturn CommandUtils.stateChange(this, new Shooting()); \n \t}\n \t\n \tif(Robot.oi.btnUnjam.get()){\n \t\treturn CommandUtils.stateChange(this, new Unjam());\n \t}\n return false;\n }", "protected boolean isFinished() {\n\t\t// get the current angle from the gyro\n\t\tdouble currentAngle = Robot.gyroSubsystem.GyroPosition();\n\n\t\t// see if we are within 2 degrees of the target angle (90 degrees)\n\t\tif (Math.abs(currentAngle - 90) <= 2) {\n\t\t\t// we have hit our goal of 90, end auto program\n\t\t\treturn true;\n\t\t} else {\n\t\t\t// we are not quite there yet, keep going\n\t\t\treturn false;\n\t\t}\n\n\t}", "public boolean gameWon(){\n return false;\n }", "protected boolean isFinished() {\n \tif(timer.get()>.7)\n \t\treturn true;\n \tif(Robot.gearX==0)\n \t\treturn true;\n return (Math.abs(173 - Robot.gearX) <= 5);\n }", "public boolean getGameFinished() {\r\n\t\treturn gameFinished;\r\n\t}", "public boolean gameEnd(){\n\t\treturn(\tturn >= 50 || evaluateState()==true );\r\n\t}", "protected boolean isFinished() {\n return System.currentTimeMillis() - timeStarted >= timeToGo;\n }", "Boolean isFinished();", "public boolean hasEnded(){\r\n\t\treturn state == GameState.FINISHED;\r\n\t}", "public boolean verifyEndGame(Player gamer);", "protected boolean isFinished() {\r\n\t\t \tboolean ans = false;\r\n\t\t \treturn ans;\r\n\t\t }", "boolean isFinished() {\n\t\tif (this.currentRoom.isExit() && this.currentRoom.getMonsters().isEmpty()) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "protected boolean isFinished() {\n\t\treturn false;\n\t\t//return timeOnTarget >= finishTime;\n }", "public boolean completed(){\n return !activeAttackers() && !attackersLeft();\n }", "protected boolean isFinished() {\n return (System.currentTimeMillis() - startTime) >= time;\n \t//return false;\n }", "boolean hasFinished();", "private boolean GameEnds(){\n \tif(endGameCounter!=0) {\n \t\treturn false;\n \t\t\n \t}\n \t\n \treturn true;\n }", "boolean isFinished();", "@Override\n public boolean isFinished() {\n if (numBalls == -1) {\n return false;\n } else {\n return ballsShot >= numBalls;\n }\n }", "boolean CanFinishTurn();", "protected boolean isFinished()\n\t{\n\t\treturn true;\n\t}", "protected boolean isFinished() {\n \tif (moving) return Robot.armPiston.getMajor() != PistonPositions.Moving; /* && Robot.armPiston.getMinor() != PistonPositions.Moving; */\n \treturn true;\n }", "protected boolean isFinished() {\n \tif(Math.abs(Robot.driveTrain.getHeading() - targetDirection) < 2) {\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n }", "protected boolean isFinished() {\n\t\treturn Robot.elevator.isInPosition(newPosition, direction);\n\t}", "protected boolean isFinished() {\n\t\treturn Robot.gearIntake.getPegSwitch();\n\t}", "protected boolean isFinished() {\n \n \tif(Math.abs(RobotMap.navx.getAngle() - this.desiredAngle) <=2) {\n \n \t\treturn true;\n \t}\n return false;\n }", "boolean hasGameEndedResponse();", "void gameFinished();", "public boolean hasGameEnded() {\n return winner != 0;\n }", "protected boolean isFinished() {\n logger.info(\"Ending left drive\");\n \treturn timer.get()>howLongWeWantToMove;\n }", "boolean end() {\r\n\t\tif (this.gameOver == true)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "boolean checkEndGame() throws RemoteException;", "protected boolean isFinished() {\n \tif(timeSinceInitialized() >= 1.75){\n \t\treturn true;\n \t}\n return false;\n }", "public boolean completed()\r\n {\r\n if(pile.size() == 13)\r\n return true;\r\n return false;\r\n }", "protected boolean isFinished()\n\t{\n\t\treturn !Robot.oi.respoolWinch.get();\n\t}", "public boolean checkForEndgame() {\n\t\tCalculatePossibleMoves(true);\n\t\tint blackMoves = getNumberOfPossibleMoves();\n\t\tCalculatePossibleMoves(false);\n\t\tint redMoves = getNumberOfPossibleMoves();\n\t\t\n\t\tif (blackMoves == 0 && redMoves == 0)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "protected boolean isFinished() {\n \treturn (Robot.sonar.getDistance() <= distance);\n }", "public abstract boolean isFinished ();", "public boolean isFinished();", "protected boolean isFinished(){\r\n return true;\r\n }", "protected boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n\t\treturn true;\n\t}", "protected boolean isFinished() {\n\t\treturn true;\n\t}", "protected boolean isFinished() {\n\t\treturn true;\n\t}", "boolean isGameFinished() {\n if (tiles.takenTilesNumber() < 3)\n return false;\n Symbol winningSymbol = tiles.getTile(1);\n if (!winningSymbol.equals(Symbol.EMPTY)) {\n if (tiles.getTile(5).equals(winningSymbol)) {\n if (tiles.getTile(9).equals(winningSymbol)) {\n return true;\n }\n }\n if(tiles.getTile(2).equals(winningSymbol)) {\n if(tiles.getTile(3).equals(winningSymbol)) return true;\n }\n if(tiles.getTile(4).equals(winningSymbol)) {\n if(tiles.getTile(7).equals(winningSymbol)) return true;\n }\n }\n winningSymbol = tiles.getTile(2);\n if (!winningSymbol.equals(Symbol.EMPTY)) {\n if (tiles.getTile(5).equals(winningSymbol)) {\n if (tiles.getTile(8).equals(winningSymbol)) return true;\n }\n }\n\n winningSymbol = tiles.getTile(3);\n if (!winningSymbol.equals(Symbol.EMPTY)) {\n if (tiles.getTile(5).equals(winningSymbol)) {\n if (tiles.getTile(7).equals(winningSymbol)) return true;\n }\n if (tiles.getTile(6).equals(winningSymbol)) {\n if (tiles.getTile(9).equals(winningSymbol)) return true;\n }\n }\n\n\n winningSymbol = tiles.getTile(4);\n if (!winningSymbol.equals(Symbol.EMPTY)) {\n if (tiles.getTile(5).equals(winningSymbol)) {\n if (tiles.getTile(7).equals(winningSymbol)) return true;\n }\n }\n\n winningSymbol = tiles.getTile(7);\n if (!winningSymbol.equals(Symbol.EMPTY)) {\n if (tiles.getTile(8).equals(winningSymbol)) {\n if (tiles.getTile(9).equals(winningSymbol)) return true;\n }\n }\n return false;\n }", "boolean completed();", "public boolean isFinished(){\n return true;\n }", "protected boolean isFinished()\n\t{\n\t\treturn false;\n\t}", "protected boolean isFinished() {\n return ((degrees - Robot.gyro.getAngle() <= Robot.acceptedTurnTolerance)&&(degrees - Robot.gyro.getAngle() >= -Robot.acceptedTurnTolerance))||Robot.interrupt;\n }", "protected boolean isFinished() {\n \tif (Math.abs(_finalTickTargetLeft - Robot.driveTrain.getEncoderLeft()) <= 0 &&\n \t\t\tMath.abs(_finalTickTargetRight - Robot.driveTrain.getEncoderRight()) <= 0)\n \t{\n \t\treturn true;\n \t}\n return false;\n }", "@Override\n\tpublic boolean isComplete() {\n\t\tif (this.defeated == this.totalEnemies)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public boolean isFinished() {\n\t\t\n\t\treturn drivetrain.angleReachedTarget();\n\n\t}", "protected boolean isFinished() {\r\n \tif (manipulator.isHighSwitchPressed() && speed > 0 ||\r\n \t\tmanipulator.isLowSwitchPressed() && speed < 0)\r\n \t\treturn true;\r\n \t\r\n \treturn isTimedOut();\r\n \t\r\n// \tif (targetHeight > startHeight) {\r\n// \t\treturn manipulator.getAverageElevatorHeight() >= targetHeight;\r\n// \t} else {\r\n// \t\treturn manipulator.getAverageElevatorHeight() <= targetHeight;\r\n// \t}\r\n }", "public boolean actionCompleted() {\n return !mAttacking;\n }", "protected boolean isFinished() {\n //return controller.onTarget();\n return true;\n }", "protected boolean isFinished()\n {\n return timer.get() > driveDuration;\n }", "public boolean isCompleted() {\n \n // set amount of bottles to complete the level\n int bottlesAmount = 3;\n \n // if player collects the set amount, level is completed\n if (player.getBottles() == bottlesAmount)\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "public boolean isFinished() {\n\t\tif (getRemaining() <= 0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "protected boolean isFinished() {\r\n \tif (i >= 1 || i <= 1){\r\n \treturn true;\r\n \t}\r\n\t\treturn false;\r\n }", "protected boolean isFinished() {\n \t//System.out.println(\"FINISHED\");\n \tif(sizeArray.length>0)\n \t\treturn sizeArray[0]>targetSize;\n else\n \treturn noBubbles;\n \t\n \t\n }", "boolean isGameSpedUp();", "public boolean isFinished() {\n\t\t// the word is guessed out only when the unrevealedSlots is 0\n\t\tif (this.unrevealedSlots == 0) {\n\t\t\treturn true;\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}", "@Override\n\tpublic boolean isFinished() {\n\t\treturn (this.timeRemaining == 0);\n\t}", "protected boolean isFinished() {\n\t\treturn false;\r\n\t}", "protected boolean isFinished() {\n return Robot.m_elevator.onTarget();\n }", "public boolean runRound() {\n gameMove();\n // return/check if gameover condiation is meet\n return isGameOver();\n }", "protected boolean isFinished() {\n\t\tif(switchSide) {\n\t\t\treturn !launchCubeSwitch.isRunning() && state == 4;\n\t\t}\n\t\telse if(scaleSide) {\n\t\t\treturn !launchCubeScale.isRunning() && state == 4;\n\t\t}\n\t\telse {\n\t\t\treturn !crossLine.isRunning() && timer.get() > 1;\n\t\t}\n\t}", "private boolean checkGameStatus() {\n int res = model.getWinner();\n if (res == Model.DRAW) {\n draw();\n return false;\n } else if (res == Model.WHITE) {\n whiteScore++;\n view.getPrompt().setText(whiteName + \" win!\");\n prepareRestart();\n return false;\n } else if (res == Model.BLACK) {\n blackScore++;\n view.getPrompt().setText(blackName + \" win!\");\n prepareRestart();\n return false;\n }\n return true;\n }" ]
[ "0.88224477", "0.8370428", "0.8138072", "0.79391754", "0.7832314", "0.78107363", "0.7785088", "0.7603735", "0.7590743", "0.7569122", "0.7558627", "0.755046", "0.74969923", "0.74918884", "0.7480002", "0.74540097", "0.7441905", "0.742445", "0.742276", "0.73998064", "0.7382923", "0.7381537", "0.737106", "0.73686266", "0.73669714", "0.7355314", "0.73519623", "0.7346919", "0.7346336", "0.73395616", "0.7332612", "0.731687", "0.73073745", "0.7302204", "0.7295976", "0.7290361", "0.7276762", "0.7273674", "0.7271401", "0.72628564", "0.72606516", "0.72589743", "0.72518176", "0.72426534", "0.7242186", "0.7239872", "0.7238142", "0.7236301", "0.72359264", "0.7229078", "0.7225723", "0.72198266", "0.7189919", "0.7180409", "0.71722645", "0.71716857", "0.71709514", "0.71679795", "0.7158179", "0.7156609", "0.71556336", "0.71464986", "0.71440494", "0.71435314", "0.7134346", "0.71322834", "0.7131404", "0.71299434", "0.71299434", "0.71299434", "0.71299434", "0.71299434", "0.71299434", "0.7129876", "0.7129876", "0.7129876", "0.711911", "0.71120524", "0.7109642", "0.71000004", "0.7079525", "0.7072085", "0.7068114", "0.7063079", "0.7052389", "0.70408314", "0.7036824", "0.7029977", "0.7027235", "0.7023525", "0.7014644", "0.7012327", "0.70107234", "0.69973594", "0.69967484", "0.6994626", "0.6986395", "0.698244", "0.69752514", "0.6969551" ]
0.7470603
15
saves the name of the current player
public void saveCurrentPlayer() { BashCmdUtil.bashCmdNoOutput("touch data/current_player"); BashCmdUtil.bashCmdNoOutput(String.format("echo \"%s\" >> data/current_player",_currentPlayer)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void SavePlayerName() {\r\n\t\tPlayer player = (Player)Player.getPlayerInstance();\r\n\t\t\r\n\t\tString file = \"PlayerName.txt\";\r\n\t\tString playerName = player.getName();\r\n\t\ttry{\r\n\t\t\tPrintWriter print = new PrintWriter(file);\r\n\t\t\tprint.println(playerName);\r\n\t\t}\r\n\t\tcatch(FileNotFoundException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public static void savePlayerNames() {\r\n\t\tMain.player1 = GameSetup.choiceBoxPlayer1.getSelectedItem();\r\n\t\tMain.player2 = GameSetup.choiceBoxPlayer2.getSelectedItem();\r\n\t\tMain.player3 = GameSetup.choiceBoxPlayer3.getSelectedItem();\r\n\t\t\r\n\t\t//Don't show fourth player if playing 3 handed game.\r\n\t\tif (!Main.isThreeHanded) {\r\n\t\t\tMain.player4 = GameSetup.choiceBoxPlayer4.getSelectedItem();\r\n\t\t}\r\n\t}", "private String getPlayerName() {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);\n String storedName = preferences.getString(\"playerName\",\"none\");\n return storedName;\n }", "public void setPlayerName(String name) {\n \tplayername = name;\n }", "String getNewPlayerName();", "public String getNewPlayerName() {\n return newPlayerName;\n }", "public void setName(String name)\r\n\t{\r\n\t\tthis.playerName = name;\r\n\t}", "private void setName(String nameIn){\r\n\t\tplayerName = nameIn;\r\n\t}", "public String getName(){\r\n\t\treturn playerName;\r\n\t}", "public void setName(String name)\n {\n playersName = name;\n }", "public String getPlayerName() {\n return name; \n }", "@Override\n\tpublic void setData(String playerName) {\n\t\tthis.currentPlayerName = playerName;\n\t\t\n\t}", "@Override\r\n\tpublic void SavePlayerData() {\r\n\r\n Player player = (Player)Player.getPlayerInstance();\r\n\t\t\r\n\t\tString file = \"PlayerInfo.txt\";\r\n\t\tString playerlifepoint = \"\"+player.getLifePoints();\r\n\t\tString playerArmore = player.getArmorDescription();\r\n\t\ttry{\r\n\t\t\tPrintWriter print = new PrintWriter(file);\r\n\t\t\tprint.println(playerlifepoint);\r\n\t\t\tprint.println(playerArmore);\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(FileNotFoundException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "public void saveName(String name, Context context){\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n prefs.edit().putString(\"spillernavn\", name).apply();\n }", "String getName(){\n\t\treturn playerName;\n\t}", "public void setCurrentPlayerName(String name)\n {\n currentPlayerName = name;\n startGame();\n }", "public String getPlayerName(){\n\t\treturn playerName;\n\t}", "public void setPlayer1Name(String name){\n player1 = name;\n }", "public static void savePlayer(Player player){\n if (player != null){\n try {\n mapper.writeValue(new File(\"Data\\\\PlayerData\\\\\" + getFileName(player) + \".json\"), player);\n } catch ( Exception e ) {\n e.printStackTrace();\n }\n }\n }", "public String getPlayerName() {\n\t\treturn name;\n\t}", "static void setCurrentPlayer()\n {\n System.out.println(\"Name yourself, primary player of this humble game (or type \\\"I suck in life\\\") to quit: \");\n\n String text = input.nextLine();\n\n if (text.equalsIgnoreCase(\"I suck in life\"))\n quit();\n else\n Player.current.name = text;\n }", "public String getPlayerName() {\n return playerName;\n }", "public String getPlayerName() {\n return playerName;\n }", "public String getPlayerName() {\n \treturn playername;\n }", "public void saveLocation(String name) {\n // Storing name in pref\n editor.putString(POSITION, name);\n\n // commit changes\n editor.commit();\n }", "public String getName()\r\n\t{\r\n\t\treturn this.playerName;\r\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 String getPlayerName() {\n return this.playerName;\n }", "public void setPlayerName()\r\n\t{\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\tSystem.out.print(\"Enter your name: \");\r\n\t\tname = in.nextLine();\r\n\t}", "String getPlayerName();", "public void setPlayer2Name(String name){\n player2 = name;\n }", "public void setPlayerName(String name){\n\t\tplayerName = name;\n\t\trepaint();\n\t}", "void setName(String name) {\n setStringStat(name, playerName);\n }", "public static void saveDealerName() {\r\n\t\tclearDealerName();\r\n\t\t\r\n\t\tif (GameSetup.player1IsDealer.getState()) {\r\n\t\t\tMain.dealerIsPlayer1 = true;\r\n\t\t\tMain.startDealer = Main.player1;\r\n\t\t}\r\n\t\tif (GameSetup.player2IsDealer.getState()) {\r\n\t\t\tMain.dealerIsPlayer2 = true;\r\n\t\t\tMain.startDealer = Main.player2;\r\n\t\t}\r\n\t\tif (GameSetup.player3IsDealer.getState()) {\r\n\t\t\tMain.dealerIsPlayer3 = true;\r\n\t\t\tMain.startDealer = Main.player3;\r\n\t\t}\r\n\t\t\r\n\t\t//Don't save fourth dealer if playing three handed game.\r\n\t\tif (!Main.isThreeHanded) {\r\n\t\t\tif (GameSetup.player4IsDealer.getState()) {\r\n\t\t\t\tMain.dealerIsPlayer4 = true;\r\n\t\t\t\tMain.startDealer = Main.player4;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tMain.curDealer = Main.startDealer;\r\n\t}", "public static void saveTeamNames() {\r\n\t\tMain.team1 = Main.teamOne.name;\r\n\t\tMain.team2 = Main.teamTwo.name;\r\n\t}", "public void setPlayerName(String playerName) {\n this.playerName = playerName;\n }", "@Override\n\tpublic String getPlayerName() {\n\t\treturn playerName;\n\t}", "public void save()\n\t{\n\t\tif(entity != null)\n\t\t\t((SaveHandler)DimensionManager.getWorld(0).getSaveHandler()).writePlayerData(entity);\n\t}", "public String getPlayerName() {\n return nameLabel.getText().substring(0, nameLabel.getText().indexOf('\\''));\n }", "private String getPlayerName() {\n EditText name = (EditText) findViewById(R.id.name_edittext_view);\n return name.getText().toString();\n }", "public void AskName(){\r\n\t\tSystem.out.println(\"Player 2, please enter your name: \\nPredictable Computer\");\r\n\t\tplayerName = \"Predictable Computer\";\r\n\t}", "public void setPlayerName(String name) {\n\t\tsuper.setPlayerName(name);\n\t}", "Player(String name){\n\t\tthis.name = name;\n\t}", "public String getPlayerName() {\n\t\treturn playerName;\n\t}", "public String getPlayerName(){\n return this.playerName;\n\n }", "public String getPlayerName() {\n\n return m_playerName;\n }", "public void sendPlayerName(String s) {\n try {\n dOut.writeUTF(s);\n dOut.flush();\n } catch (IOException e) {\n System.out.println(\"Could not send player name\");\n e.printStackTrace();\n }\n }", "public void AskName(String input){\r\n\t\tplayerName = input;\r\n\t}", "public void setPlayerName(String newName) {\n if(newName == null) {\n return;\n }\n props.setProperty(\"name\", newName);\n saveProps();\n }", "public void setPlayer(String player) {\r\n this.player = player;\r\n }", "public String getPlayerName() {\n return props.getProperty(\"name\");\n }", "public void updateName(Player player)\n {\n String oldName = playerLabel.getText();\n playerLabel.setText(player.getName());\n if (player.getName().equalsIgnoreCase(\"Disconnesso\"))\n {\n waiting(player.getName());\n }\n }", "public String save(){\r\n StringBuilder saveString = new StringBuilder(\"\");\r\n //currentPlayer, numPlayer, players[], \r\n saveString.append(currentPlayer + \" \");\r\n saveString.append(numPlayers + \" \");\r\n \r\n int i = 0;\r\n while(i < numPlayers){\r\n saveString.append(playerToString(players[i]) + \" \");\r\n i = i + 1;\r\n }\r\n\t\t\r\n\t\t//encrypt saveString\r\n\t\tString result = encryptSave(saveString.toString());\r\n \r\n return result;\r\n }", "String getName() {\n return getStringStat(playerName);\n }", "private String getPlayerName() {\n Bundle inBundle = getIntent().getExtras();\n String name = inBundle.get(USER_NAME).toString();\n return name;\n }", "@Override\r\n\tpublic void setOpponentName(String name) {\n\t\tmain.setOpponentUsername(name);\r\n\t}", "public String getPlayerName() {\n\t\tString name = super.getPlayerName();\n\t\treturn name;\n\t}", "public Save(Player player, String worldname) {\n\t\tthis(player.game, \"/saves/\" + worldname + \"/\");\r\n\t\t\r\n\t\twriteGame(\"Game\");\n\t\t//writePrefs(\"KeyPrefs\");\r\n\t\twriteWorld(\"Level\");\r\n\t\twritePlayer(\"Player\", player);\r\n\t\twriteInventory(\"Inventory\", player);\r\n\t\twriteEntities(\"Entities\");\r\n\t\t\r\n\t\tGame.notifications.add(\"World Saved!\");\r\n\t\tplayer.game.asTick = 0;\r\n\t\tplayer.game.saving = false;\r\n\t}", "String getPlayerName() {\r\n EditText editText = (EditText) findViewById(R.id.name_edit_text_view);\r\n return editText.getText().toString();\r\n }", "public String getName(Player p) {\n\t\treturn name;\n\t}", "void setGameName(String gameName);", "public void displayName(){\n player1.setText(p1.getName());\n player2.setText(p2.getName());\n }", "public String getCurrentPlayer() {\n return currentPlayer;\n }", "protected void savePlayers(Context context) {\n\t\tif (context == null) return;\n\n\t\t//Create json\n\t\tJSONObject JSON = new JSONObject();\n\t\ttry {\n\t\t\t//Save\n\t\t\tJSON.put(JSON_ID, m_ID);\n\t\t\tJSON.put(JSON_EMAIL, m_Email);\n\t\t} catch (JSONException e) {}\n\n\t\t//Get access to preference\n\t\t/*SharedPreferences Preference \t= context.getSharedPreferences(PREFERENCE_NAME, Context.MODE_PRIVATE);\n\t\tSharedPreferences.Editor Editor\t= Preference.edit();\n\n\t\t//Save\n\t\tEditor.putString(KEY_PLAYERS, JSON.toString());\n\t\tEditor.commit();*/\n\t}", "public void setPlayerTurnName(){\n game.setPlayerTurn();\n String playerTurnName = game.getPlayerTurnName();\n playerturntextID.setText(playerTurnName + \" : Turn !!\");\n }", "public String getPlayername(Player player) {\n System.out.println(\"――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――\");\n System.out.println(\"Merci de d'indiquer le nom du joueur \"+player.getColor().toString(false)+\" : \");\n String name = readInput.nextLine();\n return name;\n }", "public void saveDriverId(String name) {\n editor.putString(KEY_DRIVERID, name);\n\n // Login Date\n //editor.putString(KEY_DATE, date);\n\n // commit changes\n editor.commit();\n }", "Player(String playerName) {\n this.playerName = playerName;\n }", "static void savePlayerData() throws IOException{\n\t\t/*\n\t\t\tFile playerData = new File(\"Players/\" + Player.getName() +\".txt\");\n\t\t\tif (!playerData.exists()) {\n\t\t\t\tplayerData.createNewFile(); \n\t\t\t}\n\t\tObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(\"Players/\" + Player.getName() +\".txt\"));\n\t\toos.writeObject(Player.class);\n\t\toos.close();\n\t\t*/\n\t\t\n\t\tString[] player = Player.getInfoAsStringArray();\n\t\tjava.io.File playerData = new java.io.File(\"Players/\" + player[0] +\".txt\");\n\t\tif (!playerData.exists()){\n\t\t\tplayerData.createNewFile();\n\t\t}\n\t\tjava.io.PrintWriter writer = new java.io.PrintWriter(playerData);\n\t\t//[0] Name, \n\t\twriter.println(\"# Name\");\n\t\twriter.println(player[0]);\n\t\t//[1] Level, \n\t\twriter.println(\"# Level\");\n\t\twriter.println(player[1]);\n\t\t//[2] getRoleAsInt(),\n\t\twriter.println(\"# Role/Class\");\n\t\twriter.println(player[2]);\n\t\t//[3] exp,\n\t\twriter.println(\"# Exp\");\n\t\twriter.println(player[3]);\n\t\t//[4] nextLevelAt,\n\t\twriter.println(\"# Exp Required for Next Level Up\");\n\t\twriter.println(player[4]);\n\t\t//[5] health,\n\t\twriter.println(\"# Current Health\");\n\t\twriter.println(player[5]);\n\t\t//[6] maxHealth,\n\t\twriter.println(\"# Max Health\");\n\t\twriter.println(player[6]);\n\t\t//[7] intelligence,\n\t\twriter.println(\"# Intelligence\");\n\t\twriter.println(player[7]);\n\t\t//[8] dexterity,\n\t\twriter.println(\"# Dexterity\");\n\t\twriter.println(player[8]);\n\t\t//[9] strength,\n\t\twriter.println(\"# Strength\");\n\t\twriter.println(player[9]);\n\t\t//[10] speed,\n\t\twriter.println(\"# Speed\");\n\t\twriter.println(player[10]);\n\t\t//[11] protection,\n\t\twriter.println(\"# Protection\");\n\t\twriter.println(player[11]);\n\t\t//[12] accuracy,\n\t\twriter.println(\"# Accuracy\");\n\t\twriter.println(player[12]);\n\t\t//[13] dodge,\n\t\twriter.println(\"# Dodge\");\n\t\twriter.println(player[13]);\n\t\t//[14] weaponCode,\n\t\twriter.println(\"# Weapon's Code\");\n\t\twriter.println(player[14]);\n\t\t//[15] armorCode,\n\t\twriter.println(\"# Armor's Code\");\n\t\twriter.println(player[15]);\n\t\t//[16] Gold,\n\t\twriter.println(\"# Gold\");\n\t\twriter.println(player[16]);\n\t\twriter.close();\n\t\t\n\t}", "public void setPlayerName(String playerName) {\n\t\tthis.playerName = playerName;\n\t}", "public void setPlayerName(String newName) {\n\t\tname = newName;\n\t}", "public void onSaveListen() {\n _gamesList.get(_gamePos).getPlayers().add(playerName);\n // Increment the number of players that have joined the game\n _gamesList.get(_gamePos).setNumPlayers(_gamesList.get(_gamePos).getNumPlayers() + 1);\n\n TextView playersBlock = (TextView) findViewById(R.id.playersBlock);\n playersBlock.setText(\"\");\n List<String> players = _gamesList.get(_gamePos).getPlayers();\n for(int i = 0; i < players.size(); i++) {\n Log.d(\"GamePlayerSize\", Integer.toString(_gamesList.get(_gamePos).getPlayers().size()));\n if (i < players.size() - 1) {\n playersBlock.append(players.get(i) + \", \");\n }\n else {\n // Don't put a comma after the last one\n playersBlock.append(players.get(i));\n }\n }\n\n // Update the shared preferences with the edited game\n SharedPreferences gamesPref = this.getSharedPreferences(GAMES_FILE, MODE_PRIVATE);\n Gson gson = new Gson();\n\n SharedPreferences.Editor prefsEditor = gamesPref.edit();\n\n // Convert the games list into a json string\n String json = gson.toJson(_gamesList);\n Log.d(\"MainActivity\", json);\n\n // Update the _gamesMasterList with the modified _game\n prefsEditor.putString(GAME_KEY, json);\n prefsEditor.commit();\n\n Context context = getApplicationContext();\n CharSequence text = \"You have joined the game!\";\n int duration = Toast.LENGTH_SHORT;\n\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n }", "@Override\n\tpublic void currentPlayerChanged(Player player) {\n\t\tcurrentPlayerLabel.setText(player.name());\n\t}", "public String getPlayer() {\r\n return player;\r\n }", "void setPlayer1Name(String name) {\n if (!name.isEmpty()) {\n this.player1.setName(name);\n }\n }", "@Override\n protected void onPause() {\n super.onPause();\n\n SharedPreferences.Editor preferencesEditor = mPreferences.edit();\n preferencesEditor.putString(FULLNAME_KEY, myFullname);\n preferencesEditor.apply();\n }", "String player1GetName(){\n return player1;\n }", "@Override\n public String getPlayerName()\n {\n if (currentPlayer == 0)\n {\n return playerOneName;\n }\n else\n {\n return playerTwoName;\n }\n }", "public void setCurrentPlayer(String currentPlayer) {\n\t\t_currentPlayer = currentPlayer;\n\t}", "@Override\n\tprotected void onPause() {\n\t\tSharedPreferences.Editor editor = myprefs.edit();\n\t\teditor.putString(\"userN\", userName);\n\t\teditor.putString(\"name\",person_name);\n\t\teditor.commit();\n\t\tsuper.onPause();\n\t}", "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 setNames() {\n\t\tPlayer1 = \"COMPUTER\";\n\t\tPlayer2 = JOptionPane.showInputDialog(null, \"Enter your Name:\");\n\t\tnames_set = true;\n\t}", "public String getLoggedPlayerName() {\r\n return ctrlDomain.getLoggedPlayerName();\r\n }", "@Override\n public void onPause() {\n super.onPause();\n ObjectOutput out = null;\n String fileName = \"savedGame\";\n File saved = new File(getFilesDir(), fileName);\n\n try {\n out = new ObjectOutputStream(new FileOutputStream(saved, false));\n out.writeObject(player);\n out.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void setName(String name) {\n\t\tSharedPreferences settings = parentContext.getSharedPreferences(PREFERENCE_FILE, 0);\n\t\tSharedPreferences.Editor editor = settings.edit();\n\t\teditor.putString(USERNAME_KEY, name);\n\t\teditor.commit();\n\t}", "public String myGetPlayerName(String name) { \n Player caddPlayer = getServer().getPlayerExact(name);\n String pName;\n if(caddPlayer == null) {\n caddPlayer = getServer().getPlayer(name);\n if(caddPlayer == null) {\n pName = name;\n } else {\n pName = caddPlayer.getName();\n }\n } else {\n pName = caddPlayer.getName();\n }\n return pName;\n }", "String player2GetName(){\n return player2;\n }", "public void setPlayerName(String[] currentMsg, Player plr){\r\n\t\t\r\n\t\tString name = plr.getName();\r\n\t\tRandom rand = new Random();\r\n\t\tString substitute = \"Player\"+rand.nextInt(99);\r\n\t\t\r\n\t\tif(currentMsg.length>1){\r\n\t\t\tif(name == null){\r\n\t\t\t\tif(currentMsg[1].equals(\"null\"))\r\n\t\t\t\t\tplr.setName(substitute);\t\t\t\t\t\r\n\t\t\t\telse\r\n\t\t\t\t\tplr.setName(currentMsg[1]);\r\n\t\t\t}else{\r\n\t\t\t\tsendAllPlayers(serverMessage(name+\" is now \" + currentMsg[1]+\"!\"), lobby.getLobbyPlayers());\r\n\t\t\t\tname = currentMsg[1];\t\r\n\t\t\t\tplr.setName(name);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tplr.setName(substitute);\r\n\t\t}\r\n\t\t\t\r\n\t\tlobby.updateNames();\r\n \tsendNameInfoToAll();\r\n\t}", "boolean setPlayer(String player);", "public static void SetPlayerNames () {\n for (int i = 0; i < player_count; i++) {\r\n\r\n // PROMPT THE USER\r\n System.out.print(\"Player \" + (i+1) + \", enter your name: \");\r\n\r\n // INSTANTIATE A NEW PLAYER USING THE NAME THAT'S PROVIDED\r\n player[i] = new Player(input.nextLine());\r\n\r\n // IF THE PLAYER DOESN'T ENTER A NAME, CALL THEM \"BIG BRAIN\"\r\n if (player[i].name.length() == 0) {\r\n player[i].name = \"Big Brain\";\r\n System.out.println(\"Uh, OK...\");\r\n }\r\n\r\n }\r\n\r\n // MAKE SOME SPACE...\r\n System.out.println();\r\n }", "public String getCurrentPlayer() {\n\t\treturn _currentPlayer;\n\t}", "public void setPlayerName2(String name){\n\t\tplayerName2 = name;\n\t\trepaint();\n\t}", "public void setName( final String name ) throws RemoteException {\r\n playerState.name = name;\r\n }", "public void onClick(DialogInterface dialog, int whichButton) {\n\n String inputName = input.getText().toString();\n\n if (inputName.length() > 0) {\n players.add(inputName);\n StringBuilder sb = new StringBuilder(savedNames);\n sb.append(inputName + \",\");\n savedNames = sb.toString();\n editor.putString(\"savedNames\", savedNames);\n editor.commit();\n }\n }", "public static String getNameOne() {\n\tString name;\n\tname = playerOneName.getText();\n\treturn name;\n\n }", "private void changeCurrentPlayerText() {\n\t\tString currentPlayer = textFieldCurrentPlayer.getText();\n\t\tif (currentPlayer.equals(\"Player1\")) {\n\t\t\ttextFieldCurrentPlayer.setText(\"Player2\");\n\t\t} else {\n\t\t\ttextFieldCurrentPlayer.setText(\"Player1\");\n\t\t} \n\t}", "public void save() {\n final JFileChooser fileChooser =\n new JFileChooser(System.getProperty(\"user.dir\"));\n try {\n fileChooser.setSelectedFile(new File(\"save.ser\"));\n int saveFile = fileChooser.showSaveDialog(GameFrame.this);\n\n if (saveFile == JFileChooser.APPROVE_OPTION) {\n File saveGame = fileChooser.getSelectedFile();\n FileOutputStream fileOut = new FileOutputStream(saveGame);\n ObjectOutputStream objOut = new ObjectOutputStream(fileOut);\n objOut.writeObject(world);\n objOut.close();\n fileOut.close();\n System.out.println(\"Game saved.\");\n } else {\n return;\n }\n } catch (IOException i) {\n i.printStackTrace();\n }\n\n }", "public void saveGame(String fileName){\n Gson gson = new Gson();\n String userJson = gson.toJson(player);\n\n try(Writer w = new BufferedWriter(new OutputStreamWriter( new FileOutputStream(fileName), \"UTF-8\"))) {\n w.write(userJson);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void getPlayertName() {\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}", "void setHighscoreName(String _playerName) {\n String name = _playerName;\n\n System.out.println(name + \"Game\");\n if (name == null) {\n //create Scanner\n Scanner input = new Scanner(System.in);\n //prompt the user to enter the name their highscore\n System.out.println(\"\");\n System.out.println(\"Please enter your highscore name:\");\n name = input.next();\n }\n// String name = playerName;\n if (!(name.length() <= 16)) {\n String substringOfName = name.substring(0, 15);\n score.setName(substringOfName);\n } else {\n score.setName(name);\n }\n }" ]
[ "0.87206423", "0.7471723", "0.745909", "0.7290819", "0.7066069", "0.7018179", "0.6980627", "0.6977841", "0.69769835", "0.6935111", "0.692065", "0.69171697", "0.6913481", "0.6906361", "0.68912745", "0.6863919", "0.6801588", "0.6796943", "0.67834127", "0.6735414", "0.6718789", "0.67140764", "0.67140764", "0.6710954", "0.67054385", "0.6699071", "0.66887426", "0.6679327", "0.6664819", "0.66436726", "0.6639304", "0.6630074", "0.6623315", "0.65983397", "0.6594621", "0.65746754", "0.65595317", "0.6559118", "0.65531266", "0.65502685", "0.65447795", "0.65098333", "0.65010226", "0.64786446", "0.6476204", "0.64731175", "0.64653224", "0.6446777", "0.6431644", "0.6426906", "0.642145", "0.6419475", "0.6409599", "0.64009726", "0.6393949", "0.6386048", "0.6369428", "0.63382477", "0.6336552", "0.6298632", "0.6291022", "0.6281322", "0.6252153", "0.62489533", "0.62487185", "0.62458014", "0.6233395", "0.6232068", "0.6231648", "0.62299806", "0.62185663", "0.62179655", "0.6208295", "0.62025774", "0.61766505", "0.6170238", "0.6169913", "0.61644346", "0.61600846", "0.6137305", "0.6133419", "0.6132875", "0.6129064", "0.6126053", "0.6116338", "0.6104834", "0.6101945", "0.61011523", "0.6084279", "0.6082339", "0.60748655", "0.6062224", "0.60554355", "0.6047574", "0.604546", "0.6045304", "0.60419685", "0.60383695", "0.6037561", "0.6028324" ]
0.7806936
1
loads the name of the current player in 'data/current_player'
public void loadCurrentPlayer() { Scanner sc; File file = new File("data/current_player"); if(file.exists()) { try { sc = new Scanner(new File("data/current_player")); if(sc.hasNextLine()) { String player = sc.nextLine(); _currentPlayer= player; } else { _currentPlayer = null; } } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } } else { BashCmdUtil.bashCmdNoOutput("touch data/current_player"); _currentPlayer = null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getCurrentPlayer() {\n return currentPlayer;\n }", "private String getPlayerName() {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);\n String storedName = preferences.getString(\"playerName\",\"none\");\n return storedName;\n }", "public String getCurrentPlayer() {\r\n return this.playerIds[this.currentPlayer];\r\n }", "public String getCurrentPlayer() {\n\t\treturn _currentPlayer;\n\t}", "public String getPlayer() {\r\n return player;\r\n }", "String getPlayer();", "@Override\n public String getCurrentPlayer() {\n return godPower.getCurrentPlayer();\n }", "public String getName(){\r\n\t\treturn playerName;\r\n\t}", "public String getPlayerName() {\n return this.playerName;\n }", "public String getPlayerName(){\n\t\treturn playerName;\n\t}", "public String getPlayerName() {\n return props.getProperty(\"name\");\n }", "String getPlayerName();", "String getName(){\n\t\treturn playerName;\n\t}", "public String getPlayerName() {\n return playerName;\n }", "public String getPlayerName() {\n return playerName;\n }", "public String getPlayerName() {\n \treturn playername;\n }", "Player getCurrentPlayer();", "Player getCurrentPlayer();", "public String getPlayerName() {\n return name; \n }", "private String getPlayerName() {\n Bundle inBundle = getIntent().getExtras();\n String name = inBundle.get(USER_NAME).toString();\n return name;\n }", "public String getName()\r\n\t{\r\n\t\treturn this.playerName;\r\n\t}", "@Override\n\tpublic String getPlayerName() {\n\t\treturn playerName;\n\t}", "public String getPlayerName() {\n return nameLabel.getText().substring(0, nameLabel.getText().indexOf('\\''));\n }", "public String getPlayerName() {\n\n return m_playerName;\n }", "public String getPlayerName() {\n\t\treturn name;\n\t}", "public String getPlayerName() {\n\t\treturn playerName;\n\t}", "public String myGetPlayerName(String name) { \n Player caddPlayer = getServer().getPlayerExact(name);\n String pName;\n if(caddPlayer == null) {\n caddPlayer = getServer().getPlayer(name);\n if(caddPlayer == null) {\n pName = name;\n } else {\n pName = caddPlayer.getName();\n }\n } else {\n pName = caddPlayer.getName();\n }\n return pName;\n }", "String getName() {\n return getStringStat(playerName);\n }", "@Override\n public String getPlayerName()\n {\n if (currentPlayer == 0)\n {\n return playerOneName;\n }\n else\n {\n return playerTwoName;\n }\n }", "public void setPlayer(String player) {\r\n this.player = player;\r\n }", "public int getCurrentPlayer() {\n return player;\n }", "public void setCurrentPlayer(String currentPlayer) {\n\t\t_currentPlayer = currentPlayer;\n\t}", "public String getPlayerName() {\n\t\tString name = super.getPlayerName();\n\t\treturn name;\n\t}", "public void setPlayerName(String name) {\n \tplayername = name;\n }", "public Player getCurrentPlayer(){\n return this.currentPlayer;\n }", "public String getPlayerName(){\n return this.playerName;\n\n }", "String player1GetName(){\n return player1;\n }", "public Player getCurrentPlayer() {\n return currentPlayer;\n }", "public Player getCurrentPlayer() {\n return currentPlayer;\n }", "public int getCurrentPlayer() {\n\t\treturn player;\n\t}", "@Override\n\tpublic void currentPlayerChanged(Player player) {\n\t\tcurrentPlayerLabel.setText(player.name());\n\t}", "public User getCurrentPlayer() {\n\t\treturn currentPlayer;\n\t}", "public char getCurrentPlayer() {\n\t\treturn currentPlayer;\n\t}", "public void updateCurrentPlayer(String currentPlayer) {\n\t\titem.setText(1, currentPlayer);\n\t}", "public ServerPlayer getCurrentPlayer() {\r\n\t\treturn this.currentPlayer;\r\n\t}", "private String getPlayerName() {\n EditText name = (EditText) findViewById(R.id.name_edittext_view);\n return name.getText().toString();\n }", "public void setPlayer1Name(String name){\n player1 = name;\n }", "public java.lang.String getPlayerName() {\n java.lang.Object ref = playerName_;\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 playerName_ = s;\n return s;\n }\n }", "public String getPlayer() {\n return p;\n }", "public int getCurrentPlayer(){\n return this.currentPlayer;\n }", "String player2GetName(){\n return player2;\n }", "@Override\n\tpublic String getPlayer() {\n\t\treturn null;\n\t}", "public String getLoggedPlayerName() {\r\n return ctrlDomain.getLoggedPlayerName();\r\n }", "private String getFirstPlayer() {\n\t\treturn firstPlayer;\n\t}", "public java.lang.String getPlayerName() {\n java.lang.Object ref = playerName_;\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 playerName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@Override\r\n\tpublic void SavePlayerName() {\r\n\t\tPlayer player = (Player)Player.getPlayerInstance();\r\n\t\t\r\n\t\tString file = \"PlayerName.txt\";\r\n\t\tString playerName = player.getName();\r\n\t\ttry{\r\n\t\t\tPrintWriter print = new PrintWriter(file);\r\n\t\t\tprint.println(playerName);\r\n\t\t}\r\n\t\tcatch(FileNotFoundException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "private void SetCurrentPlayer() throws IOException\n {\n if( mTeamsComboBox.getSelectedItem() != null )\n {\n String team = mTeamsComboBox.getSelectedItem().toString();\n String position = mPositionComboBox.getSelectedItem().toString();\n String playerData = GetPlayerString(team, position);\n if( playerData != null )\n SetPlayerData(playerData);\n }\n }", "@Override\n\tpublic void loadPlayer() {\n\t\t\n\t}", "Player currentPlayer();", "public void setPlayerName(String playerName) {\n this.playerName = playerName;\n }", "public Player getCurrentPlayer()\n\t{\n\t\treturn current;\n\t}", "public static Player getPlayer(Player player){\n Player returnPlayer = null;\n if (player != null) {\n try {\n returnPlayer = mapper.readValue(new File(\"Data\\\\PlayerData\\\\\" + getFileName(player) + \".json\"), Player.class);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n return returnPlayer;\n }", "public void saveCurrentPlayer() {\n\t\tBashCmdUtil.bashCmdNoOutput(\"touch data/current_player\");\n\t\tBashCmdUtil.bashCmdNoOutput(String.format(\"echo \\\"%s\\\" >> data/current_player\",_currentPlayer));\n\t}", "public String getName(){\n\t\treturn players.get(0).getName();\n\t}", "public String getPlayername(Player player) {\n System.out.println(\"――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――\");\n System.out.println(\"Merci de d'indiquer le nom du joueur \"+player.getColor().toString(false)+\" : \");\n String name = readInput.nextLine();\n return name;\n }", "public String getNewPlayerName() {\n return newPlayerName;\n }", "private void getPlayertName() {\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}", "public PlayerData getPlayerData() {\n return player;\n }", "static void setCurrentPlayer()\n {\n System.out.println(\"Name yourself, primary player of this humble game (or type \\\"I suck in life\\\") to quit: \");\n\n String text = input.nextLine();\n\n if (text.equalsIgnoreCase(\"I suck in life\"))\n quit();\n else\n Player.current.name = text;\n }", "String getNewPlayerName();", "public static String getOtherPlayer(Context context) {\n SharedPreferences prefs = context.getSharedPreferences(PREF, Context.MODE_PRIVATE);\n return prefs.getString(\"OtherPlayer\", \"nothing\");\n }", "public String getName(Player p) {\n\t\treturn name;\n\t}", "String randomPlayer1GetName(){\n return randomPlayer1;\n }", "public static void savePlayerNames() {\r\n\t\tMain.player1 = GameSetup.choiceBoxPlayer1.getSelectedItem();\r\n\t\tMain.player2 = GameSetup.choiceBoxPlayer2.getSelectedItem();\r\n\t\tMain.player3 = GameSetup.choiceBoxPlayer3.getSelectedItem();\r\n\t\t\r\n\t\t//Don't show fourth player if playing 3 handed game.\r\n\t\tif (!Main.isThreeHanded) {\r\n\t\t\tMain.player4 = GameSetup.choiceBoxPlayer4.getSelectedItem();\r\n\t\t}\r\n\t}", "abstract public String getNameFor(Player player);", "public void setPlayer2Name(String name){\n player2 = name;\n }", "Player getSelectedPlayer();", "@Override\n\tpublic void setData(String playerName) {\n\t\tthis.currentPlayerName = playerName;\n\t\t\n\t}", "public void setD_CurrentPlayer(Player p_CurrentPlayer) {\n d_CurrentPlayer = p_CurrentPlayer;\n }", "public com.google.protobuf.ByteString\n getPlayerNameBytes() {\n java.lang.Object ref = playerName_;\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 playerName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "private void loadUserName() {\n\t\tAsyncTaskHelper.create(new AsyncMethods<String>() {\n\n\t\t\t@Override\n\t\t\tpublic String doInBackground() {\n\t\t\t\tUser user = new User();\n\t\t\t\tuser.setId(savedGoal.getGoal().getUserId());\n\t\t\t\treturn ClientUserManagement.getUsernameByUserId(user);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onDone(String value, long ms) {\n\t\t\t\tmGoalOwner.setText(value);\n\t\t\t}\n\t\t});\n\n\t}", "public String getCurrentNickname() {\n return currentPlayer.getNickName();\n }", "public String getOtherPlayer() {\n return otherPlayer;\n }", "java.lang.String getGameName();", "java.lang.String getGameName();", "String getPlayerName() {\r\n EditText editText = (EditText) findViewById(R.id.name_edit_text_view);\r\n return editText.getText().toString();\r\n }", "public com.google.protobuf.ByteString\n getPlayerNameBytes() {\n java.lang.Object ref = playerName_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n playerName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public static Player getCurrPlayer(){\n\t\treturn players.get(curr);\n\t}", "public String getPlayerID() {\n return playerID;\n }", "public int getPlayer() {\r\n\t\treturn myPlayer;\r\n\t}", "Player(String playerName) {\n this.playerName = playerName;\n }", "public Player getCurrentPlayer(){\n String playerId = getUser().get_playerId();\n\n Player player = null;\n\n try {\n player = getCurrentGame().getPlayer(playerId);\n } catch(InvalidGameException e) {\n e.printStackTrace();\n System.out.println(\"This is the real Error\");\n }\n\n return player;\n }", "public String getActivePlayer() {\n\t\t\n\t\tif(player01.getIsCurrentlyPlaying()){\n\t\t\t\n\t\t\t// Return what player is active as a string.\n\t\t\treturn \"Player 01: \";\n\t\t}else {\n\t\t\t\n\t\t\treturn \"Player 02: \";\n\t\t}\n\t}", "public String getPlayerName(UUID id) {\n return playerRegistry.get(id);\n }", "public void setPlayerName(String playerName) {\n\t\tthis.playerName = playerName;\n\t}", "public String getFullPlayerName(Player otherPlayer) {\n return this.fullPlayerName;\n }", "public void setPlayer(Player player) {\n this.currentPlayer = player;\n }", "public Node getPlayerData(){\n if(blender_Player == null){\n /** Get player data **/\n blender_Player = (Node) assetManager.loadModel(\"Models/Blender/PlayerModel.j3o\");\n String name = blender_Player.getName();\n\n /** Get player scene data **/\n Node blenderNode = (Node) blender_Player.getChildren().get(0);\n playerData_Children = blenderNode.getChildren();\n\n for(int p = 0; p < playerData_Children.size(); p++){\n String namePD = playerData_Children.get(p).getName();\n if(namePD.equals(\"AnimCharacter\")){\n playerIndex = p;\n }\n //System.out.println(\"Name : \" + namePD);\n }\n }\n if(playerIndex == -1){\n return null;\n }\n return (Node) playerData_Children.get(playerIndex);\n }", "Player getPlayer();", "public String getLoadPlayerType1(){\n return m_LoadPlayerType1;\n }" ]
[ "0.74340004", "0.7379885", "0.7330165", "0.73290735", "0.6999294", "0.6979169", "0.69770277", "0.6898778", "0.68960077", "0.68815845", "0.68697953", "0.68626636", "0.6853061", "0.6851267", "0.6851267", "0.684023", "0.6814043", "0.6814043", "0.6758615", "0.6751875", "0.67156297", "0.6685039", "0.66739094", "0.6657607", "0.66058946", "0.6599571", "0.65965044", "0.65863883", "0.65529877", "0.6540453", "0.6535066", "0.65156776", "0.6512346", "0.6490054", "0.64845294", "0.64838296", "0.6455083", "0.6430994", "0.6430994", "0.6407169", "0.63826674", "0.6369191", "0.6350619", "0.6349437", "0.6309186", "0.6292634", "0.62862027", "0.62841874", "0.6276501", "0.6271979", "0.6261171", "0.6254088", "0.62430215", "0.623909", "0.62325567", "0.6225779", "0.6208496", "0.6205285", "0.6201041", "0.6192341", "0.61712104", "0.616545", "0.6163042", "0.61576486", "0.6142086", "0.6131247", "0.61201334", "0.6091426", "0.6084764", "0.60746324", "0.6073857", "0.6064063", "0.60557693", "0.604924", "0.60267997", "0.60254854", "0.60122716", "0.6005499", "0.5992471", "0.5991064", "0.59851044", "0.5969306", "0.5966798", "0.5959974", "0.5959974", "0.5958991", "0.59414554", "0.5941068", "0.5937192", "0.59343266", "0.59142554", "0.59083444", "0.58864516", "0.58716875", "0.5867685", "0.5864441", "0.58565694", "0.5853101", "0.5851633", "0.5845626" ]
0.788963
0
returns true if the internation mode is unlocked, that is 2 full categories are completed in game returns false otherwise
public boolean InternationalUnlocked() { int count = 0; for (int category: _answeredQuestions) { if (category == 5) { count++; } } if (count >= 2) { _internationalUnlocked = true; } else { _internationalUnlocked = false; } saveInternationalUnlocked(); return _internationalUnlocked; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean canCrit();", "private boolean canEnlist() {\n\n return uiStateManager.getState().equals(GameUIState.WAVE_IN_PROGRESS)\n || uiStateManager.getState().equals(GameUIState.STANDBY);\n }", "public static boolean own() {\n return InventoryManager.getAccessibleCount(ItemPool.COMBAT_LOVERS_LOCKET) > 0;\n }", "public boolean checkState(){\r\n\t\t//Check if we have enough users\r\n\t\tfor (Map.Entry<String, Role> entry : roleMap.entrySet()){\r\n\t\t\tString rid = entry.getKey();\r\n\t\t\tRole role = roleMap.get(rid);\r\n\t\t\tlog.info(\"Veryifying \" + rid);\t\t\t\r\n\t\t\tif(!roleCount.containsKey(rid)){\r\n\t\t\t\tlog.severe(\"Unsure of game state.\" + rid + \" not found in roleCount\");\r\n\t\t\t\tSystem.exit(-1);\r\n\t\t\t\r\n\t\t\t} else if(role.getMin() > roleCount.get(rid)) {\r\n\t\t\t\t\tlog.info(\"minimum number for roleID: \" + rid + \" not achived\");\r\n\t\t\t\t\treturn false;\r\n\t\t\t\r\n\t\t\t} else if(role.getMax() < roleCount.get(rid)) { //probably don't need this one but cycles are cheap\r\n\t\t\t\tlog.severe(\"OVER MAXIMUM number for roleID: \" + rid + \" not achived\");\r\n\t\t\t\tSystem.exit(-1);\r\n\t\t\t}\r\n\t\t}\r\n\t\t//if we do reach here we've reached a critical mass of players. But we still need them to load the screen\r\n\t\t\r\n\t\tif((this.getGameState() != GAMESTATE.RUNNING) ||(this.gameState !=GAMESTATE.READY_TO_START) ) {\r\n\t\t\tsetGameState(GAMESTATE.CRITICAL_MASS);\r\n\t\t\tlog.info(\"have enough players for game\");\r\n\t\t}\r\n\t\t//if the users are done loading their screen, let us know and then we can start\r\n\t\tif (!userReady.containsValue(false)){\r\n\t\t\tsetGameState(GAMESTATE.READY_TO_START);\r\n\t\t\tlog.info(\"Gamestate is running!!\");\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "boolean hasMode();", "private boolean m17127F() {\n int b = ((DescendantsPrefs) this.f15661q0.get()).getAllPreferences().mo6640b();\n if (C7710c.m18767b(b, 1) || C7710c.m18767b(b, 8) || this.f15658n0.mo13872d() || ((FriendshipFactsPrefs) this.f15662r0.get()).currentState() == C3764a.UNLOCKABLE) {\n return true;\n }\n return false;\n }", "private boolean isAvailable() {\n\t\tfor (int i = 0; i < lawsuitsAsClaimant.size(); i++) {\n\t\t\tif (lawsuitsAsClaimant.get(i).isActive()){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Check lawsuits as Defendant\n\t\tfor (int i = 0; i < lawsuitsAsDefendant.size(); i++) {\n\t\t\tif (lawsuitsAsDefendant.get(i).isActive()){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "boolean UnlockedEscapeTheIsland() {\n if (allMissions.missionStatus.get(\"Escape the island\") == true) {\n return false;\n }\n return true;\n }", "public boolean affordCard() {\n \t\treturn (FREE_BUILD || getResources(Type.WOOL) >= 1\n \t\t\t\t&& getResources(Type.GRAIN) >= 1 && getResources(Type.ORE) >= 1);\n \t}", "public boolean hasLoginPack() {\n return packCase_ == 2;\n }", "public boolean hasUnlocked(Player p) {\n\t\tfor (Category category: parents) {\n\t\t\tfor (SlimefunItem item: category.getItems()) {\n\t\t\t\tif (Slimefun.isEnabled(p, item.getItem(), false) && Slimefun.hasPermission(p, item, false)) {\n\t\t\t\t\tif (item.getResearch() != null) {\n\t\t\t\t\t\tif (!item.getResearch().hasUnlocked(p)) return false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "boolean isAutorisationUtilisation();", "public boolean hasLoginPack() {\n return packCase_ == 2;\n }", "public boolean completed(){\n return !activeAttackers() && !attackersLeft();\n }", "public boolean isSomethingBuyable(GameClient game){\n for(Level l : Level.values()){\n for(ColorDevCard c : ColorDevCard.values()){\n try {\n NumberOfResources cost = dashBoard[l.ordinal()][c.ordinal()].getCost();\n cost = cost.safe_sub(game.getMe().getDiscounted());\n game.getMe().getDepots().getResources().sub(cost);\n return true;\n } catch (OutOfResourcesException | NullPointerException ignored) {}\n }\n }\n return false;\n }", "boolean isLocked();", "boolean isLocked();", "protected boolean isfull() {\n return this.numSeats == this.bookedSeats;\n }", "public static boolean onhand() {\n return InventoryManager.getCount(ItemPool.COMBAT_LOVERS_LOCKET) > 0\n || KoLCharacter.hasEquipped(ItemPool.COMBAT_LOVERS_LOCKET);\n }", "boolean hasAccY();", "boolean getIsOccupation();", "boolean isGameComplete();", "public boolean[] checkAvailableMode()\n {\n if (player == null)\n throw new IllegalStateException(\"Carta: \" + name + \" non appartiene a nessun giocatore.\");//If this card doesn't belong to any player, it launches an exception\n\n\n availableMethod[0] = false;//I suppose that the modes can't be used\n availableMethod[1] = false;\n availableMethod[2] = false;\n\n List<Square> squareList = new ArrayList<>();\n\n squareList.addAll(MethodsWeapons.squareThatSee(player));\n squareList.remove(player.getSquare());\n\n\n if (isLoaded() && MethodsWeapons.areSquareISeeNotMineNotEmpty(player, squareList))\n availableMethod[0] = true;\n\n if (isLoaded() && player.getAmmoBlue() > 0 && (!checkRocketJumpColors().isEmpty()) && availableMethod[0])\n availableMethod[1] = true;\n\n\n if (isLoaded() && player.getAmmoYellow() > 0 && availableMethod[0])\n availableMethod[2] = true;\n\n return availableMethod;\n\n }", "boolean hasMission();", "public boolean isOpen() {\r\n \r\n boolean open = false;\r\n\r\n List<String> permitidas = new ArrayList();\r\n List<String> prohibidas = new ArrayList();\r\n //PROCESANDO LO PERMITIDO.\r\n NodeIterator ni = license.model.listObjectsOfProperty( ModelFactory.createDefaultModel().createResource(license.getURI()), ODRL.PPERMISSION);\r\n while(ni.hasNext())\r\n {\r\n RDFNode n = ni.next();\r\n if(n.isResource())\r\n {\r\n Resource r = n.asResource();\r\n StmtIterator sit = r.listProperties(ODRL.PACTION);\r\n while(sit.hasNext())\r\n {\r\n Statement st=sit.next();\r\n RDFNode n2 = st.getObject();\r\n String s = n2.asResource().getLocalName();\r\n permitidas.add(s);\r\n }\r\n }\r\n }\r\n \r\n //PROCESANDO LO PROHIBIDO\r\n ni = license.model.listObjectsOfProperty( ModelFactory.createDefaultModel().createResource(license.getURI()), ODRL.PPROHIBITION);\r\n while(ni.hasNext())\r\n {\r\n RDFNode n = ni.next();\r\n if(n.isResource())\r\n {\r\n Resource r = n.asResource();\r\n StmtIterator sit = r.listProperties(ODRL.PACTION);\r\n while(sit.hasNext())\r\n {\r\n Statement st=sit.next();\r\n RDFNode n2 = st.getObject();\r\n String s = n2.asResource().getLocalName();\r\n prohibidas.add(s);\r\n }\r\n }\r\n } \r\n for(String s : permitidas)\r\n System.out.println(\"OK \" + s);\r\n for(String s : prohibidas)\r\n System.out.println(\"NOK \" + s);\r\n if (permitidas.contains(\"Distribution\") && permitidas.contains(\"DerivativeWorks\") && !prohibidas.contains(\"CommercialUse\"))\r\n open = true;\r\n return open;\r\n }", "boolean hasLoginPack();", "boolean hasAchievementType();", "boolean hasDefense();", "boolean hasDefense();", "boolean hasDefense();", "boolean hasDefense();", "boolean hasDefense();", "boolean hasDefense();", "boolean isWinningCombination(Ticket ticket);", "boolean hasLeaveGameReqeuest();", "public boolean isCardToAccuse() {\n\t\treturn (getOwner() == CASE_FILE_PLAYER);\n\t}", "public boolean isFinalRoom(){\n System.out.println(\"------------------------------------------ ->\"+((EnemyRoom) room).getType());\n return ((EnemyRoom) room).getType().equals(\"Boss\");\n }", "boolean isCheckedOut();", "public boolean checkOutsiderPermission(Authentication authentication,Integer ctId){\n ContestEntity contestEntity = getContestById(ctId);\n //contest must be public(anyone can participate) and contest creator allows everyone to see\n if (!contestEntity.getIsAnyoneCanParticipate().equals(1) || !contestEntity.getShowInforToAll().equals(1)){\n return false;\n }\n\n //if so allows only when contest has started\n Date currentTime = new Date();\n Date startTime = contestEntity.getStartTime();\n List<AuthorityDTO> lstAuthority = authorityMapper.getContestAuthority(ctId, authentication.getName());\n for (AuthorityDTO curAuth : lstAuthority) {\n if (curAuth.getId().equals(Constants.AUTH_PARTICIPATE_CONTEST_ID)) {\n return false;\n }\n }\n return currentTime.compareTo(startTime) >= 0;\n }", "boolean hasAllowedCredit();", "public boolean canProtectPieces() {\r\n\t\treturn (cityCards.stream().anyMatch(c -> (c.isSmallGods() && !c.isDisabled())\r\n\t\t\t\t&& money >= PROTECTION_COST)); \r\n\t}", "boolean isPlayableInGame();", "public boolean isUseable()\n {\n if (state == 0)\n {\n return true;\n }\n return false;\n }", "public synchronized boolean checkAvailabilityOfCourse(Character courseName){\n\t\treturn getCourseSeatsCount(courseName) < 60;\n\t}", "boolean hasAccZ();", "public boolean affordCity() {\n \t\treturn (FREE_BUILD || cities < MAX_CITIES\n \t\t\t\t&& getResources(Type.GRAIN) >= 2 && getResources(Type.ORE) >= 3);\n \t}", "public abstract boolean isEdible();", "boolean gameOver() {\n return piecesContiguous(BP) || piecesContiguous(WP);\n }", "private boolean checkLoot() {\n\t\tboolean found = false;\n\t\tfor (int i = 0; i < loots.size() && !found; i++) {\n\t\t\tLoot l = loots.get(i);\n\t\t\tif (l.isInRange(player.pos) && l.checkPlayerDir(player.direction)) {\n\t\t\t\tif (l.decrementStatus()) {\n\t\t\t\t\tloots.remove(i);\n\t\t\t\t\tLoad.collectLoot(l);\n\t\t\t\t\tcreateSign(l.getLine(0), l.getLine(1), l.getContent());\n\t\t\t\t\tplayer.stop();\n\t\t\t\t}\n\t\t\t\tfound = true;\n\t\t\t}\n\t\t}\n\t\treturn found;\n\t}", "public boolean winner() {\n for(int i = 0; i < Landmarks.size(); i++) {\n if (Landmarks.get(i).getConstructed() == false) {\n return false;\n }\n }\n return true;\n }", "@Override\n public boolean isValid() {\n return (27 - Inventory.getAll().length <= Inventory.find(\"Soft clay\").length)\n || (Inventory.find(\"Soft clay\").length < 1 || Inventory\n .find(\"Astral rune\").length < 1)\n && !Banking.isBankScreenOpen()\n && GlassBlower.antiban.canInteractObject();\n }", "private boolean finalMilestoneAccomplished()\n {\n if( (firstMilestoneAccomplished()) &&\n (secondMilestoneAccomplished()) &&\n (thirdMilestoneAccomplished()) &&\n (beliefs.puzzle[2][1] == 10) &&\n (beliefs.puzzle[2][2] == 11) &&\n (beliefs.puzzle[2][3] == 12) &&\n (beliefs.puzzle[3][1] == 14) &&\n (beliefs.puzzle[3][2] == 15)\n\n )\n return true;\n else\n return false;\n }", "public boolean getIsCompletingGame()\r\n {\r\n return this.isCompletingGame; \r\n }", "public boolean isAcuityEnabled()\n {\n return false;\n }", "boolean gameOver() {\n return piecesContiguous(BLACK) || piecesContiguous(WHITE);\n }", "public boolean safeToClose(){\n if(hashMapOfAllAccts.isEmpty()){\n return true;\n }\n return false;\n }", "public boolean gameOver()\n {\n return checkmate()||draw()!=NOT_DRAW;\n }", "private boolean canAddSupport() {\n\n return uiStateManager.getState().equals(GameUIState.WAVE_IN_PROGRESS)\n || uiStateManager.getState().equals(GameUIState.STANDBY);\n }", "boolean hasOccupation();", "boolean hasOccupation();", "boolean hasOccupation();", "boolean hasOccupation();", "boolean hasOccupation();", "public boolean estPlein() {\n return this.tapis.size() == capacite;\n }", "boolean isGameFinished() {\n if (tiles.takenTilesNumber() < 3)\n return false;\n Symbol winningSymbol = tiles.getTile(1);\n if (!winningSymbol.equals(Symbol.EMPTY)) {\n if (tiles.getTile(5).equals(winningSymbol)) {\n if (tiles.getTile(9).equals(winningSymbol)) {\n return true;\n }\n }\n if(tiles.getTile(2).equals(winningSymbol)) {\n if(tiles.getTile(3).equals(winningSymbol)) return true;\n }\n if(tiles.getTile(4).equals(winningSymbol)) {\n if(tiles.getTile(7).equals(winningSymbol)) return true;\n }\n }\n winningSymbol = tiles.getTile(2);\n if (!winningSymbol.equals(Symbol.EMPTY)) {\n if (tiles.getTile(5).equals(winningSymbol)) {\n if (tiles.getTile(8).equals(winningSymbol)) return true;\n }\n }\n\n winningSymbol = tiles.getTile(3);\n if (!winningSymbol.equals(Symbol.EMPTY)) {\n if (tiles.getTile(5).equals(winningSymbol)) {\n if (tiles.getTile(7).equals(winningSymbol)) return true;\n }\n if (tiles.getTile(6).equals(winningSymbol)) {\n if (tiles.getTile(9).equals(winningSymbol)) return true;\n }\n }\n\n\n winningSymbol = tiles.getTile(4);\n if (!winningSymbol.equals(Symbol.EMPTY)) {\n if (tiles.getTile(5).equals(winningSymbol)) {\n if (tiles.getTile(7).equals(winningSymbol)) return true;\n }\n }\n\n winningSymbol = tiles.getTile(7);\n if (!winningSymbol.equals(Symbol.EMPTY)) {\n if (tiles.getTile(8).equals(winningSymbol)) {\n if (tiles.getTile(9).equals(winningSymbol)) return true;\n }\n }\n return false;\n }", "public boolean canDonate() {\n\t\treturn (dataSize() >= Math.ceil(degree / 2.0));\n\t}", "private boolean canSelectCurWorldType() {\n WorldType worldtype = WorldType.WORLD_TYPES[this.selectedIndex];\n if (worldtype != null && worldtype.canBeCreated()) {\n return worldtype == WorldType.DEBUG_ALL_BLOCK_STATES ? hasShiftDown() : true;\n } else {\n return false;\n }\n }", "@Override\n public boolean isChameleonShieldActive() {\n if (!isShutDown()) {\n for (Mounted m : getMisc()) {\n EquipmentType type = m.getType();\n if (type.hasFlag(MiscType.F_CHAMELEON_SHIELD) && m.curMode().equals(\"On\") && m.isReady()) {\n return true;\n }\n }\n }\n return false;\n }", "boolean m19264c() {\n return (getState() & 12) != 0;\n }", "public boolean searchEconomyClass()\n\t{\n\t\tfor(int i=0;i<4;i++)\n\t\t{\t\n\t\t\tif(seats[2][i] == false)\n\t\t\t{\n\t\t\t\treturn true;\t\t\t\n\t\t\t}\n\t\t\telse if(seats[3][i] == false)\n\t\t\t{\n\t\t\t\treturn true;\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn false;\n\t\t\n\t}", "public boolean isInactive();", "public boolean isVacant() {\r\n\treturn !isOccupied() || !isAvailable();\r\n }", "private boolean ModeCheck() {\n\t\treturn prefs.getBoolean(\"appmode\", false);\n\n\t}", "public void checkGameStatus() {\n everyTenthGoalCongrats();\n randomPopUpBecauseICan();\n }", "public boolean gameStillActive() {\n boolean active = true;\n \n // Check max days is not reached.\n active = active && getCurrentDay() < maxDays;\n \n // Check there is still living crew members\n active = active && crewState.getLivingCrewCount() > 0;\n \n // Check ship is not destroyed\n active = active && crewState.getShip().getShieldLevel() > 0;\n \n // Check ship parts have not been found.\n active = active && crewState.getShipPartsFoundCount() < getShipPartsNeededCount();\n \n return active;\n }", "public boolean isGranted(){\n\n// if (BallotBoxState.Granted.equals(getBallotBoxState()) || this.quorum.get() <= 0) {\n// setBallotBoxState(BallotBoxState.Granted);\n// return true;\n// }\n// return false;\n\n return this.quorum.get() <= 0;\n }", "public void isStillInCombat() {\n isInCombat = enemiesInCombat.size() > 0;\n }", "public boolean addDualCockpit() {\n addCritical(LOC_HEAD, 0, new CriticalSlot(CriticalSlot.TYPE_SYSTEM, SYSTEM_LIFE_SUPPORT));\n addCritical(LOC_HEAD, 1, new CriticalSlot(CriticalSlot.TYPE_SYSTEM, SYSTEM_SENSORS));\n addCritical(LOC_HEAD, 2, new CriticalSlot(CriticalSlot.TYPE_SYSTEM, SYSTEM_COCKPIT));\n addCritical(LOC_HEAD, 3, new CriticalSlot(CriticalSlot.TYPE_SYSTEM, SYSTEM_COCKPIT));\n addCritical(LOC_HEAD, 4, new CriticalSlot(CriticalSlot.TYPE_SYSTEM, SYSTEM_SENSORS));\n addCritical(LOC_HEAD, 0, new CriticalSlot(CriticalSlot.TYPE_SYSTEM, SYSTEM_LIFE_SUPPORT));\n setCockpitType(COCKPIT_DUAL);\n return true;\n }", "boolean hasCategory();", "public boolean getIsLimited() {\r\n return !(this.accessLimitations != null && this.accessLimitations.contains(\"UNL\"));\r\n }", "private boolean isTargetTerritoryOneBlockAway() {\n for(Territory territory:getCurrentPlayerTerritories()) {\n if(Math.abs(territory.getID()-selectedTerritoryByPlayer.getID()) == 1) {\n int minID = Math.min(territory.getID(),selectedTerritoryByPlayer.getID());\n int maxID = Math.max(territory.getID(),selectedTerritoryByPlayer.getID());\n if(maxID % gameDescriptor.getColumns() == 0)\n return true;\n if((minID % gameDescriptor.getColumns() != 0 )\n && (minID / gameDescriptor.getColumns() == maxID / gameDescriptor.getColumns())) {\n return true;\n }\n }\n else if(Math.abs(territory.getID()-selectedTerritoryByPlayer.getID()) == gameDescriptor.getColumns())\n return true;\n }\n return false;\n }", "boolean isExclusive();", "boolean isExclusive();", "boolean isExclusive();", "boolean isConcealed();", "boolean hasOfflineUserDataJob();", "private boolean secondMilestoneAccomplished()\n {\n if( (firstMilestoneAccomplished()) &&\n (beliefs.puzzle[1][0] == 5) &&\n (beliefs.puzzle[1][1] == 6) &&\n (beliefs.puzzle[1][2] == 7) &&\n (beliefs.puzzle[1][3] == 8)\n )\n return true;\n else\n return false;\n }", "protected boolean isFinished() {\n \tif(Robot.oi.btnIdle.get()) {\n \t\treturn CommandUtils.stateChange(this, new Idle());\n \t}\n\n \tif( Robot.oi.btnShoot.get()) {\n \t\treturn CommandUtils.stateChange(this, new Shooting()); \n \t}\n \t\n \tif(Robot.oi.btnUnjam.get()){\n \t\treturn CommandUtils.stateChange(this, new Unjam());\n \t}\n return false;\n }", "public abstract boolean isRestricted();", "public boolean isElected(){\n\treturn (synState == SynCT.IAM_THE_CENTER);\n }", "boolean hasJoinGameRequest();", "boolean isAccountNonLocked();", "boolean isAccountNonLocked();", "boolean canExportManaToPool(BlockEntity pool);", "private boolean isComplete() {\n for (boolean b : bitfield) {\n if (!b) {\n return false;\n }\n }\n return true;\n }", "public static boolean isGameFinished() {\n return mafiaIsWinner() || citizenIsWinner();\n }", "public boolean checkAccountClosed() {\n return this.accountStatus == \"Closed\";\n }", "public boolean isLocked();", "private boolean m11885j() {\n IUser a = ((C3592a) C3596c.m13172a(C3592a.class)).user().mo22165a();\n if (!C9290a.f25466a && a != null && a.isEnableShowCommerceSale()) {\n if (this.f9687p == LiveMode.VIDEO) {\n return true;\n }\n LiveMode liveMode = this.f9687p;\n LiveMode liveMode2 = LiveMode.THIRD_PARTY;\n }\n return false;\n }", "boolean isApplicable(SecurityMode securityMode);" ]
[ "0.62687045", "0.6122726", "0.59782857", "0.59060496", "0.58913773", "0.5869471", "0.5857352", "0.5700631", "0.5662154", "0.5645609", "0.5622061", "0.5620862", "0.56112427", "0.5591831", "0.556066", "0.5553437", "0.5553437", "0.55305505", "0.55228424", "0.55093825", "0.5488378", "0.5477596", "0.5465307", "0.5447547", "0.5444613", "0.5427482", "0.5413966", "0.540589", "0.540589", "0.540589", "0.540589", "0.540589", "0.540589", "0.5392787", "0.5387948", "0.5381001", "0.53736454", "0.5370806", "0.5363065", "0.5354281", "0.5353742", "0.5351522", "0.53491336", "0.5349055", "0.5345505", "0.53432536", "0.5342031", "0.53416556", "0.5338394", "0.53218216", "0.531842", "0.53131413", "0.5303424", "0.53023666", "0.52978086", "0.52971476", "0.52963233", "0.5293596", "0.52823347", "0.52823347", "0.52823347", "0.52823347", "0.52823347", "0.5278173", "0.52703166", "0.5262244", "0.5261682", "0.52579373", "0.525649", "0.5255006", "0.5252002", "0.524769", "0.5246667", "0.52453995", "0.52434707", "0.5242399", "0.52420104", "0.5238441", "0.5238088", "0.5237926", "0.52363443", "0.5229913", "0.5229913", "0.5229913", "0.5227764", "0.5227584", "0.52266014", "0.52264994", "0.5223126", "0.52206415", "0.52192277", "0.5217007", "0.5217007", "0.52166617", "0.5215857", "0.52128434", "0.5211963", "0.521123", "0.5200914", "0.5199638" ]
0.60621136
2
saves whether the international mode is unlocked
public void saveInternationalUnlocked() { BashCmdUtil.bashCmdNoOutput("touch data/internatonal_unlocked"); BashCmdUtil.bashCmdNoOutput("> data/internatonal_unlocked"); BashCmdUtil.bashCmdNoOutput(String.format("echo \"%s\" >> data/internatonal_unlocked",Boolean.toString(_internationalUnlocked))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void setNotSaved(){saved=false;}", "private void unlockButton() {\n\t\tconversionPdf_Txt.setEnabled(true);\n\t\tavisJury.setEnabled(true);\n\t\tstatistique.setEnabled(true);\n bData.setEnabled(true);\n\t}", "void setShowUnlockOption(boolean b);", "private void toggleSave() {\n mNameBox.setEnabled(!mIsEditMode);\n mPriceBox.setEnabled(!mIsEditMode);\n if (mIsEditMode) {\n if (!mIsError) {\n applyChanges();\n } else {\n mIsError = false;\n }\n mEditButton.setText(R.string.edit);\n mImm.hideSoftInputFromWindow(mNameBox.getWindowToken(), 0);\n mDeleteText.setVisibility(View.VISIBLE);\n } else {\n mEditButton.setText(R.string.save);\n mImm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);\n mDeleteText.setVisibility(View.GONE);\n }\n mIsEditMode = !mIsEditMode;\n }", "private void isCanSave() {\r\n\t\tsalvar.setEnabled(!hasErroNome(nome.getText()) && !hasErroIdade(idade.getText()) && validaSituacao());\r\n\t}", "void setUserLocked(boolean b);", "private void saveLocation()\n {\n willLocationBeSaved = !willLocationBeSaved;\n }", "private void saveSharedPref() {\n SharedPreferences.Editor editor = this.sharedPreferences.edit();\n if (checkBox.isChecked()) {\n editor.putBoolean(Constants.SP_IS_REMEMBERED_KEY, true);\n }\n editor.apply();\n }", "public void savingPreferences()\n {\n SharedPreferences sharedPreferences = getSharedPreferences(preferenceSaveInfo,MODE_PRIVATE);\n\n\n //tao doi tuong editer\n SharedPreferences.Editor editor = sharedPreferences.edit();\n String user = txtUserName.getText().toString();\n String pass = txtPassWord.getText().toString();\n\n boolean bchk = chkSave.isChecked();\n\n\n if(!bchk)\n {\n //xoa du lieu luu truoc do\n editor.clear();\n }\n else\n {\n editor.putString(\"user\",user);\n editor.putString(\"pass\",pass);\n editor.putBoolean(\"checked\",bchk);\n }\n\n editor.commit();\n\n\n }", "public void loadInternationalUnlocked() {\n\t\tScanner sc;\n\t\tFile file = new File(\"data/internatonal_unlocked\");\n\t\tif(file.exists()) {\n\t\t\ttry {\n\t\t\t\tsc = new Scanner(new File(\"data/internatonal_unlocked\"));\n\t\t\t\tif(sc.hasNextLine()) {\n\t\t\t\t\tString interntionalUnlocked = sc.nextLine();\n\t\t\t\t\t_internationalUnlocked = Boolean.parseBoolean(interntionalUnlocked.trim());\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t_internationalUnlocked = false;\n\t\t\t\t}\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tBashCmdUtil.bashCmdNoOutput(\"data/internatonal_unlocked\");\n\t\t\t_internationalUnlocked = false;\n\t\t}\n\t}", "protected void exitEditMode(){\n editName.setEnabled(false);\n editEmail.setEnabled(false);\n saveButton.setVisibility(View.INVISIBLE);\n }", "private void saveSettings() {\n \tLog.i(\"T4Y-Settings\", \"Save mobile settings\");\n \t\n \tmobileSettings.setAllowAutoSynchronization(autoSynchronizationCheckBox.isChecked());\n mobileSettings.setAllowAutoScan(autoScanCheckBox.isChecked());\n mobileSettings.setAllowAutoSMSNotification(autoSMSNotificationCheckBox.isChecked());\n \n \tmainApplication.setMobileSettings(mobileSettings);\n }", "private void savePrefsData() {\n SharedPreferences pref = getApplicationContext().getSharedPreferences(\"myPrefs\", MODE_PRIVATE);\n SharedPreferences.Editor editor = pref.edit();\n editor.putBoolean(\"isIntroOpnend\", true);\n editor.commit();\n }", "public boolean save() {\n return false;\n }", "public void saveAllNot() {\n SharedPreferences sharedPreferences = getSharedPreferences(SHARED_PREFS, MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putBoolean(SW_ALLNOT, allNotifications.isChecked());\n editor.commit();\n }", "void save() {\r\n if (actionCompleted) {\r\n forget();\r\n } else {\r\n AccountSettings.stateStored = new Bundle();\r\n save(AccountSettings.stateStored);\r\n }\r\n }", "public void save() {\n savePrefs();\n }", "public boolean isLanguageSaved(){\n return sharedPreferences.contains(PRIMARY_LANGUAGE) && sharedPreferences.contains(SECONDARY_LANGUAGE);\n }", "public void saveBusyOrd(String name) {\n // Storing login value as TRUE\n\n\n // Storing name in pref\n editor.putString(BUSY_NEWORDER, name);\n\n // Login Date\n //editor.putString(KEY_DATE, date);\n\n // commit changes\n editor.commit();\n }", "public boolean save() {\n boolean any = false;\n synchronized (PROPS) {\n for (SettingsGroup group : PROPS) {\n any |= group.save();\n }\n }\n \n if (any) {\n fireSettingsHandlerEvent(EventType.SAVE, null);\n }\n \n return any;\n }", "public void markFileAsNotSaved()\r\n {\r\n saved = false;\r\n }", "@Override\n public boolean save()\n {\n return false;\n }", "public void save() {\n\t\tthis.setState(Constants.CWorld.STATE_SAVING);\n\t\tthis.getWorld().saveAll();\n\t\tthis.setState(Constants.CWorld.STATE_ONLINE);\n\t}", "public boolean InternationalUnlocked() {\n\t\tint count = 0;\n\t\tfor (int category: _answeredQuestions) {\n\t\t\tif (category == 5) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tif (count >= 2) {\n\t\t\t_internationalUnlocked = true;\n\t\t}\n\t\telse {\n\t\t\t_internationalUnlocked = false;\n\t\t}\n\t\tsaveInternationalUnlocked();\n\t\treturn _internationalUnlocked;\n\t}", "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 void SaveGame(){\n if(gameStarted == false || canLoadGame == true){ return; }\n gamePaused = true;\n timeRuunableThread.setPause(gamePaused);\n int input = JOptionPane.showOptionDialog(null, \"Do you want to save game?\", \"Save Game\", JOptionPane.OK_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE, null, null, null);\n if(input == JOptionPane.OK_OPTION) {\n SaveCurrentGame();\n animationThread.start();\n if(muteMusic == false){\n music.stopPlayingAudio(\"All\");\n music.playAudio(\"LoadingScreenMusic\");\n }\n musicName = \"LoadingScreenMusic\";\n }else{\n gamePaused = false;\n timeRuunableThread.setPause(gamePaused);\n }\n }", "void checkSavePwd(){\n\t\tString acc = MyConstants.STR_BLANK;\n\t\tString pwd = MyConstants.STR_BLANK;\n\t\tif(cbox.isChecked()){\n\t\t\t\tacc = edAccount.getText().toString();\n\t\t\t\tpwd = edPassword.getText().toString();\n\t\t}\n\t\tSetting.getInstance().saveValue(MyConstants.ACC_KEY, acc, Setting.TYPE_STRING);\n\t\tSetting.getInstance().saveValue(MyConstants.PWD_KEY, pwd, Setting.TYPE_STRING);\n\t}", "private void saveOption() {\n SharedPreferences filterSetting = getSharedPreferences(\"filterSetting\",0);\n SharedPreferences.Editor editor = filterSetting.edit();\n editor.putBoolean(\"myMostRecent\",myMostRecentWeekCheckbox.isChecked());\n editor.putBoolean(\"myDisplayAll\",myDisplayAllCheckbox.isChecked());\n editor.putBoolean(\"foMostRecent\",foMostRecentWeekCheckbox.isChecked());\n editor.putBoolean(\"foDisplayAll\",foDisplayAllCheckbox.isChecked());\n editor.putString(\"myReason\",myReasonEditText.getText().toString());\n editor.putString(\"foReason\",foReasonEditText.getText().toString());\n editor.putInt(\"mySpinner\",myEmotionalStateSpinner.getSelectedItemPosition());\n editor.putInt(\"foSpinner\",foEmotionalStateSpinner.getSelectedItemPosition());\n\n editor.commit();\n }", "private void lockButton(){\n\t\tconversionPdf_Txt.setEnabled(false);\n\t\tavisJury.setEnabled(false);\n\t\tstatistique.setEnabled(false);\n\t\tbData.setEnabled(false);\n\t\tbDataTraining.setEnabled(false);\n\t\tbCompare.setEnabled(false);\n\t}", "private static void toggleSaved(boolean s) {\n\t\tif(!config.isUpdateDB()) {\n\t\t\tif(!s) {\n\t\t\t\tframe.setTitle(\"JProject v.\"+VERSION+\" ** Unsaved Changes **\");\n\t\t\t} else {\n\t\t\t\tframe.setTitle(\"JProject v.\"+VERSION);\n\t\t\t}\n\t\t\tsaved = s;\n\t\t}\n\t}", "private void setDirty(boolean flag) {\n\tdirty = flag;\n\tmain.bSave.setEnabled(dirty);\n }", "public boolean saveSettings() {\r\n\t\treturn settings.save();\r\n\t}", "@Override\n\tpublic boolean saveDtls(UserModel model) {\n\n\t\tUserEntity userEntity = new UserEntity();\n\t\tBeanUtils.copyProperties(model, userEntity);\n\t\tif (model.getActiveSwitch() == null) {\n\t\t\tuserEntity.setActiveSwitch(\"Y\");\n\t\t}\n\t\tif (model.getStatus() == null) {\n\t\t\tuserEntity.setStatus(ATSConstants.LOCKED);\n\t\t}\n\t\tif (model.getPassword() == null) {\n\t\t\tString generateTempPwd = TemporaryPwdAndId.generateTempPwd();\n\t\t\tuserEntity.setPassword(generateTempPwd);\n\t\t\tsendMail(ATSConstants.ADMIN_UNLOCK_URL, userEntity);\n\t\t\tuserEntity.setPassword(AESEncyptionAndDecryption.encrypt(generateTempPwd));\n\t\t}\n\t\tUserEntity save = adminRepo.save(userEntity);\n\n\t\treturn save.getUserId() != null;\n\t}", "public boolean isSavingGame() {\n return savingGame;\n }", "public void save() {\n\t\tpreferences().flush();\n\t}", "@Override\n public void onPause() {\n \t\t//Save settings Enabled, Alarm Hour, Alarm Minute\n SharedPreferences settings = getSharedPreferences(MainActivity.PREFS_NAME, 0);\n SharedPreferences.Editor editor = settings.edit();\n editor.putBoolean(MainActivity.ALARM_ENABLED, AlarmEnabled);\n editor.putInt(MainActivity.SNOOZE_MINUTE, SnoozeMin);\n \n //Commit the edits\n editor.commit();\n \n super.onPause();\n }", "public void saveState() \n\t{\n\t\tsuper.saveState();\n\t}", "public boolean isSaved()\r\n {\r\n return saved;\r\n }", "public void saveUserSettings() {\n\t}", "void setSaveButtonEnabled(boolean isEnabled);", "public boolean isSaved() {\n\t\treturn !sitePanel.isDataModified();\n\t}", "protected void actionPerformedSave ()\n {\n Preferences rootPreferences = Preferences.systemRoot ();\n PreferencesTableModel rootPrefTableModel = new PreferencesTableModel (rootPreferences);\n rootPrefTableModel.syncSave ();\n Preferences userPreferences = Preferences.userRoot ();\n PreferencesTableModel userPrefTableModel = new PreferencesTableModel (userPreferences);\n userPrefTableModel.syncSave ();\n this.setVisible (false);\n this.dispose ();\n }", "void markInactive();", "public void saveState() {\n\t\tsuper.saveState();\n\t}", "public void SaveCurrentGame(){\n if(gameStarted == false){ return; }\n recordGame.write(board, timeRuunableThread, level);\n timeRuunableThread.setDrawNumber(false);\n canLoadGame = true;\n // update infoCanvas\n CleanInfoCanvas();\n }", "@Override\n public void onUnlock(Myo myo, long timestamp) {\n //mLockStateView.setText(R.string.unlocked);\n }", "@Override\n\tprotected boolean isSaveObjectToDiskOnCloseTurnedOn(){\n\t\treturn checkboxSaveStateOn.isSelected();\n\t}", "@Override\n public void onSaveInstanceState(Bundle outState) {\n super.onSaveInstanceState(outState);\n outState.putInt(WIFI_TRUST_LIST_INDEX, mIndex);\n outState.putBoolean(WIFI_TRUST_UPDATE, mUpdate);\n }", "public boolean canSave()\n\t{\n\t\treturn false;\n\t}", "public static void saveGameType() {\r\n\t\tclearGameType();\r\n\t\t\r\n\t\tif (GameSetup.threeHanded.getState()) {\r\n\t\t\tMain.isThreeHanded = true;\r\n\t\t}\r\n\t\tif (GameSetup.fourHandedSingle.getState()) {\r\n\t\t\tMain.isFourHandedSingle = true;\r\n\t\t}\r\n\t\tif (GameSetup.fourHandedTeams.getState()) {\r\n\t\t\tMain.isFourHandedTeams = true;\r\n\t\t}\r\n\t}", "void writeLegacyPermissionStateTEMP();", "public void saveState() { }", "void setSaveStatus(boolean b) {\n int status = (b) ? 1 : 0;\n setStat(status, saveStatus);\n }", "public void save () {\n preference.putBoolean(\"sound effect\", hasSoundOn);\n preference.putBoolean(\"background music\", hasMusicOn);\n preference.putFloat(\"sound volume\", soundVolume);\n preference.putFloat(\"music volume\", musicVolume);\n preference.flush(); //this is called to write the changed data into the file\n }", "@Override\n \tpublic boolean saveHours(HourRegistration reg) {\n \t\treturn false;\n \t}", "public void l() {\n SharedPreferences a2 = ba.a(k);\n this.f80660e = a2.getBoolean(\"main_fest_mode\", false);\n this.f80661f = a2.getLong(\"main_fest_timestamp\", 0);\n }", "public boolean isSavingToSystemEnabled(){\r\n\t\tif (this.settings.containsKey(\"toSystemEnabled\")) {\r\n\t\t\treturn Boolean.valueOf(this.settings.getProperty(\"toSystemEnabled\"));\r\n\t\t}\r\n\t\telse return false;\r\n\t}", "@Override\r\n\tpublic void pause() {\n Settings.save();\r\n\t\t\r\n\t}", "public void saveSettings(View v) {\n EditText apikeytext = (EditText) findViewById(R.id.editapi);\n EditText redcapurltext = (EditText) findViewById(R.id.editredcapurl);\n UserDBHelper udb = new UserDBHelper(this);\n User currentUser = udb.getActiveUser();\n\n String inputApiKey = apikeytext.getText().toString().trim();\n currentUser.setAPIKEY(inputApiKey);\n\n String inputRedcapURL = redcapurltext.getText().toString().trim();\n currentUser.setRedcapURL(inputRedcapURL);\n\n udb.updateUser(currentUser);\n\n Resources res = getResources();\n DisplayMetrics dm = res.getDisplayMetrics();\n Configuration config = res.getConfiguration();\n\n String targetLanguage;\n\n CheckBox cb_en = (CheckBox) findViewById(R.id.cb_english);\n CheckBox cb_pt = (CheckBox) findViewById(R.id.cb_port);\n\n if( cb_en.isChecked() ) {\n targetLanguage = \"en-US\";\n } else {\n targetLanguage = \"pt\";\n }\n\n Locale newLang = new Locale(targetLanguage);\n\n config.locale = newLang;\n res.updateConfiguration(config, dm);\n\n try {\n Intent i = new Intent(getBaseContext(), MainActivity.class);\n startActivity(i);\n finish();\n } catch (Exception e) {}\n }", "private boolean askSaveGame()\n {\n \tObject options[] = {\"Save\", \"Discard\", \"Cancel\"};\n \tint n = JOptionPane.showOptionDialog(this,\n \t\t\t\t\t \"Game has changed. Save changes?\",\n \t\t\t\t\t \"Save Game?\",\n \t\t\t\t\t JOptionPane.YES_NO_CANCEL_OPTION,\n \t\t\t\t\t JOptionPane.QUESTION_MESSAGE,\n \t\t\t\t\t null,\n \t\t\t\t\t options,\n \t\t\t\t\t options[0]);\n \tif (n == 0) {\n \t if (cmdSaveGame()) \n \t\treturn true;\n \t return false;\n \t} else if (n == 1) {\n \t return true;\n \t}\n \treturn false;\n }", "public synchronized static void setInsideSecureLocation(boolean flag){\n editor.putBoolean(IN_REGION, flag);\n editor.commit();\n }", "public static void SavePreferences()\n {\n try\n {\n StartSaveAnimation();\n PrintWriter writer = new PrintWriter(preferences_file_name, \"UTF-8\");\n \n writer.print(Utilities.BoolToInt(MusicManager.enable_music) + \"\\r\\n\");\n writer.print(Utilities.BoolToInt(PassiveDancer.englishMode) + \"\\r\\n\");\n \n writer.close();\n }\n catch(Exception e) { System.out.println(\"Problem writing in the file \" + preferences_file_name + \".\"); }\n }", "public boolean canSave()\n {\n return true;\n }", "public boolean canSave()\n {\n return true;\n }", "public void lockGame() {\n this.isLocked = true;\n btnLockGame.setEnabled(false);\n }", "public boolean setSynchronize() {\n boolean isSynchronize = checkSynchronize();\n editor.putBoolean(Constans.KeyPreference.TURN_SYNCHRONIZE, !isSynchronize);\n editor.commit();\n return !isSynchronize;\n }", "public boolean toggleEdit() {\n // return true so that saving is only triggered when we are truly exiting edit mode\n boolean result = true;\n for(setting setting: setttingList) {\n result = setting.toggleEdit();\n }\n return result;\n }", "public boolean isSaved() {\r\n\t\treturn saved;\r\n\t}", "public void saveGameSession() {\n\t\tlastSaved = ProjectZero.calendar.getTime().toString();\n\t\tAssetHandler.saveGameSession();\n\t}", "public boolean isActivelySaved() {\n\t\treturn activelySaved;\n\t}", "public static void setSaveInSystem(boolean saveInSystem) {\n\t\tPropertyLoader.saveInSystem = saveInSystem;\n\t}", "public static void viewSaveLandRegistryToBackUp() {\n\t\tboolean save_reg = getRegControl().saveToFile(getRegControl().listOfRegistrants(), REGISTRANTS_FILE);\r\n\t\tboolean save_prop = getRegControl().saveToFile(getRegControl().listOfAllProperties(), PROPERTIES_FILE);\r\n\t\t// check if one of them failed or not\r\n\t\tif (save_prop == false || save_reg == false) {\r\n\t\t\tSystem.out.println(\"Unable to save land registry.\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Land Registry has been backed up to file.\");\r\n\t\t}\r\n\t}", "private boolean changeModes() {\n\n\t\tif (fieldsChanged) {\n\t\t\tMessageBox mbWarning = new MessageBox(getShell(),\n\t\t\t\t\tSWT.ICON_WARNING | SWT.YES | SWT.NO | SWT.CANCEL);\n\t\t\tmbWarning.setText(\"iDART: Save Changes?\");\n\t\t\tmbWarning\n\t\t\t.setMessage(\"You have not saved your changes. Would you like to save your changes?\");\n\t\t\tswitch( mbWarning.open()) {\n\n\t\t\t// proceed but save changes\n\t\t\tcase SWT.YES:\n\t\t\t\tcmdSaveWidgetSelected();\n\t\t\t\treturn true;\n\t\t\t\t// proceed without saving changes\n\t\t\tcase SWT.NO:\n\t\t\t\treturn true;\n\t\t\t\t// remain in current mode\n\t\t\tcase SWT.CANCEL:\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t// proceed to next mode\n\t\treturn true;\n\t}", "private void saveValues() {\n for (Map.Entry<EditText, Integer> e : mPrefKeys.entrySet()) {\n // If the field is disabled, add the DEACTIVATED marker to the value of the field\n if (e.getKey().isEnabled())\n Pref.put(this, e.getValue(), e.getKey().getText().toString());\n else\n Pref.put(this, e.getValue(), Data.DEACTIVATED_MARKER + e.getKey().getText().toString());\n }\n\n }", "public void setAktiivisuus()\r\n\t{\r\n\t\tonAktiivinen = false;\r\n\t}", "@Override\n\tpublic void saveSettings() {\n\n\t}", "private static void checkSaveOnExit() {\n\t\tif(!saved && !config.isUpdateDB()) {\n \t\tint option = JOptionPane.showOptionDialog(frame,\n \t\t\t\t\"There are unsaved changes\\nDo you want to save them now?\",\n \t\t\t\t\"Unsaved changes\",JOptionPane.YES_NO_CANCEL_OPTION,\n \t\t\t\tJOptionPane.WARNING_MESSAGE, null, null, 0);\n \t\tswitch(option) {\n \t\tcase 0:\n \t\t\tportfolio.save(WORKING_FILE);\n \t\tcase 1:\n \t\t\tframe.dispose();\n \t\tdefault:\n \t\t\tbreak; \t \t\t\n \t\t}\n \t\tSystem.out.println(\"unsaved changes \" + option);\n \t} else {\n \t\tframe.dispose();\n \t}\n\t\t\n\t}", "public Parcelable onSaveInstanceState() {\n SavedState savedState = new SavedState(super.onSaveInstanceState());\n if (!(this.auk == null || this.auk.aun == null)) {\n savedState.aup = this.auk.aun.getItemId();\n }\n savedState.auq = isOverflowMenuShowing();\n return savedState;\n }", "public Parcelable onSaveInstanceState() {\n C17370e eVar = new C17370e(super.onSaveInstanceState());\n eVar.f61237a = this.f61213f > 0 && this.f61212e == 0.0f;\n return eVar;\n }", "public void attributSave() {\n\r\n\t\tstatusFeldSave();\r\n\t}", "@Override\n public void saveBoolean(String key, boolean value) {\n SharedPreferences.Editor prefs = mSharedPreferences.edit();\n prefs.putBoolean(key, value);\n prefs.commit();\n }", "public void save() {\n if(persistenceType == PropertyPersistenceType.Persistent) {\n if (!isSetToDefault()) {\n permanentStore.setBoolean(key, get());\n } else {\n permanentStore.remove(key);\n }\n }\n }", "@BeforeClass public static void saveEnabled() {\n enabled = Item.EXTENDED_READ.getEnabled();\n }", "@Override\n\t\tpublic void onCheckedChanged(CompoundButton arg0, boolean selected) {\n\t\t\tEditor ed = sp.edit();\n\t\t\tif(selected){\n\t\t\t\ted.putBoolean(\"reget_password\", true);\n\t\t\t}else{\n\t\t\t\ted.putBoolean(\"reget_password\", false);\n\t\t\t}\n\t\t\ted.commit();\n\t\t}", "public static void suspend()\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}", "private final synchronized void writePreferencesImpl() {\n if ( LOGD ) { Log.d( TAG, \"writePreferencesImpl \" + mPrefFile + \" \" + mPrefKey ); }\n\n mForcePreferenceWrite = false;\n\n SharedPreferences pref =\n Utilities.getContext().getSharedPreferences( mPrefFile, Context.MODE_PRIVATE );\n SharedPreferences.Editor edit = pref.edit();\n edit.putString( mPrefKey, getSerializedString() );\n Utilities.commitNoCrash(edit);\n }", "private void saveState() {\r\n \tSharedPreferences settings = getSharedPreferences(TEMP, 0);\r\n \tEditor editor = settings.edit();\r\n \tif (mRowId != null)\r\n \t\teditor.putLong(DbAdapter.KEY_ROWID, mRowId);\r\n \teditor.putLong(DbAdapter.KEY_DATE, mTime);\r\n \teditor.putString(DbAdapter.KEY_PAYEE, mPayeeText != null && \r\n \t\t\tmPayeeText.getText() != null ? mPayeeText.getText().toString() : null);\r\n \teditor.putString(DbAdapter.KEY_AMOUNT, mAmountText != null && \r\n \t\t\tmAmountText.getText() != null ? mAmountText.getText().toString() : null);\r\n \teditor.putString(DbAdapter.KEY_CATEGORY, mCategoryText != null && \r\n \t\t\tmCategoryText.getText() != null ? mCategoryText.getText().toString() : null);\r\n \teditor.putString(DbAdapter.KEY_MEMO, mMemoText != null && \r\n \t\t\tmMemoText.getText() != null ? mMemoText.getText().toString() : null);\r\n \teditor.putString(DbAdapter.KEY_TAG, mTagText != null && \r\n \t\t\tmTagText.getText() != null ? mTagText.getText().toString() : null);\r\n \teditor.commit();\r\n }", "public void save(){\r\n\t\ttry {\r\n\t\t\tgame.suspendLoop();\r\n\t\t\tGameStockage.getInstance().save(game);\r\n\t\t\tgame.resumeLoop();\r\n\t\t} catch (GameNotSaveException e) {\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t\tgame.resumeLoop();\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t\tgame.resumeLoop();\r\n\t\t}\r\n\t}", "public void securityOn()\n {\n m_bSecurity = true;\n }", "void setProtection(boolean value);", "protected boolean save() {\r\n\t\tboolean saved=true;\r\n\t\tif(validated()){\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tsaved=false;\r\n\t\t}\r\n\t\treturn saved;\r\n\t}", "public static void ToggleEnabled()\n {\n \t\tEnabled = !Enabled;\n \t\tConfigHandler.configFile.save();\n \t \t\n }", "public static void saveDefaultOptions() {\r\n\t\t//Save the skin that was selected.\r\n\t\tif (IniSetup.skin.getSelectedItem() == \"ISU\") {\r\n\t\t\tMain.skinIsIowaState = true;\r\n\t\t\tMain.skinIsIowa = false;\r\n\t\t\tMain.skinIsNorthernIowa = false;\r\n\t\t} else if (IniSetup.skin.getSelectedItem() == \"Iowa\") {\r\n\t\t\tMain.skinIsIowaState = false;\r\n\t\t\tMain.skinIsIowa = true;\r\n\t\t\tMain.skinIsNorthernIowa = false;\r\n\t\t} else if (IniSetup.skin.getSelectedItem() == \"UNI\") {\r\n\t\t\tMain.skinIsIowaState = false;\r\n\t\t\tMain.skinIsIowa = false;\r\n\t\t\tMain.skinIsNorthernIowa = true;\r\n\t\t}\r\n\t\t\r\n\t\t//Save the entered values.\r\n\t\tMain.winScore = IniSetup.winScore.getText();\r\n\t\tMain.loseScore = IniSetup.loseScore.getText();\r\n\t\t\r\n\t\t//Check if the soundPath is a folder.\r\n\t\tString str = IniSetup.enterSoundPath.getText();\r\n\t\tFile file = new File(str);\r\n\t\tif (file.isDirectory()) Main.soundDir = str;\r\n\t\t\t\t\r\n\t\t//Save the state of sounds being enabled or not.\r\n\t\tif (IniSetup.soundsEnabled.getState()) {\r\n\t\t\tMain.sounds = true;\r\n\t\t} else {\r\n\t\t\tMain.sounds = false;\r\n\t\t}\r\n\t\t\r\n\t\t//Save the options as numbers.\r\n\t\tconvertOptionsToNumbers();\r\n\t}", "public boolean setRememberMe()\n {\n try \n {\n File file = new File(System.getProperty(\"user.home\")+\"\\\\remember.ser\");\n FileOutputStream fout = new FileOutputStream(file);\n fout.write(1);\n fout.close();\n }\n catch (IOException ex) {ex.printStackTrace(); return false; }\n return true;\n }", "@Override\n public void onSaveInstanceState (Bundle savedInstanceState){\n super.onSaveInstanceState(savedInstanceState);\n\n savedInstanceState.putBoolean(\"useGpu\", mUtilizzoGPU.isChecked());\n }", "@Override\n protected void onSaveInstanceState(Bundle outState) {\n super.onSaveInstanceState(outState);\n outState.putString(EMAIL, emailTyped);\n outState.putString(PASSWORD, passwordTyped);\n outState.putBoolean(SIGN_IN_ENABLED, signInEnabled);\n }", "void setInactive(boolean aInactive) {\n/* 4829 */ this.inactive = aInactive;\n/* */ }", "@Override\n public Parcelable onSaveInstanceState() {\n Parcelable superState = super.onSaveInstanceState();\n SavedState ss = new SavedState(superState);\n \n ss.checked = isChecked();\n return ss;\n }", "@Override\r\n public boolean isEditable(AuthenticationInfo obj) {\n if (CFG_GUI.CFG.isPresentationModeEnabled()) {\r\n return false;\r\n }\r\n return true;\r\n }", "boolean setOffline(boolean b);" ]
[ "0.62415123", "0.6229254", "0.6141539", "0.60606396", "0.6047692", "0.59467787", "0.58843", "0.5837453", "0.58311284", "0.57858586", "0.5766708", "0.5756716", "0.5713097", "0.5710679", "0.5678579", "0.56692255", "0.56585234", "0.5651256", "0.5640363", "0.56353664", "0.5614095", "0.56114924", "0.56014043", "0.5596922", "0.55935526", "0.5582289", "0.5572117", "0.55349886", "0.5532706", "0.5528233", "0.5528222", "0.5527251", "0.5524745", "0.55233425", "0.55227256", "0.5522505", "0.5520903", "0.5519094", "0.5516254", "0.55090994", "0.55072445", "0.55003554", "0.54989475", "0.5489152", "0.5484243", "0.5466583", "0.5465614", "0.54593265", "0.5456777", "0.54555243", "0.54527295", "0.544677", "0.5441612", "0.5435139", "0.5433235", "0.5430526", "0.54268", "0.54249257", "0.54218197", "0.54194653", "0.54163253", "0.5416108", "0.54099876", "0.54099876", "0.5400627", "0.5395638", "0.53945947", "0.53918785", "0.53824544", "0.5378663", "0.5373201", "0.5371119", "0.5369241", "0.5357066", "0.5353212", "0.53449005", "0.5341687", "0.53412044", "0.5339435", "0.5326084", "0.5325419", "0.53138775", "0.5313608", "0.5305099", "0.5302979", "0.53020805", "0.529913", "0.52968055", "0.5295424", "0.52940696", "0.52914286", "0.5285166", "0.52851224", "0.5276137", "0.5265573", "0.52633095", "0.5259874", "0.5256806", "0.525582", "0.525472" ]
0.75773686
0
loads and stores whether the international mode is unlocked
public void loadInternationalUnlocked() { Scanner sc; File file = new File("data/internatonal_unlocked"); if(file.exists()) { try { sc = new Scanner(new File("data/internatonal_unlocked")); if(sc.hasNextLine()) { String interntionalUnlocked = sc.nextLine(); _internationalUnlocked = Boolean.parseBoolean(interntionalUnlocked.trim()); } else { _internationalUnlocked = false; } } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } } else { BashCmdUtil.bashCmdNoOutput("data/internatonal_unlocked"); _internationalUnlocked = false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void saveInternationalUnlocked() {\n\t\tBashCmdUtil.bashCmdNoOutput(\"touch data/internatonal_unlocked\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"> data/internatonal_unlocked\");\n\t\tBashCmdUtil.bashCmdNoOutput(String.format(\"echo \\\"%s\\\" >> data/internatonal_unlocked\",Boolean.toString(_internationalUnlocked)));\n\t}", "public boolean InternationalUnlocked() {\n\t\tint count = 0;\n\t\tfor (int category: _answeredQuestions) {\n\t\t\tif (category == 5) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tif (count >= 2) {\n\t\t\t_internationalUnlocked = true;\n\t\t}\n\t\telse {\n\t\t\t_internationalUnlocked = false;\n\t\t}\n\t\tsaveInternationalUnlocked();\n\t\treturn _internationalUnlocked;\n\t}", "public void l() {\n SharedPreferences a2 = ba.a(k);\n this.f80660e = a2.getBoolean(\"main_fest_mode\", false);\n this.f80661f = a2.getLong(\"main_fest_timestamp\", 0);\n }", "void setUserLocked(boolean b);", "private void load()\n {\n SharedPreferences sp = getActivity().getPreferences(Context.MODE_PRIVATE);\n if (sp.contains(\"passLength\") && passLenSB != null)\n passLenSB.setProgress(sp.getInt(\"passLength\", 0));\n\n if (sp.contains(\"minDigits\") && minDigSB != null)\n minDigSB.setProgress(sp.getInt(\"minDigits\", 0));\n\n for (int i=0; i<checkBoxes.size(); i++)\n {\n checkBoxes.get(i).setChecked(sp.getBoolean(\"chkbx\"+Integer.toString(i), false));\n if (checkBoxes.get(i).isChecked())\n runChkBxOption(i, checkBoxes.get(i), rootView, child); // this code makes app generate new pass each time\n\n }\n // this code will restore pass on rotation only\n if (savedInstanceState != null && savedInstanceState.containsKey(\"password\"))\n passTV.setText(colourCodePass(savedInstanceState.getString(\"password\")));\n }", "private void unlockButton() {\n\t\tconversionPdf_Txt.setEnabled(true);\n\t\tavisJury.setEnabled(true);\n\t\tstatistique.setEnabled(true);\n bData.setEnabled(true);\n\t}", "void setShowUnlockOption(boolean b);", "protected void beforeUnlockWaitingForBooleanCondition() {\n }", "public boolean isLanguageSaved(){\n return sharedPreferences.contains(PRIMARY_LANGUAGE) && sharedPreferences.contains(SECONDARY_LANGUAGE);\n }", "void user_in(boolean e)\n\t\t{\n\t\t\tthis.init = true;\n\t\t\tthis.enable = e;\n\t\t}", "private boolean ModeCheck() {\n\t\treturn prefs.getBoolean(\"appmode\", false);\n\n\t}", "public static boolean reinit() {\n\t\tif (rb != null\n\t\t\t\t&& Config.getInstance().getLocale().equals(rb.getLocale()))\n\t\t\treturn false;\n\n\t\tif (Config.getInstance().isFileLocalized()) {\n\t\t\ttry {\n\t\t\t\tClassLoader cl = URLClassLoader\n\t\t\t\t\t\t.newInstance(new URL[] { PathManager.getInstance()\n\t\t\t\t\t\t\t\t.getLocalePath().toURI().toURL() });\n\t\t\t\trb = ResourceBundle.getBundle(\"lang\", Config.getInstance()\n\t\t\t\t\t\t.getLocale(), cl);\n\t\t\t} catch (Exception e) {\n\t\t\t\tLOG.severe(e.toString());\n\t\t\t}\n\n\t\t} else {\n\t\t\trb = ResourceBundle.getBundle(\"genlib.locales.lang\", Config\n\t\t\t\t\t.getInstance().getLocale());\n\t\t}\n\n\t\tLOG.log(Level.INFO, String.format(PermMessages._loc_changed, Config\n\t\t\t\t.getInstance().getLocale()));\n\t\treturn true;\n\t}", "private void ensureLanguageIsDefined() {\n SharedPreferences sharedPref;\n SharedPreferences.Editor editor;\n sharedPref = getSharedPreferences(\"LlPreferences\", Context.MODE_PRIVATE);\n if (sharedPref.getBoolean(\"app_need_lang_def\", true) == true) {\n startActivity(chooseLanguageIntent);\n }\n }", "public void loadLocale() {\n\n\t\tSystem.out.println(\"Murtuza_Nalawala\");\n\t\tString langPref = \"Language\";\n\t\tSharedPreferences prefs = getSharedPreferences(\"CommonPrefs\",\n\t\t\t\tActivity.MODE_PRIVATE);\n\t\tString language = prefs.getString(langPref, \"\");\n\t\tSystem.out.println(\"Murtuza_Nalawala_language\" + language);\n\n\t\tchangeLang(language);\n\t}", "@Override\n public void onUnlock(Myo myo, long timestamp) {\n //mLockStateView.setText(R.string.unlocked);\n }", "public boolean isLocked() { return RMUtils.boolValue(get(\"Locked\")); }", "boolean isLocked();", "boolean isLocked();", "public abstract boolean Load();", "private void loadPreferences() {\n SharedPreferences sp = getActivity().getSharedPreferences(SETTINGS, Context.MODE_PRIVATE );\n boolean lm = sp.getBoolean(getString(R.string.live_match), true);\n boolean ls = sp.getBoolean(getString(R.string.live_score), true);\n\n if(lm) live_match.setChecked(true);\n else live_match.setChecked(false);\n\n if(ls) live_score.setChecked(true);\n else live_score.setChecked(false);\n }", "public void load() {\n updater.load(-1); // -1 because Guest ID doesn't matter.\n }", "String getLockOrientationPref();", "private boolean loadVersioning(boolean offVersioning) {\n Boolean storedOffVersioning = getFromStore((K) OFF_VERSIONING_INFO);\n if (storedOffVersioning == null) {\n storedOffVersioning = offVersioning;\n putToStore((K) OFF_VERSIONING_INFO, offVersioning);\n }\n\n return storedOffVersioning;\n }", "public void load() {\n Boolean value = permanentStore.getBoolean(key);\n if (value != null) {\n set(value.booleanValue());\n log.info(\"Property \" + key + \" has the non-default value \" + value.booleanValue());\n } else {\n set(defaultValue);\n }\n }", "private void getAutonomousPrefs() {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(hardwareMap.appContext);\n alliance = preferences.getString(\"AllianceColor\", \"error\");\n frontBack = preferences.getString(\"FrontBack\", \"error\");\n getPartnerGlyph = preferences.getBoolean(\"PickupAllianceGlyph\", false);\n getPitGlyph = preferences.getBoolean(\"PickupPitGlyph\", false);\n }", "public synchronized boolean m58820c() {\n C15665p loadSettingsData;\n loadSettingsData = this.f48447c.loadSettingsData();\n m58817a(loadSettingsData);\n return loadSettingsData != null;\n }", "public void unlock() {\n islandLocked = false;\n }", "protected void loadInfo() {\n\t\tboolean isSuccess = true;\n\t\ttry {\n\t\t\tsmt = conn.createStatement();\n\t\t\trs = smt.executeQuery(\"select * from Google_Auth\");\n\t\t\totp_username = rs.getString(\"username\");\n\t\t\totp_SECRET_KEY = aria.Decrypt(rs.getString(\"secretcode\"));\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n isSuccess = false;\n }\n }", "public void loadFromLocalStorage() {\n\t\t\n\t}", "boolean hasMode();", "boolean isSetSystem();", "public abstract boolean isLocked(String oid);", "public boolean loadEcon() {\n final EconomyCore core = new Economy_Vault();\n if (!core.isValid()) {\n getLogger().warning(\"无法找到经济管理类插件...\");\n getLogger().warning(\"卸载插件!!!\");\n this.getPluginLoader().disablePlugin(this);\n return false;\n }\n this.economy = new Economy(core);\n return true;\n }", "void verifyModesEnable(String mode);", "@BeforeClass public static void saveEnabled() {\n enabled = Item.EXTENDED_READ.getEnabled();\n }", "private void loadInfo() {\n fname.setText(prefs.getString(\"fname\", null));\n lname.setText(prefs.getString(\"lname\", null));\n email.setText(prefs.getString(\"email\", null));\n password.setText(prefs.getString(\"password\", null));\n spinner_curr.setSelection(prefs.getInt(\"curr\", 0));\n spinner_stock.setSelection(prefs.getInt(\"stock\", 0));\n last_mod_date.setText(\" \" + prefs.getString(\"date\", getString(R.string.na)));\n }", "protected void aktualisieren() {\r\n\r\n\t}", "private void lockButton(){\n\t\tconversionPdf_Txt.setEnabled(false);\n\t\tavisJury.setEnabled(false);\n\t\tstatistique.setEnabled(false);\n\t\tbData.setEnabled(false);\n\t\tbDataTraining.setEnabled(false);\n\t\tbCompare.setEnabled(false);\n\t}", "boolean isAutorisationUtilisation();", "@Override\n\tpublic void load() {\n\t\tModLoader.setInGameHook(this, true, false);\n\t\tModLoader.setInGUIHook(this, true, false);\n\t}", "private void loadLocale() {\n\t\tSharedPreferences sharedpreferences = this.getSharedPreferences(\"CommonPrefs\", Context.MODE_PRIVATE);\n\t\tString lang = sharedpreferences.getString(\"Language\", \"en\");\n\t\tSystem.out.println(\"Default lang: \"+lang);\n\t\tif(lang.equalsIgnoreCase(\"ar\"))\n\t\t{\n\t\t\tmyLocale = new Locale(lang);\n\t\t\tsaveLocale(lang);\n\t\t\tLocale.setDefault(myLocale);\n\t\t\tandroid.content.res.Configuration config = new android.content.res.Configuration();\n\t\t\tconfig.locale = myLocale;\n\t\t\tthis.getBaseContext().getResources().updateConfiguration(config, this.getBaseContext().getResources().getDisplayMetrics());\n\t\t\tCommonFunctions.lang = \"ar\";\n\t\t}\n\t\telse{\n\t\t\tmyLocale = new Locale(lang);\n\t\t\tsaveLocale(lang);\n\t\t\tLocale.setDefault(myLocale);\n\t\t\tandroid.content.res.Configuration config = new android.content.res.Configuration();\n\t\t\tconfig.locale = myLocale;\n\t\t\tthis.getBaseContext().getResources().updateConfiguration(config, this.getBaseContext().getResources().getDisplayMetrics());\n\t\t\tCommonFunctions.lang = \"en\";\n\t\t}\n\t}", "boolean isInactive() {\n/* 4818 */ return this.inactive;\n/* */ }", "public boolean isLocked();", "public void securityOn()\n {\n m_bSecurity = true;\n }", "public void loadStatus() {\r\n\r\n\t\ttry {\r\n\t\t\tRemoteOffice objRemoteOffice = Application.UNITY_CLIENT_APPLICATION.getreRemoteOffice();\r\n\t\t\tif (objRemoteOffice != null) {\r\n\t\t\t\tlogTrace(this.getClass().getName(), \"loadStaus()\", \"Going to load the status of the components from broadworks.\");\r\n\r\n\t\t\t\tboolean isActive = objRemoteOffice.isActive();\r\n\t\t\t\tString phnumber = objRemoteOffice.getPhoneNumber();\r\n\t\t\t\tobjRemoteOfficeEnableJCheckBox.setSelected(isActive);\r\n\t\t\t\tobjRemoteOfficeJTextField.setText(phnumber);\r\n\r\n\t\t\t\tif (objRemoteOfficeEnableJCheckBox.isSelected()) {\r\n\t\t\t\t\tobjRemoteOfficeJTextField.setEnabled(true);\r\n\t\t\t\t\tobjRemoteOfficeJLabel.setEnabled(true);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tobjRemoteOfficeJTextField.setEnabled(false);\r\n\t\t\t\t\tobjRemoteOfficeJLabel.setEnabled(false);\r\n\t\t\t\t}\r\n\t\t\t\tlogTrace(this.getClass().getName(), \"loadStaus()\", \"component status loaded successfully\");\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\r\n\t\t\tlogTrace(this.getClass().getName(), \"loadStaus()\", \"component status not loaded successfully\");\r\n\t\t}\r\n\t}", "boolean unload();", "private void loadSettings(){\n SharedPreferences sharedPreferences = getActivity().getSharedPreferences(SHARED_PREF, Context.MODE_PRIVATE);\n notificationSwtich = sharedPreferences.getBoolean(SWITCH, false);\n reminderOnOff.setChecked(notificationSwtich);\n }", "public void initialise() {\r\n this.lockGui.setDisplay(\"Open\");\r\n this.isLocked = false;\r\n this.lockGui.setLocked(isLocked);\r\n this.code = \"\";\r\n this.entered = \"\";\r\n //Ticking lets the timer know if it should be counting ticks.\r\n //Used when entering a code to lock/unlock.\r\n this.ticking = false;\r\n this.ticks = 0;\r\n }", "public void load() {\n setRemoteUser(\"\");\n setAuthCode(AuthSource.DENIED); \n \n if(pageContext==null) {\n return;\n }\n \n session=(HttpSession)getPageContext().getSession();\n setRemoteUser(Utilities.nvl((String)session.getAttribute(\"remoteUser\"), \"\"));\n setAuthCode(Utilities.nvl((String)session.getAttribute(\"authCode\"), AuthSource.DENIED));\n }", "public boolean getProtection();", "boolean hasI18();", "public void Initialse() {\n\t\tappSettings = ctx.getSharedPreferences(APP_SETTINGS, 0);\n\t\tSharedPreferences.Editor prefEditor = appSettings.edit();\n\t\tprefEditor.putBoolean(BLOCK, true); // master switch\n\t\tprefEditor.putBoolean(NOTIFY, true); // controls whether a notification appears in status bar ans notifications lit\n\t\tprefEditor.putBoolean(REMOVE_CALLS, false); // determines whether calls are removed form the call log\n\t\t// add INIT to prevent this code from being called again\n\t\tprefEditor.putBoolean(INIT, true); // flag to allow subsequent loads to recognise that defaults are set\n\t\tprefEditor.putString(TEST, ctx.getString(R.string.test_number));\n\t\tprefEditor.putBoolean(RULES_EXIST, false); // added to control whether app kicks off commshandler\n\t\t\n\t\tprefEditor.commit();\n \n\t}", "@SuppressLint(\"CommitPrefEdits\")\n @Override\n public void onLoadFinished(Loader<SharedPreferences> loader,\n SharedPreferences prefs) {\n }", "public void dataBaseLocked();", "public void openLock(){\n /*Code to send an unlocking signal to the physical device Gate*/\n }", "boolean isForceLoaded();", "boolean isInactive() {\n String value = configData.get(IS_ACTIVE_KEY, \"true\");\n return !Boolean.parseBoolean(value);\n }", "public void setLocal(boolean isLocal);", "public void restore() {\n this.prefs.edit().putBoolean(PREFKEY_IS_KIOSK, tempIsKiosk).apply();\n this.prefs.edit().putBoolean(PREFKEY_IS_TABLET, tempIsTablet).apply();\n this.prefs.edit().putBoolean(PREFKEY_HTTP_SSL, tempSSL).apply();\n this.prefs.edit().putBoolean(PREFKEY_RES_FETCHED, tempFetched).apply();\n this.prefs.edit().putString(PREFKEY_HTTP_PORT, tempHttpPort).apply();\n this.prefs.edit().putString(PREFKEY_HTTP_HOST, tempHttpHost).apply();\n this.prefs.edit().putString(PREFKEY_PASSWORD, temppassword).apply();\n this.prefs.edit().putString(PREFKEY_USERNAME, tempUsername).apply();\n this.prefs.edit().putString(PREFKEY_BOOTSTRAP, tempBootstrap).apply();\n this.prefs.edit().putString(PREFKEY_ROOM_SELECTED, roomSelected).apply();\n this.prefs.edit().putString(PREFKEY_TO_IGNORE, toIgnore).apply();\n this.prefs.edit().putBoolean(PREFKEY_IS_IMAGE_DOWNLOADED, isImageDownloaded).apply();\n this.prefs.edit().putBoolean(PREFKEY_IS_IMAGE_LAN, isImageLan).apply();\n }", "private void IsAbleToGebruikEigenschap() throws RemoteException {\n boolean eigenschapGebruikt = speler.EigenschapGebruikt();\n if (eigenschapGebruikt == true) {\n gebruikEigenschap.setDisable(true);\n }\n }", "public void setLocalisation(final Room pLocalisation){this.aLocalisation = pLocalisation;}", "protected void onBSUnlock() {\n\n }", "@Override public void onAfterStateSwitch() {\n assert SwingUtilities.isEventDispatchThread();\n assert isVisible();\n try {\n license = manager().load();\n onLicenseChange();\n manager().verify();\n } catch (final Exception failure) {\n JOptionPane.showMessageDialog(\n this,\n failure instanceof LicenseValidationException\n ? failure.getLocalizedMessage()\n : format(LicenseWizardMessage.display_failure),\n format(LicenseWizardMessage.failure_title),\n JOptionPane.ERROR_MESSAGE);\n }\n }", "public void setAktiivisuus()\r\n\t{\r\n\t\tonAktiivinen = false;\r\n\t}", "public void loadIMEI() {\n // Check if the READ_PHONE_STATE permission is already available.\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.READ_PHONE_STATE)\n != PackageManager.PERMISSION_GRANTED) {\n // READ_PHONE_STATE permission has not been granted.\n requestReadPhoneStatePermission();\n } else {\n // READ_PHONE_STATE permission is already been granted.\n doPermissionGrantedStuffs();\n }\n }", "public boolean isLocked() {\r\n \treturn false;\r\n }", "boolean setOffline(boolean b);", "public void setAvailable(boolean x){\n availabile = x;\n }", "public void setLoadGame() {\n this.loadeGame = true;\n }", "@Override\n\tpublic void open() {\n\t\topenMMUModeSelect();\n\t}", "protected void setInactive() {\r\n\t\tactive = false;\r\n\t}", "public void saveBusyOrd(String name) {\n // Storing login value as TRUE\n\n\n // Storing name in pref\n editor.putString(BUSY_NEWORDER, name);\n\n // Login Date\n //editor.putString(KEY_DATE, date);\n\n // commit changes\n editor.commit();\n }", "static void setNotSaved(){saved=false;}", "public void setExternallyManaged(java.lang.Boolean value);", "boolean getRequireLocationPref();", "private void getPreferences() {\n\n if(sharedpreferences.getBoolean(\"usaGPU\", true)) {\n mUtilizzoGPU.setChecked(true);\n }\n else{\n mUtilizzoGPU.setChecked(false);\n }\n\n }", "private void loadPreferences() {\n\t\tXSharedPreferences prefApps = new XSharedPreferences(PACKAGE_NAME);\n\t\tprefApps.makeWorldReadable();\n\n\t\tthis.debugMode = prefApps.getBoolean(\"waze_audio_emphasis_debug\", false);\n }", "private void getPrefStatus() {\n Log.i(TAG, \"getPrefStatus()\");\n mPref = getSharedPreferences(PREF_NAME, Context.MODE_WORLD_READABLE\n | Context.MODE_WORLD_WRITEABLE);\n mHasGotPref = true;\n for (int i = SPEED_DIAL_MIN; i < SPEED_DIAL_MAX + 1; ++i) {\n mPrefNumState[i] = mPref.getString(String.valueOf(i), \"\");\n mPrefMarkState[i] = mPref.getInt(String.valueOf(offset(i)), -1);\n }\n }", "ReadOnlyUserPrefs getUserPrefs();", "ReadOnlyUserPrefs getUserPrefs();", "ReadOnlyUserPrefs getUserPrefs();", "ReadOnlyUserPrefs getUserPrefs();", "boolean isSetCryptProvider();", "public final void mo33702b() {\n this.f1706g.unlock();\n }", "private boolean restorePrefData() {\n SharedPreferences pref = getApplicationContext().getSharedPreferences(\"myPrefs\", MODE_PRIVATE);\n Boolean isIntroActivityOpnendBefore = pref.getBoolean(\"isIntroOpnend\", false);\n return isIntroActivityOpnendBefore;\n }", "@Override\r\n public boolean isEditable(AuthenticationInfo obj) {\n if (CFG_GUI.CFG.isPresentationModeEnabled()) {\r\n return false;\r\n }\r\n return true;\r\n }", "public void lockGame() {\n this.isLocked = true;\n btnLockGame.setEnabled(false);\n }", "public static void load()\n throws IOException, ClassNotFoundException {\n FileInputStream f_in = new\n FileInputStream (settingsFile);\n ObjectInputStream o_in = new\n ObjectInputStream(f_in);\n SettingsSaver loaded = (SettingsSaver) o_in.readObject();\n advModeUnlocked = loaded.set[0];\n LIM_NOTESPERLINE = loaded.set[1];\n LIM_96_MEASURES = loaded.set[2];\n LIM_VOLUME_LINE = loaded.set[3];\n LIM_LOWA = loaded.set[4];\n LIM_HIGHD = loaded.set[5];\n LOW_A_ON = loaded.set[6];\n NEG_TEMPO_FUN = loaded.set[7];\n LIM_TEMPO_GAPS = loaded.set[8];\n RESIZE_WIN = loaded.set[9];\n ADV_MODE = loaded.set[10];\n o_in.close();\n f_in.close();\n }", "public static void load() {\n load(false);\n }", "public static boolean isValidModeOnLoad(String fct)\n\t{\n\t\tif (fct.equals(IEquationStandardObject.FCT_ADD) || fct.equals(IEquationStandardObject.FCT_DEL)\n\t\t\t\t\t\t|| fct.equals(IEquationStandardObject.FCT_MNT) || fct.equals(IEquationStandardObject.FCT_ENQ))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Boolean isExportLock();", "public boolean isAcuityEnabled()\n {\n return false;\n }", "private void checkState() {\n\tstate = Environment.getExternalStorageState();\n\t\t\n\t\tif(state.equals(Environment.MEDIA_MOUNTED)){\n\t\t\t//read and write\n\t\tcanRead.setText(\"true\");\n\t\t\tcanWrite.setText(\"true\");\n\t\t\tcanW = canR = true;\n\t\t\t\n\t\t}else if (state.equals(Environment.MEDIA_MOUNTED_READ_ONLY)){\n\t\t\t// read only \n\t\t\tcanRead.setText(\"true\");\n\t\t\tcanWrite.setText(\"false\");\n\t\t\tcanW = false;\n\t\t\tcanR = true;\n\n\t\t}else {\n\t\t\tcanWrite.setText(\"false\");\n\t\t\tcanRead.setText(\"false\");\n\t\t\tcanW = canR = false;\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "public boolean getDispoLibro()\n {\n return disponibilidad;\n }", "void setInactive(boolean aInactive) {\n/* 4829 */ this.inactive = aInactive;\n/* */ }", "private void isSystemReady() {\n\tif ((moStore.getAuthenticationDefinition().getQuery() == null)\n\t\t|| moStore.getJdbcConnectionDetails() == null) {\n\t moSessionStore.setSystemToHaltState();\n\n\t return;\n\t}// if ((moStore.getAuthenticationDefinition().getQuery() == null)\n\n\tmoSessionStore.setSystemToReadyState();\n }", "void setProtection(boolean value);", "public abstract void setDecryptMode();", "public static boolean retrieve() {\n if (onhand()) {\n return true;\n }\n // If it is retrievable, do so\n return (own() && InventoryManager.retrieveItem(ItemPool.COMBAT_LOVERS_LOCKET, 1));\n }", "private void LoginOwner() {\n Transaksi.setEnabled(false);\n Transaksi.setVisible(false);\n }" ]
[ "0.6842529", "0.57844496", "0.56516457", "0.5571612", "0.54973143", "0.54551095", "0.5448763", "0.5274522", "0.5257078", "0.5225969", "0.52162397", "0.52144206", "0.5200085", "0.51662534", "0.51564157", "0.5147174", "0.5097682", "0.5097682", "0.50846934", "0.5072556", "0.5058312", "0.5057174", "0.50478524", "0.5026861", "0.50168824", "0.49807528", "0.49800062", "0.4977335", "0.4977042", "0.4974199", "0.49622166", "0.49523932", "0.49491456", "0.4943508", "0.4942541", "0.4939067", "0.4938513", "0.4937769", "0.49284557", "0.49251315", "0.49093068", "0.49088952", "0.48904914", "0.4889943", "0.4888646", "0.4881255", "0.48769417", "0.48583087", "0.48560962", "0.4854668", "0.48537412", "0.48510432", "0.48507613", "0.48473004", "0.48454213", "0.4833937", "0.4832246", "0.48254925", "0.48254693", "0.48117656", "0.48075643", "0.48040175", "0.48035425", "0.48024303", "0.4800701", "0.4785803", "0.4783694", "0.4782507", "0.47807756", "0.47775546", "0.47768724", "0.4775743", "0.47737688", "0.47703278", "0.47687328", "0.4764009", "0.4761508", "0.47592193", "0.47591892", "0.47591892", "0.47591892", "0.47591892", "0.47571552", "0.47562394", "0.4752641", "0.47524118", "0.47435802", "0.4742771", "0.47409323", "0.47388825", "0.47369134", "0.4735798", "0.47352016", "0.47349933", "0.47336635", "0.4732479", "0.4729863", "0.47295293", "0.47253114", "0.4724198" ]
0.7478827
0
this static method is for creating a singleton class of Quinzical
public static QuinzicalModel createInstance() throws Exception { if (instance == null) { instance = new QuinzicalModel(); } return instance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private SingletonSigar(){}", "private Singleton()\n\t\t{\n\t\t}", "private Singleton(){}", "static public SPARQLToSemQA getInstance() {\r\n\t\tif (instance == null) {\r\n\t\t\tinstance = new SPARQLToSemQA();\r\n\t\t}\r\n\t\treturn instance;\r\n\t}", "private SingletonSample() {}", "Reproducible newInstance();", "private SingletonEager(){\n \n }", "private Singleton() {\n\t}", "private SingletonObject() {\n\n\t}", "private synchronized static void createInstance(){\r\n\t\tif (instance == null){\r\n\t\t\tinstance = new Casino();\r\n\t\t}\r\n\t}", "private SingletonLectorPropiedades() {\n\t}", "private Singleton(){\n }", "private Singleton() { }", "Instance createInstance();", "public static QardioSCHelper getInstance(Context context) {\n if (instance == null) {\n synchronized (QardioSCHelper.class) {\n if (instance == null) {\n instance = new QardioSCHelper(context);\n }\n }\n }\n return instance;\n }", "private SingleTon() {\n\t}", "private QaCalendar() {\n }", "private QuadradoPerfeito() {\n }", "public static QuizFactory getFactoryInstance(){\n\t\tif (defQuizFactory == null)\n\t\t\tdefQuizFactory = new DefaultQuizFactory();\n\t\t\n\t\treturn defQuizFactory;\n\t}", "private EagerlySinleton()\n\t{\n\t}", "public Curso() {\r\n }", "private SingletonStatementGenerator() {\n\t}", "private BusquedaMaker() {\n\t\tinit();\n\t}", "public QLNhanVien(){\n \n }", "private SingletonAR() {\n System.out.println(Thread.currentThread().getName()\n + \": creating SingletonAR\");\n }", "private Instantiation(){}", "public static StaticFactoryInsteadOfConstructors create(){\n return new StaticFactoryInsteadOfConstructors();\n }", "public static Singleton print(String param)\n {\n return new Singleton();\n}", "private J2_Singleton() {}", "private Quantify()\n {\n throw new UnsupportedOperationException(\"Instantiation of utility classes is not supported.\");\n }", "private static void createSingletonObject() {\n\t\tSingleton s1 = Singleton.getInstance();\n\t\tSingleton s2 = Singleton.getInstance();\n\n\t\tprint(\"S1\", s1);\n\t\tprint(\"S2\", s2);\n\t}", "private Queries() {\n // prevent instantiation\n }", "private SingletonH() {\n System.out.println(Thread.currentThread().getName()\n + \": creating SingletonH\");\n }", "private QcTestRunner()\n\t{\n\t\t// To prevent external instantiation of this class\n\t}", "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}", "private MySingleton() {\r\n\t\tSystem.out.println(\"Only 1 object will be created\");\r\n\t}", "private SingleObject()\r\n {\r\n }", "private UsineJoueur() {}", "public QuotenResource() {\n // TODO Auto-generated constructor stub\n }", "public QaStep() {\n\t}", "public Clade() {}", "private SingleObject(){\n }", "public static LoCurso GetInstancia(){\n if (instancia==null)\n {\n instancia = new LoCurso();\n \n }\n\n return instancia;\n }", "public static MySingleTon getInstance(){\n if(myObj == null){\n myObj = new MySingleTon();\n }\n return myObj;\n }", "public static FacadeMiniBank getInstance(){\r\n\r\n\t\tif(singleton==null){\r\n\t\t\ttry {\r\n\t\t\t\t//premier essai : implementation locale\r\n\t\t\t\tsingleton=(FacadeMiniBank) Class.forName(implFacadePackage + \".\" + localeFacadeClassName).newInstance();\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tSystem.err.println(e.getMessage() + \" not found or not created\");\r\n\t\t\t}\t\t\t\t\t\t\r\n\t\t}\r\n\t\tif(singleton==null){\r\n\t\t\t//deuxieme essai : business delegate \r\n\t\t singleton=getRemoteInstance();\r\n\t\t\t\t\t\t\t\t\r\n\t\t}\r\n\t\treturn singleton;\r\n\t}", "public static QualityResultDAOImplEx getInstance()\n {\n if ( instance == null )\n {\n instance = new QualityResultDAOImplEx();\n }\n return instance;\n }", "private MApi() {}", "public VizualizerFactoryImpl()\n {\n super();\n }", "private LazySingleton(){}", "private StaticData() {\n\n }", "public static UsineJoueur getInstance() {\n if(instance==null) {\n instance = new UsineJoueur();\n }\n return instance;\n }", "public Ylqs() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\t}", "public static SingletonEager get_instance(){\n }", "MaquinaCafetera(){\n }", "public static utilitys getInstance(){\n\r\n\t\treturn instance;\r\n\t}", "public static void main(String[] args) throws Exception {\n\n Singleton3 ins = Singleton3.getInstance();\n Constructor constructor = Singleton3.class.getDeclaredConstructor();\n constructor.setAccessible(true);\n Singleton3 ins1 = (Singleton3)constructor.newInstance();\n System.out.println(ins == ins1);\n }", "Simple createSimple();", "public static class_config getinstance(){\n\t\tif (instance==null){\n\t\t\tinstance = new class_config();\n\t\t\t\n singleton.mongo=new Mongo_DB();\n singleton.nom_bd=singleton.mongo.getNom_bd();\n singleton.nom_table=singleton.mongo.getNom_table();\n singleton.client = Mongo_DB.connect();\n if (singleton.client != null) {\n singleton.db = singleton.mongo.getDb();\n singleton.collection = singleton.mongo.getCollection();\n }\n \n\t\t\tsingleton_admin.admin= new ArrayList<admin_class>();\n\t\t\tsingleton_client.client= new ArrayList<client_class>();\n\t\t\tsingleton_reg.reg= new ArrayList<reg_user_class>();\n\t\t\t\n// A_auto_json.auto_openjson_admin();\n// C_auto_json.auto_openjson_client();\n R_auto_json.auto_openjson_reg();\n //funtions_files.auto_open();\n\t\t\tauto_config.auto_openconfig();\n //class_language.getinstance();\n\t\t\tsingleton_config.lang=new class_language();\n \n connectionDB.init_BasicDataSourceFactory();\n \n\t\t}\n\t\treturn instance;\n\t}", "public static void main(String... args) {\n Singletone singletone = Singletone.getInstance();\n try {\n // create obj for Singletone by Accessing private Constructor of\n Class clazz = Class.forName(\"com.krushidj.singletone.Singletone\");\n // get All consturctors of the class\n Constructor[] cons = clazz.getDeclaredConstructors();\n // provide access to private constructor\n cons[0].setAccessible(true);\n Field f = (Singletone.class).getDeclaredField(\"isInstantiated\");\n f.setAccessible(true);\n f.set(true, false);\n // creating obj using the Accessed constructor\n Singletone singletone1 = (Singletone) cons[0].newInstance(null);\n System.out.println(\"singletone hashCode:::\" + singletone.hashCode());\n System.out.println(\"singletone1 hashCode:::\" + singletone1.hashCode());\n } // try\n catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "public static Feudalism getInstance(){\n\t\treturn f;\r\n\t}", "private SingleObject(){}", "public SingletonVerifier() {\n }", "static public GUIAltaHabitacion obtenerInstancia(){\r\n\t\t if(altaHabitacion == null){\r\n\t\t\t altaHabitacion = new GUIAltaHabitacion();\r\n\t\t }\r\n\t\t \r\n\t\t return altaHabitacion;\r\n\t }", "public static StaticFactoryInsteadOfConstructors newInstance() {\n return new StaticFactoryInsteadOfConstructors();\n }", "private SingletonClass() {\n x = 10;\n }", "public Simulador(){\n }", "private OpenSimDB() {\n instance = this;\n }", "public static SingleObject getInstance(){\n return instance;\n }", "private MetallicityUtils() {\n\t\t\n\t}", "private TMCourse() {\n\t}", "private createSingletonDatabase()\n\t{\n\t\tConnection conn = createDatabase();\n\t\tcreateTable();\n\t\tString filename = \"Summer expereince survey 2016 for oliver.csv\"; \n\t\timportData(conn, filename);\n\t}", "public static Main getInstance() {\r\n return instance;\r\n }", "public MatkulKurikulum() {\n }", "public static Main getInstance() {\n return instance;\n }", "public static IndicieSeznam getInstance() {\n\n return ourInstance;\n }", "private static Propiedades getInstance() {\n if (instance == null) {\n instance = new Propiedades();\n }\n return instance;\n }", "private Aspirations() {}", "public void SetAsSingleton () throws java.io.IOException, com.linar.jintegra.AutomationException;", "private StickFactory() {\n\t}", "private SparkeyServiceSingleton(){}", "private Singletion3() {}", "private DarthSidious(){\n }", "public static void createInstance()\n {\n if (instance == null) {\n // Create the instance\n instance = new SalesOrderDataSingleton();\n }\n }", "private Engine() {\n\n }", "public QuadCurve () {\n }", "private SingleTon() {\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "T getInstance();", "Quote createQuote();", "private static synchronized void createInstance() {\r\n\t\tif (instance == null)\r\n\t\t\tinstance = new LOCFacade();\r\n\t}", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "public jPQuanLy() {\n initComponents();\n this.loadContent(\"\");\n this.loadClass();\n this.hienThiSiSo(\"\");\n }", "public Single() {\n }", "public static Construtor construtor() {\n return new Construtor();\n }", "private LOCFacade() {\r\n\r\n\t}", "public static SpiritFurnace getInstance() {\n return _instance;\n }", "private InstanceUtil() {\n }", "private JooqUtil() {\n\n }", "public SurveyInstance createSurveyInstance() {\n return new SurveyInstance();\n }", "public static CppTestRuleSetDAOImpl getInstance()\r\n {\r\n return instance;\r\n }", "private TetrisMain() {\r\n //ensure uninstantiability\r\n }" ]
[ "0.662917", "0.6338877", "0.6315262", "0.63110936", "0.6253726", "0.62297356", "0.62055844", "0.6187621", "0.6138564", "0.61055374", "0.6094646", "0.6034683", "0.6027834", "0.5944601", "0.5901331", "0.5886007", "0.5865133", "0.58579546", "0.58578163", "0.58343256", "0.58251315", "0.58094573", "0.577131", "0.5764132", "0.57476145", "0.5745981", "0.57379794", "0.57175344", "0.57053566", "0.5694343", "0.5688543", "0.5671502", "0.56638217", "0.56588936", "0.5635299", "0.5626109", "0.56069463", "0.560624", "0.5605834", "0.5599994", "0.5598132", "0.558777", "0.5583817", "0.55810106", "0.55729675", "0.5568324", "0.55669105", "0.5559263", "0.5551945", "0.5546421", "0.5543657", "0.55406404", "0.55345297", "0.55336386", "0.55292845", "0.55271864", "0.5524317", "0.5522425", "0.55224025", "0.55102885", "0.5501301", "0.5498375", "0.5495368", "0.54937", "0.5492293", "0.5492242", "0.5477679", "0.54593146", "0.5456406", "0.5455515", "0.5454496", "0.5453639", "0.54442954", "0.54412323", "0.5430402", "0.5413048", "0.54116666", "0.5402866", "0.54028517", "0.54006034", "0.5391333", "0.5386211", "0.5386105", "0.53850216", "0.5380757", "0.5380462", "0.53779507", "0.53773177", "0.53686213", "0.53659534", "0.5361866", "0.5361252", "0.5360717", "0.53539324", "0.53536135", "0.5353308", "0.5349737", "0.5348735", "0.5342207", "0.5342206" ]
0.6753393
0
Interface of search index for efficient access to data elements.
protected interface ISearchIndex<T> extends Iterable<T> { List<T> radius(T center, double radius); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface IndexSearch {\n /**\n * Returns the index type.\n * @return type\n */\n IndexType type();\n\n /**\n * Returns the current token.\n * @return token\n */\n byte[] token();\n}", "public abstract long getIndex();", "public abstract int getIndex();", "public interface Indexed {\n\n /**\n * index keyword and resource\n * @param resourceId keyword KAD id\n * @param entry published entry with keyword information\n * @param lastActivityTime current time from external system\n * @return percent of taken place in storage\n */\n int addKeyword(final KadId resourceId, final KadSearchEntry entry, long lastActivityTime);\n\n /**\n *\n * @param resourceId file KAD id\n * @param entry published entry with source information\n * @return true if source was indexed\n */\n int addSource(final KadId resourceId, final KadSearchEntry entry, long lastActivityTime);\n}", "public int getIndex();", "public int getIndex();", "public int getIndex();", "abstract public void search();", "public abstract int indexFor(Object obj);", "public interface Search {\n public int search(int[] data);\n}", "public interface CompanyIndexed {\n\n String getCompanyName();\n\n long getCIK();\n\n}", "@VTID(10)\n int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "public interface CacheIndex {\n \n /**\n * Puts index on indexedKey.\n *\n * @param indexedKey the indexed key\n * @param key the key\n */\n void put(Object indexedKey, Object key);\n \n /**\n * Removes the index from indexedKey.\n *\n * @param indexedKey the indexed key\n * @param key the key\n */\n void remove(Object indexedKey, Object key);\n \n /**\n * Equals to.\n *\n * @param expectedValue the expected value\n * @return the list\n */\n List<Object> equalsTo(Object expectedValue);\n \n /**\n * Less than.\n *\n * @param value the value\n * @return the list\n */\n List<Object> lessThan(Object value);\n \n /**\n * Less than or equals to.\n *\n * @param value the value\n * @return the list\n */\n List<Object> lessThanOrEqualsTo(Object value);\n \n /**\n * Greater than.\n *\n * @param value the value\n * @return the list\n */\n List<Object> greaterThan(Object value);\n \n /**\n * Greater than or equals to.\n *\n * @param value the value\n * @return the list\n */\n List<Object> greaterThanOrEqualsTo(Object value);\n \n /**\n * Between.\n *\n * @param lowerBound the lower bound\n * @param upperBound the upper bound\n * @return the list\n */\n List<Object> between(Object lowerBound, Object upperBound);\n \n}", "public interface Indexable {\n\n char getIndexForPosition(int position);\n\n int getCount();\n}", "public int index();", "public ATExpression base_indexExpression();", "@Nullable\n public abstract Index getIndex();", "StorableIndexInfo getIndexInfo();", "boolean isIndexed();", "boolean isIndexed();", "public abstract S getSearch();", "public interface FieldIndex<T> extends GenericIndex<T> \r\n{ \r\n /**\r\n * Put new object in the index. \r\n * @param obj object to be inserted in index. Object should contain indexed field. \r\n * Object can be not yet peristent, in this case\r\n * its forced to become persistent by assigning OID to it.\r\n * @return <code>true</code> if object is successfully inserted in the index, \r\n * <code>false</code> if index was declared as unique and there is already object with such value\r\n * of the key in the index. \r\n */\r\n public boolean put(T obj);\r\n\r\n /**\r\n * Associate new object with the key specified by object field value. \r\n * If there is already object with such key in the index, \r\n * then it will be removed from the index and new value associated with this key.\r\n * @param obj object to be inserted in index. Object should contain indexed field. \r\n * Object can be not yet peristent, in this case\r\n * its forced to become persistent by assigning OID to it.\r\n * @return object previously associated with this key, <code>null</code> if there was no such object\r\n */\r\n public T set(T obj);\r\n\r\n /**\r\n * Assign to the integer indexed field unique autoicremented value and \r\n * insert object in the index. \r\n * @param obj object to be inserted in index. Object should contain indexed field\r\n * of integer (<code>int</code> or <code>long</code>) type.\r\n * This field is assigned unique value (which will not be reused while \r\n * this index exists) and object is marked as modified.\r\n * Object can be not yet peristent, in this case\r\n * its forced to become persistent by assigning OID to it.\r\n * @exception StorageError(StorageError.INCOMPATIBLE_KEY_TYPE) when indexed field\r\n * has type other than <code>int</code> or <code>long</code>\r\n */\r\n public void append(T obj);\r\n\r\n /**\r\n * Remove object with specified key from the unique index\r\n * @param key value of removed key\r\n * @return removed object\r\n * @exception StorageError(StorageError.KEY_NOT_FOUND) exception if there is no such key in the index,\r\n * or StorageError(StorageError.KEY_NOT_UNIQUE) if index is not unique.\r\n */\r\n public T remove(Key key);\r\n\r\n /**\r\n * Remove object with specified key from the unique index\r\n * @param key value of removed key\r\n * @return removed object\r\n * @exception StorageError(StorageError.KEY_NOT_FOUND) exception if there is no such key in the index,\r\n * or StorageError(StorageError.KEY_NOT_UNIQUE) if index is not unique.\r\n */\r\n public T removeKey(Object key);\r\n\r\n /**\r\n * Check if index contains specified object instance.\r\n * @param obj object to be searched in the index. Object should contain indexed field. \r\n * @return <code>true</code> if object is present in the index, <code>false</code> otherwise\r\n */\r\n public boolean containsObject(T obj);\r\n\r\n /**\r\n * Locate objects with the same value of the key as specified object\r\n * @param obj object specifying search key value\r\n * @return selection iterator\r\n */\r\n public IterableIterator<T> queryByExample(T obj);\r\n\r\n /**\r\n * Get class obejct objects which can be inserted in this index\r\n * @return class specified in Storage.createFielIndex method\r\n */\r\n public Class getIndexedClass();\r\n\r\n /**\r\n * Get fields used as a key\r\n * @return array of index key fields\r\n */\r\n public Field[] getKeyFields();\r\n\r\n /**\r\n * Select members of the collection using search predicate\r\n * This iterator doesn't support remove() method.\r\n * To make it possible to update, remove or add members to the index \r\n * during iteration it is necessary to set \"perst.concurrent.iterator\"\r\n * property (by default it is not supported because it cause extra overhead during iteration)\r\n * @param predicate JSQL condition\r\n * @return iterator through members of the collection matching search condition\r\n */\r\n public IterableIterator<T> select(String predicate);\r\n\r\n /**\r\n * Check if field index is case insensitive\r\n * @return true if index ignore case of string keys\r\n */\r\n boolean isCaseInsensitive(); \r\n}", "Expression getIndexExpr();", "@Deprecated\npublic interface LegacyIndexedStore<K, V> extends LegacyKVStore<K, V> {\n\n String ID_FIELD_NAME = \"_id\";\n\n /**\n * Creates a lazy iterable over items that match the provided condition, in\n * the order requested. Exposing the appropriate keys and values. Note that\n * each iterator is independent and goes back to the source data to collect\n * data. As such, if you need to use multiple iterators, it is better to cache\n * the results. Note that this may also be internally paginating so different\n * calls to hasNext/next may have different performance characteristics.\n *\n * Note that two unexpected outcomes can occur with this iterator.\n *\n * (1) It is possible some of the values of this iterator will be null. This\n * can happen if the value is deleted around the time the iterator is created\n * and when the value is retrieved.\n *\n * (2) This iterator could return values that don't match the provided\n * conditions. This should be rare but can occur if the value was changed\n * around the time the iterator is created.\n *\n * @param condition\n * The condition to match.\n * @return A lazy iterable over the matching items.\n */\n Iterable<Entry<K, V>> find(LegacyFindByCondition find);\n\n /**\n * Provide a count of the number of documents that match each of the requested\n * conditions.\n *\n * @param conditions\n * @return\n */\n List<Integer> getCounts(SearchQuery... conditions);\n\n /**\n * Definition of how to find data by condition.\n */\n @Deprecated\n public static class LegacyFindByCondition {\n private SearchQuery condition;\n private int pageSize = 5000;\n private int limit = Integer.MAX_VALUE;\n private int offset = 0;\n private final List<SearchFieldSorting> sort = new ArrayList<>();\n\n public LegacyFindByCondition() {\n }\n\n public LegacyFindByCondition setCondition(String condition, FilterIndexMapping mapping) {\n this.condition = SearchFilterToQueryConverter.toQuery(condition, mapping);\n return this;\n }\n\n public LegacyFindByCondition setCondition(SearchQuery query) {\n this.condition = query;\n return this;\n }\n\n public LegacyFindByCondition setPageSize(int pageSize) {\n this.pageSize = pageSize;\n return this;\n }\n\n public LegacyFindByCondition addSorting(SearchFieldSorting sorting) {\n this.sort.add(sorting);\n return this;\n }\n\n public LegacyFindByCondition addSortings(Collection<SearchFieldSorting> sort) {\n this.sort.addAll(sort);\n return this;\n }\n\n\n public LegacyFindByCondition setLimit(int limit){\n this.limit = limit;\n return this;\n }\n\n public LegacyFindByCondition setOffset(int offset){\n this.offset = offset;\n return this;\n }\n\n public SearchQuery getCondition() {\n return condition;\n }\n\n public int getPageSize() {\n return pageSize;\n }\n\n public List<SearchFieldSorting> getSort() {\n return sort;\n }\n\n public int getOffset() {\n return offset;\n }\n\n public int getLimit(){\n if(limit < pageSize){\n pageSize = limit;\n }\n return limit;\n }\n\n @Override\n public boolean equals(final Object other) {\n if (!(other instanceof LegacyIndexedStore.LegacyFindByCondition)) {\n return false;\n }\n LegacyFindByCondition castOther = (LegacyFindByCondition) other;\n return Objects.equal(condition, castOther.condition) && Objects.equal(pageSize, castOther.pageSize)\n && Objects.equal(limit, castOther.limit) && Objects.equal(offset, castOther.offset)\n && Objects.equal(sort, castOther.sort);\n }\n\n @Override\n public int hashCode() {\n return Objects.hashCode(condition, pageSize, limit, offset, sort);\n }\n\n\n }\n\n}", "public int getIndex(\n )\n {return index;}", "abstract int get(int index);", "int index();", "E getData(int index);", "private void queryIndex() {\n if (predicate == TruePredicate.INSTANCE) {\n return;\n }\n\n // get indexes\n MapService mapService = nodeEngine.getService(SERVICE_NAME);\n MapServiceContext mapServiceContext = mapService.getMapServiceContext();\n Indexes indexes = mapServiceContext.getMapContainer(name).getIndexes();\n // optimize predicate\n QueryOptimizer queryOptimizer = mapServiceContext.getQueryOptimizer();\n predicate = queryOptimizer.optimize(predicate, indexes);\n\n Set<QueryableEntry> querySet = indexes.query(predicate);\n if (querySet == null) {\n return;\n }\n\n List<Data> keys = null;\n for (QueryableEntry e : querySet) {\n if (keys == null) {\n keys = new ArrayList<Data>(querySet.size());\n }\n keys.add(e.getKeyData());\n }\n\n hasIndex = true;\n keySet = keys == null ? Collections.<Data>emptySet() : InflatableSet.newBuilder(keys).build();\n }", "public abstract T get(int index);", "@Override\n public Data3DPlastic search() {\n return super.search();\n }", "public interface SearchResult {\n\t/**\n\t * Returns the meta data of this entity associated with the search result.\n\t * \n\t * @return\tThe meta data\n\t */\n\tMetadata getMetaData();\n\t\n\t/**\n\t * Returns the identifier of this entity associated with the search result.\n\t * \n\t * @return\tThe identifier\n\t */\n\tString getHash();\n\t\n\t/**\n\t * Returns the hash algorithm used for hashing the content.\n\t * \n\t * @return The hash algorithm\n\t */\n\tString getHashAlgorithm();\n}", "public interface SearchQuerySet extends QuerySet\n{\n\n // for AbstractSearch\n public static final int STAT_MODELS = 1;\n public static final int STAT_CLUSTERS = 2;\n public static final int STAT_GENOMES = 4;\n public static final int STAT_MODEL_CLUSTERS = 8;\n\n public String getStatsById(Collection data);\n public String getStatsByQuery(String query);\n public String getStatsById(Collection data,int stats);\n public String getStatsByQuery(String query,int stats);\n \n // for BlastSearch\n public String getBlastSearchQuery(Collection dbNames, Collection keys, KeyTypeUser.KeyType keyType);\n \n //for ClusterIDSearch\n public String getClusterIDSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for ClusterNameSearch\n public String getClusterNameSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for DescriptionSearch\n public String getDescriptionSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for GoSearch \n public String getGoSearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for GoTextSearch\n public String getGoTextSearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for IdSearch\n public String getIdSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for QueryCompSearch\n public String getQueryCompSearchQuery(String comp_id, String status, KeyTypeUser.KeyType keyType);\n \n // for QuerySearch\n public String getQuerySearchQuery(String queries_id, KeyTypeUser.KeyType keyType); \n \n // for SeqModelSearch\n public String getSeqModelSearchQuery(Collection model_ids, KeyTypeUser.KeyType keyType);\n \n // for UnknowclusterIdSearch\n public String getUnknownClusterIdSearchQuery(int cluster_id, KeyTypeUser.KeyType keyType);\n \n // for ProbeSetSearch\n public String getProbeSetSearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for ProbeSetKeySearch\n public String getProbeSetKeySearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for QueryTestSearch\n public String getQueryTestSearchQuery(String query_id, String version, String genome_id);\n \n // for QueryStatsSearch\n public String getQueryStatsSearchQuery(List query_ids,List DBs);\n \n // for PskClusterSearch\n public String getPskClusterSearchQuery(int cluster_id,KeyTypeUser.KeyType keyType);\n \n // for ClusterCorrSearch\n public String getClusterCorrSearchQuery(int cluster_id, int psk_id, KeyTypeUser.KeyType keyType);\n \n // for UnknownGenesSearch\n public String getUnknownGenesSearchQuery(Collection sources, KeyTypeUser.KeyType keyType);\n \n}", "public V search(K key);", "public interface Search {\n public List<Node> find(Node start, Node finish);\n public Node selectNode(List<Node> nodes);\n public List<Node> getPath(Node node);\n public List<Node> getAdjacent(Node node);\n}", "public interface ILuceneIndexDAO extends IStatefulIndexerSession {\n // ===================================================================\n // The domain of indexing creates a separation between\n // readers and writers. In lucene, these are searchers\n // and writers. This DAO creates the more familiar DAO-ish interface\n // for developers to use and attempts to hide the details of\n // the searcher and write.\n // Calls are stateless meaning calling a find after a save does\n // not guarantee data will be reflected for the instance of the DAO\n // ===================================================================\n\n /**\n * Updates a document by first deleting the document(s) containing a term and then adding the new document. A Term is created by termFieldName, termFieldValue.\n *\n * @param termFieldName - Field name of the index.\n * @param termFieldValue - Field value of the index.\n * @param document - Lucene document to be updated.\n * @return - True for successful addition.\n */\n boolean saveDocument(String termFieldName, String termFieldValue, Document document);\n\n /**\n * Generates a BooleanQuery from the given fields Map and uses it to delete the documents matching in the IndexWriter.\n *\n * @param fields - A Map data structure containing a field(Key) and text(value) pair.\n * @return - True for successful deletion.\n */\n boolean deleteDocuments(Map<String, String> fields);\n\n /**\n * Find the documents in the IndexSearcher matching the Terms generated from fields.\n *\n * @param fields - A Map data structure contains the field(Key) and text(value).\n * @return - Collection of Documents obtained from the search.\n */\n Set<Document> findDocuments(Map<String, String> fields);\n\n /**\n * Find the documents in the IndexSearcher matching the Terms generated from fields. Offset is the starting position for the search and numberOfResults\n * is the length from offset position.\n *\n * @param fields - A Map data structure containing a field(Key) and text(value) pair.\n * @param offset - Starting position of the search.\n * @param numberOfResults - Number of documents to be searched from an offset position.\n * @return - Collection of Documents obtained from the search.\n */\n Set<Document> findDocuments(Map<String, String> fields, int offset, int numberOfResults);\n\n /**\n * Return the count of the documents present in the IndexSearcher.\n *\n * @return - Integer representing the count of documents.\n */\n int getDocumentCount();\n\n}", "private int getIndex() {\n\t\treturn this.index;\r\n\t}", "public int getIndex(int position);", "public interface CommonIndexValue\n{\n\tpublic byte[] getVisibility();\n\n\tpublic void setVisibility(\n\t\t\tbyte[] visibility );\n\n\tpublic boolean overlaps(\n\t\t\tNumericDimensionField[] field,\n\t\t\tNumericData[] rangeData );\n}", "@Override\n\tpublic int indexOf(T searchItem) {\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif (searchItem.equals(data[i])) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public interface IIndexBuilder {\n\n public IIndex getIndex( Class<?> searchable ) throws BuilderException;\n\n public IFieldVisitor getFieldVisitor();\n\n public void setFieldVisitor( IFieldVisitor visitor );\n\n}", "public int getIndexOf(K key);", "@Override\r\n\tpublic int getIndex() {\n\t\treturn index;\r\n\t}", "public T get(int aIndex);", "public int indexOf(Object elem, int index);", "public int getIndex() { return this.index; }", "@Override\n\tpublic void search() {\n\t}", "public interface Index {\n\t\n\tvoid index(AddOnInfoAndVersions infoAndVersions) throws Exception;\n\t\n\tCollection<AddOnInfoSummary> search(AddOnType type, String query) throws Exception;\n\t\n\tCollection<AddOnInfoAndVersions> getAllByType(AddOnType type) throws Exception;\n\t\n\tCollection<AddOnInfoAndVersions> getByTag(String tag) throws Exception;\n\t\n\tAddOnInfoAndVersions getByUid(String uid) throws Exception;\n}", "public List<T> search(int index,String key) throws NotFound {\n\t\tList<T> value = null;\n\t\tif (internalStorage != null && index<internalStorage.size())\n\t\t value = internalStorage.get(index).get(key);\n\t\tif (value == null) throw new NotFound();\n\t\treturn value;\n\t}", "@java.lang.Override\n public int getIndex() {\n return index_;\n }", "@Override\n\tpublic boolean isSearchable(int arg0) throws SQLException {\n\t\treturn true;\n\t}", "private Integer serialSearch() {\n int currentIndex = startIndex;\n for (int i = start; i < end; i++) {\n if (this.searchIndex == currentIndex) {\n return currentIndex;\n }\n currentIndex++;\n }\n return 0;\n }", "@Override\r\n\tpublic void search() {\n\r\n\t}", "public abstract Iter<Boolean> search(T element);", "void search();", "void search();", "public abstract int indexOf(E e);", "public interface Queryable {\n\n /**\n * Query structure by Dewey key. This method returns a pointer to the item located by following\n * the Dewey key given as an argument. The search is relative, i.e., treats the root of this\n * structure as the overall root.\n * @param path\n * the key to search for, represented in [@link DeweyKey} array form\n * @return a pointer accessed through the key, or <code>null</code> if the structure does not\n * contain the argument path\n */\n Pointer query(int[] path);\n\n}", "@java.lang.Override\n public int getIndex() {\n return index_;\n }", "public abstract OneCampaignAbstract accessToElementSearched(final String key, final String element);", "abstract public Object getValue(int index);", "@In String search();", "int search(E item);", "@Nullable\n public abstract IndexEntry getIndexEntry();", "public abstract void selectAllIndexes();", "public IndexedDataSet<T> getDataSet();", "public interface EsSearchDao {\n\n EsQueryResult search(StoreURL storeURL, EsQuery esQuery);\n\n EsQueryResult searchByIds(StoreURL storeURL, EsQuery esQuery);\n\n EsQueryResult searchByFields(StoreURL storeURL, EsQuery esQuery);\n\n List<EsQueryResult> multiSearch(StoreURL storeURL, List<EsQuery> list);\n\n EsQueryResult searchByDSL(StoreURL storeURL, EsQuery esQuery);\n\n Object executeProxy(StoreURL storeURL, EsProxy esProxy);\n}", "@Override\n public final int getIndex() {\n return index;\n }", "public abstract E get(int index);", "public abstract Solution<T> search(Searchable<T> s);", "public interface SearchCallback<T, O> extends IClusterable {\r\n public SearchCallbackResult<T> search(String searchString, O searchBy);\r\n }", "public abstract int getNumIndexes();", "public void search() {\r\n \t\r\n }", "@TimeComplexity(\"O(1)\")\n\tpublic int index()\n\t{\n\t\t//TCJ: the cost does not vary with input size so it is constant\n\t\treturn index;\n\t}", "List<DataTerm> search(String searchTerm);", "public static interface SearchType\n\t{\n\t\t/**\n\t\t * Creates a search of this type with the given query\n\t\t * \n\t\t * @param search The search query\n\t\t * @param builder The search builder that is compiling the search\n\t\t * @return The compiled search object representing the given query\n\t\t */\n\t\tpublic abstract Search create(String search, SearchBuilder builder);\n\n\t\t/** @return All headers that may begin a search of this type */\n\t\tpublic abstract String [] getHeaders();\n\t}", "public int getIndex() {\r\n \t\t\treturn index;\r\n \t\t}", "public int indexOf(Object elem);", "@FunctionalInterface\npublic interface IIndexer<T extends IDocument> {\n\tList<T> getDocuments(String query, int limit);\n}", "public int getSearchIndex() \n\t{\n\t\treturn itemSearchIndex;\n\t}", "public interface Searcher<T> {\r\n\t\r\n\t//the search method\r\n\tpublic Solution<T> search(Searchable<T> s);\r\n\t\r\n\t//get how many nodes were evaluated by the algorithm\r\n\tpublic int getNumberOfNodesEvaluated();\r\n}", "public int get(int index);", "Search getSearch();", "int get(int idx);", "public List<Index> getIndexes();", "public int getIndex(){\r\n \treturn index;\r\n }", "@java.lang.Override\n public int getIndex() {\n return index_;\n }" ]
[ "0.73528093", "0.70830905", "0.6873576", "0.6817998", "0.67331356", "0.67331356", "0.67331356", "0.65954465", "0.65949225", "0.656533", "0.6527214", "0.6526883", "0.65248317", "0.65248317", "0.65248317", "0.65248317", "0.65248317", "0.65248317", "0.65248317", "0.65248317", "0.65248317", "0.65248317", "0.65248317", "0.65248317", "0.65248317", "0.65061885", "0.64805156", "0.6390772", "0.6389192", "0.6320951", "0.631619", "0.628069", "0.628069", "0.61832863", "0.61424375", "0.61182034", "0.61095583", "0.6074213", "0.6065901", "0.60492855", "0.6033591", "0.5948234", "0.5918574", "0.5915948", "0.59153163", "0.5913947", "0.5897355", "0.58960694", "0.5891168", "0.58784086", "0.58697313", "0.586533", "0.5864337", "0.5847142", "0.58388853", "0.58171386", "0.58125895", "0.5811598", "0.5807867", "0.58037937", "0.58018774", "0.5801004", "0.5788704", "0.5778634", "0.5769429", "0.5764039", "0.5761323", "0.5756172", "0.5756172", "0.57405317", "0.5739728", "0.57373726", "0.5735817", "0.57278615", "0.5725432", "0.5724516", "0.5701834", "0.56978816", "0.5697758", "0.5690906", "0.56847876", "0.56846786", "0.5677915", "0.5674061", "0.56740314", "0.5672613", "0.56697273", "0.5667887", "0.5663189", "0.5663038", "0.5661924", "0.565963", "0.5654072", "0.56496143", "0.56381047", "0.5636002", "0.56348634", "0.5634351", "0.56342036", "0.56277114" ]
0.6929171
2
Gets clusters of elements by density properties defined as epsilon and minimum.
protected static <T> Set<List<T>> cluster(ISearchIndex<T> index, double epsilon, int minimum) { Set<List<T>> clusters = new HashSet<List<T>>(); Set<T> visited = new HashSet<T>(); Set<T> noise = new HashSet<T>(); for (T element : index) { if (visited.contains(element)) { continue; } visited.add(element); List<T> neighbors = index.radius(element, epsilon); if (neighbors.size() < minimum) { noise.add(element); } else { List<T> cluster = new LinkedList<T>(); LinkedList<T> seeds = new LinkedList<T>(); for (T neighbor : neighbors) { seeds.push(neighbor); visited.add(neighbor); cluster.add(neighbor); noise.remove(neighbor); } while (!seeds.isEmpty()) { T seed = seeds.pollLast(); List<T> exteriors = index.radius(seed, epsilon); if (exteriors.size() >= minimum) { Set<T> subvisited = new HashSet<T>(); for (T exterior : exteriors) { if (!visited.contains(exterior)) { seeds.push(exterior); subvisited.add(exterior); cluster.add(exterior); } if (noise.contains(exterior)) { noise.remove(exterior); cluster.add(exterior); } } visited.addAll(subvisited); } } clusters.add(cluster); } } return clusters; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Set<List<Double>> cluster(List<Double> elements, double epsilon, int minimum) {\n ISearchIndex<Double> index = new SearchIndex(elements);\n return cluster(index, epsilon, minimum);\n }", "public double findDensity() {\n\t\tdouble temp = 0.0;\n\t\tfor (int i = 0; i < neighbors.size(); i++) { //calculate desnity using point and k nearest neighbors\n\t\t\tPoint t = neighbors.get(i);\n\t\t\tArrayList<Double> pa = t.getList();\n\t\t\tArrayList<Double> pb = p.getList();\n\t\t\tdouble sum = 0.0;\n\t\t\tfor (int j = 0; j < pa.size(); j++) {\n\t\t\t\tsum += Math.pow(pa.get(j)- pb.get(j), 2); //use euclidian distance\n\t\t\t}\n\t\t\ttemp += Math.sqrt(sum);\n\t\t}\n\t\treturn ((neighbors.size())/temp);\n\t}", "static double clusterVerticesOneStep(Mesh mesh) {\n\t\t\n\t\t// for each pair of the vertices\n\t\tdouble mindis = 1.0e+30;\n\t\tfor(int i = 0; i < mesh.getNumVertices(); i++) {\n\t\t\tVertex v1 = mesh.getVertex(i);\n\t\t\tfor(int j = (i + 1); j < mesh.getNumVertices(); j++) {\n\t\t\t\tVertex v2 = mesh.getVertex(j);\n\t\t\t\n\t\t\t\t// for each pair of the nodes\n\t\t\t\tdouble maxdis = 0.0;\n\t\t\t\tfor(int ii = 0; ii < v1.nodes.size(); ii++) {\n\t\t\t\t\tNode n1 = (Node)v1.nodes.get(ii);\n\t\t\t\t\tfor(int jj = 0; jj < v2.nodes.size(); jj++) {\n\t\t\t\t\t\tNode n2 = (Node)v2.nodes.get(jj);\n\t\t\t\t\t\tif(n1.getDisSim2(n2.getId()) > maxdis) {\n\t\t\t\t\t\t\tmaxdis = n1.getDisSim2(n2.getId());\n\t\t\t\t\t\t\tif(maxdis > mindis) {\n\t\t\t\t\t\t\t\tii = v1.nodes.size(); break;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// update mindis\n\t\t\t\tif(mindis > maxdis) {\n\t\t\t\t\tmindis = maxdis;\n\t\t\t\t\t//System.out.println(\" updated mindis=\" + mindis);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Determine the threshold\n\t\tdouble threshold = mindis * clusteringThreshold;\n\t\t\n\t\t// Combine close two vertices \n\t\tfor(int i = 0; i < mesh.getNumVertices(); i++) {\n\t\t\tVertex v1 = mesh.getVertex(i);\n\t\t\tfor(int j = (i + 1); j < mesh.getNumVertices(); j++) {\n\t\t\t\tVertex v2 = mesh.getVertex(j);\n\t\t\t\n\t\t\t\t// for each pair of the nodes\n\t\t\t\tdouble maxdis = -1.0;\n\t\t\t\tfor(int ii = 0; ii < v1.nodes.size(); ii++) {\n\t\t\t\t\tNode n1 = (Node)v1.nodes.get(ii);\n\t\t\t\t\tfor(int jj = 0; jj < v2.nodes.size(); jj++) {\n\t\t\t\t\t\tNode n2 = (Node)v2.nodes.get(jj);\n\t\t\t\t\t\tif(n1.getDisSim2(n2.getId()) > maxdis) {\n\t\t\t\t\t\t\tmaxdis = n1.getDisSim2(n2.getId());\n\t\t\t\t\t\t\tif(maxdis > threshold) {\n\t\t\t\t\t\t\t\tii = v1.nodes.size(); break;\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\tif(maxdis > threshold) continue;\n\t\t\t\t\n\t\t\t\t//System.out.println(\" combine: i=\" + i + \" j=\" + j + \" names=\" + authors + \" maxdis=\" + maxdis + \" th=\" + threshold);\n\t\t\t\t\n\t\t\t\t// combine the two vertices\n\t\t\t\tfor(int jj = 0; jj < v2.nodes.size(); jj++) {\n\t\t\t\t\tNode n2 = (Node)v2.nodes.get(jj);\n\t\t\t\t\tv1.nodes.add(n2);\n\t\t\t\t\tn2.setVertex(v1);\n\t\t\t\t}\n\t\t\t\tmesh.removeOneVertex(v2);\n\t\t\t\tj--;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn threshold;\n\t}", "public Vector run(){\n// System.out.println(\"Minimum radius is: \" + minRadius);\n// System.out.println(\"Maximum radius is: \" + maxRadius);\n Vector clusters = new Vector();\n double fitnessSum = 0;\n for (int q = 0; q < numTests; q++){\n Gene hypothesis = initializer.createRandomGene(fitnessFunction, minRadius, maxRadius);\n //This turns it into a circle.\n if (Math.random() > 0.5){ \n hypothesis.setMajorAxisRadius(hypothesis.getMinorAxisRadius());\n } else { \n hypothesis.setMinorAxisRadius(hypothesis.getMajorAxisRadius());\n }\n// System.out.println(hypothesis);\n double fitness = hypothesis.getFitness();\n fitnessSum = fitnessSum + fitness;\n if ((hypothesis.getCount() >= minPoints) && (fitness >= minAccepted)){\n clusters.add(hypothesis);\n }\n }\n averageFitness = fitnessSum/numTests;\n return clusters;\n }", "public Set<Set<Entity>> getEdgeBetweennessClusters(double ratioEdgesToRemove)\r\n\t{\r\n\t\tint numEdgesToRemove = (int) (getNumberOfEdges() * ratioEdgesToRemove);\r\n\t\tEdgeBetweennessClusterer<Entity, EntityGraphEdge> betweenClusterer = new EdgeBetweennessClusterer<Entity, EntityGraphEdge>(\r\n\t\t\t\tnumEdgesToRemove);\r\n\r\n\t\tList<Set<Entity>> clusters = new ArrayList<Set<Entity>>(\r\n\t\t\t\tbetweenClusterer.transform(directedGraph));\r\n\t\tlogger.info(\"Number of edge-betweenness clusters: \" + clusters.size());\r\n\t\tCollections.sort(clusters, sortListBySizeDescending);\r\n\r\n\t\tIterator<Set<Entity>> clusterIter = clusters.iterator();\r\n\t\tSet<Set<Entity>> clusterSet = new HashSet<Set<Entity>>();\r\n\r\n\t\twhile (clusterIter.hasNext()) {\r\n\t\t\tSet<Entity> nodeCluster = clusterIter.next();\r\n\t\t\tSet<Entity> entCluster = new HashSet<Entity>();\r\n\t\t\tfor (Entity node : nodeCluster) {\r\n\t\t\t\tentCluster.add(node);\r\n\t\t\t}\r\n\t\t\tlogger.info(\"Cluster's size: \" + entCluster.size());\r\n\t\t\tclusterSet.add(entCluster);\r\n\t\t}\r\n\t\treturn clusterSet;\r\n\t}", "private static double dynamically_select_epsilon(ArrayList<Point> pointset){\n\t\tPair closestPair = closest_pair(pointset);\n\t\t\n\t\t// Calculate Chebyshev distance between nearest pair\n\t\tdouble distance = chebyshev_distance(closestPair.getFirst(), closestPair.getSecond());\n\t\t\n\t\t// Divide by 8 to fit 8e box constraint set in Gabe's paper\n\t\treturn distance / 8.0;\n\t}", "public HashMap getClusterDiameter() {\n double maxEuclideanDistance = 0;\n double maxCorrelationDistance = 0;\n\n Set probeIDSet = points.keySet();\n Iterator probeIt = probeIDSet.iterator();\n \n int comparisonIndex = 0;\n \n while (probeIt.hasNext()) {\n int probeID = (Integer) probeIt.next();\n double[] pointA = (double[]) points.get(probeID);\n\n Set probeIDSet2 = points.keySet();\n Iterator probeIt2 = probeIDSet2.iterator();\n while (probeIt2.hasNext()) {\n int probeID2 = (Integer) probeIt2.next();\n double[] pointB = (double[]) points.get(probeID2);\n \n HashMap distances = KMeans.getDistances(pointA, pointB);\n double eucDist = (Double) distances.get(\"euclidean\");\n double correlDist = (Double) distances.get(\"correlation\");\n \n if (comparisonIndex == 0) { // First distance\n maxEuclideanDistance = eucDist;\n maxCorrelationDistance = correlDist;\n } else if (eucDist > maxEuclideanDistance) {\n maxEuclideanDistance = eucDist;\n } else if ( Math.abs(correlDist) < maxCorrelationDistance) {\n maxCorrelationDistance = correlDist;\n }\n comparisonIndex++;\n }\n }\n \n HashMap<String, Double> distances = new HashMap<String, Double>();\n distances.put(\"euclidean\", maxEuclideanDistance);\n distances.put(\"correlation\", maxCorrelationDistance);\n return distances;\n }", "private static void dp() {\n\t\tm[0] = 0;\n\t\tk[0] = 0;\n\n\t\t// base case 1:for 1 cent we need give 1 cent\n\t\tm[1] = 1;\n\t\tk[1] = 1;\n\n\t\tfor (int i = 2; i <= n; i++) {\n\t\t\tint min = Integer.MAX_VALUE;\n\t\t\tint sel = -1;\n\t\t\tfor (int j = 0; j < sd; j++) {\n\t\t\t\tint a = d[j];\n\t\t\t\tif (a > i) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tint v = 1 + m[i - a];\n\t\t\t\tif (v < min) {\n\t\t\t\t\tmin = v;\n\t\t\t\t\tsel = a;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (sel == -1)\n\t\t\t\tthrow new NullPointerException(\"sel != -1\");\n\t\t\tm[i] = min;\n\t\t\tk[i] = sel;\n\t\t}\n\t}", "public Hashtable<Double, Integer> cluster(ArrayList<Double>[] array) {\n\t\t\n\t\tHashtable<Double, Integer> results = new Hashtable<Double, Integer>();\n\t\tfor (ArrayList<Double> arrayList : array) {\n\t\t\t/*\n\t\t\t * for (Double value : arrayList) { for (int i=1;\n\t\t\t * i<thresholds.length; i++) { if (thresholds[i-1] > value && value\n\t\t\t * >= thresholds[i]) clusteringConsole.put(value, i-1); } if\n\t\t\t * (!clusteringConsole.containsKey(value))\n\t\t\t * System.out.println(\"not classified: \"+value); }\n\t\t\t */\n\t\t\t\n\t\t\tint prevStateIndex = 0; \n\t\t\t//double prevStateCenter = centers[0];\n\t\t\t\n\t\t\tfor (Double value : arrayList) {\n\t\t\t\t \n\t\t\t\tdouble s = DEFAULT_SIGMA;\n\t\t\t\t//int stateIndex = prevStateIndex; // if distance not enough from previous center, the previous state will be copied\n\t\t\t\t//if ( Math.abs(value-prevStateCenter) > 0.25 ) { // if large distance from the previous center, look up where we are\n\t\t\t\t\t\n\t\t\t\t\tif (centers[0] + s > value && value > centers[0] - s)\n\t\t\t\t\t\tresults.put(value, 1);\n\t\t\t\t\telse if (centers[1] + s > value && value > centers[1] - s)\n\t\t\t\t\t\tresults.put(value, 2);\n\t\t\t\t\telse if (centers[2] + s > value && value > centers[2] - s)\n\t\t\t\t\t\tresults.put(value, 3);\n\t\t\t\t\telse if (centers[3] + s > value && value > centers[3] - s)\n\t\t\t\t\t\tresults.put(value, 4);\n\t\t\t\t\telse if (centers[4] + s > value && value > centers[4] - s)\n\t\t\t\t\t\tresults.put(value, 5);\n\t\t\t\t\telse results.put(value, 0);\n\t\t\t\t//}\n\t\t\t\t\n\t\t\t\t//prevStateCenter = centers[stateIndex];\n\t\t\t\t//prevStateIndex = stateIndex;\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}", "private static Collection<Point> initializeCenters(int count) {\n\t\tif(count > CLUSTER_COLORS.length){\n\t\t\tthrow new IllegalStateException(\"not enough colors...\");\n\t\t}\n\t\t\n\t\tCollection<Point> result = new HashSet<Point>();\n\t\tRandom r = new Random();\n\t\t\n\t\tfor(int i = 0; i < count; i++){\n\t\t\tPoint p = new Point(r.nextInt(400), r.nextInt(400));\n\t\t\tp.setColor(CLUSTER_COLORS[i]);\n\t\t\tresult.add(p);\n\t\t}\n\t\treturn result;\n\t}", "private double dynamically_select_epsilon(ArrayList<Point> pointset) {\n\t\tPair closestPair = closest_pair(pointset);\n\n\t\t// Calculate Chebyshev distance between nearest pair\n\t\tdouble distance = chebyshev_distance(closestPair);\n\n\t\t// Divide by 16 to fit 8e box constraint set in Gabe's paper\n\t\treturn distance / 16.0;\n\t}", "public static HashMap<LonLat,ArrayList<STPoint>> clustering2dKNSG(IKernel kernel,ArrayList<STPoint> data,double h,double e) {\n\t\tHashMap<LonLat,ArrayList<STPoint>> result = new HashMap<LonLat,ArrayList<STPoint>>();\n\t\tint N = data.size();\n\t\t//\t\tSystem.out.println(\"#number of points : \"+N);\n\n\t\tfor(STPoint point:data) {\n\t\t\t// seek mean value //////////////////\n\t\t\tLonLat mean = new LonLat(point.getLon(),point.getLat());\n\n\t\t\t//loop from here for meanshift\n\t\t\twhile(true) {\n\t\t\t\tdouble numx = 0d;\n\t\t\t\tdouble numy = 0d;\n\t\t\t\tdouble din = 0d;\n\t\t\t\tfor(int j=0;j<N;j++) {\n\t\t\t\t\tLonLat p = new LonLat(data.get(j).getLon(),data.get(j).getLat());\n\t\t\t\t\tdouble k = kernel.getDensity(mean,p,h);\n\t\t\t\t\tnumx += k * p.getLon();\n\t\t\t\t\tnumy += k * p.getLat();\n\t\t\t\t\tdin += k;\n\t\t\t\t}\n\t\t\t\tLonLat m = new LonLat(numx/din,numy/din);\n\t\t\t\tif( mean.distance(m) < e ) { mean = m; break; }\n\t\t\t\tmean = m;\n\t\t\t}\n\t\t\t//\t\t\tSystem.out.println(\"#mean is : \" + mean);\n\t\t\t// make cluster /////////////////////\n\t\t\tArrayList<STPoint> cluster = null;\n\t\t\tfor(LonLat p:result.keySet()) {\n\t\t\t\tif( mean.distance(p) < e ) { cluster = result.get(p); break; }\n\t\t\t}\n\t\t\tif( cluster == null ) {\n\t\t\t\tcluster = new ArrayList<STPoint>();\n\t\t\t\tresult.put(mean,cluster);\n\t\t\t}\n\t\t\tcluster.add(point);\n\t\t}\n\t\treturn result;\n\t}", "public static List<SimpleEntry<Integer, Double>> betweennessCent(Vertex[] vertices)\r\n\t{\r\n\t\tList<SimpleEntry<Integer, Double>> bc = new ArrayList<SimpleEntry<Integer, Double>>();\r\n\t\tint countTotal = 0;\r\n\t\tfor(int i = 0; i < V; i++)\r\n\t\t{\r\n\t\t\tfor(int j = i; j < V; j++)\r\n\t\t\t{\r\n\t\t\t\t// if they are not the same vertex\r\n\t\t\t\tif(i != j)\r\n\t\t\t\t{\r\n\t\t\t\t\tbfs(vertices, i, j);\r\n\t\t\t\t\tcountTotal++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < V; i++)\r\n\t\t{\r\n\t\t\tvertices[i].divideNumPaths(countTotal);\r\n\t\t\tbc.add(new SimpleEntry<Integer, Double>(i, vertices[i].getNumPaths()));\r\n\t\t}\r\n\t\t\r\n\t\t// sort the list according to the values (in this case, the betweenness)\r\n\t\tCollections.sort(bc, new Comparator<SimpleEntry<Integer, Double>>(){\r\n\t\t\t\r\n\t\t\t/**\r\n\t\t\t * Compare the values of two of the entries of the comparator\r\n\t\t\t * @param arg0\r\n\t\t\t * @param arg1\r\n\t\t\t * @return a negative integer if arg0 < arg1\r\n\t\t\t * \t\t zero \t\t\t if arg0 == arg1\r\n\t\t\t * \t\t a positive integer if arg0 > arg1\r\n\t\t\t */\r\n\t\t\t@Override\r\n\t\t\tpublic int compare(SimpleEntry<Integer, Double> arg0, SimpleEntry<Integer, Double> arg1)\r\n\t\t\t{\r\n\t\t\t\treturn arg1.getValue().compareTo(arg0.getValue());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\treturn bc;\r\n\t}", "public List<List<AlgorithmPoint>> getNeighbours(AlgorithmPoint point, double epsilon, int k)\n {\n List<AlgorithmPoint> neighbours = getNeighbours(point, epsilon);\n\n // first we create a max priority queue\n\n PriorityQueue<PrioPair<AlgorithmPoint,Double>> pq = new PriorityQueue<PrioPair<AlgorithmPoint,Double>>();\n\n for (AlgorithmPoint q : neighbours) {\n double dist = Calculations.distance(point.getPoint(), q.getPoint(), Algorithm.DISTANCE_METRIC);\n\n PrioPair<AlgorithmPoint,Double> pair = new PrioPair<AlgorithmPoint,Double>(q, dist);\n\n if (pq.size() <= k) {\n pq.add(pair);\n } else {\n if (dist < ((Double) pq.peek().getV())) {\n // remove the highest element\n pq.poll();\n pq.add(pair);\n }\n }\n }\n\n // now we make the list\n\n List<AlgorithmPoint> knn = new ArrayList<AlgorithmPoint>();\n PrioPair<AlgorithmPoint,Double> pair;\n\n while ((pair = pq.poll()) != null) {\n knn.add(pair.getT());\n }\n\n List<List<AlgorithmPoint>> result = new ArrayList<List<AlgorithmPoint>>(2);\n\n result.add(knn);\n result.add(neighbours);\n\n return result;\n }", "private List<Point> neighboursFiltering(List<Point> points) {\n Point nearest = points.get(0);\n HeartDistance calculator = new HeartDistance();\n return points.stream().filter(p -> calculator.calculate(p,nearest) < NEIGHBOURS_THRESHOLD).collect(Collectors.toList());\n }", "@Override\n public Point[] chooseCentroids(AbstractCluster self) {\n if (K!=2) {\n System.err.println(\"The used splitter is not suppose to be used with K>2. This program will shut down\"); //#like\n exit(1);\n }\n Point[] result={self.get(0),self.get(0)};\n double max=0;\n for (int i=0; i<self.size(); ++i)\n for (int j=0; j<i; ++j)\n if (max<_distances.get(self.get(i).getId(),self.get(j).getId())) {\n max=_distances.get(self.get(i).getId(),self.get(j).getId());\n result[0]=self.get(i);\n result[1]=self.get(j);\n }\n return result;\n }", "LinkedListSortedNeighborSet obtainKNeighbors(int paraObjectIndex) {\n LinkedListSortedNeighborSet tempNeighborSet = new LinkedListSortedNeighborSet();\n tempNeighborSet.setNeighborThreshold(k);\n\n for (int i = 0; i < formalContext.trainingFormalContext.length; i++) {\n//\t\t\tSystem.out.println(\"u: \" + paraObjectIndex);\n if (i != paraObjectIndex) {\n//\t\t\t\tSystem.out.println(\"v: \" + i);\n Measures tempSimilarityMetric = new Measures(formalContext.trainingFormalContext[paraObjectIndex],\n formalContext.trainingFormalContext[i]);\n double tempSimilarity = tempSimilarityMetric.jaccardSimilarity();\n//\t\t\t\tSystem.out.println(\"Similarity: \" + tempSimilarity);\n tempNeighborSet.topKSortedInsert(i, tempSimilarity);\n//\t\t\t\tSystem.out.println(\"\" + tempNeighborSet.toString());\n } // End if\n } // End for\n return tempNeighborSet;\n }", "@Override\n \tpublic Collection<Collection<Integer>> call() throws Exception {\n \t\tEdgeWeighter<HomologyEdge> weighter = new EdgeWeighter<HomologyEdge>() {\n \t\t\t@Override\n \t\t\tpublic double getWeight(HomologyEdge e) {\n \t\t\t\treturn e.getWeight();\n \t\t\t}\n \t\t};\n \t\tProbabilisticDistanceClusterer<Integer, HomologyEdge> alg = new ProbabilisticDistanceClusterer<Integer, HomologyEdge>(\n \t\t\t\tweighter, xi);\n \t\tSet<Set<Integer>> ccs = alg.transform(graph.getHomology());\n \n \t\t// now map each cluster to a root for that cluster\n \t\t// the choice of root is arbitrary and just for hashing\n \t\tMap<Integer, Integer> map = new HashMap<Integer, Integer>();\n \t\tfor (Set<Integer> cc : ccs) {\n \t\t\tint v0 = -1;\n \t\t\tint i = 0;\n \t\t\tfor (int v : cc) {\n \t\t\t\tif (i == 0) v0 = v;\n \t\t\t\tmap.put(v, v0);\n \t\t\t\ti++;\n \t\t\t}\n \t\t}\n \n \t\t// find the cliques\n \t\tBronKerboschCliqueFinder<Integer, HomologyEdge> finder = new BronKerboschCliqueFinder<>();\n \t\tCollection<Set<Integer>> cliques = finder.transform(graph.getHomology());\n \n \t\t// group the cliques by sets of interactions\n \t\tNavigableMap<String, Collection<Integer>> cliqueGroups = new TreeMap<>();\n \t\tfor (Set<Integer> clique : cliques) {\n \t\t\tfor (int v : clique) {\n \t\t\t\tCollection<Integer> neighbors = graph.getInteractionNeighbors(v);\n \t\t\t\tString hash = hashVertexInteractions(neighbors, map);\n \t\t\t\tCollection<Integer> group = cliqueGroups.get(hash);\n \t\t\t\tif (group == null) group = new TreeSet<>();\n \t\t\t\tgroup.add(v);\n \t\t\t}\n \t\t}\n \n \t\t// now we just want a set to return\n \t\tSet<Collection<Integer>> set = new TreeSet<>();\n \t\tset.addAll(cliqueGroups.values());\n \n \t\treturn set;\n \t}", "public void cluster(ArrayList<double[]> data){\n\t\t// set the dimension to make the cut in\n\t\tint dim = chooseDimension(data);\n\t\tif(dim != -1){\n\t\t\tArrayList<double[]> lhs = new ArrayList<double[]>();\n\t\t\tArrayList<double[]> rhs = new ArrayList<double[]>();\n\t\t\t\n\t\t\t// split the partition into two partitions(lhs and rhs) so the same amount of elements is in each partition\n\t\t\tCollections.sort(data, new Comparator<double[]>() {\n public int compare(double[] values, double[] otherValues) {\n return new Double(values[dim]).compareTo(new Double(otherValues[dim]));\n }});\n\t\t\t\n\t\t\tfor(int i = 0; i < data.size(); i++){\n\t\t\t\tif(i < data.size()/2){\n\t\t\t\t\tlhs.add(data.get(i));\n\t\t\t\t}else{\n\t\t\t\t\trhs.add(data.get(i));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t\t// use algorithm mondrian recursively for the new partitions\n\t\t\tmondrian(rhs);\n\t\t\tmondrian(lhs);\n\t\t}\n\t}", "public List<ParameterValueObject> getClustering(Filter filter);", "public Instance[] findNearestNeighbors(Instance instance) {\n\n Instance[] neighbors = new Instance[k_value];\n Instance[] data = new Instance[m_trainingInstances.numInstances()];\n DistanceCalculator dc = new DistanceCalculator();\n dc.setEfficient(efficient);\n\n // Copying\n for (int i = 0; i < m_trainingInstances.numInstances(); i++) {\n data[i] = m_trainingInstances.instance(i);\n }\n\n // If not enough\n if (k_value > data.length)\n return data;\n\n //Create array for Distances\n double[] distance = new double[data.length];\n for (int i = 0; i < data.length; i++) {\n distance[i] = dc.distance(instance, m_trainingInstances.instance(i), p_value, -1);\n }\n sortWIth2Var(data, distance);\n for (int i = 0; i < neighbors.length; i++) {\n neighbors[i] = data[i];\n }\n return neighbors;\n }", "public static void main(String[] args)\r\n\t{\n\t\tList<Location> locations = new ArrayList<Location>();\r\n\t\tlocations.add(new Location(150, 981));\r\n\t\tlocations.add(new Location(136, 0));\r\n\t\tlocations.add(new Location(158, 88));\r\n\t\tlocations.add(new Location(330, 60));\r\n\t\tlocations.add(new Location(0, 1001));\r\n\t\tlocations.add(new Location(150, 0));\r\n\t\tlocations.add(new Location(0, 0));\r\n\t\tlocations.add(new Location(0, 0));\r\n\t\tlocations.add(new Location(0, 0));\r\n\t\tlocations.add(new Location(446, 88));\r\n\t\tlocations.add(new Location(562, 88));\r\n\t\tlocations.add(new Location(256, 88));\r\n\t\tlocations.add(new Location(678, 88));\r\n\t\tlocations.add(new Location(794, 88));\r\n\t\tlocations.add(new Location(0, 1028));\r\n\t\tlocations.add(new Location(136, 0));\r\n\t\tlocations.add(new Location(150, 0));\r\n\t\tlocations.add(new Location(150, 88));\r\n\t\tlocations.add(new Location(150, 1028));\r\n\t\tlocations.add(new Location(150, 88));\r\n\t\tlocations.add(new Location(150, 88));\r\n\t\tlocations.add(new Location(150, 88));\r\n\t\tlocations.add(new Location(150, 88));\r\n\t\tlocations.add(new Location(150, 88));\r\n\t\tlocations.add(new Location(150, 88));\r\n\t\tlocations.add(new Location(136, 103));\r\n\t\tlocations.add(new Location(150, 0));\r\n\t\tList<LocationWrapper> clusterInput = new ArrayList<LocationWrapper>(locations.size());\r\n\t\tfor (Location location : locations)\r\n\t\t\tclusterInput.add(new LocationWrapper(location));\r\n\r\n\t\t// initialize a new clustering algorithm.\r\n\t\t// we use KMeans++ with 10 clusters and 10000 iterations maximum.\r\n\t\t// we did not specify a distance measure; the default (euclidean\r\n\t\t// distance) is used.\r\n\t\t// org.apache.commons.math3.ml.clustering.FuzzyKMeansClusterer<LocationWrapper>\r\n\t\t// clusterer = new\r\n\t\t// org.apache.commons.math3.ml.clustering.FuzzyKMeansClusterer<LocationWrapper>(2,\r\n\t\t// 2);\r\n\t\t// KMeansPlusPlusClusterer<LocationWrapper> clusterer = new\r\n\t\t// KMeansPlusPlusClusterer<LocationWrapper>(2, 10);\r\n\r\n\t\tDBSCANClusterer<LocationWrapper> clusterer = new DBSCANClusterer<LocationWrapper>(1200.0, 5);\r\n\t\tList<Cluster<LocationWrapper>> clusterResults = clusterer.cluster(clusterInput);\r\n\t\t// List<CentroidCluster<LocationWrapper>> clusterResults =\r\n\t\t// clusterer.cluster(clusterInput);\r\n\r\n\t\t// output the clusters\r\n\t\tSystem.out.println(\"clusterResults.size() = \" + clusterResults.size());\r\n\t\tfor (int i = 0; i < clusterResults.size(); i++)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Cluster \" + i);\r\n\t\t\tfor (LocationWrapper locationWrapper : clusterResults.get(i).getPoints())\r\n\t\t\t\tSystem.out.println(locationWrapper.getLocation());\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}", "public static EuclidianDictionary[] computeDistance(DaubechyColorSplitter query, List<DaubechyColorSplitter> daubechyColorSplitters) {\n //compute descriptor of query\n EuclidianDictionary euclidianDictionary[] = StandardDeviation.computeAll(query, daubechyColorSplitters);\n\n //perform euclidian on query and each descriptor element\n Arrays.sort(euclidianDictionary, (o1, o2) -> {\n if(o1.euclidian < o2.euclidian) {\n return -1;\n }else if(o2.euclidian > o1.euclidian) {\n return 1;\n }else{\n return 0;\n }\n });\n return euclidianDictionary;\n }", "private List<Double> getCentList(ContinuousAttribute attr, ClusterSet data) {\n\t\treturn ChartF.getCentContValues(data, attr);\n\t}", "public Collection<N> neighbors();", "public List<double[]> calculateCurvature(){\n List<double[]> values = new ArrayList<>();\n\n\n for(Node3D node: mesh.nodes){\n List<Triangle3D> t_angles = node_to_triangle.get(node);\n //all touching triangles.\n if(t_angles==null) continue;\n\n double[] curvature = getNormalAndCurvature(node, t_angles);\n double[] pt = node.getCoordinates();\n double mixedArea = calculateMixedArea(node);\n values.add(new double[]{\n pt[0], pt[1], pt[2],\n curvature[3],\n curvature[0], curvature[1], curvature[2],\n mixedArea\n });\n\n\n }\n return values;\n }", "public void calcVicinity(double epsilon, double errorBound, double c) {\r\n Propagator searcher = new Propagator(this);\r\n\t\tint cnt = 0;\r\n long start = System.currentTimeMillis();\r\n\t\tfor (Node n : mNodes) {\r\n\t\t\tMap<Integer, Double> neighbors = searcher.search(n.getId(), epsilon, c, errorBound);\r\n\t\t\tvicinity.put(n.getId(), neighbors);\r\n\t\t\tcnt ++;\r\n\t\t\tif (cnt % 100 == 0) {\r\n System.out.println(\"Finished computing vicinity for \" + cnt + \" nodes.\");\r\n\t\t\t\t// Print the neighbor info for debuging\r\n\t\t\t\tSystem.out.println(n.getId() + \"\\t\" + n.getDescription());\r\n\t\t\t\tfor (Map.Entry<Integer, Double> e : neighbors.entrySet()) {\r\n\t\t\t\t\tint neighborId = e.getKey();\r\n\t\t\t\t\tSystem.out.println(\"\\t\" + e.getKey() + \"\\t\" + mNodes.get(neighborId).getDescription() + \"\\t\" + e.getValue() );\r\n\t\t\t\t}\r\n// break;\r\n }\r\n\t\t}\r\n long end = System.currentTimeMillis();\r\n timeCalcVicinity = (end - start) / 1000.0;\r\n\t}", "public ArrayList<Record> near()\n {\n int count = 0;\n ArrayList<Record> closest = new ArrayList<>();\n System.out.println(\"Community Centres that are 5km or less to your location are: \");\n for(Record i: cCentres)\n {\n //latitude and longitude for each centre\n double lat2 = Double.parseDouble(i.getValue(4));\n double lon2 = Double.parseDouble(i.getValue(3));\n ;\n //distance\n double dist = calcDist(lat2, lon2, cCentres);\n if(dist<=5)\n {\n System.out.println(i + \", Distance: \" + dist + \" km\");\n closest.add(i);\n }\n }\n return closest;\n }", "private ArrayList<Vector2i> getBestUsingStd(ArrayList<ArrayList<Vector2i>> trueClusters) {\n\t\tdouble stdBest = Double.MAX_VALUE;\n\t\tint posBest = -1;\n\t\t\n\t\tint idx = 0;\n\t\tfor (ArrayList<Vector2i> group : trueClusters) {\n\t\t\tDescriptiveStatistics ds = new DescriptiveStatistics();\n\t\t\tfor (Vector2i vec : group) {\n\t\t\t\tds.addValue(vec.y);\n\t\t\t}\n\t\t\tdouble std = ds.getStandardDeviation();\n\t\t\tif (std < stdBest) {\n\t\t\t\tstdBest = std;\n\t\t\t\tposBest = idx;\n\t\t\t}\n\t\t\tidx++;\n\t\t}\n\t\treturn trueClusters.get(posBest);\n\t}", "public void pruneWithApriori(double startEpsilon, double epsilonMultiplier, double shrinkFactor, double maxApproximationSize, int numBuckets, int topK, long startMS){\n CB = new CorrelationBounding(HB.data, useEmpiricalBounds, parallel);\r\n HierarchicalBounding.CB = CB; // pass the corrbounding object to the hierarchbounding object to prevent double work\r\n\r\n // get clusters:\r\n long startClustering = System.currentTimeMillis();\r\n System.out.print(\"constructing hierarchical clustering...\");\r\n RecursiveClustering RC = new RecursiveClustering(HB.data, CB, HB.maxLevels, HB.defaultDesiredClusters, HB.useKMeans, HB.breakFirstKLevelsToMoreClusters, HB.clusteringRetries);\r\n RC.fitRecursiveClusters(startEpsilon, epsilonMultiplier);\r\n long stopClustering = System.currentTimeMillis();\r\n System.out.println(\" --> clustering finished, took \" + ((stopClustering-startClustering)/1000) + \" seconds\");\r\n this.allclusters = RC.allClusters;\r\n this.clustersPerLevel = RC.clustersPerLevel;\r\n this.globalClustID = RC.globalClustID;\r\n\r\n CB.initializeBoundsCache(globalClustID, useEmpiricalBounds);\r\n\r\n ArrayList<Cluster> topLevelClusters = this.clustersPerLevel.get(0);\r\n Cluster rootCluster = topLevelClusters.get(0);\r\n this.rootCluster = rootCluster;\r\n\r\n\r\n\r\n // progressive approximation class in order to get results quickly:\r\n ProgressiveApproximation PA = new ProgressiveApproximation(corrThreshold, useEmpiricalBounds, minJump, maxApproximationSize, header, CB);\r\n\r\n\r\n\r\n //multipoles root candidate:\r\n ArrayList<Cluster> firstClusterComb = new ArrayList<>(2);\r\n firstClusterComb.add(rootCluster);// firstClusterComb.add(rootCluster);\r\n// List<ClusterCombination> candidates = new ArrayList<>(1);\r\n// ClusterCombination rootcandidate = new MultipoleClusterCombination(firstClusterComb);\r\n// candidates.add(rootcandidate);\r\n\r\n\r\n\r\n //multipearson root candidate:\r\n// ArrayList<Cluster> rootLHS = new ArrayList<>(1); rootLHS.add(rootCluster);\r\n// ArrayList<Cluster> rootRHS = new ArrayList<>(1); rootRHS.add(rootCluster); //rootRHS.add(rootCluster); rootRHS.add(rootCluster);\r\n// ClusterCombination rootcandidate = new MultiPearsonClusterCombination(rootLHS, rootRHS);\r\n\r\n\r\n\r\n\r\n //progress overview:\r\n System.out.print(\"|\");\r\n for(int i = 0; i<100; i++){\r\n System.out.print(\".\");\r\n }\r\n System.out.print(\"|\");\r\n System.out.println();\r\n\r\n\r\n // level-wise evaluation of the candidates\r\n for(int p=2; p<=maxP; p++){\r\n firstClusterComb.add(rootCluster);\r\n ClusterCombination rootcandidate = new MultipoleClusterCombination(firstClusterComb);\r\n\r\n List<ClusterCombination> candidates = new ArrayList<>(1);\r\n candidates.add(rootcandidate);\r\n\r\n System.out.println(\"---------------start evaluating level: \"+ p + \" at time \" + LocalTime.now() +\". Number of positives so far: \" + this.positiveResultSet.size() +\". Runtime so far: \" + (System.currentTimeMillis() - startMS)/1000);\r\n\r\n Map<Boolean, List<ClusterCombination>> groupedDCCs = evaluateCandidates(candidates, shrinkFactor, maxApproximationSize, parallel);\r\n\r\n if(positiveDCCs.size() > topK){\r\n positiveDCCs = getStream(positiveDCCs, parallel)\r\n .sorted((cc1, cc2) -> Double.compare(cc2.getLB(), cc1.getLB()))\r\n .limit(topK)\r\n .collect(Collectors.toList());\r\n PA.corrThreshold = positiveDCCs.get(positiveDCCs.size()-1).getLB();\r\n corrThreshold = PA.corrThreshold;\r\n }\r\n\r\n\r\n //progressive approximation within this level p:\r\n List<ClusterCombination> approximatedCCs = getStream(groupedDCCs.get(false), parallel).filter(dcc -> dcc.getCriticalShrinkFactor() <= 1).collect(Collectors.toList());\r\n// PA.testApproximationQuality(approximatedCCs, numBuckets, p, parallel);\r\n this.positiveDCCs = PA.ApproximateProgressively(approximatedCCs, numBuckets, positiveDCCs, parallel, topK, startMS);\r\n corrThreshold = PA.corrThreshold; // for topK -> carry over the updated tau to next p\r\n this.positiveResultSet = PostProcessResults.removeDuplicatesAndToString(this.positiveDCCs, header, CB, parallel);\r\n\r\n // get the approximated candidates to generate the next-level candidates from. the advantage is that we get a head-start down the clustering tree and do not have to start from the top\r\n ArrayList<ClusterCombination> DCCs = new ArrayList<>(groupedDCCs.get(false).size() + groupedDCCs.get(true).size());\r\n DCCs.addAll(groupedDCCs.get(false)); DCCs.addAll(groupedDCCs.get(true));\r\n System.out.println(\"tau updated to \" + corrThreshold);\r\n\r\n\r\n\r\n// if(p<maxP){\r\n// System.out.println(\"level \" + p + \" finished at time \"+ LocalTime.now() + \". generating candidates for level \" + (p+1) +\". #DCCs: \" + DCCs.size() +\". positives so far: \" + this.positiveResultSet.size() + \". Runtime so far (s): \" + (System.currentTimeMillis()-startMS)/1000);\r\n//\r\n//\r\n//\r\n// if(DCCs.get(0).isMultipoleCandidate()){ // multipole pattern\r\n//\r\n// candidates = generateCandidates(DCCs, parallel);\r\n//\r\n// }else{ // multiPearson pattern -> make distinction on adding vectors to LHS or RHS. better performance: use HIerarchicalbounding without level generation.\r\n//\r\n//\r\n// candidates = new ArrayList<>();\r\n//\r\n//\r\n//\r\n// // first generate candidates by adding to RHS\r\n// if(parallel){\r\n// DCCs = (ArrayList<ClusterCombination>) DCCs.parallelStream()\r\n// .sorted(this::lexicographicalOrdering)\r\n// .collect(Collectors.toList());\r\n// }else{\r\n// DCCs.sort(this::lexicographicalOrdering);\r\n// }\r\n// List<ClusterCombination> partial = generateCandidates(DCCs, parallel);\r\n// if(partial!= null){\r\n// candidates.addAll(partial);\r\n// }\r\n//\r\n// //now by adding to LHS: (hack by swapping the LHS and RHS and calling the same methods\r\n// //note that we do not need to swap those in which the size of the LHS and RHS is the same\r\n// ArrayList<ClusterCombination> swappedDCCs;\r\n// if(parallel){\r\n// swappedDCCs = (ArrayList<ClusterCombination>) DCCs.parallelStream()\r\n// .filter(cc -> cc.getLHS().size() != cc.getRHS().size()) // ignore those where lhs and rhs are of the same size\r\n// .collect(Collectors.toList());\r\n// swappedDCCs.parallelStream()\r\n// .forEach(cc -> ((MultiPearsonClusterCombination) cc).swapLeftRightSide());\r\n//\r\n// swappedDCCs = (ArrayList<ClusterCombination>) swappedDCCs.parallelStream()\r\n// .sorted(this::lexicographicalOrdering)\r\n// .collect(Collectors.toList());\r\n// }else{\r\n// swappedDCCs = (ArrayList<ClusterCombination>) DCCs.stream()\r\n// .filter(cc -> cc.getLHS().size() != cc.getRHS().size()) // ignore those where lhs and rhs are of the same size\r\n// .collect(Collectors.toList());\r\n//\r\n// swappedDCCs.forEach(cc -> ((MultiPearsonClusterCombination) cc).swapLeftRightSide());\r\n// swappedDCCs.sort(this::lexicographicalOrdering);\r\n// }\r\n//\r\n// partial = generateCandidates(swappedDCCs, parallel);\r\n// if(partial!= null){\r\n// candidates.addAll(partial);\r\n// }\r\n//\r\n//\r\n// }\r\n//\r\n//\r\n// }\r\n }\r\n\r\n }", "public ArrayList<Particle> getNearParticles(Complex p, int range)\n\t{\n\t\tint cellX = (int)Math.floor(p.re() / meshWidth);\n\t\tint cellY = (int)Math.floor(p.im() / meshWidth);\n\t\treturn proximityList[cellX][cellY];\n\t}", "private static Point getNearest(Collection<Point> centers, Point p) {\n\t\tdouble min = 0;\n\t\tPoint minPoint = null;\n\t\tfor(Point c : centers){\n\t\t\tif(minPoint == null || c.distance(p) < min){\n\t\t\t\tmin = c.distance(p);\n\t\t\t\tminPoint = c;\n\t\t\t}\n\t\t}\n\t\treturn minPoint;\n\t}", "private ArrayList<Point> getNeighbors(Point p) {\n\t\tArrayList<Point> arr = new ArrayList<Point>();\n\t\tfor (int y = -1; y <= 1; y++) {\n\t\t\tfor (int x = -1; x <= 1; x++) {\n\t\t\t\tPoint npoint = new Point( p.x + x, p.y + y);\n\t\t\t\tint sind = spacesContains(npoint);\n\t\t\t\tif ( p.compareTo(npoint) != 0 && sind >= 0 ) { \n\t\t\t\t\tarr.add( spaces.get(sind) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn arr;\n\t}", "private void cluster() {\n\t\tint index = 0;\n\t\tfor (DataObject obj : objects) {\n\t\t\tindex = getNearestCenterIndex(obj, centers);\n\t\t\tclusters.get(index).add(obj);\n\t\t}\n\t}", "public Clustering<V> compute() {\n if (graph.vertexSet().isEmpty()) {\n return new ClusteringImpl<>(Collections.emptyList());\n }\n\n matrix = Matrices.buildAdjacencyMatrix(graph, mapping, true);\n\n normalize();\n\n for (var i = 0; i < iterations; i++) {\n final var previous = matrix.copy();\n\n expand();\n inflate();\n normalize();\n\n if (matrix.equals(previous)) break;\n }\n\n // matrix can contain identical clusters of elements which are less than one\n final var clusters = new HashSet<Set<V>>(matrix.getRowDimension());\n\n for (var i = 0; i < matrix.getRowDimension(); i++) {\n final var cluster = new HashSet<V>();\n\n for (var j = 0; j < matrix.getColumnDimension(); j++) {\n if (matrix.getEntry(i, j) > 0) cluster.add(mapping.getIndexList().get(j));\n }\n\n if (!cluster.isEmpty()) clusters.add(cluster);\n }\n\n return new ClusteringImpl<>(new ArrayList<>(clusters));\n }", "public static void valorarCentrosDistPromedio(Instancia instancia) {\n\t\tfor(CentroDistribucion c : instancia.getCentros())\n\t\t\tvalorarCentroDistPromedio(c, instancia.getClientes());\n\t}", "KDNode(Datum[] datalist) throws Exception{\r\n\r\n\t\t\t/*\r\n\t\t\t * This method takes in an array of Datum and returns \r\n\t\t\t * the calling KDNode object as the root of a sub-tree containing \r\n\t\t\t * the above fields.\r\n\t\t\t */\r\n\r\n\t\t\t// ADD YOUR CODE BELOW HERE\t\t\t\r\n\t\t\t\r\n\t\t\tif(datalist.length == 1) {\r\n\t\t\t\t\r\n\t\t\t\tleaf = true;\r\n\t\t\t\tleafDatum = datalist[0];\r\n\t\t\t\tlowChild = null;\r\n\t\t\t\thighChild = null;\r\n\t\t\t\tnumLeaves ++;\r\n\t\t\t\t\r\n\t\t\t\treturn;\r\n\t\t\t\r\n\t\t\t}else {\r\n\t\r\n\t\t\t\tint dim = 0;\r\n\t\t\t\tint range = 0;\r\n\t\t\t\tint max = 0;\r\n\t\t\t\tint min = 0;\r\n\t\t\t\tint Max = 0;\r\n\t\t\t\tint Min = 0;\r\n\t\t\t\tfor(int i = 0; i < k; i++) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tmax = datalist[0].x[i];\r\n\t\t\t\t\tmin = datalist[0].x[i];\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor(int j = 0; j < datalist.length; j++) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(datalist[j].x[i] >= max) {\r\n\t\t\t\t\t\t\tmax = datalist[j].x[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(datalist[j].x[i] <= min) {\r\n\t\t\t\t\t\t\tmin = datalist[j].x[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(max - min >= range) {\r\n\t\t\t\t\t\trange = max - min;\r\n\t\t\t\t\t\tMax = max;\r\n\t\t\t\t\t\tMin = min;\r\n\t\t\t\t\t\tdim = i;\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(range == 0) {\r\n\t\t\t\t\tleaf = true;\r\n\t\t\t\t\tleafDatum = datalist[0];\r\n\t\t\t\t\tlowChild = null;\r\n\t\t\t\t\thighChild = null;\r\n\t\t\t\t\t\r\n\t\t\t\t\tnumLeaves ++;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\t//if greatest range is zero, all points are duplicates\r\n\t\t\t\t\r\n\t\t\t\tsplitDim = dim;\r\n\t\t\t\tsplitValue = (double)(Max + Min) / 2.0;\t//get the split dim and value\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tArrayList<Datum> lList = new ArrayList<Datum>();\r\n\t\t\t\tint numL = 0;\r\n\t\t\t\tArrayList<Datum> hList = new ArrayList<Datum>();\r\n\t\t\t\tint numH = 0;\r\n\t\t\t\r\n\t\t\t\tfor(int i = 0; i < datalist.length; i ++) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(datalist[i].x[splitDim] <= splitValue) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tlList.add(datalist[i]);\r\n\t\t\t\t\t\t\tnumL ++;\r\n\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\t\r\n\t\t\t\t\t\thList.add(datalist[i]);\r\n\t\t\t\t\t\tnumH ++;\r\n\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t//get the children list without duplicate but with null in the back\r\n\t\t\t\t\t//Don't check duplicates in children Nodes!!!\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tlowChild = new KDNode( lList.toArray(new Datum[numL]) );\r\n\t\t\t\thighChild = new KDNode( hList.toArray(new Datum[numH]) );\t//create the children nodes\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\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t// ADD YOUR CODE ABOVE HERE\r\n\r\n\t\t}", "Collection<T> getMinElements();", "public ArrayList<ArrayList<double[]>> getClusterSet(){\n\t\treturn clusterSet;\n\t}", "public ReducedCellInfo[] getEntries(double delta)\r\n {\r\n\r\n ReducedCellInfo compareTo = DataBase[0];\r\n\r\n Vector< ReducedCellInfo > V = new Vector< ReducedCellInfo >( );\r\n\r\n for( int i = 1 ; i < 45 ; i++ )\r\n\r\n if ( DataBase[i].distance( compareTo ) < delta )\r\n V.addElement( DataBase[i] );\r\n\r\n return V.toArray( new ReducedCellInfo[ 0 ] );\r\n }", "public Ms2Cluster trimByDotP(Map<Ms2Pointer, MsnSpectrum> spectra, Tolerance tol, double min_dp)\n {\n // quit if the master or input are not present!\n if (mMaster==null || !Tools.isSet(spectra)) return null;\n\n // setup the master first\n List<Peak> master = Spectra.toListOfPeaks(mMaster);\n Iterator<Ms2Pointer> itr = mCandidates.iterator();\n while (itr.hasNext())\n {\n MsnSpectrum scan = spectra.get(itr.next());\n if (scan!=null && Similarity.dp(master, Spectra.toListOfPeaks(scan), tol, true, true)<min_dp) itr.remove();\n }\n\n return this;\n }", "public SME_Cluster[] getClusters();", "public static void main(String[] args) {\n Point p1 = new Point(new double[]{0,0}, 0);\n Point p2 = new Point(new double[]{0,10}, 10);\n Point p3 = new Point(new double[]{0,12}, 12);\n ArrayList<Point> r = new ArrayList<>();\n r.add(p1); r.add(p2); r.add(p3);\n \n Point p4 = new Point(new double[]{2,0}, 0);\n Point p5 = new Point(new double[]{2,7}, 7);\n Point p6 = new Point(new double[]{2,10}, 10);\n ArrayList<Point> s = new ArrayList<>();\n s.add(p4); s.add(p5); s.add(p6);\n \n double dissim = getDISSIM(r, s, 0, 10);\n \n System.out.println(\"DISSIM: \" + dissim);\n }", "public void createClusters() {\n\t\t/*\n\t\t * double simAvg = documentDao.getSimilarity(avg); double simMax =\n\t\t * documentDao.getSimilarity(max); double simMin =\n\t\t * documentDao.getSimilarity(min);\n\t\t */\n\n\t\t// initClusters();\n\n\t\tList<Document> docList = documentDao.getDocumentListOrderBySimilarity();\n\t\tList<Cluster> clusterList = clusterDao.getClusterList();\n\n\t\tint i = 0;\n\t\tCluster cluster = clusterList.get(i);\n\t\tfor (Document document : docList) {\n\t\t\twhile (document.getSimilarity() < cluster.getLow()) {\n\t\t\t\tcluster = clusterList.get(++i);\n\t\t\t}\n\t\t\tif (document.getSimilarity() < cluster.getHigh() && document.getSimilarity() >= cluster.getLow()) {\n\t\t\t\tdocument.setClusterId(cluster.getId());\n\t\t\t\tdocumentDao.insertDocument(document);\n\t\t\t}\n\t\t}\n\n\t}", "public List<Neighbor> getNearNeighborsInSample(double[] point) {\n return getNearNeighborsInSample(point, Double.POSITIVE_INFINITY);\n }", "public Map<double[], Integer> kmeans(int distance, Map<Integer, double[]> centroids, int k) {\n Map<double[], Integer> clusters = new HashMap<>();\n int k1 = 0;\n double dist = 0.0;\n for (double[] x : features) {\n double minimum = 999999.0;\n for (int j = 0; j < k; j++) {\n if (distance == 1) {\n dist = Distance.eucledianDistance(centroids.get(j), x);\n } else if (distance == 2) {\n dist = Distance.manhattanDistance(centroids.get(j), x);\n }\n if (dist < minimum) {\n minimum = dist;\n k1 = j;\n }\n\n }\n clusters.put(x, k1);\n }\n\n return clusters;\n }", "private List<Integer> getCentList(DiscreteAttribute attr, ClusterSet data) {\n\t\treturn ChartF.getCentDisValues(data, attr);\n\t}", "public MedianFinderElegant() {\n minHeap = new PriorityQueue<>();\n maxHeap = new PriorityQueue<>((v1, v2) -> v2 - v1);\n }", "public IntArrayList getNeighbourCluster(int index) {\n\n /**List for storing the indexes of the cells in the cluster containing\n * the given index */\n cellCluster = new IntArrayList();\n\n /**The label of the cluster */\n int clusterLabel = (int) labelledVolume.value(index);\n\n /**Clear the linked list for the use of this algorithm */\n voxelStack.clear();\n voxelStack.push(imageMask.indexToGrid(index));\n\n /**Use iteration and recursion to get all the cells\n * within the cluster */\n while (voxelStack.size() > 0) {\n Index3D center = voxelStack.pop();\n getNeighbouringCells(center, center, clusterLabel);\n }\n return cellCluster;\n }", "NeoEpsilonFactory getNeoEpsilonFactory();", "public Iterator<Example> getNeighbors(Instance instance){\n\t\tSet<Example> set=new HashSet<Example>();\n\t\tfor(Iterator<Feature> i=instance.featureIterator();i.hasNext();){\n\t\t\tFeature f=i.next();\n\t\t\tfor(Iterator<Example> j=featureIndex(f).iterator();j.hasNext();){\n\t\t\t\tset.add(j.next());\n\t\t\t}\n\t\t}\n\t\treturn set.iterator();\n\t}", "private Map<double[], Set<String>> initiateClusters(int k, Set<String> restaurantIDs) {\n // centroids[0] is lattitude and centroids[1] is longitude for a centroid\n // Map assigns restaurants to a specific centroid\n Map<double[], Set<String>> restaurantClusters = new HashMap<double[], Set<String>>();\n\n // Find the min and max latitudes and longitudes\n double minLat = Double.MAX_VALUE;\n double minLon = Double.MAX_VALUE;\n double maxLat = -Double.MAX_VALUE;\n double maxLon = -Double.MAX_VALUE;\n\n for (String rID : restaurantIDs) {\n double lat = this.restaurantMap.get(rID).getLatitude();\n double lon = this.restaurantMap.get(rID).getLongitude();\n if (lat < minLat) {\n minLat = lat;\n }\n if (lat > maxLat) {\n maxLat = lat;\n }\n if (lon < minLon) {\n minLon = lon;\n }\n if (lon > maxLon) {\n maxLon = lon;\n }\n }\n\n // Create a number of centroids equal to k\n for (int i = 0; i < k; i++) {\n // generate random centroid based on min and max latitudes\n // and longitudes, with (currently) no assigned restaurants\n HashSet<String> emptySet = new HashSet<String>();\n restaurantClusters.put(this.generateRandomCentroid(minLat, maxLat, minLon, maxLon), emptySet);\n }\n\n // Assign each restaurant to its closest centroid\n\n for (String rID : restaurantIDs) {\n\n double[] newCentroid = null;\n double minDist = Double.MAX_VALUE;\n\n for (double[] centroid : restaurantClusters.keySet()) {\n double distance = this.computeDistance(centroid, this.restaurantMap.get(rID));\n if (distance < minDist) {\n newCentroid = centroid;\n minDist = distance;\n }\n }\n restaurantClusters.get(newCentroid).add(rID);\n }\n return restaurantClusters;\n }", "public abstract List<GroundAtom> getAllGroundAtoms(StandardPredicate predicate, List<Short> partitions);", "public Point getFurthermost(){\n\t\t\tdouble distance;\n\t\t\tdouble distanceMin = Double.MAX_VALUE;\n\t\t\tPoint centroid = centroid();\n\t\t\tPoint closest = new Point();\n\t\t\tfor(Point p : clusterPointsList){\n\t\t\t\tdistance = p.dist(centroid);\t\t\t\n\t\t\t\tif(distance < distanceMin){\n\t\t\t\t\tdistanceMin = distance;\n\t\t\t\t\tclosest = p;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn closest;\n\t\t}", "Neighbors() {\n HashMap<Integer, Double> neighbors = new HashMap<>();\n }", "@Test\n\tpublic void testExtractMin() {\n\t\tHeap heap = new Heap(testArrayList.length);\n\t\tdouble[] expected = new double[] { 5, 7, 24, 36, 15, 48, 32, 47, 93, 27, 38, 70, 53, 33, 93 };\n\t\theap.build(testArrayList);\n\t\tassertEquals(3, heap.extractMin().key);\n\t\tassertArrayEquals(expected, heap.getKeyArray());\n\t\tassertEquals(14, heap.getSize());\n\t}", "public static int getOptimalK(Dataset<Row> vectorData) {\n\t\tList<Integer> K = new ArrayList<Integer>();\n\t\tList<Double> computeCost = new ArrayList<Double>();\n\n\t\tfor (int i = 2; i < 10; i++) {\n\n\t\t\tKMeans kMeansForTops = new KMeans().setK(i).setSeed(1L);\n\t\t\tlong start = System.currentTimeMillis();\n\t\t\tKMeansModel kMeansModel = kMeansForTops.fit(vectorData);\n\t\t\tSystem.out.println(\"Time to FIT \" + (System.currentTimeMillis() - start) / 1000);\n\t\t\tdouble cost = kMeansModel.computeCost(vectorData); // WCSS\n\t\t\t// KMeansSummary\n\t\t\tK.add(i);\n\t\t\tcomputeCost.add(cost);\n\t\t\t// System.out.println(\"================ Compite cost for K == \" + i + \" is == \"\n\t\t\t// + cost);\n\n\t\t\tDataset<Row> kMeansPredictions = kMeansModel.transform(vectorData);\n\n\t\t\tfor (int j = 0; j < i; j++) {\n\n\t\t\t\t// System.out.println(\"====================== Running it for \" + j + \"th cluster\n\t\t\t\t// when the K is \" + i);\n\t\t\t\t// System.out.println(\"====================== Range for the cluster count \" + i\n\t\t\t\t// + \" ===================\");\n\t\t\t\t// kMeansPredictions.where(kMeansPredictions.col(\"prediction\").equalTo(j)).agg(min(\"features\"),\n\t\t\t\t// max(\"features\")).show();\n\n\t\t\t}\n\n\t\t\t// kMeansPredictions.agg(min(\"features\"), max(\"features\")).show();\n\t\t\t// System.out.println(\"====================== Calculating Silhouette\n\t\t\t// ===================\");\n\n\t\t\t// Evaluate clustering by computing Silhouette score\n\t\t\tClusteringEvaluator topsEvaluator = new ClusteringEvaluator();\n\n\t\t\tdouble TopsSilhouette = topsEvaluator.evaluate(kMeansPredictions);\n\n\t\t\t// System.out.println(\"================ Silhouette score for K == \" + i + \" is\n\t\t\t// == \" + TopsSilhouette);\n\n\t\t}\n\n\t\tPlot plt = Plot.create();\n\t\t// plt.plot().add(K, computeCost).label(\"MyLabel\").linestyle(\"bx-\");\n\t\t// plt.plot().\n\n\t\tSystem.out.println(\"K List \" + K);\n\t\tSystem.out.println(\"Cost List \" + computeCost);\n\t\tplt.plot().add(K, computeCost).label(\"Elbow\").linestyle(\"--\");\n\t\tplt.xlabel(\"K\");\n\t\tplt.ylabel(\"Cost\");\n\t\tplt.title(\"Compute Cost for K-Means !\");\n\t\tplt.legend();\n\t\ttry {\n\t\t\tplt.show();\n\t\t} catch (IOException | PythonExecutionException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn 0;\n\n\t}", "public VirtualDataSet[] partitionByNumericAttribute(int attributeIndex, int valueIndex) {\n\t\t// WRITE YOUR CODE HERE!\n\n\t\t if(attributes[attributeIndex].getType()==AttributeType.NOMINAL){ \t\t\t\t\t\t\t// avoid passing through nominal value to current method\n return null; \n }\n\t\t\tVirtualDataSet [] partitions = new VirtualDataSet[2]; \t\t\t\t\t\t\t\t\t// creates two split path \n\n\t\t\tdouble split = Double.parseDouble(getValueAt(valueIndex , attributeIndex));\t\t\t// determine the middle number in order to split \n\t\t\t\n\t\t\tLinkedList<Integer> rowsLess = new LinkedList<Integer> (); \t\t\t\t\t\t\t// using linkedlist to do collection of split rows that less than valueIndex value\n\t\t\t\n\t\t\tLinkedList<Integer> rowsMore = new LinkedList<Integer> ();\t\t\t\t\t\t\t\t// using linkedlist to do collection of split rows that less than valueIndex value\n\t\t\t\n\t\t\tint countLess = 0;\n\t\t\tint countMore = 0; \n\n\t\t\tString []arrayOfNums = attributes[attributeIndex].getValues();\n\n\t\t\tfor(int j = 0; j < source.numRows; j++){ \n\t\t\t\t\n\t\t\t\tif(Double.parseDouble(getValueAt(j,attributeIndex)) <= split){ \t\t\t\t// transform from string to integer in order to compare the number smaller than middle number\n\t\t\t\t\t\n\t\t\t\t\trowsLess.add(j);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// add rows that correspond with the current attribute of spliting \n\t\t\t\t\tcountLess++;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// determine the size of partition rows array \n\t\t\t\t}else if(Double.parseDouble(getValueAt(j,attributeIndex)) > split){\t\t\t// transform from string to integer in order to compare the number bigger than middle number\n\t\t\t\t\t\n\t\t\t\t\trowsMore.add(j); \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// add rows that correspond with the current attribute of spliting \n\t\t\t\t\tcountMore++;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// determine the size of partition rows array \n\t\t\t\t}\n\t\t\t}\n\n\t\t\tint [] partitionRowsLess = new int [countLess]; \t\t\t\t\t\t\t\t\t\t// the collection of rows represents all number that smaller than middle number\n\t\t\tint [] partitionRowsMore = new int [countMore]; \t\t\t\t\t\t\t\t\t\t// the collection of rows represents all number that bigger than middle number\n\t\t\tfor(int k = 0; k < countLess; k++){\n\t\t\t\tpartitionRowsLess[k] = rowsLess.poll(); \t\t\t\t\t\t\t\t\t\t\t// transform from linkedlist to array \n\t\t\t}\n\t\t\tfor(int k = 0; k < countMore; k++){\n\t\t\t\tpartitionRowsMore[k] = rowsMore.poll(); \t\t\t\t\t\t\t\t\t\t\t// transform from linkedlist to array \n\t\t\t}\n\t\t\t\n\t\t\tpartitions[0] = new VirtualDataSet(source,partitionRowsLess, attributes); \t\t\t\t// send partition to VirtualDataSet constructor \n\t\t\tpartitions[1] = new VirtualDataSet(source,partitionRowsMore, attributes); \n\t\t\t\n\n\n\t\t\treturn partitions;\n\t\t\n\t}", "@Override\r\n public void run() {\n int nchannels = parentFeature.getNchannels();\r\n\r\n ArrayList<Feature> set1, set2;\r\n String nameSet1, nameSet2;\r\n double dThresh = threshdist;\r\n double[] getMeanMedStdSet1, histo;\r\n String setPairNameCentroidNND, setPairNameEdgeNND;\r\n\r\n // compute the histograms \r\n computeHistogramBins();\r\n\r\n // first compute the distances between the features in each of the channels. \r\n for (int c1 = 0; c1 < nchannels; c1++) {\r\n // get the features we are going to compute the distances between. \r\n set1 = parentFeature.getFeatures(c1, featureName1);\r\n for (int c2 = 0; c2 < nchannels; c2++) {\r\n if (c1 == c2) {\r\n continue;\r\n }\r\n // the set we will compute the distance from. \r\n set2 = parentFeature.getFeatures(c2, featureName2);\r\n // The names used as keys within the Features numerical property may for the channel to channel distance. \r\n// nameSet1 = (C_EXT + (c1 + 1));\r\n// nameSet2 = (C_EXT + (c2 + 1));\r\n nameSet1 = (\"\" + (c1 + 1));\r\n nameSet2 = (\"\" + (c2 + 1));\r\n setPairNameCentroidNND = D_NN_CENT + C_EXT + \"_\" + nameSet1 + \"-\" + nameSet2;\r\n setPairNameEdgeNND = D_NN_EDGE + C_EXT + \"_\" + nameSet1 + \"-\" + nameSet2;\r\n\r\n // Compute the nearest neighbour distances between the sets. \r\n computePairedDistances(set1, set2, nameSet1, nameSet2);\r\n\r\n // some global NND stats \r\n getMeanMedStdSet1 = getMeanMedStd(set1, setPairNameCentroidNND, dThresh);\r\n parentFeature.addNumericProperty(setPairNameCentroidNND + MEAN_EXT, getMeanMedStdSet1[0]);\r\n parentFeature.addNumericProperty(setPairNameCentroidNND + MED_EXT, getMeanMedStdSet1[1]);\r\n parentFeature.addNumericProperty(setPairNameCentroidNND + STD_EXT, getMeanMedStdSet1[2]);\r\n parentFeature.addNumericProperty(setPairNameCentroidNND + FRAC_NN, getMeanMedStdSet1[3]);\r\n\r\n // now compute the histogram of the nearest neighbours\r\n histo = computeHistrogram(set1, setPairNameCentroidNND);\r\n\r\n // save the histogram as well\r\n parentFeature.addObjectProperty(setPairNameCentroidNND + HIST, Arrays.copyOf(histo, histoBins.length));\r\n parentFeature.addObjectProperty(setPairNameCentroidNND + HISTBINS, Arrays.copyOf(histoBins, histoBins.length));\r\n\r\n if (doPFA) {\r\n // proximal feature analysis. \r\n HashMap<String, Double> pfa;\r\n pfa = doPFAsetPair(set1, setPairNameCentroidNND, pfaFeatureNames); \r\n // store in the parent feature for saving later. \r\n parentFeature.addObjectProperty(setPairNameCentroidNND + \"_\" + PFA_EXT, pfa);\r\n //\r\n if(edgeDistance){\r\n // store in the parent feature for saving later. \r\n parentFeature.addObjectProperty(setPairNameEdgeNND + \"_\" + PFA_EXT, pfa);\r\n }\r\n }\r\n\r\n }\r\n }\r\n\r\n // stop here \r\n if (nRandomisations == 0) {\r\n return;\r\n }\r\n\r\n //System.out.println(\" started randomisations \");\r\n HashMap<String, ArrayList<Double>> statMap = new HashMap<String, ArrayList<Double>>();\r\n HashMap<String, double[][]> histogramValuesMap = new HashMap<String, double[][]>();\r\n\r\n long rand_seed;\r\n // Perform the same analysis but randomise the features of each set. \r\n for (int i = 0; i < nRandomisations; i++) {\r\n // get all of the feature sets for each channel. \r\n for (int c1 = 0; c1 < nchannels; c1++) {\r\n // the set we will keep fixed. \r\n set1 = FeatureOps.duplicateFeatureSet(parentFeature.getFeatures(c1, featureName1));\r\n // compute distance to features in the other sets. \r\n for (int c2 = 0; c2 < nchannels; c2++) {\r\n if (c1 == c2) {\r\n continue;\r\n }\r\n // random seed number for the random number generation. \r\n rand_seed = System.currentTimeMillis();\r\n set2 = FeatureOps.randomizeFeaturePositions(parentFeature, parentFeature.getFeatures(c2, featureName2), rand_seed);\r\n\r\n // The names used as keys within the Features numerical property may for the channel to channel distance. \r\n// nameSet1 = (C_EXT + (c1 + 1));\r\n// nameSet2 = (C_EXT + (c2 + 1));\r\n nameSet1 = (\"\" + (c1 + 1));\r\n nameSet2 = (\"\" + (c2 + 1));\r\n setPairNameCentroidNND = D_NN_CENT + C_EXT + \"_\" + nameSet1 + \"-\" + nameSet2;\r\n setPairNameEdgeNND = D_NN_EDGE + C_EXT + \"_\" + nameSet1 + \"-\" + nameSet2;\r\n \r\n // compute the distance between the \r\n computePairedDistances(set1, set2, nameSet1, nameSet2);\r\n\r\n // now compute the histogram of the nearest neighbours\r\n histo = computeHistrogram(set1, setPairNameCentroidNND);\r\n // save the histogram for this current iteration. \r\n addHistogram2map(histogramValuesMap, histo, setPairNameCentroidNND, i);\r\n\r\n // Do some NND global stats\r\n getMeanMedStdSet1 = getMeanMedStd(set1, setPairNameCentroidNND, dThresh);\r\n addValueToStatMap(statMap, setPairNameCentroidNND + MEAN_EXT, getMeanMedStdSet1[0]);\r\n addValueToStatMap(statMap, setPairNameCentroidNND + MED_EXT, getMeanMedStdSet1[1]);\r\n addValueToStatMap(statMap, setPairNameCentroidNND + STD_EXT, getMeanMedStdSet1[2]);\r\n addValueToStatMap(statMap, setPairNameCentroidNND + FRAC_NN, getMeanMedStdSet1[3]);\r\n }\r\n }\r\n }\r\n\r\n // now compute some stats for the randomised values\r\n Set<String> keys = statMap.keySet();\r\n double meanMean, pMean;\r\n double[] values;\r\n ArrayList<Double> vs;\r\n\r\n //System.out.println(\" sitsize \" + keys.size());\r\n for (String s : keys) {\r\n // walues for this \r\n vs = statMap.get(s);\r\n // extract the values \r\n values = List2Prims.doubleFromDouble(vs);\r\n meanMean = StatUtils.mean(values);\r\n pMean = TestUtils.tTest(parentFeature.getNumericPropertyValue(s), values);\r\n // store the values\r\n parentFeature.addNumericProperty(s + RAND_EXT, meanMean);\r\n parentFeature.addNumericProperty(s + RAND_EXT + PV, pMean);\r\n }\r\n\r\n // Compute the mean and standard deviation of the randomised histograms\r\n // and save in the parent features object map for saving later on. \r\n Set<String> histoKeys = histogramValuesMap.keySet();\r\n double[][] binsMeanStdevs;\r\n for (String s : histoKeys) {\r\n // histograms for this\r\n double[][] histos = histogramValuesMap.get(s);\r\n binsMeanStdevs = computeMeanAndStdevHistogram(histos);\r\n // save the values \r\n parentFeature.addObjectProperty(s + HIST + MEAN_EXT + RAND_EXT, Arrays.copyOf(binsMeanStdevs[1], binsMeanStdevs[1].length));\r\n parentFeature.addObjectProperty(s + HIST + STD_EXT + RAND_EXT, Arrays.copyOf(binsMeanStdevs[2], binsMeanStdevs[2].length));\r\n }\r\n\r\n }", "public static List<Partition> partition(PointSet points, int m) {\n\t\tPartition A = new Partition();\n\t\tint nFeatures = points.dimension();\n\t\tif(m > points.size())\n\t\t\tthrow new RuntimeException(\"Not enough points to make \" + m + \" partitions\");\n\t\tfor(Point p : points) {\n\t\t\tA.add(p);\n\t\t}\n\t\t\n\t\tList<Partition> S = new ArrayList<>();\n\t\tS.add(A);\n\t\tcalculateDissimilarity(A, nFeatures);\n\t\tint i = 1;\n\t\twhile(i < m) {\n\t\t\tint j = 0;\n\t\t\tfor(int k = 1; k < S.size(); k++)\n\t\t\t\tif(S.get(k).dissimilarity > S.get(j).dissimilarity)\n\t\t\t\t\tj = k;\n\t\t\tPartition Aj = S.get(j);\n\t\t\tPartition Aj1 = new Partition();\n\t\t\tPartition Aj2 = new Partition();\n\t\t\t//partition\n\t\t\tfor(Point p : Aj) {\n\t\t\t\tif(p.feature(Aj.pj) <= Aj.apj + Aj.dissimilarity/2)\n\t\t\t\t\tAj1.add(p);\n\t\t\t\telse\n\t\t\t\t\tAj2.add(p);\n\t\t\t}\n\t\t\tcalculateDissimilarity(Aj1, nFeatures);\n\t\t\tcalculateDissimilarity(Aj2, nFeatures);\n\t\t\tS.remove(Aj);\n\t\t\tS.add(Aj1);\n\t\t\tS.add(Aj2);\n\t\t\ti++;\n\t\t}\n\t\treturn S;\n\t}", "public static double purityFromClusters(ArrayList<HashSet<Integer>> clusters,\n ArrayList<ImageSegmentNode> nodes) {\n int[] majorities = new int[clusters.size()];\n\n for (int i = 0; i < clusters.size(); i++) {\n HashSet<Integer> cluster = clusters.get(i);\n\n ArrayList<Integer> frequencies =\n new ArrayList<>(Collections.nCopies(ImageSegmentNode.SegmentClass.values().length, 0));\n\n for (Integer nodeIndex : cluster) {\n ImageSegmentNode node = nodes.get(nodeIndex);\n frequencies.set(node.getSegmentClass().ordinal(),\n frequencies.get(node.getSegmentClass().ordinal()) + 1);\n }\n majorities[i] = Collections.max(frequencies);\n }\n\n return (double) IntStream.of(majorities).sum() / nodes.size();\n }", "public Cluster[] getClusters () {\n if (clusters != null) {\n return clusters;\n }\n \n try {\n List sort = org.openide.util.Utilities.topologicalSort (allPages.keySet (), deps);\n \n // ok, no cycles in between pages\n clusters = new Cluster[sort.size ()];\n for (int i = 0; i < clusters.length; i++) {\n clusters[i] = new Cluster (Collections.singleton (findPage ((String)sort.get (i))));\n }\n } catch (org.openide.util.TopologicalSortException ex) {\n // ok, there are cycles\n \n Set[] sets = ex.topologicalSets();\n clusters = new Cluster[sets.length];\n for (int i = 0; i < clusters.length; i++) {\n Set s = new TreeSet ();\n Iterator it = sets[i].iterator();\n while (it.hasNext ()) {\n String name = (String)it.next ();\n Page p = findPage (name);\n if (p != null) {\n s.add (p);\n }\n }\n clusters[i] = new Cluster (s);\n }\n }\n \n // references <Page -> Cluster>\n refs = new HashMap ();\n for (int i = 0; i < clusters.length; i++) {\n java.util.Iterator it = clusters[i].getPages ().iterator ();\n while (it.hasNext()) {\n Page p = (Page)it.next ();\n refs.put (p, clusters[i]);\n }\n }\n \n for (int i = 0; i < clusters.length; i++) {\n Set references = new HashSet ();\n java.util.Iterator it = clusters[i].getPages ().iterator ();\n while (it.hasNext()) {\n Page contained = (Page)it.next ();\n Collection c = (Collection)deps.get (contained.getFileName());\n if (c != null) {\n Iterator d = c.iterator();\n while (d.hasNext()) {\n String pageName = (String)d.next ();\n references.add (refs.get (findPage (pageName)));\n }\n }\n }\n // prevent self references\n references.remove (clusters[i]);\n clusters[i].references = (Cluster[])references.toArray (new Cluster[0]);\n }\n \n return clusters;\n }", "private ArrayList<ArrayList<Vector2i>> identifyClustersByGreedy(LinkedList<ArrayList<PositionAndColor>> cluster, int numOfColors, int ignoreSize) {\n\t\tArrayList<ArrayList<Vector2i>> bestMapping = new ArrayList<ArrayList<Vector2i>>();\n\t\tint activeClu = 0;\n\t\tfor (ArrayList<PositionAndColor> c : cluster) {\n\t\t\tboolean[] added = new boolean[cluster.size() + 1];\n\t\t\tArrayList<Vector2i> tempMapped = new ArrayList<Vector2i>();\n\t\t\tfor (int idx = 0; idx < numOfColors; idx++) {\n\t\t\t\tint posBest = -1;\n\t\t\t\tint diffBest = Integer.MAX_VALUE;\n\t\t\t\tint sizeBest = 0;\n\t\t\t\tint position = 0;\n\t\t\t\tfor (int innerIdx = 0; innerIdx < cluster.size(); innerIdx++) {\n\t\t\t\t\tif (innerIdx != activeClu && cluster.get(innerIdx).size() > ignoreSize)\n\t\t\t\t\t\tif (Math.abs(cluster.get(innerIdx).size() - c.size()) < diffBest && added[position] == false) {\n\t\t\t\t\t\t\tposBest = position;\n\t\t\t\t\t\t\tdiffBest = Math.abs(cluster.get(innerIdx).size() - c.size());\n\t\t\t\t\t\t\tsizeBest = cluster.get(innerIdx).size();\n\t\t\t\t\t\t}\n\t\t\t\t\tposition++;\n\t\t\t\t}\n\t\t\t\tif (posBest != -1) {\n\t\t\t\t\ttempMapped.add(new Vector2i(posBest, sizeBest));\n\t\t\t\t\tadded[posBest] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbestMapping.add(tempMapped);\n\t\t\tactiveClu++;\n\t\t}\n\t\treturn bestMapping;\n\t}", "private static void calculateDissimilarity(Partition data, int nFeatures) {\n\t\t\n\t\tdouble[] a = new double[nFeatures];\n\t\tdouble[] b = new double[nFeatures];\n\t\tdouble[] delta = new double[nFeatures];\n\t\t\n\t\tfor(int j = 0; j < nFeatures; j++) {\n\t\t\ta[j] = Double.MAX_VALUE;\n\t\t\tb[j] = Double.MIN_VALUE;\n\t\t\tfor(Point p : data) {\n\t\t\t\tif(p.feature(j) < a[j])\n\t\t\t\t\ta[j] = p.feature(j);\n\t\t\t\tif(p.feature(j) > b[j])\n\t\t\t\t\tb[j] = p.feature(j);\n\t\t\t}\n\t\t\tdelta[j] = b[j] - a[j];\n\t\t}\n\t\t\n\t\tint pj = 0;\n\t\tfor(int j = 1; j < nFeatures; j++) {\n\t\t\tif(delta[j] > delta[pj])\n\t\t\t\tpj = j;\n\t\t}\n\t\t\n\t\tdata.apj = a[pj];\n\t\tdata.pj = pj;\n\t\tdata.dissimilarity = delta[pj];\n\t}", "public static ArrayList<GraphNode> getClosestGraphNodesWithPredicate(\n @NotNull GraphNode startNode,\n @NotNull Vector3D position,\n @NotNull Predicate<GraphNode> predicate,\n int n\n ) {\n PriorityQueue<GraphNode> graphNodesToVisit = new PriorityQueue<>(\n new GraphNodePositionComparator(position)\n );\n HashSet<GraphNode> alreadyToVisit = new HashSet<>();\n ArrayList<GraphNode> foundNodes = new ArrayList<>();\n\n graphNodesToVisit.add(startNode);\n alreadyToVisit.add(startNode);\n\n while (!graphNodesToVisit.isEmpty()) {\n GraphNode node = graphNodesToVisit.poll();\n\n if (predicate.test(node)) {\n foundNodes.add(node);\n if (foundNodes.size() == n) {\n return foundNodes;\n }\n }\n\n for (GraphNode neighbor : node.neighbors) {\n if (!alreadyToVisit.contains(neighbor)) {\n graphNodesToVisit.add(neighbor);\n alreadyToVisit.add(neighbor);\n }\n }\n }\n\n return foundNodes;\n }", "public static void Agrupar() {\n\t\tArrayList<ArrayList<Double>> distancias_centroids = new ArrayList<ArrayList<Double>>();\n\t\tfor (int i=0;i<centroids.size();i++) {\n\t\t\tArrayList<Double> distancias= new ArrayList<Double>();\n\t\t\tfor (int j=0;j<petalas.size();j++) {\n\t\t\t\tdouble x1= centroids.get(i).petal_length;\n\t\t\t\tdouble x2= petalas.get(j).petal_length;\n\t\t\t\tdouble y1= centroids.get(i).petal_width;\n\t\t\t\tdouble y2= petalas.get(j).petal_width;\n\t\t\t\tdouble cateto1= x1-x2;\n\t\t\t\tdouble cateto2= y1-y2;\n\t\t\t\tdouble hipotenusa = Math.sqrt(cateto1*cateto1+cateto2*cateto2);\n\t\t\t\tdistancias.add(hipotenusa);\n\t\t\t\t/*\n\t\t\t\tSystem.out.println(\"cateto1: \"+cateto1);\n\t\t\t\tSystem.out.println(\"cateto2: \"+cateto2);\n\t\t\t\tSystem.out.println(\"hipotenusa: \"+hipotenusa);\n\t\t\t\t*/\n\t\t\t\t\t\t\t}\n\t\t\t\n\t\t\tdistancias_centroids.add(distancias);\t\t\t\n\t\t}\n\t\t/*\n\t\tSystem.out.println(\"Distancias Centroids:\");\n\t\tfor (int i=0;i<distancias_centroids.size();i++) {\n\t\t\tSystem.out.println(\"Centroid \"+i);\n\t\t\tfor (int j=0;j<distancias_centroids.get(i).size();j++) {\n\t\t\t\tSystem.out.println(distancias_centroids.get(i).get(j));\n\t\t\t}\n\t\t}\n\t\t*/\n\t\t//Para qual centroid pertece cada ponto\n\t\tArrayList<ArrayList<Petala>> pontos_de_cada_centroid = new ArrayList<ArrayList<Petala>>();\n\t\tfor (int i=0;i<centroids.size();i++) {\n\t\t\tArrayList<Petala> p = new ArrayList<Petala>();\n\t\t\tpontos_de_cada_centroid.add(p); \n\t\t}\n\t\tfor (int i=0;i<petalas.size();i++) {\n\t\t\tdouble menor =100;\n\t\t\tint centroid_menor=0;\n\t\t\tfor (int j=0;j<centroids.size();j++) {\n\t\t\t\tif (distancias_centroids.get(j).get(i)<menor) {\n\t\t\t\t\tmenor = distancias_centroids.get(j).get(i);\n\t\t\t\t\tcentroid_menor=j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tpontos_de_cada_centroid.get(centroid_menor).add(petalas.get(i));\n\t\t}\n\t\t/*\n\t\tfor (int i=0;i<pontos_de_cada_centroid.size();i++) {\n\t\t\tSystem.out.println(\"Centroid \"+i);\n\t\t\tSystem.out.println(\"Petalas: \");\n\t\t\tSystem.out.println(pontos_de_cada_centroid.get(i));\n\t\t}\n\t\t*/\n\t\t//Novos centroids\n\t\tArrayList<Petala> novos_centroids = new ArrayList<Petala>();\n\t\tfor (int i=0;i<pontos_de_cada_centroid.size();i++) {\n\t\t\tdouble soma_x=0;\n\t\t\tdouble soma_y=0;\n\t\t\tfor (int j=0;j<pontos_de_cada_centroid.get(i).size();j++) {\n\t\t\t\tsoma_x+=pontos_de_cada_centroid.get(i).get(j).petal_length;\n\t\t\t\tsoma_y+=pontos_de_cada_centroid.get(i).get(j).petal_width;\n\t\t\t}\n\t\t\tdouble novo_x=soma_x/pontos_de_cada_centroid.get(i).size();\n\t\t\tdouble novo_y=soma_y/pontos_de_cada_centroid.get(i).size();\n\t\t\tPetala novo_centroid = new Petala(novo_x,novo_y);\n\t\t\tnovos_centroids.add(novo_centroid);\n \t\t}\n\t\t\n\t\t//Gravar Geracao\n\t\tArrayList<Petala> gc= new ArrayList<Petala>();\n\t\tfor (int i=0;i<centroids.size();i++) {\n\t\t\tgc.add(centroids.get(i));\n\t\t}\n\t\tGeracao geracao = new Geracao(gc,pontos_de_cada_centroid);\n\t\tgeracoes.add(geracao);\n\t\t//Condicao de Parada\n\t\tboolean terminou = true;\n\t\tfor (int i=0; i<centroids.size();i++) {\n\t\t\tif (centroids.get(i).petal_length!=novos_centroids.get(i).petal_length) {\n\t\t\t\tterminou = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (centroids.get(i).petal_width!=novos_centroids.get(i).petal_width) {\n\t\t\t\tterminou = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (terminou) {\n\t\t\t/*\n\t\t\tSystem.out.println(\"Novos centroids:\");\n\t\t\tSystem.out.println(novos_centroids);\n\t\t\t\n\t\t\tSystem.out.println(\"FIM!\");\n\t\t*/\n\t\t}else {\n\t\t\tcentroids.clear();\n\t\t\tfor (int i=0;i<novos_centroids.size();i++) {\n\t\t\t\tcentroids.add(novos_centroids.get(i));\n\t\t\t}\n\t\tgeracao_atual++;\n\t\t\tAgrupar();\n\t\t}\n\t}", "private Cluster getNearestCluster(BasicEvent event) {\n float minDistance = Float.MAX_VALUE;\n Cluster closest = null;\n float currentDistance = 0;\n for (Cluster c : clusters) {\n float rX = c.radiusX;\n float rY = c.radiusY; // this is surround region for purposes of dynamicSize scaling of cluster size or aspect ratio\n if (dynamicSizeEnabled) {\n rX *= surround;\n rY *= surround; // the event is captured even when it is in \"invisible surround\"\n }\n float dx, dy;\n if ((dx = c.distanceToX(event)) < rX && (dy = c.distanceToY(event)) < rY) { // needs instantaneousAngle metric\n currentDistance = dx + dy;\n if (currentDistance < minDistance) {\n closest = c;\n minDistance = currentDistance;\n c.distanceToLastEvent = minDistance;\n c.xDistanceToLastEvent = dx;\n c.yDistanceToLastEvent = dy;\n }\n }\n }\n return closest;\n }", "public List<T> kNearestNeighborsNaive(int numToFind, HasCoordinates searchPos)\n throws IllegalArgumentException {\n if (numToFind < 0) {\n throw new IllegalArgumentException(\"ERROR: Number of nearest \"\n + \"neighbors to find must be a positive integer\");\n }\n List<T> pointsCopy = new ArrayList<>(points);\n Collections.shuffle(pointsCopy);\n Collections.sort(pointsCopy, new PointComparator(searchPos));\n\n if (numToFind >= pointsCopy.size()) {\n return pointsCopy;\n }\n\n return pointsCopy.subList(0, numToFind);\n }", "public static ArrayList<Point> getInitialCenters(FileSystem fs, Path input, int k) throws IOException {\n\t\treturn getInitialCenters(fs, input, k, false);\n\t}", "@Override\n\tpublic Set<E> getClustering() {\n\t\treturn F;\n\t}", "ArrayList<ArrayList<Cell>> cells(ArrayList<ArrayList<Double>> d) {\n ArrayList<ArrayList<Cell>> result1 = new ArrayList<ArrayList<Cell>>();\n for (int i = 0; i < d.size(); i = i + 1) {\n ArrayList<Cell> result = new ArrayList<Cell>();\n for (int j = 0; j < d.get(i).size(); j = j + 1) {\n double height = d.get(i).get(j);\n if (height <= 0.0) {\n result.add(new OceanCell(height, i, j));\n }\n else {\n result.add(new Cell(height, i, j));\n }\n }\n result1.add(result);\n }\n return result1;\n }", "public static void main(String[] args) {\n \n PointSET pset = new PointSET();\n System.out.println(\"Empty: \" + pset.isEmpty());\n pset.insert(new Point2D(0.5, 0.5));\n pset.insert(new Point2D(0.5, 0.5));\n pset.insert(new Point2D(0.5, 0.6));\n pset.insert(new Point2D(0.5, 0.7));\n pset.insert(new Point2D(0.5, 0.8));\n pset.insert(new Point2D(0.1, 0.5));\n pset.insert(new Point2D(0.8, 0.5));\n pset.insert(new Point2D(0.1, 0.1));\n System.out.println(\"Empty: \" + pset.isEmpty());\n System.out.println(\"Size: \" + pset.size());\n System.out.println(\"Nearest to start: \" + pset.nearest(new Point2D(0.0, 0.0)));\n System.out.println(\"Contains #1: \" + pset.contains(new Point2D(0.0, 0.0)));\n System.out.println(\"Contains #2: \" + pset.contains(new Point2D(0.5, 0.5)));\n System.out.print(\"Range #1: \");\n for (Point2D p : pset.range(new RectHV(0.001, 0.001, 0.002, 0.002)))\n System.out.print(p.toString() + \"; \");\n System.out.print(\"\\n\");\n System.out.print(\"Range #2: \");\n for (Point2D p : pset.range(new RectHV(0.05, 0.05, 0.15, 0.15)))\n System.out.print(p.toString() + \"; \");\n System.out.print(\"\\n\");\n System.out.print(\"Range #3: \");\n for (Point2D p : pset.range(new RectHV(0.25, 0.35, 0.65, 0.75)))\n System.out.print(p.toString() + \"; \");\n System.out.print(\"\\n\");\n \n }", "public static HashMap<String,CPUParams> doMDS(DoubleMatrix probMatrix,int dim, double parinf, double parsup, HashMap<String,Integer> ids) {\n\t\tint N = ids.size() ;\n\t\tDoubleMatrix centeringMatrix = new DoubleMatrix(N,N) ;\n\t\tfor(int i = 0 ; i<N ; i++) {\n\t\t\tfor(int j = 0 ; j<N ; j++) {\n\t\t\t\tif(i==j)\n\t\t\t\t\tcenteringMatrix.put(i,j,1.0-(1.0/((double)N))) ;\n\t\t\t\telse \n\t\t\t\t\tcenteringMatrix.put(i,j,-(1.0/((double)N))) ;\n\t\t\t}\n\t\t}\n\t\t// Centrer\n\t\tprobMatrix = centeringMatrix.mmul(probMatrix).mmul(centeringMatrix) ;\n\t\t\n\t\t// Faire la MDS de probmatric centree.\n\t\tDoubleMatrix eig[] = Eigen.symmetricEigenvectors(probMatrix) ;\n\t\tDoubleMatrix eigVect = eig[0] ;\n\t\tDoubleMatrix eigVal = eig[1] ;\n\t\tArrayList<Double> eigvalueslist = new ArrayList<Double>() ;\n\t\tArrayList<DoubleMatrix> eigvectorslist = new ArrayList<DoubleMatrix>() ;\n\t\tint NposEig = 0 ;\n\t\tfor(int i=0 ; i<N ;i++) {\n\t\t\tDouble ev = eigVal.get(i,i) ;\n\t\t\tif(ev>0)\n\t\t\t\tNposEig++ ;\n\t\t\teigvalueslist.add(ev) ;\n\t\t\teigvectorslist.add(eigVect.getColumn(i)) ;\n\t\t\t\n\t\t}\n\t\tint MDSsize = Math.min(NposEig, dim) ;\n\t\tDoubleMatrix reducedEigVect = new DoubleMatrix(N,MDSsize) ;\n\t\tDoubleMatrix reducedEigVal = new DoubleMatrix(MDSsize,MDSsize) ;\n\t\tCollections.sort(eigvalueslist) ;\n\t\tCollections.reverse(eigvalueslist);\n\t\t\n\t\t\n\t\t//Filtrer les eigens\n\t\tfor(int i=0 ; i<MDSsize ; i++) {\n\t\t\tif(eigvalueslist.get(i)>0) {\n\t\t\t\treducedEigVal.put(i, i,Math.sqrt(eigvalueslist.get(i))) ;\n\t\t\t\treducedEigVect.putColumn(i, eigvectorslist.get(i));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Faire la MDS\n\t\tDoubleMatrix mds = reducedEigVect.mmul(reducedEigVal) ;\n\t\t\n\t\tHashMap<String,CPUParams> r = new HashMap<String, CPUParams>() ;\n\t\tfor(String u : User.users.keySet()) {\n\t\t\tint id1 = ids.get(u) ;\n\t\t\tCPUParams cpu = new CPUParams(1, dim, 0.0,parinf,parsup) ;\n\t\t\tParameters pList = new Parameters(dim, 0.0) ;\n\t\t\tfor(int i=0 ; i<MDSsize ; i++) {\n\t\t\t\tpList.set(i, new Parameter(mds.get(id1, i)*parsup));\n\t\t\t}\n\t\t\tcpu.setParameters(pList);\n\t\t\tr.put(u, cpu) ;\n\t\t}\n\t\t\n\t\treturn r ;\n\t}", "List<CoordinateDistance> getNearestCoordinates(Point coordinate, int n);", "private Bucket generate_list_of_buckets(\n\t\t\tArrayList<PotentialLine> potentialLines) {\n\t\tBucket front_bucket = new Bucket(0);\n\n\t\t// Populate sorted linked-list of buckets of lines\n\t\tfor (Line current_line : maximal_lines) {\n\t\t\tPotentialLine potential_line = new PotentialLine();\n\t\t\tpotential_line.line = current_line;\n\t\t\tpotential_line.num_unused_points = current_line.getNum_points();\n\n\t\t\tif (potential_line.num_unused_points == front_bucket.getValue()) {\n\n\t\t\t\t// Add potential_line to the proper bucket\n\t\t\t\tfront_bucket.addLine(potential_line);\n\t\t\t\tpotential_line.bucket = front_bucket;\n\t\t\t} else {\n\n\t\t\t\t// Because maximal_lines is sorted, if potential_line does not\n\t\t\t\t// belong in the first bucket, we need to add a new bucket\n\t\t\t\tBucket new_bucket = new Bucket(potential_line.num_unused_points);\n\t\t\t\tnew_bucket.setNextBucket(front_bucket);\n\t\t\t\tfront_bucket.setPreviousBucket(new_bucket);\n\t\t\t\tfront_bucket = new_bucket;\n\n\t\t\t\t// Add potential_line to the proper bucket\n\t\t\t\tfront_bucket.addLine(potential_line);\n\t\t\t\tpotential_line.bucket = front_bucket;\n\t\t\t}\n\n\t\t\t// Add potential_line to the list of potential lines\n\t\t\tpotentialLines.add(potential_line);\n\t\t}\n\n\t\treturn front_bucket;\n\t}", "private void calculateDistances(int pDistancia,int pMetrica,int k)\n\t{\n\t\tDistance dist = null;\n\t\t\n\t\tfor (int i = 0; i < clusterList.size(); i++)\n\t\t{\n\t\t\tfor (int j = i+1; j < clusterList.size(); j++)\n\t\t\t{\n\t\t\t\tdist = new Distance(clusterList.get(i), clusterList.get(j));\n\t\t\t\tdist.calculateDistance(pDistancia, pMetrica, k);\n\t\t\t\tdistanceList.addLast(dist);\n\t\t\t}\n\t\t}\n\t\tCollections.sort(distanceList);\n\t}", "int getMinInstances();", "public abstract float getDensity();", "static int paintersPartition(int a[], int n, int k)\r\n\t {\r\n\t int start = a[0], end = a[0], minOfMax = -1;\r\n\t \r\n\t //this is to initialise start as max of all array elements and end as sum of all array elements\r\n\t for(int i = 1; i < n; i++)\r\n\t {\r\n\t end += a[i];\r\n\t \r\n\t if(a[i] > start)\r\n\t start = a[i];\r\n\t }\r\n\t \r\n\t while(start <= end)\r\n\t {\r\n\t int mid = start + ((end - start) / 2);\r\n\t \r\n\t if(isValid(a, n, k, mid))\r\n\t {\r\n\t minOfMax = mid; //this will hold one of the valid solution but then to get the most optimal one, we need check further on left side of search space\r\n\t end = mid - 1;\r\n\t }\r\n\t else\r\n\t start = mid + 1;\r\n\t }\r\n\t \r\n\t return minOfMax;\r\n\t }", "public static void main(String[] args) {\n\t\tint p_numbers = 3; // Partition Numbers\r\n\t int p_size = 5;\r\n\t int z_exponent = 1;\t \t \t \t \r\n\t int d = 0;\r\n\t int d_start = 0;\r\n\t int d_end = p_size;\r\n\t double mu = 0.0;\r\n\t double sigma = 1.0;\r\n\t double z, c, c_rand, n;\r\n\t\t\t \t \r\n\t ZipfDistribution zipf;\t// Parameters = Number of Elements, Exponent \t\t \t \t \t \t \t \r\n\t RandomDataGenerator randData = new RandomDataGenerator();\r\n\t RandomDataGenerator rand = new RandomDataGenerator();\r\n\t rand.reSeed(0);\r\n\t \r\n\t for(int p = 0; p < p_numbers; p++) {\r\n\t \tzipf = new ZipfDistribution(p_size, z_exponent); \r\n\t \tzipf.reseedRandomGenerator(p);\r\n\t \trandData.reSeed(p);\t\t \r\n\t \t\r\n\t \tfor(d = d_start; d < d_end; d++) {\r\n\t \t\tz = randData.nextZipf(p_size, z_exponent);\r\n\t \t\tz += d_start;\r\n\t \t\t\r\n\t \t\tif(z > d_end) z -= 1;\r\n\t \t\t\r\n\t \t\tc = zipf.cumulativeProbability((d - d_start));\r\n\t \t\tc_rand = zipf.cumulativeProbability(((int)z - d_start));\r\n\t \t\t\r\n\t \t\t//n = rand.nextGaussian(mu, sigma);\r\n\t \t\tn = rand.nextUniform(0.0, 1.0);\r\n\t\t \r\n\t\t \tSystem.out.println(p+\" \"+d+\" \"+c+\" \"+(int)z+\" \"+c_rand+\" \"+n);\r\n\t \t}\r\n\t \t\r\n\t \td_start = d_end;\r\n\t \td_end = (d + p_size);\t \t\r\n\t }\t \r\n\t}", "public WatsetClustering<V> compute() {\n logger.log(Level.INFO, \"Watset started.\");\n\n buildInventory();\n\n final var count = senses.values().stream().mapToInt(List::size).sum();\n logger.log(Level.INFO, \"Watset: sense inventory constructed including {0} senses.\", count);\n\n final var senseGraph = buildSenseGraph();\n\n if (graph.edgeSet().size() != senseGraph.edgeSet().size()) {\n throw new IllegalStateException(\"Mismatch in number of edges: expected \" +\n graph.edgeSet().size() +\n \", but got \" +\n senseGraph.edgeSet().size());\n }\n\n logger.log(Level.INFO, \"Watset: sense graph constructed.\");\n\n final var globalAlgorithm = global.apply(senseGraph);\n final var senseClusters = globalAlgorithm.getClustering();\n\n logger.log(Level.INFO, \"Watset finished.\");\n\n final var clusters = senseClusters.getClusters().stream().\n map(cluster -> cluster.stream().map(Sense::get).collect(Collectors.toSet())).\n collect(Collectors.toList());\n\n return new WatsetClustering.WatsetClusteringImpl<>(clusters,\n Collections.unmodifiableMap(inventory),\n new AsUnmodifiableGraph<>(senseGraph));\n }", "Map<Double, Element> getElements();", "private static float[] GetAppropriateSeparableGauss(int kernelSize){\n final double epsilon = 2e-2f / kernelSize;\n double searchStep = 1.0;\n double sigma = 1.0;\n while( true )\n {\n\n double[] kernelAttempt = GenerateSeparableGaussKernel( sigma, kernelSize );\n if( kernelAttempt[0] > epsilon )\n {\n if( searchStep > 0.02 )\n {\n sigma -= searchStep;\n searchStep *= 0.1;\n sigma += searchStep;\n continue;\n }\n\n float[] retVal = new float[kernelSize];\n for (int i = 0; i < kernelSize; i++)\n retVal[i] = (float)kernelAttempt[i];\n return retVal;\n }\n\n sigma += searchStep;\n\n if( sigma > 1000.0 )\n {\n assert( false ); // not tested, preventing infinite loop\n break;\n }\n }\n\n return null;\n }", "private void partitionImpl(Collection<S> vocab, HashMap<Dimension<T>, MutableDouble> center) {\n double firstVal = Double.POSITIVE_INFINITY;\n double secondVal = Double.POSITIVE_INFINITY;\n S firstWord = null;\n S secondWord = null;\n\n LinkedList<S> cluster1 = new LinkedList<S>();\n LinkedList<S> cluster2 = new LinkedList<S>();\n HashMap<Dimension<T>, MutableDouble> newCenter1 = null;\n HashMap<Dimension<T>, MutableDouble> newCenter2 = null;\n\n if (vocab.size() > 2) {\n for (S word : vocab) {\n double dist = distanceToCenter(word, center);\n if (dist < secondVal) {\n if (dist < firstVal) {\n secondVal = firstVal;\n secondWord = firstWord;\n firstVal = dist;\n firstWord = word;\n } else {\n secondVal = dist;\n secondWord = word;\n }\n }\n }\n if (distance(firstWord, secondWord) <= 0.0) {\n System.out.printf(\"zero distance between '%s' and '%s'\\n\", firstWord, secondWord);\n // pick an arbitrary second word\n for (S word : vocab) {\n if (word.equals(firstWord) || word.equals(secondWord)) {\n continue;\n }\n if (distance(firstWord, word) > 0.0) {\n secondWord = word;\n break;\n }\n }\n System.out.printf(\"selected '%s' and '%s'\\n\", firstWord, secondWord);\n }\n\n HashMap<Dimension<T>, MutableDouble> center1 = wordToVector(firstWord);\n HashMap<Dimension<T>, MutableDouble> center2 = wordToVector(secondWord);\n for (S word : vocab) {\n double dist1 = distanceToCenter(word, center1);\n double dist2 = distanceToCenter(word, center2);\n if (dist1 < dist2) {\n cluster1.add(word);\n } else {\n cluster2.add(word);\n }\n }\n\n int changed = 1;\n int iteration = 0;\n while (++iteration <= MAX_ITERATIONS && changed > 0) {\n System.out.printf(\"Iteration %d/%d\\n\", iteration, MAX_ITERATIONS);\n changed = 0;\n newCenter1 = getCenter(cluster1);\n newCenter2 = getCenter(cluster2);\n\n LinkedList<S> tmpCluster1 = new LinkedList<S>();\n LinkedList<S> tmpCluster2 = new LinkedList<S>();\n\n for (ListIterator<S> it = cluster1.listIterator(); it.hasNext();) {\n S word = it.next();\n double dist1 = distanceToCenter(word, newCenter1);\n double dist2 = distanceToCenter(word, newCenter2);\n if (dist1 <= dist2) {\n tmpCluster1.add(word);\n } else {\n tmpCluster2.add(word);\n changed++;\n System.out.printf(\"changing %s : %g > %g\\n\", word, dist1, dist2);\n }\n }\n\n for (ListIterator<S> it = cluster2.listIterator(); it.hasNext();) {\n S word = it.next();\n double dist1 = distanceToCenter(word, newCenter1);\n double dist2 = distanceToCenter(word, newCenter2);\n if (dist2 <= dist1) {\n tmpCluster2.add(word);\n } else {\n tmpCluster1.add(word);\n changed++;\n System.out.printf(\"changing %s : %g < %g\\n\", word, dist1, dist2);\n }\n }\n cluster1 = tmpCluster1;\n cluster2 = tmpCluster2;\n System.out.printf(\"changed: %d/%d\\n\", changed, vocab.size());\n if (cluster1.size() == 0 || cluster2.size() == 0) {\n LinkedList<S> cl = cluster1.size() == 0 ? cluster2 : cluster1;\n System.out.printf(\"Cannot split %s, split them randomly\\n\", cl.toString());\n tmpCluster1 = new LinkedList<S>();\n tmpCluster2 = new LinkedList<S>();\n boolean b = true;\n for (S word : cl) {\n if (b) {\n tmpCluster1.add(word);\n } else {\n tmpCluster2.add(word);\n }\n b = !b;\n }\n cluster1 = tmpCluster1;\n cluster2 = tmpCluster2;\n }\n }\n } else if (vocab.size() == 2) {\n Iterator<S> it = vocab.iterator();\n S word1 = it.next();\n S word2 = it.next();\n cluster1.add(word1);\n cluster2.add(word2);\n newCenter1 = wordToVector(word1);\n newCenter2 = wordToVector(word2);\n } else {\n return;\n }\n\n if (notifyNewCluster(vocab, cluster1, cluster2)) {\n partition(cluster1, newCenter1);\n partition(cluster2, newCenter2);\n }\n\n }", "public PVector cohesion (ArrayList<Shark> sharks) {\n float neighbordist = 50;\n PVector sum = new PVector(0, 0); // Start with empty vector to accumulate all positions\n int count = 0;\n for (Shark other : sharks) {\n float d = PVector.dist(position, other.position);\n if ((d > 0) && (d < neighbordist)) {\n sum.add(other.position); // Add position\n count++;\n }\n }\n if (count > 0) {\n sum.div(count);\n return seek(sum); // Steer towards the position\n } else {\n return new PVector(0, 0);\n }\n }", "public REXP kmeans(double[] values, String[] rnames, String[] cnames,\n boolean usePam, String minClusCountExpr, String maxClusCountExpr) {\n minClusCountExpr = minClusCountExpr.replaceAll(\"N\",\n String.valueOf(rnames.length));\n maxClusCountExpr = maxClusCountExpr.replaceAll(\"N\",\n String.valueOf(rnames.length));\n\n double minClusCount = Calculator.calculate(minClusCountExpr);\n double maxClusCount = Calculator.calculate(maxClusCountExpr);\n\n logger.info(\"MIN clusters count: \" + minClusCount\n + \" MAX clusters count: \" + maxClusCount);\n\n // calculate\n\n logger.info(\"values:\\n\" + Arrays.toString(values));\n rengine.assign(CELLS_NAME, values);\n rengine.assign(ROWS_NAME, rnames);\n rengine.assign(COLS_NAME, cnames);\n\n String matrixCmd = \"x <- matrix(\" + CELLS_NAME + \", nrow=\"\n + rnames.length + \", ncol=\" + cnames.length\n + \", byrow=TRUE, dimnames=list(\" + ROWS_NAME + \",\" + COLS_NAME\n + \"))\";\n logger.info(\"Creating matrix command: \" + matrixCmd);\n\n rengine.eval(matrixCmd);\n\n String kmeansCmd = \"km <- pamk(x,\" + ((int) minClusCount) + \":\"\n + ((int) maxClusCount) + \",usepam=\"\n + String.valueOf(usePam).toUpperCase() + \")\";\n logger.info(\"Kmeans command: \" + kmeansCmd);\n REXP km = rengine.eval(kmeansCmd);\n\n // rengine.eval(\"print(km$nc)\");\n\n logger.info(\"Optimal number of clusters : \"\n + ((REXP) km.asVector().get(1)).asInt());\n\n return km;\n\n }", "public static void extractKCoreAndConnectedComponent(double threshold) throws IOException, ParseException, Exception {\n String[] prefixYesNo = {\"yes\", \"no\"};\n for (String prefix : prefixYesNo) {\n\n // Get the number of clusters\n int c = getNumberClusters(RESOURCES_LOCATION + prefix + \"_graph.txt\");\n\n // Get the number of nodes inside each cluster\n List<Integer> numberNodes = getNumberNodes(RESOURCES_LOCATION + prefix + \"_graph.txt\", c);\n\n PrintWriter pw_cc = new PrintWriter(new FileWriter(RESOURCES_LOCATION + prefix + \"_largestcc.txt\")); //open the file where the largest connected component will be written to\n PrintWriter pw_kcore = new PrintWriter(new FileWriter(RESOURCES_LOCATION + prefix + \"_kcore.txt\")); //open the file where the kcore will be written to\n\n // create the array of graphs\n WeightedUndirectedGraph[] gArray = new WeightedUndirectedGraph[c];\n for (int i = 0; i < c; i++) {\n System.out.println();\n System.out.println(\"Cluster \" + i);\n\n gArray[i] = new WeightedUndirectedGraph(numberNodes.get(i) + 1);\n\n // Put the nodes,\n NodesMapper<String> mapper = new NodesMapper<String>();\n gArray[i] = addNodesGraph(gArray[i], i, RESOURCES_LOCATION + prefix + \"_graph.txt\", mapper);\n\n //normalize the weights\n gArray[i] = normalizeGraph(gArray[i]);\n\n AtomicDouble[] info = GraphInfo.getGraphInfo(gArray[i], 1);\n System.out.println(\"Nodes:\" + info[0]);\n System.out.println(\"Edges:\" + info[1]);\n System.out.println(\"Density:\" + info[2]);\n\n // extract remove the edges with w<t\n gArray[i] = SubGraphByEdgesWeight.extract(gArray[i], threshold, 1);\n\n // get the largest CC and save to a file\n WeightedUndirectedGraph largestCC = getLargestCC(gArray[i]);\n saveGraphToFile(pw_cc, mapper, largestCC.in, i);\n\n // Get the inner core and save to a file\n WeightedUndirectedGraph kcore = kcore(gArray[i]);\n saveGraphToFile(pw_kcore, mapper, kcore.in, i);\n }\n\n pw_cc.close();\n pw_kcore.close();\n }\n }", "public interface IStoppingCriteria {\n\n /**\n * Determine the degree of clustering agreement\n * @param cluster1 one clustering results\n * @param cluster2 the other clustering results\n * @return the degree of clustering agreement; 1 refers to be the same clustering results; 0 refers to be the totally different clustering results\n */\n public double computeSimilarity(int[] cluster1, int[] cluster2);\n\n}", "private double findMin(){\r\n Set<Map.Entry<Double, Double>> list = heap.entrySet();\r\n double minKey = heap.firstKey();\r\n double minVal = MAX_WEIGHT;\r\n if (list != null){\r\n for (Map.Entry<Double, Double> entry: list){\r\n if (minVal > entry.getValue()){\r\n minVal = entry.getValue();\r\n minKey = entry.getKey();\r\n }\r\n }\r\n }\r\n return minKey;\r\n }", "private Set<Hole> createHoleSet(){\n Set<Hole> holeSet = new HashSet<>();\n for (Profile profile:profiles) {\n holeSet.addAll(profile.getHoles());\n }\n return holeSet;\n }", "private static void kmeans(int[] rgb, int k) {\n\t\tColor[] rgbColor = new Color[rgb.length];\r\n\t\tColor[] ColorCluster = new Color[rgb.length];\r\n\t\tint[] ColorClusterID = new int[rgb.length];\r\n\t\t\r\n\t\tfor(int i = 0;i<rgb.length;i++) {\r\n\t\t\trgbColor[i] = new Color(rgb[i]);\r\n\t\t\tColorClusterID[i] = -1;\r\n\t\t}\r\n\t\t\r\n\t\tColor[] currentCluster = new Color[k];\t\t\r\n\t\tint randomNumber[]= ThreadLocalRandom.current().ints(0, rgb.length).distinct().limit(k).toArray();\r\n\t\tColor[] modifiedColorCluster = new Color[k];\t\r\n\t\t\r\n\t\tfor(int j=0;j<k;j++) {\r\n\t\t\tcurrentCluster[j]=rgbColor[randomNumber[j]];\r\n\t\t}\r\n\t\tint flag = 1;\r\n\t\tint maxIterations = 1000;\r\n\t\tint numIteration=0;\r\n\t\tdouble[] distance = new double[maxIterations+1];\t\t\r\n\t\tdistance[0]=Double.MAX_VALUE;\r\n\t\twhile(flag == 1) {\r\n\t\t\tflag = 0;\r\n\t\t\tnumIteration++;\r\n\t\t\tdistance[numIteration]=assignCLustersToPixels(rgbColor,currentCluster,ColorCluster,ColorClusterID,k,rgb.length);\r\n\t\t\tmodifiedColorCluster= findMeans(rgbColor,ColorClusterID,modifiedColorCluster,k,rgb.length);\r\n\t\t\tif(!clusterCenterCheck(currentCluster, modifiedColorCluster,k)){\r\n\t\t\t\tflag = 1;\r\n\t\t\t\tfor(int j=0;j<k;j++) {\r\n\t\t\t\t\tcurrentCluster[j]=modifiedColorCluster[j];}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\tfor(int i = 0;i<rgb.length;i++) {\r\n\t\t\trgb[i]= getValue(ColorCluster[i].getRed(),ColorCluster[i].getGreen(),ColorCluster[i].getBlue());\r\n\t\t}\r\n\t\treturn;\r\n\t }", "public void decideCluster(){\n\tdouble shortest = 1000000;\n\tfor(int i = 0; i < clusterDist.length; i++)\n\t{\n\t\tif(clusterDist[i] < shortest)\n\t\t{\tshortest = clusterDist[i];\n\t\t\tthis.clusterid = i;\n\t\t}\n\t\t\n\t}\n}", "public List<Neighbor> getNearNeighborsInSample(double[] point, double distanceThreshold) {\n checkNotNull(point, \"point must not be null\");\n checkArgument(distanceThreshold > 0, \"distanceThreshold must be greater than 0\");\n\n if (!isOutputReady()) {\n return Collections.emptyList();\n }\n\n Function<RandomCutTree, Visitor<Optional<Neighbor>>> visitorFactory = tree ->\n new NearNeighborVisitor(point, distanceThreshold);\n\n return traverseForest(point, visitorFactory, Neighbor.collector());\n }", "public Set<Node3D> getNeighbors(Node3D node){\n List<Triangle3D> triangles = node_to_triangle.get(node);\n Set<Node3D> neighbors = new HashSet<>();\n neighbors.add(node);\n for(Triangle3D t: triangles){\n neighbors.add(t.A);\n neighbors.add(t.B);\n neighbors.add(t.C);\n }\n neighbors.remove(node);\n return neighbors;\n }", "public ExperimentList orderExperiments(){ // tum experimentlari sirala\r\n Node last = head;\r\n Node last2 = head;\r\n ExperimentList ordered = new ExperimentList();\r\n Node min = new Node(new Experiment());\r\n min.data.accuracy = 9999999;\r\n float min2 = -9999999;\r\n int count = -1;\r\n while(last != null){ // genel dongu\r\n int count_in = 0;\r\n while(last2 != null){ // her eleman icin dongu\r\n if( min.data.accuracy > last2.data.accuracy && last2.data.accuracy >= min2){\r\n if( last2.data.accuracy != min2 || count_in >= count){\r\n min = last2; // min se ve kullanilmamissa ekle\r\n count_in++;\r\n }\r\n }\r\n last2 = last2.next;\r\n }\r\n count = count_in;\r\n Experiment temp = new Experiment(min.data);\r\n ordered.addExpList(temp);\r\n min2 = min.data.accuracy;\r\n min = new Node(new Experiment());\r\n min.data.accuracy = 9999999;\r\n last = last.next;\r\n last2 = head;\r\n }\r\n return ordered;\r\n }", "private ArrayList<Integer> getRegularPointsIndex(float ratio) {\n Dimension dim = layoutPanel.getLayoutSize();\n int height = dim.height;\n int width = dim.width;\n int size = height * width;\n int newNListSize = (int) (size * ratio);\n double len = Math.sqrt((double) size / (double) newNListSize);\n\n int nx = (int) Math.round(width / len);\n int ny = (int) Math.round(height / len);\n dim.width = nx;\n dim.height = ny;\n\n // find evenly spaced margin\n double mx, my;\n if (nx * len > width) {\n mx = (len - (nx * len - width)) / 2.0;\n } else {\n mx = (len + (width - nx * len)) / 2.0;\n }\n if (ny * len > height) {\n my = (len - (ny * len - height)) / 2.0;\n } else {\n my = (len + (height - ny * len)) / 2.0;\n }\n mx = Math.floor(mx);\n my = Math.floor(my);\n\n // create points of array, which are regularly distributed\n ArrayList<Point> pts = new ArrayList<Point>();\n for (double y = my; Math.round(y) < height; y += len) {\n for (double x = mx; Math.round(x) < width; x += len) {\n pts.add(new Point((int) Math.round(x), (int) Math.round(y)));\n }\n }\n\n // convert points to index list\n ArrayList<Integer> newNList = cnvPoints2IndexList(pts);\n\n return newNList;\n }", "default List<Point3D> findIntersections(Ray ray) {\n\tList<GeoPoint> geoList = findGeoIntersections(ray);\n\treturn geoList == null ? null\n\t: geoList .stream()\n\t.map(gp -> gp.point)\n\t.collect(Collectors.toList());\n\t}", "public NeighborhoodDistribution(int divisions) {this.divisions=divisions;}", "private Point findFront(Point[] points) {\n\t\t// Loop through the passed points.\n\t\tdouble[] dists = new double[3];\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\t// Get outer-loop point.\n\t\t\tPoint a = points[i];\n\t\t\t\n\t\t\t// Loop through rest of points.\n\t\t\tfor (int k = 0; k < 3; k++) {\n\t\t\t\t// Continue if current outer.\n\t\t\t\tif (i == k) continue;\n\t\t\t\t\n\t\t\t\t// Get inner-loop point.\n\t\t\t\tPoint b = points[k];\n\t\t\t\t\n\t\t\t\t// Add distance between out and inner.\n\t\t\t\tdists[i] += Math.sqrt(\n\t\t\t\t\tMath.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Prepare index and largest holder.\n\t\tint index = 0;\n\t\tdouble largest = 0;\n\t\t\n\t\t// Loop through the found distances.\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\t// Skip if dist is lower than largest.\n\t\t\tif (dists[i] < largest) continue;\n\t\t\t\n\t\t\t// Save the index and largest value.\n\t\t\tindex = i;\n\t\t\tlargest = dists[i];\n\t\t}\n\t\t\n\t\t// Return the largest point index.\n\t\treturn points[index];\n\t}", "public double getClusterCoefficientJUNG()\r\n\t{\n\t\tMap<Entity, Double> coefficients = Metrics\r\n\t\t\t\t.clusteringCoefficients(undirectedGraph);\r\n\t\tdouble coefficientSum = 0.0;\r\n\t\t// logger.info(\"Clustering coefficients: \" + coefficients);\r\n\t\tfor (Entity vertex : coefficients.keySet()) {\r\n\t\t\t// logger.info(vertex + ((JUNGEntityVertex)\r\n\t\t\t// vertex).getVertexEntity());\r\n\t\t\tcoefficientSum += coefficients.get(vertex);\r\n\t\t}\r\n\t\treturn coefficientSum / getNumberOfNodes();\r\n\t}" ]
[ "0.74453497", "0.57027787", "0.5587524", "0.5410485", "0.5409936", "0.530205", "0.5283985", "0.520267", "0.5201489", "0.51926535", "0.51919276", "0.51665294", "0.5143779", "0.50443405", "0.503643", "0.49566305", "0.48834434", "0.48784938", "0.4852054", "0.48299998", "0.48184478", "0.48113206", "0.47749022", "0.47174376", "0.47144556", "0.46958882", "0.46942306", "0.467947", "0.46764454", "0.46725142", "0.46657118", "0.46582797", "0.46580344", "0.46413726", "0.46315187", "0.46252862", "0.4625132", "0.46178603", "0.46095806", "0.4607129", "0.46058998", "0.4589444", "0.45785257", "0.4572496", "0.45710918", "0.45663938", "0.45496", "0.45344993", "0.45205706", "0.4520501", "0.4509288", "0.44990438", "0.44967103", "0.44830984", "0.4478487", "0.4476504", "0.4475732", "0.44744825", "0.44692406", "0.44468492", "0.4445226", "0.44344893", "0.44216418", "0.44115338", "0.4410596", "0.43960613", "0.43932438", "0.43929023", "0.43927267", "0.438945", "0.4377943", "0.4377555", "0.43747434", "0.4369822", "0.43675488", "0.43668216", "0.4355652", "0.43490908", "0.43454668", "0.43433043", "0.43390086", "0.433768", "0.4330846", "0.43262383", "0.43231142", "0.43221977", "0.4316422", "0.4314434", "0.43120256", "0.4311811", "0.43068117", "0.43053007", "0.42976567", "0.42969435", "0.42948064", "0.42946213", "0.42910498", "0.42902777", "0.42901468", "0.42886126" ]
0.69028264
1
Constructs search index with a list of floating point values.
public SearchIndex(List<Double> elements) { sequence = new ArrayList<Double>(elements); Collections.sort(sequence); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.util.List<java.lang.Float> getInList();", "public ValueSetSegment(float[] v){\n values = v;\n }", "@Test\n public void getIndex(){\n List <Double> list = new ArrayList<>();\n list.add(1.0);\n list.add(2.0);\n list.add(3.0);\n list.add(4.0);\n\n assertEquals(0,list.indexOf(1.0));\n }", "void setFloat(int index, float value) throws SQLException;", "@Override\n\tpublic int binarySearchXValues(double fKey)\n\t{\n\t\treturn Arrays.binarySearch(this.afXValues, (float) fKey);\n\t}", "private static void caso4(ArrayList<Float> listaValores) {\n \n }", "public VectorFloat(float[] storage) {\n this(storage.length / elementSize, storage);\n }", "public VectorFloat(int numElements) {\n this(numElements, new float[numElements]);\n }", "private static int binarySearch0(float[] a, int fromIndex, int toIndex,\n\t\t\tfloat key) {\n\t\tint low = fromIndex;\n\t\tint high = toIndex - 1;\n\n\t\twhile (low <= high) {\n\t\t\tint mid = (low + high) >>> 1;\n\t\tfloat midVal = a[mid];\n\n\t\tint cmp;\n\t\tif (midVal < key) {\n\t\t\tcmp = -1; // Neither val is NaN, thisVal is smaller\n\t\t} else if (midVal > key) {\n\t\t\tcmp = 1; // Neither val is NaN, thisVal is larger\n\t\t} else {\n\t\t\tint midBits = Float.floatToIntBits(midVal);\n\t\t\tint keyBits = Float.floatToIntBits(key);\n\t\t\tcmp = (midBits == keyBits ? 0 : // Values are equal\n\t\t\t\t(midBits < keyBits ? -1 : // (-0.0, 0.0) or (!NaN, NaN)\n\t\t\t\t\t1)); // (0.0, -0.0) or (NaN, !NaN)\n\t\t}\n\n\t\tif (cmp < 0)\n\t\t\tlow = mid + 1;\n\t\telse if (cmp > 0)\n\t\t\thigh = mid - 1;\n\t\telse\n\t\t\treturn mid; // key found\n\t\t}\n\t\treturn -(low + 1); // key not found.\n\t}", "public Position(double[] values) {\n this.values = values;\n }", "public HashMap<String, Double> search(String query) {\n // ===================================================\n // 1. Fetch all inverted lists corresponding to terms\n // in the query.\n // ===================================================\n String[] terms = query.split(\" \");\n HashMap<String, Integer> qf = new HashMap<String, Integer>();\n // Calculate term frequencies in the query\n for (String term : terms) {\n if (qf.containsKey(term))\n qf.put(term, qf.get(term) + 1);\n else\n qf.put(term, 1);\n }\n HashMap<String, Double> docScore = new HashMap<String, Double>();\n for (Entry<String, Integer> termEntry : qf.entrySet()) {\n String term = termEntry.getKey();\n int qfi = termEntry.getValue();\n\n // ===================================================\n // 2. Compute BM25 scores for documents in the lists.\n // Make a score list for documents in the inverted\n // lists. Assume that no relevance information is \n // available. For parameters, use k1=1.2, b=0.75, \n // k2=100.\n // ===================================================\n double k1 = 1.2;\n double b = 0.75;\n double k2 = 100;\n int ni = invIndex.get(term).size();\n\n\n for (Entry<String, IndexEntry> invListEntry : invIndex.get(term).entrySet()) {\n String docID = invListEntry.getKey();\n double bm25Score;\n if (docScore.containsKey(docID))\n bm25Score = docScore.get(docID);\n else\n bm25Score = 0;\n\n // length of the document\n int dl = docStat.get(docID);\n // frequency of the term in the document\n int fi = invListEntry.getValue().getTf();\n double K = k1 * ((1 - b) + b * ((double) dl / avdl));\n\n // ===================================================\n // 3. Accumulate scores for each term in a query\n // on the score list.\n // ===================================================\n bm25Score += Math.log((N - ni + 0.5) / (ni + 0.5))\n * (((k1 + 1) * fi * (k2 + 1) * qfi) / ((K + fi) * (k2 + qfi)));\n docScore.put(docID, bm25Score);\n }\n }\n\n return docScore;\n }", "protected interface ISearchIndex<T> extends Iterable<T> {\n List<T> radius(T center, double radius);\n }", "public UnmodifiableFloatList(FloatList l) {\r\n super(l);\r\n }", "public static java.util.Iterator<org.semanticwb.process.schema.Float> listFloats()\r\n {\r\n java.util.Iterator it=sclass.listInstances();\r\n return new org.semanticwb.model.GenericIterator<org.semanticwb.process.schema.Float>(it, true);\r\n }", "static Nda<Float> of( float... value ) { return Tensor.of( Float.class, Shape.of( value.length ), value ); }", "public TemperatureDifferenceCalculator(double[] list)\n {\n data = list;\n }", "public FloatArrayWritable(FloatWritable[] values) {\n super(FloatWritable.class, values);\n }", "public LongOpenHashSet(final long[] a, final float f) {\n\t\tthis(a, 0, a.length, f);\n\t}", "public void set(int index, float value) {\r\n RangeCheck(index);\r\n elementData[index] = value;\r\n }", "public static void QueryVector() {\n for(Entry<String, List<Double>> entry: wtgMap.entrySet()){\n List<Double> queryValue = new ArrayList();\n queryValue = entry.getValue();\n double temp = queryValue.get(totaldocument);\n\n query.add(temp);\n }\n }", "java.util.List<java.lang.Float> getNotInList();", "public List<News> query(List<float[]> waypoints);", "public static Stats of(double... values) {\n/* 122 */ StatsAccumulator acummulator = new StatsAccumulator();\n/* 123 */ acummulator.addAll(values);\n/* 124 */ return acummulator.snapshot();\n/* */ }", "public Value(float f) {\n aFloat = f;\n itemClass = Float.class;\n type = DataType.FLOAT;\n }", "OpFList createOpFList();", "private Data[] getFloats(double value, int npoints, int nattributes)\n\t{\n\t\tData[] data = new Data[npoints];\n\t\tfor (int i = 0; i < npoints; i++)\n\t\t\tdata[i] = nattributes == 1 ? new DataFloat((float) value)\n\t\t: new DataArrayOfFloats(new float[] { (float) value,\n\t\t\t\t(float) value });\n\t\t\treturn data;\n\t}", "float getIn(int index);", "@SafeVarargs\n private static Restriction newMultiIN(CFMetaData cfMetaData, int firstIndex, List<ByteBuffer>... values)\n {\n List<ColumnDefinition> columnDefinitions = new ArrayList<>();\n List<Term> terms = new ArrayList<>();\n for (int i = 0; i < values.length; i++)\n {\n columnDefinitions.add(getClusteringColumnDefinition(cfMetaData, firstIndex + i));\n terms.add(toMultiItemTerminal(values[i].toArray(new ByteBuffer[0])));\n }\n return new MultiColumnRestriction.InWithValues(columnDefinitions, terms);\n }", "public void FVA( ArrayList< Double > objCoefs, Double objVal, ArrayList< Double > fbasoln, ArrayList< Double > min, ArrayList< Double > max, SolverComponent component ) throws Exception;", "public void set(int index, float value) {\n storage[index] = value;\n }", "@Test\n public void testIndexMaintenanceWithIndexOnMethodAsList() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID\",\n SEPARATOR + \"portfolio.asList() pf\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForValues(ri);\n }", "public Iterable<Float> getFloats(String key);", "public static java.util.Iterator<org.semanticwb.process.schema.Float> listFloats(org.semanticwb.model.SWBModel model)\r\n {\r\n java.util.Iterator it=model.getSemanticObject().getModel().listInstancesOfClass(sclass);\r\n return new org.semanticwb.model.GenericIterator<org.semanticwb.process.schema.Float>(it, true);\r\n }", "public Vector2f (float[] values)\n {\n set(values);\n }", "private static int binarySearch0(double[] a, int fromIndex, int toIndex,\n\t\t\tdouble key) {\n\t\tint low = fromIndex;\n\t\tint high = toIndex - 1;\n\n\t\twhile (low <= high) {\n\t\t\tint mid = (low + high) >>> 1;\n\t\t\t\tdouble midVal = a[mid];\n\n\t\t\t\tint cmp;\n\t\t\t\tif (midVal < key) {\n\t\t\t\t\tcmp = -1; // Neither val is NaN, thisVal is smaller\n\t\t\t\t} else if (midVal > key) {\n\t\t\t\t\tcmp = 1; // Neither val is NaN, thisVal is larger\n\t\t\t\t} else {\n\t\t\t\t\tlong midBits = Double.doubleToLongBits(midVal);\n\t\t\t\t\tlong keyBits = Double.doubleToLongBits(key);\n\t\t\t\t\tcmp = (midBits == keyBits ? 0 : // Values are equal\n\t\t\t\t\t\t(midBits < keyBits ? -1 : // (-0.0, 0.0) or (!NaN, NaN)\n\t\t\t\t\t\t\t1)); // (0.0, -0.0) or (NaN, !NaN)\n\t\t\t\t}\n\n\t\t\t\tif (cmp < 0)\n\t\t\t\t\tlow = mid + 1;\n\t\t\t\telse if (cmp > 0)\n\t\t\t\t\thigh = mid - 1;\n\t\t\t\telse\n\t\t\t\t\treturn mid; // key found\n\t\t}\n\t\treturn -(low + 1); // key not found.\n\t}", "@Test\n\tpublic void testInterpolationSearch() {\n\t\tint[] numbers = {0, 1, 2, 3, 4, 5, 6};\n\t\tint r1 = _02_InterpolationSearch.interpolationSearch(numbers, 2);\n\t\tassertEquals(2, r1);\n\t\t\n\t\tint[] numbers2 = {2, 4, 6, 8, 10};\n\t\tint r2 = _02_InterpolationSearch.interpolationSearch(numbers2, 2);\n\t\tassertEquals(0, r2);\n\t\t\n\t\tint[] numbers3 = {100, 200, 300};\n\t\tint r3 = _02_InterpolationSearch.interpolationSearch(numbers3, 160);\n\t\tassertEquals(-1, r3);\n\n\t}", "@Test\n\tpublic void testExponentialSearch() {\n\t\tint[] numbers = {0, 1, 2, 3, 4, 5, 6};\n\t\tint r1 = _03_ExponentialSearch.exponentialSearch(numbers, 5);\n\t\tassertEquals(5, r1);\n\t\t\n\t\tint[] numbers2 = {3, 6, 12, 17};\n\t\tint r2 = _03_ExponentialSearch.exponentialSearch(numbers2, 6);\n\t\tassertEquals(1, r2);\n\t\t\n\t\tint[] numbers3 = {2, 5, 8, 11, 14};\n\t\tint r3 = _03_ExponentialSearch.exponentialSearch(numbers3, 3);\n\t\tassertEquals(-1, r3);\n\t\t\n\t}", "java.util.List<java.lang.Double> getFileList();", "public Registro(List<Double> d) \n { \n\t this.setContenido((ArrayList<Double>) d);\n }", "public NumericRangeFilter() {\n this(0.00, 999999.99);\n }", "float put(int idx, float val);", "public void add(int index, double value) {\n\t\t\n\t}", "public void get_InputValues(){\r\n\tA[1]=-0.185900;\r\n\tA[2]=-0.85900;\r\n\tA[3]=-0.059660;\r\n\tA[4]=-0.077373;\r\n\tB[1]=30.0;\r\n\tB[2]=19.2;\r\n\tB[3]=13.8;\r\n\tB[4]=22.5;\r\n\tC[1]=4.5;\r\n\tC[2]=12.5;\r\n\tC[3]=27.5;\r\n\tD[1]=16.0;\r\n\tD[2]=10.0;\r\n\tD[3]=7.0;\r\n\tD[4]=5.0;\r\n\tD[5]=4.0;\r\n\tD[6]=3.0;\r\n\t\r\n}", "public DocumentVector(double[] data) {\n\t\tthis(DSUtil.toDoubleList(data));\n\t\t// TODO Auto-generated constructor stub\n\t}", "public QueryFilter(List<ConditionalExpression> list) {\r\n\t\tthis.list = list;\r\n\t}", "final void setFloatPropertyValue(int index, float value) {\n if (index >= mProperties.size()) {\n throw new ArrayIndexOutOfBoundsException();\n }\n mFloatValues[index] = value;\n }", "Iterator<IntFloatEntry> iterator();", "public RootFinder(float lower, float upper, float accuracy){\n this.a = lower;\n this.b = upper;\n this.e = accuracy;\n \n }", "public Statistic(double[] values) {\n this(null, values);\n }", "public DocumentVector(Collection<Double> data) {\n\t\tinit(data);\n\t}", "public Vector2f set (float[] values)\n {\n return set(values[0], values[1]);\n }", "@Test\n public void testFind() {\n testAdd();\n assertEquals(list1.find(11.25), 0);\n assertEquals(list1.find(16.25), 3);\n }", "private void calculateNDCG(List<ScoreRetrieval> results,List<QuerieDocRelevance> querieRelevance){\n List<Double> ndcgResultsQuery = new ArrayList<>();\n List<Double> realdcgResults = new ArrayList<>();\n List<Double> idealDcgResults = new ArrayList<>();\n ScoreRetrieval resultT = results.get(0);\n Optional<QuerieDocRelevance> docMatch = querieRelevance.stream().filter(q -> resultT.getDocId()==q.getDocID()).findFirst();\n QuerieDocRelevance doc = docMatch.orElse(null); \n \n \n Collections.sort(querieRelevance);\n \n idealDcgResults.add((double) querieRelevance.get(0).getRelevance());\n \n if (doc != null) {\n realdcgResults.add((double)doc.getRelevance());\n } else {\n realdcgResults.add(0.0);\n }\n \n if(!(realdcgResults.isEmpty()) && !(idealDcgResults.isEmpty())){\n ndcgResultsQuery.add(realdcgResults.get(0)/idealDcgResults.get(0));\n }\n \n \n for(int i = 1;i<results.size() && i<querieRelevance.size();i++){\n ScoreRetrieval result = results.get(i);\n docMatch = querieRelevance.stream().filter(q -> result.getDocId()==q.getDocID()).findFirst();\n doc = docMatch.orElse(null);\n \n if(doc != null){\n realdcgResults.add(realdcgResults.get(i-1)+(double)doc.getRelevance()/(Math.log(i+1)/Math.log(2)));\n }else{\n realdcgResults.add(realdcgResults.get(i-1));\n }\n \n\n idealDcgResults.add(idealDcgResults.get(i-1)+(double) querieRelevance.get(i).getRelevance()/(Math.log(i+1)/Math.log(2)));\n\n \n ndcgResultsQuery.add(realdcgResults.get(i)/idealDcgResults.get(i));\n \n } \n \n \n ndcgResults.add(ndcgResultsQuery);\n \n }", "@Test\n\tpublic void testExponentialSearch() {\n\t}", "@Test\n public void testIndexMaintenanceWithIndexOnMethodValues() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID\",\n SEPARATOR + \"portfolio.values() pf\");\n assertTrue(i1 instanceof CompactRangeIndex);\n Cache cache = CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForValues(ri);\n }", "public static List<SummaSearcher> createSearchers(File termStatLocation, List<File> locations) throws Exception {\n List<SummaSearcher> searchers = new ArrayList<>(locations.size());\n Configuration conf = Configuration.load(\"integration/distribution/search_configuration.xml\");\n // TODO: Check if this unit test makes sense after upgrade to Lucene trunk in 2012\n/*\n if (termStatLocation != null) {\n conf.getSubConfiguration(\n LuceneSearchNode.CONF_TERMSTAT_CONFIGURATION).set(\n IndexWatcher.CONF_INDEX_WATCHER_INDEX_ROOT, \n termStatLocation.getAbsolutePath());\n }\n */\n\n int id = 0;\n for (File location : locations) {\n conf.set(IndexWatcher.CONF_INDEX_WATCHER_INDEX_ROOT, location);\n conf.set(RMISearcherProxy.CONF_BACKEND, SummaSearcherImpl.class.getCanonicalName());\n conf.set(RMISearcherProxy.CONF_SERVICE_NAME, \"searcher_\" + id);\n id++;\n searchers.add(new RMISearcherProxy(conf));\n }\n return searchers;\n }", "public static float[] getVector(\n Map<String, Map<String, List<Integer>>> index,\n List<String> allTerms,\n Map<String, List<Integer>> docTerms,\n int docCount) {\n\n float[] vector = new float[allTerms.size()];\n\n for (int i = 0; i < allTerms.size(); i++) {\n String term = allTerms.get(i);\n\n // the number of documents in which the term appears\n int termDocCount = 0;\n if (index.containsKey(term)) {\n termDocCount = index.get(term).size();\n }\n\n if (docTerms.containsKey(term)) {\n vector[i] =\n (float)\n (Math.sqrt(docTerms.get(term).size())\n * Math.log10((double) docCount / termDocCount));\n }\n }\n\n return vector;\n }", "public FloatGene(final Configuration a_config, final float a_lowerBound,\n final float a_upperBound)\n throws InvalidConfigurationException {\n super(a_config);\n m_lowerBound = a_lowerBound;\n m_upperBound = a_upperBound;\n }", "@Override\n public void init(SearchHits hits) { \n\n \tint numFbDocs = 50;\n \tint numFbTerms = 20;\n \tdouble lambda = 1.0;\n \tdouble alpha = 5.0;\n \t\n if (paramTable.get(FB_DOCS) != null ) \n \tnumFbDocs = paramTable.get(FB_DOCS).intValue();\n if (paramTable.get(FB_TERMS) != null ) \n \tnumFbTerms = paramTable.get(FB_TERMS).intValue();\n if (paramTable.get(LAMBDA) != null ) \n \tlambda = paramTable.get(LAMBDA).doubleValue();\n if (paramTable.get(ALPHA) != null ) \n \talpha = paramTable.get(ALPHA).doubleValue(); \n \n if (hits.size() < numFbDocs) \n \tnumFbDocs = hits.size();\n \n SearchHits fbDocs = new SearchHits(hits.hits().subList(0, numFbDocs));\n FeedbackRelevanceModel rm = new FeedbackRelevanceModel();\n rm.setDocCount(numFbDocs);\n rm.setTermCount(numFbTerms);\n rm.setIndex(index);\n rm.setStopper(null);\n rm.setRes(fbDocs);\n rm.build(); \n \n FeatureVector rmVector = rm.asFeatureVector();\n rmVector.clip(numFbTerms);\n rmVector.normalize();\n \n TermTimeSeries ts = new TermTimeSeries(startTime, endTime, interval, \n \t\trm.asFeatureVector().getFeatures());\n \n for (SearchHit hit: hits.hits()) {\n \t\tlong docTime = TemporalScorer.getTime(hit);\n \t\tdouble score = hit.getScore();\n \t\tts.addDocument(docTime, score, hit.getFeatureVector());\n }\n \n RUtil rutil = new RUtil();\n \n double sdps =0;\n for (String term: rmVector.getFeatures()) {\n \tdouble[] tsw = ts.getTermFrequencies(term);\n \tif (sum(tsw) > 0) {\n \t\ttry {\n \t\t\tsdps += rutil.dps(tsw);\n \t\t} catch (Exception e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t}\n } \n \n FeatureVector tsfv = new FeatureVector(null);\n for (String term: rmVector.getFeatures()) {\n \tdouble[] termts = ts.getTermFrequencies(term);\n \ttry {\n \t\tdouble dps = rutil.dps(termts)/sdps;\n \t\t\n \tdouble weight = Math.pow(dps, alpha) * Math.pow(rmVector.getFeatureWeight(term), (1-alpha));\n tsfv.addTerm(term, weight);\n \n \t} catch (Exception e) {\n \t\te.printStackTrace();\n \t}\n }\n tsfv.normalize();\n\n gQuery.getFeatureVector().normalize();\n FeatureVector fv =\n \t\tFeatureVector.interpolate(gQuery.getFeatureVector(), tsfv, lambda);\n gQuery.setFeatureVector(fv);\n \n System.out.println(rmVector.toString(10));\n System.out.println(tsfv.toString(10));\n System.out.println(fv.toString(10));\n rutil.close();\n \n }", "public SFVec3f(float t[]) {\n\t\tset(t);\n\t}", "Double getStartFloat();", "@Test\n public void testFloatInRange() {\n int lowEnd = -10;\n int highEnd = 10;\n Optional<NumberValue> optRslt = floatService.floatInRange(lowEnd, highEnd);\n assertTrue(optRslt.isPresent());\n NumberValue numberValue = optRslt.get();\n assertTrue(lowEnd * 1.0 <= numberValue.getNumber().doubleValue());\n assertTrue(highEnd * 1.0 >= numberValue.getNumber().doubleValue());\n System.out.println(\"Number Value = \" + numberValue.toString());\n }", "public static FplList fromValue(FplValue value) {\n\t\tFplValue[][] data = new FplValue[1][];\n\t\tdata[0] = bucket(value);\n\t\treturn new FplList(data);\n\t}", "public BaselineList(ArrayList<float[]> list) {\n\t\tthis.listNum = list.size();\n\t\tthis.capacity = listNum * 2;\n\t\tthis.list = new ArrayList<float[]>(list);\n\t}", "public List<Vector<Double>> createFeatureVectors(List<List<RecordBean>> splittedRecordBeansList){\n\n List<Vector<Double>> featureVectorList = new ArrayList<>();\n for(int i = 0; i < splittedRecordBeansList.size(); i++){\n Vector<Double> featureVector = new Vector<>(5);\n featureVector.add(averagePacketsperRequest(splittedRecordBeansList.get(i)));\n featureVector.add(averageBytesperRequest(splittedRecordBeansList.get(i)));\n featureVector.add(getPacketEntropyDistribution(splittedRecordBeansList.get(i)));\n featureVector.add(getByteEntropyDistribution(splittedRecordBeansList.get(i)));\n featureVector.addAll((getProtocolRatios(splittedRecordBeansList.get(i))));\n featureVector.add(getLabel(splittedRecordBeansList.get(i)));\n featureVectorList.add(featureVector);\n }\n\n return featureVectorList;\n }", "@Test\n public void testIndexMaintenanceWithIndexOnMethodGetValues() throws Exception {\n Index i1 =\n qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID\",\n SEPARATOR + \"portfolio.getValues() pf\");\n assertTrue(i1 instanceof CompactRangeIndex);\n Cache cache = CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForValues(ri);\n }", "private int locate (List<Integer> list, int hash) {\n\t\tif (list.size() == 0) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tint index_a = -1;\n\t\tint index_b = list.size();\n\t\tfloat value_a = (float)list.get(index_a+1);\n\t\tfloat value_b = (float)list.get(index_b-1);\n\t\tfloat hash_float = (float)hash;\n\n\t\tif (hash <= value_a) {\n\t\t\treturn 0;\n\t\t}\n\t\tif (hash > value_b) {\n\t\t\treturn list.size();\n\t\t}\n\n\t\twhile (index_b - index_a > 1) {\n\t\t\tint index_mid = index_a+(int)((float)(index_b-index_a)*(hash_float-value_a)/(value_b-value_a));\n\t\t\tif (index_mid == index_a) {\n\t\t\t\tindex_mid++;\n\t\t\t} else if (index_mid == index_b) {\n\t\t\t\tindex_mid--;\n\t\t\t}\n\t\t\tif (hash >= list.get(index_mid)) {\n\t\t\t\tindex_a = index_mid;\n\t\t\t\tvalue_a = list.get(index_a);\n\t\t\t} else {\n\t\t\t\tindex_b = index_mid;\n\t\t\t\tvalue_b = list.get(index_b);\n\t\t\t}\n\t\t}\n\t\tif (hash == list.get(index_a)) {\n\t\t\treturn index_a;\n\t\t}\n\t\treturn index_b;\n\t}", "public FloatGene(final Configuration a_config)\n throws InvalidConfigurationException {\n this(a_config, - (Float.MAX_VALUE / 2),\n Float.MAX_VALUE / 2);\n }", "public FloatLiteral(Range range, AstNode parent, String rawString) {\n super(range, parent, rawString);\n // this.isDouble = isDouble(rawString);\n // this.value = parseFloat(rawString);\n }", "public OCFloat(float val)\r\n {\r\n super(val, 4);\r\n }", "public static boundedValue findAverage(ArrayList<Firm> list, String state)\n\t{\t\t\n\t\tArrayList<Float> beforeTQAvg = new ArrayList<Float>();\n\t\tArrayList<Float> afterTQAvg = new ArrayList<Float>();\n\t\t\n\t\tArrayList<Float> beforeTQSICAvg = new ArrayList<Float>();\n\t\tArrayList<Float> afterTQSICAvg = new ArrayList<Float>();\n\t\t\n\t\tArrayList<Float> beforeProfSICAvg = new ArrayList<Float>();\n\t\tArrayList<Float> afterProfSICAvg = new ArrayList<Float>();\n\t\t\n\t\tArrayList<Float> beforeProfAvg = new ArrayList<Float>();\n\t\tArrayList<Float> afterProfAvg = new ArrayList<Float>();\n\t\t\n\t\tint[] interval = new int[3];\n\t\tif(state == \"before\"){\n\t\t interval = makeBeforeInterval(list);\t\n\t\t} else if(state == \"after\") {\n\t\t\tinterval = makeAfterInterval(list);\n\t\t} else if(state == \"during\") {\n\t\t\tinterval = makeDuringInterval(list);\n\t\t} else {\n\t\t\tSystem.out.println(\"hmmm we shouldn't be here!\");\n\t\t}\n\t\t\n\t\tboundedValue value = new boundedValue();\n\t\t\n\t\tvalue.start = interval[0];\n\t\tvalue.mid = interval[1];\n\t\tvalue.end = interval[2];\n\t\tvalue.quarterSpan = value.end - value.start;\t\t\n\n\t\tArrayList<Firm> tmp = new ArrayList<Firm>();\n\t\t\n\t\tfor(int i = 0; i < list.size();i++){\n\t\t\tvalue.cusip = list.get(i).cusip;\n\t\t\tvalue.sic = list.get(i).sic;\n\n\t\t\tif( (utils.qM2.get(list.get(i).dateIndex) >= value.start) &&\n\t\t\t\t(utils.qM2.get(list.get(i).dateIndex) < value.mid))\n\t\t\t{\t\t\t\t\n\t\t\t\tbeforeTQAvg.add(Float.parseFloat(list.get(i).Tobins_Q));\n\t\t\t\ttmp = getFirmsInQuarterRangeWithSIC(value.start, value.mid, value.sic, state);\t\t\t\t\n\t\t\t\tfor(int k = 0; k < tmp.size(); k++){\n\t\t\t\t\tbeforeTQSICAvg.add(Float.parseFloat(tmp.get(k).Tobins_Q));\t\t\t\t\t\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\telse if( (utils.qM2.get(list.get(i).dateIndex) > (value.mid +1)) &&\n\t\t\t\t\t (utils.qM2.get(list.get(i).dateIndex) <= value.end))\n\t\t\t{\t\t\t\t\n\t\t\t\tafterTQAvg.add(Float.parseFloat(list.get(i).Tobins_Q));\n\t\t\t\ttmp = getFirmsInQuarterRangeWithSIC((value.mid +1), value.end, value.sic, state);\t\t\t\t\n\t\t\t\tfor(int k = 0; k < tmp.size(); k++){\n\t\t\t\t\tafterTQSICAvg.add(Float.parseFloat(tmp.get(k).Tobins_Q));\n\t\t\t\t}\t\t\t\t\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\tfloat[] resultTQ = new float[3];\n\t\tresultTQ[0] = utils.averageN(beforeTQAvg);\n\t\tresultTQ[1] = utils.averageN(afterTQAvg);\n\t\t// \t\t\t beforeAverage - afterAverage (interval)\n\t\tresultTQ[2] = (resultTQ[1] - resultTQ[0]) / value.quarterSpan;\t\t\n\t\tvalue.beforeAverageTQFirm = resultTQ[0];\t\t\n\t\tvalue.afterAverageTQFirm = resultTQ[1];\t\t\n\t\tvalue.quarterlyIntervalTQDifference = resultTQ[2];\t\t\n\t\t\n\t\tfloat[] resultSIC2 = new float[3];\n\t\tresultSIC2[0] = utils.averageN(beforeTQSICAvg);\n\t\tresultSIC2[1] = utils.averageN(afterTQSICAvg);\n\t\t//\t\t beforeAverage - afterAverage (interval)\n\t\tresultSIC2[2] = (resultSIC2[1] - resultSIC2[0]) / value.quarterSpan;\t\t\n\t\tvalue.beforeAverageTQSIC = resultSIC2[0];\n\t\tvalue.afterAverageTQSIC = resultSIC2[1];\n\t\tvalue.quarterlyIntervalTQDifferenceSIC = resultSIC2[2];\n\n\t\treturn value;\n\t}", "public abstract ParameterVector searchVector();", "public abstract int getIndexForAngle(float paramFloat);", "public void set(VectorFloat values) {\n for (int i = 0; i < values.storage.length; i++) {\n storage[i] = values.storage[i];\n }\n }", "FloatValue createFloatValue();", "FloatValue createFloatValue();", "public LongOpenHashSet(final LongIterator i, final float f) {\n\t\tthis(DEFAULT_INITIAL_SIZE, f);\n\t\twhile (i.hasNext())\n\t\t\tadd(i.nextLong());\n\t}", "public org.apache.spark.ml.param.ParamPair<double[]> w (java.util.List<java.lang.Double> value) { throw new RuntimeException(); }", "@Override\n\tpublic void setValueSparse(final int indexOfIndex, final double value) {\n\n\t}", "public void set(float[] values) {\n for (int i = 0; i < values.length; i++) {\n storage[i] = values[i];\n }\n }", "public static IndexExpression makeIndex(Expression instance, PropertyInfo indexer, Iterable<Expression> arguments) { throw Extensions.todo(); }", "@Override\n\tpublic List<Gasto> findByValor(Float valor) {\n\t\treturn (List<Gasto>) gastoModel.findByValor(valor);\n\t}", "public RangeVector(float[] values, float[] upper, float[] lower) {\n checkArgument(values.length > 0, \" dimensions must be > 0\");\n checkArgument(values.length == upper.length && upper.length == lower.length, \"dimensions must be equal\");\n for (int i = 0; i < values.length; i++) {\n checkArgument(upper[i] >= values[i] && values[i] >= lower[i], \"incorrect semantics\");\n }\n this.values = Arrays.copyOf(values, values.length);\n this.upper = Arrays.copyOf(upper, upper.length);\n this.lower = Arrays.copyOf(lower, lower.length);\n }", "public double[] getDoubleList();", "DbQuery setStartAtFilter(double value) {\n filter = Filter.START;\n filterType = FilterType.DOUBLE;\n this.startAt = value;\n return this;\n }", "static <T> Nda<T> of( List<T> values ) { return TensorImpl._of(values); }", "public static int indexOf(double[] list, double val) {\n\t\tfor(int i=0; i<list.length; i++) {\n\t\t\tif (list[i] == val) return i;\n\t\t}\n\t\treturn -1;\n\t}", "public void learnVector(final Calendar when, final List<Double> vals);", "private double energyAt(Integer jValueToFind, Map<Integer, Double> energyList) throws NoSuchEnergyException\r\n\t{\r\n\t\tfor (Map.Entry<Integer, Double> entry : energyList.entrySet()) {\r\n\t\t\tif (entry.getKey() == jValueToFind) {\r\n\t\t\t\treturn entry.getValue();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthrow new NoSuchEnergyException(\"Could not find the requested energy with J=\" + jValueToFind);\r\n\t}", "public ElementVariable(IntVar index, IntVar[] list, IntVar value, int indexOffset) {\n\n\t queueIndex = 2;\n\n\t\tassert (index != null) : \"Variable index is null\";\n\t\tassert (list != null) : \"Variable list is null\";\n\t\tassert (value != null) : \"Variable value is null\";\n\n\t\tthis.indexOffset = indexOffset;\n\t\tthis.numberId = idNumber++;\n\t\tthis.index = index;\n\t\tthis.value = value;\n\t\tthis.numberArgs = (short) (numberArgs + 2);\n\t\tthis.list = new IntVar[list.length];\n\n\t\tfor (int i = 0; i < list.length; i++) {\n\t\t\tassert (list[i] != null) : i + \"-th element of list is null\";\n\t\t\tthis.list[i] = list[i];\n\t\t\tthis.numberArgs++;\n\t\t}\n\n\t\tthis.indexRange = new IntervalDomain(1 + this.indexOffset, list.length + this.indexOffset);\n\n\t}", "public void getIndices (short[] indices) {\r\n \t\tif (indices.length < getNumIndices())\r\n \t\t\tthrow new IllegalArgumentException(\"not enough room in indices array, has \" + indices.length + \" floats, needs \"\r\n \t\t\t\t+ getNumIndices());\r\n \t\tint pos = getIndicesBuffer().position();\r\n \t\tgetIndicesBuffer().position(0);\r\n \t\tgetIndicesBuffer().get(indices, 0, getNumIndices());\r\n \t\tgetIndicesBuffer().position(pos);\r\n \t}", "public Element.Builder setValues(final List<Sample> value) {\n _values = value;\n return this;\n }", "protected abstract void setValues(double[] values);", "public List<IResult> getResults(List<Integer> relatedDocs, String query) {\r\n\r\n // results\r\n List<IResult> rs = new ArrayList<>();\r\n List<Double> documentVector, queryVector = new ArrayList<>();\r\n\r\n Map<String, Integer> termFreqs = this.preprocessor.processQuery(query);\r\n\r\n for(String op : new String[]{\"and\", \"or\", \"not\"}) {\r\n termFreqs.remove(op);\r\n }\r\n\r\n\r\n double highestVal = 0;\r\n\r\n // query TF-IDF vector\r\n for(String term : termFreqs.keySet()) {\r\n\r\n // unknown term == contained in no doc\r\n if(!this.index.getDict().containsKey(term)) {\r\n continue;\r\n }\r\n\r\n // # docs where term occurs in\r\n int termTotalFreq = this.index.getTermInDocCount(term);\r\n\r\n // query tf-idf vector\r\n double qTfIdf = this.tfidf.tfidfQuery(termFreqs.get(term), termTotalFreq);\r\n queryVector.add(qTfIdf);\r\n\r\n if(qTfIdf > highestVal) highestVal = qTfIdf;\r\n }\r\n\r\n // query vector normalization\r\n for(int i = 0; i < queryVector.size(); i++) {\r\n queryVector.set(i, queryVector.get(i)/highestVal);\r\n }\r\n\r\n\r\n for(int docId : relatedDocs) {\r\n documentVector = new ArrayList<>();\r\n highestVal = 0;\r\n\r\n for(String term : termFreqs.keySet()) {\r\n\r\n // unknown term == contained in no doc\r\n if(!this.index.getDict().containsKey(term)) {\r\n continue;\r\n }\r\n\r\n // document tf-idf vector\r\n double dTfIdf = this.tfidf.getTfIdf(term, docId);\r\n documentVector.add(dTfIdf);\r\n\r\n if(dTfIdf > highestVal) highestVal = dTfIdf;\r\n }\r\n\r\n // document vector normalization\r\n for(int i = 0; i < documentVector.size(); i++) {\r\n documentVector.set(i, documentVector.get(i)/highestVal);\r\n }\r\n\r\n Result result = new Result();\r\n result.setDocumentId(this.docs.get(docId).getUrl());\r\n result.setDocument(this.docs.get(docId));\r\n result.setScore((float) CosineSimilarity.process(documentVector, queryVector));\r\n rs.add(result);\r\n }\r\n\r\n Collections.sort(rs, new ResultComparator());\r\n\r\n // limit number of results\r\n if(rs.size() > IndexerConfig.MAX_RESULT_COUNT)\r\n rs = rs.subList(0, IndexerConfig.MAX_RESULT_COUNT);\r\n\r\n // rank it\r\n for(int i = 0; i < rs.size(); i++) {\r\n ((Result) rs.get(i)).setRank (i + 1);\r\n }\r\n\r\n return rs;\r\n }", "@Test\n public void testSearch() throws Exception {\n LocalLandCharge localLandChargeOne = TestUtils.buildLocalLandCharge();\n localLandChargeOne.getItem().setChargeCreationDate(new Date(1));\n\n LocalLandCharge localLandChargeTwo = TestUtils.buildLocalLandCharge();\n localLandChargeTwo.getItem().setChargeCreationDate(new Date(3));\n\n LocalLandCharge localLandChargeThree = TestUtils.buildLocalLandCharge();\n localLandChargeThree.getItem().setChargeCreationDate(new Date(2));\n\n LocalLandCharge lightObstructionNotice = TestUtils.buildLONCharge();\n localLandChargeTwo.getItem().setChargeCreationDate(new Date(4));\n\n testGenerate(Lists.newArrayList(localLandChargeOne, localLandChargeTwo, localLandChargeThree,\n lightObstructionNotice));\n }", "public void setArray(float[] paramArrayOfFloat)\n/* */ {\n/* 791 */ if (paramArrayOfFloat == null) {\n/* 792 */ setNullArray();\n/* */ }\n/* */ else {\n/* 795 */ setArrayGeneric(paramArrayOfFloat.length);\n/* */ \n/* 797 */ this.elements = new Object[this.length];\n/* */ \n/* 799 */ for (int i = 0; i < this.length; i++) {\n/* 800 */ this.elements[i] = Float.valueOf(paramArrayOfFloat[i]);\n/* */ }\n/* */ }\n/* */ }", "public F64Vector(double[] values, int offset, int length) {\n this(length);\n System.arraycopy(values, offset, data, 0, length);\n }", "public PeakAlysis(float f[], float x[])\r\n {\r\n }", "public List<Float> getFloatList(final String key) {\n return getFloatList(key, new ArrayList<>());\n }", "public ElementVariable(IntVar index, ArrayList<? extends IntVar> list, IntVar value, int indexOffset) {\n\n\t\tthis(index, list.toArray(new IntVar[list.size()]), value, indexOffset);\n\n\t}" ]
[ "0.56142986", "0.5336028", "0.5311813", "0.5265053", "0.5179382", "0.50784177", "0.50573754", "0.50468516", "0.5045051", "0.49860933", "0.49484935", "0.49310425", "0.48907077", "0.48552555", "0.48435503", "0.48423734", "0.4841441", "0.48323768", "0.48142073", "0.48081082", "0.48062623", "0.47930694", "0.47663096", "0.47593662", "0.4730682", "0.4718765", "0.47128925", "0.47111034", "0.4707254", "0.4682951", "0.46627927", "0.46504033", "0.46217328", "0.46163246", "0.4615327", "0.46090883", "0.45992368", "0.45693582", "0.4566087", "0.45634228", "0.45524842", "0.45305532", "0.45278347", "0.45222017", "0.45172122", "0.4514176", "0.45034313", "0.44918767", "0.44884148", "0.44850188", "0.4481744", "0.44813678", "0.446946", "0.44651902", "0.44579422", "0.44493", "0.44482616", "0.44436103", "0.4441733", "0.4441096", "0.44394708", "0.44348153", "0.4434354", "0.4425009", "0.44244066", "0.44229874", "0.4422901", "0.44091836", "0.4409017", "0.4401826", "0.44001868", "0.4399428", "0.43986943", "0.4398464", "0.43969592", "0.43969592", "0.43945435", "0.43905476", "0.43901578", "0.4386886", "0.43782663", "0.43774492", "0.4377286", "0.43758798", "0.43708518", "0.43701136", "0.4369626", "0.43585125", "0.43558952", "0.4350538", "0.43493742", "0.43493336", "0.4348402", "0.43474594", "0.43468273", "0.43430236", "0.43410364", "0.4340874", "0.43406492", "0.43393424" ]
0.652816
0
Gets index of the element, in the ordered list of floating point values, that is greater or equal than the given floating point value.
protected int search(double value) { int n = sequence.size(); int left = 0, right = n - 1, index = 0; while (left != right) { index = (right - left) / 2 + left; if (value >= sequence.get(index == left ? index + 1 : index)) { left = index == left ? index + 1 : index; } else { right = index; } } while (left > 0 && value == sequence.get(left - 1)) { left -= 1; } return left; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void getIndex(){\n List <Double> list = new ArrayList<>();\n list.add(1.0);\n list.add(2.0);\n list.add(3.0);\n list.add(4.0);\n\n assertEquals(0,list.indexOf(1.0));\n }", "int compareToFloat(floats f);", "@Override\n\tpublic int binarySearchXValues(double fKey)\n\t{\n\t\treturn Arrays.binarySearch(this.afXValues, (float) fKey);\n\t}", "private int locate (List<Integer> list, int hash) {\n\t\tif (list.size() == 0) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tint index_a = -1;\n\t\tint index_b = list.size();\n\t\tfloat value_a = (float)list.get(index_a+1);\n\t\tfloat value_b = (float)list.get(index_b-1);\n\t\tfloat hash_float = (float)hash;\n\n\t\tif (hash <= value_a) {\n\t\t\treturn 0;\n\t\t}\n\t\tif (hash > value_b) {\n\t\t\treturn list.size();\n\t\t}\n\n\t\twhile (index_b - index_a > 1) {\n\t\t\tint index_mid = index_a+(int)((float)(index_b-index_a)*(hash_float-value_a)/(value_b-value_a));\n\t\t\tif (index_mid == index_a) {\n\t\t\t\tindex_mid++;\n\t\t\t} else if (index_mid == index_b) {\n\t\t\t\tindex_mid--;\n\t\t\t}\n\t\t\tif (hash >= list.get(index_mid)) {\n\t\t\t\tindex_a = index_mid;\n\t\t\t\tvalue_a = list.get(index_a);\n\t\t\t} else {\n\t\t\t\tindex_b = index_mid;\n\t\t\t\tvalue_b = list.get(index_b);\n\t\t\t}\n\t\t}\n\t\tif (hash == list.get(index_a)) {\n\t\t\treturn index_a;\n\t\t}\n\t\treturn index_b;\n\t}", "public static int indexOf(double[] list, double val) {\n\t\tfor(int i=0; i<list.length; i++) {\n\t\t\tif (list[i] == val) return i;\n\t\t}\n\t\treturn -1;\n\t}", "private int findNearestValue(final int i, final double key) {\n\n\t\tint low = 0;\n\t\tint high = m_NumValues[i];\n\t\tint middle = 0;\n\t\twhile (low < high) {\n\t\t\tmiddle = (low + high) / 2;\n\t\t\tdouble current = m_seenNumbers[i][middle];\n\t\t\tif (current == key) {\n\t\t\t\treturn middle;\n\t\t\t}\n\t\t\tif (current > key) {\n\t\t\t\thigh = middle;\n\t\t\t} else if (current < key) {\n\t\t\t\tlow = middle + 1;\n\t\t\t}\n\t\t}\n\t\treturn low;\n\t}", "@Override\n\tpublic int has(Comparable value) {\n\t\t\n\t\tint lowerBound = 0;\n\t\tint upperBound = currentIndex - 1;\n\t\tint current;\n\t\t\n\t\twhile (true) {\n\t\t\t\n\t\t\tcurrent = (lowerBound + upperBound) / 2;\n\t\t\t\n\t\t\tif (array[current].equalsWith(value)) {\n\t\t\t\t//element is successfully found\n\t\t\t\treturn current;\n\t\t\t} else if (lowerBound > upperBound) {\n\t\t\t\t// not found\n\t\t\t\treturn -1;\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tif (array[current].lessThan(value)) {\n\t\t\t\t\tlowerBound = current + 1; //in higher half\n\t\t\t\t} else {\n\t\t\t\t\tupperBound = current - 1; //in lower half\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "public int getIndexForXVal(double xVal) {\n\t\tint upper = pointList.size()-1;\n\t\tint lower = 0;\n\t\t\n\t\tif (pointList.size()==0)\n\t\t\treturn 0;\n\t\t\n\t\t//TODO Are we sure an binarySearch(pointList, xVal) wouldn't be a better choice here?\n\t\t//it can gracefully handle cases where the key isn't in the list of values...\n\t\tdouble stepWidth = (pointList.get(pointList.size()-1).getX()-pointList.get(0).getX())/(double)pointList.size();\n\t\t\n\t\tint index = (int)Math.floor( (xVal-pointList.get(0).getX())/stepWidth );\n\t\t//System.out.println(\"Start index: \" + index);\n\t\t\n\t\t//Check to see if we got it right\n\t\tif (index>=0 && (index<pointList.size()-1) && pointList.get(index).getX() < xVal && pointList.get(index+1).getX()>xVal) {\n\t\t\t//System.out.println(\"Got it right on the first check, returning index : \" + index);\n\t\t\treturn index;\n\t\t}\n\t\t\t\t\n\t\t//Make sure the starting index is sane (between upper and lower)\n\t\tif (index<0 || index>=pointList.size() )\n\t\t\tindex = (upper+lower)/2; \n\t\t\n\t\tif (xVal < pointList.get(0).getX()) {\n\t\t\treturn 0;\n\t\t}\n\t\t\t\n\t\tif(xVal > pointList.get(pointList.size()-1).getX()) {\n\t\t\treturn pointList.size()-1;\n\t\t}\n\t\t\n\t\tint count = 0;\n\t\twhile( upper-lower > 1) {\n\t\t\tif (xVal < pointList.get(index).getX()) {\n\t\t\t\tupper = index;\n\t\t\t}\n\t\t\telse\n\t\t\t\tlower = index;\n\t\t\tindex = (upper+lower)/2;\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\treturn index;\n\t}", "private static int binarySearch0(float[] a, int fromIndex, int toIndex,\n\t\t\tfloat key) {\n\t\tint low = fromIndex;\n\t\tint high = toIndex - 1;\n\n\t\twhile (low <= high) {\n\t\t\tint mid = (low + high) >>> 1;\n\t\tfloat midVal = a[mid];\n\n\t\tint cmp;\n\t\tif (midVal < key) {\n\t\t\tcmp = -1; // Neither val is NaN, thisVal is smaller\n\t\t} else if (midVal > key) {\n\t\t\tcmp = 1; // Neither val is NaN, thisVal is larger\n\t\t} else {\n\t\t\tint midBits = Float.floatToIntBits(midVal);\n\t\t\tint keyBits = Float.floatToIntBits(key);\n\t\t\tcmp = (midBits == keyBits ? 0 : // Values are equal\n\t\t\t\t(midBits < keyBits ? -1 : // (-0.0, 0.0) or (!NaN, NaN)\n\t\t\t\t\t1)); // (0.0, -0.0) or (NaN, !NaN)\n\t\t}\n\n\t\tif (cmp < 0)\n\t\t\tlow = mid + 1;\n\t\telse if (cmp > 0)\n\t\t\thigh = mid - 1;\n\t\telse\n\t\t\treturn mid; // key found\n\t\t}\n\t\treturn -(low + 1); // key not found.\n\t}", "private static int findIndexOfLargest(float[] vector) {\n\t\tint index = -1;\n\t\tfloat value = Float.NEGATIVE_INFINITY;\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}", "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}", "float getNotIn(int index);", "static int BinarySerach_lowerEqualValue(ArrayList<Integer> list , int value){\r\n\t\t\t\r\n\t\t\tint mid,l,r;\r\n\t\t\t\r\n\t\t\tl = 0;\r\n\t\t\tr = list.size()-1;\r\n\t\t\t\r\n\t\t\tif(value>=list.get(r))\r\n\t\t\t\treturn r;\r\n\t\t\tif(value<=list.get(l))\r\n\t\t\t\treturn l;\r\n\t\t\t\r\n\t\t\tmid = (l+r)/2;\r\n\t\t\t\r\n\t\t\twhile(l<r){\r\n\t\t\t\t\r\n\t\t\t\tmid = (l+r)/2;\r\n\t\t\t\t\r\n\t\t\t\tif(list.get(mid)==value)\r\n\t\t\t\t\treturn mid;\r\n\t\t\t\t\r\n\t\t\t\tif(mid+1<list.size() && list.get(mid)<=value && list.get(mid+1)>value)\r\n\t\t\t\t\treturn mid;\r\n\t\t\t\tif(mid-1>0 && list.get(mid-1)<=value && list.get(mid)>value)\r\n\t\t\t\t\treturn mid-1;\r\n\t\t\t\tif(list.get(mid)<value)\r\n\t\t\t\t\tl = mid+1;\r\n\t\t\t\telse\r\n\t\t\t\t\tr = mid-1;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\treturn -1;\r\n\t\t}", "int getIndexOfElement(T value);", "private int findCoordElementRegular(double coordValue, boolean bounded) {\n int n = orgGridAxis.getNcoords();\n if (n == 1 && bounded)\n return 0;\n\n double distance = coordValue - orgGridAxis.getCoordEdge1(0);\n double exactNumSteps = distance / orgGridAxis.getResolution();\n // int index = (int) Math.round(exactNumSteps); // ties round to +Inf\n int index = (int) exactNumSteps; // truncate down\n\n if (bounded && index < 0)\n return 0;\n if (bounded && index >= n)\n return n - 1;\n\n // check that found point is within interval\n if (index >= 0 && index < n) {\n double lower = orgGridAxis.getCoordEdge1(index);\n double upper = orgGridAxis.getCoordEdge2(index);\n if (orgGridAxis.isAscending()) {\n assert lower <= coordValue : lower + \" should be le \" + coordValue;\n assert upper >= coordValue : upper + \" should be ge \" + coordValue;\n } else {\n assert lower >= coordValue : lower + \" should be ge \" + coordValue;\n assert upper <= coordValue : upper + \" should be le \" + coordValue;\n }\n }\n\n return index;\n }", "public int binarySearch(ArrayList<Integer> a, int val){\n int low = 0;\n int high = a.size() - 1;\n \n while(high - low > 3){\n int mid = (low + high)/2;\n if(a.get(mid) > val){\n high = mid - 1;\n }\n else{\n low = mid; \n }\n }\n int i;\n for(i=low; i<=high; ++i){\n if(a.get(i) > val)\n return i;\n }\n return i;\n }", "protected int findInterval( Double val ){\n\t\tfor( int i = 0; i < histogram.length; i++ ){\n\t\t\tif( (lowerBound + i * this.interval) >= val )\n\t\t\t\treturn Math.max( 0, i - 1 );\n\t\t}\n\t\treturn histogram.length - 1;\n\t}", "public static double findNearestElement(double[] values, double item) {\n\n //defining some variables to use.\n double nearestElement = 0;\n double differenceLowest = 300;\n\n // Loop invariant is: 0 <= i < values.length.\n for (int i = 0; i < values.length; i++){\n\n /* Gets the absolute value for the difference between the input item\n * and the current value in the array.\n */\n double difference = java.lang.Math.abs(item - values[i]);\n\n /* Checks whether the current difference is less than the lowest distance.\n * if this is the case, the value of the new lowest difference is assigned\n * to the differenceLowest variable.\n */\n if (difference < differenceLowest){\n differenceLowest = difference;\n // Assigns the value of the current array element to the nearestElement variable.\n nearestElement = values[i];\n }\n } \n return nearestElement;\n }", "static int BinarySerach_lowerValue(ArrayList<Integer> list , int value){\r\n\t\t\r\n\t\tint mid,l,r;\r\n\t\t\r\n\t\tl = 0;\r\n\t\tr = list.size()-1;\r\n\t\t\r\n\t\tif(value>=list.get(r))\r\n\t\t\treturn r;\r\n\t\tif(value<=list.get(l))\r\n\t\t\treturn -1;\r\n\t\t\r\n\t\tmid = (l+r)/2;\r\n\t\t\r\n\t\twhile(l<r){\r\n\t\t\t\r\n\t\t\tmid = (l+r)/2;\r\n\t\t\t\r\n\t\t\tif(list.get(mid)==value)\r\n\t\t\t\treturn mid-1;\r\n\t\t\t\r\n\t\t\tif(mid+1<list.size() && list.get(mid)<value && list.get(mid+1)>=value)\r\n\t\t\t\treturn mid;\r\n\t\t\tif(mid-1>0 && list.get(mid-1)<value && list.get(mid)>=value)\r\n\t\t\t\treturn mid-1;\r\n\t\t\tif(list.get(mid)<value)\r\n\t\t\t\tl = mid+1;\r\n\t\t\telse\r\n\t\t\t\tr = mid-1;\r\n\t\t}\r\n\t\t\t\r\n\t\treturn -1;\r\n\t}", "public int searchStrictlyGreater(T key) {\n if ((array.length == 1) ||\n (array[0].compareTo(key) == -1) ||\n (array[array.length - 1].compareTo(key) == 1)) {\n return 0;\n }\n\n int start = 0, end = array.length - 2;\n\n do {\n int mid = start + (end - start)/2;\n if (array[mid].compareTo(key) <= 0) {\n if (array[mid + 1].compareTo(key) > 0) {\n return mid + 1;\n }\n else {\n start = mid + 1;\n }\n }\n else {\n end = mid - 1;\n }\n }\n while (start <= end);\n\n return 0;\n }", "private int findIndexOfMax(){\n\t\tint value=0;\n\t\tint indexlocation=0;\n\t\tfor(int i=0; i<myFreqs.size();i++){\n\t\t\tif(myFreqs.get(i)>value){\n\t\t\t\tvalue = myFreqs.get(i);\n\t\t\t\tindexlocation =i;\n\t\t\t}\n\t\t}\n\t\treturn indexlocation;\n\t}", "static int BinarySerach_upperValue(ArrayList<Integer> list , int value){ \r\n\t\t\r\n\t\tint mid,l,r;\r\n\t\t\r\n\t\tl = 0;\r\n\t\tr = list.size()-1;\r\n\t\t\r\n\t\tif(value>=list.get(r))\r\n\t\t\treturn r;\r\n\t\tif(value<=list.get(l))\r\n\t\t\treturn l;\r\n\t\t\r\n\t\tmid = (l+r)/2;\r\n\t\t\r\n\t\twhile(l<r){\r\n\t\t\t\r\n\t\t\tmid = (l+r)/2;\r\n\t\t\t\r\n\t\t\tif(list.get(mid)==value)\r\n\t\t\t\treturn mid;\r\n\t\t\t\r\n\t\t\tif(mid+1<list.size() && list.get(mid)<value && list.get(mid+1)>=value)\r\n\t\t\t\treturn mid+1;\r\n\t\t\tif(mid-1>0 && list.get(mid-1)<value && list.get(mid)>=value)\r\n\t\t\t\treturn mid;\r\n\t\t\tif(list.get(mid)<value)\r\n\t\t\t\tl = mid+1;\r\n\t\t\telse\r\n\t\t\t\tr = mid-1;\r\n\t\t}\r\n\t\t\t\r\n\t\treturn -1;\r\n\t}", "private static int getMinDistIndex(ArrayList<Double> list, int indexNotInterested) {\n \tdouble newDistMin = Double.MAX_VALUE;\n\t\tint newMinDistIndex = -1;\n\t\t\n\t\tfor(int i = 0; i < list.size(); i++) {\n\t\t\tif(i != indexNotInterested && newDistMin > list.get(i)) {\n\t\t\t\tnewDistMin = list.get(i);\n\t\t\t\tnewMinDistIndex = i;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn newMinDistIndex;\n }", "private static int binarySearch0(double[] a, int fromIndex, int toIndex,\n\t\t\tdouble key) {\n\t\tint low = fromIndex;\n\t\tint high = toIndex - 1;\n\n\t\twhile (low <= high) {\n\t\t\tint mid = (low + high) >>> 1;\n\t\t\t\tdouble midVal = a[mid];\n\n\t\t\t\tint cmp;\n\t\t\t\tif (midVal < key) {\n\t\t\t\t\tcmp = -1; // Neither val is NaN, thisVal is smaller\n\t\t\t\t} else if (midVal > key) {\n\t\t\t\t\tcmp = 1; // Neither val is NaN, thisVal is larger\n\t\t\t\t} else {\n\t\t\t\t\tlong midBits = Double.doubleToLongBits(midVal);\n\t\t\t\t\tlong keyBits = Double.doubleToLongBits(key);\n\t\t\t\t\tcmp = (midBits == keyBits ? 0 : // Values are equal\n\t\t\t\t\t\t(midBits < keyBits ? -1 : // (-0.0, 0.0) or (!NaN, NaN)\n\t\t\t\t\t\t\t1)); // (0.0, -0.0) or (NaN, !NaN)\n\t\t\t\t}\n\n\t\t\t\tif (cmp < 0)\n\t\t\t\t\tlow = mid + 1;\n\t\t\t\telse if (cmp > 0)\n\t\t\t\t\thigh = mid - 1;\n\t\t\t\telse\n\t\t\t\t\treturn mid; // key found\n\t\t}\n\t\treturn -(low + 1); // key not found.\n\t}", "float getIn(int index);", "public boolean find(int value) {\n\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\tint num1 = list.get(i);\n\t\t\tint num2 = value - num1;\n\t\t\tif (num2 != num1 && hash.containsKey(num2) || num2 == num1 && hash.get(num2) > 1) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t return false;\n\t}", "public int getIndexOfTokenValue(int value) {\n int left = 0;\n int right = tokens.size() - 1;\n\n while (left <= right) {\n int mid = (left + right) / 2;\n if (tokens.get(mid).getValue() == value) {\n return mid;\n }\n if (tokens.get(mid).getValue() > value) {\n right = mid - 1;\n } else {\n left = mid + 1;\n }\n }\n return -1;\n }", "private static int exponentialSearch(int[] inputs, int value) {\n\t\t\n\t\t// find range :- \n\t\t// 1. start with index 0\n\t\tif(inputs[0]==value ) {\n\t\t\treturn 0;\n\t\t}\n\t\t// 2. doubling method\n\t\tint i =1;\n\t\twhile(i<inputs.length && inputs[i] <= value) {\n\t\t\ti = i *2;\n\t\t}\n\t\t// apply binary search on range element\n\t\treturn Arrays.binarySearch(inputs, i/2, Math.min(i,inputs.length), value);\n\t}", "public boolean compareTo(int index, int value){\n return list.get(index)==value;\n }", "public int GetPosition()\n {\n int position = -1;\n\n double CurrentDistance = GetDistance();\n\n for (int i = 0; i < Positions.length; i++)\n {\n // first get the distance from current to the test point\n double DistanceFromPosition = Math.abs(CurrentDistance\n - Positions[i]);\n\n // then see if that distance is close enough using the threshold\n if (DistanceFromPosition < PositionThreshold)\n {\n position = i;\n break;\n }\n }\n\n return position;\n }", "public void set_offset_cmp(float value) {\n setFloatElement(offsetBits_offset_cmp(), 32, value);\n }", "List<Object> greaterThanOrEqualsTo(Object value);", "private int findEntry(long msb, long lsb) {\n\n int lowIndex = 0;\n int highIndex = index.remaining() / 24 - 1;\n float lowValue = Long.MIN_VALUE;\n float highValue = Long.MAX_VALUE;\n float targetValue = msb;\n\n while (lowIndex <= highIndex) {\n int guessIndex = lowIndex + Math.round(\n (highIndex - lowIndex)\n * (targetValue - lowValue)\n / (highValue - lowValue));\n int position = index.position() + guessIndex * 24;\n long m = index.getLong(position);\n if (msb < m) {\n highIndex = guessIndex - 1;\n highValue = m;\n } else if (msb > m) {\n lowIndex = guessIndex + 1;\n lowValue = m;\n } else {\n // getting close...\n long l = index.getLong(position + 8);\n if (lsb < l) {\n highIndex = guessIndex - 1;\n highValue = m;\n } else if (lsb > l) {\n lowIndex = guessIndex + 1;\n lowValue = m;\n } else {\n // found it!\n return position;\n }\n }\n }\n\n // not found\n return -1;\n }", "static <E> int minPos( List<E> list, Comparator<E> fn ) {\n if ( list.isEmpty() ) {\n return -1;\n }\n E eBest = list.get( 0 );\n int iBest = 0;\n for ( int i = 1; i < list.size(); i++ ) {\n E e = list.get( i );\n if ( fn.compare( e, eBest ) < 0 ) {\n eBest = e;\n iBest = i;\n }\n }\n return iBest;\n }", "public float get_offset_cmp() {\n return (float)getFloatElement(offsetBits_offset_cmp(), 32);\n }", "int findVertex(Point2D.Float p) {\n double close = 5*scale;\n for (int i = 0; i < points.size(); ++i) {\n if (points.get(i).distance(p) < close) {\n return i;\n }\n }\n return -1;\n }", "public static int addSorted(List<Float> arr, float val)\n\t{\n\t\tint len = arr.size();\n\t\tfor(int i = 0; i < len; i++)\n\t\t{\n\t\t\tfloat v = arr.get(i);\n\t\t\tif (v > val)\n\t\t\t{\n\t\t\t\tarr.add(i, val);\n\t\t\t\treturn(i);\n\t\t\t}\n\t\t\telse\n\t\t\t\tif (v == val)\n\t\t\t\t{\n\t\t\t\t\tarr.set(i, val);\n\t\t\t\t\treturn(-i);\n\t\t\t\t}\n\t\t}\n\t\t\n\t\tarr.add(len, val);\t\t\n\t\treturn(len);\n\t}", "@Override\n\tpublic int find(int pValueToFind) {\n\t\tfor (int n = 0; n < pointer; ++n) {\n\t\t\tif (values[n] == pValueToFind) {\n\t\t\t\t// this returns the index position\n\t\t\t\treturn n;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "java.util.List<java.lang.Float> getInList();", "public static int comp( float a, float b ) {\n return equal( a, b, FREL_TOL, FABS_TOL ) ? 0 : (a < b ? -1 : 1 );\n }", "public boolean find(int value) {\n if (!isSorted) {\n Collections.sort(arrayList);\n }\n int tail = 0;\n int head = arrayList.size() - 1;\n while (tail < head) {\n if (arrayList.get(tail) + arrayList.get(head) == value) {\n return true;\n }\n if (arrayList.get(tail) + arrayList.get(head) < value) {\n tail++;\n } else {\n head--;\n }\n }\n return false;\n }", "public boolean find(int value) {\n for(int num1 : list){\n int num2 = value - num1;\n if((num1 == num2) && map.get(num1) > 1 || (num1 != num2) && map.containsKey(num2)) return true;\n }\n return false;\n }", "public int getIntPosition(double value) {\n if (Double.isNaN(value)) {\n return size - nanW/2;\n } else if (Double.isInfinite(value)) {\n if (value > 0.) \n return min < max ? size - nanW - posW / 2 : posW / 2;\n else\n return min < max ? negW / 2 : size - nanW - negW / 2;\n }\n return (int)getPosition(value);\n }", "private int compareIntAndFloat(int x, float y) {\n if (x < y) {\n return -1;\n } else if (x == y) {\n return 0;\n } else {\n return 1;\n }\n }", "@Test\n public void testFloatInRange() {\n int lowEnd = -10;\n int highEnd = 10;\n Optional<NumberValue> optRslt = floatService.floatInRange(lowEnd, highEnd);\n assertTrue(optRslt.isPresent());\n NumberValue numberValue = optRslt.get();\n assertTrue(lowEnd * 1.0 <= numberValue.getNumber().doubleValue());\n assertTrue(highEnd * 1.0 >= numberValue.getNumber().doubleValue());\n System.out.println(\"Number Value = \" + numberValue.toString());\n }", "@Override\r\n public int locate(Copiable value) {\r\n for (int i = 0; i < count; i++) {\r\n if (list[i].equals(value)) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n }", "protected int searchLeft(double value) {\n int i = search(value);\n while (i > 0 && value == sequence.get(i - 1)) {\n i -= 1;\n }\n return i;\n }", "int findGreaterNumber(ArrayList<Integer> inArrList)\r\n {\r\n//\t for(int i=0;i<inArrList.size();i++)\r\n//\t {\r\n\t\t\r\n\t//\t greaterNumbr = (ArrayList<Integer>) Collections.max(inArrList);\r\n\t // Exceed length problem:IndexOutOfBoundException.\r\n\t // Index value of Arraylist is always 0. \r\n\t int i=0;\r\n\t\t\t if(inArrList.get(i) > inArrList.get(i+1))\r\n\t\t\t {\r\n\t\t\t\t// inArrList.add(i);\r\n\t\t\t return inArrList.get(i);\r\n\t\t\t }\r\n\t\t\t else\r\n\t\t\t {\r\n\t\t\t\t return inArrList.get(i+1);\r\n\t\t\t\t \r\n\t\t\t }\r\n\t\t\t\r\n\t\t\r\n//\t\t }\r\n//\t System.out.println(\" \"+inArrList);\r\n//\treturn -1;\r\n\t\r\n\t \r\n }", "public int indexOf()\n {\n\treturn indexOfValue(mValue);\n }", "public static int interpolationSearch(int[] nums, int val){\n\n int lo = 0, mid = 0, hi = nums.length - 1;\n int range = nums[hi] - nums[lo];\n int normmailized = (hi - lo);\n while(nums[lo] <= val && nums[hi] >= val){\n mid = lo + ((val - nums[lo]) * normmailized)/ range; // normalization\n if(nums[mid] < val){\n lo = mid + 1;\n } else if(nums[mid] > val){\n hi = mid - 1;\n } else return mid;\n }\n if(nums[lo] == val) return lo;\n return -1;\n }", "public final boolean greaterThan() {\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\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private int findSingleHit(double target) {\n int hits = 0;\n int idxFound = -1;\n int n = orgGridAxis.getNcoords();\n for (int i = 0; i < n; i++) {\n if (intervalContains(target, i)) {\n hits++;\n idxFound = i;\n }\n }\n if (hits == 1)\n return idxFound;\n if (hits == 0)\n return -1;\n return -hits;\n }", "public int find(int value) {\n \t\tfor (int i=0; i<data.length; i++) {\n \t\t\tif (data[i]==value) return i;\n \t\t}\n \t\t\t\n \t\treturn -1;\n \t}", "private int getDominantI(float[] l) {\n float max = 0;\n int maxi = -1;\n for(int i=0;i<l.length;i++) {\n if (l[i]>max)\n max = l[i]; maxi = i;\n }\n return maxi;\n }", "public static int getIndexOfMin(double[] x) {\n Objects.requireNonNull(x, \"The supplied array was null\");\n int index = 0;\n double min = Double.MAX_VALUE;\n for (int i = 0; i < x.length; i++) {\n if (x[i] < min) {\n min = x[i];\n index = i;\n }\n }\n return (index);\n }", "private int binarySearch(T element) {\n int start = 0, end = sortedArray.size(), mid = 0;\n while (start < end) {\n mid = (end + start) / 2;\n int cmp = sortedArray.get(mid).compareTo(element);\n if (cmp == 0) {\n start = end = mid;\n }\n else if (cmp < 0) {\n start = mid + 1;\n }\n else {\n end = mid;\n }\n }\n return start;\n }", "public static int getPosition(int toFind, ArrayList<Integer> arr) {\n int leftBound = 0;\n int rightBound = arr.size() - 1;\n int lastOk = -1;\n int mid;\n while (leftBound <= rightBound) {\n mid = (leftBound + rightBound) / 2;\n if (arr.get(mid) == toFind) {\n return mid;\n } else {\n if (arr.get(mid) < toFind) {\n leftBound = mid + 1;\n } else {\n rightBound = mid - 1;\n }\n }\n }\n return -1;\n }", "public int valuePosition(int[] arr, int x) {\n for (int i = 0; i < arr.length; i++)\n if (arr[i] == x) {\n return i;\n }\n return x;\n }", "private int findIndex(String value) {\n\tint index = 0;\n\tfor (int i = 0; i < getData().length && index == 0;) {\n\t if (value.compareTo(getData()[i]) <= 0) {\n\t\tindex = i;\n\t }\n\t else {\n\t\ti++;\n\t }\n\t}\n\treturn index;\n }", "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 }", "public int compareTo(Valuable p){\n\treturn (int)Math.signum(this.value-p.getValue());\n}", "@Override\n\tpublic int indexOf(Object value) {\n\t\tListNode<L> current=this.first;\n\t\tfor(int i=0;i<this.size;i++) {\n\t\t\tif(current.storage==value) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t\tcurrent=current.next;\n\t\t}\n\t\treturn -1;\n\t\n\t}", "private static int binarySearchForX(XYDataset data, int series, double x) {\n int lo = 0, hi = data.getItemCount(series); \n while (lo < hi) {\n int mid = (lo + hi) / 2;\n double midX = data.getXValue(series, mid);\n if (x < midX)\n\thi = mid;\n else if (x > midX)\n\tlo = mid + 1;\n else\n\treturn mid;\n }\n return lo; // not found, return index of next date\n }", "public int indexOf(Object value) {\n Element element = _headAndTail.getNext();\n for (int i = 0; i < _size; i++) {\n if (value.equals(element.getValue())) {\n return i;\n }\n element = element.getNext();\n }\n return -1;\n }", "private static float getValue(ArrayList<Array> arrays, float index, String name) {\n\t\tint index1 = (int) index;\n\t\tfor (int i = 0; i < arrays.size(); i++) {\n\t\t\tif (arrays.get(i).name.equals(name)) {\n\t\t\t\tArray arrs = arrays.get(i);\n\t\t\t\treturn (float) arrs.values[index1];\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public int get(int i) {\n\t\tint n = intervals.size();\n\t\tint index = 0;\n\t\tfor (int j = 0; j < n; j++) {\n\t\t\tInterval I = intervals.get(j);\n\t\t\tint a = I.a;\n\t\t\tint b = I.b;\n\t\t\tfor (int v = a; v <= b; v++) {\n\t\t\t\tif (index == i) {\n\t\t\t\t\treturn v;\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public int indexOf(Object value) {\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif (elements[i].equals(value)) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}", "public void binarySearchForValue(int value) {\n int lowIndex = 0;\n int highIndex = arraySize - 1;\n\n while (lowIndex <= highIndex) {\n int middleIndex = (highIndex + lowIndex) / 2;\n\n if (theArray[middleIndex] < value) {\n lowIndex = middleIndex + 1;\n } else if (theArray[middleIndex] > value) {\n highIndex = middleIndex - 1;\n } else {\n System.out.println(\"\\nFound a match for \" + value + \" at index \" + middleIndex);\n lowIndex = highIndex + 1;\n }\n\n printHorizontalArray(middleIndex, -1);\n }\n }", "private int findNextElement() {\n\t\tif (hasNext()) {\n\t\t\tint value = this.index + 1;\n\t\t\treturn value;\n\n\t\t}\n\t\treturn -1;\n\t}", "protected int searchRight(double value) {\n int i = search(value);\n while (i < sequence.size() - 1 && value == sequence.get(i + 1)) {\n i += 1;\n }\n return i;\n }", "public boolean find(int value) {\n // Write your code here\n for(Integer i : list){\n int num = value - i;\n if((num == i && map.get(i) > 1) || (num != i && map.containsKey(num))){\n return true;\n }\n }\n return false;\n }", "public static float waveDataGetLowestValue(ArrayList<Float> wave){\r\n float lowestWaveValue = Collections.min(wave);\r\n return lowestWaveValue;\r\n\r\n }", "private double energyAt(Integer jValueToFind, Map<Integer, Double> energyList) throws NoSuchEnergyException\r\n\t{\r\n\t\tfor (Map.Entry<Integer, Double> entry : energyList.entrySet()) {\r\n\t\t\tif (entry.getKey() == jValueToFind) {\r\n\t\t\t\treturn entry.getValue();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthrow new NoSuchEnergyException(\"Could not find the requested energy with J=\" + jValueToFind);\r\n\t}", "public static float waveDataGetPeakToPeakValue(ArrayList<Float> wave){\r\n return Collections.max(wave)-Collections.min(wave);\r\n }", "public static double findTallest(List<Double> peeps) {\n\t\t double largeNum = 0;\n\t\tfor (int i = 0; i < peeps.size(); i++) {\n\t\t\tif (peeps.get(i)>=largeNum) {\n\t\t\t\tlargeNum =peeps.get(i);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\treturn largeNum;\n\t}", "public int searchByValue(T value) {\n Node<T> currNode = head;\n int index = 0;\n if (null != currNode) {\n while ((null != currNode.next) || (null != currNode.data)) {\n if (currNode.data == value) {\n break;\n }\n currNode = currNode.next;\n if (null == currNode) {\n return -1;\n }\n index++;\n }\n }\n return index;\n }", "public int indexOf(final Object value) {\n\t\tint position = -1;\n\t\tfor (int i = 0; i < this.size; i++) {\n\t\t\tif (elements[i].equals(value)) {\n\t\t\t\tposition = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn position;\n\t}", "public int getIndexOfElement(Object... value);", "int findElement(int a[], int x) {\n\t\tint low = 0;\n\t\tint high = a.length - 1;\n\t\twhile (low <= high) {\n\t\t\tint mid = (low + high) / 2;\n\t\t\t//If we found the element simply return the index\n\t\t\tif (a[mid] == x) {\n\t\t\t\treturn mid;\n\t\t\t}\n\t\t\t// Check for the sorted half\n\t\t\telse if (a[mid] < a[high]) {\n\t\t\t\tif (x > a[mid] && x <= a[high]) {\n\t\t\t\t\tlow = mid + 1;\n\t\t\t\t} else {\n\t\t\t\t\thigh = mid - 1;\n\t\t\t\t}\n\t\t\t} else if (a[low] < a[mid]) {\n\t\t\t\tif (x >= a[low] && x < a[mid]) {\n\t\t\t\t\thigh = mid - 1;\n\t\t\t\t} else {\n\t\t\t\t\tlow = mid + 1;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public double getPosition(double value) {\n return getRelPosition(value) * (size - nanW - negW - posW) + (min < max ? negW : posW);\n }", "public T findHighest(){\n T highest = array[0];\n for (int i=0;i<array.length; i++)\n {\n if (array[i].doubleValue()>highest.doubleValue())\n {\n highest = array[i];\n } \n }\n return highest;\n }", "protected static int hashCodeFloat(float value)\n {\n return floatToIntBits(value);\n }", "@SuppressWarnings(\"unchecked\") // stops Java complaining about the call to compare\n private int findIndexOf(Comparable<E> item) {\n if (count == 0) { //this is where the binary search happens that reduces the time and computational power it takes to search the collection\n return count; // if count == 0 it returns the count variable to break the loop and show that the collection is empty\n }\n int low = 0; //Sets up three variables to keep track of the start and end values of index and the middle of the collection, this helps\n int high = count - 1; //the search algorithm becase the array always knows where the middle is and so the collection can contnually half using the three\n int mid; //variables to find a single value, while the low is less or equal to the high variable,\n while (low <= high) {\n\n mid = (low + high) / 2;\n\n int compareValue = item.compareTo(data[mid]); // the value we are trying to find\n if (compareValue == 0) return mid; //returns the middle value,\n if (compareValue > 0) low = mid + 1; //if greater than it changes low value to equal the middle, plus one(as mid is already checked)\n else high = mid - 1; //else it changes to the lower half of the collecton to search there.\n }\n return low; //Hopefully if found it will then return low,\n }", "public boolean find(int value) {\n for (int key : numbers.keySet()) {\n int pair = value - key;\n if (numbers.containsKey(pair) && (key != pair || numbers.get(key) > 1)) {\n return true;\n }\n }\n return false;\n }", "protected int findIndex(A val) {\n int index = 0;\n boolean found = false;\n \n \n if (elems[0] == null || elems[0] == val){\n return index;\n }\n else{\n \n }\n \n \n\n return index; \n }", "public boolean find(int value) {\r\n // Write your code here\r\n for (int i = 0; i < elements.size() && elements.get(i) < value / 2 + 1; i++) {\r\n if (elements.get(i) * 2 == value && mapping.get(elements.get(i)) == 2) {\r\n return true;\r\n }\r\n if (elements.get(i) * 2 != value && mapping.containsKey(value - elements.get(i))) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "public static int getValueAtNaiveAlgorithm(char[] parleValues, char index){\n\t\tfor(int i=0;i<parleValues.length;i+=3){\n\t\t\tif(parleValues[i]-1+parleValues[i+1]>=index){\n\t\t\t\treturn parleValues[i+2];\n\t\t\t}\n\t\t}\t\t\t\n\t\treturn -1;\n\t}", "public T findLowest(){\n T lowest = array[0]; \n for (int i=0;i<array.length; i++)\n {\n if (array[i].doubleValue()<lowest.doubleValue())\n {\n lowest = array[i]; \n } \n }\n return lowest;\n }", "public int getLowerBound ();", "float get(int idx);", "public static int getMinIndex(double[] array)\r\n\t{\r\n\t\tdouble min = Double.POSITIVE_INFINITY;\r\n\t\tint minIndex = 0;\r\n\t\tfor (int i = 0; i < array.length; i++)\r\n\t\t\tif (min > array[i]) {\r\n\t\t\t\tmin = array[i];\r\n\t\t\t\tminIndex = i;\r\n\t\t\t}\r\n\t\treturn minIndex;\r\n\t}", "public int compareTo(int value) {\n return this.value - value;\n }", "java.util.List<java.lang.Float> getNotInList();", "public void binarySearchForValue(int value){\n int lowIndex = 0;\n int highIndex = arraySize -1;\n\n while(lowIndex <= highIndex){\n int middleIndex = (lowIndex + highIndex)/2;\n\n if(theArray[middleIndex] < value){\n lowIndex = middleIndex + 1;\n } else if(theArray[middleIndex] > value) {\n highIndex = middleIndex -1;\n } else {\n System.out.println(\"Found a match for \" + value + \" at Index \" + middleIndex);\n // Exit the while loop.\n lowIndex = highIndex + 1;\n }\n\n printHorizontalArray(middleIndex, -1);\n }\n }", "public static <T extends IWebGLConstEnum> T getByIntValue(T[] values, int valueToFind) {\r\n\t\tfor(T val:values) {\r\n\t\t\tif(val.getIntValue()==valueToFind) {\r\n\t\t\t\treturn val;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "float getValue();", "float getValue();", "float getValue();", "public int indexOf(int value) {\n\t\tint index = 0;\n\t\tListNode current = front;\n\t\twhile (current != null) {\n\t\t\tif (current.data == value) {\n\t\t\t\treturn index;\n\t\t\t}\n\t\t\tindex++;\n\t\t\tcurrent = current.next;\n\t\t}\n\t\treturn -1;\n\t}", "private static double search(double min, double max, Function f) {\n\t\tdouble a = min;\n\t\tdouble c = max;\n\t\tdouble b = 0;\n\t\twhile (Math.abs(c - a) > MIN_DIFFERENCE) {\n\t\t\tb = (a + c) / 2;\n\t\t\tdouble fa = f.f(a);\n\t\t\tdouble fc = f.f(c);\n\t\t\t\n\t\t\tif (fa < fc) {\n\t\t\t\tc = b;\n\t\t\t} else {\n\t\t\t\ta = b;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn b;\n\t}" ]
[ "0.60469294", "0.6020693", "0.59317976", "0.59114784", "0.5831461", "0.5803603", "0.57521546", "0.569185", "0.5687736", "0.56869316", "0.5674238", "0.566294", "0.56151617", "0.5573572", "0.55544126", "0.55469894", "0.55340135", "0.5496812", "0.54918385", "0.543835", "0.5423902", "0.5413438", "0.5386826", "0.53469163", "0.5341575", "0.52986836", "0.5288836", "0.5247671", "0.52474314", "0.52322", "0.51936215", "0.5191087", "0.5189288", "0.5187115", "0.51736426", "0.51721007", "0.51583755", "0.5151407", "0.5147745", "0.51425993", "0.51391596", "0.5092664", "0.5067017", "0.5061316", "0.5057677", "0.5050519", "0.50412714", "0.50368273", "0.49761182", "0.49681315", "0.49199185", "0.49186885", "0.49087697", "0.49028793", "0.49026117", "0.48989007", "0.48922914", "0.4884039", "0.48826605", "0.48810685", "0.4874665", "0.48723626", "0.48648044", "0.4854266", "0.48535368", "0.48519805", "0.48518574", "0.48509297", "0.484636", "0.48439628", "0.48301983", "0.4821158", "0.48200276", "0.48176694", "0.48153034", "0.4811865", "0.48112094", "0.4807676", "0.48037505", "0.48006845", "0.4795074", "0.47890607", "0.47855338", "0.47811192", "0.47675282", "0.4766132", "0.4763158", "0.47630316", "0.4759783", "0.47592357", "0.47571996", "0.4750145", "0.4743323", "0.47432634", "0.47345236", "0.47344065", "0.47344065", "0.47344065", "0.47333735", "0.47316715" ]
0.6122959
0
Gets index of the leftmost element, in the ordered list of floating point values, that is greater or equal than the given floating point value.
protected int searchLeft(double value) { int i = search(value); while (i > 0 && value == sequence.get(i - 1)) { i -= 1; } return i; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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}", "protected int search(double value) {\n int n = sequence.size();\n int left = 0, right = n - 1, index = 0;\n while (left != right) {\n index = (right - left) / 2 + left;\n if (value >= sequence.get(index == left ? index + 1 : index)) {\n left = index == left ? index + 1 : index;\n } else {\n right = index;\n }\n }\n while (left > 0 && value == sequence.get(left - 1)) {\n left -= 1;\n }\n return left;\n }", "static <E> int minPos( List<E> list, Comparator<E> fn ) {\n if ( list.isEmpty() ) {\n return -1;\n }\n E eBest = list.get( 0 );\n int iBest = 0;\n for ( int i = 1; i < list.size(); i++ ) {\n E e = list.get( i );\n if ( fn.compare( e, eBest ) < 0 ) {\n eBest = e;\n iBest = i;\n }\n }\n return iBest;\n }", "static int BinarySerach_lowerEqualValue(ArrayList<Integer> list , int value){\r\n\t\t\t\r\n\t\t\tint mid,l,r;\r\n\t\t\t\r\n\t\t\tl = 0;\r\n\t\t\tr = list.size()-1;\r\n\t\t\t\r\n\t\t\tif(value>=list.get(r))\r\n\t\t\t\treturn r;\r\n\t\t\tif(value<=list.get(l))\r\n\t\t\t\treturn l;\r\n\t\t\t\r\n\t\t\tmid = (l+r)/2;\r\n\t\t\t\r\n\t\t\twhile(l<r){\r\n\t\t\t\t\r\n\t\t\t\tmid = (l+r)/2;\r\n\t\t\t\t\r\n\t\t\t\tif(list.get(mid)==value)\r\n\t\t\t\t\treturn mid;\r\n\t\t\t\t\r\n\t\t\t\tif(mid+1<list.size() && list.get(mid)<=value && list.get(mid+1)>value)\r\n\t\t\t\t\treturn mid;\r\n\t\t\t\tif(mid-1>0 && list.get(mid-1)<=value && list.get(mid)>value)\r\n\t\t\t\t\treturn mid-1;\r\n\t\t\t\tif(list.get(mid)<value)\r\n\t\t\t\t\tl = mid+1;\r\n\t\t\t\telse\r\n\t\t\t\t\tr = mid-1;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\treturn -1;\r\n\t\t}", "static int BinarySerach_lowerValue(ArrayList<Integer> list , int value){\r\n\t\t\r\n\t\tint mid,l,r;\r\n\t\t\r\n\t\tl = 0;\r\n\t\tr = list.size()-1;\r\n\t\t\r\n\t\tif(value>=list.get(r))\r\n\t\t\treturn r;\r\n\t\tif(value<=list.get(l))\r\n\t\t\treturn -1;\r\n\t\t\r\n\t\tmid = (l+r)/2;\r\n\t\t\r\n\t\twhile(l<r){\r\n\t\t\t\r\n\t\t\tmid = (l+r)/2;\r\n\t\t\t\r\n\t\t\tif(list.get(mid)==value)\r\n\t\t\t\treturn mid-1;\r\n\t\t\t\r\n\t\t\tif(mid+1<list.size() && list.get(mid)<value && list.get(mid+1)>=value)\r\n\t\t\t\treturn mid;\r\n\t\t\tif(mid-1>0 && list.get(mid-1)<value && list.get(mid)>=value)\r\n\t\t\t\treturn mid-1;\r\n\t\t\tif(list.get(mid)<value)\r\n\t\t\t\tl = mid+1;\r\n\t\t\telse\r\n\t\t\t\tr = mid-1;\r\n\t\t}\r\n\t\t\t\r\n\t\treturn -1;\r\n\t}", "double getLeft(double min);", "private static int findIndexOfLargest(float[] vector) {\n\t\tint index = -1;\n\t\tfloat value = Float.NEGATIVE_INFINITY;\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}", "protected static Point2D.Float getLowestPoint(List<Point2D.Float> points) {\n\n\t\tPoint2D.Float lowest = points.get(0);\n\n\t\tfor (int i = 1; i < points.size(); i++) {\n\n\t\t\tPoint2D.Float temp = points.get(i);\n\n\t\t\tif (temp.y < lowest.y || (temp.y == lowest.y && temp.x < lowest.x)) {\n\t\t\t\tlowest = temp;\n\t\t\t}\n\t\t}\n\n\t\treturn lowest;\n\t}", "private int findNearestValue(final int i, final double key) {\n\n\t\tint low = 0;\n\t\tint high = m_NumValues[i];\n\t\tint middle = 0;\n\t\twhile (low < high) {\n\t\t\tmiddle = (low + high) / 2;\n\t\t\tdouble current = m_seenNumbers[i][middle];\n\t\t\tif (current == key) {\n\t\t\t\treturn middle;\n\t\t\t}\n\t\t\tif (current > key) {\n\t\t\t\thigh = middle;\n\t\t\t} else if (current < key) {\n\t\t\t\tlow = middle + 1;\n\t\t\t}\n\t\t}\n\t\treturn low;\n\t}", "public T findLowest(){\n T lowest = array[0]; \n for (int i=0;i<array.length; i++)\n {\n if (array[i].doubleValue()<lowest.doubleValue())\n {\n lowest = array[i]; \n } \n }\n return lowest;\n }", "private KeyedItem findLeftMost(BinarySearchTree tree){\r\n\t\t\r\n\t\t//return the root when we find that we reached the leftmost child\r\n\t\tif(tree.getLeftChild() == null){\r\n\t\t\treturn tree.getRoot();\r\n\t\t}\r\n\t\telse{\r\n\t\t\t//keep going. has more left children\r\n\t\t\treturn findLeftMost(tree.getLeftChild());\r\n\t\t}\r\n\t}", "private static int getMinDistIndex(ArrayList<Double> list, int indexNotInterested) {\n \tdouble newDistMin = Double.MAX_VALUE;\n\t\tint newMinDistIndex = -1;\n\t\t\n\t\tfor(int i = 0; i < list.size(); i++) {\n\t\t\tif(i != indexNotInterested && newDistMin > list.get(i)) {\n\t\t\t\tnewDistMin = list.get(i);\n\t\t\t\tnewMinDistIndex = i;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn newMinDistIndex;\n }", "public int getIndexForXVal(double xVal) {\n\t\tint upper = pointList.size()-1;\n\t\tint lower = 0;\n\t\t\n\t\tif (pointList.size()==0)\n\t\t\treturn 0;\n\t\t\n\t\t//TODO Are we sure an binarySearch(pointList, xVal) wouldn't be a better choice here?\n\t\t//it can gracefully handle cases where the key isn't in the list of values...\n\t\tdouble stepWidth = (pointList.get(pointList.size()-1).getX()-pointList.get(0).getX())/(double)pointList.size();\n\t\t\n\t\tint index = (int)Math.floor( (xVal-pointList.get(0).getX())/stepWidth );\n\t\t//System.out.println(\"Start index: \" + index);\n\t\t\n\t\t//Check to see if we got it right\n\t\tif (index>=0 && (index<pointList.size()-1) && pointList.get(index).getX() < xVal && pointList.get(index+1).getX()>xVal) {\n\t\t\t//System.out.println(\"Got it right on the first check, returning index : \" + index);\n\t\t\treturn index;\n\t\t}\n\t\t\t\t\n\t\t//Make sure the starting index is sane (between upper and lower)\n\t\tif (index<0 || index>=pointList.size() )\n\t\t\tindex = (upper+lower)/2; \n\t\t\n\t\tif (xVal < pointList.get(0).getX()) {\n\t\t\treturn 0;\n\t\t}\n\t\t\t\n\t\tif(xVal > pointList.get(pointList.size()-1).getX()) {\n\t\t\treturn pointList.size()-1;\n\t\t}\n\t\t\n\t\tint count = 0;\n\t\twhile( upper-lower > 1) {\n\t\t\tif (xVal < pointList.get(index).getX()) {\n\t\t\t\tupper = index;\n\t\t\t}\n\t\t\telse\n\t\t\t\tlower = index;\n\t\t\tindex = (upper+lower)/2;\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\treturn index;\n\t}", "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}", "private static int binarySearch0(float[] a, int fromIndex, int toIndex,\n\t\t\tfloat key) {\n\t\tint low = fromIndex;\n\t\tint high = toIndex - 1;\n\n\t\twhile (low <= high) {\n\t\t\tint mid = (low + high) >>> 1;\n\t\tfloat midVal = a[mid];\n\n\t\tint cmp;\n\t\tif (midVal < key) {\n\t\t\tcmp = -1; // Neither val is NaN, thisVal is smaller\n\t\t} else if (midVal > key) {\n\t\t\tcmp = 1; // Neither val is NaN, thisVal is larger\n\t\t} else {\n\t\t\tint midBits = Float.floatToIntBits(midVal);\n\t\t\tint keyBits = Float.floatToIntBits(key);\n\t\t\tcmp = (midBits == keyBits ? 0 : // Values are equal\n\t\t\t\t(midBits < keyBits ? -1 : // (-0.0, 0.0) or (!NaN, NaN)\n\t\t\t\t\t1)); // (0.0, -0.0) or (NaN, !NaN)\n\t\t}\n\n\t\tif (cmp < 0)\n\t\t\tlow = mid + 1;\n\t\telse if (cmp > 0)\n\t\t\thigh = mid - 1;\n\t\telse\n\t\t\treturn mid; // key found\n\t\t}\n\t\treturn -(low + 1); // key not found.\n\t}", "int compareToFloat(floats f);", "public int minMinValue(List<List<Integer>> positions) {\n int value = Integer.MAX_VALUE;\n for (final List<Integer> values : positions) {\n final int temp = Collections.min(values).intValue();\n if (temp < value) {\n value = temp;\n }\n }\n return value;\n }", "public double getLeft(double min) {\n return min - this.size; \n }", "public static float waveDataGetLowestValue(ArrayList<Float> wave){\r\n float lowestWaveValue = Collections.min(wave);\r\n return lowestWaveValue;\r\n\r\n }", "public static float min(final float[] data) {\r\n float min = Float.MAX_VALUE;\r\n for (final float element : data) {\r\n if (min > element) {\r\n min = element;\r\n }\r\n }\r\n return min;\r\n }", "public int lowerBound(final List<Integer> a, int target){\n int l = 0, h = a.size()-1;\n while(h - l > 3){\n int mid = (l+h)/2;\n if(a.get(mid) == target)\n h = mid;\n else if(a.get(mid) < target){\n l = mid + 1;\n }\n else if(a.get(mid) > target){\n h = mid - 1;\n }\n }\n for(int i=l; i<=h; ++i){\n if(a.get(i) == target)\n return i;\n }\n return -1;\n }", "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 int locate (List<Integer> list, int hash) {\n\t\tif (list.size() == 0) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tint index_a = -1;\n\t\tint index_b = list.size();\n\t\tfloat value_a = (float)list.get(index_a+1);\n\t\tfloat value_b = (float)list.get(index_b-1);\n\t\tfloat hash_float = (float)hash;\n\n\t\tif (hash <= value_a) {\n\t\t\treturn 0;\n\t\t}\n\t\tif (hash > value_b) {\n\t\t\treturn list.size();\n\t\t}\n\n\t\twhile (index_b - index_a > 1) {\n\t\t\tint index_mid = index_a+(int)((float)(index_b-index_a)*(hash_float-value_a)/(value_b-value_a));\n\t\t\tif (index_mid == index_a) {\n\t\t\t\tindex_mid++;\n\t\t\t} else if (index_mid == index_b) {\n\t\t\t\tindex_mid--;\n\t\t\t}\n\t\t\tif (hash >= list.get(index_mid)) {\n\t\t\t\tindex_a = index_mid;\n\t\t\t\tvalue_a = list.get(index_a);\n\t\t\t} else {\n\t\t\t\tindex_b = index_mid;\n\t\t\t\tvalue_b = list.get(index_b);\n\t\t\t}\n\t\t}\n\t\tif (hash == list.get(index_a)) {\n\t\t\treturn index_a;\n\t\t}\n\t\treturn index_b;\n\t}", "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}", "private static Vertex lowestFInOpen(List<Vertex> openList) {\n\t\tVertex cheapest = openList.get(0);\n\t\tfor (int i = 0; i < openList.size(); i++) {\n\t\t\tif (openList.get(i).getF() < cheapest.getF()) {\n\t\t\t\tcheapest = openList.get(i);\n\t\t\t}\n\t\t}\n\t\treturn cheapest;\n\t}", "@Override\n\tpublic int binarySearchXValues(double fKey)\n\t{\n\t\treturn Arrays.binarySearch(this.afXValues, (float) fKey);\n\t}", "float getNotIn(int index);", "private static int findMin(ListNode[] lists) {\n\t\tint length = lists.length;\n\t\tint min = -1;\n\t\tif (length > 0) {\n\t\t\tmin = 0;\n\t\t\tfor (int i = 1; i < length; i++) {\n\t\t\t\tif (lists[i] != null && (lists[min] == null || lists[min].val > lists[i].val))\n\t\t\t\t\tmin = i;\n\t\t\t}\n\t\t}\n\t\treturn min;\n\t}", "public static int alwaysPickLeftmost(int[] arr, int left, int right) {\n return left;\n }", "public int maxMinValue(List<List<Integer>> positions) {\n int value = 0;\n for (final List<Integer> values : positions) {\n final int temp = Collections.min(values).intValue();\n if (temp > value) {\n value = temp;\n }\n }\n return value;\n }", "public static double findTallest(List<Double> peeps) {\n\t\t double largeNum = 0;\n\t\tfor (int i = 0; i < peeps.size(); i++) {\n\t\t\tif (peeps.get(i)>=largeNum) {\n\t\t\t\tlargeNum =peeps.get(i);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\treturn largeNum;\n\t}", "public float min(Collection<Float> data){\r\n return Collections.min(data);\r\n }", "public static int findPosMin(List<Integer> values, int start) {\r\n int bestGuessSoFar = start;\r\n for (int i = start + 1; i < values.size(); i++) {\r\n if (values.get(i) < values.get(bestGuessSoFar)) {\r\n bestGuessSoFar = i;\r\n } // if\r\n } // for\r\n return bestGuessSoFar;\r\n }", "public float getMinValue();", "double leftmost_alien_x() {\n double min_x = scene_width;\n for (Alien alien : aliens) {\n if (alien.x_position < min_x) {\n min_x = alien.x_position;\n }\n }\n return min_x;\n }", "public int getLowerBound ();", "private double findMin(){\r\n Set<Map.Entry<Double, Double>> list = heap.entrySet();\r\n double minKey = heap.firstKey();\r\n double minVal = MAX_WEIGHT;\r\n if (list != null){\r\n for (Map.Entry<Double, Double> entry: list){\r\n if (minVal > entry.getValue()){\r\n minVal = entry.getValue();\r\n minKey = entry.getKey();\r\n }\r\n }\r\n }\r\n return minKey;\r\n }", "static int BinarySerach_upperValue(ArrayList<Integer> list , int value){ \r\n\t\t\r\n\t\tint mid,l,r;\r\n\t\t\r\n\t\tl = 0;\r\n\t\tr = list.size()-1;\r\n\t\t\r\n\t\tif(value>=list.get(r))\r\n\t\t\treturn r;\r\n\t\tif(value<=list.get(l))\r\n\t\t\treturn l;\r\n\t\t\r\n\t\tmid = (l+r)/2;\r\n\t\t\r\n\t\twhile(l<r){\r\n\t\t\t\r\n\t\t\tmid = (l+r)/2;\r\n\t\t\t\r\n\t\t\tif(list.get(mid)==value)\r\n\t\t\t\treturn mid;\r\n\t\t\t\r\n\t\t\tif(mid+1<list.size() && list.get(mid)<value && list.get(mid+1)>=value)\r\n\t\t\t\treturn mid+1;\r\n\t\t\tif(mid-1>0 && list.get(mid-1)<value && list.get(mid)>=value)\r\n\t\t\t\treturn mid;\r\n\t\t\tif(list.get(mid)<value)\r\n\t\t\t\tl = mid+1;\r\n\t\t\telse\r\n\t\t\t\tr = mid-1;\r\n\t\t}\r\n\t\t\t\r\n\t\treturn -1;\r\n\t}", "private int getLeftOf(int index) {\n // TODO: YOUR CODE HERE\n return index * 2;\n }", "@Test\n public void getIndex(){\n List <Double> list = new ArrayList<>();\n list.add(1.0);\n list.add(2.0);\n list.add(3.0);\n list.add(4.0);\n\n assertEquals(0,list.indexOf(1.0));\n }", "private int findExtremePosition(int[] nums, int target, boolean left){\n int low = 0, high = nums.length-1, mid, index=-1;\n while(low<=high){\n mid = low + (high-low)/2;\n // target is found\n if(target==nums[mid]){\n // store the index\n index = mid;\n // continue moving left to find leftmost index of target element\n if(left){\n high = mid-1;\n // continue moving right to find rightmost index of target element\n }else {\n low = mid+1;\n }\n } else if(target<nums[mid]) {\n high = mid-1;\n } else {\n low = mid+1;\n }\n }\n //loop breaks when low>high, return the last recorded index\n return index;\n }", "static int findMin(double[] pq)\n\t{\n\t\tint ind = -1; \n\t\tfor (int i = 0; i < pq.length; ++i)\n\t\t\tif (pq[i] >= 0 && (ind == -1 || pq[i] < pq[ind]))\n\t\t\t\tind = i;\n\t\treturn ind;\n\t}", "public static float min(float [] array)\r\n\t{\r\n\t\tfloat minValue = array[0];\r\n\t\tfor (int i = 1; i < array.length; i++)\r\n\t\t{\r\n\t\t\tif (array[i] < minValue)\r\n\t\t\t{\r\n\t\t\t\tminValue = array[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn minValue;\r\n\t}", "E minVal();", "private Point findStartPoint(){\n Point min = points.get(0);\n for (int i = 1; i < points.size(); i++) {\n min = getMinValue(min, points.get(i));\n }\n return min;\n }", "public static int getIndexOfMin(double[] x) {\n Objects.requireNonNull(x, \"The supplied array was null\");\n int index = 0;\n double min = Double.MAX_VALUE;\n for (int i = 0; i < x.length; i++) {\n if (x[i] < min) {\n min = x[i];\n index = i;\n }\n }\n return (index);\n }", "public static float min(float... fValues) {\n float result = Float.POSITIVE_INFINITY;\n for (float value : fValues) {\n if (value < result) {\n result = value;\n }\n }\n\n return result;\n }", "private int findIndexOfMax(){\n\t\tint value=0;\n\t\tint indexlocation=0;\n\t\tfor(int i=0; i<myFreqs.size();i++){\n\t\t\tif(myFreqs.get(i)>value){\n\t\t\t\tvalue = myFreqs.get(i);\n\t\t\t\tindexlocation =i;\n\t\t\t}\n\t\t}\n\t\treturn indexlocation;\n\t}", "protected static Marker getLowestPoint(List<Marker> points) {\n\n Marker lowest = points.get(0);\n\n for(int i = 1; i < points.size(); i++) {\n\n Marker temp = points.get(i);\n\n if(temp.getPosition().latitude < lowest.getPosition().latitude || (temp.getPosition().latitude == lowest.getPosition().latitude && temp.getPosition().longitude < lowest.getPosition().longitude)) {\n lowest = temp;\n }\n }\n\n return lowest;\n }", "public static int getMinIndex(double[] array)\r\n\t{\r\n\t\tdouble min = Double.POSITIVE_INFINITY;\r\n\t\tint minIndex = 0;\r\n\t\tfor (int i = 0; i < array.length; i++)\r\n\t\t\tif (min > array[i]) {\r\n\t\t\t\tmin = array[i];\r\n\t\t\t\tminIndex = i;\r\n\t\t\t}\r\n\t\treturn minIndex;\r\n\t}", "private static int fastfloor(double x){\n\t\tint xi=(int)x;\n\t\treturn x<xi?xi-1:xi;\n\t}", "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 }", "public int lastNonZero() {\n\t\tint i;\n\t\tfor(i=pointList.size()-1; i>=0; i--) {\n\t\t\tif (pointList.get(i).getY() > 0)\n\t\t\t\treturn i;\n\t\t}\n\t\treturn 0;\n\t}", "public static double findNearestElement(double[] values, double item) {\n\n //defining some variables to use.\n double nearestElement = 0;\n double differenceLowest = 300;\n\n // Loop invariant is: 0 <= i < values.length.\n for (int i = 0; i < values.length; i++){\n\n /* Gets the absolute value for the difference between the input item\n * and the current value in the array.\n */\n double difference = java.lang.Math.abs(item - values[i]);\n\n /* Checks whether the current difference is less than the lowest distance.\n * if this is the case, the value of the new lowest difference is assigned\n * to the differenceLowest variable.\n */\n if (difference < differenceLowest){\n differenceLowest = difference;\n // Assigns the value of the current array element to the nearestElement variable.\n nearestElement = values[i];\n }\n } \n return nearestElement;\n }", "private float getMinX(HomePieceOfFurniture piece) {\n float [][] points = piece.getPoints();\n float minX = Float.POSITIVE_INFINITY;\n for (float [] point : points) {\n minX = Math.min(minX, point [0]);\n } \n return minX;\n }", "protected int findInterval( Double val ){\n\t\tfor( int i = 0; i < histogram.length; i++ ){\n\t\t\tif( (lowerBound + i * this.interval) >= val )\n\t\t\t\treturn Math.max( 0, i - 1 );\n\t\t}\n\t\treturn histogram.length - 1;\n\t}", "private double getMinNumber(ArrayList<Double> provinceValues)\n {\n Double min = 999999999.0;\n\n for (Double type : provinceValues)\n {\n if (type < min)\n {\n min = type;\n }\n }\n return min;\n }", "public static int lower_bound(long[] a, long key)\n\t{\n\t\tint low = 0, high = a.length - 1;\n\t\tint mid;\n\t\twhile (low < high)\n\t\t{\n\t\t\tmid = low + (high - low)/2;\n\t\t\tif (a[mid] >= key)\n\t\t\t\thigh = mid;\n\t\t\telse\n\t\t\t\tlow = mid - 1;\n\t\t}\n\t\treturn low;\n\t}", "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 double getLeft(double min) {\n return Math.max(min, Math.max(Math.max(this.left.getLeft(min), this.right.getLeft(min)),\n Math.max(this.right.getLeft(min), this.right.getLeft(min))));\n }", "public int binarySearch(ArrayList<Integer> a, int val){\n int low = 0;\n int high = a.size() - 1;\n \n while(high - low > 3){\n int mid = (low + high)/2;\n if(a.get(mid) > val){\n high = mid - 1;\n }\n else{\n low = mid; \n }\n }\n int i;\n for(i=low; i<=high; ++i){\n if(a.get(i) > val)\n return i;\n }\n return i;\n }", "Node findLeftmost(Node R){\n Node L = R;\n if( L!= null ) for( ; L.left != null; L = L.left);\n return L;\n }", "public int getMin(ArrayList<Integer> values) {\r\n int min = 10000;\r\n for (int i = 0; i < values.size(); i++) {\r\n if (values.get(i) < min) {\r\n min = values.get(i);\r\n }\r\n }\r\n return min;\r\n }", "public int searchStrictlyGreater(T key) {\n if ((array.length == 1) ||\n (array[0].compareTo(key) == -1) ||\n (array[array.length - 1].compareTo(key) == 1)) {\n return 0;\n }\n\n int start = 0, end = array.length - 2;\n\n do {\n int mid = start + (end - start)/2;\n if (array[mid].compareTo(key) <= 0) {\n if (array[mid + 1].compareTo(key) > 0) {\n return mid + 1;\n }\n else {\n start = mid + 1;\n }\n }\n else {\n end = mid - 1;\n }\n }\n while (start <= end);\n\n return 0;\n }", "public int findLowestTemp() {\n\t\t\n\t\tint min = 0;\n\t\tint indexLow = 0;\n\t\tfor (int i=0; i<temps.length; i++)\n\t\t\tif (temps[i][1] < min) {\n\t\t\t\tmin = temps[i][1];\n\t\t\t\tindexLow = 0;\n\t\t\t}\n\t\t\n\t\treturn indexLow;\n\t\t\n\t}", "public int getFront() {\n return !isEmpty() ? elements[last - 1] : -1;\n }", "private static int getMinIndex(List<Integer> list) {\n return IntStream.range(0, list.size())\n .boxed()\n .min(Comparator.comparingInt(list::get)).\n orElse(list.get(0));\n }", "public static <V extends Comparable<? super V>> V minValueKey(List<V> list)\n\t{\n\t\tCollections.sort(list);\n\t\treturn list.get(0);\n\t}", "private int binarySearchLeft(int[] nums, int target) {\n \tint low=0;\n int high=nums.length-1;\n\n while(low<=high){\n int mid=low+(high-low)/2;\n if (nums[mid]==target){\n if(mid==0||nums[mid-1]<nums[mid]){\n return mid;\n }\n else{\n high=mid-1;\n }\n }\n else if(nums[mid]>target){\n high=mid-1;\n }\n else{\n low=mid+1;\n }\n \n }\n\t\treturn -1;\n\t}", "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}", "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 }", "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 }", "float getLt();", "Double getMinimumValue();", "public double getMinX() {\n\t\tif (pointList.size()==0) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn pointList.get(0).getX();\n\t}", "private int getDominantI(float[] l) {\n float max = 0;\n int maxi = -1;\n for(int i=0;i<l.length;i++) {\n if (l[i]>max)\n max = l[i]; maxi = i;\n }\n return maxi;\n }", "public float getLowerLeftX()\n {\n return ((COSNumber)rectArray.get(0)).floatValue();\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}", "private static int getLeft(int index) {\n\t\treturn (index + 1) * 2 - 1;\n\t}", "public int GetPosition()\n {\n int position = -1;\n\n double CurrentDistance = GetDistance();\n\n for (int i = 0; i < Positions.length; i++)\n {\n // first get the distance from current to the test point\n double DistanceFromPosition = Math.abs(CurrentDistance\n - Positions[i]);\n\n // then see if that distance is close enough using the threshold\n if (DistanceFromPosition < PositionThreshold)\n {\n position = i;\n break;\n }\n }\n\n return position;\n }", "private int findLowerBound(int[] nums, int target) {\n int left = 0, right = nums.length;\n while (left < right) {\n int mid = (right - left) / 2 + left;\n if (nums[mid] >= target) right = mid;\n else left = mid + 1;\n }\n return (left < nums.length && nums[left] == target) ? left : -1;\n }", "private int findEntry(long msb, long lsb) {\n\n int lowIndex = 0;\n int highIndex = index.remaining() / 24 - 1;\n float lowValue = Long.MIN_VALUE;\n float highValue = Long.MAX_VALUE;\n float targetValue = msb;\n\n while (lowIndex <= highIndex) {\n int guessIndex = lowIndex + Math.round(\n (highIndex - lowIndex)\n * (targetValue - lowValue)\n / (highValue - lowValue));\n int position = index.position() + guessIndex * 24;\n long m = index.getLong(position);\n if (msb < m) {\n highIndex = guessIndex - 1;\n highValue = m;\n } else if (msb > m) {\n lowIndex = guessIndex + 1;\n lowValue = m;\n } else {\n // getting close...\n long l = index.getLong(position + 8);\n if (lsb < l) {\n highIndex = guessIndex - 1;\n highValue = m;\n } else if (lsb > l) {\n lowIndex = guessIndex + 1;\n lowValue = m;\n } else {\n // found it!\n return position;\n }\n }\n }\n\n // not found\n return -1;\n }", "private static int binarySearch0(double[] a, int fromIndex, int toIndex,\n\t\t\tdouble key) {\n\t\tint low = fromIndex;\n\t\tint high = toIndex - 1;\n\n\t\twhile (low <= high) {\n\t\t\tint mid = (low + high) >>> 1;\n\t\t\t\tdouble midVal = a[mid];\n\n\t\t\t\tint cmp;\n\t\t\t\tif (midVal < key) {\n\t\t\t\t\tcmp = -1; // Neither val is NaN, thisVal is smaller\n\t\t\t\t} else if (midVal > key) {\n\t\t\t\t\tcmp = 1; // Neither val is NaN, thisVal is larger\n\t\t\t\t} else {\n\t\t\t\t\tlong midBits = Double.doubleToLongBits(midVal);\n\t\t\t\t\tlong keyBits = Double.doubleToLongBits(key);\n\t\t\t\t\tcmp = (midBits == keyBits ? 0 : // Values are equal\n\t\t\t\t\t\t(midBits < keyBits ? -1 : // (-0.0, 0.0) or (!NaN, NaN)\n\t\t\t\t\t\t\t1)); // (0.0, -0.0) or (NaN, !NaN)\n\t\t\t\t}\n\n\t\t\t\tif (cmp < 0)\n\t\t\t\t\tlow = mid + 1;\n\t\t\t\telse if (cmp > 0)\n\t\t\t\t\thigh = mid - 1;\n\t\t\t\telse\n\t\t\t\t\treturn mid; // key found\n\t\t}\n\t\treturn -(low + 1); // key not found.\n\t}", "public int getFront() {\n if (head == tail && size == 0)\n return -1;\n else {\n int head_num = elementData[head];//索引当前头指针的指向的位置\n return head_num;\n }\n // return true;\n }", "public int getLeft(int position) {\r\n\t\treturn this.treeLeft[position];\r\n\t}", "public int findPeakElement(int[] nums) {\n int left = 0, right = nums.length - 1;\n while (left + 1 < right) {\n int mid = left + (right - left) / 2;\n if (nums[mid] < nums[mid + 1]) {\n left = mid;\n }\n else {\n right = mid;\n }\n }\n return nums[left] > nums[right] ? left : right;\n }", "private static int binarySearchForX(XYDataset data, int series, double x) {\n int lo = 0, hi = data.getItemCount(series); \n while (lo < hi) {\n int mid = (lo + hi) / 2;\n double midX = data.getXValue(series, mid);\n if (x < midX)\n\thi = mid;\n else if (x > midX)\n\tlo = mid + 1;\n else\n\treturn mid;\n }\n return lo; // not found, return index of next date\n }", "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 getMin() {\n int length = minList.size();\n int returnValue = 0;\n if (length > 0) {\n returnValue = minList.get(length - 1);\n }\n return returnValue;\n \n }", "public int getIndexOfTokenValue(int value) {\n int left = 0;\n int right = tokens.size() - 1;\n\n while (left <= right) {\n int mid = (left + right) / 2;\n if (tokens.get(mid).getValue() == value) {\n return mid;\n }\n if (tokens.get(mid).getValue() > value) {\n right = mid - 1;\n } else {\n left = mid + 1;\n }\n }\n return -1;\n }", "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 float getMinX(){\n return points.get(0).getX();\n }", "public void removeSmaller(double value){\r\n\t DoubleNode cursor2; \r\n\tfor(cursor = head; cursor != null; cursor = cursor.getLink()){\r\n\t\tif(cursor.getData() < value){\r\n\t\t\tif(cursor == head){\r\n\t\t\t\thead = head.getLink(); \r\n\t\t\t\tmanyNodes--; \r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tcursor2 = cursor; \r\n\t\t\t\tthis.removeCurrent();\r\n\t\t\t\tcursor = cursor2;\r\n\t\t\t\tmanyNodes--; \r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n }", "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 V getLowerBound();", "protected int findIndexL(K key) {\n\t\tfor (int i = keyCount - 1; i >= 0; i--) {\n\t\t\tif (keys[i].compareTo(key) < 0)\n\t\t\t\treturn i;\n\t\t}\n\t\treturn -1;\n\t}", "public static ArrayList<Integer> nearestSmallerToRight(int[] arr) {\n Stack<Integer> st = new Stack<>();\n\n // auxiliary array to store the result\n ArrayList<Integer> result = new ArrayList<>();\n\n // traverse through the array in reverse as we\n // want the stack to be in same traverse order as \n // array\n for (int i = arr.length - 1; i >= 0; i--) {\n // if there are elements in the stack then check if\n // top of the stack is greater than current element\n // if yes, then it is not desirable so pop it as we\n // want only smaller element on the top\n if (!st.empty() && st.peek() >= arr[i])\n st.pop();\n\n // if the stack is becomes empty or is still empty the\n // there is no smaller element to the left\n if (st.empty())\n result.add(-1);\n\n else\n\n // else top is the smallest to the left\n result.add(st.peek());\n\n // if not conditions are met then simply push the array\n // element to the stack\n st.push(arr[i]);\n }\n\n return result;\n }", "public Point getFurthermost(){\n\t\t\tdouble distance;\n\t\t\tdouble distanceMin = Double.MAX_VALUE;\n\t\t\tPoint centroid = centroid();\n\t\t\tPoint closest = new Point();\n\t\t\tfor(Point p : clusterPointsList){\n\t\t\t\tdistance = p.dist(centroid);\t\t\t\n\t\t\t\tif(distance < distanceMin){\n\t\t\t\t\tdistanceMin = distance;\n\t\t\t\t\tclosest = p;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn closest;\n\t\t}", "private Point findFront(Point[] points) {\n\t\t// Loop through the passed points.\n\t\tdouble[] dists = new double[3];\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\t// Get outer-loop point.\n\t\t\tPoint a = points[i];\n\t\t\t\n\t\t\t// Loop through rest of points.\n\t\t\tfor (int k = 0; k < 3; k++) {\n\t\t\t\t// Continue if current outer.\n\t\t\t\tif (i == k) continue;\n\t\t\t\t\n\t\t\t\t// Get inner-loop point.\n\t\t\t\tPoint b = points[k];\n\t\t\t\t\n\t\t\t\t// Add distance between out and inner.\n\t\t\t\tdists[i] += Math.sqrt(\n\t\t\t\t\tMath.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Prepare index and largest holder.\n\t\tint index = 0;\n\t\tdouble largest = 0;\n\t\t\n\t\t// Loop through the found distances.\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\t// Skip if dist is lower than largest.\n\t\t\tif (dists[i] < largest) continue;\n\t\t\t\n\t\t\t// Save the index and largest value.\n\t\t\tindex = i;\n\t\t\tlargest = dists[i];\n\t\t}\n\t\t\n\t\t// Return the largest point index.\n\t\treturn points[index];\n\t}", "public static int comp( float a, float b ) {\n return equal( a, b, FREL_TOL, FABS_TOL ) ? 0 : (a < b ? -1 : 1 );\n }" ]
[ "0.6115747", "0.61069936", "0.60964435", "0.60600793", "0.6015516", "0.57720584", "0.57487947", "0.56783706", "0.56583387", "0.5608664", "0.5605", "0.5597456", "0.5585905", "0.55749035", "0.55636245", "0.5532298", "0.55241805", "0.5505562", "0.54880375", "0.5460261", "0.5455872", "0.54400855", "0.5426816", "0.54171807", "0.5389399", "0.53844553", "0.5378429", "0.53749317", "0.53668433", "0.53630066", "0.53549427", "0.53522575", "0.5346066", "0.5337143", "0.5335032", "0.529352", "0.52878475", "0.52870226", "0.52864796", "0.52831596", "0.52798337", "0.52761245", "0.5272959", "0.5264334", "0.5264133", "0.52522135", "0.52505296", "0.5247494", "0.52434987", "0.52351576", "0.52266705", "0.5221633", "0.52140987", "0.52126503", "0.52102244", "0.51990503", "0.5194203", "0.5194118", "0.5189344", "0.5178159", "0.5171123", "0.5164049", "0.5139925", "0.51347554", "0.5132323", "0.51308715", "0.5123423", "0.51125044", "0.5110544", "0.510338", "0.50973314", "0.5090643", "0.5088947", "0.5088802", "0.50884396", "0.5080279", "0.5076973", "0.5070928", "0.5068794", "0.50687236", "0.5058467", "0.5057839", "0.5056918", "0.50520146", "0.50474703", "0.50441515", "0.50440645", "0.50362456", "0.5027184", "0.5026378", "0.5021379", "0.50096816", "0.50040925", "0.50040853", "0.4994861", "0.49877417", "0.4986883", "0.49793905", "0.49732292", "0.49731612" ]
0.64972746
0
Gets index of the rightmost element, in the ordered list of floating point values, that is greater or equal than the given floating point value.
protected int searchRight(double value) { int i = search(value); while (i < sequence.size() - 1 && value == sequence.get(i + 1)) { i += 1; } return i; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static int BinarySerach_upperValue(ArrayList<Integer> list , int value){ \r\n\t\t\r\n\t\tint mid,l,r;\r\n\t\t\r\n\t\tl = 0;\r\n\t\tr = list.size()-1;\r\n\t\t\r\n\t\tif(value>=list.get(r))\r\n\t\t\treturn r;\r\n\t\tif(value<=list.get(l))\r\n\t\t\treturn l;\r\n\t\t\r\n\t\tmid = (l+r)/2;\r\n\t\t\r\n\t\twhile(l<r){\r\n\t\t\t\r\n\t\t\tmid = (l+r)/2;\r\n\t\t\t\r\n\t\t\tif(list.get(mid)==value)\r\n\t\t\t\treturn mid;\r\n\t\t\t\r\n\t\t\tif(mid+1<list.size() && list.get(mid)<value && list.get(mid+1)>=value)\r\n\t\t\t\treturn mid+1;\r\n\t\t\tif(mid-1>0 && list.get(mid-1)<value && list.get(mid)>=value)\r\n\t\t\t\treturn mid;\r\n\t\t\tif(list.get(mid)<value)\r\n\t\t\t\tl = mid+1;\r\n\t\t\telse\r\n\t\t\t\tr = mid-1;\r\n\t\t}\r\n\t\t\t\r\n\t\treturn -1;\r\n\t}", "private static int findIndexOfLargest(float[] vector) {\n\t\tint index = -1;\n\t\tfloat value = Float.NEGATIVE_INFINITY;\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}", "protected int search(double value) {\n int n = sequence.size();\n int left = 0, right = n - 1, index = 0;\n while (left != right) {\n index = (right - left) / 2 + left;\n if (value >= sequence.get(index == left ? index + 1 : index)) {\n left = index == left ? index + 1 : index;\n } else {\n right = index;\n }\n }\n while (left > 0 && value == sequence.get(left - 1)) {\n left -= 1;\n }\n return left;\n }", "private int rightmostDip() {\n for (int i = n - 2; i >= 0; i--) {\n if (index[i] < index[i + 1]) {\n return i;\n }\n }\n return -1;\n }", "private int findIndexOfMax(){\n\t\tint value=0;\n\t\tint indexlocation=0;\n\t\tfor(int i=0; i<myFreqs.size();i++){\n\t\t\tif(myFreqs.get(i)>value){\n\t\t\t\tvalue = myFreqs.get(i);\n\t\t\t\tindexlocation =i;\n\t\t\t}\n\t\t}\n\t\treturn indexlocation;\n\t}", "private E findRightmost(Node<E> node){\n\t\t/** the rightmost child found */\n\t\tif(node.right.right == null){\n\t\t\tE rightmost = node.right.item;\n\t\t\tnode.right = node.right.left;\n\t\t\treturn rightmost;\n\t\t}else{\n\t\t\treturn findRightmost(node.right);\n\t\t}\n\t}", "static int BinarySerach_lowerEqualValue(ArrayList<Integer> list , int value){\r\n\t\t\t\r\n\t\t\tint mid,l,r;\r\n\t\t\t\r\n\t\t\tl = 0;\r\n\t\t\tr = list.size()-1;\r\n\t\t\t\r\n\t\t\tif(value>=list.get(r))\r\n\t\t\t\treturn r;\r\n\t\t\tif(value<=list.get(l))\r\n\t\t\t\treturn l;\r\n\t\t\t\r\n\t\t\tmid = (l+r)/2;\r\n\t\t\t\r\n\t\t\twhile(l<r){\r\n\t\t\t\t\r\n\t\t\t\tmid = (l+r)/2;\r\n\t\t\t\t\r\n\t\t\t\tif(list.get(mid)==value)\r\n\t\t\t\t\treturn mid;\r\n\t\t\t\t\r\n\t\t\t\tif(mid+1<list.size() && list.get(mid)<=value && list.get(mid+1)>value)\r\n\t\t\t\t\treturn mid;\r\n\t\t\t\tif(mid-1>0 && list.get(mid-1)<=value && list.get(mid)>value)\r\n\t\t\t\t\treturn mid-1;\r\n\t\t\t\tif(list.get(mid)<value)\r\n\t\t\t\t\tl = mid+1;\r\n\t\t\t\telse\r\n\t\t\t\t\tr = mid-1;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\treturn -1;\r\n\t\t}", "public T findHighest(){\n T highest = array[0];\n for (int i=0;i<array.length; i++)\n {\n if (array[i].doubleValue()>highest.doubleValue())\n {\n highest = array[i];\n } \n }\n return highest;\n }", "@Override\n\tpublic int binarySearchXValues(double fKey)\n\t{\n\t\treturn Arrays.binarySearch(this.afXValues, (float) fKey);\n\t}", "private int findNearestValue(final int i, final double key) {\n\n\t\tint low = 0;\n\t\tint high = m_NumValues[i];\n\t\tint middle = 0;\n\t\twhile (low < high) {\n\t\t\tmiddle = (low + high) / 2;\n\t\t\tdouble current = m_seenNumbers[i][middle];\n\t\t\tif (current == key) {\n\t\t\t\treturn middle;\n\t\t\t}\n\t\t\tif (current > key) {\n\t\t\t\thigh = middle;\n\t\t\t} else if (current < key) {\n\t\t\t\tlow = middle + 1;\n\t\t\t}\n\t\t}\n\t\treturn low;\n\t}", "static int BinarySerach_lowerValue(ArrayList<Integer> list , int value){\r\n\t\t\r\n\t\tint mid,l,r;\r\n\t\t\r\n\t\tl = 0;\r\n\t\tr = list.size()-1;\r\n\t\t\r\n\t\tif(value>=list.get(r))\r\n\t\t\treturn r;\r\n\t\tif(value<=list.get(l))\r\n\t\t\treturn -1;\r\n\t\t\r\n\t\tmid = (l+r)/2;\r\n\t\t\r\n\t\twhile(l<r){\r\n\t\t\t\r\n\t\t\tmid = (l+r)/2;\r\n\t\t\t\r\n\t\t\tif(list.get(mid)==value)\r\n\t\t\t\treturn mid-1;\r\n\t\t\t\r\n\t\t\tif(mid+1<list.size() && list.get(mid)<value && list.get(mid+1)>=value)\r\n\t\t\t\treturn mid;\r\n\t\t\tif(mid-1>0 && list.get(mid-1)<value && list.get(mid)>=value)\r\n\t\t\t\treturn mid-1;\r\n\t\t\tif(list.get(mid)<value)\r\n\t\t\t\tl = mid+1;\r\n\t\t\telse\r\n\t\t\t\tr = mid-1;\r\n\t\t}\r\n\t\t\t\r\n\t\treturn -1;\r\n\t}", "double getRight(double max);", "int compareToFloat(floats f);", "public int searchStrictlyGreater(T key) {\n if ((array.length == 1) ||\n (array[0].compareTo(key) == -1) ||\n (array[array.length - 1].compareTo(key) == 1)) {\n return 0;\n }\n\n int start = 0, end = array.length - 2;\n\n do {\n int mid = start + (end - start)/2;\n if (array[mid].compareTo(key) <= 0) {\n if (array[mid + 1].compareTo(key) > 0) {\n return mid + 1;\n }\n else {\n start = mid + 1;\n }\n }\n else {\n end = mid - 1;\n }\n }\n while (start <= end);\n\n return 0;\n }", "void findNextGreaterOnRight(int a[]) {\n\t\tStack<Integer> stack = new Stack<>();\n\t\tstack.push(a[0]);\n\t\tfor(int i = 1; i < a.length; i++) {\n\t\t\twhile(stack.size() > 0 && a[i] > stack.peek()) {\n\t\t\t\tSystem.out.println(stack.pop() + \" -> \" + a[i]);\n\t\t\t}\n\t\t\tstack.push(a[i]);\n\t\t}\n\t\twhile(stack.size() != 0) {\n\t\t\tSystem.out.println(stack.pop() + \" -> -1\");\n\t\t}\n\t}", "private int locate (List<Integer> list, int hash) {\n\t\tif (list.size() == 0) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tint index_a = -1;\n\t\tint index_b = list.size();\n\t\tfloat value_a = (float)list.get(index_a+1);\n\t\tfloat value_b = (float)list.get(index_b-1);\n\t\tfloat hash_float = (float)hash;\n\n\t\tif (hash <= value_a) {\n\t\t\treturn 0;\n\t\t}\n\t\tif (hash > value_b) {\n\t\t\treturn list.size();\n\t\t}\n\n\t\twhile (index_b - index_a > 1) {\n\t\t\tint index_mid = index_a+(int)((float)(index_b-index_a)*(hash_float-value_a)/(value_b-value_a));\n\t\t\tif (index_mid == index_a) {\n\t\t\t\tindex_mid++;\n\t\t\t} else if (index_mid == index_b) {\n\t\t\t\tindex_mid--;\n\t\t\t}\n\t\t\tif (hash >= list.get(index_mid)) {\n\t\t\t\tindex_a = index_mid;\n\t\t\t\tvalue_a = list.get(index_a);\n\t\t\t} else {\n\t\t\t\tindex_b = index_mid;\n\t\t\t\tvalue_b = list.get(index_b);\n\t\t\t}\n\t\t}\n\t\tif (hash == list.get(index_a)) {\n\t\t\treturn index_a;\n\t\t}\n\t\treturn index_b;\n\t}", "private int findRealizerIndex (List<NodeRealizer> realizers, double y)\n {\n int index = 0;\n for (NodeRealizer nodeRealizer : realizers)\n {\n if ((nodeRealizer.getY () - GAP <= y) && (nodeRealizer.getY () + nodeRealizer.getHeight () + GAP >= y))\n {\n return index;\n }\n index++;\n }\n // not found => use first or last index\n if (y < realizers.get (0).getY ())\n {\n return 0;\n }\n else\n {\n return realizers.size () - 1;\n }\n }", "protected int findInterval( Double val ){\n\t\tfor( int i = 0; i < histogram.length; i++ ){\n\t\t\tif( (lowerBound + i * this.interval) >= val )\n\t\t\t\treturn Math.max( 0, i - 1 );\n\t\t}\n\t\treturn histogram.length - 1;\n\t}", "private static int binarySearch0(float[] a, int fromIndex, int toIndex,\n\t\t\tfloat key) {\n\t\tint low = fromIndex;\n\t\tint high = toIndex - 1;\n\n\t\twhile (low <= high) {\n\t\t\tint mid = (low + high) >>> 1;\n\t\tfloat midVal = a[mid];\n\n\t\tint cmp;\n\t\tif (midVal < key) {\n\t\t\tcmp = -1; // Neither val is NaN, thisVal is smaller\n\t\t} else if (midVal > key) {\n\t\t\tcmp = 1; // Neither val is NaN, thisVal is larger\n\t\t} else {\n\t\t\tint midBits = Float.floatToIntBits(midVal);\n\t\t\tint keyBits = Float.floatToIntBits(key);\n\t\t\tcmp = (midBits == keyBits ? 0 : // Values are equal\n\t\t\t\t(midBits < keyBits ? -1 : // (-0.0, 0.0) or (!NaN, NaN)\n\t\t\t\t\t1)); // (0.0, -0.0) or (NaN, !NaN)\n\t\t}\n\n\t\tif (cmp < 0)\n\t\t\tlow = mid + 1;\n\t\telse if (cmp > 0)\n\t\t\thigh = mid - 1;\n\t\telse\n\t\t\treturn mid; // key found\n\t\t}\n\t\treturn -(low + 1); // key not found.\n\t}", "public static int pointFree(double[] numbers){\n String completeString = \"\";\n String redactedString = \"\";\n int newArray[] = new int[numbers.length];\n int greatestValue=0;\n \n \n \n for (double x : numbers) {\n int currentValue;\n \n completeString = String.valueOf(x);\n redactedString = completeString.replaceAll(\"\\\\.\",\"\");\n currentValue = Integer.parseInt(redactedString);\n for (int i = 0; i < newArray.length; i++) {\n \n newArray[i]=currentValue;\n \n \n }\n greatestValue=newArray[0];\n for (int i = 0; i < newArray.length; i++) {\n if(newArray[i]>greatestValue){\n greatestValue=newArray[i];\n \n }\n \n }\n \n \n }\n return greatestValue;\n \n }", "public static int alwaysPickRightmost(int[] arr, int left, int right) {\n return right;\n }", "public int lastNonZero() {\n\t\tint i;\n\t\tfor(i=pointList.size()-1; i>=0; i--) {\n\t\t\tif (pointList.get(i).getY() > 0)\n\t\t\t\treturn i;\n\t\t}\n\t\treturn 0;\n\t}", "private static int binarySearch0(double[] a, int fromIndex, int toIndex,\n\t\t\tdouble key) {\n\t\tint low = fromIndex;\n\t\tint high = toIndex - 1;\n\n\t\twhile (low <= high) {\n\t\t\tint mid = (low + high) >>> 1;\n\t\t\t\tdouble midVal = a[mid];\n\n\t\t\t\tint cmp;\n\t\t\t\tif (midVal < key) {\n\t\t\t\t\tcmp = -1; // Neither val is NaN, thisVal is smaller\n\t\t\t\t} else if (midVal > key) {\n\t\t\t\t\tcmp = 1; // Neither val is NaN, thisVal is larger\n\t\t\t\t} else {\n\t\t\t\t\tlong midBits = Double.doubleToLongBits(midVal);\n\t\t\t\t\tlong keyBits = Double.doubleToLongBits(key);\n\t\t\t\t\tcmp = (midBits == keyBits ? 0 : // Values are equal\n\t\t\t\t\t\t(midBits < keyBits ? -1 : // (-0.0, 0.0) or (!NaN, NaN)\n\t\t\t\t\t\t\t1)); // (0.0, -0.0) or (NaN, !NaN)\n\t\t\t\t}\n\n\t\t\t\tif (cmp < 0)\n\t\t\t\t\tlow = mid + 1;\n\t\t\t\telse if (cmp > 0)\n\t\t\t\t\thigh = mid - 1;\n\t\t\t\telse\n\t\t\t\t\treturn mid; // key found\n\t\t}\n\t\treturn -(low + 1); // key not found.\n\t}", "double rightmost_alien_x() {\n double max_x = 0;\n for (Alien alien : aliens) {\n if (alien.x_position > max_x) {\n max_x = alien.x_position;\n }\n }\n return max_x;\n }", "private int findEntry(long msb, long lsb) {\n\n int lowIndex = 0;\n int highIndex = index.remaining() / 24 - 1;\n float lowValue = Long.MIN_VALUE;\n float highValue = Long.MAX_VALUE;\n float targetValue = msb;\n\n while (lowIndex <= highIndex) {\n int guessIndex = lowIndex + Math.round(\n (highIndex - lowIndex)\n * (targetValue - lowValue)\n / (highValue - lowValue));\n int position = index.position() + guessIndex * 24;\n long m = index.getLong(position);\n if (msb < m) {\n highIndex = guessIndex - 1;\n highValue = m;\n } else if (msb > m) {\n lowIndex = guessIndex + 1;\n lowValue = m;\n } else {\n // getting close...\n long l = index.getLong(position + 8);\n if (lsb < l) {\n highIndex = guessIndex - 1;\n highValue = m;\n } else if (lsb > l) {\n lowIndex = guessIndex + 1;\n lowValue = m;\n } else {\n // found it!\n return position;\n }\n }\n }\n\n // not found\n return -1;\n }", "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 int binarySearch(ArrayList<Integer> a, int val){\n int low = 0;\n int high = a.size() - 1;\n \n while(high - low > 3){\n int mid = (low + high)/2;\n if(a.get(mid) > val){\n high = mid - 1;\n }\n else{\n low = mid; \n }\n }\n int i;\n for(i=low; i<=high; ++i){\n if(a.get(i) > val)\n return i;\n }\n return i;\n }", "public Subset getRightMostElement() {\n\t\tSubset res = this;\n\t\twhile(res.right != res) {\n\t\t\tres = res.right;\n\t\t}\n\t\treturn res;\n\t}", "public int getIndexForXVal(double xVal) {\n\t\tint upper = pointList.size()-1;\n\t\tint lower = 0;\n\t\t\n\t\tif (pointList.size()==0)\n\t\t\treturn 0;\n\t\t\n\t\t//TODO Are we sure an binarySearch(pointList, xVal) wouldn't be a better choice here?\n\t\t//it can gracefully handle cases where the key isn't in the list of values...\n\t\tdouble stepWidth = (pointList.get(pointList.size()-1).getX()-pointList.get(0).getX())/(double)pointList.size();\n\t\t\n\t\tint index = (int)Math.floor( (xVal-pointList.get(0).getX())/stepWidth );\n\t\t//System.out.println(\"Start index: \" + index);\n\t\t\n\t\t//Check to see if we got it right\n\t\tif (index>=0 && (index<pointList.size()-1) && pointList.get(index).getX() < xVal && pointList.get(index+1).getX()>xVal) {\n\t\t\t//System.out.println(\"Got it right on the first check, returning index : \" + index);\n\t\t\treturn index;\n\t\t}\n\t\t\t\t\n\t\t//Make sure the starting index is sane (between upper and lower)\n\t\tif (index<0 || index>=pointList.size() )\n\t\t\tindex = (upper+lower)/2; \n\t\t\n\t\tif (xVal < pointList.get(0).getX()) {\n\t\t\treturn 0;\n\t\t}\n\t\t\t\n\t\tif(xVal > pointList.get(pointList.size()-1).getX()) {\n\t\t\treturn pointList.size()-1;\n\t\t}\n\t\t\n\t\tint count = 0;\n\t\twhile( upper-lower > 1) {\n\t\t\tif (xVal < pointList.get(index).getX()) {\n\t\t\t\tupper = index;\n\t\t\t}\n\t\t\telse\n\t\t\t\tlower = index;\n\t\t\tindex = (upper+lower)/2;\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\treturn index;\n\t}", "public int getIndexOfTokenValue(int value) {\n int left = 0;\n int right = tokens.size() - 1;\n\n while (left <= right) {\n int mid = (left + right) / 2;\n if (tokens.get(mid).getValue() == value) {\n return mid;\n }\n if (tokens.get(mid).getValue() > value) {\n right = mid - 1;\n } else {\n left = mid + 1;\n }\n }\n return -1;\n }", "public float getRight() {\n return internalGroup.getRight();\n }", "int findGreaterNumber(ArrayList<Integer> inArrList)\r\n {\r\n//\t for(int i=0;i<inArrList.size();i++)\r\n//\t {\r\n\t\t\r\n\t//\t greaterNumbr = (ArrayList<Integer>) Collections.max(inArrList);\r\n\t // Exceed length problem:IndexOutOfBoundException.\r\n\t // Index value of Arraylist is always 0. \r\n\t int i=0;\r\n\t\t\t if(inArrList.get(i) > inArrList.get(i+1))\r\n\t\t\t {\r\n\t\t\t\t// inArrList.add(i);\r\n\t\t\t return inArrList.get(i);\r\n\t\t\t }\r\n\t\t\t else\r\n\t\t\t {\r\n\t\t\t\t return inArrList.get(i+1);\r\n\t\t\t\t \r\n\t\t\t }\r\n\t\t\t\r\n\t\t\r\n//\t\t }\r\n//\t System.out.println(\" \"+inArrList);\r\n//\treturn -1;\r\n\t\r\n\t \r\n }", "public final boolean greaterThan() {\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\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "protected int searchLeft(double value) {\n int i = search(value);\n while (i > 0 && value == sequence.get(i - 1)) {\n i -= 1;\n }\n return i;\n }", "public int indexOfLargest( ArrayList<QuakeEntry> quakeData ) {\n\t\tint maxIndex = -1;\n\t\tdouble maxMag = 0.0;\n\t\tfor( int i = 0; i < quakeData.size(); ++i ) {\n\t\t\tdouble mag = quakeData.get( i ).getMagnitude();\n\t\t\tif( mag > maxMag ) {\n\t\t\t\tmaxMag = mag;\n\t\t\t\tmaxIndex = i;\n\t\t\t}\n\t\t}\n\t\t\t\n\t\treturn maxIndex;\n\t}", "public static int find_right_version(int ts, int key){\n\t int index = 0;\n\t LinkedList<Version> versions = mData.get(key);\n\n\t Version result = versions.getFirst();\n\t for (int i = 1 ; i < versions.size(); i++)\n\t\t if (versions.get(i).getWTS() <= ts && result.getWTS() <= versions.get(i).getWTS())\n\t\t\t index = i;\n\t return index;\n }", "public static int getIndexOfMax(double[] array){\n\n int largest = 0;\n for ( int i = 1; i < array.length; i++ )\n {\n if ( array[i] > array[largest] ) largest = i;\n }\n return largest;\n\n }", "public Fitness bestScore() {\r\n Map.Entry<Fitness, List<Element>> bestEntry\r\n = elementsByFitness.lastEntry();\r\n if (bestEntry == null) {\r\n return null;\r\n }\r\n Fitness result = bestEntry.getKey();\r\n\r\n return result;\r\n }", "private int indexOfLargest(ArrayList<QuakeEntry> data) {\n int index = 0;\n double magnitude = 0;\n for (QuakeEntry qe : data) {\n double currMag = qe.getMagnitude();\n if (currMag > magnitude) {\n index = data.indexOf(qe);\n magnitude = currMag;\n }\n }\n System.out.println(magnitude);\n return index;\n }", "static long closer(int arr[], int n, long x)\n {\n int index = binarySearch(arr,0,n-1,(int)x); \n return (long) index;\n }", "private int getDominantI(float[] l) {\n float max = 0;\n int maxi = -1;\n for(int i=0;i<l.length;i++) {\n if (l[i]>max)\n max = l[i]; maxi = i;\n }\n return maxi;\n }", "public static double findNearestElement(double[] values, double item) {\n\n //defining some variables to use.\n double nearestElement = 0;\n double differenceLowest = 300;\n\n // Loop invariant is: 0 <= i < values.length.\n for (int i = 0; i < values.length; i++){\n\n /* Gets the absolute value for the difference between the input item\n * and the current value in the array.\n */\n double difference = java.lang.Math.abs(item - values[i]);\n\n /* Checks whether the current difference is less than the lowest distance.\n * if this is the case, the value of the new lowest difference is assigned\n * to the differenceLowest variable.\n */\n if (difference < differenceLowest){\n differenceLowest = difference;\n // Assigns the value of the current array element to the nearestElement variable.\n nearestElement = values[i];\n }\n } \n return nearestElement;\n }", "public Fitness worstScore() {\r\n Map.Entry<Fitness, List<Element>> worstEntry\r\n = elementsByFitness.firstEntry();\r\n if (worstEntry == null) {\r\n return null;\r\n }\r\n Fitness result = worstEntry.getKey();\r\n\r\n return result;\r\n }", "float getNotIn(int index);", "private int findUpperBound(int[] nums, int target) {\n int left = 0, right = nums.length;\n while (left < right) {\n int mid = (right - left) / 2 + left;\n if (nums[mid] > target) right = mid;\n else left = mid + 1;\n }\n return (left > 0 && nums[left - 1] == target) ? left - 1 : -1;\n }", "@SuppressWarnings(\"unused\")\n public static float findMaxValue(float... values) {\n // Check for null values\n if (values == null || values.length == 0) return 0;\n\n // Cycle all other values\n float max = Float.MIN_VALUE;\n for (float value : values) {\n // Find the max\n if (max < value) max = value;\n }\n // Return\n return max;\n }", "public static int findNextHigherIndex(int[] a, int k) {\n\t\tint start = 0, end = a.length - 1; \n\t \n int ans = -1; \n while (start <= end) { \n int mid = (start + end) / 2; \n \n // Move to right side if target is \n // greater. \n if (a[mid] <= k) { \n start = mid + 1; \n } \n \n // Move left side. \n else { \n ans = mid; \n end = mid - 1; \n } \n } \n return ans;\n\t}", "private int getBestGuess(double values[]){\n int maxIndex=0;\n double max=0;\n for(int i=0;i<4;i++){\n if(values[i]>max) {\n max = values[i];\n maxIndex=i;\n }\n }\n return maxIndex+1;\n }", "public static native long GetLast(long lpjFbxArrayVector2);", "public static float max(final float[] data) {\r\n float max = Float.MIN_VALUE;\r\n for (final float element : data) {\r\n if (max < element) {\r\n max = element;\r\n }\r\n }\r\n return max;\r\n }", "public Point getFurthermost(){\n\t\t\tdouble distance;\n\t\t\tdouble distanceMin = Double.MAX_VALUE;\n\t\t\tPoint centroid = centroid();\n\t\t\tPoint closest = new Point();\n\t\t\tfor(Point p : clusterPointsList){\n\t\t\t\tdistance = p.dist(centroid);\t\t\t\n\t\t\t\tif(distance < distanceMin){\n\t\t\t\t\tdistanceMin = distance;\n\t\t\t\t\tclosest = p;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn closest;\n\t\t}", "private static int getRight(int index) {\n\t\treturn getLeft(index) + 1;\n\t}", "public int getIndexOfMaxNumber(int[] array) {\n\t\tint left = 0, right = array.length - 1;\n\t\twhile (left < right - 1) {\n\t\t\tint mid = left + (right - left) / 2;\n\t\t\tif (array[mid - 1] > array[mid]) {\n\t\t\t\treturn mid - 1;\n\t\t\t}\n\t\t\tif (array[mid] > array[mid + 1]) {\n\t\t\t\treturn mid;\n\t\t\t}\n\t\t\t// up to this point,\n\t\t\t// mid == right || array[mid] < array[mid + 1] ||\n\t\t\t// mid == left || array[mid - 1] < array[mid]\n\t\t\tif (array[mid] <= array[left]) {\n\t\t\t\tright = mid;\n\t\t\t} else {\n\t\t\t\tleft = mid;\n\t\t\t}\n\t\t}\n\t\t// up to this point, left == right - 1;\n\t\treturn array[left] >= array[right] ? left : right;\n\t}", "@Test\n public void getIndex(){\n List <Double> list = new ArrayList<>();\n list.add(1.0);\n list.add(2.0);\n list.add(3.0);\n list.add(4.0);\n\n assertEquals(0,list.indexOf(1.0));\n }", "public static ArrayList<Integer> nearestSmallerToRight(int[] arr) {\n Stack<Integer> st = new Stack<>();\n\n // auxiliary array to store the result\n ArrayList<Integer> result = new ArrayList<>();\n\n // traverse through the array in reverse as we\n // want the stack to be in same traverse order as \n // array\n for (int i = arr.length - 1; i >= 0; i--) {\n // if there are elements in the stack then check if\n // top of the stack is greater than current element\n // if yes, then it is not desirable so pop it as we\n // want only smaller element on the top\n if (!st.empty() && st.peek() >= arr[i])\n st.pop();\n\n // if the stack is becomes empty or is still empty the\n // there is no smaller element to the left\n if (st.empty())\n result.add(-1);\n\n else\n\n // else top is the smallest to the left\n result.add(st.peek());\n\n // if not conditions are met then simply push the array\n // element to the stack\n st.push(arr[i]);\n }\n\n return result;\n }", "static int findLastPosition(int[] nums, int target,int left,int right){\n while(left<=right){\n int mid=left+(right-left)/2;\n\n //If the target found\n if(nums[mid]==target){\n //if this is the last target from right\n if(mid==nums.length-1 ||nums[mid]<nums[mid+1])\n return mid;\n else{\n //there are more targets available at right\n left=mid+1;\n }\n }\n if(target<nums[mid]){\n right=mid-1;\n }else if(target>nums[mid]){\n left=mid+1;\n }\n\n }\n return -1;\n }", "public double biggest(ArrayList<Double> numbers) {\n\t\tif(numbers == null) {\n\t\t\treturn -1;\n\t\t} else if (numbers.size() < 3 || numbers.size() % 2 == 0) {\n\t\t\treturn -1;\n\t\t}\n\t\tdouble first = numbers.get(0);\n\t\tdouble middle = numbers.get((int) Math.floor(numbers.size() / 2));\n\t\tdouble last = numbers.get(numbers.size() -1);\n\t\tdouble maximum = (first > middle && first > last) ? first :\n\t\t(middle > last) ? middle :\n\t\tlast;\n\t\treturn maximum;\t\t// default return value to ensure compilation\n\t}", "public T getLast()\n\t//POST: FCTVAL == last element of the list\n\t{\n\t\tNode<T> tmp = start;\n\t\twhile(tmp.next != start) //traverse the list to end\n\t\t{\n\t\t\ttmp = tmp.next;\n\t\t}\n\t\treturn tmp.value;\t//return end element\n\t}", "public int findHighestTemp() {\n\t\t\n\t\tint max = 0;\n\t\tint indexHigh = 0;\n\t\tfor (int i=0; i<temps.length; i++)\n\t\t\tif (temps[i][0] > max) {\n\t\t\t\tmax = temps[i][0];\n\t\t\t\tindexHigh = i;\n\t\t\t}\n\t\t\n\t\treturn indexHigh;\n\t\t\n\t}", "private int findCoordElementRegular(double coordValue, boolean bounded) {\n int n = orgGridAxis.getNcoords();\n if (n == 1 && bounded)\n return 0;\n\n double distance = coordValue - orgGridAxis.getCoordEdge1(0);\n double exactNumSteps = distance / orgGridAxis.getResolution();\n // int index = (int) Math.round(exactNumSteps); // ties round to +Inf\n int index = (int) exactNumSteps; // truncate down\n\n if (bounded && index < 0)\n return 0;\n if (bounded && index >= n)\n return n - 1;\n\n // check that found point is within interval\n if (index >= 0 && index < n) {\n double lower = orgGridAxis.getCoordEdge1(index);\n double upper = orgGridAxis.getCoordEdge2(index);\n if (orgGridAxis.isAscending()) {\n assert lower <= coordValue : lower + \" should be le \" + coordValue;\n assert upper >= coordValue : upper + \" should be ge \" + coordValue;\n } else {\n assert lower >= coordValue : lower + \" should be ge \" + coordValue;\n assert upper <= coordValue : upper + \" should be le \" + coordValue;\n }\n }\n\n return index;\n }", "public static int indexOf(double[] list, double val) {\n\t\tfor(int i=0; i<list.length; i++) {\n\t\t\tif (list[i] == val) return i;\n\t\t}\n\t\treturn -1;\n\t}", "private static double getHighestScore (List<Double> inputScores) {\n\n\t\tCollections.sort(inputScores, Collections.reverseOrder());\n\n\t\treturn inputScores.get(0);\n\n\t}", "private double findMaxY() {\n\t\tif (pointList.size()==0) {\n\t\t\treturn Double.NaN;\n\t\t}\n\t\tdouble max = pointList.get(0).getY();\n\t\tfor(int i=0; i<pointList.size(); i++)\n\t\t\tif (max<pointList.get(i).getY())\n\t\t\t\tmax = pointList.get(i).getY();\n\t\treturn max;\n\t}", "private int getRightOf(int index) {\n // TODO: YOUR CODE HERE\n return index * 2 + 1;\n }", "private int findNextElement() {\n\t\tif (hasNext()) {\n\t\t\tint value = this.index + 1;\n\t\t\treturn value;\n\n\t\t}\n\t\treturn -1;\n\t}", "private float checkMaxDataPoint(ArrayList<Float> data) {\n\t\tfloat max = 1.0f;\n\t\treturn max;\n\t}", "public static int getIndexOfMax(double[] x) {\n Objects.requireNonNull(x, \"The supplied array was null\");\n int index = 0;\n double max = Double.MIN_VALUE;\n for (int i = 0; i < x.length; i++) {\n if (x[i] > max) {\n max = x[i];\n index = i;\n }\n }\n return (index);\n }", "public int findPeakElement(int[] nums) {\n int left = 0, right = nums.length - 1;\n while (left + 1 < right) {\n int mid = left + (right - left) / 2;\n if (nums[mid] < nums[mid + 1]) {\n left = mid;\n }\n else {\n right = mid;\n }\n }\n return nums[left] > nums[right] ? left : right;\n }", "public static int findIdxOfGreatestValueLesserThanOrEqualToN(long[] a, long n) {\n\t\tint lo = 0;\n\t\tint hi = a.length - 1;\n\t\t// int loops = 0;\n\t\twhile (lo <= hi) {\n\t\t\t// ++loops;\n\t\t\t// Key is in a[lo..hi] or not present.\n\t\t\tint mid = lo + (hi - lo) / 2;\n\t\t\tif (n < a[mid]) hi = mid - 1;\n\t\t\telse if (n > a[mid]) lo = mid + 1;\n\t\t\telse return mid; // Equality Match!\n\t\t}\n\t\t// System.err.println(\"k: \" + n + \", loops: \" + loops);\n\t\tif (hi < 0) return -1; // Less than lowest\n\t\telse if (lo >= a.length) return a.length - 1; // Greater than highest\n\t\telse return hi; // Greatest lower element\n\t}", "public static native int FindReverse(long lpjFbxArrayVector2, long pElement, int pStartIndex);", "public static float maxStockProfit(List<Float> values) {\n\t\tif (values.size() < 2) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tfloat profit = 0.0F, min = values.get(0);\n\t\tfor (int i = 1; i<values.size(); i++) {\n\t\t\tprofit = Math.max(profit, values.get(i) - min);\n\t\t\tmin = Math.min(min, values.get(i));\n\t\t}\n\t\treturn profit;\n\t}", "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 E getLast()// you finish (part of HW#4)\n\t{\n\t\t// If the tree is empty, return null\n\t\t// FIND THE RIGHT-MOST RIGHT CHILD\n\t\t// WHEN you can't go RIGHT anymore, return the node's data to last Item\n\t\tif (root == null)\n\t\t\treturn null;\n\t\tBinaryNode<E> iteratorNode = root;\n\t\twhile (iteratorNode.hasRightChild())\n\t\t\titeratorNode = iteratorNode.getRightChild();\n\t\treturn iteratorNode.getData();\n\t}", "public int lastOccurrence(int a[], int x) {\n\t\tint low = 0;\n\t\tint high = a.length - 1;\n\t\tint result = -1;\n\t\twhile (low <= high) {\n\t\t\tint mid = (low + high) / 2;\n\t\t\tif (a[mid] == x) {\n\t\t\t\tresult = mid;\n\t\t\t\tlow = mid + 1;\n\t\t\t} else if (x > a[mid]) {\n\t\t\t\tlow = mid + 1;\n\t\t\t} else {\n\t\t\t\thigh = mid - 1;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "double getUpperThreshold();", "private int binarySearch(T element) {\n int start = 0, end = sortedArray.size(), mid = 0;\n while (start < end) {\n mid = (end + start) / 2;\n int cmp = sortedArray.get(mid).compareTo(element);\n if (cmp == 0) {\n start = end = mid;\n }\n else if (cmp < 0) {\n start = mid + 1;\n }\n else {\n end = mid;\n }\n }\n return start;\n }", "public static double findTallest(List<Double> peeps) {\n\t\t double largeNum = 0;\n\t\tfor (int i = 0; i < peeps.size(); i++) {\n\t\t\tif (peeps.get(i)>=largeNum) {\n\t\t\t\tlargeNum =peeps.get(i);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\treturn largeNum;\n\t}", "public float max(Collection<Float> data){\r\n return Collections.max(data);\r\n }", "public int[] findRightInterval(int[][] intervals) {\n\tTreeMap<Integer, Integer> tMap = new TreeMap<>();\n\tfor (int i=0; i<intervals.length; i++) {\n\t tMap.put(intervals[i][0], i);\n\t}\n\t\n\tint[] result = new int[intervals.length];\n\tfor (int i = 0; i < intervals.length; i++) {\n\t int right = intervals[i][1];\n\t Map.Entry<Integer, Integer> entry = tMap.ceilingEntry(right);\n\t int index = entry == null ? -1 : entry.getValue();\n\t result[i] = index;\n\t}\n\n\treturn result;\n }", "public static int comp( float a, float b ) {\n return equal( a, b, FREL_TOL, FABS_TOL ) ? 0 : (a < b ? -1 : 1 );\n }", "public static int getMaxIndex(double[] array)\r\n\t{\r\n\t\tdouble max = Double.NEGATIVE_INFINITY;\r\n\t\tint maxIndex = 0;\r\n\t\tfor (int i = 0; i < array.length; i++)\r\n\t\t\tif (max < array[i]) {\r\n\t\t\t\tmax = array[i];\r\n\t\t\t\tmaxIndex = i;\r\n\t\t\t}\r\n\t\treturn maxIndex;\r\n\t}", "public double getRight(double max) {\n return Math.max(max, Math.max(Math.max(this.left.getRight(max), this.right.getRight(max)),\n Math.max(this.right.getRight(max), this.right.getRight(max))));\n }", "public float getLastValue() {\n // ensure float division\n return ((float)(mLastData - mLow))/mStep;\n }", "public Comparison compare(float left, float right) {\n return checkResult(Float.compare(left, right));\n }", "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 double Right(){\n\t\tdouble farx = x + sizeX - 1;\n\t\treturn (farx);\n\t}", "public java.lang.Integer getFurthestPoint() {\n return furthest_point;\n }", "public int getMaxFloor();", "@Override\n\tpublic int has(Comparable value) {\n\t\t\n\t\tint lowerBound = 0;\n\t\tint upperBound = currentIndex - 1;\n\t\tint current;\n\t\t\n\t\twhile (true) {\n\t\t\t\n\t\t\tcurrent = (lowerBound + upperBound) / 2;\n\t\t\t\n\t\t\tif (array[current].equalsWith(value)) {\n\t\t\t\t//element is successfully found\n\t\t\t\treturn current;\n\t\t\t} else if (lowerBound > upperBound) {\n\t\t\t\t// not found\n\t\t\t\treturn -1;\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tif (array[current].lessThan(value)) {\n\t\t\t\t\tlowerBound = current + 1; //in higher half\n\t\t\t\t} else {\n\t\t\t\t\tupperBound = current - 1; //in lower half\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "Double getMaximumValue();", "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 static int getPosition(int toFind, ArrayList<Integer> arr) {\n int leftBound = 0;\n int rightBound = arr.size() - 1;\n int lastOk = -1;\n int mid;\n while (leftBound <= rightBound) {\n mid = (leftBound + rightBound) / 2;\n if (arr.get(mid) == toFind) {\n return mid;\n } else {\n if (arr.get(mid) < toFind) {\n leftBound = mid + 1;\n } else {\n rightBound = mid - 1;\n }\n }\n }\n return -1;\n }", "private Double find_kth_element(Object arr[], int left, int right, int k) {\n\t\t\n\t\tif (k >= 0 && k <= right - left + 1) {\n\t\t\tint pos = random_partition(arr, left, right), offset = pos - left;\n\t\t\tif (offset == k - 1)\n\t\t\t\treturn (Double)arr[pos];\n\t\t\telse if (offset > k - 1)\n\t\t\t\treturn find_kth_element(arr, left, pos - 1, k);\n\t\t\treturn find_kth_element(arr, pos + 1, right, k - pos + left - 1);\n\t\t}\n\t\treturn null; // return null when k is invalid\n\t}", "E maxVal();", "public OptionalDouble getBestScore()\n {\n if (scores.size() > 0)\n {\n return OptionalDouble.of(scores.lastKey());\n }\n else\n {\n return OptionalDouble.empty();\n }\n }", "private static int rightOfSegment(int[] a, int lb) {\n int rb = lb + 1;\n while (rb < a.length && a[rb] < a[rb - 1]) {\n rb++;\n }\n return rb - 1; // TODO: Validate\n }", "public int mostNearFruit(LinkedList<Fruit> f , Packman p)\r\n\t{\r\n\t\tdouble d = distance(p.location , f.get(0).location);\r\n\t\tint close = 0;\r\n\t\tfor(int i = 1 ; i < f.size() ; i++)\t\t\r\n\t\t{\r\n\t\t\tif(distance(p.location , f.get(i).location) < d)\r\n\t\t\t{\r\n\t\t\t\td = distance(p.location , f.get(i).location);\r\n\t\t\t\tclose = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn close;\r\n\t}", "private KeyedItem findLeftMost(BinarySearchTree tree){\r\n\t\t\r\n\t\t//return the root when we find that we reached the leftmost child\r\n\t\tif(tree.getLeftChild() == null){\r\n\t\t\treturn tree.getRoot();\r\n\t\t}\r\n\t\telse{\r\n\t\t\t//keep going. has more left children\r\n\t\t\treturn findLeftMost(tree.getLeftChild());\r\n\t\t}\r\n\t}", "public static int findNextHigher(int[] a, int k) {\n\t int low = 0; \n\t int high = a.length - 1;\n\t \n\t int result = Integer.MAX_VALUE;\n\t while (low <= high) {\n\t int mid = (low + high) / 2;\n\t \n\t if (a[mid] > k) {\n\t result = a[mid]; /*update the result and continue*/\n\t high = mid - 1;\n\t } else {\n\t low = mid + 1;\n\t }\n\t } \n\t \n\t return result;\n\t}", "@Test\n public void elementLocationTestRecursive() {\n ReverseCount reverseCount = new ReverseCount();\n int elementNumber = 3;\n System.out.println(nthToLastReturnRecursive(list.getHead(), elementNumber, reverseCount).getElement());\n }" ]
[ "0.6115444", "0.59163386", "0.58034617", "0.5717227", "0.56539816", "0.56224644", "0.55872744", "0.55829954", "0.5526434", "0.5519426", "0.5497608", "0.5496443", "0.5482492", "0.54610896", "0.54507816", "0.5434085", "0.54031074", "0.53983307", "0.5351555", "0.524027", "0.52165693", "0.5212841", "0.5165236", "0.51580584", "0.51573575", "0.5156007", "0.51554066", "0.5118422", "0.51126534", "0.5107752", "0.510168", "0.51004875", "0.5091729", "0.5070311", "0.5041338", "0.50391203", "0.50251454", "0.5021625", "0.5010765", "0.50088173", "0.5007", "0.5005492", "0.4998371", "0.49970126", "0.49917468", "0.49875844", "0.49627212", "0.49611127", "0.4960968", "0.4940606", "0.49402893", "0.49379095", "0.49087533", "0.49013564", "0.48838103", "0.48771173", "0.48765042", "0.4876024", "0.4871938", "0.4870048", "0.48631576", "0.48630396", "0.4858848", "0.4858015", "0.48574746", "0.48552904", "0.48496997", "0.4847769", "0.4846289", "0.48403335", "0.48396042", "0.48389935", "0.4836221", "0.48096398", "0.47957343", "0.47950768", "0.4789274", "0.47883815", "0.47841066", "0.47816852", "0.47797212", "0.47761342", "0.4774897", "0.4770679", "0.47691414", "0.47642374", "0.476168", "0.47606018", "0.47598842", "0.47558287", "0.47526708", "0.47525877", "0.4752151", "0.47439495", "0.47396252", "0.4736618", "0.47360444", "0.47331122", "0.47216564", "0.47202104" ]
0.630758
0
Gets clusters of elements by density properties defined as epsilon and minimum.
public static Set<List<Double>> cluster(List<Double> elements, double epsilon, int minimum) { ISearchIndex<Double> index = new SearchIndex(elements); return cluster(index, epsilon, minimum); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static <T> Set<List<T>> cluster(ISearchIndex<T> index, double epsilon, int minimum) {\n Set<List<T>> clusters = new HashSet<List<T>>();\n Set<T> visited = new HashSet<T>();\n Set<T> noise = new HashSet<T>();\n\n for (T element : index) {\n if (visited.contains(element)) {\n continue;\n }\n visited.add(element);\n\n List<T> neighbors = index.radius(element, epsilon);\n\n if (neighbors.size() < minimum) {\n noise.add(element);\n } else {\n List<T> cluster = new LinkedList<T>();\n\n LinkedList<T> seeds = new LinkedList<T>();\n for (T neighbor : neighbors) {\n seeds.push(neighbor);\n visited.add(neighbor);\n cluster.add(neighbor);\n noise.remove(neighbor);\n }\n\n while (!seeds.isEmpty()) {\n T seed = seeds.pollLast();\n List<T> exteriors = index.radius(seed, epsilon);\n\n if (exteriors.size() >= minimum) {\n Set<T> subvisited = new HashSet<T>();\n for (T exterior : exteriors) {\n if (!visited.contains(exterior)) {\n seeds.push(exterior);\n subvisited.add(exterior);\n cluster.add(exterior);\n }\n if (noise.contains(exterior)) {\n noise.remove(exterior);\n cluster.add(exterior);\n }\n }\n visited.addAll(subvisited);\n }\n }\n\n clusters.add(cluster);\n }\n }\n\n return clusters;\n }", "public double findDensity() {\n\t\tdouble temp = 0.0;\n\t\tfor (int i = 0; i < neighbors.size(); i++) { //calculate desnity using point and k nearest neighbors\n\t\t\tPoint t = neighbors.get(i);\n\t\t\tArrayList<Double> pa = t.getList();\n\t\t\tArrayList<Double> pb = p.getList();\n\t\t\tdouble sum = 0.0;\n\t\t\tfor (int j = 0; j < pa.size(); j++) {\n\t\t\t\tsum += Math.pow(pa.get(j)- pb.get(j), 2); //use euclidian distance\n\t\t\t}\n\t\t\ttemp += Math.sqrt(sum);\n\t\t}\n\t\treturn ((neighbors.size())/temp);\n\t}", "static double clusterVerticesOneStep(Mesh mesh) {\n\t\t\n\t\t// for each pair of the vertices\n\t\tdouble mindis = 1.0e+30;\n\t\tfor(int i = 0; i < mesh.getNumVertices(); i++) {\n\t\t\tVertex v1 = mesh.getVertex(i);\n\t\t\tfor(int j = (i + 1); j < mesh.getNumVertices(); j++) {\n\t\t\t\tVertex v2 = mesh.getVertex(j);\n\t\t\t\n\t\t\t\t// for each pair of the nodes\n\t\t\t\tdouble maxdis = 0.0;\n\t\t\t\tfor(int ii = 0; ii < v1.nodes.size(); ii++) {\n\t\t\t\t\tNode n1 = (Node)v1.nodes.get(ii);\n\t\t\t\t\tfor(int jj = 0; jj < v2.nodes.size(); jj++) {\n\t\t\t\t\t\tNode n2 = (Node)v2.nodes.get(jj);\n\t\t\t\t\t\tif(n1.getDisSim2(n2.getId()) > maxdis) {\n\t\t\t\t\t\t\tmaxdis = n1.getDisSim2(n2.getId());\n\t\t\t\t\t\t\tif(maxdis > mindis) {\n\t\t\t\t\t\t\t\tii = v1.nodes.size(); break;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// update mindis\n\t\t\t\tif(mindis > maxdis) {\n\t\t\t\t\tmindis = maxdis;\n\t\t\t\t\t//System.out.println(\" updated mindis=\" + mindis);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Determine the threshold\n\t\tdouble threshold = mindis * clusteringThreshold;\n\t\t\n\t\t// Combine close two vertices \n\t\tfor(int i = 0; i < mesh.getNumVertices(); i++) {\n\t\t\tVertex v1 = mesh.getVertex(i);\n\t\t\tfor(int j = (i + 1); j < mesh.getNumVertices(); j++) {\n\t\t\t\tVertex v2 = mesh.getVertex(j);\n\t\t\t\n\t\t\t\t// for each pair of the nodes\n\t\t\t\tdouble maxdis = -1.0;\n\t\t\t\tfor(int ii = 0; ii < v1.nodes.size(); ii++) {\n\t\t\t\t\tNode n1 = (Node)v1.nodes.get(ii);\n\t\t\t\t\tfor(int jj = 0; jj < v2.nodes.size(); jj++) {\n\t\t\t\t\t\tNode n2 = (Node)v2.nodes.get(jj);\n\t\t\t\t\t\tif(n1.getDisSim2(n2.getId()) > maxdis) {\n\t\t\t\t\t\t\tmaxdis = n1.getDisSim2(n2.getId());\n\t\t\t\t\t\t\tif(maxdis > threshold) {\n\t\t\t\t\t\t\t\tii = v1.nodes.size(); break;\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\tif(maxdis > threshold) continue;\n\t\t\t\t\n\t\t\t\t//System.out.println(\" combine: i=\" + i + \" j=\" + j + \" names=\" + authors + \" maxdis=\" + maxdis + \" th=\" + threshold);\n\t\t\t\t\n\t\t\t\t// combine the two vertices\n\t\t\t\tfor(int jj = 0; jj < v2.nodes.size(); jj++) {\n\t\t\t\t\tNode n2 = (Node)v2.nodes.get(jj);\n\t\t\t\t\tv1.nodes.add(n2);\n\t\t\t\t\tn2.setVertex(v1);\n\t\t\t\t}\n\t\t\t\tmesh.removeOneVertex(v2);\n\t\t\t\tj--;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn threshold;\n\t}", "public Set<Set<Entity>> getEdgeBetweennessClusters(double ratioEdgesToRemove)\r\n\t{\r\n\t\tint numEdgesToRemove = (int) (getNumberOfEdges() * ratioEdgesToRemove);\r\n\t\tEdgeBetweennessClusterer<Entity, EntityGraphEdge> betweenClusterer = new EdgeBetweennessClusterer<Entity, EntityGraphEdge>(\r\n\t\t\t\tnumEdgesToRemove);\r\n\r\n\t\tList<Set<Entity>> clusters = new ArrayList<Set<Entity>>(\r\n\t\t\t\tbetweenClusterer.transform(directedGraph));\r\n\t\tlogger.info(\"Number of edge-betweenness clusters: \" + clusters.size());\r\n\t\tCollections.sort(clusters, sortListBySizeDescending);\r\n\r\n\t\tIterator<Set<Entity>> clusterIter = clusters.iterator();\r\n\t\tSet<Set<Entity>> clusterSet = new HashSet<Set<Entity>>();\r\n\r\n\t\twhile (clusterIter.hasNext()) {\r\n\t\t\tSet<Entity> nodeCluster = clusterIter.next();\r\n\t\t\tSet<Entity> entCluster = new HashSet<Entity>();\r\n\t\t\tfor (Entity node : nodeCluster) {\r\n\t\t\t\tentCluster.add(node);\r\n\t\t\t}\r\n\t\t\tlogger.info(\"Cluster's size: \" + entCluster.size());\r\n\t\t\tclusterSet.add(entCluster);\r\n\t\t}\r\n\t\treturn clusterSet;\r\n\t}", "public Vector run(){\n// System.out.println(\"Minimum radius is: \" + minRadius);\n// System.out.println(\"Maximum radius is: \" + maxRadius);\n Vector clusters = new Vector();\n double fitnessSum = 0;\n for (int q = 0; q < numTests; q++){\n Gene hypothesis = initializer.createRandomGene(fitnessFunction, minRadius, maxRadius);\n //This turns it into a circle.\n if (Math.random() > 0.5){ \n hypothesis.setMajorAxisRadius(hypothesis.getMinorAxisRadius());\n } else { \n hypothesis.setMinorAxisRadius(hypothesis.getMajorAxisRadius());\n }\n// System.out.println(hypothesis);\n double fitness = hypothesis.getFitness();\n fitnessSum = fitnessSum + fitness;\n if ((hypothesis.getCount() >= minPoints) && (fitness >= minAccepted)){\n clusters.add(hypothesis);\n }\n }\n averageFitness = fitnessSum/numTests;\n return clusters;\n }", "private static double dynamically_select_epsilon(ArrayList<Point> pointset){\n\t\tPair closestPair = closest_pair(pointset);\n\t\t\n\t\t// Calculate Chebyshev distance between nearest pair\n\t\tdouble distance = chebyshev_distance(closestPair.getFirst(), closestPair.getSecond());\n\t\t\n\t\t// Divide by 8 to fit 8e box constraint set in Gabe's paper\n\t\treturn distance / 8.0;\n\t}", "public HashMap getClusterDiameter() {\n double maxEuclideanDistance = 0;\n double maxCorrelationDistance = 0;\n\n Set probeIDSet = points.keySet();\n Iterator probeIt = probeIDSet.iterator();\n \n int comparisonIndex = 0;\n \n while (probeIt.hasNext()) {\n int probeID = (Integer) probeIt.next();\n double[] pointA = (double[]) points.get(probeID);\n\n Set probeIDSet2 = points.keySet();\n Iterator probeIt2 = probeIDSet2.iterator();\n while (probeIt2.hasNext()) {\n int probeID2 = (Integer) probeIt2.next();\n double[] pointB = (double[]) points.get(probeID2);\n \n HashMap distances = KMeans.getDistances(pointA, pointB);\n double eucDist = (Double) distances.get(\"euclidean\");\n double correlDist = (Double) distances.get(\"correlation\");\n \n if (comparisonIndex == 0) { // First distance\n maxEuclideanDistance = eucDist;\n maxCorrelationDistance = correlDist;\n } else if (eucDist > maxEuclideanDistance) {\n maxEuclideanDistance = eucDist;\n } else if ( Math.abs(correlDist) < maxCorrelationDistance) {\n maxCorrelationDistance = correlDist;\n }\n comparisonIndex++;\n }\n }\n \n HashMap<String, Double> distances = new HashMap<String, Double>();\n distances.put(\"euclidean\", maxEuclideanDistance);\n distances.put(\"correlation\", maxCorrelationDistance);\n return distances;\n }", "public Hashtable<Double, Integer> cluster(ArrayList<Double>[] array) {\n\t\t\n\t\tHashtable<Double, Integer> results = new Hashtable<Double, Integer>();\n\t\tfor (ArrayList<Double> arrayList : array) {\n\t\t\t/*\n\t\t\t * for (Double value : arrayList) { for (int i=1;\n\t\t\t * i<thresholds.length; i++) { if (thresholds[i-1] > value && value\n\t\t\t * >= thresholds[i]) clusteringConsole.put(value, i-1); } if\n\t\t\t * (!clusteringConsole.containsKey(value))\n\t\t\t * System.out.println(\"not classified: \"+value); }\n\t\t\t */\n\t\t\t\n\t\t\tint prevStateIndex = 0; \n\t\t\t//double prevStateCenter = centers[0];\n\t\t\t\n\t\t\tfor (Double value : arrayList) {\n\t\t\t\t \n\t\t\t\tdouble s = DEFAULT_SIGMA;\n\t\t\t\t//int stateIndex = prevStateIndex; // if distance not enough from previous center, the previous state will be copied\n\t\t\t\t//if ( Math.abs(value-prevStateCenter) > 0.25 ) { // if large distance from the previous center, look up where we are\n\t\t\t\t\t\n\t\t\t\t\tif (centers[0] + s > value && value > centers[0] - s)\n\t\t\t\t\t\tresults.put(value, 1);\n\t\t\t\t\telse if (centers[1] + s > value && value > centers[1] - s)\n\t\t\t\t\t\tresults.put(value, 2);\n\t\t\t\t\telse if (centers[2] + s > value && value > centers[2] - s)\n\t\t\t\t\t\tresults.put(value, 3);\n\t\t\t\t\telse if (centers[3] + s > value && value > centers[3] - s)\n\t\t\t\t\t\tresults.put(value, 4);\n\t\t\t\t\telse if (centers[4] + s > value && value > centers[4] - s)\n\t\t\t\t\t\tresults.put(value, 5);\n\t\t\t\t\telse results.put(value, 0);\n\t\t\t\t//}\n\t\t\t\t\n\t\t\t\t//prevStateCenter = centers[stateIndex];\n\t\t\t\t//prevStateIndex = stateIndex;\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}", "private static void dp() {\n\t\tm[0] = 0;\n\t\tk[0] = 0;\n\n\t\t// base case 1:for 1 cent we need give 1 cent\n\t\tm[1] = 1;\n\t\tk[1] = 1;\n\n\t\tfor (int i = 2; i <= n; i++) {\n\t\t\tint min = Integer.MAX_VALUE;\n\t\t\tint sel = -1;\n\t\t\tfor (int j = 0; j < sd; j++) {\n\t\t\t\tint a = d[j];\n\t\t\t\tif (a > i) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tint v = 1 + m[i - a];\n\t\t\t\tif (v < min) {\n\t\t\t\t\tmin = v;\n\t\t\t\t\tsel = a;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (sel == -1)\n\t\t\t\tthrow new NullPointerException(\"sel != -1\");\n\t\t\tm[i] = min;\n\t\t\tk[i] = sel;\n\t\t}\n\t}", "private static Collection<Point> initializeCenters(int count) {\n\t\tif(count > CLUSTER_COLORS.length){\n\t\t\tthrow new IllegalStateException(\"not enough colors...\");\n\t\t}\n\t\t\n\t\tCollection<Point> result = new HashSet<Point>();\n\t\tRandom r = new Random();\n\t\t\n\t\tfor(int i = 0; i < count; i++){\n\t\t\tPoint p = new Point(r.nextInt(400), r.nextInt(400));\n\t\t\tp.setColor(CLUSTER_COLORS[i]);\n\t\t\tresult.add(p);\n\t\t}\n\t\treturn result;\n\t}", "private double dynamically_select_epsilon(ArrayList<Point> pointset) {\n\t\tPair closestPair = closest_pair(pointset);\n\n\t\t// Calculate Chebyshev distance between nearest pair\n\t\tdouble distance = chebyshev_distance(closestPair);\n\n\t\t// Divide by 16 to fit 8e box constraint set in Gabe's paper\n\t\treturn distance / 16.0;\n\t}", "public static HashMap<LonLat,ArrayList<STPoint>> clustering2dKNSG(IKernel kernel,ArrayList<STPoint> data,double h,double e) {\n\t\tHashMap<LonLat,ArrayList<STPoint>> result = new HashMap<LonLat,ArrayList<STPoint>>();\n\t\tint N = data.size();\n\t\t//\t\tSystem.out.println(\"#number of points : \"+N);\n\n\t\tfor(STPoint point:data) {\n\t\t\t// seek mean value //////////////////\n\t\t\tLonLat mean = new LonLat(point.getLon(),point.getLat());\n\n\t\t\t//loop from here for meanshift\n\t\t\twhile(true) {\n\t\t\t\tdouble numx = 0d;\n\t\t\t\tdouble numy = 0d;\n\t\t\t\tdouble din = 0d;\n\t\t\t\tfor(int j=0;j<N;j++) {\n\t\t\t\t\tLonLat p = new LonLat(data.get(j).getLon(),data.get(j).getLat());\n\t\t\t\t\tdouble k = kernel.getDensity(mean,p,h);\n\t\t\t\t\tnumx += k * p.getLon();\n\t\t\t\t\tnumy += k * p.getLat();\n\t\t\t\t\tdin += k;\n\t\t\t\t}\n\t\t\t\tLonLat m = new LonLat(numx/din,numy/din);\n\t\t\t\tif( mean.distance(m) < e ) { mean = m; break; }\n\t\t\t\tmean = m;\n\t\t\t}\n\t\t\t//\t\t\tSystem.out.println(\"#mean is : \" + mean);\n\t\t\t// make cluster /////////////////////\n\t\t\tArrayList<STPoint> cluster = null;\n\t\t\tfor(LonLat p:result.keySet()) {\n\t\t\t\tif( mean.distance(p) < e ) { cluster = result.get(p); break; }\n\t\t\t}\n\t\t\tif( cluster == null ) {\n\t\t\t\tcluster = new ArrayList<STPoint>();\n\t\t\t\tresult.put(mean,cluster);\n\t\t\t}\n\t\t\tcluster.add(point);\n\t\t}\n\t\treturn result;\n\t}", "public static List<SimpleEntry<Integer, Double>> betweennessCent(Vertex[] vertices)\r\n\t{\r\n\t\tList<SimpleEntry<Integer, Double>> bc = new ArrayList<SimpleEntry<Integer, Double>>();\r\n\t\tint countTotal = 0;\r\n\t\tfor(int i = 0; i < V; i++)\r\n\t\t{\r\n\t\t\tfor(int j = i; j < V; j++)\r\n\t\t\t{\r\n\t\t\t\t// if they are not the same vertex\r\n\t\t\t\tif(i != j)\r\n\t\t\t\t{\r\n\t\t\t\t\tbfs(vertices, i, j);\r\n\t\t\t\t\tcountTotal++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < V; i++)\r\n\t\t{\r\n\t\t\tvertices[i].divideNumPaths(countTotal);\r\n\t\t\tbc.add(new SimpleEntry<Integer, Double>(i, vertices[i].getNumPaths()));\r\n\t\t}\r\n\t\t\r\n\t\t// sort the list according to the values (in this case, the betweenness)\r\n\t\tCollections.sort(bc, new Comparator<SimpleEntry<Integer, Double>>(){\r\n\t\t\t\r\n\t\t\t/**\r\n\t\t\t * Compare the values of two of the entries of the comparator\r\n\t\t\t * @param arg0\r\n\t\t\t * @param arg1\r\n\t\t\t * @return a negative integer if arg0 < arg1\r\n\t\t\t * \t\t zero \t\t\t if arg0 == arg1\r\n\t\t\t * \t\t a positive integer if arg0 > arg1\r\n\t\t\t */\r\n\t\t\t@Override\r\n\t\t\tpublic int compare(SimpleEntry<Integer, Double> arg0, SimpleEntry<Integer, Double> arg1)\r\n\t\t\t{\r\n\t\t\t\treturn arg1.getValue().compareTo(arg0.getValue());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\treturn bc;\r\n\t}", "public List<List<AlgorithmPoint>> getNeighbours(AlgorithmPoint point, double epsilon, int k)\n {\n List<AlgorithmPoint> neighbours = getNeighbours(point, epsilon);\n\n // first we create a max priority queue\n\n PriorityQueue<PrioPair<AlgorithmPoint,Double>> pq = new PriorityQueue<PrioPair<AlgorithmPoint,Double>>();\n\n for (AlgorithmPoint q : neighbours) {\n double dist = Calculations.distance(point.getPoint(), q.getPoint(), Algorithm.DISTANCE_METRIC);\n\n PrioPair<AlgorithmPoint,Double> pair = new PrioPair<AlgorithmPoint,Double>(q, dist);\n\n if (pq.size() <= k) {\n pq.add(pair);\n } else {\n if (dist < ((Double) pq.peek().getV())) {\n // remove the highest element\n pq.poll();\n pq.add(pair);\n }\n }\n }\n\n // now we make the list\n\n List<AlgorithmPoint> knn = new ArrayList<AlgorithmPoint>();\n PrioPair<AlgorithmPoint,Double> pair;\n\n while ((pair = pq.poll()) != null) {\n knn.add(pair.getT());\n }\n\n List<List<AlgorithmPoint>> result = new ArrayList<List<AlgorithmPoint>>(2);\n\n result.add(knn);\n result.add(neighbours);\n\n return result;\n }", "private List<Point> neighboursFiltering(List<Point> points) {\n Point nearest = points.get(0);\n HeartDistance calculator = new HeartDistance();\n return points.stream().filter(p -> calculator.calculate(p,nearest) < NEIGHBOURS_THRESHOLD).collect(Collectors.toList());\n }", "@Override\n public Point[] chooseCentroids(AbstractCluster self) {\n if (K!=2) {\n System.err.println(\"The used splitter is not suppose to be used with K>2. This program will shut down\"); //#like\n exit(1);\n }\n Point[] result={self.get(0),self.get(0)};\n double max=0;\n for (int i=0; i<self.size(); ++i)\n for (int j=0; j<i; ++j)\n if (max<_distances.get(self.get(i).getId(),self.get(j).getId())) {\n max=_distances.get(self.get(i).getId(),self.get(j).getId());\n result[0]=self.get(i);\n result[1]=self.get(j);\n }\n return result;\n }", "LinkedListSortedNeighborSet obtainKNeighbors(int paraObjectIndex) {\n LinkedListSortedNeighborSet tempNeighborSet = new LinkedListSortedNeighborSet();\n tempNeighborSet.setNeighborThreshold(k);\n\n for (int i = 0; i < formalContext.trainingFormalContext.length; i++) {\n//\t\t\tSystem.out.println(\"u: \" + paraObjectIndex);\n if (i != paraObjectIndex) {\n//\t\t\t\tSystem.out.println(\"v: \" + i);\n Measures tempSimilarityMetric = new Measures(formalContext.trainingFormalContext[paraObjectIndex],\n formalContext.trainingFormalContext[i]);\n double tempSimilarity = tempSimilarityMetric.jaccardSimilarity();\n//\t\t\t\tSystem.out.println(\"Similarity: \" + tempSimilarity);\n tempNeighborSet.topKSortedInsert(i, tempSimilarity);\n//\t\t\t\tSystem.out.println(\"\" + tempNeighborSet.toString());\n } // End if\n } // End for\n return tempNeighborSet;\n }", "@Override\n \tpublic Collection<Collection<Integer>> call() throws Exception {\n \t\tEdgeWeighter<HomologyEdge> weighter = new EdgeWeighter<HomologyEdge>() {\n \t\t\t@Override\n \t\t\tpublic double getWeight(HomologyEdge e) {\n \t\t\t\treturn e.getWeight();\n \t\t\t}\n \t\t};\n \t\tProbabilisticDistanceClusterer<Integer, HomologyEdge> alg = new ProbabilisticDistanceClusterer<Integer, HomologyEdge>(\n \t\t\t\tweighter, xi);\n \t\tSet<Set<Integer>> ccs = alg.transform(graph.getHomology());\n \n \t\t// now map each cluster to a root for that cluster\n \t\t// the choice of root is arbitrary and just for hashing\n \t\tMap<Integer, Integer> map = new HashMap<Integer, Integer>();\n \t\tfor (Set<Integer> cc : ccs) {\n \t\t\tint v0 = -1;\n \t\t\tint i = 0;\n \t\t\tfor (int v : cc) {\n \t\t\t\tif (i == 0) v0 = v;\n \t\t\t\tmap.put(v, v0);\n \t\t\t\ti++;\n \t\t\t}\n \t\t}\n \n \t\t// find the cliques\n \t\tBronKerboschCliqueFinder<Integer, HomologyEdge> finder = new BronKerboschCliqueFinder<>();\n \t\tCollection<Set<Integer>> cliques = finder.transform(graph.getHomology());\n \n \t\t// group the cliques by sets of interactions\n \t\tNavigableMap<String, Collection<Integer>> cliqueGroups = new TreeMap<>();\n \t\tfor (Set<Integer> clique : cliques) {\n \t\t\tfor (int v : clique) {\n \t\t\t\tCollection<Integer> neighbors = graph.getInteractionNeighbors(v);\n \t\t\t\tString hash = hashVertexInteractions(neighbors, map);\n \t\t\t\tCollection<Integer> group = cliqueGroups.get(hash);\n \t\t\t\tif (group == null) group = new TreeSet<>();\n \t\t\t\tgroup.add(v);\n \t\t\t}\n \t\t}\n \n \t\t// now we just want a set to return\n \t\tSet<Collection<Integer>> set = new TreeSet<>();\n \t\tset.addAll(cliqueGroups.values());\n \n \t\treturn set;\n \t}", "public void cluster(ArrayList<double[]> data){\n\t\t// set the dimension to make the cut in\n\t\tint dim = chooseDimension(data);\n\t\tif(dim != -1){\n\t\t\tArrayList<double[]> lhs = new ArrayList<double[]>();\n\t\t\tArrayList<double[]> rhs = new ArrayList<double[]>();\n\t\t\t\n\t\t\t// split the partition into two partitions(lhs and rhs) so the same amount of elements is in each partition\n\t\t\tCollections.sort(data, new Comparator<double[]>() {\n public int compare(double[] values, double[] otherValues) {\n return new Double(values[dim]).compareTo(new Double(otherValues[dim]));\n }});\n\t\t\t\n\t\t\tfor(int i = 0; i < data.size(); i++){\n\t\t\t\tif(i < data.size()/2){\n\t\t\t\t\tlhs.add(data.get(i));\n\t\t\t\t}else{\n\t\t\t\t\trhs.add(data.get(i));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t\t// use algorithm mondrian recursively for the new partitions\n\t\t\tmondrian(rhs);\n\t\t\tmondrian(lhs);\n\t\t}\n\t}", "public List<ParameterValueObject> getClustering(Filter filter);", "public Instance[] findNearestNeighbors(Instance instance) {\n\n Instance[] neighbors = new Instance[k_value];\n Instance[] data = new Instance[m_trainingInstances.numInstances()];\n DistanceCalculator dc = new DistanceCalculator();\n dc.setEfficient(efficient);\n\n // Copying\n for (int i = 0; i < m_trainingInstances.numInstances(); i++) {\n data[i] = m_trainingInstances.instance(i);\n }\n\n // If not enough\n if (k_value > data.length)\n return data;\n\n //Create array for Distances\n double[] distance = new double[data.length];\n for (int i = 0; i < data.length; i++) {\n distance[i] = dc.distance(instance, m_trainingInstances.instance(i), p_value, -1);\n }\n sortWIth2Var(data, distance);\n for (int i = 0; i < neighbors.length; i++) {\n neighbors[i] = data[i];\n }\n return neighbors;\n }", "public static void main(String[] args)\r\n\t{\n\t\tList<Location> locations = new ArrayList<Location>();\r\n\t\tlocations.add(new Location(150, 981));\r\n\t\tlocations.add(new Location(136, 0));\r\n\t\tlocations.add(new Location(158, 88));\r\n\t\tlocations.add(new Location(330, 60));\r\n\t\tlocations.add(new Location(0, 1001));\r\n\t\tlocations.add(new Location(150, 0));\r\n\t\tlocations.add(new Location(0, 0));\r\n\t\tlocations.add(new Location(0, 0));\r\n\t\tlocations.add(new Location(0, 0));\r\n\t\tlocations.add(new Location(446, 88));\r\n\t\tlocations.add(new Location(562, 88));\r\n\t\tlocations.add(new Location(256, 88));\r\n\t\tlocations.add(new Location(678, 88));\r\n\t\tlocations.add(new Location(794, 88));\r\n\t\tlocations.add(new Location(0, 1028));\r\n\t\tlocations.add(new Location(136, 0));\r\n\t\tlocations.add(new Location(150, 0));\r\n\t\tlocations.add(new Location(150, 88));\r\n\t\tlocations.add(new Location(150, 1028));\r\n\t\tlocations.add(new Location(150, 88));\r\n\t\tlocations.add(new Location(150, 88));\r\n\t\tlocations.add(new Location(150, 88));\r\n\t\tlocations.add(new Location(150, 88));\r\n\t\tlocations.add(new Location(150, 88));\r\n\t\tlocations.add(new Location(150, 88));\r\n\t\tlocations.add(new Location(136, 103));\r\n\t\tlocations.add(new Location(150, 0));\r\n\t\tList<LocationWrapper> clusterInput = new ArrayList<LocationWrapper>(locations.size());\r\n\t\tfor (Location location : locations)\r\n\t\t\tclusterInput.add(new LocationWrapper(location));\r\n\r\n\t\t// initialize a new clustering algorithm.\r\n\t\t// we use KMeans++ with 10 clusters and 10000 iterations maximum.\r\n\t\t// we did not specify a distance measure; the default (euclidean\r\n\t\t// distance) is used.\r\n\t\t// org.apache.commons.math3.ml.clustering.FuzzyKMeansClusterer<LocationWrapper>\r\n\t\t// clusterer = new\r\n\t\t// org.apache.commons.math3.ml.clustering.FuzzyKMeansClusterer<LocationWrapper>(2,\r\n\t\t// 2);\r\n\t\t// KMeansPlusPlusClusterer<LocationWrapper> clusterer = new\r\n\t\t// KMeansPlusPlusClusterer<LocationWrapper>(2, 10);\r\n\r\n\t\tDBSCANClusterer<LocationWrapper> clusterer = new DBSCANClusterer<LocationWrapper>(1200.0, 5);\r\n\t\tList<Cluster<LocationWrapper>> clusterResults = clusterer.cluster(clusterInput);\r\n\t\t// List<CentroidCluster<LocationWrapper>> clusterResults =\r\n\t\t// clusterer.cluster(clusterInput);\r\n\r\n\t\t// output the clusters\r\n\t\tSystem.out.println(\"clusterResults.size() = \" + clusterResults.size());\r\n\t\tfor (int i = 0; i < clusterResults.size(); i++)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Cluster \" + i);\r\n\t\t\tfor (LocationWrapper locationWrapper : clusterResults.get(i).getPoints())\r\n\t\t\t\tSystem.out.println(locationWrapper.getLocation());\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}", "public static EuclidianDictionary[] computeDistance(DaubechyColorSplitter query, List<DaubechyColorSplitter> daubechyColorSplitters) {\n //compute descriptor of query\n EuclidianDictionary euclidianDictionary[] = StandardDeviation.computeAll(query, daubechyColorSplitters);\n\n //perform euclidian on query and each descriptor element\n Arrays.sort(euclidianDictionary, (o1, o2) -> {\n if(o1.euclidian < o2.euclidian) {\n return -1;\n }else if(o2.euclidian > o1.euclidian) {\n return 1;\n }else{\n return 0;\n }\n });\n return euclidianDictionary;\n }", "private List<Double> getCentList(ContinuousAttribute attr, ClusterSet data) {\n\t\treturn ChartF.getCentContValues(data, attr);\n\t}", "public Collection<N> neighbors();", "public List<double[]> calculateCurvature(){\n List<double[]> values = new ArrayList<>();\n\n\n for(Node3D node: mesh.nodes){\n List<Triangle3D> t_angles = node_to_triangle.get(node);\n //all touching triangles.\n if(t_angles==null) continue;\n\n double[] curvature = getNormalAndCurvature(node, t_angles);\n double[] pt = node.getCoordinates();\n double mixedArea = calculateMixedArea(node);\n values.add(new double[]{\n pt[0], pt[1], pt[2],\n curvature[3],\n curvature[0], curvature[1], curvature[2],\n mixedArea\n });\n\n\n }\n return values;\n }", "public void calcVicinity(double epsilon, double errorBound, double c) {\r\n Propagator searcher = new Propagator(this);\r\n\t\tint cnt = 0;\r\n long start = System.currentTimeMillis();\r\n\t\tfor (Node n : mNodes) {\r\n\t\t\tMap<Integer, Double> neighbors = searcher.search(n.getId(), epsilon, c, errorBound);\r\n\t\t\tvicinity.put(n.getId(), neighbors);\r\n\t\t\tcnt ++;\r\n\t\t\tif (cnt % 100 == 0) {\r\n System.out.println(\"Finished computing vicinity for \" + cnt + \" nodes.\");\r\n\t\t\t\t// Print the neighbor info for debuging\r\n\t\t\t\tSystem.out.println(n.getId() + \"\\t\" + n.getDescription());\r\n\t\t\t\tfor (Map.Entry<Integer, Double> e : neighbors.entrySet()) {\r\n\t\t\t\t\tint neighborId = e.getKey();\r\n\t\t\t\t\tSystem.out.println(\"\\t\" + e.getKey() + \"\\t\" + mNodes.get(neighborId).getDescription() + \"\\t\" + e.getValue() );\r\n\t\t\t\t}\r\n// break;\r\n }\r\n\t\t}\r\n long end = System.currentTimeMillis();\r\n timeCalcVicinity = (end - start) / 1000.0;\r\n\t}", "public ArrayList<Record> near()\n {\n int count = 0;\n ArrayList<Record> closest = new ArrayList<>();\n System.out.println(\"Community Centres that are 5km or less to your location are: \");\n for(Record i: cCentres)\n {\n //latitude and longitude for each centre\n double lat2 = Double.parseDouble(i.getValue(4));\n double lon2 = Double.parseDouble(i.getValue(3));\n ;\n //distance\n double dist = calcDist(lat2, lon2, cCentres);\n if(dist<=5)\n {\n System.out.println(i + \", Distance: \" + dist + \" km\");\n closest.add(i);\n }\n }\n return closest;\n }", "private ArrayList<Vector2i> getBestUsingStd(ArrayList<ArrayList<Vector2i>> trueClusters) {\n\t\tdouble stdBest = Double.MAX_VALUE;\n\t\tint posBest = -1;\n\t\t\n\t\tint idx = 0;\n\t\tfor (ArrayList<Vector2i> group : trueClusters) {\n\t\t\tDescriptiveStatistics ds = new DescriptiveStatistics();\n\t\t\tfor (Vector2i vec : group) {\n\t\t\t\tds.addValue(vec.y);\n\t\t\t}\n\t\t\tdouble std = ds.getStandardDeviation();\n\t\t\tif (std < stdBest) {\n\t\t\t\tstdBest = std;\n\t\t\t\tposBest = idx;\n\t\t\t}\n\t\t\tidx++;\n\t\t}\n\t\treturn trueClusters.get(posBest);\n\t}", "public void pruneWithApriori(double startEpsilon, double epsilonMultiplier, double shrinkFactor, double maxApproximationSize, int numBuckets, int topK, long startMS){\n CB = new CorrelationBounding(HB.data, useEmpiricalBounds, parallel);\r\n HierarchicalBounding.CB = CB; // pass the corrbounding object to the hierarchbounding object to prevent double work\r\n\r\n // get clusters:\r\n long startClustering = System.currentTimeMillis();\r\n System.out.print(\"constructing hierarchical clustering...\");\r\n RecursiveClustering RC = new RecursiveClustering(HB.data, CB, HB.maxLevels, HB.defaultDesiredClusters, HB.useKMeans, HB.breakFirstKLevelsToMoreClusters, HB.clusteringRetries);\r\n RC.fitRecursiveClusters(startEpsilon, epsilonMultiplier);\r\n long stopClustering = System.currentTimeMillis();\r\n System.out.println(\" --> clustering finished, took \" + ((stopClustering-startClustering)/1000) + \" seconds\");\r\n this.allclusters = RC.allClusters;\r\n this.clustersPerLevel = RC.clustersPerLevel;\r\n this.globalClustID = RC.globalClustID;\r\n\r\n CB.initializeBoundsCache(globalClustID, useEmpiricalBounds);\r\n\r\n ArrayList<Cluster> topLevelClusters = this.clustersPerLevel.get(0);\r\n Cluster rootCluster = topLevelClusters.get(0);\r\n this.rootCluster = rootCluster;\r\n\r\n\r\n\r\n // progressive approximation class in order to get results quickly:\r\n ProgressiveApproximation PA = new ProgressiveApproximation(corrThreshold, useEmpiricalBounds, minJump, maxApproximationSize, header, CB);\r\n\r\n\r\n\r\n //multipoles root candidate:\r\n ArrayList<Cluster> firstClusterComb = new ArrayList<>(2);\r\n firstClusterComb.add(rootCluster);// firstClusterComb.add(rootCluster);\r\n// List<ClusterCombination> candidates = new ArrayList<>(1);\r\n// ClusterCombination rootcandidate = new MultipoleClusterCombination(firstClusterComb);\r\n// candidates.add(rootcandidate);\r\n\r\n\r\n\r\n //multipearson root candidate:\r\n// ArrayList<Cluster> rootLHS = new ArrayList<>(1); rootLHS.add(rootCluster);\r\n// ArrayList<Cluster> rootRHS = new ArrayList<>(1); rootRHS.add(rootCluster); //rootRHS.add(rootCluster); rootRHS.add(rootCluster);\r\n// ClusterCombination rootcandidate = new MultiPearsonClusterCombination(rootLHS, rootRHS);\r\n\r\n\r\n\r\n\r\n //progress overview:\r\n System.out.print(\"|\");\r\n for(int i = 0; i<100; i++){\r\n System.out.print(\".\");\r\n }\r\n System.out.print(\"|\");\r\n System.out.println();\r\n\r\n\r\n // level-wise evaluation of the candidates\r\n for(int p=2; p<=maxP; p++){\r\n firstClusterComb.add(rootCluster);\r\n ClusterCombination rootcandidate = new MultipoleClusterCombination(firstClusterComb);\r\n\r\n List<ClusterCombination> candidates = new ArrayList<>(1);\r\n candidates.add(rootcandidate);\r\n\r\n System.out.println(\"---------------start evaluating level: \"+ p + \" at time \" + LocalTime.now() +\". Number of positives so far: \" + this.positiveResultSet.size() +\". Runtime so far: \" + (System.currentTimeMillis() - startMS)/1000);\r\n\r\n Map<Boolean, List<ClusterCombination>> groupedDCCs = evaluateCandidates(candidates, shrinkFactor, maxApproximationSize, parallel);\r\n\r\n if(positiveDCCs.size() > topK){\r\n positiveDCCs = getStream(positiveDCCs, parallel)\r\n .sorted((cc1, cc2) -> Double.compare(cc2.getLB(), cc1.getLB()))\r\n .limit(topK)\r\n .collect(Collectors.toList());\r\n PA.corrThreshold = positiveDCCs.get(positiveDCCs.size()-1).getLB();\r\n corrThreshold = PA.corrThreshold;\r\n }\r\n\r\n\r\n //progressive approximation within this level p:\r\n List<ClusterCombination> approximatedCCs = getStream(groupedDCCs.get(false), parallel).filter(dcc -> dcc.getCriticalShrinkFactor() <= 1).collect(Collectors.toList());\r\n// PA.testApproximationQuality(approximatedCCs, numBuckets, p, parallel);\r\n this.positiveDCCs = PA.ApproximateProgressively(approximatedCCs, numBuckets, positiveDCCs, parallel, topK, startMS);\r\n corrThreshold = PA.corrThreshold; // for topK -> carry over the updated tau to next p\r\n this.positiveResultSet = PostProcessResults.removeDuplicatesAndToString(this.positiveDCCs, header, CB, parallel);\r\n\r\n // get the approximated candidates to generate the next-level candidates from. the advantage is that we get a head-start down the clustering tree and do not have to start from the top\r\n ArrayList<ClusterCombination> DCCs = new ArrayList<>(groupedDCCs.get(false).size() + groupedDCCs.get(true).size());\r\n DCCs.addAll(groupedDCCs.get(false)); DCCs.addAll(groupedDCCs.get(true));\r\n System.out.println(\"tau updated to \" + corrThreshold);\r\n\r\n\r\n\r\n// if(p<maxP){\r\n// System.out.println(\"level \" + p + \" finished at time \"+ LocalTime.now() + \". generating candidates for level \" + (p+1) +\". #DCCs: \" + DCCs.size() +\". positives so far: \" + this.positiveResultSet.size() + \". Runtime so far (s): \" + (System.currentTimeMillis()-startMS)/1000);\r\n//\r\n//\r\n//\r\n// if(DCCs.get(0).isMultipoleCandidate()){ // multipole pattern\r\n//\r\n// candidates = generateCandidates(DCCs, parallel);\r\n//\r\n// }else{ // multiPearson pattern -> make distinction on adding vectors to LHS or RHS. better performance: use HIerarchicalbounding without level generation.\r\n//\r\n//\r\n// candidates = new ArrayList<>();\r\n//\r\n//\r\n//\r\n// // first generate candidates by adding to RHS\r\n// if(parallel){\r\n// DCCs = (ArrayList<ClusterCombination>) DCCs.parallelStream()\r\n// .sorted(this::lexicographicalOrdering)\r\n// .collect(Collectors.toList());\r\n// }else{\r\n// DCCs.sort(this::lexicographicalOrdering);\r\n// }\r\n// List<ClusterCombination> partial = generateCandidates(DCCs, parallel);\r\n// if(partial!= null){\r\n// candidates.addAll(partial);\r\n// }\r\n//\r\n// //now by adding to LHS: (hack by swapping the LHS and RHS and calling the same methods\r\n// //note that we do not need to swap those in which the size of the LHS and RHS is the same\r\n// ArrayList<ClusterCombination> swappedDCCs;\r\n// if(parallel){\r\n// swappedDCCs = (ArrayList<ClusterCombination>) DCCs.parallelStream()\r\n// .filter(cc -> cc.getLHS().size() != cc.getRHS().size()) // ignore those where lhs and rhs are of the same size\r\n// .collect(Collectors.toList());\r\n// swappedDCCs.parallelStream()\r\n// .forEach(cc -> ((MultiPearsonClusterCombination) cc).swapLeftRightSide());\r\n//\r\n// swappedDCCs = (ArrayList<ClusterCombination>) swappedDCCs.parallelStream()\r\n// .sorted(this::lexicographicalOrdering)\r\n// .collect(Collectors.toList());\r\n// }else{\r\n// swappedDCCs = (ArrayList<ClusterCombination>) DCCs.stream()\r\n// .filter(cc -> cc.getLHS().size() != cc.getRHS().size()) // ignore those where lhs and rhs are of the same size\r\n// .collect(Collectors.toList());\r\n//\r\n// swappedDCCs.forEach(cc -> ((MultiPearsonClusterCombination) cc).swapLeftRightSide());\r\n// swappedDCCs.sort(this::lexicographicalOrdering);\r\n// }\r\n//\r\n// partial = generateCandidates(swappedDCCs, parallel);\r\n// if(partial!= null){\r\n// candidates.addAll(partial);\r\n// }\r\n//\r\n//\r\n// }\r\n//\r\n//\r\n// }\r\n }\r\n\r\n }", "public ArrayList<Particle> getNearParticles(Complex p, int range)\n\t{\n\t\tint cellX = (int)Math.floor(p.re() / meshWidth);\n\t\tint cellY = (int)Math.floor(p.im() / meshWidth);\n\t\treturn proximityList[cellX][cellY];\n\t}", "private ArrayList<Point> getNeighbors(Point p) {\n\t\tArrayList<Point> arr = new ArrayList<Point>();\n\t\tfor (int y = -1; y <= 1; y++) {\n\t\t\tfor (int x = -1; x <= 1; x++) {\n\t\t\t\tPoint npoint = new Point( p.x + x, p.y + y);\n\t\t\t\tint sind = spacesContains(npoint);\n\t\t\t\tif ( p.compareTo(npoint) != 0 && sind >= 0 ) { \n\t\t\t\t\tarr.add( spaces.get(sind) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn arr;\n\t}", "private static Point getNearest(Collection<Point> centers, Point p) {\n\t\tdouble min = 0;\n\t\tPoint minPoint = null;\n\t\tfor(Point c : centers){\n\t\t\tif(minPoint == null || c.distance(p) < min){\n\t\t\t\tmin = c.distance(p);\n\t\t\t\tminPoint = c;\n\t\t\t}\n\t\t}\n\t\treturn minPoint;\n\t}", "private void cluster() {\n\t\tint index = 0;\n\t\tfor (DataObject obj : objects) {\n\t\t\tindex = getNearestCenterIndex(obj, centers);\n\t\t\tclusters.get(index).add(obj);\n\t\t}\n\t}", "public Clustering<V> compute() {\n if (graph.vertexSet().isEmpty()) {\n return new ClusteringImpl<>(Collections.emptyList());\n }\n\n matrix = Matrices.buildAdjacencyMatrix(graph, mapping, true);\n\n normalize();\n\n for (var i = 0; i < iterations; i++) {\n final var previous = matrix.copy();\n\n expand();\n inflate();\n normalize();\n\n if (matrix.equals(previous)) break;\n }\n\n // matrix can contain identical clusters of elements which are less than one\n final var clusters = new HashSet<Set<V>>(matrix.getRowDimension());\n\n for (var i = 0; i < matrix.getRowDimension(); i++) {\n final var cluster = new HashSet<V>();\n\n for (var j = 0; j < matrix.getColumnDimension(); j++) {\n if (matrix.getEntry(i, j) > 0) cluster.add(mapping.getIndexList().get(j));\n }\n\n if (!cluster.isEmpty()) clusters.add(cluster);\n }\n\n return new ClusteringImpl<>(new ArrayList<>(clusters));\n }", "KDNode(Datum[] datalist) throws Exception{\r\n\r\n\t\t\t/*\r\n\t\t\t * This method takes in an array of Datum and returns \r\n\t\t\t * the calling KDNode object as the root of a sub-tree containing \r\n\t\t\t * the above fields.\r\n\t\t\t */\r\n\r\n\t\t\t// ADD YOUR CODE BELOW HERE\t\t\t\r\n\t\t\t\r\n\t\t\tif(datalist.length == 1) {\r\n\t\t\t\t\r\n\t\t\t\tleaf = true;\r\n\t\t\t\tleafDatum = datalist[0];\r\n\t\t\t\tlowChild = null;\r\n\t\t\t\thighChild = null;\r\n\t\t\t\tnumLeaves ++;\r\n\t\t\t\t\r\n\t\t\t\treturn;\r\n\t\t\t\r\n\t\t\t}else {\r\n\t\r\n\t\t\t\tint dim = 0;\r\n\t\t\t\tint range = 0;\r\n\t\t\t\tint max = 0;\r\n\t\t\t\tint min = 0;\r\n\t\t\t\tint Max = 0;\r\n\t\t\t\tint Min = 0;\r\n\t\t\t\tfor(int i = 0; i < k; i++) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tmax = datalist[0].x[i];\r\n\t\t\t\t\tmin = datalist[0].x[i];\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor(int j = 0; j < datalist.length; j++) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(datalist[j].x[i] >= max) {\r\n\t\t\t\t\t\t\tmax = datalist[j].x[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(datalist[j].x[i] <= min) {\r\n\t\t\t\t\t\t\tmin = datalist[j].x[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(max - min >= range) {\r\n\t\t\t\t\t\trange = max - min;\r\n\t\t\t\t\t\tMax = max;\r\n\t\t\t\t\t\tMin = min;\r\n\t\t\t\t\t\tdim = i;\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(range == 0) {\r\n\t\t\t\t\tleaf = true;\r\n\t\t\t\t\tleafDatum = datalist[0];\r\n\t\t\t\t\tlowChild = null;\r\n\t\t\t\t\thighChild = null;\r\n\t\t\t\t\t\r\n\t\t\t\t\tnumLeaves ++;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\t//if greatest range is zero, all points are duplicates\r\n\t\t\t\t\r\n\t\t\t\tsplitDim = dim;\r\n\t\t\t\tsplitValue = (double)(Max + Min) / 2.0;\t//get the split dim and value\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tArrayList<Datum> lList = new ArrayList<Datum>();\r\n\t\t\t\tint numL = 0;\r\n\t\t\t\tArrayList<Datum> hList = new ArrayList<Datum>();\r\n\t\t\t\tint numH = 0;\r\n\t\t\t\r\n\t\t\t\tfor(int i = 0; i < datalist.length; i ++) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(datalist[i].x[splitDim] <= splitValue) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tlList.add(datalist[i]);\r\n\t\t\t\t\t\t\tnumL ++;\r\n\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\t\r\n\t\t\t\t\t\thList.add(datalist[i]);\r\n\t\t\t\t\t\tnumH ++;\r\n\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t//get the children list without duplicate but with null in the back\r\n\t\t\t\t\t//Don't check duplicates in children Nodes!!!\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tlowChild = new KDNode( lList.toArray(new Datum[numL]) );\r\n\t\t\t\thighChild = new KDNode( hList.toArray(new Datum[numH]) );\t//create the children nodes\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\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t// ADD YOUR CODE ABOVE HERE\r\n\r\n\t\t}", "public static void valorarCentrosDistPromedio(Instancia instancia) {\n\t\tfor(CentroDistribucion c : instancia.getCentros())\n\t\t\tvalorarCentroDistPromedio(c, instancia.getClientes());\n\t}", "Collection<T> getMinElements();", "public ArrayList<ArrayList<double[]>> getClusterSet(){\n\t\treturn clusterSet;\n\t}", "public ReducedCellInfo[] getEntries(double delta)\r\n {\r\n\r\n ReducedCellInfo compareTo = DataBase[0];\r\n\r\n Vector< ReducedCellInfo > V = new Vector< ReducedCellInfo >( );\r\n\r\n for( int i = 1 ; i < 45 ; i++ )\r\n\r\n if ( DataBase[i].distance( compareTo ) < delta )\r\n V.addElement( DataBase[i] );\r\n\r\n return V.toArray( new ReducedCellInfo[ 0 ] );\r\n }", "public Ms2Cluster trimByDotP(Map<Ms2Pointer, MsnSpectrum> spectra, Tolerance tol, double min_dp)\n {\n // quit if the master or input are not present!\n if (mMaster==null || !Tools.isSet(spectra)) return null;\n\n // setup the master first\n List<Peak> master = Spectra.toListOfPeaks(mMaster);\n Iterator<Ms2Pointer> itr = mCandidates.iterator();\n while (itr.hasNext())\n {\n MsnSpectrum scan = spectra.get(itr.next());\n if (scan!=null && Similarity.dp(master, Spectra.toListOfPeaks(scan), tol, true, true)<min_dp) itr.remove();\n }\n\n return this;\n }", "public SME_Cluster[] getClusters();", "public void createClusters() {\n\t\t/*\n\t\t * double simAvg = documentDao.getSimilarity(avg); double simMax =\n\t\t * documentDao.getSimilarity(max); double simMin =\n\t\t * documentDao.getSimilarity(min);\n\t\t */\n\n\t\t// initClusters();\n\n\t\tList<Document> docList = documentDao.getDocumentListOrderBySimilarity();\n\t\tList<Cluster> clusterList = clusterDao.getClusterList();\n\n\t\tint i = 0;\n\t\tCluster cluster = clusterList.get(i);\n\t\tfor (Document document : docList) {\n\t\t\twhile (document.getSimilarity() < cluster.getLow()) {\n\t\t\t\tcluster = clusterList.get(++i);\n\t\t\t}\n\t\t\tif (document.getSimilarity() < cluster.getHigh() && document.getSimilarity() >= cluster.getLow()) {\n\t\t\t\tdocument.setClusterId(cluster.getId());\n\t\t\t\tdocumentDao.insertDocument(document);\n\t\t\t}\n\t\t}\n\n\t}", "public static void main(String[] args) {\n Point p1 = new Point(new double[]{0,0}, 0);\n Point p2 = new Point(new double[]{0,10}, 10);\n Point p3 = new Point(new double[]{0,12}, 12);\n ArrayList<Point> r = new ArrayList<>();\n r.add(p1); r.add(p2); r.add(p3);\n \n Point p4 = new Point(new double[]{2,0}, 0);\n Point p5 = new Point(new double[]{2,7}, 7);\n Point p6 = new Point(new double[]{2,10}, 10);\n ArrayList<Point> s = new ArrayList<>();\n s.add(p4); s.add(p5); s.add(p6);\n \n double dissim = getDISSIM(r, s, 0, 10);\n \n System.out.println(\"DISSIM: \" + dissim);\n }", "public List<Neighbor> getNearNeighborsInSample(double[] point) {\n return getNearNeighborsInSample(point, Double.POSITIVE_INFINITY);\n }", "public Map<double[], Integer> kmeans(int distance, Map<Integer, double[]> centroids, int k) {\n Map<double[], Integer> clusters = new HashMap<>();\n int k1 = 0;\n double dist = 0.0;\n for (double[] x : features) {\n double minimum = 999999.0;\n for (int j = 0; j < k; j++) {\n if (distance == 1) {\n dist = Distance.eucledianDistance(centroids.get(j), x);\n } else if (distance == 2) {\n dist = Distance.manhattanDistance(centroids.get(j), x);\n }\n if (dist < minimum) {\n minimum = dist;\n k1 = j;\n }\n\n }\n clusters.put(x, k1);\n }\n\n return clusters;\n }", "private List<Integer> getCentList(DiscreteAttribute attr, ClusterSet data) {\n\t\treturn ChartF.getCentDisValues(data, attr);\n\t}", "public MedianFinderElegant() {\n minHeap = new PriorityQueue<>();\n maxHeap = new PriorityQueue<>((v1, v2) -> v2 - v1);\n }", "NeoEpsilonFactory getNeoEpsilonFactory();", "public IntArrayList getNeighbourCluster(int index) {\n\n /**List for storing the indexes of the cells in the cluster containing\n * the given index */\n cellCluster = new IntArrayList();\n\n /**The label of the cluster */\n int clusterLabel = (int) labelledVolume.value(index);\n\n /**Clear the linked list for the use of this algorithm */\n voxelStack.clear();\n voxelStack.push(imageMask.indexToGrid(index));\n\n /**Use iteration and recursion to get all the cells\n * within the cluster */\n while (voxelStack.size() > 0) {\n Index3D center = voxelStack.pop();\n getNeighbouringCells(center, center, clusterLabel);\n }\n return cellCluster;\n }", "public Iterator<Example> getNeighbors(Instance instance){\n\t\tSet<Example> set=new HashSet<Example>();\n\t\tfor(Iterator<Feature> i=instance.featureIterator();i.hasNext();){\n\t\t\tFeature f=i.next();\n\t\t\tfor(Iterator<Example> j=featureIndex(f).iterator();j.hasNext();){\n\t\t\t\tset.add(j.next());\n\t\t\t}\n\t\t}\n\t\treturn set.iterator();\n\t}", "private Map<double[], Set<String>> initiateClusters(int k, Set<String> restaurantIDs) {\n // centroids[0] is lattitude and centroids[1] is longitude for a centroid\n // Map assigns restaurants to a specific centroid\n Map<double[], Set<String>> restaurantClusters = new HashMap<double[], Set<String>>();\n\n // Find the min and max latitudes and longitudes\n double minLat = Double.MAX_VALUE;\n double minLon = Double.MAX_VALUE;\n double maxLat = -Double.MAX_VALUE;\n double maxLon = -Double.MAX_VALUE;\n\n for (String rID : restaurantIDs) {\n double lat = this.restaurantMap.get(rID).getLatitude();\n double lon = this.restaurantMap.get(rID).getLongitude();\n if (lat < minLat) {\n minLat = lat;\n }\n if (lat > maxLat) {\n maxLat = lat;\n }\n if (lon < minLon) {\n minLon = lon;\n }\n if (lon > maxLon) {\n maxLon = lon;\n }\n }\n\n // Create a number of centroids equal to k\n for (int i = 0; i < k; i++) {\n // generate random centroid based on min and max latitudes\n // and longitudes, with (currently) no assigned restaurants\n HashSet<String> emptySet = new HashSet<String>();\n restaurantClusters.put(this.generateRandomCentroid(minLat, maxLat, minLon, maxLon), emptySet);\n }\n\n // Assign each restaurant to its closest centroid\n\n for (String rID : restaurantIDs) {\n\n double[] newCentroid = null;\n double minDist = Double.MAX_VALUE;\n\n for (double[] centroid : restaurantClusters.keySet()) {\n double distance = this.computeDistance(centroid, this.restaurantMap.get(rID));\n if (distance < minDist) {\n newCentroid = centroid;\n minDist = distance;\n }\n }\n restaurantClusters.get(newCentroid).add(rID);\n }\n return restaurantClusters;\n }", "public abstract List<GroundAtom> getAllGroundAtoms(StandardPredicate predicate, List<Short> partitions);", "public Point getFurthermost(){\n\t\t\tdouble distance;\n\t\t\tdouble distanceMin = Double.MAX_VALUE;\n\t\t\tPoint centroid = centroid();\n\t\t\tPoint closest = new Point();\n\t\t\tfor(Point p : clusterPointsList){\n\t\t\t\tdistance = p.dist(centroid);\t\t\t\n\t\t\t\tif(distance < distanceMin){\n\t\t\t\t\tdistanceMin = distance;\n\t\t\t\t\tclosest = p;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn closest;\n\t\t}", "Neighbors() {\n HashMap<Integer, Double> neighbors = new HashMap<>();\n }", "@Test\n\tpublic void testExtractMin() {\n\t\tHeap heap = new Heap(testArrayList.length);\n\t\tdouble[] expected = new double[] { 5, 7, 24, 36, 15, 48, 32, 47, 93, 27, 38, 70, 53, 33, 93 };\n\t\theap.build(testArrayList);\n\t\tassertEquals(3, heap.extractMin().key);\n\t\tassertArrayEquals(expected, heap.getKeyArray());\n\t\tassertEquals(14, heap.getSize());\n\t}", "public static int getOptimalK(Dataset<Row> vectorData) {\n\t\tList<Integer> K = new ArrayList<Integer>();\n\t\tList<Double> computeCost = new ArrayList<Double>();\n\n\t\tfor (int i = 2; i < 10; i++) {\n\n\t\t\tKMeans kMeansForTops = new KMeans().setK(i).setSeed(1L);\n\t\t\tlong start = System.currentTimeMillis();\n\t\t\tKMeansModel kMeansModel = kMeansForTops.fit(vectorData);\n\t\t\tSystem.out.println(\"Time to FIT \" + (System.currentTimeMillis() - start) / 1000);\n\t\t\tdouble cost = kMeansModel.computeCost(vectorData); // WCSS\n\t\t\t// KMeansSummary\n\t\t\tK.add(i);\n\t\t\tcomputeCost.add(cost);\n\t\t\t// System.out.println(\"================ Compite cost for K == \" + i + \" is == \"\n\t\t\t// + cost);\n\n\t\t\tDataset<Row> kMeansPredictions = kMeansModel.transform(vectorData);\n\n\t\t\tfor (int j = 0; j < i; j++) {\n\n\t\t\t\t// System.out.println(\"====================== Running it for \" + j + \"th cluster\n\t\t\t\t// when the K is \" + i);\n\t\t\t\t// System.out.println(\"====================== Range for the cluster count \" + i\n\t\t\t\t// + \" ===================\");\n\t\t\t\t// kMeansPredictions.where(kMeansPredictions.col(\"prediction\").equalTo(j)).agg(min(\"features\"),\n\t\t\t\t// max(\"features\")).show();\n\n\t\t\t}\n\n\t\t\t// kMeansPredictions.agg(min(\"features\"), max(\"features\")).show();\n\t\t\t// System.out.println(\"====================== Calculating Silhouette\n\t\t\t// ===================\");\n\n\t\t\t// Evaluate clustering by computing Silhouette score\n\t\t\tClusteringEvaluator topsEvaluator = new ClusteringEvaluator();\n\n\t\t\tdouble TopsSilhouette = topsEvaluator.evaluate(kMeansPredictions);\n\n\t\t\t// System.out.println(\"================ Silhouette score for K == \" + i + \" is\n\t\t\t// == \" + TopsSilhouette);\n\n\t\t}\n\n\t\tPlot plt = Plot.create();\n\t\t// plt.plot().add(K, computeCost).label(\"MyLabel\").linestyle(\"bx-\");\n\t\t// plt.plot().\n\n\t\tSystem.out.println(\"K List \" + K);\n\t\tSystem.out.println(\"Cost List \" + computeCost);\n\t\tplt.plot().add(K, computeCost).label(\"Elbow\").linestyle(\"--\");\n\t\tplt.xlabel(\"K\");\n\t\tplt.ylabel(\"Cost\");\n\t\tplt.title(\"Compute Cost for K-Means !\");\n\t\tplt.legend();\n\t\ttry {\n\t\t\tplt.show();\n\t\t} catch (IOException | PythonExecutionException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn 0;\n\n\t}", "public VirtualDataSet[] partitionByNumericAttribute(int attributeIndex, int valueIndex) {\n\t\t// WRITE YOUR CODE HERE!\n\n\t\t if(attributes[attributeIndex].getType()==AttributeType.NOMINAL){ \t\t\t\t\t\t\t// avoid passing through nominal value to current method\n return null; \n }\n\t\t\tVirtualDataSet [] partitions = new VirtualDataSet[2]; \t\t\t\t\t\t\t\t\t// creates two split path \n\n\t\t\tdouble split = Double.parseDouble(getValueAt(valueIndex , attributeIndex));\t\t\t// determine the middle number in order to split \n\t\t\t\n\t\t\tLinkedList<Integer> rowsLess = new LinkedList<Integer> (); \t\t\t\t\t\t\t// using linkedlist to do collection of split rows that less than valueIndex value\n\t\t\t\n\t\t\tLinkedList<Integer> rowsMore = new LinkedList<Integer> ();\t\t\t\t\t\t\t\t// using linkedlist to do collection of split rows that less than valueIndex value\n\t\t\t\n\t\t\tint countLess = 0;\n\t\t\tint countMore = 0; \n\n\t\t\tString []arrayOfNums = attributes[attributeIndex].getValues();\n\n\t\t\tfor(int j = 0; j < source.numRows; j++){ \n\t\t\t\t\n\t\t\t\tif(Double.parseDouble(getValueAt(j,attributeIndex)) <= split){ \t\t\t\t// transform from string to integer in order to compare the number smaller than middle number\n\t\t\t\t\t\n\t\t\t\t\trowsLess.add(j);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// add rows that correspond with the current attribute of spliting \n\t\t\t\t\tcountLess++;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// determine the size of partition rows array \n\t\t\t\t}else if(Double.parseDouble(getValueAt(j,attributeIndex)) > split){\t\t\t// transform from string to integer in order to compare the number bigger than middle number\n\t\t\t\t\t\n\t\t\t\t\trowsMore.add(j); \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// add rows that correspond with the current attribute of spliting \n\t\t\t\t\tcountMore++;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// determine the size of partition rows array \n\t\t\t\t}\n\t\t\t}\n\n\t\t\tint [] partitionRowsLess = new int [countLess]; \t\t\t\t\t\t\t\t\t\t// the collection of rows represents all number that smaller than middle number\n\t\t\tint [] partitionRowsMore = new int [countMore]; \t\t\t\t\t\t\t\t\t\t// the collection of rows represents all number that bigger than middle number\n\t\t\tfor(int k = 0; k < countLess; k++){\n\t\t\t\tpartitionRowsLess[k] = rowsLess.poll(); \t\t\t\t\t\t\t\t\t\t\t// transform from linkedlist to array \n\t\t\t}\n\t\t\tfor(int k = 0; k < countMore; k++){\n\t\t\t\tpartitionRowsMore[k] = rowsMore.poll(); \t\t\t\t\t\t\t\t\t\t\t// transform from linkedlist to array \n\t\t\t}\n\t\t\t\n\t\t\tpartitions[0] = new VirtualDataSet(source,partitionRowsLess, attributes); \t\t\t\t// send partition to VirtualDataSet constructor \n\t\t\tpartitions[1] = new VirtualDataSet(source,partitionRowsMore, attributes); \n\t\t\t\n\n\n\t\t\treturn partitions;\n\t\t\n\t}", "@Override\r\n public void run() {\n int nchannels = parentFeature.getNchannels();\r\n\r\n ArrayList<Feature> set1, set2;\r\n String nameSet1, nameSet2;\r\n double dThresh = threshdist;\r\n double[] getMeanMedStdSet1, histo;\r\n String setPairNameCentroidNND, setPairNameEdgeNND;\r\n\r\n // compute the histograms \r\n computeHistogramBins();\r\n\r\n // first compute the distances between the features in each of the channels. \r\n for (int c1 = 0; c1 < nchannels; c1++) {\r\n // get the features we are going to compute the distances between. \r\n set1 = parentFeature.getFeatures(c1, featureName1);\r\n for (int c2 = 0; c2 < nchannels; c2++) {\r\n if (c1 == c2) {\r\n continue;\r\n }\r\n // the set we will compute the distance from. \r\n set2 = parentFeature.getFeatures(c2, featureName2);\r\n // The names used as keys within the Features numerical property may for the channel to channel distance. \r\n// nameSet1 = (C_EXT + (c1 + 1));\r\n// nameSet2 = (C_EXT + (c2 + 1));\r\n nameSet1 = (\"\" + (c1 + 1));\r\n nameSet2 = (\"\" + (c2 + 1));\r\n setPairNameCentroidNND = D_NN_CENT + C_EXT + \"_\" + nameSet1 + \"-\" + nameSet2;\r\n setPairNameEdgeNND = D_NN_EDGE + C_EXT + \"_\" + nameSet1 + \"-\" + nameSet2;\r\n\r\n // Compute the nearest neighbour distances between the sets. \r\n computePairedDistances(set1, set2, nameSet1, nameSet2);\r\n\r\n // some global NND stats \r\n getMeanMedStdSet1 = getMeanMedStd(set1, setPairNameCentroidNND, dThresh);\r\n parentFeature.addNumericProperty(setPairNameCentroidNND + MEAN_EXT, getMeanMedStdSet1[0]);\r\n parentFeature.addNumericProperty(setPairNameCentroidNND + MED_EXT, getMeanMedStdSet1[1]);\r\n parentFeature.addNumericProperty(setPairNameCentroidNND + STD_EXT, getMeanMedStdSet1[2]);\r\n parentFeature.addNumericProperty(setPairNameCentroidNND + FRAC_NN, getMeanMedStdSet1[3]);\r\n\r\n // now compute the histogram of the nearest neighbours\r\n histo = computeHistrogram(set1, setPairNameCentroidNND);\r\n\r\n // save the histogram as well\r\n parentFeature.addObjectProperty(setPairNameCentroidNND + HIST, Arrays.copyOf(histo, histoBins.length));\r\n parentFeature.addObjectProperty(setPairNameCentroidNND + HISTBINS, Arrays.copyOf(histoBins, histoBins.length));\r\n\r\n if (doPFA) {\r\n // proximal feature analysis. \r\n HashMap<String, Double> pfa;\r\n pfa = doPFAsetPair(set1, setPairNameCentroidNND, pfaFeatureNames); \r\n // store in the parent feature for saving later. \r\n parentFeature.addObjectProperty(setPairNameCentroidNND + \"_\" + PFA_EXT, pfa);\r\n //\r\n if(edgeDistance){\r\n // store in the parent feature for saving later. \r\n parentFeature.addObjectProperty(setPairNameEdgeNND + \"_\" + PFA_EXT, pfa);\r\n }\r\n }\r\n\r\n }\r\n }\r\n\r\n // stop here \r\n if (nRandomisations == 0) {\r\n return;\r\n }\r\n\r\n //System.out.println(\" started randomisations \");\r\n HashMap<String, ArrayList<Double>> statMap = new HashMap<String, ArrayList<Double>>();\r\n HashMap<String, double[][]> histogramValuesMap = new HashMap<String, double[][]>();\r\n\r\n long rand_seed;\r\n // Perform the same analysis but randomise the features of each set. \r\n for (int i = 0; i < nRandomisations; i++) {\r\n // get all of the feature sets for each channel. \r\n for (int c1 = 0; c1 < nchannels; c1++) {\r\n // the set we will keep fixed. \r\n set1 = FeatureOps.duplicateFeatureSet(parentFeature.getFeatures(c1, featureName1));\r\n // compute distance to features in the other sets. \r\n for (int c2 = 0; c2 < nchannels; c2++) {\r\n if (c1 == c2) {\r\n continue;\r\n }\r\n // random seed number for the random number generation. \r\n rand_seed = System.currentTimeMillis();\r\n set2 = FeatureOps.randomizeFeaturePositions(parentFeature, parentFeature.getFeatures(c2, featureName2), rand_seed);\r\n\r\n // The names used as keys within the Features numerical property may for the channel to channel distance. \r\n// nameSet1 = (C_EXT + (c1 + 1));\r\n// nameSet2 = (C_EXT + (c2 + 1));\r\n nameSet1 = (\"\" + (c1 + 1));\r\n nameSet2 = (\"\" + (c2 + 1));\r\n setPairNameCentroidNND = D_NN_CENT + C_EXT + \"_\" + nameSet1 + \"-\" + nameSet2;\r\n setPairNameEdgeNND = D_NN_EDGE + C_EXT + \"_\" + nameSet1 + \"-\" + nameSet2;\r\n \r\n // compute the distance between the \r\n computePairedDistances(set1, set2, nameSet1, nameSet2);\r\n\r\n // now compute the histogram of the nearest neighbours\r\n histo = computeHistrogram(set1, setPairNameCentroidNND);\r\n // save the histogram for this current iteration. \r\n addHistogram2map(histogramValuesMap, histo, setPairNameCentroidNND, i);\r\n\r\n // Do some NND global stats\r\n getMeanMedStdSet1 = getMeanMedStd(set1, setPairNameCentroidNND, dThresh);\r\n addValueToStatMap(statMap, setPairNameCentroidNND + MEAN_EXT, getMeanMedStdSet1[0]);\r\n addValueToStatMap(statMap, setPairNameCentroidNND + MED_EXT, getMeanMedStdSet1[1]);\r\n addValueToStatMap(statMap, setPairNameCentroidNND + STD_EXT, getMeanMedStdSet1[2]);\r\n addValueToStatMap(statMap, setPairNameCentroidNND + FRAC_NN, getMeanMedStdSet1[3]);\r\n }\r\n }\r\n }\r\n\r\n // now compute some stats for the randomised values\r\n Set<String> keys = statMap.keySet();\r\n double meanMean, pMean;\r\n double[] values;\r\n ArrayList<Double> vs;\r\n\r\n //System.out.println(\" sitsize \" + keys.size());\r\n for (String s : keys) {\r\n // walues for this \r\n vs = statMap.get(s);\r\n // extract the values \r\n values = List2Prims.doubleFromDouble(vs);\r\n meanMean = StatUtils.mean(values);\r\n pMean = TestUtils.tTest(parentFeature.getNumericPropertyValue(s), values);\r\n // store the values\r\n parentFeature.addNumericProperty(s + RAND_EXT, meanMean);\r\n parentFeature.addNumericProperty(s + RAND_EXT + PV, pMean);\r\n }\r\n\r\n // Compute the mean and standard deviation of the randomised histograms\r\n // and save in the parent features object map for saving later on. \r\n Set<String> histoKeys = histogramValuesMap.keySet();\r\n double[][] binsMeanStdevs;\r\n for (String s : histoKeys) {\r\n // histograms for this\r\n double[][] histos = histogramValuesMap.get(s);\r\n binsMeanStdevs = computeMeanAndStdevHistogram(histos);\r\n // save the values \r\n parentFeature.addObjectProperty(s + HIST + MEAN_EXT + RAND_EXT, Arrays.copyOf(binsMeanStdevs[1], binsMeanStdevs[1].length));\r\n parentFeature.addObjectProperty(s + HIST + STD_EXT + RAND_EXT, Arrays.copyOf(binsMeanStdevs[2], binsMeanStdevs[2].length));\r\n }\r\n\r\n }", "public static List<Partition> partition(PointSet points, int m) {\n\t\tPartition A = new Partition();\n\t\tint nFeatures = points.dimension();\n\t\tif(m > points.size())\n\t\t\tthrow new RuntimeException(\"Not enough points to make \" + m + \" partitions\");\n\t\tfor(Point p : points) {\n\t\t\tA.add(p);\n\t\t}\n\t\t\n\t\tList<Partition> S = new ArrayList<>();\n\t\tS.add(A);\n\t\tcalculateDissimilarity(A, nFeatures);\n\t\tint i = 1;\n\t\twhile(i < m) {\n\t\t\tint j = 0;\n\t\t\tfor(int k = 1; k < S.size(); k++)\n\t\t\t\tif(S.get(k).dissimilarity > S.get(j).dissimilarity)\n\t\t\t\t\tj = k;\n\t\t\tPartition Aj = S.get(j);\n\t\t\tPartition Aj1 = new Partition();\n\t\t\tPartition Aj2 = new Partition();\n\t\t\t//partition\n\t\t\tfor(Point p : Aj) {\n\t\t\t\tif(p.feature(Aj.pj) <= Aj.apj + Aj.dissimilarity/2)\n\t\t\t\t\tAj1.add(p);\n\t\t\t\telse\n\t\t\t\t\tAj2.add(p);\n\t\t\t}\n\t\t\tcalculateDissimilarity(Aj1, nFeatures);\n\t\t\tcalculateDissimilarity(Aj2, nFeatures);\n\t\t\tS.remove(Aj);\n\t\t\tS.add(Aj1);\n\t\t\tS.add(Aj2);\n\t\t\ti++;\n\t\t}\n\t\treturn S;\n\t}", "public static double purityFromClusters(ArrayList<HashSet<Integer>> clusters,\n ArrayList<ImageSegmentNode> nodes) {\n int[] majorities = new int[clusters.size()];\n\n for (int i = 0; i < clusters.size(); i++) {\n HashSet<Integer> cluster = clusters.get(i);\n\n ArrayList<Integer> frequencies =\n new ArrayList<>(Collections.nCopies(ImageSegmentNode.SegmentClass.values().length, 0));\n\n for (Integer nodeIndex : cluster) {\n ImageSegmentNode node = nodes.get(nodeIndex);\n frequencies.set(node.getSegmentClass().ordinal(),\n frequencies.get(node.getSegmentClass().ordinal()) + 1);\n }\n majorities[i] = Collections.max(frequencies);\n }\n\n return (double) IntStream.of(majorities).sum() / nodes.size();\n }", "public Cluster[] getClusters () {\n if (clusters != null) {\n return clusters;\n }\n \n try {\n List sort = org.openide.util.Utilities.topologicalSort (allPages.keySet (), deps);\n \n // ok, no cycles in between pages\n clusters = new Cluster[sort.size ()];\n for (int i = 0; i < clusters.length; i++) {\n clusters[i] = new Cluster (Collections.singleton (findPage ((String)sort.get (i))));\n }\n } catch (org.openide.util.TopologicalSortException ex) {\n // ok, there are cycles\n \n Set[] sets = ex.topologicalSets();\n clusters = new Cluster[sets.length];\n for (int i = 0; i < clusters.length; i++) {\n Set s = new TreeSet ();\n Iterator it = sets[i].iterator();\n while (it.hasNext ()) {\n String name = (String)it.next ();\n Page p = findPage (name);\n if (p != null) {\n s.add (p);\n }\n }\n clusters[i] = new Cluster (s);\n }\n }\n \n // references <Page -> Cluster>\n refs = new HashMap ();\n for (int i = 0; i < clusters.length; i++) {\n java.util.Iterator it = clusters[i].getPages ().iterator ();\n while (it.hasNext()) {\n Page p = (Page)it.next ();\n refs.put (p, clusters[i]);\n }\n }\n \n for (int i = 0; i < clusters.length; i++) {\n Set references = new HashSet ();\n java.util.Iterator it = clusters[i].getPages ().iterator ();\n while (it.hasNext()) {\n Page contained = (Page)it.next ();\n Collection c = (Collection)deps.get (contained.getFileName());\n if (c != null) {\n Iterator d = c.iterator();\n while (d.hasNext()) {\n String pageName = (String)d.next ();\n references.add (refs.get (findPage (pageName)));\n }\n }\n }\n // prevent self references\n references.remove (clusters[i]);\n clusters[i].references = (Cluster[])references.toArray (new Cluster[0]);\n }\n \n return clusters;\n }", "private ArrayList<ArrayList<Vector2i>> identifyClustersByGreedy(LinkedList<ArrayList<PositionAndColor>> cluster, int numOfColors, int ignoreSize) {\n\t\tArrayList<ArrayList<Vector2i>> bestMapping = new ArrayList<ArrayList<Vector2i>>();\n\t\tint activeClu = 0;\n\t\tfor (ArrayList<PositionAndColor> c : cluster) {\n\t\t\tboolean[] added = new boolean[cluster.size() + 1];\n\t\t\tArrayList<Vector2i> tempMapped = new ArrayList<Vector2i>();\n\t\t\tfor (int idx = 0; idx < numOfColors; idx++) {\n\t\t\t\tint posBest = -1;\n\t\t\t\tint diffBest = Integer.MAX_VALUE;\n\t\t\t\tint sizeBest = 0;\n\t\t\t\tint position = 0;\n\t\t\t\tfor (int innerIdx = 0; innerIdx < cluster.size(); innerIdx++) {\n\t\t\t\t\tif (innerIdx != activeClu && cluster.get(innerIdx).size() > ignoreSize)\n\t\t\t\t\t\tif (Math.abs(cluster.get(innerIdx).size() - c.size()) < diffBest && added[position] == false) {\n\t\t\t\t\t\t\tposBest = position;\n\t\t\t\t\t\t\tdiffBest = Math.abs(cluster.get(innerIdx).size() - c.size());\n\t\t\t\t\t\t\tsizeBest = cluster.get(innerIdx).size();\n\t\t\t\t\t\t}\n\t\t\t\t\tposition++;\n\t\t\t\t}\n\t\t\t\tif (posBest != -1) {\n\t\t\t\t\ttempMapped.add(new Vector2i(posBest, sizeBest));\n\t\t\t\t\tadded[posBest] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbestMapping.add(tempMapped);\n\t\t\tactiveClu++;\n\t\t}\n\t\treturn bestMapping;\n\t}", "public static ArrayList<GraphNode> getClosestGraphNodesWithPredicate(\n @NotNull GraphNode startNode,\n @NotNull Vector3D position,\n @NotNull Predicate<GraphNode> predicate,\n int n\n ) {\n PriorityQueue<GraphNode> graphNodesToVisit = new PriorityQueue<>(\n new GraphNodePositionComparator(position)\n );\n HashSet<GraphNode> alreadyToVisit = new HashSet<>();\n ArrayList<GraphNode> foundNodes = new ArrayList<>();\n\n graphNodesToVisit.add(startNode);\n alreadyToVisit.add(startNode);\n\n while (!graphNodesToVisit.isEmpty()) {\n GraphNode node = graphNodesToVisit.poll();\n\n if (predicate.test(node)) {\n foundNodes.add(node);\n if (foundNodes.size() == n) {\n return foundNodes;\n }\n }\n\n for (GraphNode neighbor : node.neighbors) {\n if (!alreadyToVisit.contains(neighbor)) {\n graphNodesToVisit.add(neighbor);\n alreadyToVisit.add(neighbor);\n }\n }\n }\n\n return foundNodes;\n }", "private static void calculateDissimilarity(Partition data, int nFeatures) {\n\t\t\n\t\tdouble[] a = new double[nFeatures];\n\t\tdouble[] b = new double[nFeatures];\n\t\tdouble[] delta = new double[nFeatures];\n\t\t\n\t\tfor(int j = 0; j < nFeatures; j++) {\n\t\t\ta[j] = Double.MAX_VALUE;\n\t\t\tb[j] = Double.MIN_VALUE;\n\t\t\tfor(Point p : data) {\n\t\t\t\tif(p.feature(j) < a[j])\n\t\t\t\t\ta[j] = p.feature(j);\n\t\t\t\tif(p.feature(j) > b[j])\n\t\t\t\t\tb[j] = p.feature(j);\n\t\t\t}\n\t\t\tdelta[j] = b[j] - a[j];\n\t\t}\n\t\t\n\t\tint pj = 0;\n\t\tfor(int j = 1; j < nFeatures; j++) {\n\t\t\tif(delta[j] > delta[pj])\n\t\t\t\tpj = j;\n\t\t}\n\t\t\n\t\tdata.apj = a[pj];\n\t\tdata.pj = pj;\n\t\tdata.dissimilarity = delta[pj];\n\t}", "public static void Agrupar() {\n\t\tArrayList<ArrayList<Double>> distancias_centroids = new ArrayList<ArrayList<Double>>();\n\t\tfor (int i=0;i<centroids.size();i++) {\n\t\t\tArrayList<Double> distancias= new ArrayList<Double>();\n\t\t\tfor (int j=0;j<petalas.size();j++) {\n\t\t\t\tdouble x1= centroids.get(i).petal_length;\n\t\t\t\tdouble x2= petalas.get(j).petal_length;\n\t\t\t\tdouble y1= centroids.get(i).petal_width;\n\t\t\t\tdouble y2= petalas.get(j).petal_width;\n\t\t\t\tdouble cateto1= x1-x2;\n\t\t\t\tdouble cateto2= y1-y2;\n\t\t\t\tdouble hipotenusa = Math.sqrt(cateto1*cateto1+cateto2*cateto2);\n\t\t\t\tdistancias.add(hipotenusa);\n\t\t\t\t/*\n\t\t\t\tSystem.out.println(\"cateto1: \"+cateto1);\n\t\t\t\tSystem.out.println(\"cateto2: \"+cateto2);\n\t\t\t\tSystem.out.println(\"hipotenusa: \"+hipotenusa);\n\t\t\t\t*/\n\t\t\t\t\t\t\t}\n\t\t\t\n\t\t\tdistancias_centroids.add(distancias);\t\t\t\n\t\t}\n\t\t/*\n\t\tSystem.out.println(\"Distancias Centroids:\");\n\t\tfor (int i=0;i<distancias_centroids.size();i++) {\n\t\t\tSystem.out.println(\"Centroid \"+i);\n\t\t\tfor (int j=0;j<distancias_centroids.get(i).size();j++) {\n\t\t\t\tSystem.out.println(distancias_centroids.get(i).get(j));\n\t\t\t}\n\t\t}\n\t\t*/\n\t\t//Para qual centroid pertece cada ponto\n\t\tArrayList<ArrayList<Petala>> pontos_de_cada_centroid = new ArrayList<ArrayList<Petala>>();\n\t\tfor (int i=0;i<centroids.size();i++) {\n\t\t\tArrayList<Petala> p = new ArrayList<Petala>();\n\t\t\tpontos_de_cada_centroid.add(p); \n\t\t}\n\t\tfor (int i=0;i<petalas.size();i++) {\n\t\t\tdouble menor =100;\n\t\t\tint centroid_menor=0;\n\t\t\tfor (int j=0;j<centroids.size();j++) {\n\t\t\t\tif (distancias_centroids.get(j).get(i)<menor) {\n\t\t\t\t\tmenor = distancias_centroids.get(j).get(i);\n\t\t\t\t\tcentroid_menor=j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tpontos_de_cada_centroid.get(centroid_menor).add(petalas.get(i));\n\t\t}\n\t\t/*\n\t\tfor (int i=0;i<pontos_de_cada_centroid.size();i++) {\n\t\t\tSystem.out.println(\"Centroid \"+i);\n\t\t\tSystem.out.println(\"Petalas: \");\n\t\t\tSystem.out.println(pontos_de_cada_centroid.get(i));\n\t\t}\n\t\t*/\n\t\t//Novos centroids\n\t\tArrayList<Petala> novos_centroids = new ArrayList<Petala>();\n\t\tfor (int i=0;i<pontos_de_cada_centroid.size();i++) {\n\t\t\tdouble soma_x=0;\n\t\t\tdouble soma_y=0;\n\t\t\tfor (int j=0;j<pontos_de_cada_centroid.get(i).size();j++) {\n\t\t\t\tsoma_x+=pontos_de_cada_centroid.get(i).get(j).petal_length;\n\t\t\t\tsoma_y+=pontos_de_cada_centroid.get(i).get(j).petal_width;\n\t\t\t}\n\t\t\tdouble novo_x=soma_x/pontos_de_cada_centroid.get(i).size();\n\t\t\tdouble novo_y=soma_y/pontos_de_cada_centroid.get(i).size();\n\t\t\tPetala novo_centroid = new Petala(novo_x,novo_y);\n\t\t\tnovos_centroids.add(novo_centroid);\n \t\t}\n\t\t\n\t\t//Gravar Geracao\n\t\tArrayList<Petala> gc= new ArrayList<Petala>();\n\t\tfor (int i=0;i<centroids.size();i++) {\n\t\t\tgc.add(centroids.get(i));\n\t\t}\n\t\tGeracao geracao = new Geracao(gc,pontos_de_cada_centroid);\n\t\tgeracoes.add(geracao);\n\t\t//Condicao de Parada\n\t\tboolean terminou = true;\n\t\tfor (int i=0; i<centroids.size();i++) {\n\t\t\tif (centroids.get(i).petal_length!=novos_centroids.get(i).petal_length) {\n\t\t\t\tterminou = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (centroids.get(i).petal_width!=novos_centroids.get(i).petal_width) {\n\t\t\t\tterminou = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (terminou) {\n\t\t\t/*\n\t\t\tSystem.out.println(\"Novos centroids:\");\n\t\t\tSystem.out.println(novos_centroids);\n\t\t\t\n\t\t\tSystem.out.println(\"FIM!\");\n\t\t*/\n\t\t}else {\n\t\t\tcentroids.clear();\n\t\t\tfor (int i=0;i<novos_centroids.size();i++) {\n\t\t\t\tcentroids.add(novos_centroids.get(i));\n\t\t\t}\n\t\tgeracao_atual++;\n\t\t\tAgrupar();\n\t\t}\n\t}", "private Cluster getNearestCluster(BasicEvent event) {\n float minDistance = Float.MAX_VALUE;\n Cluster closest = null;\n float currentDistance = 0;\n for (Cluster c : clusters) {\n float rX = c.radiusX;\n float rY = c.radiusY; // this is surround region for purposes of dynamicSize scaling of cluster size or aspect ratio\n if (dynamicSizeEnabled) {\n rX *= surround;\n rY *= surround; // the event is captured even when it is in \"invisible surround\"\n }\n float dx, dy;\n if ((dx = c.distanceToX(event)) < rX && (dy = c.distanceToY(event)) < rY) { // needs instantaneousAngle metric\n currentDistance = dx + dy;\n if (currentDistance < minDistance) {\n closest = c;\n minDistance = currentDistance;\n c.distanceToLastEvent = minDistance;\n c.xDistanceToLastEvent = dx;\n c.yDistanceToLastEvent = dy;\n }\n }\n }\n return closest;\n }", "public static ArrayList<Point> getInitialCenters(FileSystem fs, Path input, int k) throws IOException {\n\t\treturn getInitialCenters(fs, input, k, false);\n\t}", "public List<T> kNearestNeighborsNaive(int numToFind, HasCoordinates searchPos)\n throws IllegalArgumentException {\n if (numToFind < 0) {\n throw new IllegalArgumentException(\"ERROR: Number of nearest \"\n + \"neighbors to find must be a positive integer\");\n }\n List<T> pointsCopy = new ArrayList<>(points);\n Collections.shuffle(pointsCopy);\n Collections.sort(pointsCopy, new PointComparator(searchPos));\n\n if (numToFind >= pointsCopy.size()) {\n return pointsCopy;\n }\n\n return pointsCopy.subList(0, numToFind);\n }", "@Override\n\tpublic Set<E> getClustering() {\n\t\treturn F;\n\t}", "ArrayList<ArrayList<Cell>> cells(ArrayList<ArrayList<Double>> d) {\n ArrayList<ArrayList<Cell>> result1 = new ArrayList<ArrayList<Cell>>();\n for (int i = 0; i < d.size(); i = i + 1) {\n ArrayList<Cell> result = new ArrayList<Cell>();\n for (int j = 0; j < d.get(i).size(); j = j + 1) {\n double height = d.get(i).get(j);\n if (height <= 0.0) {\n result.add(new OceanCell(height, i, j));\n }\n else {\n result.add(new Cell(height, i, j));\n }\n }\n result1.add(result);\n }\n return result1;\n }", "public static void main(String[] args) {\n \n PointSET pset = new PointSET();\n System.out.println(\"Empty: \" + pset.isEmpty());\n pset.insert(new Point2D(0.5, 0.5));\n pset.insert(new Point2D(0.5, 0.5));\n pset.insert(new Point2D(0.5, 0.6));\n pset.insert(new Point2D(0.5, 0.7));\n pset.insert(new Point2D(0.5, 0.8));\n pset.insert(new Point2D(0.1, 0.5));\n pset.insert(new Point2D(0.8, 0.5));\n pset.insert(new Point2D(0.1, 0.1));\n System.out.println(\"Empty: \" + pset.isEmpty());\n System.out.println(\"Size: \" + pset.size());\n System.out.println(\"Nearest to start: \" + pset.nearest(new Point2D(0.0, 0.0)));\n System.out.println(\"Contains #1: \" + pset.contains(new Point2D(0.0, 0.0)));\n System.out.println(\"Contains #2: \" + pset.contains(new Point2D(0.5, 0.5)));\n System.out.print(\"Range #1: \");\n for (Point2D p : pset.range(new RectHV(0.001, 0.001, 0.002, 0.002)))\n System.out.print(p.toString() + \"; \");\n System.out.print(\"\\n\");\n System.out.print(\"Range #2: \");\n for (Point2D p : pset.range(new RectHV(0.05, 0.05, 0.15, 0.15)))\n System.out.print(p.toString() + \"; \");\n System.out.print(\"\\n\");\n System.out.print(\"Range #3: \");\n for (Point2D p : pset.range(new RectHV(0.25, 0.35, 0.65, 0.75)))\n System.out.print(p.toString() + \"; \");\n System.out.print(\"\\n\");\n \n }", "public static HashMap<String,CPUParams> doMDS(DoubleMatrix probMatrix,int dim, double parinf, double parsup, HashMap<String,Integer> ids) {\n\t\tint N = ids.size() ;\n\t\tDoubleMatrix centeringMatrix = new DoubleMatrix(N,N) ;\n\t\tfor(int i = 0 ; i<N ; i++) {\n\t\t\tfor(int j = 0 ; j<N ; j++) {\n\t\t\t\tif(i==j)\n\t\t\t\t\tcenteringMatrix.put(i,j,1.0-(1.0/((double)N))) ;\n\t\t\t\telse \n\t\t\t\t\tcenteringMatrix.put(i,j,-(1.0/((double)N))) ;\n\t\t\t}\n\t\t}\n\t\t// Centrer\n\t\tprobMatrix = centeringMatrix.mmul(probMatrix).mmul(centeringMatrix) ;\n\t\t\n\t\t// Faire la MDS de probmatric centree.\n\t\tDoubleMatrix eig[] = Eigen.symmetricEigenvectors(probMatrix) ;\n\t\tDoubleMatrix eigVect = eig[0] ;\n\t\tDoubleMatrix eigVal = eig[1] ;\n\t\tArrayList<Double> eigvalueslist = new ArrayList<Double>() ;\n\t\tArrayList<DoubleMatrix> eigvectorslist = new ArrayList<DoubleMatrix>() ;\n\t\tint NposEig = 0 ;\n\t\tfor(int i=0 ; i<N ;i++) {\n\t\t\tDouble ev = eigVal.get(i,i) ;\n\t\t\tif(ev>0)\n\t\t\t\tNposEig++ ;\n\t\t\teigvalueslist.add(ev) ;\n\t\t\teigvectorslist.add(eigVect.getColumn(i)) ;\n\t\t\t\n\t\t}\n\t\tint MDSsize = Math.min(NposEig, dim) ;\n\t\tDoubleMatrix reducedEigVect = new DoubleMatrix(N,MDSsize) ;\n\t\tDoubleMatrix reducedEigVal = new DoubleMatrix(MDSsize,MDSsize) ;\n\t\tCollections.sort(eigvalueslist) ;\n\t\tCollections.reverse(eigvalueslist);\n\t\t\n\t\t\n\t\t//Filtrer les eigens\n\t\tfor(int i=0 ; i<MDSsize ; i++) {\n\t\t\tif(eigvalueslist.get(i)>0) {\n\t\t\t\treducedEigVal.put(i, i,Math.sqrt(eigvalueslist.get(i))) ;\n\t\t\t\treducedEigVect.putColumn(i, eigvectorslist.get(i));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Faire la MDS\n\t\tDoubleMatrix mds = reducedEigVect.mmul(reducedEigVal) ;\n\t\t\n\t\tHashMap<String,CPUParams> r = new HashMap<String, CPUParams>() ;\n\t\tfor(String u : User.users.keySet()) {\n\t\t\tint id1 = ids.get(u) ;\n\t\t\tCPUParams cpu = new CPUParams(1, dim, 0.0,parinf,parsup) ;\n\t\t\tParameters pList = new Parameters(dim, 0.0) ;\n\t\t\tfor(int i=0 ; i<MDSsize ; i++) {\n\t\t\t\tpList.set(i, new Parameter(mds.get(id1, i)*parsup));\n\t\t\t}\n\t\t\tcpu.setParameters(pList);\n\t\t\tr.put(u, cpu) ;\n\t\t}\n\t\t\n\t\treturn r ;\n\t}", "private Bucket generate_list_of_buckets(\n\t\t\tArrayList<PotentialLine> potentialLines) {\n\t\tBucket front_bucket = new Bucket(0);\n\n\t\t// Populate sorted linked-list of buckets of lines\n\t\tfor (Line current_line : maximal_lines) {\n\t\t\tPotentialLine potential_line = new PotentialLine();\n\t\t\tpotential_line.line = current_line;\n\t\t\tpotential_line.num_unused_points = current_line.getNum_points();\n\n\t\t\tif (potential_line.num_unused_points == front_bucket.getValue()) {\n\n\t\t\t\t// Add potential_line to the proper bucket\n\t\t\t\tfront_bucket.addLine(potential_line);\n\t\t\t\tpotential_line.bucket = front_bucket;\n\t\t\t} else {\n\n\t\t\t\t// Because maximal_lines is sorted, if potential_line does not\n\t\t\t\t// belong in the first bucket, we need to add a new bucket\n\t\t\t\tBucket new_bucket = new Bucket(potential_line.num_unused_points);\n\t\t\t\tnew_bucket.setNextBucket(front_bucket);\n\t\t\t\tfront_bucket.setPreviousBucket(new_bucket);\n\t\t\t\tfront_bucket = new_bucket;\n\n\t\t\t\t// Add potential_line to the proper bucket\n\t\t\t\tfront_bucket.addLine(potential_line);\n\t\t\t\tpotential_line.bucket = front_bucket;\n\t\t\t}\n\n\t\t\t// Add potential_line to the list of potential lines\n\t\t\tpotentialLines.add(potential_line);\n\t\t}\n\n\t\treturn front_bucket;\n\t}", "List<CoordinateDistance> getNearestCoordinates(Point coordinate, int n);", "private void calculateDistances(int pDistancia,int pMetrica,int k)\n\t{\n\t\tDistance dist = null;\n\t\t\n\t\tfor (int i = 0; i < clusterList.size(); i++)\n\t\t{\n\t\t\tfor (int j = i+1; j < clusterList.size(); j++)\n\t\t\t{\n\t\t\t\tdist = new Distance(clusterList.get(i), clusterList.get(j));\n\t\t\t\tdist.calculateDistance(pDistancia, pMetrica, k);\n\t\t\t\tdistanceList.addLast(dist);\n\t\t\t}\n\t\t}\n\t\tCollections.sort(distanceList);\n\t}", "int getMinInstances();", "public abstract float getDensity();", "static int paintersPartition(int a[], int n, int k)\r\n\t {\r\n\t int start = a[0], end = a[0], minOfMax = -1;\r\n\t \r\n\t //this is to initialise start as max of all array elements and end as sum of all array elements\r\n\t for(int i = 1; i < n; i++)\r\n\t {\r\n\t end += a[i];\r\n\t \r\n\t if(a[i] > start)\r\n\t start = a[i];\r\n\t }\r\n\t \r\n\t while(start <= end)\r\n\t {\r\n\t int mid = start + ((end - start) / 2);\r\n\t \r\n\t if(isValid(a, n, k, mid))\r\n\t {\r\n\t minOfMax = mid; //this will hold one of the valid solution but then to get the most optimal one, we need check further on left side of search space\r\n\t end = mid - 1;\r\n\t }\r\n\t else\r\n\t start = mid + 1;\r\n\t }\r\n\t \r\n\t return minOfMax;\r\n\t }", "public static void main(String[] args) {\n\t\tint p_numbers = 3; // Partition Numbers\r\n\t int p_size = 5;\r\n\t int z_exponent = 1;\t \t \t \t \r\n\t int d = 0;\r\n\t int d_start = 0;\r\n\t int d_end = p_size;\r\n\t double mu = 0.0;\r\n\t double sigma = 1.0;\r\n\t double z, c, c_rand, n;\r\n\t\t\t \t \r\n\t ZipfDistribution zipf;\t// Parameters = Number of Elements, Exponent \t\t \t \t \t \t \t \r\n\t RandomDataGenerator randData = new RandomDataGenerator();\r\n\t RandomDataGenerator rand = new RandomDataGenerator();\r\n\t rand.reSeed(0);\r\n\t \r\n\t for(int p = 0; p < p_numbers; p++) {\r\n\t \tzipf = new ZipfDistribution(p_size, z_exponent); \r\n\t \tzipf.reseedRandomGenerator(p);\r\n\t \trandData.reSeed(p);\t\t \r\n\t \t\r\n\t \tfor(d = d_start; d < d_end; d++) {\r\n\t \t\tz = randData.nextZipf(p_size, z_exponent);\r\n\t \t\tz += d_start;\r\n\t \t\t\r\n\t \t\tif(z > d_end) z -= 1;\r\n\t \t\t\r\n\t \t\tc = zipf.cumulativeProbability((d - d_start));\r\n\t \t\tc_rand = zipf.cumulativeProbability(((int)z - d_start));\r\n\t \t\t\r\n\t \t\t//n = rand.nextGaussian(mu, sigma);\r\n\t \t\tn = rand.nextUniform(0.0, 1.0);\r\n\t\t \r\n\t\t \tSystem.out.println(p+\" \"+d+\" \"+c+\" \"+(int)z+\" \"+c_rand+\" \"+n);\r\n\t \t}\r\n\t \t\r\n\t \td_start = d_end;\r\n\t \td_end = (d + p_size);\t \t\r\n\t }\t \r\n\t}", "public WatsetClustering<V> compute() {\n logger.log(Level.INFO, \"Watset started.\");\n\n buildInventory();\n\n final var count = senses.values().stream().mapToInt(List::size).sum();\n logger.log(Level.INFO, \"Watset: sense inventory constructed including {0} senses.\", count);\n\n final var senseGraph = buildSenseGraph();\n\n if (graph.edgeSet().size() != senseGraph.edgeSet().size()) {\n throw new IllegalStateException(\"Mismatch in number of edges: expected \" +\n graph.edgeSet().size() +\n \", but got \" +\n senseGraph.edgeSet().size());\n }\n\n logger.log(Level.INFO, \"Watset: sense graph constructed.\");\n\n final var globalAlgorithm = global.apply(senseGraph);\n final var senseClusters = globalAlgorithm.getClustering();\n\n logger.log(Level.INFO, \"Watset finished.\");\n\n final var clusters = senseClusters.getClusters().stream().\n map(cluster -> cluster.stream().map(Sense::get).collect(Collectors.toSet())).\n collect(Collectors.toList());\n\n return new WatsetClustering.WatsetClusteringImpl<>(clusters,\n Collections.unmodifiableMap(inventory),\n new AsUnmodifiableGraph<>(senseGraph));\n }", "Map<Double, Element> getElements();", "private static float[] GetAppropriateSeparableGauss(int kernelSize){\n final double epsilon = 2e-2f / kernelSize;\n double searchStep = 1.0;\n double sigma = 1.0;\n while( true )\n {\n\n double[] kernelAttempt = GenerateSeparableGaussKernel( sigma, kernelSize );\n if( kernelAttempt[0] > epsilon )\n {\n if( searchStep > 0.02 )\n {\n sigma -= searchStep;\n searchStep *= 0.1;\n sigma += searchStep;\n continue;\n }\n\n float[] retVal = new float[kernelSize];\n for (int i = 0; i < kernelSize; i++)\n retVal[i] = (float)kernelAttempt[i];\n return retVal;\n }\n\n sigma += searchStep;\n\n if( sigma > 1000.0 )\n {\n assert( false ); // not tested, preventing infinite loop\n break;\n }\n }\n\n return null;\n }", "private void partitionImpl(Collection<S> vocab, HashMap<Dimension<T>, MutableDouble> center) {\n double firstVal = Double.POSITIVE_INFINITY;\n double secondVal = Double.POSITIVE_INFINITY;\n S firstWord = null;\n S secondWord = null;\n\n LinkedList<S> cluster1 = new LinkedList<S>();\n LinkedList<S> cluster2 = new LinkedList<S>();\n HashMap<Dimension<T>, MutableDouble> newCenter1 = null;\n HashMap<Dimension<T>, MutableDouble> newCenter2 = null;\n\n if (vocab.size() > 2) {\n for (S word : vocab) {\n double dist = distanceToCenter(word, center);\n if (dist < secondVal) {\n if (dist < firstVal) {\n secondVal = firstVal;\n secondWord = firstWord;\n firstVal = dist;\n firstWord = word;\n } else {\n secondVal = dist;\n secondWord = word;\n }\n }\n }\n if (distance(firstWord, secondWord) <= 0.0) {\n System.out.printf(\"zero distance between '%s' and '%s'\\n\", firstWord, secondWord);\n // pick an arbitrary second word\n for (S word : vocab) {\n if (word.equals(firstWord) || word.equals(secondWord)) {\n continue;\n }\n if (distance(firstWord, word) > 0.0) {\n secondWord = word;\n break;\n }\n }\n System.out.printf(\"selected '%s' and '%s'\\n\", firstWord, secondWord);\n }\n\n HashMap<Dimension<T>, MutableDouble> center1 = wordToVector(firstWord);\n HashMap<Dimension<T>, MutableDouble> center2 = wordToVector(secondWord);\n for (S word : vocab) {\n double dist1 = distanceToCenter(word, center1);\n double dist2 = distanceToCenter(word, center2);\n if (dist1 < dist2) {\n cluster1.add(word);\n } else {\n cluster2.add(word);\n }\n }\n\n int changed = 1;\n int iteration = 0;\n while (++iteration <= MAX_ITERATIONS && changed > 0) {\n System.out.printf(\"Iteration %d/%d\\n\", iteration, MAX_ITERATIONS);\n changed = 0;\n newCenter1 = getCenter(cluster1);\n newCenter2 = getCenter(cluster2);\n\n LinkedList<S> tmpCluster1 = new LinkedList<S>();\n LinkedList<S> tmpCluster2 = new LinkedList<S>();\n\n for (ListIterator<S> it = cluster1.listIterator(); it.hasNext();) {\n S word = it.next();\n double dist1 = distanceToCenter(word, newCenter1);\n double dist2 = distanceToCenter(word, newCenter2);\n if (dist1 <= dist2) {\n tmpCluster1.add(word);\n } else {\n tmpCluster2.add(word);\n changed++;\n System.out.printf(\"changing %s : %g > %g\\n\", word, dist1, dist2);\n }\n }\n\n for (ListIterator<S> it = cluster2.listIterator(); it.hasNext();) {\n S word = it.next();\n double dist1 = distanceToCenter(word, newCenter1);\n double dist2 = distanceToCenter(word, newCenter2);\n if (dist2 <= dist1) {\n tmpCluster2.add(word);\n } else {\n tmpCluster1.add(word);\n changed++;\n System.out.printf(\"changing %s : %g < %g\\n\", word, dist1, dist2);\n }\n }\n cluster1 = tmpCluster1;\n cluster2 = tmpCluster2;\n System.out.printf(\"changed: %d/%d\\n\", changed, vocab.size());\n if (cluster1.size() == 0 || cluster2.size() == 0) {\n LinkedList<S> cl = cluster1.size() == 0 ? cluster2 : cluster1;\n System.out.printf(\"Cannot split %s, split them randomly\\n\", cl.toString());\n tmpCluster1 = new LinkedList<S>();\n tmpCluster2 = new LinkedList<S>();\n boolean b = true;\n for (S word : cl) {\n if (b) {\n tmpCluster1.add(word);\n } else {\n tmpCluster2.add(word);\n }\n b = !b;\n }\n cluster1 = tmpCluster1;\n cluster2 = tmpCluster2;\n }\n }\n } else if (vocab.size() == 2) {\n Iterator<S> it = vocab.iterator();\n S word1 = it.next();\n S word2 = it.next();\n cluster1.add(word1);\n cluster2.add(word2);\n newCenter1 = wordToVector(word1);\n newCenter2 = wordToVector(word2);\n } else {\n return;\n }\n\n if (notifyNewCluster(vocab, cluster1, cluster2)) {\n partition(cluster1, newCenter1);\n partition(cluster2, newCenter2);\n }\n\n }", "public REXP kmeans(double[] values, String[] rnames, String[] cnames,\n boolean usePam, String minClusCountExpr, String maxClusCountExpr) {\n minClusCountExpr = minClusCountExpr.replaceAll(\"N\",\n String.valueOf(rnames.length));\n maxClusCountExpr = maxClusCountExpr.replaceAll(\"N\",\n String.valueOf(rnames.length));\n\n double minClusCount = Calculator.calculate(minClusCountExpr);\n double maxClusCount = Calculator.calculate(maxClusCountExpr);\n\n logger.info(\"MIN clusters count: \" + minClusCount\n + \" MAX clusters count: \" + maxClusCount);\n\n // calculate\n\n logger.info(\"values:\\n\" + Arrays.toString(values));\n rengine.assign(CELLS_NAME, values);\n rengine.assign(ROWS_NAME, rnames);\n rengine.assign(COLS_NAME, cnames);\n\n String matrixCmd = \"x <- matrix(\" + CELLS_NAME + \", nrow=\"\n + rnames.length + \", ncol=\" + cnames.length\n + \", byrow=TRUE, dimnames=list(\" + ROWS_NAME + \",\" + COLS_NAME\n + \"))\";\n logger.info(\"Creating matrix command: \" + matrixCmd);\n\n rengine.eval(matrixCmd);\n\n String kmeansCmd = \"km <- pamk(x,\" + ((int) minClusCount) + \":\"\n + ((int) maxClusCount) + \",usepam=\"\n + String.valueOf(usePam).toUpperCase() + \")\";\n logger.info(\"Kmeans command: \" + kmeansCmd);\n REXP km = rengine.eval(kmeansCmd);\n\n // rengine.eval(\"print(km$nc)\");\n\n logger.info(\"Optimal number of clusters : \"\n + ((REXP) km.asVector().get(1)).asInt());\n\n return km;\n\n }", "public PVector cohesion (ArrayList<Shark> sharks) {\n float neighbordist = 50;\n PVector sum = new PVector(0, 0); // Start with empty vector to accumulate all positions\n int count = 0;\n for (Shark other : sharks) {\n float d = PVector.dist(position, other.position);\n if ((d > 0) && (d < neighbordist)) {\n sum.add(other.position); // Add position\n count++;\n }\n }\n if (count > 0) {\n sum.div(count);\n return seek(sum); // Steer towards the position\n } else {\n return new PVector(0, 0);\n }\n }", "public static void extractKCoreAndConnectedComponent(double threshold) throws IOException, ParseException, Exception {\n String[] prefixYesNo = {\"yes\", \"no\"};\n for (String prefix : prefixYesNo) {\n\n // Get the number of clusters\n int c = getNumberClusters(RESOURCES_LOCATION + prefix + \"_graph.txt\");\n\n // Get the number of nodes inside each cluster\n List<Integer> numberNodes = getNumberNodes(RESOURCES_LOCATION + prefix + \"_graph.txt\", c);\n\n PrintWriter pw_cc = new PrintWriter(new FileWriter(RESOURCES_LOCATION + prefix + \"_largestcc.txt\")); //open the file where the largest connected component will be written to\n PrintWriter pw_kcore = new PrintWriter(new FileWriter(RESOURCES_LOCATION + prefix + \"_kcore.txt\")); //open the file where the kcore will be written to\n\n // create the array of graphs\n WeightedUndirectedGraph[] gArray = new WeightedUndirectedGraph[c];\n for (int i = 0; i < c; i++) {\n System.out.println();\n System.out.println(\"Cluster \" + i);\n\n gArray[i] = new WeightedUndirectedGraph(numberNodes.get(i) + 1);\n\n // Put the nodes,\n NodesMapper<String> mapper = new NodesMapper<String>();\n gArray[i] = addNodesGraph(gArray[i], i, RESOURCES_LOCATION + prefix + \"_graph.txt\", mapper);\n\n //normalize the weights\n gArray[i] = normalizeGraph(gArray[i]);\n\n AtomicDouble[] info = GraphInfo.getGraphInfo(gArray[i], 1);\n System.out.println(\"Nodes:\" + info[0]);\n System.out.println(\"Edges:\" + info[1]);\n System.out.println(\"Density:\" + info[2]);\n\n // extract remove the edges with w<t\n gArray[i] = SubGraphByEdgesWeight.extract(gArray[i], threshold, 1);\n\n // get the largest CC and save to a file\n WeightedUndirectedGraph largestCC = getLargestCC(gArray[i]);\n saveGraphToFile(pw_cc, mapper, largestCC.in, i);\n\n // Get the inner core and save to a file\n WeightedUndirectedGraph kcore = kcore(gArray[i]);\n saveGraphToFile(pw_kcore, mapper, kcore.in, i);\n }\n\n pw_cc.close();\n pw_kcore.close();\n }\n }", "public interface IStoppingCriteria {\n\n /**\n * Determine the degree of clustering agreement\n * @param cluster1 one clustering results\n * @param cluster2 the other clustering results\n * @return the degree of clustering agreement; 1 refers to be the same clustering results; 0 refers to be the totally different clustering results\n */\n public double computeSimilarity(int[] cluster1, int[] cluster2);\n\n}", "private Set<Hole> createHoleSet(){\n Set<Hole> holeSet = new HashSet<>();\n for (Profile profile:profiles) {\n holeSet.addAll(profile.getHoles());\n }\n return holeSet;\n }", "private double findMin(){\r\n Set<Map.Entry<Double, Double>> list = heap.entrySet();\r\n double minKey = heap.firstKey();\r\n double minVal = MAX_WEIGHT;\r\n if (list != null){\r\n for (Map.Entry<Double, Double> entry: list){\r\n if (minVal > entry.getValue()){\r\n minVal = entry.getValue();\r\n minKey = entry.getKey();\r\n }\r\n }\r\n }\r\n return minKey;\r\n }", "private static void kmeans(int[] rgb, int k) {\n\t\tColor[] rgbColor = new Color[rgb.length];\r\n\t\tColor[] ColorCluster = new Color[rgb.length];\r\n\t\tint[] ColorClusterID = new int[rgb.length];\r\n\t\t\r\n\t\tfor(int i = 0;i<rgb.length;i++) {\r\n\t\t\trgbColor[i] = new Color(rgb[i]);\r\n\t\t\tColorClusterID[i] = -1;\r\n\t\t}\r\n\t\t\r\n\t\tColor[] currentCluster = new Color[k];\t\t\r\n\t\tint randomNumber[]= ThreadLocalRandom.current().ints(0, rgb.length).distinct().limit(k).toArray();\r\n\t\tColor[] modifiedColorCluster = new Color[k];\t\r\n\t\t\r\n\t\tfor(int j=0;j<k;j++) {\r\n\t\t\tcurrentCluster[j]=rgbColor[randomNumber[j]];\r\n\t\t}\r\n\t\tint flag = 1;\r\n\t\tint maxIterations = 1000;\r\n\t\tint numIteration=0;\r\n\t\tdouble[] distance = new double[maxIterations+1];\t\t\r\n\t\tdistance[0]=Double.MAX_VALUE;\r\n\t\twhile(flag == 1) {\r\n\t\t\tflag = 0;\r\n\t\t\tnumIteration++;\r\n\t\t\tdistance[numIteration]=assignCLustersToPixels(rgbColor,currentCluster,ColorCluster,ColorClusterID,k,rgb.length);\r\n\t\t\tmodifiedColorCluster= findMeans(rgbColor,ColorClusterID,modifiedColorCluster,k,rgb.length);\r\n\t\t\tif(!clusterCenterCheck(currentCluster, modifiedColorCluster,k)){\r\n\t\t\t\tflag = 1;\r\n\t\t\t\tfor(int j=0;j<k;j++) {\r\n\t\t\t\t\tcurrentCluster[j]=modifiedColorCluster[j];}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\tfor(int i = 0;i<rgb.length;i++) {\r\n\t\t\trgb[i]= getValue(ColorCluster[i].getRed(),ColorCluster[i].getGreen(),ColorCluster[i].getBlue());\r\n\t\t}\r\n\t\treturn;\r\n\t }", "public void decideCluster(){\n\tdouble shortest = 1000000;\n\tfor(int i = 0; i < clusterDist.length; i++)\n\t{\n\t\tif(clusterDist[i] < shortest)\n\t\t{\tshortest = clusterDist[i];\n\t\t\tthis.clusterid = i;\n\t\t}\n\t\t\n\t}\n}", "public Set<Node3D> getNeighbors(Node3D node){\n List<Triangle3D> triangles = node_to_triangle.get(node);\n Set<Node3D> neighbors = new HashSet<>();\n neighbors.add(node);\n for(Triangle3D t: triangles){\n neighbors.add(t.A);\n neighbors.add(t.B);\n neighbors.add(t.C);\n }\n neighbors.remove(node);\n return neighbors;\n }", "public List<Neighbor> getNearNeighborsInSample(double[] point, double distanceThreshold) {\n checkNotNull(point, \"point must not be null\");\n checkArgument(distanceThreshold > 0, \"distanceThreshold must be greater than 0\");\n\n if (!isOutputReady()) {\n return Collections.emptyList();\n }\n\n Function<RandomCutTree, Visitor<Optional<Neighbor>>> visitorFactory = tree ->\n new NearNeighborVisitor(point, distanceThreshold);\n\n return traverseForest(point, visitorFactory, Neighbor.collector());\n }", "public ExperimentList orderExperiments(){ // tum experimentlari sirala\r\n Node last = head;\r\n Node last2 = head;\r\n ExperimentList ordered = new ExperimentList();\r\n Node min = new Node(new Experiment());\r\n min.data.accuracy = 9999999;\r\n float min2 = -9999999;\r\n int count = -1;\r\n while(last != null){ // genel dongu\r\n int count_in = 0;\r\n while(last2 != null){ // her eleman icin dongu\r\n if( min.data.accuracy > last2.data.accuracy && last2.data.accuracy >= min2){\r\n if( last2.data.accuracy != min2 || count_in >= count){\r\n min = last2; // min se ve kullanilmamissa ekle\r\n count_in++;\r\n }\r\n }\r\n last2 = last2.next;\r\n }\r\n count = count_in;\r\n Experiment temp = new Experiment(min.data);\r\n ordered.addExpList(temp);\r\n min2 = min.data.accuracy;\r\n min = new Node(new Experiment());\r\n min.data.accuracy = 9999999;\r\n last = last.next;\r\n last2 = head;\r\n }\r\n return ordered;\r\n }", "private ArrayList<Integer> getRegularPointsIndex(float ratio) {\n Dimension dim = layoutPanel.getLayoutSize();\n int height = dim.height;\n int width = dim.width;\n int size = height * width;\n int newNListSize = (int) (size * ratio);\n double len = Math.sqrt((double) size / (double) newNListSize);\n\n int nx = (int) Math.round(width / len);\n int ny = (int) Math.round(height / len);\n dim.width = nx;\n dim.height = ny;\n\n // find evenly spaced margin\n double mx, my;\n if (nx * len > width) {\n mx = (len - (nx * len - width)) / 2.0;\n } else {\n mx = (len + (width - nx * len)) / 2.0;\n }\n if (ny * len > height) {\n my = (len - (ny * len - height)) / 2.0;\n } else {\n my = (len + (height - ny * len)) / 2.0;\n }\n mx = Math.floor(mx);\n my = Math.floor(my);\n\n // create points of array, which are regularly distributed\n ArrayList<Point> pts = new ArrayList<Point>();\n for (double y = my; Math.round(y) < height; y += len) {\n for (double x = mx; Math.round(x) < width; x += len) {\n pts.add(new Point((int) Math.round(x), (int) Math.round(y)));\n }\n }\n\n // convert points to index list\n ArrayList<Integer> newNList = cnvPoints2IndexList(pts);\n\n return newNList;\n }", "default List<Point3D> findIntersections(Ray ray) {\n\tList<GeoPoint> geoList = findGeoIntersections(ray);\n\treturn geoList == null ? null\n\t: geoList .stream()\n\t.map(gp -> gp.point)\n\t.collect(Collectors.toList());\n\t}", "private Point findFront(Point[] points) {\n\t\t// Loop through the passed points.\n\t\tdouble[] dists = new double[3];\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\t// Get outer-loop point.\n\t\t\tPoint a = points[i];\n\t\t\t\n\t\t\t// Loop through rest of points.\n\t\t\tfor (int k = 0; k < 3; k++) {\n\t\t\t\t// Continue if current outer.\n\t\t\t\tif (i == k) continue;\n\t\t\t\t\n\t\t\t\t// Get inner-loop point.\n\t\t\t\tPoint b = points[k];\n\t\t\t\t\n\t\t\t\t// Add distance between out and inner.\n\t\t\t\tdists[i] += Math.sqrt(\n\t\t\t\t\tMath.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Prepare index and largest holder.\n\t\tint index = 0;\n\t\tdouble largest = 0;\n\t\t\n\t\t// Loop through the found distances.\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\t// Skip if dist is lower than largest.\n\t\t\tif (dists[i] < largest) continue;\n\t\t\t\n\t\t\t// Save the index and largest value.\n\t\t\tindex = i;\n\t\t\tlargest = dists[i];\n\t\t}\n\t\t\n\t\t// Return the largest point index.\n\t\treturn points[index];\n\t}", "public NeighborhoodDistribution(int divisions) {this.divisions=divisions;}", "public double getClusterCoefficientJUNG()\r\n\t{\n\t\tMap<Entity, Double> coefficients = Metrics\r\n\t\t\t\t.clusteringCoefficients(undirectedGraph);\r\n\t\tdouble coefficientSum = 0.0;\r\n\t\t// logger.info(\"Clustering coefficients: \" + coefficients);\r\n\t\tfor (Entity vertex : coefficients.keySet()) {\r\n\t\t\t// logger.info(vertex + ((JUNGEntityVertex)\r\n\t\t\t// vertex).getVertexEntity());\r\n\t\t\tcoefficientSum += coefficients.get(vertex);\r\n\t\t}\r\n\t\treturn coefficientSum / getNumberOfNodes();\r\n\t}" ]
[ "0.69042164", "0.56993246", "0.55882794", "0.5412203", "0.5410953", "0.53026104", "0.52817875", "0.5201848", "0.51996887", "0.51927316", "0.5192381", "0.51661897", "0.5142746", "0.5044609", "0.5036317", "0.49580172", "0.4884629", "0.48791155", "0.48530558", "0.48304588", "0.48185462", "0.4811443", "0.47730038", "0.471536", "0.4715089", "0.4695307", "0.46943384", "0.46778822", "0.46755087", "0.46739653", "0.4664548", "0.46572524", "0.4656919", "0.46428445", "0.4633402", "0.46238768", "0.46237242", "0.46182328", "0.46111333", "0.46056354", "0.46050757", "0.45915362", "0.45750326", "0.45746103", "0.45706463", "0.45668003", "0.45478165", "0.4534537", "0.45228255", "0.4522162", "0.45101756", "0.4499236", "0.44974932", "0.44822326", "0.4478699", "0.44764665", "0.44747084", "0.4474219", "0.44686478", "0.4447161", "0.44458464", "0.44362035", "0.44230255", "0.44099453", "0.44094312", "0.4395843", "0.4393683", "0.43934903", "0.43922815", "0.43908966", "0.43766066", "0.43755484", "0.4373697", "0.4368502", "0.43674856", "0.4365489", "0.43554676", "0.43457836", "0.4345288", "0.43420058", "0.43400565", "0.43355474", "0.4329076", "0.4326225", "0.43228444", "0.43217212", "0.4317218", "0.43146324", "0.43132347", "0.4310596", "0.43068132", "0.4306129", "0.429838", "0.42969632", "0.4295797", "0.42925617", "0.42905527", "0.4290005", "0.42893857", "0.42884997" ]
0.7446088
0
TODO Autogenerated method stub
@Override public String getKey() { return getCid(); }
{ "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 String getObjectKey() { return OBJECT_KEY; }
{ "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
Returns an Observable that receives Data from the Sensor.
public Observable<Data> start(Sensor sensor){ return Observable.interval(DELAY, DELAY, TimeUnit.MILLISECONDS).map(aLong -> { DataTypeInt dataTypeInt = new DataTypeInt(DateTime.getDateTime(), getStatus()); return new Data(sensor, dataTypeInt); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Observable crearObservable(){\n /**\n * Hay otras muchas formas de crear el observable\n */\n return Observable.create(new ObservableOnSubscribe<String>() {\n\n @Override\n public void subscribe(ObservableEmitter<String> emitter) throws Exception {\n try {\n //Un observable puede emitir 3 tipos de datos\n //1\n emitter.onNext(\"Primer dato del observable\");\n emitter.onNext(\"Segundo dato del observable\");\n emitter.onNext(tareaLargaDuracion());\n //2\n emitter.onComplete();//Ha dejado ya de emitir datos\n }catch (Exception e){\n e.printStackTrace();\n //3\n emitter.onError(e);\n }\n }\n });\n }", "public static Observable<String> myObserve()\r\n {\r\n return Observable.<String>create(subscriber -> {\r\n MessageSource source = new MessageSource();\r\n source.setListener(\r\n new MessageListener<String>() {\r\n public void onMessage(String message)\r\n {\r\n subscriber.onNext(message);\r\n }\r\n }\r\n );\r\n subscriber.setCancellable(source::stop);\r\n source.start();\r\n });\r\n }", "public static void just() {\n Observable<List<String>> myObservable = Observable.just(Utils.getData());\n myObservable.subscribe(consumerList);\n }", "@Override\n public Observable<byte[]> onMessage() {\n return Observable.create(emitter -> {\n RtcCallbacks.MessageCallback messageCallback = msg -> {\n if (!emitter.isDisposed()) emitter.onNext(msg);\n };\n rtcCallbackProvider.addMessageCallback(messageCallback);\n emitter.setCancellable(rtcCallbackProvider::removeMessageCallback);\n });\n }", "public static Observable<String> getObservableTakeElement() {\n return observableSrc;//todo\n }", "public Observable<UsMovieBean> getMovieData() {\n return this.movieModel.getMovieData()\n .filter(usMovieBean -> usMovieBean != null)\n .compose(RxUtil.applyIOToMainThreadSchedulers());\n }", "public synchronized Vector<SensorData> getRawData() {\n return rawData;\n }", "public Sensor() {\n if(this.rawData == null)\n this.rawData = new Vector<SensorData>();\n }", "public static void main(String[] args) {\n System.out.println(\"Example of Observable.just()****\");\n Observable<String> justObs = Observable.just(\"one\", \"two\", \"three\", \"four\");\n justObs.subscribe(v -> System.out.println(\"Received:\" + v), e -> System.out.println(e), () -> System.out.println(\"Completed\"));\n\n System.out.println(\"\\nExample of Observable.create()****\");\n Observable<String> createdObs = Observable.create(o -> {\n o.onNext(\"Hello\");\n o.onCompleted();\n });\n createdObs.subscribe(System.out::println, e -> System.out.println(e), () -> System.out.println(\"Completed\"));\n\n System.out.println(\"\\nConverting FutureTask into Observable****\");\n FutureTask<Integer> task = new FutureTask<>(() -> {\n Thread.sleep(3000);\n return 28;\n });\n new Thread(task).start();\n\n Observable<Integer> futureObs = Observable.from(task);\n Subscription subscription = futureObs.subscribe(v -> System.out.println(\"Received :\" + v), e -> System.out.println(\"Error :\" + e),\n () -> System.out.println(\"Completed\"));\n\n System.out.println(\"\\nConverting Integer array into Observable****\");\n Integer[] in = new Integer[] { 1, 2, 3 };\n\n Observable<Integer> integerObs = Observable.from(in);\n Subscription arraySub = integerObs.subscribe(v -> System.out.println(\"Received :\" + v), e -> System.out.println(\"Error :\" + e),\n () -> System.out.println(\"Completed\"));\n }", "public static void fromArray() {\n Observable<String> myObservable = Observable.fromArray(Utils.getData().toArray(new String[0]));\n /*\n 1. Instead of providing a subscriber, single method can be provided just to get onNext().\n 2. Similarly 3 methods can be provided one for each onNext, onError, onCompleted.\n */\n myObservable.subscribe(value -> System.out.println(\"output = \" + value));\n }", "@Override\n public Observable<UserLoggedEntity> get() {\n return Observable.create(subscriber -> {\n\n Realm realm = Realm.getInstance(realmConfiguration);\n RealmResults<UserLoggedEntity> result = realm.where(UserLoggedEntity.class).findAll();\n result.load();\n\n for (UserLoggedEntity userLoggedEntity : result) {\n if (userLoggedEntity != null) {\n subscriber.onNext(userLoggedEntity);\n subscriber.onComplete();\n } else {\n subscriber.onError(new UserLoggedNotFoundException());\n }\n }\n realm.close();\n });\n }", "@Override\r\n\tpublic void update(Observable o, Object data) {\r\n\t\t//Check if data is coming from Eclipse MQTT broker\r\n\t\tif(o.equals(mqttConn)) {\r\n\t\t\tif(((String[]) data)[0].equals(subscribeTopic)) {\r\n\t\t\t\tpd = DataUtil.jsonToPitchData(((String[]) data)[1], true);\r\n\t\t\t\t_Logger.info(\"Gateway device:\\nNew pitch reading received:\" + pd);\r\n\t\t\t\tubidotsApi.sendPitchValue((double) pd.getCurValue());\r\n\t\t\t\t\r\n\t\t\t\tif((pd.getCurValue() <= minPitch) && oneShot) {\r\n\t\t\t\t\tsmtpConn.sendMail(\"tampubolon.d@husky.neu.edu\", \"ALERT: Water Level\", \"Water level has fallen below the minimum!\");\r\n\t\t\t\t\toneShot = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if(((String[]) data)[0].equals(subscribeTopic2)) {\r\n\t\t\t\tsd = DataUtil.jsonToSensorData(((String[]) data)[1], true);\r\n\t\t\t\t_Logger.info(\"Gateway device:\\nNew Temperature reading received\" + sd);\r\n\t\t\t\tubidotsApi.sendTempValue((double) sd.getCurValue());\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t//Check if data is coming from Ubidots MQTT broker\r\n\t\telse if(o.equals(ubidotsMqtt)) {\r\n\t\t\tint valveData = Integer.parseInt(((String[]) data)[1]);\r\n\t\t\tif(valveData != ledON) {\r\n\t\t\t\tledON = valveData;\r\n\t\t\t\tmqttConn.publish(publishTopic, 2, String.valueOf(ledON));\r\n\t\t\t\t\r\n\t\t\t\tif(ledON==1) {\r\n\t\t\t\t\tSystem.out.println(\"Turning ON Valve(LED)...\\n\");\r\n\t\t\t\t}\r\n\t\t\t\telse if(ledON==0) {\r\n\t\t\t\t\toneShot = true;\r\n\t\t\t\t\tSystem.out.println(\"Turning OFF Valve(LED)...\\n\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public SensorData getData(String sensorId){\n return sensors.getData(sensorId);\n }", "public interface Observer {\n @GET(\"/?q=simpsons+characters&format=json\")\n Observable<Model> fetchData();\n\n}", "public interface FcmReceiverData {\n /**\n * @return return the new instance observable after applying doOnNext operator.\n */\n Observable<Message> onNotification(Observable<Message> oMessage);\n}", "public void subscribe( Observer< S, Info > obs );", "public static Observable<String> getObservableFiltered() {\n return observableSrc;//todo\n }", "public List<SensorObject> getSensorData(){\n\t\t\n\t\t//Cleaning all the information stored\n\t\tthis.sensorData.clear();\n\t\t\n\t\t//Getting the information from the keyboard listener\n\t\tif(keyboardListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.keyboardListener.getKeyboardEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.keyboardListener.getKeyboardEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.keyboardListener.clearEvents();\n\t\t}\n\t\t//Getting the information from the mouse listener\n\t\tif(mouseListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.mouseListener.getMouseEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.mouseListener.getMouseEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.mouseListener.clearEvents();\n\t\t}\n\t\t//Getting the information from the mouse motion listener\n\t\tif(mouseMotionListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.mouseMotionListener.getMouseMotionEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.mouseMotionListener.getMouseMotionEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.mouseMotionListener.clearEvents();\n\t\t}\n\t\t//Getting the information from the mouse wheel listener\n\t\tif(mouseWheelListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.mouseWheelListener.getMouseWheelEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.mouseWheelListener.getMouseWheelEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.mouseWheelListener.clearEvents();\n\t\t}\n\t\t\n\t\t//If we want to write a JSON file with the data\n\t\tif(Boolean.parseBoolean(this.configuration.get(artie.sensor.common.enums.ConfigurationEnum.SENSOR_FILE_REGISTRATION.toString()))){\n\t\t\tthis.writeDataToFile();\n\t\t}\n\t\t\n\t\treturn this.sensorData;\n\t}", "Observable<SubscribeRequest> getSubscribeRequestStream();", "Sensor getSensor();", "@Override\n\tpublic void update(Observable observable, Object data) {\n\n\t}", "public T getData() {\n return mData;\n }", "public Observable getObservable() {\n\t\treturn null;\r\n\t}", "T getData() {\n return this.data;\n }", "public final <T> Observable<T> mo129852e() {\n if (this instanceof FuseToObservable) {\n return ((FuseToObservable) this).aT_();\n }\n return RxJavaPlugins.m148463a(new CompletableToObservable(this));\n }", "public Observable()\n {\n observers = new HashSet<>();\n }", "public Observable<Todo> getTodos() {\n return mTodoServices.getTodos();\n }", "private void test() {\n Observable<String> observable = Observable.create(new ObservableOnSubscribe<String>() {\n\n @Override\n public void subscribe(ObservableEmitter<String> e) throws Exception {\n e.onNext(\"hello\");\n e.onNext(\"RXJAVA\");\n e.onComplete();\n }\n }).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread());\n\n Observer<String> observer = new Observer<String>() {\n @Override\n public void onSubscribe(Disposable d) {\n Log.d(TAG, \"onSubscribe\");\n }\n\n @Override\n public void onNext(String s) {\n Log.d(TAG, \"onNext:\" + s);\n }\n\n @Override\n public void onError(Throwable e) {\n Log.d(TAG, \"onError\");\n }\n\n @Override\n public void onComplete() {\n Log.d(TAG, \"onComplete\");\n }\n };\n observable.subscribe(observer);\n }", "interface NewsDataStore {\n\n /**\n * Get an {@link Observable} which will emit a List of {@link NewsEntity}.\n */\n Single<List<NewsEntity>> news();\n\n}", "@Override\n public void onSensorChanged(SensorEvent event) {\n if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {\n // Send data to phone\n if (count == 5) {\n count = 0;\n// Log.d(\"hudwear\", \"send accel data to mobile...\"\n// + \"\\nx-axis: \" + event.values[0]\n// + \"\\ny-axis: \" + event.values[1]\n// + \"\\nz-axis: \" + event.values[2]\n// );\n// Log.d(\"hudwear\", \"starting new task.\");\n\n if (connected)\n Log.d(\"atest\", \"values: \" + event.values[0] + \", \" + event.values[1] + \", \" + event.values[2]);\n// new DataTask().execute(new Float[]{event.values[0], event.values[1], event.values[2]});\n }\n else count++;\n }\n }", "public LiveData<DataEntry> getData() {\n return data;\n }", "public static Observable<Long> getObservableTakeWhile() {\n return observableIntervalSrc;//todo\n }", "@Override\n public void update(Observable observable, Object data) {\n Toast.makeText(this, \"I am notified\" + myBase.getObserver().getValue(), 0).show();\n btn.setText(\"value: \" + myBase.getObserver().getValue());\n\n }", "public T getData() {\r\n return data;\r\n }", "DeviceSensor createDeviceSensor();", "public interface SensorData {\n String toString();\n}", "@Override\r\n public Subscription onSubscribe(final Observer<? super String> observer) {\n final Thread t = new Thread(new Runnable() {\r\n @Override\r\n public void run() {\r\n for (int i = 0; i < 75; i++) {\r\n observer.onNext(\"anotherValue_\" + i);\r\n }\r\n // After sending all values we complete the sequence\r\n observer.onCompleted();\r\n }\r\n });\r\n t.start();\r\n \r\n return new Subscription() {\r\n @Override\r\n public void unsubscribe() {\r\n // Ask the thread to stop doing work.\r\n // For this simple example it just interrupts.\r\n t.interrupt();\r\n }\r\n };\r\n }", "@Override\n public Object getData() {\n return devices;\n }", "private void test1() {\n Observable observable = Observable.create(new ObservableOnSubscribe<QuoteBean>() {\n @Override\n public void subscribe(ObservableEmitter<QuoteBean> e) throws Exception {\n e.onNext(Request.stringRequest(url, com.android.volley.Request.Method.GET, HomeActivity.class.getSimpleName()));\n }\n }).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread());\n\n Observer<QuoteBean> observer = new Observer<QuoteBean>() {\n @Override\n public void onSubscribe(Disposable d) {\n Log.d(TAG, \"test1 onSubscribe\");\n }\n\n @Override\n public void onNext(QuoteBean s) {\n Log.d(TAG, \"onNext:\" + s.toString());\n }\n\n @Override\n public void onError(Throwable e) {\n Log.d(TAG, \"onError\");\n }\n\n @Override\n public void onComplete() {\n Log.d(TAG, \"onComplete\");\n }\n };\n observable.subscribe(observer);\n }", "public static Observable<Long> getObservableTakeDuration() {\n return observableIntervalSrc;//todo\n }", "public SensorData() {\n\n\t}", "Observable<Config> observable();", "@Override\n\tprotected int getSensorData() {\n\t\treturn sensor.getLightValue();\n\t}", "T getData() {\n\t\treturn data;\n\t}", "public T getData() {\n return this.data;\n }", "@Override\n public ObservableSource<? extends String> call() throws Exception {\n SystemClock.sleep(2000);\n return Observable.just(\"one\", \"two\", \"three\", \"four\", \"five\");\n }", "public Observable getEvents(){\n QBRequestGetBuilder requestBuilder = new QBRequestGetBuilder();\n requestBuilder.sortDesc(\"startDate\");\n return makeObservable(requestBuilder);\n }", "Observable[] getObservables();", "public interface NotificationDataSource {\n Observable<List<Notification>> getNotifications();\n}", "public String getSensor()\n {\n return sensor;\n }", "public T getData(){\n return this.data;\n }", "public static Observable<String> getObservableDistinctUntilChanges() {\n return observableSrcDuplicated;//todo\n }", "public double getValue() {\n\t\treturn sensorval;\n\t}", "public double[] getData() {\n return data;\n }", "protected Sensor[] getSensorValues() { return sensors; }", "@Override\n public void onDataChanged(DataEventBuffer dataEvents) {\n\n Log.i(TAG, \"onDataChanged()\");\n\n for (DataEvent dataEvent : dataEvents) {\n if (dataEvent.getType() == DataEvent.TYPE_CHANGED) {\n DataItem dataItem = dataEvent.getDataItem();\n Uri uri = dataItem.getUri();\n String path = uri.getPath();\n\n if (path.startsWith(\"/sensors/\")) {\n if (SmartWatch.getInstance() != null) {\n SmartWatch.getInstance().unpackSensorData(DataMapItem.fromDataItem(dataItem).getDataMap());\n }\n }\n }\n }\n }", "public ObservableList<XYChart.Series<Number, Number>> getOutputData() {\n return outputData;\n }", "public PublishSubject<AuthenticateUserResponse> getAuthUserObservable() {\n return authUserResponseObservable;\n }", "public interface Observable<T> {\n /**\n * Sets the variable that is observable. Notifies its Observers of this change.\n *\n * @param t The value to set the observable variable to.\n */\n void set(T t);\n\n /**\n * Adds the given Observer to a collection of this observable. Observers added will be notified of changes.\n *\n * @param observer Object that is observing this Observable.\n */\n void addObserver(Observer observer);\n}", "public MovementData() {\n\t\tsensorData = new ArrayList<SensorReading>();\t\t\n\t\tthis.nextIndex = 0;\n\t\tthis.prevIndex = -1;\n\t}", "@Override\n public boolean subscribe(Task data) {\n return true;\n }", "Observable<T> getByName(String name);", "public Data getData() {\n return data;\n }", "public Data getData() {\n return data;\n }", "Observable<T> getById(String id);", "String getSensorDataPoint();", "public BaseObservable() {\n obs = new Vector<>();\n }", "public synchronized Object getData() {\n return data;\n }", "@Override\n public rx.Observable<CityWeather> getForecast(final String cityId) {\n return Observable.create(new Observable.OnSubscribe<CityWeather>() {\n @Override\n public void call(Subscriber<? super CityWeather> subscriber) {\n try {\n subscriber.onNext(getCityWeatherFromCityId(cityId));\n } catch (Exception e) {\n subscriber.onError(e);\n } finally {\n subscriber.onCompleted();\n }\n }\n });\n }", "public static void main(String[] args){\n Observable myObservable = Observable.create(new Observable.OnSubscribe(){\n\n @Override\n public void call(Object subscriber) {\n Subscriber mySubscriber = (Subscriber)subscriber;\n\n for(int i = 0 ; i < 10; i++){\n //if my subscriber was subscribed\n if(!mySubscriber.isUnsubscribed()){\n mySubscriber.onNext(\"Pushed value \" + i);\n }\n }\n\n if(!mySubscriber.isUnsubscribed()){\n mySubscriber.onCompleted();\n }\n\n }\n });\n\n //subscribe to your Observable\n myObservable.subscribe(new Action1<String>() {\n @Override\n public void call(String s) {\n System.out.println(s);\n }\n },\n new Action1<Throwable>() {\n @Override\n public void call(Throwable throwable) {\n System.out.println(\"Something went wrong the observable\");\n }\n },\n new Action0() {\n @Override\n public void call() {\n System.out.println(\"No more values will be pushed.\");\n }\n });\n\n }", "public IData getData() {\n return data;\n }", "@Override\n public Object getData() {\n return outputData;\n }", "Observable<List<T>> getAll();", "public static Observable<String> getObservableDistinct() {\n return observableSrcDuplicated;//todo\n }", "@java.lang.Override\n public godot.wire.Wire.Value getData() {\n return data_ == null ? godot.wire.Wire.Value.getDefaultInstance() : data_;\n }", "public T getData()\n\t{\n\t\treturn this.data;\n\t}", "public static void fromFuture() {\n ExecutorService executorService = Executors.newSingleThreadExecutor();\n Future<String> future = executorService.submit(() -> \"Response from future\");\n Observable<String> myObservable = Observable.fromFuture(future);\n myObservable.subscribe(genericObserver1);\n }", "public static void sample() {\n System.out.println(\"# 1\");\n Observable.fromIterable(sData)\n .timestamp()\n .sample(1000, TimeUnit.MICROSECONDS)\n .subscribe(new MyObserver<>());\n\n /*\n Emission controlled by sampler inner observable\n */\n System.out.println(\"# 2\");\n Observable.fromIterable(sData)\n .sample((observer) -> {\n System.out.println(\"emitter\");\n Observable.just(\"123\").subscribe(observer);\n }, true).subscribe(new MyObserver<>());\n }", "public String recvSensorData(){\n\t\tSystem.out.println(\"Waiting for sensor data!\");\n\t\ttry{\n\t\t\t// timer.scheduleAtFixedRate(new TimerTask() {\n\t\t\t// \t@Override\n\t\t\t// \tpublic void run() {\n\t\t\t// \t\tSystem.out.println(\"No response for sensor data\");\n\t\t\t// \t\tsendMsg(\"S\",\"PC2AR\");\n\t\t\t// \t}\n\t\t\t// }, 10*1000, 10*1000);\n\t\t\tString input = br.readLine();\n\t\t\tif (input != null && input.length() > 0){\n\t\t\t\tSystem.out.println(input);\n\t\t\t\t// timer.cancel();\n\t\t\t\treturn input;\n\t\t\t}\n\t\t} catch (IOException e){\n\t\t\tSystem.out.println(\"receive message --> IO Exception\");\n\t\t} catch (Exception e){\n\t\t\tSystem.out.println(\"receive message --> Exception\");\n\t\t}\n\n\t\treturn null;\n\t}", "void subscribe();", "@Override\n\t\t\tpublic void onSubscribe(Disposable arg0) {\n\t\t\t\t\n\t\t\t}", "ExternalSensor createExternalSensor();", "@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tlog.info(\"Se completa con éxito el observable\");\n\t\t\t\t\t}", "@GET\n Observable<WeatherInfo> getWeatherInfo(@Url String url);", "public Object getData() \n {\n return data;\n }", "static Observable<Integer> getDataAsync(int i) {\n return getDataSync(i).subscribeOn(Schedulers.io());\n }", "@Nonnull\r\n\tpublic static <T> Observable<T> never() {\r\n\t\treturn new Observable<T>() {\r\n\t\t\t@Override\r\n\t\t\t@Nonnull \r\n\t\t\tpublic Closeable register(@Nonnull Observer<? super T> observer) {\r\n\t\t\t\treturn Closeables.emptyCloseable();\r\n\t\t\t}\r\n\t\t};\r\n\t}", "public void observaleJust() {\n\t\tObservable.just(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).subscribe(integerSubscribe());\r\n\t}", "private interface Observable{\n void registerObserver(Observer observer);\n void removeObserver(Observer observer);\n void updateScore(String score);\n void notifyObservers();\n void notifyObservers(String errorMessage);\n }", "public interface StudentDataSource {\n\n Observable<Student> getStudent(@NonNull String name);\n\n Single<List<Student>> getStudents();\n\n void saveStudent(@NonNull Student student);\n\n}", "public Single<Double> rxEvaluate() { \n return new io.vertx.reactivex.core.impl.AsyncResultSingle<Double>(handler -> {\n evaluate(handler);\n });\n }", "@Override\n public byte[] getValue() {\n return MetricUtils.concat2(topologyId, getTag(), sampleRate).getBytes();\n }", "public Observable<DataEncoding[]> getDataEncodings() {\r\n\t\treturn mzDbReader.observeJobExecution( connection -> {\r\n\t\t\treturn this.getDataEncodings(connection);\r\n\t\t});\r\n\t}", "public Observable<Map<Long, DataEncoding>> getDataEncodingBySpectrumId() {\r\n\t\treturn mzDbReader.observeJobExecution( connection -> {\r\n\t\t\treturn this.getDataEncodingBySpectrumId(connection);\r\n\t\t});\r\n\t}", "public Observable<ProximaxDataModel> createData(UploadParameter uploadParam) {\n checkParameter(uploadParam != null, \"uploadParam is required\");\n\n if (uploadParam.getData() instanceof AbstractByteStreamParameterData) { // when byte stream upload\n return uploadByteStream(uploadParam, (AbstractByteStreamParameterData) uploadParam.getData());\n } else if (uploadParam.getData() instanceof PathParameterData) { // when path upload\n return uploadPath((PathParameterData) uploadParam.getData());\n } else { // when unknown data\n throw new UploadParameterDataNotSupportedException(String.format(\"Uploading of %s is not supported\",\n uploadParam.getData().getClass().getName()));\n }\n }", "@Override\n\tpublic void onRxDataArray(String name, Matrix data) {\n\t\t\n\t}", "public interface DataObserver {\n }", "public T getData()\n\t{ \treturn this.data; }", "public Observable<Integer> volumeLevelObservable() {\n final AudioManager audioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);\n return Observable.<Integer>fromEmitter(emitter -> {\n final int maxVolume = audioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC);\n\n final ContentObserver volumeObserver = new ContentObserver(new Handler()) {\n @Override\n public void onChange(boolean selfChange) {\n super.onChange(selfChange);\n final int currentVolume = audioManager.getStreamVolume(AudioManager.STREAM_MUSIC);\n emitter.onNext(getVolumeLevelPercent(currentVolume, maxVolume));\n }\n };\n\n mContext.getContentResolver().registerContentObserver(\n Settings.System.CONTENT_URI, true, volumeObserver);\n\n emitter.setCancellation(() -> {\n mContext.getContentResolver().unregisterContentObserver(volumeObserver);\n });\n\n final int currentVolume = audioManager.getStreamVolume(AudioManager.STREAM_MUSIC);\n emitter.onNext(getVolumeLevelPercent(currentVolume, maxVolume));\n }, Emitter.BackpressureMode.DROP)\n .distinctUntilChanged();\n }", "@Override\n public void onSubscribe(Disposable d) {\n }" ]
[ "0.61897516", "0.6001808", "0.5798381", "0.56807405", "0.5595029", "0.55007076", "0.5447962", "0.54350656", "0.54190654", "0.54043", "0.5398198", "0.53955424", "0.53590024", "0.5313398", "0.5274066", "0.5257516", "0.52337396", "0.52328485", "0.5225538", "0.5221897", "0.52186", "0.52151775", "0.5196473", "0.51765835", "0.5154973", "0.51364094", "0.5116585", "0.5115865", "0.51090753", "0.5105591", "0.5102026", "0.5093167", "0.50749356", "0.5053731", "0.5045739", "0.5044662", "0.5044021", "0.50413704", "0.50407356", "0.5035934", "0.5020411", "0.501497", "0.5012796", "0.5004965", "0.49964562", "0.49909306", "0.49873203", "0.49748003", "0.49725366", "0.49662498", "0.49603108", "0.49561924", "0.49560416", "0.49555683", "0.49484324", "0.49404007", "0.49318346", "0.49297634", "0.49190718", "0.49089876", "0.48964706", "0.4892901", "0.4891692", "0.4891692", "0.48893258", "0.4889245", "0.4876937", "0.48691368", "0.48647198", "0.48612574", "0.4855043", "0.48440412", "0.48385453", "0.4838105", "0.48268923", "0.48259607", "0.48254275", "0.48249036", "0.4822892", "0.48226973", "0.4817938", "0.4814634", "0.48020756", "0.4791697", "0.4788955", "0.47859898", "0.47762966", "0.4775603", "0.4775018", "0.4764775", "0.47582918", "0.47516337", "0.47461998", "0.4745859", "0.47450748", "0.47390598", "0.4736935", "0.47348994", "0.4722678", "0.4715876" ]
0.644547
0
Adds the given sample.
public synchronized void add(DataTypeDoubleArray sample) { samples.add(sample); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addSample(Point punto) {\n\t\tthis.punti.add(punto); //non gestisco il ritorno booleano di add volutamente,\n\t\t//semplicemente non sono accettati valori duplicati poichè da quelli \n\t\t//non si otterrebbe una funzione\n\t}", "org.hl7.fhir.SampledData addNewValueSampledData();", "public DataResourceBuilder _sample_(Resource _sample_) {\n this.dataResourceImpl.getSample().add(_sample_);\n return this;\n }", "private void addSampleData() {\r\n }", "public void addSample(int note, String fileName, double startMs, double endMs, double gain) {\n\t\tif (type != InstrumentType.SAMPLE_BANK) {\n\t\t\tthrow new RuntimeException(\"Can't add samples to \" + type + \" instrument\");\n\t\t}\n\t\tsampleMap.put(note, new SampleInfo(note, fileName, startMs, endMs, gain));\n\t}", "public void addSample(int note, String fileName, double gain) {\n\t\taddSample(note, fileName, -1, -1, gain);\n\t}", "public void addSample(double value){\n num_samples += 1;\n signal = signal*damping + value;\n }", "public void addSample(int note, String fileName) {\n\t\taddSample(note, fileName, -1, -1, 1.0);\n\t}", "public void add(DataSample ds) {\n \tfloat dsAverage = 1.0f;\n \tDataSample s;\n \tfor (int i = 0; i < samples.size(); ++i) {\n \t\ts = samples.get(i);\n \t\tfloat v = averages.get(i);\n \t\tfloat t = compare(s, ds);\n \t\t\n \t\tv += t;\n \t\tdsAverage += t;\n \t\t\n \t\taverages.set(i, v);\n \t}\n \t\n \taverages.add(dsAverage);\n \tsamples.add(ds);\n }", "public void insertNextSample( byte[] buffer, int byteOffset );", "public synchronized void addSample( TimedVariable tv )\n\t{\n\t\tint sz = vars.size();\n\t\tint idx = 0;\n\t\tif (sz > 0)\n\t\t{\n\t\t\tidx = Collections.binarySearch(vars, tv, tvComparator);\n\n\t\t\t// If same time stamp, replace old value.\n\t\t\tif (idx >= 0)\n\t\t\t{\n\t\t\t\tvars.set(idx, tv);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tidx = (-idx) - 1;\n\t\t}\n\t\tvars.add(idx, tv);\n\t}", "public void addSample(int note, String fileName, double startMs, double endMs) {\n\t\taddSample(note, fileName, startMs, endMs, 1.0);\n\t}", "public void addSample( final double value ) {\n\t\tfinal double weight = getWeight( ++_population );\n\t\t_mean = weight * value + ( 1 - weight ) * _mean;\n\t\t_meanSquare = weight * value * value + ( 1 - weight ) * _meanSquare;\n\t}", "void update_sample(int new_sample) {\n\t sample_choice = new_sample;\n\t combine_message_and_sample();\n\t update_content();\n }", "private void sampleAndUpdate(int[] profileToSample, GameObserver gameObs) {\n double[] samplePayoffs = gameObs.getSample(profileToSample);\n eGame.addSample(profileToSample, samplePayoffs);\n deviationTestOrder.update(profileToSample, samplePayoffs);\n }", "public T add(T measure);", "public void addSample(RankingSubject subject, RankingObject a, RankingObject b) {\n\t\tRealVector merged = subject.getFeatures().append(a.getFeatures()).append(b.getFeatures());\n\t\tthis.set.add(merged, +1.0);\n\t\tmerged = subject.getFeatures().append(b.getFeatures()).append(a.getFeatures());\n\t\tthis.set.add(merged, -1.0);\n\t}", "public void insertNextSamples( byte[] buffer, int byteOffset, int nSamples )\n throws IndexOutOfBoundsException;", "private void addStudy(Study study) {\n\t\t\r\n\t}", "@Override\n public SampleResult sample(Entry e) {\n return sample();\n }", "@Override\n public SampleResult sample(Entry e) {\n return sample();\n }", "public void AddSample(Sample s, int max_num, int dim) {\n\t\t\n\t\tif(sample_map.contains(s) == true) {\n\t\t\t// sample already exists\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tLinkSample ptr = k_closest;\n\t\tLinkSample prev_ptr = null;\n\t\t\n\t\twhile(ptr != null) {\n\t\t\tif(ptr.dim_weight > s.class_weight[dim]) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tprev_ptr = ptr;\n\t\t\tptr = ptr.next_ptr;\n\t\t}\n\t\t\n\t\tif(prev_ptr == null) {\n\t\t\tif(sample_map.size() >= max_num) {\n\t\t\t\t// no room left\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tprev_ptr = k_closest;\n\t\t\tk_closest = new LinkSample();\n\t\t\tk_closest.dim_weight = s.class_weight[dim];\n\t\t\tk_closest.s = s;\n\t\t\tk_closest.next_ptr = prev_ptr;\n\t\t\tsample_map.add(s);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tLinkSample next_ptr = prev_ptr.next_ptr;\n\t\tprev_ptr.next_ptr = new LinkSample();\n\t\tprev_ptr.next_ptr.s = s;\n\t\tprev_ptr.next_ptr.dim_weight = s.class_weight[dim];\n\t\tprev_ptr.next_ptr.next_ptr = next_ptr;\n\t\tsample_map.add(s);\n\t\t\n\t\tif(sample_map.size() >= max_num) {\n\t\t\t// no room left - remove the lowest\n\t\t\tsample_map.remove(k_closest.s);\n\t\t\tk_closest = k_closest.next_ptr;\n\t\t}\n\t}", "@Override public void createSample(Sample sample)\n {\n try\n {\n clientDoctor.createSample(sample);\n }\n catch (RemoteException e)\n {\n throw new RuntimeException(\"Error while creating sample. Please try again.\");\n }\n }", "public DataResourceBuilder _sample_(List<Resource> _sample_) {\n this.dataResourceImpl.setSample(_sample_);\n return this;\n }", "public void add(Double addedAmount) {\n }", "public <T> void createArray(T sample){\n ArrayList<T> list = new ArrayList<T>();\n list.add(sample);\n }", "private void process(double sample)\r\n {\n System.arraycopy(samples, 0, samples, 1, sampleSize - 1);\r\n samples[0] = sample;\r\n\r\n currentValue = AnalysisUtil.rms(samples);\r\n }", "public void addRandomItem(RandomItem item);", "public void addSampleToDB(Sample sensorSample, String TABLE_NAME) {\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(\"timestamp\", sensorSample.getTimestamp());\n values.put(\"x_val\", sensorSample.getX());\n values.put(\"y_val\", sensorSample.getY());\n values.put(\"z_val\", sensorSample.getZ());\n db.insert(TABLE_NAME, null, values);\n db.close();\n }", "public void updateSamples();", "public void addConclusionNumber(Sample sample) {\n\t\tif(sample.getConclusionCase()==0) {\n\t\t\tconclusionNumbers1.addAll(sample.getSampleNumber());\n\t\t}\n\t\telse {\n\t\t\tconclusionNumbers2.addAll(sample.getSampleNumber());\n\t\t}\n\t}", "public void add(double sthis, Vec vthat, double sthat);", "void add(Point point) {\n\t\tpoints[posit]=point;\n\t\tposit++;\n\t\t//if method add is applied, size should also change\n\t\tsize++;\n\t}", "public void addPoints(int point){\n\t\tthis.points += point;\n\t}", "public void addExample(final IWiktionaryExample example) {\n\t\tif (examples == null)\n\t\t\texamples = new ArrayList<>();\n\t\texamples.add(example);\n\t}", "public void addExample(Example e){\n\t\tclassIndex(e.getLabel().bestClassName()).add(e);\n\t\tfor(Iterator<Feature> j=e.featureIterator();j.hasNext();){\n\t\t\tFeature f=j.next();\n\t\t\tfeatureIndex(f).add(e);\n\t\t\tsumFeatureValues++;\n\t\t}\n\t\texampleCount++;\n\t}", "public void add(double newValue) {\n this.count++;\n this.average = this.average * (this.count - 1) / this.count + newValue/this.count;\n }", "public synchronized void addData(Object[] data) throws IOException {\n\t\tif (! stopped){\n\t\t\tsampleCount.add(incr);\n\t\t\tString sampleCountString = sampleCount.toString();\n\t\t\trealWriter.write(sampleCountString + \";\" + ((Integer)data[0]).toString() + \"\\n\");\n\n//\t\t\tdos.writeChars(sampleCountString);\n//\t\t\tdos.writeChar(';' );\n//\t\t\tdos.writeChars((((Integer)data[0]).toString()));\n//\t\t\tdos.writeChar('\\n' );\n\t\t}\n\t}", "public abstract double sample();", "public void addData(DataPoint point)\n {\n data.add(point);\n }", "public void addStudent(Student student) {\n\t\t\r\n\t}", "@Override\n public void onAudioSamples(IAudioSamplesEvent event) {\n\n /*\n * -----------------------------------------------------------------------------------\n * !!! LAB EXERCISE !!!\n * -----------------------------------------------------------------------------------\n * 1. Create a 'ShortBuffer' and point it to the incoming audio samples.\n * Hint: Use 'event.getAudioSamples().getByteBuffer().asShortBuffer()'\n *\n * 2. Loop over the buffer values from 0 to 'buffer.limit()' and access each buffer\n * value using 'buffer.get'\n * Hint: 'buffer.get' gets the sample values as a 'short'\n *\n * 3. Multiply each buffer value by the 'multiplier' (which is a double) then place the\n * resultant value back into the buffer using 'buffer.put'\n * Hint: You may need to cast the data to a 'short' value\n */\n\n // ===================================================================================\n // *** YOUR CODE HERE ***\n ShortBuffer buffer = event.getAudioSamples().getByteBuffer().asShortBuffer();\n\n for (int i = 0; i < buffer.limit(); ++i)\n {\n buffer.put((short)(buffer.get(i) * this.multiplier));\n }\n // ===================================================================================\n\n // Finally, pass the adjusted event to the next tool\n super.onAudioSamples(event);\n }", "public void add(int index, double value) {\n\t\t\n\t}", "public void addValue(double newValue) {\n\t\tdouble delta = newValue - mean;\n\t\tn += 1;\n\t\tmean += delta / n;\n\t\ts += delta * (newValue - mean);\n\t}", "int nextSample(final double mean);", "public void add(double weight) {\n this.weights.add(weight);\n // flip the flag to accept query operator\n this.acceptWeight = false;\n }", "public void addPoint() {\n points += 1;\n }", "public void addPoint(double[] point);", "public static RuntimeValue add(RuntimeValue left, RuntimeValue right) throws RuntimeException {\n if (isDiscreteIntSamples(left, right)) {\n return new RuntimeValue(\n RuntimeValue.Type.DISCRETE_INT_SAMPLE,\n Operators.addIntegers(left.getDiscreteIntSample(), right.getDiscreteIntSample())\n );\n }\n\n if (isDiscreteFloatSamples(left, right)) {\n return new RuntimeValue(\n RuntimeValue.Type.DISCRETE_FLOAT_SAMPLE,\n Operators.addFloats(left.getDiscreteFloatSample(), right.getDiscreteFloatSample())\n );\n }\n\n if (isDiscreteFloatSample(left) && hasSingleValue(left.getDiscreteFloatSample()) && isContinuousSample(right)) {\n return new RuntimeValue(\n RuntimeValue.Type.CONTINUOUS_SAMPLE,\n right.getContinuousSample().add(left.getDiscreteFloatSample().single())\n );\n }\n\n if (isDiscreteFloatSample(right) && hasSingleValue(right.getDiscreteFloatSample()) && isContinuousSample(left)) {\n return new RuntimeValue(\n RuntimeValue.Type.CONTINUOUS_SAMPLE,\n left.getContinuousSample().add(right.getDiscreteFloatSample().single())\n );\n }\n\n throw new RuntimeException(\"Adding incompatible types\");\n }", "double sample();", "public void setConstantSamples(String sourceEntry);", "public final Object getSample()\n { return(this.sample); }", "public void addStudent(String theStudent) {\n\t\tstudents[numberOfStudents] = theStudent;\n\t\tnumberOfStudents++; // Upadate the total number of students\n\t}", "private static void add(List<Point> points, int param, double value, boolean measured) {\r\n points.add(new Point(param, value, measured));\r\n }", "public void setSampleId(java.lang.String value) {\n this.sampleId = value;\n }", "org.hl7.fhir.ResourceReference addNewSpecimen();", "public void accumulate(IntValuePixel p) {\r\n\t\tsize++;\r\n\r\n\t\tfor (final ComponentFeature f : features) {\r\n\t\t\tf.addSample(p);\r\n\t\t}\r\n\t}", "public void addPoints(int addP){\n this.points += addP;\n }", "public void setSamples(List<Sample> samples)\n {\n this.samples = samples;\n }", "public void addInterest() {}", "public void addStudent(Student student) {\n students.add(student);\n }", "public abstract void add(T input);", "public void addGold(int goldToAdd)\n\t{\n\t\tgold += goldToAdd;\n\t}", "private void add() {\n\n\t}", "@Test\n\tpublic void addStudentTest() {\n\t\tint numberOfStudents = student.getNumberOfStudents();\n\n\t\t// add a new student\n\t\tstudent.newStudent();\n\n\t\t// expected number of students after adding a new student\n\t\tint expected = numberOfStudents++;\n\n\t\t// actual number of students\n\t\tint actual = student.getNumberOfStudents();\t\t\n\t\tassertEquals(expected, actual);\n\t}", "public void add(int add) {\r\n value += add;\r\n }", "public void add(MeasurementItem mi)\r\n {\r\n if(this.measurementItems==null) this.measurementItems=new ArrayList();\r\n measurementItems.add(mi);\r\n \r\n itemsQuantity=(measurementItems!=null)?measurementItems.size():0;\r\n }", "public void addRating(double points) {\n rating += points;\n }", "private void add(EResource resource) {\n switch (resource) {\n case BRICK:\n brick++;\n break;\n case GRAIN:\n grain++;\n break;\n case LUMBER:\n lumber++;\n break;\n case ORE:\n ore++;\n break;\n case WOOL:\n wool++;\n break;\n }\n }", "void add(Note note);", "void addMeasure(double currentMeasure) {\n\t\t// If there is no more failed allowed, do nothing\n\t\tif(isTraining()) {\n\t\t\t/* Repeat 4x times from the second time\n\t\t\t * What we do is add:\n\t\t\t * (measure 3 - measure 2) + (measure 4 - measure 3) + ... */\n\t\t\tif(1 <= remainingLearnExample && remainingLearnExample <= 4)\n\t\t\t\tappendMeasureToSlope(currentMeasure);\n\t\t\t/* We need to keep the current measure for the next time\n\t\t\t * the method is called */\n\t\t\tlastMeasure = currentMeasure;\n\n\t\t\tremainingLearnExample--;\n\t\t\tif(remainingLearnExample == 0) {\n\t\t\t\t// If the random freq gave better results, keep it\n\t\t\t\tupdateBestFrequency();\n\t\t\t\trandomExploFreq = random.nextDouble(0.01, 1);\n\t\t\t\treset();\n\t\t\t}\n\t\t}\n\t}", "public void addToPrimitive(int add) {\n primitiveCounter += add;\n }", "@Override\n public void addStudent(Student student) {}", "void addFeature(int index, Feature feature);", "public void setSampleType(String sampleType) {\n this.sampleType = sampleType;\n }", "public void add(T item) {\n\t\tcounts.put(item, counts.getOrDefault(item, 0) + 1);\n\t}", "@Override\r\n\tpublic int add() {\n\t\treturn 0;\r\n\t}", "public double getNextRawSample();", "public void classify(Sample sample, String classificationName) {\n classifiedSamples.add(sample);\n SampleClassification classification = getClassification(classificationName);\n sampleClassificationMap.put(sample, classification);\n }", "private static void sample2(ScoredDocIDs collection, int collectionSize, int[] sample, long[] times) \n throws IOException {\n if (returnTimings) {\n times[0] = System.currentTimeMillis();\n }\n int sampleSize = sample.length;\n IntPriorityQueue pq = new IntPriorityQueue(sampleSize);\n /*\n * Convert every value in the collection to a hashed \"weight\" value, and insert\n * into a bounded PQ (retains only sampleSize highest weights).\n */\n ScoredDocIDsIterator it = collection.iterator();\n while (it.next()) {\n pq.insertWithReuse((int)(it.getDocID() * PHI_32) & 0x7FFFFFFF);\n }\n if (returnTimings) {\n times[1] = System.currentTimeMillis();\n }\n /*\n * Extract heap, convert weights back to original values, and return as integers.\n */\n Object[] heap = pq.getHeap();\n for (int si = 0; si < sampleSize; si++) {\n sample[si] = (int)(((IntPriorityQueue.MI)(heap[si+1])).value * PHI_32I) & 0x7FFFFFFF;\n }\n if (returnTimings) {\n times[2] = System.currentTimeMillis();\n }\n }", "@Override\n\tpublic void addToSamples(short[] data) throws SoundOverflowException {\n\t\tfor (int i = 0; i < data.length; ++i) {\n\t\t\tdouble scale = 1.0;\n\t\t\tif (i < RAMPUP_SAMPLES) {\n\t\t\t\tscale = (double) i / (double) RAMPUP_SAMPLES;\n\t\t\t}\n\t\t\telse if (i > data.length - RAMPUP_SAMPLES) {\n\t\t\t\tscale = (double) (data.length - i) / (double) RAMPUP_SAMPLES;\n\t\t\t}\n\n\t\t\tdouble v = compute(i) * scale * amplitude;\n\t\t\t\n\t\t\tif (Short.MAX_VALUE - v < data[i]) { \n\t\t\t\tthrow new SoundOverflowException();\n\t\t\t}\n\t\t\t\n\t\t\tif (Short.MIN_VALUE + v > data[i]) {\n\t\t\t\tthrow new SoundOverflowException();\n\t\t\t}\n\t\t\tdata[i] += Math.round(v);\n\t\t}\n\t}", "public void insertItem(Object inputObj, Object testObj) {\n\t\tthis.insertItem(inputObj);\n\n\t}", "public void add(Scenario object) {\n original.add(object);\n filtered.add(object);\n notifyDataSetChanged();\n }", "public void add(int index, float x, float y) {\n\t\tpoints.add(index, new GPoint(x, y));\n\t}", "public void testAdd() {\r\n Object[] objects = new String[OPERATIONS];\r\n\r\n for (int i = 0; i < OPERATIONS; i++) {\r\n objects[i] = new String(\"stress\" + i);\r\n }\r\n\r\n //test add.\r\n long startTime = System.currentTimeMillis();\r\n\r\n for (int i = 0; i < OPERATIONS; i++) {\r\n target.add(objects[i]);\r\n }\r\n\r\n long endTime = System.currentTimeMillis();\r\n System.out.println(\"Stress tests ------ \" + \" add(Object) in \" + OPERATIONS + \" times in \" +\r\n Integer.toString((int) (endTime - startTime)) + \" ms\");\r\n\r\n //verify contains.\r\n Collection collection = new ArrayList();\r\n\r\n for (int i = 0; i < OPERATIONS; i++) {\r\n assertTrue(\"not contained.\", target.contains(objects[i]));\r\n collection.add(objects[i]);\r\n }\r\n\r\n assertTrue(\"The collection should be contained.\", target.containsAll(collection));\r\n }", "public void addInput(@Nonnull Source source) {\r\n source.init(this);\r\n inputs.add(source);\r\n }", "public void addSpec(int s) {\n totalSpec += s;\n }", "private void addStudent(Student student) {\n\t\tSystem.out.println(\"Add Student\");\n\t\tsmb.saveStudent(student);\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\n\tpublic int add() {\n\t\treturn 0;\n\t}", "public void add(int index, float x, float y, String label) {\n\t\tpoints.add(index, new GPoint(x, y, label));\n\t}", "public void add() {\n\t\t\n\t}", "static void perform_add(String passed){\n\t\tint type = type_of_add(passed);\n\t\tif(type==1)\n\t\t\tadd_with_reg(passed);\n\t\telse if(type==2)\n\t\t\tadd_with_mem(passed);\n\t}", "public void addExample(Object targetState, Object[] childStates) {\n if (isValueEmpty(targetState)) return;\r\n \r\n // Add one to examples and ensure the root value is accounted for\r\n int rootState = ensureValue(getRoot(), targetState);\r\n Info rootInfo = getRoot();\r\n double observations = rootInfo.countTable.get(rootState) + 1;\r\n rootInfo.countTable.set(rootState, observations); \r\n \r\n for (int i = 0; i < childStates.length; i++) {\r\n // Make sure the value is not empty, otherwise ignore it\r\n if (isValueEmpty(childStates[i])) continue;\r\n \r\n // Now add the value\r\n Tree.Node<Info> node = tree.getRoot().get(i);\r\n int state = ensureValue(node.getData(), childStates[i]);\r\n Info nodeInfo = node.getData();\r\n observations = nodeInfo.countTable.get(rootState, state) + 1;\r\n nodeInfo.countTable.set(rootState, state, observations);\r\n }\r\n }", "@Override\r\n\tpublic void add(float var) {\n\t\t\r\n\t}", "public static <T, U> Observable<T> sample(\r\n\t\t\tObservable<? extends T> source, \r\n\t\t\tObservable<? extends U> sampler) {\r\n\t\treturn new Sample.ByObservable<T, U>(source, sampler);\r\n\t}", "void addItem(DataRecord record);", "public void addIngredient(String ingredient){\n\t\t//Add an ingredient to the ingredientAdapter\n\t\tingredientAdapter.addIngredient(ingredient);\n\t}", "@Test\r\n\tpublic void testAddAllInt() {\r\n\t\tDoubleList sample = new DoubleList(new Munitions(2, 4, \"ferrum\"));\r\n\t\tsample.add(new Munitions(10, 5, \"ferrum\"));\r\n\t\tsample.addAll(1, list);\r\n\t\tAssert.assertEquals(17, sample.size());\r\n\t\tAssert.assertTrue(sample.get(0).equals(new Munitions(2, 4, \"ferrum\")));\r\n\t\tAssert.assertTrue(sample.get(1).equals(list.get(0)));\r\n\t\tAssert.assertTrue(sample.get(16).equals(new Munitions(10, 5, \"ferrum\")));\r\n\t}" ]
[ "0.6997913", "0.67705417", "0.67209166", "0.6696336", "0.6566614", "0.65041494", "0.6468048", "0.6435071", "0.63705945", "0.6206816", "0.6188262", "0.61753047", "0.60585034", "0.582431", "0.57499886", "0.57067406", "0.5645926", "0.55294245", "0.548634", "0.5425022", "0.5425022", "0.5386005", "0.5379807", "0.5351659", "0.53405106", "0.5318496", "0.5311269", "0.5289938", "0.5288115", "0.52868086", "0.51942855", "0.5187689", "0.51850617", "0.5159229", "0.5135803", "0.5102227", "0.5099023", "0.5092719", "0.5081022", "0.50791836", "0.50706464", "0.50509876", "0.50434786", "0.50385815", "0.50343466", "0.50316393", "0.5030905", "0.50280815", "0.5020687", "0.5011842", "0.5010419", "0.5005008", "0.4999347", "0.4990841", "0.49859798", "0.49701598", "0.49684957", "0.49628246", "0.49497756", "0.49468124", "0.494549", "0.49420282", "0.4925035", "0.49192297", "0.4909237", "0.4908406", "0.49057665", "0.49023497", "0.4901927", "0.48983246", "0.48932296", "0.48904648", "0.48872012", "0.4886601", "0.48836637", "0.4875074", "0.4862633", "0.48622832", "0.48604962", "0.4860278", "0.48533064", "0.4853194", "0.4849284", "0.4848315", "0.4846204", "0.4834748", "0.48295984", "0.48236933", "0.48216766", "0.48216766", "0.48216766", "0.48093882", "0.4803741", "0.4803229", "0.4802695", "0.48011371", "0.48003066", "0.47926804", "0.47920457", "0.4788819" ]
0.73007756
0
/ Currently we are indexing only Resources that represent collected records
public static <T extends DescriptiveData, A extends WithAdmin> Map<String, Object> basicTransformation(WithResource<T, A> rr) { JsonNode rr_json = Json.toJson(rr); ObjectNode idx_doc = Json.newObject(); Map<String, List<String>>lang_accumulators = new HashMap<String, List<String>>(); /* * Label */ JsonNode label = rr_json.get("descriptiveData").get("label"); idx_doc.put("label", label); if(label != null) { Iterator<Entry<String, JsonNode>> labels_it = label.fields(); ArrayNode all_labels = Json.newObject().arrayNode(); while(labels_it.hasNext()) { Entry<String, JsonNode> e = labels_it.next(); for(String v: (List<String>)Json.fromJson(e.getValue(), List.class)) { all_labels.add(v); } for(String v: (List<String>)Json.fromJson(e.getValue(), List.class)) { addToLangAll(lang_accumulators, e.getKey(), v); } } idx_doc.put("label_all", all_labels); } /* * Description */ JsonNode description = rr_json.get("descriptiveData").get("description"); idx_doc.put("description", description); if(description != null) { Iterator<Entry<String, JsonNode>> descs_it = description.fields(); ArrayNode all_descs = Json.newObject().arrayNode(); while(descs_it.hasNext()) { Entry<String, JsonNode> e = descs_it.next(); // ignore "def" and "unknown" language for(String v: (List<String>)Json.fromJson(e.getValue(), List.class)) { all_descs.add(v); } for(String v: (List<String>)Json.fromJson(e.getValue(), List.class)) { addToLangAll(lang_accumulators, e.getKey(), v); } } idx_doc.put("description_all", all_descs); } /* * Keywords */ JsonNode keywords = rr_json.get("descriptiveData").get("keywords"); idx_doc.put("keywords", keywords); if(keywords != null) { Iterator<Entry<String, JsonNode>> keywords_it = keywords.fields(); ArrayNode all_keywords = Json.newObject().arrayNode(); while(keywords_it.hasNext()) { Entry<String, JsonNode> e = keywords_it.next(); // ignore "def" and "unknown" language for(String v: (List<String>)Json.fromJson(e.getValue(), List.class)) { all_keywords.add(v); } for(String v: (List<String>)Json.fromJson(e.getValue(), List.class)) { addToLangAll(lang_accumulators, e.getKey(), v); } } idx_doc.put("keywords_all", all_keywords); } /* * AltLabels */ JsonNode altLabels = rr_json.get("descriptiveData").get("altLabels"); idx_doc.put("altLabels", altLabels); if(altLabels != null) { Iterator<Entry<String, JsonNode>> altLabels_it = altLabels.fields(); ArrayNode all_altLabels = Json.newObject().arrayNode(); while(altLabels_it.hasNext()) { Entry<String, JsonNode> e = altLabels_it.next(); // ignore "def" and "unknown" language for(String v: (List<String>)Json.fromJson(e.getValue(), List.class)) { all_altLabels.add(v); } for(String v: (List<String>)Json.fromJson(e.getValue(), List.class)) { addToLangAll(lang_accumulators, e.getKey(), v); } } idx_doc.put("altLabels_all", all_altLabels); } List<String> unknownValues = null; for(Entry<String, List<String>> e: lang_accumulators.entrySet()) { if(e.getKey().toLowerCase().matches("un(.*)")) { unknownValues = e.getValue(); } } for(Entry<String, List<String>> e: lang_accumulators.entrySet()) { if(e.getKey().toLowerCase().matches("un(.*)")) continue; if(unknownValues != null) e.getValue().addAll(unknownValues); JsonNode langs = Json.toJson(e.getValue()); idx_doc.put("_all_" + e.getKey(), langs); } ArrayNode dates = Json.newObject().arrayNode(); if(rr.getDescriptiveData().getDates() != null) { for(WithDate d: rr.getDescriptiveData().getDates()) { dates.add(d.getYear()); } idx_doc.put("dates", dates); } /* * User Rights structure in the document */ idx_doc.put("isPublic", rr.getAdministrative().getAccess().getIsPublic()); ObjectMapper aclMapper = new ObjectMapper(); SimpleModule module = new SimpleModule(); module.addSerializer(AccessEntry.class, new Serializer.AccessEntrySerializer()); aclMapper.registerModule(module); String aclString; try { aclString = aclMapper.writeValueAsString(rr.getAdministrative().getAccess().getAcl()); idx_doc.put("access", aclMapper.readTree(aclString)); } catch (JsonProcessingException e1) { // TODO Auto-generated catch block log.error("",e1); } catch (IOException e1) { // TODO Auto-generated catch block log.error("",e1); } /* * CollectedIn field */ //idx_doc.put("collectedIn", Json.toJson(rr.getCollectedIn())); /* * Add the username and email of the creator * NOT the dbId */ if(rr.getWithCreator() != null ) { idx_doc.put("creatorUsername", rr.getWithCreator().getUsername()); idx_doc.put("creatorEmail", rr.getWithCreator().getEmail()); } /* * Add more fields to the Json */ idx_doc.put("metadataRights", Json.toJson(rr.getDescriptiveData().getMetadataRights())); //idx_doc.put("isExhibition", Json.toJson(rr.getAdministrative().)); idx_doc.put("tags", Json.toJson(rr.getUsage().getTags())); idx_doc.put("isShownAt", Json.toJson(rr.getDescriptiveData().getIsShownAt())); if((rr.getProvenance() != null) && (rr.getProvenance().size() == 1)) { idx_doc.put("dataProvider", Json.toJson(rr.getProvenance().get(0).getProvider())); } if((rr.getProvenance() != null) && (rr.getProvenance().size() > 1)) { idx_doc.put("dataProvider", Json.toJson(rr.getProvenance().get(0).getProvider())); idx_doc.put("provider", Json.toJson(rr.getProvenance().get(1).getProvider())); } idx_doc.put("resourceType", rr_json.get("resourceType")); /* * Format and add Media structure * TODO Add all Media Objects!! */ ArrayNode media_objects = Json.newObject().arrayNode(); if( (rr.getMedia() != null) && !rr.getMedia().isEmpty() && (rr.getMedia().get(0)!=null) && (!rr.getMedia().get(0).isEmpty()) ) { // take care about all EmbeddedMediaObjects ObjectNode media = Json.newObject(); for(HashMap<MediaVersion, EmbeddedMediaObject> mediaobj: rr.getMedia()) { for(EmbeddedMediaObject emo: mediaobj.values()) { media.put("withRights", Json.toJson(emo.getWithRights())); //TODO: why withMediaType and not type, like in EmbeddedMedia? media.type media.put("type", Json.toJson(emo.getType())); media.put("originalRights", Json.toJson(emo.getOriginalRights())); //media.put("mimeType", Json.toJson(emo.getMimeType())); media.put("url", Json.toJson(emo.getUrl())); media.put("quality", Json.toJson(emo.getQuality())); media.put("width", emo.getWidth()); media.put("height", emo.getHeight()); /* * Eliminate null values from Media json structures */ ObjectNode media_copy = media.deepCopy(); Iterator<String> fieldNames = media_copy.fieldNames(); while(fieldNames.hasNext()) { String fName = fieldNames.next(); if(media_copy.get(fName).isNull() ) { media.remove(fName); } } media_objects.add(media); } } idx_doc.put("media", media_objects); } /* * Eliminate null values from the root document */ ObjectNode idx_copy = idx_doc.deepCopy(); Iterator<String> fieldNames = idx_copy.fieldNames(); while(fieldNames.hasNext()) { String fName = fieldNames.next(); if(idx_copy.get(fName).isNull() ) { idx_doc.remove(fName); } } ObjectMapper mapper = new ObjectMapper(); mapper.setSerializationInclusion(Include.NON_NULL); Map<String, Object> idx_map = mapper.convertValue(idx_doc, Map.class); return idx_map; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void indexPersistable() {\n searchIndexService.indexAllResourcesInCollectionSubTreeAsync(getPersistable());\n }", "private void collect() {\n\n System.out.println(\"Getting IndexReader...\");\n final IndexReader reader = index.reader();\n\n System.out.println(\"Calling forEachDocument()...\");\n index.forEachDocument(new DocTask() {\n\n int docsDone = 0;\n\n final int totalDocs = reader.maxDoc() - reader.numDeletedDocs();\n\n @Override\n public void perform(BlackLabIndex index, int docId) {\n Map<String, String> metadata = new HashMap<>();\n Document luceneDoc = index.luceneDoc(docId);\n for (IndexableField f: luceneDoc.getFields()) {\n // If this is a regular metadata field, not a control field\n if (!f.name().contains(\"#\")) {\n fieldNames.add(f.name());\n if (f.stringValue() != null)\n metadata.put(f.name(), f.stringValue());\n else if (f.numericValue() != null)\n metadata.put(f.name(), f.numericValue().toString());\n }\n }\n values.add(metadata);\n docsDone++;\n if (docsDone % 100 == 0) {\n int perc = docsDone * 100 / totalDocs;\n System.out.println(docsDone + \" docs exported (\" + perc + \"%)...\");\n }\n }\n });\n }", "private Map<String, IndicesAccessControl.IndexAccessControl> buildIndicesAccessControl(\n final String action,\n final Map<String, IndexResource> requestedResources,\n final int totalResourceCount,\n final FieldPermissionsCache fieldPermissionsCache\n ) {\n final Map<String, Set<FieldPermissions>> fieldPermissionsByIndex = Maps.newMapWithExpectedSize(totalResourceCount);\n final Map<String, DocumentLevelPermissions> roleQueriesByIndex = Maps.newMapWithExpectedSize(totalResourceCount);\n final Set<String> grantedResources = Sets.newHashSetWithExpectedSize(totalResourceCount);\n\n final boolean isMappingUpdateAction = isMappingUpdateAction(action);\n\n for (IndexResource resource : requestedResources.values()) {\n // true if ANY group covers the given index AND the given action\n boolean granted = false;\n\n final Collection<String> concreteIndices = resource.resolveConcreteIndices();\n for (Group group : groups) {\n // the group covers the given index OR the given index is a backing index and the group covers the parent data stream\n if (resource.checkIndex(group)) {\n if (group.checkAction(action)\n || (isMappingUpdateAction // for BWC reasons, mapping updates are exceptionally allowed for certain privileges on\n // indices and aliases (but not on data streams)\n && false == resource.isPartOfDataStream()\n && containsPrivilegeThatGrantsMappingUpdatesForBwc(group))) {\n granted = true;\n // propagate DLS and FLS permissions over the concrete indices\n for (String index : concreteIndices) {\n final Set<FieldPermissions> fieldPermissions = fieldPermissionsByIndex.compute(index, (k, existingSet) -> {\n if (existingSet == null) {\n // Most indices rely on the default (empty) field permissions object, so we optimize for that case\n // Using an immutable single item set is significantly faster because it avoids any of the hashing\n // and backing set creation.\n return Set.of(group.getFieldPermissions());\n } else if (existingSet.size() == 1) {\n FieldPermissions fp = group.getFieldPermissions();\n if (existingSet.contains(fp)) {\n return existingSet;\n }\n // This index doesn't have a single field permissions object, replace the singleton with a real Set\n final Set<FieldPermissions> hashSet = new HashSet<>(existingSet);\n hashSet.add(fp);\n return hashSet;\n } else {\n existingSet.add(group.getFieldPermissions());\n return existingSet;\n }\n });\n\n DocumentLevelPermissions docPermissions;\n if (group.hasQuery()) {\n docPermissions = roleQueriesByIndex.computeIfAbsent(index, (k) -> new DocumentLevelPermissions());\n docPermissions.addAll(group.getQuery());\n } else {\n // if more than one permission matches for a concrete index here and if\n // a single permission doesn't have a role query then DLS will not be\n // applied even when other permissions do have a role query\n docPermissions = DocumentLevelPermissions.ALLOW_ALL;\n // don't worry about what's already there - just overwrite it, it avoids doing a 2nd hash lookup.\n roleQueriesByIndex.put(index, docPermissions);\n }\n\n if (index.equals(resource.name) == false) {\n fieldPermissionsByIndex.put(resource.name, fieldPermissions);\n roleQueriesByIndex.put(resource.name, docPermissions);\n }\n }\n }\n }\n }\n\n if (granted) {\n grantedResources.add(resource.name);\n if (resource.canHaveBackingIndices()) {\n for (String concreteIndex : concreteIndices) {\n // If the name appear directly as part of the requested indices, it takes precedence over implicit access\n if (false == requestedResources.containsKey(concreteIndex)) {\n grantedResources.add(concreteIndex);\n }\n }\n }\n }\n }\n\n Map<String, IndicesAccessControl.IndexAccessControl> indexPermissions = Maps.newMapWithExpectedSize(grantedResources.size());\n for (String index : grantedResources) {\n final DocumentLevelPermissions permissions = roleQueriesByIndex.get(index);\n final DocumentPermissions documentPermissions;\n if (permissions != null && permissions.isAllowAll() == false) {\n documentPermissions = DocumentPermissions.filteredBy(permissions.queries);\n } else {\n documentPermissions = DocumentPermissions.allowAll();\n }\n final FieldPermissions fieldPermissions;\n final Set<FieldPermissions> indexFieldPermissions = fieldPermissionsByIndex.get(index);\n if (indexFieldPermissions != null && indexFieldPermissions.isEmpty() == false) {\n fieldPermissions = indexFieldPermissions.size() == 1\n ? indexFieldPermissions.iterator().next()\n : fieldPermissionsCache.union(indexFieldPermissions);\n } else {\n fieldPermissions = FieldPermissions.DEFAULT;\n }\n indexPermissions.put(index, new IndicesAccessControl.IndexAccessControl(fieldPermissions, documentPermissions));\n }\n return unmodifiableMap(indexPermissions);\n }", "public ServiceIndexesPerDateRecord() {\n super(ServiceIndexesPerDate.SERVICE_INDEXES_PER_DATE);\n }", "public boolean indexAllowed() {\r\n return true;\r\n }", "public interface Indexed {\n\n /**\n * index keyword and resource\n * @param resourceId keyword KAD id\n * @param entry published entry with keyword information\n * @param lastActivityTime current time from external system\n * @return percent of taken place in storage\n */\n int addKeyword(final KadId resourceId, final KadSearchEntry entry, long lastActivityTime);\n\n /**\n *\n * @param resourceId file KAD id\n * @param entry published entry with source information\n * @return true if source was indexed\n */\n int addSource(final KadId resourceId, final KadSearchEntry entry, long lastActivityTime);\n}", "public static String getAllRecords() {\n Log.i(CLASS_NAME, \"getAllRecords\");\n final String apiString = \"_search?pretty=true&q=*:*\";\n return ElasticRestClient.get(getIndex(), getType(), apiString, \"{ \\\"size\\\" : \\\"1000\\\"}\");\n }", "private IiconstraintIndexes() {\n\t\tsuper(\"iiconstraint_indexes\", org.jooq.util.ingres.ingres.$ingres.$INGRES);\n\t}", "public abstract void selectAllIndexes();", "@Override\n\tpublic void indexObject(ModelKey obj) throws ASException {\n\t\t\n\t}", "private void queryIndex() {\n if (predicate == TruePredicate.INSTANCE) {\n return;\n }\n\n // get indexes\n MapService mapService = nodeEngine.getService(SERVICE_NAME);\n MapServiceContext mapServiceContext = mapService.getMapServiceContext();\n Indexes indexes = mapServiceContext.getMapContainer(name).getIndexes();\n // optimize predicate\n QueryOptimizer queryOptimizer = mapServiceContext.getQueryOptimizer();\n predicate = queryOptimizer.optimize(predicate, indexes);\n\n Set<QueryableEntry> querySet = indexes.query(predicate);\n if (querySet == null) {\n return;\n }\n\n List<Data> keys = null;\n for (QueryableEntry e : querySet) {\n if (keys == null) {\n keys = new ArrayList<Data>(querySet.size());\n }\n keys.add(e.getKeyData());\n }\n\n hasIndex = true;\n keySet = keys == null ? Collections.<Data>emptySet() : InflatableSet.newBuilder(keys).build();\n }", "@Override\n public Class<ResourcesRecord> getRecordType() {\n return ResourcesRecord.class;\n }", "@Override\n\tpublic void indexObject(List<ModelKey> list) throws ASException {\n\t\t\n\t}", "public interface PermissionSearchRepository extends ElasticsearchRepository<Permission, Long> {\n}", "public boolean qualifyIndexName() {\n \t\treturn true;\n \t}", "protected CollectionResource currentResource() throws NotAuthorizedException, BadRequestException {\n return (CollectionResource) cursor.getResource();\n }", "public void testIndexCosts() {\n this.classHandler.applyIndexes();\n }", "public void addIndex(){\n\t\tdbCol=mdb.getCollection(\"genericCollection\");\n\t\tstart=Calendar.getInstance().getTimeInMillis();\n\t\tdbCol.ensureIndex(new BasicDBObject(\"RandomGeo\", \"2d\"));\n\t\tstop = Calendar.getInstance().getTimeInMillis() - start;\n\t\tSystem.out.println(\"Mongo Index Timer \"+Long.toString(stop));\n\t}", "public interface MedicalCaseSearchRepository extends ElasticsearchRepository<MedicalCase, Long> {\n}", "public static Result reindexAllResources() {\n\n\t\ttry {\n\t\t\tPromise<Boolean> p = Promise.promise(() -> ElasticReindexer.reindexAllDbDocuments());\n\t\t} catch(Exception e) {\n\t\t\tlog.error(e.getMessage(), e);\n\t\t\treturn internalServerError(e.getMessage());\n\t\t}\n\n\t\treturn ok();\n\t}", "public boolean createIndex_random(Hashtable<String, Hashtable<Integer,Quad>> ind_buffer){\n\t\tSet<String> keys = ind_buffer.keySet();\n\t\tHashtable<Integer,Quad> list;\n\t\tint part;\n\t\t\n\t\tint type_s, type_o, type1_s, type1_o;\n\t\tint o_bytes, s_bytes, o_bytes1, s_bytes1;\n\t\t\n\t\tString check = \"select resource, part, type_s, type_o, weight, o_bytes, s_bytes from `\"+table+\"` where \";\n\t\tResultSet rs = null;\n\t\tPreparedStatement prepstmt = null;\n\t\tQuad item;\n\t\tString res;\n\t\tfor(String key : keys){\n\t\t\tlist = ind_buffer.get(key);\n\t\t\tif(key.indexOf('\\'') != -1 )\n\t\t\t\tres = key.replaceAll(\"'\", \"''\");\n\t\t\telse\n\t\t\t\tres = key;\n\t\t\tfor(int i : list.keySet()){\n\t\t\t\titem = list.get(i);\n\t\t\t\ttype_s = item.type_s;\n\t\t\t\ttype_o = item.type_o;\n\t\t\t\t\n\t\t\t\to_bytes = item.o_bytes;\n\t\t\t\ts_bytes = item.s_bytes;\n\t\t\t\tpart = i;\n\t\n\t\t\t// seach if have res in table\n\t\t\t\tStringBuilder sql = new StringBuilder();\n\t\t\t\n\t\t\t\tsql.append(check).append(\"resource='\").append(res).append(\"' and part=\").append(part);\n\t\t\t//\trs = search(sql.toString());\n\t\t\t\ttry {\n\t\t\t\t\tprepstmt = conn.prepareStatement(sql.toString(),ResultSet.TYPE_SCROLL_INSENSITIVE,\n\t\t\t\t\t\t\tResultSet.CONCUR_UPDATABLE);\n\t\t\t\t\trs = prepstmt.executeQuery();\n\t\t\t\t\tif(rs.next()){\n\t\t\t\t\t// updates the records\t\n\t\t\t\t\t\ttype1_s = rs.getInt(\"type_s\");\n\t\t\t\t\t\ttype1_o = rs.getInt(\"type_o\");\n\t\t\t\t\t\to_bytes1 = rs.getInt(\"o_bytes\");\n\t\t\t\t\t\ts_bytes1 = rs.getInt(\"s_bytes\");\n\t\t\t\t\t\t\n\t\t\t\t\t\to_bytes1 += o_bytes;\n\t\t\t\t\t\ts_bytes1 += s_bytes;\n\t\t\t\t\t// unpdate records\t\t\n\t\t\t\t\t\tif(type_s != 0 && type1_s == 0)\n\t\t\t\t\t\t\trs.updateInt(\"type_s\", type_s);\n\t\t\t\t\t\tif(type_o != 0 && type1_o == 0)\n\t\t\t\t\t\t\trs.updateInt(\"type_o\", type_o);\n\t\t\t\t\t\trs.updateInt(\"o_bytes\", o_bytes1);\n\t\t\t\t\t\trs.updateInt(\"s_bytes\", s_bytes1);\n\t\t\t\t\t\trs.updateRow();\n\t\t\t\t\t}else {\n\t\t\t\t\t// directly insert the record\n\t\t\t\t\t\trs.moveToInsertRow();\n\t\t\t\t\t\trs.updateString(\"resource\", key);\n\t\t\t\t\t\trs.updateInt(\"part\", part);\n\t\t\t\t\t\trs.updateInt(\"type_s\", type_s);\n\t\t\t\t\t\trs.updateInt(\"type_o\", type_o);\n\t\t\t\t\t\trs.updateInt(\"o_bytes\", o_bytes);\n\t\t\t\t\t\trs.updateInt(\"s_bytes\", s_bytes);\n\t\t\t\t\t\trs.insertRow();\n\t\t\t\t\t}\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\treturn false;\n\t\t\t\t}finally{\n\t\t\t\t\tif (rs != null) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\trs.close();\n\t\t\t\t\t\t\tprepstmt.close();\n\t\t\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "List<IndexFieldStatus> getIndexFieldStatus();", "@PostConstruct\n public void ensureIndexes() {\n storageStrategy.ensureIndexes(mongoTemplate.domainEventCollection(), mongoTemplate.snapshotEventCollection());\n }", "@SuppressWarnings(\"unchecked\")\n public <T> IndexedCollection<T> collection() {\n return (IndexedCollection<T>) journal\n .retrieve(BarbelQueries.all(id), queryOptions(orderBy(ascending(BarbelQueries.EFFECTIVE_FROM))))\n .stream().map(d -> processingState.expose(context, (Bitemporal) d)).collect(Collectors.toList());\n }", "public InnodbIndexStatsExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "private IndexOperations getIndexOperations() {\n return elasticsearchOperations.indexOps(itemClazz);\n }", "public boolean shouldIndex(IDocument document);", "indexSet createindexSet();", "public void index(List<Entity> entities) {\n\t\t\n\t}", "public interface ResourceMapper {\n\n /**\n * Delete one record by primary key.<br>\n * \n * @param uuid Primary key\n * @return The row number just inserted into the database\n * @since SDNO 0.5\n */\n int deleteByPrimaryKey(String uuid);\n\n /**\n * Add one record including all fields.<br>\n * \n * @param record New record\n * @return The row number just inserted into the database\n * @since SDNO 0.5\n */\n int insert(ResourcePojo record);\n\n /**\n * Add specified field, only for non empty fields.<br>\n * \n * @param record New record\n * @return The row number just inserted into the database\n * @since SDNO 0.5\n */\n int insertSelective(ResourcePojo record);\n\n /**\n * Query resource data by primary key.<br>\n * \n * @param bktName Bucket name\n * @return Resource data\n * @since SDNO 0.5\n */\n List<ResourcePojo> selectByBktName(String bktName);\n\n /**\n * Update specified field of resource data by primary key, only for non empty fields.<br>\n * \n * @param record Resource data record\n * @return The row number just updated in the database\n * @since SDNO 0.5\n */\n int updateByPrimaryKeySelective(ResourcePojo record);\n\n /**\n * Update one record by primary key.<br>\n * \n * @param record Resource data record\n * @return The row number just updated in the database\n * @since SDNO 0.5\n */\n int updateByPrimaryKey(ResourcePojo record);\n\n /**\n * Query resource collection by bucket name and model name.<br>\n * \n * @param bktName Bucket name\n * @param modelName Model name\n * @return Resource collection\n * @since SDNO 0.5\n */\n List<ResourcePojo> selectByBktAndModelName(@Param(\"bktName\") String bktName, @Param(\"modelName\") String modelName);\n}", "private void indexUpdates(UpdateQueryResult updates) {\r\n Iterator<HashMap<String, String>> i = updates.getIterator();\r\n while (i.hasNext()) {\r\n HashMap<String, String> values = i.next();\r\n \r\n \t// during index default solr fields are indexed separately\r\n \tString articleId = values.get(\"KnowledgeArticleId\");\r\n \tString title = values.get(\"Title\");\r\n \tvalues.remove(\"Title\");\r\n \tString summary = values.get(\"Summary\");\r\n \tvalues.remove(\"Summary\");\r\n \t\r\n \ttry {\r\n \t\tif (UtilityLib.notEmpty(articleId) && UtilityLib.notEmpty(title)) {\r\n \t\t\t// index sObject\r\n \t\t\t// default fields every index must have\r\n \t\t\tStringBuilder sb = new StringBuilder();\r\n \t\t\tContent c = new Content();\r\n \t\t\tc.setKey(articleId);\r\n \t\t\tsb.setLength(0);\r\n \t\t\tsb.append(summary);\r\n \t\t\tc.setData(sb.toString().getBytes());\r\n \t\t\tc.addMetadata(\"Content-Type\", \"text/html\");\r\n \t\t\tc.addMetadata(\"title\", title);\r\n \t\t\t\r\n \t\t\tLOG.debug(\"Salesforce Crawler: Indexing articleId=\"+articleId+\" title=\"+title+\" summary=\"+summary);\r\n \t\t\t\r\n \t\t\t// index articleType specific fields\r\n \t\t\tfor (Entry<String, String> entry : values.entrySet()) {\r\n \t\t\t\tc.addMetadata(entry.getKey(), entry.getValue().toString());\r\n \t\t\t\tif (!entry.getKey().equals(\"Attachment__Body__s\")) {\r\n \t\t\t\t\tLOG.debug(\"Salesforce Crawler: Indexing field key=\"+entry.getKey()+\" value=\"+entry.getValue().toString());\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tstate.getProcessor().process(c);\r\n \t\t}\r\n } catch (Exception e) {\r\n \tUtilityLib.errorException(LOG, e);\r\n \tstate.getStatus().incrementCounter(Counter.Failed);\r\n }\r\n }\r\n }", "public interface ReportSearchRepository extends ElasticsearchRepository<Report, Long> {\n}", "public RecordSet loadAllProcessingDetail(Record inputRecord);", "@Override\r\n\tprotected void loadUniqueIndexMap(TestBooking entiy) {\n\t\t\r\n\t}", "public interface ActivitySearchRepository extends ElasticsearchRepository<Activity, Long> {\n}", "public List<DBObject> getIndexInfo() {\n return new MongoIterableImpl<DBObject>(null, executor, ReadConcern.DEFAULT, primary(), retryReads) {\n @Override\n public ReadOperation<BatchCursor<DBObject>> asReadOperation() {\n return new ListIndexesOperation<>(getNamespace(), getDefaultDBObjectCodec()).retryReads(retryReads);\n }\n }.into(new ArrayList<>());\n }", "@Override\n protected boolean preserveIndicesUponCompletion() {\n return true;\n }", "public boolean isIndexed()\n {\n //only when criterion is indexed but not required it will be considered as indexed\n return (_attrDef.isIndexed() && !_attrDef.isMandatory());\n }", "private void dataFlushed(Index index) throws IOException, InterruptedException {\n Collection<String> names = new LinkedList<String>();\n // check using collected usages\n\n index.query(\n names,\n DocumentUtil.binaryNameConvertor(),\n DocumentUtil.declaredTypesFieldSelector(false, false),\n null,\n QueryUtil.createUsagesQuery(\"java.util.List\", EnumSet.of(UsageType.TYPE_REFERENCE), Occur.SHOULD));\n names.retainAll(\n Arrays.asList(\n \"usages.ClassAnnotations\",\n \"usages.ClassArrayAnnotations\",\n \"usages.MethodAnnotations\",\n \"usages.MethodArrayAnnotations\",\n \"usages.FieldAnnotations\",\n \"usages.FieldArrayAnnotations\")\n );\n assertTrue(names.isEmpty());\n\n flushCount++;\n }", "@Override\r\n\tpublic void adminSelectRead() {\n\t\t\r\n\t}", "public interface ISubscriptionDailyUsageRecordCollection\n extends IPartnerComponent<Tuple<String, String>>,\n IEntireEntityCollectionRetrievalOperations<SubscriptionDailyUsageRecord, ResourceCollection<SubscriptionDailyUsageRecord>>\n{\n /**\n * Retrieves the subscription's daily usage records.\n * @return The subscription's daily usage records.\n */\n ResourceCollection<SubscriptionDailyUsageRecord> get();\n}", "public abstract List<ClinicalDocument> findAllClinicalDocuments();", "@Override\n\tpublic List queryAll() throws Exception {\n\t\treturn null;\n\t}", "public interface RelatedDocumentSearchRepository extends ElasticsearchRepository<RelatedDocument, Long> {\n}", "public String getBulk() {\n return ElasticQuestionnaire.getGenericBulk(getCreationDate_PK(), ElasticQuestionnaire.getType(), getAsJSON().toString());\n }", "@Test\n public void testIndexMaintenanceWithIndexOnMethodAsList() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID\",\n SEPARATOR + \"portfolio.asList() pf\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForValues(ri);\n }", "@Override\n public void updatedResource( ResourceEvent event )\n {\n if ( event.getTypeResource( ).equals( Appointment.APPOINTMENT_RESOURCE_TYPE ) )\n {\n IndexingAppointmentService.getService( ).indexAppointmentStateAndHistory( _appointmentDataSource, _appointmentHistoryDataSource,\n Integer.parseInt( event.getIdResource( ) ) );\n }\n\n }", "@Override\r\n public List<Object> getMatchedResources() {\n return null;\r\n }", "public interface TypeMedicationSearchRepository extends ElasticsearchRepository<TypeMedication, Long> {\n}", "public interface DroitaccesDocumentSearchRepository extends ElasticsearchRepository<DroitaccesDocument, Long> {\n}", "@Async\n public void indexAllPublicBlogEntries() {\n try {\n // so as to not use all the ram, i loop through a page at a time and save the blog\n // entries in a batch of 100 at a time to ES\n // since i can't use java 8 on this project, i don't have streams.\n\n final Security sec = securityDao.findByName(\"public\");\n Pageable pageable = PageRequest.of(0, 100);\n\n Page<Entry> entries = entryRepository.findBySecurityOrderByDateDesc(sec, pageable);\n for (int i = 0; i < entries.getTotalPages(); i++) {\n final ArrayList<BlogEntry> items = new ArrayList<>();\n\n for (final Entry entry : entries) {\n items.add(convert(entry));\n }\n\n blogEntryRepository.saveAll(items);\n\n pageable = PageRequest.of(i + 1, 100);\n entries = entryRepository.findBySecurityOrderByDateDesc(sec, pageable);\n }\n } catch (final Exception e) {\n log.error(e.getMessage(), e);\n }\n }", "@Test\n public void testIndexMaintenanceWithIndexOnMethodGetEntries() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"entries.value.getID\",\n SEPARATOR + \"portfolio.getEntries() entries\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForEntries(ri);\n }", "private RequestResponse handleIndexRequest(Request request, Response response) throws ServiceException {\n response.type(\"application/json\");\n\n String core = request.params(\":core\");\n if (StringUtils.isEmpty(core)) {\n throw new ServiceException(\"Failed to provide an index core for the document\");\n }\n\n ContentDocument contentDocument = new RequestToContentDocument().convert(request);\n return this.searchService.index(core, contentDocument);\n }", "@ProjectSingleton\npublic interface DeprecatedEntitiesByEntityIndex extends Index {\n\n boolean isDeprecated(@Nonnull OWLEntity entity);\n}", "private Collection<Record> handleRequest(SearchRequest request) {\n\t\tCollection<Record> resultSet = getResults(request.getQuery());\n\t\treturn resultSet;\n\t}", "public List<Record> listAllRecords();", "public static void loadDocumentCollecion() throws IOException {\n\t\tSystem.out.println(\"Document Collection index: \" + DocumentCollection_location);\t\t\n\t\tDirectory DocsIndexDirectory = FSDirectory.open(new File(DocumentCollection_location));\t\t\n\t\tdocuments = new IndexSearcher((IndexReader.open(DocsIndexDirectory)));\t\n\t}", "public interface PerCompanySearchRepository extends ElasticsearchRepository<PerCompany, Long> {\n}", "public interface InsuranceTypeSearchRepository extends ElasticsearchRepository<InsuranceType, Long> {\n}", "public boolean createIndex(Hashtable<String, Hashtable<Integer,Quad>> ind_buffer){\n\t\tSet<String> keys = ind_buffer.keySet();\n\t\tHashtable<Integer,Quad> list;\n\t\tQuad comp;\n\t\tint part;\n\t\tint type1_s, type1_o;\n\t\tint type_s,type_o;\n\t\tint wei, wei1; // compared use\n\t\tint o_bytes, s_bytes, o_bytes1, s_bytes1;\n\t\tString check = \"select resource, part, type_s, type_o, weight, o_bytes, s_bytes from `\"+table+\"` where \";\n\t\t//String insert = \"insert into `sindex` values \";\n//\t\tString update = \"update \"\n\t\tResultSet rs = null;\n\t\tPreparedStatement prepstmt = null;\n\t\tString res;\n\t\tfor(String key : keys){\n\t\t\tlist = ind_buffer.get(key);\n\t\t\tif(key.indexOf('\\'') != -1 )\n\t\t\t\tres = key.replaceAll(\"'\", \"''\");\n\t\t\telse res = key;\n\t\t// hashcode sealing\t\n\t\t//\tkey = String.valueOf(key.hashCode()); \n\t\t\t\n\t\t\tfor(int i : list.keySet()){\n\t\t\t\tcomp = list.get(i);\n\t\t\t\tpart = i;\n\t\t\t\ttype_s = comp.type_s;\n\t\t\t\ttype_o = comp.type_o;\n\t\t\t\twei = comp.weight;\n\t\t\t\to_bytes = comp.o_bytes;\n\t\t\t\ts_bytes = comp.s_bytes;\n\t\t\t// seach if have res in table\n\t\t\t\tStringBuilder sql = new StringBuilder();\n\t\n\t\t\t\tsql.append(check).append(\"resource='\").append(res).append(\"' and part=\").append(part);\n\n\t\t\t\ttry {\n\t\t\t\t\tprepstmt = conn.prepareStatement(sql.toString(),ResultSet.TYPE_SCROLL_INSENSITIVE,\n\t\t\t\t\t\t\tResultSet.CONCUR_UPDATABLE);\n\t\t\t\t\trs = prepstmt.executeQuery();\n\t\t\t\t\tif(rs.next()){\n\t\t\t\t\t\t// updates the records\t\n\t\t\t\t\t\ttype1_o = rs.getInt(\"type_o\");\n\t\t\t\t\t\ttype1_s = rs.getInt(\"type_s\");\n\t\t\t\t\t\twei1 = rs.getInt(\"weight\");\n\t\t\t\t\t\to_bytes1 = rs.getInt(\"o_bytes\");\n\t\t\t\t\t\ts_bytes1 = rs.getInt(\"s_bytes\");\n\t\t\t\t\t\t// unpdate records\t\n\t\t\t\t\t\twei += wei1;\n\t\t\t\t\t\t/*if(wei < wei1){\n\t\t\t\t\t\t\twei = wei1;\n\t\t\t\t\t\t\tflag2 = 1;\n\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\n\t\t\t\t\t\to_bytes1 += o_bytes;\n\t\t\t\t\t\ts_bytes1 += s_bytes;\n\t\t\t\t\t\tif(type_s != 0 && type1_s == 0)\n\t\t\t\t\t\t\trs.updateInt(\"type_s\", type_s);\n\t\t\t\t\t\tif(type_o != 0 && type1_o == 0)\n\t\t\t\t\t\t\trs.updateInt(\"type_o\", type_o);\n\t\t\t\t\t//\tif(flag2 == 1)\n\t\t\t\t\t\t\trs.updateInt(\"weight\", wei);\n\t\t\t\t\t\trs.updateInt(\"o_bytes\", o_bytes1);\n\t\t\t\t\t\trs.updateInt(\"s_bytes\", s_bytes1);\n\t\t\t\t\t\t\n\t\t\t\t\t\trs.updateRow();\n\t\t\t\t\t}else {\n\t\t\t\t// directly insert the record\n\t\t\t\t\t\n\t\t\t\t/**\t\t(option 1 as below)\t\n\t\t\t\t *\t\tvalue = \"('\"+key+\"',\"+part+\",'\"+type+\"',\"+wei+\")\";\n\t\t\t\t *\t\tupdateSql(insert+value);\n\t\t\t\t */\n\t\t\t\t//\t\toption 2 to realize\t\t\n\t\t\t\t\t\trs.moveToInsertRow();\n\t\t\t\t\t\trs.updateString(\"resource\", key);\n\t\t\t\t\t\trs.updateInt(\"part\", part);\n\t\t\t\t\t\trs.updateInt(\"type_s\", type_s);\n\t\t\t\t\t\trs.updateInt(\"type_o\", type_o);\n\t\t\t\t\t\trs.updateInt(\"weight\", wei);\n\t\t\t\t\t\trs.updateInt(\"o_bytes\", o_bytes);\n\t\t\t\t\t\trs.updateInt(\"s_bytes\", s_bytes);\n\t\t\t\t\t\trs.insertRow();\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tSystem.out.println(key);\n\t\t\t\t}finally{\n\t\t\t\t// ??should wait until all database operation finished!\t\t\n\t\t\t\t\tif (rs != null) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\trs.close();\n\t\t\t\t\t\t\tprepstmt.close();\n\t\t\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public synchronized void buildIndex(){\n for(SlotData data : slotDataList){\n data.prepareReport();\n }\n }", "public interface MedCheckDetSearchRepository extends ElasticsearchRepository<MedCheckDet, Long> {\n}", "public List<ModelObject> readAll();", "@Override\r\n\tprotected void indexDocument(PluginServiceCallbacks callbacks, JSONResponse jsonResults, HttpServletRequest request,\r\n\t\t\tIndexing indexing) throws Exception {\n\t\t\r\n\t}", "void initiateIndexing(HarvestResultDTO harvestResult) throws DigitalAssetStoreException;", "public interface ResulteventSearchRepository extends ElasticsearchRepository<Resultevent, Long> {\n}", "@Test\n public void testCreateIdxOnClient() {\n getDefaultCacheOnClient().query(new SqlFieldsQuery(((\"CREATE INDEX IDX_11 ON \" + (GridCacheDynamicLoadOnClientTest.FULL_TABLE_NAME)) + \" (name asc)\"))).getAll();\n }", "@Ignore\n @Test\n public void testCreateIndex() {\n System.out.println(\"createIndex\");\n Util.commonServiceIPs=\"127.0.0.1\";\n \n EntityManager em=Util.getEntityManagerFactory(100).createEntityManager();\n EntityManager platformEm = Util.getPlatformEntityManagerFactory().createEntityManager();\n \n Client client = ESUtil.getClient(em,platformEm,1,false);\n \n RuntimeContext.dataobjectTypes = Util.getDataobjectTypes();\n String indexName = \"test000000\";\n try {\n ESUtil.createIndex(platformEm, client, indexName, true);\n }\n catch(Exception e)\n {\n \n }\n \n\n }", "StorableIndexInfo getIndexInfo();", "public IndexableDocument() {\n\t\tthis.id=new ObjectId();\n\t}", "public interface ServiceAssuranceSearchRepository extends ElasticsearchRepository<ServiceAssurance, Long> {\n}", "public interface EvDiagramSearchRepository extends ElasticsearchRepository<EvDiagram, Long> {\n}", "public long index() {\n return manager.compactIndex();\n }", "public interface SearchQuerySet extends QuerySet\n{\n\n // for AbstractSearch\n public static final int STAT_MODELS = 1;\n public static final int STAT_CLUSTERS = 2;\n public static final int STAT_GENOMES = 4;\n public static final int STAT_MODEL_CLUSTERS = 8;\n\n public String getStatsById(Collection data);\n public String getStatsByQuery(String query);\n public String getStatsById(Collection data,int stats);\n public String getStatsByQuery(String query,int stats);\n \n // for BlastSearch\n public String getBlastSearchQuery(Collection dbNames, Collection keys, KeyTypeUser.KeyType keyType);\n \n //for ClusterIDSearch\n public String getClusterIDSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for ClusterNameSearch\n public String getClusterNameSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for DescriptionSearch\n public String getDescriptionSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for GoSearch \n public String getGoSearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for GoTextSearch\n public String getGoTextSearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for IdSearch\n public String getIdSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for QueryCompSearch\n public String getQueryCompSearchQuery(String comp_id, String status, KeyTypeUser.KeyType keyType);\n \n // for QuerySearch\n public String getQuerySearchQuery(String queries_id, KeyTypeUser.KeyType keyType); \n \n // for SeqModelSearch\n public String getSeqModelSearchQuery(Collection model_ids, KeyTypeUser.KeyType keyType);\n \n // for UnknowclusterIdSearch\n public String getUnknownClusterIdSearchQuery(int cluster_id, KeyTypeUser.KeyType keyType);\n \n // for ProbeSetSearch\n public String getProbeSetSearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for ProbeSetKeySearch\n public String getProbeSetKeySearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for QueryTestSearch\n public String getQueryTestSearchQuery(String query_id, String version, String genome_id);\n \n // for QueryStatsSearch\n public String getQueryStatsSearchQuery(List query_ids,List DBs);\n \n // for PskClusterSearch\n public String getPskClusterSearchQuery(int cluster_id,KeyTypeUser.KeyType keyType);\n \n // for ClusterCorrSearch\n public String getClusterCorrSearchQuery(int cluster_id, int psk_id, KeyTypeUser.KeyType keyType);\n \n // for UnknownGenesSearch\n public String getUnknownGenesSearchQuery(Collection sources, KeyTypeUser.KeyType keyType);\n \n}", "@Override\n\tpublic void queryData() {\n\t\t\n\t}", "Boolean checkIndexing(Long harvestResultOid) throws DigitalAssetStoreException;", "public interface LandmarkRepository extends ElasticsearchRepository<Landmark, String> {\n\n List<Landmark> findByName(String name);\n\n}", "CollectionResource createCollectionResource();", "protected void notifyRead(){\n indexList.clear();\n int rows = bank.getRows();\n for(int i = 0; i < rows; i++){\n int value = bank.getInt(filterVar, i);\n if (filterList.contains(value)) indexList.add(i);\n }\n }", "@Override\r\n\tpublic void updateResourceInformation() {\n\t}", "@Override \n\t\tprotected void publishResults(CharSequence constraint, FilterResults results)\n\t\t{\n\t\t\t\n \n filteredData = (ArrayList<IndexEntry>) results.values;\n notifyDataSetChanged();\n \n if (callback != null){\n \tcallback.valuesFiltered();\n \tcallback = null;\n }\n \n\t\t}", "public void refresh() {\n getIndexOperations().refresh();\n }", "@Override\n\tpublic List<ASScoredDocument> query(String indexName, String queryString, Map<String, String> additionalFields)\n\t\t\tthrows ASException {\n\t\treturn null;\n\t}", "public IndexRecord()\n {\n }", "@Override\n\tpublic List<P0001VO> searchAdd() throws DataAccessException {\n\t\treturn null;\n\t}", "public ResourceExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "private HashMap<String, HashSet<String>> convertIndexToMap(IndexReader reader) throws IOException{\n\t\t HashMap<String, HashSet<String>> hmap = new HashMap<String, HashSet<String>>();\n\t\t HashSet<String> docIdSet;\n\t\t \n\t\t for(int i=0; i<reader.numDocs(); i++){\n\t\t\t Fields termVect = reader.getTermVectors(i);\n\n\t\t\t if(termVect == null)\n\t\t\t\t continue;\n\t\t\t \n\t for (String field : termVect) {\n\t \t \n\t Terms terms = termVect.terms(field);\n\t TermsEnum termsEnum = terms.iterator();\n\t Document doc = reader.document(i);\n\t \n\t while(termsEnum.next() != null){\n\t \t BytesRef term = termsEnum.term();\n\t \t String strTerm = term.utf8ToString();\n\t \t \n\t \t if (hmap.containsKey(strTerm)){\n\t \t\t docIdSet = hmap.get(strTerm);\n\t \t\t docIdSet.add(doc.get(\"url\"));\n\t \t } else{\n\t \t\t docIdSet = new HashSet<String>();\n\t \t\t docIdSet.add(doc.get(\"url\"));\n\t \t\t hmap.put(strTerm, docIdSet);\n\t \t }\n\t }\n\t }\n\t\t }\n\t\t \n\t\t return hmap;\n\t}", "@VTID(10)\n int getIndex();", "public TranscriptionIndexer() throws SQLException, CorruptIndexException, IOException\r\n {\r\n\r\n\r\n IndexWriter writer = null;\r\n Analyzer analyser;\r\n Directory directory;\r\n /**@TODO parameterized location*/\r\n String dest = \"/usr/indexTranscriptions\";\r\n\r\n directory = FSDirectory.getDirectory(dest, true);\r\n analyser = new StandardAnalyzer();\r\n writer = new IndexWriter(directory, analyser, true);\r\n PreparedStatement stmt=null;\r\n Connection j = null;\r\n try {\r\n j=DatabaseWrapper.getConnection();\r\n String query=\"select * from transcription where text!='' and creator>0 order by folio, line\";\r\n stmt=j.prepareStatement(query);\r\n ResultSet rs=stmt.executeQuery();\r\n while(rs.next())\r\n {\r\n int folio=rs.getInt(\"folio\");\r\n int line=rs.getInt(\"line\");\r\n int UID=rs.getInt(\"creator\");\r\n int id=rs.getInt(\"id\");\r\n Transcription t=new Transcription(id);\r\n Document doc = new Document();\r\n Field field;\r\n field = new Field(\"text\", t.getText(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"comment\", t.getComment(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"creator\", \"\" + t.UID, Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"security\", \"\" + \"private\", Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"line\", \"\" + t.getLine(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"page\", \"\" + t.getFolio(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"id\", \"\" + t.getLineID(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"manuscript\", \"\" + new Manuscript(t.getFolio()).getID(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"projectID\", \"\" + t.getProjectID(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n writer.addDocument(doc);\r\n }\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n if(writer!=null)\r\n {\r\n writer.commit();\r\n \twriter.close();\r\n return;\r\n }\r\n ex.printStackTrace();\r\n }\r\n finally{\r\n DatabaseWrapper.closeDBConnection(j);\r\n DatabaseWrapper.closePreparedStatement(stmt);\r\n }\r\n\r\n writer.commit();\r\n \twriter.close();\r\n}", "private GetRequest getIndexExistsRequest() {\n return Requests.getRequest(config.getIndex())\n .type(config.getType())\n .id(\"_\");\n }", "public static void markAllAsRead(Context context, int type) {\n\t\tContentValues values = new ContentValues();\n values.put(RecordlistTable.READ, 1);\n\t\tString where = \" TYPE = \" + type;\n\t\tcontext.getContentResolver().update(RECORDLIST_URI, values, where, null);\n\t}", "int insertSelective(DBPublicResources record);", "@Override\n\tpublic void updateResourceInformation() {\n\t}", "@Override\n protected List<ResourceRecordSet> findAllGoogle(Dns client) throws Exception {\n return Collections.emptyList();\n }", "@Restrict(@Group(AuthApplication.DATA_OWNER_ROLE))\n public static Result postIndex(String das_uri) {\n \treturn index(das_uri);\n\t\t \n }", "@Override\n public boolean getIsIndexOnKeys() {\n return isIndexOnKeys_;\n }", "@Test\n public void testIndexMaintenanceWithHeterogenousObjects() throws Exception {\n DefaultQueryService.TEST_QUERY_HETEROGENEOUS_OBJECTS = true;\n IndexManager.TEST_RANGEINDEX_ONLY = true;\n Cache cache = CacheUtils.getCache();\n qs = cache.getQueryService();\n region = CacheUtils.createRegion(\"portfolio1\", null);\n idSet.clear();\n Portfolio p = new Portfolio(4);\n region.put(\"4\", p);\n idSet.add(\"\" + p.getID());\n p = new Portfolio(5);\n region.put(\"5\", p);\n idSet.add(\"\" + p.getID());\n region.put(\"6\", 6);\n Index i1 =\n qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID()\", SEPARATOR + \"portfolio1 pf\");\n RangeIndex ri = (RangeIndex) i1;\n assertEquals(2, ri.valueToEntriesMap.size());\n Iterator itr = ri.valueToEntriesMap.values().iterator();\n while (itr.hasNext()) {\n RangeIndex.RegionEntryToValuesMap re2ValMap = (RangeIndex.RegionEntryToValuesMap) itr.next();\n assertEquals(1, re2ValMap.map.size());\n Object obj = re2ValMap.map.values().iterator().next();\n assertFalse(obj instanceof Collection);\n assertTrue(obj instanceof Portfolio);\n Portfolio pf = (Portfolio) obj;\n assertTrue(idSet.contains(String.valueOf(pf.getID())));\n }\n assertEquals(1, ri.undefinedMappedEntries.map.size());\n Map.Entry entry = (Map.Entry) ri.undefinedMappedEntries.map.entrySet().iterator().next();\n assertFalse(entry.getValue() instanceof Collection);\n assertTrue(entry.getValue() instanceof Integer);\n assertTrue(entry.getValue().equals(6));\n\n region.put(\"7\", 7);\n idSet.add(7);\n assertEquals(2, ri.undefinedMappedEntries.map.size());\n itr = ri.undefinedMappedEntries.map.entrySet().iterator();\n while (itr.hasNext()) {\n entry = (Map.Entry) itr.next();\n assertFalse(entry.getValue() instanceof Collection);\n assertTrue(entry.getValue() instanceof Integer);\n idSet.contains(entry.getValue());\n }\n\n region.remove(\"7\");\n idSet.remove(7);\n Index i2 =\n qs.createIndex(\"indx2\", IndexType.FUNCTIONAL, \"pf.pkid\", SEPARATOR + \"portfolio1 pf\");\n ri = (RangeIndex) i2;\n assertEquals(2, ri.valueToEntriesMap.size());\n itr = ri.valueToEntriesMap.values().iterator();\n while (itr.hasNext()) {\n RangeIndex.RegionEntryToValuesMap re2ValMap = (RangeIndex.RegionEntryToValuesMap) itr.next();\n assertEquals(1, re2ValMap.map.size());\n Object obj = re2ValMap.map.values().iterator().next();\n assertFalse(obj instanceof Collection);\n assertTrue(obj instanceof Portfolio);\n Portfolio pf = (Portfolio) obj;\n assertTrue(idSet.contains(String.valueOf(pf.getID())));\n }\n assertEquals(1, ri.undefinedMappedEntries.map.size());\n entry = (Map.Entry) ri.undefinedMappedEntries.map.entrySet().iterator().next();\n assertFalse(entry.getValue() instanceof Collection);\n assertTrue(entry.getValue() instanceof Integer);\n assertTrue(entry.getValue().equals(6));\n\n region.put(\"7\", 7);\n idSet.add(7);\n assertEquals(2, ri.undefinedMappedEntries.map.size());\n itr = ri.undefinedMappedEntries.map.entrySet().iterator();\n while (itr.hasNext()) {\n entry = (Map.Entry) itr.next();\n assertFalse(entry.getValue() instanceof Collection);\n assertTrue(entry.getValue() instanceof Integer);\n idSet.contains(entry.getValue());\n }\n }", "@Override\n\tpublic String auditBulk() throws Throwable {\n\t\treturn null;\n\t}", "protected void cacheLoadThroughSubjects()\n {\n }", "IntegerResource tracking();" ]
[ "0.6396278", "0.5805322", "0.56983536", "0.5684332", "0.56273854", "0.5481324", "0.5472585", "0.54533297", "0.5434382", "0.5426868", "0.54180354", "0.5402291", "0.53776324", "0.5334034", "0.5310372", "0.5191553", "0.519085", "0.51873446", "0.5169208", "0.51669115", "0.5154876", "0.51469994", "0.5134959", "0.513342", "0.51000756", "0.5075796", "0.50592977", "0.5057855", "0.5051845", "0.5029171", "0.50270545", "0.5025423", "0.50222826", "0.49859414", "0.49812964", "0.49795136", "0.49794525", "0.4975249", "0.4974617", "0.49696958", "0.49675512", "0.49658465", "0.49648932", "0.49348938", "0.49212503", "0.4919272", "0.49122873", "0.49105874", "0.490259", "0.4885199", "0.4885182", "0.4881518", "0.48807633", "0.4880369", "0.48784724", "0.48770383", "0.48770124", "0.48714313", "0.4868197", "0.48623854", "0.4857327", "0.48558995", "0.48485383", "0.48478583", "0.48454747", "0.4839732", "0.48394468", "0.48320505", "0.48317397", "0.48287022", "0.48258433", "0.48213196", "0.48213074", "0.48191637", "0.48190317", "0.48167405", "0.48134205", "0.48036018", "0.4794917", "0.47887966", "0.47861236", "0.47812402", "0.47800002", "0.47739607", "0.47721756", "0.4762234", "0.47560638", "0.4756037", "0.4755311", "0.47546682", "0.47542286", "0.47520882", "0.47484595", "0.47476465", "0.47403365", "0.4737095", "0.47354248", "0.4732383", "0.47307932", "0.4729109" ]
0.49079996
48
/ This method helps add a language specific value to the map containing the custom language specific _all fields
private static void addToLangAll(Map<String, List<String>> lang_acc, String lang, String value) { if(lang_acc.get(lang) != null) { lang_acc.get(lang).add(value); } else { List<String> lang_values = new ArrayList<String>(); lang_values.add(value); lang_acc.put(lang, lang_values); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Builder addInLanguage(Language value);", "Builder addInLanguage(Text value);", "Builder addInLanguage(String value);", "public void addLanguage(String value) {\n/* 230 */ addStringToBag(\"language\", value);\n/* */ }", "Builder addInLanguage(Language.Builder value);", "void addDicItem(String language, String key, String value)\n {\n DictionaryCache.addTranslation(language, key, value);\n }", "protected void addLanguageParameter() throws Exception\n {\n Connection c = null;\n PreparedStatement ps = null;\n ResultSet rs = null;\n\n try\n {\n ArrayList termbaseLangs = new ArrayList();\n termbaseLangs.add(ALL);\n c = ConnectionPool.getConnection();\n ps = c.prepareStatement(TERM_LANG_QUERY);\n rs = ps.executeQuery();\n while (rs.next())\n {\n termbaseLangs.add(rs.getString(1));\n }\n\n // We should use .addList() and use a multi-select list instead\n // to let the user select multiple languages...BUT\n // this widget just does not work in the current inetsoft version\n // with the DHTML viewer (ok for java viewer)\n // So, we're stuck with giving the user one value to choose.\n theParameters.addChoice(\"selectedLang\", ALL,\n termbaseLangs.toArray());\n theParameters.setAlias(\"selectedLang\", \"Language\");\n }\n finally\n {\n ConnectionPool.silentClose(rs);\n ConnectionPool.silentClose(ps);\n ConnectionPool.silentReturnConnection(c);\n }\n }", "@Override\n public void setLanguage(String lang) {\n }", "public void setAllCustomFields(final Map<String,String> value)\n\t{\n\t\tsetAllCustomFields( getSession().getSessionContext(), value );\n\t}", "private static void ajouterPropertiesInitialesEnDur(\r\n\t\t\tfinal Locale pLocale) {\r\n\t\t\r\n\t\tif (pLocale.equals(Locale.FRANCE)) {\r\n\t\t\t\r\n\t\t\tmapPropertiesInitiales.put(KEY_LABEL_PRENOM, \"Prénom\");\r\n\t\t\tmapPropertiesInitiales.put(KEY_LABEL_NOM, \"Nom\");\r\n\t\t\t\r\n\t\t} else if (pLocale.equals(Locale.US)){\r\n\t\t\t\r\n\t\t\tmapPropertiesInitiales.put(KEY_LABEL_PRENOM, \"FirstName\");\r\n\t\t\tmapPropertiesInitiales.put(KEY_LABEL_NOM, \"LastName\");\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\tmapPropertiesInitiales.put(KEY_LABEL_PRENOM, \"Prénom\");\r\n\t\t\tmapPropertiesInitiales.put(KEY_LABEL_NOM, \"Nom\");\r\n\t\t}\r\n\t\t\r\n\t}", "public void setLanguage(String language);", "void setLanguage(Language language);", "public void putPrimaryLanguage(String value){\n editor.putString(PRIMARY_LANGUAGE, value);\n editor.apply();\n }", "public org.apache.xmlbeans.XmlAnySimpleType addNewLanguage()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlAnySimpleType target = null;\n target = (org.apache.xmlbeans.XmlAnySimpleType)get_store().add_attribute_user(LANGUAGE$14);\n return target;\n }\n }", "public void addCountryLanguage(String newLanguage) {\n languages.add(newLanguage);\n }", "public static void contributeApplicationDefaults(\r\n MappedConfiguration<String, Object> configuration)\r\n {\n configuration.add(SymbolConstants.SUPPORTED_LOCALES, \"en\");\r\n }", "public void setAllMessageFired(final Map<Language,String> value)\r\n\t{\r\n\t\tsetAllMessageFired( getSession().getSessionContext(), value );\r\n\t}", "@Override\n protected void populateLocalisationMap() {\n localisationKeyConstantToKeyMap.put(ADDRESSES_TITLE, \"receiveBitcoinPanel.receivingAddressesTitle\"); \n localisationKeyConstantToKeyMap.put(CREATE_NEW_TOOLTIP, \"createOrEditAddressAction.createReceiving.tooltip\"); \n }", "private void fillEntryLangMap(String p_termbaseId) throws Exception\n {\n Connection c = null;\n PreparedStatement ps = null;\n ResultSet rs = null;\n\n try\n {\n c = ConnectionPool.getConnection();\n ps = c.prepareStatement(TERM_ENTRY_LANG_QUERY);\n ps.setLong(1, Long.valueOf(p_termbaseId).longValue());\n rs = ps.executeQuery();\n m_map = new TreeMap();\n while (rs.next())\n {\n Long cid = new Long(rs.getLong(1));\n String name = rs.getString(2);\n HashSet set = (HashSet) m_map.get(cid);\n if (set == null)\n {\n set = new HashSet();\n m_map.put(cid, set);\n }\n set.add(name);\n }\n }\n finally\n {\n ConnectionPool.silentClose(rs);\n ConnectionPool.silentClose(ps);\n ConnectionPool.silentReturnConnection(c);\n }\n }", "public void setAllMessageCouldHaveFired(final Map<Language,String> value)\r\n\t{\r\n\t\tsetAllMessageCouldHaveFired( getSession().getSessionContext(), value );\r\n\t}", "@Override\n\tpublic IReplacement getAllReplacements(String lang){\n\t\t//connects to a DB and gets new values and names from there\n\t\tList<AutoreplaceL> data=dao.getByPropertiesValuePortionOrdered(\n\t\t\t\tnull, null, WHERE_NAMES, new Object[]{Boolean.TRUE, lang}, 0, -1, ORDER_BY, ORDER_HOW);\n\t\tList<String> values=new ArrayList<String>(data.size());\n\t\tList<Pattern> names_pattern=new ArrayList<Pattern>(data.size());\n\t\tfor (int i=0;i<data.size();i++){\n\t\t\tnames_pattern.add(Pattern.compile(Pattern.quote(data.get(i).getLocaleParent().getCode())));\n\t\t\tvalues.add(data.get(i).getText());\n\t\t}\n\t\treturn new Replacement(values, names_pattern);\n\t}", "public void setLanguageRelatedByCustLanguageIdKey(ObjectKey key) throws TorqueException\n {\n \n setCustLanguageId(((NumberKey) key).intValue());\n }", "public void add(CharSequence s, Language lang) {\r\n\t\t\r\n\t\t//Convert String to Hash Code\r\n\t\tint kmer = s.hashCode();\r\n\t\t\r\n\t\t//Get The Handle of the map for the particular language\r\n\t\tMap<Integer, LanguageEntry> langDb = getLanguageEntries(lang);\r\n\t\t\r\n\t\t\r\n\t\tint frequency = 1;\r\n\t\t//If Language Mapping Already has the Kmer, increment its Frequency\r\n\t\tif (langDb.containsKey(kmer)) {\r\n\t\t\tfrequency += langDb.get(kmer).getFrequency();\r\n\t\t}\r\n\t\t//Otherwise Insert into Map as New Language Entry\r\n\t\tlangDb.put(kmer, new LanguageEntry(kmer, frequency));\r\n\t\r\n\t\t\r\n\t}", "void localizationChaneged();", "public void addOntologies20070510nid3Language(java.lang.String value) {\r\n\t\tBase.add(this.model, this.getResource(), ONTOLOGIES20070510NID3LANGUAGE, value);\r\n\t}", "boolean hasValueLanguageId();", "public void localize(){\n String file=System.getProperty(\"user.home\")+ File.separator + \"rex.properties\";\n Properties rexProp = new Properties();\n try{\n\n rexProp.load(new FileInputStream(new File(file)));\n \n }catch(Exception e){\n S.out(\"Error reading rex.properties file\"); \n }\n strLanguage= rexProp.getProperty(\"Language\");\n \n if (strLanguage!=\"\"){\n Locale oLang= new Locale(strLanguage);\n I18n.setCurrentLocale(oLang);\n }\n else{\n I18n.setCurrentLocale(Locale.getDefault()); //set default locale\n }\n\n }", "Map<String,Object> getMasterData(String language)throws EOTException;", "public void setLanguage(String newLanguage) {\r\n language = newLanguage;\r\n }", "public void addData(Env env, Options opt, CanalComm ag, List<PLiteral> language){\n\t\tPField p = IndepPField.createPField(env, opt, language);\n\t\tif (identifier(ag)==-1){\n\t\t\tagents.add(ag);\n\t\t\tcommLanguage.add(p);\n\t\t}\n\t\telse\n\t\t\tcommLanguage.set(identifier(ag), p);\n\t}", "@Override\r\n\t\tpublic void setLang(String lang)\r\n\t\t\t{\n\t\t\t\t\r\n\t\t\t}", "protected void fillAdditionalFields(U user, Map<String, Object> map) {\n\t}", "public DataResourceBuilder _language_(Language _language_) {\n this.dataResourceImpl.getLanguage().add(_language_);\n return this;\n }", "public void updateLanguage() {\n try {\n getUserTicket().setLanguage(EJBLookup.getLanguageEngine().load(updateLanguageId));\n } catch (FxApplicationException e) {\n new FxFacesMsgErr(e).addToContext();\n }\n }", "public String getLanguageKey();", "public void updateLanguage(String lang) {\n\t\tmyLanguages.clear();\n\t\tString location = String.format(\"%s%s\", LANGUAGE_BASE, lang);\n\t\tResourceBundle rb = ResourceBundle.getBundle(location);\n\t\tfor (String key : rb.keySet()) {\n\t\t\tString[] input = rb.getString(key).split(\"\\\\|\");\n\t\t\tfor (String s : input) {\n\t\t\t\tmyLanguages.put(s.replace(\"\\\\\", \"\"), key);\n\t\t\t}\n\t\t}\n\t}", "private void LoadCoreValues()\n\t{\n\t\tString[] reservedWords = \t{\"program\",\"begin\",\"end\",\"int\",\"if\",\"then\",\"else\",\"while\",\"loop\",\"read\",\"write\"};\n\t\tString[] specialSymbols = {\";\",\",\",\"=\",\"!\",\"[\",\"]\",\"&&\",\"||\",\"(\",\")\",\"+\",\"-\",\"*\",\"!=\",\"==\",\"<\",\">\",\"<=\",\">=\"};\n\t\t\n\t\t//Assign mapping starting at a value of 1 for reserved words\n\t\tfor (int i=0;i<reservedWords.length;i++)\n\t\t{\n\t\t\tcore.put(reservedWords[i], i+1);\n\t\t}\n\t\t//Assign mapping for special symbols\n\t\tfor (int i=0; i<specialSymbols.length; i++)\n\t\t{\t\n\t\t\tcore.put(specialSymbols[i], reservedWords.length + i+1 );\n\t\t}\n\t}", "public void setLanguageRelatedByLanguageIdKey(ObjectKey key) throws TorqueException\n {\n \n setLanguageId(((NumberKey) key).intValue());\n }", "public void addLanguage(String language){\n if(!this.languages.contains(language)){this.languages.add(language);}\n }", "public void setAllCustomFields(final SessionContext ctx, final Map<String,String> value)\n\t{\n\t\tsetProperty(ctx, CUSTOMFIELDS,value);\n\t}", "@SuppressLint(\"SetTextI18n\")\n @Override\n public void setLanguage() {\n if (Value.language_flag == 0) {\n title.setText(title_text);\n back.setText(\"back\");\n copyright.setText(Value.copyright_text + Value.ver);\n nowTime.setText(Value.updatestring + Value.updateTime);\n } else if (Value.language_flag == 1) {\n title.setText(title_text);\n back.setText(\"返回\");\n copyright.setText(Value.copyright_text + Value.ver);\n nowTime.setText(Value.updatestring + Value.updateTime);\n } else if (Value.language_flag == 2) {\n title.setText(title_text);\n back.setText(\"返回\");\n copyright.setText(Value.copyright_text + Value.ver);\n nowTime.setText(Value.updatestring + Value.updateTime);\n }\n }", "private Object makeModel(HttpServletRequest request, String languageCode)\n {\n Map<String, String> model = Maps.newHashMap();\n model.put(\"lang\", languageCode);\n return model;\n }", "private void setLanguageForApp(){\n String lang = sharedPreferences.getString(EXTRA_PREF_LANG,\"en\");\n\n Locale locale = new Locale(lang);\n Resources resources = getResources();\n Configuration configuration = resources.getConfiguration();\n DisplayMetrics displayMetrics = resources.getDisplayMetrics();\n configuration.setLocale(locale);\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N){\n getApplicationContext().createConfigurationContext(configuration);\n } else {\n resources.updateConfiguration(configuration,displayMetrics);\n }\n getApplicationContext().getResources().updateConfiguration(configuration, getApplicationContext().getResources().getDisplayMetrics());\n }", "public void fillMap() {\n this.months.put(\"янв\", Month.JANUARY);\n this.months.put(\"фев\", Month.FEBRUARY);\n this.months.put(\"мар\", Month.MARCH);\n this.months.put(\"апр\", Month.APRIL);\n this.months.put(\"май\", Month.MAY);\n this.months.put(\"июн\", Month.JUNE);\n this.months.put(\"июл\", Month.JULY);\n this.months.put(\"авг\", Month.AUGUST);\n this.months.put(\"сен\", Month.SEPTEMBER);\n this.months.put(\"окт\", Month.OCTOBER);\n this.months.put(\"ноя\", Month.NOVEMBER);\n this.months.put(\"дек\", Month.DECEMBER);\n }", "public OrganizationPresenceDefinition languageLabels(Map<String, String> languageLabels) {\n this.languageLabels = languageLabels;\n return this;\n }", "public void setLanguage(Language l)\n\t{\n\t\tm_language = l;\n\t}", "@DISPID(-2147413012)\n @PropPut\n void language(\n java.lang.String rhs);", "private void loadLocale() {\n\t\tSharedPreferences sharedpreferences = this.getSharedPreferences(\"CommonPrefs\", Context.MODE_PRIVATE);\n\t\tString lang = sharedpreferences.getString(\"Language\", \"en\");\n\t\tSystem.out.println(\"Default lang: \"+lang);\n\t\tif(lang.equalsIgnoreCase(\"ar\"))\n\t\t{\n\t\t\tmyLocale = new Locale(lang);\n\t\t\tsaveLocale(lang);\n\t\t\tLocale.setDefault(myLocale);\n\t\t\tandroid.content.res.Configuration config = new android.content.res.Configuration();\n\t\t\tconfig.locale = myLocale;\n\t\t\tthis.getBaseContext().getResources().updateConfiguration(config, this.getBaseContext().getResources().getDisplayMetrics());\n\t\t\tCommonFunctions.lang = \"ar\";\n\t\t}\n\t\telse{\n\t\t\tmyLocale = new Locale(lang);\n\t\t\tsaveLocale(lang);\n\t\t\tLocale.setDefault(myLocale);\n\t\t\tandroid.content.res.Configuration config = new android.content.res.Configuration();\n\t\t\tconfig.locale = myLocale;\n\t\t\tthis.getBaseContext().getResources().updateConfiguration(config, this.getBaseContext().getResources().getDisplayMetrics());\n\t\t\tCommonFunctions.lang = \"en\";\n\t\t}\n\t}", "public void createDictionary() \n {\n dictionary = new HashMap<String, Map<String, String>>();\n \n addTranslations(\n \"EN\", // Language code\n \"OK\", \"Ok\",\n \"UPDATE\", \"Update\",\n \"OPEN\", \"Open\",\n \"CLOSE\", \"Close\",\n \"CANCEL\", \"Cancel\",\n \"MESSAGES\", \"Messages\",\n \"NO_MESSAGES_TO_DISPLAY\", \"No messages to display\",\n \"EVALUATE\", \"Evaluate\",\n \"RUN\", \"Run\",\n \"RUN_AS_ACTIVITY\", \"Run Activity\",\n \"OPEN_SCRIPT\", \"Open script\",\n \"START_SERVER\", \"Start server\",\n \"STOP_SERVER\", \"Stop server\",\n \"SHOW_MESSAGES\", \"Messages\",\n \"UPDATE_APP_SCRIPTS\", \"Update\",\n \"THIS_WILL_OVERWRITE_ALL_APP_SCRIPTS\", \"This will overwrite all application scripts!\",\n \"ENTER_FILE_OR_URL\", \"Enter file or url:\",\n \"UPDATE_APP_SCRIPTS_DONE\", \"Update complete!\",\n \"UPDATE_APP_SCRIPTS_DONE_RESTART\", \"Restart the application to make changes take effect\",\n \"QUIT_APP\", \"Quit\",\n \"CLOSE\", \"Close\",\n \"BE_KIND\", \"Be kind\",\n \"BE_KIND_MESSAGE\", \"Be a kind person\"\n );\n }", "public void setLocalisation(final Room pLocalisation){this.aLocalisation = pLocalisation;}", "public void setLanguageList(Language[] languageList) {\n this.languageList = languageList;\n }", "private void addCustomWords() {\r\n\r\n }", "public PTDictionaryImpl(String lang) {\n language = lang;\n handle = ptInitLibrary0(lang);\n }", "static private void setLanguage(String strL) {\r\n\r\n\t\tstrLanguage = strL;\r\n\r\n\t\t// need to reload it again!\r\n\t\tloadBundle();\r\n\t}", "void localizationChanged();", "void localizationChanged();", "void localizationChanged();", "public abstract String getLocalizationKey();", "private static Map<String, List<String>> loadCitiesByLanguage() {\n String resource = Config.get(\"generate.geography.foreign.birthplace.default_file\",\n \"geography/foreign_birthplace.json\");\n return loadCitiesByLanguage(resource);\n }", "void updateLang() {\n if (lang == null)\n lang = game.q;\n }", "public void setDb(Map<Language, Map<Integer, LanguageEntry>> db) {\r\n\t\t\tthis.db = db;\r\n\t\t}", "public void updateLanguage() {\n this.title.setText(LanguageStringMap.get().getMap().get(TITLE_KEY));\n this.skinSwitcher.updateLanguage();\n this.langSwitcher.updateLanguage();\n this.pawnSwitcher.updateLanguage();\n this.musicManager.updateLanguage();\n this.back.setText(LanguageStringMap.get().getMap().get(BACK_KEY));\n }", "interface Language {\n HashMap<String,String> colorMap= new HashMap<>();\n String getColor(String myToken);\n String defaultColor = \"black\";\n}", "protected static void setLanguage(Language lang) {\r\n\t\tInterface.lang = lang;\r\n\t}", "@Override\r\n protected void buildEditingFields() {\r\n LanguageCodeComboBox languageCodeComboBox = new LanguageCodeComboBox();\r\n languageCodeComboBox.setAllowBlank(false);\r\n languageCodeComboBox.setToolTip(\"The translation language's code is required. It can not be null. Please select one or delete the row.\");\r\n BoundedTextField tf = new BoundedTextField();\r\n tf.setMaxLength(256);\r\n tf.setToolTip(\"This is the translation corresponding to the selected language. This field is required. It can not be null.\");\r\n tf.setAllowBlank(false);\r\n addColumnEditorConfig(languageCodeColumnConfig, languageCodeComboBox);\r\n addColumnEditorConfig(titleColumnConfig, tf);\r\n }", "private void importLanguage(JTFFile file) {\n if (file.getLanguage() != null) {\n if (languagesService.exist(file.getLanguage())) {\n file.setLanguage(languagesService.getSimpleData(file.getLanguage().getName()));\n } else {\n languagesService.create(file.getLanguage());\n }\n\n file.getFilm().setTheLanguage(file.getLanguage());\n }\n }", "public void setLanguageRelatedByCustLanguageId(Language v) throws TorqueException\n {\n if (v == null)\n {\n setCustLanguageId( 999);\n }\n else\n {\n setCustLanguageId(v.getLanguageId());\n }\n aLanguageRelatedByCustLanguageId = v;\n }", "@Test\n\t@PerfTest(invocations = 10)\n\tpublic void defLang() {\n\t\tl.setLocale(l.getLocale().getDefault());\n\t\tassertEquals(\"Register\", Internationalization.resourceBundle.getString(\"btnRegister\"));\n\t}", "public static void setLanguage(String lang){\n String propFileName = lang==null ? \"resources_en\" : lang.equals(\"tr\") ? \"resources_tr\" : \"resources_en\";\n initializeStaticObjects(ResourceBundle.getBundle(\"market.dental.resources.resultProp\", lang==null ? Locale.ENGLISH : lang.equals(\"tr\") ? new Locale(\"tr\") : Locale.ENGLISH));\n }", "public Map<Locale, T> getAvailableLocalesAndTranslatables() {\n Map<Locale, T> returnMap = new HashMap<Locale, T>();\n List<T> items = (List<T>) MongoEntity.getDs().find(this.getClass(), \"reference\", this.reference).asList();\n\n if (items != null && !items.isEmpty()) {\n for (T item : items) {\n returnMap.put(item.language, item);\n }\n }\n return returnMap;\n }", "int insertSelective(countrylanguage record);", "public ResteasyServiceBuilder withLanguageMapping(String ext, String lang) {\n this.languages.put(ext, lang);\n return this;\n }", "public void setLanguageId(Integer languageId) {\r\n this.languageId = languageId;\r\n }", "public List<PmPropertyLanguageBean> selectPropertyWithLanguages(Map Paramter);", "public static void OnLanguageLoaded( StringTranslate translator )\r\n\t{\n\t\t\r\n\t\tif ( m_bModsInitialized )\r\n\t\t{\r\n\t \tIterator modIterator = m_ModList.iterator();\r\n\t \t\r\n\t \twhile ( modIterator.hasNext() )\r\n\t \t{\r\n\t \t\tFCAddOn tempMod = (FCAddOn)modIterator.next();\r\n\t \t\t\r\n\t \t\ttempMod.OnLanguageLoaded( translator );\r\n\t \t\t\r\n\t \t\tString sPrefix = tempMod.GetLanguageFilePrefix();\r\n\t \t\t\r\n\t \t\tif ( sPrefix != null )\r\n\t \t\t{\r\n\t \t\t\tLogMessage( \"...Add-On Handler Loading Custom Language File With Prefix: \" + sPrefix + \"...\" );\r\n\t \t\t\t\r\n\t \t\t\ttranslator.LoadAddonLanguageExtension( sPrefix );\r\n\t \t\t}\r\n\t \t}\t \t\r\n\t\t}\r\n\t}", "int updateByPrimaryKeySelective(countrylanguage record);", "private Map<String,String> processByLocale(List<PropertyFieldValue> fieldValueList, String locale) {\n\t\tInteger selectedIndex = 0;\n\t\tInteger currentIndex = 0;\n\t\tboolean foundLanguageEntry = false;\n\t\tInteger localeEquivalent = FlatParserConstants.localeEquivalent(locale);\n\t\tfor(PropertyFieldValue fieldValue : fieldValueList){\n\t\t\tInteger data1Entry = fieldValue.getData1().getIntVal();\n\t\t\tif(data1Entry == localeEquivalent){\n\t\t\t\tselectedIndex = currentIndex;\n\t\t\t\tfoundLanguageEntry = true;\n\t\t\t}\n\t\t\tcurrentIndex++;\n\t\t}\n\t\tPropertyFieldValue fieldValue = fieldValueList.get(selectedIndex);\n\t\tMap<String, String> result = new HashMap<>();\n\t\tresult.put(TEXT_KEY, fieldValue.getData2().getStrVal());\n\t\tresult.put(FOUND_KEY, String.valueOf(foundLanguageEntry));\n\t\treturn result;\n\t}", "private void setLocale() {\n\t\tLocale locale = new Locale(this.getString(R.string.default_map_locale));\n Locale.setDefault(locale);\n Configuration config = new Configuration();\n config.locale = locale;\n getBaseContext().getResources().updateConfiguration(config,\n getBaseContext().getResources().getDisplayMetrics());\n\t}", "public Map<Language,String> getAllMessageFired(final SessionContext ctx)\r\n\t{\r\n\t\treturn (Map<Language,String>)getAllLocalizedProperties(ctx,MESSAGEFIRED,C2LManager.getInstance().getAllLanguages());\r\n\t}", "private void setTranslationKey(String name) {\n\t\t\r\n\t}", "public static void registerFields(Multimap<String,NormalizedContentInterface> f) {\n fields = f;\n }", "public void setLanguage (String language) {\n\t\tthis.language=language;\n\t\tthis.update();\n\t}", "public void setAllMessageFired(final SessionContext ctx, final Map<Language,String> value)\r\n\t{\r\n\t\tsetAllLocalizedProperties(ctx,MESSAGEFIRED,value);\r\n\t}", "public void setLanguage(String language) {\r\n this.language = language;\r\n }", "List<Language> getAll();", "private void addTranslations() {\n addTranslation(\"org.argouml.uml.diagram.ui.FigNote\",\n \"org.argouml.uml.diagram.static_structure.ui.FigComment\");\n addTranslation(\"org.argouml.uml.diagram.static_structure.ui.FigNote\",\n \"org.argouml.uml.diagram.static_structure.ui.FigComment\");\n addTranslation(\"org.argouml.uml.diagram.state.ui.FigState\",\n \"org.argouml.uml.diagram.state.ui.FigSimpleState\");\n addTranslation(\"org.argouml.uml.diagram.ui.FigCommentPort\",\n \"org.argouml.uml.diagram.ui.FigEdgePort\");\n addTranslation(\"org.tigris.gef.presentation.FigText\",\n \"org.argouml.uml.diagram.ui.ArgoFigText\");\n addTranslation(\"org.tigris.gef.presentation.FigLine\",\n \"org.argouml.gefext.ArgoFigLine\");\n addTranslation(\"org.tigris.gef.presentation.FigPoly\",\n \"org.argouml.gefext.ArgoFigPoly\");\n addTranslation(\"org.tigris.gef.presentation.FigCircle\",\n \"org.argouml.gefext.ArgoFigCircle\");\n addTranslation(\"org.tigris.gef.presentation.FigRect\",\n \"org.argouml.gefext.ArgoFigRect\");\n addTranslation(\"org.tigris.gef.presentation.FigRRect\",\n \"org.argouml.gefext.ArgoFigRRect\");\n addTranslation(\n \"org.argouml.uml.diagram.deployment.ui.FigMNodeInstance\",\n \"org.argouml.uml.diagram.deployment.ui.FigNodeInstance\");\n addTranslation(\"org.argouml.uml.diagram.ui.FigRealization\",\n \"org.argouml.uml.diagram.ui.FigAbstraction\");\n }", "public static void setLangMessage(String langkey, String message)\n\t{\n\t\tMain.LangConfig.set(\"messages.\"+langkey, message);\n\t\tif (Main.LangFile.exists())\n\t\t{\n try {\n \tMain.LangConfig.save(Main.LangFile);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "Builder addTranslator(String value);", "private JSONObject languageMenu(JSONObject base) {\n JSONObject lang = base.getJSONObject(\"language\");\n try {\n } catch (Exception e) {\n e.printStackTrace();\n }\n while (true) {\n String input = \"\";\n try {\n visual.renderSettings(lang, \"Language Settings\");\n visual.renderMessage(\"Write the option to change: \");\n input = visual.getInput();\n } catch (Exception e) {\n e.printStackTrace();\n }\n LanguageHandler langhan = LanguageHandler.getInstance();\n JSONObject opt = null;\n LanguageInfo info = null;\n switch (input) {\n case (\"name\"):\n opt = new JSONObject();\n opt.put(\"value\", lang.getString(\"name\"));\n opt.put(\"options\", new JSONArray(langhan.getLanguages()));\n try {\n visual.renderSettings(opt, \"Language\");\n String in = visual.getInput();\n if (langhan.getLanguages().contains(in)) {\n lang.put(\"name\", in);\n info = langhan.getLanguageInfo(in);\n lang.put(\"size\", info.getDimensions().get(0));\n lang.put(\"dictionary\", info.getDictionaries().get(0));\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n break;\n case (\"size\"):\n opt = new JSONObject();\n info = langhan.getLanguageInfo(lang.getString(\"name\"));\n opt.put(\"value\", lang.getString(\"size\"));\n opt.put(\"options\", new JSONArray(info.getDimensions()));\n try {\n visual.renderSettings(opt, \"Size\");\n String in = visual.getInput();\n if (info.getDimensions().contains(in)) {\n lang.put(\"size\", in);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n break;\n case (\"dictionary\"):\n opt = new JSONObject();\n info = langhan.getLanguageInfo(lang.getString(\"name\"));\n opt.put(\"value\", lang.getString(\"dictionary\"));\n opt.put(\"options\", new JSONArray(info.getDictionaries()));\n try {\n visual.renderSettings(opt, \"Dictionary\");\n String in = visual.getInput();\n if (info.getDictionaries().contains(in)) {\n lang.put(\"dictionary\", in);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n break;\n case (\"back\"):\n return lang;\n }\n }\n }", "public static void updateListingTranslation(int listingId, String language){EtsyService.putService(\"/listings/\"+listingId+\"/translations/\"+language);}", "public void updateI18N() {\n\t\t/* Update I18N in the menuStructure */\n\t\tappMenu.updateI18N();\n\t\t/* Pack all */\n\t\tLayoutShop.packAll(shell);\n\t}", "public void setLanguage(String language) {\n this.standardPairs.put(Parameters.LANGUAGE, language);\n }", "public void addOntologies20070510nid3Language( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), ONTOLOGIES20070510NID3LANGUAGE, value);\r\n\t}", "public interface LocalizationService {\n\n /**\n *\n * @param locale - the languge that we like to present\n * @return\n */\n Map<String, String> getAllLocalizationStrings(Locale locale);\n\n /**\n * @param prefix - show all strings which start with thr prefix\n * @param locale - the languge that we like to present\n * @return\n */\n// Map<String, String> getAllLocalizationStringsByPrefix(String prefix, Locale locale);\n\n\n /**\n * @param key - the specific key\n * @param locale - the language that we like to present\n * @return\n */\n String getLocalizationStringByKey(String key, Locale locale);\n\n /**\n * Get the default system locale\n * @return\n */\n Locale getDefaultLocale();\n\n /**\n * Get evidence name\n * @param evidence\n * @return\n */\n String getIndicatorName(Evidence evidence);\n\n\n String getAlertName(Alert alert);\n\n Map<String,Map<String, String>> getMessagesToAllLanguages();\n}", "public abstract void addUnit(LanguageUnit languageUnit);", "private void setLanguage(String currentLang) {\n AppSharedPreference.getInstance().putString(this, AppSharedPreference.PREF_KEY.CURRENT_LANGUAGE, currentLang);\n AppSharedPreference.getInstance().putString(this, AppSharedPreference.PREF_KEY.CURRENT_LANGUAGE_CODE, String.valueOf(languageCode));\n tvEnglish.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);\n tvChineseTrad.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);\n tvChineseSimple.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);\n tvMalyalm.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);\n tvHindi.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);\n tvUrdu.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);\n switch (currentLang) {\n case Constants.AppConstant.CHINES_TRAD:\n tvChineseTrad.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.ic_check_green, 0);\n break;\n case Constants.AppConstant.CHINES_SIMPLE:\n tvChineseSimple.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.ic_check_green, 0);\n break;\n case Constants.AppConstant.MALAYALAM:\n tvMalyalm.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.ic_check_green, 0);\n break;\n case Constants.AppConstant.HINDI:\n tvHindi.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.ic_check_green, 0);\n break;\n case Constants.AppConstant.ARABIC:\n tvUrdu.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.ic_check_green, 0);\n break;\n default:\n tvEnglish.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.ic_check_green, 0);\n }\n }", "private static void add(String key, List<FieldDefinition> value) {\n if (messageFieldsMap.containsKey(key)) {\n LOGGER.error(\"Initialization error: \" + key + \" already exists in messageFieldsMap\");\n } else {\n messageFieldsMap.put(key, value);\n }\n }", "public interface LanguageInterface {\n public void setLanguage();\n}", "public void putSecondaryLanguage(String value){\n editor.putString(SECONDARY_LANGUAGE, value);\n editor.apply();\n }", "countrylanguage selectByPrimaryKey(countrylanguageKey key);" ]
[ "0.66405576", "0.6566677", "0.6554258", "0.63923407", "0.6343879", "0.5968797", "0.5808754", "0.5593291", "0.5560098", "0.544431", "0.5413241", "0.54015553", "0.5392206", "0.53707534", "0.5366228", "0.5358564", "0.534012", "0.5297388", "0.52790457", "0.5254909", "0.5248294", "0.5242027", "0.52218974", "0.5213206", "0.52067566", "0.5196705", "0.51900405", "0.5185811", "0.5165572", "0.5147992", "0.51457983", "0.5132372", "0.5125115", "0.5098254", "0.5081486", "0.50779825", "0.5062331", "0.5051179", "0.5038547", "0.50274765", "0.5016304", "0.49940738", "0.49929538", "0.4986881", "0.498388", "0.49713272", "0.496385", "0.4961164", "0.49557188", "0.49497184", "0.49489957", "0.49406713", "0.49383453", "0.49357194", "0.4933125", "0.4933125", "0.4933125", "0.4927175", "0.49215657", "0.4920462", "0.49152893", "0.49107665", "0.4903888", "0.49022338", "0.48920253", "0.48908928", "0.48869056", "0.4882478", "0.4882018", "0.48815915", "0.48812103", "0.4873166", "0.48726624", "0.48686382", "0.48587814", "0.48582274", "0.48533687", "0.48472136", "0.48438317", "0.48405904", "0.4839231", "0.48323455", "0.48316857", "0.481811", "0.4810608", "0.4809264", "0.4809068", "0.4807901", "0.48010013", "0.48004273", "0.47969696", "0.47950864", "0.47890648", "0.47849923", "0.47841692", "0.4773669", "0.4768563", "0.4767536", "0.4766719", "0.47653934" ]
0.65680957
1
/ Define the type of that instance
public static <E> String defineInstanceOf(E doc) { String instanceName = doc.getClass().getSimpleName(); List<String> enumNames = new ArrayList<String>(); Arrays.asList(WithResourceType.values()).forEach( (t) -> {enumNames.add(t.toString()); return;} ); if(enumNames.contains(instanceName)) { if(!instanceName.equalsIgnoreCase(WithResourceType.WithResource.toString())) return instanceName.toLowerCase(); else return WithResourceType.RecordResource.toString().toLowerCase(); } else return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static $type () {\n }", "abstract public Type type();", "@Override\n public Class<?> getObjectType() {\n return this.type;\n }", "Type() {\n }", "type getType();", "public Class getType();", "protected abstract String getType();", "private String getType(){\r\n return type;\r\n }", "public InsulinType(){\n super();\n }", "public abstract String getType();", "public abstract String getType();", "public abstract String getType();", "public abstract String getType();", "public abstract String getType();", "public abstract String getType();", "public abstract String getType();", "public abstract String getType();", "abstract public Type getType();", "public abstract Type getType();", "public abstract void setType();", "public ReocType() \r\n {\r\n super();\r\n }", "@Override\n public Type getType() {\n return type;\n }", "@Override\n public Type getType() {\n return type;\n }", "abstract public String getType();", "Type createType();", "Type createType();", "Type createType();", "@Override abstract public String type();", "@Override\n public String getType(){\n return Type;\n }", "void setClassType(String classType);", "public Type() {\n super();\n }", "void setType(Type type)\n {\n this.type = type;\n }", "public Object getType()\r\n {\r\n\treturn type;\r\n }", "public void setType(Class type) {\n\t this.type = type;\n\t }", "@Override public Type type() {\n return type;\n }", "Type type();", "Type type();", "public int getType() { return type; }", "public int getType() { return type; }", "public String getType() {return type;}", "XClass getType();", "public Class getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "@Override\n\tpublic int getType() {\n\t\treturn 1;\n\t}", "public String getType() {\n\t\treturn \"class\";\n\t}", "@Override\n\tpublic String typeKey() {\n\t return \"class\";\n\t}", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "public String getType() { return type; }", "@Override\r\n\tpublic String getType() {\n\t\treturn type;\r\n\t}", "Object getClass_();", "Object getClass_();", "public org.python.types.Type __new__(org.python.types.Type cls);", "@Override\n\tpublic String type() {\n\t\treturn type;\n\t}", "public String type();", "public String getType(){\n\treturn type;\n }", "public void setStaticType(Class type);", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();" ]
[ "0.68053895", "0.6686221", "0.6648136", "0.66368663", "0.66108674", "0.6589501", "0.6546466", "0.65109015", "0.65098095", "0.64968383", "0.64968383", "0.64968383", "0.64968383", "0.64968383", "0.64968383", "0.64968383", "0.64968383", "0.6482628", "0.6481466", "0.64766157", "0.6457292", "0.64440536", "0.64440536", "0.64187336", "0.6418538", "0.6418538", "0.6418538", "0.6414932", "0.6412077", "0.6405821", "0.64002913", "0.63998646", "0.639876", "0.6395473", "0.63859093", "0.6375578", "0.6375578", "0.6342233", "0.6342233", "0.63297427", "0.6326814", "0.6308893", "0.62951195", "0.62951195", "0.62951195", "0.62951195", "0.62951195", "0.62951195", "0.62951195", "0.62951195", "0.62951195", "0.62951195", "0.62951195", "0.62951195", "0.62951195", "0.62951195", "0.62951195", "0.62951195", "0.62951195", "0.62951195", "0.62951195", "0.62951195", "0.62951195", "0.62951195", "0.62951195", "0.62951195", "0.62951195", "0.6293905", "0.6276284", "0.6274532", "0.6269145", "0.6269145", "0.6269145", "0.6269145", "0.6269145", "0.6269145", "0.6269145", "0.6269145", "0.6269145", "0.6269145", "0.6269145", "0.62637675", "0.624767", "0.624209", "0.624209", "0.6225795", "0.6213373", "0.6212626", "0.6208662", "0.62076545", "0.6201791", "0.6201791", "0.6201791", "0.6201791", "0.6201791", "0.6201791", "0.6201791", "0.6201791", "0.6201791", "0.6201791", "0.6201791" ]
0.0
-1
/ Retrieve from DB the resources that where returned from an elastic query. Returns a Map of List of Resources per Type.
public static Map<String, List<?>> getResourcesPerType(SearchResponse resp) { Map<String, List<ObjectId>> idsOfEachType = new HashMap<String, List<ObjectId>>(); resp.getHits().forEach( (h) -> { if(!idsOfEachType.containsKey(h.getType())) { idsOfEachType.put(h.getType(), new ArrayList<ObjectId>() {{ add(new ObjectId(h.getId())); }}); } else { idsOfEachType.get(h.getType()).add(new ObjectId(h.getId())); } }); Map<String, List<?>> resourcesPerType = new HashMap<String, List<?>>(); for(Entry<String, List<ObjectId>> e: idsOfEachType.entrySet()) { resourcesPerType.put(e.getKey() , DB.getRecordResourceDAO().getByIds(e.getValue())); } return resourcesPerType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getResources(Type type) {\n \t\treturn resources[type.ordinal()];\n \t}", "@Override\r\n\tpublic List<Resource> getAllResources(String category, String type) {\r\n\t\tList<Resource> getAll = resourceDao.findByCategoryAndType(category, type);\r\n\t\tlogger.info(\"Resources fetched by category: \" + category + \" and type: \" + type);\r\n\t\treturn getAll;\r\n\t}", "public List<Resource> findByType(ResourceType type) {\n\t\tMap<String, Object> typeFilter = new HashMap<>(1);\n\n\t\ttypeFilter.put(\"type\", new ValueParameter(type));\n\n\t\treturn this.filter(typeFilter);\n\t}", "public List<ResourceBase> listTypes() throws ResourceException;", "public List<Resources> getResourcesByLocationAndResourceType(int locationId, int resourceTypeId){\n\t\treturn jtemp.query(\"SELECT * FROM Resources \"\n\t\t\t\t\t\t\t\t\t\t+ \"WHERE location_id = ? \"\n\t\t\t\t\t\t\t\t\t\t+ \"AND resource_type_id = ? \" \n\t\t\t\t\t + \"AND is_available >= 0\",\n\t\t\t\t\t\t\t\t\t\tnew ResourcesMapper(),\n\t\t\t\t\t\t\t\t\t\tlocationId,\n\t\t\t\t\t\t\t\t\t\tresourceTypeId);\n\t}", "public List<String> getResourceTypes(){\n\t\treturn jtemp.queryForList(\"SELECT resource_type_id||' '||resource_type_name FROM resource_type\", String.class);\n\t}", "List<ResourceType> resourceTypes();", "public List<PrimaryType> getResources() {\n return resources;\n }", "public Set<ResourceType> getAllResourceTypes() {\n parseExternalResources();\n Set<ResourceType> resourceTypes = new HashSet<ResourceType>();\n for (DatacollectionGroup group : externalGroupsMap.values()) {\n for (ResourceType rt : group.getResourceTypeCollection()) {\n if (!contains(resourceTypes, rt))\n resourceTypes.add(rt);\n }\n }\n return resourceTypes;\n }", "public List<Resources> getAllResources()\r\n\t{\r\n\t\tList<Resources> l = resourceRepository.findByResource();\r\n\t\treturn l;\r\n\t}", "@Override\n\tpublic List<Resources> selectByResByAreaId(String id,String type) {\n\t\tMap<String, Object> param = new HashMap<String, Object>();\n\t\tparam.put(\"id\", id);\n\t\tparam.put(\"type\", type);\n\t\treturn ResourcesMapper.selectByResByAreaId(param);\n\t}", "public List getResourceTypes(ResourceType resourceType);", "@Override\r\n\tpublic List<Resources> resourcesPage(Map<String, Object> map) {\n\t\treturn resourcesDao.resourcesPage(map);\r\n\t}", "ResponseEntity<List<Type>> findTaskTypes();", "Collection<? extends Resource> getResources();", "public Collection<Resource> getResources() {\n return resourceRegistry.getEntries().values();\n }", "public List<Resources> getResourcesByLocationAndResourceTypeNonSuper(int locationId, int resourceTypeId){\n\t\treturn jtemp.query(\"SELECT * FROM Resources \"\n\t\t\t\t\t\t\t\t\t\t+ \"WHERE location_id = ? \"\n\t\t\t\t\t\t\t\t\t\t+ \"AND resource_type_id = ? \"\n\t\t\t\t\t\t\t\t\t\t+ \"AND is_super_room = ?\"\n\t\t\t\t\t\t\t\t\t\t+ \" order by is_available DESC\", \n\t\t\t\t\t\t\t\t\t\tnew ResourcesMapper(),\n\t\t\t\t\t\t\t\t\t\tlocationId,\n\t\t\t\t\t\t\t\t\t\tresourceTypeId,\n\t\t\t\t\t\t\t\t\t\t0);\n\t}", "public static java.util.Iterator<org.semanticwb.model.ResourceType> listResourceTypes()\r\n {\r\n java.util.Iterator it=sclass.listInstances();\r\n return new org.semanticwb.model.GenericIterator<org.semanticwb.model.ResourceType>(it, true);\r\n }", "public List<Type> getAll();", "public List<ExperimentCatResource> get(ResourceType type, int limit, int offset, Object orderByIdentifier,\n ResultOrderType resultOrderType) throws RegistryException {\n List<ExperimentCatResource> result = new ArrayList<ExperimentCatResource>();\n EntityManager em = null;\n try {\n em = ExpCatResourceUtils.getEntityManager();\n em.getTransaction().begin();\n QueryGenerator generator;\n Query q;\n switch (type) {\n case PROJECT:\n generator = new QueryGenerator(PROJECT);\n UserPK userPK = new UserPK();\n userPK.setGatewayId(getGatewayId());\n userPK.setUserName(user);\n Users users = em.find(Users.class, userPK);\n Gateway gatewayModel = em.find(Gateway.class, gatewayId);\n generator.setParameter(\"users\", users);\n if (gatewayModel != null) {\n generator.setParameter(\"gateway\", gatewayModel);\n }\n\n //ordering - only supported only by CREATION_TIME\n if (orderByIdentifier != null && resultOrderType != null\n && orderByIdentifier.equals(Constants.FieldConstants.ProjectConstants.CREATION_TIME)) {\n q = generator.selectQuery(em, ProjectConstants.CREATION_TIME, resultOrderType);\n } else {\n q = generator.selectQuery(em);\n }\n\n //pagination\n if (limit > 0 && offset >= 0) {\n q.setFirstResult(offset);\n q.setMaxResults(limit);\n }\n\n for (Object o : q.getResultList()) {\n Project project = (Project) o;\n org.apache.airavata.registry.core.experiment.catalog.resources.ProjectResource projectResource = (org.apache.airavata.registry.core.experiment.catalog.resources.ProjectResource) Utils.getResource(ResourceType.PROJECT, project);\n result.add(projectResource);\n }\n break;\n case EXPERIMENT:\n generator = new QueryGenerator(EXPERIMENT);\n generator.setParameter(ExperimentConstants.USER_NAME, getUser());\n\n //ordering - only supported only by CREATION_TIME\n if (orderByIdentifier != null && resultOrderType != null\n && orderByIdentifier.equals(Constants.FieldConstants.ProjectConstants.CREATION_TIME)) {\n q = generator.selectQuery(em, ExperimentConstants.CREATION_TIME, resultOrderType);\n } else {\n q = generator.selectQuery(em);\n }\n\n //pagination\n if (limit > 0 && offset >= 0) {\n q.setFirstResult(offset);\n q.setMaxResults(limit);\n }\n for (Object o : q.getResultList()) {\n Experiment experiment = (Experiment) o;\n ExperimentResource experimentResource = (ExperimentResource) Utils.getResource(ResourceType.EXPERIMENT, experiment);\n result.add(experimentResource);\n }\n\n break;\n default:\n logger.error(\"Unsupported resource type for worker resource.\", new IllegalArgumentException());\n break;\n }\n em.getTransaction().commit();\n em.close();\n } catch (Exception e) {\n logger.error(e.getMessage(), e);\n throw new RegistryException(e);\n } finally {\n if (em != null && em.isOpen()) {\n if (em.getTransaction().isActive()) {\n em.getTransaction().rollback();\n }\n em.close();\n }\n }\n return result;\n }", "public ResourceSet getAllResources() {\n return getAllResourcesExcept(null);\n }", "public SortedMap<String,Long>\n getResources()\n {\n TreeMap<String, Long> toReturn = new TreeMap<String, Long>();\n \n getResourcesHelper(toReturn);\n \n if(!toReturn.isEmpty()) {\n return Collections.unmodifiableSortedMap(toReturn);\n }\n\n return null;\n }", "public List getResourceTypesByIdList(final Map idList);", "List<Resource> resources();", "public org.semanticwb.model.GenericIterator<org.semanticwb.model.Resource> listResources()\r\n {\r\n return new org.semanticwb.model.GenericIterator<org.semanticwb.model.Resource>(getSemanticObject().listObjectProperties(swb_hasPTResource));\r\n }", "Iterable<Resources> findAllByAccountId(Long accountId);", "@Override\n public GetLogLevelsByResourceTypesResult getLogLevelsByResourceTypes(GetLogLevelsByResourceTypesRequest request) {\n request = beforeClientExecution(request);\n return executeGetLogLevelsByResourceTypes(request);\n }", "public Map<ResourceId, ResourceConfig> getResourceMap() {\n return _resourceMap;\n }", "Map<String, String> findAllInMap();", "public List<Resources> getResourcesByLocation(int locationId){\n\t\treturn jtemp.query(\"SELECT * FROM Resources WHERE location_id = ? AND is_available >= 0 order By Resource_name\", new ResourcesMapper(), locationId);\n\t}", "@objid (\"be13c135-d5bf-4f14-9794-2c2fbdc9e900\")\n <T extends ResourceType> List<T> getDefinedResourceType(java.lang.Class<T> filterClass);", "@GetMapping(\"/types\")\n\t@Timed\n\tpublic List<TypesDTO> getAllTypes() {\n\t\tthis.log.debug(\"REST request to get all Types\");\n\t\treturn this.typesService.findAll();\n\t}", "public List<Resource> getAvailableResources();", "public RegTapResource[] getResources() {\n return resMap_.values().toArray( new RegTapResource[ 0 ] );\n }", "public int getNumberOf(ResType type) { return resources.get(type); }", "public List<T> findAll() {\n\n\t\tConnection dbConnection = ConnectionFactory.getConnection();\n\t\tPreparedStatement findStatement = null;\n\t\tResultSet rs = null;\n\t\tString findStatementString = \"SELECT * FROM \" + type.getSimpleName();\n\n\t\ttry {\n\t\t\tfindStatement = dbConnection.prepareStatement(findStatementString);\n\t\t\trs = findStatement.executeQuery();\n\t\t\treturn createObjects(rs);\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.log(Level.WARNING, type.getName() + \"DAO:findAll\" + e.getMessage());\n\t\t} finally {\n\t\t\tConnectionFactory.close(rs);\n\t\t\tConnectionFactory.close(findStatement);\n\t\t\tConnectionFactory.close(dbConnection);\n\t\t}\n\t\treturn null;\n\t}", "Map getAll();", "private Map<String, List<String>> getObjectsGroupedByType() throws SQLException {\n boolean xmlDbAvailable = dbSupport.isXmlDbAvailable();\n String query =\n // Most of objects are seen in ALL_OBJECTS\n \"SELECT OBJECT_TYPE, OBJECT_NAME FROM ALL_OBJECTS WHERE OWNER = ? \" +\n (xmlDbAvailable\n // XML tables are seen in a separate dictionary table\n ? \"UNION ALL SELECT 'TABLE', TABLE_NAME FROM ALL_XML_TABLES WHERE OWNER = ? \" +\n \"AND TABLE_NAME NOT LIKE 'BIN$________________________$_'\" //ignore recycle bin objects\n : \"\");\n\n // Count params\n int n = 1;\n if (xmlDbAvailable) n += 1;\n String[] params = new String[n];\n Arrays.fill(params, name);\n\n List<Map<String, String>> rows = jdbcTemplate.queryForList(query, params);\n Map<String, List<String>> result = new HashMap<String, List<String>>();\n for (Map<String, String> row : rows) {\n String objectType = row.get(\"OBJECT_TYPE\");\n String objectName = row.get(\"OBJECT_NAME\");\n if (result.containsKey(objectType)) {\n result.get(objectType).add(objectName);\n } else {\n List<String> newList = new ArrayList<String>();\n newList.add(objectName);\n result.put(objectType, newList);\n }\n }\n return result;\n }", "@Nonnull\n @Override\n public Set<ResourceType> list() {\n return getTables().stream()\n .map(Table::name)\n .map(String::toLowerCase)\n .map(LOWER_CASE_RESOURCE_NAMES::get)\n .filter(Objects::nonNull)\n .collect(Collectors.toSet());\n }", "public ArrayList<Resource> getStaticInfo() {\n\t\tArrayList<Resource> resources = new ArrayList<Resource>();\n\n\t\t// ~~~ CPU\n\t\tResource cpuResource = new Resource();\n\t\tcpuResource.setResourceType(ResourceType.CPU);\n\t\tcpuResource.setName(clientStaticInfo.getCPUVendor() + \" CPU\");\n\n\t\tAttribute cpuSpeedAttribute = new Attribute();\n\t\tcpuSpeedAttribute.setAttributeType(AttributeType.CPUSpeed);\n\t\tcpuSpeedAttribute.setValue(Double.parseDouble(clientStaticInfo\n\t\t\t\t.getCPUSpeed()));\n\t\tcpuSpeedAttribute.setDate(new Date());\n\t\tcpuResource.addAttribute(cpuSpeedAttribute);\n\n\t\tresources.add(cpuResource);\n\t\t// ~~~ RAM\n\t\tResource ramResource = new Resource();\n\t\tramResource.setResourceType(ResourceType.RAM);\n\t\tramResource.setName(\"RAM\");\n\n\t\tAttribute ramTotalAttribute = new Attribute();\n\t\tramTotalAttribute.setAttributeType(AttributeType.TotalMemory);\n\t\tramTotalAttribute.setValue(Double.parseDouble(clientStaticInfo\n\t\t\t\t.getRAMInfo()));\n\t\tramTotalAttribute.setDate(new Date());\n\t\tramResource.addAttribute(ramTotalAttribute);\n\n\t\tresources.add(ramResource);\n\t\t// ~~~ OS\n\t\tResource osResource = new Resource();\n\t\tosResource.setResourceType(ResourceType.OS);\n\t\tosResource.setName(clientStaticInfo.getOSInfo());\n\n\t\tresources.add(osResource);\n\t\t// ~~~ SStorage\n\t\tResource sstorageResource = new Resource();\n\t\tsstorageResource.setResourceType(ResourceType.SStorage);\n\t\tsstorageResource.setName(\"SSTORAGE\");\n\n\t\tAttribute sstorageTotalAttribute = new Attribute();\n\t\tsstorageTotalAttribute.setAttributeType(AttributeType.TotalStorage);\n\t\tsstorageTotalAttribute.setValue(Double.parseDouble(clientStaticInfo\n\t\t\t\t.getSStorageInfo()));\n\t\tsstorageTotalAttribute.setDate(new Date());\n\t\tsstorageResource.addAttribute(sstorageTotalAttribute);\n\n\t\tresources.add(sstorageResource);\n\n\t\treturn resources;\n\t}", "@Override\n public GetEventConfigurationByResourceTypesResult getEventConfigurationByResourceTypes(GetEventConfigurationByResourceTypesRequest request) {\n request = beforeClientExecution(request);\n return executeGetEventConfigurationByResourceTypes(request);\n }", "public List<Resource> getDBpediaResources(THashSet<String> anchorList, EntityType type)\n\t{\n\t\tList<Resource> resourceList = new ArrayList<Resource>();\n\t\tfor (String anchor : anchorList)\n\t\t{\n\t\t\tif (!anchor.isEmpty() && !anchor.startsWith(\"File:\") && !anchor.startsWith(\"Image:\")\n\t\t\t\t\t&& !anchor.startsWith(\"Image'3A\") && !anchor.contains(\"index.php\"))\n\t\t\t{\n\t\t\t\tResource resource = this.getResourceURI(anchor, type);\n\t\t\t\tif (resource != null && !resource.isEmpty())\n\t\t\t\t\tresourceList.add(resource);\n\t\t\t}\n\t\t}\n\t\treturn resourceList;\n\t}", "<T> void lookupAll(Class<T> type, Collection<T> out);", "public final ArrayList<Class<? extends IResource>> getSelectableResourceTypes() {\n\treturn mSelectableResourceTypes;\n}", "public List<Class<? extends Resource>> getAvailableTypes(OgemaLocale locale);", "public List<Resource> listResources() throws IOException,\n\t\t\tClassNotFoundException {\n\t\treturn list(Resource.class);\n\t}", "@RequestMapping(value = \"/restful/referenceslist\", method = RequestMethod.GET)\n public SortedMap<Long,String> getReferencesByType(@RequestParam(value=\"referenceType\") String referenceType, Locale locale) {\n\t\tlogger.info(\"Inside getReferencesByType() method...\");\n\t\tSortedMap<Long,String> returnValue = new TreeMap<Long,String>();\n\t\t\n\t\tswitch (referenceType) {\n\t\t\n\t\t\tcase(\"IrelandCounty\"):\n\t\t\t\tMap<Long, String> irelandCountyMap = referenceStore.getIrelandCounty(); \n\t\t\t\tSortedMap<Long, String> localizedIrelandCountyMap = new TreeMap<Long, String>(irelandCountyMap);\n\t\t\t\tfor (Map.Entry<Long, String> entry : localizedIrelandCountyMap.entrySet()) {\n\t\t\t\t\tlocalizedIrelandCountyMap.replace(entry.getKey(), messageSource.getMessage(entry.getValue(), new String[0], locale));\n\t\t\t\t}\n\t\t\t\treturnValue = localizedIrelandCountyMap;\n\t\t\t\tbreak;\n\t\t \n\t\t\n\t\t\tcase(\"AccommodationType\"):\n\t\t\t\tMap<Long, String> accommodationTypeMap = referenceStore.getAccommodationType(); \n\t\t\t\tSortedMap<Long, String> localizedAccommodationTypeMap = new TreeMap<Long, String>(accommodationTypeMap);\n\t\t\t\tfor (Map.Entry<Long, String> entry : localizedAccommodationTypeMap.entrySet()) {\n\t\t\t\t\tlocalizedAccommodationTypeMap.replace(entry.getKey(), messageSource.getMessage(entry.getValue(), new String[0], locale));\n\t\t\t\t}\n\t\t\t\treturnValue = localizedAccommodationTypeMap;\n\t\t\t\tbreak;\n\t\t \n\t\t\n\t\t\tcase(\"AccommodationCondition\"):\n\t\t\t\tMap<Long, String> accommodationConditionMap = referenceStore.getAccommodationCondition(); \n\t\t\t\tSortedMap<Long, String> localizedAccommodationConditionMap = new TreeMap<Long, String>(accommodationConditionMap);\n\t\t\t\tfor (Map.Entry<Long, String> entry : localizedAccommodationConditionMap.entrySet()) {\n\t\t\t\t\tlocalizedAccommodationConditionMap.replace(entry.getKey(), messageSource.getMessage(entry.getValue(), new String[0], locale));\n\t\t\t\t}\n\t\t\t\treturnValue = localizedAccommodationConditionMap;\n\t\t\t\tbreak;\n\t\t \n\t\t\n\t\t\tcase(\"NumberOfBeds\"):\n\t\t\t\tMap<Long, String> numberOfBedsMap = referenceStore.getNumberOfBeds(); \n\t\t\t\tSortedMap<Long, String> localizedNumberOfBedsMap = new TreeMap<Long, String>(numberOfBedsMap);\n\t\t\t\tfor (Map.Entry<Long, String> entry : localizedNumberOfBedsMap.entrySet()) {\n\t\t\t\t\tlocalizedNumberOfBedsMap.replace(entry.getKey(), messageSource.getMessage(entry.getValue(), new String[0], locale));\n\t\t\t\t}\n\t\t\t\treturnValue = localizedNumberOfBedsMap;\n\t\t\t\tbreak;\n\t\t \n\t\t\n\t\t\tcase(\"VacantOrShared\"):\n\t\t\t\tMap<Long, String> vacantOrSharedMap = referenceStore.getVacantOrShared(); \n\t\t\t\tSortedMap<Long, String> localizedVacantOrSharedMap = new TreeMap<Long, String>(vacantOrSharedMap);\n\t\t\t\tfor (Map.Entry<Long, String> entry : localizedVacantOrSharedMap.entrySet()) {\n\t\t\t\t\tlocalizedVacantOrSharedMap.replace(entry.getKey(), messageSource.getMessage(entry.getValue(), new String[0], locale));\n\t\t\t\t}\n\t\t\t\treturnValue = localizedVacantOrSharedMap;\n\t\t\t\tbreak;\n\t\t \n\t\t\n\t\t\tcase(\"YouCanAccommodate\"):\n\t\t\t\tMap<Long, String> youCanAccommodateMap = referenceStore.getYouCanAccommodate(); \n\t\t\t\tSortedMap<Long, String> localizedYouCanAccommodateMap = new TreeMap<Long, String>(youCanAccommodateMap);\n\t\t\t\tfor (Map.Entry<Long, String> entry : localizedYouCanAccommodateMap.entrySet()) {\n\t\t\t\t\tlocalizedYouCanAccommodateMap.replace(entry.getKey(), messageSource.getMessage(entry.getValue(), new String[0], locale));\n\t\t\t\t}\n\t\t\t\treturnValue = localizedYouCanAccommodateMap;\n\t\t\t\tbreak;\n\t\t \n\t\t\n\t\t\tcase(\"LocalAmenity\"):\n\t\t\t\tMap<Long, String> localAmenityMap = referenceStore.getLocalAmenity(); \n\t\t\t\tSortedMap<Long, String> localizedLocalAmenityMap = new TreeMap<Long, String>(localAmenityMap);\n\t\t\t\tfor (Map.Entry<Long, String> entry : localizedLocalAmenityMap.entrySet()) {\n\t\t\t\t\tlocalizedLocalAmenityMap.replace(entry.getKey(), messageSource.getMessage(entry.getValue(), new String[0], locale));\n\t\t\t\t}\n\t\t\t\treturnValue = localizedLocalAmenityMap;\n\t\t\t\tbreak;\n\t\t \n\t\t\n\t\t\tcase(\"MonthRange\"):\n\t\t\t\tMap<Long, String> monthRangeMap = referenceStore.getMonthRange(); \n\t\t\t\tSortedMap<Long, String> localizedMonthRangeMap = new TreeMap<Long, String>(monthRangeMap);\n\t\t\t\tfor (Map.Entry<Long, String> entry : localizedMonthRangeMap.entrySet()) {\n\t\t\t\t\tlocalizedMonthRangeMap.replace(entry.getKey(), messageSource.getMessage(entry.getValue(), new String[0], locale));\n\t\t\t\t}\n\t\t\t\treturnValue = localizedMonthRangeMap;\n\t\t\t\tbreak;\n\t\t \n\t\t\n\t\t\tcase(\"Yes_No\"):\n\t\t\t\tMap<Long, String> yes_NoMap = referenceStore.getYes_No(); \n\t\t\t\tSortedMap<Long, String> localizedYes_NoMap = new TreeMap<Long, String>(yes_NoMap);\n\t\t\t\tfor (Map.Entry<Long, String> entry : localizedYes_NoMap.entrySet()) {\n\t\t\t\t\tlocalizedYes_NoMap.replace(entry.getKey(), messageSource.getMessage(entry.getValue(), new String[0], locale));\n\t\t\t\t}\n\t\t\t\treturnValue = localizedYes_NoMap;\n\t\t\t\tbreak;\n\t\t \n\t\t\n\t\t\tcase(\"EuropeCountry\"):\n\t\t\t\tMap<Long, String> europeCountryMap = referenceStore.getEuropeCountry(); \n\t\t\t\tSortedMap<Long, String> localizedEuropeCountryMap = new TreeMap<Long, String>(europeCountryMap);\n\t\t\t\tfor (Map.Entry<Long, String> entry : localizedEuropeCountryMap.entrySet()) {\n\t\t\t\t\tlocalizedEuropeCountryMap.replace(entry.getKey(), messageSource.getMessage(entry.getValue(), new String[0], locale));\n\t\t\t\t}\n\t\t\t\treturnValue = localizedEuropeCountryMap;\n\t\t\t\tbreak;\n\t\t \n\t\t\n\t\t\tcase(\"Facilities\"):\n\t\t\t\tMap<Long, String> facilitiesMap = referenceStore.getFacilities(); \n\t\t\t\tSortedMap<Long, String> localizedFacilitiesMap = new TreeMap<Long, String>(facilitiesMap);\n\t\t\t\tfor (Map.Entry<Long, String> entry : localizedFacilitiesMap.entrySet()) {\n\t\t\t\t\tlocalizedFacilitiesMap.replace(entry.getKey(), messageSource.getMessage(entry.getValue(), new String[0], locale));\n\t\t\t\t}\n\t\t\t\treturnValue = localizedFacilitiesMap;\n\t\t\t\tbreak;\n\t\t \n\t\t\n\t\t\tcase(\"IntegerCount1to40\"):\n\t\t\t\tMap<Long, String> integerCount1to40Map = referenceStore.getIntegerCount1to40(); \n\t\t\t\tSortedMap<Long, String> localizedIntegerCount1to40Map = new TreeMap<Long, String>(integerCount1to40Map);\n\t\t\t\tfor (Map.Entry<Long, String> entry : localizedIntegerCount1to40Map.entrySet()) {\n\t\t\t\t\tlocalizedIntegerCount1to40Map.replace(entry.getKey(), messageSource.getMessage(entry.getValue(), new String[0], locale));\n\t\t\t\t}\n\t\t\t\treturnValue = localizedIntegerCount1to40Map;\n\t\t\t\tbreak;\n\t\t \n\t\t\n\t\t\tcase(\"PledgeServiceLevelOne\"):\n\t\t\t\tMap<Long, String> pledgeServiceLevelOneMap = referenceStore.getPledgeServiceLevelOne(); \n\t\t\t\tSortedMap<Long, String> localizedPledgeServiceLevelOneMap = new TreeMap<Long, String>(pledgeServiceLevelOneMap);\n\t\t\t\tfor (Map.Entry<Long, String> entry : localizedPledgeServiceLevelOneMap.entrySet()) {\n\t\t\t\t\tlocalizedPledgeServiceLevelOneMap.replace(entry.getKey(), messageSource.getMessage(entry.getValue(), new String[0], locale));\n\t\t\t\t}\n\t\t\t\treturnValue = localizedPledgeServiceLevelOneMap;\n\t\t\t\tbreak;\n\t\t \n\t\t\n\t\t\tcase(\"PledgeServiceLevelTwo\"):\n\t\t\t\tMap<Long, String> pledgeServiceLevelTwoMap = referenceStore.getPledgeServiceLevelTwo(); \n\t\t\t\tSortedMap<Long, String> localizedPledgeServiceLevelTwoMap = new TreeMap<Long, String>(pledgeServiceLevelTwoMap);\n\t\t\t\tfor (Map.Entry<Long, String> entry : localizedPledgeServiceLevelTwoMap.entrySet()) {\n\t\t\t\t\tlocalizedPledgeServiceLevelTwoMap.replace(entry.getKey(), messageSource.getMessage(entry.getValue(), new String[0], locale));\n\t\t\t\t}\n\t\t\t\treturnValue = localizedPledgeServiceLevelTwoMap;\n\t\t\t\tbreak;\n\t\t \n\t\t\n\t\t\tcase(\"GoodsCategoryOne\"):\n\t\t\t\tMap<Long, String> goodsCategoryOneMap = referenceStore.getGoodsCategoryOne(); \n\t\t\t\tSortedMap<Long, String> localizedGoodsCategoryOneMap = new TreeMap<Long, String>(goodsCategoryOneMap);\n\t\t\t\tfor (Map.Entry<Long, String> entry : localizedGoodsCategoryOneMap.entrySet()) {\n\t\t\t\t\tlocalizedGoodsCategoryOneMap.replace(entry.getKey(), messageSource.getMessage(entry.getValue(), new String[0], locale));\n\t\t\t\t}\n\t\t\t\treturnValue = localizedGoodsCategoryOneMap;\n\t\t\t\tbreak;\n\t\t \n\t\t\n\t\t\tcase(\"GoodsCategoryTwo\"):\n\t\t\t\tMap<Long, String> goodsCategoryTwoMap = referenceStore.getGoodsCategoryTwo(); \n\t\t\t\tSortedMap<Long, String> localizedGoodsCategoryTwoMap = new TreeMap<Long, String>(goodsCategoryTwoMap);\n\t\t\t\tfor (Map.Entry<Long, String> entry : localizedGoodsCategoryTwoMap.entrySet()) {\n\t\t\t\t\tlocalizedGoodsCategoryTwoMap.replace(entry.getKey(), messageSource.getMessage(entry.getValue(), new String[0], locale));\n\t\t\t\t}\n\t\t\t\treturnValue = localizedGoodsCategoryTwoMap;\n\t\t\t\tbreak;\n\t\t \n\t\t\n\t\t\tcase(\"GoodsCondition\"):\n\t\t\t\tMap<Long, String> goodsConditionMap = referenceStore.getGoodsCondition(); \n\t\t\t\tSortedMap<Long, String> localizedGoodsConditionMap = new TreeMap<Long, String>(goodsConditionMap);\n\t\t\t\tfor (Map.Entry<Long, String> entry : localizedGoodsConditionMap.entrySet()) {\n\t\t\t\t\tlocalizedGoodsConditionMap.replace(entry.getKey(), messageSource.getMessage(entry.getValue(), new String[0], locale));\n\t\t\t\t}\n\t\t\t\treturnValue = localizedGoodsConditionMap;\n\t\t\t\tbreak;\n\t\t \n\t\t\n\t\t\tcase(\"OwnerOccupierType\"):\n\t\t\t\tMap<Long, String> ownerOccupierTypeMap = referenceStore.getOwnerOccupierType(); \n\t\t\t\tSortedMap<Long, String> localizedOwnerOccupierTypeMap = new TreeMap<Long, String>(ownerOccupierTypeMap);\n\t\t\t\tfor (Map.Entry<Long, String> entry : localizedOwnerOccupierTypeMap.entrySet()) {\n\t\t\t\t\tlocalizedOwnerOccupierTypeMap.replace(entry.getKey(), messageSource.getMessage(entry.getValue(), new String[0], locale));\n\t\t\t\t}\n\t\t\t\treturnValue = localizedOwnerOccupierTypeMap;\n\t\t\t\tbreak;\n\t\t \n\t\t\n\t\t\tcase(\"Locale\"):\n\t\t\t\tMap<Long, String> localeMap = referenceStore.getLocale(); \n\t\t\t\tSortedMap<Long, String> localizedLocaleMap = new TreeMap<Long, String>(localeMap);\n\t\t\t\tfor (Map.Entry<Long, String> entry : localizedLocaleMap.entrySet()) {\n\t\t\t\t\tlocalizedLocaleMap.replace(entry.getKey(), messageSource.getMessage(entry.getValue(), new String[0], locale));\n\t\t\t\t}\n\t\t\t\treturnValue = localizedLocaleMap;\n\t\t\t\tbreak;\n\t\t \n\t\t\n\t\t\tcase(\"UserRole\"):\n\t\t\t\tMap<Long, String> userRoleMap = referenceStore.getUserRole(); \n\t\t\t\tSortedMap<Long, String> localizedUserRoleMap = new TreeMap<Long, String>(userRoleMap);\n\t\t\t\tfor (Map.Entry<Long, String> entry : localizedUserRoleMap.entrySet()) {\n\t\t\t\t\tlocalizedUserRoleMap.replace(entry.getKey(), messageSource.getMessage(entry.getValue(), new String[0], locale));\n\t\t\t\t}\n\t\t\t\treturnValue = localizedUserRoleMap;\n\t\t\t\tbreak;\n\t\t \n\t\t\n\t\t\tcase(\"PledgeServiceLevelThree\"):\n\t\t\t\tMap<Long, String> pledgeServiceLevelThreeMap = referenceStore.getPledgeServiceLevelThree(); \n\t\t\t\tSortedMap<Long, String> localizedPledgeServiceLevelThreeMap = new TreeMap<Long, String>(pledgeServiceLevelThreeMap);\n\t\t\t\tfor (Map.Entry<Long, String> entry : localizedPledgeServiceLevelThreeMap.entrySet()) {\n\t\t\t\t\tlocalizedPledgeServiceLevelThreeMap.replace(entry.getKey(), messageSource.getMessage(entry.getValue(), new String[0], locale));\n\t\t\t\t}\n\t\t\t\treturnValue = localizedPledgeServiceLevelThreeMap;\n\t\t\t\tbreak;\n\t\t \n\t\t\n\t\t\tcase(\"GoodsCategoryThree\"):\n\t\t\t\tMap<Long, String> goodsCategoryThreeMap = referenceStore.getGoodsCategoryThree(); \n\t\t\t\tSortedMap<Long, String> localizedGoodsCategoryThreeMap = new TreeMap<Long, String>(goodsCategoryThreeMap);\n\t\t\t\tfor (Map.Entry<Long, String> entry : localizedGoodsCategoryThreeMap.entrySet()) {\n\t\t\t\t\tlocalizedGoodsCategoryThreeMap.replace(entry.getKey(), messageSource.getMessage(entry.getValue(), new String[0], locale));\n\t\t\t\t}\n\t\t\t\treturnValue = localizedGoodsCategoryThreeMap;\n\t\t\t\tbreak;\n\t\t \n\t\t\n\t\t\tcase(\"GoodsSize\"):\n\t\t\t\tMap<Long, String> goodsSizeMap = referenceStore.getGoodsSize(); \n\t\t\t\tSortedMap<Long, String> localizedGoodsSizeMap = new TreeMap<Long, String>(goodsSizeMap);\n\t\t\t\tfor (Map.Entry<Long, String> entry : localizedGoodsSizeMap.entrySet()) {\n\t\t\t\t\tlocalizedGoodsSizeMap.replace(entry.getKey(), messageSource.getMessage(entry.getValue(), new String[0], locale));\n\t\t\t\t}\n\t\t\t\treturnValue = localizedGoodsSizeMap;\n\t\t\t\tbreak;\n\t\t \n\t\t\n\t\t\tcase(\"GoodsQuantity\"):\n\t\t\t\tMap<Long, String> goodsQuantityMap = referenceStore.getGoodsQuantity(); \n\t\t\t\tSortedMap<Long, String> localizedGoodsQuantityMap = new TreeMap<Long, String>(goodsQuantityMap);\n\t\t\t\tfor (Map.Entry<Long, String> entry : localizedGoodsQuantityMap.entrySet()) {\n\t\t\t\t\tlocalizedGoodsQuantityMap.replace(entry.getKey(), messageSource.getMessage(entry.getValue(), new String[0], locale));\n\t\t\t\t}\n\t\t\t\treturnValue = localizedGoodsQuantityMap;\n\t\t\t\tbreak;\n\t\t \n\t\t\n\t\t\tcase(\"NewOrUsed\"):\n\t\t\t\tMap<Long, String> newOrUsedMap = referenceStore.getNewOrUsed(); \n\t\t\t\tSortedMap<Long, String> localizedNewOrUsedMap = new TreeMap<Long, String>(newOrUsedMap);\n\t\t\t\tfor (Map.Entry<Long, String> entry : localizedNewOrUsedMap.entrySet()) {\n\t\t\t\t\tlocalizedNewOrUsedMap.replace(entry.getKey(), messageSource.getMessage(entry.getValue(), new String[0], locale));\n\t\t\t\t}\n\t\t\t\treturnValue = localizedNewOrUsedMap;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase(\"TravelAbility\"):\n\t\t\t\tMap<Long, String> travelAbilityMap = referenceStore.getTravelAbilities(); \n\t\t\t\tSortedMap<Long, String> localizedTravelAbilityMap = new TreeMap<Long, String>(travelAbilityMap);\n\t\t\t\tfor (Map.Entry<Long, String> entry : localizedTravelAbilityMap.entrySet()) {\n\t\t\t\t\tlocalizedTravelAbilityMap.replace(entry.getKey(), messageSource.getMessage(entry.getValue(), new String[0], locale));\n\t\t\t\t}\n\t\t\t\treturnValue = localizedTravelAbilityMap;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase(\"PledgeStatus\"):\n\t\t\t\tMap<Long, String> sMap = referenceStore.getPledgeStatuses(); \n\t\t\t\tSortedMap<Long, String> localizedsMap = new TreeMap<Long, String>(sMap);\n\t\t\t\tfor (Map.Entry<Long, String> entry : localizedsMap.entrySet()) {\n\t\t\t\t\tlocalizedsMap.replace(entry.getKey(), messageSource.getMessage(entry.getValue(), new String[0], locale));\n\t\t\t\t}\n\t\t\t\treturnValue = localizedsMap;\n\t\t\t\tbreak;\n\t\t \n\t\t\n\t\t\tdefault:\n\t\t\t\treturnValue.put(Long.valueOf(-1), \"Internal Fault\");\n \t}\n\n \treturn returnValue;\n }", "@GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getAllPlatformTypes\")\n List<JsonType> types();", "public abstract Map<AbstractResource, ResourceResolution> findApplicableResources(\n TreeLogger logger, PathPrefixSet pathPrefixSet);", "public Map<ResourceType<L>, Offline<org.hawkular.inventory.api.model.ResourceType.Blueprint>> build(\n List<ResourceType<L>> resourceTypes) {\n\n Map<ResourceType<L>, Offline<org.hawkular.inventory.api.model.ResourceType.Blueprint>> retVal;\n retVal = new HashMap<>(resourceTypes.size());\n\n synchronized (addedIds) {\n prepareAddedIds();\n\n // we don't sync parent-child relations for types; all types are stored at root level in inventory\n for (ResourceType<L> rt : resourceTypes) {\n InventoryStructure.Builder<org.hawkular.inventory.api.model.ResourceType.Blueprint> invBldr;\n org.hawkular.inventory.api.model.ResourceType.Blueprint rtBP = buildResourceTypeBlueprint(rt);\n invBldr = InventoryStructure.Offline.of(rtBP);\n resourceType(rt, invBldr);\n retVal.put(rt, invBldr.build());\n }\n }\n\n return retVal;\n }", "@Override\n public Class<ResourcesRecord> getRecordType() {\n return ResourcesRecord.class;\n }", "@Override\r\n\tpublic List<Resource> findResource() {\n\t\tConnection conn=this.getConnection();\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps=conn.prepareStatement(\"select * from resource order by resource_id desc\");\r\n\t\t\tResultSet rs=ps.executeQuery();\r\n\t\t\tList<Resource> list=new ArrayList<Resource>();\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\tResource d=new Resource();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\td.setResourceid(rs.getInt(1));\r\n\t\t\t\td.setStyleid(rs.getInt(2));\r\n\t\t\t\td.setTitle(rs.getString(3));\r\n\t\t\t\td.setSize(rs.getString(4));\r\n\t\t\t\td.setLanguage(rs.getString(5));\r\n\t\t\t\td.setBanben(rs.getString(6));\r\n\t\t\t\td.setText(rs.getString(7));\r\n\t\t\t\td.setPoint(rs.getInt(8));\r\n\t\t\t\td.setInputtime(rs.getTimestamp(9));\r\n\t\t\t\td.setResadd(rs.getString(10));\r\n\t\t\t\td.setImageadd(rs.getString(11));\r\n\t\t\t\tlist.add(d);\r\n\t\t\t}\r\n\t\t\treturn list;\r\n\t\t} catch (SQLException 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\ttry {\r\n\t\t\t\tconn.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Override\n public Set<Class<?>> getClasses() {\n\n Set<Class<?>> resources = new java.util.HashSet<>();\n resources.add(CountryResource.class);\n resources.add(DepartmentResource.class);\n resources.add(JobResource.class);\n return resources;\n }", "public List findRecords(String informationType, String queryString) throws DatabaseException;", "public int getContents( Resource.Type type );", "public List<ScheduleResource> neededSpecificResources();", "@GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getAllDeviceCategories\")\n List<JsonType> types();", "@GET\n @Path(\"/typesByPlugin\")\n public Map<Long, List<PluginType>> getTypesByPlugin() {\n return definitionsService.getTypesByPlugin();\n }", "public List<IResource> getResources();", "@Override\n\tpublic Iterable<Map<String, Object>> findAll() {\n\t\treturn null;\n\t}", "public List<DataGridResource> getResources() {\n\t\tif(resources != null) Collections.sort(resources);\n\t\treturn resources;\n\t}", "<T> Set<T> lookupAll(Class<T> type);", "List<ViewResourcesMapping> get(String viewResourceId) throws Exception;", "String getRetrieveResourceQuery();", "<T> Map<String, T> resolveAll(Class<T> type);", "public Iterator getResources() {\n return this.resources.iterator();\n }", "public static String getAllRecords() {\n Log.i(CLASS_NAME, \"getAllRecords\");\n final String apiString = \"_search?pretty=true&q=*:*\";\n return ElasticRestClient.get(getIndex(), getType(), apiString, \"{ \\\"size\\\" : \\\"1000\\\"}\");\n }", "public java.util.List<ProductSpecificationMapping> findAll();", "public List<Resources> getResourcesByLocationForNonSuperUser(int locationId){\n\t\treturn jtemp.query(\"SELECT * FROM Resources WHERE location_id = ? AND is_super_room = ? order By is_available DESC,Resource_name\", new ResourcesMapper(), locationId,0);\n\t}", "private ArrayList getEnabledResources() {\n ArrayList enabledResourceList = new ArrayList();\n String meterData;\n JsonRepresentation responseJson;\n int meterNameIndex = 0;\n int meterStatusIndex = 0;\n JSONArray columnArr, tagArr, pointsArr;\n // Get the active meters from the meter API from UDR Service\n try {\n logger.debug(\"Attempting to get the Enabled Resources\");\n meterData = udrServiceClient.getActiveResources();\n responseJson = new JsonRepresentation(meterData);\n JSONObject jsonObj = responseJson.getJsonObject();\n columnArr = jsonObj.getJSONArray(\"columns\");\n //tagArr = jsonObj.getJSONArray(\"tags\");\n for (int i = 0; i < columnArr.length(); i++) {\n if (\"metername\".equals(columnArr.get(i))) {\n meterNameIndex = i;\n }\n if (\"status\".equals(columnArr.get(i))) {\n meterStatusIndex = i;\n }\n }\n pointsArr = jsonObj.getJSONArray(\"points\");\n HashMap<String, String> enabledResourceMap = new HashMap<String, String>();\n for (int j = 0; j < pointsArr.length(); j++) {\n JSONArray arr = (JSONArray) pointsArr.get(j);\n if (Integer.parseInt(arr.get(meterStatusIndex).toString()) == 1) {\n if (!enabledResourceList.contains(arr.get(meterNameIndex)))\n enabledResourceList.add(arr.get(meterNameIndex));\n }\n }\n } catch (Exception e) {\n logger.error(\"Error while getting the Enabled Resources: \"+e.getMessage());\n e.printStackTrace();\n }\n return enabledResourceList;\n }", "@Override\n\tpublic List<TypeDocument> findAll() {\n\t\treturn typeDocumentRepository.findAll();\n\t}", "public ArrayList<Resource> getDynamicInfo() {\n\t\tArrayList<Resource> resources = new ArrayList<Resource>();\n\t\t// ~~~ CPU\n\t\tResource cpuResource = new Resource();\n\t\tcpuResource.setResourceType(ResourceType.CPU);\n\t\tcpuResource.setName(clientDynamicInfo.getCPUVendor() + \" CPU\");\n\n\t\tAttribute cpuUtilizationAttribute = new Attribute();\n\t\tcpuUtilizationAttribute.setAttributeType(AttributeType.CPUUtilization);\n\t\tcpuUtilizationAttribute.setValue(Double.parseDouble(clientDynamicInfo\n\t\t\t\t.getCPUUsage()));\n\t\tcpuUtilizationAttribute.setDate(new Date());\n\t\tcpuResource.addAttribute(cpuUtilizationAttribute);\n\n\t\tresources.add(cpuResource);\n\t\t// ~~~ RAM\n\t\tResource ramResource = new Resource();\n\t\tramResource.setResourceType(ResourceType.RAM);\n\t\tramResource.setName(\"RAM\");\n\n\t\tAttribute ramFreeAttribute = new Attribute();\n\t\tramFreeAttribute.setAttributeType(AttributeType.FreeMemory);\n\t\tramFreeAttribute.setValue(Double.parseDouble(clientDynamicInfo\n\t\t\t\t.getRAMFreeInfo()));\n\n\t\tramResource.addAttribute(ramFreeAttribute);\n\n\t\tramFreeAttribute.setDate(new Date());\n\n\t\tAttribute ramUtilizationAttribute = new Attribute();\n\t\tramUtilizationAttribute\n\t\t\t\t.setAttributeType(AttributeType.MemoryUtilization);\n\t\tramUtilizationAttribute.setValue(Double.parseDouble(clientDynamicInfo\n\t\t\t\t.getRAMUtilizationInfo()));\n\t\tramResource.addAttribute(ramUtilizationAttribute);\n\n\t\tresources.add(ramResource);\n\t\t// ~~~ SStorage\n\t\tResource sstorageResource = new Resource();\n\t\tsstorageResource.setResourceType(ResourceType.SStorage);\n\t\tsstorageResource.setName(\"SSTORAGE\");\n\n\t\tAttribute sstorageFreeAttribute = new Attribute();\n\t\tsstorageFreeAttribute.setAttributeType(AttributeType.FreeStorage);\n\t\tsstorageFreeAttribute.setValue(Double.parseDouble(clientDynamicInfo\n\t\t\t\t.getSStorageFreeInfo()));\n\t\tsstorageFreeAttribute.setDate(new Date());\n\t\tsstorageResource.addAttribute(sstorageFreeAttribute);\n\n\t\tAttribute sstorageUtilizationAttribute = new Attribute();\n\t\tsstorageUtilizationAttribute\n\t\t\t\t.setAttributeType(AttributeType.StorageUtilization);\n\t\tsstorageUtilizationAttribute.setValue(Double\n\t\t\t\t.parseDouble(clientDynamicInfo.getSStorageUtilizationInfo()));\n\t\tsstorageUtilizationAttribute.setDate(new Date());\n\t\tsstorageResource.addAttribute(sstorageUtilizationAttribute);\n\n\t\tresources.add(sstorageResource);\n\n\t\treturn resources;\n\t}", "public static HashSet<Resource> findAllResources(Model model)\n\t{\n\t\tHashSet<Resource> resourceSet = new HashSet<Resource>((int) model.size() * 3);\n\t\tStmtIterator statements = model.listStatements();\n\t\t\n\t\twhile(statements.hasNext())\n\t\t{\n\t\t\tStatement statement = statements.nextStatement();\n\t\t\tResource subject = statement.getSubject();\n\t\t\tResource predicate = statement.getPredicate();\n\t\t\tRDFNode object = statement.getObject();\n\t\t\t\n\t\t\tif(!resourceSet.contains(subject))\n\t\t\t{\n\t\t\t\tresourceSet.add(subject);\n\t\t\t}\n\t\t\tif(!resourceSet.contains(predicate))\n\t\t\t{\n\t\t\t\tresourceSet.add(predicate);\n\t\t\t}\n\t\t\tif(object.isResource() && !resourceSet.contains(object))\n\t\t\t{\n\t\t\t\tresourceSet.add((Resource) object);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn resourceSet;\n\t}", "public Future<List<CtxModelObject>> lookup(CtxModelType modelType, String type);", "public ResourceType getResouceType() {\n return type;\n }", "@Override\n\tpublic List<Record> getRecordsByType(Type type) {\n\t\tSession session=HibernateSessionFactory.getSession();\n\t\tTransaction tx=session.beginTransaction();\n\t\tList<Record> list=new ArrayList<Record>();\n\t\tRecordDAO recordDAO=new RecordDAO();\n\t\t\n\t\ttry{\n\t\t\tlist=recordDAO.getRecordsByType(type);\n\t\t\ttx.commit();\n\t\t}catch(RuntimeException e){\n\t\t\te.printStackTrace();\n\t\t\ttx.rollback();\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t\treturn list;\n\t}", "@Override\n public List<ClientStatisticsRecord> clientRecordsByType(\n String clientKey,\n String type,\n int page,\n int pageSize) {\n Pageable pageRequest = new PageRequest(page, pageSize);\n return recordRepository.findByClientKeyAndType(clientKey, type, pageRequest).getContent();\n }", "public List<String> getDistinctResourceName(){\n\t\treturn jtemp.queryForList(\"SELECT DISTINCT resource_type_id||resource_name FROM resources\", String.class);\n\t}", "public Set getResources() {\n/* 92 */ return Collections.unmodifiableSet(this.resources);\n/* */ }", "public Iterable<Relationship> getRelationships( RelationshipType... type );", "public Map<String, Object> getRelatedKeys() throws ODataJPAProcessorException;", "Map<String, Object> getServiceSpecificObjects();", "public List<ImageResourceWrapper> getMap() {\n // Declare a new list to hold the rendering info for the physics objects.\n List<ImageResourceWrapper> rtrnResources = new ArrayList<>();\n for(PhysicsEntity physicsEntity : this.physModel.getEntities()) {\n // Get the graphics entity corresponding to the current physics entity.\n GraphicsEntity graphicsEntity = this.graphModel.getEntityByID(physicsEntity.getId());\n String imgResource = graphicsEntity.getImgResId(physicsEntity.getOrientation());\n rtrnResources.add(new ImageResourceWrapper(new Point(physicsEntity.getPosition().x, physicsEntity.getPosition().y), imgResource));\n }\n for(Objective objective : this.gameStateModel.getObjectives()) {\n GraphicsEntity graphicsEntity = this.graphModel.getEntityByID(objective.getId());\n // TODO: Orientation for objectives\n String imgResource = graphicsEntity.getImgResId(0);\n rtrnResources.add(new ImageResourceWrapper(new Point(objective.getPosition().x, objective.getPosition().y), imgResource));\n }\n return rtrnResources;\n }", "@Override\n public List<Asset> getAssetsByType(String type) {\n\t \n\t List<Asset> assets = new ArrayList<>();\n\t \n\t ResultSet resultset = null;\n\t \n\t String[] list = {\"id\",\"type\"};\n\t \n\t List<ResultSetFuture> futures = Lists.newArrayListWithExpectedSize(list.length);\n\t \n\t futures.add(session.executeAsync(\"SELECT * FROM \"+cassandra_keyspace+ \".\"+cassandra_table+\" WHERE type = '\"+type+\"'\"));\n\t \n\t for (ListenableFuture<ResultSet> future : futures){\n\t\t try {\n\t\t\t resultset = future.get();\n\t\t }\n\t\t catch (InterruptedException | ExecutionException e) {\n\t\t\t // TODO Auto-generated catch block\n\t\t\t e.printStackTrace();\n\t\t }\n\t\t \n\t }\n\t \n\t for (Row row : resultset) {\n\t\t Asset asset = new Asset();\n\t\t asset.setId(row.getString(\"id\"));\n\t\t asset.setAntivirus(row.getString(\"antivirus\"));\n\t\t asset.setCurrent(row.getLong(\"current\"));\n\t\t asset.setIpAddress(row.getString(\"ipaddress\"));\n\t\t asset.setLatitude(row.getString(\"latitude\"));\n\t\t asset.setLongitude(row.getString(\"longitude\"));\n\t\t asset.setOs(row.getString(\"os\"));\n\t\t asset.setPressure(row.getLong(\"pressure\"));\n \t asset.setFlowRate(row.getLong(\"flowRate\"));\n\t\t asset.setPressure(row.getLong(\"pressure\"));\n\t\t asset.setRotation(row.getLong(\"rotation\"));\n\t\t asset.setTemperature(row.getInt(\"temperature\"));\n\t\t asset.setType(row.getString(\"type\"));\n\t\t asset.setVersion(row.getString(\"version\"));\n\t\t asset.setCreationDate(row.getTimestamp(\"creationDate\"));\n\t\t assets.add(asset);\n\t\t \n\t }\n\t \n\t return assets;\n\t \n }", "public Resources resources() {\n return this.resources;\n }", "@Transient\r\n\tpublic Map<String, Object> getLookups() {\r\n\t\tMap<String,Object> map = new HashMap<String,Object>();\r\n map.put(ICommercialAlias.TARGET_REGISTRY_ID, getId());\r\n map.put(ICommercialAlias.TARGET_REGISTRY_DOCUMENT, getRegistry().getDocument());\r\n map.put(ICommercialAlias.TARGET_REGISTRY_NAME, getRegistry().getName());\r\n map.put(ICommercialAlias.TARGET_REGISTRY_SURNAME, getRegistry().getSurname());\r\n map.put(ICommercialAlias.TARGET_REGISTRY_ALIAS, getRegistry().getAlias());\r\n return map;\r\n\t}", "public Map lookup( Map constraints ) {\n\n Map result = new HashMap();\n\n for( Iterator it = this.rcIterator(); it.hasNext() ; ){\n ReplicaCatalog catalog = (ReplicaCatalog) it.next();\n Map m = catalog.lookup( constraints );\n\n //merge all the entries in the map into the result\n for (Iterator mit = m.entrySet().iterator(); mit.hasNext(); ) {\n Map.Entry entry = (Map.Entry) mit.next();\n //merge the entries into the main result\n String lfn = (String) entry.getKey(); //the lfn\n if ( result.containsKey( lfn ) ) {\n //right now no merging of RCE being done on basis\n //on them having same pfns. duplicate might occur.\n ( (Set) result.get( lfn )).addAll( (Set) entry.getValue());\n }\n else {\n result.put( lfn, entry.getValue() );\n }\n }\n }\n return result;\n\n }", "public List<E> findAll(Class<E> type){\n transaction.begin();\n List<E> types = entityManager.createQuery(\" from \" + type.getName()).getResultList();\n transaction.commit();\n return types;\n }", "@GET\n @Path(\"allTypes\")\n @Produces(MediaType.APPLICATION_JSON)\n public String getAllTypes() {\n return typesJSONResponse(_types.getAllTypes());\n }", "public List<SecretMetadata> resources() {\n return resources;\n }", "public static java.util.Iterator<org.semanticwb.model.ResourceType> listResourceTypes(org.semanticwb.model.SWBModel model)\r\n {\r\n java.util.Iterator it=model.getSemanticObject().getModel().listInstancesOfClass(sclass);\r\n return new org.semanticwb.model.GenericIterator<org.semanticwb.model.ResourceType>(it, true);\r\n }", "public List<SensoryType> findAllSensoryTypes() {\r\n\t\t// sparql\r\n\t\tString sparql = \"SELECT ?dataSourceType WHERE {?dataSourceType rdfs:subClassOf onto:DataSourceType.}\";\r\n\t\t// test\r\n\t\tString jsonString = findJsonResult(sparql);\r\n\t\tSystem.out.println(\"findAllDataSourceTypes:\" + jsonString);\r\n\t\t// result\r\n\t\tJSONObject json;\r\n\t\ttry {\r\n\t\t\tjson = new JSONObject(jsonString);\r\n\t\t\tJSONArray jsonArray = json.getJSONObject(\"results\").getJSONArray(\"bindings\");\r\n\t\t\tList<SensoryType> list = new ArrayList<SensoryType>();\r\n\t\t\tfor (int i = 0; i < jsonArray.length(); i++) {\r\n\t\t\t\tJSONObject jsonObject = (JSONObject) jsonArray.get(i);\r\n\t\t\t\tSensoryType sensoryType = new SensoryType();\r\n\t\t\t\tif (jsonObject.has(\"dataSourceType\")) {\r\n\t\t\t\t\tsensoryType.setSensoryTypeName(jsonObject.getJSONObject(\"dataSourceType\").getString(\"value\").split(\"#\")[1]);\r\n\t\t\t\t}\r\n\t\t\t\tlist.add(sensoryType);\r\n\t\t\t}\r\n\t\t\treturn list;\r\n\t\t} catch (JSONException 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 null;\r\n\t}", "@objid (\"5292c322-23d0-4a99-9d8c-234433b5b53c\")\n EList<ResourceType> getDefinedResourceType();", "public ArrayList<Object> getAllResources(String filePath2) {\n\t\tModel model = ModelFactory.createDefaultModel();\n\t\tmodel.read(filePath2);\n\n\t\tString queryString = \"SELECT DISTINCT ?s WHERE {\" + \" ?s ?property ?o .\" + \"}\";\n\n\t\tQuery query = QueryFactory.create(queryString);\n\t\tQueryExecution qe = QueryExecutionFactory.create(query, model);\n\t\tResultSet results = ResultSetFactory.copyResults(qe.execSelect());\n\n\t\tArrayList<Object> resourceList = new ArrayList<>();\n\t\twhile (results.hasNext()) {\n\t\t\tresourceList.add(results.next().get(\"s\"));\n\t\t}\n\n\t\tqe.close();\n\t\treturn resourceList;\n\t}", "public Map<Locale, T> getAvailableLocalesAndTranslatables() {\n Map<Locale, T> returnMap = new HashMap<Locale, T>();\n List<T> items = (List<T>) MongoEntity.getDs().find(this.getClass(), \"reference\", this.reference).asList();\n\n if (items != null && !items.isEmpty()) {\n for (T item : items) {\n returnMap.put(item.language, item);\n }\n }\n return returnMap;\n }", "@SuppressWarnings(\"unchecked\")\n public <T extends Resource> List<T> getChildren(Class<T> type)\n {\n Resource[] allChildren = getChildren();\n List<T> filteredChildren = new ArrayList<T>();\n for(Resource child : allChildren)\n {\n if(type.isAssignableFrom(child.getClass()))\n {\n filteredChildren.add((T)child);\n }\n }\n return filteredChildren;\n }", "@Override\r\n\tpublic List<Resource> getAllResources(int empId) throws InvalidEmployeeException {\r\n\t\tList<Resource> res1 = resourceDao.getByEmpId(empId);\r\n\t\tlogger.info(\"Resources fetched by employee id: \" + empId);\r\n\t\treturn res1;\r\n\t}", "@Override\n\tpublic QueryRes getQueryResByTypes(String[] types) throws ServiceException {\n\t\treturn null;\n\t}", "public ArrayList<Resource> getResources(){\n\t\treturn _resources;\n\t}", "public List<Record> get(RecordType type, String query) {\n\t\tif (LOGGER.isDebugEnabled()) {\n\t\t\tLOGGER.debug(\"get: query=\" + query + \", type=\" + type);\n\t\t}\n\n\t\tif (query == null || type == null) {\n\t\t\tif (LOGGER.isDebugEnabled()) {\n\t\t\t\tLOGGER.debug(\"get: null argument -> return null\");\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\n\t\tMap<String, Element> mapOfRecords = getMap(type);\n\t\t\n\t\tElement res = mapOfRecords.get(query);\n\t\tif (res == null) {\n\t\t\tif (LOGGER.isDebugEnabled()) {\n\t\t\t\tLOGGER.debug(\"get: no records -> return null\");\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\n\t\tif (res.getDeathDate() >= 0 && res.getDeathDate() <= System.currentTimeMillis()) {\n\t\t\tif (LOGGER.isDebugEnabled()) {\n\t\t\t\tLOGGER.debug(\"get: found a dead record (TTL is in the past) -> remove it from the cache\");\n\t\t\t}\n\t\t\tmapOfRecords.remove (query);\n\t\t\t// we cannot decrement the cache size since it may be accessed in // threads -> need absolute size\n\t\t\tif (_meters != null) _meters.getSet (type)._cacheEntriesMeter.set (mapOfRecords.size ()); // meters is null for hosts cache\n\t\t\treturn null;\n\n\t\t}\n\t\treturn res.getRecords();\n\t}" ]
[ "0.61398387", "0.6133664", "0.61095643", "0.5988766", "0.59765744", "0.59387136", "0.5886627", "0.58694696", "0.5835284", "0.58304363", "0.57639873", "0.57294583", "0.5667441", "0.5507182", "0.54850805", "0.5442065", "0.5426678", "0.54215115", "0.5413945", "0.5409956", "0.5394198", "0.5375105", "0.5365249", "0.5364036", "0.53507876", "0.53473663", "0.53194517", "0.5311761", "0.5303857", "0.526138", "0.5236341", "0.52149695", "0.52075535", "0.52060103", "0.51981056", "0.51780385", "0.5156455", "0.5154352", "0.51511383", "0.51357794", "0.5113996", "0.5093903", "0.5092178", "0.50866807", "0.5069508", "0.5069376", "0.50683147", "0.5067189", "0.50662404", "0.5064309", "0.5057683", "0.50562984", "0.5044872", "0.50324786", "0.5015172", "0.5008559", "0.50025153", "0.49961808", "0.49909434", "0.4966604", "0.49621567", "0.4959926", "0.49513847", "0.49357736", "0.49349794", "0.49181464", "0.4917131", "0.49131495", "0.49077067", "0.4906421", "0.4888849", "0.48820174", "0.48711893", "0.4870374", "0.4867578", "0.48601028", "0.48534718", "0.48463202", "0.48311695", "0.48261914", "0.482082", "0.48135424", "0.48129758", "0.4810139", "0.48048905", "0.47940588", "0.47883323", "0.4782498", "0.47516155", "0.47505397", "0.47503477", "0.4748853", "0.47483215", "0.4747234", "0.47439033", "0.4742131", "0.47412762", "0.47340548", "0.47247225", "0.47162712" ]
0.72383887
0
/ JADX WARNING: Code restructure failed: missing block: B:5:0x0012, code lost: r0 = r0.getSubTypeRepresentative();
@org.jetbrains.annotations.NotNull /* Code decompiled incorrectly, please refer to instructions dump. */ public static final kotlin.reflect.jvm.internal.impl.types.KotlinType getSubtypeRepresentative(@org.jetbrains.annotations.NotNull kotlin.reflect.jvm.internal.impl.types.KotlinType r2) { /* java.lang.String r0 = "$this$getSubtypeRepresentative" kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull(r2, r0) kotlin.reflect.jvm.internal.impl.types.UnwrappedType r0 = r2.unwrap() boolean r1 = r0 instanceof kotlin.reflect.jvm.internal.impl.types.SubtypingRepresentatives if (r1 != 0) goto L_0x000e r0 = 0 L_0x000e: kotlin.reflect.jvm.internal.impl.types.SubtypingRepresentatives r0 = (kotlin.reflect.jvm.internal.impl.types.SubtypingRepresentatives) r0 if (r0 == 0) goto L_0x0019 kotlin.reflect.jvm.internal.impl.types.KotlinType r0 = r0.getSubTypeRepresentative() if (r0 == 0) goto L_0x0019 r2 = r0 L_0x0019: return r2 */ throw new UnsupportedOperationException("Method not decompiled: kotlin.reflect.jvm.internal.impl.types.TypeCapabilitiesKt.getSubtypeRepresentative(kotlin.reflect.jvm.internal.impl.types.KotlinType):kotlin.reflect.jvm.internal.impl.types.KotlinType"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected final com.p111d.p112a.p121c.p134k.C7119d m3865a(com.p111d.p112a.p121c.aa r14, com.p111d.p112a.p121c.p128f.C1451n r15, com.p111d.p112a.p121c.C5354j r16, com.p111d.p112a.p121c.C1545o<?> r17, com.p111d.p112a.p121c.p131i.C1478f r18, com.p111d.p112a.p121c.p131i.C1478f r19, com.p111d.p112a.p121c.p128f.C5328e r20, boolean r21) {\n /*\n r13 = this;\n r0 = r13;\n r5 = r16;\n r1 = r19;\n r11 = r20;\n r2 = r0.f4676d;\n r3 = r0.f4673a;\n r2 = r2.refineSerializationType(r3, r11, r5);\n r3 = 1;\n if (r2 == r5) goto L_0x0058;\n L_0x0012:\n r4 = r2.m11531e();\n r6 = r16.m11531e();\n r7 = r4.isAssignableFrom(r6);\n if (r7 != 0) goto L_0x0056;\n L_0x0020:\n r7 = r6.isAssignableFrom(r4);\n if (r7 != 0) goto L_0x0056;\n L_0x0026:\n r1 = new java.lang.IllegalArgumentException;\n r2 = new java.lang.StringBuilder;\n r3 = \"Illegal concrete-type annotation for method '\";\n r2.<init>(r3);\n r3 = r20.mo1360b();\n r2.append(r3);\n r3 = \"': class \";\n r2.append(r3);\n r3 = r4.getName();\n r2.append(r3);\n r3 = \" not a super-type of (declared) class \";\n r2.append(r3);\n r3 = r6.getName();\n r2.append(r3);\n r2 = r2.toString();\n r1.<init>(r2);\n throw r1;\n L_0x0056:\n r4 = r3;\n goto L_0x005b;\n L_0x0058:\n r4 = r21;\n r2 = r5;\n L_0x005b:\n r6 = r0.f4676d;\n r6 = r6.findSerializationTyping(r11);\n r7 = 0;\n if (r6 == 0) goto L_0x006f;\n L_0x0064:\n r8 = com.p111d.p112a.p121c.p122a.C1397f.C1396b.DEFAULT_TYPING;\n if (r6 == r8) goto L_0x006f;\n L_0x0068:\n r4 = com.p111d.p112a.p121c.p122a.C1397f.C1396b.STATIC;\n if (r6 != r4) goto L_0x006e;\n L_0x006c:\n r4 = r3;\n goto L_0x006f;\n L_0x006e:\n r4 = r7;\n L_0x006f:\n r6 = 0;\n if (r4 == 0) goto L_0x0077;\n L_0x0072:\n r2 = r2.mo3385d();\n goto L_0x0078;\n L_0x0077:\n r2 = r6;\n L_0x0078:\n if (r1 == 0) goto L_0x00bc;\n L_0x007a:\n if (r2 != 0) goto L_0x007d;\n L_0x007c:\n r2 = r5;\n L_0x007d:\n r4 = r2.mo3394u();\n if (r4 != 0) goto L_0x00b6;\n L_0x0083:\n r1 = new java.lang.IllegalStateException;\n r3 = new java.lang.StringBuilder;\n r4 = \"Problem trying to create BeanPropertyWriter for property '\";\n r3.<init>(r4);\n r4 = r15.mo1398a();\n r3.append(r4);\n r4 = \"' (of type \";\n r3.append(r4);\n r4 = r0.f4674b;\n r4 = r4.m3615a();\n r3.append(r4);\n r4 = \"); serialization type \";\n r3.append(r4);\n r3.append(r2);\n r2 = \" has no content\";\n r3.append(r2);\n r2 = r3.toString();\n r1.<init>(r2);\n throw r1;\n L_0x00b6:\n r1 = r2.mo3383b(r1);\n r8 = r1;\n goto L_0x00bd;\n L_0x00bc:\n r8 = r2;\n L_0x00bd:\n r1 = r0.f4675c;\n r2 = r15.mo1423y();\n r1 = r1.m3138a(r2);\n r1 = r1.m3139b();\n r2 = com.p111d.p112a.p113a.C1329q.C1327a.USE_DEFAULTS;\n if (r1 != r2) goto L_0x00d1;\n L_0x00cf:\n r1 = com.p111d.p112a.p113a.C1329q.C1327a.ALWAYS;\n L_0x00d1:\n r2 = com.p111d.p112a.p121c.p134k.C1501m.C15001.f4671a;\n r1 = r1.ordinal();\n r1 = r2[r1];\n switch(r1) {\n case 1: goto L_0x00ef;\n case 2: goto L_0x00e5;\n case 3: goto L_0x00df;\n case 4: goto L_0x00dd;\n default: goto L_0x00dc;\n };\n L_0x00dc:\n goto L_0x0127;\n L_0x00dd:\n r7 = r3;\n goto L_0x0127;\n L_0x00df:\n r1 = com.p111d.p112a.p121c.p134k.C7119d.f20265c;\n L_0x00e1:\n r10 = r1;\n r9 = r3;\n goto L_0x013d;\n L_0x00e5:\n r1 = r16.mo3560a();\n if (r1 == 0) goto L_0x00ec;\n L_0x00eb:\n goto L_0x00df;\n L_0x00ec:\n r9 = r3;\n r10 = r6;\n goto L_0x013d;\n L_0x00ef:\n if (r8 != 0) goto L_0x00f3;\n L_0x00f1:\n r1 = r5;\n goto L_0x00f4;\n L_0x00f3:\n r1 = r8;\n L_0x00f4:\n r2 = r0.f4675c;\n r2 = r2.m3139b();\n r4 = com.p111d.p112a.p113a.C1329q.C1327a.NON_DEFAULT;\n if (r2 != r4) goto L_0x0107;\n L_0x00fe:\n r2 = r15.mo1398a();\n r1 = r0.m3864a(r2, r11, r1);\n goto L_0x010b;\n L_0x0107:\n r1 = com.p111d.p112a.p121c.p134k.C1501m.m3863a(r1);\n L_0x010b:\n if (r1 != 0) goto L_0x010e;\n L_0x010d:\n goto L_0x00e1;\n L_0x010e:\n r2 = r1.getClass();\n r2 = r2.isArray();\n if (r2 == 0) goto L_0x0139;\n L_0x0118:\n r2 = java.lang.reflect.Array.getLength(r1);\n r3 = r1.getClass();\n r4 = new com.d.a.c.m.b$1;\n r4.<init>(r3, r2, r1);\n r10 = r4;\n goto L_0x013c;\n L_0x0127:\n r1 = r16.mo3391n();\n if (r1 == 0) goto L_0x013b;\n L_0x012d:\n r1 = r0.f4673a;\n r2 = com.p111d.p112a.p121c.C5387z.WRITE_EMPTY_JSON_ARRAYS;\n r1 = r1.m18737a(r2);\n if (r1 != 0) goto L_0x013b;\n L_0x0137:\n r1 = com.p111d.p112a.p121c.p134k.C7119d.f20265c;\n L_0x0139:\n r10 = r1;\n goto L_0x013c;\n L_0x013b:\n r10 = r6;\n L_0x013c:\n r9 = r7;\n L_0x013d:\n r12 = new com.d.a.c.k.d;\n r1 = r0.f4674b;\n r4 = r1.mo1376f();\n r1 = r12;\n r2 = r15;\n r3 = r11;\n r6 = r17;\n r7 = r18;\n r1.<init>(r2, r3, r4, r5, r6, r7, r8, r9, r10);\n r1 = r0.f4676d;\n r1 = r1.findNullSerializer(r11);\n if (r1 == 0) goto L_0x015f;\n L_0x0157:\n r2 = r14;\n r1 = r2.mo2929c(r1);\n r12.mo3537b(r1);\n L_0x015f:\n r1 = r0.f4676d;\n r1 = r1.findUnwrappingNameTransformer(r11);\n if (r1 == 0) goto L_0x016d;\n L_0x0167:\n r2 = new com.d.a.c.k.a.r;\n r2.<init>(r12, r1);\n r12 = r2;\n L_0x016d:\n return r12;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.d.a.c.k.m.a(com.d.a.c.aa, com.d.a.c.f.n, com.d.a.c.j, com.d.a.c.o, com.d.a.c.i.f, com.d.a.c.i.f, com.d.a.c.f.e, boolean):com.d.a.c.k.d\");\n }", "private final com.google.android.finsky.verifier.p259a.p260a.C4709m m21920b(com.google.protobuf.nano.a r7) {\n /*\n r6 = this;\n L_0x0000:\n r0 = r7.a();\n switch(r0) {\n case 0: goto L_0x000d;\n case 10: goto L_0x000e;\n case 16: goto L_0x0015;\n case 26: goto L_0x0046;\n case 34: goto L_0x0053;\n default: goto L_0x0007;\n };\n L_0x0007:\n r0 = super.m4918a(r7, r0);\n if (r0 != 0) goto L_0x0000;\n L_0x000d:\n return r6;\n L_0x000e:\n r0 = r7.f();\n r6.f24221c = r0;\n goto L_0x0000;\n L_0x0015:\n r1 = r7.o();\n r2 = r7.i();\t Catch:{ IllegalArgumentException -> 0x003b }\n switch(r2) {\n case 0: goto L_0x0043;\n case 1: goto L_0x0020;\n case 2: goto L_0x0043;\n default: goto L_0x0020;\n };\t Catch:{ IllegalArgumentException -> 0x003b }\n L_0x0020:\n r3 = new java.lang.IllegalArgumentException;\t Catch:{ IllegalArgumentException -> 0x003b }\n r4 = 44;\n r5 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x003b }\n r5.<init>(r4);\t Catch:{ IllegalArgumentException -> 0x003b }\n r2 = r5.append(r2);\t Catch:{ IllegalArgumentException -> 0x003b }\n r4 = \" is not a valid enum ResourceType\";\n r2 = r2.append(r4);\t Catch:{ IllegalArgumentException -> 0x003b }\n r2 = r2.toString();\t Catch:{ IllegalArgumentException -> 0x003b }\n r3.<init>(r2);\t Catch:{ IllegalArgumentException -> 0x003b }\n throw r3;\t Catch:{ IllegalArgumentException -> 0x003b }\n L_0x003b:\n r2 = move-exception;\n r7.e(r1);\n r6.m4918a(r7, r0);\n goto L_0x0000;\n L_0x0043:\n r6.f24222d = r2;\t Catch:{ IllegalArgumentException -> 0x003b }\n goto L_0x0000;\n L_0x0046:\n r0 = r7.g();\n r6.f24223e = r0;\n r0 = r6.f24220b;\n r0 = r0 | 1;\n r6.f24220b = r0;\n goto L_0x0000;\n L_0x0053:\n r0 = r7.f();\n r6.f24224f = r0;\n r0 = r6.f24220b;\n r0 = r0 | 2;\n r6.f24220b = r0;\n goto L_0x0000;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.finsky.verifier.a.a.m.b(com.google.protobuf.nano.a):com.google.android.finsky.verifier.a.a.m\");\n }", "private p000a.p001a.p002a.p003a.C0916s m1655b(p000a.p001a.p002a.p003a.p022i.p024b.C0112x r7, p000a.p001a.p002a.p003a.p034n.C0157e r8) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/293907205.run(Unknown Source)\n*/\n /*\n r6 = this;\n r0 = r7.m321a();\n r7 = r7.m322b();\n r1 = 0;\n r2 = r1;\n L_0x000a:\n r3 = r6.f1533u;\n r3 = r3 + 1;\n r6.f1533u = r3;\n r0.m2803e();\n r3 = r0.mo2010a();\n if (r3 != 0) goto L_0x0032;\n L_0x0019:\n r7 = r6.f1513a;\n r8 = \"Cannot retry non-repeatable request\";\n r7.m260a(r8);\n if (r2 == 0) goto L_0x002a;\n L_0x0022:\n r7 = new a.a.a.a.b.m;\n r8 = \"Cannot retry request with a non-repeatable request entity. The cause lists the reason the original request failed.\";\n r7.<init>(r8, r2);\n throw r7;\n L_0x002a:\n r7 = new a.a.a.a.b.m;\n r8 = \"Cannot retry request with a non-repeatable request entity.\";\n r7.<init>(r8);\n throw r7;\n L_0x0032:\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x0086 }\n r2 = r2.mo1932c();\t Catch:{ IOException -> 0x0086 }\n if (r2 != 0) goto L_0x0057;\t Catch:{ IOException -> 0x0086 }\n L_0x003a:\n r2 = r7.mo15e();\t Catch:{ IOException -> 0x0086 }\n if (r2 != 0) goto L_0x004f;\t Catch:{ IOException -> 0x0086 }\n L_0x0040:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r3 = \"Reopening the direct connection.\";\t Catch:{ IOException -> 0x0086 }\n r2.m260a(r3);\t Catch:{ IOException -> 0x0086 }\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x0086 }\n r3 = r6.f1528p;\t Catch:{ IOException -> 0x0086 }\n r2.mo2023a(r7, r8, r3);\t Catch:{ IOException -> 0x0086 }\n goto L_0x0057;\t Catch:{ IOException -> 0x0086 }\n L_0x004f:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r3 = \"Proxied connection. Need to start over.\";\t Catch:{ IOException -> 0x0086 }\n r2.m260a(r3);\t Catch:{ IOException -> 0x0086 }\n goto L_0x0085;\t Catch:{ IOException -> 0x0086 }\n L_0x0057:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r2 = r2.m262a();\t Catch:{ IOException -> 0x0086 }\n if (r2 == 0) goto L_0x007c;\t Catch:{ IOException -> 0x0086 }\n L_0x005f:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r3 = new java.lang.StringBuilder;\t Catch:{ IOException -> 0x0086 }\n r3.<init>();\t Catch:{ IOException -> 0x0086 }\n r4 = \"Attempt \";\t Catch:{ IOException -> 0x0086 }\n r3.append(r4);\t Catch:{ IOException -> 0x0086 }\n r4 = r6.f1533u;\t Catch:{ IOException -> 0x0086 }\n r3.append(r4);\t Catch:{ IOException -> 0x0086 }\n r4 = \" to execute request\";\t Catch:{ IOException -> 0x0086 }\n r3.append(r4);\t Catch:{ IOException -> 0x0086 }\n r3 = r3.toString();\t Catch:{ IOException -> 0x0086 }\n r2.m260a(r3);\t Catch:{ IOException -> 0x0086 }\n L_0x007c:\n r2 = r6.f1518f;\t Catch:{ IOException -> 0x0086 }\n r3 = r6.f1529q;\t Catch:{ IOException -> 0x0086 }\n r2 = r2.m464a(r0, r3, r8);\t Catch:{ IOException -> 0x0086 }\n r1 = r2;\n L_0x0085:\n return r1;\n L_0x0086:\n r2 = move-exception;\n r3 = r6.f1513a;\n r4 = \"Closing the connection.\";\n r3.m260a(r4);\n r3 = r6.f1529q;\t Catch:{ IOException -> 0x0093 }\n r3.close();\t Catch:{ IOException -> 0x0093 }\n L_0x0093:\n r3 = r6.f1520h;\n r4 = r0.m2802d();\n r3 = r3.retryRequest(r2, r4, r8);\n if (r3 == 0) goto L_0x010a;\n L_0x009f:\n r3 = r6.f1513a;\n r3 = r3.m270d();\n if (r3 == 0) goto L_0x00d9;\n L_0x00a7:\n r3 = r6.f1513a;\n r4 = new java.lang.StringBuilder;\n r4.<init>();\n r5 = \"I/O exception (\";\n r4.append(r5);\n r5 = r2.getClass();\n r5 = r5.getName();\n r4.append(r5);\n r5 = \") caught when processing request to \";\n r4.append(r5);\n r4.append(r7);\n r5 = \": \";\n r4.append(r5);\n r5 = r2.getMessage();\n r4.append(r5);\n r4 = r4.toString();\n r3.m269d(r4);\n L_0x00d9:\n r3 = r6.f1513a;\n r3 = r3.m262a();\n if (r3 == 0) goto L_0x00ea;\n L_0x00e1:\n r3 = r6.f1513a;\n r4 = r2.getMessage();\n r3.m261a(r4, r2);\n L_0x00ea:\n r3 = r6.f1513a;\n r3 = r3.m270d();\n if (r3 == 0) goto L_0x000a;\n L_0x00f2:\n r3 = r6.f1513a;\n r4 = new java.lang.StringBuilder;\n r4.<init>();\n r5 = \"Retrying request to \";\n r4.append(r5);\n r4.append(r7);\n r4 = r4.toString();\n r3.m269d(r4);\n goto L_0x000a;\n L_0x010a:\n r8 = r2 instanceof p000a.p001a.p002a.p003a.C0176z;\n if (r8 == 0) goto L_0x0134;\n L_0x010e:\n r8 = new a.a.a.a.z;\n r0 = new java.lang.StringBuilder;\n r0.<init>();\n r7 = r7.mo10a();\n r7 = r7.m474e();\n r0.append(r7);\n r7 = \" failed to respond\";\n r0.append(r7);\n r7 = r0.toString();\n r8.<init>(r7);\n r7 = r2.getStackTrace();\n r8.setStackTrace(r7);\n throw r8;\n L_0x0134:\n throw r2;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: a.a.a.a.i.b.p.b(a.a.a.a.i.b.x, a.a.a.a.n.e):a.a.a.a.s\");\n }", "public void m7211c() {\n /*\n r34 = this;\n r16 = 0;\n r15 = 0;\n r5 = 0;\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"MINOR_TYPE\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r3 = -1;\n r4 = r2.hashCode();\n switch(r4) {\n case -1172269795: goto L_0x002e;\n case 2157948: goto L_0x0038;\n case 2571565: goto L_0x0024;\n default: goto L_0x0018;\n };\n L_0x0018:\n r2 = r3;\n L_0x0019:\n switch(r2) {\n case 0: goto L_0x0042;\n case 1: goto L_0x0162;\n case 2: goto L_0x01a9;\n default: goto L_0x001c;\n };\n L_0x001c:\n r2 = \"Undefined type\";\n r0 = r34;\n mobi.mmdt.componentsutils.p079a.p080a.C1104b.m6366b(r0, r2);\n L_0x0023:\n return;\n L_0x0024:\n r4 = \"TEXT\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x0018;\n L_0x002c:\n r2 = 0;\n goto L_0x0019;\n L_0x002e:\n r4 = \"STICKER\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x0018;\n L_0x0036:\n r2 = 1;\n goto L_0x0019;\n L_0x0038:\n r4 = \"FILE\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x0018;\n L_0x0040:\n r2 = 2;\n goto L_0x0019;\n L_0x0042:\n r4 = mobi.mmdt.ott.provider.p169c.C1594n.TEXT;\n r33 = r5;\n L_0x0046:\n r8 = mobi.mmdt.componentsutils.p079a.p084e.C1113a.m6421a();\n r10 = mobi.mmdt.ott.provider.p169c.C1592l.IN;\n r0 = r34;\n r2 = r0.f4758b;\n r0 = r34;\n r3 = r0.f4757a;\n r3 = mobi.mmdt.ott.p109d.p111b.C1309a.m6934a(r3);\n r3 = r3.m6942b();\n r2 = r2.equals(r3);\n if (r2 == 0) goto L_0x0064;\n L_0x0062:\n r10 = mobi.mmdt.ott.provider.p169c.C1592l.OUT;\n L_0x0064:\n r0 = r34;\n r2 = r0.f4757a;\n r0 = r34;\n r3 = r0.f4761e;\n r2 = mobi.mmdt.ott.provider.p169c.C1583c.m7972a(r2, r3, r10);\n if (r2 != 0) goto L_0x0023;\n L_0x0072:\n r2 = mobi.mmdt.ott.MyApplication.m6445a();\n r2 = r2.f4177h;\n if (r2 == 0) goto L_0x008a;\n L_0x007a:\n r2 = mobi.mmdt.ott.MyApplication.m6445a();\n r2 = r2.f4177h;\n r0 = r34;\n r3 = r0.f4759c;\n r2 = r2.equals(r3);\n if (r2 != 0) goto L_0x024e;\n L_0x008a:\n r17 = 0;\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n if (r2 == 0) goto L_0x00b8;\n L_0x0098:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r2 = r2.isEmpty();\n if (r2 != 0) goto L_0x00b8;\n L_0x00aa:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r17 = r2;\n L_0x00b8:\n r2 = new mobi.mmdt.ott.d.a.b;\n r0 = r34;\n r3 = r0.f4761e;\n r0 = r34;\n r5 = r0.f4760d;\n r0 = r34;\n r6 = r0.f4762f;\n r7 = \"SEND_TIME_IN_GMT\";\n r6 = r6.get(r7);\n r6 = (java.lang.String) r6;\n r6 = java.lang.Long.parseLong(r6);\n r11 = mobi.mmdt.ott.provider.p169c.C1593m.NOT_READ;\n r0 = r34;\n r12 = r0.f4759c;\n r13 = mobi.mmdt.ott.provider.p169c.C1595o.GROUP;\n r0 = r34;\n r14 = r0.f4758b;\n r2.<init>(r3, r4, r5, r6, r8, r10, r11, r12, r13, r14, r15, r16, r17);\n r0 = r34;\n r3 = r0.f4757a;\n r3 = mobi.mmdt.ott.logic.p157e.C1509a.m7621a(r3);\n r0 = r34;\n r4 = r0.f4762f;\n r0 = r33;\n r3.m7626a(r2, r0, r4);\n L_0x00f2:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n if (r2 == 0) goto L_0x013c;\n L_0x00fe:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r2 = r2.isEmpty();\n if (r2 != 0) goto L_0x013c;\n L_0x0110:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r0 = r34;\n r3 = r0.f4757a;\n r0 = r34;\n r4 = r0.f4761e;\n mobi.mmdt.ott.provider.p169c.C1583c.m7976b(r3, r4, r2);\n r0 = r34;\n r3 = r0.f4757a;\n r2 = mobi.mmdt.ott.provider.p169c.C1583c.m8003n(r3, r2);\n r0 = r34;\n r3 = r0.f4757a;\n r0 = r34;\n r4 = r0.f4761e;\n r5 = mobi.mmdt.ott.provider.p169c.C1595o.SINGLE;\n mobi.mmdt.ott.logic.p112a.p120c.p121a.p123b.C1387u.m7218a(r3, r4, r2, r5);\n L_0x013c:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"MINOR_TYPE\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r3 = \"TEXT\";\n r2 = r2.equals(r3);\n if (r2 != 0) goto L_0x0023;\n L_0x0150:\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.b;\n r0 = r34;\n r3 = r0.f4757a;\n r0 = r34;\n r4 = r0.f4762f;\n r2.<init>(r3, r15, r4);\n mobi.mmdt.ott.logic.C1494c.m7541c(r2);\n goto L_0x0023;\n L_0x0162:\n r6 = mobi.mmdt.ott.provider.p169c.C1594n.STICKER;\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"STICKER_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r0 = r34;\n r3 = r0.f4762f;\n r4 = \"STICKER_PACKAGE_ID\";\n r3 = r3.get(r4);\n r3 = (java.lang.String) r3;\n r0 = r34;\n r4 = r0.f4762f;\n r7 = \"STICKER_VERSION\";\n r4 = r4.get(r7);\n r4 = (java.lang.String) r4;\n if (r4 == 0) goto L_0x02c9;\n L_0x018a:\n if (r2 == 0) goto L_0x02c9;\n L_0x018c:\n if (r3 == 0) goto L_0x02c9;\n L_0x018e:\n r7 = r4.isEmpty();\n if (r7 != 0) goto L_0x02c9;\n L_0x0194:\n r7 = r2.isEmpty();\n if (r7 != 0) goto L_0x02c9;\n L_0x019a:\n r7 = r3.isEmpty();\n if (r7 != 0) goto L_0x02c9;\n L_0x01a0:\n r16 = mobi.mmdt.ott.provider.p174h.C1629b.m8295a(r4, r3, r2);\n r33 = r5;\n r4 = r6;\n goto L_0x0046;\n L_0x01a9:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"FILE_TYPE\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r3 = -1;\n r4 = r2.hashCode();\n switch(r4) {\n case 327328941: goto L_0x01de;\n case 796404377: goto L_0x01ca;\n case 802160718: goto L_0x01e8;\n case 808293817: goto L_0x01d4;\n default: goto L_0x01bd;\n };\n L_0x01bd:\n r2 = r3;\n L_0x01be:\n switch(r2) {\n case 0: goto L_0x01f2;\n case 1: goto L_0x020c;\n case 2: goto L_0x0222;\n case 3: goto L_0x0238;\n default: goto L_0x01c1;\n };\n L_0x01c1:\n r2 = \"Undefined file type\";\n r0 = r34;\n mobi.mmdt.componentsutils.p079a.p080a.C1104b.m6366b(r0, r2);\n goto L_0x0023;\n L_0x01ca:\n r4 = \"FILE_TYPE_IMAGE\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x01bd;\n L_0x01d2:\n r2 = 0;\n goto L_0x01be;\n L_0x01d4:\n r4 = \"FILE_TYPE_VIDEO\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x01bd;\n L_0x01dc:\n r2 = 1;\n goto L_0x01be;\n L_0x01de:\n r4 = \"FILE_TYPE_PUSH_TO_TALK\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x01bd;\n L_0x01e6:\n r2 = 2;\n goto L_0x01be;\n L_0x01e8:\n r4 = \"FILE_TYPE_OTHER\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x01bd;\n L_0x01f0:\n r2 = 3;\n goto L_0x01be;\n L_0x01f2:\n r3 = mobi.mmdt.ott.provider.p169c.C1594n.IMAGE;\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.h;\n r0 = r34;\n r4 = r0.f4757a;\n r0 = r34;\n r5 = r0.f4762f;\n r6 = mobi.mmdt.ott.provider.p170d.C1605j.IMAGE;\n r2.<init>(r4, r5, r6);\n r2 = r2.m7152a();\n L_0x0207:\n r33 = r2;\n r4 = r3;\n goto L_0x0046;\n L_0x020c:\n r3 = mobi.mmdt.ott.provider.p169c.C1594n.VIDEO;\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.h;\n r0 = r34;\n r4 = r0.f4757a;\n r0 = r34;\n r5 = r0.f4762f;\n r6 = mobi.mmdt.ott.provider.p170d.C1605j.VIDEO;\n r2.<init>(r4, r5, r6);\n r2 = r2.m7152a();\n goto L_0x0207;\n L_0x0222:\n r3 = mobi.mmdt.ott.provider.p169c.C1594n.PUSH_TO_TALK;\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.h;\n r0 = r34;\n r4 = r0.f4757a;\n r0 = r34;\n r5 = r0.f4762f;\n r6 = mobi.mmdt.ott.provider.p170d.C1605j.PUSH_TO_TALK;\n r2.<init>(r4, r5, r6);\n r2 = r2.m7152a();\n goto L_0x0207;\n L_0x0238:\n r3 = mobi.mmdt.ott.provider.p169c.C1594n.FILE;\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.h;\n r0 = r34;\n r4 = r0.f4757a;\n r0 = r34;\n r5 = r0.f4762f;\n r6 = mobi.mmdt.ott.provider.p170d.C1605j.OTHER;\n r2.<init>(r4, r5, r6);\n r2 = r2.m7152a();\n goto L_0x0207;\n L_0x024e:\n if (r33 == 0) goto L_0x029c;\n L_0x0250:\n r0 = r34;\n r0 = r0.f4757a;\n r18 = r0;\n r19 = r33.m8082n();\n r20 = r33.m8069a();\n r21 = r33.m8079k();\n r22 = r33.m8073e();\n r23 = r33.m8078j();\n r24 = r33.m8077i();\n r26 = 0;\n r27 = r33.m8081m();\n r28 = r33.m8080l();\n r29 = r33.m8075g();\n r30 = r33.m8071c();\n r31 = r33.m8072d();\n r32 = r33.m8070b();\n r33 = r33.m8074f();\n r2 = mobi.mmdt.ott.provider.p170d.C1598c.m8100a(r18, r19, r20, r21, r22, r23, r24, r26, r27, r28, r29, r30, r31, r32, r33);\n r2 = r2.getLastPathSegment();\n r2 = java.lang.Long.parseLong(r2);\n r15 = java.lang.Long.valueOf(r2);\n L_0x029c:\n r0 = r34;\n r2 = r0.f4757a;\n r0 = r34;\n r3 = r0.f4761e;\n r0 = r34;\n r5 = r0.f4760d;\n r0 = r34;\n r6 = r0.f4762f;\n r7 = \"SEND_TIME_IN_GMT\";\n r6 = r6.get(r7);\n r6 = (java.lang.String) r6;\n r6 = java.lang.Long.parseLong(r6);\n r11 = mobi.mmdt.ott.provider.p169c.C1593m.READ;\n r0 = r34;\n r12 = r0.f4759c;\n r13 = mobi.mmdt.ott.provider.p169c.C1595o.GROUP;\n r0 = r34;\n r14 = r0.f4758b;\n mobi.mmdt.ott.provider.p169c.C1583c.m7966a(r2, r3, r4, r5, r6, r8, r10, r11, r12, r13, r14, r15, r16);\n goto L_0x00f2;\n L_0x02c9:\n r33 = r5;\n r4 = r6;\n goto L_0x0046;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: mobi.mmdt.ott.logic.a.c.a.b.s.c():void\");\n }", "private final com.google.wireless.android.finsky.dfe.p505c.p506a.ec m35437b(com.google.protobuf.nano.C7213a r8) {\n /*\n r7 = this;\n r1 = 0;\n L_0x0001:\n r0 = r8.m33550a();\n switch(r0) {\n case 0: goto L_0x000e;\n case 8: goto L_0x000f;\n case 16: goto L_0x004c;\n case 26: goto L_0x006f;\n case 34: goto L_0x007c;\n default: goto L_0x0008;\n };\n L_0x0008:\n r0 = super.a(r8, r0);\n if (r0 != 0) goto L_0x0001;\n L_0x000e:\n return r7;\n L_0x000f:\n r2 = r7.f37533a;\n r2 = r2 | 1;\n r7.f37533a = r2;\n r2 = r8.m33573o();\n r3 = r8.m33567i();\t Catch:{ IllegalArgumentException -> 0x003b }\n switch(r3) {\n case 0: goto L_0x0043;\n case 1: goto L_0x0043;\n default: goto L_0x0020;\n };\t Catch:{ IllegalArgumentException -> 0x003b }\n L_0x0020:\n r4 = new java.lang.IllegalArgumentException;\t Catch:{ IllegalArgumentException -> 0x003b }\n r5 = 42;\n r6 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x003b }\n r6.<init>(r5);\t Catch:{ IllegalArgumentException -> 0x003b }\n r3 = r6.append(r3);\t Catch:{ IllegalArgumentException -> 0x003b }\n r5 = \" is not a valid enum ResultCode\";\n r3 = r3.append(r5);\t Catch:{ IllegalArgumentException -> 0x003b }\n r3 = r3.toString();\t Catch:{ IllegalArgumentException -> 0x003b }\n r4.<init>(r3);\t Catch:{ IllegalArgumentException -> 0x003b }\n throw r4;\t Catch:{ IllegalArgumentException -> 0x003b }\n L_0x003b:\n r3 = move-exception;\n r8.m33562e(r2);\n r7.a(r8, r0);\n goto L_0x0001;\n L_0x0043:\n r7.f37534b = r3;\t Catch:{ IllegalArgumentException -> 0x003b }\n r3 = r7.f37533a;\t Catch:{ IllegalArgumentException -> 0x003b }\n r3 = r3 | 1;\n r7.f37533a = r3;\t Catch:{ IllegalArgumentException -> 0x003b }\n goto L_0x0001;\n L_0x004c:\n r2 = r7.f37533a;\n r2 = r2 | 2;\n r7.f37533a = r2;\n r2 = r8.m33573o();\n r3 = r8.m33560d();\t Catch:{ IllegalArgumentException -> 0x0067 }\n r3 = com.google.wireless.android.finsky.dfe.p505c.p506a.dp.m35391a(r3);\t Catch:{ IllegalArgumentException -> 0x0067 }\n r7.f37535c = r3;\t Catch:{ IllegalArgumentException -> 0x0067 }\n r3 = r7.f37533a;\t Catch:{ IllegalArgumentException -> 0x0067 }\n r3 = r3 | 2;\n r7.f37533a = r3;\t Catch:{ IllegalArgumentException -> 0x0067 }\n goto L_0x0001;\n L_0x0067:\n r3 = move-exception;\n r8.m33562e(r2);\n r7.a(r8, r0);\n goto L_0x0001;\n L_0x006f:\n r0 = r8.m33565g();\n r7.f37536d = r0;\n r0 = r7.f37533a;\n r0 = r0 | 4;\n r7.f37533a = r0;\n goto L_0x0001;\n L_0x007c:\n r0 = 34;\n r2 = com.google.protobuf.nano.C7222l.m33624a(r8, r0);\n r0 = r7.f37537e;\n if (r0 != 0) goto L_0x00a8;\n L_0x0086:\n r0 = r1;\n L_0x0087:\n r2 = r2 + r0;\n r2 = new com.google.wireless.android.finsky.dfe.p505c.p506a.ed[r2];\n if (r0 == 0) goto L_0x0091;\n L_0x008c:\n r3 = r7.f37537e;\n java.lang.System.arraycopy(r3, r1, r2, r1, r0);\n L_0x0091:\n r3 = r2.length;\n r3 = r3 + -1;\n if (r0 >= r3) goto L_0x00ac;\n L_0x0096:\n r3 = new com.google.wireless.android.finsky.dfe.c.a.ed;\n r3.<init>();\n r2[r0] = r3;\n r3 = r2[r0];\n r8.m33552a(r3);\n r8.m33550a();\n r0 = r0 + 1;\n goto L_0x0091;\n L_0x00a8:\n r0 = r7.f37537e;\n r0 = r0.length;\n goto L_0x0087;\n L_0x00ac:\n r3 = new com.google.wireless.android.finsky.dfe.c.a.ed;\n r3.<init>();\n r2[r0] = r3;\n r0 = r2[r0];\n r8.m33552a(r0);\n r7.f37537e = r2;\n goto L_0x0001;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.wireless.android.finsky.dfe.c.a.ec.b(com.google.protobuf.nano.a):com.google.wireless.android.finsky.dfe.c.a.ec\");\n }", "private final com.google.android.p306h.p307a.p308a.C5685v m26927b(com.google.protobuf.nano.a r7) {\n /*\n r6 = this;\n L_0x0000:\n r0 = r7.a();\n switch(r0) {\n case 0: goto L_0x000d;\n case 8: goto L_0x000e;\n case 18: goto L_0x0043;\n case 24: goto L_0x0054;\n case 32: goto L_0x005f;\n case 42: goto L_0x006a;\n default: goto L_0x0007;\n };\n L_0x0007:\n r0 = super.m4918a(r7, r0);\n if (r0 != 0) goto L_0x0000;\n L_0x000d:\n return r6;\n L_0x000e:\n r1 = r7.o();\n r2 = r7.i();\t Catch:{ IllegalArgumentException -> 0x0034 }\n switch(r2) {\n case 0: goto L_0x003c;\n case 1: goto L_0x003c;\n case 2: goto L_0x003c;\n case 3: goto L_0x003c;\n case 4: goto L_0x003c;\n case 5: goto L_0x003c;\n case 101: goto L_0x003c;\n case 102: goto L_0x003c;\n case 103: goto L_0x003c;\n case 104: goto L_0x003c;\n case 105: goto L_0x003c;\n case 106: goto L_0x003c;\n case 107: goto L_0x003c;\n case 108: goto L_0x003c;\n case 201: goto L_0x003c;\n case 202: goto L_0x003c;\n case 203: goto L_0x003c;\n case 204: goto L_0x003c;\n case 205: goto L_0x003c;\n case 206: goto L_0x003c;\n case 207: goto L_0x003c;\n case 208: goto L_0x003c;\n case 209: goto L_0x003c;\n case 301: goto L_0x003c;\n case 302: goto L_0x003c;\n case 303: goto L_0x003c;\n case 304: goto L_0x003c;\n case 305: goto L_0x003c;\n case 306: goto L_0x003c;\n case 307: goto L_0x003c;\n case 401: goto L_0x003c;\n case 402: goto L_0x003c;\n case 403: goto L_0x003c;\n case 404: goto L_0x003c;\n case 501: goto L_0x003c;\n case 502: goto L_0x003c;\n case 503: goto L_0x003c;\n case 504: goto L_0x003c;\n case 601: goto L_0x003c;\n case 602: goto L_0x003c;\n case 603: goto L_0x003c;\n case 604: goto L_0x003c;\n case 605: goto L_0x003c;\n case 606: goto L_0x003c;\n case 607: goto L_0x003c;\n case 608: goto L_0x003c;\n case 609: goto L_0x003c;\n case 610: goto L_0x003c;\n case 611: goto L_0x003c;\n case 612: goto L_0x003c;\n case 613: goto L_0x003c;\n case 614: goto L_0x003c;\n case 615: goto L_0x003c;\n case 616: goto L_0x003c;\n case 617: goto L_0x003c;\n case 618: goto L_0x003c;\n case 619: goto L_0x003c;\n case 620: goto L_0x003c;\n case 621: goto L_0x003c;\n case 622: goto L_0x003c;\n case 623: goto L_0x003c;\n case 624: goto L_0x003c;\n case 625: goto L_0x003c;\n case 626: goto L_0x003c;\n case 627: goto L_0x003c;\n case 628: goto L_0x003c;\n case 629: goto L_0x003c;\n case 630: goto L_0x003c;\n case 631: goto L_0x003c;\n case 632: goto L_0x003c;\n case 633: goto L_0x003c;\n case 634: goto L_0x003c;\n case 635: goto L_0x003c;\n case 636: goto L_0x003c;\n case 637: goto L_0x003c;\n case 638: goto L_0x003c;\n case 639: goto L_0x003c;\n case 640: goto L_0x003c;\n case 641: goto L_0x003c;\n case 701: goto L_0x003c;\n case 702: goto L_0x003c;\n case 703: goto L_0x003c;\n case 704: goto L_0x003c;\n case 705: goto L_0x003c;\n case 706: goto L_0x003c;\n case 707: goto L_0x003c;\n case 708: goto L_0x003c;\n case 709: goto L_0x003c;\n case 710: goto L_0x003c;\n case 711: goto L_0x003c;\n case 712: goto L_0x003c;\n case 713: goto L_0x003c;\n case 714: goto L_0x003c;\n case 715: goto L_0x003c;\n case 716: goto L_0x003c;\n case 717: goto L_0x003c;\n case 718: goto L_0x003c;\n case 719: goto L_0x003c;\n case 720: goto L_0x003c;\n case 721: goto L_0x003c;\n case 722: goto L_0x003c;\n case 801: goto L_0x003c;\n case 802: goto L_0x003c;\n case 803: goto L_0x003c;\n case 901: goto L_0x003c;\n case 902: goto L_0x003c;\n case 903: goto L_0x003c;\n case 904: goto L_0x003c;\n case 905: goto L_0x003c;\n case 906: goto L_0x003c;\n case 907: goto L_0x003c;\n case 908: goto L_0x003c;\n case 909: goto L_0x003c;\n case 910: goto L_0x003c;\n case 911: goto L_0x003c;\n case 912: goto L_0x003c;\n case 1001: goto L_0x003c;\n case 1002: goto L_0x003c;\n case 1003: goto L_0x003c;\n case 1004: goto L_0x003c;\n case 1005: goto L_0x003c;\n case 1006: goto L_0x003c;\n case 1101: goto L_0x003c;\n case 1102: goto L_0x003c;\n case 1201: goto L_0x003c;\n case 1301: goto L_0x003c;\n case 1302: goto L_0x003c;\n case 1303: goto L_0x003c;\n case 1304: goto L_0x003c;\n case 1305: goto L_0x003c;\n case 1306: goto L_0x003c;\n case 1307: goto L_0x003c;\n case 1308: goto L_0x003c;\n case 1309: goto L_0x003c;\n case 1310: goto L_0x003c;\n case 1311: goto L_0x003c;\n case 1312: goto L_0x003c;\n case 1313: goto L_0x003c;\n case 1314: goto L_0x003c;\n case 1315: goto L_0x003c;\n case 1316: goto L_0x003c;\n case 1317: goto L_0x003c;\n case 1318: goto L_0x003c;\n case 1319: goto L_0x003c;\n case 1320: goto L_0x003c;\n case 1321: goto L_0x003c;\n case 1322: goto L_0x003c;\n case 1323: goto L_0x003c;\n case 1324: goto L_0x003c;\n case 1325: goto L_0x003c;\n case 1326: goto L_0x003c;\n case 1327: goto L_0x003c;\n case 1328: goto L_0x003c;\n case 1329: goto L_0x003c;\n case 1330: goto L_0x003c;\n case 1331: goto L_0x003c;\n case 1332: goto L_0x003c;\n case 1333: goto L_0x003c;\n case 1334: goto L_0x003c;\n case 1335: goto L_0x003c;\n case 1336: goto L_0x003c;\n case 1337: goto L_0x003c;\n case 1338: goto L_0x003c;\n case 1339: goto L_0x003c;\n case 1340: goto L_0x003c;\n case 1341: goto L_0x003c;\n case 1342: goto L_0x003c;\n case 1343: goto L_0x003c;\n case 1344: goto L_0x003c;\n case 1345: goto L_0x003c;\n case 1346: goto L_0x003c;\n case 1347: goto L_0x003c;\n case 1401: goto L_0x003c;\n case 1402: goto L_0x003c;\n case 1403: goto L_0x003c;\n case 1404: goto L_0x003c;\n case 1405: goto L_0x003c;\n case 1406: goto L_0x003c;\n case 1407: goto L_0x003c;\n case 1408: goto L_0x003c;\n case 1409: goto L_0x003c;\n case 1410: goto L_0x003c;\n case 1411: goto L_0x003c;\n case 1412: goto L_0x003c;\n case 1413: goto L_0x003c;\n case 1414: goto L_0x003c;\n case 1415: goto L_0x003c;\n case 1416: goto L_0x003c;\n case 1417: goto L_0x003c;\n case 1418: goto L_0x003c;\n case 1419: goto L_0x003c;\n case 1420: goto L_0x003c;\n case 1421: goto L_0x003c;\n case 1422: goto L_0x003c;\n case 1423: goto L_0x003c;\n case 1424: goto L_0x003c;\n case 1425: goto L_0x003c;\n case 1426: goto L_0x003c;\n case 1427: goto L_0x003c;\n case 1601: goto L_0x003c;\n case 1602: goto L_0x003c;\n case 1603: goto L_0x003c;\n case 1604: goto L_0x003c;\n case 1605: goto L_0x003c;\n case 1606: goto L_0x003c;\n case 1607: goto L_0x003c;\n case 1608: goto L_0x003c;\n case 1609: goto L_0x003c;\n case 1610: goto L_0x003c;\n case 1611: goto L_0x003c;\n case 1612: goto L_0x003c;\n case 1613: goto L_0x003c;\n case 1614: goto L_0x003c;\n case 1615: goto L_0x003c;\n case 1616: goto L_0x003c;\n case 1617: goto L_0x003c;\n case 1618: goto L_0x003c;\n case 1619: goto L_0x003c;\n case 1620: goto L_0x003c;\n case 1621: goto L_0x003c;\n case 1622: goto L_0x003c;\n case 1623: goto L_0x003c;\n case 1624: goto L_0x003c;\n case 1625: goto L_0x003c;\n case 1626: goto L_0x003c;\n case 1627: goto L_0x003c;\n case 1628: goto L_0x003c;\n case 1629: goto L_0x003c;\n case 1630: goto L_0x003c;\n case 1631: goto L_0x003c;\n case 1632: goto L_0x003c;\n case 1633: goto L_0x003c;\n case 1634: goto L_0x003c;\n case 1635: goto L_0x003c;\n case 1636: goto L_0x003c;\n case 1637: goto L_0x003c;\n case 1638: goto L_0x003c;\n case 1639: goto L_0x003c;\n case 1640: goto L_0x003c;\n case 1641: goto L_0x003c;\n case 1642: goto L_0x003c;\n case 1643: goto L_0x003c;\n case 1644: goto L_0x003c;\n case 1645: goto L_0x003c;\n case 1646: goto L_0x003c;\n case 1647: goto L_0x003c;\n case 1648: goto L_0x003c;\n case 1649: goto L_0x003c;\n case 1650: goto L_0x003c;\n case 1651: goto L_0x003c;\n case 1652: goto L_0x003c;\n case 1653: goto L_0x003c;\n case 1654: goto L_0x003c;\n case 1655: goto L_0x003c;\n case 1656: goto L_0x003c;\n case 1657: goto L_0x003c;\n case 1658: goto L_0x003c;\n case 1659: goto L_0x003c;\n case 1660: goto L_0x003c;\n case 1801: goto L_0x003c;\n case 1802: goto L_0x003c;\n case 1803: goto L_0x003c;\n case 1804: goto L_0x003c;\n case 1805: goto L_0x003c;\n case 1806: goto L_0x003c;\n case 1807: goto L_0x003c;\n case 1808: goto L_0x003c;\n case 1809: goto L_0x003c;\n case 1810: goto L_0x003c;\n case 1811: goto L_0x003c;\n case 1812: goto L_0x003c;\n case 1813: goto L_0x003c;\n case 1814: goto L_0x003c;\n case 1815: goto L_0x003c;\n case 1816: goto L_0x003c;\n case 1817: goto L_0x003c;\n case 1901: goto L_0x003c;\n case 1902: goto L_0x003c;\n case 1903: goto L_0x003c;\n case 1904: goto L_0x003c;\n case 1905: goto L_0x003c;\n case 1906: goto L_0x003c;\n case 1907: goto L_0x003c;\n case 1908: goto L_0x003c;\n case 1909: goto L_0x003c;\n case 2001: goto L_0x003c;\n case 2101: goto L_0x003c;\n case 2102: goto L_0x003c;\n case 2103: goto L_0x003c;\n case 2104: goto L_0x003c;\n case 2105: goto L_0x003c;\n case 2106: goto L_0x003c;\n case 2107: goto L_0x003c;\n case 2108: goto L_0x003c;\n case 2109: goto L_0x003c;\n case 2110: goto L_0x003c;\n case 2111: goto L_0x003c;\n case 2112: goto L_0x003c;\n case 2113: goto L_0x003c;\n case 2114: goto L_0x003c;\n case 2115: goto L_0x003c;\n case 2116: goto L_0x003c;\n case 2117: goto L_0x003c;\n case 2118: goto L_0x003c;\n case 2119: goto L_0x003c;\n case 2120: goto L_0x003c;\n case 2121: goto L_0x003c;\n case 2122: goto L_0x003c;\n case 2123: goto L_0x003c;\n case 2124: goto L_0x003c;\n case 2201: goto L_0x003c;\n case 2202: goto L_0x003c;\n case 2203: goto L_0x003c;\n case 2204: goto L_0x003c;\n case 2205: goto L_0x003c;\n case 2206: goto L_0x003c;\n case 2207: goto L_0x003c;\n case 2208: goto L_0x003c;\n case 2209: goto L_0x003c;\n case 2210: goto L_0x003c;\n case 2211: goto L_0x003c;\n case 2212: goto L_0x003c;\n case 2213: goto L_0x003c;\n case 2214: goto L_0x003c;\n case 2215: goto L_0x003c;\n case 2301: goto L_0x003c;\n case 2302: goto L_0x003c;\n case 2303: goto L_0x003c;\n case 2304: goto L_0x003c;\n case 2401: goto L_0x003c;\n case 2402: goto L_0x003c;\n case 2501: goto L_0x003c;\n case 2502: goto L_0x003c;\n case 2503: goto L_0x003c;\n case 2504: goto L_0x003c;\n case 2505: goto L_0x003c;\n case 2506: goto L_0x003c;\n case 2507: goto L_0x003c;\n case 2508: goto L_0x003c;\n case 2509: goto L_0x003c;\n case 2510: goto L_0x003c;\n case 2511: goto L_0x003c;\n case 2512: goto L_0x003c;\n case 2513: goto L_0x003c;\n case 2514: goto L_0x003c;\n case 2515: goto L_0x003c;\n case 2516: goto L_0x003c;\n case 2517: goto L_0x003c;\n case 2518: goto L_0x003c;\n case 2519: goto L_0x003c;\n case 2601: goto L_0x003c;\n case 2602: goto L_0x003c;\n case 2701: goto L_0x003c;\n case 2702: goto L_0x003c;\n case 2703: goto L_0x003c;\n case 2704: goto L_0x003c;\n case 2705: goto L_0x003c;\n case 2706: goto L_0x003c;\n case 2707: goto L_0x003c;\n case 2801: goto L_0x003c;\n case 2802: goto L_0x003c;\n case 2803: goto L_0x003c;\n case 2804: goto L_0x003c;\n case 2805: goto L_0x003c;\n case 2806: goto L_0x003c;\n case 2807: goto L_0x003c;\n case 2808: goto L_0x003c;\n case 2809: goto L_0x003c;\n case 2810: goto L_0x003c;\n case 2811: goto L_0x003c;\n case 2812: goto L_0x003c;\n case 2813: goto L_0x003c;\n case 2814: goto L_0x003c;\n case 2815: goto L_0x003c;\n case 2816: goto L_0x003c;\n case 2817: goto L_0x003c;\n case 2818: goto L_0x003c;\n case 2819: goto L_0x003c;\n case 2820: goto L_0x003c;\n case 2821: goto L_0x003c;\n case 2822: goto L_0x003c;\n case 2823: goto L_0x003c;\n case 2824: goto L_0x003c;\n case 2825: goto L_0x003c;\n case 2826: goto L_0x003c;\n case 2901: goto L_0x003c;\n case 2902: goto L_0x003c;\n case 2903: goto L_0x003c;\n case 2904: goto L_0x003c;\n case 2905: goto L_0x003c;\n case 2906: goto L_0x003c;\n case 2907: goto L_0x003c;\n case 3001: goto L_0x003c;\n case 3002: goto L_0x003c;\n case 3003: goto L_0x003c;\n case 3004: goto L_0x003c;\n case 3005: goto L_0x003c;\n default: goto L_0x0019;\n };\t Catch:{ IllegalArgumentException -> 0x0034 }\n L_0x0019:\n r3 = new java.lang.IllegalArgumentException;\t Catch:{ IllegalArgumentException -> 0x0034 }\n r4 = 41;\n r5 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x0034 }\n r5.<init>(r4);\t Catch:{ IllegalArgumentException -> 0x0034 }\n r2 = r5.append(r2);\t Catch:{ IllegalArgumentException -> 0x0034 }\n r4 = \" is not a valid enum EventType\";\n r2 = r2.append(r4);\t Catch:{ IllegalArgumentException -> 0x0034 }\n r2 = r2.toString();\t Catch:{ IllegalArgumentException -> 0x0034 }\n r3.<init>(r2);\t Catch:{ IllegalArgumentException -> 0x0034 }\n throw r3;\t Catch:{ IllegalArgumentException -> 0x0034 }\n L_0x0034:\n r2 = move-exception;\n r7.e(r1);\n r6.m4918a(r7, r0);\n goto L_0x0000;\n L_0x003c:\n r2 = java.lang.Integer.valueOf(r2);\t Catch:{ IllegalArgumentException -> 0x0034 }\n r6.f28837a = r2;\t Catch:{ IllegalArgumentException -> 0x0034 }\n goto L_0x0000;\n L_0x0043:\n r0 = r6.f28838b;\n if (r0 != 0) goto L_0x004e;\n L_0x0047:\n r0 = new com.google.android.h.a.a.u;\n r0.<init>();\n r6.f28838b = r0;\n L_0x004e:\n r0 = r6.f28838b;\n r7.a(r0);\n goto L_0x0000;\n L_0x0054:\n r0 = r7.j();\n r0 = java.lang.Long.valueOf(r0);\n r6.f28839c = r0;\n goto L_0x0000;\n L_0x005f:\n r0 = r7.j();\n r0 = java.lang.Long.valueOf(r0);\n r6.f28840d = r0;\n goto L_0x0000;\n L_0x006a:\n r0 = r6.f28841e;\n if (r0 != 0) goto L_0x0075;\n L_0x006e:\n r0 = new com.google.android.h.a.a.o;\n r0.<init>();\n r6.f28841e = r0;\n L_0x0075:\n r0 = r6.f28841e;\n r7.a(r0);\n goto L_0x0000;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.h.a.a.v.b(com.google.protobuf.nano.a):com.google.android.h.a.a.v\");\n }", "public int getType() {\n/* 3069 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test(timeout = 4000)\n public void test029() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(16777267);\n Type type0 = Type.VOID_TYPE;\n Type type1 = Type.BYTE_TYPE;\n Type.getObjectType(\"The prefix must not be null\");\n Type type2 = Type.INT_TYPE;\n Item item0 = new Item();\n frame0.execute(132, 164, classWriter0, item0);\n Class<ObjectInputStream> class0 = ObjectInputStream.class;\n Type.getType(class0);\n Type.getType(\")UBbE;._%G\");\n Type type3 = Type.BYTE_TYPE;\n Type type4 = Type.INT_TYPE;\n // Undeclared exception!\n try { \n type0.getElementType();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public int getType() {\n/* 96 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private final com.google.wireless.android.finsky.dfe.p515h.p516a.ae m35733b(com.google.protobuf.nano.C7213a r7) {\n /*\n r6 = this;\n L_0x0000:\n r0 = r7.m33550a();\n switch(r0) {\n case 0: goto L_0x000d;\n case 10: goto L_0x000e;\n case 18: goto L_0x001f;\n case 26: goto L_0x002c;\n case 34: goto L_0x0039;\n case 42: goto L_0x004a;\n case 50: goto L_0x0057;\n case 56: goto L_0x0064;\n case 64: goto L_0x00a3;\n case 72: goto L_0x00b1;\n case 82: goto L_0x00bf;\n default: goto L_0x0007;\n };\n L_0x0007:\n r0 = super.a(r7, r0);\n if (r0 != 0) goto L_0x0000;\n L_0x000d:\n return r6;\n L_0x000e:\n r0 = r6.f38026c;\n if (r0 != 0) goto L_0x0019;\n L_0x0012:\n r0 = new com.google.android.finsky.cv.a.bd;\n r0.<init>();\n r6.f38026c = r0;\n L_0x0019:\n r0 = r6.f38026c;\n r7.m33552a(r0);\n goto L_0x0000;\n L_0x001f:\n r0 = r7.m33564f();\n r6.f38027d = r0;\n r0 = r6.f38025b;\n r0 = r0 | 1;\n r6.f38025b = r0;\n goto L_0x0000;\n L_0x002c:\n r0 = r7.m33564f();\n r6.f38028e = r0;\n r0 = r6.f38025b;\n r0 = r0 | 2;\n r6.f38025b = r0;\n goto L_0x0000;\n L_0x0039:\n r0 = r6.f38029f;\n if (r0 != 0) goto L_0x0044;\n L_0x003d:\n r0 = new com.google.android.finsky.cv.a.ax;\n r0.<init>();\n r6.f38029f = r0;\n L_0x0044:\n r0 = r6.f38029f;\n r7.m33552a(r0);\n goto L_0x0000;\n L_0x004a:\n r0 = r7.m33564f();\n r6.f38030g = r0;\n r0 = r6.f38025b;\n r0 = r0 | 4;\n r6.f38025b = r0;\n goto L_0x0000;\n L_0x0057:\n r0 = r7.m33564f();\n r6.f38031h = r0;\n r0 = r6.f38025b;\n r0 = r0 | 8;\n r6.f38025b = r0;\n goto L_0x0000;\n L_0x0064:\n r1 = r6.f38025b;\n r1 = r1 | 16;\n r6.f38025b = r1;\n r1 = r7.m33573o();\n r2 = r7.m33567i();\t Catch:{ IllegalArgumentException -> 0x0090 }\n switch(r2) {\n case 0: goto L_0x0099;\n case 1: goto L_0x0099;\n case 2: goto L_0x0099;\n case 3: goto L_0x0099;\n case 4: goto L_0x0099;\n default: goto L_0x0075;\n };\t Catch:{ IllegalArgumentException -> 0x0090 }\n L_0x0075:\n r3 = new java.lang.IllegalArgumentException;\t Catch:{ IllegalArgumentException -> 0x0090 }\n r4 = 36;\n r5 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x0090 }\n r5.<init>(r4);\t Catch:{ IllegalArgumentException -> 0x0090 }\n r2 = r5.append(r2);\t Catch:{ IllegalArgumentException -> 0x0090 }\n r4 = \" is not a valid enum Type\";\n r2 = r2.append(r4);\t Catch:{ IllegalArgumentException -> 0x0090 }\n r2 = r2.toString();\t Catch:{ IllegalArgumentException -> 0x0090 }\n r3.<init>(r2);\t Catch:{ IllegalArgumentException -> 0x0090 }\n throw r3;\t Catch:{ IllegalArgumentException -> 0x0090 }\n L_0x0090:\n r2 = move-exception;\n r7.m33562e(r1);\n r6.a(r7, r0);\n goto L_0x0000;\n L_0x0099:\n r6.f38032i = r2;\t Catch:{ IllegalArgumentException -> 0x0090 }\n r2 = r6.f38025b;\t Catch:{ IllegalArgumentException -> 0x0090 }\n r2 = r2 | 16;\n r6.f38025b = r2;\t Catch:{ IllegalArgumentException -> 0x0090 }\n goto L_0x0000;\n L_0x00a3:\n r0 = r7.m33563e();\n r6.f38033j = r0;\n r0 = r6.f38025b;\n r0 = r0 | 32;\n r6.f38025b = r0;\n goto L_0x0000;\n L_0x00b1:\n r0 = r7.m33563e();\n r6.f38034k = r0;\n r0 = r6.f38025b;\n r0 = r0 | 64;\n r6.f38025b = r0;\n goto L_0x0000;\n L_0x00bf:\n r0 = r6.f38035l;\n if (r0 != 0) goto L_0x00ca;\n L_0x00c3:\n r0 = new com.google.android.finsky.cv.a.cv;\n r0.<init>();\n r6.f38035l = r0;\n L_0x00ca:\n r0 = r6.f38035l;\n r7.m33552a(r0);\n goto L_0x0000;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.wireless.android.finsky.dfe.h.a.ae.b(com.google.protobuf.nano.a):com.google.wireless.android.finsky.dfe.h.a.ae\");\n }", "@Test(timeout = 4000)\n public void test043() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(285212630);\n Type type0 = Type.CHAR_TYPE;\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n type0.toString();\n Type[] typeArray0 = new Type[3];\n typeArray0[0] = type0;\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"K,D*%TzaA!8;\");\n typeArray0[1] = type0;\n typeArray0[2] = type0;\n int[] intArray0 = new int[3];\n intArray0[0] = 1048575;\n intArray0[1] = 6;\n intArray0[2] = 7;\n frame0.inputStack = intArray0;\n frame0.initInputFrame(classWriter0, 9, typeArray0, 364);\n Item item0 = new Item();\n item0.set(1);\n item0.set(2649.52636);\n Frame frame1 = new Frame();\n frame0.merge(classWriter0, frame1, 1028);\n frame0.merge(classWriter0, frame1, 2);\n Type type1 = Type.INT_TYPE;\n // Undeclared exception!\n try { \n type0.getElementType();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public boolean //##78\n divideHirIntoBasicBlocks()\n {\n HirIterator lHirIterator;\n HIR lNode, // Current node.\n lParent; // Parent of lNode.\n coins.sym.Sym lSym;\n FlowAnalSym lFlowAnalSym;\n int lNodeIndex;\n Label lLabel, lSubpBlockLabel;\n BBlock lBBlock; // BBlock most recently created.\n IrList lLabelDefList;\n Subp lSubp;\n BlockStmt lSubpBody; // Block as the HIR body of subprogram.\n //## LabeledStmt lSubpBodyWithLabel;\n\n if (fDbgLevel > 0)\n ioRoot.dbgFlow.print(2, \"divideHirIntoBasicBlocks \",\n flowRoot.subpUnderAnalysis.getName() + \" fIrIndexMin \" +\n fIrIndexMin + \" Max \" + fIrIndexMax); //##62\n recordBBlock(bblock(), 0); //Avoid IndexOutofRangeException\n //##62 BEGIN\n lSubp = fSubpDefinition.getSubpSym();\n fNodeCount = fIrIndexMax - fIrIndexMin + 1;\n fFlowIrLinkSize = fNodeCount + 1; //##62\n fFlowIrLink = new IR[fFlowIrLinkSize];\n lBBlock = null; // Record a basic block created.\n boolean lImmediatelyAfterJumpReturn = false; //##63\n //##62 END\n\n //-- Assign index number to symbols actually used in current\n // subprogram setting index to each node.\n // Make label reference list for labels that are explicitly\n // refered as jump target.\n for (lHirIterator = hirRoot.hir.hirIterator(fSubpDefinition.getHirBody());\n lHirIterator.hasNext(); ) {\n lNode = lHirIterator.next();\n if (lNode != null) {\n if (fDbgLevel > 3)\n ioRoot.dbgFlow.print(6, \" lNode\", lNode.toStringShort());\n lSym = lNode.getSym();\n if (lSym != null) {\n if (lSym instanceof FlowAnalSym) {\n lFlowAnalSym = (FlowAnalSym)lSym;\n if (lFlowAnalSym.getIndex() == 0) {\n recordSym(lFlowAnalSym); //##62\n }else {\n if (fDbgLevel > 0)\n flow.dbg(6, \" \" + lFlowAnalSym.getName()+\n \":\" + lFlowAnalSym.getIndex());\n }\n }\n }\n\n //##63 BEG\n lNodeIndex = lNode.getIndex();\n //##78 BEGIN\n if (lNodeIndex < fIrIndexMin) {\n ioRoot.msgRecovered.put(5010, \"\\nNode index \" + lNodeIndex\n + \" should be greater or equal to \" + fIrIndexMin\n + \" in \" + fSubpDefinition.getSubpSym().getName()\n + \"\\n Skip the flow analysis and the optimization.\");\n return false;\n }\n //##78 END\n fFlowIrLink[lNodeIndex - fIrIndexMin] = lNode; //##60\n fBBlockOfIR[lNodeIndex - fIrIndexMin] = lBBlock; //##60\n if (lImmediatelyAfterJumpReturn &&\n (lNode.getOperator() != HIR.OP_LABELED_STMT)) {\n continue; // Control does not come here.\n }\n lImmediatelyAfterJumpReturn = false;\n //##63 END\n switch (lNode.getOperator()) {\n case HIR.OP_LABELED_STMT:\n lBBlock = bblock((LabeledStmt)lNode); // Create a basic block.\n fBBlockOfIR[lNodeIndex - fIrIndexMin] = lBBlock; // Store again. //##65\n //## lSubp.addBBlock(lBBlock); // DELETE\n lLabelDefList = ((LabeledStmt)lNode).getLabelDefList();\n if (lLabelDefList != null) {\n for (Iterator lIterator = lLabelDefList.iterator();\n lIterator.hasNext(); ) { // Set link between HIR & Label.\n lLabel = ((coins.ir.hir.LabelDef)(lIterator.next())).getLabel();\n //##60 lLabel.setBBlock(lBBlock);\n flowRoot.fSubpFlow.setBBlock(lLabel, lBBlock); //##60\n }\n }\n lImmediatelyAfterJumpReturn = false;\n break;\n // begin\n case HIR.OP_CONTENTS:\n lParent = (HIR)lNode.getParent();\n if (lParent.getOperator() == HIR.OP_ASSIGN)\n lBBlock.setFlag(BBlock.HAS_PTR_ASSIGN, true);\n case HIR.OP_ARROW:\n case HIR.OP_ADDR:\n lBBlock.setFlag(BBlock.USE_PTR, true);\n break;\n case HIR.OP_QUAL:\n lBBlock.setFlag(BBlock.HAS_STRUCT_UNION, true);\n break;\n case HIR.OP_CALL:\n lBBlock.setFlag(BBlock.HAS_CALL, true);\n //##62 hasCallInSubp = true; //##62\n //##63 BEGIN\n fCallCount++; //##62\n fSubtreesContainingCall.add(lNode);\n for (HIR lHir = (HIR)lNode.getParent(); lHir != null;\n lHir = (HIR)lHir.getParent()) {\n fSubtreesContainingCall.add(lNode);\n }\n //##63 END\n break;\n //##62 BEGIN\n case HIR.OP_ASSIGN:\n fAssignCount++;\n break;\n case HIR.OP_JUMP:\n lLabel = ((JumpStmt)lNode).getLabel();\n //##62 lLabel.addToHirRefList((LabelNode)((JumpStmt)lNode).getChild1());\n lImmediatelyAfterJumpReturn = true; //##63\n ((BBlockImpl)lBBlock).fControlTransfer = lNode; //##73\n break;\n case HIR.OP_RETURN: //##63\n lImmediatelyAfterJumpReturn = true; //##63\n ((BBlockImpl)lBBlock).fControlTransfer = lNode; //##73\n break;\n case HIR.OP_SWITCH:\n SwitchStmt lSwitchStmt = (SwitchStmt)lNode;\n int lCaseCount = lSwitchStmt.getCaseCount();\n for (int i = 0; i < lCaseCount; i++) {\n lLabel = lSwitchStmt.getCaseLabel(i);\n //##62 if (lLabel != null)\n //##62 lLabel.addToHirRefList(lSwitchStmt.getCaseLabelNode(i));\n }\n //##62 lSwitchStmt.getDefaultLabel().addToHirRefList((LabelNode)((SwitchStmt)\n //##62 lNode).getDefaultLabelNode());\n //##62 END\n default:\n break;\n // end\n } // End of switch\n //##63 lNodeIndex = lNode.getIndex();\n //##60 fFlowIrLink[lNodeIndex - fIndexMin] =\n //##60 (FlowIrLinkCell)(new FlowIrLinkCellImpl(lNode, lBBlock, 0));\n //##63 fFlowIrLink[lNodeIndex - fIrIndexMin] = lNode; //##60\n //##63 fBBlockOfIR[lNodeIndex - fIrIndexMin] = lBBlock; //##60\n } // End of if(lNode != null)\n }\n //##62 BEGIN\n fUsedSymCount = fSymExpCount;\n if (fDbgLevel > 0)\n ioRoot.dbgFlow.print(2, lSubp.getName() +\n \" Number of\", \"Symbols:\" +\n fUsedSymCount + \" Nodes:\" + fNodeCount + \" \");\n fExpVectorBitCount = fUsedSymCount + 2; //##60\n fExpVectorWordCount = (fExpVectorBitCount + 63) / 64; //##60\n\n int lNodeCount = fIrIndexMax - fIrIndexMin;\n if (lNodeCount > fNodeCountLim1)\n fComplexity = 2;\n if (fSymExpCount > fSymCountLim1)\n fComplexity = 2;\n if (lNodeCount > fNodeCountLim2)\n fComplexity = 3;\n if (fSymExpCount > fSymCountLim2)\n fComplexity = 3;\n //##62 END\n if (fDbgLevel > 0) {\n //### fComplexity = 3; //###\n flowRoot.ioRoot.dbgFlow.print(1, \"\\n Node count \" +\n lNodeCount + \" BBlock count \" + getNumberOfBBlocks()+\n \" UsedSymCount \" + getUsedSymCount() + \" SymExpCount \" + getSymExpCount()\n + \"\\n AssignCount \" + getAssignCount()\n + \" CallCount \" + getCallCount()); //##62\n ioRoot.dbgFlow.print(1, \"\\nComplexity level of \",\n getSubpSym().getName() + \" is \" + fComplexity);\n if (fComplexity > 1)\n ioRoot.dbgFlow.print(1, \"\\n Simplify alias analysis.\");\n if (fComplexity > 2)\n ioRoot.dbgFlow.print(1, \"\\n Simplify data flow analysis.\");\n }\n setComputedFlag(CF_BBLOCK); //##60\n return true; //##78\n }", "private final void asx() {\n /*\n r12 = this;\n r0 = r12.cFE;\n if (r0 == 0) goto L_0x0073;\n L_0x0004:\n r1 = r12.cxs;\n if (r1 == 0) goto L_0x0073;\n L_0x0008:\n r1 = r12.ayL;\n if (r1 != 0) goto L_0x000d;\n L_0x000c:\n goto L_0x0073;\n L_0x000d:\n r2 = 0;\n if (r1 == 0) goto L_0x0027;\n L_0x0010:\n r1 = r1.Km();\n if (r1 == 0) goto L_0x0027;\n L_0x0016:\n r1 = r1.aar();\n if (r1 == 0) goto L_0x0027;\n L_0x001c:\n r3 = r0.getName();\n r1 = r1.get(r3);\n r1 = (java.util.ArrayList) r1;\n goto L_0x0028;\n L_0x0027:\n r1 = r2;\n L_0x0028:\n if (r1 == 0) goto L_0x0051;\n L_0x002a:\n r1 = (java.lang.Iterable) r1;\n r1 = kotlin.collections.u.Z(r1);\n if (r1 == 0) goto L_0x0051;\n L_0x0032:\n r3 = new com.iqoption.deposit.light.perform.DepositPerformLightFragment$setPresets$items$1;\n r3.<init>(r12);\n r3 = (kotlin.jvm.a.b) r3;\n r1 = kotlin.sequences.n.b(r1, r3);\n if (r1 == 0) goto L_0x0051;\n L_0x003f:\n r3 = new com.iqoption.deposit.light.perform.DepositPerformLightFragment$setPresets$items$2;\n r3.<init>(r0);\n r3 = (kotlin.jvm.a.b) r3;\n r1 = kotlin.sequences.n.f(r1, r3);\n if (r1 == 0) goto L_0x0051;\n L_0x004c:\n r1 = kotlin.sequences.n.f(r1);\n goto L_0x0052;\n L_0x0051:\n r1 = r2;\n L_0x0052:\n r3 = r12.asr();\n if (r1 == 0) goto L_0x0059;\n L_0x0058:\n goto L_0x005d;\n L_0x0059:\n r1 = kotlin.collections.m.emptyList();\n L_0x005d:\n r4 = r12.bub;\n if (r4 == 0) goto L_0x006d;\n L_0x0061:\n r5 = 0;\n r6 = 0;\n r7 = 1;\n r8 = 0;\n r9 = 0;\n r10 = 19;\n r11 = 0;\n r2 = com.iqoption.core.util.e.a(r4, r5, r6, r7, r8, r9, r10, r11);\n L_0x006d:\n r3.c(r1, r2);\n r12.d(r0);\n L_0x0073:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.iqoption.deposit.light.perform.c.asx():void\");\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n ClassWriter classWriter1 = new ClassWriter(2);\n Type type0 = Type.CHAR_TYPE;\n Class<Integer> class0 = Integer.class;\n Class<Object> class1 = Object.class;\n Type.getType(class1);\n Type.getType(class0);\n Type.getObjectType(\"The prefix must not be null\");\n Type type1 = Type.INT_TYPE;\n int[] intArray0 = new int[6];\n intArray0[0] = 4;\n type1.getDescriptor();\n intArray0[1] = 2;\n intArray0[2] = 7;\n intArray0[3] = 4;\n intArray0[4] = 1;\n intArray0[5] = 0;\n frame0.inputStack = intArray0;\n Item item0 = classWriter0.newFieldItem(\"%B\\\"F$,FHLc-:\", \"The prefix must not be null\", \"The prefix must not be null\");\n classWriter1.toByteArray();\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n // Undeclared exception!\n try { \n frame0.execute(192, 4, classWriter1, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "private final com.google.android.play.p179a.p352a.C6210u m28673b(com.google.protobuf.nano.a r7) {\n /*\n r6 = this;\n L_0x0000:\n r0 = r7.a();\n switch(r0) {\n case 0: goto L_0x000d;\n case 10: goto L_0x000e;\n case 16: goto L_0x001b;\n case 26: goto L_0x0058;\n case 34: goto L_0x0065;\n case 42: goto L_0x0072;\n default: goto L_0x0007;\n };\n L_0x0007:\n r0 = super.m4918a(r7, r0);\n if (r0 != 0) goto L_0x0000;\n L_0x000d:\n return r6;\n L_0x000e:\n r0 = r7.f();\n r6.f31049b = r0;\n r0 = r6.f31048a;\n r0 = r0 | 1;\n r6.f31048a = r0;\n goto L_0x0000;\n L_0x001b:\n r1 = r6.f31048a;\n r1 = r1 | 2;\n r6.f31048a = r1;\n r1 = r7.o();\n r2 = r7.i();\t Catch:{ IllegalArgumentException -> 0x0047 }\n switch(r2) {\n case 0: goto L_0x004f;\n case 1: goto L_0x004f;\n case 2: goto L_0x004f;\n case 3: goto L_0x004f;\n case 4: goto L_0x004f;\n case 5: goto L_0x004f;\n case 6: goto L_0x004f;\n default: goto L_0x002c;\n };\t Catch:{ IllegalArgumentException -> 0x0047 }\n L_0x002c:\n r3 = new java.lang.IllegalArgumentException;\t Catch:{ IllegalArgumentException -> 0x0047 }\n r4 = 38;\n r5 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x0047 }\n r5.<init>(r4);\t Catch:{ IllegalArgumentException -> 0x0047 }\n r2 = r5.append(r2);\t Catch:{ IllegalArgumentException -> 0x0047 }\n r4 = \" is not a valid enum OsType\";\n r2 = r2.append(r4);\t Catch:{ IllegalArgumentException -> 0x0047 }\n r2 = r2.toString();\t Catch:{ IllegalArgumentException -> 0x0047 }\n r3.<init>(r2);\t Catch:{ IllegalArgumentException -> 0x0047 }\n throw r3;\t Catch:{ IllegalArgumentException -> 0x0047 }\n L_0x0047:\n r2 = move-exception;\n r7.e(r1);\n r6.m4918a(r7, r0);\n goto L_0x0000;\n L_0x004f:\n r6.f31050c = r2;\t Catch:{ IllegalArgumentException -> 0x0047 }\n r2 = r6.f31048a;\t Catch:{ IllegalArgumentException -> 0x0047 }\n r2 = r2 | 2;\n r6.f31048a = r2;\t Catch:{ IllegalArgumentException -> 0x0047 }\n goto L_0x0000;\n L_0x0058:\n r0 = r7.f();\n r6.f31051d = r0;\n r0 = r6.f31048a;\n r0 = r0 | 4;\n r6.f31048a = r0;\n goto L_0x0000;\n L_0x0065:\n r0 = r7.f();\n r6.f31052e = r0;\n r0 = r6.f31048a;\n r0 = r0 | 8;\n r6.f31048a = r0;\n goto L_0x0000;\n L_0x0072:\n r0 = r7.f();\n r6.f31053f = r0;\n r0 = r6.f31048a;\n r0 = r0 | 16;\n r6.f31048a = r0;\n goto L_0x0000;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.play.a.a.u.b(com.google.protobuf.nano.a):com.google.android.play.a.a.u\");\n }", "private final void asB() {\n /*\n r6 = this;\n r0 = r6.cxs;\n r1 = r6.asp();\n r1 = r1.cCg;\n r2 = \"binding.depositAmountEdit\";\n kotlin.jvm.internal.i.e(r1, r2);\n r2 = r0 instanceof com.iqoption.core.microservices.billing.response.deposit.cashboxitem.d;\n r3 = 0;\n r4 = 1;\n if (r2 == 0) goto L_0x002b;\n L_0x0013:\n r2 = r0;\n r2 = (com.iqoption.core.microservices.billing.response.deposit.cashboxitem.d) r2;\n r2 = r2.aaH();\n if (r2 == 0) goto L_0x0027;\n L_0x001c:\n r2 = r2.aaT();\n if (r2 == 0) goto L_0x0027;\n L_0x0022:\n r2 = r2.size();\n goto L_0x0028;\n L_0x0027:\n r2 = 0;\n L_0x0028:\n if (r2 != 0) goto L_0x002b;\n L_0x002a:\n goto L_0x0040;\n L_0x002b:\n if (r0 == 0) goto L_0x0032;\n L_0x002d:\n r2 = r0.ZL();\n goto L_0x0033;\n L_0x0032:\n r2 = 0;\n L_0x0033:\n r5 = com.iqoption.core.microservices.billing.response.deposit.cashboxitem.CashboxItemType.USER_CARD;\n if (r2 != r5) goto L_0x0038;\n L_0x0037:\n goto L_0x0040;\n L_0x0038:\n r2 = r6.aoJ();\n if (r2 == 0) goto L_0x003f;\n L_0x003e:\n goto L_0x0040;\n L_0x003f:\n r4 = 0;\n L_0x0040:\n r2 = \"binding.depositPresetsList\";\n if (r4 == 0) goto L_0x0053;\n L_0x0044:\n r0 = r6.asp();\n r0 = r0.cCr;\n kotlin.jvm.internal.i.e(r0, r2);\n r0 = (android.view.View) r0;\n com.iqoption.core.ext.a.ak(r0);\n goto L_0x006b;\n L_0x0053:\n r3 = r6.asp();\n r3 = r3.cCr;\n kotlin.jvm.internal.i.e(r3, r2);\n r3 = (android.view.View) r3;\n com.iqoption.core.ext.a.al(r3);\n r2 = new com.iqoption.deposit.light.perform.c$s;\n r2.<init>(r6, r0);\n r2 = (android.view.View.OnFocusChangeListener) r2;\n r1.setOnFocusChangeListener(r2);\n L_0x006b:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.iqoption.deposit.light.perform.c.asB():void\");\n }", "protected int b(i var1_1, y.c.q var2_2, y.c.q var3_3, h var4_4, h var5_5, int var6_6, ArrayList var7_7, ArrayList var8_8, h var9_9, h var10_10) {\n block26 : {\n block25 : {\n var24_11 = o.p;\n this.c = var6_6;\n this.d = var2_2;\n this.e = var3_3;\n this.n = var1_1.h();\n this.o = var1_1.f();\n this.h = var1_1;\n this.i = new int[this.n];\n this.j = new int[this.n];\n this.k = new int[this.o];\n this.l = new int[this.o];\n this.m = new int[this.n];\n this.b = new Object[this.o];\n this.t = new int[this.n];\n this.r = new d[this.n];\n this.s = new d[this.n];\n this.f = var4_4;\n this.a = new a[this.n];\n this.q = new ArrayList<E>(var1_1.f());\n this.p = new I(this.o);\n var11_12 = 0;\n block0 : do {\n v0 = var11_12;\n block1 : while (v0 < var7_7.size()) {\n var12_15 = (a)var7_7.get(var11_12);\n v1 /* !! */ = var12_15.b();\n if (var24_11) break block25;\n var13_17 = v1 /* !! */ ;\n while (var13_17.f()) {\n var14_20 = var13_17.a();\n var15_23 = var14_20.b();\n this.a[var14_20.b()] = var12_15;\n this.i[var15_23] = var12_15.a();\n v0 = this.i[var15_23];\n if (var24_11) continue block1;\n if (v0 < 0) {\n throw new B(\"found negative capacity\");\n }\n var13_17.g();\n if (!var24_11) continue;\n }\n ++var11_12;\n if (!var24_11) continue block0;\n }\n break block0;\n break;\n } while (true);\n v1 /* !! */ = var11_13 = this.h.p();\n }\n while (var11_13.f()) {\n var12_15 = var11_13.a();\n this.r[var12_15.b()] = (d)var10_10.b(var12_15);\n this.s[var12_15.b()] = (d)var9_9.b(var12_15);\n var11_13.g();\n if (!var24_11) {\n if (!var24_11) continue;\n }\n break block26;\n }\n this.g = new u[this.o];\n }\n var11_13 = var1_1.o();\n while (var11_13.f()) {\n var12_15 = var11_13.e();\n v2 = this;\n if (!var24_11) {\n v2.g[var12_15.d()] = new u((y.c.q)var12_15, var12_15.d());\n var11_13.g();\n if (!var24_11) continue;\n }\n ** GOTO lbl65\n }\n block5 : do {\n v2 = this;\nlbl65: // 2 sources:\n var11_14 = var13_18 = v2.a();\n var12_16 = 0;\n var14_21 = 0;\n block6 : do {\n v3 = var14_21;\n v4 = var8_8.size();\n block7 : while (v3 < v4) {\n v5 = var8_8.get(var14_21);\n do {\n var15_24 = (ArrayList)v5;\n var16_26 = false;\n var17_27 = 0;\n var18_28 = 0;\n v6 = 0;\n if (!var24_11) {\n for (var19_29 = v1574606; var19_29 < var15_24.size(); ++var19_29) {\n block28 : {\n block27 : {\n var20_30 = (a)var15_24.get(var19_29);\n v3 = this.m[var20_30.b[0].b()];\n v4 = 1;\n if (var24_11) continue block7;\n if (v3 != v4 || this.m[var20_30.b[1].b()] != 1) continue;\n ++var12_16;\n var21_31 = this.s[var20_30.b[0].b()];\n var22_32 = 0;\n while (this.m[var21_31.b()] == 1) {\n var22_32 += var4_4.a(this.a[var21_31.b()].b(var21_31));\n var21_31 = this.s[var21_31.b()];\n if (!var24_11) {\n if (!var24_11) continue;\n }\n break block27;\n }\n var22_32 += var4_4.a(this.a[var21_31.b()].b(var21_31));\n }\n var23_33 = 0;\n var21_31 = this.s[var20_30.b[1].b()];\n while (this.m[var21_31.b()] == 1) {\n var23_33 += var4_4.a(this.a[var21_31.b()].b(var21_31));\n var21_31 = this.s[var21_31.b()];\n if (!var24_11) {\n if (!var24_11) continue;\n }\n break block28;\n }\n var23_33 += var4_4.a(this.a[var21_31.b()].b(var21_31));\n }\n if (var23_33 > 400 || var22_32 > 400) {\n block29 : {\n if (var23_33 < var22_32) {\n this.a(var20_30);\n if (!var24_11) break block29;\n }\n this.b(var20_30);\n }\n var16_26 = true;\n }\n var18_28 += var23_33;\n var17_27 += var22_32;\n if (!var24_11) continue;\n }\n if (!var16_26) {\n for (var19_29 = 0; var19_29 < var15_24.size(); ++var19_29) {\n var20_30 = (a)var15_24.get(var19_29);\n v3 = this.m[var20_30.b[0].b()];\n v4 = 1;\n if (var24_11) continue block7;\n if (v3 != v4 || this.m[var20_30.b[1].b()] != 1) continue;\n if (var18_28 < var17_27) {\n this.a(var20_30);\n if (!var24_11) continue;\n }\n this.b(var20_30);\n if (!var24_11) continue;\n }\n }\n ++var14_21;\n if (!var24_11) continue block6;\n }\n ** GOTO lbl133\n v6 = var12_16;\nlbl133: // 2 sources:\n if (v6 > 0) continue block5;\n v5 = this.h.p();\n } while (var24_11);\n }\n break;\n } while (true);\n break;\n } while (true);\n var13_19 = v5;\n while (var13_19.f()) {\n var14_22 = var13_19.a();\n v7 = var14_22.b();\n if (var24_11 != false) return v7;\n var15_25 = v7;\n var5_5.a((Object)var14_22, this.m[var15_25]);\n var13_19.g();\n if (!var24_11) continue;\n }\n v7 = var11_14;\n return v7;\n }", "public abstract C0631bt mo9227aB();", "private final com.google.android.play.p179a.p352a.ae m28545b(com.google.protobuf.nano.a r8) {\n /*\n r7 = this;\n r6 = 1048576; // 0x100000 float:1.469368E-39 double:5.180654E-318;\n L_0x0002:\n r0 = r8.a();\n switch(r0) {\n case 0: goto L_0x000f;\n case 8: goto L_0x0010;\n case 18: goto L_0x001d;\n case 24: goto L_0x002a;\n case 34: goto L_0x0037;\n case 42: goto L_0x0044;\n case 50: goto L_0x0051;\n case 58: goto L_0x005e;\n case 66: goto L_0x006b;\n case 74: goto L_0x0078;\n case 82: goto L_0x0086;\n case 90: goto L_0x0094;\n case 98: goto L_0x00a2;\n case 106: goto L_0x00b0;\n case 114: goto L_0x00be;\n case 122: goto L_0x00cc;\n case 130: goto L_0x00dc;\n case 138: goto L_0x00eb;\n case 144: goto L_0x00fa;\n case 152: goto L_0x0108;\n case 160: goto L_0x0117;\n case 168: goto L_0x0126;\n default: goto L_0x0009;\n };\n L_0x0009:\n r0 = super.m4918a(r8, r0);\n if (r0 != 0) goto L_0x0002;\n L_0x000f:\n return r7;\n L_0x0010:\n r0 = r8.j();\n r7.f30754b = r0;\n r0 = r7.f30753a;\n r0 = r0 | 1;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x001d:\n r0 = r8.f();\n r7.f30755c = r0;\n r0 = r7.f30753a;\n r0 = r0 | 2;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x002a:\n r0 = r8.i();\n r7.f30757e = r0;\n r0 = r7.f30753a;\n r0 = r0 | 8;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x0037:\n r0 = r8.f();\n r7.f30758f = r0;\n r0 = r7.f30753a;\n r0 = r0 | 16;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x0044:\n r0 = r8.f();\n r7.f30759g = r0;\n r0 = r7.f30753a;\n r0 = r0 | 32;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x0051:\n r0 = r8.f();\n r7.f30762j = r0;\n r0 = r7.f30753a;\n r0 = r0 | 256;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x005e:\n r0 = r8.f();\n r7.f30763k = r0;\n r0 = r7.f30753a;\n r0 = r0 | 512;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x006b:\n r0 = r8.f();\n r7.f30760h = r0;\n r0 = r7.f30753a;\n r0 = r0 | 64;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x0078:\n r0 = r8.f();\n r7.f30761i = r0;\n r0 = r7.f30753a;\n r0 = r0 | 128;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x0086:\n r0 = r8.f();\n r7.f30764l = r0;\n r0 = r7.f30753a;\n r0 = r0 | 1024;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x0094:\n r0 = r8.f();\n r7.f30765m = r0;\n r0 = r7.f30753a;\n r0 = r0 | 2048;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x00a2:\n r0 = r8.f();\n r7.f30766n = r0;\n r0 = r7.f30753a;\n r0 = r0 | 4096;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x00b0:\n r0 = r8.f();\n r7.f30767o = r0;\n r0 = r7.f30753a;\n r0 = r0 | 8192;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x00be:\n r0 = r8.f();\n r7.f30768p = r0;\n r0 = r7.f30753a;\n r0 = r0 | 16384;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x00cc:\n r0 = r8.f();\n r7.f30769q = r0;\n r0 = r7.f30753a;\n r1 = 32768; // 0x8000 float:4.5918E-41 double:1.61895E-319;\n r0 = r0 | r1;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x00dc:\n r0 = r8.f();\n r7.f30770r = r0;\n r0 = r7.f30753a;\n r1 = 65536; // 0x10000 float:9.18355E-41 double:3.2379E-319;\n r0 = r0 | r1;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x00eb:\n r0 = r8.f();\n r7.f30771s = r0;\n r0 = r7.f30753a;\n r1 = 131072; // 0x20000 float:1.83671E-40 double:6.47582E-319;\n r0 = r0 | r1;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x00fa:\n r0 = r8.j();\n r7.f30756d = r0;\n r0 = r7.f30753a;\n r0 = r0 | 4;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x0108:\n r0 = r8.i();\n r7.f30772t = r0;\n r0 = r7.f30753a;\n r1 = 262144; // 0x40000 float:3.67342E-40 double:1.295163E-318;\n r0 = r0 | r1;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x0117:\n r0 = r8.e();\n r7.f30773u = r0;\n r0 = r7.f30753a;\n r1 = 524288; // 0x80000 float:7.34684E-40 double:2.590327E-318;\n r0 = r0 | r1;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x0126:\n r1 = r7.f30753a;\n r1 = r1 | r6;\n r7.f30753a = r1;\n r1 = r8.o();\n r2 = r8.i();\t Catch:{ IllegalArgumentException -> 0x0151 }\n switch(r2) {\n case 0: goto L_0x015a;\n case 1: goto L_0x015a;\n case 2: goto L_0x015a;\n default: goto L_0x0136;\n };\t Catch:{ IllegalArgumentException -> 0x0151 }\n L_0x0136:\n r3 = new java.lang.IllegalArgumentException;\t Catch:{ IllegalArgumentException -> 0x0151 }\n r4 = 48;\n r5 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x0151 }\n r5.<init>(r4);\t Catch:{ IllegalArgumentException -> 0x0151 }\n r2 = r5.append(r2);\t Catch:{ IllegalArgumentException -> 0x0151 }\n r4 = \" is not a valid enum PairedDeviceType\";\n r2 = r2.append(r4);\t Catch:{ IllegalArgumentException -> 0x0151 }\n r2 = r2.toString();\t Catch:{ IllegalArgumentException -> 0x0151 }\n r3.<init>(r2);\t Catch:{ IllegalArgumentException -> 0x0151 }\n throw r3;\t Catch:{ IllegalArgumentException -> 0x0151 }\n L_0x0151:\n r2 = move-exception;\n r8.e(r1);\n r7.m4918a(r8, r0);\n goto L_0x0002;\n L_0x015a:\n r7.f30774v = r2;\t Catch:{ IllegalArgumentException -> 0x0151 }\n r2 = r7.f30753a;\t Catch:{ IllegalArgumentException -> 0x0151 }\n r2 = r2 | r6;\n r7.f30753a = r2;\t Catch:{ IllegalArgumentException -> 0x0151 }\n goto L_0x0002;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.play.a.a.ae.b(com.google.protobuf.nano.a):com.google.android.play.a.a.ae\");\n }", "private void m14210a(java.io.IOException r4, java.io.IOException r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r3 = this;\n r0 = f12370a;\n if (r0 == 0) goto L_0x000f;\n L_0x0004:\n r0 = f12370a;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1 = 1;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1 = new java.lang.Object[r1];\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r2 = 0;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1[r2] = r5;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r0.invoke(r4, r1);\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n L_0x000f:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.internal.connection.RouteException.a(java.io.IOException, java.io.IOException):void\");\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n ClassWriter classWriter1 = new ClassWriter(2);\n Type type0 = Type.CHAR_TYPE;\n Class<Integer> class0 = Integer.class;\n Class<Object> class1 = Object.class;\n Type type1 = Type.getType(class1);\n Type.getType(class0);\n Type type2 = Type.getObjectType(\"The prefix must not be null\");\n Type type3 = Type.INT_TYPE;\n Type[] typeArray0 = new Type[6];\n typeArray0[0] = type2;\n typeArray0[1] = type2;\n typeArray0[2] = type2;\n Type type4 = Type.CHAR_TYPE;\n typeArray0[3] = type4;\n typeArray0[4] = type1;\n typeArray0[5] = type3;\n frame0.initInputFrame(classWriter0, (-349), typeArray0, 10);\n Item item0 = new Item();\n item0.set(10);\n ClassWriter classWriter2 = new ClassWriter(529);\n Frame frame1 = new Frame();\n frame0.merge(classWriter2, frame1, 633);\n boolean boolean0 = frame0.merge(classWriter1, frame1, 285212681);\n assertTrue(boolean0);\n }", "@Test(timeout = 4000)\n public void test032() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n Type type0 = Type.CHAR_TYPE;\n Class<Object> class0 = Object.class;\n Type.getType(class0);\n Type type1 = Type.CHAR_TYPE;\n Type.getObjectType(\"The prefix must not be null\");\n Type type2 = Type.INT_TYPE;\n Item item0 = classWriter0.newFieldItem(\"%B\\\"F$,FHLc-:\", \"The prefix must not be null\", \"The prefix must not be null\");\n classWriter0.toByteArray();\n Label label0 = new Label();\n Label label1 = label0.next;\n Frame frame1 = label0.frame;\n ClassWriter classWriter1 = new ClassWriter(9);\n // Undeclared exception!\n try { \n frame0.execute(185, 1455, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "public static /* synthetic */ p163g.p201e.p203b.p204d.C5419r.C5420a m18181a(p163g.p201e.p203b.p204d.C5419r.C5420a r3, com.bamtech.sdk4.account.DefaultAccount r4, java.util.List<com.bamtech.sdk4.subscription.Subscription> r5, boolean r6, boolean r7, boolean r8, int r9, java.lang.Object r10) {\n /*\n r10 = r9 & 1\n if (r10 == 0) goto L_0x0006\n com.bamtech.sdk4.account.DefaultAccount r4 = r3.f12933a\n L_0x0006:\n r10 = r9 & 2\n if (r10 == 0) goto L_0x000c\n java.util.List<com.bamtech.sdk4.subscription.Subscription> r5 = r3.f12934b\n L_0x000c:\n r10 = r5\n r5 = r9 & 4\n if (r5 == 0) goto L_0x0013\n boolean r6 = r3.f12935c\n L_0x0013:\n r0 = r6\n r5 = r9 & 8\n if (r5 == 0) goto L_0x001a\n boolean r7 = r3.f12936d\n L_0x001a:\n r1 = r7\n r5 = r9 & 16\n if (r5 == 0) goto L_0x0021\n boolean r8 = r3.f12937e\n L_0x0021:\n r2 = r8\n r5 = r3\n r6 = r4\n r7 = r10\n r8 = r0\n r9 = r1\n r10 = r2\n g.e.b.d.r$a r3 = r5.mo17152a(r6, r7, r8, r9, r10)\n return r3\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p163g.p201e.p203b.p204d.C5419r.C5420a.m18181a(g.e.b.d.r$a, com.bamtech.sdk4.account.DefaultAccount, java.util.List, boolean, boolean, boolean, int, java.lang.Object):g.e.b.d.r$a\");\n }", "private final com.google.wireless.android.finsky.dfe.p513g.p514a.C7467r m35669b(com.google.protobuf.nano.C7213a r8) {\n /*\n r7 = this;\n r1 = 0;\n L_0x0001:\n r0 = r8.m33550a();\n switch(r0) {\n case 0: goto L_0x000e;\n case 10: goto L_0x000f;\n case 18: goto L_0x001c;\n case 26: goto L_0x0029;\n case 34: goto L_0x003c;\n case 42: goto L_0x0050;\n case 50: goto L_0x0064;\n case 82: goto L_0x0078;\n case 98: goto L_0x008e;\n case 138: goto L_0x00a4;\n case 146: goto L_0x00b9;\n case 152: goto L_0x00c7;\n case 162: goto L_0x0106;\n case 170: goto L_0x011c;\n case 178: goto L_0x012e;\n case 184: goto L_0x0143;\n case 192: goto L_0x0151;\n case 218: goto L_0x015f;\n case 226: goto L_0x0171;\n case 234: goto L_0x0187;\n case 258: goto L_0x019d;\n case 266: goto L_0x01b3;\n case 274: goto L_0x01c8;\n case 290: goto L_0x01de;\n case 298: goto L_0x021e;\n case 306: goto L_0x022c;\n default: goto L_0x0008;\n };\n L_0x0008:\n r0 = super.a(r8, r0);\n if (r0 != 0) goto L_0x0001;\n L_0x000e:\n return r7;\n L_0x000f:\n r0 = r8.m33564f();\n r7.f37912d = r0;\n r0 = r7.f37911c;\n r0 = r0 | 1;\n r7.f37911c = r0;\n goto L_0x0001;\n L_0x001c:\n r0 = r8.m33564f();\n r7.f37914f = r0;\n r0 = r7.f37911c;\n r0 = r0 | 4;\n r7.f37911c = r0;\n goto L_0x0001;\n L_0x0029:\n r0 = r7.f37916h;\n if (r0 != 0) goto L_0x0034;\n L_0x002d:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.c;\n r0.<init>();\n r7.f37916h = r0;\n L_0x0034:\n r0 = r7.f37916h;\n r8.m33552a(r0);\n r7.f37910a = r1;\n goto L_0x0001;\n L_0x003c:\n r0 = r7.f37917i;\n if (r0 != 0) goto L_0x0047;\n L_0x0040:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.z;\n r0.<init>();\n r7.f37917i = r0;\n L_0x0047:\n r0 = r7.f37917i;\n r8.m33552a(r0);\n r0 = 1;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x0050:\n r0 = r7.f37919k;\n if (r0 != 0) goto L_0x005b;\n L_0x0054:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.f;\n r0.<init>();\n r7.f37919k = r0;\n L_0x005b:\n r0 = r7.f37919k;\n r8.m33552a(r0);\n r0 = 3;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x0064:\n r0 = r7.f37922n;\n if (r0 != 0) goto L_0x006f;\n L_0x0068:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.o;\n r0.<init>();\n r7.f37922n = r0;\n L_0x006f:\n r0 = r7.f37922n;\n r8.m33552a(r0);\n r0 = 6;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x0078:\n r0 = r7.f37924p;\n if (r0 != 0) goto L_0x0083;\n L_0x007c:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.d;\n r0.<init>();\n r7.f37924p = r0;\n L_0x0083:\n r0 = r7.f37924p;\n r8.m33552a(r0);\n r0 = 8;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x008e:\n r0 = r7.f37926r;\n if (r0 != 0) goto L_0x0099;\n L_0x0092:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.n;\n r0.<init>();\n r7.f37926r = r0;\n L_0x0099:\n r0 = r7.f37926r;\n r8.m33552a(r0);\n r0 = 10;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x00a4:\n r0 = r7.f37923o;\n if (r0 != 0) goto L_0x00af;\n L_0x00a8:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.q;\n r0.<init>();\n r7.f37923o = r0;\n L_0x00af:\n r0 = r7.f37923o;\n r8.m33552a(r0);\n r0 = 7;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x00b9:\n r0 = r8.m33565g();\n r7.f37931w = r0;\n r0 = r7.f37911c;\n r0 = r0 | 16;\n r7.f37911c = r0;\n goto L_0x0001;\n L_0x00c7:\n r2 = r7.f37911c;\n r2 = r2 | 2;\n r7.f37911c = r2;\n r2 = r8.m33573o();\n r3 = r8.m33567i();\t Catch:{ IllegalArgumentException -> 0x00f3 }\n switch(r3) {\n case 0: goto L_0x00fc;\n case 101: goto L_0x00fc;\n case 102: goto L_0x00fc;\n case 103: goto L_0x00fc;\n case 105: goto L_0x00fc;\n case 106: goto L_0x00fc;\n case 107: goto L_0x00fc;\n case 108: goto L_0x00fc;\n case 109: goto L_0x00fc;\n case 111: goto L_0x00fc;\n case 112: goto L_0x00fc;\n case 113: goto L_0x00fc;\n case 114: goto L_0x00fc;\n case 115: goto L_0x00fc;\n case 116: goto L_0x00fc;\n case 117: goto L_0x00fc;\n case 118: goto L_0x00fc;\n case 119: goto L_0x00fc;\n case 120: goto L_0x00fc;\n case 201: goto L_0x00fc;\n case 202: goto L_0x00fc;\n case 203: goto L_0x00fc;\n case 204: goto L_0x00fc;\n case 205: goto L_0x00fc;\n case 206: goto L_0x00fc;\n case 207: goto L_0x00fc;\n case 209: goto L_0x00fc;\n case 210: goto L_0x00fc;\n case 211: goto L_0x00fc;\n case 212: goto L_0x00fc;\n case 213: goto L_0x00fc;\n case 214: goto L_0x00fc;\n case 215: goto L_0x00fc;\n case 217: goto L_0x00fc;\n case 218: goto L_0x00fc;\n case 219: goto L_0x00fc;\n case 220: goto L_0x00fc;\n case 221: goto L_0x00fc;\n case 222: goto L_0x00fc;\n case 223: goto L_0x00fc;\n case 224: goto L_0x00fc;\n case 301: goto L_0x00fc;\n case 302: goto L_0x00fc;\n case 304: goto L_0x00fc;\n case 305: goto L_0x00fc;\n case 307: goto L_0x00fc;\n case 309: goto L_0x00fc;\n case 310: goto L_0x00fc;\n case 311: goto L_0x00fc;\n case 312: goto L_0x00fc;\n case 313: goto L_0x00fc;\n case 314: goto L_0x00fc;\n case 316: goto L_0x00fc;\n case 317: goto L_0x00fc;\n case 318: goto L_0x00fc;\n case 319: goto L_0x00fc;\n case 320: goto L_0x00fc;\n case 321: goto L_0x00fc;\n case 322: goto L_0x00fc;\n case 323: goto L_0x00fc;\n case 324: goto L_0x00fc;\n case 325: goto L_0x00fc;\n case 326: goto L_0x00fc;\n case 327: goto L_0x00fc;\n case 328: goto L_0x00fc;\n case 401: goto L_0x00fc;\n case 402: goto L_0x00fc;\n case 403: goto L_0x00fc;\n case 404: goto L_0x00fc;\n case 405: goto L_0x00fc;\n case 406: goto L_0x00fc;\n case 407: goto L_0x00fc;\n case 408: goto L_0x00fc;\n case 409: goto L_0x00fc;\n case 410: goto L_0x00fc;\n case 411: goto L_0x00fc;\n case 412: goto L_0x00fc;\n case 501: goto L_0x00fc;\n case 502: goto L_0x00fc;\n case 503: goto L_0x00fc;\n case 504: goto L_0x00fc;\n case 505: goto L_0x00fc;\n case 506: goto L_0x00fc;\n case 507: goto L_0x00fc;\n case 508: goto L_0x00fc;\n case 509: goto L_0x00fc;\n case 510: goto L_0x00fc;\n case 511: goto L_0x00fc;\n case 512: goto L_0x00fc;\n case 513: goto L_0x00fc;\n case 514: goto L_0x00fc;\n case 515: goto L_0x00fc;\n case 601: goto L_0x00fc;\n case 701: goto L_0x00fc;\n case 702: goto L_0x00fc;\n case 703: goto L_0x00fc;\n case 704: goto L_0x00fc;\n case 705: goto L_0x00fc;\n case 706: goto L_0x00fc;\n case 707: goto L_0x00fc;\n case 708: goto L_0x00fc;\n case 709: goto L_0x00fc;\n case 710: goto L_0x00fc;\n case 711: goto L_0x00fc;\n case 801: goto L_0x00fc;\n case 802: goto L_0x00fc;\n case 803: goto L_0x00fc;\n case 804: goto L_0x00fc;\n case 805: goto L_0x00fc;\n case 806: goto L_0x00fc;\n case 807: goto L_0x00fc;\n case 808: goto L_0x00fc;\n case 809: goto L_0x00fc;\n case 810: goto L_0x00fc;\n case 811: goto L_0x00fc;\n case 812: goto L_0x00fc;\n case 901: goto L_0x00fc;\n case 902: goto L_0x00fc;\n case 903: goto L_0x00fc;\n case 904: goto L_0x00fc;\n case 905: goto L_0x00fc;\n case 906: goto L_0x00fc;\n case 907: goto L_0x00fc;\n case 908: goto L_0x00fc;\n case 909: goto L_0x00fc;\n case 910: goto L_0x00fc;\n case 911: goto L_0x00fc;\n case 912: goto L_0x00fc;\n case 913: goto L_0x00fc;\n case 914: goto L_0x00fc;\n case 915: goto L_0x00fc;\n case 916: goto L_0x00fc;\n case 1001: goto L_0x00fc;\n case 1002: goto L_0x00fc;\n default: goto L_0x00d8;\n };\t Catch:{ IllegalArgumentException -> 0x00f3 }\n L_0x00d8:\n r4 = new java.lang.IllegalArgumentException;\t Catch:{ IllegalArgumentException -> 0x00f3 }\n r5 = 44;\n r6 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x00f3 }\n r6.<init>(r5);\t Catch:{ IllegalArgumentException -> 0x00f3 }\n r3 = r6.append(r3);\t Catch:{ IllegalArgumentException -> 0x00f3 }\n r5 = \" is not a valid enum RelationType\";\n r3 = r3.append(r5);\t Catch:{ IllegalArgumentException -> 0x00f3 }\n r3 = r3.toString();\t Catch:{ IllegalArgumentException -> 0x00f3 }\n r4.<init>(r3);\t Catch:{ IllegalArgumentException -> 0x00f3 }\n throw r4;\t Catch:{ IllegalArgumentException -> 0x00f3 }\n L_0x00f3:\n r3 = move-exception;\n r8.m33562e(r2);\n r7.a(r8, r0);\n goto L_0x0001;\n L_0x00fc:\n r7.f37913e = r3;\t Catch:{ IllegalArgumentException -> 0x00f3 }\n r3 = r7.f37911c;\t Catch:{ IllegalArgumentException -> 0x00f3 }\n r3 = r3 | 2;\n r7.f37911c = r3;\t Catch:{ IllegalArgumentException -> 0x00f3 }\n goto L_0x0001;\n L_0x0106:\n r0 = r7.f37927s;\n if (r0 != 0) goto L_0x0111;\n L_0x010a:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.m;\n r0.<init>();\n r7.f37927s = r0;\n L_0x0111:\n r0 = r7.f37927s;\n r8.m33552a(r0);\n r0 = 11;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x011c:\n r0 = r7.f37932x;\n if (r0 != 0) goto L_0x0127;\n L_0x0120:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.ag;\n r0.<init>();\n r7.f37932x = r0;\n L_0x0127:\n r0 = r7.f37932x;\n r8.m33552a(r0);\n goto L_0x0001;\n L_0x012e:\n r0 = r7.f37920l;\n if (r0 != 0) goto L_0x0139;\n L_0x0132:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.t;\n r0.<init>();\n r7.f37920l = r0;\n L_0x0139:\n r0 = r7.f37920l;\n r8.m33552a(r0);\n r0 = 4;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x0143:\n r0 = r8.m33560d();\n r7.f37933y = r0;\n r0 = r7.f37911c;\n r0 = r0 | 32;\n r7.f37911c = r0;\n goto L_0x0001;\n L_0x0151:\n r0 = r8.m33560d();\n r7.f37934z = r0;\n r0 = r7.f37911c;\n r0 = r0 | 64;\n r7.f37911c = r0;\n goto L_0x0001;\n L_0x015f:\n r0 = r7.f37908A;\n if (r0 != 0) goto L_0x016a;\n L_0x0163:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.k;\n r0.<init>();\n r7.f37908A = r0;\n L_0x016a:\n r0 = r7.f37908A;\n r8.m33552a(r0);\n goto L_0x0001;\n L_0x0171:\n r0 = r7.f37929u;\n if (r0 != 0) goto L_0x017c;\n L_0x0175:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.y;\n r0.<init>();\n r7.f37929u = r0;\n L_0x017c:\n r0 = r7.f37929u;\n r8.m33552a(r0);\n r0 = 13;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x0187:\n r0 = r7.f37928t;\n if (r0 != 0) goto L_0x0192;\n L_0x018b:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.b;\n r0.<init>();\n r7.f37928t = r0;\n L_0x0192:\n r0 = r7.f37928t;\n r8.m33552a(r0);\n r0 = 12;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x019d:\n r0 = r7.f37925q;\n if (r0 != 0) goto L_0x01a8;\n L_0x01a1:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.e;\n r0.<init>();\n r7.f37925q = r0;\n L_0x01a8:\n r0 = r7.f37925q;\n r8.m33552a(r0);\n r0 = 9;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x01b3:\n r0 = r7.f37921m;\n if (r0 != 0) goto L_0x01be;\n L_0x01b7:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.h;\n r0.<init>();\n r7.f37921m = r0;\n L_0x01be:\n r0 = r7.f37921m;\n r8.m33552a(r0);\n r0 = 5;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x01c8:\n r0 = r7.f37930v;\n if (r0 != 0) goto L_0x01d3;\n L_0x01cc:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.x;\n r0.<init>();\n r7.f37930v = r0;\n L_0x01d3:\n r0 = r7.f37930v;\n r8.m33552a(r0);\n r0 = 14;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x01de:\n r0 = 290; // 0x122 float:4.06E-43 double:1.433E-321;\n r2 = com.google.protobuf.nano.C7222l.m33624a(r8, r0);\n r0 = r7.f37909B;\n if (r0 != 0) goto L_0x020a;\n L_0x01e8:\n r0 = r1;\n L_0x01e9:\n r2 = r2 + r0;\n r2 = new com.google.wireless.android.finsky.dfe.p513g.p514a.C7468s[r2];\n if (r0 == 0) goto L_0x01f3;\n L_0x01ee:\n r3 = r7.f37909B;\n java.lang.System.arraycopy(r3, r1, r2, r1, r0);\n L_0x01f3:\n r3 = r2.length;\n r3 = r3 + -1;\n if (r0 >= r3) goto L_0x020e;\n L_0x01f8:\n r3 = new com.google.wireless.android.finsky.dfe.g.a.s;\n r3.<init>();\n r2[r0] = r3;\n r3 = r2[r0];\n r8.m33552a(r3);\n r8.m33550a();\n r0 = r0 + 1;\n goto L_0x01f3;\n L_0x020a:\n r0 = r7.f37909B;\n r0 = r0.length;\n goto L_0x01e9;\n L_0x020e:\n r3 = new com.google.wireless.android.finsky.dfe.g.a.s;\n r3.<init>();\n r2[r0] = r3;\n r0 = r2[r0];\n r8.m33552a(r0);\n r7.f37909B = r2;\n goto L_0x0001;\n L_0x021e:\n r0 = r8.m33564f();\n r7.f37915g = r0;\n r0 = r7.f37911c;\n r0 = r0 | 8;\n r7.f37911c = r0;\n goto L_0x0001;\n L_0x022c:\n r0 = r7.f37918j;\n if (r0 != 0) goto L_0x0237;\n L_0x0230:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.w;\n r0.<init>();\n r7.f37918j = r0;\n L_0x0237:\n r0 = r7.f37918j;\n r8.m33552a(r0);\n r0 = 2;\n r7.f37910a = r0;\n goto L_0x0001;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.wireless.android.finsky.dfe.g.a.r.b(com.google.protobuf.nano.a):com.google.wireless.android.finsky.dfe.g.a.r\");\n }", "@Test\n public void test055() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Block block0 = (Block)errorPage0.acronym();\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(16777267);\n Class<Object> class0 = Object.class;\n Type.getType(class0);\n Type type0 = Type.BYTE_TYPE;\n Type.getObjectType(\"The prefix must not be null\");\n Type type1 = Type.INT_TYPE;\n int[] intArray0 = new int[8];\n intArray0[0] = 6;\n intArray0[1] = 7;\n intArray0[2] = 2;\n intArray0[3] = 1;\n intArray0[4] = 2;\n intArray0[5] = 4;\n intArray0[6] = 9;\n intArray0[7] = 4;\n frame0.inputStack = intArray0;\n Item item0 = new Item();\n item0.hashCode = 1687;\n // Undeclared exception!\n try { \n frame0.execute(111, 164, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Override // X.AnonymousClass0PN\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public void A0D() {\n /*\n r5 = this;\n super.A0D()\n X.08d r0 = r5.A05\n X.0OQ r4 = r0.A04()\n X.0Rk r3 = r4.A00() // Catch:{ all -> 0x003d }\n X.0BK r2 = r4.A04 // Catch:{ all -> 0x0036 }\n java.lang.String r1 = \"DELETE FROM receipt_device\"\n java.lang.String r0 = \"CLEAR_TABLE_RECEIPT_DEVICE\"\n r2.A0C(r1, r0) // Catch:{ all -> 0x0036 }\n X.08m r1 = r5.A03 // Catch:{ all -> 0x0036 }\n java.lang.String r0 = \"receipt_device_migration_complete\"\n r1.A02(r0) // Catch:{ all -> 0x0036 }\n java.lang.String r0 = \"migration_receipt_device_index\"\n r1.A02(r0) // Catch:{ all -> 0x0036 }\n java.lang.String r0 = \"migration_receipt_device_retry\"\n r1.A02(r0) // Catch:{ all -> 0x0036 }\n r3.A00() // Catch:{ all -> 0x0036 }\n r3.close()\n r4.close()\n java.lang.String r0 = \"ReceiptDeviceStore/ReceiptDeviceDatabaseMigration/resetMigration/done\"\n com.whatsapp.util.Log.i(r0)\n return\n L_0x0036:\n r0 = move-exception\n throw r0 // Catch:{ all -> 0x0038 }\n L_0x0038:\n r0 = move-exception\n r3.close() // Catch:{ all -> 0x003c }\n L_0x003c:\n throw r0\n L_0x003d:\n r0 = move-exception\n throw r0 // Catch:{ all -> 0x003f }\n L_0x003f:\n r0 = move-exception\n r4.close() // Catch:{ all -> 0x0043 }\n L_0x0043:\n throw r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: X.C43661yk.A0D():void\");\n }", "public long mo915b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r4 = this;\n r0 = -1;\n r2 = r4.f18088d;\t Catch:{ NumberFormatException -> 0x000e }\n if (r2 == 0) goto L_0x000d;\t Catch:{ NumberFormatException -> 0x000e }\n L_0x0006:\n r2 = r4.f18088d;\t Catch:{ NumberFormatException -> 0x000e }\n r2 = java.lang.Long.parseLong(r2);\t Catch:{ NumberFormatException -> 0x000e }\n r0 = r2;\n L_0x000d:\n return r0;\n L_0x000e:\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.c.b.b():long\");\n }", "private int getSubjTypeIdx() {\n return this.colStartOffset + 6;\n }", "void a(bu var1_1, f var2_2, Map var3_3, double var4_4, double var6_5) {\n block6 : {\n var14_6 = fj.z;\n var8_7 = M.b();\n var9_8 = var2_2.a();\n while (var9_8.f()) {\n var10_9 = var9_8.a();\n if (var14_6) break block6;\n if (!var10_9.e() || var1_1.i((y.c.d)var10_9).bendCount() > 1) ** GOTO lbl-1000\n var11_10 = var1_1.i((y.c.d)var10_9);\n var12_11 = var11_10.getSourceRealizer();\n if (var1_1.i((y.c.d)var10_9).bendCount() == 0) {\n var11_10.appendBend(var11_10.getSourcePort().a(var12_11), var11_10.getSourcePort().b(var12_11) - 20.0 - var12_11.getHeight());\n }\n this.a(var1_1, var4_4, var6_5, (y.c.d)var10_9, true, false, false, var10_9.c());\n if (var14_6) lbl-1000: // 2 sources:\n {\n var8_7.a(var10_9, true);\n var8_7.a((Object)var3_3.get(var10_9), true);\n }\n var9_8.g();\n if (!var14_6) continue;\n }\n var1_1.a(as.a, var8_7);\n }\n var9_8 = new as();\n var9_8.a(5.0);\n var9_8.b(false);\n var9_8.a(true);\n try {\n var10_9 = new bI(1);\n var10_9.a(false);\n var10_9.b(true);\n var10_9.d().a(true);\n var10_9.a(var1_1, (ah)var9_8);\n return;\n }\n finally {\n var1_1.d_(as.a);\n }\n }", "@Test(timeout = 4000)\n public void test107() throws Throwable {\n Frame frame0 = new Frame();\n Type[] typeArray0 = new Type[9];\n Type type0 = Type.getReturnType(\"Zu.y \");\n typeArray0[0] = type0;\n Type type1 = Type.DOUBLE_TYPE;\n typeArray0[1] = type1;\n Type type2 = Type.DOUBLE_TYPE;\n typeArray0[2] = type2;\n int[] intArray0 = new int[7];\n intArray0[0] = 2;\n intArray0[1] = 3;\n intArray0[0] = 7;\n intArray0[3] = 7;\n intArray0[4] = 10;\n intArray0[5] = 5;\n intArray0[6] = 1;\n frame0.inputLocals = intArray0;\n typeArray0[3] = type1;\n Type type3 = Type.VOID_TYPE;\n typeArray0[4] = type3;\n Type type4 = Type.BOOLEAN_TYPE;\n typeArray0[2] = type4;\n Type type5 = Type.FLOAT_TYPE;\n typeArray0[6] = type5;\n Type type6 = Type.SHORT_TYPE;\n Class<Integer> class0 = Integer.class;\n Type.getType(class0);\n ClassWriter classWriter0 = new ClassWriter(189);\n Item item0 = new Item();\n // Undeclared exception!\n try { \n frame0.execute(28, 10, (ClassWriter) null, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "static void m13383b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = com.foursquare.internal.data.db.C1916a.getDatabase();\t Catch:{ Exception -> 0x000a }\n r1 = \"battery_watcher\";\t Catch:{ Exception -> 0x000a }\n r2 = 0;\t Catch:{ Exception -> 0x000a }\n r0.delete(r1, r2, r2);\t Catch:{ Exception -> 0x000a }\n L_0x000a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.foursquare.pilgrim.e.b():void\");\n }", "public final void mo91715d() {\n }", "public final void mo56977b() {\n /*\n r2 = this;\n com.ss.android.ugc.aweme.common.e r0 = r2.f67572c\n com.ss.android.ugc.aweme.feed.ui.masklayer2.a.i r0 = (com.p280ss.android.ugc.aweme.feed.p1238ui.masklayer2.p1239a.C28951i) r0\n if (r0 == 0) goto L_0x001a\n com.ss.android.ugc.aweme.common.a r1 = r2.f67571b\n com.ss.android.ugc.aweme.feed.ui.masklayer2.a.d r1 = (com.p280ss.android.ugc.aweme.feed.p1238ui.masklayer2.p1239a.C28944d) r1\n if (r1 == 0) goto L_0x0014\n java.lang.Object r1 = r1.getData()\n java.lang.String r1 = (java.lang.String) r1\n if (r1 != 0) goto L_0x0016\n L_0x0014:\n java.lang.String r1 = \"\"\n L_0x0016:\n r0.mo74240a(r1)\n return\n L_0x001a:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.p280ss.android.ugc.aweme.feed.p1238ui.masklayer2.p1239a.C28946e.mo56977b():void\");\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n Frame frame0 = new Frame();\n Type[] typeArray0 = new Type[9];\n Type type0 = Type.getReturnType(\"Zu.y \");\n typeArray0[0] = type0;\n Type type1 = Type.DOUBLE_TYPE;\n typeArray0[1] = type1;\n Type type2 = Type.DOUBLE_TYPE;\n typeArray0[2] = type2;\n Type type3 = Type.INT_TYPE;\n typeArray0[3] = type3;\n Type type4 = Type.VOID_TYPE;\n typeArray0[4] = type4;\n Type type5 = Type.BOOLEAN_TYPE;\n typeArray0[5] = type5;\n Type type6 = Type.FLOAT_TYPE;\n typeArray0[6] = type6;\n Type type7 = Type.SHORT_TYPE;\n type2.toString();\n typeArray0[7] = type7;\n Class<Integer> class0 = Integer.class;\n Type.getType(class0);\n Type[] typeArray1 = new Type[1];\n typeArray1[0] = type0;\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n Type.getMethodDescriptor(type1, typeArray1);\n ClassWriter classWriter0 = new ClassWriter(174);\n Item item0 = classWriter0.newConstItem(\"\");\n // Undeclared exception!\n try { \n frame0.execute(3, 2, (ClassWriter) null, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test061() throws Throwable {\n Frame frame0 = new Frame();\n Type[] typeArray0 = new Type[9];\n Type type0 = Type.getReturnType(\"Zu.y \");\n typeArray0[0] = type0;\n Type type1 = Type.DOUBLE_TYPE;\n typeArray0[1] = type1;\n Type type2 = Type.DOUBLE_TYPE;\n typeArray0[7] = type2;\n int[] intArray0 = new int[7];\n intArray0[1] = 2;\n intArray0[1] = 3;\n intArray0[5] = 7;\n intArray0[3] = 7;\n intArray0[4] = 10;\n intArray0[5] = 5;\n intArray0[6] = 8;\n frame0.inputLocals = intArray0;\n typeArray0[3] = type1;\n Type type3 = Type.VOID_TYPE;\n typeArray0[4] = type3;\n Type type4 = Type.BOOLEAN_TYPE;\n typeArray0[5] = type4;\n Type type5 = Type.FLOAT_TYPE;\n typeArray0[6] = type5;\n Type type6 = Type.SHORT_TYPE;\n ClassWriter classWriter0 = new ClassWriter((-1541));\n Item item0 = classWriter0.key2;\n Item item1 = new Item(0);\n // Undeclared exception!\n try { \n frame0.execute(88, 1, (ClassWriter) null, item1);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "protected void method_865(bcb var1) {\r\n label136: {\r\n boolean var2;\r\n boolean var3;\r\n label132: {\r\n label131: {\r\n label130: {\r\n label137: {\r\n label138: {\r\n label139: {\r\n label140: {\r\n label141: {\r\n var2 = method_1147();\r\n int var10000 = var1.field_450;\r\n if(var2) {\r\n switch(var1.field_450) {\r\n case 1:\r\n var10000 = class_687.field_2947;\r\n break;\r\n case 2:\r\n break label141;\r\n case 3:\r\n break label140;\r\n case 4:\r\n break label139;\r\n case 5:\r\n break label138;\r\n case 50:\r\n break label137;\r\n case 60:\r\n break label130;\r\n case 70:\r\n break label131;\r\n case 100:\r\n break label132;\r\n case 110:\r\n break label136;\r\n default:\r\n return;\r\n }\r\n }\r\n\r\n if(var2) {\r\n var10000 = var10000 == 0?1:0;\r\n }\r\n\r\n class_687.field_2947 = (boolean)var10000;\r\n this.field_972.field_449 = String.valueOf(class_687.field_2947);\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n var3 = class_687.field_2946;\r\n if(var2) {\r\n var3 = !class_687.field_2946;\r\n }\r\n\r\n class_687.field_2946 = var3;\r\n this.field_973.field_449 = String.valueOf(class_687.field_2946);\r\n this.field_984 = true;\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n var3 = class_687.field_2948;\r\n if(var2) {\r\n var3 = !class_687.field_2948;\r\n }\r\n\r\n class_687.field_2948 = var3;\r\n this.field_974.field_449 = String.valueOf(class_687.field_2948);\r\n this.field_983 = true;\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n var3 = class_687.field_2951;\r\n if(var2) {\r\n var3 = !class_687.field_2951;\r\n }\r\n\r\n class_687.field_2951 = var3;\r\n this.field_975.field_449 = String.valueOf(class_687.field_2951);\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n var3 = class_687.field_2952;\r\n if(var2) {\r\n var3 = !class_687.field_2952;\r\n }\r\n\r\n class_687.field_2952 = var3;\r\n this.field_976.field_449 = String.valueOf(class_687.field_2952);\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n class_687.field_2949 = this.field_979.method_835();\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n class_687.field_2950 = this.field_980.method_835();\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n class_687.field_2953 = (double)this.field_981.method_834();\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n bao var6;\r\n label77: {\r\n class_207 var5;\r\n label142: {\r\n var3 = this.field_983;\r\n if(var2) {\r\n if(this.field_983) {\r\n bbv var4 = bao.method_5273().canLoseFocus4;\r\n bbv.SetHUDText(\"\");\r\n }\r\n\r\n var5 = this;\r\n if(!var2) {\r\n break label142;\r\n }\r\n\r\n var3 = this.field_984;\r\n }\r\n\r\n if(var3) {\r\n var6 = this.field_557;\r\n if(!var2) {\r\n break label77;\r\n }\r\n\r\n if(this.field_557.cursorCounter6 != null) {\r\n class_687.field_2954 = true;\r\n }\r\n }\r\n\r\n class_687.method_3712();\r\n this.field_983 = false;\r\n this.field_984 = false;\r\n var5 = this;\r\n }\r\n\r\n var6 = var5.field_557;\r\n }\r\n\r\n var6.method_5236(this.field_971);\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n class_687.method_3711();\r\n this.field_557.method_5236(this.field_971);\r\n this.field_983 = false;\r\n this.field_984 = false;\r\n }", "public void mo115190b() {\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = null;\n Type[] typeArray0 = new Type[8];\n Type type0 = Type.DOUBLE_TYPE;\n typeArray0[1] = type0;\n Type type1 = Type.DOUBLE_TYPE;\n typeArray0[2] = type1;\n Type type2 = Type.INT_TYPE;\n typeArray0[3] = type2;\n Type type3 = Type.VOID_TYPE;\n Type type4 = Type.BOOLEAN_TYPE;\n Type type5 = Type.FLOAT_TYPE;\n typeArray0[2] = type5;\n Type type6 = Type.SHORT_TYPE;\n typeArray0[7] = type6;\n Class<Integer> class0 = Integer.class;\n Type.getType(class0);\n Frame frame1 = new Frame();\n type5.toString();\n Item item0 = new Item();\n Class<Object> class1 = Object.class;\n Type.getDescriptor(class1);\n // Undeclared exception!\n try { \n frame1.execute(168, (-1845), (ClassWriter) null, item0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSR/RET are not supported with computeFrames option\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test047() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n ClassWriter classWriter1 = new ClassWriter(2);\n Type type0 = Type.INT_TYPE;\n Type type1 = Type.VOID_TYPE;\n Type type2 = Type.BOOLEAN_TYPE;\n Type type3 = Type.FLOAT_TYPE;\n Type type4 = Type.SHORT_TYPE;\n Class<Object> class0 = Object.class;\n type0.getDescriptor();\n Type.getType(class0);\n Type[] typeArray0 = new Type[2];\n typeArray0[0] = type4;\n typeArray0[1] = type0;\n frame0.initInputFrame(classWriter1, 10, typeArray0, 8);\n Type.getInternalName(class0);\n Frame frame1 = new Frame();\n Item item0 = new Item(6);\n // Undeclared exception!\n try { \n frame0.execute(115, (-1587), classWriter1, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "public SubpType // (##6)\nfindSubpType();", "@Override\n public void func_104112_b() {\n \n }", "@Test(timeout = 4000)\n public void test129() throws Throwable {\n Frame frame0 = new Frame();\n Type type0 = Type.getReturnType(\"Zu.y \");\n Type type1 = Type.DOUBLE_TYPE;\n Type type2 = Type.DOUBLE_TYPE;\n Type type3 = Type.INT_TYPE;\n Type type4 = Type.VOID_TYPE;\n Type type5 = Type.BOOLEAN_TYPE;\n Type type6 = Type.FLOAT_TYPE;\n Type type7 = Type.SHORT_TYPE;\n Class<Object> class0 = Object.class;\n Type type8 = Type.getType(class0);\n ClassWriter classWriter0 = new ClassWriter((-71));\n Type[] typeArray0 = new Type[6];\n typeArray0[0] = type4;\n typeArray0[1] = type4;\n typeArray0[2] = type4;\n typeArray0[3] = type0;\n typeArray0[4] = type8;\n typeArray0[5] = type4;\n frame0.initInputFrame(classWriter0, (-316), typeArray0, 10);\n assertEquals(6, typeArray0.length);\n }", "public final /* bridge */ /* synthetic */ void mo43569b() {\n super.mo43569b();\n }", "@Test(timeout = 4000)\n public void test062() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n ClassWriter classWriter1 = new ClassWriter(2);\n Type type0 = Type.INT_TYPE;\n Type type1 = Type.VOID_TYPE;\n Type type2 = Type.BOOLEAN_TYPE;\n Type type3 = Type.FLOAT_TYPE;\n Type type4 = Type.SHORT_TYPE;\n Class<Object> class0 = Object.class;\n type0.getDescriptor();\n Type.getType(class0);\n Type[] typeArray0 = new Type[2];\n typeArray0[0] = type4;\n typeArray0[1] = type0;\n frame0.initInputFrame(classWriter1, 10, typeArray0, 1431);\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, true, true);\n frame0.initInputFrame(classWriter0, 9, typeArray0, 4091);\n Item item0 = new Item();\n item0.set(0.0F);\n item0.set(0.0);\n ClassWriter classWriter2 = new ClassWriter(69);\n Frame frame1 = new Frame();\n frame0.merge(classWriter2, frame1, 989);\n // Undeclared exception!\n frame0.merge(classWriter0, frame1, 158);\n }", "public Structure getStructure() {\n/* 3557 */ return this.structure;\n/* */ }", "public int getType() {\n/* 50 */ return this.type;\n/* */ }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n Frame frame0 = new Frame();\n Type[] typeArray0 = new Type[9];\n Type type0 = Type.getReturnType(\"Zu.y \");\n typeArray0[0] = type0;\n ClassWriter classWriter0 = new ClassWriter((-1312));\n String[] stringArray0 = new String[8];\n stringArray0[0] = \"value \";\n stringArray0[1] = \"\";\n stringArray0[2] = \"{uh\";\n stringArray0[3] = \"i&b}d$\";\n stringArray0[4] = \"\";\n stringArray0[5] = \"Ac\";\n stringArray0[6] = \"Zu.y \";\n stringArray0[7] = \"MI{W%eu4Z\";\n classWriter0.visit((-1048), 179, \"MI{W%eu4Z\", \"\", \"i&b}d$\", stringArray0);\n classWriter0.newClassItem(\"3U02Wj$(Z>8\");\n Item item0 = classWriter0.newLong(0);\n Item item1 = new Item(2, item0);\n classWriter0.toByteArray();\n // Undeclared exception!\n try { \n frame0.execute(196, (-1312), classWriter0, item1);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test126() throws Throwable {\n Frame frame0 = new Frame();\n Type[] typeArray0 = new Type[9];\n Type type0 = Type.getReturnType(\"Zu.y \");\n typeArray0[0] = type0;\n Type type1 = Type.DOUBLE_TYPE;\n Type type2 = Type.DOUBLE_TYPE;\n typeArray0[2] = type2;\n Type type3 = Type.INT_TYPE;\n typeArray0[3] = type3;\n Type type4 = Type.VOID_TYPE;\n typeArray0[4] = type4;\n Class<String> class0 = String.class;\n Type.getDescriptor(class0);\n Type type5 = Type.BOOLEAN_TYPE;\n typeArray0[5] = type5;\n Type type6 = Type.FLOAT_TYPE;\n typeArray0[6] = type6;\n Type type7 = Type.SHORT_TYPE;\n Item item0 = new Item();\n // Undeclared exception!\n try { \n frame0.execute(6, 189, (ClassWriter) null, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test111() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n ClassWriter classWriter1 = new ClassWriter(2);\n Type type0 = Type.INT_TYPE;\n Type type1 = Type.VOID_TYPE;\n Type type2 = Type.BOOLEAN_TYPE;\n Type type3 = Type.FLOAT_TYPE;\n Type type4 = Type.SHORT_TYPE;\n Class<Object> class0 = Object.class;\n Type.getType(class0);\n Type[] typeArray0 = new Type[2];\n typeArray0[0] = type4;\n typeArray0[1] = type0;\n frame0.initInputFrame(classWriter1, 10, typeArray0, 1431);\n classWriter1.newLong((-1L));\n ClassWriter classWriter2 = new ClassWriter(4);\n Edge edge0 = new Edge();\n Label label0 = edge0.successor;\n // Undeclared exception!\n try { \n frame0.merge(classWriter0, frame0, 5);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 0\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "protected void method_2241() {\r\n // $FF: Couldn't be decompiled\r\n }", "private void b044904490449щ0449щ() {\n /*\n r7 = this;\n r0 = new rrrrrr.ccrcrc;\n r1 = new java.lang.StringBuilder;\n r1.<init>();\n r2 = r7.bнн043Dннн;\n r2 = com.immersion.aws.analytics.ImmrAnalytics.b044C044C044C044Cьь(r2);\n r2 = r2.getFilesDir();\n r1 = r1.append(r2);\n r2 = java.io.File.separator;\n r1 = r1.append(r2);\n L_0x001b:\n r2 = 1;\n switch(r2) {\n case 0: goto L_0x001b;\n case 1: goto L_0x0024;\n default: goto L_0x001f;\n };\n L_0x001f:\n r2 = 0;\n switch(r2) {\n case 0: goto L_0x0024;\n case 1: goto L_0x001b;\n default: goto L_0x0023;\n };\n L_0x0023:\n goto L_0x001f;\n L_0x0024:\n r2 = \"3HC4C-01.txt\";\n r1 = r1.append(r2);\n r1 = r1.toString();\n r0.<init>(r1);\n r0.load();\n L_0x0034:\n r1 = r0.size();\n if (r1 <= 0) goto L_0x007a;\n L_0x003a:\n r1 = r0.peek();\n r2 = new rrrrrr.rcccrr;\n r2.<init>();\n r3 = r7.bнн043Dннн;\n r3 = com.immersion.aws.analytics.ImmrAnalytics.b044Cь044C044Cьь(r3);\n monitor-enter(r3);\n r4 = r7.bнн043Dннн;\t Catch:{ all -> 0x0074 }\n r4 = com.immersion.aws.analytics.ImmrAnalytics.bь044C044C044Cьь(r4);\t Catch:{ all -> 0x0074 }\n r4 = r4.bЛ041B041BЛ041BЛ;\t Catch:{ all -> 0x0074 }\n r5 = r7.bнн043Dннн;\t Catch:{ all -> 0x0074 }\n r5 = com.immersion.aws.analytics.ImmrAnalytics.bь044C044C044Cьь(r5);\t Catch:{ all -> 0x0074 }\n r5 = r5.b041B041B041BЛ041BЛ;\t Catch:{ all -> 0x0074 }\n r6 = r7.bнн043Dннн;\t Catch:{ all -> 0x0074 }\n r6 = com.immersion.aws.analytics.ImmrAnalytics.bь044C044C044Cьь(r6);\t Catch:{ all -> 0x0074 }\n r6 = r6.bЛЛЛ041B041BЛ;\t Catch:{ all -> 0x0074 }\n monitor-exit(r3);\t Catch:{ all -> 0x0074 }\n r1 = r2.sendHttpRequestFromCache(r4, r5, r6, r1);\n if (r1 == 0) goto L_0x0077;\n L_0x0069:\n if (r4 == 0) goto L_0x0077;\n L_0x006b:\n if (r5 == 0) goto L_0x0077;\n L_0x006d:\n r0.remove();\n r0.save();\n goto L_0x0034;\n L_0x0074:\n r0 = move-exception;\n monitor-exit(r3);\t Catch:{ all -> 0x0074 }\n throw r0;\n L_0x0077:\n r0.save();\n L_0x007a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: rrrrrr.cccccr.b044904490449щ0449щ():void\");\n }", "public interface Type extends DeclarationContainer, DeclarationWithType {\n\n public default boolean newSubtypeOf(Type other) throws LookupException {\n return sameAs(other);\n }\n\n @Override\n default SelectionResult<Declaration> updatedTo(Declaration declaration) {\n return DeclarationWithType.super.updatedTo(declaration);\n }\n\n @Override\n default List<? extends DeclarationContainerRelation> relations() throws LookupException {\n \treturn inheritanceRelations();\n }\n\n public default void accumulateSuperTypeJudge(SuperTypeJudge judge) throws LookupException {\n judge.add(this);\n List<Type> temp = getProperDirectSuperTypes();\n for(Type type:temp) {\n Type existing = judge.get(type);\n if(existing == null) {\n type.accumulateSuperTypeJudge(judge);\n }\n }\n }\n\n\n /**\n * Find the super type with the same base type as the given type.\n * \n * @param type The type with the same base type as the requested super type.\n * @return A super type of this type that has the same base type as the given\n * type. If there is no such super type, null is returned.\n * @throws LookupException\n */\n public default Type getSuperTypeWithSameBaseTypeAs(Type type) throws LookupException {\n return superTypeJudge().get(type);\n }\n\n public SuperTypeJudge superTypeJudge() throws LookupException;\n\n public void accumulateAllSuperTypes(Set<Type> acc) throws LookupException;\n\n public void newAccumulateAllSuperTypes(Set<Type> acc) throws LookupException;\n\n public void newAccumulateSelfAndAllSuperTypes(Set<Type> acc) throws LookupException;\n\n\n public Set<Type> getSelfAndAllSuperTypesView() throws LookupException;\n\n public abstract List<InheritanceRelation> explicitNonMemberInheritanceRelations();\n\n public <I extends InheritanceRelation> List<I> explicitNonMemberInheritanceRelations(Class<I> kind);\n\n public List<InheritanceRelation> implicitNonMemberInheritanceRelations();\n\n public default void reactOnDescendantAdded(Element element) {}\n\n public default void reactOnDescendantRemoved(Element element) {}\n\n public default void reactOnDescendantReplaced(Element oldElement, Element newElement) {}\n\n /**\n * Return the fully qualified name.\n * @throws LookupException \n */\n /*@\n\t @ public behavior\n\t @\n\t @ getPackage().getFullyQualifiedName().equals(\"\") ==> \\result == getName();\n\t @ ! getPackage().getFullyQualifiedName().equals(\"\") == > \\result.equals(getPackage().getFullyQualifiedName() + getName());\n\t @*/\n public String getFullyQualifiedName();\n\n /*******************\n * LEXICAL CONTEXT \n *******************/\n\n @Override\n public LocalLookupContext<?> targetContext() throws LookupException;\n\n @Override\n public LookupContext localContext() throws LookupException;\n\n /**\n * If the given element is an inheritance relation, the lookup must proceed to the parent. For other elements,\n * the context is a lexical context connected to the target context to perform a local search.\n * @throws LookupException \n */\n @Override\n public LookupContext lookupContext(Element element) throws LookupException;\n\n public List<ParameterBlock<?>> parameterBlocks();\n\n public <P extends Parameter> ParameterBlock<P> parameterBlock(Class<P> kind);\n\n public void addParameterBlock(ParameterBlock<?> block);\n\n public void removeParameterBlock(ParameterBlock<?> block);\n\n public <P extends Parameter> List<P> parameters(Class<P> kind);\n\n /**\n * Indices start at 1.\n */\n public <P extends Parameter> P parameter(Class<P> kind, int index);\n\n public <P extends Parameter> int nbTypeParameters(Class<P> kind);\n\n public <P extends Parameter> void addParameter(Class<P> kind,P parameter);\n\n public <P extends Parameter> void addAllParameters(Class<P> kind,Collection<P> parameter);\n\n public <P extends Parameter> void replaceParameter(Class<P> kind, P oldParameter, P newParameter);\n\n public <P extends Parameter> void replaceAllParameters(Class<P> kind, List<P> newParameters);\n\n /************************\n * BEING A TYPE ELEMENT *\n ************************/\n\n public List<Declaration> getIntroducedMembers();\n\n /**********\n * ACCESS *\n **********/\n\n /**\n * Add the given element to this type.\n * \n * @throws ChameleonProgrammerException\n * The given element could not be added. E.g when you try to add\n * an element to a computed type.\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre element != null;\n\t @\n\t @ post directlyDeclaredElements().contains(element);\n\t @*/\n public void add(Declarator element) throws ChameleonProgrammerException;\n\n /**\n * Remove the given element to this type.\n * \n * @throws ChameleonProgrammerException\n * The given element could not be added. E.g when you try to add\n * an element to a computed type.\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre element != null;\n\t @\n\t @ post ! directlyDeclaredElements().contains(element);\n\t @*/\n public void remove(Declarator element) throws ChameleonProgrammerException;\n\n /**\n * Add all type elements in the given collection to this type.\n * @param elements\n * @throws ChameleonProgrammerException\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre elements != null;\n\t @ pre !elements.contains(null);\n\t @\n\t @ post directlyDeclaredElements().containsAll(elements);\n\t @*/\n public default void addAll(Collection<? extends Declarator> elements) {\n \telements.forEach(e -> add(e));\n }\n\n /**************\n * SUPERTYPES *\n **************/\n\n /**\n * Return the proper direct super types of this type. A proper super type is a super type\n * that is not equal to this type. A direct super type is a super type that is specified\n * by an inheritance relation of this type, or this type.\n * \n * @return A list containing the direct super types of this type.\n * @throws LookupException The type of an inheritance relation could not be resolved.\n */\n public default List<Type> getProperDirectSuperTypes() throws LookupException {\n\t\tList<Type> result = Lists.create();\n\t\tfor(InheritanceRelation element:inheritanceRelations()) {\n\t\t\tType type = element.superType();\n\t\t\tif (type!=null) {\n\t\t\t\tresult.add(type);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n public Set<Type> getAllSuperTypes() throws LookupException;\n\n public default boolean contains(Type other, TypeFixer trace) throws LookupException {\n return sameAs(other, trace);\n }\n \n public default boolean subtypeOf(Type other) throws LookupException {\n return subtypeOf(other, new TypeFixer());\n }\n\n public default boolean subtypeOf(Type other, TypeFixer trace) throws LookupException {\n TypeFixer clone = trace.clone();\n boolean result = sameAs(other,clone);\n if(! result) {\n clone = trace.clone();\n result = uniSubtypeOf(other,clone);\n if(! result) {\n result = other.uniSupertypeOf(this, trace);\n }\n }\n return result;\n }\n\n public default boolean uniSupertypeOf(Type type, TypeFixer trace) throws LookupException {\n return false;\n }\n\n public default boolean uniSubtypeOf(Type other, TypeFixer trace) throws LookupException {\n Type sameBase = getSuperTypeWithSameBaseTypeAs(other);\n return sameBase != null && sameBase.compatibleParameters(other, trace);\n }\n\n /**\n * Check if this type is assignable to another type.\n * \n * @param other\n * @return\n * @throws LookupException\n */\n /*@\n\t @ public behavior\n\t @\n\t @ post \\result == equals(other) || subTypeOf(other);\n\t @*/\n public boolean assignableTo(Type other) throws LookupException;\n\n /**\n * Return the inheritance relations of this type.\n * \n * @throws LookupException \n */\n /*@\n\t @ public behavior\n\t @\n\t @ post \\result != null;\n\t @*/\n public default List<InheritanceRelation> inheritanceRelations() throws LookupException {\n return nonMemberInheritanceRelations();\n }\n\n public List<InheritanceRelation> nonMemberInheritanceRelations();\n\n public <I extends InheritanceRelation> List<I> nonMemberInheritanceRelations(Class<I> kind);\n\n /**\n * Add the give given inheritance relation to this type.\n * @param relation The relation to add. Cannot be null.\n * @throws ChameleonProgrammerException\n * It is not possible to add the given type. E.g. you cannot\n * add an inheritance relation to a computed type.\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre relation != null;\n\t @ post inheritanceRelations().contains(relation);\n\t @*/\n public void addInheritanceRelation(InheritanceRelation relation);\n\n public void addAllInheritanceRelations(Collection<InheritanceRelation> relations);\n /**\n * Remove the give given inheritance relation from this type.\n * @param relation\n * @throws ChameleonProgrammerException\n * It is not possible to remove the given type. E.g. you cannot\n * remove an inheritance relation to a computed type.\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre relation != null;\n\t @ post ! inheritanceRelations().contains(relation);\n\t @*/\n public void removeNonMemberInheritanceRelation(InheritanceRelation relation) throws ChameleonProgrammerException;\n\n public void removeAllNonMemberInheritanceRelations();\n\n /**\n * Return the members of the given kind directly declared by this type.\n * @return\n * @throws LookupException \n * @throws \n */\n public <T extends Declaration> List<T> localMembers(final Class<T> kind) throws LookupException;\n\n /**\n * Return the members that are implicitly part of this type, such as default constructors and destructors.\n * @return\n */\n public List<Declaration> implicitMembers();\n\n public <M extends Declaration> List<M> implicitMembers(Class<M> kind);\n\n /**\n * Return the members directly declared by this type. The order of the elements in the list is the order in which they\n * are written in the type.\n * @return\n * @throws LookupException \n */\n public List<Declaration> localMembers() throws LookupException;\n\n public <T extends Declaration> List<T> directlyDeclaredMembers(Class<T> kind);\n\n public <T extends Declaration> List<T> directlyDeclaredMembers(Class<T> kind, ChameleonProperty property);\n\n public List<Declaration> directlyDeclaredMembers();\n\n public <D extends Declaration> List<SelectionResult<D>> members(DeclarationSelector<D> selector) throws LookupException;\n\n public <D extends Declaration> List<? extends SelectionResult<D>> localMembers(DeclarationSelector<D> selector) throws LookupException;\n\n public List<Declaration> members() throws LookupException;\n\n /**\n * Return the members of this class.\n * @param <M>\n * @param kind\n * @return\n * @throws LookupException\n */\n public <M extends Declaration> List<M> members(final Class<M> kind) throws LookupException;\n\n /**\n * DO NOT CONFUSE THIS METHOD WITH localMembers(). This method does not\n * transform type elements into members.\n * \n * FIXME: rename to localDeclarators()\n * \n * @return\n */\n public List<? extends Declarator> directlyDeclaredElements();\n\n public <T extends Declarator> List<T> directlyDeclaredElements(Class<T> kind);\n\n @Override\n public List<? extends Declaration> declarations() throws LookupException;\n\n public Type alias(String name);\n\n public Type intersection(Type type) throws LookupException;\n\n public Type intersectionDoubleDispatch(Type type) throws LookupException;\n\n public Type intersectionDoubleDispatch(IntersectionType type) throws LookupException;\n\n public void replace(Declarator oldElement, Declarator newElement);\n\n public Type baseType();\n\n public default boolean compatibleParameters(Type other, TypeFixer trace) throws LookupException {\n int size = nbTypeParameters(TypeParameter.class);\n boolean result = true;\n for(int i=0; i< size && result;i++) {\n TypeParameter otherParameter = other.parameter(TypeParameter.class, i);\n TypeParameter myParameter = parameter(TypeParameter.class,i);\n result = otherParameter.contains(myParameter, trace.clone());\n }\n return result;\n }\n\n\n public Type union(Type lowerBound) throws LookupException;\n\n public Type unionDoubleDispatch(Type type) throws LookupException;\n\n public Type unionDoubleDispatch(UnionType type) throws LookupException;\n\n public default boolean sameAs(Type other, TypeFixer trace) throws LookupException {\n if(other == this || trace.contains(other, this)) {\n return true;\n }\n TypeFixer newTrace = trace.clone();\n newTrace.add(other, this);\n boolean result = uniSameAs(other,newTrace);\n if(! result) {\n newTrace = trace.clone();\n newTrace.add(other, this);\n result = other.uniSameAs(this,newTrace);\n }\n return result;\n }\n\n /**\n * Check if this type is equal to the given type, taking\n * recursive types into account. If a loop is encountered,\n * that branch of the check will return true: it did not\n * encounter a problem.\n * \n * @param other The type of which we want to check if it is the same as this type.\n * @param fixer The object that will ensure that we can do a fixed point computation.\n * @return\n * @throws LookupException\n */\n public boolean uniSameAs(Type other, TypeFixer fixer) throws LookupException;\n\n /**\n * <p>Return the lower bound of this type.</p>\n * \n * <p> By <b>default</b>, the current object is returned.\n * \n * @return A type representing the lower bound of this type, when consider as an interval.\n * @throws LookupException\n */\n /*@\n @ post \\result != null;\n @ post \\result.subtypeOf(this);\n @*/\n public default Type lowerBound() throws LookupException {\n return this;\n }\n\n /**\n * <p>Return the upper bound of this type.</p>\n * \n * <p> By <b>default</b>, the current object is returned.\n * \n * @return A type representing the upper bound of this type, when consider as an interval.\n * @throws LookupException\n */\n /*@\n @ post \\result != null;\n @ post subtypeOf(\\result);\n @*/\n public default Type upperBound() throws LookupException {\n return this;\n }\n\n /**\n * A name that is strictly for debugging purposes.\n * \n * @return The result is not null.\n */\n public String infoName();\n\n /**\n * Verify whether the this type is a subtype of the given other type. \n * If that is the case, then a valid verification result is returned.\n * Otherwise, a problem is reported. The message of the problem is \n * constructed using the descriptions of the meaning of\n * each type as determined by the arguments.\n * \n * @param type The type for which the subtype relation is verified.\n * @param meaningThisType A textual description of the meaning of this type.\n * @param meaningOtherType A textual description of the meaning of the other type.\n * @param cause The element in which the verification is done.\n * @return\n */\n public Verification verifySubtypeOf(Type type, String meaningThisType, String meaningOtherType, Element cause);\n\n\n /**\n * @return\n */\n public default boolean isWildCard() {\n return false;\n }\n\n}", "@org.jetbrains.annotations.NotNull\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public static /* synthetic */ com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection copy$default(com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection r4, com.bitcoin.mwallet.core.models.slp.Slp r5, java.util.List<kotlin.ULong> r6, com.bitcoin.bitcoink.p008tx.Satoshis r7, com.bitcoin.bitcoink.p008tx.Satoshis r8, java.util.List<com.bitcoin.mwallet.core.models.p009tx.utxo.Utxo> r9, com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection.Error r10, int r11, java.lang.Object r12) {\n /*\n r12 = r11 & 1\n if (r12 == 0) goto L_0x0006\n com.bitcoin.mwallet.core.models.slp.Slp r5 = r4.token\n L_0x0006:\n r12 = r11 & 2\n if (r12 == 0) goto L_0x000c\n java.util.List<kotlin.ULong> r6 = r4.quantities\n L_0x000c:\n r12 = r6\n r6 = r11 & 4\n if (r6 == 0) goto L_0x0013\n com.bitcoin.bitcoink.tx.Satoshis r7 = r4.fee\n L_0x0013:\n r0 = r7\n r6 = r11 & 8\n if (r6 == 0) goto L_0x001a\n com.bitcoin.bitcoink.tx.Satoshis r8 = r4.change\n L_0x001a:\n r1 = r8\n r6 = r11 & 16\n if (r6 == 0) goto L_0x0021\n java.util.List<com.bitcoin.mwallet.core.models.tx.utxo.Utxo> r9 = r4.utxos\n L_0x0021:\n r2 = r9\n r6 = r11 & 32\n if (r6 == 0) goto L_0x0028\n com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection$Error r10 = r4.error\n L_0x0028:\n r3 = r10\n r6 = r4\n r7 = r5\n r8 = r12\n r9 = r0\n r10 = r1\n r11 = r2\n r12 = r3\n com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection r4 = r6.copy(r7, r8, r9, r10, r11, r12)\n return r4\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection.copy$default(com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection, com.bitcoin.mwallet.core.models.slp.Slp, java.util.List, com.bitcoin.bitcoink.tx.Satoshis, com.bitcoin.bitcoink.tx.Satoshis, java.util.List, com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection$Error, int, java.lang.Object):com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection\");\n }", "@Test(timeout = 4000)\n public void test094() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = null;\n Type[] typeArray0 = new Type[8];\n Type type0 = Type.DOUBLE_TYPE;\n typeArray0[1] = type0;\n Type type1 = Type.DOUBLE_TYPE;\n typeArray0[2] = type1;\n Type type2 = Type.INT_TYPE;\n typeArray0[3] = type2;\n Type type3 = Type.VOID_TYPE;\n typeArray0[4] = type3;\n Type type4 = Type.BOOLEAN_TYPE;\n typeArray0[4] = type0;\n Type type5 = Type.FLOAT_TYPE;\n typeArray0[2] = type5;\n Type type6 = Type.SHORT_TYPE;\n typeArray0[7] = type6;\n Class<Integer> class0 = Integer.class;\n Type.getType(class0);\n Frame frame1 = new Frame();\n type5.toString();\n Type.getObjectType(\"F\");\n Item item0 = new Item();\n // Undeclared exception!\n try { \n frame1.execute(46, 0, (ClassWriter) null, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Override\n public void a() {\n block25 : {\n block24 : {\n block22 : {\n var17_1 = a.a;\n var3_2 = this.c.i();\n var4_3 = var3_2.a().a();\n this.d = new w();\n this.e = new y.f.h.D(this.d);\n this.h = M.a(new Object[this.b.e()]);\n this.i = M.b(new Object[this.b.g()]);\n var5_4 = this.b.o();\n while (var5_4.f()) {\n var6_5 = var5_4.e();\n if (var17_1 == 0) {\n if (var6_5.c() <= this.l) {\n var7_6 = this.d.d();\n this.h.a(var6_5, var7_6);\n }\n var5_4.g();\n if (var17_1 == 0) continue;\n }\n break block22;\n }\n this.j = M.b(new Object[this.b.g()]);\n this.k = M.b(new Object[this.b.g()]);\n this.a(this.j, this.k);\n }\n var2_8 = this.b.o();\n block3 : do {\n v0 = var2_8.f();\n block4 : while (v0 != 0) {\n var5_4 = var2_8.e();\n if (var5_4.c() != 0) {\n var1_9 = var5_4.l();\n var6_5 = var1_9.a();\n var7_6 = (y.c.q)this.j.b(var6_5);\n var1_9.b();\n while (var1_9.f()) {\n var8_10 = var1_9.a();\n var9_11 = (y.c.q)this.j.b(var8_10);\n var10_12 = (y.c.q)this.k.b(var8_10);\n var11_13 = this.a((y.c.q)var7_6, (y.c.q)var9_11);\n v0 = var5_4.c();\n if (var17_1 != 0) continue block4;\n if (v0 > this.l) {\n this.h.a(var5_4, var11_13);\n }\n var7_6 = (y.c.q)this.j.b(var8_10);\n var12_14 /* !! */ = this.d.a((y.c.q)var9_11, (y.c.q)var10_12);\n this.i.a(var8_10, var12_14 /* !! */ );\n if (var8_10 == var6_5) break;\n var1_9.b();\n if (var17_1 == 0) continue;\n }\n }\n var2_8.g();\n if (var17_1 == 0) continue block3;\n }\n break block3;\n break;\n } while (true);\n var1_9 = this.b.p();\n while (var1_9.f()) {\n var5_4 = var1_9.a();\n v1 = this;\n if (var17_1 == 0) {\n block23 : {\n if (v1.c.n((y.c.d)var5_4)) {\n this.e.m((y.c.d)this.i.b(var5_4));\n if (var17_1 == 0) break block23;\n }\n this.e.e((y.c.d)this.i.b(var5_4));\n }\n var6_5 = this.c.h((y.c.d)var5_4);\n this.e.b((y.c.d)this.i.b(var5_4), (y.c.d)this.i.b(var6_5));\n var1_9.g();\n if (var17_1 == 0) continue;\n }\n break block24;\n }\n v1 = this;\n }\n var5_4 = v1.e.m();\n this.d.a(\"y.layout.orthogonal.general.NodeSplitter.NODE_FACES\", (y.c.c)var5_4);\n var6_5 = this.e.m();\n this.d.a(\"y.layout.orthogonal.ring.FixedSizeNodeSplitter#NODE_SIZE\", (y.c.c)var6_5);\n this.m = this.e.g().t();\n this.d.a(\"y.layout.orthogonal.ring.FixedSizeNodeSplitter#NODE_SIZE\", new c((r)var6_5, this.m));\n try {\n this.e.l();\n var7_6 = (y.c.d)this.i.b(var4_3);\n this.e.b(this.e.i((y.c.d)var7_6));\n var8_10 = this.e.h();\n while (var8_10.f()) {\n var5_4.a(var8_10.a(), false);\n var8_10.g();\n if (var17_1 == 0) {\n if (var17_1 == 0) continue;\n }\n break block25;\n }\n var8_10 = this.b.o();\n while (var8_10.f()) {\n var9_11 = var8_10.e();\n if (var17_1 != 0) break;\n if (var9_11.c() <= this.l) ** GOTO lbl-1000\n var10_12 = (y.c.d)this.h.b(var9_11);\n var11_13 = this.e.i((y.c.d)var10_12);\n this.h.a(var9_11, var11_13);\n var5_4.a((p)var11_13, true);\n var12_14 /* !! */ = (y.c.d)this.b.p((y.c.q)var9_11);\n var14_15 = this.b.q((y.c.q)var9_11);\n var16_16 = new Dimension((int)var12_14 /* !! */ , (int)var14_15);\n var6_5.a((p)var11_13, var16_16);\n if (var17_1 != 0) lbl-1000: // 2 sources:\n {\n var10_12 = this.b.r((y.c.q)var9_11);\n if (var10_12.a > 0.0 || var10_12.b > 0.0) {\n var11_13 = (y.c.q)this.h.b(var9_11);\n this.m.a(var11_13, this.b.r((y.c.q)var9_11));\n }\n }\n var8_10.g();\n if (var17_1 == 0) continue;\n break;\n }\n }\n catch (Exception var7_7) {\n System.err.println(\"Internal Error in Face calculation !\");\n var7_7.printStackTrace(System.err);\n }\n }\n var7_6 = this.e.h();\n block9 : do {\n if (var7_6.f() == false) return;\n var8_10 = (p)var7_6.d();\n if (var5_4.d(var8_10)) {\n var9_11 = var8_10.a();\n while (var9_11.f()) {\n var10_12 = var9_11.a();\n this.e.m(this.e.h((y.c.d)var10_12));\n this.e.e((y.c.d)var10_12);\n var9_11.g();\n if (var17_1 != 0) continue block9;\n if (var17_1 == 0) continue;\n }\n }\n var7_6.g();\n } while (var17_1 == 0);\n }", "public void recreateStructures(int p_82695_1_, int p_82695_2_)\n\t{\n\t}", "public Detector(SmellsLikeBadCodingBuilder b, String type){\r\n\r\n\t\tthis.builder = b;\r\n\t\tthis.children = new ArrayList<Report>();\r\n\t\tthis.type = type;\r\n\t\tthis.smellyMethods = new ArrayList<Method>();\r\n\t\tthis.reports = new ArrayList<Report>();\r\n\t\tthis.methodsPerClass = new HashMap<IType, Integer>();\r\n\t\tthis.methodsPerPackage = new HashMap<IPackageFragment, Integer>();\r\n\t\tthis.files = new ArrayList<IFile>();\r\n\t}", "@Test(timeout = 4000)\n public void test101() throws Throwable {\n Label label0 = new Label();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"oc[MfnZM[~MHOK iO\");\n ClassWriter classWriter0 = new ClassWriter((-2463));\n classWriter0.newInteger((-2463));\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"Fj)3/|(;sZXz$\";\n stringArray0[1] = \"double\";\n stringArray0[2] = \"\\\".3t\\\"0\";\n stringArray0[3] = \"~)yCTRxQ#s$y[Ly%\";\n stringArray0[4] = \"Fj)3/|(;sZXz$\";\n stringArray0[5] = \"oc[MfnZM[~MHOK iO\";\n stringArray0[6] = \"Cpd7(e\";\n stringArray0[7] = \"oc[MfnZM[~MHOK iO\";\n stringArray0[8] = \"Cpd7(e\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 2, \"\\\".3t\\\"0\", \"~)yCTRxQ#s$y[Ly%\", \"double\", stringArray0, true, false);\n methodWriter0.visitJumpInsn(1, label0);\n classWriter0.newFieldItem(\"oc[MfnZM[~MHOK iO\", \"~hmio$aI6.7xL0\", \"~hmio$aI6.7xL0\");\n label0.successor = label0;\n Label label1 = new Label();\n methodWriter0.visitJumpInsn(1, label0);\n methodWriter0.visitMaxs(2708, (-1036));\n methodWriter0.visitFieldInsn(1, \"oc[MfnZM[~MHOK iO\", \"JSR/RET ar not supported with computeFrames option\", \"JSR/RET ar not supported with computeFrames option\");\n methodWriter0.visitJumpInsn(2, label0.successor);\n methodWriter0.getSize();\n // Undeclared exception!\n try { \n methodWriter0.visitInsn((-2486));\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -2486\n //\n verifyException(\"org.objectweb.asm.jip.MethodWriter\", e);\n }\n }", "@Specialization\n\t\tString type(OzBacktrace backtrace) {\n\t\t\treturn \"tuple\";\n\t\t}", "public void a() {\n block8 : {\n block9 : {\n var1_1 = this.f();\n var2_2 = false;\n if (var1_1) break block8;\n this.j.c();\n var6_3 = this.k;\n var7_4 = this.b;\n var8_5 = (l)var6_3;\n var9_6 = var8_5.a(var7_4);\n if (var9_6 != null) break block9;\n this.a(false);\n var2_2 = true;\n ** GOTO lbl30\n }\n if (var9_6 != n.b) ** GOTO lbl26\n this.a(this.g);\n var11_7 = this.k;\n var12_8 = this.b;\n var13_9 = (l)var11_7;\n try {\n block10 : {\n var2_2 = var13_9.a(var12_8).d();\n break block10;\nlbl26: // 1 sources:\n var10_10 = var9_6.d();\n var2_2 = false;\n if (!var10_10) {\n this.b();\n }\n }\n this.j.g();\n }\n finally {\n this.j.d();\n }\n }\n if ((var3_12 = this.c) == null) return;\n if (var2_2) {\n var4_13 = var3_12.iterator();\n while (var4_13.hasNext()) {\n ((d)var4_13.next()).a(this.b);\n }\n }\n e.a(this.h, this.j, this.c);\n }\n\n /*\n * Exception decompiling\n */\n public final void a(ListenableWorker.a var1_1) {\n // This method has failed to decompile. When submitting a bug report, please provide this stack trace, and (if you hold appropriate legal rights) the relevant class file.\n // org.benf.cfr.reader.util.ConfusedCFRException: Tried to end blocks [4[TRYBLOCK]], but top level block is 10[WHILELOOP]\n // org.benf.cfr.reader.b.a.a.j.a(Op04StructuredStatement.java:432)\n // org.benf.cfr.reader.b.a.a.j.d(Op04StructuredStatement.java:484)\n // org.benf.cfr.reader.b.a.a.i.a(Op03SimpleStatement.java:607)\n // org.benf.cfr.reader.b.f.a(CodeAnalyser.java:692)\n // org.benf.cfr.reader.b.f.a(CodeAnalyser.java:182)\n // org.benf.cfr.reader.b.f.a(CodeAnalyser.java:127)\n // org.benf.cfr.reader.entities.attributes.f.c(AttributeCode.java:96)\n // org.benf.cfr.reader.entities.g.p(Method.java:396)\n // org.benf.cfr.reader.entities.d.e(ClassFile.java:890)\n // org.benf.cfr.reader.entities.d.b(ClassFile.java:792)\n // org.benf.cfr.reader.b.a(Driver.java:128)\n // org.benf.cfr.reader.a.a(CfrDriverImpl.java:63)\n // com.njlabs.showjava.decompilers.JavaExtractionWorker.decompileWithCFR(JavaExtractionWorker.kt:61)\n // com.njlabs.showjava.decompilers.JavaExtractionWorker.doWork(JavaExtractionWorker.kt:130)\n // com.njlabs.showjava.decompilers.BaseDecompiler.withAttempt(BaseDecompiler.kt:108)\n // com.njlabs.showjava.workers.DecompilerWorker$b.run(DecompilerWorker.kt:118)\n // java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)\n // java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)\n // java.lang.Thread.run(Thread.java:919)\n throw new IllegalStateException(\"Decompilation failed\");\n }\n\n public final void a(String string) {\n LinkedList linkedList = new LinkedList();\n linkedList.add((Object)string);\n while (!linkedList.isEmpty()) {\n String string2 = (String)linkedList.remove();\n if (((l)this.k).a(string2) != n.f) {\n k k2 = this.k;\n n n2 = n.d;\n String[] arrstring = new String[]{string2};\n ((l)k2).a(n2, arrstring);\n }\n linkedList.addAll((Collection)((a.i.r.p.c)this.l).a(string2));\n }\n }\n\n /*\n * Enabled aggressive block sorting\n * Enabled unnecessary exception pruning\n * Enabled aggressive exception aggregation\n */\n public final void a(boolean bl) {\n this.j.c();\n k k2 = this.j.k();\n l l2 = (l)k2;\n List list = l2.a();\n ArrayList arrayList = (ArrayList)list;\n boolean bl2 = arrayList.isEmpty();\n if (bl2) {\n f.a(this.a, RescheduleReceiver.class, false);\n }\n this.j.g();\n this.p.c((Object)bl);\n return;\n finally {\n this.j.d();\n }\n }\n\n public final void b() {\n this.j.c();\n k k2 = this.k;\n n n2 = n.a;\n String[] arrstring = new String[]{this.b};\n l l2 = (l)k2;\n l2.a(n2, arrstring);\n k k3 = this.k;\n String string = this.b;\n long l3 = System.currentTimeMillis();\n l l4 = (l)k3;\n l4.b(string, l3);\n k k4 = this.k;\n String string2 = this.b;\n l l5 = (l)k4;\n try {\n l5.a(string2, -1L);\n this.j.g();\n return;\n }\n finally {\n this.j.d();\n this.a(true);\n }\n }\n\n public final void c() {\n this.j.c();\n k k2 = this.k;\n String string = this.b;\n long l2 = System.currentTimeMillis();\n l l3 = (l)k2;\n l3.b(string, l2);\n k k3 = this.k;\n n n2 = n.a;\n String[] arrstring = new String[]{this.b};\n l l4 = (l)k3;\n l4.a(n2, arrstring);\n k k4 = this.k;\n String string2 = this.b;\n l l5 = (l)k4;\n l5.f(string2);\n k k5 = this.k;\n String string3 = this.b;\n l l6 = (l)k5;\n try {\n l6.a(string3, -1L);\n this.j.g();\n return;\n }\n finally {\n this.j.d();\n this.a(false);\n }\n }\n\n public final void d() {\n k k2 = this.k;\n String string = this.b;\n n n2 = ((l)k2).a(string);\n if (n2 == n.b) {\n h h2 = h.a();\n String string2 = s;\n Object[] arrobject = new Object[]{this.b};\n h2.a(string2, String.format((String)\"Status for %s is RUNNING;not doing any work and rescheduling for later execution\", (Object[])arrobject), new Throwable[0]);\n this.a(true);\n return;\n }\n h h4 = h.a();\n String string3 = s;\n Object[] arrobject = new Object[]{this.b, n2};\n h4.a(string3, String.format((String)\"Status for %s is %s; not doing any work\", (Object[])arrobject), new Throwable[0]);\n this.a(false);\n }\n\n public void e() {\n this.j.c();\n this.a(this.b);\n a.i.e e2 = ((ListenableWorker.a.a)this.g).a;\n k k2 = this.k;\n String string = this.b;\n l l2 = (l)k2;\n try {\n l2.a(string, e2);\n this.j.g();\n return;\n }\n finally {\n this.j.d();\n this.a(false);\n }\n }\n\n public final boolean f() {\n if (this.r) {\n h h2 = h.a();\n String string = s;\n Object[] arrobject = new Object[]{this.o};\n h2.a(string, String.format((String)\"Work interrupted for %s\", (Object[])arrobject), new Throwable[0]);\n k k2 = this.k;\n String string2 = this.b;\n n n2 = ((l)k2).a(string2);\n if (n2 == null) {\n this.a(false);\n return true;\n }\n this.a(true ^ n2.d());\n return true;\n }\n return false;\n }\n\n /*\n * Loose catch block\n * Enabled aggressive block sorting\n * Enabled unnecessary exception pruning\n * Enabled aggressive exception aggregation\n * Lifted jumps to return sites\n */\n public void run() {\n int n2;\n block42 : {\n block41 : {\n i i2;\n Cursor cursor;\n block48 : {\n block46 : {\n ListenableWorker listenableWorker;\n block47 : {\n a.i.e e2;\n block44 : {\n g g2;\n block45 : {\n block40 : {\n boolean bl;\n Iterator iterator;\n j j2;\n StringBuilder stringBuilder;\n block43 : {\n a.i.r.p.n n3 = this.m;\n String string = this.b;\n o o2 = (o)n3;\n if (o2 == null) throw null;\n n2 = 1;\n i i3 = i.a((String)\"SELECT DISTINCT tag FROM worktag WHERE work_spec_id=?\", (int)n2);\n if (string == null) {\n i3.bindNull(n2);\n } else {\n i3.bindString(n2, string);\n }\n o2.a.b();\n Cursor cursor2 = a.f.l.a.a(o2.a, (a.g.a.e)i3, false);\n ArrayList arrayList = new ArrayList(cursor2.getCount());\n while (cursor2.moveToNext()) {\n arrayList.add((Object)cursor2.getString(0));\n }\n this.n = arrayList;\n stringBuilder = new StringBuilder(\"Work [ id=\");\n stringBuilder.append(this.b);\n stringBuilder.append(\", tags={ \");\n iterator = arrayList.iterator();\n bl = true;\n break block43;\n finally {\n cursor2.close();\n i3.b();\n }\n }\n while (iterator.hasNext()) {\n String string = (String)iterator.next();\n if (bl) {\n bl = false;\n } else {\n stringBuilder.append(\", \");\n }\n stringBuilder.append(string);\n }\n stringBuilder.append(\" } ]\");\n this.o = stringBuilder.toString();\n if (this.f()) {\n return;\n }\n this.j.c();\n k k2 = this.k;\n String string = this.b;\n l l2 = (l)k2;\n this.e = j2 = l2.d(string);\n if (j2 == null) {\n h h2 = h.a();\n String string2 = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.b;\n h2.b(string2, String.format((String)\"Didn't find WorkSpec for id %s\", (Object[])arrobject), new Throwable[0]);\n this.a(false);\n return;\n }\n if (j2.b != n.a) {\n this.d();\n this.j.g();\n h h4 = h.a();\n String string3 = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.e.c;\n h4.a(string3, String.format((String)\"%s is not in ENQUEUED state. Nothing more to do.\", (Object[])arrobject), new Throwable[0]);\n return;\n }\n if (j2.d() || this.e.c()) {\n long l3 = System.currentTimeMillis();\n boolean bl2 = this.e.n == 0L;\n if (!bl2 && l3 < this.e.a()) {\n h h5 = h.a();\n String string4 = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.e.c;\n h5.a(string4, String.format((String)\"Delaying execution for %s because it is being executed before schedule.\", (Object[])arrobject), new Throwable[0]);\n this.a((boolean)n2);\n return;\n }\n }\n this.j.g();\n if (!this.e.d()) break block40;\n e2 = this.e.e;\n break block44;\n }\n g2 = g.a(this.e.d);\n if (g2 != null) break block45;\n h h6 = h.a();\n String string = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.e.d;\n h6.b(string, String.format((String)\"Could not create Input Merger %s\", (Object[])arrobject), new Throwable[0]);\n break block46;\n }\n ArrayList arrayList = new ArrayList();\n arrayList.add((Object)this.e.e);\n k k3 = this.k;\n String string = this.b;\n l l4 = (l)k3;\n if (l4 == null) throw null;\n i2 = i.a((String)\"SELECT output FROM workspec WHERE id IN (SELECT prerequisite_id FROM dependency WHERE work_spec_id=?)\", (int)n2);\n if (string == null) {\n i2.bindNull(n2);\n } else {\n i2.bindString(n2, string);\n }\n l4.a.b();\n cursor = a.f.l.a.a(l4.a, (a.g.a.e)i2, false);\n ArrayList arrayList2 = new ArrayList(cursor.getCount());\n while (cursor.moveToNext()) {\n arrayList2.add((Object)a.i.e.b(cursor.getBlob(0)));\n }\n arrayList.addAll((Collection)arrayList2);\n e2 = g2.a((List<a.i.e>)arrayList);\n }\n a.i.e e3 = e2;\n UUID uUID = UUID.fromString((String)this.b);\n List<String> list = this.n;\n WorkerParameters.a a2 = this.d;\n int n5 = this.e.k;\n a.i.b b2 = this.h;\n WorkerParameters workerParameters = new WorkerParameters(uUID, e3, list, a2, n5, b2.a, this.i, b2.c);\n if (this.f == null) {\n this.f = this.h.c.a(this.a, this.e.c, workerParameters);\n }\n if ((listenableWorker = this.f) != null) break block47;\n h h7 = h.a();\n String string = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.e.c;\n h7.b(string, String.format((String)\"Could not create Worker %s\", (Object[])arrobject), new Throwable[0]);\n break block46;\n }\n if (!listenableWorker.isUsed()) break block48;\n h h8 = h.a();\n String string = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.e.c;\n h8.b(string, String.format((String)\"Received an already-used Worker %s; WorkerFactory should return new instances\", (Object[])arrobject), new Throwable[0]);\n }\n this.e();\n return;\n }\n this.f.setUsed();\n this.j.c();\n k k4 = this.k;\n String string = this.b;\n l l5 = (l)k4;\n if (l5.a(string) != n.a) break block41;\n k k5 = this.k;\n n n7 = n.b;\n String[] arrstring = new String[n2];\n arrstring[0] = this.b;\n l l6 = (l)k5;\n l6.a(n7, arrstring);\n k k6 = this.k;\n String string5 = this.b;\n l l7 = (l)k6;\n try {\n l7.e(string5);\n break block42;\n }\n finally {\n cursor.close();\n i2.b();\n }\n catch (Throwable throwable) {\n throw throwable;\n }\n finally {\n this.j.d();\n }\n }\n n2 = 0;\n }\n this.j.g();\n if (n2 != 0) {\n if (this.f()) {\n return;\n }\n c c2 = new c();\n ((a.i.r.q.m.b)this.i).c.execute((Runnable)new a.i.r.k(this, c2));\n c2.a((Runnable)new a.i.r.l(this, c2, this.o), ((a.i.r.q.m.b)this.i).a);\n return;\n }\n this.d();\n return;\n finally {\n this.j.d();\n }\n }\n\n public static class a {\n public Context a;\n public ListenableWorker b;\n public a.i.r.q.m.a c;\n public a.i.b d;\n public WorkDatabase e;\n public String f;\n public List<d> g;\n public WorkerParameters.a h = new WorkerParameters.a();\n\n public a(Context context, a.i.b b2, a.i.r.q.m.a a2, WorkDatabase workDatabase, String string) {\n this.a = context.getApplicationContext();\n this.c = a2;\n this.d = b2;\n this.e = workDatabase;\n this.f = string;\n }\n }\n\n}", "@kotlin.Metadata(mv = {1, 1, 13}, bv = {1, 0, 3}, k = 1, d1 = {\"\\u0000\\f\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\bf\\u0018\\u00002\\u00020\\u0001:\\u0002\\u0002\\u0003\\u00a8\\u0006\\u0004\"}, d2 = {\"Lcom/wy/adbook/mvp/contranct/ReadContract;\", \"\", \"Model\", \"View\", \"application_release\"})\npublic abstract interface ReadContract {\n \n @kotlin.Metadata(mv = {1, 1, 13}, bv = {1, 0, 3}, k = 1, d1 = {\"\\u0000&\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u0002\\n\\u0002\\b\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0004\\n\\u0002\\u0010\\u0007\\n\\u0000\\bf\\u0018\\u00002\\u00020\\u0001J\\b\\u0010\\u0002\\u001a\\u00020\\u0003H&J\\b\\u0010\\u0004\\u001a\\u00020\\u0003H&J\\b\\u0010\\u0005\\u001a\\u00020\\u0006H&J\\n\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\bH&J\\b\\u0010\\t\\u001a\\u00020\\u0003H&J\\b\\u0010\\n\\u001a\\u00020\\u0003H&J\\u0010\\u0010\\u000b\\u001a\\u00020\\u00032\\u0006\\u0010\\f\\u001a\\u00020\\rH&\\u00a8\\u0006\\u000e\"}, d2 = {\"Lcom/wy/adbook/mvp/contranct/ReadContract$View;\", \"Lcom/wy/adbook/app/base/QYView;\", \"errorChapters\", \"\", \"finishChapters\", \"getGoldTipTv\", \"Landroid/widget/TextView;\", \"getReadPageLoader\", \"Lcom/wy/adbook/view/page/PageLoader;\", \"initReadView\", \"refreshChapter\", \"refreshProgressBar\", \"progress\", \"\", \"application_release\"})\n public static abstract interface View extends com.wy.adbook.app.base.QYView {\n \n public abstract void refreshChapter();\n \n public abstract void finishChapters();\n \n public abstract void errorChapters();\n \n public abstract void initReadView();\n \n @org.jetbrains.annotations.Nullable()\n public abstract com.wy.adbook.view.page.PageLoader getReadPageLoader();\n \n public abstract void refreshProgressBar(float progress);\n \n @org.jetbrains.annotations.NotNull()\n public abstract android.widget.TextView getGoldTipTv();\n }\n \n @kotlin.Metadata(mv = {1, 1, 13}, bv = {1, 0, 3}, k = 1, d1 = {\"\\u0000D\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\b\\n\\u0002\\b\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\bf\\u0018\\u00002\\u00020\\u0001J\\u001e\\u0010\\u0002\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00040\\u00032\\u0006\\u0010\\u0005\\u001a\\u00020\\u00062\\u0006\\u0010\\u0007\\u001a\\u00020\\u0006H&J\\u0016\\u0010\\b\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\t0\\u00032\\u0006\\u0010\\u0007\\u001a\\u00020\\u0006H&J\\u001e\\u0010\\n\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u000b0\\u00032\\u0006\\u0010\\u0007\\u001a\\u00020\\u00062\\u0006\\u0010\\f\\u001a\\u00020\\u0006H&J\\u0016\\u0010\\r\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u000e0\\u00032\\u0006\\u0010\\u0005\\u001a\\u00020\\u0006H&J\\u0016\\u0010\\u000f\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00100\\u00032\\u0006\\u0010\\u0007\\u001a\\u00020\\u0006H&J\\u001e\\u0010\\u0011\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00120\\u00032\\u0006\\u0010\\u0005\\u001a\\u00020\\u00062\\u0006\\u0010\\u0007\\u001a\\u00020\\u0006H&J.\\u0010\\u0013\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00140\\u00032\\u0006\\u0010\\u0005\\u001a\\u00020\\u00062\\u0006\\u0010\\u0007\\u001a\\u00020\\u00062\\u0006\\u0010\\f\\u001a\\u00020\\u00062\\u0006\\u0010\\u0015\\u001a\\u00020\\u0006H&\\u00a8\\u0006\\u0016\"}, d2 = {\"Lcom/wy/adbook/mvp/contranct/ReadContract$Model;\", \"Lcom/wy/adbook/app/base/QYModel;\", \"addToBookcase\", \"Lio/reactivex/Observable;\", \"Lcom/wy/adbook/mvp/model/entity/book/NetPutOn;\", \"uid\", \"\", \"bid\", \"bookDetail\", \"Lcom/wy/adbook/mvp/model/entity/book/NetBook;\", \"chapterContent\", \"Lcom/wy/adbook/mvp/model/entity/NetChapter;\", \"cid\", \"get30sWelfareRead\", \"Lcom/wy/adbook/mvp/model/entity/NetGet30sWelfareRead;\", \"listChapter\", \"Lcom/wy/adbook/mvp/model/entity/NetChapterList;\", \"recordBook\", \"Lcom/wy/adbook/mvp/model/entity/NetReadFooterRecord;\", \"updateBookProgress\", \"Lcom/wy/adbook/mvp/model/entity/NetBookProgress;\", \"readCount\", \"application_release\"})\n public static abstract interface Model extends com.wy.adbook.app.base.QYModel {\n \n @org.jetbrains.annotations.NotNull()\n public abstract io.reactivex.Observable<com.wy.adbook.mvp.model.entity.NetChapterList> listChapter(int bid);\n \n @org.jetbrains.annotations.NotNull()\n public abstract io.reactivex.Observable<com.wy.adbook.mvp.model.entity.book.NetBook> bookDetail(int bid);\n \n @org.jetbrains.annotations.NotNull()\n public abstract io.reactivex.Observable<com.wy.adbook.mvp.model.entity.NetChapter> chapterContent(int bid, int cid);\n \n @org.jetbrains.annotations.NotNull()\n public abstract io.reactivex.Observable<com.wy.adbook.mvp.model.entity.book.NetPutOn> addToBookcase(int uid, int bid);\n \n @org.jetbrains.annotations.NotNull()\n public abstract io.reactivex.Observable<com.wy.adbook.mvp.model.entity.NetBookProgress> updateBookProgress(int uid, int bid, int cid, int readCount);\n \n @org.jetbrains.annotations.NotNull()\n public abstract io.reactivex.Observable<com.wy.adbook.mvp.model.entity.NetGet30sWelfareRead> get30sWelfareRead(int uid);\n \n @org.jetbrains.annotations.NotNull()\n public abstract io.reactivex.Observable<com.wy.adbook.mvp.model.entity.NetReadFooterRecord> recordBook(int uid, int bid);\n }\n}", "public final void mo1285b() {\n }", "private final void m710e() {\n /*\n r12 = this;\n akn r0 = r12.f531p\n akl r0 = r0.f601d\n if (r0 == 0) goto L_0x0155\n boolean r1 = r0.f580d\n r2 = -9223372036854775807(0x8000000000000001, double:-4.9E-324)\n if (r1 == 0) goto L_0x0017\n aws r1 = r0.f577a\n long r4 = r1.mo1486c()\n r8 = r4\n goto L_0x0019\n L_0x0017:\n r8 = r2\n L_0x0019:\n int r1 = (r8 > r2 ? 1 : (r8 == r2 ? 0 : -1))\n if (r1 != 0) goto L_0x0122\n ajf r1 = r12.f528m\n akn r2 = r12.f531p\n akl r2 = r2.f602e\n akx r3 = r1.f445c\n r4 = 0\n if (r3 == 0) goto L_0x008a\n boolean r3 = r3.mo486w()\n if (r3 != 0) goto L_0x008a\n akx r3 = r1.f445c\n boolean r3 = r3.mo485v()\n if (r3 == 0) goto L_0x0037\n goto L_0x0042\n L_0x0037:\n if (r0 != r2) goto L_0x008a\n akx r2 = r1.f445c\n boolean r2 = r2.mo359g()\n if (r2 == 0) goto L_0x0042\n goto L_0x008a\n L_0x0042:\n bkr r2 = r1.f446d\n long r2 = r2.mo379b()\n boolean r5 = r1.f447e\n if (r5 == 0) goto L_0x0068\n blf r5 = r1.f443a\n long r5 = r5.mo379b()\n int r7 = (r2 > r5 ? 1 : (r2 == r5 ? 0 : -1))\n if (r7 >= 0) goto L_0x005c\n blf r2 = r1.f443a\n r2.mo2109d()\n goto L_0x0096\n L_0x005c:\n r1.f447e = r4\n boolean r5 = r1.f448f\n if (r5 == 0) goto L_0x0068\n blf r5 = r1.f443a\n r5.mo2107a()\n L_0x0068:\n blf r5 = r1.f443a\n r5.mo2108a(r2)\n bkr r2 = r1.f446d\n akq r2 = r2.mo376Q()\n blf r3 = r1.f443a\n akq r3 = r3.f4280a\n boolean r3 = r2.equals(r3)\n if (r3 != 0) goto L_0x0096\n blf r3 = r1.f443a\n r3.mo378a(r2)\n aje r3 = r1.f444b\n ake r3 = (p000.ake) r3\n r3.m694a(r2, r4)\n goto L_0x0096\n L_0x008a:\n r2 = 1\n r1.f447e = r2\n boolean r2 = r1.f448f\n if (r2 == 0) goto L_0x0096\n blf r2 = r1.f443a\n r2.mo2107a()\n L_0x0096:\n long r1 = r1.mo379b()\n r12.f513D = r1\n long r0 = r0.mo440b(r1)\n akp r2 = r12.f533r\n long r2 = r2.f623m\n java.util.ArrayList r5 = r12.f530o\n boolean r5 = r5.isEmpty()\n if (r5 != 0) goto L_0x011d\n akp r5 = r12.f533r\n awt r5 = r5.f612b\n boolean r5 = r5.mo1504a()\n if (r5 != 0) goto L_0x011d\n akp r5 = r12.f533r\n long r6 = r5.f613c\n int r8 = (r6 > r2 ? 1 : (r6 == r2 ? 0 : -1))\n if (r8 != 0) goto L_0x00c5\n boolean r6 = r12.f515F\n if (r6 == 0) goto L_0x00c5\n r6 = -1\n long r2 = r2 + r6\n L_0x00c5:\n r12.f515F = r4\n alh r4 = r5.f611a\n awt r5 = r5.f612b\n java.lang.Object r5 = r5.f2566a\n int r4 = r4.mo525a(r5)\n int r5 = r12.f514E\n r6 = 0\n if (r5 <= 0) goto L_0x00e1\n java.util.ArrayList r7 = r12.f530o\n int r5 = r5 + -1\n java.lang.Object r5 = r7.get(r5)\n akb r5 = (p000.akb) r5\n goto L_0x00e3\n L_0x00e1:\n L_0x00e2:\n r5 = r6\n L_0x00e3:\n if (r5 != 0) goto L_0x00e6\n goto L_0x0109\n L_0x00e6:\n int r5 = r5.f502a\n if (r4 >= 0) goto L_0x00eb\n L_0x00ea:\n goto L_0x00f4\n L_0x00eb:\n if (r4 != 0) goto L_0x0109\n r7 = 0\n int r5 = (r2 > r7 ? 1 : (r2 == r7 ? 0 : -1))\n if (r5 >= 0) goto L_0x0109\n goto L_0x00ea\n L_0x00f4:\n int r5 = r12.f514E\n int r5 = r5 + -1\n r12.f514E = r5\n if (r5 <= 0) goto L_0x0108\n java.util.ArrayList r7 = r12.f530o\n int r5 = r5 + -1\n java.lang.Object r5 = r7.get(r5)\n akb r5 = (p000.akb) r5\n goto L_0x00e3\n L_0x0108:\n goto L_0x00e2\n L_0x0109:\n int r2 = r12.f514E\n java.util.ArrayList r3 = r12.f530o\n int r3 = r3.size()\n if (r2 >= r3) goto L_0x011d\n java.util.ArrayList r2 = r12.f530o\n int r3 = r12.f514E\n java.lang.Object r2 = r2.get(r3)\n akb r2 = (p000.akb) r2\n L_0x011d:\n akp r2 = r12.f533r\n r2.f623m = r0\n goto L_0x0140\n L_0x0122:\n r12.m691a(r8)\n akp r0 = r12.f533r\n long r0 = r0.f623m\n int r2 = (r8 > r0 ? 1 : (r8 == r0 ? 0 : -1))\n if (r2 == 0) goto L_0x0140\n akp r0 = r12.f533r\n awt r7 = r0.f612b\n long r10 = r0.f614d\n r6 = r12\n akp r0 = r6.m686a(r7, r8, r10)\n r12.f533r = r0\n akc r0 = r12.f529n\n r1 = 4\n r0.mo409b(r1)\n L_0x0140:\n akn r0 = r12.f531p\n akl r0 = r0.f603f\n akp r1 = r12.f533r\n long r2 = r0.mo442c()\n r1.f621k = r2\n akp r0 = r12.f533r\n long r1 = r12.m719n()\n r0.f622l = r1\n return\n L_0x0155:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p000.ake.m710e():void\");\n }", "@Test\n\tpublic void testInvariantsAndTheorems_06_partialTyping() throws Exception {\n\t\tIContextRoot con = createContext(\"ctx\");\n\t\taddCarrierSets(con, \"S1\");\n\t\n\t\tsaveRodinFileOf(con);\n\n\t\tITypeEnvironmentBuilder typeEnvironment = mTypeEnvironment(\"S1=ℙ(S1); V1=S1\",\n\t\t\t\tfactory);\n\t\t\n\t\tIMachineRoot mac = createMachine(\"mac\");\n\t\taddMachineSees(mac, \"ctx\");\n\t\taddVariables(mac, \"V1\");\n\t\taddInvariants(mac, \n\t\t\t\tmakeSList(\"I1\", \"I2\", \"I3\", \"I4\"), \n\t\t\t\tmakeSList(\"V1=V1\", \"V1∈S1\", \"V1∈{V1}\", \"S1 ⊆ {V1}\"),\n\t\t\t\tfalse, false, false, false);\n\t\taddInitialisation(mac, \"V1\");\n\t\n\t\tsaveRodinFileOf(mac);\n\t\t\n\t\trunBuilderCheck(marker(mac.getInvariants()[0], PREDICATE_ATTRIBUTE, 0,\n\t\t\t\t2, TypeUnknownError));\n\t\t\n\t\tISCMachineRoot file = mac.getSCMachineRoot();\n\t\t\n\t\tcontainsInvariants(file, typeEnvironment, \n\t\t\t\tmakeSList(\"I2\", \"I3\", \"I4\"), \n\t\t\t\tmakeSList(\"V1∈S1\", \"V1∈{V1}\", \"S1 ⊆ {V1}\"),\n\t\t\t\tfalse, false, false);\n\t}", "public void c() {\n /*\n r14 = this;\n io.b.o<? super U> r0 = r14.actual\n r1 = 1\n r2 = 1\n L_0x0004:\n boolean r3 = r14.d()\n if (r3 == 0) goto L_0x000b\n return\n L_0x000b:\n io.b.e.c.d<U> r3 = r14.queue\n if (r3 == 0) goto L_0x0023\n L_0x000f:\n boolean r4 = r14.d()\n if (r4 == 0) goto L_0x0016\n return\n L_0x0016:\n java.lang.Object r4 = r3.poll()\n if (r4 != 0) goto L_0x001f\n if (r4 != 0) goto L_0x000f\n goto L_0x0023\n L_0x001f:\n r0.a(r4)\n goto L_0x000f\n L_0x0023:\n boolean r3 = r14.done\n io.b.e.c.d<U> r4 = r14.queue\n java.util.concurrent.atomic.AtomicReference<io.b.e.e.d.i$a<?, ?>[]> r5 = r14.observers\n java.lang.Object r5 = r5.get()\n io.b.e.e.d.i$a[] r5 = (io.b.e.e.d.i.a[]) r5\n int r6 = r5.length\n int r7 = r14.maxConcurrency\n r8 = 2147483647(0x7fffffff, float:NaN)\n r9 = 0\n if (r7 == r8) goto L_0x0044\n monitor-enter(r14)\n java.util.Queue<io.b.m<? extends U>> r7 = r14.sources // Catch:{ all -> 0x0041 }\n int r7 = r7.size() // Catch:{ all -> 0x0041 }\n monitor-exit(r14) // Catch:{ all -> 0x0041 }\n goto L_0x0045\n L_0x0041:\n r0 = move-exception\n monitor-exit(r14) // Catch:{ all -> 0x0041 }\n throw r0\n L_0x0044:\n r7 = 0\n L_0x0045:\n if (r3 == 0) goto L_0x0067\n if (r4 == 0) goto L_0x004f\n boolean r3 = r4.isEmpty()\n if (r3 == 0) goto L_0x0067\n L_0x004f:\n if (r6 != 0) goto L_0x0067\n if (r7 != 0) goto L_0x0067\n io.b.e.h.c r1 = r14.errors\n java.lang.Throwable r1 = r1.a()\n java.lang.Throwable r2 = io.b.e.h.f.f33557a\n if (r1 == r2) goto L_0x0066\n if (r1 != 0) goto L_0x0063\n r0.a()\n goto L_0x0066\n L_0x0063:\n r0.a((java.lang.Throwable) r1)\n L_0x0066:\n return\n L_0x0067:\n if (r6 == 0) goto L_0x0106\n long r3 = r14.lastId\n int r7 = r14.lastIndex\n if (r6 <= r7) goto L_0x0077\n r10 = r5[r7]\n long r10 = r10.id\n int r12 = (r10 > r3 ? 1 : (r10 == r3 ? 0 : -1))\n if (r12 == 0) goto L_0x0098\n L_0x0077:\n if (r6 > r7) goto L_0x007a\n r7 = 0\n L_0x007a:\n r10 = r7\n r7 = 0\n L_0x007c:\n if (r7 >= r6) goto L_0x008f\n r11 = r5[r10]\n long r11 = r11.id\n int r13 = (r11 > r3 ? 1 : (r11 == r3 ? 0 : -1))\n if (r13 != 0) goto L_0x0087\n goto L_0x008f\n L_0x0087:\n int r10 = r10 + 1\n if (r10 != r6) goto L_0x008c\n r10 = 0\n L_0x008c:\n int r7 = r7 + 1\n goto L_0x007c\n L_0x008f:\n r14.lastIndex = r10\n r3 = r5[r10]\n long r3 = r3.id\n r14.lastId = r3\n r7 = r10\n L_0x0098:\n r3 = 0\n r4 = 0\n L_0x009a:\n if (r3 >= r6) goto L_0x00fd\n boolean r10 = r14.d()\n if (r10 == 0) goto L_0x00a3\n return\n L_0x00a3:\n r10 = r5[r7]\n L_0x00a5:\n boolean r11 = r14.d()\n if (r11 == 0) goto L_0x00ac\n return\n L_0x00ac:\n io.b.e.c.e<U> r11 = r10.queue\n if (r11 != 0) goto L_0x00b1\n goto L_0x00b9\n L_0x00b1:\n java.lang.Object r12 = r11.poll() // Catch:{ Throwable -> 0x00e2 }\n if (r12 != 0) goto L_0x00d8\n if (r12 != 0) goto L_0x00a5\n L_0x00b9:\n boolean r11 = r10.done\n io.b.e.c.e<U> r12 = r10.queue\n if (r11 == 0) goto L_0x00d2\n if (r12 == 0) goto L_0x00c7\n boolean r11 = r12.isEmpty()\n if (r11 == 0) goto L_0x00d2\n L_0x00c7:\n r14.b(r10)\n boolean r4 = r14.d()\n if (r4 == 0) goto L_0x00d1\n return\n L_0x00d1:\n r4 = 1\n L_0x00d2:\n int r7 = r7 + 1\n if (r7 != r6) goto L_0x00fb\n r7 = 0\n goto L_0x00fb\n L_0x00d8:\n r0.a(r12)\n boolean r12 = r14.d()\n if (r12 == 0) goto L_0x00b1\n return\n L_0x00e2:\n r4 = move-exception\n io.b.c.b.b(r4)\n r10.b()\n io.b.e.h.c r11 = r14.errors\n r11.a(r4)\n boolean r4 = r14.d()\n if (r4 == 0) goto L_0x00f5\n return\n L_0x00f5:\n r14.b(r10)\n int r3 = r3 + 1\n r4 = 1\n L_0x00fb:\n int r3 = r3 + r1\n goto L_0x009a\n L_0x00fd:\n r14.lastIndex = r7\n r3 = r5[r7]\n long r5 = r3.id\n r14.lastId = r5\n goto L_0x0107\n L_0x0106:\n r4 = 0\n L_0x0107:\n if (r4 == 0) goto L_0x0129\n int r3 = r14.maxConcurrency\n if (r3 == r8) goto L_0x0004\n monitor-enter(r14)\n java.util.Queue<io.b.m<? extends U>> r3 = r14.sources // Catch:{ all -> 0x0126 }\n java.lang.Object r3 = r3.poll() // Catch:{ all -> 0x0126 }\n io.b.m r3 = (io.b.m) r3 // Catch:{ all -> 0x0126 }\n if (r3 != 0) goto L_0x0120\n int r3 = r14.wip // Catch:{ all -> 0x0126 }\n int r3 = r3 - r1\n r14.wip = r3 // Catch:{ all -> 0x0126 }\n monitor-exit(r14) // Catch:{ all -> 0x0126 }\n goto L_0x0004\n L_0x0120:\n monitor-exit(r14) // Catch:{ all -> 0x0126 }\n r14.a(r3)\n goto L_0x0004\n L_0x0126:\n r0 = move-exception\n monitor-exit(r14) // Catch:{ all -> 0x0126 }\n throw r0\n L_0x0129:\n int r2 = -r2\n int r2 = r14.addAndGet(r2)\n if (r2 != 0) goto L_0x0004\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: io.b.e.e.d.i.b.c():void\");\n }", "@Test(timeout = 4000)\n public void test053() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-1983180370));\n String[] stringArray0 = new String[8];\n stringArray0[0] = \"LocalVariableTypeTable\";\n stringArray0[1] = \"QL\";\n stringArray0[2] = \"QL\";\n stringArray0[3] = \"QL\";\n stringArray0[4] = \"QL\";\n stringArray0[5] = \"QL\";\n stringArray0[6] = \"LocalVariableTypeTable\";\n stringArray0[7] = \"QL\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 1, \"LocalVariableTypeTable\", \"LocalVariableTypeTable\", \"QL\", stringArray0, false, false);\n Label label0 = new Label();\n methodWriter0.visitTryCatchBlock(label0, label0, label0, \"QL\");\n ByteVector byteVector0 = new ByteVector(285212675);\n ByteVector byteVector1 = byteVector0.putShort(285212675);\n ByteVector byteVector2 = byteVector1.putUTF8(\"vkp1l\");\n ByteVector byteVector3 = byteVector2.putLong(547L);\n byte[] byteArray0 = new byte[2];\n byteArray0[0] = (byte) (-2);\n byteArray0[1] = (byte) (-44);\n int int0 = (-2049);\n // Undeclared exception!\n try { \n byteVector3.putByteArray(byteArray0, (-2049), 285212675);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n }\n }", "private void m25427g() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r2 = this;\n r0 = r2.f19111m;\n if (r0 == 0) goto L_0x000f;\n L_0x0004:\n r0 = r2.f19104f;\t Catch:{ Exception -> 0x000f }\n r0 = android.support.v4.content.C0396d.m1465a(r0);\t Catch:{ Exception -> 0x000f }\n r1 = r2.f19111m;\t Catch:{ Exception -> 0x000f }\n r0.m1468a(r1);\t Catch:{ Exception -> 0x000f }\n L_0x000f:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.ads.internal.adapters.w.g():void\");\n }", "@Test(timeout = 4000)\n public void test035() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(16777267);\n Class<Object> class0 = Object.class;\n Type.getType(class0);\n Type type0 = Type.BYTE_TYPE;\n String[] stringArray0 = new String[1];\n stringArray0[0] = \"xzO!>TX45 #n,Nt&W\";\n classWriter0.visit(10, 3042, \"xzO!>TX45 #n,Nt&W\", \"xzO!>TX45 #n,Nt&W\", \"\", stringArray0);\n Item item0 = classWriter0.newLong(10);\n Item item1 = new Item(158, item0);\n Type type1 = Type.SHORT_TYPE;\n Class<String> class1 = String.class;\n Type type2 = Type.getType(class1);\n Type type3 = Type.BYTE_TYPE;\n Type[] typeArray0 = new Type[5];\n typeArray0[0] = type3;\n typeArray0[1] = type1;\n typeArray0[4] = type1;\n typeArray0[4] = type2;\n // Undeclared exception!\n try { \n frame0.initInputFrame(classWriter0, 196, typeArray0, 1);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 1\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "protected void method_2145() {\r\n // $FF: Couldn't be decompiled\r\n }", "public void mo2485a() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r2 = this;\n r0 = r2.f11863a;\n monitor-enter(r0);\n r1 = r2.f11873l;\t Catch:{ all -> 0x002a }\n if (r1 != 0) goto L_0x0028;\t Catch:{ all -> 0x002a }\n L_0x0007:\n r1 = r2.f11872k;\t Catch:{ all -> 0x002a }\n if (r1 == 0) goto L_0x000c;\t Catch:{ all -> 0x002a }\n L_0x000b:\n goto L_0x0028;\t Catch:{ all -> 0x002a }\n L_0x000c:\n r1 = r2.f11875n;\t Catch:{ all -> 0x002a }\n if (r1 == 0) goto L_0x0015;\n L_0x0010:\n r1 = r2.f11875n;\t Catch:{ RemoteException -> 0x0015 }\n r1.cancel();\t Catch:{ RemoteException -> 0x0015 }\n L_0x0015:\n r1 = r2.f11870i;\t Catch:{ all -> 0x002a }\n m14216b(r1);\t Catch:{ all -> 0x002a }\n r1 = 1;\t Catch:{ all -> 0x002a }\n r2.f11873l = r1;\t Catch:{ all -> 0x002a }\n r1 = com.google.android.gms.common.api.Status.zzfnm;\t Catch:{ all -> 0x002a }\n r1 = r2.mo3568a(r1);\t Catch:{ all -> 0x002a }\n r2.m14217c(r1);\t Catch:{ all -> 0x002a }\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n return;\t Catch:{ all -> 0x002a }\n L_0x0028:\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n return;\t Catch:{ all -> 0x002a }\n L_0x002a:\n r1 = move-exception;\t Catch:{ all -> 0x002a }\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.common.api.internal.BasePendingResult.a():void\");\n }", "public lj ar(byte b) {\n throw new Runtime(\"d2j fail translate: java.lang.RuntimeException: can not merge I and Z\\r\\n\\tat com.googlecode.dex2jar.ir.TypeClass.merge(TypeClass.java:100)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeRef.updateTypeClass(TypeTransformer.java:174)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.provideAs(TypeTransformer.java:780)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.e1expr(TypeTransformer.java:496)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:713)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.enexpr(TypeTransformer.java:698)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:719)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.s1stmt(TypeTransformer.java:810)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.sxStmt(TypeTransformer.java:840)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.analyze(TypeTransformer.java:206)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer.transform(TypeTransformer.java:44)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.optimize(Dex2jar.java:162)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertCode(Dex2Asm.java:414)\\r\\n\\tat com.googlecode.d2j.dex.ExDex2Asm.convertCode(ExDex2Asm.java:42)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.convertCode(Dex2jar.java:128)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertMethod(Dex2Asm.java:509)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:406)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertDex(Dex2Asm.java:422)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.doTranslate(Dex2jar.java:172)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.to(Dex2jar.java:272)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:108)\\r\\n\\tat com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:288)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:32)\\r\\n\");\n }", "private Instruction decodeL0() {\n String subType = nullIsIllegal(json.get(InstructionCodec.SUBTYPE),\n InstructionCodec.SUBTYPE + InstructionCodec.ERROR_MESSAGE).asText();\n\n if (subType.equals(L0ModificationInstruction.L0SubType.OCH.name())) {\n String gridTypeString = nullIsIllegal(json.get(InstructionCodec.GRID_TYPE),\n InstructionCodec.GRID_TYPE + InstructionCodec.MISSING_MEMBER_MESSAGE).asText();\n GridType gridType = GridType.valueOf(gridTypeString);\n if (gridType == null) {\n throw new IllegalArgumentException(\"Unknown grid type \"\n + gridTypeString);\n }\n String channelSpacingString = nullIsIllegal(json.get(InstructionCodec.CHANNEL_SPACING),\n InstructionCodec.CHANNEL_SPACING + InstructionCodec.MISSING_MEMBER_MESSAGE).asText();\n ChannelSpacing channelSpacing = ChannelSpacing.valueOf(channelSpacingString);\n if (channelSpacing == null) {\n throw new IllegalArgumentException(\"Unknown channel spacing \"\n + channelSpacingString);\n }\n int spacingMultiplier = nullIsIllegal(json.get(InstructionCodec.SPACING_MULTIPLIER),\n InstructionCodec.SPACING_MULTIPLIER + InstructionCodec.MISSING_MEMBER_MESSAGE).asInt();\n int slotGranularity = nullIsIllegal(json.get(InstructionCodec.SLOT_GRANULARITY),\n InstructionCodec.SLOT_GRANULARITY + InstructionCodec.MISSING_MEMBER_MESSAGE).asInt();\n return Instructions.modL0Lambda(new OchSignal(gridType, channelSpacing,\n spacingMultiplier, slotGranularity));\n }\n throw new IllegalArgumentException(\"L0 Instruction subtype \"\n + subType + \" is not supported\");\n }", "private boolean m2248a(java.lang.String r3, com.onesignal.La.C0596a r4) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/318857719.run(Unknown Source)\n*/\n /*\n r2 = this;\n r0 = 0;\n r1 = 1;\n java.lang.Float.parseFloat(r3);\t Catch:{ Throwable -> 0x0007 }\n r3 = 1;\n goto L_0x0008;\n L_0x0007:\n r3 = 0;\n L_0x0008:\n if (r3 != 0) goto L_0x0017;\n L_0x000a:\n r3 = com.onesignal.sa.C0650i.ERROR;\n r1 = \"Missing Google Project number!\\nPlease enter a Google Project number / Sender ID on under App Settings > Android > Configuration on the OneSignal dashboard.\";\n com.onesignal.sa.m1656a(r3, r1);\n r3 = 0;\n r1 = -6;\n r4.mo1392a(r3, r1);\n return r0;\n L_0x0017:\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.onesignal.Pa.a(java.lang.String, com.onesignal.La$a):boolean\");\n }", "public final void m15744a(com.p111d.p112a.p114b.C5301g r9) {\n /*\n r8 = this;\n r0 = r8.f17783i;\n r1 = r8.f17781g;\n r2 = 0;\n r3 = 1;\n if (r1 == 0) goto L_0x0010;\n L_0x0008:\n r4 = r0.m4038b();\n if (r4 == 0) goto L_0x0010;\n L_0x000e:\n r4 = r3;\n goto L_0x0011;\n L_0x0010:\n r4 = r2;\n L_0x0011:\n r5 = -1;\n L_0x0012:\n r5 = r5 + r3;\n r6 = 16;\n if (r5 < r6) goto L_0x0029;\n L_0x0017:\n r0 = r0.m4032a();\n if (r0 == 0) goto L_0x0148;\n L_0x001d:\n if (r1 == 0) goto L_0x0027;\n L_0x001f:\n r4 = r0.m4038b();\n if (r4 == 0) goto L_0x0027;\n L_0x0025:\n r4 = r3;\n goto L_0x0028;\n L_0x0027:\n r4 = r2;\n L_0x0028:\n r5 = r2;\n L_0x0029:\n r6 = r0.m4031a(r5);\n if (r6 == 0) goto L_0x0148;\n L_0x002f:\n if (r4 == 0) goto L_0x0043;\n L_0x0031:\n r7 = r0.m4039c(r5);\n if (r7 == 0) goto L_0x003a;\n L_0x0037:\n r9.writeObjectId(r7);\n L_0x003a:\n r7 = r0.m4040d(r5);\n if (r7 == 0) goto L_0x0043;\n L_0x0040:\n r9.writeTypeId(r7);\n L_0x0043:\n r7 = com.p111d.p112a.p121c.p138m.C6523u.C15401.f4807a;\n r6 = r6.ordinal();\n r6 = r7[r6];\n switch(r6) {\n case 1: goto L_0x0143;\n case 2: goto L_0x013e;\n case 3: goto L_0x0139;\n case 4: goto L_0x0134;\n case 5: goto L_0x011e;\n case 6: goto L_0x0108;\n case 7: goto L_0x00c5;\n case 8: goto L_0x0074;\n case 9: goto L_0x0070;\n case 10: goto L_0x006c;\n case 11: goto L_0x0068;\n case 12: goto L_0x0056;\n default: goto L_0x004e;\n };\n L_0x004e:\n r9 = new java.lang.RuntimeException;\n r0 = \"Internal error: should never end up through this code path\";\n r9.<init>(r0);\n throw r9;\n L_0x0056:\n r6 = r0.m4037b(r5);\n r7 = r6 instanceof com.p111d.p112a.p121c.p138m.C5378q;\n if (r7 == 0) goto L_0x0064;\n L_0x005e:\n r6 = (com.p111d.p112a.p121c.p138m.C5378q) r6;\n r6.m11598a(r9);\n goto L_0x0012;\n L_0x0064:\n r9.writeObject(r6);\n goto L_0x0012;\n L_0x0068:\n r9.writeNull();\n goto L_0x0012;\n L_0x006c:\n r9.writeBoolean(r2);\n goto L_0x0012;\n L_0x0070:\n r9.writeBoolean(r3);\n goto L_0x0012;\n L_0x0074:\n r6 = r0.m4037b(r5);\n r7 = r6 instanceof java.lang.Double;\n if (r7 == 0) goto L_0x0086;\n L_0x007c:\n r6 = (java.lang.Double) r6;\n r6 = r6.doubleValue();\n r9.writeNumber(r6);\n goto L_0x0012;\n L_0x0086:\n r7 = r6 instanceof java.math.BigDecimal;\n if (r7 == 0) goto L_0x0090;\n L_0x008a:\n r6 = (java.math.BigDecimal) r6;\n r9.writeNumber(r6);\n goto L_0x0012;\n L_0x0090:\n r7 = r6 instanceof java.lang.Float;\n if (r7 == 0) goto L_0x009f;\n L_0x0094:\n r6 = (java.lang.Float) r6;\n r6 = r6.floatValue();\n r9.writeNumber(r6);\n goto L_0x0012;\n L_0x009f:\n if (r6 != 0) goto L_0x00a2;\n L_0x00a1:\n goto L_0x0068;\n L_0x00a2:\n r7 = r6 instanceof java.lang.String;\n if (r7 == 0) goto L_0x00ad;\n L_0x00a6:\n r6 = (java.lang.String) r6;\n r9.writeNumber(r6);\n goto L_0x0012;\n L_0x00ad:\n r0 = new com.d.a.b.f;\n r1 = \"Unrecognized value type for VALUE_NUMBER_FLOAT: %s, can not serialize\";\n r3 = new java.lang.Object[r3];\n r4 = r6.getClass();\n r4 = r4.getName();\n r3[r2] = r4;\n r1 = java.lang.String.format(r1, r3);\n r0.<init>(r1, r9);\n throw r0;\n L_0x00c5:\n r6 = r0.m4037b(r5);\n r7 = r6 instanceof java.lang.Integer;\n if (r7 == 0) goto L_0x00d8;\n L_0x00cd:\n r6 = (java.lang.Integer) r6;\n r6 = r6.intValue();\n L_0x00d3:\n r9.writeNumber(r6);\n goto L_0x0012;\n L_0x00d8:\n r7 = r6 instanceof java.math.BigInteger;\n if (r7 == 0) goto L_0x00e3;\n L_0x00dc:\n r6 = (java.math.BigInteger) r6;\n r9.writeNumber(r6);\n goto L_0x0012;\n L_0x00e3:\n r7 = r6 instanceof java.lang.Long;\n if (r7 == 0) goto L_0x00f2;\n L_0x00e7:\n r6 = (java.lang.Long) r6;\n r6 = r6.longValue();\n r9.writeNumber(r6);\n goto L_0x0012;\n L_0x00f2:\n r7 = r6 instanceof java.lang.Short;\n if (r7 == 0) goto L_0x0101;\n L_0x00f6:\n r6 = (java.lang.Short) r6;\n r6 = r6.shortValue();\n r9.writeNumber(r6);\n goto L_0x0012;\n L_0x0101:\n r6 = (java.lang.Number) r6;\n r6 = r6.intValue();\n goto L_0x00d3;\n L_0x0108:\n r6 = r0.m4037b(r5);\n r7 = r6 instanceof com.p111d.p112a.p114b.C1382p;\n if (r7 == 0) goto L_0x0117;\n L_0x0110:\n r6 = (com.p111d.p112a.p114b.C1382p) r6;\n r9.writeString(r6);\n goto L_0x0012;\n L_0x0117:\n r6 = (java.lang.String) r6;\n r9.writeString(r6);\n goto L_0x0012;\n L_0x011e:\n r6 = r0.m4037b(r5);\n r7 = r6 instanceof com.p111d.p112a.p114b.C1382p;\n if (r7 == 0) goto L_0x012d;\n L_0x0126:\n r6 = (com.p111d.p112a.p114b.C1382p) r6;\n r9.writeFieldName(r6);\n goto L_0x0012;\n L_0x012d:\n r6 = (java.lang.String) r6;\n r9.writeFieldName(r6);\n goto L_0x0012;\n L_0x0134:\n r9.writeEndArray();\n goto L_0x0012;\n L_0x0139:\n r9.writeStartArray();\n goto L_0x0012;\n L_0x013e:\n r9.writeEndObject();\n goto L_0x0012;\n L_0x0143:\n r9.writeStartObject();\n goto L_0x0012;\n L_0x0148:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.d.a.c.m.u.a(com.d.a.b.g):void\");\n }", "@androidx.annotation.Nullable\n /* renamed from: j */\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public final p005b.p096l.p097a.p151d.p152a.p154b.C3474b mo14822j(java.lang.String r9) {\n /*\n r8 = this;\n java.io.File r0 = new java.io.File\n java.io.File r1 = r8.mo14820g()\n r0.<init>(r1, r9)\n boolean r1 = r0.exists()\n r2 = 3\n r3 = 6\n r4 = 1\n r5 = 0\n r6 = 0\n if (r1 != 0) goto L_0x0022\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r4]\n r1[r5] = r9\n java.lang.String r9 = \"Pack not found with pack name: %s\"\n r0.mo14884b(r2, r9, r1)\n L_0x001f:\n r9 = r6\n goto L_0x0093\n L_0x0022:\n java.io.File r1 = new java.io.File\n b.l.a.d.a.b.o1 r7 = r8.f6567b\n int r7 = r7.mo14797a()\n java.lang.String r7 = java.lang.String.valueOf(r7)\n r1.<init>(r0, r7)\n boolean r0 = r1.exists()\n r7 = 2\n if (r0 != 0) goto L_0x0050\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"Pack not found with pack name: %s app version: %s\"\n r0.mo14884b(r2, r9, r1)\n goto L_0x001f\n L_0x0050:\n java.io.File[] r0 = r1.listFiles()\n if (r0 == 0) goto L_0x007b\n int r1 = r0.length\n if (r1 != 0) goto L_0x005a\n goto L_0x007b\n L_0x005a:\n if (r1 <= r4) goto L_0x0074\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"Multiple pack versions found for pack name: %s app version: %s\"\n r0.mo14884b(r3, r9, r1)\n goto L_0x001f\n L_0x0074:\n r9 = r0[r5]\n java.lang.String r9 = r9.getCanonicalPath()\n goto L_0x0093\n L_0x007b:\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"No pack version found for pack name: %s app version: %s\"\n r0.mo14884b(r2, r9, r1)\n goto L_0x001f\n L_0x0093:\n if (r9 != 0) goto L_0x0096\n return r6\n L_0x0096:\n java.io.File r0 = new java.io.File\n java.lang.String r1 = \"assets\"\n r0.<init>(r9, r1)\n boolean r1 = r0.isDirectory()\n if (r1 != 0) goto L_0x00af\n b.l.a.d.a.e.f r9 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r4]\n r1[r5] = r0\n java.lang.String r0 = \"Failed to find assets directory: %s\"\n r9.mo14884b(r3, r0, r1)\n return r6\n L_0x00af:\n java.lang.String r0 = r0.getCanonicalPath()\n b.l.a.d.a.b.w r1 = new b.l.a.d.a.b.w\n r1.<init>(r5, r9, r0)\n return r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p005b.p096l.p097a.p151d.p152a.p154b.C3544t.mo14822j(java.lang.String):b.l.a.d.a.b.b\");\n }", "private void finalizeOutOfTypeSystemFeatures() {\n // remap ref features\n for (List<Pair<String, Object>> attrs : outOfTypeSystemData.extraFeatureValues.values()) {\n for (Pair<String, Object> p : attrs) {\n String sv = (p.u instanceof String) ? (String) p.u : \"\";\n if (p.t.startsWith(\"_ref_\")) {\n int val = Integer.parseInt(sv);\n if (val >= 0) // negative numbers represent null and are left unchanged\n {\n // attempt to locate target in type system\n FSInfo fsValInfo = fsTree.get(val);\n if (fsValInfo != null) {\n p.u = fsValInfo.fs;\n } else\n // out of type system - remap by prepending letter\n {\n p.u = \"a\" + val;\n }\n }\n }\n }\n }\n }", "public java.lang.Object mo13022a(java.lang.String r18, kotlin.coroutines.Continuation<? super java.lang.Boolean> r19) {\n /*\n r17 = this;\n r0 = r17\n r1 = r19\n boolean r2 = r1 instanceof p008c.p009a.p024e.p026b.C0963b.C0970g\n if (r2 == 0) goto L_0x0017\n r2 = r1\n c.a.e.b.b$g r2 = (p008c.p009a.p024e.p026b.C0963b.C0970g) r2\n int r3 = r2.f1086b\n r4 = -2147483648(0xffffffff80000000, float:-0.0)\n r5 = r3 & r4\n if (r5 == 0) goto L_0x0017\n int r3 = r3 - r4\n r2.f1086b = r3\n goto L_0x001c\n L_0x0017:\n c.a.e.b.b$g r2 = new c.a.e.b.b$g\n r2.<init>(r0, r1)\n L_0x001c:\n java.lang.Object r1 = r2.f1085a\n java.lang.Object r3 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()\n int r4 = r2.f1086b\n r5 = 0\n r6 = 2\n r7 = 1\n if (r4 == 0) goto L_0x0051\n if (r4 == r7) goto L_0x0045\n if (r4 != r6) goto L_0x003d\n java.lang.Object r3 = r2.f1090f\n java.lang.String r3 = (java.lang.String) r3\n java.lang.Object r3 = r2.f1089e\n java.lang.String r3 = (java.lang.String) r3\n java.lang.Object r2 = r2.f1088d\n c.a.e.b.b r2 = (p008c.p009a.p024e.p026b.C0963b) r2\n kotlin.ResultKt.throwOnFailure(r1)\n goto L_0x00a1\n L_0x003d:\n java.lang.IllegalStateException r1 = new java.lang.IllegalStateException\n java.lang.String r2 = \"call to 'resume' before 'invoke' with coroutine\"\n r1.<init>(r2)\n throw r1\n L_0x0045:\n java.lang.Object r4 = r2.f1089e\n java.lang.String r4 = (java.lang.String) r4\n java.lang.Object r8 = r2.f1088d\n c.a.e.b.b r8 = (p008c.p009a.p024e.p026b.C0963b) r8\n kotlin.ResultKt.throwOnFailure(r1)\n goto L_0x0066\n L_0x0051:\n kotlin.ResultKt.throwOnFailure(r1)\n c.a.e.c.a r1 = r0.f1032c\n r2.f1088d = r0\n r4 = r18\n r2.f1089e = r4\n r2.f1086b = r7\n java.lang.Object r1 = r1.mo13034a(r2)\n if (r1 != r3) goto L_0x0065\n return r3\n L_0x0065:\n r8 = r0\n L_0x0066:\n c.a.e.c.a r1 = r8.f1032c\n java.lang.String r1 = r1.mo13035a()\n if (r1 == 0) goto L_0x00b7\n org.mobileid.time_key.web_service.TimeKeyWebService r15 = r8.f1031b\n org.mobileid.time_key.web_service.ActionOnKeyBody r14 = new org.mobileid.time_key.web_service.ActionOnKeyBody\n java.util.Locale r9 = java.util.Locale.getDefault()\n java.lang.String r10 = \"Locale.getDefault()\"\n kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r9, r10)\n if (r4 == 0) goto L_0x00af\n java.lang.String r10 = r4.toUpperCase(r9)\n java.lang.String r9 = \"(this as java.lang.String).toUpperCase(locale)\"\n kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r10, r9)\n r12 = 0\n r13 = 4\n r16 = 0\n r9 = r14\n r11 = r1\n r7 = r14\n r14 = r16\n r9.<init>(r10, r11, r12, r13, r14)\n r2.f1088d = r8\n r2.f1089e = r4\n r2.f1090f = r1\n r2.f1086b = r6\n java.lang.Object r1 = r15.activateKey(r7, r2)\n if (r1 != r3) goto L_0x00a1\n return r3\n L_0x00a1:\n org.mobileid.requester.web_service.Response r1 = (org.mobileid.requester.web_service.Response) r1\n java.lang.Object r1 = r1.getResult()\n if (r1 == 0) goto L_0x00aa\n r5 = 1\n L_0x00aa:\n java.lang.Boolean r1 = kotlin.coroutines.jvm.internal.Boxing.boxBoolean(r5)\n return r1\n L_0x00af:\n java.lang.NullPointerException r1 = new java.lang.NullPointerException\n java.lang.String r2 = \"null cannot be cast to non-null type java.lang.String\"\n r1.<init>(r2)\n throw r1\n L_0x00b7:\n java.lang.Boolean r1 = kotlin.coroutines.jvm.internal.Boxing.boxBoolean(r5)\n return r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p008c.p009a.p024e.p026b.C0963b.mo13022a(java.lang.String, kotlin.coroutines.Continuation):java.lang.Object\");\n }", "public void a(IBlockAccess paramard, BlockPosition paramdt)\r\n/* 119: */ {\r\n/* 120:148 */ bdv localbdv = e(paramard, paramdt);\r\n/* 121:149 */ if (localbdv != null)\r\n/* 122: */ {\r\n/* 123:150 */ Block localbec = localbdv.b();\r\n/* 124:151 */ BlockType localatr = localbec.getType();\r\n/* 125:152 */ if ((localatr == this) || (localatr.getMaterial() == Material.air)) {\r\n/* 126:153 */ return;\r\n/* 127: */ }\r\n/* 128:156 */ float f = localbdv.a(0.0F);\r\n/* 129:157 */ if (localbdv.d()) {\r\n/* 130:158 */ f = 1.0F - f;\r\n/* 131: */ }\r\n/* 132:160 */ localatr.a(paramard, paramdt);\r\n/* 133:161 */ if ((localatr == BlockList.J) || (localatr == BlockList.F)) {\r\n/* 134:162 */ f = 0.0F;\r\n/* 135: */ }\r\n/* 136:164 */ EnumDirection localej = localbdv.e();\r\n/* 137:165 */ this.B = (localatr.z() - localej.g() * f);\r\n/* 138:166 */ this.C = (localatr.B() - localej.h() * f);\r\n/* 139:167 */ this.D = (localatr.D() - localej.i() * f);\r\n/* 140:168 */ this.E = (localatr.A() - localej.g() * f);\r\n/* 141:169 */ this.F = (localatr.C() - localej.h() * f);\r\n/* 142:170 */ this.G = (localatr.E() - localej.i() * f);\r\n/* 143: */ }\r\n/* 144: */ }", "public void b(World paramaqu, Random paramRandom, BlockPosition paramdt, Block parambec)\r\n/* 77: */ {\r\n/* 78: 93 */ BlockPosition localdt1 = paramdt.up();\r\n/* 79: */ label260:\r\n/* 80: 95 */ for (int i = 0; i < 128; i++)\r\n/* 81: */ {\r\n/* 82: 96 */ BlockPosition localdt2 = localdt1;\r\n/* 83: 97 */ for (int j = 0; j < i / 16; j++)\r\n/* 84: */ {\r\n/* 85: 98 */ localdt2 = localdt2.offset(paramRandom.nextInt(3) - 1, (paramRandom.nextInt(3) - 1) * paramRandom.nextInt(3) / 2, paramRandom.nextInt(3) - 1);\r\n/* 86: 99 */ if ((paramaqu.getBlock(localdt2.down()).getType() != BlockList.grass) || (paramaqu.getBlock(localdt2).getType().blocksMovement())) {\r\n/* 87: */ break label260;\r\n/* 88: */ }\r\n/* 89: */ }\r\n/* 90:104 */ if (paramaqu.getBlock(localdt2).getType().material == Material.air)\r\n/* 91: */ {\r\n/* 92: */ Object localObject;\r\n/* 93:108 */ if (paramRandom.nextInt(8) == 0)\r\n/* 94: */ {\r\n/* 95:109 */ localObject = paramaqu.b(localdt2).a(paramRandom, localdt2);\r\n/* 96:110 */ avy localavy = ((EnumFlowerVariant)localObject).a().a();\r\n/* 97:111 */ Block localbec = localavy.instance().setData(localavy.l(), (Comparable)localObject);\r\n/* 98:112 */ if (localavy.f(paramaqu, localdt2, localbec)) {\r\n/* 99:113 */ paramaqu.setBlock(localdt2, localbec, 3);\r\n/* 100: */ }\r\n/* 101: */ }\r\n/* 102: */ else\r\n/* 103: */ {\r\n/* 104:116 */ localObject = BlockList.tallgrass.instance().setData(bbh.a, bbi.b);\r\n/* 105:117 */ if (BlockList.tallgrass.f(paramaqu, localdt2, (Block)localObject)) {\r\n/* 106:118 */ paramaqu.setBlock(localdt2, (Block)localObject, 3);\r\n/* 107: */ }\r\n/* 108: */ }\r\n/* 109: */ }\r\n/* 110: */ }\r\n/* 111: */ }", "private static boolean m14540d(C44919o c44919o, C8235ad c8235ad, C17313an c17313an) {\n boolean z;\n AppMethodBeat.m2504i(122757);\n if (c8235ad.eci() || !C25052j.m39373j(c8235ad.ejw(), c17313an)) {\n z = false;\n } else {\n z = true;\n }\n if (z) {\n AppMethodBeat.m2505o(122757);\n return true;\n }\n c44919o.initialize();\n ArrayDeque arrayDeque = c44919o.BKG;\n if (arrayDeque == null) {\n C25052j.dWJ();\n }\n Set set = c44919o.BKH;\n if (set == null) {\n C25052j.dWJ();\n }\n arrayDeque.push(c8235ad);\n while (true) {\n if (arrayDeque.isEmpty()) {\n z = false;\n } else {\n z = true;\n }\n if (!z) {\n c44919o.clear();\n AppMethodBeat.m2505o(122757);\n return false;\n } else if (set.size() > 1000) {\n Throwable illegalStateException = new IllegalStateException((\"Too many supertypes for type: \" + c8235ad + \". Supertypes = \" + C25035t.m39322a((Iterable) set, null, null, null, 0, null, null, 63)).toString());\n AppMethodBeat.m2505o(122757);\n throw illegalStateException;\n } else {\n C8235ad c8235ad2 = (C8235ad) arrayDeque.pop();\n C25052j.m39375o(c8235ad2, \"current\");\n if (set.add(c8235ad2)) {\n C37046c c37046c = c8235ad2.eci() ? C37049c.BKU : C37047a.BKT;\n if ((C25052j.m39373j(c37046c, C37049c.BKU) ^ 1) == 0) {\n c37046c = null;\n }\n if (c37046c != null) {\n for (C46867w c46867w : c8235ad2.ejw().eap()) {\n C25052j.m39375o(c46867w, \"supertype\");\n C8235ad aJ = c37046c.mo31381aJ(c46867w);\n if (aJ.eci() || !C25052j.m39373j(aJ.ejw(), c17313an)) {\n z = false;\n } else {\n z = true;\n }\n if (z) {\n c44919o.clear();\n AppMethodBeat.m2505o(122757);\n return true;\n }\n arrayDeque.add(aJ);\n }\n continue;\n } else {\n continue;\n }\n }\n }\n }\n }", "@Test(timeout = 4000)\n public void test018() throws Throwable {\n Label label0 = new Label();\n Label label1 = new Label();\n ClassWriter classWriter0 = new ClassWriter(3002);\n classWriter0.newFieldItem(\"zOfq\", \"zv)])\\\"nPel4&5\", \"\");\n ClassWriter classWriter1 = new ClassWriter(162);\n classWriter1.toByteArray();\n Type type0 = Type.VOID_TYPE;\n Type type1 = Type.BOOLEAN_TYPE;\n Type type2 = Type.FLOAT_TYPE;\n Type type3 = Type.SHORT_TYPE;\n ClassWriter classWriter2 = new ClassWriter(40);\n Item item0 = classWriter0.key2;\n Item item1 = new Item(2);\n Frame frame0 = new Frame();\n // Undeclared exception!\n try { \n frame0.execute(26, (-345), classWriter2, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "public ItemStack func_70304_b(int par1)\n/* */ {\n/* 45 */ return null;\n/* */ }", "protected void method_2247() {\r\n // $FF: Couldn't be decompiled\r\n }", "public final void a(java.util.List<com.bytedance.ad.symphony.model.config.AdConfig> r13, android.util.SparseArray<com.bytedance.ad.symphony.provider.a.C0060a> r14, java.lang.Class<? extends com.bytedance.ad.symphony.a.a> r15) {\n /*\n r12 = this;\n boolean r0 = r12.l\n r1 = 0\n if (r0 == 0) goto L_0x000a\n r12.l = r1\n r12.c()\n L_0x000a:\n if (r13 == 0) goto L_0x0143\n boolean r0 = r13.isEmpty()\n if (r0 == 0) goto L_0x0014\n goto L_0x0143\n L_0x0014:\n boolean r0 = r12.m\n if (r0 != 0) goto L_0x0019\n return\n L_0x0019:\n java.lang.Object r0 = r12.j\n monitor-enter(r0)\n java.util.ArrayList r2 = new java.util.ArrayList // Catch:{ all -> 0x0140 }\n r2.<init>(r13) // Catch:{ all -> 0x0140 }\n java.util.Iterator r2 = r2.iterator() // Catch:{ all -> 0x0140 }\n L_0x0025:\n boolean r3 = r2.hasNext() // Catch:{ all -> 0x0140 }\n if (r3 == 0) goto L_0x00c7\n java.lang.Object r3 = r2.next() // Catch:{ all -> 0x0140 }\n com.bytedance.ad.symphony.model.config.AdConfig r3 = (com.bytedance.ad.symphony.model.config.AdConfig) r3 // Catch:{ all -> 0x0140 }\n if (r3 == 0) goto L_0x0025\n java.util.Map<java.lang.Integer, com.bytedance.ad.symphony.provider.b<AD>> r4 = r12.f7552c // Catch:{ all -> 0x0140 }\n int r5 = r3.f7654a // Catch:{ all -> 0x0140 }\n java.lang.Integer r5 = java.lang.Integer.valueOf(r5) // Catch:{ all -> 0x0140 }\n boolean r4 = r4.containsKey(r5) // Catch:{ all -> 0x0140 }\n if (r4 != 0) goto L_0x00b4\n android.content.Context r4 = r12.f7555f // Catch:{ all -> 0x0140 }\n r5 = 0\n java.lang.String r6 = \"\"\n if (r3 == 0) goto L_0x005b\n if (r14 == 0) goto L_0x005b\n int r7 = r3.f7654a // Catch:{ Exception -> 0x0088 }\n int r7 = com.bytedance.ad.symphony.provider.a.getRealProviderId(r7) // Catch:{ Exception -> 0x0088 }\n java.lang.Object r7 = r14.get(r7) // Catch:{ Exception -> 0x0088 }\n com.bytedance.ad.symphony.provider.a$a r7 = (com.bytedance.ad.symphony.provider.a.C0060a) r7 // Catch:{ Exception -> 0x0088 }\n if (r7 == 0) goto L_0x005b\n java.lang.String r7 = r7.f7679c // Catch:{ Exception -> 0x0088 }\n r6 = r7\n L_0x005b:\n boolean r7 = com.bytedance.common.utility.StringUtils.isEmpty(r6) // Catch:{ Exception -> 0x0088 }\n if (r7 == 0) goto L_0x0062\n goto L_0x0025\n L_0x0062:\n java.lang.Class r7 = java.lang.Class.forName(r6) // Catch:{ Exception -> 0x0088 }\n r8 = 3\n java.lang.Class[] r9 = new java.lang.Class[r8] // Catch:{ Exception -> 0x0088 }\n java.lang.Class<android.content.Context> r10 = android.content.Context.class\n r9[r1] = r10 // Catch:{ Exception -> 0x0088 }\n java.lang.Class<com.bytedance.ad.symphony.model.config.AdConfig> r10 = com.bytedance.ad.symphony.model.config.AdConfig.class\n r11 = 1\n r9[r11] = r10 // Catch:{ Exception -> 0x0088 }\n r10 = 2\n r9[r10] = r15 // Catch:{ Exception -> 0x0088 }\n java.lang.reflect.Constructor r7 = r7.getConstructor(r9) // Catch:{ Exception -> 0x0088 }\n java.lang.Object[] r8 = new java.lang.Object[r8] // Catch:{ Exception -> 0x0088 }\n r8[r1] = r4 // Catch:{ Exception -> 0x0088 }\n r8[r11] = r3 // Catch:{ Exception -> 0x0088 }\n r8[r10] = r12 // Catch:{ Exception -> 0x0088 }\n java.lang.Object r4 = r7.newInstance(r8) // Catch:{ Exception -> 0x0088 }\n com.bytedance.ad.symphony.provider.a r4 = (com.bytedance.ad.symphony.provider.a) r4 // Catch:{ Exception -> 0x0088 }\n goto L_0x0096\n L_0x0088:\n r12.a() // Catch:{ all -> 0x0140 }\n java.lang.StringBuilder r4 = new java.lang.StringBuilder // Catch:{ all -> 0x0140 }\n java.lang.String r7 = \"createProvider, className-->\"\n r4.<init>(r7) // Catch:{ all -> 0x0140 }\n r4.append(r6) // Catch:{ all -> 0x0140 }\n r4 = r5\n L_0x0096:\n if (r4 == 0) goto L_0x0025\n r12.a() // Catch:{ all -> 0x0140 }\n java.lang.StringBuilder r5 = new java.lang.StringBuilder // Catch:{ all -> 0x0140 }\n java.lang.String r6 = \"createProvider, providerId-->\"\n r5.<init>(r6) // Catch:{ all -> 0x0140 }\n int r6 = r3.f7654a // Catch:{ all -> 0x0140 }\n r5.append(r6) // Catch:{ all -> 0x0140 }\n java.util.Map<java.lang.Integer, com.bytedance.ad.symphony.provider.b<AD>> r5 = r12.f7552c // Catch:{ all -> 0x0140 }\n int r3 = r3.f7654a // Catch:{ all -> 0x0140 }\n java.lang.Integer r3 = java.lang.Integer.valueOf(r3) // Catch:{ all -> 0x0140 }\n r5.put(r3, r4) // Catch:{ all -> 0x0140 }\n goto L_0x0025\n L_0x00b4:\n java.util.Map<java.lang.Integer, com.bytedance.ad.symphony.provider.b<AD>> r4 = r12.f7552c // Catch:{ all -> 0x0140 }\n int r5 = r3.f7654a // Catch:{ all -> 0x0140 }\n java.lang.Integer r5 = java.lang.Integer.valueOf(r5) // Catch:{ all -> 0x0140 }\n java.lang.Object r4 = r4.get(r5) // Catch:{ all -> 0x0140 }\n com.bytedance.ad.symphony.provider.b r4 = (com.bytedance.ad.symphony.provider.b) r4 // Catch:{ all -> 0x0140 }\n r4.setAdConfig(r3) // Catch:{ all -> 0x0140 }\n goto L_0x0025\n L_0x00c7:\n r12.a() // Catch:{ all -> 0x0140 }\n java.lang.StringBuilder r14 = new java.lang.StringBuilder // Catch:{ all -> 0x0140 }\n java.lang.String r15 = \"initConfig, providers created, size-->\"\n r14.<init>(r15) // Catch:{ all -> 0x0140 }\n java.util.Map<java.lang.Integer, com.bytedance.ad.symphony.provider.b<AD>> r15 = r12.f7552c // Catch:{ all -> 0x0140 }\n if (r15 != 0) goto L_0x00d6\n goto L_0x00dc\n L_0x00d6:\n java.util.Map<java.lang.Integer, com.bytedance.ad.symphony.provider.b<AD>> r15 = r12.f7552c // Catch:{ all -> 0x0140 }\n int r1 = r15.size() // Catch:{ all -> 0x0140 }\n L_0x00dc:\n r14.append(r1) // Catch:{ all -> 0x0140 }\n monitor-exit(r0) // Catch:{ all -> 0x0140 }\n com.bytedance.ad.symphony.c.a r14 = r12.h\n if (r14 == 0) goto L_0x013f\n java.util.ArrayList r14 = new java.util.ArrayList\n r14.<init>()\n java.util.Map<java.lang.Integer, com.bytedance.ad.symphony.provider.b<AD>> r15 = r12.f7552c\n java.util.Set r15 = r15.keySet()\n java.util.Iterator r15 = r15.iterator()\n L_0x00f3:\n boolean r0 = r15.hasNext()\n if (r0 == 0) goto L_0x0103\n java.lang.Object r0 = r15.next()\n java.lang.Integer r0 = (java.lang.Integer) r0\n r14.add(r0)\n goto L_0x00f3\n L_0x0103:\n java.lang.Boolean r14 = r12.k\n boolean r14 = r14.booleanValue()\n if (r14 == 0) goto L_0x012f\n java.lang.Boolean r14 = r12.k\n monitor-enter(r14)\n java.lang.Boolean r15 = r12.k // Catch:{ all -> 0x012c }\n boolean r15 = r15.booleanValue() // Catch:{ all -> 0x012c }\n if (r15 == 0) goto L_0x012a\n java.util.Map<java.lang.Integer, com.bytedance.ad.symphony.provider.b<AD>> r15 = r12.f7552c // Catch:{ all -> 0x012c }\n if (r15 == 0) goto L_0x012a\n java.lang.Boolean r13 = java.lang.Boolean.FALSE // Catch:{ all -> 0x012c }\n r12.k = r13 // Catch:{ all -> 0x012c }\n android.os.Handler r13 = r12.f7551b // Catch:{ all -> 0x012c }\n com.bytedance.ad.symphony.a.a.a$3 r15 = new com.bytedance.ad.symphony.a.a.a$3 // Catch:{ all -> 0x012c }\n r15.<init>() // Catch:{ all -> 0x012c }\n r13.post(r15) // Catch:{ all -> 0x012c }\n monitor-exit(r14) // Catch:{ all -> 0x012c }\n return\n L_0x012a:\n monitor-exit(r14) // Catch:{ all -> 0x012c }\n goto L_0x012f\n L_0x012c:\n r13 = move-exception\n monitor-exit(r14) // Catch:{ all -> 0x012c }\n throw r13\n L_0x012f:\n boolean r13 = com.bytedance.ad.symphony.g.d.a(r13)\n if (r13 != 0) goto L_0x013f\n android.os.Handler r13 = r12.f7551b\n com.bytedance.ad.symphony.a.a.a$4 r14 = new com.bytedance.ad.symphony.a.a.a$4\n r14.<init>()\n r13.post(r14)\n L_0x013f:\n return\n L_0x0140:\n r13 = move-exception\n monitor-exit(r0) // Catch:{ all -> 0x0140 }\n throw r13\n L_0x0143:\n r12.a()\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.bytedance.ad.symphony.a.a.a.a(java.util.List, android.util.SparseArray, java.lang.Class):void\");\n }", "@Test(timeout = 4000)\n public void test019() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(3131);\n classWriter0.visitField(182, \"IK\", \"IK\", \"IK\", \"The FileFilter must not be null\");\n Item item0 = classWriter0.newFieldItem(\"The FileFilter must not be null\", \"\", \"Insensitive\");\n ClassWriter classWriter1 = new ClassWriter(182);\n classWriter1.toByteArray();\n Type type0 = Type.VOID_TYPE;\n Type type1 = Type.BOOLEAN_TYPE;\n Type type2 = Type.FLOAT_TYPE;\n Type type3 = Type.SHORT_TYPE;\n ClassWriter classWriter2 = new ClassWriter(3034);\n ClassWriter classWriter3 = new ClassWriter(2);\n Item item1 = classWriter3.key2;\n Item item2 = new Item(6);\n Frame frame1 = new Frame();\n // Undeclared exception!\n try { \n frame1.execute(173, 6, classWriter3, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test014() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(159);\n ClassWriter classWriter1 = new ClassWriter(2);\n Item item0 = classWriter1.newFieldItem(\"y])rS3DhfdTg\", \"y])rS3DhfdTg\", \"\");\n classWriter0.visitSource(\"y])rS3DhfdTg\", \"\");\n byte[] byteArray0 = new byte[8];\n byteArray0[0] = (byte) (-73);\n byteArray0[1] = (byte) (-83);\n byteArray0[2] = (byte)109;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n byteArray0[3] = (byte)104;\n byteArray0[4] = (byte) (-85);\n byteArray0[5] = (byte)63;\n byteArray0[6] = (byte) (-65);\n byteArray0[7] = (byte) (-85);\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n Class<Object> class0 = Object.class;\n Type type0 = Type.getType(class0);\n Type[] typeArray0 = new Type[3];\n typeArray0[0] = type0;\n typeArray0[1] = type0;\n typeArray0[2] = type0;\n Type.getMethodDescriptor(type0, typeArray0);\n type0.getElementType();\n // Undeclared exception!\n try { \n frame0.execute(54, (byte)104, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "public JBlock _finally() {\n // This method could not be decompiled.\n // \n // Original Bytecode:\n // \n // 0: iconst_0 \n // 1: nop \n // 2: nop \n // 3: nop \n // 4: aload_3 \n // 5: nop \n // 6: lconst_0 \n // 7: nop \n // 8: iaload \n // 9: nop \n // 10: ldc2_w \"Lcom/sun/codemodel/JFormatter;\"\n // 13: nop \n // 14: fload_0 /* this */\n // 15: nop \n // 16: nop \n // 17: nop \n // 18: lload_2 \n // 19: nop \n // 20: iconst_0 \n // 21: nop \n // 22: nop \n // LocalVariableTable:\n // Start Length Slot Name Signature\n // ----- ------ ---- ---- -----------------------------\n // 0 23 0 this Lcom/sun/codemodel/JTryBlock;\n // \n // The error that occurred was:\n // \n // java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Number\n // at com.strobel.assembler.ir.StackMappingVisitor$InstructionAnalyzer.execute(StackMappingVisitor.java:935)\n // at com.strobel.assembler.ir.StackMappingVisitor$InstructionAnalyzer.visit(StackMappingVisitor.java:398)\n // at com.strobel.decompiler.ast.AstBuilder.performStackAnalysis(AstBuilder.java:2030)\n // at com.strobel.decompiler.ast.AstBuilder.build(AstBuilder.java:108)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:210)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:99)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethodBody(AstBuilder.java:757)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethod(AstBuilder.java:655)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addTypeMembers(AstBuilder.java:532)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeCore(AstBuilder.java:499)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeNoCache(AstBuilder.java:141)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createType(AstBuilder.java:130)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addType(AstBuilder.java:105)\n // at com.strobel.decompiler.languages.java.JavaLanguage.buildAst(JavaLanguage.java:71)\n // at com.strobel.decompiler.languages.java.JavaLanguage.decompileType(JavaLanguage.java:59)\n // at com.strobel.decompiler.DecompilerDriver.decompileType(DecompilerDriver.java:317)\n // at com.strobel.decompiler.DecompilerDriver.decompileJar(DecompilerDriver.java:238)\n // at com.strobel.decompiler.DecompilerDriver.main(DecompilerDriver.java:123)\n // \n throw new IllegalStateException(\"An error occurred while decompiling this method.\");\n }", "public abstract void mo70713b();", "public final void run() {\n /*\n r10 = this;\n r8 = 2;\n r7 = 1;\n r6 = 0;\n r2 = com.uc.apollo.media.impl.O.UNKNOWN;\n r1 = 0;\n r0 = r10.e;\t Catch:{ d -> 0x0051, Throwable -> 0x0090 }\n r3 = r10.f;\t Catch:{ d -> 0x0051, Throwable -> 0x0090 }\n r0 = com.uc.apollo.media.b.c.a(r0, r3);\t Catch:{ d -> 0x0051, Throwable -> 0x0090 }\n if (r0 == 0) goto L_0x004b;\n L_0x0010:\n r2 = com.uc.apollo.media.impl.O.M3U8;\t Catch:{ d -> 0x00cf, Throwable -> 0x0090 }\n r1 = r0.c();\t Catch:{ d -> 0x00cf, Throwable -> 0x0090 }\n if (r1 == 0) goto L_0x00db;\n L_0x0018:\n r1 = com.uc.apollo.media.impl.O.M3U8_LIVE;\t Catch:{ d -> 0x00cf, Throwable -> 0x0090 }\n L_0x001a:\n r2 = r10.h;\t Catch:{ d -> 0x00d5, Throwable -> 0x0090 }\n if (r2 == 0) goto L_0x0022;\n L_0x001e:\n r2 = 1;\n r0.a(r2);\t Catch:{ d -> 0x00d5, Throwable -> 0x0090 }\n L_0x0022:\n r2 = com.uc.apollo.media.impl.O.UNKNOWN;\n if (r1 == r2) goto L_0x0030;\n L_0x0026:\n r2 = new java.lang.StringBuilder;\n r3 = \"content type is \";\n r2.<init>(r3);\n r2.append(r1);\n L_0x0030:\n r2 = r10.g;\n if (r2 == 0) goto L_0x004a;\n L_0x0034:\n r2 = c;\n r3 = r10.d;\n r4 = 3;\n r4 = new java.lang.Object[r4];\n r5 = r10.g;\n r4[r6] = r5;\n r4[r7] = r1;\n r4[r8] = r0;\n r0 = r2.obtainMessage(r8, r3, r6, r4);\n r0.sendToTarget();\n L_0x004a:\n return;\n L_0x004b:\n r0 = com.uc.apollo.media.impl.O.PARSE_FAILURE;\t Catch:{ d -> 0x0051, Throwable -> 0x0090 }\n r9 = r1;\n r1 = r0;\n r0 = r9;\n goto L_0x0022;\n L_0x0051:\n r0 = move-exception;\n r9 = r0;\n r0 = r2;\n r2 = r9;\n L_0x0055:\n r3 = r2.a();\n if (r3 == 0) goto L_0x007e;\n L_0x005b:\n r4 = r3.length;\n r5 = 8;\n if (r4 < r5) goto L_0x007e;\n L_0x0060:\n r4 = 4;\n r4 = r3[r4];\n r5 = 102; // 0x66 float:1.43E-43 double:5.04E-322;\n if (r4 == r5) goto L_0x007c;\n L_0x0067:\n r4 = 5;\n r4 = r3[r4];\n r5 = 116; // 0x74 float:1.63E-43 double:5.73E-322;\n if (r4 == r5) goto L_0x007c;\n L_0x006e:\n r4 = 6;\n r4 = r3[r4];\n r5 = 121; // 0x79 float:1.7E-43 double:6.0E-322;\n if (r4 == r5) goto L_0x007c;\n L_0x0075:\n r4 = 7;\n r3 = r3[r4];\n r4 = 112; // 0x70 float:1.57E-43 double:5.53E-322;\n if (r3 != r4) goto L_0x007e;\n L_0x007c:\n r0 = com.uc.apollo.media.impl.O.MP4;\n L_0x007e:\n r3 = com.uc.apollo.media.impl.O.UNKNOWN;\n if (r0 != r3) goto L_0x008c;\n L_0x0082:\n r3 = new java.lang.StringBuilder;\n r4 = \"parse failure, msg: \";\n r3.<init>(r4);\n r3.append(r2);\n L_0x008c:\n r9 = r1;\n r1 = r0;\n r0 = r9;\n goto L_0x0022;\n L_0x0090:\n r0 = move-exception;\n r1 = com.uc.apollo.media.impl.O.PARSE_FAILURE;\n r1 = a;\n r2 = new java.lang.StringBuilder;\n r3 = \"parse failure: \";\n r2.<init>(r3);\n r2 = r2.append(r0);\n r2 = r2.toString();\n android.util.Log.w(r1, r2);\n r1 = r10.g;\n if (r1 == 0) goto L_0x004a;\n L_0x00ab:\n r1 = c;\n r2 = r10.d;\n r3 = new java.lang.Object[r8];\n r4 = r10.g;\n r3[r6] = r4;\n r4 = new java.lang.StringBuilder;\n r5 = \"parse failure: \";\n r4.<init>(r5);\n r0 = r4.append(r0);\n r0 = r0.toString();\n r3[r7] = r0;\n r0 = r1.obtainMessage(r7, r2, r6, r3);\n r0.sendToTarget();\n goto L_0x004a;\n L_0x00cf:\n r1 = move-exception;\n r9 = r1;\n r1 = r0;\n r0 = r2;\n r2 = r9;\n goto L_0x0055;\n L_0x00d5:\n r2 = move-exception;\n r9 = r0;\n r0 = r1;\n r1 = r9;\n goto L_0x0055;\n L_0x00db:\n r1 = r2;\n goto L_0x001a;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.uc.apollo.media.impl.f.run():void\");\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n Frame frame0 = new Frame();\n Type[] typeArray0 = new Type[9];\n Type type0 = Type.getReturnType(\"Zu.y \");\n typeArray0[0] = type0;\n Type type1 = Type.DOUBLE_TYPE;\n typeArray0[1] = type1;\n Type type2 = Type.DOUBLE_TYPE;\n typeArray0[2] = type2;\n Type type3 = Type.INT_TYPE;\n typeArray0[3] = type3;\n Type type4 = Type.VOID_TYPE;\n typeArray0[4] = type4;\n Type type5 = Type.BOOLEAN_TYPE;\n typeArray0[5] = type5;\n Type type6 = Type.VOID_TYPE;\n Type type7 = Type.BOOLEAN_TYPE;\n Type type8 = Type.FLOAT_TYPE;\n Type type9 = Type.SHORT_TYPE;\n ClassWriter classWriter0 = new ClassWriter(9);\n Item item0 = classWriter0.key2;\n Item item1 = new Item((-1541));\n // Undeclared exception!\n try { \n frame0.execute(9, 0, (ClassWriter) null, item1);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "private final void zzR(Object var1_1, zzha var2_2) {\n block94: {\n var3_3 = this;\n var4_4 = var1_1;\n var5_5 = var2_2;\n var6_6 = this.zzh;\n if (var6_6 != 0) break block94;\n var7_7 = this.zzc;\n var6_6 = ((int[])var7_7).length;\n var8_8 = zzja.zzb;\n var9_9 = 1048575;\n var10_10 = 1.469367E-39f;\n var11_11 = var9_9;\n var13_13 = 0;\n for (var12_12 = 0; var12_12 < var6_6; var12_12 += 3) {\n block95: {\n var14_14 = var3_3.zzA(var12_12);\n var15_15 = var3_3.zzc;\n var16_16 = var15_15[var12_12];\n var17_17 = zzja.zzC(var14_14);\n var18_18 = 17;\n var19_19 = 1;\n if (var17_17 <= var18_18) {\n var20_20 = var3_3.zzc;\n var21_21 = var12_12 + 2;\n var18_18 = var20_20[var21_21];\n if ((var21_21 = var18_18 & var9_9) != var11_11) {\n var22_22 = var21_21;\n var13_13 = var8_8.getInt(var4_4, var22_22);\n var11_11 = var21_21;\n }\n var18_18 >>>= 20;\n var18_18 = var19_19 << var18_18;\n } else {\n var18_18 = 0;\n var20_20 = null;\n }\n var24_23 = var14_14 &= var9_9;\n switch (var17_17) lbl-1000:\n // 56 sources\n\n {\n default: {\n var17_17 = 0;\n break block95;\n }\n case 68: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var26_24 = var8_8.getObject(var4_4, var24_23);\n var27_25 = var3_3.zzv(var12_12);\n var5_5.zzs(var16_16, var26_24, var27_25);\n ** GOTO lbl-1000\n }\n case 67: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var24_23 = zzja.zzG(var4_4, var24_23);\n var5_5.zzq(var16_16, var24_23);\n ** GOTO lbl-1000\n }\n case 66: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var9_9 = zzja.zzF(var4_4, var24_23);\n var5_5.zzp(var16_16, var9_9);\n ** GOTO lbl-1000\n }\n case 65: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var24_23 = zzja.zzG(var4_4, var24_23);\n var5_5.zzd(var16_16, var24_23);\n ** GOTO lbl-1000\n }\n case 64: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var9_9 = zzja.zzF(var4_4, var24_23);\n var5_5.zzb(var16_16, var9_9);\n ** GOTO lbl-1000\n }\n case 63: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var9_9 = zzja.zzF(var4_4, var24_23);\n var5_5.zzg(var16_16, var9_9);\n ** GOTO lbl-1000\n }\n case 62: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var9_9 = zzja.zzF(var4_4, var24_23);\n var5_5.zzo(var16_16, var9_9);\n ** GOTO lbl-1000\n }\n case 61: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var26_24 = (zzgs)var8_8.getObject(var4_4, var24_23);\n var5_5.zzn(var16_16, (zzgs)var26_24);\n ** GOTO lbl-1000\n }\n case 60: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var26_24 = var8_8.getObject(var4_4, var24_23);\n var27_25 = var3_3.zzv(var12_12);\n var5_5.zzr(var16_16, var26_24, var27_25);\n ** GOTO lbl-1000\n }\n case 59: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var26_24 = var8_8.getObject(var4_4, var24_23);\n zzja.zzT(var16_16, var26_24, var5_5);\n ** GOTO lbl-1000\n }\n case 58: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var9_9 = (int)zzja.zzH(var4_4, var24_23);\n var5_5.zzl(var16_16, (boolean)var9_9);\n ** GOTO lbl-1000\n }\n case 57: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var9_9 = zzja.zzF(var4_4, var24_23);\n var5_5.zzk(var16_16, var9_9);\n ** GOTO lbl-1000\n }\n case 56: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var24_23 = zzja.zzG(var4_4, var24_23);\n var5_5.zzj(var16_16, var24_23);\n ** GOTO lbl-1000\n }\n case 55: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var9_9 = zzja.zzF(var4_4, var24_23);\n var5_5.zzi(var16_16, var9_9);\n ** GOTO lbl-1000\n }\n case 54: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var24_23 = zzja.zzG(var4_4, var24_23);\n var5_5.zzh(var16_16, var24_23);\n ** GOTO lbl-1000\n }\n case 53: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var24_23 = zzja.zzG(var4_4, var24_23);\n var5_5.zzc(var16_16, var24_23);\n ** GOTO lbl-1000\n }\n case 52: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var10_10 = zzja.zzE(var4_4, var24_23);\n var5_5.zze(var16_16, var10_10);\n ** GOTO lbl-1000\n }\n case 51: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var28_26 = zzja.zzD(var4_4, var24_23);\n var5_5.zzf(var16_16, var28_26);\n ** GOTO lbl-1000\n }\n case 50: {\n var26_24 = var8_8.getObject(var4_4, var24_23);\n var3_3.zzS(var5_5, var16_16, var26_24, var12_12);\n ** GOTO lbl-1000\n }\n case 49: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n var27_25 = var3_3.zzv(var12_12);\n zzjk.zzaa(var14_14, (List)var26_24, var5_5, var27_25);\n ** GOTO lbl-1000\n }\n case 48: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzN(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 47: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzS(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 46: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzP(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 45: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzU(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 44: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzV(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 43: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzR(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 42: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzW(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 41: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzT(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 40: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzO(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 39: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzQ(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 38: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzM(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 37: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzL(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 36: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzK(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 35: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzJ(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 34: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n var16_16 = 0;\n var15_15 = null;\n zzjk.zzN(var14_14, (List)var26_24, var5_5, false);\n ** GOTO lbl290\n }\n case 33: {\n var16_16 = 0;\n var15_15 = null;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzS(var14_14, (List)var26_24, var5_5, false);\n ** GOTO lbl290\n }\n case 32: {\n var16_16 = 0;\n var15_15 = null;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzP(var14_14, (List)var26_24, var5_5, false);\n ** GOTO lbl290\n }\n case 31: {\n var16_16 = 0;\n var15_15 = null;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzU(var14_14, (List)var26_24, var5_5, false);\n ** GOTO lbl290\n }\n case 30: {\n var16_16 = 0;\n var15_15 = null;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzV(var14_14, (List)var26_24, var5_5, false);\n ** GOTO lbl290\n }\n case 29: {\n var16_16 = 0;\n var15_15 = null;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzR(var14_14, (List)var26_24, var5_5, false);\nlbl290:\n // 6 sources\n\n var17_17 = 0;\n break block95;\n }\n case 28: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzY(var14_14, (List)var26_24, var5_5);\n ** GOTO lbl-1000\n }\n case 27: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n var27_25 = var3_3.zzv(var12_12);\n zzjk.zzZ(var14_14, (List)var26_24, var5_5, var27_25);\n ** GOTO lbl-1000\n }\n case 26: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzX(var14_14, (List)var26_24, var5_5);\n ** GOTO lbl-1000\n }\n case 25: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n var17_17 = 0;\n zzjk.zzW(var14_14, (List)var26_24, var5_5, false);\n break block95;\n }\n case 24: {\n var17_17 = 0;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzT(var14_14, (List)var26_24, var5_5, false);\n break block95;\n }\n case 23: {\n var17_17 = 0;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzO(var14_14, (List)var26_24, var5_5, false);\n break block95;\n }\n case 22: {\n var17_17 = 0;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzQ(var14_14, (List)var26_24, var5_5, false);\n break block95;\n }\n case 21: {\n var17_17 = 0;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzM(var14_14, (List)var26_24, var5_5, false);\n break block95;\n }\n case 20: {\n var17_17 = 0;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzL(var14_14, (List)var26_24, var5_5, false);\n break block95;\n }\n case 19: {\n var17_17 = 0;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzK(var14_14, (List)var26_24, var5_5, false);\n break block95;\n }\n case 18: {\n var17_17 = 0;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzJ(var14_14, (List)var26_24, var5_5, false);\n break block95;\n }\n case 17: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var26_24 = var8_8.getObject(var4_4, var24_23);\n var27_25 = var3_3.zzv(var12_12);\n var5_5.zzs(var16_16, var26_24, var27_25);\n }\n break block95;\n }\n case 16: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var24_23 = var8_8.getLong(var4_4, var24_23);\n var5_5.zzq(var16_16, var24_23);\n }\n break block95;\n }\n case 15: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var9_9 = var8_8.getInt(var4_4, var24_23);\n var5_5.zzp(var16_16, var9_9);\n }\n break block95;\n }\n case 14: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var24_23 = var8_8.getLong(var4_4, var24_23);\n var5_5.zzd(var16_16, var24_23);\n }\n break block95;\n }\n case 13: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var9_9 = var8_8.getInt(var4_4, var24_23);\n var5_5.zzb(var16_16, var9_9);\n }\n break block95;\n }\n case 12: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var9_9 = var8_8.getInt(var4_4, var24_23);\n var5_5.zzg(var16_16, var9_9);\n }\n break block95;\n }\n case 11: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var9_9 = var8_8.getInt(var4_4, var24_23);\n var5_5.zzo(var16_16, var9_9);\n }\n break block95;\n }\n case 10: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var26_24 = (zzgs)var8_8.getObject(var4_4, var24_23);\n var5_5.zzn(var16_16, (zzgs)var26_24);\n }\n break block95;\n }\n case 9: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var26_24 = var8_8.getObject(var4_4, var24_23);\n var27_25 = var3_3.zzv(var12_12);\n var5_5.zzr(var16_16, var26_24, var27_25);\n }\n break block95;\n }\n case 8: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var26_24 = var8_8.getObject(var4_4, var24_23);\n zzja.zzT(var16_16, var26_24, var5_5);\n }\n break block95;\n }\n case 7: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var9_9 = (int)zzkh.zzh(var4_4, var24_23);\n var5_5.zzl(var16_16, (boolean)var9_9);\n }\n break block95;\n }\n case 6: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var9_9 = var8_8.getInt(var4_4, var24_23);\n var5_5.zzk(var16_16, var9_9);\n }\n break block95;\n }\n case 5: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var24_23 = var8_8.getLong(var4_4, var24_23);\n var5_5.zzj(var16_16, var24_23);\n }\n break block95;\n }\n case 4: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var9_9 = var8_8.getInt(var4_4, var24_23);\n var5_5.zzi(var16_16, var9_9);\n }\n break block95;\n }\n case 3: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var24_23 = var8_8.getLong(var4_4, var24_23);\n var5_5.zzh(var16_16, var24_23);\n }\n break block95;\n }\n case 2: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var24_23 = var8_8.getLong(var4_4, var24_23);\n var5_5.zzc(var16_16, var24_23);\n }\n break block95;\n }\n case 1: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var10_10 = zzkh.zzj(var4_4, var24_23);\n var5_5.zze(var16_16, var10_10);\n }\n break block95;\n }\n case 0: \n }\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var28_26 = zzkh.zzl(var4_4, var24_23);\n var5_5.zzf(var16_16, var28_26);\n }\n }\n var9_9 = 1048575;\n var10_10 = 1.469367E-39f;\n }\n var7_7 = var3_3.zzn;\n var4_4 = var7_7.zzd(var4_4);\n var7_7.zzi(var4_4, var5_5);\n return;\n }\n this.zzo.zzb(var1_1);\n throw null;\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n Frame frame0 = new Frame();\n Class<String> class0 = String.class;\n Type.getType(class0);\n Type.getType(class0);\n Type.getObjectType(\"The prefix must not be null\");\n Type type0 = Type.INT_TYPE;\n ClassWriter classWriter0 = new ClassWriter(1093);\n Item item0 = classWriter0.newFieldItem(\"%B\\\"F$,FHLc-:\", \"%B\\\"F$,FHLc-:\", \"%B\\\"F$,FHLc-:\");\n classWriter0.toByteArray();\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n // Undeclared exception!\n try { \n frame0.execute(153, 3176, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test055() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n ClassWriter classWriter1 = new ClassWriter(2);\n Type type0 = Type.VOID_TYPE;\n Class<Integer> class0 = Integer.class;\n Class<Object> class1 = Object.class;\n Type type1 = Type.getType(class1);\n Type.getType(class0);\n Type type2 = Type.getObjectType(\"The prefix must not be null\");\n Type type3 = Type.INT_TYPE;\n Type[] typeArray0 = new Type[6];\n typeArray0[0] = type2;\n typeArray0[1] = type2;\n typeArray0[2] = type1;\n ClassWriter classWriter2 = new ClassWriter(5);\n Frame frame1 = new Frame();\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n Item item0 = classWriter1.newFieldItem(\"The prefix must not be null\", \"\", \"12x_\");\n frame0.execute(177, 8, classWriter2, item0);\n boolean boolean0 = FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"\");\n assertFalse(boolean0);\n }", "private String getAltBlockType() {\n\t\tString blockBase = (regSetProperties.getBaseName().isEmpty())? \"\" : \"_\" + regSetProperties.getBaseName();\n\t\treturn altModelRootType + blockBase; // TODO - make parameterizable, getAddressMapName() + \"_\" + regSetProperties.getBaseName() + \"_t\"\n\t}", "public void M(android.view.View r6) {\n /*\n r5 = this;\n r0 = \"v\";\n kotlin.jvm.internal.i.f(r6, r0);\n r6 = r5.this$0;\n r6 = r6.ayL;\n r0 = 0;\n if (r6 == 0) goto L_0x001a;\n L_0x000f:\n r6 = r6.Km();\n if (r6 == 0) goto L_0x001a;\n L_0x0015:\n r6 = r6.XA();\n goto L_0x001b;\n L_0x001a:\n r6 = r0;\n L_0x001b:\n if (r6 != 0) goto L_0x0020;\n L_0x001d:\n kotlin.jvm.internal.i.bnJ();\n L_0x0020:\n r1 = com.iqoption.deposit.light.menu.currency.c.cFb;\n r2 = new com.iqoption.deposit.c.a.b;\n r6 = (java.util.List) r6;\n r3 = r5.this$0;\n r3 = r3.cFE;\n if (r3 == 0) goto L_0x0037;\n L_0x002e:\n r3 = r3.getId();\n r3 = java.lang.Long.valueOf(r3);\n goto L_0x0038;\n L_0x0037:\n r3 = r0;\n L_0x0038:\n r2.<init>(r6, r3);\n r6 = r1.a(r2);\n r1 = com.iqoption.deposit.navigator.b.cGp;\n r2 = r5.this$0;\n r2 = (androidx.fragment.app.Fragment) r2;\n r1 = r1.P(r2);\n r2 = 0;\n r3 = 2;\n com.iqoption.core.ui.d.g.b(r1, r6, r2, r3, r0);\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.iqoption.deposit.light.perform.c$r.M(android.view.View):void\");\n }", "public void mo3613a() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r4 = this;\n r0 = r4.f18081b;\n monitor-enter(r0);\n r1 = r4.f18080a;\t Catch:{ all -> 0x001f }\n if (r1 == 0) goto L_0x0009;\t Catch:{ all -> 0x001f }\n L_0x0007:\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n return;\t Catch:{ all -> 0x001f }\n L_0x0009:\n r1 = 1;\t Catch:{ all -> 0x001f }\n r4.f18080a = r1;\t Catch:{ all -> 0x001f }\n r2 = r4.f18081b;\t Catch:{ all -> 0x001f }\n r3 = r2.f12200d;\t Catch:{ all -> 0x001f }\n r3 = r3 + r1;\t Catch:{ all -> 0x001f }\n r2.f12200d = r3;\t Catch:{ all -> 0x001f }\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n r0 = r4.f18083d;\n okhttp3.internal.C2933c.m14194a(r0);\n r0 = r4.f18082c;\t Catch:{ IOException -> 0x001e }\n r0.m14100c();\t Catch:{ IOException -> 0x001e }\n L_0x001e:\n return;\n L_0x001f:\n r1 = move-exception;\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.c.a.a():void\");\n }", "protected GEDCOMType() {/* intentionally empty block */}", "private static boolean checkSimpleDerivation(XSSimpleType derived, XSSimpleType base, short block) {\n/* 188 */ if (derived == base) {\n/* 189 */ return true;\n/* */ }\n/* */ \n/* */ \n/* 193 */ if ((block & 0x2) != 0 || (derived\n/* 194 */ .getBaseType().getFinal() & 0x2) != 0) {\n/* 195 */ return false;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 200 */ XSSimpleType directBase = (XSSimpleType)derived.getBaseType();\n/* 201 */ if (directBase == base) {\n/* 202 */ return true;\n/* */ }\n/* */ \n/* 205 */ if (directBase != SchemaGrammar.fAnySimpleType && \n/* 206 */ checkSimpleDerivation(directBase, base, block)) {\n/* 207 */ return true;\n/* */ }\n/* */ \n/* */ \n/* 211 */ if ((derived.getVariety() == 2 || derived\n/* 212 */ .getVariety() == 3) && base == SchemaGrammar.fAnySimpleType)\n/* */ {\n/* 214 */ return true;\n/* */ }\n/* */ \n/* */ \n/* 218 */ if (base.getVariety() == 3) {\n/* 219 */ XSObjectList subUnionMemberDV = base.getMemberTypes();\n/* 220 */ int subUnionSize = subUnionMemberDV.getLength();\n/* 221 */ for (int i = 0; i < subUnionSize; i++) {\n/* 222 */ base = (XSSimpleType)subUnionMemberDV.item(i);\n/* 223 */ if (checkSimpleDerivation(derived, base, block)) {\n/* 224 */ return true;\n/* */ }\n/* */ } \n/* */ } \n/* 228 */ return false;\n/* */ }", "public int c(Block parambec)\r\n/* 119: */ {\r\n/* 120:131 */ return 0;\r\n/* 121: */ }" ]
[ "0.6069195", "0.6032226", "0.59744185", "0.59239256", "0.58839023", "0.5856266", "0.58367467", "0.57998174", "0.5795995", "0.57110846", "0.570009", "0.56880057", "0.56494164", "0.55858225", "0.5565508", "0.5560902", "0.55263764", "0.5524576", "0.5500021", "0.54616815", "0.5459261", "0.54452604", "0.54301816", "0.5421701", "0.54123247", "0.5411247", "0.5376076", "0.53664243", "0.53658277", "0.53593636", "0.535106", "0.53469115", "0.53403246", "0.5329857", "0.53252876", "0.53198177", "0.5316725", "0.5314152", "0.53082347", "0.5305368", "0.530243", "0.52994084", "0.52976775", "0.5294775", "0.5274083", "0.5273926", "0.52703327", "0.52679574", "0.52676976", "0.5262708", "0.526138", "0.5255832", "0.5254894", "0.5253143", "0.524679", "0.5245648", "0.52337134", "0.52236867", "0.52229017", "0.52198285", "0.52191746", "0.5218252", "0.52074194", "0.52051723", "0.52032125", "0.51913124", "0.5186786", "0.5184434", "0.5181793", "0.5181358", "0.51796526", "0.5172051", "0.51698685", "0.5168787", "0.51682895", "0.5166538", "0.5165016", "0.51633227", "0.51631355", "0.5163135", "0.5159091", "0.51577073", "0.51525104", "0.5146948", "0.5146514", "0.51418656", "0.5134845", "0.5132525", "0.5131571", "0.51313025", "0.5131033", "0.5124042", "0.51180947", "0.51025283", "0.5095886", "0.50934356", "0.50931895", "0.5091679", "0.50904804", "0.5090096" ]
0.5738375
9
/ JADX WARNING: Code restructure failed: missing block: B:5:0x0012, code lost: r0 = r0.getSuperTypeRepresentative();
@org.jetbrains.annotations.NotNull /* Code decompiled incorrectly, please refer to instructions dump. */ public static final kotlin.reflect.jvm.internal.impl.types.KotlinType getSupertypeRepresentative(@org.jetbrains.annotations.NotNull kotlin.reflect.jvm.internal.impl.types.KotlinType r2) { /* java.lang.String r0 = "$this$getSupertypeRepresentative" kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull(r2, r0) kotlin.reflect.jvm.internal.impl.types.UnwrappedType r0 = r2.unwrap() boolean r1 = r0 instanceof kotlin.reflect.jvm.internal.impl.types.SubtypingRepresentatives if (r1 != 0) goto L_0x000e r0 = 0 L_0x000e: kotlin.reflect.jvm.internal.impl.types.SubtypingRepresentatives r0 = (kotlin.reflect.jvm.internal.impl.types.SubtypingRepresentatives) r0 if (r0 == 0) goto L_0x0019 kotlin.reflect.jvm.internal.impl.types.KotlinType r0 = r0.getSuperTypeRepresentative() if (r0 == 0) goto L_0x0019 r2 = r0 L_0x0019: return r2 */ throw new UnsupportedOperationException("Method not decompiled: kotlin.reflect.jvm.internal.impl.types.TypeCapabilitiesKt.getSupertypeRepresentative(kotlin.reflect.jvm.internal.impl.types.KotlinType):kotlin.reflect.jvm.internal.impl.types.KotlinType"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected final com.p111d.p112a.p121c.p134k.C7119d m3865a(com.p111d.p112a.p121c.aa r14, com.p111d.p112a.p121c.p128f.C1451n r15, com.p111d.p112a.p121c.C5354j r16, com.p111d.p112a.p121c.C1545o<?> r17, com.p111d.p112a.p121c.p131i.C1478f r18, com.p111d.p112a.p121c.p131i.C1478f r19, com.p111d.p112a.p121c.p128f.C5328e r20, boolean r21) {\n /*\n r13 = this;\n r0 = r13;\n r5 = r16;\n r1 = r19;\n r11 = r20;\n r2 = r0.f4676d;\n r3 = r0.f4673a;\n r2 = r2.refineSerializationType(r3, r11, r5);\n r3 = 1;\n if (r2 == r5) goto L_0x0058;\n L_0x0012:\n r4 = r2.m11531e();\n r6 = r16.m11531e();\n r7 = r4.isAssignableFrom(r6);\n if (r7 != 0) goto L_0x0056;\n L_0x0020:\n r7 = r6.isAssignableFrom(r4);\n if (r7 != 0) goto L_0x0056;\n L_0x0026:\n r1 = new java.lang.IllegalArgumentException;\n r2 = new java.lang.StringBuilder;\n r3 = \"Illegal concrete-type annotation for method '\";\n r2.<init>(r3);\n r3 = r20.mo1360b();\n r2.append(r3);\n r3 = \"': class \";\n r2.append(r3);\n r3 = r4.getName();\n r2.append(r3);\n r3 = \" not a super-type of (declared) class \";\n r2.append(r3);\n r3 = r6.getName();\n r2.append(r3);\n r2 = r2.toString();\n r1.<init>(r2);\n throw r1;\n L_0x0056:\n r4 = r3;\n goto L_0x005b;\n L_0x0058:\n r4 = r21;\n r2 = r5;\n L_0x005b:\n r6 = r0.f4676d;\n r6 = r6.findSerializationTyping(r11);\n r7 = 0;\n if (r6 == 0) goto L_0x006f;\n L_0x0064:\n r8 = com.p111d.p112a.p121c.p122a.C1397f.C1396b.DEFAULT_TYPING;\n if (r6 == r8) goto L_0x006f;\n L_0x0068:\n r4 = com.p111d.p112a.p121c.p122a.C1397f.C1396b.STATIC;\n if (r6 != r4) goto L_0x006e;\n L_0x006c:\n r4 = r3;\n goto L_0x006f;\n L_0x006e:\n r4 = r7;\n L_0x006f:\n r6 = 0;\n if (r4 == 0) goto L_0x0077;\n L_0x0072:\n r2 = r2.mo3385d();\n goto L_0x0078;\n L_0x0077:\n r2 = r6;\n L_0x0078:\n if (r1 == 0) goto L_0x00bc;\n L_0x007a:\n if (r2 != 0) goto L_0x007d;\n L_0x007c:\n r2 = r5;\n L_0x007d:\n r4 = r2.mo3394u();\n if (r4 != 0) goto L_0x00b6;\n L_0x0083:\n r1 = new java.lang.IllegalStateException;\n r3 = new java.lang.StringBuilder;\n r4 = \"Problem trying to create BeanPropertyWriter for property '\";\n r3.<init>(r4);\n r4 = r15.mo1398a();\n r3.append(r4);\n r4 = \"' (of type \";\n r3.append(r4);\n r4 = r0.f4674b;\n r4 = r4.m3615a();\n r3.append(r4);\n r4 = \"); serialization type \";\n r3.append(r4);\n r3.append(r2);\n r2 = \" has no content\";\n r3.append(r2);\n r2 = r3.toString();\n r1.<init>(r2);\n throw r1;\n L_0x00b6:\n r1 = r2.mo3383b(r1);\n r8 = r1;\n goto L_0x00bd;\n L_0x00bc:\n r8 = r2;\n L_0x00bd:\n r1 = r0.f4675c;\n r2 = r15.mo1423y();\n r1 = r1.m3138a(r2);\n r1 = r1.m3139b();\n r2 = com.p111d.p112a.p113a.C1329q.C1327a.USE_DEFAULTS;\n if (r1 != r2) goto L_0x00d1;\n L_0x00cf:\n r1 = com.p111d.p112a.p113a.C1329q.C1327a.ALWAYS;\n L_0x00d1:\n r2 = com.p111d.p112a.p121c.p134k.C1501m.C15001.f4671a;\n r1 = r1.ordinal();\n r1 = r2[r1];\n switch(r1) {\n case 1: goto L_0x00ef;\n case 2: goto L_0x00e5;\n case 3: goto L_0x00df;\n case 4: goto L_0x00dd;\n default: goto L_0x00dc;\n };\n L_0x00dc:\n goto L_0x0127;\n L_0x00dd:\n r7 = r3;\n goto L_0x0127;\n L_0x00df:\n r1 = com.p111d.p112a.p121c.p134k.C7119d.f20265c;\n L_0x00e1:\n r10 = r1;\n r9 = r3;\n goto L_0x013d;\n L_0x00e5:\n r1 = r16.mo3560a();\n if (r1 == 0) goto L_0x00ec;\n L_0x00eb:\n goto L_0x00df;\n L_0x00ec:\n r9 = r3;\n r10 = r6;\n goto L_0x013d;\n L_0x00ef:\n if (r8 != 0) goto L_0x00f3;\n L_0x00f1:\n r1 = r5;\n goto L_0x00f4;\n L_0x00f3:\n r1 = r8;\n L_0x00f4:\n r2 = r0.f4675c;\n r2 = r2.m3139b();\n r4 = com.p111d.p112a.p113a.C1329q.C1327a.NON_DEFAULT;\n if (r2 != r4) goto L_0x0107;\n L_0x00fe:\n r2 = r15.mo1398a();\n r1 = r0.m3864a(r2, r11, r1);\n goto L_0x010b;\n L_0x0107:\n r1 = com.p111d.p112a.p121c.p134k.C1501m.m3863a(r1);\n L_0x010b:\n if (r1 != 0) goto L_0x010e;\n L_0x010d:\n goto L_0x00e1;\n L_0x010e:\n r2 = r1.getClass();\n r2 = r2.isArray();\n if (r2 == 0) goto L_0x0139;\n L_0x0118:\n r2 = java.lang.reflect.Array.getLength(r1);\n r3 = r1.getClass();\n r4 = new com.d.a.c.m.b$1;\n r4.<init>(r3, r2, r1);\n r10 = r4;\n goto L_0x013c;\n L_0x0127:\n r1 = r16.mo3391n();\n if (r1 == 0) goto L_0x013b;\n L_0x012d:\n r1 = r0.f4673a;\n r2 = com.p111d.p112a.p121c.C5387z.WRITE_EMPTY_JSON_ARRAYS;\n r1 = r1.m18737a(r2);\n if (r1 != 0) goto L_0x013b;\n L_0x0137:\n r1 = com.p111d.p112a.p121c.p134k.C7119d.f20265c;\n L_0x0139:\n r10 = r1;\n goto L_0x013c;\n L_0x013b:\n r10 = r6;\n L_0x013c:\n r9 = r7;\n L_0x013d:\n r12 = new com.d.a.c.k.d;\n r1 = r0.f4674b;\n r4 = r1.mo1376f();\n r1 = r12;\n r2 = r15;\n r3 = r11;\n r6 = r17;\n r7 = r18;\n r1.<init>(r2, r3, r4, r5, r6, r7, r8, r9, r10);\n r1 = r0.f4676d;\n r1 = r1.findNullSerializer(r11);\n if (r1 == 0) goto L_0x015f;\n L_0x0157:\n r2 = r14;\n r1 = r2.mo2929c(r1);\n r12.mo3537b(r1);\n L_0x015f:\n r1 = r0.f4676d;\n r1 = r1.findUnwrappingNameTransformer(r11);\n if (r1 == 0) goto L_0x016d;\n L_0x0167:\n r2 = new com.d.a.c.k.a.r;\n r2.<init>(r12, r1);\n r12 = r2;\n L_0x016d:\n return r12;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.d.a.c.k.m.a(com.d.a.c.aa, com.d.a.c.f.n, com.d.a.c.j, com.d.a.c.o, com.d.a.c.i.f, com.d.a.c.i.f, com.d.a.c.f.e, boolean):com.d.a.c.k.d\");\n }", "private final com.google.android.finsky.verifier.p259a.p260a.C4709m m21920b(com.google.protobuf.nano.a r7) {\n /*\n r6 = this;\n L_0x0000:\n r0 = r7.a();\n switch(r0) {\n case 0: goto L_0x000d;\n case 10: goto L_0x000e;\n case 16: goto L_0x0015;\n case 26: goto L_0x0046;\n case 34: goto L_0x0053;\n default: goto L_0x0007;\n };\n L_0x0007:\n r0 = super.m4918a(r7, r0);\n if (r0 != 0) goto L_0x0000;\n L_0x000d:\n return r6;\n L_0x000e:\n r0 = r7.f();\n r6.f24221c = r0;\n goto L_0x0000;\n L_0x0015:\n r1 = r7.o();\n r2 = r7.i();\t Catch:{ IllegalArgumentException -> 0x003b }\n switch(r2) {\n case 0: goto L_0x0043;\n case 1: goto L_0x0020;\n case 2: goto L_0x0043;\n default: goto L_0x0020;\n };\t Catch:{ IllegalArgumentException -> 0x003b }\n L_0x0020:\n r3 = new java.lang.IllegalArgumentException;\t Catch:{ IllegalArgumentException -> 0x003b }\n r4 = 44;\n r5 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x003b }\n r5.<init>(r4);\t Catch:{ IllegalArgumentException -> 0x003b }\n r2 = r5.append(r2);\t Catch:{ IllegalArgumentException -> 0x003b }\n r4 = \" is not a valid enum ResourceType\";\n r2 = r2.append(r4);\t Catch:{ IllegalArgumentException -> 0x003b }\n r2 = r2.toString();\t Catch:{ IllegalArgumentException -> 0x003b }\n r3.<init>(r2);\t Catch:{ IllegalArgumentException -> 0x003b }\n throw r3;\t Catch:{ IllegalArgumentException -> 0x003b }\n L_0x003b:\n r2 = move-exception;\n r7.e(r1);\n r6.m4918a(r7, r0);\n goto L_0x0000;\n L_0x0043:\n r6.f24222d = r2;\t Catch:{ IllegalArgumentException -> 0x003b }\n goto L_0x0000;\n L_0x0046:\n r0 = r7.g();\n r6.f24223e = r0;\n r0 = r6.f24220b;\n r0 = r0 | 1;\n r6.f24220b = r0;\n goto L_0x0000;\n L_0x0053:\n r0 = r7.f();\n r6.f24224f = r0;\n r0 = r6.f24220b;\n r0 = r0 | 2;\n r6.f24220b = r0;\n goto L_0x0000;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.finsky.verifier.a.a.m.b(com.google.protobuf.nano.a):com.google.android.finsky.verifier.a.a.m\");\n }", "private final com.google.android.p306h.p307a.p308a.C5685v m26927b(com.google.protobuf.nano.a r7) {\n /*\n r6 = this;\n L_0x0000:\n r0 = r7.a();\n switch(r0) {\n case 0: goto L_0x000d;\n case 8: goto L_0x000e;\n case 18: goto L_0x0043;\n case 24: goto L_0x0054;\n case 32: goto L_0x005f;\n case 42: goto L_0x006a;\n default: goto L_0x0007;\n };\n L_0x0007:\n r0 = super.m4918a(r7, r0);\n if (r0 != 0) goto L_0x0000;\n L_0x000d:\n return r6;\n L_0x000e:\n r1 = r7.o();\n r2 = r7.i();\t Catch:{ IllegalArgumentException -> 0x0034 }\n switch(r2) {\n case 0: goto L_0x003c;\n case 1: goto L_0x003c;\n case 2: goto L_0x003c;\n case 3: goto L_0x003c;\n case 4: goto L_0x003c;\n case 5: goto L_0x003c;\n case 101: goto L_0x003c;\n case 102: goto L_0x003c;\n case 103: goto L_0x003c;\n case 104: goto L_0x003c;\n case 105: goto L_0x003c;\n case 106: goto L_0x003c;\n case 107: goto L_0x003c;\n case 108: goto L_0x003c;\n case 201: goto L_0x003c;\n case 202: goto L_0x003c;\n case 203: goto L_0x003c;\n case 204: goto L_0x003c;\n case 205: goto L_0x003c;\n case 206: goto L_0x003c;\n case 207: goto L_0x003c;\n case 208: goto L_0x003c;\n case 209: goto L_0x003c;\n case 301: goto L_0x003c;\n case 302: goto L_0x003c;\n case 303: goto L_0x003c;\n case 304: goto L_0x003c;\n case 305: goto L_0x003c;\n case 306: goto L_0x003c;\n case 307: goto L_0x003c;\n case 401: goto L_0x003c;\n case 402: goto L_0x003c;\n case 403: goto L_0x003c;\n case 404: goto L_0x003c;\n case 501: goto L_0x003c;\n case 502: goto L_0x003c;\n case 503: goto L_0x003c;\n case 504: goto L_0x003c;\n case 601: goto L_0x003c;\n case 602: goto L_0x003c;\n case 603: goto L_0x003c;\n case 604: goto L_0x003c;\n case 605: goto L_0x003c;\n case 606: goto L_0x003c;\n case 607: goto L_0x003c;\n case 608: goto L_0x003c;\n case 609: goto L_0x003c;\n case 610: goto L_0x003c;\n case 611: goto L_0x003c;\n case 612: goto L_0x003c;\n case 613: goto L_0x003c;\n case 614: goto L_0x003c;\n case 615: goto L_0x003c;\n case 616: goto L_0x003c;\n case 617: goto L_0x003c;\n case 618: goto L_0x003c;\n case 619: goto L_0x003c;\n case 620: goto L_0x003c;\n case 621: goto L_0x003c;\n case 622: goto L_0x003c;\n case 623: goto L_0x003c;\n case 624: goto L_0x003c;\n case 625: goto L_0x003c;\n case 626: goto L_0x003c;\n case 627: goto L_0x003c;\n case 628: goto L_0x003c;\n case 629: goto L_0x003c;\n case 630: goto L_0x003c;\n case 631: goto L_0x003c;\n case 632: goto L_0x003c;\n case 633: goto L_0x003c;\n case 634: goto L_0x003c;\n case 635: goto L_0x003c;\n case 636: goto L_0x003c;\n case 637: goto L_0x003c;\n case 638: goto L_0x003c;\n case 639: goto L_0x003c;\n case 640: goto L_0x003c;\n case 641: goto L_0x003c;\n case 701: goto L_0x003c;\n case 702: goto L_0x003c;\n case 703: goto L_0x003c;\n case 704: goto L_0x003c;\n case 705: goto L_0x003c;\n case 706: goto L_0x003c;\n case 707: goto L_0x003c;\n case 708: goto L_0x003c;\n case 709: goto L_0x003c;\n case 710: goto L_0x003c;\n case 711: goto L_0x003c;\n case 712: goto L_0x003c;\n case 713: goto L_0x003c;\n case 714: goto L_0x003c;\n case 715: goto L_0x003c;\n case 716: goto L_0x003c;\n case 717: goto L_0x003c;\n case 718: goto L_0x003c;\n case 719: goto L_0x003c;\n case 720: goto L_0x003c;\n case 721: goto L_0x003c;\n case 722: goto L_0x003c;\n case 801: goto L_0x003c;\n case 802: goto L_0x003c;\n case 803: goto L_0x003c;\n case 901: goto L_0x003c;\n case 902: goto L_0x003c;\n case 903: goto L_0x003c;\n case 904: goto L_0x003c;\n case 905: goto L_0x003c;\n case 906: goto L_0x003c;\n case 907: goto L_0x003c;\n case 908: goto L_0x003c;\n case 909: goto L_0x003c;\n case 910: goto L_0x003c;\n case 911: goto L_0x003c;\n case 912: goto L_0x003c;\n case 1001: goto L_0x003c;\n case 1002: goto L_0x003c;\n case 1003: goto L_0x003c;\n case 1004: goto L_0x003c;\n case 1005: goto L_0x003c;\n case 1006: goto L_0x003c;\n case 1101: goto L_0x003c;\n case 1102: goto L_0x003c;\n case 1201: goto L_0x003c;\n case 1301: goto L_0x003c;\n case 1302: goto L_0x003c;\n case 1303: goto L_0x003c;\n case 1304: goto L_0x003c;\n case 1305: goto L_0x003c;\n case 1306: goto L_0x003c;\n case 1307: goto L_0x003c;\n case 1308: goto L_0x003c;\n case 1309: goto L_0x003c;\n case 1310: goto L_0x003c;\n case 1311: goto L_0x003c;\n case 1312: goto L_0x003c;\n case 1313: goto L_0x003c;\n case 1314: goto L_0x003c;\n case 1315: goto L_0x003c;\n case 1316: goto L_0x003c;\n case 1317: goto L_0x003c;\n case 1318: goto L_0x003c;\n case 1319: goto L_0x003c;\n case 1320: goto L_0x003c;\n case 1321: goto L_0x003c;\n case 1322: goto L_0x003c;\n case 1323: goto L_0x003c;\n case 1324: goto L_0x003c;\n case 1325: goto L_0x003c;\n case 1326: goto L_0x003c;\n case 1327: goto L_0x003c;\n case 1328: goto L_0x003c;\n case 1329: goto L_0x003c;\n case 1330: goto L_0x003c;\n case 1331: goto L_0x003c;\n case 1332: goto L_0x003c;\n case 1333: goto L_0x003c;\n case 1334: goto L_0x003c;\n case 1335: goto L_0x003c;\n case 1336: goto L_0x003c;\n case 1337: goto L_0x003c;\n case 1338: goto L_0x003c;\n case 1339: goto L_0x003c;\n case 1340: goto L_0x003c;\n case 1341: goto L_0x003c;\n case 1342: goto L_0x003c;\n case 1343: goto L_0x003c;\n case 1344: goto L_0x003c;\n case 1345: goto L_0x003c;\n case 1346: goto L_0x003c;\n case 1347: goto L_0x003c;\n case 1401: goto L_0x003c;\n case 1402: goto L_0x003c;\n case 1403: goto L_0x003c;\n case 1404: goto L_0x003c;\n case 1405: goto L_0x003c;\n case 1406: goto L_0x003c;\n case 1407: goto L_0x003c;\n case 1408: goto L_0x003c;\n case 1409: goto L_0x003c;\n case 1410: goto L_0x003c;\n case 1411: goto L_0x003c;\n case 1412: goto L_0x003c;\n case 1413: goto L_0x003c;\n case 1414: goto L_0x003c;\n case 1415: goto L_0x003c;\n case 1416: goto L_0x003c;\n case 1417: goto L_0x003c;\n case 1418: goto L_0x003c;\n case 1419: goto L_0x003c;\n case 1420: goto L_0x003c;\n case 1421: goto L_0x003c;\n case 1422: goto L_0x003c;\n case 1423: goto L_0x003c;\n case 1424: goto L_0x003c;\n case 1425: goto L_0x003c;\n case 1426: goto L_0x003c;\n case 1427: goto L_0x003c;\n case 1601: goto L_0x003c;\n case 1602: goto L_0x003c;\n case 1603: goto L_0x003c;\n case 1604: goto L_0x003c;\n case 1605: goto L_0x003c;\n case 1606: goto L_0x003c;\n case 1607: goto L_0x003c;\n case 1608: goto L_0x003c;\n case 1609: goto L_0x003c;\n case 1610: goto L_0x003c;\n case 1611: goto L_0x003c;\n case 1612: goto L_0x003c;\n case 1613: goto L_0x003c;\n case 1614: goto L_0x003c;\n case 1615: goto L_0x003c;\n case 1616: goto L_0x003c;\n case 1617: goto L_0x003c;\n case 1618: goto L_0x003c;\n case 1619: goto L_0x003c;\n case 1620: goto L_0x003c;\n case 1621: goto L_0x003c;\n case 1622: goto L_0x003c;\n case 1623: goto L_0x003c;\n case 1624: goto L_0x003c;\n case 1625: goto L_0x003c;\n case 1626: goto L_0x003c;\n case 1627: goto L_0x003c;\n case 1628: goto L_0x003c;\n case 1629: goto L_0x003c;\n case 1630: goto L_0x003c;\n case 1631: goto L_0x003c;\n case 1632: goto L_0x003c;\n case 1633: goto L_0x003c;\n case 1634: goto L_0x003c;\n case 1635: goto L_0x003c;\n case 1636: goto L_0x003c;\n case 1637: goto L_0x003c;\n case 1638: goto L_0x003c;\n case 1639: goto L_0x003c;\n case 1640: goto L_0x003c;\n case 1641: goto L_0x003c;\n case 1642: goto L_0x003c;\n case 1643: goto L_0x003c;\n case 1644: goto L_0x003c;\n case 1645: goto L_0x003c;\n case 1646: goto L_0x003c;\n case 1647: goto L_0x003c;\n case 1648: goto L_0x003c;\n case 1649: goto L_0x003c;\n case 1650: goto L_0x003c;\n case 1651: goto L_0x003c;\n case 1652: goto L_0x003c;\n case 1653: goto L_0x003c;\n case 1654: goto L_0x003c;\n case 1655: goto L_0x003c;\n case 1656: goto L_0x003c;\n case 1657: goto L_0x003c;\n case 1658: goto L_0x003c;\n case 1659: goto L_0x003c;\n case 1660: goto L_0x003c;\n case 1801: goto L_0x003c;\n case 1802: goto L_0x003c;\n case 1803: goto L_0x003c;\n case 1804: goto L_0x003c;\n case 1805: goto L_0x003c;\n case 1806: goto L_0x003c;\n case 1807: goto L_0x003c;\n case 1808: goto L_0x003c;\n case 1809: goto L_0x003c;\n case 1810: goto L_0x003c;\n case 1811: goto L_0x003c;\n case 1812: goto L_0x003c;\n case 1813: goto L_0x003c;\n case 1814: goto L_0x003c;\n case 1815: goto L_0x003c;\n case 1816: goto L_0x003c;\n case 1817: goto L_0x003c;\n case 1901: goto L_0x003c;\n case 1902: goto L_0x003c;\n case 1903: goto L_0x003c;\n case 1904: goto L_0x003c;\n case 1905: goto L_0x003c;\n case 1906: goto L_0x003c;\n case 1907: goto L_0x003c;\n case 1908: goto L_0x003c;\n case 1909: goto L_0x003c;\n case 2001: goto L_0x003c;\n case 2101: goto L_0x003c;\n case 2102: goto L_0x003c;\n case 2103: goto L_0x003c;\n case 2104: goto L_0x003c;\n case 2105: goto L_0x003c;\n case 2106: goto L_0x003c;\n case 2107: goto L_0x003c;\n case 2108: goto L_0x003c;\n case 2109: goto L_0x003c;\n case 2110: goto L_0x003c;\n case 2111: goto L_0x003c;\n case 2112: goto L_0x003c;\n case 2113: goto L_0x003c;\n case 2114: goto L_0x003c;\n case 2115: goto L_0x003c;\n case 2116: goto L_0x003c;\n case 2117: goto L_0x003c;\n case 2118: goto L_0x003c;\n case 2119: goto L_0x003c;\n case 2120: goto L_0x003c;\n case 2121: goto L_0x003c;\n case 2122: goto L_0x003c;\n case 2123: goto L_0x003c;\n case 2124: goto L_0x003c;\n case 2201: goto L_0x003c;\n case 2202: goto L_0x003c;\n case 2203: goto L_0x003c;\n case 2204: goto L_0x003c;\n case 2205: goto L_0x003c;\n case 2206: goto L_0x003c;\n case 2207: goto L_0x003c;\n case 2208: goto L_0x003c;\n case 2209: goto L_0x003c;\n case 2210: goto L_0x003c;\n case 2211: goto L_0x003c;\n case 2212: goto L_0x003c;\n case 2213: goto L_0x003c;\n case 2214: goto L_0x003c;\n case 2215: goto L_0x003c;\n case 2301: goto L_0x003c;\n case 2302: goto L_0x003c;\n case 2303: goto L_0x003c;\n case 2304: goto L_0x003c;\n case 2401: goto L_0x003c;\n case 2402: goto L_0x003c;\n case 2501: goto L_0x003c;\n case 2502: goto L_0x003c;\n case 2503: goto L_0x003c;\n case 2504: goto L_0x003c;\n case 2505: goto L_0x003c;\n case 2506: goto L_0x003c;\n case 2507: goto L_0x003c;\n case 2508: goto L_0x003c;\n case 2509: goto L_0x003c;\n case 2510: goto L_0x003c;\n case 2511: goto L_0x003c;\n case 2512: goto L_0x003c;\n case 2513: goto L_0x003c;\n case 2514: goto L_0x003c;\n case 2515: goto L_0x003c;\n case 2516: goto L_0x003c;\n case 2517: goto L_0x003c;\n case 2518: goto L_0x003c;\n case 2519: goto L_0x003c;\n case 2601: goto L_0x003c;\n case 2602: goto L_0x003c;\n case 2701: goto L_0x003c;\n case 2702: goto L_0x003c;\n case 2703: goto L_0x003c;\n case 2704: goto L_0x003c;\n case 2705: goto L_0x003c;\n case 2706: goto L_0x003c;\n case 2707: goto L_0x003c;\n case 2801: goto L_0x003c;\n case 2802: goto L_0x003c;\n case 2803: goto L_0x003c;\n case 2804: goto L_0x003c;\n case 2805: goto L_0x003c;\n case 2806: goto L_0x003c;\n case 2807: goto L_0x003c;\n case 2808: goto L_0x003c;\n case 2809: goto L_0x003c;\n case 2810: goto L_0x003c;\n case 2811: goto L_0x003c;\n case 2812: goto L_0x003c;\n case 2813: goto L_0x003c;\n case 2814: goto L_0x003c;\n case 2815: goto L_0x003c;\n case 2816: goto L_0x003c;\n case 2817: goto L_0x003c;\n case 2818: goto L_0x003c;\n case 2819: goto L_0x003c;\n case 2820: goto L_0x003c;\n case 2821: goto L_0x003c;\n case 2822: goto L_0x003c;\n case 2823: goto L_0x003c;\n case 2824: goto L_0x003c;\n case 2825: goto L_0x003c;\n case 2826: goto L_0x003c;\n case 2901: goto L_0x003c;\n case 2902: goto L_0x003c;\n case 2903: goto L_0x003c;\n case 2904: goto L_0x003c;\n case 2905: goto L_0x003c;\n case 2906: goto L_0x003c;\n case 2907: goto L_0x003c;\n case 3001: goto L_0x003c;\n case 3002: goto L_0x003c;\n case 3003: goto L_0x003c;\n case 3004: goto L_0x003c;\n case 3005: goto L_0x003c;\n default: goto L_0x0019;\n };\t Catch:{ IllegalArgumentException -> 0x0034 }\n L_0x0019:\n r3 = new java.lang.IllegalArgumentException;\t Catch:{ IllegalArgumentException -> 0x0034 }\n r4 = 41;\n r5 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x0034 }\n r5.<init>(r4);\t Catch:{ IllegalArgumentException -> 0x0034 }\n r2 = r5.append(r2);\t Catch:{ IllegalArgumentException -> 0x0034 }\n r4 = \" is not a valid enum EventType\";\n r2 = r2.append(r4);\t Catch:{ IllegalArgumentException -> 0x0034 }\n r2 = r2.toString();\t Catch:{ IllegalArgumentException -> 0x0034 }\n r3.<init>(r2);\t Catch:{ IllegalArgumentException -> 0x0034 }\n throw r3;\t Catch:{ IllegalArgumentException -> 0x0034 }\n L_0x0034:\n r2 = move-exception;\n r7.e(r1);\n r6.m4918a(r7, r0);\n goto L_0x0000;\n L_0x003c:\n r2 = java.lang.Integer.valueOf(r2);\t Catch:{ IllegalArgumentException -> 0x0034 }\n r6.f28837a = r2;\t Catch:{ IllegalArgumentException -> 0x0034 }\n goto L_0x0000;\n L_0x0043:\n r0 = r6.f28838b;\n if (r0 != 0) goto L_0x004e;\n L_0x0047:\n r0 = new com.google.android.h.a.a.u;\n r0.<init>();\n r6.f28838b = r0;\n L_0x004e:\n r0 = r6.f28838b;\n r7.a(r0);\n goto L_0x0000;\n L_0x0054:\n r0 = r7.j();\n r0 = java.lang.Long.valueOf(r0);\n r6.f28839c = r0;\n goto L_0x0000;\n L_0x005f:\n r0 = r7.j();\n r0 = java.lang.Long.valueOf(r0);\n r6.f28840d = r0;\n goto L_0x0000;\n L_0x006a:\n r0 = r6.f28841e;\n if (r0 != 0) goto L_0x0075;\n L_0x006e:\n r0 = new com.google.android.h.a.a.o;\n r0.<init>();\n r6.f28841e = r0;\n L_0x0075:\n r0 = r6.f28841e;\n r7.a(r0);\n goto L_0x0000;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.h.a.a.v.b(com.google.protobuf.nano.a):com.google.android.h.a.a.v\");\n }", "private p000a.p001a.p002a.p003a.C0916s m1655b(p000a.p001a.p002a.p003a.p022i.p024b.C0112x r7, p000a.p001a.p002a.p003a.p034n.C0157e r8) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/293907205.run(Unknown Source)\n*/\n /*\n r6 = this;\n r0 = r7.m321a();\n r7 = r7.m322b();\n r1 = 0;\n r2 = r1;\n L_0x000a:\n r3 = r6.f1533u;\n r3 = r3 + 1;\n r6.f1533u = r3;\n r0.m2803e();\n r3 = r0.mo2010a();\n if (r3 != 0) goto L_0x0032;\n L_0x0019:\n r7 = r6.f1513a;\n r8 = \"Cannot retry non-repeatable request\";\n r7.m260a(r8);\n if (r2 == 0) goto L_0x002a;\n L_0x0022:\n r7 = new a.a.a.a.b.m;\n r8 = \"Cannot retry request with a non-repeatable request entity. The cause lists the reason the original request failed.\";\n r7.<init>(r8, r2);\n throw r7;\n L_0x002a:\n r7 = new a.a.a.a.b.m;\n r8 = \"Cannot retry request with a non-repeatable request entity.\";\n r7.<init>(r8);\n throw r7;\n L_0x0032:\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x0086 }\n r2 = r2.mo1932c();\t Catch:{ IOException -> 0x0086 }\n if (r2 != 0) goto L_0x0057;\t Catch:{ IOException -> 0x0086 }\n L_0x003a:\n r2 = r7.mo15e();\t Catch:{ IOException -> 0x0086 }\n if (r2 != 0) goto L_0x004f;\t Catch:{ IOException -> 0x0086 }\n L_0x0040:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r3 = \"Reopening the direct connection.\";\t Catch:{ IOException -> 0x0086 }\n r2.m260a(r3);\t Catch:{ IOException -> 0x0086 }\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x0086 }\n r3 = r6.f1528p;\t Catch:{ IOException -> 0x0086 }\n r2.mo2023a(r7, r8, r3);\t Catch:{ IOException -> 0x0086 }\n goto L_0x0057;\t Catch:{ IOException -> 0x0086 }\n L_0x004f:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r3 = \"Proxied connection. Need to start over.\";\t Catch:{ IOException -> 0x0086 }\n r2.m260a(r3);\t Catch:{ IOException -> 0x0086 }\n goto L_0x0085;\t Catch:{ IOException -> 0x0086 }\n L_0x0057:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r2 = r2.m262a();\t Catch:{ IOException -> 0x0086 }\n if (r2 == 0) goto L_0x007c;\t Catch:{ IOException -> 0x0086 }\n L_0x005f:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r3 = new java.lang.StringBuilder;\t Catch:{ IOException -> 0x0086 }\n r3.<init>();\t Catch:{ IOException -> 0x0086 }\n r4 = \"Attempt \";\t Catch:{ IOException -> 0x0086 }\n r3.append(r4);\t Catch:{ IOException -> 0x0086 }\n r4 = r6.f1533u;\t Catch:{ IOException -> 0x0086 }\n r3.append(r4);\t Catch:{ IOException -> 0x0086 }\n r4 = \" to execute request\";\t Catch:{ IOException -> 0x0086 }\n r3.append(r4);\t Catch:{ IOException -> 0x0086 }\n r3 = r3.toString();\t Catch:{ IOException -> 0x0086 }\n r2.m260a(r3);\t Catch:{ IOException -> 0x0086 }\n L_0x007c:\n r2 = r6.f1518f;\t Catch:{ IOException -> 0x0086 }\n r3 = r6.f1529q;\t Catch:{ IOException -> 0x0086 }\n r2 = r2.m464a(r0, r3, r8);\t Catch:{ IOException -> 0x0086 }\n r1 = r2;\n L_0x0085:\n return r1;\n L_0x0086:\n r2 = move-exception;\n r3 = r6.f1513a;\n r4 = \"Closing the connection.\";\n r3.m260a(r4);\n r3 = r6.f1529q;\t Catch:{ IOException -> 0x0093 }\n r3.close();\t Catch:{ IOException -> 0x0093 }\n L_0x0093:\n r3 = r6.f1520h;\n r4 = r0.m2802d();\n r3 = r3.retryRequest(r2, r4, r8);\n if (r3 == 0) goto L_0x010a;\n L_0x009f:\n r3 = r6.f1513a;\n r3 = r3.m270d();\n if (r3 == 0) goto L_0x00d9;\n L_0x00a7:\n r3 = r6.f1513a;\n r4 = new java.lang.StringBuilder;\n r4.<init>();\n r5 = \"I/O exception (\";\n r4.append(r5);\n r5 = r2.getClass();\n r5 = r5.getName();\n r4.append(r5);\n r5 = \") caught when processing request to \";\n r4.append(r5);\n r4.append(r7);\n r5 = \": \";\n r4.append(r5);\n r5 = r2.getMessage();\n r4.append(r5);\n r4 = r4.toString();\n r3.m269d(r4);\n L_0x00d9:\n r3 = r6.f1513a;\n r3 = r3.m262a();\n if (r3 == 0) goto L_0x00ea;\n L_0x00e1:\n r3 = r6.f1513a;\n r4 = r2.getMessage();\n r3.m261a(r4, r2);\n L_0x00ea:\n r3 = r6.f1513a;\n r3 = r3.m270d();\n if (r3 == 0) goto L_0x000a;\n L_0x00f2:\n r3 = r6.f1513a;\n r4 = new java.lang.StringBuilder;\n r4.<init>();\n r5 = \"Retrying request to \";\n r4.append(r5);\n r4.append(r7);\n r4 = r4.toString();\n r3.m269d(r4);\n goto L_0x000a;\n L_0x010a:\n r8 = r2 instanceof p000a.p001a.p002a.p003a.C0176z;\n if (r8 == 0) goto L_0x0134;\n L_0x010e:\n r8 = new a.a.a.a.z;\n r0 = new java.lang.StringBuilder;\n r0.<init>();\n r7 = r7.mo10a();\n r7 = r7.m474e();\n r0.append(r7);\n r7 = \" failed to respond\";\n r0.append(r7);\n r7 = r0.toString();\n r8.<init>(r7);\n r7 = r2.getStackTrace();\n r8.setStackTrace(r7);\n throw r8;\n L_0x0134:\n throw r2;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: a.a.a.a.i.b.p.b(a.a.a.a.i.b.x, a.a.a.a.n.e):a.a.a.a.s\");\n }", "private final com.google.wireless.android.finsky.dfe.p505c.p506a.ec m35437b(com.google.protobuf.nano.C7213a r8) {\n /*\n r7 = this;\n r1 = 0;\n L_0x0001:\n r0 = r8.m33550a();\n switch(r0) {\n case 0: goto L_0x000e;\n case 8: goto L_0x000f;\n case 16: goto L_0x004c;\n case 26: goto L_0x006f;\n case 34: goto L_0x007c;\n default: goto L_0x0008;\n };\n L_0x0008:\n r0 = super.a(r8, r0);\n if (r0 != 0) goto L_0x0001;\n L_0x000e:\n return r7;\n L_0x000f:\n r2 = r7.f37533a;\n r2 = r2 | 1;\n r7.f37533a = r2;\n r2 = r8.m33573o();\n r3 = r8.m33567i();\t Catch:{ IllegalArgumentException -> 0x003b }\n switch(r3) {\n case 0: goto L_0x0043;\n case 1: goto L_0x0043;\n default: goto L_0x0020;\n };\t Catch:{ IllegalArgumentException -> 0x003b }\n L_0x0020:\n r4 = new java.lang.IllegalArgumentException;\t Catch:{ IllegalArgumentException -> 0x003b }\n r5 = 42;\n r6 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x003b }\n r6.<init>(r5);\t Catch:{ IllegalArgumentException -> 0x003b }\n r3 = r6.append(r3);\t Catch:{ IllegalArgumentException -> 0x003b }\n r5 = \" is not a valid enum ResultCode\";\n r3 = r3.append(r5);\t Catch:{ IllegalArgumentException -> 0x003b }\n r3 = r3.toString();\t Catch:{ IllegalArgumentException -> 0x003b }\n r4.<init>(r3);\t Catch:{ IllegalArgumentException -> 0x003b }\n throw r4;\t Catch:{ IllegalArgumentException -> 0x003b }\n L_0x003b:\n r3 = move-exception;\n r8.m33562e(r2);\n r7.a(r8, r0);\n goto L_0x0001;\n L_0x0043:\n r7.f37534b = r3;\t Catch:{ IllegalArgumentException -> 0x003b }\n r3 = r7.f37533a;\t Catch:{ IllegalArgumentException -> 0x003b }\n r3 = r3 | 1;\n r7.f37533a = r3;\t Catch:{ IllegalArgumentException -> 0x003b }\n goto L_0x0001;\n L_0x004c:\n r2 = r7.f37533a;\n r2 = r2 | 2;\n r7.f37533a = r2;\n r2 = r8.m33573o();\n r3 = r8.m33560d();\t Catch:{ IllegalArgumentException -> 0x0067 }\n r3 = com.google.wireless.android.finsky.dfe.p505c.p506a.dp.m35391a(r3);\t Catch:{ IllegalArgumentException -> 0x0067 }\n r7.f37535c = r3;\t Catch:{ IllegalArgumentException -> 0x0067 }\n r3 = r7.f37533a;\t Catch:{ IllegalArgumentException -> 0x0067 }\n r3 = r3 | 2;\n r7.f37533a = r3;\t Catch:{ IllegalArgumentException -> 0x0067 }\n goto L_0x0001;\n L_0x0067:\n r3 = move-exception;\n r8.m33562e(r2);\n r7.a(r8, r0);\n goto L_0x0001;\n L_0x006f:\n r0 = r8.m33565g();\n r7.f37536d = r0;\n r0 = r7.f37533a;\n r0 = r0 | 4;\n r7.f37533a = r0;\n goto L_0x0001;\n L_0x007c:\n r0 = 34;\n r2 = com.google.protobuf.nano.C7222l.m33624a(r8, r0);\n r0 = r7.f37537e;\n if (r0 != 0) goto L_0x00a8;\n L_0x0086:\n r0 = r1;\n L_0x0087:\n r2 = r2 + r0;\n r2 = new com.google.wireless.android.finsky.dfe.p505c.p506a.ed[r2];\n if (r0 == 0) goto L_0x0091;\n L_0x008c:\n r3 = r7.f37537e;\n java.lang.System.arraycopy(r3, r1, r2, r1, r0);\n L_0x0091:\n r3 = r2.length;\n r3 = r3 + -1;\n if (r0 >= r3) goto L_0x00ac;\n L_0x0096:\n r3 = new com.google.wireless.android.finsky.dfe.c.a.ed;\n r3.<init>();\n r2[r0] = r3;\n r3 = r2[r0];\n r8.m33552a(r3);\n r8.m33550a();\n r0 = r0 + 1;\n goto L_0x0091;\n L_0x00a8:\n r0 = r7.f37537e;\n r0 = r0.length;\n goto L_0x0087;\n L_0x00ac:\n r3 = new com.google.wireless.android.finsky.dfe.c.a.ed;\n r3.<init>();\n r2[r0] = r3;\n r0 = r2[r0];\n r8.m33552a(r0);\n r7.f37537e = r2;\n goto L_0x0001;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.wireless.android.finsky.dfe.c.a.ec.b(com.google.protobuf.nano.a):com.google.wireless.android.finsky.dfe.c.a.ec\");\n }", "public int getType() {\n/* 96 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public final /* bridge */ /* synthetic */ void mo43569b() {\n super.mo43569b();\n }", "public int getType() {\n/* 3069 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private final com.google.wireless.android.finsky.dfe.p515h.p516a.ae m35733b(com.google.protobuf.nano.C7213a r7) {\n /*\n r6 = this;\n L_0x0000:\n r0 = r7.m33550a();\n switch(r0) {\n case 0: goto L_0x000d;\n case 10: goto L_0x000e;\n case 18: goto L_0x001f;\n case 26: goto L_0x002c;\n case 34: goto L_0x0039;\n case 42: goto L_0x004a;\n case 50: goto L_0x0057;\n case 56: goto L_0x0064;\n case 64: goto L_0x00a3;\n case 72: goto L_0x00b1;\n case 82: goto L_0x00bf;\n default: goto L_0x0007;\n };\n L_0x0007:\n r0 = super.a(r7, r0);\n if (r0 != 0) goto L_0x0000;\n L_0x000d:\n return r6;\n L_0x000e:\n r0 = r6.f38026c;\n if (r0 != 0) goto L_0x0019;\n L_0x0012:\n r0 = new com.google.android.finsky.cv.a.bd;\n r0.<init>();\n r6.f38026c = r0;\n L_0x0019:\n r0 = r6.f38026c;\n r7.m33552a(r0);\n goto L_0x0000;\n L_0x001f:\n r0 = r7.m33564f();\n r6.f38027d = r0;\n r0 = r6.f38025b;\n r0 = r0 | 1;\n r6.f38025b = r0;\n goto L_0x0000;\n L_0x002c:\n r0 = r7.m33564f();\n r6.f38028e = r0;\n r0 = r6.f38025b;\n r0 = r0 | 2;\n r6.f38025b = r0;\n goto L_0x0000;\n L_0x0039:\n r0 = r6.f38029f;\n if (r0 != 0) goto L_0x0044;\n L_0x003d:\n r0 = new com.google.android.finsky.cv.a.ax;\n r0.<init>();\n r6.f38029f = r0;\n L_0x0044:\n r0 = r6.f38029f;\n r7.m33552a(r0);\n goto L_0x0000;\n L_0x004a:\n r0 = r7.m33564f();\n r6.f38030g = r0;\n r0 = r6.f38025b;\n r0 = r0 | 4;\n r6.f38025b = r0;\n goto L_0x0000;\n L_0x0057:\n r0 = r7.m33564f();\n r6.f38031h = r0;\n r0 = r6.f38025b;\n r0 = r0 | 8;\n r6.f38025b = r0;\n goto L_0x0000;\n L_0x0064:\n r1 = r6.f38025b;\n r1 = r1 | 16;\n r6.f38025b = r1;\n r1 = r7.m33573o();\n r2 = r7.m33567i();\t Catch:{ IllegalArgumentException -> 0x0090 }\n switch(r2) {\n case 0: goto L_0x0099;\n case 1: goto L_0x0099;\n case 2: goto L_0x0099;\n case 3: goto L_0x0099;\n case 4: goto L_0x0099;\n default: goto L_0x0075;\n };\t Catch:{ IllegalArgumentException -> 0x0090 }\n L_0x0075:\n r3 = new java.lang.IllegalArgumentException;\t Catch:{ IllegalArgumentException -> 0x0090 }\n r4 = 36;\n r5 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x0090 }\n r5.<init>(r4);\t Catch:{ IllegalArgumentException -> 0x0090 }\n r2 = r5.append(r2);\t Catch:{ IllegalArgumentException -> 0x0090 }\n r4 = \" is not a valid enum Type\";\n r2 = r2.append(r4);\t Catch:{ IllegalArgumentException -> 0x0090 }\n r2 = r2.toString();\t Catch:{ IllegalArgumentException -> 0x0090 }\n r3.<init>(r2);\t Catch:{ IllegalArgumentException -> 0x0090 }\n throw r3;\t Catch:{ IllegalArgumentException -> 0x0090 }\n L_0x0090:\n r2 = move-exception;\n r7.m33562e(r1);\n r6.a(r7, r0);\n goto L_0x0000;\n L_0x0099:\n r6.f38032i = r2;\t Catch:{ IllegalArgumentException -> 0x0090 }\n r2 = r6.f38025b;\t Catch:{ IllegalArgumentException -> 0x0090 }\n r2 = r2 | 16;\n r6.f38025b = r2;\t Catch:{ IllegalArgumentException -> 0x0090 }\n goto L_0x0000;\n L_0x00a3:\n r0 = r7.m33563e();\n r6.f38033j = r0;\n r0 = r6.f38025b;\n r0 = r0 | 32;\n r6.f38025b = r0;\n goto L_0x0000;\n L_0x00b1:\n r0 = r7.m33563e();\n r6.f38034k = r0;\n r0 = r6.f38025b;\n r0 = r0 | 64;\n r6.f38025b = r0;\n goto L_0x0000;\n L_0x00bf:\n r0 = r6.f38035l;\n if (r0 != 0) goto L_0x00ca;\n L_0x00c3:\n r0 = new com.google.android.finsky.cv.a.cv;\n r0.<init>();\n r6.f38035l = r0;\n L_0x00ca:\n r0 = r6.f38035l;\n r7.m33552a(r0);\n goto L_0x0000;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.wireless.android.finsky.dfe.h.a.ae.b(com.google.protobuf.nano.a):com.google.wireless.android.finsky.dfe.h.a.ae\");\n }", "public void m7211c() {\n /*\n r34 = this;\n r16 = 0;\n r15 = 0;\n r5 = 0;\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"MINOR_TYPE\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r3 = -1;\n r4 = r2.hashCode();\n switch(r4) {\n case -1172269795: goto L_0x002e;\n case 2157948: goto L_0x0038;\n case 2571565: goto L_0x0024;\n default: goto L_0x0018;\n };\n L_0x0018:\n r2 = r3;\n L_0x0019:\n switch(r2) {\n case 0: goto L_0x0042;\n case 1: goto L_0x0162;\n case 2: goto L_0x01a9;\n default: goto L_0x001c;\n };\n L_0x001c:\n r2 = \"Undefined type\";\n r0 = r34;\n mobi.mmdt.componentsutils.p079a.p080a.C1104b.m6366b(r0, r2);\n L_0x0023:\n return;\n L_0x0024:\n r4 = \"TEXT\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x0018;\n L_0x002c:\n r2 = 0;\n goto L_0x0019;\n L_0x002e:\n r4 = \"STICKER\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x0018;\n L_0x0036:\n r2 = 1;\n goto L_0x0019;\n L_0x0038:\n r4 = \"FILE\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x0018;\n L_0x0040:\n r2 = 2;\n goto L_0x0019;\n L_0x0042:\n r4 = mobi.mmdt.ott.provider.p169c.C1594n.TEXT;\n r33 = r5;\n L_0x0046:\n r8 = mobi.mmdt.componentsutils.p079a.p084e.C1113a.m6421a();\n r10 = mobi.mmdt.ott.provider.p169c.C1592l.IN;\n r0 = r34;\n r2 = r0.f4758b;\n r0 = r34;\n r3 = r0.f4757a;\n r3 = mobi.mmdt.ott.p109d.p111b.C1309a.m6934a(r3);\n r3 = r3.m6942b();\n r2 = r2.equals(r3);\n if (r2 == 0) goto L_0x0064;\n L_0x0062:\n r10 = mobi.mmdt.ott.provider.p169c.C1592l.OUT;\n L_0x0064:\n r0 = r34;\n r2 = r0.f4757a;\n r0 = r34;\n r3 = r0.f4761e;\n r2 = mobi.mmdt.ott.provider.p169c.C1583c.m7972a(r2, r3, r10);\n if (r2 != 0) goto L_0x0023;\n L_0x0072:\n r2 = mobi.mmdt.ott.MyApplication.m6445a();\n r2 = r2.f4177h;\n if (r2 == 0) goto L_0x008a;\n L_0x007a:\n r2 = mobi.mmdt.ott.MyApplication.m6445a();\n r2 = r2.f4177h;\n r0 = r34;\n r3 = r0.f4759c;\n r2 = r2.equals(r3);\n if (r2 != 0) goto L_0x024e;\n L_0x008a:\n r17 = 0;\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n if (r2 == 0) goto L_0x00b8;\n L_0x0098:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r2 = r2.isEmpty();\n if (r2 != 0) goto L_0x00b8;\n L_0x00aa:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r17 = r2;\n L_0x00b8:\n r2 = new mobi.mmdt.ott.d.a.b;\n r0 = r34;\n r3 = r0.f4761e;\n r0 = r34;\n r5 = r0.f4760d;\n r0 = r34;\n r6 = r0.f4762f;\n r7 = \"SEND_TIME_IN_GMT\";\n r6 = r6.get(r7);\n r6 = (java.lang.String) r6;\n r6 = java.lang.Long.parseLong(r6);\n r11 = mobi.mmdt.ott.provider.p169c.C1593m.NOT_READ;\n r0 = r34;\n r12 = r0.f4759c;\n r13 = mobi.mmdt.ott.provider.p169c.C1595o.GROUP;\n r0 = r34;\n r14 = r0.f4758b;\n r2.<init>(r3, r4, r5, r6, r8, r10, r11, r12, r13, r14, r15, r16, r17);\n r0 = r34;\n r3 = r0.f4757a;\n r3 = mobi.mmdt.ott.logic.p157e.C1509a.m7621a(r3);\n r0 = r34;\n r4 = r0.f4762f;\n r0 = r33;\n r3.m7626a(r2, r0, r4);\n L_0x00f2:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n if (r2 == 0) goto L_0x013c;\n L_0x00fe:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r2 = r2.isEmpty();\n if (r2 != 0) goto L_0x013c;\n L_0x0110:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r0 = r34;\n r3 = r0.f4757a;\n r0 = r34;\n r4 = r0.f4761e;\n mobi.mmdt.ott.provider.p169c.C1583c.m7976b(r3, r4, r2);\n r0 = r34;\n r3 = r0.f4757a;\n r2 = mobi.mmdt.ott.provider.p169c.C1583c.m8003n(r3, r2);\n r0 = r34;\n r3 = r0.f4757a;\n r0 = r34;\n r4 = r0.f4761e;\n r5 = mobi.mmdt.ott.provider.p169c.C1595o.SINGLE;\n mobi.mmdt.ott.logic.p112a.p120c.p121a.p123b.C1387u.m7218a(r3, r4, r2, r5);\n L_0x013c:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"MINOR_TYPE\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r3 = \"TEXT\";\n r2 = r2.equals(r3);\n if (r2 != 0) goto L_0x0023;\n L_0x0150:\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.b;\n r0 = r34;\n r3 = r0.f4757a;\n r0 = r34;\n r4 = r0.f4762f;\n r2.<init>(r3, r15, r4);\n mobi.mmdt.ott.logic.C1494c.m7541c(r2);\n goto L_0x0023;\n L_0x0162:\n r6 = mobi.mmdt.ott.provider.p169c.C1594n.STICKER;\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"STICKER_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r0 = r34;\n r3 = r0.f4762f;\n r4 = \"STICKER_PACKAGE_ID\";\n r3 = r3.get(r4);\n r3 = (java.lang.String) r3;\n r0 = r34;\n r4 = r0.f4762f;\n r7 = \"STICKER_VERSION\";\n r4 = r4.get(r7);\n r4 = (java.lang.String) r4;\n if (r4 == 0) goto L_0x02c9;\n L_0x018a:\n if (r2 == 0) goto L_0x02c9;\n L_0x018c:\n if (r3 == 0) goto L_0x02c9;\n L_0x018e:\n r7 = r4.isEmpty();\n if (r7 != 0) goto L_0x02c9;\n L_0x0194:\n r7 = r2.isEmpty();\n if (r7 != 0) goto L_0x02c9;\n L_0x019a:\n r7 = r3.isEmpty();\n if (r7 != 0) goto L_0x02c9;\n L_0x01a0:\n r16 = mobi.mmdt.ott.provider.p174h.C1629b.m8295a(r4, r3, r2);\n r33 = r5;\n r4 = r6;\n goto L_0x0046;\n L_0x01a9:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"FILE_TYPE\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r3 = -1;\n r4 = r2.hashCode();\n switch(r4) {\n case 327328941: goto L_0x01de;\n case 796404377: goto L_0x01ca;\n case 802160718: goto L_0x01e8;\n case 808293817: goto L_0x01d4;\n default: goto L_0x01bd;\n };\n L_0x01bd:\n r2 = r3;\n L_0x01be:\n switch(r2) {\n case 0: goto L_0x01f2;\n case 1: goto L_0x020c;\n case 2: goto L_0x0222;\n case 3: goto L_0x0238;\n default: goto L_0x01c1;\n };\n L_0x01c1:\n r2 = \"Undefined file type\";\n r0 = r34;\n mobi.mmdt.componentsutils.p079a.p080a.C1104b.m6366b(r0, r2);\n goto L_0x0023;\n L_0x01ca:\n r4 = \"FILE_TYPE_IMAGE\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x01bd;\n L_0x01d2:\n r2 = 0;\n goto L_0x01be;\n L_0x01d4:\n r4 = \"FILE_TYPE_VIDEO\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x01bd;\n L_0x01dc:\n r2 = 1;\n goto L_0x01be;\n L_0x01de:\n r4 = \"FILE_TYPE_PUSH_TO_TALK\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x01bd;\n L_0x01e6:\n r2 = 2;\n goto L_0x01be;\n L_0x01e8:\n r4 = \"FILE_TYPE_OTHER\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x01bd;\n L_0x01f0:\n r2 = 3;\n goto L_0x01be;\n L_0x01f2:\n r3 = mobi.mmdt.ott.provider.p169c.C1594n.IMAGE;\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.h;\n r0 = r34;\n r4 = r0.f4757a;\n r0 = r34;\n r5 = r0.f4762f;\n r6 = mobi.mmdt.ott.provider.p170d.C1605j.IMAGE;\n r2.<init>(r4, r5, r6);\n r2 = r2.m7152a();\n L_0x0207:\n r33 = r2;\n r4 = r3;\n goto L_0x0046;\n L_0x020c:\n r3 = mobi.mmdt.ott.provider.p169c.C1594n.VIDEO;\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.h;\n r0 = r34;\n r4 = r0.f4757a;\n r0 = r34;\n r5 = r0.f4762f;\n r6 = mobi.mmdt.ott.provider.p170d.C1605j.VIDEO;\n r2.<init>(r4, r5, r6);\n r2 = r2.m7152a();\n goto L_0x0207;\n L_0x0222:\n r3 = mobi.mmdt.ott.provider.p169c.C1594n.PUSH_TO_TALK;\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.h;\n r0 = r34;\n r4 = r0.f4757a;\n r0 = r34;\n r5 = r0.f4762f;\n r6 = mobi.mmdt.ott.provider.p170d.C1605j.PUSH_TO_TALK;\n r2.<init>(r4, r5, r6);\n r2 = r2.m7152a();\n goto L_0x0207;\n L_0x0238:\n r3 = mobi.mmdt.ott.provider.p169c.C1594n.FILE;\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.h;\n r0 = r34;\n r4 = r0.f4757a;\n r0 = r34;\n r5 = r0.f4762f;\n r6 = mobi.mmdt.ott.provider.p170d.C1605j.OTHER;\n r2.<init>(r4, r5, r6);\n r2 = r2.m7152a();\n goto L_0x0207;\n L_0x024e:\n if (r33 == 0) goto L_0x029c;\n L_0x0250:\n r0 = r34;\n r0 = r0.f4757a;\n r18 = r0;\n r19 = r33.m8082n();\n r20 = r33.m8069a();\n r21 = r33.m8079k();\n r22 = r33.m8073e();\n r23 = r33.m8078j();\n r24 = r33.m8077i();\n r26 = 0;\n r27 = r33.m8081m();\n r28 = r33.m8080l();\n r29 = r33.m8075g();\n r30 = r33.m8071c();\n r31 = r33.m8072d();\n r32 = r33.m8070b();\n r33 = r33.m8074f();\n r2 = mobi.mmdt.ott.provider.p170d.C1598c.m8100a(r18, r19, r20, r21, r22, r23, r24, r26, r27, r28, r29, r30, r31, r32, r33);\n r2 = r2.getLastPathSegment();\n r2 = java.lang.Long.parseLong(r2);\n r15 = java.lang.Long.valueOf(r2);\n L_0x029c:\n r0 = r34;\n r2 = r0.f4757a;\n r0 = r34;\n r3 = r0.f4761e;\n r0 = r34;\n r5 = r0.f4760d;\n r0 = r34;\n r6 = r0.f4762f;\n r7 = \"SEND_TIME_IN_GMT\";\n r6 = r6.get(r7);\n r6 = (java.lang.String) r6;\n r6 = java.lang.Long.parseLong(r6);\n r11 = mobi.mmdt.ott.provider.p169c.C1593m.READ;\n r0 = r34;\n r12 = r0.f4759c;\n r13 = mobi.mmdt.ott.provider.p169c.C1595o.GROUP;\n r0 = r34;\n r14 = r0.f4758b;\n mobi.mmdt.ott.provider.p169c.C1583c.m7966a(r2, r3, r4, r5, r6, r8, r10, r11, r12, r13, r14, r15, r16);\n goto L_0x00f2;\n L_0x02c9:\n r33 = r5;\n r4 = r6;\n goto L_0x0046;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: mobi.mmdt.ott.logic.a.c.a.b.s.c():void\");\n }", "public interface Type extends DeclarationContainer, DeclarationWithType {\n\n public default boolean newSubtypeOf(Type other) throws LookupException {\n return sameAs(other);\n }\n\n @Override\n default SelectionResult<Declaration> updatedTo(Declaration declaration) {\n return DeclarationWithType.super.updatedTo(declaration);\n }\n\n @Override\n default List<? extends DeclarationContainerRelation> relations() throws LookupException {\n \treturn inheritanceRelations();\n }\n\n public default void accumulateSuperTypeJudge(SuperTypeJudge judge) throws LookupException {\n judge.add(this);\n List<Type> temp = getProperDirectSuperTypes();\n for(Type type:temp) {\n Type existing = judge.get(type);\n if(existing == null) {\n type.accumulateSuperTypeJudge(judge);\n }\n }\n }\n\n\n /**\n * Find the super type with the same base type as the given type.\n * \n * @param type The type with the same base type as the requested super type.\n * @return A super type of this type that has the same base type as the given\n * type. If there is no such super type, null is returned.\n * @throws LookupException\n */\n public default Type getSuperTypeWithSameBaseTypeAs(Type type) throws LookupException {\n return superTypeJudge().get(type);\n }\n\n public SuperTypeJudge superTypeJudge() throws LookupException;\n\n public void accumulateAllSuperTypes(Set<Type> acc) throws LookupException;\n\n public void newAccumulateAllSuperTypes(Set<Type> acc) throws LookupException;\n\n public void newAccumulateSelfAndAllSuperTypes(Set<Type> acc) throws LookupException;\n\n\n public Set<Type> getSelfAndAllSuperTypesView() throws LookupException;\n\n public abstract List<InheritanceRelation> explicitNonMemberInheritanceRelations();\n\n public <I extends InheritanceRelation> List<I> explicitNonMemberInheritanceRelations(Class<I> kind);\n\n public List<InheritanceRelation> implicitNonMemberInheritanceRelations();\n\n public default void reactOnDescendantAdded(Element element) {}\n\n public default void reactOnDescendantRemoved(Element element) {}\n\n public default void reactOnDescendantReplaced(Element oldElement, Element newElement) {}\n\n /**\n * Return the fully qualified name.\n * @throws LookupException \n */\n /*@\n\t @ public behavior\n\t @\n\t @ getPackage().getFullyQualifiedName().equals(\"\") ==> \\result == getName();\n\t @ ! getPackage().getFullyQualifiedName().equals(\"\") == > \\result.equals(getPackage().getFullyQualifiedName() + getName());\n\t @*/\n public String getFullyQualifiedName();\n\n /*******************\n * LEXICAL CONTEXT \n *******************/\n\n @Override\n public LocalLookupContext<?> targetContext() throws LookupException;\n\n @Override\n public LookupContext localContext() throws LookupException;\n\n /**\n * If the given element is an inheritance relation, the lookup must proceed to the parent. For other elements,\n * the context is a lexical context connected to the target context to perform a local search.\n * @throws LookupException \n */\n @Override\n public LookupContext lookupContext(Element element) throws LookupException;\n\n public List<ParameterBlock<?>> parameterBlocks();\n\n public <P extends Parameter> ParameterBlock<P> parameterBlock(Class<P> kind);\n\n public void addParameterBlock(ParameterBlock<?> block);\n\n public void removeParameterBlock(ParameterBlock<?> block);\n\n public <P extends Parameter> List<P> parameters(Class<P> kind);\n\n /**\n * Indices start at 1.\n */\n public <P extends Parameter> P parameter(Class<P> kind, int index);\n\n public <P extends Parameter> int nbTypeParameters(Class<P> kind);\n\n public <P extends Parameter> void addParameter(Class<P> kind,P parameter);\n\n public <P extends Parameter> void addAllParameters(Class<P> kind,Collection<P> parameter);\n\n public <P extends Parameter> void replaceParameter(Class<P> kind, P oldParameter, P newParameter);\n\n public <P extends Parameter> void replaceAllParameters(Class<P> kind, List<P> newParameters);\n\n /************************\n * BEING A TYPE ELEMENT *\n ************************/\n\n public List<Declaration> getIntroducedMembers();\n\n /**********\n * ACCESS *\n **********/\n\n /**\n * Add the given element to this type.\n * \n * @throws ChameleonProgrammerException\n * The given element could not be added. E.g when you try to add\n * an element to a computed type.\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre element != null;\n\t @\n\t @ post directlyDeclaredElements().contains(element);\n\t @*/\n public void add(Declarator element) throws ChameleonProgrammerException;\n\n /**\n * Remove the given element to this type.\n * \n * @throws ChameleonProgrammerException\n * The given element could not be added. E.g when you try to add\n * an element to a computed type.\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre element != null;\n\t @\n\t @ post ! directlyDeclaredElements().contains(element);\n\t @*/\n public void remove(Declarator element) throws ChameleonProgrammerException;\n\n /**\n * Add all type elements in the given collection to this type.\n * @param elements\n * @throws ChameleonProgrammerException\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre elements != null;\n\t @ pre !elements.contains(null);\n\t @\n\t @ post directlyDeclaredElements().containsAll(elements);\n\t @*/\n public default void addAll(Collection<? extends Declarator> elements) {\n \telements.forEach(e -> add(e));\n }\n\n /**************\n * SUPERTYPES *\n **************/\n\n /**\n * Return the proper direct super types of this type. A proper super type is a super type\n * that is not equal to this type. A direct super type is a super type that is specified\n * by an inheritance relation of this type, or this type.\n * \n * @return A list containing the direct super types of this type.\n * @throws LookupException The type of an inheritance relation could not be resolved.\n */\n public default List<Type> getProperDirectSuperTypes() throws LookupException {\n\t\tList<Type> result = Lists.create();\n\t\tfor(InheritanceRelation element:inheritanceRelations()) {\n\t\t\tType type = element.superType();\n\t\t\tif (type!=null) {\n\t\t\t\tresult.add(type);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n public Set<Type> getAllSuperTypes() throws LookupException;\n\n public default boolean contains(Type other, TypeFixer trace) throws LookupException {\n return sameAs(other, trace);\n }\n \n public default boolean subtypeOf(Type other) throws LookupException {\n return subtypeOf(other, new TypeFixer());\n }\n\n public default boolean subtypeOf(Type other, TypeFixer trace) throws LookupException {\n TypeFixer clone = trace.clone();\n boolean result = sameAs(other,clone);\n if(! result) {\n clone = trace.clone();\n result = uniSubtypeOf(other,clone);\n if(! result) {\n result = other.uniSupertypeOf(this, trace);\n }\n }\n return result;\n }\n\n public default boolean uniSupertypeOf(Type type, TypeFixer trace) throws LookupException {\n return false;\n }\n\n public default boolean uniSubtypeOf(Type other, TypeFixer trace) throws LookupException {\n Type sameBase = getSuperTypeWithSameBaseTypeAs(other);\n return sameBase != null && sameBase.compatibleParameters(other, trace);\n }\n\n /**\n * Check if this type is assignable to another type.\n * \n * @param other\n * @return\n * @throws LookupException\n */\n /*@\n\t @ public behavior\n\t @\n\t @ post \\result == equals(other) || subTypeOf(other);\n\t @*/\n public boolean assignableTo(Type other) throws LookupException;\n\n /**\n * Return the inheritance relations of this type.\n * \n * @throws LookupException \n */\n /*@\n\t @ public behavior\n\t @\n\t @ post \\result != null;\n\t @*/\n public default List<InheritanceRelation> inheritanceRelations() throws LookupException {\n return nonMemberInheritanceRelations();\n }\n\n public List<InheritanceRelation> nonMemberInheritanceRelations();\n\n public <I extends InheritanceRelation> List<I> nonMemberInheritanceRelations(Class<I> kind);\n\n /**\n * Add the give given inheritance relation to this type.\n * @param relation The relation to add. Cannot be null.\n * @throws ChameleonProgrammerException\n * It is not possible to add the given type. E.g. you cannot\n * add an inheritance relation to a computed type.\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre relation != null;\n\t @ post inheritanceRelations().contains(relation);\n\t @*/\n public void addInheritanceRelation(InheritanceRelation relation);\n\n public void addAllInheritanceRelations(Collection<InheritanceRelation> relations);\n /**\n * Remove the give given inheritance relation from this type.\n * @param relation\n * @throws ChameleonProgrammerException\n * It is not possible to remove the given type. E.g. you cannot\n * remove an inheritance relation to a computed type.\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre relation != null;\n\t @ post ! inheritanceRelations().contains(relation);\n\t @*/\n public void removeNonMemberInheritanceRelation(InheritanceRelation relation) throws ChameleonProgrammerException;\n\n public void removeAllNonMemberInheritanceRelations();\n\n /**\n * Return the members of the given kind directly declared by this type.\n * @return\n * @throws LookupException \n * @throws \n */\n public <T extends Declaration> List<T> localMembers(final Class<T> kind) throws LookupException;\n\n /**\n * Return the members that are implicitly part of this type, such as default constructors and destructors.\n * @return\n */\n public List<Declaration> implicitMembers();\n\n public <M extends Declaration> List<M> implicitMembers(Class<M> kind);\n\n /**\n * Return the members directly declared by this type. The order of the elements in the list is the order in which they\n * are written in the type.\n * @return\n * @throws LookupException \n */\n public List<Declaration> localMembers() throws LookupException;\n\n public <T extends Declaration> List<T> directlyDeclaredMembers(Class<T> kind);\n\n public <T extends Declaration> List<T> directlyDeclaredMembers(Class<T> kind, ChameleonProperty property);\n\n public List<Declaration> directlyDeclaredMembers();\n\n public <D extends Declaration> List<SelectionResult<D>> members(DeclarationSelector<D> selector) throws LookupException;\n\n public <D extends Declaration> List<? extends SelectionResult<D>> localMembers(DeclarationSelector<D> selector) throws LookupException;\n\n public List<Declaration> members() throws LookupException;\n\n /**\n * Return the members of this class.\n * @param <M>\n * @param kind\n * @return\n * @throws LookupException\n */\n public <M extends Declaration> List<M> members(final Class<M> kind) throws LookupException;\n\n /**\n * DO NOT CONFUSE THIS METHOD WITH localMembers(). This method does not\n * transform type elements into members.\n * \n * FIXME: rename to localDeclarators()\n * \n * @return\n */\n public List<? extends Declarator> directlyDeclaredElements();\n\n public <T extends Declarator> List<T> directlyDeclaredElements(Class<T> kind);\n\n @Override\n public List<? extends Declaration> declarations() throws LookupException;\n\n public Type alias(String name);\n\n public Type intersection(Type type) throws LookupException;\n\n public Type intersectionDoubleDispatch(Type type) throws LookupException;\n\n public Type intersectionDoubleDispatch(IntersectionType type) throws LookupException;\n\n public void replace(Declarator oldElement, Declarator newElement);\n\n public Type baseType();\n\n public default boolean compatibleParameters(Type other, TypeFixer trace) throws LookupException {\n int size = nbTypeParameters(TypeParameter.class);\n boolean result = true;\n for(int i=0; i< size && result;i++) {\n TypeParameter otherParameter = other.parameter(TypeParameter.class, i);\n TypeParameter myParameter = parameter(TypeParameter.class,i);\n result = otherParameter.contains(myParameter, trace.clone());\n }\n return result;\n }\n\n\n public Type union(Type lowerBound) throws LookupException;\n\n public Type unionDoubleDispatch(Type type) throws LookupException;\n\n public Type unionDoubleDispatch(UnionType type) throws LookupException;\n\n public default boolean sameAs(Type other, TypeFixer trace) throws LookupException {\n if(other == this || trace.contains(other, this)) {\n return true;\n }\n TypeFixer newTrace = trace.clone();\n newTrace.add(other, this);\n boolean result = uniSameAs(other,newTrace);\n if(! result) {\n newTrace = trace.clone();\n newTrace.add(other, this);\n result = other.uniSameAs(this,newTrace);\n }\n return result;\n }\n\n /**\n * Check if this type is equal to the given type, taking\n * recursive types into account. If a loop is encountered,\n * that branch of the check will return true: it did not\n * encounter a problem.\n * \n * @param other The type of which we want to check if it is the same as this type.\n * @param fixer The object that will ensure that we can do a fixed point computation.\n * @return\n * @throws LookupException\n */\n public boolean uniSameAs(Type other, TypeFixer fixer) throws LookupException;\n\n /**\n * <p>Return the lower bound of this type.</p>\n * \n * <p> By <b>default</b>, the current object is returned.\n * \n * @return A type representing the lower bound of this type, when consider as an interval.\n * @throws LookupException\n */\n /*@\n @ post \\result != null;\n @ post \\result.subtypeOf(this);\n @*/\n public default Type lowerBound() throws LookupException {\n return this;\n }\n\n /**\n * <p>Return the upper bound of this type.</p>\n * \n * <p> By <b>default</b>, the current object is returned.\n * \n * @return A type representing the upper bound of this type, when consider as an interval.\n * @throws LookupException\n */\n /*@\n @ post \\result != null;\n @ post subtypeOf(\\result);\n @*/\n public default Type upperBound() throws LookupException {\n return this;\n }\n\n /**\n * A name that is strictly for debugging purposes.\n * \n * @return The result is not null.\n */\n public String infoName();\n\n /**\n * Verify whether the this type is a subtype of the given other type. \n * If that is the case, then a valid verification result is returned.\n * Otherwise, a problem is reported. The message of the problem is \n * constructed using the descriptions of the meaning of\n * each type as determined by the arguments.\n * \n * @param type The type for which the subtype relation is verified.\n * @param meaningThisType A textual description of the meaning of this type.\n * @param meaningOtherType A textual description of the meaning of the other type.\n * @param cause The element in which the verification is done.\n * @return\n */\n public Verification verifySubtypeOf(Type type, String meaningThisType, String meaningOtherType, Element cause);\n\n\n /**\n * @return\n */\n public default boolean isWildCard() {\n return false;\n }\n\n}", "@org.jetbrains.annotations.NotNull\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public static final kotlin.reflect.jvm.internal.impl.types.KotlinType getSubtypeRepresentative(@org.jetbrains.annotations.NotNull kotlin.reflect.jvm.internal.impl.types.KotlinType r2) {\n /*\n java.lang.String r0 = \"$this$getSubtypeRepresentative\"\n kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull(r2, r0)\n kotlin.reflect.jvm.internal.impl.types.UnwrappedType r0 = r2.unwrap()\n boolean r1 = r0 instanceof kotlin.reflect.jvm.internal.impl.types.SubtypingRepresentatives\n if (r1 != 0) goto L_0x000e\n r0 = 0\n L_0x000e:\n kotlin.reflect.jvm.internal.impl.types.SubtypingRepresentatives r0 = (kotlin.reflect.jvm.internal.impl.types.SubtypingRepresentatives) r0\n if (r0 == 0) goto L_0x0019\n kotlin.reflect.jvm.internal.impl.types.KotlinType r0 = r0.getSubTypeRepresentative()\n if (r0 == 0) goto L_0x0019\n r2 = r0\n L_0x0019:\n return r2\n */\n throw new UnsupportedOperationException(\"Method not decompiled: kotlin.reflect.jvm.internal.impl.types.TypeCapabilitiesKt.getSubtypeRepresentative(kotlin.reflect.jvm.internal.impl.types.KotlinType):kotlin.reflect.jvm.internal.impl.types.KotlinType\");\n }", "private final void asx() {\n /*\n r12 = this;\n r0 = r12.cFE;\n if (r0 == 0) goto L_0x0073;\n L_0x0004:\n r1 = r12.cxs;\n if (r1 == 0) goto L_0x0073;\n L_0x0008:\n r1 = r12.ayL;\n if (r1 != 0) goto L_0x000d;\n L_0x000c:\n goto L_0x0073;\n L_0x000d:\n r2 = 0;\n if (r1 == 0) goto L_0x0027;\n L_0x0010:\n r1 = r1.Km();\n if (r1 == 0) goto L_0x0027;\n L_0x0016:\n r1 = r1.aar();\n if (r1 == 0) goto L_0x0027;\n L_0x001c:\n r3 = r0.getName();\n r1 = r1.get(r3);\n r1 = (java.util.ArrayList) r1;\n goto L_0x0028;\n L_0x0027:\n r1 = r2;\n L_0x0028:\n if (r1 == 0) goto L_0x0051;\n L_0x002a:\n r1 = (java.lang.Iterable) r1;\n r1 = kotlin.collections.u.Z(r1);\n if (r1 == 0) goto L_0x0051;\n L_0x0032:\n r3 = new com.iqoption.deposit.light.perform.DepositPerformLightFragment$setPresets$items$1;\n r3.<init>(r12);\n r3 = (kotlin.jvm.a.b) r3;\n r1 = kotlin.sequences.n.b(r1, r3);\n if (r1 == 0) goto L_0x0051;\n L_0x003f:\n r3 = new com.iqoption.deposit.light.perform.DepositPerformLightFragment$setPresets$items$2;\n r3.<init>(r0);\n r3 = (kotlin.jvm.a.b) r3;\n r1 = kotlin.sequences.n.f(r1, r3);\n if (r1 == 0) goto L_0x0051;\n L_0x004c:\n r1 = kotlin.sequences.n.f(r1);\n goto L_0x0052;\n L_0x0051:\n r1 = r2;\n L_0x0052:\n r3 = r12.asr();\n if (r1 == 0) goto L_0x0059;\n L_0x0058:\n goto L_0x005d;\n L_0x0059:\n r1 = kotlin.collections.m.emptyList();\n L_0x005d:\n r4 = r12.bub;\n if (r4 == 0) goto L_0x006d;\n L_0x0061:\n r5 = 0;\n r6 = 0;\n r7 = 1;\n r8 = 0;\n r9 = 0;\n r10 = 19;\n r11 = 0;\n r2 = com.iqoption.core.util.e.a(r4, r5, r6, r7, r8, r9, r10, r11);\n L_0x006d:\n r3.c(r1, r2);\n r12.d(r0);\n L_0x0073:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.iqoption.deposit.light.perform.c.asx():void\");\n }", "private final com.google.android.play.p179a.p352a.ae m28545b(com.google.protobuf.nano.a r8) {\n /*\n r7 = this;\n r6 = 1048576; // 0x100000 float:1.469368E-39 double:5.180654E-318;\n L_0x0002:\n r0 = r8.a();\n switch(r0) {\n case 0: goto L_0x000f;\n case 8: goto L_0x0010;\n case 18: goto L_0x001d;\n case 24: goto L_0x002a;\n case 34: goto L_0x0037;\n case 42: goto L_0x0044;\n case 50: goto L_0x0051;\n case 58: goto L_0x005e;\n case 66: goto L_0x006b;\n case 74: goto L_0x0078;\n case 82: goto L_0x0086;\n case 90: goto L_0x0094;\n case 98: goto L_0x00a2;\n case 106: goto L_0x00b0;\n case 114: goto L_0x00be;\n case 122: goto L_0x00cc;\n case 130: goto L_0x00dc;\n case 138: goto L_0x00eb;\n case 144: goto L_0x00fa;\n case 152: goto L_0x0108;\n case 160: goto L_0x0117;\n case 168: goto L_0x0126;\n default: goto L_0x0009;\n };\n L_0x0009:\n r0 = super.m4918a(r8, r0);\n if (r0 != 0) goto L_0x0002;\n L_0x000f:\n return r7;\n L_0x0010:\n r0 = r8.j();\n r7.f30754b = r0;\n r0 = r7.f30753a;\n r0 = r0 | 1;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x001d:\n r0 = r8.f();\n r7.f30755c = r0;\n r0 = r7.f30753a;\n r0 = r0 | 2;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x002a:\n r0 = r8.i();\n r7.f30757e = r0;\n r0 = r7.f30753a;\n r0 = r0 | 8;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x0037:\n r0 = r8.f();\n r7.f30758f = r0;\n r0 = r7.f30753a;\n r0 = r0 | 16;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x0044:\n r0 = r8.f();\n r7.f30759g = r0;\n r0 = r7.f30753a;\n r0 = r0 | 32;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x0051:\n r0 = r8.f();\n r7.f30762j = r0;\n r0 = r7.f30753a;\n r0 = r0 | 256;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x005e:\n r0 = r8.f();\n r7.f30763k = r0;\n r0 = r7.f30753a;\n r0 = r0 | 512;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x006b:\n r0 = r8.f();\n r7.f30760h = r0;\n r0 = r7.f30753a;\n r0 = r0 | 64;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x0078:\n r0 = r8.f();\n r7.f30761i = r0;\n r0 = r7.f30753a;\n r0 = r0 | 128;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x0086:\n r0 = r8.f();\n r7.f30764l = r0;\n r0 = r7.f30753a;\n r0 = r0 | 1024;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x0094:\n r0 = r8.f();\n r7.f30765m = r0;\n r0 = r7.f30753a;\n r0 = r0 | 2048;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x00a2:\n r0 = r8.f();\n r7.f30766n = r0;\n r0 = r7.f30753a;\n r0 = r0 | 4096;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x00b0:\n r0 = r8.f();\n r7.f30767o = r0;\n r0 = r7.f30753a;\n r0 = r0 | 8192;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x00be:\n r0 = r8.f();\n r7.f30768p = r0;\n r0 = r7.f30753a;\n r0 = r0 | 16384;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x00cc:\n r0 = r8.f();\n r7.f30769q = r0;\n r0 = r7.f30753a;\n r1 = 32768; // 0x8000 float:4.5918E-41 double:1.61895E-319;\n r0 = r0 | r1;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x00dc:\n r0 = r8.f();\n r7.f30770r = r0;\n r0 = r7.f30753a;\n r1 = 65536; // 0x10000 float:9.18355E-41 double:3.2379E-319;\n r0 = r0 | r1;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x00eb:\n r0 = r8.f();\n r7.f30771s = r0;\n r0 = r7.f30753a;\n r1 = 131072; // 0x20000 float:1.83671E-40 double:6.47582E-319;\n r0 = r0 | r1;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x00fa:\n r0 = r8.j();\n r7.f30756d = r0;\n r0 = r7.f30753a;\n r0 = r0 | 4;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x0108:\n r0 = r8.i();\n r7.f30772t = r0;\n r0 = r7.f30753a;\n r1 = 262144; // 0x40000 float:3.67342E-40 double:1.295163E-318;\n r0 = r0 | r1;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x0117:\n r0 = r8.e();\n r7.f30773u = r0;\n r0 = r7.f30753a;\n r1 = 524288; // 0x80000 float:7.34684E-40 double:2.590327E-318;\n r0 = r0 | r1;\n r7.f30753a = r0;\n goto L_0x0002;\n L_0x0126:\n r1 = r7.f30753a;\n r1 = r1 | r6;\n r7.f30753a = r1;\n r1 = r8.o();\n r2 = r8.i();\t Catch:{ IllegalArgumentException -> 0x0151 }\n switch(r2) {\n case 0: goto L_0x015a;\n case 1: goto L_0x015a;\n case 2: goto L_0x015a;\n default: goto L_0x0136;\n };\t Catch:{ IllegalArgumentException -> 0x0151 }\n L_0x0136:\n r3 = new java.lang.IllegalArgumentException;\t Catch:{ IllegalArgumentException -> 0x0151 }\n r4 = 48;\n r5 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x0151 }\n r5.<init>(r4);\t Catch:{ IllegalArgumentException -> 0x0151 }\n r2 = r5.append(r2);\t Catch:{ IllegalArgumentException -> 0x0151 }\n r4 = \" is not a valid enum PairedDeviceType\";\n r2 = r2.append(r4);\t Catch:{ IllegalArgumentException -> 0x0151 }\n r2 = r2.toString();\t Catch:{ IllegalArgumentException -> 0x0151 }\n r3.<init>(r2);\t Catch:{ IllegalArgumentException -> 0x0151 }\n throw r3;\t Catch:{ IllegalArgumentException -> 0x0151 }\n L_0x0151:\n r2 = move-exception;\n r8.e(r1);\n r7.m4918a(r8, r0);\n goto L_0x0002;\n L_0x015a:\n r7.f30774v = r2;\t Catch:{ IllegalArgumentException -> 0x0151 }\n r2 = r7.f30753a;\t Catch:{ IllegalArgumentException -> 0x0151 }\n r2 = r2 | r6;\n r7.f30753a = r2;\t Catch:{ IllegalArgumentException -> 0x0151 }\n goto L_0x0002;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.play.a.a.ae.b(com.google.protobuf.nano.a):com.google.android.play.a.a.ae\");\n }", "@Override // X.AnonymousClass0PN\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public void A0D() {\n /*\n r5 = this;\n super.A0D()\n X.08d r0 = r5.A05\n X.0OQ r4 = r0.A04()\n X.0Rk r3 = r4.A00() // Catch:{ all -> 0x003d }\n X.0BK r2 = r4.A04 // Catch:{ all -> 0x0036 }\n java.lang.String r1 = \"DELETE FROM receipt_device\"\n java.lang.String r0 = \"CLEAR_TABLE_RECEIPT_DEVICE\"\n r2.A0C(r1, r0) // Catch:{ all -> 0x0036 }\n X.08m r1 = r5.A03 // Catch:{ all -> 0x0036 }\n java.lang.String r0 = \"receipt_device_migration_complete\"\n r1.A02(r0) // Catch:{ all -> 0x0036 }\n java.lang.String r0 = \"migration_receipt_device_index\"\n r1.A02(r0) // Catch:{ all -> 0x0036 }\n java.lang.String r0 = \"migration_receipt_device_retry\"\n r1.A02(r0) // Catch:{ all -> 0x0036 }\n r3.A00() // Catch:{ all -> 0x0036 }\n r3.close()\n r4.close()\n java.lang.String r0 = \"ReceiptDeviceStore/ReceiptDeviceDatabaseMigration/resetMigration/done\"\n com.whatsapp.util.Log.i(r0)\n return\n L_0x0036:\n r0 = move-exception\n throw r0 // Catch:{ all -> 0x0038 }\n L_0x0038:\n r0 = move-exception\n r3.close() // Catch:{ all -> 0x003c }\n L_0x003c:\n throw r0\n L_0x003d:\n r0 = move-exception\n throw r0 // Catch:{ all -> 0x003f }\n L_0x003f:\n r0 = move-exception\n r4.close() // Catch:{ all -> 0x0043 }\n L_0x0043:\n throw r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: X.C43661yk.A0D():void\");\n }", "private final com.google.android.play.p179a.p352a.C6210u m28673b(com.google.protobuf.nano.a r7) {\n /*\n r6 = this;\n L_0x0000:\n r0 = r7.a();\n switch(r0) {\n case 0: goto L_0x000d;\n case 10: goto L_0x000e;\n case 16: goto L_0x001b;\n case 26: goto L_0x0058;\n case 34: goto L_0x0065;\n case 42: goto L_0x0072;\n default: goto L_0x0007;\n };\n L_0x0007:\n r0 = super.m4918a(r7, r0);\n if (r0 != 0) goto L_0x0000;\n L_0x000d:\n return r6;\n L_0x000e:\n r0 = r7.f();\n r6.f31049b = r0;\n r0 = r6.f31048a;\n r0 = r0 | 1;\n r6.f31048a = r0;\n goto L_0x0000;\n L_0x001b:\n r1 = r6.f31048a;\n r1 = r1 | 2;\n r6.f31048a = r1;\n r1 = r7.o();\n r2 = r7.i();\t Catch:{ IllegalArgumentException -> 0x0047 }\n switch(r2) {\n case 0: goto L_0x004f;\n case 1: goto L_0x004f;\n case 2: goto L_0x004f;\n case 3: goto L_0x004f;\n case 4: goto L_0x004f;\n case 5: goto L_0x004f;\n case 6: goto L_0x004f;\n default: goto L_0x002c;\n };\t Catch:{ IllegalArgumentException -> 0x0047 }\n L_0x002c:\n r3 = new java.lang.IllegalArgumentException;\t Catch:{ IllegalArgumentException -> 0x0047 }\n r4 = 38;\n r5 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x0047 }\n r5.<init>(r4);\t Catch:{ IllegalArgumentException -> 0x0047 }\n r2 = r5.append(r2);\t Catch:{ IllegalArgumentException -> 0x0047 }\n r4 = \" is not a valid enum OsType\";\n r2 = r2.append(r4);\t Catch:{ IllegalArgumentException -> 0x0047 }\n r2 = r2.toString();\t Catch:{ IllegalArgumentException -> 0x0047 }\n r3.<init>(r2);\t Catch:{ IllegalArgumentException -> 0x0047 }\n throw r3;\t Catch:{ IllegalArgumentException -> 0x0047 }\n L_0x0047:\n r2 = move-exception;\n r7.e(r1);\n r6.m4918a(r7, r0);\n goto L_0x0000;\n L_0x004f:\n r6.f31050c = r2;\t Catch:{ IllegalArgumentException -> 0x0047 }\n r2 = r6.f31048a;\t Catch:{ IllegalArgumentException -> 0x0047 }\n r2 = r2 | 2;\n r6.f31048a = r2;\t Catch:{ IllegalArgumentException -> 0x0047 }\n goto L_0x0000;\n L_0x0058:\n r0 = r7.f();\n r6.f31051d = r0;\n r0 = r6.f31048a;\n r0 = r0 | 4;\n r6.f31048a = r0;\n goto L_0x0000;\n L_0x0065:\n r0 = r7.f();\n r6.f31052e = r0;\n r0 = r6.f31048a;\n r0 = r0 | 8;\n r6.f31048a = r0;\n goto L_0x0000;\n L_0x0072:\n r0 = r7.f();\n r6.f31053f = r0;\n r0 = r6.f31048a;\n r0 = r0 | 16;\n r6.f31048a = r0;\n goto L_0x0000;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.play.a.a.u.b(com.google.protobuf.nano.a):com.google.android.play.a.a.u\");\n }", "@Override\n public void func_104112_b() {\n \n }", "protected int b(i var1_1, y.c.q var2_2, y.c.q var3_3, h var4_4, h var5_5, int var6_6, ArrayList var7_7, ArrayList var8_8, h var9_9, h var10_10) {\n block26 : {\n block25 : {\n var24_11 = o.p;\n this.c = var6_6;\n this.d = var2_2;\n this.e = var3_3;\n this.n = var1_1.h();\n this.o = var1_1.f();\n this.h = var1_1;\n this.i = new int[this.n];\n this.j = new int[this.n];\n this.k = new int[this.o];\n this.l = new int[this.o];\n this.m = new int[this.n];\n this.b = new Object[this.o];\n this.t = new int[this.n];\n this.r = new d[this.n];\n this.s = new d[this.n];\n this.f = var4_4;\n this.a = new a[this.n];\n this.q = new ArrayList<E>(var1_1.f());\n this.p = new I(this.o);\n var11_12 = 0;\n block0 : do {\n v0 = var11_12;\n block1 : while (v0 < var7_7.size()) {\n var12_15 = (a)var7_7.get(var11_12);\n v1 /* !! */ = var12_15.b();\n if (var24_11) break block25;\n var13_17 = v1 /* !! */ ;\n while (var13_17.f()) {\n var14_20 = var13_17.a();\n var15_23 = var14_20.b();\n this.a[var14_20.b()] = var12_15;\n this.i[var15_23] = var12_15.a();\n v0 = this.i[var15_23];\n if (var24_11) continue block1;\n if (v0 < 0) {\n throw new B(\"found negative capacity\");\n }\n var13_17.g();\n if (!var24_11) continue;\n }\n ++var11_12;\n if (!var24_11) continue block0;\n }\n break block0;\n break;\n } while (true);\n v1 /* !! */ = var11_13 = this.h.p();\n }\n while (var11_13.f()) {\n var12_15 = var11_13.a();\n this.r[var12_15.b()] = (d)var10_10.b(var12_15);\n this.s[var12_15.b()] = (d)var9_9.b(var12_15);\n var11_13.g();\n if (!var24_11) {\n if (!var24_11) continue;\n }\n break block26;\n }\n this.g = new u[this.o];\n }\n var11_13 = var1_1.o();\n while (var11_13.f()) {\n var12_15 = var11_13.e();\n v2 = this;\n if (!var24_11) {\n v2.g[var12_15.d()] = new u((y.c.q)var12_15, var12_15.d());\n var11_13.g();\n if (!var24_11) continue;\n }\n ** GOTO lbl65\n }\n block5 : do {\n v2 = this;\nlbl65: // 2 sources:\n var11_14 = var13_18 = v2.a();\n var12_16 = 0;\n var14_21 = 0;\n block6 : do {\n v3 = var14_21;\n v4 = var8_8.size();\n block7 : while (v3 < v4) {\n v5 = var8_8.get(var14_21);\n do {\n var15_24 = (ArrayList)v5;\n var16_26 = false;\n var17_27 = 0;\n var18_28 = 0;\n v6 = 0;\n if (!var24_11) {\n for (var19_29 = v1574606; var19_29 < var15_24.size(); ++var19_29) {\n block28 : {\n block27 : {\n var20_30 = (a)var15_24.get(var19_29);\n v3 = this.m[var20_30.b[0].b()];\n v4 = 1;\n if (var24_11) continue block7;\n if (v3 != v4 || this.m[var20_30.b[1].b()] != 1) continue;\n ++var12_16;\n var21_31 = this.s[var20_30.b[0].b()];\n var22_32 = 0;\n while (this.m[var21_31.b()] == 1) {\n var22_32 += var4_4.a(this.a[var21_31.b()].b(var21_31));\n var21_31 = this.s[var21_31.b()];\n if (!var24_11) {\n if (!var24_11) continue;\n }\n break block27;\n }\n var22_32 += var4_4.a(this.a[var21_31.b()].b(var21_31));\n }\n var23_33 = 0;\n var21_31 = this.s[var20_30.b[1].b()];\n while (this.m[var21_31.b()] == 1) {\n var23_33 += var4_4.a(this.a[var21_31.b()].b(var21_31));\n var21_31 = this.s[var21_31.b()];\n if (!var24_11) {\n if (!var24_11) continue;\n }\n break block28;\n }\n var23_33 += var4_4.a(this.a[var21_31.b()].b(var21_31));\n }\n if (var23_33 > 400 || var22_32 > 400) {\n block29 : {\n if (var23_33 < var22_32) {\n this.a(var20_30);\n if (!var24_11) break block29;\n }\n this.b(var20_30);\n }\n var16_26 = true;\n }\n var18_28 += var23_33;\n var17_27 += var22_32;\n if (!var24_11) continue;\n }\n if (!var16_26) {\n for (var19_29 = 0; var19_29 < var15_24.size(); ++var19_29) {\n var20_30 = (a)var15_24.get(var19_29);\n v3 = this.m[var20_30.b[0].b()];\n v4 = 1;\n if (var24_11) continue block7;\n if (v3 != v4 || this.m[var20_30.b[1].b()] != 1) continue;\n if (var18_28 < var17_27) {\n this.a(var20_30);\n if (!var24_11) continue;\n }\n this.b(var20_30);\n if (!var24_11) continue;\n }\n }\n ++var14_21;\n if (!var24_11) continue block6;\n }\n ** GOTO lbl133\n v6 = var12_16;\nlbl133: // 2 sources:\n if (v6 > 0) continue block5;\n v5 = this.h.p();\n } while (var24_11);\n }\n break;\n } while (true);\n break;\n } while (true);\n var13_19 = v5;\n while (var13_19.f()) {\n var14_22 = var13_19.a();\n v7 = var14_22.b();\n if (var24_11 != false) return v7;\n var15_25 = v7;\n var5_5.a((Object)var14_22, this.m[var15_25]);\n var13_19.g();\n if (!var24_11) continue;\n }\n v7 = var11_14;\n return v7;\n }", "private void m14210a(java.io.IOException r4, java.io.IOException r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r3 = this;\n r0 = f12370a;\n if (r0 == 0) goto L_0x000f;\n L_0x0004:\n r0 = f12370a;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1 = 1;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1 = new java.lang.Object[r1];\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r2 = 0;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1[r2] = r5;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r0.invoke(r4, r1);\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n L_0x000f:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.internal.connection.RouteException.a(java.io.IOException, java.io.IOException):void\");\n }", "public boolean //##78\n divideHirIntoBasicBlocks()\n {\n HirIterator lHirIterator;\n HIR lNode, // Current node.\n lParent; // Parent of lNode.\n coins.sym.Sym lSym;\n FlowAnalSym lFlowAnalSym;\n int lNodeIndex;\n Label lLabel, lSubpBlockLabel;\n BBlock lBBlock; // BBlock most recently created.\n IrList lLabelDefList;\n Subp lSubp;\n BlockStmt lSubpBody; // Block as the HIR body of subprogram.\n //## LabeledStmt lSubpBodyWithLabel;\n\n if (fDbgLevel > 0)\n ioRoot.dbgFlow.print(2, \"divideHirIntoBasicBlocks \",\n flowRoot.subpUnderAnalysis.getName() + \" fIrIndexMin \" +\n fIrIndexMin + \" Max \" + fIrIndexMax); //##62\n recordBBlock(bblock(), 0); //Avoid IndexOutofRangeException\n //##62 BEGIN\n lSubp = fSubpDefinition.getSubpSym();\n fNodeCount = fIrIndexMax - fIrIndexMin + 1;\n fFlowIrLinkSize = fNodeCount + 1; //##62\n fFlowIrLink = new IR[fFlowIrLinkSize];\n lBBlock = null; // Record a basic block created.\n boolean lImmediatelyAfterJumpReturn = false; //##63\n //##62 END\n\n //-- Assign index number to symbols actually used in current\n // subprogram setting index to each node.\n // Make label reference list for labels that are explicitly\n // refered as jump target.\n for (lHirIterator = hirRoot.hir.hirIterator(fSubpDefinition.getHirBody());\n lHirIterator.hasNext(); ) {\n lNode = lHirIterator.next();\n if (lNode != null) {\n if (fDbgLevel > 3)\n ioRoot.dbgFlow.print(6, \" lNode\", lNode.toStringShort());\n lSym = lNode.getSym();\n if (lSym != null) {\n if (lSym instanceof FlowAnalSym) {\n lFlowAnalSym = (FlowAnalSym)lSym;\n if (lFlowAnalSym.getIndex() == 0) {\n recordSym(lFlowAnalSym); //##62\n }else {\n if (fDbgLevel > 0)\n flow.dbg(6, \" \" + lFlowAnalSym.getName()+\n \":\" + lFlowAnalSym.getIndex());\n }\n }\n }\n\n //##63 BEG\n lNodeIndex = lNode.getIndex();\n //##78 BEGIN\n if (lNodeIndex < fIrIndexMin) {\n ioRoot.msgRecovered.put(5010, \"\\nNode index \" + lNodeIndex\n + \" should be greater or equal to \" + fIrIndexMin\n + \" in \" + fSubpDefinition.getSubpSym().getName()\n + \"\\n Skip the flow analysis and the optimization.\");\n return false;\n }\n //##78 END\n fFlowIrLink[lNodeIndex - fIrIndexMin] = lNode; //##60\n fBBlockOfIR[lNodeIndex - fIrIndexMin] = lBBlock; //##60\n if (lImmediatelyAfterJumpReturn &&\n (lNode.getOperator() != HIR.OP_LABELED_STMT)) {\n continue; // Control does not come here.\n }\n lImmediatelyAfterJumpReturn = false;\n //##63 END\n switch (lNode.getOperator()) {\n case HIR.OP_LABELED_STMT:\n lBBlock = bblock((LabeledStmt)lNode); // Create a basic block.\n fBBlockOfIR[lNodeIndex - fIrIndexMin] = lBBlock; // Store again. //##65\n //## lSubp.addBBlock(lBBlock); // DELETE\n lLabelDefList = ((LabeledStmt)lNode).getLabelDefList();\n if (lLabelDefList != null) {\n for (Iterator lIterator = lLabelDefList.iterator();\n lIterator.hasNext(); ) { // Set link between HIR & Label.\n lLabel = ((coins.ir.hir.LabelDef)(lIterator.next())).getLabel();\n //##60 lLabel.setBBlock(lBBlock);\n flowRoot.fSubpFlow.setBBlock(lLabel, lBBlock); //##60\n }\n }\n lImmediatelyAfterJumpReturn = false;\n break;\n // begin\n case HIR.OP_CONTENTS:\n lParent = (HIR)lNode.getParent();\n if (lParent.getOperator() == HIR.OP_ASSIGN)\n lBBlock.setFlag(BBlock.HAS_PTR_ASSIGN, true);\n case HIR.OP_ARROW:\n case HIR.OP_ADDR:\n lBBlock.setFlag(BBlock.USE_PTR, true);\n break;\n case HIR.OP_QUAL:\n lBBlock.setFlag(BBlock.HAS_STRUCT_UNION, true);\n break;\n case HIR.OP_CALL:\n lBBlock.setFlag(BBlock.HAS_CALL, true);\n //##62 hasCallInSubp = true; //##62\n //##63 BEGIN\n fCallCount++; //##62\n fSubtreesContainingCall.add(lNode);\n for (HIR lHir = (HIR)lNode.getParent(); lHir != null;\n lHir = (HIR)lHir.getParent()) {\n fSubtreesContainingCall.add(lNode);\n }\n //##63 END\n break;\n //##62 BEGIN\n case HIR.OP_ASSIGN:\n fAssignCount++;\n break;\n case HIR.OP_JUMP:\n lLabel = ((JumpStmt)lNode).getLabel();\n //##62 lLabel.addToHirRefList((LabelNode)((JumpStmt)lNode).getChild1());\n lImmediatelyAfterJumpReturn = true; //##63\n ((BBlockImpl)lBBlock).fControlTransfer = lNode; //##73\n break;\n case HIR.OP_RETURN: //##63\n lImmediatelyAfterJumpReturn = true; //##63\n ((BBlockImpl)lBBlock).fControlTransfer = lNode; //##73\n break;\n case HIR.OP_SWITCH:\n SwitchStmt lSwitchStmt = (SwitchStmt)lNode;\n int lCaseCount = lSwitchStmt.getCaseCount();\n for (int i = 0; i < lCaseCount; i++) {\n lLabel = lSwitchStmt.getCaseLabel(i);\n //##62 if (lLabel != null)\n //##62 lLabel.addToHirRefList(lSwitchStmt.getCaseLabelNode(i));\n }\n //##62 lSwitchStmt.getDefaultLabel().addToHirRefList((LabelNode)((SwitchStmt)\n //##62 lNode).getDefaultLabelNode());\n //##62 END\n default:\n break;\n // end\n } // End of switch\n //##63 lNodeIndex = lNode.getIndex();\n //##60 fFlowIrLink[lNodeIndex - fIndexMin] =\n //##60 (FlowIrLinkCell)(new FlowIrLinkCellImpl(lNode, lBBlock, 0));\n //##63 fFlowIrLink[lNodeIndex - fIrIndexMin] = lNode; //##60\n //##63 fBBlockOfIR[lNodeIndex - fIrIndexMin] = lBBlock; //##60\n } // End of if(lNode != null)\n }\n //##62 BEGIN\n fUsedSymCount = fSymExpCount;\n if (fDbgLevel > 0)\n ioRoot.dbgFlow.print(2, lSubp.getName() +\n \" Number of\", \"Symbols:\" +\n fUsedSymCount + \" Nodes:\" + fNodeCount + \" \");\n fExpVectorBitCount = fUsedSymCount + 2; //##60\n fExpVectorWordCount = (fExpVectorBitCount + 63) / 64; //##60\n\n int lNodeCount = fIrIndexMax - fIrIndexMin;\n if (lNodeCount > fNodeCountLim1)\n fComplexity = 2;\n if (fSymExpCount > fSymCountLim1)\n fComplexity = 2;\n if (lNodeCount > fNodeCountLim2)\n fComplexity = 3;\n if (fSymExpCount > fSymCountLim2)\n fComplexity = 3;\n //##62 END\n if (fDbgLevel > 0) {\n //### fComplexity = 3; //###\n flowRoot.ioRoot.dbgFlow.print(1, \"\\n Node count \" +\n lNodeCount + \" BBlock count \" + getNumberOfBBlocks()+\n \" UsedSymCount \" + getUsedSymCount() + \" SymExpCount \" + getSymExpCount()\n + \"\\n AssignCount \" + getAssignCount()\n + \" CallCount \" + getCallCount()); //##62\n ioRoot.dbgFlow.print(1, \"\\nComplexity level of \",\n getSubpSym().getName() + \" is \" + fComplexity);\n if (fComplexity > 1)\n ioRoot.dbgFlow.print(1, \"\\n Simplify alias analysis.\");\n if (fComplexity > 2)\n ioRoot.dbgFlow.print(1, \"\\n Simplify data flow analysis.\");\n }\n setComputedFlag(CF_BBLOCK); //##60\n return true; //##78\n }", "private final com.google.wireless.android.finsky.dfe.p513g.p514a.C7467r m35669b(com.google.protobuf.nano.C7213a r8) {\n /*\n r7 = this;\n r1 = 0;\n L_0x0001:\n r0 = r8.m33550a();\n switch(r0) {\n case 0: goto L_0x000e;\n case 10: goto L_0x000f;\n case 18: goto L_0x001c;\n case 26: goto L_0x0029;\n case 34: goto L_0x003c;\n case 42: goto L_0x0050;\n case 50: goto L_0x0064;\n case 82: goto L_0x0078;\n case 98: goto L_0x008e;\n case 138: goto L_0x00a4;\n case 146: goto L_0x00b9;\n case 152: goto L_0x00c7;\n case 162: goto L_0x0106;\n case 170: goto L_0x011c;\n case 178: goto L_0x012e;\n case 184: goto L_0x0143;\n case 192: goto L_0x0151;\n case 218: goto L_0x015f;\n case 226: goto L_0x0171;\n case 234: goto L_0x0187;\n case 258: goto L_0x019d;\n case 266: goto L_0x01b3;\n case 274: goto L_0x01c8;\n case 290: goto L_0x01de;\n case 298: goto L_0x021e;\n case 306: goto L_0x022c;\n default: goto L_0x0008;\n };\n L_0x0008:\n r0 = super.a(r8, r0);\n if (r0 != 0) goto L_0x0001;\n L_0x000e:\n return r7;\n L_0x000f:\n r0 = r8.m33564f();\n r7.f37912d = r0;\n r0 = r7.f37911c;\n r0 = r0 | 1;\n r7.f37911c = r0;\n goto L_0x0001;\n L_0x001c:\n r0 = r8.m33564f();\n r7.f37914f = r0;\n r0 = r7.f37911c;\n r0 = r0 | 4;\n r7.f37911c = r0;\n goto L_0x0001;\n L_0x0029:\n r0 = r7.f37916h;\n if (r0 != 0) goto L_0x0034;\n L_0x002d:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.c;\n r0.<init>();\n r7.f37916h = r0;\n L_0x0034:\n r0 = r7.f37916h;\n r8.m33552a(r0);\n r7.f37910a = r1;\n goto L_0x0001;\n L_0x003c:\n r0 = r7.f37917i;\n if (r0 != 0) goto L_0x0047;\n L_0x0040:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.z;\n r0.<init>();\n r7.f37917i = r0;\n L_0x0047:\n r0 = r7.f37917i;\n r8.m33552a(r0);\n r0 = 1;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x0050:\n r0 = r7.f37919k;\n if (r0 != 0) goto L_0x005b;\n L_0x0054:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.f;\n r0.<init>();\n r7.f37919k = r0;\n L_0x005b:\n r0 = r7.f37919k;\n r8.m33552a(r0);\n r0 = 3;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x0064:\n r0 = r7.f37922n;\n if (r0 != 0) goto L_0x006f;\n L_0x0068:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.o;\n r0.<init>();\n r7.f37922n = r0;\n L_0x006f:\n r0 = r7.f37922n;\n r8.m33552a(r0);\n r0 = 6;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x0078:\n r0 = r7.f37924p;\n if (r0 != 0) goto L_0x0083;\n L_0x007c:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.d;\n r0.<init>();\n r7.f37924p = r0;\n L_0x0083:\n r0 = r7.f37924p;\n r8.m33552a(r0);\n r0 = 8;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x008e:\n r0 = r7.f37926r;\n if (r0 != 0) goto L_0x0099;\n L_0x0092:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.n;\n r0.<init>();\n r7.f37926r = r0;\n L_0x0099:\n r0 = r7.f37926r;\n r8.m33552a(r0);\n r0 = 10;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x00a4:\n r0 = r7.f37923o;\n if (r0 != 0) goto L_0x00af;\n L_0x00a8:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.q;\n r0.<init>();\n r7.f37923o = r0;\n L_0x00af:\n r0 = r7.f37923o;\n r8.m33552a(r0);\n r0 = 7;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x00b9:\n r0 = r8.m33565g();\n r7.f37931w = r0;\n r0 = r7.f37911c;\n r0 = r0 | 16;\n r7.f37911c = r0;\n goto L_0x0001;\n L_0x00c7:\n r2 = r7.f37911c;\n r2 = r2 | 2;\n r7.f37911c = r2;\n r2 = r8.m33573o();\n r3 = r8.m33567i();\t Catch:{ IllegalArgumentException -> 0x00f3 }\n switch(r3) {\n case 0: goto L_0x00fc;\n case 101: goto L_0x00fc;\n case 102: goto L_0x00fc;\n case 103: goto L_0x00fc;\n case 105: goto L_0x00fc;\n case 106: goto L_0x00fc;\n case 107: goto L_0x00fc;\n case 108: goto L_0x00fc;\n case 109: goto L_0x00fc;\n case 111: goto L_0x00fc;\n case 112: goto L_0x00fc;\n case 113: goto L_0x00fc;\n case 114: goto L_0x00fc;\n case 115: goto L_0x00fc;\n case 116: goto L_0x00fc;\n case 117: goto L_0x00fc;\n case 118: goto L_0x00fc;\n case 119: goto L_0x00fc;\n case 120: goto L_0x00fc;\n case 201: goto L_0x00fc;\n case 202: goto L_0x00fc;\n case 203: goto L_0x00fc;\n case 204: goto L_0x00fc;\n case 205: goto L_0x00fc;\n case 206: goto L_0x00fc;\n case 207: goto L_0x00fc;\n case 209: goto L_0x00fc;\n case 210: goto L_0x00fc;\n case 211: goto L_0x00fc;\n case 212: goto L_0x00fc;\n case 213: goto L_0x00fc;\n case 214: goto L_0x00fc;\n case 215: goto L_0x00fc;\n case 217: goto L_0x00fc;\n case 218: goto L_0x00fc;\n case 219: goto L_0x00fc;\n case 220: goto L_0x00fc;\n case 221: goto L_0x00fc;\n case 222: goto L_0x00fc;\n case 223: goto L_0x00fc;\n case 224: goto L_0x00fc;\n case 301: goto L_0x00fc;\n case 302: goto L_0x00fc;\n case 304: goto L_0x00fc;\n case 305: goto L_0x00fc;\n case 307: goto L_0x00fc;\n case 309: goto L_0x00fc;\n case 310: goto L_0x00fc;\n case 311: goto L_0x00fc;\n case 312: goto L_0x00fc;\n case 313: goto L_0x00fc;\n case 314: goto L_0x00fc;\n case 316: goto L_0x00fc;\n case 317: goto L_0x00fc;\n case 318: goto L_0x00fc;\n case 319: goto L_0x00fc;\n case 320: goto L_0x00fc;\n case 321: goto L_0x00fc;\n case 322: goto L_0x00fc;\n case 323: goto L_0x00fc;\n case 324: goto L_0x00fc;\n case 325: goto L_0x00fc;\n case 326: goto L_0x00fc;\n case 327: goto L_0x00fc;\n case 328: goto L_0x00fc;\n case 401: goto L_0x00fc;\n case 402: goto L_0x00fc;\n case 403: goto L_0x00fc;\n case 404: goto L_0x00fc;\n case 405: goto L_0x00fc;\n case 406: goto L_0x00fc;\n case 407: goto L_0x00fc;\n case 408: goto L_0x00fc;\n case 409: goto L_0x00fc;\n case 410: goto L_0x00fc;\n case 411: goto L_0x00fc;\n case 412: goto L_0x00fc;\n case 501: goto L_0x00fc;\n case 502: goto L_0x00fc;\n case 503: goto L_0x00fc;\n case 504: goto L_0x00fc;\n case 505: goto L_0x00fc;\n case 506: goto L_0x00fc;\n case 507: goto L_0x00fc;\n case 508: goto L_0x00fc;\n case 509: goto L_0x00fc;\n case 510: goto L_0x00fc;\n case 511: goto L_0x00fc;\n case 512: goto L_0x00fc;\n case 513: goto L_0x00fc;\n case 514: goto L_0x00fc;\n case 515: goto L_0x00fc;\n case 601: goto L_0x00fc;\n case 701: goto L_0x00fc;\n case 702: goto L_0x00fc;\n case 703: goto L_0x00fc;\n case 704: goto L_0x00fc;\n case 705: goto L_0x00fc;\n case 706: goto L_0x00fc;\n case 707: goto L_0x00fc;\n case 708: goto L_0x00fc;\n case 709: goto L_0x00fc;\n case 710: goto L_0x00fc;\n case 711: goto L_0x00fc;\n case 801: goto L_0x00fc;\n case 802: goto L_0x00fc;\n case 803: goto L_0x00fc;\n case 804: goto L_0x00fc;\n case 805: goto L_0x00fc;\n case 806: goto L_0x00fc;\n case 807: goto L_0x00fc;\n case 808: goto L_0x00fc;\n case 809: goto L_0x00fc;\n case 810: goto L_0x00fc;\n case 811: goto L_0x00fc;\n case 812: goto L_0x00fc;\n case 901: goto L_0x00fc;\n case 902: goto L_0x00fc;\n case 903: goto L_0x00fc;\n case 904: goto L_0x00fc;\n case 905: goto L_0x00fc;\n case 906: goto L_0x00fc;\n case 907: goto L_0x00fc;\n case 908: goto L_0x00fc;\n case 909: goto L_0x00fc;\n case 910: goto L_0x00fc;\n case 911: goto L_0x00fc;\n case 912: goto L_0x00fc;\n case 913: goto L_0x00fc;\n case 914: goto L_0x00fc;\n case 915: goto L_0x00fc;\n case 916: goto L_0x00fc;\n case 1001: goto L_0x00fc;\n case 1002: goto L_0x00fc;\n default: goto L_0x00d8;\n };\t Catch:{ IllegalArgumentException -> 0x00f3 }\n L_0x00d8:\n r4 = new java.lang.IllegalArgumentException;\t Catch:{ IllegalArgumentException -> 0x00f3 }\n r5 = 44;\n r6 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x00f3 }\n r6.<init>(r5);\t Catch:{ IllegalArgumentException -> 0x00f3 }\n r3 = r6.append(r3);\t Catch:{ IllegalArgumentException -> 0x00f3 }\n r5 = \" is not a valid enum RelationType\";\n r3 = r3.append(r5);\t Catch:{ IllegalArgumentException -> 0x00f3 }\n r3 = r3.toString();\t Catch:{ IllegalArgumentException -> 0x00f3 }\n r4.<init>(r3);\t Catch:{ IllegalArgumentException -> 0x00f3 }\n throw r4;\t Catch:{ IllegalArgumentException -> 0x00f3 }\n L_0x00f3:\n r3 = move-exception;\n r8.m33562e(r2);\n r7.a(r8, r0);\n goto L_0x0001;\n L_0x00fc:\n r7.f37913e = r3;\t Catch:{ IllegalArgumentException -> 0x00f3 }\n r3 = r7.f37911c;\t Catch:{ IllegalArgumentException -> 0x00f3 }\n r3 = r3 | 2;\n r7.f37911c = r3;\t Catch:{ IllegalArgumentException -> 0x00f3 }\n goto L_0x0001;\n L_0x0106:\n r0 = r7.f37927s;\n if (r0 != 0) goto L_0x0111;\n L_0x010a:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.m;\n r0.<init>();\n r7.f37927s = r0;\n L_0x0111:\n r0 = r7.f37927s;\n r8.m33552a(r0);\n r0 = 11;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x011c:\n r0 = r7.f37932x;\n if (r0 != 0) goto L_0x0127;\n L_0x0120:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.ag;\n r0.<init>();\n r7.f37932x = r0;\n L_0x0127:\n r0 = r7.f37932x;\n r8.m33552a(r0);\n goto L_0x0001;\n L_0x012e:\n r0 = r7.f37920l;\n if (r0 != 0) goto L_0x0139;\n L_0x0132:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.t;\n r0.<init>();\n r7.f37920l = r0;\n L_0x0139:\n r0 = r7.f37920l;\n r8.m33552a(r0);\n r0 = 4;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x0143:\n r0 = r8.m33560d();\n r7.f37933y = r0;\n r0 = r7.f37911c;\n r0 = r0 | 32;\n r7.f37911c = r0;\n goto L_0x0001;\n L_0x0151:\n r0 = r8.m33560d();\n r7.f37934z = r0;\n r0 = r7.f37911c;\n r0 = r0 | 64;\n r7.f37911c = r0;\n goto L_0x0001;\n L_0x015f:\n r0 = r7.f37908A;\n if (r0 != 0) goto L_0x016a;\n L_0x0163:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.k;\n r0.<init>();\n r7.f37908A = r0;\n L_0x016a:\n r0 = r7.f37908A;\n r8.m33552a(r0);\n goto L_0x0001;\n L_0x0171:\n r0 = r7.f37929u;\n if (r0 != 0) goto L_0x017c;\n L_0x0175:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.y;\n r0.<init>();\n r7.f37929u = r0;\n L_0x017c:\n r0 = r7.f37929u;\n r8.m33552a(r0);\n r0 = 13;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x0187:\n r0 = r7.f37928t;\n if (r0 != 0) goto L_0x0192;\n L_0x018b:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.b;\n r0.<init>();\n r7.f37928t = r0;\n L_0x0192:\n r0 = r7.f37928t;\n r8.m33552a(r0);\n r0 = 12;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x019d:\n r0 = r7.f37925q;\n if (r0 != 0) goto L_0x01a8;\n L_0x01a1:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.e;\n r0.<init>();\n r7.f37925q = r0;\n L_0x01a8:\n r0 = r7.f37925q;\n r8.m33552a(r0);\n r0 = 9;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x01b3:\n r0 = r7.f37921m;\n if (r0 != 0) goto L_0x01be;\n L_0x01b7:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.h;\n r0.<init>();\n r7.f37921m = r0;\n L_0x01be:\n r0 = r7.f37921m;\n r8.m33552a(r0);\n r0 = 5;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x01c8:\n r0 = r7.f37930v;\n if (r0 != 0) goto L_0x01d3;\n L_0x01cc:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.x;\n r0.<init>();\n r7.f37930v = r0;\n L_0x01d3:\n r0 = r7.f37930v;\n r8.m33552a(r0);\n r0 = 14;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x01de:\n r0 = 290; // 0x122 float:4.06E-43 double:1.433E-321;\n r2 = com.google.protobuf.nano.C7222l.m33624a(r8, r0);\n r0 = r7.f37909B;\n if (r0 != 0) goto L_0x020a;\n L_0x01e8:\n r0 = r1;\n L_0x01e9:\n r2 = r2 + r0;\n r2 = new com.google.wireless.android.finsky.dfe.p513g.p514a.C7468s[r2];\n if (r0 == 0) goto L_0x01f3;\n L_0x01ee:\n r3 = r7.f37909B;\n java.lang.System.arraycopy(r3, r1, r2, r1, r0);\n L_0x01f3:\n r3 = r2.length;\n r3 = r3 + -1;\n if (r0 >= r3) goto L_0x020e;\n L_0x01f8:\n r3 = new com.google.wireless.android.finsky.dfe.g.a.s;\n r3.<init>();\n r2[r0] = r3;\n r3 = r2[r0];\n r8.m33552a(r3);\n r8.m33550a();\n r0 = r0 + 1;\n goto L_0x01f3;\n L_0x020a:\n r0 = r7.f37909B;\n r0 = r0.length;\n goto L_0x01e9;\n L_0x020e:\n r3 = new com.google.wireless.android.finsky.dfe.g.a.s;\n r3.<init>();\n r2[r0] = r3;\n r0 = r2[r0];\n r8.m33552a(r0);\n r7.f37909B = r2;\n goto L_0x0001;\n L_0x021e:\n r0 = r8.m33564f();\n r7.f37915g = r0;\n r0 = r7.f37911c;\n r0 = r0 | 8;\n r7.f37911c = r0;\n goto L_0x0001;\n L_0x022c:\n r0 = r7.f37918j;\n if (r0 != 0) goto L_0x0237;\n L_0x0230:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.w;\n r0.<init>();\n r7.f37918j = r0;\n L_0x0237:\n r0 = r7.f37918j;\n r8.m33552a(r0);\n r0 = 2;\n r7.f37910a = r0;\n goto L_0x0001;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.wireless.android.finsky.dfe.g.a.r.b(com.google.protobuf.nano.a):com.google.wireless.android.finsky.dfe.g.a.r\");\n }", "@androidx.annotation.Nullable\n /* renamed from: j */\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public final p005b.p096l.p097a.p151d.p152a.p154b.C3474b mo14822j(java.lang.String r9) {\n /*\n r8 = this;\n java.io.File r0 = new java.io.File\n java.io.File r1 = r8.mo14820g()\n r0.<init>(r1, r9)\n boolean r1 = r0.exists()\n r2 = 3\n r3 = 6\n r4 = 1\n r5 = 0\n r6 = 0\n if (r1 != 0) goto L_0x0022\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r4]\n r1[r5] = r9\n java.lang.String r9 = \"Pack not found with pack name: %s\"\n r0.mo14884b(r2, r9, r1)\n L_0x001f:\n r9 = r6\n goto L_0x0093\n L_0x0022:\n java.io.File r1 = new java.io.File\n b.l.a.d.a.b.o1 r7 = r8.f6567b\n int r7 = r7.mo14797a()\n java.lang.String r7 = java.lang.String.valueOf(r7)\n r1.<init>(r0, r7)\n boolean r0 = r1.exists()\n r7 = 2\n if (r0 != 0) goto L_0x0050\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"Pack not found with pack name: %s app version: %s\"\n r0.mo14884b(r2, r9, r1)\n goto L_0x001f\n L_0x0050:\n java.io.File[] r0 = r1.listFiles()\n if (r0 == 0) goto L_0x007b\n int r1 = r0.length\n if (r1 != 0) goto L_0x005a\n goto L_0x007b\n L_0x005a:\n if (r1 <= r4) goto L_0x0074\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"Multiple pack versions found for pack name: %s app version: %s\"\n r0.mo14884b(r3, r9, r1)\n goto L_0x001f\n L_0x0074:\n r9 = r0[r5]\n java.lang.String r9 = r9.getCanonicalPath()\n goto L_0x0093\n L_0x007b:\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"No pack version found for pack name: %s app version: %s\"\n r0.mo14884b(r2, r9, r1)\n goto L_0x001f\n L_0x0093:\n if (r9 != 0) goto L_0x0096\n return r6\n L_0x0096:\n java.io.File r0 = new java.io.File\n java.lang.String r1 = \"assets\"\n r0.<init>(r9, r1)\n boolean r1 = r0.isDirectory()\n if (r1 != 0) goto L_0x00af\n b.l.a.d.a.e.f r9 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r4]\n r1[r5] = r0\n java.lang.String r0 = \"Failed to find assets directory: %s\"\n r9.mo14884b(r3, r0, r1)\n return r6\n L_0x00af:\n java.lang.String r0 = r0.getCanonicalPath()\n b.l.a.d.a.b.w r1 = new b.l.a.d.a.b.w\n r1.<init>(r5, r9, r0)\n return r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p005b.p096l.p097a.p151d.p152a.p154b.C3544t.mo14822j(java.lang.String):b.l.a.d.a.b.b\");\n }", "protected void method_2241() {\r\n // $FF: Couldn't be decompiled\r\n }", "public final void mo91715d() {\n }", "public void c() {\n /*\n r14 = this;\n io.b.o<? super U> r0 = r14.actual\n r1 = 1\n r2 = 1\n L_0x0004:\n boolean r3 = r14.d()\n if (r3 == 0) goto L_0x000b\n return\n L_0x000b:\n io.b.e.c.d<U> r3 = r14.queue\n if (r3 == 0) goto L_0x0023\n L_0x000f:\n boolean r4 = r14.d()\n if (r4 == 0) goto L_0x0016\n return\n L_0x0016:\n java.lang.Object r4 = r3.poll()\n if (r4 != 0) goto L_0x001f\n if (r4 != 0) goto L_0x000f\n goto L_0x0023\n L_0x001f:\n r0.a(r4)\n goto L_0x000f\n L_0x0023:\n boolean r3 = r14.done\n io.b.e.c.d<U> r4 = r14.queue\n java.util.concurrent.atomic.AtomicReference<io.b.e.e.d.i$a<?, ?>[]> r5 = r14.observers\n java.lang.Object r5 = r5.get()\n io.b.e.e.d.i$a[] r5 = (io.b.e.e.d.i.a[]) r5\n int r6 = r5.length\n int r7 = r14.maxConcurrency\n r8 = 2147483647(0x7fffffff, float:NaN)\n r9 = 0\n if (r7 == r8) goto L_0x0044\n monitor-enter(r14)\n java.util.Queue<io.b.m<? extends U>> r7 = r14.sources // Catch:{ all -> 0x0041 }\n int r7 = r7.size() // Catch:{ all -> 0x0041 }\n monitor-exit(r14) // Catch:{ all -> 0x0041 }\n goto L_0x0045\n L_0x0041:\n r0 = move-exception\n monitor-exit(r14) // Catch:{ all -> 0x0041 }\n throw r0\n L_0x0044:\n r7 = 0\n L_0x0045:\n if (r3 == 0) goto L_0x0067\n if (r4 == 0) goto L_0x004f\n boolean r3 = r4.isEmpty()\n if (r3 == 0) goto L_0x0067\n L_0x004f:\n if (r6 != 0) goto L_0x0067\n if (r7 != 0) goto L_0x0067\n io.b.e.h.c r1 = r14.errors\n java.lang.Throwable r1 = r1.a()\n java.lang.Throwable r2 = io.b.e.h.f.f33557a\n if (r1 == r2) goto L_0x0066\n if (r1 != 0) goto L_0x0063\n r0.a()\n goto L_0x0066\n L_0x0063:\n r0.a((java.lang.Throwable) r1)\n L_0x0066:\n return\n L_0x0067:\n if (r6 == 0) goto L_0x0106\n long r3 = r14.lastId\n int r7 = r14.lastIndex\n if (r6 <= r7) goto L_0x0077\n r10 = r5[r7]\n long r10 = r10.id\n int r12 = (r10 > r3 ? 1 : (r10 == r3 ? 0 : -1))\n if (r12 == 0) goto L_0x0098\n L_0x0077:\n if (r6 > r7) goto L_0x007a\n r7 = 0\n L_0x007a:\n r10 = r7\n r7 = 0\n L_0x007c:\n if (r7 >= r6) goto L_0x008f\n r11 = r5[r10]\n long r11 = r11.id\n int r13 = (r11 > r3 ? 1 : (r11 == r3 ? 0 : -1))\n if (r13 != 0) goto L_0x0087\n goto L_0x008f\n L_0x0087:\n int r10 = r10 + 1\n if (r10 != r6) goto L_0x008c\n r10 = 0\n L_0x008c:\n int r7 = r7 + 1\n goto L_0x007c\n L_0x008f:\n r14.lastIndex = r10\n r3 = r5[r10]\n long r3 = r3.id\n r14.lastId = r3\n r7 = r10\n L_0x0098:\n r3 = 0\n r4 = 0\n L_0x009a:\n if (r3 >= r6) goto L_0x00fd\n boolean r10 = r14.d()\n if (r10 == 0) goto L_0x00a3\n return\n L_0x00a3:\n r10 = r5[r7]\n L_0x00a5:\n boolean r11 = r14.d()\n if (r11 == 0) goto L_0x00ac\n return\n L_0x00ac:\n io.b.e.c.e<U> r11 = r10.queue\n if (r11 != 0) goto L_0x00b1\n goto L_0x00b9\n L_0x00b1:\n java.lang.Object r12 = r11.poll() // Catch:{ Throwable -> 0x00e2 }\n if (r12 != 0) goto L_0x00d8\n if (r12 != 0) goto L_0x00a5\n L_0x00b9:\n boolean r11 = r10.done\n io.b.e.c.e<U> r12 = r10.queue\n if (r11 == 0) goto L_0x00d2\n if (r12 == 0) goto L_0x00c7\n boolean r11 = r12.isEmpty()\n if (r11 == 0) goto L_0x00d2\n L_0x00c7:\n r14.b(r10)\n boolean r4 = r14.d()\n if (r4 == 0) goto L_0x00d1\n return\n L_0x00d1:\n r4 = 1\n L_0x00d2:\n int r7 = r7 + 1\n if (r7 != r6) goto L_0x00fb\n r7 = 0\n goto L_0x00fb\n L_0x00d8:\n r0.a(r12)\n boolean r12 = r14.d()\n if (r12 == 0) goto L_0x00b1\n return\n L_0x00e2:\n r4 = move-exception\n io.b.c.b.b(r4)\n r10.b()\n io.b.e.h.c r11 = r14.errors\n r11.a(r4)\n boolean r4 = r14.d()\n if (r4 == 0) goto L_0x00f5\n return\n L_0x00f5:\n r14.b(r10)\n int r3 = r3 + 1\n r4 = 1\n L_0x00fb:\n int r3 = r3 + r1\n goto L_0x009a\n L_0x00fd:\n r14.lastIndex = r7\n r3 = r5[r7]\n long r5 = r3.id\n r14.lastId = r5\n goto L_0x0107\n L_0x0106:\n r4 = 0\n L_0x0107:\n if (r4 == 0) goto L_0x0129\n int r3 = r14.maxConcurrency\n if (r3 == r8) goto L_0x0004\n monitor-enter(r14)\n java.util.Queue<io.b.m<? extends U>> r3 = r14.sources // Catch:{ all -> 0x0126 }\n java.lang.Object r3 = r3.poll() // Catch:{ all -> 0x0126 }\n io.b.m r3 = (io.b.m) r3 // Catch:{ all -> 0x0126 }\n if (r3 != 0) goto L_0x0120\n int r3 = r14.wip // Catch:{ all -> 0x0126 }\n int r3 = r3 - r1\n r14.wip = r3 // Catch:{ all -> 0x0126 }\n monitor-exit(r14) // Catch:{ all -> 0x0126 }\n goto L_0x0004\n L_0x0120:\n monitor-exit(r14) // Catch:{ all -> 0x0126 }\n r14.a(r3)\n goto L_0x0004\n L_0x0126:\n r0 = move-exception\n monitor-exit(r14) // Catch:{ all -> 0x0126 }\n throw r0\n L_0x0129:\n int r2 = -r2\n int r2 = r14.addAndGet(r2)\n if (r2 != 0) goto L_0x0004\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: io.b.e.e.d.i.b.c():void\");\n }", "public long mo915b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r4 = this;\n r0 = -1;\n r2 = r4.f18088d;\t Catch:{ NumberFormatException -> 0x000e }\n if (r2 == 0) goto L_0x000d;\t Catch:{ NumberFormatException -> 0x000e }\n L_0x0006:\n r2 = r4.f18088d;\t Catch:{ NumberFormatException -> 0x000e }\n r2 = java.lang.Long.parseLong(r2);\t Catch:{ NumberFormatException -> 0x000e }\n r0 = r2;\n L_0x000d:\n return r0;\n L_0x000e:\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.c.b.b():long\");\n }", "public abstract C0631bt mo9227aB();", "public abstract void mo70713b();", "@Test(timeout = 4000)\n public void test029() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(16777267);\n Type type0 = Type.VOID_TYPE;\n Type type1 = Type.BYTE_TYPE;\n Type.getObjectType(\"The prefix must not be null\");\n Type type2 = Type.INT_TYPE;\n Item item0 = new Item();\n frame0.execute(132, 164, classWriter0, item0);\n Class<ObjectInputStream> class0 = ObjectInputStream.class;\n Type.getType(class0);\n Type.getType(\")UBbE;._%G\");\n Type type3 = Type.BYTE_TYPE;\n Type type4 = Type.INT_TYPE;\n // Undeclared exception!\n try { \n type0.getElementType();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public /* bridge */ /* synthetic */ void mo55097d() {\n super.mo55097d();\n }", "protected void method_2145() {\r\n // $FF: Couldn't be decompiled\r\n }", "public /* bridge */ /* synthetic */ void mo55095b() {\n super.mo55095b();\n }", "public final synchronized void a(com.ss.android.ugc.aweme.base.e.b r11) {\n /*\n r10 = this;\n monitor-enter(r10)\n r8 = 1\n java.lang.Object[] r1 = new java.lang.Object[r8] // Catch:{ all -> 0x0041 }\n r9 = 0\n r1[r9] = r11 // Catch:{ all -> 0x0041 }\n com.meituan.robust.ChangeQuickRedirect r3 = f34732a // Catch:{ all -> 0x0041 }\n r4 = 0\n r5 = 25164(0x624c, float:3.5262E-41)\n java.lang.Class[] r6 = new java.lang.Class[r8] // Catch:{ all -> 0x0041 }\n java.lang.Class<com.ss.android.ugc.aweme.base.e.b> r2 = com.ss.android.ugc.aweme.base.e.b.class\n r6[r9] = r2 // Catch:{ all -> 0x0041 }\n java.lang.Class r7 = java.lang.Void.TYPE // Catch:{ all -> 0x0041 }\n r2 = r10\n boolean r1 = com.meituan.robust.PatchProxy.isSupport(r1, r2, r3, r4, r5, r6, r7) // Catch:{ all -> 0x0041 }\n if (r1 == 0) goto L_0x0032\n java.lang.Object[] r1 = new java.lang.Object[r8] // Catch:{ all -> 0x0041 }\n r1[r9] = r11 // Catch:{ all -> 0x0041 }\n com.meituan.robust.ChangeQuickRedirect r3 = f34732a // Catch:{ all -> 0x0041 }\n r4 = 0\n r5 = 25164(0x624c, float:3.5262E-41)\n java.lang.Class[] r6 = new java.lang.Class[r8] // Catch:{ all -> 0x0041 }\n java.lang.Class<com.ss.android.ugc.aweme.base.e.b> r0 = com.ss.android.ugc.aweme.base.e.b.class\n r6[r9] = r0 // Catch:{ all -> 0x0041 }\n java.lang.Class r7 = java.lang.Void.TYPE // Catch:{ all -> 0x0041 }\n r2 = r10\n com.meituan.robust.PatchProxy.accessDispatch(r1, r2, r3, r4, r5, r6, r7) // Catch:{ all -> 0x0041 }\n monitor-exit(r10)\n return\n L_0x0032:\n java.util.ArrayList<com.ss.android.ugc.aweme.base.e.b<T>> r1 = r10.f34733b // Catch:{ all -> 0x0041 }\n boolean r1 = r1.contains(r11) // Catch:{ all -> 0x0041 }\n if (r1 != 0) goto L_0x003f\n java.util.ArrayList<com.ss.android.ugc.aweme.base.e.b<T>> r1 = r10.f34733b // Catch:{ all -> 0x0041 }\n r1.add(r11) // Catch:{ all -> 0x0041 }\n L_0x003f:\n monitor-exit(r10)\n return\n L_0x0041:\n r0 = move-exception\n monitor-exit(r10)\n throw r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.ss.android.ugc.aweme.base.e.a.a(com.ss.android.ugc.aweme.base.e.b):void\");\n }", "private final void asB() {\n /*\n r6 = this;\n r0 = r6.cxs;\n r1 = r6.asp();\n r1 = r1.cCg;\n r2 = \"binding.depositAmountEdit\";\n kotlin.jvm.internal.i.e(r1, r2);\n r2 = r0 instanceof com.iqoption.core.microservices.billing.response.deposit.cashboxitem.d;\n r3 = 0;\n r4 = 1;\n if (r2 == 0) goto L_0x002b;\n L_0x0013:\n r2 = r0;\n r2 = (com.iqoption.core.microservices.billing.response.deposit.cashboxitem.d) r2;\n r2 = r2.aaH();\n if (r2 == 0) goto L_0x0027;\n L_0x001c:\n r2 = r2.aaT();\n if (r2 == 0) goto L_0x0027;\n L_0x0022:\n r2 = r2.size();\n goto L_0x0028;\n L_0x0027:\n r2 = 0;\n L_0x0028:\n if (r2 != 0) goto L_0x002b;\n L_0x002a:\n goto L_0x0040;\n L_0x002b:\n if (r0 == 0) goto L_0x0032;\n L_0x002d:\n r2 = r0.ZL();\n goto L_0x0033;\n L_0x0032:\n r2 = 0;\n L_0x0033:\n r5 = com.iqoption.core.microservices.billing.response.deposit.cashboxitem.CashboxItemType.USER_CARD;\n if (r2 != r5) goto L_0x0038;\n L_0x0037:\n goto L_0x0040;\n L_0x0038:\n r2 = r6.aoJ();\n if (r2 == 0) goto L_0x003f;\n L_0x003e:\n goto L_0x0040;\n L_0x003f:\n r4 = 0;\n L_0x0040:\n r2 = \"binding.depositPresetsList\";\n if (r4 == 0) goto L_0x0053;\n L_0x0044:\n r0 = r6.asp();\n r0 = r0.cCr;\n kotlin.jvm.internal.i.e(r0, r2);\n r0 = (android.view.View) r0;\n com.iqoption.core.ext.a.ak(r0);\n goto L_0x006b;\n L_0x0053:\n r3 = r6.asp();\n r3 = r3.cCr;\n kotlin.jvm.internal.i.e(r3, r2);\n r3 = (android.view.View) r3;\n com.iqoption.core.ext.a.al(r3);\n r2 = new com.iqoption.deposit.light.perform.c$s;\n r2.<init>(r6, r0);\n r2 = (android.view.View.OnFocusChangeListener) r2;\n r1.setOnFocusChangeListener(r2);\n L_0x006b:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.iqoption.deposit.light.perform.c.asB():void\");\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n ClassWriter classWriter1 = new ClassWriter(2);\n Type type0 = Type.CHAR_TYPE;\n Class<Integer> class0 = Integer.class;\n Class<Object> class1 = Object.class;\n Type.getType(class1);\n Type.getType(class0);\n Type.getObjectType(\"The prefix must not be null\");\n Type type1 = Type.INT_TYPE;\n int[] intArray0 = new int[6];\n intArray0[0] = 4;\n type1.getDescriptor();\n intArray0[1] = 2;\n intArray0[2] = 7;\n intArray0[3] = 4;\n intArray0[4] = 1;\n intArray0[5] = 0;\n frame0.inputStack = intArray0;\n Item item0 = classWriter0.newFieldItem(\"%B\\\"F$,FHLc-:\", \"The prefix must not be null\", \"The prefix must not be null\");\n classWriter1.toByteArray();\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n // Undeclared exception!\n try { \n frame0.execute(192, 4, classWriter1, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "public lj au() {\n throw new Runtime(\"d2j fail translate: java.lang.RuntimeException: can not merge I and Z\\r\\n\\tat com.googlecode.dex2jar.ir.TypeClass.merge(TypeClass.java:100)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeRef.updateTypeClass(TypeTransformer.java:174)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.provideAs(TypeTransformer.java:780)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.e1expr(TypeTransformer.java:496)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:713)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.enexpr(TypeTransformer.java:698)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:719)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.s1stmt(TypeTransformer.java:810)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.sxStmt(TypeTransformer.java:840)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.analyze(TypeTransformer.java:206)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer.transform(TypeTransformer.java:44)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.optimize(Dex2jar.java:162)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertCode(Dex2Asm.java:414)\\r\\n\\tat com.googlecode.d2j.dex.ExDex2Asm.convertCode(ExDex2Asm.java:42)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.convertCode(Dex2jar.java:128)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertMethod(Dex2Asm.java:509)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:406)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertDex(Dex2Asm.java:422)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.doTranslate(Dex2jar.java:172)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.to(Dex2jar.java:272)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:108)\\r\\n\\tat com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:288)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:32)\\r\\n\");\n }", "protected void method_2247() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void m13383b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = com.foursquare.internal.data.db.C1916a.getDatabase();\t Catch:{ Exception -> 0x000a }\n r1 = \"battery_watcher\";\t Catch:{ Exception -> 0x000a }\n r2 = 0;\t Catch:{ Exception -> 0x000a }\n r0.delete(r1, r2, r2);\t Catch:{ Exception -> 0x000a }\n L_0x000a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.foursquare.pilgrim.e.b():void\");\n }", "public np a()\r\n/* 33: */ {\r\n/* 34:49 */ return this.b;\r\n/* 35: */ }", "public lj ar(byte b) {\n throw new Runtime(\"d2j fail translate: java.lang.RuntimeException: can not merge I and Z\\r\\n\\tat com.googlecode.dex2jar.ir.TypeClass.merge(TypeClass.java:100)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeRef.updateTypeClass(TypeTransformer.java:174)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.provideAs(TypeTransformer.java:780)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.e1expr(TypeTransformer.java:496)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:713)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.enexpr(TypeTransformer.java:698)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:719)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.s1stmt(TypeTransformer.java:810)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.sxStmt(TypeTransformer.java:840)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.analyze(TypeTransformer.java:206)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer.transform(TypeTransformer.java:44)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.optimize(Dex2jar.java:162)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertCode(Dex2Asm.java:414)\\r\\n\\tat com.googlecode.d2j.dex.ExDex2Asm.convertCode(ExDex2Asm.java:42)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.convertCode(Dex2jar.java:128)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertMethod(Dex2Asm.java:509)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:406)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertDex(Dex2Asm.java:422)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.doTranslate(Dex2jar.java:172)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.to(Dex2jar.java:272)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:108)\\r\\n\\tat com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:288)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:32)\\r\\n\");\n }", "public void M(android.view.View r6) {\n /*\n r5 = this;\n r0 = \"v\";\n kotlin.jvm.internal.i.f(r6, r0);\n r6 = r5.this$0;\n r6 = r6.ayL;\n r0 = 0;\n if (r6 == 0) goto L_0x001a;\n L_0x000f:\n r6 = r6.Km();\n if (r6 == 0) goto L_0x001a;\n L_0x0015:\n r6 = r6.XA();\n goto L_0x001b;\n L_0x001a:\n r6 = r0;\n L_0x001b:\n if (r6 != 0) goto L_0x0020;\n L_0x001d:\n kotlin.jvm.internal.i.bnJ();\n L_0x0020:\n r1 = com.iqoption.deposit.light.menu.currency.c.cFb;\n r2 = new com.iqoption.deposit.c.a.b;\n r6 = (java.util.List) r6;\n r3 = r5.this$0;\n r3 = r3.cFE;\n if (r3 == 0) goto L_0x0037;\n L_0x002e:\n r3 = r3.getId();\n r3 = java.lang.Long.valueOf(r3);\n goto L_0x0038;\n L_0x0037:\n r3 = r0;\n L_0x0038:\n r2.<init>(r6, r3);\n r6 = r1.a(r2);\n r1 = com.iqoption.deposit.navigator.b.cGp;\n r2 = r5.this$0;\n r2 = (androidx.fragment.app.Fragment) r2;\n r1 = r1.P(r2);\n r2 = 0;\n r3 = 2;\n com.iqoption.core.ui.d.g.b(r1, r6, r2, r3, r0);\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.iqoption.deposit.light.perform.c$r.M(android.view.View):void\");\n }", "private void m25427g() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r2 = this;\n r0 = r2.f19111m;\n if (r0 == 0) goto L_0x000f;\n L_0x0004:\n r0 = r2.f19104f;\t Catch:{ Exception -> 0x000f }\n r0 = android.support.v4.content.C0396d.m1465a(r0);\t Catch:{ Exception -> 0x000f }\n r1 = r2.f19111m;\t Catch:{ Exception -> 0x000f }\n r0.m1468a(r1);\t Catch:{ Exception -> 0x000f }\n L_0x000f:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.ads.internal.adapters.w.g():void\");\n }", "@org.jetbrains.annotations.NotNull\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public static /* synthetic */ com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection copy$default(com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection r4, com.bitcoin.mwallet.core.models.slp.Slp r5, java.util.List<kotlin.ULong> r6, com.bitcoin.bitcoink.p008tx.Satoshis r7, com.bitcoin.bitcoink.p008tx.Satoshis r8, java.util.List<com.bitcoin.mwallet.core.models.p009tx.utxo.Utxo> r9, com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection.Error r10, int r11, java.lang.Object r12) {\n /*\n r12 = r11 & 1\n if (r12 == 0) goto L_0x0006\n com.bitcoin.mwallet.core.models.slp.Slp r5 = r4.token\n L_0x0006:\n r12 = r11 & 2\n if (r12 == 0) goto L_0x000c\n java.util.List<kotlin.ULong> r6 = r4.quantities\n L_0x000c:\n r12 = r6\n r6 = r11 & 4\n if (r6 == 0) goto L_0x0013\n com.bitcoin.bitcoink.tx.Satoshis r7 = r4.fee\n L_0x0013:\n r0 = r7\n r6 = r11 & 8\n if (r6 == 0) goto L_0x001a\n com.bitcoin.bitcoink.tx.Satoshis r8 = r4.change\n L_0x001a:\n r1 = r8\n r6 = r11 & 16\n if (r6 == 0) goto L_0x0021\n java.util.List<com.bitcoin.mwallet.core.models.tx.utxo.Utxo> r9 = r4.utxos\n L_0x0021:\n r2 = r9\n r6 = r11 & 32\n if (r6 == 0) goto L_0x0028\n com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection$Error r10 = r4.error\n L_0x0028:\n r3 = r10\n r6 = r4\n r7 = r5\n r8 = r12\n r9 = r0\n r10 = r1\n r11 = r2\n r12 = r3\n com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection r4 = r6.copy(r7, r8, r9, r10, r11, r12)\n return r4\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection.copy$default(com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection, com.bitcoin.mwallet.core.models.slp.Slp, java.util.List, com.bitcoin.bitcoink.tx.Satoshis, com.bitcoin.bitcoink.tx.Satoshis, java.util.List, com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection$Error, int, java.lang.Object):com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection\");\n }", "private int getSubjTypeIdx() {\n return this.colStartOffset + 6;\n }", "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 }", "@Specialization\n\t\tString type(OzBacktrace backtrace) {\n\t\t\treturn \"tuple\";\n\t\t}", "public final /* bridge */ /* synthetic */ void mo43571c() {\n super.mo43571c();\n }", "public final void mo56977b() {\n /*\n r2 = this;\n com.ss.android.ugc.aweme.common.e r0 = r2.f67572c\n com.ss.android.ugc.aweme.feed.ui.masklayer2.a.i r0 = (com.p280ss.android.ugc.aweme.feed.p1238ui.masklayer2.p1239a.C28951i) r0\n if (r0 == 0) goto L_0x001a\n com.ss.android.ugc.aweme.common.a r1 = r2.f67571b\n com.ss.android.ugc.aweme.feed.ui.masklayer2.a.d r1 = (com.p280ss.android.ugc.aweme.feed.p1238ui.masklayer2.p1239a.C28944d) r1\n if (r1 == 0) goto L_0x0014\n java.lang.Object r1 = r1.getData()\n java.lang.String r1 = (java.lang.String) r1\n if (r1 != 0) goto L_0x0016\n L_0x0014:\n java.lang.String r1 = \"\"\n L_0x0016:\n r0.mo74240a(r1)\n return\n L_0x001a:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.p280ss.android.ugc.aweme.feed.p1238ui.masklayer2.p1239a.C28946e.mo56977b():void\");\n }", "public void mo115190b() {\n }", "private final void m710e() {\n /*\n r12 = this;\n akn r0 = r12.f531p\n akl r0 = r0.f601d\n if (r0 == 0) goto L_0x0155\n boolean r1 = r0.f580d\n r2 = -9223372036854775807(0x8000000000000001, double:-4.9E-324)\n if (r1 == 0) goto L_0x0017\n aws r1 = r0.f577a\n long r4 = r1.mo1486c()\n r8 = r4\n goto L_0x0019\n L_0x0017:\n r8 = r2\n L_0x0019:\n int r1 = (r8 > r2 ? 1 : (r8 == r2 ? 0 : -1))\n if (r1 != 0) goto L_0x0122\n ajf r1 = r12.f528m\n akn r2 = r12.f531p\n akl r2 = r2.f602e\n akx r3 = r1.f445c\n r4 = 0\n if (r3 == 0) goto L_0x008a\n boolean r3 = r3.mo486w()\n if (r3 != 0) goto L_0x008a\n akx r3 = r1.f445c\n boolean r3 = r3.mo485v()\n if (r3 == 0) goto L_0x0037\n goto L_0x0042\n L_0x0037:\n if (r0 != r2) goto L_0x008a\n akx r2 = r1.f445c\n boolean r2 = r2.mo359g()\n if (r2 == 0) goto L_0x0042\n goto L_0x008a\n L_0x0042:\n bkr r2 = r1.f446d\n long r2 = r2.mo379b()\n boolean r5 = r1.f447e\n if (r5 == 0) goto L_0x0068\n blf r5 = r1.f443a\n long r5 = r5.mo379b()\n int r7 = (r2 > r5 ? 1 : (r2 == r5 ? 0 : -1))\n if (r7 >= 0) goto L_0x005c\n blf r2 = r1.f443a\n r2.mo2109d()\n goto L_0x0096\n L_0x005c:\n r1.f447e = r4\n boolean r5 = r1.f448f\n if (r5 == 0) goto L_0x0068\n blf r5 = r1.f443a\n r5.mo2107a()\n L_0x0068:\n blf r5 = r1.f443a\n r5.mo2108a(r2)\n bkr r2 = r1.f446d\n akq r2 = r2.mo376Q()\n blf r3 = r1.f443a\n akq r3 = r3.f4280a\n boolean r3 = r2.equals(r3)\n if (r3 != 0) goto L_0x0096\n blf r3 = r1.f443a\n r3.mo378a(r2)\n aje r3 = r1.f444b\n ake r3 = (p000.ake) r3\n r3.m694a(r2, r4)\n goto L_0x0096\n L_0x008a:\n r2 = 1\n r1.f447e = r2\n boolean r2 = r1.f448f\n if (r2 == 0) goto L_0x0096\n blf r2 = r1.f443a\n r2.mo2107a()\n L_0x0096:\n long r1 = r1.mo379b()\n r12.f513D = r1\n long r0 = r0.mo440b(r1)\n akp r2 = r12.f533r\n long r2 = r2.f623m\n java.util.ArrayList r5 = r12.f530o\n boolean r5 = r5.isEmpty()\n if (r5 != 0) goto L_0x011d\n akp r5 = r12.f533r\n awt r5 = r5.f612b\n boolean r5 = r5.mo1504a()\n if (r5 != 0) goto L_0x011d\n akp r5 = r12.f533r\n long r6 = r5.f613c\n int r8 = (r6 > r2 ? 1 : (r6 == r2 ? 0 : -1))\n if (r8 != 0) goto L_0x00c5\n boolean r6 = r12.f515F\n if (r6 == 0) goto L_0x00c5\n r6 = -1\n long r2 = r2 + r6\n L_0x00c5:\n r12.f515F = r4\n alh r4 = r5.f611a\n awt r5 = r5.f612b\n java.lang.Object r5 = r5.f2566a\n int r4 = r4.mo525a(r5)\n int r5 = r12.f514E\n r6 = 0\n if (r5 <= 0) goto L_0x00e1\n java.util.ArrayList r7 = r12.f530o\n int r5 = r5 + -1\n java.lang.Object r5 = r7.get(r5)\n akb r5 = (p000.akb) r5\n goto L_0x00e3\n L_0x00e1:\n L_0x00e2:\n r5 = r6\n L_0x00e3:\n if (r5 != 0) goto L_0x00e6\n goto L_0x0109\n L_0x00e6:\n int r5 = r5.f502a\n if (r4 >= 0) goto L_0x00eb\n L_0x00ea:\n goto L_0x00f4\n L_0x00eb:\n if (r4 != 0) goto L_0x0109\n r7 = 0\n int r5 = (r2 > r7 ? 1 : (r2 == r7 ? 0 : -1))\n if (r5 >= 0) goto L_0x0109\n goto L_0x00ea\n L_0x00f4:\n int r5 = r12.f514E\n int r5 = r5 + -1\n r12.f514E = r5\n if (r5 <= 0) goto L_0x0108\n java.util.ArrayList r7 = r12.f530o\n int r5 = r5 + -1\n java.lang.Object r5 = r7.get(r5)\n akb r5 = (p000.akb) r5\n goto L_0x00e3\n L_0x0108:\n goto L_0x00e2\n L_0x0109:\n int r2 = r12.f514E\n java.util.ArrayList r3 = r12.f530o\n int r3 = r3.size()\n if (r2 >= r3) goto L_0x011d\n java.util.ArrayList r2 = r12.f530o\n int r3 = r12.f514E\n java.lang.Object r2 = r2.get(r3)\n akb r2 = (p000.akb) r2\n L_0x011d:\n akp r2 = r12.f533r\n r2.f623m = r0\n goto L_0x0140\n L_0x0122:\n r12.m691a(r8)\n akp r0 = r12.f533r\n long r0 = r0.f623m\n int r2 = (r8 > r0 ? 1 : (r8 == r0 ? 0 : -1))\n if (r2 == 0) goto L_0x0140\n akp r0 = r12.f533r\n awt r7 = r0.f612b\n long r10 = r0.f614d\n r6 = r12\n akp r0 = r6.m686a(r7, r8, r10)\n r12.f533r = r0\n akc r0 = r12.f529n\n r1 = 4\n r0.mo409b(r1)\n L_0x0140:\n akn r0 = r12.f531p\n akl r0 = r0.f603f\n akp r1 = r12.f533r\n long r2 = r0.mo442c()\n r1.f621k = r2\n akp r0 = r12.f533r\n long r1 = r12.m719n()\n r0.f622l = r1\n return\n L_0x0155:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p000.ake.m710e():void\");\n }", "public void mo2485a() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r2 = this;\n r0 = r2.f11863a;\n monitor-enter(r0);\n r1 = r2.f11873l;\t Catch:{ all -> 0x002a }\n if (r1 != 0) goto L_0x0028;\t Catch:{ all -> 0x002a }\n L_0x0007:\n r1 = r2.f11872k;\t Catch:{ all -> 0x002a }\n if (r1 == 0) goto L_0x000c;\t Catch:{ all -> 0x002a }\n L_0x000b:\n goto L_0x0028;\t Catch:{ all -> 0x002a }\n L_0x000c:\n r1 = r2.f11875n;\t Catch:{ all -> 0x002a }\n if (r1 == 0) goto L_0x0015;\n L_0x0010:\n r1 = r2.f11875n;\t Catch:{ RemoteException -> 0x0015 }\n r1.cancel();\t Catch:{ RemoteException -> 0x0015 }\n L_0x0015:\n r1 = r2.f11870i;\t Catch:{ all -> 0x002a }\n m14216b(r1);\t Catch:{ all -> 0x002a }\n r1 = 1;\t Catch:{ all -> 0x002a }\n r2.f11873l = r1;\t Catch:{ all -> 0x002a }\n r1 = com.google.android.gms.common.api.Status.zzfnm;\t Catch:{ all -> 0x002a }\n r1 = r2.mo3568a(r1);\t Catch:{ all -> 0x002a }\n r2.m14217c(r1);\t Catch:{ all -> 0x002a }\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n return;\t Catch:{ all -> 0x002a }\n L_0x0028:\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n return;\t Catch:{ all -> 0x002a }\n L_0x002a:\n r1 = move-exception;\t Catch:{ all -> 0x002a }\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.common.api.internal.BasePendingResult.a():void\");\n }", "public JBlock _finally() {\n // This method could not be decompiled.\n // \n // Original Bytecode:\n // \n // 0: iconst_0 \n // 1: nop \n // 2: nop \n // 3: nop \n // 4: aload_3 \n // 5: nop \n // 6: lconst_0 \n // 7: nop \n // 8: iaload \n // 9: nop \n // 10: ldc2_w \"Lcom/sun/codemodel/JFormatter;\"\n // 13: nop \n // 14: fload_0 /* this */\n // 15: nop \n // 16: nop \n // 17: nop \n // 18: lload_2 \n // 19: nop \n // 20: iconst_0 \n // 21: nop \n // 22: nop \n // LocalVariableTable:\n // Start Length Slot Name Signature\n // ----- ------ ---- ---- -----------------------------\n // 0 23 0 this Lcom/sun/codemodel/JTryBlock;\n // \n // The error that occurred was:\n // \n // java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Number\n // at com.strobel.assembler.ir.StackMappingVisitor$InstructionAnalyzer.execute(StackMappingVisitor.java:935)\n // at com.strobel.assembler.ir.StackMappingVisitor$InstructionAnalyzer.visit(StackMappingVisitor.java:398)\n // at com.strobel.decompiler.ast.AstBuilder.performStackAnalysis(AstBuilder.java:2030)\n // at com.strobel.decompiler.ast.AstBuilder.build(AstBuilder.java:108)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:210)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:99)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethodBody(AstBuilder.java:757)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethod(AstBuilder.java:655)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addTypeMembers(AstBuilder.java:532)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeCore(AstBuilder.java:499)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeNoCache(AstBuilder.java:141)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createType(AstBuilder.java:130)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addType(AstBuilder.java:105)\n // at com.strobel.decompiler.languages.java.JavaLanguage.buildAst(JavaLanguage.java:71)\n // at com.strobel.decompiler.languages.java.JavaLanguage.decompileType(JavaLanguage.java:59)\n // at com.strobel.decompiler.DecompilerDriver.decompileType(DecompilerDriver.java:317)\n // at com.strobel.decompiler.DecompilerDriver.decompileJar(DecompilerDriver.java:238)\n // at com.strobel.decompiler.DecompilerDriver.main(DecompilerDriver.java:123)\n // \n throw new IllegalStateException(\"An error occurred while decompiling this method.\");\n }", "private V e() throws com.amap.api.col.n3.gh {\n /*\n r6 = this;\n r0 = 0\n r1 = 0\n L_0x0002:\n int r2 = r6.b\n if (r1 >= r2) goto L_0x00cd\n com.amap.api.col.n3.ki r2 = com.amap.api.col.n3.ki.c() // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n android.content.Context r3 = r6.d // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n java.net.Proxy r3 = com.amap.api.col.n3.ik.a(r3) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n r6.a((java.net.Proxy) r3) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n byte[] r2 = r2.a((com.amap.api.col.n3.kj) r6) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n java.lang.Object r2 = r6.a((byte[]) r2) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n int r0 = r6.b // Catch:{ ic -> 0x0025, gh -> 0x0020, Throwable -> 0x002a }\n r1 = r0\n r0 = r2\n goto L_0x0002\n L_0x0020:\n r0 = move-exception\n r5 = r2\n r2 = r0\n r0 = r5\n goto L_0x0033\n L_0x0025:\n r0 = move-exception\n r5 = r2\n r2 = r0\n r0 = r5\n goto L_0x0044\n L_0x002a:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = \"未知错误\"\n r0.<init>(r1)\n throw r0\n L_0x0032:\n r2 = move-exception\n L_0x0033:\n int r1 = r1 + 1\n int r3 = r6.b\n if (r1 < r3) goto L_0x0002\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = r2.a()\n r0.<init>(r1)\n throw r0\n L_0x0043:\n r2 = move-exception\n L_0x0044:\n int r1 = r1 + 1\n int r3 = r6.b\n if (r1 >= r3) goto L_0x008a\n int r3 = r6.e // Catch:{ InterruptedException -> 0x0053 }\n int r3 = r3 * 1000\n long r3 = (long) r3 // Catch:{ InterruptedException -> 0x0053 }\n java.lang.Thread.sleep(r3) // Catch:{ InterruptedException -> 0x0053 }\n goto L_0x0002\n L_0x0053:\n java.lang.String r0 = \"http连接失败 - ConnectionException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x0082\n java.lang.String r0 = \"socket 连接异常 - SocketException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x0082\n java.lang.String r0 = \"服务器连接失败 - UnknownServiceException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 == 0) goto L_0x0078\n goto L_0x0082\n L_0x0078:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = r2.a()\n r0.<init>(r1)\n throw r0\n L_0x0082:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = \"http或socket连接失败 - ConnectionException\"\n r0.<init>(r1)\n throw r0\n L_0x008a:\n java.lang.String r0 = \"http连接失败 - ConnectionException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x00c5\n java.lang.String r0 = \"socket 连接异常 - SocketException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x00c5\n java.lang.String r0 = \"未知的错误\"\n java.lang.String r1 = r2.a()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x00c5\n java.lang.String r0 = \"服务器连接失败 - UnknownServiceException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 == 0) goto L_0x00bb\n goto L_0x00c5\n L_0x00bb:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = r2.a()\n r0.<init>(r1)\n throw r0\n L_0x00c5:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = \"http或socket连接失败 - ConnectionException\"\n r0.<init>(r1)\n throw r0\n L_0x00cd:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.amap.api.col.n3.gi.e():java.lang.Object\");\n }", "int a(java.lang.String r8, com.google.ho r9, java.lang.StringBuilder r10, boolean r11, com.google.ae r12) {\n /*\n r7 = this;\n r1 = 0;\n r0 = r8.length();\t Catch:{ RuntimeException -> 0x0009 }\n if (r0 != 0) goto L_0x000b;\n L_0x0007:\n r0 = r1;\n L_0x0008:\n return r0;\n L_0x0009:\n r0 = move-exception;\n throw r0;\n L_0x000b:\n r2 = new java.lang.StringBuilder;\n r2.<init>(r8);\n r0 = J;\n r3 = 25;\n r0 = r0[r3];\n if (r9 == 0) goto L_0x001c;\n L_0x0018:\n r0 = r9.a();\n L_0x001c:\n r0 = r7.a(r2, r0);\n if (r11 == 0) goto L_0x0025;\n L_0x0022:\n r12.a(r0);\t Catch:{ RuntimeException -> 0x0040 }\n L_0x0025:\n r3 = com.google.aw.FROM_DEFAULT_COUNTRY;\t Catch:{ RuntimeException -> 0x0042 }\n if (r0 == r3) goto L_0x005e;\n L_0x0029:\n r0 = r2.length();\t Catch:{ RuntimeException -> 0x003e }\n r1 = 2;\n if (r0 > r1) goto L_0x0044;\n L_0x0030:\n r0 = new com.google.ao;\t Catch:{ RuntimeException -> 0x003e }\n r1 = com.google.dk.TOO_SHORT_AFTER_IDD;\t Catch:{ RuntimeException -> 0x003e }\n r2 = J;\t Catch:{ RuntimeException -> 0x003e }\n r3 = 26;\n r2 = r2[r3];\t Catch:{ RuntimeException -> 0x003e }\n r0.<init>(r1, r2);\t Catch:{ RuntimeException -> 0x003e }\n throw r0;\t Catch:{ RuntimeException -> 0x003e }\n L_0x003e:\n r0 = move-exception;\n throw r0;\n L_0x0040:\n r0 = move-exception;\n throw r0;\n L_0x0042:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x003e }\n L_0x0044:\n r0 = r7.a(r2, r10);\n if (r0 == 0) goto L_0x0050;\n L_0x004a:\n r12.a(r0);\t Catch:{ RuntimeException -> 0x004e }\n goto L_0x0008;\n L_0x004e:\n r0 = move-exception;\n throw r0;\n L_0x0050:\n r0 = new com.google.ao;\n r1 = com.google.dk.INVALID_COUNTRY_CODE;\n r2 = J;\n r3 = 24;\n r2 = r2[r3];\n r0.<init>(r1, r2);\n throw r0;\n L_0x005e:\n if (r9 == 0) goto L_0x00d2;\n L_0x0060:\n r0 = r9.L();\n r3 = java.lang.String.valueOf(r0);\n r4 = r2.toString();\n r5 = r4.startsWith(r3);\n if (r5 == 0) goto L_0x00d2;\n L_0x0072:\n r5 = new java.lang.StringBuilder;\n r3 = r3.length();\n r3 = r4.substring(r3);\n r5.<init>(r3);\n r3 = r9.X();\n r4 = r7.o;\n r6 = r3.g();\n r4 = r4.a(r6);\n r6 = 0;\n r7.a(r5, r9, r6);\n r6 = r7.o;\n r3 = r3.f();\n r3 = r6.a(r3);\n r6 = r4.matcher(r2);\t Catch:{ RuntimeException -> 0x00ca }\n r6 = r6.matches();\t Catch:{ RuntimeException -> 0x00ca }\n if (r6 != 0) goto L_0x00af;\n L_0x00a5:\n r4 = r4.matcher(r5);\t Catch:{ RuntimeException -> 0x00cc }\n r4 = r4.matches();\t Catch:{ RuntimeException -> 0x00cc }\n if (r4 != 0) goto L_0x00bb;\n L_0x00af:\n r2 = r2.toString();\t Catch:{ RuntimeException -> 0x00ce }\n r2 = r7.a(r3, r2);\t Catch:{ RuntimeException -> 0x00ce }\n r3 = com.google.dz.TOO_LONG;\t Catch:{ RuntimeException -> 0x00ce }\n if (r2 != r3) goto L_0x00d2;\n L_0x00bb:\n r10.append(r5);\t Catch:{ RuntimeException -> 0x00d0 }\n if (r11 == 0) goto L_0x00c5;\n L_0x00c0:\n r1 = com.google.aw.FROM_NUMBER_WITHOUT_PLUS_SIGN;\t Catch:{ RuntimeException -> 0x00d0 }\n r12.a(r1);\t Catch:{ RuntimeException -> 0x00d0 }\n L_0x00c5:\n r12.a(r0);\n goto L_0x0008;\n L_0x00ca:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x00cc }\n L_0x00cc:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x00ce }\n L_0x00ce:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x00d0 }\n L_0x00d0:\n r0 = move-exception;\n throw r0;\n L_0x00d2:\n r12.a(r1);\n r0 = r1;\n goto L_0x0008;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.e2.a(java.lang.String, com.google.ho, java.lang.StringBuilder, boolean, com.google.ae):int\");\n }", "public abstract void mo42329d();", "public void c() {\n /*\n r4 = this;\n com.shopee.app.data.store.o r0 = r4.f16997c\n boolean r0 = r0.c()\n r1 = 1\n r2 = 0\n if (r0 == 0) goto L_0x000c\n L_0x000a:\n r0 = 0\n goto L_0x0023\n L_0x000c:\n com.shopee.app.data.store.o r0 = r4.f16997c\n boolean r0 = r0.a()\n if (r0 != 0) goto L_0x001c\n com.shopee.app.data.store.o r0 = r4.f16997c\n int r0 = r0.b()\n r2 = r0\n goto L_0x000a\n L_0x001c:\n com.shopee.app.data.store.o r0 = r4.f16997c\n int r2 = r0.e()\n r0 = 1\n L_0x0023:\n boolean r3 = r4.f16998d\n if (r3 == 0) goto L_0x0032\n if (r0 == 0) goto L_0x003a\n com.shopee.app.network.d.c.d r0 = new com.shopee.app.network.d.c.d\n r0.<init>()\n r0.a(r2, r1)\n goto L_0x003a\n L_0x0032:\n com.shopee.app.network.d.c.d r1 = new com.shopee.app.network.d.c.d\n r1.<init>()\n r1.a(r2, r0)\n L_0x003a:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.shopee.app.d.c.f.m.c():void\");\n }", "@Override\n public void a() {\n block25 : {\n block24 : {\n block22 : {\n var17_1 = a.a;\n var3_2 = this.c.i();\n var4_3 = var3_2.a().a();\n this.d = new w();\n this.e = new y.f.h.D(this.d);\n this.h = M.a(new Object[this.b.e()]);\n this.i = M.b(new Object[this.b.g()]);\n var5_4 = this.b.o();\n while (var5_4.f()) {\n var6_5 = var5_4.e();\n if (var17_1 == 0) {\n if (var6_5.c() <= this.l) {\n var7_6 = this.d.d();\n this.h.a(var6_5, var7_6);\n }\n var5_4.g();\n if (var17_1 == 0) continue;\n }\n break block22;\n }\n this.j = M.b(new Object[this.b.g()]);\n this.k = M.b(new Object[this.b.g()]);\n this.a(this.j, this.k);\n }\n var2_8 = this.b.o();\n block3 : do {\n v0 = var2_8.f();\n block4 : while (v0 != 0) {\n var5_4 = var2_8.e();\n if (var5_4.c() != 0) {\n var1_9 = var5_4.l();\n var6_5 = var1_9.a();\n var7_6 = (y.c.q)this.j.b(var6_5);\n var1_9.b();\n while (var1_9.f()) {\n var8_10 = var1_9.a();\n var9_11 = (y.c.q)this.j.b(var8_10);\n var10_12 = (y.c.q)this.k.b(var8_10);\n var11_13 = this.a((y.c.q)var7_6, (y.c.q)var9_11);\n v0 = var5_4.c();\n if (var17_1 != 0) continue block4;\n if (v0 > this.l) {\n this.h.a(var5_4, var11_13);\n }\n var7_6 = (y.c.q)this.j.b(var8_10);\n var12_14 /* !! */ = this.d.a((y.c.q)var9_11, (y.c.q)var10_12);\n this.i.a(var8_10, var12_14 /* !! */ );\n if (var8_10 == var6_5) break;\n var1_9.b();\n if (var17_1 == 0) continue;\n }\n }\n var2_8.g();\n if (var17_1 == 0) continue block3;\n }\n break block3;\n break;\n } while (true);\n var1_9 = this.b.p();\n while (var1_9.f()) {\n var5_4 = var1_9.a();\n v1 = this;\n if (var17_1 == 0) {\n block23 : {\n if (v1.c.n((y.c.d)var5_4)) {\n this.e.m((y.c.d)this.i.b(var5_4));\n if (var17_1 == 0) break block23;\n }\n this.e.e((y.c.d)this.i.b(var5_4));\n }\n var6_5 = this.c.h((y.c.d)var5_4);\n this.e.b((y.c.d)this.i.b(var5_4), (y.c.d)this.i.b(var6_5));\n var1_9.g();\n if (var17_1 == 0) continue;\n }\n break block24;\n }\n v1 = this;\n }\n var5_4 = v1.e.m();\n this.d.a(\"y.layout.orthogonal.general.NodeSplitter.NODE_FACES\", (y.c.c)var5_4);\n var6_5 = this.e.m();\n this.d.a(\"y.layout.orthogonal.ring.FixedSizeNodeSplitter#NODE_SIZE\", (y.c.c)var6_5);\n this.m = this.e.g().t();\n this.d.a(\"y.layout.orthogonal.ring.FixedSizeNodeSplitter#NODE_SIZE\", new c((r)var6_5, this.m));\n try {\n this.e.l();\n var7_6 = (y.c.d)this.i.b(var4_3);\n this.e.b(this.e.i((y.c.d)var7_6));\n var8_10 = this.e.h();\n while (var8_10.f()) {\n var5_4.a(var8_10.a(), false);\n var8_10.g();\n if (var17_1 == 0) {\n if (var17_1 == 0) continue;\n }\n break block25;\n }\n var8_10 = this.b.o();\n while (var8_10.f()) {\n var9_11 = var8_10.e();\n if (var17_1 != 0) break;\n if (var9_11.c() <= this.l) ** GOTO lbl-1000\n var10_12 = (y.c.d)this.h.b(var9_11);\n var11_13 = this.e.i((y.c.d)var10_12);\n this.h.a(var9_11, var11_13);\n var5_4.a((p)var11_13, true);\n var12_14 /* !! */ = (y.c.d)this.b.p((y.c.q)var9_11);\n var14_15 = this.b.q((y.c.q)var9_11);\n var16_16 = new Dimension((int)var12_14 /* !! */ , (int)var14_15);\n var6_5.a((p)var11_13, var16_16);\n if (var17_1 != 0) lbl-1000: // 2 sources:\n {\n var10_12 = this.b.r((y.c.q)var9_11);\n if (var10_12.a > 0.0 || var10_12.b > 0.0) {\n var11_13 = (y.c.q)this.h.b(var9_11);\n this.m.a(var11_13, this.b.r((y.c.q)var9_11));\n }\n }\n var8_10.g();\n if (var17_1 == 0) continue;\n break;\n }\n }\n catch (Exception var7_7) {\n System.err.println(\"Internal Error in Face calculation !\");\n var7_7.printStackTrace(System.err);\n }\n }\n var7_6 = this.e.h();\n block9 : do {\n if (var7_6.f() == false) return;\n var8_10 = (p)var7_6.d();\n if (var5_4.d(var8_10)) {\n var9_11 = var8_10.a();\n while (var9_11.f()) {\n var10_12 = var9_11.a();\n this.e.m(this.e.h((y.c.d)var10_12));\n this.e.e((y.c.d)var10_12);\n var9_11.g();\n if (var17_1 != 0) continue block9;\n if (var17_1 == 0) continue;\n }\n }\n var7_6.g();\n } while (var17_1 == 0);\n }", "public int getInputType() {\n/* 234 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public int getInputType() {\n/* 1743 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "void m5771e() throws C0841b;", "public final void b(@org.jetbrains.annotations.Nullable java.lang.String r18) {\n /*\n r17 = this;\n r1 = 1\n java.lang.Object[] r2 = new java.lang.Object[r1]\n r9 = 0\n r2[r9] = r18\n com.meituan.robust.ChangeQuickRedirect r4 = f2610e\n java.lang.Class[] r7 = new java.lang.Class[r1]\n java.lang.Class<java.lang.String> r3 = java.lang.String.class\n r7[r9] = r3\n java.lang.Class r8 = java.lang.Void.TYPE\n r5 = 0\n r6 = 21950(0x55be, float:3.0759E-41)\n r3 = r17\n boolean r2 = com.meituan.robust.PatchProxy.isSupport(r2, r3, r4, r5, r6, r7, r8)\n if (r2 == 0) goto L_0x0032\n java.lang.Object[] r10 = new java.lang.Object[r1]\n r10[r9] = r18\n com.meituan.robust.ChangeQuickRedirect r12 = f2610e\n r13 = 0\n r14 = 21950(0x55be, float:3.0759E-41)\n java.lang.Class[] r15 = new java.lang.Class[r1]\n java.lang.Class<java.lang.String> r0 = java.lang.String.class\n r15[r9] = r0\n java.lang.Class r16 = java.lang.Void.TYPE\n r11 = r17\n com.meituan.robust.PatchProxy.accessDispatch(r10, r11, r12, r13, r14, r15, r16)\n return\n L_0x0032:\n com.ss.android.ugc.aweme.antiaddic.lock.c r2 = com.ss.android.ugc.aweme.antiaddic.lock.c.f33443d\n boolean r2 = r2.e()\n if (r2 == 0) goto L_0x003e\n r17.c(r18)\n return\n L_0x003e:\n java.lang.Object[] r10 = new java.lang.Object[r1]\n r10[r9] = r18\n com.meituan.robust.ChangeQuickRedirect r12 = f2610e\n r13 = 0\n r14 = 21953(0x55c1, float:3.0763E-41)\n java.lang.Class[] r15 = new java.lang.Class[r1]\n java.lang.Class<java.lang.String> r2 = java.lang.String.class\n r15[r9] = r2\n java.lang.Class r16 = java.lang.Boolean.TYPE\n r11 = r17\n boolean r2 = com.meituan.robust.PatchProxy.isSupport(r10, r11, r12, r13, r14, r15, r16)\n if (r2 == 0) goto L_0x0075\n java.lang.Object[] r10 = new java.lang.Object[r1]\n r10[r9] = r18\n com.meituan.robust.ChangeQuickRedirect r12 = f2610e\n r13 = 0\n r14 = 21953(0x55c1, float:3.0763E-41)\n java.lang.Class[] r15 = new java.lang.Class[r1]\n java.lang.Class<java.lang.String> r0 = java.lang.String.class\n r15[r9] = r0\n java.lang.Class r16 = java.lang.Boolean.TYPE\n r11 = r17\n java.lang.Object r0 = com.meituan.robust.PatchProxy.accessDispatch(r10, r11, r12, r13, r14, r15, r16)\n java.lang.Boolean r0 = (java.lang.Boolean) r0\n boolean r1 = r0.booleanValue()\n goto L_0x0096\n L_0x0075:\n com.ss.android.ugc.aweme.antiaddic.lock.entity.TimeLockUserSetting r2 = com.ss.android.ugc.aweme.antiaddic.lock.TimeLockRuler.getUserSetting()\n if (r2 == 0) goto L_0x0095\n r0 = r18\n java.lang.CharSequence r0 = (java.lang.CharSequence) r0\n com.ss.android.ugc.aweme.antiaddic.lock.entity.TimeLockUserSetting r2 = com.ss.android.ugc.aweme.antiaddic.lock.TimeLockRuler.getUserSetting()\n java.lang.String r3 = \"TimeLockRuler.getUserSetting()\"\n kotlin.jvm.internal.Intrinsics.checkExpressionValueIsNotNull(r2, r3)\n java.lang.String r2 = r2.getPassword()\n java.lang.CharSequence r2 = (java.lang.CharSequence) r2\n boolean r0 = android.text.TextUtils.equals(r0, r2)\n if (r0 == 0) goto L_0x0095\n goto L_0x0096\n L_0x0095:\n r1 = 0\n L_0x0096:\n if (r1 == 0) goto L_0x009c\n r17.b()\n return\n L_0x009c:\n android.content.Context r0 = com.ss.android.ugc.aweme.base.utils.d.a()\n r1 = 2131564680(0x7f0d1888, float:1.8754852E38)\n com.bytedance.ies.dmt.ui.d.a r0 = com.bytedance.ies.dmt.ui.d.a.b((android.content.Context) r0, (int) r1)\n r0.a()\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.ss.android.ugc.aweme.antiaddic.lock.ui.fragment.AntiAddictionTipFragment.b(java.lang.String):void\");\n }", "public java.lang.Object mo13022a(java.lang.String r18, kotlin.coroutines.Continuation<? super java.lang.Boolean> r19) {\n /*\n r17 = this;\n r0 = r17\n r1 = r19\n boolean r2 = r1 instanceof p008c.p009a.p024e.p026b.C0963b.C0970g\n if (r2 == 0) goto L_0x0017\n r2 = r1\n c.a.e.b.b$g r2 = (p008c.p009a.p024e.p026b.C0963b.C0970g) r2\n int r3 = r2.f1086b\n r4 = -2147483648(0xffffffff80000000, float:-0.0)\n r5 = r3 & r4\n if (r5 == 0) goto L_0x0017\n int r3 = r3 - r4\n r2.f1086b = r3\n goto L_0x001c\n L_0x0017:\n c.a.e.b.b$g r2 = new c.a.e.b.b$g\n r2.<init>(r0, r1)\n L_0x001c:\n java.lang.Object r1 = r2.f1085a\n java.lang.Object r3 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()\n int r4 = r2.f1086b\n r5 = 0\n r6 = 2\n r7 = 1\n if (r4 == 0) goto L_0x0051\n if (r4 == r7) goto L_0x0045\n if (r4 != r6) goto L_0x003d\n java.lang.Object r3 = r2.f1090f\n java.lang.String r3 = (java.lang.String) r3\n java.lang.Object r3 = r2.f1089e\n java.lang.String r3 = (java.lang.String) r3\n java.lang.Object r2 = r2.f1088d\n c.a.e.b.b r2 = (p008c.p009a.p024e.p026b.C0963b) r2\n kotlin.ResultKt.throwOnFailure(r1)\n goto L_0x00a1\n L_0x003d:\n java.lang.IllegalStateException r1 = new java.lang.IllegalStateException\n java.lang.String r2 = \"call to 'resume' before 'invoke' with coroutine\"\n r1.<init>(r2)\n throw r1\n L_0x0045:\n java.lang.Object r4 = r2.f1089e\n java.lang.String r4 = (java.lang.String) r4\n java.lang.Object r8 = r2.f1088d\n c.a.e.b.b r8 = (p008c.p009a.p024e.p026b.C0963b) r8\n kotlin.ResultKt.throwOnFailure(r1)\n goto L_0x0066\n L_0x0051:\n kotlin.ResultKt.throwOnFailure(r1)\n c.a.e.c.a r1 = r0.f1032c\n r2.f1088d = r0\n r4 = r18\n r2.f1089e = r4\n r2.f1086b = r7\n java.lang.Object r1 = r1.mo13034a(r2)\n if (r1 != r3) goto L_0x0065\n return r3\n L_0x0065:\n r8 = r0\n L_0x0066:\n c.a.e.c.a r1 = r8.f1032c\n java.lang.String r1 = r1.mo13035a()\n if (r1 == 0) goto L_0x00b7\n org.mobileid.time_key.web_service.TimeKeyWebService r15 = r8.f1031b\n org.mobileid.time_key.web_service.ActionOnKeyBody r14 = new org.mobileid.time_key.web_service.ActionOnKeyBody\n java.util.Locale r9 = java.util.Locale.getDefault()\n java.lang.String r10 = \"Locale.getDefault()\"\n kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r9, r10)\n if (r4 == 0) goto L_0x00af\n java.lang.String r10 = r4.toUpperCase(r9)\n java.lang.String r9 = \"(this as java.lang.String).toUpperCase(locale)\"\n kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r10, r9)\n r12 = 0\n r13 = 4\n r16 = 0\n r9 = r14\n r11 = r1\n r7 = r14\n r14 = r16\n r9.<init>(r10, r11, r12, r13, r14)\n r2.f1088d = r8\n r2.f1089e = r4\n r2.f1090f = r1\n r2.f1086b = r6\n java.lang.Object r1 = r15.activateKey(r7, r2)\n if (r1 != r3) goto L_0x00a1\n return r3\n L_0x00a1:\n org.mobileid.requester.web_service.Response r1 = (org.mobileid.requester.web_service.Response) r1\n java.lang.Object r1 = r1.getResult()\n if (r1 == 0) goto L_0x00aa\n r5 = 1\n L_0x00aa:\n java.lang.Boolean r1 = kotlin.coroutines.jvm.internal.Boxing.boxBoolean(r5)\n return r1\n L_0x00af:\n java.lang.NullPointerException r1 = new java.lang.NullPointerException\n java.lang.String r2 = \"null cannot be cast to non-null type java.lang.String\"\n r1.<init>(r2)\n throw r1\n L_0x00b7:\n java.lang.Boolean r1 = kotlin.coroutines.jvm.internal.Boxing.boxBoolean(r5)\n return r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p008c.p009a.p024e.p026b.C0963b.mo13022a(java.lang.String, kotlin.coroutines.Continuation):java.lang.Object\");\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n Frame frame0 = new Frame();\n Type[] typeArray0 = new Type[9];\n Type type0 = Type.getReturnType(\"Zu.y \");\n typeArray0[0] = type0;\n Type type1 = Type.DOUBLE_TYPE;\n typeArray0[1] = type1;\n Type type2 = Type.DOUBLE_TYPE;\n typeArray0[2] = type2;\n Type type3 = Type.INT_TYPE;\n typeArray0[3] = type3;\n Type type4 = Type.VOID_TYPE;\n typeArray0[4] = type4;\n Type type5 = Type.BOOLEAN_TYPE;\n typeArray0[5] = type5;\n Type type6 = Type.FLOAT_TYPE;\n typeArray0[6] = type6;\n Type type7 = Type.SHORT_TYPE;\n type2.toString();\n typeArray0[7] = type7;\n Class<Integer> class0 = Integer.class;\n Type.getType(class0);\n Type[] typeArray1 = new Type[1];\n typeArray1[0] = type0;\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n Type.getMethodDescriptor(type1, typeArray1);\n ClassWriter classWriter0 = new ClassWriter(174);\n Item item0 = classWriter0.newConstItem(\"\");\n // Undeclared exception!\n try { \n frame0.execute(3, 2, (ClassWriter) null, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "public static d.a r(Object var0) {\n var1_1 = false;\n var2_2 = new d.a();\n if (var0 instanceof d.a) {\n return (d.a)var0;\n }\n if (!(var0 instanceof String)) ** GOTO lbl9\n var2_2.type = 1;\n var2_2.fN = (String)var0;\n ** GOTO lbl40\nlbl9: // 1 sources:\n if (!(var0 instanceof List)) ** GOTO lbl16\n var2_2.type = 2;\n var3_3 = (List)var0;\n var0 = new ArrayList<E>(var3_3.size());\n var3_3 = var3_3.iterator();\n var1_1 = false;\n ** GOTO lbl43\nlbl16: // 1 sources:\n if (!(var0 instanceof Map)) ** GOTO lbl24\n var2_2.type = 3;\n var4_6 = ((Map)var0).entrySet();\n var0 = new ArrayList<E>(var4_6.size());\n var3_4 = new ArrayList<Object>(var4_6.size());\n var4_6 = var4_6.iterator();\n var1_1 = false;\n ** GOTO lbl52\nlbl24: // 1 sources:\n if (dh.s(var0)) {\n var2_2.type = 1;\n var2_2.fN = var0.toString();\n } else if (dh.t(var0)) {\n var2_2.type = 6;\n var2_2.fT = dh.u(var0);\n } else if (var0 instanceof Boolean) {\n var2_2.type = 8;\n var2_2.fU = (Boolean)var0;\n } else {\n var2_2 = new StringBuilder().append(\"Converting to Value from unknown object type: \");\n var0 = var0 == null ? \"null\" : var0.getClass().toString();\n bh.w(var2_2.append((String)var0).toString());\n return dh.aaN;\n }\nlbl40: // 6 sources:\n do {\n var2_2.fX = var1_1;\n return var2_2;\n break;\n } while (true);\nlbl43: // 2 sources:\n while (var3_3.hasNext()) {\n var4_5 = dh.r(var3_3.next());\n if (var4_5 == dh.aaN) {\n return dh.aaN;\n }\n var1_1 = var1_1 != false || var4_5.fX != false;\n var0.add(var4_5);\n }\n var2_2.fO = var0.toArray(new d.a[0]);\n ** GOTO lbl40\nlbl52: // 2 sources:\n while (var4_6.hasNext()) {\n var6_8 = (Map.Entry)var4_6.next();\n var5_7 = dh.r(var6_8.getKey());\n var6_8 = dh.r(var6_8.getValue());\n if (var5_7 == dh.aaN) return dh.aaN;\n if (var6_8 == dh.aaN) {\n return dh.aaN;\n }\n var1_1 = var1_1 != false || var5_7.fX != false || var6_8.fX != false;\n var0.add(var5_7);\n var3_4.add(var6_8);\n }\n var2_2.fP = var0.toArray(new d.a[0]);\n var2_2.fQ = var3_4.toArray(new d.a[0]);\n ** while (true)\n }", "private static boolean m14540d(C44919o c44919o, C8235ad c8235ad, C17313an c17313an) {\n boolean z;\n AppMethodBeat.m2504i(122757);\n if (c8235ad.eci() || !C25052j.m39373j(c8235ad.ejw(), c17313an)) {\n z = false;\n } else {\n z = true;\n }\n if (z) {\n AppMethodBeat.m2505o(122757);\n return true;\n }\n c44919o.initialize();\n ArrayDeque arrayDeque = c44919o.BKG;\n if (arrayDeque == null) {\n C25052j.dWJ();\n }\n Set set = c44919o.BKH;\n if (set == null) {\n C25052j.dWJ();\n }\n arrayDeque.push(c8235ad);\n while (true) {\n if (arrayDeque.isEmpty()) {\n z = false;\n } else {\n z = true;\n }\n if (!z) {\n c44919o.clear();\n AppMethodBeat.m2505o(122757);\n return false;\n } else if (set.size() > 1000) {\n Throwable illegalStateException = new IllegalStateException((\"Too many supertypes for type: \" + c8235ad + \". Supertypes = \" + C25035t.m39322a((Iterable) set, null, null, null, 0, null, null, 63)).toString());\n AppMethodBeat.m2505o(122757);\n throw illegalStateException;\n } else {\n C8235ad c8235ad2 = (C8235ad) arrayDeque.pop();\n C25052j.m39375o(c8235ad2, \"current\");\n if (set.add(c8235ad2)) {\n C37046c c37046c = c8235ad2.eci() ? C37049c.BKU : C37047a.BKT;\n if ((C25052j.m39373j(c37046c, C37049c.BKU) ^ 1) == 0) {\n c37046c = null;\n }\n if (c37046c != null) {\n for (C46867w c46867w : c8235ad2.ejw().eap()) {\n C25052j.m39375o(c46867w, \"supertype\");\n C8235ad aJ = c37046c.mo31381aJ(c46867w);\n if (aJ.eci() || !C25052j.m39373j(aJ.ejw(), c17313an)) {\n z = false;\n } else {\n z = true;\n }\n if (z) {\n c44919o.clear();\n AppMethodBeat.m2505o(122757);\n return true;\n }\n arrayDeque.add(aJ);\n }\n continue;\n } else {\n continue;\n }\n }\n }\n }\n }", "public final void mo1285b() {\n }", "private void a(java.lang.String r11, java.lang.String r12, boolean r13, boolean r14, com.google.ae r15) {\n /*\n r10 = this;\n r9 = 48;\n r8 = 2;\n r6 = F;\n if (r11 != 0) goto L_0x0017;\n L_0x0007:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x0015 }\n r1 = com.google.dk.NOT_A_NUMBER;\t Catch:{ ao -> 0x0015 }\n r2 = J;\t Catch:{ ao -> 0x0015 }\n r3 = 47;\n r2 = r2[r3];\t Catch:{ ao -> 0x0015 }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x0015 }\n throw r0;\t Catch:{ ao -> 0x0015 }\n L_0x0015:\n r0 = move-exception;\n throw r0;\n L_0x0017:\n r0 = r11.length();\t Catch:{ ao -> 0x002d }\n r1 = 250; // 0xfa float:3.5E-43 double:1.235E-321;\n if (r0 <= r1) goto L_0x002f;\n L_0x001f:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x002d }\n r1 = com.google.dk.TOO_LONG;\t Catch:{ ao -> 0x002d }\n r2 = J;\t Catch:{ ao -> 0x002d }\n r3 = 41;\n r2 = r2[r3];\t Catch:{ ao -> 0x002d }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x002d }\n throw r0;\t Catch:{ ao -> 0x002d }\n L_0x002d:\n r0 = move-exception;\n throw r0;\n L_0x002f:\n r7 = new java.lang.StringBuilder;\n r7.<init>();\n r10.a(r11, r7);\t Catch:{ ao -> 0x004f }\n r0 = r7.toString();\t Catch:{ ao -> 0x004f }\n r0 = b(r0);\t Catch:{ ao -> 0x004f }\n if (r0 != 0) goto L_0x0051;\n L_0x0041:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x004f }\n r1 = com.google.dk.NOT_A_NUMBER;\t Catch:{ ao -> 0x004f }\n r2 = J;\t Catch:{ ao -> 0x004f }\n r3 = 48;\n r2 = r2[r3];\t Catch:{ ao -> 0x004f }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x004f }\n throw r0;\t Catch:{ ao -> 0x004f }\n L_0x004f:\n r0 = move-exception;\n throw r0;\n L_0x0051:\n if (r14 == 0) goto L_0x006f;\n L_0x0053:\n r0 = r7.toString();\t Catch:{ ao -> 0x006d }\n r0 = r10.a(r0, r12);\t Catch:{ ao -> 0x006d }\n if (r0 != 0) goto L_0x006f;\n L_0x005d:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x006b }\n r1 = com.google.dk.INVALID_COUNTRY_CODE;\t Catch:{ ao -> 0x006b }\n r2 = J;\t Catch:{ ao -> 0x006b }\n r3 = 46;\n r2 = r2[r3];\t Catch:{ ao -> 0x006b }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x006b }\n throw r0;\t Catch:{ ao -> 0x006b }\n L_0x006b:\n r0 = move-exception;\n throw r0;\n L_0x006d:\n r0 = move-exception;\n throw r0;\t Catch:{ ao -> 0x006b }\n L_0x006f:\n if (r13 == 0) goto L_0x0074;\n L_0x0071:\n r15.b(r11);\t Catch:{ ao -> 0x00d3 }\n L_0x0074:\n r0 = r10.b(r7);\n r1 = r0.length();\t Catch:{ ao -> 0x00d5 }\n if (r1 <= 0) goto L_0x0081;\n L_0x007e:\n r15.a(r0);\t Catch:{ ao -> 0x00d5 }\n L_0x0081:\n r2 = r10.e(r12);\n r3 = new java.lang.StringBuilder;\n r3.<init>();\n r1 = r7.toString();\t Catch:{ ao -> 0x00d7 }\n r0 = r10;\n r4 = r13;\n r5 = r15;\n r0 = r0.a(r1, r2, r3, r4, r5);\t Catch:{ ao -> 0x00d7 }\n L_0x0095:\n if (r0 == 0) goto L_0x0182;\n L_0x0097:\n r1 = r10.b(r0);\n r4 = r1.equals(r12);\n if (r4 != 0) goto L_0x017f;\n L_0x00a1:\n r0 = r10.a(r0, r1);\n L_0x00a5:\n if (r6 == 0) goto L_0x00bd;\n L_0x00a7:\n a(r7);\t Catch:{ ao -> 0x0121 }\n r3.append(r7);\t Catch:{ ao -> 0x0121 }\n if (r12 == 0) goto L_0x00b8;\n L_0x00af:\n r1 = r0.L();\n r15.a(r1);\t Catch:{ ao -> 0x0123 }\n if (r6 == 0) goto L_0x00bd;\n L_0x00b8:\n if (r13 == 0) goto L_0x00bd;\n L_0x00ba:\n r15.l();\t Catch:{ ao -> 0x0125 }\n L_0x00bd:\n r1 = r3.length();\t Catch:{ ao -> 0x00d1 }\n if (r1 >= r8) goto L_0x0127;\n L_0x00c3:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x00d1 }\n r1 = com.google.dk.TOO_SHORT_NSN;\t Catch:{ ao -> 0x00d1 }\n r2 = J;\t Catch:{ ao -> 0x00d1 }\n r3 = 44;\n r2 = r2[r3];\t Catch:{ ao -> 0x00d1 }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x00d1 }\n throw r0;\t Catch:{ ao -> 0x00d1 }\n L_0x00d1:\n r0 = move-exception;\n throw r0;\n L_0x00d3:\n r0 = move-exception;\n throw r0;\n L_0x00d5:\n r0 = move-exception;\n throw r0;\n L_0x00d7:\n r0 = move-exception;\n r1 = g;\n r4 = r7.toString();\n r1 = r1.matcher(r4);\n r4 = r0.a();\t Catch:{ ao -> 0x0111 }\n r5 = com.google.dk.INVALID_COUNTRY_CODE;\t Catch:{ ao -> 0x0111 }\n if (r4 != r5) goto L_0x0113;\n L_0x00ea:\n r4 = r1.lookingAt();\t Catch:{ ao -> 0x0111 }\n if (r4 == 0) goto L_0x0113;\n L_0x00f0:\n r0 = r1.end();\n r1 = r7.substring(r0);\n r0 = r10;\n r4 = r13;\n r5 = r15;\n r0 = r0.a(r1, r2, r3, r4, r5);\n if (r0 != 0) goto L_0x0095;\n L_0x0101:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x010f }\n r1 = com.google.dk.INVALID_COUNTRY_CODE;\t Catch:{ ao -> 0x010f }\n r2 = J;\t Catch:{ ao -> 0x010f }\n r3 = 43;\n r2 = r2[r3];\t Catch:{ ao -> 0x010f }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x010f }\n throw r0;\t Catch:{ ao -> 0x010f }\n L_0x010f:\n r0 = move-exception;\n throw r0;\n L_0x0111:\n r0 = move-exception;\n throw r0;\n L_0x0113:\n r1 = new com.google.ao;\n r2 = r0.a();\n r0 = r0.getMessage();\n r1.<init>(r2, r0);\n throw r1;\n L_0x0121:\n r0 = move-exception;\n throw r0;\n L_0x0123:\n r0 = move-exception;\n throw r0;\t Catch:{ ao -> 0x0125 }\n L_0x0125:\n r0 = move-exception;\n throw r0;\n L_0x0127:\n if (r0 == 0) goto L_0x013a;\n L_0x0129:\n r1 = new java.lang.StringBuilder;\n r1.<init>();\n r10.a(r3, r0, r1);\t Catch:{ ao -> 0x0150 }\n if (r13 == 0) goto L_0x013a;\n L_0x0133:\n r0 = r1.toString();\t Catch:{ ao -> 0x0150 }\n r15.c(r0);\t Catch:{ ao -> 0x0150 }\n L_0x013a:\n r0 = r3.length();\n if (r0 >= r8) goto L_0x0152;\n L_0x0140:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x014e }\n r1 = com.google.dk.TOO_SHORT_NSN;\t Catch:{ ao -> 0x014e }\n r2 = J;\t Catch:{ ao -> 0x014e }\n r3 = 42;\n r2 = r2[r3];\t Catch:{ ao -> 0x014e }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x014e }\n throw r0;\t Catch:{ ao -> 0x014e }\n L_0x014e:\n r0 = move-exception;\n throw r0;\n L_0x0150:\n r0 = move-exception;\n throw r0;\n L_0x0152:\n r1 = 16;\n if (r0 <= r1) goto L_0x0166;\n L_0x0156:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x0164 }\n r1 = com.google.dk.TOO_LONG;\t Catch:{ ao -> 0x0164 }\n r2 = J;\t Catch:{ ao -> 0x0164 }\n r3 = 45;\n r2 = r2[r3];\t Catch:{ ao -> 0x0164 }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x0164 }\n throw r0;\t Catch:{ ao -> 0x0164 }\n L_0x0164:\n r0 = move-exception;\n throw r0;\n L_0x0166:\n r0 = 0;\n r0 = r3.charAt(r0);\t Catch:{ ao -> 0x017d }\n if (r0 != r9) goto L_0x0171;\n L_0x016d:\n r0 = 1;\n r15.a(r0);\t Catch:{ ao -> 0x017d }\n L_0x0171:\n r0 = r3.toString();\n r0 = java.lang.Long.parseLong(r0);\n r15.a(r0);\n return;\n L_0x017d:\n r0 = move-exception;\n throw r0;\n L_0x017f:\n r0 = r2;\n goto L_0x00a5;\n L_0x0182:\n r0 = r2;\n goto L_0x00a7;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.e2.a(java.lang.String, java.lang.String, boolean, boolean, com.google.ae):void\");\n }", "public abstract void mo6549b();", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(16777267);\n Class<Object> class0 = Object.class;\n Type.getType(class0);\n Type type0 = Type.BYTE_TYPE;\n Type.getObjectType(\"The prefix must not be null\");\n Type type1 = Type.INT_TYPE;\n int[] intArray0 = new int[8];\n intArray0[0] = 6;\n intArray0[1] = 7;\n intArray0[2] = 2;\n intArray0[3] = 1;\n intArray0[4] = 2;\n intArray0[5] = 4;\n intArray0[6] = 9;\n intArray0[7] = 4;\n frame0.inputStack = intArray0;\n Item item0 = new Item();\n item0.hashCode = 1687;\n // Undeclared exception!\n try { \n frame0.execute(111, 164, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "public final /* bridge */ /* synthetic */ void mo43566a() {\n super.mo43566a();\n }", "public static /* synthetic */ p163g.p201e.p203b.p204d.C5419r.C5420a m18181a(p163g.p201e.p203b.p204d.C5419r.C5420a r3, com.bamtech.sdk4.account.DefaultAccount r4, java.util.List<com.bamtech.sdk4.subscription.Subscription> r5, boolean r6, boolean r7, boolean r8, int r9, java.lang.Object r10) {\n /*\n r10 = r9 & 1\n if (r10 == 0) goto L_0x0006\n com.bamtech.sdk4.account.DefaultAccount r4 = r3.f12933a\n L_0x0006:\n r10 = r9 & 2\n if (r10 == 0) goto L_0x000c\n java.util.List<com.bamtech.sdk4.subscription.Subscription> r5 = r3.f12934b\n L_0x000c:\n r10 = r5\n r5 = r9 & 4\n if (r5 == 0) goto L_0x0013\n boolean r6 = r3.f12935c\n L_0x0013:\n r0 = r6\n r5 = r9 & 8\n if (r5 == 0) goto L_0x001a\n boolean r7 = r3.f12936d\n L_0x001a:\n r1 = r7\n r5 = r9 & 16\n if (r5 == 0) goto L_0x0021\n boolean r8 = r3.f12937e\n L_0x0021:\n r2 = r8\n r5 = r3\n r6 = r4\n r7 = r10\n r8 = r0\n r9 = r1\n r10 = r2\n g.e.b.d.r$a r3 = r5.mo17152a(r6, r7, r8, r9, r10)\n return r3\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p163g.p201e.p203b.p204d.C5419r.C5420a.m18181a(g.e.b.d.r$a, com.bamtech.sdk4.account.DefaultAccount, java.util.List, boolean, boolean, boolean, int, java.lang.Object):g.e.b.d.r$a\");\n }", "public /* bridge */ /* synthetic */ void mo55094a() {\n super.mo55094a();\n }", "private void b(int r14) {\n /*\n r13 = this;\n java.lang.Integer r0 = r13.w\n if (r0 != 0) goto L_0x000b\n java.lang.Integer r14 = java.lang.Integer.valueOf(r14)\n r13.w = r14\n goto L_0x005b\n L_0x000b:\n java.lang.Integer r0 = r13.w\n int r0 = r0.intValue()\n if (r0 == r14) goto L_0x005b\n java.lang.IllegalStateException r0 = new java.lang.IllegalStateException\n java.lang.String r14 = a(r14)\n java.lang.String r14 = java.lang.String.valueOf(r14)\n java.lang.Integer r1 = r13.w\n int r1 = r1.intValue()\n java.lang.String r1 = a(r1)\n java.lang.String r1 = java.lang.String.valueOf(r1)\n java.lang.StringBuilder r2 = new java.lang.StringBuilder\n java.lang.String r3 = java.lang.String.valueOf(r14)\n int r3 = r3.length()\n int r3 = r3 + 51\n java.lang.String r4 = java.lang.String.valueOf(r1)\n int r4 = r4.length()\n int r3 = r3 + r4\n r2.<init>(r3)\n java.lang.String r3 = \"Cannot use sign-in mode: \"\n r2.append(r3)\n r2.append(r14)\n java.lang.String r14 = \". Mode was already set to \"\n r2.append(r14)\n r2.append(r1)\n java.lang.String r14 = r2.toString()\n r0.<init>(r14)\n throw r0\n L_0x005b:\n com.google.android.gms.internal.zzqy r14 = r13.l\n if (r14 == 0) goto L_0x0060\n return\n L_0x0060:\n java.util.Map<com.google.android.gms.common.api.Api$zzc<?>, com.google.android.gms.common.api.Api$zze> r14 = r13.c\n java.util.Collection r14 = r14.values()\n java.util.Iterator r14 = r14.iterator()\n r0 = 0\n r1 = 0\n L_0x006c:\n boolean r2 = r14.hasNext()\n if (r2 == 0) goto L_0x0088\n java.lang.Object r2 = r14.next()\n com.google.android.gms.common.api.Api$zze r2 = (com.google.android.gms.common.api.Api.zze) r2\n boolean r3 = r2.zzahd()\n r4 = 1\n if (r3 == 0) goto L_0x0080\n r0 = 1\n L_0x0080:\n boolean r2 = r2.zzahs()\n if (r2 == 0) goto L_0x006c\n r1 = 1\n goto L_0x006c\n L_0x0088:\n java.lang.Integer r14 = r13.w\n int r14 = r14.intValue()\n switch(r14) {\n case 1: goto L_0x00ae;\n case 2: goto L_0x0092;\n case 3: goto L_0x00c2;\n default: goto L_0x0091;\n }\n L_0x0091:\n goto L_0x00c2\n L_0x0092:\n if (r0 == 0) goto L_0x00c2\n android.content.Context r2 = r13.n\n java.util.concurrent.locks.Lock r4 = r13.j\n android.os.Looper r5 = r13.o\n com.google.android.gms.common.GoogleApiAvailability r6 = r13.t\n java.util.Map<com.google.android.gms.common.api.Api$zzc<?>, com.google.android.gms.common.api.Api$zze> r7 = r13.c\n com.google.android.gms.common.internal.zzh r8 = r13.e\n java.util.Map<com.google.android.gms.common.api.Api<?>, java.lang.Integer> r9 = r13.f\n com.google.android.gms.common.api.Api$zza<? extends com.google.android.gms.internal.zzwz, com.google.android.gms.internal.zzxa> r10 = r13.g\n java.util.ArrayList<com.google.android.gms.internal.zzqf> r11 = r13.v\n r3 = r13\n com.google.android.gms.internal.zzqh r14 = com.google.android.gms.internal.zzqh.a(r2, r3, r4, r5, r6, r7, r8, r9, r10, r11)\n L_0x00ab:\n r13.l = r14\n return\n L_0x00ae:\n if (r0 != 0) goto L_0x00b8\n java.lang.IllegalStateException r14 = new java.lang.IllegalStateException\n java.lang.String r0 = \"SIGN_IN_MODE_REQUIRED cannot be used on a GoogleApiClient that does not contain any authenticated APIs. Use connect() instead.\"\n r14.<init>(r0)\n throw r14\n L_0x00b8:\n if (r1 == 0) goto L_0x00c2\n java.lang.IllegalStateException r14 = new java.lang.IllegalStateException\n java.lang.String r0 = \"Cannot use SIGN_IN_MODE_REQUIRED with GOOGLE_SIGN_IN_API. Use connect(SIGN_IN_MODE_OPTIONAL) instead.\"\n r14.<init>(r0)\n throw r14\n L_0x00c2:\n com.google.android.gms.internal.zzqr r14 = new com.google.android.gms.internal.zzqr\n android.content.Context r2 = r13.n\n java.util.concurrent.locks.Lock r4 = r13.j\n android.os.Looper r5 = r13.o\n com.google.android.gms.common.GoogleApiAvailability r6 = r13.t\n java.util.Map<com.google.android.gms.common.api.Api$zzc<?>, com.google.android.gms.common.api.Api$zze> r7 = r13.c\n com.google.android.gms.common.internal.zzh r8 = r13.e\n java.util.Map<com.google.android.gms.common.api.Api<?>, java.lang.Integer> r9 = r13.f\n com.google.android.gms.common.api.Api$zza<? extends com.google.android.gms.internal.zzwz, com.google.android.gms.internal.zzxa> r10 = r13.g\n java.util.ArrayList<com.google.android.gms.internal.zzqf> r11 = r13.v\n r1 = r14\n r3 = r13\n r12 = r13\n r1.<init>(r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12)\n goto L_0x00ab\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.zzqp.b(int):void\");\n }", "static com.qiyukf.nimlib.p470f.p471a.C5826a m23369a(android.os.Parcel r4) {\n /*\n com.qiyukf.nimlib.f.a.a r0 = new com.qiyukf.nimlib.f.a.a\n r1 = 0\n r0.m50001init(r1)\n int r2 = r4.readInt()\n r0.f18499a = r2\n int r2 = r4.readInt()\n if (r2 <= 0) goto L_0x001d\n byte[] r2 = r4.createByteArray()\n java.nio.ByteBuffer r2 = java.nio.ByteBuffer.wrap(r2)\n r0.f18501c = r2\n L_0x001d:\n int r2 = r4.readInt()\n r0.f18500b = r2\n int r2 = r4.readInt()\n if (r2 <= 0) goto L_0x0061\n byte[] r4 = r4.createByteArray()\n int r3 = r0.f18500b\n if (r3 <= 0) goto L_0x005c\n int r1 = r0.f18500b\n if (r1 != r2) goto L_0x0049\n java.nio.ByteBuffer r4 = java.nio.ByteBuffer.wrap(r4)\n r0.f18502d = r4\n java.nio.ByteBuffer r4 = r0.f18502d\n r4.position(r2)\n goto L_0x0068\n L_0x0049:\n int r1 = r0.f18500b\n java.nio.ByteBuffer r1 = java.nio.ByteBuffer.allocate(r1)\n r0.f18502d = r1\n java.nio.ByteBuffer r1 = r0.f18502d\n r1.put(r4)\n goto L_0x0068\n L_0x005c:\n java.nio.ByteBuffer r4 = java.nio.ByteBuffer.wrap(r4, r1, r2)\n goto L_0x0065\n L_0x0061:\n java.nio.ByteBuffer r4 = java.nio.ByteBuffer.allocate(r1)\n L_0x0065:\n r0.f18502d = r4\n L_0x0068:\n boolean r4 = m23372b(r0)\n if (r4 == 0) goto L_0x006f\n return r0\n L_0x006f:\n int r4 = r0.f18500b\n if (r4 <= 0) goto L_0x007d\n android.util.SparseArray<com.qiyukf.nimlib.f.a.a> r4 = f18504a\n int r1 = r0.f18499a\n r4.put(r1, r0)\n goto L_0x00a2\n L_0x007d:\n android.util.SparseArray<com.qiyukf.nimlib.f.a.a> r4 = f18504a\n int r1 = r0.f18499a\n java.lang.Object r4 = r4.get(r1)\n com.qiyukf.nimlib.f.a.a r4 = (com.qiyukf.nimlib.p470f.p471a.C5826a) r4\n if (r4 == 0) goto L_0x00a2\n java.nio.ByteBuffer r1 = r4.f18502d\n java.nio.ByteBuffer r0 = r0.f18502d\n r1.put(r0)\n boolean r0 = m23372b(r4)\n if (r0 == 0) goto L_0x00a2\n android.util.SparseArray<com.qiyukf.nimlib.f.a.a> r0 = f18504a\n int r1 = r4.f18499a\n r0.remove(r1)\n return r4\n L_0x00a2:\n r4 = 0\n return r4\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.qiyukf.nimlib.p470f.p471a.C5826a.C5829b.m23369a(android.os.Parcel):com.qiyukf.nimlib.f.a.a\");\n }", "public abstract void mo42331g();", "void a(bu var1_1, f var2_2, Map var3_3, double var4_4, double var6_5) {\n block6 : {\n var14_6 = fj.z;\n var8_7 = M.b();\n var9_8 = var2_2.a();\n while (var9_8.f()) {\n var10_9 = var9_8.a();\n if (var14_6) break block6;\n if (!var10_9.e() || var1_1.i((y.c.d)var10_9).bendCount() > 1) ** GOTO lbl-1000\n var11_10 = var1_1.i((y.c.d)var10_9);\n var12_11 = var11_10.getSourceRealizer();\n if (var1_1.i((y.c.d)var10_9).bendCount() == 0) {\n var11_10.appendBend(var11_10.getSourcePort().a(var12_11), var11_10.getSourcePort().b(var12_11) - 20.0 - var12_11.getHeight());\n }\n this.a(var1_1, var4_4, var6_5, (y.c.d)var10_9, true, false, false, var10_9.c());\n if (var14_6) lbl-1000: // 2 sources:\n {\n var8_7.a(var10_9, true);\n var8_7.a((Object)var3_3.get(var10_9), true);\n }\n var9_8.g();\n if (!var14_6) continue;\n }\n var1_1.a(as.a, var8_7);\n }\n var9_8 = new as();\n var9_8.a(5.0);\n var9_8.b(false);\n var9_8.a(true);\n try {\n var10_9 = new bI(1);\n var10_9.a(false);\n var10_9.b(true);\n var10_9.d().a(true);\n var10_9.a(var1_1, (ah)var9_8);\n return;\n }\n finally {\n var1_1.d_(as.a);\n }\n }", "public lj ax() {\n throw new Runtime(\"d2j fail translate: java.lang.RuntimeException: can not merge I and Z\\r\\n\\tat com.googlecode.dex2jar.ir.TypeClass.merge(TypeClass.java:100)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeRef.updateTypeClass(TypeTransformer.java:174)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.provideAs(TypeTransformer.java:780)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.e1expr(TypeTransformer.java:496)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:713)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.enexpr(TypeTransformer.java:698)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:719)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.s1stmt(TypeTransformer.java:810)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.sxStmt(TypeTransformer.java:840)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.analyze(TypeTransformer.java:206)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer.transform(TypeTransformer.java:44)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.optimize(Dex2jar.java:162)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertCode(Dex2Asm.java:414)\\r\\n\\tat com.googlecode.d2j.dex.ExDex2Asm.convertCode(ExDex2Asm.java:42)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.convertCode(Dex2jar.java:128)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertMethod(Dex2Asm.java:509)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:406)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertDex(Dex2Asm.java:422)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.doTranslate(Dex2jar.java:172)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.to(Dex2jar.java:272)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:108)\\r\\n\\tat com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:288)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:32)\\r\\n\");\n }", "protected void method_865(bcb var1) {\r\n label136: {\r\n boolean var2;\r\n boolean var3;\r\n label132: {\r\n label131: {\r\n label130: {\r\n label137: {\r\n label138: {\r\n label139: {\r\n label140: {\r\n label141: {\r\n var2 = method_1147();\r\n int var10000 = var1.field_450;\r\n if(var2) {\r\n switch(var1.field_450) {\r\n case 1:\r\n var10000 = class_687.field_2947;\r\n break;\r\n case 2:\r\n break label141;\r\n case 3:\r\n break label140;\r\n case 4:\r\n break label139;\r\n case 5:\r\n break label138;\r\n case 50:\r\n break label137;\r\n case 60:\r\n break label130;\r\n case 70:\r\n break label131;\r\n case 100:\r\n break label132;\r\n case 110:\r\n break label136;\r\n default:\r\n return;\r\n }\r\n }\r\n\r\n if(var2) {\r\n var10000 = var10000 == 0?1:0;\r\n }\r\n\r\n class_687.field_2947 = (boolean)var10000;\r\n this.field_972.field_449 = String.valueOf(class_687.field_2947);\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n var3 = class_687.field_2946;\r\n if(var2) {\r\n var3 = !class_687.field_2946;\r\n }\r\n\r\n class_687.field_2946 = var3;\r\n this.field_973.field_449 = String.valueOf(class_687.field_2946);\r\n this.field_984 = true;\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n var3 = class_687.field_2948;\r\n if(var2) {\r\n var3 = !class_687.field_2948;\r\n }\r\n\r\n class_687.field_2948 = var3;\r\n this.field_974.field_449 = String.valueOf(class_687.field_2948);\r\n this.field_983 = true;\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n var3 = class_687.field_2951;\r\n if(var2) {\r\n var3 = !class_687.field_2951;\r\n }\r\n\r\n class_687.field_2951 = var3;\r\n this.field_975.field_449 = String.valueOf(class_687.field_2951);\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n var3 = class_687.field_2952;\r\n if(var2) {\r\n var3 = !class_687.field_2952;\r\n }\r\n\r\n class_687.field_2952 = var3;\r\n this.field_976.field_449 = String.valueOf(class_687.field_2952);\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n class_687.field_2949 = this.field_979.method_835();\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n class_687.field_2950 = this.field_980.method_835();\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n class_687.field_2953 = (double)this.field_981.method_834();\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n bao var6;\r\n label77: {\r\n class_207 var5;\r\n label142: {\r\n var3 = this.field_983;\r\n if(var2) {\r\n if(this.field_983) {\r\n bbv var4 = bao.method_5273().canLoseFocus4;\r\n bbv.SetHUDText(\"\");\r\n }\r\n\r\n var5 = this;\r\n if(!var2) {\r\n break label142;\r\n }\r\n\r\n var3 = this.field_984;\r\n }\r\n\r\n if(var3) {\r\n var6 = this.field_557;\r\n if(!var2) {\r\n break label77;\r\n }\r\n\r\n if(this.field_557.cursorCounter6 != null) {\r\n class_687.field_2954 = true;\r\n }\r\n }\r\n\r\n class_687.method_3712();\r\n this.field_983 = false;\r\n this.field_984 = false;\r\n var5 = this;\r\n }\r\n\r\n var6 = var5.field_557;\r\n }\r\n\r\n var6.method_5236(this.field_971);\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n class_687.method_3711();\r\n this.field_557.method_5236(this.field_971);\r\n this.field_983 = false;\r\n this.field_984 = false;\r\n }", "void m5770d() throws C0841b;", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "@Test\n public void test055() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Block block0 = (Block)errorPage0.acronym();\n }", "public void mo3613a() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r4 = this;\n r0 = r4.f18081b;\n monitor-enter(r0);\n r1 = r4.f18080a;\t Catch:{ all -> 0x001f }\n if (r1 == 0) goto L_0x0009;\t Catch:{ all -> 0x001f }\n L_0x0007:\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n return;\t Catch:{ all -> 0x001f }\n L_0x0009:\n r1 = 1;\t Catch:{ all -> 0x001f }\n r4.f18080a = r1;\t Catch:{ all -> 0x001f }\n r2 = r4.f18081b;\t Catch:{ all -> 0x001f }\n r3 = r2.f12200d;\t Catch:{ all -> 0x001f }\n r3 = r3 + r1;\t Catch:{ all -> 0x001f }\n r2.f12200d = r3;\t Catch:{ all -> 0x001f }\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n r0 = r4.f18083d;\n okhttp3.internal.C2933c.m14194a(r0);\n r0 = r4.f18082c;\t Catch:{ IOException -> 0x001e }\n r0.m14100c();\t Catch:{ IOException -> 0x001e }\n L_0x001e:\n return;\n L_0x001f:\n r1 = move-exception;\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.c.a.a():void\");\n }", "public int getAutofillType() {\n/* 174 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "final com.google.bV a(java.util.Map r14) {\n /*\n r13_this = this;\n r6 = f;\n if (r14 == 0) goto L_0x013c;\n L_0x0004:\n r0 = com.google.fm.TRY_HARDER;\n r0 = r14.containsKey(r0);\n if (r0 == 0) goto L_0x013c;\n L_0x000c:\n r0 = 1;\n r2 = r0;\n L_0x000e:\n if (r14 == 0) goto L_0x0140;\n L_0x0010:\n r0 = com.google.fm.PURE_BARCODE;\n r0 = r14.containsKey(r0);\n if (r0 == 0) goto L_0x0140;\n L_0x0018:\n r0 = 1;\n L_0x0019:\n r1 = r13.b;\n r7 = r1.f();\n r1 = r13.b;\n r8 = r1.b();\n r1 = r7 * 3;\n r1 = r1 / 228;\n r3 = 3;\n if (r1 < r3) goto L_0x002e;\n L_0x002c:\n if (r2 == 0) goto L_0x002f;\n L_0x002e:\n r1 = 3;\n L_0x002f:\n r2 = 0;\n r3 = 5;\n r9 = new int[r3];\n r4 = r1 + -1;\n r5 = r1;\n L_0x0036:\n if (r4 >= r7) goto L_0x0127;\n L_0x0038:\n if (r2 != 0) goto L_0x0127;\n L_0x003a:\n r1 = 0;\n r3 = 0;\n r9[r1] = r3;\n r1 = 1;\n r3 = 0;\n r9[r1] = r3;\n r1 = 2;\n r3 = 0;\n r9[r1] = r3;\n r1 = 3;\n r3 = 0;\n r9[r1] = r3;\n r1 = 4;\n r3 = 0;\n r9[r1] = r3;\n r1 = 0;\n r3 = 0;\n L_0x0050:\n if (r3 >= r8) goto L_0x010d;\n L_0x0052:\n r10 = r13.b;\n r10 = r10.a(r3, r4);\n if (r10 == 0) goto L_0x0069;\n L_0x005a:\n r10 = r1 & 1;\n r11 = 1;\n if (r10 != r11) goto L_0x0061;\n L_0x005f:\n r1 = r1 + 1;\n L_0x0061:\n r10 = r9[r1];\n r10 = r10 + 1;\n r9[r1] = r10;\n if (r6 == 0) goto L_0x0109;\n L_0x0069:\n r10 = r1 & 1;\n if (r10 != 0) goto L_0x0103;\n L_0x006d:\n r10 = 4;\n if (r1 != r10) goto L_0x00f9;\n L_0x0070:\n r1 = a(r9);\n if (r1 == 0) goto L_0x015f;\n L_0x0076:\n r1 = r13.a(r9, r4, r3, r0);\n if (r1 == 0) goto L_0x0159;\n L_0x007c:\n r5 = 2;\n r1 = r13.a;\n if (r1 == 0) goto L_0x0156;\n L_0x0081:\n r1 = r13.b();\n if (r6 == 0) goto L_0x00c2;\n L_0x0087:\n r2 = r13.c();\n r10 = 2;\n r10 = r9[r10];\n if (r2 <= r10) goto L_0x0152;\n L_0x0090:\n r3 = 2;\n r3 = r9[r3];\n r2 = r2 - r3;\n r2 = r2 - r5;\n r3 = r4 + r2;\n r2 = r8 + -1;\n L_0x0099:\n if (r6 == 0) goto L_0x014e;\n L_0x009b:\n r4 = r5;\n r12 = r3;\n r3 = r1;\n r1 = r2;\n r2 = r12;\n L_0x00a0:\n r5 = 0;\n r10 = 2;\n r10 = r9[r10];\n r9[r5] = r10;\n r5 = 1;\n r10 = 3;\n r10 = r9[r10];\n r9[r5] = r10;\n r5 = 2;\n r10 = 4;\n r10 = r9[r10];\n r9[r5] = r10;\n r5 = 3;\n r10 = 1;\n r9[r5] = r10;\n r5 = 4;\n r10 = 0;\n r9[r5] = r10;\n r5 = 3;\n if (r6 == 0) goto L_0x0147;\n L_0x00bd:\n r5 = r4;\n r4 = r2;\n r12 = r3;\n r3 = r1;\n r1 = r12;\n L_0x00c2:\n r2 = 0;\n r10 = 0;\n r11 = 0;\n r9[r10] = r11;\n r10 = 1;\n r11 = 0;\n r9[r10] = r11;\n r10 = 2;\n r11 = 0;\n r9[r10] = r11;\n r10 = 3;\n r11 = 0;\n r9[r10] = r11;\n r10 = 4;\n r11 = 0;\n r9[r10] = r11;\n if (r6 == 0) goto L_0x0143;\n L_0x00d9:\n r2 = 0;\n r10 = 2;\n r10 = r9[r10];\n r9[r2] = r10;\n r2 = 1;\n r10 = 3;\n r10 = r9[r10];\n r9[r2] = r10;\n r2 = 2;\n r10 = 4;\n r10 = r9[r10];\n r9[r2] = r10;\n r2 = 3;\n r10 = 1;\n r9[r2] = r10;\n r2 = 4;\n r10 = 0;\n r9[r2] = r10;\n r2 = 3;\n if (r6 == 0) goto L_0x0143;\n L_0x00f6:\n r12 = r2;\n r2 = r1;\n r1 = r12;\n L_0x00f9:\n r1 = r1 + 1;\n r10 = r9[r1];\n r10 = r10 + 1;\n r9[r1] = r10;\n if (r6 == 0) goto L_0x0109;\n L_0x0103:\n r10 = r9[r1];\n r10 = r10 + 1;\n r9[r1] = r10;\n L_0x0109:\n r3 = r3 + 1;\n if (r6 == 0) goto L_0x0050;\n L_0x010d:\n r1 = a(r9);\n if (r1 == 0) goto L_0x0124;\n L_0x0113:\n r1 = r13.a(r9, r4, r8, r0);\n if (r1 == 0) goto L_0x0124;\n L_0x0119:\n r1 = 0;\n r5 = r9[r1];\n r1 = r13.a;\n if (r1 == 0) goto L_0x0124;\n L_0x0120:\n r2 = r13.b();\n L_0x0124:\n r4 = r4 + r5;\n if (r6 == 0) goto L_0x0036;\n L_0x0127:\n r0 = r13.a();\n com.google.bm.a(r0);\n r1 = new com.google.bV;\n r1.<init>(r0);\n r0 = com.google.gC.a;\n if (r0 == 0) goto L_0x013b;\n L_0x0137:\n r0 = r6 + 1;\n f = r0;\n L_0x013b:\n return r1;\n L_0x013c:\n r0 = 0;\n r2 = r0;\n goto L_0x000e;\n L_0x0140:\n r0 = 0;\n goto L_0x0019;\n L_0x0143:\n r12 = r2;\n r2 = r1;\n r1 = r12;\n goto L_0x0109;\n L_0x0147:\n r12 = r1;\n r1 = r5;\n r5 = r4;\n r4 = r2;\n r2 = r3;\n r3 = r12;\n goto L_0x0109;\n L_0x014e:\n r4 = r3;\n r3 = r2;\n goto L_0x00c2;\n L_0x0152:\n r2 = r3;\n r3 = r4;\n goto L_0x0099;\n L_0x0156:\n r1 = r2;\n goto L_0x0087;\n L_0x0159:\n r1 = r3;\n r3 = r2;\n r2 = r4;\n r4 = r5;\n goto L_0x00a0;\n L_0x015f:\n r1 = r2;\n goto L_0x00d9;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.bj.a(java.util.Map):com.google.bV\");\n }", "@Test(timeout = 4000)\n public void test111() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n ClassWriter classWriter1 = new ClassWriter(2);\n Type type0 = Type.INT_TYPE;\n Type type1 = Type.VOID_TYPE;\n Type type2 = Type.BOOLEAN_TYPE;\n Type type3 = Type.FLOAT_TYPE;\n Type type4 = Type.SHORT_TYPE;\n Class<Object> class0 = Object.class;\n Type.getType(class0);\n Type[] typeArray0 = new Type[2];\n typeArray0[0] = type4;\n typeArray0[1] = type0;\n frame0.initInputFrame(classWriter1, 10, typeArray0, 1431);\n classWriter1.newLong((-1L));\n ClassWriter classWriter2 = new ClassWriter(4);\n Edge edge0 = new Edge();\n Label label0 = edge0.successor;\n // Undeclared exception!\n try { \n frame0.merge(classWriter0, frame0, 5);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 0\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "public int getType() {\n/* 50 */ return this.type;\n/* */ }", "public int getObjectFormatCode() {\n/* 116 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test(timeout = 4000)\n public void test107() throws Throwable {\n Frame frame0 = new Frame();\n Type[] typeArray0 = new Type[9];\n Type type0 = Type.getReturnType(\"Zu.y \");\n typeArray0[0] = type0;\n Type type1 = Type.DOUBLE_TYPE;\n typeArray0[1] = type1;\n Type type2 = Type.DOUBLE_TYPE;\n typeArray0[2] = type2;\n int[] intArray0 = new int[7];\n intArray0[0] = 2;\n intArray0[1] = 3;\n intArray0[0] = 7;\n intArray0[3] = 7;\n intArray0[4] = 10;\n intArray0[5] = 5;\n intArray0[6] = 1;\n frame0.inputLocals = intArray0;\n typeArray0[3] = type1;\n Type type3 = Type.VOID_TYPE;\n typeArray0[4] = type3;\n Type type4 = Type.BOOLEAN_TYPE;\n typeArray0[2] = type4;\n Type type5 = Type.FLOAT_TYPE;\n typeArray0[6] = type5;\n Type type6 = Type.SHORT_TYPE;\n Class<Integer> class0 = Integer.class;\n Type.getType(class0);\n ClassWriter classWriter0 = new ClassWriter(189);\n Item item0 = new Item();\n // Undeclared exception!\n try { \n frame0.execute(28, 10, (ClassWriter) null, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "private static boolean checkSimpleDerivation(XSSimpleType derived, XSSimpleType base, short block) {\n/* 188 */ if (derived == base) {\n/* 189 */ return true;\n/* */ }\n/* */ \n/* */ \n/* 193 */ if ((block & 0x2) != 0 || (derived\n/* 194 */ .getBaseType().getFinal() & 0x2) != 0) {\n/* 195 */ return false;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 200 */ XSSimpleType directBase = (XSSimpleType)derived.getBaseType();\n/* 201 */ if (directBase == base) {\n/* 202 */ return true;\n/* */ }\n/* */ \n/* 205 */ if (directBase != SchemaGrammar.fAnySimpleType && \n/* 206 */ checkSimpleDerivation(directBase, base, block)) {\n/* 207 */ return true;\n/* */ }\n/* */ \n/* */ \n/* 211 */ if ((derived.getVariety() == 2 || derived\n/* 212 */ .getVariety() == 3) && base == SchemaGrammar.fAnySimpleType)\n/* */ {\n/* 214 */ return true;\n/* */ }\n/* */ \n/* */ \n/* 218 */ if (base.getVariety() == 3) {\n/* 219 */ XSObjectList subUnionMemberDV = base.getMemberTypes();\n/* 220 */ int subUnionSize = subUnionMemberDV.getLength();\n/* 221 */ for (int i = 0; i < subUnionSize; i++) {\n/* 222 */ base = (XSSimpleType)subUnionMemberDV.item(i);\n/* 223 */ if (checkSimpleDerivation(derived, base, block)) {\n/* 224 */ return true;\n/* */ }\n/* */ } \n/* */ } \n/* 228 */ return false;\n/* */ }", "public void a(IBlockAccess paramard, BlockPosition paramdt)\r\n/* 119: */ {\r\n/* 120:148 */ bdv localbdv = e(paramard, paramdt);\r\n/* 121:149 */ if (localbdv != null)\r\n/* 122: */ {\r\n/* 123:150 */ Block localbec = localbdv.b();\r\n/* 124:151 */ BlockType localatr = localbec.getType();\r\n/* 125:152 */ if ((localatr == this) || (localatr.getMaterial() == Material.air)) {\r\n/* 126:153 */ return;\r\n/* 127: */ }\r\n/* 128:156 */ float f = localbdv.a(0.0F);\r\n/* 129:157 */ if (localbdv.d()) {\r\n/* 130:158 */ f = 1.0F - f;\r\n/* 131: */ }\r\n/* 132:160 */ localatr.a(paramard, paramdt);\r\n/* 133:161 */ if ((localatr == BlockList.J) || (localatr == BlockList.F)) {\r\n/* 134:162 */ f = 0.0F;\r\n/* 135: */ }\r\n/* 136:164 */ EnumDirection localej = localbdv.e();\r\n/* 137:165 */ this.B = (localatr.z() - localej.g() * f);\r\n/* 138:166 */ this.C = (localatr.B() - localej.h() * f);\r\n/* 139:167 */ this.D = (localatr.D() - localej.i() * f);\r\n/* 140:168 */ this.E = (localatr.A() - localej.g() * f);\r\n/* 141:169 */ this.F = (localatr.C() - localej.h() * f);\r\n/* 142:170 */ this.G = (localatr.E() - localej.i() * f);\r\n/* 143: */ }\r\n/* 144: */ }", "private void method_4318() {\r\n String[] var1;\r\n int var11;\r\n label68: {\r\n var1 = class_752.method_4253();\r\n class_758 var10000 = this;\r\n if(var1 != null) {\r\n if(this.field_3417 != null) {\r\n label71: {\r\n var11 = this.field_3417.field_3012;\r\n if(var1 != null) {\r\n if(this.field_3417.field_3012) {\r\n var10000 = this;\r\n if(var1 != null) {\r\n if(!this.field_2990.field_1832) {\r\n this.method_409(this.field_3404, class_1691.method_9334((class_1036)null), 10.0F);\r\n }\r\n\r\n var10000 = this;\r\n }\r\n\r\n var10000.field_3417 = null;\r\n if(var1 != null) {\r\n break label71;\r\n }\r\n }\r\n\r\n var11 = this.field_3029 % 10;\r\n }\r\n\r\n if(var1 == null) {\r\n break label68;\r\n }\r\n\r\n if(var11 == 0) {\r\n float var13;\r\n var11 = (var13 = this.method_406() - this.method_405()) == 0.0F?0:(var13 < 0.0F?-1:1);\r\n if(var1 == null) {\r\n break label68;\r\n }\r\n\r\n if(var11 < 0) {\r\n this.method_4188(this.method_406() + 1.0F);\r\n }\r\n }\r\n }\r\n }\r\n\r\n var10000 = this;\r\n }\r\n\r\n var11 = var10000.field_3028.nextInt(10);\r\n }\r\n\r\n if(var11 == 0) {\r\n float var2 = 32.0F;\r\n List var3 = this.field_2990.method_2157(class_705.class, this.field_3004.method_7097((double)var2, (double)var2, (double)var2));\r\n class_705 var4 = null;\r\n double var5 = Double.MAX_VALUE;\r\n Iterator var7 = var3.iterator();\r\n\r\n while(true) {\r\n if(var7.hasNext()) {\r\n class_705 var8 = (class_705)var7.next();\r\n double var9 = var8.method_3891(this);\r\n if(var1 == null) {\r\n break;\r\n }\r\n\r\n label43: {\r\n double var12 = var9;\r\n if(var1 != null) {\r\n if(var9 >= var5) {\r\n break label43;\r\n }\r\n\r\n var12 = var9;\r\n }\r\n\r\n var5 = var12;\r\n var4 = var8;\r\n }\r\n\r\n if(var1 != null) {\r\n continue;\r\n }\r\n }\r\n\r\n this.field_3417 = var4;\r\n break;\r\n }\r\n }\r\n\r\n }", "public final void mo51373a() {\n }", "private final void zzR(Object var1_1, zzha var2_2) {\n block94: {\n var3_3 = this;\n var4_4 = var1_1;\n var5_5 = var2_2;\n var6_6 = this.zzh;\n if (var6_6 != 0) break block94;\n var7_7 = this.zzc;\n var6_6 = ((int[])var7_7).length;\n var8_8 = zzja.zzb;\n var9_9 = 1048575;\n var10_10 = 1.469367E-39f;\n var11_11 = var9_9;\n var13_13 = 0;\n for (var12_12 = 0; var12_12 < var6_6; var12_12 += 3) {\n block95: {\n var14_14 = var3_3.zzA(var12_12);\n var15_15 = var3_3.zzc;\n var16_16 = var15_15[var12_12];\n var17_17 = zzja.zzC(var14_14);\n var18_18 = 17;\n var19_19 = 1;\n if (var17_17 <= var18_18) {\n var20_20 = var3_3.zzc;\n var21_21 = var12_12 + 2;\n var18_18 = var20_20[var21_21];\n if ((var21_21 = var18_18 & var9_9) != var11_11) {\n var22_22 = var21_21;\n var13_13 = var8_8.getInt(var4_4, var22_22);\n var11_11 = var21_21;\n }\n var18_18 >>>= 20;\n var18_18 = var19_19 << var18_18;\n } else {\n var18_18 = 0;\n var20_20 = null;\n }\n var24_23 = var14_14 &= var9_9;\n switch (var17_17) lbl-1000:\n // 56 sources\n\n {\n default: {\n var17_17 = 0;\n break block95;\n }\n case 68: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var26_24 = var8_8.getObject(var4_4, var24_23);\n var27_25 = var3_3.zzv(var12_12);\n var5_5.zzs(var16_16, var26_24, var27_25);\n ** GOTO lbl-1000\n }\n case 67: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var24_23 = zzja.zzG(var4_4, var24_23);\n var5_5.zzq(var16_16, var24_23);\n ** GOTO lbl-1000\n }\n case 66: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var9_9 = zzja.zzF(var4_4, var24_23);\n var5_5.zzp(var16_16, var9_9);\n ** GOTO lbl-1000\n }\n case 65: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var24_23 = zzja.zzG(var4_4, var24_23);\n var5_5.zzd(var16_16, var24_23);\n ** GOTO lbl-1000\n }\n case 64: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var9_9 = zzja.zzF(var4_4, var24_23);\n var5_5.zzb(var16_16, var9_9);\n ** GOTO lbl-1000\n }\n case 63: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var9_9 = zzja.zzF(var4_4, var24_23);\n var5_5.zzg(var16_16, var9_9);\n ** GOTO lbl-1000\n }\n case 62: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var9_9 = zzja.zzF(var4_4, var24_23);\n var5_5.zzo(var16_16, var9_9);\n ** GOTO lbl-1000\n }\n case 61: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var26_24 = (zzgs)var8_8.getObject(var4_4, var24_23);\n var5_5.zzn(var16_16, (zzgs)var26_24);\n ** GOTO lbl-1000\n }\n case 60: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var26_24 = var8_8.getObject(var4_4, var24_23);\n var27_25 = var3_3.zzv(var12_12);\n var5_5.zzr(var16_16, var26_24, var27_25);\n ** GOTO lbl-1000\n }\n case 59: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var26_24 = var8_8.getObject(var4_4, var24_23);\n zzja.zzT(var16_16, var26_24, var5_5);\n ** GOTO lbl-1000\n }\n case 58: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var9_9 = (int)zzja.zzH(var4_4, var24_23);\n var5_5.zzl(var16_16, (boolean)var9_9);\n ** GOTO lbl-1000\n }\n case 57: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var9_9 = zzja.zzF(var4_4, var24_23);\n var5_5.zzk(var16_16, var9_9);\n ** GOTO lbl-1000\n }\n case 56: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var24_23 = zzja.zzG(var4_4, var24_23);\n var5_5.zzj(var16_16, var24_23);\n ** GOTO lbl-1000\n }\n case 55: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var9_9 = zzja.zzF(var4_4, var24_23);\n var5_5.zzi(var16_16, var9_9);\n ** GOTO lbl-1000\n }\n case 54: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var24_23 = zzja.zzG(var4_4, var24_23);\n var5_5.zzh(var16_16, var24_23);\n ** GOTO lbl-1000\n }\n case 53: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var24_23 = zzja.zzG(var4_4, var24_23);\n var5_5.zzc(var16_16, var24_23);\n ** GOTO lbl-1000\n }\n case 52: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var10_10 = zzja.zzE(var4_4, var24_23);\n var5_5.zze(var16_16, var10_10);\n ** GOTO lbl-1000\n }\n case 51: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var28_26 = zzja.zzD(var4_4, var24_23);\n var5_5.zzf(var16_16, var28_26);\n ** GOTO lbl-1000\n }\n case 50: {\n var26_24 = var8_8.getObject(var4_4, var24_23);\n var3_3.zzS(var5_5, var16_16, var26_24, var12_12);\n ** GOTO lbl-1000\n }\n case 49: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n var27_25 = var3_3.zzv(var12_12);\n zzjk.zzaa(var14_14, (List)var26_24, var5_5, var27_25);\n ** GOTO lbl-1000\n }\n case 48: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzN(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 47: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzS(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 46: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzP(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 45: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzU(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 44: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzV(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 43: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzR(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 42: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzW(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 41: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzT(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 40: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzO(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 39: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzQ(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 38: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzM(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 37: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzL(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 36: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzK(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 35: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzJ(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 34: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n var16_16 = 0;\n var15_15 = null;\n zzjk.zzN(var14_14, (List)var26_24, var5_5, false);\n ** GOTO lbl290\n }\n case 33: {\n var16_16 = 0;\n var15_15 = null;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzS(var14_14, (List)var26_24, var5_5, false);\n ** GOTO lbl290\n }\n case 32: {\n var16_16 = 0;\n var15_15 = null;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzP(var14_14, (List)var26_24, var5_5, false);\n ** GOTO lbl290\n }\n case 31: {\n var16_16 = 0;\n var15_15 = null;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzU(var14_14, (List)var26_24, var5_5, false);\n ** GOTO lbl290\n }\n case 30: {\n var16_16 = 0;\n var15_15 = null;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzV(var14_14, (List)var26_24, var5_5, false);\n ** GOTO lbl290\n }\n case 29: {\n var16_16 = 0;\n var15_15 = null;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzR(var14_14, (List)var26_24, var5_5, false);\nlbl290:\n // 6 sources\n\n var17_17 = 0;\n break block95;\n }\n case 28: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzY(var14_14, (List)var26_24, var5_5);\n ** GOTO lbl-1000\n }\n case 27: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n var27_25 = var3_3.zzv(var12_12);\n zzjk.zzZ(var14_14, (List)var26_24, var5_5, var27_25);\n ** GOTO lbl-1000\n }\n case 26: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzX(var14_14, (List)var26_24, var5_5);\n ** GOTO lbl-1000\n }\n case 25: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n var17_17 = 0;\n zzjk.zzW(var14_14, (List)var26_24, var5_5, false);\n break block95;\n }\n case 24: {\n var17_17 = 0;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzT(var14_14, (List)var26_24, var5_5, false);\n break block95;\n }\n case 23: {\n var17_17 = 0;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzO(var14_14, (List)var26_24, var5_5, false);\n break block95;\n }\n case 22: {\n var17_17 = 0;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzQ(var14_14, (List)var26_24, var5_5, false);\n break block95;\n }\n case 21: {\n var17_17 = 0;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzM(var14_14, (List)var26_24, var5_5, false);\n break block95;\n }\n case 20: {\n var17_17 = 0;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzL(var14_14, (List)var26_24, var5_5, false);\n break block95;\n }\n case 19: {\n var17_17 = 0;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzK(var14_14, (List)var26_24, var5_5, false);\n break block95;\n }\n case 18: {\n var17_17 = 0;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzJ(var14_14, (List)var26_24, var5_5, false);\n break block95;\n }\n case 17: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var26_24 = var8_8.getObject(var4_4, var24_23);\n var27_25 = var3_3.zzv(var12_12);\n var5_5.zzs(var16_16, var26_24, var27_25);\n }\n break block95;\n }\n case 16: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var24_23 = var8_8.getLong(var4_4, var24_23);\n var5_5.zzq(var16_16, var24_23);\n }\n break block95;\n }\n case 15: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var9_9 = var8_8.getInt(var4_4, var24_23);\n var5_5.zzp(var16_16, var9_9);\n }\n break block95;\n }\n case 14: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var24_23 = var8_8.getLong(var4_4, var24_23);\n var5_5.zzd(var16_16, var24_23);\n }\n break block95;\n }\n case 13: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var9_9 = var8_8.getInt(var4_4, var24_23);\n var5_5.zzb(var16_16, var9_9);\n }\n break block95;\n }\n case 12: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var9_9 = var8_8.getInt(var4_4, var24_23);\n var5_5.zzg(var16_16, var9_9);\n }\n break block95;\n }\n case 11: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var9_9 = var8_8.getInt(var4_4, var24_23);\n var5_5.zzo(var16_16, var9_9);\n }\n break block95;\n }\n case 10: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var26_24 = (zzgs)var8_8.getObject(var4_4, var24_23);\n var5_5.zzn(var16_16, (zzgs)var26_24);\n }\n break block95;\n }\n case 9: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var26_24 = var8_8.getObject(var4_4, var24_23);\n var27_25 = var3_3.zzv(var12_12);\n var5_5.zzr(var16_16, var26_24, var27_25);\n }\n break block95;\n }\n case 8: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var26_24 = var8_8.getObject(var4_4, var24_23);\n zzja.zzT(var16_16, var26_24, var5_5);\n }\n break block95;\n }\n case 7: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var9_9 = (int)zzkh.zzh(var4_4, var24_23);\n var5_5.zzl(var16_16, (boolean)var9_9);\n }\n break block95;\n }\n case 6: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var9_9 = var8_8.getInt(var4_4, var24_23);\n var5_5.zzk(var16_16, var9_9);\n }\n break block95;\n }\n case 5: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var24_23 = var8_8.getLong(var4_4, var24_23);\n var5_5.zzj(var16_16, var24_23);\n }\n break block95;\n }\n case 4: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var9_9 = var8_8.getInt(var4_4, var24_23);\n var5_5.zzi(var16_16, var9_9);\n }\n break block95;\n }\n case 3: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var24_23 = var8_8.getLong(var4_4, var24_23);\n var5_5.zzh(var16_16, var24_23);\n }\n break block95;\n }\n case 2: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var24_23 = var8_8.getLong(var4_4, var24_23);\n var5_5.zzc(var16_16, var24_23);\n }\n break block95;\n }\n case 1: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var10_10 = zzkh.zzj(var4_4, var24_23);\n var5_5.zze(var16_16, var10_10);\n }\n break block95;\n }\n case 0: \n }\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var28_26 = zzkh.zzl(var4_4, var24_23);\n var5_5.zzf(var16_16, var28_26);\n }\n }\n var9_9 = 1048575;\n var10_10 = 1.469367E-39f;\n }\n var7_7 = var3_3.zzn;\n var4_4 = var7_7.zzd(var4_4);\n var7_7.zzi(var4_4, var5_5);\n return;\n }\n this.zzo.zzb(var1_1);\n throw null;\n }", "@Test(timeout = 4000)\n public void test043() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(285212630);\n Type type0 = Type.CHAR_TYPE;\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n type0.toString();\n Type[] typeArray0 = new Type[3];\n typeArray0[0] = type0;\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"K,D*%TzaA!8;\");\n typeArray0[1] = type0;\n typeArray0[2] = type0;\n int[] intArray0 = new int[3];\n intArray0[0] = 1048575;\n intArray0[1] = 6;\n intArray0[2] = 7;\n frame0.inputStack = intArray0;\n frame0.initInputFrame(classWriter0, 9, typeArray0, 364);\n Item item0 = new Item();\n item0.set(1);\n item0.set(2649.52636);\n Frame frame1 = new Frame();\n frame0.merge(classWriter0, frame1, 1028);\n frame0.merge(classWriter0, frame1, 2);\n Type type1 = Type.INT_TYPE;\n // Undeclared exception!\n try { \n type0.getElementType();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public /* bridge */ /* synthetic */ void mo55096c() {\n super.mo55096c();\n }", "private void method_7083() {\r\n // $FF: Couldn't be decompiled\r\n }", "@Test(timeout = 4000)\n public void test032() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n Type type0 = Type.CHAR_TYPE;\n Class<Object> class0 = Object.class;\n Type.getType(class0);\n Type type1 = Type.CHAR_TYPE;\n Type.getObjectType(\"The prefix must not be null\");\n Type type2 = Type.INT_TYPE;\n Item item0 = classWriter0.newFieldItem(\"%B\\\"F$,FHLc-:\", \"The prefix must not be null\", \"The prefix must not be null\");\n classWriter0.toByteArray();\n Label label0 = new Label();\n Label label1 = label0.next;\n Frame frame1 = label0.frame;\n ClassWriter classWriter1 = new ClassWriter(9);\n // Undeclared exception!\n try { \n frame0.execute(185, 1455, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "public int describeContents() {\n/* 1781 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void a() {\n block8 : {\n block9 : {\n var1_1 = this.f();\n var2_2 = false;\n if (var1_1) break block8;\n this.j.c();\n var6_3 = this.k;\n var7_4 = this.b;\n var8_5 = (l)var6_3;\n var9_6 = var8_5.a(var7_4);\n if (var9_6 != null) break block9;\n this.a(false);\n var2_2 = true;\n ** GOTO lbl30\n }\n if (var9_6 != n.b) ** GOTO lbl26\n this.a(this.g);\n var11_7 = this.k;\n var12_8 = this.b;\n var13_9 = (l)var11_7;\n try {\n block10 : {\n var2_2 = var13_9.a(var12_8).d();\n break block10;\nlbl26: // 1 sources:\n var10_10 = var9_6.d();\n var2_2 = false;\n if (!var10_10) {\n this.b();\n }\n }\n this.j.g();\n }\n finally {\n this.j.d();\n }\n }\n if ((var3_12 = this.c) == null) return;\n if (var2_2) {\n var4_13 = var3_12.iterator();\n while (var4_13.hasNext()) {\n ((d)var4_13.next()).a(this.b);\n }\n }\n e.a(this.h, this.j, this.c);\n }\n\n /*\n * Exception decompiling\n */\n public final void a(ListenableWorker.a var1_1) {\n // This method has failed to decompile. When submitting a bug report, please provide this stack trace, and (if you hold appropriate legal rights) the relevant class file.\n // org.benf.cfr.reader.util.ConfusedCFRException: Tried to end blocks [4[TRYBLOCK]], but top level block is 10[WHILELOOP]\n // org.benf.cfr.reader.b.a.a.j.a(Op04StructuredStatement.java:432)\n // org.benf.cfr.reader.b.a.a.j.d(Op04StructuredStatement.java:484)\n // org.benf.cfr.reader.b.a.a.i.a(Op03SimpleStatement.java:607)\n // org.benf.cfr.reader.b.f.a(CodeAnalyser.java:692)\n // org.benf.cfr.reader.b.f.a(CodeAnalyser.java:182)\n // org.benf.cfr.reader.b.f.a(CodeAnalyser.java:127)\n // org.benf.cfr.reader.entities.attributes.f.c(AttributeCode.java:96)\n // org.benf.cfr.reader.entities.g.p(Method.java:396)\n // org.benf.cfr.reader.entities.d.e(ClassFile.java:890)\n // org.benf.cfr.reader.entities.d.b(ClassFile.java:792)\n // org.benf.cfr.reader.b.a(Driver.java:128)\n // org.benf.cfr.reader.a.a(CfrDriverImpl.java:63)\n // com.njlabs.showjava.decompilers.JavaExtractionWorker.decompileWithCFR(JavaExtractionWorker.kt:61)\n // com.njlabs.showjava.decompilers.JavaExtractionWorker.doWork(JavaExtractionWorker.kt:130)\n // com.njlabs.showjava.decompilers.BaseDecompiler.withAttempt(BaseDecompiler.kt:108)\n // com.njlabs.showjava.workers.DecompilerWorker$b.run(DecompilerWorker.kt:118)\n // java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)\n // java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)\n // java.lang.Thread.run(Thread.java:919)\n throw new IllegalStateException(\"Decompilation failed\");\n }\n\n public final void a(String string) {\n LinkedList linkedList = new LinkedList();\n linkedList.add((Object)string);\n while (!linkedList.isEmpty()) {\n String string2 = (String)linkedList.remove();\n if (((l)this.k).a(string2) != n.f) {\n k k2 = this.k;\n n n2 = n.d;\n String[] arrstring = new String[]{string2};\n ((l)k2).a(n2, arrstring);\n }\n linkedList.addAll((Collection)((a.i.r.p.c)this.l).a(string2));\n }\n }\n\n /*\n * Enabled aggressive block sorting\n * Enabled unnecessary exception pruning\n * Enabled aggressive exception aggregation\n */\n public final void a(boolean bl) {\n this.j.c();\n k k2 = this.j.k();\n l l2 = (l)k2;\n List list = l2.a();\n ArrayList arrayList = (ArrayList)list;\n boolean bl2 = arrayList.isEmpty();\n if (bl2) {\n f.a(this.a, RescheduleReceiver.class, false);\n }\n this.j.g();\n this.p.c((Object)bl);\n return;\n finally {\n this.j.d();\n }\n }\n\n public final void b() {\n this.j.c();\n k k2 = this.k;\n n n2 = n.a;\n String[] arrstring = new String[]{this.b};\n l l2 = (l)k2;\n l2.a(n2, arrstring);\n k k3 = this.k;\n String string = this.b;\n long l3 = System.currentTimeMillis();\n l l4 = (l)k3;\n l4.b(string, l3);\n k k4 = this.k;\n String string2 = this.b;\n l l5 = (l)k4;\n try {\n l5.a(string2, -1L);\n this.j.g();\n return;\n }\n finally {\n this.j.d();\n this.a(true);\n }\n }\n\n public final void c() {\n this.j.c();\n k k2 = this.k;\n String string = this.b;\n long l2 = System.currentTimeMillis();\n l l3 = (l)k2;\n l3.b(string, l2);\n k k3 = this.k;\n n n2 = n.a;\n String[] arrstring = new String[]{this.b};\n l l4 = (l)k3;\n l4.a(n2, arrstring);\n k k4 = this.k;\n String string2 = this.b;\n l l5 = (l)k4;\n l5.f(string2);\n k k5 = this.k;\n String string3 = this.b;\n l l6 = (l)k5;\n try {\n l6.a(string3, -1L);\n this.j.g();\n return;\n }\n finally {\n this.j.d();\n this.a(false);\n }\n }\n\n public final void d() {\n k k2 = this.k;\n String string = this.b;\n n n2 = ((l)k2).a(string);\n if (n2 == n.b) {\n h h2 = h.a();\n String string2 = s;\n Object[] arrobject = new Object[]{this.b};\n h2.a(string2, String.format((String)\"Status for %s is RUNNING;not doing any work and rescheduling for later execution\", (Object[])arrobject), new Throwable[0]);\n this.a(true);\n return;\n }\n h h4 = h.a();\n String string3 = s;\n Object[] arrobject = new Object[]{this.b, n2};\n h4.a(string3, String.format((String)\"Status for %s is %s; not doing any work\", (Object[])arrobject), new Throwable[0]);\n this.a(false);\n }\n\n public void e() {\n this.j.c();\n this.a(this.b);\n a.i.e e2 = ((ListenableWorker.a.a)this.g).a;\n k k2 = this.k;\n String string = this.b;\n l l2 = (l)k2;\n try {\n l2.a(string, e2);\n this.j.g();\n return;\n }\n finally {\n this.j.d();\n this.a(false);\n }\n }\n\n public final boolean f() {\n if (this.r) {\n h h2 = h.a();\n String string = s;\n Object[] arrobject = new Object[]{this.o};\n h2.a(string, String.format((String)\"Work interrupted for %s\", (Object[])arrobject), new Throwable[0]);\n k k2 = this.k;\n String string2 = this.b;\n n n2 = ((l)k2).a(string2);\n if (n2 == null) {\n this.a(false);\n return true;\n }\n this.a(true ^ n2.d());\n return true;\n }\n return false;\n }\n\n /*\n * Loose catch block\n * Enabled aggressive block sorting\n * Enabled unnecessary exception pruning\n * Enabled aggressive exception aggregation\n * Lifted jumps to return sites\n */\n public void run() {\n int n2;\n block42 : {\n block41 : {\n i i2;\n Cursor cursor;\n block48 : {\n block46 : {\n ListenableWorker listenableWorker;\n block47 : {\n a.i.e e2;\n block44 : {\n g g2;\n block45 : {\n block40 : {\n boolean bl;\n Iterator iterator;\n j j2;\n StringBuilder stringBuilder;\n block43 : {\n a.i.r.p.n n3 = this.m;\n String string = this.b;\n o o2 = (o)n3;\n if (o2 == null) throw null;\n n2 = 1;\n i i3 = i.a((String)\"SELECT DISTINCT tag FROM worktag WHERE work_spec_id=?\", (int)n2);\n if (string == null) {\n i3.bindNull(n2);\n } else {\n i3.bindString(n2, string);\n }\n o2.a.b();\n Cursor cursor2 = a.f.l.a.a(o2.a, (a.g.a.e)i3, false);\n ArrayList arrayList = new ArrayList(cursor2.getCount());\n while (cursor2.moveToNext()) {\n arrayList.add((Object)cursor2.getString(0));\n }\n this.n = arrayList;\n stringBuilder = new StringBuilder(\"Work [ id=\");\n stringBuilder.append(this.b);\n stringBuilder.append(\", tags={ \");\n iterator = arrayList.iterator();\n bl = true;\n break block43;\n finally {\n cursor2.close();\n i3.b();\n }\n }\n while (iterator.hasNext()) {\n String string = (String)iterator.next();\n if (bl) {\n bl = false;\n } else {\n stringBuilder.append(\", \");\n }\n stringBuilder.append(string);\n }\n stringBuilder.append(\" } ]\");\n this.o = stringBuilder.toString();\n if (this.f()) {\n return;\n }\n this.j.c();\n k k2 = this.k;\n String string = this.b;\n l l2 = (l)k2;\n this.e = j2 = l2.d(string);\n if (j2 == null) {\n h h2 = h.a();\n String string2 = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.b;\n h2.b(string2, String.format((String)\"Didn't find WorkSpec for id %s\", (Object[])arrobject), new Throwable[0]);\n this.a(false);\n return;\n }\n if (j2.b != n.a) {\n this.d();\n this.j.g();\n h h4 = h.a();\n String string3 = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.e.c;\n h4.a(string3, String.format((String)\"%s is not in ENQUEUED state. Nothing more to do.\", (Object[])arrobject), new Throwable[0]);\n return;\n }\n if (j2.d() || this.e.c()) {\n long l3 = System.currentTimeMillis();\n boolean bl2 = this.e.n == 0L;\n if (!bl2 && l3 < this.e.a()) {\n h h5 = h.a();\n String string4 = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.e.c;\n h5.a(string4, String.format((String)\"Delaying execution for %s because it is being executed before schedule.\", (Object[])arrobject), new Throwable[0]);\n this.a((boolean)n2);\n return;\n }\n }\n this.j.g();\n if (!this.e.d()) break block40;\n e2 = this.e.e;\n break block44;\n }\n g2 = g.a(this.e.d);\n if (g2 != null) break block45;\n h h6 = h.a();\n String string = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.e.d;\n h6.b(string, String.format((String)\"Could not create Input Merger %s\", (Object[])arrobject), new Throwable[0]);\n break block46;\n }\n ArrayList arrayList = new ArrayList();\n arrayList.add((Object)this.e.e);\n k k3 = this.k;\n String string = this.b;\n l l4 = (l)k3;\n if (l4 == null) throw null;\n i2 = i.a((String)\"SELECT output FROM workspec WHERE id IN (SELECT prerequisite_id FROM dependency WHERE work_spec_id=?)\", (int)n2);\n if (string == null) {\n i2.bindNull(n2);\n } else {\n i2.bindString(n2, string);\n }\n l4.a.b();\n cursor = a.f.l.a.a(l4.a, (a.g.a.e)i2, false);\n ArrayList arrayList2 = new ArrayList(cursor.getCount());\n while (cursor.moveToNext()) {\n arrayList2.add((Object)a.i.e.b(cursor.getBlob(0)));\n }\n arrayList.addAll((Collection)arrayList2);\n e2 = g2.a((List<a.i.e>)arrayList);\n }\n a.i.e e3 = e2;\n UUID uUID = UUID.fromString((String)this.b);\n List<String> list = this.n;\n WorkerParameters.a a2 = this.d;\n int n5 = this.e.k;\n a.i.b b2 = this.h;\n WorkerParameters workerParameters = new WorkerParameters(uUID, e3, list, a2, n5, b2.a, this.i, b2.c);\n if (this.f == null) {\n this.f = this.h.c.a(this.a, this.e.c, workerParameters);\n }\n if ((listenableWorker = this.f) != null) break block47;\n h h7 = h.a();\n String string = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.e.c;\n h7.b(string, String.format((String)\"Could not create Worker %s\", (Object[])arrobject), new Throwable[0]);\n break block46;\n }\n if (!listenableWorker.isUsed()) break block48;\n h h8 = h.a();\n String string = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.e.c;\n h8.b(string, String.format((String)\"Received an already-used Worker %s; WorkerFactory should return new instances\", (Object[])arrobject), new Throwable[0]);\n }\n this.e();\n return;\n }\n this.f.setUsed();\n this.j.c();\n k k4 = this.k;\n String string = this.b;\n l l5 = (l)k4;\n if (l5.a(string) != n.a) break block41;\n k k5 = this.k;\n n n7 = n.b;\n String[] arrstring = new String[n2];\n arrstring[0] = this.b;\n l l6 = (l)k5;\n l6.a(n7, arrstring);\n k k6 = this.k;\n String string5 = this.b;\n l l7 = (l)k6;\n try {\n l7.e(string5);\n break block42;\n }\n finally {\n cursor.close();\n i2.b();\n }\n catch (Throwable throwable) {\n throw throwable;\n }\n finally {\n this.j.d();\n }\n }\n n2 = 0;\n }\n this.j.g();\n if (n2 != 0) {\n if (this.f()) {\n return;\n }\n c c2 = new c();\n ((a.i.r.q.m.b)this.i).c.execute((Runnable)new a.i.r.k(this, c2));\n c2.a((Runnable)new a.i.r.l(this, c2, this.o), ((a.i.r.q.m.b)this.i).a);\n return;\n }\n this.d();\n return;\n finally {\n this.j.d();\n }\n }\n\n public static class a {\n public Context a;\n public ListenableWorker b;\n public a.i.r.q.m.a c;\n public a.i.b d;\n public WorkDatabase e;\n public String f;\n public List<d> g;\n public WorkerParameters.a h = new WorkerParameters.a();\n\n public a(Context context, a.i.b b2, a.i.r.q.m.a a2, WorkDatabase workDatabase, String string) {\n this.a = context.getApplicationContext();\n this.c = a2;\n this.d = b2;\n this.e = workDatabase;\n this.f = string;\n }\n }\n\n}", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = null;\n Type[] typeArray0 = new Type[8];\n Type type0 = Type.DOUBLE_TYPE;\n typeArray0[1] = type0;\n Type type1 = Type.DOUBLE_TYPE;\n typeArray0[2] = type1;\n Type type2 = Type.INT_TYPE;\n typeArray0[3] = type2;\n Type type3 = Type.VOID_TYPE;\n Type type4 = Type.BOOLEAN_TYPE;\n Type type5 = Type.FLOAT_TYPE;\n typeArray0[2] = type5;\n Type type6 = Type.SHORT_TYPE;\n typeArray0[7] = type6;\n Class<Integer> class0 = Integer.class;\n Type.getType(class0);\n Frame frame1 = new Frame();\n type5.toString();\n Item item0 = new Item();\n Class<Object> class1 = Object.class;\n Type.getDescriptor(class1);\n // Undeclared exception!\n try { \n frame1.execute(168, (-1845), (ClassWriter) null, item0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSR/RET are not supported with computeFrames option\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }" ]
[ "0.62494266", "0.6081061", "0.5997935", "0.5913925", "0.58950204", "0.587451", "0.5858873", "0.5851225", "0.5837627", "0.5806602", "0.57978225", "0.579461", "0.57361066", "0.57315874", "0.5726052", "0.5696958", "0.56861675", "0.5607479", "0.5577022", "0.5521802", "0.5519213", "0.55012596", "0.55002487", "0.5497774", "0.5475552", "0.5454818", "0.54501355", "0.5437533", "0.5431822", "0.542428", "0.5405783", "0.5398884", "0.53942704", "0.53928185", "0.53864586", "0.53849393", "0.53494763", "0.53479916", "0.5339384", "0.53344417", "0.5330469", "0.5329899", "0.5319401", "0.53145385", "0.53029287", "0.5301696", "0.5299097", "0.5297304", "0.52972776", "0.5289288", "0.52830094", "0.52829236", "0.52768016", "0.5274939", "0.5269017", "0.5268593", "0.52685815", "0.5264189", "0.52624184", "0.5261674", "0.5261124", "0.5260681", "0.52580714", "0.5255732", "0.5250188", "0.5248788", "0.52455443", "0.5242647", "0.52398235", "0.523948", "0.522991", "0.5227926", "0.5211534", "0.52086765", "0.52021515", "0.5198379", "0.51954406", "0.519524", "0.51914734", "0.5187009", "0.51868016", "0.5185474", "0.5180365", "0.51800823", "0.5179308", "0.5179236", "0.51780206", "0.5175902", "0.51756346", "0.5174551", "0.5173909", "0.5169844", "0.5165297", "0.5155556", "0.51540315", "0.5153793", "0.51508904", "0.51488787", "0.51439327", "0.5142426" ]
0.5710276
15
Write a test that proves that having an answer accepted gives the answerer a 15 point reputation boost
@Test public void acceptedAnswerGivesAnswererReputationPoints() throws Exception { alice.acceptAnswer(bobAnswer); assertEquals("Answer's reputation doesn't goes up by 15",15,bob.getReputation()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double scoreAnswer(Question question, Answer answer);", "@Test\n public void pickUpSomeGoldTest() {\n\tassertNotEquals(0,score);\n }", "@Test\n public void testScoreUpdate() {\n try {\n final BestEvalScore score = new BestEvalScore(\"thjtrfwaw\");\n double expected = 0;\n assertEquals(\"Incorrect score!\", expected , score.get(), 1e-10);\n final Evaluation eval = new Evaluation(2);\n eval.eval(0,1);\n eval.eval(1,1);\n\n expected = eval.accuracy();\n score.accept(eval);\n assertEquals(\"Incorrect score!\", expected , score.get(), 1e-10);\n\n eval.eval(0,1);\n score.accept(eval);\n assertEquals(\"Incorrect score!\", expected , score.get(), 1e-10);\n\n eval.eval(1,1);\n eval.eval(1,1);\n expected = eval.accuracy();\n score.accept(eval);\n assertEquals(\"Incorrect score!\", expected , score.get(), 1e-10);\n\n\n\n } catch (IOException e) {\n throw new IllegalStateException(\"Failed to create instance!\", e);\n }\n\n\n }", "private boolean checkGreedyWinRate() {\r\n return myTotal.get(0) > enTotal.get(0)+2 && (myself.health > 50 || myself.health > opponent.health);\r\n }", "private int computeBetterResponse(int player, GameObserver go) {\n int[] devOutcome = currentOutcome.clone();\n double aspirationPayoff = eGame.getPayoff(currentOutcome, player) + aspirationLevel;\n double bestPayoff = eGame.getPayoff(currentOutcome, player);\n int bestResponse = currentOutcome[player];\n\n ///System.out.println(\"Finding BR: \" + Arrays.toString(currentOutcome));\n\n // get the order in which to test best responses\n List<Integer> order = deviationTestOrder.getDeviationTestOrder(currentOutcome, player);\n\n// if (order.size() < nActs[player]-1) {\n// System.out.println(\"To few actions in order listing: \" + order.size());\n// }\n\n int itr = 0;\n for (int a : order) {\n // skip current action\n if (a == currentOutcome[player]) continue;\n devOutcome[player] = a;\n\n //System.out.println(\"Testing dev: \" + Arrays.toString(devOutcome));\n\n // check whether this profile is \"tabu\"\n if (tabu.getValue(devOutcome)) {\n //System.out.println(\"TABU\");\n continue;\n }\n\n // sample if necessary; flag not enough samples\n if (eGame.getNumSamples(devOutcome) == 0) {\n if (go.numObsLeft() <= 0) return NO_SAMPLES_FLAG;\n sampleAndUpdate(devOutcome, go);\n //System.out.println(\"SAMPLED\");\n }\n\n // check BR\n double devPayoff = eGame.getPayoff(devOutcome, player);\n\n// if (devPayoff > aspirationPayoff) {\n// //System.out.println(\"Aspiration met.\");\n// return a;\n// } else\n\n if (devPayoff > bestPayoff) {\n //System.out.println(\"Br, but not aspiration level\");\n bestPayoff = devPayoff;\n bestResponse = a;\n }\n\n itr++;\n if (itr > minDeviationsTested &&\n bestPayoff > aspirationPayoff) {\n return bestResponse;\n }\n\n }\n\n if (bestResponse != currentOutcome[player]) {\n //System.out.println(\"return non-aspiration BR\");\n return bestResponse;\n }\n //System.out.println(\"NO BR\");\n return NO_BR_FLAG;\n }", "void awardPoints(){\n if (currentPoints <= 100 - POINTSGIVEN) {\n currentPoints += POINTSGIVEN;\n feedback = \"Your current rating is: \" + currentPoints + \"%\";\n }\n }", "int getWrongAnswers();", "@Test\n public void should_ReturnTrue_When_DietRecommended(){\n double weight = 100.0;\n double height = 1.70;\n //when\n boolean recommended = BMICalculator.isDietRecommended(weight,height);\n //then\n assertTrue(recommended);\n }", "@Test\n public void downVotingQuestionsGetNoPoints() throws Exception {\n\n bob.upVote(question);\n charlie.downVote(question);\n\n assertEquals(5,alice.getReputation());\n }", "public abstract Boolean higherScoreBetter();", "@Test\r\n\tpublic void calculMetricInferiorTeacherBetterScoreButNoLostPointsTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculMetricInferior(new ModelValue(25f, 1f), 12f, 13f), new Float(0));\r\n\t}", "@Test\r\n\tpublic void calculMetricSuperiorTeacherBetterScoreButNoLostPointsTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculMetricSuperior(new ModelValue(25f, 1f), 12f, 11f), new Float(0));\r\n\t}", "public int awardTriviaCoins (double pct) {\n Random r = new Random();\n int min = 1;\n if (pct > 0.75) {\n min = 15;\n } else if (pct > 0.5) {\n min = 10;\n } else if (pct > 0.25) {\n min = 5;\n }\n int winnings = min + (int)(Math.ceil(r.nextInt(10) * pct));\n this.coinCount += winnings;\n this.save();\n \n UserEvent.NewCoins message = new UserEvent.NewCoins(this.id, winnings);\n notifyMe(message);\n \n return winnings;\t \n\t}", "@Test\n public void test_BoostOnDies() {\n addCard(Zone.HAND, playerA, \"Silumgar Scavenger\", 1); // {4}{B}\n addCard(Zone.BATTLEFIELD, playerA, \"Swamp\", 5);\n //\n addCard(Zone.BATTLEFIELD, playerA, \"Balduvian Bears\", 1);\n\n // cast and exploit\n castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, \"Silumgar Scavenger\");\n setChoice(playerA, true); // yes, exploit\n addTarget(playerA, \"Balduvian Bears\");\n\n checkPermanentCounters(\"boost\", 1, PhaseStep.BEGIN_COMBAT, playerA, \"Silumgar Scavenger\", CounterType.P1P1, 1);\n checkAbility(\"boost\", 1, PhaseStep.BEGIN_COMBAT, playerA, \"Silumgar Scavenger\", HasteAbility.class, true);\n\n setStopAt(1, PhaseStep.END_TURN);\n setStrictChooseMode(true);\n execute();\n }", "@Test\n void studentMCQTotalScoreTest(){\n Student student = new Student(\"Lim\");\n student.setNumCorrectAns(8); // Set Total Number Question(s) Answered Correctly\n student.setNumQuestionAns(10); // Set Total Number Question(s) Answered Correctly\n\n\n double expectedResult = 80; // Input for testing\n // Calculate total score and set it\n student.setCalculatedScore(student.getNumCorrectAns(), student.getNumQuestionAns());\n System.out.println(\"Test Case #5\");\n System.out.println(\"\\tExpected Result: \" + expectedResult); // print expected result\n double actualResult = student.getTotalScore(); // Actual Result\n System.out.println(\"\\tActual Result: \" + actualResult); // Print actual result\n assertEquals(expectedResult, actualResult); // Compare the expected result (True) & Actual Result\n }", "@Override\n\tpublic void makeDecision() {\n\t\tint powerMax = (int)(initPower) / 100;\n\t\tint powerMin = (int)(initPower * 0.3) / 100;\n\n\t\t// The value is calculated randomly from 0 to 10% of the initial power\n\t\tRandom rand = new Random();\n\t\tint actualPower = rand.nextInt((powerMax - powerMin) + 1) + powerMin;\n\t\tanswer.setConsumption(actualPower);\n\t}", "public double testQuiz(Quiz quiz) {\n\t\t// System.out.println(\"Testing quiz: \" + quiz + \"\\n\" +\n\t\t// quiz.display() + \"\\nwith QuizTester: \" + id\n\t\t// + \" SearchString: \" + searchString);\n\t\tdouble score = 0;\n\t\tfor (Question question : quiz.getQuestionList()) {\n\t\t\tboolean guess = question.getPrompt().contains(searchString);\n\t\t\tif (question.isAnswer() == guess) {\n\t\t\t\t++score;\n\t\t\t}\n\t\t}\n\t\t// System.out.println(\"Completed testing quiz: \" + quiz + \"\\nFinal Score: \" +\n\t\t// score + \" / \" + quiz.getQuestionList().size() + \" AKA: \" + (score /\n\t\t// quiz.getQuestionList().size()) );\n\t\treturn score / quiz.getQuestionList().size();\n\t}", "@SmallTest\n\tpublic void testPeekPenalty() {\n\t\tpeek();\n\t\tassertEquals((Integer) (START_SCORE - PEEK_PENALTY), Integer.valueOf(solo.getText(1).getText().toString()));\n\t}", "public void test(int studyReq, int points) {\r\n\t\tdouble score = 0;\r\n\t\ttotalPoints+=points;\r\n\t\tif(testReadiness >= studyReq) {\r\n\t\t\tscore = points;\r\n\t\t\tcurrentPoints+=points;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tcurrentPoints+=points - (studyReq - testReadiness);\r\n\t\t\tscore = points - (studyReq - testReadiness);\r\n\t\t}\r\n\t\t\r\n\t\tgrade = currentPoints/totalPoints;\r\n\t\tif(grade < 0) {\r\n\t\t\tgrade = 0;\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"You took the test today and got \" + ((score/points) * 100) + \"%\");\r\n\t\tSystem.out.println(\"hours needed: \" + studyReq + \"\\nhours Studied: \" + testReadiness);\r\n\t\ttestReadiness = 0;\r\n\t}", "@Test\n public void testInterestAccumulated() {\n //Just ensure that the first two digits are the same\n assertEquals(expectedResults.getInterestAccumulated(), results.getInterestAccumulated(), 0.15);\n }", "@Test\n public void testMoreRequired() throws VendingMachineInventoryException{\n service.addFunds(\"1.00\");\n Item testitem = new Item(\"testitem\", \"1.50\", \"5\");\n service.addItem(\"testitem\", testitem);\n BigDecimal moneyRequired = service.moreRequired(\"testitem\");\n BigDecimal expectedMoneyRequired = new BigDecimal(\"0.50\");\n assertEquals(moneyRequired, expectedMoneyRequired);\n }", "public double getBestScore();", "@Test\r\n\tpublic void calculMetricInferiorStudentBetterScoreTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculMetricInferior(new ModelValue(25f, 2f), 12f, 8f), new Float(0));\r\n\t}", "@Test\n public void vote() {\n System.out.println(client.makeVotes(client.companyName(0), \"NO\"));\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 }", "@Test\r\n void testVaryingMajorityWithNotEnoughHistory() {\r\n VaryingMajority testStrat = new VaryingMajority(3);\r\n AlwaysDefect testStrat2 = new AlwaysDefect();\r\n ArrayList<Integer> payoffs = new ArrayList<>(Arrays.asList(3, 5, 0, 1));\r\n Game game = new Game(testStrat, testStrat2, 2, payoffs);\r\n game.playGame();\r\n int points = testStrat.getPoints();\r\n assertEquals(points, 1, \"varyingMajority not returning correctly with insufficient history\");\r\n }", "@Test\n public void allStrikesExpected_300(){\n String input = \"XXXXXXXXXXXX\";\n assertEquals(game.scoreOfGame(input),300);\n }", "public abstract boolean higherScoresAreBetter();", "@Test\n public void testOneUserTrecevalStrategyMultipleRelevance() {\n DataModelIF<Long, Long> test = DataModelFactory.getDefaultModel();\n DataModelIF<Long, Long> predictions = DataModelFactory.getDefaultModel();\n test.addPreference(1L, 2L, 0.0);\n test.addPreference(1L, 3L, 1.0);\n test.addPreference(1L, 4L, 2.0);\n predictions.addPreference(1L, 1L, 3.0);\n predictions.addPreference(1L, 2L, 4.0);\n predictions.addPreference(1L, 3L, 5.0);\n predictions.addPreference(1L, 4L, 1.0);\n\n Precision<Long, Long> precision = new Precision<Long, Long>(predictions, test, 1.0, new int[]{1, 2, 3, 4, 5});\n\n precision.compute();\n\n assertEquals(0.5, precision.getValue(), 0.001);\n assertEquals(1.0, precision.getValueAt(1), 0.001);\n assertEquals(0.5, precision.getValueAt(2), 0.001);\n assertEquals(0.3333, precision.getValueAt(3), 0.001);\n assertEquals(0.5, precision.getValueAt(4), 0.001);\n assertEquals(0.4, precision.getValueAt(5), 0.001);\n\n Map<Long, Double> precisionPerUser = precision.getValuePerUser();\n for (Map.Entry<Long, Double> e : precisionPerUser.entrySet()) {\n long user = e.getKey();\n double value = e.getValue();\n assertEquals(0.5, value, 0.001);\n }\n }", "@Test\n public void checkIfReturnsPassportWithHighConfidence() {\n triplets.add(new Triplets<String, Integer, Double>(\"passport\", 1, 90.00));\n triplets.add(new Triplets<String, Integer, Double>(\"passport\", 4, 190.00));\n Triplets<String, Integer, Double> resultTriplet = Triplets.rankRecords(triplets);\n Assert.assertEquals(\"passport\", resultTriplet.getLabel());\n Assert.assertEquals(new Integer(4), resultTriplet.getImageNumber());\n Assert.assertEquals(new Double(190.00), resultTriplet.getMatchConfidence());\n }", "@Test\n public void testOneUserTrecevalStrategySingleRelevance() {\n DataModelIF<Long, Long> test = DataModelFactory.getDefaultModel();\n DataModelIF<Long, Long> predictions = DataModelFactory.getDefaultModel();\n test.addPreference(1L, 2L, 0.0);\n test.addPreference(1L, 3L, 1.0);\n test.addPreference(1L, 4L, 1.0);\n predictions.addPreference(1L, 1L, 3.0);\n predictions.addPreference(1L, 2L, 4.0);\n predictions.addPreference(1L, 3L, 5.0);\n predictions.addPreference(1L, 4L, 1.0);\n\n Precision<Long, Long> precision = new Precision<Long, Long>(predictions, test, 1.0, new int[]{1, 2, 3, 4, 5});\n\n precision.compute();\n\n assertEquals(0.5, precision.getValue(), 0.001);\n assertEquals(1.0, precision.getValueAt(1), 0.001);\n assertEquals(0.5, precision.getValueAt(2), 0.001);\n assertEquals(0.3333, precision.getValueAt(3), 0.001);\n assertEquals(0.5, precision.getValueAt(4), 0.001);\n assertEquals(0.4, precision.getValueAt(5), 0.001);\n\n Map<Long, Double> precisionPerUser = precision.getValuePerUser();\n for (Map.Entry<Long, Double> e : precisionPerUser.entrySet()) {\n long user = e.getKey();\n double value = e.getValue();\n assertEquals(0.5, value, 0.001);\n }\n }", "@Test //TEST FIVE\n void testPositiveOverLimitWeight()\n {\n Rabbit_RegEx rabbit_weight = new Rabbit_RegEx();\n rabbit_weight.setWeight(17);\n rabbit_weight.setIsBaby(false);\n rabbit_weight.setAge(5);\n String expected = \"Is the rabbit a baby?: false\\n\" +\n \"How old is the rabbit?: 5 years\\n\" +\n \"Weight: 15.0 in pounds\\n\" +\n \"Color: \";\n assertEquals(expected, rabbit_weight.toString());\n }", "@Override\r\n\tpublic void checkAnswer() {\n\t\t\r\n\t}", "boolean hasCorrectAnswer();", "public void setAnswer(double correctResponse)\n { \n answer = correctResponse; \n }", "private boolean learning()\r\n\t{\r\n\t\tint temp = (int) (Math.random() * 100);\t\t//generate a random int between 0-100\r\n\t\tif(temp<=intelligence)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "public abstract double getCredit(Answer rightAnswer);", "@Test\r\n\tpublic void calculMetricInferiorTeacherWithLostPointsTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculMetricInferior(new ModelValue(10f, 1f), 12f, 15f), new Float(1));\r\n\t}", "@Test\r\n void testVaryingMajorityWithTooMuchHistory() {\r\n VaryingMajority testStrat = new VaryingMajority(3);\r\n AlwaysDefect testStrat2 = new AlwaysDefect();\r\n ArrayList<Integer> payoffs = new ArrayList<>(Arrays.asList(3, 5, 0, 1));\r\n Game game = new Game(testStrat, testStrat2, 5, payoffs);\r\n game.playGame();\r\n int points = testStrat.getPoints();\r\n assertEquals(points, 4, \"varyingMajority not returning correctly with too much history\");\r\n }", "@SmallTest\n\tpublic void testBadMatchPenalty() {\n\t\tbadMatch();\n\t\tassertEquals((Integer) (START_SCORE - BAD_MATCH_PENALTY), Integer.valueOf(solo.getText(1).getText().toString()));\n\t}", "@Test\n public void isMyPetHungry() {\n int isHungry = underTest.getHungerLevel();\n // Assert\n assertThat(isHungry, is(5));\n }", "@Test\n public void testCalcProbTheta() throws Exception {\n\n double guessProb1 = ItemResponseTheory.calcProbTheta(c, lambda, theta1, alpha1);\n double guessProb2 = ItemResponseTheory.calcProbTheta(c, lambda, theta2, alpha1);\n double guessProb3 = ItemResponseTheory.calcProbTheta(c, lambda, theta3, alpha1);\n double guessProb4 = ItemResponseTheory.calcProbTheta(c, lambda, theta4, alpha1);\n double guessProb5 = ItemResponseTheory.calcProbTheta(c, lambda, theta5, alpha1);\n double guessProb6 = ItemResponseTheory.calcProbTheta(c, lambda, theta6, alpha1);\n double guessProb7 = ItemResponseTheory.calcProbTheta(c, lambda, theta7, alpha1);\n\n double ans1 = 0.2;\n double ans2 = 0.21;\n double ans3 = 0.23;\n double ans4 = 0.3;\n double ans5 = 0.47;\n double ans6 = 0.73;\n double ans7 = 0.9;\n\n double tolerance = 0.005;\n\n assertTrue(\"Prob(theta1)\", Math.abs(guessProb1 - ans1)< tolerance);\n assertTrue(\"Prob(theta2)\", Math.abs(guessProb2 - ans2) < tolerance);\n assertTrue(\"Prob(theta3)\", Math.abs(guessProb3 - ans3) < tolerance);\n assertTrue(\"Prob(theta4)\", Math.abs(guessProb4 - ans4) < tolerance);\n assertTrue(\"Prob(theta5)\", Math.abs(guessProb5 - ans5) < tolerance);\n assertTrue(\"Prob(theta6)\", Math.abs(guessProb6 - ans6) < tolerance);\n assertTrue(\"Prob(theta7)\", Math.abs(guessProb7 - ans7) < tolerance);\n\n }", "@Test\r\n public void testSubtractionAsReversion() {\r\n Application.loadQuestions();\r\n assertTrue(Application.allQuestions.contains(\"21 - 7 = ?\") || Application.allQuestions.contains(\"21 - 14 = ?\"));\r\n }", "@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 }", "private static int addRandomScore() {\n Random ran = new Random();\n return ran.nextInt(201) + 400;\n }", "@Test\n public void testGetMyBestRank() {\n int result1 = this.scoreBoard.getMyBestRank(new Record(4, 5, \"@u1\", \"ST\"));\n assertEquals(1, result1);\n int result2 = this.scoreBoard.getMyBestRank(new Record(3, 15, \"@u3\", \"ST\"));\n assertEquals(3, result2);\n\n }", "@Test\n \tpublic void testCheckingAccusation() {\n \t\t//Set answer\n \t\tSolution answer = new Solution(\"Colonel Mustard\", \"Knife\", \"Library\");\n \t\tSolution guess = new Solution(\"Colonel Mustard\", \"Knife\", \"Library\");\n \t\tgame.setAnswer(answer);\n \t\t//Check correct accusation\n \t\t//correct if it contains the correct person, weapon and room\n \t\tAssert.assertTrue(game.checkAccusation(guess));\n \t\t//Check false accusation\n \t\t//not correct if the room is wrong, or if the person is wrong, if the weapon is wrong, or if all three are wrong\n \t\t//wrong room\n \t\tguess = new Solution(\"Colonel Mustard\", \"Knife\", \"Billiards Room\");\n \t\tAssert.assertFalse(game.checkAccusation(guess));\n \t\t//wrong weapon\n \t\tguess = new Solution(\"Colonel Mustard\", \"Lead Pipe\", \"Library\");\n \t\tAssert.assertFalse(game.checkAccusation(guess));\n \t\t//wrong person\n \t\tguess = new Solution(\"Ms. Peacock\", \"Knife\", \"Library\");\n \t\tAssert.assertFalse(game.checkAccusation(guess));\n \t}", "public static void main(String[] args) {\nString score = JOptionPane.showInputDialog(\"What did you get on the test\");\ndouble test = Double.parseDouble(score);\nif(test>= 80) {\n\tJOptionPane.showMessageDialog(null, \"you must've studied really hard to get a \" + test);\n}\nif(test<= 79.99999999999999999999999999999999999999999999999999999999999) {\n\tJOptionPane.showMessageDialog(null, \"Maybe you should try harder next time becuase you only got a \" + test);\n}\n\t\t\n\t\t\n\t}", "@Test\r\n\tpublic void testChangeTheOriginalChooseIsBetterThanNotChange() {\r\n\t\tMontyHall monty = new MontyHall();\r\n\t\tmonty.setChanged(true);\r\n\t\tfloat rateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(10);\r\n\t\tmonty.setChanged(false);\r\n\t\tfloat rateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(10);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\r\n\t\t/* count is 100 */\r\n\t\tmonty.setChanged(true);\r\n\t\trateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(100);\r\n\t\tmonty.setChanged(false);\r\n\t\trateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(100);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\r\n\t\t/* count is 10000 */\r\n\t\tmonty.setChanged(true);\r\n\t\trateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(10000);\r\n\t\tmonty.setChanged(false);\r\n\t\trateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(10000);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\r\n\t\t/* count is 1000000 */\r\n\t\tmonty.setChanged(true);\r\n\t\trateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(1000000);\r\n\t\tmonty.setChanged(false);\r\n\t\trateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(1000000);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\t}", "@Test\r\n\tpublic void executeReinforcement() {\r\n\r\n\t\tInteger reinforcementArmy = playerOne.getStrategyType().calculateReinforcementArmy();\r\n\r\n\t\tHashSet<String> countriesOwned = playerOne.getStrategyType().gameData.gameMap\r\n\t\t\t\t.getConqueredCountries(playerOne.getStrategyType().getPlayerID());\r\n\r\n\t\tArrayList<String> countriesOwnedList = new ArrayList<>(countriesOwned);\r\n\r\n\t\tHashMap<String, Integer> expectedArmyCountPerCountryAfterReinforcement = new HashMap<>();\r\n\r\n\t\tfor (String country : countriesOwnedList) {\r\n\t\t\texpectedArmyCountPerCountryAfterReinforcement.put(country,\r\n\t\t\t\t\tplayerOne.getStrategyType().gameData.gameMap.getCountry(country).getCountryArmyCount());\r\n\t\t}\r\n\r\n\t\twhile (reinforcementArmy > 0) {\r\n\r\n\t\t\tInteger randomReinforcementCount = 0;\r\n\t\t\tInteger randomCountryIndex = random.nextInt(countriesOwnedList.size());\r\n\r\n\t\t\tString randomCountry = countriesOwnedList.get(randomCountryIndex);\r\n\r\n\t\t\twhile (randomReinforcementCount == 0) {\r\n\t\t\t\trandomReinforcementCount = random.nextInt(reinforcementArmy + 1);\r\n\t\t\t}\r\n\r\n\t\t\tInteger randomCountryArmyCountBeforeFortification = expectedArmyCountPerCountryAfterReinforcement\r\n\t\t\t\t\t.get(randomCountry);\r\n\r\n\t\t\tInteger randomCountryArmyCountAfterFortification = randomCountryArmyCountBeforeFortification\r\n\t\t\t\t\t+ randomReinforcementCount;\r\n\r\n\t\t\texpectedArmyCountPerCountryAfterReinforcement.put(randomCountry, randomCountryArmyCountAfterFortification);\r\n\r\n\t\t\treinforcementArmy -= randomReinforcementCount;\r\n\r\n\t\t}\r\n\r\n\t\tplayerOne.getStrategyType().executeReinforcement();\r\n\r\n\t\tHashMap<String, Integer> actualArmyCountPerCountryAfterReinforcement = new HashMap<>();\r\n\r\n\t\tfor (String country : countriesOwnedList) {\r\n\t\t\tactualArmyCountPerCountryAfterReinforcement.put(country,\r\n\t\t\t\t\tplayerOne.getStrategyType().gameData.gameMap.getCountry(country).getCountryArmyCount());\r\n\t\t}\r\n\r\n\t\tassertEquals(actualArmyCountPerCountryAfterReinforcement, expectedArmyCountPerCountryAfterReinforcement);\r\n\t\t// assertTrue(strongerCountryAfterReinforcement >\r\n\t\t// strongerCountryBeforeReinforcement);\r\n\r\n\t}", "public void setReputation(double reputation) {\n if(reputation >= 0.0 && reputation <= 100.0){\n this.reputation = reputation;\n }\n else if(reputation > 100.0){\n this.reputation = 100.0;\n }\n else{\n this.reputation = 0.0;\n }\n}", "public interface AnswerScoring {\n /**\n * Scores the answer to the given question.\n *\n * @param question The current question.\n * @param answer The candidate answer to score for the given question.\n * @return double valued score of the answer to the given question.\n */\n double scoreAnswer(Question question, Answer answer);\n}", "@Test\n public void verifyOffersApplied() {\n \tProduct product = new Product(\"Watermelon\", 0.8);\n \tProduct product2 = new Product(\"Apple\", 0.2);\n \tProduct product3 = new Product(\"Orange\", 0.5);\n \tBasket basket = new Basket();\n \tbasket.getProducts().put(product, 6);\n \tbasket.getProducts().put(product2, 4);\n \tbasket.getProducts().put(product3, 5);\n \tassertTrue(\"Have to get the price of 15 items = 6.1 ==> \", (calculator.calculatePrice(basket) - 6.1) < 0.0001);\n }", "@Test\n void studentMCQTotalAnsweredCorrectlyTest(){\n Student student = new Student(\"Lim\");\n\n int expectedResult = 8; // Input for testing\n student.setNumCorrectAns(expectedResult); // Set Total Number Question(s) Answered Correctly\n System.out.println(\"Test Case #3\");\n System.out.println(\"\\tExpected Result: \" + expectedResult); // print expected result\n int actualResult = student.getNumCorrectAns(); // Actual Result\n System.out.println(\"\\tActual Result: \" + actualResult); // Print actual result\n assertEquals(expectedResult, actualResult); // Compare the expected result (True) & Actual Result\n }", "@Test\n public void testRunScoringScenario() throws Exception\n {\n YahtzeeModel y1 = new YahtzeeModel();\n\n //Turn 1\n y1.getDiceCollection().setValues(1, 1, 3, 3, 3);\n assertEquals(2, y1.scoreOnes());\n //Turn 2\n y1.getDiceCollection().setValues(2, 1, 2, 2, 3);\n assertEquals(6, y1.scoreTwos());\n //Turn 3\n y1.getDiceCollection().setValues(2, 1, 2, 2, 3);\n assertEquals(3, y1.scoreThrees());\n //Turn 4\n y1.getDiceCollection().setValues(2, 1, 2, 2, 3);\n assertEquals(0, y1.scoreFours());\n //Turn 5\n y1.getDiceCollection().setValues(2, 1, 2, 2, 5);\n assertEquals(5, y1.scoreFives());\n //Turn 6\n y1.getDiceCollection().setValues(6, 6, 6, 6, 6);\n assertEquals(30, y1.scoreSixes());\n //3 of a kind\n y1.getDiceCollection().setValues(2, 1, 2, 2, 3);\n assertEquals(10, y1.scoreThreeOfAKind());\n //4 of a kind\n y1.getDiceCollection().setValues(2, 2, 2, 2, 2);\n assertEquals(10, y1.scoreFourOfAKind());\n //full house\n y1.getDiceCollection().setValues(6, 4, 6, 4, 6);\n assertEquals(25, y1.scoreFullHouse());\n //small straight\n y1.getDiceCollection().setValues(6, 6, 6, 6, 6);\n assertEquals(0, y1.scoreSmallStraight());\n //large straight\n y1.getDiceCollection().setValues(2, 1, 2, 2, 3);\n assertEquals(0, y1.scoreLargeStraight());\n //yahtzee\n y1.getDiceCollection().setValues(2, 2, 2, 2, 2);\n assertEquals(50, y1.scoreYahtzee());\n //chance\n y1.getDiceCollection().setValues(6, 1, 1, 1, 1);\n assertEquals(10, y1.scoreChance());\n\n //calculate bonus and verify bonus\n assertEquals(0, y1.scoreBonus());\n\n //verify that the available scoring types has one entry for YAHTZEE since it was scored\n assertEquals(1, y1.getScoreCard().getAvailableScoreTypes().size());\n assertTrue(y1.getScoreCard().getAvailableScoreTypes().contains(YahtzeeScoreTypes.YAHTZEE));\n\n //verify final score\n assertEquals(151, y1.getScoreCard().getScore());\n\n\n //*** Game 2: 0 Bonus, 2 Yahtzee ***\n YahtzeeModel y2 = new YahtzeeModel();\n\n //Turn 1\n y2.getDiceCollection().setValues(1, 1, 1, 1, 1);\n assertEquals(50, y2.scoreYahtzee());\n //Turn 2\n y2.getDiceCollection().setValues(2, 1, 2, 2, 3);\n assertEquals(6, y2.scoreTwos());\n //Turn 3\n y2.getDiceCollection().setValues(2, 1, 2, 2, 3);\n assertEquals(3, y2.scoreThrees());\n //Turn 4\n y2.getDiceCollection().setValues(2, 1, 2, 2, 3);\n assertEquals(0, y2.scoreFours());\n //Turn 5\n y2.getDiceCollection().setValues(2, 1, 2, 2, 5);\n assertEquals(5, y2.scoreFives());\n //Turn 6\n y2.getDiceCollection().setValues(6, 6, 6, 6, 6);\n assertEquals(30, y2.scoreSixes());\n //3 of a kind\n y2.getDiceCollection().setValues(2, 1, 2, 2, 3);\n assertEquals(10, y2.scoreThreeOfAKind());\n //4 of a kind\n y2.getDiceCollection().setValues(2, 2, 2, 2, 2);\n assertEquals(10, y2.scoreFourOfAKind());\n //full house\n y2.getDiceCollection().setValues(6, 4, 6, 4, 6);\n assertEquals(25, y2.scoreFullHouse());\n //small straight\n y2.getDiceCollection().setValues(6, 6, 6, 6, 6);\n assertEquals(0, y2.scoreSmallStraight());\n //large straight\n y2.getDiceCollection().setValues(2, 1, 2, 2, 3);\n assertEquals(0, y2.scoreLargeStraight());\n //yahtzee\n y2.getDiceCollection().setValues(2, 2, 2, 2, 2);\n assertEquals(100, y2.scoreYahtzee());\n //chance\n y2.getDiceCollection().setValues(6, 1, 1, 1, 1);\n assertEquals(10, y2.scoreChance());\n\n //calculate bonus and verify bonus\n assertEquals(0, y2.scoreBonus());\n\n //verify that the available scoring types has two entres...\n // one for YAHTZEE and one for ONES\n assertEquals(2, y2.getScoreCard().getAvailableScoreTypes().size());\n assertTrue(y2.getScoreCard().getAvailableScoreTypes().contains(YahtzeeScoreTypes.ONES));\n assertTrue(y2.getScoreCard().getAvailableScoreTypes().contains(YahtzeeScoreTypes.YAHTZEE));\n\n //verify final score\n assertEquals(249, y2.getScoreCard().getScore());\n\n //*** Game 3: 1 Bonus, 0 Yahtzee ***\n YahtzeeModel y3 = new YahtzeeModel();\n\n //Turn 1\n y3.getDiceCollection().setValues(1, 1, 1, 1, 1);\n assertEquals(5, y3.scoreOnes());\n //Turn 2\n y3.getDiceCollection().setValues(2, 1, 2, 2, 3);\n assertEquals(6, y3.scoreTwos());\n //Turn 3\n y3.getDiceCollection().setValues(3, 3, 2, 2, 3);\n assertEquals(9, y3.scoreThrees());\n //Turn 4\n y3.getDiceCollection().setValues(2, 4, 4, 4, 3);\n assertEquals(12, y3.scoreFours());\n //Turn 5\n y3.getDiceCollection().setValues(2, 5, 2, 2, 5);\n assertEquals(10, y3.scoreFives());\n //Turn 6\n y3.getDiceCollection().setValues(6, 6, 6, 6, 6);\n assertEquals(30, y3.scoreSixes());\n //3 of a kind\n y3.getDiceCollection().setValues(2, 1, 2, 2, 3);\n assertEquals(10, y3.scoreThreeOfAKind());\n //4 of a kind\n y3.getDiceCollection().setValues(2, 2, 2, 2, 2);\n assertEquals(10, y3.scoreFourOfAKind());\n //full house\n y3.getDiceCollection().setValues(6, 4, 6, 4, 6);\n assertEquals(25, y3.scoreFullHouse());\n //small straight\n y3.getDiceCollection().setValues(6, 6, 6, 6, 6);\n assertEquals(0, y3.scoreSmallStraight());\n //large straight\n y3.getDiceCollection().setValues(2, 1, 2, 2, 3);\n assertEquals(0, y3.scoreLargeStraight());\n //yahtzee\n y3.getDiceCollection().setValues(2, 1, 2, 2, 2);\n assertEquals(0, y3.scoreYahtzee());\n //chance\n y3.getDiceCollection().setValues(6, 1, 1, 1, 1);\n assertEquals(10, y3.scoreChance());\n\n //calculate bonus and verify bonus\n assertEquals(35, y3.scoreBonus());\n\n //verify that no scoring types remain\n assertEquals(0, y3.getScoreCard().getAvailableScoreTypes().size());\n\n //verify final score\n assertEquals(162, y3.getScoreCard().getScore());\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Override\n protected double getScore(TestUser testUser, double[] predictions) {\n\n int[] recommendations = Search.findTopN(predictions, this.numberOfRecommendations);\n\n int recommendedAndRelevant = 0, recommended = 0;\n\n for (int pos : recommendations) {\n if (pos == -1) break;\n\n double rating = testUser.getTestRatingAt(pos);\n if (rating >= this.relevantThreshold) {\n recommendedAndRelevant++;\n }\n\n recommended++;\n }\n\n if (recommended == 0) return Double.NEGATIVE_INFINITY;\n return (double) recommendedAndRelevant / (double) recommended;\n }", "public static int voting(double f, int res){\n\t\tdouble r = Math.random();\n\t\tif(r <= f && res == 0) res = 1;\n\t\telse if(r <= f && res == 1) res = 0;\n\n\t\treturn res; \n\t}", "@Test(expected = BidAmountException.class)\n public void bidIsLessThanHighestBidIsRejected() {\n knownUsers.login(seller.userName(), seller.password());\n knownUsers.annointSeller(seller.userName());\n\n knownUsers.login(bidder.userName(), bidder.password());\n\n Auction testAuction = new Auction(seller, item, startingPrice, startTime, endTime);\n testAuction.onStart();\n\n Bid firstBid = new Bid(bidder, startingPrice, startTime.plusMinutes(2));\n\n testAuction.submitBid(firstBid);\n\n testAuction.submitBid(firstBid);\n\n\n }", "public static boolean getAnswer(Player player, double bid, Library library, TransferList existingTransfers) {\n\t\tTeam team = library.getTeamForName(player.getTeam());\n\t\tArrayList<Player> playerlist = new ArrayList<Player>();\n\t\tfor (int i=0;i<team.getTeam().size();i++) {\n\t\t\tif (player.getPlayerType().equals(team.getTeam().get(i).getPlayerType())) {\n\t\t\t\tplayerlist.add(team.getTeam().get(i));\n\t\t\t}\n\t\t}\n\t\tint[] ratings = new int[playerlist.size()];\n\t\tif(player.getPlayerType().equals(\"Attacker\")) {\n\t\t\tfor (int i=0;i<playerlist.size();i++) {\n\t\t\t\tFieldPlayer p = (FieldPlayer)playerlist.get(i);\n\t\t\t\tratings[i]= (int) (0.6*p.getFinishingValue() + 0.2*p.getDribblingValue() + 0.2*p.getStaminaValue());\n\t\t\t}\n\t\t} if (player.getPlayerType().equals(\"Midfielder\")) {\n\t\t\tfor (int i=0;i<playerlist.size();i++) {\n\t\t\t\tFieldPlayer p = (FieldPlayer)playerlist.get(i);\n\t\t\t\tratings[i]=(int) (0.15*p.getFinishingValue() + 0.4*p.getDribblingValue() + 0.3*p.getStaminaValue() + 0.15*p.getDefenseValue());\n\t\t\t\t\n\t\t\t}\n\t\t} if (player.getPlayerType().equals(\"Defender\")) {\n\t\t\tfor (int i=0;i<playerlist.size();i++) {\n\t\t\t\tFieldPlayer p = (FieldPlayer)playerlist.get(i);\n\t\t\t\tratings[i]=(int) (0.05*p.getDribblingValue() + 0.25*p.getStaminaValue() + 0.7*p.getDefenseValue());\n\t\t\t\t\n\t\t\t}\n\t\t} if (player.getPlayerType().equals(\"Goalkeeper\")) {\n\t\t\tfor (int i=0;i<playerlist.size();i++) {\n\t\t\t\tGoalkeeper p = (Goalkeeper)playerlist.get(i);\n\t\t\t\tratings[i]=p.getGoalkeeperValue();\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (playerlist.size()==1) {\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tint playerid=playerlist.indexOf(player);\n\t\tint typecounter=1;\n\t\tfor (int i=0;i<ratings.length;i++) {\n\t\t\tif (i==playerid) {\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tif (ratings[playerid]<ratings[i]) {\n\t\t\t\t\ttypecounter++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint random = GameLogic.randomGenerator(1, 100);\n\t\tdouble percentage = bid/player.getPrice().doubleValue()*100-100;\n\t\tif (typecounter==1||typecounter==2) {\n\t\t\tif(percentage<0) {\n\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t} if (percentage>=0 && percentage<5) {\n\t\t\t\tif (random<=10) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else return false;\n\t\t\t\t\n\t\t\t\t\n\t\t\t} if (percentage>=5 && percentage<10) {\n\t\t\t\tif (random<=20) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else return false;\n\t\t\t} if (percentage>=10 && percentage<15) {\n\t\t\t\tif (random<=30) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else return false;\n\t\t\t} if (percentage>=15 && percentage<20) {\n\t\t\t\tif (random<=40) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else return false;\n\t\t\t} if (percentage>=20 && percentage<25) {\n\t\t\t\tif (random<=50) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else return false;\n\t\t\t} if (percentage>=25 && percentage<30) {\n\t\t\t\tif (random<=75) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else return false;\n\t\t\t} else return true;\n\t\t} if (typecounter==3 || typecounter==4 || typecounter==5) {\n\t\t\tif (percentage<-10) {\n\t\t\t\treturn false;\n\t\t\t} if (percentage>=-10 && percentage<0) {\n\t\t\t\tif (random<=5) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else return false;\n\t\t\t} if (percentage>=0 && percentage <5) {\n\t\t\t\tif (random<=15) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else return false;\n\t\t\t} if (percentage>=5 && percentage<10) {\n\t\t\t\tif (random<=30) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else return false;\n\t\t\t} if (percentage>=10 && percentage<15) {\n\t\t\t\tif (random<=45) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else return false;\n\t\t\t} if (percentage>=15 && percentage<20) {\n\t\t\t\tif (random<=60) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else return false;\n\t\t\t} if (percentage>=20 && percentage<25) {\n\t\t\t\tif (random<=80) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else return false;\n\t\t\t} else return true;\n\t\t} else {\n\t\t\tif (percentage<-10) {\n\t\t\t\treturn false;\n\t\t\t} if (percentage>=-10 && percentage<0) {\n\t\t\t\tif (random<=20) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else return false;\n\t\t\t} if (percentage>=0 && percentage<5) {\n\t\t\t\tif (random<=45) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else return false;\n\t\t\t} if (percentage>=5 && percentage<10) {\n\t\t\t\tif (random<=70) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else return false;\n\t\t\t} if (percentage>=10 && percentage<15) {\n\t\t\t\tif (random<=85) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else return false;\n\t\t\t} else return true;\n\t\t}\n\t\t\n\t\t\n\t}", "@Test\r\n public void testMultiplication() {\r\n Application.loadQuestions();\r\n assertTrue(Application.allQuestions.contains(\"7 * 8 = ?\") || Application.allQuestions.contains(\"8 * 7 = ?\"));\r\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Order(14)\n\t@Test\n\tpublic void Attempt_OfferBid()\n\t{\n\t\tBigDecimal BuyOut = new BigDecimal(405);\n\t\tItem testItem = new Item(0,\"Changed ItemName\",\"Changed Description\",new BigDecimal(505),new BigDecimal(404),\"NoOne\");\n\t\tint Expected = -1, actual = os.offerBid(BuyOut, testItem, \"NoOne\");\n\t\tassertTrue(actual > Expected);\n\t}", "@Test\n public void verifyNewOfferIsApplied() {\n \tProduct product = new Product(\"Watermelon\", 0.8);\n \tProduct product2 = new Product(\"Apple\", 0.2);\n \tProduct product3 = new Product(\"Orange\", 0.5);\n \tOffer offer = new Offer(product3, 5, product3.getPrice());\n \tConfigurations.offers.add(offer);\n \tBasket basket = new Basket();\n \tbasket.getProducts().put(product, 6);\n \tbasket.getProducts().put(product2, 4);\n \tbasket.getProducts().put(product3, 5);\n \tassertTrue(\"Have to get the price of 15 items = 5.6 ==> \", (calculator.calculatePrice(basket) - 5.6) < 0.0001);\n }", "@Test\n public void returnMaxNumberOfBetsCanMade(){\n assertEquals(maxNumberOfBets,gameRule.getMaxBetsPerRound());\n }", "public int calculateVotes() {\n return 1;\n }", "@Test\n public void amountGreatherThanItemsPrice() {\n Coupon coupon = couponService.calculateCoupon(Arrays.asList(MLA1),PRICE_MLA1+PRICE_MLA2);\n assertEquals(1, coupon.itemsIds().size());\n assertEquals(MLA1, coupon.itemsIds().get(0));\n assertEquals(PRICE_MLA1, coupon.total());\n }", "@Test\n @DisplayName(\"Should multiply the values of the weights by 100, so that they can be represented with integers\")\n void checkRerepresentationOfWeights(){\n PacketFilerReader packetFilerReader = new PacketFilerReader();\n assertEquals(110, packetFilerReader.changeWeightRepresentation(1.10));\n }", "public int get_correctAnswer(){return this._correctAnswer;}", "@Test\n public void test10() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"xx\\\"qa7Q>h6u=;6s.h+.<\");\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.weightedFalsePositiveRate();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test\r\n void testSoftMajorityAlwaysCooperate() {\r\n AlwaysCooperate testStrat = new AlwaysCooperate();\r\n SoftMajority testStrat2 = new SoftMajority();\r\n ArrayList<Integer> payoffs = new ArrayList<>(Arrays.asList(3, 5, 0, 1));\r\n Game game = new Game(testStrat, testStrat2, 3, payoffs);\r\n game.playGame();\r\n assertEquals(testStrat2.getPoints(), 9, \"SoftMajority strategy not functioning correctly\");\r\n }", "private boolean isApproved() {\r\n if (rnd.nextInt(10) < 5) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n\r\n }", "@Test\n public void testIllegalRating()\n {\n SalesItem salesIte1 = new SalesItem(\"Java For Complete Idiots, Vol 2\", 19900);\n assertEquals(false, salesIte1.addComment(\"Joshua Black\", \"Not worth the money. The font is too small.\", -5));\n }", "@Test\r\n public void testPurChaseBeverageWithNotEnoughMoney() {\r\n coffeeMaker.addRecipe(recipe1); // cost 50\r\n assertEquals(25, coffeeMaker.makeCoffee(0, 25)); // not enough amount paid\r\n }", "@Test\r\n\tpublic void testCalculateReinforcement() {\r\n\r\n\t\tint actual_value = playerTwo.getStrategyType().calculateReinforcementArmy();\r\n\t\tint expected_value = 3;\r\n\t\tassertEquals(expected_value, actual_value);\r\n\t}", "@Test\n void studentMCQTotalAnsweredTest(){\n Student student = new Student(\"Lim\");\n\n int expectedResult = 10; // Input for testing\n student.setNumQuestionAns(expectedResult); // Set Total Number Question(s) Answered\n System.out.println(\"Test Case #2\");\n System.out.println(\"\\tExpected Result: \" + expectedResult); // print expected result\n int actualResult = student.getNumQuestionAns(); // Actual Result\n System.out.println(\"\\tActual Result: \" + actualResult); // Print actual result\n assertEquals(expectedResult, actualResult); // Compare the expected result (True) & Actual Result\n }", "@Test\n public void testCalculateScore() {\n System.out.println(\"calculateScore\");\n String input1 = \"8 0 3 1 6 5 -2 4 7 1 3 -2 6\";\n String input2 = \"8 0 3 1 6 5 -2 4 7 3 2 -2 6\";\n CCGeneticDrift instance = new CCGeneticDrift();\n int expResult1 = 2;\n int expResult2 = 4;\n int result1 = instance.calculateScore(input1);\n assertEquals(result1, expResult1);\n int result2 = instance.calculateScore(input2);\n assertEquals(result2, expResult2);\n }", "protected int checkIfCorrect(String answer, String correctAns)\r\n {\r\n if (correctAns.equals(answer))\r\n {\r\n System.out.println(\"Awsome job!\");\r\n return score++;\r\n }\r\n else \r\n { \r\n System.out.println(\"opps\"); \r\n return score;\r\n }\r\n \r\n }", "public static int yatzyBonus(int limit, int bonus, int... result) {\n int score = 0;\n if (totalSum(result) >= limit) {\n score = bonus;\n }\n return score;\n }", "@Test\n public void testDamage()\n {\n Pistol weap = new Pistol(10, 50, 10, 2, 10);\n\n assertEquals(8, weap.calculateDamage(20));\n }", "@Test\r\n void testSoftMajorityAlwaysDefect() {\r\n AlwaysDefect testStrat = new AlwaysDefect();\r\n SoftMajority testStrat2 = new SoftMajority();\r\n ArrayList<Integer> payoffs = new ArrayList<>(Arrays.asList(3, 5, 0, 1));\r\n Game game = new Game(testStrat, testStrat2, 3, payoffs);\r\n game.playGame();\r\n assertEquals(testStrat2.getPoints(), 2, \"SoftMajority strategy not functioning correctly\");\r\n }", "@Override\n\tpublic void verifyRateQuestionEnabledWithEveryQuestion() {\n\t\t\n\t}", "@Ignore\n @Test\n public void shouldNotGiveQuestionIfAllQuestionsHaveBeenAnsweredWithInts() {\n attributes.put(FinancialPlanningSpeechlet.GOAL_AMOUNT_KEY, 1000);\n attributes.put(FinancialPlanningSpeechlet.MONTHLY_CONTRIBUTION_KEY, 1000);\n attributes.put(FinancialPlanningSpeechlet.GOAL_PERIOD_KEY, 1000);\n String question = NextQuestionFactory.get(session);\n\n assertThat(question, Is.is(\"\"));\n }", "double getTotalReward();", "public static double getTestScore() {\n\t\tdouble testScore; // the value of the current test score \n\t\t\n\t\tScanner input = new Scanner(System.in);\n\t\t\n\t\tdo {\n\t\t\tSystem.out.print(\"Enter a test score 0 - 100: \");\n\t\t\ttestScore = input.nextDouble();\n\t\t}while(testScore < 0 || testScore > 100);\n\t\t\n\t\treturn testScore;\t//returns a testscore\n\t}", "@Test\n public void testExactness() {\n assertMetrics(\"exactness:1\", \"a b c\",\"a x b x x c\");\n assertMetrics(\"exactness:0.9\", \"a b c\",\"a x b:0.7 x x c\");\n assertMetrics(\"exactness:0.7\", \"a b c\",\"a x b:0.6 x x c:0.5\");\n assertMetrics(\"exactness:0.775\", \"a!200 b c\",\"a x b:0.6 x x c:0.5\");\n assertMetrics(\"exactness:0.65\", \"a b c!200\",\"a x b:0.6 x x c:0.5\");\n }", "@Test\n public void testGetReward() throws IOException {\n ResponseBase<VoterDividendResponse> voterRewardResult = topj.queryVoterDividend(account, \"T00000La8UTDgQQVRBjkCWEsKYk1XRpjZSK3zUbM\");\n System.out.println(\"voter reward result > \" + JSON.toJSONString(voterRewardResult));\n\n ResponseBase<AccountInfoResponse> accountInfoResponseBase = topj.getAccount(account);\n System.out.println(\"account address > \" + accountInfoResponseBase.getData().getAccountAddr() + \" balance > \" + accountInfoResponseBase.getData().getBalance());\n\n ResponseBase<XTransactionResponse> claimRewardResult = topj.claimVoterDividend(account);\n System.out.println(\"node claim reward hash >> \" + claimRewardResult.getData().getOriginalTxInfo().getTxHash() + \" >> is success > \" + claimRewardResult.getData().isSuccess());\n\n voterRewardResult = topj.queryVoterDividend(account, account.getAddress());\n System.out.println(\"voter reward result > \" + JSON.toJSONString(voterRewardResult));\n\n accountInfoResponseBase = topj.getAccount(account);\n System.out.println(\"account address > \" + accountInfoResponseBase.getData().getAccountAddr() + \" balance > \" + accountInfoResponseBase.getData().getBalance());\n }", "@Test\n\tpublic void nearestSmallerEqFibTest() {\n\t\tAssert.assertTrue(ifn.nearestSmallerEqFib(30) == 21);\n\t}", "@Test\n\tpublic void test250000() {\n\n\tdouble tax = Main.calcTax(250_000.);\n\tassertEquals(7750., tax, .01);\n\n\t}", "@Test\n public void trimsBidAndAsk() {\n }", "@Test\n public void TestUserEntersEnoughForChipsTenderisZero()\n {\n ArrayList<Coin> aBagOfCoins = new ArrayList<Coin>();\n aBagOfCoins.add(new Quarter());\n aBagOfCoins.add(new Quarter());\n //productManager.(m => m.GetProductCount(It.IsAny<Chips>())).Returns(1);\n\n Map<Coin, Integer> coinBank = new HashMap<Coin, Integer>();\n coinBank.put(new Quarter(), 2);\n //coinManager.Setup(m => m.GetBankOfCoins()).Returns(coinBank);\n\n VendingRequest request = new VendingRequest();\n request.BagOfCoins = aBagOfCoins;\n\n VendingResponse deposited = vendingController.Post(request);\n\n VendingRequest secondrequest = new VendingRequest();\n secondrequest.IsEmpty= false;\n secondrequest.Selection = new Chips().type();\n\n VendingResponse result = vendingController.Post(secondrequest);\n\n assertThat(result.TenderValue, Is.is(0));\n }", "boolean hasBonusPercentHP();", "@Test\n void studentMCQTotalAnsweredWronglyTest(){\n Student student = new Student(\"Lim\");\n\n int expectedResult = 2; // Input for testing\n student.setNumWrongAns(expectedResult); // Set Total Number Question(s) Answered Wrongly\n System.out.println(\"Test Case #4\");\n System.out.println(\"\\tExpected Result: \" + expectedResult); // print expected result\n int actualResult = student.getNumWrongAns(); // Actual Result\n System.out.println(\"\\tActual Result: \" + actualResult); // Print actual result\n assertEquals(expectedResult, actualResult); // Compare the expected result (True) & Actual Result\n }", "@Test\n\tpublic void testQualityWithSellInUnder0QualityUnder50Brie() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Aged Brie\", -1, 40));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has increased by 2\n\t\tassertEquals(\"Quality with sellIn under 0 brie\", 42, quality);\n\t}", "java.lang.String getCorrectAnswer();", "@Test\n public void bonusScoreTest() {\n score = new BonusScore();\n\n try {\n score.calculateScore(0, 1);\n Assert.fail();\n } catch (HangmanException e) {\n Assert.assertEquals(e.getMessage(), HangmanException.PARAMETRO_LIMITE_PUNTUACION);\n }\n try {\n score.calculateScore(1, 3);\n\n Assert.fail();\n } catch (HangmanException e) {\n Assert.assertEquals(e.getMessage(), HangmanException.PARAMETRO_LIMITE_PUNTUACION);\n }\n\n\n try {\n score.calculateScore(-2, -2);\n Assert.fail();\n } catch (HangmanException e) {\n Assert.assertEquals(e.getMessage(), HangmanException.PARAMETROS_NEGATIVOS);\n }\n try {\n score.calculateScore(-1, -1);\n Assert.fail();\n } catch (HangmanException e) {\n Assert.assertEquals(e.getMessage(), HangmanException.PARAMETROS_NEGATIVOS);\n }\n\n\n try {\n score.calculateScore(1, 0);\n score.calculateScore(1, 1);\n score.calculateScore(1, 2);\n score.calculateScore(0, 0);\n score.calculateScore(2, 0);\n } catch (HangmanException e) {\n Assert.fail();\n }\n\n }", "boolean hasBonusMoney();", "@Test\n\tpublic void test75000() {\n\n\tdouble tax = Main.calcTax(75_000.);\n\tassertEquals(1000., tax, .01);\n\t}", "@Test\r\n\tpublic void calculMetricSuperiorWithLostPointsTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculMetricSuperior(new ModelValue(10f, 1f), 12f, 9f), new Float(1));\r\n\t}", "boolean hasBonusExp();" ]
[ "0.65650123", "0.64551693", "0.64467555", "0.6261438", "0.6253114", "0.62037486", "0.6182263", "0.61631066", "0.61027575", "0.60827464", "0.60260236", "0.6021406", "0.59927696", "0.59744084", "0.5968394", "0.59681106", "0.5956983", "0.5926544", "0.5906634", "0.5902414", "0.5898348", "0.5896135", "0.58895767", "0.5879858", "0.58779866", "0.5871014", "0.58702874", "0.58479893", "0.58463496", "0.5843873", "0.58369625", "0.58356786", "0.58295417", "0.58158106", "0.58127755", "0.5804545", "0.5800854", "0.5790231", "0.5786025", "0.5783598", "0.5782278", "0.5779267", "0.5750305", "0.57476896", "0.57384115", "0.5722803", "0.571983", "0.5716443", "0.5711055", "0.57096326", "0.5705493", "0.5703779", "0.5703273", "0.5694415", "0.5690214", "0.5688885", "0.5686161", "0.56821036", "0.5669498", "0.5669425", "0.5667786", "0.5666031", "0.56623477", "0.5658786", "0.5658577", "0.5658471", "0.564818", "0.56451875", "0.5633042", "0.56302947", "0.56265694", "0.56235665", "0.56223106", "0.56210655", "0.5620586", "0.561136", "0.5609723", "0.5608971", "0.5603609", "0.5599009", "0.55924225", "0.55883867", "0.55875117", "0.55866444", "0.55808884", "0.55800027", "0.5579126", "0.55762637", "0.5575555", "0.55705667", "0.55704004", "0.5565583", "0.5560992", "0.55597836", "0.5552968", "0.5552879", "0.5549848", "0.5540104", "0.55386084", "0.5536591" ]
0.77800804
0