query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
sequencelengths
19
20
metadata
dict
End of variables declaration//GENEND:variables
public void inlcluirProdutoContas(Object objeto) { throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. }
[ "private static void EX5() {\n\t\t\r\n\t}", "@Override\n\tprotected void initVariable() {\n\t\n\t}", "public void mo17751g() {\n }", "public void mo1857d() {\n }", "public static void Q22()\r\n\t{\r\n\t}", "public void mo28221a() {\n }", "public void mo3914b() {\n }", "protected void mo4791d() {\n }", "public void mo26342c() {\n }", "protected void method_5557() {}", "private B000066() {\r\n\r\n\t}", "Eisdiele() {\r\n\r\n\t}", "public void mo3916d() {\n }", "@Override\n }", "public void mo5201a() {\n }", "public void mo5203c() {\n }", "public void mo6819c() {\n }", "@Override\n\tpublic void tyre() {\n\t\t\n\t}", "public void mo6726a() {\n }", "public void mo15109c() {\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function checked if passed email is valid. Email should be in format
public void validateEmail(String email) throws InvalidEmailException { Pattern emailPattern = Pattern .compile("^[\\w-\\.]+@(?:[\\w]+\\.)+[a-zA-Z]{2,4}$"); Matcher emailMatcher = emailPattern.matcher(email); if (!emailMatcher.find()) { throw new InvalidEmailException("Podany email jest nieprawidłowy"); } }
[ "private boolean isEmailValid(String email) {\n\t\treturn true;\n\t}", "private boolean isEmailValid(String email){\r\n\t\t String EMAIL_REGEX = \"^[\\\\w-_\\\\.+]*[\\\\w-_\\\\.]\\\\@([\\\\w]+\\\\.)+[\\\\w]+[\\\\w]$\";\t\t\t \r\n\t\t return email.matches(EMAIL_REGEX);\t\t\t \r\n\t}", "private boolean isEmailValid(String email){\n return email.matches(\".+@.+[.].+\");\n }", "private boolean isEmailValid(String email) {\n return email.length() > 0;\n }", "public boolean validateEmailFormat(String email){\n\t\tBoolean isEmailValid=false;\n\t\tString regex = \"^[\\\\w-_\\\\.+]*[\\\\w-_\\\\.]\\\\@([\\\\w]+\\\\.)+[\\\\w]+[\\\\w]$\";\n\t\tPattern pattern = Pattern.compile(regex);\n\t\tMatcher matcher = pattern.matcher((CharSequence) email);\n\t\tisEmailValid=matcher.matches();\n\t\treturn isEmailValid;\n\t}", "public boolean validateEmail(String email){\r\n\t\t Matcher matcher = Pattern.compile(EMAIL_EXPRESSION).matcher(email);\r\n\t\t \r\n\t\t return matcher.matches();\r\n\t }", "public static String validateEmail(String email) {\n\t\t boolean respuesta; \r\n\t\t\t Pattern pattern = Pattern.compile(PATTERN_EMAIL);\r\n\t\t \r\n\t\t // Match the given input against this pattern\r\n\t\t Matcher matcher = pattern.matcher(email);\r\n\t\t respuesta = matcher.matches();\r\n\t\t if(respuesta==true){\r\n\t\t \treturn \"correo correcto\";\r\n\t\t }else{\r\n\t\t \treturn \"correo incorrecto\";\r\n\t\t }\r\n\t\t }", "@Override\r\n\tpublic boolean checkEmail(String email) {\n\t\treturn false;\r\n\t}", "private boolean isValidEmail(String email)\r\n\t{\r\n\t\tString emailRegex =\"^[_A-Za-z0-9-\\\\+]+(\\\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\\\.[A-Za-z0-9]+)*(\\\\.[A-Za-z]{2,})$\";\r\n\t\tif(email.matches(emailRegex))\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "private boolean isEmailValid(String email) {\n boolean validity = true;\n if (!email.contains(\"@\"))\n validity = false;\n return validity;\n }", "public boolean validateEmail(String email) {\n Pattern pattern = Pattern.compile(PATTERN_EMAIL);\n // Match the given input against this pattern\n Matcher matcher = pattern.matcher(email);\n return matcher.matches();\n }", "private static boolean isEmailValid(String email) {\n return android.util.Patterns.EMAIL_ADDRESS.matcher(email).matches();\n }", "private boolean CheckEmailAddress(String email) {\n return !email.contains(\" \") && email.contains(\"@\") && email.contains(\".\") && email.length() > 5;\n }", "public void validateEmail(String email){\n if (email==null) {\n return;\n }\n if (!(email.contains(\"@\") && email.contains(\".com\"))) {\n emailError.setVisibility(Component.VISIBLE);\n } else {\n emailError.setVisibility(Component.HIDE);\n }\n }", "private boolean isEmailValid(String emailInput) {\n if(emailInput == null) {\n return false;\n }\n else if(emailInput.contains(\"@\")) {\n return Patterns.EMAIL_ADDRESS.matcher(emailInput).matches();\n } else {\n return false;\n }\n }", "protected boolean isValidEmailAddress(String email) {\n return email.matches(EMAIL_REGEX);\n }", "public boolean validacionMail(String email) {\n Pattern p = Pattern.compile(\".+@.+\\\\.[a-z]+\");\n \n //Match the given string with the pattern\n Matcher m = p.matcher(email);\n \n //check whether match is found\n return m.matches();\n \n }", "private void isUserValid(String email) {\r\n \t\tif (!(email != null && email.endsWith(AppConstants.VALID_EMAIL_DOMAIN) && ValidationHelper\r\n \t\t\t\t.hasObjectValidAttributes(new Student(email)))) {\r\n \t\t\tthrow new UnvalidEmailException(\"Unvalid email\");\r\n \t\t}\r\n \t}", "public boolean validEmail(String email) {\n\t\treturn email.matches(\"^[a-zA-Z0-9-]+[.][a-zA-Z0-9-]+@epfl[.]ch$\");\n\t}", "private void isEmail(String email) {\n\t\t\n\t\tisValid(email, \"Email\", \"^[_A-Za-z0-9-\\\\+]+(\\\\.[_A-Za-z0-9-]+)*@\"\n\t\t\t\t+ \"[A-Za-z0-9-]+(\\\\.[A-Za-z0-9]+)*(\\\\.[A-Za-z]{2,})$\"); \n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the portWorldWideName property.
public void setPortWorldWideName(long value) { this.portWorldWideName = value; }
[ "public void setName(String pstrName)\n\t{\n\t\tif(pstrName == null)\n\t\t{\n\t\t\tthrow new NullPointerException(\"Setting null program name is not allowed for GIPSYProgram.\");\n\t\t}\n\n\t\tthis.strName = pstrName;\n\t}", "@Override\r\n\tpublic void setWKOUT_NAME(String value) {\n\t\tthis.m_WKOUT_NAME = value;\r\n\t}", "public void setWindowName(String name);", "public void setWindowName(String name){\r\n\t\twindowName.setText(name);\r\n\t}", "private void setWindowName(final String name) {\n this.windowName = name;\n }", "public final native void setName(String name) /*-{\r\n\t\tthis.name = name;\r\n\t}-*/;", "public void setPortWWN(String portWWN) {\n _portWWN = portWWN;\n }", "public void setName(String name) {\n\t\tif (name.length() > 255)\n\t\t\tthis.name = name.substring(0,254);\n\t\telse\n\t\t\tthis.name = name;\n\t\tthis.hasName = true;\n\t}", "public void setStationName(java.lang.String stationName)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STATIONNAME$20);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(STATIONNAME$20);\r\n }\r\n target.setStringValue(stationName);\r\n }\r\n }", "public void setName(String p_name) {\n\t\tthis.d_name = p_name;\n\t}", "public void setName(String nameToSet)\n {\n if(clientState == ClientState.NAMELESS)\n {\n name = nameToSet;\n clientState = ClientState.IDLE;\n }\n else\n {\n Log.error(\"Tried to set a name for a client that already has one!\");\n }\n }", "public void setName(final String strName) {\r\n\t\tm_strName = strName;\r\n\t}", "@Override\n\tpublic void setName(Localpart name) {\n\t\tconferenceState.setName(name);\n\t}", "public void setName (String N) {\r\n Name = N;\r\n }", "@Override\n\tpublic void setLogicalName(String name)\n\t{\n\t\tlogicalName = name;\n\t}", "public void setName(String pname)\n\t{\n\t\tthis.name=pname;\n\t}", "public void setName(String n) {\n Name = n;\n }", "public void setName(String nam) {\r\n name = new String(nam);\r\n }", "public void setWorld(WorldServer par1WorldServer)\r\n {\r\n thisWorld = par1WorldServer;\r\n }", "public void setName(String theName) {\r\n name = theName;\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
SAX parser processing for each EdifactSegment object
private void parseCurrentSegment(EdifactSegment currentSegment) throws SAXException { logger.entering("EdifactSaxParserToXML", "parseCurrentSegment"); List<EdifactField> eFields = currentSegment.segmentFields; for (int count = 0; count < eFields.size(); count++) { EdifactField fieldObject = (EdifactField) eFields.get(count); String value = fieldObject.fieldValue; if (fieldObject.isComposite) { contentHandler.startElement(namespaceURI, nameSpace, fieldObject.fieldTagName, null); List<EdifactSubField> subFieldList = fieldObject.subFields; for (int j = 0; j < subFieldList.size(); j++) { EdifactSubField subFieldObject = (EdifactSubField) subFieldList .get(j); if (subFieldObject.subFieldTagName != null) { contentHandler.startElement(namespaceURI, nameSpace, subFieldObject.subFieldTagName, attribs); contentHandler.characters(subFieldObject.subFieldValue.toCharArray(), 0, subFieldObject.subFieldValue.length()); contentHandler.endElement(namespaceURI, nameSpace, subFieldObject.subFieldTagName); } } } else { contentHandler.startElement(namespaceURI, nameSpace, fieldObject.fieldTagName, attribs); contentHandler.characters(value.toCharArray(), 0, value .length()); } contentHandler.endElement(namespaceURI, nameSpace, fieldObject.fieldTagName); } logger.exiting("EdifactSaxParserToXML", "parseCurrentSegment"); }
[ "public void parse() {\n try {\n SAXParser saxParser = saxParserFactory.newSAXParser();\n this.handler = new Handler();\n\n saxParser.parse(path, handler);\n\n } catch (ParserConfigurationException e) {\n e.printStackTrace();\n } catch (SAXException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\r\n\tpublic void parse(String arg0) throws IOException, SAXException {\n\t\t\r\n\t}", "public interface ReadingParser {\n\n\t/**\n\t * Process the XML attribute and modify 'contextObject' in consequence.\n\t * \n\t * For example, if the contextObject is an instance of Reaction and the attributeName is 'fast', \n\t * this method will set the 'fast' variable of the 'contextObject' to 'value'.\n\t * Then it will return the modified Reaction instance.\n\t * \n\t * @param elementName : the localName of the XML element.\n\t * @param attributeName : the attribute localName of the XML element.\n\t * @param value : the value of the XML attribute.\n\t * @param prefix : the attribute prefix \n\t * @param isLastAttribute : boolean value to know if this attribute is the last attribute of the XML element.\n\t * @param contextObject : the object to set or modify depending on the identity of the current attribute. This object \n\t * represents the context of the XML attribute in the SBMLDocument.\n\t * \n\t */\n\tpublic void processAttribute(String elementName, String attributeName, String value, String prefix, boolean isLastAttribute, Object contextObject);\n\t\n\t/**\n\t * Process the text of a XML element and modify 'contextObject' in consequence.\n\t * \n\t * For example, if the contextObject is an instance of ModelCreator and the elementName is 'Family',\n\t * this method will set the familyName of the 'contextObject' to the text value. Then it will return the \n\t * changed ModelCreator instance.\n\t * \n\t * @param elementName : the localName of the XML element.\n\t * @param characters : the text of this XML element.\n\t * @param contextObject : the object to set or modify depending on the identity of the current element. This object \n\t * represents the context of the XML element in the SBMLDocument.\n\t * \n\t */\n\tpublic void processCharactersOf(String elementName, String characters, Object contextObject);\n\n\t/**\n\t * Process the end of the document. Do the necessary changes in the SBMLDocument.\n\t * \n\t * For example, check if all the annotations are valid, etc.\n\t * \n\t * @param sbmlDocument : the final initialised SBMLDocument instance.\n\t */\n\tpublic void processEndDocument(SBMLDocument sbmlDocument);\n\t\n\t/**\n\t * Process the end of the element 'elementName'. Modify or not the contextObject.\n\t * \n\t * @param elementName : the localName of the XML element.\n\t * @param prefix : the prefix of the XML element.\n\t * @param isNested : boolean value to know if the XML element is a nested element.\n\t * @param contextObject : the object to set or modify depending on the identity of the current element. This object \n\t * represents the context of the XML element in the SBMLDocument.\n\t * \n\t * @return true to remove the contextObject from the stack, if false is returned the contextObject will stay on top \n\t * of the stack \n\t */\n\tpublic boolean processEndElement(String elementName, String prefix, boolean isNested, Object contextObject);\n\t\n\t/**\n\t * Process the namespace and modify the contextObject in consequence.\n\t * \n\t * For example, if the contextObject is an instance of SBMLDocument, the namespaces will be stored in the SBMLNamespaces HashMap \n\t * of this SBMLDocument.\n\t *\n\t * @param elementName : the localName of the XML element.\n\t * @param URI : the URI of the namespace\n\t * @param prefix : the prefix of the namespace.\n\t * @param localName : the localName of the namespace.\n\t * @param hasAttributes : boolean value to know if there are attributes after the namespace declarations.\n\t * @param isLastNamespace : boolean value to know if this namespace is the last namespace of this element.\n\t * @param contextObject : the object to set or modify depending on the identity of the current element. This object \n\t * represents the context of the XML element in the SBMLDocument.\n\t * \n\t */\n\tpublic void processNamespace(String elementName, String URI, String prefix, String localName, boolean hasAttributes, boolean isLastNamespace, Object contextObject);\n\t\n\t/**\n\t * Process the XML element and modify 'contextObject' in consequence.\n\t * \n\t * For example, if the contextObject is an instance of Event and the elementName is 'trigger', this method \n\t * will create a new Trigger instance and will set the trigger instance of the 'contextObject' to the new Trigger.\n\t * Then the method will return the new Trigger instance which is the new environment.\n\t *\n\t * @param elementName : the localName of the XML element to process\n\t * @param prefix : the prefix of the XML element to process\n\t * @param hasAttributes : boolean value to know if this XML element has attributes.\n\t * @param hasNamespaces : boolean value to know if this XML element contains namespace declarations.\n\t * @param contextObject : the object to set or modify depending on the identity of the current XML element. This object \n\t * represents the context of the XML element in the SBMLDocument.\n\t * @return a new contextObject which represents the environment of the next node/subnode in the SBMLDocument. If null is returned,\n\t * the contextObject will not change.\n\t * \n\t */\n\tpublic Object processStartElement(String elementName, String prefix, boolean hasAttributes, boolean hasNamespaces, Object contextObject);\n\t\n}", "public static EInfoResult parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n EInfoResult object =\n new EInfoResult();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"eInfoResult\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (EInfoResult)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.ncbi.nlm.nih.gov/soap/eutils/einfo\",\"ERROR\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n throw new org.apache.axis2.databinding.ADBException(\"The element: \"+\"ERROR\" +\" cannot be null\");\n }\n \n\n java.lang.String content = reader.getElementText();\n \n object.setERROR(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.ncbi.nlm.nih.gov/soap/eutils/einfo\",\"DbList\").equals(reader.getName())){\n \n object.setDbList(DbListType.Factory.parse(reader));\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.ncbi.nlm.nih.gov/soap/eutils/einfo\",\"DbInfo\").equals(reader.getName())){\n \n object.setDbInfo(DbInfoType.Factory.parse(reader));\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "@Override\n\tpublic void endElement(String uri, String localName, String qName)\n\tthrows SAXException {\n\t\tif (isAccession){ // take only the primary one!\n\t\t\taccessions.add(currentChars.toString());\n\t\t} else if (isEntryName){\n\t\t\tentryNames.add(currentChars.toString());\n\t\t} else if (isOrgSciName){\n\t\t\torgSciName = currentChars.toString();\n\t\t} else if (isOrgComName){\n\t\t\torgComName = currentChars.toString();\n\t\t} else if (isProtRecName){\n\t\t\tprotRecName = currentChars.toString();\n } else if (isEnzymeRegulationTxt){\n String er = currentChars.toString();\n inhibitors.addAll(EPUtil.parseTextForInhibitors(er));\n activators.addAll(EPUtil.parseTextForActivators(er));\n } else if (isEntry){\n\t\t\tif (!ecs.isEmpty()){ // XXX here is the enzyme filter\n\t\t\t\ttry {\n//\t\t\t\t\tCollection<Entry> entries = new HashSet<Entry>();\n\t\t\t\t\tCollection<XRef> xrefs = new HashSet<XRef>();\n\n\t\t\t\t\tEntry uniprotEntry = new Entry();\n\t\t\t\t\tuniprotEntry.setDbName(MmDatabase.UniProt.name());\n\t\t\t\t\tuniprotEntry.setEntryAccessions(accessions);\n\t\t\t\t\tuniprotEntry.setEntryId(entryNames.get(0)); // take first one\n\t\t\t\t\tuniprotEntry.setEntryName(protRecName);\n//\t\t\t\t\tentries.add(uniprotEntry);\n\t\t\t\t\t\n\t\t\t\t\tEntry speciesEntry = new Entry();\n\t\t\t\t\tspeciesEntry.setDbName(MmDatabase.Linnean.name());\n\t\t\t\t\tspeciesEntry.setEntryId(orgSciName);\n\t\t\t\t\tspeciesEntry.setEntryName(orgComName);\n//\t\t\t\t\tentries.add(speciesEntry);\n\t\t\t\t\t\n\t\t\t\t\tXRef up2sp = new XRef();\n\t\t\t\t\tup2sp.setFromEntry(uniprotEntry);\n\t\t\t\t\tup2sp.setRelationship(Relationship.between(\n\t\t\t\t\t\t\tMmDatabase.UniProt, MmDatabase.Linnean).name());\n\t\t\t\t\tup2sp.setToEntry(speciesEntry);\n\t\t\t\t\txrefs.add(up2sp);\n\n\t\t\t\t\tfor (String ec: ecs){\n\t\t\t\t\t\tEntry ecEntry = new Entry();\n\t\t\t\t\t\tecEntry.setDbName(MmDatabase.EC.name());\n\t\t\t\t\t\tecEntry.setEntryId(ec);\n//\t\t\t\t\t\tentries.add(ecEntry);\n\t\t\t\t\t\t\n\t\t\t\t\t\tXRef up2ec = new XRef();\n\t\t\t\t\t\tup2ec.setFromEntry(uniprotEntry);\n\t\t\t\t\t\tup2ec.setRelationship(Relationship.between(\n\t\t\t\t\t\t\t\tMmDatabase.UniProt, MmDatabase.EC).name());\n\t\t\t\t\t\tup2ec.setToEntry(ecEntry);\n\t\t\t\t\t\txrefs.add(up2ec);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfor (String pdbCode : pdbCodes) {\n\t\t\t\t\t\tEntry pdbEntry = new Entry();\n\t\t\t\t\t\tpdbEntry.setDbName(MmDatabase.PDB.name());\n\t\t\t\t\t\tpdbEntry.setEntryId(pdbCode);\n\t\t\t\t\t\t// Add structure name:\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tArrayOfString fields = new ArrayOfString();\n\t\t\t\t\t\t\tfields.getString().add(\"name\");\n\t\t\t\t\t\t\tString name = ebeyeService\n\t\t\t\t\t\t\t\t\t.getEntry(\"pdbe\", pdbCode, fields)\n\t\t\t\t\t\t\t\t\t.getString().get(0);\n\t\t\t\t\t\t\tpdbEntry.setEntryName(name);\n\t\t\t\t\t\t} catch (Exception e){\n\t\t\t\t\t\t\tLOGGER.error(\"Couldn't get name for \" + pdbCode, e);\n\t\t\t\t\t\t}\n // This happens with obsolete/redirected PDB entries:\n\t\t\t\t\t\tif (pdbEntry.getEntryName() == null){\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n//\t\t\t\t\t\tentries.add(pdbEntry);\n\t\t\t\t\t\t\n\t\t\t\t\t\tXRef up2pdb = new XRef();\n\t\t\t\t\t\tup2pdb.setFromEntry(uniprotEntry);\n\t\t\t\t\t\tup2pdb.setRelationship(Relationship.between(\n\t\t\t\t\t\t\t\tMmDatabase.UniProt, MmDatabase.PDB).name());\n\t\t\t\t\t\tup2pdb.setToEntry(pdbEntry);\n\t\t\t\t\t\txrefs.add(up2pdb);\n\t\t\t\t\t}\n\n if (dbIds.size() != dbNames.size()){\n LOGGER.warn(\"DrugBank mismatch: \" + dbIds.size()\n + \" IDs, \" + dbNames + \" names.\");\n }\n int dbNameIndex = 0;\n for (String dbId : dbIds) {\n Entry dbEntry = new Entry();\n dbEntry.setDbName(MmDatabase.DrugBank.name());\n dbEntry.setEntryId(dbId);\n dbEntry.setEntryName(dbNames.get(dbNameIndex++));\n// entries.add(dbEntry);\n\n XRef up2db = new XRef();\n up2db.setFromEntry(uniprotEntry);\n up2db.setRelationship(Relationship.between(\n MmDatabase.UniProt, MmDatabase.DrugBank).name());\n up2db.setToEntry(dbEntry);\n xrefs.add(up2db);\n }\n\n for (Molecule inhibitor : inhibitors) {\n Entry inhEntry = searchMoleculeInChEBI(inhibitor.getName());\n if (inhEntry != null){\n XRef up2inh = new XRef();\n up2inh.setFromEntry(inhEntry);\n up2inh.setRelationship(\n Relationship.is_inhibitor_of.name());\n up2inh.setToEntry(uniprotEntry);\n xrefs.add(up2inh);\n }\n }\n\n for (Molecule activator : activators) {\n Entry actEntry = searchMoleculeInChEBI(activator.getName());\n if (actEntry != null){\n XRef up2inh = new XRef();\n up2inh.setFromEntry(actEntry);\n up2inh.setRelationship(\n Relationship.is_activator_of.name());\n up2inh.setToEntry(uniprotEntry);\n xrefs.add(up2inh);\n }\n }\n\n LOGGER.debug(\"Writing to mega-map...\");\n mm.writeXrefs(xrefs);\n LOGGER.debug(MessageFormat.format(\n \"Entry end: {0} ECs, {1} PDBs, {2} DBs, {3} inhs, {4} activs\",\n ecs.size(), pdbCodes.size(), dbIds.size(),\n inhibitors.size(), activators.size()));\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tthrow new RuntimeException(\"Adding entry to mega-map\", e);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Clean up:\n\t\t\taccessions.clear();\n\t\t\tentryNames.clear();\n\t\t\tecs.clear();\n\t\t\tpdbCodes.clear();\n\t\t\tdbIds.clear();\n\t\t\tdbNames.clear();\n\t\t\torgSciName = null;\n orgComName = null;\n inhibitors.clear();\n activators.clear();\n\t\t}\n\t\tcurrentContext.pop();\n\t\t// Update flags:\n\t\tString currentXpath = getCurrentXpath();\n\t\tisEntry = UNIPROT_ENTRY.equals(currentXpath);\n\t\tisAccession = false;\n\t\tisEntryName = false;\n\t\tisOrgSciName = false;\n\t\tisEnzymeRegulationTxt = false;\n\t}", "@Override\n public void startElement(String namespaceURI, String localName,\n String qName, Attributes atts) throws SAXException {\n \n \t \n \t if (localName.equals(\"OrganismCitationList\")) {\n \n \t\t \n \t\t \n }else if (localName.equals(\"OrganismCitation\")) {\n \t \n \t origin=atts.getValue(\"origin\");\n fReader.createNewSample(origin);\n \t \n \n }else if (localName.equals(\"Datum\")) {\n \t \n name=atts.getValue(\"name\");\n label=atts.getValue(\"label\");\n\n\n \n }else if (localName.equals(\"SideData\")) {\n \t \n category=atts.getValue(\"type\");\n\n \n }else if (localName.equals(\"value\")) {\n\n }\n else if (localName.equals(\"CitationCoordinate\")) {\n \t\n \n \t fReader.createCitationCoordinate(atts.getValue(\"code\"));\n\n \t \n }\n else if (localName.equals(\"SecondaryCitationCoordinate\")) {\n \t\n \n \t fReader.createSecondaryCitationCoordinate(atts.getValue(\"code\"));\n\n\n \t \n }\n else if (localName.equals(\"InformatisationDate\")) {\n \t\n \n \t fReader.createInformatisationDate(atts.getValue(\"day\"), atts.getValue(\"month\"), atts.getValue(\"year\"), atts.getValue(\"hours\"), atts.getValue(\"mins\"), atts.getValue(\"secs\"));\n\n\n \t \n }\n else if (localName.equals(\"ObservationDate\")) {\n \t\n \t fReader.createObservationDate(atts.getValue(\"day\"), atts.getValue(\"month\"), atts.getValue(\"year\"), atts.getValue(\"hours\"), atts.getValue(\"mins\"), atts.getValue(\"secs\"));\n\n \t \n }\n else if (localName.equals(\"CorrectedTaxonName\")) {\n \t\n \t sureness=atts.getValue(\"sureness\");\n \t \n \t \t//ho agafem a l'end\n\n \t \n }\n \n else if (localName.equals(\"OriginalTaxonName\")) {\n\n \t sureness=atts.getValue(\"sureness\");\n \t //ho agafem a l'end\n \n \n }\n \n else{\n \t \n \t ///no fem res...\n \t \n \t \n }\n }", "public void startElement(String uri, String localName, String qName,\n Attributes attributes) throws SAXException {\n if (qName.equalsIgnoreCase(\"SensoDx\")) {\n bSensoDx = true;\n } else if (qName.equalsIgnoreCase(\"Test\")) {\n testImages = new ArrayList<>();\n allTestFilesFound = true;\n bTest = true;\n } else if (qName.equalsIgnoreCase(\"Instrument\")) {\n bInstrument = true;\n Instrument_attr_name = attributes.getQName(0);\n Instrument_attr_value = attributes.getValue(0);\n System.out.println(\"\\t Instrument attr : \" + Instrument_attr_name + \" = \" + Instrument_attr_value);\n\n } else if (qName.equalsIgnoreCase(\"Cartridge\")) {\n bCartridge = true;\n Cartridge_attr_name = attributes.getQName(0);\n Cartridge_attr_value = attributes.getValue(0);\n System.out.println(\"\\t Cartridge attr : \" + Cartridge_attr_name + \" = \" + Cartridge_attr_value);\n\n } else if (qName.equalsIgnoreCase(\"AssayType\")) {\n bAssayType = true;\n } else if (qName.equalsIgnoreCase(\"TestImages\")) {\n bTestImages = true;\n } else if (qName.equalsIgnoreCase(\"Image\")) {\n bImage = true;\n } else if (qName.equalsIgnoreCase(\"Timestamp\")) {\n bTimestamp = true;\n } else if (qName.equalsIgnoreCase(\"InfoPanel1\")) {\n bInfoPanel1 = true;\n } else if (qName.equalsIgnoreCase(\"InfoPanel2\")) {\n bInfoPanel2 = true;\n } else if (qName.equalsIgnoreCase(\"isCartridgeValid\")) {\n bIsCartridgeValid = true;\n } else if (qName.equalsIgnoreCase(\"DiagTestResult\")) {\n bDiagTestResult = true;\n } else if (qName.equalsIgnoreCase(\"TestID\")) {\n bTestID = true;\n } else if (qName.equalsIgnoreCase(\"ResultScore\")) {\n bResultScore = true;\n }\n\n }", "public abstract void endProcessing() throws SAXException;", "private interface ElementProcessor {\r\n\t\t\t/**\r\n\t\t\t * is called when a start element event occurs in the underlying SAX parser.\r\n\t\t\t * @param sUriNameSpace\r\n\t\t\t * @param sSimpleName\r\n\t\t\t * @param sQualifiedName\r\n\t\t\t * @param attributes the XML attributes of this element\r\n\t\t\t */\r\n\t\t\tvoid startElement(String sUriNameSpace, String sSimpleName, String sQualifiedName, Attributes attributes)\r\n\t\t\t\t\tthrows SAXException;\r\n\r\n\t\t\t/**\r\n\t\t\t * called when an end element event occurs in the underlying SAX parser\r\n\t\t\t * @param sUriNameSpace\r\n\t\t\t * @param sSimpleName\r\n\t\t\t * @param sQualifiedName\r\n\t\t\t */\r\n\t\t\tvoid endElement(String sUriNameSpace, String sSimpleName, String sQualifiedName) throws SAXException;\r\n\t\t}", "@Override\n public void endDocument() throws SAXException{\n }", "public static ArrayOfItemTransactionParcelStationE parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\r\n ArrayOfItemTransactionParcelStationE object =\r\n new ArrayOfItemTransactionParcelStationE();\r\n\r\n int event;\r\n java.lang.String nillableValue = null;\r\n java.lang.String prefix =\"\";\r\n java.lang.String namespaceuri =\"\";\r\n try {\r\n \r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n \r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\r\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\r\n // Skip the element and report the null value. It cannot have subelements.\r\n while (!reader.isEndElement())\r\n reader.next();\r\n \r\n return object;\r\n \r\n\r\n }\r\n \r\n\r\n \r\n // Note all attributes that were handled. Used to differ normal attributes\r\n // from anyAttributes.\r\n java.util.Vector handledAttributes = new java.util.Vector();\r\n \r\n\r\n \r\n while(!reader.isEndElement()) {\r\n if (reader.isStartElement() ){\r\n \r\n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://schemas.datacontract.org/2004/07/UniSys.ItemsService.Common\",\"ArrayOfItemTransactionParcelStation\").equals(reader.getName())){\r\n \r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\r\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\r\n object.setArrayOfItemTransactionParcelStation(null);\r\n reader.next();\r\n \r\n }else{\r\n \r\n object.setArrayOfItemTransactionParcelStation(ArrayOfItemTransactionParcelStation.Factory.parse(reader));\r\n }\r\n } // End of if for expected property start element\r\n \r\n else{\r\n // A start element we are not expecting indicates an invalid parameter was passed\r\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\r\n }\r\n \r\n } else {\r\n reader.next();\r\n } \r\n } // end of while loop\r\n \r\n\r\n\r\n\r\n } catch (javax.xml.stream.XMLStreamException e) {\r\n throw new java.lang.Exception(e);\r\n }\r\n\r\n return object;\r\n }", "@Override\n public void endDocument() throws SAXException {\n super.endDocument();\n }", "public void startElement(String uri, String localName, String qName,\n Attributes attributes) throws SAXException {\n int i;\n String gVl = null;\n String gTy = null;\n String gNam = null;\n String gVl4;\n AttributesImpl a1 = new AttributesImpl(attributes);\n int l1 = a1.getLength();\n\n for (i = 0; i < l1; i++) {\n gVl = a1.getValue(i);\n gTy = a1.getType(i);\n gNam = a1.getQName(i);\n\n }\n // System.out.println(qName + \" Datentyp: \" + typeInfoProvider.getElementTypeInfo().getTypeName());\n // System.out.println(aktwert);\n \n \n \n if (typeInfoProvider.getElementTypeInfo().getTypeName().equals(\"#AnonType_POSLIST\")) {\n if(test==false) {\n update = update + \"DTCONTPOSL(CONTPOS(\" ;\n test=true;\n }\n else {update = update + \"),CONTPOS(\" ;}\n\n } \n \n \n }", "void parse(String systemID) throws SAXException, IOException;", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tthis.xmlData = new ParsedXMLData();\n\t}", "public void readIt(XMLElement doc) {\n\n Enumeration elements = doc.getChildren();\n\n while (elements.hasMoreElements()) {\n TextElement elem = (TextElement) elements.nextElement();\n\n if (elem.getName().equals(handlernameTag)) {\n setHandlerName(elem.getTextValue());\n continue;\n }\n // Set credential\n if (elem.getName().equals(credentialTag)) {\n setCredential(StructuredDocumentUtils.copyAsDocument(elem));\n continue;\n }\n // Set queryid\n if (elem.getName().equals(queryIdTag)) {\n queryid = Integer.parseInt(elem.getTextValue());\n continue;\n }\n\n // Set source route\n if (elem.getName().equals(srcRouteTag)) {\n\n for (Enumeration eachXpt = elem.getChildren(); eachXpt.hasMoreElements();) {\n\n XMLElement aXpt = (XMLElement) eachXpt.nextElement();\n RouteAdvertisement routeAdv = (RouteAdvertisement) AdvertisementFactory.newAdvertisement(aXpt);\n\n if (null != routeAdv.getDestPeerID()) {\n setSrcPeerRoute(routeAdv);\n setSrcPeer(routeAdv.getDestPeerID());\n } else {\n Logging.logCheckedWarning(LOG, \"Incomplete Route Advertisement (missing peer id).\");\n }\n\n }\n continue;\n }\n\n // Set hopcount\n if (elem.getName().equals(hopCountTag)) {\n setHopCount(Integer.parseInt(elem.getTextValue()));\n continue;\n }\n\n // Set source peer\n // FIXME tra 20031108 Since Peer Id is already part\n // of the SrcRoute Tag. We should be able to remove\n // processing this tag in the future.\n if (elem.getName().equals(srcPeerIdTag)) {\n\n try {\n\n String value = elem.getTextValue();\n\n if (value != null && value.length() > 0) {\n URI srcURI = new URI(elem.getTextValue());\n setSrcPeer(IDFactory.fromURI(srcURI));\n }\n\n } catch (URISyntaxException failed) {\n\n Logging.logCheckedWarning(LOG, \"Bad ID in message\\n\", failed);\n RuntimeException failure = new IllegalArgumentException(\"Bad ID in message\");\n failure.initCause(failed);\n throw failure;\n\n }\n continue;\n }\n\n // Set query\n if (elem.getName().equals(queryTag)) setQuery(elem.getTextValue());\n\n }\n }", "public void bridge() throws XMLStreamException {\n/* */ try {\n/* 118 */ int depth = 0;\n/* */ \n/* */ \n/* 121 */ int event = this.staxStreamReader.getEventType();\n/* 122 */ if (event == 7) {\n/* 123 */ event = this.staxStreamReader.next();\n/* */ }\n/* */ \n/* */ \n/* 127 */ if (event != 1) {\n/* 128 */ event = this.staxStreamReader.nextTag();\n/* */ \n/* 130 */ if (event != 1) {\n/* 131 */ throw new IllegalStateException(\"The current event is not START_ELEMENT\\n but\" + event);\n/* */ }\n/* */ } \n/* */ \n/* */ \n/* 136 */ handleStartDocument();\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ do {\n/* 142 */ switch (event) {\n/* */ case 1:\n/* 144 */ depth++;\n/* 145 */ handleStartElement();\n/* */ break;\n/* */ case 2:\n/* 148 */ handleEndElement();\n/* 149 */ depth--;\n/* */ break;\n/* */ case 4:\n/* 152 */ handleCharacters();\n/* */ break;\n/* */ case 9:\n/* 155 */ handleEntityReference();\n/* */ break;\n/* */ case 3:\n/* 158 */ handlePI();\n/* */ break;\n/* */ case 5:\n/* 161 */ handleComment();\n/* */ break;\n/* */ case 11:\n/* 164 */ handleDTD();\n/* */ break;\n/* */ case 10:\n/* 167 */ handleAttribute();\n/* */ break;\n/* */ case 13:\n/* 170 */ handleNamespace();\n/* */ break;\n/* */ case 12:\n/* 173 */ handleCDATA();\n/* */ break;\n/* */ case 15:\n/* 176 */ handleEntityDecl();\n/* */ break;\n/* */ case 14:\n/* 179 */ handleNotationDecl();\n/* */ break;\n/* */ case 6:\n/* 182 */ handleSpace();\n/* */ break;\n/* */ default:\n/* 185 */ throw new InternalError(\"processing event: \" + event);\n/* */ } \n/* */ \n/* 188 */ event = this.staxStreamReader.next();\n/* 189 */ } while (depth != 0);\n/* */ \n/* 191 */ handleEndDocument();\n/* 192 */ } catch (SAXException e) {\n/* 193 */ throw new XMLStreamException(e);\n/* */ } \n/* */ }", "public void leer() throws SAXException{ \n /**\n * Recorremos todo el listado de nodos, cada valor de i representa los siguientes listados\n * i = 0 \"GERENTE\"\n * i = 1 \"CAJERO\"\n * i = 2 \"CLIENTE\"\n * i = 3 \"TRANSACCION\"\n */\n for (int i = 0; i < 4; i++) {\n try{\n NodeList listaNodoAux = listaXML.getListaNodos(entidades[i]);//obtenemos cada una de las listas de las entidades\n\n for(int j = 0;j < listaNodoAux.getLength(); j++){\n Node nodoAux = listaNodoAux.item(j);//obtenemos nodo por nodo (conjunto de datos)\n if(nodoAux.getNodeType() == Node.ELEMENT_NODE){\n Element elementAux = (Element) nodoAux; \n //System.out.println(\"\"+nodoAux.getNodeName()); \n interpretarNodo(null, elementAux); \n }\n }\n }catch(Exception ex){\n \n }\n }\n }", "@Override\n public void startDocument() throws SAXException {\n this.myParsedExampleDataSet = new ParsedExampleDataSet();\n }", "public void startTagHandler(XMLEvent event) {\r\n\t\tStartElement startElement = event.asStartElement();\r\n\t\tcurrElement = startElement.getName().getLocalPart();\r\n\r\n\t\tif (XML.PLANES.equalsTo(currElement)) {\r\n\t\t\tplanes = new Planes();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (XML.PLANE.equalsTo(currElement)) {\r\n\t\t\tplane = new Plane();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (XML.CHARS.equalsTo(currElement)) {\r\n\t\t\tchars = new Chars();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (XML.PRICE.equalsTo(currElement)) {\r\n\t\t\tprice = new Price();\r\n\t\t\tAttribute attribute = startElement.getAttributeByName(new QName(\r\n\t\t\t\t\tXML.UNIT.getValue()));\r\n\t\t\tif (attribute != null) {\r\n\t\t\t\tprice.setUnit(attribute.getValue());\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (XML.PARAMETERS.equalsTo(currElement)) {\r\n\t\t\tparameters = new Parameters();\r\n\t\t\tAttribute attribute = startElement.getAttributeByName(new QName(\r\n\t\t\t\t\tXML.UNIT.getValue()));\r\n\t\t\tif (attribute != null) {\r\n\t\t\t\tparameters.setUnit(attribute.getValue());\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (XML.AMMUNITION.equalsTo(currElement)) {\r\n\t\t\tammunition = new Ammunition();\r\n\t\t\tAttribute attribute = startElement.getAttributeByName(new QName(\r\n\t\t\t\t\tXML.ROCKET.getValue()));\r\n\t\t\tif (attribute != null) {\r\n\t\t\t\tammunition.setRocket(Byte.parseByte(attribute.getValue()));\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
change time format, the third value is the value matches "when", the forth value is which after "then". In this process, we just clean data, not unify the length of every kind of data.
public Boolean changeTimeFormat(String tableName, String columnName,String strategyID){ PhoenixUtil util =new PhoenixUtil(); Connection conn = null; try { // get connection conn = util.GetConnection(); // check connection if (conn == null) { System.out.println("conn is null..."); return false; } // for (int i = 0; (start+10000)<count; ){ // int num =10000; // int start = i*num; // select(start, num); // } SpecialPhoenixUtil specialPhoenixUtil = new SpecialPhoenixUtil(); int rowCount = specialPhoenixUtil.getRowCount(conn, tableName); Connection connPhoenix = null; //每次最多处理5000条数据,避免内存溢出 for (int i = 0; i < rowCount;i+=5000) { //1.首先在表中读出PK和对应的时间,存到map中,每一行是一个map(两个键值对,键是列名),然后放到一个list里 List<Map<String, Object>> oldValueList = SelectPKAndOneColumn(conn, tableName, columnName,i); List oldResult = new ArrayList(); //得到包含主键和时间的list for (int w = 0; w < oldValueList.size(); w++) { org.json.JSONObject jsonObject = new org.json.JSONObject(oldValueList.get(w)); Iterator iterator = jsonObject.keys(); while (iterator.hasNext()) { String key = (String) iterator.next(); // System.out.println(key); //result.add(key); oldResult.add(jsonObject.getString(key)); } } // 2然后对list中的所有时间值转化为时间格式并格式化为标准格式,并转化回字符串格式,然后将主键和日期结果对应起来存到map里 Map<String, String> transferResult = new HashMap<String, String>(); SimpleDateFormat sdf1 = new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy", Locale.US); SimpleDateFormat sdf2 = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss 'GMT'", Locale.UK); SimpleDateFormat sdf3 = new SimpleDateFormat("yyyy-MM-dd HH:mm EEE"); SimpleDateFormat sdf4 = new SimpleDateFormat("(yyyy-MM-dd HH:mm:ss)"); SimpleDateFormat sdf5 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf6 = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); SimpleDateFormat sdf7 = new SimpleDateFormat("yyyy/MM/dd"); SimpleDateFormat sdf8 = new SimpleDateFormat("yy-MM-dd HH:mm:ss"); SimpleDateFormat sdf9 = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat sdf10 = new SimpleDateFormat("yy-MM-dd"); SimpleDateFormat sdf11 = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss"); SimpleDateFormat toDateFormate27 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat toDateFormate28 = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss"); String connect = ""; Date date = new Date(); String str = ""; //j是pk,k是日期 for (int j = 0; j < oldResult.size(); ) { int k = j + 1; String key = oldResult.get(j).toString(); String value = oldResult.get(k).toString(); //正则判断日期字符串类型来相应的匹配 if (Pattern.matches("\\w{3} \\w{3} \\d{2} [0-9]{2}:[0-9]{2}:[0-9]{2} \\w{3} \\d{4}", value)) { date = sdf1.parse(value); } else if (Pattern.matches("\\w{3}, \\d{1} \\w{3} \\d{4} [0-9]{2}:[0-9]{2}:[0-9]{2} \\w{3}", value)) { date = sdf2.parse(value); } else if (Pattern.matches("[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2} [星][期][一二三四五六日].*?", value)) { date = sdf3.parse(value); //http://blog.csdn.net/z991876960/article/details/53117260 必须在5前面 } else if (Pattern.matches("\\([0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}\\)", value)) { date = sdf4.parse(value); //http://blog.csdn.net/lxcnn/article/details/4362500 必须在8前面 } else if (Pattern.matches("[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}", value)) { date = sdf5.parse(value); //必须在7前面 } else if (Pattern.matches("\\d{4}/\\d{2}/\\d{2} [0-9]{2}:[0-9]{2}:[0-9]{2}", value)) { date = sdf6.parse(value); //http://blog.csdn.net/dl020840504/article/details/17055531 https://www.cnblogs.com/guyezhai/p/6729663.html } else if (Pattern.matches("\\d{4}/\\d{2}/\\d{2}", value)) { date = sdf7.parse(value); } else if (Pattern.matches("[0-9]{2}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}", value)) { date = sdf8.parse(value); //http://blog.csdn.net/cwlmxmz/article/details/45045961 https://zhidao.baidu.com/question/578661060.html?qbl=relate_question_4&word=%B8%F7%D6%D6%C8%D5%C6%DA%B8%F1%CA%BD%D5%FD%D4%F2 必须在10前面 } else if (Pattern.matches("\\d{4}-\\d{2}-\\d{2}", value)) { date = sdf9.parse(value); } else if (Pattern.matches("\\d{2}-\\d{2}-\\d{2}", value)) { date = sdf10.parse(value); //https://zhidao.baidu.com/question/410315343.html } else if (Pattern.matches("[0-9]{4}[年|\\-|/][0-9]{1,2}[月|\\-|/][0-9]{1,2}[日|\\-|/] [0-9]{2}:[0-9]{2}:[0-9]{2}", value)) { date = sdf11.parse(value); } else { str = value; } // //test // date=sdf7.parse(value); if (str != value) { if (strategyID == "27") { str = toDateFormate27.format(date); } else if (strategyID == "28") { str = toDateFormate28.format(date); } } System.out.println(str); //将当期的主键和处理后的地址名存入Map transferResult.put(key, str); j = j + 2; } //4.插入回原phoenix表 Iterator<Map.Entry<String, String>> entries = transferResult.entrySet().iterator(); util = new PhoenixUtil(); try { // get connection connPhoenix = util.GetConnection(); // check connection if (connPhoenix == null) { System.out.println("conn is null..."); return false; } while (entries.hasNext()) { Map.Entry<String, String> entry = entries.next(); // System.out.println("Key = " + entry.getKey() + ", Value = " + entry.getValue()); upsertOneColumn(connPhoenix, tableName, columnName, entry.getKey(), entry.getValue()); } } catch (Exception e) { e.printStackTrace(); } } if (connPhoenix != null) { try { connPhoenix.close(); } catch (SQLException e) { e.printStackTrace(); } } /* String count="SELECT COUNT(*) FROM \""+tableName+"\""; PreparedStatement ps = conn.prepareStatement(count); ResultSet result=ps.executeQuery(); conn.commit(); int totleRow=0; while(result.next()){ totleRow=result.getInt(1); } //一次提交的限制是50万,这里一次提交40万,循环来完成所有的清洗 //When we use the judge sentence case, when it maches the first case, it won't execute else.so we match which has detail time first and then maches which doesn't have detail time. for (int i=0;i<totleRow;i+=400000){ String sql =""; //直接用sql的方法,部分日期无法解析 String sql ="UPSERT INTO \""+tableName+"\"(\"PK\",\"info\".\""+columnName+"\") SELECT \"PK\",CASE " + //if the format is like Sat Jul 26 09:59:57 CST 2014,currently this order are unable to use here, but useful in squirrel // "WHEN \"info\".\""+columnName+"\" LIKE '___, _ ___ ____ __:%:% ___' THEN REGEXP_SUBSTR(TO_CHAR(TO_DATE(\"info\".\""+columnName+"\", 'EEE, d MMM yyyy HH:mm:ss z', 'GMT')),'[^\\.]+') " + //2017-11-22 16:38星期三 bbs_tianya_post "WHEN \"info\".\""+columnName+"\" LIKE \'%-%-%星期%\' THEN REGEXP_SUBSTR(TO_CHAR(TO_DATE(\"info\".\""+columnName+"\", 'yyyy-MM-dd HH:mm EEE','CST+8:00')),'[^\\.]+') " + //(2017-11-22 16:52:12) blog_china_post "WHEN \"info\".\""+columnName+"\" LIKE \'(____-__-__ __:__:__)\' THEN REGEXP_SUBSTR(TO_CHAR(TO_DATE(\"info\".\""+columnName+"\", '(yyyy-MM-dd HH:mm:ss)','CST+8:00)')),'[^\\.]+') " + //deal with true format, to avoid it matches other format so as to be changed. "WHEN \"info\".\""+columnName+"\" LIKE '____-__-__ __:%:__' THEN REGEXP_SUBSTR(TO_CHAR(TO_DATE(\"info\".\""+columnName+"\", 'yyyy-MM-dd HH:mm:ss','CST+8:00')),'[^\\.]+') " + //deal with 2017/11/21 06:12:24, change / to - "WHEN \"info\".\""+columnName+"\" LIKE '%/%/% %:%:%' THEN REGEXP_SUBSTR(TO_CHAR(TO_DATE(\"info\".\""+columnName+"\", 'yyyy/MM/dd HH:mm:ss','CST+8:00')),'[^\\.]+') " + //deal with 2017/11/21, change / to - "WHEN \"info\".\""+columnName+"\" LIKE '%/%/%' THEN REGEXP_SUBSTR(TO_CHAR(TO_DATE(\"info\".\""+columnName+"\", 'yyyy/MM/dd','CST+8:00')),'[^\\.]+') " + //deal with 17-11-21 06:39:28, change 17 to 2017 ,if the yy represents 00-17, it will be filled to 2000-2017,or be filled to 19.. "WHEN \"info\".\""+columnName+"\" LIKE '__-%-% %:%:%' THEN REGEXP_SUBSTR(TO_CHAR(TO_DATE(\"info\".\""+columnName+"\", 'yy-MM-dd HH:mm:ss','CST+8:00')),'[^\\.]+') " + //deal with 2017-11-21 "WHEN \"info\".\""+columnName+"\" LIKE '____-%-%' THEN REGEXP_SUBSTR(TO_CHAR(TO_DATE(\"info\".\""+columnName+"\", 'yyyy-MM-dd','CST+8:00')),'[^\\.]+') " + // //deal with 17-11-21, change 17 to 2017 ,if the yy represents 00-17, it will be filled to 2000-2017,or be filled to 19.. "WHEN \"info\".\""+columnName+"\" LIKE '__-%-%' THEN REGEXP_SUBSTR(TO_CHAR(TO_DATE(\"info\".\""+columnName+"\", 'yy-MM-dd','CST+8:00')),'[^\\.]+') " + // //2017年11月21日 23:54:12,将汉字替换为- "WHEN \"info\".\""+columnName+"\" LIKE \'%年%月%日 __:__:__\' THEN REGEXP_SUBSTR(TO_CHAR(TO_DATE(\"info\".\""+columnName+"\", 'yyyy年MM月dd日 HH:mm:ss','CST+8:00')),'[^\\.]+') " + "ELSE \"info\".\""+columnName+"\" END FROM \""+tableName+"\" LIMIT 400000 OFFSET "+i; PreparedStatement ps2 = conn.prepareStatement(sql); // execute upsert String msg = ps2.executeUpdate() > 0 ? "insert success..." : "insert fail..."; // you must commit conn.commit(); System.out.println(msg); if(msg =="insert fail..."){ return false; } } } catch (SQLException e) { //报错未必不执行,如socket超时,因此不在这里retrun false e.printStackTrace(); */ }catch(ParseException e){ e.printStackTrace(); } finally{ if (conn != null) { try { conn.close(); } catch (SQLException e) { e.printStackTrace(); } } } return true; }
[ "@Test\n\tpublic void testReformatTime() {\n\t\tassertEquals(\"wrong time format\", \"invalid time format\", DateAndTime.reformatTime(\"abcdef\"));\n\t\tassertEquals(\"wrong time format\", \"invalid time format\", DateAndTime.reformatTime(\"11om\"));\n\t\tassertEquals(\"wrong time format\", \"invalid time format\", DateAndTime.reformatTime(\"9999\"));\n\t\tassertEquals(\"wrong time format\", \"invalid time format\", DateAndTime.reformatTime(\"001\"));\n\t\tassertEquals(\"wrong time format\", \"invalid time format\", DateAndTime.reformatTime(\"10\"));\n\t\tassertEquals(\"wrong time format\", \"invalid time format\", DateAndTime.reformatTime(\"23564\"));\n\t\t\n\t\t//tested format: time am, time pm\n\t\t//returns in 24 hour format\n\t\tassertEquals(\"pure hour am\", \"0900\", DateAndTime.reformatTime(\"9am\"));\n\t\tassertEquals(\"pure hour pm\", \"2100\", DateAndTime.reformatTime(\"9pm\"));\n\t\tassertEquals(\"minutes will be added in\", \"0932\", DateAndTime.reformatTime(\"932am\"));\n\t\t//invalid minutes will not be processed\n\t\tassertEquals(\"minutes should be max of 59\", \"invalid time format\", DateAndTime.reformatTime(\"999am\"));\n\t\t//invalid hour will not be processed\n\t\tassertEquals(\"hours should be max of 12\", \"invalid time format\", DateAndTime.reformatTime(\"1358am\"));\n\t\t//hours can only be in a range from 1 to 12\n\t\tassertEquals(\"0am is invalid\", \"invalid time format\", DateAndTime.reformatTime(\"0am\"));\n\t\t//formats can include \":\" to separate mins and hours\n\t\tassertEquals(\"semi-colon can be used to separate\", \"0900\", DateAndTime.reformatTime(\"9:00am\"));\n\t\t\n\t\t//tested format: 24 hour format\n\t\tassertEquals(\"valid time format\", \"0000\", DateAndTime.reformatTime(\"0000\"));\n\t\tassertEquals(\"valid time format\", \"1323\", DateAndTime.reformatTime(\"1323\"));\n\t\tassertEquals(\"valid time format\", \"2359\", DateAndTime.reformatTime(\"2359\"));\n\t\t//24 hour format is only from 0000 to 2359\n\t\tassertEquals(\"over time range\", \"invalid time format\", DateAndTime.reformatTime(\"2459\"));\n\t\tassertEquals(\"over time format\", \"invalid time format\", DateAndTime.reformatTime(\"12359\"));\n\t\tassertEquals(\"under time format\", \"invalid time format\", DateAndTime.reformatTime(\"000\"));\n\t}", "private final String getDateTimePattern(String dt, boolean toTime) throws Exception {\n/* 2679 */ int dtLength = (dt != null) ? dt.length() : 0;\n/* */ \n/* 2681 */ if (dtLength >= 8 && dtLength <= 10) {\n/* 2682 */ int dashCount = 0;\n/* 2683 */ boolean isDateOnly = true;\n/* */ \n/* 2685 */ for (int k = 0; k < dtLength; k++) {\n/* 2686 */ char c = dt.charAt(k);\n/* */ \n/* 2688 */ if (!Character.isDigit(c) && c != '-') {\n/* 2689 */ isDateOnly = false;\n/* */ \n/* */ break;\n/* */ } \n/* */ \n/* 2694 */ if (c == '-') {\n/* 2695 */ dashCount++;\n/* */ }\n/* */ } \n/* */ \n/* 2699 */ if (isDateOnly && dashCount == 2) {\n/* 2700 */ return \"yyyy-MM-dd\";\n/* */ }\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* 2707 */ boolean colonsOnly = true;\n/* */ \n/* 2709 */ for (int i = 0; i < dtLength; i++) {\n/* 2710 */ char c = dt.charAt(i);\n/* */ \n/* 2712 */ if (!Character.isDigit(c) && c != ':') {\n/* 2713 */ colonsOnly = false;\n/* */ \n/* */ break;\n/* */ } \n/* */ } \n/* */ \n/* 2719 */ if (colonsOnly) {\n/* 2720 */ return \"HH:mm:ss\";\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 2729 */ StringReader reader = new StringReader(dt + \" \");\n/* 2730 */ ArrayList<Object[]> vec = new ArrayList();\n/* 2731 */ ArrayList<Object[]> vecRemovelist = new ArrayList();\n/* 2732 */ Object[] nv = new Object[3];\n/* */ \n/* 2734 */ nv[0] = Constants.characterValueOf('y');\n/* 2735 */ nv[1] = new StringBuffer();\n/* 2736 */ nv[2] = Constants.integerValueOf(0);\n/* 2737 */ vec.add(nv);\n/* */ \n/* 2739 */ if (toTime) {\n/* 2740 */ nv = new Object[3];\n/* 2741 */ nv[0] = Constants.characterValueOf('h');\n/* 2742 */ nv[1] = new StringBuffer();\n/* 2743 */ nv[2] = Constants.integerValueOf(0);\n/* 2744 */ vec.add(nv);\n/* */ } \n/* */ int z;\n/* 2747 */ while ((z = reader.read()) != -1) {\n/* 2748 */ char separator = (char)z;\n/* 2749 */ int maxvecs = vec.size();\n/* */ \n/* 2751 */ for (int count = 0; count < maxvecs; count++) {\n/* 2752 */ Object[] arrayOfObject = vec.get(count);\n/* 2753 */ int n = ((Integer)arrayOfObject[2]).intValue();\n/* 2754 */ char c = getSuccessor(((Character)arrayOfObject[0]).charValue(), n);\n/* */ \n/* 2756 */ if (!Character.isLetterOrDigit(separator)) {\n/* 2757 */ if (c == ((Character)arrayOfObject[0]).charValue() && c != 'S') {\n/* 2758 */ vecRemovelist.add(arrayOfObject);\n/* */ } else {\n/* 2760 */ ((StringBuffer)arrayOfObject[1]).append(separator);\n/* */ \n/* 2762 */ if (c == 'X' || c == 'Y') {\n/* 2763 */ arrayOfObject[2] = Constants.integerValueOf(4);\n/* */ }\n/* */ } \n/* */ } else {\n/* 2767 */ if (c == 'X') {\n/* 2768 */ c = 'y';\n/* 2769 */ nv = new Object[3];\n/* 2770 */ nv[1] = (new StringBuffer(((StringBuffer)arrayOfObject[1]).toString())).append('M');\n/* */ \n/* 2772 */ nv[0] = Constants.characterValueOf('M');\n/* 2773 */ nv[2] = Constants.integerValueOf(1);\n/* 2774 */ vec.add(nv);\n/* 2775 */ } else if (c == 'Y') {\n/* 2776 */ c = 'M';\n/* 2777 */ nv = new Object[3];\n/* 2778 */ nv[1] = (new StringBuffer(((StringBuffer)arrayOfObject[1]).toString())).append('d');\n/* */ \n/* 2780 */ nv[0] = Constants.characterValueOf('d');\n/* 2781 */ nv[2] = Constants.integerValueOf(1);\n/* 2782 */ vec.add(nv);\n/* */ } \n/* */ \n/* 2785 */ ((StringBuffer)arrayOfObject[1]).append(c);\n/* */ \n/* 2787 */ if (c == ((Character)arrayOfObject[0]).charValue()) {\n/* 2788 */ arrayOfObject[2] = Constants.integerValueOf(n + 1);\n/* */ } else {\n/* 2790 */ arrayOfObject[0] = Constants.characterValueOf(c);\n/* 2791 */ arrayOfObject[2] = Constants.integerValueOf(1);\n/* */ } \n/* */ } \n/* */ } \n/* */ \n/* 2796 */ int k = vecRemovelist.size();\n/* */ \n/* 2798 */ for (int m = 0; m < k; m++) {\n/* 2799 */ Object[] arrayOfObject = vecRemovelist.get(m);\n/* 2800 */ vec.remove(arrayOfObject);\n/* */ } \n/* */ \n/* 2803 */ vecRemovelist.clear();\n/* */ } \n/* */ \n/* 2806 */ int size = vec.size();\n/* */ int j;\n/* 2808 */ for (j = 0; j < size; j++) {\n/* 2809 */ Object[] arrayOfObject = vec.get(j);\n/* 2810 */ char c = ((Character)arrayOfObject[0]).charValue();\n/* 2811 */ int n = ((Integer)arrayOfObject[2]).intValue();\n/* */ \n/* 2813 */ boolean bk = (getSuccessor(c, n) != c);\n/* 2814 */ boolean atEnd = ((c == 's' || c == 'm' || (c == 'h' && toTime)) && bk);\n/* 2815 */ boolean finishesAtDate = (bk && c == 'd' && !toTime);\n/* 2816 */ boolean containsEnd = (((StringBuffer)arrayOfObject[1]).toString().indexOf('W') != -1);\n/* */ \n/* */ \n/* 2819 */ if ((!atEnd && !finishesAtDate) || containsEnd) {\n/* 2820 */ vecRemovelist.add(arrayOfObject);\n/* */ }\n/* */ } \n/* */ \n/* 2824 */ size = vecRemovelist.size();\n/* */ \n/* 2826 */ for (j = 0; j < size; j++) {\n/* 2827 */ vec.remove(vecRemovelist.get(j));\n/* */ }\n/* */ \n/* 2830 */ vecRemovelist.clear();\n/* 2831 */ Object[] v = vec.get(0);\n/* */ \n/* 2833 */ StringBuffer format = (StringBuffer)v[1];\n/* 2834 */ format.setLength(format.length() - 1);\n/* */ \n/* 2836 */ return format.toString();\n/* */ }", "private String formatMeasurementTime(String time){\n Pattern timePredicate = Pattern.compile(\"^(\\\\d{4}-\\\\d{2}-\\\\d{2})[A-Z](\\\\d{2}:\\\\d{2}:\\\\d{2}).*$\");\n String result;\n Matcher matcher = timePredicate.matcher(time);\n if(matcher.find()){\n result = matcher.group(1) + \" \" + matcher.group(2);\n } else result = \"N/A\";\n return result;\n }", "public static void timeConversion(String s) {\n String [] newArr= s.split(\":\");\n if(s.contains(\"AM\")){\n s = s.replace(\"AM\",\"\");\n\n if(Integer.parseInt (newArr[0]) ==12){\n s=newArr[0].replace(\"12\",\"00\");\n }\n }\n\n if(s.contains(\"PM\")) {\n s = s.replace(\"PM\", \"\");\n \n\n\n if(Integer.parseInt (newArr[0]) ==12) {\n s = s;\n\n }else if(Integer.parseInt (newArr[0]) != 12) {\n\n for (int i = 0; i < newArr.length; i++) {\n s = ((Integer.parseInt(newArr[0]) + 12) + \":\" + newArr[1] + \":\" + newArr[i]);\n }\n }\n }\n System.out.println(s);\n\n\n\n\n }", "public String unconvertTime(String toUnconvert)\n {\n String[] newlineSplit = toUnconvert.split(\"\\n\");\n\n //split string to left of newline to get hour and minute\n String[] colonSplit = newlineSplit[0].split(\":\");\n\n //convert hour value into an int\n int hourInt = Integer.valueOf(colonSplit[0]);\n\n //check if first digit of minute is a 0, if so then remove 0\n String minute = colonSplit[1];\n if(minute.charAt(0) == '0')\n minute = minute.substring(1);\n\n\n // amPm will be initialized to 0 or 12 depending on if time is AM or PM and added to hour\n int amPmInt = 0;\n if(newlineSplit[1].equals(\"PM\"))\n amPmInt = 12;\n\n //add amPmInt to hour to unconvert back to 24 hour time\n String hourString = String.valueOf(hourInt+amPmInt);\n\n //if time is 12:00 AM then hourString must be 0\n if(hourInt == 12 && amPmInt == 0)\n hourString = \"0\";\n\n //concatenate hour with : and mnute and\n return hourString + \":\" + minute;\n\n\n }", "public void unsetTimeformat()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(TIMEFORMAT$50, 0);\n }\n }", "public static String convertISO8601DurationToNormalTime(String isoTime)\n {\n String formattedTime = new String();\n\n if (isoTime.contains(\"H\") && isoTime.contains(\"M\") && isoTime.contains(\"S\")) {\n String hours = isoTime.substring(isoTime.indexOf(\"T\") + 1, isoTime.indexOf(\"H\"));\n String minutes = isoTime.substring(isoTime.indexOf(\"H\") + 1, isoTime.indexOf(\"M\"));\n String seconds = isoTime.substring(isoTime.indexOf(\"M\") + 1, isoTime.indexOf(\"S\"));\n formattedTime = hours + \":\" + formatTo2Digits(minutes) + \":\" + formatTo2Digits(seconds);\n } else if (!isoTime.contains(\"H\") && isoTime.contains(\"M\") && isoTime.contains(\"S\")) {\n String minutes = isoTime.substring(isoTime.indexOf(\"T\") + 1, isoTime.indexOf(\"M\"));\n String seconds = isoTime.substring(isoTime.indexOf(\"M\") + 1, isoTime.indexOf(\"S\"));\n formattedTime = minutes + \":\" + formatTo2Digits(seconds);\n } else if (isoTime.contains(\"H\") && !isoTime.contains(\"M\") && isoTime.contains(\"S\")) {\n String hours = isoTime.substring(isoTime.indexOf(\"T\") + 1, isoTime.indexOf(\"H\"));\n String seconds = isoTime.substring(isoTime.indexOf(\"H\") + 1, isoTime.indexOf(\"S\"));\n formattedTime = hours + \":00:\" + formatTo2Digits(seconds);\n } else if (isoTime.contains(\"H\") && isoTime.contains(\"M\") && !isoTime.contains(\"S\")) {\n String hours = isoTime.substring(isoTime.indexOf(\"T\") + 1, isoTime.indexOf(\"H\"));\n String minutes = isoTime.substring(isoTime.indexOf(\"H\") + 1, isoTime.indexOf(\"M\"));\n formattedTime = hours + \":\" + formatTo2Digits(minutes) + \":00\";\n } else if (!isoTime.contains(\"H\") && !isoTime.contains(\"M\") && isoTime.contains(\"S\")) {\n String seconds = isoTime.substring(isoTime.indexOf(\"T\") + 1, isoTime.indexOf(\"S\"));\n formattedTime = \"0:\" + formatTo2Digits(seconds);\n } else if (!isoTime.contains(\"H\") && isoTime.contains(\"M\") && !isoTime.contains(\"S\")) {\n String minutes = isoTime.substring(isoTime.indexOf(\"T\") + 1, isoTime.indexOf(\"M\"));\n formattedTime = minutes + \":00\";\n } else if (isoTime.contains(\"H\") && !isoTime.contains(\"M\") && !isoTime.contains(\"S\")) {\n String hours = isoTime.substring(isoTime.indexOf(\"T\") + 1, isoTime.indexOf(\"H\"));\n formattedTime = hours + \":00:00\";\n }\n\n return formattedTime;\n }", "static String timeConversion(String s) {\n /*\n * Write your code here\n */\n\n StringBuilder hour = new StringBuilder();\n StringBuilder timeOfDay = new StringBuilder(); \n StringBuilder newStr = new StringBuilder(s); \n\n timeOfDay = timeOfDay.append(s.subSequence(s.length()-2,s.length()));\n hour = hour.append(s.subSequence(0,2));\n \n int hr = Integer.parseInt(hour.toString());\n\n String tod = timeOfDay.toString();\n\n System.out.println(hr);\n if(tod.equals(\"AM\")&&hr==12){\n \n newStr = newStr.replace(0,2,\"00\");\n } \n \n\n if(tod.equals(\"PM\")&&hr<12){\n\n hr = hr+12;\n\n newStr = newStr.replace(0,2,String.valueOf(hr));\n }\n\n newStr= newStr.delete(s.length()-2,s.length());\n\n return newStr.toString();\n\n }", "private String changeToTimeOnly(String dateTime) {\n int index = dateTime.indexOf(':');\n if (dateTime.charAt(index - 2) == ' ') {\n dateTime = dateTime.substring(index - 1,dateTime.lastIndexOf(':'));\n } else {\n dateTime = dateTime.substring(index - 2,dateTime.lastIndexOf(':'));\n }\n LOG.log(Level.INFO, \"dateTime is \" + dateTime);\n return dateTime;\n }", "private String formatAsDateTime(String time) {\n\t\t//try to format the input date time.\n\t\tif(time != null) {\n\t\t\ttry { \n\t\t\t\tDate date = getInputSimpleDateFormat().parse(time);\n\t\t\t\ttime = convertToString(date);//now use the output date format to format .\n\t\t\t} catch (ParseException e) {\n\t\t\t\tlogger.error(\"Failed to parse the date value \"+time, e);\n\t\t\t}\n\t\t}\n\t\treturn time;\n\t}", "public static String convertToStandardTime(String tTime) throws FileNotFoundException {\n String newTTime;\n if (tTime.substring(tTime.length() - 2).equals(\"AM\")) {\n newTTime = tTime.replace(\"AM\", \" AM\");\n } else if (tTime.substring(tTime.length() - 2).equals(\"am\")){\n newTTime = tTime.replace(\"am\", \" am\");\n } else if (tTime.substring(tTime.length() - 2).equals(\"PM\")){\n newTTime = tTime.replace(\"PM\", \" PM\");\n }else {\n newTTime = tTime.replace(\"pm\", \" pm\");\n }\n StringTokenizer st = new StringTokenizer(newTTime, \": \");\n int hour = Integer.parseInt(st.nextToken());\n int min = Integer.parseInt(st.nextToken());\n String amPm = st.nextToken();\n String caseamPm = amPm.toUpperCase();\n int sHour;\n String time = \"\";\n //invalid time\n if (min > 59 || min < 0 || hour > 12 || hour <= 0 || tTime.length() <= 6) {\n time = \"invalid time\";\n } else {\n //time that is between 12am and 12:59am (00 to 00:59)\n if (caseamPm.equals(\"AM\") && hour == 12) {\n if (min == 00) {\n time = time + \"00:\" + min + \"0\";\n } else if (min >= 1 && min <= 9) {\n time = time + \"00:0\" + min;\n } else {\n time = time + \"00:\" + min;\n }\n //time that is between 12pm and 12:59pm (12 and 12:59)\n } else if (caseamPm.equals(\"PM\") && hour == 12) {\n if (min == 0) {\n time = time + hour + \":\" + min + \"0\";\n } else if (min >= 1 && min <= 9) {\n time = time + hour + \":0\" + min;\n } else {\n time = time + hour + \":\" + min;\n }\n //time that is between 1am and 11:59am (01 to 11:59)\n } else if (caseamPm.equals(\"AM\") && hour != 12) {\n if (min == 0) {\n time = time + hour + \":\" + min + \"0\";\n } else if (min >= 1 && min <= 9) {\n time = time + hour + \":0\" + min;\n } else {\n time = time + hour + \":\" + min;\n }\n //time that is between 1pm and 11:59pm (13 to 23:59)\n } else if (caseamPm.equals(\"PM\") && hour != 12) {\n sHour = hour + 12;\n if (min == 0) {\n time = time + sHour + \":\" + min + \"0\";\n } else if (min >= 1 && min <= 9) {\n time = time + sHour + \":0\" + min;\n } else {\n time = time + sHour + \":\" + min;\n }\n } else {\n time = \"invaild time\";\n }\n }\n return time;\n }", "static String timeConversion(String s) {\n \t\t String complete = \"\";\n \t\t\tchar [] c_conversion = {};\n \t\t\tc_conversion = s.toCharArray();\n \t\t\tint size = c_conversion.length; \n \t\t\tchar [] receive = {c_conversion[size-2],c_conversion[size-1]};\n \t\t\tString pm = new String(receive);\n \n \n \t\tint counter = 0 ;\n \t\tint [] twelveForYou = new int[2];\n \t\tif(pm.equals(\"PM\")) {\t\t\t\n \t\t\tfor(int i = 0 ; i<2;i++) {\n \t\t\tcounter += Character.getNumericValue(c_conversion[i]); \n \t\t\ttwelveForYou[i] = Character.getNumericValue(c_conversion[i]); \n \t\t\tc_conversion[i] = ' ';\n \t\t\t}\n \t\t\t\n \t\t\tif(twelveForYou[0] != 1 ||twelveForYou[1] != 2) {\n \t\t\t\t\n \t\t\t\tif(twelveForYou[0] == 1 && twelveForYou[1] ==1) {\n \t\t\t\t\tcounter = 23;\n \t\t\t\t\tString appender = new String(c_conversion);\n \t\t\t\t\tappender = appender.replace(\" \",\"\");\n \t\t\t\t\tappender = appender.replace(\"PM\",\"\");\n \t\t\t\t\tcomplete = Integer.toString(counter) + appender; \t\n\n \t\t\t\t}else {\n \t\t\t\t//se != 1 e !=2\n \t\t\tcounter+=12;\n \t\t\tString append = new String(c_conversion);\n \t\t\tappend = append.replace(\" \",\"\");\n \t\t\tappend = append.replace(\"PM\",\"\");\n \t\t\tString number = Integer.toString(counter); \t\t\n \t\t\t complete = number + append;\n \t\t\t\t}}else {\n \t\t\t\tcomplete = s;\n \t\t\t\tcomplete = complete.replace(\"AM\",\"\");\n \t \t\t\tcomplete = complete.replace(\"PM\",\"\");\t\t\n \t\t\t}\n \t\t}else {\n \t\t\tcomplete = s;\n \t\t\tcomplete = complete.replace(\"AM\",\"\");\n \t\t\tcomplete = complete.replace(\"PM\",\"\");\n \t\t\tcomplete = complete.replace(\"12\",\"00\");\n \t\t\t\n \t\t\t}\n \t\t\n \t\treturn complete;\n\n }", "static void timesLine(Course input, Elements columns)\n {\n \tString hold = columns.get(0).text();\n \t\n \tString hours = hold.replaceAll(\"[^\\\\d+]\", \"\");\n \tString meetTime = hold.replaceAll(\"[^(MTWRF)]+\", \"\");\n \tString stTime = input.courseInfo.get(\"start_time\");\n \tString enTime = input.courseInfo.get(\"end_time\");\n \t\n \tif(hold.contains(\"TBA\"))\n \t{\n \t\tinput.courseInfo.put(\"description\", input.courseInfo.get(\"description\") + \"|Note: No class/lab times at time of last update\");\n \t} else if (!hold.matches(\"[MTWRF]+(\\\\s)[0-9]+:.*\")) {\n \t\tinput.courseInfo.put(\"description\", input.courseInfo.get(\"description\") + \"|Nonstandard class time: \" + hold);\n \t\t//dealing with am/pm\n \t} else if (hold.contains(\"am\")) {\n \t\tinput.courseInfo.put(\"start_time\", stTime == null ? hours.substring(0, 4) : stTime + \" \" + hours.substring(0, 4));\n \tinput.courseInfo.put(\"end_time\", enTime == null ? hours.substring(4) : enTime + \" \" + hours.substring(4));\n \t} else {\n \t\t//the extra if-else statements here are for times in the 12 pm block\n \t\tif(Integer.parseInt(hours.substring(0, 4)) >= 1200)\n \t\t\tinput.courseInfo.put(\"start_time\", stTime == null ? hours.substring(0, 4) : stTime + \" \" + hours.substring(0, 4));\n \t\telse\n \t\t\tinput.courseInfo.put(\"start_time\", stTime == null ? String.valueOf(1200 + Integer.parseInt(hours.substring(0, 4))) : stTime + \" \" + String.valueOf(1200 + Integer.parseInt(hours.substring(0, 4))));\n \t\t\n \t\tif(Integer.parseInt(hours.substring(4)) >= 1200)\n \t\t\tinput.courseInfo.put(\"end_time\", enTime == null ? hours.substring(4) : enTime + \" \" + hours.substring(4));\n \t\telse\n \t\t\tinput.courseInfo.put(\"end_time\", stTime == null ? String.valueOf(1200 + Integer.parseInt(hours.substring(4))) : enTime + \" \" + String.valueOf(1200 + Integer.parseInt(hours.substring(4))));\n \t}\n \t\n \tString meet = input.courseInfo.get(\"meet_times\");\n \tif(meetTime != null && meetTime != \"\");\n \t\tinput.courseInfo.put(\"meet_times\", meet == null ? hold.replaceAll(\"[^(MTWRFS)]+\", \"\") : meet + \" \" + hold.replaceAll(\"[^(MTWRFS)]+\", \"\"));\n \t\n \tString curBuild = input.courseInfo.get(\"building\");\n \tinput.courseInfo.put(\"building\", curBuild == null ? columns.get(1).text() : input.courseInfo.get(\"building\") + \" \" + columns.get(1).text());\n \t\n \t//extra things that might not occur on all lines\n \t// -credits will be in every course but will not appear on a line for extra meetings\n \t// -extra charges may or may not be in a course\n \tif(columns.size() >= 3) {\n \t\tif(columns.get(2).text().contains(\"-\"))\n \t\t\tinput.courseInfo.put(\"description\", input.courseInfo.get(\"description\") + \" |Note: Credit value is variable, ranging from \" + columns.get(2).text());\n \t\telse\n \t\t\tinput.courseInfo.put(\"credits\", columns.get(2).text().replaceAll(\"[^\\\\d+]\", \"\"));\n \t}\n \t\n \tif (columns.size() == 4)\n \t\tinput.courseInfo.put(\"extra_charges\", columns.get(3).text());\t\n }", "public void time_format(View v){}", "public static String formatDateStr2ToOtherStr(String time) {\n\tString reTime = \"\";\n\ttry {\n\t reTime = dateFormat.format(dateFormat_2.parse(time));\n\t} catch (ParseException e) {\n\t}\n\treturn reTime;\n }", "private void parseClockDateFormats() {\n String[] dateEntries = getResources().getStringArray(R.array.status_bar_date_format_entries_values);\n CharSequence parsedDateEntries[];\n parsedDateEntries = new String[dateEntries.length];\n Date now = new Date();\n int lastEntry = dateEntries.length - 1;\n for (int i = 0; i < dateEntries.length; i++) {\n if (i == lastEntry) {\n parsedDateEntries[i] = dateEntries[i];\n } else {\n String newDate;\n CharSequence dateString = DateFormat.format(dateEntries[i], now);\n newDate = dateString.toString().toLowerCase();\n parsedDateEntries[i] = newDate;\n }\n }\n mStatusBarDateFormat.setEntries(parsedDateEntries);\n }", "private void descifrarDuration(){\n\t\t\n\t\t Pattern mask=Pattern.compile(\"^P([0-9]+Y){0,1}([0-9]+M){0,1}([0-9]+D){0,1}(T([0-9]+H){0,1}([0-9]+M){0,1}([0-9]+(.[0-9]+){0,1}S){0,1}){0,1}$\"); //ejm ee-zz\n\t\t Matcher matcher = mask.matcher(duracion);\n\t\t boolean correcto = matcher.matches();\n\t\t\n\t\tif(duracion != null && !duracion.equals(\"\") && correcto && !duracion.equals(\"P\") && !duracion.equals(\"PT\")){\n\t\t\t//duracionAux = [yY][mM][dD][T[hH][nM][s[.s]S]]\n\t\t\tString duracionAux= duracion.substring(1, duracion.length());\n\t\t\tint posiT = duracionAux.indexOf(\"T\");\n\t\t\t//duracionParteT = [hH][nM][s[.s]S]\n\t\t\tif (posiT < 0)\n\t\t\t\tposiT = duracionAux.length();\n\t\t\telse \n\t\t\t{\n\t\t\t\t//duracionParteT = [hH][nM][s[.s]S]\n\t\t\t\tString duracionParteT=duracionAux.substring(posiT+1,duracionAux.length());\n\t\t\t\tint posiH=duracionParteT.indexOf(\"H\");\n\t\t\t\tif (posiH > -1)\n\t\t\t\t\thoras = duracionParteT.substring(0, posiH);\n\t\t\t\t//duracionParteT = [nM][s[.s]S]\n\t\t\t\tduracionParteT = duracionParteT.substring(posiH+1, duracionParteT.length());\n\t\t\t\tint posiMi=duracionParteT.indexOf(\"M\");\n\t\t\t\tif(posiMi > -1)\n\t\t\t\t\tminutos= duracionParteT.substring(0,posiMi);\n\t\t\t\t//duracionParteT = [s[.s]S]\n\t\t\t\tduracionParteT = duracionParteT.substring(posiMi+1, duracionParteT.length());\n\t\t\t\tint posiPunto = duracionParteT.indexOf(\".\");\n\t\t\t\tint posiS = duracionParteT.indexOf(\"S\");\n\t\t\t\tif(posiS>-1){\n\t\t\t\t\tif (posiPunto < 0 && !duracionParteT.equals(\"\"))\n\t\t\t\t\t\tsegundosP1 = duracionParteT.substring(0, duracionParteT.length()-1);\n\t\t\t\t\telse{\n\t\t\t\t\t\tsegundosP1 = duracionParteT.substring(0, posiPunto);\n\t\t\t\t\t\tsegundosP2 = duracionParteT.substring(posiPunto+1, duracionParteT.length()-1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t//duracionResto = [yY][mM][dD]\n\t\t\tString duracionResto=duracionAux.substring(0,posiT);\n\t\t\tint posiY=duracionResto.indexOf(\"Y\");\n\t\t\tif (posiY > -1)\n\t\t\t\tanyos=duracionResto.substring(0,posiY);\n\t\t\t//duracionResto = [mM][dD]\n\t\t\tduracionResto= duracionResto.substring(posiY+1,duracionResto.length());\n\t\t\tint posiM= duracionResto.indexOf(\"M\");\n\t\t\tif (posiM > -1)\n\t\t\t\tmeses=duracionResto.substring(0,posiM);\n\t\t\t//duracionResto = [dD]\n\t\t\tduracionResto = duracionResto.substring(posiM+1,duracionResto.length());\n\t\t\tint posiD= duracionResto.indexOf(\"D\");\n\t\t\tif (posiD > -1)\n\t\t\tdias=duracionResto.substring(0,duracionResto.length()-1);\t\n\t\t}\n\t\telse {\n\t\t\tanyos=\"\";meses=\"\";dias=\"\";horas=\"\";minutos=\"\";segundosP1=\"\";segundosP2=\"\";\n\t\t}\n\t}", "static String formatTime(Date t)\n {\n SimpleDateFormat timeFormat = new SimpleDateFormat(\"hh:mma\");\n SimpleDateFormat timeFormat2 = new SimpleDateFormat(\"hh:mm\");\n String timeString = timeFormat.format(t);\n\n if (timeString.endsWith(\"AM\"))\n timeString = timeFormat2.format(t) + \"a\";\n else\n timeString = timeFormat2.format(t) + \"p\";\n\n return timeString;\n }", "public static String convertTimeFormat(String time, String format1, String format2) {\n SimpleDateFormat sf = new SimpleDateFormat(format1, Locale.ENGLISH);\n sf.setLenient(true);\n String output = \"\";\n try {\n if (format2.equals(\"relative\")) {\n // Get relative time ago\n long dateMillis = sf.parse(time).getTime();\n output = DateUtils.getRelativeTimeSpanString(dateMillis,\n System.currentTimeMillis(), DateUtils.SECOND_IN_MILLIS).toString();\n\n // Do some shortening\n if (output.equals(\"Yesterday\")) output = \"1d\";\n if (output.contains(\" hour\")) {\n output = output.substring(0, output.indexOf(\" hour\")) + \"h\";\n } else if (output.contains(\" minute\")) {\n output = output.substring(0, output.indexOf(\" minute\")) + \"m\";\n } else if (output.contains(\" day\")) {\n output = output.substring(0, output.indexOf(\" day\")) + \"d\";\n } else if (output.contains(\" second\")) {\n output = output.substring(0, output.indexOf(\" second\")) + \"s\";\n }\n } else {\n // Get string in desired format ex. \"hh:mm MM/dd/yy\"\n SimpleDateFormat sf2 = new SimpleDateFormat(format2, Locale.ENGLISH);\n sf2.setLenient(true);\n Date date = sf.parse(time);\n output = sf2.format(date);\n }\n } catch (ParseException e) {\n Log.e(\"TAG\", \"Error in time format conversion\", e);\n }\n return output;\n }", "@org.junit.Test\n public void formatDateTime013s() {\n final XQuery query = new XQuery(\n \"format-dateTime($t, '[f,2-2]')\",\n ctx);\n try {\n query.bind(\"t\", new XQuery(\"xs:dateTime('0985-03-01T09:15:06.456')\", ctx).value());\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n assertStringValue(false, \"46\")\n );\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
public static String getPassword(String to) { String pass=null; String sql = "select password from users where emailid = ?"; Connection con = Provider.getConnection(); try { PreparedStatement pst = con.prepareStatement(sql); pst.setString(1, to); ResultSet rs = pst.executeQuery(); if(rs.next()) pass=rs.getString(1); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return pass; }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void classement() {\n\t\t\t\n\t\t}", "@Override\r\n public void publicando() {\n }", "@Override\n\tpublic void tyre() {\n\t\t\n\t}", "@Override\n \tpublic void init() {\n \n \t}", "private static void EX5() {\n\t\t\r\n\t}", "protected void method_5557() {}", "@Override\n\tpublic void cafeteria() {\n\t\t\n\t}", "@Override\r\n\tpublic void preco() {\n\r\n\t}", "@Override\r\n\tpublic void jugar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void limpar() {\n\t\t\r\n\t}", "public void mo5201a() {\n }", "@Override\n\tpublic void annuler() {\n\n\t}", "@Override\r\n\tpublic void zwroc() {\n\t\t\r\n\t}", "@Override\n\t\tprotected void swop() {\n\n\t\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
getFrameworkNames Returns the list of Framework Names.
@Override public ArrayList<String> getFrameworkNames() { ArrayList<String> names = new ArrayList<>(); for(Framework framework : frameworks) { names.add(framework.getName()); } return names; }
[ "public java.util.List<org.apache.mesos.v1.master.Protos.Response.GetFrameworks.Framework> getFrameworksList() {\n return frameworks_;\n }", "public java.util.List<? extends org.apache.mesos.v1.master.Protos.Response.GetFrameworks.FrameworkOrBuilder> \n getFrameworksOrBuilderList() {\n return frameworks_;\n }", "public java.util.List<? extends org.apache.mesos.v1.master.Protos.Response.GetFrameworks.FrameworkOrBuilder> \n getCompletedFrameworksOrBuilderList() {\n if (completedFrameworksBuilder_ != null) {\n return completedFrameworksBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(completedFrameworks_);\n }\n }", "public org.apache.mesos.v1.master.Protos.Response.GetFrameworks.Framework getFrameworks(int index) {\n if (frameworksBuilder_ == null) {\n return frameworks_.get(index);\n } else {\n return frameworksBuilder_.getMessage(index);\n }\n }", "@CheckForNull\n public String getFrameworksString() {\n return this.frameworks;\n }", "public org.apache.mesos.v1.master.Protos.Response.GetFrameworks.FrameworkOrBuilder getFrameworksOrBuilder(\n int index) {\n if (frameworksBuilder_ == null) {\n return frameworks_.get(index); } else {\n return frameworksBuilder_.getMessageOrBuilder(index);\n }\n }", "public org.apache.mesos.v1.master.Protos.Response.GetFrameworks.Framework getCompletedFrameworks(int index) {\n if (completedFrameworksBuilder_ == null) {\n return completedFrameworks_.get(index);\n } else {\n return completedFrameworksBuilder_.getMessage(index);\n }\n }", "public org.apache.mesos.v1.master.Protos.Response.GetFrameworksOrBuilder getGetFrameworksOrBuilder() {\n if (getFrameworksBuilder_ != null) {\n return getFrameworksBuilder_.getMessageOrBuilder();\n } else {\n return getFrameworks_;\n }\n }", "org.apache.mesos.v1.master.Protos.Response.GetFrameworks.Framework getCompletedFrameworks(int index);", "private void loadCurrentFrameworks() {\n List frameworks = WebFrameworks.getFrameworks();\n WebModule webModule = project.getAPIWebModule();\n List<WebFrameworkProvider> list = new LinkedList<WebFrameworkProvider>();\n if (frameworks != null & webModule != null) {\n for (int i = 0; i < frameworks.size(); i++) {\n WebFrameworkProvider framework = (WebFrameworkProvider) frameworks.get(i);\n if (framework.isInWebModule(webModule)) {\n list.add(framework);\n }\n }\n }\n currentFrameworks = list;\n }", "public Set<String> classLoaderNames()\n {\n return wrappedProvider.classLoaderNames();\n }", "public String getTargetFrameworkType() {\n\t\tString s = getFrameorkAndReleaseString();\n\t\tif (s.startsWith(\"mono\")) return FRAMEWORK_MONO;\n\t\tif (s.startsWith(\"net\")) return FRAMEWORK_MS;\n\t\treturn FRAMEWORK_NA;\n\t}", "public String[] getToolNames() {\n List<String> ret = resolver.getToolNames();\n return ret.toArray(new String[ret.size()]);\n }", "public static String[] getFeatureTypeNames(){\n final FeatureType[] types = FeatureType.values();\n final String[] names = new String[types.length];\n for(int i = 0; i < types.length; i++){\n names[i] = types[i].getName();\n }\n return names;\n }", "Set<String> getClassNames();", "List<String> getRequiredCoreExtensions();", "public String[] getToolNames()\n {\n List<String> result = new ArrayList<String>( this.tools.keySet() );\n // Make sure we've got a predictable order of names...\n Collections.sort( result );\n\n return result.toArray( new String[result.size()] );\n }", "public abstract String[] getSystemSharedLibraryNames();", "public Set<String> getAllTypeNames(String[] extensions);", "public List<String> getNameList() {\n return Arrays.asList(new String[]{\"SceneVideo\", \"SceneGallery\", \"SceneCamera\"});\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO: Rename method, update argument and hook method into UI event
public void onButtonPressed(Uri uri) { if (mListener != null) { mListener.onFragmentInteraction(uri); } }
[ "@Override\n public void event() { }", "@Override\n public void event() {\n }", "@Override\n\tprotected void onGuiEvent(GuiEvent arg0) {\n\t\t\n\t}", "@Override\n\t\t\t\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}", "@Override\n\t public void handle(ActionEvent event) {\n\t }", "@Override\n\tpublic void handle(ActionEvent event) {}", "@Override\n public void handle(ActionEvent event) {\n\n }", "@Override\n\tprotected void UpdateUI() {\n\t}", "@Override\n public void getClick() {\n }", "@Override\n public void actionPerformed(ActionEvent evt) {\n }", "public boolean handleUIEvent(Parameter[] params);", "@Override\n public void run() {\n listenerUI.access(new Runnable() {\n @Override\n public void run() {\n listener.valueChange(event);\n }\n });\n }", "@Override\n public void handle(ActionEvent actionEvent) {\n }", "@Override\r\n\t\t\t\t\tpublic void onActionEvent(QQActionEvent event) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "protected abstract void handleActionPerformed(ActionEvent event, Application app);", "@Override\n\t\t\tpublic void actionPerformed( ActionEvent e)\n\t\t\t{\n\t\t\t}", "public void valueHasChanged(ToolArgument arg) {\r\n\t\tif (internalFrame == null) {\r\n\t\t\t// if the internal frame is null, the tool was called from the\r\n\t\t\t// commandline\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t}", "@Override\n public void update(Observable o, Object arg) {\n if (arg != null) {\n JOptionPane.showMessageDialog(null, arg);\n }\n }", "private void updateUI(){\n }", "@Override\n public void actionPerformed(ActionEvent ae) {\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor for Calculator class
public Calculator() { this.total = 0; // not needed - included for clarity this.history = "0"; // initialize history string starting from "0" }
[ "public Calculator () {\r\n\t\t\r\n\t\ttotal = 0; // not needed - included for clarity\r\n\t}", "public Calculator() {\r\n\t\ttotal = 0; // not needed - included for clarity\r\n\t\thistory = \"\";\r\n\t}", "private Calc() {\r\n }", "public Calculator() {\n\n\t\t// A panel for the display that shows calculation\n\t\tPanel panelDisplay = new Panel(new FlowLayout());\n\t\tdisplay = new TextField(\"0\", 20);\n\t\tpanelDisplay.add(display);\n\n\t\t// A panel that contains digits 0 - 9 in grid formation and a 'c' button to reset to 0\n\t\tPanel panelButtons = new Panel(new GridLayout(4, 3));\n\t\tdigits = new Button[10];\n\n\t\t// Initializing digits 1 - 9 as buttons and adding this class as action listener\n\t\tfor (int i = 1; i < 10; i++) {\n\n\t\t\tdigits[i] = new Button(i + \"\");\n\t\t\tdigits[i].addActionListener(this);\n\t\t\tpanelButtons.add(digits[i]);\n\t\t}\n\n\t\t// Initializing button 0 and adding this class as action listener\n\t\t\tdigits[0] = new Button(\"0\");\n\t\t\tdigits[0].addActionListener(this);\n\t\t\tpanelButtons.add(digits[0]);\n\n\t\t// Initializing reset button\n\t\treset = new Button(\"c\");\n\t\tpanelButtons.add(reset);\n\t\t\n\t\t// Creating an inner anonymous class as action listener for 'reset'.\n\t\treset.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\n\t\t\t\toperation = \"0\";\n\t\t\t\tdisplay.setText(operation); // resets display to 0\n\t\t\t}\n\t\t});\n\n\t\t// Initializing decimal point button\n\t\tpoint = new Button(\".\");\n\t\tpanelButtons.add(point);\n\n\t\t// Creating an inner anonymous class as action listener for 'point'.\n\t\tpoint.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\n\t\t\t\t\toperation += \".\";\n\t\t\t\t\tdisplay.setText(operation);\n\t\t\t}\n\t\t});\n\n\t\t// A panel for all operands +,-,*,/,= in grid formation\n\t\tPanel panelOperands = new Panel(new GridLayout(5, 1));\n\t\toperands = new Button[5];\n\n\t\t// Initializing all operands as buttons and adding an anonymous class as action listener\n\t\toperands[0] = new Button(\"+\");\n\t\tpanelOperands.add(operands[0]);\n\t\toperands[0].addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\n\t\t\t\tif (!operation.equals(\"0\")) { // accounting for display initially 0\n\t\t\t\t\toperation+=\"+\";\n\t\t\t\t\tdisplay.setText(operation);\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\toperation = \"+\";\n\t\t\t\t\tdisplay.setText(operation);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\toperands[1] = new Button(\"-\");\n\t\tpanelOperands.add(operands[1]);\n\t\toperands[1].addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\n\t\t\t\tif (!operation.equals(\"0\")) {\n\t\t\t\t\toperation+=\"-\";\n\t\t\t\t\tdisplay.setText(operation);\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\toperation = \"-\";\n\t\t\t\t\tdisplay.setText(operation);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\toperands[2] = new Button(\"*\");\n\t\tpanelOperands.add(operands[2]);\n\t\toperands[2].addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\n\t\t\t\tif (!operation.equals(\"0\")) {\n\t\t\t\t\toperation+=\"*\";\n\t\t\t\t\tdisplay.setText(operation);\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\toperation = \"*\";\n\t\t\t\t\tdisplay.setText(operation);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\toperands[3] = new Button(\"/\");\n\t\tpanelOperands.add(operands[3]);\n\t\toperands[3].addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\n\t\t\t\tif (!operation.equals(\"0\")) {\n\t\t\t\t\toperation+=\"/\";\n\t\t\t\t\tdisplay.setText(operation);\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\toperation = \"/\";\n\t\t\t\t\tdisplay.setText(operation);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\toperands[4] = new Button(\"=\");\n\t\tpanelOperands.add(operands[4]);\n\t\toperands[4].addActionListener(new OperationListener());\n\n\t\t// Add anonymous instance of inner class that extends WindowAdapter\n\t\taddWindowListener(new WindowAdapter() {\n\t\t\t@Override\n\t\t\tpublic void windowClosing(WindowEvent evt) {\n\n\t\t\t\tSystem.exit(0); // close the program\n\t\t\t}\n\t\t});\n\n\t\tsetLayout(new BorderLayout()); // \"super\" Frame sets layout to border style\n\t\t// Arrange all panels in frame\n\t\tadd(panelDisplay, BorderLayout.NORTH);\n\t\tadd(panelButtons, BorderLayout.WEST);\n\t\tadd(panelOperands, BorderLayout.EAST);\n\n\t\tsetTitle(\"Simple Calculator\");\n\t\tsetSize(300, 350);\n\t\tsetVisible(true);\n\t}", "private CalculatorHelper() {\n }", "public Calculator1() {\n initComponents();\n }", "public Calculator( String name ) { \n gui = new CalcGui( this, name ); \n }", "public ExpressionCalculator() {\n\t\texpression = \"\";\n\t\tresult = 0;\n\t\tiStack = new MyStack<Integer>();\n\t\toStack = new MyStack<Character>();\n\t}", "public CalculationResult() {\n // Empty\n }", "public scientific_calculator() {\n initComponents();\n }", "public CalculatorModel(){\n\t\tfirstOperand = null;\n\t\tsecondOperand = null;\n\t\toperation = null;\n\t\terrorState = false;\n\t\tprecisionMode = DOUBLEPRECISION;\n\t\tcurrentState = FIRSTOPERAND;\n\t\tmode = FLOAT;\n\t}", "private Calc() {\n this.current = 0; // because every calc shows 0 at the begining :)\n this.action = \"+\"; // because if you press number on a fresh calc, it show your number\n this.input = new Scanner(System.in); // new Scanner object with input stream\n this.input.useLocale( Locale.US ); // used to help Scanner read floating numbers separated with '.' (dot)\n this.actions = \"+-*/\"; // all possible math operators\n\n\n }", "public B6_Calculator() {\n initComponents();\n }", "public CalculatorBean() {\n\t\tSystem.out.println(\"in bean constr\");\n\t}", "CountCalculator(){\n super();\n }", "public SnowCoverCalculator()\n\t{\n\t\tsuper();\n\t}", "public CalculatorController() {\n\n\t}", "private DSPStaticCalculator( ) {\r\n super();\r\n }", "protected CalculatorBrain() {\n // initialize variables upon start\n mOperand = 0;\n mWaitingOperand = 0;\n mWaitingOperator = \"\";\n mCalculatorMemory = 0;\n }", "public Calculator(boolean logging) {\n this(); // ruft den Konstruktor ohne Argumente auf\n this.logging = logging;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Invoice transaction listener class
public interface OnInvoicesRequested { void OnRequestStarted(); void OnTransactionSuccessful(ArrayList<Invoice> invoices); void OnNoInvoicesFound(); }
[ "@Override\n public void publishInvoiceTransactionEvent(Transaction transaction) {\n invoiceTransactionPublisherConnector.doCall(\n transaction, simpleEventRequestTransformer, simpleEventResponseTransformer);\n }", "public void prepareInvoice();", "void onTransactionStarted();", "public interface OnTransactionSelectedListener {\n void onSelectTransaction(SalesTransaction transaction);\n\n Customer getCustomer(long id);\n}", "public interface TransactionListener {\n\t\n\t/**\n\t * Invoked when a pair reports a new transaction.\n\t * \n\t * @param tx Transaction\n\t * @param conn {@link bitcoinlistener.BitcoinConnection}\n\t */\n\tvoid onTransaction(TxMessage tx, BitcoinConnection conn);\n}", "protected void addInvoiceMessages() {\n }", "Long saveInvoice(Invoice inv);", "public void notifyGroundOperations (CustomsReceipt customsReceipt){\n\n }", "public static void prosesInsertAgingInvoice(LimbahTransaction limbahTransaction, Gl gl) {\n try {\n if (limbahTransaction.getOID() != 0) {\n ARInvoice aRInvoice = new ARInvoice();\n aRInvoice.setCustomerId(limbahTransaction.getCustomerId());\n aRInvoice.setDate(limbahTransaction.getTransactionDate());\n aRInvoice.setDueDate(limbahTransaction.getDueDate());\n aRInvoice.setInvoiceNumber(limbahTransaction.getInvoiceNumber());\n aRInvoice.setTransDate(limbahTransaction.getTransactionDate());\n aRInvoice.setProjectId(limbahTransaction.getOID());\n\n aRInvoice.setJournalCounter(gl.getJournalCounter());\n aRInvoice.setJournalNumber(gl.getJournalNumber());\n aRInvoice.setJournalPrefix(gl.getJournalPrefix());\n aRInvoice.setCurrencyId(gl.getCurrencyId());\n aRInvoice.setMemo(gl.getMemo());\n aRInvoice.setOperatorId(gl.getOperatorId());\n\n // proses perhitungan totalnya \n double tot = limbahTransaction.getBulanIni() - limbahTransaction.getBulanLalu();\n double percent = limbahTransaction.getPercentageUsed();\n tot = tot * percent / 100;\n tot = tot * limbahTransaction.getHarga();\n\n Limbah limbah = DbLimbah.fetchExc(limbahTransaction.getMasterLimbahId());\n\n double ppnPercentValue = (tot * limbah.getPpnPercent()) / 100;\n aRInvoice.setVatAmount(ppnPercentValue);\n aRInvoice.setVatPercent(limbah.getPpnPercent());\n\n tot = tot + ppnPercentValue;\n aRInvoice.setTotal(tot);\n\n //aRInvoice.setMemo(\"Invoice for limbah trans. number: \"+\n //limbahTransaction.getInvoiceNumber()+\", date : \"+JSPFormater.formatDate(limbahTransaction.getTransactionDate(),\"dd-MMM-yyyy\"));\n\n System.out.println(\"*** insert receivable limbah : \" + limbahTransaction.getInvoiceNumber());\n long oid = DbARInvoice.insertExc(aRInvoice);\n System.out.println(\"*** status: \" + oid);\n\n // proses insert ar invoice detail\n ARInvoiceDetail aRInvoiceDetail = new ARInvoiceDetail();\n aRInvoiceDetail.setArInvoiceId(oid);\n aRInvoiceDetail.setPrice(tot);\n aRInvoiceDetail.setQty(1);\n aRInvoiceDetail.setTotalAmount(tot);\n aRInvoiceDetail.setDiscount(0);\n aRInvoiceDetail.setItemName(aRInvoice.getMemo());\n try {\n DbARInvoiceDetail.insertExc(aRInvoiceDetail);\n } catch (Exception axc) {\n }\n }\n } catch (Exception e) {\n System.out.println(e);\n }\n }", "private void makePayment(Invoice invoice) throws Exception {\n try (TenMinutEmailService email = new TenMinutEmailService()) {\n\n String emailAddress = email.getNewEmailAddress();\n logger.info(\"email address is \" + emailAddress);\n invoice.setReceiptEmail(emailAddress);\n // create invoice\n try (EssentialSession es = new EssentialSession()) {\n String invoiceNumber = es.createInvoice(invoice);\n logger.info(\"invoice number is \" + invoiceNumber);\n invoice.setInvoiceNumber(invoiceNumber);\n // get invoice email and open invoice to pay\n invoice.setInvoiceLink(email.getInvoiceLink());\n logger.info(\"online invoice link is \" + invoice.getInvoiceLink());\n\n try (IPayment payment = getPayement(invoice)) {\n\n payment.payInvoice(invoice);\n logger.info(\"invoice payment is made\");\n }\n // check invoice status\n es.verifyInvoiceStatus(invoiceNumber, \"Paid\");\n }\n }\n }", "public interface InquiryOrderListener {\n void onGotOrderInfo(PayParams payParams);\n}", "private void invoice(String theRequest) throws Exception {\r\n XMLUtil.printHeading(\"Invoice Request\");\r\n String trackingNumber = null;\r\n RequestInfo info = null;\r\n String request = null;\r\n \r\n if(theRequest != null && theRequest.contains(\"<ACXInvoiceRequest>\"))\r\n request = theRequest;\r\n else {\r\n request = templateReader.readTemplate(\"ACXInvoiceRequest\");\r\n\r\n Document document = XMLUtil.createDocument(request);\r\n Node root = document.getDocumentElement();\r\n NodeList nodes = root.getChildNodes();\r\n for (int i = 0; i < nodes.getLength(); i++) {\r\n Node node = nodes.item(i);\r\n String nodeName = node.getNodeName();\r\n if (\"Envelope\".equals(nodeName)) {\r\n XMLUtil.setTagValue(document, node, \"BuyPartnerID\", buyPartnerId); \r\n } else if (\"RequestRouter\".equals(nodeName)) {\r\n // Add value for SellPartnerID\r\n XMLUtil.setTagValue(document, node, \"SellPartnerID\", sellPartnerId);\r\n // Add value for CustNum\r\n XMLUtil.setTagValue(document, node, \"CustNum\", accountNumber);\r\n } else if (\"InvoiceRequest\".equals(nodeName)) {\r\n // Add value for ID\r\n XMLUtil.setTagValue(document, node, \"ID\", \"0\");\r\n // Add wildcard value for PONumber\r\n XMLUtil.setTagValue(document, node, \"PONumber\", \"*\");\r\n }\r\n }\r\n request = XMLUtil.documentToString(document);\r\n }\r\n XMLUtil.printXML(\"Invoice Request:\", request);\r\n\r\n \r\n try {\r\n // Query the part(s)\r\n String xmlResponse = partOrderManager.invoiceRequest(request);\r\n info = partOrderManager.getRequestInfo();\r\n XMLUtil.printXML(\"Invoice Response:\", XMLUtil.prettifyString(xmlResponse));\r\n\r\n System.out.println(\"ACXTrackNum: \" + info.getTrackNum());\r\n System.out.println(\" Total time: \" + info.getTotalTime() + \" millis\");\r\n System.out.println(\" Gateway access: \" + info.getGatewayAccessTime());\r\n System.out.println(\" SDK overhead: \" + (info.getTotalTime() - info.getGatewayAccessTime()));\r\n System.out.println();\r\n writeResult(info, \"invoice\"/*testcase*/, \"BrokerID Unknown\", accountNumber/*Account*/);\r\n } catch (Exception e) {\r\n info = partOrderManager.getRequestInfo();\r\n writeResult(info, \"invoice\"/*testcase*/, \"BrokerID Unknown\", accountNumber/*Account*/);\r\n\r\n System.out.println(\"invoice() caught Exception: \" + e);\r\n System.out.println(\"ACXTrackNum: \" + info.getTrackNum());\r\n System.out.println(\" Total time: \" + info.getTotalTime() + \" millis\");\r\n System.out.println(\" Gateway access: \" + info.getGatewayAccessTime());\r\n System.out.println(\" SDK overhead: \" + (info.getTotalTime() - info.getGatewayAccessTime()));\r\n System.out.println();\r\n \r\n }\r\n }", "public interface OrderBookListener extends EventListener\n{\n /**\n * Called when trade event occurred in order book.\n * \n * @param event trade event\n */\n public void onTrade (OrderBookTradeEvent event);\n \n /**\n * Called when quote event occurred in order book.\n * \n * @param event quote event.\n */\n public void onQuote (OrderBookQuoteEvent event);\n}", "void notifyOfCommit(SpiTransaction transaction);", "@Override\n public void OnSubscribe_SSEL2_Transaction(SSEL2_Transaction[] arg0) {\n \n }", "@Override\n public void OnSubscribe_SZSEL2_Transaction(SZSEL2_Transaction[] arg0) {\n \n }", "void startReceipt();", "static void addReceiptToDB(Receipt receipt){\n\n }", "void sendEmailForOneInvoice(long invoiceId);", "public interface IPaymentListener extends EventListener\n{\n\t/**\n\t * The AI has signaled that the current cascade has to be payed for.\n\t * @param acc PayAccount\n\t */\n\tint accountCertRequested(MixCascade a_connectedCascade);\n\n\t/**\n\t * The AI has signaled an error.\n\t * @param acc PayAccount\n\t * @param a_bIgnore do not force a user reaction\n\t */\n\tvoid accountError(XMLErrorMessage msg, boolean a_bIgnore);\n\n\t/**\n\t * The active account changed.\n\t * @param acc PayAccount the account which is becoming active\n\t */\n\tvoid accountActivated(PayAccount acc);\n\n\t/**\n\t * An account was removed\n\t * @param acc PayAccount the account which was removed\n\t */\n\tvoid accountRemoved(PayAccount acc);\n\n\t/**\n\t * An account was added\n\t * @param acc PayAccount the new Account\n\t */\n\tvoid accountAdded(PayAccount acc);\n\n\t/**\n\t * The credit changed for the given account.\n\t * @param acc PayAccount\n\t */\n\tvoid creditChanged(PayAccount acc);\n\n\t/**\n\t * Captcha retrieved\n\t */\n\tvoid gotCaptcha(ICaptchaSender a_source, IImageEncodedCaptcha a_captcha);\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function initialize the Game. Initialize a new Game: create the Blocks and Ball (and Paddle) and add them to the Game.
public void initialize() { addSprite(this.levelInformation.getBackground()); this.createBlocks(); }
[ "public void initialize() {\n this.levelInfo.getBackground().addToGame(this);\n\n // blocks at the edges\n for (Block b : levelInfo.borders()) {\n b.addToGame(this);\n }\n\n // paddle\n Paddle paddle = new Paddle(levelInfo.paddle(), Color.orange, keyboard);\n paddle.setVelocity(levelInfo.paddleVelocity().getX(), levelInfo.paddleVelocity().getY());\n paddle.addToGame(this);\n\n // balls\n for (int i = 0; i < levelInfo.numberOfBalls(); i++) {\n int ballX = (int) levelInfo.paddle().getUpperLeft().getX() + (levelInfo.paddleWidth() / 2);\n int ballY = (int) levelInfo.paddle().getUpperLeft().getY() - 10;\n Ball ball = new Ball(ballX, ballY, 6, Color.WHITE, this.environment);\n ball.setVelocity(levelInfo.initialBallVelocities().get(i).getX(),\n levelInfo.initialBallVelocities().get(i).getY());\n ball.addToGame(this);\n ball.setMovingBlock(paddle);\n }\n\n\n // death region block\n this.counterBalls = new Counter(levelInfo.numberOfBalls());\n BallRemover ballRemover = new BallRemover(this, counterBalls);\n Block deathRegion = levelInfo.deathRegion();\n deathRegion.addHitListener(ballRemover);\n deathRegion.addToGame(this);\n\n\n // blocks\n this.counterBlocks = new Counter(levelInfo.numberOfBlocksToRemove());\n BlockRemover blockRemover = new BlockRemover(this, counterBlocks);\n ScoreTrackingListener scoreTrackingListener = new ScoreTrackingListener(score);\n for (Block b : levelInfo.blocks()) {\n b.addHitListener(blockRemover);\n b.addHitListener(scoreTrackingListener);\n b.addToGame(this);\n }\n\n\n // ScoreIndicator\n int scInWidth = this.frameWidth;\n int scInHeight = 25;\n int scInX = 0;\n int scInY = 0;\n Rectangle scoreIndicatorRec = new Rectangle(new Point(scInX, scInY), scInWidth, scInHeight);\n ScoreIndicator scoreIndicator = new ScoreIndicator(scoreIndicatorRec,\n Color.WHITE, this.score, levelInfo.levelName());\n scoreIndicator.addToGame(this);\n\n }", "public void initialize() {\n //creating BlockRemover, BallRemover and ScoreTrackingListener\n BlockRemover blockRemover = new BlockRemover(this, this.remainingBlocks);\n BallRemover ballRemover = new BallRemover(this, this.remainingBalls);\n ScoreTrackingListener scoreTracking = new ScoreTrackingListener(this.score);\n //adding the background\n this.addSprite(this.level.getBackground());\n //creating the balls\n List<Ball> balls = new ArrayList<Ball>();\n for (int i = 0; i < level.numberOfBalls(); i++) {\n Ball ball = new Ball(X_BALL, Y_BALL, RADIUS, Color.WHITE);\n ball.setVelocity(this.level.initialBallVelocities().get(i));\n balls.add(ball);\n }\n //adding the screen boundaries to the game environment as blocks\n Block screenUp = new Block(new Rectangle(new Point(ZERO, LENGTH), WIDTH, SIDE_WIDTH),\n Color.GRAY);\n Block screenLeft = new Block(new Rectangle(new Point(ZERO, ZERO), SIDE_WIDTH, HEIGHT), Color.GRAY);\n Block screenRight = new Block(new Rectangle(new Point(WIDTH - SIDE_WIDTH, ZERO), SIDE_WIDTH, HEIGHT),\n Color.GRAY);\n screenLeft.addToGame(this);\n screenRight.addToGame(this);\n screenUp.addToGame(this);\n //creating the death region and adding it as a HitListener\n Block deathRegion = new Block(new Rectangle(new Point(ZERO, HEIGHT), WIDTH, LENGTH), Color.GRAY);\n deathRegion.addToGame(this);\n deathRegion.addHitListener(ballRemover);\n //adding the blocks to the game environment and adding the listeners to them\n for (int i = 0; i < this.level.blocks().size(); i++) {\n Block b = this.level.blocks().get(i);\n b.addToGame(this);\n b.addHitListener(blockRemover);\n b.addHitListener(scoreTracking);\n }\n //creating the paddle and adding it to the game environment\n double width = (double) this.level.paddleWidth();\n Rectangle rect = new Rectangle(new Point((X_BALL - (width / 2)), Y_PADDLE),\n this.level.paddleWidth(), HEIGHT_PADDLE);\n Paddle paddle = new Paddle(rect, Color.ORANGE, this.environment, this.keyboard);\n paddle.addToGame(this);\n //adding the game environment to the balls and add them to the game\n for (int i = 0; i < this.level.numberOfBalls(); i++) {\n Ball b = balls.get(i);\n b.setGameEnvironment(this.environment);\n b.addToGame(this);\n }\n //adding the scoreIndicator to the game\n ScoreIndicator scoreIndicator = new ScoreIndicator(this.score);\n this.addSprite(scoreIndicator);\n //adding the name of the level to the game\n this.addSprite(new LevelName(this.level.levelName()));\n }", "private void initGFX() {\n\t\t\n\t\t/* init the block representations */\n\t\tBlock[][] blocks = gameLogic.getBlocks();\n\t\tblockReps = new GRect[blocks.length][blocks[0].length];\n\n\t\tfor (int col = 0; col < blocks.length; col++) {\n\t\t\tfor (int row = 0; row < blocks[col].length; row++) {\n\t\t\t\tblockReps[col][row] = new GRect(col * BLOCK_WIDTH, row * BLOCK_HEIGHT, BLOCK_WIDTH, BLOCK_HEIGHT);\n\t\t\t\tblockReps[col][row].setFillColor(Color.BLACK);\n\t\t\t\tblockReps[col][row].setFilled(true);\n\t\t\t\tadd(blockReps[col][row]);\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* init the ball representation */\n\t\tball = new GRect(-500, -500, gameLogic.getBallSize(), gameLogic.getBallSize());\n\t\tball.setColor(Color.WHITE);\n\t\tball.setFillColor(Color.WHITE);\n\t\tball.setFilled(true);\n\t\tadd(ball);\n\t\t\n\t\t/* init the paddle representation */\n\t\tpaddle = new GRect(-500, HEIGHT - gameLogic.getPaddleData()[2], gameLogic.getPaddleData()[1], gameLogic.getPaddleData()[2]);\n\t\tpaddle.setFillColor(Color.WHITE);\n\t\tpaddle.setFilled(true);\n\t\tadd(paddle);\n\n\t}", "public Game() {\n this.levelArea = new LevelArea(600, 800);\n this.levelArea.addObstacle(new Wall(new Point(100, 50), 90, 16, 408));\n this.levelArea.addObstacle(new Wall(new Point(108, 50), 0, 16, 600));\n this.levelArea.addObstacle(new Wall(new Point(500, 50), 0, 16, 600));\n this.levelArea.addObstacle(new Wall(new Point(110, 500), 90, 16, 158));\n this.levelArea.addObstacle(new Wall(new Point(236, 140), 45, 16, 100));\n this.levelArea.addObstacle(new Wall(new Point(296, 211), 135, 16, 100));\n this.levelArea.addObstacle(new Wall(new Point(361, 360), 60, 16, 158));\n\n this.levelArea.setStart(new Point(300, 650));\n this.levelArea.setTarget(new Point(300, 150));\n\n this.ball = new Ball();\n initializeLevel();\n }", "private void setUpGame() {\n\t\tsetUpBlocks();\n\t\tsetUpBall();\n\t\tsetUpPaddle();\n\t\tdisplayTurns();\n\t\t\n\t\taddMouseListeners();\n\t}", "public static void initializeGame(){\n\t\t\n\t\tEnemySpawner.setPrevTime();\n\t\t\n\t\tInput.setInputKeysMouse();\n\t\t//Input.setInputKeys();\n\t\t\n\t\tgui = new GUI();\n\t\t\n\t}", "public Game() {\n initComponents();\n intiB();\n }", "public void initializeGame() {\n\t\t// INITIALIZE OBJECTS:\n\t\t// ...\n\t\tcontrol = new Control();\n\t}", "public void init()\n {\n setSize(WIDTH, HEIGHT);\n //we now instantiate our ball and two paddles\n ball = new Ball();\n pLeft = new PaddleLeft();\n //pRight is set to current ball position -35 because it is 70 pixels long\n pRight = new PaddleRight(ball.getY() - 35);\n \n //mouseMotionListener allows the player to control their paddle\n addMouseMotionListener(this);\n setBackground(Color.black);\n //create offscreen image to draw on\n offscreen = createImage(WIDTH, HEIGHT);\n bufferGraphics = offscreen.getGraphics();\n \n time.start();\n \n }", "private void initializeGame() {\n\t\tinventory = new Inventory();\n\t\tenemies = new ArrayList<Enemy>();\n\t\ttowers = new HashMap<Cordinates, Tower>();\n\t\ttowerCords = new Vector<Cordinates>();\n\t\titer = towerCords.listIterator();\n\t\twaves = 1;\n\n\t}", "@Override\n\t\t\tpublic void initGame() {\n\t\t\t\tthis.setGameState(GameState.RUNNING);\n\n\t\t\t\taddFiveGuys();\n\t\t\t\tcharacters.add(boy);\n\t\t\t\tboy.sprite.setScale(2.2f);\n\t\t\t\tboy.sprite.setTrack(3);\n\t\t\t\tboy.sprite.setFrame(1);\n\t\t\t\tboy.pos.setX(300);\n\t\t\t\tboy.pos.setY(450);\n\t\t\t\tcharacters.add(girl);\n\t\t\t\tgirl.sprite.setScale(1.9f);\n\t\t\t\tgirl.pos.set(-15, 454);\n\t\t\t}", "public void initialize() {\n // gui = new GUI(\"Game\", 800, 600);\n this.blockCounter = new Counter(this.levelInformation.numberOfBlocksToRemove());\n this.br = new BlockRemover(this, this.blockCounter);\n\n this.ballsCounter = new Counter(0);\n this.ballr = new BallRemover(this, ballsCounter);\n ScoreIndicator sco = new ScoreIndicator(score);\n ScoreTrackingListener st = new ScoreTrackingListener(score);\n\n\n Sleeper sleeper = new Sleeper();\n //right\n Point p1 = new Point(780, 20);\n Rectangle r1 = new Rectangle(p1, 20, 800);\n Block b1 = new Block(r1, Color.GRAY);\n b1.addToGame(this);\n //left\n Point p2 = new Point(0, 20);\n Rectangle r2 = new Rectangle(p2, 20, 800);\n Block b2 = new Block(r2, Color.GRAY);\n b2.addToGame(this);\n //up\n Point p3 = new Point(0, 20);\n Rectangle r3 = new Rectangle(p3, 800, 20);\n Block b3 = new Block(r3, Color.GRAY);\n b3.addToGame(this);\n //down\n Point p4 = new Point(0, 599);\n Rectangle r4 = new Rectangle(p4, 800, 1);\n Block b4 = new Block(r4, Color.gray);\n b4.addToGame(this);\n b4.addHitListener(ballr);\n ScoreIndicator s = new ScoreIndicator(score);\n s.addToGame(this);\n //first row\n int x = 730;\n int y = 90;\n addSprite(this.levelInformation.getBackground());\n List<Block> blocks = levelInformation.blocks();\n for (int i = 0; i < this.levelInformation.numberOfBlocksToRemove(); i++) {\n blocks.get(i).addHitListener(br);\n blocks.get(i).addHitListener(st);\n blocks.get(i).addToGame(this);\n }\n live.addToGame(this);\n\n //paddle\n Point p6 = new Point(350, 560);\n int width = this.levelInformation.paddleWidth();\n int speed = this.levelInformation.paddleSpeed();\n Rectangle r6 = new Rectangle(p6, width, 20);\n Block b6 = new Block(r6, Color.YELLOW);\n Paddle paddle = new Paddle(r6, gui, Color.yellow);\n paddle.addToGame(this);\n }", "public Game()\n\t{\n\t\tColor color = new Color(177, 201, 169);\n\t\tsetBackground(color);\n\t\tracquet1 = new Racquet1(this);\n\t\tracquet2 = new Racquet2(this);\n\t\tball = new Ball(this, racquet1, racquet2);\n\t\tthis.addKeyListener(racquet1);\n\t\tthis.addKeyListener(racquet2);\n\t\tthis.setFocusable(true);\n\t}", "private Game(){\n\t\tthis.initialize();\n\t}", "public void initialize() {\n\n\t\t// Initializes the puck object with the speed of 3 pixels per tick in both x- and y-axis and positions it in the middle of the game arena.\n\t\tpuck = new Puck(0, 0, 30, 215, 320);\n\n\t\t// Creates 2 new Mallet objects into the list with the predetermined coordinates (top and bottom) and radius.\n\t\t// The second mallet(mallet[1]) is the one we will be controlling.\n\n\t\tmallet[0] = new Mallet(190, 20, 100, 20);\n\t\tmallet[0].setMalletTag(0);\n\n\n\t\tmallet[1] = new Mallet(190, 660, 100, 20);\n\t\tmallet[1].setMalletTag(1);\n\n\t\tgoalTop = new Goal(210, 0, 60, 1, 1);\n\t\tgoalBottom = new Goal(210, 699, 60, 1, 2);\n\n\n\t\tif (sendId == 1) {\n\t\t\tplayer1 = new Player(\"Player\" + \"\" + sendId + \"\", sendId);\n\t\t\tplayer2 = new Player(\"Player 2\", 2);\n\t\t}\n\t\tif (sendId == 2) {\n\t\t\tplayer2 = new Player(\"Player\" + \"\" + sendId + \"\", sendId);\n\t\t\tplayer1 = new Player(\"Player 1\", 1);\n\t\t}\n\t\tplayer1.setScore(0);\n\t\tplayer2.setScore(0);\n\n\t\t// collisionDetector is used to check if a collision happened between the mallet and the puck.\n\t\tcollisionDetector = new CollisionDetector(puck, mallet);\n\t\t// according to my probably broken logic the puck should move to opposite direction in two different games that are connected to each other...\n\n\t\tpuck.setPuckSpeedX(2);\n\t\tpuck.setPuckSpeedY(1);\n\n\n\t\t// Gives the painter the puck, mallet, goals and player objects and \n\t\t// runs the painters constructor which creates the JPanel.\n\t\tpainter = new Painter(puck, mallet, goalTop, goalBottom, player1, player2);\n\n\n\t\t// We use the keyboard to control our mallet.\n\t\tKeyListener keyListener = new KeyListener() {\n\n\t\t\t/**\n\t\t\t * Moves the mallet according to the presses.\n\t\t\t */\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\t// Reads the pressed key.\n\t\t\t\tif (sendId == 1) {\n\t\t\t\t\tint keyCode = e.getKeyCode();\n\n\t\t\t\t\tif (keyCode == KeyEvent.VK_LEFT || keyCode == KeyEvent.VK_A) {\n\t\t\t\t\t\tmallet[1].setMalletSpeedX(malletMaxNegative);\n\t\t\t\t\t}\n\t\t\t\t\tif (keyCode == KeyEvent.VK_RIGHT || keyCode == KeyEvent.VK_D) {\n\t\t\t\t\t\tmallet[1].setMalletSpeedX(malletMaxPositive);\n\t\t\t\t\t}\n\t\t\t\t\tif (keyCode == KeyEvent.VK_UP || keyCode == KeyEvent.VK_W) {\n\t\t\t\t\t\tmallet[1].setMalletSpeedY(malletMaxNegative);\n\t\t\t\t\t}\n\t\t\t\t\tif (keyCode == KeyEvent.VK_DOWN || keyCode == KeyEvent.VK_S) {\n\t\t\t\t\t\tmallet[1].setMalletSpeedY(malletMaxPositive);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (sendId==2) {\n\t\t\t\t\tint keyCode = e.getKeyCode();\n\n\t\t\t\t\tif (keyCode == KeyEvent.VK_LEFT || keyCode == KeyEvent.VK_A) {\n\t\t\t\t\t\tmallet[0].setMalletSpeedX(malletMaxNegative);\n\t\t\t\t\t}\n\t\t\t\t\tif (keyCode == KeyEvent.VK_RIGHT || keyCode == KeyEvent.VK_D) {\n\t\t\t\t\t\tmallet[0].setMalletSpeedX(malletMaxPositive);\n\t\t\t\t\t}\n\t\t\t\t\tif (keyCode == KeyEvent.VK_UP || keyCode == KeyEvent.VK_W) {\n\t\t\t\t\t\tmallet[0].setMalletSpeedY(malletMaxNegative);\n\t\t\t\t\t}\n\t\t\t\t\tif (keyCode == KeyEvent.VK_DOWN || keyCode == KeyEvent.VK_S) {\n\t\t\t\t\t\tmallet[0].setMalletSpeedY(malletMaxPositive);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} // keyPressed\n\n\t\t\t/**\n\t\t\t * Stops the mallet when the button is released.\n\t\t\t */\n\t\t\tpublic void keyReleased(KeyEvent e) {\n\t\t\t\tif (sendId == 1) {\n\t\t\t\t\tint keyCode = e.getKeyCode();\n\n\t\t\t\t\tif (keyCode == KeyEvent.VK_LEFT || keyCode == KeyEvent.VK_A) {\n\t\t\t\t\t\tmallet[1].setMalletSpeedX(0);\n\t\t\t\t\t}\n\t\t\t\t\tif (keyCode == KeyEvent.VK_RIGHT || keyCode == KeyEvent.VK_D) {\n\t\t\t\t\t\tmallet[1].setMalletSpeedX(0);\n\t\t\t\t\t}\n\t\t\t\t\tif (keyCode == KeyEvent.VK_UP || keyCode == KeyEvent.VK_W) {\n\t\t\t\t\t\tmallet[1].setMalletSpeedY(0);\n\t\t\t\t\t}\n\t\t\t\t\tif (keyCode == KeyEvent.VK_DOWN || keyCode == KeyEvent.VK_S) {\n\t\t\t\t\t\tmallet[1].setMalletSpeedY(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (sendId == 2) {\n\t\t\t\t\tint keyCode = e.getKeyCode();\n\n\t\t\t\t\tif (keyCode == KeyEvent.VK_LEFT || keyCode == KeyEvent.VK_A) {\n\t\t\t\t\t\tmallet[0].setMalletSpeedX(0);\n\t\t\t\t\t}\n\t\t\t\t\tif (keyCode == KeyEvent.VK_RIGHT || keyCode == KeyEvent.VK_D) {\n\t\t\t\t\t\tmallet[0].setMalletSpeedX(0);\n\t\t\t\t\t}\n\t\t\t\t\tif (keyCode == KeyEvent.VK_UP || keyCode == KeyEvent.VK_W) {\n\t\t\t\t\t\tmallet[0].setMalletSpeedY(0);\n\t\t\t\t\t}\n\t\t\t\t\tif (keyCode == KeyEvent.VK_DOWN || keyCode == KeyEvent.VK_S) {\n\t\t\t\t\t\tmallet[0].setMalletSpeedY(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} // keyReleased\n\n\t\t\t/**\n\t\t\t * I have no idea.\n\t\t\t */\n\t\t\tpublic void keyTyped(KeyEvent e) {}\n\t\t}; // KeyListener d\n\n\t\t// The Painter gets added to the JFrame so that it can start drawing the JPanel.\n\t\tadd(painter);\n\t\taddKeyListener(keyListener); // adding the Key listener to the JPanel;\n\t\t// Sets the size of the window according to the JPanel dimensions.\n\t\tpack();\n\n\t\tsetVisible(true);\n\t\tsetFocusable(true);\n\t\tsetTitle(\"\" + timeElapsed + \"\");\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\n\n\t\t/**\n\t\t * We create a new ActionListener to do stuff inside the JPanel.\n\t\t * This contains all of the inner game logic.\n\t\t */\n\t\tActionListener aListener = new ActionListener() {\n\n\t\t\t// resetTimer keeps track of the ingame ticks and is used to reset the game if nothing happens for a while.\n\t\t\tint resetTimer = 0;\n\n\t\t\t/**\n\t\t\t * actionPerfomed handles the game logic and calls for the Painter to repaint everything once it's done\n\t\t\t * moving the puck/mallets/etc.\n\t\t\t */\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t\tresetTimer++;\n\t\t\t\ttry {\n\t\t\t\t\tif (airinterface.winner(sendId) == 1) {\n\t\t\t\t\t\tt.stop();\n\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"YOU ARE WINNER!\");\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"The game will now shut down.\");\n\n\t\t\t\t\t\tThread.sleep(200);\n\t\t\t\t\t\tsetVisible(false);\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t\tif (airinterface.winner(sendId) == -1) {\n\t\t\t\t\t\tt.stop();\n\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\"YOU LOST!\");\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"The game will now shut down.\");\n\n\t\t\t\t\t\tThread.sleep(200);\n\t\t\t\t\t\tsetVisible(false);\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} catch (RemoteException g) {\n\t\t\t\t\tg.printStackTrace();\n\t\t\t\t} catch (InterruptedException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\t// puckMovement handles the movement of the puck.\n\t\t\t\tpuckMovement();\n\t\t\t\t// Restricts the mallet's movement inside the playing field.\n\t\t\t\tmalletInTheArea();\n\n\t\t\t\tif (sendId == 1) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tairinterface.sendPuckPos(puck.getPuckX(),puck.getPuckY());\n\t\t\t\t\t}catch(RemoteException e3){\n\t\t\t\t\t\te3.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\n\n\t\t\t\ttry {\n\t\t\t\t\t// sendId tells the server which variables to use for sending the coordinates\n\t\t\t\t\tif (sendId == 1) {\n\t\t\t\t\t\tairinterface.sendMalletPos(mallet[1].getMalletX(), mallet[1].getMalletY(), sendId);\n\n\t\t\t\t\t}\n\t\t\t\t\tif (sendId == 2) {\n\t\t\t\t\t\tairinterface.sendMalletPos(mallet[0].getMalletX(), mallet[0].getMalletY(), sendId);\n\n\t\t\t\t\t}\n\n\t\t\t\t} catch (RemoteException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\t// bouncing\n\t\t\t\tisColliding = collisionDetector.doesItCollide(); \n\t\t\t\tif (isColliding == true) {\n\n\t\t\t\t\tint x =\tpuck.getHitState(); \n\n\n\t\t\t\t\tbounce(x);\n\n\n\t\t\t\t\tpuck.checkPuckSpeedXY();\n\t\t\t\t\tpuckMovement();\n\t\t\t\t\tisColliding = false;\n\t\t\t\t\tresetTimer = 0;\n\t\t\t\t}\n\n\n\t\t\t\tif (goalTop.detectGoal(puck)) {\n\t\t\t\t\tif (sendId == 1) {// upper goal\n\t\t\t\t\t\ttry {\n\n\t\t\t\t\t\t\tairinterface.sendScore(1, 2); // sends player2 score to the server.\n\n\t\t\t\t\t\t} catch(RemoteException e1) {\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnewRound(1);\n\t\t\t\t\t\tresetTimer = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (goalBottom.detectGoal(puck)) { // lower goal\n\t\t\t\t\tif (sendId == 1) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tairinterface.sendScore(1, 1); // sends player1 score to the server.\n\n\t\t\t\t\t\t} catch (RemoteException e1) {\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnewRound(2);\n\t\t\t\t\t\tresetTimer = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// If nothing happens for 10 seconds(2000 x 5ms), the game gets reset in favor of the bottom player.\n\t\t\t\tif (resetTimer > 2000) {\n\t\t\t\t\tnewRound(1);\n\t\t\t\t}\n\n\t\t\t\tmallet[1].moveMallet(mallet[1].getMalletX() + mallet[1].getMalletSpeedX(), mallet[1].getMalletY() + mallet[1].getMalletSpeedY());\n\t\t\t\tmallet[0].moveMallet(mallet[0].getMalletX() + mallet[0].getMalletSpeedX(), mallet[0].getMalletY() + mallet[0].getMalletSpeedY());\n\t\t\t\t// Prints the speed of our mallet(keypresses) to the title of the window. Used for testing purposes.\n\t\t\t\tif (sendId == 2){\n\t\t\t\t\ttry {\n\t\t\t\t\t\tpuck.setPuckX(airinterface.getPuckX());\n\t\t\t\t\t\tpuck.setPuckY(airinterface.getPuckY());\n\t\t\t\t\t} catch (RemoteException f) {\n\t\t\t\t\t\tf.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\t// sendId tells the server which variables to use for getting the coordinates\n\t\t\t\t\tif (sendId == 1) {\n\n\t\t\t\t\t\tmallet[0].setMalletX(airinterface.getMallet2X());\n\t\t\t\t\t\tmallet[0].setMalletY(airinterface.getMallet2Y());\n\t\t\t\t\t}\n\t\t\t\t\tif (sendId == 2) {\n\n\t\t\t\t\t\tmallet[1].setMalletX(airinterface.getMallet1X());\n\t\t\t\t\t\tmallet[1].setMalletY(airinterface.getMallet1Y());\n\t\t\t\t\t}\n\n\t\t\t\t} catch (RemoteException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tplayer2.setScore(airinterface.getScore(2)); // updates scores from the server to local game\n\t\t\t\t\tplayer1.setScore(airinterface.getScore(1));\n\t\t\t\t} catch (RemoteException ef) {\n\t\t\t\t\tef.printStackTrace();\n\t\t\t\t}\n\t\t\t\tpainter.paintAll();\n\n\n\n\t\t\t} // actionPerformed\n\t\t}; // aListener\n\n\t\t// Timer defines in milliseconds how often the ActionListener is run.\n\t\tt = new Timer(10, aListener);\n\t\tt.start();\n\n\t}", "public Game()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(900, 600, 1); \n /*ff17 = new Fifa17();\n gow4 = new Gow4();\n h5 = new Halo5();\n fh3 = new Fh3();\n dbz2 = new Dbz2();\n fm6 = new Fm6();*/\n CreaGame(); \n\n //MT();\n }", "private void gameInitialize()\r\n { \r\n // we want ot render in full screen\r\n setFullScreenMode(true);\r\n \r\n // setup our camera and world group\r\n mGameCam = new GameCamera();\r\n mGameFont = Font.getFont(Font.FACE_MONOSPACE, \r\n Font.STYLE_BOLD, Font.SIZE_LARGE);\r\n \r\n try\r\n { \t\r\n mTitleScreen = Image.createImage(\"/menus/title.png\");\r\n mGameWon = new Sprite(Image.createImage(\"/menus/youWin.png\"));\r\n mGameWon.setPosition(getWidth()/2-mGameWon.getWidth()/2, getHeight()/2-mGameWon.getHeight()/2);\r\n mGameLost = new Sprite(Image.createImage(\"/menus/youLoose.png\"));\r\n mGameLost.setPosition(getWidth()/2 - mGameLost.getWidth()/2, getHeight()/2-mGameLost.getHeight()/2);\r\n mGameOptions = new Sprite(Image.createImage(\"/menus/gameOptions240x68.png\"), 240, 68);\r\n mGameOptions.setPosition(0, getHeight()-mGameOptions.getHeight()-10);\r\n mGamePickShipOptions = new Sprite(Image.createImage(\"/menus/pickShipOptions.png\"), 240, 68);\r\n mGamePickShipOptions.setPosition(0, getHeight()-mGamePickShipOptions.getHeight()-10);\r\n mGamePickShipOptions.nextFrame();\r\n\r\n // load the starting line box\r\n mStartingLine = new Sprite(Image.createImage(\"/menus/startingLine.png\"));\r\n mStartingLine.setPosition(getWidth()/2-mStartingLine.getWidth()/2, getHeight()-mStartingLine.getHeight());\r\n \r\n // load other racer textures\r\n Texture2D car2Tex = new Texture2D((Image2D)Loader.load(\"/racers/car2.png\")[0]);\r\n Texture2D car3Tex = new Texture2D((Image2D)Loader.load(\"/racers/car3.png\")[0]);\r\n \r\n // now we load our 3D level and break it up into room\r\n // objects that we can mainpulate later\r\n Object3D[] buffer = Loader.load(\"/track/straight.m3g\");\r\n for(int i = 0; i < buffer.length; i++)\r\n {\r\n if(buffer[i] instanceof World)\r\n {\r\n World worldObject = (World)buffer[i]; \r\n mTrack = (Mesh)worldObject.find(5); \r\n mTrackTrans = new Transform();\r\n \r\n // turn off lighting on all the mTracks\r\n // textures\r\n Texture2D tmpTex = (Texture2D)worldObject.find(15);\r\n tmpTex.setBlending(Texture2D.FUNC_REPLACE);\r\n tmpTex = (Texture2D)worldObject.find(23);\r\n tmpTex.setBlending(Texture2D.FUNC_REPLACE);\r\n tmpTex = (Texture2D)worldObject.find(31);\r\n tmpTex.setBlending(Texture2D.FUNC_REPLACE);\r\n tmpTex = (Texture2D)worldObject.find(34);\r\n tmpTex.setBlending(Texture2D.FUNC_REPLACE);\r\n break;\r\n }\r\n }\r\n\r\n buffer = Loader.load(\"/racers/Car.m3g\");\r\n for(int i = 0; i < buffer.length; i++)\r\n {\r\n if(buffer[i] instanceof World)\r\n {\r\n World worldObject = (World)buffer[i]; \r\n Mesh tmpMesh = (Mesh)worldObject.find(5);\r\n mPlayerRacer = new Racer(tmpMesh, car2Tex, car3Tex, 0, 0, 0); \r\n break;\r\n }\r\n }\r\n }\r\n catch(Exception e) { System.out.println(\"Canvas Loading error: \" + e.getMessage()); }\r\n \r\n // Here we get the instance to our graphics object\r\n mG3D = Graphics3D.getInstance();\r\n \r\n // We create our background that will be used to clear\r\n // the screen and we set it to black\r\n mBackground = new Background();\r\n mBackground.setColor(254 << 24 | 0 << 16 | 0 << 8 | 0);\r\n \r\n // Setup our HUD and Frames per sec calc\r\n FPSCounter.initialize(); \r\n \r\n // checks if we have sent or recieved the race time\r\n mRaceTimeSent = false;\r\n mRaceTimeRecieved = false;\r\n mOpponentTime = \"\";\r\n mOpponentTimeMillis = 0;\r\n\r\n RaceStarter.initialize();\r\n mCanIncrease = true;\r\n mCam2Set = false;\r\n mCam3Set = false;\r\n mGameState = GAMESTATE_CONNECT;\r\n }", "public Game() \n {\n player = new Player();\n\t\tparser = new Parser();\n\t\t\n\t\tcommandLimit = 10;\n\n createRooms();\n }", "private void Initialize()\n {\n System.out.println(\"Game.Initialize()...\");\n screen = new Screen(800, 600);\n universe = new Universe();\n gameDay = 0;\n selected = false;\n if(server){\n System.out.println(\"Creating server...\");\n mpUpdater = new Server();\n mpUpdater.Connect();\n }\n else\n {\n System.out.println(\"Creating client...\");\n mpUpdater = new Client();\n mpUpdater.Connect();\n }\n\n }", "private void init() {\r\n\t\tdisplay = new Display(title, width, height);\r\n\t\tdisplay.getJFrame().addMouseListener(handler.getMouseManager());\r\n\t\tdisplay.getJFrame().addMouseMotionListener(handler.getMouseManager());\r\n\t\tdisplay.getCanvas().addMouseListener(handler.getMouseManager());\r\n\t\tdisplay.getCanvas().addMouseMotionListener(handler.getMouseManager());\r\n\t\t\r\n\t\tAssets.init();\r\n\t\t\r\n\t\tgameState = new GameState(handler);\r\n\t\tmenuState = new MenuState(handler);\r\n\t\tendGameState = new EndGameState(handler);\r\n\t\tState.setState(menuState);\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method returns the value sought after a calculation.
public String getValue(){ return temp; }
[ "public double get_value(){\n\t\treturn curr_value.get();\n\t}", "public double getResult()\r\n/* 35: */ {\r\n/* 36: 93 */ return this.value;\r\n/* 37: */ }", "double presentValue(){\n\t\treturn value;\n\t}", "@Override\n\tpublic double eval() {\n\t\treturn value;\n\t}", "public double retrieve() {\n return result;\n }", "public double getValue()\r\n {\r\n return value;\r\n }", "public double get() {\n update();\n return value;\n }", "@Override\n public double getValue(){\n return value;\n }", "public double getValue() {\n\n // checks if answer gets credit\n if (studentAnswer.getCredit(rightAnswer) == 1.00) {\n return maxValue; // returns value if credit received\n }\n\n return 0; // returns 0 if value not received\n\n }", "public double getValue() {\n return val;\n }", "int getCurrVal();", "public double getValue() {\n\t\t\treturn value;\n\t\t}", "double getValue144();", "double getValue228();", "public double get_return(){\r\n return local_return;\r\n }", "double getValue260();", "public double getResult()\n {\n return result;\n }", "@java.lang.Override\n public double getResult() {\n return instance.getResult();\n }", "public double getValue(){\n if( studentAnswer != null )\n return studentAnswer.getCredit(rightAnswer) * maxValue;\n return 0.0;\n }", "public double value() {\n return value;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Define the angles that spin the object from the user's mouse click. The last values are saved in lastMouseX, lastMouseY, oldX, oldY; the calculated result is put in phiSpin and thetaSpin.
void setPhiThetaSpin(MouseEvent e){ int xClick=e.getX(); int yClick=e.getY(); double newX = xcoord(xClick); double newY = ycoord(yClick); double x = newX - oldX; double y = newY - oldY; lastMouseX = xClick; lastMouseY = yClick; oldX = newX; oldY = newY; if (itsBody!=null){ phiSpin = Math.atan2(-x,-y); thetaSpin = Math.sqrt(x*x+y*y)*getDragToThetaScale(); } }
[ "@Override\n public void mouseWheelMoved (MouseWheelEvent event)\n {\n if (_cursorVisible) {\n float increment = event.isShiftDown() ? FINE_ROTATION_INCREMENT : FloatMath.HALF_PI;\n setAngle((Math.round(_angle / increment) + event.getWheelRotation()) * increment);\n }\n }", "public void animateSpin()\r\n {\r\n // start with current rotation, this will increment each frame\r\n tempRotation = rotation; \r\n \r\n // where we need to end up\r\n rotation = game.getWheelRotation();\r\n \r\n // make sure tempRotation is smaller (possibly negative)\r\n while (tempRotation > rotation)\r\n {\r\n tempRotation -= 360;\r\n }\r\n \r\n // angle through which to rotate\r\n int angle = rotation - tempRotation;\r\n \r\n // we increment only INCREMENT degrees each frame, so if the angle of rotation\r\n // isn't a multiple of INCREMENT, then add the extra degrees here \r\n int extra = angle % INCREMENT;\r\n //tempRotation = rotation + extra; \r\n tempRotation += extra; \r\n \r\n // through at least 45 degrees\r\n if (rotation - tempRotation < 45)\r\n {\r\n tempRotation -= 360;\r\n }\r\n \r\n timer.start();\r\n }", "void setStartingAngle(float angle);", "private void initMouseControl(SmartObject group,Scene scene){\n Rotate xrotate;\n Rotate yrotate;\n group.getTransforms().addAll(\n xrotate= new Rotate(0,Rotate.X_AXIS),\n yrotate= new Rotate(0,Rotate.Y_AXIS)\n );\n xrotate.angleProperty().bind(angleX);\n yrotate.angleProperty().bind(angleY);\n\n scene.setOnMousePressed( e -> {\n anchorX = e.getSceneX();\n anchorY = e.getSceneY();\n\n anchorAngleX = angleX.get();\n anchorAngleY = angleY.get();\n });\n\n scene.setOnMouseDragged(e->{\n angleX.set(anchorAngleX-(anchorY-e.getSceneY()));\n angleY.set(anchorAngleY+(anchorX-e.getSceneX()));\n });\n }", "public void spin() {\r\n\t\tRobotMap.firstTalon.set(0.4);\r\n\t\tRobotMap.secondTalon.set(0.4);\r\n\t}", "public void setTheta(double angle){\n this.arrowTheta=angle+orientation;\n }", "private void spin() {\n\t\t\n\t\twheel.setSpinValue(spinValue);\n\t\tspinValue = wheel.getSpinValue();\n\t\twheel.setColor(spinValue);\n\t\tSystem.out.println(\"Spin is: \" + spinValue + \" \" + wheel.getColor());\n\t\t\n\t\t\n\t\t//\n\t\tString wheelColor = wheel.getColor();\n\t\tString playerColor = player.getPlayerColor();\n\t\tif(wheelColor.equalsIgnoreCase(playerColor)){\n\t\t\tplayer.setWinnings(player.getWinnings() + bet);\n\t\t\tplayer.setChips(chips + bet);\n\t\t}else if(!wheelColor.equalsIgnoreCase(playerColor)){\n\t\t\tplayer.setWinnings(player.getWinnings() - bet);\n\t\t\tplayer.setChips(chips - bet);\n\t\t\tbet = bet + 10;\n\t\t}\n\t\t\n\t}", "public void setRot()\n {\n if(choosingRotation)//sets the rotation of the tower to the location of the mouse\n {\n MouseInfo mi = Greenfoot.getMouseInfo();\n if (mi!=null)\n turnTowards(mi.getX(), mi.getY());\n if(Greenfoot.mousePressed(null))\n {\n choosingRotation = false;\n }\n }\n }", "static void spinCube() {\n // move point 1\n double oldX = x1;\n double oldY = y1;\n x1 = oldY;\n y1 = oldX * -1.0;\n \n // move point 2\n oldX = x2;\n oldY = y2;\n x2 = oldY;\n y2 = oldX * -1.0;\n \n updateFaces();\n }", "public void handle(MouseEvent event) {\n if(angle <= 90){\n volume1 = (63.5 - ((90 - angle)*0.47));\n }\n else if (angle >= 90 && angle < 270){\n volume1 = (63.5 + ((angle - 90)*0.47));\n }\n else if (angle >= 270){\n volume1 = (63.5 - ((90 + (360 - angle))*0.47));\n }\n\n if(turnOn != true){\n\n }else{\n channel[4].controlChange(7,(int) volume1);\n }\n\n //The volume control knob is divided into 4 quadrants. The line inside of the control knob can only rotate\n //into the quadrant that comes after the one it is currently in and/or the one preceding it. So if the line is\n //located in the bottom left quadrant then it can only rotate into the top left quadrant (once in the top left quadrant\n //it can either rotate into the top right or back to the bottom left quadrant). The line cannot jump from the bottom left\n //quadrant to the top right or bottom right quadrant.\n\n //The angle of the line is determined using the X and Y coordinates of the cursor. If the location of the cursor reaches\n //or surpasses a certain point inside the control knob (or is outside the control knob) then the angle of the line stops rotating.\n if(event.getY() <= 12 && event.getY() > 0 && !(event.getX() >= -9) && q1 == true){\n\n angle = 360 + Math.toDegrees(Math.atan(event.getY() / event.getX()));\n q2 = true;\n q3 = false;\n q4 = false;\n allQ = false;\n }\n else {\n }\n\n if (event.getX() < 0 && event.getY() < 0 && q2 == true || event.getX() < 0 && event.getY() < 0 && allQ == true){\n\n angle = Math.toDegrees(Math.atan(event.getY()/event.getX()));\n q1 = true;\n q3 = true;\n q4 = false;\n\n }\n else if (event.getX() > 0 && event.getY() < 0 && q3 == true || event.getX() > 0 && event.getY() < 0 && allQ == true) {\n\n angle = 90 + (90 + (Math.toDegrees(Math.atan(event.getY() / event.getX()))));\n q2 = true;\n q4 = true;\n q1 = false;\n }\n\n if(event.getY() >= 0 && event.getY() <= 12 && !(event.getX() <= 9) && q4 == true){\n\n angle = 90 + (90 + (Math.toDegrees(Math.atan(event.getY() / event.getX()))));\n q3 = true;\n q2 = false;\n q1 = false;\n allQ = false;\n }\n else {\n }\n\n //Set the starting X and Y of the line and rotate it based on the given angle.\n line.setRotate(angle);\n\n line.setStartX(135 - (10 * Math.cos(Math.toRadians(line.getRotate()))));\n line.setEndX(145 - (10 * Math.cos(Math.toRadians(line.getRotate()))));\n\n line.setStartY(240 - (10 * Math.sin(Math.toRadians(line.getRotate()))));\n line.setEndY(240 - (10 * Math.sin(Math.toRadians(line.getRotate()))));\n\n line.setRotate(angle);\n }", "@Override\n public void onSensorChanged(SensorEvent event) {\n if (event.sensor.getType() == Sensor.TYPE_ROTATION_VECTOR) {\n SensorManager.getRotationMatrixFromVector(rotMat, event.values);\n\n SensorManager.getOrientation(rotMat, vals);\n yaw = Math.toDegrees(vals[0]); // w stopniach [-180, +180]\n pitch = Math.toDegrees(vals[1]);\n roll = Math.toDegrees(vals[2]);\n\n //zmiana zakresu [0, 360]\n if (yaw < 0) {\n yaw = yaw + 360;\n }\n\n if (first) {\n firstYaw = yaw;\n lastYaw = 0;\n lastPitch = pitch;\n lastRoll = roll;\n first = false;\n\n } else {\n float a = 0.8f;\n //transformujemy układ, wskazane yaw = 0\n yaw = yaw - firstYaw;\n yaw = lastYaw + yaw * a - lastYaw * a;\n pitch = lastPitch + pitch * a - lastPitch * a;\n roll = lastRoll + roll * a - lastRoll * a;\n }\n\n TVyaw.setText(String.valueOf(yaw));\n TVpitch.setText(String.valueOf(pitch));\n TVroll.setText(String.valueOf(roll));\n }\n\n if (event.sensor.getType() == Sensor.TYPE_LINEAR_ACCELERATION) {\n mmrv = event.values;\n float a = 0.6f;\n\n if (mmrvLast != null) {\n mmrv[0] = mmrvLast[0] + event.values[0] * a - mmrvLast[0] * a;\n mmrv[1] = mmrvLast[1] + event.values[1] * a - mmrvLast[1] * a;\n mmrv[2] = mmrvLast[2] + event.values[2] * a - mmrvLast[2] * a;\n\n TVax.setText(String.valueOf((int) (mmrv[0])));\n TVay.setText(String.valueOf((int) (mmrv[1])));\n TVaz.setText(String.valueOf((int) (mmrv[2])));\n }\n\n mmrvLast = mmrv;\n\n pw.println(kontrolType + \" , \" + mmrv[0] + \" ,\" + mmrv[1] + \" ,\" + mmrv[2] + \" ,\" + yaw + \" ,\" + pitch + \" ,\" + roll);\n }\n }", "public double getTheta(){\n return PBC.separation(arrowTheta-orientation,Math.PI*2);\n //return arrowTheta-orientation;\n }", "private void calculateTrajectoryAngle() {\n x = U.roundFloatingPointError(Math.cos(this.angle), FP_PRECISION); // Recalculate x\n y = U.roundFloatingPointError(Math.sin(this.angle), FP_PRECISION); // Recalculate y\n trajectory = Math.sqrt((x * x) + (y * y)); // Recalculate Trajectory\n }", "public void setRotationAngles(float par1, float par2, float par3, float par4, float par5, float par6)\n {\n float f = par3 * (float)Math.PI * -0.1F;\n\n for (int i = 0; i < 4; i++)\n {\n field_40323_a[i].rotationPointY = -2F + MathHelper.cos(((float)(i * 2) + par3) * 0.25F);\n field_40323_a[i].rotationPointX = MathHelper.cos(f) * 9F;\n field_40323_a[i].rotationPointZ = MathHelper.sin(f) * 9F;\n f += ((float)Math.PI / 2F);\n }\n\n f = ((float)Math.PI / 4F) + par3 * (float)Math.PI * 0.03F;\n\n for (int j = 4; j < 8; j++)\n {\n field_40323_a[j].rotationPointY = 2.0F + MathHelper.cos(((float)(j * 2) + par3) * 0.25F);\n field_40323_a[j].rotationPointX = MathHelper.cos(f) * 7F;\n field_40323_a[j].rotationPointZ = MathHelper.sin(f) * 7F;\n f += ((float)Math.PI / 2F);\n }\n\n f = 0.4712389F + par3 * (float)Math.PI * -0.05F;\n\n for (int k = 8; k < 12; k++)\n {\n field_40323_a[k].rotationPointY = 11F + MathHelper.cos(((float)k * 1.5F + par3) * 0.5F);\n field_40323_a[k].rotationPointX = MathHelper.cos(f) * 5F;\n field_40323_a[k].rotationPointZ = MathHelper.sin(f) * 5F;\n f += ((float)Math.PI / 2F);\n }\n\n field_40322_b.rotateAngleY = par4 / (180F / (float)Math.PI);\n field_40322_b.rotateAngleX = par5 / (180F / (float)Math.PI);\n }", "protected void updateAngles() \n\t{\n\t\tif (prevRotationPitch == 0.0F && prevRotationYaw == 0.0F) \n\t\t{\n\t\t\tfloat f = MathHelper.sqrt_double(motionX * motionX + motionZ * motionZ);\n\t\t\tprevRotationYaw = rotationYaw = (float)(Math.atan2(motionX, motionZ) * 180.0D / Math.PI);\n\t\t\tprevRotationPitch = rotationPitch = (float)(Math.atan2(motionY, (double) f) * 180.0D / Math.PI);\n\t\t}\n\t}", "void moveShape(){\r\n System.out.println(\"To move this triangle, give me the new coordinates for one of its angles. For x: \");\r\n float a,b;\r\n Scanner in= new Scanner(System.in);\r\n a = in.nextFloat();\r\n System.out.println(\"and for y: \");\r\n Scanner in2= new Scanner(System.in);\r\n b = in2.nextFloat();\r\n System.out.println(\"\\n\");\r\n\r\n //we save all the old coordinates\r\n Point old0;\r\n old0 = this.angles.get(0).getLocation();\r\n double x1, y1, x2, y2;\r\n x1 = this.angles.get(1).getX();\r\n y1 = this.angles.get(1).getY();\r\n x2 = this.angles.get(2).getX();\r\n y2 = this.angles.get(2).getY();\r\n\r\n //We set the new location of the first point\r\n this.angles.get(0).setLocation(a,b);\r\n\r\n //we set the new locations of the other points depending on the new coordinates of the first point\r\n if(a >= old0.x && b >= old0.y){\r\n this.angles.get(1).setLocation(x1 + (a - old0.x) , y1 + (b - old0.y));\r\n this.angles.get(2).setLocation(x2 + (a - old0.x) , y2 + (b - old0.y));\r\n\r\n } else if(a >= old0.x && b < old0.y){\r\n this.angles.get(1).setLocation(x1 + (a - old0.x) , y1 + (old0.y - b));\r\n this.angles.get(2).setLocation(x2 + (a - old0.x) , y2 + (old0.y - b));\r\n\r\n }else if(a < old0.x && b >= old0.y){\r\n this.angles.get(1).setLocation(x1 + (old0.x - a) , y1 + (b - old0.y));\r\n this.angles.get(2).setLocation(x2 + (old0.x - a) , y2 + (b - old0.y));\r\n\r\n }else if(a < old0.x && b < old0.y){\r\n this.angles.get(1).setLocation(x1 + (old0.x - a) , y1 + (old0.y - b));\r\n this.angles.get(2).setLocation(x2 + (old0.x - a) , y2 + (old0.y - b));\r\n\r\n }\r\n\r\n System.out.println(\"The triangle is now like this:\\n\");\r\n this.display();\r\n }", "Trigonometry getTrig();", "public double getAngle()\n {\n return encoderTicksToDegrees(master.getSelectedSensorPosition());\n }", "void setEulerAngles(EulerAngles angles);", "void rotate(double[] pivot, double phi, double theta, double psi);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__RestWebservice__Group_9__1__Impl" $ANTLR start "rule__RestWebservice__Group_14__0" InternalStubbrLang.g:27419:1: rule__RestWebservice__Group_14__0 : rule__RestWebservice__Group_14__0__Impl rule__RestWebservice__Group_14__1 ;
public final void rule__RestWebservice__Group_14__0() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalStubbrLang.g:27423:1: ( rule__RestWebservice__Group_14__0__Impl rule__RestWebservice__Group_14__1 ) // InternalStubbrLang.g:27424:2: rule__RestWebservice__Group_14__0__Impl rule__RestWebservice__Group_14__1 { pushFollow(FOLLOW_7); rule__RestWebservice__Group_14__0__Impl(); state._fsp--; if (state.failed) return ; pushFollow(FOLLOW_2); rule__RestWebservice__Group_14__1(); state._fsp--; if (state.failed) return ; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { restoreStackSize(stackSize); } return ; }
[ "public final void rule__Microservice__Group_11_4__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOperationDsl.g:9149:1: ( rule__Microservice__Group_11_4__0__Impl rule__Microservice__Group_11_4__1 )\n // InternalOperationDsl.g:9150:2: rule__Microservice__Group_11_4__0__Impl rule__Microservice__Group_11_4__1\n {\n pushFollow(FOLLOW_11);\n rule__Microservice__Group_11_4__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Microservice__Group_11_4__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Microservice__Group_12_4__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOperationDsl.g:9365:1: ( rule__Microservice__Group_12_4__0__Impl rule__Microservice__Group_12_4__1 )\n // InternalOperationDsl.g:9366:2: rule__Microservice__Group_12_4__0__Impl rule__Microservice__Group_12_4__1\n {\n pushFollow(FOLLOW_11);\n rule__Microservice__Group_12_4__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Microservice__Group_12_4__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Microservice__Group_0__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOperationDsl.g:6531:1: ( rule__Microservice__Group_0__0__Impl rule__Microservice__Group_0__1 )\n // InternalOperationDsl.g:6532:2: rule__Microservice__Group_0__0__Impl rule__Microservice__Group_0__1\n {\n pushFollow(FOLLOW_12);\n rule__Microservice__Group_0__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Microservice__Group_0__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__RosServiceClient__Group_4__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalComponentInterface.g:2333:1: ( rule__RosServiceClient__Group_4__0__Impl rule__RosServiceClient__Group_4__1 )\n // InternalComponentInterface.g:2334:2: rule__RosServiceClient__Group_4__0__Impl rule__RosServiceClient__Group_4__1\n {\n pushFollow(FOLLOW_5);\n rule__RosServiceClient__Group_4__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__RosServiceClient__Group_4__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Microservice__Group_12__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOperationDsl.g:9323:1: ( ( ( rule__Microservice__Group_12_4__0 )* ) )\n // InternalOperationDsl.g:9324:1: ( ( rule__Microservice__Group_12_4__0 )* )\n {\n // InternalOperationDsl.g:9324:1: ( ( rule__Microservice__Group_12_4__0 )* )\n // InternalOperationDsl.g:9325:2: ( rule__Microservice__Group_12_4__0 )*\n {\n before(grammarAccess.getMicroserviceAccess().getGroup_12_4()); \n // InternalOperationDsl.g:9326:2: ( rule__Microservice__Group_12_4__0 )*\n loop88:\n do {\n int alt88=2;\n int LA88_0 = input.LA(1);\n\n if ( (LA88_0==19) ) {\n alt88=1;\n }\n\n\n switch (alt88) {\n \tcase 1 :\n \t // InternalOperationDsl.g:9326:3: rule__Microservice__Group_12_4__0\n \t {\n \t pushFollow(FOLLOW_16);\n \t rule__Microservice__Group_12_4__0();\n\n \t state._fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop88;\n }\n } while (true);\n\n after(grammarAccess.getMicroserviceAccess().getGroup_12_4()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Microservice__Group__14() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOperationDsl.g:8494:1: ( rule__Microservice__Group__14__Impl )\n // InternalOperationDsl.g:8495:2: rule__Microservice__Group__14__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Microservice__Group__14__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Microservice__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOperationDsl.g:8148:1: ( ( ( rule__Microservice__Group_1__0 )? ) )\n // InternalOperationDsl.g:8149:1: ( ( rule__Microservice__Group_1__0 )? )\n {\n // InternalOperationDsl.g:8149:1: ( ( rule__Microservice__Group_1__0 )? )\n // InternalOperationDsl.g:8150:2: ( rule__Microservice__Group_1__0 )?\n {\n before(grammarAccess.getMicroserviceAccess().getGroup_1()); \n // InternalOperationDsl.g:8151:2: ( rule__Microservice__Group_1__0 )?\n int alt75=2;\n int LA75_0 = input.LA(1);\n\n if ( (LA75_0==29) ) {\n int LA75_1 = input.LA(2);\n\n if ( ((LA75_1>=54 && LA75_1<=55)) ) {\n alt75=1;\n }\n }\n switch (alt75) {\n case 1 :\n // InternalOperationDsl.g:8151:3: rule__Microservice__Group_1__0\n {\n pushFollow(FOLLOW_2);\n rule__Microservice__Group_1__0();\n\n state._fsp--;\n\n\n }\n break;\n\n }\n\n after(grammarAccess.getMicroserviceAccess().getGroup_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Protocol__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalTechnologyDsl.g:3226:1: ( rule__Protocol__Group__0__Impl rule__Protocol__Group__1 )\n // InternalTechnologyDsl.g:3227:2: rule__Protocol__Group__0__Impl rule__Protocol__Group__1\n {\n pushFollow(FOLLOW_7);\n rule__Protocol__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Protocol__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__DSLRuleRI__Group_0__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSasDsl.g:6492:1: ( rule__DSLRuleRI__Group_0__3__Impl )\n // InternalSasDsl.g:6493:2: rule__DSLRuleRI__Group_0__3__Impl\n {\n pushFollow(FOLLOW_2);\n rule__DSLRuleRI__Group_0__3__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Microservice__Group_10__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOperationDsl.g:7036:1: ( ( ( rule__Microservice__Group_10_4__0 )* ) )\n // InternalOperationDsl.g:7037:1: ( ( rule__Microservice__Group_10_4__0 )* )\n {\n // InternalOperationDsl.g:7037:1: ( ( rule__Microservice__Group_10_4__0 )* )\n // InternalOperationDsl.g:7038:2: ( rule__Microservice__Group_10_4__0 )*\n {\n before(grammarAccess.getMicroserviceAccess().getGroup_10_4()); \n // InternalOperationDsl.g:7039:2: ( rule__Microservice__Group_10_4__0 )*\n loop69:\n do {\n int alt69=2;\n int LA69_0 = input.LA(1);\n\n if ( (LA69_0==46) ) {\n alt69=1;\n }\n\n\n switch (alt69) {\n \tcase 1 :\n \t // InternalOperationDsl.g:7039:3: rule__Microservice__Group_10_4__0\n \t {\n \t pushFollow(FOLLOW_15);\n \t rule__Microservice__Group_10_4__0();\n\n \t state._fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop69;\n }\n } while (true);\n\n after(grammarAccess.getMicroserviceAccess().getGroup_10_4()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__DSLPlanner__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSasDsl.g:8128:1: ( rule__DSLPlanner__Group__0__Impl rule__DSLPlanner__Group__1 )\n // InternalSasDsl.g:8129:2: rule__DSLPlanner__Group__0__Impl rule__DSLPlanner__Group__1\n {\n pushFollow(FOLLOW_3);\n rule__DSLPlanner__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__DSLPlanner__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__RosServiceClient__Group__6() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalComponentInterface.g:2279:1: ( rule__RosServiceClient__Group__6__Impl rule__RosServiceClient__Group__7 )\n // InternalComponentInterface.g:2280:2: rule__RosServiceClient__Group__6__Impl rule__RosServiceClient__Group__7\n {\n pushFollow(FOLLOW_15);\n rule__RosServiceClient__Group__6__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__RosServiceClient__Group__7();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Operation__Group__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.mydsl2.ui/src-gen/org/xtext/example/mydsl2/ui/contentassist/antlr/internal/InternalMyDsl.g:357:1: ( rule__Operation__Group__0__Impl rule__Operation__Group__1 )\r\n // ../org.xtext.example.mydsl2.ui/src-gen/org/xtext/example/mydsl2/ui/contentassist/antlr/internal/InternalMyDsl.g:358:2: rule__Operation__Group__0__Impl rule__Operation__Group__1\r\n {\r\n pushFollow(FOLLOW_rule__Operation__Group__0__Impl_in_rule__Operation__Group__0677);\r\n rule__Operation__Group__0__Impl();\r\n\r\n state._fsp--;\r\n\r\n pushFollow(FOLLOW_rule__Operation__Group__1_in_rule__Operation__Group__0680);\r\n rule__Operation__Group__1();\r\n\r\n state._fsp--;\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__Interface__Group_0__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOperationDsl.g:10310:1: ( rule__Interface__Group_0__0__Impl rule__Interface__Group_0__1 )\n // InternalOperationDsl.g:10311:2: rule__Interface__Group_0__0__Impl rule__Interface__Group_0__1\n {\n pushFollow(FOLLOW_7);\n rule__Interface__Group_0__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Interface__Group_0__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XRelationalExpression__Group_1_1_0_0__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalScripting.g:4480:1: ( rule__XRelationalExpression__Group_1_1_0_0__1__Impl )\n // InternalScripting.g:4481:2: rule__XRelationalExpression__Group_1_1_0_0__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__XRelationalExpression__Group_1_1_0_0__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Relational__Group_1_0_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // InternalArgument.g:3213:1: ( rule__Relational__Group_1_0_1__1__Impl )\n // InternalArgument.g:3214:2: rule__Relational__Group_1_0_1__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Relational__Group_1_0_1__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Operation__Group_9__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOperationDsl.g:11242:1: ( rule__Operation__Group_9__1__Impl )\n // InternalOperationDsl.g:11243:2: rule__Operation__Group_9__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Operation__Group_9__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Microservice__Group__11__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOperationDsl.g:6428:1: ( ( ( rule__Microservice__Group_11__0 )? ) )\n // InternalOperationDsl.g:6429:1: ( ( rule__Microservice__Group_11__0 )? )\n {\n // InternalOperationDsl.g:6429:1: ( ( rule__Microservice__Group_11__0 )? )\n // InternalOperationDsl.g:6430:2: ( rule__Microservice__Group_11__0 )?\n {\n before(grammarAccess.getMicroserviceAccess().getGroup_11()); \n // InternalOperationDsl.g:6431:2: ( rule__Microservice__Group_11__0 )?\n int alt64=2;\n int LA64_0 = input.LA(1);\n\n if ( (LA64_0==64) ) {\n int LA64_1 = input.LA(2);\n\n if ( (LA64_1==30) ) {\n alt64=1;\n }\n }\n switch (alt64) {\n case 1 :\n // InternalOperationDsl.g:6431:3: rule__Microservice__Group_11__0\n {\n pushFollow(FOLLOW_2);\n rule__Microservice__Group_11__0();\n\n state._fsp--;\n\n\n }\n break;\n\n }\n\n after(grammarAccess.getMicroserviceAccess().getGroup_11()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__UnaryOperation__Group_0__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // InternalBehavior.g:5741:1: ( rule__UnaryOperation__Group_0__2__Impl )\n // InternalBehavior.g:5742:2: rule__UnaryOperation__Group_0__2__Impl\n {\n pushFollow(FOLLOW_2);\n rule__UnaryOperation__Group_0__2__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Microservice__Group__11__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOperationDsl.g:8418:1: ( ( ( rule__Microservice__Group_11__0 )? ) )\n // InternalOperationDsl.g:8419:1: ( ( rule__Microservice__Group_11__0 )? )\n {\n // InternalOperationDsl.g:8419:1: ( ( rule__Microservice__Group_11__0 )? )\n // InternalOperationDsl.g:8420:2: ( rule__Microservice__Group_11__0 )?\n {\n before(grammarAccess.getMicroserviceAccess().getGroup_11()); \n // InternalOperationDsl.g:8421:2: ( rule__Microservice__Group_11__0 )?\n int alt81=2;\n int LA81_0 = input.LA(1);\n\n if ( (LA81_0==119) ) {\n int LA81_1 = input.LA(2);\n\n if ( (LA81_1==69) ) {\n alt81=1;\n }\n }\n switch (alt81) {\n case 1 :\n // InternalOperationDsl.g:8421:3: rule__Microservice__Group_11__0\n {\n pushFollow(FOLLOW_2);\n rule__Microservice__Group_11__0();\n\n state._fsp--;\n\n\n }\n break;\n\n }\n\n after(grammarAccess.getMicroserviceAccess().getGroup_11()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Counts and returns the number of elements in an Iterator.
public long count() { if (this.count != -1) return this.count; this.count = 0; while (this.iterator.hasNext()) { this.iterator.next(); this.count++; } return this.count; }
[ "@Override\n public int size() {\n return IteratorUtil.countElements(this);\n }", "public int size() {\n\n\t\t// No elements?\n\t\tif (isEmpty()) return 0;\n\n\t\t// If there are elements...\n\n\t\t// There's at least one element, the head\n\t\tint count = 1;\n\n\t\t// Now count the ones after the head\n\n\t\tZeldaElement<T> next = head.getNextElement();\n\n\t\twhile (next != null) {\n\n\t\t\tcount++;\n\n\t\t\tnext = next.getNextElement();\n\n\t\t}\n\n\t\treturn count;\n\n\t}", "public int getIntegerCount() {\n return integer_.size();\n }", "public communication.Communication.ElementsCount getElementsCount() {\n return elementsCount_ == null ? communication.Communication.ElementsCount.getDefaultInstance() : elementsCount_;\n }", "public int count()\n\t{\n\t\treturn _iCount;\n\t}", "public int numElements() {\n\t\treturn num_entries;\n\t}", "public int getNumberIterator()\t{\n \t\treturn numberIterator;\n \t}", "public final static int size(final Iterable<?> i)\n {\n return i == null ? 0 : size(i.iterator());\n }", "@Test\n public void testIterator1() {\n for (int i = 0; i < lengthOfList; i++) {\n int count;\n Iterator<Integer> iter = ElementsInOrder[i].iterator();\n Integer testValue = new Integer(0);\n\n for (count = 0; iter.hasNext(); ++count) {\n testValue = iter.next();\n }\n\n int expected = ElementsInOrder[i].size();\n int result = count;\n assertEquals(expected, result);\n }\n }", "@Override\n public int size() {\n int count = 0; //creating count var to be size of DLinkedList\n // creating 'iterator' object\n while(head != null){ //while the iterator has the next value...\n count++; //add 1 to the count\n head = head.next;\n }\n return count; //once the iterator has no more values, return count to output the size of the list\n }", "public int getElementCount() {\n return elementCount;\n }", "public int CountEntries(){\n\t\treturn numItems;\n\t}", "public int getCount() {\n\t\treturn elements.size();\n\t}", "default int size() {\n FSIterator<T> it = copy();\n it.moveToFirst();\n int count = 0;\n while (it.isValid()) {\n count++;\n it.nextNvc();\n }\n return count;\n }", "public int size()\n {\n return elementCount;\n }", "public long getElementCount() {\n return f_elementCount;\n }", "public int getSize() {\r\n int count = 0;\r\n for (Node<E> p = first(); p != null; p = p.getNext()) {\r\n if (p.getItem() != null) {\r\n // Collections.size() spec says to max out\r\n if (++count == Integer.MAX_VALUE)\r\n break;\r\n }\r\n }\r\n return count;\r\n }", "public int getNumElements() {\r\n\t\treturn elements.size();\r\n\t}", "public int getCount() {\n return getCount(startNode);\n }", "@Override\n\tpublic int size() throws IOException {\n\t\tint size = 0;\n\t\tIterator<AnnotationSet<T>> itr = annotationSetMap.iterator();\n\t\twhile (itr.hasNext()) size = size + itr.next().size();\n\t\treturn size;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the value of the 'Repository' reference. If the meaning of the 'Repository' reference isn't clear, there really should be more of a description here...
TaskRepository getRepository();
[ "public String getRepository()\n\t{\n\t\treturn (String)mConstraints.get(REPOSITORY);\n\t}", "public org.mojolang.mojo.core.Url getRepository() {\n if (repositoryBuilder_ == null) {\n return repository_ == null ? org.mojolang.mojo.core.Url.getDefaultInstance() : repository_;\n } else {\n return repositoryBuilder_.getMessage();\n }\n }", "@Override\n public Repository getRepository() {\n return this.repository;\n }", "public String getRepositoryURL()\n {\n return repositoryURL;\n \n }", "R getRepository( );", "public Repository getRepo() {\n\t\treturn repo;\n\t}", "public String getRepositoryPath()\r\n {\r\n return repositoryPath;\r\n }", "String getRepositorySnc();", "public ResourceRepository getRepository() {\n\t\treturn repository;\n\t}", "public String getRepositoryUuid() {\n\t\treturn getInfoProcessor().getRepositoryUuid();\n\t}", "public Repository<E, PK> getRepository() {\r\n\r\n\t\treturn repository;\r\n\t}", "public Repository getRepository() {\n\n if ( repository == null ) {\n // Does the transmeta have a repo?\n // This is a valid case, when a non-repo trans is attempting to retrieve\n // a transformation in the repository.\n if ( transMeta != null ) {\n return transMeta.getRepository();\n }\n }\n return repository;\n }", "Object getREPOSITORYVERSION();", "public String getRepositoryUser() {\n \n \t\treturn defaultConnectionRequestInfo.getProperty(DestinationDataProvider.JCO_REPOSITORY_USER);\n \t}", "public java.lang.String getRepositoryId() {\n java.lang.Object ref = \"\";\n if (idCase_ == 6) {\n ref = id_;\n }\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 (idCase_ == 6) {\n id_ = s;\n }\n return s;\n }\n }", "String repositorySiteName();", "@Override\n public Repository getRepository() {\n Repository repository = super.getRepository();\n return repository != null ? repository : getTransMeta().getRepository();\n }", "public String getRepositoryId() {\n if (isRelative()) {\n throw new RuntimeException(\"Relative reference\");\n }\n if (file.length() == 0 || file.equals(\"/\")) {\n return null;\n }\n\n int delim = file.indexOf('/', 1);\n if (delim == -1) {\n delim = file.length();\n }\n return file.substring(1, delim);\n\n }", "@Override\n public String getRepositoryLocation() {\n return null;\n }", "@Override\r\n\tpublic LibraryRepo getLibraryRepo() {\n\t\treturn null;\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the value of name
public String getName() { return name; }
[ "int getNameValue();", "public String getValue(String name) {\n int i = indexOfName(name);\n if (i != -1) {\n String result = get(i);\n i = result.indexOf(':');\n result = result.substring(i + 1);\n return result.trim();\n }\n else {\n return null;\n }\n }", "public String get(String name) {\n return values.get(name);\n }", "public String name(){\n\t\treturn this._value;\n\t}", "public String get (String name);", "public Object getValue(String name) ;", "public String getValue() {\n\t\treturn this.name();\n\t}", "public String getFirstValue(String name);", "public String getName()\n {\n return (String)(name.value);\n }", "@Nullable\n String get(String name);", "Object getVarValue(Object name);", "private Object getValue( final String name )\n {\n return fieldStorage.get( name );\n }", "public String getName() { return name.get(); }", "public String getName() {\n return name.get(0).getValue();\n }", "public final String name() {\r\n return getParm(1);\r\n }", "public String getName(){\r\n return this.name.get();\r\n }", "public String getValueString(String name) {\n IniParameter param = get(name);\n return param == null ? \"\" : param.getParamValue();\n }", "public String getName() {\n if (get(\"name\") != null)\n return get(\"name\");\n return null;\n }", "public String getname(String name) {\n \treturn name;\n }", "public String get(String name) {\r\n return getProperty(name);\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Performs the xqdoc function.
private Item xqdoc(final QueryContext qc) throws QueryException { checkCreate(qc); return new XQDoc(qc, info).parse(checkPath(exprs[0], qc)); }
[ "public XInvoke(Document doc) {\r\n setup(doc.getDocumentElement());\r\n }", "protected abstract void buildDocument();", "private String makeXMLPerformDoc(String sqlString) {\n\n return\n\n serviceProperties.getProperty(\n \"PERFORM_HEAD\", DEFAULT_PERFORM_HEAD) +\n\n serviceProperties.getProperty(\n \"PERFORM_QUERY_START\", DEFAULT_PERFORM_QUERY_START) +\n\n sqlString +\n\n serviceProperties.getProperty(\n \"PERFORM_QUERY_END\", DEFAULT_PERFORM_QUERY_END) +\n\n serviceProperties.getProperty(\n \"PERFORM_FOOT\", DEFAULT_PERFORM_FOOT);\n }", "public static void createDoc()throws Exception \r\n\t\t{\r\n\t\t\t//Blank Document\r\n\t\t\tXWPFDocument document= new XWPFDocument(); \r\n\t\t\t//Write the Document in file system\r\n\t\t\tFileOutputStream out = new FileOutputStream(\r\n\t\t\t\t\tnew File(\"E:\\\\Research Projects\\\\CMU Emp. project\\\\Tags/Top50.docx\"));\r\n\t\t\t//final PrintStream printStream = new PrintStream(out);\r\n\r\n\t\t\tfinal File folder = new File(\"E:\\\\Research Projects\\\\CMU Emp. project\\\\Tags\\\\Top50\");\r\n\t\t\tfinal List<File> fileList = Arrays.asList(folder.listFiles());\r\n\r\n\t\t\tfor(int i=0;i<fileList.size();i++)\r\n\t\t\t{\r\n\t\t\t\tfinal BufferedReader br = new BufferedReader(new FileReader(fileList.get(i))); \r\n\t\t\t\tString line=\"\";\r\n\t\t\t\tString content =\"\";\r\n\r\n\t\t\t\tXWPFParagraph paragraph = document.createParagraph();\t\t\t\r\n\r\n\t\t\t\t//XSSFFont defaultFont= run.createFont();\r\n\r\n\t\t\t\twhile ((line= br.readLine())!= null ) { \r\n\t\t\t\t\tXWPFRun run=paragraph.createRun();\r\n\t\t\t\t\t//XWPFTable table = document.createTable();\r\n\t\t\t\t\tboolean className=false;\r\n\t\t\t\t\tif(line.toLowerCase().contains(\"assert\")){\r\n\t\t\t\t\t\trun.setBold(true);\r\n\t\t\t\t\t\trun.setText(line);\t\r\n\t\t\t\t\t\trun.addBreak();\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tif(line.contains(\"ClassName\")){\r\n\t\t\t\t\t\t\tclassName=true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\trun.setText(line);\r\n\t\t\t\t\t\tif(className){\r\n\t\t\t\t\t\t\trun.addBreak();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\trun.addBreak();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//\t\t\t\tXWPFTableRow tableRowOne = table.getRow(0);\r\n\t\t\t\t\t//\t\t\t\ttableRowOne.getCell(0).setText(line);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tXWPFRun run1=paragraph.createRun();\r\n\t\t\t\t//run1.addBreak();\r\n\t\t\t\trun1.setText(\"====================\");\r\n\t\t\t\t//run.addBreak();\r\n\t\t\t\trun1.setText(\"====================\");\r\n\t\t\t\t//run1.addBreak();\r\n\t\t\t\t//run.addBreak();\r\n\r\n\t\t\t\t//printStream.print(content);\r\n\t\t\t\t//byte[] contentInBytes = content.getBytes(Charset.forName(\"UTF-8\"));\r\n\r\n\t\t\t\t//content=content+\"========================\";\r\n\t\t\t\t//content=content+\"========================\";\r\n\t\t\t\t//out.write(contentInBytes);\r\n\t\t\t\t//out.flush();\r\n\t\t\t\t//break;\r\n\t\t\t}\r\n\r\n\r\n\t\t\tdocument.write(out);\r\n\t\t\t//printStream.close();\r\n\t\t\tout.close();\r\n\r\n\t\t\tSystem.out.println(\r\n\t\t\t\t\t\"createdocument.docx written successully\");\r\n\t\t}", "public abstract String doc() throws IndexerException;", "void scarica() throws DocumentException, IOException;", "static void generateOp4jDocumentation() {\r\n \r\n // FnArray\r\n generateAllFnsDoc(new File(OUTPUT_XDOC_FILE_PREFIX, \"fnarray.all.xml\"),\r\n Arrays.asList(new String[] {\r\n OP4J_INPUT_FILE_PREFIX + \"FnArrayOf.java\"}));\r\n generateAllFnsDoc(new File(OUTPUT_XDOC_FILE_PREFIX, \"fnarray.all.xml\"),\r\n Arrays.asList(new String[] {\r\n OP4J_INPUT_FILE_PREFIX + \"FnArrayOfArrayOf.java\"}));\r\n generateAllFnsDoc(new File(OUTPUT_XDOC_FILE_PREFIX, \"fnarray.all.xml\"),\r\n Arrays.asList(new String[] {\r\n OP4J_INPUT_FILE_PREFIX + \"FnArrayOfListOf.java\"}));\r\n generateAllFnsDoc(new File(OUTPUT_XDOC_FILE_PREFIX, \"fnarray.all.xml\"),\r\n Arrays.asList(new String[] {\r\n OP4J_INPUT_FILE_PREFIX + \"FnArrayOfSetOf.java\"}));\r\n //\r\n \r\n // FnBigDecimal\r\n generateAllFnsDoc(new File(OUTPUT_XDOC_FILE_PREFIX, \"fnbigdecimal.xml\"),\r\n Arrays.asList(new String[] { \r\n OP4J_INPUT_FILE_PREFIX + \"FnBigDecimal.java\"}));\r\n //\r\n \r\n // FnBigInteger\r\n generateAllFnsDoc(new File(OUTPUT_XDOC_FILE_PREFIX, \"fnbiginteger.xml\"),\r\n Arrays.asList(new String[] { \r\n OP4J_INPUT_FILE_PREFIX + \"FnBigInteger.java\"}));\r\n //\r\n \r\n \r\n // FnBoolean\r\n generateAllFnsDoc(new File(OUTPUT_XDOC_FILE_PREFIX, \"fnboolean.xml\"),\r\n Arrays.asList(new String[] { \r\n OP4J_INPUT_FILE_PREFIX + \"FnBoolean.java\" }));\r\n //\r\n \r\n \r\n // FnCalendar\r\n generateAllFnsDoc(new File(OUTPUT_XDOC_FILE_PREFIX, \"fncalendar.xml\"),\r\n Arrays.asList(new String[] {\r\n OP4J_INPUT_FILE_PREFIX + \"FnCalendar.java\"}));\r\n //\r\n \r\n \r\n // FnDate\r\n generateAllFnsDoc(new File(OUTPUT_XDOC_FILE_PREFIX, \"fndate.xml\"),\r\n Arrays.asList(new String[] {\r\n OP4J_INPUT_FILE_PREFIX + \"FnDate.java\"}));\r\n //\r\n \r\n // FnDouble\r\n generateAllFnsDoc(new File(OUTPUT_XDOC_FILE_PREFIX, \"fndouble.xml\"),\r\n Arrays.asList(new String[] { \r\n OP4J_INPUT_FILE_PREFIX + \"FnDouble.java\"}));\r\n //\r\n \r\n // FnFloat\r\n generateAllFnsDoc(new File(OUTPUT_XDOC_FILE_PREFIX, \"fnfloat.xml\"),\r\n Arrays.asList(new String[] { \r\n OP4J_INPUT_FILE_PREFIX + \"FnFloat.java\"}));\r\n //\r\n \r\n // FnFunc\r\n generateAllFnsDoc(new File(OUTPUT_XDOC_FILE_PREFIX, \"fnfunc.xml\"),\r\n Arrays.asList(new String[] {\r\n OP4J_INPUT_FILE_PREFIX + \"FnFunc.java\"}));\r\n //\r\n \r\n \r\n // FnInteger\r\n generateAllFnsDoc(new File(OUTPUT_XDOC_FILE_PREFIX, \"fninteger.xml\"),\r\n Arrays.asList(new String[] { \r\n OP4J_INPUT_FILE_PREFIX + \"FnInteger.java\"}));\r\n //\r\n \r\n \r\n // FnList\r\n generateAllFnsDoc(new File(OUTPUT_XDOC_FILE_PREFIX, \"fnlist.all.xml\"),\r\n Arrays.asList(new String[] {\r\n OP4J_INPUT_FILE_PREFIX + \"FnListOf.java\"}));\r\n generateAllFnsDoc(new File(OUTPUT_XDOC_FILE_PREFIX, \"fnlist.all.xml\"),\r\n Arrays.asList(new String[] {\r\n OP4J_INPUT_FILE_PREFIX + \"FnListOfArrayOf.java\"}));\r\n generateAllFnsDoc(new File(OUTPUT_XDOC_FILE_PREFIX, \"fnlist.all.xml\"),\r\n Arrays.asList(new String[] {\r\n OP4J_INPUT_FILE_PREFIX + \"FnListOfListOf.java\"}));\r\n generateAllFnsDoc(new File(OUTPUT_XDOC_FILE_PREFIX, \"fnlist.all.xml\"),\r\n Arrays.asList(new String[] {\r\n OP4J_INPUT_FILE_PREFIX + \"FnListOfSetOf.java\"}));\r\n //\r\n \r\n \r\n // FnLong\r\n generateAllFnsDoc(new File(OUTPUT_XDOC_FILE_PREFIX, \"fnlong.xml\"),\r\n Arrays.asList(new String[] { \r\n OP4J_INPUT_FILE_PREFIX + \"FnLong.java\"}));\r\n //\r\n \r\n \r\n // FnMap\r\n generateAllFnsDoc(new File(OUTPUT_XDOC_FILE_PREFIX, \"fnmap.xml\"),\r\n Arrays.asList(new String[] {\r\n OP4J_INPUT_FILE_PREFIX + \"FnMapOf.java\"}));\r\n //\r\n \r\n \r\n // FnNumber\r\n generateAllFnsDoc(new File(OUTPUT_XDOC_FILE_PREFIX, \"fnnumber.xml\"),\r\n Arrays.asList(new String[] { \r\n OP4J_INPUT_FILE_PREFIX + \"FnNumber.java\"}));\r\n //\r\n\r\n // FnObject\r\n generateAllFnsDoc(new File(OUTPUT_XDOC_FILE_PREFIX, \"fnobject.xml\"), \r\n Arrays.asList(new String[] { \r\n OP4J_INPUT_FILE_PREFIX + \"FnObject.java\"}));\r\n //\r\n \r\n \r\n // FnSet\r\n generateAllFnsDoc(new File(OUTPUT_XDOC_FILE_PREFIX, \"fnset.all.xml\"),\r\n Arrays.asList(new String[] {\r\n OP4J_INPUT_FILE_PREFIX + \"FnSetOf.java\"}));\r\n generateAllFnsDoc(new File(OUTPUT_XDOC_FILE_PREFIX, \"fnset.all.xml\"),\r\n Arrays.asList(new String[] {\r\n OP4J_INPUT_FILE_PREFIX + \"FnSetOfArrayOf.java\"}));\r\n generateAllFnsDoc(new File(OUTPUT_XDOC_FILE_PREFIX, \"fnset.all.xml\"),\r\n Arrays.asList(new String[] {\r\n OP4J_INPUT_FILE_PREFIX + \"FnSetOfListOf.java\"}));\r\n generateAllFnsDoc(new File(OUTPUT_XDOC_FILE_PREFIX, \"fnset.all.xml\"),\r\n Arrays.asList(new String[] {\r\n OP4J_INPUT_FILE_PREFIX + \"FnSetOfSetOf.java\"}));\r\n //\r\n \r\n \r\n // FnShort\r\n generateAllFnsDoc(new File(OUTPUT_XDOC_FILE_PREFIX, \"fnshort.xml\"),\r\n Arrays.asList(new String[] { \r\n OP4J_INPUT_FILE_PREFIX + \"FnShort.java\" }));\r\n //\r\n \r\n \r\n // FnString\r\n generateAllFnsDoc(new File(OUTPUT_XDOC_FILE_PREFIX, \"fnstring.xml\"),\r\n Arrays.asList(new String[] { \r\n OP4J_INPUT_FILE_PREFIX + \"FnString.java\" }));\r\n //\r\n\r\n \r\n // FnTuple\r\n generateAllFnsDoc(new File(OUTPUT_XDOC_FILE_PREFIX, \"fntuple.xml\"),\r\n Arrays.asList(new String[] { \r\n OP4J_INPUT_FILE_PREFIX + \"FnTuple.java\" }));\r\n //\r\n \r\n \r\n }", "public void print()\n {\n try\n { \n writeProgressNoteToDocX(false, \"\");\n \n Desktop.getDesktop().print(new File(installationPath + \"/userdata/\" + firstName + lastName + dob + \"/\" + currentPN + \".docx\"));\n }\n catch(IOException e)\n {}\n //String filename = \"\";\n //System.getRuntime().exec(\"start /min winword \\\"\" + filename + \"\\\" /q /n /f /mFilePrint /mFileExit\");\n\n }", "public abstract String handleDocument(D document);", "public void startDoc() throws SAXException {\n }", "void startDocument() throws IOException;", "public void run(){\n \n switch (this.eventType){\n \n case EventTriggerType.MOUSE_KLICK_INTO_DOC:\n clickIntoDoc();\n break;\n case EventTriggerType.KEY_TEXT_INTO_DOC:\n clickIntoDoc();\n keyIntoDoc();\n break;\n \n }\n }", "public void buildDocument() {\n/* 301 */ setDocument(getDocumentLoader().getDocument(getClass()), \"text/html\", \"ISO-8859-1\");\n/* */ \n/* 303 */ syncAccessMethods();\n/* */ }", "public abstract ByteArrayOutputStream renderDocument2XML(lotus.domino.Document doc);", "abstract void process(final Document developerDOM, final Document generatedDOM) throws XPathExpressionException;", "public String getDocumentContent( String arg0 )\r\n \t\t{\n \t\t\treturn null;\r\n \t\t}", "protected void preprocess(Document doc, XPath xpath, FileArchiveBuilder fileBuilder) throws XPathExpressionException {\n // empty implementation\n }", "public void buildDocument() {\n/* 243 */ setDocument(getDocumentLoader().getDocument(getClass()), \"text/html\", \"ISO-8859-1\");\n/* */ \n/* 245 */ syncAccessMethods();\n/* */ }", "public abstract String getDocs();", "@FXML public void printDoc(){\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void classement() {\n\t\t\t\n\t\t}", "@Override\r\n public void publicando() {\n }", "@Override\n\tpublic void tyre() {\n\t\t\n\t}", "@Override\n \tpublic void init() {\n \n \t}", "private static void EX5() {\n\t\t\r\n\t}", "protected void method_5557() {}", "@Override\n\tpublic void cafeteria() {\n\t\t\n\t}", "@Override\r\n\tpublic void preco() {\n\r\n\t}", "@Override\r\n\tpublic void jugar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void limpar() {\n\t\t\r\n\t}", "public void mo5201a() {\n }", "@Override\n\tpublic void annuler() {\n\n\t}", "@Override\r\n\tpublic void zwroc() {\n\t\t\r\n\t}", "@Override\n\t\tprotected void swop() {\n\n\t\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
endregion tim nguoi dung
public String[] timdata(String a, String b) { String[] c = new String[2]; String selectQuery="SELECT * FROM "+TABLE_NAME; SQLiteDatabase db=this.getWritableDatabase(); Cursor cursor=db.rawQuery(selectQuery,null); if(cursor.moveToFirst()) { do { if(cursor.getString(2).equals(a)&&cursor.getString(3).equals(b)) { c[0]=cursor.getString(2); c[1]=cursor.getString(3); break; } }while (cursor.moveToNext()); } db.close(); Log.d(TAG, "load data Successfuly"); return c; }
[ "private void time() {\n\n\t}", "@Override\npublic void girarIzquierda(float time) {\n\t\n}", "private void odrzavanjeTemp()\r\n\t{\r\n\t\t\r\n\t}", "public void mo9609a() {\n }", "@Override\n\tvoid pleaca() {\n\t\tcal.getTime();\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"HH:mm:ss\");\n\t\tSystem.out.println( \"Ora la care s-a plecat: \" + sdf.format(cal.getTime()) );\n\t}", "static void statischMaken() {\n\n\t}", "public void mo17751g() {\n }", "public void showTime() {\n\t\t\tSystem.out.println(\"Ceasul arata ora ... \");\n\t\t}", "public void ts(){\r\n\t\t/*Metodo que hace encuentra el mejor coloreo que puede encontrar en un segundo */\r\n\t\tts(1000,20,10);\r\n\t}", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "public void mo25169t() {\n }", "public void mo28221a() {\n }", "public void mo1857d() {\n }", "void getTime(){\n\t\t// if use \"void\", which means there no return value. However, here we used \"get\" function to get the time, \n\t\t// there will must be a return value, so just remove \"void\" here. \n\t\t// And add return type here. So this code should be correct to -> String getTime(){\n\t // Besides, adding scope of this function is recommended.\n\t\t\t\treturn time;\n\t\t}", "public void mo5201a() {\n }", "public void shraniCasovniZaznamek() {\n this.zadnjiCasovniZaznamek = System.currentTimeMillis();\n }", "public Levyt(){\n\t\t\t//oletus muodostaja\n\t\t}", "private void generaStatistiche() {\n\t\t\t\r\n\t\t}", "public void mo19887i() {\n }", "private void Upload_Stoprealtime() {\n\t\t\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ JADX INFO: super call moved to the top of the method (can break code semantics)
public UnblockUserComposite(@NotNull BlacklistInteractorImpl blacklistInteractorImpl, String str, long j) { super("UnblockUserComposite", "userId = " + str + ", id = " + j, null, 4, null); Intrinsics.checkNotNullParameter(str, ChannelContext.Item.USER_ID); this.g = blacklistInteractorImpl; this.e = str; this.f = j; }
[ "public void method_5753() {\r\n super();\r\n }", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void parentMethod() throws Exception {\n\t\tsuper.parentMethod();\r\n\t}", "@Override\n }", "protected void method_5557() {}", "protected void d()\r\n/* 49: */ {\r\n/* 50:57 */ super.d();\r\n/* 51: */ }", "protected BaseTOP() {/* intentionally empty block */}", "void method() {\n//\t\tsuper.method();\n\t}", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tprotected void swop() {\n\n\t\t}", "@Override\r\n\t\tpublic void visitCode() {\n\t\t\tsuper.visitCode();\r\n\t\t}", "@Override\r\n public void publicando() {\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\r\n\tpublic void eintragLoeschen() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void jugar() {\n\t\t\r\n\t}", "public void Super() {\n }", "@Override\n\tpublic void miseAJour() {\n\t\t\n\t}", "@Override\r\n\tpublic void trabalhar() {\n\t\t\r\n\t}", "protected void a()\n\t{\n\t\tsuper.a();\n\t}", "@Override\n public void trololo2() {\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove a history from an IndicativeEvent
public void removeHistory(ArrayList<ActionObservation> history) { indEvent.remove(history); }
[ "public void clearEventHistory();", "public void removeFromHistory(entity.ContactHistory element);", "void removeFromHistoryEntries(HistoryEntry value);", "void forgetHistory();", "public void eraseHistory() {\r\n\t\thistory.clear();\r\n\t}", "public abstract void clearHistory();", "public void deleteGameHistory() {\n\t\tfor (int i = prevGames.size(); i > 0; i--)\n\t\t\tprevGames.remove(i - 1);\n\t\twriteHistoryToJSON();\n\t}", "public void removeFromCedingHistory(entity.GLCededPremiumHistory element);", "public void eraseLocallyStoredHistory()\n throws IOException\n {\n HistoryID historyId = HistoryID.createFromRawID(\n new String[] { \"callhistory\" });\n historyService.purgeLocallyStoredHistory(historyId);\n }", "public boolean removeEvent(TLEvent event, String timelineName);", "public void deleteHistory(FlyHistoryEntity fhe) {\n\t\t\n\t}", "public static void unsetHistory() {\n History = false;\n }", "public void removeHistoryChangeListener( HistoryChangeListener arg0 )\r\n \t\t{\n \r\n \t\t}", "private void removeEvent(BayesianEvent event) {\n\t\tfor (BayesianEvent e : event.getParents()) {\n\t\t\te.getChildren().remove(event);\n\t\t}\n\t\tthis.eventMap.remove(event.getLabel());\n\t\tthis.events.remove(event);\n\t}", "@Delete\n Single<Integer> delete(Collection<edu.cnm.deepdive.gardenbuddy.model.entity.History> history);", "public void remove(int loc) {\n history.remove(loc);\n }", "public void deleteHistory() {\n SQLiteDatabase db = this.getWritableDatabase();\n String deleteQuery = \"DELETE FROM \" + TABLE_HISTORY;\n db.execSQL(deleteQuery);\n }", "private void undo() {\n\t\tclear();\n\t\tint size = historyList.size();\n\t\tif (size != 0) {\n\t\t\tundone.add(historyList.remove(size - 1));\n\t\t}\n\t\tresetAndRun();\n\t}", "public void clearHistoryList(){\n historyList.getItems().clear();\n }", "@Delete\n Single<Integer> delete(edu.cnm.deepdive.gardenbuddy.model.entity.History... history);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether th whole mask is filled out.
boolean filled();
[ "private boolean checkfull( byte boxtocheck )\n\t{\n\t\tfor( byte i = 0; i < 9; i++ )\n\t\t\tif( board[boxtocheck][i] == 0 )\n\t\t\t\treturn false;\n\t\treturn true;\n\t}", "public boolean isZeroFill() {\n/* 927 */ return ((this.colFlag & 0x40) > 0);\n/* */ }", "public boolean isFilled() {\n\t\tfor (int rows = 0; rows <= array.length - 1; rows++) {\n\t\t\tfor (int columns = 0; columns <= array.length - 1; columns++) {\n\t\t\t\tif (array[rows][columns] == 0)\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean isBoardFull() {\r\n\t\t\r\n\t\tBlank blank = Blank.getInstance();\r\n\t\t\r\n\t\tfor( int i = 0; i < 3; i++ ){\r\n\t\t\tfor( int j = 0; j < 3; j++ ){\r\n\t\t\t\t\r\n\t\t\t\tif( board[i][j].getMark() == blank.getMark() )\r\n\t\t\t\t\treturn false;\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t\t\r\n\t}", "public Boolean isFilled();", "public boolean isCompletelyFilled(){\n\t\tif(this.getWallX() == 6 && this.getWallY() == 6){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean isFull() {\n for (int x = 0; x < X; x++) {\n for (int y = 0; y < Y; y++) {\n if (!this.board[x][y].isFilled()) {\n return false;\n }\n }\n }\n return true;\n }", "public boolean isFull(){\n for(int row=1;row<GRIDSIZE;row++){\n for(int column=1;column<GRIDSIZE;column++) {\n if(isBlank(row, column)){\n return false;\n }\n }\n }\n return true;\n }", "public boolean isFull() \r\n\t {\r\n\t\tfor(int i=0;i<3;i++)\r\n\t\t{\r\n\t\t\tfor(int j=0;j<3;j++)\r\n\t\t\t{\r\n\t\t\t\tif(!board[i][j].isFull())\r\n\t\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t }", "public void checkIfFilledRowsorCol() {\r\n// check if the three number slots in the boxes rows are filled then do the same thing for its columns\r\n if(this.numsInBox[0].Numberint!=0 && this.numsInBox[1].Numberint!=0 && this.numsInBox[2].Numberint!=0){\r\n this.isRowFilled[0]=true;\r\n }\r\n else if(this.numsInBox[3].Numberint!=0 && this.numsInBox[4].Numberint!=0 && this.numsInBox[5].Numberint!=0){\r\n this.isRowFilled[1]=true;\r\n }\r\n else if(this.numsInBox[6].Numberint!=0 && this.numsInBox[7].Numberint!=0 && this.numsInBox[8].Numberint!=0){\r\n this.isRowFilled[2]=true;\r\n }\r\n \r\n// check if the three number slots in the boxes columns are filled\r\n if(this.numsInBox[0].Numberint!=0 && this.numsInBox[3].Numberint!=0 && this.numsInBox[6].Numberint!=0){\r\n this.isColFilled[0]=true;\r\n }\r\n else if(this.numsInBox[1].Numberint!=0 && this.numsInBox[4].Numberint!=0 && this.numsInBox[7].Numberint!=0){\r\n this.isColFilled[1]=true;\r\n }\r\n else if(this.numsInBox[2].Numberint!=0 && this.numsInBox[5].Numberint!=0 && this.numsInBox[8].Numberint!=0){\r\n this.isColFilled[2]=true;\r\n }\r\n }", "public boolean isFull() {\n\t\tboolean full = false;\n\t\tfor (int z = 0; z < dim; z++) {\n\t\t\tfor (int i = 0; i < dim; i++) {\n\t\t\t\tfor (int j = 0; j < dim; j++) {\n\t\t\t\t\tif (!isEmptyField(i, j, z)) {\n\t\t\t\t\t\tfull = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfull = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn full;\n\t}", "public boolean isBoardFull(){\n\t\tfor( int i=0; i<size; i++){\n\t\t\tfor(int j=0; j<size; j++){\n\t\t\t\tif( lBoard[i][j]==0)\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean isBoardFull(){\n\tfor(int x = 0; x < size; x ++){\n\t for(int y = 0; y < size; y ++){\n\t\tif(isEmpty(x, y))\n\t\t return false;\n\t }\n\t}\n\treturn true;\n }", "private static boolean isEmpty(Raster raster){\n double[] array = null;\n searchEmpty:\n for(int x=0,width=raster.getWidth(); x<width; x++){\n for(int y=0,height=raster.getHeight(); y<height; y++){\n array = raster.getPixel(x, y, array);\n for(double d : array){\n if(d != 0){\n return false;\n }\n }\n }\n }\n return true;\n }", "public boolean isFull()\n\t{\n\t\tfor(int i = 0; i < values.length; i++) {\n\t\t\tfor(int j = 0; j < values[0].length; j++) {\n\t\t\t\tif(values[i][j] < 1 || values[i][j] > 9) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean isFilled ()\r\n\t{\r\n\t\treturn false;\r\n\t}", "public boolean isBoardFull() {\n for (int i=0; i<3; i++) {\n for (int j=0; j<3; j++) {\n if (board[i][j] == '-')\n return false;\n }\n }\n return true;\n }", "public boolean fullBoard()\r\n {\r\n boolean result = true;\r\n \r\n for(int i = 0; i < 3; i++)\r\n for(int j = 0; j < 3; j++)\r\n for(int k = 0; k < 3; k++)\r\n for(int l = 0; l < 3; l++)\r\n if(grid[i][k][j][l] == 0) //looks for zero's\r\n result = false;\r\n return result;\r\n }", "public boolean isBoardFull()\n {\n for (int i = 0; i < board.length; i++)\n {\n for (int j = 0; j < board[i].length; j++)\n {\n if (board[i][j] == 0)\n {\n return false;\n }\n }\n }\n return true;\n }", "private boolean isBoardFull()\n\t{\n\t\tfor(int i = 0; i < COLS; i++){\n\t\t\tif(board[i][ROWS-1] == Token.empty){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.all_sales_menu, menu); return true; }
[ "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflator = getMenuInflater();\n\t\tinflator.inflate(R.menu.activity_action_bar, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n public boolean onCreateOptionsMenu( android.view.Menu menu)\r\n {\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_activity_actions, menu);\r\n return super.onCreateOptionsMenu(menu);\r\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tmenu.clear();\n\t\tinflater.inflate(R.menu.main_action, menu);\n\t\t// ((IdtActivity)\n\t\t// getActivity()).getSupportActionBar().setHomeAsUpIndicator(R.drawable.abc_ic_ab_back_mtrl_am_alpha);\n\t\t// repl(Fra, args, isFinish);\n\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_bar, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater(); // Get menu inflater from context\n \tinflater.inflate(R.menu.menu, menu); // use inflater to inflate menu from resource xml\n \treturn true; // \n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.base_action_bar, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater=getMenuInflater();\n\t\tinflater.inflate(R.menu.menuitem, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(android.view.Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.inventory_menu, menu);\n iMenu = menu;\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action_bar_item, menu);\n\t\tadditem = menu.findItem(R.id.new_show);\n\t\tacceptitem = menu.findItem(R.id.accept_show);\n\t\tedititem = menu.findItem(R.id.edit_show);\n\t\tdeleteitem = menu.findItem(R.id.delete_show);\n\t\tif (menu != null) {\n\t\t\tsetActionBar();// function to set menu item display\n\t\t}\n\t\treturn super.onCreateOptionsMenu(menu);\n\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.cmdlist_activity_action, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.info_actions, menu);\r\n return super.onCreateOptionsMenu(menu);\r\n }", "private void inflateAdditionalMenu() {\n\t\tinflateMenu = true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\tgetMenuInflater().inflate(org.ideas4j.DoSomething.R.menu.menubar, menu);\n\treturn true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n this.menu = menu;\n\n MenuItem action_add = menu.findItem(R.id.action_add);\n action_add.setVisible(false);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action_bar, menu);\r\n\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.item_info, menu);\n \t\treturn true;\n \t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return a request header
String getRequestHeader(String name);
[ "public RequestHeader getRequestHeader() {\n return requestHeader;\n }", "RequestSpecification header(String headerName, String headerValue);", "public alluxio.grpc.CopycatRequestHeader getRequestHeader() {\n if (requestHeaderBuilder_ == null) {\n return requestHeader_ == null ? alluxio.grpc.CopycatRequestHeader.getDefaultInstance() : requestHeader_;\n } else {\n return requestHeaderBuilder_.getMessage();\n }\n }", "org.jgn.api.proto.ApiProto.ResponseHeader getHeader();", "String getHeader(String header)\r\n {\r\n return ResponseHeader.get(header);\r\n }", "HttpRequestBuilder header(String name, String value);", "public HTTPHeaders getHeader() {\n\t\treturn header;\n\t}", "String getAuthHeader();", "Object getHeaderValue();", "public com.pingan.traffic.protocol.ProtocolModule.CommonProtocol.RequestHeaderOrBuilder getReqHeaderOrBuilder() {\n if (reqHeaderBuilder_ != null) {\n return reqHeaderBuilder_.getMessageOrBuilder();\n } else {\n return reqHeader_ == null ?\n com.pingan.traffic.protocol.ProtocolModule.CommonProtocol.RequestHeader.getDefaultInstance() : reqHeader_;\n }\n }", "public MDFSProtocolHeader getRequest(){\n\t\treturn request;\n\t}", "public String getHeader(String name) { return (String)headers.get(name); }", "Response header(String name, String value);", "public String getHeader()\r\n {\r\n return m_header;\r\n }", "public String headers(String header) {\n return fullHttpRequest.headers().get(header);\n }", "private String getJwt(HttpServletRequest request) {\n String authorizationHeader = request.getHeader(AUTHORIZATION_HEADER);\n\n if (authorizationHeader != null && authorizationHeader.toUpperCase()\n .startsWith(AUTHORIZATION_HEADER_PREFIX)) {\n return authorizationHeader.substring(AUTHORIZATION_HEADER_PREFIX.length());\n }\n\n return null;\n }", "public HeaderInfo getGtrHeaderInfo();", "@Override\n public UserAgentHeader getUserAgentHeader()\n {\n if(userAgentHeader == null)\n {\n try\n {\n List userAgentTokens = new LinkedList();\n userAgentTokens.add(\"PoC Server\");\n userAgentTokens.add(\"0.1\");\n String dateString = new Date().toString().replace(' ', '_').replace(':', '-');\n userAgentTokens.add(\"CVS-\" + dateString);\n userAgentHeader = this.headerFactory.createUserAgentHeader(userAgentTokens);\n }\n catch (ParseException ex) {\n //shouldn't happen\n return null;\n }\n }\n return userAgentHeader;\n }", "public static String getHeader(String header)\n\t{\n\t\treturn response.getHeader(header);\n\t}", "@VTID(45)\r\n java.lang.String header();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new Fragment to be placed in the activity layout
private void ShowHistory() { History_Fragment historyFragmnet = new History_Fragment(); // In case this activity was started with special instructions from an // Intent, pass the Intent's extras to the fragment as arguments historyFragmnet.setArguments(getIntent().getExtras()); // Add the fragment to the 'fragment_container' FrameLayout getSupportFragmentManager().beginTransaction() .add(R.id.fragment_container, historyFragmnet).commit(); }
[ "protected void setupFragment() {\n\n int courseCode = getIntent().getIntExtra(Constants.KEY_COURSE_ID, -1);\n int moduleCode = getIntent().getIntExtra(Constants.KEY_MODULE_ID, -1);\n int toolCode = getIntent().getIntExtra(Constants.KEY_TOOL_ID, -1);\n ContentsFragment fragment = ContentsFragment.newInstance(courseCode, moduleCode, toolCode);\n\n FragmentManager fragmentManager = getSupportFragmentManager();\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n fragmentTransaction.replace(R.id.container_body, fragment);\n fragmentTransaction.commit();\n }", "@NonNull\n @Override\n public Fragment createFragment(int position) {\n // Return new fragment\n return ScheduleFragment.newInstance(position, mProgram);\n }", "@Nullable\n @Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View layout = inflater.inflate(R.layout.fragment_main, container, false);\n mId = getArguments() != null ? getArguments().getInt(\"position\") : 0; //Retrieves the info which tab is currently loaded\n setFragment(layout);\n return layout;\n }", "@Override\r\n\tprotected Fragment createFragment() {\n\t\treturn new DescriptioFragment();\r\n\t}", "@Override\n\tprotected Fragment createFragment() {\n\t\tUUID crimeId = (UUID)getIntent()\n\t\t\t\t.getSerializableExtra(CrimeFragment.EXTRA_CRIME_ID);\n\t\treturn CrimeFragment.newInstance(crimeId);\n\t}", "@NonNull\n @Override\n public Fragment createFragment(int position) {\n if(WallActivity.isQuickCalculation) position += 1;\n\n if(position == 0) return new WallInfoFragment();\n else if(position == 1) return new SoleBoardAreaFragment();\n else if(position == 2) return new WallAnchorDistanceFragment();\n else return new WallInfoFragment();\n }", "protected void createUI() {\n fm = getSupportFragmentManager();\n fragment = fm.findFragmentById(R.id.fragmentContainer);\n\n if (fragment == null) {\n fragment = new CardFragment();\n\n fm.beginTransaction()\n .add(R.id.fragmentContainer, fragment)\n .commit();\n }\n }", "@SuppressLint(\"SetTextI18n\")\n @Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_first, container, false);\n\n // init views\n myTaskButton = (MaterialButton)v.findViewById(R.id.my_task_button);\n welcomeTV = (MaterialTextView)v.findViewById(R.id.tv_welcome);\n\n // setting the username in the welcome textview which is received by the activity\n welcomeTV.setText(\"Welcome \" + username);\n\n // setting the onClickListener to the MyTask button, used lambda for less clutter and\n // better readability\n // User will be navigated to MyTaskFragment after clicking on this button\n myTaskButton.setOnClickListener(view -> {\n\n // create a MyTaskFragment\n Fragment fragment = new MyTaskFragment();\n\n // replacing this fragment with MyTaskFragment and adding it to stack\n getActivity().getSupportFragmentManager()\n .beginTransaction().replace(R.id.fragment_container,fragment)\n .addToBackStack(null).commit();\n\n });\n // return the created view\n return v ;\n }", "private void addFragment() {\n\t\tFileListFragment fragment = newFragment();\n\t\tfragmentManager.beginTransaction()\n\t\t\t\t.add(R.id.explorer_fragment, fragment).commit();\n\t}", "public void launchCreateAccountFragment(){\n changeFragment(new CreateUserFragment());\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_create_room, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_blank, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.fragment_p1, container, false);\n addFragment(view);\n return view;\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.mainscreen_new);\n\t\tFragmentManager fragmentManager = getFragmentManager();\n FragmentTransaction mTransaction = fragmentManager.beginTransaction();\n mTransaction.add(R.id.textView1, LayoutFragment.newInstance()).commit();\n\t}", "private void insertInitialFragment() {\n Fragment fragment = null;\n Class fragmentClass = FeedFragment.class;\n try {\n fragment = (Fragment) fragmentClass.newInstance();\n } catch (Exception e) {\n e.printStackTrace();\n }\n FragmentManager fragmentManager = getSupportFragmentManager();\n fragmentManager.beginTransaction().replace(R.id.flContent, fragment).commit();\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\t\t\t\t\t Bundle savedInstanceState) {\n\tfinal \tView view = inflater.inflate(R.layout.fragment_blank, container, false);\n\n\t\tButton button = view.findViewById(R.id.btn);\n\n\t\tbutton.setOnClickListener(new View.OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tToast.makeText(getContext(), \"BlankFragment\", Toast.LENGTH_SHORT).show();\n\n\t\t\t\t/*getChildFragmentManager()\n\t\t\t\t\t\t.beginTransaction()\n\t\t\t\t\t\t.replace(R.id.fragment_container,new BlankFragment2())\n\t\t\t\t\t\t.addToBackStack(\"\")\n\t\t\t\t\t\t.commit();*/\n\n\t\t\t}\n\t\t});\n\n\n\t\treturn view;\n\n\t}", "@Override\n\tprotected Fragment createFragment() {\n\t\t// TODO Auto-generated method stub\n\t\tDetallesFragment df = new DetallesFragment();\n\t\t\n\t\tIntent intent = getIntent();\n\t\tString x = intent.getStringExtra(\"mes\");\t\t\n\n\t\tdf.setMonth(x);\n\t\treturn df;\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n activity = (MainActivity) getActivity();\n return inflater.inflate(R.layout.fragment_create_course, container, false);\n\n\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_expation, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_new_goods, container, false);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
it updates the tuple of that participation, it has to be coherent with the old one. It should be utterly useless
@Deprecated public void update(Participation participation) { em.merge(participation); }
[ "private void editPair(String oldRelationName, Pair<Vertex, Vertex> oldPair,\r\n\t\t\t\t\t\t\tString newRelationName, Pair<Vertex, Vertex> newPair) throws TreeException, RelationException {\r\n\t\t// Suppression de ses composantes graphiques\r\n\t\tremovePair(oldRelationName, oldPair);\r\n\t\t\r\n\t\t// Ajout de ses composantes graphiques\r\n\t\taddPair(newRelationName, newPair);\r\n\t}", "void updateRoom(Room room) {\n// log(\"updateRoom\",\"called\");\n// if (room != null) {\n// mParticipants = room.getParticipants();\n// }\n// if (mParticipants != null) {\n// if (mRoomId != null) {\n// for (Participant p : mParticipants) {\n// String pid = p.getParticipantId();\n// if (pid.equals(mMyId))\n// continue;\n// if (p.getStatus() != Participant.STATUS_JOINED) {\n// leaveRoom();\n// break;\n// }}}}\n if (room != null) {\n mParticipants = room.getParticipants();\n }\n if (mParticipants != null) {\n // updatePeerScoresDisplay();\n }\n }", "public void collidedWith (Participant p) {\n \n }", "void updateChatroom(Chatroom chatroom);", "public void update() {\n\t\t// for (Things t : allThings)\n\t\tfor (Things p : allPeople)\n\t\t\tif (p.getStopped())\n\t\t\t\tsetNewRoom(p);\n\t\t\telse {\n\t\t\t\tp.update();\n\t\t\t}\n\t}", "private void updateParticipants(final Context context, final TransferFunds transfer)\r\n throws HomeException\r\n {\r\n final Home transferTypesHome = (Home)context.get(TransferTypeHome.class);\r\n final TransferType tranferType =\r\n (TransferType)transferTypesHome.find(context, Long.valueOf(transfer.getTransferType()));\r\n\r\n updateParticipant(context, transfer.getContributorMobileNumber(), tranferType.getContributorTypeID(),\r\n transfer.getContributorDetails());\r\n\r\n updateParticipant(context, transfer.getRecipientMobileNumber(), tranferType.getRecipientTypeID(),\r\n transfer.getRecipientDetails());\r\n }", "@Override\r\n\tpublic void update(Pedido t) {\n\t\t\r\n\t}", "public boolean updatePersonInfo(){\n if (!orderSelected){\n Log.v(TAG, \"updatePersonInfo(): haven't chosen order yet!\");\n return false;\n }\n mTeachers = new ArrayList<>();\n mStudents = new ArrayList<>();\n Period p = mInterviewInfo.periods.get(orderIndex);\n for (int i = 0; i < p.teachers.size(); i++) {\n String id = p.teachers.get(i).id;\n String name = p.teachers.get(i).name;\n mTeachers.add(new Person(id, name));\n }\n for (int i = 0; i < p.students.size(); i++) {\n String id = p.students.get(i).id;\n String name = p.students.get(i).name;\n mStudents.add(new Person(id, name));\n }\n return true;\n }", "@Override\r\n\tpublic void uniqueUpdate() {\n\t\t\r\n\t}", "private void updateInformation() {\n board.getEmptyLands();\n\n //for returnPlayerInTurn\n for (Player player : board.getPlayers()) {\n if (player.isHandout()) {\n playerInTurn = player;\n }\n }\n }", "@Override\n public void updateActivity() {\n final Group updatedGroup = Model.getInstance(getFilesDir()).getSelectedGroup();\n if (!selectedGroup.allIsEqual(updatedGroup)) {\n selectedGroup = updatedGroup;\n System.out.println(\"UPDATING FRAGMENT LISTS\");\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n FragmentChores.updateList(selectedGroup.getChores());\n FragmentRewards.updateList(selectedGroup.getRewards());\n FragmentScore.updateList(selectedGroup.getPoints());\n }\n });\n }\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n updateUserPoints();\n }\n });\n }", "@Override\n\t\tpublic void updateAllParts() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void updateFriendship(long arg0, boolean arg1, boolean arg2) {\n\t\t\r\n\t}", "@Override\n\tpublic void updateTogetherMember(TogetherMember togetherMember) throws DataAccessException {\n\t\t\n\t}", "public void updateLeaders() {\n for (Maillot maillot : this.maillots) {\n getActualLeader(maillot.getType(), maillotMaillotViewHolderMap.get(maillot));\n }\n }", "private void updateAllegiances() {\n \n ArrayList<Pair<GridPane, MovingEntity>> convertedEnemies = new ArrayList<Pair<GridPane, MovingEntity>>();\n ArrayList<Pair<GridPane, MovingEntity>> convertedFriendlies = new ArrayList<Pair<GridPane, MovingEntity>>();\n\n for (Pair<GridPane, MovingEntity> pair: onloadedEnemies) {\n if (pair.getValue1().isFriendly()) {\n convertedEnemies.add(pair);\n }\n }\n for (Pair<GridPane, MovingEntity> pair: onloadedFriendlies) {\n if (!pair.getValue1().isFriendly()) {\n convertedFriendlies.add(pair);\n }\n }\n for (Pair<GridPane, MovingEntity> pair: convertedEnemies) {\n onloadedEnemies.remove(pair);\n // remove old display\n enemies.getChildren().remove(pair.getValue0());\n onloadFriendly(pair.getValue1(), screenWidth/1.5 + 20 * onloadedFriendlies.size());\n }\n for (Pair<GridPane, MovingEntity> pair: convertedFriendlies) {\n onloadedFriendlies.remove(pair);\n // remove old display\n friendlies.getChildren().remove(pair.getValue0());\n onloadEnemy(pair.getValue1(), screenWidth/1.5 + 20 * onloadedEnemies.size());\n }\n }", "private void update(Record r){\n r.next = record;\n record = r;\n }", "public void update(Pair pair) throws PairNotFoundException;", "private void reOrderParticipations(List<ResultParticipation> newParticipationsOrder) {\n int order = 0;\n for (ResultParticipation participation : newParticipationsOrder) {\n participation.setPersonOrder(order++);\n }\n }", "void update(Correo a);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Manipulate the given file descriptor.
public static int fcntl(int fd, int cmd, int args) { // TODO: implement return Error.errno(Error.EACCES); }
[ "private void protectFileDescriptor(FileDescriptor fd) {\n Exception exp;\n try {\n Method getInt = FileDescriptor.class.getDeclaredMethod(\"getInt$\");\n int fdint = (Integer) getInt.invoke(fd);\n\n // You can even get more evil by parsing toString() and extract the int from that :)\n\n this.mOpenVPNService.protect(fdint);\n\n //ParcelFileDescriptor pfd = ParcelFileDescriptor.fromFd(fdint);\n //pfd.close();\n NativeUtils.jniclose(fdint);\n return;\n } catch (NoSuchMethodException e) {\n exp =e;\n } catch (IllegalArgumentException e) {\n exp =e;\n } catch (IllegalAccessException e) {\n exp =e;\n } catch (InvocationTargetException e) {\n exp =e;\n } catch (NullPointerException e) {\n exp =e;\n }\n\n Log.e(TAG, \"Failed to retrieve fd from socket: \" + fd, exp);\n }", "private native void setFDImpl(FileDescriptor fd, long handle);", "private void protectFileDescriptor(FileDescriptor fd) {\n\t\ttry {\n\t\t\tMethod getInt = FileDescriptor.class.getDeclaredMethod(\"getInt$\");\n\t\t\tint fdint = (Integer) getInt.invoke(fd);\n\n\t\t\tboolean result = mVpnMgr.protect(fdint);\n if (!result) {\n Log.e(TAG, \"Can't protect VPN socket\");\n }\n\n ParcelFileDescriptor.adoptFd(fdint).close();\n\t\t} catch (Exception e) {\n\t\t\tLog.e(TAG, \"Error while protecting fd=\" + fd, e);\n\t\t}\n\t}", "String closeFile(int fd);", "public static void close(FileDescriptor fd) throws IOException {\n try {\n if (fd != null && fd.valid()) {\n Libcore.os.close(fd);\n }\n } catch (ErrnoException errnoException) {\n throw errnoException.rethrowAsIOException();\n }\n }", "public static synchronized\n void setParcelFileDescriptor(ParcelFileDescriptor next) {\n if (mReadThread != null) {\n mReadThread.stopThread();\n mReadThread = null;\n }\n if (mWriteThread != null) {\n mWriteThread.stopThread();\n mWriteThread = null;\n }\n mParcelFileDescriptor = next;\n if (mParcelFileDescriptor != null) {\n FileDescriptor fd = mParcelFileDescriptor.getFileDescriptor();\n mWriteThread = new WriteThread(new FileOutputStream(fd));\n mWriteThread.startThread();\n mReadThread = new ReadThread(mWriteThread,\n new FileInputStream(fd));\n mReadThread.startThread();\n }\n }", "public void close(String fd) {\n try {\n if (!fs) {\n System.out.println(\"File system wasn't mounted!\");\n return;\n }\n int i = Integer.parseInt(fd);\n fileSystem.closeRegularFile(i);\n } catch (Exception e) {\n System.out.println(\"'\" + fd + \"' is not numeral!\");\n }\n }", "public FileReader(FileDescriptor fd) { \n \tsuper(new FileInputStream(fd)); \n }", "private static native void truncateFile(int handle,\n int size) throws IOException;", "@Override\n protected void close() {\n mPfd.detachFd();\n }", "public com.bbn.tc.schema.avro.cdm18.FileObject.Builder clearFileDescriptor() {\n fileDescriptor = null;\n fieldSetFlags()[3] = false;\n return this;\n }", "public int getFiledescriptor() {\n return filedescriptor_;\n }", "protected ProcessInputStream(long handle) {\n this.fd = new java.io.FileDescriptor();\n setFDImpl(fd, handle);\n this.handle = handle;\n }", "private static ParcelFileDescriptor openFileDescriptor(String path, boolean readonly) throws Exception {\n\t\tif (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n\t\t\tint fd = -1;\n\t\t\tif (readonly) {\n\t\t\t\tfinal FileInputStream fis = new FileInputStream(path);\n\t\t\t\tfd = mDescriptor.getInt(fis.getFD());\n\t\t\t} else {\n\t\t\t\tfinal FileOutputStream fos = new FileOutputStream(path);\n\t\t\t\tfd = mDescriptor.getInt(fos.getFD());\n\t\t\t}\n\t\t\tif (fd != -1)\n\t\t\t\treturn ParcelFileDescriptor.fromFd(fd);\n\t\t}\n\t\tthrow new FileNotFoundException();\n\t}", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tString line;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tline = dis.readLine();\n\t\t\t\t\t\twhile (line != null) {\n\t\t\t\t\t\t\tLog.e(TAG, \"openevent line = \" + line);\n\t\t\t\t\t\t\tif (line.contains(\"event\")) {\n\t\t\t\t\t\t\t\tString cmd = \"busybox chmod 777 /dev/input/\" + line;\n\t\t\t\t\t\t\t\tLog.e(TAG, \"cmd = \" + cmd);\n//\t\t\t\t\t\t\t\tRoot.execCmmd(cmd);\n\t\t\t\t\t\t\t\tRoot.chmod(cmd);\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\tif (openDeviceLocked(\"/dev/input/\" + line) < 0) {\n\t\t\t\t\t\t\t\t\tLog.e(TAG, \"open /dev/intpu/\" + line + \" error\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tline = dis.readLine();\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}", "public static int write(int fd, byte buffer[]) {\n return Kernel.interrupt(Kernel.INTERRUPT_SOFTWARE, Kernel.WRITE, fd, buffer);\n }", "public final FileDescriptor getFD() throws IOException {\n if (fd != null) {\n return fd;\n }\n throw new IOException();\n }", "public int inumber(int fd) throws IOException;", "private void readFileFromSocketChannel(SocketChannel socketChannel) throws IOException {\n Path path = Paths.get(\"C:\\\\Users\\\\mi\\\\Desktop\\\\Server\\\\construction-copy.mp4\");\n FileChannel fileChannel = FileChannel.open(path,\n EnumSet.of(StandardOpenOption.CREATE,\n StandardOpenOption.TRUNCATE_EXISTING,\n StandardOpenOption.WRITE)\n );\n //Allocate a ByteBuffer\n ByteBuffer buffer = ByteBuffer.allocate(4096);\n while (socketChannel.read(buffer) > 0) {\n buffer.flip();\n fileChannel.write(buffer);\n buffer.clear();\n }\n fileChannel.close();\n System.out.println(\"Receving file successfully!\");\n socketChannel.close();\n }", "private static native void setPosition(int handle, int pos)\n throws IOException;" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests iterating a bundle which has a single constituent.
@Test public void testIteratorWithSingleConstituent() { // given Product product = createProductWithSkuCode("A_PRODUCT_CODE", "A_SKU_CODE"); ProductBundle bundle = new ProductBundleImpl(); bundle.addConstituent(createBundleConstituent(product)); // test BundleIteratorImpl bundleIterator = new BundleIteratorImpl(bundle); BundleConstituent constituent = bundleIterator.iterator().next(); Assert.assertEquals(product.getCode(), constituent.getConstituent().getCode()); }
[ "@Test\n public void testGetSingleByExternalIdBundleVersion() {\n // single region is picked based on iterator.next()\n try {\n assertEquals(_narrowingSource.getSingle(FR_ID.toBundle(), LATEST), REGION_1);\n } catch (final AssertionError e) {\n assertEquals(_narrowingSource.getSingle(FR_ID.toBundle(), LATEST), REGION_2);\n }\n assertEquals(_narrowingSource.getSingle(EUR_ID.toBundle(), LATEST), REGION_2);\n assertEquals(_narrowingSource.getSingle(US_ID.toBundle(), LATEST), REGION_3);\n }", "@Override\n public Iterator<Bundle> bundleIterator() { return bundle_set.iterator(); }", "@Test\n\tpublic void testGetSkuCodesForInventoryLookupBundle1Level() {\n\t\tProductInventoryShoppingServiceImpl service = new ProductInventoryShoppingServiceImpl();\n\n\t\tProductBundle product = new ProductBundleImpl();\n\t\tProductSku sku = new ProductSkuImpl();\n\t\tsku.setSkuCode(\"ABC\");\n\t\tsku.setGuid(\"ABC\");\n\t\tproduct.addOrUpdateSku(sku);\n\n\t\tProduct product1 = new ProductImpl();\n\t\tProductSku sku1 = new ProductSkuImpl();\n\t\tsku1.setSkuCode(\"DEF\");\n\t\tsku1.setGuid(\"DEF\");\n\t\tproduct1.addOrUpdateSku(sku1);\n\n\t\tBundleConstituent constituent1 = new BundleConstituentImpl();\n\t\tconstituent1.setConstituent(product1);\n\t\tproduct.addConstituent(constituent1);\n\n\t\tProduct product2 = new ProductImpl();\n\t\tProductSku sku2 = new ProductSkuImpl();\n\t\tsku2.setSkuCode(\"GHI\");\n\t\tsku2.setGuid(\"GHI\");\n\t\tproduct2.addOrUpdateSku(sku2);\n\n\t\tBundleConstituent constituent2 = new BundleConstituentImpl();\n\t\tconstituent2.setConstituent(product2);\n\t\tproduct.addConstituent(constituent2);\n\n\t\tProduct product3 = new ProductImpl();\n\t\tProductSku sku3 = new ProductSkuImpl();\n\t\tsku3.setSkuCode(\"JKL\");\n\t\tsku3.setGuid(\"JKL\");\n\t\tproduct3.addOrUpdateSku(sku3);\n\n\t\tBundleConstituent constituent3 = new BundleConstituentImpl();\n\t\tconstituent3.setConstituent(product3);\n\t\tproduct.addConstituent(constituent3);\n\n\t\tSet<String> resultSet = service.getSkuCodesForInventoryLookup(product, null);\n\t\tassertEquals(\"4 sku codes (1 for root + 1 for each child\", FOUR, resultSet.size());\n\t\tassertTrue(\"Contains root sku code\", resultSet.contains(\"ABC\"));\n\t\tassertTrue(\"Contains constituent1\", resultSet.contains(\"DEF\"));\n\t\tassertTrue(\"Contains constituent2\", resultSet.contains(\"GHI\"));\n\t\tassertTrue(\"Contains constituent3\", resultSet.contains(\"JKL\"));\n\t}", "public Iterator<Bundle> bundleIterator() { return bundle_set.iterator(); }", "void mo33855g(int i, Bundle bundle) throws RemoteException;", "void mo5248b(int i, Bundle bundle) throws RemoteException;", "void mo38545a(int i, Bundle bundle) throws RemoteException;", "@Test\r\n public void getOneMissionBundleByIdTest() throws JSONException {\r\n response = this.restTemplate.getForObject(\"/missionbundles/1\", String.class);\r\n JSONAssert.assertEquals(\"{\\n\" +\r\n \" \\\"bundleid\\\": 1,\\n\" +\r\n \" \\\"listofmissions\\\": [\\n\" +\r\n \" 25,\\n\" +\r\n \" 3\\n\" +\r\n \" ],\\n\" +\r\n \" \\\"bundlename\\\": \\\"Kettujutut\\\"\\n\" +\r\n \" }\", response, false);\r\n }", "void mo33589a(int i, Bundle bundle) throws RemoteException;", "public void mo50a(int i, Bundle bundle) {\n }", "void mo33598e(Bundle bundle) throws RemoteException;", "void mo33853e(Bundle bundle) throws RemoteException;", "@Test\n public void testFindSingleBook() {\n boolean isSuccess = true;\n Book testBookInfo = bookControl.findAnySingleBook(bookTest.book.getIsbn());\n LOG.debug(testBookInfo.toString());\n if (!(testBookInfo.toString().equals(bookTest.book.toString()))) {\n isSuccess = false;\n }\n assertTrue(\"Book info returned inconsistent results Expected:\"+bookTest.book.toString()+\" Result:\"+testBookInfo.toString(), isSuccess);\n }", "public interface IBundle {\n\n /**\n * Get the corresponding tile entity.\n * @return\n */\n TileEntity getTileEntity();\n\n /**\n * Find a section in this bundle of the given type and connected to the given block id\n * @param type\n * @param subType\n * @param id\n * @return\n */\n ICableSection findSection(ICableType type, ICableSubType subType, int id);\n\n}", "@Test\n public void testLoadAllValueObjectsOneTaxon() {\n ad = ( ArrayDesign ) persisterHelper.persist( ad );\n\n Collection<Long> ids = new HashSet<>();\n ids.add( ad.getId() );\n Collection<ArrayDesignValueObject> vos = arrayDesignService.loadValueObjectsByIds( ids );\n assertNotNull( vos );\n assertEquals( 1, vos.size() );\n String taxon = vos.iterator().next().getTaxon();\n\n assertEquals( \"mouse\", taxon );\n\n }", "public void testForOf_const() {\n testTypes(\"/** @type {!Iterable} */ const it = []; for (const elem of it) {}\");\n }", "public abstract void mo859b(Bundle bundle);", "@Test\n public void testExistsAsType_CycObject() throws Exception {\n System.out.println(\"existsAsType\");\n String nameOrId1 = \"AlbertEinstein\";\n CycObject object1 = TestConstants.getCyc().getLookupTool().getKnownConstantByName(nameOrId1);\n boolean expResult1 = true;\n boolean result1 = KbIndividualImpl.existsAsType(object1);\n assertEquals(expResult1, result1);\n\n String nameOrId2 = \"Scientist\";\n CycObject object2 = TestConstants.getCyc().getLookupTool().getKnownConstantByName(nameOrId2);\n boolean expResult2 = false;\n boolean result2 = KbIndividualImpl.existsAsType(object2);\n assertEquals(expResult2, result2);\n }", "void mo42115a(Bundle bundle);", "public int size() { return bundle_set.size(); }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
All entry points must implement this
interface BaseKrunEntry { public abstract void run_iter(int param); }
[ "@Override\n public void extornar() {\n \n }", "@Override\r\n public void publicando() {\n }", "@Override\n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "public void entry() {\n\n\t}", "protected Hook() {\n startup();\n }", "@Override\n protected void init()\n {\n\n }", "@Override\n protected void start() {\n\n }", "protected Exam() {\n\t}", "private Api() {\n init();\n }", "private Engine() {\n\t\tthrow new UnsupportedOperationException(\n\t\t\t\"This utility class should not be instantiated\");\n\t}", "@Override\n public void hello() {\n \n }", "@Override\r\n\t\t\tprotected void startup() throws Exception {\n\t\t\t\tsuper.startup();\r\n\t\t\t}", "@Override\n public void initialize() {\n \n }", "@Override\r\n\tpublic void limpar() {\n\t\t\r\n\t}", "private void SlingApi() {\n\t\t\r\n\t}", "@Override\n\tprotected void location() {\n\t\t\n\t}", "@Override\n\t\t\t\t\t\t\t\tpublic void start() {\n\n\t\t\t\t\t\t\t\t}", "private void backport()\n {\n new Backporter(configuration).execute(programClassPool,\n libraryClassPool,\n injectedClassNameMap);\n }", "private FrameworkSupportUtils() {}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional .datayes.mdl.mdl_szl2_pbmsg.double_6 DifPrice1 = 15;
public datayes.mdl.mdl_szl2_pbmsg.MDLSZL2Msg.double_6 getDifPrice1() { return difPrice1_; }
[ "datayes.mdl.mdl_szl1_pbmsg.MDLSZL1Msg.float_3 getOpenPrice();", "datayes.mdl.mdl_szl1_pbmsg.MDLSZL1Msg.float_3OrBuilder getAskPrice1OrBuilder();", "com.felania.msldb.MsgPriceOuterClass.MsgPrice getSellPrice();", "public datayes.mdl.mdl_szl1_pbmsg.MDLSZL1Msg.float_3OrBuilder getBidPrice2OrBuilder() {\n if (bidPrice2Builder_ != null) {\n return bidPrice2Builder_.getMessageOrBuilder();\n } else {\n return bidPrice2_;\n }\n }", "public datayes.mdl.mdl_szl1_pbmsg.MDLSZL1Msg.float_3OrBuilder getAskPrice2OrBuilder() {\n return askPrice2_;\n }", "public datayes.mdl.mdl_szl1_pbmsg.MDLSZL1Msg.float_3OrBuilder getAskPrice1OrBuilder() {\n return askPrice1_;\n }", "public datayes.mdl.mdl_szl1_pbmsg.MDLSZL1Msg.float_3 getAskPrice2() {\n return askPrice2_;\n }", "public float getDif_quant()\n/* */ {\n/* 115 */ return this.dif_quant;\n/* */ }", "@Override\r\n\tpublic double getPricePlusVAT(double price) {\n\t\treturn price * 1.05;\r\n\t}", "@Override\n public double price() {\n return 8.99 + super.PER_EXTRA * (super.extras.size());\n }", "public double getprice(){\n return this.price1;\n}", "double dPrice(){\n\treturn (size + toppings);\n\t}", "public void setPrice(String price2) {\n\t\t\n\t}", "@Override\n\tpublic Float price() {\n\t\treturn 2.0f;\n\t}", "public double getPrice() {return this.price;}", "public double getPux16OtherPaymentAmt();", "public datayes.mdl.mdl_szl1_pbmsg.MDLSZL1Msg.float_3 getAskPrice4() {\n if (askPrice4Builder_ == null) {\n return askPrice4_;\n } else {\n return askPrice4Builder_.getMessage();\n }\n }", "@Override\r\n\tpublic double getPrice() {\n\t\treturn 2000000;\r\n\t}", "public datayes.mdl.mdl_szl1_pbmsg.MDLSZL1Msg.float_3OrBuilder getOpenPriceOrBuilder() {\n if (openPriceBuilder_ != null) {\n return openPriceBuilder_.getMessageOrBuilder();\n } else {\n return openPrice_;\n }\n }", "public BigDecimal getPriceofkg1() {\n return priceofkg1;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end rule__Block__Group__1__Impl $ANTLR start rule__Block__Group__2 ../org.xtext.example.swrtj.ui/srcgen/org/xtext/example/ui/contentassist/antlr/internal/InternalSwrtj.g:8868:1: rule__Block__Group__2 : rule__Block__Group__2__Impl ;
public final void rule__Block__Group__2() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.example.swrtj.ui/src-gen/org/xtext/example/ui/contentassist/antlr/internal/InternalSwrtj.g:8872:1: ( rule__Block__Group__2__Impl ) // ../org.xtext.example.swrtj.ui/src-gen/org/xtext/example/ui/contentassist/antlr/internal/InternalSwrtj.g:8873:2: rule__Block__Group__2__Impl { pushFollow(FollowSets000.FOLLOW_rule__Block__Group__2__Impl_in_rule__Block__Group__218145); rule__Block__Group__2__Impl(); _fsp--; if (failed) return ; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { restoreStackSize(stackSize); } return ; }
[ "public final void rule__Block__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:7628:1: ( rule__Block__Group__1__Impl rule__Block__Group__2 )\n // InternalMyDsl.g:7629:2: rule__Block__Group__1__Impl rule__Block__Group__2\n {\n pushFollow(FOLLOW_25);\n rule__Block__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__Block__Group__2();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Testblock__Group__12() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalEis.g:2095:1: ( rule__Testblock__Group__12__Impl )\n // InternalEis.g:2096:2: rule__Testblock__Group__12__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Testblock__Group__12__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XBlockExpression__Group_2__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOcelet.g:16341:1: ( rule__XBlockExpression__Group_2__0__Impl rule__XBlockExpression__Group_2__1 )\n // InternalOcelet.g:16342:2: rule__XBlockExpression__Group_2__0__Impl rule__XBlockExpression__Group_2__1\n {\n pushFollow(FOLLOW_36);\n rule__XBlockExpression__Group_2__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__XBlockExpression__Group_2__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Testblock__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalEis.g:1798:1: ( rule__Testblock__Group__1__Impl rule__Testblock__Group__2 )\n // InternalEis.g:1799:2: rule__Testblock__Group__1__Impl rule__Testblock__Group__2\n {\n pushFollow(FOLLOW_13);\n rule__Testblock__Group__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Testblock__Group__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__SJBlock__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSmallJava.g:1240:1: ( rule__SJBlock__Group__2__Impl rule__SJBlock__Group__3 )\n // InternalSmallJava.g:1241:2: rule__SJBlock__Group__2__Impl rule__SJBlock__Group__3\n {\n pushFollow(FOLLOW_14);\n rule__SJBlock__Group__2__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__SJBlock__Group__3();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Statement__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalEis.g:5335:1: ( rule__Statement__Group__2__Impl rule__Statement__Group__3 )\n // InternalEis.g:5336:2: rule__Statement__Group__2__Impl rule__Statement__Group__3\n {\n pushFollow(FOLLOW_27);\n rule__Statement__Group__2__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Statement__Group__3();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__LabeledStatement__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:7979:1: ( rule__LabeledStatement__Group__2__Impl )\n // InternalMyDsl.g:7980:2: rule__LabeledStatement__Group__2__Impl\n {\n pushFollow(FOLLOW_2);\n rule__LabeledStatement__Group__2__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Statement__Group_2__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMiniJava.g:2503:1: ( rule__Statement__Group_2__0__Impl rule__Statement__Group_2__1 )\n // InternalMiniJava.g:2504:2: rule__Statement__Group_2__0__Impl rule__Statement__Group_2__1\n {\n pushFollow(FOLLOW_12);\n rule__Statement__Group_2__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Statement__Group_2__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Source__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDSL.g:1281:1: ( ( ( rule__Source__Group_2__0 )? ) )\n // InternalDSL.g:1282:1: ( ( rule__Source__Group_2__0 )? )\n {\n // InternalDSL.g:1282:1: ( ( rule__Source__Group_2__0 )? )\n // InternalDSL.g:1283:2: ( rule__Source__Group_2__0 )?\n {\n before(grammarAccess.getSourceAccess().getGroup_2()); \n // InternalDSL.g:1284:2: ( rule__Source__Group_2__0 )?\n int alt13=2;\n int LA13_0 = input.LA(1);\n\n if ( (LA13_0==36) ) {\n alt13=1;\n }\n switch (alt13) {\n case 1 :\n // InternalDSL.g:1284:3: rule__Source__Group_2__0\n {\n pushFollow(FOLLOW_2);\n rule__Source__Group_2__0();\n\n state._fsp--;\n\n\n }\n break;\n\n }\n\n after(grammarAccess.getSourceAccess().getGroup_2()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__TeststepBlock__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalEis.g:4849:1: ( rule__TeststepBlock__Group__1__Impl rule__TeststepBlock__Group__2 )\n // InternalEis.g:4850:2: rule__TeststepBlock__Group__1__Impl rule__TeststepBlock__Group__2\n {\n pushFollow(FOLLOW_57);\n rule__TeststepBlock__Group__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__TeststepBlock__Group__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Statement__Group_2__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMiniJava.g:2557:1: ( rule__Statement__Group_2__2__Impl rule__Statement__Group_2__3 )\n // InternalMiniJava.g:2558:2: rule__Statement__Group_2__2__Impl rule__Statement__Group_2__3\n {\n pushFollow(FOLLOW_16);\n rule__Statement__Group_2__2__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Statement__Group_2__3();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Statement__Group_2__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMiniJava.g:2530:1: ( rule__Statement__Group_2__1__Impl rule__Statement__Group_2__2 )\n // InternalMiniJava.g:2531:2: rule__Statement__Group_2__1__Impl rule__Statement__Group_2__2\n {\n pushFollow(FOLLOW_29);\n rule__Statement__Group_2__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Statement__Group_2__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Compare__Group__2__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.upb.llvm_parser.ui/src-gen/de/upb/llvm_parser/ui/contentassist/antlr/internal/InternalLLVM.g:17178:1: ( ( ( rule__Compare__Group_2__0 ) ) )\r\n // ../de.upb.llvm_parser.ui/src-gen/de/upb/llvm_parser/ui/contentassist/antlr/internal/InternalLLVM.g:17179:1: ( ( rule__Compare__Group_2__0 ) )\r\n {\r\n // ../de.upb.llvm_parser.ui/src-gen/de/upb/llvm_parser/ui/contentassist/antlr/internal/InternalLLVM.g:17179:1: ( ( rule__Compare__Group_2__0 ) )\r\n // ../de.upb.llvm_parser.ui/src-gen/de/upb/llvm_parser/ui/contentassist/antlr/internal/InternalLLVM.g:17180:1: ( rule__Compare__Group_2__0 )\r\n {\r\n before(grammarAccess.getCompareAccess().getGroup_2()); \r\n // ../de.upb.llvm_parser.ui/src-gen/de/upb/llvm_parser/ui/contentassist/antlr/internal/InternalLLVM.g:17181:1: ( rule__Compare__Group_2__0 )\r\n // ../de.upb.llvm_parser.ui/src-gen/de/upb/llvm_parser/ui/contentassist/antlr/internal/InternalLLVM.g:17181:2: rule__Compare__Group_2__0\r\n {\r\n pushFollow(FOLLOW_rule__Compare__Group_2__0_in_rule__Compare__Group__2__Impl34966);\r\n rule__Compare__Group_2__0();\r\n\r\n state._fsp--;\r\n\r\n\r\n }\r\n\r\n after(grammarAccess.getCompareAccess().getGroup_2()); \r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__SJBlock__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSmallJava.g:1213:1: ( rule__SJBlock__Group__1__Impl rule__SJBlock__Group__2 )\n // InternalSmallJava.g:1214:2: rule__SJBlock__Group__1__Impl rule__SJBlock__Group__2\n {\n pushFollow(FOLLOW_14);\n rule__SJBlock__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__SJBlock__Group__2();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Type__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAsomemodel.g:1233:1: ( rule__Type__Group__2__Impl )\n // InternalAsomemodel.g:1234:2: rule__Type__Group__2__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Type__Group__2__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__BlockStatement__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // InternalBehavior.g:3409:1: ( rule__BlockStatement__Group__3__Impl )\n // InternalBehavior.g:3410:2: rule__BlockStatement__Group__3__Impl\n {\n pushFollow(FOLLOW_2);\n rule__BlockStatement__Group__3__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__CodeBlock__Group_2__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.eclipse.xtext.xdoc.ui/src-gen/org/eclipse/xtext/xdoc/ui/contentassist/antlr/internal/InternalXdoc.g:9739:1: ( rule__CodeBlock__Group_2__0__Impl rule__CodeBlock__Group_2__1 )\n // ../org.eclipse.xtext.xdoc.ui/src-gen/org/eclipse/xtext/xdoc/ui/contentassist/antlr/internal/InternalXdoc.g:9740:2: rule__CodeBlock__Group_2__0__Impl rule__CodeBlock__Group_2__1\n {\n pushFollow(FOLLOW_rule__CodeBlock__Group_2__0__Impl_in_rule__CodeBlock__Group_2__019696);\n rule__CodeBlock__Group_2__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__CodeBlock__Group_2__1_in_rule__CodeBlock__Group_2__019699);\n rule__CodeBlock__Group_2__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Type__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.intel.llvm.ireditor.ui/src-gen/com/intel/llvm/ireditor/ui/contentassist/antlr/internal/InternalLLVM_IR.g:27138:1: ( rule__Type__Group__2__Impl )\n // ../com.intel.llvm.ireditor.ui/src-gen/com/intel/llvm/ireditor/ui/contentassist/antlr/internal/InternalLLVM_IR.g:27139:2: rule__Type__Group__2__Impl\n {\n pushFollow(FollowSets005.FOLLOW_rule__Type__Group__2__Impl_in_rule__Type__Group__255621);\n rule__Type__Group__2__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XBlockExpression__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../fr.obeo.dsl.sprototyper.ui/src-gen/fr/obeo/dsl/ui/contentassist/antlr/internal/InternalSPrototyper.g:18926:1: ( rule__XBlockExpression__Group__1__Impl rule__XBlockExpression__Group__2 )\n // ../fr.obeo.dsl.sprototyper.ui/src-gen/fr/obeo/dsl/ui/contentassist/antlr/internal/InternalSPrototyper.g:18927:2: rule__XBlockExpression__Group__1__Impl rule__XBlockExpression__Group__2\n {\n pushFollow(FOLLOW_rule__XBlockExpression__Group__1__Impl_in_rule__XBlockExpression__Group__138406);\n rule__XBlockExpression__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XBlockExpression__Group__2_in_rule__XBlockExpression__Group__138409);\n rule__XBlockExpression__Group__2();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__ClassBlock__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalApiTestingDsl.g:181:1: ( rule__ClassBlock__Group__0__Impl rule__ClassBlock__Group__1 )\n // InternalApiTestingDsl.g:182:2: rule__ClassBlock__Group__0__Impl rule__ClassBlock__Group__1\n {\n pushFollow(FOLLOW_4);\n rule__ClassBlock__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__ClassBlock__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Numero de control de la factura
public String getNumeroControl() { return numeroControl; }
[ "public String getNumeroFactura()\r\n/* 286: */ {\r\n/* 287:328 */ return this.numeroFactura;\r\n/* 288: */ }", "public int calcularComision () {\n return (int) ((float) precio * 0.05);\n }", "public int getNumeroFila() {\n return numeroFila;\n }", "private static void excliurNum() {\n\t\t\n\t}", "public static int CantidadMPrepago (int minutoPrepago , int recarga ){\n return (recarga/minutoPrepago);\n}", "int getNumeroEtiqueta();", "public int getFECHFACTU() {\n return fechfactu;\n }", "public int ValorNumerico(){\n if(tablero.mesaJuego.verElEstadoDelJuego()==3){\n return valorSuma;\n }else if(tablero.mesaJuego.verElEstadoDelJuego()==1){\n return Premio;\n }\n return 0;\n }", "public float valorCapacidad() { //Metodo tipo funcion\r\n float capacidad;\r\n float pi = 3.1416f; //Si no incluimos la f el compilador considera que 3.1416 es double\r\n capacidad = pi * (diametro / 2) * (diametro / 2) * altura;\r\n return capacidad;\r\n }", "String getNumeroSerie();", "protected float CalcularGanhos(){\r\n return 1;\r\n }", "public void bruceesteira6est() {\n\n switch (estagio) {\n\n case 1:\n resultado = 6.4;\n break;\n case 2:\n resultado = 10.00;\n break;\n case 3:\n resultado = 15.00;\n break;\n case 4:\n resultado = 25.00;\n break;\n case 5:\n resultado = 35.00;\n break;\n case 6:\n resultado = 45.00;\n break;\n default:\n resultado = 00.00;\n break;\n }\n\n }", "float getGENUL33();", "public static double getFrottement(){\n\t\t return 0.013; // valeur arbitraire, a determiner experimentalement\n\t}", "java.lang.String getNumeroTarjeta();", "long getNumeroEssieu();", "public int getNumerator(){\r\n return numerator;\r\n }", "public abstract int getPrecio();", "protected int getF()\n {\n int result = nextLower(1 / 3.0 * getN());\n return result;\n }", "public void fonctionPrincipale() {\n\n int res = factorielle(16);\n System.out.println(res + 1);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
NotIn specifies that this field cannot be equal to one of the specified values repeated sint64 not_in = 7;
public Builder addAllNotIn( java.lang.Iterable<? extends java.lang.Long> values) { ensureNotInIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, notIn_); onChanged(); return this; }
[ "public static <T> SearchSpec<T> notIn(String field, String... values) {\n return valueOf(SearchCriterion.valueOf(field, \"not in\", values));\n }", "public <T extends Enum<T>>\n Combinator notIn(Variable<T> var, Iterable<T> values) {\n ImmutableSet<T> valueSet = ImmutableSet.copyOf(values);\n ImmutableSet<T> invValueSet = ImmutableSet.copyOf(\n EnumSet.complementOf(EnumSet.copyOf(valueSet)));\n return in(var, invValueSet);\n }", "public Condition notIn(final T... set) {\n \t\treturn in(set).not();\n \t}", "@Nonnull\n public Query whereNotIn(@Nonnull String field, @Nonnull List<? extends Object> values) {\n return whereNotIn(FieldPath.fromDotSeparatedString(field), values);\n }", "public Integer[] addNotIn(String inTableHandle, String inColumnName, List<Object> inValues) {\n\t\treturn addNotIn(inTableHandle, inColumnName, inValues.toArray(), \"_default\");\n\t}", "private Formula negationsIn()\n\t{\n\t\tFormula f = formula;\n\t\tFormula result = negationsIn_1();\n\t\t// Here we repeatedly apply negationsIn_1() until there are no more changes.\n\t\twhile (!f.text.equals(result.text))\n\t\t{\n\t\t\tf = result;\n\t\t\tresult = negationsIn_1(f);\n\t\t}\n\t\treturn result;\n\t}", "@Test void testNotInUncorrelatedSubQueryInSelectNotNull() {\n final String sql = \"select empno, deptno not in (\\n\"\n + \" select deptno from dept)\\n\"\n + \"from emp\";\n sql(sql).ok();\n }", "QueryTable setExceptFields(String... fields);", "public void testNot(){\n $args any = $args.of();\n\n\n $args one = $args.as(\"1\");\n $args two = $args.as(\"2\");\n\n assertTrue( any.matches(\"1\"));\n assertTrue( any.matches(\"2\"));\n\n $args notOne = any.$not( $args.as(\"1\") );\n assertFalse( notOne.matches(\"1\"));\n assertTrue( notOne.matches(\"2\"));\n\n $args notOneTwo = $args.of().$not( one, two);\n assertFalse( notOneTwo.matches(\"1\"));\n assertFalse( notOneTwo.matches(\"2\"));\n assertTrue( notOneTwo.matches(\"3\"));\n }", "default Operations<ObjBack,SelectTable, Table> notInOrIsNull(Collection<Type> value) {\n\t\tthis.setSql(\"(\" + this.toSql() + \" NOT IN :\" + this.createParam(value) + \" OR \" + this.toSql() + \" IS NULL)\");\n\t\treturn end();\n\t}", "public int getExcludeValue();", "@Test\n public void test_not_contains() {\n ConfigResultSet<Grandfather> result = runtime.newQuery(Grandfather.class)\n .add(not(contains(\"prop1\", \"value\")))\n .retrieve();\n List<Grandfather> list = Lists.newArrayList(result);\n ArrayList<String> ids = new ArrayList<>();\n for (Grandfather g : list) {\n ids.add(g.getId());\n }\n assertThat(list.size(), is(2));\n assertThat(ids, hasItems(new String[]{\"g2\", \"g4\"}));\n }", "HistoricCaseInstanceQuery variableValueNotLike(String name, String value);", "public Criteria andSpecificationIdsNotEqualToColumn(LitemallCollect.Column column) {\n addCriterion(new StringBuilder(\"specification_ids <> \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }", "public boolean hasNot() {\n return ((bitField0_ & 0x00400000) == 0x00400000);\n }", "@Test\n public void testNot() throws Exception {\n\n FakeExprNodeDesc root1 = new FakeExprNodeDesc(FakeExprNodeDesc.GENERICFUNC, \"boolean\", \"(pk between '77777' and '1000000')\");\n FakeExprNodeDesc fieldNode1 = new FakeExprNodeDesc(FakeExprNodeDesc.COL, \"boolean\", \"pk\");\n FakeExprNodeDesc valueNode1 = new FakeExprNodeDesc(FakeExprNodeDesc.CONSTANT, \"string\", \"'77777'\");\n FakeExprNodeDesc valueNode1_2 = new FakeExprNodeDesc(FakeExprNodeDesc.CONSTANT, \"string\", \"'1000000'\");\n root1.addChild(fieldNode1, valueNode1, valueNode1_2);\n\n FakeExprNodeDesc root = new FakeExprNodeDesc(FakeExprNodeDesc.GENERICFUNC, \"boolean\", \"NOT (pk between '77777' and '1000000')\");\n root.addChild(root1);\n\n HBaseTreeParser parser = new HBaseTreeParserBuilder().build(mp);\n HiveTreeBuilder builder = new HiveTreeBuilder();\n OpNode opNode = builder.build(root);\n Filter filter = parser.parse(opNode);\n System.out.println(filter);\n }", "public void visit(Not n) {\n out.println(\"# Not\");\n n.e.accept(this);\n out.println(\"seq $v0, $v0, $0\");\n }", "public boolean isNotInDomain() {\n return value.is(\"NOT_IN_DOMAIN\");\n }", "public boolean applyNot(String[] not);", "public Criteria andImsiCountNotEqualToColumn(HotNumDayCount.Column column) {\n addCriterion(new StringBuilder(\"imsi_count <> \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ metodo para obtener la lista de ids de los elementos de la tabla TABLE_FOTO que son las fotos insertadas por el usuario
public static ArrayList<Integer> getallIdsAlbums(Context ctx) { // Creamos una lista de enteros PersistenceSQLiteHelper usdbh = new PersistenceSQLiteHelper( ctx, DBNAME, null, CURRENT_BBDD_VERSION); SQLiteDatabase db = usdbh.getReadableDatabase(); ArrayList<Integer> IDsList = new ArrayList<Integer>(); // Selcccion de todas las Query Cursor cursor = db.rawQuery("select id_album from TABLE_ALBUM ", null); if (cursor.moveToFirst()) { do { Integer id = cursor.getInt(0); IDsList.add(id); } while (cursor.moveToNext()); } db.close(); return IDsList; }
[ "public ArrayList<ImgCapture> getImages(int pkUser, int pkScan) {\r\n \r\n ArrayList<ImgCapture> lesPhotos = new ArrayList<ImgCapture>();\r\n ResultSet rs = null;\r\n com.mysql.jdbc.PreparedStatement pstmt = null;\r\n String query = \"SELECT * FROM T_Photo WHERE FK_Capture = ?\";\r\n try {\r\n nbCapture = getLastPK();\r\n pstmt = (com.mysql.jdbc.PreparedStatement) dbConnection.prepareStatement(query);\r\n pstmt.setInt(1, this.nbCapture);\r\n rs = pstmt.executeQuery(); \r\n while (rs.next()) {\r\n Blob blob = rs.getBlob(\"photo\");\r\n BufferedImage img = null;\r\n InputStream is = (ByteArrayInputStream) blob.getBinaryStream();\r\n img = ImageIO.read(is);\r\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\r\n ImageIO.write(img, \"jpg\", baos);\r\n byte[] imageData = baos.toByteArray();\r\n\r\n// \r\n\r\n\r\n lesPhotos.add(new ImgCapture(imageData)); \r\n }\r\n } catch (SQLException e) {\r\n refWrk.affichePopupError(WrkDB.class.getName()+\" : \"+e.getMessage());\r\n } catch (IOException ex) {\r\n refWrk.affichePopupError(WrkDB.class.getName()+\" : \"+ex.getMessage());\r\n } finally {\r\n\r\n //rs.close();\r\n //pstmt.close();\r\n //dbConnection.close();\r\n }\r\n return lesPhotos;\r\n }", "public StrutturaFoto[] findWhereFotoIdEquals(long fotoId) throws StrutturaFotoDaoException;", "public Cursor selectAllList(String table) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n Cursor cursor = db.rawQuery(\"SELECT id AS _id, * FROM pictures WHERE id IN (\" +\n \"SELECT pictures_id FROM \" + table + \");\", null);\n\n return cursor;\n }", "public int [] recuperaIds(){\n int [] datosId;\n int i;\n\n SQLiteDatabase db = getReadableDatabase();\n String[] valores_recuperar = {\"_id\"};\n\n // Cuando recupera los IDS lo tiene que hacer ordenado por el nombre como la lista\n Cursor cursor = db.query(\"contactos\",valores_recuperar,null,null,null,null,\"nombre ASC\",null);\n\n if (cursor.getCount()>0){\n datosId= new int[cursor.getCount()];\n i=0;\n cursor.moveToFirst();\n while (!cursor.isAfterLast()) {\n datosId[i] = cursor.getInt(0);\n i++;\n cursor.moveToNext();\n }\n }\n else datosId = new int [0];\n cursor.close();\n return datosId;\n }", "public static ArrayList<String> readAllFacebookId() {\n\n\t\tArrayList<HashMap<String, String>> hA = DB.q(\"SELECT FACEBOOK_ID FROM ATL_FRIEND WHERE FACEBOOK_ID is not null ORDER BY FACEBOOK_ID\");\n\t\tArrayList<String> facebookIdA = new ArrayList<String>();\n\t\tif (hA!=null){\n\t\tfacebookIdA = new ArrayList<String>(hA.size());\n\t\tfor(HashMap<String, String> h : hA){\n\t\t\tfacebookIdA.add(h.get(\"FACEBOOK_ID\"));\n\t\t}\n\t\t}\n\t\treturn facebookIdA;\n\t}", "public List<tbImagens> listar(int id) {\n Configuration con = new Configuration().configure().addAnnotatedClass(tbImagens.class);\n SessionFactory sf = con.buildSessionFactory();\n\n //abre sessao com o banco\n Session session = sf.openSession();\n List imagens = null;\n\n try {\n //inicia a transacao com o banco\n Transaction tx = session.beginTransaction();\n\n imagens = session.createQuery(\"FROM tbImagens where idPacote=\" + id + \" and nomeImagem like '%.jpg%' \"\n + \"or idPacote=\" + id + \" and nomeImagem like '%.png%' or idPacote=\" + id + \" and nomeImagem like '%.jpeg%' \"\n + \"or idPacote=\" + id + \" and nomeImagem like '%.JPG%' or idPacote=\" + id + \" and nomeImagem like '%.PNG%' \"\n + \"or idPacote=\" + id + \" and nomeImagem like '%.JPEG%'\").list();\n\n //comita as informacoes\n tx.commit();\n\n } finally {\n if (session != null) {\n session.close();\n sf.close();\n }\n }\n return imagens;\n }", "private void getFriendIds() {\n\n Database.getFriendsRef()\n .child(CurrentUser.getId())\n .addListenerForSingleValueEvent(new ValueEventListener() {\n\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n\n // collect all friend ids\n if (dataSnapshot.exists()) {\n\n for (DataSnapshot data : dataSnapshot.getChildren()) {\n friendsId.add(data.getKey());\n }\n\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n }\n\n });\n\n Database.getFriendsRef().child(CurrentUser.getId()).addChildEventListener(new ChildEventListener() {\n\n @Override\n public void onChildAdded(@NonNull DataSnapshot dataSnapshot, @Nullable String s) {\n friendsId.add(dataSnapshot.getKey());\n }\n\n @Override\n public void onChildChanged(@NonNull DataSnapshot dataSnapshot, @Nullable String s) {\n }\n\n @Override\n public void onChildRemoved(@NonNull DataSnapshot dataSnapshot) {\n friendsId.remove(dataSnapshot.getKey());\n }\n\n @Override\n public void onChildMoved(@NonNull DataSnapshot dataSnapshot, @Nullable String s) {\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n }\n\n });\n\n }", "@Override\n\tpublic List<Img> listId(int id) {\n\t\treturn imgDao.listId(id);\n\t}", "public List<SavedPhotoUtil> getAllPhotoItem(Context context) {\n List<SavedPhotoUtil> savedPhotoItemsList = new ArrayList<>();\n // Select All Query\n String selectQuery = \"SELECT * FROM \" + TABLE_SAVED_PHOTO_UTIL;\n AssetDBHelperSavePhotoManager assetdbhelper= AssetDBHelperSavePhotoManager.getInstance(context);\n SQLiteDatabase db = assetdbhelper.getWritableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (cursor != null && cursor.moveToFirst()) {\n do {\n SavedPhotoUtil savedPhotoUtilItem = new SavedPhotoUtil();\n savedPhotoUtilItem.setPhotoId(Integer.parseInt(cursor.getString(0)));\n savedPhotoUtilItem.setDescription(cursor.getString(1));\n savedPhotoUtilItem.setIsFavourite(Integer.parseInt(cursor.getString(2)));\n savedPhotoUtilItem.setCreatedAt(Float.parseFloat(cursor.getString(3)));\n savedPhotoUtilItem.setLocationPath(cursor.getString(4));\n savedPhotoUtilItem.setColorSelected(cursor.getString(5));\n savedPhotoUtilItem.setTypeIdFromTable(Integer.parseInt(cursor.getString(6)));\n savedPhotoUtilItem.setCollectionIdFromTable(Integer.parseInt(cursor.getString(7)));\n savedPhotoUtilItem.setColorMainBracketIdFromTable(Integer.parseInt(cursor.getString(8)));\n\n\n\n // Adding saved photo item to list\n savedPhotoItemsList.add(savedPhotoUtilItem);\n\n } while (cursor.moveToNext());\n }\n cursor.close();\n db.close();\n // return saved photo item list\n return savedPhotoItemsList;\n }", "public StrutturaFoto[] findWhereFotoPrincipaleEquals(int fotoPrincipale) throws StrutturaFotoDaoException;", "public ArrayList<modelo_foto> listadodeFotos(int id) {\n\t\treturn null;\n\t}", "public void insertToList(String table, long id) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n // Add to contentvalues.\n ContentValues contentValues = new ContentValues();\n contentValues.put(\"pictures_id\", id);\n\n db.insert(table, null, contentValues);\n }", "List<UserPicture> selectAll();", "public ArrayList<Integer> getIDs() {\n ArrayList<Integer> output = new ArrayList();\n\n try {\n for (String tableName : USERTABLENAMES) {\n idString = getIDString(tableName);\n queryString = \"SELECT \" + idString + \" FROM \" + tableName;\n ResultSet rs = executeQuery(queryString);\n\n while (rs.next()) {\n thisID = rs.getInt(idString);\n\n output.add(thisID);\n }\n }\n } catch (SQLException ex) {\n System.err.println(ex);\n }\n\n return output;\n }", "public String[] getAllImageIDs() {\n\t\tNodeList nl = projectElement.getElementsByTagName(IMAGE_TAG);\n\n\t\tif (nl != null && nl.getLength() > 0) {\n\t\t\tString[] ids = new String[nl.getLength()];\n\t\t\tfor (int i = 0; i < nl.getLength(); i++) {\n\t\t\t\tElement image = (Element) nl.item(i);\n\t\t\t\tids[i] = image.getAttribute(ID_ATTR);\n\t\t\t}\n\t\t\treturn ids;\n\t\t} else\n\t\t\treturn new String[0];\n\t}", "public List<FotoEntity> findAll(){\n LOGGER.log(Level.INFO, \"Consultando todas las fotos\");\n // Se crea un query para buscar todas los fotos en la base de datos.\n TypedQuery query = em.createQuery(\"select u from FotoEntity u\", FotoEntity.class);\n // Note que en el query se hace uso del método getResultList() que obtiene una lista de fotos.\n return query.getResultList();\n }", "public void insertSelectedImages(List<PhotoData> photoDatas) {\n new InsertDbAsync(this.mPhotoDao, photoDatas).execute();\n }", "@Override\r\n\tpublic String listarId() {\r\n\t\tStringBuilder listado = new StringBuilder();\r\n\t\tObjectSet<Simulacion> result = null;\r\n\t\tQuery consulta = db.query();\r\n\t\tconsulta.constrain(Simulacion.class);\t\r\n\t\tresult = consulta.execute();\r\n\t\tif (result.size() > 0) {\r\n\t\t\tfor (Simulacion s: result) {\r\n\t\t\t\tif (s != null) {\r\n\t\t\t\t\tlistado.append(s.getIdSimulacion() + \"\\n\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn listado.toString();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public StrutturaFoto[] findAll() throws StrutturaFotoDaoException;", "private Map<Long, FeatureShape> getFeatureIds(Map<String, Map<Long, FeatureShape>> tables, String table) {\n\n Map<Long, FeatureShape> featureIds = tables.get(table);\n if (featureIds == null) {\n featureIds = new HashMap<>();\n tables.put(table, featureIds);\n }\n return featureIds;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to Upload Image to Storage
private void uploadFile() { //todo: Image picker Uri file = Uri.fromFile(new File("path/to/images/rivers.jpg")); StorageReference riversRef = mStorageRef.child("images/" + file.getLastPathSegment()); // Register observers to listen for when the download is done or if it fails riversRef.putFile(file).addOnFailureListener(new OnFailureListener() { @Override public void onFailure(@NonNull Exception exception) { // Handle unsuccessful uploads } }).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() { @Override public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) { // taskSnapshot.getMetadata() contains file metadata such as size, content-type, and download URL. @SuppressWarnings("VisibleForTests") Uri downloadUrl = taskSnapshot.getDownloadUrl(); //todo: store this link on Campaign } }); }
[ "private void uploadImage(){\n if(imageUri != null){\n final StorageReference fileReference = storageReference.child(System.currentTimeMillis() + \".\" + getFileExtension(imageUri));\n\n uploadTask = fileReference.putFile(imageUri)\n .addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n //set up progress bar on later dev\n }\n }, 500);\n }\n\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.d(TAG, \"failed to upload image\");\n }\n });\n\n getUploadedImageUrl(uploadTask, fileReference);\n\n } else{\n Log.d(TAG, \"IMAGE CAPTURE HAS NO URI\");\n }\n\n }", "public void uploadImage() {\n //when image is selected from gallery\n if (imgPath != null && !imgPath.isEmpty()) {\n //convert image to string using base64\n encodeImagetoString(imgPath);\n //when image is not selected from gallery\n } else {\n Log.e(\"Error\", \"You must select image from gallery before you try to upload\");\n }\n\n }", "private void uploadImage() {\n if (imageUri != null) {\n // Defining the child of storageReference\n //StorageReference ref = storageReference.child(\"images/\");\n\n // adding listeners on upload\n // or failure of image\n storageReference.child(\"images/\").child(\"User\").child( email_).putFile(imageUri)\n .addOnSuccessListener(\n new OnSuccessListener<UploadTask.TaskSnapshot>() {\n\n @Override\n public void onSuccess(\n UploadTask.TaskSnapshot taskSnapshot) {\n // Image uploaded successfully\n Toast.makeText(RegisterUser.this, \"Image Uploaded!!\", Toast.LENGTH_SHORT).show();\n }\n })\n\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n // Error, Image not uploaded\n Toast.makeText(RegisterUser.this, \"Failed \" + e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n })\n .addOnProgressListener(\n new OnProgressListener<UploadTask.TaskSnapshot>() {\n\n // Progress Listener for loading\n // percentage on the dialog box\n @Override\n public void onProgress(\n UploadTask.TaskSnapshot taskSnapshot) {\n double progress\n = (100.0\n * taskSnapshot.getBytesTransferred()\n / taskSnapshot.getTotalByteCount());\n }\n });\n }\n }", "public boolean uploadFile2Storage(){\n pd = new ProgressDialog(this);\n pd.setMessage(Constant.UPLOADING_MESSAGE);\n\n chooseImg.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent();\n intent.setType(Constant.IMAGES_TYPE);\n intent.setAction(Intent.ACTION_PICK);\n startActivityForResult(Intent.createChooser(intent, Constant.SELECT_IMAGE_MESSAGE), PICK_IMAGE_REQUEST);\n }\n });\n\n uploadImg.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if(filePath != null) {\n pd.show();\n\n StorageReference childRef = storageRef.child(Constant.IMAGES_FILEPATH + Constant.ANIMALS_FILEPATH).child(No + Constant.JPEG);\n //uploading the image\n UploadTask uploadTask = childRef.putFile(filePath);\n\n uploadTask.addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n pd.dismiss();\n animal.setThumbnail(No + Constant.JPEG);\n Toast.makeText(CrudActivity.this, Constant.UPLOAD_SUCCESSFUL_MESSAGE, Toast.LENGTH_SHORT).show();\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n pd.dismiss();\n Toast.makeText(CrudActivity.this, Constant.UPLOAD_FAILED_MESSAGE + e, Toast.LENGTH_SHORT).show();\n }\n });\n }\n else {\n Toast.makeText(CrudActivity.this, Constant.SELECT_AN_IMAGE_MESSAGE, Toast.LENGTH_SHORT).show();\n }\n }\n });\n return false;\n }", "private void uploadImage() {\n StorageReference storageReference = getAct().getStorageReference().child(\"Profile/\"+ UUID.randomUUID());\n storageReference .putFile(filePath)\n .addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n users .setPhotoUrl(String.valueOf(taskSnapshot.getDownloadUrl()));\n getAct().updateUser(users);\n getAct().dismissLoading();\n Util .savePref(getAct(),Key.USER,getAct().getGson().toJson(users));\n\n getAct().succesAlert(getString(R.string.updatedata));\n // firebasedeki verileri güncelleyecek.\n\n\n\n }\n\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n getAct().dismissLoading();\n getAct().showAlert(getString(R.string.failureupload));\n }\n })\n .addOnProgressListener(new OnProgressListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onProgress(UploadTask.TaskSnapshot taskSnapshot) {\n }\n });\n\n\n }", "private void uploadImage() {\n\n if(filePath != null)\n {\n final ProgressDialog progressDialog = new ProgressDialog(this);\n progressDialog.setTitle(getString(R.string.UPLOADING));\n progressDialog.setMessage(getString(R.string.WAIT_P));\n progressDialog.show();\n final StorageReference ref = storageReference.child(\"images/\"+ fUser.getUid());\n\n ref.putFile(filePath).continueWithTask(new Continuation<UploadTask.TaskSnapshot, Task<Uri>>() {\n /**\n *\n * @param task uploadTask continue or not\n * @return imageURL to be stored in Database\n *\n */\n @Override\n public Task<Uri> then(@NonNull Task<UploadTask.TaskSnapshot> task) throws Exception {\n if (!task.isSuccessful()){\n progressDialog.dismiss();\n Toast.makeText(EditProfile.this, getString(R.string.UPLOADED), Toast.LENGTH_SHORT).show();\n throw Objects.requireNonNull(task.getException());\n }\n return ref.getDownloadUrl();\n }\n }).addOnCompleteListener(new OnCompleteListener<Uri>() {\n @Override\n public void onComplete(@NonNull Task<Uri> task) {\n if (task.isSuccessful()){\n Uri downUri = task.getResult();\n assert downUri != null;\n img_URI = downUri.toString();\n progressDialog.dismiss();\n Toast.makeText(EditProfile.this, getString(R.string.upload_pro), Toast.LENGTH_SHORT).show();\n }\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n progressDialog.dismiss();\n Toast.makeText(EditProfile.this, getString(R.string.FAILED)+e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n\n }\n }", "String uploadImageForParticularProduct(int productId ,MultipartFile file) throws IOException ;", "public interface ImageUpload {\n\n\tString getType();\n\n\tUploadedFile getFile();\n\n\tvoid setImageKey(String key);\n\n\tvoid update() throws Exception;\n\n\tString getId();\n\n\tString currentKey();\n}", "private void uploadFile() {\n if (filePath != null) {\n //displaying a progress dialog while upload is going on\n final ProgressDialog progressDialog = new ProgressDialog(this);\n progressDialog.setTitle(\"Uploading\");\n progressDialog.show();\n storageReference = FirebaseStorage.getInstance().getReference();\n\n StorageReference riversRef = storageReference.child(\n \"images/pic.jpg\");\n riversRef.putFile(filePath)\n .addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n //if the upload is successfull\n //hiding the progress dialog\n progressDialog.dismiss();\n\n //and displaying a success toast\n Toast.makeText(getApplicationContext(), \"File Uploaded \", Toast.LENGTH_LONG).show();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception exception) {\n //if the upload is not successfull\n //hiding the progress dialog\n progressDialog.dismiss();\n\n //and displaying error message\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }\n })\n .addOnProgressListener(new OnProgressListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onProgress(UploadTask.TaskSnapshot taskSnapshot) {\n //calculating progress percentage\n // double progress = (100.0 * taskSnapshot.getBytesTransferred()) / taskSnapshot.getTotalByteCount();\n\n //displaying percentage in progress dialog\n progressDialog.setMessage(\"Uploaded \" +\n // ((int) progress) +\n \"%...\");\n }\n });\n }\n //if there is not any file\n else {\n //you can display an error toast\n }\n }", "void uploadFile();", "@Override\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n\n super.onActivityResult(requestCode, resultCode, data);\n uploader=new Uploader(this,URL);\n uploader.uploadToServer(captureImage.path,(ImageView) findViewById(R.id.image));\n\n\n\n }", "public void FileUploader(View view) {\n StorageReference Ref=mstorageRef.child(System.currentTimeMillis()+\".\"+getExtension(imguri));\n Ref.putFile(imguri)\n .addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n // Get a URL to the uploaded content\n //Uri downloadUrl = taskSnapshot.getDownloadUrl();\n Toast.makeText(storge.this,\"image uploaded successfully\",Toast.LENGTH_LONG).show();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception exception) {\n // Handle unsuccessful uploads\n // ...\n }\n });\n }", "@Multipart\r\n @POST(\"upload\")\r\n Call<String> uploadImage(@Part MultipartBody.Part file);", "Response saveImage(HttpServletRequest request);", "private void uploadImage(Uri filePath) {\n progressBar.setVisibility(View.VISIBLE);\n if ((filePath != null)) {\n final StorageReference ref = mStorageReference.child(\"userDp/\" + mFirebaseUser.getUid());\n ref.putFile(filePath).continueWithTask(new Continuation<UploadTask.TaskSnapshot, Task<Uri>>() {\n @Override\n public Task<Uri> then(@NonNull Task<UploadTask.TaskSnapshot> task) throws Exception {\n if (!task.isSuccessful()) {\n throw task.getException();\n }\n return ref.getDownloadUrl();\n }\n }).addOnCompleteListener(new OnCompleteListener<Uri>() {\n @Override\n public void onComplete(@NonNull final Task<Uri> task) {\n if (task.isSuccessful()) {\n final String imageUri = task.getResult().toString();\n\n // Updates user's document with image URL\n userDocument.update(\"profilePicUrl\", imageUri).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n SharedPreferences.Editor editor = mSharedPreferences.edit();\n editor.putString(\"profilePicUrl\", imageUri);\n editor.apply();\n progressBar.setVisibility(View.GONE);\n }\n });\n }\n }\n });\n }\n }", "public void uploadMultipart() {\n String UPLOAD_URL = \"http://192.168.94.1/AndroidImageUpload/upload.php\";\n //getting name for the image\n String suname = uname.getText().toString().trim();\n String sumoor = umoor.getText().toString().trim();\n String suaddress = uaddress.getText().toString().trim();\n String sutitle = utitle.getText().toString().trim();\n String sudesc = udesc.getText().toString().trim();\n\n //getting the actual path of the image\n String path = getPath(filePath);\n\n //Uploading code\n try {\n String uploadId = UUID.randomUUID().toString();\n\n //Creating a multi part request\n new MultipartUploadRequest(this, uploadId, UPLOAD_URL)\n .addFileToUpload(path, \"image\") //Adding file\n .addParameter(\"sharedby\", suname) //Adding text parameter to the request\n .addParameter(\"createdby\", sumoor) //Adding text parameter to the request\n .addParameter(\"address\", suaddress) //Adding text parameter to the request\n .addParameter(\"title\", sutitle) //Adding text parameter to the request\n .addParameter(\"desc\", sudesc) //Adding text parameter to the request\n .setNotificationConfig(new UploadNotificationConfig())\n .setMaxRetries(2)\n .startUpload(); //Starting the upload\n\n } catch (Exception exc) {\n Toast.makeText(this, exc.getMessage(), Toast.LENGTH_SHORT).show();\n }\n }", "public void uploadImage(Bitmap imageBmp, String name, final Model.UploadImageListener listener){\n String imageName = User.getInstance().userId ;\n FirebaseStorage storage = FirebaseStorage.getInstance();\n final StorageReference imagesRef = storage.getReference().child(\"images\").child(name);\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n imageBmp.compress(Bitmap.CompressFormat.JPEG, 100, baos);\n byte[] data = baos.toByteArray();\n UploadTask uploadTask = imagesRef.putBytes(data);\n uploadTask.addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(Exception exception) {\n listener.onComplete(null);\n }\n }).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n imagesRef.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n Uri downloadUrl = uri;\n listener.onComplete(downloadUrl.toString());\n }\n });\n }\n });\n }", "@Override\n public String upload (String imageFileName, InputStream imageBody, String message) throws TwitterException\n {\n return upload(new HttpParameter[]{\n new HttpParameter (\"media\", imageFileName, imageBody)\n });\n }", "public Image saveImage(MultipartFile file) throws IOException {\n File uploadDir = new File(uploadPath);\n if (!uploadDir.exists())\n uploadDir.mkdir();\n String uuid = UUID.randomUUID().toString();\n String name= file.getOriginalFilename();\n String resultFileName = uuid + '.' + name;\n file.transferTo(new File(uploadPath + \"/\" + resultFileName));\n String url = \"/img/\" + resultFileName;\n Image image = Image.newImage(name,url,LocalDateTime.now());\n imageRepository.save(image);\n return image;\n }", "private void uploadImage(){\n final ProgressDialog pd = new ProgressDialog(getContext());\n pd.setMessage(getResources().getString(R.string.upload_in_progress));\n pd.show();\n\n if(image_uri != null){ // If the uri is not empty\n final StorageReference fileReference = storageReference.child(System.currentTimeMillis() + \".\" + getFileExtension(image_uri)); // Image name contains current time and extension\n\n uploadTask = fileReference.putFile(image_uri); // To upload a file to Cloud Storage, you first create a reference to the full path of the file, including the file name\n uploadTask.continueWithTask(new Continuation<UploadTask.TaskSnapshot, Task<Uri>>() { // Returns a new Task that will be completed with the result of applying the specified Continuation to this Task (The Continuation will be called on the main application thread)\n @Override\n public Task<Uri> then(@NonNull Task<UploadTask.TaskSnapshot> task) throws Exception {\n if(!task.isSuccessful()){ // If the task fails\n throw Objects.requireNonNull(task.getException());\n }\n\n return fileReference.getDownloadUrl();\n }\n }).addOnCompleteListener(new OnCompleteListener<Uri>() { // To handle success and failure in the same listener\n @Override\n public void onComplete(@NonNull Task<Uri> task) {\n if(task.isSuccessful()){ // If the task was successful\n Uri downloadUri = task.getResult();\n assert downloadUri != null;\n String strUri = downloadUri.toString();\n\n databaseReference = FirebaseDatabase.getInstance().getReference(\"Users\").child(firebaseUser.getUid());\n HashMap<String, Object> map = new HashMap<>();\n map.put(\"imageURL\", strUri);\n databaseReference.updateChildren(map);\n\n pd.dismiss();\n }\n else{ // If image upload failed\n Toast.makeText(getContext(), getResources().getString(R.string.upload_failed), Toast.LENGTH_SHORT).show();\n pd.dismiss();\n }\n }\n }).addOnFailureListener(new OnFailureListener() { // To be notified when the task fails\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(getContext(), e.getMessage(), Toast.LENGTH_SHORT).show();\n pd.dismiss();\n }\n });\n }\n else{ // If no image is selected\n Toast.makeText(getContext(), getResources().getString(R.string.no_image_selected), Toast.LENGTH_SHORT).show();\n pd.dismiss();\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets new value of id_token
public void setId_token(String id_token) { this.id_token = id_token; }
[ "public void putToken(){\n String initialValue = generateMsgId();\n requestContext.put(MessageIDHandler.REQUEST_PROPERTY, initialValue);\n System.out.println(\"client set id: \" + initialValue +\" on request message\");\n\n }", "public void setIdpIdToken(String idpIdToken) {\n\t\tthis.idpIdToken = idpIdToken;\n\t}", "@Override\n @Lock(LockType.READ)\n public void setUserToken(String token, int id) {\n\n // Opens and close it-self\n try (Jedis jedis = this.jedisPool.getResource()) {\n\n jedis.setex(token, ttl, String.valueOf(id));\n }\n }", "public void setToken(String s) {\n\t\tmyDataBase = getWritableDatabase();\n\t\tCursor c = myDataBase.rawQuery(\n\t\t\t\t\"select count(ID)as recount from tbl_preferences\", null);\n\t\tif (c != null && c.getCount() == 1 && c.moveToFirst()) {\n\t\t\tid = c.getString(c.getColumnIndex(\"recount\"));\n\t\t}\n\t\tif (id.equals(\"0\")) {\n\t\t\tmyDataBase.execSQL(\"insert into tbl_preferences(Token) values('\"\n\t\t\t\t\t+ s + \"')\");\n\t\t\tSystem.out.println(\" inser new uid \");\t\t\t\n\t\t} else {\n\t\t\tSystem.out.println(\" update new uid \");\n\t\t\tmyDataBase.execSQL(\"UPDATE tbl_preferences SET Token='\" + s + \"'\");\n\t\t}\n\t}", "public static void setNotificationId(String token,Context context) {\n SharedPreferences sharedPreferences = context.getSharedPreferences(\"notification\",Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(\"regId\",token);\n editor.apply();\n }", "@JsonProperty(\"idToken\")\n public String getIdToken() {\n return idToken;\n }", "Token updateToken(Token token);", "public void setToken(int token) {\n this.token = token;\n }", "public void setAuthenticationToken(AuthToken authToken);", "public void setToken(String parentEmail, String token);", "public void setToken(String newToken) {\n this.token = newToken;\n }", "private void setToken(String value) {\n if (value != null) {\n this.bitField0_ |= 2;\n this.token_ = value;\n return;\n }\n throw new NullPointerException();\n }", "public VaultedCard setToken(java.lang.String token) {\n return genClient.setOther(token, CacheKey.token);\n }", "void refreshToken();", "public static void setActualToken(int aActualToken) {\n ActualToken = aActualToken;\n }", "private void getToken() {\n FirebaseInstanceId.getInstance().getInstanceId()\n .addOnCompleteListener(new OnCompleteListener<InstanceIdResult>() {\n @Override\n public void onComplete(@NonNull Task<InstanceIdResult> task) {\n if (!task.isSuccessful()) {\n Log.w(\"TAG\", \"getInstanceId failed\", task.getException());\n return;\n }\n String token = task.getResult().getToken();\n FirebaseDatabase.getInstance().getReference(\"Users\").child(FirebaseAuth.getInstance().getUid()).child(\"tokenId\")\n .setValue(token).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n\n } else {\n Toast.makeText(Registration.this, \"error.....\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n\n }\n });\n }", "public void setTokenPreference(String value)\n {\n mSharedPreferences.edit().putString(TOKEN_KEY, value).apply();\n }", "public void onSuccess(@NonNull Token token)\n {\n Log.e(\"onSuccess:TokenType \",token.getType());\n Log.e(\"onSuccess:TokenID \",token.getId());//generated token here\n generatedToken= String.valueOf(token.getId());\n Log.e( \"generatedToken \",generatedToken);\n progress.dismiss();\n callSignUpParent();\n }", "public Locktoken(String id) {\n super(id);\n }", "public void xsetToken(org.apache.xmlbeans.XmlString token) {\n synchronized (monitor()) {\n check_orphaned();\n\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString) get_store()\n .find_element_user(TOKEN$0,\n 0);\n\n if (target == null) {\n target = (org.apache.xmlbeans.XmlString) get_store()\n .add_element_user(TOKEN$0);\n }\n\n target.set(token);\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the longitude property.
public void setLongitude(double value) { this.longitude = value; }
[ "public void setLongitude(double longitude) {\n\t\tmLng = longitude;\n\t}", "public void setLongitude(Double longitude) {\n\n this.longitude = longitude;\n }", "public void setLongitude(double longitude) {\n\t\tsetValue(Property.LONGITUDE, longitude);\n\t}", "public void set_longitude( double value ) {\n _longitude = value;\n }", "@Override\n public void setLongitude(double longitude) {\n _location.setLongitude(longitude);\n }", "public void setLongitude(double longitude)\n {\n this.longitude=longitude;\n }", "public Builder setLongitude(double value) {\n\n longitude_ = value;\n onChanged();\n return this;\n }", "public void setLongitude(String _longitude) { longitude = _longitude; }", "public Builder setLongitude(float value) {\n \n longitude_ = value;\n onChanged();\n return this;\n }", "public Builder setLon(double value) {\n bitField0_ |= 0x00000002;\n lon_ = value;\n onChanged();\n return this;\n }", "public void setLongitude(double newLong) {\r\n if (Math.abs(newLong) > 180.0) {\r\n throw new IllegalArgumentException(\"Invalid longitude value: \" + newLong);\r\n }\r\n latitude = newLong;\r\n }", "public void setLongitude(double newLongitude){this.longitude = newLongitude;}", "public void xsetLongitude(org.apache.xmlbeans.XmlFloat longitude)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlFloat target = null;\n target = (org.apache.xmlbeans.XmlFloat)get_store().find_element_user(LONGITUDE$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlFloat)get_store().add_element_user(LONGITUDE$0);\n }\n target.set(longitude);\n }\n }", "@Override\n\tpublic void setLongitude(double longitude) {\n\t\t_marketingEvent.setLongitude(longitude);\n\t}", "public void setLon(double longi)\n {\n\tthis.lon = longi;\n }", "public void setLongtitude(double longtitude) {\n this.longtitude = longtitude;\n }", "public Builder setLon(double value) {\n copyOnWrite();\n instance.setLon(value);\n return this;\n }", "public FloatProperty longitudeProperty() {\n return longitude;\n }", "public Double getLongitude() {\n\n return longitude;\n }", "@Override\n public double getLongitude() {\n return longitude_;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
To return the Hijiri date by giving day, month, year
public String createHijiriDate(BigDecimal compCode, long day, long month, long year, long adjustTo) throws BaseException;
[ "public static String getddHifenMMHifenyyyy() {\n\t\treturn \"dd-MM-yyyy\";\n\t}", "private String returnDate(int year, int month, int day){\n\t\treturn year + \"-\" + month + \"-\" + day;\r\n\t}", "public Date getThoiGianDuyet();", "private void decodeYearMonthDay () // 1-31\n {\n int nday = encodedYearMonthDay_;\n\n nday -= 1721119 - 2400001;\n year_ = (4 * nday - 1) / 146097;\n nday = 4 * nday - 1 - 146097 * year_;\n date_ = nday / 4;\n\n nday = (4 * date_ + 3) / 1461;\n date_ = 4 * date_ + 3 - 1461 * nday;\n date_ = (date_ + 4) / 4;\n\n month_ = (5 * date_ - 3) / 153;\n date_ = 5 * date_ - 3 - 153 * month_;\n date_ = (date_ + 5) / 5;\n\n year_ = 100 * year_ + nday;\n\n if (month_ < 10)\n month_ += 3;\n else {\n month_ -= 9;\n year_ += 1;\n }\n\n year_ -= 1900; // scale to make year_-1900\n month_--; // scale from 1-12 range to 0-11 range\n }", "public Date getNgayNhan();", "public Date getNgayHetHieuLuc();", "private String jal_to_greg(int year, int month, int day){\n try {\n //get_month_number2(Aug);\n String datetime =JalCal.jalaliToGregorian(year, month, day, 0, 0, 0).toString();\n return datetime.split(\" \")[5]+\"-\"+dm.get_month_number2(datetime.split(\" \")[1])+\"-\"+datetime.split(\" \")[2];\n // Log.e(\"date\", date);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "public String getDateSQL(int year, int month, int day);", "@Override\n public String obtenerFecha (){\n Calendar hoy = Calendar.getInstance();\n \n int dia=hoy.get(Calendar.DAY_OF_MONTH);\n int mes=hoy.get(Calendar.MONTH)+1;\n int anio=hoy.get(Calendar.YEAR);\n \n String fecha=dia+\"-\"+mes+\"-\"+anio;\n \n return fecha;\n \n}", "public static String findDay(int month, int day, int year) {\n String result=\"\";\n LocalDate date = LocalDate.of(year,month,day);\n // System.out.println(date.getDayOfWeek());\n DateTimeFormatter dtf = DateTimeFormatter.ofPattern(\"EEEE\");\n result = dtf.format(date);\n\n\n return result.toUpperCase();\n }", "public Date getDate(int year, String month, int day)\r\n\t\tthrows IllegalArgumentException;", "public Holiday getHoliday(String day,String year, String month);", "java.lang.String getChuriDate();", "public static String getDate(java.util.Date d, String format)\n\t/* 838: */{\n\t\t/* 839:1063 */if (d == null) {\n\t\t\t/* 840:1064 */return \"\";\n\t\t\t/* 841: */}\n\t\t/* 842:1065 */Hashtable h = new Hashtable();\n\t\t/* 843:1066 */String javaFormat = new String();\n\t\t/* 844:1067 */String s = format.toLowerCase();\n\t\t/* 845:1068 */if (s.indexOf(\"yyyy\") != -1) {\n\t\t\t/* 846:1069 */h.put(new Integer(s.indexOf(\"yyyy\")), \"yyyy\");\n\t\t\t/* 847:1070 */} else if (s.indexOf(\"yy\") != -1) {\n\t\t\t/* 848:1071 */h.put(new Integer(s.indexOf(\"yy\")), \"yy\");\n\t\t\t/* 849: */}\n\t\t/* 850:1072 */if (s.indexOf(\"mm\") != -1) {\n\t\t\t/* 851:1073 */h.put(new Integer(s.indexOf(\"mm\")), \"MM\");\n\t\t\t/* 852: */}\n\t\t/* 853:1075 */if (s.indexOf(\"dd\") != -1) {\n\t\t\t/* 854:1076 */h.put(new Integer(s.indexOf(\"dd\")), \"dd\");\n\t\t\t/* 855: */}\n\t\t/* 856:1077 */if (s.indexOf(\"hh24\") != -1) {\n\t\t\t/* 857:1078 */h.put(new Integer(s.indexOf(\"hh24\")), \"HH\");\n\t\t\t/* 858: */}\n\t\t/* 859:1079 */if (s.indexOf(\"mi\") != -1) {\n\t\t\t/* 860:1080 */h.put(new Integer(s.indexOf(\"mi\")), \"mm\");\n\t\t\t/* 861: */}\n\t\t/* 862:1081 */if (s.indexOf(\"ss\") != -1) {\n\t\t\t/* 863:1082 */h.put(new Integer(s.indexOf(\"ss\")), \"ss\");\n\t\t\t/* 864: */}\n\t\t/* 865:1084 */int intStart = 0;\n\t\t/* 866:1085 */while (s.indexOf(\"-\", intStart) != -1)\n\t\t/* 867: */{\n\t\t\t/* 868:1087 */intStart = s.indexOf(\"-\", intStart);\n\t\t\t/* 869:1088 */h.put(new Integer(intStart), \"-\");\n\t\t\t/* 870:1089 */intStart++;\n\t\t\t/* 871: */}\n\t\t/* 872:1092 */intStart = 0;\n\t\t/* 873:1093 */while (s.indexOf(\"/\", intStart) != -1)\n\t\t/* 874: */{\n\t\t\t/* 875:1095 */intStart = s.indexOf(\"/\", intStart);\n\t\t\t/* 876:1096 */h.put(new Integer(intStart), \"/\");\n\t\t\t/* 877:1097 */intStart++;\n\t\t\t/* 878: */}\n\t\t/* 879:1100 */intStart = 0;\n\t\t/* 880:1101 */while (s.indexOf(\" \", intStart) != -1)\n\t\t/* 881: */{\n\t\t\t/* 882:1103 */intStart = s.indexOf(\" \", intStart);\n\t\t\t/* 883:1104 */h.put(new Integer(intStart), \" \");\n\t\t\t/* 884:1105 */intStart++;\n\t\t\t/* 885: */}\n\t\t/* 886:1108 */intStart = 0;\n\t\t/* 887:1109 */while (s.indexOf(\":\", intStart) != -1)\n\t\t/* 888: */{\n\t\t\t/* 889:1111 */intStart = s.indexOf(\":\", intStart);\n\t\t\t/* 890:1112 */h.put(new Integer(intStart), \":\");\n\t\t\t/* 891:1113 */intStart++;\n\t\t\t/* 892: */}\n\t\t/* 893:1116 */if (s.indexOf(\"年\") != -1) {\n\t\t\t/* 894:1117 */h.put(new Integer(s.indexOf(\"年\")), \"年\");\n\t\t\t/* 895: */}\n\t\t/* 896:1118 */if (s.indexOf(\"月\") != -1) {\n\t\t\t/* 897:1119 */h.put(new Integer(s.indexOf(\"月\")), \"月\");\n\t\t\t/* 898: */}\n\t\t/* 899:1120 */if (s.indexOf(\"日\") != -1) {\n\t\t\t/* 900:1121 */h.put(new Integer(s.indexOf(\"日\")), \"日\");\n\t\t\t/* 901: */}\n\t\t/* 902:1122 */if (s.indexOf(\"时\") != -1) {\n\t\t\t/* 903:1123 */h.put(new Integer(s.indexOf(\"时\")), \"时\");\n\t\t\t/* 904: */}\n\t\t/* 905:1124 */if (s.indexOf(\"分\") != -1) {\n\t\t\t/* 906:1125 */h.put(new Integer(s.indexOf(\"分\")), \"分\");\n\t\t\t/* 907: */}\n\t\t/* 908:1126 */if (s.indexOf(\"秒\") != -1) {\n\t\t\t/* 909:1127 */h.put(new Integer(s.indexOf(\"秒\")), \"秒\");\n\t\t\t/* 910: */}\n\t\t/* 911:1129 */int i = 0;\n\t\t/* 912:1130 */while (h.size() != 0)\n\t\t/* 913: */{\n\t\t\t/* 914:1132 */Enumeration e = h.keys();\n\t\t\t/* 915:1133 */int n = 0;\n\t\t\t/* 916:1134 */while (e.hasMoreElements())\n\t\t\t/* 917: */{\n\t\t\t\t/* 918:1136 */i = ((Integer) e.nextElement()).intValue();\n\t\t\t\t/* 919:1137 */if (i >= n) {\n\t\t\t\t\t/* 920:1138 */n = i;\n\t\t\t\t\t/* 921: */}\n\t\t\t\t/* 922: */}\n\t\t\t/* 923:1140 */String temp = (String) h.get(new Integer(n));\n\t\t\t/* 924:1141 */h.remove(new Integer(n));\n\t\t\t/* 925: */\n\t\t\t/* 926:1143 */javaFormat = temp + javaFormat;\n\t\t\t/* 927: */}\n\t\t/* 928:1145 */SimpleDateFormat df = new SimpleDateFormat(javaFormat,\n\t\t\t\tnew DateFormatSymbols());\n\t\t/* 929: */\n\t\t/* 930:1147 */return df.format(d);\n\t\t/* 931: */}", "public Date discoverColumbusDay(int year)\n {\n // bogus return value so program skeleton will compile and run - \n // replace it with the correct Date and delete this comment\n return null ;\n }", "static String solve(int year) {\n // compute the 256th day (day of the programmer)\n \n int mm = 0; \n int dd = 256;\n int feb = 0;\n int[] months = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\n \n int i = 0;\n // if year < 1918\n if(year < 1918)\n {\n if(isJulianLeapYear(year))\n months[1] = 29; \n \n i = 0;\n while(dd >31)\n {\n mm++;\n dd -= months[i]; \n i++;\n }\n }\n // if year == 1918\n if(year == 1918)\n {\n if(isGregorianLeapYear(year))\n months[1] = 29 - 14 + 1; \n else\n months[1] = 28 - 14 + 1;\n \n i = 0;\n while(dd >31)\n {\n mm++;\n dd -= months[i]; \n i++;\n }\n }\n // if year > 1918\n if(year > 1918)\n {\n if(isGregorianLeapYear(year))\n months[1] = 29; \n \n i = 0;\n while(dd >31)\n {\n mm++;\n dd -= months[i]; \n i++;\n }\n } \n \n if(mm == 9 && dd > 30)\n {\n mm++;\n dd -= 30;\n } \n \n mm++; \n \n \n StringBuffer strBuffer = new StringBuffer();\n \n if(dd < 10)\n strBuffer.append(0);\n \n strBuffer.append(dd);\n strBuffer.append(\".\");\n \n if(mm < 10)\n strBuffer.append(0);\n \n strBuffer.append(mm);\n strBuffer.append(\".\");\n strBuffer.append(year); \n \n return strBuffer.toString();\n }", "public String date(Date date);", "String getBirthDay();", "private Date convertSqlDateToDateOfHaim(java.sql.Date myDate) \n\t{ /*\n\t\t\t\t\t\t\t\t\t * this method responsible for convert sql date type to our project date type\n\t\t\t\t\t\t\t\t\t **/\n\t\tString someDate = \"\" + myDate;\n\t\tint year = Integer.parseInt(someDate.substring(0, 4));\n\t\tint mounth = Integer.parseInt(someDate.substring(5, 7));\n\t\tint day = Integer.parseInt(someDate.substring(8, someDate.length()));\n\t\tDate haimDate = new Date(year, mounth, day);\n\t\treturn haimDate;\n\t}", "public static void main(String[] args) {\n Date date = new Date();\n Calendar cal = Calendar.getInstance();\n cal.setTime(date);\n int day = cal.get(cal.DATE);\n int month = cal.get(cal.MONTH)+1;\n int year = cal.get(cal.YEAR);\n System.out.println(day+\"\\t\"+month+\"\\t\"+year);\n \n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Make sure we always have a listener for the perspective. Cannot add to the perspective class as its not always called when Workbench is started.
@Override public void earlyStartup() { PlatformUI.getWorkbench().getWorkbenchWindows()[0].addPerspectiveListener(this); }
[ "public synchronized boolean isPerspectiveEnabled() {\r\n\t\treturn perspectiveEnabled;\r\n\t}", "public void perspectiveChanged( IWorkbenchPage page, IPerspectiveDescriptor perspective, String changeId ) {\n\t }", "private void initPreferencesListener()\n {\n Activator.getDefault().getPreferenceStore().addPropertyChangeListener( new IPropertyChangeListener()\n {\n /**\n * {@inheritDoc}\n */\n public void propertyChange( PropertyChangeEvent event )\n {\n if ( authorizedPrefs.contains( event.getProperty() ) )\n {\n if ( PluginConstants.PREFS_SCHEMA_VIEW_GROUPING.equals( event.getProperty() )\n || PluginConstants.PREFS_SCHEMA_VIEW_SCHEMA_PRESENTATION.equals( event.getProperty() ) )\n {\n view.reloadViewer();\n }\n else\n {\n view.refresh();\n }\n }\n }\n } );\n }", "private void initListener() {\r\n if (!guispListenerEnabled) {\r\n guispListen = new GUISideListener();\r\n guispListenerEnabled = true;\r\n } else {\r\n System.err.println(\"TRIED RECREATING LISTENER\");\r\n }\r\n }", "protected void init() {\n\t\t// We need to listen to events happening on the View configuration\n\t\tconfigureViewsDescriptor.getComponent().addActionListener(this);\n\n\t\t// Get start panel id\n\t\tgui.setPreviousButtonEnabled(false);\n\t\tfinal WizardPanelDescriptor panelDescriptor = getFirstDescriptor();\n\t\tguimodel.currentDescriptor = panelDescriptor;\n\n\t\tfinal String welcomeMessage = TrackMate.PLUGIN_NAME_STR + \" v\"\n\t\t\t\t+ TrackMate.PLUGIN_NAME_VERSION + \" started on:\\n\"\n\t\t\t\t+ TMUtils.getCurrentTimeString() + '\\n';\n\t\t// Log GUI processing start\n\t\tgui.getLogger().log(welcomeMessage, Logger.BLUE_COLOR);\n\n\t\t// Execute about to be displayed action of the new one\n\t\tpanelDescriptor.aboutToDisplayPanel();\n\n\t\t// Display matching panel\n\t\tgui.show(panelDescriptor);\n\n\t\t// Show the panel in the dialog, and execute action after display\n\t\tpanelDescriptor.displayingPanel();\n\t}", "void InitialiseViewer (javafx.stage.Stage stage);", "public void perspective(){\r\n\t\tperspective(_myCamera.fov(), _myCamera.aspect(), _myCamera.near(), _myCamera.far());\r\n\t}", "private void initShrimpListeners() {\n // create menus associated with this view\n shrimpProjectListener = new ShrimpProjectAdapter() {\n\t\t\tpublic void projectActivated(ShrimpProjectEvent event) {\n \t\tcreateShrimpViewActions();\n \t\tcreateNodePopupMenu();\n \t\tcreateArcPopupMenu();\n \t\tif (config.createToolBar) {\n \t\t\tcreateToolBar();\n \t\t}\n \t\tif (config.showModePanel) {\n \t\t\tcreateModePanel();\n \t\t}\n\n\t\t\t\tgui.validate();\n\n\t\t\t\tSwingUtilities.invokeLater(new Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t// set the default mouseMode\n\t\t\t\t\t\tsetMouseMode(ApplicationAccessor.getProperties().getProperty(MOUSE_MODE_PROPERTY_KEY,\n\t\t\t\t\t\t\t\tShrimpView.MOUSE_MODE_DEFAULT));\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tpublic void projectClosing(ShrimpProjectEvent event) {\n\t\t\t\tevent.getProject().removeProjectListener(shrimpProjectListener);\n\t\t\t}\n\t\t};\n\t\tproject.addProjectListener(shrimpProjectListener);\n\n\t}", "public void run()\r\n {\n pluginPerspectiveMainComponent.removeAll();\r\n pluginPerspectiveMainComponent.setLayout(new BorderLayout());\r\n pluginPerspectiveMainComponent.setBorder(new LineBorder(Color.BLACK));\r\n pluginPerspectiveMainComponent.add(jpBioCatalogueExplorationTab, BorderLayout.CENTER);\r\n \r\n // everything is prepared -- need to focus default component on the first tab\r\n // (artificially generate change event on the tabbed pane to perform focus request)\r\n// tpMainTabs.setSelectedIndex(1);\r\n// tpMainTabs.addChangeListener(pluginPerspectiveMainComponent);\r\n// tpMainTabs.setSelectedIndex(0);\r\n }", "void createSurfaceTool(){\n if(surfaceTool!=null){\n surfaceTool.toFront();\n }else{\n surfaceTool = new SurfaceTool(viewer, historyFile, SURFACETOOL_WINDOW_NAME, true);\n }\n }", "void startMonitoring()\n{\n if (!is_start) {\n monitor_logger = new MonitorLogger(log_file);\n // keybinding_monitor = new KeybindingCommandMonitor();\n perspective_monitor = new PerspectiveChangeMonitor();\n MonitorUiPlugin.getDefault().addWindowPerspectiveListener(perspective_monitor);\n\n monitor_logger.startMonitoring();\n MonitorUi.addInteractionListener(monitor_logger);\n is_start = true;\n BedrockPlugin.log(\"Start Logging Eclipse Interactions\");\n }\n}", "public void testFindPerspectiveInRegistry() {\n IPerspectiveRegistry reg = PlatformUI.getWorkbench().getPerspectiveRegistry();\n assertNull(reg.findPerspectiveWithId(PERSPECTIVE_ID));\n // ensure the bundle is loaded\n getBundle();\n assertNotNull(reg.findPerspectiveWithId(PERSPECTIVE_ID));\n // unload the bundle\n removeBundle();\n assertNull(reg.findPerspectiveWithId(PERSPECTIVE_ID));\n }", "public static void setPerspective(Shell shell) {\n shell.getDisplay().syncExec(new Runnable() {\n @Override\n public void run() {\n IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();\n if ((!\"org.wso2.integrationstudio.gmf.esb.diagram.custom.perspective\"\n .equals(window.getActivePage().getPerspective().getId())) && IMPORTED_DSS_PROJECT == null) {\n try {\n PlatformUI.getWorkbench().showPerspective(\n \"org.wso2.integrationstudio.gmf.esb.diagram.custom.perspective\", window);\n } catch (Exception e) {\n log.error(\"Cannot switch to ESB Graphical Perspective\", e);\n }\n } else if ((!\"org.wso2.integrationstudio.ds.presentation.custom.perspective\"\n .equals(window.getActivePage().getPerspective().getId())) && IMPORTED_DSS_PROJECT != null) {\n try {\n PlatformUI.getWorkbench().showPerspective(\n \"org.wso2.integrationstudio.ds.presentation.custom.perspective\", window);\n } catch (Exception e) {\n log.error(\"Cannot switch to DSS Graphical Perspective\", e);\n }\n }\n ProjectPresentation.setHierarchicalProjectPresentation();\n }\n });\n }", "public void perspectiveDeactivated( IWorkbenchPage page, IPerspectiveDescriptor perspective ) {\n\t }", "private void setupEventAwareness()\n {\n // Prevents user from moving caret in console during running\n {\n this.console.addEventFilter(MouseEvent.ANY, event ->\n {\n this.console.requestFocus();\n if (this.compileRunWorker.isRunning())\n event.consume();\n });\n }\n\n // Detects presses to tab (overriding the system default that deletes the selection) and calls tabOrUntab\n {\n this.tabPane.addEventFilter(KeyEvent.KEY_PRESSED, event ->\n {\n // if tab or shift+tab pressed\n if (event.getCode() == KeyCode.TAB)\n {\n tabOrUntab(event);\n }\n });\n }\n\n // Structure View various\n {\n SplitPane.Divider divider = this.horizontalSplitPane.getDividers().get(0);\n\n // Toggles the side panel\n this.checkBox.selectedProperty().addListener((observable, oldValue, newValue) ->\n {\n if (!newValue)\n divider.setPosition(0.0);\n else\n divider.setPosition(0.25);\n });\n\n // Prevents user from resizing split pane when closed\n divider.positionProperty().addListener(((observable, oldValue, newValue) ->\n {\n if (!this.checkBox.isSelected()) divider.setPosition(0.0);\n }));\n\n\n // Updates the file structure view whenever a key is typed\n this.tabPane.addEventFilter(KeyEvent.KEY_RELEASED, event ->\n {\n this.updateStructureView();\n\n });\n\n // Updates the file structure view whenever the tab selection changes\n // e.g., open tab, remove tab, select another tab\n this.tabPane.getSelectionModel().selectedItemProperty().addListener((ov, oldTab, newTab) ->\n {\n this.updateStructureView();\n });\n }\n }", "protected VisionWorldModelListenerSupport() {\n listenerList = new EventListenerList();\n }", "public void init() {\n eventManager.subscribe(EVENT_POPUP, this);\n }", "public void addPropertyChangeListener(PropertyChangeListener pcl) {\r\n\t\tSystem.out.println(\"[MAIN] Added property change listener\");\r\n\t\tsupport.addPropertyChangeListener(pcl);\r\n\t}", "private void initialize() {\n\t\t\tPlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().addSelectionListener(selectionListener);\n\n\t\t\tinvisibleRoot = new TreeParent(\"\");\n\t\t}", "@Override\r\n\t\t\t\tpublic void viewAdded(View view) {\n\t\t\t\t\tview.addListener(new ViewListener(){\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void sourceScannerAdded(DocumentScanner scanner) {\r\n\t\t\t\t\t\t\tscanner.addAndSynchronizeListener(listener);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\tview.setPlugin(SourceManager.class, new EclipseSourceManager(ChameleonProjectNature.this));\r\n\t\t\t\t\t//FIXME This should not be attached to a language, but to a view.\r\n\t\t\t\t\tview.addProcessor(InputProcessor.class, new EclipseEditorInputProcessor(ChameleonProjectNature.this));\r\n\t\t\t\t\t// Let the editor extension initialize the view.\r\n\t\t\t\t\t//FIXME this should not be done by IDE code. Need further improvements\r\n\t\t\t\t\tview.language().plugin(EclipseEditorExtension.class).initialize(view);\r\n\t\t\t\t\t//FIXME This will NOT work with language stacking, but for now it will do. Got more important things to do now.\r\n\t\t\t\t\t//\t\t\t\t\t\t\t_language = language;\r\n\t\t\t\t\t_view = view;\r\n\t\t\t\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public void onClick(View v) { if(v.getId() == R.id.pen_btn){ RevisionSettingDialog config = new RevisionSettingDialog(this, new OnSignChangedListener() { @Override public void changed(int color, int size, int type) { // TODO Auto-generated method stub full_sign_view.configSign(color, size, type); } }); config.setProgress(30); config.setKeyName(fieldName + "full_sign_color", fieldName + "full_sign_type", fieldName + "full_sign_size"); config.show(); } else if(v.getId() == R.id.clear_btn){ full_sign_view.clearSign(); } else if(v.getId() == R.id.undo_btn){ full_sign_view.undoSign(); } else if(v.getId() == R.id.redo_btn){ full_sign_view.redoSign(); } else if(v.getId() == R.id.save_btn){ Bitmap sign_bmp = full_sign_view.saveSign(); if(sign_bmp == null){ Toast.makeText(this, "签批内容为空", Toast.LENGTH_SHORT).show(); return; } byte[] sign_bmp_byte = Bitmap2Bytes(sign_bmp); Intent in = new Intent(getIntent().getAction()); in.putExtra("singbmp", sign_bmp_byte); setResult(RESULT_OK, in); full_sign_view.setDrawingCacheEnabled(false); closeFullSignView(); } else if(v.getId() == R.id.close_btn){ closeFullSignView(); } }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void classement() {\n\t\t\t\n\t\t}", "@Override\r\n public void publicando() {\n }", "@Override\n\tpublic void tyre() {\n\t\t\n\t}", "@Override\n \tpublic void init() {\n \n \t}", "private static void EX5() {\n\t\t\r\n\t}", "protected void method_5557() {}", "@Override\n\tpublic void cafeteria() {\n\t\t\n\t}", "@Override\r\n\tpublic void preco() {\n\r\n\t}", "@Override\r\n\tpublic void jugar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void limpar() {\n\t\t\r\n\t}", "public void mo5201a() {\n }", "@Override\n\tpublic void annuler() {\n\n\t}", "@Override\r\n\tpublic void zwroc() {\n\t\t\r\n\t}", "@Override\n\t\tprotected void swop() {\n\n\t\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
return mMonths[(int) value % mMonths.length]; return String.valueOf(value); return getDateToString((long) MyResult.get((int) value).getTime(),"HH:mm:ss");
@Override public String getFormattedValue(float value, AxisBase axis) { return null; }
[ "public String myTimeInTime(){\n\tString result =\"[\";\n\tCalendar stop = Calendar.getInstance();\n\tCalendar start = Calendar.getInstance();\n\tCalendar mid= Calendar.getInstance();\n\tint i = 7;\n\twhile(i>0){\n\t\tstart.roll(Calendar.DAY_OF_YEAR,false);\n\t\tmid.roll(Calendar.DAY_OF_YEAR,false);\n\t\ti--;\n\t}\n\t\n\tString currentUserName = UserManager.getInstance().getCurrentUserName();\n\twhile(start.before(stop)){\n\t\tint getal=0;\n\t\tmid.roll(Calendar.DAY_OF_YEAR,true);\n\tfor(Activity act:UserManager.getInstance().getActivities()){\n\t\tif(act.getStart().after(start.getTime())&&act.getStart().before(mid.getTime())&&act.getActivityType().equals(\"scolair\")){\n\t\t\tgetal = getal+act.getDuration();\n\t\t\t}\n\t\t}\n\tresult = result + \"[\"+\"'\"+(start.getTime().getMonth()+1)+\"/\"+ start.getTime().getDate() +\"/\"+ (start.getTime().getYear()+1900) +\"'\"+ \",\" + getal + \"]\";\tstart.roll(Calendar.DAY_OF_YEAR,true);\n\tif(start.before(stop)){result = result + \",\";\n\t}\n\t\n}result= result+\"]\";\nreturn result;\n}", "private String stringTime(final long mills){\n\t\tfinal int hours = (int) (mills / 3600000);\n\t\tfinal long millsMinusHours = mills - (hours * 3600000);\n\t\tfinal int minutes = (int) ( millsMinusHours / 60000);\n\t\tfinal int seconds = ((int) (millsMinusHours % 60000)) / 1000;\n\t\treturn hours +\" : \"+ padTime(minutes) +\" : \"+ padTime(seconds);\n\t}", "public String FinalTime(long m) {\n\n long day,hour,min,secs;\n String last;\n Date change;\n SimpleDateFormat f;\n secs = m / 1000;\n min= secs / 60;\n hour = min/ 60;\n day =hour / 24;\n if(day>0)\n {\n last = day + \":\" + hour % 24 + \":\" + min % 60 + \":\" + secs % 60;//f.format(new Date(m));//to kanw ths morfhs wres:lepta:secs\n ParsePosition pos2 = new ParsePosition(0);\n f=new SimpleDateFormat(\"D:HH:mm:ss\");\n change=f.parse(last,pos2);\n }\n else\n {\n last = +hour % 24 + \":\" + min % 60 + \":\" + secs % 60;\n\n ParsePosition pos2 = new ParsePosition(0);\n f = new SimpleDateFormat(\"HH:mm:ss\");\n change = f.parse(last, pos2);\n }\n return f.format(change);\n }", "public String getContestTimeString ()\r\n{\r\n\r\nint runtime = (int) Math.floor(stopwatchTick*timeStep*1000);\r\nint rsec = runtime / 1000;\r\n\r\nint mins = rsec/60;\r\n\r\nint secs = rsec%60;\r\n\r\nint msecs = runtime %1000;\r\n\r\n//String rs = \"\";\r\n//if (simSupportContestReset) rs = String.format (\"Resets %d\",contestResetCount);\r\n\r\nreturn String.format(\"%2d:%02d:%03d\",mins,secs,msecs); // originally appended reset count\r\n\r\n}", "private String formatTime(long millisecs){\n\t\tSimpleDateFormat timeFormat = new SimpleDateFormat(\"HH:mm:ss:SSS\");\n\t\tDate resultTime = new Date(millisecs);\n\t\treturn timeFormat.format(resultTime);\n\t}", "public String convertTime(long time){\n String timeString=String.format(\"%02d:%02d \",\n\n java.util.concurrent.TimeUnit.MILLISECONDS.toMinutes((long) time),\n java.util.concurrent.TimeUnit.MILLISECONDS.toSeconds((long) time) -\n java.util.concurrent.TimeUnit.MINUTES.toSeconds(java.util.concurrent.TimeUnit.MILLISECONDS.\n toMinutes((long) time)));\n\n return timeString;\n}", "private String YMDHMS(){\n SimpleDateFormat sdr = new SimpleDateFormat(\"yyyy.MM.dd HH:mm:ss\");\n long time = System.currentTimeMillis() / 1000;\n String str = String.valueOf(time);\n @SuppressWarnings(\"unused\")\n long lcc = Long.valueOf(str);\n int i = Integer.parseInt(str);\n String time_s = sdr.format(new Date(i * 1000L));\n return time_s;\n }", "public String[] getDateString ()\n {\n String[] output = new String[duration];\n for (int i = 0; i < duration; i++) \n {\n output[i] = day[i] + \"-\" + month[i]+1 + \"-\" + year[i];\n }\n return output;\n }", "public String getTime() {\n return String.format(Locale.UK,\"%02d:%02d\", totalTime/60,totalTime%60);\n }", "private String getTime(Calendar cal) {\n\t\tDate date = cal.getTime();\r\n\t\tDateFormat df = new SimpleDateFormat(\"kk:mm\");\r\n\t\treturn df.format(date);\r\n/*\t\tint h = cal.get(Calendar.HOUR_OF_DAY);\r\n\t\tint m = cal.get(Calendar.MINUTE);\r\n\t\tString hour, minute;\r\n\t\tif(h < 10){\r\n\t\t\thour = \"0\" + h;\r\n\t\t} else {\r\n\t\t\thour = \"\" + h;\r\n\t\t}\r\n\t\tif(m < 10){\r\n\t\t\tminute = \"0\" + m;\r\n\t\t} else {\r\n\t\t\tminute = \"\" + m;\r\n\t\t}\r\n\t\treturn hour + \":\" + minute;*/\r\n\t}", "private String calcDate(long millisecs) {\n\t\treturn \"\";\n\t}", "private String getTime() {\n\t\tCalendar cal = new GregorianCalendar();\n\t\t\n\t\t// Hour, Minute, Second\n\t\th=cal.get(Calendar.HOUR);\n\t\tm=cal.get(Calendar.MINUTE);\n\t\ts=cal.get(Calendar.SECOND);\n\t\t\n\t\tString strH;\n\t\tString strM;\n\t\t\n\t\tif(h<10) {\n\t\t\tstrH=\"0\"+String.valueOf(h);\n\t\t}\n\t\telse strH=String.valueOf(h);\n\t\t\n\t\tif(m<10) {\n\t\t\tstrM=\"0\"+String.valueOf(m);\n\t\t}\n\t\telse strM=String.valueOf(m);\n\t\t\n\t\treturn strH+\" : \"+strM;\n\t}", "public Date getTime(){\n\n\n Date dateTime = new Date(time[0].get()+100,time[1].get()-1,time[2].get(),time[3].get(),time[4].get(),time[5].get());\n return dateTime;\n }", "public double getTime(int index);", "public String convertToTimeStringFormat(long dbRecord ){\n Log.i(\"convert \", \"record= \" + dbRecord);\n int secs = (int) (dbRecord / 1000);\n int mins = secs / 60;\n secs = secs % 60;\n int milliseconds = (int) (dbRecord % 1000);\n String dBT = \" \" + mins + \":\" + String.format(\"%02d\", secs) + \":\" + String.format(\"%03d\", milliseconds);\n Log.i(\"convertTime\", \"convert \" + dbRecord);\n return dBT;\n\n }", "private String getHoursAndMinutes(Double value) {\r\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"HHHHH:mm:ss\");\r\n\t\tDate date = new Date();\r\n\t\t// java.util.Calendar\r\n\t\treturn dateFormat.format(date);\r\n\t}", "public static final String toString(int durationSeconds, boolean includeMonths) {\n\n int seconds = durationSeconds;\n int months = (includeMonths ? seconds / TIME_UNIT_MULTIPLIERS[0] : 0);\n seconds -= months * TIME_UNIT_MULTIPLIERS[0];\n int weeks = seconds / TIME_UNIT_MULTIPLIERS[1];\n seconds -= weeks * TIME_UNIT_MULTIPLIERS[1];\n int days = seconds / TIME_UNIT_MULTIPLIERS[2];\n seconds -= days * TIME_UNIT_MULTIPLIERS[2];\n int hours = seconds / 3600;\n seconds -= hours * 3600;\n int minutes = seconds / 60;\n seconds -= minutes * 60;\n\n StringBuilder buf = new StringBuilder();\n if (months > 0) {\n\n buf.append(months).append(\"mo\");\n if (weeks > 0) {\n buf.append(weeks).append('w');\n }\n\n if (seconds > 0) {\n buf.append(days).append('d').append(hours).append('h').append(minutes).append('m').append(seconds).append('s');\n } else if (minutes > 0) {\n buf.append(days).append('d').append(hours).append('h').append(minutes).append('m');\n } else if (hours > 0) {\n buf.append(days).append('d').append(hours).append('h');\n } else if (days > 0) {\n buf.append(days).append('d');\n }\n\n } else if (weeks > 0) {\n\n buf.append(weeks).append('w');\n if (seconds > 0) {\n buf.append(days).append('d').append(hours).append('h').append(minutes).append('m').append(seconds).append('s');\n } else if (minutes > 0) {\n buf.append(days).append('d').append(hours).append('h').append(minutes).append('m');\n } else if (hours > 0) {\n buf.append(days).append('d').append(hours).append('h');\n } else if (days > 0) {\n buf.append(days).append('d');\n }\n\n } else if (days > 0) {\n\n buf.append(days).append('d');\n if (seconds > 0) {\n buf.append(hours).append('h').append(minutes).append('m').append(seconds).append('s');\n } else if (minutes > 0) {\n buf.append(hours).append('h').append(minutes).append('m');\n } else if (hours > 0) {\n buf.append(hours).append('h');\n }\n\n } else if (hours > 0) {\n\n buf.append(hours).append('h');\n if (seconds > 0) {\n buf.append(minutes).append('m').append(seconds).append('s');\n } else if (minutes > 0) {\n buf.append(minutes).append('m');\n }\n\n } else if (minutes > 0) {\n\n buf.append(minutes).append('m');\n if (seconds > 0) {\n buf.append(seconds).append('s');\n }\n\n } else {\n buf.append(' ').append(seconds).append('s');\n }\n\n return (buf.toString());\n }", "private static String getDurationString(int mins, int sec){\n if (mins < 0 || sec < 0 || sec > 59) {\n return INVALID_MESSAGE;\n\n }\n int hours = mins/60;\n int minutes = mins % 60;\n int seconds = sec;\n String myString = hours +\"h \"+minutes+\"m \"+seconds+\"s\";\n return myString;\n\n\n\n }", "public String getWorkTime()\r\n/* 55: */ {\r\n/* 56:43 */ return this.workTime;\r\n/* 57: */ }", "private void calcula() {\n Calendar calendario = new GregorianCalendar();\n Date fechaHoraActual = new Date();\n \n calendario.setTime(fechaHoraActual);\n hora= calendario.get(Calendar.HOUR_OF_DAY)>9?\"\"+calendario.get(Calendar.HOUR_OF_DAY):\"0\"+calendario.get(Calendar.HOUR_OF_DAY); \n \n minutos = calendario.get(Calendar.MINUTE)>9?\"\"+calendario.get(Calendar.MINUTE):\"0\"+calendario.get(Calendar.MINUTE);\n segundos = calendario.get(Calendar.SECOND)>9?\"\"+calendario.get(Calendar.SECOND):\"0\"+calendario.get(Calendar.SECOND);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handles the HTTP GET method.
@Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
[ "@Override\n\tpublic void handleGET(CoapExchange exchange) {\n\n\t\t\n\t}", "protected void doGet(HttpServletRequest req, HttpServletResponse response) throws ServletException, IOException {\r\n\t\tSystem.out.println(\"--> get\");\r\n\t}", "public void doGet(HttpServletRequest request, HttpServletResponse response) {\n\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\r\n\r\n System.out.println(\"Console: doGET visited\");\r\n String id = \"\";\r\n if ((request.getPathInfo()) != null) {\r\n id = (request.getPathInfo()).substring(1);\r\n }\r\n //Gets the menu from database\r\n String getResponse = sharebiteModel.getMenu(id);\r\n response.setStatus(200);\r\n response.setContentType(\"text/plain;charset=UTF-8\");\r\n\r\n // return the value from a GET request\r\n PrintWriter out = response.getWriter();\r\n out.println(getResponse);\r\n }", "@Override\n\tpublic void doGet(HttpServletRequest requ, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString timestamp = getTimeStamp();\n\t\tSystem.out.println(timestamp + \"GET-Request: API\");\n\t\tresp.getOutputStream().println(\"Du solltest nicht hier sein...\");\n\n\t}", "@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse res)\n throws ServletException, IOException {\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n //TODO: The GET method is not useful for this servlet so a proper response is needed.\r\n }", "@Override\n public void perform_GET(String uri, HttpServletRequest request, HttpServletResponse response)\n throws IOException {\n performAction(uri, request, response);\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, \n\t\t\t\t\t\t HttpServletResponse resp)\n\t\t\t throws ServletException, IOException {\t\n\t\tsuper.doGet(req, resp);\n\t}", "protected void doGet (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n }", "protected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n\t throws ServletException, IOException {\r\n\t\t//System.out.println(\"__AssimilateData doGet__\");\r\n\t super.doGet(req, resp);\r\n\t logger.log(Level.INFO, \"Obtaining Leader listing\");\r\n\t doLeader();\r\n\t doParty();\r\n\t }", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse response){\n\t\tString method = req.getParameter(\"method\");\r\n\t\tif (\"findById\".equals(method)) {\r\n\t\t\tfindById(req, response);\r\n\t\t}\r\n\t}", "@Override\n protected void doGet(HttpServletRequest req,HttpServletResponse resp) throws ServletException,IOException{\n super.doGet (req, resp);\n }", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException\r\n\t{\n\tthis.execute(req, resp);\r\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n String name = (request.getPathInfo()).substring(1);\n \n \n if(name.equals(\"revenue/\") || name.equals(\"newusercount/\") || name.equals(\"arpau/\") || name.equals(\"activeusers/\")){\n\n //result is a string that will send back to client\n String result = \"\";\n\n //call the right method based on the ending text of the coming url\n if (name.equals(\"revenue/\")) {\n\n result = model.getRevenue();\n\n } else if (name.equals(\"activeusers/\")) {\n result = model.getActiveuser();\n } else if (name.equals(\"newusercount/\")) {\n result = model.getNewuser();\n } else if (name.equals(\"arpau/\")) {\n result = model.getAvgRevenue();\n }\n\n response.setStatus(200);\n \n // tell the client the type of the response\n response.setContentType(\"text/plain;charset=UTF-8\");\n // return the value from a GET request\n PrintWriter out = response.getWriter();\n\n out.println(result);\n }\n else{\n response.setContentType(\"text/plain;charset=UTF-8\");\n PrintWriter out = response.getWriter();\n out.println(\"Two Six Captical Data Challenge\\nName: Ping Jou Chiang\");\n }\n }", "@Override\n public void doGet( HttpServletRequest req,\n HttpServletResponse res ) throws IOException\n {\n LOGGER.info(\"run method doGet: request-{}, response-{}\",req,res);\n\n res.setContentType(\"application/json\");\n PrintWriter out = res.getWriter();\n //call get method\n get(req, res, out);\n\n out.flush();\n out.close();\n }", "@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n // We need to extract the id of the movie from the URL.\n // We can obtain it from req.getPathInfo() by removing the leading \"/\" with substring().\n // And we parse this String as a number.\n long id;\n try {\n id = Long.parseLong(req.getPathInfo().substring(1));\n } catch (NumberFormatException ex) {\n ResponseHelper.writeError(resp, \"Invalid id\", HttpServletResponse.SC_NOT_FOUND);\n return;\n }\n\n // Find movie from the repository.\n Actor actor = MoviesRepository.getInstance().getActor(id);\n if (actor != null) {\n ResponseHelper.writeJsonResponse(resp, actor);\n } else {\n ResponseHelper.writeError(resp, \"Actor not found\", HttpServletResponse.SC_NOT_FOUND);\n }\n }", "public void doGet(\n\t HttpServletRequest req,\n\t HttpServletResponse resp)\n\t\t throws IOException, ServletException {\n\n\t\t// Set up output writer.\n\t\tPrintWriter respwtr = resp.getWriter();\n\t\trespwtr.print(\" doGet() \");\n\t\trespwtr.close();\n\n\t}", "@RestMethod(name=GET, path=\"/\")\r\n\tpublic void doGet(RestResponse res) {\r\n\t\tres.setOutput(GET);\r\n\t}", "@Override\n\tpublic void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tSystem.out.println(\"Servlet服务------->doGet()\");\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleXAdditiveExpression" $ANTLR start "entryRuleOpAdd" InternalJQVT.g:739:1: entryRuleOpAdd : ruleOpAdd EOF ;
public final void entryRuleOpAdd() throws RecognitionException { try { // InternalJQVT.g:740:1: ( ruleOpAdd EOF ) // InternalJQVT.g:741:1: ruleOpAdd EOF { if ( state.backtracking==0 ) { before(grammarAccess.getOpAddRule()); } pushFollow(FOLLOW_1); ruleOpAdd(); state._fsp--; if (state.failed) return ; if ( state.backtracking==0 ) { after(grammarAccess.getOpAddRule()); } match(input,EOF,FOLLOW_2); if (state.failed) return ; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return ; }
[ "public final void entryRuleOpAdd() throws RecognitionException {\n try {\n // ../fr.obeo.dsl.sprototyper.ui/src-gen/fr/obeo/dsl/ui/contentassist/antlr/internal/InternalSPrototyper.g:1440:1: ( ruleOpAdd EOF )\n // ../fr.obeo.dsl.sprototyper.ui/src-gen/fr/obeo/dsl/ui/contentassist/antlr/internal/InternalSPrototyper.g:1441:1: ruleOpAdd EOF\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getOpAddRule()); \n }\n pushFollow(FOLLOW_ruleOpAdd_in_entryRuleOpAdd3011);\n ruleOpAdd();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getOpAddRule()); \n }\n match(input,EOF,FOLLOW_EOF_in_entryRuleOpAdd3018); if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "public final String entryRuleOpAdd() throws RecognitionException {\r\n String current = null;\r\n\r\n AntlrDatatypeRuleToken iv_ruleOpAdd = null;\r\n\r\n\r\n try {\r\n // ../org.eclipse.emf.ecore.xcore/src-gen/org/eclipse/emf/ecore/xcore/parser/antlr/internal/InternalXcore.g:4347:2: (iv_ruleOpAdd= ruleOpAdd EOF )\r\n // ../org.eclipse.emf.ecore.xcore/src-gen/org/eclipse/emf/ecore/xcore/parser/antlr/internal/InternalXcore.g:4348:2: iv_ruleOpAdd= ruleOpAdd EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n newCompositeNode(grammarAccess.getOpAddRule()); \r\n }\r\n pushFollow(FollowSets000.FOLLOW_ruleOpAdd_in_entryRuleOpAdd10192);\r\n iv_ruleOpAdd=ruleOpAdd();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n current =iv_ruleOpAdd.getText(); \r\n }\r\n match(input,EOF,FollowSets000.FOLLOW_EOF_in_entryRuleOpAdd10203); if (state.failed) return current;\r\n\r\n }\r\n\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "public final String entryRuleOpAdd() throws RecognitionException {\n String current = null;\n\n AntlrDatatypeRuleToken iv_ruleOpAdd = null;\n\n\n try {\n // InternalKobold.g:1250:45: (iv_ruleOpAdd= ruleOpAdd EOF )\n // InternalKobold.g:1251:2: iv_ruleOpAdd= ruleOpAdd EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getOpAddRule()); \n }\n pushFollow(FOLLOW_1);\n iv_ruleOpAdd=ruleOpAdd();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleOpAdd.getText(); \n }\n match(input,EOF,FOLLOW_2); if (state.failed) return current;\n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public final String entryRuleOpAdd() throws RecognitionException {\r\n String current = null;\r\n\r\n AntlrDatatypeRuleToken iv_ruleOpAdd = null;\r\n\r\n\r\n try {\r\n // ../org.yakindu.sct.generator.genmodel/src-gen/org/yakindu/sct/generator/genmodel/parser/antlr/internal/InternalSGen.g:1233:2: (iv_ruleOpAdd= ruleOpAdd EOF )\r\n // ../org.yakindu.sct.generator.genmodel/src-gen/org/yakindu/sct/generator/genmodel/parser/antlr/internal/InternalSGen.g:1234:2: iv_ruleOpAdd= ruleOpAdd EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n newCompositeNode(grammarAccess.getOpAddRule()); \r\n }\r\n pushFollow(FOLLOW_ruleOpAdd_in_entryRuleOpAdd2984);\r\n iv_ruleOpAdd=ruleOpAdd();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n current =iv_ruleOpAdd.getText(); \r\n }\r\n match(input,EOF,FOLLOW_EOF_in_entryRuleOpAdd2995); if (state.failed) return current;\r\n\r\n }\r\n\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "public final void entryRuleAdditiveExpression() throws RecognitionException {\n try {\n // InternalReflex.g:955:1: ( ruleAdditiveExpression EOF )\n // InternalReflex.g:956:1: ruleAdditiveExpression EOF\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getAdditiveExpressionRule()); \n }\n pushFollow(FOLLOW_1);\n ruleAdditiveExpression();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getAdditiveExpressionRule()); \n }\n match(input,EOF,FOLLOW_2); if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "public final void entryRuleXAdditiveExpression() throws RecognitionException {\n try {\n // InternalOcelet.g:1280:1: ( ruleXAdditiveExpression EOF )\n // InternalOcelet.g:1281:1: ruleXAdditiveExpression EOF\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXAdditiveExpressionRule()); \n }\n pushFollow(FOLLOW_1);\n ruleXAdditiveExpression();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXAdditiveExpressionRule()); \n }\n match(input,EOF,FOLLOW_2); if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "public final EObject entryRuleXAdditiveExpression() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleXAdditiveExpression = null;\n\n\n try {\n // ../hsh.swa.ocl/src-gen/hsh/swa/ocl/parser/antlr/internal/InternalOCL.g:1439:2: (iv_ruleXAdditiveExpression= ruleXAdditiveExpression EOF )\n // ../hsh.swa.ocl/src-gen/hsh/swa/ocl/parser/antlr/internal/InternalOCL.g:1440:2: iv_ruleXAdditiveExpression= ruleXAdditiveExpression EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getXAdditiveExpressionRule()); \n }\n pushFollow(FOLLOW_ruleXAdditiveExpression_in_entryRuleXAdditiveExpression3475);\n iv_ruleXAdditiveExpression=ruleXAdditiveExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleXAdditiveExpression; \n }\n match(input,EOF,FOLLOW_EOF_in_entryRuleXAdditiveExpression3485); if (state.failed) return current;\n\n }\n\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public final EObject entryRuleXAdditiveExpression() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleXAdditiveExpression = null;\n\n\n try {\n // ../org.eclipse.xtext.graphview.map/src-gen/org/eclipse/xtext/graphview/map/parser/antlr/internal/InternalGraphViewMapping.g:1877:2: (iv_ruleXAdditiveExpression= ruleXAdditiveExpression EOF )\n // ../org.eclipse.xtext.graphview.map/src-gen/org/eclipse/xtext/graphview/map/parser/antlr/internal/InternalGraphViewMapping.g:1878:2: iv_ruleXAdditiveExpression= ruleXAdditiveExpression EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getXAdditiveExpressionRule()); \n }\n pushFollow(FOLLOW_ruleXAdditiveExpression_in_entryRuleXAdditiveExpression4313);\n iv_ruleXAdditiveExpression=ruleXAdditiveExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleXAdditiveExpression; \n }\n match(input,EOF,FOLLOW_EOF_in_entryRuleXAdditiveExpression4323); if (state.failed) return current;\n\n }\n\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public final EObject entryRuleXAdditiveExpression() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject iv_ruleXAdditiveExpression = null;\r\n\r\n\r\n try {\r\n // ../be.unamur.xtext.CoreAl/src-gen/be/unamur/xtext/parser/antlr/internal/InternalCoreAl.g:2150:2: (iv_ruleXAdditiveExpression= ruleXAdditiveExpression EOF )\r\n // ../be.unamur.xtext.CoreAl/src-gen/be/unamur/xtext/parser/antlr/internal/InternalCoreAl.g:2151:2: iv_ruleXAdditiveExpression= ruleXAdditiveExpression EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n newCompositeNode(grammarAccess.getXAdditiveExpressionRule()); \r\n }\r\n pushFollow(FOLLOW_ruleXAdditiveExpression_in_entryRuleXAdditiveExpression5124);\r\n iv_ruleXAdditiveExpression=ruleXAdditiveExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n current =iv_ruleXAdditiveExpression; \r\n }\r\n match(input,EOF,FOLLOW_EOF_in_entryRuleXAdditiveExpression5134); if (state.failed) return current;\r\n\r\n }\r\n\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "public final void entryRuleAddition() throws RecognitionException {\n try {\n // InternalArgument.g:341:1: ( ruleAddition EOF )\n // InternalArgument.g:342:1: ruleAddition EOF\n {\n before(grammarAccess.getAdditionRule()); \n pushFollow(FOLLOW_1);\n ruleAddition();\n\n state._fsp--;\n\n after(grammarAccess.getAdditionRule()); \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "public final void entryRuleInstruction_add() throws RecognitionException {\n try {\n // ../com.intel.llvm.ireditor.ui/src-gen/com/intel/llvm/ireditor/ui/contentassist/antlr/internal/InternalLLVM_IR.g:2231:1: ( ruleInstruction_add EOF )\n // ../com.intel.llvm.ireditor.ui/src-gen/com/intel/llvm/ireditor/ui/contentassist/antlr/internal/InternalLLVM_IR.g:2232:1: ruleInstruction_add EOF\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getInstruction_addRule()); \n }\n pushFollow(FollowSets000.FOLLOW_ruleInstruction_add_in_entryRuleInstruction_add4717);\n ruleInstruction_add();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getInstruction_addRule()); \n }\n match(input,EOF,FollowSets000.FOLLOW_EOF_in_entryRuleInstruction_add4724); if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "public final AntlrDatatypeRuleToken ruleOpAdd() throws RecognitionException {\n AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();\n\n Token kw=null;\n\n enterRule(); \n \n try {\n // ../org.eclipse.xtext.graphview.map/src-gen/org/eclipse/xtext/graphview/map/parser/antlr/internal/InternalGraphViewMapping.g:1962:28: ( (kw= '+' | kw= '-' ) )\n // ../org.eclipse.xtext.graphview.map/src-gen/org/eclipse/xtext/graphview/map/parser/antlr/internal/InternalGraphViewMapping.g:1963:1: (kw= '+' | kw= '-' )\n {\n // ../org.eclipse.xtext.graphview.map/src-gen/org/eclipse/xtext/graphview/map/parser/antlr/internal/InternalGraphViewMapping.g:1963:1: (kw= '+' | kw= '-' )\n int alt38=2;\n int LA38_0 = input.LA(1);\n\n if ( (LA38_0==49) ) {\n alt38=1;\n }\n else if ( (LA38_0==50) ) {\n alt38=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return current;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 38, 0, input);\n\n throw nvae;\n }\n switch (alt38) {\n case 1 :\n // ../org.eclipse.xtext.graphview.map/src-gen/org/eclipse/xtext/graphview/map/parser/antlr/internal/InternalGraphViewMapping.g:1964:2: kw= '+'\n {\n kw=(Token)match(input,49,FOLLOW_49_in_ruleOpAdd4534); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current.merge(kw);\n newLeafNode(kw, grammarAccess.getOpAddAccess().getPlusSignKeyword_0()); \n \n }\n\n }\n break;\n case 2 :\n // ../org.eclipse.xtext.graphview.map/src-gen/org/eclipse/xtext/graphview/map/parser/antlr/internal/InternalGraphViewMapping.g:1971:2: kw= '-'\n {\n kw=(Token)match(input,50,FOLLOW_50_in_ruleOpAdd4553); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current.merge(kw);\n newLeafNode(kw, grammarAccess.getOpAddAccess().getHyphenMinusKeyword_1()); \n \n }\n\n }\n break;\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public final void addop() throws RecognitionException {\n try {\n // src/Micro.g:161:3: ( '+' | '-' )\n // src/Micro.g:\n {\n if ( (input.LA(1)>=33 && input.LA(1)<=34) ) {\n input.consume();\n state.errorRecovery=false;\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n throw mse;\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "public final EObject entryRuleXAdditiveExpression() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleXAdditiveExpression = null;\n\n\n try {\n // InternalEntities.g:1581:60: (iv_ruleXAdditiveExpression= ruleXAdditiveExpression EOF )\n // InternalEntities.g:1582:2: iv_ruleXAdditiveExpression= ruleXAdditiveExpression EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getXAdditiveExpressionRule()); \n }\n pushFollow(FOLLOW_1);\n iv_ruleXAdditiveExpression=ruleXAdditiveExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleXAdditiveExpression; \n }\n match(input,EOF,FOLLOW_2); if (state.failed) return current;\n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public final void synpred9_InternalXcore_fragment() throws RecognitionException { \r\n // ../org.eclipse.emf.ecore.xcore/src-gen/org/eclipse/emf/ecore/xcore/parser/antlr/internal/InternalXcore.g:4294:3: ( ( () ( ( ruleOpAdd ) ) ) )\r\n // ../org.eclipse.emf.ecore.xcore/src-gen/org/eclipse/emf/ecore/xcore/parser/antlr/internal/InternalXcore.g:4294:4: ( () ( ( ruleOpAdd ) ) )\r\n {\r\n // ../org.eclipse.emf.ecore.xcore/src-gen/org/eclipse/emf/ecore/xcore/parser/antlr/internal/InternalXcore.g:4294:4: ( () ( ( ruleOpAdd ) ) )\r\n // ../org.eclipse.emf.ecore.xcore/src-gen/org/eclipse/emf/ecore/xcore/parser/antlr/internal/InternalXcore.g:4294:5: () ( ( ruleOpAdd ) )\r\n {\r\n // ../org.eclipse.emf.ecore.xcore/src-gen/org/eclipse/emf/ecore/xcore/parser/antlr/internal/InternalXcore.g:4294:5: ()\r\n // ../org.eclipse.emf.ecore.xcore/src-gen/org/eclipse/emf/ecore/xcore/parser/antlr/internal/InternalXcore.g:4295:1: \r\n {\r\n }\r\n\r\n // ../org.eclipse.emf.ecore.xcore/src-gen/org/eclipse/emf/ecore/xcore/parser/antlr/internal/InternalXcore.g:4295:2: ( ( ruleOpAdd ) )\r\n // ../org.eclipse.emf.ecore.xcore/src-gen/org/eclipse/emf/ecore/xcore/parser/antlr/internal/InternalXcore.g:4296:1: ( ruleOpAdd )\r\n {\r\n // ../org.eclipse.emf.ecore.xcore/src-gen/org/eclipse/emf/ecore/xcore/parser/antlr/internal/InternalXcore.g:4296:1: ( ruleOpAdd )\r\n // ../org.eclipse.emf.ecore.xcore/src-gen/org/eclipse/emf/ecore/xcore/parser/antlr/internal/InternalXcore.g:4297:3: ruleOpAdd\r\n {\r\n pushFollow(FollowSets000.FOLLOW_ruleOpAdd_in_synpred9_InternalXcore10098);\r\n ruleOpAdd();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n }", "public final EObject entryRuleAdditiveExpression() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject iv_ruleAdditiveExpression = null;\r\n\r\n\r\n try {\r\n // InternalIvml.g:4009:2: (iv_ruleAdditiveExpression= ruleAdditiveExpression EOF )\r\n // InternalIvml.g:4010:2: iv_ruleAdditiveExpression= ruleAdditiveExpression EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n newCompositeNode(grammarAccess.getAdditiveExpressionRule()); \r\n }\r\n pushFollow(FOLLOW_1);\r\n iv_ruleAdditiveExpression=ruleAdditiveExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n current =iv_ruleAdditiveExpression; \r\n }\r\n match(input,EOF,FOLLOW_2); if (state.failed) return current;\r\n\r\n }\r\n\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "public final EObject ruleAdditiveExpressionPart() throws RecognitionException {\r\n EObject current = null;\r\n\r\n AntlrDatatypeRuleToken lv_op_0_0 = null;\r\n\r\n EObject lv_ex_1_0 = null;\r\n\r\n\r\n enterRule(); \r\n \r\n try {\r\n // InternalIvml.g:4077:28: ( ( ( (lv_op_0_0= ruleAdditiveOperator ) ) ( (lv_ex_1_0= ruleMultiplicativeExpression ) ) ) )\r\n // InternalIvml.g:4078:1: ( ( (lv_op_0_0= ruleAdditiveOperator ) ) ( (lv_ex_1_0= ruleMultiplicativeExpression ) ) )\r\n {\r\n // InternalIvml.g:4078:1: ( ( (lv_op_0_0= ruleAdditiveOperator ) ) ( (lv_ex_1_0= ruleMultiplicativeExpression ) ) )\r\n // InternalIvml.g:4078:2: ( (lv_op_0_0= ruleAdditiveOperator ) ) ( (lv_ex_1_0= ruleMultiplicativeExpression ) )\r\n {\r\n // InternalIvml.g:4078:2: ( (lv_op_0_0= ruleAdditiveOperator ) )\r\n // InternalIvml.g:4079:1: (lv_op_0_0= ruleAdditiveOperator )\r\n {\r\n // InternalIvml.g:4079:1: (lv_op_0_0= ruleAdditiveOperator )\r\n // InternalIvml.g:4080:3: lv_op_0_0= ruleAdditiveOperator\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n \t newCompositeNode(grammarAccess.getAdditiveExpressionPartAccess().getOpAdditiveOperatorParserRuleCall_0_0()); \r\n \t \r\n }\r\n pushFollow(FOLLOW_25);\r\n lv_op_0_0=ruleAdditiveOperator();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \t if (current==null) {\r\n \t current = createModelElementForParent(grammarAccess.getAdditiveExpressionPartRule());\r\n \t }\r\n \t\tset(\r\n \t\t\tcurrent, \r\n \t\t\t\"op\",\r\n \t\tlv_op_0_0, \r\n \t\t\"de.uni_hildesheim.sse.Ivml.AdditiveOperator\");\r\n \t afterParserOrEnumRuleCall();\r\n \t \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n // InternalIvml.g:4096:2: ( (lv_ex_1_0= ruleMultiplicativeExpression ) )\r\n // InternalIvml.g:4097:1: (lv_ex_1_0= ruleMultiplicativeExpression )\r\n {\r\n // InternalIvml.g:4097:1: (lv_ex_1_0= ruleMultiplicativeExpression )\r\n // InternalIvml.g:4098:3: lv_ex_1_0= ruleMultiplicativeExpression\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n \t newCompositeNode(grammarAccess.getAdditiveExpressionPartAccess().getExMultiplicativeExpressionParserRuleCall_1_0()); \r\n \t \r\n }\r\n pushFollow(FOLLOW_2);\r\n lv_ex_1_0=ruleMultiplicativeExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \t if (current==null) {\r\n \t current = createModelElementForParent(grammarAccess.getAdditiveExpressionPartRule());\r\n \t }\r\n \t\tset(\r\n \t\t\tcurrent, \r\n \t\t\t\"ex\",\r\n \t\tlv_ex_1_0, \r\n \t\t\"de.uni_hildesheim.sse.Ivml.MultiplicativeExpression\");\r\n \t afterParserOrEnumRuleCall();\r\n \t \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "public final EObject ruleXAdditiveExpression() throws RecognitionException {\n EObject current = null;\n\n EObject this_XMultiplicativeExpression_0 = null;\n\n EObject lv_rightOperand_3_0 = null;\n\n\n enterRule(); \n \n try {\n // ../org.eclipse.xtext.graphview.map/src-gen/org/eclipse/xtext/graphview/map/parser/antlr/internal/InternalGraphViewMapping.g:1888:28: ( (this_XMultiplicativeExpression_0= ruleXMultiplicativeExpression ( ( ( ( () ( ( ruleOpAdd ) ) ) )=> ( () ( ( ruleOpAdd ) ) ) ) ( (lv_rightOperand_3_0= ruleXMultiplicativeExpression ) ) )* ) )\n // ../org.eclipse.xtext.graphview.map/src-gen/org/eclipse/xtext/graphview/map/parser/antlr/internal/InternalGraphViewMapping.g:1889:1: (this_XMultiplicativeExpression_0= ruleXMultiplicativeExpression ( ( ( ( () ( ( ruleOpAdd ) ) ) )=> ( () ( ( ruleOpAdd ) ) ) ) ( (lv_rightOperand_3_0= ruleXMultiplicativeExpression ) ) )* )\n {\n // ../org.eclipse.xtext.graphview.map/src-gen/org/eclipse/xtext/graphview/map/parser/antlr/internal/InternalGraphViewMapping.g:1889:1: (this_XMultiplicativeExpression_0= ruleXMultiplicativeExpression ( ( ( ( () ( ( ruleOpAdd ) ) ) )=> ( () ( ( ruleOpAdd ) ) ) ) ( (lv_rightOperand_3_0= ruleXMultiplicativeExpression ) ) )* )\n // ../org.eclipse.xtext.graphview.map/src-gen/org/eclipse/xtext/graphview/map/parser/antlr/internal/InternalGraphViewMapping.g:1890:5: this_XMultiplicativeExpression_0= ruleXMultiplicativeExpression ( ( ( ( () ( ( ruleOpAdd ) ) ) )=> ( () ( ( ruleOpAdd ) ) ) ) ( (lv_rightOperand_3_0= ruleXMultiplicativeExpression ) ) )*\n {\n if ( state.backtracking==0 ) {\n \n newCompositeNode(grammarAccess.getXAdditiveExpressionAccess().getXMultiplicativeExpressionParserRuleCall_0()); \n \n }\n pushFollow(FOLLOW_ruleXMultiplicativeExpression_in_ruleXAdditiveExpression4370);\n this_XMultiplicativeExpression_0=ruleXMultiplicativeExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n \n current = this_XMultiplicativeExpression_0; \n afterParserOrEnumRuleCall();\n \n }\n // ../org.eclipse.xtext.graphview.map/src-gen/org/eclipse/xtext/graphview/map/parser/antlr/internal/InternalGraphViewMapping.g:1898:1: ( ( ( ( () ( ( ruleOpAdd ) ) ) )=> ( () ( ( ruleOpAdd ) ) ) ) ( (lv_rightOperand_3_0= ruleXMultiplicativeExpression ) ) )*\n loop37:\n do {\n int alt37=2;\n int LA37_0 = input.LA(1);\n\n if ( (LA37_0==49) ) {\n int LA37_2 = input.LA(2);\n\n if ( (synpred10_InternalGraphViewMapping()) ) {\n alt37=1;\n }\n\n\n }\n else if ( (LA37_0==50) ) {\n int LA37_3 = input.LA(2);\n\n if ( (synpred10_InternalGraphViewMapping()) ) {\n alt37=1;\n }\n\n\n }\n\n\n switch (alt37) {\n \tcase 1 :\n \t // ../org.eclipse.xtext.graphview.map/src-gen/org/eclipse/xtext/graphview/map/parser/antlr/internal/InternalGraphViewMapping.g:1898:2: ( ( ( () ( ( ruleOpAdd ) ) ) )=> ( () ( ( ruleOpAdd ) ) ) ) ( (lv_rightOperand_3_0= ruleXMultiplicativeExpression ) )\n \t {\n \t // ../org.eclipse.xtext.graphview.map/src-gen/org/eclipse/xtext/graphview/map/parser/antlr/internal/InternalGraphViewMapping.g:1898:2: ( ( ( () ( ( ruleOpAdd ) ) ) )=> ( () ( ( ruleOpAdd ) ) ) )\n \t // ../org.eclipse.xtext.graphview.map/src-gen/org/eclipse/xtext/graphview/map/parser/antlr/internal/InternalGraphViewMapping.g:1898:3: ( ( () ( ( ruleOpAdd ) ) ) )=> ( () ( ( ruleOpAdd ) ) )\n \t {\n \t // ../org.eclipse.xtext.graphview.map/src-gen/org/eclipse/xtext/graphview/map/parser/antlr/internal/InternalGraphViewMapping.g:1903:6: ( () ( ( ruleOpAdd ) ) )\n \t // ../org.eclipse.xtext.graphview.map/src-gen/org/eclipse/xtext/graphview/map/parser/antlr/internal/InternalGraphViewMapping.g:1903:7: () ( ( ruleOpAdd ) )\n \t {\n \t // ../org.eclipse.xtext.graphview.map/src-gen/org/eclipse/xtext/graphview/map/parser/antlr/internal/InternalGraphViewMapping.g:1903:7: ()\n \t // ../org.eclipse.xtext.graphview.map/src-gen/org/eclipse/xtext/graphview/map/parser/antlr/internal/InternalGraphViewMapping.g:1904:5: \n \t {\n \t if ( state.backtracking==0 ) {\n\n \t current = forceCreateModelElementAndSet(\n \t grammarAccess.getXAdditiveExpressionAccess().getXBinaryOperationLeftOperandAction_1_0_0_0(),\n \t current);\n \t \n \t }\n\n \t }\n\n \t // ../org.eclipse.xtext.graphview.map/src-gen/org/eclipse/xtext/graphview/map/parser/antlr/internal/InternalGraphViewMapping.g:1909:2: ( ( ruleOpAdd ) )\n \t // ../org.eclipse.xtext.graphview.map/src-gen/org/eclipse/xtext/graphview/map/parser/antlr/internal/InternalGraphViewMapping.g:1910:1: ( ruleOpAdd )\n \t {\n \t // ../org.eclipse.xtext.graphview.map/src-gen/org/eclipse/xtext/graphview/map/parser/antlr/internal/InternalGraphViewMapping.g:1910:1: ( ruleOpAdd )\n \t // ../org.eclipse.xtext.graphview.map/src-gen/org/eclipse/xtext/graphview/map/parser/antlr/internal/InternalGraphViewMapping.g:1911:3: ruleOpAdd\n \t {\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\tif (current==null) {\n \t \t current = createModelElement(grammarAccess.getXAdditiveExpressionRule());\n \t \t }\n \t \n \t }\n \t if ( state.backtracking==0 ) {\n \t \n \t \t newCompositeNode(grammarAccess.getXAdditiveExpressionAccess().getFeatureJvmIdentifiableElementCrossReference_1_0_0_1_0()); \n \t \t \n \t }\n \t pushFollow(FOLLOW_ruleOpAdd_in_ruleXAdditiveExpression4423);\n \t ruleOpAdd();\n\n \t state._fsp--;\n \t if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n \t \n \t \t afterParserOrEnumRuleCall();\n \t \t \n \t }\n\n \t }\n\n\n \t }\n\n\n \t }\n\n\n \t }\n\n \t // ../org.eclipse.xtext.graphview.map/src-gen/org/eclipse/xtext/graphview/map/parser/antlr/internal/InternalGraphViewMapping.g:1924:4: ( (lv_rightOperand_3_0= ruleXMultiplicativeExpression ) )\n \t // ../org.eclipse.xtext.graphview.map/src-gen/org/eclipse/xtext/graphview/map/parser/antlr/internal/InternalGraphViewMapping.g:1925:1: (lv_rightOperand_3_0= ruleXMultiplicativeExpression )\n \t {\n \t // ../org.eclipse.xtext.graphview.map/src-gen/org/eclipse/xtext/graphview/map/parser/antlr/internal/InternalGraphViewMapping.g:1925:1: (lv_rightOperand_3_0= ruleXMultiplicativeExpression )\n \t // ../org.eclipse.xtext.graphview.map/src-gen/org/eclipse/xtext/graphview/map/parser/antlr/internal/InternalGraphViewMapping.g:1926:3: lv_rightOperand_3_0= ruleXMultiplicativeExpression\n \t {\n \t if ( state.backtracking==0 ) {\n \t \n \t \t newCompositeNode(grammarAccess.getXAdditiveExpressionAccess().getRightOperandXMultiplicativeExpressionParserRuleCall_1_1_0()); \n \t \t \n \t }\n \t pushFollow(FOLLOW_ruleXMultiplicativeExpression_in_ruleXAdditiveExpression4446);\n \t lv_rightOperand_3_0=ruleXMultiplicativeExpression();\n\n \t state._fsp--;\n \t if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t if (current==null) {\n \t \t current = createModelElementForParent(grammarAccess.getXAdditiveExpressionRule());\n \t \t }\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"rightOperand\",\n \t \t\tlv_rightOperand_3_0, \n \t \t\t\"XMultiplicativeExpression\");\n \t \t afterParserOrEnumRuleCall();\n \t \t \n \t }\n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop37;\n }\n } while (true);\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public final void mADD() throws RecognitionException {\n try {\n int _type = ADD;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /Users/parrt/research/book/TPDSL/Book/code/semantics/oo/Cymbol.g:4:5: ( '+' )\n // /Users/parrt/research/book/TPDSL/Book/code/semantics/oo/Cymbol.g:4:7: '+'\n {\n match('+'); \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public final EObject entryRuleAdditiveExpression() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject iv_ruleAdditiveExpression = null;\r\n\r\n\r\n try {\r\n // InternalRtVil.g:4426:2: (iv_ruleAdditiveExpression= ruleAdditiveExpression EOF )\r\n // InternalRtVil.g:4427:2: iv_ruleAdditiveExpression= ruleAdditiveExpression EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n newCompositeNode(grammarAccess.getAdditiveExpressionRule()); \r\n }\r\n pushFollow(FOLLOW_1);\r\n iv_ruleAdditiveExpression=ruleAdditiveExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n current =iv_ruleAdditiveExpression; \r\n }\r\n match(input,EOF,FOLLOW_2); if (state.failed) return current;\r\n\r\n }\r\n\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
write your code here
public List<List<Integer>> subsets2(int[] nums) { List<List<Integer>> result = new ArrayList<>(); List<Integer> list = new ArrayList<>(); if (nums==null) return result; Arrays.sort(nums); def2(nums, 0, list, result); result.add(new ArrayList<Integer>()); return result; }
[ "void stuffForYouToDo() {\n\t\t// Write your code here...\n\t\t\n\t\t\n\t\t\n\t}", "@Override\r\n\t\t\t\tvoid eval() {\r\n\r\n\t\t\t\t\t// YOUR CODE IN THIS SPACE\r\n\t\t\t\t}", "private static void EX5() {\n\t\t\r\n\t}", "@Override\n\tpublic void dosomethiing3() {\n\n\t}", "@Override\n }", "public static void main(String[] args){\r\n \r\n/* We use package,class and turn on methods,If we would like to execute codes in Java we should get used to create class,\r\npackage,methods.We are typing codes in methods,and methods should be in class and classes should be in package \r\nrespectively */\r\n // yes finally we can type codes and execute....\r\n \r\n //codes codes codes\r\n \r\n }", "@Override\n\tpublic void dosomethiing1() {\n\n\t}", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "void writeCode() {\n System.out.println(\"WRITING CODE...\");\n }", "@Override\n public void cammina() {\n \n }", "protected void logic()\n {\n }", "Eisdiele() {\r\n\r\n\t}", "@Override\n\tpublic void dosomethiing2() {\n\n\t}", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n public void extornar() {\n \n }", "public void code() {\n if (Flags.cgen_debug)\n System.out.println(\"coding global data\");\n codeGlobalData();\n\n if (Flags.cgen_debug)\n System.out.println(\"choosing gc\");\n codeSelectGc();\n\n if (Flags.cgen_debug)\n System.out.println(\"coding constants\");\n codeConstants();\n\n // Add your code to emit\n // - prototype objects\n // - class_nameTab\n // - dispatch tables\n emitClassNameTab();\n emitClassObj();\n emitDispatchTable();\n emitObjectPrototype();\n\n if (Flags.cgen_debug)\n System.out.println(\"coding global text\");\n codeGlobalText();\n\n // Add your code to emit\n // - object initializer\n // - the class methods\n // - etc...\n\n emitObjectInit();\n emitObjectMethod();\n }", "public void paly() {\n\t\t\n\t}", "@Override\n\tprotected void body()\n\t{\n\n\t}", "public void custumer(){\n \n }", "@Override\r\n public void publicando() {\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
METODO VALIDAR LISTAR TABELA
public List<Usuario> listar() { /* Cria o model*/ UsuarioDao dao = new UsuarioDao(); List<Usuario> lista = new ArrayList<>(); return dao.listar(); }
[ "public void llenadoDeTablas() {\n\n DefaultTableModel modelo = new DefaultTableModel();\n modelo.addColumn(\"Codigo\");\n modelo.addColumn(\"Tipo Transaccion\");\n modelo.addColumn(\"Efecto Transaccio\");\n\n\n \n TipoTransaccionDAO TipoTDAO = new TipoTransaccionDAO();\n List<TipoTransaccion> tipot = TipoTDAO.listar();\n JTableTransaccion.setModel(modelo);\n String[] dato = new String[3];\n for (int i = 0; i < tipot.size(); i++) {\n dato[0] = tipot.get(i).getCodigo_TipoTransaccion();\n dato[1] = tipot.get(i).getTransaccion_Tipo();\n dato[2] = Integer.toString(tipot.get(i).getEfecto_TipoTransaccion());\n modelo.addRow(dato);\n }\n \n }", "private void cargarTabla() {\n cargarColumna();\n for (Usuarios u : controller.findUsuariosEntities()) {\n String apellido = u.getPaterno() + \" \" + u.getMaterno();\n String estado = \"\";\n Date fecha = u.getFechaNacimiento();\n SimpleDateFormat form = new SimpleDateFormat(\"dd/MM/yyyy\");\n String fechaTexto = form.format(fecha);\n if (u.getEstado() == 1) {\n estado = \"Activo\";\n } else {\n estado = \"Dado de Baja\";\n }\n modelo.addRow(new Object[]{u.getIdUsuario(), u.getRut(), u.getNombres(), apellido, fechaTexto, u.getEmail(), u.getCelular(), u.getTelefono(), u.getDireccion(), estado});\n }\n }", "public void TabelaReserva(){\n DefaultTableModel modelo = (DefaultTableModel) TabelaReserva.getModel();\n modelo.setNumRows(0);\n ReservaDao dao = new ReservaDao();\n for(Reserva list: dao.select() ){\n \n modelo.addRow(new Object[]{\n list.getClienteCPF(),\n list.getCarPLACA()\n });\n }\n }", "@Override\n\tpublic void table(List<List<String>> table) {\n\n\t}", "private void populaTabela() {\r\n DefaultTableModel modeloTable;\r\n modeloTable = (DefaultTableModel) token_jTable.getModel();\r\n listTokensTerminaisEncontrados.stream().forEach((listToken) -> {\r\n modeloTable.addRow(new Object[]{listToken.linha, listToken.valor, listToken.codigo});\r\n });\r\n// Sintatico sint = new Sintatico(listTokens, hashMapTokens, naoTerminais);\r\n }", "private void agregaEnTabla(List <nominaEmpleado> listaNomina){\n \n DefaultTableModel modelo = (DefaultTableModel) tableNomina.getModel();\n modelo.setRowCount(0);\n Object []nom=new Object[9];\n for (int i=0; i<listaNomina.size(); i++){\n nominaEmpleado nomina = listaNomina.get(i);\n \n nom[0] = nomina.getId();\n nom[1] = nomina.getEmpleado().getApellidoP()+ \" \" +nomina.getEmpleado().getApellidoM()+ \" \" + nomina.getEmpleado().getNombre();\n nom[2] = nomina.getEmpleado().getSueldo();\n nom[3] = nomina.getEmpleado().getSdi();\n nom[4] = nomina.getDiasTrabajados();\n nom[5] = nomina.getInfonavit();\n nom[6] = nomina.getCuotaImss();\n nom[7] = nomina.getCensantiaVejez();\n nom[8] = nomina.getSueldoNeto();\n \n modelo.addRow(nom);\n }\n \n }", "protected abstract Table createList();", "private void InitTable()\n {\n \n \n if(_type.compareTo(\"PLAISANCE\") == 0){\n ListAmarrageTable.getColumnModel().getColumn(0).setHeaderValue(\"Pontons\");\n }else if(_type.compareTo(\"PECHE\") == 0){\n ListAmarrageTable.getColumnModel().getColumn(0).setHeaderValue(\"Quais\");\n }else{\n ListAmarrageTable.getColumnModel().getColumn(0).setHeaderValue(\"Err. très grave\");\n }\n \n Enumeration enu = _amarrage.elements();\n \n int iAm = 0;\n while(enu.hasMoreElements()){\n Amarrage am = (Amarrage) enu.nextElement();\n iAm++;\n \n if(_type.compareTo(\"PLAISANCE\") == 0 && am instanceof Ponton){\n AddPonton((Ponton) am, iAm);\n }else if(_type.compareTo(\"PECHE\") == 0 && am instanceof Quai){\n AddQuai((Quai) am, iAm);\n } \n }\n }", "private void llenarTablaContratoAbonados() throws SQLException {\n CDAbonado cda = new CDAbonado();\n String codAbonado = (String.valueOf(this.jTblAbonados.getValueAt(this.jTblAbonados.getSelectedRow(), 0)));\n\n List<CLAbonado> miLista = cda.listaContratoAbonado(codAbonado);\n DefaultTableModel temp = (DefaultTableModel) this.jTblContratos.getModel();\n\n for (CLAbonado cla : miLista) {\n Object[] fila = new Object[5];\n fila[0] = cla.getIdContrato();\n fila[1] = cla.getNumCasa();\n fila[2] = cla.getBloque();\n fila[3] = cla.getTipoContrato();\n fila[4] = cla.getEstadoContrato();\n\n temp.addRow(fila);\n };\n }", "private void llenarTabla() {\n tblDocenteA.setModel(coordinador.consultarEmpleadosTodosTabla());\n }", "private void cargarTabla() {\n\n Object[][] data = {\n {\"Mary\", \"Campione\", \"Esquiar\", 5, false},\n {\"Lhucas\", \"Huml\", \"Patinar\", 3, true},\n {\"Kathya\", \"Walrath\", \"Escalar\", 7, false},\n {\"Marcus\", \"Andrews\", \"Correr\", 7, true},\n {\"Angela\", \"Lalth\", \"Nadar\", 4, false}\n };\n String[] columnNames = {\"Nombre\", \"Apellido\", \"Pasatiempo\", \"Años de Practica\", \"Soltero(a)\"};\n modeloTabla.setDataVector(data, columnNames); // CAgo los datos al modelo \n this.jTable1.setModel(modeloTabla); // Enlaso el modelo con la tabla \n }", "public void llenadodetablas(){\n DefaultTableModel modelo = new DefaultTableModel();\n modelo.addColumn(\"Codigo Banco\");\n modelo.addColumn(\"Nombre Banco\");\n modelo.addColumn(\"Clave Banco\");\n modelo.addColumn(\"Telefono Banco\");\n BancoDAO bancoDAO = new BancoDAO();\n List<Banco> bancos = bancoDAO.listar();\n Tabla_Banco.setModel(modelo);\n String[] dato = new String[4];\n for (int i = 0; i < bancos.size(); i++) {\n dato[0] = bancos.get(i).getCodigo_Banco();\n dato[1] = bancos.get(i).getNombre_Banco();\n dato[2] = bancos.get(i).getClave_Banco();\n dato[3] = bancos.get(i).getTelefono_Banco(); \n modelo.addRow(dato);\n }\n}", "private void forListagemAll() {\n // inserindo numa lista\n List<Patente> patentes = Singleton.getInstance().getAllPatente();\n if (patentes == null || patentes.isEmpty()) {\n return;\n }\n // inserindo linha/s na tabela\n for (int i = 0; i < patentes.size(); i++) {\n // inserindo valores do banco de dados\n this.getPatenteModel().addRow(patentes.get(i),i);\n // inserindo label delete na tabela - jtable\n this.getDeleteLabel().getTableCellEditorComponent(this.tblPatentes, \"Delete\", \n false, i, 4); // 4 é a coluna que eu quero inserir um label pra delete.\n }\n }", "public void tablaEstudiantes(){\n for (Estudiantes es: estudiantes){\n Estudiantes b=es;\n est.add(b);\n E_tabla.setItems(est);\n }\n }", "public void preencheTabela(JTable tabela, List<Contato> ls) {\n\t\tDefaultTableModel modelo = new DefaultTableModel(); \r\n\t\tString colunas[] = {\"Lista de contatos:\"};\r\n\t\tmodelo.setColumnIdentifiers(colunas); \r\n\t\t// itera pelas linhas do nosso List\r\n\t\tIterator<Contato> it = ls.iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tContato cont = it.next();\r\n\t\t\t// insere uma nova linha no modelo \r\n\t\t\tmodelo.addRow(new Object [] {cont.getNome()}); \r\n\t\t} \r\n\t\t// configura o modelo da tabela \r\n\t\ttabela.setModel(modelo); //jTableGrid\r\n\t}", "public void preencheTabela() {\n\t\t\t\n\t\t\tArrayList lista = Principal.minhaAgenda.getList();\n\t\t\t\n\t\t\t//ordena os contatos por ordem de código\n\t\t\tCollections.sort(lista, Pessoa.ORDEM_CODIGO);\n\t\t\tIterator it = lista.iterator();\n\t\t\t\n\t\t\twhile (it.hasNext()) {\n\t\t\t\tPessoa p = (Pessoa)it.next();\n\t\t\t\t\n\t\t\t\tmodelo.addRow(new String[] {\n\t\t\t\t\t\tp.getCodigo(),\n\t\t\t\t\t\tp.getNome(),\n\t\t\t\t\t\tp.getTelefone(),\n\t\t\t\t\t\tp.getEmail(),\n\t\t\t\t\t\tp.getEndereco(),\n\t\t\t\t});\n\t\t\t}\n\t\t}", "public void AtualizarTabela() {\n\n String pesquisa = camp_pesquisa.getText();\n List<Fornecedor> forne = new ArrayList<>();\n Conexao banco = new Conexao();\n\n for (int i = 0; i < banco.list_Fornecedores().size(); i++) {\n if (banco.list_Fornecedores().get(i).getNome().contains(pesquisa)) { // VERIFICA SE O NOME CONTEM NO BANCO DE DADOS\n Fornecedor f = banco.list_Fornecedores().get(i);\n forne.add(f);\n }\n }\n\n DefaultTableModel tabela = (DefaultTableModel) table_fornecedor.getModel();\n try {\n tabela.setNumRows(0); // LIMPA OS NOMES DA PESQUISA ENTERIOR\n for (Fornecedor f : forne) {\n tabela.addRow(new Object[]{f.getIdFornecedor(), f.getNome(), f.getEmail(), f.getHomePage(), f.getcontato().getFone()});\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"<Item não encontrado!!>\");\n }\n\n }", "public void listarLivros() {\n\n try {\n String d;\n DefaultTableModel modelo = new DefaultTableModel();\n jtLivros.setModel(modelo);\n modelo.setRowCount(0);\n modelo.addColumn(\"ID\");\n modelo.addColumn(\"Titulo\");\n modelo.addColumn(\"Tema\");\n modelo.addColumn(\"Edição\");\n modelo.addColumn(\"Local\");\n modelo.addColumn(\"Editora\");\n modelo.addColumn(\"Ano\");\n modelo.addColumn(\"Páginas\");\n modelo.addColumn(\"Disponível\");\n modelo.addColumn(\"Reservado\");\n Connection conexao = Conexao.getConexao();\n ArrayList<Livro> livros = Livro.pesquisar(conexao, jtfPEsquisar.getText());\n for (Livro livro : livros) {\n if (livro.getLivre() == true) {\n d = \"Disponível\";\n } else {\n d = \"Indisponível\";\n }\n modelo.addRow(new Object[]{livro.getId(), livro.getTitulo(), livro.getTema(), livro.getEdicao(), livro.getLocal(), livro.getEditora(), livro.getAno(), livro.getPagtotais(), livro.getLivre(), livro.isReservado()});\n }\n Conexao.closeAll(conexao);\n } catch (SQLException ex) {\n Logger.getLogger(Consulta.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void InicializarTablas(String Tipo){\n switch (Tipo) {\n case \"General\":\n DefaultTableModel modeloGeneral = new DefaultTableModel();\n modeloGeneral.setColumnIdentifiers(new Object[]{ \"ID\", \"FECHA\", \"OPERACION\", \"INMUEBLE\", \"MONTO\", \"VENDEDOR\"});\n for (DTOTransaccion dt : lista){\n modeloGeneral.addRow(new Object[]{\n dt.getIdTransaccion(),\n dt.getFecha(),\n dt.getOperacion().getOperacion(),\n dt.getInmueble().getInmueble(),\n dt.getMonto(),\n dt.getVendedor().getNombreCompleto()\n });\n } tblTransacciones.setModel(modeloGeneral);\n break;\n case \"Mayor\":\n ArrayList<DTOTransaccion> lista = trandb.ObtenerMayorMontoDeVenta();\n DefaultTableModel modeloMayorMonto = new DefaultTableModel();\n modeloMayorMonto.setColumnIdentifiers(new Object[]{ \"ID\", \"FECHA\", \"OPERACION\", \"INMUEBLE\", \"MONTO\", \"VENDEDOR\"});\n for (DTOTransaccion dt : lista){\n modeloMayorMonto.addRow(new Object[]{\n dt.getIdTransaccion(),\n dt.getFecha(),\n dt.getOperacion().getOperacion(),\n dt.getInmueble().getInmueble(),\n dt.getMonto(),\n dt.getVendedor().getNombreCompleto()\n });\n }\n tblTransacciones.setModel(modeloMayorMonto);\n break;\n case \"Oficina\":\n ArrayList<DTOTransaccion> listaOficina = trandb.ObtenerTransaccionesDeOficina();\n DefaultTableModel modeloOficina = new DefaultTableModel();\n modeloOficina.setColumnIdentifiers(new Object[]{ \"ID\", \"FECHA\", \"OPERACION\", \"INMUEBLE\", \"MONTO\", \"VENDEDOR\"});\n for (DTOTransaccion dt : listaOficina){\n modeloOficina.addRow(new Object[]{\n dt.getIdTransaccion(),\n dt.getFecha(),\n dt.getOperacion().getOperacion(),\n dt.getInmueble().getInmueble(),\n dt.getMonto(),\n dt.getVendedor().getNombreCompleto()\n });\n }\n tblTransacciones.setModel(modeloOficina);\n break;\n default:\n break;\n }\n }", "public void apresentarExamesViamao(DefaultTableModel Modelo){\n try {\n String sql = \"select * from viamao order by nomeExame asc\";\n PreparedStatement pst = Conexao.getConnection().prepareStatement(sql);\n ResultSet rs = pst.executeQuery();\n while(rs.next()){\n Modelo.addRow(new Object[]{\n rs.getString(\"codExame\"),\n rs.getString(\"nomeExame\"),\n rs.getString(\"valorExame\"),\n rs.getString(\"obsExame\")\n });\n }\n \n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Erro ao buscar registros\",\"Erro\",0);\n System.out.println(e);\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Indexieren einer HTML Datei. That's where the magic happens. Hier wird eine HTMLDatei eingelesen und schlussendlich dem Index hinzugefuegt. Dabei werden ueberfluessige Tags entfernt und nur der textuelle Inhalt der Datei indexiert.
public boolean index(String filename, IndexWriter writer) { if (DesktopSearcherVariables.getSINGLETON().isHTML()) { try { String content = HTML.getFileContents(filename); // Jetzt verarbeiten wir das HTML. Wir entfernen Tags // ebenso wie den HTML-Kopf. content = scriptPattern.matcher(content).replaceAll(""); // JavaScript content = stylePattern.matcher(content).replaceAll(""); // CSS content = commentPattern.matcher(content).replaceAll(""); // Kommentare content = metaPattern.matcher(content).replaceAll(""); // Links // im // Dateikopf content = linkPattern.matcher(content).replaceAll(""); // Metaangaben String plainText = HTML.extractText(content).trim(); // Wir fuegen dem Dokument die von uns zur Verfuegung // gestellten Felder hinzu. Document doc = new Document(); doc.add(new Field("content", plainText + " ", Field.Store.YES, Field.Index.ANALYZED, Field.TermVector.YES)); doc.add(new Field("type", "html", Field.Store.YES, Field.Index.NOT_ANALYZED, Field.TermVector.YES)); // Matcher matcher = titlePattern.matcher(content); // // if (matcher.find()) { // doc.add(new Field("title", matcher.group(1), Field.Store.YES, // Field.Index.ANALYZED)); // } // Titel ermitteln HTMLParser parser = new HTMLParser(new StringReader(content)); String title = ""; try { title = parser.getTitle(); doc.add(new Field("title", title + " ", Field.Store.YES, Field.Index.ANALYZED, Field.TermVector.YES)); } catch (InterruptedException e1) { doc.add(new Field("title", "Unbenanntes Dokument", Field.Store.YES, Field.Index.ANALYZED, Field.TermVector.YES)); // pass... (kann ja sein, dass kein Titel gesetzt ist) } // Standardfelder ContentHandler.addDefaultFields(doc, filename); // Dokument dem Index hinzufuegen writer.addDocument(doc); return true; } catch (Exception e) { System.err.println(e); return false; } } return false; }
[ "static private String buildIndexContentHTML() {\r\n // header\r\n DOMNode contentHeader = partialBuilder.buildContentHeader(\"Class Index\");\r\n StringBuilder sb = new StringBuilder(contentHeader.toString());\r\n\r\n // entries\r\n String entryName;\r\n Documentation jsdoc = Documentation.INSTANCE;\r\n Set<Entry> entries = jsdoc.getEntries(Annotation.CLASS);\r\n\r\n for (Entry entry : entries) {\r\n entryName = entry.getName();\r\n sb.append((\r\n new DOMNode(\"div\")\r\n .addAttribute(\"class\", \"itemContainer\")\r\n .appendNode(\r\n new DOMNode(\"span\", (new DOMNode(\"a\", entryName)\r\n .addAttribute(\"href\", entryName+\".html\")).toString())\r\n .addAttribute(\"class\", \"entryName\")\r\n )\r\n .appendNode(\r\n new DOMNode(\"span\", entry.getDescription())\r\n .addAttribute(\"class\", \"entryDescription\")\r\n )\r\n ).toString());\r\n }\r\n // extra container for border\r\n sb.append(\r\n (new DOMNode(\"div\")\r\n .addAttribute(\"class\", \"itemContainer\")).toString()\r\n );\r\n\r\n return sb.toString();\r\n }", "protected TagsHtml() {}", "TagIndex caseSensitive();", "private void indexDocument(Document d) throws IOException {\n\n\t\tSystem.out.println(\"Indexing (\" + this.idxwriter.numDocs() + \"): \" + d.getField(\"filepath\").stringValue());\n\n\t\t// no usamos addDocument, ya que agregaria elementos repetidos. Con\n\t\t// updateDocument conseguimos que se actualicen pasandole el Field\n\t\t// filepath\n\t\tthis.idxwriter.updateDocument(new Term(\"filepath\", d.getField(\"filepath\").stringValue()), d);\n\t}", "public Result index() {\n \n return ok(index.render(\"\")); \n \n }", "protected void generateIndexFile() throws IOException {\n printHtmlHeader(getText(\"doclet.Window_Single_Index\"));\n navLinks(true);\n printLinksForIndexes();\n \n hr();\n \n for (int i = 0; i < indexbuilder.elements().length; i++) {\n Character unicode = (Character)((indexbuilder.elements())[i]);\n generateContents(unicode, indexbuilder.getMemberList(unicode));\n }\n\n printLinksForIndexes();\n navLinks(false);\n \n printBottom(); \n printBodyHtmlEnd();\n }", "public static void addHtml(String url, String html, ThreadSafeInvertedIndex index) {\n\t\tint counter = 1;\n\t\tStemmer stemmer = new SnowballStemmer(DEFAULT);\n\t\tfor (String word : TextParser.parse(html)) {\n\t\t\tindex.add(stemmer.stem(word).toString(), url, counter++);\n\t\t}\n\t}", "private void indexFile(News pFile) throws IOException\n {\n Document doc = this.getDocument(pFile);\n this._writer.addDocument(doc);\n }", "public Result index() {\n return ok(index.render(emarketDataService.getProduct(1)));\n }", "@Override\n public void visit(Page page) {\n\n // Ignore non html content\n if (!(page.getParseData() instanceof HtmlParseData)) {\n System.out.println(page.getContentType());\n return;\n }\n\n // Get URL without parameters\n String url = page.getWebURL().toString().split(\"\\\\?\")[0];\n PAGES_VISITED.add(url);\n\n // Do not index other pages than question pages.\n if (!INDEXING_FILTER.matcher(url).matches()) {\n return;\n }\n\n // Debug only\n System.out.printf(\"Indexing %s\\n\", url);\n\n // Parse HTML content with jsoup\n HtmlParseData htmlParseData = (HtmlParseData) page.getParseData();\n Document doc = Jsoup.parse(htmlParseData.getHtml());\n\n // Get question title\n String title = doc.select(\"#question-header a\").text();\n\n // Get question content\n String content = doc.select(\".question .post-text\").text();\n\n // Get tags\n List<String> tags = doc.select(\".post-taglist .post-tag\").eachText();\n\n // Get upvotes\n int upvotes = Integer.parseInt(doc.select(\".question div[itemprop=upvoteCount]\").text());\n\n // Get answered information\n boolean answered = doc.select(\".accepted-answer\").first() != null;\n\n // Get question creation date\n DateFormat dateFormatter = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss\");\n Date date = null;\n try {\n date = dateFormatter.parse(doc.select(\".question-stats time[itemprop=dateCreated]\").attr(\"datetime\"));\n } catch (ParseException e) {\n // ignoring\n }\n\n // Debug only\n //System.out.printf(\"---\\nNew document: %s\\n\", url);\n //System.out.printf(\"Title: %s\\n\", title);\n //System.out.printf(\"Tags: %s\\n\", String.join(\", \", tags));\n //System.out.printf(\"Upvotes?: %b\\n\", upvotes);\n //System.out.printf(\"Answered?: %b\\n\", answered);\n //System.out.printf(\"Creation: %s\\n\", date);\n\n // Add document into Solr\n SolrInputDocument solrDoc = new SolrInputDocument();\n solrDoc.setField(Fields.ID, url.hashCode());\n solrDoc.setField(Fields.URL, url);\n solrDoc.setField(Fields.TITLE, title);\n solrDoc.setField(Fields.CONTENT, content);\n solrDoc.setField(Fields.TAGS, tags);\n solrDoc.setField(Fields.UPVOTES, upvotes);\n solrDoc.setField(Fields.ANSWERED, answered);\n solrDoc.setField(Fields.DATE, date);\n\n try {\n solrClient.add(solrDoc);\n solrClient.commit();\n } catch (SolrServerException | IOException e) {\n e.printStackTrace();\n }\n }", "private void processHtml()\n {\n File[] files = dir.listFiles();\n for (int i=0; i<files.length; ++i)\n {\n File f = files[i];\n String name = f.getName();\n if (!name.endsWith(\".html\")) continue;\n if (name.equals(\"index.html\")) continue;\n try\n {\n processHtml(f);\n }\n catch (Exception e)\n { \n e.printStackTrace();\n throw err(\"Cannot process file\", new Location(f), e);\n }\n }\n }", "public void loadDocs(IndexWriter iwriter) throws IOException{\n\n File file;\n Document luceneDoc;\n\n // Create a new field type which will store term vector information\n FieldType ft = new FieldType(TextField.TYPE_STORED);\n ft.setTokenized(true); //done as default\n ft.setStoreTermVectors(true);\n ft.setStoreTermVectorPositions(true);\n ft.setStoreTermVectorOffsets(true);\n ft.setStoreTermVectorPayloads(true);\n String text = \"\";\n String title = \"\";\n for(String path : filepaths){\n file = new File(path);\n\n System.out.println(\"Parsing file: \" + path);\n org.jsoup.nodes.Document jsoupDoc = Jsoup.parse(file, \"UTF-8\", \"\");\n\n Elements jsoupDocs = jsoupDoc.getElementsByTag(\"DOC\");\n\n for(Element docElement : jsoupDocs){\n luceneDoc = new Document();\n\n text = docElement.getElementsByTag(\"TEXT\").text();\n /* where possible, get the main text.\n * Removes some noise. E.g:\n * Language: Macedonian\n * Article Type:CSO\n * [Article by V.V.A.: \"The Law on the Census Is Ready, but... Fear of Politicized Count\"]\n */\n if(text.contains(\"[Text]\")) {\n text = text.substring(text.indexOf(\"[Text]\")+6);\n }\n title = docElement.getElementsByTag(\"TI\").text();\n luceneDoc.add(new Field(\"text\", text + \" \"+ title, ft));\n luceneDoc.add(new Field(\"title\", title, ft));\n\n //stringFields\n luceneDoc.add(new StringField(\"docno\", docElement.getElementsByTag(\"DOCNO\").text(), Field.Store.YES));\n luceneDoc.add(new StringField(\"date\", docElement.getElementsByTag(\"DATE1\").text(), Field.Store.YES));\n\n iwriter.addDocument(luceneDoc);\n }\n }\n }", "private void replaceTextEntitiesAtIndices(StringBuilder textBuilder, Tweet tweet) {\n String contentText = TwitterParsingUtils.getContentText(tweet);\n List<? extends TweetEntity> sortedEntities = TwitterParsingUtils.getSortedEntitiesForInsertion(tweet);\n\n try {\n for (TweetEntity entity : sortedEntities) {\n String entityHtml = getEntityHtml(entity);\n Pair<Integer, Integer> indices = entity.getIndices();\n int startIndex = indices.getLeft();\n int endIndex = indices.getRight();\n // Use indices with offset to avoid emojis ruining everything\n int offsetStartIndex = contentText.offsetByCodePoints(0, startIndex);\n int offsetEndIndex = contentText.offsetByCodePoints(0, endIndex);\n log.debug(\"Inserting '{}' at indices {},{}\", entityHtml, offsetStartIndex, offsetEndIndex);\n textBuilder.replace(offsetStartIndex, offsetEndIndex, entityHtml);\n }\n } catch (Exception e) { // Shouldn't happen\n log.warn(\"Failed replacing raw tags with solr search links\", e);\n }\n }", "public void index() {\n\t\tInteger pageNumber = 0;\n\t\tInteger pageSize = 10;\n\t\tString writer = \"hadong\";\n\t\tArticleModel.getArticleList(pageNumber, pageSize, writer);\n\t\trender(\"index.ftl\");\n\t\treturn;\n\t}", "private void run(){\n //HTML input\n String docText = \"\";\n try{\n Document doc = Jsoup.connect(url).get();\n docText = getText(doc);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n //Tokenize\n String tokenizedText = tokenize(docText);\n writeToLog(tokenizedText, \"tokenized\");\n System.out.println(tokenizedText);\n\n //POS and selecting keywords\n String posTagged = posTagging(tokenizedText);\n writeToLog(posTagged, \"tagged\");\n System.out.println(posTagged);\n\n String niceTags = grabTagged(posTagged);\n System.out.println(niceTags);\n\n niceTags = removeTags(niceTags);\n writeToLog(niceTags, \"selected\");\n System.out.println(niceTags);\n\n //Remove stopwords\n String cleanText = removeStopWords(niceTags);\n writeToLog(cleanText, \"stopwordremoval\");\n System.out.println(cleanText);\n\n //Stemming\n String stemmedText = stemming(cleanText);\n writeToLog(stemmedText, \"stemmed\");\n System.out.println(stemmedText);\n\n //Create TF index\n calculateTF(stemmedText);\n System.out.println(tfMap.entrySet());\n\n //HTML output\n writeTF();\n writeInvertedIndex();\n }", "@VTID(15)\r\n int index();", "public void createIndex() throws IOException{\n \n\t\tFile webSites = new File(\"./cleaned-text\"); //must include directory path to text files\n\t\tFile[] sites = webSites.listFiles();\n \t\n\t\tfor(int i = 0; i < sites.length; i++) {\n\t\t\ttry(BufferedReader file = new BufferedReader(new FileReader(sites[i])))\n\t {\n\t String line;\n\t sources.put(i, sites[i].getName().trim()); \t//add index position and file name to sources HashMap\n\t \n\t while((line = file.readLine()) != null) { //read file until you cannot\n\t String[] terms = line.split(\"\\\\W+\"); //take each line and tokenize by using regex of whitespaces\n\t \n\t for(String term : terms){ \t\t\t\t//search through the tokenized terms array\n\t \tterm = term.toLowerCase(); \t \t//convert to lowercase\n\t \n\t \tif (!index.containsKey(term)) \t\t\t\t\t//if HashMap index does not contain any word found in the tokenize terms array\n\t index.put(term, new HashSet<Integer>());\t//add the newly founded term/word and the file index \n\t \n\t \tindex.get(term).add(i);\n\t }\n\t \n\t }\n\t } catch (IOException e){\n\t \t System.out.println(\"Error! \" + sites[i].getName() + \" file not found!\");\n\t }\n\t }\n\t\tthis.createFrequency();\n \t}", "protected void visit_index(ITreeNode node)\n {\n // You should *not* place your code right here. \n // Instead, you should override this method via a subclass.\n visitUnknown(node); // Default Behavior\n }", "public static Result index() {\n return ok(Index.render());\n }", "public void makeIndex(){\n myElements = mItems;\n // here is the tricky stuff\n alphaIndexer = new HashMap<String, Integer>();\n // in this hashmap we will store here the positions for\n // the sections\n\n int size = mItems.size();\n for (int i = size - 1; i >= 0; i--) {\n \t if(mItems.get(i).isParent()){\n\t String element = mItems.get(i).getText();\n\t alphaIndexer.put(element.substring(0, 1), i);\n \t }\n //We store the first letter of the word, and its index.\n //The Hashmap will replace the value for identical keys are putted in\n }\n\n // now we have an hashmap containing for each first-letter\n // sections(key), the index(value) in where this sections begins\n\n // we have now to build the sections(letters to be displayed)\n // array .it must contains the keys, and must (I do so...) be\n // ordered alphabetically\n\n Set<String> keys = alphaIndexer.keySet(); // set of letters ...sets\n // cannot be sorted...\n\n Iterator<String> it = keys.iterator();\n ArrayList<String> keyList = new ArrayList<String>(); // list can be\n // sorted\n\n while (it.hasNext()) {\n String key = it.next();\n keyList.add(key);\n }\n\n Collections.sort(keyList);\n\n sections = new String[keyList.size()]; // simple conversion to an\n // array of object\n keyList.toArray(sections);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor to initialize LocTime object.
public LocTime(String pName, Location pLoc, int pTime){ this.name = pName; this.loc = pLoc; this.time = pTime; }
[ "public Time() {\r\n\t\t\r\n\t}", "public Schedule(LocalDateTime datetime, LatLong loc) {\n this.start = datetime;\n this.location = loc;\n }", "public Time (Time time)\n {\n this(time.hour, time.minute, time.second);\n }", "public Location() {\n\t\tsuper();\n\t}", "public Location() {\n }", "public Location() {\n super();\n }", "public Time (int hour, int minute){\n\n this.hour = hour;\n this.minute = minute;\n }", "@Override\n\tpublic void init(LocalDateTime time) {\n\t\tthis.time = time;\n\t}", "public Time() {\n this.hours = 0;\n this.minutes = 0;\n this.seconds = 0;\n }", "public TimeList() {\n }", "public StandardTime()\n {\n super();\n }", "Time(int hour, int minute, int second) {\r\n\t \r\n\t\tthis.hour = hour;\r\n\t\tthis.minute = minute;\r\n\t\tthis.second = second;\r\n\t \r\n }", "public Location()\n {\n }", "public Time(int hour, int minute, int second){\n if(timeValid(hour,minute,second)){\n this.hour = hour;\n this.minute = minute;\n this.second = second;\n }\n }", "public LocalTime(TimeUnit ticSize) {\n this.anchor = RealTime.getInstance();\n this.ticSize = ticSize;\n this.timeGenesis = anchor.getTime();\n this.timeStart = timeGenesis;\n this.timeTracked = 0;\n this.pauseStart = 0;\n this.paused = false;\n }", "public LocationUpdate() {}", "public Time(int inhrs, int inmins, int insecs)\n {\n // initialize all instance fields to either the value\n // in an explicit parameter or if none, a default value.... ???? Should this be an if?\n \n if ( inhrs == 0 ) {\n this.hours = 0;\n } else {\n this.hours = inhrs;\n }\n \n if ( inmins == 0 ) {\n this.minutes = 0;\n } else {\n this.minutes = inmins;\n }\n \n if ( insecs == 0 ) {\n this.seconds = 0;\n } else {\n this.seconds = insecs;\n }\n }", "public TimeMap() {\n values = new HashMap<>();\n }", "public Time(int hour, int minute, int second) {\n\n\t\t// Create and initialise a Calendar object to store the time\n\t\ttime = Calendar.getInstance();\n\t\t// Clear the calendar of time/date\n\t\ttime.clear();\n\n\t\t// Call the main setter class to set this object's time variable\n\t\tsetTime(hour, minute, second);\n\t}", "public TimeInstant() {\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Appends nodes of items to the current path.
void append(int index, int end, int[] itemset, int support) { if (children == null) { children = new HashMap<Integer, Node>(); } if (index >= maxItemSetSize) { maxItemSetSize = index + 1; } // Create new item subtree node int item = itemset[index]; Node child = new Node(item, support, id < 0 ? null : this); // Add link from header table child.addToHeaderTable(); // Add into FP tree children.put(item, child); // Proceed down branch with rest of item set if (++index < end) { child.append(index, end, itemset, support); } }
[ "public void append(Item item) {\n if(start == null) {\n start = new Node(item);\n end = start;\n }\n else {\n end.next = new Node(item);\n end = end.next;\n }\n length++;\n }", "public void addToEnd(t item){\n\t\tcurrent = start; \n\t\tif(start == null){//adding value if list is empty\n\t\t\tthis.addToStart(item);\n\t\t\treturn;\n\t\t}\n\t\twhile(true){//iterate over list to get end node\n\t\t\tif(current.link == null){\n\t\t\t\tcurrent.link = new node(item,null);//on reached end add value to current.link\n\t\t\t\tcount++;//increment counter\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\telse\n\t\t\t\tcurrent = current.link;// move current forward\n\t\t}\n\t}", "public void append(Item item)\n\t{\n\t\tif (item == null) {\n\t\t\treturn;\n\t\t}\n\n\t\texpandSize();\n\t\tint index = index(count);\n\t\titems[index] = item;\n\t\t++count;\n\t}", "private void addNodePath()\n\t{\n\t\tif(instancesDrpDwn.getItemCount() == 0)\n\t\t{\n\t\t\tWindow.alert(LocaleText.get(\"noInstance\"));\n\t\t\treturn;\n\t\t}\n\t\t//is this the base nodepath?\n\t\tif(itemSet.getNodeSetLength() == 0)\n\t\t{\n\t\t\t//get the did\n\t\t\tString didId = instancesDrpDwn.getItemText(instancesDrpDwn.getSelectedIndex());\n\t\t\tFormDef formDef = itemSet.getFormDef();\n\t\t\tdid = formDef.getDataInstance(didId);\n\t\t\t\n\t\t\t//get a list of possible names at the zero level\n\t\t\tArrayList<String> names = new ArrayList<String>();\n\t\t\tthis.getNameList(0, did, names);\n\t\t\t\n\t\t\t//use the first one as your default name, I really want to avoid defaulting things to nothing\n\t\t\tString name = names.get(0);\n\t\t\t\n\t\t\titemSet.addNodeSet(did);\n\t\t\titemSet.addNodeSet(name);\n\t\t\tthis.setItemSet(itemSet);\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//first we need to know what level we're adding to\n\t\t\tint currentLevel = itemSet.getNodeSetDepth();\n\t\t\t\n\t\t\t//get a list of possible names at that level\n\t\t\tArrayList<String> names = new ArrayList<String>();\n\t\t\tthis.getNameList(currentLevel + 1, did, names);\n\t\t\t\n\t\t\t//make sure there's something there\n\t\t\tif(names.size() == 0)\n\t\t\t{\n\t\t\t\tWindow.alert(LocaleText.get(\"noMoreLevelsForDataInstance\"));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t//use the first one as your default name, I really want to avoid defaulting things to nothing\n\t\t\tString name = names.get(0);\n\n\t\t\t\n\t\t\titemSet.addNodeSet(name);\n\t\t\tthis.setItemSet(itemSet);\n\t\t}\n\t}", "public void add(TwoDTreeNode item){\n if(manyItems == arrays.length){\n ensureCapacity(manyItems*2+1);\n }\n // if list is empty, set up front and rear index\n if(manyItems == 0){\n front = 0;\n rear = 0;\n }\n else{\n rear = nextIndex(rear);\n }\n // put item into end of arrays\n arrays[rear] = item;\n // manyitems plus 1\n manyItems++;\n }", "public void AddToPath(Integer toAdd){\n path.add(toAdd);\n }", "public void push(List<Item> items) {\n for (Item item : items) {\n this.push(item);\n }\n }", "public ExtTree addPath(String[] path) {\n\tExtTree currentNode = this;\n\n\tfor (int i=0; i<path.length; i++)\n\t currentNode = currentNode.addChild(path[i], null);\n\t\n\treturn currentNode;\n }", "public void push( String path )\n \t{\n \t\tholder.add( path );\n \t}", "public void push(Item itemToAdd){\n Node<Item> oldFirstNode = first; //save reference to old first node\n first = new Node<Item>();\n first.item = itemToAdd;\n first.next = oldFirstNode;\n numberOfItems ++;\n }", "public void addNodeAfter(Shopper item) {\n\t\tlink = new Node(item, link);\n\t}", "@Override\r\n public void append(T item) {\r\n // Check if list is empty\r\n if (head == null) {\r\n insertFirstNode(item);\r\n }\r\n else {\r\n ListNode<T> node = new ListNode<>(item);\r\n tail.setNext(node);\r\n tail = node;\r\n }\r\n size++;\r\n }", "public void add(String item) {\n\t\tTrieNode current = root;\n\t\tchar charNow;\t\t\n\n\t\tif(this.mode == 0) item = item.toUpperCase();\n\t\telse if(this.mode == 1) item = item.toLowerCase(); \n\n\n\t\twhile(item.length() > 0){\n\t\t\tcharNow = item.charAt(0);\n\n\t\t\t// If the next TrieNode is null(there is currently not a path in there, create one)\n\t\t\tif(current.children[c2i(charNow)] == null){\n\t\t\t\tcurrent.children[c2i(charNow)] = new TrieNode();\n\t\t\t}\n\t\t\tcurrent = current.children[c2i(charNow)];\n\t\t\titem = item.substring(1);\n\t\t}\n\t\t// Set the terminal letter\n\t\tcurrent.terminal = true;\n\t}", "public abstract void appendSubTree();", "private void writeItems() {\n try {\n FileUtils.writeLines(getDataFile(), items);\n } catch (IOException e) {\n //print the error\n e.printStackTrace();\n }\n }", "DefaultMutableTreeNode addNodes(DefaultMutableTreeNode curTop, myFile dir) {\n String curPath = dir.getPath();\n System.out.println(curPath);\n DefaultMutableTreeNode curDir = new DefaultMutableTreeNode(curPath);\n if (curTop != null) { // should only be null at root\n curTop.add(curDir);\n }\n Vector<String> ol = new Vector<String>();\n String[] tmp = dir.list();\n for (int i = 0; i < tmp.length; i++) {\n ol.addElement(tmp[i]);\n }\n Collections.sort(ol, String.CASE_INSENSITIVE_ORDER);\n myFile f;\n Vector<String> files = new Vector<String>();\n // Make two passes, one for Dirs and one for Files. This is #1.\n for (int i = 0; i < ol.size(); i++) {\n String thisObject = (String) ol.elementAt(i);\n String newPath;\n if (curPath.equals(\".\")) {\n newPath = thisObject;\n } else {\n newPath = curPath + myFile.separator + thisObject;\n }\n System.out.println(\"this is the path: \" + newPath);\n if ((f = new myFile(newPath)).isDirectory()) {\n addNodes(curDir, f);\n } else {\n files.addElement(thisObject);\n }\n }\n // Pass two: for files.\n for (int fnum = 0; fnum < files.size(); fnum++) {\n curDir.add(new DefaultMutableTreeNode(files.elementAt(fnum)));\n }\n return curDir;\n }", "private void addItem(LinkedList list, String path) {\n if(!list.contains(path)){\n if(list.size() < LIMIT){\n list.addLast(path);\n }\n }\n }", "private void addWorkParts (DefaultMutableTreeNode node,\n\t\tCollection items)\n\t{\n\t\tif(items==null) {items = new java.util.ArrayList();}\n\n\t\tfor (Iterator it = items.iterator(); it.hasNext(); ) {\n\t\t\tWorkPart workpart = (WorkPart)it.next();\n\t\t\tWorkPartTreeNode wNode = new WorkPartTreeNode(workpart);\n\t\t\tnode.add(wNode);\n\n\t/*\t\tfor (Iterator wit = workpart.getChildren().iterator(); wit.hasNext(); ) {\n\t\t\t\tWorkPart wp = (WorkPart)wit.next();\n\t\t\t\tDefaultMutableTreeNode cNode = new DefaultMutableTreeNode(wp, wp.hasChildren());\n\t\t\t\twNode.add(cNode);\n\t\t\t}*/\n\t\t}\n\t}", "public void push(E item) {\r\n int index = link.size();\r\n link.add(item, index);\r\n }", "FSPath add( List<String> elements );" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if field messageResult is set (has been assigned a value) and false otherwise
public boolean isSetMessageResult() { return this.messageResult != null; }
[ "public boolean hasErrorMessage() {\n return result.hasErrorMessage();\n }", "@java.lang.Override\n public boolean hasResult() {\n return result_ != null;\n }", "public boolean hasResult();", "public boolean getExpectedResult() {\r\n return expectedResult;\r\n }", "public boolean hasResultString() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "public boolean isSetMonitorResult() {\n return this.monitorResult != null;\n }", "public boolean hasResultString() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "public boolean hasResultNum() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean isSuccessMessage() {\n return successMessage;\n }", "public boolean hasResponseMessage() {\n return result.hasResponseMessage();\n }", "boolean hasReturnMsg();", "public void setResult(boolean result){\n\t\tthis.result = result;\n\t}", "public boolean hasErrMsg() {\n return result.hasErrMsg();\n }", "public io.dstore.values.BooleanValue getReturnResult() {\n if (returnResultBuilder_ == null) {\n return returnResult_ == null ? io.dstore.values.BooleanValue.getDefaultInstance() : returnResult_;\n } else {\n return returnResultBuilder_.getMessage();\n }\n }", "public boolean hasTesult() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "@Override\n protected boolean processResponse() {\n result.value = getMessage(manifest);\n result.auth = auth;\n Logger.log(Level.FINEST, \"Manifest message: {0}\",\n new Object[] {result.value});\n return result.value != null;\n }", "public Boolean getStatusResult()\n {\n return statusResult;\n }", "public boolean isSuccess()\n {\n return mError == null;\n }", "public boolean isSuccess() {\n/* 2483 */ return this.errors.isEmpty();\n/* */ }", "public boolean hasBattleResultVO() {\n return ((bitField0_ & 0x00000020) == 0x00000020);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XReturnExpression__Group__1__Impl" $ANTLR start "rule__XReturnExpression__Group__2" InternalFormat.g:21058:1: rule__XReturnExpression__Group__2 : rule__XReturnExpression__Group__2__Impl ;
public final void rule__XReturnExpression__Group__2() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalFormat.g:21062:1: ( rule__XReturnExpression__Group__2__Impl ) // InternalFormat.g:21063:2: rule__XReturnExpression__Group__2__Impl { pushFollow(FOLLOW_2); rule__XReturnExpression__Group__2__Impl(); state._fsp--; if (state.failed) return ; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { restoreStackSize(stackSize); } return ; }
[ "public final void rule__XReturnExpression__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../jpaqldsl.ui/src-gen/jpaqldsl/ui/contentassist/antlr/internal/InternalJPAQLDsl.g:24091:1: ( rule__XReturnExpression__Group__2__Impl )\n // ../jpaqldsl.ui/src-gen/jpaqldsl/ui/contentassist/antlr/internal/InternalJPAQLDsl.g:24092:2: rule__XReturnExpression__Group__2__Impl\n {\n pushFollow(FOLLOW_rule__XReturnExpression__Group__2__Impl_in_rule__XReturnExpression__Group__248983);\n rule__XReturnExpression__Group__2__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XReturnExpression__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../fr.obeo.dsl.sprototyper.ui/src-gen/fr/obeo/dsl/ui/contentassist/antlr/internal/InternalSPrototyper.g:21223:1: ( rule__XReturnExpression__Group__1__Impl rule__XReturnExpression__Group__2 )\n // ../fr.obeo.dsl.sprototyper.ui/src-gen/fr/obeo/dsl/ui/contentassist/antlr/internal/InternalSPrototyper.g:21224:2: rule__XReturnExpression__Group__1__Impl rule__XReturnExpression__Group__2\n {\n pushFollow(FOLLOW_rule__XReturnExpression__Group__1__Impl_in_rule__XReturnExpression__Group__142925);\n rule__XReturnExpression__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XReturnExpression__Group__2_in_rule__XReturnExpression__Group__142928);\n rule__XReturnExpression__Group__2();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Expression__Group_1__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMiniJava.g:3178:1: ( rule__Expression__Group_1__2__Impl )\n // InternalMiniJava.g:3179:2: rule__Expression__Group_1__2__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Expression__Group_1__2__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__SJReturn__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSmallJava.g:1483:1: ( rule__SJReturn__Group__1__Impl rule__SJReturn__Group__2 )\n // InternalSmallJava.g:1484:2: rule__SJReturn__Group__1__Impl rule__SJReturn__Group__2\n {\n pushFollow(FOLLOW_8);\n rule__SJReturn__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__SJReturn__Group__2();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Return__Group__0__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.upb.llvm_parser.ui/src-gen/de/upb/llvm_parser/ui/contentassist/antlr/internal/InternalLLVM.g:18738:1: ( ( 'ret' ) )\r\n // ../de.upb.llvm_parser.ui/src-gen/de/upb/llvm_parser/ui/contentassist/antlr/internal/InternalLLVM.g:18739:1: ( 'ret' )\r\n {\r\n // ../de.upb.llvm_parser.ui/src-gen/de/upb/llvm_parser/ui/contentassist/antlr/internal/InternalLLVM.g:18739:1: ( 'ret' )\r\n // ../de.upb.llvm_parser.ui/src-gen/de/upb/llvm_parser/ui/contentassist/antlr/internal/InternalLLVM.g:18740:1: 'ret'\r\n {\r\n before(grammarAccess.getReturnAccess().getRetKeyword_0()); \r\n match(input,152,FOLLOW_152_in_rule__Return__Group__0__Impl38036); \r\n after(grammarAccess.getReturnAccess().getRetKeyword_0()); \r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__ReturnStatement__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:9491:1: ( rule__ReturnStatement__Group__0__Impl rule__ReturnStatement__Group__1 )\n // InternalMyDsl.g:9492:2: rule__ReturnStatement__Group__0__Impl rule__ReturnStatement__Group__1\n {\n pushFollow(FOLLOW_51);\n rule__ReturnStatement__Group__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__ReturnStatement__Group__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__FunctionCallStatement__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalThingML.g:11829:1: ( ( ( rule__FunctionCallStatement__Group_2__0 )? ) )\n // InternalThingML.g:11830:1: ( ( rule__FunctionCallStatement__Group_2__0 )? )\n {\n // InternalThingML.g:11830:1: ( ( rule__FunctionCallStatement__Group_2__0 )? )\n // InternalThingML.g:11831:2: ( rule__FunctionCallStatement__Group_2__0 )?\n {\n before(grammarAccess.getFunctionCallStatementAccess().getGroup_2()); \n // InternalThingML.g:11832:2: ( rule__FunctionCallStatement__Group_2__0 )?\n int alt123=2;\n int LA123_0 = input.LA(1);\n\n if ( (LA123_0==RULE_STRING_LIT||(LA123_0>=RULE_ID && LA123_0<=RULE_FLOAT)||(LA123_0>=14 && LA123_0<=15)||LA123_0==34||LA123_0==83||LA123_0==87) ) {\n alt123=1;\n }\n switch (alt123) {\n case 1 :\n // InternalThingML.g:11832:3: rule__FunctionCallStatement__Group_2__0\n {\n pushFollow(FOLLOW_2);\n rule__FunctionCallStatement__Group_2__0();\n\n state._fsp--;\n\n\n }\n break;\n\n }\n\n after(grammarAccess.getFunctionCallStatementAccess().getGroup_2()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XParenthesizedExpression__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../fr.obeo.dsl.sprototyper.ui/src-gen/fr/obeo/dsl/ui/contentassist/antlr/internal/InternalSPrototyper.g:16322:1: ( rule__XParenthesizedExpression__Group__2__Impl )\n // ../fr.obeo.dsl.sprototyper.ui/src-gen/fr/obeo/dsl/ui/contentassist/antlr/internal/InternalSPrototyper.g:16323:2: rule__XParenthesizedExpression__Group__2__Impl\n {\n pushFollow(FOLLOW_rule__XParenthesizedExpression__Group__2__Impl_in_rule__XParenthesizedExpression__Group__233303);\n rule__XParenthesizedExpression__Group__2__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XReturnExpression__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAle.g:13676:1: ( ( () ) )\n // InternalAle.g:13677:1: ( () )\n {\n // InternalAle.g:13677:1: ( () )\n // InternalAle.g:13678:2: ()\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXReturnExpressionAccess().getXReturnExpressionAction_0()); \n }\n // InternalAle.g:13679:2: ()\n // InternalAle.g:13679:3: \n {\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXReturnExpressionAccess().getXReturnExpressionAction_0()); \n }\n\n }\n\n\n }\n\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Arithmetic_expression__Group_2__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.openmodelica.modelicaml.editor.xtext.valuebinding.provider.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/valuebinding/ui/contentassist/antlr/internal/InternalProvider.g:3170:1: ( rule__Arithmetic_expression__Group_2__0__Impl rule__Arithmetic_expression__Group_2__1 )\r\n // ../org.openmodelica.modelicaml.editor.xtext.valuebinding.provider.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/valuebinding/ui/contentassist/antlr/internal/InternalProvider.g:3171:2: rule__Arithmetic_expression__Group_2__0__Impl rule__Arithmetic_expression__Group_2__1\r\n {\r\n pushFollow(FOLLOW_rule__Arithmetic_expression__Group_2__0__Impl_in_rule__Arithmetic_expression__Group_2__06560);\r\n rule__Arithmetic_expression__Group_2__0__Impl();\r\n\r\n state._fsp--;\r\n\r\n pushFollow(FOLLOW_rule__Arithmetic_expression__Group_2__1_in_rule__Arithmetic_expression__Group_2__06563);\r\n rule__Arithmetic_expression__Group_2__1();\r\n\r\n state._fsp--;\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__Predicate__Group_0__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBotoLang.g:1195:1: ( rule__Predicate__Group_0__2__Impl )\n // InternalBotoLang.g:1196:2: rule__Predicate__Group_0__2__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Predicate__Group_0__2__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__ReturnExpCS__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../../examples/org.eclipse.qvto.examples.xtext.imperativeocl.ui/src-gen/org/eclipse/qvto/examples/xtext/imperativeocl/ui/contentassist/antlr/internal/InternalImperativeOCL.g:4582:1: ( ( 'return' ) )\n // ../../examples/org.eclipse.qvto.examples.xtext.imperativeocl.ui/src-gen/org/eclipse/qvto/examples/xtext/imperativeocl/ui/contentassist/antlr/internal/InternalImperativeOCL.g:4583:1: ( 'return' )\n {\n // ../../examples/org.eclipse.qvto.examples.xtext.imperativeocl.ui/src-gen/org/eclipse/qvto/examples/xtext/imperativeocl/ui/contentassist/antlr/internal/InternalImperativeOCL.g:4583:1: ( 'return' )\n // ../../examples/org.eclipse.qvto.examples.xtext.imperativeocl.ui/src-gen/org/eclipse/qvto/examples/xtext/imperativeocl/ui/contentassist/antlr/internal/InternalImperativeOCL.g:4584:1: 'return'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getReturnExpCSAccess().getReturnKeyword_0()); \n }\n match(input,68,FollowSets000.FOLLOW_68_in_rule__ReturnExpCS__Group__0__Impl9751); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getReturnExpCSAccess().getReturnKeyword_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__ExpressionBracket__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalTaskDSL.g:3542:1: ( rule__ExpressionBracket__Group__2__Impl )\n // InternalTaskDSL.g:3543:2: rule__ExpressionBracket__Group__2__Impl\n {\n pushFollow(FOLLOW_2);\n rule__ExpressionBracket__Group__2__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__PrimaryExpression__Group_2__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalEduLangauage.g:1337:1: ( rule__PrimaryExpression__Group_2__2__Impl )\n // InternalEduLangauage.g:1338:2: rule__PrimaryExpression__Group_2__2__Impl\n {\n pushFollow(FOLLOW_2);\n rule__PrimaryExpression__Group_2__2__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__FunctionCall__Group_2__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBotoLang.g:1958:1: ( rule__FunctionCall__Group_2__1__Impl )\n // InternalBotoLang.g:1959:2: rule__FunctionCall__Group_2__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__FunctionCall__Group_2__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void ruleXReturnExpression() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../jpaqldsl.ui/src-gen/jpaqldsl/ui/contentassist/antlr/internal/InternalJPAQLDsl.g:3589:2: ( ( ( rule__XReturnExpression__Group__0 ) ) )\n // ../jpaqldsl.ui/src-gen/jpaqldsl/ui/contentassist/antlr/internal/InternalJPAQLDsl.g:3590:1: ( ( rule__XReturnExpression__Group__0 ) )\n {\n // ../jpaqldsl.ui/src-gen/jpaqldsl/ui/contentassist/antlr/internal/InternalJPAQLDsl.g:3590:1: ( ( rule__XReturnExpression__Group__0 ) )\n // ../jpaqldsl.ui/src-gen/jpaqldsl/ui/contentassist/antlr/internal/InternalJPAQLDsl.g:3591:1: ( rule__XReturnExpression__Group__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXReturnExpressionAccess().getGroup()); \n }\n // ../jpaqldsl.ui/src-gen/jpaqldsl/ui/contentassist/antlr/internal/InternalJPAQLDsl.g:3592:1: ( rule__XReturnExpression__Group__0 )\n // ../jpaqldsl.ui/src-gen/jpaqldsl/ui/contentassist/antlr/internal/InternalJPAQLDsl.g:3592:2: rule__XReturnExpression__Group__0\n {\n pushFollow(FOLLOW_rule__XReturnExpression__Group__0_in_ruleXReturnExpression7625);\n rule__XReturnExpression__Group__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXReturnExpressionAccess().getGroup()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__PatternExpCS__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../../examples/org.eclipse.qvto.examples.xtext.imperativeocl.ui/src-gen/org/eclipse/qvto/examples/xtext/imperativeocl/ui/contentassist/antlr/internal/InternalImperativeOCL.g:6359:1: ( rule__PatternExpCS__Group__2__Impl )\n // ../../examples/org.eclipse.qvto.examples.xtext.imperativeocl.ui/src-gen/org/eclipse/qvto/examples/xtext/imperativeocl/ui/contentassist/antlr/internal/InternalImperativeOCL.g:6360:2: rule__PatternExpCS__Group__2__Impl\n {\n pushFollow(FollowSets000.FOLLOW_rule__PatternExpCS__Group__2__Impl_in_rule__PatternExpCS__Group__213244);\n rule__PatternExpCS__Group__2__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__InputValue__Group_2__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.hipie.ui/src-gen/org/xtext/hipie/ui/contentassist/antlr/internal/InternalHIPIE.g:5281:1: ( ( ruleGroup ) )\n // ../org.xtext.hipie.ui/src-gen/org/xtext/hipie/ui/contentassist/antlr/internal/InternalHIPIE.g:5282:1: ( ruleGroup )\n {\n // ../org.xtext.hipie.ui/src-gen/org/xtext/hipie/ui/contentassist/antlr/internal/InternalHIPIE.g:5282:1: ( ruleGroup )\n // ../org.xtext.hipie.ui/src-gen/org/xtext/hipie/ui/contentassist/antlr/internal/InternalHIPIE.g:5283:1: ruleGroup\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getInputValueAccess().getGroupParserRuleCall_2_0()); \n }\n pushFollow(FOLLOW_ruleGroup_in_rule__InputValue__Group_2__0__Impl11280);\n ruleGroup();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getInputValueAccess().getGroupParserRuleCall_2_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Rule__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.webgme_mtl.ui/src-gen/org/xtext/example/webgme/ui/contentassist/antlr/internal/InternalMTL.g:1442:1: ( rule__Rule__Group__2__Impl rule__Rule__Group__3 )\n // ../org.xtext.example.webgme_mtl.ui/src-gen/org/xtext/example/webgme/ui/contentassist/antlr/internal/InternalMTL.g:1443:2: rule__Rule__Group__2__Impl rule__Rule__Group__3\n {\n pushFollow(FOLLOW_rule__Rule__Group__2__Impl_in_rule__Rule__Group__23176);\n rule__Rule__Group__2__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Rule__Group__3_in_rule__Rule__Group__23179);\n rule__Rule__Group__3();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Simple_expression__Group_1__2__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.openmodelica.modelicaml.editor.xtext.valuebinding.provider.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/valuebinding/ui/contentassist/antlr/internal/InternalProvider.g:2180:1: ( ( ( rule__Simple_expression__Group_1_2__0 )? ) )\r\n // ../org.openmodelica.modelicaml.editor.xtext.valuebinding.provider.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/valuebinding/ui/contentassist/antlr/internal/InternalProvider.g:2181:1: ( ( rule__Simple_expression__Group_1_2__0 )? )\r\n {\r\n // ../org.openmodelica.modelicaml.editor.xtext.valuebinding.provider.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/valuebinding/ui/contentassist/antlr/internal/InternalProvider.g:2181:1: ( ( rule__Simple_expression__Group_1_2__0 )? )\r\n // ../org.openmodelica.modelicaml.editor.xtext.valuebinding.provider.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/valuebinding/ui/contentassist/antlr/internal/InternalProvider.g:2182:1: ( rule__Simple_expression__Group_1_2__0 )?\r\n {\r\n before(grammarAccess.getSimple_expressionAccess().getGroup_1_2()); \r\n // ../org.openmodelica.modelicaml.editor.xtext.valuebinding.provider.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/valuebinding/ui/contentassist/antlr/internal/InternalProvider.g:2183:1: ( rule__Simple_expression__Group_1_2__0 )?\r\n int alt20=2;\r\n int LA20_0 = input.LA(1);\r\n\r\n if ( (LA20_0==31) ) {\r\n alt20=1;\r\n }\r\n switch (alt20) {\r\n case 1 :\r\n // ../org.openmodelica.modelicaml.editor.xtext.valuebinding.provider.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/valuebinding/ui/contentassist/antlr/internal/InternalProvider.g:2183:2: rule__Simple_expression__Group_1_2__0\r\n {\r\n pushFollow(FOLLOW_rule__Simple_expression__Group_1_2__0_in_rule__Simple_expression__Group_1__2__Impl4613);\r\n rule__Simple_expression__Group_1_2__0();\r\n\r\n state._fsp--;\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n after(grammarAccess.getSimple_expressionAccess().getGroup_1_2()); \r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets focus to Burger menu
void focusMenu();
[ "public void focus() {\n dropDownMenuInitializer.apply();\n keyboardNavigation.focusAt(0);\n }", "public void setFocus() {\n\t\tfPagebook.setFocus();\n\t}", "public void setFocus()\n \t{\n \t}", "protected void focus() {\n\n\t}", "public void setFocus() {\n \t\tdoSetFocus();\n \t}", "public void setFocus() {\r\n // viewer.getControl().setFocus();\r\n }", "public void setFocus()\n\t{\n\t\tviewer.getControl().setFocus();\n\t}", "public void setFocus() {\n//\t\t viewer.getControl().setFocus();\n\t}", "private void focusAg_nav_top(){\r\n\t\tfocusMainframe();\r\n\t\tdriver.switchTo().frame(\"ag_nav_top\");\r\n\t\tResultUtil.report(\"PASS\",\"Focused to Agnavtop Frmae\",driver);\r\n\t\r\n\t}", "public void requestFocus() {\n LwToolkit.getFocusManager().requestFocus(this);\n }", "private void focusAg_nav_top(){\r\n\t\tResultUtil.report(\"INFO\", \"AssignmentPage>>>focusAg_nav_top\", driver);\r\n\t\tfocusMainframe();\r\n\t\tdriver.switchTo().frame(\"ag_nav_top\");\r\n\t}", "@Override\n public void onFocus() {\n this.activate();\n }", "public void focus()\n {\n\tobj.call(\"focus\", new Object[0]);\n }", "@Override\n public void setFocus() {\n _viewer.getControl().setFocus();\n }", "@Override\n\t\t\tpublic boolean setFocus() {\n\t\t\t\treturn true;\n\t\t\t}", "public void setFocus() {\n\t\tSwingUtilities.invokeLater(new Runnable() {\n\n\t\t\tpublic void run() {\n\t\t\t\tAbstractJamochaPanel.this.requestFocus();\n\t\t\t}\n\n\t\t});\n\t}", "public void setFocus() {\r\n \t\t//table.setFocus();\r\n \t}", "public void requestFocus()\n {\n }", "public void setInitialFocus();", "public void focus() {\r\n\t\tcanvas.requestFocus();\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Log.d(TAG, "V = " + v);
@Override public void onDrawerSlide(@NonNull View view, float v) { content.setTranslationX(view.getWidth()*v); }
[ "public float getV()\n {\n return v;\n }", "public double GetV()\n { return tv.getDouble(0.0f); }", "static void m(Integer v) {\n\t\tSystem.out.println(\"m() received \" + v);\n\t}", "static void m(Integer v) {\n System.out.println(\"m() received \" + v);\n }", "public short getV() { return Util.readShortBE(v); }", "void mo5832a(V v);", "public String toString() { return \"(\" + k + \",\" + v + \")\"; }", "public int V(){return V;}", "@Override\n\tpublic void onClick(View v) {\n\t\tthis.log(\"onClick(\" + v + \")\");\n\t}", "@Override\n protected void logv(String s) {\n Rlog.v(getName(), s);\n }", "public int V(){ return V;}", "public float v(View view) {\n return 1.0f;\n }", "public void onClick(View v) {\n \tBeintoo.GetVgood(BeintooSampleActivity.this, null, false, null, Beintoo.GET_VGOOD_ALERT, gvl);\n\t\t\t}", "public String string(final Variable v) {\n\treturn v.getIndex(0).toString();\r\n }", "private void m132724o(C1293v vVar) {\n m132718a(vVar.itemView);\n mo102447c(vVar);\n }", "public int getV()\r\n\t{\r\n\t\treturn value * 8;\r\n\t}", "protected abstract int mo4149c(V v);", "public static void v(String msg) {\n if (isDebug && debugLevel <= android.util.Log.VERBOSE)\n android.util.Log.v(TAG, msg);\n }", "public static void v(String s) {\n MyLog.v(s);\n }", "static void vaTest(int... v) {\n System.out.println(\"Number of args: \" + v.length);\n System.out.println(\"Contents: \");\n\n for (int i = 0; i < v.length; i++)\n System.out.println(\" arg \" + i + \": \" + v[i]);\n System.out.println();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the value of the 'Not Implemented' attribute.
boolean isNotImplemented();
[ "public String getNoTtf() {\r\n return (String) getAttributeInternal(NOTTF);\r\n }", "public String getNotLikeValue() {\n return this.notLike;\n }", "public String getAttributeWithNoAnnotations() {\r\n\t\treturn attributeWithNoAnnotations;\r\n\t}", "@Override\n\t\t\t\tpublic int getMissing() {\n\t\t\t\t\treturn missing_;\n\t\t\t\t}", "public String getNoRemitance() {\r\n return (String) getAttributeInternal(NOREMITANCE);\r\n }", "public double getMissingValue() {\r\n\treturn missing;\r\n }", "public String getNoTagInfo()\r\n {\r\n return m_noTagInfo;\r\n }", "public Object getMissingJavaValue() { return missingJavaValue; }", "@ReportableProperty(order = 17, value = \"isNonCompliant value.\")\r\n public Boolean getIsNonCompliant() {\r\n return record.bIsNonCompliant;\r\n }", "public java.lang.Boolean getAllowMissing() {\n return allowMissing;\n }", "public io.kubernetes.client.proto.V1beta1Apiextensions.JSONSchemaProps getNot() {\n if (notBuilder_ == null) {\n return not_ == null ? io.kubernetes.client.proto.V1beta1Apiextensions.JSONSchemaProps.getDefaultInstance() : not_;\n } else {\n return notBuilder_.getMessage();\n }\n }", "public boolean hasNot() {\n return ((bitField0_ & 0x00400000) == 0x00400000);\n }", "public String getNot() {\n return OPERATORS[operatorType][NOT];\n }", "public int getDontTransfer() {\n return this.m_dontTransfer;\n }", "public int getunTaxed()\n\t{\n\t\treturn untaxable;\n\t}", "public static Result notImplemented() {\n\t\treturn TODO;\n\t}", "@Override\n\tpublic String notRequired() {\n\t\treturn \"override impl\";\n\t}", "@Override\n\t\t\t\t\t\t\tpublic byte[] getValue()\n\t\t\t\t\t\t\t\t\tthrows AttributeValueException {\n\t\t\t\t\t\t\t\treturn \"100\".getBytes();\n\t\t\t\t\t\t\t}", "public String getNotAvgTo() {\r\n return (String) getAttributeInternal(NOTAVGTO);\r\n }", "public io.kubernetes.client.proto.V1beta1Apiextensions.JSONSchemaPropsOrBuilder getNotOrBuilder() {\n return not_ == null ? io.kubernetes.client.proto.V1beta1Apiextensions.JSONSchemaProps.getDefaultInstance() : not_;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a KMCCentroidsViewer for specified experiment and clusters.
public KMCCentroidsViewer(Experiment experiment, int[][] clusters) { super(experiment, clusters); }
[ "public ScriptCentroidViewer(Experiment experiment, int[][] clusters) {\r\n\tsuper(experiment, clusters);\r\n }", "public SOTAExperimentViewer(Experiment experiment, int[][] clusters, FloatMatrix codes, FloatMatrix clusterDiv, SOTATreeData sotaTreeData, Boolean clusterGenes) {\r\n \tthis(experiment, clusters, codes, clusterDiv, sotaTreeData, clusterGenes.booleanValue());\r\n }", "private void setUpClusteringViews() {\n\t\tClusteringSettings clusteringSettings = new ClusteringSettings();\n\t\tclusteringSettings.addMarkersDynamically(true);\n\n\t\tclusteringSettings.iconDataProvider(new IjoomerMapClusterIconProvider(getResources()));\n\n\t\tdouble clusterSize = CLUSTER_SIZES[3];\n\t\tclusteringSettings.clusterSize(clusterSize);\n\n\t\tgoogleMap.setClustering(clusteringSettings);\n\t}", "private void setClusterManager(){\n\t\tif(mMap!=null){\n\t\t\tmClusterManager = new ClusterManager<PreviewClusterItem>(SimsContext.getContext(), mMap);\n\t\t\tmClusterManager.setRenderer(new PreviewRenderer());\n\t\t\tif(mClusterManager!=null){\n\t\t\t\tmMap.setOnMarkerClickListener(mClusterManager);\n\t\t\t\tmMap.setOnInfoWindowClickListener(mClusterManager);\n\t\t\t\tmClusterManager.onCameraChange(mCurrentCameraPosition); \n\t\t\t\tmClusterManager.setOnClusterClickListener(this);\n\t\t\t\tmClusterManager.setOnClusterItemClickListener(this);\n\t\t\t\tmClusterManager.setOnClusterItemInfoWindowClickListener(this);\n\t\t\t\tmClusterManager.setOnClusterInfoWindowClickListener(this);\t\n\t\t\t}\n\t\t}else{\n\t\t\tToast.makeText(getActivity(),\n\t\t\t\t\tgetResources().getString(R.string.map_not_displayed),\n\t\t\t\t\tToast.LENGTH_SHORT)\n\t\t\t\t\t.show();\n\t\t}\n\t}", "public ClusterViewer(EventManager dataSource, int eventWindow) throws NullPointerException {\r\n // Initialize the superclass.\r\n super(dataSource);\r\n\r\n // Add the additional fields.\r\n for (String field : fieldNames) {\r\n addStatusField(field);\r\n }\r\n\r\n // Define the event window and initialize the event data.\r\n this.eventWindow = eventWindow;\r\n eventEnergyBuffer = new LinkedList<Double[][]>();\r\n eventHitBuffer = new LinkedList<List<EcalHit>>();\r\n\r\n // Prepare the event buffer to display the first event.\r\n try {\r\n // Make an empty array. At the start, there are no previous\r\n // events to load.\r\n Double[][] emptyArray = new Double[46][11];\r\n for (int x = 0; x < 46; x++) {\r\n for (int y = 0; y < 11; y++) {\r\n emptyArray[x][y] = new Double(0.0);\r\n }\r\n }\r\n\r\n // Populate the eventWindow before section of the buffer\r\n // with the empty events.\r\n for (int i = 0; i <= eventWindow; i++) {\r\n eventEnergyBuffer.addFirst(emptyArray);\r\n eventHitBuffer.addFirst(new ArrayList<EcalHit>());\r\n }\r\n\r\n // Fill the rest of the array with future events.\r\n for (int i = 0; i < eventWindow; i++) {\r\n em.nextEvent();\r\n eventEnergyBuffer.addFirst(toEnergyArray(em.getHits()));\r\n eventHitBuffer.addFirst(em.getHits());\r\n }\r\n } catch (java.io.IOException e) {\r\n System.exit(1);\r\n }\r\n\r\n // Make a key listener to change events.\r\n addKeyListener(new EcalKeyListener());\r\n }", "private void init(){\r\n\t\tthis.view = new JenovaView<R, E>();\r\n\t\tthis.controller = new JenovaViewController<R, E>(this.view, this, new PrometheusRenderer(this.view.getHawkEyeLocalMapPanel(), mapSystem.getLocalMapHeight(), mapSystem.getLocalMapWidth()));\r\n\t\tthis.view.setController(controller);\r\n\t\tJenovaConsole.SetConsoleDisplay(this.controller);\r\n\t}", "protected RMViewer createViewer() { return new RMViewer(); }", "public GSEAExperimentViewer(Experiment experiment, ClusterWrapper clusters,\r\n\t\t\tClusterWrapper samplesOrder, Boolean drawAnnotations) {\r\n\t\tsuper(experiment, clusters.getClusters(),\r\n\t\t\t\tsamplesOrder.getClusters()[0], drawAnnotations.booleanValue());\r\n\t}", "public void formInitialClusters() {\n\t\tdouble clusterBoxIncrement, countOfDestinations, initialClusterBoxSize;\n\t\tint schoolIndex, schoolListSize, destinationCount, schoolListIndex;\n\t\tdouble clusterBoxTopLeftLatitude, clusterBoxTopLeftLongitude, clusterBoxBottomRightLatitude, clusterBoxBottomRightLongitude;\n\t\tSchool currentSchool, currentDestinationSchool;\n\t\tString currentLatitudeLongitude = \"\";\n\t\tSchoolList schoolListObject = SchoolList.getInstance();\n\t\tList<School> schoolList = schoolListObject.getSchoolKitchenList();\n\t\tList<School> schoolsInClusterCurrentList = null;\n\t\tList<List<School>> schoolsInClusterList = schoolListObject\n\t\t\t\t.getSchoolClusterList();\n\n\t\tschoolListSize = schoolList.size();\n\t\tIterator<School> schoolListIterator = schoolList\n\t\t\t\t.iterator();\n\t\tschoolClusterURL = new String[schoolListSize];\n\n\t\twhile (schoolListIterator.hasNext()) {\n\t\t\tclusterBoxIncrement = CLUSTER_BOX_SIZE_INCREMENT;\n\t\t\tcountOfDestinations = CLUSTER_SCHOOL_LIMIT;\n\t\t\tinitialClusterBoxSize = CLUSTER_BOX_INITIAL_SIZE;\n\t\t\tcurrentSchool = schoolListIterator.next();\n\t\t\tschoolIndex = currentSchool.getSchoolIndex() - 1;\n\n\t\t\tschoolClusterURL[schoolIndex] = \"https://maps.googleapis.com/maps/api/distancematrix/json?key=\";\n\t\t\tint apiKeyIndex = schoolIndex / API_LIMIT;\n\t\t\tschoolClusterURL[schoolIndex] += apiKey[apiKeyIndex];\n\t\t\t/*\n\t\t\t * if (schoolIndex <= 90) schoolClusterURL[schoolIndex] =\n\t\t\t * schoolClusterURL[schoolIndex] +\n\t\t\t * \"AIzaSyDuQHT8biSPJa_tlGU1IYBZsc5lZ69au4Q\"; if (schoolIndex > 90\n\t\t\t * && schoolIndex <= 180) schoolClusterURL[schoolIndex] =\n\t\t\t * schoolClusterURL[schoolIndex] +\n\t\t\t * \"AIzaSyCzMkl6xOuNEJlhy2xKQ-HOgTB0QQBEoN4\"; if (schoolIndex > 180\n\t\t\t * && schoolIndex <= 270) schoolClusterURL[schoolIndex] =\n\t\t\t * schoolClusterURL[schoolIndex] +\n\t\t\t * \"AIzaSyCMY9xhpG7hCU-CZmFiM_A5Qpj1v_AmzFs\"; if (schoolIndex > 270\n\t\t\t * && schoolIndex <= 360) schoolClusterURL[schoolIndex] =\n\t\t\t * schoolClusterURL[schoolIndex] +\n\t\t\t * \"AIzaSyCjgycferCnJS7R8hahsyCl_bYJdzIzrpY\"; if (schoolIndex > 360\n\t\t\t * && schoolIndex <= 450) schoolClusterURL[schoolIndex] =\n\t\t\t * schoolClusterURL[schoolIndex] +\n\t\t\t * \"AIzaSyBd726ckN-J03NKGBKV0MWZWmG0mH2Jy9I\"; if (schoolIndex > 450)\n\t\t\t * schoolClusterURL[schoolIndex] = schoolClusterURL[schoolIndex] +\n\t\t\t * \"AIzaSyBd726ckN-J03NKGBKV0MWZWmG0mH2Jy9I\";\n\t\t\t */\n\n\t\t\tschoolClusterURL[schoolIndex] = schoolClusterURL[schoolIndex]\n\t\t\t\t\t+ \"&origins=\" + currentSchool.getSchoolLatitude() + \",\"\n\t\t\t\t\t+ currentSchool.getSchoolLongitude() + \"&destinations=\";\n\n\t\t\tdestinationCount = 0;\n\t\t\tclusterBoxTopLeftLongitude = currentSchool.getSchoolLatitude()\n\t\t\t\t\t+ initialClusterBoxSize;\n\t\t\tclusterBoxTopLeftLatitude = currentSchool.getSchoolLongitude()\n\t\t\t\t\t+ initialClusterBoxSize;\n\n\t\t\tclusterBoxBottomRightLongitude = currentSchool.getSchoolLatitude()\n\t\t\t\t\t- initialClusterBoxSize;\n\t\t\tclusterBoxBottomRightLatitude = currentSchool.getSchoolLongitude()\n\t\t\t\t\t- initialClusterBoxSize;\n\n\t\t\tschoolsInClusterCurrentList = null;\n\t\t\twhile (destinationCount <= countOfDestinations) {\n\t\t\t\tcurrentLatitudeLongitude = \"\";\n\t\t\t\tdestinationCount = 0;\n\t\t\t\tschoolsInClusterCurrentList = new ArrayList<School>();\n\t\t\t\tfor (schoolListIndex = schoolIndex - 1; schoolListIndex >= 0; schoolListIndex--) {\n\t\t\t\t\tcurrentDestinationSchool = schoolList\n\t\t\t\t\t\t\t.get(schoolListIndex);\n\n\t\t\t\t\tif (currentDestinationSchool.getSchoolLatitude() < clusterBoxBottomRightLongitude)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tif (currentDestinationSchool.getSchoolLongitude() >= clusterBoxBottomRightLatitude\n\t\t\t\t\t\t\t&& currentDestinationSchool.getSchoolLongitude() <= clusterBoxTopLeftLatitude) {\n\t\t\t\t\t\tschoolsInClusterCurrentList.add(currentDestinationSchool);\n\t\t\t\t\t\tif (currentLatitudeLongitude.equals(\"\"))\n\t\t\t\t\t\t\tcurrentLatitudeLongitude = currentDestinationSchool\n\t\t\t\t\t\t\t\t\t.getSchoolLatitude()\n\t\t\t\t\t\t\t\t\t+ \",\"\n\t\t\t\t\t\t\t\t\t+ currentDestinationSchool\n\t\t\t\t\t\t\t\t\t\t\t.getSchoolLongitude();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tcurrentLatitudeLongitude = currentLatitudeLongitude\n\t\t\t\t\t\t\t\t\t+ \"|\"\n\t\t\t\t\t\t\t\t\t+ currentDestinationSchool\n\t\t\t\t\t\t\t\t\t\t\t.getSchoolLatitude()\n\t\t\t\t\t\t\t\t\t+ \",\"\n\t\t\t\t\t\t\t\t\t+ currentDestinationSchool\n\t\t\t\t\t\t\t\t\t\t\t.getSchoolLongitude();\n\t\t\t\t\t\tdestinationCount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfor (schoolListIndex = schoolIndex + 1; schoolListIndex < schoolListSize; schoolListIndex++) {\n\t\t\t\t\tcurrentDestinationSchool = schoolList\n\t\t\t\t\t\t\t.get(schoolListIndex);\n\n\t\t\t\t\tif (currentDestinationSchool.getSchoolLatitude() > clusterBoxTopLeftLongitude)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tif (currentDestinationSchool.getSchoolLongitude() >= clusterBoxBottomRightLatitude\n\t\t\t\t\t\t\t&& currentDestinationSchool.getSchoolLongitude() <= clusterBoxTopLeftLatitude) {\n\t\t\t\t\t\tschoolsInClusterCurrentList.add(currentDestinationSchool);\n\t\t\t\t\t\tif (currentLatitudeLongitude.equals(\"\"))\n\t\t\t\t\t\t\tcurrentLatitudeLongitude = currentDestinationSchool\n\t\t\t\t\t\t\t\t\t.getSchoolLatitude()\n\t\t\t\t\t\t\t\t\t+ \",\"\n\t\t\t\t\t\t\t\t\t+ currentDestinationSchool\n\t\t\t\t\t\t\t\t\t\t\t.getSchoolLongitude();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tcurrentLatitudeLongitude = currentLatitudeLongitude\n\t\t\t\t\t\t\t\t\t+ \"|\"\n\t\t\t\t\t\t\t\t\t+ currentDestinationSchool\n\t\t\t\t\t\t\t\t\t\t\t.getSchoolLatitude()\n\t\t\t\t\t\t\t\t\t+ \",\"\n\t\t\t\t\t\t\t\t\t+ currentDestinationSchool\n\t\t\t\t\t\t\t\t\t\t\t.getSchoolLongitude();\n\t\t\t\t\t\tdestinationCount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tclusterBoxTopLeftLatitude += clusterBoxIncrement;\n\t\t\t\tclusterBoxTopLeftLongitude += clusterBoxIncrement;\n\t\t\t\tclusterBoxBottomRightLatitude -= clusterBoxIncrement;\n\t\t\t\tclusterBoxBottomRightLongitude -= clusterBoxIncrement;\n\t\t\t}\n\t\t\tschoolsInClusterList.add(schoolsInClusterCurrentList);\n\t\t\tschoolClusterURL[schoolIndex] += currentLatitudeLongitude;\n\t\t}\n\t}", "protected ClusterViewByServer clusterViewForTesting(SharedServiceStuff stuff,\n BasicTSStores stores)\n {\n KeySpace keyspace = new KeySpace(360);\n NodeDefinition localDef = new NodeDefinition(new IpAndPort(\"localhost:9999\"), 1,\n keyspace.fullRange(), keyspace.fullRange());\n ActiveNodeState localState = new ActiveNodeState(localDef, 0L);\n return new ClusterViewByServerImpl<BasicTSKey, StoredEntry<BasicTSKey>>(stuff, stores, keyspace,\n localState,\n Collections.<IpAndPort,ActiveNodeState>emptyMap(),\n 0L);\n }", "List<Cluster> createClusters(EventHeader event, List<CalorimeterHit> hits);", "private ClusterModel createClusterModel() {\n int numSnapshots = 2;\n if (!Load.initialized()) {\n Properties props = CruiseControlUnitTestUtils.getCruiseControlProperties();\n props.setProperty(KafkaCruiseControlConfig.NUM_LOAD_SNAPSHOTS_CONFIG, Integer.toString(numSnapshots));\n Load.init(new KafkaCruiseControlConfig(props));\n }\n\n Map<TopicPartition, Snapshot> snapshots = new HashMap<>();\n snapshots.put(T0P0, new Snapshot(0, 0.0, 0.0, 0.0, 10));\n snapshots.put(T0P1, new Snapshot(0, 0.0, 0.0, 0.0, 90));\n snapshots.put(T0P2, new Snapshot(0, 0.0, 0.0, 0.0, 20));\n snapshots.put(T1P0, new Snapshot(0, 0.0, 0.0, 0.0, 80));\n snapshots.put(T1P1, new Snapshot(0, 0.0, 0.0, 0.0, 30));\n snapshots.put(T1P2, new Snapshot(0, 0.0, 0.0, 0.0, 70));\n snapshots.put(T2P0, new Snapshot(0, 0.0, 0.0, 0.0, 40));\n snapshots.put(T2P1, new Snapshot(0, 0.0, 0.0, 0.0, 60));\n snapshots.put(T2P2, new Snapshot(0, 0.0, 0.0, 0.0, 50));\n\n final int numRacks = 4;\n ClusterModel clusterModel = new ClusterModel(new ModelGeneration(0, 0),\n 1.0);\n for (int i = 0; i < numRacks; i++) {\n clusterModel.createRack(\"r\" + i);\n }\n\n int i = 0;\n for (; i < 2; i++) {\n clusterModel.createBroker(\"r0\", \"h\" + i, i, TestConstants.BROKER_CAPACITY);\n }\n for (int j = 1; j < numRacks; j++, i++) {\n clusterModel.createBroker(\"r\" + j, \"h\" + i, i, TestConstants.BROKER_CAPACITY);\n }\n\n clusterModel.createReplica(\"r0\", 0, T0P0, 0, true);\n clusterModel.createReplica(\"r0\", 0, T1P2, 0, true);\n clusterModel.createReplica(\"r0\", 1, T0P1, 0, true);\n clusterModel.createReplica(\"r0\", 1, T2P0, 0, true);\n clusterModel.createReplica(\"r1\", 2, T0P2, 0, true);\n clusterModel.createReplica(\"r1\", 2, T2P1, 0, true);\n clusterModel.createReplica(\"r2\", 3, T1P0, 0, true);\n clusterModel.createReplica(\"r2\", 3, T2P2, 0, true);\n clusterModel.createReplica(\"r3\", 4, T1P1, 0, true);\n\n clusterModel.createReplica(\"r0\", 0, T0P2, 1, false);\n clusterModel.createReplica(\"r0\", 0, T2P1, 1, false);\n clusterModel.createReplica(\"r0\", 1, T1P0, 1, false);\n clusterModel.createReplica(\"r0\", 1, T2P2, 1, false);\n clusterModel.createReplica(\"r1\", 2, T0P1, 1, false);\n clusterModel.createReplica(\"r1\", 2, T2P0, 1, false);\n clusterModel.createReplica(\"r2\", 3, T1P1, 1, false);\n clusterModel.createReplica(\"r3\", 4, T0P0, 1, false);\n clusterModel.createReplica(\"r3\", 4, T1P2, 1, false);\n\n\n clusterModel.createReplica(\"r0\", 0, T1P1, 2, false);\n clusterModel.createReplica(\"r1\", 2, T1P0, 2, false);\n clusterModel.createReplica(\"r1\", 2, T1P2, 2, false);\n clusterModel.createReplica(\"r2\", 3, T0P0, 2, false);\n clusterModel.createReplica(\"r2\", 3, T0P2, 2, false);\n clusterModel.createReplica(\"r2\", 3, T2P1, 2, false);\n clusterModel.createReplica(\"r3\", 4, T0P1, 2, false);\n clusterModel.createReplica(\"r3\", 4, T2P0, 2, false);\n clusterModel.createReplica(\"r3\", 4, T2P2, 2, false);\n\n\n clusterModel.pushLatestSnapshot(\"r0\", 0, T0P0, snapshots.get(T0P0).duplicate());\n clusterModel.pushLatestSnapshot(\"r0\", 0, T1P2, snapshots.get(T1P2).duplicate());\n clusterModel.pushLatestSnapshot(\"r0\", 0, T0P2, snapshots.get(T0P2).duplicate());\n clusterModel.pushLatestSnapshot(\"r0\", 0, T2P1, snapshots.get(T2P1).duplicate());\n clusterModel.pushLatestSnapshot(\"r0\", 0, T1P1, snapshots.get(T1P1).duplicate());\n\n clusterModel.pushLatestSnapshot(\"r0\", 1, T0P1, snapshots.get(T0P1).duplicate());\n clusterModel.pushLatestSnapshot(\"r0\", 1, T2P0, snapshots.get(T2P0).duplicate());\n clusterModel.pushLatestSnapshot(\"r0\", 1, T1P0, snapshots.get(T1P0).duplicate());\n clusterModel.pushLatestSnapshot(\"r0\", 1, T2P2, snapshots.get(T2P2).duplicate());\n\n clusterModel.pushLatestSnapshot(\"r1\", 2, T0P2, snapshots.get(T0P2).duplicate());\n clusterModel.pushLatestSnapshot(\"r1\", 2, T2P1, snapshots.get(T2P1).duplicate());\n clusterModel.pushLatestSnapshot(\"r1\", 2, T0P1, snapshots.get(T0P1).duplicate());\n clusterModel.pushLatestSnapshot(\"r1\", 2, T2P0, snapshots.get(T2P0).duplicate());\n clusterModel.pushLatestSnapshot(\"r1\", 2, T1P0, snapshots.get(T1P0).duplicate());\n clusterModel.pushLatestSnapshot(\"r1\", 2, T1P2, snapshots.get(T1P2).duplicate());\n\n clusterModel.pushLatestSnapshot(\"r2\", 3, T1P0, snapshots.get(T1P0).duplicate());\n clusterModel.pushLatestSnapshot(\"r2\", 3, T2P2, snapshots.get(T2P2).duplicate());\n clusterModel.pushLatestSnapshot(\"r2\", 3, T1P1, snapshots.get(T1P1).duplicate());\n clusterModel.pushLatestSnapshot(\"r2\", 3, T0P0, snapshots.get(T0P0).duplicate());\n clusterModel.pushLatestSnapshot(\"r2\", 3, T0P2, snapshots.get(T0P2).duplicate());\n clusterModel.pushLatestSnapshot(\"r2\", 3, T2P1, snapshots.get(T2P1).duplicate());\n\n clusterModel.pushLatestSnapshot(\"r3\", 4, T1P1, snapshots.get(T1P1).duplicate());\n clusterModel.pushLatestSnapshot(\"r3\", 4, T0P0, snapshots.get(T0P0).duplicate());\n clusterModel.pushLatestSnapshot(\"r3\", 4, T1P2, snapshots.get(T1P2).duplicate());\n clusterModel.pushLatestSnapshot(\"r3\", 4, T0P1, snapshots.get(T0P1).duplicate());\n clusterModel.pushLatestSnapshot(\"r3\", 4, T2P0, snapshots.get(T2P0).duplicate());\n clusterModel.pushLatestSnapshot(\"r3\", 4, T2P2, snapshots.get(T2P2).duplicate());\n return clusterModel;\n }", "public KeysResult setClusters(Map<String, List<String>> clusters) {\n this.clusters = clusters;\n return this;\n }", "public KNNView() {\n initComponents();\n }", "private void InitClusteringGeneration(String confName, String termsDir, File indexDir, String queryField, int morphType,\n\t\t\tint termIndex, int scoreIndex, int topNum, double scoreThresholdString, String distMeasure) {\n\t\tm_morphPre = new MorphDistancePreprocessing(termsDir,indexDir,queryField,morphType,termIndex, scoreIndex, topNum, scoreThresholdString, false);\n\t\tif(distMeasure.equals(\"Morph\"))\n\t\t\tm_distance = new MorphDistance(m_morphPre);\n\t\telse // if(distMeasure.equals(\"Edit\"))\n\t\t\tm_distance = new EditDistance(false);\n\t\tm_jung = new JungClustering();\n\t\t\n\t}", "private void CVClusters ()\n throws Exception {\n double CVLogLikely = -Double.MAX_VALUE;\n double templl, tll;\n boolean CVincreased = true;\n m_num_clusters = 1;\n int num_clusters = m_num_clusters;\n int i;\n Random cvr;\n Instances trainCopy;\n int numFolds = (m_theInstances.numInstances() < 10) \n ? m_theInstances.numInstances() \n : 10;\n\n boolean ok = true;\n int seed = getSeed();\n int restartCount = 0;\n CLUSTER_SEARCH: while (CVincreased) {\n // theInstances.stratify(10);\n \n CVincreased = false;\n cvr = new Random(getSeed());\n trainCopy = new Instances(m_theInstances);\n trainCopy.randomize(cvr);\n templl = 0.0;\n for (i = 0; i < numFolds; i++) {\n\tInstances cvTrain = trainCopy.trainCV(numFolds, i, cvr);\n\tif (num_clusters > cvTrain.numInstances()) {\n\t break CLUSTER_SEARCH;\n\t}\n\tInstances cvTest = trainCopy.testCV(numFolds, i);\n\tm_rr = new Random(seed);\n for (int z=0; z<10; z++) m_rr.nextDouble();\n\tm_num_clusters = num_clusters;\n\tEM_Init(cvTrain);\n\ttry {\n\t iterate(cvTrain, false);\n\t} catch (Exception ex) {\n\t // catch any problems - i.e. empty clusters occuring\n\t ex.printStackTrace();\n // System.err.println(\"Restarting after CV training failure (\"+num_clusters+\" clusters\");\n seed++;\n restartCount++;\n ok = false;\n if (restartCount > 5) {\n break CLUSTER_SEARCH;\n }\n\t break;\n\t}\n try {\n tll = E(cvTest, false);\n } catch (Exception ex) {\n // catch any problems - i.e. empty clusters occuring\n // ex.printStackTrace();\n ex.printStackTrace();\n // System.err.println(\"Restarting after CV testing failure (\"+num_clusters+\" clusters\");\n // throw new Exception(ex); \n seed++;\n restartCount++;\n ok = false;\n if (restartCount > 5) {\n break CLUSTER_SEARCH;\n }\n break;\n }\n\n\tif (m_verbose) {\n\t System.out.println(\"# clust: \" + num_clusters + \" Fold: \" + i \n\t\t\t + \" Loglikely: \" + tll);\n\t}\n\ttempll += tll;\n }\n\n if (ok) {\n restartCount = 0;\n seed = getSeed();\n templl /= (double)numFolds;\n \n if (m_verbose) {\n System.out.println(\"===================================\" \n + \"==============\\n# clust: \" \n + num_clusters \n + \" Mean Loglikely: \" \n + templl \n + \"\\n================================\" \n + \"=================\");\n }\n \n if (templl > CVLogLikely) {\n CVLogLikely = templl;\n CVincreased = true;\n num_clusters++;\n }\n }\n }\n\n if (m_verbose) {\n System.out.println(\"Number of clusters: \" + (num_clusters - 1));\n }\n\n m_num_clusters = num_clusters - 1;\n }", "Clusters getClusters();", "private ThreadViewer() {\n\t\thighlightPlugin = HighlightPlugin.getDefault();\n\t\tactiveThreads = new HashSet<ThreadInstance>();\n\n\t\t// TreeViewer\n\t\ttreeContentProvider = new TreeContentProvider();\n\t\ttreeLabelProvider = new TreeLabelProvider();\n\t\tviewSelectionChangedListener = new ViewSelectionChangedListener();\n\t\tviewDoubleClickListener = new ViewDoubleClickListener();\n\n\t\t// GraphViewer\n\t\tgraphContentProvider = new GraphContentProvider();\n \t\tgraphLabelProvider = new GraphLabelProvider();\n\n\t\t// Create handles for menu and toolbar\n\t\tcontextmenuFollowThreadRegionAction = new ViewContextMenu_FollowThreadRegionAction();\n\t\tcontextmenuFollowParallelRegionsAction = new ViewContextMenu_FollowParallelRegionsAction();\n\t\tcontextmenuFollowThreadAction = new ViewContextMenu_FollowThreadAction();\n\t\tcontextmenuCenterParallelRegionAction = new ViewContextMenu_CenterParallelRegionAction();\n\n\t\tcontextmenuFollowNodeAction = new ViewContextMenu_FollowNodeAction();\n\t\tcontextmenuFollowInterferedNodesAction = new ViewContextMenu_FollowInterferedNodesAction();\n\t\tcontextmenuCenterInterferedNodeAction = new ViewContextMenu_CenterInterferingRegionsAction();\n\t\tcontextmenuFollowInterference = new ViewContextMenu_FollowInterferenceAction();\n\n\t\ttoolbarFollowThreadRegionAction = new ViewToolbar_FollowThreadRegionAction();\n\n\t\ttoolbarCenterParallelRegionAction = new ViewToolbar_CenterParallelRegionAction();\n\t\ttoolbarFollowParallelRegionsAction = new ViewToolbar_FollowParallelRegionsAction();\n\t\ttoolbarFollowThreadAction = new ViewToolbar_FollowThreadAction();\n\n\t\ttoolbarCenterInterferedNodeAction = new ViewToolbar_CenterInterferingRegionsAction();\n\t\ttoolbarFollowNodeAction = new ViewToolbar_FollowNodeAction();\n\t\ttoolbarFollowInterferedNodesAction = new ViewToolbar_FollowInterferedNodesAction();\n\n\t\t// Create filters and sorters\n\t\thideSourceCodeThreadRegionFilter = new HideSourceCodeThreadRegionFilter();\n\t\thideSourcecodeThreadRegionAction = new FilterHideSourcecodeThreadRegionAction();\n\n\t\thideNotInterferingThreadRegionFilter = new HideNotInterferingThreadRegionFilter();\n\t\thideNotInterferingThreadRegionAction = new FilterHideNotInterferingThreadRegionAction();\n\n\t\thideInterproceduralEdgesAction = new FilterHideInterproceduralEdgesAction();\n\t\thideThreadFilter = new HideThreadFilter();\n\n\t\tsourcecodeThreadRegionSorter = new SourcecodeThreadRegionSorter();\n\t\tsourcecodeThreadRegionAction = new SourcecodeThreadRegionSorterAction();\n\n\t\talphabeticalSorter = new AlphabeticalThreadRegionSorter();\n\t\talphabeticalAction = new AlphabeticalThreadRegionSorterAction();\n\t}", "private ProjectionClusteringView(java.awt.Frame parent) {\n super(parent);\n initComponents();\n }", "private void init() {\n\n Intent intent = getIntent();\n\n //final boolean useCloudConnectivity = intent.getBooleanExtra(USE_CLOUD_CONNECTIVITY, true);\n\n final String localCloudAddress = intent.getStringExtra(VIEWER_CLOUD_ADDRESS);\n final String localCloudPassword = intent.getStringExtra(VIEWER_CLOUD_PASSWORD);\n final String peerCloudAddress = intent.getStringExtra(PEER_CLOUD_ADDRESS);\n\n mProgressDialog = ProgressDialog.show(ViewerActivity.this,\n \"\", getString(R.string.connecting_dlg), true);\n\n ViewerThread.getInstance().init(getFilesDir().getAbsolutePath() + \"dataStore\", this);\n\n ViewerThread.getInstance().post(new Runnable() {\n @Override\n public void run() {\n // Set up the various callbacks\n if (mCloudConnector != null) {\n mCloudConnector.destroy();\n }\n if (mViewer != null) {\n mViewer.destroy();\n }\n\n try {\n mViewer = new Viewer();\n } catch (Library.VncException e) {\n displayMessage(R.string.failed_to_create_viewer, e.getMessage());\n return;\n }\n\n try {\n /*\n These callbacks will all be run on the SDK thread, so any UI updates must be\n done through calls to {@link #runOnUiThread}.\n */\n mViewer.setConnectionCallback(new Viewer.ConnectionCallback() {\n @Override\n public void connecting(Viewer viewer) {\n }\n\n @Override\n public void connected(Viewer viewer) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mProgressDialog.hide();\n //mExtensionKeyboardView.setVisibility(View.VISIBLE);\n }\n });\n }\n\n @Override\n public void disconnected(Viewer viewer,\n final String reason,\n final EnumSet<Viewer.DisconnectFlags> disconnectFlags) {\n\n final String disconnectMsg = mViewer.getDisconnectMessage() == null ?\n mViewer.getDisconnectReason() :\n String.format(\"%s, %s\", mViewer.getDisconnectReason(), mViewer.getDisconnectMessage());\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mProgressDialog.hide();\n String message = getString(R.string.disconnected) +\n disconnectMsg;\n if (mAuthDialog != null && mAuthDialog.isShowing()) {\n message = getString(R.string.disconnected_authenticating) +\n mViewer.getDisconnectReason();\n }\n mAlertDialog = buildAlertDialog(message);\n\n if (disconnectFlags.contains(Viewer.DisconnectFlags.ALERT_USER)) {\n mAlertDialog.show();\n } else {\n cleanup();\n }\n }\n });\n }\n });\n mViewer.setFramebufferCallback(mFrameBufferView);\n\n // Set the framebuffer to a sensible default. We will be notified of the actual\n // size before rendering anything.\n mFrameBufferView.serverFbSizeChanged(mViewer, 1024, 768);\n mViewer.setAuthenticationCallback(ViewerActivity.this);\n\n mCloudConnector = new CloudConnector(localCloudAddress, localCloudPassword);\n mCloudConnector.connect(peerCloudAddress, mViewer.getConnectionHandler());\n\n } catch (Library.VncException e) {\n Log.e(TAG, \"Connection error\", e);\n displayMessage(R.string.failed_to_make_vnc_cloud_connection, e.getMessage());\n }\n }\n });\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/This is a better approach by using hashmap Traverse and store first linkedlist in hashmap and then traverse second linkedlist and if same element is repeated then return corresponding node
public ListNode getIntersectionNode2(ListNode headA, ListNode headB) { HashSet<ListNode> mapuh = new HashSet<>(); ListNode iterator = headA; while(iterator != null) { mapuh.add(iterator); } iterator = headB; while(iterator != null) { if(mapuh.contains(iterator)) return iterator; } return null; }
[ "public void _removeDuplicates() {\r\n Node ptr1 = this.head, ptr2 = null;\r\n while (ptr1 != null) {\r\n ptr2 = ptr1;\r\n while (ptr2.next != null) {\r\n if (ptr1.data == ptr2.next.data) {\r\n ptr2.next = ptr2.next.next;\r\n } else {\r\n ptr2 = ptr2.next;\r\n }\r\n }\r\n ptr1 = ptr1.next;\r\n }\r\n }", "private static HashMap<SemanticNetNode, SemanticNetNode> mapSimilarNodes(\n\t\t\tSemanticNetState s1,\n\t\t\tSemanticNetState s2) {\n\t\tHashMap<SemanticNetNode, SemanticNetNode> pairings = new HashMap<SemanticNetNode, SemanticNetNode>();\n\t\tHashMap<String, NodeSimilarityRecord> sNSRMap = new HashMap<String, NodeSimilarityRecord>();\n\t\tHashMap<String, NodeSimilarityRecord> dNSRMap = new HashMap<String, NodeSimilarityRecord>();\n\t\t//HashMap<String, String> S2DMap = new HashMap<String, String>();\n\t\t//HashMap<String, String> D2SMap = new HashMap<String, String>();\n\t\t// SemanticNetNode maxSimilarityNode = null;\n\n\t\tfor (NodeSimilarityRecord nsr : NSRList) \n\t\t{\n\t\t\tSemanticNetNode sNode = s1.getNodeByName(nsr.getSourceNodeName());\n\t\t\tSemanticNetNode dNode = s2.getNodeByName(nsr.getDestinationNodeName());\n\t\t\tif(!pairings.containsKey(sNode)\t&& !pairings.containsValue(dNode))\n\t\t\t{\n\t\t\t\tpairings.put(sNode, dNode);\n\t\t\t\tsNSRMap.put(sNode.getName(), nsr);\n\t\t\t\tdNSRMap.put(dNode.getName(), nsr);\n\t\t\t\t//S2DMap.put(nsr.getSourceNodeName(), nsr.getDesinationNodeName());\n\t\t\t\t//D2SMap.put(nsr.getDesinationNodeName(), nsr.getSourceNodeName());\n\t\t\t}\n\t\t\telse if (pairings.containsKey(s1.getNodeByName(nsr.getSourceNodeName()))) // risk of redundantly mapping same source node\n\t\t\t{\n\t\t\t\tNodeSimilarityRecord priorNsr = sNSRMap.get(sNode.getName());\n\t\t\t\tSemanticNetNode priorDNode = s2.getNodeByName(priorNsr.getDestinationNodeName());\n\t\t\t\tif(nsr.similarity > priorNsr.similarity)\n\t\t\t\t{\n\t\t\t\t\tpairings.remove(sNode);\n\t\t\t\t\tsNSRMap.remove(sNode.getName());\n\t\t\t\t\tdNSRMap.remove(priorDNode.getName());\n\t\t\t\t\t\n\t\t\t\t\tpairings.put(sNode, dNode);\n\t\t\t\t\tsNSRMap.put(sNode.getName(), nsr);\n\t\t\t\t\tdNSRMap.put(dNode.getName(), nsr);\n\t\t\t\t\t/*if(sNSRMap.size() == s1.getNodes().size())\n\t\t\t\t\t{\n\t\t\t\t\t\tpairings.put((, value)\n\t\t\t\t\t}*/\n\t\t\t\t}\n\t\t\t\telse if(nsr.similarity == priorNsr.similarity)\n\t\t\t\t{\n\t\t\t\t\t//Log These Cases...\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\telse // risk of redundantly mapping same destination node\n\t\t\t{\n\t\t\t\tNodeSimilarityRecord priorNsr = dNSRMap.get(dNode.getName());\n\t\t\t\tSemanticNetNode priorSNode = s1.getNodeByName(priorNsr.getSourceNodeName());\n\t\t\t\tif(nsr.similarity > priorNsr.similarity)\n\t\t\t\t{\n\t\t\t\t\tpairings.remove(priorNsr.getSourceNodeName());\n\t\t\t\t\tsNSRMap.remove(priorSNode.getName());\n\t\t\t\t\tdNSRMap.remove(dNode.getName());\n\t\t\t\t\t\n\t\t\t\t\tpairings.put(sNode, dNode);\n\t\t\t\t\tsNSRMap.put(sNode.getName(), nsr);\n\t\t\t\t\tdNSRMap.put(dNode.getName(), nsr);\n\t\t\t\t}\n\t\t\t\telse if(nsr.similarity == priorNsr.similarity)\n\t\t\t\t{\n\t\t\t\t\t//Log These Cases...\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// populate delete nodes\n\t\tfor(SemanticNetNode n : s1.getNodes().values())\n\t\t{\n\t\t\tif(!pairings.containsKey(n))\n\t\t\t{\n\t\t\t\tpairings.put(n, new SemanticNetNode(\"delete\"));\n\t\t\t}\n\t\t}\n\t\t// populate create nodes\n\t\tfor(SemanticNetNode n : s2.getNodes().values())\n\t\t{\n\t\t\tif(!pairings.containsValue(n))\n\t\t\t{\n\t\t\t\tpairings.put(new SemanticNetNode(\"create\"), n);\n\t\t\t}\n\t\t}\n\t\treturn pairings;\n\t}", "public static ListNode solution2(ListNode headA, ListNode headB){\n HashSet<ListNode> set = new HashSet<>();\n ListNode curA = headA;\n while(curA != null){\n set.add(curA);\n curA = curA.next;\n }\n ListNode curB = headB;\n while(curB != null){\n if(set.contains(curB)) return curB;\n curB = curB.next;\n }\n return null;\n }", "static Node removeDuplicatesFromSortedLL2(Node n){\n Node temp;\n if(n == null){\n return null;\n }\n if(n.next!= null){\n if(n.data == n.next.data){\n temp = n.next;\n n.next = n.next.next;\n removeDuplicatesFromSortedLL2(n);\n }else{\n removeDuplicatesFromSortedLL2(n.next);\n }\n }\n return n;\n }", "public ListNode getIntersectionNodeHashing(ListNode headA, ListNode headB) {\n Set<ListNode> set=new HashSet<>();\n while(headA!=null){\n set.add(headA);\n headA=headA.next;\n }\n while(headB!=null){\n if(set.contains(headB))\n return headB;\n headB=headB.next;\n }\n return null;\n }", "public static ListNode detectCycle_hash(ListNode head) {\n Map<ListNode, Integer> nodeMap = new HashMap<>();\n ListNode pNode = head;\n int idx = 0;\n while (pNode != null) {\n if (nodeMap.containsKey(pNode)) {\n return pNode;\n }\n nodeMap.put(pNode, idx);\n idx++;\n pNode = pNode.next;\n }\n\n return null;\n }", "public static void removeDuplicates2(Node head)\n\t{\n\t\tNode n = head.next;\n\t\twhile(n != null)\n\t\t{\n\t\t\tNode it = head.next;\n\t\t\twhile(it!=n)\n\t\t\t{\n\t\t\t\tif(it.data == n.data)\n\t\t\t\t\tbreak;\n\t\t\t\tit=it.next;\n\t\t\t}\n\t\t\tif( it != n)\n\t\t\t{\n\t\t\t\twhile(it.next != n)\n\t\t\t\t{\n\t\t\t\t\tit=it.next;\n\t\t\t\t}\n\t\t\t\tit.next = n.next;\n\t\t\t}\t\n\t\t\tn = n.next;\n\t\t}\n\t}", "private void rehash() {\r\n // ...\r\n Node<KeyType,DataType>[] oldMap = map;\r\n Node<KeyType,DataType> headNode; // To iterate through the list of nodes at a given position int the map\r\n Node<KeyType,DataType> currentNode;\r\n increaseCapacity();\r\n\r\n map = new Node[capacity];\r\n // On remplis la nouvelle map. Sachant que la capacité a agumenté la position de chaque Node\r\n // doit etre calculé à nouveau car il se pourrait qu'elle soit différente.\r\n for (int i = 0; i< oldMap.length; i++){\r\n headNode = oldMap[i];\r\n currentNode = headNode;\r\n if (headNode != null){\r\n currentNode = map[hash(headNode.key)]; // Nouvelle position ou placé le headNode\r\n if (currentNode == null){ // On vérifie que la position est vide.\r\n map[hash(headNode.key)]= headNode;\r\n }\r\n else {\r\n while (currentNode != null){\r\n currentNode = currentNode.next; // On parcours la liste jusqu'à trouver une position vide.\r\n }\r\n currentNode = headNode; // On écris notre Node à cette position vide\r\n }\r\n\r\n headNode = oldMap[i].next; // Le next de la headNode sur odlMap[i]\r\n\r\n while (headNode != null){\r\n currentNode = map[hash(headNode.key)];\r\n if (currentNode == null){\r\n map[hash(headNode.key)] = headNode;\r\n }\r\n else{\r\n while (currentNode != null){\r\n currentNode = currentNode.next;\r\n }\r\n currentNode = headNode; // On écris notre Node à cette position vide dans map\r\n }\r\n\r\n headNode = headNode.next;\r\n }\r\n }\r\n }\r\n\r\n }", "public ListNode findNode(ListNode head, int kcycleLength){\n ListNode left = head;\n ListNode right = head;\n\n // step right forward by k times the cycle\n for(int i = 0; i < kcycleLength; i++){\n right = right.next;\n }\n\n while(right != null){\n\n if(left == right) return left;\n left = left.next;\n right = right.next;\n }\n\n // this line will not be reached\n return null;\n\n }", "public void deleteDups2() {\n Node current = first;\n while (current != null) {\n Node runner = current;\n while (runner.next != null) {\n if (runner.next.data == current.data) {\n runner.next = runner.next.next;\n } else {\n runner = runner.next;\n }\n }\n current = current.next;\n }\n }", "public ListNode deleteDuplicates2(ListNode head) {\r\n if(head==null){\r\n return head;\r\n }\r\n ListNode fakehead = new ListNode(0);\r\n fakehead.next = head;\r\n \r\n ListNode ptr0 = fakehead;\r\n ListNode ptr1 = fakehead.next;\r\n ListNode ptr2 = fakehead.next.next;\r\n \r\n boolean flag = false;\r\n while(ptr2!=null){\r\n if(ptr1.val == ptr2.val){\r\n flag = true;\r\n ptr2 = ptr2.next;\r\n if(ptr2 == null)\r\n ptr0.next = null;\r\n }else{\r\n if(flag){\r\n ptr0.next = ptr2;\r\n flag = false;\r\n }else{\r\n ptr0 = ptr1;\r\n }\r\n ptr1 = ptr2;\r\n ptr2 = ptr2.next;\r\n }\r\n }\r\n return fakehead.next;\r\n }", "public ListNode mergeListWithoutDuplicates(ListNode l1, ListNode l2) {\n ListNode head = new ListNode(0);\n ListNode current = head;\n \n while (l1 != null && l2 != null) {\n if (l1.val < l2.val) {\n if (current.val == l1.val) {\n l1 = l1.next;\n continue;\n }\n current.next = l1;\n l1 = l1.next;\n } else {\n if (current.val == l2.val) {\n l2 = l2.next;\n continue;\n }\n current.next = l2;\n l2 = l2.next;\n }\n \n current = current.next;\n }\n \n while (l1 != null) {\n\t\t\tif (current.val == l1.val) {\n\t\t\t l1 = l1.next;\n\t\t\t if (current.next != null) {\n\t\t\t \tcurrent.next = null;\n\t\t\t }\n\t\t\t continue;\n\t\t\t}\n\t\t\t\n\t\t\tcurrent.next = l1;\n\t\t\tl1 = l1.next;\n\t\t\tcurrent = current.next;\n\t\t}\n\t\t\n\t\twhile (l2 != null) {\n\t\t\tif (current.val == l2.val) {\n\t\t\t l2 = l2.next;\n\t\t\t if (current.next != null) {\n\t\t\t \tcurrent.next = null;\n\t\t\t }\n\t\t\t continue;\n\t\t\t}\n\t\t\t\n\t\t\tcurrent.next = l2;\n\t\t\tl2 = l2.next;\n\t\t\tcurrent = current.next;\n\t\t}\n \n return head.next;\n }", "private ListNode getIntersectNode(ListNode head1, ListNode head2) {\n ListNode dummy1 = head1;\n ListNode dummy2 = head2;\n int counter1 = 0;\n int counter2 = 0;\n while (dummy1 != null) {\n counter1++;\n dummy1 = dummy1.next;\n }\n while (dummy2 != null) {\n counter2++;\n dummy2 = dummy2.next;\n }\n int diff = counter1 - counter2;\n dummy1 = head1;\n dummy2 = head2;\n if (diff >= 0) {\n while(diff > 0) {\n dummy1 = dummy1.next;\n diff--;\n }\n } else {\n while(diff < 0) {\n dummy2 = dummy2.next;\n diff++;\n }\n }\n while (dummy1 != dummy2) {\n dummy1 = dummy1.next;\n dummy2 = dummy2.next;\n }\n\n return dummy1;\n }", "public static void removeDupes1(Node head) {\n\t\tHashtable tracker = new Hashtable();\n\t\tNode current = head;\n\t\tNode prev = null;\n\t\twhile(current != null) {\n\t\t\t//check for duplicate\n\t\t\tif(tracker.containsKey(current.getData())) {\n\t\t\t\t//remove pointer to current\n\t\t\t\tprev.setNext(current.getNext());\n\t\t\t} else {\n\t\t\t\t//add new value \n\t\t\t\ttracker.put(current.getData(), true); \n\t\t\t\tprev = current;\n\t\t\t}\n\t\t\tcurrent = current.getNext();\n\t\t}\n\t}", "private void fillHashMapOfNodesWithIdenticalTagcodes (HashMap<String, List <SNode> > hashmapIdenticalTagcodeSTokens, List <SNode> sNodes){\n\t\t\tfor (SNode s: sNodes){\n\t\t\t\t\n\t\t\t\tCollection <Label> labels = s.getLabels(); \n\t\t\t\tfor (Label l: labels){\n\t\t\t\t\t\n\t\t\t\t\tString labelValue= (String)l.getValue();\t \t\n\t \tString labelName= (String)l.getName();\n\t \t\n\t \tif (labelName==annotationsUnifyingAttribute){\n\t \t\tif (hashmapIdenticalTagcodeSTokens.get(labelValue)==null){\n\t \t\t\tList<SNode> listSNodes = new ArrayList<SNode>();\n\t \t\t\t//System.out.println(\"will be mainnode: \" + s.toString());\n\t \t\t\tlistSNodes.add(s);\n\t \t\t\thashmapIdenticalTagcodeSTokens.put(labelValue, listSNodes);\n\t \t\t}else{\n\t \t\t\tList<SNode> listSNodes = hashmapIdenticalTagcodeSTokens.get(labelValue);\n\t \t\t\tlistSNodes.add(s);\n\t \t\t\thashmapIdenticalTagcodeSTokens.put(labelValue, listSNodes);\n\t \t\t}\n\t \t}\n\t\t\t\t}\n }\n\t\t\treturn;\n\t\t}", "public static node elminateDuplicates(node head)\r\n\t{\r\n\t\tnode current=head;\r\n\t\tnode next=head.next;\r\n\t\twhile(next!=null)\r\n\t\t{\r\n\t\t\tif(current.data==next.data)\r\n\t\t\t{\r\n\t\t\t\tnode temp=next.next;\r\n\t\t\t\tcurrent.next=temp;\r\n\t\t\t}\r\n\t\t\tcurrent=current.next;\r\n\t\t\tnext=next.next;\r\n\t\t}\r\n\treturn head;\t\r\n\t}", "public boolean hasCycleHashing(ListNode head) {\n Set<ListNode> set=new HashSet<>();\n while(head!=null){\n if(set.contains(head))return true;\n else{\n set.add(head);\n head=head.next;\n }\n }\n return false; \n }", "public ListNode deleteDuplicates(ListNode head) {\n ListNode first = head;\n \n ListNode second = head;\n \n //Terminating condition\n while(first!=null && second !=null){\n \n //Checking if the nodes are same\n while(second!=null && first.val == second.val){\n second= second.next;\n }\n \n \n //Moving to the next node\n first.next = second;\n first=second;\n \n \n if(second!=null)\n second = second.next;\n \n \n }\n //Returning the head node of the updated list\n return head;\n \n }", "@Override\n public boolean checkListIdencity(LinkedList list1, LinkedList list2) {\n\n Node node1 = list1.head;\n Node node2 = list2.head;\n\n if (list1.size > list2.size || list1.size < list2.size) return false;\n\n if (node1 == null && node2 == null) return false;\n\n if (node1 == null) return false;\n\n if (node2 == null) return false;\n\n boolean flag = false;\n\n while (node1 != null && node2 != null) {\n if (node1.data == node2.data) {\n node1 = node1.next;\n node2 = node2.next;\n flag = true;\n } else {\n flag = false;\n break;\n }\n }\n return flag;\n }", "public Node findFirstCommonNode(HashMap<Node, LinkedList<Node>> pathMap) {\n\t\tNode commonNode = null;\n\t\t\n\t\t// take a path and remove if from the map\n\t\tEntry<Node, LinkedList<Node>> entry = pathMap.entrySet().iterator().next();\n\t\tLinkedList<Node> referencePath = entry.getValue();\n\t\tpathMap.remove(entry.getKey());\n\t\t\n\t\t//iterate the path\n\t\tfor (Node node : referencePath) {\n\t\t\tboolean common = false;\n\t\t\t// check if every other path also conains the node\n\t\t\tfor (LinkedList<Node> path : pathMap.values()) {\n\t\t\t\tif( path.contains(node) ) {\n\t\t\t\t\tcommon = true;\n\t\t\t\t} else {\n\t\t\t\t\tcommon = false;\n\t\t\t\t}\t\n\t\t\t}\n\t\t\tif( common ) {\n\t\t\t\tcommonNode = node;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn commonNode;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Created by Martin on 19.12.2017.
public interface HeartRateMonitor { public abstract int getHeartRate (); }
[ "@Override\n public void extornar() {\n \n }", "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "private static void EX5() {\n\t\t\r\n\t}", "@Override\n public int utilite() {\n return 0;\n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "protected void method_5557() {}", "protected void mo4791d() {\n }", "@Override\n \tpublic void init() {\n \n \t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "public void mo1857d() {\n }", "@Override\r\n\tpublic void jugar() {\n\t\t\r\n\t}", "public void mo28221a() {\n }", "@Override\nint nooftyres() {\nreturn 0;\n}", "Eisdiele() {\r\n\r\n\t}", "@Override\n protected void init()\n {\n\n }", "@Override\n\tpublic void tyre() {\n\t\t\n\t}", "@Override\n\tpublic void frena() {\n\t\t\n\t}", "@Override\r\n\tpublic void limpar() {\n\t\t\r\n\t}", "public void mo17751g() {\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form Application
public Application() { initComponents(); }
[ "public void createApplication() {\n }", "public suiluppo_application create(long applicat_id);", "public App() {\r\n\t\tcreateGui();\r\n }", "GuiApplication createGuiApplication();", "CreateApplicationResult createApplication(CreateApplicationRequest createApplicationRequest);", "private void customizeApplicationForm() {\n if (appBean != null && !appBean.isNew()) {\n java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle(\n \"org/sola/clients/swing/desktop/application/Bundle\");\n pnlHeader.setTitleText(bundle.getString(\"ApplicationPanel.pnlHeader.titleText\")\n + \" #\" + appBean.getNr());\n tabbedControlMain.addTab(\n bundle.getString(\"ApplicationPanel.workflowPanel.TabConstraints.tabTitle\"),\n workflowPanel);\n tabbedControlMain.addTab(\n bundle.getString(\"ApplicationPanel.validationPanel.TabConstraints.tabTitle\"),\n validationPanel);\n workflowPanel.setApplication(appBean);\n cmbRequestType.setEnabled(false);\n btnValidate.setVisible(true);\n } else {\n tabbedControlMain.removeTabAt(tabbedControlMain.indexOfComponent(workflowPanel));\n tabbedControlMain.removeTabAt(tabbedControlMain.indexOfComponent(validationPanel));\n cmbRequestType.setEnabled(true);\n btnValidate.setVisible(false);\n }\n customizeFormBasedInRequestTypeSelection();\n saveAppState();\n }", "public static Application createApplication(Habitat habitat, String name, ModuleDescriptor<BundleDescriptor> newModule) {\n\n // create a new empty application\n Application application = new Application(habitat);\n application.setVirtual(true);\n if (name == null && newModule.getDescriptor() != null) {\n name = newModule.getDescriptor().getDisplayName();\n\n }\n String untaggedName = VersioningUtils.getUntaggedName(name);\n if (name != null) {\n application.setDisplayName(untaggedName);\n application.setName(untaggedName);\n application.setAppName(untaggedName);\n }\n\n // add the module to it\n newModule.setStandalone(true);\n newModule.setArchiveUri(untaggedName);\n if (newModule.getDescriptor() != null) {\n newModule.getDescriptor().setApplication(application);\n }\n application.addModule(newModule);\n\n return application;\n }", "private void createApplications() {\n for (int i = 0; i < 4; i++) {\n String appName = \"Application \" + (i + 1);\n SimApp simAppObj = new SimApp();\n simAppObj.setAppName(appName);\n int numberOfPackets = new Random().nextInt(MAX_PACKETS[i]) + MIN_PACKETS[i];\n //1 packet 50 ms then total packet * 50 ms - total time\n SimMessage msg = new SimMessage(numberOfPackets, (APPLICATION_PACKET_TIMES[i] * numberOfPackets));\n simAppObj.setSimMessage(msg);\n listOfSimApps.add(simAppObj);\n appDropDown.addItem(appName);\n }\n }", "@Override\n\tpublic Application createApplication(CreateApplicationRequest request) throws ResourceException {\n\t\treturn null;\n\t}", "static MiApp generar(MiApp app) {\n \n MiApp nuevaApp=ClaseMain.inicio(app.getFicheroXml().getRuta(),app.getcTerminales(),\n app.getcNoTerminales(),app.getLetraTerminales(),app.getLetraNoTerminales(),app.getColorCadLeido(), \n app.getColorCadPendiente(),app.getSizeLetra(),app.getSizeLetraTraductor(),app.getSizeCadena(),\n app.getColorAccSem(),app.getTipoLetra(), app.getSizeAcciones(),app.getZoomInicial());\n return nuevaApp;\n }", "T createInstance(SimpleApplication application);", "public static ApplicationBo create(ApplicationBo app) {\n final String[] COLUMNS = new String[] { \"aid\", \"acategory_id\", \"aposition\", \"atitle\",\n \"aicon\", \"asummary\" };\n final Object[] VALUES = new Object[] { app.getId(), app.getCategoryId(), app.getPosition(),\n app.getTitle(), app.getIcon(), app.getSummary() };\n insertIgnore(TABLE_APPLICATION, COLUMNS, VALUES);\n invalidate(app);\n return (ApplicationBo) app.markClean();\n }", "private ApplicationMenu createApplicationMenue()\n\t{\n\t\tApplicationMenu applicationMenu = new ApplicationMenu();\n\t\t\n\t applicationMenu.addMenu(translationConstants.NewActivityMenuName(), DEFAULT_MENU_WIDTH, translationConstants.NewActivityMenuItemNames(),new ApplicationMenuClickHandler());\n\t applicationMenu.addMenu(translationConstants.NewRecordMenuName(), DEFAULT_MENU_WIDTH, translationConstants.NewRecordMenuItemNames(),new ApplicationMenuClickHandler());\n\n\t Menu goToMenu = applicationMenu.addMenu(translationConstants.GoToMenuName(), DEFAULT_MENU_WIDTH - 30);\n\t applicationMenu.addSubMenu(goToMenu, translationConstants.SalesMenuItemName(), translationConstants.SalesMenuItemNames());\n\t applicationMenu.addSubMenu(goToMenu, translationConstants.SettingsMenuItemName(), translationConstants.SettingsMenuItemNames());\n\t applicationMenu.addSubMenu(goToMenu, translationConstants.ResourceCentreMenuItemName(), translationConstants.ResourceCentreMenuItemNames());\n\t applicationMenu.addMenu(translationConstants.ToolsMenuName(), DEFAULT_MENU_WIDTH - 30, translationConstants.ToolsMenuItemNames(),new ApplicationMenuClickHandler());\n\t applicationMenu.addMenu(translationConstants.HelpMenuName(), DEFAULT_MENU_WIDTH - 30, translationConstants.HelpMenuItemNames(),new ApplicationMenuClickHandler());\n\t return applicationMenu;\n\t}", "public static com.ifl.rapid.customer.model.ApplyTrnApplicationForm create(\n\t\tjava.lang.String ApplicationFormId) {\n\t\treturn getPersistence().create(ApplicationFormId);\n\t}", "public Application() {\n\t\ttitle();\n\t}", "PasswordApplicationEntity createApplication(String name, String url);", "public Application() {\n\t\tsuper(1);\n\t}", "private void createWidget(final ApplicationForm form) {\n\n\t\tfinal CustomButton button = TabMenu.getPredefinedButton(ButtonType.SETTINGS, ButtonTranslation.INSTANCE.changeAppFormSettings());\n\n\t\tif (form != null) {\n\n\t\t\tboolean groupForm = form.getGroup() != null;\n\n\t\t\t// create click handler\n\t\t\tClickHandler ch = new ClickHandler(){\n\t\t\t\tpublic void onClick(ClickEvent event) {\n\n\t\t\t\t\t// layout\n\t\t\t\t\tFlexTable ft = new FlexTable();\n\t\t\t\t\tft.setCellSpacing(10);\n\n\t\t\t\t\tft.setHTML(0, 0, \"<strong>INITIAL: </strong>\");\n\t\t\t\t\tft.setHTML(1, 0, \"<strong>EXTENSION: </strong>\");\n\t\t\t\t\tif (groupForm && hasEmbeddedGroupApplication) {\n\t\t\t\t\t\tft.setHTML(2, 0, \"<strong>EMBEDDED: </strong>\");\n\t\t\t\t\t\tft.setHTML(3, 0, \"<strong>Module name: </strong>\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tft.setHTML(2, 0, \"<strong>Module name: </strong>\");\n\t\t\t\t\t}\n\n\n\t\t\t\t\t// widgets\n\t\t\t\t\tfinal ListBox lbInit = new ListBox();\n\t\t\t\t\tfinal ListBox lbExt = new ListBox();\n\t\t\t\t\tfinal ListBox lbEmbed = new ListBox();\n\t\t\t\t\tfinal TextBox className = new TextBox();\n\n\t\t\t\t\tlbInit.addItem(\"Automatic\", \"true\");\n\t\t\t\t\tlbInit.addItem(\"Manual\", \"false\");\n\t\t\t\t\tlbExt.addItem(\"Automatic\", \"true\");\n\t\t\t\t\tlbExt.addItem(\"Manual\", \"false\");\n\n\t\t\t\t\tif (form.getAutomaticApproval()==true) {\n\t\t\t\t\t\tlbInit.setSelectedIndex(0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlbInit.setSelectedIndex(1);\n\t\t\t\t\t}\n\t\t\t\t\tif (form.getAutomaticApprovalExtension()==true) {\n\t\t\t\t\t\tlbExt.setSelectedIndex(0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlbExt.setSelectedIndex(1);\n\t\t\t\t\t}\n\t\t\t\t\tclassName.setText(form.getModuleClassName());\n\n\t\t\t\t\tft.setWidget(0, 1, lbInit);\n\t\t\t\t\tft.setWidget(1, 1, lbExt);\n\n\t\t\t\t\tif (groupForm && hasEmbeddedGroupApplication) {\n\t\t\t\t\t\tlbEmbed.addItem(\"Automatic\", \"true\");\n\t\t\t\t\t\tlbEmbed.addItem(\"Manual\", \"false\");\n\t\t\t\t\t\tif (form.getAutomaticApprovalEmbedded()==true) {\n\t\t\t\t\t\t\tlbEmbed.setSelectedIndex(0);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlbEmbed.setSelectedIndex(1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tft.setWidget(2, 1, lbEmbed);\n\t\t\t\t\t\tft.setWidget(3, 1, className);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tft.setWidget(2, 1, className);\n\t\t\t\t\t}\n\n\t\t\t\t\t// click on save\n\t\t\t\t\tClickHandler click = new ClickHandler(){\n\t\t\t\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\t\t\t\t// switch and send request\n\t\t\t\t\t\t\tUpdateForm request = new UpdateForm(new JsonCallbackEvents(){\n\t\t\t\t\t\t\t\tpublic void onFinished(JavaScriptObject jso) {\n\t\t\t\t\t\t\t\t\t// recreate same widget\n\t\t\t\t\t\t\t\t\tcontent.clear();\n\t\t\t\t\t\t\t\t\tApplicationForm newForm = jso.cast();\n\t\t\t\t\t\t\t\t\tcreateWidget(newForm);\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tform.setAutomaticApproval(Boolean.parseBoolean(lbInit.getValue(lbInit.getSelectedIndex())));\n\t\t\t\t\t\t\tform.setAutomaticApprovalExtension(Boolean.parseBoolean(lbExt.getValue(lbExt.getSelectedIndex())));\n\t\t\t\t\t\t\tif (groupForm && hasEmbeddedGroupApplication) {\n\t\t\t\t\t\t\t\tform.setAutomaticApprovalEmbedded(Boolean.parseBoolean(lbEmbed.getValue(lbEmbed.getSelectedIndex())));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tform.setModuleClassName(className.getText().trim());\n\t\t\t\t\t\t\trequest.updateForm(form);\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\n\t\t\t\t\tConfirm c = new Confirm(\"Change application form settings\", ft, click, true);\n\t\t\t\t\tc.show();\n\n\t\t\t\t}\n\t\t\t};\n\t\t\tbutton.addClickHandler(ch);\n\n\t\t\tString appStyle = \"<strong>Approval style: </strong>\";\n\t\t\tString module = \"</br><strong>Module name: </strong>\" + SafeHtmlUtils.fromString(form.getModuleClassName()).asString();\n\n\t\t\tif (form.getAutomaticApproval()==true) {\n\t\t\t\tappStyle = appStyle + \"<span style=\\\"color:red;\\\">Automatic</span> (INITIAL)\";\n\t\t\t} else {\n\t\t\t\tappStyle = appStyle + \"<span style=\\\"color:red;\\\">Manual</span> (INITIAL)\";\n\t\t\t}\n\t\t\tif (form.getAutomaticApprovalExtension()==true) {\n\t\t\t\tappStyle = appStyle + \" <span style=\\\"color:red;\\\">Automatic</span> (EXTENSION)\";\n\t\t\t} else {\n\t\t\t\tappStyle = appStyle + \" <span style=\\\"color:red;\\\">Manual</span> (EXTENSION)\";\n\t\t\t}\n\t\t\tif (groupForm && hasEmbeddedGroupApplication) {\n\t\t\t\tif (form.getAutomaticApprovalEmbedded()==true) {\n\t\t\t\t\tappStyle = appStyle + \" <span style=\\\"color:red;\\\">Automatic</span> (EMBEDDED)\";\n\t\t\t\t} else {\n\t\t\t\t\tappStyle = appStyle + \" <span style=\\\"color:red;\\\">Manual</span> (EMBEDDED)\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!groupForm && !session.isVoAdmin(form.getVo().getId())) button.setEnabled(false);\n\t\t\tif (groupForm && (!session.isGroupAdmin(form.getGroup().getId()) && !session.isVoAdmin(form.getVo().getId()))) button.setEnabled(false);\n\n\t\t\tcontent.setHTML(0, 0, appStyle + module);\n\n\t\t\tif (groupForm && hasEmbeddedGroupApplication) {\n\t\t\t\tCheckBox checkBox = new CheckBox(\"Allowed for embedded applications\");\n\t\t\t\tcheckBox.setValue(autoRegistrationEnabled);\n\n\t\t\t\tif (!session.isGroupAdmin(form.getGroup().getId())) checkBox.setEnabled(false);\n\n\t\t\t\tClickHandler clickCHB = new ClickHandler() {\n\t\t\t\t\tpublic void onClick(ClickEvent event) {\n\n\t\t\t\t\t\tArrayList<Group> list = new ArrayList<>();\n\t\t\t\t\t\tlist.add(group);\n\t\t\t\t\t\tif(((CheckBox) event.getSource()).getValue()) {\n\t\t\t\t\t\t\tAddGroupsToAutoRegistration request = new AddGroupsToAutoRegistration(JsonCallbackEvents.disableCheckboxEvents(checkBox));\n\t\t\t\t\t\t\trequest.setAutoRegGroups(list, null, null);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tRemoveGroupsFromAutoRegistration request = new RemoveGroupsFromAutoRegistration(JsonCallbackEvents.disableCheckboxEvents(checkBox));\n\t\t\t\t\t\t\trequest.deleteGroups(list, null, null);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tcheckBox.addClickHandler(clickCHB);\n\t\t\t\tcontent.setWidget(1,0, checkBox);\n\t\t\t}\n\t\t\tcontent.setWidget(0, 1, button);\n\t\t\tcontent.getFlexCellFormatter().setRowSpan(0, 1, 2);\n\t\t\tcontent.getFlexCellFormatter().getElement(0, 0).setAttribute(\"style\", \"padding-right: 10px\");\n\n\t\t} else {\n\n\t\t\tbutton.setEnabled(false);\n\t\t\tString appStyle = \"<strong>Approval style: </strong> Form doesn't exists.\";\n\t\t\tString module = \"</br><strong>Module name: </strong> Form doesn't exists.\";\n\n\t\t\tcontent.setHTML(0, 0, appStyle + module);\n\t\t\tcontent.setWidget(0, 1, button);\n\t\t\tcontent.getFlexCellFormatter().getElement(0, 0).setAttribute(\"style\", \"padding-right: 10px\");\n\n\t\t}\n\n\t}", "private static void createApplication(Client client){\n SamlApplication samlApplication = client.instantiate(SamlApplication.class)\n // samlApplication.setSettings();\n\n .setSettings(client.instantiate(SamlApplicationSettings.class)\n .setSignOn(client.instantiate(SamlApplicationSettingsSignOn.class)\n .setDefaultRelayState(\"\")\n .setSsoAcsUrl(\"http://testorgone.okta\")\n .setIdpIssuer(\"http://www.okta.com/${org.externalKey}\")\n .setAudience(\"asdqwe123\")\n .setRecipient(\"http://testorgone.okta\")\n .setDestination(\"http://testorgone.okta\")\n .setSubjectNameIdTemplate(\"${user.userName}\")\n .setSubjectNameIdFormat(\"urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified\")\n .setResponseSigned(true)\n .setAssertionSigned(true)\n .setSignatureAlgorithm(\"RSA_SHA256\")\n .setDigestAlgorithm(\"SHA256\")\n .setHonorForceAuthn(true)\n .setAuthnContextClassRef(\"urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport\")\n .setSpIssuer(null)\n .setRequestCompressed(false)));\n\n // .setHide(client.instantiate(ApplicationVisibility.class)\n samlApplication.setVisibility(client.instantiate(ApplicationVisibility.class)\n .setAutoSubmitToolbar(Boolean.FALSE));\n samlApplication.setLabel(\"API Application\");\n\n //Create Application and use ResourceException to view causes \n try {\n client.createApplication(samlApplication);\n } catch (ResourceException e) {\n System.out.println(\"error\");\n System.out.println(e.getCauses());\n }\n\n System.out.println(samlApplication);\n }", "@Test\n public void createApplicationUsingPostTest() throws ApiException {\n Application application = null;\n Application response = api.createApplicationUsingPost(application);\n\n // TODO: test validations\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
rotate left through carry flag
public void visit(Instr.ROR i);
[ "public void rotateLeft()\r\n\t{\r\n\r\n\t}", "public static long rotateLeft(long paramLong, int paramInt) {\n/* 1500 */ return paramLong << paramInt | paramLong >>> -paramInt;\n/* */ }", "public void turnLeft ()\n {\n rotate(-Math.PI / 16);\n }", "static long rot90Shift(long a) {\r\n long b=0; \r\n int rMax = 0;\r\n for (int r = 0; r < L; r++)\r\n for (int c = 0; c < L; c++)\r\n if (get(a, r, c))\r\n rMax = r;\r\n for (int r = 0; r <= rMax; r++)\r\n for (int c = 0; c < L; c++) \r\n if (get(a, r, c))\r\n b = set(b, c, rMax-r);\r\n return b;\r\n }", "public void rotateCounterClockwise() {\n if (maxOrientation == 1) {\n return;\n } else {\n setRotation((orientation + 3) % 4);\n }\n }", "public void leftRotation();", "private void ROL_A() {\n\n int R = R_A; //grab byte\n R <<= 1; //shift left\n\n //old Carry into new first bit\n R |= flagSet( F_CARRY ) ? 0x01 : 0x00;\n //old 8th bit into new Carry\n setFlag( F_CARRY, ( R & 0x100 ) == 0x100 );\n R &= MASK_8;\n\n setFlag( F_NEG, isNegative8( R ) );\n setFlag( F_ZERO, R == 0 );\n\n R_A = R;\n }", "public boolean rotateCounterClockwise() {\n\t\tboolean[][] temp = new boolean[BLOCK_WIDTH][BLOCK_WIDTH];\n\t\tfor (int i = 0; i < BLOCK_WIDTH; ++i) {\n\t\t\tfor (int j = 0; j < BLOCK_WIDTH; ++j) {\n\t\t\t\ttemp[i][j] = block[BLOCK_WIDTH - 1 - j][i];\n\t\t\t}\n\t\t}\n\t\treturn checkRotate(temp);\n\t}", "public byte rotate(int dir) {\r\n\t\t\treturn (byte)(dir >= 0 ? dir % 4 : 4 + dir % 4);\r\n\t\t}", "public void rotateLeft() {\n\t\tr -= Math.min(Math.max((Math.abs(speed) / 1.5 + rotateSpeed),\n\t\t\t\tminRotateSpeed), maxRotateSpeed);\n\t}", "public void left() { this.angle -= TURN_AMOUNT; }", "private int rol(int num, int cnt)\n {\n return (num << cnt) | (num >>> (32 - cnt));\n }", "public static void rotasjonLeft(char[] a) {\n\n if(a.length<2){}\n else if(a.length==2){\n char temp = a[0];\n a[0] = a[1];\n a[1] = temp;\n }\n else{\n char siste = a[0];\n\n for(int i = 0; i<a.length-1; i++ ){\n a[i+1]= a[i];\n }\n\n a[a.length] = siste;\n }\n }", "public Corner rotateCounterClockwise() {\n Corner answer = new Corner(target, (orientation + 2) % 3);\n return answer;\n }", "private Node rotateLeft(Node t) {\n assert isRed(t.right);\n Node x = t.right;\n t.right = x.left;\n x.left = t;\n x.color = t.color;\n t.color = RED;\n return x;\n }", "public void rotateRight()\r\n\t{\r\n\r\n\t}", "public void rotateClockWise(){curTile.rotateCW();}", "void turnLeft() \n\t {\n\t if (angle > 0 && angle < 180) \n\t {\n\t \tangle += 1;\n\t }\n\t else {\n\t \tangle += 1;\n\t }\n\n\t }", "public void turnLeft()\r\n {\r\n direction -= 90;\r\n\r\n if (direction < 0)\r\n {\r\n direction = 270;\r\n }\r\n }", "public void rotateNextRotor() {\r\n\t\tif (currentSlot == 0 || currentSlot == 1) {\r\n\t\t\tadjacentRotor.rotate();\r\n\t\t} \r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a new object of class 'Chaining Constraint'.
ChainingConstraint createChainingConstraint();
[ "Object createConstraint();", "public chain() {\n\t\tsuper();\n\t}", "public Constraint() {\r\n }", "ConstraintNat createConstraintNat();", "public Or(Constraint constraint1, Constraint constraint2){\n this.constraint1 = constraint1;\n this.constraint2 = constraint2;\n }", "SemanticConstraintDeclaration createSemanticConstraintDeclaration();", "public interface Constraint {\n\t/**\n\t * Return maximal production in step t+1 given step t\n\t * @return\n\t */\n\tdouble maximize();\n\t\n\t/**\n\t * Return minimal production in step t+1 given step t\n\t * @return\n\t */\n\tdouble minimize();\n\t\n\t/**\n\t * Return maximal on/off state in step t+1 given step t\n\t * @return\n\t */\n\tboolean maximizeBool();\n\t\n\t/**\n\t * Return minimal on/off state in step t+1 given step t\n\t * @return\n\t */\n\tboolean minimizeBool();\n\t\n\t/**\n\t * Denote whether this constraint is a soft constraint\n\t * @return\n\t */\n\tvoid setSoft(boolean soft);\n\t\n\t/**\n\t * Return whether this constraint is a soft constraint\n\t * @return\n\t */\n\tboolean isSoft();\n\t\n\t/**\n\t * Returns the assigned weight for this soft constraint \n\t * @return\n\t */\n\tint getWeight();\n\n\t/**\n\t * Make sure weight is also set for a soft constraint using constraint relationships\n\t * @param weight\n\t */\n\tvoid setWeight(int weight);\n\t\n\n\t/**\n\t * Returns the unique identifier\n\t * @return\n\t */\n\tString getIdent();\n}", "public ConstraintBuilder createConstraintBuilder(String type) {\n switch(type) {\n case \"WheelConstraintBuilder\":\n return world.createWheelConstraintBuilder();\n case \"RevoluteConstraintBuilder\":\n return world.createRevoluteConstraintBuilder();\n case \"PointConstraintBuilder\":\n return world.createPointConstraintBuilder();\n default:\n break;\n }\n return null;\n }", "public Constraint() {\n hasConstraints = false;\n }", "MandatoryRule createMandatoryRule();", "NumNatConstraint createNumNatConstraint();", "public Constrainer getConstrainer();", "axelar.nexus.exported.v1beta1.Types.ChainOrBuilder getChainOrBuilder();", "private ConstraintPackage() {}", "@Override\r\n\tpublic ExternalDomainConstraint addConstraint() {\n\t\tgetConstraint();\r\n\t\torg.eclipse.emf.ecore.EObject newConcept = ZDLUtil.createZDLConcept(\r\n\t\t\t\telement, \"ZDL::Constructs::DomainBlock\", \"constraint\",\r\n\t\t\t\t\"ZDL::Validation::ExternalDomainConstraint\");\r\n\t\tExternalDomainConstraint element = ZDLFactoryRegistry.INSTANCE.create(\r\n\t\t\t\t(org.eclipse.emf.ecore.EObject) newConcept,\r\n\t\t\t\tExternalDomainConstraint.class);\r\n\t\tif (_constraint != null) {\r\n\t\t\t_constraint.add(element);\r\n\t\t}\r\n\t\treturn element;\r\n\t}", "private com.google.protobuf.SingleFieldBuilderV3<\n axelar.nexus.exported.v1beta1.Types.Chain, axelar.nexus.exported.v1beta1.Types.Chain.Builder, axelar.nexus.exported.v1beta1.Types.ChainOrBuilder> \n getChainFieldBuilder() {\n if (chainBuilder_ == null) {\n chainBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n axelar.nexus.exported.v1beta1.Types.Chain, axelar.nexus.exported.v1beta1.Types.Chain.Builder, axelar.nexus.exported.v1beta1.Types.ChainOrBuilder>(\n getChain(),\n getParentForChildren(),\n isClean());\n chain_ = null;\n }\n return chainBuilder_;\n }", "public LDAPConstraints duplicate()\n {\n final LDAPConstraints c = new LDAPConstraints();\n\n c.bindProc = bindProc;\n c.clientControls = clientControls;\n c.followReferrals = followReferrals;\n c.hopLimit = hopLimit;\n c.rebindProc = rebindProc;\n c.serverControls = serverControls;\n c.timeLimit = timeLimit;\n\n return c;\n }", "public interface ConstraintFacade\n extends ModelElementFacade\n{\n /**\n * Indicates the metafacade type (used for metafacade mappings).\n *\n * @return boolean always <code>true</code>\n */\n public boolean isConstraintFacadeMetaType();\n\n /**\n * Gets the 'body' or text of this constraint.\n * @return String\n */\n public String getBody();\n\n /**\n * Gets the model element to which the constraint applies (i.e. is the context of).\n * @return ModelElementFacade\n */\n public ModelElementFacade getContextElement();\n\n /**\n * This constraint's translation for the argument languange.\n * @param language String\n * @return String\n */\n public String getTranslation(String language);\n\n /**\n * True if this constraint denotes a body expression.\n * For example:\n * <pre>\n * context CustomerCard:getTransaction(from:Date, until:Date)\n * body: transactions->select(date.isAfter(from) and date.isBefore(until))\n * </pre>\n * False otherwise.\n * @return boolean\n */\n public boolean isBodyExpression();\n\n /**\n * True if this constraint denotes a definition.\n * For example:\n * <pre>\n * context CustomerCard\n * def: getTotalPoints(d: date) : Integer = transaction->select(date.isAfter(d)).points->sum()\n * </pre>\n * False otherwise.\n * @return boolean\n */\n public boolean isDefinition();\n\n /**\n * True if this constraint denotes an invariant.\n * For example:\n * <pre>\n * context LivingAnimal\n * inv: alive = true\n * </pre>\n * False otherwise.\n * @return boolean\n */\n public boolean isInvariant();\n\n /**\n * True if this constraint denotes a postcondition.\n * For example:\n * <pre>\n * context LivingAnimal::getNumberOfLegs()\n * post: numberOfLegs >= 0\n * </pre>\n * False otherwise.\n * @return boolean\n */\n public boolean isPostCondition();\n\n /**\n * True if this constraint denotes a precondition.\n * For example:\n * <pre>\n * context LivingAnimal::canFly()\n * pre: hasWings = true\n * </pre>\n * False otherwise.\n * @return boolean\n */\n public boolean isPreCondition();\n}", "public Constraint getConstraint2() {\n\t\treturn null;\n\t}", "public KeywordChainingTransformation() {\n\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Provide a suitable constructor (depends on the kind of dataset)
public RecipesAdapter(Context con,RealmResults<recipe> myDataset) { this.con = con; this.mDataset = myDataset; this.dDataset= new RealmList<>(); realm = Realm.getDefaultInstance(); this.LoadMore(); }
[ "public DataSet() {\n }", "@SuppressWarnings(\"unused\")\n\tprivate DefaultCategoryDataset createDataset() \n\t{\n\t\tDefaultCategoryDataset dataset = new DefaultCategoryDataset();\n\t\tdataset.addValue(1.0, \"Row 1\", \"Column 1\");\n\t\t// dataset.addValue(5.0, \"Row 1\", \"Column 2\");\n\t\t// dataset.addValue(3.0, \"Row 1\", \"Column 3\");\n\t\tdataset.addValue(2.0, \"Row 2\", \"Column 1\");\n\t\t// dataset.addValue(3.0, \"Row 2\", \"Column 2\");\n\t\t// dataset.addValue(2.0, \"Row 2\", \"Column 3\");\n\t\treturn dataset;\n\t}", "T dataset(DataSet dataSet);", "private CategoryDataset createDataset() {\n \tDefaultCategoryDataset dataset = new DefaultCategoryDataset();\n dataset.setValue(10, \"X\", \"A\");\n dataset.setValue(8, \"X\", \"B\");\n dataset.setValue(6, \"X\", \"C\");\n dataset.setValue(12, \"X\", \"D\");\n dataset.setValue(9, \"X\", \"E\");\n dataset.setValue(11, \"X\", \"F\");\n dataset.setValue(3, \"X\", \"G\");\n \n \t\n \t\n \treturn dataset;\n \t\n \t//dataset.s\n \t\n //return dataset;\n }", "public static CategoryDataset createDataset() {\r\n DefaultCategoryDataset categoryDataset = new DefaultCategoryDataset();\r\n\r\n categoryDataset.addValue(52.83, \"Germany\", \"Western EU\");\r\n categoryDataset.addValue(20.83, \"France\", \"Western EU\");\r\n categoryDataset.addValue(10.83, \"Great Britain\", \"Western EU\");\r\n categoryDataset.addValue(7.33, \"Netherlands\", \"Western EU\");\r\n categoryDataset.addValue(4.66, \"Belgium\", \"Western EU\");\r\n categoryDataset.addValue(57.14, \"Spain\", \"Southern EU\");\r\n categoryDataset.addValue(14.28, \"Greece\", \"Southern EU\");\r\n categoryDataset.addValue(14.28, \"Italy\", \"Southern EU\");\r\n categoryDataset.addValue(14.28, \"Portugal\", \"Southern EU\");\r\n categoryDataset.addValue(100.0, \"Czech Republic\", \"Eastern EU\");\r\n categoryDataset.addValue(66.66, \"Denmark\", \"Scandinavia\");\r\n categoryDataset.addValue(33.33, \"Finland\", \"Scandinavia\");\r\n categoryDataset.addValue(0, \"\", \"Africa\");\r\n categoryDataset.addValue(100.0, \"Israel\", \"Asia\");\r\n\r\n return categoryDataset;\r\n }", "public static Dataset createDataset() { return connectDataset(Location.mem()) ; }", "public DataConvert() {\n }", "public XYDatasetDesignInfo()\n {\n super(XYDataset.class);\n }", "public abstract T constructor();", "private static PieDataset createDataset() {\r\n DefaultPieDataset dataset = new DefaultPieDataset();\r\n dataset.setValue(\"One\", 43.2);\r\n dataset.setValue(\"Two\", 10.0);\r\n dataset.setValue(\"Three\", 27.5);\r\n dataset.setValue(\"Four\", 17.5);\r\n dataset.setValue(\"Five\", 11.0);\r\n dataset.setValue(\"Six\", 19.4);\r\n return dataset;\r\n }", "Dataset createDataset (Template t, DataSet ds, GraphPair p) throws InvalidParametersException;", "public myDataset(String nameFile, int newkind) throws CheckException {\r\n Attribute at;\r\n String nameat;\r\n double min, max;\r\n ArrayList<String> nomValues;\r\n StringTokenizer tokens;\r\n Instance temp;\r\n boolean[] nulls;\r\n InstanceSet IS;\r\n\r\n kind = newkind;\r\n IS = new InstanceSet();\r\n\r\n // Read of data file\r\n try {\r\n if (newkind == 3) {\r\n IS.readSet(nameFile, false);\r\n } else {\r\n IS.readSet(nameFile, true);\r\n }\r\n } catch (Exception e) {\r\n System.err.println(e);\r\n System.exit(1);\r\n }\r\n\r\n // Check if dataset corresponding with a classification problem\r\n if (Attributes.getOutputNumAttributes() < 1) {\r\n throw new CheckException (\"This dataset doesn't have any outputs, so it doesn't belong to a classification problem\");\r\n } else if (Attributes.getOutputNumAttributes() > 1) {\r\n throw new CheckException(\"This dataset has more than one output\");\r\n }\r\n\r\n if (Attributes.getOutputAttribute(0).getType() == Attribute.REAL) {\r\n throw new CheckException(\"This dataset has an output attribute with float values, so it doesn't belong to a classification problem\");\r\n }\r\n\r\n // Get the name, number of attributes and number of instances of the dataset\r\n name = new String (Attributes.getRelationName());\r\n numAtr = Attributes.getInputNumAttributes();\r\n numIns = IS.getNumInstances();\r\n\r\n // Create vectors to hold information\r\n attributes = new ArrayList<myAttribute>(numAtr);\r\n\r\n // Store attribute inputs\r\n for (int j = 0; j < numAtr; j++) {\r\n at = Attributes.getInputAttribute(j);\r\n nameat = new String (at.getName());\r\n\r\n // Check if it is real or integer\r\n if ((at.getType() == 1) || (at.getType() == 2)) {\r\n // Create continuous attribute\r\n min = (double) at.getMinAttribute();\r\n max = (double) at.getMaxAttribute();\r\n attributes.add(new myAttribute(nameat, at.getType(), min, max, true));\r\n } else {\r\n // Create nominal attribute\r\n myAttribute aux;\r\n int numNominal = at.getNumNominalValues();\r\n\r\n nomValues = new ArrayList<String>(numNominal);\r\n for (int k = 0; k < numNominal; k++) {\r\n nomValues.add(at.getNominalValue(k));\r\n }\r\n\r\n aux = new myAttribute(nameat, 3, true);\r\n aux.setValues(nomValues);\r\n attributes.add(aux);\r\n }\r\n\r\n } // for\r\n\r\n // Copy the data\r\n tokens = new StringTokenizer(IS.getHeader(), \" \\n\\r\");\r\n tokens.nextToken();\r\n tokens.nextToken();\r\n \r\n // Get space for the instances\r\n data = new double[IS.getNumInstances()][numAtr];\r\n output = new int[IS.getNumInstances()];\r\n\r\n for (int i = 0; i < IS.getNumInstances(); i++) {\r\n // Store the values of the instances in the corresponding data structures \t\r\n temp = IS.getInstance(i);\r\n data[i] = temp.getAllInputValues();\r\n output[i] = (int) temp.getOutputRealValues(0);\r\n nulls = temp.getInputMissingValues();\r\n\r\n // Clean missing values\r\n for (int j = 0; j < nulls.length; j++) {\r\n if (nulls[j]) {\r\n data[i][j] = 0.0;\r\n }\r\n }\r\n }\r\n\r\n // Store output attributes\r\n at = Attributes.getOutputAttribute(0);\r\n nameat = new String (at.getName());\r\n\r\n // Check if it is real\r\n if ((at.getType() == 1) || (at.getType() == 2)) {\r\n // Create continuous attribute\r\n min = (double) at.getMinAttribute();\r\n max = (double) at.getMaxAttribute();\r\n outputAttribute = new myAttribute(nameat, at.getType(), min, max, false);\r\n } else { \r\n // Create nominal attribute\r\n myAttribute aux;\r\n int numNominal = at.getNumNominalValues();\r\n\r\n nomValues = new ArrayList<String>(numNominal);\r\n for (int k = 0; k < numNominal; k++) {\r\n nomValues.add(at.getNominalValue(k));\r\n }\r\n\r\n aux = new myAttribute(nameat, 3, false);\r\n aux.setValues(nomValues);\r\n outputAttribute = aux;\r\n }\r\n\r\n // Get the number of classes\r\n numClasses = Attributes.getOutputAttribute(0).getNumNominalValues();\r\n\r\n // And the number of instances on each class\r\n nInstances = new int[numClasses];\r\n for (int i = 0; i < numClasses; i++) {\r\n nInstances[i] = 0;\r\n }\r\n for (int i = 0; i < output.length; i++) {\r\n nInstances[output[i]]++;\r\n }\r\n \r\n IS.setAttributesAsNonStatic();\r\n \r\n if (kind == 3) {\r\n Attributes.clearAll();\r\n }\r\n }", "private QueryDataSet constructDataSet(List<AggreResultData> aggreResultDataList)\n throws IOException {\n List<TSDataType> dataTypes = new ArrayList<>();\n List<IPointReader> resultDataPointReaders = new ArrayList<>();\n for (AggreResultData resultData : aggreResultDataList) {\n dataTypes.add(resultData.getDataType());\n resultDataPointReaders.add(new AggreResultDataPointReader(resultData));\n }\n return new OldEngineDataSetWithoutValueFilter(selectedSeries, dataTypes,\n resultDataPointReaders);\n }", "protected Factory(final AttributeDatatype<AV> datatype)\n\t\t{\n\t\t\tsuper(datatype);\n\t\t}", "public NEMADataset(int id){\n this.id = id;\n }", "public Data() {\r\n\t\r\n}", "private <T extends IDataType> Constructor<? extends T> getConstructor(String className) throws ClassNotFoundException {\n String pkgName = \"edu.brown.cs.student.main.DataTypes.\";\n Class<?> tClass = Class.forName(pkgName+className);\n for (Constructor<?> cxtor : tClass.getConstructors()) {\n return (Constructor<? extends T>) cxtor;\n }\n return null;\n }", "public AbstractData createInstance(int index)\n {\n\tswitch (index) {\n\t case 0:\n\t\treturn BOOLEXT.isFalse;\n\t case 1:\n\t\treturn new ClimateTimer();\n\t case 2:\n\t\treturn new ClimateTimer();\n\t case 3:\n\t\treturn ClimateOperatingStatus.off;\n\t case 4:\n\t\treturn new INTEGER();\n\t case 5:\n\t\treturn new INTEGER();\n\t default:\n\t\tthrow new InternalError(\"AbstractCollection.createInstance()\");\n\t}\n\t\n }", "public DataArray create();", "public DataSet() {\n labels = new HashMap<>();\n locations = new HashMap<>();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If dots should be drawn or not
public void setShowPoint(boolean showPoint) { this.showPoint = showPoint; }
[ "private void paintDotsInQuestion() {\n graphicsContextQuestion = theView.getQuestionCanvas().getGraphicsContext2D();\n \tgraphicsContextQuestion.setFill(dotsColorOne);\n \tgraphicsContextQuestion.fillOval(300, 80.0, 50.0, 50.0);\n \tgraphicsContextQuestion.setFill(dotsColorTwo);\n \tgraphicsContextQuestion.fillOval(650, 80.0, 50.0, 50.0);\n }", "@FXML\r\n private void dotsOnly(){\r\n GraphicsContext gc = canvas.getGraphicsContext2D();\r\n gc.clearRect(0, 0, canvas.getWidth(), canvas.getHeight());\r\n Picture.drawDots(canvas);\r\n }", "private boolean checkDotLimits(int tempPosX, int tempPosY, int dotRadius) {\n\t\tif (tempPosX < dotRadius * 1.5)\n\t\t\treturn true;\n\t\telse if (tempPosY < dotRadius * 1.5)\n\t\t\treturn true;\n\t\telse if (tempPosX > (width - dotRadius * 1.5))\n\t\t\treturn true;\n\t\telse if (tempPosY > (height - dotRadius * 1.5))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public void drawDots(Graphics g)\n {\n if (MODE_EDIT == mode && -1 != selectedIndex && myDots.size()>selectedIndex)\n {\n g.setColor(Color.green);\n // TODO - #? draw a highlight circle around the dot at \"selectedIndex\" in myDots.\n\n }\n\n\n g.setColor(Color.black);\n g.setFont(dotFont);\n // TODO #3 - loop through all the dots in myDots. For each\n // dot...\n // if this is the first dot or if its X is negative, draw a hollow dot of DOT_RADIUS, centered on its (-X,Y).\n // if its X is non-negative, draw a solid dot of DOT_RADIUS, centered on its (X,Y).\n // Also, for each dot, drawString for (i+1) so that it is NUMBER_RADIUS away from the (±X,Y),\n // at this dot's radius. Here's (partial) code for this part:\n //double angle = dot.getAngle();\n //g.drawString(\"\"+(<the number to draw>),\n // (int)(<The dot's X>+NUMBER_RADIUS*Math.cos(angle)-g.getFontMetrics().stringWidth(\"\"+(i+1))/2),\n // (int)(<The dot's Y>+NUMBER_RADIUS*Math.sin(angle)+DOT_FONT_SIZE/2));\n\n\n if (tempDot != null)\n {\n // TODO - #3.5 The \"tempDot\" is the dot that is in the process of being added.\n // (A non-null tempDot means the user is in \"MODE_ADD\" and dragging the dot around.)\n // Draw this one, too, following the rules for to do #3.\n\n\n }\n }", "public boolean isDotted()\r\n/* 93: */ {\r\n/* 94:103 */ if (this.sourcePort != null) {\r\n/* 95:104 */ if ((this.sourcePort.getSourceName() == \"output\") || (this.sourcePort.getSourceName() == \"up\"))\r\n/* 96: */ {\r\n/* 97:105 */ if (this.source.getSwitchState() == ViewerBox.OFF_SWITCH) {\r\n/* 98:106 */ return true;\r\n/* 99: */ }\r\n/* 100: */ }\r\n/* 101:109 */ else if ((this.sourcePort.getSourceName() == \"down\") && \r\n/* 102:110 */ (this.source.getSwitchState() == ViewerBox.ON_SWITCH)) {\r\n/* 103:111 */ return true;\r\n/* 104: */ }\r\n/* 105: */ }\r\n/* 106:115 */ return false;\r\n/* 107: */ }", "public void drawDots(Canvas canvas) {\r\n for (int i = 0; i < emptyList.size(); i++) {\r\n canvas.getGraphicsContext2D().fillOval(emptyList.get(i).getHorizontalPosition() * ENLARGEMENT_FACTOR -\r\n DOT_OFF_SET_FACTOR, (1 - emptyList.get(i).getVerticalPoisttion()) *\r\n ENLARGEMENT_FACTOR - DOT_OFF_SET_FACTOR, 10, 10);\r\n }\r\n }", "protected void drawDot(Dot dot){\n double locationX = (dot.getX() * canvas.getWidth() / presenter.getModel().getCOLUMNS());\n double locationY = (dot.getY() * canvas.getWidth() / presenter.getModel().getROWS() );\n\n final GraphicsContext gc = this.canvas.getGraphicsContext2D();\n\n Color color;\n switch (dot.getColour()){\n case RED: gc.setFill(Color.RED);\n break;\n\n case GREEN: gc.setFill(Color.GREEN);\n break;\n\n case YELLOW: gc.setFill(Color.YELLOW);\n break;\n\n case BLUE: gc.setFill(Color.BLUE);\n break;\n\n case ORANGE: gc.setFill(Color.ORANGE);\n break;\n\n case PINK: gc.setFill(Color.PINK);\n break;\n\n case CYAN: gc.setFill(Color.CYAN);\n break;\n\n case DARKBROWN: gc.setFill(Color.BROWN);\n break;\n\n case LILAC: gc.setFill(Color.MEDIUMPURPLE);\n break;\n }\n gc.fillOval(locationX ,locationY,150,150);\n setCenter(canvas);\n }", "public boolean isDrawn() {\n return opacity > 0;\n }", "@Override\n\tpublic boolean isDrawing() {\n\t\treturn false;\n\t}", "public boolean gridLinesAreVisible()\n {\n return gridLineWidth > 0;\n }", "@Override\r\n public void actionPerformed(ActionEvent e) {\n allLines.clear();\r\n for(int i=0; i<dots.length; i++){\r\n int x = (int) dots[i][3]; /* System.out.println(x); */\r\n int y = (int) dots[i][4];\r\n int recWidth = 100;\r\n Rectangle rec = new Rectangle(x-recWidth/2,y-recWidth/2,recWidth,recWidth);\r\n if(rec.contains(dots[i][5], dots[i][6])){\r\n Random rng = new Random();\r\n dots[i][3] = rng.nextInt((int)(this.width-dots[i][2]));\r\n dots[i][0] = dots[i][5];\r\n \r\n dots[i][4] = rng.nextInt((int)(this.height-dots[i][2]));\r\n dots[i][1] = dots[i][6];\r\n } else {\r\n int sign = 0;\r\n /* if(dots[i][3]-dots[i][0]<0) sign=-1;\r\n else sign=1;\r\n dots[i][5]+=sign;\r\n\r\n if(dots[i][4]-dots[i][1]<0) sign=-1;\r\n else sign=1;\r\n dots[i][6]+=sign; */\r\n dots[i][5] += (dots[i][3]-dots[i][5])/this.width;\r\n dots[i][6] += (dots[i][4]-dots[i][6])/this.height;\r\n }\r\n\r\n x=(int) dots[i][5];\r\n y=(int) dots[i][6];\r\n int counter = 0;\r\n int areaWidth = lineLength; \r\n Rectangle lineRectangle = new Rectangle(x-areaWidth/2,y-areaWidth/2,areaWidth,areaWidth);\r\n for(int j=0; j<dots.length; j++){\r\n if(j==i) continue;\r\n if(lineRectangle.contains(dots[j][5],dots[j][6])){\r\n double[] currentLine = {dots[i][5]+dots[i][2]/2, dots[i][6]+dots[i][2]/2, dots[j][5]+dots[j][2]/2, dots[j][6]+dots[j][2]/2};\r\n allLines.add(currentLine);\r\n counter++;\r\n }\r\n //if(counter>=2) break;\r\n }\r\n }\r\n repaint();\r\n }", "public boolean isPointDecoration() {\r\n return false;\r\n }", "public boolean isDrawingLines() \n\t{\n\t\treturn this.drawLines;\n\t}", "private void initNonRectangleDottedBorders() {\n\t\tGraphics2D g = null;\n\n\t\tfor (EdgeCluster edgeCluster : getEdgeClusters()) {\n\t\t\tif (edgeCluster.style == CssBorderStyleValue.Value.DOTTED) {\n\t\t\t\tBasicStroke stroke = new BasicStroke(\n\t\t\t\t\t\t(float) (2 * edgeCluster.width), BasicStroke.CAP_BUTT,\n\t\t\t\t\t\tBasicStroke.JOIN_ROUND, 10.0f,\n\t\t\t\t\t\tnew float[] { (float) edgeCluster.width,\n\t\t\t\t\t\t\t\t(float) edgeCluster.width },\n\t\t\t\t\t\t0.0f);\n\n\t\t\t\tif (g == null) {\n\t\t\t\t\tif (operations == null)\n\t\t\t\t\t\toperations = new LinkedList<>();\n\t\t\t\t\tg = new VectorGraphics2D(new Graphics2DContext(),\n\t\t\t\t\t\t\toperations);\n\t\t\t\t\tg.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\n\t\t\t\t\t\t\tRenderingHints.VALUE_ANTIALIAS_ON);\n\t\t\t\t}\n\t\t\t\tg.setStroke(stroke);\n\t\t\t\tg.setColor(edgeCluster.color);\n\n\t\t\t\tArea area = new Area();\n\t\t\t\tarea.add(new Area(stroke.createStrokedShape(shape)));\n\t\t\t\tarea.intersect(getShapeArea());\n\t\t\t\tarea.intersect(new Area(createWedge(edgeCluster.edges\n\t\t\t\t\t\t.toArray(new Edge[edgeCluster.edges.size()]))));\n\n\t\t\t\t// now we convert the dashed outline into a series of dots\n\n\t\t\t\tfloat dotRadius = (float) (edgeCluster.width / 2);\n\t\t\t\tPathIterator pi = area.getPathIterator(null, 1);\n\t\t\t\tdouble[] coords = new double[6];\n\t\t\t\tRectangle2D dotBounds = null;\n\n\t\t\t\twhile (!pi.isDone()) {\n\t\t\t\t\tint k = pi.currentSegment(coords);\n\t\t\t\t\tif (k == PathIterator.SEG_MOVETO) {\n\t\t\t\t\t\tif (dotBounds != null) {\n\t\t\t\t\t\t\t// we do this contains(..) check because sometimes\n\t\t\t\t\t\t\t// we seem to get residue on the perimeter of the\n\t\t\t\t\t\t\t// shape that doesn't actually have a body. So make\n\t\t\t\t\t\t\t// sure we're actually our shape before we paint our\n\t\t\t\t\t\t\t// dot\n\t\t\t\t\t\t\tif (shape.contains(dotBounds.getCenterX() - .1,\n\t\t\t\t\t\t\t\t\tdotBounds.getCenterY() - .1, .2, .2)) {\n\t\t\t\t\t\t\t\tg.fill(new Ellipse2D.Double(\n\t\t\t\t\t\t\t\t\t\tdotBounds.getCenterX() - dotRadius,\n\t\t\t\t\t\t\t\t\t\tdotBounds.getCenterY() - dotRadius,\n\t\t\t\t\t\t\t\t\t\t2 * dotRadius, 2 * dotRadius));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdotBounds = new java.awt.geom.Rectangle2D.Double(\n\t\t\t\t\t\t\t\tcoords[0], coords[1], 0, 0);\n\t\t\t\t\t} else if (k == PathIterator.SEG_LINETO) {\n\t\t\t\t\t\tdotBounds.add(coords[0], coords[1]);\n\t\t\t\t\t}\n\t\t\t\t\tpi.next();\n\t\t\t\t}\n\n\t\t\t\tif (dotBounds != null) {\n\t\t\t\t\tif (shape.contains(dotBounds.getCenterX() - .1,\n\t\t\t\t\t\t\tdotBounds.getCenterY() - .1, .2, .2)) {\n\t\t\t\t\t\tg.fill(new Ellipse2D.Double(\n\t\t\t\t\t\t\t\tdotBounds.getCenterX() - dotRadius,\n\t\t\t\t\t\t\t\tdotBounds.getCenterY() - dotRadius,\n\t\t\t\t\t\t\t\t2 * dotRadius, 2 * dotRadius));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void drawDottedLine(Graphics g, int fromX, int fromY, int toX, int toY) {\n\t\tint dx = toX - fromX;\n\t\tint dy = toY - fromY;\n\t\tif(dx == 0 && dy == 0) {\n\t\t\treturn;\n\t\t}\n\t\tboolean swapped = false;\n\t\tif(Math.abs(dx) < Math.abs(dy)) {\n\t\t\tint temp = fromX; fromX = fromY; fromY = temp;\n\t\t\ttemp = toX; toX = toY; toY = temp;\n\t\t\ttemp = dy; dy = dx; dx = temp;\n\t\t\tswapped = true;\n\t\t}\n\t\tif(dx < 0) { // swap 'from' and 'to' \n\t\t\tint temp = fromX; fromX = toX; toX = temp;\n\t\t\ttemp = fromY; fromY = toY; toY = temp;\n\t\t\tdx = -dx; dy = -dy;\n\t\t}\n\t\tdouble delta = ((double) dy) / dx;\n\t\tboolean paint = true;\n\t\tfor(int i=0; i<= dx; i++) {\n\t\t\tint y = fromY + (int) (i * delta);\n\t\t\tif(paint) {\n\t\t\t\tif(swapped) {\n\t\t\t\t\tg.fillRect(y, i+fromX, 1, 1); // only a single dot\n\t\t\t\t} else {\n\t\t\t\t\tg.fillRect(i+fromX, y, 1, 1); // only a single dot\n\t\t\t\t}\n\t\t\t}\n\t\t\tpaint = !paint;\n\t\t}\n\t}", "private void selectDot(int position) {\r\n for (int i = 0; i < dots.length; i++) {\r\n if (i == position) {\r\n dots[i].setBackground(getResources().getDrawable(R.drawable.slider_navigator_active));\r\n } else\r\n dots[i].setBackground(getResources().getDrawable(R.drawable.slider_navigator));\r\n }\r\n }", "public void setDot(int pos)\n {\n persistentHighlight = false;\n super.setDot(pos);\n }", "private boolean dotIsValid() {\r\n\t\treturn durationDenom != SMALLESTNOTE;\r\n\t}", "private void initDots() {\n\t\tLinearLayout ll = (LinearLayout) findViewById(R.id.ll);\n\t\tdots = new ImageView[3];\n\t\t// 循环取得小点图片\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tdots[i] = (ImageView) ll.getChildAt(i);\n\t\t\tdots[i].setEnabled(true);// 都设为灰色\n\t\t\tdots[i].setOnClickListener(this);\n\t\t\tdots[i].setTag(i);// 设置位置tag,方便取出与当前位置对应\n\t\t}\n\n\t\tcurrentIndex = 0;\n\t\tdots[currentIndex].setEnabled(false);// 设置为白色,即选中状态\n\t}", "public boolean isNotDotColors() {\n \n return (color.getColor() != color.getColor().RED) && (color.getColor() != color.getColor().YELLOW) && (color.getColor() != color.getColor().GREEN);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional bool benched = 12;
public Builder clearBenched() { bitField0_ = (bitField0_ & ~0x00000800); benched_ = false; onChanged(); return this; }
[ "void mo1949b(boolean z);", "void mo67481b(boolean z);", "void mo59100a(boolean z);", "void mo33158a(boolean z);", "public void mo92808b(boolean z) {\n }", "void mo61746b(boolean z);", "void mo66492a(boolean z);", "public void mo91709b(boolean z) {\n }", "boolean mo41308b();", "void mo20834a(boolean z);", "void mo4380a(boolean z);", "public void mo2576a(boolean z) {\n }", "void mo62420c(boolean z);", "public void setBlokstunned(boolean b);", "public boolean b()\r\n/* 57: */ {\r\n/* 58:65 */ return false;\r\n/* 59: */ }", "public abstract void mo76473a(boolean z);", "abstract boolean mo3699b();", "public void mo3789a(boolean z) {\n }", "void mo2427a(boolean z);", "public boolean mo223b() {\n return false;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
break keyword break/exist the loop
public static void main(String[] args) { for (int I=0; I<10; I++) { if(I==7) { break; } System.out.println(I); } System.out.println("I am outside of the loop"); // continue - it will skip current iteration for (int i=1; i<=5; i++) { if (i==2) { continue; } System.out.println(i); System.out.println("*******************"); ////// Let's work on this at home ......????? // I want to print nums from 1 to 20 except 5, 6,,7 for (int a =1; a <=20; a++) { if (a == 5 || a == 6 || a ==7 ) { continue; } System.out.println(a); } } }
[ "void breakOngoingForLoop();", "boolean getBreakOngoingForLoop();", "public static void main(String[] args) {\n\t\tint[] numbers = {3,4,5,6,213,42,35,63,3};\n\t\tint length = numbers.length;\n\t\tboolean found = false;\n\t\n\there: //will terminate from here (the while loop) after using \"break here\"\n\t\twhile(true) {\n\t\t\tfor (int i = 0; i<10; i++) {\n\t\t\t\tSystem.out.println(\"i is equal to \"+i);\n\t\t\t\tif (i==5) {\n\t\t\t\t\tbreak here;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "public boolean continueLoop();", "void setBreakOngoingForLoop(boolean value);", "boolean hasIsBreak();", "public static void main(String[] args) {\n hello: for(int i = 0; i < 10 ; i++){\n if(i == 7){\n continue hello;\n }\n System.out.println(i);\n }\n\n num: for (int i = 1; i < 100; i++){\n if(i % 13 == 0){\n System.out.println(i);\n break num;\n }\n }\n\n\n\n\n\n\n\n }", "public boolean loop() {\n super.loop();\n return false;\n }", "boolean isLoop();", "protected void continueLoop() {\n jumpTo(beginLoop);\n }", "public static void main(String[] args) {\n myOuterLoop:\r\n\t for(int i =0; i <5; i++)\r\n\t\t myInnerLoop:\r\n for(int j =0; j <10; j ++){\r\n \r\n if(j== 5){\r\n continue myInnerLoop;}\r\n if (j==7) {\r\n \t break myOuterLoop;\r\n }\r\n System.out.println(j);\r\n }\r\n\r\n}", "int getIsBreak();", "public static void break_statement() {\n\t\tScanner s = new Scanner(System.in);\n\t\tString value = \"\";\n\t\tint i = 0;\n\t\twhile (i < 10) {\n\t\t\tSystem.out.println(\"enter a string\");\n\t\t\tvalue = s.next();\n\t\t\ti++;\n\t\t\tif (value.equals(\"exit\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println(\"value = \" + value);\n\t\t}\n\t}", "private boolean getBreakCondition(int i) {\n if (driver.findElements(By.xpath(MAIN_NEXT_PAGE_BUTTON_XPATH)).size() > 0\n && i == 0) {\n\n // click the button to go to the next page\n scrollToElement(mainNextPageButton);\n mainNextPageButton.click();\n\n } else if (driver.findElements(By.xpath(NEXT_PAGE_BUTTON_XPATH)).size() > 0\n && i < NUMBER_OF_PAGES_TO_CHECK - 1) {\n\n // click the button to go to the next page\n scrollToElement(nextPageButton);\n nextPageButton.click();\n\n } else {\n // return true and break the cycle\n return true;\n }\n\n // return false and continue the cycle\n return false;\n }", "public static void main(String[] args) {\n abc: for (int i = 0; i < 10; i++) {\n if (i == 7){\n continue abc;\n }\n System.out.println(i);\n }\n num: for (int i = 1; i<100; i++) {\n if (i % 13 == 0) {\n System.out.println(i);\n break num;\n }\n }\n \n \n }", "@Override\r\n public boolean isLooped() {\r\n return true;\r\n }", "public void dontBreak() {\n\t}", "private boolean exitingBreakOperation(Node node) {\n if (node instanceof BREAKNode) {\n return true;\n }\n return false;\n }", "public Object visit(Break breakStatement) {\n\t\tif (inLoop == 0){\n\t\t\tSystem.err.println(new SemanticError(\"'break' statement not in loop\",\n\t\t\t\t\tbreakStatement.getLine(),\n\t\t\t\t\t\"break\"));\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public void stopLoop() {\n \n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
.tophap.mapbox_gl.Value literal = 4;
com.tophap.mapbox_gl.proto.Expressions.ValueOrBuilder getLiteralOrBuilder();
[ "@JsConstructor\n public PointLight() {\n\n }", "public MapSquare() {\n\tfeatures = EnumSet.noneOf(MapFeature.class);\n\tcolor = java.awt.Color.WHITE;\n solid = false;\n }", "@JSProperty(\"features\")\n void setFeatures(GeoJSONFeature... value);", "void hideInfobox(MapFeature feature);", "final void appendLiteral(final Object value) {\n if (value instanceof GeographicBoundingBox) {\n appendGeometry(null, new GeneralEnvelope((GeographicBoundingBox) value));\n } else if (value instanceof Envelope) {\n appendGeometry(null, (Envelope) value);\n } else if (value instanceof Geometry) {\n appendGeometry(Geometries.wrap((Geometry) value).orElse(null), null);\n } else {\n appendValue(value);\n }\n }", "@JsType(isNative=true, namespace=JsPackage.GLOBAL, name=\"Object\")\npublic interface GeoJsonObject\n{\n\n /*\n Methods\n */\n /** \n * inherited from (js.geojson.GeoJsonObject)\n * inherited from (js.geojson.GeoJsonObject)\n * inherited from (js.geojson.GeoJsonObject)\n * inherited from (js.geojson.GeoJsonObject)\n * inherited from (js.geojson.GeoJsonObject)\n * inherited from (js.geojson.GeoJsonObject)\n * inherited from (js.geojson.GeoJsonObject)\n * inherited from (js.geojson.GeoJsonObject)\n * inherited from (js.geojson.GeoJsonObject)\n */\n @JsProperty(name = \"bbox\")\n BBox_Union_99_rAndNumber getBbox();\n /** \n * inherited from (js.geojson.GeoJsonObject)\n * inherited from (js.geojson.GeoJsonObject)\n * inherited from (js.geojson.GeoJsonObject)\n * inherited from (js.geojson.GeoJsonObject)\n * inherited from (js.geojson.GeoJsonObject)\n * inherited from (js.geojson.GeoJsonObject)\n * inherited from (js.geojson.GeoJsonObject)\n * inherited from (js.geojson.GeoJsonObject)\n * inherited from (js.geojson.GeoJsonObject)\n */\n @JsProperty(name = \"type\")\n String getType();\n @JsProperty(name = \"bbox\")\n void setBbox(TupleOf6<Number, Number, Number, Number, Number, Number> value);\n @JsProperty(name = \"bbox\")\n void setBbox(TupleOf4<Number, Number, Number, Number> value);\n /** \n * inherited from (js.geojson.GeoJsonObject)\n * inherited from (js.geojson.GeoJsonObject)\n * inherited from (js.geojson.GeoJsonObject)\n * inherited from (js.geojson.GeoJsonObject)\n * inherited from (js.geojson.GeoJsonObject)\n * inherited from (js.geojson.GeoJsonObject)\n * inherited from (js.geojson.GeoJsonObject)\n * inherited from (js.geojson.GeoJsonObject)\n * inherited from (js.geojson.GeoJsonObject)\n */\n @JsProperty(name = \"bbox\")\n void setBbox(BBox_Union_99_rAndNumber value);\n /** \n * inherited from (js.geojson.GeoJsonObject)\n * inherited from (js.geojson.GeoJsonObject)\n * inherited from (js.geojson.GeoJsonObject)\n * inherited from (js.geojson.GeoJsonObject)\n * inherited from (js.geojson.GeoJsonObject)\n * inherited from (js.geojson.GeoJsonObject)\n * inherited from (js.geojson.GeoJsonObject)\n * inherited from (js.geojson.GeoJsonObject)\n * inherited from (js.geojson.GeoJsonObject)\n */\n @JsProperty(name = \"type\")\n void setType(String value);\n}", "public default void onGeographicConfig(int useDefaultBitField, float distance, float elevation, float azimuth) {}", "public void mo33280c() {\n MapboxMap mapboxMap = (MapboxMap) this.f29575b.get();\n Marker marker = (Marker) this.f29574a.get();\n View view = (View) this.f29576c.get();\n if (mapboxMap != null && marker != null && view != null) {\n this.f29581h = mapboxMap.mo33570g().mo33888a(marker.mo33191e());\n if (view instanceof BubbleLayout) {\n view.setX((this.f29581h.x + this.f29579f) - this.f29578e);\n } else {\n view.setX((this.f29581h.x - ((float) (view.getMeasuredWidth() / 2))) - this.f29578e);\n }\n view.setY(this.f29581h.y + this.f29580g);\n }\n }", "@Override\n public void onMapReady(MapboxMap mapboxMap) {\n map = mapboxMap;\n\n\n\n\n ArrayList<LatLng> points = new ArrayList<>();\n\n try {\n // Load GeoJSON file\n InputStream inputStream = fragmentActivity.getAssets().open(archivoLinea);\n BufferedReader rd = new BufferedReader(new InputStreamReader(inputStream, Charset.forName(\"UTF-8\")));\n StringBuilder sb = new StringBuilder();\n int cp;\n while ((cp = rd.read()) != -1) {\n sb.append((char) cp);\n }\n\n inputStream.close();\n\n // Parse JSON\n JSONObject json = new JSONObject(sb.toString());\n JSONArray features = json.getJSONArray(\"features\");\n JSONObject feature = features.getJSONObject(0);\n JSONObject geometry = feature.getJSONObject(\"geometry\");\n if (geometry != null) {\n String type = geometry.getString(\"type\");\n\n // Our GeoJSON only has one feature: a line string\n if (!TextUtils.isEmpty(type) && type.equalsIgnoreCase(\"LineString\")) {\n\n // Get the Coordinates\n JSONArray coords = geometry.getJSONArray(\"coordinates\");\n for (int lc = 0; lc < coords.length(); lc++) {\n JSONArray coord = coords.getJSONArray(lc);\n LatLng latLng = new LatLng(coord.getDouble(1), coord.getDouble(0));\n points.add(latLng);\n }\n }\n }\n } catch (Exception exception) {\n //Log.e(TAG, \"Exception Loading GeoJSON: \" + exception.toString());\n }\n\n if (points.size() > 0) {\n\n // Draw polyline on map\n mapboxMap.addPolyline(new PolylineOptions()\n .addAll(points)\n .color(Color.parseColor(\"#3bb2d0\"))\n .width(2));\n }\n\n mapboxMap.addMarker(new MarkerOptions()\n .position(new LatLng(-17.388503, -66.157241))\n .title(\"Hello World!\")\n .snippet(\"Welcome to my marker.\"));\n }", "private void initializeLiveAttributes() {\n/* 134 */ this.x = createLiveAnimatedNumber(null, \"x\", 0.0F);\n/* 135 */ this.y = createLiveAnimatedNumber(null, \"y\", 0.0F);\n/* 136 */ this.z = createLiveAnimatedNumber(null, \"z\", 0.0F);\n/* 137 */ this.pointsAtX = createLiveAnimatedNumber(null, \"pointsAtX\", 0.0F);\n/* */ \n/* 139 */ this.pointsAtY = createLiveAnimatedNumber(null, \"pointsAtY\", 0.0F);\n/* */ \n/* 141 */ this.pointsAtZ = createLiveAnimatedNumber(null, \"pointsAtZ\", 0.0F);\n/* */ \n/* 143 */ this.specularExponent = createLiveAnimatedNumber(null, \"specularExponent\", 1.0F);\n/* */ \n/* 145 */ this.limitingConeAngle = createLiveAnimatedNumber(null, \"limitingConeAngle\", 0.0F);\n/* */ }", "@Override\n public void onMapReady(MapboxMap mapboxMap) {\n MapActivity.this.mapboxMap = mapboxMap;\n navigationMapRoute = new NavigationMapRoute(null, mapView, mapboxMap, R.style.NavigationMapRoute);\n mapboxMap.setLatLngBoundsForCameraTarget(BC_BOUNDS);\n //mapboxMap.setMaxZoomPreference(14);\n mapboxMap.addOnMapClickListener(new MapboxMap.OnMapClickListener() {\n @Override\n public void onMapClick(@NonNull LatLng point) {\n mapUtilities.getDireccionName(point, listener);\n posicionActual = point;\n OptionChooserDialog dlg = new OptionChooserDialog(MapActivity.this, \"PointChooser\", \"Selecciona Punto\", \"Salida\", \"Destino\", listener);\n dlg.setCanceledOnTouchOutside(false);\n dlg.show();\n }\n });\n /*\n LocationComponent locationComponent = mapboxMap.getLocationComponent();\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n //El componente de location es el que permite usar la localizacion del usuario en el mapa.\n locationComponent.activateLocationComponent(this);\n locationComponent.setLocationComponentEnabled(true);\n locationComponent.setRenderMode(RenderMode.COMPASS);\n locationComponent.setCameraMode(CameraMode.NONE);\n LocationEngineProvider locationEngineProvider = new LocationEngineProvider(this);\n\n //El location engine es el que nos permite conocer las posiciones del usuario.\n locationEngine = locationEngineProvider.obtainBestLocationEngineAvailable();\n locationEngine.setPriority(LocationEnginePriority.BALANCED_POWER_ACCURACY);\n locationEngine.activate();\n //se agrega el locationEngine en el componente de location.\n locationComponent.activateLocationComponent(this,locationEngine);\n */\n\n /*\n for(LatLng centro : loader.getCentro_edificios()){\n centros.add(centro);\n markers.add(mapboxMap.addMarker(new MarkerOptions().position(centro).icon(getIcon(loader.getIconos().get(markers.size()))).title(reversePolygonsKeys.get(markers.size()))));\n }\n mapboxMap.setOnMarkerClickListener(new MapboxMap.OnMarkerClickListener() {\n @Override\n public boolean onMarkerClick(@NonNull Marker marker) {\n LocationExpandedDlg dlg = new LocationExpandedDlg(MapActivity.this,marker.getTitle(),polygonsKeys.get(marker.getTitle()));\n dlg.show();\n return true;\n }\n });\n //se hace zoom al DIA por default\n CameraPosition position = new CameraPosition.Builder()\n .target(new LatLng(31.865665,-116.666274)) // Sets the new camera position\n .zoom(22) // Sets the zoom\n .bearing(180) // Rotate the camera\n .tilt(30) // Set the camera tilt\n .build(); // Creates a CameraPosition from the builder\n\n mapboxMap.animateCamera(CameraUpdateFactory\n .newCameraPosition(position), 4000);\n\n */\n }", "@Test\n public void notGlossyTest() {\n Camera camera = new Camera(new Point3D(0, 0, 1000), new Vector(0, 0, -1), new Vector(0, 1, 0)) //\n .setViewPlaneSize(200, 200).setDistance(1000);\n\n scene.setAmbientLight(new AmbientLight(new Color(java.awt.Color.WHITE), 0.15));\n\n scene.geometries.add( //\n new Polygon(new Point3D(-100,50,100),new Point3D(0,50,-100),\n new Point3D(0,-20,-100),new Point3D(-100,-20,100))//\n .setEmission(new Color(java.awt.Color.DARK_GRAY))//\n .setMaterial(new Material().setKd(0.25).setKs(0.25).setShininess(20).setKt(0).setKr(0.7).setKg(1)),\n new Sphere(new Point3D(50,20,-50),30)\n .setEmission(new Color(100, 20, 20)) //\n .setMaterial(new Material().setKd(0.2).setKs(0.2).setShininess(30)),\n /*new Polygon(new Point3D(-20,30,500),new Point3D(20,30,500),\n new Point3D(20,15,500),new Point3D(-20,15,500))\n .setEmission(new Color(0,30,0))\n .setMaterial(new Material().setKd(0.7).setKs(0.6).setShininess(90).setKt(2)),*/\n new Tube(new Ray(new Point3D(50,20,-50),new Vector(0,0,1)),10)\n .setEmission(new Color(java.awt.Color.BLUE))\n .setMaterial(new Material().setKd(0.9).setKs(0.7).setShininess(30).setKt(0.3))/*,\n new Sphere(new Point3D(-24,-30,10),15)\n .setEmission(new Color(100, 100, 150)) //\n .setMaterial(new Material().setKd(0.2).setKs(0.2).setShininess(30).setKr(0.6).setKg(0.1))*/\n\n );\n\n scene.lights.add(new SpotLight(new Color(java.awt.Color.white), new Point3D(-100, -100, 500), new Vector(-1, -1, -2)) //\n .setKl(0.00004).setKq(0.0000006));\n scene.lights.add(new DirectionalLight(new Color(java.awt.Color.orange),new Vector(0,-1,-1)));\n\n Voxeles voxeles= new Voxeles(scene,-150,-150,-150,150,150,150,50,50,50);\n ImageWriter imageWriter = new ImageWriter(\"NotGlossyImage\", 600, 600);\n Render render = new Render() //\n .setImageWriter(imageWriter) //\n .setCamera(camera) //\n .setRayTracer(new RayTracerBasic(scene).setVoxeles(voxeles).setVoxelOn(true))\n .setMultithreading(3);\n\n render.renderImage();\n render.writeToImage();\n\n\n }", "public void setLA(int value) {\n this.la = value;\n }", "@Test\n public void mp1Test() {\n Scene scene = new Scene(\"Test scene\");\n scene.setCamera(new Camera(new Point3D(0, 0, -1000), new Vector(0, 0, 1), new Vector(0, -1, 0)));\n scene.setDistance(1000);\n scene.setBackground(new Color(java.awt.Color.black));\n scene.setAmbientLight(new AmbientLight(Color.BLACK, 0));\n\n Material materialDefault = new Material(0.5,0.5,30);\n Color cubeColor = new Color(250, 0, 220);\n scene.addGeometries(new Sphere(new Color(255,0,0), new Material(0.5, 0.5, 30, 0.7, 0),\n 10, new Point3D(0, 0, 0)),\n new Sphere(Color.BLACK,materialDefault ,\n 15, new Point3D(-20, -5, 20)),\n new Sphere(new Color(59, 189, 57), materialDefault,\n 20, new Point3D(-30, -10, 60)),\n new Sphere(new Color(java.awt.Color.blue), new Material(0.5, 0.5, 30, 0.6, 0),\n 30, new Point3D(15, -20, 70)),\n new Plane(new Color(java.awt.Color.BLACK), new Material(0.5, 0.5, 30, 0, 0.5),\n new Point3D(-20, 10, 100), new Point3D(-30, 10, 140), new Point3D(15, 10, 150)),\n //create cube\n new Polygon(cubeColor, materialDefault,\n new Point3D(20, -30, 10), new Point3D(40, -30, -30),\n new Point3D(80, -30, -10), new Point3D(60, -30, 30)),\n new Polygon(cubeColor, materialDefault,\n new Point3D(20, -30, 10), new Point3D(40, -30, -30),\n new Point3D(40, 10, -30), new Point3D(20, 10, 10)),\n new Polygon(cubeColor, materialDefault,\n new Point3D(80, -30, -10), new Point3D(40, -30, -30),\n new Point3D(40, 10, -30), new Point3D(80, 10, -10)),\n new Polygon(cubeColor, materialDefault,\n new Point3D(20, -30, 10), new Point3D(60, -30, 30),\n new Point3D(60, 10, 30), new Point3D(20, 10, 10)),\n new Polygon(cubeColor, materialDefault,\n new Point3D(40, 10, -30), new Point3D(80, 10, -10),\n new Point3D(60, 10, 30), new Point3D(20, 10, 10)),\n new Polygon(cubeColor, materialDefault,\n new Point3D(60, -30, 30), new Point3D(80, -30, -10),\n new Point3D(80, 10, -10), new Point3D(60, 10, 30))\n );\n\n scene.addLights(new SpotLight(new Color(java.awt.Color.WHITE),\n new Point3D(-100, -10, -200), new Vector(1, -1, 3), 1, 1E-5, 1.5E-7),\n new PointLight(new Color(java.awt.Color.YELLOW),\n new Point3D(-50, -95, 0), 1,0.00005, 0.00005)\n //new DirectionalLight(new Color(java.awt.Color.WHITE),\n // new Vector(-1,1,-1))\n );\n\n ImageWriter imageWriter = new ImageWriter(\"mp1\", 200, 200, 400, 400);\n Render render = new Render(imageWriter, scene);\n //render.set_softShadowDensity(3);\n //render.set_superSampleDensity(0.33);\n render.renderImage();\n render.writeToImage();\n }", "private OceanMap() {\r\n\t\t this.dimensions = 40;\r\n\t\t this.islandCount = dimensions*4;\r\n\t\t createGrid();\r\n\t\t addBorder();\r\n\t\t placeIslands();\r\n\t }", "public float getPickRadius() {\n/* 1896 */ return 0.0F;\n/* */ }", "PhongShader()\r\n {\r\n ia = 1;\r\n n = 200;\r\n ks = 0.5;\r\n kd = 0.4;\r\n ka = 0.1;\r\n }", "public interface MapViewConstants {\n // ===========================================================\n // Final Fields\n // ===========================================================\n\n public static final int ANIMATION_DURATION_SHORT = 250;\n public static final int ANIMATION_DURATION_DEFAULT = 500;\n public static final PointF DEFAULT_PIN_ANCHOR = new PointF(0.5f, 1.0f);\n}", "public GeoStationarySatellite(){\n setEsriName(\"Geostationary_Satellite\");\n setProj4Name(\"geos\");\n }", "private Way addBasicAttributes(Way way){\n\t\tway.setFollowTerrain(true);\n\t\tway.setVisible(true);\n\t\tway.setValue(\"SURFACE_PATH_DEPTH_OFFSET\",0.50);\n\t\tway.setAltitudeMode(WorldWind.CLAMP_TO_GROUND);\n\t\tway.setPathType(AVKey.LINEAR);\n\t\treturn way;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the value related to the column: msg_content
public void setMsgContent (java.lang.String msgContent) { this.msgContent = msgContent; }
[ "public Builder setMsgContent(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000400;\n msgContent_ = value;\n \n return this;\n }", "@Override\n\tpublic void setValue(String msg) {\n\t\tif (StringUtil.isNullOrEmpty( msg) ) \n\t\t{\n\t\t\tmsg = \"\";\n\t\t}\n\t\tedittext.setText(msg ); \n\t\tif (currentviewClass.presave )\n\t\t { \n\t\t\tsaveDefaultCTLM1347();\n\t\t }\n\t}", "public void setContent( String c ){ content = c; }", "@Test\r\n public void testSetMessageContent() {\r\n System.out.println(\"setMessageContent\");\r\n String messageContent = \"\";\r\n \r\n instance.setMessageContent(messageContent);\r\n assertEquals(messageContent, instance.getMessageContent());\r\n \r\n }", "@Override\r\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tattndb.setText((CharSequence) msg.obj);\r\n\t\t\tsuper.handleMessage(msg);\r\n\t\t}", "public void setContentAt(int col, int row, Object value) {\r\n }", "public void setContent(String passedContent){\n //setting note content\n this.content = passedContent;\n }", "private void setContent(String content){\n if(content == null || content == \"\"){\n throw new IllegalArgumentException(\"Content of a note cannot be empty or null\");\n }\n this.content = content;\n }", "public void setContent(String value)\n {\n try\n {\n if(value != null)\n {\n set(contentDef, value);\n }\n else\n {\n unset(contentDef);\n }\n }\n catch(ModificationNotPermitedException e)\n {\n throw new BackendException(\"incompatible schema change\",e);\n }\n catch(ValueRequiredException e)\n {\n throw new BackendException(\"incompatible schema change\",e);\n }\n }", "private void setMsg(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n msg_ = value;\n }", "public void setMessage(String msg)\n {\n\tmessage = msg;\n\t}", "void setAllMessage(String msg);", "@Override\n\tpublic void setmsg(String msg) {\n\t\tthis.Msg=msg;\n\t}", "public Builder setMsgContentBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000400;\n msgContent_ = value;\n \n return this;\n }", "public java.lang.String getMsgContent(){\r\n return localMsgContent;\r\n }", "public void set_message(String plain_text);", "public void setMessage( String msg )\n {\n this.message = msg;\n }", "public void set(String content) {\n this.content = content;\n }", "public static void setHTMLContent(Message msg) throws MessagingException {\r\n\r\n\t\tString html = \"<html><head><title>\" + msg.getSubject()\r\n\t\t\t\t+ \"</title></head><body><h1>\" + msg.getSubject()\r\n\t\t\t\t+ \"</h1><p>This is a test of sending an HTML e-mail\"\r\n\t\t\t\t+ \" through Java.</body></html>\";\r\n\r\n\t\t// HTMLDataSource is a static nested class\r\n\t\tmsg.setDataHandler(new DataHandler(new HTMLDataSource(html)));\r\n\t}", "public void setContent(String content){\n this.content += content;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO: Warning this method won't work in the case the id fields are not set
@Override public boolean equals(Object object) { if (!(object instanceof Habitacion)) { return false; } Habitacion other = (Habitacion) object; if ((this.numero == null && other.numero != null) || (this.numero != null && !this.numero.equals(other.numero))) { return false; } return true; }
[ "public int getId () { return id; }", "public int getId(){ return this.id;}", "public int id() {return this.id;}", "@Override\n public int getId() { return id; }", "public void setId(long id){ \r\n this.id = id; \r\n }", "public void setId( int id ) { this.id = id; }", "public void setId( long id ) { this.id = id; }", "@Override\n public long getId() {\n return id_;\n }", "public void setId(int newId){this.id = newId;}", "Declaracao getId();", "public void setId(long id) { _id = id; }", "public void setId(int id) \n {\n this.id = id;\n }", "private int getId() {\n return id;\n }", "@Override\n public Long getId() {\n \treturn super.getId();\n }", "public int getId() { \n return id; \n }", "public int getId(){\r\n return id;\r\n }", "public int getId() \n {\n return id;\n }", "public int getId(){\n return id;\n }", "@Override\n public long getID() {\n return 0;\n }", "public int getId(){\n return id;\n\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public Schedule getPlayingSubSchedule() { return currentSubSchedule; }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void classement() {\n\t\t\t\n\t\t}", "@Override\r\n public void publicando() {\n }", "@Override\n\tpublic void tyre() {\n\t\t\n\t}", "@Override\n \tpublic void init() {\n \n \t}", "private static void EX5() {\n\t\t\r\n\t}", "protected void method_5557() {}", "@Override\n\tpublic void cafeteria() {\n\t\t\n\t}", "@Override\r\n\tpublic void preco() {\n\r\n\t}", "@Override\r\n\tpublic void jugar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void limpar() {\n\t\t\r\n\t}", "public void mo5201a() {\n }", "@Override\n\tpublic void annuler() {\n\n\t}", "@Override\r\n\tpublic void zwroc() {\n\t\t\r\n\t}", "@Override\n\t\tprotected void swop() {\n\n\t\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return true if the fieldvalue in the supplied predicate is satisfied by this predicate's fieldvalue and operator.
public boolean equals(IndexPredicate ipd) { // some code goes here Todo return false; }
[ "public boolean effectiveBooleanValue(XPathContext c) throws XPathException {\n switch(operator) {\n case Token.AND:\n return operand0.effectiveBooleanValue(c) && operand1.effectiveBooleanValue(c);\n\n case Token.OR:\n return operand0.effectiveBooleanValue(c) || operand1.effectiveBooleanValue(c);\n\n default:\n throw new UnsupportedOperationException(\"Unknown operator in boolean expression\");\n }\n }", "@Override\n public boolean contains(Constraint<Boolean> constraint, Boolean value) {\n switch (constraint.getComparison()) {\n case EQ:\n return value == constraint.getValue();\n case NEQ:\n return value != constraint.getValue();\n }\n return false;\n }", "boolean isEqualTo(BasicOperand Other);", "@Override\n\tpublic Value evaluate(Environment env) {\n\t BoolVal b1 = (BoolVal) e1.evaluate(env);\n\t BoolVal b2 = (BoolVal) e2.evaluate(env);\n\t if (this.bop == BoolOp.AND) {\n\t \treturn new BoolVal(b1.toBoolean() && b2.toBoolean());\n\t }else if (this.bop == BoolOp.OR) {\n\t \t return new BoolVal(b1.toBoolean() || b2.toBoolean());\n\t }\t\t\n\t\t\n\t\treturn null;\n\t}", "public Boolean evaluate(Predicate predicate)\n\t\t\tthrows UnsupportedOperationException, NullPointerException, RuntimeException;", "public boolean equalsPredicate(Predicate p){\r\n\t\tif(p.getName().equals(this.name)){ // checks the name\r\n\t\t\t// Checks each variable\r\n\t\t\tint[] hasV = this.hasVariables(p.getVariables());\r\n\t\t\tif(hasV[0] == -1){\r\n\t\t\t\treturn false;\r\n\t\t\t} else if(hasV[0] == -2){\r\n\t\t\t\treturn false;\r\n\t\t\t} else {\r\n\t\t\t\tboolean equal = true;\r\n\t\t\t\tint i = 0;\r\n\t\t\t\twhile(i < hasV.length && equal){\r\n\t\t\t\t\t// If one of the pairs of variables is different or contains a DefaultVariable,\r\n\t\t\t\t\t// then we return false.\r\n\t\t\t\t\tif(hasV[i] == 0 || hasV[i] == 2){\r\n\t\t\t\t\t\tequal = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\r\n\t\t\t\treturn equal;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}", "private static boolean testValue(Object value, Predicate<String> predicate) {\n if (value instanceof Map) {\n return testPredicateOnValues((Map<String, Object>) value, predicate);\n } else if (value instanceof List<?> list) { // if we have a list, iterate and send it back to this method for each values\n for (Object o : list) {\n if (!testValue(o, predicate)) {\n return false;\n }\n }\n } else { // if we do not have a map or a list then we have a simple value\n return predicate.test(value == null ? null : value.toString());\n }\n return true;\n }", "public static boolean evaluateComparison(Operator operator, double left,\r\n double right) {\r\n\r\n switch (operator) {\r\n case EQ:\r\n return left == right;\r\n case GT:\r\n return left > right;\r\n case GTE:\r\n return left >= right;\r\n case LT:\r\n return left < right;\r\n case LTE:\r\n return left <= right;\r\n }\r\n\r\n return false;\r\n }", "@FunctionalInterface\r\n public interface PredicateBool {\r\n\r\n boolean eval();\r\n }", "private boolean chkAndEvalOperator(JSONObject entity, StringBuilder msgs, boolean isNeg) {\n\t\tboolean isPass = false;\n\t\tif (this.key.isMulti()) {\n\t\t\tfor (Key k : key.getKeys()) {\n\t\t\t\tboolean res = compareKeyVal(entity, k, this.operator);\n\t\t\t\tmsgs = IUtilities.setEvalMsg(msgs, k.getKey(), k.isLenCheck(),\n\t\t\t\t\t\tisPass, isNeg, this.operator.name());\n\t\t\t\tisPass = isPass || res;\n\t\t\t}\n\t\t} else {\n\t\t\tisPass = compareKeyVal(entity, key, this.operator);\n\t\t\tmsgs = IUtilities.setEvalMsg(msgs, key.getKey(), key.isLenCheck(),\n\t\t\t\t\tisPass, isNeg, this.operator.name());\n\t\t}\n\t\treturn isPass;\n\t}", "public boolean evaluate(Map<Character, Boolean> propMap) {\n if (this.type == NodeType.OPERATOR) { //Run operator on sub nodes\n return this.inverted != this.runOperator(propMap);\n } else { //Otherwise, this is a proposition\n if (!propMap.containsKey(this.val)) {\n throw new IllegalArgumentException(\"Proposition \" + this.val + \" is not defined\");\n }\n return this.inverted != propMap.get(this.val);\n }\n }", "public boolean isBinaryOperator() {\n return binaryOperators.contains(value);\n }", "public boolean calcValue() {\n boolean newInternal;\n if (this.operator == TYPE.AND) {\n newInternal = leftInput.getValue() && rightInput.getValue();\n } else if (this.operator == TYPE.OR) {\n newInternal = leftInput.getValue() || rightInput.getValue();\n } else if (this.operator == TYPE.NOT) {\n newInternal = !rightInput.getValue();\n } else {\n System.out.println(\"Error in Gate.java with operator: \" + this.operator);\n System.exit(-1);\n newInternal = internalValue;\n }\n return newInternal;\n }", "public boolean isConditionMatched(IExpr expr, PatternMap patternMap);", "public default Boolean evaluate(Predicate expression) {\n return evaluate(expression, null);\n }", "private Value booleanPartialEvaluation(Value leftValue, Value rightValue,\n\t\t\tBinaryOp op) {\n\t\tif (leftValue == null && rightValue == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tswitch (op) {\n\t\tcase AND:\n\t\t\tif (leftValue != null && leftValue.equals(BooleanValue.FALSE)) {\n\t\t\t\treturn BooleanValue.FALSE;\n\t\t\t}\n\t\t\tif (rightValue != null && rightValue.equals(BooleanValue.FALSE)) {\n\t\t\t\treturn BooleanValue.FALSE;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase OR:\n\t\t\tif (leftValue != null && leftValue.equals(BooleanValue.TRUE)) {\n\t\t\t\treturn BooleanValue.TRUE;\n\t\t\t}\n\t\t\tif (rightValue != null && rightValue.equals(BooleanValue.TRUE)) {\n\t\t\t\treturn BooleanValue.TRUE;\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn null;\n\t}", "public static <T> Predicate<T> and(Predicate<T> lhs, Predicate<T> rhs) {\n\t\treturn lhs == null ? rhs : rhs == null ? lhs : lhs.and(rhs);\n\t}", "public static boolean isOpAnd(ExprNodeDesc desc) {\n return GenericUDFOPAnd.class == getGenericUDFClassFromExprDesc(desc);\n }", "public boolean exists(final F<A, Boolean> f) {\n return e.isLeft() && f.f(value());\n }", "boolean test() {\n\n int testResult = _col1.value().compareTo(_col2.value());\n\n if (testResult == 0 && _relationVal.contains(EQ)) {\n return true;\n }\n\n if (testResult < 0 && _relationVal.contains(LT)) {\n return true;\n }\n\n if (testResult > 0 && _relationVal.contains(GT)) {\n return true;\n }\n\n if (testResult != 0 && _relationVal.contains(0)) {\n return true;\n }\n\n return false;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the paddingright property
public final CssPaddingRight getPaddingRight() { if (cssPadding.right == null) { cssPadding.right = (CssPaddingRight) style.CascadingOrder(new CssPaddingRight(), style, selector); } return cssPadding.right; }
[ "public int getPaddingRight() {\n return this.paddingRight;\n }", "public int getRightPadding() {\n return mHitbox.right - mX - mWidth;\n }", "public short getWCellPaddingRight()\n {\n return field_6_wCellPaddingRight;\n }", "public int getSpaceOnRight() {\r\n\t\treturn this.spaceOnRight;\r\n\t}", "public int getRightMargin() {\n\t\treturn mRightMargin;\n\t}", "int getPaddingEnd();", "@VTID(27)\r\n double rightMargin();", "public int getRightMargin() {\n\tcheckWidget();\n\treturn rightMargin;\n}", "public void setBorderPaddingRight( float paddingRight )\n {\n getWrapperCell().setPaddingRight( paddingRight );\n }", "public int getPaddingLeft() {\n return this.paddingLeft;\n }", "public byte getFtsCellPaddingRight()\n {\n return field_10_ftsCellPaddingRight;\n }", "public int getPaddingRight() {\n /*\n // Can't load method instructions: Load method exception: bogus registerCount: 0 in method: com.color.widget.ColorRecyclerView.LayoutManager.getPaddingRight():int, dex: in method: com.color.widget.ColorRecyclerView.LayoutManager.getPaddingRight():int, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.color.widget.ColorRecyclerView.LayoutManager.getPaddingRight():int\");\n }", "public Integer getPaddingY()\n {\n return this.paddingY;\n }", "private int getMarginRight(int textSize) {\n\t\treturn 2;\n\t}", "public int getPadding() {\n\t\treturn mPadding;\n\t}", "@Array({8}) \n\t@Field(3) \n\tpublic Pointer<gpointer > padding() {\n\t\treturn this.io.getPointerField(this, 3);\n\t}", "@Override\n public int getPaddingLeft() {\n return padLeft;\n }", "@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)\n\tpublic int getTotalPaddingEnd() {\n\t\treturn this.getObject().getTotalPaddingEnd();\n\t}", "public int mo4603m(View view) {\n return view.getPaddingRight();\n }", "public double getRightAscensionOffset()\n {\n\treturn ra;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new instance of this exception.
public ReplyErrorCodeException(int errorCode) { super("Error " + errorCode + ": " + JDWPConstants.Error.getName(errorCode)); this.errorCode = errorCode; }
[ "public ExceptionMetier() {\n }", "public SshToolsApplicationException() {\n this(null, null);\n }", "public StackException() {\n \tthis(\"\");\n }", "public CreateServicemanException() {\n }", "public AppException() { }", "public DuplicateException() {\n \tsuper();\n }", "public AbstractException with(Exception ex) {\n super.setStackTrace(ex.getStackTrace());\n return with(ex.getMessage());\n }", "public ExpressionException() {}", "public ModelException()\n {\n }", "public DuplicateTariffServiceException() {\r\n\t}", "public MutiMessageException()\n {\n super();\n }", "public LegendException() {\n }", "public MyLibraryExceptionV2() {\n }", "public LibraryException() {\r\n super(\"LibraryException created\");\r\n MFL.error(this);\r\n }", "public SubConstructorExceptions() throws Exception {\n\n\t}", "public VOAException() {\r\n super();\r\n }", "public SoulException() {\n super();\n }", "public ElasticSearchIndexException() {\n }", "public ApplicationException(){\n\t\t\n\t}", "public RegistryException() {\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if the edge is TOP or BOTTOM, and false otherwise.
public static boolean isTopOrBottom(RectangleEdge edge) { return (edge == RectangleEdge.TOP || edge == RectangleEdge.BOTTOM); }
[ "private boolean blockOnEdge(Block b, Movement m) {\n\t\tswitch (m) {\n\t\tcase DOWN_ONE:\n\t\t\treturn b.getIntY() + 1 == height; //+ 2 == height; // + 2 for statusbar offset...\n\t\tcase RIGHT_ONE:\n\t\t\treturn b.getIntX() + 1 == width;\n\t\tcase LEFT_ONE:\n\t\t\treturn b.getIntX() == 0;\n\t\tcase UP_ONE:\n\t\t\treturn b.getIntY() <= 0; // checks if the block is on or above the top edge.\n\t\tdefault:\n\t\t\treturn false;\n\t\t}\n\t}", "@Override\r\n \tpublic boolean isOnGround() {\r\n \t\treturn bottom() > 0;\r\n \t}", "public boolean isBottom()\n {\n return vals[5];\n }", "public boolean isEdge(Object o);", "private boolean isAtBottom() {\n return winch.getCurrentPosition() >= winchOrigin;\n }", "boolean hasEdgeList();", "private boolean edgePoint(MonitorPoint point) {\n boolean isEdge;\n int width = this.mDisplayInfo.getLogicalWidth();\n int height = this.mDisplayInfo.getLogicalHeight();\n float eventX = point.getX();\n boolean z = true;\n if (point.getOrientation() == 0) {\n if ((eventX < GestureNavConst.BOTTOM_WINDOW_SINGLE_HAND_RATIO || eventX > 100.0f) && (eventX < ((float) (width - 100)) || eventX > ((float) width))) {\n z = false;\n }\n isEdge = z;\n } else {\n if ((eventX < GestureNavConst.BOTTOM_WINDOW_SINGLE_HAND_RATIO || eventX > 100.0f) && (eventX < ((float) (height - 100)) || eventX > ((float) height))) {\n z = false;\n }\n isEdge = z;\n }\n StringBuilder sb = new StringBuilder();\n sb.append(point);\n sb.append(isEdge ? \" is\" : \" not\");\n sb.append(\" a edge point\");\n Log.i(TAG, sb.toString());\n return isEdge;\n }", "public static boolean isTunnelTopIsland() {\n return FieldEntry.isTunnelBottom();\n }", "public boolean isBelow(@Nonnull Bounds b) {\n return this.top >= b.bottom;\n }", "public boolean percolates() {\n return percolationWQUF.find(VIRTUAL_TOP) == percolationWQUF.find(VIRTUAL_BOTTOM);\n }", "public boolean hasInwardEdge(N node);", "public boolean isEmpty() {\n return left > right || top > bottom;\n }", "private boolean checkOnTop (Entity a, Entity b) {\n if ((a.getXPos() + a.getWidth() >= (b.getXPos()) ||\n ((a.getXPos()) <= b.getXPos() + b.getWidth())) &&\n (((a.getYPos() + a.getHeight()) >= b.getYPos()-3) &&\n ((a.getYPos() + a.getHeight()) <= b.getYPos()+3))) {\n this.top = true;\n }\n return top;\n }", "public boolean isBackedgeStart() {\n return backedgeStart;\n }", "public boolean isFull() {\r\n\t\treturn (top >= max - 1);\r\n\t}", "public boolean hasTop() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "public boolean isEdge(int i, int j) {\n\t\treturn !getEdge(i, j).equals(noEdge());\n\t}", "public boolean isAdjacent(Edge otherEdge) {\n\t\t\tboolean isHorizontal = ordinal() % 2 == 0;\n\t\t\tboolean otherIsHorizontal = otherEdge.ordinal() % 2 == 0;\n\t\t\treturn isHorizontal != otherIsHorizontal;\n\t\t}", "protected boolean isOnGround() {\r\n Coordinate c = getPixelLocation().copy();\r\n c.y+=(getHeight()/2)-5;\r\n PathingLayer.Type type = getHostGame().getPathingLayer().getTypeAt(c);\r\n return pathingModifiers.get(type) < .05;\r\n }", "public boolean isEdge(int source, int target) {\r\n\t\tif (source < 0 || source > this.size() - 1) {\r\n\t\t\tthrow new IndexOutOfBoundsException(\"please try a different source in your isEdge method.\");\r\n\t\t} else if (target < 0 || target > this.size()) {\r\n\t\t\tthrow new IndexOutOfBoundsException(\"please try a different target in your isEdge method.\");\r\n\t\t} else {\r\n\t\t\treturn (edges[source][target] > 0 && edges[target][source] > 0);\r\n\t\t}\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns the length of the longest string key in the subtrie rooted at x that is a prefix of the query string, assuming the first d character match and we have already found a prefix match of given length (1 if no such match)
private int longestPrefixOf(Node x, CharArray query, int d, int length) { if (x == null) return length; if (x.val != -1) length = d; if (d == query.length()) return length; char c = query.get(d); return longestPrefixOf(x.next[c], query, d+1, length); }
[ "public String longestPrefixOf(String s) {\n\t\t// TODO (BONUS)\n\t\tTrieNode current = root;\n\t\t\n\t\tint nextIndex;\n\t\twhile(!s.equals(\"\")){\n\t\t\tnextIndex = c2i(s.charAt(0));\n\t\t\tcurrent = current.children[nextIndex];\n\t\t\ts = s.substring(1);\n\t\t}\n\t\t\n\t\tint greatestSize = -1;\n\t\tint greatestIndex = -1;\n\t\tfor(int i = 0; i < 26; i++){\n\t\t\tif(current.children[i] != null){\n\t\t\t\tif(current.children[i].size() > greatestSize){\n\t\t\t\t\tgreatestIndex = i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn s;\n\t}", "public String longestPrefixOf(String query) {\n if (query == null) {\n throw new IllegalArgumentException(\"calls longestPrefixOf() with null argument\");\n }\n if (query.length() == 0) {\n return null;\n }\n int length = 0;\n Node<Value> x = root;\n int i = 0;\n while (x != null && i < query.length()) {\n char c = query.charAt(i);\n if (c < x.c) {\n x = x.left;\n } else if (c > x.c) {\n x = x.right;\n } else {\n i++;\n if (x.val != null) {\n length = i;\n }\n x = x.mid;\n }\n }\n return query.substring(0, length);\n }", "public String longestPrefix(String key) {\r\n int longestKeyLen = get(root, key, 0, 0);\r\n return key.substring(0, longestKeyLen);\r\n }", "public int lengthOfLongestSubstring4(String s) {\n int res = 0;\n if(s==null||s.length()==0) return res;\n int i=0,j=0;\n Map<Character, Integer> map = new HashMap<>();\n int max = 0;\n while (i<s.length() && j<s.length()){\n Character c = s.charAt(j);\n if(!map.containsKey(c)){\n j++;\n max++;\n map.put(c, 1);\n res = Math.max(max, res);\n }else {\n max = 0;\n map.clear();\n i++;\n j=i;\n }\n }\n return res;\n }", "public String longestPrefixOf(String pre) {\n\t\tint length = searchPrefix(root,pre,0,0);\n\t\treturn pre.substring(length);\n\t}", "public int numberOfMatches(String prefix) {\n \tif(prefix == null) throw new IllegalArgumentException();\n\t\tTerm test = new Term(prefix, 0);\t// \n\t\tint N = prefix.length();\n\t\tint result = -1;\n\t\tint first_index = BinarySearchDeluxe.firstIndexOf(thisterm, test, Term.byPrefixOrder(N));\n\t\tint last_index = BinarySearchDeluxe.lastIndexOf(thisterm, test, Term.byPrefixOrder(N));\n\t\t\n\t\tif(first_index==-1||last_index==-1) {\n\t\t\treturn result;\n\t\t}\n\t\telse {\n\t\t\tresult =(last_index - first_index +1);\t\t\n\t\t}\n\t\t\n\t\treturn result;\n }", "public String longestPrefixOf(String s){\n if(s==null||s.length()==0)\n return null;\n int len = s.length();\n Node x = root;\n int i=0;\n while(x!=null&&i<s.length()){\n char c = s.charAt(i);\n if(c<x.c){\n x = x.left;\n }\n else if(c>x.c){\n x = x.right;\n }\n else{\n i++;\n if(x.v!=null)\n len = i;\n x = x.mid;\n }\n }\n return s.substring(0,len);\n }", "public int numberOfMatches(String prefix) {\n if (prefix == null) throw new NullPointerException(\"Prefix can't be null\");\n \n Term tempTerm = new Term(prefix, 0);\n int tempLength =prefix.length(); \n int firstIndex = BinarySearchDeluxe.firstIndexOf(myTerms, tempTerm, Term.byPrefixOrder(tempLength));\n int lastIndex = BinarySearchDeluxe.lastIndexOf (myTerms, tempTerm, Term.byPrefixOrder(tempLength));\n \n return lastIndex-firstIndex+1;\n }", "public String longestPrefix(String s) {\n\t\tint n = s.length();\n\t\tint[] lsp = new int[n];\n\t\tlsp[0] = 0;\n\t\tint j = 0;\n\t\tfor(int i = 1; i < s.length(); i++){\n\t\t\twhile(j > 0 && s.charAt(i) != s.charAt(j)){\n\t\t\t\tj = lsp[j - 1];\n\t\t\t}\n\t\t\tif(s.charAt(i) == s.charAt(j)){\n\t\t\t\tj++;\n\t\t\t}\n\t\t\tlsp[i] = j;\n\t\t}\n\t\treturn lsp[n - 1] > 0 ? s.substring(0, lsp[n - 1]) : \"\";\n\t}", "@Override\n\t\tpublic TrieNode<E> longestPrefixMatchNode(E addr) {\n\t\t\treturn doLookup(addr).smallestContaining;\n\t\t}", "public static int lengthOfLongestSubstring_AtMost_Kdistinct(String s) {\n \tint[] map = new int[128];\n \tint start=0, end=0;\t\n \tint counter = 0;\n \tint d=0;\n \twhile (end<s.length()) {\n \t\t/*\n \t\tif (hm.getOrDefault(s.charAt(end), 0) == 0) counter++;\n \t\tSystem.out.println(\"end \" + end + \" counter \" + counter + \" start \" + start + \" d \" + d);\n \t\thm.put(s.charAt(end), hm.getOrDefault(s.charAt(end), 0)+1);\n \t\tend++;\n \t\t*/\n \t\tif (map[s.charAt(end++)]++ == 0) counter++;\n \t\twhile(counter>2) {\n \t\t//System.out.println(\"###end \" + end + \" counter \" + counter + \" start \" + start + \" d \" + d);\n \t\t\tif (map[s.charAt(start++)]--==1) counter--;\n \t\t\t/*\n \t\t\tif (hm.get(s.charAt(start))==1) counter--;\n\t\t\t\thm.put(s.charAt(start), hm.get(s.charAt(start))-1 );\n\t\t\t\tstart++;\n\t\t\t\t*/\n \t\t\t\n \t\t}\n\t\t\td = Math.max(d, end-start);\n \t}\n \t\n \treturn d;\n\n }", "public int the_longest_common_prefix(List<String> dic, String target) {\n int max = 0;\n for (String d : dic) {\n int len = 0;\n for (int i = 0; i < d.length(); i++) {\n if (i > target.length() - 1 || d.charAt(i) != target.charAt(i))\n break;\n len++;\n }\n max = Math.max(max, len);\n }\n return max;\n }", "@Override\n\tpublic TrieNode<E> longestPrefixMatchNode(E addr) {\n\t\tif(bounds != null) {\n\t\t\t// should never reach here when there are bounds, since this is not exposed from set/map code\n\t\t\tthrow new Error();\n\t\t}\n\t\treturn absoluteRoot().longestPrefixMatchNode(addr);\n\t}", "public int lengthOfLongestSubstring3(String s) {\n boolean[] exist = new boolean[256];\n int i = 0, maxLen = 0;\n for (int j = 0; j < s.length(); j++) {\n while (exist[s.charAt(j)]) {\n exist[s.charAt(i)] = false;\n i++;\n }\n exist[s.charAt(j)] = true;\n maxLen = Math.max(j - i + 1, maxLen);\n }\n return maxLen;\n }", "public int lengthOfLongestSubstring2(String s) {\n int maxLength = 0;\n Map<Character, Integer> uniqueSubstring = new HashMap<>();\n for (int i = 0; i < s.length(); i++) {\n char checkedChar = s.charAt(i);\n if (uniqueSubstring.containsKey(checkedChar)) {\n int oldIndex = uniqueSubstring.get(checkedChar);\n Map<Character, Integer> newUniqueSubstring = new HashMap<>();\n for (Map.Entry<Character, Integer> substringChar : uniqueSubstring.entrySet()) {\n if (substringChar.getValue() > oldIndex) {\n newUniqueSubstring.put(substringChar.getKey(), substringChar.getValue());\n }\n }\n uniqueSubstring = newUniqueSubstring;\n }\n uniqueSubstring.put(checkedChar, i);\n maxLength = Math.max(maxLength, uniqueSubstring.size());\n }\n return maxLength;\n }", "public int lengthOfLongestSubstring_given(String s) {\n\t\tif (s.length()==0) return 0;\n\t\tHashMap<Character, Integer> map = new HashMap<>();\n\t\tint max=0;\n\t\tfor (int i=0, j=0; i<s.length(); ++i){\n\t\t\tif (map.containsKey(s.charAt(i))){\n\t\t\t\tj = Math.max(j,map.get(s.charAt(i))+1);\n\t\t\t}\n\t\t\tmap.put(s.charAt(i),i);\n\t\t\tmax = Math.max(max,i-j+1);\n\t\t}\n\t\treturn max;\n\t}", "public int lengthOfLongestSubstring(String s) {\n int maxLen = 0;\n Map<Character, Integer> hashMap = new HashMap<>();\n\n //physical meaning of startInx, the range(startInx, i) is the\n //longest current string with no dup characters\n int startInx = 0;\n\n for (int i = 0; i < s.length(); i++) {\n char cur = s.charAt(i);\n if (!hashMap.containsKey(cur)) {\n hashMap.put(cur, i);\n } else {\n int preIdx = hashMap.get(cur);\n startInx = Math.max(startInx, preIdx + 1);\n hashMap.put(cur, i);\n }\n maxLen = Math.max(maxLen, i - startInx + 1);\n }\n return maxLen;\n }", "public int lengthOfLongestSubstring(String s) {\n if(s.length()<=1)\n return s.length();\n HashMap<Character,Integer> map = new HashMap<Character,Integer>();\n int start = 0, max = 0;\n for(int i=0;i<s.length();i++) {\n if(!map.containsKey(s.charAt(i)) || map.get(s.charAt(i))<start)\n map.put(s.charAt(i),i);\n else {\n max = i-start>max ? i-start : max;\n start = map.get(s.charAt(i))+1;\n map.put(s.charAt(i),i); \n }\n }\n max = s.length()-start>max ? s.length()-start : max;\n return max;\n }", "public int lengthOfLongestSubstring(String s) {\n String subStr = \"\";\n HashSet<Character> subSet = new HashSet<>();\n int maxLen = 0;\n for(char oneChar : s.toCharArray()){\n subStr = subStr + oneChar;\n\n if(subSet.contains(oneChar)){\n subStr = remakeSubStr(subSet, subStr, oneChar);\n System.out.println(subStr);\n } else {\n subSet.add(oneChar);\n\n if(maxLen < subStr.length()){\n maxLen = subStr.length();\n }\n }\n }\n return maxLen;\n }", "public int lengthOfLongestSubstring(String s) {\n // Start typing your Java solution below\n // DO NOT write main() function\n\n if (s == null) return 0;\n if (s.equals(\"\")) return 0;\n if (s.length() < 2) return 1;\n\n int[][] results = new int[s.length()][s.length()]; // start and end index array\n\n for (int end = 0; end < s.length(); end++) {\n for (int start = end; start >= 0; start--) {\n if (end == start) results[start][end] = 1;\n String subString = s.substring(start, end + 1);\n\n if (map.containsKey(subString)) {\n results[start][end] = map.get(subString);\n continue;\n }\n\n if (isSubStringWithoutRepeat(subString)) {\n results[start][end] = subString.length();\n } else {\n int up = results[start][end - 1];\n int right = results[start + 1][end];\n results[start][end] = up > right ? up : right;\n }\n map.put(subString, results[start][end]);\n }\n }\n\n return results[0][s.length() - 1];\n\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
public int updateGravidainfo(GravidaInfo gravidainfo) { return dao.updateByPrimaryKeySelective(gravidainfo); }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void classement() {\n\t\t\t\n\t\t}", "@Override\r\n public void publicando() {\n }", "@Override\n\tpublic void tyre() {\n\t\t\n\t}", "@Override\n \tpublic void init() {\n \n \t}", "private static void EX5() {\n\t\t\r\n\t}", "protected void method_5557() {}", "@Override\n\tpublic void cafeteria() {\n\t\t\n\t}", "@Override\r\n\tpublic void preco() {\n\r\n\t}", "@Override\r\n\tpublic void jugar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void limpar() {\n\t\t\r\n\t}", "public void mo5201a() {\n }", "@Override\n\tpublic void annuler() {\n\n\t}", "@Override\r\n\tpublic void zwroc() {\n\t\t\r\n\t}", "@Override\n\t\tprotected void swop() {\n\n\t\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of setAnswersForQuestion method, of class Student.
@Test public void testSetAnswersForQuestion_4args_1() { System.out.println("setAnswersForQuestion"); String answer = ""; Section section = null; Subsection subsection = null; Question question = null; studentInstance.setAnswersForQuestion(answer, section, subsection, question); }
[ "@Test\n\tpublic void testGetAnswers() {\n\t\tMultChoiceQuestion mcq = new MultChoiceQuestion(\"\", null, \"a\", \"b\", \"c\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"d\");\n\t\t\n\t\tString[] answers = mcq.getAnswers();\n\t\t\n\t\tthis.now.checkThat(\t\"Answers are returned correctly.\", answers,\n\t\t\t\t\t\t\tis(equalTo(new String[] {\"a\", \"b\", \"c\", \"d\"})));\n\t}", "void setAnswers(int answers) {\n this.answers = answers;\n }", "public void setAnswers(Set<Answer> answers);", "@Test\n\tpublic void testGetAnswersToQuestion() {\n\t\tQnaQuestion question = questionLogic\n\t\t\t\t.getQuestionById(tdp.question2_location1.getId());\n\t\tAssert.assertNotNull(question);\n\n\t\tList<QnaAnswer> answers = question.getAnswers();\n\t\tAssert.assertEquals(answers.size(), 2);\n\n\t\tanswers.contains(tdp.answer1_location1);\n\t\tanswers.contains(tdp.answer2_location1);\n\t}", "public void saveStudentAnswers(Student student) {\n\t\tStudent updateStudent = studentRepository.findByStudentName(student.getStudentName());\r\n\t\tupdateStudent.setStudentAnswers(student.getStudentAnswers());\r\n\t\tstudentRepository.save(updateStudent);\r\n\t\t\r\n\t}", "public void answer(Properties answers) {\n/* 92 */ setAnswer(answers);\n/* 93 */ QuestionParser.parseCreatureCreationQuestion(this);\n/* */ }", "private void setRadioButtonQuestionSpecs(Integer userId, Integer instId, Integer surveyId, RadioButtonQuestion pQuestion)\n {\n\n DatabaseHelper.RadioButtonQuestionAnswerCursor radioButtonQuestionCursor = null;\n radioButtonQuestionCursor = mHelper.queryRadioButtonQuestionAnswerById(userId, instId, surveyId, pQuestion.getId());\n radioButtonQuestionCursor.moveToFirst();\n\n pQuestion.setIdUserAnswer(null);\n if (!radioButtonQuestionCursor.isAfterLast())\n {\n if (radioButtonQuestionCursor.getAnswerId() != null)\n pQuestion.setIdUserAnswer(radioButtonQuestionCursor.getAnswerId());\n }\n\n radioButtonQuestionCursor.close();\n\n /*********************************************/\n\n ArrayList<AnswerOption> answerOptions = new ArrayList<AnswerOption>();\n DatabaseHelper.AnswerOptionCursor answerOptionCursor = null;\n\n ////Log.i(TAG, \"-------------------------------------------------------------------------\");\n ////Log.i(TAG, \"setMultipleChoiceQuestionSpecs, answer options added: \");\n\n DatabaseHelper.MultipleChoiceQuestionCursor multiChoiceQuestionCursor = mHelper.queryMultipleChoiceQuestion(pQuestion.getId());\n multiChoiceQuestionCursor.moveToFirst();\n\n while (!multiChoiceQuestionCursor.isAfterLast())\n {\n ////Log.i(TAG, \"multiChoiceQuestionCursor not null\");\n\n int answerOptionID = multiChoiceQuestionCursor.getAnswerOptionId();\n answerOptionCursor = mHelper.queryAnswerOptionById(answerOptionID);\n answerOptionCursor.moveToFirst();\n\n if (!answerOptionCursor.isAfterLast())\n {\n ////Log.i(TAG, \"answerOptionCursor not null\");\n\n answerOptions.add(answerOptionCursor.getAnswerOption());\n }\n\n answerOptionCursor.close();\n\n multiChoiceQuestionCursor.moveToNext();\n }\n ////Log.i(TAG, \"-------------------------------------------------------------------------\");\n\n multiChoiceQuestionCursor.close();\n\n pQuestion.setAnswerOptions(answerOptions);\n }", "public void answer(Properties answers) {\n/* 65 */ setAnswer(answers);\n/* 66 */ QuestionParser.parseVillageUpkeepQuestion(this);\n/* */ }", "public void setAnswer(String answer) {\n this.answer = answer;\n UnitOfWork.getCurrent().registerDirty(this);\n }", "@Test\n\tpublic final void testSet() {\n\n\t\tfinal boolean originalShowQuestion = false;\n\t\tfinal int originalQuestionNumber = -1;\n\t\tfinal Statistics originalQestionStatistics = new Statistics();\n\t\tfinal Location originalLocationOfAnswer = new Location(\"testSet\", \"b\", \"c\", \"d\", \"e\", \"f\");\n\t\tfinal String originalQuestion = \"TEST Q\";\n\t\tfinal ArrayList<String> originalAnswers = new ArrayList<String>();\n\t\toriginalAnswers.add(\"A1\");\n\t\tfinal ArrayList<String> originalOptions = new ArrayList<String>();\n\t\toriginalOptions.add(\"O1\");\n\n\t\tfinal AbstractQuestion original = new CheckBox(originalShowQuestion, originalQuestionNumber, originalQestionStatistics, originalQuestion,\n\t\t\t\toriginalAnswers, originalLocationOfAnswer, originalOptions);\n\n\t\tfinal DatabaseAbstractQuestion databaseAbstractQuestion = new DatabaseAbstractQuestion(DatabaseAbstractQuestionTest.TEST_DATABASE_NAME);\n\t\tfinal int questionNumber = databaseAbstractQuestion.set(original);\n\n\t\tfinal AbstractQuestion update = new CheckBox(originalShowQuestion, questionNumber, originalQestionStatistics, originalQuestion,\n\t\t\t\toriginalAnswers, originalLocationOfAnswer, originalOptions);\n\n\t\tfinal Database connect = new Database(DatabaseAbstractQuestionTest.TEST_DATABASE_NAME);\n\t\tfinal Hashtable<Enum<?>, Object> vals = new Hashtable<Enum<?>, Object>();\n\t\tvals.put(Column.QUESTION_NUMBER, \"\" + questionNumber);\n\n\t\tfinal ResultSet rs = connect.select(DatabaseAbstractQuestion.TABLE_NAME, vals);\n\n\t\tint afterQuestionNumber = -1;\n\t\tboolean afterShowQuestion = false;\n\t\tType afterType = null;\n\t\ttry {\n\t\t\tafterQuestionNumber = rs.getInt(Column.QUESTION_NUMBER.toString());\n\t\t\tafterShowQuestion = rs.getBoolean(Column.SHOW.toString());\n\t\t\tafterType = Type.valueOf(rs.getString(Column.TYPE.toString()));\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail(e.getMessage());\n\t\t}\n\n\t\tAssert.assertEquals(Type.CheckBox, afterType);\n\n\t\tfinal DatabaseStatistics ds = new DatabaseStatistics(DatabaseAbstractQuestionTest.TEST_DATABASE_NAME);\n\t\tfinal Statistics afterStats = ds.get(questionNumber);\n\n\t\tfinal DatabaseLocation dl = new DatabaseLocation(DatabaseAbstractQuestionTest.TEST_DATABASE_NAME);\n\t\tfinal Location afterLocation = dl.get(questionNumber);\n\n\t\tfinal AbstractQuestion after = new CheckBox(afterShowQuestion, afterQuestionNumber, afterStats, originalQuestion, originalAnswers,\n\t\t\t\tafterLocation, originalOptions);\n\t\tassertEquals(update, after);\n\t\tconnect.delete(DatabaseAbstractQuestion.TABLE_NAME, vals);\n\t\tconnect.delete(DatabaseLocation.TABLE_NAME, vals);\n\t\tconnect.delete(DatabaseStatistics.TABLE_NAME, vals);\n\t}", "private void setAnswersIncorrect(Question theQuestion) {\r\n \t\r\n \tAnswer theAnswer, newAnswer;\r\n \tIterator<Answer> iter = theQuestion.iterator();\r\n \t\r\n \twhile (iter.hasNext()) {\r\n \t\ttheAnswer = iter.next();\r\n \t\ttheAnswer.setCorrect(false);\r\n \t}\r\n }", "@Test\n public void testCheckAnswer() {\n Scanner in=new Scanner(System.in);\n System.out.println(\"checkAnswer\");\n String resp = \"\";\n Question instance = new Question();\n instance.setAnswer(resp);\n boolean expResult = true;\n boolean result = instance.checkAnswer(resp);\n assertEquals(expResult, result);\n \n }", "public void setQuestions(Questions questions) {\r\n\t\tthis.questions = questions;\r\n\t\tif (questions != null) {\r\n\t\t\tquestions.setTest((Test) this);\r\n\t\t}\r\n\t}", "public void setupAnswers() {\n\t\tDataLoader dl = new DataLoader();\n\t\tanswers = dl.loadAnswersFromFilebase(Config.answersPath + \"answers\"); \t\t\n\t}", "void setupDefaultQuiz(){\n questions = new ArrayList<>();\n title = \"Capital Cities of the World!\";\n Answers a = new Answers();\n a.addAnswer(new Pair<>(\"a\",\"New Delhi\"));\n a.addAnswer(new Pair<>(\"b\",\"Jakarta\"));\n a.addAnswer(new Pair<>(\"c\",\"New York\"));\n a.addAnswer(new Pair<>(\"d\",\"Mumbai\"));\n Question q = new Question(\"What is the capital of India?\",a,\"a\");\n questions.add(q);\n a = new Answers();\n a.addAnswer(new Pair<>(\"a\",\"Santiago\"));\n a.addAnswer(new Pair<>(\"b\",\"New York\"));\n a.addAnswer(new Pair<>(\"c\",\"Washington DC\"));\n a.addAnswer(new Pair<>(\"d\",\"Los Angeles\"));\n q = new Question(\"What is the capital of the United States?\",a,\"c\");\n questions.add(q);\n a = new Answers();\n a.addAnswer(new Pair<>(\"a\",\"Busan\"));\n a.addAnswer(new Pair<>(\"b\",\"Jakarta\"));\n a.addAnswer(new Pair<>(\"c\",\"Pyongyang\"));\n a.addAnswer(new Pair<>(\"d\",\"Seoul\"));\n q = new Question(\"What is the capital of South Korea?\",a,\"d\");\n questions.add(q);\n a = new Answers();\n a.addAnswer(new Pair<>(\"a\",\"Islamabad\"));\n a.addAnswer(new Pair<>(\"b\",\"Karachi\"));\n a.addAnswer(new Pair<>(\"c\",\"Lahore\"));\n a.addAnswer(new Pair<>(\"d\",\"Mumbai\"));\n q = new Question(\"What is the capital of Pakistan?\",a,\"a\");\n questions.add(q);\n a = new Answers();\n a.addAnswer(new Pair<>(\"a\",\"Istanbul\"));\n a.addAnswer(new Pair<>(\"b\",\"Ankara\"));\n a.addAnswer(new Pair<>(\"c\",\"Damascus\"));\n a.addAnswer(new Pair<>(\"d\",\"Tehran\"));\n q = new Question(\"What is the capital of Turkey?\",a,\"b\");\n questions.add(q);\n a = new Answers();\n a.addAnswer(new Pair<>(\"a\",\"Hong Kong\"));\n a.addAnswer(new Pair<>(\"b\",\"Beijing\"));\n a.addAnswer(new Pair<>(\"c\",\"Shanghai\"));\n a.addAnswer(new Pair<>(\"d\",\"Taiwan\"));\n q = new Question(\"What is the capital of China?\",a,\"b\");\n questions.add(q);\n a = new Answers();\n a.addAnswer(new Pair<>(\"a\",\"Stuttgart\"));\n a.addAnswer(new Pair<>(\"b\",\"Bonn\"));\n a.addAnswer(new Pair<>(\"c\",\"Paris\"));\n a.addAnswer(new Pair<>(\"d\",\"Berlin\"));\n q = new Question(\"What is the capital of Germany?\",a,\"d\");\n questions.add(q);\n a = new Answers();\n a.addAnswer(new Pair<>(\"a\",\"Nottingham\"));\n a.addAnswer(new Pair<>(\"b\",\"Stratford upon Avon\"));\n a.addAnswer(new Pair<>(\"c\",\"London\"));\n a.addAnswer(new Pair<>(\"d\",\"Dublin\"));\n q = new Question(\"What is the capital of the United Kingdom?\",a,\"c\");\n questions.add(q);\n a = new Answers();\n a.addAnswer(new Pair<>(\"a\",\"Paris\"));\n a.addAnswer(new Pair<>(\"b\",\"Nice\"));\n a.addAnswer(new Pair<>(\"c\",\"Calias\"));\n a.addAnswer(new Pair<>(\"d\",\"London\"));\n q = new Question(\"What is the capital of France?\",a,\"a\");\n questions.add(q);\n a = new Answers();\n a.addAnswer(new Pair<>(\"a\",\"Rio de Janeiro\"));\n a.addAnswer(new Pair<>(\"b\",\"Sao Paulo\"));\n a.addAnswer(new Pair<>(\"c\",\"Brasilia\"));\n a.addAnswer(new Pair<>(\"d\",\"Salvador\"));\n q = new Question(\"What is the capital of Brazil?\",a,\"c\");\n questions.add(q);\n Collections.shuffle(questions);\n }", "public void testGetQuestionAccuracy() {\n assertEquals(\"getQuestion1 is wrong.\", 0, section.getAllQuestions().length);\n\n section.addQuestions(questions);\n\n Question question3 = new Question(777774);\n section.addQuestion(question3);\n\n assertEquals(\"getQuestion2 is wrong.\", 3, section.getAllQuestions().length);\n assertEquals(\"getQuestion3 is wrong.\", question3, section.getQuestion(2));\n }", "@Test\n public void testGradeIncorrectQuestion() {\n checkBox.setAnswer(\"test1\", true, \"test2\", false, \"test3\", true, \"test4\", false);\n \n checkBox.setCheckBoxInputTwo(true);\n checkBox.setCheckBoxInputThree(true);\n \n assertEquals(false, checkBox.gradeQuestion());\n }", "public void promptStudentAnswers()\r\n {\r\n \r\n String answer;\r\n int index = 0;\r\n while (index <studentAnswers.length){ //for(int index=0; index<studentAnswers.length; index++){\r\n System.out.print(\"Answer to question \" + (index +SHIFT_FACTOR)+\": \");\r\n answer = reader.readString();\r\n if(validate(answer)) {\r\n studentAnswers[index] = answer;\r\n index++;\r\n }\r\n else {\r\n System.out.println(\"Not a valid response. Try again.\");\r\n }\r\n }\r\n }", "public void getAnswerFromStudent() {\n // get user input for answer\n ScannerFactory in = new ScannerFactory();\n Scanner input = in.getKeyboardScanner();\n System.out.println(\"Please enter your answer: \");\n Double studAns = input.nextDouble();\n\n // sets up student answer\n studentAnswer = new NumAnswer(studAns);\n }", "Solution checkAnswer(String quizId, Long questionId, UserAnswer answer, Locale locale);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
For starting Main login screen
@Override public void start(final Stage primaryStage) { primaryStage.setTitle("MAZE Storage Server Login"); primaryStage.setFullScreen(true); BorderPane bp = new BorderPane(); bp.setPadding(new Insets(10,50,50,50)); //Adding HBox HBox hb = new HBox(); hb.setPadding(new Insets(20,20,20,30)); //Adding GridPane GridPane gridPane = new GridPane(); gridPane.setPadding(new Insets(20,20,20,20)); gridPane.setHgap(5); gridPane.setVgap(5); //Implementing Nodes for GridPane Label lblUserName = new Label("Username"); final TextField txtUserName = new TextField(); Label lblPassword = new Label("Password"); final PasswordField pf = new PasswordField(); Label lblSessKey = new Label("Session Key"); final PasswordField sk = new PasswordField(); Button btnLogin = new Button("Login"); final Label lblMessage = new Label(); Button btnFrgtPwd = new Button("Forgot Password"); final Label lblMessage1 = new Label(); Button btnNewUser = new Button("Create Account"); final Label lblMessage2 = new Label(); //Adding Nodes to GridPane layout gridPane.add(lblUserName, 90, 50); gridPane.add(txtUserName, 91, 50); gridPane.add(lblPassword, 90, 51); gridPane.add(pf, 91, 51); gridPane.add(lblSessKey, 90, 52); gridPane.add(sk, 91, 52); gridPane.add(btnLogin, 92, 50); gridPane.add(lblMessage, 94, 52); gridPane.add(btnFrgtPwd, 92, 51); gridPane.add(lblMessage1, 95, 52); gridPane.add(btnNewUser, 92, 52); gridPane.add(lblMessage2, 96, 52); //gridPane.add(clock, 97, 53); //Reflection for gridPane Reflection r = new Reflection(); r.setFraction(0.7f); gridPane.setEffect(r); //DropShadow effect DropShadow dropShadow = new DropShadow(); dropShadow.setOffsetX(5); dropShadow.setOffsetY(5); //Adding text and DropShadow effect to it Text text = new Text("MAZE Storage Server Login"); text.setFont(Font.font("Courier New", FontWeight.BOLD, 28)); text.setEffect(dropShadow); //Adding text to HBox hb.getChildren().add(text); //Add ID's to Nodes bp.setId("bp"); gridPane.setId("root"); btnLogin.setId("btnLogin"); text.setId("text"); btnFrgtPwd.setId("btnFrgrPwd"); btnNewUser.setId("btnNewUser"); //Action for btnLogin btnLogin.setOnAction(new EventHandler<ActionEvent>() { @SuppressWarnings("deprecation") public void handle(ActionEvent event) { checkUser = txtUserName.getText().toString(); checkPw = pf.getText().toString(); checkSk = sk.getText().toString(); //CopyListener class to check for content copy from files CopyListener cp = new CopyListener(checkUser); //MAC Address of the User/Intruder Machine String mac = ClientInitiator.getMACaddress(); unsuccess: //Check if only username and password have been entered and login is pressed if(!checkUser.isEmpty() && !checkPw.isEmpty() && checkSk.isEmpty() && !UserAccountDB.LookupMAC(checkUser,mac)){ boolean proceedup = false; System.out.println("No Session key"); try { if(sa.searchbyUserPass(checkUser,checkPw)){ lblMessage1.setText("Read Only login"); lblMessage1.setTextFill(Color.BLUEVIOLET); primaryStage.close(); DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); Date date = new Date(); if(ClientInitiator.getIpaddress() != null && ClientInitiator.getMACaddress() != null){ //Logging of Account Information for read only session UserAccountDB.InsertIP(ClientInitiator.getIpaddress()); FloggerDB.InsertLog(" READ ONLY LOGIN FROM IP:"+ClientInitiator.getIpaddress()+" MAC :"+ClientInitiator.getMACaddress(), checkUser,dateFormat.format(date) ); } else{ try { //Login from local host. FloggerDB.InsertLog(" READ ONLY LOGIN FROM Localhost:"+InetAddress.getLocalHost().getHostName(), checkUser,dateFormat.format(date) ); } catch (UnknownHostException e) { // TODO Auto-generated catch block e.printStackTrace(); } } proceedup = true; if(proceedup == true && unauth == false){ try { //To Set Windows Look and Feel for the FileGUI opener UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); } catch (Exception e) { // handle exception } //Initiate Sandtrap Environment for assessing Intruder Activities. FileSystemView fsv = new DirectoryRestrictedFileSystemView(new File("C:\\DVFS")); JFileChooser chooser = new JFileChooser(fsv); chooser.setCurrentDirectory(new File("C:\\DVFS")); cp.start(); boolean sandtrap = true; FullScreenJFrame frame = null; frame = new FullScreenJFrame("MAZE Cloud Server File System",chooser,checkUser,sandtrap); frame.setVisible(true); chooser.addKeyListener(new KeyAdapter() { public void keyReleased(KeyEvent e) { if (KeyEvent.VK_PRINTSCREEN == e.getKeyCode()) Toolkit.getDefaultToolkit().getSystemClipboard(). setContents(new StringSelection(""), null); } }); again: for(;;){ disableNewFolderButton(chooser); int result = chooser.showOpenDialog(null); switch(result){ case JFileChooser.APPROVE_OPTION: // Approve (Open or Save) was clicked File chosenfile = chooser.getSelectedFile(); cp.setFilename(" SandTrap File : "+chosenfile.getName()); String filename = chosenfile.getAbsolutePath(); if (Desktop.isDesktopSupported()) { try { File myFile = new File(filename); Desktop.getDesktop().open(myFile); Catcher2sandtrap c = new Catcher2sandtrap(checkUser,chosenfile); } catch (IOException ex) { // no application registered for PDFs } } //break; continue again; case JFileChooser.CANCEL_OPTION: Date date2 = new Date(); FloggerDB.InsertLog("READ ONLY SESSION LOGOUT", checkUser,dateFormat.format(date2) ); break again; case JFileChooser. ERROR_OPTION: // The selection process did not complete successfully System.out.println("The selection process did not complete successfully, Try again"); continue again; }//end Switch }//End for }//end if proceedup } else{ lblMessage1.setText("Please Enter UserName and Password"); lblMessage1.setTextFill(Color.RED); txtUserName.setText(""); pf.setText(""); break unsuccess; } } catch (ClassNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } txtUserName.setText(""); pf.setText(""); } try { String user = checkUser; //Three Attempts allowed for user to login, else the account is locked. if(tryagain == 2){ //Call for method to enforce account locking UserAccountDB.LockAccount(checkUser); System.exit(0); } if(tryagain != 2 && user.equals(checkUser)){ tryagain = tryagain + 1; } //Username, password and session key are entered if(sa.SearchByName(checkUser,checkPw,checkSk)){ primaryStage.close(); DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); Date date = new Date(); if(ClientInitiator.getIpaddress() != null){ UserAccountDB.InsertMAC(checkUser, ClientInitiator.getMACaddress(), ClientInitiator.getIpaddress()); FloggerDB.InsertLog("Session Login : "+ClientInitiator.getIpaddress()+" MAC : "+ClientInitiator.getMACaddress(), checkUser,dateFormat.format(date) ); } else{ try { FloggerDB.InsertLog("Session Login : "+InetAddress.getLocalHost().getHostName(), checkUser,dateFormat.format(date) ); } catch (UnknownHostException e) { // TODO Auto-generated catch block e.printStackTrace(); } } boolean proceed = true; if(proceed == true && unauth == false){ try { //To Set Windows Look and Feel for the FileGUI opener UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); } catch (Exception e) { // handle exception } FileSystemView fsv = new ChrootFileSystemView(new File("E:\\DVFS")); JFileChooser chooser = new JFileChooser(fsv); chooser.setCurrentDirectory(new File("E:\\DVFS")); boolean sandtrap = false; FullScreenJFrame frame = null; frame = new FullScreenJFrame("MAZE Cloud Server File System",chooser,checkUser,sandtrap); chooser.addKeyListener(new KeyAdapter() { public void keyReleased(KeyEvent e) { if (KeyEvent.VK_PRINTSCREEN == e.getKeyCode()) Toolkit.getDefaultToolkit().getSystemClipboard(). setContents(new StringSelection(""), null); } }); boolean recursive = true; // register directory and process its events Path dir = Paths.get("E:/DVFS"); try { DirectoryWatch dw = new DirectoryWatch(dir,recursive,checkUser); Thread myThread = new Thread(dw); //Thread myThread1 = new Thread(cp); //ImagefromCB i = new ImagefromCB(); //Thread t2 = new Thread(i); cp.start(); myThread.start(); //t2.start(); // myThread1.start(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } frame.setVisible(true); again: for(;;){ if(unauth == true){ break; } int result = chooser.showOpenDialog(null); switch(result){ case JFileChooser.APPROVE_OPTION: // Approve (Open or Save) was clicked File chosenfile = chooser.getSelectedFile(); System.out.println("Chosen file :"+chosenfile.getName()); String filename = chosenfile.getAbsolutePath(); cp.setFilename(" Normal File : "+chosenfile.getName()); Update(chosenfile); if (Desktop.isDesktopSupported() && unauth == false) { try { String name = GetFileAttr.GetFileAttrs(chosenfile.getName(), checkUser); boolean fcfilelookup = FCFileLookup(chosenfile.getName(),checkUser); if(name.equals(checkUser) && !fcfilelookup){ DateFormat dateFormat1 = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); Date date1 = new Date(); String file_group = GetFileAttr.GetFileGroup(chosenfile.getName()); String user_group = GetFileAttr.GetUserGroup(checkUser); update_user_file_forensics(chosenfile.getAbsolutePath(), checkUser, "ACCESS", dateFormat1.format(date1).toString(),user_group,file_group,"YES" ); File myFile = new File(filename); Desktop.getDesktop().open(myFile); } if(!name.equals(checkUser) && !fcfilelookup){ DateFormat dateFormat1 = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); Date date1 = new Date(); String file_group = GetFileAttr.GetFileGroup(chosenfile.getName()); String user_group = GetFileAttr.GetUserGroup(checkUser); update_user_file_forensics(chosenfile.getAbsolutePath(), checkUser, "ACCESS", dateFormat1.format(date1).toString(),user_group,file_group,"NO" ); filename = filename.replaceFirst("E", "C"); System.out .println("Unauthorized access, Opening File : "+filename); UserAccountDB.LockAccount(checkUser); File myFile = new File(filename); cp.setFilename(" Trap File : "+myFile.getName()); Desktop.getDesktop().open(myFile); unauth = true; Catcher1 c = new Catcher1(checkUser,chosenfile,name); } if(DecoyFileLookup(chosenfile.getName(),checkUser) || fcfilelookup){ //Catcher1 c = new Catcher1(checkUser,chosenfile); DateFormat dateFormat11 = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); Date date11 = new Date(); //String file_group = GetFileAttr.GetFileGroup(chosenfile.getName()); //String user_group = GetFileAttr.GetUserGroup(checkUser); //update_user_file_forensics(chosenfile.getAbsolutePath(), checkUser, "ACCESS", dateFormat11.format(date11).toString(),user_group,file_group ); if(ClientInitiator.getIpaddress() != null ){ UserAccountDB.InsertIP(ClientInitiator.getIpaddress()); UserAccountDB.InsertIntruderMAC(ClientInitiator.getMACaddress()); FloggerDB.InsertLog(" READ ONLY LOGIN FROM IP:"+ClientInitiator.getIpaddress()+" mac : "+ClientInitiator.getMACaddress(), checkUser,dateFormat11.format(date11) ); } else{ FloggerDB.InsertLog(" READ ONLY LOGIN FROM IP:"+InetAddress.getLocalHost().getHostName(), checkUser,dateFormat11.format(date11) ); } boolean proceedup = true; if(proceedup == true){ try { //To Set Windows Look and Feel for the FileGUI opener UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); } catch (Exception e) { // handle exception } FileSystemView fsv1 = new DirectoryRestrictedFileSystemView(new File("C:\\DVFS")); JFileChooser chooser1 = new JFileChooser(fsv1); chooser1.setCurrentDirectory(new File("C:\\DVFS")); sandtrap = true; FullScreenJFrame frame1 = new FullScreenJFrame("MAZE Cloud Server File System",chooser1,checkUser,sandtrap); frame1.setVisible(true); chooser1.addKeyListener(new KeyAdapter() { public void keyReleased(KeyEvent e) { if (KeyEvent.VK_PRINTSCREEN == e.getKeyCode()) Toolkit.getDefaultToolkit().getSystemClipboard(). setContents(new StringSelection(""), null); } }); again1: for(;;){ disableNewFolderButton(chooser1); int result1 = chooser1.showOpenDialog(null); switch(result1){ case JFileChooser.APPROVE_OPTION: // Approve (Open or Save) was clicked File chosenfile1 = chooser1.getSelectedFile(); String filename1 = chosenfile1.getAbsolutePath(); //Update access log for next detection //Update(chosenfile1); if (Desktop.isDesktopSupported()) { try { File myFile1 = new File(filename1); Desktop.getDesktop().open(myFile1); cp.setFilename(" Decoy File : "+chosenfile1.getName()); Catcher2sandtrap c = new Catcher2sandtrap(checkUser,chosenfile1); } catch (IOException ex) { // no application registered for PDFs } } //break; continue again1; case JFileChooser.CANCEL_OPTION: Date date2 = new Date(); FloggerDB.InsertLog("READ ONLY SESSION LOGOUT - Suspicious Activity", checkUser,dateFormat11.format(date2) ); //System.exit(0); break again1; case JFileChooser.ERROR_OPTION: // The selection process did not complete successfully System.out.println("The selection process did not complete successfully, Try again"); continue again1; }//end Switch }//End for }//end if proceedup } } catch (IOException ex) { // no application registered for PDFs } } continue again; case JFileChooser.CANCEL_OPTION: Date date2 = new Date(); FloggerDB.InsertLog("Session Logout", checkUser,dateFormat.format(date2) ); CreateExcelFile.InsertLogtoExcel(); CreateExcelFile.BreachLogtoExcel(); CreateExcelFile.AllFileLastAccessLogtoExcel(); CreateExcelFile.SandTrapLastAccessLogtoExcel(); CreateExcelFile.IPLogtoExcel(); CreateExcelFile.ForensicstoExcel(); //Cancel or the close-dialog icon was clicked //String sec_pass = SecPasswdGen.PasswdGenerator(); //Code to update Session key in db //sa.updatebyUsername(checkUser, sec_pass); //Way2SMS smssendagent = new Way2SMS(); //boolean smssent = smssendagent.SendMessage("MAZE Server :: Your Session key for next login : "+sec_pass,checkUser); break again; case JFileChooser.ERROR_OPTION: // The selection process did not complete successfully System.out.println("The selection process did not complete successfully, Try again"); continue again; }//end Switch } } } else{ lblMessage.setText("Incorrect user or pw."); lblMessage.setTextFill(Color.RED); } txtUserName.setText(""); pf.setText(""); sk.setText(""); } catch (ClassNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (NullPointerException e) { // TODO Auto-generated catch block e.printStackTrace(); } finally{ } } //update_user_file_forensics(chosenfile.getAbsolutePath(), checkUser, "ACCESS", dateFormat1.format(date1).toString(),user_group,file_group ); private void update_user_file_forensics(String absolutePath, String checkUser, String action, String accesstime, String user_group, String file_group, String privileged) { final String DB_URL = "jdbc:mysql://localhost:3306/FLOGGERDB"; Connection conn = null; //STEP 2: Register JDBC driver try { Class.forName("com.mysql.jdbc.Driver"); } catch (ClassNotFoundException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } String sql = null; //STEP 3: Open a connection //System.out.println("Connecting to a selected database..."); try { conn = DriverManager.getConnection(DB_URL, USER, PASS); Statement stmt1=conn.createStatement(); int count = 0; sql = "Select count(Filename) from user_document_access_table where Filename = '"+absolutePath+"'"; ResultSet rs = stmt1.executeQuery(sql); if(!rs.next()){ count = 1; } else count = rs.getInt(1)+1; sql = "Insert into user_document_access_table values('"+absolutePath+"','"+checkUser+"','"+action+"','"+accesstime+"','"+count+"','"+user_group+"','"+file_group+"','"+privileged+"') "; stmt1.executeUpdate(sql); stmt1.close(); conn.close(); } catch (SQLException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } private boolean FCFileLookup(String name,String User) { // TODO Auto-generated method stub boolean result = DecoyFileDB.FCFileLookup(name, User); if(result == true){ UserAccountDB.LockAccount(User); } return result; //return false; } }); //Action for btnFtgtPwd btnFrgtPwd.setOnAction(new EventHandler<ActionEvent>() { public void handle(ActionEvent event) { checkUser = txtUserName.getText().toString(); checkPw = pf.getText().toString(); //checkSk = sk.getText().toString(); try { if(sa.searchbySecPassword(checkUser,checkPw)){ lblMessage1.setText("Sending Session Key"); lblMessage1.setTextFill(Color.BLUEVIOLET); } else{ lblMessage1.setText("Please Enter UserName and Password"); lblMessage1.setTextFill(Color.RED); } } catch (ClassNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } txtUserName.setText(""); pf.setText(""); } }); //Action for btnNewUser btnNewUser.setOnAction(new EventHandler<ActionEvent>() { public void handle(ActionEvent event) { primaryStage.close(); InsertAccount.Callmain(null); txtUserName.setText(""); pf.setText(""); } }); //Add HBox and GridPane layout to BorderPane Layout bp.setTop(hb); bp.setCenter(gridPane); //Adding BorderPane to the scene and loading CSS Scene scene = new Scene(bp); scene.getStylesheets().add(getClass().getClassLoader().getResource("login.css").toExternalForm()); primaryStage.setScene(scene); primaryStage.titleProperty().bind( scene.widthProperty().asString(). concat(" : "). concat(scene.heightProperty().asString())); //primaryStage.setResizable(false); primaryStage.show(); }
[ "public void checkLoginMain() {\n\t\t\n\t\t//Check if logged in\n\t\tif (!this.isLoggedIn()) {\n\t\t\t\n\t\t\t//Return to login view\n\t\t\tIntent intent = new Intent(_context, AccountLogin.class);\n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\t\t\tintent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t_context.startActivity(intent);\n\t\t\t\n\t\t}\n\t}", "@Override protected void startup() {\n LoginView lv = new LoginView();\n show(lv); \n }", "private void launchLogin() {\n Intent intent = new Intent(this, LoginUserActivity.class);\n startActivity(intent, ActivityOptions.makeSceneTransitionAnimation(this).toBundle());\n }", "private void launchLoginPage() \n\t{\n\t\tHistory.newItem(LOGIN_PAGE);\n\t}", "public void start() {\n\t\tinit();\n setLogin();\n }", "public void loginAct() {\r\n\t\t\tLoginUI l=new LoginUI();\r\n\t\t\tl.build(container);\r\n\t\t\tdisappear();\r\n\t\t}", "public void login() {\r\n\t\ttry{\r\n\t\t\tMainProgram.setM_ac(new AccountReader().getAccount(m_usernametxtfld.getText()));\r\n\t\t}catch(Exception e) {\r\n\t\t}\r\n\t\t\r\n\t\tEventQueue.invokeLater(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\ttry {\r\n\t\t\t\t\t//LoginGUI window = new LoginGUI();\r\n\t\t\t\t\tHomeGUI window = new HomeGUI();\r\n\t\t\t\t\t//window.frame.setVisible(true);\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tm_frmLogIn.dispose();\r\n\t}", "public Login() {\n initComponents();\n start();\n }", "public LoginScreen() {\n //this.loginListener = loginListener;\n //this.accessControl = accessControl;\n buildUI();\n //username.focus();\n }", "void goToLoginScreen();", "private void LoginController() {\r\n\t\tnew Thread().start();\r\n\t}", "public void account_login()\r\n\t{\r\n\t\tConstants.logging_in = true;\r\n\t\taccount_popup();\r\n\t}", "private static void login() {\n\t\t\n\t}", "@Override\n public void start() {\n Itemexchange.getStage().setScene(loginScreen);\n }", "public void login()\n\t{\n\t\tSystem.out.println(\"default login\");\n\t}", "@Override\n public void run() {\n Intent mainIntent = new Intent().setClass(\n SplashScreenActivity.this, LoginActivity.class);\n startActivity(mainIntent);\n\n // Close the activity so the user won't able to go back this\n // activity pressing Back button\n finish();\n }", "public login() {\n initComponents();\n checkSever();\n //thai();\n\n \n }", "private void onBtnLoginPress(ActionEvent event) {\r\n try {\r\n if (nifPatternCheck(txtUsername.getText())) {\r\n openCompanyMainMenu(loginCompany());\r\n } else if (txtUsername.getText().startsWith(\"admin\")) {\r\n \r\n // Asier modification to login as admin\r\n \r\n //openAdminMainMenu(adminLogin());\r\n User admin = new User();\r\n admin.setUsername(\"admin\");\r\n admin.setFullName(\"Lit Fits Admin\");\r\n admin.setPassword(fieldPassword.getText());\r\n openAdminMainMenu(admin);\r\n \r\n } else {\r\n openExpertMainMenu(expertLogin());\r\n }\r\n stage.hide();\r\n } catch (IOException | ClientErrorException ex) {\r\n createExceptionDialog(ex);\r\n } catch (Exception ex) {\r\n createExceptionDialog(ex);\r\n }\r\n }", "private void run() {\n\t\t\n\t\twhile(true) {\n\t\t\tif(!loginWindow.getRunning() && !loginWindow.mainRunning())\n\t\t\t\trunLogin();\n\t\t}\n\t}", "public Login() {\n initComponents();\n setLocationRelativeTo(null);\n setTitle(\"Login\");\n \n eventEnter();\n eventEsc();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Connect to the server.
private void connect() { if (connectThread == null) { connectThread = new ConnectThread(); connectThread.start(); } }
[ "public void connect() {\n\t\tif (connected) {\n\t\t\treturn; // if we are already connected, no need to re-connect\n\t\t}\n\n\t\t// connect to the server ina different thread\n\t\tThread connectThread = new Thread(serverThread);\n\t\tconnectThread.start();\n\t}", "public void connect() {\n\t\taddressToServer = new InetSocketAddress(SERVER_NAME, SERVER_PORT);\n new Thread(this).start();\n }", "public void connect () {\n\t\t\n\t\ttry {\n // establish socket connection to server\n\t\t\taSocket = new Socket (serverName, portNumber);\n\t\t\t\n\t\t\tif (aSocket.isConnected()) {\n\t\t\t\tsocketOut = new ObjectOutputStream(aSocket.getOutputStream());\n\t\t\t\tsocketIn = new ObjectInputStream(aSocket.getInputStream());\n\t\t\t\tSystem.out.println(\"Client: Connected to the server\");\n\t\t\t}\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "void /**/connect() {\n\t\tmakeDir(localPath);\n\n\t\ttry {\n\t\t\tSystem.out.println(\"Attempting to connect to server...\");\n int port = 2663;\n socket = new Socket(host, port);\n\t\t\tif (socket.isConnected()) {\n\t\t\t\tSystem.out.println(\"\\tConnected to \" + socket.getLocalAddress()\n\t\t\t\t\t\t+ \":\" + socket.getPort() + \"\\n\");\n\n\t\t\t\tclientHistory.add(socket.getInetAddress().toString());\n\t\t\t\tclientIn = socket.getInputStream();\n\t\t\t\tclientOut = socket.getOutputStream();\n\n\t\t\t\tint character;\n\t\t\t\tString developer = \"\";\n\n\t\t\t\t// Read the developer name from the server.\n\t\t\t\twhile ((character = clientIn.read()) != Commands.END) {\n\t\t\t\t\tdeveloper += (char) character;\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println(developer);\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "public void Connect() {\n try {\n sslSocketFactory = (SSLSocketFactory) SSLSocketFactory.getDefault();\n sslSocket = (SSLSocket) sslSocketFactory.createSocket(serverAddress, serverPort);\n sslSocket.startHandshake();\n is = new BufferedReader(new InputStreamReader(sslSocket.getInputStream()));\n os = new PrintWriter(sslSocket.getOutputStream());\n System.out.println(\"Successfully connected to \" + serverAddress + \" on port \" + serverPort);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void connect() {\n try {\n socket = new Socket(host, port);\n in = new DataInputStream(socket.getInputStream());\n out = new DataOutputStream(socket.getOutputStream());\n listener = new ClientEventListener();\n System.out.println(\"Connected to the server!\");\n new Thread(this).start();\n } catch (ConnectException e) {\n System.out.println(\"Could not connect to the server.\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public Connection connect() throws FGLUIException {\r\n\t\treturn waitForServerToConnect();\r\n\t}", "public void connectToServer() {\n\t\tSystem.out.println(\"Connecting to server...\");\n\t\ttry {\n\t\t\t//socket = new Socket(\"localhost\", 7777); // local server\n\t\t\t//\tsocket = new Socket(\"70.95.122.247\", 7777);\n\t\t\t\tsocket = new Socket(\"2605:e000:1c02:8e:9587:d3d9:c5cd:9780\", 7777); // computer server\n\t\t} catch (IOException e) {\n\t\t\terror(\"Unable to connect to server.\");\n\t\t\t//e.printStackTrace();\n\t\t}\n\n\t\tSystem.out.println(\"Connection established.\");\n\t}", "private void connect() {\n InetSocketAddress socketAddress = new InetSocketAddress(this.mServerIp, this.mServerPort);\n Socket socket = new Socket();\n try {\n socket.connect(socketAddress);\n mData.setOutgoing(socket.getOutputStream());\n mData.setIncoming(new BufferedReader(new InputStreamReader(socket.getInputStream())));\n if (mClientListener != null) mClientListener.onConnected();\n this.listenIncomingData();\n\n } catch (IOException e) {\n if (mClientListener != null) mClientListener.onConnectError(e.getMessage());\n }\n }", "@Override\r\n\tpublic void connect() throws Exception {\n\t\tclientSocket = new Socket(addr, portnum);\r\n\t\tlistener = new ClientSocketListener(addr, portnum);\r\n\t\tstream = new MessageStream(clientSocket.getOutputStream(),\r\n\t\t\t\tclientSocket.getInputStream());\r\n\t\taddListener(listener);\r\n\t\tsetRunning(true);\r\n\t\tlogger.info(\"Connection established\");\r\n\t\tif (!isAlive())\r\n\t\t\tstart();\r\n\t}", "public void connect() {\n\t\ttry {\n\t\t\tsocket = new Socket(ip, port);\n\t\t\toos = new ObjectOutputStream((socket.getOutputStream()));\n\t\t\tois = new ObjectInputStream((socket.getInputStream()));\n\t\t}catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "protected void connect()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// Socket erstellen\r\n\t\t\tserv = new ServerSocket(port);\r\n\t\t\tlog(\"Socket erstellt!\");\r\n\t\t\t\r\n\t\t\t// jeder eingehenden Verbindung einen \"Client\"-Socket zuweisen\r\n\t\t\tlisten();\r\n\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tlog(\"server konnte nicht erstellt werden: \" + e);\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\t// Socket Schliessen\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tserv.close();\r\n\t\t\t\tlog(\"Verbindung ordnungsgemaess geschlossen.\");\r\n\t\t\t} \r\n\t\t\tcatch (IOException e)\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void connect(){\n\t\ttry{\n\t\tconnection = new WebSocketConnection(url, this,\n\t\t\t\tnew JavaScriptWebSocketFactory());\n\t\t}catch(java.lang.IllegalStateException e){\n\t\t\tConsoleLog.consoleLog(\"Impossibile creare una connessione al server, potrebbe essere occupato o in manutenzione, prova ad aggioranre la pagina.\");\n\t\t}\n\t}", "private void connectToServer() throws IOException\n {\n connection = new Socket(InetAddress.getByName(address), 23610);\n }", "public void connect() {\n System.out.println(\"Connecting...\");\n try {\n this.state = State.CONNECTING;\n\n // connect to server\n connection = new SpreadConnection();\n connection.connect(InetAddress.getByName(serverAddress), serverPort, UUID.randomUUID().toString(), false, true);\n\n // subscribe to messages\n connection.add(this);\n\n // join group\n group = new SpreadGroup();\n group.join(connection, accountName);\n\n\n // this is the only way we can get to know our own ID\n clientId = connection.getPrivateGroup().toString();\n\n waitForMembers();\n } catch (SpreadException | UnknownHostException | InterruptedException connectionException) {\n System.out.println(\"Connection error: \" + connectionException.getMessage());\n connectionException.printStackTrace();\n }\n }", "private static final void connect() {\n \tInetSocketAddress serverAddress = null;\n \twhile (true) {\n \t \ttry {\n \t \t\tserverAddress = ADDRESSES[nextServer()];\n \t \t\tCLIENT.setServerAddress(serverAddress);\n \t\t\t\tCLIENT.connect();\n \t\t\t\tbreak;\n \t\t\t} catch (Exception e) {\n \t\t\t\tLOG.info(\"Error occured when connect to address: {}, client will retry. {}\",\n \t\t\t\t\t\tserverAddress, e.toString());\n \t\t\t\ttry {\n \t\t\t\t\tThread.sleep(3000);\n \t\t\t\t} catch (InterruptedException e1) {}\n \t\t\t}\n \t}\n \tinitSubscribe();\n \t// Client connected, notify all the waiters.\n \tnotifyAllWaiter();\n }", "public void connect() {\n try {\n Class.forName(DRIVER);\n connection = DriverManager.getConnection(URL_CONNECTION, USER, PASSWORD);\n } catch (ClassNotFoundException | SQLException cnfe) {\n cnfe.printStackTrace();\n }\n }", "private synchronized void connect() throws WrapperException\r\n {\r\n output(\"Connecting the server...\");\r\n try\r\n {\r\n socket = establishConnection(talkPort, 1000, 10);\r\n if(socket == null)\r\n throw new ConnectException(\"Connection cannot be established...\");\r\n \r\n output(\"Connection established...\");\r\n\r\n out = new PrintWriter(socket.getOutputStream(), true);\r\n in = new BufferedReader(new InputStreamReader(socket.getInputStream()));\r\n }\r\n catch(UnknownHostException exc)\r\n {\r\n close();\r\n \tthrow new WrapperException(\"Unknown host '\" + host + \"'\", exc, WrapperException.Error.CLIENT_SERVER_CONNECTION);\r\n }\r\n catch(ConnectException exc)\r\n {\r\n close();\r\n \tthrow new WrapperException(\"Cannot connect host '\" + host + \"' on \" + talkPort + \" port\", exc, WrapperException.Error.CLIENT_SERVER_CONNECTION);\r\n }\r\n catch(IOException exc)\r\n {\r\n \tclose();\r\n \tthrow new WrapperException(\"IO error\", exc, WrapperException.Error.CLIENT_SERVER_CONNECTION);\r\n }\r\n }", "private void connect() {\n try {\n //Connecting to port\n serverSocket = new DatagramSocket(PORT);\n System.out.println(\"Socket opened on port: \" + PORT);\n\n //Register Objects & Methods on Dispatcher\n dispatcher = new Dispatcher();\n dispatcher.registerObject(new UserService(), \"UserService\");\n dispatcher.registerObject(new MusicService(), \"MusicService\");\n dispatcher.registerObject(new MP3Handler(), \"MP3Handler\");\n System.out.println(\"Initialized Dispatcher\");\n\n //Initialize sendTracker\n sendTracker = new HashMap<Integer,String>();\n\n } catch (IOException e) {\n System.out.println(e);\n }\n }", "public static void connect() {\n\n try {\n //Connect reader/writer to server\n socket = new Socket(SERVER_URL,SERVER_PORT);\n input = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n writer = new PrintWriter(socket.getOutputStream(),true);\n\n //Read commands from the server\n while(true) {\n String data = input.readLine();\n if(data == null)\n break;\n buffer += data;\n if(debugging)\n System.out.println(\"Incoming Data: \" + data + \". Buffer is now: \" + buffer);\n //Parse Messages\n while(true) {\n //Is there a complete message available?\n int pos = buffer.indexOf(\";\");\n if(pos >= 0) {\n String message = buffer.substring(0,pos);\n buffer = buffer.substring(pos+1);\n handle(message);\n } else {\n break;\n }\n }\n }\n } catch(Exception e) {\n e.printStackTrace();\n System.out.println(e.getMessage());\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the resource locator for this item provider's resources.
@Override public ResourceLocator getResourceLocator() { return LanguageEditPlugin.INSTANCE; }
[ "public String getResourceLocator() {\r\n\t\treturn resourceLocator;\r\n\t}", "public ResourceLocator getResourceLocator() {\n \t\treturn J2EEPlugin.getDefault();\n \t}", "@Override\r\n\tpublic ResourceLocator getResourceLocator()\r\n\t{\r\n\t\treturn ((IChildCreationExtender) adapterFactory).getResourceLocator();\r\n\t}", "@Override\n public ResourceLocator getResourceLocator()\n {\n return ((IChildCreationExtender)adapterFactory).getResourceLocator();\n }", "public ArrayList<URL> getResourcesLocation() {\r\n return resourcesLocation;\r\n }", "public ResourceUrlProvider getResourceUrlProvider()\n/* */ {\n/* 59 */ return this.resourceUrlProvider;\n/* */ }", "@Override\r\n\tpublic ResourceLocator getResourceLocator() {\r\n\t\treturn RestEditPlugin.INSTANCE;\r\n\t}", "public URL[] getModuleSearchLocationResources()\n {\n if (this.moduleSearchLocationResources == null)\n {\n final Collection<URL> allResources = new ArrayList<URL>();\n final Location[] locations = this.getModuleSearchLocations();\n for (final Location location : locations)\n {\n final URL[] resources = location.getResources();\n allResources.addAll(Arrays.asList(resources));\n }\n this.moduleSearchLocationResources = allResources.toArray(new URL[allResources.size()]);\n }\n return this.moduleSearchLocationResources;\n }", "@Override\n\tpublic ResourceLocator getResourceLocator() {\n\t\treturn UimEditPlugin.INSTANCE;\n\t}", "@Override\n\tpublic ResourceLocator getResourceLocator() {\n\t\treturn IoT_metamodelEditPlugin.INSTANCE;\n\t}", "@Override\n\tpublic ResourceLocator getResourceLocator() {\n\t\treturn SecurityEditPlugin.INSTANCE;\n\t}", "public LocalizableStringInner resourceProviderName() {\n return this.resourceProviderName;\n }", "@Override\n\tpublic ResourceLocator getResourceLocator() {\n\t\treturn PgserviceEditPlugin.INSTANCE;\n\t}", "@Override\n\tpublic ResourceLocator getResourceLocator() {\n\t\treturn GestionModelosConsultasEditPlugin.INSTANCE;\n\t}", "public List<BaseScimResource> getResources() {\n return resources;\n }", "public static final Resources resources() {\n return Resources.instance();\n }", "public AdvItemStack getResource() {\n\t\treturn resource;\n\t}", "@Override\n\tpublic Iterator iterator() {\n\t\tif (this.register != null) {\n\t\t\treturn new ResourceProviderRegisterIterator();\n\t\t} else {\n\t\t\treturn new ResourceProviderResourceIterator();\n\t\t}\n\t}", "public ProvidersResource() {\n ConfigSingleton.setRepoxContextUtil(new DefaultRepoxContextUtil());\n dataManager = ((DefaultDataManager)ConfigSingleton.getRepoxContextUtil().getRepoxManager().getDataManager());\n }", "@Override\r\n\tpublic ResourceLocator getResourceLocator() {\r\n\t\treturn pls11EditPlugin.INSTANCE;\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new connection entry.
public Connection createConnection(Packet packet, int proto, int srcIP, int srcPort, int destIP, int destPort) { Connection newConn = null; if (proto == Protocols.TCP) { newConn = new TCPConnection(); } else if (proto == Protocols.UDP) { newConn = new Connection(proto); } newConn.initialise(packet, srcIP, srcPort, destIP, destPort); addConnection(newConn); return newConn; }
[ "public void createConnection(MachineConnection connection);", "void add(Connection connection);", "private C tryNewConnection( final CacheEntry<C> entry,\n final ContactInfo<C> cinfo ) throws IOException {\n\n if (debug())\n dprint( \"->tryNewConnection: \" + cinfo ) ;\n\n try {\n C conn = null ;\n\n if (internalCanCreateNewConnection(entry)) {\n // If this throws an exception just let it\n // propagate: let a higher layer handle a\n // connection creation failure.\n conn = cinfo.createConnection() ;\n\n if (debug()) {\n dprint( \".tryNewConnection: \" + cinfo\n + \" created connection \" + conn ) ;\n }\n }\n\n return conn ;\n } finally {\n if (debug())\n dprint( \"<-tryNewConnection: \" + cinfo ) ;\n }\n }", "static void createConnection(){\n \ttry{\n \t\tconn = dictSrc.getConnection();\n \t}\n \tcatch(SQLException e){\n \t\te.printStackTrace();\n \t}\n }", "public CreateConnectionHandler(JainMgcpStackImpl stack) {\n\t\tsuper(stack);\n\t}", "private void createNewEntry(String tableName, CourseInfoSimple cachedInfo) {\n\t\tthis.tableName = tableName;\n\t\tthis.cachedInfo = cachedInfo;\n\n\t\topenIfNecessaryDB();\n\t\tContentValues cValues = makeCValues(cachedInfo);\n\t\tthis.id = database.insert(tableName, null, cValues);\n\t\tcreateWhereString();\n\t}", "public String createConnection(StatelessSession session, ConnectionRequest connectionRequest) throws Exception{\n\n int tenantMppdbId = connectionRequest.getTenantMppdbId();\n\n // Check user name and password also\n User user = UserDAO.getUser(session, tenantMppdbId, connectionRequest.getUserName(), connectionRequest.getUserPassword());\n ConnectionWrapper conn = this.createConnection(session, user);\n\n connectionRequest.setUserId(user.getUserId());\n connectionRequest.setMppdbId(conn.getMppdbId());\n connectionRequest.setConnectionId(conn.getConnectionId());\n\n return conn.getConnectionId();\n }", "@DISPID(1034) //= 0x40a. The runtime will prefer the VTID if present\r\n @VTID(134)\r\n void connectionEntry(\r\n java.lang.String pVal);", "public HttpPoolEntry createEntry(HttpRoute httpRoute, OperatedClientConnection operatedClientConnection) {\n return new HttpPoolEntry(this.log, Long.toString(COUNTER.getAndIncrement()), httpRoute, operatedClientConnection, this.timeToLive, this.tunit);\n }", "DBLayer create(DBInfo settings) throws RemoteException, NotBoundException, DBLayerException;", "public void newEntry ( String acc, String usr, String pwd, String cmt){\n SQLiteDatabase db = b.getWritableDatabase(key);\n ContentValues registry = new ContentValues();\n //registry.put(DBLayout.DBConstants.PASS_TABLE_ID, id);\n registry.put(DBLayout.DBConstants.PASS_TABLE_ACC, acc);\n registry.put(DBLayout.DBConstants.PASS_TABLE_USER, usr);\n registry.put(DBLayout.DBConstants.PASS_TABLE_PASS, pwd);\n registry.put(DBLayout.DBConstants.PASS_TABLE_COMMENTS, cmt);\n db.insert(DBLayout.DBConstants.PASS_TABLE, null, registry);\n registry.clear();\n setChanged();\n notifyObservers();\n }", "private ConnectionAnchor createConnectionAnchor() {\n\t\treturn new ChopboxAnchor(getFigure());\n\t}", "@Override\n\tpublic Carpentry create(long carpentryId) {\n\t\tCarpentry carpentry = new CarpentryImpl();\n\n\t\tcarpentry.setNew(true);\n\t\tcarpentry.setPrimaryKey(carpentryId);\n\n\t\tString uuid = PortalUUIDUtil.generate();\n\n\t\tcarpentry.setUuid(uuid);\n\n\t\tcarpentry.setCompanyId(CompanyThreadLocal.getCompanyId());\n\n\t\treturn carpentry;\n\t}", "@ServiceMethod(returns = ReturnType.SINGLE)\n BgpConnectionInner createOrUpdate(\n String resourceGroupName,\n String virtualHubName,\n String connectionName,\n BgpConnectionInner parameters,\n Context context);", "private void createConnection(HttpServletRequest p_request, HttpSession p_session)\n throws RemoteException, NamingException, GeneralException\n {\n DBConnectionImpl db = new DBConnectionImpl();\n getParams(p_request, db);\n ServerProxy.getDBConnectionPersistenceManager().createDBConnection(db);\n }", "void addConnectCP(E object);", "ConnectivityNode createConnectivityNode();", "@Override\n\tpublic void create(Object arg) {\n\t\t\n\t\tString nickname = porg.getKey(\"nickname\");\n\t\tString username = porg.getKey(\"username\");\n\t\tString email = porg.getKey(\"email\");\n\t\tString phone = porg.getKey(\"phone\");\n\t\tString pass1 = porg.getKey(\"pass1\");\n\t\tString pass2 = porg.getKey(\"pass2\");\n\t\tString group = porg.getKey(\"group\");\n\n\t\tif (!pass1.equals(pass2)) {\n\t\t\tMsg(_CLang(\"error_pwdneq\"));\n\t\t\treturn;\n\t\t}\n\n\t\tEncrypt en = Encrypt.getInstance();\n\t\tString pwd = en.MD5(pass1);\n\n\t\tTimeClass tc = TimeClass.getInstance();\n\t\tint now = (int) tc.time();\n\n\t\tString format = \"INSERT INTO `\"\n\t\t\t\t+ DB_PRE\n\t\t\t\t+ \"user_info` \"\n\t\t\t\t+ \"(`name`, `passwd`, `cm`, `nickname`, `email`, `ctime`, `ltime`, `gid`, `cid`,`phone`)\"\n\t\t\t\t+ \" VALUES ( '%s', '%s', '%s', '%s', '%s', '%d', '%d', '%s', '%d', '%s')\";\n\t\tString sql = String.format(format, username, pwd, \"\", nickname, email,\n\t\t\t\tnow, now, group, aclGetUid(), phone);\n\n\t\ttry {\n\t\t\tupdate(sql);\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tMsg(_CLang(\"ok_save\"));\n\t}", "protected Connection newConnection() {\n return new SnakeConnection();\n }", "AComposantConnecteur createAComposantConnecteur();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets a Quester of a specific Player
static public Quester getQuester(LivingEntity player) { if (!(player instanceof HumanEntity)) return null; return getQuester(((HumanEntity)player).getName()); }
[ "public Cell findPlayer() {\n return getPlayer().getCell();\n }", "public Player getPlayer(int playerID);", "public Player getPlayer(String username) {\n\t for (Player player : this.connectedPlayers) {\n\t if (player.getUsername().equals(username)) {\n\t return player;\n\t }\n\t }\n\t return null;\n\t }", "public Player getPlayer() {\n for (int i = 0; i < map.length; i++) {\n for (int j = 0; j < map[i].length; j++) {\n if (map[i][j].getOccupier() != null) {\n if (map[i][j].getOccupier() instanceof Player) {\n return (Player) map[i][j].getOccupier();\n }\n }\n }\n }\n return null;\n }", "public Player getPlayer(String username);", "CubikPlayer getCubikPlayer(Player player);", "public Player getPlayer(String username){\n return playerLobby.getPlayer(username);\n }", "public Player getPlayerWithId(String playerId);", "public TrucoPlayer getPlayer(int chair) {\n\t TrucoPlayer ret = null;\n\t try {\n\t ret = (TrucoPlayer) sittedPlayers.get(chair);\n } catch (Exception e) {\n //TODO PP, daba un AIOBE :(\n }\t \n\t\treturn ret;\n\t}", "private Que getQue() {\r\n\t\treturn this.que;\r\n\t}", "Player get(String name);", "public User peek(){\n return _playersQueue.get(0);\n }", "public ClientInterface getPlayerByID(int playerID) { return players.get(playerID); }", "public Player getPlayerInFight() {\n\ttry {\n\t final int playerID = Vars.conn.executeSQL(String.format(\"SELECT duelWith FROM users WHERE id = %d\", id)).getInteger(\"duelWith\");\n\t return new Player(Vars.conn.executeSQL(String.format(\"SELECT username FROM users WHERE id = %d\", playerID)).getString(\"username\"));\n\t} catch (Exception e) {\n\t // When player in fight is null\n\t return null;\n\t}\n }", "public ObjPlayer getPlayer() {\n \t\tfor(int i = 0; i < ObjMem.getSize(); i++) {\n \t\t\tif(getObj(i).getObjName().compareTo(\"player\") == 0)\n \t\t\t\treturn (ObjPlayer) getObj(i);\n \t\t}\n \t\treturn null;\n \t}", "public Player getBukkitPlayer() {\n return Bukkit.getPlayer(uuid);\n }", "public Player getJoueurNoir();", "public Player getPlayer(Person per) {\r\n for (Player p : _players) {\r\n if (p.getPerson().equals(per))\r\n return p;\r\n }\r\n return null;\r\n }", "public Player getPlayer(String name){\n for (Player p : playerList) {\n if (p.name.equals(name)){\n return p;\n }\n }\n System.out.println(\"Player not found.\");\n return null;\n }", "public static Player getPlayer(){\r\n return currentGame.getPlayer();\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Methode um ein Vote anhand der ID zu finden
public Vote getVoteById(int id) { return this.vMapper.findVoteByID(id); }
[ "void voteFor(long pollIdLong, long id);", "public static Vote getVoteByID(String id){\n\t\tfor(Vote vote: votes){\n\t\t\tif(vote.getID().equalsIgnoreCase(id)){\n\t\t\t\treturn vote;\n\t\t\t}\n\t\t}\n\t\t//if we get here there was no vote. Create vote and return that.\n\t\tVote newVote = createVote(id);\n\t\tvotes.add(newVote);\n\t\treturn newVote;\n\t}", "public Voting getVoting(Long id)\n\t{\n\t\tlog.info(\"/voting/\" + id + \" called, retrieving voting\");\n\n\t\treturn votingRepository.findById(id).orElseThrow(() -> new VotingNotFoundException(id));\n\t}", "@Override\r\n\tpublic void sendVote(String id) {\n\t\tmVote = id;\r\n\t\tnextState();\r\n\t\t\r\n\t}", "public static Vote createVote(String id){\n\t\treturn new Vote(id);\n\t}", "WithChainIdHashAndSenderAndVoteId voteId(String voteId);", "public Vote getById(int id, int userId) {\n return checkNotFoundWithId(crudRepository.findById(id)\n .filter(vote -> vote.getUser().getId() == userId)\n .orElse(null), id);\n }", "public void voter(int idAn, int note) {\n\t\tVote v = new Vote();\n\t\tAnnonce an = getAnnonce(idAn);\n\t\tv.setAnnonce(an);\n\t\tv.setMembreVote(persConnecte);\n\t\tv.setMembreRecepteur(an.getProprio());\n\t\tem.persist(v);\n\t\tfloat oldnote=an.getNote();\n\t\tint nbPers=an.getNbPersNotee();\n\t\tan.setNote((oldnote*nbPers+note)/(nbPers+1));\n\t\tan.setNbPersNotee(nbPers+1);\n\t}", "Upvote selectByPrimaryKey(Long id);", "public void addVote();", "long getVoterId();", "public void setIdVenta(int idVenta) {\n this.idVenta = idVenta;\r\n }", "public cn.com.sparkle.firefly.stablestorage.model.StoreModel.Id getVoteId() {\n if (voteIdBuilder_ == null) {\n return voteId_;\n } else {\n return voteIdBuilder_.getMessage();\n }\n }", "public Vehiculo darVehiculo(int id);", "@Override\n\tpublic Vet findById(Long id) {\n\t\treturn super.findById(id);\n\t}", "public IdVeicolo getId() {\r\n\t\treturn id;\r\n\t}", "public int getId() {return posisjon;}", "public Long getIdVenta() {\n return idVenta;\n }", "@Override\n\tpublic DetalleVenta leerPorId(Integer id) {\n\t\treturn null;\n\t}", "@Override\n public Venda find(Long id) {\n return vendaRepository.findOne(id);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a list of the NozzleTips currently attached to the Nozzle.
public List<NozzleTip> getNozzleTips();
[ "public com.google.protobuf.ByteString\n getTipsBytes() {\n java.lang.Object ref = tips_;\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 tips_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public java.lang.String getTips() {\n java.lang.Object ref = tips_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n tips_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String[] getTooltips() {\r\n return this.tooltips;\r\n }", "@RequestMapping(value = \"/tips\", method = RequestMethod.GET)\n\tpublic @ResponseBody List<Tip> tipsList() {\n\t\treturn (List<Tip>) tiprepo.findAll();\n\t}", "public String getHatTips() {\n\t\tif (this.hatTips == null || this.hatTips.length() == 0) {\n\t\t\treturn \"\";\n\t\t}\n\t\treturn this.hatTips;\n\t}", "public List<String> getTipos() {\r\n List<TipoAmenaza> posibles = tipoAmenazaDAO.buscarTipoActivo(arbolActivosController.getActivoActual().getTipoActivo());\r\n List<String> nombres = new ArrayList<>();\r\n for (int i = 0; i < posibles.size(); i++) {\r\n nombres.add(posibles.get(i).getNombre());\r\n }\r\n return nombres;\r\n }", "public Builder clearTips() {\n bitField0_ = (bitField0_ & ~0x00000800);\n tips_ = getDefaultInstance().getTips();\n onChanged();\n return this;\n }", "@Override\n\tprotected String getTips() {\n\t\tif (isCollection()) {\n\t\t\treturn \"暂无收藏\";\n\t\t} else if (isApply()) {\n\t\t\treturn \"暂无参与\";\n\t\t}\n\t\treturn super.getTips();\n\t}", "private String[] getTips(){\n String[] result = null;\n\n result = new String[]{\n \"Cheque vazamentos em canos e não deixe torneiras pingando. Um gotejamento \" +\n \"simples, pode gastar cerca de 45 litros de água por dia.\",\n \"Deixe pratos e talheres de molho antes de lavá-los.\",\n \"Aproveite a água da chuva para aguar as plantas e o jardim. As plantas absorvem \" +\n \"mais água em horários quentes, então molhe-as de manhã cedo ou no fim do dia.\",\n \"Feche a torneira quando estiver escovando os dentes ou fazendo a barba. Só abra \" +\n \"quando for usar. Uma torneira aberta por 5 minutos desperdiça 80 litros de água.\",\n \"Em vez da mangueira, use vassoura e balde para lavar patios e quintais. Uma \" +\n \"mangueira aberta por 30 minutos libera cerca de 560 litros de água.\",\n \"Reaproveite a água da sua máquina de lavar para lavar a calçada.\",\n \"Saber ler o hidrômetro é muito simples e pode ajudar a detectar problemas como \" +\n \"vazamentos, percebidos pelo consumo fora do normal.\",\n \"Não tome banhos demorados, 5 minutos são suficientes. Uma ducha durante 15 \" +\n \"minutos consome 135 litros de água.\",\n \"Antes de lavar pratos e panelas, limpe os restos de comida com uma escova ou \" +\n \"esponja e jogue no lixo.\",\n \"Reduza o tempo do banho e feche o registro enquanto se ensaboa: a água do \" +\n \"chuveiro também pode ser aproveitada para lavar roupa ou outra atividade\" +\n \" da casa, basta colocar balde ou bacia para armazenar essa água\",\n \"Não use o vaso sanitário como lixeira (não jogue ali papel higiênico e cigarro, \" +\n \"por exemplo)\",\n \"Junte roupa e use a máquina de lavar apenas quando estiver com a capacidade total; no \" +\n \"tanque, mantenha a torneira fechada enquanto ensaboa a roupa\",\n \"Não lave o carro com mangueira; use balde e pano\"\n };\n\n return result;\n }", "public protobuf.clazz.coin.CoinProtocol.MessageTipOrBuilder getTipOrBuilder() {\n if (tipBuilder_ != null) {\n return tipBuilder_.getMessageOrBuilder();\n } else {\n return tip_;\n }\n }", "MoveCommandInterface[] tip() throws TipException;", "@Override\n\tpublic List<String> getToolTip(int x, int y) {\n\t\treturn null;\n\t}", "public void reloadTipsArray(){\n if(cache.isEmpty(TIPS_FILE)){\n if(!storeTips()){\n oneTimeTipBuffer();\n }\n }\n\n String[] _tips = cache.loadFile(TIPS_FILE).split(\"\\n\");\n Collections.addAll(tips, _tips);\n if(!cache.isEmpty(USER_TIPS)){\n String[] _uTips = cache.loadFile(USER_TIPS).split(\"\\n\");\n Collections.addAll(tips, _uTips);\n }\n return;\n }", "private String getTip(ArrayList<String> tipsList) {\n int randomIndex = (int) (Math.random() * tipsList.size());\n return tipsList.get(randomIndex);\n }", "public String getTipText() {\n return mTipText;\n }", "public boolean hasTips() {\n return ((bitField0_ & 0x00020000) == 0x00020000);\n }", "protobuf.clazz.coin.CoinProtocol.MessageTip getTip();", "public List getAllTiposAcciones();", "public java.util.List<yandex.cloud.api.k8s.v1.NodeOuterClass.Taint> getTaintsList() {\n if (taintsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(taints_);\n } else {\n return taintsBuilder_.getMessageList();\n }\n }", "public List<TipoSolicitudListado> getTiposSolicitud();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form VentaEntradasPanel
public VentaTicketPanel(ArrayList<ButacaSesion> butacas, SesionBean sesion) { initComponents(); this.butacas=butacas; this.sesion=sesion; this.sesion.cargaPrecios(); cargarComboDescuetos(); jLabelObra.setText(sesion.getDescripcion()); jLabelFecha.setText(sesion.getFecha()); jLabelHora.setText(sesion.getHora()); jLabelNEntrdas.setText(""+butacas.size()); jLabelPrecio.setText(""+PrecioUtils.getPrecioEuros(sesion.getPrecio())); int total=butacas.size()*sesion.getPrecio(); jLabelTotal.setText(PrecioUtils.getPrecioEuros(total)); if(butacas.get(0).getIdEstado()==3){ //Todas las butacas deben tener el mismo estado cargarMotivos(butacas, sesion); }else{ cargarButacas(butacas); } }
[ "private void crearProductosVista(JPanel panel) { \n panel.setLayout(new FlowLayout()); \n productosVista = \n new ProductosVista(this, ProductosVista.RECIBIR_EVENTOS_RATON);\n panel.add(productosVista); \n }", "public JFVentasCrear() {\n initComponents();\n }", "protected abstract JPanel creaPanelEsternoContanti();", "public static void crearNuevoTrabajador() {\r\n\t\tview.DiaTrabajador dialogTrb = new view.DiaTrabajador();\r\n\t\tDiaTrabajador.btnGuardar.setVisible(false);\r\n\r\n\t}", "@Override\n\tpublic void createContents(Panel ventana) {\n\t\tthis.setTitle(\"Sist. Notas\");\n\t\tnew Label(ventana).setText(\"Datos estudiantiles\").setWidth(300);\n\t\tPanel columnas = new Panel(ventana);\n\t\tcolumnas.setLayout(new ColumnLayout(2));\n\t\tnew TokenDialog(this, this.getModelObject()).open();\t\n\t\tnew Label(columnas).setText(\"Nombre:\");\n\t\tnew Label(columnas).setWidth(100).bindValueToProperty(\"nombre\");\n\t\tnew Label(columnas).setText(\"Apellido:\");\n\t\tnew Label(columnas).setWidth(100).bindValueToProperty(\"apellido\");\n\t\tnew Label(columnas).setText(\"Legajo:\");\n\t\tnew Label(columnas).setWidth(100).bindValueToProperty(\"legajo\");\n\t\tnew Label(columnas).setText(\"GitUser:\");\n\t\tnew Label(columnas).setWidth(100).bindValueToProperty(\"gitHubUser\");\n\t\tnew Button(columnas).setCaption(\"Ver Notas\").onClick(()->this.hacerAlgo());\n\t\tnew Button(columnas).setCaption(\"Modificar\").onClick(()->this.modificarAlumnoWindowsIniciar());\n\t\tnew Button(ventana).setCaption(\"Cerrar\").onClick(()->this.close());\n\t}", "public VendedorForm() {\n initComponents();\n listar();\n }", "private void crearVentanaPrincipal() { \n ventana = new JFrame(TITULO);\n \n ventana.addWindowListener(new WindowAdapter() {\n @Override\n public void windowClosing(WindowEvent e) {\n oyenteVista.notificar(OyenteVista.Evento.SALIR, null);\n }\n });\n \n ventana.getContentPane().setLayout(new BorderLayout());\n \n // creamos elementos \n JPanel panelProductos = new JPanel();\n crearProductosVista(panelProductos);\n ventana.getContentPane().add(panelProductos, BorderLayout.CENTER);\n \n JPanel panelComanda = new JPanel();\n crearComandaVista(panelComanda);\n ventana.getContentPane().add(panelComanda, BorderLayout.EAST);\n \n // hacemos visible la ventana \n ventana.setResizable(false); \n \n ventana.pack(); // ajusta ventana y sus componentes\n ventana.setVisible(true);\n ventana.setLocationRelativeTo(null); // centra en la pantalla\n }", "public ventanaRegistro() {\n initComponents();\n }", "public VentanaDatosCreacionSede_Modulo2(Controlador control,String[] pLocalidades)\r\n\t{\r\n\t\t\r\n\t\t\r\n\t\tsetLayout( new GridLayout(4,2) );\r\n\t\tsetSize (520,200);\r\n\t\tsetResizable(false);\r\n\t\tsetTitle(\"Registro de sedes\");\r\n\t\tsetDefaultCloseOperation(DISPOSE_ON_CLOSE);\r\n\t\tsetLocationRelativeTo(null);\r\n\t\t\r\n\t\t\r\n\t\t//Creación de todos los campos de texto y titulos\r\n\t\ttxtLocalidadActual = new JTextField(20);\r\n\t\ttxtLocalidadActual.setEditable(false);\r\n\t\t\r\n\t\tnumeroEmpleados = new JLabel (\"Digite la cantidad de trabajadores de la sede\");\r\n\t\ttxtNumeroEmpleados = new JTextField();\r\n\t\ttxtNumeroEmpleados.setForeground(Color.BLACK);\r\n\t\ttxtNumeroEmpleados.setBackground(Color.WHITE);\r\n\t\t\r\n\t\tnombreSede = new JLabel (\"Digite el nombre de la sede\");\r\n\t\ttxtNombreSede = new JTextField(\"\");\r\n\t\ttxtNombreSede.setForeground(Color.BLACK);\r\n\t\ttxtNombreSede.setBackground(Color.WHITE);\r\n\t\t\r\n\t\tbotonCrear = new JButton(\"CREAR ARCHIVO\");\r\n\t\tbotonCrear.setActionCommand(CREAR);\r\n\t\t\r\n\t\t\r\n\t\tbotonCrear.addActionListener(control);\r\n\r\n\t\t\r\n\t\t// Crea el JComboBox y agrega los items.\r\n\t\tlista = new JComboBox<String>();\r\n\t\t\r\n\t\tfor(int i=0; i<pLocalidades.length; i++) {\r\n\t\t\tlista.addItem(pLocalidades[i]);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//agrega todos los items del panel.\r\n\t\tadd(lista);\r\n\t\t\r\n\t\tadd(txtLocalidadActual);\r\n\t\tadd(numeroEmpleados);\r\n\t\tadd(txtNumeroEmpleados);\r\n\t\tadd(nombreSede);\r\n\t\tadd(txtNombreSede);\r\n\t\tadd(new JLabel());\r\n\t\tadd(botonCrear);\r\n\t\t\r\n\t\t\r\n\t\tsetVisible(true);\r\n\t\t\r\n\t\t\r\n\t\t// Accion a realizar cuando el JComboBox cambia de item seleccionado.\r\n\t\t//Empieza aquí\r\n\t\tlista.addActionListener(new ActionListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\ttxtLocalidadActual.setText(lista.getSelectedItem().toString());\r\n\t\t\t}\r\n\r\n\t\t\r\n\t\t});\r\n\t\t//Termina aquí\r\n\t}", "public VNuevaPregunta() {\n initComponents();\n anadirPanelResp();\n\n }", "public AjouterEtudiantPanel() {\n initComponents();\n }", "public CreateInstancesJPanel(int type) {\n initComponents();\n frame = new Frame();\n if(type==0){\n int pos = CreateInstancesJPanel.getContadorClas();\n this.setPosicion(pos);\n int cont = pos+1;\n CreateInstancesJPanel.setContadorClas(cont);\n }else if(type==1){\n int pos = CreateInstancesJPanel.getContadorProp();\n this.setPosicion(pos);\n int cont = pos+1;\n CreateInstancesJPanel.setContadorProp(cont);\n }\n frameComent = new AddComentJDialog(frame,true); \n frameComent.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE);\n }", "public String crearNuevoVehiculo(){\n\t\treturn \"/modules/vehiculo/nuevoVehiculo.xhtml?faces-redirect=true\";\n\t}", "public void limpiarVenta(){\n panelLateral.limpiarVenta();\n }", "public JPanel creaPannello();", "public FrmRegistroEntrada() {\n initComponents();\n readCadastroProduto();\n pnlRetiradaProduto.setEnabledAt(1, false);\n setTitle(\"Registro de Acompanhamentos de Lotes\");\n }", "public ventanaGerente() {\n super(\"ABC Enterprises: Gerente\");\n initComponents();\n \n paneles.add(panelAgregarUsuario); //indice 0\n paneles.add(panelAgregarSede);//indice 1\n paneles.add(panelAgregarPieza); //indice 2\n paneles.add(panelAgregarVehiculo); //indice 3\n paneles.add(panelModificarUsuario); //indice 4\n paneles.add(panelVisualizarUsuario); //indice 5\n paneles.add(panelModificarSede);//indice 6\n \n setPanelesInvisible(-1);//Se llama a este metodo con -1, para garantizar que ningun panel sea visible\n }", "public void newPersona() {\n\t\tcleanForm();\n\t\tthis.action = Action.NEW;\n\t\tthis.stateNewEdit();\n\t\tthis.addMessage(\"Hice click en Nuevo\");\n\t}", "public frmVenda(UsuarioSistema usuario) {\n initComponents();\n carregaClientes();\n carregaProdutos();\n carregaFormasPagamento();\n venda = new Venda();\n venda.setUsuario(usuario);\n txtVendedor.setText(usuario.getNome());\n txtQuantidade.setText(\"1\");\n \n }", "public void openCadastroConteudoProgramatico(){\n\t\tthis.vPanelBody.clear();\n\t\tvPanelBody.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);\n\t\t\n\t\tCadastroConteudoProgramatico cadastroConteudoProgramatico = new CadastroConteudoProgramatico();\n\t\tthis.vPanelBody.add(cadastroConteudoProgramatico);\n\t\tthis.vPanelMenu.setVisible(true);\n\t\n\t\t\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a wait dialog, not visible.
public void createWaitDialog() { waitDialog = waitPane.createDialog(frame, "Waiting"); waitDialog.addWindowListener(new WaitDialogCloseListener(controler)); }
[ "public void createLoadingDialog() {\n waiting_dialog = new ProgressDialog(this);\n waiting_dialog.setCancelable(true);\n waiting_dialog.setCanceledOnTouchOutside(false);\n waiting_dialog.setOnCancelListener(new DialogInterface.OnCancelListener() {\n @Override\n public void onCancel(DialogInterface dialog) {\n waiting_dialog.hide();\n }\n });\n ((ProgressDialog) waiting_dialog)\n .setProgressStyle(ProgressDialog.STYLE_SPINNER);\n waiting_dialog.setMessage(getString(R.string.pdb_query_message));\n\n waiting_dialog.show();\n }", "protected ProgressDialog createProcessDialog() {\n\t\tprogressDialog = new ProgressDialog(this);\n\t\tprogressDialog.setMessage(\"Loading...\");\n\t\treturn progressDialog;\n\t}", "@Override\r\n\tprotected Dialog onCreateDialog(int id) {\r\n\t\tProgressDialog dialog = new ProgressDialog(this);\r\n\t\tdialog.setMessage(\"Please wait while loading...\");\r\n\t\tdialog.setIndeterminate(true);\r\n\t\tdialog.setCancelable(true);\r\n\t\tdialog.setOnDismissListener(this);\r\n\t\treturn dialog;\r\n\t}", "private JDialog createConfirmDialog(Intervention intervention)\r\n {\r\n final Action action = getAction(intervention);\r\n\r\n Runnable runnable = new Runnable()\r\n {\r\n public void run()\r\n {\r\n action.actionPerformed(null);\r\n }\r\n };\r\n\r\n return Utilities.createConfirmDialog(parent,\r\n intervention.message,\r\n intervention.title,\r\n runnable);\r\n }", "public WaitDialog(java.awt.Frame parent, boolean modal) {\n super(parent, modal);\n initComponents();\n }", "@Override\n\t\t\tprotected void onPreExecute() {\n\t\t\t\tsuper.onPreExecute();\n\n\t\t\t\tdialog = new Dialog(Evento.this);\n\t\t\t\tdialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\t\t\tdialog.setContentView(R.layout.dialog_wait);\n\t\t\t\tdialog.getWindow().setBackgroundDrawableResource(\n\t\t\t\t\t\tR.drawable.dialog_rounded_corner_light_black);\n\t\t\t\tdialog.show();\n\t\t\t\tdialog.setCancelable(true);\n\t\t\t\tdialog.setOnCancelListener(new OnCancelListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tcancel(true);\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t}", "private void showWaiting() {\n\n\t\twaitingPanel = new JPanel();\n\n\t\twaitingPanel.setLayout(new BoxLayout(waitingPanel, BoxLayout.Y_AXIS));\n\n\t\tmessageBox = new JTextField();\n\n\t\tmessageBox.setEditable(false);\n\t\tJProgressBar pb = new JProgressBar();\n\t\tpb.setIndeterminate(true);\n\t\t\n\t\twaitingPanel.add(messageBox, BorderLayout.SOUTH);\n\t\twaitingPanel.add(pb, BorderLayout.SOUTH);\n\n\t\tthis.add(waitingPanel, BorderLayout.SOUTH);\n\n\t}", "public StandardDialog()\n {\n init();\n }", "private void waitForDialog() {\n CriteriaHelper.pollUiThread(() -> {\n ModalDialogManager manager = mActivityTestRule.getActivity().getModalDialogManager();\n PropertyModel dialog = manager.getCurrentDialogForTest();\n if (dialog == null) return false;\n dialog.get(ModalDialogProperties.CONTROLLER)\n .onClick(dialog, ModalDialogProperties.ButtonType.POSITIVE);\n return true;\n });\n }", "public void show() {\r\n\t\t// If timeout is set, the wait for a limited amount of time before setting a default response\r\n\t\tif (_timeout > 0) {\r\n\t\t\t_started = true;\r\n\t\t\t_thread = new Thread(this, \"TimeoutDialog\");\r\n\t\t\t_thread.start();\r\n\t\t}\r\n\r\n\t\t_dialog.setVisible(true);\r\n\r\n\t\tif (_thread != null) {\r\n\t\t\t_started = false;\r\n\t\t\t_thread.interrupt();\r\n\t\t}\r\n\r\n\t\t_dialog.dispose();\r\n\t}", "@Override\n\t\t\tprotected void onPreExecute() {\n\t\t\t\tsuper.onPreExecute();\n\n\t\t\t\tdialog = new Dialog(DettaglioSport.this);\n\t\t\t\tdialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\t\t\tdialog.setContentView(R.layout.dialog_wait);\n\t\t\t\tdialog.getWindow().setBackgroundDrawableResource(\n\t\t\t\t\t\tR.drawable.dialog_rounded_corner_light_black);\n\t\t\t\tdialog.show();\n\t\t\t\tdialog.setCancelable(true);\n\t\t\t\tdialog.setOnCancelListener(new OnCancelListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tcancel(true);\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t}", "public Dialog onCreateDialog(int id) {\n switch (id) {\n case 0:\n this.prgDialog = new ProgressDialog(this);\n this.prgDialog.setMessage(\"Downloading DIVX file. Please wait...\");\n this.prgDialog.setIndeterminate(false);\n this.prgDialog.setMax(100);\n this.prgDialog.setProgressStyle(1);\n this.prgDialog.setCancelable(false);\n this.prgDialog.show();\n return this.prgDialog;\n default:\n return null;\n }\n }", "public synchronized static void launchWaitDialog(final String title, final WaitDialogListener listener, String cancelButtonText) {\r\n\t\tcancelString = cancelButtonText;\r\n\t\tlaunchWaitDialog(title, listener);\r\n\t}", "private Dialog createGetEqDialog() {\n ProgressDialog dialog = new ProgressDialog(this);\n dialog.setMessage(this.getString(R.string.progressDialogue)); // Set the parameters of the dialog:\n dialog.setIndeterminate(true);\n dialog.setCancelable(true);\n return dialog; \n\t}", "private ProgressDialog() {\r\n\t}", "protected abstract void waitUntilVisible();", "@Override\n\t\t\tpublic void run() {\n\t\t\t\twaitDialog = new ProgressDialog(caller);\n\t\t\t\twaitDialog.setTitle(\"\");\n\t\t\t\twaitDialog.setMessage(caller\n\t\t\t\t\t\t.getString(R.string.querying_filesys));\n\t\t\t\twaitDialog.setIndeterminate(true);\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(100);\n\t\t\t\t\tif (this.isInterrupted()) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcaller.runOnUiThread(new Runnable() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\n\t\t\t\t\t\t\t\tif (waitDialog != null)\n\t\t\t\t\t\t\t\t\twaitDialog.show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\tLog.e(TAG,\n\t\t\t\t\t\t\t\"Progressbar waiting thread encountered exception \",\n\t\t\t\t\t\t\te);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "protected void createDialogIfNecessary() {\n if (distance_equation_dialog == null) {\n Container container = getParent(); while (container instanceof Frame == false) container = container.getParent();\n distance_equation_dialog = new DistanceEquationDialog((Frame) container);\n }\n }", "public DownloadDialog(){}", "private void showDialog()\n\t{\n\t\tmProgress = ProgressDialog.show(this, \"Thinking\",\n\t\t\t\"Waiting for Facebook\", true);\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
if this button is clicked, just close the dialog box and do nothing
public void onClick(DialogInterface dialog, int id) { dialog.cancel(); }
[ "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface arg0, int arg1) {\n\t\t\t\t\t\tdialog.dismiss();\n\n\t\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\tdialog.dismiss(); \n\t\t\t\t\t\t}", "@Override\r\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog) {\n\t\t\t\t\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t\t\t\t\t}", "@Override\n public void onClick(DialogInterface dialog, int whichButton) {\n dialog.dismiss();\n }", "@Override\n\t\t\t\t\t\t\t\t\t\t\t\tpublic void onClick(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDialogInterface arg0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tint arg1) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t\t\t\t\t\t}", "@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int arg1) {\n\t\t\t \tdialog.dismiss();\n\t\t\t}", "@Override\r\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog) {\n\t\t\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t\t\t}", "@Override\n public void onClick(View v) {\n dialog_box.dismiss();\n }", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\twantoExit = false;\n\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t}", "void cancelButtonPressed()\n\t{\n\t\tcloseDlg();\n\t}", "@Override\n public void onClick(DialogInterface dialog, int whichButton) {\n dialog.dismiss();\n }", "@Override\r\n public void onClick(View v) {\n mdialog.dismiss();\r\n }", "@Override\r\n public void onClick(DialogInterface dialog,\r\n int id) {\n dialog.dismiss();\r\n }", "@Override\n public void onClick(View view) {\n\n dialog.dismiss();\n }", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}", "@Override \n public void onClick(DialogInterface arg0, int arg1) {\n arg0.dismiss(); \n }", "@Override\r\n\tpublic void onOkButton() {\n\t\tdialog.cancel();\r\n\t}", "@Override\t\n\t \t\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t \t\t\t\t\t\t\t\t\t\t\tint which) {\n\t \t\t\t\t\t\t\t\t\t\tdialog.dismiss();\n\t \t\t\t\t\t\t\t\t\t\t\n\t \t\t\t\t\t\t\t\t\t}", "public void onClick(DialogInterface dialog, int whichButton) {\n\t\t\t dialog.dismiss();\n\t\t\t return; \n\t\t\t\t }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n dlg.cancel();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Entry point for an InstructionVisitor.
public abstract void visit(InstructionVisitor visitor);
[ "public void accept(MethodVisitor mv) {\n/* 80 */ mv.visitInsn(this.opcode);\n/* 81 */ acceptAnnotations(mv);\n/* */ }", "private void accept() {\n mv.visitVarInsn(ins, i);\n }", "public void enter(InstructionInfo instruction, XPathContext context) {\n // do nothing\n }", "public void visit(InstructionVisitor visitor) throws LinkageException {\n visitor.doArithmeticOp(this);\n }", "@Override\n public void visit(IrLabel n) {\n }", "public interface InstrVisitor {\n public void visit(InstrDecl d);\n }", "public void handleNodeInstrOutput(NodeInstrOutput node)\n throws VisitorException;", "public interface Visitor extends InstrVisitor, SubroutineVisitor, OperandVisitor, EncodingVisitor {\n }", "public void visit(InstructionVisitor visitor) throws LinkageException {\n visitor.doGoto(this);\n }", "@Override\n public void accept( final Visitor v ) {\n v.visitVariableLengthInstruction(this);\n v.visitStackConsumer(this);\n v.visitBranchInstruction(this);\n v.visitSelect(this);\n v.visitLOOKUPSWITCH(this);\n }", "abstract protected void emit(AsmInstruction instr);", "private void execute(InstructionParser ip) throws IOException {\n\t\tMachine machine = new Machine(ip.getMainPosition(), ip.getJumpTable());\n\t\tmachine.setIo(new Io(argp.getInput(),argp.getOutput()));\n\t\tInterpreter interpreter = new Interpreter(ip.get());\n\n\t\tif (argp.isIn(Mode.TRACE)) {\n\t\t\tLogger log = new Logger(argp.getFilename());\n\t\t\tinterpreter.setLogger(log);\n\t\t}\n\n\t\tif (argp.isIn(Mode.NOMETRICS)) {\n\t\t\tinterpreter.disableMetricsReport();\n\t\t}\n\n\t\tinterpreter.run(machine);\n\t}", "public void visit(MainClass n) {\n }", "@Override\n public void accept(InstructionBlock instructionBlock) {\n noticeListeners(instructionBlock);\n }", "public Instruction() {\r\n\t\tsuper();\r\n\t\tthis.registerList = new ArrayList<>();\r\n\t}", "public interface InstructionScanner {\n /**\n * Traverse an edge.\n */\n public void traverseEdge(Edge edge);\n\n /**\n * Traverse an instruction.\n */\n public void scanInstruction(InstructionHandle handle);\n\n /**\n * Return true if this scanner has completed, false otherwise.\n */\n public boolean isDone();\n}", "public void handleNodeInstrBlock(NodeInstrBlock node)\n throws VisitorException;", "public abstract void acceptInvocationTargetVisitor(Interpreter v) throws Throwable;", "public Instruction() {}", "T visit(Program p);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Assumes that given state is of type nt:file and then reads
@Nullable public static Blob getBlob(NodeState state, String resourceName){ NodeState contentNode = state.getChildNode(JcrConstants.JCR_CONTENT); checkArgument(contentNode.exists(), "Was expecting to find jcr:content node to read resource %s", resourceName); PropertyState property = contentNode.getProperty(JcrConstants.JCR_DATA); return property != null ? property.getValue(Type.BINARY) : null; }
[ "private void read_state() throws FileNotFoundException\n {\n FileInputStream fis = new FileInputStream(\"save/server_state_\" + this.port + \".obj\");\n\n try\n {\n ObjectInputStream in = new ObjectInputStream(fis);\n\n this.Bank = (Bank) in.readObject();\n this.last_msg_seen = (long) in.readObject();\n\n //System.out.println(\"Last request received before death: \" + last_msg_seen);\n in.close();\n //System.out.println(\"Read previous state\");\n }\n catch (IOException | ClassNotFoundException e){\n e.printStackTrace();\n }\n }", "public synchronized void loadContents() throws Exception {\n // read item states\n FileSystemResource fsRes = new FileSystemResource(wspFS, STATE_FILE_PATH);\n if (!fsRes.exists()) {\n return;\n }\n BufferedInputStream bis = new BufferedInputStream(fsRes.getInputStream());\n DataInputStream in = new DataInputStream(bis);\n\n try {\n int n = in.readInt(); // number of entries\n while (n-- > 0) {\n byte type = in.readByte(); // entry type\n ItemId id;\n if (type == NODE_ENTRY) {\n // entry type: node\n String s = in.readUTF(); // id\n id = NodeId.valueOf(s);\n } else {\n // entry type: property\n String s = in.readUTF(); // id\n id = PropertyId.valueOf(s);\n }\n int length = in.readInt(); // data length\n byte[] data = new byte[length];\n in.readFully(data); // data\n // store in map\n stateStore.put(id, data);\n }\n } finally {\n in.close();\n }\n\n // read references\n fsRes = new FileSystemResource(wspFS, REFS_FILE_PATH);\n bis = new BufferedInputStream(fsRes.getInputStream());\n in = new DataInputStream(bis);\n\n try {\n int n = in.readInt(); // number of entries\n while (n-- > 0) {\n String s = in.readUTF(); // target id\n NodeId id = NodeId.valueOf(s);\n int length = in.readInt(); // data length\n byte[] data = new byte[length];\n in.readFully(data); // data\n // store in map\n refsStore.put(id, data);\n }\n } finally {\n in.close();\n }\n }", "private static PersistentData readObjState(Logger log, String curFile,\n\t\t\tAppPersistenceIO appio ) \n\t\t\t\tthrows IOException,ClassNotFoundException {\n\t\tPersistentData data = new PersistentData();\n\t\tint ver = 2;\n\t\ttry {\n\t\t\tFile f = new File( curFile );\n\t\t\tFileInputStream fs = new FileInputStream( f );\n\t\t\ttry {\n\t\t\t\tObjectInputStream is = new ObjectInputStream( fs );\n\t\t\t\tver = is.readInt();\n\t\t\t\tif(log.isLoggable(Level.FINER) ) log.finer\n\t\t\t\t\t(\"Reading version=\"+ver+\" object state from \"+f);\n\t\t\t\tif( ver == 1 ) {\n\t\t\t\t\tdata = (PersistentData)is.readObject();\n\t\t\t\t\tif( data == null )\n\t\t\t\t\t\tthrow new NullPointerException( \"Unexpected null data read from stream\");\n\t\t\t\t} else {\n\t\t\t\t\tdata = new PersistentData();\n\t\t\t\t\tdata.attrs = (Entry[])readObjectEntry( is );\n\t\t\t\t\tdata.groups = (String[])readObjectEntry( is );\n\t\t\t\t\tdata.locators = (LookupLocator[])readObjectEntry( is );\n\t\t\t\t}\n\t\t\t\tif(log.isLoggable(Level.FINER) ) log.finer(\"Read data: \"+data );\n\t\t\t\tif(log.isLoggable(Level.FINER) ) log.finer(\"Reading app state\" );\n\t\t\t\tappio.readAppState( is );\n\t\t\t\tis.close();\n\t\t\t} finally {\n\t\t\t\tfs.close();\n\t\t\t}\n\t\t} catch( FileNotFoundException ex ) {\n\t\t\tlog.log( Level.FINE, ex.toString(), ex );\n\t\t}\n\t\t// In version 2 we store the serviceID separately so that the Entry codebases\n\t\t// can be reset, but we don't have to worry about the serviceID being reset.\n\t\tif( ver >= 2 ) {\n\t\t\tFile f = new File( curFile+\".id\" );\n\t\t\tFileInputStream fs = new FileInputStream( f );\n\t\t\ttry {\n\t\t\t\tObjectInputStream is = new ObjectInputStream( fs );\n\t\t\t\tver = is.readInt();\n\t\t\t\tif(log.isLoggable(Level.FINER) ) log.finer\n\t\t\t\t\t(\"Reading version=\"+ver+\" serviceID (have=\"+data.id+\") state from \"+f);\n\t\t\t\tdata.id = (ServiceID)is.readObject();\n\t\t\t\tif( log.isLoggable( Level.FINER) ) log.finer\n\t\t\t\t\t(\"found old id: \"+data.id );\n\t\t\t\tis.close();\n\t\t\t} finally {\n\t\t\t\tfs.close();\n\t\t\t}\n\t\t}\n\t\tlog.fine( \"readObjState read: \"+data );\n\t\treturn data;\n\t}", "protected abstract void readState(ByteBuffer buffer) throws IOException;", "private void readStatesFile(String file)\n {\n try \n {\n BufferedReader br = new BufferedReader(new FileReader(file));\n String line;\n while ((line = br.readLine()) != null) \n { \n states.insert(new State(line)); \n } \n br.close();\n } \n catch (FileNotFoundException e) \n {\n System.err.format(\"File Not Found Exception\\n\");\n } \n catch (IOException e) \n {\n System.err.format(\"IO Exception\\n\");\n } \n catch (Exception e) \n {\n System.err.format(\"Exception\\n\");\n } \n }", "private void loadState() {\r\n\r\n try {\r\n ObjectInputStream inputStream = new ObjectInputStream(new FileInputStream(FILENAME));\r\n\r\n NimState state = (NimState) inputStream.readObject();\r\n\r\n // set collection to previous game's players collection information\r\n playersCollection = state.getPlayersCollection();\r\n playersCount = state.getPlayersCount();\r\n\r\n inputStream.close();\r\n\r\n } catch (FileNotFoundException e) {\r\n System.out.println(\"Could not find file!\");\r\n } catch (IOException e) {\r\n System.out.println(\"Could not read from file!\");\r\n } catch (ClassNotFoundException e) {\r\n System.out.println(\"Could not find class!\");\r\n }\r\n }", "S readState(String state);", "private void read() throws IOException\n\t{\n\t\tPath start = location;\n\t\tFiles.walkFileTree(start, new SimpleFileVisitor<Path>()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic FileVisitResult visitFile(Path file, BasicFileAttributes attrs)\n\t\t\t{\n\t\t\t\tif (isDyd(file)) readDyd(file);\n\t\t\t\treturn FileVisitResult.CONTINUE;\n\t\t\t}\n\t\t});\n\t}", "public abstract State decode(InputStream in) throws IOException;", "public abstract T readFile(File file);", "InputStream read(String path);", "T readFile(String fileId) throws Exception;", "public FileState getStateForPath(TreeConnection tree, String path)\n throws FileNotFoundException\n {\n // Check if there is a cached state for the path\n \n ContentContext ctx = (ContentContext) tree.getContext();\n FileState fstate = null;\n \n if ( ctx.hasStateCache())\n {\n // Get the file state for a file/folder\n \n fstate = ctx.getStateCache().findFileState(path);\n }\n \n // Return the file state\n \n return fstate;\n }", "public void _read( org.omg.CORBA.portable.InputStream is )\r\n {\r\n resource_state = org.omg.Session.TaskHelper.read(is);\r\n }", "public void read() {\r\n\t\tInputStream is = FileUtil.getInputStream(this.name);\r\n\t\ttry {\r\n\t\t\tthis.read(is, true);\r\n\t\t} catch (Exception e) {\r\n\t\t\tif (log.isErrorEnabled()) { log.error(\"Exception in loading map\", e); }\r\n\t\t} finally {\r\n\t\t\ttry { is.close(); } catch (Exception e) {}\r\n\t\t\tis = null;\r\n\t\t}\r\n\t}", "void read(IDevTree tree, String path) throws IllegalArgumentException, IOException;", "routing.Pipe.FileOrBuilder getFileOrBuilder();", "public void readfiles() {\n\n // String path = getClass().getResource(\"data/fredsmet.ini\").getPath();\n\n String path;\n path = new File(\"data/fredsmet.ini\").getPath();//read all coordinates to create station\n files = FileReader.readFile(path);\n\n }", "@Override\n protected StreamFile readStreamFile(File file) {\n return eventFileReader.read(file);\n }", "private static ArrayList<ArrayList> getStateArrayListFromIndexFile() throws FileNotFoundException, IOException, ClassNotFoundException{\n\t\t\n\t\tObjectInputStream indexFile = new ObjectInputStream(new FileInputStream(\"state.ndx\"));\n\t\tArrayList<ArrayList> stateIndexArray=new ArrayList();\n\t\tstateIndexArray=(ArrayList<ArrayList>) indexFile.readObject();\n\t\tindexFile.close();\n\t\tObjectOutputStream o = new ObjectOutputStream(new FileOutputStream(stateIndexPath+stateIndexName));\n\t\to.writeObject(stateIndexArray);\n\t\t\n\t\treturn stateIndexArray;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
implementors should invoke emitElement(element, rawElement) on each element they emit
Integer getBulkSize() { return bulkSize; }
[ "public void output(Element element) throws IOException;", "public void emit() {\n if (this.once.compareAndSet(false, true)) {\n this.parent.emit(this.index, this.value);\n }\n }", "private interface ElementProcessor {\r\n\t\t\t/**\r\n\t\t\t * is called when a start element event occurs in the underlying SAX parser.\r\n\t\t\t * @param sUriNameSpace\r\n\t\t\t * @param sSimpleName\r\n\t\t\t * @param sQualifiedName\r\n\t\t\t * @param attributes the XML attributes of this element\r\n\t\t\t */\r\n\t\t\tvoid startElement(String sUriNameSpace, String sSimpleName, String sQualifiedName, Attributes attributes)\r\n\t\t\t\t\tthrows SAXException;\r\n\r\n\t\t\t/**\r\n\t\t\t * called when an end element event occurs in the underlying SAX parser\r\n\t\t\t * @param sUriNameSpace\r\n\t\t\t * @param sSimpleName\r\n\t\t\t * @param sQualifiedName\r\n\t\t\t */\r\n\t\t\tvoid endElement(String sUriNameSpace, String sSimpleName, String sQualifiedName) throws SAXException;\r\n\t\t}", "abstract void dispatch(Object element);", "interface Emitter {\n /** @param s a plain text chunk of an attribute value. */\n void emit(FilePosition pos, String s);\n /**\n * @param e an expression that will return a string that can be safely\n * treated as either plain text or HTML.\n */\n void emit(Expression e);\n }", "@Override\n\t\t\tpublic void visitGenericElement(JRGenericElement element) {\n\n\t\t\t}", "void emit(T t);", "@Override\r\n public void handleElement(Object elemID)\r\n {\r\n doHandleElements(Collections.singleton(elemID));\r\n }", "abstract protected void emit(AsmInstruction instr);", "abstract E element();", "@Override\r\n public void handleElements(Set<Object> elemIDs)\r\n {\r\n doHandleElements(elemIDs);\r\n }", "@Override\n public abstract void appendXML(Element e);", "@Override\n public void write(List<T> listElements) {\n\n }", "abstract void elementEnd();", "public interface Element {\n\tvoid accept (ElementVisitor visitor);\n}", "public interface Element\n{\n /**\n * Helper method used for implementing visitors.\n *\n * <p>\n * Each implementation should look exactly the same:\n *\n * {@code return visitor.visit(this)}\n */\n <T> T accept(ElementVisitor<T> visitor);\n\n /**\n * Returns the source range for this element.\n */\n Range getRange();\n\n /**\n * Sets the source range for this element.\n *\n * <p>\n * Should be called only when creating a new element.\n */\n void setRange(Range range);\n}", "protected abstract void setWriterOnElementWriter(BufferedWriter resultWriter);", "protected void handleElement (Element elem) throws IOException {\n String name = elem.getTagName ();\n if ( name == Tag.TITLE\n || name == Tag.STYLE\n || name == Tag.BASE\n || name == Tag.ISINDEX\n || name == Tag.FRAMESET\n || name == Tag.FRAME) {\n // skip the entire element\n }\n else if ( name == Tag.HTML\n || name == Tag.HEAD\n || name == Tag.BODY\n || name == Tag.NOFRAMES) {\n // skip only the start and end tags; preserve the content\n transformContents (elem);\n }\n else\n super.handleElement (elem);\n }", "@Override\n\tpublic void visit(AbstractStructureFunction element) {\n\t\t\n\t}", "public T interpretElement(XMLElement elem) throws UnableToCompleteException {\n T rtn = null;\n for (XMLElement.Interpreter<T> i : pipe) {\n rtn = i.interpretElement(elem);\n if (null != rtn) {\n break;\n }\n }\n return rtn;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
update by query condition selective.
@Override public int updateByQuerySelective( IpRecordDO record, IpRecordQuery query){ return ipRecordExtMapper.updateByQuerySelective(record, query); }
[ "int updateByQuerySelective(Ares2ConfDO record, Ares2ConfQuery query);", "@Override\n\tpublic int update(String hql) {\n\t\tthrow new UnsupportedOperationException(\"Not supported yet.\");\n\t}", "int updateByPrimaryKeySelective(ImsQuery record);", "public void updateQuery(String condition) {\n MakeExpressionString(condition);\n }", "int updateByPrimaryKeySelective(Modular record);", "@Override\n\tpublic void queryUpdate() {\n\t\tneedToUpdate = true;\n\t}", "int updateByPrimaryKeySelective(Update record);", "int runUpdateQuery(boolean safeMode);", "int updateByPrimaryKeySelective(Dynamic record);", "int updateByPrimaryKeySelective(HongYin record);", "int updateByPrimaryKeySelective(Diary record);", "int updateByPrimaryKeySelective(CsQuber record);", "@Override\n\tpublic void update(Query query, Update update)throws AppException {\n\n\t}", "int updateByPrimaryKeySelective(Huoguo record);", "int updateByPrimaryKeySelective(Opertion record);", "int updateByPrimaryKeySelective(TyEntity record);", "int updateByPrimaryKeySelective(Roomsetstatus record);", "int updateByPrimaryKeySelective(Parametro record);", "int updateByPrimaryKeySelective(Soustraitance record);", "int updateByPrimaryKeySelective(BaseData record);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public int compareTo(Cliente other) { if (!this.getNombreCompleto().equalsIgnoreCase(other.getNombreCompleto())) return this.getNombreCompleto().compareTo(other.getNombreCompleto()); return 0; }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void classement() {\n\t\t\t\n\t\t}", "@Override\r\n public void publicando() {\n }", "@Override\n\tpublic void tyre() {\n\t\t\n\t}", "@Override\n \tpublic void init() {\n \n \t}", "private static void EX5() {\n\t\t\r\n\t}", "protected void method_5557() {}", "@Override\n\tpublic void cafeteria() {\n\t\t\n\t}", "@Override\r\n\tpublic void preco() {\n\r\n\t}", "@Override\r\n\tpublic void jugar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void limpar() {\n\t\t\r\n\t}", "public void mo5201a() {\n }", "@Override\n\tpublic void annuler() {\n\n\t}", "@Override\r\n\tpublic void zwroc() {\n\t\t\r\n\t}", "@Override\n\t\tprotected void swop() {\n\n\t\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Log.e("keyEvent", "msg" + KeyValue);
private synchronized void keyEvent(int KeyValue) { if (!SerialPortService.pool.isShutdown()) { Log.e("keyEvent1", "msg" + KeyValue); mExecute = new Execute(KeyValue); SerialPortService.pool.execute(mExecute); } else { SerialPortService.pool = Executors.newFixedThreadPool(4); mExecute2 = new Execute(KeyValue); SerialPortService.pool.execute(mExecute); } // keyTask = new KeyTask(); // keyTask.execute(KeyValue); }
[ "public void logKey(Key inKey) {\r\n\t\t//timestamp info found at geeksforgeeks.com\r\n\t\tString transactionInfo = \"\";\r\n\t\tTimestamp timestamp = new Timestamp(System.currentTimeMillis());\r\n\t\ttransactionInfo += timestamp.toString() + \" \" + inKey.toString();\r\n\t\tkeyLog.push(transactionInfo);\r\n\r\n\t}", "public String onKey(String key) {\r\n log.info(\"onKey {}\", key);\r\n return key;\r\n }", "public static native String EXTRA_KEY_EVENT() /*-{\n\t\treturn Titanium.Android.EXTRA_KEY_EVENT;\n\t}-*/;", "private void printKeyEvent(KeyEvent evt){\n println(\"=========== KeyEvent =============\");\n println(\"========\" + sketch().millis() + \"=======\");\n println(\"KeyManager: evt.getAction() = \" + actionString(evt));\n println(\"KeyManager: evt.PRESS = \" + evt.PRESS);\n println(\"KeyManager: evt.RELEASE= \" + evt.RELEASE);\n println(\"KeyManager: evt.TYPE = \" + evt.TYPE);\n println(\"KeyManager: evt.getKey() = \" + evt.getKey());\n println(\"KeyManager: evt.getKeyCode() = \" + evt.getKeyCode());\n println(\"\");\n }", "@Override\n public void onKeyEvent(KeyInputEvent evt) {\n System.out.println(\"KeyChar=\"+evt.getKeyChar());\n }", "public void keyPressed( KeyEvent e)\r\n {\r\n System.out.println( \"CBillentyuLeutes::keyPressed()\") ;\r\n }", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\tSystem.out.println(\"KeyPressed\");\n\t\t\n\t}", "public void keyPressed(KeyEvent e) {\n displayInfo(e, \"KEY PRESSED: \");\n }", "public static void log(String key, Object value){\n if (_request.get() == null) {\n logInfo(CONSTANT.REQUEST_FOR_THREAD_NOT_FOUND, null);\n return;\n }\n\n if (!_request.get().isEnableTrace()) {\n return;\n }\n\n if (!_isActive.get()) {\n long threadId = Thread.currentThread().getId();\n logInfo(CONSTANT.START_NEW_TRACE, _request.get());\n _isActive.set(true);\n }\n\n _localTrace.get().log(key, value);\n }", "public void toLog(String msg) {\n if(LOG_ON_SPEECH_SERVICE){\n Log.e(\"xxx\", \"SpeechService: \"+msg+\"\\n\\r\");\n }\n }", "public void keyPressed( KeyEvent ke ){\n\t\tSystem.out.println( ke.toString() );\n\t}", "@Override\r\n public void keyTyped(KeyEvent e)\r\n {\r\n // System.out.println(\"EAS_Panel :: [INFO] : Key typed.\");\r\n \r\n }", "public void log(String msg) {\r\n Log.d(WaffleActivity.LOG_TAG, msg);\r\n }", "void logthis( String item) {\n\n logger.append(item + \"\\n\");\n Log.d(TAG, item);\n }", "void onKeyPress( double keyName )\n\t{\n\t}", "@Override\r\n\tpublic void nativeKeyPressed(NativeKeyEvent e) {\n\t\tSystem.out.println(\"Key Pressed: \" + NativeKeyEvent.getKeyText(e.getKeyCode()));\r\n\r\n\t}", "void keyPressed(KeyEvent event) {\n out.println(event.getCode() + \" pressed\");\n }", "@Override\r\n\tpublic void keyPressed(KeyEvent e) {\n\t\tSystem.out.println(e.getKeyCode());\r\n\t}", "void txtArtNo_keyPressed(KeyEvent e) {\n catchKeyCode(e);\r\n }", "public static int e(String tag, String msg)\n {\n return Log.e(tag, msg);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use this method to return this same object after validation. If you are using a derived class, override this method with body and signature with return type DerivedClass return (DerivedClass) super.getSelfAsValid(validator)
public RefObj<T> getSelfAsValid(final Validator... validator) { final Validator v = validator.length == 0 ? new Validator() : validator[0]; constraintViolations = v.validate(this); if (constraintViolations.size() != 0) { throw new ConstraintsViolatedException(constraintViolations); } return this; }
[ "public TypeValidator getValidator()\r\n {\r\n return this;\r\n }", "public Validateable getValidator() {\n\t\treturn validator;\n\t}", "public TypeValidator getValidator() {\r\n/* 525 */ return (TypeValidator)this;\r\n/* */ }", "@Override\n\tpublic Validation<Senha> getValidation() {\n\t\treturn new SenhaValidation();\n\t}", "protected abstract T getValidWert();", "public org.exolab.castor.xml.TypeValidator getValidator()\r\r\n {\r\r\n return this;\r\r\n }", "public Validator getValidator() {\n\t\treturn null;\n\t}", "protected GeneralValidator getGeneralValidator()\n {\n ValidatorFactory tmpValidatorFactory = validatorFactory;\n if (tmpValidatorFactory == null)\n {\n synchronized (RD_LOCK)\n {\n tmpValidatorFactory = validatorFactory;\n if (validatorFactory == null)\n {\n HibernateValidatorConfiguration config = Validation.byProvider(HibernateValidator.class).configure();\n tmpValidatorFactory = validatorFactory = config.buildValidatorFactory();\n\n }\n }\n }\n Validator validator = validatorFactory.getValidator();\n MethodValidator methodValidator = validator.unwrap(MethodValidator.class);\n return new GeneralValidatorImpl(validator, methodValidator);\n }", "public Validator<BrokerAlgo> getValidator()\n {\n return validator;\n }", "@Override\r\n\tpublic Validation<Evento> getValidation() {\n\t\treturn new EventoValidation();\r\n\t}", "public LanguageValidator getValidator() {\n\t\treturn fValidator;\n\t}", "@Override\r\n\tpublic AuthValidator getValidator() {\n\t\treturn authValidator;\r\n\t}", "@Override\n public Validator getValidator() {\n return compositeValidator;\n }", "public types.VmErrors.VMValidationStatus.Builder getValidationBuilder() {\n return getValidationFieldBuilder().getBuilder();\n }", "public String getValidator()\n {\n return (String) validators.get(0);\n }", "public EmotionMLValidator getValidator()\n\t{\n\t\treturn validator;\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString getValidator() {\n return validator_;\n }", "public abstract Object getValidatedInput();", "protected ErrorMessage getValidationError() {\n try {\n validate();\n } catch (Validator.InvalidValueException e) {\n if (!e.isInvisible()) {\n return e;\n }\n }\n return null;\n }", "Class getValidatorClass();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Salva template de notifica\u00E7\u00E3o Esse recurso salvar template notifica\u00E7\u00F5e
public TemplateNotificacaoDetalheResponse salvarTemplate(String conteudo, Long idConfiguracaoEmail, String tipoLayout, String tipoNotificacao, String remetente, String assunto, Boolean templatePadrao) throws ApiException { Object postBody = conteudo; // verify the required parameter 'conteudo' is set if (conteudo == null) { throw new ApiException(400, "Missing the required parameter 'conteudo' when calling salvarTemplate"); } // create path and map variables String path = "/api/templates-notificacoes".replaceAll("\\{format\\}","json"); // query params List<Pair> queryParams = new ArrayList<Pair>(); Map<String, String> headerParams = new HashMap<String, String>(); Map<String, Object> formParams = new HashMap<String, Object>(); queryParams.addAll(apiClient.parameterToPairs("", "idConfiguracaoEmail", idConfiguracaoEmail)); queryParams.addAll(apiClient.parameterToPairs("", "tipoLayout", tipoLayout)); queryParams.addAll(apiClient.parameterToPairs("", "tipoNotificacao", tipoNotificacao)); queryParams.addAll(apiClient.parameterToPairs("", "remetente", remetente)); queryParams.addAll(apiClient.parameterToPairs("", "assunto", assunto)); queryParams.addAll(apiClient.parameterToPairs("", "templatePadrao", templatePadrao)); final String[] accepts = { "application/json" }; final String accept = apiClient.selectHeaderAccept(accepts); final String[] contentTypes = { "text/plain" }; final String contentType = apiClient.selectHeaderContentType(contentTypes); //String[] authNames = new String[] {"client_id", }; String[] authNames = new String[] {"client_id", "access_token"}; GenericType<TemplateNotificacaoDetalheResponse> returnType = new GenericType<TemplateNotificacaoDetalheResponse>() {}; return apiClient.invokeAPI(path, "POST", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); }
[ "@Override\r\n\tpublic String soltarEspecial() {\n\t\treturn \"Chuva de cristais!!!\";\r\n\t}", "private void escribirEnPantalla() {\n }", "public String reemplazar(){\n\t\treturn this.contenido.replace('o','u');\n\t}", "public void spracujKorpusFormatu3(String korpus) {\n\t\tString vstup = \"../materialy/ine_korpusy/\" + korpus + \"/originalne_subory/\";\n\t\tString vystup = \"../materialy/ine_korpusy/\" + korpus + \"/nas_format/\";\n\t\t\n\t\tUprava_suborov.vymazObsahPriecinka(vystup);\n\t\t\n\t\tSet<String> obsah = Uprava_suborov.vratVsetkyNazvySuborov(vstup);\n\t\t\n\t\tfor(String sub : obsah) {\n\t\t\tString vstupSub = vstup + sub;\t\n\t\t\tString vystupSub = vystup + sub;\n\t\t\t\t\t\n\t\t\tif(vystupSub.endsWith(\".xml\")) {\n\t\t\t\tvystupSub = vystupSub.replace(\".xml\", \".txt\");\n\t\t\t}\n\t\t\t\n\t\t\tuprava_suborov.Uprava_suborov.vytvorSubor(vystupSub);\n\t\t\tString xml = uprava_suborov.Uprava_suborov.vratObsahSuboru(vstupSub);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tDocument doc = Jsoup.parse(xml);\t\t\t\n\t\t\t\t//System.out.println(doc.toString());\n\t\t\t\tElement vetyVsetko = doc.getElementsByTag(\"sentences\").first();\n\t\t\t\tElements vety = vetyVsetko.getElementsByTag(\"sentence\");\n\t\t\t\t\n\t\t\t\tfor(Element veta : vety) {\t\t\t\t\t\n\t\t\t\t\tElements slova = veta.children();\n\t\t\t\t\tString vetaStr = \"\";\n\t\t\t\t\tfor(Element slovo : slova) {\n\t\t\t\t\t\tString nazovTagu = slovo.tagName();\n\t\t\t\t\t\t//System.out.println(nazovTagu);\n\t\t\t\t\t\tif(nazovTagu.equals(\"interactor\")) {\n\t\t\t\t\t\t\tvetaStr = vetaStr + \" \" + \"<interakcia>\" + slovo.text() + \"<interakcia>\"; \n\t\t\t\t\t\t} \n\t\t\t\t\t\telse if(nazovTagu.equals(\"gene\")) {\n\t\t\t\t\t\t\tvetaStr = vetaStr + \" \" + \"<protein>\" + slovo.text() + \"<protein>\"; \n\t\t\t\t\t\t} \n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tvetaStr = vetaStr + \" \" + slovo.text();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tvetaStr = vetaStr.trim();\n\t\t\t\t\t//System.out.println(vetaStr);\n\t\t\t\t\tuprava_suborov.Uprava_suborov.pridajNaKoniecDoSuboru(vystupSub, vetaStr);\t\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\t\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Spracovalo povodny korpus: \" + korpus);\t\n\t}", "private static void generarPreludioEstandar(){\n\t\tUtGen.emitirComentario(\"Compilacion TINY para el codigo objeto TM\");\n\t\tUtGen.emitirComentario(\"Archivo: \"+ \"NOMBRE_ARREGLAR\");\n\t\t/*Genero inicializaciones del preludio estandar*/\n\t\t/*Todos los registros en tiny comienzan en cero*/\n\t\tUtGen.emitirComentario(\"Preludio estandar:\");\n\t\tUtGen.emitirRM(\"LD\", UtGen.MP, 0, UtGen.AC, \"cargar la maxima direccion desde la localidad 0\");\n\t\tUtGen.emitirRM(\"ST\", UtGen.AC, 0, UtGen.AC, \"limpio el registro de la localidad 0\");\n\t}", "private void analizarTexto(String texto, String tipo) {\n try {\n /*\n * encabezado\n */\n if (texto.indexOf(\"<?xml version=\") != - 1) {\n pt.println(texto);\n return;\n }\n if (texto.indexOf(\"<!DOCTYPE html PUBLIC\") != - 1) {\n pt.println(texto);\n return;\n }\n if (texto.indexOf(\"xmlns=\") != -1) {\n pt.println(texto);\n return;\n }\n if (texto.indexOf(\"xmlns:\") != -1) {\n pt.println(texto);\n return;\n }\n\n if (texto.indexOf(\"<h:body>\") != -1) {\n if (!tipo.equals(\"index\")) {\n pt.println(sp(5) + \"<h:body>\");\n pt.println(\"\\n\" + sp(9) + \"<ui:composition template=\\\"./../../\" + Directorios.getNombreArchivoPlantilla() + \"\\\">\");\n } else {\n pt.println(sp(5) + \"<h:body>\");\n pt.println(\"\\n\" + sp(9) + \"<ui:composition template=\\\"./\" + Directorios.getNombreArchivoPlantilla() + \"\\\">\");\n }\n return;\n }\n if (texto.indexOf(\"</h:body>\") != -1) {\n pt.println(sp(9) + \"</ui:composition>\");\n pt.println(sp(5) + \"\\n</h:body>\");\n return;\n }\n /*\n * omito el header\n */\n String[] header = {\"<h:head>\", \"<meta\", \"<link href=\", \"<title>\", \"</h:head>\"};\n String[] div;\n for (String h : header) {\n if (texto.indexOf(h) != -1) {\n return;\n }\n }\n /*\n * convertimos los top, left, content\n */\n if (texto.indexOf(\"<div id=\\\"top\\\"\") != - 1) {\n pt.println(sp(13) + \"<!--\\n\" + sp(14) + \"<ui:define name=\\\"toformRenderedp\\\">\\n\" + sp(17) + \"top\\n\" + sp(14) + \"</ui:define>\\n\" + sp(13) + \"-->\");\n return;\n }\n if (texto.indexOf(\"<div id=\\\"left\\\">\") != -1) {\n pt.println(sp(13) + \"<!--\\n\" + sp(14) + \"<ui:define name=\\\"left\\\">\\n\" + sp(17) + \"left\\n\" + sp(14) + \"</ui:define>\\n\" + sp(13) + \"-->\");\n return;\n }\n if (texto.indexOf(\"<div id=\\\"content\\\"\") != -1) {\n pt.println(sp(13) + \"<ui:define name=\\\"content\\\">\");\n /*\n * Genero el contenido que estara en el content\n */\n\n AnalizadorRelaciones analizadorRelaciones = new AnalizadorRelaciones(rutaArchivoBeans);\n arrayColumnas = analizadorRelaciones.getArrayColumnas();\n arrayRelaciones = analizadorRelaciones.getArrayRelaciones();\n\n generarContenido();\n pt.println(sp(13) + \"</ui:define>\");\n return;\n }\n if (texto.indexOf(\"<div id=\\\"right\\\"\") != -1) {\n pt.println(sp(13) + \"<!--\\n\" + sp(14) + \"<ui:define name=\\\"rigth\\\">\\n\" + sp(17) + \"Right\\n\" + sp(14) + \"</ui:define>\\n\" + sp(13) + \"-->\");\n return;\n }\n if (texto.indexOf(\"<div id=\\\"bottom\\\"\") != -1) {\n pt.println(sp(13) + \"<!--\\n\" + sp(14) + \"<ui:define name=\\\"bottom\\\">\\n\" + sp(17) + \"Bottom\\n\" + sp(14) + \"</ui:define>\\n\" + sp(13) + \"-->\");\n return;\n }\n\n if (texto.indexOf(\"<ui:insert\") != - 1) {\n return;\n }\n if (texto.indexOf(\"<div>\") != -1) {\n return;\n }\n if (texto.indexOf(\"</div>\") != -1) {\n return;\n }\n\n if (texto.indexOf(\"</html>\") != -1) {\n pt.println(\"</html>\");\n return;\n }\n return;\n } catch (Exception ex) {\n DGlobal.error(\"analizarTexto() \" + ex.getLocalizedMessage());\n }\n return;\n }", "private static void scrieHTMLSemestrial(File f)\r\n\t{\r\n\t\tString s=f.toString();\r\n\t\t\r\n\t\ttry{\r\n\t\t\tf.createNewFile();\r\n\t\t\tPrintWriter fout=new PrintWriter(f);\r\n\t\t\tfout.println(\"<html>\");\r\n\t\t\tfout.println(\"\t<head><title>Situatie Semestriala</title></head>\");\r\n\t\t\tfout.println(\"\t<body bgcolor=grey>\");\r\n\t\t\tfout.println(\"\t\t<center><h1>SITUATIE SEMESTRUL \"+s.charAt(25)+\"</h1></center>\");\r\n\t\t\tfout.println(\"\t\t<br><br><br>\");\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//parcurgen lista de elevi si pentru fiecare in parte vom afisa informatiile\r\n\t\t\t//din situatia semestriala\r\n\t\t\tfor(Elev elev:elevi)\r\n\t\t\t{\r\n\t\t\t\t//determin pentru ce semestru este apelata metoda si \r\n\t\t\t\t//aleg situatia corecta\r\n\t\t\t\tSituatieSemestriala ss;\r\n\t\t\t\tif(f.toString().charAt(25)=='1') \r\n\t\t\t\t\tss=elev.getSem1();\r\n\t\t\t\telse\r\n\t\t\t\t\tss=elev.getSem2();\r\n\t\t\t\t\r\n\t\t\t\t//scriu numele elevului\r\n\t\t\t\t\r\n\t\t\t\tfout.println(\"<b>\"+elev.getNume().toUpperCase()+\r\n\t\t\t\t\t\t\":\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MEDIA SEMESTRIALA: \"+\r\n\t\t\t\t\t\tss.getMediaSemestriala()+\"</b>\");\r\n\t\t\t\tfout.println(\"\t\t<table border=2 bgcolor=white>\");\r\n\t\t\t\t//antetul tabelului\r\n\t\t\t\tfout.println(\"\t\t\t<tr>\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tfout.print(\"\t\t\t\t<td>\");\r\n\t\t\t\t\tfout.print(\"Nr.Crt.\");\t\r\n\t\t\t\t\tfout.println(\"</td>\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tfout.print(\"\t\t\t\t<td>\");\r\n\t\t\t\t\tfout.print(\"Disciplina\");\t\r\n\t\t\t\t\tfout.println(\"</td>\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tfout.print(\"\t\t\t\t<td>\");\r\n\t\t\t\t\tfout.print(\"Note\");\t\r\n\t\t\t\t\tfout.println(\"</td>\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tfout.print(\"\t\t\t\t<td>\");\r\n\t\t\t\t\tfout.print(\"Teza\");\t\r\n\t\t\t\t\tfout.println(\"</td>\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tfout.print(\"\t\t\t\t<td>\");\r\n\t\t\t\t\tfout.print(\"Absente Motivate\");\t\r\n\t\t\t\t\tfout.println(\"</td>\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tfout.print(\"\t\t\t\t<td>\");\r\n\t\t\t\t\tfout.print(\"Absente Nemotivate\");\t\r\n\t\t\t\t\tfout.println(\"</td>\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tfout.print(\"\t\t\t\t<td>\");\r\n\t\t\t\t\tfout.print(\"Media\");\t\r\n\t\t\t\t\tfout.println(\"</td>\");\r\n\t\t\t\t\r\n\t\t\t\tfout.println(\"\t\t\t</tr>\");\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//pentru fiecare disciplina afisam cate o linie de tabel\r\n\t\t\t\tint k=1;\r\n\t\t\t\tfor(Disciplina disciplina:ss.getDiscipline())\r\n\t\t\t\t{\r\n\t\t\t\tfout.println(\"\t\t\t<tr>\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tfout.print(\"\t\t\t\t<td width=5%>\");\r\n\t\t\t\t\tfout.print(k++);\t\r\n\t\t\t\t\tfout.println(\"</td>\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tfout.print(\"\t\t\t\t<td width=20%>\");\r\n\t\t\t\t\tfout.print(disciplina.getNume().toUpperCase());\t\r\n\t\t\t\t\tfout.println(\"</td>\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tfout.print(\"\t\t\t\t<td width=15%>\");\r\n\t\t\t\t\tfout.print(Arrays.toString(disciplina.getNote()));\t\r\n\t\t\t\t\tfout.println(\"</td>\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tfout.print(\"\t\t\t\t<td width=5%>\");\r\n\t\t\t\t\tfout.print(disciplina.getTeza());\t\r\n\t\t\t\t\tfout.println(\"</td>\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tfout.print(\"\t\t\t\t<td width=25%>\");\r\n\t\t\t\t\tfout.print(Arrays.toString(disciplina.getAbsMot()));\t\r\n\t\t\t\t\tfout.println(\"</td>\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tfout.print(\"\t\t\t\t<td width=25%>\");\r\n\t\t\t\t\tfout.print(Arrays.toString(disciplina.getAbsNemot()));\t\r\n\t\t\t\t\tfout.println(\"</td>\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tfout.print(\"\t\t\t\t<td width=5%>\");\r\n\t\t\t\t\tfout.print(disciplina.getMedia());\t\r\n\t\t\t\t\tfout.println(\"</td>\");\r\n\t\t\t\t\r\n\t\t\t\tfout.println(\"\t\t\t</tr>\");\r\n\t\t\t\t}\r\n\t\t\t\tfout.println(\"\t\t\t<tr>\");\r\n\t\t\t\tfout.print(\"\t\t\t\t<td>\"+k+\"</td>\");\r\n\t\t\t\tfout.print(\"\t\t\t\t<td colspan=5>PURTARE</td>\");\r\n\t\t\t\tfout.print(\"\t\t\t\t<td>\"+ss.getMediaPurtare()+\"</td>\");\r\n\t\t\t\tfout.println(\"\t\t\t</tr>\");\r\n\t\t\t\tfout.println(\"\t\t</table>\");\r\n\t\t\t\tfout.println(\"<br>\");\r\n\t\t\t}\r\n\t\t\t\r\n\r\n\t\t\tfout.println(\"\t</body>\");\r\n\t\t\tfout.println(\"</html>\");\r\n\t\t\tfout.close();\r\n\t\t}\r\n\t\tcatch(IOException e)\r\n\t\t{\r\n\t\t\tSystem.out.print(\"Nu s-a creat fisierul\");\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void trabalhar() {\n\t\t\r\n\t}", "@Override\n public String visitExpressao(ExpressaoContext ctx) {\n IdentificadorDeTipos idt = new IdentificadorDeTipos(escopos);\n idt.identificaTipoExpressao(ctx); // Forca identificacao do tipo para geracao de codigo\n return visitChildren(ctx);\n }", "void encodeTemplateStubs() {\n\t\tMap m = (Map) template.get(\"exchange\");\n\t\tString defaultStr = (String) template.get(\"default\");\n\n\t\tIterator<String> sr = seats.keySet().iterator();\n\t\twhile (sr.hasNext()) {\n\t\t\tString key = sr.next();\n\t\t\tString value = (String) m.get(key);\n\t\t\tif (value == null)\n\t\t\t\tmasterTemplate.put(key, defaultStr);\n\t\t\telse\n\t\t\t\tmasterTemplate.put(key, value);\n\n\t\t}\n\n\t}", "public String limpiar()\r\n/* 81: */ {\r\n/* 82:143 */ crearPrestamo();\r\n/* 83:144 */ return \"\";\r\n/* 84: */ }", "public String limpiar()\r\n/* 111: */ {\r\n/* 112:178 */ crear();\r\n/* 113:179 */ return \"\";\r\n/* 114: */ }", "@Override\n\tpublic void generarRuta() {\n\t\t\n\t\tLaberinto lab = Laberinto.getInstancia();\n\t\tint idPuerta = lab.devolverSalaConPuerta().getIdSala();\n\t\tint contador = 0;\n\t\tint pos = 0;\n\t\tGrafo grafo = lab.getGrafo() ;\n\t\tDirecciones anterior = Direcciones.N;\n\t\tDirecciones siguiente = Direcciones.O;\n\t\t\n\t\twhile (idPuerta != pos && contador <= 50) {\n\t\t\t\n\t\t\tswitch (anterior) {\n\t\t\t\n\t\t\tcase S:\n\t\t\t\t\n\t\t\t\tif(grafo.adyacente(pos, pos + 1)){\n\t\t\t\t\t\n\t\t\t\t\tsiguiente = Direcciones.E;\n\t\t\t\t\tanterior = Direcciones.O;\n\t\t\t\t\t\n\t\t\t\t\tcolaDir.add(siguiente);\n\t\t\t\t\tcontador++;\n\t\t\t\t\tpos++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse {\n\t\t\t\t\t\n\t\t\t\t\tanterior = Direcciones.E;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase E:\n\t\t\t\t\n\t\t\t\tif(grafo.adyacente(pos, pos - lab.getMaxColumnas())){\n\t\t\t\t\t\n\t\t\t\t\tsiguiente = Direcciones.N;\n\t\t\t\t\tanterior = Direcciones.S;\n\t\t\t\t\t\n\t\t\t\t\tcolaDir.add(siguiente);\n\t\t\t\t\tcontador++;\n\t\t\t\t\tpos -= lab.getMaxColumnas();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse {\n\t\t\t\t\t\n\t\t\t\t\tanterior = Direcciones.N;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase N:\n\t\t\t\t\n\t\t\t\tif(grafo.adyacente(pos, pos - 1)){\n\t\t\t\t\t\n\t\t\t\t\tsiguiente = Direcciones.O;\n\t\t\t\t\tanterior = Direcciones.E;\n\t\t\t\t\t\n\t\t\t\t\tcolaDir.add(siguiente);\n\t\t\t\t\tcontador++;\n\t\t\t\t\tpos--;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse {\n\t\t\t\t\t\n\t\t\t\t\tanterior = Direcciones.O;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase O:\n\t\t\t\t\n\t\t\t\tif(grafo.adyacente(pos, pos + lab.getMaxColumnas())){\n\t\t\t\t\t\n\t\t\t\t\tsiguiente = Direcciones.S;\n\t\t\t\t\tanterior = Direcciones.N;\n\t\t\t\t\t\n\t\t\t\t\tcolaDir.add(siguiente);\n\t\t\t\t\tcontador++;\n\t\t\t\t\tpos += lab.getMaxColumnas();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse {\n\t\t\t\t\t\n\t\t\t\t\tanterior = Direcciones.S;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t}\n\t\t}\t\n\t\tcolaDir.add(Direcciones.E);\n\t\t\n\t}", "private static String fillTemplate(List<PrintableDocument> documents) {\n PrintableDocument firstDocument = documents.get(0);\n String html = template.replace(\"%TITLE%\", firstDocument.getTitle());\n html = html.replace(\"%DOCUMENT_STYLES%\", firstDocument.getCssStyles());\n\n PageConfiguration pageConfig = firstDocument.getPageConfiguration();\n if (pageConfig.isLandscape()) {\n html = html.replace(\"%PAGE_HEIGHT%\", String.valueOf(pageConfig.getPageWidth()));\n html = html.replace(\"%PAGE_WIDTH%\", String.valueOf(pageConfig.getPageHeight()));\n } else {\n html = html.replace(\"%PAGE_WIDTH%\", String.valueOf(pageConfig.getPageWidth()));\n html = html.replace(\"%PAGE_HEIGHT%\", String.valueOf(pageConfig.getPageHeight()));\n }\n\n html = html.replace(\"%MARGIN_TOP%\", String.valueOf(pageConfig.getTopMargin()));\n html = html.replace(\"%MARGIN_BOTTOM%\", String.valueOf(pageConfig.getBottomMargin()));\n html = html.replace(\"%MARGIN_LEFT%\", String.valueOf(pageConfig.getLeftMargin()));\n html = html.replace(\"%MARGIN_RIGHT%\", String.valueOf(pageConfig.getRightMargin()));\n\n String footer=\"\";\n if (pageConfig.hasFooter()) {\n footer = footerAndHeaderTemplate.replace(\"%REGION_CLASS%\", \"footer\");\n footer = footer.replace(\"%REGION_LEFT%\", replaceFooter(pageConfig.getFooterLeft()));\n footer = footer.replace(\"%REGION_CENTER%\", replaceFooter(pageConfig.getFooterCenter()));\n footer = footer.replace(\"%REGION_RIGHT%\", replaceFooter(pageConfig.getFooterRight()));\n\n \n } \n \n html = html.replace(\"%FOOTER%\", footer);\n \n String header = \"\";\n if(pageConfig.hasHeader()) {\n header = footerAndHeaderTemplate.replace(\"%REGION_CLASS%\", \"header\");\n header = header.replace(\"%REGION_LEFT%\", replaceFooter(pageConfig.getHeaderLeft()));\n header = header.replace(\"%REGION_CENTER%\", replaceFooter(pageConfig.getHeaderCenter()));\n header = header.replace(\"%REGION_RIGHT%\", replaceFooter(pageConfig.getHeaderRight()));\n }\n \n html = html.replace(\"%HEADER\", header);\n\n Tidy tidier = new Tidy();\n tidier.setXHTML(true);\n tidier.setPrintBodyOnly(true);\n tidier.setAsciiChars(false);\n tidier.setNumEntities(true);\n\n List<String> tidiedBodies = new ArrayList<String>();\n // We process each document's body.\n for (PrintableDocument document : documents) {\n StringWriter tidiedWriter = new StringWriter();\n tidier.parse(new StringReader(document.getBody()), tidiedWriter);\n tidiedBodies.add(tidiedWriter.toString());\n }\n\n html = html.replace(\"%DOCUMENT_BODY%\", Strings.join(tidiedBodies, PAGE_SEPARATOR));\n\n return html;\n }", "public String limpiar()\r\n/* 132: */ {\r\n/* 133:194 */ crearEntidad();\r\n/* 134:195 */ return \"\";\r\n/* 135: */ }", "@Override\n\tpublic void trangdiem() {\n\t\tkhuonmat.trangdiem();\n\t\tSystem.out.println(\"lam mui cao\");\n\t}", "public void realizarTransicionLiteral(char caracter,String texto){\n if (caracter==COMILLA_DOBLE) {//si es comilla doble\n realizarTransicion(124, lexema+caracter);\n } else if(caracter==SALTO||(texto.length()-1)==indice){// si es un salto o fin de linea sin cierre de literal\n reportarError((contColumna-lexema.length()), lexema, contLinea,LITERAL);\n contLinea++;// se aumenta para saltar de linea\n contColumna=0;//cero ya que mas adelante se aumenta y vuelve a ser 1\n } else {\n realizarTransicion(123, lexema+caracter);\n }\n }", "@Override\r\n\t\t\tString template(Json data) {\n\t\t\t\treturn null;\r\n\t\t\t}", "public String generarAjusteInventario()\r\n/* 1380: */ {\r\n/* 1381:1358 */ List<MovimientoInventario> listaAjustesInventario = new ArrayList();\r\n/* 1382:1359 */ if (this.ajusteInventarioEgreso != null)\r\n/* 1383: */ {\r\n/* 1384:1360 */ listaAjustesInventario.add(this.ajusteInventarioEgreso);\r\n/* 1385:1361 */ if ((this.ajusteInventarioEgreso.getDocumento() == null) || (this.ajusteInventarioEgreso.getMotivoAjusteInventario() == null)) {\r\n/* 1386:1362 */ return null;\r\n/* 1387: */ }\r\n/* 1388: */ }\r\n/* 1389:1365 */ if (this.ajusteInventarioIngreso != null)\r\n/* 1390: */ {\r\n/* 1391:1366 */ listaAjustesInventario.add(this.ajusteInventarioIngreso);\r\n/* 1392:1367 */ if ((this.ajusteInventarioIngreso.getDocumento() == null) || (this.ajusteInventarioIngreso.getMotivoAjusteInventario() == null)) {\r\n/* 1393:1368 */ return null;\r\n/* 1394: */ }\r\n/* 1395: */ }\r\n/* 1396: */ try\r\n/* 1397: */ {\r\n/* 1398:1372 */ BigDecimal diferencia = this.registroPeso.getPesoNeto().subtract(this.registroPeso.getPesoReferencia());\r\n/* 1399:1373 */ this.registroPeso.setPesoDestareTotal(diferencia);\r\n/* 1400:1374 */ totalizarPesoNeto();\r\n/* 1401:1375 */ this.servicioMovimientoInventario.guardarRecepcionTransferenciaConAjusteInventario(listaAjustesInventario, this.transferenciaBodega, this.registroPeso);\r\n/* 1402:1376 */ RequestContext.getCurrentInstance().execute(\"dialogAjusteInventario.hide()\");\r\n/* 1403:1377 */ RequestContext.getCurrentInstance().update(\":form:panelDialogoAjusteInventario\");\r\n/* 1404: */ \r\n/* 1405:1379 */ limpiar();\r\n/* 1406:1380 */ setEditado(false);\r\n/* 1407:1381 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_guardar\"));\r\n/* 1408:1382 */ cerrarDialogoAjusteInventario();\r\n/* 1409: */ }\r\n/* 1410: */ catch (ExcepcionAS2Identification e1)\r\n/* 1411: */ {\r\n/* 1412:1384 */ addErrorMessage(getLanguageController().getMensaje(e1.getCodigoExcepcion()));\r\n/* 1413:1385 */ e1.printStackTrace();\r\n/* 1414: */ }\r\n/* 1415: */ catch (ExcepcionAS2Inventario e)\r\n/* 1416: */ {\r\n/* 1417:1387 */ addErrorMessage(getLanguageController().getMensaje(e.getCodigoExcepcion()));\r\n/* 1418:1388 */ e.printStackTrace();\r\n/* 1419: */ }\r\n/* 1420: */ catch (ExcepcionAS2 e)\r\n/* 1421: */ {\r\n/* 1422:1390 */ addErrorMessage(getLanguageController().getMensaje(e.getCodigoExcepcion()));\r\n/* 1423:1391 */ e.printStackTrace();\r\n/* 1424: */ }\r\n/* 1425: */ catch (AS2Exception e)\r\n/* 1426: */ {\r\n/* 1427:1393 */ JsfUtil.addErrorMessage(e, \"\");\r\n/* 1428:1394 */ e.printStackTrace();\r\n/* 1429: */ }\r\n/* 1430:1396 */ return null;\r\n/* 1431: */ }", "public void printStringsInLexicoOrder() {\n\t\tSystem.out.println(\"Implementation is correct but problem with Compiler saying TreeNodeWithData is TreeNode\");\n\t\t//TreeNodeWithData node = root;\n\t\t\n\t\t//printStringsInLexicoOrder(node);\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This adapter has a data subset and never updates entire database Individual timers are updated in button handlers.
@Override public void onSaveInstanceState(Bundle outState) { }
[ "@Override\n protected void refreshData() {\n }", "private void startTableUpdateTimer() {\n\t\tupdateTimer = new java.util.Timer();\n\t\tupdateTimer.scheduleAtFixedRate(new TimerTask() {\n\t\t\tpublic void run() {\n\t\t\t\tif(TBL_Telemetry.getModel() == null\n\t\t\t\t|| TBL_Settings.getModel() == null) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(context.connected) {\n\t\t\t\t\tAbstractTableModel telemetryModel = \n\t\t\t\t\t\t\t(AbstractTableModel) TBL_Telemetry.getModel();\n\t\t\t\t\tAbstractTableModel settingsModel = \n\t\t\t\t\t\t\t(AbstractTableModel) TBL_Settings.getModel();\n\t\t\t\t\t\n\t\t\t\t\ttelemetryModel.fireTableRowsUpdated(\n\t\t\t\t\t\t\t0, Serial.MAX_TELEMETRY);\n\t\t\t\t\tsettingsModel.fireTableRowsUpdated(\n\t\t\t\t\t\t\t0, Serial.MAX_TELEMETRY);\n\t\t\t\t\t\n\t\t\t\t\tTBL_Telemetry.invalidate();\n\t\t\t\t\tTBL_Settings.invalidate();\n\t\t\t\t}\n\t\t\t}\n\t\t}, UPDATE_PERIOD_MS, UPDATE_PERIOD_MS);\n\t}", "private void prepareTimedButtons() {\n \t\tfor(int i = 0; i < this.pulsesPanel.getWidgetCount(); ++i){\n \t\t\tfinal Widget wid = this.pulsesPanel.getWidget(i);\n \t\t\tif(wid instanceof WlTimedButton) {\n \t\t\t\tfinal WlTimedButton button = (WlTimedButton)wid;\n \t\t\t\t\n \t\t\t\t// Avoid trying to convert non-numerical titles (which serve\n \t\t\t\t// as identifiers). Not exactly an elegant way to do it.\n \t\t\t\tif(button.getTitle().length() != 1) \n \t\t\t\t\tcontinue;\n \t\t\n \t\t\t\tfinal int id = this.pulsesPanel.getWidgetCount() - \n \t\t\t\t\tInteger.parseInt(button.getTitle()) - 1;\n \t\t\t\tfinal ButtonListener buttonListener = new ButtonListener(id, button, this.boardController);\n \t\t\t\tbutton.addButtonListener(buttonListener);\n \t\t\t}\n \t\t}\n \t}", "public void dataRefresh() {\n\t}", "public void refresh() {\n setButtonsEnabled(false);\n new GetYourUpdatedData().execute(you.getUUID(),REFRESH);\n }", "private void updateUITimer() {\n if (serviceBound) {\n tvTimer.setText(timerService.formatElapsedTime());\n }\n }", "@Override\n public void dataUpdated() {\n }", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tadapter.refreshRealtimeData(manager.getAddress(), realTimeData);\n\t\t\t\t}", "private static void startTimer() {\n\n Toolkit toolkit = Toolkit.getDefaultToolkit();\n _timer = new Timer();\n TimerTask updateTask = new TimerTask() {\n\n @Override\n public void run() {\n try {\n if(!_autoRefreshMode) {\n return;\n }\n\n if(Hub.defaultConnection==null) {\n return;\n }\n\n //If Collector hasn't been used in a while, double the wait time\n Date now = new Date();\n long timedifference = now.getTime() - _lastTriggered.getTime();\n //System.out.println(\"timedifference is \" + timedifference + \" and I need \" + currentDelay);\n _currentDelay = 2* _currentDelay;\n if(timedifference < _currentDelay*3000) {\n //System.out.println( \"not updating yet\" );\n return;\n }\n\n if ( _everything == null || !Hub.defaultConnection.isConnected() ) {\n System.exit( 0 );\n }\n for ( ObjBase o : _everything.values() ) {\n if ( !o.isInDatabase() ) {\n continue;\n }\n Date lastmod = Hub.defaultConnection.getTimeModified( o );\n Date pulled = o.getTimePulled();\n if ( lastmod == null ) {\n continue;\n }\n if ( lastmod.after( pulled ) ) {\n o.update();\n }\n }\n } catch(Exception e) {\n }\n }\n };\n _timer.scheduleAtFixedRate( updateTask, 20000, 20000 );\n }", "private void updateValues() {\n Cursor c = dbHelper.getAlarms();\n SingleAlarmAdapter adapter = new SingleAlarmAdapter(getContext(), c,0);\n ListView lv = v.findViewById(R.id.my_alarm_list);\n lv.setAdapter(adapter);\n lv.setDescendantFocusability(ViewGroup.FOCUS_BLOCK_DESCENDANTS);\n }", "protected void onTimer() {}", "private void updateUI() {\r\n\r\n\r\n // Enable Disable Start Stop buttons depending on run status\r\n boolean started = myDatabaseManager.isTracking();\r\n boolean trackingThisRun = myDatabaseManager.isTrackingRun(mRun);\r\n\r\n if (mRun != null){\r\n Started.setText(mRun.getStartDate().toString());\r\n }\r\n\r\n int durationSeconds = 0;\r\n if (mRun != null && mLastLocation != null){\r\n\r\n durationSeconds = mRun.getDurationSeconds(mLastLocation.getTime());\r\n LatitudeValues.setText(String.valueOf(mLastLocation.getLatitude()));\r\n LongtitudeValues.setText(String.valueOf(mLastLocation.getLongitude()));\r\n AltitudeValues.setText(String.valueOf(mLastLocation.getAltitude()));\r\n mMapButton.setEnabled(true);\r\n }else{\r\n\r\n mMapButton.setEnabled(false);\r\n }\r\n\r\n mDurationTextView.setText(Run.formatDuration(durationSeconds));\r\n Start.setEnabled(!started);\r\n Stop.setEnabled(started && trackingThisRun);\r\n\r\n }", "public void fireDataChanged();", "@Override\n protected void reloadData() {\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic void updateSchedule() {\n\t\t/**\n\t\t * Clear out the old alarms, if any,\n\t\t * by canceling the pending intents.\n\t\t */\n\t\tclearPI();\n\t\t\n\t\thour = (ArrayList<SchData>[]) new ArrayList[24];\n\t\tfor (int h = 0; h < hour.length; ++h) {\n\t\t\thourArrayList = new ArrayList<SchData>();\n\t\t\thour[h] = hourArrayList;\n\t\t}\t\n\t\tschHourList = new ArrayList<SchData>();\n\t\tmedHourList = new ArrayList<MedData>();\n\t\t\t\t\n\t\tcursor = db.getCurrent();\t\n\t\tbuildSchedule();\n\t}", "public void updateUI()\n {\n //get the array list with the values in the database\n DatabaseHelper db = new DatabaseHelper(this);\n //get the listview to print the data\n ListView listView = findViewById(R.id.list_todo);\n\n if(mAdapter == null)\n {\n mAdapter = new ArrayAdapter<>(this, R.layout.item_todo, R.id.task_title, db.getData());\n listView.setAdapter(mAdapter);\n }\n else\n {\n mAdapter.clear();\n mAdapter.addAll(db.getData());\n mAdapter.notifyDataSetChanged();\n }\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tmDatas.add(new Date().toGMTString());\n\t\t\t\tmAdapter.notifyDataSetChanged();\n\t\t\t\trefreshLayout.setRefreshing(false);\n\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tToast.makeText(context, \"更新数据\", Toast.LENGTH_LONG).show();\r\n\t\t\t\t\t// List<Data> list=\r\n\t\t\t\t\t// DBHelper.getUtils().findAll(Selector.from(Data.class).where(\"date\"\r\n\t\t\t\t\t// ,\"=\", \"1970-01-02\"));\r\n\t\t\t\t\t// List<Data> list=new ArrayList<Data>();\r\n\t\t\t\t\t// Alllist.clear();\r\n\t\t\t\t\tList<Data> list = DBHelper.getUtils().findAll(Data.class);// 通过类型查找\r\n\t\t\t\t\t// list=DBHelper.getUtils().findAll(Selector.from(Data.class)\r\n\t\t\t\t\t// .where(\"id\",\"<\",54));\r\n\t\t\t\t\t// DBHelper.getUtils().f\r\n\t\t\t\t\tAlllist.addAll(list);\r\n\t\t\t\t\tadapter.notifyDataSetChanged();\r\n\t\t\t\t} catch (DbException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t// adapter.notifyDataSetInvalidated();\r\n\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\n public void onDataSetChanged() {\n readData();\n }", "@Override\n\tprotected void onTimerDisabled() {\n\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Chainable setter for the command string
public Command setCommandString(String command) { this.command = command; return this; }
[ "public void setCommand(String s)\n\t{\n\t\tcommand = s;\n\t}", "@Override\n\tprotected void setCommand(String newCmd_, int pos_) {\n\t\t\n\t}", "@DISPID(1829)\r\n @PropPut\r\n void setCommandText(\r\n java.lang.Object rhs);", "public void setCommand(String value) {\n\t\tcommand_ = value;\n\t}", "public void setCommand(String par1Str) {\n\t\tthis.command = par1Str;\n\t\tthis.onInventoryChanged();\n\t}", "private void setCommand(String command) {\n this.command = command;\n }", "public abstract void setCommand(ICommand command);", "public void setCommand(String command) {\n this.command = (command);\n }", "void setCommand(ISOCommand cmd);", "public void setCommand(ICommand<P, R> command);", "public Command set(Serializable value) {\n return set(this.params.size(), value);\n }", "public void setCommand(Commandline cmdl) {\n- throw new BuildException(taskType\n+ throw new BuildException(getTaskType()\n + \" doesn\\'t support the command attribute\",\n getLocation());\n }", "public ServiceRequest setCommand(String cmd)\n {\n this.command = StringTools.trim(cmd);\n return this;\n }", "public void setMakeCommand(String command);", "public Builder setCommand(communication.protos.DataProtos.Command value) {\n if (commandBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n command_ = value;\n onChanged();\n } else {\n commandBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000001;\n return this;\n }", "private ProcessManagerCommand(String value){\n this.value = value;\n }", "@Override\n\tpublic void setCommand(Command m) {\n\t\tdelegate.setCommand(m);\n\t}", "public Builder addCommand(java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureCommandIsMutable();\n command_.add(value);\n onChanged();\n return this;\n }", "public Builder setCommand(io.cloudstate.protocol.EntityProto.Command value) {\n if (commandBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n message_ = value;\n onChanged();\n } else {\n commandBuilder_.setMessage(value);\n }\n messageCase_ = 3;\n return this;\n }", "public void setString(Object key, String value) {\n\t\tgetArgMap().put(key, value);\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ This is the Constructor
public MoveOrderEffectChecker(OrderRuleChecker<T> next) { super(next); }
[ "Cokolady()\t{\r\n\t\tsuper();\r\n\t}", "public Cachorro() {\r\n }", "public Tanh() {\n\t}", "public Innlegg() {\n\t\t\n\t}", "public Copome() {\r\n\t}", "public Chord()\n\t{\n\t}", "private O()\r\n {\r\n super();\r\n }", "@Override\r\n\tpublic void init() {\n\t \r\n\t}", "public CEL_Chauffage() {}", "public Jeroo() {super();}", "public A231503() {\n this(3, 2);\n }", "public sundae() {\n\t\tsuper(); // calls the super default constructor\n\t}", "@Override\n \tpublic void init() {\n \n \t}", "public HeOld() {\n\t\t\n\t}", "public Kakuro() {\n\t}", "protected GeometricObject() {\r\n\r\n\t}", "public Tbsloaidon19() {\n super();\n }", "private Casier(){}", "public Curso() {\n\t\tsuper();\n\t}", "public Citas() {\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO: Replace this with your own logic
private boolean isPasswordValid(String password) { return password.length() > 4; }
[ "@Override\n public void extornar() {\n \n }", "@Override\n }", "protected void method_5557() {}", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "private static void EX5() {\n\t\t\r\n\t}", "@Override\n public int utilite() {\n return 0;\n }", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tprotected void swop() {\n\n\t\t}", "@Override\r\n\tpublic void jugar() {\n\t\t\r\n\t}", "protected void mo4791d() {\n }", "private OngoingSearches() {\n\n\t}", "@Override\r\n\tpublic void zwroc() {\n\t\t\r\n\t}", "@Test\n\tpublic void testReadAntesBlinds() {\n\n\t}", "@Override\r\n\tpublic void preco() {\n\r\n\t}", "@Override\n protected boolean relevant() {\n return true;\n }", "private static void depoureti() {\n\t\t\n\t}", "@Override\n public boolean isRepetitive() {\n return true;\n }", "@Override\r\n public void publicando() {\n }", "@Override\n\tpublic void inorder() {\n\t\t\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
setter function for phoneNumber
public void setPhoneNumber(String s) { this.phoneNumber = s; }
[ "public void setPhoneNumber(String numToSet) {\n phoneNum = numToSet;\n }", "public void setPhoneNumber(String pN){\r\n phoneNumber = pN;\r\n }", "public abstract void setPhone(java.lang.String phone);", "public void setPhoneNumber(String a){\n\t\tphoneNumber = a;\n\t}", "protected void setPhoneNumber(String aPhoneNumber)\r\n {\r\n this.phoneNumber = aPhoneNumber;\r\n }", "public void setPhoneNumber(String phoneNumber)\r\n\t {\r\n\t this.phoneNumber = phoneNumber;\r\n\t }", "public void setPhoneNumber(String newPhoneNumber)\n {\n this.phoneNumber = newPhoneNumber;\n }", "public void setPhoneNumber(java.lang.CharSequence value) {\n this.phoneNumber = value;\n }", "public com.practicaldime.common.avro.ProfileAvro.Builder setPhoneNumber(java.lang.CharSequence value) {\n validate(fields()[5], value);\n this.phoneNumber = value;\n fieldSetFlags()[5] = true;\n return this;\n }", "public void setPhone(String value)\r\n {\r\n phone.setValue(value);\r\n }", "public void setPhone (String phone) {\r\n mPhone = phone;\r\n }", "public void setPhoneNumberPerson(String phoneNumber) \n {\n this.phoneNumber = phoneNumber;\n }", "public void setPhone(String phone) {\n\t\tthis.phone = MyScanner.formatPhoneNo(phone);\r\n\t}", "public void setPhoneNumber(String phoneNumber)\n {\n this.phoneNumber = phoneNumber;\n }", "public void setPhone(String phone) {\t\t\n\t\tthis.phone = phone ;\t\t\n\t}", "public void setPhoneNumber(Integer phoneNumber) {\r\n\t\tthis.phoneNumber = phoneNumber;\r\n\t}", "public void setPhone(String inp) {\t\t\n \t\tthis.phone = inp ;\t\t\n \t}", "public void setPhoneNumber(String phoneNumber)\n {\n this.phoneNumber = phoneNumber;\n }", "public Builder setPhoneNumber(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000400;\n phoneNumber_ = value;\n onChanged();\n return this;\n }", "public Builder setPhoneNumber(\n java.lang.String value) {\n if (value == null) { throw new NullPointerException(); }\n phoneNumber_ = value;\n bitField0_ |= 0x00000080;\n onChanged();\n return this;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The content type of the document.
public String getContentType() { return this.contentType; }
[ "public Integer getContenttype() {\n return contenttype;\n }", "public String getType() {\r\n try {\r\n return getHeaderField(\"content-type\");\r\n } catch (IOException x) {\r\n return null;\r\n }\r\n\r\n }", "public String getContentType()\n {\n return contentType_;\n }", "public String getContentType()\n {\n return _contentType;\n }", "public String getContentType(){\n return type;\n }", "public String getContentType() \n {\n return contentType;\n }", "public int getContentType() {\n return contentType;\n }", "public String getContentType()\n {\n return _contentType;\n }", "@Override\n public String getContentType() {\n String cType = guessContentTypeFromName(getEntryName());\n if (cType == null) {\n cType = \"content/unknown\";\n }\n return cType;\n }", "public String getContentType()\r\n {\r\n return getHeader(CONTENTTYPE);\r\n }", "public String getContentType() {\n\t\tif(this.content_type != null) \n\t\t\treturn this.content_type;\n\t\treturn \"text/html\";\n\t}", "String getContentType() {\n\t\t\treturn this.contentType;\n\t\t}", "@NotNull\n public String getDocumentType() {\n return this.documentType;\n }", "public SignatureConstants.DocumentTypes getDocumentType()\n\t{\n\t\treturn documentType;\n\t}", "public String getContentType() {\n return getPart().getContentType();\n }", "public String getContentType() {\n return CollabDefaultFileHandlerFactory.CONTENT_UNKNOWN;\n }", "public int getDocumentType() {\r\n return documentType;\r\n }", "public DocumentType getDocumentType() {\n\t\treturn documentType;\n\t}", "public Integer getDocumentType() {\n return documentType;\n }", "public JavaType getContentType()\n/* */ {\n/* 151 */ return this._collectionType.getContentType();\n/* */ }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional string REMOVE_string_index = 999; The string to display to the user.
com.google.protobuf.ByteString getREMOVEStringIndexBytes();
[ "@Override\n\tpublic void remove(String str) {\n\n\t}", "public void mo15551a(String str) {\n Editor edit = this.f11053b.edit();\n edit.remove(str);\n edit.apply();\n }", "public void removeString(int offset, String str, String section);", "public void remove(int index){\n\t\tfor(int i = index; i < numStrings-1; i++){\n\t\t\trow[i] = row[i+1];\n\t\t}\n\t\tnumStrings--;\n\t\tif(numStrings < (int)(maxSize/4) && maxSize > 8){\n\t\t\thalveMax();\n\t\t}\n\t}", "@Override\r\n\tpublic int delete(String str) {\n\t\treturn 0;\r\n\t}", "public String deIndex() {\n\t\treturn deIndex(buf.toString());\n\t}", "public void remove(String toRemove);", "public String remove(int removeIndex) {\n String removedItem = list[removeIndex];\n StringArrayList removeList = new StringArrayList();\n for (int i = 0; i < elements; i++) {\n if (i == removeIndex) continue;\n else removeList.add(list[i]);\n }\n this.list = removeList.toArray();\n elements--;\n return removedItem;\n }", "public void remove(String value)\r\n {\r\n \r\n \t\tboolean wasFound = false;\r\n \t\tint itemIndex =0;\r\n \t\twhile(wasFound == false && itemIndex<items.length)\r\n \t\t{\t\r\n \t\t\tif(size()!=0&&items[itemIndex].equals(value))\r\n \t\t\t{\r\n \t\t\t\titems[itemIndex] = null;\r\n \t\t\t\tshiftElementToLeft(itemIndex);\r\n \t\t\t\titems[items.length-1]=null;\r\n \t\t\t\twasFound = true;\r\n \t\t\t\tsize--;\r\n \t\t\t}\r\n \t\t\telse{\r\n \t\t\t\tSystem.out.print(\"\");\r\n \t\t\t}\r\n \t\t\titemIndex++;\r\n \t\t}\t\t\r\n }", "public static void main(String[] args)\r\n\t {\r\n\t\t \r\n\t\t Scanner userInput = new Scanner(System.in);\r\n\t\t //Taking user input\r\n\t\t System.out.println(\"Enter the string\");\r\n\t\t String userInsertedString = userInput.nextLine();\r\n\t\t \r\n\t\t System.out.println(\"Enter the index from where you want to remove char\");\r\n\t\t int userInsertedIndex = userInput.nextInt();\r\n\t\t \r\n\t\t /*Now we have to cretae object of Character_Missing class,\r\n\t\t to call its function.*/\r\n\t\t /*\r\n\t\t * Here, we will pass both index value and string to the fucntion.\r\n\t\t * Here, the fucntion will return new string\r\n\t\t * */\r\n\t\t Character_Missing newObject = new Character_Missing();\r\n\t\t String newRemovedCharacterString = newObject.missingCharacter(userInsertedString, userInsertedIndex);\r\n\t\t \r\n\t\t //Printing the removed character string\r\n\t\t System.out.println(\"The newly removed string is: \" +newRemovedCharacterString);\r\n\t\t \r\n\t\t \r\n\t }", "public void removeEntry(String index) {\n\n LinkedList<String> filecontent = new LinkedList<String>();\n Scanner reader = null;\n\n try{\n reader = new Scanner(this.db);\n }catch (IOException ex){\n ex.printStackTrace();\n }\n\n while(reader.hasNextLine())\n filecontent.add(reader.nextLine());\n\n reader.close();\n\n if(filecontent.isEmpty())\n return;\n\n for(String s : filecontent){\n String[] line = s.split(\" \");\n if(index.equalsIgnoreCase(line[0])){\n filecontent.remove(s);\n break;\n }\n }\n\n xemsub.writeFile(filecontent, this.db);\n }", "public static void m121856a(String str) {\n f87323a.edit().remove(str).apply();\n }", "public static void main(String[] args) {\n\t Scanner sc=new Scanner(System.in);\n\t String oldStr=new String();\n\t String delStr=new String();\n\t String newStr;\n\t System.out.println(\"Please enter main String:\");\n\t oldStr=sc.nextLine();\n\t System.out.println(\"Please enter substring String to Delete:\");\n\t delStr=sc.nextLine();\n\t \n newStr=replacestring(oldStr,delStr);\n\t // newStr = oldStr.replace(delStr, \"\");\n\t \n System.out.println(oldStr);\n System.out.println(newStr);\n sc.close();\n\t \n\t }", "@Override\r\n public String getLabel() {\r\n return \"Remove setting\";\r\n }", "public void addRemoveIndv(String removeIndv) {\r\n this.removeIndv.add(removeIndv);\r\n }", "@Override\n\tpublic void remove(int idx) \n\t\t\tthrows EugeneException {\n\t}", "private void stage5()\r\n {\r\n masterList1.remove();\r\n String x = \"After Remove : \"; \r\n x += masterList1 ;\r\n textData[4].setText(x);\r\n if(DEBUGMODE)\r\n if (masterList1.toString().endsWith(\":12]\")) \r\n SO.println(\"PASSED STAGE 5\"); \r\n else SO.println(\" FAILED STAGE 5\");\r\n }", "@Override\n public Element remove(int index) {\n \tString key = lang.keySet().stream().sorted().skip(index).findFirst().get();\n \tString previous = lang.remove(key);\n \tElement e = DOMUtil.createElement(new QName(COMPLEX_TYPE.getNamespaceURI(), key));\n \te.setTextContent(previous);\n \treturn e;\n }", "void removeLocalization(int i);", "@Override\r\n\tpublic void removeMapping(String paramString) {\n\t\t\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }