query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
unmarshalling json to xml of Service Call
public void serviceCallUnmarshall(Exchange exchange) throws JSONException{ String jsonInput=exchange.getIn().getBody(String.class); //unmarshalls only if the exchange contains json data if(jsonInput.startsWith("{")){ JSONObject jsonObj=new JSONObject(jsonInput); JSONArray jsonarray = (JSONArray) jsonObj.get("data"); String xml= XML.toString(jsonarray.get(0)); exchange.getIn().setBody(xml); } else{ exchange.getIn().setBody(jsonInput); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void test1() throws XRd4JException, SOAPException {\n String soapString = \"<SOAP-ENV:Envelope xmlns:SOAP-ENV=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\" xmlns:id=\\\"http://x-road.eu/xsd/identifiers\\\" xmlns:xrd=\\\"http://x-road.eu/xsd/xroad.xsd\\\"><SOAP-ENV:Header><xrd:client id:objectType...
[ "0.58278483", "0.5514659", "0.5269722", "0.52659565", "0.52346563", "0.5203757", "0.5202463", "0.51462144", "0.51094675", "0.51063454", "0.5099945", "0.50962716", "0.50957143", "0.509235", "0.5080122", "0.5066851", "0.5056971", "0.5055293", "0.50536853", "0.50534356", "0.5051...
0.65896934
0
..end of method to generate the document object once and all from the xml input which is of String
public Document generateDocumentFromString(String xmlInput) throws SCNotifyRequestProcessingException { DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = null; Document xmlDocument; logger.debug(".xmlInput : "+xmlInput); try { builder = builderFactory.newDocumentBuilder(); } catch (ParserConfigurationException e) { throw new SCNotifyRequestProcessingException("Unable to initiate the document builder..", e); } try { xmlDocument = builder.parse(new ByteArrayInputStream(xmlInput.getBytes("UTF-16"))); } catch (SAXException | IOException e) { throw new SCNotifyRequestProcessingException("Unable to parse the xmlString into document..", e); } return xmlDocument; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public XMLDocument() {\r\n xml = new StringBuilder();\r\n }", "private void Obtengo_el_documento(String inputString) throws ParserConfigurationException, UnsupportedEncodingException, SAXException, IOException {\n DocumentBuilderFactory factory\n = DocumentBuilderFactory.newInstan...
[ "0.7126127", "0.7074397", "0.6948109", "0.6706569", "0.6580433", "0.64495814", "0.6419299", "0.6412889", "0.63854676", "0.63771945", "0.62976", "0.6260146", "0.6246126", "0.6246126", "0.6246126", "0.62317383", "0.6215224", "0.61691856", "0.61388516", "0.6127129", "0.6090235",...
0.74675643
0
..end of method This method is used for node to String format
public String nodeToString(Node givenNode) throws SCNotifyRequestProcessingException { StringWriter sw = new StringWriter(); String str; try { Transformer t = TransformerFactory.newInstance().newTransformer(); t.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); t.setOutputProperty(OutputKeys.ENCODING, "UTF-16"); t.transform(new DOMSource(givenNode), new StreamResult(sw)); str = sw.toString(); } catch (TransformerException te) { throw new SCNotifyRequestProcessingException(); } return str; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String toString() {\n return (this.originalValue == null ? this.getValue() : this.originalValue) + (this.nodeType.getName() == null\n ? \"\" : (\":\" + this.nodeType.getName()));\n }", "@Override\n public String toString() {\n return InternalNodeSerializer.toS...
[ "0.7441031", "0.7426771", "0.7360329", "0.71645075", "0.7138936", "0.71115756", "0.7095099", "0.70898664", "0.702401", "0.70009995", "0.6964879", "0.6950167", "0.69430333", "0.6923311", "0.6908225", "0.6873691", "0.68655133", "0.68415076", "0.67482656", "0.6727511", "0.672515...
0.7087175
8
..end of method to get StatusID Id From given notification Xml Data
public boolean getStatusNameFromXmlData(Document document,MeshHeader meshHeader,Exchange exhExchange) throws SCNotifyRequestProcessingException { logger.debug("(.) getStatusNameFromXmlData method of ServiceChannelNotificationProcessBean class "); String status=""; String internalStatus=""; boolean statusExist=false; if(document !=null){ XPath xPath = XPathFactory.newInstance().newXPath(); NodeList nodeTypeList; try { nodeTypeList = (NodeList) xPath.compile((String)NotificationMasterConstants.XPATH_SC_STATUS).evaluate(document, XPathConstants.NODESET); //checking if if(nodeTypeList !=null && nodeTypeList.getLength()>0){ Node node =nodeTypeList.item(0); status=node.getTextContent(); logger.debug(" Status Value === "+status); statusExist=true; internalStatus= getInternalStatusFromCacheData(status.trim(), SACConstant.SERVICECHANEL_KEY2ACT_STATUS_MAPPING_KEY, meshHeader); addElmentToXmlDocument(document, NotificationMasterConstants.INTERNAL_STATUS_NODE,internalStatus,NotificationMasterConstants.XPATH_SC_INTERNAL_STATUS); } exhExchange.getIn().setBody(documentToString(document)); } catch (XPathExpressionException | TransformerException e) { logger.error("Error in Evavluating Xpath Expression to get status value ",e); }} return statusExist; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getNotificationID();", "public long getStatusId();", "public long getNotification_id() {\n return notification_id;\n }", "public abstract long getStatusId();", "String getOldStatusId();", "ch.crif_online.www.webservices.crifsoapservice.v1_00.IdVerificationResponseData getIdVerificationRe...
[ "0.66829824", "0.611034", "0.5962726", "0.5961504", "0.5957283", "0.5864561", "0.5860451", "0.57691514", "0.5742378", "0.5735639", "0.5669212", "0.56553185", "0.56182843", "0.55339295", "0.5526471", "0.5459323", "0.5438348", "0.5437789", "0.5402234", "0.5390479", "0.5367168",...
0.61013037
2
.. End of Method getStatusNameFromXmlData to add new element to xml data
public void addElmentToXmlDocument(Document document,String elementToAdd,String elementContent,String xpath) { logger.debug("(.) addElmentToXmlDocument "); if(document !=null){ XPath xPath = XPathFactory.newInstance().newXPath(); NodeList nodeTypeList; try { nodeTypeList = (NodeList) xPath.compile((String)xpath).evaluate(document, XPathConstants.NODESET); //checking if if(nodeTypeList !=null && nodeTypeList.getLength()>0){ Element node = document.createElement(elementToAdd); node.setTextContent(elementContent); // appended the element as a child to the node fetched from the // xpath nodeTypeList.item(0).appendChild(node); logger.debug(" element added to xml "); } } catch (XPathExpressionException e) { logger.error("Error in Evavluating Xpath Expression : "+xpath ,e); }} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void visitElement_status(org.w3c.dom.Element element) { // <status>\n // element.getValue();\n org.w3c.dom.NamedNodeMap attrs = element.getAttributes();\n for (int i = 0; i < attrs.getLength(); i++) {\n org.w3c.dom.Attr attr = (org.w3c.dom.Attr)attrs.item(i);\n if (attr.g...
[ "0.600783", "0.5974643", "0.58059186", "0.5404015", "0.53349966", "0.51907456", "0.5179775", "0.51254183", "0.51254183", "0.51198775", "0.5088645", "0.50644535", "0.5042008", "0.5012647", "0.50000703", "0.49830058", "0.4959177", "0.49386966", "0.49175432", "0.48498124", "0.48...
0.0
-1
.. End of Method addElmentToXmlDocument to add Attriubute to xml data
public void addAttributeToXmlDocument(Document document,String attributeName,String attributeContent,String xpath) { logger.debug("(.) addAttributeToXmlDocument "); if(document !=null){ XPath xPath = XPathFactory.newInstance().newXPath(); NodeList nodeTypeList; try { nodeTypeList = (NodeList) xPath.compile((String)xpath).evaluate(document, XPathConstants.NODESET); logger.debug("Node Type LIST : "+nodeTypeList.getLength()); //checking if if(nodeTypeList !=null && nodeTypeList.getLength()>0){ Element node =(Element) nodeTypeList.item(0); node.setAttribute(attributeName, attributeContent); logger.debug(" element added to xml "); } } catch (XPathExpressionException e) { logger.error("Error in Evavluating Xpath Expression : "+xpath ,e); }} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addElmentToXmlDocument(Document document,String elementToAdd,String elementContent,String xpath) {\n\t\tlogger.debug(\"(.) addElmentToXmlDocument \");\n\t\tif(document !=null){\n\t\t\tXPath xPath = XPathFactory.newInstance().newXPath();\n\t\t\n\t\tNodeList nodeTypeList;\n\t\ttry {\n\t\t\tnodeTypeList...
[ "0.6044558", "0.59496975", "0.59037524", "0.57260585", "0.5602807", "0.5601257", "0.54642874", "0.54416794", "0.54378587", "0.5432169", "0.5396469", "0.535832", "0.5313894", "0.53118527", "0.52968293", "0.5280955", "0.52415895", "0.52373767", "0.5205279", "0.5205031", "0.5190...
0.5534545
6
.. End of Method addElmentToXmlDocument method taking XPAth as input and returning the data processed with the exchange after encoding it.
public String encodeFromXpath(String expression, Document xmlDocument) throws SCNotifyRequestProcessingException { logger.debug("(.) inside encodeFromXpath method of ServiceChannelNotificationProcessBean Class "); NotificationUtil notificationUtil = new NotificationUtil(); String fieldVal = null; XPath xPath = XPathFactory.newInstance().newXPath(); NodeList nodeList = null; try { nodeList = (NodeList) xPath.compile(expression).evaluate(xmlDocument, XPathConstants.NODESET); for (int i = 0; i < nodeList.getLength(); i++) { if (nodeList.item(0).getNodeType() != Node.ELEMENT_NODE) { fieldVal = nodeList.item(0).getTextContent().trim(); logger.debug(".encodedData (StoreID OR CustomerID) : " + fieldVal); } else { Node givenNode = nodeList.item(0); fieldVal = notificationUtil.nodeToString(givenNode.getFirstChild()).trim(); logger.debug(".xmlData : " + fieldVal); } } return fieldVal; } catch (XPathExpressionException e) { throw new SCNotifyRequestProcessingException("Unable to compile the xpath expression at index - " + " when evaluating document - " + xmlDocument.getFirstChild().getNodeName() + "..", e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, sample.ws.HelloWorldWSStub.HelloAuthenticatedWithEntitlementPrecheck param, boolean optimizeContent)\n throws org.apache.axis2.AxisFault{\n\n ...
[ "0.5803616", "0.5798044", "0.57973677", "0.57759464", "0.57587665", "0.5751287", "0.572171", "0.57082283", "0.56744665", "0.5612857", "0.5607412", "0.55994815", "0.55805105", "0.550382", "0.5498562", "0.5488588", "0.54882824", "0.5478954", "0.5466847", "0.5460444", "0.544199"...
0.0
-1
..end of method encodeFromXpath This is to get permastore cache data from mesh header
private String getInternalStatusFromCacheData(String searchString,String parmaConfigname,MeshHeader meshHeader) throws SCNotifyRequestProcessingException{ logger.debug("(.) getInternalStatusFromCacheData method of ServiceChannelNotificationProcessBean Class"); String internalStatus=""; Map<String,Object> permaCacheObjectInMap=meshHeader.getPermadata(); Map<String,Object> permaCacheObject=(Map<String, Object>)permaCacheObjectInMap.get(parmaConfigname.trim()); Object object=permaCacheObject.get(searchString.trim()); logger.debug("object : "+object); if(object==null) throw new SCNotifyRequestProcessingException("Error not found permstore Cache Data for key == "+searchString); if(object instanceof org.json.simple.JSONArray){ org.json.simple.JSONArray jsonArray=( org.json.simple.JSONArray)object; if(jsonArray.size()==2){ org.json.simple.JSONObject json=(org.json.simple.JSONObject)jsonArray.get(0); internalStatus=json.get(NotificationMasterConstants.INTERNAL_STATUS_KEY).toString(); } }else{ org.json.simple.JSONObject json=(org.json.simple.JSONObject)object; internalStatus=json.get(NotificationMasterConstants.INTERNAL_STATUS_KEY).toString(); } logger.debug(" internal status value = "+ internalStatus); return internalStatus; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "DataElement getFromCache(String dataElementName);", "public String getDataFromCacheData(String providerkey,String searchKey,String parmaConfigname,MeshHeader meshHeader) throws SCNotifyRequestProcessingException{\n\t\tlogger.debug(\"(.) getDataFromCacheData method of ServiceChannelNotificationProcessBean Class\...
[ "0.47887772", "0.47527042", "0.46457234", "0.4428574", "0.44056508", "0.44056508", "0.44056508", "0.44056508", "0.44047207", "0.44018054", "0.4382047", "0.43694368", "0.43460366", "0.4325069", "0.43165472", "0.43150568", "0.43006936", "0.42988563", "0.42880264", "0.42727754", ...
0.4167137
33
..end of method getInternalStatusFromCacheData This is to get permastore cache data from mesh header
public String getDataFromCacheData(String providerkey,String searchKey,String parmaConfigname,MeshHeader meshHeader) throws SCNotifyRequestProcessingException{ logger.debug("(.) getDataFromCacheData method of ServiceChannelNotificationProcessBean Class"); String data=""; Map<String,Object> permaCacheObjectInMap=meshHeader.getPermadata(); logger.debug("providerkey : "+providerkey +" searchKey : "+ searchKey +" Permastore Data : "+parmaConfigname ); Map<String,Object> permaCacheObject=(Map<String, Object>)permaCacheObjectInMap.get(parmaConfigname.trim()); logger.debug("Permastore Data : "+permaCacheObject ); Object object=permaCacheObject.get(providerkey.trim()); logger.debug("object : "+object); if(object==null) throw new SCNotifyRequestProcessingException("Error not found permstore Cache Data for key == "+providerkey); if(!(object instanceof org.json.simple.JSONObject)) throw new SCNotifyRequestProcessingException("Error not found permstore Cache Data for key == "+providerkey); org.json.simple.JSONObject json=(org.json.simple.JSONObject)object; logger.debug("json : "+json); org.json.simple.JSONObject scConfig=(org.json.simple.JSONObject)json.get(NotificationMasterConstants.SC_CONFIG_KEY); data=scConfig.get(searchKey).toString(); logger.debug(" value From permastore SC-CONFIG = "+ data); return data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getInternalStatusFromCacheData(String searchString,String parmaConfigname,MeshHeader meshHeader) throws SCNotifyRequestProcessingException{\n\t\tlogger.debug(\"(.) getInternalStatusFromCacheData method of ServiceChannelNotificationProcessBean Class\");\n\t\tString internalStatus=\"\";\n\t\tMap<Strin...
[ "0.69448024", "0.5484345", "0.53409994", "0.53072864", "0.5305152", "0.5258025", "0.52404964", "0.52139246", "0.5209884", "0.5203858", "0.517237", "0.51608205", "0.51515174", "0.51421547", "0.5120415", "0.51025903", "0.51004034", "0.5090317", "0.50839734", "0.50830024", "0.50...
0.5525347
1
..end of method getDataFromCacheData encode xml document with UTF16 and convert string format
public String documentToString(Document xmlDocument) throws TransformerException { logger.debug("(.) documentToString method of ServiceChannelNotificationProcessBean class "); DOMSource domSource = new DOMSource(xmlDocument); StringWriter writer = new StringWriter(); StreamResult result = new StreamResult(writer); TransformerFactory tf = TransformerFactory.newInstance(); Transformer transformer = tf.newTransformer(); transformer.setOutputProperty(OutputKeys.ENCODING,"UTF-16"); transformer.transform(domSource, result); logger.debug(" DOcument generated string : "+writer.toString()); return writer.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getContentEncoding();", "public static String getUTF8String(String xml) {\n // A StringBuffer Object\n StringBuffer sb = new StringBuffer();\n sb.append(xml);\n String str = \"\";\n String strUTF8=\"\";\n try {\n str = new String(sb.toString().getBytes(...
[ "0.55866426", "0.55519104", "0.54003704", "0.5380189", "0.5356479", "0.5345066", "0.52284116", "0.52284116", "0.52284116", "0.517301", "0.51648414", "0.51441234", "0.51409465", "0.5088805", "0.5062725", "0.4997597", "0.49969822", "0.4992045", "0.49763936", "0.49559468", "0.49...
0.53238535
6
NOTE: raw value does not encode all the possible concept information so we have to override getValue() which assumes that it does
@Override public ConceptType getValue() { ConceptType value = this.value; String rawValue = this.getRawValue(); if (null != value && value.getDisplay().equals(rawValue)) return value; return super.getValue(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object getRawValue();", "org.hl7.fhir.CodeableConcept getValueCodeableConcept();", "public abstract Value getValue();", "public abstract Object getValue();", "public abstract Object getValue();", "public abstract Object getValue();", "java.lang.String getValue();", "java.lang.String getValue()...
[ "0.7288023", "0.69277394", "0.69262445", "0.6890678", "0.6890678", "0.6890678", "0.68270326", "0.68270326", "0.68270326", "0.68270326", "0.68270326", "0.68270326", "0.6779366", "0.6779366", "0.6779366", "0.6779366", "0.6779366", "0.67684585", "0.67523336", "0.67523336", "0.67...
0.7473891
0
Custom window on trigger
@Override protected void onTriggerClick(ComponentEvent ce) { showEditor(ConceptPicker.this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void windowOpened(WindowEvent e) {\n \n }", "@Override\n\t\t\tpublic void windowOpened(WindowEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\tpublic void windowOpened(WindowEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n public void windowOpened(WindowEvent we) {\n ...
[ "0.7438984", "0.7383913", "0.7348799", "0.7319161", "0.7303617", "0.7303617", "0.7276801", "0.72760785", "0.72760785", "0.72760785", "0.72760785", "0.72467995", "0.72467995", "0.72467995", "0.72467995", "0.72467995", "0.72467995", "0.72467995", "0.72467995", "0.72467995", "0....
0.0
-1
push from the EditorPanel to the TriggerField
private void apply(final boolean hideOnSuccess) { if (_selectedRadio == _lookupRadio) { final String folder = _lookupEditorPanel.getContainer(); final String schema = _lookupEditorPanel.getSchemaName(); final String table = _lookupEditorPanel.getTableName(); final String typeURI = _lookupEditorPanel.getTypeURI(); PropertyType type = null == typeURI ? null : PropertyType.fromURI(typeURI); // _log("apply " + folder + " " + schema + " " + table + " " + typeURI); if (_empty(schema) || _empty(table)) { Window.alert("Schema name and table name must not be empty"); return; } if (!_current.isRangeEditable && null != _current.getValue()) type = _current.getValue().getPropertyType(); if (null == type) { Window.alert("Type was not set correctly"); return; } _current.setValue(new LookupConceptType(type, folder, schema, table)); if (hideOnSuccess) hide(); } else // !lookup { _current.setValue(_selectedRadio._type); if (hideOnSuccess) hide(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n protected void onTriggerClick(ComponentEvent ce)\r\n {\r\n showEditor(ConceptPicker.this);\r\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n fieldList.setSelectedValue(field, false);\n insertTextForTag(overrideField);\n }", "pu...
[ "0.62073094", "0.59746075", "0.5942903", "0.56948584", "0.5522833", "0.54459035", "0.5428992", "0.54260296", "0.5403717", "0.53837615", "0.5364112", "0.5361978", "0.53538233", "0.5329522", "0.53160536", "0.5283966", "0.52765733", "0.5263727", "0.5254351", "0.522952", "0.52130...
0.0
-1
To be used to get the Slf4J Logger in a class, eg. private final static Logger LOG = Slogr.get();. To avoid the Logger declaration completely, use the class Say.
public static Logger get() { return LoggerFactory.getLogger(WALKER.getCallerClass()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static Logger log() {\n return LogSingleton.INSTANCE.value;\n }", "private Logger getLogger() {\n return LoggingUtils.getLogger();\n }", "public Logger getLogger() {\t\t\n\t\treturn logger = LoggerFactory.getLogger(getClazz());\n\t}", "private static Logger getLogger() {\n ...
[ "0.73985547", "0.71940756", "0.71048665", "0.7026633", "0.7002762", "0.6986439", "0.69727814", "0.6954466", "0.6880287", "0.68439156", "0.6809158", "0.6808233", "0.6803029", "0.6802189", "0.6788893", "0.6779969", "0.677632", "0.67221963", "0.669424", "0.6686201", "0.66820425"...
0.75098854
0
Service for creation and manipulation of profiles
public interface ProfilingService { String PROFILES = "profiles"; /** * Get the profile factory for a given data source * * @param dataSourceMetadata the data source metadata * @return a ProfileFactory that accepts the reference (or null if it doesn't exist) */ ProfileFactory getProfileFactory( DataSourceMetadata dataSourceMetadata ); /** * Return a boolean indicating whether a ProfileFactory exists for the given data source * * @param dataSourceMetadata the data source metadata * @return true iff there is a ProfileFactory that accepts the reference */ boolean accepts( DataSourceMetadata dataSourceMetadata ); /** * Creates a profile from the ProfileConfiguration and returns its initial status * * @param profileConfiguration the profile configuration * @return a ProfileStatusManager for the created profile * @throws ProfileCreationException if there is an error during profile creation */ ProfileStatusManager create( ProfileConfiguration profileConfiguration ) throws ProfileCreationException; /** * Returns a list of the currently active profiles * * @return a list of the currently active profiles */ List<ProfileStatusReader> getActiveProfiles(); /** * Returns the profile for a given profileId * * @param profileId the profileId * @return the Profile */ Profile getProfile( String profileId ); /** * Returns the a ProfileStatusReader for the given profileId * * @param profileId the profileId * @return the ProfileStatusReader */ ProfileStatusReader getProfileUpdate( String profileId ); /** * Stops the profile with the given id * * @param profileId the profileId to stop */ void stop( String profileId ); /** * Stops all the running profiles */ void stopAll(); /** * Returns a boolean indicating whether a profile is running * * @param profileId the profileId to check * @return a boolean indicating whether a profile is running */ boolean isRunning( String profileId ); /** * Discards the profile with the given id * * @param profileId the profileId to discard */ void discardProfile( String profileId ); /** * Discards all profiles */ void discardProfiles(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void saveProfileCreateData() {\r\n\r\n }", "ProfileStatusManager create( ProfileConfiguration profileConfiguration ) throws ProfileCreationException;", "Profile getProfile( String profileId );", "@Override\n\tpublic long createProfile(Profile profile) {\n\t\treturn 0;\n\t}", "public void setProfi...
[ "0.69811237", "0.69528216", "0.68785495", "0.6813865", "0.67060846", "0.668873", "0.66672325", "0.6647825", "0.6638107", "0.6599162", "0.6554881", "0.65213746", "0.6491503", "0.6482746", "0.64560366", "0.64536065", "0.6445468", "0.6423526", "0.64125293", "0.6368631", "0.63676...
0.6205789
35
Get the profile factory for a given data source
ProfileFactory getProfileFactory( DataSourceMetadata dataSourceMetadata );
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Profile(\"production\")\r\n @Bean(name=\"DataSourceBean\") \r\n public DataSource getDataSource(){\r\n final JndiDataSourceLookup dsLookup = new JndiDataSourceLookup();\r\n dsLookup.setResourceRef(true);\r\n DataSource dataSource = dsLookup.getDataSource(\"jdbc/eshop_db\"); \t ...
[ "0.5656424", "0.5626062", "0.5511509", "0.5482999", "0.54687047", "0.5421979", "0.5286035", "0.52284133", "0.5220789", "0.5204684", "0.5182579", "0.51679254", "0.5148864", "0.5139745", "0.5129298", "0.51269436", "0.51229537", "0.50680476", "0.50606596", "0.50587785", "0.50318...
0.80524397
0
Return a boolean indicating whether a ProfileFactory exists for the given data source
boolean accepts( DataSourceMetadata dataSourceMetadata );
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasProfile();", "private boolean checkIfProfileExists() {\n String profileCreatedKey = context.getString(R.string.app_name_key) + context.getString(R.string.created_profile_key);\n String profileCreated = sharedPref.getString(profileCreatedKey, \"false\");\n return Boolean.valueOf(pr...
[ "0.6721683", "0.65274155", "0.639859", "0.63672227", "0.6304956", "0.61542803", "0.6130765", "0.6063424", "0.60501873", "0.5975285", "0.5975285", "0.59475034", "0.5942686", "0.58935976", "0.5881398", "0.5852348", "0.5827255", "0.5804053", "0.57627815", "0.57183635", "0.570762...
0.526107
59
Creates a profile from the ProfileConfiguration and returns its initial status
ProfileStatusManager create( ProfileConfiguration profileConfiguration ) throws ProfileCreationException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic long createProfile(Profile profile) {\n\t\treturn 0;\n\t}", "@Override\n\tpublic ProfileComponentsEvaluationResult<ConformanceProfile> create(CompositeProfileStructure structure) {\n\t\tConformanceProfile target = this.confProfileService.findById(structure.getConformanceProfileId());\n\t\tif(...
[ "0.6903226", "0.6430849", "0.6361476", "0.6071201", "0.59593433", "0.5939679", "0.5930516", "0.5927086", "0.5879701", "0.58655095", "0.5835188", "0.58259505", "0.574756", "0.5746072", "0.57429165", "0.5737815", "0.5674114", "0.56613874", "0.56198263", "0.5619289", "0.561733",...
0.8319169
0
Returns a list of the currently active profiles
List<ProfileStatusReader> getActiveProfiles();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String[] getProfiles();", "java.util.List<org.beangle.security.session.protobuf.Model.Profile>\n getProfilesList();", "@java.lang.Override\n public java.util.List<org.beangle.security.session.protobuf.Model.Profile> getProfilesList() {\n return profiles_;\n }", "public List<SmmProfile> g...
[ "0.7716771", "0.7691658", "0.7403911", "0.7389907", "0.7287477", "0.72106314", "0.71791935", "0.7153374", "0.69823766", "0.69345576", "0.68057233", "0.67819273", "0.67773765", "0.67608166", "0.6750219", "0.6746645", "0.6723", "0.6690947", "0.6672214", "0.6637348", "0.6635131"...
0.81237894
0
Returns the profile for a given profileId
Profile getProfile( String profileId );
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Profile getProfile(long profileId) {\n\t\treturn null;\n\t}", "public static Profile getById(String profileId) {\n return Dao.getInstance().get(Profile.class, profileId);\n }", "@Override\r\n public Profile getProfileById(int id) {\r\n return profileDAO.getProfileById(id...
[ "0.81128436", "0.80930656", "0.764276", "0.7353996", "0.72898537", "0.72752374", "0.72599727", "0.7192817", "0.7077816", "0.70421886", "0.7036253", "0.6971046", "0.6952763", "0.68589497", "0.6825172", "0.67437714", "0.6697964", "0.666503", "0.6630821", "0.6562823", "0.6555259...
0.87540823
0
Returns the a ProfileStatusReader for the given profileId
ProfileStatusReader getProfileUpdate( String profileId );
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Profile getProfile( String profileId );", "public static Profile getById(String profileId) {\n return Dao.getInstance().get(Profile.class, profileId);\n }", "List<ProfileStatusReader> getActiveProfiles();", "public Profile get(Long id, String authenticationCode, long profileId) {\n return ne...
[ "0.6708488", "0.65079975", "0.62516725", "0.6242091", "0.61215633", "0.6049858", "0.5835208", "0.57403386", "0.5631994", "0.5541057", "0.55232614", "0.55023605", "0.5492045", "0.5390469", "0.5355668", "0.5268449", "0.51605344", "0.51581603", "0.5132237", "0.51056606", "0.5084...
0.7452926
0
Stops the profile with the given id
void stop( String profileId );
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void discardProfile( String profileId );", "@Override\n\tpublic void deleteProfile(long profileId) {\n\t\t\n\t}", "public void stop(Integer id) throws DynamicCallException, ExecutionException{\n call(\"stop\", id).get();\n }", "@Override\n protected void onCurrentProfileChang...
[ "0.6639358", "0.6363785", "0.62535346", "0.6183209", "0.60507214", "0.6014264", "0.5993511", "0.59709203", "0.59644717", "0.59451807", "0.5875009", "0.5749055", "0.5685929", "0.56701857", "0.5639052", "0.5555787", "0.5540025", "0.55264264", "0.55259156", "0.552563", "0.547061...
0.8101814
0
Stops all the running profiles
void stopAll();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void stop( String profileId );", "private void removeProfiles()\r\n\t{\r\n\t\tfor (int i = 0; i < count; i++)\r\n\t\t{\r\n\t\t\tps.setValue(i + PROFILE, \"\");\r\n\t\t}\r\n\t\t\r\n\t\tcount = 0;\r\n\t\tps.setValue(PROFILE_COUNT, count);\r\n\t\t\r\n\t}", "public static void stopAllThreads() {\n SystemMan...
[ "0.7841722", "0.61483276", "0.60888106", "0.6087333", "0.6081873", "0.602864", "0.6003495", "0.60001504", "0.5947973", "0.5938871", "0.59373975", "0.59169316", "0.5908364", "0.5895266", "0.58571595", "0.5841503", "0.58386654", "0.58348554", "0.583195", "0.58244795", "0.581420...
0.6374015
1
Returns a boolean indicating whether a profile is running
boolean isRunning( String profileId );
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Boolean isProfileRunning() {\n return this.isProfileRunning;\n }", "boolean hasProfile();", "public Boolean isIisProfileRunning() {\n return this.isIisProfileRunning;\n }", "public boolean hasProfile() {\n return profileBuilder_ != null || profile_ != null;\n }", "@ja...
[ "0.84761244", "0.7670646", "0.7628875", "0.73763114", "0.7167396", "0.7126815", "0.705859", "0.6912988", "0.6912988", "0.6912988", "0.6912988", "0.6912988", "0.6912988", "0.6888578", "0.6888578", "0.6888578", "0.6888578", "0.6888578", "0.6885825", "0.6785302", "0.67033345", ...
0.8696947
0
Discards the profile with the given id
void discardProfile( String profileId );
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void delete(Long id) {\n log.debug(\"Request to delete DiscordUserProfile : {}\", id);\n discordUserProfileRepository.deleteById(id);\n }", "@Override\n\tpublic void deleteProfile(long profileId) {\n\t\t\n\t}", "public synchronized void flushProfile(long profileId)\n {\n profi...
[ "0.64170957", "0.63909966", "0.62202084", "0.6206426", "0.61486715", "0.6123005", "0.60826224", "0.60611963", "0.5978196", "0.59588647", "0.5884685", "0.5865781", "0.5823576", "0.580782", "0.5779442", "0.5778389", "0.57762945", "0.57538515", "0.57351893", "0.57309294", "0.571...
0.7669314
0
Scanner in = new Scanner(System.in); int n = in.nextInt();
public static void main(String[] args) { int[] grades = {73,67,38,33}; // for(int grades_i=0; grades_i < n; grades_i++){ // grades[grades_i] = in.nextInt(); // } int[] result = solve(grades); for (int i = 0; i < result.length; i++) { System.out.print(result[i] + (i != result.length - 1 ? "\n" : "")); } System.out.println(""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getInput() {\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter a number\");\r\n\t\tn=scan.nextInt();\r\n\r\n\t}", "private static int getN ()\n\t{\n\t int inputInt = 1;\n\t BufferedReader in = new BufferedReader (new InputStreamReader (System.in));\n\t String inStr ...
[ "0.8208172", "0.7743383", "0.77255905", "0.7721045", "0.76149035", "0.71207935", "0.7070147", "0.70620257", "0.70141053", "0.700683", "0.6999458", "0.6964539", "0.6960303", "0.69398737", "0.69191307", "0.6915874", "0.6908493", "0.68898255", "0.68773067", "0.68652344", "0.6841...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.print("Enter next int, 'done' to stop: "); String line = sc.next(); while (!line.equals("done")) { insertElement(Integer.parseInt(line)); // System.out.println(); System.out.print("Enter next int, 'done' to stop: "); line = sc.next(); } for (int i : items) { System.out.println(i); } System.out.println("\n"); int max = delete(); System.out.println("the root that is deleted is " + " " + max); System.out.println("\n"); System.out.println(" the new root is" + " " + items.get(0)); for (int i : items) { System.out.println(i); } System.out.println("\n"); for (int i : items) { System.out.println(i); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public void onCreate() { onPreCreateApplication(); super.onCreate(); initImageCtche(); doOncreate(); onAfterCreateApplication(); // getAppManager(); mInstance = this; initWidthAndHeight(); ApplicationInfo appInfo = null; TelephonyManager telephonyManager = null; try { appInfo = getPackageManager().getApplicationInfo(getPackageName(), PackageManager.GET_META_DATA); telephonyManager = (TelephonyManager) this .getSystemService(Context.TELEPHONY_SERVICE); } catch (NameNotFoundException e) { e.printStackTrace(); } Settings.init(this); // UserInfo u = Settings.loadUserInfo(); // if (u != null) { // UserController.setUser(u); // } // initRecorder(); // 确定是不�?1,如果是,则把Channel_id_int 弄成1,用来给91传日�? CHANNEL_ID = appInfo.metaData.getString("UMENG_CHANNEL"); if ("android.91.com".equals(CHANNEL_ID)) { CHANNEL_ID_INT = 1; } //处理平板无imei if(telephonyManager.getDeviceId()!=null){ if (!telephonyManager.getDeviceId().equals("Unknow")) { sIMEI = telephonyManager.getDeviceId(); } } sDeviceKey = Secure.getString(this.getContentResolver(), Secure.ANDROID_ID); Log.e("sDeviceKey", sDeviceKey); // // 从缓存取百度userid // String userId = getSharedPreferences(PushService.TAG, MODE_PRIVATE) // .getString(PushMessageReceiver.BAIDU_PUSH_USER_ID, null); // if (!StringUtils.isEmpty(userId)) { // Log.e("userId", userId); // } // Config.BAIDU_USER = userId; SSYImageCache.getInstance().init(this); //Settings.setFuFuUser(""); //Settings.setInWebIm(false); // initDB }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
protected void onAfterCreateApplication() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
protected void onPreCreateApplication() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void onSuccess(TAResponse response) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void onRuning(TAResponse response) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void onFailure(TAResponse response) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public void onFinish() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void onStart() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
create a new empty list of employees to return as a result
public List<Employee> listEmployees (int managerId){ List<Employee> employees = new ArrayList<Employee>(); try { // use prepared statements to prevent sql injection attacks PreparedStatement stmt = null; // the query to send to the database String query = "SELECT e.EmployeeID, e.FirstName, e.LastName, e.ManagerID As ManagerID, (SELECT COUNT(*) FROM employees WHERE ManagerID = e.EmployeeID) AS DirectReports FROM employees e "; if (managerId == 0) { // select where employees reportsto is null query += "WHERE e.ManagerID = 0"; stmt = _conn.prepareStatement(query); }else{ // select where the reportsto is equal to the employeeId parameter query += "WHERE e.ManagerID = ?" ; stmt = _conn.prepareStatement(query); stmt.setInt(1, managerId); } // execute the query into a result set ResultSet rs = stmt.executeQuery(); // iterate through the result set while(rs.next()) { // create a new employee model object Employee employee = new Employee(); // select fields out of the database and set them on the class //employee.setEmployeeID(rs.getString("EmployeeID")); //employee.setFirstName(rs.getString("FirstName")); //employee.setLastName(rs.getString("LastName")); //employee.setManagerID(rs.getString("ManagerID")); employee.setHasChildren(rs.getInt("DirectReports") > 0); //employee.setFullName(); // add the class to the list employees.add(employee); } } catch (SQLException e) { e.printStackTrace(); } // return the result list return employees; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Employee> getAllEmployees(){\n\t\tFaker faker = new Faker();\n\t\tList<Employee> employeeList = new ArrayList<Employee>();\n\t\tfor(int i=101; i<=110; i++) {\n\t\t\tEmployee myEmployee = new Employee();\n\t\t\tmyEmployee.setId(i);\n\t\t\tmyEmployee.setName(faker.name().fullName());\n\t\t\tmyEmployee.se...
[ "0.76766837", "0.74233747", "0.7407493", "0.7321122", "0.7300829", "0.7300829", "0.72474843", "0.7246276", "0.71662647", "0.7163743", "0.7155253", "0.7141615", "0.71310955", "0.71039814", "0.7101809", "0.70945483", "0.70829856", "0.707824", "0.7071452", "0.7067212", "0.702211...
0.0
-1
create a new empty list of employees to return as a result List employees = new ArrayList();
public int updatetreeview (int managerId){ int updatestatus = 0; try { // use prepared statements to prevent sql injection attacks PreparedStatement stmt = null; // the query to send to the database String query = "UPDATE employees SET ManagerID = 0 " + "WHERE EmployeeISD = " + managerId + ""; // execute the query into a result set //ResultSet rs = stmt.executeQuery(); stmt = _conn.prepareStatement(query); stmt.executeUpdate(); } catch (SQLException e) { e.printStackTrace(); } // return the result list return updatestatus; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<Employee> getEmployeeList()\r\n\t{\r\n\t\treturn new ArrayList<Employee>(empList);\r\n\t}", "public java.util.List<andrewNamespace.xsdconfig.EmployeeDocument.Employee> getEmployeeList()\r\n {\r\n final class EmployeeList extends java.util.AbstractList<andrewNamespace.xsdconfig....
[ "0.79085803", "0.77967346", "0.7719734", "0.7560867", "0.75302017", "0.7527092", "0.75236905", "0.7513976", "0.74917114", "0.7487952", "0.74678963", "0.74673915", "0.74663174", "0.7436313", "0.74096674", "0.73786515", "0.7373243", "0.7373243", "0.73507303", "0.73296666", "0.7...
0.0
-1
/ Initialize standard Hardware interfaces
public void init(HardwareMap ahwMap) { // Save reference to Hardware map hwMap = ahwMap; // Define and Initialize Motors frontLeft = hwMap.get(DcMotor.class, "front_left"); frontRight = hwMap.get(DcMotor.class, "front_right"); backLeft = hwMap.get(DcMotor.class, "back_left"); backRight = hwMap.get(DcMotor.class, "back_right"); flipper = hwMap.get(DcMotor.class, "flipper"); intake = hwMap.get(CRServo.class, "intake"); reelIn = hwMap.get(DcMotor.class, "reelIn"); reelOut = hwMap.get(DcMotor.class, "reelOut"); bucket = hwMap.get(Servo.class, "bucket"); frontLeft.setDirection(DcMotor.Direction.FORWARD); frontRight.setDirection(DcMotor.Direction.REVERSE); backLeft.setDirection(DcMotor.Direction.REVERSE); backRight.setDirection(DcMotor.Direction.FORWARD); // Set all motors to zero power frontLeft.setPower(0); frontRight.setPower(0); backLeft.setPower(0); backRight.setPower(0); reelIn.setPower(0); reelOut.setPower(0); // Set all motors to run without encoders. // May want to use RUN_USING_ENCODERS if encoders are installed. frontLeft.setMode(DcMotor.RunMode.RUN_USING_ENCODER); frontRight.setMode(DcMotor.RunMode.RUN_USING_ENCODER); backLeft.setMode(DcMotor.RunMode.RUN_USING_ENCODER); backRight.setMode(DcMotor.RunMode.RUN_USING_ENCODER); flipper.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initHardware(){\n }", "protected abstract void initHardwareInstructions();", "public void initDevice() {\r\n\t\t\r\n\t}", "@Override\n public void init() {\n imu = new IMU(hardwareMap, \"imu\");\n left = hardwareMap.get(DcMotor.class, \"left\");\n right = hardwareMap.g...
[ "0.82195395", "0.73752016", "0.7216539", "0.67965", "0.6724124", "0.669583", "0.65941155", "0.6581155", "0.6566472", "0.6544243", "0.6538143", "0.65299714", "0.65150887", "0.6503974", "0.64357215", "0.6424831", "0.641138", "0.64111674", "0.6406715", "0.6403975", "0.63948625",...
0.5903891
100
FIXME: who, exactly is responsible for the state initialization?
@Override public void receive(Resolution resolution, DecoderParameters parameters) throws JPEG2000Exception { final TileComponent tileComp = resolution.tileComp; final Tile tile = tileComp.tile; if (null == tile.state) { tile.start(parameters); } // Check if tile state claims that all tile-components are ready if (tile.state.remainingComps.decrementAndGet() == 0) { final DecodeTask<Tile> task = createTask(tileComp); if (task != null) { try { task.call(); } catch (final JPEG2000Exception e) { throw e; } catch (final Exception e) { throw new JPEG2000Exception(GeneralMessages.WRAPPED_EXCEPTION, e); } } nextStage.receive(tile, parameters); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void initState() {\n \n\t//TODO: Complete Method\n\n }", "private StateUtils() {}", "public InitialState() {\r\n\t\t}", "public void\ninit(SoState state)\n//\n////////////////////////////////////////////////////////////////////////\n{\n data = getDefault().getValue();\n}", ...
[ "0.78656405", "0.7520934", "0.74205345", "0.72514844", "0.72489935", "0.72344536", "0.7203164", "0.71516454", "0.71516454", "0.71516454", "0.71516454", "0.71076125", "0.7087213", "0.7086325", "0.70751476", "0.7070711", "0.7070711", "0.7070711", "0.7070711", "0.7070711", "0.70...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Create a list of elements from 0 to listSize 1
public static ArrayList<Integer> createList(int listSize) { ArrayList<Integer> list = new ArrayList<>(); for (int i = 0; i < listSize; i++) { list.add(i); } return list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ArrayIntList buildList(int size) {\n\t\tArrayIntList list = new ArrayIntList();\n\t\tfor (int i=1;i<=size;i++)\n\t\t\tlist.add(i);\n\t\treturn list; \n\t}", "abstract protected Object newList( int capacity );", "public List<Integer> generateList(int size){\n List<Integer> data = new ArrayList<>(...
[ "0.72652686", "0.6892539", "0.6866071", "0.68565536", "0.65330875", "0.64928734", "0.6415715", "0.63854843", "0.6327815", "0.6322757", "0.6305202", "0.6268137", "0.6209406", "0.6171297", "0.61203456", "0.6089442", "0.60732955", "0.6044915", "0.60131645", "0.6009036", "0.60085...
0.71886367
1
Shuffle the given list of elements
public static ArrayList<Integer> shuffleList(ArrayList<Integer> list) { Collections.shuffle(list); return list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static <E> void shuffle(ArrayList<E> list) {\n\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\tint index = (int)(Math.random() * list.size());\n\t\t\tE temp = list.get(i);\n\t\t\tlist.set(i, list.get(index));\n\t\t\tlist.set(index, temp);\n\t\t}\n\t}", "public void shuffle() {\n\t\tCollections.shuffle(A...
[ "0.74791294", "0.74053353", "0.73557264", "0.73268074", "0.7308831", "0.73054", "0.7229903", "0.72148675", "0.7196897", "0.7110233", "0.70797646", "0.70595896", "0.70595896", "0.7021928", "0.68719774", "0.68539107", "0.6798909", "0.67769027", "0.677381", "0.6766109", "0.67614...
0.6812989
16
Created by Alexandr on 03/01/2015.
public interface PhonebookCallback { void phoneBookContacts(boolean refreshed, Map<String,String> numberToName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Overr...
[ "0.6165543", "0.60484517", "0.60043913", "0.59441006", "0.58437", "0.58159846", "0.5781206", "0.5781206", "0.57655525", "0.5727654", "0.5718107", "0.5709629", "0.56947094", "0.56947094", "0.56947094", "0.56947094", "0.56947094", "0.56947094", "0.5686866", "0.5653419", "0.5647...
0.0
-1
Spring service that handles CRUD requests for Medicine entities
public interface MedicineService { /** * Save an existing Medicine entity * */ public void saveMedicine(Medicine medicine); /** * Delete an existing MedicineSymptom entity * */ public Medicine deleteMedicineMedicineSymptoms(Integer medicine_id, Integer related_medicinesymptoms_id); /** * Delete an existing Medicine entity * */ public void deleteMedicine(Medicine medicine_1); /** * Delete an existing Category entity * */ public Medicine deleteMedicineCategory(Integer medicine_id_1, Integer related_category_id); /** * Save an existing Category entity * */ public Medicine saveMedicineCategory(Integer id, Category related_category); /** * Load an existing Medicine entity * */ public Set<Medicine> loadMedicines(); /** * Save an existing MedicineSymptom entity * */ public Medicine saveMedicineMedicineSymptoms(Integer id_1, MedicineSymptom related_medicinesymptoms); /** * Return a count of all Medicine entity * */ public Integer countMedicines(); /** */ public Medicine findMedicineByPrimaryKey(Integer id_2); /** * Return all Medicine entity * */ public List<Medicine> findAllMedicines(Integer startResult, Integer maxRows); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<Medicine> getAllMedicines();", "public void saveMedicine(Medicine medicine);", "public interface MedicalRecordService {\n List<MedicalRecord> getRecords();\n\n MedicalRecord getRecord(String id);\n\n MedicalRecord saveRecord(MedicalRecord medicalRecord);\n\n boolean removeRecord(String id);\n\n Page<...
[ "0.66438437", "0.64618975", "0.6339168", "0.6203261", "0.6165235", "0.6159209", "0.6085981", "0.6028313", "0.602663", "0.6020319", "0.59190196", "0.59186673", "0.5899576", "0.589539", "0.5895128", "0.5873919", "0.5841684", "0.5819347", "0.5786321", "0.57623386", "0.5755261", ...
0.77628624
0
Save an existing Medicine entity
public void saveMedicine(Medicine medicine);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Medicine saveMedicineCategory(Integer id, Category related_category);", "CounselorBiographyTemp save(CounselorBiographyTemp entity);", "@Transactional(value = \"cleia-txm\")\n public void addpatientMedical(Medical m) throws Exception {\n if (m != null) {\n Medical medical = entit...
[ "0.6536686", "0.647831", "0.64674824", "0.6421076", "0.6352957", "0.628522", "0.62807524", "0.6272346", "0.6197006", "0.61902153", "0.61538875", "0.6139913", "0.6137976", "0.6089502", "0.6088025", "0.6051887", "0.601988", "0.6003124", "0.5999754", "0.59804064", "0.59429747", ...
0.7879477
0
Delete an existing MedicineSymptom entity
public Medicine deleteMedicineMedicineSymptoms(Integer medicine_id, Integer related_medicinesymptoms_id);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void deleteRecord(){\n if (mCurrentSymptomUri != null) {\n // pull out the string value we are trying to delete\n mEditSymptomText = findViewById(R.id.edit_symptoms);\n String deleteTry = mEditSymptomText.getText().toString();\n\n // set up the ContentProv...
[ "0.66230446", "0.66213673", "0.6406153", "0.6372039", "0.63345635", "0.6278772", "0.62366235", "0.6232182", "0.6197238", "0.61890006", "0.6140297", "0.6129805", "0.6047056", "0.60066533", "0.59823525", "0.59795976", "0.5976565", "0.5975473", "0.59701824", "0.5961467", "0.5942...
0.76036817
0
Delete an existing Medicine entity
public void deleteMedicine(Medicine medicine_1);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testDeleteMedicine() {\n\t\tMedicine medicine=new Medicine();\n\t\tmedicine.setMedicineName(\"neorin\");\n\t\tmedicine.setstocks(0);\n\t\tmedicineService.addMedicine(medicine.getMedicineName(),medicine.getStocks());\n\t\tString medicineName=medicine.getMedicineName();\n\t\tint medicineId=medic...
[ "0.78221714", "0.7546948", "0.73367876", "0.71920925", "0.69738835", "0.6837795", "0.6594897", "0.6591882", "0.6530738", "0.65082484", "0.64895785", "0.6397024", "0.6375231", "0.6367983", "0.6344821", "0.6334112", "0.63306046", "0.6324861", "0.63238686", "0.6316541", "0.63142...
0.7777573
1
Delete an existing Category entity
public Medicine deleteMedicineCategory(Integer medicine_id_1, Integer related_category_id);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void delete(Category entity) {\n\n\t}", "@Override\n\tpublic void delete(Category entity) {\n\t\t\n\t}", "void deleteCategory(Category category);", "void deleteCategoryById(int categoryId);", "void delete(Category category);", "public void delete(Category category) {\n category...
[ "0.8436464", "0.84011376", "0.8130726", "0.8007793", "0.79951596", "0.7847227", "0.7761261", "0.77449214", "0.7721539", "0.7712864", "0.7641981", "0.76339084", "0.7575315", "0.75750977", "0.7564359", "0.7423378", "0.73985595", "0.73852843", "0.71010554", "0.7029697", "0.70235...
0.6437955
47
Save an existing Category entity
public Medicine saveMedicineCategory(Integer id, Category related_category);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Category saveCategory(Category category);", "public void save() {\n if (category != null) {\n category.save();\n }\n }", "public void saveOrUpdate(Category entity) {\n\t\tthis.getCurrentSession().saveOrUpdate(entity);\r\n\t}", "public void saveCategory(Category category){\r\n\t\te...
[ "0.8430683", "0.79802775", "0.75482947", "0.75473386", "0.7514211", "0.74494284", "0.7393205", "0.73225284", "0.7278746", "0.72093195", "0.71752805", "0.71353674", "0.703463", "0.70330346", "0.7024979", "0.70055073", "0.69774926", "0.69602424", "0.6917099", "0.6905641", "0.69...
0.6889793
24
Load an existing Medicine entity
public Set<Medicine> loadMedicines();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Alimento loadAlimentoById(Long id) throws EntityNotFoundException;", "@Override\n\tpublic Medico findById(Integer id_medico) {\n\t\treturn medicoMapper.findById(id_medico);\n\t}", "List<Medicine> getAllMedicines();", "public void saveMedicine(Medicine medicine);", "@Transactional(value = \"cleia-txm\")\n ...
[ "0.64135855", "0.6026048", "0.58496535", "0.5795685", "0.577462", "0.5695675", "0.56315994", "0.56251854", "0.56247365", "0.56019217", "0.55847377", "0.5521005", "0.5508834", "0.5497768", "0.5491173", "0.5375682", "0.53654987", "0.53618747", "0.53366333", "0.5325676", "0.5324...
0.7365861
0
Save an existing MedicineSymptom entity
public Medicine saveMedicineMedicineSymptoms(Integer id_1, MedicineSymptom related_medicinesymptoms);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void saveMedicine(Medicine medicine);", "public void save(PtJJdwcy entity);", "@Override\r\n\tpublic void save(ConsigMetalDt consigMetalDt) {\n\t\tconsigMetalDtRepository.save(consigMetalDt);\r\n\t}", "public void SaveMuestra(MuestraMA objMx)throws Exception{\n Session session = sessionFactory....
[ "0.62620074", "0.6205712", "0.5882995", "0.5855602", "0.58537155", "0.572653", "0.5686221", "0.56374097", "0.55723804", "0.5558464", "0.55515295", "0.55481136", "0.5529135", "0.55111754", "0.54992175", "0.549066", "0.54572105", "0.54277873", "0.5420092", "0.54120684", "0.5411...
0.7396094
0
Return a count of all Medicine entity
public Integer countMedicines();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public long getTotalDoctors() {\n List<Long> temp=em.createNamedQuery(\"DoctorTb.getTotalDoctors\").getResultList();\n long count=0;\n for(long i:temp)\n {\n count=i;\n }\n return count;\n }", "public int getMembreCount() {\n try {\n//...
[ "0.67357486", "0.67140734", "0.65759504", "0.6475841", "0.64045", "0.63927275", "0.6352922", "0.63515335", "0.62653756", "0.62653756", "0.62653756", "0.6253096", "0.62464285", "0.623786", "0.623786", "0.623786", "0.623786", "0.623786", "0.623786", "0.623786", "0.623786", "0...
0.68058234
0
Return all Medicine entity
public List<Medicine> findAllMedicines(Integer startResult, Integer maxRows);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<Medicine> getAllMedicines();", "public Set<Medicine> loadMedicines();", "@Transactional\n\tpublic List<Medicine> listMedicine() {\n\t\treturn this.medicineDao.listMedicine();\n\t}", "public List<Medico> findAll() {\n\t\treturn medicoMapper.findAll();\n\t}", "public List<Medico> getAllMedicos() {\n ...
[ "0.8579058", "0.7931328", "0.7684784", "0.76616096", "0.7648672", "0.74434257", "0.73248047", "0.731022", "0.7307966", "0.7038951", "0.68200666", "0.67923397", "0.6789465", "0.65301925", "0.65255487", "0.65099716", "0.64809114", "0.64729685", "0.6357291", "0.6320875", "0.6316...
0.6583778
13
boolean is_landscape = getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE; int layout_id = is_landscape ? R.layout.fragment_layout_support_land : R.layout.fragment_layout_support;
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { int layout_id = R.layout.fragment_layout_support; View v = inflater.inflate(layout_id, container, false); // PostListFragment titles = (PostListFragment) // getFragmentManager().findFragmentById(R.id.titles); // if (titles == null) { // Make new fragment to show this selection. PostListFragment titles = new PostListFragment(); titles.setArguments(getArguments()); // Execute a transaction, replacing any existing fragment // with this one inside the frame. FragmentTransaction ft = getFragmentManager().beginTransaction(); ft.replace(R.id.titles, titles); ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE); ft.commit(); return v; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isLandscapeOrientation(){\n return getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE; \n }", "public abstract int getFragmentLayout();", "protected abstract int getFragmentLayout();", "protected abstract int getFragmentLayout();", "protected abst...
[ "0.7009447", "0.67763704", "0.6662866", "0.6662866", "0.6662866", "0.66414994", "0.6607219", "0.64370984", "0.6351719", "0.63110024", "0.6258377", "0.6247129", "0.6246205", "0.6212077", "0.6137223", "0.61300856", "0.6123508", "0.61188644", "0.60949695", "0.6080999", "0.599406...
0.0
-1
Log.i(Constants.LOG_TAG, "Request Response: " + json_response);
protected void handleJSonResponse(JsonNode json_response, Context _context) { JsonNode status_node = ServerExchangeUtils.safeJSonGet(json_response, Constants.JSON_STATUSCODE_KEYWORD); String status = status_node == null ? null : status_node.getTextValue(); if (Constants.OK_STATUS.equals(status)) { JsonNode timestamp_node = ServerExchangeUtils.safeJSonGet(json_response, Constants.JSON_TIMESTAMP_KEYWORD); long timestamp = timestamp_node == null ? 0 : timestamp_node.getLongValue(); // Log.i(Constants.LOG_TAG, "timestamp: " + timestamp); JsonNode posts_array = ServerExchangeUtils.safeJSonGet(json_response, Constants.JSON_POSTS_KEYWORD); ArrayList<ContentValues> insert_values = new ArrayList<ContentValues>(); Iterator<JsonNode> it = posts_array.getElements(); while (it.hasNext()) { JsonNode post = (JsonNode) it.next(); Post p = new Post(post, _context); if (p.isStoredInDb() == false) { insert_values.add(p.getDBContentValues()); } } if (insert_values.isEmpty() == false) { _context.getContentResolver().bulkInsert(Constants.POSTS_CONTENT_URI, insert_values.toArray(new ContentValues[] {})); } // Store timestamp final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(_context); Editor editor = prefs.edit(); editor.putLong(Constants.JSON_TIMESTAMP_KEYWORD, timestamp); editor.commit(); } Log.d(Constants.LOG_TAG, " ===> REFRESH DATA SUCCESSFULLY FINISHED!"); fireDataRefreshEnd(Constants.POSTS_REFRESH_KEYWORD); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onResponse(String response) {\n Log.i(Constant.TAG_MAIN, \"Get JSON respone: \" + response);\n\n }", "@Override\n public void onResponse(String response) {\n Log.d(DEBUG_TAG, \"R...
[ "0.83005047", "0.81717813", "0.80976844", "0.7828935", "0.76003635", "0.75575787", "0.7500097", "0.73144716", "0.72868174", "0.72400534", "0.7188057", "0.7126411", "0.70978624", "0.7074247", "0.6919631", "0.68897986", "0.68672556", "0.68672556", "0.68672556", "0.68672556", "0...
0.0
-1
Check if record exists with username
public boolean checkUser(String user) { SQLiteDatabase db = this.getWritableDatabase(); Cursor cursor = db.rawQuery(new StringBuilder().append("SELECT id FROM " + TABLE_USERS + " WHERE username = '").append(user).append("'").toString(), null); int count = cursor.getCount(); cursor.moveToFirst(); cursor.close(); if (count > 0) { return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean existsByUsername(String username);", "boolean exists(String username);", "public boolean existsByUsername(String username);", "public boolean existsUser(String username);", "public Boolean isUsernameExist(String username);", "boolean isUsernameExist(String username);", "boolean isUserExists(Use...
[ "0.8406689", "0.83896965", "0.83893627", "0.81282836", "0.8002645", "0.7949722", "0.79015565", "0.78823304", "0.7823005", "0.78120446", "0.77304673", "0.76974565", "0.7639481", "0.7629543", "0.75803715", "0.7570524", "0.74996614", "0.74904823", "0.7449792", "0.74442714", "0.7...
0.0
-1
Check if record exists with username and password
public boolean checkUser(String user, String pass) { SQLiteDatabase db = this.getWritableDatabase(); Cursor cursor = db.rawQuery(new StringBuilder().append("SELECT id FROM " + TABLE_USERS + " WHERE username = '").append(user).append("' AND password = '").append(pass).append("'").toString(), null); int count = cursor.getCount(); cursor.moveToFirst(); cursor.close(); if (count > 0) { return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isUserExist(String username, String password);", "public boolean isUserExist(String email, String Password);", "boolean exists(String username);", "public boolean existsUser(String username);", "boolean existsByUsername(String username);", "public boolean Exist(int usertype,long id,String passwor...
[ "0.8085721", "0.7704138", "0.7422152", "0.74078846", "0.737015", "0.73291874", "0.72961295", "0.72522616", "0.7248136", "0.7185183", "0.71843183", "0.71267164", "0.7111717", "0.7106476", "0.7084136", "0.7082209", "0.70379305", "0.70325917", "0.70136887", "0.70077276", "0.6989...
0.0
-1
Get fields for username and populate User static class
public void makeUser(String user){ SQLiteDatabase db = this.getWritableDatabase(); Cursor cursor = db.rawQuery(new StringBuilder().append("SELECT id, password, weight, height, weight_goal, step_goal FROM " + TABLE_USERS + " WHERE username = '").append(user).append("'").toString(), null); cursor.moveToFirst(); User.setUsername(user); User.setUserID(cursor.getInt(0)); User.setUserPassword(cursor.getString(1)); User.setUserWeight(cursor.getString(2)); User.setUserHeight(cursor.getString(3)); User.setUserWeightGoal(cursor.getString(4)); User.setUserStepGoal(cursor.getString(5)); cursor.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public User getUserByName(String username);", "public User getUserByName(String username);", "public User getUserDetails(String username);", "public User getUser(String username);", "public User get(String username);", "public User getUserByUsername(String username);", "public User() {\n this.userna...
[ "0.7055467", "0.7055467", "0.69507647", "0.6816443", "0.6780926", "0.66744924", "0.66688687", "0.66581815", "0.66215056", "0.66215056", "0.66215056", "0.66084045", "0.65936726", "0.65766597", "0.6544859", "0.6516162", "0.6508737", "0.649668", "0.6485255", "0.64643663", "0.640...
0.0
-1
Gets the cargo_fijo value for this ServicioVO.
public java.lang.Integer getCargo_fijo() { return cargo_fijo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCargo_fijo(java.lang.Integer cargo_fijo) {\n this.cargo_fijo = cargo_fijo;\n }", "public String getCodiceFiscale() {\n return codiceFiscale;\n }", "public java.lang.String getFolio() {\n return folio;\n }", "public final String getFci() {\n return String.valueOf(...
[ "0.67135227", "0.5625274", "0.551516", "0.5505584", "0.5407235", "0.5404442", "0.53287184", "0.5317594", "0.5266941", "0.52601093", "0.52582705", "0.52582705", "0.5204675", "0.51749086", "0.51669526", "0.5165852", "0.5120443", "0.51194733", "0.5103559", "0.50985724", "0.50907...
0.75709516
0
Sets the cargo_fijo value for this ServicioVO.
public void setCargo_fijo(java.lang.Integer cargo_fijo) { this.cargo_fijo = cargo_fijo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.lang.Integer getCargo_fijo() {\n return cargo_fijo;\n }", "public void setDatossolicitudBfclasificacionConvenio(int value) {\n this.datossolicitudBfclasificacionConvenio = value;\n }", "public void setFolio(java.lang.String folio) {\n this.folio = folio;\n }", "publi...
[ "0.5826449", "0.5688364", "0.5576835", "0.55322754", "0.54676485", "0.5458142", "0.53695154", "0.53695154", "0.53290987", "0.53049403", "0.5220881", "0.5192129", "0.5166092", "0.5103783", "0.5076885", "0.5022961", "0.50198364", "0.5017738", "0.5017483", "0.49982437", "0.49982...
0.7172747
0
Gets the id value for this ServicioVO.
public java.lang.Integer getId() { return id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getIdServicio() {\n return idServicio;\n }", "public Integer getId() {\n return id.get();\n }", "@JsonProperty(\"id\")\n@ApiModelProperty(example = \"123e4567-e89b-12d3-a456-556642440000\", value = \"Unique identifier for virtual instance.\")\n public String getId() {\n retur...
[ "0.65504235", "0.6357719", "0.63435984", "0.63022953", "0.6247901", "0.6233033", "0.619407", "0.61582315", "0.61198205", "0.6064122", "0.60557425", "0.604969", "0.6043674", "0.6043674", "0.6043674", "0.6043674", "0.6043674", "0.6043674", "0.6043674", "0.6043674", "0.6043674",...
0.6011271
53
Sets the id value for this ServicioVO.
public void setId(java.lang.Integer id) { this.id = id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setId(Object id) {\n this.id = id;\n }", "public void setId(Object id) {\n this.id = id;\n }", "public void setId(java.lang.String value) {\n this.id = value;\n }", "public void setId(java.lang.String value) {\n this.id = value;\n }", "public void setId(java.lang.Str...
[ "0.68402994", "0.68402994", "0.664632", "0.664632", "0.664632", "0.6594807", "0.6578937", "0.6541585", "0.65226585", "0.6520785", "0.6515985", "0.65138894", "0.65138894", "0.65138894", "0.65138894", "0.6511217", "0.65104634", "0.650072", "0.6499056", "0.6496354", "0.6496354",...
0.0
-1
Gets the tipo_servicio value for this ServicioVO.
public java.lang.String getTipo_servicio() { return tipo_servicio; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setTipo_servicio(java.lang.String tipo_servicio) {\n this.tipo_servicio = tipo_servicio;\n }", "public static TipoDeServicio getServicio() {\r\n\tdouble posicion = Math.random();\r\n\r\n\tif (posicion >= 0.5) {\r\n\t return TipoDeServicio.ECONOMICO;\r\n\t} else if (posicion >= 0.3) {\r\n...
[ "0.7482672", "0.701234", "0.6998588", "0.69585484", "0.68998766", "0.6833492", "0.6833492", "0.6833492", "0.6833492", "0.6769741", "0.6769741", "0.6742133", "0.6703564", "0.6703564", "0.66025746", "0.6584637", "0.6574879", "0.6557394", "0.65222025", "0.6504245", "0.6359006", ...
0.83573854
0
Sets the tipo_servicio value for this ServicioVO.
public void setTipo_servicio(java.lang.String tipo_servicio) { this.tipo_servicio = tipo_servicio; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.lang.String getTipo_servicio() {\n return tipo_servicio;\n }", "public void setTipo(Tipo tipo) {\r\n\t\tthis.tipo = tipo;\r\n\t}", "public void setTipo(String tipo) {\r\n this.tipo = tipo;\r\n }", "public void setTipo(String tipo) {\n\t\tthis.tipo = tipo;\n\t}", "public void...
[ "0.69459426", "0.69072676", "0.6830085", "0.6820518", "0.67350984", "0.67350984", "0.67222977", "0.6652753", "0.66510326", "0.6606289", "0.6590549", "0.65195173", "0.6501352", "0.64046216", "0.63519496", "0.6341568", "0.62920123", "0.6290948", "0.6231607", "0.62309206", "0.61...
0.8367361
0
Gets the unidadDeMedida value for this ServicioVO.
public java.lang.String getUnidadDeMedida() { return unidadDeMedida; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setUnidadDeMedida(java.lang.String unidadDeMedida) {\n this.unidadDeMedida = unidadDeMedida;\n }", "public IDado getDado() {\n\t\ttry {\r\n\t\t\treturn juego.getDado();\r\n\t\t} catch (RemoteException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\tre...
[ "0.6274172", "0.613841", "0.61380255", "0.60098076", "0.5810773", "0.574346", "0.56669605", "0.56600845", "0.5654312", "0.5608019", "0.5598093", "0.55936146", "0.5578172", "0.55760515", "0.55759484", "0.5542893", "0.55291", "0.55268854", "0.550899", "0.54840964", "0.5471265",...
0.7979857
0
Sets the unidadDeMedida value for this ServicioVO.
public void setUnidadDeMedida(java.lang.String unidadDeMedida) { this.unidadDeMedida = unidadDeMedida; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.lang.String getUnidadDeMedida() {\n return unidadDeMedida;\n }", "public void setDevid(Integer devid) {\n this.devid = devid;\n }", "public void setDebut(int d) {\n\t\tthis.debut = d;\n\t}", "public void setDepartement(Departement departement) {\n\t\tthis.departement = departe...
[ "0.628652", "0.54227555", "0.53709805", "0.5156912", "0.5050273", "0.49944723", "0.4976598", "0.4938023", "0.4935715", "0.49168822", "0.48996165", "0.4897868", "0.48886868", "0.48842332", "0.4877015", "0.485761", "0.48486468", "0.484066", "0.48136988", "0.4785006", "0.4783836...
0.7614951
0
Gets the valor_servicio value for this ServicioVO.
public java.lang.Integer getValor_servicio() { return valor_servicio; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setValor_servicio(java.lang.Integer valor_servicio) {\n this.valor_servicio = valor_servicio;\n }", "public java.lang.String getTipo_servicio() {\n return tipo_servicio;\n }", "public int getId_servico() {\n return id_servico;\n }", "public BigDecimal getIdTipoServic...
[ "0.71494085", "0.6989227", "0.64873695", "0.64015603", "0.6333472", "0.6332972", "0.6247934", "0.6189073", "0.6145794", "0.61430466", "0.6134969", "0.60618377", "0.60023934", "0.5947882", "0.5941642", "0.5916734", "0.59097314", "0.59022075", "0.5894954", "0.5890047", "0.58581...
0.82215333
0
Sets the valor_servicio value for this ServicioVO.
public void setValor_servicio(java.lang.Integer valor_servicio) { this.valor_servicio = valor_servicio; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setTipo_servicio(java.lang.String tipo_servicio) {\n this.tipo_servicio = tipo_servicio;\n }", "public java.lang.Integer getValor_servicio() {\n return valor_servicio;\n }", "public void setServicioSRI(ServicioSRI servicioSRI)\r\n/* 106: */ {\r\n/* 107:125 */ this.servi...
[ "0.6640463", "0.65725124", "0.62417734", "0.61364025", "0.611224", "0.6072705", "0.6039393", "0.60051775", "0.5983814", "0.5979818", "0.59323865", "0.5880107", "0.58785146", "0.5848473", "0.57704663", "0.5768104", "0.5762645", "0.57549876", "0.574739", "0.5695991", "0.5684328...
0.804797
0
Return type metadata object
public static org.apache.axis.description.TypeDesc getTypeDesc() { return typeDesc; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MetadataType getType();", "public MetadataType getType() {\n return type;\n }", "public MilanoTypeMetadata.TypeMetadata getMetadata()\n {\n if (typeMetadata == null) {\n return null;\n }\n\n return typeMetadata;\n }", "private Metadata getMetadata(RubyModule type)...
[ "0.7969707", "0.7373198", "0.7358018", "0.7090138", "0.67353225", "0.67259765", "0.66725683", "0.65644145", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6543223",...
0.0
-1
Create welcome socket at port number
public static void startServer() throws IOException { ServerSocket serverSocket = new ServerSocket(port_number); System.out.println("Server Up"); System.out.println("Port number: " + port_number); Thread loop = loopClients(serverSocket); loop.start(); while (running) { try { Thread.sleep(1000l); } catch (Exception e) { } } loop.stop(); removeAllClients(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Server() {\n try {\n welcomeSocket = new ServerSocket(PORT);\n System.out.println(\"Server listening on \" + PORT);\n } catch (IOException e) {\n System.out.println(\"Error creating welcome socket. Is this socket available?\");\n }\n }", "private Se...
[ "0.71816427", "0.68330956", "0.6768307", "0.67010117", "0.66599417", "0.6618516", "0.66006005", "0.6595038", "0.65936375", "0.6573975", "0.6544973", "0.6516772", "0.6509474", "0.64957964", "0.64760494", "0.6423197", "0.6404881", "0.63446146", "0.6326768", "0.63258207", "0.631...
0.0
-1
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be: 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ... By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the evenvalued terms.
public long result(){ long result = 0L; int one = 1; result = result(one, one, result); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long evenFiboSum()\n\t{\n\t\tlong a=1;\n\t\tlong b=1;\n\t\tlong c=a+b;\n\t\tlong sum=0;\n\t\twhile(c<N)\n\t\t{\n\t\t\t/**\n\t\t\t * Norml Fibonacci series\n\t\t\t * \n\t\t\tSystem.out.println(c);\n\t\t\ta=b;\n\t\t\tb=c;\n\t\t\tc=a+b;\n\t\t\t*/\n\t\t\tsum+=c;//adding the even values\n\t\t\ta=b+c;//finding ne...
[ "0.8254532", "0.77734476", "0.74497545", "0.7351564", "0.69479626", "0.693764", "0.69069487", "0.6851362", "0.68147886", "0.6790678", "0.6783615", "0.67257303", "0.6715906", "0.6661005", "0.65647745", "0.65615034", "0.6518392", "0.6499622", "0.6480473", "0.6477956", "0.647482...
0.0
-1
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 ConvenioVO)) { return false; } ConvenioVO other = (ConvenioVO) object; if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setId(Integer id) { this.id = id; }", "private Integer getId() { return this.id; }", "public void setId(int id){ this.id = id; }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "public void setID(String idIn) {this.id = idIn;}", "public void se...
[ "0.6896886", "0.6838461", "0.67056817", "0.66419715", "0.66419715", "0.6592331", "0.6579151", "0.6579151", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.65624106", "0.65624106", "0.65441847", "0.65243006", "0.65154546", "0.6487427", "0.64778...
0.0
-1
private volatile boolean disconnected = false;
public RealTimeDataStream(RealTimeDataSource source, PushBufferStream stream) { this.stream = stream; this.source = source; this.stream.setTransferHandler(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void disconnect() {\r\n\t\trunning = false;\r\n\t}", "@Override\n\tpublic boolean disconnect() {\n\t\treturn false;\n\t}", "public void disconnect()\n {\n isConnected = false;\n }", "boolean hasDisconnect();", "boolean getDisconnect();", "protected void processDisconnection(){}", "@Over...
[ "0.7455508", "0.7300217", "0.7233841", "0.7092112", "0.696364", "0.69311845", "0.68562835", "0.68561864", "0.68171394", "0.68171394", "0.67943424", "0.67632556", "0.67625284", "0.67468405", "0.6697342", "0.6633642", "0.6629748", "0.6627189", "0.6627189", "0.66041964", "0.6569...
0.0
-1
This is why you should use dependency injection frameworks
public Game(Printer printer, GameStatus gameStatus, ChestGameData chestGameData, PlayerGameData playerGameData, GameBackup gameBackup, GameInitPrinter gameInitPrinter, DiamondIncreaser diamondIncreaser, LocationSetter locationSetter, StatsGiver statsGiver, ItemGiver itemGiver, PlayerNameFixer playerNameFixer, BukkitTask startingTask, ItemRemover itemRemover, ScoreboardManager scoreboardManager, WorldProvider worldProvider) { this.printer = printer; this.gameStatus = gameStatus; this.chestGameData = chestGameData; this.playerGameData = playerGameData; this.gameBackup = gameBackup; this.gameInitPrinter = gameInitPrinter; this.diamondIncreaser = diamondIncreaser; this.locationSetter = locationSetter; this.statsGiver = statsGiver; this.itemGiver = itemGiver; this.playerNameFixer = playerNameFixer; this.startingTask = startingTask; this.itemRemover = itemRemover; this.scoreboardManager = scoreboardManager; this.worldProvider = worldProvider; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void inject() {\n }", "private static interface Service {}", "public interface ProductService {\n /**\n * Returns all the products\n *\n * @return a list with all the products\n */\n List<Product> retrieveProducts();\n\n /***\n * Service to store the products\n * @pa...
[ "0.64313084", "0.6262649", "0.62052065", "0.617127", "0.6063005", "0.60117465", "0.60117465", "0.6007337", "0.59981066", "0.5997282", "0.5985733", "0.5979024", "0.59542245", "0.59446317", "0.59339476", "0.5911078", "0.5902438", "0.59017396", "0.5875867", "0.58745134", "0.5872...
0.0
-1
For testing, without threads
public void startInitializeMocked(Player gameStarter, String[] invitedPlayerNames) { gameStatus.setGameStatusType(GameStatusType.STARTING); printCountDown(gameStarter, invitedPlayerNames); startGame(); join(gameStarter, null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void test() {\n\n\t}", "public void testPerformance() {\n \t}", "protected TestBench() {}", "@Test\n public void testServerTask(){\n for(Double current : sampleLatLngs.keySet()) {\n tmp = current;\n try {\n runTestOnUiThread(new Runnable() {\n ...
[ "0.6305242", "0.6073862", "0.5869928", "0.5824709", "0.5819034", "0.58107704", "0.5808615", "0.5807448", "0.5807448", "0.5803381", "0.5781855", "0.5781855", "0.5768588", "0.5762827", "0.5749306", "0.5745308", "0.5743141", "0.5704901", "0.5700201", "0.5680017", "0.5680017", ...
0.0
-1
Added 1 tick extra because GameInitPrinter needs unstarted game after 60 seconds
private void startGameAfterDelay() { int delay = (int) (double) DiaConfig.SECONDS_UNTIL_START.get() * MinecraftConstants.TICKS_PER_SECOND + 1; this.startingTask = new BukkitRunnable() { @Override public void run() { startGame(); } }.runTaskLater(DiaHuntPlugin.getInstance(), delay); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void startGame() {\n timer.scheduleAtFixedRate(new TimerTask() {\n @Override\n public void run() {\n update();\n }\n }, 0, 2);\n }", "private GameConfig() {\n\t\tgameLoopSleepMs = 200;\n\t}", "private void printTimer(){\n\t\...
[ "0.64172864", "0.63051695", "0.62868154", "0.623957", "0.62151223", "0.6203521", "0.61914456", "0.61888033", "0.6185974", "0.6184892", "0.6149234", "0.6130865", "0.61306626", "0.6127177", "0.61097777", "0.6100096", "0.609255", "0.6091787", "0.60900724", "0.606555", "0.6063955...
0.0
-1
Creates new form AddUserView
public AddUserView() { initComponents(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(value = \"/addNewUser.html\", method = RequestMethod.GET)\n\tpublic ModelAndView addNewUser() {\n\n\t\treturn new ModelAndView(\"newUser\", \"form\", new FbUser());\n\n\t}", "public String create() {\r\n\t\tuserService.create(userAdd);\r\n\t\tusers.setWrappedData(userService.list());\r\n\t\tretur...
[ "0.75551087", "0.71457076", "0.7114915", "0.7090866", "0.7007588", "0.6898601", "0.6875123", "0.6849917", "0.67997813", "0.6790298", "0.67628264", "0.6744621", "0.6741727", "0.6731923", "0.6714526", "0.66966486", "0.66854215", "0.66469103", "0.66403013", "0.6622704", "0.66078...
0.7322405
1
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel1 = new javax.swing.JLabel(); uid = new javax.swing.JTextField(); jLabel2 = new javax.swing.JLabel(); userPassword1 = new javax.swing.JPasswordField(); jLabel3 = new javax.swing.JLabel(); userPassword2 = new javax.swing.JPasswordField(); jLabel4 = new javax.swing.JLabel(); sn = new javax.swing.JTextField(); jLabel5 = new javax.swing.JLabel(); givenName = new javax.swing.JTextField(); jLabel6 = new javax.swing.JLabel(); licenseCombo = new javax.swing.JComboBox(); jLabel7 = new javax.swing.JLabel(); deptCombo = new javax.swing.JComboBox(); jLabel8 = new javax.swing.JLabel(); emailField = new javax.swing.JTextField(); jLabel9 = new javax.swing.JLabel(); mayakuField = new javax.swing.JTextField(); jLabel10 = new javax.swing.JLabel(); jLabel11 = new javax.swing.JLabel(); jLabel1.setText("ユーザーID:"); jLabel2.setText("パスワード:"); jLabel3.setText("確認:"); jLabel4.setText("姓:"); jLabel5.setText("名:"); jLabel6.setText("医療資格:"); licenseCombo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); jLabel7.setText("診療科:"); deptCombo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); jLabel8.setText("電子メール:"); jLabel9.setText("麻薬施用者免許番号:"); jLabel10.setText("ユーザーID: 半角英数字と記号 _+-.#$&@ で4文字以上"); jLabel11.setText("パスワード: 半角英数字と記号 _+-.#$&@ で6文字以上"); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, jLabel1) .add(org.jdesktop.layout.GroupLayout.TRAILING, jLabel2) .add(org.jdesktop.layout.GroupLayout.TRAILING, jLabel4) .add(org.jdesktop.layout.GroupLayout.TRAILING, jLabel6) .add(org.jdesktop.layout.GroupLayout.TRAILING, jLabel8) .add(org.jdesktop.layout.GroupLayout.TRAILING, jLabel9)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) .add(org.jdesktop.layout.GroupLayout.LEADING, licenseCombo, 0, 134, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.LEADING, sn) .add(org.jdesktop.layout.GroupLayout.LEADING, userPassword1) .add(uid)) .add(33, 33, 33) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, jLabel3) .add(org.jdesktop.layout.GroupLayout.TRAILING, jLabel5) .add(org.jdesktop.layout.GroupLayout.TRAILING, jLabel7)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false) .add(userPassword2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 134, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(givenName) .add(deptCombo, 0, 135, Short.MAX_VALUE))) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) .add(org.jdesktop.layout.GroupLayout.LEADING, mayakuField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 157, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.LEADING, emailField)) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) .add(org.jdesktop.layout.GroupLayout.LEADING, jLabel11, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.LEADING, jLabel10, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addContainerGap(17, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .add(9, 9, 9) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel1) .add(uid, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel2) .add(userPassword1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel4) .add(sn, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(licenseCombo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(jLabel6))) .add(layout.createSequentialGroup() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel3) .add(userPassword2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel5) .add(givenName, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel7) .add(deptCombo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel8) .add(emailField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel9) .add(mayakuField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(jLabel10) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(jLabel11) .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.732017", "0.7291279", "0.7291279", "0.7291279", "0.7286003", "0.7249014", "0.721411", "0.720819", "0.7196242", "0.7190395", "0.71849346", "0.7159721", "0.7148069", "0.70934445", "0.7079763", "0.7056577", "0.6987638", "0.6978011", "0.69549644", "0.69530493", "0.6945049", ...
0.0
-1
End of variables declaration//GENEND:variables
public javax.swing.JComboBox getDeptCombo() { return deptCombo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void lavar() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}", "private void assignment() {\n\n\t\t\t}", "private void kk12() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n pu...
[ "0.6359889", "0.6279971", "0.6187572", "0.60946643", "0.6091784", "0.60693496", "0.6051178", "0.6051116", "0.60025823", "0.59882265", "0.5969506", "0.5967291", "0.5966852", "0.5964883", "0.5961025", "0.5940938", "0.5907547", "0.5895275", "0.5889831", "0.5881641", "0.5879958",...
0.0
-1
Pinta un cuadro de texto donde se informa del resultado del combate.
public void showInfoCombatResolution(CombatResolutionCommand crc) { // Field f = this.battelField.getField(crc.getAtacker()); // int xPos = f.getX()*SIZE_FIELD; // int yPos = f.getY()*SIZE_FIELD; // this.message = new MessageVolante(xPos,yPos,crc.toString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String comunica() {\r\n// ritorna una stringa\r\n// posso usare il metodo astratto \r\n return msg + AggiungiQualcosa();\r\n }", "public void colocarComentariosResultado()\r\n\t{\r\n\t\tresultadoprueba.colocarTextoComentarios(\"\");\r\n\t}", "private String organizarCadena (Resu...
[ "0.70144993", "0.6653098", "0.65154016", "0.6341629", "0.6302034", "0.6228569", "0.6120688", "0.60978884", "0.6094845", "0.60934484", "0.60649234", "0.6064428", "0.60335326", "0.60172254", "0.59894294", "0.5971472", "0.5968719", "0.5960726", "0.59594965", "0.5951921", "0.5951...
0.0
-1
/ Not in Use Here
@Override public void setText(String englishText) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void smell() {\n\t\t\n\t}", "private void kk12() {\n\n\t}", "public void method_4270() {}", "public final void mo51373a() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public void mo38117a() {...
[ "0.6844106", "0.64192086", "0.6383049", "0.6355465", "0.6339325", "0.63069683", "0.63040996", "0.62842035", "0.6276528", "0.6271526", "0.62553495", "0.6249945", "0.62379736", "0.6222127", "0.6216143", "0.6187247", "0.61834395", "0.6182107", "0.61820924", "0.6168626", "0.61408...
0.0
-1
/ Not in Use Here
@Override public String getText() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void smell() {\n\t\t\n\t}", "private void kk12() {\n\n\t}", "public void method_4270() {}", "public final void mo51373a() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public void mo38117a() {...
[ "0.6844106", "0.64192086", "0.6383049", "0.6355465", "0.6339325", "0.63069683", "0.63040996", "0.62842035", "0.6276528", "0.6271526", "0.62553495", "0.6249945", "0.62379736", "0.6222127", "0.6216143", "0.6187247", "0.61834395", "0.6182107", "0.61820924", "0.6168626", "0.61408...
0.0
-1
/ Not in Use Here
@Override public void clearSharedPrefs() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void smell() {\n\t\t\n\t}", "private void kk12() {\n\n\t}", "public void method_4270() {}", "public final void mo51373a() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public void mo38117a() {...
[ "0.6844106", "0.64192086", "0.6383049", "0.6355465", "0.6339325", "0.63069683", "0.63040996", "0.62842035", "0.6276528", "0.6271526", "0.62553495", "0.6249945", "0.62379736", "0.6222127", "0.6216143", "0.6187247", "0.61834395", "0.6182107", "0.61820924", "0.6168626", "0.61408...
0.0
-1
Check which request we're responding to
@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == REQUEST_PERMISSION_SETTING) { checkPermission(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract boolean isAppropriateRequest(Request request);", "boolean hasRequest();", "boolean hasRequest();", "boolean hasRequest();", "boolean hasRequest();", "boolean hasRequest();", "boolean hasRequest();", "boolean hasRequest();", "boolean hasRequest();", "boolean hasRequest();", "bool...
[ "0.7172721", "0.7070074", "0.7070074", "0.7070074", "0.7070074", "0.7070074", "0.7070074", "0.7070074", "0.7070074", "0.7070074", "0.7070074", "0.6552328", "0.6549139", "0.6549139", "0.6549139", "0.65356266", "0.65148705", "0.65148705", "0.6458744", "0.6406288", "0.63191277",...
0.0
-1
Created by dllo on 17/11/13.
public interface DeptService { List<Department> query(); void saveOrUpdate(Department department); List<Department> findByDeptId(Department department); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "private stendhal() {\n\t}", "protect...
[ "0.58884627", "0.58104825", "0.57854575", "0.57498354", "0.57163584", "0.568441", "0.56792927", "0.5657257", "0.56437486", "0.5628545", "0.5628545", "0.5620037", "0.5598948", "0.5565841", "0.5563409", "0.5563409", "0.5563409", "0.5563409", "0.5563409", "0.55513066", "0.553897...
0.0
-1
contructor de la clase
public ProductoA2() { System.out.println("Hola yo soy el producto A2"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "public Constructor(){\n\t\t\n\t}", "public Clade() {}", "public Pasien() {\r\n }", "public Carrera(){\n }", "public Classe() {\r\n }", "public AntrianPasien() {\r\n\r\n }", "public CyanSus() {\n\n }", "public Chauffeur() {\r\n\t}", "public SlanjePoruk...
[ "0.8361166", "0.79532164", "0.7779388", "0.7673158", "0.75983745", "0.75870585", "0.7561172", "0.7542532", "0.75256324", "0.7497429", "0.7472902", "0.7466464", "0.74596524", "0.74351496", "0.74090457", "0.7364447", "0.735871", "0.7349423", "0.73423856", "0.7314446", "0.728393...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { ZhangSan zs = new ZhangSan(); zs.eat(); zs.print(); System.out.println(zs.address); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Create all datastructures needed for simulation.
public static void main(String[] args){ String configID = ""; String trustScoreFile = ""; String configFile = ""; String resultFile = ""; String queueOccupancyFile = ""; String messageDelaysFile = ""; JsonObject configurationJson = null; JsonParser jsonParser = new JsonParser(); int city; int startDay; int endDay; int seed; int queueSize; int numberOfDays; int threshold; int jamTower; int jamTowerLogic; int jamUser; int jamUserLogic; int allUserLength; int cooldownHours; List<Integer> userPool = new ArrayList<>(); List<Integer> jamTowerList = new ArrayList<>(); List<Integer> jamUserList = new ArrayList<>(); List<MobyMessage> messageList = new ArrayList<>(); String distributionType; String slackHook = ""; JsonArray jsonArray; JsonObject jsonObject; int i; int j; int currentDay; int currentHour; ArrayList<Integer> integerArrayList; HashMap<Integer, List<Integer>> networkStateOld = null; String currentDataFile; boolean firstHour; Scanner scanner = null; String line; String[] parts; int hour; int towerID; String userIDs; List<Integer> userSet; List<Integer> currentHourUsers; int userCounter; int simulationHour; int messagesInCirculation = 0; HashMap<Integer, Integer> messageDelays = new HashMap<>(); BufferedWriter resultsFileBuffer = null; BufferedWriter queueOccupancyFileBuffer = null; ArrayList<MobyMessage> deleteList = new ArrayList<>(); int exchangeProbability = -1; try { configID = args[0]; } catch(ArrayIndexOutOfBoundsException e) { System.out.println("Please pass a configuration ID!!"); return; } // Build all input output filenames. configFile = CONFIG_FILE_PREFIX + configID + CONFIG_FILE_FORMAT; resultFile = RESULT_FILE_PREFIX + configID + RESULT_FILE_FORMAT; queueOccupancyFile = RESULT_FILE_PREFIX + configID + QUEUE_OCCUPANCY_FORMAT; messageDelaysFile = RESULT_FILE_PREFIX + configID + MESSAGE_DELAYS_FORMAT; System.out.println("Configuration file: " + configFile); // Get config JSON from file. try { configurationJson = jsonParser.parse(new FileReader(configFile)).getAsJsonObject(); } catch (FileNotFoundException e) { System.out.println("Invalid config file supplied!!"); return; } // Read in all required configurations city = configurationJson.get("city").getAsInt(); startDay = configurationJson.get("start-day").getAsInt(); endDay = configurationJson.get("end-day").getAsInt(); seed = configurationJson.get("seed").getAsInt(); queueSize = configurationJson.get("queuesize").getAsInt(); threshold = configurationJson.get("threshold").getAsInt(); dosNumber = configurationJson.get("dos-number").getAsInt(); jamTower = configurationJson.get("jam-tower").getAsInt(); jamTowerLogic = configurationJson.get("jam-tower-logic").getAsInt(); jamUser = configurationJson.get("jam-user").getAsInt(); jamUserLogic = configurationJson.get("jam-user-logic").getAsInt(); numberOfDays = endDay - startDay; cooldownHours = configurationJson.get("cooldown").getAsInt(); trustScoreFile = DATA_FILE_PREFIX + configurationJson.get("trust-scores").getAsString() + TRUST_SCORE_FILE_FORMAT; trustSimulation = configurationJson.get("trust-simulation").getAsBoolean(); // Seed the random to make picking subsets in MX reproducible random = new Random(seed); try { exchangeProbability = configurationJson.get("exchange-probability").getAsInt(); } catch (java.lang.UnsupportedOperationException e) { exchangeProbability = -1; } try { slackHook = configurationJson.get("slack-hook").getAsString(); } catch (java.lang.UnsupportedOperationException e) { System.out.println("Slack hook missing, won't send messages!"); } // Convert messages to our own objects. jsonArray = configurationJson.get("messages").getAsJsonArray(); for(i = 0; i < jsonArray.size(); i++) { jsonObject = (JsonObject) jsonArray.get(i); if(i == 0) timeToLive = jsonObject.get("ttl").getAsInt(); // Enforce unchanging TTL here? messageList.add(new MobyMessage( jsonObject.get("id").getAsInt(), jsonObject.get("ttl").getAsInt(), jsonObject.get("src").getAsInt(), jsonObject.get("dst").getAsInt(), jsonObject.get("hour").getAsInt(), 1.0 )); } jsonArray = configurationJson.get("userpool").getAsJsonArray(); for(i = 0; i < jsonArray.size(); i++) { userPool.add(jsonArray.get(i).getAsInt()); } jsonArray = configurationJson.get("jam-user-list").getAsJsonArray(); for(i = 0; i < jsonArray.size(); i++) { jamUserList.add(jsonArray.get(i).getAsInt()); } jsonArray = configurationJson.get("jam-tower-list").getAsJsonArray(); for(i = 0; i < jsonArray.size(); i++) { jamTowerList.add(jsonArray.get(i).getAsInt()); } jsonArray = configurationJson.get("all-towers").getAsJsonArray(); for(i = 0; i < jsonArray.size(); i++) { allTowers.add(jsonArray.get(i).getAsInt()); } // Deal with default queue size. if(queueSize == 0) { System.out.println("Default queuesize, using:" + messageList.size()); queueSize = messageList.size(); } // Done with the configuration json! configurationJson = null; firstHour = true; System.out.println("Creating per user hashmaps :" + userPool.size()); // 1 bit = dosnumber of bits, so just need one bit per hour per tower. dosBitsSize = allTowers.size() * ((numberOfDays * 24) - cooldownHours); for(int user : userPool) { MobyUser mobyUser = new MobyUser(user, queueSize, dosNumber, messageList.size(), dosBitsSize); mobyUserHashMap.put(user, mobyUser); } // Load trust scores from file. if(!trustScoreFile.isEmpty() && trustSimulation) { try { JsonObject trustScoreJson = jsonParser.parse(new FileReader(trustScoreFile)).getAsJsonObject(); jsonArray = trustScoreJson.getAsJsonArray("users"); System.out.println("Got trust scores for: " + jsonArray.size()); JsonObject element; JsonArray trustedArray; MobyUser mobyUser; int user; for(i = 0; i < jsonArray.size(); i++) { element = jsonArray.get(i).getAsJsonObject(); user = Integer.parseInt((String)element.keySet().toArray()[0]); mobyUser = mobyUserHashMap.get(user); if(mobyUser == null) continue; trustedArray = element.getAsJsonArray("" + user); for(j = 0; j < trustedArray.size(); j++) { mobyUser.setUserTrust(trustedArray.get(j).getAsInt(), 1.0); } } dosTrust = 0.0; } catch (FileNotFoundException e) { System.out.println("Invalid trust score file supplied!!"); return; } } else { dosTrust = 0.0; } // Parse towers file and get all information. networkStateOld = new HashMap<>(); // Open results file and queue occupancy file. try { resultsFileBuffer = new BufferedWriter(new FileWriter(resultFile)); queueOccupancyFileBuffer = new BufferedWriter(new FileWriter(queueOccupancyFile)); } catch (IOException e) { System.out.println("Problem opening results file or queue occupancy file!!"); } // For the range of days. for(currentDay = startDay; currentDay < endDay; currentDay ++) { // For the hours of a day. for(currentHour = 0; currentHour < 24; currentHour++) { networkStateNew = new HashMap<>(); currentHourUsers = new ArrayList<>(); simulationHour = currentHour + (24 * (currentDay - startDay)); if(threshold==0) currentDataFile = DATA_FILE_PREFIX + city + "/" + currentDay + "_" + currentHour + DATA_FILE_FORMAT; else currentDataFile = DATA_FILE_PREFIX + city + "_" + threshold + "/" + startDay + "/" + numberOfDays + "/" + currentDay + "_" + currentHour + DATA_FILE_FORMAT; if(!firstHour){ System.out.println("Message delivery count: " + messageDelays.size() + " of: " + messagesInCirculation); System.out.println("Delivery rate: " + (double) messageDelays.size() / messagesInCirculation); } else firstHour = false; System.out.println("Processing hour: " + currentHour + " File: " + currentDataFile); try { scanner = new Scanner(new File(currentDataFile)); } catch(FileNotFoundException e) { System.out.println(e.toString()); } userCounter = 0; while(scanner.hasNext()) { line = scanner.nextLine(); parts = line.split(","); hour = Integer.parseInt(parts[0]); towerID = Integer.parseInt(parts[1]); userIDs = parts[2]; userSet = new ArrayList<>(); for (String user : userIDs.split("\\|")) { userSet.add(Integer.parseInt(user)); } userCounter += userSet.size(); networkStateNew.put(towerID, userSet); currentHourUsers.addAll(userSet); } scanner.close(); System.out.println("Total users seen this hour: " + userCounter); System.out.println("Unique users seen this hour: " + currentHourUsers.size()); System.out.println("Userset new people: " + userPool.containsAll(currentHourUsers)); // Send out messages for this hour. // TODO: Might be a better way to do this than parse the entire list of messages. for(MobyMessage m : messageList) { if(m.hour == simulationHour) { // System.out.println("Source: " + mobyUserHashMap.get(m.src)); mobyUserHashMap.get(m.src).addMessage(m.id, 1.0); messagesInCirculation += 1; } } // Jam towers based on the jam tower list provided by generate messages. for (int jamTowerID : jamTowerList) { networkStateNew.remove(jamTowerID); } // At this point, the old simulator would figure out who moved and things like that, that's unnecessary imo. List<Integer> sortedList = new ArrayList<>(); sortedList.addAll(networkStateNew.keySet()); Collections.sort(sortedList); // Simulation message exchanges. if (exchangeProbability >= 0 && exchangeProbability <= 100) { partialMXHandler(sortedList, simulationHour, dosNumber, queueSize, exchangeProbability); } else if (exchangeProbability == -1) { messageExchangeHandler(sortedList, simulationHour, dosNumber, queueSize); } else { System.out.println("Invalid exchange probability:" + exchangeProbability); return; } // Check message deliveries. for(MobyMessage m : messageList) { if(!m.getDelivered()) { try { // TODO: This could be moved to checking the bitset instead. if(mobyUserHashMap.get(m.dst).hasMessage(m.id)) { m.setDelivered(); messageDelays.put(m.id, simulationHour - m.hour); System.out.println("Message: " + m.id + " Delay: " + (simulationHour - m.hour)); } } catch (NullPointerException e) { System.out.println("Exception: " + e.toString()); // Dead user!! } } } // Write delivery ratio. try { resultsFileBuffer.write( currentDay + "," + currentHour + "," + currentHourUsers.size() + "," + messageDelays.size() + "," + messagesInCirculation + "," + timeToLive + "," + queueSize + "," + dosNumber + "," + trustSimulation + "," + trustScoreFile + "," + seed + "," + threshold + "," + configID + '\n'); } catch (IOException e) { System.out.println("Problem writing delivery ratios!!"); } // Write queue occupancy. try { int totalDosMessages = 0; int totalNonDos = 0; MobyUser mobyUser; for(int user : currentHourUsers) { mobyUser = mobyUserHashMap.get(user); totalDosMessages += (mobyUser.getDosSetSize() * dosNumber); totalNonDos += mobyUser.getQueueOccupancy(0); queueOccupancyFileBuffer.write( currentDay + "," + currentHour + "," + user + "," + mobyUser.getQueueOccupancy(dosNumber) + '\n'); } // Don't think I really need this anywhere. Might be expensive computing it. System.out.println("Avg. DOS occupancy: " + totalDosMessages/currentHourUsers.size()); System.out.println("Avg. Non Dos occupancy: " + totalNonDos/currentHourUsers.size()); } catch (IOException e) { System.out.println("Problem writing queue occupancies!!"); } // Reduce TTLs and drop messages. System.out.println("TTL check!"); deleteList.clear(); for(MobyMessage m : messageList) { if(m.hour <= simulationHour) { m.ttl--; if(m.ttl < 0) deleteList.add(m); } } System.out.println("Deleting " + deleteList.size() + " dead messages!!"); for(MobyMessage m : deleteList) { messageList.remove(m); } int canParticipate = 0; for(Map.Entry<Integer, MobyUser> userEntry : mobyUserHashMap.entrySet()) { userEntry.getValue().deleteMessages(deleteList); if(simulationHour > timeToLive) { int clearIndex = ((allTowers.size()) * (simulationHour - timeToLive)); clearIndex -= 1; userEntry.getValue().dropDos(clearIndex); } } networkStateOld = networkStateNew; // Do next hour. } // Do next day. // sendSlackMessage(slackHook, "Day: " + currentDay + " done!!"); } // Close results file and queue occupancy file. try { resultsFileBuffer.close(); queueOccupancyFileBuffer.close(); } catch (IOException e) { System.out.println("Problem closing results file or qo file!!"); } // Write message delays. try { BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(messageDelaysFile)); Iterator iterator = messageDelays.entrySet().iterator(); while(iterator.hasNext()) { HashMap.Entry entry = (HashMap.Entry)iterator.next(); bufferedWriter.write(entry.getKey().toString() + "," + entry.getValue().toString() + '\n'); } bufferedWriter.close(); } catch(IOException e) { System.out.println("IOException at writing message delays file!!"); } // Simulation done, send message to slack. String msg = "Simulation ttl: " + timeToLive + ", dosNumber: " + dosNumber + ", delivery ratio: " + ((float)messageDelays.size() / messagesInCirculation) + ", config: " + configID; sendSlackMessage(slackHook, msg); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tmealyMachineEClass = createEClass(MEALY_MACHINE);\n\t\tcreateEReference(mealyMachineEClass, MEALY_MACHINE__INITIAL_STATE);\n\t\tcreateEReference(mealyMachineEClass, MEALY_MACHIN...
[ "0.621816", "0.6203721", "0.615886", "0.61379534", "0.6100678", "0.6054238", "0.6035998", "0.5967809", "0.5966657", "0.5965281", "0.5963325", "0.59555334", "0.5920741", "0.59110034", "0.5909218", "0.5881138", "0.5857073", "0.5857033", "0.58519864", "0.58514005", "0.5847909", ...
0.0
-1
Perform message exchange in tower
private static void performMessageExchange(List<Integer> users, int dosIDForHour){ // For all pairs of users, send messages from one queue to the other with queue constraints in mind. MobyUser mobyUser1, mobyUser2; Collections.sort(users); for (int u1 : users) { mobyUser1 = mobyUserHashMap.get(u1); mobyUser1.performDosExchangeForHour(dosIDForHour, dosNumber); for (int u2 : users) { mobyUser2 = mobyUserHashMap.get(u2); mobyUser1.performMessageExchangeTailDrop(mobyUser2, dosNumber, dosIDForHour); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sendToManager(){\n String receiveMessage;\n while((receiveMessage=receiveFrom(messageReader)) != null){\n manager.manage(receiveMessage);\n }\n }", "public void process(Key msg) throws IOException {\n relay(msg);\n }", "public void sendToWard(){\r\n\t\t/...
[ "0.6453039", "0.6318349", "0.62938344", "0.6215021", "0.61743903", "0.6162818", "0.6135167", "0.60975385", "0.6094356", "0.60454035", "0.60440344", "0.6041836", "0.6038535", "0.6025695", "0.60230505", "0.6009424", "0.59977484", "0.59829605", "0.59808314", "0.5954589", "0.5909...
0.5801893
29
Return 1 for now, but implement trust lookup here.
public double getUserTrust(int userID) { return this.trustScores.getOrDefault(userID, 1.0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract boolean evaluateTrust(Credential untrustedCredential, TrustBasisType trustBasis)\n throws SecurityException;", "@Override\n \t\t\tpublic void checkServerTrusted(X509Certificate[] chain,\n \t\t\t\t\tString authType) throws CertificateException {\n \t\t\t\t\n \t\t\t}", "@Ove...
[ "0.5918108", "0.5532062", "0.5513421", "0.54218066", "0.53660446", "0.5362121", "0.5360124", "0.53053033", "0.52831525", "0.52831525", "0.5280819", "0.5279815", "0.52600795", "0.5241949", "0.52416074", "0.5231207", "0.522767", "0.5225529", "0.5225476", "0.5221146", "0.5197393...
0.5436565
3
Create rect from the preview frame. All the IdAreaField methods are percentage so it is not a problem. First construct the id card on the preview frame. Then we construct this IdAreaField and return the result as Rect to be used for the Tesseract.
private Rect createRect(final Camera.Size size, final IdAreaField idAreaField) { final int offsetWidth = (int) (size.width * 0.2); final int idCardWidth = (int) (size.width * 0.6); final int idCardHeight = (int) (idCardWidth / 1.58); final int topIdCardHeight = idCardWidth / 2 - idCardHeight / 2; final int bottomIdCardHeight = idCardWidth / 2 + idCardHeight / 2; final Rect parentRect = new Rect(offsetWidth, topIdCardHeight, size.width - offsetWidth, bottomIdCardHeight); final int left = parentRect.left + idAreaField.getPercentageFromParentLeft() * parentRect.width() / 100; final int top = parentRect.top + idAreaField.getPercentageFromParentTop() * parentRect.height() / 100; final int right = left + idAreaField.getPercentageWidth() * parentRect.width() / 100; final int bottom = top + idAreaField.getPercentageHeight() * parentRect.height() / 100; return new Rect(left, top, right, bottom); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Rect getViewableRect() {\n if (previewBuilder != null) {\n Rect crop_rect = previewBuilder.get(CaptureRequest.SCALER_CROP_REGION);\n if (crop_rect != null) {\n return crop_rect;\n }\n }\n Rect sensor_rect = characteristics.get(CameraChara...
[ "0.5877981", "0.5770873", "0.5728195", "0.57154936", "0.5376862", "0.5367588", "0.5338113", "0.5323333", "0.5320642", "0.5305942", "0.5271918", "0.52700907", "0.5199204", "0.5179586", "0.51697755", "0.51359206", "0.51178503", "0.5093353", "0.5090647", "0.5070747", "0.504717",...
0.7375911
0
Enter options here... HashMap map = new HashMap(); staticAuthRequestOptionsService.setOptions(map);
@Bean public StaticAuthRequestOptionsService staticAuthRequestOptionsService() { return new StaticAuthRequestOptionsService(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Map getOptions();", "public void setOptions(Map options) {\n\t\t\r\n\t}", "protected abstract void initializeOptions(Options options);", "public static void initAuthentication(AuthenticationOptions options)\n {\n logger.info(\"Registering custom HTTPClient authentication with Solr\");\n Spne...
[ "0.6190342", "0.60928684", "0.59290695", "0.5857452", "0.56471795", "0.5621805", "0.56186676", "0.55224794", "0.5514749", "0.54728943", "0.5450522", "0.5450522", "0.5450522", "0.53931963", "0.53920734", "0.53881735", "0.53686535", "0.53662384", "0.53567994", "0.5351534", "0.5...
0.66951054
0
checks whether two rectangles intersect
public static boolean intersectsRectangleRectangle(int r1x, int r1y, int r1width, int r1height, int r2x, int r2y, int r2width, int r2height) { if(r1width == 0 || r1height == 0) { return false; } if(r2width == 0 || r2height == 0) { return false; } int r1MinX = r1x; int r1MinY = r1y; int r1MaxX = r1x+r1width; int r1MaxY = r1y+r1height; int r2MinX = r2x; int r2MinY = r2y; int r2MaxX = r2x+r2width; int r2MaxY = r2y+r2height; boolean intersects = r1MaxX > r2MinX && r1MinX < r2MaxX && r1MaxY > r2MinY && r1MinY < r2MaxY; return intersects; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean rectIntersect(Rectangle a, Rectangle b){\n\t\treturn !(b.x > (a.x + a.width) \n\t\t\t\t|| (b.x + b.width) < a.x\n\t\t\t\t|| b.y > (a.y + a.height)\n\t\t\t\t|| (b.y + b.height) < a.y);\n\t}", "private static boolean doBoundingBoxesIntersect(Rectangle a, Rectangle b) {\r\n\t return a.getMi...
[ "0.803757", "0.80287683", "0.77159816", "0.75435907", "0.75039345", "0.7398152", "0.7265145", "0.72476524", "0.72287863", "0.72039235", "0.71227527", "0.7106735", "0.71029353", "0.70392525", "0.70349765", "0.7013902", "0.69816923", "0.6966949", "0.69318306", "0.6905748", "0.6...
0.72252136
9
checks whether a rectangle and a circle intersect
public static boolean intersectsRectangleCircle(int rx, int ry, int rWidth, int rHeight, int cx, int cy, int cRadius) { int radius = cRadius; int rcx = rx + (rWidth/2); int rcy = ry + (rHeight/2); int hw = rWidth/ 2; int hh = rHeight / 2; int dx = Math.abs(cx - rcx); int dy = Math.abs(cy - rcy); if(dx > (radius+hw) || dy > (radius+hh)) { return false; } int cDistX = Math.abs(cx - rx - hw); int cDistY = Math.abs(cy - ry - hh); if(cDistX <= hw) { return true; } if(cDistY <= hh) { return true; } int cornerDistSq = ( (cDistX-hw)*(cDistX-hw) ) + ( (cDistY-hh)*(cDistY-hh) ); return cornerDistSq <= radius*radius; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean intersects(Circle range) {\n\t\treturn range.intersects(boundary);\n\t}", "public boolean intersects(Circle other)\n{\n if (Math.abs(center.x - other.center.x) <= (radius +other.radius) && \n Math.abs(center.y - other.center.y) <= (radius + other.radius))// true calculation needs both radius ...
[ "0.77870274", "0.7719082", "0.7532193", "0.73522484", "0.7342921", "0.7338287", "0.7224123", "0.7108104", "0.6934644", "0.68446124", "0.6809273", "0.67691416", "0.67441046", "0.67360824", "0.6696587", "0.6678946", "0.6671462", "0.6659245", "0.6647823", "0.66432935", "0.663983...
0.7176444
7
checks whether a rectangle and a line segment intersect and returns them in intersections
public static boolean intersectsRectangleLine(int rx, int ry, int rWidth, int rHeight, int lx1,int ly1, int lx2, int ly2, List<Vector2i> intersections) { int minX = rx; int minY = ry; int maxX = rx + rWidth; int maxY = ry + rHeight; //both points of one side of rectangle if(minX > lx1 && minX > lx2) { return false; } if(minY > ly1 && minY > ly2) { return false; } if(maxX < lx1 && maxX < lx2) { return false; } if(maxY < ly1 && maxY < ly2) { return false; } //both points of line inside rectangle if( lx1 > minX && lx1 < maxX && lx2 > minX && lx2 < maxX && ly1 > minY && ly1 < maxY && ly2 > minY && ly2 < maxY ) { return true; } //check line-line if(intersections != null) { int numIntersections = 0; Vector2i v1 = new Vector2i(); if(intersectsLineLine(lx1, ly1, lx2, ly2, minX, minY, maxX, minY, v1)) { numIntersections++; if(intersections!=null) intersections.add(v1); }; Vector2i v2 = new Vector2i(); if(intersectsLineLine(lx1, ly1, lx2, ly2, maxX, minY, maxX, maxY, v2)) { numIntersections++; if(intersections!=null) intersections.add(v2); }; Vector2i v3 = new Vector2i(); if(intersectsLineLine(lx1, ly1, lx2, ly2, minX, maxY, maxX, maxY, v3)) { numIntersections++; if(intersections!=null) intersections.add(v3); }; Vector2i v4 = new Vector2i(); if(intersectsLineLine(lx1, ly1, lx2, ly2, minX, maxY, minX, minY, v4)) { numIntersections++; if(intersections!=null) intersections.add(v4); }; if(numIntersections > 0) { return true; } } else { if(intersectsLineLine(lx1, ly1, lx2, ly2, minX, minY, maxX, minY, null)) { return true; }; if(intersectsLineLine(lx1, ly1, lx2, ly2, maxX, minY, maxX, maxY, null)) { return true; }; if(intersectsLineLine(lx1, ly1, lx2, ly2, minX, maxY, maxX, maxY, null)) { return true; }; if(intersectsLineLine(lx1, ly1, lx2, ly2, minX, maxY, minX, minY, null)) { return true; }; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CFWRect intersectsLine( CFWPoint poiBegI, CFWPoint poiEndI)\t{\r\n\t\t//1.rejust rect\r\n\t\t//correct: (m_poiLT.m_fX < m_poiRB.m_fX && m_poiLT.m_fY < m_poiRB.m_fY)\r\n\t\tif(m_poiLT.m_fX > m_poiRB.m_fX && m_poiLT.m_fY > m_poiRB.m_fY)\t{\r\n\t\t\t//exchange all\r\n\t\t\tCFWPoint poiTmp = m_poiLT;\r\n\t\t\tm...
[ "0.7452159", "0.74200004", "0.7171419", "0.6880748", "0.6840842", "0.68077666", "0.6794342", "0.6792318", "0.6779183", "0.676791", "0.66784036", "0.66551", "0.6642457", "0.6632204", "0.6593711", "0.65858704", "0.65705884", "0.65573144", "0.6536481", "0.6523608", "0.65158814",...
0.77781403
0
checks whether a rectangle and a polygon intersect and returns them in intersections
public static boolean intersectsRectanglePolygon(int rx, int ry, int rWidth, int rHeight, Vector2i[] polygon, List<Vector2i> intersections) { int minX = rx; int minY = ry; int maxX = rx + rWidth; int maxY = ry + rHeight; int numPointsInRect = 0; for(Vector2i v : polygon) { if(pointInRectangle(minX, minY, maxX, maxY, v.x, v.y)) { numPointsInRect++; } } if(numPointsInRect > 0) { return true; } int numPointsInPolygon = 0; if(pointInPolygon(polygon, minX, minY)) { numPointsInPolygon++; } if(pointInPolygon(polygon, maxX, minY)) { numPointsInPolygon++; } if(pointInPolygon(polygon, maxX, maxY)) { numPointsInPolygon++; } if(pointInPolygon(polygon, minX, maxY)) { numPointsInPolygon++; } if(numPointsInPolygon > 0) { return true; } if(intersections != null) { int numIntersections = 0; for(int i=0; i<polygon.length; i++) { int x1 = polygon[i].x; int y1 = polygon[i].y; int x2 = polygon[(i+1) % polygon.length].x; int y2 = polygon[(i+1) % polygon.length].y; Vector2i v1 = new Vector2i(); if(intersectsLineLine(x1, y1, x2, y2, minX, minY, maxX, minY, v1)) { numIntersections++; intersections.add(v1); } Vector2i v2 = new Vector2i(); if(intersectsLineLine(x1, y1, x2, y2, maxX, minY, maxX, maxY, v2)) { numIntersections++; intersections.add(v2); } Vector2i v3 = new Vector2i(); if(intersectsLineLine(x1, y1, x2, y2, maxX, maxY, minX, maxY, v3)) { numIntersections++; intersections.add(v3); } Vector2i v4 = new Vector2i(); if(intersectsLineLine(x1, y1, x2, y2, minX, maxY, maxX, minY, v4)) { numIntersections++; intersections.add(v4); } } if(numIntersections > 0) { return true;} } else { for(int i=0; i<polygon.length; i++) { int x1 = polygon[i].x; int y1 = polygon[i].y; int x2 = polygon[(i+1) % polygon.length].x; int y2 = polygon[(i+1) % polygon.length].y; if(intersectsLineLine(x1, y1, x2, y2, minX, minY, maxX, minY, null)) { return true; } if(intersectsLineLine(x1, y1, x2, y2, maxX, minY, maxX, maxY, null)) { return true; } if(intersectsLineLine(x1, y1, x2, y2, maxX, maxY, minX, maxY, null)) { return true; } if(intersectsLineLine(x1, y1, x2, y2, minX, maxY, maxX, minY, null)) { return true; } } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Multimap<String, String> intersects(Polygon bounds);", "boolean intersects( Geometry gmo );", "Multimap<String, String> intersects(RectangleLatLng bounds);", "public static boolean intersectsRectangleLine(int rx, int ry, int rWidth, int rHeight, int lx1,int ly1, int lx2, int ly2, List<Vector2i> intersections...
[ "0.7464468", "0.70006853", "0.68331766", "0.67839766", "0.67329395", "0.6702952", "0.66411865", "0.66244256", "0.6585941", "0.65079206", "0.64286596", "0.6407228", "0.6384993", "0.63673496", "0.63459563", "0.6325763", "0.6324859", "0.63222766", "0.6316948", "0.628357", "0.627...
0.7608912
0
checks whether two circles intersect
public static boolean intersectsCircleCircle(int c1x, int c1y, int c1Radius, int c2x, int c2y, int c2Radius) { if(c1Radius == 0 || c2Radius == 0) { return false; } int distCX = c2x - c1x; int distCY = c2y - c1y; int dist2 = (distCX*distCX) + (distCY*distCY); int sumR = c1Radius + c2Radius; return (sumR*sumR) > dist2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean intersects(Circle other)\n{\n if (Math.abs(center.x - other.center.x) <= (radius +other.radius) && \n Math.abs(center.y - other.center.y) <= (radius + other.radius))// true calculation needs both radius to\n return true;\n return false;\n}", "public boolean inside(circle a, circle b)\r\n ...
[ "0.8159164", "0.786313", "0.76619315", "0.7654132", "0.74295235", "0.7194", "0.71835935", "0.70759034", "0.7008063", "0.6976083", "0.69335175", "0.69318664", "0.67479324", "0.67285156", "0.6718884", "0.6696094", "0.66939634", "0.6684909", "0.664953", "0.6572391", "0.6519995",...
0.7139929
7
checks whether a circle and a line segment intersect
public static boolean intersectsCircleLine(int cx, int cy, int cRadius, int lx1, int ly1, int lx2, int ly2) { // line start-end int dx = lx2 - lx1; int dy = ly2 - ly1; // center-lineStart int fx = lx1 - cx; int fy = ly1 - cy; int a = dot(dx, dy, dx, dy); int b = (2 * dot(fx, fy, dx, dy)); int c = (dot(fx, fy, fx, fy) - cRadius*cRadius); int discriminant = b*b-4*a*c; if(discriminant < 0) { return false; } discriminant = (int)Math.sqrt(discriminant); int t1 = (-b - discriminant) / (2*a); int t2 = (-b + discriminant) / (2*a); if(t1 >= 0 && t1 <= 1) { return true; } if(t2 >= 0 && t2 <= 1) { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean intersects(GLineSegment lineSegment) {\n if(this.equals(lineSegment)) return(true);\n else if(this.slope()==lineSegment.slope()) return(false);\n else {\n //complicated stuff here.\n return(false);\n }\n }", "protected boolean circlesInLine(Circle second, Circle third) {\n ...
[ "0.7655387", "0.75200504", "0.75171995", "0.70627624", "0.703388", "0.69855106", "0.6979743", "0.6936726", "0.6924555", "0.6910527", "0.68714315", "0.6851723", "0.681665", "0.6789012", "0.6749764", "0.67416537", "0.6729007", "0.6717622", "0.66858625", "0.6642549", "0.6639346"...
0.7460359
3
checks whether a circle and a polygon intersect
public static boolean intersectsCirclePolygon(int cx, int cy, int cRadius, Vector2i[] polygon) { int numPointsInCircle = 0; for(Vector2i v : polygon) { if(pointInCircle(cx, cy, cRadius, v.x, v.y)) { numPointsInCircle++; } } if(numPointsInCircle > 0) { return true; } for(int i=0; i<polygon.length; i++) { int x1 = polygon[i].x; int y1 = polygon[i].y; int x2 = polygon[(i+1) % polygon.length].x; int y2 = polygon[(i+1) % polygon.length].y; if(intersectsCircleLine(cx, cy, cRadius, x1, y1, x2, y2)) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean intersects(Circle other)\n{\n if (Math.abs(center.x - other.center.x) <= (radius +other.radius) && \n Math.abs(center.y - other.center.y) <= (radius + other.radius))// true calculation needs both radius to\n return true;\n return false;\n}", "boolean intersects( Geometry gmo );", "static...
[ "0.7317555", "0.71016425", "0.7088703", "0.6945138", "0.69300395", "0.69284385", "0.68933284", "0.6858794", "0.66948843", "0.6683665", "0.6656724", "0.6655647", "0.66548723", "0.6613996", "0.66116965", "0.6538661", "0.6452972", "0.64029324", "0.63434666", "0.6313027", "0.6305...
0.7257159
1
checks whether two line segments intersect and returns the intersection point in intersection
public static boolean intersectsLineLine(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, Vector2i intersection) { int d = (y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1); if (d == 0) return false; int yd = y1 - y3; int xd = x1 - x3; int ua = ((x4 - x3) * yd - (y4 - y3) * xd) / d; if (ua < 0 || ua > 1) return false; int ub = ((x2 - x1) * yd - (y2 - y1) * xd) / d; if (ub < 0 || ub > 1) return false; if (intersection != null) intersection.set(x1 + (x2 - x1) * ua, y1 + (y2 - y1) * ua); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Point intersectionWith(Line other) {\r\n double m1 = this.lineSlope();\r\n double m2 = other.lineSlope();\r\n double b1 = this.intercept();\r\n double b2 = other.intercept();\r\n double interX, interY;\r\n if (m1 == m2) {\r\n return null;\r\n // th...
[ "0.8025834", "0.7632653", "0.7594394", "0.7547064", "0.7462634", "0.7419603", "0.7391891", "0.737664", "0.73614866", "0.72754574", "0.71155757", "0.7098572", "0.70908695", "0.7011747", "0.69647884", "0.6958882", "0.6938883", "0.6933112", "0.691163", "0.68886334", "0.68339765"...
0.6749754
24